From 59bc39099e82f4ce026e0ebd916c96bdc40fc951 Mon Sep 17 00:00:00 2001
From: Jules Laplace <julescarbon@gmail.com>
Date: Wed, 19 Sep 2018 18:52:29 +0200
Subject: browser init

---
 app/client/index.jsx | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'app/client/index.jsx')

diff --git a/app/client/index.jsx b/app/client/index.jsx
index 0b0ed05..7fec561 100644
--- a/app/client/index.jsx
+++ b/app/client/index.jsx
@@ -10,6 +10,7 @@ import Auth from './auth'
 import { Header, AudioPlayer } from './common'
 import System from './system/system.component'
 import Dashboard from './dashboard/dashboard.component'
+import Browser from './browser/browser.component'
 import modules from './modules'
 
 const module_list = Object.keys(modules).map(name => {
@@ -33,6 +34,7 @@ const app = (
           <Route path='/' children={(props) => <div>{console.log(props.location.pathname)}</div>} />
           <Route exact path='/system' component={System} />
           <Route exact path='/dashboard' component={Dashboard} />
+          <Route exact path='/browse' component={Browser} />
           <Route exact path='/logout' component={Auth.Logout} />
           <Route exact path='/login' component={() => { console.log('pziss'); <Redirect to='/' /> }} />
           <Route exact path='/signup' component={() => { console.log('pziss'); <Redirect to='/' /> }} />
-- 
cgit v1.2.3-70-g09d2


From 19adbf48642085f39b9562ea6ad1e248a546373c Mon Sep 17 00:00:00 2001
From: Jules Laplace <julescarbon@gmail.com>
Date: Thu, 20 Sep 2018 02:19:48 +0200
Subject: browser is browsing

---
 app/client/auth/auth.gate.js            |     4 +-
 app/client/browser/browser.actions.js   |     3 +
 app/client/browser/browser.component.js |    64 +-
 app/client/browser/browser.reducer.js   |    40 +
 app/client/common/fileList.component.js |    21 +-
 app/client/index.jsx                    |     4 +-
 app/client/store.js                     |    18 +-
 public/bundle.js                        | 75643 +++++++++++++++++++++++++++++-
 public/bundle.js.map                    |     2 +-
 9 files changed, 75770 insertions(+), 29 deletions(-)
 create mode 100644 app/client/browser/browser.actions.js
 create mode 100644 app/client/browser/browser.reducer.js

(limited to 'app/client/index.jsx')

diff --git a/app/client/auth/auth.gate.js b/app/client/auth/auth.gate.js
index 6df1238..076ec54 100644
--- a/app/client/auth/auth.gate.js
+++ b/app/client/auth/auth.gate.js
@@ -46,11 +46,11 @@ class AuthRouter extends Component {
 
 class AuthGate extends Component {
   render(){
-    if (!this.props.auth.initialized) {
+    if (true && !this.props.auth.initialized) {
       console.log('loading auth')
       return <div className='loading'>Loading</div>
     }
-    if (this.props.auth.isAuthenticated) {
+    if (true || this.props.auth.isAuthenticated) {
       console.log('authenticated...')
       if (this.props.auth.returnTo) {
         let { returnTo } = this.props.auth
diff --git a/app/client/browser/browser.actions.js b/app/client/browser/browser.actions.js
new file mode 100644
index 0000000..81b9c7c
--- /dev/null
+++ b/app/client/browser/browser.actions.js
@@ -0,0 +1,3 @@
+import types from '../types'
+import actions from '../actions'
+import util from '../util'
diff --git a/app/client/browser/browser.component.js b/app/client/browser/browser.component.js
index 7330171..767c5fb 100644
--- a/app/client/browser/browser.component.js
+++ b/app/client/browser/browser.component.js
@@ -3,14 +3,68 @@ import { bindActionCreators } from 'redux'
 import { connect } from 'react-redux'
 import { Route, Link } from 'react-router-dom'
 
+import { Loading, FileList } from '../common'
+
+import actions from '../actions'
+
+/*
+ at this point we can list files
+ - filelist should support parentdirectory
+ - filelist should list directories first
+ - handle fetching a file from the server
+   - maybe don't let it fetch if it's larger than 2 megs?
+*/
+
 class Browser extends Component {
-  render(){
+  state = {
+    dir: '/',
+    module: 'pix2pixhd',
+    files: [],
+    loading: true
+  }
+  componentDidMount() {
+    this.fetch(this.state.dir)
+  }
+  handlePick(file) {
+    console.log(file)
+    this.fetch([this.state.dir, file.name].join('/').replace('//','/'))
+  }
+  fetch(dir) {
+    console.log('fetch', dir)
+    const { module } = this.state
+    this.setState({ dir, loading: true })
+    actions.socket.list_directory({ module, dir }).then(files => {
+      console.log(files)
+      this.setState({ dir, files, loading: false })
+    })
+  }
+
+  render() {
     const { app } = this.props
-    console.log(this.props)
+    const { loading, dir, module, files } = this.state
+    console.log(this.props, this.state)
     return (
       <div className='app browser'>
-        <h1>browser</h1>
-        {app.tool}
+        <h1>{dir}</h1>
+        {app.tool}<br/>
+        {loading && <Loading />}
+        <FileList
+          files={files}
+          groupDirectories
+          parentDirectory={dir !== '/'}
+          orderBy='name asc'
+          fields={'name datetime size'}
+          onClick={(file, e) => {
+            e.preventDefault()
+            e.stopPropagation()
+            console.log('picked a result', file)
+            this.handlePick(file)
+          }}
+          onClickParent={e => {
+            console.log('navigate up')
+            this.fetch(this.state.dir.split('/').slice(0, -1).join('') || '/')
+          }}
+        />
       </div>
     )
   }
@@ -21,7 +75,7 @@ const mapStateToProps = state => ({
 })
 
 const mapDispatchToProps = (dispatch, ownProps) => ({
-  // actions: bindActionCreators(dashboardActions, dispatch),
+  actions: bindActionCreators({}, dispatch),
 })
 
 export default connect(mapStateToProps, mapDispatchToProps)(Browser)
diff --git a/app/client/browser/browser.reducer.js b/app/client/browser/browser.reducer.js
new file mode 100644
index 0000000..099176f
--- /dev/null
+++ b/app/client/browser/browser.reducer.js
@@ -0,0 +1,40 @@
+import types from '../types'
+
+import moment from 'moment/min/moment.min'
+let FileSaver = require('file-saver')
+
+const browserInitialState = {
+  loading: false,
+  progress: null,
+  error: null,
+  data: {},
+  images: [
+  ],
+  files: [
+  ]
+}
+
+const browserReducer = (state = browserInitialState, action) => {
+  switch(action.type) {
+    case types.app.load_progress:
+      if (!action.data || action.data.module !== 'browser') {
+        return state
+      }
+      return {
+        ...state,
+        loading: true,
+        progress: action.progress,
+      }
+    case types.app.load:
+      return {
+        ...state,
+        loading: false,
+        error: null,
+        data: action.data,
+      }
+    default:
+      return state
+  }
+}
+
+export default browserReducer
diff --git a/app/client/common/fileList.component.js b/app/client/common/fileList.component.js
index b71faae..0e6b25e 100644
--- a/app/client/common/fileList.component.js
+++ b/app/client/common/fileList.component.js
@@ -11,18 +11,24 @@ export const FileList = props => {
   const {
     files,
     fields, sort, title,
-    linkFiles, onClick, onDelete,
+    linkFiles,
+    onClick, onClickParent, onDelete,
+    groupDirectories, parentDirectory,
     orderBy='name asc',
     className='',
     fileListClassName='filelist',
     rowClassName='row file'
   } = props
   const { mapFn, sortFn } = util.sort.orderByFn(orderBy)
-  const fileList = (files || [])
+  let sortedFiles = (files || [])
     .filter(f => !!f)
     .map(mapFn)
     .sort(sortFn)
-    .map(pair => {
+  if (groupDirectories) {
+    const groupedFiles = sortedFiles.reduce((a,b) => { a[b[1].dir].push(b); return a }, { true: [], false: [] })
+    sortedFiles = groupedFiles.true.concat(groupedFiles.false)
+  }
+  const fileList = sortedFiles.map(pair => {
       return <FileRow
         file={pair[1]}
         fields={fieldSet(fields)}
@@ -51,6 +57,15 @@ export const FileList = props => {
       }
 
 	  	<div className={'rows ' + fileListClassName}>
+        {parentDirectory && 
+          <div className={rowClassName + ' parent'}>
+            <div className="filename" title="Parent Directory">
+              <span class='link' onClick={(e) => onClickParent && onClickParent(e)}>
+                <i>Parent Directory</i>
+              </span>
+            </div>
+          </div>
+        }
 	  		{fileList}
       </div>
   	</div>
diff --git a/app/client/index.jsx b/app/client/index.jsx
index 7fec561..2b28ac1 100644
--- a/app/client/index.jsx
+++ b/app/client/index.jsx
@@ -36,8 +36,8 @@ const app = (
           <Route exact path='/dashboard' component={Dashboard} />
           <Route exact path='/browse' component={Browser} />
           <Route exact path='/logout' component={Auth.Logout} />
-          <Route exact path='/login' component={() => { console.log('pziss'); <Redirect to='/' /> }} />
-          <Route exact path='/signup' component={() => { console.log('pziss'); <Redirect to='/' /> }} />
+          <Route exact path='/login' component={() => { <Redirect to='/' /> }} />
+          <Route exact path='/signup' component={() => { <Redirect to='/' /> }} />
           {module_list}
           <Route exact path='/' component={Dashboard} />
           <Route path='/' component={Header} />
diff --git a/app/client/store.js b/app/client/store.js
index 654b22d..d6c632c 100644
--- a/app/client/store.js
+++ b/app/client/store.js
@@ -7,24 +7,26 @@ import { routerReducer } from 'react-router-redux'
 
 // import navReducer from './nav.reducer'
 import authReducer from './auth/auth.reducer'
-import systemReducer from './system/system.reducer'
-import dashboardReducer from './dashboard/dashboard.reducer'
 import liveReducer from './live/live.reducer'
-import uploadReducer from './dataset/upload.reducer'
 import queueReducer from './queue/queue.reducer'
+import systemReducer from './system/system.reducer'
+import uploadReducer from './dataset/upload.reducer'
+import browserReducer from './browser/browser.reducer'
+import dashboardReducer from './dashboard/dashboard.reducer'
 import audioPlayerReducer from './common/audioPlayer/audioPlayer.reducer'
 import { moduleReducer } from './modules/module.reducer'
 
 const appReducer = combineReducers({
+  router: routerReducer,
   auth: authReducer,
-  system: systemReducer,
-  dashboard: dashboardReducer,
   live: liveReducer,
-  upload: uploadReducer,
   queue: queueReducer,
-  router: routerReducer,
-  module: moduleReducer,
+  system: systemReducer,
+  upload: uploadReducer,
+  browser: browserReducer,
+  dashboard: dashboardReducer,
   audioPlayer: audioPlayerReducer,
+  module: moduleReducer,
 })
 
 export const history = createHistory()
diff --git a/public/bundle.js b/public/bundle.js
index ec8079d..b6d9f12 100644
--- a/public/bundle.js
+++ b/public/bundle.js
@@ -1,16 +1,75643 @@
-!function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=304)}([function(t,e,n){t.exports=n(294)()},function(t,e,n){"use strict";n.r(e),n.d(e,"h",function(){return s}),n.d(e,"createElement",function(){return s}),n.d(e,"cloneElement",function(){return l}),n.d(e,"Component",function(){return F}),n.d(e,"render",function(){return N}),n.d(e,"rerender",function(){return f}),n.d(e,"options",function(){return i});var i={},r=[],o=[];function s(t,e){var n,s,a,u,l=o;for(u=arguments.length;u-- >2;)r.push(arguments[u]);for(e&&null!=e.children&&(r.length||r.push(e.children),delete e.children);r.length;)if((s=r.pop())&&void 0!==s.pop)for(u=s.length;u--;)r.push(s[u]);else"boolean"==typeof s&&(s=null),(a="function"!=typeof t)&&(null==s?s="":"number"==typeof s?s=String(s):"string"!=typeof s&&(a=!1)),a&&n?l[l.length-1]+=s:l===o?l=[s]:l.push(s),n=a;var c=new function(){};return c.nodeName=t,c.children=l,c.attributes=null==e?void 0:e,c.key=null==e?void 0:e.key,void 0!==i.vnode&&i.vnode(c),c}function a(t,e){for(var n in e)t[n]=e[n];return t}var u="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout;function l(t,e){return s(t.nodeName,a(a({},t.attributes),e),arguments.length>2?[].slice.call(arguments,2):t.children)}var c=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,h=[];function p(t){!t._dirty&&(t._dirty=!0)&&1==h.push(t)&&(i.debounceRendering||u)(f)}function f(){var t,e=h;for(h=[];t=e.pop();)t._dirty&&R(t)}function d(t,e){return t.normalizedNodeName===e||t.nodeName.toLowerCase()===e.toLowerCase()}function y(t){var e=a({},t.attributes);e.children=t.children;var n=t.nodeName.defaultProps;if(void 0!==n)for(var i in n)void 0===e[i]&&(e[i]=n[i]);return e}function m(t){var e=t.parentNode;e&&e.removeChild(t)}function _(t,e,n,i,r){if("className"===e&&(e="class"),"key"===e);else if("ref"===e)n&&n(null),i&&i(t);else if("class"!==e||r)if("style"===e){if(i&&"string"!=typeof i&&"string"!=typeof n||(t.style.cssText=i||""),i&&"object"==typeof i){if("string"!=typeof n)for(var o in n)o in i||(t.style[o]="");for(var o in i)t.style[o]="number"==typeof i[o]&&!1===c.test(o)?i[o]+"px":i[o]}}else if("dangerouslySetInnerHTML"===e)i&&(t.innerHTML=i.__html||"");else if("o"==e[0]&&"n"==e[1]){var s=e!==(e=e.replace(/Capture$/,""));e=e.toLowerCase().substring(2),i?n||t.addEventListener(e,v,s):t.removeEventListener(e,v,s),(t._listeners||(t._listeners={}))[e]=i}else if("list"!==e&&"type"!==e&&!r&&e in t)!function(t,e,n){try{t[e]=n}catch(t){}}(t,e,null==i?"":i),null!=i&&!1!==i||t.removeAttribute(e);else{var a=r&&e!==(e=e.replace(/^xlink:?/,""));null==i||!1===i?a?t.removeAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase()):t.removeAttribute(e):"function"!=typeof i&&(a?t.setAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase(),i):t.setAttribute(e,i))}else t.className=i||""}function v(t){return this._listeners[t.type](i.event&&i.event(t)||t)}var g=[],b=0,w=!1,k=!1;function S(){for(var t;t=g.pop();)i.afterMount&&i.afterMount(t),t.componentDidMount&&t.componentDidMount()}function T(t,e,n,i,r,o){b++||(w=null!=r&&void 0!==r.ownerSVGElement,k=null!=t&&!("__preactattr_"in t));var s=x(t,e,n,i,o);return r&&s.parentNode!==r&&r.appendChild(s),--b||(k=!1,o||S()),s}function x(t,e,n,i,r){var o=t,s=w;if(null!=e&&"boolean"!=typeof e||(e=""),"string"==typeof e||"number"==typeof e)return t&&void 0!==t.splitText&&t.parentNode&&(!t._component||r)?t.nodeValue!=e&&(t.nodeValue=e):(o=document.createTextNode(e),t&&(t.parentNode&&t.parentNode.replaceChild(o,t),O(t,!0))),o.__preactattr_=!0,o;var a,u,l=e.nodeName;if("function"==typeof l)return function(t,e,n,i){var r=t&&t._component,o=r,s=t,a=r&&t._componentConstructor===e.nodeName,u=a,l=y(e);for(;r&&!u&&(r=r._parentComponent);)u=r.constructor===e.nodeName;r&&u&&(!i||r._component)?(M(r,l,3,n,i),t=r.base):(o&&!a&&(j(o),t=s=null),r=E(e.nodeName,l,n),t&&!r.nextBase&&(r.nextBase=t,s=null),M(r,l,1,n,i),t=r.base,s&&t!==s&&(s._component=null,O(s,!1)));return t}(t,e,n,i);if(w="svg"===l||"foreignObject"!==l&&w,l=String(l),(!t||!d(t,l))&&(a=l,(u=w?document.createElementNS("http://www.w3.org/2000/svg",a):document.createElement(a)).normalizedNodeName=a,o=u,t)){for(;t.firstChild;)o.appendChild(t.firstChild);t.parentNode&&t.parentNode.replaceChild(o,t),O(t,!0)}var c=o.firstChild,h=o.__preactattr_,p=e.children;if(null==h){h=o.__preactattr_={};for(var f=o.attributes,v=f.length;v--;)h[f[v].name]=f[v].value}return!k&&p&&1===p.length&&"string"==typeof p[0]&&null!=c&&void 0!==c.splitText&&null==c.nextSibling?c.nodeValue!=p[0]&&(c.nodeValue=p[0]):(p&&p.length||null!=c)&&function(t,e,n,i,r){var o,s,a,u,l,c=t.childNodes,h=[],p={},f=0,y=0,_=c.length,v=0,g=e?e.length:0;if(0!==_)for(var b=0;b<_;b++){var w=c[b],k=w.__preactattr_,S=g&&k?w._component?w._component.__key:k.key:null;null!=S?(f++,p[S]=w):(k||(void 0!==w.splitText?!r||w.nodeValue.trim():r))&&(h[v++]=w)}if(0!==g)for(var b=0;b<g;b++){u=e[b],l=null;var S=u.key;if(null!=S)f&&void 0!==p[S]&&(l=p[S],p[S]=void 0,f--);else if(!l&&y<v)for(o=y;o<v;o++)if(void 0!==h[o]&&(T=s=h[o],A=r,"string"==typeof(P=u)||"number"==typeof P?void 0!==T.splitText:"string"==typeof P.nodeName?!T._componentConstructor&&d(T,P.nodeName):A||T._componentConstructor===P.nodeName)){l=s,h[o]=void 0,o===v-1&&v--,o===y&&y++;break}l=x(l,u,n,i),a=c[b],l&&l!==t&&l!==a&&(null==a?t.appendChild(l):l===a.nextSibling?m(a):t.insertBefore(l,a))}var T,P,A;if(f)for(var b in p)void 0!==p[b]&&O(p[b],!1);for(;y<=v;)void 0!==(l=h[v--])&&O(l,!1)}(o,p,n,i,k||null!=h.dangerouslySetInnerHTML),function(t,e,n){var i;for(i in n)e&&null!=e[i]||null==n[i]||_(t,i,n[i],n[i]=void 0,w);for(i in e)"children"===i||"innerHTML"===i||i in n&&e[i]===("value"===i||"checked"===i?t[i]:n[i])||_(t,i,n[i],n[i]=e[i],w)}(o,e.attributes,h),w=s,o}function O(t,e){var n=t._component;n?j(n):(null!=t.__preactattr_&&t.__preactattr_.ref&&t.__preactattr_.ref(null),!1!==e&&null!=t.__preactattr_||m(t),P(t))}function P(t){for(t=t.lastChild;t;){var e=t.previousSibling;O(t,!0),t=e}}var A={};function E(t,e,n){var i,r=A[t.name];if(t.prototype&&t.prototype.render?(i=new t(e,n),F.call(i,e,n)):((i=new F(e,n)).constructor=t,i.render=C),r)for(var o=r.length;o--;)if(r[o].constructor===t){i.nextBase=r[o].nextBase,r.splice(o,1);break}return i}function C(t,e,n){return this.constructor(t,n)}function M(t,e,n,r,o){t._disable||(t._disable=!0,(t.__ref=e.ref)&&delete e.ref,(t.__key=e.key)&&delete e.key,!t.base||o?t.componentWillMount&&t.componentWillMount():t.componentWillReceiveProps&&t.componentWillReceiveProps(e,r),r&&r!==t.context&&(t.prevContext||(t.prevContext=t.context),t.context=r),t.prevProps||(t.prevProps=t.props),t.props=e,t._disable=!1,0!==n&&(1!==n&&!1===i.syncComponentUpdates&&t.base?p(t):R(t,1,o)),t.__ref&&t.__ref(t))}function R(t,e,n,r){if(!t._disable){var o,s,u,l=t.props,c=t.state,h=t.context,p=t.prevProps||l,f=t.prevState||c,d=t.prevContext||h,m=t.base,_=t.nextBase,v=m||_,w=t._component,k=!1;if(m&&(t.props=p,t.state=f,t.context=d,2!==e&&t.shouldComponentUpdate&&!1===t.shouldComponentUpdate(l,c,h)?k=!0:t.componentWillUpdate&&t.componentWillUpdate(l,c,h),t.props=l,t.state=c,t.context=h),t.prevProps=t.prevState=t.prevContext=t.nextBase=null,t._dirty=!1,!k){o=t.render(l,c,h),t.getChildContext&&(h=a(a({},h),t.getChildContext()));var x,P,A=o&&o.nodeName;if("function"==typeof A){var C=y(o);(s=w)&&s.constructor===A&&C.key==s.__key?M(s,C,1,h,!1):(x=s,t._component=s=E(A,C,h),s.nextBase=s.nextBase||_,s._parentComponent=t,M(s,C,0,h,!1),R(s,1,n,!0)),P=s.base}else u=v,(x=w)&&(u=t._component=null),(v||1===e)&&(u&&(u._component=null),P=T(u,o,h,n||!m,v&&v.parentNode,!0));if(v&&P!==v&&s!==w){var F=v.parentNode;F&&P!==F&&(F.replaceChild(P,v),x||(v._component=null,O(v,!1)))}if(x&&j(x),t.base=P,P&&!r){for(var N=t,L=t;L=L._parentComponent;)(N=L).base=P;P._component=N,P._componentConstructor=N.constructor}}if(!m||n?g.unshift(t):k||(t.componentDidUpdate&&t.componentDidUpdate(p,f,d),i.afterUpdate&&i.afterUpdate(t)),null!=t._renderCallbacks)for(;t._renderCallbacks.length;)t._renderCallbacks.pop().call(t);b||r||S()}}function j(t){i.beforeUnmount&&i.beforeUnmount(t);var e=t.base;t._disable=!0,t.componentWillUnmount&&t.componentWillUnmount(),t.base=null;var n=t._component;n?j(n):e&&(e.__preactattr_&&e.__preactattr_.ref&&e.__preactattr_.ref(null),t.nextBase=e,m(e),function(t){var e=t.constructor.name;(A[e]||(A[e]=[])).push(t)}(t),P(e)),t.__ref&&t.__ref(null)}function F(t,e){this._dirty=!0,this.context=e,this.props=t,this.state=this.state||{}}function N(t,e,n){return T(n,t,{},!1,e,!1)}a(F.prototype,{setState:function(t,e){var n=this.state;this.prevState||(this.prevState=a({},n)),a(n,"function"==typeof t?t(n,this.props):t),e&&(this._renderCallbacks=this._renderCallbacks||[]).push(e),p(this)},forceUpdate:function(t){t&&(this._renderCallbacks=this._renderCallbacks||[]).push(t),R(this,2)},render:function(){}});var L={h:s,createElement:s,cloneElement:l,Component:F,render:N,rerender:f,options:i};e.default=L},function(t,e,n){"use strict";n.r(e),n.d(e,"createStore",function(){return u}),n.d(e,"combineReducers",function(){return c}),n.d(e,"bindActionCreators",function(){return p}),n.d(e,"applyMiddleware",function(){return d}),n.d(e,"compose",function(){return f}),n.d(e,"__DO_NOT_USE__ActionTypes",function(){return r});var i=n(84),r={INIT:"@@redux/INIT"+Math.random().toString(36).substring(7).split("").join("."),REPLACE:"@@redux/REPLACE"+Math.random().toString(36).substring(7).split("").join(".")},o="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},s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};function a(t){if("object"!==(void 0===t?"undefined":o(t))||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function u(t,e,n){var s;if("function"==typeof e&&void 0===n&&(n=e,e=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(u)(t,e)}if("function"!=typeof t)throw new Error("Expected the reducer to be a function.");var l=t,c=e,h=[],p=h,f=!1;function d(){p===h&&(p=h.slice())}function y(){if(f)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return c}function m(t){if("function"!=typeof t)throw new Error("Expected the listener to be a function.");if(f)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");var e=!0;return d(),p.push(t),function(){if(e){if(f)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");e=!1,d();var n=p.indexOf(t);p.splice(n,1)}}}function _(t){if(!a(t))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===t.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(f)throw new Error("Reducers may not dispatch actions.");try{f=!0,c=l(c,t)}finally{f=!1}for(var e=h=p,n=0;n<e.length;n++){(0,e[n])()}return t}return _({type:r.INIT}),(s={dispatch:_,subscribe:m,getState:y,replaceReducer:function(t){if("function"!=typeof t)throw new Error("Expected the nextReducer to be a function.");l=t,_({type:r.REPLACE})}})[i.a]=function(){var t,e=m;return(t={subscribe:function(t){if("object"!==(void 0===t?"undefined":o(t))||null===t)throw new TypeError("Expected the observer to be an object.");function n(){t.next&&t.next(y())}return n(),{unsubscribe:e(n)}}})[i.a]=function(){return this},t},s}function l(t,e){var n=e&&e.type;return"Given "+(n&&'action "'+String(n)+'"'||"an action")+', reducer "'+t+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function c(t){for(var e=Object.keys(t),n={},i=0;i<e.length;i++){var o=e[i];0,"function"==typeof t[o]&&(n[o]=t[o])}var s=Object.keys(n);var a=void 0;try{!function(t){Object.keys(t).forEach(function(e){var n=t[e];if(void 0===n(void 0,{type:r.INIT}))throw new Error('Reducer "'+e+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===n(void 0,{type:"@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".")}))throw new Error('Reducer "'+e+"\" returned undefined when probed with a random type. Don't try to handle "+r.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')})}(n)}catch(t){a=t}return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];if(a)throw a;for(var i=!1,r={},o=0;o<s.length;o++){var u=s[o],c=n[u],h=t[u],p=c(h,e);if(void 0===p){var f=l(u,e);throw new Error(f)}r[u]=p,i=i||p!==h}return i?r:t}}function h(t,e){return function(){return e(t.apply(this,arguments))}}function p(t,e){if("function"==typeof t)return h(t,e);if("object"!==(void 0===t?"undefined":o(t))||null===t)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===t?"null":void 0===t?"undefined":o(t))+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var n=Object.keys(t),i={},r=0;r<n.length;r++){var s=n[r],a=t[s];"function"==typeof a&&(i[s]=h(a,e))}return i}function f(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce(function(t,e){return function(){return t(e.apply(void 0,arguments))}})}function d(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return function(){for(var n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];var o=t.apply(void 0,i),a=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},u={getState:o.getState,dispatch:function(){return a.apply(void 0,arguments)}},l=e.map(function(t){return t(u)});return a=f.apply(void 0,l)(o.dispatch),s({},o,{dispatch:a})}}}},function(t,e,n){"use strict";n.r(e);var i=n(4),r=n(16),o=n.n(r),s=o.a.shape({trySubscribe:o.a.func.isRequired,tryUnsubscribe:o.a.func.isRequired,notifyNestedSubs:o.a.func.isRequired,isSubscribed:o.a.func.isRequired}),a=o.a.shape({subscribe:o.a.func.isRequired,dispatch:o.a.func.isRequired,getState:o.a.func.isRequired});function u(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"store",n=arguments[1]||e+"Subscription",r=function(t){function r(n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n,i));return o[e]=n.store,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),r.prototype.getChildContext=function(){var t;return(t={})[e]=this[e],t[n]=null,t},r.prototype.render=function(){return i.a.only(this.props.children)},r}(i.b);return r.propTypes={store:a.isRequired,children:o.a.element.isRequired},r.childContextTypes=((t={})[e]=a.isRequired,t[n]=s,t),r}var l=u(),c=n(143),h=n.n(c),p=n(62),f=n.n(p);var d=null,y={notify:function(){}};var m=function(){function t(e,n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.store=e,this.parentSub=n,this.onStateChange=i,this.unsubscribe=null,this.listeners=y}return t.prototype.addNestedSub=function(t){return this.trySubscribe(),this.listeners.subscribe(t)},t.prototype.notifyNestedSubs=function(){this.listeners.notify()},t.prototype.isSubscribed=function(){return Boolean(this.unsubscribe)},t.prototype.trySubscribe=function(){var t,e;this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.onStateChange):this.store.subscribe(this.onStateChange),this.listeners=(t=[],e=[],{clear:function(){e=d,t=d},notify:function(){for(var n=t=e,i=0;i<n.length;i++)n[i]()},get:function(){return e},subscribe:function(n){var i=!0;return e===t&&(e=t.slice()),e.push(n),function(){i&&t!==d&&(i=!1,e===t&&(e=t.slice()),e.splice(e.indexOf(n),1))}}}))},t.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=y)},t}(),_=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};var v=0,g={};function b(){}function w(t){var e,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.getDisplayName,u=void 0===o?function(t){return"ConnectAdvanced("+t+")"}:o,l=r.methodName,c=void 0===l?"connectAdvanced":l,p=r.renderCountProp,d=void 0===p?void 0:p,y=r.shouldHandleStateChanges,w=void 0===y||y,k=r.storeKey,S=void 0===k?"store":k,T=r.withRef,x=void 0!==T&&T,O=function(t,e){var n={};for(var i in t)e.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(r,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),P=S+"Subscription",A=v++,E=((e={})[S]=a,e[P]=s,e),C=((n={})[P]=s,n);return function(e){f()("function"==typeof e,"You must pass a component to the function returned by "+c+". Instead received "+JSON.stringify(e));var n=e.displayName||e.name||"Component",r=u(n),o=_({},O,{getDisplayName:u,methodName:c,renderCountProp:d,shouldHandleStateChanges:w,storeKey:S,withRef:x,displayName:r,wrappedComponentName:n,WrappedComponent:e}),s=function(n){function s(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,n.call(this,t,e));return i.version=A,i.state={},i.renderCount=0,i.store=t[S]||e[S],i.propsMode=Boolean(t[S]),i.setWrappedInstance=i.setWrappedInstance.bind(i),f()(i.store,'Could not find "'+S+'" in either the context or props of "'+r+'". Either wrap the root component in a <Provider>, or explicitly pass "'+S+'" as a prop to "'+r+'".'),i.initSelector(),i.initSubscription(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(s,n),s.prototype.getChildContext=function(){var t,e=this.propsMode?null:this.subscription;return(t={})[P]=e||this.context[P],t},s.prototype.componentDidMount=function(){w&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},s.prototype.componentWillReceiveProps=function(t){this.selector.run(t)},s.prototype.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},s.prototype.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=b,this.store=null,this.selector.run=b,this.selector.shouldComponentUpdate=!1},s.prototype.getWrappedInstance=function(){return f()(x,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+c+"() call."),this.wrappedInstance},s.prototype.setWrappedInstance=function(t){this.wrappedInstance=t},s.prototype.initSelector=function(){var e=t(this.store.dispatch,o);this.selector=function(t,e){var n={run:function(i){try{var r=t(e.getState(),i);(r!==n.props||n.error)&&(n.shouldComponentUpdate=!0,n.props=r,n.error=null)}catch(t){n.shouldComponentUpdate=!0,n.error=t}}};return n}(e,this.store),this.selector.run(this.props)},s.prototype.initSubscription=function(){if(w){var t=(this.propsMode?this.props:this.context)[P];this.subscription=new m(this.store,t,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},s.prototype.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(g)):this.notifyNestedSubs()},s.prototype.notifyNestedSubsOnComponentDidUpdate=function(){this.componentDidUpdate=void 0,this.notifyNestedSubs()},s.prototype.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},s.prototype.addExtraProps=function(t){if(!(x||d||this.propsMode&&this.subscription))return t;var e=_({},t);return x&&(e.ref=this.setWrappedInstance),d&&(e[d]=this.renderCount++),this.propsMode&&this.subscription&&(e[P]=this.subscription),e},s.prototype.render=function(){var t=this.selector;if(t.shouldComponentUpdate=!1,t.error)throw t.error;return Object(i.c)(e,this.addExtraProps(t.props))},s}(i.b);return s.WrappedComponent=e,s.displayName=r,s.childContextTypes=C,s.contextTypes=E,s.propTypes=E,h()(s,e)}}var k=Object.prototype.hasOwnProperty;function S(t,e){return t===e?0!==t||0!==e||1/t==1/e:t!=t&&e!=e}function T(t,e){if(S(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var r=0;r<n.length;r++)if(!k.call(e,n[r])||!S(t[n[r]],e[n[r]]))return!1;return!0}var x=n(2),O=n(305),P="object"==typeof self&&self&&self.Object===Object&&self,A=(O.a||P||Function("return this")()).Symbol,E=Object.prototype;E.hasOwnProperty,E.toString,A&&A.toStringTag;Object.prototype.toString;A&&A.toStringTag;Object.getPrototypeOf,Object;var C=Function.prototype,M=Object.prototype,R=C.toString;M.hasOwnProperty,R.call(Object);function j(t){return function(e,n){var i=t(e,n);function r(){return i}return r.dependsOnOwnProps=!1,r}}function F(t){return null!==t.dependsOnOwnProps&&void 0!==t.dependsOnOwnProps?Boolean(t.dependsOnOwnProps):1!==t.length}function N(t,e){return function(e,n){n.displayName;var i=function(t,e){return i.dependsOnOwnProps?i.mapToProps(t,e):i.mapToProps(t)};return i.dependsOnOwnProps=!0,i.mapToProps=function(e,n){i.mapToProps=t,i.dependsOnOwnProps=F(t);var r=i(e,n);return"function"==typeof r&&(i.mapToProps=r,i.dependsOnOwnProps=F(r),r=i(e,n)),r},i}}var L=[function(t){return"function"==typeof t?N(t):void 0},function(t){return t?void 0:j(function(t){return{dispatch:t}})},function(t){return t&&"object"==typeof t?j(function(e){return Object(x.bindActionCreators)(t,e)}):void 0}];var D=[function(t){return"function"==typeof t?N(t):void 0},function(t){return t?void 0:j(function(){return{}})}],q=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};function I(t,e,n){return q({},n,t,e)}var B=[function(t){return"function"==typeof t?function(t){return function(e,n){n.displayName;var i=n.pure,r=n.areMergedPropsEqual,o=!1,s=void 0;return function(e,n,a){var u=t(e,n,a);return o?i&&r(u,s)||(s=u):(o=!0,s=u),s}}}(t):void 0},function(t){return t?void 0:function(){return I}}];function U(t,e,n,i){return function(r,o){return n(t(r,o),e(i,o),o)}}function z(t,e,n,i,r){var o=r.areStatesEqual,s=r.areOwnPropsEqual,a=r.areStatePropsEqual,u=!1,l=void 0,c=void 0,h=void 0,p=void 0,f=void 0;function d(r,u){var d,y,m=!s(u,c),_=!o(r,l);return l=r,c=u,m&&_?(h=t(l,c),e.dependsOnOwnProps&&(p=e(i,c)),f=n(h,p,c)):m?(t.dependsOnOwnProps&&(h=t(l,c)),e.dependsOnOwnProps&&(p=e(i,c)),f=n(h,p,c)):_?(d=t(l,c),y=!a(d,h),h=d,y&&(f=n(h,p,c)),f):f}return function(r,o){return u?d(r,o):(h=t(l=r,c=o),p=e(i,c),f=n(h,p,c),u=!0,f)}}function Y(t,e){var n=e.initMapStateToProps,i=e.initMapDispatchToProps,r=e.initMergeProps,o=function(t,e){var n={};for(var i in t)e.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(e,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),s=n(t,o),a=i(t,o),u=r(t,o);return(o.pure?z:U)(s,a,u,t,o)}var W=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};function G(t,e,n){for(var i=e.length-1;i>=0;i--){var r=e[i](t);if(r)return r}return function(e,i){throw new Error("Invalid value of type "+typeof t+" for "+n+" argument when connecting component "+i.wrappedComponentName+".")}}function V(t,e){return t===e}var H=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.connectHOC,n=void 0===e?w:e,i=t.mapStateToPropsFactories,r=void 0===i?D:i,o=t.mapDispatchToPropsFactories,s=void 0===o?L:o,a=t.mergePropsFactories,u=void 0===a?B:a,l=t.selectorFactory,c=void 0===l?Y:l;return function(t,e,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=o.pure,l=void 0===a||a,h=o.areStatesEqual,p=void 0===h?V:h,f=o.areOwnPropsEqual,d=void 0===f?T:f,y=o.areStatePropsEqual,m=void 0===y?T:y,_=o.areMergedPropsEqual,v=void 0===_?T:_,g=function(t,e){var n={};for(var i in t)e.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(o,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),b=G(t,r,"mapStateToProps"),w=G(e,s,"mapDispatchToProps"),k=G(i,u,"mergeProps");return n(c,W({methodName:"connect",getDisplayName:function(t){return"Connect("+t+")"},shouldHandleStateChanges:Boolean(t),initMapStateToProps:b,initMapDispatchToProps:w,initMergeProps:k,pure:l,areStatesEqual:p,areOwnPropsEqual:d,areStatePropsEqual:m,areMergedPropsEqual:v},g))}}();n.d(e,"Provider",function(){return l}),n.d(e,"createProvider",function(){return u}),n.d(e,"connectAdvanced",function(){return w}),n.d(e,"connect",function(){return H})},function(t,e,n){"use strict";(function(t){n.d(e,"a",function(){return w}),n.d(e,"c",function(){return O}),n.d(e,"b",function(){return B});var i=n(61),r=n.n(i),o=n(1),s="a abbr address area article aside audio b base bdi bdo big blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins kbd keygen label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script section select small source span strong style sub summary sup table tbody td textarea tfoot th thead time title tr track u ul var video wbr circle clipPath defs ellipse g image line linearGradient mask path pattern polygon polyline radialGradient rect stop svg text tspan".split(" "),a="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,u="undefined"!=typeof Symbol&&Symbol.for?Symbol.for("__preactCompatWrapper"):"__preactCompatWrapper",l={constructor:1,render:1,shouldComponentUpdate:1,componentWillReceiveProps:1,componentWillUpdate:1,componentDidUpdate:1,componentWillMount:1,componentDidMount:1,componentWillUnmount:1,componentDidUnmount:1},c=/^(?:accent|alignment|arabic|baseline|cap|clip|color|fill|flood|font|glyph|horiz|marker|overline|paint|stop|strikethrough|stroke|text|underline|unicode|units|v|vector|vert|word|writing|x)[A-Z]/,h={},p=void 0===t||!t.env||!1;function f(){return null}var d=Object(o.h)("a",null).constructor;d.prototype.$$typeof=a,d.prototype.preactCompatUpgraded=!1,d.prototype.preactCompatNormalized=!1,Object.defineProperty(d.prototype,"type",{get:function(){return this.nodeName},set:function(t){this.nodeName=t},configurable:!0}),Object.defineProperty(d.prototype,"props",{get:function(){return this.attributes},set:function(t){this.attributes=t},configurable:!0});var y=o.options.event;o.options.event=function(t){return y&&(t=y(t)),t.persist=Object,t.nativeEvent=t,t};var m=o.options.vnode;function _(t,e,n){var i=e&&e._preactCompatRendered&&e._preactCompatRendered.base;i&&i.parentNode!==e&&(i=null),!i&&e&&(i=e.firstElementChild);for(var r=e.childNodes.length;r--;)e.childNodes[r]!==i&&e.removeChild(e.childNodes[r]);var s=Object(o.render)(t,e,i);return e&&(e._preactCompatRendered=s&&(s._component||{base:s})),"function"==typeof n&&n(),s&&s._component||s}o.options.vnode=function(t){if(!t.preactCompatUpgraded){t.preactCompatUpgraded=!0;var e=t.nodeName,n=t.attributes=C({},t.attributes);"function"==typeof e?(!0===e[u]||e.prototype&&"isReactComponent"in e.prototype)&&(t.children&&""===String(t.children)&&(t.children=void 0),t.children&&(n.children=t.children),t.preactCompatNormalized||P(t),function(t){var e=t.nodeName,n=t.attributes;t.attributes={},e.defaultProps&&C(t.attributes,e.defaultProps);n&&C(t.attributes,n)}(t)):(t.children&&""===String(t.children)&&(t.children=void 0),t.children&&(n.children=t.children),n.defaultValue&&(n.value||0===n.value||(n.value=n.defaultValue),delete n.defaultValue),function(t,e){var n,i,r;if(e){for(r in e)if(n=c.test(r))break;if(n)for(r in i=t.attributes={},e)e.hasOwnProperty(r)&&(i[c.test(r)?r.replace(/([A-Z0-9])/,"-$1").toLowerCase():r]=e[r])}}(t,n))}m&&m(t)};var v=function(){};v.prototype.getChildContext=function(){return this.props.context},v.prototype.render=function(t){return t.children[0]};var g,b=[],w={map:function(t,e,n){return null==t?null:(t=w.toArray(t),n&&n!==t&&(e=e.bind(n)),t.map(e))},forEach:function(t,e,n){if(null==t)return null;t=w.toArray(t),n&&n!==t&&(e=e.bind(n)),t.forEach(e)},count:function(t){return t&&t.length||0},only:function(t){if(1!==(t=w.toArray(t)).length)throw new Error("Children.only() expects only one child.");return t[0]},toArray:function(t){return null==t?[]:b.concat(t)}};function k(t){return O.bind(null,t)}for(var S={},T=s.length;T--;)S[s[T]]=k(s[T]);function x(t){var e,n=t[u];return n?!0===n?t:n:(n=j({displayName:(e=t).displayName||e.name,render:function(){return e(this.props,this.context)}}),Object.defineProperty(n,u,{configurable:!0,value:!0}),n.displayName=t.displayName,n.propTypes=t.propTypes,n.defaultProps=t.defaultProps,Object.defineProperty(t,u,{configurable:!0,value:n}),n)}function O(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return function t(e,n){for(var i=n||0;i<e.length;i++){var r=e[i];Array.isArray(r)?t(r):r&&"object"==typeof r&&!A(r)&&(r.props&&r.type||r.attributes&&r.nodeName||r.children)&&(e[i]=O(r.type||r.nodeName,r.props||r.attributes,r.children))}}(t,2),P(o.h.apply(void 0,t))}function P(t){var e;t.preactCompatNormalized=!0,function(t){var e=t.attributes||(t.attributes={});E.enumerable="className"in e,e.className&&(e.class=e.className);Object.defineProperty(e,"className",E)}(t),"function"!=typeof(e=t.nodeName)||e.prototype&&e.prototype.render||(t.nodeName=x(t.nodeName));var n,i,r=t.attributes.ref,o=r&&typeof r;return!g||"string"!==o&&"number"!==o||(t.attributes.ref=(n=r,(i=g)._refProxies[n]||(i._refProxies[n]=function(t){i&&i.refs&&(i.refs[n]=t,null===t&&(delete i._refProxies[n],i=null))}))),function(t){var e=t.nodeName,n=t.attributes;if(!n||"string"!=typeof e)return;var i={};for(var r in n)i[r.toLowerCase()]=r;i.ondoubleclick&&(n.ondblclick=n[i.ondoubleclick],delete n[i.ondoubleclick]);if(i.onchange&&("textarea"===e||"input"===e.toLowerCase()&&!/^fil|che|rad/i.test(n.type))){var o=i.oninput||"oninput";n[o]||(n[o]=N([n[o],n[i.onchange]]),delete n[i.onchange])}}(t),t}function A(t){return t&&(t instanceof d||t.$$typeof===a)}var E={configurable:!0,get:function(){return this.class},set:function(t){this.class=t}};function C(t,e){for(var n=arguments,i=1,r=void 0;i<arguments.length;i++)if(r=n[i])for(var o in r)r.hasOwnProperty(o)&&(t[o]=r[o]);return t}function M(t,e){for(var n in t)if(!(n in e))return!0;for(var i in e)if(t[i]!==e[i])return!0;return!1}function R(){}function j(t){function e(t,e){!function(t){for(var e in t){var n=t[e];"function"!=typeof n||n.__bound||l.hasOwnProperty(e)||((t[e]=n.bind(t)).__bound=!0)}}(this),B.call(this,t,e,h),L.call(this,t,e)}return(t=C({constructor:e},t)).mixins&&function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=N(e[n].concat(t[n]||b),"getDefaultProps"===n||"getInitialState"===n||"getChildContext"===n))}(t,function(t){for(var e={},n=0;n<t.length;n++){var i=t[n];for(var r in i)i.hasOwnProperty(r)&&"function"==typeof i[r]&&(e[r]||(e[r]=[])).push(i[r])}return e}(t.mixins)),t.statics&&C(e,t.statics),t.propTypes&&(e.propTypes=t.propTypes),t.defaultProps&&(e.defaultProps=t.defaultProps),t.getDefaultProps&&(e.defaultProps=t.getDefaultProps.call(e)),R.prototype=B.prototype,e.prototype=C(new R,t),e.displayName=t.displayName||"Component",e}function F(t,e,n){if("string"==typeof e&&(e=t.constructor.prototype[e]),"function"==typeof e)return e.apply(t,n)}function N(t,e){return function(){for(var n,i=arguments,r=0;r<t.length;r++){var o=F(this,t[r],i);if(e&&null!=o)for(var s in n||(n={}),o)o.hasOwnProperty(s)&&(n[s]=o[s]);else void 0!==o&&(n=o)}return n}}function L(t,e){D.call(this,t,e),this.componentWillReceiveProps=N([D,this.componentWillReceiveProps||"componentWillReceiveProps"]),this.render=N([D,q,this.render||"render",I])}function D(t,e){if(t){var n=t.children;if(n&&Array.isArray(n)&&1===n.length&&("string"==typeof n[0]||"function"==typeof n[0]||n[0]instanceof d)&&(t.children=n[0],t.children&&"object"==typeof t.children&&(t.children.length=1,t.children[0]=t.children)),p){var i="function"==typeof this?this:this.constructor,o=this.propTypes||i.propTypes,s=this.displayName||i.name;o&&r.a.checkPropTypes(o,t,"prop",s)}}}function q(t){g=this}function I(){g===this&&(g=null)}function B(t,e,n){o.Component.call(this,t,e),this.state=this.getInitialState?this.getInitialState():{},this.refs={},this._refProxies={},n!==h&&L.call(this,t,e)}function U(t,e){B.call(this,t,e)}C(B.prototype=new o.Component,{constructor:B,isReactComponent:{},replaceState:function(t,e){for(var n in this.setState(t,e),this.state)n in t||delete this.state[n]},getDOMNode:function(){return this.base},isMounted:function(){return!!this.base}}),R.prototype=B.prototype,U.prototype=new R,U.prototype.isPureReactComponent=!0,U.prototype.shouldComponentUpdate=function(t,e){return M(this.props,t)||M(this.state,e)};var z={version:"15.1.0",DOM:S,PropTypes:r.a,Children:w,render:_,createClass:j,createFactory:k,createElement:O,cloneElement:function(t,e){for(var n=[],i=arguments.length-2;i-- >0;)n[i]=arguments[i+2];if(!A(t))return t;var r=t.attributes||t.props,s=[Object(o.h)(t.nodeName||t.type,C({},r),t.children||r&&r.children),e];return n&&n.length?s.push(n):e&&e.children&&s.push(e.children),P(o.cloneElement.apply(void 0,s))},isValidElement:A,findDOMNode:function(t){return t&&t.base||t},unmountComponentAtNode:function(t){var e=t._preactCompatRendered&&t._preactCompatRendered.base;return!(!e||e.parentNode!==t||(Object(o.render)(Object(o.h)(f),t,e),0))},Component:B,PureComponent:U,unstable_renderSubtreeIntoContainer:function(t,e,n,i){var r=_(Object(o.h)(v,{context:t.context},e),n),s=r._component||r.base;return i&&i.call(s,r),s},__spread:C};e.d=z}).call(this,n(51))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=a(n(269)),o=a(n(268)),s=a(n(131));function a(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}n(267);var u=!(!navigator.userAgent.match(/iPhone/i)&&!navigator.userAgent.match(/iPod/i)),l=!!navigator.userAgent.match(/iPad/i),c=!!navigator.userAgent.match(/Android/i),h=u||l||c,p=!h,f=document.body.parentNode.classList;f.add(p?"desktop":"mobile"),f.remove("loading");document.body.style.backgroundImage="linear-gradient("+(s.randint(40)+40)+"deg, #fde, #ffe)";e.default=i({},s,o,{sort:r,allProgress:function(t,e){var n=0;return e(0,0,t.length),t.forEach(function(i){i.then(function(i){return n+=1,e(Math.floor(100*n/t.length),n,t.length),i})}),Promise.all(t)},fieldSet:function(t){return function(e){return e?e instanceof Set?e:new Set(e.split(" ")):t}},is_iphone:u,is_ipad:l,is_android:c,is_mobile:h,is_desktop:p})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(80);e.default={system:{load_site:"SYSTEM_LOAD_SITE",running_command:"SYSTEM_RUNNING_COMMAND",command_output:"SYSTEM_COMMAND_OUTPUT",relay_connected:"SYSTEM_RELAY_CONNECTED",relay_disconnected:"SYSTEM_RELAY_DISCONNECTED",rpc_connected:"SYSTEM_RPC_CONNECTED",rpc_disconnected:"SYSTEM_RPC_DISCONNECTED",list_directory:"SYSTEM_LIST_DIRECTORY",listing_directory:"SYSTEM_LISTING_DIRECTORY",count_directory:"SYSTEM_COUNT_DIRECTORY",counting_directory:"SYSTEM_COUNTING_DIRECTORY",stdout:"SYSTEM_STDOUT",stderr:"SYSTEM_STDERR"},app:{change_tool:"APP_CHANGE_TOOL",load_progress:"APP_LOAD_PROGRESS"},folder:(0,i.crud_type)("folder",[]),file:(0,i.crud_type)("file",[]),task:(0,i.crud_type)("task",["starting_task","stopping_task","task_begin","task_finish","start_queue","stop_queue","starting_queue","stopping_queue","progress","epoch"]),auth:(0,i.crud_type)("auth",["set_token","set_error","set_current_user","logout_user","loading","initialized","set_return_to"]),socket:{connect:"SOCKET_CONNECT",connect_error:"SOCKET_CONNECT_ERROR",reconnect:"SOCKET_RECONNECT",reconnecting:"SOCKET_RECONNECTING",reconnect_error:"SOCKET_RECONNECT_ERROR",reconnect_failed:"SOCKET_RECONNECT_FAILED",disconnect:"SOCKET_DISCONNECT",error:"SOCKET_ERROR",status:"SOCKET_STATUS",load_params:"SOCKET_LOAD_PARAMS",list_checkpoints:"SOCKET_LIST_CHECKPOINTS",list_sequences:"SOCKET_LIST_SEQUENCES",list_epochs:"SOCKET_LIST_EPOCHS"},player:{get_params:"GET_PARAMS",set_param:"SET_PARAM",loading_checkpoints:"LOADING_CHECKPOINTS",loading_checkpoint:"LOADING_CHECKPOINT",list_checkpoints:"LIST_CHECKPOINTS",loading_sequences:"LOADING_SEQUENCES",loading_sequence:"LOADING_SEQUENCE",load_sequence:"LOAD_SEQUENCE",loading_epochs:"LOADING_EPOCHS",load_epoch:"LOAD_EPOCH",set_fps:"SET_FPS",seeking:"SEEKING",pausing:"PAUSING",playing:"PLAYING",current_frame:"CURRENT_FRAME",start_recording:"START_RECORDING",add_record_frame:"ADD_RECORD_FRAME",save_frame:"SAVE_FRAME",saving_video:"SAVING_VIDEO",save_video:"SAVE_VIDEO",set_fullscreen:"SET_FULLSCREEN"},audioPlayer:{play:"AUDIO_PLAY",pause:"AUDIO_PAUSE",resume:"AUDIO_RESUME",enqueue:"AUDIO_ENQUEUE"},dataset:{load:"DATASET_LOAD",set_folder:"DATASET_SET_FOLDER",upload_files:"DATASET_UPLOAD_FILES",file_progress:"DATASET_FILE_PROGRESS",file_uploaded:"DATASET_FILE_UPLOADED",fetch_url:"DATASET_FETCH_URL",fetch_progress:"DATASET_FETCH_PROGRESS",list_epochs:"DATASET_LIST_EPOCHS"},samplernn:{init:"SAMPLERNN_INIT",set_folder:"SAMPLERNN_SET_FOLDER",load_loss:"SAMPLERNN_LOAD_LOSS",load_graph:"SAMPLERNN_LOAD_GRAPH"},pix2pix:(0,i.with_type)("pix2pix",["init","set_folder"]),pix2pixhd:(0,i.with_type)("pix2pixhd",["init","set_folder","load_results","load_dataset_count"]),pix2wav:(0,i.with_type)("pix2wav",["init","set_folder"]),wav2pix:(0,i.with_type)("wav2pix",["load","progress","finish","zip","uploading"]),dashboard:(0,i.with_type)("dashboard",["load"]),morph:(0,i.with_type)("morph",["load"])}},function(t,e,n){"use strict";t.exports=function(){}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),r=n(118),o=p(n(20)),s=p(n(44)),a=p(n(78)),u=p(n(130)),l=p(n(59)),c=p(n(46)),h=n(19);function p(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}e.default=Object.keys(r.actions).map(function(t){return[t,r.actions[t]]}).concat([["live",o],["queue",s],["system",a],["dataset",l],["audioPlayer",c]]).map(function(t){return[t[0],(0,i.bindActionCreators)(t[1],h.store.dispatch)]}).concat([["socket",u]]).reduce(function(t,e){return(t[e[0]]=e[1])&&t},{})},function(t,e,n){"use strict";var i=n(23),r=n(108),o=n(54),s=n(201),a=n(35);function u(t){return t}function l(t,e){for(var n=0;n<t.length;++n)e[n]=255&t.charCodeAt(n);return e}e.newBlob=function(t,n){e.checkSupport("blob");try{return new Blob([t],{type:n})}catch(e){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return i.append(t),i.getBlob(n)}catch(t){throw new Error("Bug : can't construct the Blob.")}}};var c={stringifyByChunk:function(t,e,n){var i=[],r=0,o=t.length;if(o<=n)return String.fromCharCode.apply(null,t);for(;r<o;)"array"===e||"nodebuffer"===e?i.push(String.fromCharCode.apply(null,t.slice(r,Math.min(r+n,o)))):i.push(String.fromCharCode.apply(null,t.subarray(r,Math.min(r+n,o)))),r+=n;return i.join("")},stringifyByChar:function(t){for(var e="",n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return e},applyCanBeUsed:{uint8array:function(){try{return i.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(t){return!1}}(),nodebuffer:function(){try{return i.nodebuffer&&1===String.fromCharCode.apply(null,o.allocBuffer(1)).length}catch(t){return!1}}()}};function h(t){var n=65536,i=e.getTypeOf(t),r=!0;if("uint8array"===i?r=c.applyCanBeUsed.uint8array:"nodebuffer"===i&&(r=c.applyCanBeUsed.nodebuffer),r)for(;n>1;)try{return c.stringifyByChunk(t,i,n)}catch(t){n=Math.floor(n/2)}return c.stringifyByChar(t)}function p(t,e){for(var n=0;n<t.length;n++)e[n]=t[n];return e}e.applyFromCharCode=h;var f={};f.string={string:u,array:function(t){return l(t,new Array(t.length))},arraybuffer:function(t){return f.string.uint8array(t).buffer},uint8array:function(t){return l(t,new Uint8Array(t.length))},nodebuffer:function(t){return l(t,o.allocBuffer(t.length))}},f.array={string:h,array:u,arraybuffer:function(t){return new Uint8Array(t).buffer},uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return o.newBufferFrom(t)}},f.arraybuffer={string:function(t){return h(new Uint8Array(t))},array:function(t){return p(new Uint8Array(t),new Array(t.byteLength))},arraybuffer:u,uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return o.newBufferFrom(new Uint8Array(t))}},f.uint8array={string:h,array:function(t){return p(t,new Array(t.length))},arraybuffer:function(t){return t.buffer},uint8array:u,nodebuffer:function(t){return o.newBufferFrom(t)}},f.nodebuffer={string:h,array:function(t){return p(t,new Array(t.length))},arraybuffer:function(t){return f.nodebuffer.uint8array(t).buffer},uint8array:function(t){return p(t,new Uint8Array(t.length))},nodebuffer:u},e.transformTo=function(t,n){if(n||(n=""),!t)return n;e.checkSupport(t);var i=e.getTypeOf(n);return f[i][t](n)},e.getTypeOf=function(t){return"string"==typeof t?"string":"[object Array]"===Object.prototype.toString.call(t)?"array":i.nodebuffer&&o.isBuffer(t)?"nodebuffer":i.uint8array&&t instanceof Uint8Array?"uint8array":i.arraybuffer&&t instanceof ArrayBuffer?"arraybuffer":void 0},e.checkSupport=function(t){if(!i[t.toLowerCase()])throw new Error(t+" is not supported by this platform")},e.MAX_VALUE_16BITS=65535,e.MAX_VALUE_32BITS=-1,e.pretty=function(t){var e,n,i="";for(n=0;n<(t||"").length;n++)i+="\\x"+((e=t.charCodeAt(n))<16?"0":"")+e.toString(16).toUpperCase();return i},e.delay=function(t,e,n){s(function(){t.apply(n||null,e||[])})},e.inherits=function(t,e){var n=function(){};n.prototype=e.prototype,t.prototype=new n},e.extend=function(){var t,e,n={};for(t=0;t<arguments.length;t++)for(e in arguments[t])arguments[t].hasOwnProperty(e)&&void 0===n[e]&&(n[e]=arguments[t][e]);return n},e.prepareContent=function(t,n,o,s,u){return a.Promise.resolve(n).then(function(t){return i.blob&&(t instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(t)))&&"undefined"!=typeof FileReader?new a.Promise(function(e,n){var i=new FileReader;i.onload=function(t){e(t.target.result)},i.onerror=function(t){n(t.target.error)},i.readAsArrayBuffer(t)}):t}).then(function(n){var c,h=e.getTypeOf(n);return h?("arraybuffer"===h?n=e.transformTo("uint8array",n):"string"===h&&(u?n=r.decode(n):o&&!0!==s&&(n=l(c=n,i.uint8array?new Uint8Array(c.length):new Array(c.length)))),n):a.Promise.reject(new Error("Can't read the data of '"+t+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},function(t,e,n){"use strict";n.r(e);var i=n(7),r=n.n(i),o=n(4),s=n(0),a=n.n(s),u=n(141),l=n.n(u),c=n(12),h=n.n(c),p=n(11),f=n.n(p),d=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};function y(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var m=function(t){function e(){var n,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];return n=i=y(this,t.call.apply(t,[this].concat(o))),i.state={match:i.computeMatch(i.props.history.location.pathname)},y(i,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getChildContext=function(){return{router:d({},this.context.router,{history:this.props.history,route:{location:this.props.history.location,match:this.state.match}})}},e.prototype.computeMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}},e.prototype.componentWillMount=function(){var t=this,e=this.props,n=e.children,i=e.history;f()(null==n||1===o.d.Children.count(n),"A <Router> may have only one child element"),this.unlisten=i.listen(function(){t.setState({match:t.computeMatch(i.location.pathname)})})},e.prototype.componentWillReceiveProps=function(t){h()(this.props.history===t.history,"You cannot change <Router history>")},e.prototype.componentWillUnmount=function(){this.unlisten()},e.prototype.render=function(){var t=this.props.children;return t?o.d.Children.only(t):null},e}(o.d.Component);m.propTypes={history:a.a.object.isRequired,children:a.a.node},m.contextTypes={router:a.a.object},m.childContextTypes={router:a.a.object.isRequired};var _=m,v=_;function g(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var b=function(t){function e(){var n,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];return n=i=g(this,t.call.apply(t,[this].concat(o))),i.history=l()(i.props),g(i,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentWillMount=function(){r()(!this.props.history,"<BrowserRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { BrowserRouter as Router }`.")},e.prototype.render=function(){return o.d.createElement(v,{history:this.history,children:this.props.children})},e}(o.d.Component);b.propTypes={basename:a.a.string,forceRefresh:a.a.bool,getUserConfirmation:a.a.func,keyLength:a.a.number,children:a.a.node};var w=b,k=n(140),S=n.n(k);function T(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var x=function(t){function e(){var n,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];return n=i=T(this,t.call.apply(t,[this].concat(o))),i.history=S()(i.props),T(i,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentWillMount=function(){r()(!this.props.history,"<HashRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { HashRouter as Router }`.")},e.prototype.render=function(){return o.d.createElement(v,{history:this.history,children:this.props.children})},e}(o.d.Component);x.propTypes={basename:a.a.string,getUserConfirmation:a.a.func,hashType:a.a.oneOf(["hashbang","noslash","slash"]),children:a.a.node};var O=x,P=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};function A(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var E=function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)},C=function(t){function e(){var n,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];return n=i=A(this,t.call.apply(t,[this].concat(o))),i.handleClick=function(t){if(i.props.onClick&&i.props.onClick(t),!t.defaultPrevented&&0===t.button&&!i.props.target&&!E(t)){t.preventDefault();var e=i.context.router.history,n=i.props,r=n.replace,o=n.to;r?e.replace(o):e.push(o)}},A(i,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.render=function(){var t=this.props,e=(t.replace,t.to),n=t.innerRef,i=function(t,e){var n={};for(var i in t)e.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(t,["replace","to","innerRef"]);f()(this.context.router,"You should not use <Link> outside a <Router>");var r=this.context.router.history.createHref("string"==typeof e?{pathname:e}:e);return o.d.createElement("a",P({},i,{onClick:this.handleClick,href:r,ref:n}))},e}(o.d.Component);C.propTypes={onClick:a.a.func,target:a.a.string,replace:a.a.bool,to:a.a.oneOfType([a.a.string,a.a.object]).isRequired,innerRef:a.a.oneOfType([a.a.string,a.a.func])},C.defaultProps={replace:!1},C.contextTypes={router:a.a.shape({history:a.a.shape({push:a.a.func.isRequired,replace:a.a.func.isRequired,createHref:a.a.func.isRequired}).isRequired}).isRequired};var M=C,R=n(83),j=n(82),F=function(t){var e=t.pathname,n=t.search,i=t.hash,r=e||"/";return n&&"?"!==n&&(r+="?"===n.charAt(0)?n:"?"+n),i&&"#"!==i&&(r+="#"===i.charAt(0)?i:"#"+i),r},N=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},L=function(t,e,n,i){var r=void 0;"string"==typeof t?(r=function(t){var e=t||"/",n="",i="",r=e.indexOf("#");-1!==r&&(i=e.substr(r),e=e.substr(0,r));var o=e.indexOf("?");return-1!==o&&(n=e.substr(o),e=e.substr(0,o)),{pathname:e,search:"?"===n?"":n,hash:"#"===i?"":i}}(t)).state=e:(void 0===(r=N({},t)).pathname&&(r.pathname=""),r.search?"?"!==r.search.charAt(0)&&(r.search="?"+r.search):r.search="",r.hash?"#"!==r.hash.charAt(0)&&(r.hash="#"+r.hash):r.hash="",void 0!==e&&void 0===r.state&&(r.state=e));try{r.pathname=decodeURI(r.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+r.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(r.key=n),i?r.pathname?"/"!==r.pathname.charAt(0)&&(r.pathname=Object(R.default)(r.pathname,i.pathname)):r.pathname=i.pathname:r.pathname||(r.pathname="/"),r},D=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&Object(j.default)(t.state,e.state)},q=function(){var t=null,e=[];return{setPrompt:function(e){return r()(null==t,"A history supports only one prompt at a time"),t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,i,o){if(null!=t){var s="function"==typeof t?t(e,n):t;"string"==typeof s?"function"==typeof i?i(s,o):(r()(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),o(!0)):o(!1!==s)}else o(!0)},appendListener:function(t){var n=!0,i=function(){n&&t.apply(void 0,arguments)};return e.push(i),function(){n=!1,e=e.filter(function(t){return t!==i})}},notifyListeners:function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];e.forEach(function(t){return t.apply(void 0,n)})}}},I=("undefined"==typeof window||!window.document||window.document.createElement,"function"==typeof Symbol&&Symbol.iterator,Object.assign,Object.assign,"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}),B=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},U=function(t,e,n){return Math.min(Math.max(t,e),n)},z=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.getUserConfirmation,n=t.initialEntries,i=void 0===n?["/"]:n,o=t.initialIndex,s=void 0===o?0:o,a=t.keyLength,u=void 0===a?6:a,l=q(),c=function(t){B(m,t),m.length=m.entries.length,l.notifyListeners(m.location,m.action)},h=function(){return Math.random().toString(36).substr(2,u)},p=U(s,0,i.length-1),f=i.map(function(t){return L(t,void 0,"string"==typeof t?h():t.key||h())}),d=F,y=function(t){var n=U(m.index+t,0,m.entries.length-1),i=m.entries[n];l.confirmTransitionTo(i,"POP",e,function(t){t?c({action:"POP",location:i,index:n}):c()})},m={length:f.length,action:"POP",location:f[p],index:p,entries:f,createHref:d,push:function(t,n){r()(!("object"===(void 0===t?"undefined":I(t))&&void 0!==t.state&&void 0!==n),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var i=L(t,n,h(),m.location);l.confirmTransitionTo(i,"PUSH",e,function(t){if(t){var e=m.index+1,n=m.entries.slice(0);n.length>e?n.splice(e,n.length-e,i):n.push(i),c({action:"PUSH",location:i,index:e,entries:n})}})},replace:function(t,n){r()(!("object"===(void 0===t?"undefined":I(t))&&void 0!==t.state&&void 0!==n),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var i=L(t,n,h(),m.location);l.confirmTransitionTo(i,"REPLACE",e,function(t){t&&(m.entries[m.index]=i,c({action:"REPLACE",location:i}))})},go:y,goBack:function(){return y(-1)},goForward:function(){return y(1)},canGo:function(t){var e=m.index+t;return e>=0&&e<m.entries.length},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return l.setPrompt(t)},listen:function(t){return l.appendListener(t)}};return m};function Y(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var W=function(t){function e(){var n,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];return n=i=Y(this,t.call.apply(t,[this].concat(o))),i.history=z(i.props),Y(i,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentWillMount=function(){h()(!this.props.history,"<MemoryRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { MemoryRouter as Router }`.")},e.prototype.render=function(){return o.d.createElement(_,{history:this.history,children:this.props.children})},e}(o.d.Component);W.propTypes={initialEntries:a.a.array,initialIndex:a.a.number,getUserConfirmation:a.a.func,keyLength:a.a.number,children:a.a.node};var G=W,V=n(60),H=n.n(V),Z={},Q=0,K=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];"string"==typeof e&&(e={path:e});var i=e,r=i.path,o=i.exact,s=void 0!==o&&o,a=i.strict,u=void 0!==a&&a,l=i.sensitive,c=void 0!==l&&l;if(null==r)return n;var h=function(t,e){var n=""+e.end+e.strict+e.sensitive,i=Z[n]||(Z[n]={});if(i[t])return i[t];var r=[],o={re:H()(t,r,e),keys:r};return Q<1e4&&(i[t]=o,Q++),o}(r,{end:s,strict:u,sensitive:c}),p=h.re,f=h.keys,d=p.exec(t);if(!d)return null;var y=d[0],m=d.slice(1),_=t===y;return s&&!_?null:{path:r,url:"/"===r&&""===y?"/":y,isExact:_,params:f.reduce(function(t,e,n){return t[e.name]=m[n],t},{})}},X=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};function $(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var J=function(t){return 0===o.d.Children.count(t)},tt=function(t){function e(){var n,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];return n=i=$(this,t.call.apply(t,[this].concat(o))),i.state={match:i.computeMatch(i.props,i.context.router)},$(i,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getChildContext=function(){return{router:X({},this.context.router,{route:{location:this.props.location||this.context.router.route.location,match:this.state.match}})}},e.prototype.computeMatch=function(t,e){var n=t.computedMatch,i=t.location,r=t.path,o=t.strict,s=t.exact,a=t.sensitive;if(n)return n;f()(e,"You should not use <Route> or withRouter() outside a <Router>");var u=e.route,l=(i||u.location).pathname;return K(l,{path:r,strict:o,exact:s,sensitive:a},u.match)},e.prototype.componentWillMount=function(){h()(!(this.props.component&&this.props.render),"You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored"),h()(!(this.props.component&&this.props.children&&!J(this.props.children)),"You should not use <Route component> and <Route children> in the same route; <Route children> will be ignored"),h()(!(this.props.render&&this.props.children&&!J(this.props.children)),"You should not use <Route render> and <Route children> in the same route; <Route children> will be ignored")},e.prototype.componentWillReceiveProps=function(t,e){h()(!(t.location&&!this.props.location),'<Route> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),h()(!(!t.location&&this.props.location),'<Route> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.'),this.setState({match:this.computeMatch(t,e.router)})},e.prototype.render=function(){var t=this.state.match,e=this.props,n=e.children,i=e.component,r=e.render,s=this.context.router,a=s.history,u=s.route,l=s.staticContext,c={match:t,location:this.props.location||u.location,history:a,staticContext:l};return i?t?o.d.createElement(i,c):null:r?t?r(c):null:"function"==typeof n?n(c):n&&!J(n)?o.d.Children.only(n):null},e}(o.d.Component);tt.propTypes={computedMatch:a.a.object,path:a.a.string,exact:a.a.bool,strict:a.a.bool,sensitive:a.a.bool,component:a.a.func,render:a.a.func,children:a.a.oneOfType([a.a.func,a.a.node]),location:a.a.object},tt.contextTypes={router:a.a.shape({history:a.a.object.isRequired,route:a.a.object.isRequired,staticContext:a.a.object})},tt.childContextTypes={router:a.a.object.isRequired};var et=tt,nt=et,it=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},rt="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};var ot=function(t){var e=t.to,n=t.exact,i=t.strict,r=t.location,s=t.activeClassName,a=t.className,u=t.activeStyle,l=t.style,c=t.isActive,h=t.ariaCurrent,p=function(t,e){var n={};for(var i in t)e.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(t,["to","exact","strict","location","activeClassName","className","activeStyle","style","isActive","ariaCurrent"]);return o.d.createElement(nt,{path:"object"===(void 0===e?"undefined":rt(e))?e.pathname:e,exact:n,strict:i,location:r,children:function(t){var n=t.location,i=t.match,r=!!(c?c(i,n):i);return o.d.createElement(M,it({to:e,className:r?[a,s].filter(function(t){return t}).join(" "):a,style:r?it({},l,u):l,"aria-current":r&&h},p))}})};ot.propTypes={to:M.propTypes.to,exact:a.a.bool,strict:a.a.bool,location:a.a.object,activeClassName:a.a.string,className:a.a.string,activeStyle:a.a.object,style:a.a.object,isActive:a.a.func,ariaCurrent:a.a.oneOf(["page","step","location","true"])},ot.defaultProps={activeClassName:"active",ariaCurrent:"true"};var st=ot;var at=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.enable=function(t){this.unblock&&this.unblock(),this.unblock=this.context.router.history.block(t)},e.prototype.disable=function(){this.unblock&&(this.unblock(),this.unblock=null)},e.prototype.componentWillMount=function(){f()(this.context.router,"You should not use <Prompt> outside a <Router>"),this.props.when&&this.enable(this.props.message)},e.prototype.componentWillReceiveProps=function(t){t.when?this.props.when&&this.props.message===t.message||this.enable(t.message):this.disable()},e.prototype.componentWillUnmount=function(){this.disable()},e.prototype.render=function(){return null},e}(o.d.Component);at.propTypes={when:a.a.bool,message:a.a.oneOfType([a.a.func,a.a.string]).isRequired},at.defaultProps={when:!0},at.contextTypes={router:a.a.shape({history:a.a.shape({block:a.a.func.isRequired}).isRequired}).isRequired};var ut=at,lt={},ct=0,ht=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"/"===t?t:function(t){var e=t,n=lt[e]||(lt[e]={});if(n[t])return n[t];var i=H.a.compile(t);return ct<1e4&&(n[t]=i,ct++),i}(t)(e,{pretty:!0})},pt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};var ft=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.isStatic=function(){return this.context.router&&this.context.router.staticContext},e.prototype.componentWillMount=function(){f()(this.context.router,"You should not use <Redirect> outside a <Router>"),this.isStatic()&&this.perform()},e.prototype.componentDidMount=function(){this.isStatic()||this.perform()},e.prototype.componentDidUpdate=function(t){var e=L(t.to),n=L(this.props.to);D(e,n)?h()(!1,"You tried to redirect to the same route you're currently on: \""+n.pathname+n.search+'"'):this.perform()},e.prototype.computeTo=function(t){var e=t.computedMatch,n=t.to;return e?"string"==typeof n?ht(n,e.params):pt({},n,{pathname:ht(n.pathname,e.params)}):n},e.prototype.perform=function(){var t=this.context.router.history,e=this.props.push,n=this.computeTo(this.props);e?t.push(n):t.replace(n)},e.prototype.render=function(){return null},e}(o.d.Component);ft.propTypes={computedMatch:a.a.object,push:a.a.bool,from:a.a.string,to:a.a.oneOfType([a.a.string,a.a.object]).isRequired},ft.defaultProps={push:!1},ft.contextTypes={router:a.a.shape({history:a.a.shape({push:a.a.func.isRequired,replace:a.a.func.isRequired}).isRequired,staticContext:a.a.object}).isRequired};var dt=ft,yt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};function mt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var _t=function(t){return"/"===t.charAt(0)?t:"/"+t},vt=function(t,e){return t?yt({},e,{pathname:_t(t)+e.pathname}):e},gt=function(t){return"string"==typeof t?t:F(t)},bt=function(t){return function(){f()(!1,"You cannot %s with <StaticRouter>",t)}},wt=function(){},kt=function(t){function e(){var n,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];return n=i=mt(this,t.call.apply(t,[this].concat(o))),i.createHref=function(t){return _t(i.props.basename+gt(t))},i.handlePush=function(t){var e=i.props,n=e.basename,r=e.context;r.action="PUSH",r.location=vt(n,L(t)),r.url=gt(r.location)},i.handleReplace=function(t){var e=i.props,n=e.basename,r=e.context;r.action="REPLACE",r.location=vt(n,L(t)),r.url=gt(r.location)},i.handleListen=function(){return wt},i.handleBlock=function(){return wt},mt(i,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getChildContext=function(){return{router:{staticContext:this.props.context}}},e.prototype.componentWillMount=function(){h()(!this.props.history,"<StaticRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { StaticRouter as Router }`.")},e.prototype.render=function(){var t=this.props,e=t.basename,n=(t.context,t.location),i=function(t,e){var n={};for(var i in t)e.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(t,["basename","context","location"]),r={createHref:this.createHref,action:"POP",location:function(t,e){if(!t)return e;var n=_t(t);return 0!==e.pathname.indexOf(n)?e:yt({},e,{pathname:e.pathname.substr(n.length)})}(e,L(n)),push:this.handlePush,replace:this.handleReplace,go:bt("go"),goBack:bt("goBack"),goForward:bt("goForward"),listen:this.handleListen,block:this.handleBlock};return o.d.createElement(_,yt({},i,{history:r}))},e}(o.d.Component);kt.propTypes={basename:a.a.string,context:a.a.object.isRequired,location:a.a.oneOfType([a.a.string,a.a.object])},kt.defaultProps={basename:"",location:"/"},kt.childContextTypes={router:a.a.object.isRequired};var St=kt;var Tt=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentWillMount=function(){f()(this.context.router,"You should not use <Switch> outside a <Router>")},e.prototype.componentWillReceiveProps=function(t){h()(!(t.location&&!this.props.location),'<Switch> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),h()(!(!t.location&&this.props.location),'<Switch> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.')},e.prototype.render=function(){var t=this.context.router.route,e=this.props.children,n=this.props.location||t.location,i=void 0,r=void 0;return o.d.Children.forEach(e,function(e){if(null==i&&o.d.isValidElement(e)){var s=e.props,a=s.path,u=s.exact,l=s.strict,c=s.sensitive,h=s.from,p=a||h;r=e,i=K(n.pathname,{path:p,exact:u,strict:l,sensitive:c},t.match)}}),i?o.d.cloneElement(r,{location:n,computedMatch:i}):null},e}(o.d.Component);Tt.contextTypes={router:a.a.shape({route:a.a.object.isRequired}).isRequired},Tt.propTypes={children:a.a.node,location:a.a.object};var xt=Tt,Ot=K,Pt=n(139),At=n.n(Pt),Et=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};var Ct=function(t){var e=function(e){var n=e.wrappedComponentRef,i=function(t,e){var n={};for(var i in t)e.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(e,["wrappedComponentRef"]);return o.d.createElement(et,{children:function(e){return o.d.createElement(t,Et({},i,e,{ref:n}))}})};return e.displayName="withRouter("+(t.displayName||t.name)+")",e.WrappedComponent=t,e.propTypes={wrappedComponentRef:a.a.func},At()(e,t)};n.d(e,"BrowserRouter",function(){return w}),n.d(e,"HashRouter",function(){return O}),n.d(e,"Link",function(){return M}),n.d(e,"MemoryRouter",function(){return G}),n.d(e,"NavLink",function(){return st}),n.d(e,"Prompt",function(){return ut}),n.d(e,"Redirect",function(){return dt}),n.d(e,"Route",function(){return nt}),n.d(e,"Router",function(){return v}),n.d(e,"StaticRouter",function(){return St}),n.d(e,"Switch",function(){return xt}),n.d(e,"matchPath",function(){return Ot}),n.d(e,"withRouter",function(){return Ct})},function(t,e,n){"use strict";t.exports=function(t,e,n,i,r,o,s,a){if(!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,i,r,o,s,a],c=0;(u=new Error(e.replace(/%s/g,function(){return l[c++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}}},function(t,e,n){"use strict";var i=function(){};t.exports=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AugmentationGrid=e.ButtonGrid=e.TaskList=e.CurrentTask=e.Checkbox=e.Button=e.SelectGroup=e.Select=e.Slider=e.NumberInput=e.TextInput=e.Param=e.ParamGroup=e.Group=e.Player=e.Gallery=e.FileUpload=e.FileRow=e.FileList=e.FolderList=e.AudioPlayer=e.Header=e.Progress=e.Loading=e.Views=void 0;var i=P(n(246)),r=P(n(245)),o=P(n(45)),s=P(n(122)),a=P(n(244)),u=P(n(243)),l=n(26),c=P(n(121)),h=P(n(120)),p=P(n(242)),f=P(n(24)),d=P(n(241)),y=P(n(18)),m=P(n(153)),_=P(n(31)),v=P(n(152)),g=P(n(87)),b=P(n(119)),w=P(n(52)),k=P(n(151)),S=P(n(63)),T=P(n(41)),x=P(n(150)),O=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(149));function P(t){return t&&t.__esModule?t:{default:t}}e.Views=O,e.Loading=y.default,e.Progress=b.default,e.Header=d.default,e.AudioPlayer=i.default,e.FolderList=h.default,e.FileList=l.FileList,e.FileRow=l.FileRow,e.FileUpload=c.default,e.Gallery=p.default,e.Player=g.default,e.Group=f.default,e.ParamGroup=v.default,e.Param=_.default,e.TextInput=T.default,e.NumberInput=m.default,e.Slider=S.default,e.Select=w.default,e.SelectGroup=k.default,e.Button=o.default,e.Checkbox=a.default,e.CurrentTask=u.default,e.TaskList=x.default,e.ButtonGrid=s.default,e.AugmentationGrid=r.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},o=n(19),s=n(6),a=(i=s)&&i.__esModule?i:{default:i},u=n(32),l=d(n(130)),c=d(n(257)),h=d(n(256)),p=d(n(250)),f=d(n(249));function d(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}e.default={socket:u.socket,actions:l,system:c,live:h,task:p,api:f},u.socket.on("status",function(t){switch(console.log("got status",t.key,t.value),o.store.dispatch(r({type:a.default.socket.status},t)),t.key){case"processing":o.store.dispatch(r({type:"SET_PARAM"},t))}})},function(t,e,n){"use strict";function i(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var n=0;n<this._listeners[t].length;n++)this._listeners[t][n].call(this,e)},pipe:function(t){return t.registerPrevious(this)},registerPrevious:function(t){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=t.streamInfo,this.mergeStreamInfo(),this.previous=t;var e=this;return t.on("data",function(t){e.processChunk(t)}),t.on("end",function(){e.end()}),t.on("error",function(t){e.error(t)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var t=!1;return this.generatedError&&(this.error(this.generatedError),t=!0),this.previous&&this.previous.resume(),!t},flush:function(){},processChunk:function(t){this.push(t)},withStreamInfo:function(t,e){return this.extraStreamInfo[t]=e,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var t in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(t)&&(this.streamInfo[t]=this.extraStreamInfo[t])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var t="Worker "+this.name;return this.previous?this.previous+" -> "+t:t}},t.exports=i},function(t,e,n){t.exports=n(299)()},function(t,e,n){var i,r,o=n(259),s=n(258),a=0,u=0;t.exports=function(t,e,n){var l=e&&n||0,c=e||[],h=(t=t||{}).node||i,p=void 0!==t.clockseq?t.clockseq:r;if(null==h||null==p){var f=o();null==h&&(h=i=[1|f[0],f[1],f[2],f[3],f[4],f[5]]),null==p&&(p=r=16383&(f[6]<<8|f[7]))}var d=void 0!==t.msecs?t.msecs:(new Date).getTime(),y=void 0!==t.nsecs?t.nsecs:u+1,m=d-a+(y-u)/1e4;if(m<0&&void 0===t.clockseq&&(p=p+1&16383),(m<0||d>a)&&void 0===t.nsecs&&(y=0),y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=d,u=y,r=p;var _=(1e4*(268435455&(d+=122192928e5))+y)%4294967296;c[l++]=_>>>24&255,c[l++]=_>>>16&255,c[l++]=_>>>8&255,c[l++]=255&_;var v=d/4294967296*1e4&268435455;c[l++]=v>>>8&255,c[l++]=255&v,c[l++]=v>>>24&15|16,c[l++]=v>>>16&255,c[l++]=p>>>8|128,c[l++]=255&p;for(var g=0;g<6;++g)c[l+g]=h[g];return e||s(c)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.progress;return(0,r.h)("div",{className:"loading"},"Loading",(0,r.h)("br",null),e&&(0,r.h)(s.default,{progress:e}))};var i,r=n(1),o=n(119),s=(i=o)&&i.__esModule?i:{default:i}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dispatch=e.store=e.history=void 0;var i=n(2),r=n(289),o=y(n(286)),s=y(n(285)),a=y(n(278)),u=y(n(277)),l=y(n(273)),c=y(n(272)),h=y(n(271)),p=y(n(270)),f=y(n(266)),d=n(265);function y(t){return t&&t.__esModule?t:{default:t}}var m=(0,i.combineReducers)({auth:a.default,system:u.default,dashboard:l.default,live:c.default,upload:h.default,queue:p.default,router:r.routerReducer,module:d.moduleReducer,audioPlayer:f.default}),_=e.history=(0,s.default)(),v=e.store=(0,i.createStore)(m,(0,i.compose)((0,i.applyMiddleware)(o.default,(0,r.routerMiddleware)(_))));e.dispatch=v.dispatch},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.play=e.pause=e.seek=e.load_epoch=e.load_sequence=e.list_sequences=e.list_epochs=e.list_checkpoints=e.set_fullscreen=e.set_param=e.get_params=void 0;var i=s(n(14)),r=s(n(6)),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(49));function s(t){return t&&t.__esModule?t:{default:t}}e.get_params=function(){return i.default.live.get_params(),{type:r.default.player.get_params}},e.set_param=function(t,e){return console.log("set param",t,e),i.default.live.set_param(t,e),{type:r.default.player.set_param,key:t,value:e}},e.set_fullscreen=function(t){return{type:r.default.player.set_fullscreen,value:t}},e.list_checkpoints=function(t){return i.default.live.list_checkpoints(t),{type:r.default.player.loading_checkpoints}},e.list_epochs=function(t,e){return i.default.live.list_epochs(t,e),{type:r.default.player.loading_epochs}},e.list_sequences=function(t){return i.default.live.list_sequences(t),{type:r.default.player.loading_sequences}},e.load_sequence=function(t){return i.default.live.load_sequence(t),{type:r.default.player.loading_sequence,sequence_name:t}},e.load_epoch=function(t,e){return i.default.live.load_epoch(t,e),{type:r.default.player.loading_checkpoint,checkpoint_name:t,epoch:e}},e.seek=function(t){return i.default.live.seek(t),{type:r.default.player.seeking}},e.pause=function t(e){return i.default.live.pause(t),o.toggleFPS(!1),{type:r.default.player.pausing}},e.play=function(t){return i.default.live.play(),o.toggleFPS(!0),{type:r.default.player.playing}}},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var n=e.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var i in n)r(n,i)&&(t[i]=n[i])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var o={arraySet:function(t,e,n,i,r){if(e.subarray&&t.subarray)t.set(e.subarray(n,n+i),r);else for(var o=0;o<i;o++)t[r+o]=e[n+o]},flattenChunks:function(t){var e,n,i,r,o,s;for(i=0,e=0,n=t.length;e<n;e++)i+=t[e].length;for(s=new Uint8Array(i),r=0,e=0,n=t.length;e<n;e++)o=t[e],s.set(o,r),r+=o.length;return s}},s={arraySet:function(t,e,n,i,r){for(var o=0;o<i;o++)t[r+o]=e[n+o]},flattenChunks:function(t){return[].concat.apply([],t)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,o)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,s))},e.setTyped(i)},function(t,e,n){"use strict";(function(t){if(e.base64=!0,e.array=!0,e.string=!0,e.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,e.nodebuffer=void 0!==t,e.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)e.blob=!1;else{var i=new ArrayBuffer(0);try{e.blob=0===new Blob([i],{type:"application/zip"}).size}catch(t){try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);r.append(i),e.blob=0===r.getBlob("application/zip").size}catch(t){e.blob=!1}}}try{e.nodestream=!!n(114).Readable}catch(t){e.nodestream=!1}}).call(this,n(37).Buffer)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return(0,i.h)("div",{className:"group"},this.props.title&&(0,i.h)("h3",null,this.props.title),this.props.children)};var i=n(1)},function(t,e,n){"use strict";var i=n(56),r=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=h;var o=n(36);o.inherits=n(27);var s=n(113),a=n(70);o.inherits(h,s);for(var u=r(a.prototype),l=0;l<u.length;l++){var c=u[l];h.prototype[c]||(h.prototype[c]=a.prototype[c])}function h(t){if(!(this instanceof h))return new h(t);s.call(this,t),a.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",p)}function p(){this.allowHalfOpen||this._writableState.ended||i.nextTick(f,this)}function f(t){t.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),h.prototype._destroy=function(t,e){this.push(null),this.end(),i.nextTick(e,t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileRow=e.FileList=void 0;var i=n(1),r=(n(2),n(3),n(10),s(n(33))),o=s(n(5));function s(t){return t&&t.__esModule?t:{default:t}}var a=o.default.fieldSet(new Set(["name","date","size"])),u=(e.FileList=function(t){var e=t.files,n=t.fields,r=(t.sort,t.title),s=t.linkFiles,l=t.onClick,c=t.onDelete,h=t.orderBy,p=void 0===h?"name asc":h,f=t.className,d=void 0===f?"":f,y=t.fileListClassName,m=void 0===y?"filelist":y,_=t.rowClassName,v=void 0===_?"row file":_,g=o.default.sort.orderByFn(p),b=g.mapFn,w=g.sortFn,k=(e||[]).filter(function(t){return!!t}).map(b).sort(w).map(function(t){return(0,i.h)(u,{file:t[1],fields:a(n),className:v,linkFiles:s,onDelete:c,onClick:l})});return k&&k.length?(0,i.h)("div",{className:"rows "+d},r&&(0,i.h)("div",{class:"row heading"},(0,i.h)("h3",null,r),"}"),(0,i.h)("div",{className:"rows "+m},k)):(0,i.h)("div",{className:"rows "+d},(0,i.h)("div",{class:"row heading"},(0,i.h)("h4",{class:"noFiles"},"No files")))},e.FileRow=function(t){var e=t.file,n=t.linkFiles,s=t.onDelete,u=t.onClick,l=t.className,c=void 0===l?"row file":l,h=t.username,p=void 0===h?"":h,f=a(t.fields),d=o.default.hush_size(e.size),y=e.date||e.created_at,m=e.epoch||e.epochs||0,_=e.count||0,v=void 0,g=void 0;return e.name?g=v=e.name:e.url&&(e.opt&&e.opt.type?(v=e.opt.type+": "+e.opt.title,g=e.opt.token):g=v=e.url.replace(/^https?:\/\//,"")),(0,i.h)("div",{class:c,key:g},f.has("name")&&(0,i.h)("div",{className:"filename",title:e.name||e.url},!1===e.persisted?(0,i.h)("span",{className:"unpersisted"},v):n&&e.url?(0,i.h)("a",{target:"_blank",onClick:function(t){t.metaKey||t.ctrlKey||t.altKey||!u||(t.preventDefault(),u&&u(e,t))},href:e.url},v):(0,i.h)("span",{class:"link",onClick:function(t){return u&&u(e,t)}},v)),f.has("age")&&(0,i.h)("div",{className:"age "+o.default.carbon_date(y)},o.default.get_age(y)),f.has("username")&&(0,i.h)("div",{className:"username"},p),f.has("epoch")&&(0,i.h)("div",{className:"epoch "+o.default.hush_null(m)[0]},m>0?"ep. "+m:""),f.has("date")&&(0,i.h)("div",{className:"date "+o.default.carbon_date(y)},(0,r.default)(y).format("YYYY-MM-DD")),f.has("datetime")&&(0,i.h)("div",{className:"datetime "+o.default.carbon_date(y)},(0,r.default)(y).format("YYYY-MM-DD h:mm a")),f.has("size")&&(0,i.h)("div",{className:"size "+d[0]},d[1]),f.has("count")&&(0,i.h)("div",{className:"count "+o.default.hush_null(_)[0]},_>0?_+" files":""),(f.has("activity")||f.has("module"))&&(0,i.h)("div",{className:"activity"},f.has("activity")&&e.activity,f.has("module")&&e.module),f.has("delete")&&s&&e.id&&(0,i.h)("div",{className:"destroy",onClick:function(t){return s(e)}},"x"),t.options&&t.options(e))})},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e,n){"use strict";for(var i=n(9),r=n(23),o=n(54),s=n(15),a=new Array(256),u=0;u<256;u++)a[u]=u>=252?6:u>=248?5:u>=240?4:u>=224?3:u>=192?2:1;a[254]=a[254]=1;function l(){s.call(this,"utf-8 decode"),this.leftOver=null}function c(){s.call(this,"utf-8 encode")}e.utf8encode=function(t){return r.nodebuffer?o.newBufferFrom(t,"utf-8"):function(t){var e,n,i,o,s,a=t.length,u=0;for(o=0;o<a;o++)55296==(64512&(n=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(i=t.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(i-56320),o++),u+=n<128?1:n<2048?2:n<65536?3:4;for(e=r.uint8array?new Uint8Array(u):new Array(u),s=0,o=0;s<u;o++)55296==(64512&(n=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(i=t.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(i-56320),o++),n<128?e[s++]=n:n<2048?(e[s++]=192|n>>>6,e[s++]=128|63&n):n<65536?(e[s++]=224|n>>>12,e[s++]=128|n>>>6&63,e[s++]=128|63&n):(e[s++]=240|n>>>18,e[s++]=128|n>>>12&63,e[s++]=128|n>>>6&63,e[s++]=128|63&n);return e}(t)},e.utf8decode=function(t){return r.nodebuffer?i.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,n,r,o,s=t.length,u=new Array(2*s);for(n=0,e=0;e<s;)if((r=t[e++])<128)u[n++]=r;else if((o=a[r])>4)u[n++]=65533,e+=o-1;else{for(r&=2===o?31:3===o?15:7;o>1&&e<s;)r=r<<6|63&t[e++],o--;o>1?u[n++]=65533:r<65536?u[n++]=r:(r-=65536,u[n++]=55296|r>>10&1023,u[n++]=56320|1023&r)}return u.length!==n&&(u.subarray?u=u.subarray(0,n):u.length=n),i.applyFromCharCode(u)}(t=i.transformTo(r.uint8array?"uint8array":"array",t))},i.inherits(l,s),l.prototype.processChunk=function(t){var n=i.transformTo(r.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(r.uint8array){var o=n;(n=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),n.set(o,this.leftOver.length)}else n=this.leftOver.concat(n);this.leftOver=null}var s=function(t,e){var n;for((e=e||t.length)>t.length&&(e=t.length),n=e-1;n>=0&&128==(192&t[n]);)n--;return n<0?e:0===n?e:n+a[t[n]]>e?n:e}(n),u=n;s!==n.length&&(r.uint8array?(u=n.subarray(0,s),this.leftOver=n.subarray(s,n.length)):(u=n.slice(0,s),this.leftOver=n.slice(s,n.length))),this.push({data:e.utf8decode(u),meta:t.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:e.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},e.Utf8DecodeWorker=l,i.inherits(c,s),c.prototype.processChunk=function(t){this.push({data:e.utf8encode(t.data),meta:t.meta})},e.Utf8EncodeWorker=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=(n(2),n(3)),s=c(n(5)),a=c(n(8)),u=n(26),l=c(n(18));function c(t){return t&&t.__esModule?t:{default:t}}var h=s.default.fieldSet(new Set(["input","status","checkpoint","output"])),p=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"render",value:function(){var t=this.props,e=t.loading,n=t.progress,i=t.fields,o=t.module,s=t.data,a=t.folder,u=(t.match,t.history);return e?(0,r.h)(l.default,{progress:n}):s.folders.length?a&&a.name?(i=h(i),(0,r.h)("div",{class:"rows params datasets"},(0,r.h)("div",{class:"row row-heading dataset"},i.has("input")&&(0,r.h)("div",{class:"col"},"input"),i.has("status")&&(0,r.h)("div",{class:"col"},"status"),i.has("checkpoint")&&(0,r.h)("div",{class:"col"},"checkpoint"),i.has("output")&&(0,r.h)("div",{class:"col"},"output")),this.renderGroups())):void 0:(console.log("no folders, redirect to /new"),u.push("/"+o.name+"/new/"))}},{key:"renderGroups",value:function(){var t=this,e=this.props,n=e.module,i=e.data,o=e.folder,a=e.fields,l=e.runner,c=e.onPickDataset,p=e.onPickFile;e.datasetActions;a=h(a);var f=i.datasetLookup,d=i.fileLookup;if(!f)return(0,r.h)("div",null);var y=s.default.sort.orderByFn("date desc"),m=y.mapFn,_=y.sortFn,v=l&&l.cpu.task&&l.cpu.task.module===n.name,g=l&&l.gpu.task&&l.gpu.task.module===n.name;return o.datasets.map(function(t){return f[t]}).map(m).sort(_).map(function(e){var n=e[1],i="",o=!1,h=!1;return g&&l.gpu.task.dataset===n?(i=s.default.gerund(l.gpu.task.activity),o=!0):v&&"fetch"===l.cpu.task.activity&&l.cpu.task.opt.file_id===n.input[0]&&(o=!0,h=!0),(0,r.h)("div",{key:n.name,className:"row dataset",onClick:function(){return c&&c(n)}},t.props.beforeRow&&t.props.beforeRow(n),a.has("input")&&(0,r.h)("div",{className:"col"},!!n.input.length&&(0,r.h)(u.FileList,{files:n.input.map(function(t){return d[t]}),className:"input_files",fileListClassName:"",rowClassName:"input_file",fields:"name date size delete",linkFiles:!0,onClick:p,onDelete:function(e){return t.onDeleteFile(e)}})),a.has("status")&&(0,r.h)("div",{className:["col","quiet",n.isBuilt?"built":"not_built",o?"processing":"not_processing"].join(" ")},t.props.datasetActions&&t.props.datasetActions(n,h,o),i),a.has("checkpoint")&&(0,r.h)("div",{className:"col checkpoint"},!!n.checkpoints.length&&(0,r.h)(u.FileRow,{file:n.checkpoints[0],fields:"name date epoch",className:"row checkpoint"})),a.has("output")&&(0,r.h)("div",{className:"col"},!!n.output.length&&(0,r.h)(u.FileList,{files:n.output.map(function(t){return d[t]}),orderBy:"epoch desc",fields:"name date epoch size",linkFiles:!0,onClick:p,onDelete:function(e){return t.onDeleteFile(e)}})),t.props.afterRow&&t.props.afterRow(n))})}},{key:"onDeleteFile",value:function(t){confirm("Are you sure you want to delete this file?")&&(console.log("delete: confirmed"),this.props.onDeleteFile?(console.log("calling custom deletefile function"),this.props.onDeleteFile(t)):a.default.file.destroy(t))}}]),e}();e.default=(0,o.connect)(function(t){return{runner:t.system.runner}},function(t,e){return{}})(p)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(2),o=n(3),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(59)),a=l(n(18)),u=l(n(41));function l(t){return t&&t.__esModule?t:{default:t}}e.default=(0,o.connect)(function(t){return{}},function(t,e){return{actions:(0,r.bindActionCreators)(s,t)}})(function(t){var e=t.loading,n=(t.status,t.error,t.history,t.actions),r=t.module;return e?(0,i.h)(a.default,null):(console.log(t),(0,i.h)("div",{class:"opaque"},(0,i.h)("div",{class:"heading"},(0,i.h)("h2",null,"Create a new ",r.displayName," project")),(0,i.h)("div",{class:"params"},(0,i.h)(u.default,{autofocus:!0,title:"Name your project",onSave:function(t){n.createFolder(r,t).then(function(t){window.location.href="/"+r.name+"/datasets/"+t.id+"/"})}}))))})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1);n(3);var o=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"render",value:function(){return(0,r.h)("div",{className:"button param"},(0,r.h)("span",null,this.props.title),(0,r.h)("span",null,this.props.children))}}]),e}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.socket=void 0;var i,r=n(19),o=n(6),s=(i=o)&&i.__esModule?i:{default:i};var a=e.socket=io.connect("/client");a.on("connect",function(){return r.store.dispatch({type:s.default.socket.connect})}),a.on("connect_error",function(t){return r.store.dispatch({type:s.default.socket.connect_error,error:t})}),a.on("reconnect",function(t){return r.store.dispatch({type:s.default.socket.reconnect,attempt:t})}),a.on("reconnecting",function(){return r.store.dispatch({type:s.default.socket.reconnecting})}),a.on("reconnect_error",function(t){return r.store.dispatch({type:s.default.socket.reconnect_error,error:t})}),a.on("reconnect_failed",function(t){return r.store.dispatch({type:s.default.socket.reconnect_failed,error:t})}),a.on("disconnect",function(){return r.store.dispatch({type:s.default.socket.disconnect})}),a.on("error",function(t){return r.store.dispatch({type:s.default.socket.error,error:t})})},function(t,e,n){(function(t){t.exports=function(){"use strict";var e,n;function i(){return e.apply(null,arguments)}function r(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function o(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function s(t){return void 0===t}function a(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function u(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function l(t,e){var n,i=[];for(n=0;n<t.length;++n)i.push(e(t[n],n));return i}function c(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function h(t,e){for(var n in e)c(e,n)&&(t[n]=e[n]);return c(e,"toString")&&(t.toString=e.toString),c(e,"valueOf")&&(t.valueOf=e.valueOf),t}function p(t,e,n,i){return Oe(t,e,n,i,!0).utc()}function f(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function d(t){if(null==t._isValid){var e=f(t),i=n.call(e.parsedDateParts,function(t){return null!=t}),r=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&i);if(t._strict&&(r=r&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return r;t._isValid=r}return t._isValid}function y(t){var e=p(NaN);return null!=t?h(f(e),t):f(e).userInvalidated=!0,e}n=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),n=e.length>>>0,i=0;i<n;i++)if(i in e&&t.call(this,e[i],i,e))return!0;return!1};var m=i.momentProperties=[];function _(t,e){var n,i,r;if(s(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),s(e._i)||(t._i=e._i),s(e._f)||(t._f=e._f),s(e._l)||(t._l=e._l),s(e._strict)||(t._strict=e._strict),s(e._tzm)||(t._tzm=e._tzm),s(e._isUTC)||(t._isUTC=e._isUTC),s(e._offset)||(t._offset=e._offset),s(e._pf)||(t._pf=f(e)),s(e._locale)||(t._locale=e._locale),0<m.length)for(n=0;n<m.length;n++)s(r=e[i=m[n]])||(t[i]=r);return t}var v=!1;function g(t){_(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===v&&(v=!0,i.updateOffset(this),v=!1)}function b(t){return t instanceof g||null!=t&&null!=t._isAMomentObject}function w(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function k(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=w(e)),n}function S(t,e,n){var i,r=Math.min(t.length,e.length),o=Math.abs(t.length-e.length),s=0;for(i=0;i<r;i++)(n&&t[i]!==e[i]||!n&&k(t[i])!==k(e[i]))&&s++;return s+o}function T(t){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function x(t,e){var n=!0;return h(function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,t),n){for(var r,o=[],s=0;s<arguments.length;s++){if(r="","object"==typeof arguments[s]){for(var a in r+="\n["+s+"] ",arguments[0])r+=a+": "+arguments[0][a]+", ";r=r.slice(0,-2)}else r=arguments[s];o.push(r)}T(t+"\nArguments: "+Array.prototype.slice.call(o).join("")+"\n"+(new Error).stack),n=!1}return e.apply(this,arguments)},e)}var O,P={};function A(t,e){null!=i.deprecationHandler&&i.deprecationHandler(t,e),P[t]||(T(e),P[t]=!0)}function E(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function C(t,e){var n,i=h({},t);for(n in e)c(e,n)&&(o(t[n])&&o(e[n])?(i[n]={},h(i[n],t[n]),h(i[n],e[n])):null!=e[n]?i[n]=e[n]:delete i[n]);for(n in t)c(t,n)&&!c(e,n)&&o(t[n])&&(i[n]=h({},i[n]));return i}function M(t){null!=t&&this.set(t)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,O=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)c(t,e)&&n.push(e);return n};var R={};function j(t,e){var n=t.toLowerCase();R[n]=R[n+"s"]=R[e]=t}function F(t){return"string"==typeof t?R[t]||R[t.toLowerCase()]:void 0}function N(t){var e,n,i={};for(n in t)c(t,n)&&(e=F(n))&&(i[e]=t[n]);return i}var L={};function D(t,e){L[t]=e}function q(t,e,n){var i=""+Math.abs(t),r=e-i.length;return(0<=t?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+i}var I=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,B=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,U={},z={};function Y(t,e,n,i){var r=i;"string"==typeof i&&(r=function(){return this[i]()}),t&&(z[t]=r),e&&(z[e[0]]=function(){return q(r.apply(this,arguments),e[1],e[2])}),n&&(z[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),t)})}function W(t,e){return t.isValid()?(e=G(e,t.localeData()),U[e]=U[e]||function(t){var e,n,i,r=t.match(I);for(e=0,n=r.length;e<n;e++)z[r[e]]?r[e]=z[r[e]]:r[e]=(i=r[e]).match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"");return function(e){var i,o="";for(i=0;i<n;i++)o+=E(r[i])?r[i].call(e,t):r[i];return o}}(e),U[e](t)):t.localeData().invalidDate()}function G(t,e){var n=5;function i(t){return e.longDateFormat(t)||t}for(B.lastIndex=0;0<=n&&B.test(t);)t=t.replace(B,i),B.lastIndex=0,n-=1;return t}var V=/\d/,H=/\d\d/,Z=/\d{3}/,Q=/\d{4}/,K=/[+-]?\d{6}/,X=/\d\d?/,$=/\d\d\d\d?/,J=/\d\d\d\d\d\d?/,tt=/\d{1,3}/,et=/\d{1,4}/,nt=/[+-]?\d{1,6}/,it=/\d+/,rt=/[+-]?\d+/,ot=/Z|[+-]\d\d:?\d\d/gi,st=/Z|[+-]\d\d(?::?\d\d)?/gi,at=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ut={};function lt(t,e,n){ut[t]=E(e)?e:function(t,i){return t&&n?n:e}}function ct(t,e){return c(ut,t)?ut[t](e._strict,e._locale):new RegExp(ht(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,i,r){return e||n||i||r})))}function ht(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var pt={};function ft(t,e){var n,i=e;for("string"==typeof t&&(t=[t]),a(e)&&(i=function(t,n){n[e]=k(t)}),n=0;n<t.length;n++)pt[t[n]]=i}function dt(t,e){ft(t,function(t,n,i,r){i._w=i._w||{},e(t,i._w,i,r)})}var yt=0,mt=1,_t=2,vt=3,gt=4,bt=5,wt=6,kt=7,St=8;function Tt(t){return xt(t)?366:365}function xt(t){return t%4==0&&t%100!=0||t%400==0}Y("Y",0,0,function(){var t=this.year();return t<=9999?""+t:"+"+t}),Y(0,["YY",2],0,function(){return this.year()%100}),Y(0,["YYYY",4],0,"year"),Y(0,["YYYYY",5],0,"year"),Y(0,["YYYYYY",6,!0],0,"year"),j("year","y"),D("year",1),lt("Y",rt),lt("YY",X,H),lt("YYYY",et,Q),lt("YYYYY",nt,K),lt("YYYYYY",nt,K),ft(["YYYYY","YYYYYY"],yt),ft("YYYY",function(t,e){e[yt]=2===t.length?i.parseTwoDigitYear(t):k(t)}),ft("YY",function(t,e){e[yt]=i.parseTwoDigitYear(t)}),ft("Y",function(t,e){e[yt]=parseInt(t,10)}),i.parseTwoDigitYear=function(t){return k(t)+(68<k(t)?1900:2e3)};var Ot,Pt=At("FullYear",!0);function At(t,e){return function(n){return null!=n?(Ct(this,t,n),i.updateOffset(this,e),this):Et(this,t)}}function Et(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function Ct(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&xt(t.year())&&1===t.month()&&29===t.date()?t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),Mt(n,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](n))}function Mt(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=(e%12+12)%12;return t+=(e-n)/12,1===n?xt(t)?29:28:31-n%7%2}Ot=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},Y("M",["MM",2],"Mo",function(){return this.month()+1}),Y("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),Y("MMMM",0,0,function(t){return this.localeData().months(this,t)}),j("month","M"),D("month",8),lt("M",X),lt("MM",X,H),lt("MMM",function(t,e){return e.monthsShortRegex(t)}),lt("MMMM",function(t,e){return e.monthsRegex(t)}),ft(["M","MM"],function(t,e){e[mt]=k(t)-1}),ft(["MMM","MMMM"],function(t,e,n,i){var r=n._locale.monthsParse(t,i,n._strict);null!=r?e[mt]=r:f(n).invalidMonth=t});var Rt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,jt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ft="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Nt(t,e){var n;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=k(e);else if(!a(e=t.localeData().monthsParse(e)))return t;return n=Math.min(t.date(),Mt(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function Lt(t){return null!=t?(Nt(this,t),i.updateOffset(this,!0),this):Et(this,"Month")}var Dt=at,qt=at;function It(){function t(t,e){return e.length-t.length}var e,n,i=[],r=[],o=[];for(e=0;e<12;e++)n=p([2e3,e]),i.push(this.monthsShort(n,"")),r.push(this.months(n,"")),o.push(this.months(n,"")),o.push(this.monthsShort(n,""));for(i.sort(t),r.sort(t),o.sort(t),e=0;e<12;e++)i[e]=ht(i[e]),r[e]=ht(r[e]);for(e=0;e<24;e++)o[e]=ht(o[e]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function Bt(t){var e=new Date(Date.UTC.apply(null,arguments));return t<100&&0<=t&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function Ut(t,e,n){var i=7+e-n;return-(7+Bt(t,0,i).getUTCDay()-e)%7+i-1}function zt(t,e,n,i,r){var o,s,a=1+7*(e-1)+(7+n-i)%7+Ut(t,i,r);return a<=0?s=Tt(o=t-1)+a:a>Tt(t)?(o=t+1,s=a-Tt(t)):(o=t,s=a),{year:o,dayOfYear:s}}function Yt(t,e,n){var i,r,o=Ut(t.year(),e,n),s=Math.floor((t.dayOfYear()-o-1)/7)+1;return s<1?i=s+Wt(r=t.year()-1,e,n):s>Wt(t.year(),e,n)?(i=s-Wt(t.year(),e,n),r=t.year()+1):(r=t.year(),i=s),{week:i,year:r}}function Wt(t,e,n){var i=Ut(t,e,n),r=Ut(t+1,e,n);return(Tt(t)-i+r)/7}Y("w",["ww",2],"wo","week"),Y("W",["WW",2],"Wo","isoWeek"),j("week","w"),j("isoWeek","W"),D("week",5),D("isoWeek",5),lt("w",X),lt("ww",X,H),lt("W",X),lt("WW",X,H),dt(["w","ww","W","WW"],function(t,e,n,i){e[i.substr(0,1)]=k(t)}),Y("d",0,"do","day"),Y("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),Y("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),Y("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),Y("e",0,0,"weekday"),Y("E",0,0,"isoWeekday"),j("day","d"),j("weekday","e"),j("isoWeekday","E"),D("day",11),D("weekday",11),D("isoWeekday",11),lt("d",X),lt("e",X),lt("E",X),lt("dd",function(t,e){return e.weekdaysMinRegex(t)}),lt("ddd",function(t,e){return e.weekdaysShortRegex(t)}),lt("dddd",function(t,e){return e.weekdaysRegex(t)}),dt(["dd","ddd","dddd"],function(t,e,n,i){var r=n._locale.weekdaysParse(t,i,n._strict);null!=r?e.d=r:f(n).invalidWeekday=t}),dt(["d","e","E"],function(t,e,n,i){e[i]=k(t)});var Gt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Vt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ht="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Zt=at,Qt=at,Kt=at;function Xt(){function t(t,e){return e.length-t.length}var e,n,i,r,o,s=[],a=[],u=[],l=[];for(e=0;e<7;e++)n=p([2e3,1]).day(e),i=this.weekdaysMin(n,""),r=this.weekdaysShort(n,""),o=this.weekdays(n,""),s.push(i),a.push(r),u.push(o),l.push(i),l.push(r),l.push(o);for(s.sort(t),a.sort(t),u.sort(t),l.sort(t),e=0;e<7;e++)a[e]=ht(a[e]),u[e]=ht(u[e]),l[e]=ht(l[e]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function $t(){return this.hours()%12||12}function Jt(t,e){Y(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function te(t,e){return e._meridiemParse}Y("H",["HH",2],0,"hour"),Y("h",["hh",2],0,$t),Y("k",["kk",2],0,function(){return this.hours()||24}),Y("hmm",0,0,function(){return""+$t.apply(this)+q(this.minutes(),2)}),Y("hmmss",0,0,function(){return""+$t.apply(this)+q(this.minutes(),2)+q(this.seconds(),2)}),Y("Hmm",0,0,function(){return""+this.hours()+q(this.minutes(),2)}),Y("Hmmss",0,0,function(){return""+this.hours()+q(this.minutes(),2)+q(this.seconds(),2)}),Jt("a",!0),Jt("A",!1),j("hour","h"),D("hour",13),lt("a",te),lt("A",te),lt("H",X),lt("h",X),lt("k",X),lt("HH",X,H),lt("hh",X,H),lt("kk",X,H),lt("hmm",$),lt("hmmss",J),lt("Hmm",$),lt("Hmmss",J),ft(["H","HH"],vt),ft(["k","kk"],function(t,e,n){var i=k(t);e[vt]=24===i?0:i}),ft(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),ft(["h","hh"],function(t,e,n){e[vt]=k(t),f(n).bigHour=!0}),ft("hmm",function(t,e,n){var i=t.length-2;e[vt]=k(t.substr(0,i)),e[gt]=k(t.substr(i)),f(n).bigHour=!0}),ft("hmmss",function(t,e,n){var i=t.length-4,r=t.length-2;e[vt]=k(t.substr(0,i)),e[gt]=k(t.substr(i,2)),e[bt]=k(t.substr(r)),f(n).bigHour=!0}),ft("Hmm",function(t,e,n){var i=t.length-2;e[vt]=k(t.substr(0,i)),e[gt]=k(t.substr(i))}),ft("Hmmss",function(t,e,n){var i=t.length-4,r=t.length-2;e[vt]=k(t.substr(0,i)),e[gt]=k(t.substr(i,2)),e[bt]=k(t.substr(r))});var ee,ne=At("Hours",!0),ie={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:jt,monthsShort:Ft,week:{dow:0,doy:6},weekdays:Gt,weekdaysMin:Ht,weekdaysShort:Vt,meridiemParse:/[ap]\.?m?\.?/i},re={},oe={};function se(t){return t?t.toLowerCase().replace("_","-"):t}function ae(e){var n=null;if(!re[e]&&void 0!==t&&t&&t.exports)try{n=ee._abbr,function(){var t=new Error('Cannot find module "undefined"');throw t.code="MODULE_NOT_FOUND",t}(),ue(n)}catch(e){}return re[e]}function ue(t,e){var n;return t&&((n=s(e)?ce(t):le(t,e))?ee=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),ee._abbr}function le(t,e){if(null!==e){var n,i=ie;if(e.abbr=t,null!=re[t])A("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=re[t]._config;else if(null!=e.parentLocale)if(null!=re[e.parentLocale])i=re[e.parentLocale]._config;else{if(null==(n=ae(e.parentLocale)))return oe[e.parentLocale]||(oe[e.parentLocale]=[]),oe[e.parentLocale].push({name:t,config:e}),null;i=n._config}return re[t]=new M(C(i,e)),oe[t]&&oe[t].forEach(function(t){le(t.name,t.config)}),ue(t),re[t]}return delete re[t],null}function ce(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return ee;if(!r(t)){if(e=ae(t))return e;t=[t]}return function(t){for(var e,n,i,r,o=0;o<t.length;){for(e=(r=se(t[o]).split("-")).length,n=(n=se(t[o+1]))?n.split("-"):null;0<e;){if(i=ae(r.slice(0,e).join("-")))return i;if(n&&n.length>=e&&S(r,n,!0)>=e-1)break;e--}o++}return ee}(t)}function he(t){var e,n=t._a;return n&&-2===f(t).overflow&&(e=n[mt]<0||11<n[mt]?mt:n[_t]<1||n[_t]>Mt(n[yt],n[mt])?_t:n[vt]<0||24<n[vt]||24===n[vt]&&(0!==n[gt]||0!==n[bt]||0!==n[wt])?vt:n[gt]<0||59<n[gt]?gt:n[bt]<0||59<n[bt]?bt:n[wt]<0||999<n[wt]?wt:-1,f(t)._overflowDayOfYear&&(e<yt||_t<e)&&(e=_t),f(t)._overflowWeeks&&-1===e&&(e=kt),f(t)._overflowWeekday&&-1===e&&(e=St),f(t).overflow=e),t}function pe(t,e,n){return null!=t?t:null!=e?e:n}function fe(t){var e,n,r,o,s,a=[];if(!t._d){var u,l;for(u=t,l=new Date(i.now()),r=u._useUTC?[l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()]:[l.getFullYear(),l.getMonth(),l.getDate()],t._w&&null==t._a[_t]&&null==t._a[mt]&&function(t){var e,n,i,r,o,s,a,u;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)o=1,s=4,n=pe(e.GG,t._a[yt],Yt(Pe(),1,4).year),i=pe(e.W,1),((r=pe(e.E,1))<1||7<r)&&(u=!0);else{o=t._locale._week.dow,s=t._locale._week.doy;var l=Yt(Pe(),o,s);n=pe(e.gg,t._a[yt],l.year),i=pe(e.w,l.week),null!=e.d?((r=e.d)<0||6<r)&&(u=!0):null!=e.e?(r=e.e+o,(e.e<0||6<e.e)&&(u=!0)):r=o}i<1||i>Wt(n,o,s)?f(t)._overflowWeeks=!0:null!=u?f(t)._overflowWeekday=!0:(a=zt(n,i,r,o,s),t._a[yt]=a.year,t._dayOfYear=a.dayOfYear)}(t),null!=t._dayOfYear&&(s=pe(t._a[yt],r[yt]),(t._dayOfYear>Tt(s)||0===t._dayOfYear)&&(f(t)._overflowDayOfYear=!0),n=Bt(s,0,t._dayOfYear),t._a[mt]=n.getUTCMonth(),t._a[_t]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=a[e]=r[e];for(;e<7;e++)t._a[e]=a[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[vt]&&0===t._a[gt]&&0===t._a[bt]&&0===t._a[wt]&&(t._nextDay=!0,t._a[vt]=0),t._d=(t._useUTC?Bt:function(t,e,n,i,r,o,s){var a=new Date(t,e,n,i,r,o,s);return t<100&&0<=t&&isFinite(a.getFullYear())&&a.setFullYear(t),a}).apply(null,a),o=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[vt]=24),t._w&&void 0!==t._w.d&&t._w.d!==o&&(f(t).weekdayMismatch=!0)}}var de=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ye=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,me=/Z|[+-]\d\d(?::?\d\d)?/,_e=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],ve=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],ge=/^\/?Date\((\-?\d+)/i;function be(t){var e,n,i,r,o,s,a=t._i,u=de.exec(a)||ye.exec(a);if(u){for(f(t).iso=!0,e=0,n=_e.length;e<n;e++)if(_e[e][1].exec(u[1])){r=_e[e][0],i=!1!==_e[e][2];break}if(null==r)return void(t._isValid=!1);if(u[3]){for(e=0,n=ve.length;e<n;e++)if(ve[e][1].exec(u[3])){o=(u[2]||" ")+ve[e][0];break}if(null==o)return void(t._isValid=!1)}if(!i&&null!=o)return void(t._isValid=!1);if(u[4]){if(!me.exec(u[4]))return void(t._isValid=!1);s="Z"}t._f=r+(o||"")+(s||""),Te(t)}else t._isValid=!1}var we=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,ke={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Se(t){var e,n,i,r=we.exec(t._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim());if(r){var o=function(t,e,n,i,r,o){var s=[function(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}(t),Ft.indexOf(e),parseInt(n,10),parseInt(i,10),parseInt(r,10)];return o&&s.push(parseInt(o,10)),s}(r[4],r[3],r[2],r[5],r[6],r[7]);if(e=r[1],n=o,i=t,e&&Vt.indexOf(e)!==new Date(n[0],n[1],n[2]).getDay()&&(f(i).weekdayMismatch=!0,!(i._isValid=!1)))return;t._a=o,t._tzm=function(t,e,n){if(t)return ke[t];if(e)return 0;var i=parseInt(n,10),r=i%100;return(i-r)/100*60+r}(r[8],r[9],r[10]),t._d=Bt.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),f(t).rfc2822=!0}else t._isValid=!1}function Te(t){if(t._f!==i.ISO_8601)if(t._f!==i.RFC_2822){t._a=[],f(t).empty=!0;var e,n,r,o,s,a,u,l,h=""+t._i,p=h.length,d=0;for(r=G(t._f,t._locale).match(I)||[],e=0;e<r.length;e++)o=r[e],(n=(h.match(ct(o,t))||[])[0])&&(0<(s=h.substr(0,h.indexOf(n))).length&&f(t).unusedInput.push(s),h=h.slice(h.indexOf(n)+n.length),d+=n.length),z[o]?(n?f(t).empty=!1:f(t).unusedTokens.push(o),a=o,l=t,null!=(u=n)&&c(pt,a)&&pt[a](u,l._a,l,a)):t._strict&&!n&&f(t).unusedTokens.push(o);f(t).charsLeftOver=p-d,0<h.length&&f(t).unusedInput.push(h),t._a[vt]<=12&&!0===f(t).bigHour&&0<t._a[vt]&&(f(t).bigHour=void 0),f(t).parsedDateParts=t._a.slice(0),f(t).meridiem=t._meridiem,t._a[vt]=function(t,e,n){var i;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):(null!=t.isPM&&((i=t.isPM(n))&&e<12&&(e+=12),i||12!==e||(e=0)),e)}(t._locale,t._a[vt],t._meridiem),fe(t),he(t)}else Se(t);else be(t)}function xe(t){var e,n,c,p,m=t._i,v=t._f;return t._locale=t._locale||ce(t._l),null===m||void 0===v&&""===m?y({nullInput:!0}):("string"==typeof m&&(t._i=m=t._locale.preparse(m)),b(m)?new g(he(m)):(u(m)?t._d=m:r(v)?function(t){var e,n,i,r,o;if(0===t._f.length)return f(t).invalidFormat=!0,t._d=new Date(NaN);for(r=0;r<t._f.length;r++)o=0,e=_({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[r],Te(e),d(e)&&(o+=f(e).charsLeftOver,o+=10*f(e).unusedTokens.length,f(e).score=o,(null==i||o<i)&&(i=o,n=e));h(t,n||e)}(t):v?Te(t):s(n=(e=t)._i)?e._d=new Date(i.now()):u(n)?e._d=new Date(n.valueOf()):"string"==typeof n?(c=e,null===(p=ge.exec(c._i))?(be(c),!1===c._isValid&&(delete c._isValid,Se(c),!1===c._isValid&&(delete c._isValid,i.createFromInputFallback(c)))):c._d=new Date(+p[1])):r(n)?(e._a=l(n.slice(0),function(t){return parseInt(t,10)}),fe(e)):o(n)?function(t){if(!t._d){var e=N(t._i);t._a=l([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),fe(t)}}(e):a(n)?e._d=new Date(n):i.createFromInputFallback(e),d(t)||(t._d=null),t))}function Oe(t,e,n,i,s){var a,u={};return!0!==n&&!1!==n||(i=n,n=void 0),(o(t)&&function(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}(t)||r(t)&&0===t.length)&&(t=void 0),u._isAMomentObject=!0,u._useUTC=u._isUTC=s,u._l=n,u._i=t,u._f=e,u._strict=i,(a=new g(he(xe(u))))._nextDay&&(a.add(1,"d"),a._nextDay=void 0),a}function Pe(t,e,n,i){return Oe(t,e,n,i,!1)}i.createFromInputFallback=x("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),i.ISO_8601=function(){},i.RFC_2822=function(){};var Ae=x("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Pe.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:y()}),Ee=x("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Pe.apply(null,arguments);return this.isValid()&&t.isValid()?this<t?this:t:y()});function Ce(t,e){var n,i;if(1===e.length&&r(e[0])&&(e=e[0]),!e.length)return Pe();for(n=e[0],i=1;i<e.length;++i)e[i].isValid()&&!e[i][t](n)||(n=e[i]);return n}var Me=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Re(t){var e=N(t),n=e.year||0,i=e.quarter||0,r=e.month||0,o=e.week||0,s=e.day||0,a=e.hour||0,u=e.minute||0,l=e.second||0,c=e.millisecond||0;this._isValid=function(t){for(var e in t)if(-1===Ot.call(Me,e)||null!=t[e]&&isNaN(t[e]))return!1;for(var n=!1,i=0;i<Me.length;++i)if(t[Me[i]]){if(n)return!1;parseFloat(t[Me[i]])!==k(t[Me[i]])&&(n=!0)}return!0}(e),this._milliseconds=+c+1e3*l+6e4*u+1e3*a*60*60,this._days=+s+7*o,this._months=+r+3*i+12*n,this._data={},this._locale=ce(),this._bubble()}function je(t){return t instanceof Re}function Fe(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Ne(t,e){Y(t,0,0,function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+q(~~(t/60),2)+e+q(~~t%60,2)})}Ne("Z",":"),Ne("ZZ",""),lt("Z",st),lt("ZZ",st),ft(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=De(st,t)});var Le=/([\+\-]|\d\d)/gi;function De(t,e){var n=(e||"").match(t);if(null===n)return null;var i=((n[n.length-1]||[])+"").match(Le)||["-",0,0],r=60*i[1]+k(i[2]);return 0===r?0:"+"===i[0]?r:-r}function qe(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(b(t)||u(t)?t.valueOf():Pe(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),i.updateOffset(n,!1),n):Pe(t).local()}function Ie(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Be(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Ue=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,ze=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ye(t,e){var n,i,r,o=t,s=null;return je(t)?o={ms:t._milliseconds,d:t._days,M:t._months}:a(t)?(o={},e?o[e]=t:o.milliseconds=t):(s=Ue.exec(t))?(n="-"===s[1]?-1:1,o={y:0,d:k(s[_t])*n,h:k(s[vt])*n,m:k(s[gt])*n,s:k(s[bt])*n,ms:k(Fe(1e3*s[wt]))*n}):(s=ze.exec(t))?(n="-"===s[1]?-1:(s[1],1),o={y:We(s[2],n),M:We(s[3],n),w:We(s[4],n),d:We(s[5],n),h:We(s[6],n),m:We(s[7],n),s:We(s[8],n)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(r=function(t,e){var n;return t.isValid()&&e.isValid()?(e=qe(e,t),t.isBefore(e)?n=Ge(t,e):((n=Ge(e,t)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}(Pe(o.from),Pe(o.to)),(o={}).ms=r.milliseconds,o.M=r.months),i=new Re(o),je(t)&&c(t,"_locale")&&(i._locale=t._locale),i}function We(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Ge(t,e){var n={milliseconds:0,months:0};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Ve(t,e){return function(n,i){var r;return null===i||isNaN(+i)||(A(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),r=n,n=i,i=r),He(this,Ye(n="string"==typeof n?+n:n,i),t),this}}function He(t,e,n,r){var o=e._milliseconds,s=Fe(e._days),a=Fe(e._months);t.isValid()&&(r=null==r||r,a&&Nt(t,Et(t,"Month")+a*n),s&&Ct(t,"Date",Et(t,"Date")+s*n),o&&t._d.setTime(t._d.valueOf()+o*n),r&&i.updateOffset(t,s||a))}Ye.fn=Re.prototype,Ye.invalid=function(){return Ye(NaN)};var Ze=Ve(1,"add"),Qe=Ve(-1,"subtract");function Ke(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),i=t.clone().add(n,"months");return-(n+(e-i<0?(e-i)/(i-t.clone().add(n-1,"months")):(e-i)/(t.clone().add(n+1,"months")-i)))||0}function Xe(t){var e;return void 0===t?this._locale._abbr:(null!=(e=ce(t))&&(this._locale=e),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var $e=x("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});function Je(){return this._locale}function tn(t,e){Y(0,[t,t.length],0,e)}function en(t,e,n,i,r){var o;return null==t?Yt(this,i,r).year:((o=Wt(t,i,r))<e&&(e=o),function(t,e,n,i,r){var o=zt(t,e,n,i,r),s=Bt(o.year,0,o.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}.call(this,t,e,n,i,r))}Y(0,["gg",2],0,function(){return this.weekYear()%100}),Y(0,["GG",2],0,function(){return this.isoWeekYear()%100}),tn("gggg","weekYear"),tn("ggggg","weekYear"),tn("GGGG","isoWeekYear"),tn("GGGGG","isoWeekYear"),j("weekYear","gg"),j("isoWeekYear","GG"),D("weekYear",1),D("isoWeekYear",1),lt("G",rt),lt("g",rt),lt("GG",X,H),lt("gg",X,H),lt("GGGG",et,Q),lt("gggg",et,Q),lt("GGGGG",nt,K),lt("ggggg",nt,K),dt(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,i){e[i.substr(0,2)]=k(t)}),dt(["gg","GG"],function(t,e,n,r){e[r]=i.parseTwoDigitYear(t)}),Y("Q",0,"Qo","quarter"),j("quarter","Q"),D("quarter",7),lt("Q",V),ft("Q",function(t,e){e[mt]=3*(k(t)-1)}),Y("D",["DD",2],"Do","date"),j("date","D"),D("date",9),lt("D",X),lt("DD",X,H),lt("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),ft(["D","DD"],_t),ft("Do",function(t,e){e[_t]=k(t.match(X)[0])});var nn=At("Date",!0);Y("DDD",["DDDD",3],"DDDo","dayOfYear"),j("dayOfYear","DDD"),D("dayOfYear",4),lt("DDD",tt),lt("DDDD",Z),ft(["DDD","DDDD"],function(t,e,n){n._dayOfYear=k(t)}),Y("m",["mm",2],0,"minute"),j("minute","m"),D("minute",14),lt("m",X),lt("mm",X,H),ft(["m","mm"],gt);var rn=At("Minutes",!1);Y("s",["ss",2],0,"second"),j("second","s"),D("second",15),lt("s",X),lt("ss",X,H),ft(["s","ss"],bt);var on,sn=At("Seconds",!1);for(Y("S",0,0,function(){return~~(this.millisecond()/100)}),Y(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Y(0,["SSS",3],0,"millisecond"),Y(0,["SSSS",4],0,function(){return 10*this.millisecond()}),Y(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),Y(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),Y(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),Y(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),Y(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),j("millisecond","ms"),D("millisecond",16),lt("S",tt,V),lt("SS",tt,H),lt("SSS",tt,Z),on="SSSS";on.length<=9;on+="S")lt(on,it);function an(t,e){e[wt]=k(1e3*("0."+t))}for(on="S";on.length<=9;on+="S")ft(on,an);var un=At("Milliseconds",!1);Y("z",0,0,"zoneAbbr"),Y("zz",0,0,"zoneName");var ln=g.prototype;function cn(t){return t}ln.add=Ze,ln.calendar=function(t,e){var n=t||Pe(),r=qe(n,this).startOf("day"),o=i.calendarFormat(this,r)||"sameElse",s=e&&(E(e[o])?e[o].call(this,n):e[o]);return this.format(s||this.localeData().calendar(o,this,Pe(n)))},ln.clone=function(){return new g(this)},ln.diff=function(t,e,n){var i,r,o;if(!this.isValid())return NaN;if(!(i=qe(t,this)).isValid())return NaN;switch(r=6e4*(i.utcOffset()-this.utcOffset()),e=F(e)){case"year":o=Ke(this,i)/12;break;case"month":o=Ke(this,i);break;case"quarter":o=Ke(this,i)/3;break;case"second":o=(this-i)/1e3;break;case"minute":o=(this-i)/6e4;break;case"hour":o=(this-i)/36e5;break;case"day":o=(this-i-r)/864e5;break;case"week":o=(this-i-r)/6048e5;break;default:o=this-i}return n?o:w(o)},ln.endOf=function(t){return void 0===(t=F(t))||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))},ln.format=function(t){t||(t=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var e=W(this,t);return this.localeData().postformat(e)},ln.from=function(t,e){return this.isValid()&&(b(t)&&t.isValid()||Pe(t).isValid())?Ye({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},ln.fromNow=function(t){return this.from(Pe(),t)},ln.to=function(t,e){return this.isValid()&&(b(t)&&t.isValid()||Pe(t).isValid())?Ye({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},ln.toNow=function(t){return this.to(Pe(),t)},ln.get=function(t){return E(this[t=F(t)])?this[t]():this},ln.invalidAt=function(){return f(this).overflow},ln.isAfter=function(t,e){var n=b(t)?t:Pe(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=F(s(e)?"millisecond":e))?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())},ln.isBefore=function(t,e){var n=b(t)?t:Pe(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=F(s(e)?"millisecond":e))?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())},ln.isBetween=function(t,e,n,i){return("("===(i=i||"()")[0]?this.isAfter(t,n):!this.isBefore(t,n))&&(")"===i[1]?this.isBefore(e,n):!this.isAfter(e,n))},ln.isSame=function(t,e){var n,i=b(t)?t:Pe(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=F(e||"millisecond"))?this.valueOf()===i.valueOf():(n=i.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))},ln.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},ln.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},ln.isValid=function(){return d(this)},ln.lang=$e,ln.locale=Xe,ln.localeData=Je,ln.max=Ee,ln.min=Ae,ln.parsingFlags=function(){return h({},f(this))},ln.set=function(t,e){if("object"==typeof t)for(var n=function(t){var e=[];for(var n in t)e.push({unit:n,priority:L[n]});return e.sort(function(t,e){return t.priority-e.priority}),e}(t=N(t)),i=0;i<n.length;i++)this[n[i].unit](t[n[i].unit]);else if(E(this[t=F(t)]))return this[t](e);return this},ln.startOf=function(t){switch(t=F(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this},ln.subtract=Qe,ln.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},ln.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},ln.toDate=function(){return new Date(this.valueOf())},ln.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,n=e?this.clone().utc():this;return n.year()<0||9999<n.year()?W(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):E(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",W(n,"Z")):W(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},ln.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var n="["+t+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r=e+'[")]';return this.format(n+i+"-MM-DD[T]HH:mm:ss.SSS"+r)},ln.toJSON=function(){return this.isValid()?this.toISOString():null},ln.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},ln.unix=function(){return Math.floor(this.valueOf()/1e3)},ln.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},ln.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},ln.year=Pt,ln.isLeapYear=function(){return xt(this.year())},ln.weekYear=function(t){return en.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},ln.isoWeekYear=function(t){return en.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},ln.quarter=ln.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},ln.month=Lt,ln.daysInMonth=function(){return Mt(this.year(),this.month())},ln.week=ln.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},ln.isoWeek=ln.isoWeeks=function(t){var e=Yt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},ln.weeksInYear=function(){var t=this.localeData()._week;return Wt(this.year(),t.dow,t.doy)},ln.isoWeeksInYear=function(){return Wt(this.year(),1,4)},ln.date=nn,ln.day=ln.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e,n,i=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(e=t,n=this.localeData(),t="string"!=typeof e?e:isNaN(e)?"number"==typeof(e=n.weekdaysParse(e))?e:null:parseInt(e,10),this.add(t-i,"d")):i},ln.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},ln.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=(n=t,i=this.localeData(),"string"==typeof n?i.weekdaysParse(n)%7||7:isNaN(n)?null:n);return this.day(this.day()%7?e:e-7)}return this.day()||7;var n,i},ln.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},ln.hour=ln.hours=ne,ln.minute=ln.minutes=rn,ln.second=ln.seconds=sn,ln.millisecond=ln.milliseconds=un,ln.utcOffset=function(t,e,n){var r,o=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=De(st,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(r=Ie(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),o!==t&&(!e||this._changeInProgress?He(this,Ye(t-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:Ie(this)},ln.utc=function(t){return this.utcOffset(0,t)},ln.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Ie(this),"m")),this},ln.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=De(ot,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},ln.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?Pe(t).utcOffset():0,(this.utcOffset()-t)%60==0)},ln.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},ln.isLocal=function(){return!!this.isValid()&&!this._isUTC},ln.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},ln.isUtc=Be,ln.isUTC=Be,ln.zoneAbbr=function(){return this._isUTC?"UTC":""},ln.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},ln.dates=x("dates accessor is deprecated. Use date instead.",nn),ln.months=x("months accessor is deprecated. Use month instead",Lt),ln.years=x("years accessor is deprecated. Use year instead",Pt),ln.zone=x("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}),ln.isDSTShifted=x("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var t={};if(_(t,this),(t=xe(t))._a){var e=t._isUTC?p(t._a):Pe(t._a);this._isDSTShifted=this.isValid()&&0<S(t._a,e.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted});var hn=M.prototype;function pn(t,e,n,i){var r=ce(),o=p().set(i,e);return r[n](o,t)}function fn(t,e,n){if(a(t)&&(e=t,t=void 0),t=t||"",null!=e)return pn(t,e,n,"month");var i,r=[];for(i=0;i<12;i++)r[i]=pn(t,i,n,"month");return r}function dn(t,e,n,i){"boolean"==typeof t?a(e)&&(n=e,e=void 0):(e=t,t=!1,a(n=e)&&(n=e,e=void 0)),e=e||"";var r,o=ce(),s=t?o._week.dow:0;if(null!=n)return pn(e,(n+s)%7,i,"day");var u=[];for(r=0;r<7;r++)u[r]=pn(e,(r+s)%7,i,"day");return u}hn.calendar=function(t,e,n){var i=this._calendar[t]||this._calendar.sameElse;return E(i)?i.call(e,n):i},hn.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])},hn.invalidDate=function(){return this._invalidDate},hn.ordinal=function(t){return this._ordinal.replace("%d",t)},hn.preparse=cn,hn.postformat=cn,hn.relativeTime=function(t,e,n,i){var r=this._relativeTime[n];return E(r)?r(t,e,n,i):r.replace(/%d/i,t)},hn.pastFuture=function(t,e){var n=this._relativeTime[0<t?"future":"past"];return E(n)?n(e):n.replace(/%s/i,e)},hn.set=function(t){var e,n;for(n in t)E(e=t[n])?this[n]=e:this["_"+n]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},hn.months=function(t,e){return t?r(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Rt).test(e)?"format":"standalone"][t.month()]:r(this._months)?this._months:this._months.standalone},hn.monthsShort=function(t,e){return t?r(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Rt.test(e)?"format":"standalone"][t.month()]:r(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},hn.monthsParse=function(t,e,n){var i,r,o;if(this._monthsParseExact)return function(t,e,n){var i,r,o,s=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)o=p([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===e?-1!==(r=Ot.call(this._shortMonthsParse,s))?r:null:-1!==(r=Ot.call(this._longMonthsParse,s))?r:null:"MMM"===e?-1!==(r=Ot.call(this._shortMonthsParse,s))?r:-1!==(r=Ot.call(this._longMonthsParse,s))?r:null:-1!==(r=Ot.call(this._longMonthsParse,s))?r:-1!==(r=Ot.call(this._shortMonthsParse,s))?r:null}.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(r=p([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(o="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[i]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[i].test(t))return i;if(n&&"MMM"===e&&this._shortMonthsParse[i].test(t))return i;if(!n&&this._monthsParse[i].test(t))return i}},hn.monthsRegex=function(t){return this._monthsParseExact?(c(this,"_monthsRegex")||It.call(this),t?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=qt),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},hn.monthsShortRegex=function(t){return this._monthsParseExact?(c(this,"_monthsRegex")||It.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=Dt),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},hn.week=function(t){return Yt(t,this._week.dow,this._week.doy).week},hn.firstDayOfYear=function(){return this._week.doy},hn.firstDayOfWeek=function(){return this._week.dow},hn.weekdays=function(t,e){return t?r(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]:r(this._weekdays)?this._weekdays:this._weekdays.standalone},hn.weekdaysMin=function(t){return t?this._weekdaysMin[t.day()]:this._weekdaysMin},hn.weekdaysShort=function(t){return t?this._weekdaysShort[t.day()]:this._weekdaysShort},hn.weekdaysParse=function(t,e,n){var i,r,o;if(this._weekdaysParseExact)return function(t,e,n){var i,r,o,s=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)o=p([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(r=Ot.call(this._weekdaysParse,s))?r:null:"ddd"===e?-1!==(r=Ot.call(this._shortWeekdaysParse,s))?r:null:-1!==(r=Ot.call(this._minWeekdaysParse,s))?r:null:"dddd"===e?-1!==(r=Ot.call(this._weekdaysParse,s))?r:-1!==(r=Ot.call(this._shortWeekdaysParse,s))?r:-1!==(r=Ot.call(this._minWeekdaysParse,s))?r:null:"ddd"===e?-1!==(r=Ot.call(this._shortWeekdaysParse,s))?r:-1!==(r=Ot.call(this._weekdaysParse,s))?r:-1!==(r=Ot.call(this._minWeekdaysParse,s))?r:null:-1!==(r=Ot.call(this._minWeekdaysParse,s))?r:-1!==(r=Ot.call(this._weekdaysParse,s))?r:-1!==(r=Ot.call(this._shortWeekdaysParse,s))?r:null}.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(r=p([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(r,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(r,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(r,"").replace(".",".?")+"$","i")),this._weekdaysParse[i]||(o="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[i].test(t))return i;if(n&&"ddd"===e&&this._shortWeekdaysParse[i].test(t))return i;if(n&&"dd"===e&&this._minWeekdaysParse[i].test(t))return i;if(!n&&this._weekdaysParse[i].test(t))return i}},hn.weekdaysRegex=function(t){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Xt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=Zt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},hn.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Xt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Qt),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},hn.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Xt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Kt),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},hn.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},hn.meridiem=function(t,e,n){return 11<t?n?"pm":"PM":n?"am":"AM"},ue("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===k(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),i.lang=x("moment.lang is deprecated. Use moment.locale instead.",ue),i.langData=x("moment.langData is deprecated. Use moment.localeData instead.",ce);var yn=Math.abs;function mn(t,e,n,i){var r=Ye(e,n);return t._milliseconds+=i*r._milliseconds,t._days+=i*r._days,t._months+=i*r._months,t._bubble()}function _n(t){return t<0?Math.floor(t):Math.ceil(t)}function vn(t){return 4800*t/146097}function gn(t){return 146097*t/4800}function bn(t){return function(){return this.as(t)}}var wn=bn("ms"),kn=bn("s"),Sn=bn("m"),Tn=bn("h"),xn=bn("d"),On=bn("w"),Pn=bn("M"),An=bn("y");function En(t){return function(){return this.isValid()?this._data[t]:NaN}}var Cn=En("milliseconds"),Mn=En("seconds"),Rn=En("minutes"),jn=En("hours"),Fn=En("days"),Nn=En("months"),Ln=En("years"),Dn=Math.round,qn={ss:44,s:45,m:45,h:22,d:26,M:11},In=Math.abs;function Bn(t){return(0<t)-(t<0)||+t}function Un(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n=In(this._milliseconds)/1e3,i=In(this._days),r=In(this._months);e=w((t=w(n/60))/60),n%=60,t%=60;var o=w(r/12),s=r%=12,a=i,u=e,l=t,c=n?n.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var p=h<0?"-":"",f=Bn(this._months)!==Bn(h)?"-":"",d=Bn(this._days)!==Bn(h)?"-":"",y=Bn(this._milliseconds)!==Bn(h)?"-":"";return p+"P"+(o?f+o+"Y":"")+(s?f+s+"M":"")+(a?d+a+"D":"")+(u||l||c?"T":"")+(u?y+u+"H":"")+(l?y+l+"M":"")+(c?y+c+"S":"")}var zn=Re.prototype;return zn.isValid=function(){return this._isValid},zn.abs=function(){var t=this._data;return this._milliseconds=yn(this._milliseconds),this._days=yn(this._days),this._months=yn(this._months),t.milliseconds=yn(t.milliseconds),t.seconds=yn(t.seconds),t.minutes=yn(t.minutes),t.hours=yn(t.hours),t.months=yn(t.months),t.years=yn(t.years),this},zn.add=function(t,e){return mn(this,t,e,1)},zn.subtract=function(t,e){return mn(this,t,e,-1)},zn.as=function(t){if(!this.isValid())return NaN;var e,n,i=this._milliseconds;if("month"===(t=F(t))||"year"===t)return e=this._days+i/864e5,n=this._months+vn(e),"month"===t?n:n/12;switch(e=this._days+Math.round(gn(this._months)),t){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return 24*e+i/36e5;case"minute":return 1440*e+i/6e4;case"second":return 86400*e+i/1e3;case"millisecond":return Math.floor(864e5*e)+i;default:throw new Error("Unknown unit "+t)}},zn.asMilliseconds=wn,zn.asSeconds=kn,zn.asMinutes=Sn,zn.asHours=Tn,zn.asDays=xn,zn.asWeeks=On,zn.asMonths=Pn,zn.asYears=An,zn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},zn._bubble=function(){var t,e,n,i,r,o=this._milliseconds,s=this._days,a=this._months,u=this._data;return 0<=o&&0<=s&&0<=a||o<=0&&s<=0&&a<=0||(o+=864e5*_n(gn(a)+s),a=s=0),u.milliseconds=o%1e3,t=w(o/1e3),u.seconds=t%60,e=w(t/60),u.minutes=e%60,n=w(e/60),u.hours=n%24,a+=r=w(vn(s+=w(n/24))),s-=_n(gn(r)),i=w(a/12),a%=12,u.days=s,u.months=a,u.years=i,this},zn.clone=function(){return Ye(this)},zn.get=function(t){return t=F(t),this.isValid()?this[t+"s"]():NaN},zn.milliseconds=Cn,zn.seconds=Mn,zn.minutes=Rn,zn.hours=jn,zn.days=Fn,zn.weeks=function(){return w(this.days()/7)},zn.months=Nn,zn.years=Ln,zn.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e,n,i,r,o,s,a,u,l,c,h=this.localeData(),p=(e=!t,n=h,i=Ye(this).abs(),r=Dn(i.as("s")),o=Dn(i.as("m")),s=Dn(i.as("h")),a=Dn(i.as("d")),u=Dn(i.as("M")),l=Dn(i.as("y")),(c=r<=qn.ss&&["s",r]||r<qn.s&&["ss",r]||o<=1&&["m"]||o<qn.m&&["mm",o]||s<=1&&["h"]||s<qn.h&&["hh",s]||a<=1&&["d"]||a<qn.d&&["dd",a]||u<=1&&["M"]||u<qn.M&&["MM",u]||l<=1&&["y"]||["yy",l])[2]=e,c[3]=0<+this,c[4]=n,function(t,e,n,i,r){return r.relativeTime(e||1,!!n,t,i)}.apply(null,c));return t&&(p=h.pastFuture(+this,p)),h.postformat(p)},zn.toISOString=Un,zn.toString=Un,zn.toJSON=Un,zn.locale=Xe,zn.localeData=Je,zn.toIsoString=x("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Un),zn.lang=$e,Y("X",0,0,"unix"),Y("x",0,0,"valueOf"),lt("x",rt),lt("X",/[+-]?\d+(\.\d{1,3})?/),ft("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),ft("x",function(t,e,n){n._d=new Date(k(t))}),i.version="2.22.1",e=Pe,i.fn=ln,i.min=function(){return Ce("isBefore",[].slice.call(arguments,0))},i.max=function(){return Ce("isAfter",[].slice.call(arguments,0))},i.now=function(){return Date.now?Date.now():+new Date},i.utc=p,i.unix=function(t){return Pe(1e3*t)},i.months=function(t,e){return fn(t,e,"months")},i.isDate=u,i.locale=ue,i.invalid=y,i.duration=Ye,i.isMoment=b,i.weekdays=function(t,e,n){return dn(t,e,n,"weekdays")},i.parseZone=function(){return Pe.apply(null,arguments).parseZone()},i.localeData=ce,i.isDuration=je,i.monthsShort=function(t,e){return fn(t,e,"monthsShort")},i.weekdaysMin=function(t,e,n){return dn(t,e,n,"weekdaysMin")},i.defineLocale=le,i.updateLocale=function(t,e){if(null!=e){var n,i,r=ie;null!=(i=ae(t))&&(r=i._config),(n=new M(e=C(r,e))).parentLocale=re[t],re[t]=n,ue(t)}else null!=re[t]&&(null!=re[t].parentLocale?re[t]=re[t].parentLocale:null!=re[t]&&delete re[t]);return re[t]},i.locales=function(){return O(re)},i.weekdaysShort=function(t,e,n){return dn(t,e,n,"weekdaysShort")},i.normalizeUnits=F,i.relativeTimeRounding=function(t){return void 0===t?Dn:"function"==typeof t&&(Dn=t,!0)},i.relativeTimeThreshold=function(t,e){return void 0!==qn[t]&&(void 0===e?qn[t]:(qn[t]=e,"s"===t&&(qn.ss=e-1),!0))},i.calendarFormat=function(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},i.prototype=ln,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},i}()}).call(this,n(276)(t))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.import_files=e.load_loss=e.load_graph=e.load_directories=void 0;var i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=c(n(17)),o=(c(n(14)),c(n(6))),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(43)),a=c(n(8)),u=c(n(5)),l=c(n(64));function c(t){return t&&t.__esModule?t:{default:t}}e.load_directories=function(t){return function(e){var n=l.default.name;u.default.allProgress([s.load(n),a.default.socket.list_directory({module:n,dir:"datasets"}),a.default.socket.list_directory({module:n,dir:"results"}),a.default.socket.list_directory({module:n,dir:"output"}),a.default.socket.disk_usage({module:n,dir:"datasets"}),h()(e)],function(t,n,i){e({type:o.default.app.load_progress,progress:{i:n,n:i},data:{module:"samplernn"}})}).then(function(t){var a=i(t,6),u=a[0],l=a[1],c=a[2],h=a[3],p=a[4],f=a[5],d=u.folderLookup,y=u.fileLookup,m=u.datasetLookup,_=u.folders,v=u.files,g=u.unsortedFolder;console.log(p);var b=l.filter(function(t){return t.name.match(/(wav|aiff?|flac|mp3)$/)&&!t.dir});l.filter(function(t){return t.dir}).forEach(function(t){s.getDataset(n,m,t.name,g,t.date).isBuilt=!0}),b.forEach(function(t){t.uuid=(0,r.default)(),y[t.uuid]=t;var e=t.name.split(".")[0],i=s.getDataset(n,m,e,g,t.date);t.persisted=!1,i.input.push(t.uuid)});var w=c.filter(function(t){return t.dir}).map(function(t){var e=t.name.split("-").map(function(t){return t.split(":")}).filter(function(t){return t.length&&t[1]}).reduce(function(t,e){return(t[e[0]]=e[1])&&t},{});e.name=e.name||e.dataset||e.exp,e.date=t.date,e.dir=t,e.persisted=!1;var i=s.getDataset(n,m,e.name,g,e.date),r=f[e.name];return r&&(i.epoch=e.epoch=r.length,e.training_loss=r),i.checkpoints.push(e),e});h.map(function(t){t.uuid=(0,r.default)(),y[t.uuid]=t;var e=t.name.split(".")[0].split("-"),i=s.getDataset(n,m,e[0],g,t.date);t.persisted=!1,t.epoch=parseInt(t.epoch||e[1].replace(/^\D+/,""))||0,i.epoch=Math.max(t.epoch,i.epoch||0),i.output.some(function(e){return y[e].name===t.name&&(y[e].persisted=!0,!0)})||i.output.push(t.uuid)}),e({type:o.default.dataset.load,data:{module:n,folderLookup:d,fileLookup:y,datasetLookup:m,folders:_,files:v,checkpoints:w,output:h}})}).catch(function(t){console.error(t)}),t&&e({type:o.default.dataset.set_folder,data:{folder_id:t,module:n}})}},e.load_graph=function(){return function(t){var e=l.default.name;u.default.allProgress([h()(t),a.default.socket.list_directory({module:e,dir:"results"})],function(e,n,i){t({type:o.default.app.load_progress,progress:{i:n,n:i},data:{module:"samplernn"}})}).then(function(e){var n=i(e,2),r=n[0],s=n[1];t({type:o.default.samplernn.load_graph,lossReport:r,results:s})})}};var h=e.load_loss=function(){return function(t){return a.default.socket.run_script({module:"samplernn",activity:"report"}).then(function(e){var n={};return e.stdout.split("\n\n").filter(function(t){return!!t}).forEach(function(t){var e,i=t.split("\n"),r=(e=i,Array.isArray(e)?e:Array.from(e)),o=r[0],s=r.slice(1);n[o]=s.map(function(t){return t.split("\t").reduce(function(t,e){var n=e.split(": ");return t[n[0]]=n[1],t},{})})}),t({type:o.default.samplernn.load_loss,lossReport:n}),n})}};e.import_files=function(t,e,n){return function(i){var r=t.selected,o=t.folder_id,s=t.url_base,u=t.import_action,l=Object.keys(r).filter(function(t){return r[t]}),c=void 0;switch(u){case"Hotlink":c=l.reduce(function(t,i){return e[i].output.map(function(t){return n[t]}).map(function(t){var e=t.name.split(".").pop();return a.default.file.create({folder_id:o,name:t.name,url:s+t.name,mime:"audio/"+e,epoch:t.epoch,size:t.size,module:"samplernn",dataset:i,activity:"train",datatype:"audio",generated:!0,created_at:new Date(t.date),updated_at:new Date(t.date)})}).concat(t)},[]);break;case"Upload":c=l.reduce(function(t,i){return e[i].input.map(function(t){return n[t]}).map(function(t){if(t.persisted)return null;var e=t.name.split(".").pop();return"wav"!==e&&"flac"!==e?(console.log(t),a.default.socket.upload_file({folder_id:o,module:"samplernn",activity:"train",path:"datasets",filename:t.name,generated:!1,processed:!1,datatype:"audio",ttl:6e4})):void 0}).concat(t)},[]).filter(function(t){return!!t})}return console.log(c),Promise.all(c).then(function(t){console.log(t),window.location.href="/samplernn/datasets/"+o+"/"}).catch(function(t){console.error(t)})}}},function(t,e,n){"use strict";var i=null;i="undefined"!=typeof Promise?Promise:n(187),t.exports={Promise:i}},function(t,e,n){(function(t){function n(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===n(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===n(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===n(t)},e.isError=function(t){return"[object Error]"===n(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=t.isBuffer}).call(this,n(37).Buffer)},function(t,e,n){"use strict";(function(t){
-/*!
- * The buffer module from node.js, for the browser.
+/******/ (function(modules) { // webpackBootstrap
+/******/ 	// The module cache
+/******/ 	var installedModules = {};
+/******/
+/******/ 	// The require function
+/******/ 	function __webpack_require__(moduleId) {
+/******/
+/******/ 		// Check if module is in cache
+/******/ 		if(installedModules[moduleId]) {
+/******/ 			return installedModules[moduleId].exports;
+/******/ 		}
+/******/ 		// Create a new module (and put it into the cache)
+/******/ 		var module = installedModules[moduleId] = {
+/******/ 			i: moduleId,
+/******/ 			l: false,
+/******/ 			exports: {}
+/******/ 		};
+/******/
+/******/ 		// Execute the module function
+/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ 		// Flag the module as loaded
+/******/ 		module.l = true;
+/******/
+/******/ 		// Return the exports of the module
+/******/ 		return module.exports;
+/******/ 	}
+/******/
+/******/
+/******/ 	// expose the modules object (__webpack_modules__)
+/******/ 	__webpack_require__.m = modules;
+/******/
+/******/ 	// expose the module cache
+/******/ 	__webpack_require__.c = installedModules;
+/******/
+/******/ 	// define getter function for harmony exports
+/******/ 	__webpack_require__.d = function(exports, name, getter) {
+/******/ 		if(!__webpack_require__.o(exports, name)) {
+/******/ 			Object.defineProperty(exports, name, {
+/******/ 				configurable: false,
+/******/ 				enumerable: true,
+/******/ 				get: getter
+/******/ 			});
+/******/ 		}
+/******/ 	};
+/******/
+/******/ 	// define __esModule on exports
+/******/ 	__webpack_require__.r = function(exports) {
+/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
+/******/ 	};
+/******/
+/******/ 	// getDefaultExport function for compatibility with non-harmony modules
+/******/ 	__webpack_require__.n = function(module) {
+/******/ 		var getter = module && module.__esModule ?
+/******/ 			function getDefault() { return module['default']; } :
+/******/ 			function getModuleExports() { return module; };
+/******/ 		__webpack_require__.d(getter, 'a', getter);
+/******/ 		return getter;
+/******/ 	};
+/******/
+/******/ 	// Object.prototype.hasOwnProperty.call
+/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
+/******/
+/******/ 	// __webpack_public_path__
+/******/ 	__webpack_require__.p = "";
+/******/
+/******/
+/******/ 	// Load entry module and return exports
+/******/ 	return __webpack_require__(__webpack_require__.s = "./app/client/index.jsx");
+/******/ })
+/************************************************************************/
+/******/ ({
+
+/***/ "./app/client/actions.js":
+/*!*******************************!*\
+  !*** ./app/client/actions.js ***!
+  \*******************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _api = __webpack_require__(/*! ./api */ "./app/client/api/index.js");
+
+var _live = __webpack_require__(/*! ./live/live.actions */ "./app/client/live/live.actions.js");
+
+var liveActions = _interopRequireWildcard(_live);
+
+var _queue = __webpack_require__(/*! ./queue/queue.actions */ "./app/client/queue/queue.actions.js");
+
+var queueActions = _interopRequireWildcard(_queue);
+
+var _system = __webpack_require__(/*! ./system/system.actions */ "./app/client/system/system.actions.js");
+
+var systemActions = _interopRequireWildcard(_system);
+
+var _socket = __webpack_require__(/*! ./socket/socket.actions */ "./app/client/socket/socket.actions.js");
+
+var socketActions = _interopRequireWildcard(_socket);
+
+var _dataset = __webpack_require__(/*! ./dataset/dataset.actions */ "./app/client/dataset/dataset.actions.js");
+
+var datasetActions = _interopRequireWildcard(_dataset);
+
+var _audioPlayer = __webpack_require__(/*! ./common/audioPlayer/audioPlayer.actions */ "./app/client/common/audioPlayer/audioPlayer.actions.js");
+
+var audioPlayerActions = _interopRequireWildcard(_audioPlayer);
+
+var _store = __webpack_require__(/*! ./store */ "./app/client/store.js");
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+exports.default = Object.keys(_api.actions).map(function (a) {
+  return [a, _api.actions[a]];
+}).concat([['live', liveActions], ['queue', queueActions], ['system', systemActions], ['dataset', datasetActions], ['audioPlayer', audioPlayerActions]]).map(function (p) {
+  return [p[0], (0, _redux.bindActionCreators)(p[1], _store.store.dispatch)];
+}).concat([['socket', socketActions]]).reduce(function (a, b) {
+  return (a[b[0]] = b[1]) && a;
+}, {});
+
+/***/ }),
+
+/***/ "./app/client/api/crud.actions.js":
+/*!****************************************!*\
+  !*** ./app/client/api/crud.actions.js ***!
+  \****************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.crud_action = undefined;
+exports.crud_actions = crud_actions;
+
+var _crud = __webpack_require__(/*! ./crud.fetch */ "./app/client/api/crud.fetch.js");
+
+var _crud2 = __webpack_require__(/*! ./crud.types */ "./app/client/api/crud.types.js");
+
+var _crud3 = __webpack_require__(/*! ./crud.upload */ "./app/client/api/crud.upload.js");
+
+function crud_actions(type) {
+  var fetch_type = (0, _crud.crud_fetch)(type);
+  return ['index', 'show', 'create', 'update', 'destroy'].reduce(function (lookup, param) {
+    lookup[param] = crud_action(type, param, function (q) {
+      return fetch_type[param](q);
+    });
+    return lookup;
+  }, {
+    action: function action(method, fn) {
+      return crud_action(type, method, fn);
+    },
+    upload: function upload(id, fd) {
+      return (0, _crud3.upload_action)(type, id, fd);
+    }
+  });
+}
+
+var crud_action = exports.crud_action = function crud_action(type, method, fn) {
+  return function (q) {
+    return function (dispatch) {
+      return new Promise(function (resolve, reject) {
+        dispatch({ type: (0, _crud2.as_type)(type, method + '_loading') });
+        fn(q).then(function (data) {
+          dispatch({ type: (0, _crud2.as_type)(type, method), data: data });
+          resolve(data);
+        }).catch(function (e) {
+          dispatch({ type: (0, _crud2.as_type)(type, method + '_error') });
+          reject(e);
+        });
+      });
+    };
+  };
+};
+
+/***/ }),
+
+/***/ "./app/client/api/crud.fetch.js":
+/*!**************************************!*\
+  !*** ./app/client/api/crud.fetch.js ***!
+  \**************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.destroy = undefined;
+exports.crud_fetch = crud_fetch;
+exports._get_headers = _get_headers;
+exports.post = post;
+exports.postBody = postBody;
+exports.put = put;
+
+var _nodeFetch = __webpack_require__(/*! node-fetch */ "./node_modules/node-fetch/browser.js");
+
+var _nodeFetch2 = _interopRequireDefault(_nodeFetch);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function crud_fetch(type, tag) {
+  var uri = '/api/' + type + '/' + (tag || '');
+  return {
+    index: function index(q) {
+      return (0, _nodeFetch2.default)(_get_url(uri, q), _get_headers()).then(function (req) {
+        return req.json();
+      }).catch(error);
+    },
+
+    show: function show(id) {
+      return (0, _nodeFetch2.default)(uri + id, _get_headers(), _get_headers()).then(function (req) {
+        return req.json();
+      }).catch(error);
+    },
+
+    create: function create(data) {
+      return (0, _nodeFetch2.default)(uri, post(data)).then(function (req) {
+        return req.json();
+      }).catch(error);
+    },
+
+    update: function update(data) {
+      return (0, _nodeFetch2.default)(uri + data.id, put(data)).then(function (req) {
+        return req.json();
+      }).catch(error);
+    },
+
+    destroy: function destroy(data) {
+      return (0, _nodeFetch2.default)(uri + data.id, _destroy(data)).then(function (req) {
+        return req.json();
+      }).catch(error);
+    }
+  };
+}
+
+function _get_url(_url, data) {
+  var url = new URL(window.location.origin + _url);
+  if (data) {
+    Object.keys(data).forEach(function (key) {
+      return url.searchParams.append(key, data[key]);
+    });
+  }
+  return url;
+}
+function _get_headers() {
+  return {
+    method: 'GET',
+    credentials: 'same-origin',
+    headers: {
+      'Accept': 'application/json'
+    }
+  };
+}
+function post(data) {
+  return {
+    method: 'POST',
+    body: JSON.stringify(data),
+    credentials: 'same-origin',
+    headers: {
+      'Accept': 'application/json',
+      'Content-Type': 'application/json'
+    }
+  };
+}
+function postBody(data) {
+  return {
+    method: 'POST',
+    body: data,
+    credentials: 'same-origin',
+    headers: {
+      'Accept': 'application/json'
+    }
+  };
+}
+function put(data) {
+  return {
+    method: 'PUT',
+    body: JSON.stringify(data),
+    credentials: 'same-origin',
+    headers: {
+      'Accept': 'application/json',
+      'Content-Type': 'application/json'
+    }
+  };
+}
+function _destroy(data) {
+  return {
+    method: 'DELETE',
+    body: JSON.stringify(data),
+    credentials: 'same-origin',
+    headers: {
+      'Accept': 'application/json',
+      'Content-Type': 'application/json'
+    }
+  };
+}
+exports.destroy = _destroy;
+function error(err) {
+  console.warn(err);
+}
+
+/***/ }),
+
+/***/ "./app/client/api/crud.types.js":
+/*!**************************************!*\
+  !*** ./app/client/api/crud.types.js ***!
+  \**************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+var as_type = exports.as_type = function as_type(a, b) {
+  return [a, b].join('_').toUpperCase();
+};
+
+var with_type = exports.with_type = function with_type(type, actions) {
+  return actions.reduce(function (a, b) {
+    return (a[b] = as_type(type, b)) && a;
+  }, {});
+};
+
+var crud_type = exports.crud_type = function crud_type(type) {
+  var actions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
+  return with_type(type, actions.concat(['index_loading', 'index', 'index_error', 'show_loading', 'show', 'show_error', 'create_loading', 'create', 'create_error', 'update_loading', 'update', 'update_error', 'destroy_loading', 'destroy', 'destroy_error', 'upload_loading', 'upload_progress', 'upload_waiting', 'upload_complete', 'upload_error', 'sort']));
+};
+
+/***/ }),
+
+/***/ "./app/client/api/crud.upload.js":
+/*!***************************************!*\
+  !*** ./app/client/api/crud.upload.js ***!
+  \***************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.upload_action = undefined;
+exports.crud_upload = crud_upload;
+
+var _crud = __webpack_require__(/*! ./crud.types */ "./app/client/api/crud.types.js");
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+function crud_upload(type, fd, data, dispatch) {
+  return new Promise(function (resolve, reject) {
+    var id = data.id;
+
+    Object.keys(data).forEach(function (key) {
+      if (key !== 'id') {
+        fd.append(key, data[key]);
+      }
+    });
+
+    console.log('/api/' + type + '/' + id + '/upload/');
+
+    var xhr = new XMLHttpRequest();
+    xhr.upload.addEventListener("progress", uploadProgress, false);
+    xhr.addEventListener("load", uploadComplete, false);
+    xhr.addEventListener("error", uploadFailed, false);
+    xhr.addEventListener("abort", uploadCancelled, false);
+    xhr.open("POST", '/api/' + type + '/' + id + '/upload/');
+    xhr.send(fd);
+
+    dispatch && dispatch({ type: (0, _crud.as_type)(type, 'upload_loading') });
+
+    var complete = false;
+
+    function uploadProgress(e) {
+      if (e.lengthComputable) {
+        var percent = Math.round(e.loaded * 100 / e.total) || 0;
+        if (percent > 99) {
+          dispatch && dispatch(_defineProperty({
+            type: (0, _crud.as_type)(type, 'upload_waiting'),
+            percent: percent
+          }, type, id));
+        } else {
+          dispatch && dispatch(_defineProperty({
+            type: (0, _crud.as_type)(type, 'upload_progress'),
+            percent: percent
+          }, type, id));
+        }
+      } else {
+        dispatch && dispatch(_defineProperty({
+          type: (0, _crud.as_type)(type, 'upload_error'),
+          error: 'unable to compute upload progress'
+        }, type, id));
+      }
+    }
+
+    function uploadComplete(e) {
+      var parsed = void 0;
+      try {
+        parsed = JSON.parse(e.target.responseText);
+      } catch (e) {
+        dispatch && dispatch(_defineProperty({
+          type: (0, _crud.as_type)(type, 'upload_error'),
+          error: 'upload failed'
+        }, type, id));
+        reject(e);
+        return;
+      }
+      dispatch && dispatch(_defineProperty({
+        type: (0, _crud.as_type)(type, 'upload_complete'),
+        data: parsed
+      }, type, id));
+      if (parsed.files && parsed.files.length) {
+        parsed.files.forEach(function (file) {
+          console.log(file);
+          dispatch && dispatch({
+            type: (0, _crud.as_type)('file', 'create'),
+            data: file
+          });
+        });
+      }
+      resolve(parsed);
+    }
+
+    function uploadFailed(evt) {
+      dispatch && dispatch(_defineProperty({
+        type: (0, _crud.as_type)(type, 'upload_error'),
+        error: 'upload failed'
+      }, type, id));
+      reject(evt);
+    }
+
+    function uploadCancelled(evt) {
+      dispatch && dispatch(_defineProperty({
+        type: (0, _crud.as_type)(type, 'upload_error'),
+        error: 'upload cancelled'
+      }, type, id));
+      reject(evt);
+    }
+  });
+}
+
+var upload_action = exports.upload_action = function upload_action(type, id, fd) {
+  return function (dispatch) {
+    return crud_upload(type, id, fd, dispatch);
+  };
+};
+
+/***/ }),
+
+/***/ "./app/client/api/index.js":
+/*!*********************************!*\
+  !*** ./app/client/api/index.js ***!
+  \*********************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.actions = exports.parser = exports.util = undefined;
+
+var _crud = __webpack_require__(/*! ./crud.actions */ "./app/client/api/crud.actions.js");
+
+var _util = __webpack_require__(/*! ../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _parser = __webpack_require__(/*! ./parser */ "./app/client/api/parser.js");
+
+var parser = _interopRequireWildcard(_parser);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/*
+for our crud events, create corresponding actions
+the actions fire a 'loading' event, call the underlying api method, and then resolve.
+so you can do ... 
+  import { folderActions } from '../../api'
+  folderActions.index({ module: 'samplernn' })
+  folderActions.show(12)
+  folderActions.create({ module: 'samplernn', name: 'foo' })
+  folderActions.update(12, { module: 'pix2pix' })
+  folderActions.destroy(12, { confirm: true })
+  folderActions.upload(12, form_data)
+*/
+
+exports.util = _util2.default;
+exports.parser = parser;
+var actions = exports.actions = ['folder', 'file', 'dataset', 'task', 'user'].reduce(function (a, b) {
+  return (a[b] = (0, _crud.crud_actions)(b)) && a;
+}, {});
+
+/***/ }),
+
+/***/ "./app/client/api/parser.js":
+/*!**********************************!*\
+  !*** ./app/client/api/parser.js ***!
+  \**********************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.tumblr = exports.thumbnail = exports.loadImage = exports.tag = exports.parse = exports.lookup = exports.integrations = undefined;
+
+var _nodeFetch = __webpack_require__(/*! node-fetch */ "./node_modules/node-fetch/browser.js");
+
+var _nodeFetch2 = _interopRequireDefault(_nodeFetch);
+
+var _fetchJsonp = __webpack_require__(/*! fetch-jsonp */ "./node_modules/fetch-jsonp/build/fetch-jsonp.js");
+
+var _fetchJsonp2 = _interopRequireDefault(_fetchJsonp);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var integrations = exports.integrations = [{
+  type: 'image',
+  regex: /\.(jpeg|jpg|gif|png|svg)(\?.*)?$/i,
+  fetch: function fetch(url, done) {
+    var img = new Image();
+    img.onload = function () {
+      if (!img) return;
+      var width = img.naturalWidth,
+          height = img.naturalHeight;
+      img = null;
+      done({
+        url: url,
+        type: "image",
+        token: "",
+        thumbnail: "",
+        title: "",
+        width: width,
+        height: height
+      });
+    };
+    img.src = url;
+    if (img.complete) {
+      img.onload();
+    }
+  },
+  tag: function tag(media) {
+    return '<img src="' + media.url + '">';
+  }
+}, {
+  type: 'video',
+  regex: /\.(mp4|webm)(\?.*)?$/i,
+  fetch: function fetch(url, done) {
+    var video = document.createElement("video");
+    var url_parts = url.replace(/\?.*$/, "").split("/");
+    var filename = url_parts[url_parts.length - 1];
+    video.addEventListener("loadedmetadata", function () {
+      var width = video.videoWidth,
+          height = video.videoHeight;
+      video = null;
+      done({
+        url: url,
+        type: "video",
+        token: url,
+        thumbnail: "/public/assets/img/video-thumbnail.png",
+        title: filename,
+        width: width,
+        height: height
+      });
+    });
+    video.src = url;
+    video.load();
+  },
+  tag: function tag(media) {
+    return '<video src="' + media.url + '">';
+  }
+}, {
+  type: 'audio',
+  regex: /\.(wav|mp3)(\?.*)?$/i,
+  fetch: function fetch(url, done) {
+    var audio = document.createElement("audio");
+    var url_parts = url.replace(/\?.*$/, "").split("/");
+    var filename = url_parts[url_parts.length - 1];
+    audio.addEventListener("loadedmetadata", function () {
+      var duration = audio.duration;
+      audio = null;
+      done({
+        url: url,
+        type: "audio",
+        token: url,
+        thumbnail: "/public/assets/img/audio-thumbnail.png",
+        title: filename,
+        duration: duration
+      });
+    });
+    audio.src = url;
+    audio.load();
+  },
+  tag: function tag(media) {
+    return '<audio src="' + media.url + '">';
+  }
+}, {
+  type: 'youtube',
+  regex: /(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/ ]{11})/i,
+  fetch: function fetch(url, done) {
+    var id = (url.match(/v=([-_a-zA-Z0-9]{11})/i) || url.match(/youtu.be\/([-_a-zA-Z0-9]{11})/i) || url.match(/embed\/([-_a-zA-Z0-9]{11})/i))[1].split('&')[0];
+    var thumb = "https://i.ytimg.com/vi/" + id + "/hqdefault.jpg";
+
+    var jsonp_url = new URL('https://www.googleapis.com/youtube/v3/videos');
+    var data = {
+      id: id,
+      key: "AIzaSyCaLRGY-hxs92045X-Jew7w1FgQPkStHgc",
+      part: "id,contentDetails,snippet,status"
+    };
+    Object.keys(data).forEach(function (key) {
+      return jsonp_url.searchParams.append(key, data[key]);
+    });
+
+    (0, _fetchJsonp2.default)(jsonp_url.toString()).then(function (result) {
+      return result.json();
+    }).then(function (result) {
+      if (!result || !result.items.length) {
+        return alert("Sorry, this video URL is invalid.");
+      }
+      var res = result.items[0];
+      // console.log(res)
+
+      var dd = res.contentDetails.duration.match(/\d+/g).map(function (i) {
+        return parseInt(i);
+      });
+      var duration = 0;
+      if (dd.length == 3) {
+        duration = dd[0] * 60 + dd[1] * 60 + dd[2];
+      } else if (dd.length == 2) {
+        duration = dd[0] * 60 + dd[1];
+      } else {
+        duration = dd[0];
+      }
+
+      ["maxres", "high", "medium", "standard", "default"].some(function (t) {
+        if (res.snippet.thumbnails[t]) {
+          thumb = res.snippet.thumbnails[t].url;
+          return true;
+        }
+        return false;
+      });
+
+      done({
+        url: url,
+        type: "youtube",
+        token: id,
+        thumbnail: thumb,
+        title: res.snippet.title,
+        duration: duration,
+        width: 640,
+        height: 360
+      });
+    });
+  },
+  tag: function tag(media) {
+    // return '<img class="video" type="youtube" vid="'+media.token+'" src="'+media.thumbnail+'"><span class="playvid">&#9654;</span>';
+    return '<div class="video" style="width: ' + media.width + 'px; height: ' + media.height + 'px; overflow: hidden; position: relative;"><iframe frameborder="0" scrolling="no" seamless="seamless" webkitallowfullscreen="webkitAllowFullScreen" mozallowfullscreen="mozallowfullscreen" allowfullscreen="allowfullscreen" id="okplayer" width="' + media.width + '" height="' + media.height + '" src="https://youtube.com/embed/' + media.token + '?showinfo=0" style="position: absolute; top: 0px; left: 0px; width: ' + media.width + 'px; height: ' + media.height + 'px;"></iframe></div>';
+  }
+}, {
+  type: 'vimeo',
+  regex: /vimeo.com\/\d+$/i,
+  fetch: function fetch(url, done) {
+    var id = url.match(/\d+$/i)[0];
+    (0, _nodeFetch2.default)('https://vimeo.com/api/v2/video/' + id + '.json').then(function (result) {
+      return result.json();
+    }).then(function (result) {
+      if (result.length == 0) {
+        return done(id, "", 640, 360);
+      }
+      var res = result[0];
+      if (res.embed_privacy != "anywhere") {
+        alert("Sorry, the author of this video has marked it private, preventing it from being embedded.", function () {});
+        return;
+      }
+      done({
+        url: url,
+        type: "vimeo",
+        token: id,
+        thumbnail: res.thumbnail_large,
+        duration: res.duration,
+        title: res.title,
+        width: res.width,
+        height: res.height
+      });
+    });
+  },
+  tag: function tag(media) {
+    // return '<img class="video" type="vimeo" vid="'+media.token+'" src="'+media.thumbnail+'"><span class="playvid">&#9654;</span>';
+    return '<div class="video" style="width: ' + media.width + 'px; height: ' + media.height + 'px; overflow: hidden; position: relative;"><iframe frameborder="0" scrolling="no" seamless="seamless" webkitallowfullscreen="webkitAllowFullScreen" mozallowfullscreen="mozallowfullscreen" allowfullscreen="allowfullscreen" id="okplayer" src="https://player.vimeo.com/video/' + media.token + '?api=1&title=0&byline=0&portrait=0&playbar=0&player_id=okplayer&loop=0&autoplay=0" width="' + media.width + '" height="' + media.height + '" style="position: absolute; top: 0px; left: 0px; width: ' + media.width + 'px; height: ' + media.height + 'px;"></iframe></div>';
+  }
+},
+// {
+//   type: 'soundcloud',
+//   regex: /soundcloud.com\/[-a-zA-Z0-9]+\/[-a-zA-Z0-9]+\/?$/i,
+//   fetch: function (url, done) {
+//     fetch('https://api.soundcloud.com/resolve.json?url=' 
+//         + url
+//         + '&client_id=' 
+//         + '0673fbe6fc794a7750f680747e863b10')
+//     .then(result => result.json())
+//     .then(result => {
+//         console.log(result)
+//         done({
+//           url: url,
+//           type: "soundcloud",
+//           token: result.id,
+//           thumbnail: result.artwork_url || result.user.avatar_url,
+//           title: result.user.username + " - " + result.title,
+//           duration: result.duration,
+//           width: 166,
+//           height: 166,
+//         })
+//     })
+//   },
+//   tag: function (media) {
+//     return '<iframe width="166" height="166" scrolling="no" frameborder="no"' +
+//         'src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/' + media.token +
+//         '&amp;color=ff6600&amp;auto_play=false&amp;show_artwork=true"></iframe>'
+//   }
+// },
+{
+  type: 'link',
+  regex: /^http.+/i,
+  fetch: function fetch(url, done) {
+    done({
+      url: url,
+      type: "link",
+      token: "",
+      thumbnail: "",
+      title: "",
+      width: 100,
+      height: 100
+    });
+  },
+  tag: function tag(media) {
+    return '<a href="' + media.url + '" target="_blank">' + media.url + '</a>';
+  }
+}];
+
+var lookup = exports.lookup = integrations.reduce(function (a, b) {
+  return (a[b.type] = b) && a;
+}, {});
+
+var parse = exports.parse = function parse(url, cb) {
+  var matched = integrations.some(function (integration) {
+    if (integration.regex.test(url)) {
+      integration.fetch(url, function (res) {
+        cb(res);
+      });
+      return true;
+    }
+    return false;
+  });
+  if (!matched) {
+    cb(null);
+  }
+};
+
+var tag = exports.tag = function tag(media) {
+  if (media.type in lookup) {
+    return lookup[media.type].tag(media);
+  }
+  return "";
+};
+
+var loadImage = exports.loadImage = function loadImage(url, cb, error) {
+  if (lookup.image.regex.test(url)) {
+    lookup.image.fetch(url, function (media) {
+      cb(media);
+    });
+  } else error && error();
+};
+
+var thumbnail = exports.thumbnail = function thumbnail(media) {
+  return '<img src="' + (media.thumbnail || media.url) + '" class="thumb">';
+};
+
+var tumblr = exports.tumblr = function tumblr(url, cb) {
+  var domain = url.replace(/^https?:\/\//, "").split("/")[0];
+  if (domain.indexOf(".") == -1) {
+    domain += ".tumblr.com";
+  }
+  (0, _fetchJsonp2.default)("http://" + domain + "/api/read").then(function (data) {
+    // const blog = data.tumblelog
+    var media_list = data.posts.reduce(parseTumblrPost, []);
+    cb(media_list);
+  });
+};
+
+function parseTumblrPost(media_list, post) {
+  var media = void 0,
+      caption = void 0,
+      url = void 0;
+  switch (post.type) {
+    case 'photo':
+      caption = stripHTML(post['photo-caption']);
+      if (post.photos.length) {
+        post.photos.forEach(function (photo) {
+          media = {
+            url: photo['photo-url-1280'],
+            type: "image",
+            token: "",
+            thumbnail: photo['photo-url-500'],
+            description: caption,
+            width: parseInt(photo.width),
+            height: parseInt(photo.height)
+          };
+          media_list.push(media);
+        });
+      } else {
+        media = {
+          url: post['photo-url-1280'],
+          type: "image",
+          token: "",
+          thumbnail: post['photo-url-500'],
+          description: caption,
+          width: parseInt(post.width),
+          height: parseInt(post.height)
+        };
+        media_list.push(media);
+      }
+      break;
+    case 'video':
+      url = post['video-source'];
+      if (url.indexOf("http") !== 0) {
+        break;
+      }
+      if (lookup.youtube.regex.test(url)) {
+        var id = (url.match(/v=([-_a-zA-Z0-9]{11})/i) || url.match(/youtu.be\/([-_a-zA-Z0-9]{11})/i) || url.match(/embed\/([-_a-zA-Z0-9]{11})/i))[1].split('&')[0];
+        var thumb = "https://i.ytimg.com/vi/" + id + "/hqdefault.jpg";
+        media = {
+          url: post['video-source'],
+          type: "youtube",
+          token: id,
+          thumbnail: thumb,
+          title: stripHTML(post['video-caption']),
+          width: 640,
+          height: 360
+        };
+        media_list.push(media);
+      }
+      break;
+    default:
+      break;
+  }
+  return media_list;
+}
+
+/***/ }),
+
+/***/ "./app/client/audio/lib/draw.js":
+/*!**************************************!*\
+  !*** ./app/client/audio/lib/draw.js ***!
+  \**************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.spectrum = spectrum;
+exports.raw_spectrum = raw_spectrum;
+
+var _util = __webpack_require__(/*! ../../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var scratch = document.createElement('canvas');
+var scratchCtx = scratch.getContext('2d-lodpi');
+
+var w = 256;
+var h = 256;
+
+function spectrum(spec, x0, y0, ww, hh) {
+  var data = spec.data;
+  var fft_size = spec.fft_size;
+  var half_fft_size = spec.fft_size / 2;
+  var spec_len = data.length;
+
+  scratch.width = data.length;
+  scratch.height = half_fft_size;
+
+  var imageData = ctx.createImageData(scratch.width, scratch.height);
+  var pixels = imageData.data;
+
+  var i = void 0,
+      j = void 0,
+      u = void 0,
+      v = void 0,
+      _r = void 0,
+      _i = void 0,
+      col = void 0,
+      hsl = void 0;
+
+  for (i = 0; i < spec_len; i++) {
+    col = data[i];
+
+    for (j = 0; j < half_fft_size; j++) {
+      u = ((half_fft_size - j) * spec_len + i) * 4;
+      v = j * 2;
+      _r = col[v];
+      _i = mod(col[v + 1], Math.PI * 2) / (Math.PI * 2);
+      hsl = color.hsl2rgb((_i + 1) / 2, 1.0, 1 - Math.abs(_r / 10));
+      // red - real part
+      // pixels[u] = _r * 127 + 127
+      // // green - imag part
+      // pixels[u+1] = _i * 127 + 127
+      // // blue - magnitude
+      // pixels[u+2] = Math.sqrt(Math.pow(_r, 2) + Math.pow(_i, 2)) * 128 + 127
+      // pixels[u+3] = 255
+      pixels[u] = hsl[0];
+      pixels[u + 1] = hsl[1];
+      pixels[u + 2] = hsl[2];
+      pixels[u + 3] = 255;
+    }
+  }
+
+  scratchCtx.putImageData(imageData, 0, 0);
+
+  var pcm_length = spec.fft_overlap * spec_len;
+
+  x0 = x0 * devicePixelRatio || 0;
+  y0 = y0 * devicePixelRatio || Math.floor(h / 4);
+  ww = ww * devicePixelRatio || w;
+  hh = hh * devicePixelRatio || h / 4;
+
+  var width = Math.round(pcm_length / spec.sr * pixels_per_second);
+  var height = Math.floor(hh);
+
+  ctx.save();
+  clear(1, x0, y0, w, height);
+  ctx.drawImage(scratch, x0, y0, width, height);
+  ctx.restore();
+}
+
+function raw_spectrum(spec, x0, y0, ww, hh, def_min_r, def_min_i) {
+  var data = spec.data;
+  var fft_size = spec.fft_size;
+  var half_fft_size = spec.fft_size / 2;
+  var spec_len = data.length;
+
+  var _scratch = document.createElement('canvas');
+  var _scratchCtx = _scratch.getContext('2d-lodpi');
+  _scratch.width = data.length;
+  _scratch.height = half_fft_size;
+  // console.log("spectrum w/h:", _scratch.width, _scratch.height)
+
+  var imageData = _scratchCtx.createImageData(_scratch.width, _scratch.height);
+  var pixels = imageData.data;
+
+  var i = void 0,
+      j = void 0,
+      u = void 0,
+      v = void 0,
+      _r = void 0,
+      _i = void 0,
+      col = void 0,
+      hsl = void 0;
+  // let min_r = Infinity, max_r = -Infinity
+  // let min_i = Infinity, max_i = -Infinity
+
+  // determined empirically..
+  // let min_r = -60.4894057005308
+  // let max_r = 107.23800966675353
+  // let min_i = -59.4894057005308
+  // let max_i = 108.23800966675353
+  var min_r = -def_min_r;
+  var max_r = def_min_r;
+  var min_i = -def_min_i;
+  var max_i = def_min_i;
+  var delta_r = max_r - min_r;
+  var delta_i = max_i - min_i;
+  var mean_r = 0;
+  var mean_i = 0;
+  var sum_mean_r = 0,
+      sum_mean_i = 0;
+  var real = void 0,
+      imag = void 0;
+
+  for (i = 0; i < spec_len; i++) {
+    col = data[i];
+    mean_r = 0;
+    mean_i = 0;
+
+    for (j = 0; j < half_fft_size; j++) {
+      u = (j * spec_len + i) * 4;
+      v = j * 2;
+      real = col[v];
+      imag = col[v + 1];
+      mean_r += real;
+      mean_i += imag;
+      _r = _util2.default.clamp((real - min_r) / delta_r * 255, 0, 255);
+      _i = _util2.default.clamp((imag - min_i) / delta_i * 255, 0, 255);
+
+      // hsl = color.hsl2rgb((_i + 1) / 2, 1.0, 1 - Math.abs(_r / 10))
+      pixels[u + 0] = _r;
+      pixels[u + 1] = _i;
+      pixels[u + 2] = 127; // hsl[2]
+      pixels[u + 3] = 255;
+
+      // min_r = Math.min(min_r, col[v])
+      // max_r = Math.max(max_r, col[v])
+      // min_i = Math.min(min_i, col[v]+1)
+      // max_i = Math.max(max_i, col[v]+1)
+    }
+    mean_r /= half_fft_size;
+    mean_i /= half_fft_size;
+    sum_mean_r += mean_r;
+    sum_mean_i += mean_i;
+  }
+
+  sum_mean_r /= spec_len;
+  sum_mean_i /= spec_len;
+  // console.log(sum_mean_r, sum_mean_i)
+  // console.log("r:", min_r, max_r)
+  // console.log("i:", min_i, max_i)
+  _scratchCtx.putImageData(imageData, 0, 0);
+
+  return { canvas: _scratch, imageData: imageData };
+}
+
+/***/ }),
+
+/***/ "./app/client/audio/lib/index.js":
+/*!***************************************!*\
+  !*** ./app/client/audio/lib/index.js ***!
+  \***************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.requestAudioContext = requestAudioContext;
+
+var _tone = __webpack_require__(/*! tone */ "./node_modules/tone/build/Tone.js");
+
+var _tone2 = _interopRequireDefault(_tone);
+
+var _startAudioContext = __webpack_require__(/*! ./startAudioContext */ "./app/client/audio/lib/startAudioContext.js");
+
+var _startAudioContext2 = _interopRequireDefault(_startAudioContext);
+
+var _util = __webpack_require__(/*! ../../util */ "./app/client/util/index.js");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function requestAudioContext(fn) {
+  if (_util.is_mobile) {
+    var container = document.createElement('div');
+    var button = document.createElement('div');
+    button.innerHTML = 'Tap to start - please unmute your phone';
+    Object.assign(container.style, {
+      display: 'block',
+      position: 'absolute',
+      width: '100%',
+      height: '100%',
+      zIndex: '10000',
+      top: '0px',
+      left: '0px',
+      backgroundColor: 'rgba(0, 0, 0, 0.8)'
+    });
+    Object.assign(button.style, {
+      display: 'block',
+      position: 'absolute',
+      left: '50%',
+      top: '50%',
+      padding: '20px',
+      backgroundColor: '#7F33ED',
+      color: 'white',
+      fontFamily: 'monospace',
+      borderRadius: '3px',
+      transform: 'translate3D(-50%,-50%,0)',
+      textAlign: 'center',
+      lineHeight: '1.5',
+      width: '150px'
+    });
+    container.appendChild(button);
+    document.body.appendChild(container);
+    _startAudioContext2.default.setContext(_tone2.default.context);
+    _startAudioContext2.default.on(button);
+    _startAudioContext2.default.onStarted(function (_) {
+      container.remove();
+      fn();
+    });
+  } else {
+    fn();
+  }
+}
+
+/***/ }),
+
+/***/ "./app/client/audio/lib/output.js":
+/*!****************************************!*\
+  !*** ./app/client/audio/lib/output.js ***!
+  \****************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _tone = __webpack_require__(/*! tone */ "./node_modules/tone/build/Tone.js");
+
+var _tone2 = _interopRequireDefault(_tone);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+// const compressor = new Tone.Compressor(-30, 3).toMaster()
+
+var compressor = new _tone2.default.Compressor(-30, 3).toMaster();
+var gain = new _tone2.default.Gain(1).connect(compressor);
+
+exports.default = gain;
+
+/***/ }),
+
+/***/ "./app/client/audio/lib/spectrum.js":
+/*!******************************************!*\
+  !*** ./app/client/audio/lib/spectrum.js ***!
+  \******************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _tone = __webpack_require__(/*! tone */ "./node_modules/tone/build/Tone.js");
+
+var _tone2 = _interopRequireDefault(_tone);
+
+var _util = __webpack_require__(/*! ../../util */ "./app/client/util/index.js");
+
+var _signalWindows = __webpack_require__(/*! signal-windows */ "./node_modules/signal-windows/index.js");
+
+var _fft = __webpack_require__(/*! fft.js */ "./node_modules/fft.js/lib/fft.js");
+
+var _fft2 = _interopRequireDefault(_fft);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var fft_size = 512;
+var fft_overlap = fft_size / 4;
+
+var fft = new _fft2.default(fft_size);
+
+function toSpectrum(pcm, sr) {
+  sr = sr || 44100;
+  var ham = _signalWindows.windows.construct('ham', fft_size);
+  var pcm_in = new Array(fft_size);
+  var pcm_length = pcm.length;
+  var pcm_q_length = Math.ceil(pcm_length / fft_size) * fft_size;
+  var i = void 0,
+      j = void 0,
+      fft_out = void 0,
+      data = [];
+  for (i = -fft_size; i < pcm_q_length; i += fft_overlap) {
+    for (j = 0; j < fft_size; j++) {
+      pcm_in[j] = pcm[i + j] * ham[j] || 0;
+    }
+    fft_out = fft.createComplexArray();
+    fft.realTransform(fft_out, pcm_in);
+    fft.completeSpectrum(fft_out);
+    data.push(fft_out);
+  }
+  return {
+    data: data,
+    sr: sr,
+    fft_size: fft_size,
+    fft_overlap: fft_overlap
+  };
+}
+
+function fromSpectrum(spec) {
+  var data = spec.data;
+  var sr = spec.sr;
+  var fft_size = spec.fft_size;
+  var fft_overlap = spec.fft_overlap;
+  var spec_len = data.length;
+
+  var ham = _signalWindows.windows.construct('ham', fft_size);
+  var out = fft.createComplexArray();
+  var pcm_length = fft_overlap * spec_len;
+
+  var audioBuffer = _tone2.default.context.createBuffer(1, pcm_length, sr);
+  var pcm = audioBuffer.getChannelData(0);
+
+  var i = void 0,
+      j = void 0,
+      u = void 0,
+      col = void 0;
+
+  for (i = 0; i < spec_len; i++) {
+    col = data[i];
+    // for (j = fft_size; j < fft_size << 1; j++) {
+    //   col[j] = 0
+    // }
+    // if (i == 0) console.log(col)
+    fft.inverseTransform(out, col);
+    u = i * fft_overlap;
+    for (j = 0; j < fft_size; j++) {
+      pcm[u + j] += out[j * 2] * ham[j] || 0;
+    }
+  }
+
+  fadeInOut(pcm, fft_size);
+  // console.log(pcm)
+  return audioBuffer;
+}
+
+function fromImageData(imageData, sr, _r, _i) {
+  var pixels = imageData.data;
+  var w = imageData.width;
+  var h = imageData.height;
+  var data = new Array(w);
+  var x = void 0,
+      y = void 0,
+      u = void 0,
+      v = void 0,
+      v2 = void 0;
+  for (y = 0; y < h; y++) {
+    var col = data[y] = new Float32Array(h * 4);
+    for (x = 0; x < w; x++) {
+      u = (x * w + y) * 4;
+      v = x * 2;
+      col[v] = (pixels[u] / 255 - 0.5) * _r;
+      col[v + 1] = (pixels[u + 1] / 255 - 0.5) * _i;
+      v2 = (h - y + h) * 2;
+      col[v2] = col[v];
+      col[v2 + 1] = 0; // col[v+1]
+    }
+    col[h * 2] = col[h * 2 + 1] = col[h * 2 - 1] = col[h * 2 - 2] = 0;
+  }
+  var spec = {
+    data: data,
+    sr: sr,
+    fft_size: fft_size, fft_overlap: fft_overlap
+  };
+  return spec;
+}
+
+function binToHz(spec, i) {
+  return i / spec.fft_size * spec.sr;
+}
+
+function fadeInOut(pcm, fade_size) {
+  var pcm_length = pcm.length;
+  var fade = 0,
+      i = void 0;
+  for (i = 0; i < fade_size; i++) {
+    fade = i / fade_size;
+    fade *= fade;
+    pcm[i] *= fade;
+    pcm[pcm_length - i] *= fade;
+  }
+}
+function rotatePhase(spec, theta) {
+  var data = spec.data,
+      fft_size = spec.fft_size;
+
+  var i = void 0,
+      j = void 0,
+      col = void 0,
+      len = data.length;
+  for (i = 0; i < len; i++) {
+    col = data[i];
+    for (j = 0; j < fft_size; j++) {
+      col[j * 2 + 1] += theta;
+    }
+  }
+  return spec;
+}
+
+function linearBins(spec, n) {
+  n = n || 1;
+
+  var bins = [],
+      i = void 0,
+      q_i = void 0;
+  for (q_i = 0; q_i < n; q_i++) {
+    bins[q_i] = [];
+  }
+  var step = Math.floor(spec.fft_size / n);
+  var len_quantize_n = (0, _util.quantize)(spec.fft_size, n);
+  for (i = 0; i < len_quantize_n; i++) {
+    q_i = Math.floor(i / step);
+    bins[q_i] = bins[q_i] || [];
+    bins[q_i].push(i);
+  }
+  // leftover bins get put at end
+  for (; i < spec.fft_size; i++) {
+    bins[q_i].push(i);
+  }
+  return bins;
+}
+function logarithmicBins(spec) {
+  var bins = [],
+      i = void 0,
+      j = void 0,
+      q_i = void 0;
+  var binCount = Math.log2(spec.fft_size) - 1;
+  for (i = 0, q_i = 0, j = 0; i < binCount; i++) {
+    j += 1 << i;
+    bins[i] = [];
+    for (; q_i < j; q_i++) {
+      bins[i].push(q_i);
+    }
+  }
+  return bins;
+}
+function concatBins(bins) {
+  return bins.reduce(function (acc, cv) {
+    return acc.concat(cv);
+  }, []);
+}
+function reverseBins(bins) {
+  return bins.map(function (bin) {
+    return bin.reverse();
+  });
+}
+function minBins(bins) {
+  return bins.map(function (bin) {
+    var b = bin[0];
+    return bin.map(function () {
+      return b;
+    });
+  });
+}
+function maxBins(bins) {
+  return bins.map(function (bin) {
+    var b = bin[bin.length - 1];
+    return bin.map(function () {
+      return b;
+    });
+  });
+}
+function rotateSpectrum(spec, n) {
+  var fft_size = spec.fft_size;
+
+  if (n && n < 1) {
+    n -= 0.5;
+    n *= fft_size;
+  }
+  n = Math.floor(n);
+  var order = new Array(fft_size),
+      i = void 0;
+  for (i = 0; i < fft_size; i++) {
+    order[i] = (0, _util.mod)(i + n, fft_size / 2);
+  }
+  return reorderBins(spec, order);
+}
+function cloneSpectrum(spec) {
+  var data = spec.data,
+      fft_size = spec.fft_size,
+      sr = spec.sr,
+      fft_overlap = spec.fft_overlap;
+
+  var spec_len = data.length;
+
+  var new_data = new Array(spec_len);
+  var i = void 0;
+  for (i = 0; i < spec_len; i++) {
+    new_data[i] = data[i].concat();
+    new_data[i][2] = 0;
+  }
+
+  return {
+    data: new_data,
+    fft_size: fft_size,
+    sr: sr, fft_overlap: fft_overlap
+  };
+}
+function reverseSpectrum(spec) {
+  var new_spec = cloneSpectrum(spec);
+  new_spec.data = new_spec.data.reverse();
+  return new_spec;
+}
+function shuffleSpectrum(spec) {
+  var fft_size = spec.fft_size;
+
+  var order = new Array(fft_size),
+      i = void 0;
+  for (i = 0; i < fft_size; i++) {
+    order[i] = i;
+  }
+  (0, _util.shuffle)(order);
+  return reorderBins(spec, order);
+}
+function invertSpectrum(spec) {
+  var fft_size = spec.fft_size;
+
+  var order = new Array(fft_size),
+      i = void 0;
+  for (i = 0; i < fft_size; i++) {
+    order[i] = fft_size - i - 1;
+  }
+  return reorderBins(spec, order);
+}
+function reorderBins(spec, order) {
+  var new_spec = cloneSpectrum(spec);
+  var data = spec.data,
+      sr = spec.sr,
+      fft_size = spec.fft_size,
+      fft_overlap = spec.fft_overlap;
+
+  var spec_len = data.length;
+  var new_data = new_spec.data;
+
+
+  var i = void 0,
+      j = void 0,
+      col = void 0,
+      new_col = void 0;
+  for (j = order.length; j < fft_size; j++) {
+    order[j] = j;
+  }
+
+  for (i = 0; i < spec_len; i++) {
+    col = data[i];
+    new_col = new_data[i] = data[i].concat();
+    col[0] = 0;
+    col[2] = 0;
+    col[4] = 0;
+    for (j = 0; j < fft_size / 2; j++) {
+      new_col[j * 2] = col[order[j] * 2];
+      new_col[j * 2 + 1] = col[order[j] * 2 + 1];
+    }
+    for (; j < fft_size; j++) {
+      new_col[j * 2] = 0;
+      new_col[j * 2 + 1] = 0;
+    }
+  }
+
+  return {
+    data: new_data,
+    sr: sr, fft_size: fft_size, fft_overlap: fft_overlap
+  };
+}
+
+exports.default = {
+  fft_size: fft_size, fft_overlap: fft_overlap,
+  toSpectrum: toSpectrum, fromSpectrum: fromSpectrum, fromImageData: fromImageData, binToHz: binToHz,
+  fadeInOut: fadeInOut,
+  cloneSpectrum: cloneSpectrum,
+  reverseSpectrum: reverseSpectrum, shuffleSpectrum: shuffleSpectrum, invertSpectrum: invertSpectrum, rotateSpectrum: rotateSpectrum,
+  reorderBins: reorderBins,
+  linearBins: linearBins, logarithmicBins: logarithmicBins,
+  concatBins: concatBins,
+  reverseBins: reverseBins, minBins: minBins, maxBins: maxBins,
+  rotatePhase: rotatePhase
+};
+
+/***/ }),
+
+/***/ "./app/client/audio/lib/startAudioContext.js":
+/*!***************************************************!*\
+  !*** ./app/client/audio/lib/startAudioContext.js ***!
+  \***************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+/**
+ *  StartAudioContext.js
+ *  @author Yotam Mann
+ *  @license http://opensource.org/licenses/MIT MIT License
+ *  @copyright 2016 Yotam Mann
+ */
+(function (root, factory) {
+  if (true) {
+    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
+				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
+				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
+				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+  } else {}
+})(undefined, function () {
+
+  /**
+   * The StartAudioContext object
+   */
+  var StartAudioContext = {
+    /**
+     * The audio context passed in by the user
+     * @type {AudioContext}
+     */
+    context: null,
+    /**
+     * The TapListeners bound to the elements
+     * @type {Array}
+     * @private
+     */
+    _tapListeners: [],
+    /**
+     * Callbacks to invoke when the audio context is started
+     * @type {Array}
+     * @private
+     */
+    _onStarted: []
+  };
+
+  /**
+   * Set the context
+   * @param {AudioContext} ctx
+   * @returns {StartAudioContext}
+   */
+  StartAudioContext.setContext = function (ctx) {
+    StartAudioContext.context = ctx;
+    return StartAudioContext;
+  };
+
+  /**
+   * Add a tap listener to the audio context
+   * @param  {Array|Element|String|jQuery} element
+   * @returns {StartAudioContext}
+   */
+  StartAudioContext.on = function (element) {
+    if (Array.isArray(element) || NodeList && element instanceof NodeList) {
+      for (var i = 0; i < element.length; i++) {
+        StartAudioContext.on(element[i]);
+      }
+    } else if (typeof element === "string") {
+      StartAudioContext.on(document.querySelectorAll(element));
+    } else if (element.jquery && typeof element.toArray === "function") {
+      StartAudioContext.on(element.toArray());
+    } else if (Element && element instanceof Element) {
+      //if it's an element, create a TapListener
+      var tap = new TapListener(element, onTap);
+      StartAudioContext._tapListeners.push(tap);
+    }
+    return StartAudioContext;
+  };
+
+  /**
+   * Bind a callback to when the audio context is started. 
+   * @param {Function} cb
+   * @return {StartAudioContext}
+   */
+  StartAudioContext.onStarted = function (cb) {
+    //if it's already started, invoke the callback
+    if (StartAudioContext.isStarted()) {
+      cb();
+    } else {
+      StartAudioContext._onStarted.push(cb);
+    }
+    return StartAudioContext;
+  };
+
+  /**
+   * returns true if the context is started
+   * @return {Boolean}
+   */
+  StartAudioContext.isStarted = function () {
+    return StartAudioContext.context !== null && StartAudioContext.context.state === "running";
+  };
+
+  /**
+   * @class  Listens for non-dragging tap ends on the given element
+   * @param {Element} element
+   * @internal
+   */
+  var TapListener = function TapListener(element) {
+
+    this._dragged = false;
+
+    this._element = element;
+
+    this._bindedMove = this._moved.bind(this);
+    this._bindedEnd = this._ended.bind(this);
+
+    element.addEventListener("touchmove", this._bindedMove);
+    element.addEventListener("touchend", this._bindedEnd);
+    element.addEventListener("mouseup", this._bindedEnd);
+  };
+
+  /**
+   * drag move event
+   */
+  TapListener.prototype._moved = function (e) {
+    this._dragged = true;
+  };
+
+  /**
+   * tap ended listener
+   */
+  TapListener.prototype._ended = function (e) {
+    if (!this._dragged) {
+      onTap();
+    }
+    this._dragged = false;
+  };
+
+  /**
+   * remove all the bound events
+   */
+  TapListener.prototype.dispose = function () {
+    this._element.removeEventListener("touchmove", this._bindedMove);
+    this._element.removeEventListener("touchend", this._bindedEnd);
+    this._element.removeEventListener("mouseup", this._bindedEnd);
+    this._bindedMove = null;
+    this._bindedEnd = null;
+    this._element = null;
+  };
+
+  /**
+   * Invoked the first time of the elements is tapped.
+   * Creates a silent oscillator when a non-dragging touchend 
+   * event has been triggered.
+   */
+  function onTap() {
+    //start the audio context with a silent oscillator
+    if (StartAudioContext.context && !StartAudioContext.isStarted()) {
+      var osc = StartAudioContext.context.createOscillator();
+      var silent = StartAudioContext.context.createGain();
+      silent.gain.value = 0;
+      osc.connect(silent);
+      silent.connect(StartAudioContext.context.destination);
+      var now = StartAudioContext.context.currentTime;
+      osc.start(now);
+      osc.stop(now + 0.5);
+    }
+
+    //dispose all the tap listeners
+    if (StartAudioContext._tapListeners) {
+      for (var i = 0; i < StartAudioContext._tapListeners.length; i++) {
+        StartAudioContext._tapListeners[i].dispose();
+      }
+      StartAudioContext._tapListeners = null;
+    }
+    //the onstarted callbacks
+    if (StartAudioContext._onStarted) {
+      for (var j = 0; j < StartAudioContext._onStarted.length; j++) {
+        StartAudioContext._onStarted[j]();
+      }
+      StartAudioContext._onStarted = null;
+    }
+  }
+
+  return StartAudioContext;
+});
+
+/***/ }),
+
+/***/ "./app/client/audio/pix2wav.js":
+/*!*************************************!*\
+  !*** ./app/client/audio/pix2wav.js ***!
+  \*************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.play = play;
+
+var _types = __webpack_require__(/*! ../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _tone = __webpack_require__(/*! tone */ "./node_modules/tone/build/Tone.js");
+
+var _tone2 = _interopRequireDefault(_tone);
+
+var _draw = __webpack_require__(/*! ./lib/draw */ "./app/client/audio/lib/draw.js");
+
+var draw = _interopRequireWildcard(_draw);
+
+var _output = __webpack_require__(/*! ./lib/output */ "./app/client/audio/lib/output.js");
+
+var _output2 = _interopRequireDefault(_output);
+
+var _spectrum = __webpack_require__(/*! ./lib/spectrum */ "./app/client/audio/lib/spectrum.js");
+
+var _spectrum2 = _interopRequireDefault(_spectrum);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var _r = 8;
+var _i = 8;
+
+function play(frame) {
+  // const { canvas, imageData } = draw.raw_spectrum(fft, 0, 256, 0, 256, 1, 1)
+  // console.log(_r, _i)
+  // const { canvas, imageData } = draw.raw_spectrum(player.fft, 0, 256, 0, 256, _r, _i)
+  var new_fft = _spectrum2.default.fromImageData(frame.imageData, 44100, _r, _i);
+  // gallery.innerHTML = ''
+
+  // console.log(player.fft.data, new_fft.data)
+  var buf = _spectrum2.default.fromSpectrum(new_fft);
+  var _p = new _tone2.default.Player(buf);
+  _p.connect(_output2.default);
+  _p.start(_tone2.default.now());
+  // redraw(new_fft)
+}
+// function redraw(new_fft){
+//   const { canvas, imageData } = draw.raw_spectrum(new_fft, 0, 256, 0, 256, _r, _i)
+// }
+
+/***/ }),
+
+/***/ "./app/client/audio/wav2pix.js":
+/*!*************************************!*\
+  !*** ./app/client/audio/wav2pix.js ***!
+  \*************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.buildZip = exports.renderFrames = exports.loadPCM = exports.loadBuffer = exports.spectrum = exports.FRAME_STEP = exports.FRAME_LENGTH = undefined;
+
+var _types = __webpack_require__(/*! ../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _tone = __webpack_require__(/*! tone */ "./node_modules/tone/build/Tone.js");
+
+var _tone2 = _interopRequireDefault(_tone);
+
+var _jszip = __webpack_require__(/*! jszip */ "./node_modules/jszip/lib/index.js");
+
+var _jszip2 = _interopRequireDefault(_jszip);
+
+var _sprintfJs = __webpack_require__(/*! sprintf-js */ "./node_modules/sprintf-js/src/sprintf.js");
+
+var _draw = __webpack_require__(/*! ./lib/draw */ "./app/client/audio/lib/draw.js");
+
+var draw = _interopRequireWildcard(_draw);
+
+var _output = __webpack_require__(/*! ./lib/output */ "./app/client/audio/lib/output.js");
+
+var _output2 = _interopRequireDefault(_output);
+
+var _spectrum = __webpack_require__(/*! ./lib/spectrum */ "./app/client/audio/lib/spectrum.js");
+
+var _spectrum2 = _interopRequireDefault(_spectrum);
+
+var _lib = __webpack_require__(/*! ./lib */ "./app/client/audio/lib/index.js");
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var FRAME_LENGTH = exports.FRAME_LENGTH = 126 * 255;
+var FRAME_STEP = exports.FRAME_STEP = Math.round(FRAME_LENGTH / 4);
+
+var _r = 8;
+var _i = 8;
+
+exports.spectrum = _spectrum2.default;
+// requestAudioContext(() => {})
+
+var loadBuffer = exports.loadBuffer = function loadBuffer(file) {
+  return new Promise(function (resolve, reject) {
+    var url = URL.createObjectURL(file);
+    var buffer = new _tone2.default.Buffer(url, loadBuffer, function (err) {
+      console.error('err', err);
+      reject(err);
+    });
+    function loadBuffer() {
+      URL.revokeObjectURL(url);
+      resolve(buffer);
+    }
+  });
+};
+
+var loadPCM = exports.loadPCM = function loadPCM(file) {
+  return new Promise(function (resolve, reject) {
+    // if we've already fetched this file...
+    if (file.pcm) {
+      return resolve(file);
+    }
+    loadBuffer(file).then(function (buffer) {
+      var pcm = buffer._buffer.getChannelData(0);
+      var sr = buffer._buffer.sampleRate;
+      if (!pcm) return reject();
+      console.log(pcm.length, sr);
+      resolve({ file: file, buffer: buffer, pcm: pcm, sr: sr });
+    });
+  });
+};
+
+var renderFrames = exports.renderFrames = function renderFrames(file, _ref) {
+  var _ref$frame_step = _ref.frame_step,
+      frame_step = _ref$frame_step === undefined ? FRAME_STEP : _ref$frame_step,
+      _ref$frame_start = _ref.frame_start,
+      frame_start = _ref$frame_start === undefined ? 0 : _ref$frame_start,
+      _ref$max = _ref.max,
+      max = _ref$max === undefined ? 12 : _ref$max;
+  return function (dispatch) {
+    return new Promise(function (resolve, reject) {
+      loadPCM(file).then(function (pcmProps) {
+        var file = pcmProps.file,
+            buffer = pcmProps.buffer,
+            pcm = pcmProps.pcm,
+            sr = pcmProps.sr;
+
+        dispatch({ type: _types2.default.wav2pix.load });
+        var frames = [];
+        var count = 0;
+        var _len = pcm.length - FRAME_LENGTH;
+        var offset = Math.round(_len * frame_start);
+        for (; offset < _len && count < max; offset += frame_step, count += 1) {
+          frames.push(render(pcm.slice(offset, offset + FRAME_LENGTH), sr, count));
+        }
+        dispatch({ type: _types2.default.wav2pix.finish, message: 'Rendered ' + count + ' images' });
+        resolve({ pcm: pcmProps, frames: frames });
+      });
+    });
+  };
+};
+
+var buildZip = exports.buildZip = function buildZip(name, file, _ref2) {
+  var _ref2$frame_step = _ref2.frame_step,
+      frame_step = _ref2$frame_step === undefined ? FRAME_STEP : _ref2$frame_step,
+      _ref2$frame_start = _ref2.frame_start,
+      frame_start = _ref2$frame_start === undefined ? 0 : _ref2$frame_start,
+      _ref2$max = _ref2.max,
+      max = _ref2$max === undefined ? 10000 : _ref2$max;
+  return function (dispatch) {
+    return new Promise(function (resolve, reject) {
+      loadPCM(file).then(function (_ref3) {
+        var buffer = _ref3.buffer,
+            pcm = _ref3.pcm,
+            sr = _ref3.sr;
+
+        dispatch({ type: _types2.default.wav2pix.load });
+
+        var zip = new _jszip2.default();
+        var zip_folder = zip.folder("wav2pix_" + name);
+
+        var steps = (pcm.length - FRAME_LENGTH) / frame_step;
+        console.log(steps);
+
+        var count = 0;
+        var _len = pcm.length - FRAME_LENGTH;
+        var offset = Math.round(_len * frame_start);
+        for (; offset < _len && count < max; offset += frame_step, count += 1) {
+          if (count % 10 === 0) {
+            dispatch({ type: _types2.default.wav2pix.progress, progress: { i: count / max * 6, n: 6 } });
+          }
+          render(pcm.slice(offset, offset + FRAME_LENGTH), sr, count, zip_folder);
+        }
+
+        // dispatch event
+        dispatch({ type: _types2.default.wav2pix.finish, message: 'Rendered ' + count + ' images' });
+        zip.generateAsync({ type: "blob" }).then(function (content) {
+          dispatch({ type: _types2.default.wav2pix.zip, size: content.size });
+          // FileSaver.saveAs(content, "wav2pix_" + name + ".zip")
+          resolve({
+            zip: content,
+            filename: "wav2pix_" + name + ".zip",
+            count: count
+          });
+        });
+      });
+    });
+  };
+};
+
+function render(pcm, sr, count, zip) {
+  var fft = _spectrum2.default.toSpectrum(pcm, sr);
+  // console.log('render', fft)
+  // const pcm_rev = pcm.slice().reverse()
+  // const spec_rev = spectrum.toSpectrum(pcm_rev, spec.sr)
+
+  var _draw$raw_spectrum = draw.raw_spectrum(fft, 0, 256, 0, 256, _r, _i),
+      canvas = _draw$raw_spectrum.canvas,
+      imageData = _draw$raw_spectrum.imageData;
+
+  if (zip) {
+    var name = (0, _sprintfJs.sprintf)('frame_%05d.png', count);
+    var dataURL = canvas.toDataURL("image/png");
+    zip.file(name, dataURL.split(',')[1], { base64: true });
+  }
+  return { fft: fft, canvas: canvas, imageData: imageData };
+}
+
+/***/ }),
+
+/***/ "./app/client/auth/auth.actions.js":
+/*!*****************************************!*\
+  !*** ./app/client/auth/auth.actions.js ***!
+  \*****************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.clearCurrentUser = exports.setCurrentUser = exports.setError = exports.setReturnTo = exports.setToken = undefined;
+exports.initialized = initialized;
+exports.loading = loading;
+exports.InvalidCredentialsException = InvalidCredentialsException;
+exports.login = login;
+exports.signup = signup;
+exports.checkin = checkin;
+exports.logout = logout;
+
+var _types = __webpack_require__(/*! ../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _crud = __webpack_require__(/*! ../api/crud.fetch */ "./app/client/api/crud.fetch.js");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var setToken = exports.setToken = function setToken(data) {
+  return { type: _types2.default.auth.set_token, data: data };
+};
+var setReturnTo = exports.setReturnTo = function setReturnTo(data) {
+  return { type: _types2.default.auth.set_return_to, data: data };
+};
+var setError = exports.setError = function setError(data) {
+  return { type: _types2.default.auth.set_error, data: data };
+};
+var setCurrentUser = exports.setCurrentUser = function setCurrentUser(data) {
+  return { type: _types2.default.auth.set_current_user, data: data };
+};
+var clearCurrentUser = exports.clearCurrentUser = function clearCurrentUser() {
+  return { type: _types2.default.auth.logout_user };
+};
+function initialized() {
+  return { type: _types2.default.auth.initialized };
+}
+function loading() {
+  return { type: _types2.default.auth.loading };
+}
+
+function InvalidCredentialsException(message) {
+  this.message = message;
+  this.name = 'InvalidCredentialsException';
+}
+
+var api = {
+  login: '/api/login',
+  logout: '/api/logout',
+  signup: '/api/signup',
+  checkin: '/api/checkin'
+};
+
+function login(username, password) {
+  return function (dispatch) {
+    dispatch(loading());
+    fetch(api.login, (0, _crud.put)({
+      username: username,
+      password: password
+    })).then(function (req) {
+      return req.json();
+    }).then(function (data) {
+      console.log(data);
+      console.log('logged in', data.user.username);
+      dispatch(setCurrentUser(data.user));
+    }).catch(function (error) {
+      console.error('login error', error);
+      dispatch(setError(true));
+    });
+  };
+}
+
+function signup(data) {
+  return function (dispatch) {
+    dispatch(loading());
+    fetch(api.signup, (0, _crud.put)(data)).then(function (req) {
+      return req.json();
+    }).then(function (data) {
+      console.log(data);
+      console.log('signed up', data.user.username);
+      dispatch(setCurrentUser(data.user));
+    }).catch(function (error) {
+      console.error('signup error', error);
+      dispatch(initialized());
+    });
+  };
+}
+
+function checkin() {
+  return function (dispatch) {
+    dispatch(loading());
+    fetch(api.checkin, (0, _crud.put)({})).then(function (req) {
+      return req.json();
+    }).then(function (data) {
+      // console.log(data)
+      console.log('checked in', data.user.username);
+      dispatch(setCurrentUser(data.user));
+    }).catch(function (error) {
+      console.error('checkin error', error);
+      dispatch(initialized());
+    });
+  };
+}
+
+function logout() {
+  return function (dispatch) {
+    dispatch(loading());
+    fetch(api.logout, (0, _crud._get_headers)({})).then(function (req) {
+      return req.json();
+    }).then(function (data) {
+      console.log('logged out', data);
+      dispatch(clearCurrentUser());
+      dispatch(initialized());
+    }).catch(function (error) {
+      console.error('logout error', error);
+      dispatch(clearCurrentUser());
+      dispatch(initialized());
+    });
+  };
+}
+
+/***/ }),
+
+/***/ "./app/client/auth/auth.gate.js":
+/*!**************************************!*\
+  !*** ./app/client/auth/auth.gate.js ***!
+  \**************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _reactRouterDom = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _store = __webpack_require__(/*! ../store */ "./app/client/store.js");
+
+var _auth = __webpack_require__(/*! ./auth.actions */ "./app/client/auth/auth.actions.js");
+
+var authActions = _interopRequireWildcard(_auth);
+
+var _login = __webpack_require__(/*! ./login.component */ "./app/client/auth/login.component.js");
+
+var _login2 = _interopRequireDefault(_login);
+
+var _logout = __webpack_require__(/*! ./logout.component */ "./app/client/auth/logout.component.js");
+
+var _logout2 = _interopRequireDefault(_logout);
+
+var _signup = __webpack_require__(/*! ./signup.component */ "./app/client/auth/signup.component.js");
+
+var _signup2 = _interopRequireDefault(_signup);
+
+var _math = __webpack_require__(/*! ../util/math */ "./app/client/util/math.js");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+// import PropTypes from 'prop-types';
+
+
+var AuthRouter = function (_Component) {
+  _inherits(AuthRouter, _Component);
+
+  function AuthRouter() {
+    _classCallCheck(this, AuthRouter);
+
+    return _possibleConstructorReturn(this, (AuthRouter.__proto__ || Object.getPrototypeOf(AuthRouter)).apply(this, arguments));
+  }
+
+  _createClass(AuthRouter, [{
+    key: 'render',
+    value: function render() {
+      var _this2 = this;
+
+      return (0, _preact.h)(
+        _reactRouterDom.BrowserRouter,
+        null,
+        (0, _preact.h)(
+          'div',
+          null,
+          (0, _preact.h)('div', { className: 'diamond' }),
+          (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/', component: _login2.default }),
+          (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/login', component: _login2.default }),
+          (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/logout', component: _logout2.default }),
+          (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/signup', component: _signup2.default }),
+          (0, _preact.h)(_reactRouterDom.Route, { path: '/:module', component: function component(props) {
+              switch (props.location.pathname) {
+                case '/login':
+                case '/logout':
+                case '/signup':
+                  return null;
+              }
+              _this2.props.actions.setReturnTo(props.location.pathname);
+              return (0, _preact.h)(_reactRouterDom.Redirect, { to: '/login' });
+            } })
+        )
+      );
+    }
+  }, {
+    key: 'componentDidMount',
+    value: function componentDidMount() {
+      document.querySelector('.diamond').style.backgroundImage = 'linear-gradient(' + ((0, _math.randint)(40) - 5) + 'deg, #fde, #ffe)';
+    }
+  }]);
+
+  return AuthRouter;
+}(_preact.Component);
+
+var AuthGate = function (_Component2) {
+  _inherits(AuthGate, _Component2);
+
+  function AuthGate() {
+    _classCallCheck(this, AuthGate);
+
+    return _possibleConstructorReturn(this, (AuthGate.__proto__ || Object.getPrototypeOf(AuthGate)).apply(this, arguments));
+  }
+
+  _createClass(AuthGate, [{
+    key: 'render',
+    value: function render() {
+      if (true && !this.props.auth.initialized) {
+        console.log('loading auth');
+        return (0, _preact.h)(
+          'div',
+          { className: 'loading' },
+          'Loading'
+        );
+      }
+      if (true) {
+        console.log('authenticated...');
+        if (this.props.auth.returnTo) {
+          var returnTo = this.props.auth.returnTo;
+
+          if (!returnTo || returnTo.match(/(login|logout|signup)/i)) {
+            returnTo = '/';
+          }
+          console.log('history.push', returnTo);
+          this.props.actions.setReturnTo(null);
+          _store.history.push(returnTo);
+          return (0, _preact.h)(
+            'div',
+            null,
+            'Launching app'
+          );
+        }
+        console.log('rendering as normal');
+        return (0, _preact.h)(
+          'div',
+          null,
+          this.props.children
+        );
+      }
+      return (0, _preact.h)(AuthRouter, this.props);
+    }
+  }, {
+    key: 'componentDidMount',
+    value: function componentDidMount() {
+      this.props.actions.checkin();
+    }
+  }]);
+
+  return AuthGate;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {
+    auth: state.auth
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch) {
+  return {
+    actions: (0, _redux.bindActionCreators)(authActions, dispatch)
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(AuthGate);
+
+/***/ }),
+
+/***/ "./app/client/auth/auth.reducer.js":
+/*!*****************************************!*\
+  !*** ./app/client/auth/auth.reducer.js ***!
+  \*****************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _types = __webpack_require__(/*! ../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var authInitialState = {
+  token: null,
+  user: {},
+  groups: {},
+  initialized: false,
+  loading: false,
+  isAuthenticated: false,
+  returnTo: null
+};
+
+var auth = function auth() {
+  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : authInitialState;
+  var action = arguments[1];
+
+  console.log(action);
+  switch (action.type) {
+    case _types2.default.auth.set_token:
+      return _extends({}, state, {
+        token: action.data,
+        isAuthenticated: !!action.data,
+        loading: false,
+        error: null
+      });
+
+    case _types2.default.auth.initialized:
+      return _extends({}, state, {
+        loading: false,
+        initialized: true,
+        error: null
+      });
+
+    case _types2.default.auth.loading:
+      return _extends({}, state, {
+        loading: true,
+        error: null
+      });
+
+    case _types2.default.auth.set_current_user:
+      return _extends({}, state, {
+        loading: false,
+        initialized: true,
+        isAuthenticated: true,
+        user: action.data,
+        error: null
+      });
+
+    case _types2.default.auth.set_return_to:
+      return _extends({}, state, {
+        returnTo: action.data
+      });
+
+    case _types2.default.auth.logout_user:
+      return _extends({}, authInitialState);
+
+    case _types2.default.auth.set_error:
+      return _extends({}, state, {
+        loading: false,
+        error: action.data
+      });
+
+    case _types2.default.auth.loading:
+      // const initial_state_el = document.querySelector('#initial_state')
+      // if (initial_state_el) {
+      //   try {
+      //     const initial_state = JSON.parse(initial_state_el.innerHTML)
+      //     if (initial_state && initial_state.auth && initial_state.auth.user) {
+      //       console.log(initial_state.auth.user)
+      //       return {
+      //         ...state,
+      //         user: {
+      //           ...initial_state.auth.user,
+      //         }
+      //       }
+      //     }
+      //   } catch (e) {
+      //     console.error("error loading initial state")
+      //   }
+      // }
+      return state;
+
+    default:
+      return state;
+  }
+};
+
+exports.default = auth;
+
+/***/ }),
+
+/***/ "./app/client/auth/index.js":
+/*!**********************************!*\
+  !*** ./app/client/auth/index.js ***!
+  \**********************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _auth = __webpack_require__(/*! ./auth.gate */ "./app/client/auth/auth.gate.js");
+
+var _auth2 = _interopRequireDefault(_auth);
+
+var _login = __webpack_require__(/*! ./login.component */ "./app/client/auth/login.component.js");
+
+var _login2 = _interopRequireDefault(_login);
+
+var _logout = __webpack_require__(/*! ./logout.component */ "./app/client/auth/logout.component.js");
+
+var _logout2 = _interopRequireDefault(_logout);
+
+var _signup = __webpack_require__(/*! ./signup.component */ "./app/client/auth/signup.component.js");
+
+var _signup2 = _interopRequireDefault(_signup);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = {
+  Gate: _auth2.default,
+  Login: _login2.default,
+  Logout: _logout2.default,
+  Signup: _signup2.default
+};
+
+/***/ }),
+
+/***/ "./app/client/auth/login.component.js":
+/*!********************************************!*\
+  !*** ./app/client/auth/login.component.js ***!
+  \********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _reactRouterDom = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
+
+var _auth = __webpack_require__(/*! ./auth.actions */ "./app/client/auth/auth.actions.js");
+
+var authActions = _interopRequireWildcard(_auth);
+
+var _common = __webpack_require__(/*! ../common */ "./app/client/common/index.js");
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+// import PropTypes from 'prop-types';
+
+// import { Link } from 'react-router-dom';
+
+
+var Login = function (_Component) {
+  _inherits(Login, _Component);
+
+  function Login() {
+    _classCallCheck(this, Login);
+
+    var _this = _possibleConstructorReturn(this, (Login.__proto__ || Object.getPrototypeOf(Login)).call(this));
+
+    _this.state = {
+      username: '',
+      password: ''
+    };
+
+    _this.handleChange = _this.handleChange.bind(_this);
+    _this.handleSubmit = _this.handleSubmit.bind(_this);
+    return _this;
+  }
+
+  _createClass(Login, [{
+    key: 'handleChange',
+    value: function handleChange(value, name) {
+      var _setState;
+
+      this.setState((_setState = {}, _defineProperty(_setState, name, value), _defineProperty(_setState, 'error', null), _setState));
+    }
+  }, {
+    key: 'handleSubmit',
+    value: function handleSubmit(e) {
+      e.preventDefault();
+      if (this.props.auth.loading) return;
+      this.props.actions.login(this.state.username, this.state.password);
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      return (0, _preact.h)(
+        'form',
+        { onSubmit: this.handleSubmit },
+        (0, _preact.h)(
+          'h1',
+          null,
+          'Log in'
+        ),
+        (0, _preact.h)('br', null),
+        (0, _preact.h)(
+          _common.Group,
+          null,
+          (0, _preact.h)(_common.TextInput, {
+            autofocus: true,
+            autocapitalize: 'off',
+            autocomplete: 'off',
+            title: 'Username',
+            name: 'username',
+            type: 'text',
+            value: this.state.username,
+            onInput: this.handleChange
+          }),
+          (0, _preact.h)(_common.TextInput, {
+            title: 'Password',
+            name: 'password',
+            type: 'password',
+            value: this.state.password,
+            onInput: this.handleChange
+          }),
+          (0, _preact.h)(
+            _common.Button,
+            {
+              loading: this.props.auth.loading
+            },
+            'Login'
+          ),
+          this.renderAuthError()
+        )
+      );
+    }
+  }, {
+    key: 'renderAuthError',
+    value: function renderAuthError() {
+      if (this.props.auth.error) {
+        return (0, _preact.h)(
+          'div',
+          { className: 'form-input-hint' },
+          "There was an error logging you in (bad password?)"
+        );
+      }
+      return null;
+    }
+  }]);
+
+  return Login;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {
+    auth: state.auth
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch) {
+  return {
+    actions: (0, _redux.bindActionCreators)(authActions, dispatch)
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Login);
+
+/***/ }),
+
+/***/ "./app/client/auth/logout.component.js":
+/*!*********************************************!*\
+  !*** ./app/client/auth/logout.component.js ***!
+  \*********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _reactRouterDom = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
+
+var _auth = __webpack_require__(/*! ./auth.actions */ "./app/client/auth/auth.actions.js");
+
+var authActions = _interopRequireWildcard(_auth);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+// import PropTypes from 'prop-types';
+
+
+var Logout = function (_Component) {
+  _inherits(Logout, _Component);
+
+  function Logout() {
+    _classCallCheck(this, Logout);
+
+    return _possibleConstructorReturn(this, (Logout.__proto__ || Object.getPrototypeOf(Logout)).apply(this, arguments));
+  }
+
+  _createClass(Logout, [{
+    key: 'componentWillMount',
+    value: function componentWillMount(props) {
+      this.props.actions.logout();
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      return (0, _preact.h)(_reactRouterDom.Redirect, { to: '/' });
+    }
+  }]);
+
+  return Logout;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {};
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch) {
+  return {
+    actions: (0, _redux.bindActionCreators)(authActions, dispatch)
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Logout);
+
+/***/ }),
+
+/***/ "./app/client/auth/signup.component.js":
+/*!*********************************************!*\
+  !*** ./app/client/auth/signup.component.js ***!
+  \*********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _reactRouterDom = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
+
+var _auth = __webpack_require__(/*! ./auth.actions */ "./app/client/auth/auth.actions.js");
+
+var actions = _interopRequireWildcard(_auth);
+
+var _common = __webpack_require__(/*! ../common */ "./app/client/common/index.js");
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var Signup = function (_Component) {
+  _inherits(Signup, _Component);
+
+  function Signup() {
+    _classCallCheck(this, Signup);
+
+    var _this = _possibleConstructorReturn(this, (Signup.__proto__ || Object.getPrototypeOf(Signup)).call(this));
+
+    _this.state = {
+      username: '',
+      password: '',
+      password2: ''
+    };
+
+    _this.handleChange = _this.handleChange.bind(_this);
+    _this.handleSubmit = _this.handleSubmit.bind(_this);
+    return _this;
+  }
+
+  _createClass(Signup, [{
+    key: 'handleChange',
+    value: function handleChange(value, name) {
+      this.setState(_defineProperty({}, name, value));
+    }
+  }, {
+    key: 'validate',
+    value: function validate() {
+      if (!this.state.password || this.state.password !== this.state.password2) {
+        return false;
+      }
+      return true;
+    }
+  }, {
+    key: 'handleSubmit',
+    value: function handleSubmit(e) {
+      e.preventDefault();
+      if (this.props.auth.loading) return;
+      if (!this.validate()) {
+        return this.props.actions.setError('bad password');
+      }
+
+      var user = _objectWithoutProperties(this.state, []);
+
+      this.props.actions.signup(user);
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      if (this.props.auth.isAuthenticated) {
+        var returnTo = this.props.auth.returnTo;
+
+        if (!returnTo || returnTo.match(/(api|login|logout|signup)/i)) {
+          returnTo = '/';
+        }
+        return (0, _preact.h)(_reactRouterDom.Redirect, { to: returnTo });
+      }
+      return (0, _preact.h)(
+        'form',
+        { onSubmit: this.handleSubmit },
+        (0, _preact.h)(
+          'h1',
+          null,
+          'New account'
+        ),
+        (0, _preact.h)('br', null),
+        (0, _preact.h)(
+          _common.Group,
+          null,
+          (0, _preact.h)(_common.TextInput, {
+            autofocus: true,
+            autocapitalize: 'off',
+            autocomplete: 'off',
+            title: 'Username',
+            name: 'username',
+            type: 'text',
+            value: this.state.username,
+            onInput: this.handleChange
+          }),
+          (0, _preact.h)(_common.TextInput, {
+            title: 'Password',
+            name: 'password',
+            type: 'password',
+            value: this.state.password,
+            onInput: this.handleChange
+          }),
+          (0, _preact.h)(_common.TextInput, {
+            title: 'Password again :)',
+            name: 'password2',
+            type: 'password',
+            value: this.state.password2,
+            onInput: this.handleChange
+          }),
+          (0, _preact.h)(
+            _common.Button,
+            {
+              loading: this.props.auth.loading
+            },
+            'Sign up'
+          ),
+          this.renderAuthError()
+        )
+      );
+    }
+  }, {
+    key: 'renderAuthError',
+    value: function renderAuthError() {
+      if (this.props.auth.error) {
+        return (0, _preact.h)(
+          'div',
+          { className: 'form-input-hint' },
+          "Please doublecheck the form (o=_o~~)"
+        );
+      }
+      return (0, _preact.h)('div', { className: 'form-input-hint' });
+    }
+  }]);
+
+  return Signup;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {
+    auth: state.auth
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch) {
+  return {
+    actions: (0, _redux.bindActionCreators)(_extends({}, actions), dispatch)
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Signup);
+
+/***/ }),
+
+/***/ "./app/client/browser/browser.component.js":
+/*!*************************************************!*\
+  !*** ./app/client/browser/browser.component.js ***!
+  \*************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _reactRouterDom = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
+
+var _common = __webpack_require__(/*! ../common */ "./app/client/common/index.js");
+
+var _actions = __webpack_require__(/*! ../actions */ "./app/client/actions.js");
+
+var _actions2 = _interopRequireDefault(_actions);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+/*
+ at this point we can list files
+ - filelist should support parentdirectory
+ - filelist should list directories first
+ - handle fetching a file from the server
+   - maybe don't let it fetch if it's larger than 2 megs?
+*/
+
+var Browser = function (_Component) {
+  _inherits(Browser, _Component);
+
+  function Browser() {
+    var _ref;
+
+    var _temp, _this, _ret;
+
+    _classCallCheck(this, Browser);
+
+    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+      args[_key] = arguments[_key];
+    }
+
+    return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Browser.__proto__ || Object.getPrototypeOf(Browser)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+      dir: '/',
+      module: 'pix2pixhd',
+      files: [],
+      loading: true
+    }, _temp), _possibleConstructorReturn(_this, _ret);
+  }
+
+  _createClass(Browser, [{
+    key: 'componentDidMount',
+    value: function componentDidMount() {
+      this.fetch(this.state.dir);
+    }
+  }, {
+    key: 'handlePick',
+    value: function handlePick(file) {
+      console.log(file);
+      this.fetch([this.state.dir, file.name].join('/').replace('//', '/'));
+    }
+  }, {
+    key: 'fetch',
+    value: function fetch(dir) {
+      var _this2 = this;
+
+      console.log('fetch', dir);
+      var module = this.state.module;
+
+      this.setState({ dir: dir, loading: true });
+      _actions2.default.socket.list_directory({ module: module, dir: dir }).then(function (files) {
+        console.log(files);
+        _this2.setState({ dir: dir, files: files, loading: false });
+      });
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      var _this3 = this;
+
+      var app = this.props.app;
+      var _state = this.state,
+          loading = _state.loading,
+          dir = _state.dir,
+          module = _state.module,
+          files = _state.files;
+
+      console.log(this.props, this.state);
+      return (0, _preact.h)(
+        'div',
+        { className: 'app browser' },
+        (0, _preact.h)(
+          'h1',
+          null,
+          dir
+        ),
+        app.tool,
+        (0, _preact.h)('br', null),
+        loading && (0, _preact.h)(_common.Loading, null),
+        (0, _preact.h)(_common.FileList, {
+          files: files,
+          groupDirectories: true,
+          parentDirectory: dir !== '/',
+          orderBy: 'name asc',
+          fields: 'name datetime size',
+          onClick: function onClick(file, e) {
+            e.preventDefault();
+            e.stopPropagation();
+            console.log('picked a result', file);
+            _this3.handlePick(file);
+          },
+          onClickParent: function onClickParent(e) {
+            console.log('navigate up');
+            _this3.fetch(_this3.state.dir.split('/').slice(0, -1).join('') || '/');
+          }
+        })
+      );
+    }
+  }]);
+
+  return Browser;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {
+    app: state.system.app
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    actions: (0, _redux.bindActionCreators)({}, dispatch)
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Browser);
+
+/***/ }),
+
+/***/ "./app/client/browser/browser.reducer.js":
+/*!***********************************************!*\
+  !*** ./app/client/browser/browser.reducer.js ***!
+  \***********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _types = __webpack_require__(/*! ../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _moment = __webpack_require__(/*! moment/min/moment.min */ "./node_modules/moment/min/moment.min.js");
+
+var _moment2 = _interopRequireDefault(_moment);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var FileSaver = __webpack_require__(/*! file-saver */ "./node_modules/file-saver/FileSaver.js");
+
+var browserInitialState = {
+  loading: false,
+  progress: null,
+  error: null,
+  data: {},
+  images: [],
+  files: []
+};
+
+var browserReducer = function browserReducer() {
+  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : browserInitialState;
+  var action = arguments[1];
+
+  switch (action.type) {
+    case _types2.default.app.load_progress:
+      if (!action.data || action.data.module !== 'browser') {
+        return state;
+      }
+      return _extends({}, state, {
+        loading: true,
+        progress: action.progress
+      });
+    case _types2.default.app.load:
+      return _extends({}, state, {
+        loading: false,
+        error: null,
+        data: action.data
+      });
+    default:
+      return state;
+  }
+};
+
+exports.default = browserReducer;
+
+/***/ }),
+
+/***/ "./app/client/common/audioPlayer/audioPlayer.actions.js":
+/*!**************************************************************!*\
+  !*** ./app/client/common/audioPlayer/audioPlayer.actions.js ***!
+  \**************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.enqueue = exports.resume = exports.pause = exports.play = undefined;
+
+var _types = __webpack_require__(/*! ../../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var play = exports.play = function play(file) {
+  return { type: _types2.default.audioPlayer.play, file: file };
+};
+var pause = exports.pause = function pause() {
+  return { type: _types2.default.audioPlayer.pause };
+};
+var resume = exports.resume = function resume() {
+  return { type: _types2.default.audioPlayer.resume };
+};
+var enqueue = exports.enqueue = function enqueue(file) {
+  return { type: _types2.default.audioPlayer.enqueue, file: file };
+};
+
+/***/ }),
+
+/***/ "./app/client/common/audioPlayer/audioPlayer.component.js":
+/*!****************************************************************!*\
+  !*** ./app/client/common/audioPlayer/audioPlayer.component.js ***!
+  \****************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _audioPlayer = __webpack_require__(/*! ./audioPlayer.actions */ "./app/client/common/audioPlayer/audioPlayer.actions.js");
+
+var audioPlayerActions = _interopRequireWildcard(_audioPlayer);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var AudioPlayer = function (_Component) {
+  _inherits(AudioPlayer, _Component);
+
+  function AudioPlayer(props) {
+    _classCallCheck(this, AudioPlayer);
+
+    var _this = _possibleConstructorReturn(this, (AudioPlayer.__proto__ || Object.getPrototypeOf(AudioPlayer)).call(this, props));
+
+    _this.handleClick = _this.handleClick.bind(_this);
+    return _this;
+  }
+
+  _createClass(AudioPlayer, [{
+    key: 'handleClick',
+    value: function handleClick(e) {
+      var _props = this.props,
+          audioPlayer = _props.audioPlayer,
+          actions = _props.actions;
+
+      if (audioPlayer.playing) {
+        actions.pause();
+      } else {
+        actions.resume();
+      }
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      var audioPlayer = this.props.audioPlayer;
+
+      return (0, _preact.h)(
+        'div',
+        { className: 'audioPlayer' },
+        (0, _preact.h)(
+          'span',
+          null,
+          this.props.title
+        ),
+        (0, _preact.h)(
+          'button',
+          {
+            onClick: this.handleClick
+          },
+          audioPlayer.playing ? '▶' : '~'
+        )
+      );
+    }
+  }]);
+
+  return AudioPlayer;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {
+    audioPlayer: state.audioPlayer
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    actions: (0, _redux.bindActionCreators)(audioPlayerActions, dispatch)
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(AudioPlayer);
+
+/***/ }),
+
+/***/ "./app/client/common/audioPlayer/audioPlayer.reducer.js":
+/*!**************************************************************!*\
+  !*** ./app/client/common/audioPlayer/audioPlayer.reducer.js ***!
+  \**************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _types = __webpack_require__(/*! ../../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var audioPlayerInitialState = {
+  loading: false,
+  error: null,
+  status: '',
+  current: null,
+  index: -1,
+  playlist: []
+};
+
+var audio = document.createElement('audio');
+
+var audioPlayerReducer = function audioPlayerReducer() {
+  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : audioPlayerInitialState;
+  var action = arguments[1];
+
+  switch (action.type) {
+    case _types2.default.audioPlayer.play:
+      if (!action.file.url) {
+        return state;
+      }
+      audio.src = action.file.url;
+      audio.play();
+      return _extends({}, state, {
+        playing: true,
+        current: action.file
+      });
+    case _types2.default.audioPlayer.pause:
+      audio.pause();
+      return _extends({}, state, {
+        playing: false
+      });
+    case _types2.default.audioPlayer.resume:
+      audio.play();
+      return _extends({}, state, {
+        playing: true
+      });
+    default:
+      return state;
+  }
+};
+
+exports.default = audioPlayerReducer;
+
+/***/ }),
+
+/***/ "./app/client/common/augmentationGrid.component.js":
+/*!*********************************************************!*\
+  !*** ./app/client/common/augmentationGrid.component.js ***!
+  \*********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _group = __webpack_require__(/*! ./group.component */ "./app/client/common/group.component.js");
+
+var _group2 = _interopRequireDefault(_group);
+
+var _param = __webpack_require__(/*! ./param.component */ "./app/client/common/param.component.js");
+
+var _param2 = _interopRequireDefault(_param);
+
+var _button = __webpack_require__(/*! ./button.component */ "./app/client/common/button.component.js");
+
+var _button2 = _interopRequireDefault(_button);
+
+var _buttonGrid = __webpack_require__(/*! ./buttonGrid.component */ "./app/client/common/buttonGrid.component.js");
+
+var _buttonGrid2 = _interopRequireDefault(_buttonGrid);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var AugmentationGrid = function (_Component) {
+  _inherits(AugmentationGrid, _Component);
+
+  function AugmentationGrid() {
+    var _ref;
+
+    var _temp, _this, _ret;
+
+    _classCallCheck(this, AugmentationGrid);
+
+    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+      args[_key] = arguments[_key];
+    }
+
+    return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = AugmentationGrid.__proto__ || Object.getPrototypeOf(AugmentationGrid)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+      x: 0, y: 0, sum: 0
+    }, _temp), _possibleConstructorReturn(_this, _ret);
+  }
+
+  _createClass(AugmentationGrid, [{
+    key: 'render',
+    value: function render() {
+      var _this2 = this;
+
+      var _props = this.props,
+          make = _props.make,
+          take = _props.take,
+          checkpoint = _props.checkpoint,
+          onTrain = _props.onTrain,
+          onAugment = _props.onAugment;
+      var _state = this.state,
+          x = _state.x,
+          y = _state.y,
+          sum = _state.sum;
+
+      var rows = [];
+      return (0, _preact.h)(
+        _group2.default,
+        { className: 'augmentationGrid' },
+        (0, _preact.h)(_buttonGrid2.default, {
+          x: make,
+          y: take,
+          max: 5000,
+          onHover: function onHover(x, y) {
+            return _this2.setState({ x: x, y: y });
+          },
+          onClick: function onClick(x, y) {
+            _this2.setState({ sum: sum + x * y });
+            onAugment(y, x);
+          }
+        }),
+        (0, _preact.h)(
+          _param2.default,
+          { title: 'Name' },
+          checkpoint.name
+        ),
+        (0, _preact.h)(
+          _param2.default,
+          { title: 'Take' },
+          y
+        ),
+        (0, _preact.h)(
+          _param2.default,
+          { title: 'Make' },
+          x
+        ),
+        (0, _preact.h)(
+          _param2.default,
+          { title: 'Will add to dataset' },
+          x * y
+        ),
+        (0, _preact.h)(
+          _param2.default,
+          { title: 'Total added this epoch' },
+          sum
+        ),
+        (0, _preact.h)(
+          _param2.default,
+          { title: 'Sequence length' },
+          checkpoint.sequenceCount
+        ),
+        (0, _preact.h)(
+          _param2.default,
+          { title: 'Dataset size' },
+          checkpoint.datasetCount
+        ),
+        (0, _preact.h)(
+          _button2.default,
+          { onClick: function onClick() {
+              _this2.setState({ sum: 0 });
+              onTrain();
+            } },
+          'Train'
+        )
+      );
+    }
+  }]);
+
+  return AugmentationGrid;
+}(_preact.Component);
+
+exports.default = AugmentationGrid;
+
+/***/ }),
+
+/***/ "./app/client/common/button.component.js":
+/*!***********************************************!*\
+  !*** ./app/client/common/button.component.js ***!
+  \***********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _live = __webpack_require__(/*! ../live/live.actions */ "./app/client/live/live.actions.js");
+
+var liveActions = _interopRequireWildcard(_live);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var Button = function (_Component) {
+  _inherits(Button, _Component);
+
+  function Button(props) {
+    _classCallCheck(this, Button);
+
+    var _this = _possibleConstructorReturn(this, (Button.__proto__ || Object.getPrototypeOf(Button)).call(this, props));
+
+    _this.handleClick = _this.handleClick.bind(_this);
+    return _this;
+  }
+
+  _createClass(Button, [{
+    key: 'handleClick',
+    value: function handleClick(e) {
+      this.props.onClick && this.props.onClick();
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      return (0, _preact.h)(
+        'div',
+        { className: 'button param' },
+        (0, _preact.h)(
+          'label',
+          null,
+          (0, _preact.h)(
+            'span',
+            null,
+            this.props.title
+          ),
+          (0, _preact.h)(
+            'button',
+            {
+              onClick: this.handleClick
+            },
+            this.props.value || this.props.children
+          )
+        )
+      );
+    }
+  }]);
+
+  return Button;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {};
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {};
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Button);
+
+/***/ }),
+
+/***/ "./app/client/common/buttonGrid.component.js":
+/*!***************************************************!*\
+  !*** ./app/client/common/buttonGrid.component.js ***!
+  \***************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var ButtonGrid = function (_Component) {
+  _inherits(ButtonGrid, _Component);
+
+  function ButtonGrid() {
+    var _ref;
+
+    var _temp, _this, _ret;
+
+    _classCallCheck(this, ButtonGrid);
+
+    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+      args[_key] = arguments[_key];
+    }
+
+    return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = ButtonGrid.__proto__ || Object.getPrototypeOf(ButtonGrid)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+      x: 0, y: 0
+    }, _temp), _possibleConstructorReturn(_this, _ret);
+  }
+
+  _createClass(ButtonGrid, [{
+    key: 'render',
+    value: function render() {
+      var _this2 = this;
+
+      var _state = this.state,
+          _x = _state.x,
+          _y = _state.y;
+      var _props = this.props,
+          X = _props.x,
+          Y = _props.y,
+          _props$max = _props.max,
+          max = _props$max === undefined ? Infinity : _props$max,
+          _onClick = _props.onClick,
+          onHover = _props.onHover;
+
+      return (0, _preact.h)(
+        'table',
+        { className: 'buttonGrid' },
+        (0, _preact.h)(
+          'tr',
+          { className: 'row' },
+          (0, _preact.h)(
+            'th',
+            null,
+            " "
+          ),
+          X.map(function (x) {
+            return (0, _preact.h)(
+              'th',
+              { className: x === _x && 'bold' },
+              x
+            );
+          })
+        ),
+        Y.map(function (y) {
+          return (0, _preact.h)(
+            'tr',
+            { className: 'row' },
+            (0, _preact.h)(
+              'th',
+              { className: y === _y && 'bold' },
+              y
+            ),
+            X.map(function (x) {
+              return (0, _preact.h)(
+                'td',
+                null,
+                x * y > max ? " " : (0, _preact.h)(
+                  'button',
+                  {
+                    onClick: function onClick() {
+                      return _onClick(x, y);
+                    },
+                    onMouseEnter: function onMouseEnter() {
+                      _this2.setState({ x: x, y: y });
+                      onHover(x, y);
+                    }
+                  },
+                  " "
+                )
+              );
+            })
+          );
+        })
+      );
+    }
+  }]);
+
+  return ButtonGrid;
+}(_preact.Component);
+
+exports.default = ButtonGrid;
+
+/***/ }),
+
+/***/ "./app/client/common/checkbox.component.js":
+/*!*************************************************!*\
+  !*** ./app/client/common/checkbox.component.js ***!
+  \*************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _live = __webpack_require__(/*! ../live/live.actions */ "./app/client/live/live.actions.js");
+
+var liveActions = _interopRequireWildcard(_live);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var Checkbox = function (_Component) {
+  _inherits(Checkbox, _Component);
+
+  function Checkbox(props) {
+    _classCallCheck(this, Checkbox);
+
+    var _this = _possibleConstructorReturn(this, (Checkbox.__proto__ || Object.getPrototypeOf(Checkbox)).call(this, props));
+
+    _this.handleClick = _this.handleClick.bind(_this);
+    return _this;
+  }
+
+  _createClass(Checkbox, [{
+    key: 'handleClick',
+    value: function handleClick(e) {
+      clearTimeout(this.timeout);
+      var new_value = e.target.checked;
+      this.props.onToggle && this.props.onToggle(new_value);
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      var checked = this.props.value;
+      var dim = !this.props.noDim;
+      return (0, _preact.h)(
+        'div',
+        { className: 'checkbox param' },
+        (0, _preact.h)(
+          'label',
+          null,
+          (0, _preact.h)(
+            'span',
+            null,
+            this.props.title
+          ),
+          (0, _preact.h)('input', {
+            type: 'checkbox',
+            onClick: this.handleClick,
+            checked: checked
+          })
+        )
+      );
+    }
+  }]);
+
+  return Checkbox;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {};
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    // actions: bindActionCreators(liveActions, dispatch)
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Checkbox);
+
+/***/ }),
+
+/***/ "./app/client/common/currentTask.component.js":
+/*!****************************************************!*\
+  !*** ./app/client/common/currentTask.component.js ***!
+  \****************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _util = __webpack_require__(/*! ../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+// import { Loading, CurrentTask, FileList, FileRow } from '../../../common'
+
+function CurrentTask(_ref) {
+  var cpu = _ref.cpu,
+      gpu = _ref.gpu,
+      processor = _ref.processor;
+
+  var processor_name = void 0;
+  if (processor) {
+    processor_name = processor === 'cpu' ? 'cpu' : 'gpu';
+  } else if (gpu.status !== 'IDLE') {
+    processor_name = 'gpu';
+  } else if (cpu.status !== 'IDLE') {
+    processor_name = 'cpu';
+  }
+  var p = processor_name === 'cpu' ? cpu : gpu;
+  if (!p) return (0, _preact.h)('div', null);
+  if (p.status === 'IDLE') {
+    return (0, _preact.h)(
+      'div',
+      null,
+      processor_name,
+      ' idle'
+    );
+  }
+  var last_message = p.last_message,
+      pid = p.pid,
+      task = p.task;
+  var activity = task.activity,
+      epoch = task.epoch,
+      epochs = task.epochs,
+      dataset = task.dataset,
+      module = task.module;
+
+  return (0, _preact.h)(
+    'div',
+    { className: 'currentTask' },
+    '#',
+    pid,
+    ': ',
+    (0, _preact.h)(
+      'b',
+      null,
+      module,
+      ' ',
+      activity
+    ),
+    ' ',
+    (0, _preact.h)(
+      'i',
+      null,
+      dataset
+    ),
+    !!epochs ? (0, _preact.h)(
+      'span',
+      null,
+      epochs,
+      ' epoch',
+      _util2.default.courtesy_s(epochs)
+    ) : "",
+    epoch ? (0, _preact.h)(
+      'span',
+      null,
+      '(currently #',
+      epoch,
+      ')'
+    ) : "",
+    (0, _preact.h)('br', null),
+    (0, _preact.h)('br', null),
+    (0, _preact.h)(
+      'div',
+      { 'class': 'quiet' },
+      last_message
+    )
+  );
+}
+
+var mapStateToProps = function mapStateToProps(state) {
+  return state.system.runner;
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    // actions: bindActionCreators(samplernnActions, dispatch),
+    // remote: bindActionCreators(samplernnTasks, dispatch),
+    // audioPlayer: bindActionCreators(audioPlayerActions, dispatch),
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(CurrentTask);
+
+/***/ }),
+
+/***/ "./app/client/common/fileList.component.js":
+/*!*************************************************!*\
+  !*** ./app/client/common/fileList.component.js ***!
+  \*************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.FileRow = exports.FileList = undefined;
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _reactRouterDom = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
+
+var _moment = __webpack_require__(/*! moment/min/moment.min */ "./node_modules/moment/min/moment.min.js");
+
+var _moment2 = _interopRequireDefault(_moment);
+
+var _util = __webpack_require__(/*! ../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var fieldSet = _util2.default.fieldSet(new Set(['name', 'date', 'size']));
+
+var FileList = exports.FileList = function FileList(props) {
+  var files = props.files,
+      fields = props.fields,
+      sort = props.sort,
+      title = props.title,
+      linkFiles = props.linkFiles,
+      onClick = props.onClick,
+      onClickParent = props.onClickParent,
+      onDelete = props.onDelete,
+      groupDirectories = props.groupDirectories,
+      parentDirectory = props.parentDirectory,
+      _props$orderBy = props.orderBy,
+      orderBy = _props$orderBy === undefined ? 'name asc' : _props$orderBy,
+      _props$className = props.className,
+      className = _props$className === undefined ? '' : _props$className,
+      _props$fileListClassN = props.fileListClassName,
+      fileListClassName = _props$fileListClassN === undefined ? 'filelist' : _props$fileListClassN,
+      _props$rowClassName = props.rowClassName,
+      rowClassName = _props$rowClassName === undefined ? 'row file' : _props$rowClassName;
+
+  var _util$sort$orderByFn = _util2.default.sort.orderByFn(orderBy),
+      mapFn = _util$sort$orderByFn.mapFn,
+      sortFn = _util$sort$orderByFn.sortFn;
+
+  var sortedFiles = (files || []).filter(function (f) {
+    return !!f;
+  }).map(mapFn).sort(sortFn);
+  if (groupDirectories) {
+    var groupedFiles = sortedFiles.reduce(function (a, b) {
+      a[b[1].dir].push(b);return a;
+    }, { true: [], false: [] });
+    sortedFiles = groupedFiles.true.concat(groupedFiles.false);
+  }
+  var fileList = sortedFiles.map(function (pair) {
+    return (0, _preact.h)(FileRow, {
+      file: pair[1],
+      fields: fieldSet(fields),
+      className: rowClassName,
+      linkFiles: linkFiles,
+      onDelete: onDelete,
+      onClick: onClick
+    });
+  });
+  if (!fileList || !fileList.length) {
+    return (0, _preact.h)(
+      'div',
+      { className: 'rows ' + className },
+      (0, _preact.h)(
+        'div',
+        { 'class': 'row heading' },
+        (0, _preact.h)(
+          'h4',
+          { 'class': 'noFiles' },
+          'No files'
+        )
+      )
+    );
+  }
+  // console.log(files)
+  return (0, _preact.h)(
+    'div',
+    { className: 'rows ' + className },
+    title && (0, _preact.h)(
+      'div',
+      { 'class': 'row heading' },
+      (0, _preact.h)(
+        'h3',
+        null,
+        title
+      ),
+      '}'
+    ),
+    (0, _preact.h)(
+      'div',
+      { className: 'rows ' + fileListClassName },
+      parentDirectory && (0, _preact.h)(
+        'div',
+        { className: rowClassName + ' parent' },
+        (0, _preact.h)(
+          'div',
+          { className: 'filename', title: 'Parent Directory' },
+          (0, _preact.h)(
+            'span',
+            { 'class': 'link', onClick: function onClick(e) {
+                return onClickParent && onClickParent(e);
+              } },
+            (0, _preact.h)(
+              'i',
+              null,
+              'Parent Directory'
+            )
+          )
+        )
+      ),
+      fileList
+    )
+  );
+};
+
+var FileRow = exports.FileRow = function FileRow(props) {
+  var file = props.file,
+      linkFiles = props.linkFiles,
+      onDelete = props.onDelete,
+      _onClick = props.onClick,
+      _props$className2 = props.className,
+      className = _props$className2 === undefined ? 'row file' : _props$className2,
+      _props$username = props.username,
+      username = _props$username === undefined ? '' : _props$username;
+
+  var fields = fieldSet(props.fields);
+
+  var size = _util2.default.hush_size(file.size);
+  var date = file.date || file.created_at;
+  var epoch = file.epoch || file.epochs || 0;
+  var count = file.count || 0;
+
+  var name = void 0;
+  var key = void 0;
+  if (file.name) {
+    name = file.name;
+    key = name;
+  } else if (file.url) {
+    if (file.opt && file.opt.type) {
+      name = file.opt.type + ': ' + file.opt.title;
+      key = file.opt.token;
+    } else {
+      name = file.url.replace(/^https?:\/\//, '');
+      key = name;
+    }
+  }
+
+  return (0, _preact.h)(
+    'div',
+    { 'class': className, key: key },
+    fields.has('name') && (0, _preact.h)(
+      'div',
+      { className: 'filename', title: file.name || file.url },
+      file.persisted === false ? (0, _preact.h)(
+        'span',
+        { className: 'unpersisted' },
+        name
+      ) : linkFiles && file.url ? (0, _preact.h)(
+        'a',
+        { target: '_blank', onClick: function onClick(e) {
+            if (!(e.metaKey || e.ctrlKey || e.altKey) && _onClick) {
+              e.preventDefault();_onClick && _onClick(file, e);
+            }
+          }, href: file.url },
+        name
+      ) : (0, _preact.h)(
+        'span',
+        { 'class': 'link', onClick: function onClick(e) {
+            return _onClick && _onClick(file, e);
+          } },
+        name
+      )
+    ),
+    fields.has('age') && (0, _preact.h)(
+      'div',
+      { className: "age " + _util2.default.carbon_date(date) },
+      _util2.default.get_age(date)
+    ),
+    fields.has('username') && (0, _preact.h)(
+      'div',
+      { className: "username" },
+      username
+    ),
+    fields.has('epoch') && (0, _preact.h)(
+      'div',
+      { className: "epoch " + _util2.default.hush_null(epoch)[0] },
+      epoch > 0 ? 'ep. ' + epoch : ''
+    ),
+    fields.has('date') && (0, _preact.h)(
+      'div',
+      { className: "date " + _util2.default.carbon_date(date) },
+      (0, _moment2.default)(date).format("YYYY-MM-DD")
+    ),
+    fields.has('datetime') && (0, _preact.h)(
+      'div',
+      { className: "datetime " + _util2.default.carbon_date(date) },
+      (0, _moment2.default)(date).format("YYYY-MM-DD h:mm a")
+    ),
+    fields.has('size') && (0, _preact.h)(
+      'div',
+      { className: "size " + size[0] },
+      size[1]
+    ),
+    fields.has('count') && (0, _preact.h)(
+      'div',
+      { className: "count " + _util2.default.hush_null(count)[0] },
+      count > 0 ? count + ' files' : ''
+    ),
+    (fields.has('activity') || fields.has('module')) && (0, _preact.h)(
+      'div',
+      { className: 'activity' },
+      fields.has('activity') && file.activity,
+      fields.has('module') && file.module
+    ),
+    fields.has('delete') && onDelete && file.id && (0, _preact.h)(
+      'div',
+      { className: 'destroy', onClick: function onClick(e) {
+          return onDelete(file);
+        } },
+      'x'
+    ),
+    props.options && props.options(file)
+  );
+};
+
+/***/ }),
+
+/***/ "./app/client/common/fileUpload.component.js":
+/*!***************************************************!*\
+  !*** ./app/client/common/fileUpload.component.js ***!
+  \***************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var FileUpload = function (_Component) {
+  _inherits(FileUpload, _Component);
+
+  function FileUpload(props) {
+    _classCallCheck(this, FileUpload);
+
+    var _this = _possibleConstructorReturn(this, (FileUpload.__proto__ || Object.getPrototypeOf(FileUpload)).call(this, props));
+
+    _this.handleChange = _this.handleChange.bind(_this);
+    return _this;
+  }
+
+  _createClass(FileUpload, [{
+    key: 'handleChange',
+    value: function handleChange(e) {
+      this.props.onChange && this.props.onChange();
+      e.stopPropagation();
+      e.preventDefault();
+      this.setState({ thumbnails: [], images: [] });
+      var files = e.dataTransfer ? e.dataTransfer.files : e.target.files;
+      var i = void 0,
+          f = void 0;
+      for (i = 0, f; i < files.length; i++) {
+        f = files[i];
+        if (!f) continue;
+        break;
+        // if (!f.type.match(this.props.mime)) continue
+      }
+      this.props.onUpload && this.props.onUpload(f);
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      return (0, _preact.h)(
+        'div',
+        { className: 'fileUpload param' },
+        (0, _preact.h)(
+          'label',
+          null,
+          (0, _preact.h)(
+            'span',
+            null,
+            this.props.title
+          ),
+          (0, _preact.h)('input', {
+            type: 'file',
+            accept: this.props.accept || '*/*',
+            multiple: this.props.multiple,
+            onChange: this.handleChange
+          }),
+          (0, _preact.h)(
+            'button',
+            null,
+            this.props.label || 'Choose file...'
+          )
+        )
+      );
+    }
+  }]);
+
+  return FileUpload;
+}(_preact.Component);
+
+exports.default = FileUpload;
+
+/***/ }),
+
+/***/ "./app/client/common/folderList.component.js":
+/*!***************************************************!*\
+  !*** ./app/client/common/folderList.component.js ***!
+  \***************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
+
+exports.default = FolderList;
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _reactRouterDom = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
+
+var _util = __webpack_require__(/*! ../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _group = __webpack_require__(/*! ./group.component */ "./app/client/common/group.component.js");
+
+var _group2 = _interopRequireDefault(_group);
+
+var _param = __webpack_require__(/*! ./param.component */ "./app/client/common/param.component.js");
+
+var _param2 = _interopRequireDefault(_param);
+
+var _loading = __webpack_require__(/*! ./loading.component */ "./app/client/common/loading.component.js");
+
+var _loading2 = _interopRequireDefault(_loading);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function FolderList(_ref) {
+  var db = _ref.db,
+      path = _ref.path,
+      emptyText = _ref.emptyText,
+      activity = _ref.activity;
+
+  if (!db) return null;
+  if (db.loading || !db.data) {
+    return (0, _preact.h)(
+      'div',
+      { 'class': 'col folderList' },
+      (0, _preact.h)(_loading2.default, { progress: db.progress })
+    );
+  }
+  var folderList = db.data.folders;
+  if (activity) {
+    folderList = folderList.filter(function (f) {
+      return f.activity === activity;
+    });
+  }
+  if (!folderList.length && emptyText) {
+    return (0, _preact.h)(
+      'div',
+      { 'class': 'col folderList' },
+      emptyText
+    );
+  }
+  console.log(folders);
+  var folders = folderList.map(function (raw_folder) {
+    var folder = db.data.folderLookup[raw_folder.id];
+    var fileCount = folder.files ? folder.files.length : 0;
+
+    var _util$hush_null = _util2.default.hush_null(fileCount),
+        _util$hush_null2 = _slicedToArray(_util$hush_null, 2),
+        className = _util$hush_null2[0],
+        size = _util$hush_null2[1];
+
+    return (0, _preact.h)(
+      _param2.default,
+      { title: (0, _preact.h)(
+          _reactRouterDom.Link,
+          { to: path + folder.id + '/' },
+          folder.name
+        ) },
+      (0, _preact.h)(
+        'span',
+        { className: className },
+        fileCount,
+        ' file',
+        _util2.default.courtesy_s(fileCount)
+      )
+    );
+  });
+
+  return (0, _preact.h)(
+    'div',
+    { 'class': 'col folderList' },
+    (0, _preact.h)(
+      _group2.default,
+      { title: 'Projects' },
+      folders
+    )
+  );
+}
+
+/***/ }),
+
+/***/ "./app/client/common/gallery.component.js":
+/*!************************************************!*\
+  !*** ./app/client/common/gallery.component.js ***!
+  \************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+		value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var Gallery = function (_Component) {
+		_inherits(Gallery, _Component);
+
+		function Gallery(props) {
+				_classCallCheck(this, Gallery);
+
+				return _possibleConstructorReturn(this, (Gallery.__proto__ || Object.getPrototypeOf(Gallery)).call(this));
+		}
+
+		_createClass(Gallery, [{
+				key: 'render',
+				value: function render() {
+						var _props = this.props,
+						    title = _props.title,
+						    images = _props.images;
+
+						var imageList = images.map(function (image) {
+								return (0, _preact.h)(
+										'div',
+										null,
+										(0, _preact.h)('img', { src: image.url })
+								);
+						});
+						return (0, _preact.h)(
+								'div',
+								{ 'class': 'gallery' },
+								imageList
+						);
+				}
+		}]);
+
+		return Gallery;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+		return {};
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+		return {
+				// actions: bindActionCreators(liveActions, dispatch)
+		};
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Gallery);
+
+/***/ }),
+
+/***/ "./app/client/common/group.component.js":
+/*!**********************************************!*\
+  !*** ./app/client/common/group.component.js ***!
+  \**********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.default = Group;
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+function Group(props) {
+  return (0, _preact.h)(
+    'div',
+    { className: 'group' },
+    this.props.title && (0, _preact.h)(
+      'h3',
+      null,
+      this.props.title
+    ),
+    this.props.children
+  );
+}
+
+/***/ }),
+
+/***/ "./app/client/common/header.component.js":
+/*!***********************************************!*\
+  !*** ./app/client/common/header.component.js ***!
+  \***********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRouterDom = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _system = __webpack_require__(/*! ../system/system.actions */ "./app/client/system/system.actions.js");
+
+var systemActions = _interopRequireWildcard(_system);
+
+var _modules = __webpack_require__(/*! ../modules */ "./app/client/modules/index.js");
+
+var _modules2 = _interopRequireDefault(_modules);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function NavLink(props) {
+  if (!props.to) {
+    return (0, _preact.h)(
+      'span',
+      null,
+      props.children
+    );
+  }
+  var children = props.to === props.location.pathname ? (0, _preact.h)(
+    'b',
+    null,
+    props.children
+  ) : props.children;
+  return (0, _preact.h)(
+    'span',
+    null,
+    (0, _preact.h)(
+      _reactRouterDom.Link,
+      { to: props.to },
+      children
+    )
+  );
+}
+
+function Header(props) {
+  var site = props.site,
+      app = props.app,
+      fps = props.fps,
+      playing = props.playing,
+      actions = props.actions,
+      location = props.location,
+      history = props.history;
+
+  var tool_list = Object.keys(_modules2.default).map(function (name, i) {
+    var label = name.replace(/_/, " ");
+    return (0, _preact.h)(
+      'option',
+      { value: name, key: i },
+      label
+    );
+  });
+  var tool = _modules2.default[app.tool];
+  var links = tool.links().map(function (link, i) {
+    return (0, _preact.h)(
+      NavLink,
+      { key: i, location: location, to: link.url },
+      link.name
+    );
+  });
+  return (0, _preact.h)(
+    'header',
+    null,
+    (0, _preact.h)(
+      'span',
+      null,
+      (0, _preact.h)(
+        'b',
+        null,
+        site.name,
+        ' cortex'
+      )
+    ),
+    (0, _preact.h)(
+      'span',
+      null,
+      (0, _preact.h)(
+        'select',
+        { onChange: function onChange(e) {
+            var path = window.location.pathname.split("/");
+            path.shift();
+            console.log(path);
+            if (path[0] in _modules2.default && path[1]) {
+              history.push('/' + e.target.value + '/' + path[1] + '/');
+            }
+            actions.changeTool(e.target.value, true);
+          }, value: app.tool },
+        tool_list
+      )
+    ),
+    (0, _preact.h)(
+      NavLink,
+      { location: location, to: '/system' },
+      'system'
+    ),
+    (0, _preact.h)(
+      NavLink,
+      { location: location, to: '/dashboard' },
+      'dashboard'
+    ),
+    (0, _preact.h)(
+      'span',
+      null,
+      links
+    ),
+    playing && (0, _preact.h)(
+      'span',
+      null,
+      fps,
+      ' fps'
+    )
+  );
+}
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {
+    site: state.system.site,
+    app: state.system.app,
+    fps: state.live.fps,
+    playing: state.live.playing
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    actions: (0, _redux.bindActionCreators)(systemActions, dispatch)
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Header);
+
+/***/ }),
+
+/***/ "./app/client/common/index.js":
+/*!************************************!*\
+  !*** ./app/client/common/index.js ***!
+  \************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.AugmentationGrid = exports.ButtonGrid = exports.TaskList = exports.CurrentTask = exports.Checkbox = exports.Button = exports.SelectGroup = exports.Select = exports.Slider = exports.NumberInput = exports.TextInput = exports.Param = exports.ParamGroup = exports.Group = exports.Player = exports.Gallery = exports.FileUpload = exports.FileRow = exports.FileList = exports.FolderList = exports.AudioPlayer = exports.Header = exports.Progress = exports.Loading = exports.Views = undefined;
+
+var _audioPlayer = __webpack_require__(/*! ./audioPlayer/audioPlayer.component */ "./app/client/common/audioPlayer/audioPlayer.component.js");
+
+var _audioPlayer2 = _interopRequireDefault(_audioPlayer);
+
+var _augmentationGrid = __webpack_require__(/*! ./augmentationGrid.component */ "./app/client/common/augmentationGrid.component.js");
+
+var _augmentationGrid2 = _interopRequireDefault(_augmentationGrid);
+
+var _button = __webpack_require__(/*! ./button.component */ "./app/client/common/button.component.js");
+
+var _button2 = _interopRequireDefault(_button);
+
+var _buttonGrid = __webpack_require__(/*! ./buttonGrid.component */ "./app/client/common/buttonGrid.component.js");
+
+var _buttonGrid2 = _interopRequireDefault(_buttonGrid);
+
+var _checkbox = __webpack_require__(/*! ./checkbox.component */ "./app/client/common/checkbox.component.js");
+
+var _checkbox2 = _interopRequireDefault(_checkbox);
+
+var _currentTask = __webpack_require__(/*! ./currentTask.component */ "./app/client/common/currentTask.component.js");
+
+var _currentTask2 = _interopRequireDefault(_currentTask);
+
+var _fileList = __webpack_require__(/*! ./fileList.component */ "./app/client/common/fileList.component.js");
+
+var _fileUpload = __webpack_require__(/*! ./fileUpload.component */ "./app/client/common/fileUpload.component.js");
+
+var _fileUpload2 = _interopRequireDefault(_fileUpload);
+
+var _folderList = __webpack_require__(/*! ./folderList.component */ "./app/client/common/folderList.component.js");
+
+var _folderList2 = _interopRequireDefault(_folderList);
+
+var _gallery = __webpack_require__(/*! ./gallery.component */ "./app/client/common/gallery.component.js");
+
+var _gallery2 = _interopRequireDefault(_gallery);
+
+var _group = __webpack_require__(/*! ./group.component */ "./app/client/common/group.component.js");
+
+var _group2 = _interopRequireDefault(_group);
+
+var _header = __webpack_require__(/*! ./header.component */ "./app/client/common/header.component.js");
+
+var _header2 = _interopRequireDefault(_header);
+
+var _loading = __webpack_require__(/*! ./loading.component */ "./app/client/common/loading.component.js");
+
+var _loading2 = _interopRequireDefault(_loading);
+
+var _numberInput = __webpack_require__(/*! ./numberInput.component */ "./app/client/common/numberInput.component.js");
+
+var _numberInput2 = _interopRequireDefault(_numberInput);
+
+var _param = __webpack_require__(/*! ./param.component */ "./app/client/common/param.component.js");
+
+var _param2 = _interopRequireDefault(_param);
+
+var _paramGroup = __webpack_require__(/*! ./paramGroup.component */ "./app/client/common/paramGroup.component.js");
+
+var _paramGroup2 = _interopRequireDefault(_paramGroup);
+
+var _player = __webpack_require__(/*! ./player.component */ "./app/client/common/player.component.js");
+
+var _player2 = _interopRequireDefault(_player);
+
+var _progress = __webpack_require__(/*! ./progress.component */ "./app/client/common/progress.component.js");
+
+var _progress2 = _interopRequireDefault(_progress);
+
+var _select = __webpack_require__(/*! ./select.component */ "./app/client/common/select.component.js");
+
+var _select2 = _interopRequireDefault(_select);
+
+var _selectGroup = __webpack_require__(/*! ./selectGroup.component */ "./app/client/common/selectGroup.component.js");
+
+var _selectGroup2 = _interopRequireDefault(_selectGroup);
+
+var _slider = __webpack_require__(/*! ./slider.component */ "./app/client/common/slider.component.js");
+
+var _slider2 = _interopRequireDefault(_slider);
+
+var _textInput = __webpack_require__(/*! ./textInput.component */ "./app/client/common/textInput.component.js");
+
+var _textInput2 = _interopRequireDefault(_textInput);
+
+var _taskList = __webpack_require__(/*! ./taskList.component */ "./app/client/common/taskList.component.js");
+
+var _taskList2 = _interopRequireDefault(_taskList);
+
+var _views = __webpack_require__(/*! ./views */ "./app/client/common/views/index.js");
+
+var Views = _interopRequireWildcard(_views);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.Views = Views;
+exports.Loading = _loading2.default;
+exports.Progress = _progress2.default;
+exports.Header = _header2.default;
+exports.AudioPlayer = _audioPlayer2.default;
+exports.FolderList = _folderList2.default;
+exports.FileList = _fileList.FileList;
+exports.FileRow = _fileList.FileRow;
+exports.FileUpload = _fileUpload2.default;
+exports.Gallery = _gallery2.default;
+exports.Player = _player2.default;
+exports.Group = _group2.default;
+exports.ParamGroup = _paramGroup2.default;
+exports.Param = _param2.default;
+exports.TextInput = _textInput2.default;
+exports.NumberInput = _numberInput2.default;
+exports.Slider = _slider2.default;
+exports.Select = _select2.default;
+exports.SelectGroup = _selectGroup2.default;
+exports.Button = _button2.default;
+exports.Checkbox = _checkbox2.default;
+exports.CurrentTask = _currentTask2.default;
+exports.TaskList = _taskList2.default;
+exports.ButtonGrid = _buttonGrid2.default;
+exports.AugmentationGrid = _augmentationGrid2.default;
+
+/***/ }),
+
+/***/ "./app/client/common/loading.component.js":
+/*!************************************************!*\
+  !*** ./app/client/common/loading.component.js ***!
+  \************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.default = Loading;
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _progress = __webpack_require__(/*! ./progress.component */ "./app/client/common/progress.component.js");
+
+var _progress2 = _interopRequireDefault(_progress);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function Loading(_ref) {
+  var progress = _ref.progress;
+
+  return (0, _preact.h)(
+    'div',
+    { className: 'loading' },
+    'Loading',
+    (0, _preact.h)('br', null),
+    progress && (0, _preact.h)(_progress2.default, { progress: progress })
+  );
+}
+
+/***/ }),
+
+/***/ "./app/client/common/numberInput.component.js":
+/*!****************************************************!*\
+  !*** ./app/client/common/numberInput.component.js ***!
+  \****************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var NumberInput = function (_Component) {
+  _inherits(NumberInput, _Component);
+
+  function NumberInput(props) {
+    _classCallCheck(this, NumberInput);
+
+    var _this = _possibleConstructorReturn(this, (NumberInput.__proto__ || Object.getPrototypeOf(NumberInput)).call(this, props));
+
+    _this.state = { value: null, changed: false };
+    _this.handleInput = _this.handleInput.bind(_this);
+    _this.handleKeydown = _this.handleKeydown.bind(_this);
+    return _this;
+  }
+
+  _createClass(NumberInput, [{
+    key: 'handleInput',
+    value: function handleInput(e) {
+      this.setState({
+        value: e.target.value,
+        changed: true
+      });
+      this.props.onInput && this.props.onInput(e.target.value, e.target.name);
+      this.props.onChange && this.props.onChange(e.target.name, e.target.value);
+    }
+  }, {
+    key: 'handleKeydown',
+    value: function handleKeydown(e) {
+      if (e.keyCode === 13) {
+        this.setState({
+          value: e.target.value,
+          changed: false
+        });
+        this.props.onSave && this.props.onSave(e.target.value, e.target.name);
+      }
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      return (0, _preact.h)(
+        'div',
+        { className: 'numberInput param' },
+        (0, _preact.h)(
+          'label',
+          null,
+          (0, _preact.h)(
+            'span',
+            null,
+            this.props.title
+          ),
+          (0, _preact.h)('input', {
+            type: 'number',
+            name: this.props.name || 'number',
+            value: this.state.changed ? this.state.value : this.props.value,
+            onInput: this.handleInput,
+            onKeydown: this.handleKeydown,
+            placeholder: this.props.placeholder,
+            autofocus: this.props.autofocus,
+            min: this.props.min,
+            max: this.props.max,
+            step: this.props.step || this.props.type === 'int' ? 1 : 0.01
+          })
+        )
+      );
+    }
+  }]);
+
+  return NumberInput;
+}(_preact.Component);
+
+exports.default = NumberInput;
+
+/***/ }),
+
+/***/ "./app/client/common/param.component.js":
+/*!**********************************************!*\
+  !*** ./app/client/common/param.component.js ***!
+  \**********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var Param = function (_Component) {
+  _inherits(Param, _Component);
+
+  function Param(props) {
+    _classCallCheck(this, Param);
+
+    return _possibleConstructorReturn(this, (Param.__proto__ || Object.getPrototypeOf(Param)).call(this, props));
+  }
+
+  _createClass(Param, [{
+    key: 'render',
+    value: function render() {
+      return (0, _preact.h)(
+        'div',
+        { className: 'button param' },
+        (0, _preact.h)(
+          'span',
+          null,
+          this.props.title
+        ),
+        (0, _preact.h)(
+          'span',
+          null,
+          this.props.children
+        )
+      );
+    }
+  }]);
+
+  return Param;
+}(_preact.Component);
+
+exports.default = Param;
+
+/***/ }),
+
+/***/ "./app/client/common/paramGroup.component.js":
+/*!***************************************************!*\
+  !*** ./app/client/common/paramGroup.component.js ***!
+  \***************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _live = __webpack_require__(/*! ../live/live.actions */ "./app/client/live/live.actions.js");
+
+var liveActions = _interopRequireWildcard(_live);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var ParamGroup = function (_Component) {
+  _inherits(ParamGroup, _Component);
+
+  function ParamGroup(props) {
+    _classCallCheck(this, ParamGroup);
+
+    var _this = _possibleConstructorReturn(this, (ParamGroup.__proto__ || Object.getPrototypeOf(ParamGroup)).call(this, props));
+
+    _this.handleClick = _this.handleClick.bind(_this);
+    return _this;
+  }
+
+  _createClass(ParamGroup, [{
+    key: 'handleClick',
+    value: function handleClick(e) {
+      clearTimeout(this.timeout);
+      var new_value = e.target.checked;
+      this.props.actions.set_param(this.props.name, new_value);
+      this.props.onToggle && this.props.onToggle(new_value);
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      var checked = this.props.opt[this.props.name];
+      var toggle = !this.props.noToggle;
+      var dim = !this.props.noDim;
+      var className = !dim || !toggle || checked ? 'paramGroup active' : 'paramGroup inactive';
+      return (0, _preact.h)(
+        'div',
+        { className: className },
+        (0, _preact.h)(
+          'label',
+          null,
+          (0, _preact.h)(
+            'h3',
+            null,
+            this.props.title
+          ),
+          toggle ? (0, _preact.h)('input', {
+            type: 'checkbox',
+            onClick: this.handleClick,
+            checked: checked
+          }) : null
+        ),
+        this.props.children
+      );
+    }
+  }]);
+
+  return ParamGroup;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {
+    opt: state.live.opt
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    actions: (0, _redux.bindActionCreators)(liveActions, dispatch)
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(ParamGroup);
+
+/***/ }),
+
+/***/ "./app/client/common/player.component.js":
+/*!***********************************************!*\
+  !*** ./app/client/common/player.component.js ***!
+  \***********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+function Player(props) {
+  var className = props.fullscreen ? 'player fullscreen' : 'player';
+  return (0, _preact.h)(
+    'div',
+    { className: className },
+    (0, _preact.h)('canvas', { width: props.width, height: props.height })
+  );
+}
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {};
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {};
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Player);
+
+/***/ }),
+
+/***/ "./app/client/common/progress.component.js":
+/*!*************************************************!*\
+  !*** ./app/client/common/progress.component.js ***!
+  \*************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.default = Progress;
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+function Progress(_ref) {
+  var progress = _ref.progress;
+
+  if (!progress) return;
+  var i = progress.i,
+      n = progress.n;
+
+  var a = [];
+  for (var j = 0; j < n; j++) {
+    a.push((0, _preact.h)('div', { key: j, className: j < i ? 'x' : 'o' }));
+  }
+  return (0, _preact.h)(
+    'div',
+    { className: 'progress' },
+    a
+  );
+}
+
+/***/ }),
+
+/***/ "./app/client/common/select.component.js":
+/*!***********************************************!*\
+  !*** ./app/client/common/select.component.js ***!
+  \***********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var Select = function (_Component) {
+  _inherits(Select, _Component);
+
+  function Select(props) {
+    _classCallCheck(this, Select);
+
+    var _this = _possibleConstructorReturn(this, (Select.__proto__ || Object.getPrototypeOf(Select)).call(this, props));
+
+    _this.handleChange = _this.handleChange.bind(_this);
+    return _this;
+  }
+
+  _createClass(Select, [{
+    key: 'handleChange',
+    value: function handleChange(e) {
+      clearTimeout(this.timeout);
+      var new_value = e.target.value;
+      if (new_value === 'PLACEHOLDER') return;
+      this.props.onChange && this.props.onChange(this.props.name, new_value);
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      var currentValue = this.props.live ? this.props.opt[this.props.name] : this.props.value;
+      var lastValue = void 0;
+      var options = (this.props.options || []).map(function (key, i) {
+        var name = void 0,
+            value = void 0;
+        if (typeof key === 'string') {
+          name = key.length < 2 ? key.toUpperCase() : key;
+          value = key;
+        } else if ((typeof key === 'undefined' ? 'undefined' : _typeof(key)) === 'object') {
+          if (key.length) {
+            var _key = _slicedToArray(key, 2);
+
+            name = _key[0];
+            value = _key[1];
+          } else if (key.count) {
+            var frames = Math.round(key.count / 30) + ' s.';
+            name = key.name.replace(/_/g, ' ') + ' (' + frames + ')';
+            value = key.name;
+          } else {
+            name = key.name;
+            value = key.value || key.name;
+          }
+        }
+        lastValue = value;
+        return (0, _preact.h)(
+          'option',
+          { value: value, key: i },
+          name
+        );
+      });
+      return (0, _preact.h)(
+        'div',
+        { className: 'select param' },
+        (0, _preact.h)(
+          'label',
+          null,
+          (0, _preact.h)(
+            'span',
+            null,
+            this.props.title
+          ),
+          (0, _preact.h)(
+            'select',
+            {
+              onChange: this.handleChange,
+              value: currentValue || lastValue
+            },
+            this.props.placeholder && (0, _preact.h)(
+              'option',
+              { value: 'PLACEHOLDER' },
+              this.props.placeholder
+            ),
+            options
+          )
+        ),
+        this.props.children
+      );
+    }
+  }]);
+
+  return Select;
+}(_preact.Component);
+
+function capitalize(s) {
+  return (s || "").replace(/(?:^|\s)\S/g, function (a) {
+    return a.toUpperCase();
+  });
+}
+
+var mapStateToProps = function mapStateToProps(state, props) {
+  return {
+    opt: props.opt || state.live.opt
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {};
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Select);
+
+/***/ }),
+
+/***/ "./app/client/common/selectGroup.component.js":
+/*!****************************************************!*\
+  !*** ./app/client/common/selectGroup.component.js ***!
+  \****************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var SelectGroup = function (_Component) {
+  _inherits(SelectGroup, _Component);
+
+  function SelectGroup(props) {
+    _classCallCheck(this, SelectGroup);
+
+    var _this = _possibleConstructorReturn(this, (SelectGroup.__proto__ || Object.getPrototypeOf(SelectGroup)).call(this, props));
+
+    _this.handleChange = _this.handleChange.bind(_this);
+    return _this;
+  }
+
+  _createClass(SelectGroup, [{
+    key: 'handleChange',
+    value: function handleChange(e) {
+      clearTimeout(this.timeout);
+      var new_value = e.target.value;
+      if (new_value === 'PLACEHOLDER') return;
+      this.props.onChange && this.props.onChange(this.props.name, new_value);
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      var currentValue = this.props.live ? this.props.opt[this.props.name] : this.props.value;
+      var lastValue = void 0;
+      var options = (this.props.options || []).map(function (group, i) {
+        var groupName = group.name;
+        var children = group.options.map(function (key) {
+          var name = key.length < 2 ? key.toUpperCase() : key;
+          name = name.replace(/_/g, ' ');
+          var value = key;
+          lastValue = value;
+          return (0, _preact.h)(
+            'option',
+            { value: value, key: value },
+            name
+          );
+        });
+        return (0, _preact.h)(
+          'optgroup',
+          { label: groupName, key: groupName },
+          children
+        );
+      });
+      return (0, _preact.h)(
+        'div',
+        { className: 'select param' },
+        (0, _preact.h)(
+          'label',
+          null,
+          (0, _preact.h)(
+            'span',
+            null,
+            this.props.title
+          ),
+          (0, _preact.h)(
+            'select',
+            {
+              onChange: this.handleChange,
+              value: currentValue || lastValue
+            },
+            this.props.placeholder && (0, _preact.h)(
+              'option',
+              { value: 'PLACEHOLDER' },
+              this.props.placeholder
+            ),
+            options
+          )
+        ),
+        this.props.children
+      );
+    }
+  }]);
+
+  return SelectGroup;
+}(_preact.Component);
+
+function capitalize(s) {
+  return (s || "").replace(/(?:^|\s)\S/g, function (a) {
+    return a.toUpperCase();
+  });
+}
+
+var mapStateToProps = function mapStateToProps(state, props) {
+  return {
+    opt: props.opt || state.live.opt
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {};
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SelectGroup);
+
+/***/ }),
+
+/***/ "./app/client/common/slider.component.js":
+/*!***********************************************!*\
+  !*** ./app/client/common/slider.component.js ***!
+  \***********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _live = __webpack_require__(/*! ../live/live.actions */ "./app/client/live/live.actions.js");
+
+var liveActions = _interopRequireWildcard(_live);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var SLIDER_THROTTLE_TIME = 100;
+
+var Slider = function (_Component) {
+  _inherits(Slider, _Component);
+
+  function Slider(props) {
+    _classCallCheck(this, Slider);
+
+    var _this = _possibleConstructorReturn(this, (Slider.__proto__ || Object.getPrototypeOf(Slider)).call(this, props));
+
+    _this.timeout = 0;
+    _this.state = {
+      value: props.live ? props.opt[props.name] : props.value
+    };
+    _this.handleInput = _this.handleInput.bind(_this);
+    _this.handleRange = _this.handleRange.bind(_this);
+    return _this;
+  }
+
+  _createClass(Slider, [{
+    key: 'componentWillReceiveProps',
+    value: function componentWillReceiveProps(nextProps) {
+      var next_value = nextProps.value || nextProps.opt[nextProps.name];
+      if (next_value !== this.state.value) {
+        this.setState({ value: next_value });
+      }
+    }
+  }, {
+    key: 'handleInput',
+    value: function handleInput(e) {
+      var _props = this.props,
+          name = _props.name,
+          opt = _props.opt;
+
+      var old_value = opt[name];
+      var new_value = e.target.value;
+      if (new_value === '') {
+        new_value = this.props.defaultValue || (this.props.max - this.props.min) / 2;
+      } else if (this.props.type === 'int') {
+        new_value = parseInt(new_value);
+      } else if (this.props.type === 'odd') {
+        new_value = parseInt(Math.floor(new_value / 2) * 2 + 1);
+      }
+      if (old_value !== new_value) {
+        this.setState({ value: new_value });
+        this.props.live && this.props.actions.set_param(this.props.name, new_value);
+        this.props.onChange && this.props.onChange(new_value);
+      }
+      clearTimeout(this.timeout);
+    }
+  }, {
+    key: 'handleRange',
+    value: function handleRange(e) {
+      var _this2 = this;
+
+      clearTimeout(this.timeout);
+      var new_value = e.target.value;
+      if (this.props.type === 'int') {
+        new_value = parseInt(new_value);
+      }
+      if (this.props.type === 'odd') {
+        new_value = parseInt(Math.floor(new_value / 2) * 2 + 1);
+      }
+      if (this.props.type === 'list') {
+        new_value = this.props.options[new_value] || this.props.options[0];
+      }
+      this.setState({ value: new_value });
+      this.timeout = setTimeout(function () {
+        _this2.props.live && _this2.props.actions.set_param(_this2.props.name, new_value);
+        _this2.props.onChange && _this2.props.onChange(new_value);
+      }, SLIDER_THROTTLE_TIME);
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      var _props2 = this.props,
+          name = _props2.name,
+          title = _props2.title;
+
+      var value = this.state.value;
+      if (typeof value === 'undefined') {
+        value = this.props.min;
+      }
+      var text_value = value;
+      var step = void 0;
+      var min = this.props.min || 0;
+      var max = this.props.max || 0;
+      if (this.props.type === 'int') {
+        step = 1;
+      } else if (this.props.type === 'list') {
+        min = 0;
+        max = this.props.options.length - 1;
+        step = 1;
+        value = this.props.options.indexOf(value);
+      } else {
+        step = (this.props.max - this.props.min) / 100;
+        text_value = parseFloat(value).toFixed(2);
+      }
+      return (0, _preact.h)(
+        'div',
+        { 'class': 'slider param' },
+        (0, _preact.h)(
+          'label',
+          null,
+          (0, _preact.h)(
+            'span',
+            null,
+            title || name.replace(/_/g, ' ')
+          ),
+          (0, _preact.h)('input', { type: 'text', value: text_value, onBlur: this.handleInput })
+        ),
+        (0, _preact.h)('input', {
+          type: 'range',
+          min: min,
+          max: max,
+          step: step,
+          value: value,
+          onInput: this.handleRange
+        })
+      );
+    }
+  }]);
+
+  return Slider;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {
+    opt: state.live.opt
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    actions: (0, _redux.bindActionCreators)(liveActions, dispatch)
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Slider);
+
+/***/ }),
+
+/***/ "./app/client/common/taskList.component.js":
+/*!*************************************************!*\
+  !*** ./app/client/common/taskList.component.js ***!
+  \*************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _reactRouterDom = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
+
+var _util = __webpack_require__(/*! ../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _actions = __webpack_require__(/*! ../actions */ "./app/client/actions.js");
+
+var _actions2 = _interopRequireDefault(_actions);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var TaskList = function (_Component) {
+  _inherits(TaskList, _Component);
+
+  function TaskList(props) {
+    _classCallCheck(this, TaskList);
+
+    return _possibleConstructorReturn(this, (TaskList.__proto__ || Object.getPrototypeOf(TaskList)).call(this));
+  }
+
+  _createClass(TaskList, [{
+    key: 'shouldComponentUpdate',
+    value: function shouldComponentUpdate(nextProps) {
+      if (nextProps.tasks.length !== this.props.tasks.length) {
+        return true;
+      }
+      if (nextProps.tasks[0] !== this.props.tasks[0]) {
+        return true;
+      }
+      return false;
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      var _this2 = this;
+
+      var _props = this.props,
+          title = _props.title,
+          tasks = _props.tasks;
+
+      var time = 0;
+
+      var _util$sort$orderByFn = _util2.default.sort.orderByFn(this.props.sort || 'date desc'),
+          mapFn = _util$sort$orderByFn.mapFn,
+          sortFn = _util$sort$orderByFn.sortFn;
+
+      var taskList = tasks.map(mapFn).sort(sortFn).map(function (pair) {
+        var task = pair[1];
+        var dataset = task.dataset;
+
+        var dataset_link = void 0,
+            label = dataset;
+        // console.log(task)
+        switch (task.activity) {
+          case 'train':
+            if (task.epoch === 0) {
+              label += ', latest';
+            } else {
+              label += ', ' + task.epoch;
+            }
+            label += ' + ' + task.epochs;
+            break;
+          case 'augment':
+            try {
+              var opt = JSON.parse(task.opt);
+              label += ', ' + opt.augment_take + ' x ' + opt.augment_make;
+            } catch (e) {
+              //
+            }
+          default:
+            break;
+        }
+        if (task.folder_id) {
+          var href = '/' + task.module + '/' + (task.module === 'samplernn' ? 'datasets' : 'sequences') + '/' + task.folder_id + '/';
+          dataset_link = (0, _preact.h)(
+            _reactRouterDom.Link,
+            { to: href },
+            label
+          );
+        } else {
+          dataset_link = label;
+        }
+        return (0, _preact.h)(
+          'div',
+          { 'class': 'row' },
+          (0, _preact.h)(
+            'div',
+            { 'class': 'activity' },
+            task.activity,
+            ' ',
+            task.module
+          ),
+          (0, _preact.h)(
+            'div',
+            { 'class': 'dataset' },
+            dataset_link
+          ),
+          (0, _preact.h)(
+            'div',
+            { className: "age " + _util2.default.carbon_date(task.updated_at) },
+            _util2.default.get_age(task.updated_at)
+          ),
+          (0, _preact.h)(
+            'div',
+            { 'class': 'options' },
+            (0, _preact.h)(
+              'span',
+              { 'class': 'destroy', onClick: function onClick() {
+                  return _this2.handleDestroy(task);
+                } },
+              'x'
+            )
+          )
+        );
+      });
+      return (0, _preact.h)(
+        'div',
+        { 'class': 'tasklist rows' },
+        taskList
+      );
+    }
+  }, {
+    key: 'handleDestroy',
+    value: function handleDestroy(task) {
+      var yes = confirm('Are you sure you want to delete this task?');
+      if (yes) {
+        _actions2.default.task.destroy(task);
+      }
+    }
+  }]);
+
+  return TaskList;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {};
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    // actions: bindActionCreators(liveActions, dispatch)
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(TaskList);
+
+/***/ }),
+
+/***/ "./app/client/common/textInput.component.js":
+/*!**************************************************!*\
+  !*** ./app/client/common/textInput.component.js ***!
+  \**************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var TextInput = function (_Component) {
+  _inherits(TextInput, _Component);
+
+  function TextInput(props) {
+    _classCallCheck(this, TextInput);
+
+    var _this = _possibleConstructorReturn(this, (TextInput.__proto__ || Object.getPrototypeOf(TextInput)).call(this, props));
+
+    _this.state = { value: null, changed: false };
+    _this.handleInput = _this.handleInput.bind(_this);
+    _this.handleKeydown = _this.handleKeydown.bind(_this);
+    return _this;
+  }
+
+  _createClass(TextInput, [{
+    key: 'handleInput',
+    value: function handleInput(e) {
+      this.setState({
+        value: e.target.value,
+        changed: true
+      });
+      this.props.onInput && this.props.onInput(e.target.value, e.target.name);
+    }
+  }, {
+    key: 'handleKeydown',
+    value: function handleKeydown(e) {
+      if (e.keyCode === 13) {
+        this.setState({
+          value: e.target.value,
+          changed: false
+        });
+        this.props.onSave && this.props.onSave(e.target.value, e.target.name);
+      }
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      var _h;
+
+      return (0, _preact.h)(
+        'div',
+        { className: 'textInput param' },
+        (0, _preact.h)(
+          'label',
+          null,
+          (0, _preact.h)(
+            'span',
+            null,
+            this.props.title
+          ),
+          (0, _preact.h)('input', (_h = {
+            type: this.props.type || 'text',
+            name: this.props.name || 'text',
+            value: this.state.changed ? this.state.value : this.props.value,
+            onInput: this.handleInput,
+            onKeydown: this.handleKeydown,
+            autofocus: this.props.autofocus,
+            autoComplete: this.props.autocomplete,
+            autoCapitalize: this.props.autocapitalize || 'off',
+            placeholder: this.props.placeholder
+          }, _defineProperty(_h, 'autofocus', this.props.autofocus), _defineProperty(_h, 'className', this.props.className || ''), _h))
+        )
+      );
+    }
+  }]);
+
+  return TextInput;
+}(_preact.Component);
+
+exports.default = TextInput;
+
+/***/ }),
+
+/***/ "./app/client/common/views/index.js":
+/*!******************************************!*\
+  !*** ./app/client/common/views/index.js ***!
+  \******************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.New = undefined;
+
+var _newView = __webpack_require__(/*! ./new.view.js */ "./app/client/common/views/new.view.js");
+
+var _newView2 = _interopRequireDefault(_newView);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var New = exports.New = _newView2.default;
+
+/***/ }),
+
+/***/ "./app/client/common/views/new.view.js":
+/*!*********************************************!*\
+  !*** ./app/client/common/views/new.view.js ***!
+  \*********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _reactRouterDom = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
+
+var _util = __webpack_require__(/*! ../../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _group = __webpack_require__(/*! ../group.component */ "./app/client/common/group.component.js");
+
+var _group2 = _interopRequireDefault(_group);
+
+var _param = __webpack_require__(/*! ../param.component */ "./app/client/common/param.component.js");
+
+var _param2 = _interopRequireDefault(_param);
+
+var _loading = __webpack_require__(/*! ../loading.component */ "./app/client/common/loading.component.js");
+
+var _loading2 = _interopRequireDefault(_loading);
+
+var _folderList = __webpack_require__(/*! ../folderList.component */ "./app/client/common/folderList.component.js");
+
+var _folderList2 = _interopRequireDefault(_folderList);
+
+var _dataset = __webpack_require__(/*! ../../dataset/dataset.new */ "./app/client/dataset/dataset.new.js");
+
+var _dataset2 = _interopRequireDefault(_dataset);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var NewView = function (_Component) {
+  _inherits(NewView, _Component);
+
+  function NewView(props) {
+    _classCallCheck(this, NewView);
+
+    var _this = _possibleConstructorReturn(this, (NewView.__proto__ || Object.getPrototypeOf(NewView)).call(this, props));
+
+    console.log(props);
+    if (!props.db.data) {
+      props.actions.load_directories();
+    }
+    return _this;
+  }
+
+  _createClass(NewView, [{
+    key: 'render',
+    value: function render() {
+      var _props = this.props,
+          module = _props.module,
+          history = _props.history,
+          db = _props.db,
+          path = _props.path;
+
+      return (0, _preact.h)(
+        'div',
+        { 'class': 'app new-view ' + module.name },
+        (0, _preact.h)(
+          'div',
+          { 'class': 'heading' },
+          (0, _preact.h)(
+            'h1',
+            null,
+            module.displayName || module.name
+          )
+        ),
+        (0, _preact.h)(
+          'div',
+          { 'class': 'col narrow' },
+          (0, _preact.h)(_dataset2.default, {
+            module: module,
+            history: history
+          }),
+          (0, _preact.h)(_folderList2.default, {
+            db: db,
+            path: path,
+            activity: 'dataset',
+            emptyText: (0, _preact.h)(
+              'i',
+              null,
+              'No projects yet. Please create one~'
+            )
+          })
+        )
+      );
+    }
+  }]);
+
+  return NewView;
+}(_preact.Component);
+
+exports.default = NewView;
+
+/***/ }),
+
+/***/ "./app/client/dashboard/dashboard.actions.js":
+/*!***************************************************!*\
+  !*** ./app/client/dashboard/dashboard.actions.js ***!
+  \***************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.load = undefined;
+
+var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
+
+var _types = __webpack_require__(/*! ../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _actions = __webpack_require__(/*! ../actions */ "./app/client/actions.js");
+
+var _actions2 = _interopRequireDefault(_actions);
+
+var _util = __webpack_require__(/*! ../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var load = exports.load = function load() {
+  return function (dispatch) {
+    _util2.default.allProgress([_actions2.default.task.index({ limit: 40, orderBy: 'created_at desc' }), _actions2.default.folder.index({ activity: 'dataset' }), _actions2.default.file.index({ module: 'samplernn', generated: 1, limit: 15, orderBy: 'created_at desc' }), _actions2.default.file.index({ module: 'pix2pixhd', generated: 1, limit: 15, orderBy: 'created_at desc' }), _actions2.default.file.index({ module: 'morph', generated: 1, limit: 15, orderBy: 'created_at desc' })], function (percent, i, n) {
+      // console.log('dashboard load progress', i, n)
+      dispatch({
+        type: _types2.default.app.load_progress,
+        progress: { i: i, n: n },
+        data: { module: 'dashboard' }
+      });
+    }).then(function (res) {
+      var _res = _slicedToArray(res, 5),
+          tasks = _res[0],
+          folders = _res[1],
+          samplernn = _res[2],
+          pix2pixhd = _res[3],
+          morph = _res[4];
+
+      var _util$sort$orderByFn = _util2.default.sort.orderByFn('date desc'),
+          mapFn = _util$sort$orderByFn.mapFn,
+          sortFn = _util$sort$orderByFn.sortFn;
+
+      var foldersByModule = folders.map(mapFn).sort(sortFn).reduce(function (a, b) {
+        var module = b[1].module;
+        a[module] = a[module] || [];
+        a[module].push(b[1]);
+        return a;
+      }, {});
+      dispatch({
+        type: _types2.default.dashboard.load,
+        data: {
+          tasks: tasks,
+          folders: folders,
+          foldersByModule: foldersByModule,
+          renders: {
+            samplernn: samplernn,
+            pix2pixhd: pix2pixhd,
+            morph: morph
+          }
+        }
+      });
+    });
+  };
+};
+
+/***/ }),
+
+/***/ "./app/client/dashboard/dashboard.component.js":
+/*!*****************************************************!*\
+  !*** ./app/client/dashboard/dashboard.component.js ***!
+  \*****************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRouterDom = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _player = __webpack_require__(/*! ../common/player.component */ "./app/client/common/player.component.js");
+
+var _player2 = _interopRequireDefault(_player);
+
+var _group = __webpack_require__(/*! ../common/group.component */ "./app/client/common/group.component.js");
+
+var _group2 = _interopRequireDefault(_group);
+
+var _slider = __webpack_require__(/*! ../common/slider.component */ "./app/client/common/slider.component.js");
+
+var _slider2 = _interopRequireDefault(_slider);
+
+var _select = __webpack_require__(/*! ../common/select.component */ "./app/client/common/select.component.js");
+
+var _select2 = _interopRequireDefault(_select);
+
+var _button = __webpack_require__(/*! ../common/button.component */ "./app/client/common/button.component.js");
+
+var _button2 = _interopRequireDefault(_button);
+
+var _dashboardheader = __webpack_require__(/*! ./dashboardheader.component */ "./app/client/dashboard/dashboardheader.component.js");
+
+var _dashboardheader2 = _interopRequireDefault(_dashboardheader);
+
+var _common = __webpack_require__(/*! ../common */ "./app/client/common/index.js");
+
+var _dashboard = __webpack_require__(/*! ./dashboard.actions */ "./app/client/dashboard/dashboard.actions.js");
+
+var dashboardActions = _interopRequireWildcard(_dashboard);
+
+var _audioPlayer = __webpack_require__(/*! ../common/audioPlayer/audioPlayer.actions */ "./app/client/common/audioPlayer/audioPlayer.actions.js");
+
+var audioPlayerActions = _interopRequireWildcard(_audioPlayer);
+
+var _modules = __webpack_require__(/*! ../modules */ "./app/client/modules/index.js");
+
+var _modules2 = _interopRequireDefault(_modules);
+
+var _actions = __webpack_require__(/*! ../actions */ "./app/client/actions.js");
+
+var _actions2 = _interopRequireDefault(_actions);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var Dashboard = function (_Component) {
+  _inherits(Dashboard, _Component);
+
+  function Dashboard(props) {
+    _classCallCheck(this, Dashboard);
+
+    // console.log(props)
+    var _this = _possibleConstructorReturn(this, (Dashboard.__proto__ || Object.getPrototypeOf(Dashboard)).call(this));
+
+    props.actions.load();
+    return _this;
+  }
+
+  _createClass(Dashboard, [{
+    key: 'componentWillUpdate',
+    value: function componentWillUpdate(nextProps) {
+      // if (nextProps.opt.checkpoint_name && nextProps.opt.checkpoint_name !== this.props.opt.checkpoint_name) {
+      //   this.props.actions.list_epochs(nextProps.opt.checkpoint_name)
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      var _this2 = this;
+
+      var _props = this.props,
+          loading = _props.loading,
+          progress = _props.progress,
+          site = _props.site,
+          foldersByModule = _props.foldersByModule,
+          renders = _props.renders,
+          queue = _props.queue,
+          images = _props.images;
+
+      if (loading) {
+        return (0, _preact.h)(_common.Loading, { progress: progress });
+      }
+      var tasks = queue.tasks;
+
+      var folders = foldersByModule && Object.keys(_modules2.default).sort().map(function (key) {
+        var path = key === 'samplernn' ? '/samplernn/datasets/' : '/' + key + '/sequences/';
+        var folder_list = (foldersByModule[key] || []).map(function (folder) {
+          return (0, _preact.h)(
+            'div',
+            { key: folder.id },
+            (0, _preact.h)(
+              _reactRouterDom.Link,
+              { to: path + folder.id + '/' },
+              folder.name
+            )
+          );
+        });
+
+        var files = renders[key] && (0, _preact.h)(_common.FileList, {
+          linkFiles: true,
+          files: renders[key],
+          orderBy: 'date desc',
+          fields: 'name date epoch size',
+          onClick: key === 'samplernn' ? function (file, e) {
+            e.preventDefault();
+            e.stopPropagation();
+            console.log('picked a file', file);
+            _this2.handlePick(file);
+          } : null
+        });
+
+        return (0, _preact.h)(
+          'div',
+          { className: 'dashboardModule', key: key },
+          (0, _preact.h)(
+            'div',
+            { className: 'row moduleHeading' },
+            (0, _preact.h)(
+              'h3',
+              null,
+              key
+            ),
+            (0, _preact.h)(
+              'div',
+              null,
+              (0, _preact.h)(
+                _reactRouterDom.Link,
+                { to: '/' + key + '/new/' },
+                'new'
+              )
+            ),
+            folder_list
+          ),
+          files
+        );
+      }).filter(function (a) {
+        return !!a;
+      });
+      return (0, _preact.h)(
+        'div',
+        { className: 'app dashboard' },
+        (0, _preact.h)(_dashboardheader2.default, null),
+        (0, _preact.h)(
+          'div',
+          { className: 'params row' },
+          (0, _preact.h)(
+            'div',
+            { className: 'column' },
+            !!queue.queue.length && (0, _preact.h)(
+              _group2.default,
+              { title: 'Upcoming Tasks' },
+              (0, _preact.h)(_common.TaskList, { tasks: queue.queue.map(function (id) {
+                  return tasks[id];
+                }) })
+            ),
+            !!queue.completed.length && (0, _preact.h)(
+              _group2.default,
+              { title: 'Completed Tasks' },
+              (0, _preact.h)(_common.TaskList, { tasks: queue.completed.map(function (id) {
+                  return tasks[id];
+                }) })
+            )
+          ),
+          (0, _preact.h)(
+            'div',
+            { className: 'column' },
+            folders
+          )
+        )
+      );
+    }
+  }, {
+    key: 'handlePick',
+    value: function handlePick(file) {
+      this.props.audioPlayer.play(file);
+    }
+  }]);
+
+  return Dashboard;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {
+    loading: state.dashboard.loading,
+    progress: state.dashboard.progress,
+    site: state.system.site,
+    foldersByModule: state.dashboard.data.foldersByModule,
+    renders: state.dashboard.data.renders,
+    images: state.dashboard.images,
+    files: state.dashboard.files,
+    queue: state.queue
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    actions: (0, _redux.bindActionCreators)(dashboardActions, dispatch),
+    audioPlayer: (0, _redux.bindActionCreators)(audioPlayerActions, dispatch)
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Dashboard);
+
+/***/ }),
+
+/***/ "./app/client/dashboard/dashboard.reducer.js":
+/*!***************************************************!*\
+  !*** ./app/client/dashboard/dashboard.reducer.js ***!
+  \***************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _types = __webpack_require__(/*! ../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _moment = __webpack_require__(/*! moment/min/moment.min */ "./node_modules/moment/min/moment.min.js");
+
+var _moment2 = _interopRequireDefault(_moment);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var FileSaver = __webpack_require__(/*! file-saver */ "./node_modules/file-saver/FileSaver.js");
+
+var dashboardInitialState = {
+  loading: false,
+  progress: null,
+  error: null,
+  data: {},
+  images: [],
+  files: []
+};
+
+var dashboardReducer = function dashboardReducer() {
+  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : dashboardInitialState;
+  var action = arguments[1];
+
+  switch (action.type) {
+    case _types2.default.app.load_progress:
+      if (!action.data || action.data.module !== 'dashboard') {
+        return state;
+      }
+      return _extends({}, state, {
+        loading: true,
+        progress: action.progress
+      });
+    case _types2.default.dashboard.load:
+      return _extends({}, state, {
+        loading: false,
+        error: null,
+        data: action.data
+      });
+    default:
+      return state;
+  }
+};
+
+exports.default = dashboardReducer;
+
+/***/ }),
+
+/***/ "./app/client/dashboard/dashboardheader.component.js":
+/*!***********************************************************!*\
+  !*** ./app/client/dashboard/dashboardheader.component.js ***!
+  \***********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _util = __webpack_require__(/*! ../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var DashboardHeader = function (_Component) {
+  _inherits(DashboardHeader, _Component);
+
+  function DashboardHeader(props) {
+    _classCallCheck(this, DashboardHeader);
+
+    var _this = _possibleConstructorReturn(this, (DashboardHeader.__proto__ || Object.getPrototypeOf(DashboardHeader)).call(this, props));
+
+    _this.handleClick = _this.handleClick.bind(_this);
+    return _this;
+  }
+
+  _createClass(DashboardHeader, [{
+    key: 'handleClick',
+    value: function handleClick(e) {
+      this.props.onClick && this.props.onClick();
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      var _props = this.props,
+          site = _props.site,
+          runner = _props.runner;
+
+      return (0, _preact.h)(
+        'div',
+        { 'class': 'dashboardHeader heading' },
+        (0, _preact.h)(
+          'h1',
+          null,
+          site.name,
+          ' cortex'
+        ),
+        this.renderStatus("GPU", runner.gpu),
+        this.renderStatus("CPU", runner.cpu)
+      );
+    }
+  }, {
+    key: 'renderStatus',
+    value: function renderStatus(name, gpu) {
+      if (gpu.status === 'IDLE') {
+        return (0, _preact.h)(
+          'div',
+          null,
+          name,
+          ' idle'
+        );
+      }
+      var task = gpu.task;
+      var activityPhrase = void 0,
+          liveMessage = void 0;
+      if (task.activity === 'live') {
+        return (0, _preact.h)(
+          'div',
+          null,
+          name,
+          ' running ',
+          (0, _preact.h)(
+            'b',
+            null,
+            task.module
+          ),
+          ' live on "',
+          task.dataset,
+          '"'
+        );
+      } else {
+        return (0, _preact.h)(
+          'div',
+          null,
+          name,
+          ' ',
+          _util2.default.gerund(task.activity),
+          ' ',
+          (0, _preact.h)(
+            'b',
+            null,
+            task.module
+          ),
+          ' on ',
+          (0, _preact.h)(
+            'b',
+            null,
+            task.dataset
+          ),
+          !!task.epoch && (0, _preact.h)(
+            'span',
+            null,
+            'Epoch: ',
+            task.epoch,
+            ' / ',
+            task.epochs,
+            (0, _preact.h)('br', null)
+          )
+        );
+      }
+    }
+  }]);
+
+  return DashboardHeader;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {
+    runner: state.system.runner,
+    site: state.system.site
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {};
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(DashboardHeader);
+
+/***/ }),
+
+/***/ "./app/client/dataset/dataset.actions.js":
+/*!***********************************************!*\
+  !*** ./app/client/dataset/dataset.actions.js ***!
+  \***********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.uploadFiles = exports.fetchURL = exports.uploadFile = exports.updateFolder = exports.createFolder = undefined;
+
+var _types = __webpack_require__(/*! ../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _actions = __webpack_require__(/*! ../actions */ "./app/client/actions.js");
+
+var _actions2 = _interopRequireDefault(_actions);
+
+var _api = __webpack_require__(/*! ../api */ "./app/client/api/index.js");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var createFolder = exports.createFolder = function createFolder(module, name) {
+  return function (dispatch) {
+    return _actions2.default.folder.create({
+      // username... should get added inside the API
+      module: module.name,
+      datatype: module.datatype,
+      activity: 'dataset',
+      name: name
+    });
+  };
+}; // import socket from '../socket'
+var updateFolder = exports.updateFolder = function updateFolder(module, folder, name) {
+  var opt = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
+  return function (dispatch) {
+    if (!folder || !folder.id) {
+      return null;
+    }
+    return _actions2.default.folder.update({
+      id: folder.id,
+      module: module.name,
+      datatype: module.datatype,
+      activity: 'dataset',
+      name: name,
+      opt: opt
+    });
+  };
+};
+
+var uploadFile = exports.uploadFile = function uploadFile(module, folder, file, filename, opt) {
+  return function (dispatch) {
+    var fd = new FormData();
+    fd.append('file', file, filename);
+    _actions2.default.folder.upload(fd, {
+      id: folder.id,
+      module: module.name,
+      activity: 'file',
+      epoch: 0,
+      processed: false,
+      generated: false,
+      opt: opt
+    });
+  };
+};
+
+var fetchURL = exports.fetchURL = function fetchURL(module, folder, url) {
+  return function (dispatch) {
+    // name url
+    // mime datatype
+    // duration analysis
+    // size activity
+    // opt created_at updated_at
+    console.log(module, folder, url);
+    var seenURL = folder.files.some(function (file) {
+      return file.url === url;
+    });
+    console.log(seenURL);
+    if (seenURL) {
+      console.log('already seen this url');
+      return;
+    }
+    _api.parser.parse(url, function (media) {
+      if (!media) return;
+      console.log('media', media);
+      _actions2.default.file.create({
+        folder_id: folder.id,
+        name: (media.title || "").replace(/\.[^.]+$/g, '').replace(/[^a-zA-Z0-9_]/g, '_').replace(/\s+/g, '_').replace(/_+/g, '_'),
+        module: module.name,
+        dataset: media.token,
+        activity: 'url',
+        duration: parseInt(media.duration) || 0,
+        epoch: 0,
+        processed: false,
+        generated: false,
+        opt: media,
+        url: url
+      });
+    });
+  };
+};
+
+var uploadFiles = exports.uploadFiles = function uploadFiles(files) {
+  return { type: _types2.default.dataset.upload_files };
+};
+
+// export const uploadFiles = (files) => {
+//   return dispatch => {
+//     // return { type: types.dataset.upload_files }
+//   }
+// }
+
+// export const fetchURL = (url) => { type: types.dataset.fetch_url }
+
+/***/ }),
+
+/***/ "./app/client/dataset/dataset.component.js":
+/*!*************************************************!*\
+  !*** ./app/client/dataset/dataset.component.js ***!
+  \*************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _util = __webpack_require__(/*! ../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _actions = __webpack_require__(/*! ../actions */ "./app/client/actions.js");
+
+var _actions2 = _interopRequireDefault(_actions);
+
+var _fileList = __webpack_require__(/*! ../common/fileList.component */ "./app/client/common/fileList.component.js");
+
+var _loading = __webpack_require__(/*! ../common/loading.component */ "./app/client/common/loading.component.js");
+
+var _loading2 = _interopRequireDefault(_loading);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var fieldSet = _util2.default.fieldSet(new Set(['input', 'status', 'checkpoint', 'output']));
+
+var DatasetComponent = function (_Component) {
+  _inherits(DatasetComponent, _Component);
+
+  function DatasetComponent() {
+    _classCallCheck(this, DatasetComponent);
+
+    return _possibleConstructorReturn(this, (DatasetComponent.__proto__ || Object.getPrototypeOf(DatasetComponent)).apply(this, arguments));
+  }
+
+  _createClass(DatasetComponent, [{
+    key: 'render',
+    value: function render() {
+      var _props = this.props,
+          loading = _props.loading,
+          progress = _props.progress,
+          fields = _props.fields,
+          module = _props.module,
+          data = _props.data,
+          folder = _props.folder,
+          match = _props.match,
+          history = _props.history;
+
+      if (loading) {
+        return (0, _preact.h)(_loading2.default, { progress: progress });
+      }
+      if (!data.folders.length) {
+        console.log('no folders, redirect to /new');
+        return history.push('/' + module.name + '/new/');
+      }
+      if (!folder || !folder.name) return;
+      fields = fieldSet(fields);
+      return (0, _preact.h)(
+        'div',
+        { 'class': 'rows params datasets' },
+        (0, _preact.h)(
+          'div',
+          { 'class': 'row row-heading dataset' },
+          fields.has('input') && (0, _preact.h)(
+            'div',
+            { 'class': 'col' },
+            'input'
+          ),
+          fields.has('status') && (0, _preact.h)(
+            'div',
+            { 'class': 'col' },
+            'status'
+          ),
+          fields.has('checkpoint') && (0, _preact.h)(
+            'div',
+            { 'class': 'col' },
+            'checkpoint'
+          ),
+          fields.has('output') && (0, _preact.h)(
+            'div',
+            { 'class': 'col' },
+            'output'
+          )
+        ),
+        this.renderGroups()
+      );
+    }
+  }, {
+    key: 'renderGroups',
+    value: function renderGroups() {
+      var _this2 = this;
+
+      var _props2 = this.props,
+          module = _props2.module,
+          data = _props2.data,
+          folder = _props2.folder,
+          fields = _props2.fields,
+          runner = _props2.runner,
+          onPickDataset = _props2.onPickDataset,
+          onPickFile = _props2.onPickFile,
+          datasetActions = _props2.datasetActions;
+
+      fields = fieldSet(fields);
+      var datasetLookup = data.datasetLookup,
+          fileLookup = data.fileLookup;
+
+      if (!datasetLookup) {
+        return (0, _preact.h)('div', null);
+      }
+
+      var _util$sort$orderByFn = _util2.default.sort.orderByFn('date desc'),
+          mapFn = _util$sort$orderByFn.mapFn,
+          sortFn = _util$sort$orderByFn.sortFn;
+
+      var moduleOnCPU = runner && runner.cpu.task && runner.cpu.task.module === module.name;
+      var moduleOnGPU = runner && runner.gpu.task && runner.gpu.task.module === module.name;
+      var datasets = folder.datasets.map(function (name) {
+        return datasetLookup[name];
+      }).map(mapFn).sort(sortFn).map(function (pair) {
+        var dataset = pair[1];
+        var status = '';
+        var isProcessing = false,
+            isFetching = false;
+        if (moduleOnGPU && runner.gpu.task.dataset === dataset) {
+          status = _util2.default.gerund(runner.gpu.task.activity);
+          isProcessing = true;
+        } else if (moduleOnCPU && runner.cpu.task.activity === 'fetch' && runner.cpu.task.opt.file_id === dataset.input[0]) {
+          isProcessing = true;
+          isFetching = true;
+        }
+        return (0, _preact.h)(
+          'div',
+          { key: dataset.name, className: 'row dataset', onClick: function onClick() {
+              return onPickDataset && onPickDataset(dataset);
+            } },
+          _this2.props.beforeRow && _this2.props.beforeRow(dataset),
+          fields.has('input') && (0, _preact.h)(
+            'div',
+            { className: 'col' },
+            !!dataset.input.length && (0, _preact.h)(_fileList.FileList, {
+              files: dataset.input.map(function (id) {
+                return fileLookup[id];
+              }),
+              className: 'input_files',
+              fileListClassName: '',
+              rowClassName: 'input_file',
+              fields: 'name date size delete',
+              linkFiles: true,
+              onClick: onPickFile,
+              onDelete: function onDelete(file) {
+                return _this2.onDeleteFile(file);
+              }
+            })
+          ),
+          fields.has('status') && (0, _preact.h)(
+            'div',
+            { className: ['col', 'quiet', dataset.isBuilt ? 'built' : 'not_built', isProcessing ? 'processing' : 'not_processing'].join(' ') },
+            _this2.props.datasetActions && _this2.props.datasetActions(dataset, isFetching, isProcessing),
+            status
+          ),
+          fields.has('checkpoint') && (0, _preact.h)(
+            'div',
+            { className: 'col checkpoint' },
+            !!dataset.checkpoints.length && (0, _preact.h)(_fileList.FileRow, {
+              file: dataset.checkpoints[0],
+              fields: 'name date epoch',
+              className: 'row checkpoint'
+            })
+          ),
+          fields.has('output') && (0, _preact.h)(
+            'div',
+            { className: 'col' },
+            !!dataset.output.length && (0, _preact.h)(_fileList.FileList, {
+              files: dataset.output.map(function (id) {
+                return fileLookup[id];
+              }),
+              orderBy: 'epoch desc',
+              fields: 'name date epoch size',
+              linkFiles: true,
+              onClick: onPickFile,
+              onDelete: function onDelete(file) {
+                return _this2.onDeleteFile(file);
+              }
+            })
+          ),
+          _this2.props.afterRow && _this2.props.afterRow(dataset)
+        );
+      });
+      return datasets;
+    }
+  }, {
+    key: 'onDeleteFile',
+    value: function onDeleteFile(file) {
+      var yes = confirm('Are you sure you want to delete this file?');
+      if (yes) {
+        console.log('delete: confirmed');
+        if (this.props.onDeleteFile) {
+          console.log('calling custom deletefile function');
+          this.props.onDeleteFile(file);
+        } else {
+          _actions2.default.file.destroy(file);
+        }
+      }
+    }
+  }]);
+
+  return DatasetComponent;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {
+    runner: state.system.runner
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {};
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(DatasetComponent);
+
+/***/ }),
+
+/***/ "./app/client/dataset/dataset.form.js":
+/*!********************************************!*\
+  !*** ./app/client/dataset/dataset.form.js ***!
+  \********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _dataset = __webpack_require__(/*! ./dataset.actions */ "./app/client/dataset/dataset.actions.js");
+
+var datasetActions = _interopRequireWildcard(_dataset);
+
+var _group = __webpack_require__(/*! ../common/group.component */ "./app/client/common/group.component.js");
+
+var _group2 = _interopRequireDefault(_group);
+
+var _param = __webpack_require__(/*! ../common/param.component */ "./app/client/common/param.component.js");
+
+var _param2 = _interopRequireDefault(_param);
+
+var _fileList = __webpack_require__(/*! ../common/fileList.component */ "./app/client/common/fileList.component.js");
+
+var _fileUpload = __webpack_require__(/*! ../common/fileUpload.component */ "./app/client/common/fileUpload.component.js");
+
+var _fileUpload2 = _interopRequireDefault(_fileUpload);
+
+var _textInput = __webpack_require__(/*! ../common/textInput.component */ "./app/client/common/textInput.component.js");
+
+var _textInput2 = _interopRequireDefault(_textInput);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var DatasetForm = function (_Component) {
+  _inherits(DatasetForm, _Component);
+
+  function DatasetForm() {
+    _classCallCheck(this, DatasetForm);
+
+    return _possibleConstructorReturn(this, (DatasetForm.__proto__ || Object.getPrototypeOf(DatasetForm)).apply(this, arguments));
+  }
+
+  _createClass(DatasetForm, [{
+    key: 'render',
+    value: function render() {
+      var _props = this.props,
+          loading = _props.loading,
+          status = _props.status,
+          error = _props.error,
+          module = _props.module,
+          folder = _props.folder,
+          _props$title = _props.title,
+          title = _props$title === undefined ? 'Dataset' : _props$title,
+          canRename = _props.canRename,
+          canUpload = _props.canUpload,
+          canAddURL = _props.canAddURL;
+      // sort files??
+
+      if (!folder.id) {
+        return (0, _preact.h)(
+          'div',
+          { className: 'params row' },
+          (0, _preact.h)(
+            'div',
+            { className: 'column' },
+            this.renderFolderNameInput(folder.name)
+          )
+        );
+      }
+      return (0, _preact.h)(
+        'div',
+        { className: 'form params row' },
+        (0, _preact.h)(
+          'div',
+          { className: 'col' },
+          (0, _preact.h)(
+            _group2.default,
+            null,
+            canRename && this.renderFolderNameInput(folder.name),
+            canUpload && this.renderUploadInput(),
+            canAddURL && this.renderURLInput()
+          )
+        )
+      );
+    }
+  }, {
+    key: 'curry',
+    value: function curry(action) {
+      var _props2 = this.props,
+          module = _props2.module,
+          folder = _props2.folder;
+
+      return function (param) {
+        return action(module, folder, param);
+      };
+    }
+  }, {
+    key: 'renderFolderNameInput',
+    value: function renderFolderNameInput(name) {
+      return (0, _preact.h)(_textInput2.default, {
+        title: 'Dataset name',
+        value: name,
+        onSave: this.curry(this.props.actions.dataset.updateFolder)
+      });
+    }
+  }, {
+    key: 'renderUploadInput',
+    value: function renderUploadInput() {
+      return (0, _preact.h)(_fileUpload2.default, {
+        title: 'Upload a file',
+        mime: 'image.*',
+        onUpload: this.curry(this.props.actions.dataset.uploadFile)
+      });
+    }
+  }, {
+    key: 'renderURLInput',
+    value: function renderURLInput() {
+      return (0, _preact.h)(_textInput2.default, {
+        title: 'Fetch a URL',
+        placeholder: 'http://',
+        onSave: this.curry(this.props.actions.dataset.fetchURL)
+      });
+    }
+  }]);
+
+  return DatasetForm;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+  return state.upload;
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    actions: {
+      dataset: (0, _redux.bindActionCreators)(datasetActions, dispatch)
+    }
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(DatasetForm);
+
+/***/ }),
+
+/***/ "./app/client/dataset/dataset.loader.js":
+/*!**********************************************!*\
+  !*** ./app/client/dataset/dataset.loader.js ***!
+  \**********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.load = exports.getDataset = exports.emptyDataset = exports.unsortedFolder = undefined;
+
+var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
+
+var _actions = __webpack_require__(/*! ../actions */ "./app/client/actions.js");
+
+var _actions2 = _interopRequireDefault(_actions);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var unsortedFolders = {};
+
+var unsortedFolder = exports.unsortedFolder = function unsortedFolder(module) {
+  var instantiate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+
+  if (!unsortedFolders[module] || instantiate) {
+    var folder = {
+      id: 0,
+      module: module,
+      name: 'unsorted',
+      files: [],
+      datasets: []
+    };
+    unsortedFolders[module] = folder;
+  }
+  return unsortedFolders[module];
+};
+
+var emptyDataset = exports.emptyDataset = function emptyDataset(module, datasetLookup, name, folder) {
+  var dataset = {
+    name: name,
+    input: [],
+    checkpoints: [],
+    output: []
+  };
+  datasetLookup[name] = dataset;
+  folder = folder || unsortedFolder(module);
+  folder.datasets.push(name);
+  return dataset;
+};
+
+var getDataset = exports.getDataset = function getDataset(module, datasetLookup, name, folder, date) {
+  name = name.toLowerCase();
+  var dataset = datasetLookup[name] || emptyDataset(module, datasetLookup, name, folder);
+  // folder = folder || unsortedFolder(module)
+  if (date) {
+    dataset.date = dataset.date && !isNaN(dataset.date) ? Math.max(+new Date(date), dataset.date) : +new Date(date);
+  }
+  return dataset;
+};
+
+var load = exports.load = function load(module) {
+  console.log(module);
+  return Promise.all([_actions2.default.folder.index({ module: module, limit: 0 }), _actions2.default.file.index({ module: module, limit: 0 }), _actions2.default.task.index({ module: module })]).then(function (res) {
+    var _res = _slicedToArray(res, 3),
+        folders = _res[0],
+        files = _res[1],
+        tasks = _res[2];
+
+    var datasetLookup = {};
+    var folderLookup = {};
+    var fileLookup = {};
+
+    var resultsFolder = void 0;
+
+    // take all of the folders and put them in a lookup
+    folderLookup = folders.reduce(function (folderLookup, folder) {
+      folderLookup[folder.id] = {
+        id: folder.id,
+        name: folder.name,
+        folder: folder,
+        files: [],
+        datasets: []
+      };
+      if (folder.name === 'results') {
+        resultsFolder = folder;
+      }
+      return folderLookup;
+    }, {
+      unsorted: unsortedFolder(module, true)
+    });
+
+    if (!resultsFolder) {
+      console.log('creating results folder...');
+      _actions2.default.folder.create({
+        module: module,
+        name: 'results',
+        activity: 'results'
+      }).then(function (folder) {
+        console.log('created folder', folder);
+        folderLookup.results = folder;
+      });
+    } else {
+      console.log('got results folder', resultsFolder);
+    }
+
+    // prepare the files by splitting into two groups
+    var generatedFiles = files.filter(function (file) {
+      return file.generated;
+    });
+    var ungeneratedFiles = files.filter(function (file) {
+      return !file.generated;
+    });
+
+    // build the initial dataset lookup table using the ungenerated files
+    ungeneratedFiles.reduce(function (datasetLookup, file) {
+      fileLookup[file.id] = file;
+      if (!file.name) {
+        if (file.opt && file.opt.media && file.opt.media.token) {
+          file.name = file.opt.media.token;
+        } else {
+          file.name = file.url.replace(/^https?:\/\/(www.)?/, '').replace(/[^a-zA-Z0-9_]/g, '_').replace(/_+/g, '_') || 'unknown_' + Math.floor(1000 * Math.random());
+        }
+      }
+      var name = (file.name || 'unsorted').split('.')[0];
+      var folder = folderLookup[file.folder_id] || unsortedFolder(module);
+      var dataset = getDataset(module, datasetLookup, file.dataset || name, folder, file.date || file.created_at);
+      if (file.url.match(file.name)) file.persisted = true;
+      dataset.input.push(file.id);
+      folder.files.push(file.id);
+      return datasetLookup;
+    }, datasetLookup);
+
+    // go over the generated files and add addl datasets (if the files were deleted)
+    generatedFiles.map(function (file) {
+      fileLookup[file.id] = file;
+      var pair = file.name.split('.')[0].split('-');
+      var folder = folderLookup[file.folder_id] || unsortedFolder(module);
+      var dataset = getDataset(module, datasetLookup, file.dataset || pair[0], folder, file.date || file.created_at);
+      dataset.output.push(file.id);
+      folder.files.push(file.id);
+      file.epoch = file.epoch || pair[1];
+    });
+
+    return {
+      folderLookup: folderLookup,
+      fileLookup: fileLookup,
+      datasetLookup: datasetLookup,
+      folders: folders,
+      files: files,
+      unsortedFolder: folderLookup.unsorted,
+      resultsFolder: resultsFolder
+    };
+  }).catch(function (e) {
+    console.error(e);
+  });
+};
+
+/***/ }),
+
+/***/ "./app/client/dataset/dataset.new.js":
+/*!*******************************************!*\
+  !*** ./app/client/dataset/dataset.new.js ***!
+  \*******************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _dataset = __webpack_require__(/*! ./dataset.actions */ "./app/client/dataset/dataset.actions.js");
+
+var datasetActions = _interopRequireWildcard(_dataset);
+
+var _loading = __webpack_require__(/*! ../common/loading.component */ "./app/client/common/loading.component.js");
+
+var _loading2 = _interopRequireDefault(_loading);
+
+var _textInput = __webpack_require__(/*! ../common/textInput.component */ "./app/client/common/textInput.component.js");
+
+var _textInput2 = _interopRequireDefault(_textInput);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function NewDatasetForm(props) {
+  var loading = props.loading,
+      status = props.status,
+      error = props.error,
+      history = props.history,
+      actions = props.actions,
+      module = props.module;
+
+  if (loading) return (0, _preact.h)(_loading2.default, null);
+  console.log(props);
+  return (0, _preact.h)(
+    'div',
+    { 'class': 'opaque' },
+    (0, _preact.h)(
+      'div',
+      { 'class': 'heading' },
+      (0, _preact.h)(
+        'h2',
+        null,
+        'Create a new ',
+        module.displayName,
+        ' project'
+      )
+    ),
+    (0, _preact.h)(
+      'div',
+      { 'class': 'params' },
+      (0, _preact.h)(_textInput2.default, {
+        autofocus: true,
+        title: 'Name your project',
+        onSave: function onSave(name) {
+          actions.createFolder(module, name).then(function (folder) {
+            window.location.href = '/' + module.name + '/datasets/' + folder.id + '/';
+          });
+        }
+      })
+    )
+  );
+}
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {};
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    actions: (0, _redux.bindActionCreators)(datasetActions, dispatch)
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(NewDatasetForm);
+
+/***/ }),
+
+/***/ "./app/client/dataset/dataset.reducer.js":
+/*!***********************************************!*\
+  !*** ./app/client/dataset/dataset.reducer.js ***!
+  \***********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _types = __webpack_require__(/*! ../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+/*
+  Note:
+  This is a sub-reducer intended to process the folder-file API output from the DB.
+  Please run this from inside your module reducers :) 
+*/
+
+var datasetInitialState = function datasetInitialState() {
+  return {
+    loading: true,
+    progress: null,
+    error: null,
+    data: null,
+    folder_id: 0
+  };
+};
+
+var datasetReducer = function datasetReducer() {
+  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : datasetInitialState();
+  var action = arguments[1];
+
+  switch (action.type) {
+    case _types2.default.app.load_progress:
+      return _extends({}, state, {
+        progress: action.progress
+      });
+
+    case _types2.default.dataset.load:
+      return _extends({}, state, {
+        loading: false,
+        data: action.data
+      });
+
+    case _types2.default.dataset.set_folder:
+      return _extends({}, state, {
+        folder_id: action.data.folder_id
+      });
+
+    case _types2.default.folder.create:
+      return _extends({}, state, {
+        loading: false,
+        data: {
+          folders: state.data.folders.concat([action.data.id]),
+          folderLookup: _extends({}, state.data.folderLookup, _defineProperty({}, action.data.id, action.data))
+        }
+      });
+      return state;
+
+    case _types2.default.file.create:
+      return handleFileCreate(state, action);
+
+    case _types2.default.file.update:
+      return handleFileUpdate(state, action);
+
+    case _types2.default.file.destroy:
+      return handleFileDestroy(state, action);
+
+    case _types2.default.dataset.list_epochs:
+      return _extends({}, state, {
+        data: _extends({}, state.data, {
+          epochs: action.data.epochs
+        })
+      });
+
+    default:
+      return state;
+  }
+};
+
+function handleFileCreate(state, action) {
+  console.log(action.data);
+  if (!state.data || !state.data.datasetLookup) return state;
+  var dataset = void 0,
+      old_dataset = void 0,
+      folder = void 0,
+      old_folder = void 0;
+  var dataset_name = void 0;
+  if (action.data.dataset) {
+    dataset_name = action.data.dataset;
+  } else if (action.data.name) {
+    dataset_name = action.data.name.split('.')[0];
+  } else if (action.data.url) {
+    dataset_name = action.data.url;
+  } else {
+    dataset_name = null;
+  }
+  if (dataset_name in state.data.datasetLookup) {
+    old_dataset = state.data.datasetLookup[dataset_name];
+    dataset = _extends({}, old_dataset, {
+      input: action.data.generated ? old_dataset.input : [action.data.id].concat(old_dataset.input),
+      output: !action.data.generated ? old_dataset.output : [action.data.id].concat(old_dataset.output)
+    });
+  } else {
+    console.log(action.data.created_at, action.data.date);
+    dataset = {
+      name: dataset_name,
+      date: action.data.created_at || action.data.date,
+      input: action.data.generated ? [] : [action.data.id],
+      checkpoints: [],
+      output: !action.data.generated ? [] : [action.data.id]
+    };
+  }
+  old_folder = state.data.folderLookup[action.data.folder_id];
+  folder = _extends({}, old_folder, {
+    datasets: old_folder.datasets.concat([dataset_name]),
+    files: old_folder.files.concat([action.data.id])
+  });
+  return _extends({}, state, {
+    loading: false,
+    data: _extends({}, state.data, {
+      files: state.data.files.concat([action.data.id]),
+      folderLookup: _extends({}, state.data.folderLookup, _defineProperty({}, action.data.folder_id, folder)),
+      fileLookup: _extends({}, state.data.fileLookup, _defineProperty({}, action.data.id, action.data)),
+      datasetLookup: _extends({}, state.data.datasetLookup, _defineProperty({}, dataset_name, dataset))
+    })
+  });
+}
+
+function handleFileUpdate(state, action) {
+  var _extends6;
+
+  var old_dataset = void 0;
+  var new_dataset = state.data.datasetLookup[action.data.dataset];
+  var old_file = state.data.fileLookup[action.data.id];
+  var new_dataset_update = void 0;
+  if (old_file && action.data.dataset !== old_file.dataset) {
+    if (state.data.datasetLookup[old_file.dataset]) {
+      old_dataset = state.data.datasetLookup[old_file.dataset];
+      old_dataset_update = _extends({}, old_dataset, {
+        input: old_dataset.input.filter(function (id) {
+          return id !== action.data.id;
+        }),
+        output: old_dataset.output.filter(function (id) {
+          return id !== action.data.id;
+        })
+      });
+    }
+    new_dataset_update = _extends({}, new_dataset, {
+      input: action.data.generated ? [] : [action.data.id],
+      output: !action.data.generated ? [] : [action.data.id]
+    });
+  }
+  console.log('old_dataset', old_dataset_update.name);
+  console.log('new_dataset', new_dataset_update.name);
+  return _extends({}, state, {
+    loading: false,
+    data: _extends({}, state.data, {
+      datasetLookup: old_dataset ? _extends({}, state.data.datasetLookup, (_extends6 = {}, _defineProperty(_extends6, old_dataset.name, old_dataset_update), _defineProperty(_extends6, new_dataset.name, new_dataset_update), _extends6)) : new_dataset_update ? _extends({}, state.data.datasetLookup, _defineProperty({}, new_dataset.name, new_dataset_update)) : state.data.datasetLookup,
+      fileLookup: _extends({}, state.data.fileLookup, _defineProperty({}, action.data.id, action.data))
+    })
+  });
+  return state;
+}
+
+function handleFileDestroy(state, action) {
+  if (!state.data) return state;
+  // delete the key from fileLookup
+  var fileLookup = _extends({}, state.data.fileLookup);
+  var datasetLookup = _extends({}, state.data.datasetLookup);
+  var folderLookup = _extends({}, state.data.folderLookup);
+  var old_file = fileLookup[action.data.id];
+  if (!old_file) return state;
+  var old_dataset = state.data.datasetLookup[old_file.dataset];
+  var dataset = void 0;
+  if (old_dataset) {
+    dataset = _extends({}, old_dataset, {
+      input: old_dataset.input.filter(function (id) {
+        return id !== old_file.id;
+      }),
+      output: old_dataset.output.filter(function (id) {
+        return id !== old_file.id;
+      })
+    });
+    if (!dataset.input.length && !dataset.checkpoints.length && !dataset.output.length) {
+      delete datasetLookup[old_file.dataset];
+      var old_folder = folderLookup[old_file.folder_id];
+      folderLookup[old_file.folder_id] = _extends({}, old_folder, {
+        datasets: old_folder.datasets.filter(function (name) {
+          return name !== old_file.dataset;
+        })
+      });
+    } else {
+      console.log('dataset just needs sweeping');
+      datasetLookup[old_file.dataset] = dataset;
+    }
+  }
+  delete fileLookup[old_file.id];
+
+  return _extends({}, state, {
+    loading: false,
+    data: _extends({}, state.data, {
+      folderLookup: folderLookup,
+      fileLookup: fileLookup,
+      datasetLookup: datasetLookup
+    })
+  });
+}
+
+exports.default = datasetReducer;
+
+/***/ }),
+
+/***/ "./app/client/dataset/upload.reducer.js":
+/*!**********************************************!*\
+  !*** ./app/client/dataset/upload.reducer.js ***!
+  \**********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _types = __webpack_require__(/*! ../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var uploadInitialState = {
+  loading: false,
+  error: null,
+  status: ''
+};
+
+var uploadReducer = function uploadReducer() {
+  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : uploadInitialState;
+  var action = arguments[1];
+
+  switch (action.type) {
+    case _types2.default.folder.upload_loading:
+      return {
+        error: null,
+        loading: true,
+        status: 'Loading...'
+      };
+    case _types2.default.folder.upload_error:
+      return {
+        error: null,
+        loading: false,
+        status: 'Error uploading :('
+      };
+    case _types2.default.folder.upload_progress:
+      return {
+        error: null,
+        loading: true,
+        status: 'Upload progress ' + action.percent + '%'
+      };
+    case _types2.default.folder.upload_waiting:
+      return {
+        error: null,
+        loading: true,
+        status: 'Waiting for server to finish processing...'
+      };
+    case _types2.default.folder.upload_complete:
+      return {
+        error: null,
+        loading: false,
+        status: 'Upload complete'
+      };
+    case _types2.default.file.create_loading:
+      return {
+        error: null,
+        loading: true,
+        status: 'Creating file...'
+      };
+    default:
+      return state;
+  }
+};
+
+exports.default = uploadReducer;
+
+/***/ }),
+
+/***/ "./app/client/dataset/upload.status.js":
+/*!*********************************************!*\
+  !*** ./app/client/dataset/upload.status.js ***!
+  \*********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _loading = __webpack_require__(/*! ../common/loading.component */ "./app/client/common/loading.component.js");
+
+var _loading2 = _interopRequireDefault(_loading);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function UploadStatus(props) {
+  return (0, _preact.h)(
+    'div',
+    { 'class': 'status' },
+    props.status
+  );
+}
+
+var mapStateToProps = function mapStateToProps(state) {
+  return state.upload;
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {};
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(UploadStatus);
+
+/***/ }),
+
+/***/ "./app/client/index.jsx":
+/*!******************************!*\
+  !*** ./app/client/index.jsx ***!
+  \******************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _reactRouterDom = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
+
+var _store = __webpack_require__(/*! ./store */ "./app/client/store.js");
+
+var _socket = __webpack_require__(/*! ./socket */ "./app/client/socket/index.js");
+
+var socket = _interopRequireWildcard(_socket);
+
+var _util = __webpack_require__(/*! ./util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _auth = __webpack_require__(/*! ./auth */ "./app/client/auth/index.js");
+
+var _auth2 = _interopRequireDefault(_auth);
+
+var _common = __webpack_require__(/*! ./common */ "./app/client/common/index.js");
+
+var _system = __webpack_require__(/*! ./system/system.component */ "./app/client/system/system.component.js");
+
+var _system2 = _interopRequireDefault(_system);
+
+var _dashboard = __webpack_require__(/*! ./dashboard/dashboard.component */ "./app/client/dashboard/dashboard.component.js");
+
+var _dashboard2 = _interopRequireDefault(_dashboard);
+
+var _browser = __webpack_require__(/*! ./browser/browser.component */ "./app/client/browser/browser.component.js");
+
+var _browser2 = _interopRequireDefault(_browser);
+
+var _modules = __webpack_require__(/*! ./modules */ "./app/client/modules/index.js");
+
+var _modules2 = _interopRequireDefault(_modules);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+var module_list = Object.keys(_modules2.default).map(function (name) {
+  var module = _modules2.default[name];
+  return (0, _preact.h)(_reactRouterDom.Route, { path: '/' + module.name, component: module.router });
+});
+
+var ModuleRouter = function ModuleRouter() {
+  return (0, _preact.h)(_reactRouterDom.Switch, null);
+};
+
+var app = (0, _preact.h)(
+  _reactRedux.Provider,
+  { store: _store.store },
+  (0, _preact.h)(
+    _auth2.default.Gate,
+    null,
+    (0, _preact.h)(
+      _reactRouterDom.BrowserRouter,
+      null,
+      (0, _preact.h)(
+        'div',
+        { className: 'everybody' },
+        (0, _preact.h)(_reactRouterDom.Route, { path: '/', children: function children(props) {
+            return (0, _preact.h)(
+              'div',
+              null,
+              console.log(props.location.pathname)
+            );
+          } }),
+        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/system', component: _system2.default }),
+        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/dashboard', component: _dashboard2.default }),
+        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/browse', component: _browser2.default }),
+        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/logout', component: _auth2.default.Logout }),
+        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/login', component: function component() {
+            (0, _preact.h)(_reactRouterDom.Redirect, { to: '/' });
+          } }),
+        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/signup', component: function component() {
+            (0, _preact.h)(_reactRouterDom.Redirect, { to: '/' });
+          } }),
+        module_list,
+        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/', component: _dashboard2.default }),
+        (0, _preact.h)(_reactRouterDom.Route, { path: '/', component: _common.Header })
+      )
+    ),
+    (0, _preact.h)(_common.AudioPlayer, null)
+  )
+);
+
+(0, _preact.render)(app, document.getElementById('container'));
+
+/***/ }),
+
+/***/ "./app/client/live/live.actions.js":
+/*!*****************************************!*\
+  !*** ./app/client/live/live.actions.js ***!
+  \*****************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.play = exports.pause = exports.seek = exports.load_epoch = exports.load_sequence = exports.list_sequences = exports.list_epochs = exports.list_checkpoints = exports.set_fullscreen = exports.set_param = exports.get_params = undefined;
+
+var _socket = __webpack_require__(/*! ../socket */ "./app/client/socket/index.js");
+
+var _socket2 = _interopRequireDefault(_socket);
+
+var _types = __webpack_require__(/*! ../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _player = __webpack_require__(/*! ./player */ "./app/client/live/player.js");
+
+var player = _interopRequireWildcard(_player);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var get_params = exports.get_params = function get_params() {
+  _socket2.default.live.get_params();
+  return { type: _types2.default.player.get_params };
+};
+
+var set_param = exports.set_param = function set_param(key, value) {
+  console.log('set param', key, value);
+  _socket2.default.live.set_param(key, value);
+  return { type: _types2.default.player.set_param, key: key, value: value };
+};
+
+var set_fullscreen = exports.set_fullscreen = function set_fullscreen(value) {
+  return { type: _types2.default.player.set_fullscreen, value: value };
+};
+
+var list_checkpoints = exports.list_checkpoints = function list_checkpoints(module) {
+  _socket2.default.live.list_checkpoints(module);
+  return { type: _types2.default.player.loading_checkpoints };
+};
+
+var list_epochs = exports.list_epochs = function list_epochs(module, checkpoint) {
+  _socket2.default.live.list_epochs(module, checkpoint);
+  return { type: _types2.default.player.loading_epochs };
+};
+
+var list_sequences = exports.list_sequences = function list_sequences(module) {
+  _socket2.default.live.list_sequences(module);
+  return { type: _types2.default.player.loading_sequences };
+};
+
+var load_sequence = exports.load_sequence = function load_sequence(sequence_name) {
+  _socket2.default.live.load_sequence(sequence_name);
+  return { type: _types2.default.player.loading_sequence, sequence_name: sequence_name };
+};
+
+var load_epoch = exports.load_epoch = function load_epoch(checkpoint_name, epoch) {
+  _socket2.default.live.load_epoch(checkpoint_name, epoch);
+  return { type: _types2.default.player.loading_checkpoint, checkpoint_name: checkpoint_name, epoch: epoch };
+};
+
+var seek = exports.seek = function seek(frame) {
+  _socket2.default.live.seek(frame);
+  return { type: _types2.default.player.seeking };
+};
+
+var pause = exports.pause = function pause(frame) {
+  _socket2.default.live.pause(pause);
+  player.toggleFPS(false);
+  return { type: _types2.default.player.pausing };
+};
+
+var play = exports.play = function play(frame) {
+  _socket2.default.live.play();
+  player.toggleFPS(true);
+  return { type: _types2.default.player.playing };
+};
+
+/***/ }),
+
+/***/ "./app/client/live/live.reducer.js":
+/*!*****************************************!*\
+  !*** ./app/client/live/live.reducer.js ***!
+  \*****************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _moment = __webpack_require__(/*! moment/min/moment.min */ "./node_modules/moment/min/moment.min.js");
+
+var _moment2 = _interopRequireDefault(_moment);
+
+var _fileSaver = __webpack_require__(/*! file-saver */ "./node_modules/file-saver/FileSaver.js");
+
+var _fileSaver2 = _interopRequireDefault(_fileSaver);
+
+var _types = __webpack_require__(/*! ../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+var liveInitialState = {
+  loading: false,
+  error: null,
+  opt: {
+    hue: 0, saturation: 0, luminosity: 0,
+    sequence_playing: true, sequence_step: 1,
+    recurse_roll: 0, rotate: 0, scale: 0, process_frac: 0.5,
+    view_mode: 'b'
+  },
+  all_checkpoints: [],
+  checkpoints: [],
+  epochs: ['latest'],
+  sequences: [],
+  fps: 0,
+  playing: false,
+  last_message: '',
+  fullscreen: false,
+  frame: { i: 0, sequence_i: 0, sequence_len: '1' }
+};
+
+var liveReducer = function liveReducer() {
+  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : liveInitialState;
+  var action = arguments[1];
+
+  var results = void 0;
+  switch (action.type) {
+    case _types2.default.socket.load_params:
+      if (!action.opt || !Object.keys(action.opt).length) {
+        return state;
+      }
+      return _extends({}, state, {
+        loading: false,
+        error: null,
+        opt: action.opt
+      });
+
+    case _types2.default.player.set_param:
+      return _extends({}, state, {
+        opt: _extends({}, state.opt, _defineProperty({}, action.key, action.value))
+      });
+
+    case _types2.default.player.set_fullscreen:
+      return _extends({}, state, {
+        fullscreen: action.value
+      });
+
+    case _types2.default.socket.list_checkpoints:
+      return _extends({}, state, {
+        checkpoints: action.checkpoints,
+        epochs: []
+      });
+
+    case _types2.default.socket.list_all_checkpoints:
+      return _extends({}, state, {
+        all_checkpoints: action.all_checkpoints,
+        epochs: []
+      });
+
+    case _types2.default.socket.list_epochs:
+      console.log(action);
+      if (action.epochs === "not found") return _extends({}, state, { epochs: [] });
+      return _extends({}, state, {
+        epochs: (action.epochs || []).map(function (a) {
+          return [a == 'latest' ? Infinity : a, a];
+        }).sort(function (a, b) {
+          return a[0] - b[0];
+        }).map(function (a) {
+          return a[1];
+        })
+      });
+
+    case _types2.default.socket.list_sequences:
+      return _extends({}, state, {
+        sequences: action.sequences
+      });
+
+    case _types2.default.player.loading_sequence:
+      return _extends({}, state, {
+        opt: _extends({}, state.opt, {
+          sequence_name: action.sequence_name
+        })
+      });
+
+    case _types2.default.player.loading_checkpoint:
+      return _extends({}, state, {
+        opt: _extends({}, state.opt, {
+          checkpoint_name: action.checkpoint_name,
+          epoch: action.epoch
+        })
+      });
+
+    case _types2.default.player.set_fps:
+      return _extends({}, state, {
+        fps: action.fps
+      });
+
+    case _types2.default.system.stdout:
+      if (action.data.processor === 'gpu') {
+        return _extends({}, state, {
+          last_message: action.data.data
+        });
+      }
+      return state;
+
+    case _types2.default.player.current_frame:
+      return action.meta ? _extends({}, state, {
+        frame: action.meta
+      }) : state;
+
+    case _types2.default.player.pausing:
+      return _extends({}, state, {
+        playing: false
+      });
+
+    case _types2.default.player.playing:
+      return _extends({}, state, {
+        playing: true
+      });
+
+    case _types2.default.player.start_recording:
+      return _extends({}, state, {
+        opt: _extends({}, state.opt, {
+          recording: true
+        })
+      });
+    case _types2.default.player.add_record_frame:
+      return _extends({}, state, {
+        opt: _extends({}, state.opt, {
+          recordFrames: (state.opt.recordFrames || 0) + 1
+        })
+      });
+    case _types2.default.player.save_frame:
+      _fileSaver2.default.saveAs(action.blob, state.opt.checkpoint_name + "_" + state.opt.sequence + "_" + (0, _moment2.default)().format("YYYYMMDD_HHmm") + ".png");
+      return state;
+
+    case _types2.default.player.saving_video:
+      return _extends({}, state, {
+        opt: _extends({}, state.opt, {
+          savingVideo: true
+        })
+      });
+    case _types2.default.player.save_video:
+      _fileSaver2.default.saveAs(action.blob, state.opt.checkpoint_name + "_" + state.opt.sequence + "_" + (0, _moment2.default)().format("YYYYMMDD_HHmm") + ".webm");
+      return _extends({}, state, {
+        opt: _extends({}, state.opt, {
+          recording: false,
+          savingVideo: false,
+          recordFrames: 0
+        })
+      });
+
+    default:
+      return state;
+  }
+};
+
+exports.default = liveReducer;
+
+/***/ }),
+
+/***/ "./app/client/live/player.js":
+/*!***********************************!*\
+  !*** ./app/client/live/player.js ***!
+  \***********************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.startSynthesizing = startSynthesizing;
+exports.stopSynthesizing = stopSynthesizing;
+exports.startRecording = startRecording;
+exports.stopRecording = stopRecording;
+exports.saveFrame = saveFrame;
+exports.onFrame = onFrame;
+exports.toggleFPS = toggleFPS;
+exports.startWatchingFPS = startWatchingFPS;
+exports.stopWatchingFPS = stopWatchingFPS;
+
+var _store = __webpack_require__(/*! ../store */ "./app/client/store.js");
+
+var _whammy = __webpack_require__(/*! ./whammy */ "./app/client/live/whammy.js");
+
+var _whammy2 = _interopRequireDefault(_whammy);
+
+var _types = __webpack_require__(/*! ../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _pix2wav = __webpack_require__(/*! ../audio/pix2wav */ "./app/client/audio/pix2wav.js");
+
+var pix2wav = _interopRequireWildcard(_pix2wav);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var fps = 0,
+    last_frame = void 0;
+var recording = false,
+    saving = false,
+    synthesizing = false;
+var videoWriter = void 0;
+
+function startSynthesizing() {
+  synthesizing = true;
+}
+function stopSynthesizing() {
+  synthesizing = false;
+}
+
+function startRecording() {
+  videoWriter = new _whammy2.default.Video(25, 0.95);
+  recording = true;
+  _store.store.dispatch({
+    type: _types2.default.player.start_recording
+  });
+}
+
+function stopRecording() {
+  if (!recording) return;
+  recording = false;
+  _store.store.dispatch({
+    type: _types2.default.player.saving_video
+  });
+  videoWriter.compile(false, function (blob) {
+    // console.log(blob)
+    _store.store.dispatch({
+      type: _types2.default.player.save_video,
+      blob: blob
+    });
+  });
+}
+
+function saveFrame() {
+  saving = true;
+}
+
+function onFrame(data) {
+  var blob = new Blob([data.frame], { type: 'image/jpg' });
+  var url = URL.createObjectURL(blob);
+  var img = new Image();
+  var canvas = document.querySelector('.player canvas');
+  if (!canvas) return console.error('no canvas for frame');
+  img.onload = function () {
+    img.onload = null;
+    last_frame = data.meta;
+    URL.revokeObjectURL(url);
+    var ctx = canvas.getContext('2d-lodpi');
+    ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
+    if (synthesizing) {
+      var imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
+      pix2wav.play({ imageData: imageData });
+    }
+    if (recording) {
+      console.log('record frame');
+      videoWriter.add(canvas);
+      _store.store.dispatch({
+        type: _types2.default.player.add_record_frame
+      });
+    }
+    if (saving) {
+      saving = false;
+      canvas.toBlob(function (blob) {
+        _store.store.dispatch({
+          type: _types2.default.player.save_frame,
+          blob: blob
+        });
+      });
+    }
+    fps += 1;
+  };
+  img.src = url;
+}
+
+var previousValue = void 0,
+    currentValue = void 0;
+function toggleFPS(state) {
+  currentValue = typeof state !== 'undefined' ? state : _store.store.getState().live.playing;
+  if (previousValue !== currentValue) {
+    if (currentValue) {
+      startWatchingFPS();
+    } else {
+      stopWatchingFPS();
+    }
+  }
+  previousValue = currentValue;
+}
+
+var fpsInterval = void 0;
+
+function startWatchingFPS() {
+  clearInterval(fpsInterval);
+  fpsInterval = setInterval(function () {
+    _store.store.dispatch({
+      type: _types2.default.player.set_fps,
+      fps: fps
+    });
+    _store.store.dispatch({
+      type: _types2.default.player.current_frame,
+      meta: last_frame
+    });
+    fps = 0;
+  }, 1000);
+}
+function stopWatchingFPS() {
+  clearInterval(fpsInterval);
+}
+
+/***/ }),
+
+/***/ "./app/client/live/whammy.js":
+/*!***********************************!*\
+  !*** ./app/client/live/whammy.js ***!
+  \***********************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+module.exports = function () {
+  // in this case, frames has a very specific meaning, which will be
+  // detailed once i finish writing the code
+
+  function toWebM(frames, outputAsArray) {
+    var info = checkFrames(frames);
+
+    //max duration by cluster in milliseconds
+    var CLUSTER_MAX_DURATION = 30000;
+
+    var EBML = [{
+      "id": 0x1a45dfa3, // EBML
+      "data": [{
+        "data": 1,
+        "id": 0x4286 // EBMLVersion
+      }, {
+        "data": 1,
+        "id": 0x42f7 // EBMLReadVersion
+      }, {
+        "data": 4,
+        "id": 0x42f2 // EBMLMaxIDLength
+      }, {
+        "data": 8,
+        "id": 0x42f3 // EBMLMaxSizeLength
+      }, {
+        "data": "webm",
+        "id": 0x4282 // DocType
+      }, {
+        "data": 2,
+        "id": 0x4287 // DocTypeVersion
+      }, {
+        "data": 2,
+        "id": 0x4285 // DocTypeReadVersion
+      }]
+    }, {
+      "id": 0x18538067, // Segment
+      "data": [{
+        "id": 0x1549a966, // Info
+        "data": [{
+          "data": 1e6, //do things in millisecs (num of nanosecs for duration scale)
+          "id": 0x2ad7b1 // TimecodeScale
+        }, {
+          "data": "whammy",
+          "id": 0x4d80 // MuxingApp
+        }, {
+          "data": "whammy",
+          "id": 0x5741 // WritingApp
+        }, {
+          "data": doubleToString(info.duration),
+          "id": 0x4489 // Duration
+        }]
+      }, {
+        "id": 0x1654ae6b, // Tracks
+        "data": [{
+          "id": 0xae, // TrackEntry
+          "data": [{
+            "data": 1,
+            "id": 0xd7 // TrackNumber
+          }, {
+            "data": 1,
+            "id": 0x73c5 // TrackUID
+          }, {
+            "data": 0,
+            "id": 0x9c // FlagLacing
+          }, {
+            "data": "und",
+            "id": 0x22b59c // Language
+          }, {
+            "data": "V_VP8",
+            "id": 0x86 // CodecID
+          }, {
+            "data": "VP8",
+            "id": 0x258688 // CodecName
+          }, {
+            "data": 1,
+            "id": 0x83 // TrackType
+          }, {
+            "id": 0xe0, // Video
+            "data": [{
+              "data": info.width,
+              "id": 0xb0 // PixelWidth
+            }, {
+              "data": info.height,
+              "id": 0xba // PixelHeight
+            }]
+          }]
+        }]
+      }, {
+        "id": 0x1c53bb6b, // Cues
+        "data": [
+          //cue insertion point
+        ]
+
+        //cluster insertion point
+      }]
+    }];
+
+    var segment = EBML[1];
+    var cues = segment.data[2];
+
+    //Generate clusters (max duration)
+    var frameNumber = 0;
+    var clusterTimecode = 0;
+    while (frameNumber < frames.length) {
+
+      var cuePoint = {
+        "id": 0xbb, // CuePoint
+        "data": [{
+          "data": Math.round(clusterTimecode),
+          "id": 0xb3 // CueTime
+        }, {
+          "id": 0xb7, // CueTrackPositions
+          "data": [{
+            "data": 1,
+            "id": 0xf7 // CueTrack
+          }, {
+            "data": 0, // to be filled in when we know it
+            "size": 8,
+            "id": 0xf1 // CueClusterPosition
+          }]
+        }]
+      };
+
+      cues.data.push(cuePoint);
+
+      var clusterFrames = [];
+      var clusterDuration = 0;
+      do {
+        clusterFrames.push(frames[frameNumber]);
+        clusterDuration += frames[frameNumber].duration;
+        frameNumber++;
+      } while (frameNumber < frames.length && clusterDuration < CLUSTER_MAX_DURATION);
+
+      var clusterCounter = 0;
+      var cluster = {
+        "id": 0x1f43b675, // Cluster
+        "data": [{
+          "data": Math.round(clusterTimecode),
+          "id": 0xe7 // Timecode
+        }].concat(clusterFrames.map(function (webp) {
+          var block = makeSimpleBlock({
+            discardable: 0,
+            frame: webp.data.slice(4),
+            invisible: 0,
+            keyframe: 1,
+            lacing: 0,
+            trackNum: 1,
+            timecode: Math.round(clusterCounter)
+          });
+          clusterCounter += webp.duration;
+          return {
+            data: block,
+            id: 0xa3
+          };
+        }))
+
+        //Add cluster to segment
+      };segment.data.push(cluster);
+      clusterTimecode += clusterDuration;
+    }
+
+    //First pass to compute cluster positions
+    var position = 0;
+    for (var i = 0; i < segment.data.length; i++) {
+      if (i >= 3) {
+        cues.data[i - 3].data[1].data[1].data = position;
+      }
+      var data = generateEBML([segment.data[i]], outputAsArray);
+      position += data.size || data.byteLength || data.length;
+      if (i != 2) {
+        // not cues
+        //Save results to avoid having to encode everything twice
+        segment.data[i] = data;
+      }
+    }
+
+    return generateEBML(EBML, outputAsArray);
+  }
+
+  // sums the lengths of all the frames and gets the duration, woo
+
+  function checkFrames(frames) {
+    var width = frames[0].width,
+        height = frames[0].height,
+        duration = frames[0].duration;
+    for (var i = 1; i < frames.length; i++) {
+      if (frames[i].width != width) throw "Frame " + (i + 1) + " has a different width";
+      if (frames[i].height != height) throw "Frame " + (i + 1) + " has a different height";
+      if (frames[i].duration < 0 || frames[i].duration > 0x7fff) throw "Frame " + (i + 1) + " has a weird duration (must be between 0 and 32767)";
+      duration += frames[i].duration;
+    }
+    return {
+      duration: duration,
+      width: width,
+      height: height
+    };
+  }
+
+  function numToBuffer(num) {
+    var parts = [];
+    while (num > 0) {
+      parts.push(num & 0xff);
+      num = num >> 8;
+    }
+    return new Uint8Array(parts.reverse());
+  }
+
+  function numToFixedBuffer(num, size) {
+    var parts = new Uint8Array(size);
+    for (var i = size - 1; i >= 0; i--) {
+      parts[i] = num & 0xff;
+      num = num >> 8;
+    }
+    return parts;
+  }
+
+  function strToBuffer(str) {
+    // return new Blob([str]);
+
+    var arr = new Uint8Array(str.length);
+    for (var i = 0; i < str.length; i++) {
+      arr[i] = str.charCodeAt(i);
+    }
+    return arr;
+    // this is slower
+    // return new Uint8Array(str.split('').map(function(e){
+    //  return e.charCodeAt(0)
+    // }))
+  }
+
+  //sorry this is ugly, and sort of hard to understand exactly why this was done
+  // at all really, but the reason is that there's some code below that i dont really
+  // feel like understanding, and this is easier than using my brain.
+
+  function bitsToBuffer(bits) {
+    var data = [];
+    var pad = bits.length % 8 ? new Array(1 + 8 - bits.length % 8).join('0') : '';
+    bits = pad + bits;
+    for (var i = 0; i < bits.length; i += 8) {
+      data.push(parseInt(bits.substr(i, 8), 2));
+    }
+    return new Uint8Array(data);
+  }
+
+  function generateEBML(json, outputAsArray) {
+    var ebml = [];
+    for (var i = 0; i < json.length; i++) {
+      if (!('id' in json[i])) {
+        //already encoded blob or byteArray
+        ebml.push(json[i]);
+        continue;
+      }
+
+      var data = json[i].data;
+      if ((typeof data === "undefined" ? "undefined" : _typeof(data)) == 'object') data = generateEBML(data, outputAsArray);
+      if (typeof data == 'number') data = 'size' in json[i] ? numToFixedBuffer(data, json[i].size) : bitsToBuffer(data.toString(2));
+      if (typeof data == 'string') data = strToBuffer(data);
+
+      if (data.length) {
+        var z = z;
+      }
+
+      var len = data.size || data.byteLength || data.length;
+      var zeroes = Math.ceil(Math.ceil(Math.log(len) / Math.log(2)) / 8);
+      var size_str = len.toString(2);
+      var padded = new Array(zeroes * 7 + 7 + 1 - size_str.length).join('0') + size_str;
+      var size = new Array(zeroes).join('0') + '1' + padded;
+
+      //i actually dont quite understand what went on up there, so I'm not really
+      //going to fix this, i'm probably just going to write some hacky thing which
+      //converts that string into a buffer-esque thing
+
+      ebml.push(numToBuffer(json[i].id));
+      ebml.push(bitsToBuffer(size));
+      ebml.push(data);
+    }
+
+    //output as blob or byteArray
+    if (outputAsArray) {
+      //convert ebml to an array
+      var buffer = toFlatArray(ebml);
+      return new Uint8Array(buffer);
+    } else {
+      return new Blob(ebml, { type: "video/webm" });
+    }
+  }
+
+  function toFlatArray(arr, outBuffer) {
+    if (outBuffer == null) {
+      outBuffer = [];
+    }
+    for (var i = 0; i < arr.length; i++) {
+      if (_typeof(arr[i]) == 'object') {
+        //an array
+        toFlatArray(arr[i], outBuffer);
+      } else {
+        //a simple element
+        outBuffer.push(arr[i]);
+      }
+    }
+    return outBuffer;
+  }
+
+  //OKAY, so the following two functions are the string-based old stuff, the reason they're
+  //still sort of in here, is that they're actually faster than the new blob stuff because
+  //getAsFile isn't widely implemented, or at least, it doesn't work in chrome, which is the
+  // only browser which supports get as webp
+
+  //Converting between a string of 0010101001's and binary back and forth is probably inefficient
+  //TODO: get rid of this function
+  function toBinStr_old(bits) {
+    var data = '';
+    var pad = bits.length % 8 ? new Array(1 + 8 - bits.length % 8).join('0') : '';
+    bits = pad + bits;
+    for (var i = 0; i < bits.length; i += 8) {
+      data += String.fromCharCode(parseInt(bits.substr(i, 8), 2));
+    }
+    return data;
+  }
+
+  function generateEBML_old(json) {
+    var ebml = '';
+    for (var i = 0; i < json.length; i++) {
+      var data = json[i].data;
+      if ((typeof data === "undefined" ? "undefined" : _typeof(data)) == 'object') data = generateEBML_old(data);
+      if (typeof data == 'number') data = toBinStr_old(data.toString(2));
+
+      var len = data.length;
+      var zeroes = Math.ceil(Math.ceil(Math.log(len) / Math.log(2)) / 8);
+      var size_str = len.toString(2);
+      var padded = new Array(zeroes * 7 + 7 + 1 - size_str.length).join('0') + size_str;
+      var size = new Array(zeroes).join('0') + '1' + padded;
+
+      ebml += toBinStr_old(json[i].id.toString(2)) + toBinStr_old(size) + data;
+    }
+    return ebml;
+  }
+
+  //woot, a function that's actually written for this project!
+  //this parses some json markup and makes it into that binary magic
+  //which can then get shoved into the matroska comtainer (peaceably)
+
+  function makeSimpleBlock(data) {
+    var flags = 0;
+    if (data.keyframe) flags |= 128;
+    if (data.invisible) flags |= 8;
+    if (data.lacing) flags |= data.lacing << 1;
+    if (data.discardable) flags |= 1;
+    if (data.trackNum > 127) {
+      throw "TrackNumber > 127 not supported";
+    }
+    var out = [data.trackNum | 0x80, data.timecode >> 8, data.timecode & 0xff, flags].map(function (e) {
+      return String.fromCharCode(e);
+    }).join('') + data.frame;
+
+    return out;
+  }
+
+  // here's something else taken verbatim from weppy, awesome rite?
+
+  function parseWebP(riff) {
+    var VP8 = riff.RIFF[0].WEBP[0];
+
+    var frame_start = VP8.indexOf('\x9d\x01\x2a'); //A VP8 keyframe starts with the 0x9d012a header
+    for (var i = 0, c = []; i < 4; i++) {
+      c[i] = VP8.charCodeAt(frame_start + 3 + i);
+    }var width, horizontal_scale, height, vertical_scale, tmp;
+
+    //the code below is literally copied verbatim from the bitstream spec
+    tmp = c[1] << 8 | c[0];
+    width = tmp & 0x3FFF;
+    horizontal_scale = tmp >> 14;
+    tmp = c[3] << 8 | c[2];
+    height = tmp & 0x3FFF;
+    vertical_scale = tmp >> 14;
+    return {
+      width: width,
+      height: height,
+      data: VP8,
+      riff: riff
+    };
+  }
+
+  // i think i'm going off on a riff by pretending this is some known
+  // idiom which i'm making a casual and brilliant pun about, but since
+  // i can't find anything on google which conforms to this idiomatic
+  // usage, I'm assuming this is just a consequence of some psychotic
+  // break which makes me make up puns. well, enough riff-raff (aha a
+  // rescue of sorts), this function was ripped wholesale from weppy
+
+  function parseRIFF(string) {
+    var offset = 0;
+    var chunks = {};
+
+    while (offset < string.length) {
+      var id = string.substr(offset, 4);
+      chunks[id] = chunks[id] || [];
+      if (id == 'RIFF' || id == 'LIST') {
+        var len = parseInt(string.substr(offset + 4, 4).split('').map(function (i) {
+          var unpadded = i.charCodeAt(0).toString(2);
+          return new Array(8 - unpadded.length + 1).join('0') + unpadded;
+        }).join(''), 2);
+        var data = string.substr(offset + 4 + 4, len);
+        offset += 4 + 4 + len;
+        chunks[id].push(parseRIFF(data));
+      } else if (id == 'WEBP') {
+        // Use (offset + 8) to skip past "VP8 "/"VP8L"/"VP8X" field after "WEBP"
+        chunks[id].push(string.substr(offset + 8));
+        offset = string.length;
+      } else {
+        // Unknown chunk type; push entire payload
+        chunks[id].push(string.substr(offset + 4));
+        offset = string.length;
+      }
+    }
+    return chunks;
+  }
+
+  // here's a little utility function that acts as a utility for other functions
+  // basically, the only purpose is for encoding "Duration", which is encoded as
+  // a double (considerably more difficult to encode than an integer)
+  function doubleToString(num) {
+    return [].slice.call(new Uint8Array(new Float64Array([num]) //create a float64 array
+    .buffer) //extract the array buffer
+    , 0) // convert the Uint8Array into a regular array
+    .map(function (e) {
+      //since it's a regular array, we can now use map
+      return String.fromCharCode(e); // encode all the bytes individually
+    }).reverse() //correct the byte endianness (assume it's little endian for now)
+    .join(''); // join the bytes in holy matrimony as a string
+  }
+
+  function WhammyVideo(speed, quality) {
+    // a more abstract-ish API
+    this.frames = [];
+    this.duration = 1000 / speed;
+    this.quality = quality || 0.8;
+  }
+
+  WhammyVideo.prototype.add = function (frame, duration) {
+    if (typeof duration != 'undefined' && this.duration) throw "you can't pass a duration if the fps is set";
+    if (typeof duration == 'undefined' && !this.duration) throw "if you don't have the fps set, you need to have durations here.";
+    if (frame.canvas) {
+      //CanvasRenderingContext2D
+      frame = frame.canvas;
+    }
+    if (frame.toDataURL) {
+      // frame = frame.toDataURL('image/webp', this.quality);
+      // quickly store image data so we don't block cpu. encode in compile method.
+      frame = frame.getContext('2d-lodpi').getImageData(0, 0, frame.width, frame.height);
+    } else if (typeof frame != "string") {
+      throw "frame must be a a HTMLCanvasElement, a CanvasRenderingContext2D or a DataURI formatted string";
+    }
+    if (typeof frame === "string" && !/^data:image\/webp;base64,/ig.test(frame)) {
+      throw "Input must be formatted properly as a base64 encoded DataURI of type image/webp";
+    }
+    this.frames.push({
+      image: frame,
+      duration: duration || this.duration
+    });
+  };
+
+  // deferred webp encoding. Draws image data to canvas, then encodes as dataUrl
+  WhammyVideo.prototype.encodeFrames = function (callback) {
+
+    if (this.frames[0].image instanceof ImageData) {
+
+      var frames = this.frames;
+      var tmpCanvas = document.createElement('canvas');
+      var tmpContext = tmpCanvas.getContext('2d-lodpi');
+      tmpCanvas.width = this.frames[0].image.width;
+      tmpCanvas.height = this.frames[0].image.height;
+
+      var encodeFrame = function (index) {
+        console.log('encodeFrame', index);
+        var frame = frames[index];
+        tmpContext.putImageData(frame.image, 0, 0);
+        frame.image = tmpCanvas.toDataURL('image/webp', this.quality);
+        if (index < frames.length - 1) {
+          setTimeout(function () {
+            encodeFrame(index + 1);
+          }, 1);
+        } else {
+          callback();
+        }
+      }.bind(this);
+
+      encodeFrame(0);
+    } else {
+      callback();
+    }
+  };
+
+  WhammyVideo.prototype.compile = function (outputAsArray, callback) {
+
+    this.encodeFrames(function () {
+      var width = 0;
+      var height = 0;
+      var webm = new toWebM(this.frames.map(function (frame) {
+        var webp = parseWebP(parseRIFF(atob(frame.image.slice(23))));
+        webp.duration = frame.duration;
+        if (!webp || !webp.width || !webp.height) return null;
+        if (!width) width = webp.width;else if (width !== webp.width) return null;
+        if (!height) height = webp.height;else if (height !== webp.height) return null;
+        return webp;
+      }).filter(function (frame) {
+        return !!frame;
+      }), outputAsArray);
+      callback(webm);
+    }.bind(this));
+  };
+
+  return {
+    Video: WhammyVideo,
+    fromImageArray: function fromImageArray(images, fps, outputAsArray) {
+      return toWebM(images.map(function (image) {
+        var webp = parseWebP(parseRIFF(atob(image.slice(23))));
+        webp.duration = 1000 / fps;
+        return webp;
+      }), outputAsArray);
+    },
+    toWebM: toWebM
+    // expose methods of madness
+  };
+}();
+
+/***/ }),
+
+/***/ "./app/client/modules/index.js":
+/*!*************************************!*\
+  !*** ./app/client/modules/index.js ***!
+  \*************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _morph = __webpack_require__(/*! ./morph */ "./app/client/modules/morph/index.js");
+
+var _morph2 = _interopRequireDefault(_morph);
+
+var _pix2pix = __webpack_require__(/*! ./pix2pix */ "./app/client/modules/pix2pix/index.js");
+
+var _pix2pix2 = _interopRequireDefault(_pix2pix);
+
+var _pix2pixhd = __webpack_require__(/*! ./pix2pixhd */ "./app/client/modules/pix2pixhd/index.js");
+
+var _pix2pixhd2 = _interopRequireDefault(_pix2pixhd);
+
+var _pix2wav = __webpack_require__(/*! ./pix2wav */ "./app/client/modules/pix2wav/index.js");
+
+var _pix2wav2 = _interopRequireDefault(_pix2wav);
+
+var _samplernn = __webpack_require__(/*! ./samplernn */ "./app/client/modules/samplernn/index.js");
+
+var _samplernn2 = _interopRequireDefault(_samplernn);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = {
+  morph: _morph2.default, pix2pix: _pix2pix2.default, pix2pixhd: _pix2pixhd2.default, pix2wav: _pix2wav2.default, samplernn: _samplernn2.default
+};
+
+/***/ }),
+
+/***/ "./app/client/modules/module.reducer.js":
+/*!**********************************************!*\
+  !*** ./app/client/modules/module.reducer.js ***!
+  \**********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.moduleReducer = undefined;
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _morph = __webpack_require__(/*! ./morph/morph.reducer */ "./app/client/modules/morph/morph.reducer.js");
+
+var _morph2 = _interopRequireDefault(_morph);
+
+var _pix2pix = __webpack_require__(/*! ./pix2pix/pix2pix.reducer */ "./app/client/modules/pix2pix/pix2pix.reducer.js");
+
+var _pix2pix2 = _interopRequireDefault(_pix2pix);
+
+var _pix2pixhd = __webpack_require__(/*! ./pix2pixhd/pix2pixhd.reducer */ "./app/client/modules/pix2pixhd/pix2pixhd.reducer.js");
+
+var _pix2pixhd2 = _interopRequireDefault(_pix2pixhd);
+
+var _pix2wav = __webpack_require__(/*! ./pix2wav/pix2wav.reducer */ "./app/client/modules/pix2wav/pix2wav.reducer.js");
+
+var _pix2wav2 = _interopRequireDefault(_pix2wav);
+
+var _samplernn = __webpack_require__(/*! ./samplernn/samplernn.reducer */ "./app/client/modules/samplernn/samplernn.reducer.js");
+
+var _samplernn2 = _interopRequireDefault(_samplernn);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var moduleReducer = exports.moduleReducer = (0, _redux.combineReducers)({
+  morph: _morph2.default,
+  pix2pix: _pix2pix2.default,
+  pix2pixhd: _pix2pixhd2.default,
+  pix2wav: _pix2wav2.default,
+  samplernn: _samplernn2.default
+});
+
+/***/ }),
+
+/***/ "./app/client/modules/morph/index.js":
+/*!*******************************************!*\
+  !*** ./app/client/modules/morph/index.js ***!
+  \*******************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _reactRouterDom = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
+
+var _actions = __webpack_require__(/*! ../../actions */ "./app/client/actions.js");
+
+var _actions2 = _interopRequireDefault(_actions);
+
+var _util = __webpack_require__(/*! ../../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _morph = __webpack_require__(/*! ./views/morph.app */ "./app/client/modules/morph/views/morph.app.js");
+
+var _morph2 = _interopRequireDefault(_morph);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var router = function () {
+  function router() {
+    _classCallCheck(this, router);
+  }
+
+  _createClass(router, [{
+    key: 'componentWillMount',
+    value: function componentWillMount() {
+      _actions2.default.system.changeTool('morph');
+      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #def, #dfe)';
+    }
+  }, {
+    key: 'componentWillReceiveProps',
+    value: function componentWillReceiveProps() {
+      _actions2.default.system.changeTool('morph');
+      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #def, #dfe)';
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      return (0, _preact.h)(
+        'section',
+        null,
+        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/morph/app/', component: _morph2.default })
+      );
+    }
+  }]);
+
+  return router;
+}();
+
+function links() {
+  return [{ url: '/morph/app/', name: 'morph' }];
+}
+
+exports.default = {
+  name: 'morph',
+  router: router, links: links
+};
+
+/***/ }),
+
+/***/ "./app/client/modules/morph/morph.actions.js":
+/*!***************************************************!*\
+  !*** ./app/client/modules/morph/morph.actions.js ***!
+  \***************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.load_data = undefined;
+
+var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
+
+var _v = __webpack_require__(/*! uuid/v1 */ "./node_modules/uuid/v1.js");
+
+var _v2 = _interopRequireDefault(_v);
+
+var _socket = __webpack_require__(/*! ../../socket */ "./app/client/socket/index.js");
+
+var _socket2 = _interopRequireDefault(_socket);
+
+var _types = __webpack_require__(/*! ../../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _dataset = __webpack_require__(/*! ../../dataset/dataset.loader */ "./app/client/dataset/dataset.loader.js");
+
+var datasetLoader = _interopRequireWildcard(_dataset);
+
+var _actions = __webpack_require__(/*! ../../actions */ "./app/client/actions.js");
+
+var _actions2 = _interopRequireDefault(_actions);
+
+var _util = __webpack_require__(/*! ../../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _morph = __webpack_require__(/*! ./morph.module */ "./app/client/modules/morph/morph.module.js");
+
+var _morph2 = _interopRequireDefault(_morph);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var load_data = exports.load_data = function load_data(id) {
+  return function (dispatch) {
+    var module = _morph2.default.name;
+    _util2.default.allProgress([datasetLoader.load(module), _actions2.default.socket.list_sequences({ module: 'pix2pixhd', dir: 'sequences' }), _actions2.default.socket.list_directory({ module: module, dir: 'renders' })], function (percent, i, n) {
+      console.log('morph load progress', i, n);
+      dispatch({
+        type: _types2.default.app.load_progress,
+        progress: { i: i, n: n },
+        data: { module: 'morph' }
+      });
+    }).then(function (res) {
+      var _res = _slicedToArray(res, 3),
+          datasetApiReport = _res[0],
+          sequences = _res[1],
+          renders = _res[2];
+
+      var folderLookup = datasetApiReport.folderLookup,
+          fileLookup = datasetApiReport.fileLookup,
+          datasetLookup = datasetApiReport.datasetLookup,
+          folders = datasetApiReport.folders,
+          files = datasetApiReport.files,
+          unsortedFolder = datasetApiReport.unsortedFolder,
+          resultsFolder = datasetApiReport.resultsFolder;
+
+
+      dispatch({
+        type: _types2.default.morph.load,
+        data: datasetApiReport,
+        app: {
+          resultsFolder: resultsFolder,
+          files: files,
+          sequences: sequences,
+          renders: renders
+        }
+      });
+    });
+  };
+};
+
+/***/ }),
+
+/***/ "./app/client/modules/morph/morph.module.js":
+/*!**************************************************!*\
+  !*** ./app/client/modules/morph/morph.module.js ***!
+  \**************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+var morphModule = {
+  name: 'morph',
+  displayName: 'Morph',
+  datatype: 'video'
+};
+
+exports.default = morphModule;
+
+/***/ }),
+
+/***/ "./app/client/modules/morph/morph.reducer.js":
+/*!***************************************************!*\
+  !*** ./app/client/modules/morph/morph.reducer.js ***!
+  \***************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _types = __webpack_require__(/*! ../../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _dataset = __webpack_require__(/*! ../../dataset/dataset.reducer */ "./app/client/dataset/dataset.reducer.js");
+
+var _dataset2 = _interopRequireDefault(_dataset);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var morphInitialState = {
+  loading: true,
+  progress: { i: 0, n: 0 },
+  error: null,
+  folder_id: 0,
+  data: null,
+  app: null
+};
+
+var morphReducer = function morphReducer() {
+  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : morphInitialState;
+  var action = arguments[1];
+
+  if (action.data && action.data.module === 'morph') {
+    state = (0, _dataset2.default)(state, action);
+  }
+
+  switch (action.type) {
+    case _types2.default.morph.load:
+      console.log('morph load', action.app);
+      return _extends({}, state, {
+        app: action.app,
+        loading: false,
+        data: action.data
+      });
+    case _types2.default.file.create:
+      console.log(action);
+      if (action.data.module !== 'morph') return state;
+      return _extends({}, state, {
+        app: state.app && _extends({}, state.app, {
+          files: [action.data].concat(state.app.files)
+        })
+      });
+    default:
+      return state;
+  }
+};
+
+exports.default = morphReducer;
+
+/***/ }),
+
+/***/ "./app/client/modules/morph/morph.tasks.js":
+/*!*************************************************!*\
+  !*** ./app/client/modules/morph/morph.tasks.js ***!
+  \*************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.morph_task = undefined;
+
+var _v = __webpack_require__(/*! uuid/v1 */ "./node_modules/uuid/v1.js");
+
+var _v2 = _interopRequireDefault(_v);
+
+var _socket = __webpack_require__(/*! ../../socket */ "./app/client/socket/index.js");
+
+var _socket2 = _interopRequireDefault(_socket);
+
+var _types = __webpack_require__(/*! ../../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _actions = __webpack_require__(/*! ../../actions */ "./app/client/actions.js");
+
+var _actions2 = _interopRequireDefault(_actions);
+
+var _morph = __webpack_require__(/*! ./morph.module */ "./app/client/modules/morph/morph.module.js");
+
+var _morph2 = _interopRequireDefault(_morph);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var morph_task = exports.morph_task = function morph_task(state, folder) {
+  return function (dispatch) {
+    if (state.a === 'PLACEHOLDER' || state.b === 'PLACEHOLDER') return;
+    var task = {
+      module: _morph2.default.name,
+      activity: 'morph',
+      dataset: state.a,
+      folder_id: folder.id,
+      opt: state
+    };
+    return _actions2.default.queue.add_task(task);
+  };
+};
+
+/***/ }),
+
+/***/ "./app/client/modules/morph/views/morph.app.js":
+/*!*****************************************************!*\
+  !*** ./app/client/modules/morph/views/morph.app.js ***!
+  \*****************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRouterDom = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _util = __webpack_require__(/*! ../../../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _actions = __webpack_require__(/*! ../../../actions */ "./app/client/actions.js");
+
+var _actions2 = _interopRequireDefault(_actions);
+
+var _morph = __webpack_require__(/*! ../morph.actions */ "./app/client/modules/morph/morph.actions.js");
+
+var morphActions = _interopRequireWildcard(_morph);
+
+var _morph2 = __webpack_require__(/*! ../morph.tasks */ "./app/client/modules/morph/morph.tasks.js");
+
+var morphTasks = _interopRequireWildcard(_morph2);
+
+var _loading = __webpack_require__(/*! ../../../common/loading.component */ "./app/client/common/loading.component.js");
+
+var _loading2 = _interopRequireDefault(_loading);
+
+var _common = __webpack_require__(/*! ../../../common */ "./app/client/common/index.js");
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var yes_count = 0;
+
+var MorphResults = function (_Component) {
+  _inherits(MorphResults, _Component);
+
+  function MorphResults(props) {
+    _classCallCheck(this, MorphResults);
+
+    var _this = _possibleConstructorReturn(this, (MorphResults.__proto__ || Object.getPrototypeOf(MorphResults)).call(this));
+
+    _this.state = {
+      dataset_module: 'pix2pixhd',
+      a: "PLACEHOLDER",
+      b: "PLACEHOLDER",
+      a_offset: 0,
+      a_duration: 1,
+      a_pos: 0,
+      b_offset: 0,
+      b_duration: 1,
+      b_pos: 0,
+      steps: 16,
+      dilate: 2,
+      frames: 32,
+      padding: 3,
+      smooth: true,
+      mode: 'mix'
+    };
+    if (!props.morph.data) props.actions.load_data();
+    return _this;
+  }
+
+  _createClass(MorphResults, [{
+    key: 'componentDidMount',
+    value: function componentDidMount() {
+      yes_count = 0;
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      var _this2 = this;
+
+      if (!this.props.morph.app) return (0, _preact.h)(_loading2.default, { progress: this.props.morph.progress });
+
+      var _props$morph$app = this.props.morph.app,
+          resultsFolder = _props$morph$app.resultsFolder,
+          sequences = _props$morph$app.sequences,
+          renders = _props$morph$app.renders,
+          files = _props$morph$app.files;
+
+      var sequence_options = sequences.map(function (sequence) {
+        return [sequence.name.split("_").slice(0, 3).join(" ") + "~ (" + sequence.count + ")", sequence.name];
+      });
+      var sequenceLookup = sequences.reduce(function (a, b) {
+        return a[b.name] = b, a;
+      }, {});
+
+      var totalLength = this.state.frames / 25;
+      var lengthWarning = void 0;
+      if (this.state.steps / this.state.dilate > 64 && this.state.mode === 'mix') {
+        lengthWarning = (0, _preact.h)(
+          'span',
+          null,
+          (0, _preact.h)('br', null),
+          'warning, this will take a while'
+        );
+      }
+
+      return (0, _preact.h)(
+        'div',
+        { className: 'app morph' },
+        (0, _preact.h)(
+          'div',
+          { className: 'heading row middle' },
+          (0, _preact.h)(
+            'h1',
+            null,
+            'Morph'
+          )
+        ),
+        (0, _preact.h)(
+          'div',
+          { 'class': 'rows params renders' },
+          (0, _preact.h)(
+            'div',
+            { 'class': 'column' },
+            (0, _preact.h)(
+              _common.Group,
+              { title: 'From' },
+              (0, _preact.h)(_common.Select, {
+                title: 'Starting sequence',
+                placeholder: 'Please choose a video',
+                value: this.state.a,
+                options: sequence_options,
+                onChange: function onChange(name, key) {
+                  return _this2.setState({ a: key, a_duration: sequenceLookup[key].count, a_pos: 0, a_offset: 0 });
+                }
+              }),
+              (0, _preact.h)(_common.Slider, {
+                title: 'Offset',
+                value: this.state.a_pos,
+                min: 0, max: 1, step: 0.01,
+                onChange: function onChange(key) {
+                  return _this2.setState({ a_pos: key, a_offset: Math.floor(key * (_this2.state.a_duration - _this2.state.frames)) });
+                }
+              })
+            ),
+            (0, _preact.h)(
+              _common.Group,
+              { title: 'To' },
+              (0, _preact.h)(_common.Select, {
+                title: 'Ending sequence',
+                placeholder: 'Please choose a video',
+                value: this.state.b,
+                options: sequence_options,
+                onChange: function onChange(name, key) {
+                  return _this2.setState({ b: key, b_duration: sequenceLookup[key].count, b_pos: 0, b_offset: 0 });
+                }
+              }),
+              (0, _preact.h)(_common.Slider, {
+                title: 'Offset',
+                value: this.state.b_pos,
+                min: 0, max: 1, step: 0.01,
+                onChange: function onChange(key) {
+                  return _this2.setState({ b_pos: key, b_offset: Math.floor(key * (_this2.state.b_duration - _this2.state.frames)) });
+                }
+              })
+            ),
+            (0, _preact.h)(
+              _common.Group,
+              { title: 'Morph Settings' },
+              (0, _preact.h)(_common.Select, {
+                title: "Mode",
+                value: this.state.mode,
+                options: ['mix', 'average', 'mix_images'],
+                onChange: function onChange(name, key) {
+                  return _this2.setState({ mode: key });
+                }
+              }),
+              (0, _preact.h)(_common.Slider, {
+                type: 'list',
+                title: 'Steps',
+                value: this.state.steps,
+                options: [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096],
+                onChange: function onChange(key) {
+                  return _this2.setState({ steps: key, frames: key * _this2.state.dilate });
+                }
+              }),
+              (0, _preact.h)(_common.Slider, {
+                type: 'list',
+                title: 'Dilate',
+                value: this.state.dilate,
+                options: [1, 2, 4, 8, 16, 32],
+                onChange: function onChange(key) {
+                  return _this2.setState({ dilate: key, frames: _this2.state.steps * key });
+                }
+              }),
+              (0, _preact.h)(_common.Checkbox, {
+                title: 'Smooth',
+                value: this.state.smooth,
+                onToggle: function onToggle(key) {
+                  return _this2.setState({ smooth: key });
+                }
+              }),
+              (0, _preact.h)(_common.Slider, {
+                type: 'int',
+                title: 'Padding (in seconds)',
+                value: this.state.padding,
+                min: 0, max: 30, step: 1,
+                onChange: function onChange(key) {
+                  return _this2.setState({ padding: key });
+                }
+              }),
+              (0, _preact.h)(_common.Button, {
+                title: 'Run task',
+                value: 'Morph!',
+                onClick: function onClick() {
+                  return _this2.props.remote.morph_task(_this2.state, resultsFolder);
+                }
+              }),
+              (0, _preact.h)('br', null),
+              (0, _preact.h)(
+                _common.Param,
+                { title: 'Total length' },
+                totalLength.toFixed(1) + " seconds"
+              ),
+              (0, _preact.h)(
+                _common.Param,
+                { title: 'Total frames' },
+                this.state.frames + " frames"
+              ),
+              lengthWarning,
+              (0, _preact.h)('br', null),
+              (0, _preact.h)(_common.CurrentTask, null)
+            )
+          ),
+          (0, _preact.h)(
+            'h3',
+            null,
+            'morphed videos'
+          ),
+          (0, _preact.h)(_common.FileList, {
+            linkFiles: true,
+            files: files,
+            orderBy: 'date desc',
+            fields: 'name datetime size delete',
+            onDelete: function onDelete(file) {
+              var yes = void 0;
+              if (yes_count < 3) {
+                yes = confirm('Are you sure you want to delete this file?');
+              } else {
+                yes = true;
+              }
+              if (yes) {
+                yes_count += 1;
+                console.log('delete: confirmed');
+                _actions2.default.file.destroy(file);
+              }
+            }
+          }),
+          (0, _preact.h)('br', null),
+          (0, _preact.h)(
+            'h3',
+            null,
+            'renders on server'
+          ),
+          (0, _preact.h)(_common.FileList, {
+            files: renders,
+            orderBy: 'date desc',
+            fields: 'name datetime time size',
+            onClick: function onClick(file, e) {
+              e.preventDefault();
+              e.stopPropagation();
+              console.log('picked a result', file);
+              _this2.handlePick(file);
+            }
+          })
+        )
+      );
+    }
+  }, {
+    key: 'handlePick',
+    value: function handlePick(file) {
+      // this.props.audioPlayer.play(file)
+    }
+  }]);
+
+  return MorphResults;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {
+    morph: state.module.morph
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    actions: (0, _redux.bindActionCreators)(morphActions, dispatch),
+    remote: (0, _redux.bindActionCreators)(morphTasks, dispatch)
+    // audioPlayer: bindActionCreators(audioPlayerActions, dispatch),
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(MorphResults);
+
+/***/ }),
+
+/***/ "./app/client/modules/pix2pix/index.js":
+/*!*********************************************!*\
+  !*** ./app/client/modules/pix2pix/index.js ***!
+  \*********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _reactRouterDom = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
+
+var _actions = __webpack_require__(/*! ../../actions */ "./app/client/actions.js");
+
+var _actions2 = _interopRequireDefault(_actions);
+
+var _util = __webpack_require__(/*! ../../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _pix2pix = __webpack_require__(/*! ./views/pix2pix.new */ "./app/client/modules/pix2pix/views/pix2pix.new.js");
+
+var _pix2pix2 = _interopRequireDefault(_pix2pix);
+
+var _pix2pix3 = __webpack_require__(/*! ./views/pix2pix.show */ "./app/client/modules/pix2pix/views/pix2pix.show.js");
+
+var _pix2pix4 = _interopRequireDefault(_pix2pix3);
+
+var _pix2pix5 = __webpack_require__(/*! ./views/pix2pix.live */ "./app/client/modules/pix2pix/views/pix2pix.live.js");
+
+var _pix2pix6 = _interopRequireDefault(_pix2pix5);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var router = function () {
+  function router() {
+    _classCallCheck(this, router);
+  }
+
+  _createClass(router, [{
+    key: 'componentWillMount',
+    value: function componentWillMount() {
+      _actions2.default.system.changeTool('pix2pix');
+      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #fde, #ffe)';
+    }
+  }, {
+    key: 'componentWillReceiveProps',
+    value: function componentWillReceiveProps() {
+      _actions2.default.system.changeTool('pix2pix');
+      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #fde, #ffe)';
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      return (0, _preact.h)(
+        'section',
+        null,
+        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pix/new/', component: _pix2pix2.default }),
+        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pix/sequences/', component: _pix2pix4.default }),
+        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pix/sequences/:id/', component: _pix2pix4.default }),
+        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pix/live/', component: _pix2pix6.default })
+      );
+    }
+  }]);
+
+  return router;
+}();
+
+function links() {
+  return [{ url: '/pix2pix/new/', name: 'new' }, { url: '/pix2pix/sequences/', name: 'sequences' }, { url: '/pix2pix/live/', name: 'live' }];
+}
+
+exports.default = {
+  name: 'pix2pix',
+  router: router, links: links
+};
+
+/***/ }),
+
+/***/ "./app/client/modules/pix2pix/pix2pix.actions.js":
+/*!*******************************************************!*\
+  !*** ./app/client/modules/pix2pix/pix2pix.actions.js ***!
+  \*******************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.load_directories = undefined;
+
+var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
+
+var _v = __webpack_require__(/*! uuid/v1 */ "./node_modules/uuid/v1.js");
+
+var _v2 = _interopRequireDefault(_v);
+
+var _socket = __webpack_require__(/*! ../../socket */ "./app/client/socket/index.js");
+
+var _socket2 = _interopRequireDefault(_socket);
+
+var _types = __webpack_require__(/*! ../../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _dataset = __webpack_require__(/*! ../../dataset/dataset.loader */ "./app/client/dataset/dataset.loader.js");
+
+var datasetLoader = _interopRequireWildcard(_dataset);
+
+var _actions = __webpack_require__(/*! ../../actions */ "./app/client/actions.js");
+
+var _actions2 = _interopRequireDefault(_actions);
+
+var _util = __webpack_require__(/*! ../../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _pix2pix = __webpack_require__(/*! ./pix2pix.module */ "./app/client/modules/pix2pix/pix2pix.module.js");
+
+var _pix2pix2 = _interopRequireDefault(_pix2pix);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var load_directories = exports.load_directories = function load_directories(id) {
+  return function (dispatch) {
+    var module = _pix2pix2.default.name;
+    _util2.default.allProgress([datasetLoader.load(module), _actions2.default.socket.list_directory({ module: module, dir: 'sequences/pix2pix/' }), _actions2.default.socket.list_directory({ module: module, dir: 'datasets/pix2pix/' }), _actions2.default.socket.list_directory({ module: module, dir: 'checkpoints/pix2pix/' })], function (percent, i, n) {
+      console.log('pix2pix load progress', i, n);
+      dispatch({ type: _types2.default.app.load_progress, progress: { i: i, n: n } });
+    }).then(function (res) {
+      var _res = _slicedToArray(res, 4),
+          datasetApiReport = _res[0],
+          sequences = _res[1],
+          datasets = _res[2],
+          checkpoints = _res[3]; //, datasets, results, output, datasetUsage, lossReport] = res
+
+
+      var folderLookup = datasetApiReport.folderLookup,
+          fileLookup = datasetApiReport.fileLookup,
+          datasetLookup = datasetApiReport.datasetLookup,
+          folders = datasetApiReport.folders,
+          files = datasetApiReport.files,
+          unsortedFolder = datasetApiReport.unsortedFolder;
+      // console.log(datasetUsage)
+
+      var sequenceDirectories = sequences.filter(function (s) {
+        return s.dir;
+      });
+      // console.log(sequenceDirectories)
+      sequenceDirectories.forEach(function (dir) {
+        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);
+        dataset.isBuilt = true;
+        // console.log(dir.name, dataset)
+      });
+
+      datasets.filter(function (s) {
+        return s.dir;
+      }).forEach(function (dir) {
+        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);
+        dataset.hasDataset = true;
+      });
+
+      var checkpointDirectories = checkpoints.filter(function (s) {
+        return s.dir;
+      });
+      checkpointDirectories.forEach(function (dir) {
+        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);
+        dataset.hasCheckpoints = true;
+        dataset.checkpoints = [dir];
+      });
+
+      // console.log(res)
+
+      // flatDatasets.forEach(file => {
+      //   file.uuid = uuidv1()
+      //   fileLookup[file.uuid] = file
+      //   const name = file.name.split('.')[0]
+      //   const dataset = datasetLoader.getDataset(module, datasetLookup, name, unsortedFolder, file.date)
+      //   file.persisted = false
+      //   dataset.input.push(file.uuid)
+      // })
+
+      // // exp:coccokit_3-frame_sizes:8,2-n_rnn:2-dataset:coccokit_3
+      // const checkpoints = results.filter(s => s.dir).map(s => {
+      //   const checkpoint = s.name
+      //     .split('-')
+      //     .map(s => s.split(':'))
+      //     .filter(b => b.length && b[1])
+      //     .reduce((a,b) => (a[b[0]] = b[1]) && a, {})
+      //   checkpoint.name = checkpoint.name || checkpoint.dataset || checkpoint.exp
+      //   checkpoint.date = s.date
+      //   checkpoint.dir = s
+      //   checkpoint.persisted = false
+      //   const dataset = datasetLoader.getDataset(module, datasetLookup, checkpoint.name, unsortedFolder, checkpoint.date)
+      //   const loss = lossReport[checkpoint.name]
+      //   if (loss) {
+      //     dataset.epoch = checkpoint.epoch = loss.length
+      //     checkpoint.training_loss = loss
+      //   }
+      //   dataset.checkpoints.push(checkpoint)
+      //   return checkpoint
+      // })
+
+      // output.map(file => {
+      //   file.uuid = uuidv1()
+      //   fileLookup[file.uuid] = file
+      //   const pair = file.name.split('.')[0].split('-')
+      //   const dataset = datasetLoader.getDataset(module, datasetLookup, pair[0], unsortedFolder, file.date)
+      //   file.persisted = false
+      //   file.epoch = parseInt(file.epoch || pair[1].replace(/^\D+/, '')) || 0
+      //   dataset.epoch = Math.max(file.epoch, dataset.epoch || 0)
+      //   // here check if the file exists in dataset, if so just check that it's persisted
+      //   const found = dataset.output.some(file_id => {
+      //     // if (f.name === 
+      //     if (fileLookup[file_id].name === file.name) {
+      //       fileLookup[file_id].persisted = true
+      //       return true
+      //     }
+      //     return false
+      //   })
+      //   if (! found) {
+      //     dataset.output.push(file.uuid)
+      //   }
+      // })
+
+      dispatch({
+        type: _types2.default.dataset.load,
+        data: {
+          module: module,
+          folderLookup: folderLookup,
+          fileLookup: fileLookup,
+          datasetLookup: datasetLookup,
+          folders: folders, files: files,
+          sequences: sequenceDirectories,
+          datasets: datasets,
+          checkpoints: checkpointDirectories
+        }
+      });
+    }).catch(function (e) {
+      console.error(e);
+    });
+    if (id) {
+      console.log('folder id', id);
+      dispatch({
+        type: _types2.default.dataset.set_folder,
+        data: {
+          folder_id: id,
+          module: module
+        }
+      });
+    }
+  };
+};
+
+/***/ }),
+
+/***/ "./app/client/modules/pix2pix/pix2pix.module.js":
+/*!******************************************************!*\
+  !*** ./app/client/modules/pix2pix/pix2pix.module.js ***!
+  \******************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+var pix2pixModule = {
+  name: 'pix2pix',
+  displayName: 'Pix2Pix',
+  datatype: 'video'
+};
+
+exports.default = pix2pixModule;
+
+/***/ }),
+
+/***/ "./app/client/modules/pix2pix/pix2pix.reducer.js":
+/*!*******************************************************!*\
+  !*** ./app/client/modules/pix2pix/pix2pix.reducer.js ***!
+  \*******************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _types = __webpack_require__(/*! ../../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _dataset = __webpack_require__(/*! ../../dataset/dataset.reducer */ "./app/client/dataset/dataset.reducer.js");
+
+var _dataset2 = _interopRequireDefault(_dataset);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var pix2pixInitialState = {
+  loading: true,
+  progress: { i: 0, n: 0 },
+  error: null,
+  folder_id: 0,
+  data: null
+};
+
+var pix2pixReducer = function pix2pixReducer() {
+  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : pix2pixInitialState;
+  var action = arguments[1];
+
+  if (action.data && action.data.module === 'pix2pix') {
+    state = (0, _dataset2.default)(state, action);
+  }
+
+  switch (action.type) {
+    default:
+      return state;
+  }
+};
+
+exports.default = pix2pixReducer;
+
+/***/ }),
+
+/***/ "./app/client/modules/pix2pix/pix2pix.tasks.js":
+/*!*****************************************************!*\
+  !*** ./app/client/modules/pix2pix/pix2pix.tasks.js ***!
+  \*****************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.train_task = exports.live_task = exports.fetch_task = undefined;
+
+var _v = __webpack_require__(/*! uuid/v1 */ "./node_modules/uuid/v1.js");
+
+var _v2 = _interopRequireDefault(_v);
+
+var _socket = __webpack_require__(/*! ../../socket */ "./app/client/socket/index.js");
+
+var _socket2 = _interopRequireDefault(_socket);
+
+var _types = __webpack_require__(/*! ../../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _actions = __webpack_require__(/*! ../../actions */ "./app/client/actions.js");
+
+var _actions2 = _interopRequireDefault(_actions);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var fetch_task = exports.fetch_task = function fetch_task(url, file_id, dataset) {
+  return function (dispatch) {
+    if (!url) return console.log('input file inaccessible (no url)');
+    var task = {
+      module: 'pix2pix',
+      activity: 'fetch',
+      dataset: dataset,
+      opt: {
+        url: url,
+        file_id: file_id,
+        dataset: dataset
+      }
+    };
+    return _actions2.default.queue.add_task(task);
+  };
+};
+
+var live_task = exports.live_task = function live_task(sequence, checkpoint) {
+  return function (dispatch) {
+    var task = {
+      module: 'pix2pix',
+      activity: 'live',
+      dataset: sequence,
+      checkpoint: checkpoint,
+      opt: {
+        poll_delay: 0.09
+      }
+    };
+    console.log(task);
+    console.log('add live task');
+    return _actions2.default.queue.add_task(task);
+  };
+};
+
+var train_task = exports.train_task = function train_task(dataset, folder_id) {
+  var epochs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
+  return function (dispatch) {
+    var task = {
+      module: 'pix2pix',
+      activity: 'train',
+      dataset: dataset.name,
+      epoch: 0,
+      epochs: epochs,
+      opt: {
+        folder_id: folder_id,
+        load_size: 264 // switch to 256 for pix2wav
+      }
+    };
+    console.log(task);
+    return _actions2.default.queue.add_task(task);
+  };
+};
+// export const log_task = (dataset) => dispatch => {
+//   const task = {
+//     module: 'samplernn',
+//     activity: 'log',
+//     dataset: dataset.name,
+//   }
+//   return actions.queue.add_task(task)
+// }
+// export const clear_cache_task = (dataset) => dispatch => {
+//   const task = {
+//     module: 'samplernn',
+//     activity: 'clear_cache',
+//     dataset: dataset.name,
+//   }
+//   return actions.queue.add_task(task)
+// }
+
+/***/ }),
+
+/***/ "./app/client/modules/pix2pix/views/pix2pix.live.js":
+/*!**********************************************************!*\
+  !*** ./app/client/modules/pix2pix/views/pix2pix.live.js ***!
+  \**********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _common = __webpack_require__(/*! ../../../common/ */ "./app/client/common/index.js");
+
+var _player = __webpack_require__(/*! ../../../live/player */ "./app/client/live/player.js");
+
+var _live = __webpack_require__(/*! ../../../live/live.actions */ "./app/client/live/live.actions.js");
+
+var liveActions = _interopRequireWildcard(_live);
+
+var _queue = __webpack_require__(/*! ../../../queue/queue.actions */ "./app/client/queue/queue.actions.js");
+
+var queueActions = _interopRequireWildcard(_queue);
+
+var _pix2pix = __webpack_require__(/*! ../pix2pix.tasks */ "./app/client/modules/pix2pix/pix2pix.tasks.js");
+
+var pix2pixTasks = _interopRequireWildcard(_pix2pix);
+
+var _pix2pix2 = __webpack_require__(/*! ../pix2pix.actions */ "./app/client/modules/pix2pix/pix2pix.actions.js");
+
+var pix2pixActions = _interopRequireWildcard(_pix2pix2);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var Pix2PixLive = function (_Component) {
+  _inherits(Pix2PixLive, _Component);
+
+  function Pix2PixLive(props) {
+    _classCallCheck(this, Pix2PixLive);
+
+    // if (! props.pix2pix || ! props.pix2pix.data) {
+    var _this = _possibleConstructorReturn(this, (Pix2PixLive.__proto__ || Object.getPrototypeOf(Pix2PixLive)).call(this));
+
+    props.actions.pix2pix.load_directories();
+    // }
+    props.actions.live.get_params();
+    // props.actions.live.list_checkpoints('pix2pix')
+    // props.actions.live.list_sequences('pix2pix')
+    _this.changeCheckpoint = _this.changeCheckpoint.bind(_this);
+    _this.changeEpoch = _this.changeEpoch.bind(_this);
+    _this.changeSequence = _this.changeSequence.bind(_this);
+    _this.seek = _this.seek.bind(_this);
+    _this.togglePlaying = _this.togglePlaying.bind(_this);
+    _this.toggleRecording = _this.toggleRecording.bind(_this);
+    return _this;
+  }
+
+  _createClass(Pix2PixLive, [{
+    key: 'componentWillUpdate',
+    value: function componentWillUpdate(nextProps) {
+      if (nextProps.opt.checkpoint_name && nextProps.opt.checkpoint_name !== this.props.opt.checkpoint_name) {
+        this.props.actions.live.list_epochs('pix2pix', nextProps.opt.checkpoint_name);
+      }
+    }
+  }, {
+    key: 'changeCheckpoint',
+    value: function changeCheckpoint(field, checkpoint_name) {
+      this.props.actions.live.load_epoch(checkpoint_name, 'latest');
+    }
+  }, {
+    key: 'changeEpoch',
+    value: function changeEpoch(field, epoch_name) {
+      this.props.actions.live.load_epoch(this.props.opt.checkpoint_name, epoch_name);
+    }
+  }, {
+    key: 'changeSequence',
+    value: function changeSequence(field, sequence) {
+      console.log('load sequence', sequence);
+      this.props.actions.live.load_sequence(sequence);
+    }
+  }, {
+    key: 'seek',
+    value: function seek(percentage) {
+      var frame = Math.floor(percentage * (parseInt(this.props.frame.sequence_len) || 1) + 1);
+      console.log("seek to frame", percentage, frame);
+      this.props.actions.live.seek(frame);
+    }
+  }, {
+    key: 'start',
+    value: function start() {
+      // console.log(this.props)
+      var sequence = this.props.pix2pix.data.sequences[0].name;
+      var checkpoint = this.props.pix2pix.data.checkpoints[0].name;
+      console.log('starting up!', sequence, checkpoint);
+      this.props.actions.tasks.live_task(sequence, checkpoint);
+    }
+  }, {
+    key: 'interrupt',
+    value: function interrupt() {
+      this.props.actions.queue.stop_task('gpu');
+    }
+  }, {
+    key: 'togglePlaying',
+    value: function togglePlaying() {
+      if (this.props.opt.processing) {
+        this.props.actions.live.pause();
+      } else {
+        this.props.actions.live.play();
+      }
+    }
+  }, {
+    key: 'toggleRecording',
+    value: function toggleRecording() {
+      if (this.props.opt.recording) {
+        (0, _player.stopRecording)();
+        this.props.actions.live.pause();
+      } else {
+        (0, _player.startRecording)();
+      }
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      // console.log(this.props)
+      if (this.props.pix2pix.loading) {
+        return (0, _preact.h)(_common.Loading, null);
+      }
+      return (0, _preact.h)(
+        'div',
+        { className: 'app centered' },
+        (0, _preact.h)(_common.Player, { width: 424, height: 256 }),
+        (0, _preact.h)(
+          'div',
+          { className: 'params row' },
+          (0, _preact.h)(
+            'div',
+            { className: 'column' },
+            (0, _preact.h)(
+              _common.ParamGroup,
+              {
+                title: 'Playback',
+                noToggle: true
+              },
+              (0, _preact.h)(_common.Select, {
+                name: 'send_image',
+                title: 'view mode',
+                options: ['a', 'b', 'sequence', 'recursive'],
+                onChange: this.props.actions.live.set_param
+              }),
+              (0, _preact.h)(_common.Select, {
+                name: 'sequence_name',
+                title: 'sequence',
+                options: this.props.pix2pix.data.sequences.map(function (file) {
+                  return file.name;
+                }),
+                onChange: this.changeSequence
+              }),
+              (0, _preact.h)(_common.Select, {
+                name: 'checkpoint_name',
+                title: 'checkpoint',
+                options: this.props.pix2pix.data.checkpoints.map(function (file) {
+                  return file.name;
+                }),
+                onChange: this.changeCheckpoint
+              }),
+              (0, _preact.h)(_common.Select, {
+                name: 'epoch',
+                title: 'epoch',
+                options: this.props.epochs,
+                onChange: this.changeEpoch
+              }),
+              (0, _preact.h)(_common.Slider, {
+                name: 'position',
+                min: 0.0, max: 1.0, type: 'float',
+                value: (this.props.frame.sequence_i || 0) / (this.props.frame.sequence_len || 1),
+                onChange: this.seek
+              }),
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'frame_delay',
+                min: 0.05, max: 2.0, type: 'float'
+              }),
+              this.renderRestartButton(),
+              (0, _preact.h)(
+                _common.Button,
+                {
+                  title: this.props.opt.savingVideo ? 'Saving video...' : this.props.opt.recording ? 'Recording (' + timeInSeconds(this.props.opt.recordFrames / 25) + ')' : 'Record video',
+                  onClick: this.toggleRecording
+                },
+                this.props.opt.savingVideo ? 'Saving' : this.props.opt.recording ? 'Recording' : 'Record'
+              ),
+              (0, _preact.h)(
+                _common.Button,
+                {
+                  title: 'Save frame',
+                  onClick: _player.saveFrame
+                },
+                'Save'
+              ),
+              (0, _preact.h)(_common.ParamGroup, {
+                title: 'Render on server',
+                name: 'store_b',
+                onToggle: function onToggle(value) {
+                  // now storing frames on server...
+                }
+              }),
+              (0, _preact.h)(
+                'p',
+                { 'class': 'last_message' },
+                this.props.last_message
+              )
+            )
+          ),
+          (0, _preact.h)(
+            'div',
+            { className: 'column' },
+            (0, _preact.h)(
+              _common.ParamGroup,
+              {
+                title: 'Transition',
+                name: 'transition'
+              },
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'transition_period',
+                min: 10, max: 5000, type: 'int'
+              }),
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'transition_min',
+                min: 0.001, max: 0.2, type: 'float'
+              }),
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'transition_max',
+                min: 0.1, max: 1.0, type: 'float'
+              })
+            ),
+            (0, _preact.h)(
+              _common.ParamGroup,
+              {
+                title: 'Recursion',
+                name: 'recursive'
+              },
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'recursive_frac',
+                min: 0.0, max: 0.5, type: 'float'
+              }),
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'recurse_roll',
+                min: -64, max: 64, type: 'int'
+              }),
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'recurse_roll_axis',
+                min: 0, max: 1, type: 'int'
+              })
+            ),
+            (0, _preact.h)(
+              _common.ParamGroup,
+              {
+                title: 'Sequence',
+                name: 'sequence'
+              },
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'sequence_frac',
+                min: 0.0, max: 0.5, type: 'float'
+              }),
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'process_frac',
+                min: 0, max: 1, type: 'float'
+              })
+            )
+          ),
+          (0, _preact.h)(
+            'div',
+            { className: 'column' },
+            (0, _preact.h)(
+              _common.ParamGroup,
+              {
+                title: 'Clahe',
+                name: 'clahe'
+              },
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'clip_limit',
+                min: 1.0, max: 4.0, type: 'float'
+              })
+            ),
+            (0, _preact.h)(
+              _common.ParamGroup,
+              {
+                title: 'Posterize',
+                name: 'posterize'
+              },
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'spatial_window',
+                min: 2, max: 128, type: 'int'
+              }),
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'color_window',
+                min: 2, max: 128, type: 'int'
+              })
+            ),
+            (0, _preact.h)(
+              _common.ParamGroup,
+              {
+                title: 'Blur',
+                name: 'blur'
+              },
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'blur_radius',
+                min: 3, max: 7, type: 'odd'
+              }),
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'blur_sigma',
+                min: 0, max: 2, type: 'float'
+              })
+            ),
+            (0, _preact.h)(
+              _common.ParamGroup,
+              {
+                title: 'Canny Edge Detection',
+                name: 'canny'
+              },
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'canny_lo',
+                min: 10, max: 200, type: 'int'
+              }),
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'canny_hi',
+                min: 10, max: 200, type: 'int'
+              })
+            )
+          )
+        )
+      );
+    }
+  }, {
+    key: 'renderRestartButton',
+    value: function renderRestartButton() {
+      var _this2 = this;
+
+      if (this.props.runner.gpu.status === 'IDLE') {
+        return (0, _preact.h)(
+          _common.Button,
+          {
+            title: 'GPU Idle',
+            onClick: function onClick() {
+              return _this2.start();
+            }
+          },
+          'Start'
+        );
+      }
+      if (this.props.runner.gpu.task.module !== 'pix2pix') {
+        return (0, _preact.h)(
+          _common.Button,
+          {
+            title: 'GPU Busy',
+            onClick: function onClick() {
+              return _this2.interrupt();
+            }
+          },
+          'Interrupt'
+        );
+      }
+      if (!this.props.opt.processing) {
+        return (0, _preact.h)(
+          'div',
+          null,
+          (0, _preact.h)(
+            _common.Button,
+            {
+              title: 'Not processing',
+              onClick: this.togglePlaying
+            },
+            'Restart'
+          ),
+          (0, _preact.h)(
+            _common.Button,
+            {
+              title: 'GPU Busy',
+              onClick: function onClick() {
+                return _this2.interrupt();
+              }
+            },
+            'Interrupt'
+          )
+        );
+      }
+      return (0, _preact.h)(
+        'div',
+        null,
+        (0, _preact.h)(
+          _common.Button,
+          {
+            title: 'Processing',
+            onClick: this.togglePlaying
+          },
+          'Stop'
+        ),
+        (0, _preact.h)(
+          _common.Button,
+          {
+            title: 'GPU Busy',
+            onClick: function onClick() {
+              return _this2.interrupt();
+            }
+          },
+          'Interrupt'
+        )
+      );
+    }
+  }]);
+
+  return Pix2PixLive;
+}(_preact.Component);
+
+function timeInSeconds(n) {
+  return n.toFixed(1) + ' s.';
+}
+var mapStateToProps = function mapStateToProps(state) {
+  return {
+    last_message: state.live.last_message,
+    opt: state.live.opt,
+    frame: state.live.frame,
+    checkpoints: state.live.checkpoints,
+    epochs: state.live.epochs,
+    sequences: state.live.sequences,
+    runner: state.system.runner,
+    pix2pix: state.module.pix2pix
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    actions: {
+      live: (0, _redux.bindActionCreators)(liveActions, dispatch),
+      queue: (0, _redux.bindActionCreators)(queueActions, dispatch),
+      pix2pix: (0, _redux.bindActionCreators)(pix2pixActions, dispatch),
+      tasks: (0, _redux.bindActionCreators)(pix2pixTasks, dispatch), s: s
+    }
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2PixLive);
+
+/***/ }),
+
+/***/ "./app/client/modules/pix2pix/views/pix2pix.new.js":
+/*!*********************************************************!*\
+  !*** ./app/client/modules/pix2pix/views/pix2pix.new.js ***!
+  \*********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _reactRouterDom = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
+
+var _util = __webpack_require__(/*! ../../../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _common = __webpack_require__(/*! ../../../common */ "./app/client/common/index.js");
+
+var _pix2pix = __webpack_require__(/*! ../pix2pix.actions */ "./app/client/modules/pix2pix/pix2pix.actions.js");
+
+var pix2pixActions = _interopRequireWildcard(_pix2pix);
+
+var _pix2pix2 = __webpack_require__(/*! ../pix2pix.module */ "./app/client/modules/pix2pix/pix2pix.module.js");
+
+var _pix2pix3 = _interopRequireDefault(_pix2pix2);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function Pix2PixNew(props) {
+  return (0, _preact.h)(_common.Views.New, {
+    db: props.pix2pix,
+    path: '/pix2pix/sequences/',
+    actions: props.actions,
+    module: _pix2pix3.default,
+    history: props.history
+  });
+}
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {
+    pix2pix: state.module.pix2pix
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    actions: (0, _redux.bindActionCreators)(pix2pixActions, dispatch)
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2PixNew);
+
+/***/ }),
+
+/***/ "./app/client/modules/pix2pix/views/pix2pix.show.js":
+/*!**********************************************************!*\
+  !*** ./app/client/modules/pix2pix/views/pix2pix.show.js ***!
+  \**********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _util = __webpack_require__(/*! ../../../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _pix2pix = __webpack_require__(/*! ../pix2pix.actions */ "./app/client/modules/pix2pix/pix2pix.actions.js");
+
+var pix2pixActions = _interopRequireWildcard(_pix2pix);
+
+var _pix2pix2 = __webpack_require__(/*! ../pix2pix.tasks */ "./app/client/modules/pix2pix/pix2pix.tasks.js");
+
+var pix2pixTasks = _interopRequireWildcard(_pix2pix2);
+
+var _common = __webpack_require__(/*! ../../../common */ "./app/client/common/index.js");
+
+var _dataset = __webpack_require__(/*! ../../../dataset/dataset.form */ "./app/client/dataset/dataset.form.js");
+
+var _dataset2 = _interopRequireDefault(_dataset);
+
+var _dataset3 = __webpack_require__(/*! ../../../dataset/dataset.new */ "./app/client/dataset/dataset.new.js");
+
+var _dataset4 = _interopRequireDefault(_dataset3);
+
+var _upload = __webpack_require__(/*! ../../../dataset/upload.status */ "./app/client/dataset/upload.status.js");
+
+var _upload2 = _interopRequireDefault(_upload);
+
+var _dataset5 = __webpack_require__(/*! ../../../dataset/dataset.component */ "./app/client/dataset/dataset.component.js");
+
+var _dataset6 = _interopRequireDefault(_dataset5);
+
+var _pix2pix3 = __webpack_require__(/*! ../pix2pix.module */ "./app/client/modules/pix2pix/pix2pix.module.js");
+
+var _pix2pix4 = _interopRequireDefault(_pix2pix3);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var Pix2pixShow = function (_Component) {
+  _inherits(Pix2pixShow, _Component);
+
+  function Pix2pixShow(props) {
+    _classCallCheck(this, Pix2pixShow);
+
+    var _this = _possibleConstructorReturn(this, (Pix2pixShow.__proto__ || Object.getPrototypeOf(Pix2pixShow)).call(this, props));
+
+    _this.datasetActions = _this.datasetActions.bind(_this);
+    return _this;
+  }
+
+  _createClass(Pix2pixShow, [{
+    key: 'componentWillMount',
+    value: function componentWillMount() {
+      var id = this.props.match.params.id || localStorage.getItem('pix2pix.last_id');
+      console.log('load dataset:', id);
+      var _props = this.props,
+          match = _props.match,
+          pix2pix = _props.pix2pix,
+          actions = _props.actions;
+
+      if (id === 'new') return;
+      if (id) {
+        if (parseInt(id)) localStorage.setItem('pix2pix.last_id', id);
+        if (!pix2pix.folder || pix2pix.folder.id !== id) {
+          actions.load_directories(id);
+        }
+      } else {
+        this.props.history.push('/pix2pix/new/');
+      }
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      var _props2 = this.props,
+          pix2pix = _props2.pix2pix,
+          match = _props2.match,
+          history = _props2.history;
+
+      var _ref = pix2pix.data || {},
+          folderLookup = _ref.folderLookup;
+
+      var folder = (folderLookup || {})[pix2pix.folder_id] || {};
+
+      return (0, _preact.h)(
+        'div',
+        { className: 'app pix2pix' },
+        (0, _preact.h)(
+          'div',
+          { 'class': 'heading' },
+          (0, _preact.h)(
+            'div',
+            { 'class': 'spaced' },
+            (0, _preact.h)(
+              'h1',
+              null,
+              folder ? folder.name : (0, _preact.h)(_common.Loading, null)
+            ),
+            (0, _preact.h)(_upload2.default, null)
+          )
+        ),
+        (0, _preact.h)(
+          'div',
+          { className: 'row' },
+          folder && folder.name && folder.name !== 'unsorted' && (0, _preact.h)(_dataset2.default, {
+            title: 'Add Files',
+            module: _pix2pix4.default,
+            folder: folder,
+            canUpload: true, canAddURL: true
+          }),
+          (0, _preact.h)(
+            'div',
+            null,
+            (0, _preact.h)(_upload2.default, null),
+            (0, _preact.h)(_common.CurrentTask, null)
+          )
+        ),
+        (0, _preact.h)(_dataset6.default, {
+          loading: pix2pix.loading,
+          progress: pix2pix.progress,
+          id: pix2pix.folder_id,
+          module: _pix2pix4.default,
+          data: pix2pix.data,
+          folder: folder,
+          history: history,
+          onPickFile: function onPickFile(file, e) {
+            e.preventDefault();
+            e.stopPropagation();
+            console.log('picked a file', file);
+          },
+          datasetActions: this.datasetActions
+        })
+      );
+    }
+  }, {
+    key: 'datasetActions',
+    value: function datasetActions(dataset) {
+      var isFetching = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+      var isProcessing = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+      var _props3 = this.props,
+          pix2pix = _props3.pix2pix,
+          remote = _props3.remote;
+
+      var input = pix2pix.data.fileLookup[dataset.input[0]];
+      if (!input) return null;
+      if (input.name && input.name.match(/(gif|jpe?g|png)$/i)) return null;
+      console.log(dataset);
+      return (0, _preact.h)(
+        'div',
+        null,
+        (0, _preact.h)(
+          'div',
+          { 'class': 'actions' },
+          (0, _preact.h)(
+            'span',
+            { 'class': 'link', onClick: function onClick() {
+                return remote.train_task(dataset, pix2pix.folder_id, 1);
+              } },
+            'train'
+          ),
+          (0, _preact.h)(
+            'span',
+            { 'class': 'link', onClick: function onClick() {
+                return remote.train_task(dataset, pix2pix.folder_id, 5);
+              } },
+            '5x'
+          ),
+          (0, _preact.h)(
+            'span',
+            { 'class': 'link', onClick: function onClick() {
+                return remote.train_task(dataset, pix2pix.folder_id, 10);
+              } },
+            '10x'
+          ),
+          (0, _preact.h)(
+            'span',
+            { 'class': 'link', onClick: function onClick() {
+                return remote.train_task(dataset, pix2pix.folder_id, 20);
+              } },
+            '20x'
+          ),
+          (0, _preact.h)(
+            'span',
+            { 'class': 'link', onClick: function onClick() {
+                return remote.train_task(dataset, pix2pix.folder_id, 50);
+              } },
+            '50x'
+          )
+        ),
+        dataset.isBuilt ? (0, _preact.h)(
+          'div',
+          { 'class': 'subtext' },
+          'fetched ',
+          (0, _preact.h)(
+            'span',
+            { 'class': 'link', onClick: function onClick() {
+                return remote.clear_cache_task(dataset);
+              } },
+            'rm'
+          )
+        ) : isFetching ? (0, _preact.h)(
+          'div',
+          { 'class': 'subtext' },
+          'fetching'
+        ) : (0, _preact.h)(
+          'div',
+          { 'class': 'subtext' },
+          (0, _preact.h)(
+            'span',
+            { 'class': 'link', onClick: function onClick() {
+                return remote.fetch_task(input.url, input.id, dataset.name);
+              } },
+            'fetch'
+          )
+        )
+      );
+    }
+  }]);
+
+  return Pix2pixShow;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {
+    pix2pix: state.module.pix2pix
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    actions: (0, _redux.bindActionCreators)(pix2pixActions, dispatch),
+    remote: (0, _redux.bindActionCreators)(pix2pixTasks, dispatch)
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2pixShow);
+
+/***/ }),
+
+/***/ "./app/client/modules/pix2pixhd/index.js":
+/*!***********************************************!*\
+  !*** ./app/client/modules/pix2pixhd/index.js ***!
+  \***********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _reactRouterDom = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
+
+var _actions = __webpack_require__(/*! ../../actions */ "./app/client/actions.js");
+
+var _actions2 = _interopRequireDefault(_actions);
+
+var _util = __webpack_require__(/*! ../../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _pix2pixhd = __webpack_require__(/*! ./views/pix2pixhd.new */ "./app/client/modules/pix2pixhd/views/pix2pixhd.new.js");
+
+var _pix2pixhd2 = _interopRequireDefault(_pix2pixhd);
+
+var _pix2pixhd3 = __webpack_require__(/*! ./views/pix2pixhd.show */ "./app/client/modules/pix2pixhd/views/pix2pixhd.show.js");
+
+var _pix2pixhd4 = _interopRequireDefault(_pix2pixhd3);
+
+var _pix2pixhd5 = __webpack_require__(/*! ./views/pix2pixhd.results */ "./app/client/modules/pix2pixhd/views/pix2pixhd.results.js");
+
+var _pix2pixhd6 = _interopRequireDefault(_pix2pixhd5);
+
+var _pix2pixhd7 = __webpack_require__(/*! ./views/pix2pixhd.train */ "./app/client/modules/pix2pixhd/views/pix2pixhd.train.js");
+
+var _pix2pixhd8 = _interopRequireDefault(_pix2pixhd7);
+
+var _pix2pixhd9 = __webpack_require__(/*! ./views/pix2pixhd.live */ "./app/client/modules/pix2pixhd/views/pix2pixhd.live.js");
+
+var _pix2pixhd10 = _interopRequireDefault(_pix2pixhd9);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var router = function () {
+  function router() {
+    _classCallCheck(this, router);
+  }
+
+  _createClass(router, [{
+    key: 'componentWillMount',
+    value: function componentWillMount() {
+      _actions2.default.system.changeTool('pix2pixhd');
+      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #def, #dfe)';
+    }
+  }, {
+    key: 'componentWillReceiveProps',
+    value: function componentWillReceiveProps() {
+      _actions2.default.system.changeTool('pix2pixhd');
+      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #def, #dfe)';
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      return (0, _preact.h)(
+        'section',
+        null,
+        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pixhd/new/', component: _pix2pixhd2.default }),
+        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pixhd/sequences/', component: _pix2pixhd4.default }),
+        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pixhd/sequences/:id/', component: _pix2pixhd4.default }),
+        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pixhd/train/', component: _pix2pixhd8.default }),
+        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pixhd/results/', component: _pix2pixhd6.default }),
+        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pixhd/live/', component: _pix2pixhd10.default })
+      );
+    }
+  }]);
+
+  return router;
+}();
+
+function links() {
+  return [{ url: '/pix2pixhd/new/', name: 'folders' }, { url: '/pix2pixhd/sequences/', name: 'sequences' }, { url: '/pix2pixhd/train/', name: 'checkpoints' }, { url: '/pix2pixhd/results/', name: 'results' }, { url: '/pix2pixhd/live/', name: 'live' }];
+}
+
+exports.default = {
+  name: 'pix2pixhd',
+  router: router, links: links
+};
+
+/***/ }),
+
+/***/ "./app/client/modules/pix2pixhd/pix2pixhd.actions.js":
+/*!***********************************************************!*\
+  !*** ./app/client/modules/pix2pixhd/pix2pixhd.actions.js ***!
+  \***********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.count_dataset = exports.list_epochs = exports.load_results = exports.load_directories = undefined;
+
+var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
+
+var _v = __webpack_require__(/*! uuid/v1 */ "./node_modules/uuid/v1.js");
+
+var _v2 = _interopRequireDefault(_v);
+
+var _socket = __webpack_require__(/*! ../../socket */ "./app/client/socket/index.js");
+
+var _socket2 = _interopRequireDefault(_socket);
+
+var _types = __webpack_require__(/*! ../../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _dataset = __webpack_require__(/*! ../../dataset/dataset.loader */ "./app/client/dataset/dataset.loader.js");
+
+var datasetLoader = _interopRequireWildcard(_dataset);
+
+var _actions = __webpack_require__(/*! ../../actions */ "./app/client/actions.js");
+
+var _actions2 = _interopRequireDefault(_actions);
+
+var _util = __webpack_require__(/*! ../../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _pix2pixhd = __webpack_require__(/*! ./pix2pixhd.module */ "./app/client/modules/pix2pixhd/pix2pixhd.module.js");
+
+var _pix2pixhd2 = _interopRequireDefault(_pix2pixhd);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var load_directories = exports.load_directories = function load_directories(id) {
+  return function (dispatch) {
+    var module = _pix2pixhd2.default.name;
+    _util2.default.allProgress([datasetLoader.load(module), _actions2.default.socket.list_directory({ module: module, dir: 'sequences' }), _actions2.default.socket.list_directory({ module: module, dir: 'datasets' }), _actions2.default.socket.list_directory({ module: module, dir: 'checkpoints' })], function (percent, i, n) {
+      console.log('pix2pixhd load progress', i, n);
+      dispatch({
+        type: _types2.default.app.load_progress,
+        progress: { i: i, n: n },
+        data: { module: 'pix2pixhd' }
+      });
+    }).then(function (res) {
+      var _res = _slicedToArray(res, 4),
+          datasetApiReport = _res[0],
+          sequences = _res[1],
+          datasets = _res[2],
+          checkpoints = _res[3]; //, datasets, results, output, datasetUsage, lossReport] = res
+
+
+      var folderLookup = datasetApiReport.folderLookup,
+          fileLookup = datasetApiReport.fileLookup,
+          datasetLookup = datasetApiReport.datasetLookup,
+          folders = datasetApiReport.folders,
+          files = datasetApiReport.files,
+          unsortedFolder = datasetApiReport.unsortedFolder,
+          resultsFolder = datasetApiReport.resultsFolder;
+      // console.log(datasetUsage)
+
+      var sequenceDirectories = sequences.filter(function (s) {
+        return s.dir;
+      });
+      // console.log(sequenceDirectories)
+      sequenceDirectories.forEach(function (dir) {
+        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);
+        dataset.isBuilt = true;
+        // console.log(dir.name, dataset)
+      });
+
+      datasets.filter(function (s) {
+        return s.dir;
+      }).forEach(function (dir) {
+        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);
+        dataset.hasDataset = true;
+      });
+
+      var checkpointDirectories = checkpoints.filter(function (s) {
+        return s.dir;
+      });
+      checkpointDirectories.forEach(function (dir) {
+        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);
+        dataset.hasCheckpoints = true;
+        dataset.checkpoints = [dir];
+      });
+
+      // console.log(res)
+
+      // flatDatasets.forEach(file => {
+      //   file.uuid = uuidv1()
+      //   fileLookup[file.uuid] = file
+      //   const name = file.name.split('.')[0]
+      //   const dataset = datasetLoader.getDataset(module, datasetLookup, name, unsortedFolder, file.date)
+      //   file.persisted = false
+      //   dataset.input.push(file.uuid)
+      // })
+
+      // // exp:coccokit_3-frame_sizes:8,2-n_rnn:2-dataset:coccokit_3
+      // const checkpoints = results.filter(s => s.dir).map(s => {
+      //   const checkpoint = s.name
+      //     .split('-')
+      //     .map(s => s.split(':'))
+      //     .filter(b => b.length && b[1])
+      //     .reduce((a,b) => (a[b[0]] = b[1]) && a, {})
+      //   checkpoint.name = checkpoint.name || checkpoint.dataset || checkpoint.exp
+      //   checkpoint.date = s.date
+      //   checkpoint.dir = s
+      //   checkpoint.persisted = false
+      //   const dataset = datasetLoader.getDataset(module, datasetLookup, checkpoint.name, unsortedFolder, checkpoint.date)
+      //   const loss = lossReport[checkpoint.name]
+      //   if (loss) {
+      //     dataset.epoch = checkpoint.epoch = loss.length
+      //     checkpoint.training_loss = loss
+      //   }
+      //   dataset.checkpoints.push(checkpoint)
+      //   return checkpoint
+      // })
+
+      // output.map(file => {
+      //   file.uuid = uuidv1()
+      //   fileLookup[file.uuid] = file
+      //   const pair = file.name.split('.')[0].split('-')
+      //   const dataset = datasetLoader.getDataset(module, datasetLookup, pair[0], unsortedFolder, file.date)
+      //   file.persisted = false
+      //   file.epoch = parseInt(file.epoch || pair[1].replace(/^\D+/, '')) || 0
+      //   dataset.epoch = Math.max(file.epoch, dataset.epoch || 0)
+      //   // here check if the file exists in dataset, if so just check that it's persisted
+      //   const found = dataset.output.some(file_id => {
+      //     // if (f.name === 
+      //     if (fileLookup[file_id].name === file.name) {
+      //       fileLookup[file_id].persisted = true
+      //       return true
+      //     }
+      //     return false
+      //   })
+      //   if (! found) {
+      //     dataset.output.push(file.uuid)
+      //   }
+      // })
+
+      dispatch({
+        type: _types2.default.dataset.load,
+        data: {
+          module: module,
+          folderLookup: folderLookup,
+          fileLookup: fileLookup,
+          datasetLookup: datasetLookup,
+          folders: folders, files: files,
+          sequences: sequenceDirectories,
+          datasets: datasets,
+          checkpoints: checkpointDirectories,
+          resultsFolder: resultsFolder
+        }
+      });
+      if (id) {
+        console.log('folder id', id);
+        dispatch({
+          type: _types2.default.dataset.set_folder,
+          data: {
+            folder_id: id,
+            module: module
+          }
+        });
+      }
+    }).catch(function (e) {
+      console.error(e);
+    });
+    if (id) {
+      console.log('folder id', id);
+      dispatch({
+        type: _types2.default.dataset.set_folder,
+        data: {
+          folder_id: id,
+          module: module
+        }
+      });
+    }
+  };
+};
+
+var load_results = exports.load_results = function load_results(id) {
+  return function (dispatch) {
+    var module = _pix2pixhd2.default.name;
+    _util2.default.allProgress([_actions2.default.folder.index({ name: 'results' }), _actions2.default.file.index({ module: module, generated: 1 }), _actions2.default.socket.list_sequences({ module: module, dir: 'results' }), _actions2.default.socket.list_directory({ module: module, dir: 'renders' })], function (percent, i, n) {
+      console.log('pix2pixhd load progress', i, n);
+      dispatch({
+        type: _types2.default.app.load_progress,
+        progress: { i: i, n: n },
+        data: { module: 'pix2pixhd' }
+      });
+    }).then(function (res) {
+      var _res2 = _slicedToArray(res, 4),
+          folders = _res2[0],
+          files = _res2[1],
+          results = _res2[2],
+          renders = _res2[3]; //, datasets, results, output, datasetUsage, lossReport] = res
+
+
+      console.log(files, results, renders);
+      dispatch({
+        type: _types2.default.pix2pixhd.load_results,
+        results: {
+          resultsFolder: folders[0],
+          files: files,
+          results: results,
+          renders: renders
+        }
+      });
+    });
+  };
+};
+
+var G_NET_REGEXP = new RegExp('_net_G.pth$');
+
+var list_epochs = exports.list_epochs = function list_epochs(checkpoint_name) {
+  return function (dispatch) {
+    var module = _pix2pixhd2.default.name;
+    _actions2.default.socket.list_directory({ module: module, dir: 'checkpoints/' + checkpoint_name }).then(function (files) {
+      // console.log(files)
+      var epochs = files.map(function (f) {
+        if (!f.name.match(G_NET_REGEXP)) return null;
+        return f.name.replace(G_NET_REGEXP, '');
+      }).filter(function (f) {
+        return !!f;
+      });
+      // console.log(epochs)
+      dispatch({
+        type: _types2.default.dataset.list_epochs,
+        data: {
+          epochs: epochs,
+          module: module
+        }
+      });
+    });
+  };
+};
+
+var count_dataset = exports.count_dataset = function count_dataset(checkpoint_name) {
+  return function (dispatch) {
+    var module = _pix2pixhd2.default.name;
+    _util2.default.allProgress([_actions2.default.socket.count_directory({ module: module, dir: 'sequences/' + checkpoint_name + '/' }), _actions2.default.socket.count_directory({ module: module, dir: 'datasets/' + checkpoint_name + '/train_A/' })], function (percent, i, n) {
+      console.log('pix2pixhd load progress', i, n);
+      dispatch({
+        type: _types2.default.app.load_progress,
+        progress: { i: i, n: n },
+        data: { module: 'pix2pixhd' }
+      });
+    }).then(function (res) {
+      var _res3 = _slicedToArray(res, 2),
+          sequenceCount = _res3[0],
+          datasetCount = _res3[1]; //, datasets, results, output, datasetUsage, lossReport] = res
+
+
+      console.log(sequenceCount, datasetCount);
+      dispatch({
+        type: _types2.default.pix2pixhd.load_dataset_count,
+        data: {
+          name: checkpoint_name,
+          sequenceCount: sequenceCount,
+          datasetCount: datasetCount
+        }
+      });
+    });
+  };
+};
+
+/***/ }),
+
+/***/ "./app/client/modules/pix2pixhd/pix2pixhd.module.js":
+/*!**********************************************************!*\
+  !*** ./app/client/modules/pix2pixhd/pix2pixhd.module.js ***!
+  \**********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+var pix2pixhdModule = {
+  name: 'pix2pixhd',
+  displayName: 'Pix2PixHD',
+  datatype: 'video'
+};
+
+exports.default = pix2pixhdModule;
+
+/***/ }),
+
+/***/ "./app/client/modules/pix2pixhd/pix2pixhd.reducer.js":
+/*!***********************************************************!*\
+  !*** ./app/client/modules/pix2pixhd/pix2pixhd.reducer.js ***!
+  \***********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _types = __webpack_require__(/*! ../../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _dataset = __webpack_require__(/*! ../../dataset/dataset.reducer */ "./app/client/dataset/dataset.reducer.js");
+
+var _dataset2 = _interopRequireDefault(_dataset);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var pix2pixhdInitialState = {
+  loading: true,
+  progress: { i: 0, n: 0 },
+  error: null,
+  folder_id: 0,
+  data: null,
+  results: null,
+  checkpoint: {
+    name: '',
+    sequenceCount: 0,
+    datasetCount: 0
+  }
+};
+
+var pix2pixhdReducer = function pix2pixhdReducer() {
+  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : pix2pixhdInitialState;
+  var action = arguments[1];
+
+  if (action.data && action.data.module === 'pix2pixhd') {
+    state = (0, _dataset2.default)(state, action);
+  }
+
+  switch (action.type) {
+    case _types2.default.pix2pixhd.load_results:
+      return _extends({}, state, {
+        results: action.results
+      });
+    case _types2.default.pix2pixhd.load_dataset_count:
+      return _extends({}, state, {
+        checkpoint: action.data
+      });
+    case _types2.default.file.destroy:
+      console.log('file destroy', state.results);
+      return _extends({}, state, {
+        results: _extends({}, state.results, {
+          files: state.results.files.filter(function (f) {
+            return f.id !== action.data.id;
+          })
+        })
+      });
+    default:
+      return state;
+  }
+};
+
+exports.default = pix2pixhdReducer;
+
+/***/ }),
+
+/***/ "./app/client/modules/pix2pixhd/pix2pixhd.tasks.js":
+/*!*********************************************************!*\
+  !*** ./app/client/modules/pix2pixhd/pix2pixhd.tasks.js ***!
+  \*********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.clear_recursive_task = exports.augment_task = exports.live_task = exports.train_task = exports.fetch_task = undefined;
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _v = __webpack_require__(/*! uuid/v1 */ "./node_modules/uuid/v1.js");
+
+var _v2 = _interopRequireDefault(_v);
+
+var _socket = __webpack_require__(/*! ../../socket */ "./app/client/socket/index.js");
+
+var _socket2 = _interopRequireDefault(_socket);
+
+var _types = __webpack_require__(/*! ../../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _actions = __webpack_require__(/*! ../../actions */ "./app/client/actions.js");
+
+var _actions2 = _interopRequireDefault(_actions);
+
+var _pix2pixhd = __webpack_require__(/*! ./pix2pixhd.module */ "./app/client/modules/pix2pixhd/pix2pixhd.module.js");
+
+var _pix2pixhd2 = _interopRequireDefault(_pix2pixhd);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var fetch_task = exports.fetch_task = function fetch_task(url, file_id, dataset) {
+  return function (dispatch) {
+    if (!url) return console.log('input file inaccessible (no url)');
+    var task = {
+      module: _pix2pixhd2.default.name,
+      activity: 'fetch',
+      dataset: dataset,
+      opt: {
+        url: url,
+        file_id: file_id,
+        dataset: dataset
+      }
+    };
+    return _actions2.default.queue.add_task(task);
+  };
+};
+
+var train_task = exports.train_task = function train_task(dataset, folder_id) {
+  var epochs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
+  return function (dispatch) {
+    var task = {
+      module: _pix2pixhd2.default.name,
+      activity: 'train',
+      dataset: dataset.name || dataset,
+      epoch: 0,
+      epochs: epochs,
+      opt: {
+        folder_id: folder_id
+      }
+    };
+    if (!task.dataset) {
+      console.error("train task: no dataset specified");
+      return;
+    }
+    console.log(task);
+    return _actions2.default.queue.add_task(task);
+  };
+};
+
+var live_task = exports.live_task = function live_task(sequence, checkpoint, opt) {
+  return function (dispatch) {
+    var task = {
+      module: _pix2pixhd2.default.name,
+      activity: 'live',
+      dataset: sequence,
+      checkpoint: checkpoint,
+      opt: _extends({}, opt, {
+        poll_delay: 0.01
+      })
+    };
+    console.log(task);
+    console.log('add live task');
+    return _actions2.default.queue.add_task(task);
+  };
+};
+
+var augment_task = exports.augment_task = function augment_task(dataset, opt) {
+  return function (dispatch) {
+    var task = {
+      module: _pix2pixhd2.default.name,
+      activity: 'augment',
+      dataset: dataset,
+      folder_id: opt.folder_id,
+      opt: _extends({}, opt)
+    };
+    console.log(task);
+    console.log('add augment task');
+    return _actions2.default.queue.add_task(task);
+  };
+};
+
+var clear_recursive_task = exports.clear_recursive_task = function clear_recursive_task(dataset) {
+  return function (dispatch) {
+    var task = {
+      module: _pix2pixhd2.default.name,
+      activity: 'clear_recursive',
+      dataset: dataset
+    };
+    console.log(task);
+    console.log('add clear recursive task');
+    return _actions2.default.queue.add_task(task);
+  };
+};
+
+/***/ }),
+
+/***/ "./app/client/modules/pix2pixhd/views/pix2pixhd.live.js":
+/*!**************************************************************!*\
+  !*** ./app/client/modules/pix2pixhd/views/pix2pixhd.live.js ***!
+  \**************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _common = __webpack_require__(/*! ../../../common/ */ "./app/client/common/index.js");
+
+var _player = __webpack_require__(/*! ../../../live/player */ "./app/client/live/player.js");
+
+var _live = __webpack_require__(/*! ../../../live/live.actions */ "./app/client/live/live.actions.js");
+
+var liveActions = _interopRequireWildcard(_live);
+
+var _queue = __webpack_require__(/*! ../../../queue/queue.actions */ "./app/client/queue/queue.actions.js");
+
+var queueActions = _interopRequireWildcard(_queue);
+
+var _pix2pixhd = __webpack_require__(/*! ../pix2pixhd.tasks */ "./app/client/modules/pix2pixhd/pix2pixhd.tasks.js");
+
+var pix2pixhdTasks = _interopRequireWildcard(_pix2pixhd);
+
+var _pix2pixhd2 = __webpack_require__(/*! ../pix2pixhd.actions */ "./app/client/modules/pix2pixhd/pix2pixhd.actions.js");
+
+var pix2pixhdActions = _interopRequireWildcard(_pix2pixhd2);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var Pix2PixHDLive = function (_Component) {
+  _inherits(Pix2PixHDLive, _Component);
+
+  function Pix2PixHDLive(props) {
+    _classCallCheck(this, Pix2PixHDLive);
+
+    // if (! props.pix2pixhd || ! props.pix2pixhd.data) {
+    var _this = _possibleConstructorReturn(this, (Pix2PixHDLive.__proto__ || Object.getPrototypeOf(Pix2PixHDLive)).call(this));
+
+    props.actions.pix2pixhd.load_directories();
+    // }
+    props.actions.live.get_params();
+    // props.actions.live.list_checkpoints('pix2pixhd')
+    // props.actions.live.list_sequences('pix2pixhd')
+    _this.changeCheckpoint = _this.changeCheckpoint.bind(_this);
+    _this.changeEpoch = _this.changeEpoch.bind(_this);
+    _this.changeSequence = _this.changeSequence.bind(_this);
+    _this.seek = _this.seek.bind(_this);
+    _this.togglePlaying = _this.togglePlaying.bind(_this);
+    _this.toggleRecording = _this.toggleRecording.bind(_this);
+    _this.handleKeydown = _this.handleKeydown.bind(_this);
+    return _this;
+  }
+
+  _createClass(Pix2PixHDLive, [{
+    key: 'componentWillMount',
+    value: function componentWillMount() {
+      document.addEventListener('keydown', this.handleKeydown);
+    }
+  }, {
+    key: 'componentWillUnmount',
+    value: function componentWillUnmount() {
+      document.removeEventListener('keydown', this.handleKeydown);
+    }
+  }, {
+    key: 'componentWillUpdate',
+    value: function componentWillUpdate(nextProps) {
+      if (nextProps.opt.checkpoint_name && nextProps.opt.checkpoint_name !== this.props.opt.checkpoint_name) {
+        console.log('listing epochs');
+        this.props.actions.live.list_epochs('pix2pixhd', nextProps.opt.checkpoint_name);
+      }
+    }
+  }, {
+    key: 'handleKeydown',
+    value: function handleKeydown(e) {
+      console.log(e.keyCode);
+      if (e.altKey || e.ctrlKey || e.metaKey) return;
+      switch (e.keyCode) {
+        case 27:
+          // esc
+          e.preventDefault();
+          this.props.actions.live.set_fullscreen(!this.props.fullscreen);
+          break;
+        default:
+          break;
+      }
+    }
+  }, {
+    key: 'changeCheckpoint',
+    value: function changeCheckpoint(field, checkpoint_name) {
+      this.props.actions.live.load_epoch(checkpoint_name, 'latest');
+    }
+  }, {
+    key: 'changeEpoch',
+    value: function changeEpoch(field, epoch_name) {
+      this.props.actions.live.load_epoch(this.props.opt.checkpoint_name, epoch_name);
+    }
+  }, {
+    key: 'changeSequence',
+    value: function changeSequence(field, sequence) {
+      console.log('load sequence', sequence);
+      this.props.actions.live.load_sequence(sequence);
+    }
+  }, {
+    key: 'seek',
+    value: function seek(percentage) {
+      var frame = Math.floor(percentage * (parseInt(this.props.frame.sequence_len) || 1) + 1);
+      console.log("seek to frame", percentage, frame);
+      this.props.actions.live.seek(frame);
+    }
+  }, {
+    key: 'start',
+    value: function start() {
+      console.log(this.props.opt);
+      var sequence = this.props.opt.sequence_name || this.props.pix2pixhd.data.sequences[0].name;
+      var checkpoint = this.props.opt.checkpoint_name || this.props.pix2pixhd.data.checkpoints[0].name;
+      console.log('starting up!', sequence, checkpoint);
+      this.props.actions.tasks.live_task(sequence, checkpoint, {
+        folder_id: this.props.pix2pixhd.data.resultsFolder.id
+      });
+    }
+  }, {
+    key: 'interrupt',
+    value: function interrupt() {
+      this.props.actions.queue.stop_task('gpu');
+    }
+  }, {
+    key: 'togglePlaying',
+    value: function togglePlaying() {
+      if (this.props.opt.processing) {
+        this.props.actions.live.pause();
+      } else {
+        this.props.actions.live.play();
+      }
+    }
+  }, {
+    key: 'toggleRecording',
+    value: function toggleRecording() {
+      if (this.props.opt.recording) {
+        (0, _player.stopRecording)();
+        this.props.actions.live.pause();
+      } else {
+        (0, _player.startRecording)();
+      }
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      var _this2 = this;
+
+      // console.log(this.props)
+      if (this.props.pix2pixhd.loading) {
+        return (0, _preact.h)(_common.Loading, { progress: this.props.pix2pixhd.progress });
+      }
+      var _props$pix2pixhd$data = this.props.pix2pixhd.data,
+          folderLookup = _props$pix2pixhd$data.folderLookup,
+          datasetLookup = _props$pix2pixhd$data.datasetLookup,
+          sequences = _props$pix2pixhd$data.sequences;
+
+
+      var sequenceLookup = sequences.reduce(function (a, b) {
+        a[b.name] = true;
+        return a;
+      }, {});
+
+      var sequenceGroups = Object.keys(folderLookup).map(function (id) {
+        var folder = _this2.props.pix2pixhd.data.folderLookup[id];
+        if (folder.name === 'results') return;
+        var datasets = folder.datasets.map(function (name) {
+          var sequence = sequenceLookup[name];
+          if (sequence) {
+            return name;
+          }
+          return null;
+        }).filter(function (n) {
+          return !!n;
+        });
+        return {
+          name: folder.name,
+          options: datasets.sort()
+        };
+      }).filter(function (n) {
+        return !!n && !!n.options.length;
+      }).sort(function (a, b) {
+        return a.name.localeCompare(b.name);
+      });
+
+      var checkpointGroups = Object.keys(folderLookup).map(function (id) {
+        var folder = _this2.props.pix2pixhd.data.folderLookup[id];
+        if (folder.name === 'results') return;
+        var datasets = folder.datasets.map(function (name) {
+          var dataset = datasetLookup[name];
+          if (dataset.checkpoints.length) {
+            return name;
+          }
+          return null;
+        }).filter(function (n) {
+          return !!n;
+        });
+        return {
+          name: folder.name,
+          options: datasets.sort()
+        };
+      }).filter(function (n) {
+        return !!n && !!n.options.length;
+      }).sort(function (a, b) {
+        return a.name.localeCompare(b.name);
+      });
+
+      return (0, _preact.h)(
+        'div',
+        { className: 'app live centered' },
+        (0, _preact.h)(_common.Player, { width: 424, height: 256, fullscreen: this.props.fullscreen }),
+        (0, _preact.h)(
+          'div',
+          { className: 'params row' },
+          (0, _preact.h)(
+            'div',
+            { className: 'column' },
+            (0, _preact.h)(
+              _common.ParamGroup,
+              {
+                title: 'Network',
+                noToggle: true
+              },
+              (0, _preact.h)(_common.Select, { live: true,
+                name: 'send_image',
+                title: 'view mode',
+                options: ['a', 'b', 'sequence', 'recursive'],
+                onChange: this.props.actions.live.set_param
+              }),
+              (0, _preact.h)(_common.SelectGroup, { live: true,
+                name: 'sequence_name',
+                title: 'sequence',
+                options: sequenceGroups,
+                onChange: this.changeSequence
+              }),
+              (0, _preact.h)(_common.SelectGroup, { live: true,
+                name: 'checkpoint_name',
+                title: 'checkpoint',
+                options: checkpointGroups,
+                onChange: this.changeCheckpoint
+              }),
+              (0, _preact.h)(_common.Select, { live: true,
+                name: 'epoch',
+                title: 'epoch',
+                options: this.props.epochs,
+                onChange: this.changeEpoch
+              })
+            ),
+            (0, _preact.h)(
+              'div',
+              null,
+              (0, _preact.h)(
+                _common.ParamGroup,
+                {
+                  title: 'Playback',
+                  name: 'sequence_playing'
+                },
+                (0, _preact.h)(_common.Slider, {
+                  name: 'position',
+                  min: 0.0, max: 1.0, type: 'float',
+                  value: (this.props.frame.sequence_i || 0) / (this.props.frame.sequence_len || 1),
+                  onChange: this.seek
+                }),
+                (0, _preact.h)(_common.Slider, { live: true,
+                  title: 'playback rate',
+                  name: 'sequence_step',
+                  min: -4.0, max: 4.0, type: 'float'
+                }),
+                (0, _preact.h)(_common.Slider, { live: true,
+                  title: 'skip frames',
+                  name: 'sequence_skip',
+                  min: 0, max: 1000, type: 'int'
+                }),
+                (0, _preact.h)(_common.Slider, { live: true,
+                  title: 'fade sequence',
+                  name: 'fade_sequence',
+                  min: 0, max: 4.0, type: 'float'
+                }),
+                (0, _preact.h)(_common.Slider, { live: true,
+                  name: 'frame_delay',
+                  min: 0.0, max: 2.0, type: 'float'
+                })
+              )
+            ),
+            (0, _preact.h)(
+              _common.Group,
+              null,
+              this.renderRestartButton(),
+              this.renderLiveButtons(),
+              this.renderRecordButton(),
+              (0, _preact.h)(
+                'p',
+                { 'class': 'last_message' },
+                this.props.last_message
+              )
+            )
+          ),
+          (0, _preact.h)(
+            'div',
+            { className: 'column' },
+            (0, _preact.h)(
+              _common.ParamGroup,
+              {
+                title: 'Transition',
+                name: 'transition'
+              },
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'transition_period',
+                min: 10, max: 5000, type: 'int'
+              }),
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'transition_min',
+                min: 0.001, max: 0.2, type: 'float'
+              }),
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'transition_max',
+                min: 0.1, max: 1.0, type: 'float'
+              })
+            ),
+            (0, _preact.h)(
+              _common.ParamGroup,
+              {
+                title: 'Recursion',
+                name: 'recursive'
+              },
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'recursive_frac',
+                min: 0.0, max: 0.5, type: 'float'
+              }),
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'recurse_roll',
+                min: -64, max: 64, type: 'int'
+              }),
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'recurse_roll_axis',
+                min: 0, max: 1, type: 'int'
+              })
+            ),
+            (0, _preact.h)(
+              _common.ParamGroup,
+              {
+                title: 'Sequence',
+                name: 'sequence'
+              },
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'sequence_frac',
+                min: 0.0, max: 1.0, type: 'float'
+              }),
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'process_frac',
+                min: 0, max: 1, type: 'float'
+              })
+            ),
+            (0, _preact.h)(
+              _common.ParamGroup,
+              {
+                title: 'Transform',
+                name: 'transform'
+              },
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'rotate',
+                min: -1, max: 1, type: 'float'
+              }),
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'scale',
+                min: 0.9, max: 1.1, type: 'float'
+              })
+            )
+          ),
+          (0, _preact.h)(
+            'div',
+            { className: 'column' },
+            (0, _preact.h)(
+              _common.ParamGroup,
+              {
+                title: 'Clahe',
+                name: 'clahe'
+              },
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'clip_limit',
+                min: 1.0, max: 4.0, type: 'float'
+              })
+            ),
+            (0, _preact.h)(
+              _common.ParamGroup,
+              {
+                title: 'Posterize',
+                name: 'posterize'
+              },
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'spatial_window',
+                min: 2, max: 128, type: 'int'
+              }),
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'color_window',
+                min: 2, max: 128, type: 'int'
+              })
+            ),
+            (0, _preact.h)(
+              _common.ParamGroup,
+              {
+                title: 'Blur',
+                name: 'blur'
+              },
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'blur_radius',
+                min: 3, max: 7, type: 'odd'
+              }),
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'blur_sigma',
+                min: 0, max: 2, type: 'float'
+              })
+            ),
+            (0, _preact.h)(
+              _common.ParamGroup,
+              {
+                title: 'Canny Edge Detection',
+                name: 'canny'
+              },
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'canny_lo',
+                min: 10, max: 200, type: 'int'
+              }),
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'canny_hi',
+                min: 10, max: 200, type: 'int'
+              })
+            ),
+            (0, _preact.h)(
+              _common.ParamGroup,
+              {
+                title: 'Hue / Saturation',
+                name: 'hsl'
+              },
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'hue',
+                min: -127, max: 127, type: 'int'
+              }),
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'saturation',
+                min: -255, max: 255, type: 'int'
+              }),
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'luminosity',
+                min: -255, max: 255, type: 'int'
+              })
+            )
+          )
+        )
+      );
+    }
+  }, {
+    key: 'renderRestartButton',
+    value: function renderRestartButton() {
+      var _this3 = this;
+
+      // console.log(this.props.runner.gpu)
+      if (this.props.runner.gpu.status === 'IDLE') {
+        return (0, _preact.h)(
+          _common.Button,
+          {
+            title: 'GPU Idle',
+            onClick: function onClick() {
+              return _this3.start();
+            }
+          },
+          'Start'
+        );
+      }
+      if (this.props.runner.gpu.task.module !== 'pix2pixhd') {
+        return (0, _preact.h)(
+          _common.Button,
+          {
+            title: 'GPU Busy',
+            onClick: function onClick() {
+              return _this3.interrupt();
+            }
+          },
+          'Interrupt'
+        );
+      }
+      if (!this.props.opt.processing) {
+        return (0, _preact.h)(
+          'div',
+          null,
+          (0, _preact.h)(
+            _common.Button,
+            {
+              title: 'Not processing',
+              onClick: this.togglePlaying
+            },
+            'Restart'
+          ),
+          (0, _preact.h)(
+            _common.Button,
+            {
+              title: 'GPU Busy',
+              onClick: function onClick() {
+                return _this3.interrupt();
+              }
+            },
+            'Interrupt'
+          )
+        );
+      }
+      return (0, _preact.h)(
+        'div',
+        null,
+        (0, _preact.h)(
+          _common.Button,
+          {
+            title: 'Processing',
+            onClick: this.togglePlaying
+          },
+          'Stop'
+        ),
+        (0, _preact.h)(
+          _common.Button,
+          {
+            title: 'GPU Busy',
+            onClick: function onClick() {
+              return _this3.interrupt();
+            }
+          },
+          'Interrupt'
+        )
+      );
+    }
+  }, {
+    key: 'renderRecordButton',
+    value: function renderRecordButton() {
+      return null;
+      // return (
+      //   <Button
+      //     title={
+      //       this.props.opt.savingVideo
+      //       ? 'Saving video...'
+      //       : this.props.opt.recording
+      //       ? 'Recording (' + timeInSeconds(this.props.opt.recordFrames/25) +')'
+      //       : 'Record video'
+      //     }
+      //     onClick={this.toggleRecording}
+      //   >
+      //     {this.props.opt.savingVideo ? 'Saving' : this.props.opt.recording ? 'Recording' : 'Record'}
+      //   </Button>
+      // )
+    }
+  }, {
+    key: 'renderLiveButtons',
+    value: function renderLiveButtons() {
+      var _this4 = this;
+
+      return (0, _preact.h)(
+        'div',
+        null,
+        (0, _preact.h)(
+          _common.Button,
+          {
+            title: 'Save frame',
+            onClick: _player.saveFrame
+          },
+          'Save'
+        ),
+        (0, _preact.h)(
+          _common.ParamGroup,
+          {
+            title: 'Record video',
+            name: 'store_b',
+            noDim: true,
+            onToggle: function onToggle(value) {
+              // now storing frames on server...
+            }
+          },
+          (0, _preact.h)(_common.TextInput, {
+            title: 'Video name',
+            name: 'final_tag',
+            value: this.props.opt.final_tag,
+            onSave: function onSave(value) {
+              _this4.props.actions.live.set_param('final_tag', value);
+            }
+          })
+        )
+      );
+    }
+  }]);
+
+  return Pix2PixHDLive;
+}(_preact.Component);
+
+function timeInSeconds(n) {
+  return n.toFixed(1) + ' s.';
+}
+var mapStateToProps = function mapStateToProps(state) {
+  return {
+    last_message: state.live.last_message,
+    fullscreen: state.live.fullscreen,
+    opt: state.live.opt,
+    frame: state.live.frame,
+    checkpoints: state.live.checkpoints,
+    epochs: state.live.epochs,
+    sequences: state.live.sequences,
+    runner: state.system.runner,
+    pix2pixhd: state.module.pix2pixhd
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    actions: {
+      live: (0, _redux.bindActionCreators)(liveActions, dispatch),
+      queue: (0, _redux.bindActionCreators)(queueActions, dispatch),
+      pix2pixhd: (0, _redux.bindActionCreators)(pix2pixhdActions, dispatch),
+      tasks: (0, _redux.bindActionCreators)(pix2pixhdTasks, dispatch), s: s
+    }
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2PixHDLive);
+
+/***/ }),
+
+/***/ "./app/client/modules/pix2pixhd/views/pix2pixhd.new.js":
+/*!*************************************************************!*\
+  !*** ./app/client/modules/pix2pixhd/views/pix2pixhd.new.js ***!
+  \*************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _reactRouterDom = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
+
+var _util = __webpack_require__(/*! ../../../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _common = __webpack_require__(/*! ../../../common */ "./app/client/common/index.js");
+
+var _pix2pixhd = __webpack_require__(/*! ../pix2pixhd.actions */ "./app/client/modules/pix2pixhd/pix2pixhd.actions.js");
+
+var pix2pixhdActions = _interopRequireWildcard(_pix2pixhd);
+
+var _pix2pixhd2 = __webpack_require__(/*! ../pix2pixhd.module */ "./app/client/modules/pix2pixhd/pix2pixhd.module.js");
+
+var _pix2pixhd3 = _interopRequireDefault(_pix2pixhd2);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function Pix2PixHDNew(props) {
+  return (0, _preact.h)(_common.Views.New, {
+    db: props.pix2pixhd,
+    path: '/pix2pixhd/sequences/',
+    actions: props.actions,
+    module: _pix2pixhd3.default,
+    history: props.history
+  });
+}
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {
+    pix2pixhd: state.module.pix2pixhd
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    actions: (0, _redux.bindActionCreators)(pix2pixhdActions, dispatch)
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2PixHDNew);
+
+/***/ }),
+
+/***/ "./app/client/modules/pix2pixhd/views/pix2pixhd.results.js":
+/*!*****************************************************************!*\
+  !*** ./app/client/modules/pix2pixhd/views/pix2pixhd.results.js ***!
+  \*****************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRouterDom = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _util = __webpack_require__(/*! ../../../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _actions = __webpack_require__(/*! ../../../actions */ "./app/client/actions.js");
+
+var _actions2 = _interopRequireDefault(_actions);
+
+var _pix2pixhd = __webpack_require__(/*! ../pix2pixhd.actions */ "./app/client/modules/pix2pixhd/pix2pixhd.actions.js");
+
+var pix2pixhdActions = _interopRequireWildcard(_pix2pixhd);
+
+var _pix2pixhd2 = __webpack_require__(/*! ../pix2pixhd.tasks */ "./app/client/modules/pix2pixhd/pix2pixhd.tasks.js");
+
+var pix2pixhdTasks = _interopRequireWildcard(_pix2pixhd2);
+
+var _loading = __webpack_require__(/*! ../../../common/loading.component */ "./app/client/common/loading.component.js");
+
+var _loading2 = _interopRequireDefault(_loading);
+
+var _fileList = __webpack_require__(/*! ../../../common/fileList.component */ "./app/client/common/fileList.component.js");
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var yes_count = 0;
+
+var Pix2pixHDResults = function (_Component) {
+  _inherits(Pix2pixHDResults, _Component);
+
+  function Pix2pixHDResults(props) {
+    _classCallCheck(this, Pix2pixHDResults);
+
+    var _this = _possibleConstructorReturn(this, (Pix2pixHDResults.__proto__ || Object.getPrototypeOf(Pix2pixHDResults)).call(this));
+
+    if (!props.pix2pixhd.results) props.actions.load_results();
+    return _this;
+  }
+
+  _createClass(Pix2pixHDResults, [{
+    key: 'componentDidMount',
+    value: function componentDidMount() {
+      yes_count = 0;
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      var _this2 = this;
+
+      if (!this.props.pix2pixhd.results) return (0, _preact.h)(_loading2.default, { progress: this.props.pix2pixhd.progress });
+
+      var _props$pix2pixhd$resu = this.props.pix2pixhd.results,
+          resultsFolder = _props$pix2pixhd$resu.resultsFolder,
+          results = _props$pix2pixhd$resu.results,
+          renders = _props$pix2pixhd$resu.renders,
+          files = _props$pix2pixhd$resu.files;
+      // console.log(resultsFolder, results)
+
+      return (0, _preact.h)(
+        'div',
+        { className: 'app pix2pixhd' },
+        (0, _preact.h)(
+          'div',
+          { className: 'heading row middle' },
+          (0, _preact.h)(
+            'h1',
+            null,
+            'Pix2PixHD Results'
+          )
+        ),
+        (0, _preact.h)(
+          'div',
+          { 'class': 'rows params renders' },
+          (0, _preact.h)(_fileList.FileList, {
+            linkFiles: true,
+            files: files,
+            orderBy: 'date desc',
+            fields: 'name date size delete',
+            onDelete: function onDelete(file) {
+              var yes = void 0;
+              if (yes_count < 3) {
+                yes = confirm('Are you sure you want to delete this file?');
+              } else {
+                yes = true;
+              }
+              if (yes) {
+                yes_count += 1;
+                console.log('delete: confirmed');
+                _actions2.default.file.destroy(file);
+              }
+            }
+          }),
+          (0, _preact.h)('br', null),
+          (0, _preact.h)(
+            'h3',
+            null,
+            'renders on server'
+          ),
+          (0, _preact.h)(_fileList.FileList, {
+            files: renders,
+            orderBy: 'date desc',
+            fields: 'name date size',
+            onClick: function onClick(file, e) {
+              e.preventDefault();
+              e.stopPropagation();
+              console.log('picked a result', file);
+              _this2.handlePick(file);
+            }
+          }),
+          (0, _preact.h)('br', null),
+          (0, _preact.h)(
+            'h3',
+            null,
+            'folders on server'
+          ),
+          (0, _preact.h)(_fileList.FileList, {
+            files: results,
+            orderBy: 'date desc',
+            fields: 'name date count',
+            onClick: function onClick(file, e) {
+              e.preventDefault();
+              e.stopPropagation();
+              console.log('picked a result', file);
+              _this2.handlePick(file);
+            }
+          })
+        )
+      );
+    }
+  }, {
+    key: 'handlePick',
+    value: function handlePick(file) {
+      // this.props.audioPlayer.play(file)
+    }
+  }]);
+
+  return Pix2pixHDResults;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {
+    pix2pixhd: state.module.pix2pixhd
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    actions: (0, _redux.bindActionCreators)(pix2pixhdActions, dispatch),
+    remote: (0, _redux.bindActionCreators)(pix2pixhdTasks, dispatch)
+    // audioPlayer: bindActionCreators(audioPlayerActions, dispatch),
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2pixHDResults);
+
+/***/ }),
+
+/***/ "./app/client/modules/pix2pixhd/views/pix2pixhd.show.js":
+/*!**************************************************************!*\
+  !*** ./app/client/modules/pix2pixhd/views/pix2pixhd.show.js ***!
+  \**************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _util = __webpack_require__(/*! ../../../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _pix2pixhd = __webpack_require__(/*! ../pix2pixhd.actions */ "./app/client/modules/pix2pixhd/pix2pixhd.actions.js");
+
+var pix2pixhdActions = _interopRequireWildcard(_pix2pixhd);
+
+var _pix2pixhd2 = __webpack_require__(/*! ../pix2pixhd.tasks */ "./app/client/modules/pix2pixhd/pix2pixhd.tasks.js");
+
+var pix2pixhdTasks = _interopRequireWildcard(_pix2pixhd2);
+
+var _common = __webpack_require__(/*! ../../../common */ "./app/client/common/index.js");
+
+var _dataset = __webpack_require__(/*! ../../../dataset/dataset.form */ "./app/client/dataset/dataset.form.js");
+
+var _dataset2 = _interopRequireDefault(_dataset);
+
+var _dataset3 = __webpack_require__(/*! ../../../dataset/dataset.new */ "./app/client/dataset/dataset.new.js");
+
+var _dataset4 = _interopRequireDefault(_dataset3);
+
+var _upload = __webpack_require__(/*! ../../../dataset/upload.status */ "./app/client/dataset/upload.status.js");
+
+var _upload2 = _interopRequireDefault(_upload);
+
+var _dataset5 = __webpack_require__(/*! ../../../dataset/dataset.component */ "./app/client/dataset/dataset.component.js");
+
+var _dataset6 = _interopRequireDefault(_dataset5);
+
+var _pix2pixhd3 = __webpack_require__(/*! ../pix2pixhd.module */ "./app/client/modules/pix2pixhd/pix2pixhd.module.js");
+
+var _pix2pixhd4 = _interopRequireDefault(_pix2pixhd3);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var Pix2PixHDShow = function (_Component) {
+  _inherits(Pix2PixHDShow, _Component);
+
+  function Pix2PixHDShow(props) {
+    _classCallCheck(this, Pix2PixHDShow);
+
+    var _this = _possibleConstructorReturn(this, (Pix2PixHDShow.__proto__ || Object.getPrototypeOf(Pix2PixHDShow)).call(this, props));
+
+    _this.datasetActions = _this.datasetActions.bind(_this);
+    return _this;
+  }
+
+  _createClass(Pix2PixHDShow, [{
+    key: 'componentWillMount',
+    value: function componentWillMount() {
+      var id = this.props.match.params.id || localStorage.getItem('pix2pixhd.last_id');
+      console.log('load dataset:', id);
+      var _props = this.props,
+          match = _props.match,
+          pix2pixhd = _props.pix2pixhd,
+          actions = _props.actions;
+
+      if (id === 'new') return;
+      if (id) {
+        if (parseInt(id)) localStorage.setItem('pix2pixhd.last_id', id);
+        if (!pix2pixhd.folder || pix2pixhd.folder.id !== id) {
+          actions.load_directories(id);
+        }
+      } else {
+        this.props.history.push('/pix2pixhd/new/');
+      }
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      var _props2 = this.props,
+          pix2pixhd = _props2.pix2pixhd,
+          match = _props2.match,
+          history = _props2.history;
+
+      var _ref = pix2pixhd.data || {},
+          folderLookup = _ref.folderLookup;
+
+      var folder = (folderLookup || {})[pix2pixhd.folder_id] || {};
+
+      return (0, _preact.h)(
+        'div',
+        { className: 'app pix2pixhd' },
+        (0, _preact.h)(
+          'div',
+          { 'class': 'heading' },
+          (0, _preact.h)(
+            'div',
+            { 'class': 'spaced' },
+            (0, _preact.h)(
+              'h1',
+              null,
+              folder ? folder.name : (0, _preact.h)(_common.Loading, null)
+            ),
+            (0, _preact.h)(_upload2.default, null)
+          )
+        ),
+        (0, _preact.h)(
+          'div',
+          { className: 'row' },
+          folder && folder.name && folder.name !== 'unsorted' && (0, _preact.h)(_dataset2.default, {
+            title: 'Add Files',
+            module: _pix2pixhd4.default,
+            folder: folder,
+            canUpload: true, canAddURL: true
+          }),
+          (0, _preact.h)(
+            'div',
+            null,
+            (0, _preact.h)(_upload2.default, null),
+            (0, _preact.h)(_common.CurrentTask, null)
+          )
+        ),
+        (0, _preact.h)(_dataset6.default, {
+          loading: pix2pixhd.loading,
+          progress: pix2pixhd.progress,
+          id: pix2pixhd.folder_id,
+          module: _pix2pixhd4.default,
+          data: pix2pixhd.data,
+          folder: folder,
+          history: history,
+          onPickFile: function onPickFile(file, e) {
+            e.preventDefault();
+            e.stopPropagation();
+            console.log('picked a file', file);
+          },
+          datasetActions: this.datasetActions
+        })
+      );
+    }
+  }, {
+    key: 'datasetActions',
+    value: function datasetActions(dataset) {
+      var isFetching = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+      var isProcessing = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+      var _props3 = this.props,
+          pix2pixhd = _props3.pix2pixhd,
+          remote = _props3.remote;
+
+      var input = pix2pixhd.data.fileLookup[dataset.input[0]];
+      if (!input) return null;
+      if (input.name && input.name.match(/(gif|jpe?g|png)$/i)) return null;
+      return (0, _preact.h)(
+        'div',
+        null,
+        (0, _preact.h)(
+          'div',
+          { 'class': 'actions' },
+          (0, _preact.h)(
+            'span',
+            { 'class': 'link', onClick: function onClick() {
+                return remote.train_task(dataset, pix2pixhd.folder_id, 1);
+              } },
+            'train'
+          ),
+          (0, _preact.h)(
+            'span',
+            { 'class': 'link', onClick: function onClick() {
+                return remote.train_task(dataset, pix2pixhd.folder_id, 5);
+              } },
+            '5x'
+          ),
+          (0, _preact.h)(
+            'span',
+            { 'class': 'link', onClick: function onClick() {
+                return remote.train_task(dataset, pix2pixhd.folder_id, 10);
+              } },
+            '10x'
+          ),
+          (0, _preact.h)(
+            'span',
+            { 'class': 'link', onClick: function onClick() {
+                return remote.train_task(dataset, pix2pixhd.folder_id, 20);
+              } },
+            '20x'
+          ),
+          (0, _preact.h)(
+            'span',
+            { 'class': 'link', onClick: function onClick() {
+                return remote.train_task(dataset, pix2pixhd.folder_id, 50);
+              } },
+            '50x'
+          )
+        ),
+        dataset.isBuilt ? (0, _preact.h)(
+          'div',
+          { 'class': 'subtext' },
+          'fetched ',
+          (0, _preact.h)(
+            'span',
+            { 'class': 'link', onClick: function onClick() {
+                return remote.clear_cache_task(dataset);
+              } },
+            'rm'
+          )
+        ) : isFetching ? (0, _preact.h)(
+          'div',
+          { 'class': 'subtext' },
+          'fetching'
+        ) : (0, _preact.h)(
+          'div',
+          { 'class': 'subtext' },
+          (0, _preact.h)(
+            'span',
+            { 'class': 'link', onClick: function onClick() {
+                return remote.fetch_task(input.url, input.id, dataset.name);
+              } },
+            'fetch'
+          )
+        )
+      );
+    }
+  }]);
+
+  return Pix2PixHDShow;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {
+    pix2pixhd: state.module.pix2pixhd
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    actions: (0, _redux.bindActionCreators)(pix2pixhdActions, dispatch),
+    remote: (0, _redux.bindActionCreators)(pix2pixhdTasks, dispatch)
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2PixHDShow);
+
+/***/ }),
+
+/***/ "./app/client/modules/pix2pixhd/views/pix2pixhd.train.js":
+/*!***************************************************************!*\
+  !*** ./app/client/modules/pix2pixhd/views/pix2pixhd.train.js ***!
+  \***************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _util = __webpack_require__(/*! ../../../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _pix2pixhd = __webpack_require__(/*! ../pix2pixhd.actions */ "./app/client/modules/pix2pixhd/pix2pixhd.actions.js");
+
+var pix2pixhdActions = _interopRequireWildcard(_pix2pixhd);
+
+var _pix2pixhd2 = __webpack_require__(/*! ../pix2pixhd.tasks */ "./app/client/modules/pix2pixhd/pix2pixhd.tasks.js");
+
+var pix2pixhdTasks = _interopRequireWildcard(_pix2pixhd2);
+
+var _common = __webpack_require__(/*! ../../../common */ "./app/client/common/index.js");
+
+var _dataset = __webpack_require__(/*! ../../../dataset/dataset.form */ "./app/client/dataset/dataset.form.js");
+
+var _dataset2 = _interopRequireDefault(_dataset);
+
+var _dataset3 = __webpack_require__(/*! ../../../dataset/dataset.new */ "./app/client/dataset/dataset.new.js");
+
+var _dataset4 = _interopRequireDefault(_dataset3);
+
+var _upload = __webpack_require__(/*! ../../../dataset/upload.status */ "./app/client/dataset/upload.status.js");
+
+var _upload2 = _interopRequireDefault(_upload);
+
+var _dataset5 = __webpack_require__(/*! ../../../dataset/dataset.component */ "./app/client/dataset/dataset.component.js");
+
+var _dataset6 = _interopRequireDefault(_dataset5);
+
+var _pix2pixhd3 = __webpack_require__(/*! ../pix2pixhd.module */ "./app/client/modules/pix2pixhd/pix2pixhd.module.js");
+
+var _pix2pixhd4 = _interopRequireDefault(_pix2pixhd3);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var Pix2PixHDTrain = function (_Component) {
+  _inherits(Pix2PixHDTrain, _Component);
+
+  function Pix2PixHDTrain(props) {
+    _classCallCheck(this, Pix2PixHDTrain);
+
+    var _this = _possibleConstructorReturn(this, (Pix2PixHDTrain.__proto__ || Object.getPrototypeOf(Pix2PixHDTrain)).call(this, props));
+
+    _this.handleChange = _this.handleChange.bind(_this);
+    _this.state = {
+      checkpoint_name: 'PLACEHOLDER',
+      epoch: 'latest',
+      augment_name: '',
+      augment_take: 100,
+      augment_make: 20
+    };
+    return _this;
+  }
+
+  _createClass(Pix2PixHDTrain, [{
+    key: 'componentWillMount',
+    value: function componentWillMount() {
+      var id = this.props.match.params.id || localStorage.getItem('pix2pixhd.last_id');
+      console.log('load dataset:', id);
+      var _props = this.props,
+          match = _props.match,
+          pix2pixhd = _props.pix2pixhd,
+          actions = _props.actions;
+
+      if (id === 'new') return;
+      if (id) {
+        if (parseInt(id)) localStorage.setItem('pix2pixhd.last_id', id);
+        if (!pix2pixhd.folder || pix2pixhd.folder.id !== id) {
+          actions.load_directories(id);
+        }
+      } else {
+        this.props.history.push('/pix2pixhd/new/');
+      }
+    }
+  }, {
+    key: 'componentDidUpdate',
+    value: function componentDidUpdate(prevProps, prevState) {
+      if (prevState.checkpoint_name !== this.state.checkpoint_name) {
+        this.setState({ epoch: 'latest' });
+        this.props.actions.list_epochs(this.state.checkpoint_name);
+        this.props.actions.count_dataset(this.state.checkpoint_name);
+      }
+    }
+  }, {
+    key: 'handleChange',
+    value: function handleChange(name, value) {
+      console.log('name', name, 'value', value);
+      this.setState(_defineProperty({}, name, value));
+    }
+  }, {
+    key: 'interrupt',
+    value: function interrupt() {
+      this.props.actions.queue.stop_task('gpu');
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      var _this2 = this;
+
+      if (this.props.pix2pixhd.loading) {
+        return (0, _preact.h)(_common.Loading, { progress: this.props.pix2pixhd.progress });
+      }
+      var _props2 = this.props,
+          pix2pixhd = _props2.pix2pixhd,
+          match = _props2.match,
+          history = _props2.history,
+          queue = _props2.queue;
+
+      var _ref = pix2pixhd.data || {},
+          folderLookup = _ref.folderLookup,
+          datasetLookup = _ref.datasetLookup;
+
+      var folder = (folderLookup || {})[pix2pixhd.folder_id] || {};
+      // console.log(pix2pixhd)
+
+      var checkpointGroups = Object.keys(folderLookup).map(function (id) {
+        var folder = _this2.props.pix2pixhd.data.folderLookup[id];
+        if (folder.name === 'results') return;
+        var datasets = folder.datasets.map(function (name) {
+          var dataset = datasetLookup[name];
+          if (dataset.checkpoints.length) {
+            return name;
+          }
+          return null;
+        }).filter(function (n) {
+          return !!n;
+        });
+        return {
+          name: folder.name,
+          options: datasets.sort()
+        };
+      }).filter(function (n) {
+        return !!n && !!n.options.length;
+      }).sort(function (a, b) {
+        return a.name.localeCompare(b.name);
+      });
+
+      // console.log('state', this.props.pix2pixhd.data.epochs)
+      // console.log(this.state.checkpoint_name, this.state.epoch)
+      // console.log(queue)
+      return (0, _preact.h)(
+        'div',
+        { className: 'app pix2pixhd' },
+        (0, _preact.h)(
+          'div',
+          { className: 'heading' },
+          (0, _preact.h)(
+            'h1',
+            null,
+            'pix2pixhd training'
+          )
+        ),
+        (0, _preact.h)(
+          'div',
+          { className: 'columns' },
+          (0, _preact.h)(
+            'div',
+            { className: 'column' },
+            (0, _preact.h)(
+              _common.Group,
+              { title: 'Dataset' },
+              (0, _preact.h)(_common.SelectGroup, {
+                name: 'checkpoint_name',
+                title: 'Dataset',
+                options: checkpointGroups,
+                onChange: this.handleChange,
+                placeholder: 'Pick a dataset',
+                value: this.state.checkpoint_name
+              }),
+              (0, _preact.h)(_common.Select, {
+                title: 'Epoch',
+                name: 'epoch',
+                options: this.props.pix2pixhd.data.epochs,
+                onChange: this.handleChange,
+                value: this.state.epoch
+              })
+            ),
+            (0, _preact.h)(
+              _common.Group,
+              { title: 'Augment' },
+              (0, _preact.h)(_common.NumberInput, {
+                name: 'augment_take',
+                title: 'Pick N random frames',
+                value: this.state.augment_take,
+                onChange: this.handleChange,
+                type: 'int',
+                min: '1',
+                max: '1000'
+              }),
+              (0, _preact.h)(_common.NumberInput, {
+                name: 'augment_make',
+                title: 'Generate N recursively',
+                value: this.state.augment_make,
+                onChange: this.handleChange,
+                type: 'int',
+                min: '1',
+                max: '1000'
+              }),
+              (0, _preact.h)(_common.Button, {
+                title: 'Augment dataset',
+                value: 'Augment',
+                onClick: function onClick() {
+                  return _this2.props.remote.augment_task(_this2.state.checkpoint_name, _this2.state);
+                }
+              }),
+              (0, _preact.h)(_common.Button, {
+                title: 'Make a movie without augmenting',
+                value: 'Generate',
+                onClick: function onClick() {
+                  _this2.props.remote.augment_task(_this2.state.checkpoint_name, _extends({}, _this2.state, {
+                    no_symlinks: true,
+                    mov: true,
+                    folder_id: _this2.props.pix2pixhd.data.resultsFolder.id
+                  }));
+                }
+              })
+            ),
+            (0, _preact.h)(
+              _common.Group,
+              { title: 'Augmentation Grid' },
+              (0, _preact.h)(_common.AugmentationGrid, {
+                checkpoint: this.props.pix2pixhd.checkpoint,
+                take: [1, 2, 3, 4, 5, 10, 15, 20, 25, 50, 75, 100, 200, 300, 400, 500, 1000],
+                make: [1, 2, 3, 4, 5, 10, 15, 20, 25, 50, 75, 100, 200],
+                onAugment: function onAugment(augment_take, augment_make) {
+                  _this2.props.remote.augment_task(_this2.state.checkpoint_name, _extends({}, _this2.state, {
+                    augment_take: augment_take,
+                    augment_make: augment_make
+                  }));
+                },
+                onTrain: function onTrain() {
+                  _this2.props.remote.train_task(_this2.state.checkpoint_name, pix2pixhd.folder_id, 1);
+                  setTimeout(function () {
+                    // auto-generate epoch demo
+                    _this2.props.remote.augment_task(_this2.state.checkpoint_name, _extends({}, _this2.state, {
+                      augment_take: 10,
+                      augment_make: 150,
+                      no_symlinks: true,
+                      mov: true,
+                      folder_id: _this2.props.pix2pixhd.data.resultsFolder.id
+                    }));
+                  }, 250);
+                }
+              })
+            ),
+            (0, _preact.h)(
+              _common.Group,
+              { title: 'Status' },
+              (0, _preact.h)(_common.Button, {
+                title: 'GPU',
+                value: this.props.runner.gpu.status === 'IDLE' ? "Idle" : "Interrupt",
+                onClick: function onClick() {
+                  return _this2.interrupt();
+                }
+              }),
+              (0, _preact.h)(_common.CurrentTask, null)
+            )
+          ),
+          (0, _preact.h)(
+            'div',
+            { className: 'column' },
+            (0, _preact.h)(
+              _common.Group,
+              { title: 'Upcoming Tasks' },
+              (0, _preact.h)(_common.TaskList, { tasks: queue.queue.map(function (id) {
+                  return queue.tasks[id];
+                }), sort: 'date asc' })
+            )
+          )
+        )
+      );
+    }
+  }]);
+
+  return Pix2PixHDTrain;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {
+    pix2pixhd: state.module.pix2pixhd,
+    runner: state.system.runner,
+    queue: state.queue
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    actions: (0, _redux.bindActionCreators)(pix2pixhdActions, dispatch),
+    remote: (0, _redux.bindActionCreators)(pix2pixhdTasks, dispatch)
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2PixHDTrain);
+
+/***/ }),
+
+/***/ "./app/client/modules/pix2wav/index.js":
+/*!*********************************************!*\
+  !*** ./app/client/modules/pix2wav/index.js ***!
+  \*********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _reactRouterDom = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
+
+var _actions = __webpack_require__(/*! ../../actions */ "./app/client/actions.js");
+
+var _actions2 = _interopRequireDefault(_actions);
+
+var _util = __webpack_require__(/*! ../../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _pix2wav = __webpack_require__(/*! ./views/pix2wav.new */ "./app/client/modules/pix2wav/views/pix2wav.new.js");
+
+var _pix2wav2 = _interopRequireDefault(_pix2wav);
+
+var _pix2wav3 = __webpack_require__(/*! ./views/pix2wav.show */ "./app/client/modules/pix2wav/views/pix2wav.show.js");
+
+var _pix2wav4 = _interopRequireDefault(_pix2wav3);
+
+var _pix2wav5 = __webpack_require__(/*! ./views/pix2wav.live */ "./app/client/modules/pix2wav/views/pix2wav.live.js");
+
+var _pix2wav6 = _interopRequireDefault(_pix2wav5);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var router = function () {
+  function router() {
+    _classCallCheck(this, router);
+  }
+
+  _createClass(router, [{
+    key: 'componentWillMount',
+    value: function componentWillMount() {
+      _actions2.default.system.changeTool('pix2wav');
+      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #bdf, #def)';
+    }
+  }, {
+    key: 'componentWillReceiveProps',
+    value: function componentWillReceiveProps() {
+      _actions2.default.system.changeTool('pix2wav');
+      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #bdf, #def)';
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      return (0, _preact.h)(
+        'section',
+        null,
+        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2wav/new/', component: _pix2wav2.default }),
+        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2wav/datasets/', component: _pix2wav4.default }),
+        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2wav/datasets/:id/', component: _pix2wav4.default }),
+        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2wav/live/', component: _pix2wav6.default })
+      );
+    }
+  }]);
+
+  return router;
+}();
+
+function links() {
+  return [{ url: '/pix2wav/new/', name: 'new' }, { url: '/pix2wav/datasets/', name: 'datasets' }, { url: '/pix2wav/live/', name: 'live' }];
+}
+
+exports.default = {
+  name: 'pix2wav',
+  router: router, links: links
+};
+
+/***/ }),
+
+/***/ "./app/client/modules/pix2wav/pix2wav.actions.js":
+/*!*******************************************************!*\
+  !*** ./app/client/modules/pix2wav/pix2wav.actions.js ***!
+  \*******************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.load_directories = undefined;
+
+var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
+
+var _v = __webpack_require__(/*! uuid/v1 */ "./node_modules/uuid/v1.js");
+
+var _v2 = _interopRequireDefault(_v);
+
+var _socket = __webpack_require__(/*! ../../socket */ "./app/client/socket/index.js");
+
+var _socket2 = _interopRequireDefault(_socket);
+
+var _types = __webpack_require__(/*! ../../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _dataset = __webpack_require__(/*! ../../dataset/dataset.loader */ "./app/client/dataset/dataset.loader.js");
+
+var datasetLoader = _interopRequireWildcard(_dataset);
+
+var _actions = __webpack_require__(/*! ../../actions */ "./app/client/actions.js");
+
+var _actions2 = _interopRequireDefault(_actions);
+
+var _util = __webpack_require__(/*! ../../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _pix2wav = __webpack_require__(/*! ./pix2wav.module */ "./app/client/modules/pix2wav/pix2wav.module.js");
+
+var _pix2wav2 = _interopRequireDefault(_pix2wav);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var load_directories = exports.load_directories = function load_directories(id) {
+  return function (dispatch) {
+    var module = _pix2wav2.default.name;
+    _util2.default.allProgress([datasetLoader.load(module), _actions2.default.socket.list_directory({ module: 'pix2pix', dir: 'sequences/pix2wav/' }), _actions2.default.socket.list_directory({ module: 'pix2pix', dir: 'datasets/pix2wav/' }), _actions2.default.socket.list_directory({ module: 'pix2pix', dir: 'checkpoints/pix2wav/' }), _actions2.default.socket.list_directory({ module: 'pix2pix', dir: 'checkpoints/pix2pix/' })], function (percent, i, n) {
+      console.log('progress', i, n);
+      dispatch({ type: _types2.default.app.load_progress, progress: { i: i, n: n } });
+    }).then(function (res) {
+      var _res = _slicedToArray(res, 5),
+          datasetApiReport = _res[0],
+          sequences = _res[1],
+          datasets = _res[2],
+          checkpoints = _res[3],
+          pix2pixCheckpoints = _res[4];
+
+      var folderLookup = datasetApiReport.folderLookup,
+          fileLookup = datasetApiReport.fileLookup,
+          datasetLookup = datasetApiReport.datasetLookup,
+          folders = datasetApiReport.folders,
+          files = datasetApiReport.files,
+          unsortedFolder = datasetApiReport.unsortedFolder;
+
+
+      var sequenceDirectories = sequences.filter(function (s) {
+        return s.dir;
+      });
+      sequenceDirectories.forEach(function (dir) {
+        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);
+        dataset.isBuilt = true;
+      });
+
+      datasets.filter(function (s) {
+        return s.dir;
+      }).forEach(function (dir) {
+        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);
+        dataset.hasDataset = true;
+      });
+
+      var checkpointDirectories = checkpoints.filter(function (s) {
+        return s.dir;
+      });
+      checkpointDirectories.forEach(function (dir) {
+        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);
+        dataset.hasCheckpoints = true;
+        dir.module = 'pix2wav';
+      });
+
+      var pix2pixCheckpointDirectories = pix2pixCheckpoints.filter(function (s) {
+        return s.dir;
+      });
+      pix2pixCheckpointDirectories.forEach(function (dir) {
+        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);
+        dataset.hasCheckpoints = true;
+        dir.module = 'pix2pix';
+      });
+
+      console.log(res);
+      console.log(checkpointDirectories);
+      console.log(pix2pixCheckpointDirectories);
+
+      dispatch({
+        type: _types2.default.dataset.load,
+        data: {
+          module: module,
+          folderLookup: folderLookup,
+          fileLookup: fileLookup,
+          datasetLookup: datasetLookup,
+          folders: folders, files: files,
+          sequences: sequenceDirectories,
+          datasets: datasets,
+          checkpoints: checkpointDirectories.concat(pix2pixCheckpointDirectories)
+        }
+      });
+    }).catch(function (e) {
+      console.error(e);
+    });
+    if (id) {
+      console.log('folder id', id);
+      dispatch({
+        type: _types2.default.dataset.set_folder,
+        data: {
+          folder_id: id,
+          module: module
+        }
+      });
+    }
+  };
+};
+
+/***/ }),
+
+/***/ "./app/client/modules/pix2wav/pix2wav.module.js":
+/*!******************************************************!*\
+  !*** ./app/client/modules/pix2wav/pix2wav.module.js ***!
+  \******************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+var pix2wavModule = {
+  name: 'pix2wav',
+  displayName: 'Pix2Wav',
+  datatype: 'spectrogram'
+};
+
+exports.default = pix2wavModule;
+
+/***/ }),
+
+/***/ "./app/client/modules/pix2wav/pix2wav.reducer.js":
+/*!*******************************************************!*\
+  !*** ./app/client/modules/pix2wav/pix2wav.reducer.js ***!
+  \*******************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _types = __webpack_require__(/*! ../../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _dataset = __webpack_require__(/*! ../../dataset/dataset.reducer */ "./app/client/dataset/dataset.reducer.js");
+
+var _dataset2 = _interopRequireDefault(_dataset);
+
+var _util = __webpack_require__(/*! ../../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var pix2wavInitialState = {
+  loading: true,
+  progress: { i: 0, n: 0 },
+  status: '',
+  error: null,
+  folder_id: 0,
+  data: null
+};
+
+var pix2wavReducer = function pix2wavReducer() {
+  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : pix2wavInitialState;
+  var action = arguments[1];
+
+  if (action.data && action.data.module === 'pix2wav') {
+    state = (0, _dataset2.default)(state, action);
+  }
+
+  switch (action.type) {
+    case _types2.default.wav2pix.load:
+      return _extends({}, state, {
+        status: 'Loaded buffer'
+      });
+    case _types2.default.wav2pix.progress:
+      return _extends({}, state, {
+        status: 'Rendering frame ' + action.count
+      });
+    case _types2.default.wav2pix.finish:
+      return _extends({}, state, {
+        status: action.message || 'Render complete'
+      });
+    case _types2.default.wav2pix.zip:
+      return _extends({}, state, {
+        status: 'Built zip file ' + _util2.default.hush_size(state.size)[1]
+      });
+    case _types2.default.wav2pix.uploading:
+      return _extends({}, state, {
+        status: 'Uploading zip file'
+      });
+    default:
+      return state;
+  }
+};
+
+exports.default = pix2wavReducer;
+
+/***/ }),
+
+/***/ "./app/client/modules/pix2wav/pix2wav.tasks.js":
+/*!*****************************************************!*\
+  !*** ./app/client/modules/pix2wav/pix2wav.tasks.js ***!
+  \*****************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.live_task = undefined;
+
+var _v = __webpack_require__(/*! uuid/v1 */ "./node_modules/uuid/v1.js");
+
+var _v2 = _interopRequireDefault(_v);
+
+var _socket = __webpack_require__(/*! ../../socket */ "./app/client/socket/index.js");
+
+var _socket2 = _interopRequireDefault(_socket);
+
+var _types = __webpack_require__(/*! ../../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _actions = __webpack_require__(/*! ../../actions */ "./app/client/actions.js");
+
+var _actions2 = _interopRequireDefault(_actions);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var live_task = exports.live_task = function live_task(sequence, checkpoint) {
+  return function (dispatch) {
+    var task = {
+      module: 'pix2wav',
+      activity: 'live',
+      dataset: sequence,
+      checkpoint: checkpoint,
+      opt: {
+        poll_delay: 0.2
+      }
+    };
+    console.log(task);
+    console.log('add live task');
+    return _actions2.default.queue.add_task(task);
+  };
+};
+
+/***/ }),
+
+/***/ "./app/client/modules/pix2wav/views/pix2wav.live.js":
+/*!**********************************************************!*\
+  !*** ./app/client/modules/pix2wav/views/pix2wav.live.js ***!
+  \**********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _common = __webpack_require__(/*! ../../../common/ */ "./app/client/common/index.js");
+
+var _player = __webpack_require__(/*! ../../../live/player */ "./app/client/live/player.js");
+
+var playerActions = _interopRequireWildcard(_player);
+
+var _live = __webpack_require__(/*! ../../../live/live.actions */ "./app/client/live/live.actions.js");
+
+var liveActions = _interopRequireWildcard(_live);
+
+var _queue = __webpack_require__(/*! ../../../queue/queue.actions */ "./app/client/queue/queue.actions.js");
+
+var queueActions = _interopRequireWildcard(_queue);
+
+var _pix2wav = __webpack_require__(/*! ../pix2wav.tasks */ "./app/client/modules/pix2wav/pix2wav.tasks.js");
+
+var pix2wavTasks = _interopRequireWildcard(_pix2wav);
+
+var _pix2wav2 = __webpack_require__(/*! ../pix2wav.actions */ "./app/client/modules/pix2wav/pix2wav.actions.js");
+
+var pix2wavActions = _interopRequireWildcard(_pix2wav2);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var Pix2WavLive = function (_Component) {
+  _inherits(Pix2WavLive, _Component);
+
+  function Pix2WavLive(props) {
+    _classCallCheck(this, Pix2WavLive);
+
+    var _this = _possibleConstructorReturn(this, (Pix2WavLive.__proto__ || Object.getPrototypeOf(Pix2WavLive)).call(this));
+
+    props.actions.pix2wav.load_directories();
+    props.actions.live.get_params();
+    _this.changeCheckpoint = _this.changeCheckpoint.bind(_this);
+    _this.changeEpoch = _this.changeEpoch.bind(_this);
+    _this.changeSequence = _this.changeSequence.bind(_this);
+    _this.seek = _this.seek.bind(_this);
+    _this.togglePlaying = _this.togglePlaying.bind(_this);
+    _this.toggleRecording = _this.toggleRecording.bind(_this);
+    return _this;
+  }
+
+  _createClass(Pix2WavLive, [{
+    key: 'componentWillUpdate',
+    value: function componentWillUpdate(nextProps) {
+      if (nextProps.opt.checkpoint_name && nextProps.opt.checkpoint_name !== this.props.opt.checkpoint_name) {
+        console.log('fetch checkpoint', nextProps.opt.checkpoint_name);
+        this.props.actions.live.list_epochs('pix2wav', nextProps.opt.checkpoint_name);
+      }
+    }
+  }, {
+    key: 'changeCheckpoint',
+    value: function changeCheckpoint(field, checkpoint_name) {
+      this.props.actions.live.load_epoch(checkpoint_name, 'latest');
+    }
+  }, {
+    key: 'changeEpoch',
+    value: function changeEpoch(field, epoch_name) {
+      this.props.actions.live.load_epoch(this.props.opt.checkpoint_name, epoch_name);
+    }
+  }, {
+    key: 'changeSequence',
+    value: function changeSequence(field, sequence) {
+      console.log('got sequence', sequence);
+      this.props.actions.live.load_sequence(sequence);
+    }
+  }, {
+    key: 'seek',
+    value: function seek(percentage) {
+      var frame = Math.floor(percentage * (parseInt(this.props.frame.sequence_len) || 1) + 1);
+      this.props.actions.live.seek(frame);
+    }
+  }, {
+    key: 'start',
+    value: function start() {
+      // console.log(this.props)
+      console.log(this.props.pix2wav.data);
+      var sequence = this.props.pix2wav.data.sequences[0].name || '';
+      var checkpoint = this.props.pix2wav.data.checkpoints[0].name || '';
+      console.log('starting up!', sequence, checkpoint);
+      this.props.actions.tasks.live_task(sequence, checkpoint);
+    }
+  }, {
+    key: 'interrupt',
+    value: function interrupt() {
+      this.props.actions.queue.stop_task('gpu');
+    }
+  }, {
+    key: 'exit',
+    value: function exit() {
+      this.props.actions.queue.stop_task('gpu', { sigkill: true });
+    }
+  }, {
+    key: 'togglePlaying',
+    value: function togglePlaying() {
+      if (this.props.opt.processing) {
+        this.props.actions.live.pause();
+      } else {
+        this.props.actions.live.play();
+      }
+    }
+  }, {
+    key: 'toggleRecording',
+    value: function toggleRecording() {
+      if (this.props.opt.recording) {
+        (0, _player.stopRecording)();
+        this.props.actions.live.pause();
+      } else {
+        (0, _player.startRecording)();
+      }
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      // console.log(this.props)
+      if (this.props.pix2wav.loading) {
+        return (0, _preact.h)(_common.Loading, null);
+      }
+      // console.log('sequence', this.props.opt)
+      return (0, _preact.h)(
+        'div',
+        { className: 'app pix2wav centered' },
+        (0, _preact.h)(
+          'div',
+          { className: 'row' },
+          (0, _preact.h)(
+            'div',
+            { className: 'column' },
+            (0, _preact.h)(_common.Player, { width: 256, height: 256 })
+          ),
+          (0, _preact.h)(
+            'div',
+            { className: 'params column audioParams' },
+            (0, _preact.h)(
+              _common.Group,
+              { title: 'Audio playback' },
+              (0, _preact.h)(
+                _common.Button,
+                { title: 'Start playback',
+                  onClick: function onClick() {
+                    return playerActions.startSynthesizing();
+                  }
+                },
+                'Start'
+              ),
+              (0, _preact.h)(
+                _common.Button,
+                { title: 'Stop playback',
+                  onClick: function onClick() {
+                    return playerActions.stopSynthesizing();
+                  }
+                },
+                'Stop'
+              )
+            )
+          )
+        ),
+        (0, _preact.h)(
+          'div',
+          { className: 'params row' },
+          (0, _preact.h)(
+            'div',
+            { className: 'column' },
+            (0, _preact.h)(
+              _common.ParamGroup,
+              {
+                title: 'Playback',
+                noToggle: true
+              },
+              (0, _preact.h)(_common.Select, {
+                name: 'send_image',
+                title: 'view mode',
+                options: ['a', 'b', 'sequence', 'recursive'],
+                onChange: this.props.actions.live.set_param
+              }),
+              (0, _preact.h)(_common.Select, {
+                name: 'sequence_name',
+                title: 'sequence',
+                options: this.props.pix2wav.data.sequences,
+                onChange: this.changeSequence
+              }),
+              (0, _preact.h)(_common.Select, {
+                name: 'output_format',
+                title: 'format',
+                options: ['JPEG', 'PNG']
+              }),
+              (0, _preact.h)(_common.Select, {
+                name: 'checkpoint_name',
+                title: 'checkpoint',
+                options: this.props.pix2wav.data.checkpoints,
+                onChange: this.changeCheckpoint
+              }),
+              (0, _preact.h)(_common.Select, {
+                name: 'epoch',
+                title: 'epoch',
+                options: this.props.epochs,
+                onChange: this.changeEpoch
+              }),
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'position',
+                min: 0.0, max: 1.0, type: 'float',
+                value: (this.props.frame.sequence_i || 0) / (this.props.frame.sequence_len || 1),
+                onChange: this.seek
+              }),
+              this.renderRestartButton(),
+              (0, _preact.h)(
+                _common.Button,
+                {
+                  title: this.props.opt.savingVideo ? 'Saving video...' : this.props.opt.recording ? 'Recording (' + timeInSeconds(this.props.opt.recordFrames) + ')' : 'Record video',
+                  onClick: this.toggleRecording
+                },
+                this.props.opt.savingVideo ? 'Saving' : this.props.opt.recording ? 'Recording' : 'Record'
+              ),
+              (0, _preact.h)(
+                _common.Button,
+                {
+                  title: 'Save frame',
+                  onClick: _player.saveFrame
+                },
+                'Save'
+              ),
+              (0, _preact.h)(
+                'p',
+                { 'class': 'last_message' },
+                this.props.last_message
+              )
+            )
+          ),
+          (0, _preact.h)(
+            'div',
+            { className: 'column' },
+            (0, _preact.h)(
+              _common.ParamGroup,
+              {
+                title: 'Transition',
+                name: 'transition'
+              },
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'transition_period',
+                min: 10, max: 5000, type: 'int'
+              }),
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'transition_min',
+                min: 0.001, max: 0.2, type: 'float'
+              }),
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'transition_max',
+                min: 0.1, max: 1.0, type: 'float'
+              })
+            ),
+            (0, _preact.h)(
+              _common.ParamGroup,
+              {
+                title: 'Recursion',
+                name: 'recursive'
+              },
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'recursive_frac',
+                min: 0.0, max: 0.5, type: 'float'
+              }),
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'recurse_roll',
+                min: -64, max: 64, type: 'int'
+              }),
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'recurse_roll_axis',
+                min: 0, max: 1, type: 'int'
+              })
+            ),
+            (0, _preact.h)(
+              _common.ParamGroup,
+              {
+                title: 'Sequence',
+                name: 'sequence'
+              },
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'sequence_frac',
+                min: 0.0, max: 1, type: 'float'
+              }),
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'process_frac',
+                min: 0, max: 1, type: 'float'
+              })
+            )
+          ),
+          (0, _preact.h)(
+            'div',
+            { className: 'column' },
+            (0, _preact.h)(
+              _common.ParamGroup,
+              {
+                title: 'Clahe',
+                name: 'clahe'
+              },
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'clip_limit',
+                min: 1.0, max: 4.0, type: 'float'
+              })
+            ),
+            (0, _preact.h)(
+              _common.ParamGroup,
+              {
+                title: 'Posterize',
+                name: 'posterize'
+              },
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'spatial_window',
+                min: 2, max: 128, type: 'int'
+              }),
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'color_window',
+                min: 2, max: 128, type: 'int'
+              })
+            ),
+            (0, _preact.h)(
+              _common.ParamGroup,
+              {
+                title: 'Blur',
+                name: 'blur'
+              },
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'blur_radius',
+                min: 3, max: 7, type: 'odd'
+              }),
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'blur_sigma',
+                min: 0, max: 2, type: 'float'
+              })
+            ),
+            (0, _preact.h)(
+              _common.ParamGroup,
+              {
+                title: 'Canny Edge Detection',
+                name: 'canny'
+              },
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'canny_lo',
+                min: 10, max: 200, type: 'int'
+              }),
+              (0, _preact.h)(_common.Slider, { live: true,
+                name: 'canny_hi',
+                min: 10, max: 200, type: 'int'
+              })
+            )
+          )
+        )
+      );
+    }
+  }, {
+    key: 'renderRestartButton',
+    value: function renderRestartButton() {
+      var _this2 = this;
+
+      if (this.props.runner.gpu.status === 'IDLE') {
+        return (0, _preact.h)(
+          _common.Button,
+          {
+            title: 'GPU Idle',
+            onClick: function onClick() {
+              return _this2.start();
+            }
+          },
+          'Start'
+        );
+      }
+      if (this.props.runner.gpu.task.module !== 'pix2pix' && this.props.runner.gpu.task.module !== 'pix2wav') {
+        return (0, _preact.h)(
+          _common.Button,
+          {
+            title: 'GPU Busy',
+            onClick: function onClick() {
+              return _this2.interrupt();
+            }
+          },
+          'Interrupt'
+        );
+      }
+      if (!this.props.opt.processing) {
+        return (0, _preact.h)(
+          'div',
+          null,
+          (0, _preact.h)(
+            _common.Button,
+            {
+              title: 'Not processing',
+              onClick: this.togglePlaying
+            },
+            'Restart'
+          ),
+          (0, _preact.h)(
+            _common.Button,
+            {
+              title: 'GPU Busy',
+              onClick: function onClick() {
+                return _this2.interrupt();
+              }
+            },
+            'Interrupt'
+          ),
+          (0, _preact.h)(
+            _common.Button,
+            {
+              title: 'Last resort',
+              onClick: function onClick() {
+                return _this2.exit();
+              }
+            },
+            'Exit'
+          )
+        );
+      }
+      return (0, _preact.h)(
+        'div',
+        null,
+        (0, _preact.h)(
+          _common.Button,
+          {
+            title: 'Processing',
+            onClick: this.togglePlaying
+          },
+          'Pause'
+        ),
+        (0, _preact.h)(
+          _common.Button,
+          {
+            title: 'GPU Busy',
+            onClick: function onClick() {
+              return _this2.interrupt();
+            }
+          },
+          'Interrupt'
+        ),
+        (0, _preact.h)(
+          _common.Button,
+          {
+            title: 'Last resort',
+            onClick: function onClick() {
+              return _this2.exit();
+            }
+          },
+          'Exit'
+        )
+      );
+    }
+  }]);
+
+  return Pix2WavLive;
+}(_preact.Component);
+
+function timeInSeconds(n) {
+  return (n / 10).toFixed(1) + ' s.';
+}
+var mapStateToProps = function mapStateToProps(state) {
+  return {
+    last_message: state.live.last_message,
+    opt: state.live.opt,
+    frame: state.live.frame,
+    checkpoints: state.live.checkpoints,
+    epochs: state.live.epochs,
+    sequences: state.live.sequences,
+    runner: state.system.runner,
+    pix2wav: state.module.pix2wav
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    actions: {
+      live: (0, _redux.bindActionCreators)(liveActions, dispatch),
+      queue: (0, _redux.bindActionCreators)(queueActions, dispatch),
+      pix2wav: (0, _redux.bindActionCreators)(pix2wavActions, dispatch),
+      tasks: (0, _redux.bindActionCreators)(pix2wavTasks, dispatch), s: s
+    }
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2WavLive);
+
+/***/ }),
+
+/***/ "./app/client/modules/pix2wav/views/pix2wav.new.js":
+/*!*********************************************************!*\
+  !*** ./app/client/modules/pix2wav/views/pix2wav.new.js ***!
+  \*********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.default = Pix2WavNew;
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _dataset = __webpack_require__(/*! ../../../dataset/dataset.new */ "./app/client/dataset/dataset.new.js");
+
+var _dataset2 = _interopRequireDefault(_dataset);
+
+var _pix2wav = __webpack_require__(/*! ../pix2wav.module */ "./app/client/modules/pix2wav/pix2wav.module.js");
+
+var _pix2wav2 = _interopRequireDefault(_pix2wav);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function Pix2WavNew(_ref) {
+  var history = _ref.history;
+
+  return (0, _preact.h)(
+    'div',
+    { 'class': 'app pix2wav' },
+    (0, _preact.h)(_dataset2.default, { module: _pix2wav2.default, history: history })
+  );
+}
+
+/***/ }),
+
+/***/ "./app/client/modules/pix2wav/views/pix2wav.show.js":
+/*!**********************************************************!*\
+  !*** ./app/client/modules/pix2wav/views/pix2wav.show.js ***!
+  \**********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _util = __webpack_require__(/*! ../../../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _pix2wav = __webpack_require__(/*! ../pix2wav.actions */ "./app/client/modules/pix2wav/pix2wav.actions.js");
+
+var pix2wavActions = _interopRequireWildcard(_pix2wav);
+
+var _pix2wav2 = __webpack_require__(/*! ../pix2wav.tasks */ "./app/client/modules/pix2wav/pix2wav.tasks.js");
+
+var pix2wavTasks = _interopRequireWildcard(_pix2wav2);
+
+var _loading = __webpack_require__(/*! ../../../common/loading.component */ "./app/client/common/loading.component.js");
+
+var _loading2 = _interopRequireDefault(_loading);
+
+var _dataset = __webpack_require__(/*! ../../../dataset/dataset.form */ "./app/client/dataset/dataset.form.js");
+
+var _dataset2 = _interopRequireDefault(_dataset);
+
+var _dataset3 = __webpack_require__(/*! ../../../dataset/dataset.new */ "./app/client/dataset/dataset.new.js");
+
+var _dataset4 = _interopRequireDefault(_dataset3);
+
+var _upload = __webpack_require__(/*! ../../../dataset/upload.status */ "./app/client/dataset/upload.status.js");
+
+var _upload2 = _interopRequireDefault(_upload);
+
+var _fileList = __webpack_require__(/*! ../../../common/fileList.component */ "./app/client/common/fileList.component.js");
+
+var _spectrogram = __webpack_require__(/*! ./spectrogram.upload */ "./app/client/modules/pix2wav/views/spectrogram.upload.js");
+
+var _spectrogram2 = _interopRequireDefault(_spectrogram);
+
+var _dataset5 = __webpack_require__(/*! ../../../dataset/dataset.component */ "./app/client/dataset/dataset.component.js");
+
+var _dataset6 = _interopRequireDefault(_dataset5);
+
+var _pix2wav3 = __webpack_require__(/*! ../pix2wav.module */ "./app/client/modules/pix2wav/pix2wav.module.js");
+
+var _pix2wav4 = _interopRequireDefault(_pix2wav3);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var Pix2wavShow = function (_Component) {
+  _inherits(Pix2wavShow, _Component);
+
+  function Pix2wavShow(props) {
+    _classCallCheck(this, Pix2wavShow);
+
+    var _this = _possibleConstructorReturn(this, (Pix2wavShow.__proto__ || Object.getPrototypeOf(Pix2wavShow)).call(this, props));
+
+    _this.datasetActions = _this.datasetActions.bind(_this);
+    return _this;
+  }
+
+  _createClass(Pix2wavShow, [{
+    key: 'componentWillMount',
+    value: function componentWillMount() {
+      var id = this.props.match.params.id || localStorage.getItem('pix2wav.last_id');
+      console.log('load dataset:', id);
+      var _props = this.props,
+          match = _props.match,
+          pix2wav = _props.pix2wav,
+          actions = _props.actions;
+
+      if (id === 'new') return;
+      if (id) {
+        if (parseInt(id)) localStorage.setItem('pix2wav.last_id', id);
+        if (!pix2wav.folder || pix2wav.folder.id !== id) {
+          actions.load_directories(id);
+        }
+      } else {
+        this.props.history.push('/pix2wav/new/');
+      }
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      var _props2 = this.props,
+          pix2wav = _props2.pix2wav,
+          match = _props2.match,
+          history = _props2.history;
+
+      var _ref = pix2wav.data || {},
+          folderLookup = _ref.folderLookup;
+
+      var folder = (folderLookup || {})[pix2wav.folder_id] || {};
+
+      return (0, _preact.h)(
+        'div',
+        { className: 'app pix2wav' },
+        (0, _preact.h)(
+          'div',
+          { 'class': 'heading' },
+          (0, _preact.h)(
+            'div',
+            { 'class': 'spaced' },
+            (0, _preact.h)(
+              'h1',
+              null,
+              folder ? folder.name : (0, _preact.h)(_loading2.default, null)
+            ),
+            (0, _preact.h)(_upload2.default, null)
+          )
+        ),
+        (0, _preact.h)(_spectrogram2.default, {
+          loading: pix2wav.loading,
+          progress: pix2wav.progress,
+          id: pix2wav.folder_id,
+          module: _pix2wav4.default,
+          data: pix2wav.data,
+          folder: folder
+        }),
+        (0, _preact.h)(_dataset6.default, {
+          loading: pix2wav.loading,
+          progress: pix2wav.progress,
+          id: pix2wav.folder_id,
+          module: _pix2wav4.default,
+          data: pix2wav.data,
+          folder: folder,
+          history: history,
+          onPickFile: function onPickFile(file, e) {
+            e.preventDefault();
+            e.stopPropagation();
+            console.log('picked a file', file);
+          },
+          datasetActions: this.datasetActions
+        })
+      );
+    }
+  }, {
+    key: 'datasetActions',
+    value: function datasetActions(dataset) {
+      var isFetching = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+      var isProcessing = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+      var _props3 = this.props,
+          pix2wav = _props3.pix2wav,
+          remote = _props3.remote;
+
+      var input = pix2wav.data.fileLookup[dataset.input[0]];
+      if (!input) return null;
+      if (input.name && input.name.match(/(gif|jpe?g|png)$/i)) return null;
+      return (0, _preact.h)(
+        'div',
+        null,
+        (0, _preact.h)(
+          'div',
+          { 'class': 'actions' },
+          (0, _preact.h)(
+            'span',
+            { 'class': 'link', onClick: function onClick() {
+                return remote.train_task(dataset, pix2wav.folder_id, 1);
+              } },
+            'train'
+          ),
+          (0, _preact.h)(
+            'span',
+            { 'class': 'link', onClick: function onClick() {
+                return remote.train_task(dataset, pix2wav.folder_id, 2);
+              } },
+            '2x'
+          ),
+          (0, _preact.h)(
+            'span',
+            { 'class': 'link', onClick: function onClick() {
+                return remote.train_task(dataset, pix2wav.folder_id, 4);
+              } },
+            '4x'
+          ),
+          (0, _preact.h)(
+            'span',
+            { 'class': 'link', onClick: function onClick() {
+                return remote.train_task(dataset, pix2wav.folder_id, 6);
+              } },
+            '6x'
+          ),
+          (0, _preact.h)(
+            'span',
+            { 'class': 'link', onClick: function onClick() {
+                return remote.train_task(dataset, pix2wav.folder_id, 18);
+              } },
+            '18x'
+          )
+        ),
+        dataset.isBuilt ? (0, _preact.h)(
+          'div',
+          { 'class': 'subtext' },
+          'fetched ',
+          (0, _preact.h)(
+            'span',
+            { 'class': 'link', onClick: function onClick() {
+                return remote.clear_cache_task(dataset);
+              } },
+            'rm'
+          )
+        ) : isFetching ? (0, _preact.h)(
+          'div',
+          { 'class': 'subtext' },
+          'fetching'
+        ) : (0, _preact.h)(
+          'div',
+          { 'class': 'subtext' },
+          (0, _preact.h)(
+            'span',
+            { 'class': 'link', onClick: function onClick() {
+                return remote.fetch_task(input.url, input.id, dataset.name);
+              } },
+            'fetch'
+          )
+        )
+      );
+    }
+  }]);
+
+  return Pix2wavShow;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {
+    pix2wav: state.module.pix2wav
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    actions: (0, _redux.bindActionCreators)(pix2wavActions, dispatch),
+    remote: (0, _redux.bindActionCreators)(pix2wavTasks, dispatch)
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2wavShow);
+
+/***/ }),
+
+/***/ "./app/client/modules/pix2wav/views/spectrogram.upload.js":
+/*!****************************************************************!*\
+  !*** ./app/client/modules/pix2wav/views/spectrogram.upload.js ***!
+  \****************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _moment = __webpack_require__(/*! moment/min/moment.min */ "./node_modules/moment/min/moment.min.js");
+
+var _moment2 = _interopRequireDefault(_moment);
+
+var _util = __webpack_require__(/*! ../../../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _pix2wav = __webpack_require__(/*! ../pix2wav.actions */ "./app/client/modules/pix2wav/pix2wav.actions.js");
+
+var pix2wavActions = _interopRequireWildcard(_pix2wav);
+
+var _pix2wav2 = __webpack_require__(/*! ../pix2wav.tasks */ "./app/client/modules/pix2wav/pix2wav.tasks.js");
+
+var pix2wavTasks = _interopRequireWildcard(_pix2wav2);
+
+var _common = __webpack_require__(/*! ../../../common */ "./app/client/common/index.js");
+
+var _dataset = __webpack_require__(/*! ../../../dataset/dataset.actions */ "./app/client/dataset/dataset.actions.js");
+
+var datasetActions = _interopRequireWildcard(_dataset);
+
+var _wav2pix = __webpack_require__(/*! ../../../audio/wav2pix */ "./app/client/audio/wav2pix.js");
+
+var wav2pixActions = _interopRequireWildcard(_wav2pix);
+
+var _pix2wav3 = __webpack_require__(/*! ../../../audio/pix2wav */ "./app/client/audio/pix2wav.js");
+
+var pix2wavPlayer = _interopRequireWildcard(_pix2wav3);
+
+var _pix2wav4 = __webpack_require__(/*! ../pix2wav.module */ "./app/client/modules/pix2wav/pix2wav.module.js");
+
+var _pix2wav5 = _interopRequireDefault(_pix2wav4);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var date_stamp = function date_stamp() {
+  return (0, _moment2.default)().format("_YYYYMMDD_HHmm");
+};
+
+var SpectrogramUpload = function (_Component) {
+  _inherits(SpectrogramUpload, _Component);
+
+  function SpectrogramUpload(props) {
+    _classCallCheck(this, SpectrogramUpload);
+
+    var _this = _possibleConstructorReturn(this, (SpectrogramUpload.__proto__ || Object.getPrototypeOf(SpectrogramUpload)).call(this, props));
+
+    _this.state = {
+      file: null,
+      pcm: null,
+      name: "",
+      datasetName: "",
+      frames: [],
+      frame_start: 0,
+      max: 1000,
+      preview_count: 8 * 4,
+      frame_step: wav2pixActions.FRAME_STEP
+    };
+    var audioElement = document.createElement('audio');
+    audioElement.addEventListener('loadedmetadata', function () {
+      var duration = audioElement.duration;
+      var total_frame_count = Math.floor((duration * 44100 - wav2pixActions.FRAME_LENGTH) / _this.state.frame_step);
+      _this.setState({
+        duration: duration,
+        max: Math.min(_this.state.max, total_frame_count, 1000)
+      });
+    });
+    _this.audioElement = audioElement;
+    return _this;
+  }
+
+  _createClass(SpectrogramUpload, [{
+    key: 'pickFile',
+    value: function pickFile(file) {
+      var _this2 = this;
+
+      var name = file.name.split('.')[0].replace(/\s+/g, '_').replace(/-/g, '_').replace(/_+/g, '_');
+      this.setState({
+        file: file,
+        name: name + date_stamp(),
+        datasetName: name,
+        pcm: ''
+      }, function () {
+        _this2.rebuildFrames();
+      });
+      this.audioElement.src = URL.createObjectURL(file);
+    }
+  }, {
+    key: 'rebuildFrames',
+    value: function rebuildFrames() {
+      var _this3 = this;
+
+      var _state = this.state,
+          file = _state.file,
+          pcm = _state.pcm,
+          frame_step = _state.frame_step,
+          frame_start = _state.frame_start,
+          preview_count = _state.preview_count;
+
+      this.props.wav2pix.renderFrames(pcm || file, { frame_start: frame_start, frame_step: frame_step, max: preview_count }).then(function (data) {
+        console.log('got frames', data.frames.length);
+        _this3.setState(_extends({}, _this3.state, {
+          frames: data.frames,
+          pcm: data.pcm
+        }));
+      });
+    }
+  }, {
+    key: 'buildZip',
+    value: function buildZip() {
+      var _this4 = this;
+
+      var _state2 = this.state,
+          pcm = _state2.pcm,
+          file = _state2.file,
+          max = _state2.max,
+          frame_step = _state2.frame_step,
+          frame_start = _state2.frame_start;
+
+      this.props.wav2pix.buildZip(this.state.name, pcm || file, { frame_start: frame_start, frame_step: frame_step, max: max }).then(function (_ref) {
+        var zip = _ref.zip,
+            filename = _ref.filename,
+            count = _ref.count;
+
+        _this4.props.datasetActions.uploadFile(_this4.props.module, _this4.props.folder, zip, filename, { count: count, max: max, frame_step: frame_step, frame_size: wav2pixActions.FRAME_LENGTH / 44100 });
+      });
+    }
+  }, {
+    key: 'playFrame',
+    value: function playFrame(i) {
+      var _this5 = this;
+
+      return function () {
+        var frame = _this5.state.frames[i];
+        pix2wavPlayer.play(frame);
+      };
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      var _this6 = this;
+
+      // loading={pix2wav.loading}
+      // progress={pix2wav.progress}
+      // id={pix2wav.folder_id}
+      // module={pix2wavModule}
+      // data={pix2wav.data}
+      // folder={folder}
+      var _state3 = this.state,
+          file = _state3.file,
+          frames = _state3.frames,
+          preview_count = _state3.preview_count;
+
+      var canvases = [];
+      for (var i = 0, _len = preview_count; i < _len; i++) {
+        canvases.push((0, _preact.h)('canvas', { key: i, onClick: this.playFrame(i) }));
+      }
+      return (0, _preact.h)(
+        'div',
+        { className: 'row' },
+        (0, _preact.h)(
+          'div',
+          { className: 'col spectrogramBuilder' },
+          (0, _preact.h)(
+            _common.Group,
+            { title: 'Spectrogram Builder' },
+            (0, _preact.h)(
+              'p',
+              null,
+              "Convert your sounds into spectrograms. ",
+              "Sound files can be WAV, MP3, AIFF, or FLAC. "
+            ),
+            (0, _preact.h)(_common.FileUpload, {
+              title: 'Choose a sound file',
+              accept: 'audio/*',
+              onUpload: function onUpload(file) {
+                return _this6.pickFile(file);
+              }
+            }),
+            file && this.renderMetadata(file)
+          )
+        ),
+        (0, _preact.h)(
+          'div',
+          { ref: function ref(c) {
+              _this6.canvases = c;
+            }, className: 'thumbs', id: 'pix2wav_canvases' },
+          canvases
+        )
+      );
+    }
+  }, {
+    key: 'renderMetadata',
+    value: function renderMetadata(file) {
+      var _this7 = this;
+
+      var _state4 = this.state,
+          duration = _state4.duration,
+          preview_count = _state4.preview_count;
+
+      var size = _util2.default.hush_size(file.size);
+      var total_frame_count = Math.floor((duration * 44100 - wav2pixActions.FRAME_LENGTH) / this.state.frame_step);
+      var frame_size = Math.round(wav2pixActions.FRAME_LENGTH / 44100 * 1000) + ' ms.';
+      var frame_step = Math.round(this.state.frame_step / 44100 * 1000) + ' ms.';
+      return (0, _preact.h)(
+        'div',
+        { className: 'fileMetadata' },
+        (0, _preact.h)(
+          _common.Group,
+          { title: 'Metadata' },
+          (0, _preact.h)(
+            _common.Param,
+            { title: 'Name' },
+            file.name
+          ),
+          (0, _preact.h)(
+            _common.Param,
+            { title: 'Type' },
+            file.type
+          ),
+          (0, _preact.h)(
+            _common.Param,
+            { title: 'Size' },
+            (0, _preact.h)(
+              'span',
+              { className: size[0] },
+              size[1]
+            )
+          ),
+          (0, _preact.h)(
+            _common.Param,
+            { title: 'Date' },
+            (0, _moment2.default)(file.lastModifiedDate).format("YYYY-MM-DD h:mm a")
+          ),
+          (0, _preact.h)(
+            _common.Param,
+            { title: 'Duration' },
+            Math.floor(duration) + ' s.'
+          ),
+          (0, _preact.h)('br', null),
+          (0, _preact.h)(
+            _common.Param,
+            { title: 'Frames' },
+            total_frame_count
+          ),
+          (0, _preact.h)(
+            _common.Param,
+            { title: 'Frame Size' },
+            frame_size
+          ),
+          (0, _preact.h)(
+            _common.Param,
+            { title: 'Frame Step' },
+            frame_step
+          ),
+          (0, _preact.h)(
+            _common.Param,
+            { title: 'FFT Size' },
+            wav2pixActions.spectrum.fft_size
+          ),
+          (0, _preact.h)('br', null),
+          (0, _preact.h)(
+            _common.Param,
+            { title: 'Status' },
+            this.props.pix2wav.status
+          ),
+          (0, _preact.h)('br', null)
+        ),
+        (0, _preact.h)(
+          _common.Group,
+          { title: 'Data settings' },
+          (0, _preact.h)(_common.TextInput, {
+            title: 'Dataset name',
+            onChange: function onChange(e) {
+              return _this7.setState({ name: e.target.value });
+            },
+            value: this.state.name
+          }),
+          (0, _preact.h)(_common.Slider, {
+            name: 'Starting Frame',
+            min: 0, max: 1, type: 'float',
+            value: this.state.frame_start,
+            defaultValue: 0,
+            onChange: function onChange(frame_start) {
+              _this7.setState({
+                frame_start: frame_start
+              }, function () {
+                _this7.rebuildFrames();
+              });
+            }
+          }),
+          (0, _preact.h)(_common.Slider, {
+            name: 'No. Frames',
+            min: 10, max: Math.min(total_frame_count, 1000), type: 'int',
+            value: this.state.max,
+            defaultValue: Math.min(total_frame_count, 300),
+            onChange: function onChange(max) {
+              return _this7.setState({ max: max });
+            }
+          }),
+          (0, _preact.h)(_common.Slider, {
+            name: 'Frame step',
+            min: 10, max: 20000, type: 'int',
+            value: this.state.frame_step,
+            defaultValue: wav2pixActions.FRAME_STEP,
+            onChange: function onChange(frame_step) {
+              var total_frame_count = Math.floor((duration * 44100 - wav2pixActions.FRAME_LENGTH) / frame_step);
+              _this7.setState({
+                name: _this7.state.datasetName + '_step_' + frame_step + date_stamp(),
+                frame_step: frame_step,
+                max: Math.min(_this7.state.max, total_frame_count)
+              }, function () {
+                _this7.rebuildFrames();
+              });
+            }
+          }),
+          (0, _preact.h)(
+            _common.Button,
+            {
+              onClick: function onClick() {
+                return _this7.buildZip();
+              }
+            },
+            'Upload Frames'
+          )
+        ),
+        (0, _preact.h)(_common.Progress, null)
+      );
+    }
+  }, {
+    key: 'componentDidUpdate',
+    value: function componentDidUpdate() {
+      var _this8 = this;
+
+      (this.state.frames || []).map(function (frame, i) {
+        var canvas = _this8.canvases.children[i];
+        var ctx = canvas.getContext('2d-lodpi');
+        canvas.width = frame.canvas.width;
+        canvas.height = frame.canvas.height;
+        ctx.drawImage(frame.canvas, 0, 0);
+      });
+    }
+  }]);
+
+  return SpectrogramUpload;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {
+    pix2wav: state.module.pix2wav,
+    upload: state.upload
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    datasetActions: (0, _redux.bindActionCreators)(datasetActions, dispatch),
+    actions: (0, _redux.bindActionCreators)(pix2wavActions, dispatch),
+    remote: (0, _redux.bindActionCreators)(pix2wavTasks, dispatch),
+    wav2pix: (0, _redux.bindActionCreators)(wav2pixActions, dispatch)
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SpectrogramUpload);
+
+/***/ }),
+
+/***/ "./app/client/modules/samplernn/index.js":
+/*!***********************************************!*\
+  !*** ./app/client/modules/samplernn/index.js ***!
+  \***********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _reactRouterDom = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
+
+var _actions = __webpack_require__(/*! ../../actions */ "./app/client/actions.js");
+
+var _actions2 = _interopRequireDefault(_actions);
+
+var _util = __webpack_require__(/*! ../../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _samplernn = __webpack_require__(/*! ./views/samplernn.new */ "./app/client/modules/samplernn/views/samplernn.new.js");
+
+var _samplernn2 = _interopRequireDefault(_samplernn);
+
+var _samplernn3 = __webpack_require__(/*! ./views/samplernn.show */ "./app/client/modules/samplernn/views/samplernn.show.js");
+
+var _samplernn4 = _interopRequireDefault(_samplernn3);
+
+var _samplernn5 = __webpack_require__(/*! ./views/samplernn.import */ "./app/client/modules/samplernn/views/samplernn.import.js");
+
+var _samplernn6 = _interopRequireDefault(_samplernn5);
+
+var _samplernn7 = __webpack_require__(/*! ./views/samplernn.results */ "./app/client/modules/samplernn/views/samplernn.results.js");
+
+var _samplernn8 = _interopRequireDefault(_samplernn7);
+
+var _samplernn9 = __webpack_require__(/*! ./views/samplernn.graph */ "./app/client/modules/samplernn/views/samplernn.graph.js");
+
+var _samplernn10 = _interopRequireDefault(_samplernn9);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var router = function () {
+  function router() {
+    _classCallCheck(this, router);
+  }
+
+  _createClass(router, [{
+    key: 'componentWillMount',
+    value: function componentWillMount() {
+      _actions2.default.system.changeTool('samplernn');
+      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #eef, #fef)';
+    }
+  }, {
+    key: 'componentWillReceiveProps',
+    value: function componentWillReceiveProps() {
+      _actions2.default.system.changeTool('samplernn');
+      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #eef, #fef)';
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      return (0, _preact.h)(
+        'section',
+        null,
+        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/samplernn/new', component: _samplernn2.default }),
+        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/samplernn/datasets', component: _samplernn4.default }),
+        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/samplernn/datasets/:id', component: _samplernn4.default }),
+        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/samplernn/import', component: _samplernn6.default }),
+        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/samplernn/results', component: _samplernn8.default }),
+        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/samplernn/graph', component: _samplernn10.default })
+      );
+    }
+  }]);
+
+  return router;
+}();
+
+function links() {
+  return [{ url: '/samplernn/new/', name: 'new' }, { url: '/samplernn/datasets/', name: 'datasets' }, { url: '/samplernn/graph/', name: 'graph' }, { url: '/samplernn/results/', name: 'results' }];
+}
+
+exports.default = {
+  name: 'samplernn',
+  router: router, links: links
+};
+
+/***/ }),
+
+/***/ "./app/client/modules/samplernn/samplernn.actions.js":
+/*!***********************************************************!*\
+  !*** ./app/client/modules/samplernn/samplernn.actions.js ***!
+  \***********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.import_files = exports.load_loss = exports.load_graph = exports.load_directories = undefined;
+
+var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
+
+var _v = __webpack_require__(/*! uuid/v1 */ "./node_modules/uuid/v1.js");
+
+var _v2 = _interopRequireDefault(_v);
+
+var _socket = __webpack_require__(/*! ../../socket */ "./app/client/socket/index.js");
+
+var _socket2 = _interopRequireDefault(_socket);
+
+var _types = __webpack_require__(/*! ../../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _dataset = __webpack_require__(/*! ../../dataset/dataset.loader */ "./app/client/dataset/dataset.loader.js");
+
+var datasetLoader = _interopRequireWildcard(_dataset);
+
+var _actions = __webpack_require__(/*! ../../actions */ "./app/client/actions.js");
+
+var _actions2 = _interopRequireDefault(_actions);
+
+var _util = __webpack_require__(/*! ../../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _samplernn = __webpack_require__(/*! ./samplernn.module */ "./app/client/modules/samplernn/samplernn.module.js");
+
+var _samplernn2 = _interopRequireDefault(_samplernn);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _toArray(arr) { return Array.isArray(arr) ? arr : Array.from(arr); }
+
+var load_directories = exports.load_directories = function load_directories(id) {
+  return function (dispatch) {
+    var module = _samplernn2.default.name;
+    _util2.default.allProgress([datasetLoader.load(module), _actions2.default.socket.list_directory({ module: module, dir: 'datasets' }), _actions2.default.socket.list_directory({ module: module, dir: 'results' }), _actions2.default.socket.list_directory({ module: module, dir: 'output' }), _actions2.default.socket.disk_usage({ module: module, dir: 'datasets' }), load_loss()(dispatch)], function (percent, i, n) {
+      dispatch({
+        type: _types2.default.app.load_progress,
+        progress: { i: i, n: n },
+        data: { module: 'samplernn' }
+      });
+    }).then(function (res) {
+      // console.log(res)
+      var _res = _slicedToArray(res, 6),
+          datasetApiReport = _res[0],
+          datasets = _res[1],
+          results = _res[2],
+          output = _res[3],
+          datasetUsage = _res[4],
+          lossReport = _res[5];
+
+      var folderLookup = datasetApiReport.folderLookup,
+          fileLookup = datasetApiReport.fileLookup,
+          datasetLookup = datasetApiReport.datasetLookup,
+          folders = datasetApiReport.folders,
+          files = datasetApiReport.files,
+          unsortedFolder = datasetApiReport.unsortedFolder;
+
+      console.log(datasetUsage);
+
+      // also show the various flat audio files we have, in the input area..
+      var flatDatasets = datasets.filter(function (s) {
+        return s.name.match(/(wav|aiff?|flac|mp3)$/) && !s.dir;
+      });
+      var builtDatasets = datasets.filter(function (s) {
+        return s.dir;
+      });
+      builtDatasets.forEach(function (dir) {
+        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name, unsortedFolder, dir.date);
+        dataset.isBuilt = true;
+      });
+
+      flatDatasets.forEach(function (file) {
+        file.uuid = (0, _v2.default)();
+        fileLookup[file.uuid] = file;
+        var name = file.name.split('.')[0];
+        var dataset = datasetLoader.getDataset(module, datasetLookup, name, unsortedFolder, file.date);
+        file.persisted = false;
+        dataset.input.push(file.uuid);
+      });
+
+      // exp:coccokit_3-frame_sizes:8,2-n_rnn:2-dataset:coccokit_3
+      var checkpoints = results.filter(function (s) {
+        return s.dir;
+      }).map(function (s) {
+        var checkpoint = s.name.split('-').map(function (s) {
+          return s.split(':');
+        }).filter(function (b) {
+          return b.length && b[1];
+        }).reduce(function (a, b) {
+          return (a[b[0]] = b[1]) && a;
+        }, {});
+        checkpoint.name = checkpoint.name || checkpoint.dataset || checkpoint.exp;
+        checkpoint.date = s.date;
+        checkpoint.dir = s;
+        checkpoint.persisted = false;
+        var dataset = datasetLoader.getDataset(module, datasetLookup, checkpoint.name, unsortedFolder, checkpoint.date);
+        var loss = lossReport[checkpoint.name];
+        if (loss) {
+          dataset.epoch = checkpoint.epoch = loss.length;
+          checkpoint.training_loss = loss;
+        }
+        dataset.checkpoints.push(checkpoint);
+        return checkpoint;
+      });
+
+      output.map(function (file) {
+        file.uuid = (0, _v2.default)();
+        fileLookup[file.uuid] = file;
+        var pair = file.name.split('.')[0].split('-');
+        var dataset = datasetLoader.getDataset(module, datasetLookup, pair[0], unsortedFolder, file.date);
+        file.persisted = false;
+        file.epoch = parseInt(file.epoch || pair[1].replace(/^\D+/, '')) || 0;
+        dataset.epoch = Math.max(file.epoch, dataset.epoch || 0);
+        // here check if the file exists in dataset, if so just check that it's persisted
+        var found = dataset.output.some(function (file_id) {
+          // if (f.name === 
+          if (fileLookup[file_id].name === file.name) {
+            fileLookup[file_id].persisted = true;
+            return true;
+          }
+          return false;
+        });
+        if (!found) {
+          dataset.output.push(file.uuid);
+        }
+      });
+
+      dispatch({
+        type: _types2.default.dataset.load,
+        data: {
+          module: module,
+          folderLookup: folderLookup,
+          fileLookup: fileLookup,
+          datasetLookup: datasetLookup,
+          folders: folders, files: files,
+          checkpoints: checkpoints,
+          output: output
+        }
+      });
+    }).catch(function (e) {
+      console.error(e);
+    });
+    if (id) {
+      dispatch({
+        type: _types2.default.dataset.set_folder,
+        data: {
+          folder_id: id,
+          module: module
+        }
+      });
+    }
+  };
+};
+
+var load_graph = exports.load_graph = function load_graph() {
+  return function (dispatch) {
+    var module = _samplernn2.default.name;
+    _util2.default.allProgress([load_loss()(dispatch), _actions2.default.socket.list_directory({ module: module, dir: 'results' })], function (percent, i, n) {
+      dispatch({
+        type: _types2.default.app.load_progress,
+        progress: { i: i, n: n },
+        data: { module: 'samplernn' }
+      });
+    }).then(function (res) {
+      var _res2 = _slicedToArray(res, 2),
+          lossReport = _res2[0],
+          results = _res2[1];
+
+      dispatch({
+        type: _types2.default.samplernn.load_graph,
+        lossReport: lossReport,
+        results: results
+      });
+    });
+  };
+};
+
+var load_loss = exports.load_loss = function load_loss() {
+  return function (dispatch) {
+    return _actions2.default.socket.run_script({ module: 'samplernn', activity: 'report' }).then(function (report) {
+      var lossReport = {};
+      report.stdout.split('\n\n').filter(function (a) {
+        return !!a;
+      }).forEach(function (data) {
+        var _data$split = data.split('\n'),
+            _data$split2 = _toArray(_data$split),
+            name = _data$split2[0],
+            lines = _data$split2.slice(1);
+
+        lossReport[name] = lines.map(function (s) {
+          return s.split('\t').reduce(function (a, s) {
+            var b = s.split(': ');
+            a[b[0]] = b[1];
+            return a;
+          }, {});
+        });
+        // console.log(data, name, lossReport[name])
+      });
+      dispatch({
+        type: _types2.default.samplernn.load_loss,
+        lossReport: lossReport
+      });
+      return lossReport;
+    });
+  };
+};
+
+var import_files = exports.import_files = function import_files(state, datasetLookup, fileLookup) {
+  return function (dispatch) {
+    var selected = state.selected,
+        folder_id = state.folder_id,
+        url_base = state.url_base,
+        import_action = state.import_action;
+
+    var names = Object.keys(selected).filter(function (k) {
+      return selected[k];
+    });
+    var promises = void 0;
+    switch (import_action) {
+      case 'Hotlink':
+        // in this case, create a new file for each file we see.
+        promises = names.reduce(function (a, name) {
+          return datasetLookup[name].output.map(function (id) {
+            return fileLookup[id];
+          }).map(function (file) {
+            var partz = file.name.split('.');
+            var ext = partz.pop();
+            return _actions2.default.file.create({
+              folder_id: folder_id,
+              name: file.name,
+              url: url_base + file.name,
+              mime: 'audio/' + ext,
+              epoch: file.epoch,
+              size: file.size,
+              module: 'samplernn',
+              dataset: name,
+              activity: 'train',
+              datatype: 'audio',
+              generated: true,
+              created_at: new Date(file.date),
+              updated_at: new Date(file.date)
+            });
+          }).concat(a);
+        }, []);
+        break;
+      case 'Upload':
+        promises = names.reduce(function (a, name) {
+          return datasetLookup[name].input.map(function (id) {
+            return fileLookup[id];
+          }).map(function (file) {
+            if (file.persisted) return null;
+            var partz = file.name.split('.');
+            var ext = partz.pop();
+            if (ext === 'wav' || ext === 'flac') return;
+            console.log(file);
+            return _actions2.default.socket.upload_file({
+              folder_id: folder_id,
+              module: 'samplernn',
+              activity: 'train',
+              path: 'datasets',
+              filename: file.name,
+              generated: false,
+              processed: false,
+              datatype: 'audio',
+              ttl: 60000
+            });
+          }).concat(a);
+        }, []).filter(function (a) {
+          return !!a;
+        });
+        break;
+      default:
+        break;
+    }
+    console.log(promises);
+    return Promise.all(promises).then(function (data) {
+      console.log(data);
+      window.location.href = '/samplernn/datasets/' + folder_id + '/';
+    }).catch(function (e) {
+      console.error(e);
+    });
+  };
+};
+
+/***/ }),
+
+/***/ "./app/client/modules/samplernn/samplernn.module.js":
+/*!**********************************************************!*\
+  !*** ./app/client/modules/samplernn/samplernn.module.js ***!
+  \**********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+var samplernnModule = {
+  name: 'samplernn',
+  displayName: 'SampleRNN',
+  datatype: 'audio'
+};
+
+exports.default = samplernnModule;
+
+/***/ }),
+
+/***/ "./app/client/modules/samplernn/samplernn.reducer.js":
+/*!***********************************************************!*\
+  !*** ./app/client/modules/samplernn/samplernn.reducer.js ***!
+  \***********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _types = __webpack_require__(/*! ../../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _dataset = __webpack_require__(/*! ../../dataset/dataset.reducer */ "./app/client/dataset/dataset.reducer.js");
+
+var _dataset2 = _interopRequireDefault(_dataset);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var samplernnInitialState = {
+  loading: true,
+  progress: { i: 0, n: 0 },
+  error: null,
+  folders: [],
+  folder_id: 0,
+  data: null,
+  lossReport: null,
+  results: null
+};
+
+var samplernnReducer = function samplernnReducer() {
+  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : samplernnInitialState;
+  var action = arguments[1];
+
+  if (action.data && action.data.module === 'samplernn') {
+    return (0, _dataset2.default)(state, action);
+  }
+
+  switch (action.type) {
+    case _types2.default.samplernn.load_loss:
+      return _extends({}, state, {
+        lossReport: action.lossReport
+      });
+    case _types2.default.samplernn.load_graph:
+      return _extends({}, state, {
+        lossReport: action.lossReport,
+        results: action.results
+      });
+    default:
+      return state;
+  }
+};
+
+exports.default = samplernnReducer;
+
+/***/ }),
+
+/***/ "./app/client/modules/samplernn/samplernn.tasks.js":
+/*!*********************************************************!*\
+  !*** ./app/client/modules/samplernn/samplernn.tasks.js ***!
+  \*********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.clear_cache_task = exports.log_task = exports.fetch_task = exports.train_task = undefined;
+
+var _v = __webpack_require__(/*! uuid/v1 */ "./node_modules/uuid/v1.js");
+
+var _v2 = _interopRequireDefault(_v);
+
+var _socket = __webpack_require__(/*! ../../socket */ "./app/client/socket/index.js");
+
+var _socket2 = _interopRequireDefault(_socket);
+
+var _types = __webpack_require__(/*! ../../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _actions = __webpack_require__(/*! ../../actions */ "./app/client/actions.js");
+
+var _actions2 = _interopRequireDefault(_actions);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var train_task = exports.train_task = function train_task(dataset, folder_id) {
+  var epochs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
+  return function (dispatch) {
+    var task = {
+      module: 'samplernn',
+      activity: 'train',
+      dataset: dataset.name,
+      epoch: dataset.checkpoints.length ? dataset.checkpoints[0].epoch || 0 : 0,
+      epochs: epochs,
+      folder_id: folder_id,
+      opt: {
+        sample_length: 44100 * 5,
+        n_samples: 6,
+        keep_old_checkpoints: false
+      }
+    };
+    console.log(task);
+    return _actions2.default.queue.add_task(task);
+  };
+};
+var fetch_task = exports.fetch_task = function fetch_task(url, folder_id, file_id, dataset) {
+  return function (dispatch) {
+    if (!url) return console.log('input file inaccessible (no url)');
+    var task = {
+      module: 'samplernn',
+      activity: 'fetch',
+      dataset: dataset,
+      folder_id: folder_id,
+      opt: {
+        url: url,
+        file_id: file_id,
+        dataset: dataset
+      }
+    };
+    return _actions2.default.queue.add_task(task);
+  };
+};
+var log_task = exports.log_task = function log_task(dataset) {
+  return function (dispatch) {
+    var task = {
+      module: 'samplernn',
+      activity: 'log',
+      dataset: dataset.name
+    };
+    return _actions2.default.queue.add_task(task);
+  };
+};
+var clear_cache_task = exports.clear_cache_task = function clear_cache_task(dataset) {
+  return function (dispatch) {
+    var task = {
+      module: 'samplernn',
+      activity: 'clear_cache',
+      dataset: dataset.name
+    };
+    return _actions2.default.queue.add_task(task);
+  };
+};
+
+/***/ }),
+
+/***/ "./app/client/modules/samplernn/views/samplernn.graph.js":
+/*!***************************************************************!*\
+  !*** ./app/client/modules/samplernn/views/samplernn.graph.js ***!
+  \***************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _util = __webpack_require__(/*! ../../../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _samplernn = __webpack_require__(/*! ../samplernn.actions */ "./app/client/modules/samplernn/samplernn.actions.js");
+
+var samplernnActions = _interopRequireWildcard(_samplernn);
+
+var _group = __webpack_require__(/*! ../../../common/group.component */ "./app/client/common/group.component.js");
+
+var _group2 = _interopRequireDefault(_group);
+
+var _slider = __webpack_require__(/*! ../../../common/slider.component */ "./app/client/common/slider.component.js");
+
+var _slider2 = _interopRequireDefault(_slider);
+
+var _select = __webpack_require__(/*! ../../../common/select.component */ "./app/client/common/select.component.js");
+
+var _select2 = _interopRequireDefault(_select);
+
+var _button = __webpack_require__(/*! ../../../common/button.component */ "./app/client/common/button.component.js");
+
+var _button2 = _interopRequireDefault(_button);
+
+var _fileList = __webpack_require__(/*! ../../../common/fileList.component */ "./app/client/common/fileList.component.js");
+
+var _textInput = __webpack_require__(/*! ../../../common/textInput.component */ "./app/client/common/textInput.component.js");
+
+var _textInput2 = _interopRequireDefault(_textInput);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var lerp = _util2.default.lerp,
+    norm = _util2.default.norm,
+    randint = _util2.default.randint,
+    randrange = _util2.default.randrange;
+
+var SampleRNNGraph = function (_Component) {
+  _inherits(SampleRNNGraph, _Component);
+
+  function SampleRNNGraph(props) {
+    _classCallCheck(this, SampleRNNGraph);
+
+    var _this = _possibleConstructorReturn(this, (SampleRNNGraph.__proto__ || Object.getPrototypeOf(SampleRNNGraph)).call(this));
+
+    props.actions.load_graph();
+    return _this;
+  }
+
+  _createClass(SampleRNNGraph, [{
+    key: 'render',
+    value: function render() {
+      var _this2 = this;
+
+      this.refs = {};
+      return (0, _preact.h)(
+        'div',
+        { className: 'app lossGraph' },
+        (0, _preact.h)(
+          'div',
+          { className: 'heading' },
+          (0, _preact.h)(
+            'h3',
+            null,
+            'SampleRNN Loss Graph'
+          ),
+          (0, _preact.h)('canvas', { ref: function ref(_ref) {
+              return _this2.refs['canvas'] = _ref;
+            } })
+        )
+      );
+    }
+  }, {
+    key: 'componentDidUpdate',
+    value: function componentDidUpdate() {
+      var _props$samplernn = this.props.samplernn,
+          lossReport = _props$samplernn.lossReport,
+          results = _props$samplernn.results;
+
+      if (!lossReport || !results) return;
+      var canvas = this.refs.canvas;
+      canvas.width = window.innerWidth;
+      canvas.height = window.innerHeight;
+      canvas.style.width = canvas.width + 'px';
+      canvas.style.height = canvas.height + 'px';
+
+      var ctx = canvas.getContext('2d');
+      var w = canvas.width;
+      var h = canvas.height;
+      ctx.clearRect(0, 0, w, h);
+
+      var resultsByDate = results.map(function (file) {
+        if (!file.name.match(/^exp:/)) return null;
+        var dataset = file.name.split("-")[3].split(":")[1];
+        return [+new Date(file.date), dataset];
+      }).filter(function (a) {
+        return !!a;
+      }).sort(function (a, b) {
+        return a[0] - a[1];
+      });
+
+      var keys = Object.keys(lossReport).filter(function (k) {
+        return !!lossReport[k].length;
+      });
+      var scaleMax = 0;
+      var scaleMin = Infinity;
+      var epochsMax = 0;
+      keys.forEach(function (key) {
+        var loss = lossReport[key];
+        epochsMax = Math.max(loss.length, epochsMax);
+        loss.forEach(function (a) {
+          var v = parseFloat(a.training_loss);
+          if (!v) return;
+          scaleMax = Math.max(v, scaleMax);
+          scaleMin = Math.min(v, scaleMin);
+        });
+      });
+      // scaleMax *= 10
+      // console.log(scaleMax, scaleMin, epochsMax)
+
+      scaleMax = 3;
+      scaleMin = 0;
+      var margin = 0;
+      var wmin = 0;
+      var wmax = w / 2;
+      var hmin = 0;
+      var hmax = h / 2;
+      var epochsScaleFactor = 1; // 3/2
+
+      ctx.save();
+      var X = void 0,
+          Y = void 0;
+      for (var ii = 0; ii < epochsMax; ii++) {
+        X = lerp(ii / (epochsMax / epochsScaleFactor) * epochsScaleFactor, wmin, wmax);
+        ctx.strokeStyle = 'rgba(0,0,0,0.3)';
+        ctx.beginPath(0, 0);
+        ctx.moveTo(X, 0);
+        ctx.lineTo(X, h);
+        ctx.lineWidth = 0.5;
+        // ctx.stroke()
+        if ((ii + 1) % 6 === 0) {
+          ctx.lineWidth = 0.5;
+          ctx.stroke();
+          var fontSize = 12;
+          ctx.font = 'italic ' + fontSize + 'px "Georgia"';
+          ctx.fillStyle = 'rgba(0,12,28,0.6)';
+          ctx.fillText(ii / 5 * 6, X + 8, h - (fontSize + 4));
+        }
+      }
+      for (var ii = scaleMin; ii < scaleMax; ii += 1) {
+        Y = lerp(ii / scaleMax, hmin, hmax);
+        // ctx.strokeStyle = 'rgba(255,255,255,1.0)'
+        ctx.beginPath(0, 0);
+        ctx.moveTo(0, h - Y);
+        ctx.lineTo(w, h - Y);
+        ctx.lineWidth = 1;
+        // ctx.stroke()        
+        // if ( (ii % 1) < 0.1) {
+        // ctx.strokeStyle = 'rgba(255,255,255,1.0)'
+        ctx.lineWidth = 2;
+        ctx.setLineDash([4, 4]);
+        ctx.stroke();
+        ctx.stroke();
+        ctx.stroke();
+        ctx.setLineDash([1, 1]);
+        var _fontSize = 12;
+        ctx.font = 'italic ' + _fontSize + 'px "Georgia"';
+        ctx.fillStyle = 'rgba(0,12,28,0.6)';
+        ctx.fillText(ii.toFixed(1), w - 50, h - Y + _fontSize + 10);
+        // }
+      }
+      ctx.lineWidth = 1;
+      ctx.restore();
+
+      var min_date = resultsByDate[0][0];
+      var max_date = resultsByDate[resultsByDate.length - 1][0];
+      resultsByDate.forEach(function (pair) {
+        var date = pair[0];
+        var key = pair[1];
+        var loss = lossReport[key];
+        if (!key || !loss || !loss.length) return;
+        var vf = parseFloat(loss[loss.length - 1].training_loss) || 0;
+        var vg = parseFloat(loss[0].training_loss) || 5;
+        // console.log(vf)
+        var vv = 1 - norm(vf, scaleMin, scaleMax / 2);
+        ctx.lineWidth = (1 - norm(vf, scaleMin, scaleMax)) * 4;
+        // ctx.lineWidth = norm(date, min_date, max_date) * 3
+        // console.log(date, min_date, max_date)
+        ctx.strokeStyle = 'rgba(' + [randrange(30, 190), randrange(30, 150), randrange(60, 120)].join(',') + ',' + 0.8 + ')';
+        var begun = false;
+        loss.forEach(function (a, i) {
+          var v = parseFloat(a.training_loss);
+          if (!v) return;
+          var x = lerp(i / (epochsMax / epochsScaleFactor) * epochsScaleFactor, wmin, wmax);
+          var y = lerp(norm(v, scaleMin, scaleMax), hmax, hmin);
+          if (!begun) {
+            begun = true;
+            ctx.beginPath(0, 0);
+            ctx.moveTo(x, y);
+          } else {
+            ctx.lineTo(x, y);
+            // ctx.stroke()
+          }
+        });
+        ctx.stroke();
+        var i = loss.length - 1;
+        var v = parseFloat(loss[i].training_loss);
+        var x = lerp(i / (epochsMax / epochsScaleFactor) * epochsScaleFactor, wmin, wmax);
+        var y = lerp(norm(v, scaleMin, scaleMax), hmax, hmin);
+        var fontSize = 9;
+        ctx.font = 'italic ' + fontSize + 'px "Georgia"';
+        ctx.fillStyle = 'rgba(0,12,28,0.6)';
+        ctx.fillText(key, x + 4, y + fontSize / 2);
+      });
+    }
+  }]);
+
+  return SampleRNNGraph;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {
+    samplernn: state.module.samplernn
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    actions: (0, _redux.bindActionCreators)(samplernnActions, dispatch)
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SampleRNNGraph);
+
+/***/ }),
+
+/***/ "./app/client/modules/samplernn/views/samplernn.import.js":
+/*!****************************************************************!*\
+  !*** ./app/client/modules/samplernn/views/samplernn.import.js ***!
+  \****************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _util = __webpack_require__(/*! ../../../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _samplernn = __webpack_require__(/*! ../samplernn.actions */ "./app/client/modules/samplernn/samplernn.actions.js");
+
+var samplernnActions = _interopRequireWildcard(_samplernn);
+
+var _select = __webpack_require__(/*! ../../../common/select.component */ "./app/client/common/select.component.js");
+
+var _select2 = _interopRequireDefault(_select);
+
+var _textInput = __webpack_require__(/*! ../../../common/textInput.component */ "./app/client/common/textInput.component.js");
+
+var _textInput2 = _interopRequireDefault(_textInput);
+
+var _button = __webpack_require__(/*! ../../../common/button.component */ "./app/client/common/button.component.js");
+
+var _button2 = _interopRequireDefault(_button);
+
+var _dataset = __webpack_require__(/*! ../../../dataset/dataset.component */ "./app/client/dataset/dataset.component.js");
+
+var _dataset2 = _interopRequireDefault(_dataset);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var samplernnModule = {
+  name: 'samplernn',
+  datatype: 'audio'
+};
+
+var SampleRNNImport = function (_Component) {
+  _inherits(SampleRNNImport, _Component);
+
+  function SampleRNNImport() {
+    _classCallCheck(this, SampleRNNImport);
+
+    var _this = _possibleConstructorReturn(this, (SampleRNNImport.__proto__ || Object.getPrototypeOf(SampleRNNImport)).call(this));
+
+    _this.state = {
+      folder_id: 1,
+      import_action: 'Hotlink',
+      url_base: 'https://s3.amazonaws.com/i.asdf.us/bucky/data/4279/',
+      selected: {}
+    };
+    return _this;
+  }
+
+  _createClass(SampleRNNImport, [{
+    key: 'componentWillMount',
+    value: function componentWillMount() {
+      var id = this.props.match.params.id || localStorage.getItem('samplernn.last_id');
+      console.log('load dataset:', id);
+      var _props = this.props,
+          match = _props.match,
+          samplernn = _props.samplernn,
+          samplernnActions = _props.samplernnActions;
+
+      if (id === 'new') return;
+      if (id) {
+        if (parseInt(id)) localStorage.setItem('samplernn.last_id', id);
+        if (!samplernn.folder || samplernn.folder.id !== id) {
+          this.props.actions.load_directories(id);
+        }
+      }
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      var _this2 = this;
+
+      var samplernn = this.props.samplernn;
+
+      var datasets = [],
+          folder = void 0;
+      if (this.props.samplernn.data) {
+        datasets = (this.props.samplernn.data.folders || []).map(function (folder) {
+          return [folder.name, folder.id];
+        });
+        folder = this.props.samplernn.data.folderLookup.unsorted;
+      }
+      return (0, _preact.h)(
+        'div',
+        { className: 'app top' },
+        (0, _preact.h)(
+          'div',
+          { 'class': 'heading' },
+          (0, _preact.h)(
+            'h1',
+            null,
+            'Import'
+          )
+        ),
+        (0, _preact.h)(
+          'div',
+          { 'class': 'params form row datasets' },
+          (0, _preact.h)(
+            'div',
+            { 'class': 'row dataset' },
+            (0, _preact.h)('div', { 'class': 'col' }),
+            (0, _preact.h)('div', { 'class': 'col' }),
+            (0, _preact.h)('div', { 'class': 'col' }),
+            (0, _preact.h)(
+              'div',
+              { 'class': 'col' },
+              (0, _preact.h)(
+                'h2',
+                null,
+                'Import to dataset'
+              ),
+              (0, _preact.h)(_select2.default, {
+                title: 'Destination dataset',
+                options: datasets,
+                name: 'folder_id',
+                opt: this.state,
+                onChange: function onChange(name, value) {
+                  return _this2.setState({ folder_id: value });
+                }
+              }),
+              (0, _preact.h)(_select2.default, {
+                title: 'Import action',
+                options: ['Hotlink', 'Upload'],
+                name: 'import_action',
+                opt: this.state,
+                onChange: function onChange(name, value) {
+                  return _this2.setState({ import_action: value });
+                }
+              }),
+              (0, _preact.h)(_textInput2.default, {
+                title: 'Remote URL base',
+                value: this.state.url_base,
+                placeholder: 'http://',
+                onSave: function onSave(value) {
+                  return _this2.setState({ url_base: value });
+                }
+              }),
+              (0, _preact.h)(
+                _button2.default,
+                {
+                  title: '',
+                  onClick: function onClick() {
+                    return _this2.doImport();
+                  }
+                },
+                'Import'
+              )
+            )
+          )
+        ),
+        (0, _preact.h)(_dataset2.default, {
+          loading: samplernn.loading,
+          progress: samplernn.progress,
+          module: samplernnModule,
+          data: samplernn.data,
+          id: 'unsorted',
+          folder: folder,
+          history: this.props.history,
+          onPickDataset: function onPickDataset(dataset) {
+            return _this2.toggle(dataset.name, _this2.state.selected[name]);
+          },
+          beforeRow: function beforeRow(dataset) {
+            return _this2.beforeRow(dataset);
+          },
+          afterRow: function afterRow(dataset) {
+            return _this2.afterRow(dataset);
+          }
+        })
+      );
+    }
+  }, {
+    key: 'toggle',
+    value: function toggle(name) {
+      this.setState(_extends({}, this.state, {
+        selected: _extends({}, this.state.selected, _defineProperty({}, name, !this.state.selected[name]))
+      }));
+    }
+  }, {
+    key: 'beforeRow',
+    value: function beforeRow(dataset) {
+      // console.log(dataset)
+    }
+  }, {
+    key: 'afterRow',
+    value: function afterRow(dataset) {
+      var name = dataset.name;
+      return (0, _preact.h)(
+        'div',
+        null,
+        (0, _preact.h)('input', {
+          type: 'checkbox',
+          value: name,
+          checked: !!this.state.selected[name]
+        })
+      );
+    }
+  }, {
+    key: 'doImport',
+    value: function doImport() {
+      var samplernn = this.props.samplernn;
+
+      console.log(this.state);
+      this.props.actions.import_files(this.state, samplernn.data.datasetLookup, samplernn.data.fileLookup);
+    }
+  }]);
+
+  return SampleRNNImport;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {
+    samplernn: state.module.samplernn,
+    runner: state.system.runner,
+    task: state.task
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    actions: (0, _redux.bindActionCreators)(samplernnActions, dispatch)
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SampleRNNImport);
+
+/***/ }),
+
+/***/ "./app/client/modules/samplernn/views/samplernn.new.js":
+/*!*************************************************************!*\
+  !*** ./app/client/modules/samplernn/views/samplernn.new.js ***!
+  \*************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _reactRouterDom = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
+
+var _util = __webpack_require__(/*! ../../../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _common = __webpack_require__(/*! ../../../common */ "./app/client/common/index.js");
+
+var _samplernn = __webpack_require__(/*! ../samplernn.actions */ "./app/client/modules/samplernn/samplernn.actions.js");
+
+var samplernnActions = _interopRequireWildcard(_samplernn);
+
+var _samplernn2 = __webpack_require__(/*! ../samplernn.module */ "./app/client/modules/samplernn/samplernn.module.js");
+
+var _samplernn3 = _interopRequireDefault(_samplernn2);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function SampleRNNNew(props) {
+  return (0, _preact.h)(_common.Views.New, {
+    db: props.samplernn,
+    path: '/samplernn/datasets/',
+    actions: props.actions,
+    module: _samplernn3.default,
+    history: props.history
+  });
+}
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {
+    samplernn: state.module.samplernn
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    actions: (0, _redux.bindActionCreators)(samplernnActions, dispatch)
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SampleRNNNew);
+
+/***/ }),
+
+/***/ "./app/client/modules/samplernn/views/samplernn.results.js":
+/*!*****************************************************************!*\
+  !*** ./app/client/modules/samplernn/views/samplernn.results.js ***!
+  \*****************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRouterDom = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _util = __webpack_require__(/*! ../../../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _samplernn = __webpack_require__(/*! ../samplernn.actions */ "./app/client/modules/samplernn/samplernn.actions.js");
+
+var samplernnActions = _interopRequireWildcard(_samplernn);
+
+var _audioPlayer = __webpack_require__(/*! ../../../common/audioPlayer/audioPlayer.actions */ "./app/client/common/audioPlayer/audioPlayer.actions.js");
+
+var audioPlayerActions = _interopRequireWildcard(_audioPlayer);
+
+var _loading = __webpack_require__(/*! ../../../common/loading.component */ "./app/client/common/loading.component.js");
+
+var _loading2 = _interopRequireDefault(_loading);
+
+var _fileList = __webpack_require__(/*! ../../../common/fileList.component */ "./app/client/common/fileList.component.js");
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var SampleRNNResults = function (_Component) {
+  _inherits(SampleRNNResults, _Component);
+
+  function SampleRNNResults(props) {
+    _classCallCheck(this, SampleRNNResults);
+
+    var _this = _possibleConstructorReturn(this, (SampleRNNResults.__proto__ || Object.getPrototypeOf(SampleRNNResults)).call(this));
+
+    if (!props.samplernn.data) props.actions.load_directories();
+    return _this;
+  }
+
+  _createClass(SampleRNNResults, [{
+    key: 'render',
+    value: function render() {
+      var _this2 = this;
+
+      if (this.props.samplernn.loading) return (0, _preact.h)(_loading2.default, { progress: this.props.samplernn.progress });
+      var _props$samplernn$data = this.props.samplernn.data,
+          folderLookup = _props$samplernn$data.folderLookup,
+          fileLookup = _props$samplernn$data.fileLookup,
+          datasetLookup = _props$samplernn$data.datasetLookup;
+      // const { folderLookup } = samplernn
+
+      var renders = Object.keys(folderLookup).sort(_util2.default.sort.stringSort.asc).map(function (key) {
+        var folder = folderLookup[key];
+
+        var _util$sort$orderByFn = _util2.default.sort.orderByFn('epoch desc'),
+            mapFn = _util$sort$orderByFn.mapFn,
+            sortFn = _util$sort$orderByFn.sortFn;
+
+        var datasetPairs = folder.datasets.map(function (name) {
+          return datasetLookup[name];
+        }).map(mapFn).sort(sortFn);
+        var bestRenders = datasetPairs.map(function (pair) {
+          return pair[1];
+        }).filter(function (dataset) {
+          return dataset.output.length;
+        }).map(function (dataset) {
+          var output = dataset.output;
+
+          return output.map(function (id) {
+            return fileLookup[id];
+          }).map(mapFn).sort(sortFn)[0][1];
+        });
+        // console.log(bestRenders.map(r => r.epoch))
+        var path = folder.name === 'unsorted' ? "/samplernn/import/" : "/samplernn/datasets/" + folder.id + "/";
+        return (0, _preact.h)(
+          'div',
+          { className: 'col bestRenders' },
+          (0, _preact.h)(
+            'h3',
+            null,
+            (0, _preact.h)(
+              _reactRouterDom.Link,
+              { to: path },
+              folder.name
+            )
+          ),
+          (0, _preact.h)(_fileList.FileList, {
+            linkFiles: true,
+            files: bestRenders,
+            orderBy: 'date desc',
+            fields: 'name date epoch size',
+            onClick: function onClick(file, e) {
+              e.preventDefault();
+              e.stopPropagation();
+              console.log('picked a file', file);
+              _this2.handlePick(file);
+            }
+          })
+        );
+      });
+
+      return (0, _preact.h)(
+        'div',
+        { className: 'app samplernn' },
+        (0, _preact.h)(
+          'div',
+          { className: 'heading row middle' },
+          (0, _preact.h)(
+            'h1',
+            null,
+            'SampleRNN Results'
+          )
+        ),
+        (0, _preact.h)(
+          'div',
+          { 'class': 'rows params renders' },
+          renders
+        )
+      );
+    }
+  }, {
+    key: 'handlePick',
+    value: function handlePick(file) {
+      this.props.audioPlayer.play(file);
+    }
+  }]);
+
+  return SampleRNNResults;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {
+    samplernn: state.module.samplernn
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    actions: (0, _redux.bindActionCreators)(samplernnActions, dispatch),
+    audioPlayer: (0, _redux.bindActionCreators)(audioPlayerActions, dispatch)
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SampleRNNResults);
+
+/***/ }),
+
+/***/ "./app/client/modules/samplernn/views/samplernn.show.js":
+/*!**************************************************************!*\
+  !*** ./app/client/modules/samplernn/views/samplernn.show.js ***!
+  \**************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _util = __webpack_require__(/*! ../../../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _samplernn = __webpack_require__(/*! ../samplernn.actions */ "./app/client/modules/samplernn/samplernn.actions.js");
+
+var samplernnActions = _interopRequireWildcard(_samplernn);
+
+var _samplernn2 = __webpack_require__(/*! ../samplernn.tasks */ "./app/client/modules/samplernn/samplernn.tasks.js");
+
+var samplernnTasks = _interopRequireWildcard(_samplernn2);
+
+var _audioPlayer = __webpack_require__(/*! ../../../common/audioPlayer/audioPlayer.actions */ "./app/client/common/audioPlayer/audioPlayer.actions.js");
+
+var audioPlayerActions = _interopRequireWildcard(_audioPlayer);
+
+var _common = __webpack_require__(/*! ../../../common */ "./app/client/common/index.js");
+
+var _dataset = __webpack_require__(/*! ../../../dataset/dataset.form */ "./app/client/dataset/dataset.form.js");
+
+var _dataset2 = _interopRequireDefault(_dataset);
+
+var _upload = __webpack_require__(/*! ../../../dataset/upload.status */ "./app/client/dataset/upload.status.js");
+
+var _upload2 = _interopRequireDefault(_upload);
+
+var _dataset3 = __webpack_require__(/*! ../../../dataset/dataset.component */ "./app/client/dataset/dataset.component.js");
+
+var _dataset4 = _interopRequireDefault(_dataset3);
+
+var _samplernn3 = __webpack_require__(/*! ../samplernn.module */ "./app/client/modules/samplernn/samplernn.module.js");
+
+var _samplernn4 = _interopRequireDefault(_samplernn3);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var SampleRNNShow = function (_Component) {
+  _inherits(SampleRNNShow, _Component);
+
+  function SampleRNNShow(props) {
+    _classCallCheck(this, SampleRNNShow);
+
+    var _this = _possibleConstructorReturn(this, (SampleRNNShow.__proto__ || Object.getPrototypeOf(SampleRNNShow)).call(this, props));
+
+    _this.datasetActions = _this.datasetActions.bind(_this);
+    return _this;
+  }
+
+  _createClass(SampleRNNShow, [{
+    key: 'componentWillMount',
+    value: function componentWillMount() {
+      var id = this.props.match.params.id || localStorage.getItem('samplernn.last_id');
+      console.log('load dataset:', id);
+      var _props = this.props,
+          match = _props.match,
+          samplernn = _props.samplernn,
+          actions = _props.actions;
+
+      if (id === 'new') return;
+      if (id) {
+        if (parseInt(id)) localStorage.setItem('samplernn.last_id', id);
+        if (!samplernn.folder || samplernn.folder.id !== id) {
+          // console.log('looooooooooad', id)
+          actions.load_directories(id);
+        }
+      } else {
+        this.props.history.push('/samplernn/new/');
+      }
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      var _this2 = this;
+
+      var _props2 = this.props,
+          samplernn = _props2.samplernn,
+          runner = _props2.runner,
+          match = _props2.match,
+          history = _props2.history;
+
+      var _ref = samplernn.data || {},
+          folderLookup = _ref.folderLookup;
+      // console.log(runner)
+
+
+      var folder = (folderLookup || {})[samplernn.folder_id] || {};
+      return (0, _preact.h)(
+        'div',
+        { className: 'app samplernn' },
+        (0, _preact.h)(
+          'div',
+          { className: 'heading' },
+          (0, _preact.h)(
+            'h1',
+            null,
+            folder ? folder.name : (0, _preact.h)(_common.Loading, null)
+          )
+        ),
+        (0, _preact.h)(
+          'div',
+          { className: 'row' },
+          folder && folder.name && folder.name !== 'unsorted' && (0, _preact.h)(_dataset2.default, {
+            title: 'Add Files',
+            module: _samplernn4.default,
+            folder: folder,
+            canUpload: true, canAddURL: true
+          }),
+          (0, _preact.h)(
+            'div',
+            null,
+            (0, _preact.h)(_upload2.default, null),
+            (0, _preact.h)(_common.CurrentTask, { processor: 'gpu' })
+          )
+        ),
+        (0, _preact.h)(_dataset4.default, {
+          loading: samplernn.loading,
+          progress: samplernn.progress,
+          id: samplernn.folder_id,
+          module: _samplernn4.default,
+          data: samplernn.data,
+          folder: folder,
+          history: history,
+          onPickFile: function onPickFile(file, e) {
+            e.preventDefault();
+            e.stopPropagation();
+            // console.log('picked a file', file)
+            _this2.handlePick(file);
+          },
+          datasetActions: this.datasetActions
+        })
+      );
+    }
+  }, {
+    key: 'datasetActions',
+    value: function datasetActions(dataset) {
+      var isFetching = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+      var isProcessing = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+      var _props3 = this.props,
+          samplernn = _props3.samplernn,
+          remote = _props3.remote;
+
+      var input = samplernn.data.fileLookup[dataset.input[0]];
+      if (!input) return null;
+      if (input.name && input.name.match(/(gif|jpe?g|png)$/i)) return null;
+      return (0, _preact.h)(
+        'div',
+        null,
+        (0, _preact.h)(
+          'div',
+          { 'class': 'actions' },
+          (0, _preact.h)(
+            'span',
+            { 'class': 'link', onClick: function onClick() {
+                return remote.train_task(dataset, samplernn.folder_id, 1);
+              } },
+            'train'
+          ),
+          (0, _preact.h)(
+            'span',
+            { 'class': 'link', onClick: function onClick() {
+                return remote.train_task(dataset, samplernn.folder_id, 2);
+              } },
+            '2x'
+          ),
+          (0, _preact.h)(
+            'span',
+            { 'class': 'link', onClick: function onClick() {
+                return remote.train_task(dataset, samplernn.folder_id, 4);
+              } },
+            '4x'
+          ),
+          (0, _preact.h)(
+            'span',
+            { 'class': 'link', onClick: function onClick() {
+                return remote.train_task(dataset, samplernn.folder_id, 6);
+              } },
+            '6x'
+          ),
+          (0, _preact.h)(
+            'span',
+            { 'class': 'link', onClick: function onClick() {
+                return remote.train_task(dataset, samplernn.folder_id, 18);
+              } },
+            '18x'
+          )
+        ),
+        dataset.isBuilt ? (0, _preact.h)(
+          'div',
+          { 'class': 'subtext' },
+          'fetched ',
+          (0, _preact.h)(
+            'span',
+            { 'class': 'link', onClick: function onClick() {
+                return remote.clear_cache_task(dataset);
+              } },
+            'x'
+          )
+        ) : isFetching ? (0, _preact.h)(
+          'div',
+          { 'class': 'subtext' },
+          'fetching'
+        ) : (0, _preact.h)(
+          'div',
+          { 'class': 'subtext' },
+          (0, _preact.h)(
+            'span',
+            { 'class': 'link', onClick: function onClick() {
+                return remote.fetch_task(input.url, samplernn.folder_id, input.id, dataset.name);
+              } },
+            'fetch'
+          )
+        )
+      );
+    }
+  }, {
+    key: 'handlePick',
+    value: function handlePick(file) {
+      // console.log(file)
+      this.props.audioPlayer.play(file);
+    }
+  }]);
+
+  return SampleRNNShow;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {
+    samplernn: state.module.samplernn,
+    runner: state.system.runner
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    actions: (0, _redux.bindActionCreators)(samplernnActions, dispatch),
+    remote: (0, _redux.bindActionCreators)(samplernnTasks, dispatch),
+    audioPlayer: (0, _redux.bindActionCreators)(audioPlayerActions, dispatch)
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SampleRNNShow);
+
+/***/ }),
+
+/***/ "./app/client/queue/queue.actions.js":
+/*!*******************************************!*\
+  !*** ./app/client/queue/queue.actions.js ***!
+  \*******************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.stop_queue = exports.start_queue = exports.add_task = exports.stop_task = exports.start_task = undefined;
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _socket = __webpack_require__(/*! ../socket */ "./app/client/socket/index.js");
+
+var _socket2 = _interopRequireDefault(_socket);
+
+var _types = __webpack_require__(/*! ../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _actions = __webpack_require__(/*! ../actions */ "./app/client/actions.js");
+
+var _actions2 = _interopRequireDefault(_actions);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var start_task = exports.start_task = function start_task(task) {
+  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+  _socket2.default.task.start_task(task, opt);
+  return _extends({ type: _types2.default.task.starting_task, task: task }, opt);
+};
+
+var stop_task = exports.stop_task = function stop_task(task) {
+  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+  _socket2.default.task.stop_task(task, opt);
+  return _extends({ type: _types2.default.task.stopping_task, task: task }, opt);
+};
+
+var add_task = exports.add_task = function add_task(new_task) {
+  return function (dispatch) {
+    _actions2.default.task.create(new_task).then(function (task) {
+      _socket2.default.task.add_task(task);
+    });
+  };
+};
+
+var start_queue = exports.start_queue = function start_queue(task) {
+  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+  _socket2.default.task.start_queue(task, opt);
+  return _extends({ type: _types2.default.task.starting_queue, task: task }, opt);
+};
+
+var stop_queue = exports.stop_queue = function stop_queue(task) {
+  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+  _socket2.default.task.stop_queue(task, opt);
+  return _extends({ type: _types2.default.task.stopping_queue, task: task }, opt);
+};
+
+/***/ }),
+
+/***/ "./app/client/queue/queue.reducer.js":
+/*!*******************************************!*\
+  !*** ./app/client/queue/queue.reducer.js ***!
+  \*******************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _types = __webpack_require__(/*! ../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _util = __webpack_require__(/*! ../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _moment = __webpack_require__(/*! moment/min/moment.min */ "./node_modules/moment/min/moment.min.js");
+
+var _moment2 = _interopRequireDefault(_moment);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+var queueInitialState = {
+  loading: false,
+  error: null,
+  tasks: {},
+  queue: [],
+  completed: []
+};
+
+var dateSort = _util2.default.sort.orderByFn('updated_at desc');
+var prioritySort = _util2.default.sort.orderByFn('priority asc');
+
+var queueReducer = function queueReducer() {
+  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : queueInitialState;
+  var action = arguments[1];
+
+  switch (action.type) {
+    case _types2.default.task.index:
+      return _extends({}, state, {
+        tasks: action.data.reduce(function (a, b) {
+          return a[b.id] = b, a;
+        }, {}),
+        queue: action.data.filter(function (a) {
+          return !a.completed;
+        }).map(dateSort.mapFn).sort(dateSort.sortFn).map(function (pair) {
+          return pair[1].id;
+        }),
+        completed: action.data.filter(function (a) {
+          return a.completed;
+        }).map(prioritySort.mapFn).sort(prioritySort.sortFn).map(function (pair) {
+          return pair[1].id;
+        })
+      });
+    case _types2.default.task.create:
+      console.log(action.data);
+      return _extends({}, state, {
+        tasks: _extends({}, state.tasks, _defineProperty({}, action.data.id, action.data)),
+        queue: state.queue.concat([action.data.id])
+      });
+    case _types2.default.task.update:
+      return _extends({}, state, {
+        tasks: _extends({}, state.tasks, _defineProperty({}, action.data.id, action.data))
+      });
+    case _types2.default.task.destroy:
+      var _state$tasks = state.tasks,
+          deletedTask = _state$tasks[action.data.id],
+          taskLookup = _objectWithoutProperties(_state$tasks, [action.data.id]);
+
+      return _extends({}, state, {
+        queue: state.queue.filter(function (id) {
+          return id !== deletedTask.id;
+        }),
+        completed: state.completed.filter(function (id) {
+          return id !== deletedTask.id;
+        }),
+        tasks: taskLookup
+      });
+    case _types2.default.task.task_finish:
+      return _extends({}, state, {
+        queue: state.queue.filter(function (a) {
+          return a !== action.task.id;
+        }),
+        completed: [action.task.id].concat(state.completed)
+      });
+    default:
+      return state;
+  }
+};
+
+exports.default = queueReducer;
+
+/***/ }),
+
+/***/ "./app/client/socket/index.js":
+/*!************************************!*\
+  !*** ./app/client/socket/index.js ***!
+  \************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _store = __webpack_require__(/*! ../store */ "./app/client/store.js");
+
+var _types = __webpack_require__(/*! ../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _socket = __webpack_require__(/*! ./socket.connection */ "./app/client/socket/socket.connection.js");
+
+var _socket2 = __webpack_require__(/*! ./socket.actions */ "./app/client/socket/socket.actions.js");
+
+var actions = _interopRequireWildcard(_socket2);
+
+var _socket3 = __webpack_require__(/*! ./socket.system */ "./app/client/socket/socket.system.js");
+
+var system = _interopRequireWildcard(_socket3);
+
+var _socket4 = __webpack_require__(/*! ./socket.live */ "./app/client/socket/socket.live.js");
+
+var live = _interopRequireWildcard(_socket4);
+
+var _socket5 = __webpack_require__(/*! ./socket.task */ "./app/client/socket/socket.task.js");
+
+var task = _interopRequireWildcard(_socket5);
+
+var _socket6 = __webpack_require__(/*! ./socket.api */ "./app/client/socket/socket.api.js");
+
+var api = _interopRequireWildcard(_socket6);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = {
+  socket: _socket.socket,
+  actions: actions,
+  system: system,
+  live: live,
+  task: task,
+  api: api
+};
+
+
+_socket.socket.on('status', function (data) {
+  console.log('got status', data.key, data.value);
+  _store.store.dispatch(_extends({ type: _types2.default.socket.status }, data));
+  switch (data.key) {
+    case 'processing':
+      _store.store.dispatch(_extends({
+        type: 'SET_PARAM'
+      }, data));
+      break;
+    default:
+      break;
+  }
+});
+
+/***/ }),
+
+/***/ "./app/client/socket/socket.actions.js":
+/*!*********************************************!*\
+  !*** ./app/client/socket/socket.actions.js ***!
+  \*********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.syscall_async = exports.upload_file = exports.run_script = exports.list_sequences = exports.count_directory = exports.list_directory = exports.disk_usage = exports.run_system_command = undefined;
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _v = __webpack_require__(/*! uuid/v1 */ "./node_modules/uuid/v1.js");
+
+var _v2 = _interopRequireDefault(_v);
+
+var _socket = __webpack_require__(/*! ./socket.connection */ "./app/client/socket/socket.connection.js");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var run_system_command = exports.run_system_command = function run_system_command(opt) {
+  return syscall_async('run_system_command', opt);
+};
+var disk_usage = exports.disk_usage = function disk_usage(opt) {
+  return syscall_async('run_system_command', _extends({ cmd: 'du' }, opt));
+};
+var list_directory = exports.list_directory = function list_directory(opt) {
+  return syscall_async('list_directory', opt).then(function (res) {
+    return res.files;
+  });
+};
+var count_directory = exports.count_directory = function count_directory(opt) {
+  return syscall_async('count_directory', opt).then(function (res) {
+    return res.count;
+  });
+};
+var list_sequences = exports.list_sequences = function list_sequences(opt) {
+  return syscall_async('list_sequences', opt).then(function (res) {
+    return res.sequences;
+  });
+};
+var run_script = exports.run_script = function run_script(opt) {
+  return syscall_async('run_script', opt);
+};
+var upload_file = exports.upload_file = function upload_file(opt) {
+  return syscall_async('upload_file', opt);
+};
+
+var syscall_async = exports.syscall_async = function syscall_async(tag, payload) {
+  var ttl = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10000;
+
+  ttl = payload.ttl || ttl;
+  return new Promise(function (resolve, reject) {
+    var uuid = (0, _v2.default)();
+    var timeout = setTimeout(function () {
+      _socket.socket.off('system_res', cb);
+      reject('timeout');
+    }, ttl);
+    var cb = function cb(data) {
+      if (!data.uuid) return;
+      if (data.uuid === uuid) {
+        clearTimeout(timeout);
+        _socket.socket.off('system_res', cb);
+        resolve(data);
+      }
+    };
+    _socket.socket.emit('system', { cmd: tag, payload: payload, uuid: uuid });
+    _socket.socket.on('system_res', cb);
+  });
+};
+
+/***/ }),
+
+/***/ "./app/client/socket/socket.api.js":
+/*!*****************************************!*\
+  !*** ./app/client/socket/socket.api.js ***!
+  \*****************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var _store = __webpack_require__(/*! ../store */ "./app/client/store.js");
+
+var _types = __webpack_require__(/*! ../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _socket = __webpack_require__(/*! ./socket.connection */ "./app/client/socket/socket.connection.js");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+_socket.socket.on('api_res', function (data) {
+  // console.log('system response', data)
+  data = parse(data);
+  var type = _types2.default[data.datatype];
+  console.log('api_res', data.type, data.datatype);
+  if (!type) return console.error('socket:api_res bad datatype', data.datatype);
+  switch (data.type) {
+    case 'create':
+      return (0, _store.dispatch)({
+        type: type.create,
+        source: 'socket',
+        data: data.data
+      });
+    case 'update':
+      return (0, _store.dispatch)({
+        type: type.update,
+        source: 'socket',
+        data: data.data
+      });
+    case 'destroy':
+      return (0, _store.dispatch)({
+        type: type.destroy,
+        source: 'socket',
+        data: data.data
+      });
+    default:
+      break;
+  }
+});
+
+function parse(s) {
+  if (typeof s === 'string') {
+    try {
+      var d = JSON.parse(s);
+      return d;
+    } catch (e) {
+      console.error('not valid json');
+      return s;
+    }
+  }
+  return s;
+}
+
+/***/ }),
+
+/***/ "./app/client/socket/socket.connection.js":
+/*!************************************************!*\
+  !*** ./app/client/socket/socket.connection.js ***!
+  \************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.socket = undefined;
+
+var _store = __webpack_require__(/*! ../store */ "./app/client/store.js");
+
+var _types = __webpack_require__(/*! ../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var socket = exports.socket = io.connect('/client');
+
+// SOCKET ACTIONS
+
+socket.on('connect', function () {
+  return _store.store.dispatch({ type: _types2.default.socket.connect });
+});
+socket.on('connect_error', function (error) {
+  return _store.store.dispatch({ type: _types2.default.socket.connect_error, error: error });
+});
+socket.on('reconnect', function (attempt) {
+  return _store.store.dispatch({ type: _types2.default.socket.reconnect, attempt: attempt });
+});
+socket.on('reconnecting', function () {
+  return _store.store.dispatch({ type: _types2.default.socket.reconnecting });
+});
+socket.on('reconnect_error', function (error) {
+  return _store.store.dispatch({ type: _types2.default.socket.reconnect_error, error: error });
+});
+socket.on('reconnect_failed', function (error) {
+  return _store.store.dispatch({ type: _types2.default.socket.reconnect_failed, error: error });
+});
+socket.on('disconnect', function () {
+  return _store.store.dispatch({ type: _types2.default.socket.disconnect });
+});
+socket.on('error', function (error) {
+  return _store.store.dispatch({ type: _types2.default.socket.error, error: error });
+});
+
+/***/ }),
+
+/***/ "./app/client/socket/socket.live.js":
+/*!******************************************!*\
+  !*** ./app/client/socket/socket.live.js ***!
+  \******************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.list_checkpoints = list_checkpoints;
+exports.list_all_checkpoints = list_all_checkpoints;
+exports.list_epochs = list_epochs;
+exports.list_sequences = list_sequences;
+exports.load_epoch = load_epoch;
+exports.load_sequence = load_sequence;
+exports.seek = seek;
+exports.pause = pause;
+exports.play = play;
+exports.get_params = get_params;
+exports.set_param = set_param;
+
+var _store = __webpack_require__(/*! ../store */ "./app/client/store.js");
+
+var _types = __webpack_require__(/*! ../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _player = __webpack_require__(/*! ../live/player */ "./app/client/live/player.js");
+
+var player = _interopRequireWildcard(_player);
+
+var _socket = __webpack_require__(/*! ./socket.connection */ "./app/client/socket/socket.connection.js");
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+_socket.socket.on('res', function (data) {
+  // console.log('socket:', data.cmd)
+  switch (data.cmd) {
+    case 'get_last_frame':
+      if (data.res !== 'working') {
+        _socket.socket.emit('cmd', {
+          cmd: 'get_last_frame'
+        });
+      }
+      break;
+    case 'get_params':
+      data.res && (0, _store.dispatch)({
+        type: _types2.default.socket.load_params,
+        opt: data.res
+      });
+      data.res && player.toggleFPS(data.res.processing);
+      break;
+    case 'list_checkpoints':
+      (0, _store.dispatch)({
+        type: _types2.default.socket.list_checkpoints,
+        checkpoints: data.res
+      });
+      break;
+    case 'list_all_checkpoints':
+      (0, _store.dispatch)({
+        type: _types2.default.socket.list_all_checkpoints,
+        checkpoints: data.res
+      });
+      break;
+    case 'list_epochs':
+      (0, _store.dispatch)({
+        type: _types2.default.socket.list_epochs,
+        epochs: data.res
+      });
+      break;
+    case 'list_sequences':
+      (0, _store.dispatch)({
+        type: _types2.default.socket.list_sequences,
+        sequences: data.res
+      });
+      break;
+    default:
+      break;
+  }
+  // console.log(data)
+});
+
+_socket.socket.on('frame', player.onFrame);
+
+function list_checkpoints(module) {
+  _socket.socket.emit('cmd', {
+    cmd: 'list_checkpoints',
+    payload: module
+  });
+}
+function list_all_checkpoints(module) {
+  _socket.socket.emit('cmd', {
+    cmd: 'list_all_checkpoints',
+    payload: module
+  });
+}
+function list_epochs(module, checkpoint_name) {
+  _socket.socket.emit('cmd', {
+    cmd: 'list_epochs',
+    payload: module === 'pix2pix' || module === 'pix2wav' ? module + '/' + checkpoint_name : checkpoint_name
+  });
+}
+function list_sequences(module) {
+  _socket.socket.emit('cmd', {
+    cmd: 'list_sequences',
+    payload: module
+  });
+}
+function load_epoch(checkpoint_name, epoch) {
+  console.log(">> SWITCH CHECKPOINT", checkpoint_name, epoch);
+  _socket.socket.emit('cmd', {
+    cmd: 'load_epoch',
+    payload: checkpoint_name + ':' + epoch
+  });
+}
+function load_sequence(sequence) {
+  _socket.socket.emit('cmd', {
+    cmd: 'load_sequence',
+    payload: sequence
+  });
+}
+function seek(frame) {
+  _socket.socket.emit('cmd', {
+    cmd: 'seek',
+    payload: frame
+  });
+}
+function pause(frame) {
+  _socket.socket.emit('cmd', {
+    cmd: 'pause'
+  });
+}
+function play(frame) {
+  _socket.socket.emit('cmd', {
+    cmd: 'play'
+  });
+}
+function get_params() {
+  _socket.socket.emit('cmd', {
+    cmd: 'get_params'
+  });
+}
+function set_param(key, value) {
+  _socket.socket.emit('cmd', {
+    cmd: 'set_param',
+    payload: {
+      'key': key,
+      'value': value
+    }
+  });
+}
+
+/***/ }),
+
+/***/ "./app/client/socket/socket.system.js":
+/*!********************************************!*\
+  !*** ./app/client/socket/socket.system.js ***!
+  \********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var _store = __webpack_require__(/*! ../store */ "./app/client/store.js");
+
+var _types = __webpack_require__(/*! ../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _socket = __webpack_require__(/*! ./socket.connection */ "./app/client/socket/socket.connection.js");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+_socket.socket.on('system_res', function (data) {
+  // console.log('system response', data)
+  switch (data.type) {
+    case 'relay_connected':
+      return (0, _store.dispatch)({
+        type: _types2.default.system.relay_connected
+      });
+    case 'relay_disconnected':
+      return (0, _store.dispatch)({
+        type: _types2.default.system.relay_disconnected
+      });
+    case 'rpc_connected':
+      return (0, _store.dispatch)({
+        type: _types2.default.system.rpc_connected,
+        runner: data.runner
+      });
+    case 'rpc_disconnected':
+      return (0, _store.dispatch)({
+        type: _types2.default.system.rpc_disconnected
+      });
+    case 'relay_status':
+      return (0, _store.dispatch)({
+        type: data.rpc_connected ? _types2.default.system.rpc_connected : _types2.default.system.rpc_disconnected,
+        runner: data.runner
+      });
+    case 'site':
+      return (0, _store.dispatch)({
+        type: _types2.default.system.load_site,
+        site: data.site
+      });
+    default:
+      break;
+  }
+});
+
+/***/ }),
+
+/***/ "./app/client/socket/socket.task.js":
+/*!******************************************!*\
+  !*** ./app/client/socket/socket.task.js ***!
+  \******************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.stop_queue = exports.start_queue = exports.stop_task = exports.start_task = exports.remove_task = exports.add_task = undefined;
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+exports.emit = emit;
+
+var _store = __webpack_require__(/*! ../store */ "./app/client/store.js");
+
+var _types = __webpack_require__(/*! ../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _socket = __webpack_require__(/*! ./socket.connection */ "./app/client/socket/socket.connection.js");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var finishTimeout = void 0;
+
+_socket.socket.on('task_res', function (raw_data) {
+  // does not like the nested task object for some reason..
+  var data = void 0;
+  try {
+    if (typeof raw_data === 'string') {
+      data = JSON.parse(raw_data);
+      if (typeof data === 'string') {
+        data = JSON.parse(data);
+      }
+    } else {
+      data = raw_data;
+    }
+  } catch (e) {
+    console.warn('problem with json', e);
+    return;
+  }
+  if (data.task) {
+    (0, _store.dispatch)({ type: _types2.default.task.update, data: data.task });
+  }
+  // console.log('task', data.type)
+  switch (data.type) {
+    case 'start':
+      // return dispatch({ type: types.system.rpc_connected, runner: data.runner })
+      break;
+    case 'stop':
+      break;
+    // begin and finish calls often arrive out of order, if the old task was preempted
+    case 'task_begin':
+      (0, _store.dispatch)({ type: _types2.default.task.task_begin, task: data.task });
+      break;
+    case 'task_finish':
+      (0, _store.dispatch)({ type: _types2.default.task.task_finish, task: data.task });
+      break;
+    case 'kill':
+      break;
+    case 'stdout':
+      return (0, _store.dispatch)({ type: _types2.default.system.stdout, data: data });
+      break;
+    case 'stderr':
+      return (0, _store.dispatch)({ type: _types2.default.system.stderr, data: data });
+      break;
+    case 'add':
+      break;
+    case 'remove':
+      break;
+    case 'start_queue':
+      break;
+    case 'stop_queue':
+      break;
+    case 'list':
+      break;
+    case 'set_priority':
+      break;
+    case 'progress':
+      (0, _store.dispatch)({ type: _types2.default.task.progress, task: data.task });
+      break;
+    case 'epoch':
+      (0, _store.dispatch)({ type: _types2.default.task.epoch, task: data.task });
+      break;
+    case 'task_error':
+      return console.log('task error', data);
+    default:
+      console.log(data);
+      return console.log('no such task command', data.type);
+  }
+});
+
+function emit(type) {
+  var task = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+  var opt = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+
+  _socket.socket.emit('task', _extends({ type: type, task: task }, opt));
+}
+
+var add_task = exports.add_task = function add_task(task) {
+  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+  return emit('add', task, opt);
+};
+var remove_task = exports.remove_task = function remove_task(task) {
+  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+  return emit('remove', task, opt);
+};
+var start_task = exports.start_task = function start_task(task) {
+  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+  return emit('start', task, opt);
+};
+var stop_task = exports.stop_task = function stop_task(task) {
+  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+  return emit('stop', task, opt);
+};
+var start_queue = exports.start_queue = function start_queue() {
+  var opt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+  return emit('start_queue', {}, opt);
+};
+var stop_queue = exports.stop_queue = function stop_queue() {
+  var opt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+  return emit('stop_queue', {}, opt);
+};
+
+/***/ }),
+
+/***/ "./app/client/store.js":
+/*!*****************************!*\
+  !*** ./app/client/store.js ***!
+  \*****************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.dispatch = exports.store = exports.history = undefined;
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRouterRedux = __webpack_require__(/*! react-router-redux */ "./node_modules/react-router-redux/lib/index.js");
+
+var _reduxThunk = __webpack_require__(/*! redux-thunk */ "./node_modules/redux-thunk/lib/index.js");
+
+var _reduxThunk2 = _interopRequireDefault(_reduxThunk);
+
+var _createBrowserHistory = __webpack_require__(/*! history/createBrowserHistory */ "./node_modules/history/createBrowserHistory.js");
+
+var _createBrowserHistory2 = _interopRequireDefault(_createBrowserHistory);
+
+var _auth = __webpack_require__(/*! ./auth/auth.reducer */ "./app/client/auth/auth.reducer.js");
+
+var _auth2 = _interopRequireDefault(_auth);
+
+var _live = __webpack_require__(/*! ./live/live.reducer */ "./app/client/live/live.reducer.js");
+
+var _live2 = _interopRequireDefault(_live);
+
+var _queue = __webpack_require__(/*! ./queue/queue.reducer */ "./app/client/queue/queue.reducer.js");
+
+var _queue2 = _interopRequireDefault(_queue);
+
+var _system = __webpack_require__(/*! ./system/system.reducer */ "./app/client/system/system.reducer.js");
+
+var _system2 = _interopRequireDefault(_system);
+
+var _upload = __webpack_require__(/*! ./dataset/upload.reducer */ "./app/client/dataset/upload.reducer.js");
+
+var _upload2 = _interopRequireDefault(_upload);
+
+var _browser = __webpack_require__(/*! ./browser/browser.reducer */ "./app/client/browser/browser.reducer.js");
+
+var _browser2 = _interopRequireDefault(_browser);
+
+var _dashboard = __webpack_require__(/*! ./dashboard/dashboard.reducer */ "./app/client/dashboard/dashboard.reducer.js");
+
+var _dashboard2 = _interopRequireDefault(_dashboard);
+
+var _audioPlayer = __webpack_require__(/*! ./common/audioPlayer/audioPlayer.reducer */ "./app/client/common/audioPlayer/audioPlayer.reducer.js");
+
+var _audioPlayer2 = _interopRequireDefault(_audioPlayer);
+
+var _module = __webpack_require__(/*! ./modules/module.reducer */ "./app/client/modules/module.reducer.js");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var appReducer = (0, _redux.combineReducers)({
+  router: _reactRouterRedux.routerReducer,
+  auth: _auth2.default,
+  live: _live2.default,
+  queue: _queue2.default,
+  system: _system2.default,
+  upload: _upload2.default,
+  browser: _browser2.default,
+  dashboard: _dashboard2.default,
+  audioPlayer: _audioPlayer2.default,
+  module: _module.moduleReducer
+});
+
+// import navReducer from './nav.reducer'
+var history = exports.history = (0, _createBrowserHistory2.default)();
+var store = exports.store = (0, _redux.createStore)(appReducer, (0, _redux.compose)((0, _redux.applyMiddleware)(
+// createLogger(),
+_reduxThunk2.default, (0, _reactRouterRedux.routerMiddleware)(history))));
+
+var dispatch = exports.dispatch = store.dispatch;
+
+/***/ }),
+
+/***/ "./app/client/system/system.actions.js":
+/*!*********************************************!*\
+  !*** ./app/client/system/system.actions.js ***!
+  \*********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.enqueue_test_task = exports.changeTool = exports.countDirectory = exports.listDirectory = exports.run = undefined;
+
+var _socket = __webpack_require__(/*! ../socket */ "./app/client/socket/index.js");
+
+var _socket2 = _interopRequireDefault(_socket);
+
+var _types = __webpack_require__(/*! ../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+// import actions from '../actions'
+
+var run = exports.run = function run(cmd) {
+  return function (dispatch) {
+    dispatch({ type: _types2.default.system.running_command, cmd: cmd });
+    _socket2.default.actions.run_system_command({ cmd: cmd }).then(function (data) {
+      dispatch({
+        type: _types2.default.system.command_output,
+        data: data
+      });
+    });
+  };
+};
+
+var listDirectory = exports.listDirectory = function listDirectory(opt) {
+  return function (dispatch) {
+    dispatch({ type: _types2.default.system.listing_directory, opt: opt });
+    _socket2.default.actions.list_directory(opt).then(function (data) {
+      dispatch({
+        type: _types2.default.system.list_directory,
+        data: data
+      });
+    });
+  };
+};
+
+var countDirectory = exports.countDirectory = function countDirectory(opt) {
+  return function (dispatch) {
+    dispatch({ type: _types2.default.system.counting_directory, opt: opt });
+    _socket2.default.actions.count_directory(opt).then(function (data) {
+      dispatch({
+        type: _types2.default.system.count_directory,
+        data: data
+      });
+    });
+  };
+};
+
+var changeTool = exports.changeTool = function changeTool(tool) {
+  localStorage.setItem('system.last_tool', tool);
+  return { type: _types2.default.app.change_tool, tool: tool };
+};
+
+var enqueue_test_task = exports.enqueue_test_task = function enqueue_test_task(dataset) {
+  return function (dispatch) {
+    var task = {
+      module: 'test',
+      activity: 'cpu',
+      dataset: dataset
+      // return actions.queue.add_task(task)
+    };
+  };
+};
+
+window.addEventListener('keyDown', function (e) {
+  if (e.altKey) {
+    switch (e.keyCode) {
+      case 192:
+        // tilde - switch tool
+        break;
+      case 49:
+        // 1
+        break;
+      case 50:
+        // 2
+        break;
+      case 51:
+        // 3
+        break;
+      case 52:
+        // 4
+        break;
+      case 53:
+        // 5
+        break;
+      case 54:
+        // 6
+        break;
+      case 55:
+        // 7
+        break;
+      case 56:
+        // 8
+        break;
+      case 57:
+        // 9
+        break;
+      case 48:
+        // 0
+        break;
+    }
+  }
+});
+
+/***/ }),
+
+/***/ "./app/client/system/system.component.js":
+/*!***********************************************!*\
+  !*** ./app/client/system/system.component.js ***!
+  \***********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _group = __webpack_require__(/*! ../common/group.component */ "./app/client/common/group.component.js");
+
+var _group2 = _interopRequireDefault(_group);
+
+var _param = __webpack_require__(/*! ../common/param.component */ "./app/client/common/param.component.js");
+
+var _param2 = _interopRequireDefault(_param);
+
+var _system = __webpack_require__(/*! ./system.actions */ "./app/client/system/system.actions.js");
+
+var systemActions = _interopRequireWildcard(_system);
+
+var _live = __webpack_require__(/*! ../live/live.actions */ "./app/client/live/live.actions.js");
+
+var liveActions = _interopRequireWildcard(_live);
+
+var _queue = __webpack_require__(/*! ../queue/queue.actions */ "./app/client/queue/queue.actions.js");
+
+var queueActions = _interopRequireWildcard(_queue);
+
+var _auth = __webpack_require__(/*! ../auth/auth.actions */ "./app/client/auth/auth.actions.js");
+
+var authActions = _interopRequireWildcard(_auth);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var cpu_test_task = {
+  activity: 'cpu',
+  module: 'test',
+  dataset: 'test',
+  epochs: 1,
+  opt: {}
+};
+var gpu_test_task = {
+  activity: 'gpu',
+  module: 'test',
+  dataset: 'test',
+  epochs: 1,
+  opt: {}
+};
+var live_test_task = {
+  activity: 'live',
+  module: 'test',
+  dataset: 'test',
+  epochs: 1,
+  opt: {}
+};
+var wait_test_task = {
+  activity: 'wait',
+  module: 'test',
+  dataset: 'test',
+  epochs: 1,
+  opt: {}
+};
+var fruits = ["apple", "pear", "orange", "strawberry"];
+function choice(a) {
+  return a[Math.floor(Math.random() * a.length)];
+}
+
+var System = function (_Component) {
+  _inherits(System, _Component);
+
+  function System(props) {
+    _classCallCheck(this, System);
+
+    return _possibleConstructorReturn(this, (System.__proto__ || Object.getPrototypeOf(System)).call(this));
+  }
+
+  _createClass(System, [{
+    key: 'componentDidUpdate',
+    value: function componentDidUpdate() {
+      if (this._screen.scrollHeight > this._screen.scrollTop - this._screen.offsetHeight + 100) {
+        this._screen.scrollTop = this._screen.scrollHeight;
+      }
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      var _props = this.props,
+          site = _props.site,
+          server = _props.server,
+          relay = _props.relay,
+          runner = _props.runner,
+          rpc = _props.rpc,
+          actions = _props.actions,
+          user = _props.user;
+
+      return (0, _preact.h)(
+        'div',
+        { className: 'app system' },
+        (0, _preact.h)(
+          'div',
+          { className: 'heading' },
+          (0, _preact.h)(
+            'h1',
+            null,
+            site.name,
+            ' system'
+          )
+        ),
+        (0, _preact.h)(
+          'div',
+          { className: 'row params' },
+          (0, _preact.h)(
+            'div',
+            { className: 'column' },
+            (0, _preact.h)(
+              _group2.default,
+              { title: 'Status' },
+              (0, _preact.h)(
+                _param2.default,
+                { title: 'Server' },
+                server.status
+              ),
+              server.error && (0, _preact.h)(
+                _param2.default,
+                { title: 'Server error' },
+                server.error.message
+              ),
+              (0, _preact.h)(
+                _param2.default,
+                { title: 'Relay' },
+                relay.status
+              ),
+              (0, _preact.h)(
+                _param2.default,
+                { title: 'RPC' },
+                rpc.status
+              ),
+              (0, _preact.h)(
+                _param2.default,
+                { title: 'CPU' },
+                this.renderStatus(runner.cpu)
+              ),
+              (0, _preact.h)(
+                _param2.default,
+                { title: 'GPU' },
+                this.renderStatus(runner.gpu)
+              )
+            ),
+            (0, _preact.h)(
+              _group2.default,
+              { title: 'Diagnostics' },
+              (0, _preact.h)(
+                _param2.default,
+                { title: 'Check GPU' },
+                (0, _preact.h)(
+                  'button',
+                  { onClick: function onClick() {
+                      return actions.system.run('nvidia-smi');
+                    } },
+                  'nvidia-smi'
+                )
+              ),
+              (0, _preact.h)(
+                _param2.default,
+                { title: 'List processes' },
+                (0, _preact.h)(
+                  'button',
+                  { onClick: function onClick() {
+                      return actions.system.run('ps');
+                    } },
+                  'ps'
+                )
+              ),
+              (0, _preact.h)(
+                _param2.default,
+                { title: 'List users' },
+                (0, _preact.h)(
+                  'button',
+                  { onClick: function onClick() {
+                      return actions.system.run('w');
+                    } },
+                  'w'
+                )
+              ),
+              (0, _preact.h)(
+                _param2.default,
+                { title: 'Disk free space' },
+                (0, _preact.h)(
+                  'button',
+                  { onClick: function onClick() {
+                      return actions.system.run('df');
+                    } },
+                  'df'
+                )
+              )
+            ),
+            (0, _preact.h)(
+              _group2.default,
+              { title: 'Tasks' },
+              (0, _preact.h)(
+                _param2.default,
+                { title: 'Kill task' },
+                (0, _preact.h)(
+                  'button',
+                  { onClick: function onClick() {
+                      return actions.queue.stop_task('cpu');
+                    } },
+                  'CPU'
+                ),
+                (0, _preact.h)(
+                  'button',
+                  { onClick: function onClick() {
+                      return actions.queue.stop_task('gpu');
+                    } },
+                  'GPU'
+                )
+              ),
+              (0, _preact.h)(
+                _param2.default,
+                { title: 'Queue' },
+                (0, _preact.h)(
+                  'button',
+                  { onClick: function onClick() {
+                      return actions.queue.start_queue();
+                    } },
+                  'Start'
+                ),
+                (0, _preact.h)(
+                  'button',
+                  { onClick: function onClick() {
+                      return actions.queue.stop_queue();
+                    } },
+                  'Stop'
+                )
+              )
+            ),
+            (0, _preact.h)(
+              _group2.default,
+              { title: 'Auth' },
+              (0, _preact.h)(
+                _param2.default,
+                { title: 'Logged in as ' + user.username },
+                (0, _preact.h)(
+                  'button',
+                  { onClick: function onClick() {
+                      return actions.auth.logout();
+                    } },
+                  'Logout'
+                )
+              )
+            ),
+            (0, _preact.h)(
+              _group2.default,
+              { title: 'Test' },
+              (0, _preact.h)(
+                _param2.default,
+                { title: 'CPU Test Task' },
+                (0, _preact.h)(
+                  'button',
+                  { onClick: function onClick() {
+                      return actions.queue.start_task(cpu_test_task, { preempt: true, watch: true });
+                    } },
+                  'Start'
+                ),
+                (0, _preact.h)(
+                  'button',
+                  { onClick: function onClick() {
+                      return actions.queue.stop_task(runner.cpu.task);
+                    } },
+                  'Stop'
+                )
+              ),
+              (0, _preact.h)(
+                _param2.default,
+                { title: 'GPU Test Task' },
+                (0, _preact.h)(
+                  'button',
+                  { onClick: function onClick() {
+                      return actions.queue.start_task(gpu_test_task, { preempt: true, watch: true });
+                    } },
+                  'Start'
+                ),
+                (0, _preact.h)(
+                  'button',
+                  { onClick: function onClick() {
+                      return actions.queue.stop_task(runner.gpu.task);
+                    } },
+                  'Stop'
+                )
+              ),
+              (0, _preact.h)(
+                _param2.default,
+                { title: 'Live Test Task' },
+                (0, _preact.h)(
+                  'button',
+                  { onClick: function onClick() {
+                      return actions.queue.start_task(live_test_task, { preempt: true, watch: true });
+                    } },
+                  'Start'
+                ),
+                (0, _preact.h)(
+                  'button',
+                  { onClick: function onClick() {
+                      return actions.queue.stop_task(runner.cpu.task);
+                    } },
+                  'Stop'
+                )
+              ),
+              (0, _preact.h)(
+                _param2.default,
+                { title: 'Test Live RPC' },
+                (0, _preact.h)(
+                  'button',
+                  { onClick: function onClick() {
+                      return actions.live.get_params();
+                    } },
+                  'Get'
+                ),
+                (0, _preact.h)(
+                  'button',
+                  { onClick: function onClick() {
+                      return actions.live.set_param('fruit', choice(fruits));
+                    } },
+                  'Set'
+                )
+              ),
+              (0, _preact.h)(
+                _param2.default,
+                { title: 'Queue Tests' },
+                (0, _preact.h)(
+                  'button',
+                  { onClick: function onClick() {
+                      return actions.system.enqueue_test_task(choice(fruits));
+                    } },
+                  '+Add test task'
+                )
+              ),
+              (0, _preact.h)(
+                _param2.default,
+                { title: '' },
+                (0, _preact.h)(
+                  'button',
+                  { onClick: function onClick() {
+                      return actions.queue.start_task(wait_test_task, { preempt: true, watch: true });
+                    } },
+                  'Wait and Buzz'
+                )
+              )
+            )
+          ),
+          this.renderCommandOutput()
+        )
+      );
+    }
+  }, {
+    key: 'renderStatus',
+    value: function renderStatus(processor) {
+      if (!processor) {
+        return 'unknown';
+      }
+      if (processor.status === 'IDLE') {
+        return 'idle';
+      }
+      var task = processor.task;
+      return task.activity + ' ' + task.module;
+    }
+  }, {
+    key: 'renderCommandOutput',
+    value: function renderCommandOutput() {
+      var _this2 = this;
+
+      var _props2 = this.props,
+          cmd = _props2.cmd,
+          stdout = _props2.stdout,
+          stderr = _props2.stderr;
+
+      var output = void 0;
+      if (cmd.loading) {
+        output = 'Loading: ' + cmd.name;
+      } else if (cmd.loaded) {
+        if (cmd.error) {
+          output = 'Error: ' + cmd.name + '\n\n' + JSON.stringify(cmd.error, null, 2);
+        } else {
+          output = cmd.stdout;
+          if (cmd.stderr) {
+            output += '\n\n_________________________________\n\n';
+            output += cmd.stderr;
+          }
+        }
+      } else {
+        output = stdout;
+        if (stderr.length) {
+          output += '\n\n_________________________________\n\n';
+          output += stderr;
+        }
+      }
+      return (0, _preact.h)(
+        'div',
+        null,
+        (0, _preact.h)(
+          'div',
+          { ref: function ref(_ref) {
+              return _this2._screen = _ref;
+            }, className: 'screen' },
+          output
+        )
+      );
+    }
+  }]);
+
+  return System;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+  return _extends({
+    user: state.auth.user
+  }, state.system, state.live);
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    actions: {
+      auth: (0, _redux.bindActionCreators)(authActions, dispatch),
+      system: (0, _redux.bindActionCreators)(systemActions, dispatch),
+      queue: (0, _redux.bindActionCreators)(queueActions, dispatch),
+      live: (0, _redux.bindActionCreators)(liveActions, dispatch)
+    }
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(System);
+
+/***/ }),
+
+/***/ "./app/client/system/system.reducer.js":
+/*!*********************************************!*\
+  !*** ./app/client/system/system.reducer.js ***!
+  \*********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _types = __webpack_require__(/*! ../types */ "./app/client/types.js");
+
+var _types2 = _interopRequireDefault(_types);
+
+var _moment = __webpack_require__(/*! moment/min/moment.min */ "./node_modules/moment/min/moment.min.js");
+
+var _moment2 = _interopRequireDefault(_moment);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+var FileSaver = __webpack_require__(/*! file-saver */ "./node_modules/file-saver/FileSaver.js");
+
+var systemInitialState = {
+  loading: false,
+  error: null,
+
+  site: {
+    name: 'loading'
+  },
+  app: {
+    tool: localStorage.getItem('system.last_tool') || 'pix2pix'
+  },
+  server: {
+    connected: false,
+    status: "disconnected",
+    error: null
+  },
+  relay: {
+    connected: false,
+    status: "unknown",
+    error: null
+  },
+  rpc: {
+    connected: false,
+    status: "disconnected",
+    error: null
+  },
+  cmd: {
+    loading: false,
+    loaded: false,
+    name: null,
+    error: null,
+    stdout: "",
+    stderr: ""
+  },
+  runner: {
+    cpu: { status: 'IDLE', task: {} },
+    gpu: { status: 'IDLE', task: {} }
+  },
+  stdout: "",
+  stderr: ""
+};
+
+var modules = ['pix2pix', 'samplernn', 'pix2wav'].reduce(function (a, b) {
+  return a[b] = b, a;
+}, {});
+
+var systemReducer = function systemReducer() {
+  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : systemInitialState;
+  var action = arguments[1];
+
+  // console.log(action.type)
+  var processor = null;
+  switch (action.type) {
+    case _types2.default.socket.connect:
+    case _types2.default.socket.reconnecting:
+      return _extends({}, state, {
+        server: {
+          status: 'connected',
+          connected: true,
+          error: null
+        }
+      });
+    case _types2.default.socket.reconnect:
+      return _extends({}, state, {
+        server: {
+          status: 'reconnecting (attempt ' + action.attempt + ')',
+          connected: false,
+          error: null
+        }
+      });
+    case _types2.default.socket.connect_error:
+    case _types2.default.socket.reconnect_error:
+    case _types2.default.socket.disconnect:
+    case _types2.default.socket.reconnect_failed:
+      return _extends({}, state, {
+        server: {
+          status: 'disconnected',
+          connected: false,
+          error: action.error || null
+        }
+      });
+    case _types2.default.socket.error:
+      return _extends({}, state, {
+        server: _extends({}, state.socket, {
+          error: action.error
+        })
+      });
+    case _types2.default.system.relay_connected:
+      return _extends({}, state, {
+        relay: {
+          status: 'connected',
+          connected: true,
+          error: null
+        }
+      });
+    case _types2.default.system.relay_disconnected:
+      return _extends({}, state, {
+        relay: {
+          status: 'disconnected',
+          connected: false,
+          error: null
+        },
+        rpc: {
+          status: 'disconnected',
+          connected: false,
+          error: null
+        }
+      });
+    case _types2.default.system.rpc_connected:
+      return _extends({}, state, {
+        rpc: {
+          status: 'connected',
+          connected: true,
+          error: null
+        },
+        runner: action.runner
+      });
+    case _types2.default.system.rpc_disconnected:
+      return _extends({}, state, {
+        rpc: {
+          status: 'disconnected',
+          connected: false,
+          error: null
+        },
+        runner: action.runner || state.runner
+      });
+    case _types2.default.system.load_site:
+      document.querySelector('title').innerHTML = action.site.name + '.cortex';
+      var tool = state.app.tool;
+      var path = window.location.pathname.split('/')[1];
+      if (path in modules) {
+        tool = path;
+      }
+      return _extends({}, state, {
+        site: action.site,
+        app: _extends({}, state.app, {
+          tool: tool
+        })
+      });
+    case _types2.default.system.running_command:
+      return _extends({}, state, {
+        cmd: {
+          loading: true,
+          loaded: false,
+          name: action.cmd,
+          error: null,
+          stdout: null,
+          stderr: null
+        }
+      });
+    case _types2.default.system.command_output:
+      return _extends({}, state, {
+        cmd: {
+          loading: false,
+          loaded: true,
+          name: action.data.cmd,
+          error: action.data.error,
+          stdout: action.data.stdout,
+          stderr: action.data.stderr
+        }
+      });
+    case _types2.default.task.task_begin:
+      console.log('task begin', action.task, action.task.processor);
+      return _extends({}, state, {
+        runner: _extends({}, state.runner, _defineProperty({}, action.task.processor, { status: 'RUNNING', task: action.task })),
+        cmd: _extends({}, state.cmd, {
+          loaded: false,
+          stdout: "",
+          stderr: ""
+        }),
+        stdout: "",
+        stderr: ""
+      });
+    case _types2.default.task.task_finish:
+      if (action.task.processor === 'cpu' || state.runner.cpu.task && state.runner.cpu.task.uuid === action.task.uuid) {
+        processor = 'cpu';
+      } else if (action.task.processor === 'gpu' || state.runner.gpu.task && state.runner.gpu.task.uuid === action.task.uuid) {
+        processor = 'gpu';
+      } else {
+        processor = null;
+      }
+      console.log('task finish', action);
+      return _extends({}, state, {
+        rpc: {
+          connected: false,
+          status: "disconnected",
+          error: null
+        },
+        runner: processor ? _extends({}, state.runner, _defineProperty({}, processor, { status: 'IDLE', task: {} })) : state.runner
+      });
+    case _types2.default.app.change_tool:
+      return _extends({}, state, {
+        app: _extends({}, state.app, {
+          tool: action.tool
+        })
+      });
+    case _types2.default.system.stdout:
+      if (action.data.processor && state.runner[action.data.processor]) {
+        return _extends({}, state, {
+          runner: _extends({}, state.runner, _defineProperty({}, action.data.processor, _extends({}, state.runner[action.data.processor], {
+            last_message: action.data.data
+          }))),
+          stdout: state.stdout + action.data.data
+        });
+      }
+      return _extends({}, state, {
+        stdout: state.stdout + action.data.data
+      });
+    case _types2.default.system.stderr:
+      return _extends({}, state, {
+        last_message: action.data.data,
+        stderr: state.stderr + action.data.data
+      });
+    default:
+      return state;
+  }
+};
+
+exports.default = systemReducer;
+
+/***/ }),
+
+/***/ "./app/client/types.js":
+/*!*****************************!*\
+  !*** ./app/client/types.js ***!
+  \*****************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+
+var _crud = __webpack_require__(/*! ./api/crud.types */ "./app/client/api/crud.types.js");
+
+exports.default = {
+	system: {
+		load_site: 'SYSTEM_LOAD_SITE',
+		running_command: 'SYSTEM_RUNNING_COMMAND',
+		command_output: 'SYSTEM_COMMAND_OUTPUT',
+		relay_connected: 'SYSTEM_RELAY_CONNECTED',
+		relay_disconnected: 'SYSTEM_RELAY_DISCONNECTED',
+		rpc_connected: 'SYSTEM_RPC_CONNECTED',
+		rpc_disconnected: 'SYSTEM_RPC_DISCONNECTED',
+		list_directory: 'SYSTEM_LIST_DIRECTORY',
+		listing_directory: 'SYSTEM_LISTING_DIRECTORY',
+		count_directory: 'SYSTEM_COUNT_DIRECTORY',
+		counting_directory: 'SYSTEM_COUNTING_DIRECTORY',
+		stdout: 'SYSTEM_STDOUT',
+		stderr: 'SYSTEM_STDERR'
+	},
+	app: {
+		change_tool: "APP_CHANGE_TOOL",
+		load_progress: "APP_LOAD_PROGRESS"
+	},
+	folder: (0, _crud.crud_type)('folder', []),
+	file: (0, _crud.crud_type)('file', []),
+	task: (0, _crud.crud_type)('task', ['starting_task', 'stopping_task', 'task_begin', 'task_finish', 'start_queue', 'stop_queue', 'starting_queue', 'stopping_queue', 'progress', 'epoch']),
+	auth: (0, _crud.crud_type)('auth', ['set_token', 'set_error', 'set_current_user', 'logout_user', 'loading', 'initialized', 'set_return_to']),
+	socket: {
+		connect: 'SOCKET_CONNECT',
+		connect_error: 'SOCKET_CONNECT_ERROR',
+		reconnect: 'SOCKET_RECONNECT',
+		reconnecting: 'SOCKET_RECONNECTING',
+		reconnect_error: 'SOCKET_RECONNECT_ERROR',
+		reconnect_failed: 'SOCKET_RECONNECT_FAILED',
+		disconnect: 'SOCKET_DISCONNECT',
+		error: 'SOCKET_ERROR',
+		status: 'SOCKET_STATUS',
+
+		load_params: 'SOCKET_LOAD_PARAMS',
+		list_checkpoints: 'SOCKET_LIST_CHECKPOINTS',
+		list_sequences: 'SOCKET_LIST_SEQUENCES',
+		list_epochs: 'SOCKET_LIST_EPOCHS'
+	},
+	player: {
+		get_params: 'GET_PARAMS',
+		set_param: 'SET_PARAM',
+
+		loading_checkpoints: 'LOADING_CHECKPOINTS',
+		loading_checkpoint: 'LOADING_CHECKPOINT',
+		list_checkpoints: 'LIST_CHECKPOINTS',
+
+		loading_sequences: 'LOADING_SEQUENCES',
+		loading_sequence: 'LOADING_SEQUENCE',
+		load_sequence: 'LOAD_SEQUENCE',
+
+		loading_epochs: 'LOADING_EPOCHS',
+		load_epoch: 'LOAD_EPOCH',
+
+		set_fps: 'SET_FPS',
+		seeking: 'SEEKING',
+		pausing: 'PAUSING',
+		playing: 'PLAYING',
+		current_frame: 'CURRENT_FRAME',
+		start_recording: 'START_RECORDING',
+		add_record_frame: 'ADD_RECORD_FRAME',
+		save_frame: 'SAVE_FRAME',
+		saving_video: 'SAVING_VIDEO',
+		save_video: 'SAVE_VIDEO',
+
+		set_fullscreen: 'SET_FULLSCREEN'
+	},
+	audioPlayer: {
+		play: 'AUDIO_PLAY',
+		pause: 'AUDIO_PAUSE',
+		resume: 'AUDIO_RESUME',
+		enqueue: 'AUDIO_ENQUEUE'
+	},
+	dataset: {
+		load: 'DATASET_LOAD',
+		set_folder: 'DATASET_SET_FOLDER',
+		upload_files: 'DATASET_UPLOAD_FILES',
+		file_progress: 'DATASET_FILE_PROGRESS',
+		file_uploaded: 'DATASET_FILE_UPLOADED',
+		fetch_url: 'DATASET_FETCH_URL',
+		fetch_progress: 'DATASET_FETCH_PROGRESS',
+		list_epochs: 'DATASET_LIST_EPOCHS'
+	},
+	samplernn: {
+		init: 'SAMPLERNN_INIT',
+		set_folder: 'SAMPLERNN_SET_FOLDER',
+		load_loss: 'SAMPLERNN_LOAD_LOSS',
+		load_graph: 'SAMPLERNN_LOAD_GRAPH'
+		// queue and train
+		// update checkpoint settings
+		// reset checkpoint settings
+		// queue new checkpoint
+	},
+	pix2pix: (0, _crud.with_type)('pix2pix', ['init', 'set_folder']),
+	pix2pixhd: (0, _crud.with_type)('pix2pixhd', ['init', 'set_folder', 'load_results', 'load_dataset_count']),
+	pix2wav: (0, _crud.with_type)('pix2wav', ['init', 'set_folder']),
+	wav2pix: (0, _crud.with_type)('wav2pix', ['load', 'progress', 'finish', 'zip', 'uploading']),
+	dashboard: (0, _crud.with_type)('dashboard', ['load']),
+	morph: (0, _crud.with_type)('morph', ['load'])
+};
+
+/***/ }),
+
+/***/ "./app/client/util/format.js":
+/*!***********************************!*\
+  !*** ./app/client/util/format.js ***!
+  \***********************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.timeInSeconds = timeInSeconds;
+exports.gerund = gerund;
+exports.commatize = commatize;
+exports.carbon_date = carbon_date;
+exports.hush_views = hush_views;
+exports.hush_threads = hush_threads;
+exports.hush_size = hush_size;
+exports.hush_null = hush_null;
+exports.get_age = get_age;
+exports.courtesy_s = courtesy_s;
+function timeInSeconds(n) {
+  return (n / 10).toFixed(1) + ' s.';
+}
+function gerund(s) {
+  return s.replace(/e?$/, 'ing');
+}
+function commatize(n, radix) {
+  radix = radix || 1024;
+  var nums = [],
+      i,
+      counter = 0,
+      r = Math.floor;
+  if (n > radix) {
+    n /= radix;
+    nums.unshift(r(n * 10 % 10));
+    nums.unshift(".");
+  }
+  do {
+    i = n % 10;
+    n = r(n / 10);
+    if (n && !(++counter % 3)) {
+      i = ' ' + r(i);
+    }
+    nums.unshift(r(i));
+  } while (n);
+  return nums.join("");
+}
+function carbon_date(date, no_bold) {
+  var span = (+new Date() - new Date(date)) / 1000,
+      color;
+  if (!no_bold && span < 86400) // modified today
+    {
+      color = "new";
+    } else if (span < 604800) // modifed this week
+    {
+      color = "recent";
+    } else if (span < 1209600) // modifed 2 weeks ago
+    {
+      color = "med";
+    } else if (span < 3024000) // modifed 5 weeks ago
+    {
+      color = "old";
+    } else if (span < 12315200) // modifed 6 months ago
+    {
+      color = "older";
+    } else {
+    color = "quiet";
+  }
+  return color;
+}
+function hush_views(n, bias, no_bold) {
+  var txt = commatize(n, 1000);
+  bias = bias || 1;
+  n = n || 0;
+  if (n < 30) {
+    return ["quiet", n + " v."];
+  }
+  if (n < 200) {
+    return ["quiet", txt + " v."];
+  } else if (n < 500) {
+    return ["quiet", txt + " v."];
+  } else if (n < 1000) {
+    return ["old", txt + " v."];
+  } else if (n < 5000) {
+    return ["med", txt + " kv."];
+  } else if (no_bold || n < 10000) {
+    return ["recent", txt + " kv."];
+  } else {
+    return ["new", txt + " kv."];
+  }
+}
+function hush_threads(n, bias, no_bold) {
+  var txt = commatize(n, 1000);
+  bias = bias || 1;
+  n = n || 0;
+  if (n < 10) {
+    return ["quiet", n + " t."];
+  } else if (n < 25) {
+    return ["old", txt + " t."];
+  } else if (n < 50) {
+    return ["med", txt + " t."];
+  } else if (no_bold || n < 100) {
+    return ["recent", txt + " t."];
+  } else {
+    return ["new", txt + " t."];
+  }
+}
+function hush_size(n, bias, no_bold) {
+  var txt = commatize(Math.round(n / 1024));
+  bias = 1 || bias;
+  n = n || 0;
+  if (!n) {
+    return ['', ''];
+  }
+  if (n < 1000) {
+    return ["quiet", n + " b."];
+  }
+  if (n < 1000000) {
+    return ["quiet", txt + " kb."];
+  } else if (n < 20000000 / bias) {
+    return ["quiet", txt + " mb."];
+  } else if (n < 50000000 / bias) {
+    return ["old", txt + " mb."];
+  } else if (n < 80000000 / bias) {
+    return ["med", txt + " mb."];
+  } else if (no_bold || n < 170000000 / bias) {
+    return ["recent", txt + " mb."];
+  } else {
+    return ["new", txt + " mb."];
+  }
+}
+function hush_null(n, unit, no_bold) {
+  var s = unit ? n + " " + unit + "." : n;
+  if (n < 3) {
+    return ["quiet", s];
+  } else if (n < 6) {
+    return ["older", s];
+  } else if (n < 10) {
+    return ["old", s];
+  } else if (n < 16) {
+    return ["med", s];
+  } else if (no_bold || n < 21) {
+    return ["recent", s];
+  } else {
+    return ["new", s];
+  }
+}
+function get_age(t) {
+  var age = Math.abs(+Date.now() - new Date(t)) / 1000;
+  var r = Math.floor;
+  var m;
+  if (age < 5) {
+    return "now";
+  }
+  if (age < 60) {
+    return r(age) + "s";
+  }
+  age /= 60;
+  if (age < 60) {
+    return r(age) + "m";
+  }
+  m = r(age % 60);
+  age /= 60;
+  if (m > 0 && age < 2) {
+    return r(age) + "h" + m + "m";
+  }
+  if (age < 24) {
+    return r(age) + "h";
+  }
+  age /= 24;
+  if (age < 7) {
+    return r(age) + "d";
+  }
+  age /= 7;
+  if (age < 12) {
+    return r(age) + "w";
+  }
+  age /= 4;
+  if (age < 12) {
+    return r(age) + "m";
+  }
+  age /= 12;
+  return r(age) + "y";
+}
+function courtesy_s(n, s) {
+  return n == 1 ? "" : s || "s";
+}
+
+/***/ }),
+
+/***/ "./app/client/util/hidpi-canvas.js":
+/*!*****************************************!*\
+  !*** ./app/client/util/hidpi-canvas.js ***!
+  \*****************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+/**
+ * HiDPI Canvas Polyfill (1.0.10)
+ *
+ * Author: Jonathan D. Johnson (http://jondavidjohn.com)
+ * Homepage: https://github.com/jondavidjohn/hidpi-canvas-polyfill
+ * Issue Tracker: https://github.com/jondavidjohn/hidpi-canvas-polyfill/issues
+ * License: Apache-2.0
+*/
+(function (prototype) {
+
+  var pixelRatio = function () {
+    var canvas = window.document.createElement('canvas'),
+        context = canvas.getContext('2d'),
+        backingStore = context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1;
+
+    return (window.devicePixelRatio || 1) / backingStore;
+  }(),
+      forEach = function forEach(obj, func) {
+    for (var p in obj) {
+      if (obj.hasOwnProperty(p)) {
+        func(obj[p], p);
+      }
+    }
+  },
+      ratioArgs = {
+    'fillRect': 'all',
+    'clearRect': 'all',
+    'strokeRect': 'all',
+    'moveTo': 'all',
+    'lineTo': 'all',
+    'arc': [0, 1, 2],
+    'arcTo': 'all',
+    'bezierCurveTo': 'all',
+    'isPointinPath': 'all',
+    'isPointinStroke': 'all',
+    'quadraticCurveTo': 'all',
+    'rect': 'all',
+    'translate': 'all',
+    'createRadialGradient': 'all',
+    'createLinearGradient': 'all'
+  };
+
+  if (pixelRatio === 1) return;
+
+  forEach(ratioArgs, function (value, key) {
+    prototype[key] = function (_super) {
+      return function () {
+        var i,
+            len,
+            args = Array.prototype.slice.call(arguments);
+
+        if (value === 'all') {
+          args = args.map(function (a) {
+            return a * pixelRatio;
+          });
+        } else if (Array.isArray(value)) {
+          for (i = 0, len = value.length; i < len; i++) {
+            args[value[i]] *= pixelRatio;
+          }
+        }
+
+        return _super.apply(this, args);
+      };
+    }(prototype[key]);
+  });
+
+  // Stroke lineWidth adjustment
+  prototype.stroke = function (_super) {
+    return function () {
+      this.lineWidth *= pixelRatio;
+      _super.apply(this, arguments);
+      this.lineWidth /= pixelRatio;
+    };
+  }(prototype.stroke);
+
+  // Text
+  //
+  prototype.fillText = function (_super) {
+    return function () {
+      var args = Array.prototype.slice.call(arguments);
+
+      args[1] *= pixelRatio; // x
+      args[2] *= pixelRatio; // y
+
+      this.font = this.font.replace(/(\d+)(px|em|rem|pt)/g, function (w, m, u) {
+        return m * pixelRatio + u;
+      });
+
+      _super.apply(this, args);
+
+      this.font = this.font.replace(/(\d+)(px|em|rem|pt)/g, function (w, m, u) {
+        return m / pixelRatio + u;
+      });
+    };
+  }(prototype.fillText);
+
+  prototype.strokeText = function (_super) {
+    return function () {
+      var args = Array.prototype.slice.call(arguments);
+
+      args[1] *= pixelRatio; // x
+      args[2] *= pixelRatio; // y
+
+      this.font = this.font.replace(/(\d+)(px|em|rem|pt)/g, function (w, m, u) {
+        return m * pixelRatio + u;
+      });
+
+      _super.apply(this, args);
+
+      this.font = this.font.replace(/(\d+)(px|em|rem|pt)/g, function (w, m, u) {
+        return m / pixelRatio + u;
+      });
+    };
+  }(prototype.strokeText);
+})(window.CanvasRenderingContext2D.prototype);
+;(function (prototype) {
+  prototype.getContext = function (_super) {
+    return function (type) {
+      var backingStore, ratio, context;
+
+      if (type == '2d-lodpi') {
+        context = _super.call(this, '2d');
+      } else if (type === '2d') {
+        context = _super.call(this, '2d');
+
+        backingStore = context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1;
+
+        ratio = (window.devicePixelRatio || 1) / backingStore;
+
+        if (ratio > 1) {
+          this.style.height = this.height + 'px';
+          this.style.width = this.width + 'px';
+          this.width *= ratio;
+          this.height *= ratio;
+        }
+      } else {
+        context = _super.call(this, type);
+      }
+
+      return context;
+    };
+  }(prototype.getContext);
+})(window.HTMLCanvasElement.prototype);
+
+/***/ }),
+
+/***/ "./app/client/util/index.js":
+/*!**********************************!*\
+  !*** ./app/client/util/index.js ***!
+  \**********************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _sort = __webpack_require__(/*! ./sort */ "./app/client/util/sort.js");
+
+var sort = _interopRequireWildcard(_sort);
+
+var _format = __webpack_require__(/*! ./format */ "./app/client/util/format.js");
+
+var format = _interopRequireWildcard(_format);
+
+var _math = __webpack_require__(/*! ./math */ "./app/client/util/math.js");
+
+var maths = _interopRequireWildcard(_math);
+
+__webpack_require__(/*! ./hidpi-canvas */ "./app/client/util/hidpi-canvas.js");
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+var is_iphone = !!(navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i));
+var is_ipad = !!navigator.userAgent.match(/iPad/i);
+var is_android = !!navigator.userAgent.match(/Android/i);
+var is_mobile = is_iphone || is_ipad || is_android;
+var is_desktop = !is_mobile;
+
+var htmlClassList = document.body.parentNode.classList;
+htmlClassList.add(is_desktop ? 'desktop' : 'mobile');
+htmlClassList.remove('loading');
+
+// window.debug = false
+
+var allProgress = function allProgress(promises, progress_cb) {
+  var d = 0;
+  progress_cb(0, 0, promises.length);
+  promises.forEach(function (p) {
+    p.then(function (s) {
+      d += 1;
+      progress_cb(Math.floor(d * 100 / promises.length), d, promises.length);
+      return s;
+    });
+  });
+  return Promise.all(promises);
+};
+
+document.body.style.backgroundImage = 'linear-gradient(' + (maths.randint(40) + 40) + 'deg, #fde, #ffe)';
+
+var fieldSet = function fieldSet(defaultFields) {
+  return function (fields) {
+    if (fields) {
+      if (fields instanceof Set) {
+        return fields;
+      }
+      return new Set(fields.split(' '));
+    }
+    return defaultFields;
+  };
+};
+
+exports.default = _extends({}, maths, format, {
+  sort: sort,
+  allProgress: allProgress, fieldSet: fieldSet,
+  is_iphone: is_iphone, is_ipad: is_ipad, is_android: is_android, is_mobile: is_mobile, is_desktop: is_desktop
+});
+
+/***/ }),
+
+/***/ "./app/client/util/math.js":
+/*!*********************************!*\
+  !*** ./app/client/util/math.js ***!
+  \*********************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.randrange = randrange;
+exports.randsign = randsign;
+exports.choice = choice;
+exports.angle = angle;
+exports.dist = dist;
+exports.xor = xor;
+exports.quantize = quantize;
+exports.shuffle = shuffle;
+exports.gaussian = gaussian;
+var mod = exports.mod = function mod(n, m) {
+  return n - m * Math.floor(n / m);
+};
+var clamp = exports.clamp = function clamp(n, a, b) {
+  return n < a ? a : n < b ? n : b;
+};
+var norm = exports.norm = function norm(n, a, b) {
+  return (n - a) / (b - a);
+};
+var lerp = exports.lerp = function lerp(n, a, b) {
+  return (b - a) * n + a;
+};
+var mix = exports.mix = function mix(n, a, b) {
+  return a * (1 - n) + b * n;
+};
+var randint = exports.randint = function randint(n) {
+  return Math.floor(Math.random() * n);
+};
+function randrange(a, b) {
+  return Math.random() * (b - a) + a;
+}
+function randsign() {
+  return Math.random() >= 0.5 ? -1 : 1;
+}
+function choice(a) {
+  return a[Math.floor(Math.random() * a.length)];
+}
+function angle(x0, y0, x1, y1) {
+  return Math.atan2(y1 - y0, x1 - x0);
+}
+function dist(x0, y0, x1, y1) {
+  return Math.sqrt(Math.pow(x1 - x0, 2) + Math.pow(y1 - y0, 2));
+}
+function xor(a, b) {
+  a = !!a;b = !!b;return (a || b) && !(a && b);
+}
+function quantize(a, b) {
+  return Math.floor(a / b) * b;
+}
+function shuffle(a) {
+  for (var i = a.length; i > 0; i--) {
+    var r = randint(i);
+    var swap = a[i - 1];
+    a[i - 1] = a[r];
+    a[r] = swap;
+  }
+  return a;
+}
+// returns a gaussian random function with the given mean and stdev.
+function gaussian(mean, stdev) {
+  var y2 = void 0;
+  var use_last = false;
+  return function () {
+    var y1 = void 0;
+    if (use_last) {
+      y1 = y2;
+      use_last = false;
+    } else {
+      var x1 = void 0,
+          x2 = void 0,
+          w = void 0;
+      do {
+        x1 = 2.0 * Math.random() - 1.0;
+        x2 = 2.0 * Math.random() - 1.0;
+        w = x1 * x1 + x2 * x2;
+      } while (w >= 1.0);
+      w = Math.sqrt(-2.0 * Math.log(w) / w);
+      y1 = x1 * w;
+      y2 = x2 * w;
+      use_last = true;
+    }
+
+    var retval = mean + stdev * y1;
+    if (retval > 0) return retval;
+    return -retval;
+  };
+}
+
+/***/ }),
+
+/***/ "./app/client/util/sort.js":
+/*!*********************************!*\
+  !*** ./app/client/util/sort.js ***!
+  \*********************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
+
+var numericSort = exports.numericSort = {
+  asc: function asc(a, b) {
+    return a[0] - b[0];
+  },
+  desc: function desc(a, b) {
+    return b[0] - a[0];
+  }
+};
+var stringSort = exports.stringSort = {
+  asc: function asc(a, b) {
+    return a[0].localeCompare(b[0]);
+  },
+  desc: function desc(a, b) {
+    return b[0].localeCompare(a[0]);
+  }
+};
+var orderByFn = exports.orderByFn = function orderByFn() {
+  var s = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'name asc';
+
+  var _s$split = s.split(' '),
+      _s$split2 = _slicedToArray(_s$split, 2),
+      _s$split2$ = _s$split2[0],
+      field = _s$split2$ === undefined ? 'name' : _s$split2$,
+      _s$split2$2 = _s$split2[1],
+      direction = _s$split2$2 === undefined ? 'asc' : _s$split2$2;
+
+  var mapFn = void 0,
+      sortFn = void 0;
+  switch (field) {
+    case 'epoch':
+      mapFn = function mapFn(a) {
+        return [parseInt(a.epoch || a.epochs) || 0, a];
+      };
+      sortFn = numericSort[direction];
+      break;
+    case 'size':
+      mapFn = function mapFn(a) {
+        return [parseInt(a.size) || 0, a];
+      };
+      sortFn = numericSort[direction];
+      break;
+    case 'date':
+      mapFn = function mapFn(a) {
+        return [+new Date(a.date || a.created_at), a];
+      };
+      sortFn = numericSort[direction];
+      break;
+    case 'updated_at':
+      mapFn = function mapFn(a) {
+        return [+new Date(a.updated_at), a];
+      };
+      sortFn = numericSort[direction];
+      break;
+    case 'priority':
+      mapFn = function mapFn(a) {
+        return [parseInt(a.priority) || parseInt(a.id) || 1000, a];
+      };
+      sortFn = numericSort[direction];
+    case 'name':
+    default:
+      mapFn = function mapFn(a) {
+        return [a.name || "", a];
+      };
+      sortFn = stringSort[direction];
+      break;
+  }
+  return { mapFn: mapFn, sortFn: sortFn };
+};
+
+/***/ }),
+
+/***/ "./node_modules/fetch-jsonp/build/fetch-jsonp.js":
+/*!*******************************************************!*\
+  !*** ./node_modules/fetch-jsonp/build/fetch-jsonp.js ***!
+  \*******************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
+  if (true) {
+    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, module], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
+				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
+				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
+				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+  } else { var mod; }
+})(this, function (exports, module) {
+  'use strict';
+
+  var defaultOptions = {
+    timeout: 5000,
+    jsonpCallback: 'callback',
+    jsonpCallbackFunction: null
+  };
+
+  function generateCallbackFunction() {
+    return 'jsonp_' + Date.now() + '_' + Math.ceil(Math.random() * 100000);
+  }
+
+  function clearFunction(functionName) {
+    // IE8 throws an exception when you try to delete a property on window
+    // http://stackoverflow.com/a/1824228/751089
+    try {
+      delete window[functionName];
+    } catch (e) {
+      window[functionName] = undefined;
+    }
+  }
+
+  function removeScript(scriptId) {
+    var script = document.getElementById(scriptId);
+    if (script) {
+      document.getElementsByTagName('head')[0].removeChild(script);
+    }
+  }
+
+  function fetchJsonp(_url) {
+    var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
+
+    // to avoid param reassign
+    var url = _url;
+    var timeout = options.timeout || defaultOptions.timeout;
+    var jsonpCallback = options.jsonpCallback || defaultOptions.jsonpCallback;
+
+    var timeoutId = undefined;
+
+    return new Promise(function (resolve, reject) {
+      var callbackFunction = options.jsonpCallbackFunction || generateCallbackFunction();
+      var scriptId = jsonpCallback + '_' + callbackFunction;
+
+      window[callbackFunction] = function (response) {
+        resolve({
+          ok: true,
+          // keep consistent with fetch API
+          json: function json() {
+            return Promise.resolve(response);
+          }
+        });
+
+        if (timeoutId) clearTimeout(timeoutId);
+
+        removeScript(scriptId);
+
+        clearFunction(callbackFunction);
+      };
+
+      // Check if the user set their own params, and if not add a ? to start a list of params
+      url += url.indexOf('?') === -1 ? '?' : '&';
+
+      var jsonpScript = document.createElement('script');
+      jsonpScript.setAttribute('src', '' + url + jsonpCallback + '=' + callbackFunction);
+      if (options.charset) {
+        jsonpScript.setAttribute('charset', options.charset);
+      }
+      jsonpScript.id = scriptId;
+      document.getElementsByTagName('head')[0].appendChild(jsonpScript);
+
+      timeoutId = setTimeout(function () {
+        reject(new Error('JSONP request to ' + _url + ' timed out'));
+
+        clearFunction(callbackFunction);
+        removeScript(scriptId);
+        window[callbackFunction] = function () {
+          clearFunction(callbackFunction);
+        };
+      }, timeout);
+
+      // Caught if got 404/500
+      jsonpScript.onerror = function () {
+        reject(new Error('JSONP request to ' + _url + ' failed'));
+
+        clearFunction(callbackFunction);
+        removeScript(scriptId);
+        if (timeoutId) clearTimeout(timeoutId);
+      };
+    });
+  }
+
+  // export as global function
+  /*
+  let local;
+  if (typeof global !== 'undefined') {
+    local = global;
+  } else if (typeof self !== 'undefined') {
+    local = self;
+  } else {
+    try {
+      local = Function('return this')();
+    } catch (e) {
+      throw new Error('polyfill failed because global object is unavailable in this environment');
+    }
+  }
+  local.fetchJsonp = fetchJsonp;
+  */
+
+  module.exports = fetchJsonp;
+});
+
+/***/ }),
+
+/***/ "./node_modules/fft.js/lib/fft.js":
+/*!****************************************!*\
+  !*** ./node_modules/fft.js/lib/fft.js ***!
+  \****************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+function FFT(size) {
+  this.size = size | 0;
+  if (this.size <= 1 || (this.size & (this.size - 1)) !== 0)
+    throw new Error('FFT size must be a power of two and bigger than 1');
+
+  this._csize = size << 1;
+
+  // NOTE: Use of `var` is intentional for old V8 versions
+  var table = new Array(this.size * 2);
+  for (var i = 0; i < table.length; i += 2) {
+    const angle = Math.PI * i / this.size;
+    table[i] = Math.cos(angle);
+    table[i + 1] = -Math.sin(angle);
+  }
+  this.table = table;
+
+  // Find size's power of two
+  var power = 0;
+  for (var t = 1; this.size > t; t <<= 1)
+    power++;
+
+  // Calculate initial step's width:
+  //   * If we are full radix-4 - it is 2x smaller to give inital len=8
+  //   * Otherwise it is the same as `power` to give len=4
+  this._width = power % 2 === 0 ? power - 1 : power;
+
+  // Pre-compute bit-reversal patterns
+  this._bitrev = new Array(1 << this._width);
+  for (var j = 0; j < this._bitrev.length; j++) {
+    this._bitrev[j] = 0;
+    for (var shift = 0; shift < this._width; shift += 2) {
+      var revShift = this._width - shift - 2;
+      this._bitrev[j] |= ((j >>> shift) & 3) << revShift;
+    }
+  }
+
+  this._out = null;
+  this._data = null;
+  this._inv = 0;
+}
+module.exports = FFT;
+
+FFT.prototype.fromComplexArray = function fromComplexArray(complex, storage) {
+  var res = storage || new Array(complex.length >>> 1);
+  for (var i = 0; i < complex.length; i += 2)
+    res[i >>> 1] = complex[i];
+  return res;
+};
+
+FFT.prototype.createComplexArray = function createComplexArray() {
+  const res = new Array(this._csize);
+  for (var i = 0; i < res.length; i++)
+    res[i] = 0;
+  return res;
+};
+
+FFT.prototype.toComplexArray = function toComplexArray(input, storage) {
+  var res = storage || this.createComplexArray();
+  for (var i = 0; i < res.length; i += 2) {
+    res[i] = input[i >>> 1];
+    res[i + 1] = 0;
+  }
+  return res;
+};
+
+FFT.prototype.completeSpectrum = function completeSpectrum(spectrum) {
+  var size = this._csize;
+  var half = size >>> 1;
+  for (var i = 2; i < half; i += 2) {
+    spectrum[size - i] = spectrum[i];
+    spectrum[size - i + 1] = -spectrum[i + 1];
+  }
+};
+
+FFT.prototype.transform = function transform(out, data) {
+  if (out === data)
+    throw new Error('Input and output buffers must be different');
+
+  this._out = out;
+  this._data = data;
+  this._inv = 0;
+  this._transform4();
+  this._out = null;
+  this._data = null;
+};
+
+FFT.prototype.realTransform = function realTransform(out, data) {
+  if (out === data)
+    throw new Error('Input and output buffers must be different');
+
+  this._out = out;
+  this._data = data;
+  this._inv = 0;
+  this._realTransform4();
+  this._out = null;
+  this._data = null;
+};
+
+FFT.prototype.inverseTransform = function inverseTransform(out, data) {
+  if (out === data)
+    throw new Error('Input and output buffers must be different');
+
+  this._out = out;
+  this._data = data;
+  this._inv = 1;
+  this._transform4();
+  for (var i = 0; i < out.length; i++)
+    out[i] /= this.size;
+  this._out = null;
+  this._data = null;
+};
+
+// radix-4 implementation
+//
+// NOTE: Uses of `var` are intentional for older V8 version that do not
+// support both `let compound assignments` and `const phi`
+FFT.prototype._transform4 = function _transform4() {
+  var out = this._out;
+  var size = this._csize;
+
+  // Initial step (permute and transform)
+  var width = this._width;
+  var step = 1 << width;
+  var len = (size / step) << 1;
+
+  var outOff;
+  var t;
+  var bitrev = this._bitrev;
+  if (len === 4) {
+    for (outOff = 0, t = 0; outOff < size; outOff += len, t++) {
+      const off = bitrev[t];
+      this._singleTransform2(outOff, off, step);
+    }
+  } else {
+    // len === 8
+    for (outOff = 0, t = 0; outOff < size; outOff += len, t++) {
+      const off = bitrev[t];
+      this._singleTransform4(outOff, off, step);
+    }
+  }
+
+  // Loop through steps in decreasing order
+  var inv = this._inv ? -1 : 1;
+  var table = this.table;
+  for (step >>= 2; step >= 2; step >>= 2) {
+    len = (size / step) << 1;
+    var quarterLen = len >>> 2;
+
+    // Loop through offsets in the data
+    for (outOff = 0; outOff < size; outOff += len) {
+      // Full case
+      var limit = outOff + quarterLen;
+      for (var i = outOff, k = 0; i < limit; i += 2, k += step) {
+        const A = i;
+        const B = A + quarterLen;
+        const C = B + quarterLen;
+        const D = C + quarterLen;
+
+        // Original values
+        const Ar = out[A];
+        const Ai = out[A + 1];
+        const Br = out[B];
+        const Bi = out[B + 1];
+        const Cr = out[C];
+        const Ci = out[C + 1];
+        const Dr = out[D];
+        const Di = out[D + 1];
+
+        // Middle values
+        const MAr = Ar;
+        const MAi = Ai;
+
+        const tableBr = table[k];
+        const tableBi = inv * table[k + 1];
+        const MBr = Br * tableBr - Bi * tableBi;
+        const MBi = Br * tableBi + Bi * tableBr;
+
+        const tableCr = table[2 * k];
+        const tableCi = inv * table[2 * k + 1];
+        const MCr = Cr * tableCr - Ci * tableCi;
+        const MCi = Cr * tableCi + Ci * tableCr;
+
+        const tableDr = table[3 * k];
+        const tableDi = inv * table[3 * k + 1];
+        const MDr = Dr * tableDr - Di * tableDi;
+        const MDi = Dr * tableDi + Di * tableDr;
+
+        // Pre-Final values
+        const T0r = MAr + MCr;
+        const T0i = MAi + MCi;
+        const T1r = MAr - MCr;
+        const T1i = MAi - MCi;
+        const T2r = MBr + MDr;
+        const T2i = MBi + MDi;
+        const T3r = inv * (MBr - MDr);
+        const T3i = inv * (MBi - MDi);
+
+        // Final values
+        const FAr = T0r + T2r;
+        const FAi = T0i + T2i;
+
+        const FCr = T0r - T2r;
+        const FCi = T0i - T2i;
+
+        const FBr = T1r + T3i;
+        const FBi = T1i - T3r;
+
+        const FDr = T1r - T3i;
+        const FDi = T1i + T3r;
+
+        out[A] = FAr;
+        out[A + 1] = FAi;
+        out[B] = FBr;
+        out[B + 1] = FBi;
+        out[C] = FCr;
+        out[C + 1] = FCi;
+        out[D] = FDr;
+        out[D + 1] = FDi;
+      }
+    }
+  }
+};
+
+// radix-2 implementation
+//
+// NOTE: Only called for len=4
+FFT.prototype._singleTransform2 = function _singleTransform2(outOff, off,
+                                                             step) {
+  const out = this._out;
+  const data = this._data;
+
+  const evenR = data[off];
+  const evenI = data[off + 1];
+  const oddR = data[off + step];
+  const oddI = data[off + step + 1];
+
+  const leftR = evenR + oddR;
+  const leftI = evenI + oddI;
+  const rightR = evenR - oddR;
+  const rightI = evenI - oddI;
+
+  out[outOff] = leftR;
+  out[outOff + 1] = leftI;
+  out[outOff + 2] = rightR;
+  out[outOff + 3] = rightI;
+};
+
+// radix-4
+//
+// NOTE: Only called for len=8
+FFT.prototype._singleTransform4 = function _singleTransform4(outOff, off,
+                                                             step) {
+  const out = this._out;
+  const data = this._data;
+  const inv = this._inv ? -1 : 1;
+  const step2 = step * 2;
+  const step3 = step * 3;
+
+  // Original values
+  const Ar = data[off];
+  const Ai = data[off + 1];
+  const Br = data[off + step];
+  const Bi = data[off + step + 1];
+  const Cr = data[off + step2];
+  const Ci = data[off + step2 + 1];
+  const Dr = data[off + step3];
+  const Di = data[off + step3 + 1];
+
+  // Pre-Final values
+  const T0r = Ar + Cr;
+  const T0i = Ai + Ci;
+  const T1r = Ar - Cr;
+  const T1i = Ai - Ci;
+  const T2r = Br + Dr;
+  const T2i = Bi + Di;
+  const T3r = inv * (Br - Dr);
+  const T3i = inv * (Bi - Di);
+
+  // Final values
+  const FAr = T0r + T2r;
+  const FAi = T0i + T2i;
+
+  const FBr = T1r + T3i;
+  const FBi = T1i - T3r;
+
+  const FCr = T0r - T2r;
+  const FCi = T0i - T2i;
+
+  const FDr = T1r - T3i;
+  const FDi = T1i + T3r;
+
+  out[outOff] = FAr;
+  out[outOff + 1] = FAi;
+  out[outOff + 2] = FBr;
+  out[outOff + 3] = FBi;
+  out[outOff + 4] = FCr;
+  out[outOff + 5] = FCi;
+  out[outOff + 6] = FDr;
+  out[outOff + 7] = FDi;
+};
+
+// Real input radix-4 implementation
+FFT.prototype._realTransform4 = function _realTransform4() {
+  var out = this._out;
+  var size = this._csize;
+
+  // Initial step (permute and transform)
+  var width = this._width;
+  var step = 1 << width;
+  var len = (size / step) << 1;
+
+  var outOff;
+  var t;
+  var bitrev = this._bitrev;
+  if (len === 4) {
+    for (outOff = 0, t = 0; outOff < size; outOff += len, t++) {
+      const off = bitrev[t];
+      this._singleRealTransform2(outOff, off >>> 1, step >>> 1);
+    }
+  } else {
+    // len === 8
+    for (outOff = 0, t = 0; outOff < size; outOff += len, t++) {
+      const off = bitrev[t];
+      this._singleRealTransform4(outOff, off >>> 1, step >>> 1);
+    }
+  }
+
+  // Loop through steps in decreasing order
+  var inv = this._inv ? -1 : 1;
+  var table = this.table;
+  for (step >>= 2; step >= 2; step >>= 2) {
+    len = (size / step) << 1;
+    var halfLen = len >>> 1;
+    var quarterLen = halfLen >>> 1;
+    var hquarterLen = quarterLen >>> 1;
+
+    // Loop through offsets in the data
+    for (outOff = 0; outOff < size; outOff += len) {
+      for (var i = 0, k = 0; i <= hquarterLen; i += 2, k += step) {
+        var A = outOff + i;
+        var B = A + quarterLen;
+        var C = B + quarterLen;
+        var D = C + quarterLen;
+
+        // Original values
+        var Ar = out[A];
+        var Ai = out[A + 1];
+        var Br = out[B];
+        var Bi = out[B + 1];
+        var Cr = out[C];
+        var Ci = out[C + 1];
+        var Dr = out[D];
+        var Di = out[D + 1];
+
+        // Middle values
+        var MAr = Ar;
+        var MAi = Ai;
+
+        var tableBr = table[k];
+        var tableBi = inv * table[k + 1];
+        var MBr = Br * tableBr - Bi * tableBi;
+        var MBi = Br * tableBi + Bi * tableBr;
+
+        var tableCr = table[2 * k];
+        var tableCi = inv * table[2 * k + 1];
+        var MCr = Cr * tableCr - Ci * tableCi;
+        var MCi = Cr * tableCi + Ci * tableCr;
+
+        var tableDr = table[3 * k];
+        var tableDi = inv * table[3 * k + 1];
+        var MDr = Dr * tableDr - Di * tableDi;
+        var MDi = Dr * tableDi + Di * tableDr;
+
+        // Pre-Final values
+        var T0r = MAr + MCr;
+        var T0i = MAi + MCi;
+        var T1r = MAr - MCr;
+        var T1i = MAi - MCi;
+        var T2r = MBr + MDr;
+        var T2i = MBi + MDi;
+        var T3r = inv * (MBr - MDr);
+        var T3i = inv * (MBi - MDi);
+
+        // Final values
+        var FAr = T0r + T2r;
+        var FAi = T0i + T2i;
+
+        var FBr = T1r + T3i;
+        var FBi = T1i - T3r;
+
+        out[A] = FAr;
+        out[A + 1] = FAi;
+        out[B] = FBr;
+        out[B + 1] = FBi;
+
+        // Output final middle point
+        if (i === 0) {
+          var FCr = T0r - T2r;
+          var FCi = T0i - T2i;
+          out[C] = FCr;
+          out[C + 1] = FCi;
+          continue;
+        }
+
+        // Do not overwrite ourselves
+        if (i === hquarterLen)
+          continue;
+
+        // In the flipped case:
+        // MAi = -MAi
+        // MBr=-MBi, MBi=-MBr
+        // MCr=-MCr
+        // MDr=MDi, MDi=MDr
+        var ST0r = T1r;
+        var ST0i = -T1i;
+        var ST1r = T0r;
+        var ST1i = -T0i;
+        var ST2r = -inv * T3i;
+        var ST2i = -inv * T3r;
+        var ST3r = -inv * T2i;
+        var ST3i = -inv * T2r;
+
+        var SFAr = ST0r + ST2r;
+        var SFAi = ST0i + ST2i;
+
+        var SFBr = ST1r + ST3i;
+        var SFBi = ST1i - ST3r;
+
+        var SA = outOff + quarterLen - i;
+        var SB = outOff + halfLen - i;
+
+        out[SA] = SFAr;
+        out[SA + 1] = SFAi;
+        out[SB] = SFBr;
+        out[SB + 1] = SFBi;
+      }
+    }
+  }
+};
+
+// radix-2 implementation
+//
+// NOTE: Only called for len=4
+FFT.prototype._singleRealTransform2 = function _singleRealTransform2(outOff,
+                                                                     off,
+                                                                     step) {
+  const out = this._out;
+  const data = this._data;
+
+  const evenR = data[off];
+  const oddR = data[off + step];
+
+  const leftR = evenR + oddR;
+  const rightR = evenR - oddR;
+
+  out[outOff] = leftR;
+  out[outOff + 1] = 0;
+  out[outOff + 2] = rightR;
+  out[outOff + 3] = 0;
+};
+
+// radix-4
+//
+// NOTE: Only called for len=8
+FFT.prototype._singleRealTransform4 = function _singleRealTransform4(outOff,
+                                                                     off,
+                                                                     step) {
+  const out = this._out;
+  const data = this._data;
+  const inv = this._inv ? -1 : 1;
+  const step2 = step * 2;
+  const step3 = step * 3;
+
+  // Original values
+  const Ar = data[off];
+  const Br = data[off + step];
+  const Cr = data[off + step2];
+  const Dr = data[off + step3];
+
+  // Pre-Final values
+  const T0r = Ar + Cr;
+  const T1r = Ar - Cr;
+  const T2r = Br + Dr;
+  const T3r = inv * (Br - Dr);
+
+  // Final values
+  const FAr = T0r + T2r;
+
+  const FBr = T1r;
+  const FBi = -T3r;
+
+  const FCr = T0r - T2r;
+
+  const FDr = T1r;
+  const FDi = T3r;
+
+  out[outOff] = FAr;
+  out[outOff + 1] = 0;
+  out[outOff + 2] = FBr;
+  out[outOff + 3] = FBi;
+  out[outOff + 4] = FCr;
+  out[outOff + 5] = 0;
+  out[outOff + 6] = FDr;
+  out[outOff + 7] = FDi;
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/file-saver/FileSaver.js":
+/*!**********************************************!*\
+  !*** ./node_modules/file-saver/FileSaver.js ***!
+  \**********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+var __WEBPACK_AMD_DEFINE_RESULT__;/* FileSaver.js
+ * A saveAs() FileSaver implementation.
+ * 1.3.2
+ * 2016-06-16 18:25:19
+ *
+ * By Eli Grey, http://eligrey.com
+ * License: MIT
+ *   See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md
+ */
+
+/*global self */
+/*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */
+
+/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
+
+var saveAs = saveAs || (function(view) {
+	"use strict";
+	// IE <10 is explicitly unsupported
+	if (typeof view === "undefined" || typeof navigator !== "undefined" && /MSIE [1-9]\./.test(navigator.userAgent)) {
+		return;
+	}
+	var
+		  doc = view.document
+		  // only get URL when necessary in case Blob.js hasn't overridden it yet
+		, get_URL = function() {
+			return view.URL || view.webkitURL || view;
+		}
+		, save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a")
+		, can_use_save_link = "download" in save_link
+		, click = function(node) {
+			var event = new MouseEvent("click");
+			node.dispatchEvent(event);
+		}
+		, is_safari = /constructor/i.test(view.HTMLElement) || view.safari
+		, is_chrome_ios =/CriOS\/[\d]+/.test(navigator.userAgent)
+		, throw_outside = function(ex) {
+			(view.setImmediate || view.setTimeout)(function() {
+				throw ex;
+			}, 0);
+		}
+		, force_saveable_type = "application/octet-stream"
+		// the Blob API is fundamentally broken as there is no "downloadfinished" event to subscribe to
+		, arbitrary_revoke_timeout = 1000 * 40 // in ms
+		, revoke = function(file) {
+			var revoker = function() {
+				if (typeof file === "string") { // file is an object URL
+					get_URL().revokeObjectURL(file);
+				} else { // file is a File
+					file.remove();
+				}
+			};
+			setTimeout(revoker, arbitrary_revoke_timeout);
+		}
+		, dispatch = function(filesaver, event_types, event) {
+			event_types = [].concat(event_types);
+			var i = event_types.length;
+			while (i--) {
+				var listener = filesaver["on" + event_types[i]];
+				if (typeof listener === "function") {
+					try {
+						listener.call(filesaver, event || filesaver);
+					} catch (ex) {
+						throw_outside(ex);
+					}
+				}
+			}
+		}
+		, auto_bom = function(blob) {
+			// prepend BOM for UTF-8 XML and text/* types (including HTML)
+			// note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF
+			if (/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) {
+				return new Blob([String.fromCharCode(0xFEFF), blob], {type: blob.type});
+			}
+			return blob;
+		}
+		, FileSaver = function(blob, name, no_auto_bom) {
+			if (!no_auto_bom) {
+				blob = auto_bom(blob);
+			}
+			// First try a.download, then web filesystem, then object URLs
+			var
+				  filesaver = this
+				, type = blob.type
+				, force = type === force_saveable_type
+				, object_url
+				, dispatch_all = function() {
+					dispatch(filesaver, "writestart progress write writeend".split(" "));
+				}
+				// on any filesys errors revert to saving with object URLs
+				, fs_error = function() {
+					if ((is_chrome_ios || (force && is_safari)) && view.FileReader) {
+						// Safari doesn't allow downloading of blob urls
+						var reader = new FileReader();
+						reader.onloadend = function() {
+							var url = is_chrome_ios ? reader.result : reader.result.replace(/^data:[^;]*;/, 'data:attachment/file;');
+							var popup = view.open(url, '_blank');
+							if(!popup) view.location.href = url;
+							url=undefined; // release reference before dispatching
+							filesaver.readyState = filesaver.DONE;
+							dispatch_all();
+						};
+						reader.readAsDataURL(blob);
+						filesaver.readyState = filesaver.INIT;
+						return;
+					}
+					// don't create more object URLs than needed
+					if (!object_url) {
+						object_url = get_URL().createObjectURL(blob);
+					}
+					if (force) {
+						view.location.href = object_url;
+					} else {
+						var opened = view.open(object_url, "_blank");
+						if (!opened) {
+							// Apple does not allow window.open, see https://developer.apple.com/library/safari/documentation/Tools/Conceptual/SafariExtensionGuide/WorkingwithWindowsandTabs/WorkingwithWindowsandTabs.html
+							view.location.href = object_url;
+						}
+					}
+					filesaver.readyState = filesaver.DONE;
+					dispatch_all();
+					revoke(object_url);
+				}
+			;
+			filesaver.readyState = filesaver.INIT;
+
+			if (can_use_save_link) {
+				object_url = get_URL().createObjectURL(blob);
+				setTimeout(function() {
+					save_link.href = object_url;
+					save_link.download = name;
+					click(save_link);
+					dispatch_all();
+					revoke(object_url);
+					filesaver.readyState = filesaver.DONE;
+				});
+				return;
+			}
+
+			fs_error();
+		}
+		, FS_proto = FileSaver.prototype
+		, saveAs = function(blob, name, no_auto_bom) {
+			return new FileSaver(blob, name || blob.name || "download", no_auto_bom);
+		}
+	;
+	// IE 10+ (native saveAs)
+	if (typeof navigator !== "undefined" && navigator.msSaveOrOpenBlob) {
+		return function(blob, name, no_auto_bom) {
+			name = name || blob.name || "download";
+
+			if (!no_auto_bom) {
+				blob = auto_bom(blob);
+			}
+			return navigator.msSaveOrOpenBlob(blob, name);
+		};
+	}
+
+	FS_proto.abort = function(){};
+	FS_proto.readyState = FS_proto.INIT = 0;
+	FS_proto.WRITING = 1;
+	FS_proto.DONE = 2;
+
+	FS_proto.error =
+	FS_proto.onwritestart =
+	FS_proto.onprogress =
+	FS_proto.onwrite =
+	FS_proto.onabort =
+	FS_proto.onerror =
+	FS_proto.onwriteend =
+		null;
+
+	return saveAs;
+}(
+	   typeof self !== "undefined" && self
+	|| typeof window !== "undefined" && window
+	|| this.content
+));
+// `self` is undefined in Firefox for Android content script context
+// while `this` is nsIContentFrameMessageManager
+// with an attribute `content` that corresponds to the window
+
+if (typeof module !== "undefined" && module.exports) {
+  module.exports.saveAs = saveAs;
+} else if (("function" !== "undefined" && __webpack_require__(/*! !webpack amd define */ "./node_modules/webpack/buildin/amd-define.js") !== null) && (__webpack_require__(/*! !webpack amd options */ "./node_modules/webpack/buildin/amd-options.js") !== null)) {
+  !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
+    return saveAs;
+  }).call(exports, __webpack_require__, exports, module),
+				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+}
+
+
+/***/ }),
+
+/***/ "./node_modules/history/DOMUtils.js":
+/*!******************************************!*\
+  !*** ./node_modules/history/DOMUtils.js ***!
+  \******************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+var canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
+
+var addEventListener = exports.addEventListener = function addEventListener(node, event, listener) {
+  return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener);
+};
+
+var removeEventListener = exports.removeEventListener = function removeEventListener(node, event, listener) {
+  return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener);
+};
+
+var getConfirmation = exports.getConfirmation = function getConfirmation(message, callback) {
+  return callback(window.confirm(message));
+}; // eslint-disable-line no-alert
+
+/**
+ * Returns true if the HTML5 history API is supported. Taken from Modernizr.
+ *
+ * https://github.com/Modernizr/Modernizr/blob/master/LICENSE
+ * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js
+ * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586
+ */
+var supportsHistory = exports.supportsHistory = function supportsHistory() {
+  var ua = window.navigator.userAgent;
+
+  if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;
+
+  return window.history && 'pushState' in window.history;
+};
+
+/**
+ * Returns true if browser fires popstate on hash change.
+ * IE10 and IE11 do not.
+ */
+var supportsPopStateOnHashChange = exports.supportsPopStateOnHashChange = function supportsPopStateOnHashChange() {
+  return window.navigator.userAgent.indexOf('Trident') === -1;
+};
+
+/**
+ * Returns false if using go(n) with hash history causes a full page reload.
+ */
+var supportsGoWithoutReloadUsingHash = exports.supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() {
+  return window.navigator.userAgent.indexOf('Firefox') === -1;
+};
+
+/**
+ * Returns true if a given popstate event is an extraneous WebKit event.
+ * Accounts for the fact that Chrome on iOS fires real popstate events
+ * containing undefined state when pressing the back button.
+ */
+var isExtraneousPopstateEvent = exports.isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) {
+  return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;
+};
+
+/***/ }),
+
+/***/ "./node_modules/history/LocationUtils.js":
+/*!***********************************************!*\
+  !*** ./node_modules/history/LocationUtils.js ***!
+  \***********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+exports.locationsAreEqual = exports.createLocation = undefined;
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _resolvePathname = __webpack_require__(/*! resolve-pathname */ "./node_modules/resolve-pathname/index.js");
+
+var _resolvePathname2 = _interopRequireDefault(_resolvePathname);
+
+var _valueEqual = __webpack_require__(/*! value-equal */ "./node_modules/value-equal/index.js");
+
+var _valueEqual2 = _interopRequireDefault(_valueEqual);
+
+var _PathUtils = __webpack_require__(/*! ./PathUtils */ "./node_modules/history/PathUtils.js");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var createLocation = exports.createLocation = function createLocation(path, state, key, currentLocation) {
+  var location = void 0;
+  if (typeof path === 'string') {
+    // Two-arg form: push(path, state)
+    location = (0, _PathUtils.parsePath)(path);
+    location.state = state;
+  } else {
+    // One-arg form: push(location)
+    location = _extends({}, path);
+
+    if (location.pathname === undefined) location.pathname = '';
+
+    if (location.search) {
+      if (location.search.charAt(0) !== '?') location.search = '?' + location.search;
+    } else {
+      location.search = '';
+    }
+
+    if (location.hash) {
+      if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;
+    } else {
+      location.hash = '';
+    }
+
+    if (state !== undefined && location.state === undefined) location.state = state;
+  }
+
+  try {
+    location.pathname = decodeURI(location.pathname);
+  } catch (e) {
+    if (e instanceof URIError) {
+      throw new URIError('Pathname "' + location.pathname + '" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');
+    } else {
+      throw e;
+    }
+  }
+
+  if (key) location.key = key;
+
+  if (currentLocation) {
+    // Resolve incomplete/relative pathname relative to current location.
+    if (!location.pathname) {
+      location.pathname = currentLocation.pathname;
+    } else if (location.pathname.charAt(0) !== '/') {
+      location.pathname = (0, _resolvePathname2.default)(location.pathname, currentLocation.pathname);
+    }
+  } else {
+    // When there is no prior location and pathname is empty, set it to /
+    if (!location.pathname) {
+      location.pathname = '/';
+    }
+  }
+
+  return location;
+};
+
+var locationsAreEqual = exports.locationsAreEqual = function locationsAreEqual(a, b) {
+  return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && (0, _valueEqual2.default)(a.state, b.state);
+};
+
+/***/ }),
+
+/***/ "./node_modules/history/PathUtils.js":
+/*!*******************************************!*\
+  !*** ./node_modules/history/PathUtils.js ***!
+  \*******************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+var addLeadingSlash = exports.addLeadingSlash = function addLeadingSlash(path) {
+  return path.charAt(0) === '/' ? path : '/' + path;
+};
+
+var stripLeadingSlash = exports.stripLeadingSlash = function stripLeadingSlash(path) {
+  return path.charAt(0) === '/' ? path.substr(1) : path;
+};
+
+var hasBasename = exports.hasBasename = function hasBasename(path, prefix) {
+  return new RegExp('^' + prefix + '(\\/|\\?|#|$)', 'i').test(path);
+};
+
+var stripBasename = exports.stripBasename = function stripBasename(path, prefix) {
+  return hasBasename(path, prefix) ? path.substr(prefix.length) : path;
+};
+
+var stripTrailingSlash = exports.stripTrailingSlash = function stripTrailingSlash(path) {
+  return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;
+};
+
+var parsePath = exports.parsePath = function parsePath(path) {
+  var pathname = path || '/';
+  var search = '';
+  var hash = '';
+
+  var hashIndex = pathname.indexOf('#');
+  if (hashIndex !== -1) {
+    hash = pathname.substr(hashIndex);
+    pathname = pathname.substr(0, hashIndex);
+  }
+
+  var searchIndex = pathname.indexOf('?');
+  if (searchIndex !== -1) {
+    search = pathname.substr(searchIndex);
+    pathname = pathname.substr(0, searchIndex);
+  }
+
+  return {
+    pathname: pathname,
+    search: search === '?' ? '' : search,
+    hash: hash === '#' ? '' : hash
+  };
+};
+
+var createPath = exports.createPath = function createPath(location) {
+  var pathname = location.pathname,
+      search = location.search,
+      hash = location.hash;
+
+
+  var path = pathname || '/';
+
+  if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search;
+
+  if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash;
+
+  return path;
+};
+
+/***/ }),
+
+/***/ "./node_modules/history/createBrowserHistory.js":
+/*!******************************************************!*\
+  !*** ./node_modules/history/createBrowserHistory.js ***!
+  \******************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _warning = __webpack_require__(/*! warning */ "./node_modules/warning/browser.js");
+
+var _warning2 = _interopRequireDefault(_warning);
+
+var _invariant = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js");
+
+var _invariant2 = _interopRequireDefault(_invariant);
+
+var _LocationUtils = __webpack_require__(/*! ./LocationUtils */ "./node_modules/history/LocationUtils.js");
+
+var _PathUtils = __webpack_require__(/*! ./PathUtils */ "./node_modules/history/PathUtils.js");
+
+var _createTransitionManager = __webpack_require__(/*! ./createTransitionManager */ "./node_modules/history/createTransitionManager.js");
+
+var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager);
+
+var _DOMUtils = __webpack_require__(/*! ./DOMUtils */ "./node_modules/history/DOMUtils.js");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var PopStateEvent = 'popstate';
+var HashChangeEvent = 'hashchange';
+
+var getHistoryState = function getHistoryState() {
+  try {
+    return window.history.state || {};
+  } catch (e) {
+    // IE 11 sometimes throws when accessing window.history.state
+    // See https://github.com/ReactTraining/history/pull/289
+    return {};
+  }
+};
+
+/**
+ * Creates a history object that uses the HTML5 history API including
+ * pushState, replaceState, and the popstate event.
+ */
+var createBrowserHistory = function createBrowserHistory() {
+  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+
+  (0, _invariant2.default)(_DOMUtils.canUseDOM, 'Browser history needs a DOM');
+
+  var globalHistory = window.history;
+  var canUseHistory = (0, _DOMUtils.supportsHistory)();
+  var needsHashChangeListener = !(0, _DOMUtils.supportsPopStateOnHashChange)();
+
+  var _props$forceRefresh = props.forceRefresh,
+      forceRefresh = _props$forceRefresh === undefined ? false : _props$forceRefresh,
+      _props$getUserConfirm = props.getUserConfirmation,
+      getUserConfirmation = _props$getUserConfirm === undefined ? _DOMUtils.getConfirmation : _props$getUserConfirm,
+      _props$keyLength = props.keyLength,
+      keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;
+
+  var basename = props.basename ? (0, _PathUtils.stripTrailingSlash)((0, _PathUtils.addLeadingSlash)(props.basename)) : '';
+
+  var getDOMLocation = function getDOMLocation(historyState) {
+    var _ref = historyState || {},
+        key = _ref.key,
+        state = _ref.state;
+
+    var _window$location = window.location,
+        pathname = _window$location.pathname,
+        search = _window$location.search,
+        hash = _window$location.hash;
+
+
+    var path = pathname + search + hash;
+
+    (0, _warning2.default)(!basename || (0, _PathUtils.hasBasename)(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path "' + path + '" to begin with "' + basename + '".');
+
+    if (basename) path = (0, _PathUtils.stripBasename)(path, basename);
+
+    return (0, _LocationUtils.createLocation)(path, state, key);
+  };
+
+  var createKey = function createKey() {
+    return Math.random().toString(36).substr(2, keyLength);
+  };
+
+  var transitionManager = (0, _createTransitionManager2.default)();
+
+  var setState = function setState(nextState) {
+    _extends(history, nextState);
+
+    history.length = globalHistory.length;
+
+    transitionManager.notifyListeners(history.location, history.action);
+  };
+
+  var handlePopState = function handlePopState(event) {
+    // Ignore extraneous popstate events in WebKit.
+    if ((0, _DOMUtils.isExtraneousPopstateEvent)(event)) return;
+
+    handlePop(getDOMLocation(event.state));
+  };
+
+  var handleHashChange = function handleHashChange() {
+    handlePop(getDOMLocation(getHistoryState()));
+  };
+
+  var forceNextPop = false;
+
+  var handlePop = function handlePop(location) {
+    if (forceNextPop) {
+      forceNextPop = false;
+      setState();
+    } else {
+      var action = 'POP';
+
+      transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
+        if (ok) {
+          setState({ action: action, location: location });
+        } else {
+          revertPop(location);
+        }
+      });
+    }
+  };
+
+  var revertPop = function revertPop(fromLocation) {
+    var toLocation = history.location;
+
+    // TODO: We could probably make this more reliable by
+    // keeping a list of keys we've seen in sessionStorage.
+    // Instead, we just default to 0 for keys we don't know.
+
+    var toIndex = allKeys.indexOf(toLocation.key);
+
+    if (toIndex === -1) toIndex = 0;
+
+    var fromIndex = allKeys.indexOf(fromLocation.key);
+
+    if (fromIndex === -1) fromIndex = 0;
+
+    var delta = toIndex - fromIndex;
+
+    if (delta) {
+      forceNextPop = true;
+      go(delta);
+    }
+  };
+
+  var initialLocation = getDOMLocation(getHistoryState());
+  var allKeys = [initialLocation.key];
+
+  // Public interface
+
+  var createHref = function createHref(location) {
+    return basename + (0, _PathUtils.createPath)(location);
+  };
+
+  var push = function push(path, state) {
+    (0, _warning2.default)(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');
+
+    var action = 'PUSH';
+    var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location);
+
+    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
+      if (!ok) return;
+
+      var href = createHref(location);
+      var key = location.key,
+          state = location.state;
+
+
+      if (canUseHistory) {
+        globalHistory.pushState({ key: key, state: state }, null, href);
+
+        if (forceRefresh) {
+          window.location.href = href;
+        } else {
+          var prevIndex = allKeys.indexOf(history.location.key);
+          var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);
+
+          nextKeys.push(location.key);
+          allKeys = nextKeys;
+
+          setState({ action: action, location: location });
+        }
+      } else {
+        (0, _warning2.default)(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history');
+
+        window.location.href = href;
+      }
+    });
+  };
+
+  var replace = function replace(path, state) {
+    (0, _warning2.default)(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');
+
+    var action = 'REPLACE';
+    var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location);
+
+    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
+      if (!ok) return;
+
+      var href = createHref(location);
+      var key = location.key,
+          state = location.state;
+
+
+      if (canUseHistory) {
+        globalHistory.replaceState({ key: key, state: state }, null, href);
+
+        if (forceRefresh) {
+          window.location.replace(href);
+        } else {
+          var prevIndex = allKeys.indexOf(history.location.key);
+
+          if (prevIndex !== -1) allKeys[prevIndex] = location.key;
+
+          setState({ action: action, location: location });
+        }
+      } else {
+        (0, _warning2.default)(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history');
+
+        window.location.replace(href);
+      }
+    });
+  };
+
+  var go = function go(n) {
+    globalHistory.go(n);
+  };
+
+  var goBack = function goBack() {
+    return go(-1);
+  };
+
+  var goForward = function goForward() {
+    return go(1);
+  };
+
+  var listenerCount = 0;
+
+  var checkDOMListeners = function checkDOMListeners(delta) {
+    listenerCount += delta;
+
+    if (listenerCount === 1) {
+      (0, _DOMUtils.addEventListener)(window, PopStateEvent, handlePopState);
+
+      if (needsHashChangeListener) (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleHashChange);
+    } else if (listenerCount === 0) {
+      (0, _DOMUtils.removeEventListener)(window, PopStateEvent, handlePopState);
+
+      if (needsHashChangeListener) (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleHashChange);
+    }
+  };
+
+  var isBlocked = false;
+
+  var block = function block() {
+    var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
+
+    var unblock = transitionManager.setPrompt(prompt);
+
+    if (!isBlocked) {
+      checkDOMListeners(1);
+      isBlocked = true;
+    }
+
+    return function () {
+      if (isBlocked) {
+        isBlocked = false;
+        checkDOMListeners(-1);
+      }
+
+      return unblock();
+    };
+  };
+
+  var listen = function listen(listener) {
+    var unlisten = transitionManager.appendListener(listener);
+    checkDOMListeners(1);
+
+    return function () {
+      checkDOMListeners(-1);
+      unlisten();
+    };
+  };
+
+  var history = {
+    length: globalHistory.length,
+    action: 'POP',
+    location: initialLocation,
+    createHref: createHref,
+    push: push,
+    replace: replace,
+    go: go,
+    goBack: goBack,
+    goForward: goForward,
+    block: block,
+    listen: listen
+  };
+
+  return history;
+};
+
+exports.default = createBrowserHistory;
+
+/***/ }),
+
+/***/ "./node_modules/history/createTransitionManager.js":
+/*!*********************************************************!*\
+  !*** ./node_modules/history/createTransitionManager.js ***!
+  \*********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+
+var _warning = __webpack_require__(/*! warning */ "./node_modules/warning/browser.js");
+
+var _warning2 = _interopRequireDefault(_warning);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var createTransitionManager = function createTransitionManager() {
+  var prompt = null;
+
+  var setPrompt = function setPrompt(nextPrompt) {
+    (0, _warning2.default)(prompt == null, 'A history supports only one prompt at a time');
+
+    prompt = nextPrompt;
+
+    return function () {
+      if (prompt === nextPrompt) prompt = null;
+    };
+  };
+
+  var confirmTransitionTo = function confirmTransitionTo(location, action, getUserConfirmation, callback) {
+    // TODO: If another transition starts while we're still confirming
+    // the previous one, we may end up in a weird state. Figure out the
+    // best way to handle this.
+    if (prompt != null) {
+      var result = typeof prompt === 'function' ? prompt(location, action) : prompt;
+
+      if (typeof result === 'string') {
+        if (typeof getUserConfirmation === 'function') {
+          getUserConfirmation(result, callback);
+        } else {
+          (0, _warning2.default)(false, 'A history needs a getUserConfirmation function in order to use a prompt message');
+
+          callback(true);
+        }
+      } else {
+        // Return false from a transition hook to cancel the transition.
+        callback(result !== false);
+      }
+    } else {
+      callback(true);
+    }
+  };
+
+  var listeners = [];
+
+  var appendListener = function appendListener(fn) {
+    var isActive = true;
+
+    var listener = function listener() {
+      if (isActive) fn.apply(undefined, arguments);
+    };
+
+    listeners.push(listener);
+
+    return function () {
+      isActive = false;
+      listeners = listeners.filter(function (item) {
+        return item !== listener;
+      });
+    };
+  };
+
+  var notifyListeners = function notifyListeners() {
+    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+      args[_key] = arguments[_key];
+    }
+
+    listeners.forEach(function (listener) {
+      return listener.apply(undefined, args);
+    });
+  };
+
+  return {
+    setPrompt: setPrompt,
+    confirmTransitionTo: confirmTransitionTo,
+    appendListener: appendListener,
+    notifyListeners: notifyListeners
+  };
+};
+
+exports.default = createTransitionManager;
+
+/***/ }),
+
+/***/ "./node_modules/invariant/browser.js":
+/*!*******************************************!*\
+  !*** ./node_modules/invariant/browser.js ***!
+  \*******************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+
+
+/**
+ * Use invariant() to assert state which your program assumes to be true.
+ *
+ * Provide sprintf-style format (only %s is supported) and arguments
+ * to provide information about what broke and what you were
+ * expecting.
+ *
+ * The invariant message will be stripped in production, but the invariant
+ * will remain to ensure logic does not differ in production.
+ */
+
+var invariant = function(condition, format, a, b, c, d, e, f) {
+  if (true) {
+    if (format === undefined) {
+      throw new Error('invariant requires an error message argument');
+    }
+  }
+
+  if (!condition) {
+    var error;
+    if (format === undefined) {
+      error = new Error(
+        'Minified exception occurred; use the non-minified dev environment ' +
+        'for the full error message and additional helpful warnings.'
+      );
+    } else {
+      var args = [a, b, c, d, e, f];
+      var argIndex = 0;
+      error = new Error(
+        format.replace(/%s/g, function() { return args[argIndex++]; })
+      );
+      error.name = 'Invariant Violation';
+    }
+
+    error.framesToPop = 1; // we don't care about invariant's own frame
+    throw error;
+  }
+};
+
+module.exports = invariant;
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/base64.js":
+/*!******************************************!*\
+  !*** ./node_modules/jszip/lib/base64.js ***!
+  \******************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var utils = __webpack_require__(/*! ./utils */ "./node_modules/jszip/lib/utils.js");
+var support = __webpack_require__(/*! ./support */ "./node_modules/jszip/lib/support.js");
+// private property
+var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
+
+
+// public method for encoding
+exports.encode = function(input) {
+    var output = [];
+    var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
+    var i = 0, len = input.length, remainingBytes = len;
+
+    var isArray = utils.getTypeOf(input) !== "string";
+    while (i < input.length) {
+        remainingBytes = len - i;
+
+        if (!isArray) {
+            chr1 = input.charCodeAt(i++);
+            chr2 = i < len ? input.charCodeAt(i++) : 0;
+            chr3 = i < len ? input.charCodeAt(i++) : 0;
+        } else {
+            chr1 = input[i++];
+            chr2 = i < len ? input[i++] : 0;
+            chr3 = i < len ? input[i++] : 0;
+        }
+
+        enc1 = chr1 >> 2;
+        enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
+        enc3 = remainingBytes > 1 ? (((chr2 & 15) << 2) | (chr3 >> 6)) : 64;
+        enc4 = remainingBytes > 2 ? (chr3 & 63) : 64;
+
+        output.push(_keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4));
+
+    }
+
+    return output.join("");
+};
+
+// public method for decoding
+exports.decode = function(input) {
+    var chr1, chr2, chr3;
+    var enc1, enc2, enc3, enc4;
+    var i = 0, resultIndex = 0;
+
+    var dataUrlPrefix = "data:";
+
+    if (input.substr(0, dataUrlPrefix.length) === dataUrlPrefix) {
+        // This is a common error: people give a data url
+        // (data:image/png;base64,iVBOR...) with a {base64: true} and
+        // wonders why things don't work.
+        // We can detect that the string input looks like a data url but we
+        // *can't* be sure it is one: removing everything up to the comma would
+        // be too dangerous.
+        throw new Error("Invalid base64 input, it looks like a data url.");
+    }
+
+    input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
+
+    var totalLength = input.length * 3 / 4;
+    if(input.charAt(input.length - 1) === _keyStr.charAt(64)) {
+        totalLength--;
+    }
+    if(input.charAt(input.length - 2) === _keyStr.charAt(64)) {
+        totalLength--;
+    }
+    if (totalLength % 1 !== 0) {
+        // totalLength is not an integer, the length does not match a valid
+        // base64 content. That can happen if:
+        // - the input is not a base64 content
+        // - the input is *almost* a base64 content, with a extra chars at the
+        //   beginning or at the end
+        // - the input uses a base64 variant (base64url for example)
+        throw new Error("Invalid base64 input, bad content length.");
+    }
+    var output;
+    if (support.uint8array) {
+        output = new Uint8Array(totalLength|0);
+    } else {
+        output = new Array(totalLength|0);
+    }
+
+    while (i < input.length) {
+
+        enc1 = _keyStr.indexOf(input.charAt(i++));
+        enc2 = _keyStr.indexOf(input.charAt(i++));
+        enc3 = _keyStr.indexOf(input.charAt(i++));
+        enc4 = _keyStr.indexOf(input.charAt(i++));
+
+        chr1 = (enc1 << 2) | (enc2 >> 4);
+        chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
+        chr3 = ((enc3 & 3) << 6) | enc4;
+
+        output[resultIndex++] = chr1;
+
+        if (enc3 !== 64) {
+            output[resultIndex++] = chr2;
+        }
+        if (enc4 !== 64) {
+            output[resultIndex++] = chr3;
+        }
+
+    }
+
+    return output;
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/compressedObject.js":
+/*!****************************************************!*\
+  !*** ./node_modules/jszip/lib/compressedObject.js ***!
+  \****************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var external = __webpack_require__(/*! ./external */ "./node_modules/jszip/lib/external.js");
+var DataWorker = __webpack_require__(/*! ./stream/DataWorker */ "./node_modules/jszip/lib/stream/DataWorker.js");
+var DataLengthProbe = __webpack_require__(/*! ./stream/DataLengthProbe */ "./node_modules/jszip/lib/stream/DataLengthProbe.js");
+var Crc32Probe = __webpack_require__(/*! ./stream/Crc32Probe */ "./node_modules/jszip/lib/stream/Crc32Probe.js");
+var DataLengthProbe = __webpack_require__(/*! ./stream/DataLengthProbe */ "./node_modules/jszip/lib/stream/DataLengthProbe.js");
+
+/**
+ * Represent a compressed object, with everything needed to decompress it.
+ * @constructor
+ * @param {number} compressedSize the size of the data compressed.
+ * @param {number} uncompressedSize the size of the data after decompression.
+ * @param {number} crc32 the crc32 of the decompressed file.
+ * @param {object} compression the type of compression, see lib/compressions.js.
+ * @param {String|ArrayBuffer|Uint8Array|Buffer} data the compressed data.
+ */
+function CompressedObject(compressedSize, uncompressedSize, crc32, compression, data) {
+    this.compressedSize = compressedSize;
+    this.uncompressedSize = uncompressedSize;
+    this.crc32 = crc32;
+    this.compression = compression;
+    this.compressedContent = data;
+}
+
+CompressedObject.prototype = {
+    /**
+     * Create a worker to get the uncompressed content.
+     * @return {GenericWorker} the worker.
+     */
+    getContentWorker : function () {
+        var worker = new DataWorker(external.Promise.resolve(this.compressedContent))
+        .pipe(this.compression.uncompressWorker())
+        .pipe(new DataLengthProbe("data_length"));
+
+        var that = this;
+        worker.on("end", function () {
+            if(this.streamInfo['data_length'] !== that.uncompressedSize) {
+                throw new Error("Bug : uncompressed data size mismatch");
+            }
+        });
+        return worker;
+    },
+    /**
+     * Create a worker to get the compressed content.
+     * @return {GenericWorker} the worker.
+     */
+    getCompressedWorker : function () {
+        return new DataWorker(external.Promise.resolve(this.compressedContent))
+        .withStreamInfo("compressedSize", this.compressedSize)
+        .withStreamInfo("uncompressedSize", this.uncompressedSize)
+        .withStreamInfo("crc32", this.crc32)
+        .withStreamInfo("compression", this.compression)
+        ;
+    }
+};
+
+/**
+ * Chain the given worker with other workers to compress the content with the
+ * given compresion.
+ * @param {GenericWorker} uncompressedWorker the worker to pipe.
+ * @param {Object} compression the compression object.
+ * @param {Object} compressionOptions the options to use when compressing.
+ * @return {GenericWorker} the new worker compressing the content.
+ */
+CompressedObject.createWorkerFrom = function (uncompressedWorker, compression, compressionOptions) {
+    return uncompressedWorker
+    .pipe(new Crc32Probe())
+    .pipe(new DataLengthProbe("uncompressedSize"))
+    .pipe(compression.compressWorker(compressionOptions))
+    .pipe(new DataLengthProbe("compressedSize"))
+    .withStreamInfo("compression", compression);
+};
+
+module.exports = CompressedObject;
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/compressions.js":
+/*!************************************************!*\
+  !*** ./node_modules/jszip/lib/compressions.js ***!
+  \************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var GenericWorker = __webpack_require__(/*! ./stream/GenericWorker */ "./node_modules/jszip/lib/stream/GenericWorker.js");
+
+exports.STORE = {
+    magic: "\x00\x00",
+    compressWorker : function (compressionOptions) {
+        return new GenericWorker("STORE compression");
+    },
+    uncompressWorker : function () {
+        return new GenericWorker("STORE decompression");
+    }
+};
+exports.DEFLATE = __webpack_require__(/*! ./flate */ "./node_modules/jszip/lib/flate.js");
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/crc32.js":
+/*!*****************************************!*\
+  !*** ./node_modules/jszip/lib/crc32.js ***!
+  \*****************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var utils = __webpack_require__(/*! ./utils */ "./node_modules/jszip/lib/utils.js");
+
+/**
+ * The following functions come from pako, from pako/lib/zlib/crc32.js
+ * released under the MIT license, see pako https://github.com/nodeca/pako/
+ */
+
+// Use ordinary array, since untyped makes no boost here
+function makeTable() {
+    var c, table = [];
+
+    for(var n =0; n < 256; n++){
+        c = n;
+        for(var k =0; k < 8; k++){
+            c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));
+        }
+        table[n] = c;
+    }
+
+    return table;
+}
+
+// Create table on load. Just 255 signed longs. Not a problem.
+var crcTable = makeTable();
+
+
+function crc32(crc, buf, len, pos) {
+    var t = crcTable, end = pos + len;
+
+    crc = crc ^ (-1);
+
+    for (var i = pos; i < end; i++ ) {
+        crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];
+    }
+
+    return (crc ^ (-1)); // >>> 0;
+}
+
+// That's all for the pako functions.
+
+/**
+ * Compute the crc32 of a string.
+ * This is almost the same as the function crc32, but for strings. Using the
+ * same function for the two use cases leads to horrible performances.
+ * @param {Number} crc the starting value of the crc.
+ * @param {String} str the string to use.
+ * @param {Number} len the length of the string.
+ * @param {Number} pos the starting position for the crc32 computation.
+ * @return {Number} the computed crc32.
+ */
+function crc32str(crc, str, len, pos) {
+    var t = crcTable, end = pos + len;
+
+    crc = crc ^ (-1);
+
+    for (var i = pos; i < end; i++ ) {
+        crc = (crc >>> 8) ^ t[(crc ^ str.charCodeAt(i)) & 0xFF];
+    }
+
+    return (crc ^ (-1)); // >>> 0;
+}
+
+module.exports = function crc32wrapper(input, crc) {
+    if (typeof input === "undefined" || !input.length) {
+        return 0;
+    }
+
+    var isArray = utils.getTypeOf(input) !== "string";
+
+    if(isArray) {
+        return crc32(crc|0, input, input.length, 0);
+    } else {
+        return crc32str(crc|0, input, input.length, 0);
+    }
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/defaults.js":
+/*!********************************************!*\
+  !*** ./node_modules/jszip/lib/defaults.js ***!
+  \********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+exports.base64 = false;
+exports.binary = false;
+exports.dir = false;
+exports.createFolders = true;
+exports.date = null;
+exports.compression = null;
+exports.compressionOptions = null;
+exports.comment = null;
+exports.unixPermissions = null;
+exports.dosPermissions = null;
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/external.js":
+/*!********************************************!*\
+  !*** ./node_modules/jszip/lib/external.js ***!
+  \********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* global Promise */
+
+
+// load the global object first:
+// - it should be better integrated in the system (unhandledRejection in node)
+// - the environment may have a custom Promise implementation (see zone.js)
+var ES6Promise = null;
+if (typeof Promise !== "undefined") {
+    ES6Promise = Promise;
+} else {
+    ES6Promise = __webpack_require__(/*! lie */ "./node_modules/jszip/node_modules/lie/lib/browser.js");
+}
+
+/**
+ * Let the user use/change some implementations.
+ */
+module.exports = {
+    Promise: ES6Promise
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/flate.js":
+/*!*****************************************!*\
+  !*** ./node_modules/jszip/lib/flate.js ***!
+  \*****************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var USE_TYPEDARRAY = (typeof Uint8Array !== 'undefined') && (typeof Uint16Array !== 'undefined') && (typeof Uint32Array !== 'undefined');
+
+var pako = __webpack_require__(/*! pako */ "./node_modules/jszip/node_modules/pako/index.js");
+var utils = __webpack_require__(/*! ./utils */ "./node_modules/jszip/lib/utils.js");
+var GenericWorker = __webpack_require__(/*! ./stream/GenericWorker */ "./node_modules/jszip/lib/stream/GenericWorker.js");
+
+var ARRAY_TYPE = USE_TYPEDARRAY ? "uint8array" : "array";
+
+exports.magic = "\x08\x00";
+
+/**
+ * Create a worker that uses pako to inflate/deflate.
+ * @constructor
+ * @param {String} action the name of the pako function to call : either "Deflate" or "Inflate".
+ * @param {Object} options the options to use when (de)compressing.
+ */
+function FlateWorker(action, options) {
+    GenericWorker.call(this, "FlateWorker/" + action);
+
+    this._pako = null;
+    this._pakoAction = action;
+    this._pakoOptions = options;
+    // the `meta` object from the last chunk received
+    // this allow this worker to pass around metadata
+    this.meta = {};
+}
+
+utils.inherits(FlateWorker, GenericWorker);
+
+/**
+ * @see GenericWorker.processChunk
+ */
+FlateWorker.prototype.processChunk = function (chunk) {
+    this.meta = chunk.meta;
+    if (this._pako === null) {
+        this._createPako();
+    }
+    this._pako.push(utils.transformTo(ARRAY_TYPE, chunk.data), false);
+};
+
+/**
+ * @see GenericWorker.flush
+ */
+FlateWorker.prototype.flush = function () {
+    GenericWorker.prototype.flush.call(this);
+    if (this._pako === null) {
+        this._createPako();
+    }
+    this._pako.push([], true);
+};
+/**
+ * @see GenericWorker.cleanUp
+ */
+FlateWorker.prototype.cleanUp = function () {
+    GenericWorker.prototype.cleanUp.call(this);
+    this._pako = null;
+};
+
+/**
+ * Create the _pako object.
+ * TODO: lazy-loading this object isn't the best solution but it's the
+ * quickest. The best solution is to lazy-load the worker list. See also the
+ * issue #446.
+ */
+FlateWorker.prototype._createPako = function () {
+    this._pako = new pako[this._pakoAction]({
+        raw: true,
+        level: this._pakoOptions.level || -1 // default compression
+    });
+    var self = this;
+    this._pako.onData = function(data) {
+        self.push({
+            data : data,
+            meta : self.meta
+        });
+    };
+};
+
+exports.compressWorker = function (compressionOptions) {
+    return new FlateWorker("Deflate", compressionOptions);
+};
+exports.uncompressWorker = function () {
+    return new FlateWorker("Inflate", {});
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/generate/ZipFileWorker.js":
+/*!**********************************************************!*\
+  !*** ./node_modules/jszip/lib/generate/ZipFileWorker.js ***!
+  \**********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var utils = __webpack_require__(/*! ../utils */ "./node_modules/jszip/lib/utils.js");
+var GenericWorker = __webpack_require__(/*! ../stream/GenericWorker */ "./node_modules/jszip/lib/stream/GenericWorker.js");
+var utf8 = __webpack_require__(/*! ../utf8 */ "./node_modules/jszip/lib/utf8.js");
+var crc32 = __webpack_require__(/*! ../crc32 */ "./node_modules/jszip/lib/crc32.js");
+var signature = __webpack_require__(/*! ../signature */ "./node_modules/jszip/lib/signature.js");
+
+/**
+ * Transform an integer into a string in hexadecimal.
+ * @private
+ * @param {number} dec the number to convert.
+ * @param {number} bytes the number of bytes to generate.
+ * @returns {string} the result.
+ */
+var decToHex = function(dec, bytes) {
+    var hex = "", i;
+    for (i = 0; i < bytes; i++) {
+        hex += String.fromCharCode(dec & 0xff);
+        dec = dec >>> 8;
+    }
+    return hex;
+};
+
+/**
+ * Generate the UNIX part of the external file attributes.
+ * @param {Object} unixPermissions the unix permissions or null.
+ * @param {Boolean} isDir true if the entry is a directory, false otherwise.
+ * @return {Number} a 32 bit integer.
+ *
+ * adapted from http://unix.stackexchange.com/questions/14705/the-zip-formats-external-file-attribute :
+ *
+ * TTTTsstrwxrwxrwx0000000000ADVSHR
+ * ^^^^____________________________ file type, see zipinfo.c (UNX_*)
+ *     ^^^_________________________ setuid, setgid, sticky
+ *        ^^^^^^^^^________________ permissions
+ *                 ^^^^^^^^^^______ not used ?
+ *                           ^^^^^^ DOS attribute bits : Archive, Directory, Volume label, System file, Hidden, Read only
+ */
+var generateUnixExternalFileAttr = function (unixPermissions, isDir) {
+
+    var result = unixPermissions;
+    if (!unixPermissions) {
+        // I can't use octal values in strict mode, hence the hexa.
+        //  040775 => 0x41fd
+        // 0100664 => 0x81b4
+        result = isDir ? 0x41fd : 0x81b4;
+    }
+    return (result & 0xFFFF) << 16;
+};
+
+/**
+ * Generate the DOS part of the external file attributes.
+ * @param {Object} dosPermissions the dos permissions or null.
+ * @param {Boolean} isDir true if the entry is a directory, false otherwise.
+ * @return {Number} a 32 bit integer.
+ *
+ * Bit 0     Read-Only
+ * Bit 1     Hidden
+ * Bit 2     System
+ * Bit 3     Volume Label
+ * Bit 4     Directory
+ * Bit 5     Archive
+ */
+var generateDosExternalFileAttr = function (dosPermissions, isDir) {
+
+    // the dir flag is already set for compatibility
+    return (dosPermissions || 0)  & 0x3F;
+};
+
+/**
+ * Generate the various parts used in the construction of the final zip file.
+ * @param {Object} streamInfo the hash with informations about the compressed file.
+ * @param {Boolean} streamedContent is the content streamed ?
+ * @param {Boolean} streamingEnded is the stream finished ?
+ * @param {number} offset the current offset from the start of the zip file.
+ * @param {String} platform let's pretend we are this platform (change platform dependents fields)
+ * @param {Function} encodeFileName the function to encode the file name / comment.
+ * @return {Object} the zip parts.
+ */
+var generateZipParts = function(streamInfo, streamedContent, streamingEnded, offset, platform, encodeFileName) {
+    var file = streamInfo['file'],
+    compression = streamInfo['compression'],
+    useCustomEncoding = encodeFileName !== utf8.utf8encode,
+    encodedFileName = utils.transformTo("string", encodeFileName(file.name)),
+    utfEncodedFileName = utils.transformTo("string", utf8.utf8encode(file.name)),
+    comment = file.comment,
+    encodedComment = utils.transformTo("string", encodeFileName(comment)),
+    utfEncodedComment = utils.transformTo("string", utf8.utf8encode(comment)),
+    useUTF8ForFileName = utfEncodedFileName.length !== file.name.length,
+    useUTF8ForComment = utfEncodedComment.length !== comment.length,
+    dosTime,
+    dosDate,
+    extraFields = "",
+    unicodePathExtraField = "",
+    unicodeCommentExtraField = "",
+    dir = file.dir,
+    date = file.date;
+
+
+    var dataInfo = {
+        crc32 : 0,
+        compressedSize : 0,
+        uncompressedSize : 0
+    };
+
+    // if the content is streamed, the sizes/crc32 are only available AFTER
+    // the end of the stream.
+    if (!streamedContent || streamingEnded) {
+        dataInfo.crc32 = streamInfo['crc32'];
+        dataInfo.compressedSize = streamInfo['compressedSize'];
+        dataInfo.uncompressedSize = streamInfo['uncompressedSize'];
+    }
+
+    var bitflag = 0;
+    if (streamedContent) {
+        // Bit 3: the sizes/crc32 are set to zero in the local header.
+        // The correct values are put in the data descriptor immediately
+        // following the compressed data.
+        bitflag |= 0x0008;
+    }
+    if (!useCustomEncoding && (useUTF8ForFileName || useUTF8ForComment)) {
+        // Bit 11: Language encoding flag (EFS).
+        bitflag |= 0x0800;
+    }
+
+
+    var extFileAttr = 0;
+    var versionMadeBy = 0;
+    if (dir) {
+        // dos or unix, we set the dos dir flag
+        extFileAttr |= 0x00010;
+    }
+    if(platform === "UNIX") {
+        versionMadeBy = 0x031E; // UNIX, version 3.0
+        extFileAttr |= generateUnixExternalFileAttr(file.unixPermissions, dir);
+    } else { // DOS or other, fallback to DOS
+        versionMadeBy = 0x0014; // DOS, version 2.0
+        extFileAttr |= generateDosExternalFileAttr(file.dosPermissions, dir);
+    }
+
+    // date
+    // @see http://www.delorie.com/djgpp/doc/rbinter/it/52/13.html
+    // @see http://www.delorie.com/djgpp/doc/rbinter/it/65/16.html
+    // @see http://www.delorie.com/djgpp/doc/rbinter/it/66/16.html
+
+    dosTime = date.getUTCHours();
+    dosTime = dosTime << 6;
+    dosTime = dosTime | date.getUTCMinutes();
+    dosTime = dosTime << 5;
+    dosTime = dosTime | date.getUTCSeconds() / 2;
+
+    dosDate = date.getUTCFullYear() - 1980;
+    dosDate = dosDate << 4;
+    dosDate = dosDate | (date.getUTCMonth() + 1);
+    dosDate = dosDate << 5;
+    dosDate = dosDate | date.getUTCDate();
+
+    if (useUTF8ForFileName) {
+        // set the unicode path extra field. unzip needs at least one extra
+        // field to correctly handle unicode path, so using the path is as good
+        // as any other information. This could improve the situation with
+        // other archive managers too.
+        // This field is usually used without the utf8 flag, with a non
+        // unicode path in the header (winrar, winzip). This helps (a bit)
+        // with the messy Windows' default compressed folders feature but
+        // breaks on p7zip which doesn't seek the unicode path extra field.
+        // So for now, UTF-8 everywhere !
+        unicodePathExtraField =
+            // Version
+            decToHex(1, 1) +
+            // NameCRC32
+            decToHex(crc32(encodedFileName), 4) +
+            // UnicodeName
+            utfEncodedFileName;
+
+        extraFields +=
+            // Info-ZIP Unicode Path Extra Field
+            "\x75\x70" +
+            // size
+            decToHex(unicodePathExtraField.length, 2) +
+            // content
+            unicodePathExtraField;
+    }
+
+    if(useUTF8ForComment) {
+
+        unicodeCommentExtraField =
+            // Version
+            decToHex(1, 1) +
+            // CommentCRC32
+            decToHex(crc32(encodedComment), 4) +
+            // UnicodeName
+            utfEncodedComment;
+
+        extraFields +=
+            // Info-ZIP Unicode Path Extra Field
+            "\x75\x63" +
+            // size
+            decToHex(unicodeCommentExtraField.length, 2) +
+            // content
+            unicodeCommentExtraField;
+    }
+
+    var header = "";
+
+    // version needed to extract
+    header += "\x0A\x00";
+    // general purpose bit flag
+    header += decToHex(bitflag, 2);
+    // compression method
+    header += compression.magic;
+    // last mod file time
+    header += decToHex(dosTime, 2);
+    // last mod file date
+    header += decToHex(dosDate, 2);
+    // crc-32
+    header += decToHex(dataInfo.crc32, 4);
+    // compressed size
+    header += decToHex(dataInfo.compressedSize, 4);
+    // uncompressed size
+    header += decToHex(dataInfo.uncompressedSize, 4);
+    // file name length
+    header += decToHex(encodedFileName.length, 2);
+    // extra field length
+    header += decToHex(extraFields.length, 2);
+
+
+    var fileRecord = signature.LOCAL_FILE_HEADER + header + encodedFileName + extraFields;
+
+    var dirRecord = signature.CENTRAL_FILE_HEADER +
+        // version made by (00: DOS)
+        decToHex(versionMadeBy, 2) +
+        // file header (common to file and central directory)
+        header +
+        // file comment length
+        decToHex(encodedComment.length, 2) +
+        // disk number start
+        "\x00\x00" +
+        // internal file attributes TODO
+        "\x00\x00" +
+        // external file attributes
+        decToHex(extFileAttr, 4) +
+        // relative offset of local header
+        decToHex(offset, 4) +
+        // file name
+        encodedFileName +
+        // extra field
+        extraFields +
+        // file comment
+        encodedComment;
+
+    return {
+        fileRecord: fileRecord,
+        dirRecord: dirRecord
+    };
+};
+
+/**
+ * Generate the EOCD record.
+ * @param {Number} entriesCount the number of entries in the zip file.
+ * @param {Number} centralDirLength the length (in bytes) of the central dir.
+ * @param {Number} localDirLength the length (in bytes) of the local dir.
+ * @param {String} comment the zip file comment as a binary string.
+ * @param {Function} encodeFileName the function to encode the comment.
+ * @return {String} the EOCD record.
+ */
+var generateCentralDirectoryEnd = function (entriesCount, centralDirLength, localDirLength, comment, encodeFileName) {
+    var dirEnd = "";
+    var encodedComment = utils.transformTo("string", encodeFileName(comment));
+
+    // end of central dir signature
+    dirEnd = signature.CENTRAL_DIRECTORY_END +
+        // number of this disk
+        "\x00\x00" +
+        // number of the disk with the start of the central directory
+        "\x00\x00" +
+        // total number of entries in the central directory on this disk
+        decToHex(entriesCount, 2) +
+        // total number of entries in the central directory
+        decToHex(entriesCount, 2) +
+        // size of the central directory   4 bytes
+        decToHex(centralDirLength, 4) +
+        // offset of start of central directory with respect to the starting disk number
+        decToHex(localDirLength, 4) +
+        // .ZIP file comment length
+        decToHex(encodedComment.length, 2) +
+        // .ZIP file comment
+        encodedComment;
+
+    return dirEnd;
+};
+
+/**
+ * Generate data descriptors for a file entry.
+ * @param {Object} streamInfo the hash generated by a worker, containing informations
+ * on the file entry.
+ * @return {String} the data descriptors.
+ */
+var generateDataDescriptors = function (streamInfo) {
+    var descriptor = "";
+    descriptor = signature.DATA_DESCRIPTOR +
+        // crc-32                          4 bytes
+        decToHex(streamInfo['crc32'], 4) +
+        // compressed size                 4 bytes
+        decToHex(streamInfo['compressedSize'], 4) +
+        // uncompressed size               4 bytes
+        decToHex(streamInfo['uncompressedSize'], 4);
+
+    return descriptor;
+};
+
+
+/**
+ * A worker to concatenate other workers to create a zip file.
+ * @param {Boolean} streamFiles `true` to stream the content of the files,
+ * `false` to accumulate it.
+ * @param {String} comment the comment to use.
+ * @param {String} platform the platform to use, "UNIX" or "DOS".
+ * @param {Function} encodeFileName the function to encode file names and comments.
+ */
+function ZipFileWorker(streamFiles, comment, platform, encodeFileName) {
+    GenericWorker.call(this, "ZipFileWorker");
+    // The number of bytes written so far. This doesn't count accumulated chunks.
+    this.bytesWritten = 0;
+    // The comment of the zip file
+    this.zipComment = comment;
+    // The platform "generating" the zip file.
+    this.zipPlatform = platform;
+    // the function to encode file names and comments.
+    this.encodeFileName = encodeFileName;
+    // Should we stream the content of the files ?
+    this.streamFiles = streamFiles;
+    // If `streamFiles` is false, we will need to accumulate the content of the
+    // files to calculate sizes / crc32 (and write them *before* the content).
+    // This boolean indicates if we are accumulating chunks (it will change a lot
+    // during the lifetime of this worker).
+    this.accumulate = false;
+    // The buffer receiving chunks when accumulating content.
+    this.contentBuffer = [];
+    // The list of generated directory records.
+    this.dirRecords = [];
+    // The offset (in bytes) from the beginning of the zip file for the current source.
+    this.currentSourceOffset = 0;
+    // The total number of entries in this zip file.
+    this.entriesCount = 0;
+    // the name of the file currently being added, null when handling the end of the zip file.
+    // Used for the emited metadata.
+    this.currentFile = null;
+
+
+
+    this._sources = [];
+}
+utils.inherits(ZipFileWorker, GenericWorker);
+
+/**
+ * @see GenericWorker.push
+ */
+ZipFileWorker.prototype.push = function (chunk) {
+
+    var currentFilePercent = chunk.meta.percent || 0;
+    var entriesCount = this.entriesCount;
+    var remainingFiles = this._sources.length;
+
+    if(this.accumulate) {
+        this.contentBuffer.push(chunk);
+    } else {
+        this.bytesWritten += chunk.data.length;
+
+        GenericWorker.prototype.push.call(this, {
+            data : chunk.data,
+            meta : {
+                currentFile : this.currentFile,
+                percent : entriesCount ? (currentFilePercent + 100 * (entriesCount - remainingFiles - 1)) / entriesCount : 100
+            }
+        });
+    }
+};
+
+/**
+ * The worker started a new source (an other worker).
+ * @param {Object} streamInfo the streamInfo object from the new source.
+ */
+ZipFileWorker.prototype.openedSource = function (streamInfo) {
+    this.currentSourceOffset = this.bytesWritten;
+    this.currentFile = streamInfo['file'].name;
+
+    var streamedContent = this.streamFiles && !streamInfo['file'].dir;
+
+    // don't stream folders (because they don't have any content)
+    if(streamedContent) {
+        var record = generateZipParts(streamInfo, streamedContent, false, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
+        this.push({
+            data : record.fileRecord,
+            meta : {percent:0}
+        });
+    } else {
+        // we need to wait for the whole file before pushing anything
+        this.accumulate = true;
+    }
+};
+
+/**
+ * The worker finished a source (an other worker).
+ * @param {Object} streamInfo the streamInfo object from the finished source.
+ */
+ZipFileWorker.prototype.closedSource = function (streamInfo) {
+    this.accumulate = false;
+    var streamedContent = this.streamFiles && !streamInfo['file'].dir;
+    var record = generateZipParts(streamInfo, streamedContent, true, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
+
+    this.dirRecords.push(record.dirRecord);
+    if(streamedContent) {
+        // after the streamed file, we put data descriptors
+        this.push({
+            data : generateDataDescriptors(streamInfo),
+            meta : {percent:100}
+        });
+    } else {
+        // the content wasn't streamed, we need to push everything now
+        // first the file record, then the content
+        this.push({
+            data : record.fileRecord,
+            meta : {percent:0}
+        });
+        while(this.contentBuffer.length) {
+            this.push(this.contentBuffer.shift());
+        }
+    }
+    this.currentFile = null;
+};
+
+/**
+ * @see GenericWorker.flush
+ */
+ZipFileWorker.prototype.flush = function () {
+
+    var localDirLength = this.bytesWritten;
+    for(var i = 0; i < this.dirRecords.length; i++) {
+        this.push({
+            data : this.dirRecords[i],
+            meta : {percent:100}
+        });
+    }
+    var centralDirLength = this.bytesWritten - localDirLength;
+
+    var dirEnd = generateCentralDirectoryEnd(this.dirRecords.length, centralDirLength, localDirLength, this.zipComment, this.encodeFileName);
+
+    this.push({
+        data : dirEnd,
+        meta : {percent:100}
+    });
+};
+
+/**
+ * Prepare the next source to be read.
+ */
+ZipFileWorker.prototype.prepareNextSource = function () {
+    this.previous = this._sources.shift();
+    this.openedSource(this.previous.streamInfo);
+    if (this.isPaused) {
+        this.previous.pause();
+    } else {
+        this.previous.resume();
+    }
+};
+
+/**
+ * @see GenericWorker.registerPrevious
+ */
+ZipFileWorker.prototype.registerPrevious = function (previous) {
+    this._sources.push(previous);
+    var self = this;
+
+    previous.on('data', function (chunk) {
+        self.processChunk(chunk);
+    });
+    previous.on('end', function () {
+        self.closedSource(self.previous.streamInfo);
+        if(self._sources.length) {
+            self.prepareNextSource();
+        } else {
+            self.end();
+        }
+    });
+    previous.on('error', function (e) {
+        self.error(e);
+    });
+    return this;
+};
+
+/**
+ * @see GenericWorker.resume
+ */
+ZipFileWorker.prototype.resume = function () {
+    if(!GenericWorker.prototype.resume.call(this)) {
+        return false;
+    }
+
+    if (!this.previous && this._sources.length) {
+        this.prepareNextSource();
+        return true;
+    }
+    if (!this.previous && !this._sources.length && !this.generatedError) {
+        this.end();
+        return true;
+    }
+};
+
+/**
+ * @see GenericWorker.error
+ */
+ZipFileWorker.prototype.error = function (e) {
+    var sources = this._sources;
+    if(!GenericWorker.prototype.error.call(this, e)) {
+        return false;
+    }
+    for(var i = 0; i < sources.length; i++) {
+        try {
+            sources[i].error(e);
+        } catch(e) {
+            // the `error` exploded, nothing to do
+        }
+    }
+    return true;
+};
+
+/**
+ * @see GenericWorker.lock
+ */
+ZipFileWorker.prototype.lock = function () {
+    GenericWorker.prototype.lock.call(this);
+    var sources = this._sources;
+    for(var i = 0; i < sources.length; i++) {
+        sources[i].lock();
+    }
+};
+
+module.exports = ZipFileWorker;
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/generate/index.js":
+/*!**************************************************!*\
+  !*** ./node_modules/jszip/lib/generate/index.js ***!
+  \**************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var compressions = __webpack_require__(/*! ../compressions */ "./node_modules/jszip/lib/compressions.js");
+var ZipFileWorker = __webpack_require__(/*! ./ZipFileWorker */ "./node_modules/jszip/lib/generate/ZipFileWorker.js");
+
+/**
+ * Find the compression to use.
+ * @param {String} fileCompression the compression defined at the file level, if any.
+ * @param {String} zipCompression the compression defined at the load() level.
+ * @return {Object} the compression object to use.
+ */
+var getCompression = function (fileCompression, zipCompression) {
+
+    var compressionName = fileCompression || zipCompression;
+    var compression = compressions[compressionName];
+    if (!compression) {
+        throw new Error(compressionName + " is not a valid compression method !");
+    }
+    return compression;
+};
+
+/**
+ * Create a worker to generate a zip file.
+ * @param {JSZip} zip the JSZip instance at the right root level.
+ * @param {Object} options to generate the zip file.
+ * @param {String} comment the comment to use.
+ */
+exports.generateWorker = function (zip, options, comment) {
+
+    var zipFileWorker = new ZipFileWorker(options.streamFiles, comment, options.platform, options.encodeFileName);
+    var entriesCount = 0;
+    try {
+
+        zip.forEach(function (relativePath, file) {
+            entriesCount++;
+            var compression = getCompression(file.options.compression, options.compression);
+            var compressionOptions = file.options.compressionOptions || options.compressionOptions || {};
+            var dir = file.dir, date = file.date;
+
+            file._compressWorker(compression, compressionOptions)
+            .withStreamInfo("file", {
+                name : relativePath,
+                dir : dir,
+                date : date,
+                comment : file.comment || "",
+                unixPermissions : file.unixPermissions,
+                dosPermissions : file.dosPermissions
+            })
+            .pipe(zipFileWorker);
+        });
+        zipFileWorker.entriesCount = entriesCount;
+    } catch (e) {
+        zipFileWorker.error(e);
+    }
+
+    return zipFileWorker;
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/index.js":
+/*!*****************************************!*\
+  !*** ./node_modules/jszip/lib/index.js ***!
+  \*****************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+/**
+ * Representation a of zip file in js
+ * @constructor
+ */
+function JSZip() {
+    // if this constructor is used without `new`, it adds `new` before itself:
+    if(!(this instanceof JSZip)) {
+        return new JSZip();
+    }
+
+    if(arguments.length) {
+        throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");
+    }
+
+    // object containing the files :
+    // {
+    //   "folder/" : {...},
+    //   "folder/data.txt" : {...}
+    // }
+    this.files = {};
+
+    this.comment = null;
+
+    // Where we are in the hierarchy
+    this.root = "";
+    this.clone = function() {
+        var newObj = new JSZip();
+        for (var i in this) {
+            if (typeof this[i] !== "function") {
+                newObj[i] = this[i];
+            }
+        }
+        return newObj;
+    };
+}
+JSZip.prototype = __webpack_require__(/*! ./object */ "./node_modules/jszip/lib/object.js");
+JSZip.prototype.loadAsync = __webpack_require__(/*! ./load */ "./node_modules/jszip/lib/load.js");
+JSZip.support = __webpack_require__(/*! ./support */ "./node_modules/jszip/lib/support.js");
+JSZip.defaults = __webpack_require__(/*! ./defaults */ "./node_modules/jszip/lib/defaults.js");
+
+// TODO find a better way to handle this version,
+// a require('package.json').version doesn't work with webpack, see #327
+JSZip.version = "3.1.5";
+
+JSZip.loadAsync = function (content, options) {
+    return new JSZip().loadAsync(content, options);
+};
+
+JSZip.external = __webpack_require__(/*! ./external */ "./node_modules/jszip/lib/external.js");
+module.exports = JSZip;
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/load.js":
+/*!****************************************!*\
+  !*** ./node_modules/jszip/lib/load.js ***!
+  \****************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var utils = __webpack_require__(/*! ./utils */ "./node_modules/jszip/lib/utils.js");
+var external = __webpack_require__(/*! ./external */ "./node_modules/jszip/lib/external.js");
+var utf8 = __webpack_require__(/*! ./utf8 */ "./node_modules/jszip/lib/utf8.js");
+var utils = __webpack_require__(/*! ./utils */ "./node_modules/jszip/lib/utils.js");
+var ZipEntries = __webpack_require__(/*! ./zipEntries */ "./node_modules/jszip/lib/zipEntries.js");
+var Crc32Probe = __webpack_require__(/*! ./stream/Crc32Probe */ "./node_modules/jszip/lib/stream/Crc32Probe.js");
+var nodejsUtils = __webpack_require__(/*! ./nodejsUtils */ "./node_modules/jszip/lib/nodejsUtils.js");
+
+/**
+ * Check the CRC32 of an entry.
+ * @param {ZipEntry} zipEntry the zip entry to check.
+ * @return {Promise} the result.
+ */
+function checkEntryCRC32(zipEntry) {
+    return new external.Promise(function (resolve, reject) {
+        var worker = zipEntry.decompressed.getContentWorker().pipe(new Crc32Probe());
+        worker.on("error", function (e) {
+            reject(e);
+        })
+        .on("end", function () {
+            if (worker.streamInfo.crc32 !== zipEntry.decompressed.crc32) {
+                reject(new Error("Corrupted zip : CRC32 mismatch"));
+            } else {
+                resolve();
+            }
+        })
+        .resume();
+    });
+}
+
+module.exports = function(data, options) {
+    var zip = this;
+    options = utils.extend(options || {}, {
+        base64: false,
+        checkCRC32: false,
+        optimizedBinaryString: false,
+        createFolders: false,
+        decodeFileName: utf8.utf8decode
+    });
+
+    if (nodejsUtils.isNode && nodejsUtils.isStream(data)) {
+        return external.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file."));
+    }
+
+    return utils.prepareContent("the loaded zip file", data, true, options.optimizedBinaryString, options.base64)
+    .then(function(data) {
+        var zipEntries = new ZipEntries(options);
+        zipEntries.load(data);
+        return zipEntries;
+    }).then(function checkCRC32(zipEntries) {
+        var promises = [external.Promise.resolve(zipEntries)];
+        var files = zipEntries.files;
+        if (options.checkCRC32) {
+            for (var i = 0; i < files.length; i++) {
+                promises.push(checkEntryCRC32(files[i]));
+            }
+        }
+        return external.Promise.all(promises);
+    }).then(function addFiles(results) {
+        var zipEntries = results.shift();
+        var files = zipEntries.files;
+        for (var i = 0; i < files.length; i++) {
+            var input = files[i];
+            zip.file(input.fileNameStr, input.decompressed, {
+                binary: true,
+                optimizedBinaryString: true,
+                date: input.date,
+                dir: input.dir,
+                comment : input.fileCommentStr.length ? input.fileCommentStr : null,
+                unixPermissions : input.unixPermissions,
+                dosPermissions : input.dosPermissions,
+                createFolders: options.createFolders
+            });
+        }
+        if (zipEntries.zipComment.length) {
+            zip.comment = zipEntries.zipComment;
+        }
+
+        return zip;
+    });
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/nodejs/NodejsStreamInputAdapter.js":
+/*!*******************************************************************!*\
+  !*** ./node_modules/jszip/lib/nodejs/NodejsStreamInputAdapter.js ***!
+  \*******************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var utils = __webpack_require__(/*! ../utils */ "./node_modules/jszip/lib/utils.js");
+var GenericWorker = __webpack_require__(/*! ../stream/GenericWorker */ "./node_modules/jszip/lib/stream/GenericWorker.js");
+
+/**
+ * A worker that use a nodejs stream as source.
+ * @constructor
+ * @param {String} filename the name of the file entry for this stream.
+ * @param {Readable} stream the nodejs stream.
+ */
+function NodejsStreamInputAdapter(filename, stream) {
+    GenericWorker.call(this, "Nodejs stream input adapter for " + filename);
+    this._upstreamEnded = false;
+    this._bindStream(stream);
+}
+
+utils.inherits(NodejsStreamInputAdapter, GenericWorker);
+
+/**
+ * Prepare the stream and bind the callbacks on it.
+ * Do this ASAP on node 0.10 ! A lazy binding doesn't always work.
+ * @param {Stream} stream the nodejs stream to use.
+ */
+NodejsStreamInputAdapter.prototype._bindStream = function (stream) {
+    var self = this;
+    this._stream = stream;
+    stream.pause();
+    stream
+    .on("data", function (chunk) {
+        self.push({
+            data: chunk,
+            meta : {
+                percent : 0
+            }
+        });
+    })
+    .on("error", function (e) {
+        if(self.isPaused) {
+            this.generatedError = e;
+        } else {
+            self.error(e);
+        }
+    })
+    .on("end", function () {
+        if(self.isPaused) {
+            self._upstreamEnded = true;
+        } else {
+            self.end();
+        }
+    });
+};
+NodejsStreamInputAdapter.prototype.pause = function () {
+    if(!GenericWorker.prototype.pause.call(this)) {
+        return false;
+    }
+    this._stream.pause();
+    return true;
+};
+NodejsStreamInputAdapter.prototype.resume = function () {
+    if(!GenericWorker.prototype.resume.call(this)) {
+        return false;
+    }
+
+    if(this._upstreamEnded) {
+        this.end();
+    } else {
+        this._stream.resume();
+    }
+
+    return true;
+};
+
+module.exports = NodejsStreamInputAdapter;
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/nodejs/NodejsStreamOutputAdapter.js":
+/*!********************************************************************!*\
+  !*** ./node_modules/jszip/lib/nodejs/NodejsStreamOutputAdapter.js ***!
+  \********************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var Readable = __webpack_require__(/*! readable-stream */ "./node_modules/jszip/lib/readable-stream-browser.js").Readable;
+
+var utils = __webpack_require__(/*! ../utils */ "./node_modules/jszip/lib/utils.js");
+utils.inherits(NodejsStreamOutputAdapter, Readable);
+
+/**
+* A nodejs stream using a worker as source.
+* @see the SourceWrapper in http://nodejs.org/api/stream.html
+* @constructor
+* @param {StreamHelper} helper the helper wrapping the worker
+* @param {Object} options the nodejs stream options
+* @param {Function} updateCb the update callback.
+*/
+function NodejsStreamOutputAdapter(helper, options, updateCb) {
+    Readable.call(this, options);
+    this._helper = helper;
+
+    var self = this;
+    helper.on("data", function (data, meta) {
+        if (!self.push(data)) {
+            self._helper.pause();
+        }
+        if(updateCb) {
+            updateCb(meta);
+        }
+    })
+    .on("error", function(e) {
+        self.emit('error', e);
+    })
+    .on("end", function () {
+        self.push(null);
+    });
+}
+
+
+NodejsStreamOutputAdapter.prototype._read = function() {
+    this._helper.resume();
+};
+
+module.exports = NodejsStreamOutputAdapter;
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/nodejsUtils.js":
+/*!***********************************************!*\
+  !*** ./node_modules/jszip/lib/nodejsUtils.js ***!
+  \***********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(Buffer) {
+
+module.exports = {
+    /**
+     * True if this is running in Nodejs, will be undefined in a browser.
+     * In a browser, browserify won't include this file and the whole module
+     * will be resolved an empty object.
+     */
+    isNode : typeof Buffer !== "undefined",
+    /**
+     * Create a new nodejs Buffer from an existing content.
+     * @param {Object} data the data to pass to the constructor.
+     * @param {String} encoding the encoding to use.
+     * @return {Buffer} a new Buffer.
+     */
+    newBufferFrom: function(data, encoding) {
+        // XXX We can't use `Buffer.from` which comes from `Uint8Array.from`
+        // in nodejs v4 (< v.4.5). It's not the expected implementation (and
+        // has a different signature).
+        // see https://github.com/nodejs/node/issues/8053
+        // A condition on nodejs' version won't solve the issue as we don't
+        // control the Buffer polyfills that may or may not be used.
+        return new Buffer(data, encoding);
+    },
+    /**
+     * Create a new nodejs Buffer with the specified size.
+     * @param {Integer} size the size of the buffer.
+     * @return {Buffer} a new Buffer.
+     */
+    allocBuffer: function (size) {
+        if (Buffer.alloc) {
+            return Buffer.alloc(size);
+        } else {
+            return new Buffer(size);
+        }
+    },
+    /**
+     * Find out if an object is a Buffer.
+     * @param {Object} b the object to test.
+     * @return {Boolean} true if the object is a Buffer, false otherwise.
+     */
+    isBuffer : function(b){
+        return Buffer.isBuffer(b);
+    },
+
+    isStream : function (obj) {
+        return obj &&
+            typeof obj.on === "function" &&
+            typeof obj.pause === "function" &&
+            typeof obj.resume === "function";
+    }
+};
+
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/node_modules/buffer/index.js */ "./node_modules/webpack/node_modules/buffer/index.js").Buffer))
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/object.js":
+/*!******************************************!*\
+  !*** ./node_modules/jszip/lib/object.js ***!
+  \******************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var utf8 = __webpack_require__(/*! ./utf8 */ "./node_modules/jszip/lib/utf8.js");
+var utils = __webpack_require__(/*! ./utils */ "./node_modules/jszip/lib/utils.js");
+var GenericWorker = __webpack_require__(/*! ./stream/GenericWorker */ "./node_modules/jszip/lib/stream/GenericWorker.js");
+var StreamHelper = __webpack_require__(/*! ./stream/StreamHelper */ "./node_modules/jszip/lib/stream/StreamHelper.js");
+var defaults = __webpack_require__(/*! ./defaults */ "./node_modules/jszip/lib/defaults.js");
+var CompressedObject = __webpack_require__(/*! ./compressedObject */ "./node_modules/jszip/lib/compressedObject.js");
+var ZipObject = __webpack_require__(/*! ./zipObject */ "./node_modules/jszip/lib/zipObject.js");
+var generate = __webpack_require__(/*! ./generate */ "./node_modules/jszip/lib/generate/index.js");
+var nodejsUtils = __webpack_require__(/*! ./nodejsUtils */ "./node_modules/jszip/lib/nodejsUtils.js");
+var NodejsStreamInputAdapter = __webpack_require__(/*! ./nodejs/NodejsStreamInputAdapter */ "./node_modules/jszip/lib/nodejs/NodejsStreamInputAdapter.js");
+
+
+/**
+ * Add a file in the current folder.
+ * @private
+ * @param {string} name the name of the file
+ * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data of the file
+ * @param {Object} originalOptions the options of the file
+ * @return {Object} the new file.
+ */
+var fileAdd = function(name, data, originalOptions) {
+    // be sure sub folders exist
+    var dataType = utils.getTypeOf(data),
+        parent;
+
+
+    /*
+     * Correct options.
+     */
+
+    var o = utils.extend(originalOptions || {}, defaults);
+    o.date = o.date || new Date();
+    if (o.compression !== null) {
+        o.compression = o.compression.toUpperCase();
+    }
+
+    if (typeof o.unixPermissions === "string") {
+        o.unixPermissions = parseInt(o.unixPermissions, 8);
+    }
+
+    // UNX_IFDIR  0040000 see zipinfo.c
+    if (o.unixPermissions && (o.unixPermissions & 0x4000)) {
+        o.dir = true;
+    }
+    // Bit 4    Directory
+    if (o.dosPermissions && (o.dosPermissions & 0x0010)) {
+        o.dir = true;
+    }
+
+    if (o.dir) {
+        name = forceTrailingSlash(name);
+    }
+    if (o.createFolders && (parent = parentFolder(name))) {
+        folderAdd.call(this, parent, true);
+    }
+
+    var isUnicodeString = dataType === "string" && o.binary === false && o.base64 === false;
+    if (!originalOptions || typeof originalOptions.binary === "undefined") {
+        o.binary = !isUnicodeString;
+    }
+
+
+    var isCompressedEmpty = (data instanceof CompressedObject) && data.uncompressedSize === 0;
+
+    if (isCompressedEmpty || o.dir || !data || data.length === 0) {
+        o.base64 = false;
+        o.binary = true;
+        data = "";
+        o.compression = "STORE";
+        dataType = "string";
+    }
+
+    /*
+     * Convert content to fit.
+     */
+
+    var zipObjectContent = null;
+    if (data instanceof CompressedObject || data instanceof GenericWorker) {
+        zipObjectContent = data;
+    } else if (nodejsUtils.isNode && nodejsUtils.isStream(data)) {
+        zipObjectContent = new NodejsStreamInputAdapter(name, data);
+    } else {
+        zipObjectContent = utils.prepareContent(name, data, o.binary, o.optimizedBinaryString, o.base64);
+    }
+
+    var object = new ZipObject(name, zipObjectContent, o);
+    this.files[name] = object;
+    /*
+    TODO: we can't throw an exception because we have async promises
+    (we can have a promise of a Date() for example) but returning a
+    promise is useless because file(name, data) returns the JSZip
+    object for chaining. Should we break that to allow the user
+    to catch the error ?
+
+    return external.Promise.resolve(zipObjectContent)
+    .then(function () {
+        return object;
+    });
+    */
+};
+
+/**
+ * Find the parent folder of the path.
+ * @private
+ * @param {string} path the path to use
+ * @return {string} the parent folder, or ""
+ */
+var parentFolder = function (path) {
+    if (path.slice(-1) === '/') {
+        path = path.substring(0, path.length - 1);
+    }
+    var lastSlash = path.lastIndexOf('/');
+    return (lastSlash > 0) ? path.substring(0, lastSlash) : "";
+};
+
+/**
+ * Returns the path with a slash at the end.
+ * @private
+ * @param {String} path the path to check.
+ * @return {String} the path with a trailing slash.
+ */
+var forceTrailingSlash = function(path) {
+    // Check the name ends with a /
+    if (path.slice(-1) !== "/") {
+        path += "/"; // IE doesn't like substr(-1)
+    }
+    return path;
+};
+
+/**
+ * Add a (sub) folder in the current folder.
+ * @private
+ * @param {string} name the folder's name
+ * @param {boolean=} [createFolders] If true, automatically create sub
+ *  folders. Defaults to false.
+ * @return {Object} the new folder.
+ */
+var folderAdd = function(name, createFolders) {
+    createFolders = (typeof createFolders !== 'undefined') ? createFolders : defaults.createFolders;
+
+    name = forceTrailingSlash(name);
+
+    // Does this folder already exist?
+    if (!this.files[name]) {
+        fileAdd.call(this, name, null, {
+            dir: true,
+            createFolders: createFolders
+        });
+    }
+    return this.files[name];
+};
+
+/**
+* Cross-window, cross-Node-context regular expression detection
+* @param  {Object}  object Anything
+* @return {Boolean}        true if the object is a regular expression,
+* false otherwise
+*/
+function isRegExp(object) {
+    return Object.prototype.toString.call(object) === "[object RegExp]";
+}
+
+// return the actual prototype of JSZip
+var out = {
+    /**
+     * @see loadAsync
+     */
+    load: function() {
+        throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
+    },
+
+
+    /**
+     * Call a callback function for each entry at this folder level.
+     * @param {Function} cb the callback function:
+     * function (relativePath, file) {...}
+     * It takes 2 arguments : the relative path and the file.
+     */
+    forEach: function(cb) {
+        var filename, relativePath, file;
+        for (filename in this.files) {
+            if (!this.files.hasOwnProperty(filename)) {
+                continue;
+            }
+            file = this.files[filename];
+            relativePath = filename.slice(this.root.length, filename.length);
+            if (relativePath && filename.slice(0, this.root.length) === this.root) { // the file is in the current root
+                cb(relativePath, file); // TODO reverse the parameters ? need to be clean AND consistent with the filter search fn...
+            }
+        }
+    },
+
+    /**
+     * Filter nested files/folders with the specified function.
+     * @param {Function} search the predicate to use :
+     * function (relativePath, file) {...}
+     * It takes 2 arguments : the relative path and the file.
+     * @return {Array} An array of matching elements.
+     */
+    filter: function(search) {
+        var result = [];
+        this.forEach(function (relativePath, entry) {
+            if (search(relativePath, entry)) { // the file matches the function
+                result.push(entry);
+            }
+
+        });
+        return result;
+    },
+
+    /**
+     * Add a file to the zip file, or search a file.
+     * @param   {string|RegExp} name The name of the file to add (if data is defined),
+     * the name of the file to find (if no data) or a regex to match files.
+     * @param   {String|ArrayBuffer|Uint8Array|Buffer} data  The file data, either raw or base64 encoded
+     * @param   {Object} o     File options
+     * @return  {JSZip|Object|Array} this JSZip object (when adding a file),
+     * a file (when searching by string) or an array of files (when searching by regex).
+     */
+    file: function(name, data, o) {
+        if (arguments.length === 1) {
+            if (isRegExp(name)) {
+                var regexp = name;
+                return this.filter(function(relativePath, file) {
+                    return !file.dir && regexp.test(relativePath);
+                });
+            }
+            else { // text
+                var obj = this.files[this.root + name];
+                if (obj && !obj.dir) {
+                    return obj;
+                } else {
+                    return null;
+                }
+            }
+        }
+        else { // more than one argument : we have data !
+            name = this.root + name;
+            fileAdd.call(this, name, data, o);
+        }
+        return this;
+    },
+
+    /**
+     * Add a directory to the zip file, or search.
+     * @param   {String|RegExp} arg The name of the directory to add, or a regex to search folders.
+     * @return  {JSZip} an object with the new directory as the root, or an array containing matching folders.
+     */
+    folder: function(arg) {
+        if (!arg) {
+            return this;
+        }
+
+        if (isRegExp(arg)) {
+            return this.filter(function(relativePath, file) {
+                return file.dir && arg.test(relativePath);
+            });
+        }
+
+        // else, name is a new folder
+        var name = this.root + arg;
+        var newFolder = folderAdd.call(this, name);
+
+        // Allow chaining by returning a new object with this folder as the root
+        var ret = this.clone();
+        ret.root = newFolder.name;
+        return ret;
+    },
+
+    /**
+     * Delete a file, or a directory and all sub-files, from the zip
+     * @param {string} name the name of the file to delete
+     * @return {JSZip} this JSZip object
+     */
+    remove: function(name) {
+        name = this.root + name;
+        var file = this.files[name];
+        if (!file) {
+            // Look for any folders
+            if (name.slice(-1) !== "/") {
+                name += "/";
+            }
+            file = this.files[name];
+        }
+
+        if (file && !file.dir) {
+            // file
+            delete this.files[name];
+        } else {
+            // maybe a folder, delete recursively
+            var kids = this.filter(function(relativePath, file) {
+                return file.name.slice(0, name.length) === name;
+            });
+            for (var i = 0; i < kids.length; i++) {
+                delete this.files[kids[i].name];
+            }
+        }
+
+        return this;
+    },
+
+    /**
+     * Generate the complete zip file
+     * @param {Object} options the options to generate the zip file :
+     * - compression, "STORE" by default.
+     * - type, "base64" by default. Values are : string, base64, uint8array, arraybuffer, blob.
+     * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the zip file
+     */
+    generate: function(options) {
+        throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
+    },
+
+    /**
+     * Generate the complete zip file as an internal stream.
+     * @param {Object} options the options to generate the zip file :
+     * - compression, "STORE" by default.
+     * - type, "base64" by default. Values are : string, base64, uint8array, arraybuffer, blob.
+     * @return {StreamHelper} the streamed zip file.
+     */
+    generateInternalStream: function(options) {
+      var worker, opts = {};
+      try {
+          opts = utils.extend(options || {}, {
+              streamFiles: false,
+              compression: "STORE",
+              compressionOptions : null,
+              type: "",
+              platform: "DOS",
+              comment: null,
+              mimeType: 'application/zip',
+              encodeFileName: utf8.utf8encode
+          });
+
+          opts.type = opts.type.toLowerCase();
+          opts.compression = opts.compression.toUpperCase();
+
+          // "binarystring" is prefered but the internals use "string".
+          if(opts.type === "binarystring") {
+            opts.type = "string";
+          }
+
+          if (!opts.type) {
+            throw new Error("No output type specified.");
+          }
+
+          utils.checkSupport(opts.type);
+
+          // accept nodejs `process.platform`
+          if(
+              opts.platform === 'darwin' ||
+              opts.platform === 'freebsd' ||
+              opts.platform === 'linux' ||
+              opts.platform === 'sunos'
+          ) {
+              opts.platform = "UNIX";
+          }
+          if (opts.platform === 'win32') {
+              opts.platform = "DOS";
+          }
+
+          var comment = opts.comment || this.comment || "";
+          worker = generate.generateWorker(this, opts, comment);
+      } catch (e) {
+        worker = new GenericWorker("error");
+        worker.error(e);
+      }
+      return new StreamHelper(worker, opts.type || "string", opts.mimeType);
+    },
+    /**
+     * Generate the complete zip file asynchronously.
+     * @see generateInternalStream
+     */
+    generateAsync: function(options, onUpdate) {
+        return this.generateInternalStream(options).accumulate(onUpdate);
+    },
+    /**
+     * Generate the complete zip file asynchronously.
+     * @see generateInternalStream
+     */
+    generateNodeStream: function(options, onUpdate) {
+        options = options || {};
+        if (!options.type) {
+            options.type = "nodebuffer";
+        }
+        return this.generateInternalStream(options).toNodejsStream(onUpdate);
+    }
+};
+module.exports = out;
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/readable-stream-browser.js":
+/*!***********************************************************!*\
+  !*** ./node_modules/jszip/lib/readable-stream-browser.js ***!
+  \***********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+/*
+ * This file is used by module bundlers (browserify/webpack/etc) when
+ * including a stream implementation. We use "readable-stream" to get a
+ * consistent behavior between nodejs versions but bundlers often have a shim
+ * for "stream". Using this shim greatly improve the compatibility and greatly
+ * reduce the final size of the bundle (only one stream implementation, not
+ * two).
+ */
+module.exports = __webpack_require__(/*! stream */ "./node_modules/webpack/node_modules/stream-browserify/index.js");
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/reader/ArrayReader.js":
+/*!******************************************************!*\
+  !*** ./node_modules/jszip/lib/reader/ArrayReader.js ***!
+  \******************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var DataReader = __webpack_require__(/*! ./DataReader */ "./node_modules/jszip/lib/reader/DataReader.js");
+var utils = __webpack_require__(/*! ../utils */ "./node_modules/jszip/lib/utils.js");
+
+function ArrayReader(data) {
+    DataReader.call(this, data);
+	for(var i = 0; i < this.data.length; i++) {
+		data[i] = data[i] & 0xFF;
+	}
+}
+utils.inherits(ArrayReader, DataReader);
+/**
+ * @see DataReader.byteAt
+ */
+ArrayReader.prototype.byteAt = function(i) {
+    return this.data[this.zero + i];
+};
+/**
+ * @see DataReader.lastIndexOfSignature
+ */
+ArrayReader.prototype.lastIndexOfSignature = function(sig) {
+    var sig0 = sig.charCodeAt(0),
+        sig1 = sig.charCodeAt(1),
+        sig2 = sig.charCodeAt(2),
+        sig3 = sig.charCodeAt(3);
+    for (var i = this.length - 4; i >= 0; --i) {
+        if (this.data[i] === sig0 && this.data[i + 1] === sig1 && this.data[i + 2] === sig2 && this.data[i + 3] === sig3) {
+            return i - this.zero;
+        }
+    }
+
+    return -1;
+};
+/**
+ * @see DataReader.readAndCheckSignature
+ */
+ArrayReader.prototype.readAndCheckSignature = function (sig) {
+    var sig0 = sig.charCodeAt(0),
+        sig1 = sig.charCodeAt(1),
+        sig2 = sig.charCodeAt(2),
+        sig3 = sig.charCodeAt(3),
+        data = this.readData(4);
+    return sig0 === data[0] && sig1 === data[1] && sig2 === data[2] && sig3 === data[3];
+};
+/**
+ * @see DataReader.readData
+ */
+ArrayReader.prototype.readData = function(size) {
+    this.checkOffset(size);
+    if(size === 0) {
+        return [];
+    }
+    var result = this.data.slice(this.zero + this.index, this.zero + this.index + size);
+    this.index += size;
+    return result;
+};
+module.exports = ArrayReader;
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/reader/DataReader.js":
+/*!*****************************************************!*\
+  !*** ./node_modules/jszip/lib/reader/DataReader.js ***!
+  \*****************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var utils = __webpack_require__(/*! ../utils */ "./node_modules/jszip/lib/utils.js");
+
+function DataReader(data) {
+    this.data = data; // type : see implementation
+    this.length = data.length;
+    this.index = 0;
+    this.zero = 0;
+}
+DataReader.prototype = {
+    /**
+     * Check that the offset will not go too far.
+     * @param {string} offset the additional offset to check.
+     * @throws {Error} an Error if the offset is out of bounds.
+     */
+    checkOffset: function(offset) {
+        this.checkIndex(this.index + offset);
+    },
+    /**
+     * Check that the specified index will not be too far.
+     * @param {string} newIndex the index to check.
+     * @throws {Error} an Error if the index is out of bounds.
+     */
+    checkIndex: function(newIndex) {
+        if (this.length < this.zero + newIndex || newIndex < 0) {
+            throw new Error("End of data reached (data length = " + this.length + ", asked index = " + (newIndex) + "). Corrupted zip ?");
+        }
+    },
+    /**
+     * Change the index.
+     * @param {number} newIndex The new index.
+     * @throws {Error} if the new index is out of the data.
+     */
+    setIndex: function(newIndex) {
+        this.checkIndex(newIndex);
+        this.index = newIndex;
+    },
+    /**
+     * Skip the next n bytes.
+     * @param {number} n the number of bytes to skip.
+     * @throws {Error} if the new index is out of the data.
+     */
+    skip: function(n) {
+        this.setIndex(this.index + n);
+    },
+    /**
+     * Get the byte at the specified index.
+     * @param {number} i the index to use.
+     * @return {number} a byte.
+     */
+    byteAt: function(i) {
+        // see implementations
+    },
+    /**
+     * Get the next number with a given byte size.
+     * @param {number} size the number of bytes to read.
+     * @return {number} the corresponding number.
+     */
+    readInt: function(size) {
+        var result = 0,
+            i;
+        this.checkOffset(size);
+        for (i = this.index + size - 1; i >= this.index; i--) {
+            result = (result << 8) + this.byteAt(i);
+        }
+        this.index += size;
+        return result;
+    },
+    /**
+     * Get the next string with a given byte size.
+     * @param {number} size the number of bytes to read.
+     * @return {string} the corresponding string.
+     */
+    readString: function(size) {
+        return utils.transformTo("string", this.readData(size));
+    },
+    /**
+     * Get raw data without conversion, <size> bytes.
+     * @param {number} size the number of bytes to read.
+     * @return {Object} the raw data, implementation specific.
+     */
+    readData: function(size) {
+        // see implementations
+    },
+    /**
+     * Find the last occurence of a zip signature (4 bytes).
+     * @param {string} sig the signature to find.
+     * @return {number} the index of the last occurence, -1 if not found.
+     */
+    lastIndexOfSignature: function(sig) {
+        // see implementations
+    },
+    /**
+     * Read the signature (4 bytes) at the current position and compare it with sig.
+     * @param {string} sig the expected signature
+     * @return {boolean} true if the signature matches, false otherwise.
+     */
+    readAndCheckSignature: function(sig) {
+        // see implementations
+    },
+    /**
+     * Get the next date.
+     * @return {Date} the date.
+     */
+    readDate: function() {
+        var dostime = this.readInt(4);
+        return new Date(Date.UTC(
+        ((dostime >> 25) & 0x7f) + 1980, // year
+        ((dostime >> 21) & 0x0f) - 1, // month
+        (dostime >> 16) & 0x1f, // day
+        (dostime >> 11) & 0x1f, // hour
+        (dostime >> 5) & 0x3f, // minute
+        (dostime & 0x1f) << 1)); // second
+    }
+};
+module.exports = DataReader;
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/reader/NodeBufferReader.js":
+/*!***********************************************************!*\
+  !*** ./node_modules/jszip/lib/reader/NodeBufferReader.js ***!
+  \***********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var Uint8ArrayReader = __webpack_require__(/*! ./Uint8ArrayReader */ "./node_modules/jszip/lib/reader/Uint8ArrayReader.js");
+var utils = __webpack_require__(/*! ../utils */ "./node_modules/jszip/lib/utils.js");
+
+function NodeBufferReader(data) {
+    Uint8ArrayReader.call(this, data);
+}
+utils.inherits(NodeBufferReader, Uint8ArrayReader);
+
+/**
+ * @see DataReader.readData
+ */
+NodeBufferReader.prototype.readData = function(size) {
+    this.checkOffset(size);
+    var result = this.data.slice(this.zero + this.index, this.zero + this.index + size);
+    this.index += size;
+    return result;
+};
+module.exports = NodeBufferReader;
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/reader/StringReader.js":
+/*!*******************************************************!*\
+  !*** ./node_modules/jszip/lib/reader/StringReader.js ***!
+  \*******************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var DataReader = __webpack_require__(/*! ./DataReader */ "./node_modules/jszip/lib/reader/DataReader.js");
+var utils = __webpack_require__(/*! ../utils */ "./node_modules/jszip/lib/utils.js");
+
+function StringReader(data) {
+    DataReader.call(this, data);
+}
+utils.inherits(StringReader, DataReader);
+/**
+ * @see DataReader.byteAt
+ */
+StringReader.prototype.byteAt = function(i) {
+    return this.data.charCodeAt(this.zero + i);
+};
+/**
+ * @see DataReader.lastIndexOfSignature
+ */
+StringReader.prototype.lastIndexOfSignature = function(sig) {
+    return this.data.lastIndexOf(sig) - this.zero;
+};
+/**
+ * @see DataReader.readAndCheckSignature
+ */
+StringReader.prototype.readAndCheckSignature = function (sig) {
+    var data = this.readData(4);
+    return sig === data;
+};
+/**
+ * @see DataReader.readData
+ */
+StringReader.prototype.readData = function(size) {
+    this.checkOffset(size);
+    // this will work because the constructor applied the "& 0xff" mask.
+    var result = this.data.slice(this.zero + this.index, this.zero + this.index + size);
+    this.index += size;
+    return result;
+};
+module.exports = StringReader;
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/reader/Uint8ArrayReader.js":
+/*!***********************************************************!*\
+  !*** ./node_modules/jszip/lib/reader/Uint8ArrayReader.js ***!
+  \***********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var ArrayReader = __webpack_require__(/*! ./ArrayReader */ "./node_modules/jszip/lib/reader/ArrayReader.js");
+var utils = __webpack_require__(/*! ../utils */ "./node_modules/jszip/lib/utils.js");
+
+function Uint8ArrayReader(data) {
+    ArrayReader.call(this, data);
+}
+utils.inherits(Uint8ArrayReader, ArrayReader);
+/**
+ * @see DataReader.readData
+ */
+Uint8ArrayReader.prototype.readData = function(size) {
+    this.checkOffset(size);
+    if(size === 0) {
+        // in IE10, when using subarray(idx, idx), we get the array [0x00] instead of [].
+        return new Uint8Array(0);
+    }
+    var result = this.data.subarray(this.zero + this.index, this.zero + this.index + size);
+    this.index += size;
+    return result;
+};
+module.exports = Uint8ArrayReader;
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/reader/readerFor.js":
+/*!****************************************************!*\
+  !*** ./node_modules/jszip/lib/reader/readerFor.js ***!
+  \****************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var utils = __webpack_require__(/*! ../utils */ "./node_modules/jszip/lib/utils.js");
+var support = __webpack_require__(/*! ../support */ "./node_modules/jszip/lib/support.js");
+var ArrayReader = __webpack_require__(/*! ./ArrayReader */ "./node_modules/jszip/lib/reader/ArrayReader.js");
+var StringReader = __webpack_require__(/*! ./StringReader */ "./node_modules/jszip/lib/reader/StringReader.js");
+var NodeBufferReader = __webpack_require__(/*! ./NodeBufferReader */ "./node_modules/jszip/lib/reader/NodeBufferReader.js");
+var Uint8ArrayReader = __webpack_require__(/*! ./Uint8ArrayReader */ "./node_modules/jszip/lib/reader/Uint8ArrayReader.js");
+
+/**
+ * Create a reader adapted to the data.
+ * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data to read.
+ * @return {DataReader} the data reader.
+ */
+module.exports = function (data) {
+    var type = utils.getTypeOf(data);
+    utils.checkSupport(type);
+    if (type === "string" && !support.uint8array) {
+        return new StringReader(data);
+    }
+    if (type === "nodebuffer") {
+        return new NodeBufferReader(data);
+    }
+    if (support.uint8array) {
+        return new Uint8ArrayReader(utils.transformTo("uint8array", data));
+    }
+    return new ArrayReader(utils.transformTo("array", data));
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/signature.js":
+/*!*********************************************!*\
+  !*** ./node_modules/jszip/lib/signature.js ***!
+  \*********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+exports.LOCAL_FILE_HEADER = "PK\x03\x04";
+exports.CENTRAL_FILE_HEADER = "PK\x01\x02";
+exports.CENTRAL_DIRECTORY_END = "PK\x05\x06";
+exports.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x06\x07";
+exports.ZIP64_CENTRAL_DIRECTORY_END = "PK\x06\x06";
+exports.DATA_DESCRIPTOR = "PK\x07\x08";
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/stream/ConvertWorker.js":
+/*!********************************************************!*\
+  !*** ./node_modules/jszip/lib/stream/ConvertWorker.js ***!
+  \********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var GenericWorker = __webpack_require__(/*! ./GenericWorker */ "./node_modules/jszip/lib/stream/GenericWorker.js");
+var utils = __webpack_require__(/*! ../utils */ "./node_modules/jszip/lib/utils.js");
+
+/**
+ * A worker which convert chunks to a specified type.
+ * @constructor
+ * @param {String} destType the destination type.
+ */
+function ConvertWorker(destType) {
+    GenericWorker.call(this, "ConvertWorker to " + destType);
+    this.destType = destType;
+}
+utils.inherits(ConvertWorker, GenericWorker);
+
+/**
+ * @see GenericWorker.processChunk
+ */
+ConvertWorker.prototype.processChunk = function (chunk) {
+    this.push({
+        data : utils.transformTo(this.destType, chunk.data),
+        meta : chunk.meta
+    });
+};
+module.exports = ConvertWorker;
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/stream/Crc32Probe.js":
+/*!*****************************************************!*\
+  !*** ./node_modules/jszip/lib/stream/Crc32Probe.js ***!
+  \*****************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var GenericWorker = __webpack_require__(/*! ./GenericWorker */ "./node_modules/jszip/lib/stream/GenericWorker.js");
+var crc32 = __webpack_require__(/*! ../crc32 */ "./node_modules/jszip/lib/crc32.js");
+var utils = __webpack_require__(/*! ../utils */ "./node_modules/jszip/lib/utils.js");
+
+/**
+ * A worker which calculate the crc32 of the data flowing through.
+ * @constructor
+ */
+function Crc32Probe() {
+    GenericWorker.call(this, "Crc32Probe");
+    this.withStreamInfo("crc32", 0);
+}
+utils.inherits(Crc32Probe, GenericWorker);
+
+/**
+ * @see GenericWorker.processChunk
+ */
+Crc32Probe.prototype.processChunk = function (chunk) {
+    this.streamInfo.crc32 = crc32(chunk.data, this.streamInfo.crc32 || 0);
+    this.push(chunk);
+};
+module.exports = Crc32Probe;
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/stream/DataLengthProbe.js":
+/*!**********************************************************!*\
+  !*** ./node_modules/jszip/lib/stream/DataLengthProbe.js ***!
+  \**********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var utils = __webpack_require__(/*! ../utils */ "./node_modules/jszip/lib/utils.js");
+var GenericWorker = __webpack_require__(/*! ./GenericWorker */ "./node_modules/jszip/lib/stream/GenericWorker.js");
+
+/**
+ * A worker which calculate the total length of the data flowing through.
+ * @constructor
+ * @param {String} propName the name used to expose the length
+ */
+function DataLengthProbe(propName) {
+    GenericWorker.call(this, "DataLengthProbe for " + propName);
+    this.propName = propName;
+    this.withStreamInfo(propName, 0);
+}
+utils.inherits(DataLengthProbe, GenericWorker);
+
+/**
+ * @see GenericWorker.processChunk
+ */
+DataLengthProbe.prototype.processChunk = function (chunk) {
+    if(chunk) {
+        var length = this.streamInfo[this.propName] || 0;
+        this.streamInfo[this.propName] = length + chunk.data.length;
+    }
+    GenericWorker.prototype.processChunk.call(this, chunk);
+};
+module.exports = DataLengthProbe;
+
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/stream/DataWorker.js":
+/*!*****************************************************!*\
+  !*** ./node_modules/jszip/lib/stream/DataWorker.js ***!
+  \*****************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var utils = __webpack_require__(/*! ../utils */ "./node_modules/jszip/lib/utils.js");
+var GenericWorker = __webpack_require__(/*! ./GenericWorker */ "./node_modules/jszip/lib/stream/GenericWorker.js");
+
+// the size of the generated chunks
+// TODO expose this as a public variable
+var DEFAULT_BLOCK_SIZE = 16 * 1024;
+
+/**
+ * A worker that reads a content and emits chunks.
+ * @constructor
+ * @param {Promise} dataP the promise of the data to split
+ */
+function DataWorker(dataP) {
+    GenericWorker.call(this, "DataWorker");
+    var self = this;
+    this.dataIsReady = false;
+    this.index = 0;
+    this.max = 0;
+    this.data = null;
+    this.type = "";
+
+    this._tickScheduled = false;
+
+    dataP.then(function (data) {
+        self.dataIsReady = true;
+        self.data = data;
+        self.max = data && data.length || 0;
+        self.type = utils.getTypeOf(data);
+        if(!self.isPaused) {
+            self._tickAndRepeat();
+        }
+    }, function (e) {
+        self.error(e);
+    });
+}
+
+utils.inherits(DataWorker, GenericWorker);
+
+/**
+ * @see GenericWorker.cleanUp
+ */
+DataWorker.prototype.cleanUp = function () {
+    GenericWorker.prototype.cleanUp.call(this);
+    this.data = null;
+};
+
+/**
+ * @see GenericWorker.resume
+ */
+DataWorker.prototype.resume = function () {
+    if(!GenericWorker.prototype.resume.call(this)) {
+        return false;
+    }
+
+    if (!this._tickScheduled && this.dataIsReady) {
+        this._tickScheduled = true;
+        utils.delay(this._tickAndRepeat, [], this);
+    }
+    return true;
+};
+
+/**
+ * Trigger a tick a schedule an other call to this function.
+ */
+DataWorker.prototype._tickAndRepeat = function() {
+    this._tickScheduled = false;
+    if(this.isPaused || this.isFinished) {
+        return;
+    }
+    this._tick();
+    if(!this.isFinished) {
+        utils.delay(this._tickAndRepeat, [], this);
+        this._tickScheduled = true;
+    }
+};
+
+/**
+ * Read and push a chunk.
+ */
+DataWorker.prototype._tick = function() {
+
+    if(this.isPaused || this.isFinished) {
+        return false;
+    }
+
+    var size = DEFAULT_BLOCK_SIZE;
+    var data = null, nextIndex = Math.min(this.max, this.index + size);
+    if (this.index >= this.max) {
+        // EOF
+        return this.end();
+    } else {
+        switch(this.type) {
+            case "string":
+                data = this.data.substring(this.index, nextIndex);
+            break;
+            case "uint8array":
+                data = this.data.subarray(this.index, nextIndex);
+            break;
+            case "array":
+            case "nodebuffer":
+                data = this.data.slice(this.index, nextIndex);
+            break;
+        }
+        this.index = nextIndex;
+        return this.push({
+            data : data,
+            meta : {
+                percent : this.max ? this.index / this.max * 100 : 0
+            }
+        });
+    }
+};
+
+module.exports = DataWorker;
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/stream/GenericWorker.js":
+/*!********************************************************!*\
+  !*** ./node_modules/jszip/lib/stream/GenericWorker.js ***!
+  \********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+/**
+ * A worker that does nothing but passing chunks to the next one. This is like
+ * a nodejs stream but with some differences. On the good side :
+ * - it works on IE 6-9 without any issue / polyfill
+ * - it weights less than the full dependencies bundled with browserify
+ * - it forwards errors (no need to declare an error handler EVERYWHERE)
+ *
+ * A chunk is an object with 2 attributes : `meta` and `data`. The former is an
+ * object containing anything (`percent` for example), see each worker for more
+ * details. The latter is the real data (String, Uint8Array, etc).
+ *
+ * @constructor
+ * @param {String} name the name of the stream (mainly used for debugging purposes)
+ */
+function GenericWorker(name) {
+    // the name of the worker
+    this.name = name || "default";
+    // an object containing metadata about the workers chain
+    this.streamInfo = {};
+    // an error which happened when the worker was paused
+    this.generatedError = null;
+    // an object containing metadata to be merged by this worker into the general metadata
+    this.extraStreamInfo = {};
+    // true if the stream is paused (and should not do anything), false otherwise
+    this.isPaused = true;
+    // true if the stream is finished (and should not do anything), false otherwise
+    this.isFinished = false;
+    // true if the stream is locked to prevent further structure updates (pipe), false otherwise
+    this.isLocked = false;
+    // the event listeners
+    this._listeners = {
+        'data':[],
+        'end':[],
+        'error':[]
+    };
+    // the previous worker, if any
+    this.previous = null;
+}
+
+GenericWorker.prototype = {
+    /**
+     * Push a chunk to the next workers.
+     * @param {Object} chunk the chunk to push
+     */
+    push : function (chunk) {
+        this.emit("data", chunk);
+    },
+    /**
+     * End the stream.
+     * @return {Boolean} true if this call ended the worker, false otherwise.
+     */
+    end : function () {
+        if (this.isFinished) {
+            return false;
+        }
+
+        this.flush();
+        try {
+            this.emit("end");
+            this.cleanUp();
+            this.isFinished = true;
+        } catch (e) {
+            this.emit("error", e);
+        }
+        return true;
+    },
+    /**
+     * End the stream with an error.
+     * @param {Error} e the error which caused the premature end.
+     * @return {Boolean} true if this call ended the worker with an error, false otherwise.
+     */
+    error : function (e) {
+        if (this.isFinished) {
+            return false;
+        }
+
+        if(this.isPaused) {
+            this.generatedError = e;
+        } else {
+            this.isFinished = true;
+
+            this.emit("error", e);
+
+            // in the workers chain exploded in the middle of the chain,
+            // the error event will go downward but we also need to notify
+            // workers upward that there has been an error.
+            if(this.previous) {
+                this.previous.error(e);
+            }
+
+            this.cleanUp();
+        }
+        return true;
+    },
+    /**
+     * Add a callback on an event.
+     * @param {String} name the name of the event (data, end, error)
+     * @param {Function} listener the function to call when the event is triggered
+     * @return {GenericWorker} the current object for chainability
+     */
+    on : function (name, listener) {
+        this._listeners[name].push(listener);
+        return this;
+    },
+    /**
+     * Clean any references when a worker is ending.
+     */
+    cleanUp : function () {
+        this.streamInfo = this.generatedError = this.extraStreamInfo = null;
+        this._listeners = [];
+    },
+    /**
+     * Trigger an event. This will call registered callback with the provided arg.
+     * @param {String} name the name of the event (data, end, error)
+     * @param {Object} arg the argument to call the callback with.
+     */
+    emit : function (name, arg) {
+        if (this._listeners[name]) {
+            for(var i = 0; i < this._listeners[name].length; i++) {
+                this._listeners[name][i].call(this, arg);
+            }
+        }
+    },
+    /**
+     * Chain a worker with an other.
+     * @param {Worker} next the worker receiving events from the current one.
+     * @return {worker} the next worker for chainability
+     */
+    pipe : function (next) {
+        return next.registerPrevious(this);
+    },
+    /**
+     * Same as `pipe` in the other direction.
+     * Using an API with `pipe(next)` is very easy.
+     * Implementing the API with the point of view of the next one registering
+     * a source is easier, see the ZipFileWorker.
+     * @param {Worker} previous the previous worker, sending events to this one
+     * @return {Worker} the current worker for chainability
+     */
+    registerPrevious : function (previous) {
+        if (this.isLocked) {
+            throw new Error("The stream '" + this + "' has already been used.");
+        }
+
+        // sharing the streamInfo...
+        this.streamInfo = previous.streamInfo;
+        // ... and adding our own bits
+        this.mergeStreamInfo();
+        this.previous =  previous;
+        var self = this;
+        previous.on('data', function (chunk) {
+            self.processChunk(chunk);
+        });
+        previous.on('end', function () {
+            self.end();
+        });
+        previous.on('error', function (e) {
+            self.error(e);
+        });
+        return this;
+    },
+    /**
+     * Pause the stream so it doesn't send events anymore.
+     * @return {Boolean} true if this call paused the worker, false otherwise.
+     */
+    pause : function () {
+        if(this.isPaused || this.isFinished) {
+            return false;
+        }
+        this.isPaused = true;
+
+        if(this.previous) {
+            this.previous.pause();
+        }
+        return true;
+    },
+    /**
+     * Resume a paused stream.
+     * @return {Boolean} true if this call resumed the worker, false otherwise.
+     */
+    resume : function () {
+        if(!this.isPaused || this.isFinished) {
+            return false;
+        }
+        this.isPaused = false;
+
+        // if true, the worker tried to resume but failed
+        var withError = false;
+        if(this.generatedError) {
+            this.error(this.generatedError);
+            withError = true;
+        }
+        if(this.previous) {
+            this.previous.resume();
+        }
+
+        return !withError;
+    },
+    /**
+     * Flush any remaining bytes as the stream is ending.
+     */
+    flush : function () {},
+    /**
+     * Process a chunk. This is usually the method overridden.
+     * @param {Object} chunk the chunk to process.
+     */
+    processChunk : function(chunk) {
+        this.push(chunk);
+    },
+    /**
+     * Add a key/value to be added in the workers chain streamInfo once activated.
+     * @param {String} key the key to use
+     * @param {Object} value the associated value
+     * @return {Worker} the current worker for chainability
+     */
+    withStreamInfo : function (key, value) {
+        this.extraStreamInfo[key] = value;
+        this.mergeStreamInfo();
+        return this;
+    },
+    /**
+     * Merge this worker's streamInfo into the chain's streamInfo.
+     */
+    mergeStreamInfo : function () {
+        for(var key in this.extraStreamInfo) {
+            if (!this.extraStreamInfo.hasOwnProperty(key)) {
+                continue;
+            }
+            this.streamInfo[key] = this.extraStreamInfo[key];
+        }
+    },
+
+    /**
+     * Lock the stream to prevent further updates on the workers chain.
+     * After calling this method, all calls to pipe will fail.
+     */
+    lock: function () {
+        if (this.isLocked) {
+            throw new Error("The stream '" + this + "' has already been used.");
+        }
+        this.isLocked = true;
+        if (this.previous) {
+            this.previous.lock();
+        }
+    },
+
+    /**
+     *
+     * Pretty print the workers chain.
+     */
+    toString : function () {
+        var me = "Worker " + this.name;
+        if (this.previous) {
+            return this.previous + " -> " + me;
+        } else {
+            return me;
+        }
+    }
+};
+
+module.exports = GenericWorker;
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/stream/StreamHelper.js":
+/*!*******************************************************!*\
+  !*** ./node_modules/jszip/lib/stream/StreamHelper.js ***!
+  \*******************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(Buffer) {
+
+var utils = __webpack_require__(/*! ../utils */ "./node_modules/jszip/lib/utils.js");
+var ConvertWorker = __webpack_require__(/*! ./ConvertWorker */ "./node_modules/jszip/lib/stream/ConvertWorker.js");
+var GenericWorker = __webpack_require__(/*! ./GenericWorker */ "./node_modules/jszip/lib/stream/GenericWorker.js");
+var base64 = __webpack_require__(/*! ../base64 */ "./node_modules/jszip/lib/base64.js");
+var support = __webpack_require__(/*! ../support */ "./node_modules/jszip/lib/support.js");
+var external = __webpack_require__(/*! ../external */ "./node_modules/jszip/lib/external.js");
+
+var NodejsStreamOutputAdapter = null;
+if (support.nodestream) {
+    try {
+        NodejsStreamOutputAdapter = __webpack_require__(/*! ../nodejs/NodejsStreamOutputAdapter */ "./node_modules/jszip/lib/nodejs/NodejsStreamOutputAdapter.js");
+    } catch(e) {}
+}
+
+/**
+ * Apply the final transformation of the data. If the user wants a Blob for
+ * example, it's easier to work with an U8intArray and finally do the
+ * ArrayBuffer/Blob conversion.
+ * @param {String} type the name of the final type
+ * @param {String|Uint8Array|Buffer} content the content to transform
+ * @param {String} mimeType the mime type of the content, if applicable.
+ * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the content in the right format.
+ */
+function transformZipOutput(type, content, mimeType) {
+    switch(type) {
+        case "blob" :
+            return utils.newBlob(utils.transformTo("arraybuffer", content), mimeType);
+        case "base64" :
+            return base64.encode(content);
+        default :
+            return utils.transformTo(type, content);
+    }
+}
+
+/**
+ * Concatenate an array of data of the given type.
+ * @param {String} type the type of the data in the given array.
+ * @param {Array} dataArray the array containing the data chunks to concatenate
+ * @return {String|Uint8Array|Buffer} the concatenated data
+ * @throws Error if the asked type is unsupported
+ */
+function concat (type, dataArray) {
+    var i, index = 0, res = null, totalLength = 0;
+    for(i = 0; i < dataArray.length; i++) {
+        totalLength += dataArray[i].length;
+    }
+    switch(type) {
+        case "string":
+            return dataArray.join("");
+          case "array":
+            return Array.prototype.concat.apply([], dataArray);
+        case "uint8array":
+            res = new Uint8Array(totalLength);
+            for(i = 0; i < dataArray.length; i++) {
+                res.set(dataArray[i], index);
+                index += dataArray[i].length;
+            }
+            return res;
+        case "nodebuffer":
+            return Buffer.concat(dataArray);
+        default:
+            throw new Error("concat : unsupported type '"  + type + "'");
+    }
+}
+
+/**
+ * Listen a StreamHelper, accumulate its content and concatenate it into a
+ * complete block.
+ * @param {StreamHelper} helper the helper to use.
+ * @param {Function} updateCallback a callback called on each update. Called
+ * with one arg :
+ * - the metadata linked to the update received.
+ * @return Promise the promise for the accumulation.
+ */
+function accumulate(helper, updateCallback) {
+    return new external.Promise(function (resolve, reject){
+        var dataArray = [];
+        var chunkType = helper._internalType,
+            resultType = helper._outputType,
+            mimeType = helper._mimeType;
+        helper
+        .on('data', function (data, meta) {
+            dataArray.push(data);
+            if(updateCallback) {
+                updateCallback(meta);
+            }
+        })
+        .on('error', function(err) {
+            dataArray = [];
+            reject(err);
+        })
+        .on('end', function (){
+            try {
+                var result = transformZipOutput(resultType, concat(chunkType, dataArray), mimeType);
+                resolve(result);
+            } catch (e) {
+                reject(e);
+            }
+            dataArray = [];
+        })
+        .resume();
+    });
+}
+
+/**
+ * An helper to easily use workers outside of JSZip.
+ * @constructor
+ * @param {Worker} worker the worker to wrap
+ * @param {String} outputType the type of data expected by the use
+ * @param {String} mimeType the mime type of the content, if applicable.
+ */
+function StreamHelper(worker, outputType, mimeType) {
+    var internalType = outputType;
+    switch(outputType) {
+        case "blob":
+        case "arraybuffer":
+            internalType = "uint8array";
+        break;
+        case "base64":
+            internalType = "string";
+        break;
+    }
+
+    try {
+        // the type used internally
+        this._internalType = internalType;
+        // the type used to output results
+        this._outputType = outputType;
+        // the mime type
+        this._mimeType = mimeType;
+        utils.checkSupport(internalType);
+        this._worker = worker.pipe(new ConvertWorker(internalType));
+        // the last workers can be rewired without issues but we need to
+        // prevent any updates on previous workers.
+        worker.lock();
+    } catch(e) {
+        this._worker = new GenericWorker("error");
+        this._worker.error(e);
+    }
+}
+
+StreamHelper.prototype = {
+    /**
+     * Listen a StreamHelper, accumulate its content and concatenate it into a
+     * complete block.
+     * @param {Function} updateCb the update callback.
+     * @return Promise the promise for the accumulation.
+     */
+    accumulate : function (updateCb) {
+        return accumulate(this, updateCb);
+    },
+    /**
+     * Add a listener on an event triggered on a stream.
+     * @param {String} evt the name of the event
+     * @param {Function} fn the listener
+     * @return {StreamHelper} the current helper.
+     */
+    on : function (evt, fn) {
+        var self = this;
+
+        if(evt === "data") {
+            this._worker.on(evt, function (chunk) {
+                fn.call(self, chunk.data, chunk.meta);
+            });
+        } else {
+            this._worker.on(evt, function () {
+                utils.delay(fn, arguments, self);
+            });
+        }
+        return this;
+    },
+    /**
+     * Resume the flow of chunks.
+     * @return {StreamHelper} the current helper.
+     */
+    resume : function () {
+        utils.delay(this._worker.resume, [], this._worker);
+        return this;
+    },
+    /**
+     * Pause the flow of chunks.
+     * @return {StreamHelper} the current helper.
+     */
+    pause : function () {
+        this._worker.pause();
+        return this;
+    },
+    /**
+     * Return a nodejs stream for this helper.
+     * @param {Function} updateCb the update callback.
+     * @return {NodejsStreamOutputAdapter} the nodejs stream.
+     */
+    toNodejsStream : function (updateCb) {
+        utils.checkSupport("nodestream");
+        if (this._outputType !== "nodebuffer") {
+            // an object stream containing blob/arraybuffer/uint8array/string
+            // is strange and I don't know if it would be useful.
+            // I you find this comment and have a good usecase, please open a
+            // bug report !
+            throw new Error(this._outputType + " is not supported by this method");
+        }
+
+        return new NodejsStreamOutputAdapter(this, {
+            objectMode : this._outputType !== "nodebuffer"
+        }, updateCb);
+    }
+};
+
+
+module.exports = StreamHelper;
+
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/node_modules/buffer/index.js */ "./node_modules/webpack/node_modules/buffer/index.js").Buffer))
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/support.js":
+/*!*******************************************!*\
+  !*** ./node_modules/jszip/lib/support.js ***!
+  \*******************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(Buffer) {
+
+exports.base64 = true;
+exports.array = true;
+exports.string = true;
+exports.arraybuffer = typeof ArrayBuffer !== "undefined" && typeof Uint8Array !== "undefined";
+exports.nodebuffer = typeof Buffer !== "undefined";
+// contains true if JSZip can read/generate Uint8Array, false otherwise.
+exports.uint8array = typeof Uint8Array !== "undefined";
+
+if (typeof ArrayBuffer === "undefined") {
+    exports.blob = false;
+}
+else {
+    var buffer = new ArrayBuffer(0);
+    try {
+        exports.blob = new Blob([buffer], {
+            type: "application/zip"
+        }).size === 0;
+    }
+    catch (e) {
+        try {
+            var Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder;
+            var builder = new Builder();
+            builder.append(buffer);
+            exports.blob = builder.getBlob('application/zip').size === 0;
+        }
+        catch (e) {
+            exports.blob = false;
+        }
+    }
+}
+
+try {
+    exports.nodestream = !!__webpack_require__(/*! readable-stream */ "./node_modules/jszip/lib/readable-stream-browser.js").Readable;
+} catch(e) {
+    exports.nodestream = false;
+}
+
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/node_modules/buffer/index.js */ "./node_modules/webpack/node_modules/buffer/index.js").Buffer))
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/utf8.js":
+/*!****************************************!*\
+  !*** ./node_modules/jszip/lib/utf8.js ***!
+  \****************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var utils = __webpack_require__(/*! ./utils */ "./node_modules/jszip/lib/utils.js");
+var support = __webpack_require__(/*! ./support */ "./node_modules/jszip/lib/support.js");
+var nodejsUtils = __webpack_require__(/*! ./nodejsUtils */ "./node_modules/jszip/lib/nodejsUtils.js");
+var GenericWorker = __webpack_require__(/*! ./stream/GenericWorker */ "./node_modules/jszip/lib/stream/GenericWorker.js");
+
+/**
+ * The following functions come from pako, from pako/lib/utils/strings
+ * released under the MIT license, see pako https://github.com/nodeca/pako/
+ */
+
+// Table with utf8 lengths (calculated by first byte of sequence)
+// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,
+// because max possible codepoint is 0x10ffff
+var _utf8len = new Array(256);
+for (var i=0; i<256; i++) {
+  _utf8len[i] = (i >= 252 ? 6 : i >= 248 ? 5 : i >= 240 ? 4 : i >= 224 ? 3 : i >= 192 ? 2 : 1);
+}
+_utf8len[254]=_utf8len[254]=1; // Invalid sequence start
+
+// convert string to array (typed, when possible)
+var string2buf = function (str) {
+    var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;
+
+    // count binary size
+    for (m_pos = 0; m_pos < str_len; m_pos++) {
+        c = str.charCodeAt(m_pos);
+        if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {
+            c2 = str.charCodeAt(m_pos+1);
+            if ((c2 & 0xfc00) === 0xdc00) {
+                c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
+                m_pos++;
+            }
+        }
+        buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;
+    }
+
+    // allocate buffer
+    if (support.uint8array) {
+        buf = new Uint8Array(buf_len);
+    } else {
+        buf = new Array(buf_len);
+    }
+
+    // convert
+    for (i=0, m_pos = 0; i < buf_len; m_pos++) {
+        c = str.charCodeAt(m_pos);
+        if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {
+            c2 = str.charCodeAt(m_pos+1);
+            if ((c2 & 0xfc00) === 0xdc00) {
+                c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
+                m_pos++;
+            }
+        }
+        if (c < 0x80) {
+            /* one byte */
+            buf[i++] = c;
+        } else if (c < 0x800) {
+            /* two bytes */
+            buf[i++] = 0xC0 | (c >>> 6);
+            buf[i++] = 0x80 | (c & 0x3f);
+        } else if (c < 0x10000) {
+            /* three bytes */
+            buf[i++] = 0xE0 | (c >>> 12);
+            buf[i++] = 0x80 | (c >>> 6 & 0x3f);
+            buf[i++] = 0x80 | (c & 0x3f);
+        } else {
+            /* four bytes */
+            buf[i++] = 0xf0 | (c >>> 18);
+            buf[i++] = 0x80 | (c >>> 12 & 0x3f);
+            buf[i++] = 0x80 | (c >>> 6 & 0x3f);
+            buf[i++] = 0x80 | (c & 0x3f);
+        }
+    }
+
+    return buf;
+};
+
+// Calculate max possible position in utf8 buffer,
+// that will not break sequence. If that's not possible
+// - (very small limits) return max size as is.
+//
+// buf[] - utf8 bytes array
+// max   - length limit (mandatory);
+var utf8border = function(buf, max) {
+    var pos;
+
+    max = max || buf.length;
+    if (max > buf.length) { max = buf.length; }
+
+    // go back from last position, until start of sequence found
+    pos = max-1;
+    while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }
+
+    // Fuckup - very small and broken sequence,
+    // return max, because we should return something anyway.
+    if (pos < 0) { return max; }
+
+    // If we came to start of buffer - that means vuffer is too small,
+    // return max too.
+    if (pos === 0) { return max; }
+
+    return (pos + _utf8len[buf[pos]] > max) ? pos : max;
+};
+
+// convert array to string
+var buf2string = function (buf) {
+    var str, i, out, c, c_len;
+    var len = buf.length;
+
+    // Reserve max possible length (2 words per char)
+    // NB: by unknown reasons, Array is significantly faster for
+    //     String.fromCharCode.apply than Uint16Array.
+    var utf16buf = new Array(len*2);
+
+    for (out=0, i=0; i<len;) {
+        c = buf[i++];
+        // quick process ascii
+        if (c < 0x80) { utf16buf[out++] = c; continue; }
+
+        c_len = _utf8len[c];
+        // skip 5 & 6 byte codes
+        if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len-1; continue; }
+
+        // apply mask on first byte
+        c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;
+        // join the rest
+        while (c_len > 1 && i < len) {
+            c = (c << 6) | (buf[i++] & 0x3f);
+            c_len--;
+        }
+
+        // terminated by end of string?
+        if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }
+
+        if (c < 0x10000) {
+            utf16buf[out++] = c;
+        } else {
+            c -= 0x10000;
+            utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);
+            utf16buf[out++] = 0xdc00 | (c & 0x3ff);
+        }
+    }
+
+    // shrinkBuf(utf16buf, out)
+    if (utf16buf.length !== out) {
+        if(utf16buf.subarray) {
+            utf16buf = utf16buf.subarray(0, out);
+        } else {
+            utf16buf.length = out;
+        }
+    }
+
+    // return String.fromCharCode.apply(null, utf16buf);
+    return utils.applyFromCharCode(utf16buf);
+};
+
+
+// That's all for the pako functions.
+
+
+/**
+ * Transform a javascript string into an array (typed if possible) of bytes,
+ * UTF-8 encoded.
+ * @param {String} str the string to encode
+ * @return {Array|Uint8Array|Buffer} the UTF-8 encoded string.
+ */
+exports.utf8encode = function utf8encode(str) {
+    if (support.nodebuffer) {
+        return nodejsUtils.newBufferFrom(str, "utf-8");
+    }
+
+    return string2buf(str);
+};
+
+
+/**
+ * Transform a bytes array (or a representation) representing an UTF-8 encoded
+ * string into a javascript string.
+ * @param {Array|Uint8Array|Buffer} buf the data de decode
+ * @return {String} the decoded string.
+ */
+exports.utf8decode = function utf8decode(buf) {
+    if (support.nodebuffer) {
+        return utils.transformTo("nodebuffer", buf).toString("utf-8");
+    }
+
+    buf = utils.transformTo(support.uint8array ? "uint8array" : "array", buf);
+
+    return buf2string(buf);
+};
+
+/**
+ * A worker to decode utf8 encoded binary chunks into string chunks.
+ * @constructor
+ */
+function Utf8DecodeWorker() {
+    GenericWorker.call(this, "utf-8 decode");
+    // the last bytes if a chunk didn't end with a complete codepoint.
+    this.leftOver = null;
+}
+utils.inherits(Utf8DecodeWorker, GenericWorker);
+
+/**
+ * @see GenericWorker.processChunk
+ */
+Utf8DecodeWorker.prototype.processChunk = function (chunk) {
+
+    var data = utils.transformTo(support.uint8array ? "uint8array" : "array", chunk.data);
+
+    // 1st step, re-use what's left of the previous chunk
+    if (this.leftOver && this.leftOver.length) {
+        if(support.uint8array) {
+            var previousData = data;
+            data = new Uint8Array(previousData.length + this.leftOver.length);
+            data.set(this.leftOver, 0);
+            data.set(previousData, this.leftOver.length);
+        } else {
+            data = this.leftOver.concat(data);
+        }
+        this.leftOver = null;
+    }
+
+    var nextBoundary = utf8border(data);
+    var usableData = data;
+    if (nextBoundary !== data.length) {
+        if (support.uint8array) {
+            usableData = data.subarray(0, nextBoundary);
+            this.leftOver = data.subarray(nextBoundary, data.length);
+        } else {
+            usableData = data.slice(0, nextBoundary);
+            this.leftOver = data.slice(nextBoundary, data.length);
+        }
+    }
+
+    this.push({
+        data : exports.utf8decode(usableData),
+        meta : chunk.meta
+    });
+};
+
+/**
+ * @see GenericWorker.flush
+ */
+Utf8DecodeWorker.prototype.flush = function () {
+    if(this.leftOver && this.leftOver.length) {
+        this.push({
+            data : exports.utf8decode(this.leftOver),
+            meta : {}
+        });
+        this.leftOver = null;
+    }
+};
+exports.Utf8DecodeWorker = Utf8DecodeWorker;
+
+/**
+ * A worker to endcode string chunks into utf8 encoded binary chunks.
+ * @constructor
+ */
+function Utf8EncodeWorker() {
+    GenericWorker.call(this, "utf-8 encode");
+}
+utils.inherits(Utf8EncodeWorker, GenericWorker);
+
+/**
+ * @see GenericWorker.processChunk
+ */
+Utf8EncodeWorker.prototype.processChunk = function (chunk) {
+    this.push({
+        data : exports.utf8encode(chunk.data),
+        meta : chunk.meta
+    });
+};
+exports.Utf8EncodeWorker = Utf8EncodeWorker;
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/utils.js":
+/*!*****************************************!*\
+  !*** ./node_modules/jszip/lib/utils.js ***!
+  \*****************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var support = __webpack_require__(/*! ./support */ "./node_modules/jszip/lib/support.js");
+var base64 = __webpack_require__(/*! ./base64 */ "./node_modules/jszip/lib/base64.js");
+var nodejsUtils = __webpack_require__(/*! ./nodejsUtils */ "./node_modules/jszip/lib/nodejsUtils.js");
+var setImmediate = __webpack_require__(/*! core-js/library/fn/set-immediate */ "./node_modules/jszip/node_modules/core-js/library/fn/set-immediate.js");
+var external = __webpack_require__(/*! ./external */ "./node_modules/jszip/lib/external.js");
+
+
+/**
+ * Convert a string that pass as a "binary string": it should represent a byte
+ * array but may have > 255 char codes. Be sure to take only the first byte
+ * and returns the byte array.
+ * @param {String} str the string to transform.
+ * @return {Array|Uint8Array} the string in a binary format.
+ */
+function string2binary(str) {
+    var result = null;
+    if (support.uint8array) {
+      result = new Uint8Array(str.length);
+    } else {
+      result = new Array(str.length);
+    }
+    return stringToArrayLike(str, result);
+}
+
+/**
+ * Create a new blob with the given content and the given type.
+ * @param {String|ArrayBuffer} part the content to put in the blob. DO NOT use
+ * an Uint8Array because the stock browser of android 4 won't accept it (it
+ * will be silently converted to a string, "[object Uint8Array]").
+ *
+ * Use only ONE part to build the blob to avoid a memory leak in IE11 / Edge:
+ * when a large amount of Array is used to create the Blob, the amount of
+ * memory consumed is nearly 100 times the original data amount.
+ *
+ * @param {String} type the mime type of the blob.
+ * @return {Blob} the created blob.
+ */
+exports.newBlob = function(part, type) {
+    exports.checkSupport("blob");
+
+    try {
+        // Blob constructor
+        return new Blob([part], {
+            type: type
+        });
+    }
+    catch (e) {
+
+        try {
+            // deprecated, browser only, old way
+            var Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder;
+            var builder = new Builder();
+            builder.append(part);
+            return builder.getBlob(type);
+        }
+        catch (e) {
+
+            // well, fuck ?!
+            throw new Error("Bug : can't construct the Blob.");
+        }
+    }
+
+
+};
+/**
+ * The identity function.
+ * @param {Object} input the input.
+ * @return {Object} the same input.
+ */
+function identity(input) {
+    return input;
+}
+
+/**
+ * Fill in an array with a string.
+ * @param {String} str the string to use.
+ * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to fill in (will be mutated).
+ * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated array.
+ */
+function stringToArrayLike(str, array) {
+    for (var i = 0; i < str.length; ++i) {
+        array[i] = str.charCodeAt(i) & 0xFF;
+    }
+    return array;
+}
+
+/**
+ * An helper for the function arrayLikeToString.
+ * This contains static informations and functions that
+ * can be optimized by the browser JIT compiler.
+ */
+var arrayToStringHelper = {
+    /**
+     * Transform an array of int into a string, chunk by chunk.
+     * See the performances notes on arrayLikeToString.
+     * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.
+     * @param {String} type the type of the array.
+     * @param {Integer} chunk the chunk size.
+     * @return {String} the resulting string.
+     * @throws Error if the chunk is too big for the stack.
+     */
+    stringifyByChunk: function(array, type, chunk) {
+        var result = [], k = 0, len = array.length;
+        // shortcut
+        if (len <= chunk) {
+            return String.fromCharCode.apply(null, array);
+        }
+        while (k < len) {
+            if (type === "array" || type === "nodebuffer") {
+                result.push(String.fromCharCode.apply(null, array.slice(k, Math.min(k + chunk, len))));
+            }
+            else {
+                result.push(String.fromCharCode.apply(null, array.subarray(k, Math.min(k + chunk, len))));
+            }
+            k += chunk;
+        }
+        return result.join("");
+    },
+    /**
+     * Call String.fromCharCode on every item in the array.
+     * This is the naive implementation, which generate A LOT of intermediate string.
+     * This should be used when everything else fail.
+     * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.
+     * @return {String} the result.
+     */
+    stringifyByChar: function(array){
+        var resultStr = "";
+        for(var i = 0; i < array.length; i++) {
+            resultStr += String.fromCharCode(array[i]);
+        }
+        return resultStr;
+    },
+    applyCanBeUsed : {
+        /**
+         * true if the browser accepts to use String.fromCharCode on Uint8Array
+         */
+        uint8array : (function () {
+            try {
+                return support.uint8array && String.fromCharCode.apply(null, new Uint8Array(1)).length === 1;
+            } catch (e) {
+                return false;
+            }
+        })(),
+        /**
+         * true if the browser accepts to use String.fromCharCode on nodejs Buffer.
+         */
+        nodebuffer : (function () {
+            try {
+                return support.nodebuffer && String.fromCharCode.apply(null, nodejsUtils.allocBuffer(1)).length === 1;
+            } catch (e) {
+                return false;
+            }
+        })()
+    }
+};
+
+/**
+ * Transform an array-like object to a string.
+ * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.
+ * @return {String} the result.
+ */
+function arrayLikeToString(array) {
+    // Performances notes :
+    // --------------------
+    // String.fromCharCode.apply(null, array) is the fastest, see
+    // see http://jsperf.com/converting-a-uint8array-to-a-string/2
+    // but the stack is limited (and we can get huge arrays !).
+    //
+    // result += String.fromCharCode(array[i]); generate too many strings !
+    //
+    // This code is inspired by http://jsperf.com/arraybuffer-to-string-apply-performance/2
+    // TODO : we now have workers that split the work. Do we still need that ?
+    var chunk = 65536,
+        type = exports.getTypeOf(array),
+        canUseApply = true;
+    if (type === "uint8array") {
+        canUseApply = arrayToStringHelper.applyCanBeUsed.uint8array;
+    } else if (type === "nodebuffer") {
+        canUseApply = arrayToStringHelper.applyCanBeUsed.nodebuffer;
+    }
+
+    if (canUseApply) {
+        while (chunk > 1) {
+            try {
+                return arrayToStringHelper.stringifyByChunk(array, type, chunk);
+            } catch (e) {
+                chunk = Math.floor(chunk / 2);
+            }
+        }
+    }
+
+    // no apply or chunk error : slow and painful algorithm
+    // default browser on android 4.*
+    return arrayToStringHelper.stringifyByChar(array);
+}
+
+exports.applyFromCharCode = arrayLikeToString;
+
+
+/**
+ * Copy the data from an array-like to an other array-like.
+ * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayFrom the origin array.
+ * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayTo the destination array which will be mutated.
+ * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated destination array.
+ */
+function arrayLikeToArrayLike(arrayFrom, arrayTo) {
+    for (var i = 0; i < arrayFrom.length; i++) {
+        arrayTo[i] = arrayFrom[i];
+    }
+    return arrayTo;
+}
+
+// a matrix containing functions to transform everything into everything.
+var transform = {};
+
+// string to ?
+transform["string"] = {
+    "string": identity,
+    "array": function(input) {
+        return stringToArrayLike(input, new Array(input.length));
+    },
+    "arraybuffer": function(input) {
+        return transform["string"]["uint8array"](input).buffer;
+    },
+    "uint8array": function(input) {
+        return stringToArrayLike(input, new Uint8Array(input.length));
+    },
+    "nodebuffer": function(input) {
+        return stringToArrayLike(input, nodejsUtils.allocBuffer(input.length));
+    }
+};
+
+// array to ?
+transform["array"] = {
+    "string": arrayLikeToString,
+    "array": identity,
+    "arraybuffer": function(input) {
+        return (new Uint8Array(input)).buffer;
+    },
+    "uint8array": function(input) {
+        return new Uint8Array(input);
+    },
+    "nodebuffer": function(input) {
+        return nodejsUtils.newBufferFrom(input);
+    }
+};
+
+// arraybuffer to ?
+transform["arraybuffer"] = {
+    "string": function(input) {
+        return arrayLikeToString(new Uint8Array(input));
+    },
+    "array": function(input) {
+        return arrayLikeToArrayLike(new Uint8Array(input), new Array(input.byteLength));
+    },
+    "arraybuffer": identity,
+    "uint8array": function(input) {
+        return new Uint8Array(input);
+    },
+    "nodebuffer": function(input) {
+        return nodejsUtils.newBufferFrom(new Uint8Array(input));
+    }
+};
+
+// uint8array to ?
+transform["uint8array"] = {
+    "string": arrayLikeToString,
+    "array": function(input) {
+        return arrayLikeToArrayLike(input, new Array(input.length));
+    },
+    "arraybuffer": function(input) {
+        return input.buffer;
+    },
+    "uint8array": identity,
+    "nodebuffer": function(input) {
+        return nodejsUtils.newBufferFrom(input);
+    }
+};
+
+// nodebuffer to ?
+transform["nodebuffer"] = {
+    "string": arrayLikeToString,
+    "array": function(input) {
+        return arrayLikeToArrayLike(input, new Array(input.length));
+    },
+    "arraybuffer": function(input) {
+        return transform["nodebuffer"]["uint8array"](input).buffer;
+    },
+    "uint8array": function(input) {
+        return arrayLikeToArrayLike(input, new Uint8Array(input.length));
+    },
+    "nodebuffer": identity
+};
+
+/**
+ * Transform an input into any type.
+ * The supported output type are : string, array, uint8array, arraybuffer, nodebuffer.
+ * If no output type is specified, the unmodified input will be returned.
+ * @param {String} outputType the output type.
+ * @param {String|Array|ArrayBuffer|Uint8Array|Buffer} input the input to convert.
+ * @throws {Error} an Error if the browser doesn't support the requested output type.
+ */
+exports.transformTo = function(outputType, input) {
+    if (!input) {
+        // undefined, null, etc
+        // an empty string won't harm.
+        input = "";
+    }
+    if (!outputType) {
+        return input;
+    }
+    exports.checkSupport(outputType);
+    var inputType = exports.getTypeOf(input);
+    var result = transform[inputType][outputType](input);
+    return result;
+};
+
+/**
+ * Return the type of the input.
+ * The type will be in a format valid for JSZip.utils.transformTo : string, array, uint8array, arraybuffer.
+ * @param {Object} input the input to identify.
+ * @return {String} the (lowercase) type of the input.
+ */
+exports.getTypeOf = function(input) {
+    if (typeof input === "string") {
+        return "string";
+    }
+    if (Object.prototype.toString.call(input) === "[object Array]") {
+        return "array";
+    }
+    if (support.nodebuffer && nodejsUtils.isBuffer(input)) {
+        return "nodebuffer";
+    }
+    if (support.uint8array && input instanceof Uint8Array) {
+        return "uint8array";
+    }
+    if (support.arraybuffer && input instanceof ArrayBuffer) {
+        return "arraybuffer";
+    }
+};
+
+/**
+ * Throw an exception if the type is not supported.
+ * @param {String} type the type to check.
+ * @throws {Error} an Error if the browser doesn't support the requested type.
+ */
+exports.checkSupport = function(type) {
+    var supported = support[type.toLowerCase()];
+    if (!supported) {
+        throw new Error(type + " is not supported by this platform");
+    }
+};
+
+exports.MAX_VALUE_16BITS = 65535;
+exports.MAX_VALUE_32BITS = -1; // well, "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF" is parsed as -1
+
+/**
+ * Prettify a string read as binary.
+ * @param {string} str the string to prettify.
+ * @return {string} a pretty string.
+ */
+exports.pretty = function(str) {
+    var res = '',
+        code, i;
+    for (i = 0; i < (str || "").length; i++) {
+        code = str.charCodeAt(i);
+        res += '\\x' + (code < 16 ? "0" : "") + code.toString(16).toUpperCase();
+    }
+    return res;
+};
+
+/**
+ * Defer the call of a function.
+ * @param {Function} callback the function to call asynchronously.
+ * @param {Array} args the arguments to give to the callback.
+ */
+exports.delay = function(callback, args, self) {
+    setImmediate(function () {
+        callback.apply(self || null, args || []);
+    });
+};
+
+/**
+ * Extends a prototype with an other, without calling a constructor with
+ * side effects. Inspired by nodejs' `utils.inherits`
+ * @param {Function} ctor the constructor to augment
+ * @param {Function} superCtor the parent constructor to use
+ */
+exports.inherits = function (ctor, superCtor) {
+    var Obj = function() {};
+    Obj.prototype = superCtor.prototype;
+    ctor.prototype = new Obj();
+};
+
+/**
+ * Merge the objects passed as parameters into a new one.
+ * @private
+ * @param {...Object} var_args All objects to merge.
+ * @return {Object} a new object with the data of the others.
+ */
+exports.extend = function() {
+    var result = {}, i, attr;
+    for (i = 0; i < arguments.length; i++) { // arguments is not enumerable in some browsers
+        for (attr in arguments[i]) {
+            if (arguments[i].hasOwnProperty(attr) && typeof result[attr] === "undefined") {
+                result[attr] = arguments[i][attr];
+            }
+        }
+    }
+    return result;
+};
+
+/**
+ * Transform arbitrary content into a Promise.
+ * @param {String} name a name for the content being processed.
+ * @param {Object} inputData the content to process.
+ * @param {Boolean} isBinary true if the content is not an unicode string
+ * @param {Boolean} isOptimizedBinaryString true if the string content only has one byte per character.
+ * @param {Boolean} isBase64 true if the string content is encoded with base64.
+ * @return {Promise} a promise in a format usable by JSZip.
+ */
+exports.prepareContent = function(name, inputData, isBinary, isOptimizedBinaryString, isBase64) {
+
+    // if inputData is already a promise, this flatten it.
+    var promise = external.Promise.resolve(inputData).then(function(data) {
+        
+        
+        var isBlob = support.blob && (data instanceof Blob || ['[object File]', '[object Blob]'].indexOf(Object.prototype.toString.call(data)) !== -1);
+
+        if (isBlob && typeof FileReader !== "undefined") {
+            return new external.Promise(function (resolve, reject) {
+                var reader = new FileReader();
+
+                reader.onload = function(e) {
+                    resolve(e.target.result);
+                };
+                reader.onerror = function(e) {
+                    reject(e.target.error);
+                };
+                reader.readAsArrayBuffer(data);
+            });
+        } else {
+            return data;
+        }
+    });
+
+    return promise.then(function(data) {
+        var dataType = exports.getTypeOf(data);
+
+        if (!dataType) {
+            return external.Promise.reject(
+                new Error("Can't read the data of '" + name + "'. Is it " +
+                          "in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?")
+            );
+        }
+        // special case : it's way easier to work with Uint8Array than with ArrayBuffer
+        if (dataType === "arraybuffer") {
+            data = exports.transformTo("uint8array", data);
+        } else if (dataType === "string") {
+            if (isBase64) {
+                data = base64.decode(data);
+            }
+            else if (isBinary) {
+                // optimizedBinaryString === true means that the file has already been filtered with a 0xFF mask
+                if (isOptimizedBinaryString !== true) {
+                    // this is a string, not in a base64 format.
+                    // Be sure that this is a correct "binary string"
+                    data = string2binary(data);
+                }
+            }
+        }
+        return data;
+    });
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/zipEntries.js":
+/*!**********************************************!*\
+  !*** ./node_modules/jszip/lib/zipEntries.js ***!
+  \**********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var readerFor = __webpack_require__(/*! ./reader/readerFor */ "./node_modules/jszip/lib/reader/readerFor.js");
+var utils = __webpack_require__(/*! ./utils */ "./node_modules/jszip/lib/utils.js");
+var sig = __webpack_require__(/*! ./signature */ "./node_modules/jszip/lib/signature.js");
+var ZipEntry = __webpack_require__(/*! ./zipEntry */ "./node_modules/jszip/lib/zipEntry.js");
+var utf8 = __webpack_require__(/*! ./utf8 */ "./node_modules/jszip/lib/utf8.js");
+var support = __webpack_require__(/*! ./support */ "./node_modules/jszip/lib/support.js");
+//  class ZipEntries {{{
+/**
+ * All the entries in the zip file.
+ * @constructor
+ * @param {Object} loadOptions Options for loading the stream.
+ */
+function ZipEntries(loadOptions) {
+    this.files = [];
+    this.loadOptions = loadOptions;
+}
+ZipEntries.prototype = {
+    /**
+     * Check that the reader is on the specified signature.
+     * @param {string} expectedSignature the expected signature.
+     * @throws {Error} if it is an other signature.
+     */
+    checkSignature: function(expectedSignature) {
+        if (!this.reader.readAndCheckSignature(expectedSignature)) {
+            this.reader.index -= 4;
+            var signature = this.reader.readString(4);
+            throw new Error("Corrupted zip or bug: unexpected signature " + "(" + utils.pretty(signature) + ", expected " + utils.pretty(expectedSignature) + ")");
+        }
+    },
+    /**
+     * Check if the given signature is at the given index.
+     * @param {number} askedIndex the index to check.
+     * @param {string} expectedSignature the signature to expect.
+     * @return {boolean} true if the signature is here, false otherwise.
+     */
+    isSignature: function(askedIndex, expectedSignature) {
+        var currentIndex = this.reader.index;
+        this.reader.setIndex(askedIndex);
+        var signature = this.reader.readString(4);
+        var result = signature === expectedSignature;
+        this.reader.setIndex(currentIndex);
+        return result;
+    },
+    /**
+     * Read the end of the central directory.
+     */
+    readBlockEndOfCentral: function() {
+        this.diskNumber = this.reader.readInt(2);
+        this.diskWithCentralDirStart = this.reader.readInt(2);
+        this.centralDirRecordsOnThisDisk = this.reader.readInt(2);
+        this.centralDirRecords = this.reader.readInt(2);
+        this.centralDirSize = this.reader.readInt(4);
+        this.centralDirOffset = this.reader.readInt(4);
+
+        this.zipCommentLength = this.reader.readInt(2);
+        // warning : the encoding depends of the system locale
+        // On a linux machine with LANG=en_US.utf8, this field is utf8 encoded.
+        // On a windows machine, this field is encoded with the localized windows code page.
+        var zipComment = this.reader.readData(this.zipCommentLength);
+        var decodeParamType = support.uint8array ? "uint8array" : "array";
+        // To get consistent behavior with the generation part, we will assume that
+        // this is utf8 encoded unless specified otherwise.
+        var decodeContent = utils.transformTo(decodeParamType, zipComment);
+        this.zipComment = this.loadOptions.decodeFileName(decodeContent);
+    },
+    /**
+     * Read the end of the Zip 64 central directory.
+     * Not merged with the method readEndOfCentral :
+     * The end of central can coexist with its Zip64 brother,
+     * I don't want to read the wrong number of bytes !
+     */
+    readBlockZip64EndOfCentral: function() {
+        this.zip64EndOfCentralSize = this.reader.readInt(8);
+        this.reader.skip(4);
+        // this.versionMadeBy = this.reader.readString(2);
+        // this.versionNeeded = this.reader.readInt(2);
+        this.diskNumber = this.reader.readInt(4);
+        this.diskWithCentralDirStart = this.reader.readInt(4);
+        this.centralDirRecordsOnThisDisk = this.reader.readInt(8);
+        this.centralDirRecords = this.reader.readInt(8);
+        this.centralDirSize = this.reader.readInt(8);
+        this.centralDirOffset = this.reader.readInt(8);
+
+        this.zip64ExtensibleData = {};
+        var extraDataSize = this.zip64EndOfCentralSize - 44,
+            index = 0,
+            extraFieldId,
+            extraFieldLength,
+            extraFieldValue;
+        while (index < extraDataSize) {
+            extraFieldId = this.reader.readInt(2);
+            extraFieldLength = this.reader.readInt(4);
+            extraFieldValue = this.reader.readData(extraFieldLength);
+            this.zip64ExtensibleData[extraFieldId] = {
+                id: extraFieldId,
+                length: extraFieldLength,
+                value: extraFieldValue
+            };
+        }
+    },
+    /**
+     * Read the end of the Zip 64 central directory locator.
+     */
+    readBlockZip64EndOfCentralLocator: function() {
+        this.diskWithZip64CentralDirStart = this.reader.readInt(4);
+        this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8);
+        this.disksCount = this.reader.readInt(4);
+        if (this.disksCount > 1) {
+            throw new Error("Multi-volumes zip are not supported");
+        }
+    },
+    /**
+     * Read the local files, based on the offset read in the central part.
+     */
+    readLocalFiles: function() {
+        var i, file;
+        for (i = 0; i < this.files.length; i++) {
+            file = this.files[i];
+            this.reader.setIndex(file.localHeaderOffset);
+            this.checkSignature(sig.LOCAL_FILE_HEADER);
+            file.readLocalPart(this.reader);
+            file.handleUTF8();
+            file.processAttributes();
+        }
+    },
+    /**
+     * Read the central directory.
+     */
+    readCentralDir: function() {
+        var file;
+
+        this.reader.setIndex(this.centralDirOffset);
+        while (this.reader.readAndCheckSignature(sig.CENTRAL_FILE_HEADER)) {
+            file = new ZipEntry({
+                zip64: this.zip64
+            }, this.loadOptions);
+            file.readCentralPart(this.reader);
+            this.files.push(file);
+        }
+
+        if (this.centralDirRecords !== this.files.length) {
+            if (this.centralDirRecords !== 0 && this.files.length === 0) {
+                // We expected some records but couldn't find ANY.
+                // This is really suspicious, as if something went wrong.
+                throw new Error("Corrupted zip or bug: expected " + this.centralDirRecords + " records in central dir, got " + this.files.length);
+            } else {
+                // We found some records but not all.
+                // Something is wrong but we got something for the user: no error here.
+                // console.warn("expected", this.centralDirRecords, "records in central dir, got", this.files.length);
+            }
+        }
+    },
+    /**
+     * Read the end of central directory.
+     */
+    readEndOfCentral: function() {
+        var offset = this.reader.lastIndexOfSignature(sig.CENTRAL_DIRECTORY_END);
+        if (offset < 0) {
+            // Check if the content is a truncated zip or complete garbage.
+            // A "LOCAL_FILE_HEADER" is not required at the beginning (auto
+            // extractible zip for example) but it can give a good hint.
+            // If an ajax request was used without responseType, we will also
+            // get unreadable data.
+            var isGarbage = !this.isSignature(0, sig.LOCAL_FILE_HEADER);
+
+            if (isGarbage) {
+                throw new Error("Can't find end of central directory : is this a zip file ? " +
+                                "If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");
+            } else {
+                throw new Error("Corrupted zip: can't find end of central directory");
+            }
+
+        }
+        this.reader.setIndex(offset);
+        var endOfCentralDirOffset = offset;
+        this.checkSignature(sig.CENTRAL_DIRECTORY_END);
+        this.readBlockEndOfCentral();
+
+
+        /* extract from the zip spec :
+            4)  If one of the fields in the end of central directory
+                record is too small to hold required data, the field
+                should be set to -1 (0xFFFF or 0xFFFFFFFF) and the
+                ZIP64 format record should be created.
+            5)  The end of central directory record and the
+                Zip64 end of central directory locator record must
+                reside on the same disk when splitting or spanning
+                an archive.
+         */
+        if (this.diskNumber === utils.MAX_VALUE_16BITS || this.diskWithCentralDirStart === utils.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === utils.MAX_VALUE_16BITS || this.centralDirRecords === utils.MAX_VALUE_16BITS || this.centralDirSize === utils.MAX_VALUE_32BITS || this.centralDirOffset === utils.MAX_VALUE_32BITS) {
+            this.zip64 = true;
+
+            /*
+            Warning : the zip64 extension is supported, but ONLY if the 64bits integer read from
+            the zip file can fit into a 32bits integer. This cannot be solved : JavaScript represents
+            all numbers as 64-bit double precision IEEE 754 floating point numbers.
+            So, we have 53bits for integers and bitwise operations treat everything as 32bits.
+            see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/Bitwise_Operators
+            and http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf section 8.5
+            */
+
+            // should look for a zip64 EOCD locator
+            offset = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR);
+            if (offset < 0) {
+                throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");
+            }
+            this.reader.setIndex(offset);
+            this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR);
+            this.readBlockZip64EndOfCentralLocator();
+
+            // now the zip64 EOCD record
+            if (!this.isSignature(this.relativeOffsetEndOfZip64CentralDir, sig.ZIP64_CENTRAL_DIRECTORY_END)) {
+                // console.warn("ZIP64 end of central directory not where expected.");
+                this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_END);
+                if (this.relativeOffsetEndOfZip64CentralDir < 0) {
+                    throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");
+                }
+            }
+            this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir);
+            this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_END);
+            this.readBlockZip64EndOfCentral();
+        }
+
+        var expectedEndOfCentralDirOffset = this.centralDirOffset + this.centralDirSize;
+        if (this.zip64) {
+            expectedEndOfCentralDirOffset += 20; // end of central dir 64 locator
+            expectedEndOfCentralDirOffset += 12 /* should not include the leading 12 bytes */ + this.zip64EndOfCentralSize;
+        }
+
+        var extraBytes = endOfCentralDirOffset - expectedEndOfCentralDirOffset;
+
+        if (extraBytes > 0) {
+            // console.warn(extraBytes, "extra bytes at beginning or within zipfile");
+            if (this.isSignature(endOfCentralDirOffset, sig.CENTRAL_FILE_HEADER)) {
+                // The offsets seem wrong, but we have something at the specified offset.
+                // So… we keep it.
+            } else {
+                // the offset is wrong, update the "zero" of the reader
+                // this happens if data has been prepended (crx files for example)
+                this.reader.zero = extraBytes;
+            }
+        } else if (extraBytes < 0) {
+            throw new Error("Corrupted zip: missing " + Math.abs(extraBytes) + " bytes.");
+        }
+    },
+    prepareReader: function(data) {
+        this.reader = readerFor(data);
+    },
+    /**
+     * Read a zip file and create ZipEntries.
+     * @param {String|ArrayBuffer|Uint8Array|Buffer} data the binary string representing a zip file.
+     */
+    load: function(data) {
+        this.prepareReader(data);
+        this.readEndOfCentral();
+        this.readCentralDir();
+        this.readLocalFiles();
+    }
+};
+// }}} end of ZipEntries
+module.exports = ZipEntries;
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/zipEntry.js":
+/*!********************************************!*\
+  !*** ./node_modules/jszip/lib/zipEntry.js ***!
+  \********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var readerFor = __webpack_require__(/*! ./reader/readerFor */ "./node_modules/jszip/lib/reader/readerFor.js");
+var utils = __webpack_require__(/*! ./utils */ "./node_modules/jszip/lib/utils.js");
+var CompressedObject = __webpack_require__(/*! ./compressedObject */ "./node_modules/jszip/lib/compressedObject.js");
+var crc32fn = __webpack_require__(/*! ./crc32 */ "./node_modules/jszip/lib/crc32.js");
+var utf8 = __webpack_require__(/*! ./utf8 */ "./node_modules/jszip/lib/utf8.js");
+var compressions = __webpack_require__(/*! ./compressions */ "./node_modules/jszip/lib/compressions.js");
+var support = __webpack_require__(/*! ./support */ "./node_modules/jszip/lib/support.js");
+
+var MADE_BY_DOS = 0x00;
+var MADE_BY_UNIX = 0x03;
+
+/**
+ * Find a compression registered in JSZip.
+ * @param {string} compressionMethod the method magic to find.
+ * @return {Object|null} the JSZip compression object, null if none found.
+ */
+var findCompression = function(compressionMethod) {
+    for (var method in compressions) {
+        if (!compressions.hasOwnProperty(method)) {
+            continue;
+        }
+        if (compressions[method].magic === compressionMethod) {
+            return compressions[method];
+        }
+    }
+    return null;
+};
+
+// class ZipEntry {{{
+/**
+ * An entry in the zip file.
+ * @constructor
+ * @param {Object} options Options of the current file.
+ * @param {Object} loadOptions Options for loading the stream.
+ */
+function ZipEntry(options, loadOptions) {
+    this.options = options;
+    this.loadOptions = loadOptions;
+}
+ZipEntry.prototype = {
+    /**
+     * say if the file is encrypted.
+     * @return {boolean} true if the file is encrypted, false otherwise.
+     */
+    isEncrypted: function() {
+        // bit 1 is set
+        return (this.bitFlag & 0x0001) === 0x0001;
+    },
+    /**
+     * say if the file has utf-8 filename/comment.
+     * @return {boolean} true if the filename/comment is in utf-8, false otherwise.
+     */
+    useUTF8: function() {
+        // bit 11 is set
+        return (this.bitFlag & 0x0800) === 0x0800;
+    },
+    /**
+     * Read the local part of a zip file and add the info in this object.
+     * @param {DataReader} reader the reader to use.
+     */
+    readLocalPart: function(reader) {
+        var compression, localExtraFieldsLength;
+
+        // we already know everything from the central dir !
+        // If the central dir data are false, we are doomed.
+        // On the bright side, the local part is scary  : zip64, data descriptors, both, etc.
+        // The less data we get here, the more reliable this should be.
+        // Let's skip the whole header and dash to the data !
+        reader.skip(22);
+        // in some zip created on windows, the filename stored in the central dir contains \ instead of /.
+        // Strangely, the filename here is OK.
+        // I would love to treat these zip files as corrupted (see http://www.info-zip.org/FAQ.html#backslashes
+        // or APPNOTE#4.4.17.1, "All slashes MUST be forward slashes '/'") but there are a lot of bad zip generators...
+        // Search "unzip mismatching "local" filename continuing with "central" filename version" on
+        // the internet.
+        //
+        // I think I see the logic here : the central directory is used to display
+        // content and the local directory is used to extract the files. Mixing / and \
+        // may be used to display \ to windows users and use / when extracting the files.
+        // Unfortunately, this lead also to some issues : http://seclists.org/fulldisclosure/2009/Sep/394
+        this.fileNameLength = reader.readInt(2);
+        localExtraFieldsLength = reader.readInt(2); // can't be sure this will be the same as the central dir
+        // the fileName is stored as binary data, the handleUTF8 method will take care of the encoding.
+        this.fileName = reader.readData(this.fileNameLength);
+        reader.skip(localExtraFieldsLength);
+
+        if (this.compressedSize === -1 || this.uncompressedSize === -1) {
+            throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory " + "(compressedSize === -1 || uncompressedSize === -1)");
+        }
+
+        compression = findCompression(this.compressionMethod);
+        if (compression === null) { // no compression found
+            throw new Error("Corrupted zip : compression " + utils.pretty(this.compressionMethod) + " unknown (inner file : " + utils.transformTo("string", this.fileName) + ")");
+        }
+        this.decompressed = new CompressedObject(this.compressedSize, this.uncompressedSize, this.crc32, compression, reader.readData(this.compressedSize));
+    },
+
+    /**
+     * Read the central part of a zip file and add the info in this object.
+     * @param {DataReader} reader the reader to use.
+     */
+    readCentralPart: function(reader) {
+        this.versionMadeBy = reader.readInt(2);
+        reader.skip(2);
+        // this.versionNeeded = reader.readInt(2);
+        this.bitFlag = reader.readInt(2);
+        this.compressionMethod = reader.readString(2);
+        this.date = reader.readDate();
+        this.crc32 = reader.readInt(4);
+        this.compressedSize = reader.readInt(4);
+        this.uncompressedSize = reader.readInt(4);
+        var fileNameLength = reader.readInt(2);
+        this.extraFieldsLength = reader.readInt(2);
+        this.fileCommentLength = reader.readInt(2);
+        this.diskNumberStart = reader.readInt(2);
+        this.internalFileAttributes = reader.readInt(2);
+        this.externalFileAttributes = reader.readInt(4);
+        this.localHeaderOffset = reader.readInt(4);
+
+        if (this.isEncrypted()) {
+            throw new Error("Encrypted zip are not supported");
+        }
+
+        // will be read in the local part, see the comments there
+        reader.skip(fileNameLength);
+        this.readExtraFields(reader);
+        this.parseZIP64ExtraField(reader);
+        this.fileComment = reader.readData(this.fileCommentLength);
+    },
+
+    /**
+     * Parse the external file attributes and get the unix/dos permissions.
+     */
+    processAttributes: function () {
+        this.unixPermissions = null;
+        this.dosPermissions = null;
+        var madeBy = this.versionMadeBy >> 8;
+
+        // Check if we have the DOS directory flag set.
+        // We look for it in the DOS and UNIX permissions
+        // but some unknown platform could set it as a compatibility flag.
+        this.dir = this.externalFileAttributes & 0x0010 ? true : false;
+
+        if(madeBy === MADE_BY_DOS) {
+            // first 6 bits (0 to 5)
+            this.dosPermissions = this.externalFileAttributes & 0x3F;
+        }
+
+        if(madeBy === MADE_BY_UNIX) {
+            this.unixPermissions = (this.externalFileAttributes >> 16) & 0xFFFF;
+            // the octal permissions are in (this.unixPermissions & 0x01FF).toString(8);
+        }
+
+        // fail safe : if the name ends with a / it probably means a folder
+        if (!this.dir && this.fileNameStr.slice(-1) === '/') {
+            this.dir = true;
+        }
+    },
+
+    /**
+     * Parse the ZIP64 extra field and merge the info in the current ZipEntry.
+     * @param {DataReader} reader the reader to use.
+     */
+    parseZIP64ExtraField: function(reader) {
+
+        if (!this.extraFields[0x0001]) {
+            return;
+        }
+
+        // should be something, preparing the extra reader
+        var extraReader = readerFor(this.extraFields[0x0001].value);
+
+        // I really hope that these 64bits integer can fit in 32 bits integer, because js
+        // won't let us have more.
+        if (this.uncompressedSize === utils.MAX_VALUE_32BITS) {
+            this.uncompressedSize = extraReader.readInt(8);
+        }
+        if (this.compressedSize === utils.MAX_VALUE_32BITS) {
+            this.compressedSize = extraReader.readInt(8);
+        }
+        if (this.localHeaderOffset === utils.MAX_VALUE_32BITS) {
+            this.localHeaderOffset = extraReader.readInt(8);
+        }
+        if (this.diskNumberStart === utils.MAX_VALUE_32BITS) {
+            this.diskNumberStart = extraReader.readInt(4);
+        }
+    },
+    /**
+     * Read the central part of a zip file and add the info in this object.
+     * @param {DataReader} reader the reader to use.
+     */
+    readExtraFields: function(reader) {
+        var end = reader.index + this.extraFieldsLength,
+            extraFieldId,
+            extraFieldLength,
+            extraFieldValue;
+
+        if (!this.extraFields) {
+            this.extraFields = {};
+        }
+
+        while (reader.index < end) {
+            extraFieldId = reader.readInt(2);
+            extraFieldLength = reader.readInt(2);
+            extraFieldValue = reader.readData(extraFieldLength);
+
+            this.extraFields[extraFieldId] = {
+                id: extraFieldId,
+                length: extraFieldLength,
+                value: extraFieldValue
+            };
+        }
+    },
+    /**
+     * Apply an UTF8 transformation if needed.
+     */
+    handleUTF8: function() {
+        var decodeParamType = support.uint8array ? "uint8array" : "array";
+        if (this.useUTF8()) {
+            this.fileNameStr = utf8.utf8decode(this.fileName);
+            this.fileCommentStr = utf8.utf8decode(this.fileComment);
+        } else {
+            var upath = this.findExtraFieldUnicodePath();
+            if (upath !== null) {
+                this.fileNameStr = upath;
+            } else {
+                // ASCII text or unsupported code page
+                var fileNameByteArray =  utils.transformTo(decodeParamType, this.fileName);
+                this.fileNameStr = this.loadOptions.decodeFileName(fileNameByteArray);
+            }
+
+            var ucomment = this.findExtraFieldUnicodeComment();
+            if (ucomment !== null) {
+                this.fileCommentStr = ucomment;
+            } else {
+                // ASCII text or unsupported code page
+                var commentByteArray =  utils.transformTo(decodeParamType, this.fileComment);
+                this.fileCommentStr = this.loadOptions.decodeFileName(commentByteArray);
+            }
+        }
+    },
+
+    /**
+     * Find the unicode path declared in the extra field, if any.
+     * @return {String} the unicode path, null otherwise.
+     */
+    findExtraFieldUnicodePath: function() {
+        var upathField = this.extraFields[0x7075];
+        if (upathField) {
+            var extraReader = readerFor(upathField.value);
+
+            // wrong version
+            if (extraReader.readInt(1) !== 1) {
+                return null;
+            }
+
+            // the crc of the filename changed, this field is out of date.
+            if (crc32fn(this.fileName) !== extraReader.readInt(4)) {
+                return null;
+            }
+
+            return utf8.utf8decode(extraReader.readData(upathField.length - 5));
+        }
+        return null;
+    },
+
+    /**
+     * Find the unicode comment declared in the extra field, if any.
+     * @return {String} the unicode comment, null otherwise.
+     */
+    findExtraFieldUnicodeComment: function() {
+        var ucommentField = this.extraFields[0x6375];
+        if (ucommentField) {
+            var extraReader = readerFor(ucommentField.value);
+
+            // wrong version
+            if (extraReader.readInt(1) !== 1) {
+                return null;
+            }
+
+            // the crc of the comment changed, this field is out of date.
+            if (crc32fn(this.fileComment) !== extraReader.readInt(4)) {
+                return null;
+            }
+
+            return utf8.utf8decode(extraReader.readData(ucommentField.length - 5));
+        }
+        return null;
+    }
+};
+module.exports = ZipEntry;
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/lib/zipObject.js":
+/*!*********************************************!*\
+  !*** ./node_modules/jszip/lib/zipObject.js ***!
+  \*********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var StreamHelper = __webpack_require__(/*! ./stream/StreamHelper */ "./node_modules/jszip/lib/stream/StreamHelper.js");
+var DataWorker = __webpack_require__(/*! ./stream/DataWorker */ "./node_modules/jszip/lib/stream/DataWorker.js");
+var utf8 = __webpack_require__(/*! ./utf8 */ "./node_modules/jszip/lib/utf8.js");
+var CompressedObject = __webpack_require__(/*! ./compressedObject */ "./node_modules/jszip/lib/compressedObject.js");
+var GenericWorker = __webpack_require__(/*! ./stream/GenericWorker */ "./node_modules/jszip/lib/stream/GenericWorker.js");
+
+/**
+ * A simple object representing a file in the zip file.
+ * @constructor
+ * @param {string} name the name of the file
+ * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data
+ * @param {Object} options the options of the file
+ */
+var ZipObject = function(name, data, options) {
+    this.name = name;
+    this.dir = options.dir;
+    this.date = options.date;
+    this.comment = options.comment;
+    this.unixPermissions = options.unixPermissions;
+    this.dosPermissions = options.dosPermissions;
+
+    this._data = data;
+    this._dataBinary = options.binary;
+    // keep only the compression
+    this.options = {
+        compression : options.compression,
+        compressionOptions : options.compressionOptions
+    };
+};
+
+ZipObject.prototype = {
+    /**
+     * Create an internal stream for the content of this object.
+     * @param {String} type the type of each chunk.
+     * @return StreamHelper the stream.
+     */
+    internalStream: function (type) {
+        var result = null, outputType = "string";
+        try {
+            if (!type) {
+                throw new Error("No output type specified.");
+            }
+            outputType = type.toLowerCase();
+            var askUnicodeString = outputType === "string" || outputType === "text";
+            if (outputType === "binarystring" || outputType === "text") {
+                outputType = "string";
+            }
+            result = this._decompressWorker();
+
+            var isUnicodeString = !this._dataBinary;
+
+            if (isUnicodeString && !askUnicodeString) {
+                result = result.pipe(new utf8.Utf8EncodeWorker());
+            }
+            if (!isUnicodeString && askUnicodeString) {
+                result = result.pipe(new utf8.Utf8DecodeWorker());
+            }
+        } catch (e) {
+            result = new GenericWorker("error");
+            result.error(e);
+        }
+
+        return new StreamHelper(result, outputType, "");
+    },
+
+    /**
+     * Prepare the content in the asked type.
+     * @param {String} type the type of the result.
+     * @param {Function} onUpdate a function to call on each internal update.
+     * @return Promise the promise of the result.
+     */
+    async: function (type, onUpdate) {
+        return this.internalStream(type).accumulate(onUpdate);
+    },
+
+    /**
+     * Prepare the content as a nodejs stream.
+     * @param {String} type the type of each chunk.
+     * @param {Function} onUpdate a function to call on each internal update.
+     * @return Stream the stream.
+     */
+    nodeStream: function (type, onUpdate) {
+        return this.internalStream(type || "nodebuffer").toNodejsStream(onUpdate);
+    },
+
+    /**
+     * Return a worker for the compressed content.
+     * @private
+     * @param {Object} compression the compression object to use.
+     * @param {Object} compressionOptions the options to use when compressing.
+     * @return Worker the worker.
+     */
+    _compressWorker: function (compression, compressionOptions) {
+        if (
+            this._data instanceof CompressedObject &&
+            this._data.compression.magic === compression.magic
+        ) {
+            return this._data.getCompressedWorker();
+        } else {
+            var result = this._decompressWorker();
+            if(!this._dataBinary) {
+                result = result.pipe(new utf8.Utf8EncodeWorker());
+            }
+            return CompressedObject.createWorkerFrom(result, compression, compressionOptions);
+        }
+    },
+    /**
+     * Return a worker for the decompressed content.
+     * @private
+     * @return Worker the worker.
+     */
+    _decompressWorker : function () {
+        if (this._data instanceof CompressedObject) {
+            return this._data.getContentWorker();
+        } else if (this._data instanceof GenericWorker) {
+            return this._data;
+        } else {
+            return new DataWorker(this._data);
+        }
+    }
+};
+
+var removedMethods = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"];
+var removedFn = function () {
+    throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
+};
+
+for(var i = 0; i < removedMethods.length; i++) {
+    ZipObject.prototype[removedMethods[i]] = removedFn;
+}
+module.exports = ZipObject;
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/core-js/library/fn/set-immediate.js":
+/*!*****************************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/core-js/library/fn/set-immediate.js ***!
+  \*****************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+__webpack_require__(/*! ../modules/web.immediate */ "./node_modules/jszip/node_modules/core-js/library/modules/web.immediate.js");
+module.exports = __webpack_require__(/*! ../modules/_core */ "./node_modules/jszip/node_modules/core-js/library/modules/_core.js").setImmediate;
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/core-js/library/modules/_a-function.js":
+/*!********************************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/core-js/library/modules/_a-function.js ***!
+  \********************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+module.exports = function(it){
+  if(typeof it != 'function')throw TypeError(it + ' is not a function!');
+  return it;
+};
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/core-js/library/modules/_an-object.js":
+/*!*******************************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/core-js/library/modules/_an-object.js ***!
+  \*******************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/jszip/node_modules/core-js/library/modules/_is-object.js");
+module.exports = function(it){
+  if(!isObject(it))throw TypeError(it + ' is not an object!');
+  return it;
+};
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/core-js/library/modules/_cof.js":
+/*!*************************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/core-js/library/modules/_cof.js ***!
+  \*************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+var toString = {}.toString;
+
+module.exports = function(it){
+  return toString.call(it).slice(8, -1);
+};
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/core-js/library/modules/_core.js":
+/*!**************************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/core-js/library/modules/_core.js ***!
+  \**************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+var core = module.exports = {version: '2.3.0'};
+if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/core-js/library/modules/_ctx.js":
+/*!*************************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/core-js/library/modules/_ctx.js ***!
+  \*************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+// optional / simple context binding
+var aFunction = __webpack_require__(/*! ./_a-function */ "./node_modules/jszip/node_modules/core-js/library/modules/_a-function.js");
+module.exports = function(fn, that, length){
+  aFunction(fn);
+  if(that === undefined)return fn;
+  switch(length){
+    case 1: return function(a){
+      return fn.call(that, a);
+    };
+    case 2: return function(a, b){
+      return fn.call(that, a, b);
+    };
+    case 3: return function(a, b, c){
+      return fn.call(that, a, b, c);
+    };
+  }
+  return function(/* ...args */){
+    return fn.apply(that, arguments);
+  };
+};
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/core-js/library/modules/_descriptors.js":
+/*!*********************************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/core-js/library/modules/_descriptors.js ***!
+  \*********************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+// Thank's IE8 for his funny defineProperty
+module.exports = !__webpack_require__(/*! ./_fails */ "./node_modules/jszip/node_modules/core-js/library/modules/_fails.js")(function(){
+  return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
+});
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/core-js/library/modules/_dom-create.js":
+/*!********************************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/core-js/library/modules/_dom-create.js ***!
+  \********************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/jszip/node_modules/core-js/library/modules/_is-object.js")
+  , document = __webpack_require__(/*! ./_global */ "./node_modules/jszip/node_modules/core-js/library/modules/_global.js").document
+  // in old IE typeof document.createElement is 'object'
+  , is = isObject(document) && isObject(document.createElement);
+module.exports = function(it){
+  return is ? document.createElement(it) : {};
+};
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/core-js/library/modules/_export.js":
+/*!****************************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/core-js/library/modules/_export.js ***!
+  \****************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+var global    = __webpack_require__(/*! ./_global */ "./node_modules/jszip/node_modules/core-js/library/modules/_global.js")
+  , core      = __webpack_require__(/*! ./_core */ "./node_modules/jszip/node_modules/core-js/library/modules/_core.js")
+  , ctx       = __webpack_require__(/*! ./_ctx */ "./node_modules/jszip/node_modules/core-js/library/modules/_ctx.js")
+  , hide      = __webpack_require__(/*! ./_hide */ "./node_modules/jszip/node_modules/core-js/library/modules/_hide.js")
+  , PROTOTYPE = 'prototype';
+
+var $export = function(type, name, source){
+  var IS_FORCED = type & $export.F
+    , IS_GLOBAL = type & $export.G
+    , IS_STATIC = type & $export.S
+    , IS_PROTO  = type & $export.P
+    , IS_BIND   = type & $export.B
+    , IS_WRAP   = type & $export.W
+    , exports   = IS_GLOBAL ? core : core[name] || (core[name] = {})
+    , expProto  = exports[PROTOTYPE]
+    , target    = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
+    , key, own, out;
+  if(IS_GLOBAL)source = name;
+  for(key in source){
+    // contains in native
+    own = !IS_FORCED && target && target[key] !== undefined;
+    if(own && key in exports)continue;
+    // export native or passed
+    out = own ? target[key] : source[key];
+    // prevent global pollution for namespaces
+    exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
+    // bind timers to global for call from export context
+    : IS_BIND && own ? ctx(out, global)
+    // wrap global constructors for prevent change them in library
+    : IS_WRAP && target[key] == out ? (function(C){
+      var F = function(a, b, c){
+        if(this instanceof C){
+          switch(arguments.length){
+            case 0: return new C;
+            case 1: return new C(a);
+            case 2: return new C(a, b);
+          } return new C(a, b, c);
+        } return C.apply(this, arguments);
+      };
+      F[PROTOTYPE] = C[PROTOTYPE];
+      return F;
+    // make static versions for prototype methods
+    })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
+    // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
+    if(IS_PROTO){
+      (exports.virtual || (exports.virtual = {}))[key] = out;
+      // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
+      if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);
+    }
+  }
+};
+// type bitmap
+$export.F = 1;   // forced
+$export.G = 2;   // global
+$export.S = 4;   // static
+$export.P = 8;   // proto
+$export.B = 16;  // bind
+$export.W = 32;  // wrap
+$export.U = 64;  // safe
+$export.R = 128; // real proto method for `library` 
+module.exports = $export;
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/core-js/library/modules/_fails.js":
+/*!***************************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/core-js/library/modules/_fails.js ***!
+  \***************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+module.exports = function(exec){
+  try {
+    return !!exec();
+  } catch(e){
+    return true;
+  }
+};
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/core-js/library/modules/_global.js":
+/*!****************************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/core-js/library/modules/_global.js ***!
+  \****************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
+var global = module.exports = typeof window != 'undefined' && window.Math == Math
+  ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
+if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/core-js/library/modules/_hide.js":
+/*!**************************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/core-js/library/modules/_hide.js ***!
+  \**************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+var dP         = __webpack_require__(/*! ./_object-dp */ "./node_modules/jszip/node_modules/core-js/library/modules/_object-dp.js")
+  , createDesc = __webpack_require__(/*! ./_property-desc */ "./node_modules/jszip/node_modules/core-js/library/modules/_property-desc.js");
+module.exports = __webpack_require__(/*! ./_descriptors */ "./node_modules/jszip/node_modules/core-js/library/modules/_descriptors.js") ? function(object, key, value){
+  return dP.f(object, key, createDesc(1, value));
+} : function(object, key, value){
+  object[key] = value;
+  return object;
+};
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/core-js/library/modules/_html.js":
+/*!**************************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/core-js/library/modules/_html.js ***!
+  \**************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = __webpack_require__(/*! ./_global */ "./node_modules/jszip/node_modules/core-js/library/modules/_global.js").document && document.documentElement;
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/core-js/library/modules/_ie8-dom-define.js":
+/*!************************************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/core-js/library/modules/_ie8-dom-define.js ***!
+  \************************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = !__webpack_require__(/*! ./_descriptors */ "./node_modules/jszip/node_modules/core-js/library/modules/_descriptors.js") && !__webpack_require__(/*! ./_fails */ "./node_modules/jszip/node_modules/core-js/library/modules/_fails.js")(function(){
+  return Object.defineProperty(__webpack_require__(/*! ./_dom-create */ "./node_modules/jszip/node_modules/core-js/library/modules/_dom-create.js")('div'), 'a', {get: function(){ return 7; }}).a != 7;
+});
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/core-js/library/modules/_invoke.js":
+/*!****************************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/core-js/library/modules/_invoke.js ***!
+  \****************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+// fast apply, http://jsperf.lnkit.com/fast-apply/5
+module.exports = function(fn, args, that){
+  var un = that === undefined;
+  switch(args.length){
+    case 0: return un ? fn()
+                      : fn.call(that);
+    case 1: return un ? fn(args[0])
+                      : fn.call(that, args[0]);
+    case 2: return un ? fn(args[0], args[1])
+                      : fn.call(that, args[0], args[1]);
+    case 3: return un ? fn(args[0], args[1], args[2])
+                      : fn.call(that, args[0], args[1], args[2]);
+    case 4: return un ? fn(args[0], args[1], args[2], args[3])
+                      : fn.call(that, args[0], args[1], args[2], args[3]);
+  } return              fn.apply(that, args);
+};
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/core-js/library/modules/_is-object.js":
+/*!*******************************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/core-js/library/modules/_is-object.js ***!
+  \*******************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+module.exports = function(it){
+  return typeof it === 'object' ? it !== null : typeof it === 'function';
+};
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/core-js/library/modules/_object-dp.js":
+/*!*******************************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/core-js/library/modules/_object-dp.js ***!
+  \*******************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+var anObject       = __webpack_require__(/*! ./_an-object */ "./node_modules/jszip/node_modules/core-js/library/modules/_an-object.js")
+  , IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ "./node_modules/jszip/node_modules/core-js/library/modules/_ie8-dom-define.js")
+  , toPrimitive    = __webpack_require__(/*! ./_to-primitive */ "./node_modules/jszip/node_modules/core-js/library/modules/_to-primitive.js")
+  , dP             = Object.defineProperty;
+
+exports.f = __webpack_require__(/*! ./_descriptors */ "./node_modules/jszip/node_modules/core-js/library/modules/_descriptors.js") ? Object.defineProperty : function defineProperty(O, P, Attributes){
+  anObject(O);
+  P = toPrimitive(P, true);
+  anObject(Attributes);
+  if(IE8_DOM_DEFINE)try {
+    return dP(O, P, Attributes);
+  } catch(e){ /* empty */ }
+  if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
+  if('value' in Attributes)O[P] = Attributes.value;
+  return O;
+};
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/core-js/library/modules/_property-desc.js":
+/*!***********************************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/core-js/library/modules/_property-desc.js ***!
+  \***********************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+module.exports = function(bitmap, value){
+  return {
+    enumerable  : !(bitmap & 1),
+    configurable: !(bitmap & 2),
+    writable    : !(bitmap & 4),
+    value       : value
+  };
+};
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/core-js/library/modules/_task.js":
+/*!**************************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/core-js/library/modules/_task.js ***!
+  \**************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+var ctx                = __webpack_require__(/*! ./_ctx */ "./node_modules/jszip/node_modules/core-js/library/modules/_ctx.js")
+  , invoke             = __webpack_require__(/*! ./_invoke */ "./node_modules/jszip/node_modules/core-js/library/modules/_invoke.js")
+  , html               = __webpack_require__(/*! ./_html */ "./node_modules/jszip/node_modules/core-js/library/modules/_html.js")
+  , cel                = __webpack_require__(/*! ./_dom-create */ "./node_modules/jszip/node_modules/core-js/library/modules/_dom-create.js")
+  , global             = __webpack_require__(/*! ./_global */ "./node_modules/jszip/node_modules/core-js/library/modules/_global.js")
+  , process            = global.process
+  , setTask            = global.setImmediate
+  , clearTask          = global.clearImmediate
+  , MessageChannel     = global.MessageChannel
+  , counter            = 0
+  , queue              = {}
+  , ONREADYSTATECHANGE = 'onreadystatechange'
+  , defer, channel, port;
+var run = function(){
+  var id = +this;
+  if(queue.hasOwnProperty(id)){
+    var fn = queue[id];
+    delete queue[id];
+    fn();
+  }
+};
+var listener = function(event){
+  run.call(event.data);
+};
+// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
+if(!setTask || !clearTask){
+  setTask = function setImmediate(fn){
+    var args = [], i = 1;
+    while(arguments.length > i)args.push(arguments[i++]);
+    queue[++counter] = function(){
+      invoke(typeof fn == 'function' ? fn : Function(fn), args);
+    };
+    defer(counter);
+    return counter;
+  };
+  clearTask = function clearImmediate(id){
+    delete queue[id];
+  };
+  // Node.js 0.8-
+  if(__webpack_require__(/*! ./_cof */ "./node_modules/jszip/node_modules/core-js/library/modules/_cof.js")(process) == 'process'){
+    defer = function(id){
+      process.nextTick(ctx(run, id, 1));
+    };
+  // Browsers with MessageChannel, includes WebWorkers
+  } else if(MessageChannel){
+    channel = new MessageChannel;
+    port    = channel.port2;
+    channel.port1.onmessage = listener;
+    defer = ctx(port.postMessage, port, 1);
+  // Browsers with postMessage, skip WebWorkers
+  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
+  } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){
+    defer = function(id){
+      global.postMessage(id + '', '*');
+    };
+    global.addEventListener('message', listener, false);
+  // IE8-
+  } else if(ONREADYSTATECHANGE in cel('script')){
+    defer = function(id){
+      html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){
+        html.removeChild(this);
+        run.call(id);
+      };
+    };
+  // Rest old browsers
+  } else {
+    defer = function(id){
+      setTimeout(ctx(run, id, 1), 0);
+    };
+  }
+}
+module.exports = {
+  set:   setTask,
+  clear: clearTask
+};
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/core-js/library/modules/_to-primitive.js":
+/*!**********************************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/core-js/library/modules/_to-primitive.js ***!
+  \**********************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+// 7.1.1 ToPrimitive(input [, PreferredType])
+var isObject = __webpack_require__(/*! ./_is-object */ "./node_modules/jszip/node_modules/core-js/library/modules/_is-object.js");
+// instead of the ES6 spec version, we didn't implement @@toPrimitive case
+// and the second argument - flag - preferred type is a string
+module.exports = function(it, S){
+  if(!isObject(it))return it;
+  var fn, val;
+  if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
+  if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
+  if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
+  throw TypeError("Can't convert object to primitive value");
+};
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/core-js/library/modules/web.immediate.js":
+/*!**********************************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/core-js/library/modules/web.immediate.js ***!
+  \**********************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+var $export = __webpack_require__(/*! ./_export */ "./node_modules/jszip/node_modules/core-js/library/modules/_export.js")
+  , $task   = __webpack_require__(/*! ./_task */ "./node_modules/jszip/node_modules/core-js/library/modules/_task.js");
+$export($export.G + $export.B, {
+  setImmediate:   $task.set,
+  clearImmediate: $task.clear
+});
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/immediate/lib/browser.js":
+/*!******************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/immediate/lib/browser.js ***!
+  \******************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(global) {
+var Mutation = global.MutationObserver || global.WebKitMutationObserver;
+
+var scheduleDrain;
+
+{
+  if (Mutation) {
+    var called = 0;
+    var observer = new Mutation(nextTick);
+    var element = global.document.createTextNode('');
+    observer.observe(element, {
+      characterData: true
+    });
+    scheduleDrain = function () {
+      element.data = (called = ++called % 2);
+    };
+  } else if (!global.setImmediate && typeof global.MessageChannel !== 'undefined') {
+    var channel = new global.MessageChannel();
+    channel.port1.onmessage = nextTick;
+    scheduleDrain = function () {
+      channel.port2.postMessage(0);
+    };
+  } else if ('document' in global && 'onreadystatechange' in global.document.createElement('script')) {
+    scheduleDrain = function () {
+
+      // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted
+      // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.
+      var scriptEl = global.document.createElement('script');
+      scriptEl.onreadystatechange = function () {
+        nextTick();
+
+        scriptEl.onreadystatechange = null;
+        scriptEl.parentNode.removeChild(scriptEl);
+        scriptEl = null;
+      };
+      global.document.documentElement.appendChild(scriptEl);
+    };
+  } else {
+    scheduleDrain = function () {
+      setTimeout(nextTick, 0);
+    };
+  }
+}
+
+var draining;
+var queue = [];
+//named nextTick for less confusing stack traces
+function nextTick() {
+  draining = true;
+  var i, oldQueue;
+  var len = queue.length;
+  while (len) {
+    oldQueue = queue;
+    queue = [];
+    i = -1;
+    while (++i < len) {
+      oldQueue[i]();
+    }
+    len = queue.length;
+  }
+  draining = false;
+}
+
+module.exports = immediate;
+function immediate(task) {
+  if (queue.push(task) === 1 && !draining) {
+    scheduleDrain();
+  }
+}
+
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/lie/lib/browser.js":
+/*!************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/lie/lib/browser.js ***!
+  \************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var immediate = __webpack_require__(/*! immediate */ "./node_modules/jszip/node_modules/immediate/lib/browser.js");
+
+/* istanbul ignore next */
+function INTERNAL() {}
+
+var handlers = {};
+
+var REJECTED = ['REJECTED'];
+var FULFILLED = ['FULFILLED'];
+var PENDING = ['PENDING'];
+
+module.exports = Promise;
+
+function Promise(resolver) {
+  if (typeof resolver !== 'function') {
+    throw new TypeError('resolver must be a function');
+  }
+  this.state = PENDING;
+  this.queue = [];
+  this.outcome = void 0;
+  if (resolver !== INTERNAL) {
+    safelyResolveThenable(this, resolver);
+  }
+}
+
+Promise.prototype["catch"] = function (onRejected) {
+  return this.then(null, onRejected);
+};
+Promise.prototype.then = function (onFulfilled, onRejected) {
+  if (typeof onFulfilled !== 'function' && this.state === FULFILLED ||
+    typeof onRejected !== 'function' && this.state === REJECTED) {
+    return this;
+  }
+  var promise = new this.constructor(INTERNAL);
+  if (this.state !== PENDING) {
+    var resolver = this.state === FULFILLED ? onFulfilled : onRejected;
+    unwrap(promise, resolver, this.outcome);
+  } else {
+    this.queue.push(new QueueItem(promise, onFulfilled, onRejected));
+  }
+
+  return promise;
+};
+function QueueItem(promise, onFulfilled, onRejected) {
+  this.promise = promise;
+  if (typeof onFulfilled === 'function') {
+    this.onFulfilled = onFulfilled;
+    this.callFulfilled = this.otherCallFulfilled;
+  }
+  if (typeof onRejected === 'function') {
+    this.onRejected = onRejected;
+    this.callRejected = this.otherCallRejected;
+  }
+}
+QueueItem.prototype.callFulfilled = function (value) {
+  handlers.resolve(this.promise, value);
+};
+QueueItem.prototype.otherCallFulfilled = function (value) {
+  unwrap(this.promise, this.onFulfilled, value);
+};
+QueueItem.prototype.callRejected = function (value) {
+  handlers.reject(this.promise, value);
+};
+QueueItem.prototype.otherCallRejected = function (value) {
+  unwrap(this.promise, this.onRejected, value);
+};
+
+function unwrap(promise, func, value) {
+  immediate(function () {
+    var returnValue;
+    try {
+      returnValue = func(value);
+    } catch (e) {
+      return handlers.reject(promise, e);
+    }
+    if (returnValue === promise) {
+      handlers.reject(promise, new TypeError('Cannot resolve promise with itself'));
+    } else {
+      handlers.resolve(promise, returnValue);
+    }
+  });
+}
+
+handlers.resolve = function (self, value) {
+  var result = tryCatch(getThen, value);
+  if (result.status === 'error') {
+    return handlers.reject(self, result.value);
+  }
+  var thenable = result.value;
+
+  if (thenable) {
+    safelyResolveThenable(self, thenable);
+  } else {
+    self.state = FULFILLED;
+    self.outcome = value;
+    var i = -1;
+    var len = self.queue.length;
+    while (++i < len) {
+      self.queue[i].callFulfilled(value);
+    }
+  }
+  return self;
+};
+handlers.reject = function (self, error) {
+  self.state = REJECTED;
+  self.outcome = error;
+  var i = -1;
+  var len = self.queue.length;
+  while (++i < len) {
+    self.queue[i].callRejected(error);
+  }
+  return self;
+};
+
+function getThen(obj) {
+  // Make sure we only access the accessor once as required by the spec
+  var then = obj && obj.then;
+  if (obj && (typeof obj === 'object' || typeof obj === 'function') && typeof then === 'function') {
+    return function appyThen() {
+      then.apply(obj, arguments);
+    };
+  }
+}
+
+function safelyResolveThenable(self, thenable) {
+  // Either fulfill, reject or reject with error
+  var called = false;
+  function onError(value) {
+    if (called) {
+      return;
+    }
+    called = true;
+    handlers.reject(self, value);
+  }
+
+  function onSuccess(value) {
+    if (called) {
+      return;
+    }
+    called = true;
+    handlers.resolve(self, value);
+  }
+
+  function tryToUnwrap() {
+    thenable(onSuccess, onError);
+  }
+
+  var result = tryCatch(tryToUnwrap);
+  if (result.status === 'error') {
+    onError(result.value);
+  }
+}
+
+function tryCatch(func, value) {
+  var out = {};
+  try {
+    out.value = func(value);
+    out.status = 'success';
+  } catch (e) {
+    out.status = 'error';
+    out.value = e;
+  }
+  return out;
+}
+
+Promise.resolve = resolve;
+function resolve(value) {
+  if (value instanceof this) {
+    return value;
+  }
+  return handlers.resolve(new this(INTERNAL), value);
+}
+
+Promise.reject = reject;
+function reject(reason) {
+  var promise = new this(INTERNAL);
+  return handlers.reject(promise, reason);
+}
+
+Promise.all = all;
+function all(iterable) {
+  var self = this;
+  if (Object.prototype.toString.call(iterable) !== '[object Array]') {
+    return this.reject(new TypeError('must be an array'));
+  }
+
+  var len = iterable.length;
+  var called = false;
+  if (!len) {
+    return this.resolve([]);
+  }
+
+  var values = new Array(len);
+  var resolved = 0;
+  var i = -1;
+  var promise = new this(INTERNAL);
+
+  while (++i < len) {
+    allResolver(iterable[i], i);
+  }
+  return promise;
+  function allResolver(value, i) {
+    self.resolve(value).then(resolveFromAll, function (error) {
+      if (!called) {
+        called = true;
+        handlers.reject(promise, error);
+      }
+    });
+    function resolveFromAll(outValue) {
+      values[i] = outValue;
+      if (++resolved === len && !called) {
+        called = true;
+        handlers.resolve(promise, values);
+      }
+    }
+  }
+}
+
+Promise.race = race;
+function race(iterable) {
+  var self = this;
+  if (Object.prototype.toString.call(iterable) !== '[object Array]') {
+    return this.reject(new TypeError('must be an array'));
+  }
+
+  var len = iterable.length;
+  var called = false;
+  if (!len) {
+    return this.resolve([]);
+  }
+
+  var i = -1;
+  var promise = new this(INTERNAL);
+
+  while (++i < len) {
+    resolver(iterable[i]);
+  }
+  return promise;
+  function resolver(value) {
+    self.resolve(value).then(function (response) {
+      if (!called) {
+        called = true;
+        handlers.resolve(promise, response);
+      }
+    }, function (error) {
+      if (!called) {
+        called = true;
+        handlers.reject(promise, error);
+      }
+    });
+  }
+}
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/pako/index.js":
+/*!*******************************************************!*\
+  !*** ./node_modules/jszip/node_modules/pako/index.js ***!
+  \*******************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+// Top level file is just a mixin of submodules & constants
+
+
+var assign    = __webpack_require__(/*! ./lib/utils/common */ "./node_modules/jszip/node_modules/pako/lib/utils/common.js").assign;
+
+var deflate   = __webpack_require__(/*! ./lib/deflate */ "./node_modules/jszip/node_modules/pako/lib/deflate.js");
+var inflate   = __webpack_require__(/*! ./lib/inflate */ "./node_modules/jszip/node_modules/pako/lib/inflate.js");
+var constants = __webpack_require__(/*! ./lib/zlib/constants */ "./node_modules/jszip/node_modules/pako/lib/zlib/constants.js");
+
+var pako = {};
+
+assign(pako, deflate, inflate, constants);
+
+module.exports = pako;
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/pako/lib/deflate.js":
+/*!*************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/pako/lib/deflate.js ***!
+  \*************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+
+var zlib_deflate = __webpack_require__(/*! ./zlib/deflate */ "./node_modules/jszip/node_modules/pako/lib/zlib/deflate.js");
+var utils        = __webpack_require__(/*! ./utils/common */ "./node_modules/jszip/node_modules/pako/lib/utils/common.js");
+var strings      = __webpack_require__(/*! ./utils/strings */ "./node_modules/jszip/node_modules/pako/lib/utils/strings.js");
+var msg          = __webpack_require__(/*! ./zlib/messages */ "./node_modules/jszip/node_modules/pako/lib/zlib/messages.js");
+var ZStream      = __webpack_require__(/*! ./zlib/zstream */ "./node_modules/jszip/node_modules/pako/lib/zlib/zstream.js");
+
+var toString = Object.prototype.toString;
+
+/* Public constants ==========================================================*/
+/* ===========================================================================*/
+
+var Z_NO_FLUSH      = 0;
+var Z_FINISH        = 4;
+
+var Z_OK            = 0;
+var Z_STREAM_END    = 1;
+var Z_SYNC_FLUSH    = 2;
+
+var Z_DEFAULT_COMPRESSION = -1;
+
+var Z_DEFAULT_STRATEGY    = 0;
+
+var Z_DEFLATED  = 8;
+
+/* ===========================================================================*/
+
+
+/**
+ * class Deflate
+ *
+ * Generic JS-style wrapper for zlib calls. If you don't need
+ * streaming behaviour - use more simple functions: [[deflate]],
+ * [[deflateRaw]] and [[gzip]].
+ **/
+
+/* internal
+ * Deflate.chunks -> Array
+ *
+ * Chunks of output data, if [[Deflate#onData]] not overridden.
+ **/
+
+/**
+ * Deflate.result -> Uint8Array|Array
+ *
+ * Compressed result, generated by default [[Deflate#onData]]
+ * and [[Deflate#onEnd]] handlers. Filled after you push last chunk
+ * (call [[Deflate#push]] with `Z_FINISH` / `true` param)  or if you
+ * push a chunk with explicit flush (call [[Deflate#push]] with
+ * `Z_SYNC_FLUSH` param).
+ **/
+
+/**
+ * Deflate.err -> Number
+ *
+ * Error code after deflate finished. 0 (Z_OK) on success.
+ * You will not need it in real life, because deflate errors
+ * are possible only on wrong options or bad `onData` / `onEnd`
+ * custom handlers.
+ **/
+
+/**
+ * Deflate.msg -> String
+ *
+ * Error message, if [[Deflate.err]] != 0
+ **/
+
+
+/**
+ * new Deflate(options)
+ * - options (Object): zlib deflate options.
+ *
+ * Creates new deflator instance with specified params. Throws exception
+ * on bad params. Supported options:
+ *
+ * - `level`
+ * - `windowBits`
+ * - `memLevel`
+ * - `strategy`
+ * - `dictionary`
+ *
+ * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
+ * for more information on these.
+ *
+ * Additional options, for internal needs:
+ *
+ * - `chunkSize` - size of generated data chunks (16K by default)
+ * - `raw` (Boolean) - do raw deflate
+ * - `gzip` (Boolean) - create gzip wrapper
+ * - `to` (String) - if equal to 'string', then result will be "binary string"
+ *    (each char code [0..255])
+ * - `header` (Object) - custom header for gzip
+ *   - `text` (Boolean) - true if compressed data believed to be text
+ *   - `time` (Number) - modification time, unix timestamp
+ *   - `os` (Number) - operation system code
+ *   - `extra` (Array) - array of bytes with extra data (max 65536)
+ *   - `name` (String) - file name (binary string)
+ *   - `comment` (String) - comment (binary string)
+ *   - `hcrc` (Boolean) - true if header crc should be added
+ *
+ * ##### Example:
+ *
+ * ```javascript
+ * var pako = require('pako')
+ *   , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])
+ *   , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);
+ *
+ * var deflate = new pako.Deflate({ level: 3});
+ *
+ * deflate.push(chunk1, false);
+ * deflate.push(chunk2, true);  // true -> last chunk
+ *
+ * if (deflate.err) { throw new Error(deflate.err); }
+ *
+ * console.log(deflate.result);
+ * ```
+ **/
+function Deflate(options) {
+  if (!(this instanceof Deflate)) return new Deflate(options);
+
+  this.options = utils.assign({
+    level: Z_DEFAULT_COMPRESSION,
+    method: Z_DEFLATED,
+    chunkSize: 16384,
+    windowBits: 15,
+    memLevel: 8,
+    strategy: Z_DEFAULT_STRATEGY,
+    to: ''
+  }, options || {});
+
+  var opt = this.options;
+
+  if (opt.raw && (opt.windowBits > 0)) {
+    opt.windowBits = -opt.windowBits;
+  }
+
+  else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {
+    opt.windowBits += 16;
+  }
+
+  this.err    = 0;      // error code, if happens (0 = Z_OK)
+  this.msg    = '';     // error message
+  this.ended  = false;  // used to avoid multiple onEnd() calls
+  this.chunks = [];     // chunks of compressed data
+
+  this.strm = new ZStream();
+  this.strm.avail_out = 0;
+
+  var status = zlib_deflate.deflateInit2(
+    this.strm,
+    opt.level,
+    opt.method,
+    opt.windowBits,
+    opt.memLevel,
+    opt.strategy
+  );
+
+  if (status !== Z_OK) {
+    throw new Error(msg[status]);
+  }
+
+  if (opt.header) {
+    zlib_deflate.deflateSetHeader(this.strm, opt.header);
+  }
+
+  if (opt.dictionary) {
+    var dict;
+    // Convert data if needed
+    if (typeof opt.dictionary === 'string') {
+      // If we need to compress text, change encoding to utf8.
+      dict = strings.string2buf(opt.dictionary);
+    } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {
+      dict = new Uint8Array(opt.dictionary);
+    } else {
+      dict = opt.dictionary;
+    }
+
+    status = zlib_deflate.deflateSetDictionary(this.strm, dict);
+
+    if (status !== Z_OK) {
+      throw new Error(msg[status]);
+    }
+
+    this._dict_set = true;
+  }
+}
+
+/**
+ * Deflate#push(data[, mode]) -> Boolean
+ * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be
+ *   converted to utf8 byte sequence.
+ * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.
+ *   See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.
+ *
+ * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with
+ * new compressed chunks. Returns `true` on success. The last data block must have
+ * mode Z_FINISH (or `true`). That will flush internal pending buffers and call
+ * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you
+ * can use mode Z_SYNC_FLUSH, keeping the compression context.
+ *
+ * On fail call [[Deflate#onEnd]] with error code and return false.
+ *
+ * We strongly recommend to use `Uint8Array` on input for best speed (output
+ * array format is detected automatically). Also, don't skip last param and always
+ * use the same type in your code (boolean or number). That will improve JS speed.
+ *
+ * For regular `Array`-s make sure all elements are [0..255].
+ *
+ * ##### Example
+ *
+ * ```javascript
+ * push(chunk, false); // push one of data chunks
+ * ...
+ * push(chunk, true);  // push last chunk
+ * ```
+ **/
+Deflate.prototype.push = function (data, mode) {
+  var strm = this.strm;
+  var chunkSize = this.options.chunkSize;
+  var status, _mode;
+
+  if (this.ended) { return false; }
+
+  _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH);
+
+  // Convert data if needed
+  if (typeof data === 'string') {
+    // If we need to compress text, change encoding to utf8.
+    strm.input = strings.string2buf(data);
+  } else if (toString.call(data) === '[object ArrayBuffer]') {
+    strm.input = new Uint8Array(data);
+  } else {
+    strm.input = data;
+  }
+
+  strm.next_in = 0;
+  strm.avail_in = strm.input.length;
+
+  do {
+    if (strm.avail_out === 0) {
+      strm.output = new utils.Buf8(chunkSize);
+      strm.next_out = 0;
+      strm.avail_out = chunkSize;
+    }
+    status = zlib_deflate.deflate(strm, _mode);    /* no bad return value */
+
+    if (status !== Z_STREAM_END && status !== Z_OK) {
+      this.onEnd(status);
+      this.ended = true;
+      return false;
+    }
+    if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) {
+      if (this.options.to === 'string') {
+        this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out)));
+      } else {
+        this.onData(utils.shrinkBuf(strm.output, strm.next_out));
+      }
+    }
+  } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END);
+
+  // Finalize on the last chunk.
+  if (_mode === Z_FINISH) {
+    status = zlib_deflate.deflateEnd(this.strm);
+    this.onEnd(status);
+    this.ended = true;
+    return status === Z_OK;
+  }
+
+  // callback interim results if Z_SYNC_FLUSH.
+  if (_mode === Z_SYNC_FLUSH) {
+    this.onEnd(Z_OK);
+    strm.avail_out = 0;
+    return true;
+  }
+
+  return true;
+};
+
+
+/**
+ * Deflate#onData(chunk) -> Void
+ * - chunk (Uint8Array|Array|String): output data. Type of array depends
+ *   on js engine support. When string output requested, each chunk
+ *   will be string.
+ *
+ * By default, stores data blocks in `chunks[]` property and glue
+ * those in `onEnd`. Override this handler, if you need another behaviour.
+ **/
+Deflate.prototype.onData = function (chunk) {
+  this.chunks.push(chunk);
+};
+
+
+/**
+ * Deflate#onEnd(status) -> Void
+ * - status (Number): deflate status. 0 (Z_OK) on success,
+ *   other if not.
+ *
+ * Called once after you tell deflate that the input stream is
+ * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)
+ * or if an error happened. By default - join collected chunks,
+ * free memory and fill `results` / `err` properties.
+ **/
+Deflate.prototype.onEnd = function (status) {
+  // On success - join
+  if (status === Z_OK) {
+    if (this.options.to === 'string') {
+      this.result = this.chunks.join('');
+    } else {
+      this.result = utils.flattenChunks(this.chunks);
+    }
+  }
+  this.chunks = [];
+  this.err = status;
+  this.msg = this.strm.msg;
+};
+
+
+/**
+ * deflate(data[, options]) -> Uint8Array|Array|String
+ * - data (Uint8Array|Array|String): input data to compress.
+ * - options (Object): zlib deflate options.
+ *
+ * Compress `data` with deflate algorithm and `options`.
+ *
+ * Supported options are:
+ *
+ * - level
+ * - windowBits
+ * - memLevel
+ * - strategy
+ * - dictionary
+ *
+ * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
+ * for more information on these.
+ *
+ * Sugar (options):
+ *
+ * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify
+ *   negative windowBits implicitly.
+ * - `to` (String) - if equal to 'string', then result will be "binary string"
+ *    (each char code [0..255])
+ *
+ * ##### Example:
+ *
+ * ```javascript
+ * var pako = require('pako')
+ *   , data = Uint8Array([1,2,3,4,5,6,7,8,9]);
+ *
+ * console.log(pako.deflate(data));
+ * ```
+ **/
+function deflate(input, options) {
+  var deflator = new Deflate(options);
+
+  deflator.push(input, true);
+
+  // That will never happens, if you don't cheat with options :)
+  if (deflator.err) { throw deflator.msg || msg[deflator.err]; }
+
+  return deflator.result;
+}
+
+
+/**
+ * deflateRaw(data[, options]) -> Uint8Array|Array|String
+ * - data (Uint8Array|Array|String): input data to compress.
+ * - options (Object): zlib deflate options.
+ *
+ * The same as [[deflate]], but creates raw data, without wrapper
+ * (header and adler32 crc).
+ **/
+function deflateRaw(input, options) {
+  options = options || {};
+  options.raw = true;
+  return deflate(input, options);
+}
+
+
+/**
+ * gzip(data[, options]) -> Uint8Array|Array|String
+ * - data (Uint8Array|Array|String): input data to compress.
+ * - options (Object): zlib deflate options.
+ *
+ * The same as [[deflate]], but create gzip wrapper instead of
+ * deflate one.
+ **/
+function gzip(input, options) {
+  options = options || {};
+  options.gzip = true;
+  return deflate(input, options);
+}
+
+
+exports.Deflate = Deflate;
+exports.deflate = deflate;
+exports.deflateRaw = deflateRaw;
+exports.gzip = gzip;
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/pako/lib/inflate.js":
+/*!*************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/pako/lib/inflate.js ***!
+  \*************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+
+var zlib_inflate = __webpack_require__(/*! ./zlib/inflate */ "./node_modules/jszip/node_modules/pako/lib/zlib/inflate.js");
+var utils        = __webpack_require__(/*! ./utils/common */ "./node_modules/jszip/node_modules/pako/lib/utils/common.js");
+var strings      = __webpack_require__(/*! ./utils/strings */ "./node_modules/jszip/node_modules/pako/lib/utils/strings.js");
+var c            = __webpack_require__(/*! ./zlib/constants */ "./node_modules/jszip/node_modules/pako/lib/zlib/constants.js");
+var msg          = __webpack_require__(/*! ./zlib/messages */ "./node_modules/jszip/node_modules/pako/lib/zlib/messages.js");
+var ZStream      = __webpack_require__(/*! ./zlib/zstream */ "./node_modules/jszip/node_modules/pako/lib/zlib/zstream.js");
+var GZheader     = __webpack_require__(/*! ./zlib/gzheader */ "./node_modules/jszip/node_modules/pako/lib/zlib/gzheader.js");
+
+var toString = Object.prototype.toString;
+
+/**
+ * class Inflate
+ *
+ * Generic JS-style wrapper for zlib calls. If you don't need
+ * streaming behaviour - use more simple functions: [[inflate]]
+ * and [[inflateRaw]].
+ **/
+
+/* internal
+ * inflate.chunks -> Array
+ *
+ * Chunks of output data, if [[Inflate#onData]] not overridden.
+ **/
+
+/**
+ * Inflate.result -> Uint8Array|Array|String
+ *
+ * Uncompressed result, generated by default [[Inflate#onData]]
+ * and [[Inflate#onEnd]] handlers. Filled after you push last chunk
+ * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you
+ * push a chunk with explicit flush (call [[Inflate#push]] with
+ * `Z_SYNC_FLUSH` param).
+ **/
+
+/**
+ * Inflate.err -> Number
+ *
+ * Error code after inflate finished. 0 (Z_OK) on success.
+ * Should be checked if broken data possible.
+ **/
+
+/**
+ * Inflate.msg -> String
+ *
+ * Error message, if [[Inflate.err]] != 0
+ **/
+
+
+/**
+ * new Inflate(options)
+ * - options (Object): zlib inflate options.
+ *
+ * Creates new inflator instance with specified params. Throws exception
+ * on bad params. Supported options:
+ *
+ * - `windowBits`
+ * - `dictionary`
+ *
+ * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
+ * for more information on these.
+ *
+ * Additional options, for internal needs:
+ *
+ * - `chunkSize` - size of generated data chunks (16K by default)
+ * - `raw` (Boolean) - do raw inflate
+ * - `to` (String) - if equal to 'string', then result will be converted
+ *   from utf8 to utf16 (javascript) string. When string output requested,
+ *   chunk length can differ from `chunkSize`, depending on content.
+ *
+ * By default, when no options set, autodetect deflate/gzip data format via
+ * wrapper header.
+ *
+ * ##### Example:
+ *
+ * ```javascript
+ * var pako = require('pako')
+ *   , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])
+ *   , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);
+ *
+ * var inflate = new pako.Inflate({ level: 3});
+ *
+ * inflate.push(chunk1, false);
+ * inflate.push(chunk2, true);  // true -> last chunk
+ *
+ * if (inflate.err) { throw new Error(inflate.err); }
+ *
+ * console.log(inflate.result);
+ * ```
+ **/
+function Inflate(options) {
+  if (!(this instanceof Inflate)) return new Inflate(options);
+
+  this.options = utils.assign({
+    chunkSize: 16384,
+    windowBits: 0,
+    to: ''
+  }, options || {});
+
+  var opt = this.options;
+
+  // Force window size for `raw` data, if not set directly,
+  // because we have no header for autodetect.
+  if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {
+    opt.windowBits = -opt.windowBits;
+    if (opt.windowBits === 0) { opt.windowBits = -15; }
+  }
+
+  // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate
+  if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&
+      !(options && options.windowBits)) {
+    opt.windowBits += 32;
+  }
+
+  // Gzip header has no info about windows size, we can do autodetect only
+  // for deflate. So, if window size not set, force it to max when gzip possible
+  if ((opt.windowBits > 15) && (opt.windowBits < 48)) {
+    // bit 3 (16) -> gzipped data
+    // bit 4 (32) -> autodetect gzip/deflate
+    if ((opt.windowBits & 15) === 0) {
+      opt.windowBits |= 15;
+    }
+  }
+
+  this.err    = 0;      // error code, if happens (0 = Z_OK)
+  this.msg    = '';     // error message
+  this.ended  = false;  // used to avoid multiple onEnd() calls
+  this.chunks = [];     // chunks of compressed data
+
+  this.strm   = new ZStream();
+  this.strm.avail_out = 0;
+
+  var status  = zlib_inflate.inflateInit2(
+    this.strm,
+    opt.windowBits
+  );
+
+  if (status !== c.Z_OK) {
+    throw new Error(msg[status]);
+  }
+
+  this.header = new GZheader();
+
+  zlib_inflate.inflateGetHeader(this.strm, this.header);
+}
+
+/**
+ * Inflate#push(data[, mode]) -> Boolean
+ * - data (Uint8Array|Array|ArrayBuffer|String): input data
+ * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.
+ *   See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.
+ *
+ * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with
+ * new output chunks. Returns `true` on success. The last data block must have
+ * mode Z_FINISH (or `true`). That will flush internal pending buffers and call
+ * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you
+ * can use mode Z_SYNC_FLUSH, keeping the decompression context.
+ *
+ * On fail call [[Inflate#onEnd]] with error code and return false.
+ *
+ * We strongly recommend to use `Uint8Array` on input for best speed (output
+ * format is detected automatically). Also, don't skip last param and always
+ * use the same type in your code (boolean or number). That will improve JS speed.
+ *
+ * For regular `Array`-s make sure all elements are [0..255].
+ *
+ * ##### Example
+ *
+ * ```javascript
+ * push(chunk, false); // push one of data chunks
+ * ...
+ * push(chunk, true);  // push last chunk
+ * ```
+ **/
+Inflate.prototype.push = function (data, mode) {
+  var strm = this.strm;
+  var chunkSize = this.options.chunkSize;
+  var dictionary = this.options.dictionary;
+  var status, _mode;
+  var next_out_utf8, tail, utf8str;
+  var dict;
+
+  // Flag to properly process Z_BUF_ERROR on testing inflate call
+  // when we check that all output data was flushed.
+  var allowBufError = false;
+
+  if (this.ended) { return false; }
+  _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH);
+
+  // Convert data if needed
+  if (typeof data === 'string') {
+    // Only binary strings can be decompressed on practice
+    strm.input = strings.binstring2buf(data);
+  } else if (toString.call(data) === '[object ArrayBuffer]') {
+    strm.input = new Uint8Array(data);
+  } else {
+    strm.input = data;
+  }
+
+  strm.next_in = 0;
+  strm.avail_in = strm.input.length;
+
+  do {
+    if (strm.avail_out === 0) {
+      strm.output = new utils.Buf8(chunkSize);
+      strm.next_out = 0;
+      strm.avail_out = chunkSize;
+    }
+
+    status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH);    /* no bad return value */
+
+    if (status === c.Z_NEED_DICT && dictionary) {
+      // Convert data if needed
+      if (typeof dictionary === 'string') {
+        dict = strings.string2buf(dictionary);
+      } else if (toString.call(dictionary) === '[object ArrayBuffer]') {
+        dict = new Uint8Array(dictionary);
+      } else {
+        dict = dictionary;
+      }
+
+      status = zlib_inflate.inflateSetDictionary(this.strm, dict);
+
+    }
+
+    if (status === c.Z_BUF_ERROR && allowBufError === true) {
+      status = c.Z_OK;
+      allowBufError = false;
+    }
+
+    if (status !== c.Z_STREAM_END && status !== c.Z_OK) {
+      this.onEnd(status);
+      this.ended = true;
+      return false;
+    }
+
+    if (strm.next_out) {
+      if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) {
+
+        if (this.options.to === 'string') {
+
+          next_out_utf8 = strings.utf8border(strm.output, strm.next_out);
+
+          tail = strm.next_out - next_out_utf8;
+          utf8str = strings.buf2string(strm.output, next_out_utf8);
+
+          // move tail
+          strm.next_out = tail;
+          strm.avail_out = chunkSize - tail;
+          if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); }
+
+          this.onData(utf8str);
+
+        } else {
+          this.onData(utils.shrinkBuf(strm.output, strm.next_out));
+        }
+      }
+    }
+
+    // When no more input data, we should check that internal inflate buffers
+    // are flushed. The only way to do it when avail_out = 0 - run one more
+    // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR.
+    // Here we set flag to process this error properly.
+    //
+    // NOTE. Deflate does not return error in this case and does not needs such
+    // logic.
+    if (strm.avail_in === 0 && strm.avail_out === 0) {
+      allowBufError = true;
+    }
+
+  } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END);
+
+  if (status === c.Z_STREAM_END) {
+    _mode = c.Z_FINISH;
+  }
+
+  // Finalize on the last chunk.
+  if (_mode === c.Z_FINISH) {
+    status = zlib_inflate.inflateEnd(this.strm);
+    this.onEnd(status);
+    this.ended = true;
+    return status === c.Z_OK;
+  }
+
+  // callback interim results if Z_SYNC_FLUSH.
+  if (_mode === c.Z_SYNC_FLUSH) {
+    this.onEnd(c.Z_OK);
+    strm.avail_out = 0;
+    return true;
+  }
+
+  return true;
+};
+
+
+/**
+ * Inflate#onData(chunk) -> Void
+ * - chunk (Uint8Array|Array|String): output data. Type of array depends
+ *   on js engine support. When string output requested, each chunk
+ *   will be string.
+ *
+ * By default, stores data blocks in `chunks[]` property and glue
+ * those in `onEnd`. Override this handler, if you need another behaviour.
+ **/
+Inflate.prototype.onData = function (chunk) {
+  this.chunks.push(chunk);
+};
+
+
+/**
+ * Inflate#onEnd(status) -> Void
+ * - status (Number): inflate status. 0 (Z_OK) on success,
+ *   other if not.
+ *
+ * Called either after you tell inflate that the input stream is
+ * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)
+ * or if an error happened. By default - join collected chunks,
+ * free memory and fill `results` / `err` properties.
+ **/
+Inflate.prototype.onEnd = function (status) {
+  // On success - join
+  if (status === c.Z_OK) {
+    if (this.options.to === 'string') {
+      // Glue & convert here, until we teach pako to send
+      // utf8 aligned strings to onData
+      this.result = this.chunks.join('');
+    } else {
+      this.result = utils.flattenChunks(this.chunks);
+    }
+  }
+  this.chunks = [];
+  this.err = status;
+  this.msg = this.strm.msg;
+};
+
+
+/**
+ * inflate(data[, options]) -> Uint8Array|Array|String
+ * - data (Uint8Array|Array|String): input data to decompress.
+ * - options (Object): zlib inflate options.
+ *
+ * Decompress `data` with inflate/ungzip and `options`. Autodetect
+ * format via wrapper header by default. That's why we don't provide
+ * separate `ungzip` method.
+ *
+ * Supported options are:
+ *
+ * - windowBits
+ *
+ * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
+ * for more information.
+ *
+ * Sugar (options):
+ *
+ * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify
+ *   negative windowBits implicitly.
+ * - `to` (String) - if equal to 'string', then result will be converted
+ *   from utf8 to utf16 (javascript) string. When string output requested,
+ *   chunk length can differ from `chunkSize`, depending on content.
+ *
+ *
+ * ##### Example:
+ *
+ * ```javascript
+ * var pako = require('pako')
+ *   , input = pako.deflate([1,2,3,4,5,6,7,8,9])
+ *   , output;
+ *
+ * try {
+ *   output = pako.inflate(input);
+ * } catch (err)
+ *   console.log(err);
+ * }
+ * ```
+ **/
+function inflate(input, options) {
+  var inflator = new Inflate(options);
+
+  inflator.push(input, true);
+
+  // That will never happens, if you don't cheat with options :)
+  if (inflator.err) { throw inflator.msg || msg[inflator.err]; }
+
+  return inflator.result;
+}
+
+
+/**
+ * inflateRaw(data[, options]) -> Uint8Array|Array|String
+ * - data (Uint8Array|Array|String): input data to decompress.
+ * - options (Object): zlib inflate options.
+ *
+ * The same as [[inflate]], but creates raw data, without wrapper
+ * (header and adler32 crc).
+ **/
+function inflateRaw(input, options) {
+  options = options || {};
+  options.raw = true;
+  return inflate(input, options);
+}
+
+
+/**
+ * ungzip(data[, options]) -> Uint8Array|Array|String
+ * - data (Uint8Array|Array|String): input data to decompress.
+ * - options (Object): zlib inflate options.
+ *
+ * Just shortcut to [[inflate]], because it autodetects format
+ * by header.content. Done for convenience.
+ **/
+
+
+exports.Inflate = Inflate;
+exports.inflate = inflate;
+exports.inflateRaw = inflateRaw;
+exports.ungzip  = inflate;
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/pako/lib/utils/common.js":
+/*!******************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/pako/lib/utils/common.js ***!
+  \******************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+
+var TYPED_OK =  (typeof Uint8Array !== 'undefined') &&
+                (typeof Uint16Array !== 'undefined') &&
+                (typeof Int32Array !== 'undefined');
+
+function _has(obj, key) {
+  return Object.prototype.hasOwnProperty.call(obj, key);
+}
+
+exports.assign = function (obj /*from1, from2, from3, ...*/) {
+  var sources = Array.prototype.slice.call(arguments, 1);
+  while (sources.length) {
+    var source = sources.shift();
+    if (!source) { continue; }
+
+    if (typeof source !== 'object') {
+      throw new TypeError(source + 'must be non-object');
+    }
+
+    for (var p in source) {
+      if (_has(source, p)) {
+        obj[p] = source[p];
+      }
+    }
+  }
+
+  return obj;
+};
+
+
+// reduce buffer size, avoiding mem copy
+exports.shrinkBuf = function (buf, size) {
+  if (buf.length === size) { return buf; }
+  if (buf.subarray) { return buf.subarray(0, size); }
+  buf.length = size;
+  return buf;
+};
+
+
+var fnTyped = {
+  arraySet: function (dest, src, src_offs, len, dest_offs) {
+    if (src.subarray && dest.subarray) {
+      dest.set(src.subarray(src_offs, src_offs + len), dest_offs);
+      return;
+    }
+    // Fallback to ordinary array
+    for (var i = 0; i < len; i++) {
+      dest[dest_offs + i] = src[src_offs + i];
+    }
+  },
+  // Join array of chunks to single array.
+  flattenChunks: function (chunks) {
+    var i, l, len, pos, chunk, result;
+
+    // calculate data length
+    len = 0;
+    for (i = 0, l = chunks.length; i < l; i++) {
+      len += chunks[i].length;
+    }
+
+    // join chunks
+    result = new Uint8Array(len);
+    pos = 0;
+    for (i = 0, l = chunks.length; i < l; i++) {
+      chunk = chunks[i];
+      result.set(chunk, pos);
+      pos += chunk.length;
+    }
+
+    return result;
+  }
+};
+
+var fnUntyped = {
+  arraySet: function (dest, src, src_offs, len, dest_offs) {
+    for (var i = 0; i < len; i++) {
+      dest[dest_offs + i] = src[src_offs + i];
+    }
+  },
+  // Join array of chunks to single array.
+  flattenChunks: function (chunks) {
+    return [].concat.apply([], chunks);
+  }
+};
+
+
+// Enable/Disable typed arrays use, for testing
+//
+exports.setTyped = function (on) {
+  if (on) {
+    exports.Buf8  = Uint8Array;
+    exports.Buf16 = Uint16Array;
+    exports.Buf32 = Int32Array;
+    exports.assign(exports, fnTyped);
+  } else {
+    exports.Buf8  = Array;
+    exports.Buf16 = Array;
+    exports.Buf32 = Array;
+    exports.assign(exports, fnUntyped);
+  }
+};
+
+exports.setTyped(TYPED_OK);
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/pako/lib/utils/strings.js":
+/*!*******************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/pako/lib/utils/strings.js ***!
+  \*******************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+// String encode/decode helpers
+
+
+
+var utils = __webpack_require__(/*! ./common */ "./node_modules/jszip/node_modules/pako/lib/utils/common.js");
+
+
+// Quick check if we can use fast array to bin string conversion
+//
+// - apply(Array) can fail on Android 2.2
+// - apply(Uint8Array) can fail on iOS 5.1 Safari
+//
+var STR_APPLY_OK = true;
+var STR_APPLY_UIA_OK = true;
+
+try { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; }
+try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }
+
+
+// Table with utf8 lengths (calculated by first byte of sequence)
+// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,
+// because max possible codepoint is 0x10ffff
+var _utf8len = new utils.Buf8(256);
+for (var q = 0; q < 256; q++) {
+  _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);
+}
+_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start
+
+
+// convert string to array (typed, when possible)
+exports.string2buf = function (str) {
+  var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;
+
+  // count binary size
+  for (m_pos = 0; m_pos < str_len; m_pos++) {
+    c = str.charCodeAt(m_pos);
+    if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {
+      c2 = str.charCodeAt(m_pos + 1);
+      if ((c2 & 0xfc00) === 0xdc00) {
+        c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
+        m_pos++;
+      }
+    }
+    buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;
+  }
+
+  // allocate buffer
+  buf = new utils.Buf8(buf_len);
+
+  // convert
+  for (i = 0, m_pos = 0; i < buf_len; m_pos++) {
+    c = str.charCodeAt(m_pos);
+    if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {
+      c2 = str.charCodeAt(m_pos + 1);
+      if ((c2 & 0xfc00) === 0xdc00) {
+        c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
+        m_pos++;
+      }
+    }
+    if (c < 0x80) {
+      /* one byte */
+      buf[i++] = c;
+    } else if (c < 0x800) {
+      /* two bytes */
+      buf[i++] = 0xC0 | (c >>> 6);
+      buf[i++] = 0x80 | (c & 0x3f);
+    } else if (c < 0x10000) {
+      /* three bytes */
+      buf[i++] = 0xE0 | (c >>> 12);
+      buf[i++] = 0x80 | (c >>> 6 & 0x3f);
+      buf[i++] = 0x80 | (c & 0x3f);
+    } else {
+      /* four bytes */
+      buf[i++] = 0xf0 | (c >>> 18);
+      buf[i++] = 0x80 | (c >>> 12 & 0x3f);
+      buf[i++] = 0x80 | (c >>> 6 & 0x3f);
+      buf[i++] = 0x80 | (c & 0x3f);
+    }
+  }
+
+  return buf;
+};
+
+// Helper (used in 2 places)
+function buf2binstring(buf, len) {
+  // use fallback for big arrays to avoid stack overflow
+  if (len < 65537) {
+    if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {
+      return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));
+    }
+  }
+
+  var result = '';
+  for (var i = 0; i < len; i++) {
+    result += String.fromCharCode(buf[i]);
+  }
+  return result;
+}
+
+
+// Convert byte array to binary string
+exports.buf2binstring = function (buf) {
+  return buf2binstring(buf, buf.length);
+};
+
+
+// Convert binary string (typed, when possible)
+exports.binstring2buf = function (str) {
+  var buf = new utils.Buf8(str.length);
+  for (var i = 0, len = buf.length; i < len; i++) {
+    buf[i] = str.charCodeAt(i);
+  }
+  return buf;
+};
+
+
+// convert array to string
+exports.buf2string = function (buf, max) {
+  var i, out, c, c_len;
+  var len = max || buf.length;
+
+  // Reserve max possible length (2 words per char)
+  // NB: by unknown reasons, Array is significantly faster for
+  //     String.fromCharCode.apply than Uint16Array.
+  var utf16buf = new Array(len * 2);
+
+  for (out = 0, i = 0; i < len;) {
+    c = buf[i++];
+    // quick process ascii
+    if (c < 0x80) { utf16buf[out++] = c; continue; }
+
+    c_len = _utf8len[c];
+    // skip 5 & 6 byte codes
+    if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }
+
+    // apply mask on first byte
+    c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;
+    // join the rest
+    while (c_len > 1 && i < len) {
+      c = (c << 6) | (buf[i++] & 0x3f);
+      c_len--;
+    }
+
+    // terminated by end of string?
+    if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }
+
+    if (c < 0x10000) {
+      utf16buf[out++] = c;
+    } else {
+      c -= 0x10000;
+      utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);
+      utf16buf[out++] = 0xdc00 | (c & 0x3ff);
+    }
+  }
+
+  return buf2binstring(utf16buf, out);
+};
+
+
+// Calculate max possible position in utf8 buffer,
+// that will not break sequence. If that's not possible
+// - (very small limits) return max size as is.
+//
+// buf[] - utf8 bytes array
+// max   - length limit (mandatory);
+exports.utf8border = function (buf, max) {
+  var pos;
+
+  max = max || buf.length;
+  if (max > buf.length) { max = buf.length; }
+
+  // go back from last position, until start of sequence found
+  pos = max - 1;
+  while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }
+
+  // Very small and broken sequence,
+  // return max, because we should return something anyway.
+  if (pos < 0) { return max; }
+
+  // If we came to start of buffer - that means buffer is too small,
+  // return max too.
+  if (pos === 0) { return max; }
+
+  return (pos + _utf8len[buf[pos]] > max) ? pos : max;
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/pako/lib/zlib/adler32.js":
+/*!******************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/pako/lib/zlib/adler32.js ***!
+  \******************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+// Note: adler32 takes 12% for level 0 and 2% for level 6.
+// It isn't worth it to make additional optimizations as in original.
+// Small size is preferable.
+
+// (C) 1995-2013 Jean-loup Gailly and Mark Adler
+// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+//   claim that you wrote the original software. If you use this software
+//   in a product, an acknowledgment in the product documentation would be
+//   appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+//   misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+
+function adler32(adler, buf, len, pos) {
+  var s1 = (adler & 0xffff) |0,
+      s2 = ((adler >>> 16) & 0xffff) |0,
+      n = 0;
+
+  while (len !== 0) {
+    // Set limit ~ twice less than 5552, to keep
+    // s2 in 31-bits, because we force signed ints.
+    // in other case %= will fail.
+    n = len > 2000 ? 2000 : len;
+    len -= n;
+
+    do {
+      s1 = (s1 + buf[pos++]) |0;
+      s2 = (s2 + s1) |0;
+    } while (--n);
+
+    s1 %= 65521;
+    s2 %= 65521;
+  }
+
+  return (s1 | (s2 << 16)) |0;
+}
+
+
+module.exports = adler32;
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/pako/lib/zlib/constants.js":
+/*!********************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/pako/lib/zlib/constants.js ***!
+  \********************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+// (C) 1995-2013 Jean-loup Gailly and Mark Adler
+// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+//   claim that you wrote the original software. If you use this software
+//   in a product, an acknowledgment in the product documentation would be
+//   appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+//   misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+
+module.exports = {
+
+  /* Allowed flush values; see deflate() and inflate() below for details */
+  Z_NO_FLUSH:         0,
+  Z_PARTIAL_FLUSH:    1,
+  Z_SYNC_FLUSH:       2,
+  Z_FULL_FLUSH:       3,
+  Z_FINISH:           4,
+  Z_BLOCK:            5,
+  Z_TREES:            6,
+
+  /* Return codes for the compression/decompression functions. Negative values
+  * are errors, positive values are used for special but normal events.
+  */
+  Z_OK:               0,
+  Z_STREAM_END:       1,
+  Z_NEED_DICT:        2,
+  Z_ERRNO:           -1,
+  Z_STREAM_ERROR:    -2,
+  Z_DATA_ERROR:      -3,
+  //Z_MEM_ERROR:     -4,
+  Z_BUF_ERROR:       -5,
+  //Z_VERSION_ERROR: -6,
+
+  /* compression levels */
+  Z_NO_COMPRESSION:         0,
+  Z_BEST_SPEED:             1,
+  Z_BEST_COMPRESSION:       9,
+  Z_DEFAULT_COMPRESSION:   -1,
+
+
+  Z_FILTERED:               1,
+  Z_HUFFMAN_ONLY:           2,
+  Z_RLE:                    3,
+  Z_FIXED:                  4,
+  Z_DEFAULT_STRATEGY:       0,
+
+  /* Possible values of the data_type field (though see inflate()) */
+  Z_BINARY:                 0,
+  Z_TEXT:                   1,
+  //Z_ASCII:                1, // = Z_TEXT (deprecated)
+  Z_UNKNOWN:                2,
+
+  /* The deflate compression method */
+  Z_DEFLATED:               8
+  //Z_NULL:                 null // Use -1 or null inline, depending on var type
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/pako/lib/zlib/crc32.js":
+/*!****************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/pako/lib/zlib/crc32.js ***!
+  \****************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+// Note: we can't get significant speed boost here.
+// So write code to minimize size - no pregenerated tables
+// and array tools dependencies.
+
+// (C) 1995-2013 Jean-loup Gailly and Mark Adler
+// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+//   claim that you wrote the original software. If you use this software
+//   in a product, an acknowledgment in the product documentation would be
+//   appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+//   misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+
+// Use ordinary array, since untyped makes no boost here
+function makeTable() {
+  var c, table = [];
+
+  for (var n = 0; n < 256; n++) {
+    c = n;
+    for (var k = 0; k < 8; k++) {
+      c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));
+    }
+    table[n] = c;
+  }
+
+  return table;
+}
+
+// Create table on load. Just 255 signed longs. Not a problem.
+var crcTable = makeTable();
+
+
+function crc32(crc, buf, len, pos) {
+  var t = crcTable,
+      end = pos + len;
+
+  crc ^= -1;
+
+  for (var i = pos; i < end; i++) {
+    crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];
+  }
+
+  return (crc ^ (-1)); // >>> 0;
+}
+
+
+module.exports = crc32;
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/pako/lib/zlib/deflate.js":
+/*!******************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/pako/lib/zlib/deflate.js ***!
+  \******************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+// (C) 1995-2013 Jean-loup Gailly and Mark Adler
+// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+//   claim that you wrote the original software. If you use this software
+//   in a product, an acknowledgment in the product documentation would be
+//   appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+//   misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+
+var utils   = __webpack_require__(/*! ../utils/common */ "./node_modules/jszip/node_modules/pako/lib/utils/common.js");
+var trees   = __webpack_require__(/*! ./trees */ "./node_modules/jszip/node_modules/pako/lib/zlib/trees.js");
+var adler32 = __webpack_require__(/*! ./adler32 */ "./node_modules/jszip/node_modules/pako/lib/zlib/adler32.js");
+var crc32   = __webpack_require__(/*! ./crc32 */ "./node_modules/jszip/node_modules/pako/lib/zlib/crc32.js");
+var msg     = __webpack_require__(/*! ./messages */ "./node_modules/jszip/node_modules/pako/lib/zlib/messages.js");
+
+/* Public constants ==========================================================*/
+/* ===========================================================================*/
+
+
+/* Allowed flush values; see deflate() and inflate() below for details */
+var Z_NO_FLUSH      = 0;
+var Z_PARTIAL_FLUSH = 1;
+//var Z_SYNC_FLUSH    = 2;
+var Z_FULL_FLUSH    = 3;
+var Z_FINISH        = 4;
+var Z_BLOCK         = 5;
+//var Z_TREES         = 6;
+
+
+/* Return codes for the compression/decompression functions. Negative values
+ * are errors, positive values are used for special but normal events.
+ */
+var Z_OK            = 0;
+var Z_STREAM_END    = 1;
+//var Z_NEED_DICT     = 2;
+//var Z_ERRNO         = -1;
+var Z_STREAM_ERROR  = -2;
+var Z_DATA_ERROR    = -3;
+//var Z_MEM_ERROR     = -4;
+var Z_BUF_ERROR     = -5;
+//var Z_VERSION_ERROR = -6;
+
+
+/* compression levels */
+//var Z_NO_COMPRESSION      = 0;
+//var Z_BEST_SPEED          = 1;
+//var Z_BEST_COMPRESSION    = 9;
+var Z_DEFAULT_COMPRESSION = -1;
+
+
+var Z_FILTERED            = 1;
+var Z_HUFFMAN_ONLY        = 2;
+var Z_RLE                 = 3;
+var Z_FIXED               = 4;
+var Z_DEFAULT_STRATEGY    = 0;
+
+/* Possible values of the data_type field (though see inflate()) */
+//var Z_BINARY              = 0;
+//var Z_TEXT                = 1;
+//var Z_ASCII               = 1; // = Z_TEXT
+var Z_UNKNOWN             = 2;
+
+
+/* The deflate compression method */
+var Z_DEFLATED  = 8;
+
+/*============================================================================*/
+
+
+var MAX_MEM_LEVEL = 9;
+/* Maximum value for memLevel in deflateInit2 */
+var MAX_WBITS = 15;
+/* 32K LZ77 window */
+var DEF_MEM_LEVEL = 8;
+
+
+var LENGTH_CODES  = 29;
+/* number of length codes, not counting the special END_BLOCK code */
+var LITERALS      = 256;
+/* number of literal bytes 0..255 */
+var L_CODES       = LITERALS + 1 + LENGTH_CODES;
+/* number of Literal or Length codes, including the END_BLOCK code */
+var D_CODES       = 30;
+/* number of distance codes */
+var BL_CODES      = 19;
+/* number of codes used to transfer the bit lengths */
+var HEAP_SIZE     = 2 * L_CODES + 1;
+/* maximum heap size */
+var MAX_BITS  = 15;
+/* All codes must not exceed MAX_BITS bits */
+
+var MIN_MATCH = 3;
+var MAX_MATCH = 258;
+var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);
+
+var PRESET_DICT = 0x20;
+
+var INIT_STATE = 42;
+var EXTRA_STATE = 69;
+var NAME_STATE = 73;
+var COMMENT_STATE = 91;
+var HCRC_STATE = 103;
+var BUSY_STATE = 113;
+var FINISH_STATE = 666;
+
+var BS_NEED_MORE      = 1; /* block not completed, need more input or more output */
+var BS_BLOCK_DONE     = 2; /* block flush performed */
+var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */
+var BS_FINISH_DONE    = 4; /* finish done, accept no more input or output */
+
+var OS_CODE = 0x03; // Unix :) . Don't detect, use this default.
+
+function err(strm, errorCode) {
+  strm.msg = msg[errorCode];
+  return errorCode;
+}
+
+function rank(f) {
+  return ((f) << 1) - ((f) > 4 ? 9 : 0);
+}
+
+function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }
+
+
+/* =========================================================================
+ * Flush as much pending output as possible. All deflate() output goes
+ * through this function so some applications may wish to modify it
+ * to avoid allocating a large strm->output buffer and copying into it.
+ * (See also read_buf()).
+ */
+function flush_pending(strm) {
+  var s = strm.state;
+
+  //_tr_flush_bits(s);
+  var len = s.pending;
+  if (len > strm.avail_out) {
+    len = strm.avail_out;
+  }
+  if (len === 0) { return; }
+
+  utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);
+  strm.next_out += len;
+  s.pending_out += len;
+  strm.total_out += len;
+  strm.avail_out -= len;
+  s.pending -= len;
+  if (s.pending === 0) {
+    s.pending_out = 0;
+  }
+}
+
+
+function flush_block_only(s, last) {
+  trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);
+  s.block_start = s.strstart;
+  flush_pending(s.strm);
+}
+
+
+function put_byte(s, b) {
+  s.pending_buf[s.pending++] = b;
+}
+
+
+/* =========================================================================
+ * Put a short in the pending buffer. The 16-bit value is put in MSB order.
+ * IN assertion: the stream state is correct and there is enough room in
+ * pending_buf.
+ */
+function putShortMSB(s, b) {
+//  put_byte(s, (Byte)(b >> 8));
+//  put_byte(s, (Byte)(b & 0xff));
+  s.pending_buf[s.pending++] = (b >>> 8) & 0xff;
+  s.pending_buf[s.pending++] = b & 0xff;
+}
+
+
+/* ===========================================================================
+ * Read a new buffer from the current input stream, update the adler32
+ * and total number of bytes read.  All deflate() input goes through
+ * this function so some applications may wish to modify it to avoid
+ * allocating a large strm->input buffer and copying from it.
+ * (See also flush_pending()).
+ */
+function read_buf(strm, buf, start, size) {
+  var len = strm.avail_in;
+
+  if (len > size) { len = size; }
+  if (len === 0) { return 0; }
+
+  strm.avail_in -= len;
+
+  // zmemcpy(buf, strm->next_in, len);
+  utils.arraySet(buf, strm.input, strm.next_in, len, start);
+  if (strm.state.wrap === 1) {
+    strm.adler = adler32(strm.adler, buf, len, start);
+  }
+
+  else if (strm.state.wrap === 2) {
+    strm.adler = crc32(strm.adler, buf, len, start);
+  }
+
+  strm.next_in += len;
+  strm.total_in += len;
+
+  return len;
+}
+
+
+/* ===========================================================================
+ * Set match_start to the longest match starting at the given string and
+ * return its length. Matches shorter or equal to prev_length are discarded,
+ * in which case the result is equal to prev_length and match_start is
+ * garbage.
+ * IN assertions: cur_match is the head of the hash chain for the current
+ *   string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1
+ * OUT assertion: the match length is not greater than s->lookahead.
+ */
+function longest_match(s, cur_match) {
+  var chain_length = s.max_chain_length;      /* max hash chain length */
+  var scan = s.strstart; /* current string */
+  var match;                       /* matched string */
+  var len;                           /* length of current match */
+  var best_len = s.prev_length;              /* best match length so far */
+  var nice_match = s.nice_match;             /* stop if match long enough */
+  var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?
+      s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;
+
+  var _win = s.window; // shortcut
+
+  var wmask = s.w_mask;
+  var prev  = s.prev;
+
+  /* Stop when cur_match becomes <= limit. To simplify the code,
+   * we prevent matches with the string of window index 0.
+   */
+
+  var strend = s.strstart + MAX_MATCH;
+  var scan_end1  = _win[scan + best_len - 1];
+  var scan_end   = _win[scan + best_len];
+
+  /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
+   * It is easy to get rid of this optimization if necessary.
+   */
+  // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
+
+  /* Do not waste too much time if we already have a good match: */
+  if (s.prev_length >= s.good_match) {
+    chain_length >>= 2;
+  }
+  /* Do not look for matches beyond the end of the input. This is necessary
+   * to make deflate deterministic.
+   */
+  if (nice_match > s.lookahead) { nice_match = s.lookahead; }
+
+  // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
+
+  do {
+    // Assert(cur_match < s->strstart, "no future");
+    match = cur_match;
+
+    /* Skip to next match if the match length cannot increase
+     * or if the match length is less than 2.  Note that the checks below
+     * for insufficient lookahead only occur occasionally for performance
+     * reasons.  Therefore uninitialized memory will be accessed, and
+     * conditional jumps will be made that depend on those values.
+     * However the length of the match is limited to the lookahead, so
+     * the output of deflate is not affected by the uninitialized values.
+     */
+
+    if (_win[match + best_len]     !== scan_end  ||
+        _win[match + best_len - 1] !== scan_end1 ||
+        _win[match]                !== _win[scan] ||
+        _win[++match]              !== _win[scan + 1]) {
+      continue;
+    }
+
+    /* The check at best_len-1 can be removed because it will be made
+     * again later. (This heuristic is not always a win.)
+     * It is not necessary to compare scan[2] and match[2] since they
+     * are always equal when the other bytes match, given that
+     * the hash keys are equal and that HASH_BITS >= 8.
+     */
+    scan += 2;
+    match++;
+    // Assert(*scan == *match, "match[2]?");
+
+    /* We check for insufficient lookahead only every 8th comparison;
+     * the 256th check will be made at strstart+258.
+     */
+    do {
+      /*jshint noempty:false*/
+    } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
+             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
+             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
+             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
+             scan < strend);
+
+    // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
+
+    len = MAX_MATCH - (strend - scan);
+    scan = strend - MAX_MATCH;
+
+    if (len > best_len) {
+      s.match_start = cur_match;
+      best_len = len;
+      if (len >= nice_match) {
+        break;
+      }
+      scan_end1  = _win[scan + best_len - 1];
+      scan_end   = _win[scan + best_len];
+    }
+  } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);
+
+  if (best_len <= s.lookahead) {
+    return best_len;
+  }
+  return s.lookahead;
+}
+
+
+/* ===========================================================================
+ * Fill the window when the lookahead becomes insufficient.
+ * Updates strstart and lookahead.
+ *
+ * IN assertion: lookahead < MIN_LOOKAHEAD
+ * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD
+ *    At least one byte has been read, or avail_in == 0; reads are
+ *    performed for at least two bytes (required for the zip translate_eol
+ *    option -- not supported here).
+ */
+function fill_window(s) {
+  var _w_size = s.w_size;
+  var p, n, m, more, str;
+
+  //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead");
+
+  do {
+    more = s.window_size - s.lookahead - s.strstart;
+
+    // JS ints have 32 bit, block below not needed
+    /* Deal with !@#$% 64K limit: */
+    //if (sizeof(int) <= 2) {
+    //    if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
+    //        more = wsize;
+    //
+    //  } else if (more == (unsigned)(-1)) {
+    //        /* Very unlikely, but possible on 16 bit machine if
+    //         * strstart == 0 && lookahead == 1 (input done a byte at time)
+    //         */
+    //        more--;
+    //    }
+    //}
+
+
+    /* If the window is almost full and there is insufficient lookahead,
+     * move the upper half to the lower one to make room in the upper half.
+     */
+    if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {
+
+      utils.arraySet(s.window, s.window, _w_size, _w_size, 0);
+      s.match_start -= _w_size;
+      s.strstart -= _w_size;
+      /* we now have strstart >= MAX_DIST */
+      s.block_start -= _w_size;
+
+      /* Slide the hash table (could be avoided with 32 bit values
+       at the expense of memory usage). We slide even when level == 0
+       to keep the hash table consistent if we switch back to level > 0
+       later. (Using level 0 permanently is not an optimal usage of
+       zlib, so we don't care about this pathological case.)
+       */
+
+      n = s.hash_size;
+      p = n;
+      do {
+        m = s.head[--p];
+        s.head[p] = (m >= _w_size ? m - _w_size : 0);
+      } while (--n);
+
+      n = _w_size;
+      p = n;
+      do {
+        m = s.prev[--p];
+        s.prev[p] = (m >= _w_size ? m - _w_size : 0);
+        /* If n is not on any hash chain, prev[n] is garbage but
+         * its value will never be used.
+         */
+      } while (--n);
+
+      more += _w_size;
+    }
+    if (s.strm.avail_in === 0) {
+      break;
+    }
+
+    /* If there was no sliding:
+     *    strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
+     *    more == window_size - lookahead - strstart
+     * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)
+     * => more >= window_size - 2*WSIZE + 2
+     * In the BIG_MEM or MMAP case (not yet supported),
+     *   window_size == input_size + MIN_LOOKAHEAD  &&
+     *   strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
+     * Otherwise, window_size == 2*WSIZE so more >= 2.
+     * If there was sliding, more >= WSIZE. So in all cases, more >= 2.
+     */
+    //Assert(more >= 2, "more < 2");
+    n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);
+    s.lookahead += n;
+
+    /* Initialize the hash value now that we have some input: */
+    if (s.lookahead + s.insert >= MIN_MATCH) {
+      str = s.strstart - s.insert;
+      s.ins_h = s.window[str];
+
+      /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */
+      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask;
+//#if MIN_MATCH != 3
+//        Call update_hash() MIN_MATCH-3 more times
+//#endif
+      while (s.insert) {
+        /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */
+        s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;
+
+        s.prev[str & s.w_mask] = s.head[s.ins_h];
+        s.head[s.ins_h] = str;
+        str++;
+        s.insert--;
+        if (s.lookahead + s.insert < MIN_MATCH) {
+          break;
+        }
+      }
+    }
+    /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,
+     * but this is not important since only literal bytes will be emitted.
+     */
+
+  } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);
+
+  /* If the WIN_INIT bytes after the end of the current data have never been
+   * written, then zero those bytes in order to avoid memory check reports of
+   * the use of uninitialized (or uninitialised as Julian writes) bytes by
+   * the longest match routines.  Update the high water mark for the next
+   * time through here.  WIN_INIT is set to MAX_MATCH since the longest match
+   * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.
+   */
+//  if (s.high_water < s.window_size) {
+//    var curr = s.strstart + s.lookahead;
+//    var init = 0;
+//
+//    if (s.high_water < curr) {
+//      /* Previous high water mark below current data -- zero WIN_INIT
+//       * bytes or up to end of window, whichever is less.
+//       */
+//      init = s.window_size - curr;
+//      if (init > WIN_INIT)
+//        init = WIN_INIT;
+//      zmemzero(s->window + curr, (unsigned)init);
+//      s->high_water = curr + init;
+//    }
+//    else if (s->high_water < (ulg)curr + WIN_INIT) {
+//      /* High water mark at or above current data, but below current data
+//       * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up
+//       * to end of window, whichever is less.
+//       */
+//      init = (ulg)curr + WIN_INIT - s->high_water;
+//      if (init > s->window_size - s->high_water)
+//        init = s->window_size - s->high_water;
+//      zmemzero(s->window + s->high_water, (unsigned)init);
+//      s->high_water += init;
+//    }
+//  }
+//
+//  Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,
+//    "not enough room for search");
+}
+
+/* ===========================================================================
+ * Copy without compression as much as possible from the input stream, return
+ * the current block state.
+ * This function does not insert new strings in the dictionary since
+ * uncompressible data is probably not useful. This function is used
+ * only for the level=0 compression option.
+ * NOTE: this function should be optimized to avoid extra copying from
+ * window to pending_buf.
+ */
+function deflate_stored(s, flush) {
+  /* Stored blocks are limited to 0xffff bytes, pending_buf is limited
+   * to pending_buf_size, and each stored block has a 5 byte header:
+   */
+  var max_block_size = 0xffff;
+
+  if (max_block_size > s.pending_buf_size - 5) {
+    max_block_size = s.pending_buf_size - 5;
+  }
+
+  /* Copy as much as possible from input to output: */
+  for (;;) {
+    /* Fill the window as much as possible: */
+    if (s.lookahead <= 1) {
+
+      //Assert(s->strstart < s->w_size+MAX_DIST(s) ||
+      //  s->block_start >= (long)s->w_size, "slide too late");
+//      if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||
+//        s.block_start >= s.w_size)) {
+//        throw  new Error("slide too late");
+//      }
+
+      fill_window(s);
+      if (s.lookahead === 0 && flush === Z_NO_FLUSH) {
+        return BS_NEED_MORE;
+      }
+
+      if (s.lookahead === 0) {
+        break;
+      }
+      /* flush the current block */
+    }
+    //Assert(s->block_start >= 0L, "block gone");
+//    if (s.block_start < 0) throw new Error("block gone");
+
+    s.strstart += s.lookahead;
+    s.lookahead = 0;
+
+    /* Emit a stored block if pending_buf will be full: */
+    var max_start = s.block_start + max_block_size;
+
+    if (s.strstart === 0 || s.strstart >= max_start) {
+      /* strstart == 0 is possible when wraparound on 16-bit machine */
+      s.lookahead = s.strstart - max_start;
+      s.strstart = max_start;
+      /*** FLUSH_BLOCK(s, 0); ***/
+      flush_block_only(s, false);
+      if (s.strm.avail_out === 0) {
+        return BS_NEED_MORE;
+      }
+      /***/
+
+
+    }
+    /* Flush if we may have to slide, otherwise block_start may become
+     * negative and the data will be gone:
+     */
+    if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {
+      /*** FLUSH_BLOCK(s, 0); ***/
+      flush_block_only(s, false);
+      if (s.strm.avail_out === 0) {
+        return BS_NEED_MORE;
+      }
+      /***/
+    }
+  }
+
+  s.insert = 0;
+
+  if (flush === Z_FINISH) {
+    /*** FLUSH_BLOCK(s, 1); ***/
+    flush_block_only(s, true);
+    if (s.strm.avail_out === 0) {
+      return BS_FINISH_STARTED;
+    }
+    /***/
+    return BS_FINISH_DONE;
+  }
+
+  if (s.strstart > s.block_start) {
+    /*** FLUSH_BLOCK(s, 0); ***/
+    flush_block_only(s, false);
+    if (s.strm.avail_out === 0) {
+      return BS_NEED_MORE;
+    }
+    /***/
+  }
+
+  return BS_NEED_MORE;
+}
+
+/* ===========================================================================
+ * Compress as much as possible from the input stream, return the current
+ * block state.
+ * This function does not perform lazy evaluation of matches and inserts
+ * new strings in the dictionary only for unmatched strings or for short
+ * matches. It is used only for the fast compression options.
+ */
+function deflate_fast(s, flush) {
+  var hash_head;        /* head of the hash chain */
+  var bflush;           /* set if current block must be flushed */
+
+  for (;;) {
+    /* Make sure that we always have enough lookahead, except
+     * at the end of the input file. We need MAX_MATCH bytes
+     * for the next match, plus MIN_MATCH bytes to insert the
+     * string following the next match.
+     */
+    if (s.lookahead < MIN_LOOKAHEAD) {
+      fill_window(s);
+      if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {
+        return BS_NEED_MORE;
+      }
+      if (s.lookahead === 0) {
+        break; /* flush the current block */
+      }
+    }
+
+    /* Insert the string window[strstart .. strstart+2] in the
+     * dictionary, and set hash_head to the head of the hash chain:
+     */
+    hash_head = 0/*NIL*/;
+    if (s.lookahead >= MIN_MATCH) {
+      /*** INSERT_STRING(s, s.strstart, hash_head); ***/
+      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
+      hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
+      s.head[s.ins_h] = s.strstart;
+      /***/
+    }
+
+    /* Find the longest match, discarding those <= prev_length.
+     * At this point we have always match_length < MIN_MATCH
+     */
+    if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {
+      /* To simplify the code, we prevent matches with the string
+       * of window index 0 (in particular we have to avoid a match
+       * of the string with itself at the start of the input file).
+       */
+      s.match_length = longest_match(s, hash_head);
+      /* longest_match() sets match_start */
+    }
+    if (s.match_length >= MIN_MATCH) {
+      // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only
+
+      /*** _tr_tally_dist(s, s.strstart - s.match_start,
+                     s.match_length - MIN_MATCH, bflush); ***/
+      bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);
+
+      s.lookahead -= s.match_length;
+
+      /* Insert new strings in the hash table only if the match length
+       * is not too large. This saves time but degrades compression.
+       */
+      if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {
+        s.match_length--; /* string at strstart already in table */
+        do {
+          s.strstart++;
+          /*** INSERT_STRING(s, s.strstart, hash_head); ***/
+          s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
+          hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
+          s.head[s.ins_h] = s.strstart;
+          /***/
+          /* strstart never exceeds WSIZE-MAX_MATCH, so there are
+           * always MIN_MATCH bytes ahead.
+           */
+        } while (--s.match_length !== 0);
+        s.strstart++;
+      } else
+      {
+        s.strstart += s.match_length;
+        s.match_length = 0;
+        s.ins_h = s.window[s.strstart];
+        /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */
+        s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;
+
+//#if MIN_MATCH != 3
+//                Call UPDATE_HASH() MIN_MATCH-3 more times
+//#endif
+        /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
+         * matter since it will be recomputed at next deflate call.
+         */
+      }
+    } else {
+      /* No match, output a literal byte */
+      //Tracevv((stderr,"%c", s.window[s.strstart]));
+      /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/
+      bflush = trees._tr_tally(s, 0, s.window[s.strstart]);
+
+      s.lookahead--;
+      s.strstart++;
+    }
+    if (bflush) {
+      /*** FLUSH_BLOCK(s, 0); ***/
+      flush_block_only(s, false);
+      if (s.strm.avail_out === 0) {
+        return BS_NEED_MORE;
+      }
+      /***/
+    }
+  }
+  s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);
+  if (flush === Z_FINISH) {
+    /*** FLUSH_BLOCK(s, 1); ***/
+    flush_block_only(s, true);
+    if (s.strm.avail_out === 0) {
+      return BS_FINISH_STARTED;
+    }
+    /***/
+    return BS_FINISH_DONE;
+  }
+  if (s.last_lit) {
+    /*** FLUSH_BLOCK(s, 0); ***/
+    flush_block_only(s, false);
+    if (s.strm.avail_out === 0) {
+      return BS_NEED_MORE;
+    }
+    /***/
+  }
+  return BS_BLOCK_DONE;
+}
+
+/* ===========================================================================
+ * Same as above, but achieves better compression. We use a lazy
+ * evaluation for matches: a match is finally adopted only if there is
+ * no better match at the next window position.
+ */
+function deflate_slow(s, flush) {
+  var hash_head;          /* head of hash chain */
+  var bflush;              /* set if current block must be flushed */
+
+  var max_insert;
+
+  /* Process the input block. */
+  for (;;) {
+    /* Make sure that we always have enough lookahead, except
+     * at the end of the input file. We need MAX_MATCH bytes
+     * for the next match, plus MIN_MATCH bytes to insert the
+     * string following the next match.
+     */
+    if (s.lookahead < MIN_LOOKAHEAD) {
+      fill_window(s);
+      if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {
+        return BS_NEED_MORE;
+      }
+      if (s.lookahead === 0) { break; } /* flush the current block */
+    }
+
+    /* Insert the string window[strstart .. strstart+2] in the
+     * dictionary, and set hash_head to the head of the hash chain:
+     */
+    hash_head = 0/*NIL*/;
+    if (s.lookahead >= MIN_MATCH) {
+      /*** INSERT_STRING(s, s.strstart, hash_head); ***/
+      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
+      hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
+      s.head[s.ins_h] = s.strstart;
+      /***/
+    }
+
+    /* Find the longest match, discarding those <= prev_length.
+     */
+    s.prev_length = s.match_length;
+    s.prev_match = s.match_start;
+    s.match_length = MIN_MATCH - 1;
+
+    if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&
+        s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {
+      /* To simplify the code, we prevent matches with the string
+       * of window index 0 (in particular we have to avoid a match
+       * of the string with itself at the start of the input file).
+       */
+      s.match_length = longest_match(s, hash_head);
+      /* longest_match() sets match_start */
+
+      if (s.match_length <= 5 &&
+         (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {
+
+        /* If prev_match is also MIN_MATCH, match_start is garbage
+         * but we will ignore the current match anyway.
+         */
+        s.match_length = MIN_MATCH - 1;
+      }
+    }
+    /* If there was a match at the previous step and the current
+     * match is not better, output the previous match:
+     */
+    if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {
+      max_insert = s.strstart + s.lookahead - MIN_MATCH;
+      /* Do not insert strings in hash table beyond this. */
+
+      //check_match(s, s.strstart-1, s.prev_match, s.prev_length);
+
+      /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,
+                     s.prev_length - MIN_MATCH, bflush);***/
+      bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);
+      /* Insert in hash table all strings up to the end of the match.
+       * strstart-1 and strstart are already inserted. If there is not
+       * enough lookahead, the last two strings are not inserted in
+       * the hash table.
+       */
+      s.lookahead -= s.prev_length - 1;
+      s.prev_length -= 2;
+      do {
+        if (++s.strstart <= max_insert) {
+          /*** INSERT_STRING(s, s.strstart, hash_head); ***/
+          s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
+          hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
+          s.head[s.ins_h] = s.strstart;
+          /***/
+        }
+      } while (--s.prev_length !== 0);
+      s.match_available = 0;
+      s.match_length = MIN_MATCH - 1;
+      s.strstart++;
+
+      if (bflush) {
+        /*** FLUSH_BLOCK(s, 0); ***/
+        flush_block_only(s, false);
+        if (s.strm.avail_out === 0) {
+          return BS_NEED_MORE;
+        }
+        /***/
+      }
+
+    } else if (s.match_available) {
+      /* If there was no match at the previous position, output a
+       * single literal. If there was a match but the current match
+       * is longer, truncate the previous match to a single literal.
+       */
+      //Tracevv((stderr,"%c", s->window[s->strstart-1]));
+      /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/
+      bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);
+
+      if (bflush) {
+        /*** FLUSH_BLOCK_ONLY(s, 0) ***/
+        flush_block_only(s, false);
+        /***/
+      }
+      s.strstart++;
+      s.lookahead--;
+      if (s.strm.avail_out === 0) {
+        return BS_NEED_MORE;
+      }
+    } else {
+      /* There is no previous match to compare with, wait for
+       * the next step to decide.
+       */
+      s.match_available = 1;
+      s.strstart++;
+      s.lookahead--;
+    }
+  }
+  //Assert (flush != Z_NO_FLUSH, "no flush?");
+  if (s.match_available) {
+    //Tracevv((stderr,"%c", s->window[s->strstart-1]));
+    /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/
+    bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);
+
+    s.match_available = 0;
+  }
+  s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;
+  if (flush === Z_FINISH) {
+    /*** FLUSH_BLOCK(s, 1); ***/
+    flush_block_only(s, true);
+    if (s.strm.avail_out === 0) {
+      return BS_FINISH_STARTED;
+    }
+    /***/
+    return BS_FINISH_DONE;
+  }
+  if (s.last_lit) {
+    /*** FLUSH_BLOCK(s, 0); ***/
+    flush_block_only(s, false);
+    if (s.strm.avail_out === 0) {
+      return BS_NEED_MORE;
+    }
+    /***/
+  }
+
+  return BS_BLOCK_DONE;
+}
+
+
+/* ===========================================================================
+ * For Z_RLE, simply look for runs of bytes, generate matches only of distance
+ * one.  Do not maintain a hash table.  (It will be regenerated if this run of
+ * deflate switches away from Z_RLE.)
+ */
+function deflate_rle(s, flush) {
+  var bflush;            /* set if current block must be flushed */
+  var prev;              /* byte at distance one to match */
+  var scan, strend;      /* scan goes up to strend for length of run */
+
+  var _win = s.window;
+
+  for (;;) {
+    /* Make sure that we always have enough lookahead, except
+     * at the end of the input file. We need MAX_MATCH bytes
+     * for the longest run, plus one for the unrolled loop.
+     */
+    if (s.lookahead <= MAX_MATCH) {
+      fill_window(s);
+      if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {
+        return BS_NEED_MORE;
+      }
+      if (s.lookahead === 0) { break; } /* flush the current block */
+    }
+
+    /* See how many times the previous byte repeats */
+    s.match_length = 0;
+    if (s.lookahead >= MIN_MATCH && s.strstart > 0) {
+      scan = s.strstart - 1;
+      prev = _win[scan];
+      if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {
+        strend = s.strstart + MAX_MATCH;
+        do {
+          /*jshint noempty:false*/
+        } while (prev === _win[++scan] && prev === _win[++scan] &&
+                 prev === _win[++scan] && prev === _win[++scan] &&
+                 prev === _win[++scan] && prev === _win[++scan] &&
+                 prev === _win[++scan] && prev === _win[++scan] &&
+                 scan < strend);
+        s.match_length = MAX_MATCH - (strend - scan);
+        if (s.match_length > s.lookahead) {
+          s.match_length = s.lookahead;
+        }
+      }
+      //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan");
+    }
+
+    /* Emit match if have run of MIN_MATCH or longer, else emit literal */
+    if (s.match_length >= MIN_MATCH) {
+      //check_match(s, s.strstart, s.strstart - 1, s.match_length);
+
+      /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/
+      bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH);
+
+      s.lookahead -= s.match_length;
+      s.strstart += s.match_length;
+      s.match_length = 0;
+    } else {
+      /* No match, output a literal byte */
+      //Tracevv((stderr,"%c", s->window[s->strstart]));
+      /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/
+      bflush = trees._tr_tally(s, 0, s.window[s.strstart]);
+
+      s.lookahead--;
+      s.strstart++;
+    }
+    if (bflush) {
+      /*** FLUSH_BLOCK(s, 0); ***/
+      flush_block_only(s, false);
+      if (s.strm.avail_out === 0) {
+        return BS_NEED_MORE;
+      }
+      /***/
+    }
+  }
+  s.insert = 0;
+  if (flush === Z_FINISH) {
+    /*** FLUSH_BLOCK(s, 1); ***/
+    flush_block_only(s, true);
+    if (s.strm.avail_out === 0) {
+      return BS_FINISH_STARTED;
+    }
+    /***/
+    return BS_FINISH_DONE;
+  }
+  if (s.last_lit) {
+    /*** FLUSH_BLOCK(s, 0); ***/
+    flush_block_only(s, false);
+    if (s.strm.avail_out === 0) {
+      return BS_NEED_MORE;
+    }
+    /***/
+  }
+  return BS_BLOCK_DONE;
+}
+
+/* ===========================================================================
+ * For Z_HUFFMAN_ONLY, do not look for matches.  Do not maintain a hash table.
+ * (It will be regenerated if this run of deflate switches away from Huffman.)
+ */
+function deflate_huff(s, flush) {
+  var bflush;             /* set if current block must be flushed */
+
+  for (;;) {
+    /* Make sure that we have a literal to write. */
+    if (s.lookahead === 0) {
+      fill_window(s);
+      if (s.lookahead === 0) {
+        if (flush === Z_NO_FLUSH) {
+          return BS_NEED_MORE;
+        }
+        break;      /* flush the current block */
+      }
+    }
+
+    /* Output a literal byte */
+    s.match_length = 0;
+    //Tracevv((stderr,"%c", s->window[s->strstart]));
+    /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/
+    bflush = trees._tr_tally(s, 0, s.window[s.strstart]);
+    s.lookahead--;
+    s.strstart++;
+    if (bflush) {
+      /*** FLUSH_BLOCK(s, 0); ***/
+      flush_block_only(s, false);
+      if (s.strm.avail_out === 0) {
+        return BS_NEED_MORE;
+      }
+      /***/
+    }
+  }
+  s.insert = 0;
+  if (flush === Z_FINISH) {
+    /*** FLUSH_BLOCK(s, 1); ***/
+    flush_block_only(s, true);
+    if (s.strm.avail_out === 0) {
+      return BS_FINISH_STARTED;
+    }
+    /***/
+    return BS_FINISH_DONE;
+  }
+  if (s.last_lit) {
+    /*** FLUSH_BLOCK(s, 0); ***/
+    flush_block_only(s, false);
+    if (s.strm.avail_out === 0) {
+      return BS_NEED_MORE;
+    }
+    /***/
+  }
+  return BS_BLOCK_DONE;
+}
+
+/* Values for max_lazy_match, good_match and max_chain_length, depending on
+ * the desired pack level (0..9). The values given below have been tuned to
+ * exclude worst case performance for pathological files. Better values may be
+ * found for specific files.
+ */
+function Config(good_length, max_lazy, nice_length, max_chain, func) {
+  this.good_length = good_length;
+  this.max_lazy = max_lazy;
+  this.nice_length = nice_length;
+  this.max_chain = max_chain;
+  this.func = func;
+}
+
+var configuration_table;
+
+configuration_table = [
+  /*      good lazy nice chain */
+  new Config(0, 0, 0, 0, deflate_stored),          /* 0 store only */
+  new Config(4, 4, 8, 4, deflate_fast),            /* 1 max speed, no lazy matches */
+  new Config(4, 5, 16, 8, deflate_fast),           /* 2 */
+  new Config(4, 6, 32, 32, deflate_fast),          /* 3 */
+
+  new Config(4, 4, 16, 16, deflate_slow),          /* 4 lazy matches */
+  new Config(8, 16, 32, 32, deflate_slow),         /* 5 */
+  new Config(8, 16, 128, 128, deflate_slow),       /* 6 */
+  new Config(8, 32, 128, 256, deflate_slow),       /* 7 */
+  new Config(32, 128, 258, 1024, deflate_slow),    /* 8 */
+  new Config(32, 258, 258, 4096, deflate_slow)     /* 9 max compression */
+];
+
+
+/* ===========================================================================
+ * Initialize the "longest match" routines for a new zlib stream
+ */
+function lm_init(s) {
+  s.window_size = 2 * s.w_size;
+
+  /*** CLEAR_HASH(s); ***/
+  zero(s.head); // Fill with NIL (= 0);
+
+  /* Set the default configuration parameters:
+   */
+  s.max_lazy_match = configuration_table[s.level].max_lazy;
+  s.good_match = configuration_table[s.level].good_length;
+  s.nice_match = configuration_table[s.level].nice_length;
+  s.max_chain_length = configuration_table[s.level].max_chain;
+
+  s.strstart = 0;
+  s.block_start = 0;
+  s.lookahead = 0;
+  s.insert = 0;
+  s.match_length = s.prev_length = MIN_MATCH - 1;
+  s.match_available = 0;
+  s.ins_h = 0;
+}
+
+
+function DeflateState() {
+  this.strm = null;            /* pointer back to this zlib stream */
+  this.status = 0;            /* as the name implies */
+  this.pending_buf = null;      /* output still pending */
+  this.pending_buf_size = 0;  /* size of pending_buf */
+  this.pending_out = 0;       /* next pending byte to output to the stream */
+  this.pending = 0;           /* nb of bytes in the pending buffer */
+  this.wrap = 0;              /* bit 0 true for zlib, bit 1 true for gzip */
+  this.gzhead = null;         /* gzip header information to write */
+  this.gzindex = 0;           /* where in extra, name, or comment */
+  this.method = Z_DEFLATED; /* can only be DEFLATED */
+  this.last_flush = -1;   /* value of flush param for previous deflate call */
+
+  this.w_size = 0;  /* LZ77 window size (32K by default) */
+  this.w_bits = 0;  /* log2(w_size)  (8..16) */
+  this.w_mask = 0;  /* w_size - 1 */
+
+  this.window = null;
+  /* Sliding window. Input bytes are read into the second half of the window,
+   * and move to the first half later to keep a dictionary of at least wSize
+   * bytes. With this organization, matches are limited to a distance of
+   * wSize-MAX_MATCH bytes, but this ensures that IO is always
+   * performed with a length multiple of the block size.
+   */
+
+  this.window_size = 0;
+  /* Actual size of window: 2*wSize, except when the user input buffer
+   * is directly used as sliding window.
+   */
+
+  this.prev = null;
+  /* Link to older string with same hash index. To limit the size of this
+   * array to 64K, this link is maintained only for the last 32K strings.
+   * An index in this array is thus a window index modulo 32K.
+   */
+
+  this.head = null;   /* Heads of the hash chains or NIL. */
+
+  this.ins_h = 0;       /* hash index of string to be inserted */
+  this.hash_size = 0;   /* number of elements in hash table */
+  this.hash_bits = 0;   /* log2(hash_size) */
+  this.hash_mask = 0;   /* hash_size-1 */
+
+  this.hash_shift = 0;
+  /* Number of bits by which ins_h must be shifted at each input
+   * step. It must be such that after MIN_MATCH steps, the oldest
+   * byte no longer takes part in the hash key, that is:
+   *   hash_shift * MIN_MATCH >= hash_bits
+   */
+
+  this.block_start = 0;
+  /* Window position at the beginning of the current output block. Gets
+   * negative when the window is moved backwards.
+   */
+
+  this.match_length = 0;      /* length of best match */
+  this.prev_match = 0;        /* previous match */
+  this.match_available = 0;   /* set if previous match exists */
+  this.strstart = 0;          /* start of string to insert */
+  this.match_start = 0;       /* start of matching string */
+  this.lookahead = 0;         /* number of valid bytes ahead in window */
+
+  this.prev_length = 0;
+  /* Length of the best match at previous step. Matches not greater than this
+   * are discarded. This is used in the lazy match evaluation.
+   */
+
+  this.max_chain_length = 0;
+  /* To speed up deflation, hash chains are never searched beyond this
+   * length.  A higher limit improves compression ratio but degrades the
+   * speed.
+   */
+
+  this.max_lazy_match = 0;
+  /* Attempt to find a better match only when the current match is strictly
+   * smaller than this value. This mechanism is used only for compression
+   * levels >= 4.
+   */
+  // That's alias to max_lazy_match, don't use directly
+  //this.max_insert_length = 0;
+  /* Insert new strings in the hash table only if the match length is not
+   * greater than this length. This saves time but degrades compression.
+   * max_insert_length is used only for compression levels <= 3.
+   */
+
+  this.level = 0;     /* compression level (1..9) */
+  this.strategy = 0;  /* favor or force Huffman coding*/
+
+  this.good_match = 0;
+  /* Use a faster search when the previous match is longer than this */
+
+  this.nice_match = 0; /* Stop searching when current match exceeds this */
+
+              /* used by trees.c: */
+
+  /* Didn't use ct_data typedef below to suppress compiler warning */
+
+  // struct ct_data_s dyn_ltree[HEAP_SIZE];   /* literal and length tree */
+  // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */
+  // struct ct_data_s bl_tree[2*BL_CODES+1];  /* Huffman tree for bit lengths */
+
+  // Use flat array of DOUBLE size, with interleaved fata,
+  // because JS does not support effective
+  this.dyn_ltree  = new utils.Buf16(HEAP_SIZE * 2);
+  this.dyn_dtree  = new utils.Buf16((2 * D_CODES + 1) * 2);
+  this.bl_tree    = new utils.Buf16((2 * BL_CODES + 1) * 2);
+  zero(this.dyn_ltree);
+  zero(this.dyn_dtree);
+  zero(this.bl_tree);
+
+  this.l_desc   = null;         /* desc. for literal tree */
+  this.d_desc   = null;         /* desc. for distance tree */
+  this.bl_desc  = null;         /* desc. for bit length tree */
+
+  //ush bl_count[MAX_BITS+1];
+  this.bl_count = new utils.Buf16(MAX_BITS + 1);
+  /* number of codes at each bit length for an optimal tree */
+
+  //int heap[2*L_CODES+1];      /* heap used to build the Huffman trees */
+  this.heap = new utils.Buf16(2 * L_CODES + 1);  /* heap used to build the Huffman trees */
+  zero(this.heap);
+
+  this.heap_len = 0;               /* number of elements in the heap */
+  this.heap_max = 0;               /* element of largest frequency */
+  /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.
+   * The same heap array is used to build all trees.
+   */
+
+  this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1];
+  zero(this.depth);
+  /* Depth of each subtree used as tie breaker for trees of equal frequency
+   */
+
+  this.l_buf = 0;          /* buffer index for literals or lengths */
+
+  this.lit_bufsize = 0;
+  /* Size of match buffer for literals/lengths.  There are 4 reasons for
+   * limiting lit_bufsize to 64K:
+   *   - frequencies can be kept in 16 bit counters
+   *   - if compression is not successful for the first block, all input
+   *     data is still in the window so we can still emit a stored block even
+   *     when input comes from standard input.  (This can also be done for
+   *     all blocks if lit_bufsize is not greater than 32K.)
+   *   - if compression is not successful for a file smaller than 64K, we can
+   *     even emit a stored file instead of a stored block (saving 5 bytes).
+   *     This is applicable only for zip (not gzip or zlib).
+   *   - creating new Huffman trees less frequently may not provide fast
+   *     adaptation to changes in the input data statistics. (Take for
+   *     example a binary file with poorly compressible code followed by
+   *     a highly compressible string table.) Smaller buffer sizes give
+   *     fast adaptation but have of course the overhead of transmitting
+   *     trees more frequently.
+   *   - I can't count above 4
+   */
+
+  this.last_lit = 0;      /* running index in l_buf */
+
+  this.d_buf = 0;
+  /* Buffer index for distances. To simplify the code, d_buf and l_buf have
+   * the same number of elements. To use different lengths, an extra flag
+   * array would be necessary.
+   */
+
+  this.opt_len = 0;       /* bit length of current block with optimal trees */
+  this.static_len = 0;    /* bit length of current block with static trees */
+  this.matches = 0;       /* number of string matches in current block */
+  this.insert = 0;        /* bytes at end of window left to insert */
+
+
+  this.bi_buf = 0;
+  /* Output buffer. bits are inserted starting at the bottom (least
+   * significant bits).
+   */
+  this.bi_valid = 0;
+  /* Number of valid bits in bi_buf.  All bits above the last valid bit
+   * are always zero.
+   */
+
+  // Used for window memory init. We safely ignore it for JS. That makes
+  // sense only for pointers and memory check tools.
+  //this.high_water = 0;
+  /* High water mark offset in window for initialized bytes -- bytes above
+   * this are set to zero in order to avoid memory check warnings when
+   * longest match routines access bytes past the input.  This is then
+   * updated to the new high water mark.
+   */
+}
+
+
+function deflateResetKeep(strm) {
+  var s;
+
+  if (!strm || !strm.state) {
+    return err(strm, Z_STREAM_ERROR);
+  }
+
+  strm.total_in = strm.total_out = 0;
+  strm.data_type = Z_UNKNOWN;
+
+  s = strm.state;
+  s.pending = 0;
+  s.pending_out = 0;
+
+  if (s.wrap < 0) {
+    s.wrap = -s.wrap;
+    /* was made negative by deflate(..., Z_FINISH); */
+  }
+  s.status = (s.wrap ? INIT_STATE : BUSY_STATE);
+  strm.adler = (s.wrap === 2) ?
+    0  // crc32(0, Z_NULL, 0)
+  :
+    1; // adler32(0, Z_NULL, 0)
+  s.last_flush = Z_NO_FLUSH;
+  trees._tr_init(s);
+  return Z_OK;
+}
+
+
+function deflateReset(strm) {
+  var ret = deflateResetKeep(strm);
+  if (ret === Z_OK) {
+    lm_init(strm.state);
+  }
+  return ret;
+}
+
+
+function deflateSetHeader(strm, head) {
+  if (!strm || !strm.state) { return Z_STREAM_ERROR; }
+  if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }
+  strm.state.gzhead = head;
+  return Z_OK;
+}
+
+
+function deflateInit2(strm, level, method, windowBits, memLevel, strategy) {
+  if (!strm) { // === Z_NULL
+    return Z_STREAM_ERROR;
+  }
+  var wrap = 1;
+
+  if (level === Z_DEFAULT_COMPRESSION) {
+    level = 6;
+  }
+
+  if (windowBits < 0) { /* suppress zlib wrapper */
+    wrap = 0;
+    windowBits = -windowBits;
+  }
+
+  else if (windowBits > 15) {
+    wrap = 2;           /* write gzip wrapper instead */
+    windowBits -= 16;
+  }
+
+
+  if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||
+    windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
+    strategy < 0 || strategy > Z_FIXED) {
+    return err(strm, Z_STREAM_ERROR);
+  }
+
+
+  if (windowBits === 8) {
+    windowBits = 9;
+  }
+  /* until 256-byte window bug fixed */
+
+  var s = new DeflateState();
+
+  strm.state = s;
+  s.strm = strm;
+
+  s.wrap = wrap;
+  s.gzhead = null;
+  s.w_bits = windowBits;
+  s.w_size = 1 << s.w_bits;
+  s.w_mask = s.w_size - 1;
+
+  s.hash_bits = memLevel + 7;
+  s.hash_size = 1 << s.hash_bits;
+  s.hash_mask = s.hash_size - 1;
+  s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);
+
+  s.window = new utils.Buf8(s.w_size * 2);
+  s.head = new utils.Buf16(s.hash_size);
+  s.prev = new utils.Buf16(s.w_size);
+
+  // Don't need mem init magic for JS.
+  //s.high_water = 0;  /* nothing written to s->window yet */
+
+  s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */
+
+  s.pending_buf_size = s.lit_bufsize * 4;
+
+  //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);
+  //s->pending_buf = (uchf *) overlay;
+  s.pending_buf = new utils.Buf8(s.pending_buf_size);
+
+  // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)
+  //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);
+  s.d_buf = 1 * s.lit_bufsize;
+
+  //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;
+  s.l_buf = (1 + 2) * s.lit_bufsize;
+
+  s.level = level;
+  s.strategy = strategy;
+  s.method = method;
+
+  return deflateReset(strm);
+}
+
+function deflateInit(strm, level) {
+  return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);
+}
+
+
+function deflate(strm, flush) {
+  var old_flush, s;
+  var beg, val; // for gzip header write only
+
+  if (!strm || !strm.state ||
+    flush > Z_BLOCK || flush < 0) {
+    return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;
+  }
+
+  s = strm.state;
+
+  if (!strm.output ||
+      (!strm.input && strm.avail_in !== 0) ||
+      (s.status === FINISH_STATE && flush !== Z_FINISH)) {
+    return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);
+  }
+
+  s.strm = strm; /* just in case */
+  old_flush = s.last_flush;
+  s.last_flush = flush;
+
+  /* Write the header */
+  if (s.status === INIT_STATE) {
+
+    if (s.wrap === 2) { // GZIP header
+      strm.adler = 0;  //crc32(0L, Z_NULL, 0);
+      put_byte(s, 31);
+      put_byte(s, 139);
+      put_byte(s, 8);
+      if (!s.gzhead) { // s->gzhead == Z_NULL
+        put_byte(s, 0);
+        put_byte(s, 0);
+        put_byte(s, 0);
+        put_byte(s, 0);
+        put_byte(s, 0);
+        put_byte(s, s.level === 9 ? 2 :
+                    (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?
+                     4 : 0));
+        put_byte(s, OS_CODE);
+        s.status = BUSY_STATE;
+      }
+      else {
+        put_byte(s, (s.gzhead.text ? 1 : 0) +
+                    (s.gzhead.hcrc ? 2 : 0) +
+                    (!s.gzhead.extra ? 0 : 4) +
+                    (!s.gzhead.name ? 0 : 8) +
+                    (!s.gzhead.comment ? 0 : 16)
+                );
+        put_byte(s, s.gzhead.time & 0xff);
+        put_byte(s, (s.gzhead.time >> 8) & 0xff);
+        put_byte(s, (s.gzhead.time >> 16) & 0xff);
+        put_byte(s, (s.gzhead.time >> 24) & 0xff);
+        put_byte(s, s.level === 9 ? 2 :
+                    (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?
+                     4 : 0));
+        put_byte(s, s.gzhead.os & 0xff);
+        if (s.gzhead.extra && s.gzhead.extra.length) {
+          put_byte(s, s.gzhead.extra.length & 0xff);
+          put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);
+        }
+        if (s.gzhead.hcrc) {
+          strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);
+        }
+        s.gzindex = 0;
+        s.status = EXTRA_STATE;
+      }
+    }
+    else // DEFLATE header
+    {
+      var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;
+      var level_flags = -1;
+
+      if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {
+        level_flags = 0;
+      } else if (s.level < 6) {
+        level_flags = 1;
+      } else if (s.level === 6) {
+        level_flags = 2;
+      } else {
+        level_flags = 3;
+      }
+      header |= (level_flags << 6);
+      if (s.strstart !== 0) { header |= PRESET_DICT; }
+      header += 31 - (header % 31);
+
+      s.status = BUSY_STATE;
+      putShortMSB(s, header);
+
+      /* Save the adler32 of the preset dictionary: */
+      if (s.strstart !== 0) {
+        putShortMSB(s, strm.adler >>> 16);
+        putShortMSB(s, strm.adler & 0xffff);
+      }
+      strm.adler = 1; // adler32(0L, Z_NULL, 0);
+    }
+  }
+
+//#ifdef GZIP
+  if (s.status === EXTRA_STATE) {
+    if (s.gzhead.extra/* != Z_NULL*/) {
+      beg = s.pending;  /* start of bytes to update crc */
+
+      while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {
+        if (s.pending === s.pending_buf_size) {
+          if (s.gzhead.hcrc && s.pending > beg) {
+            strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
+          }
+          flush_pending(strm);
+          beg = s.pending;
+          if (s.pending === s.pending_buf_size) {
+            break;
+          }
+        }
+        put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);
+        s.gzindex++;
+      }
+      if (s.gzhead.hcrc && s.pending > beg) {
+        strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
+      }
+      if (s.gzindex === s.gzhead.extra.length) {
+        s.gzindex = 0;
+        s.status = NAME_STATE;
+      }
+    }
+    else {
+      s.status = NAME_STATE;
+    }
+  }
+  if (s.status === NAME_STATE) {
+    if (s.gzhead.name/* != Z_NULL*/) {
+      beg = s.pending;  /* start of bytes to update crc */
+      //int val;
+
+      do {
+        if (s.pending === s.pending_buf_size) {
+          if (s.gzhead.hcrc && s.pending > beg) {
+            strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
+          }
+          flush_pending(strm);
+          beg = s.pending;
+          if (s.pending === s.pending_buf_size) {
+            val = 1;
+            break;
+          }
+        }
+        // JS specific: little magic to add zero terminator to end of string
+        if (s.gzindex < s.gzhead.name.length) {
+          val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;
+        } else {
+          val = 0;
+        }
+        put_byte(s, val);
+      } while (val !== 0);
+
+      if (s.gzhead.hcrc && s.pending > beg) {
+        strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
+      }
+      if (val === 0) {
+        s.gzindex = 0;
+        s.status = COMMENT_STATE;
+      }
+    }
+    else {
+      s.status = COMMENT_STATE;
+    }
+  }
+  if (s.status === COMMENT_STATE) {
+    if (s.gzhead.comment/* != Z_NULL*/) {
+      beg = s.pending;  /* start of bytes to update crc */
+      //int val;
+
+      do {
+        if (s.pending === s.pending_buf_size) {
+          if (s.gzhead.hcrc && s.pending > beg) {
+            strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
+          }
+          flush_pending(strm);
+          beg = s.pending;
+          if (s.pending === s.pending_buf_size) {
+            val = 1;
+            break;
+          }
+        }
+        // JS specific: little magic to add zero terminator to end of string
+        if (s.gzindex < s.gzhead.comment.length) {
+          val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;
+        } else {
+          val = 0;
+        }
+        put_byte(s, val);
+      } while (val !== 0);
+
+      if (s.gzhead.hcrc && s.pending > beg) {
+        strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
+      }
+      if (val === 0) {
+        s.status = HCRC_STATE;
+      }
+    }
+    else {
+      s.status = HCRC_STATE;
+    }
+  }
+  if (s.status === HCRC_STATE) {
+    if (s.gzhead.hcrc) {
+      if (s.pending + 2 > s.pending_buf_size) {
+        flush_pending(strm);
+      }
+      if (s.pending + 2 <= s.pending_buf_size) {
+        put_byte(s, strm.adler & 0xff);
+        put_byte(s, (strm.adler >> 8) & 0xff);
+        strm.adler = 0; //crc32(0L, Z_NULL, 0);
+        s.status = BUSY_STATE;
+      }
+    }
+    else {
+      s.status = BUSY_STATE;
+    }
+  }
+//#endif
+
+  /* Flush as much pending output as possible */
+  if (s.pending !== 0) {
+    flush_pending(strm);
+    if (strm.avail_out === 0) {
+      /* Since avail_out is 0, deflate will be called again with
+       * more output space, but possibly with both pending and
+       * avail_in equal to zero. There won't be anything to do,
+       * but this is not an error situation so make sure we
+       * return OK instead of BUF_ERROR at next call of deflate:
+       */
+      s.last_flush = -1;
+      return Z_OK;
+    }
+
+    /* Make sure there is something to do and avoid duplicate consecutive
+     * flushes. For repeated and useless calls with Z_FINISH, we keep
+     * returning Z_STREAM_END instead of Z_BUF_ERROR.
+     */
+  } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&
+    flush !== Z_FINISH) {
+    return err(strm, Z_BUF_ERROR);
+  }
+
+  /* User must not provide more input after the first FINISH: */
+  if (s.status === FINISH_STATE && strm.avail_in !== 0) {
+    return err(strm, Z_BUF_ERROR);
+  }
+
+  /* Start a new block or continue the current one.
+   */
+  if (strm.avail_in !== 0 || s.lookahead !== 0 ||
+    (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {
+    var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :
+      (s.strategy === Z_RLE ? deflate_rle(s, flush) :
+        configuration_table[s.level].func(s, flush));
+
+    if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {
+      s.status = FINISH_STATE;
+    }
+    if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {
+      if (strm.avail_out === 0) {
+        s.last_flush = -1;
+        /* avoid BUF_ERROR next call, see above */
+      }
+      return Z_OK;
+      /* If flush != Z_NO_FLUSH && avail_out == 0, the next call
+       * of deflate should use the same flush parameter to make sure
+       * that the flush is complete. So we don't have to output an
+       * empty block here, this will be done at next call. This also
+       * ensures that for a very small output buffer, we emit at most
+       * one empty block.
+       */
+    }
+    if (bstate === BS_BLOCK_DONE) {
+      if (flush === Z_PARTIAL_FLUSH) {
+        trees._tr_align(s);
+      }
+      else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */
+
+        trees._tr_stored_block(s, 0, 0, false);
+        /* For a full flush, this empty block will be recognized
+         * as a special marker by inflate_sync().
+         */
+        if (flush === Z_FULL_FLUSH) {
+          /*** CLEAR_HASH(s); ***/             /* forget history */
+          zero(s.head); // Fill with NIL (= 0);
+
+          if (s.lookahead === 0) {
+            s.strstart = 0;
+            s.block_start = 0;
+            s.insert = 0;
+          }
+        }
+      }
+      flush_pending(strm);
+      if (strm.avail_out === 0) {
+        s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */
+        return Z_OK;
+      }
+    }
+  }
+  //Assert(strm->avail_out > 0, "bug2");
+  //if (strm.avail_out <= 0) { throw new Error("bug2");}
+
+  if (flush !== Z_FINISH) { return Z_OK; }
+  if (s.wrap <= 0) { return Z_STREAM_END; }
+
+  /* Write the trailer */
+  if (s.wrap === 2) {
+    put_byte(s, strm.adler & 0xff);
+    put_byte(s, (strm.adler >> 8) & 0xff);
+    put_byte(s, (strm.adler >> 16) & 0xff);
+    put_byte(s, (strm.adler >> 24) & 0xff);
+    put_byte(s, strm.total_in & 0xff);
+    put_byte(s, (strm.total_in >> 8) & 0xff);
+    put_byte(s, (strm.total_in >> 16) & 0xff);
+    put_byte(s, (strm.total_in >> 24) & 0xff);
+  }
+  else
+  {
+    putShortMSB(s, strm.adler >>> 16);
+    putShortMSB(s, strm.adler & 0xffff);
+  }
+
+  flush_pending(strm);
+  /* If avail_out is zero, the application will call deflate again
+   * to flush the rest.
+   */
+  if (s.wrap > 0) { s.wrap = -s.wrap; }
+  /* write the trailer only once! */
+  return s.pending !== 0 ? Z_OK : Z_STREAM_END;
+}
+
+function deflateEnd(strm) {
+  var status;
+
+  if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {
+    return Z_STREAM_ERROR;
+  }
+
+  status = strm.state.status;
+  if (status !== INIT_STATE &&
+    status !== EXTRA_STATE &&
+    status !== NAME_STATE &&
+    status !== COMMENT_STATE &&
+    status !== HCRC_STATE &&
+    status !== BUSY_STATE &&
+    status !== FINISH_STATE
+  ) {
+    return err(strm, Z_STREAM_ERROR);
+  }
+
+  strm.state = null;
+
+  return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;
+}
+
+
+/* =========================================================================
+ * Initializes the compression dictionary from the given byte
+ * sequence without producing any compressed output.
+ */
+function deflateSetDictionary(strm, dictionary) {
+  var dictLength = dictionary.length;
+
+  var s;
+  var str, n;
+  var wrap;
+  var avail;
+  var next;
+  var input;
+  var tmpDict;
+
+  if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {
+    return Z_STREAM_ERROR;
+  }
+
+  s = strm.state;
+  wrap = s.wrap;
+
+  if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {
+    return Z_STREAM_ERROR;
+  }
+
+  /* when using zlib wrappers, compute Adler-32 for provided dictionary */
+  if (wrap === 1) {
+    /* adler32(strm->adler, dictionary, dictLength); */
+    strm.adler = adler32(strm.adler, dictionary, dictLength, 0);
+  }
+
+  s.wrap = 0;   /* avoid computing Adler-32 in read_buf */
+
+  /* if dictionary would fill window, just replace the history */
+  if (dictLength >= s.w_size) {
+    if (wrap === 0) {            /* already empty otherwise */
+      /*** CLEAR_HASH(s); ***/
+      zero(s.head); // Fill with NIL (= 0);
+      s.strstart = 0;
+      s.block_start = 0;
+      s.insert = 0;
+    }
+    /* use the tail */
+    // dictionary = dictionary.slice(dictLength - s.w_size);
+    tmpDict = new utils.Buf8(s.w_size);
+    utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0);
+    dictionary = tmpDict;
+    dictLength = s.w_size;
+  }
+  /* insert dictionary into window and hash */
+  avail = strm.avail_in;
+  next = strm.next_in;
+  input = strm.input;
+  strm.avail_in = dictLength;
+  strm.next_in = 0;
+  strm.input = dictionary;
+  fill_window(s);
+  while (s.lookahead >= MIN_MATCH) {
+    str = s.strstart;
+    n = s.lookahead - (MIN_MATCH - 1);
+    do {
+      /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */
+      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;
+
+      s.prev[str & s.w_mask] = s.head[s.ins_h];
+
+      s.head[s.ins_h] = str;
+      str++;
+    } while (--n);
+    s.strstart = str;
+    s.lookahead = MIN_MATCH - 1;
+    fill_window(s);
+  }
+  s.strstart += s.lookahead;
+  s.block_start = s.strstart;
+  s.insert = s.lookahead;
+  s.lookahead = 0;
+  s.match_length = s.prev_length = MIN_MATCH - 1;
+  s.match_available = 0;
+  strm.next_in = next;
+  strm.input = input;
+  strm.avail_in = avail;
+  s.wrap = wrap;
+  return Z_OK;
+}
+
+
+exports.deflateInit = deflateInit;
+exports.deflateInit2 = deflateInit2;
+exports.deflateReset = deflateReset;
+exports.deflateResetKeep = deflateResetKeep;
+exports.deflateSetHeader = deflateSetHeader;
+exports.deflate = deflate;
+exports.deflateEnd = deflateEnd;
+exports.deflateSetDictionary = deflateSetDictionary;
+exports.deflateInfo = 'pako deflate (from Nodeca project)';
+
+/* Not implemented
+exports.deflateBound = deflateBound;
+exports.deflateCopy = deflateCopy;
+exports.deflateParams = deflateParams;
+exports.deflatePending = deflatePending;
+exports.deflatePrime = deflatePrime;
+exports.deflateTune = deflateTune;
+*/
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/pako/lib/zlib/gzheader.js":
+/*!*******************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/pako/lib/zlib/gzheader.js ***!
+  \*******************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+// (C) 1995-2013 Jean-loup Gailly and Mark Adler
+// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+//   claim that you wrote the original software. If you use this software
+//   in a product, an acknowledgment in the product documentation would be
+//   appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+//   misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+
+function GZheader() {
+  /* true if compressed data believed to be text */
+  this.text       = 0;
+  /* modification time */
+  this.time       = 0;
+  /* extra flags (not used when writing a gzip file) */
+  this.xflags     = 0;
+  /* operating system */
+  this.os         = 0;
+  /* pointer to extra field or Z_NULL if none */
+  this.extra      = null;
+  /* extra field length (valid if extra != Z_NULL) */
+  this.extra_len  = 0; // Actually, we don't need it in JS,
+                       // but leave for few code modifications
+
+  //
+  // Setup limits is not necessary because in js we should not preallocate memory
+  // for inflate use constant limit in 65536 bytes
+  //
+
+  /* space at extra (only when reading header) */
+  // this.extra_max  = 0;
+  /* pointer to zero-terminated file name or Z_NULL */
+  this.name       = '';
+  /* space at name (only when reading header) */
+  // this.name_max   = 0;
+  /* pointer to zero-terminated comment or Z_NULL */
+  this.comment    = '';
+  /* space at comment (only when reading header) */
+  // this.comm_max   = 0;
+  /* true if there was or will be a header crc */
+  this.hcrc       = 0;
+  /* true when done reading gzip header (not used when writing a gzip file) */
+  this.done       = false;
+}
+
+module.exports = GZheader;
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/pako/lib/zlib/inffast.js":
+/*!******************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/pako/lib/zlib/inffast.js ***!
+  \******************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+// (C) 1995-2013 Jean-loup Gailly and Mark Adler
+// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+//   claim that you wrote the original software. If you use this software
+//   in a product, an acknowledgment in the product documentation would be
+//   appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+//   misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+
+// See state defs from inflate.js
+var BAD = 30;       /* got a data error -- remain here until reset */
+var TYPE = 12;      /* i: waiting for type bits, including last-flag bit */
+
+/*
+   Decode literal, length, and distance codes and write out the resulting
+   literal and match bytes until either not enough input or output is
+   available, an end-of-block is encountered, or a data error is encountered.
+   When large enough input and output buffers are supplied to inflate(), for
+   example, a 16K input buffer and a 64K output buffer, more than 95% of the
+   inflate execution time is spent in this routine.
+
+   Entry assumptions:
+
+        state.mode === LEN
+        strm.avail_in >= 6
+        strm.avail_out >= 258
+        start >= strm.avail_out
+        state.bits < 8
+
+   On return, state.mode is one of:
+
+        LEN -- ran out of enough output space or enough available input
+        TYPE -- reached end of block code, inflate() to interpret next block
+        BAD -- error in block data
+
+   Notes:
+
+    - The maximum input bits used by a length/distance pair is 15 bits for the
+      length code, 5 bits for the length extra, 15 bits for the distance code,
+      and 13 bits for the distance extra.  This totals 48 bits, or six bytes.
+      Therefore if strm.avail_in >= 6, then there is enough input to avoid
+      checking for available input while decoding.
+
+    - The maximum bytes that a single length/distance pair can output is 258
+      bytes, which is the maximum length that can be coded.  inflate_fast()
+      requires strm.avail_out >= 258 for each loop to avoid checking for
+      output space.
+ */
+module.exports = function inflate_fast(strm, start) {
+  var state;
+  var _in;                    /* local strm.input */
+  var last;                   /* have enough input while in < last */
+  var _out;                   /* local strm.output */
+  var beg;                    /* inflate()'s initial strm.output */
+  var end;                    /* while out < end, enough space available */
+//#ifdef INFLATE_STRICT
+  var dmax;                   /* maximum distance from zlib header */
+//#endif
+  var wsize;                  /* window size or zero if not using window */
+  var whave;                  /* valid bytes in the window */
+  var wnext;                  /* window write index */
+  // Use `s_window` instead `window`, avoid conflict with instrumentation tools
+  var s_window;               /* allocated sliding window, if wsize != 0 */
+  var hold;                   /* local strm.hold */
+  var bits;                   /* local strm.bits */
+  var lcode;                  /* local strm.lencode */
+  var dcode;                  /* local strm.distcode */
+  var lmask;                  /* mask for first level of length codes */
+  var dmask;                  /* mask for first level of distance codes */
+  var here;                   /* retrieved table entry */
+  var op;                     /* code bits, operation, extra bits, or */
+                              /*  window position, window bytes to copy */
+  var len;                    /* match length, unused bytes */
+  var dist;                   /* match distance */
+  var from;                   /* where to copy match from */
+  var from_source;
+
+
+  var input, output; // JS specific, because we have no pointers
+
+  /* copy state to local variables */
+  state = strm.state;
+  //here = state.here;
+  _in = strm.next_in;
+  input = strm.input;
+  last = _in + (strm.avail_in - 5);
+  _out = strm.next_out;
+  output = strm.output;
+  beg = _out - (start - strm.avail_out);
+  end = _out + (strm.avail_out - 257);
+//#ifdef INFLATE_STRICT
+  dmax = state.dmax;
+//#endif
+  wsize = state.wsize;
+  whave = state.whave;
+  wnext = state.wnext;
+  s_window = state.window;
+  hold = state.hold;
+  bits = state.bits;
+  lcode = state.lencode;
+  dcode = state.distcode;
+  lmask = (1 << state.lenbits) - 1;
+  dmask = (1 << state.distbits) - 1;
+
+
+  /* decode literals and length/distances until end-of-block or not enough
+     input data or output space */
+
+  top:
+  do {
+    if (bits < 15) {
+      hold += input[_in++] << bits;
+      bits += 8;
+      hold += input[_in++] << bits;
+      bits += 8;
+    }
+
+    here = lcode[hold & lmask];
+
+    dolen:
+    for (;;) { // Goto emulation
+      op = here >>> 24/*here.bits*/;
+      hold >>>= op;
+      bits -= op;
+      op = (here >>> 16) & 0xff/*here.op*/;
+      if (op === 0) {                          /* literal */
+        //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
+        //        "inflate:         literal '%c'\n" :
+        //        "inflate:         literal 0x%02x\n", here.val));
+        output[_out++] = here & 0xffff/*here.val*/;
+      }
+      else if (op & 16) {                     /* length base */
+        len = here & 0xffff/*here.val*/;
+        op &= 15;                           /* number of extra bits */
+        if (op) {
+          if (bits < op) {
+            hold += input[_in++] << bits;
+            bits += 8;
+          }
+          len += hold & ((1 << op) - 1);
+          hold >>>= op;
+          bits -= op;
+        }
+        //Tracevv((stderr, "inflate:         length %u\n", len));
+        if (bits < 15) {
+          hold += input[_in++] << bits;
+          bits += 8;
+          hold += input[_in++] << bits;
+          bits += 8;
+        }
+        here = dcode[hold & dmask];
+
+        dodist:
+        for (;;) { // goto emulation
+          op = here >>> 24/*here.bits*/;
+          hold >>>= op;
+          bits -= op;
+          op = (here >>> 16) & 0xff/*here.op*/;
+
+          if (op & 16) {                      /* distance base */
+            dist = here & 0xffff/*here.val*/;
+            op &= 15;                       /* number of extra bits */
+            if (bits < op) {
+              hold += input[_in++] << bits;
+              bits += 8;
+              if (bits < op) {
+                hold += input[_in++] << bits;
+                bits += 8;
+              }
+            }
+            dist += hold & ((1 << op) - 1);
+//#ifdef INFLATE_STRICT
+            if (dist > dmax) {
+              strm.msg = 'invalid distance too far back';
+              state.mode = BAD;
+              break top;
+            }
+//#endif
+            hold >>>= op;
+            bits -= op;
+            //Tracevv((stderr, "inflate:         distance %u\n", dist));
+            op = _out - beg;                /* max distance in output */
+            if (dist > op) {                /* see if copy from window */
+              op = dist - op;               /* distance back in window */
+              if (op > whave) {
+                if (state.sane) {
+                  strm.msg = 'invalid distance too far back';
+                  state.mode = BAD;
+                  break top;
+                }
+
+// (!) This block is disabled in zlib defaults,
+// don't enable it for binary compatibility
+//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
+//                if (len <= op - whave) {
+//                  do {
+//                    output[_out++] = 0;
+//                  } while (--len);
+//                  continue top;
+//                }
+//                len -= op - whave;
+//                do {
+//                  output[_out++] = 0;
+//                } while (--op > whave);
+//                if (op === 0) {
+//                  from = _out - dist;
+//                  do {
+//                    output[_out++] = output[from++];
+//                  } while (--len);
+//                  continue top;
+//                }
+//#endif
+              }
+              from = 0; // window index
+              from_source = s_window;
+              if (wnext === 0) {           /* very common case */
+                from += wsize - op;
+                if (op < len) {         /* some from window */
+                  len -= op;
+                  do {
+                    output[_out++] = s_window[from++];
+                  } while (--op);
+                  from = _out - dist;  /* rest from output */
+                  from_source = output;
+                }
+              }
+              else if (wnext < op) {      /* wrap around window */
+                from += wsize + wnext - op;
+                op -= wnext;
+                if (op < len) {         /* some from end of window */
+                  len -= op;
+                  do {
+                    output[_out++] = s_window[from++];
+                  } while (--op);
+                  from = 0;
+                  if (wnext < len) {  /* some from start of window */
+                    op = wnext;
+                    len -= op;
+                    do {
+                      output[_out++] = s_window[from++];
+                    } while (--op);
+                    from = _out - dist;      /* rest from output */
+                    from_source = output;
+                  }
+                }
+              }
+              else {                      /* contiguous in window */
+                from += wnext - op;
+                if (op < len) {         /* some from window */
+                  len -= op;
+                  do {
+                    output[_out++] = s_window[from++];
+                  } while (--op);
+                  from = _out - dist;  /* rest from output */
+                  from_source = output;
+                }
+              }
+              while (len > 2) {
+                output[_out++] = from_source[from++];
+                output[_out++] = from_source[from++];
+                output[_out++] = from_source[from++];
+                len -= 3;
+              }
+              if (len) {
+                output[_out++] = from_source[from++];
+                if (len > 1) {
+                  output[_out++] = from_source[from++];
+                }
+              }
+            }
+            else {
+              from = _out - dist;          /* copy direct from output */
+              do {                        /* minimum length is three */
+                output[_out++] = output[from++];
+                output[_out++] = output[from++];
+                output[_out++] = output[from++];
+                len -= 3;
+              } while (len > 2);
+              if (len) {
+                output[_out++] = output[from++];
+                if (len > 1) {
+                  output[_out++] = output[from++];
+                }
+              }
+            }
+          }
+          else if ((op & 64) === 0) {          /* 2nd level distance code */
+            here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];
+            continue dodist;
+          }
+          else {
+            strm.msg = 'invalid distance code';
+            state.mode = BAD;
+            break top;
+          }
+
+          break; // need to emulate goto via "continue"
+        }
+      }
+      else if ((op & 64) === 0) {              /* 2nd level length code */
+        here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];
+        continue dolen;
+      }
+      else if (op & 32) {                     /* end-of-block */
+        //Tracevv((stderr, "inflate:         end of block\n"));
+        state.mode = TYPE;
+        break top;
+      }
+      else {
+        strm.msg = 'invalid literal/length code';
+        state.mode = BAD;
+        break top;
+      }
+
+      break; // need to emulate goto via "continue"
+    }
+  } while (_in < last && _out < end);
+
+  /* return unused bytes (on entry, bits < 8, so in won't go too far back) */
+  len = bits >> 3;
+  _in -= len;
+  bits -= len << 3;
+  hold &= (1 << bits) - 1;
+
+  /* update state and return */
+  strm.next_in = _in;
+  strm.next_out = _out;
+  strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));
+  strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));
+  state.hold = hold;
+  state.bits = bits;
+  return;
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/pako/lib/zlib/inflate.js":
+/*!******************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/pako/lib/zlib/inflate.js ***!
+  \******************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+// (C) 1995-2013 Jean-loup Gailly and Mark Adler
+// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+//   claim that you wrote the original software. If you use this software
+//   in a product, an acknowledgment in the product documentation would be
+//   appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+//   misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+
+var utils         = __webpack_require__(/*! ../utils/common */ "./node_modules/jszip/node_modules/pako/lib/utils/common.js");
+var adler32       = __webpack_require__(/*! ./adler32 */ "./node_modules/jszip/node_modules/pako/lib/zlib/adler32.js");
+var crc32         = __webpack_require__(/*! ./crc32 */ "./node_modules/jszip/node_modules/pako/lib/zlib/crc32.js");
+var inflate_fast  = __webpack_require__(/*! ./inffast */ "./node_modules/jszip/node_modules/pako/lib/zlib/inffast.js");
+var inflate_table = __webpack_require__(/*! ./inftrees */ "./node_modules/jszip/node_modules/pako/lib/zlib/inftrees.js");
+
+var CODES = 0;
+var LENS = 1;
+var DISTS = 2;
+
+/* Public constants ==========================================================*/
+/* ===========================================================================*/
+
+
+/* Allowed flush values; see deflate() and inflate() below for details */
+//var Z_NO_FLUSH      = 0;
+//var Z_PARTIAL_FLUSH = 1;
+//var Z_SYNC_FLUSH    = 2;
+//var Z_FULL_FLUSH    = 3;
+var Z_FINISH        = 4;
+var Z_BLOCK         = 5;
+var Z_TREES         = 6;
+
+
+/* Return codes for the compression/decompression functions. Negative values
+ * are errors, positive values are used for special but normal events.
+ */
+var Z_OK            = 0;
+var Z_STREAM_END    = 1;
+var Z_NEED_DICT     = 2;
+//var Z_ERRNO         = -1;
+var Z_STREAM_ERROR  = -2;
+var Z_DATA_ERROR    = -3;
+var Z_MEM_ERROR     = -4;
+var Z_BUF_ERROR     = -5;
+//var Z_VERSION_ERROR = -6;
+
+/* The deflate compression method */
+var Z_DEFLATED  = 8;
+
+
+/* STATES ====================================================================*/
+/* ===========================================================================*/
+
+
+var    HEAD = 1;       /* i: waiting for magic header */
+var    FLAGS = 2;      /* i: waiting for method and flags (gzip) */
+var    TIME = 3;       /* i: waiting for modification time (gzip) */
+var    OS = 4;         /* i: waiting for extra flags and operating system (gzip) */
+var    EXLEN = 5;      /* i: waiting for extra length (gzip) */
+var    EXTRA = 6;      /* i: waiting for extra bytes (gzip) */
+var    NAME = 7;       /* i: waiting for end of file name (gzip) */
+var    COMMENT = 8;    /* i: waiting for end of comment (gzip) */
+var    HCRC = 9;       /* i: waiting for header crc (gzip) */
+var    DICTID = 10;    /* i: waiting for dictionary check value */
+var    DICT = 11;      /* waiting for inflateSetDictionary() call */
+var        TYPE = 12;      /* i: waiting for type bits, including last-flag bit */
+var        TYPEDO = 13;    /* i: same, but skip check to exit inflate on new block */
+var        STORED = 14;    /* i: waiting for stored size (length and complement) */
+var        COPY_ = 15;     /* i/o: same as COPY below, but only first time in */
+var        COPY = 16;      /* i/o: waiting for input or output to copy stored block */
+var        TABLE = 17;     /* i: waiting for dynamic block table lengths */
+var        LENLENS = 18;   /* i: waiting for code length code lengths */
+var        CODELENS = 19;  /* i: waiting for length/lit and distance code lengths */
+var            LEN_ = 20;      /* i: same as LEN below, but only first time in */
+var            LEN = 21;       /* i: waiting for length/lit/eob code */
+var            LENEXT = 22;    /* i: waiting for length extra bits */
+var            DIST = 23;      /* i: waiting for distance code */
+var            DISTEXT = 24;   /* i: waiting for distance extra bits */
+var            MATCH = 25;     /* o: waiting for output space to copy string */
+var            LIT = 26;       /* o: waiting for output space to write literal */
+var    CHECK = 27;     /* i: waiting for 32-bit check value */
+var    LENGTH = 28;    /* i: waiting for 32-bit length (gzip) */
+var    DONE = 29;      /* finished check, done -- remain here until reset */
+var    BAD = 30;       /* got a data error -- remain here until reset */
+var    MEM = 31;       /* got an inflate() memory error -- remain here until reset */
+var    SYNC = 32;      /* looking for synchronization bytes to restart inflate() */
+
+/* ===========================================================================*/
+
+
+
+var ENOUGH_LENS = 852;
+var ENOUGH_DISTS = 592;
+//var ENOUGH =  (ENOUGH_LENS+ENOUGH_DISTS);
+
+var MAX_WBITS = 15;
+/* 32K LZ77 window */
+var DEF_WBITS = MAX_WBITS;
+
+
+function zswap32(q) {
+  return  (((q >>> 24) & 0xff) +
+          ((q >>> 8) & 0xff00) +
+          ((q & 0xff00) << 8) +
+          ((q & 0xff) << 24));
+}
+
+
+function InflateState() {
+  this.mode = 0;             /* current inflate mode */
+  this.last = false;          /* true if processing last block */
+  this.wrap = 0;              /* bit 0 true for zlib, bit 1 true for gzip */
+  this.havedict = false;      /* true if dictionary provided */
+  this.flags = 0;             /* gzip header method and flags (0 if zlib) */
+  this.dmax = 0;              /* zlib header max distance (INFLATE_STRICT) */
+  this.check = 0;             /* protected copy of check value */
+  this.total = 0;             /* protected copy of output count */
+  // TODO: may be {}
+  this.head = null;           /* where to save gzip header information */
+
+  /* sliding window */
+  this.wbits = 0;             /* log base 2 of requested window size */
+  this.wsize = 0;             /* window size or zero if not using window */
+  this.whave = 0;             /* valid bytes in the window */
+  this.wnext = 0;             /* window write index */
+  this.window = null;         /* allocated sliding window, if needed */
+
+  /* bit accumulator */
+  this.hold = 0;              /* input bit accumulator */
+  this.bits = 0;              /* number of bits in "in" */
+
+  /* for string and stored block copying */
+  this.length = 0;            /* literal or length of data to copy */
+  this.offset = 0;            /* distance back to copy string from */
+
+  /* for table and code decoding */
+  this.extra = 0;             /* extra bits needed */
+
+  /* fixed and dynamic code tables */
+  this.lencode = null;          /* starting table for length/literal codes */
+  this.distcode = null;         /* starting table for distance codes */
+  this.lenbits = 0;           /* index bits for lencode */
+  this.distbits = 0;          /* index bits for distcode */
+
+  /* dynamic table building */
+  this.ncode = 0;             /* number of code length code lengths */
+  this.nlen = 0;              /* number of length code lengths */
+  this.ndist = 0;             /* number of distance code lengths */
+  this.have = 0;              /* number of code lengths in lens[] */
+  this.next = null;              /* next available space in codes[] */
+
+  this.lens = new utils.Buf16(320); /* temporary storage for code lengths */
+  this.work = new utils.Buf16(288); /* work area for code table building */
+
+  /*
+   because we don't have pointers in js, we use lencode and distcode directly
+   as buffers so we don't need codes
+  */
+  //this.codes = new utils.Buf32(ENOUGH);       /* space for code tables */
+  this.lendyn = null;              /* dynamic table for length/literal codes (JS specific) */
+  this.distdyn = null;             /* dynamic table for distance codes (JS specific) */
+  this.sane = 0;                   /* if false, allow invalid distance too far */
+  this.back = 0;                   /* bits back of last unprocessed length/lit */
+  this.was = 0;                    /* initial length of match */
+}
+
+function inflateResetKeep(strm) {
+  var state;
+
+  if (!strm || !strm.state) { return Z_STREAM_ERROR; }
+  state = strm.state;
+  strm.total_in = strm.total_out = state.total = 0;
+  strm.msg = ''; /*Z_NULL*/
+  if (state.wrap) {       /* to support ill-conceived Java test suite */
+    strm.adler = state.wrap & 1;
+  }
+  state.mode = HEAD;
+  state.last = 0;
+  state.havedict = 0;
+  state.dmax = 32768;
+  state.head = null/*Z_NULL*/;
+  state.hold = 0;
+  state.bits = 0;
+  //state.lencode = state.distcode = state.next = state.codes;
+  state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);
+  state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);
+
+  state.sane = 1;
+  state.back = -1;
+  //Tracev((stderr, "inflate: reset\n"));
+  return Z_OK;
+}
+
+function inflateReset(strm) {
+  var state;
+
+  if (!strm || !strm.state) { return Z_STREAM_ERROR; }
+  state = strm.state;
+  state.wsize = 0;
+  state.whave = 0;
+  state.wnext = 0;
+  return inflateResetKeep(strm);
+
+}
+
+function inflateReset2(strm, windowBits) {
+  var wrap;
+  var state;
+
+  /* get the state */
+  if (!strm || !strm.state) { return Z_STREAM_ERROR; }
+  state = strm.state;
+
+  /* extract wrap request from windowBits parameter */
+  if (windowBits < 0) {
+    wrap = 0;
+    windowBits = -windowBits;
+  }
+  else {
+    wrap = (windowBits >> 4) + 1;
+    if (windowBits < 48) {
+      windowBits &= 15;
+    }
+  }
+
+  /* set number of window bits, free window if different */
+  if (windowBits && (windowBits < 8 || windowBits > 15)) {
+    return Z_STREAM_ERROR;
+  }
+  if (state.window !== null && state.wbits !== windowBits) {
+    state.window = null;
+  }
+
+  /* update state and reset the rest of it */
+  state.wrap = wrap;
+  state.wbits = windowBits;
+  return inflateReset(strm);
+}
+
+function inflateInit2(strm, windowBits) {
+  var ret;
+  var state;
+
+  if (!strm) { return Z_STREAM_ERROR; }
+  //strm.msg = Z_NULL;                 /* in case we return an error */
+
+  state = new InflateState();
+
+  //if (state === Z_NULL) return Z_MEM_ERROR;
+  //Tracev((stderr, "inflate: allocated\n"));
+  strm.state = state;
+  state.window = null/*Z_NULL*/;
+  ret = inflateReset2(strm, windowBits);
+  if (ret !== Z_OK) {
+    strm.state = null/*Z_NULL*/;
+  }
+  return ret;
+}
+
+function inflateInit(strm) {
+  return inflateInit2(strm, DEF_WBITS);
+}
+
+
+/*
+ Return state with length and distance decoding tables and index sizes set to
+ fixed code decoding.  Normally this returns fixed tables from inffixed.h.
+ If BUILDFIXED is defined, then instead this routine builds the tables the
+ first time it's called, and returns those tables the first time and
+ thereafter.  This reduces the size of the code by about 2K bytes, in
+ exchange for a little execution time.  However, BUILDFIXED should not be
+ used for threaded applications, since the rewriting of the tables and virgin
+ may not be thread-safe.
+ */
+var virgin = true;
+
+var lenfix, distfix; // We have no pointers in JS, so keep tables separate
+
+function fixedtables(state) {
+  /* build fixed huffman tables if first call (may not be thread safe) */
+  if (virgin) {
+    var sym;
+
+    lenfix = new utils.Buf32(512);
+    distfix = new utils.Buf32(32);
+
+    /* literal/length table */
+    sym = 0;
+    while (sym < 144) { state.lens[sym++] = 8; }
+    while (sym < 256) { state.lens[sym++] = 9; }
+    while (sym < 280) { state.lens[sym++] = 7; }
+    while (sym < 288) { state.lens[sym++] = 8; }
+
+    inflate_table(LENS,  state.lens, 0, 288, lenfix,   0, state.work, { bits: 9 });
+
+    /* distance table */
+    sym = 0;
+    while (sym < 32) { state.lens[sym++] = 5; }
+
+    inflate_table(DISTS, state.lens, 0, 32,   distfix, 0, state.work, { bits: 5 });
+
+    /* do this just once */
+    virgin = false;
+  }
+
+  state.lencode = lenfix;
+  state.lenbits = 9;
+  state.distcode = distfix;
+  state.distbits = 5;
+}
+
+
+/*
+ Update the window with the last wsize (normally 32K) bytes written before
+ returning.  If window does not exist yet, create it.  This is only called
+ when a window is already in use, or when output has been written during this
+ inflate call, but the end of the deflate stream has not been reached yet.
+ It is also called to create a window for dictionary data when a dictionary
+ is loaded.
+
+ Providing output buffers larger than 32K to inflate() should provide a speed
+ advantage, since only the last 32K of output is copied to the sliding window
+ upon return from inflate(), and since all distances after the first 32K of
+ output will fall in the output data, making match copies simpler and faster.
+ The advantage may be dependent on the size of the processor's data caches.
+ */
+function updatewindow(strm, src, end, copy) {
+  var dist;
+  var state = strm.state;
+
+  /* if it hasn't been done already, allocate space for the window */
+  if (state.window === null) {
+    state.wsize = 1 << state.wbits;
+    state.wnext = 0;
+    state.whave = 0;
+
+    state.window = new utils.Buf8(state.wsize);
+  }
+
+  /* copy state->wsize or less output bytes into the circular window */
+  if (copy >= state.wsize) {
+    utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);
+    state.wnext = 0;
+    state.whave = state.wsize;
+  }
+  else {
+    dist = state.wsize - state.wnext;
+    if (dist > copy) {
+      dist = copy;
+    }
+    //zmemcpy(state->window + state->wnext, end - copy, dist);
+    utils.arraySet(state.window, src, end - copy, dist, state.wnext);
+    copy -= dist;
+    if (copy) {
+      //zmemcpy(state->window, end - copy, copy);
+      utils.arraySet(state.window, src, end - copy, copy, 0);
+      state.wnext = copy;
+      state.whave = state.wsize;
+    }
+    else {
+      state.wnext += dist;
+      if (state.wnext === state.wsize) { state.wnext = 0; }
+      if (state.whave < state.wsize) { state.whave += dist; }
+    }
+  }
+  return 0;
+}
+
+function inflate(strm, flush) {
+  var state;
+  var input, output;          // input/output buffers
+  var next;                   /* next input INDEX */
+  var put;                    /* next output INDEX */
+  var have, left;             /* available input and output */
+  var hold;                   /* bit buffer */
+  var bits;                   /* bits in bit buffer */
+  var _in, _out;              /* save starting available input and output */
+  var copy;                   /* number of stored or match bytes to copy */
+  var from;                   /* where to copy match bytes from */
+  var from_source;
+  var here = 0;               /* current decoding table entry */
+  var here_bits, here_op, here_val; // paked "here" denormalized (JS specific)
+  //var last;                   /* parent table entry */
+  var last_bits, last_op, last_val; // paked "last" denormalized (JS specific)
+  var len;                    /* length to copy for repeats, bits to drop */
+  var ret;                    /* return code */
+  var hbuf = new utils.Buf8(4);    /* buffer for gzip header crc calculation */
+  var opts;
+
+  var n; // temporary var for NEED_BITS
+
+  var order = /* permutation of code lengths */
+    [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];
+
+
+  if (!strm || !strm.state || !strm.output ||
+      (!strm.input && strm.avail_in !== 0)) {
+    return Z_STREAM_ERROR;
+  }
+
+  state = strm.state;
+  if (state.mode === TYPE) { state.mode = TYPEDO; }    /* skip check */
+
+
+  //--- LOAD() ---
+  put = strm.next_out;
+  output = strm.output;
+  left = strm.avail_out;
+  next = strm.next_in;
+  input = strm.input;
+  have = strm.avail_in;
+  hold = state.hold;
+  bits = state.bits;
+  //---
+
+  _in = have;
+  _out = left;
+  ret = Z_OK;
+
+  inf_leave: // goto emulation
+  for (;;) {
+    switch (state.mode) {
+      case HEAD:
+        if (state.wrap === 0) {
+          state.mode = TYPEDO;
+          break;
+        }
+        //=== NEEDBITS(16);
+        while (bits < 16) {
+          if (have === 0) { break inf_leave; }
+          have--;
+          hold += input[next++] << bits;
+          bits += 8;
+        }
+        //===//
+        if ((state.wrap & 2) && hold === 0x8b1f) {  /* gzip header */
+          state.check = 0/*crc32(0L, Z_NULL, 0)*/;
+          //=== CRC2(state.check, hold);
+          hbuf[0] = hold & 0xff;
+          hbuf[1] = (hold >>> 8) & 0xff;
+          state.check = crc32(state.check, hbuf, 2, 0);
+          //===//
+
+          //=== INITBITS();
+          hold = 0;
+          bits = 0;
+          //===//
+          state.mode = FLAGS;
+          break;
+        }
+        state.flags = 0;           /* expect zlib header */
+        if (state.head) {
+          state.head.done = false;
+        }
+        if (!(state.wrap & 1) ||   /* check if zlib header allowed */
+          (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {
+          strm.msg = 'incorrect header check';
+          state.mode = BAD;
+          break;
+        }
+        if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {
+          strm.msg = 'unknown compression method';
+          state.mode = BAD;
+          break;
+        }
+        //--- DROPBITS(4) ---//
+        hold >>>= 4;
+        bits -= 4;
+        //---//
+        len = (hold & 0x0f)/*BITS(4)*/ + 8;
+        if (state.wbits === 0) {
+          state.wbits = len;
+        }
+        else if (len > state.wbits) {
+          strm.msg = 'invalid window size';
+          state.mode = BAD;
+          break;
+        }
+        state.dmax = 1 << len;
+        //Tracev((stderr, "inflate:   zlib header ok\n"));
+        strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;
+        state.mode = hold & 0x200 ? DICTID : TYPE;
+        //=== INITBITS();
+        hold = 0;
+        bits = 0;
+        //===//
+        break;
+      case FLAGS:
+        //=== NEEDBITS(16); */
+        while (bits < 16) {
+          if (have === 0) { break inf_leave; }
+          have--;
+          hold += input[next++] << bits;
+          bits += 8;
+        }
+        //===//
+        state.flags = hold;
+        if ((state.flags & 0xff) !== Z_DEFLATED) {
+          strm.msg = 'unknown compression method';
+          state.mode = BAD;
+          break;
+        }
+        if (state.flags & 0xe000) {
+          strm.msg = 'unknown header flags set';
+          state.mode = BAD;
+          break;
+        }
+        if (state.head) {
+          state.head.text = ((hold >> 8) & 1);
+        }
+        if (state.flags & 0x0200) {
+          //=== CRC2(state.check, hold);
+          hbuf[0] = hold & 0xff;
+          hbuf[1] = (hold >>> 8) & 0xff;
+          state.check = crc32(state.check, hbuf, 2, 0);
+          //===//
+        }
+        //=== INITBITS();
+        hold = 0;
+        bits = 0;
+        //===//
+        state.mode = TIME;
+        /* falls through */
+      case TIME:
+        //=== NEEDBITS(32); */
+        while (bits < 32) {
+          if (have === 0) { break inf_leave; }
+          have--;
+          hold += input[next++] << bits;
+          bits += 8;
+        }
+        //===//
+        if (state.head) {
+          state.head.time = hold;
+        }
+        if (state.flags & 0x0200) {
+          //=== CRC4(state.check, hold)
+          hbuf[0] = hold & 0xff;
+          hbuf[1] = (hold >>> 8) & 0xff;
+          hbuf[2] = (hold >>> 16) & 0xff;
+          hbuf[3] = (hold >>> 24) & 0xff;
+          state.check = crc32(state.check, hbuf, 4, 0);
+          //===
+        }
+        //=== INITBITS();
+        hold = 0;
+        bits = 0;
+        //===//
+        state.mode = OS;
+        /* falls through */
+      case OS:
+        //=== NEEDBITS(16); */
+        while (bits < 16) {
+          if (have === 0) { break inf_leave; }
+          have--;
+          hold += input[next++] << bits;
+          bits += 8;
+        }
+        //===//
+        if (state.head) {
+          state.head.xflags = (hold & 0xff);
+          state.head.os = (hold >> 8);
+        }
+        if (state.flags & 0x0200) {
+          //=== CRC2(state.check, hold);
+          hbuf[0] = hold & 0xff;
+          hbuf[1] = (hold >>> 8) & 0xff;
+          state.check = crc32(state.check, hbuf, 2, 0);
+          //===//
+        }
+        //=== INITBITS();
+        hold = 0;
+        bits = 0;
+        //===//
+        state.mode = EXLEN;
+        /* falls through */
+      case EXLEN:
+        if (state.flags & 0x0400) {
+          //=== NEEDBITS(16); */
+          while (bits < 16) {
+            if (have === 0) { break inf_leave; }
+            have--;
+            hold += input[next++] << bits;
+            bits += 8;
+          }
+          //===//
+          state.length = hold;
+          if (state.head) {
+            state.head.extra_len = hold;
+          }
+          if (state.flags & 0x0200) {
+            //=== CRC2(state.check, hold);
+            hbuf[0] = hold & 0xff;
+            hbuf[1] = (hold >>> 8) & 0xff;
+            state.check = crc32(state.check, hbuf, 2, 0);
+            //===//
+          }
+          //=== INITBITS();
+          hold = 0;
+          bits = 0;
+          //===//
+        }
+        else if (state.head) {
+          state.head.extra = null/*Z_NULL*/;
+        }
+        state.mode = EXTRA;
+        /* falls through */
+      case EXTRA:
+        if (state.flags & 0x0400) {
+          copy = state.length;
+          if (copy > have) { copy = have; }
+          if (copy) {
+            if (state.head) {
+              len = state.head.extra_len - state.length;
+              if (!state.head.extra) {
+                // Use untyped array for more convenient processing later
+                state.head.extra = new Array(state.head.extra_len);
+              }
+              utils.arraySet(
+                state.head.extra,
+                input,
+                next,
+                // extra field is limited to 65536 bytes
+                // - no need for additional size check
+                copy,
+                /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/
+                len
+              );
+              //zmemcpy(state.head.extra + len, next,
+              //        len + copy > state.head.extra_max ?
+              //        state.head.extra_max - len : copy);
+            }
+            if (state.flags & 0x0200) {
+              state.check = crc32(state.check, input, copy, next);
+            }
+            have -= copy;
+            next += copy;
+            state.length -= copy;
+          }
+          if (state.length) { break inf_leave; }
+        }
+        state.length = 0;
+        state.mode = NAME;
+        /* falls through */
+      case NAME:
+        if (state.flags & 0x0800) {
+          if (have === 0) { break inf_leave; }
+          copy = 0;
+          do {
+            // TODO: 2 or 1 bytes?
+            len = input[next + copy++];
+            /* use constant limit because in js we should not preallocate memory */
+            if (state.head && len &&
+                (state.length < 65536 /*state.head.name_max*/)) {
+              state.head.name += String.fromCharCode(len);
+            }
+          } while (len && copy < have);
+
+          if (state.flags & 0x0200) {
+            state.check = crc32(state.check, input, copy, next);
+          }
+          have -= copy;
+          next += copy;
+          if (len) { break inf_leave; }
+        }
+        else if (state.head) {
+          state.head.name = null;
+        }
+        state.length = 0;
+        state.mode = COMMENT;
+        /* falls through */
+      case COMMENT:
+        if (state.flags & 0x1000) {
+          if (have === 0) { break inf_leave; }
+          copy = 0;
+          do {
+            len = input[next + copy++];
+            /* use constant limit because in js we should not preallocate memory */
+            if (state.head && len &&
+                (state.length < 65536 /*state.head.comm_max*/)) {
+              state.head.comment += String.fromCharCode(len);
+            }
+          } while (len && copy < have);
+          if (state.flags & 0x0200) {
+            state.check = crc32(state.check, input, copy, next);
+          }
+          have -= copy;
+          next += copy;
+          if (len) { break inf_leave; }
+        }
+        else if (state.head) {
+          state.head.comment = null;
+        }
+        state.mode = HCRC;
+        /* falls through */
+      case HCRC:
+        if (state.flags & 0x0200) {
+          //=== NEEDBITS(16); */
+          while (bits < 16) {
+            if (have === 0) { break inf_leave; }
+            have--;
+            hold += input[next++] << bits;
+            bits += 8;
+          }
+          //===//
+          if (hold !== (state.check & 0xffff)) {
+            strm.msg = 'header crc mismatch';
+            state.mode = BAD;
+            break;
+          }
+          //=== INITBITS();
+          hold = 0;
+          bits = 0;
+          //===//
+        }
+        if (state.head) {
+          state.head.hcrc = ((state.flags >> 9) & 1);
+          state.head.done = true;
+        }
+        strm.adler = state.check = 0;
+        state.mode = TYPE;
+        break;
+      case DICTID:
+        //=== NEEDBITS(32); */
+        while (bits < 32) {
+          if (have === 0) { break inf_leave; }
+          have--;
+          hold += input[next++] << bits;
+          bits += 8;
+        }
+        //===//
+        strm.adler = state.check = zswap32(hold);
+        //=== INITBITS();
+        hold = 0;
+        bits = 0;
+        //===//
+        state.mode = DICT;
+        /* falls through */
+      case DICT:
+        if (state.havedict === 0) {
+          //--- RESTORE() ---
+          strm.next_out = put;
+          strm.avail_out = left;
+          strm.next_in = next;
+          strm.avail_in = have;
+          state.hold = hold;
+          state.bits = bits;
+          //---
+          return Z_NEED_DICT;
+        }
+        strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;
+        state.mode = TYPE;
+        /* falls through */
+      case TYPE:
+        if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }
+        /* falls through */
+      case TYPEDO:
+        if (state.last) {
+          //--- BYTEBITS() ---//
+          hold >>>= bits & 7;
+          bits -= bits & 7;
+          //---//
+          state.mode = CHECK;
+          break;
+        }
+        //=== NEEDBITS(3); */
+        while (bits < 3) {
+          if (have === 0) { break inf_leave; }
+          have--;
+          hold += input[next++] << bits;
+          bits += 8;
+        }
+        //===//
+        state.last = (hold & 0x01)/*BITS(1)*/;
+        //--- DROPBITS(1) ---//
+        hold >>>= 1;
+        bits -= 1;
+        //---//
+
+        switch ((hold & 0x03)/*BITS(2)*/) {
+          case 0:                             /* stored block */
+            //Tracev((stderr, "inflate:     stored block%s\n",
+            //        state.last ? " (last)" : ""));
+            state.mode = STORED;
+            break;
+          case 1:                             /* fixed block */
+            fixedtables(state);
+            //Tracev((stderr, "inflate:     fixed codes block%s\n",
+            //        state.last ? " (last)" : ""));
+            state.mode = LEN_;             /* decode codes */
+            if (flush === Z_TREES) {
+              //--- DROPBITS(2) ---//
+              hold >>>= 2;
+              bits -= 2;
+              //---//
+              break inf_leave;
+            }
+            break;
+          case 2:                             /* dynamic block */
+            //Tracev((stderr, "inflate:     dynamic codes block%s\n",
+            //        state.last ? " (last)" : ""));
+            state.mode = TABLE;
+            break;
+          case 3:
+            strm.msg = 'invalid block type';
+            state.mode = BAD;
+        }
+        //--- DROPBITS(2) ---//
+        hold >>>= 2;
+        bits -= 2;
+        //---//
+        break;
+      case STORED:
+        //--- BYTEBITS() ---// /* go to byte boundary */
+        hold >>>= bits & 7;
+        bits -= bits & 7;
+        //---//
+        //=== NEEDBITS(32); */
+        while (bits < 32) {
+          if (have === 0) { break inf_leave; }
+          have--;
+          hold += input[next++] << bits;
+          bits += 8;
+        }
+        //===//
+        if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {
+          strm.msg = 'invalid stored block lengths';
+          state.mode = BAD;
+          break;
+        }
+        state.length = hold & 0xffff;
+        //Tracev((stderr, "inflate:       stored length %u\n",
+        //        state.length));
+        //=== INITBITS();
+        hold = 0;
+        bits = 0;
+        //===//
+        state.mode = COPY_;
+        if (flush === Z_TREES) { break inf_leave; }
+        /* falls through */
+      case COPY_:
+        state.mode = COPY;
+        /* falls through */
+      case COPY:
+        copy = state.length;
+        if (copy) {
+          if (copy > have) { copy = have; }
+          if (copy > left) { copy = left; }
+          if (copy === 0) { break inf_leave; }
+          //--- zmemcpy(put, next, copy); ---
+          utils.arraySet(output, input, next, copy, put);
+          //---//
+          have -= copy;
+          next += copy;
+          left -= copy;
+          put += copy;
+          state.length -= copy;
+          break;
+        }
+        //Tracev((stderr, "inflate:       stored end\n"));
+        state.mode = TYPE;
+        break;
+      case TABLE:
+        //=== NEEDBITS(14); */
+        while (bits < 14) {
+          if (have === 0) { break inf_leave; }
+          have--;
+          hold += input[next++] << bits;
+          bits += 8;
+        }
+        //===//
+        state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;
+        //--- DROPBITS(5) ---//
+        hold >>>= 5;
+        bits -= 5;
+        //---//
+        state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;
+        //--- DROPBITS(5) ---//
+        hold >>>= 5;
+        bits -= 5;
+        //---//
+        state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;
+        //--- DROPBITS(4) ---//
+        hold >>>= 4;
+        bits -= 4;
+        //---//
+//#ifndef PKZIP_BUG_WORKAROUND
+        if (state.nlen > 286 || state.ndist > 30) {
+          strm.msg = 'too many length or distance symbols';
+          state.mode = BAD;
+          break;
+        }
+//#endif
+        //Tracev((stderr, "inflate:       table sizes ok\n"));
+        state.have = 0;
+        state.mode = LENLENS;
+        /* falls through */
+      case LENLENS:
+        while (state.have < state.ncode) {
+          //=== NEEDBITS(3);
+          while (bits < 3) {
+            if (have === 0) { break inf_leave; }
+            have--;
+            hold += input[next++] << bits;
+            bits += 8;
+          }
+          //===//
+          state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);
+          //--- DROPBITS(3) ---//
+          hold >>>= 3;
+          bits -= 3;
+          //---//
+        }
+        while (state.have < 19) {
+          state.lens[order[state.have++]] = 0;
+        }
+        // We have separate tables & no pointers. 2 commented lines below not needed.
+        //state.next = state.codes;
+        //state.lencode = state.next;
+        // Switch to use dynamic table
+        state.lencode = state.lendyn;
+        state.lenbits = 7;
+
+        opts = { bits: state.lenbits };
+        ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);
+        state.lenbits = opts.bits;
+
+        if (ret) {
+          strm.msg = 'invalid code lengths set';
+          state.mode = BAD;
+          break;
+        }
+        //Tracev((stderr, "inflate:       code lengths ok\n"));
+        state.have = 0;
+        state.mode = CODELENS;
+        /* falls through */
+      case CODELENS:
+        while (state.have < state.nlen + state.ndist) {
+          for (;;) {
+            here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/
+            here_bits = here >>> 24;
+            here_op = (here >>> 16) & 0xff;
+            here_val = here & 0xffff;
+
+            if ((here_bits) <= bits) { break; }
+            //--- PULLBYTE() ---//
+            if (have === 0) { break inf_leave; }
+            have--;
+            hold += input[next++] << bits;
+            bits += 8;
+            //---//
+          }
+          if (here_val < 16) {
+            //--- DROPBITS(here.bits) ---//
+            hold >>>= here_bits;
+            bits -= here_bits;
+            //---//
+            state.lens[state.have++] = here_val;
+          }
+          else {
+            if (here_val === 16) {
+              //=== NEEDBITS(here.bits + 2);
+              n = here_bits + 2;
+              while (bits < n) {
+                if (have === 0) { break inf_leave; }
+                have--;
+                hold += input[next++] << bits;
+                bits += 8;
+              }
+              //===//
+              //--- DROPBITS(here.bits) ---//
+              hold >>>= here_bits;
+              bits -= here_bits;
+              //---//
+              if (state.have === 0) {
+                strm.msg = 'invalid bit length repeat';
+                state.mode = BAD;
+                break;
+              }
+              len = state.lens[state.have - 1];
+              copy = 3 + (hold & 0x03);//BITS(2);
+              //--- DROPBITS(2) ---//
+              hold >>>= 2;
+              bits -= 2;
+              //---//
+            }
+            else if (here_val === 17) {
+              //=== NEEDBITS(here.bits + 3);
+              n = here_bits + 3;
+              while (bits < n) {
+                if (have === 0) { break inf_leave; }
+                have--;
+                hold += input[next++] << bits;
+                bits += 8;
+              }
+              //===//
+              //--- DROPBITS(here.bits) ---//
+              hold >>>= here_bits;
+              bits -= here_bits;
+              //---//
+              len = 0;
+              copy = 3 + (hold & 0x07);//BITS(3);
+              //--- DROPBITS(3) ---//
+              hold >>>= 3;
+              bits -= 3;
+              //---//
+            }
+            else {
+              //=== NEEDBITS(here.bits + 7);
+              n = here_bits + 7;
+              while (bits < n) {
+                if (have === 0) { break inf_leave; }
+                have--;
+                hold += input[next++] << bits;
+                bits += 8;
+              }
+              //===//
+              //--- DROPBITS(here.bits) ---//
+              hold >>>= here_bits;
+              bits -= here_bits;
+              //---//
+              len = 0;
+              copy = 11 + (hold & 0x7f);//BITS(7);
+              //--- DROPBITS(7) ---//
+              hold >>>= 7;
+              bits -= 7;
+              //---//
+            }
+            if (state.have + copy > state.nlen + state.ndist) {
+              strm.msg = 'invalid bit length repeat';
+              state.mode = BAD;
+              break;
+            }
+            while (copy--) {
+              state.lens[state.have++] = len;
+            }
+          }
+        }
+
+        /* handle error breaks in while */
+        if (state.mode === BAD) { break; }
+
+        /* check for end-of-block code (better have one) */
+        if (state.lens[256] === 0) {
+          strm.msg = 'invalid code -- missing end-of-block';
+          state.mode = BAD;
+          break;
+        }
+
+        /* build code tables -- note: do not change the lenbits or distbits
+           values here (9 and 6) without reading the comments in inftrees.h
+           concerning the ENOUGH constants, which depend on those values */
+        state.lenbits = 9;
+
+        opts = { bits: state.lenbits };
+        ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);
+        // We have separate tables & no pointers. 2 commented lines below not needed.
+        // state.next_index = opts.table_index;
+        state.lenbits = opts.bits;
+        // state.lencode = state.next;
+
+        if (ret) {
+          strm.msg = 'invalid literal/lengths set';
+          state.mode = BAD;
+          break;
+        }
+
+        state.distbits = 6;
+        //state.distcode.copy(state.codes);
+        // Switch to use dynamic table
+        state.distcode = state.distdyn;
+        opts = { bits: state.distbits };
+        ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);
+        // We have separate tables & no pointers. 2 commented lines below not needed.
+        // state.next_index = opts.table_index;
+        state.distbits = opts.bits;
+        // state.distcode = state.next;
+
+        if (ret) {
+          strm.msg = 'invalid distances set';
+          state.mode = BAD;
+          break;
+        }
+        //Tracev((stderr, 'inflate:       codes ok\n'));
+        state.mode = LEN_;
+        if (flush === Z_TREES) { break inf_leave; }
+        /* falls through */
+      case LEN_:
+        state.mode = LEN;
+        /* falls through */
+      case LEN:
+        if (have >= 6 && left >= 258) {
+          //--- RESTORE() ---
+          strm.next_out = put;
+          strm.avail_out = left;
+          strm.next_in = next;
+          strm.avail_in = have;
+          state.hold = hold;
+          state.bits = bits;
+          //---
+          inflate_fast(strm, _out);
+          //--- LOAD() ---
+          put = strm.next_out;
+          output = strm.output;
+          left = strm.avail_out;
+          next = strm.next_in;
+          input = strm.input;
+          have = strm.avail_in;
+          hold = state.hold;
+          bits = state.bits;
+          //---
+
+          if (state.mode === TYPE) {
+            state.back = -1;
+          }
+          break;
+        }
+        state.back = 0;
+        for (;;) {
+          here = state.lencode[hold & ((1 << state.lenbits) - 1)];  /*BITS(state.lenbits)*/
+          here_bits = here >>> 24;
+          here_op = (here >>> 16) & 0xff;
+          here_val = here & 0xffff;
+
+          if (here_bits <= bits) { break; }
+          //--- PULLBYTE() ---//
+          if (have === 0) { break inf_leave; }
+          have--;
+          hold += input[next++] << bits;
+          bits += 8;
+          //---//
+        }
+        if (here_op && (here_op & 0xf0) === 0) {
+          last_bits = here_bits;
+          last_op = here_op;
+          last_val = here_val;
+          for (;;) {
+            here = state.lencode[last_val +
+                    ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];
+            here_bits = here >>> 24;
+            here_op = (here >>> 16) & 0xff;
+            here_val = here & 0xffff;
+
+            if ((last_bits + here_bits) <= bits) { break; }
+            //--- PULLBYTE() ---//
+            if (have === 0) { break inf_leave; }
+            have--;
+            hold += input[next++] << bits;
+            bits += 8;
+            //---//
+          }
+          //--- DROPBITS(last.bits) ---//
+          hold >>>= last_bits;
+          bits -= last_bits;
+          //---//
+          state.back += last_bits;
+        }
+        //--- DROPBITS(here.bits) ---//
+        hold >>>= here_bits;
+        bits -= here_bits;
+        //---//
+        state.back += here_bits;
+        state.length = here_val;
+        if (here_op === 0) {
+          //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
+          //        "inflate:         literal '%c'\n" :
+          //        "inflate:         literal 0x%02x\n", here.val));
+          state.mode = LIT;
+          break;
+        }
+        if (here_op & 32) {
+          //Tracevv((stderr, "inflate:         end of block\n"));
+          state.back = -1;
+          state.mode = TYPE;
+          break;
+        }
+        if (here_op & 64) {
+          strm.msg = 'invalid literal/length code';
+          state.mode = BAD;
+          break;
+        }
+        state.extra = here_op & 15;
+        state.mode = LENEXT;
+        /* falls through */
+      case LENEXT:
+        if (state.extra) {
+          //=== NEEDBITS(state.extra);
+          n = state.extra;
+          while (bits < n) {
+            if (have === 0) { break inf_leave; }
+            have--;
+            hold += input[next++] << bits;
+            bits += 8;
+          }
+          //===//
+          state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;
+          //--- DROPBITS(state.extra) ---//
+          hold >>>= state.extra;
+          bits -= state.extra;
+          //---//
+          state.back += state.extra;
+        }
+        //Tracevv((stderr, "inflate:         length %u\n", state.length));
+        state.was = state.length;
+        state.mode = DIST;
+        /* falls through */
+      case DIST:
+        for (;;) {
+          here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/
+          here_bits = here >>> 24;
+          here_op = (here >>> 16) & 0xff;
+          here_val = here & 0xffff;
+
+          if ((here_bits) <= bits) { break; }
+          //--- PULLBYTE() ---//
+          if (have === 0) { break inf_leave; }
+          have--;
+          hold += input[next++] << bits;
+          bits += 8;
+          //---//
+        }
+        if ((here_op & 0xf0) === 0) {
+          last_bits = here_bits;
+          last_op = here_op;
+          last_val = here_val;
+          for (;;) {
+            here = state.distcode[last_val +
+                    ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];
+            here_bits = here >>> 24;
+            here_op = (here >>> 16) & 0xff;
+            here_val = here & 0xffff;
+
+            if ((last_bits + here_bits) <= bits) { break; }
+            //--- PULLBYTE() ---//
+            if (have === 0) { break inf_leave; }
+            have--;
+            hold += input[next++] << bits;
+            bits += 8;
+            //---//
+          }
+          //--- DROPBITS(last.bits) ---//
+          hold >>>= last_bits;
+          bits -= last_bits;
+          //---//
+          state.back += last_bits;
+        }
+        //--- DROPBITS(here.bits) ---//
+        hold >>>= here_bits;
+        bits -= here_bits;
+        //---//
+        state.back += here_bits;
+        if (here_op & 64) {
+          strm.msg = 'invalid distance code';
+          state.mode = BAD;
+          break;
+        }
+        state.offset = here_val;
+        state.extra = (here_op) & 15;
+        state.mode = DISTEXT;
+        /* falls through */
+      case DISTEXT:
+        if (state.extra) {
+          //=== NEEDBITS(state.extra);
+          n = state.extra;
+          while (bits < n) {
+            if (have === 0) { break inf_leave; }
+            have--;
+            hold += input[next++] << bits;
+            bits += 8;
+          }
+          //===//
+          state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;
+          //--- DROPBITS(state.extra) ---//
+          hold >>>= state.extra;
+          bits -= state.extra;
+          //---//
+          state.back += state.extra;
+        }
+//#ifdef INFLATE_STRICT
+        if (state.offset > state.dmax) {
+          strm.msg = 'invalid distance too far back';
+          state.mode = BAD;
+          break;
+        }
+//#endif
+        //Tracevv((stderr, "inflate:         distance %u\n", state.offset));
+        state.mode = MATCH;
+        /* falls through */
+      case MATCH:
+        if (left === 0) { break inf_leave; }
+        copy = _out - left;
+        if (state.offset > copy) {         /* copy from window */
+          copy = state.offset - copy;
+          if (copy > state.whave) {
+            if (state.sane) {
+              strm.msg = 'invalid distance too far back';
+              state.mode = BAD;
+              break;
+            }
+// (!) This block is disabled in zlib defaults,
+// don't enable it for binary compatibility
+//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
+//          Trace((stderr, "inflate.c too far\n"));
+//          copy -= state.whave;
+//          if (copy > state.length) { copy = state.length; }
+//          if (copy > left) { copy = left; }
+//          left -= copy;
+//          state.length -= copy;
+//          do {
+//            output[put++] = 0;
+//          } while (--copy);
+//          if (state.length === 0) { state.mode = LEN; }
+//          break;
+//#endif
+          }
+          if (copy > state.wnext) {
+            copy -= state.wnext;
+            from = state.wsize - copy;
+          }
+          else {
+            from = state.wnext - copy;
+          }
+          if (copy > state.length) { copy = state.length; }
+          from_source = state.window;
+        }
+        else {                              /* copy from output */
+          from_source = output;
+          from = put - state.offset;
+          copy = state.length;
+        }
+        if (copy > left) { copy = left; }
+        left -= copy;
+        state.length -= copy;
+        do {
+          output[put++] = from_source[from++];
+        } while (--copy);
+        if (state.length === 0) { state.mode = LEN; }
+        break;
+      case LIT:
+        if (left === 0) { break inf_leave; }
+        output[put++] = state.length;
+        left--;
+        state.mode = LEN;
+        break;
+      case CHECK:
+        if (state.wrap) {
+          //=== NEEDBITS(32);
+          while (bits < 32) {
+            if (have === 0) { break inf_leave; }
+            have--;
+            // Use '|' instead of '+' to make sure that result is signed
+            hold |= input[next++] << bits;
+            bits += 8;
+          }
+          //===//
+          _out -= left;
+          strm.total_out += _out;
+          state.total += _out;
+          if (_out) {
+            strm.adler = state.check =
+                /*UPDATE(state.check, put - _out, _out);*/
+                (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));
+
+          }
+          _out = left;
+          // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too
+          if ((state.flags ? hold : zswap32(hold)) !== state.check) {
+            strm.msg = 'incorrect data check';
+            state.mode = BAD;
+            break;
+          }
+          //=== INITBITS();
+          hold = 0;
+          bits = 0;
+          //===//
+          //Tracev((stderr, "inflate:   check matches trailer\n"));
+        }
+        state.mode = LENGTH;
+        /* falls through */
+      case LENGTH:
+        if (state.wrap && state.flags) {
+          //=== NEEDBITS(32);
+          while (bits < 32) {
+            if (have === 0) { break inf_leave; }
+            have--;
+            hold += input[next++] << bits;
+            bits += 8;
+          }
+          //===//
+          if (hold !== (state.total & 0xffffffff)) {
+            strm.msg = 'incorrect length check';
+            state.mode = BAD;
+            break;
+          }
+          //=== INITBITS();
+          hold = 0;
+          bits = 0;
+          //===//
+          //Tracev((stderr, "inflate:   length matches trailer\n"));
+        }
+        state.mode = DONE;
+        /* falls through */
+      case DONE:
+        ret = Z_STREAM_END;
+        break inf_leave;
+      case BAD:
+        ret = Z_DATA_ERROR;
+        break inf_leave;
+      case MEM:
+        return Z_MEM_ERROR;
+      case SYNC:
+        /* falls through */
+      default:
+        return Z_STREAM_ERROR;
+    }
+  }
+
+  // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave"
+
+  /*
+     Return from inflate(), updating the total counts and the check value.
+     If there was no progress during the inflate() call, return a buffer
+     error.  Call updatewindow() to create and/or update the window state.
+     Note: a memory error from inflate() is non-recoverable.
+   */
+
+  //--- RESTORE() ---
+  strm.next_out = put;
+  strm.avail_out = left;
+  strm.next_in = next;
+  strm.avail_in = have;
+  state.hold = hold;
+  state.bits = bits;
+  //---
+
+  if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&
+                      (state.mode < CHECK || flush !== Z_FINISH))) {
+    if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {
+      state.mode = MEM;
+      return Z_MEM_ERROR;
+    }
+  }
+  _in -= strm.avail_in;
+  _out -= strm.avail_out;
+  strm.total_in += _in;
+  strm.total_out += _out;
+  state.total += _out;
+  if (state.wrap && _out) {
+    strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/
+      (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));
+  }
+  strm.data_type = state.bits + (state.last ? 64 : 0) +
+                    (state.mode === TYPE ? 128 : 0) +
+                    (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);
+  if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {
+    ret = Z_BUF_ERROR;
+  }
+  return ret;
+}
+
+function inflateEnd(strm) {
+
+  if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {
+    return Z_STREAM_ERROR;
+  }
+
+  var state = strm.state;
+  if (state.window) {
+    state.window = null;
+  }
+  strm.state = null;
+  return Z_OK;
+}
+
+function inflateGetHeader(strm, head) {
+  var state;
+
+  /* check state */
+  if (!strm || !strm.state) { return Z_STREAM_ERROR; }
+  state = strm.state;
+  if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }
+
+  /* save header structure */
+  state.head = head;
+  head.done = false;
+  return Z_OK;
+}
+
+function inflateSetDictionary(strm, dictionary) {
+  var dictLength = dictionary.length;
+
+  var state;
+  var dictid;
+  var ret;
+
+  /* check state */
+  if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; }
+  state = strm.state;
+
+  if (state.wrap !== 0 && state.mode !== DICT) {
+    return Z_STREAM_ERROR;
+  }
+
+  /* check for correct dictionary identifier */
+  if (state.mode === DICT) {
+    dictid = 1; /* adler32(0, null, 0)*/
+    /* dictid = adler32(dictid, dictionary, dictLength); */
+    dictid = adler32(dictid, dictionary, dictLength, 0);
+    if (dictid !== state.check) {
+      return Z_DATA_ERROR;
+    }
+  }
+  /* copy dictionary to window using updatewindow(), which will amend the
+   existing dictionary if appropriate */
+  ret = updatewindow(strm, dictionary, dictLength, dictLength);
+  if (ret) {
+    state.mode = MEM;
+    return Z_MEM_ERROR;
+  }
+  state.havedict = 1;
+  // Tracev((stderr, "inflate:   dictionary set\n"));
+  return Z_OK;
+}
+
+exports.inflateReset = inflateReset;
+exports.inflateReset2 = inflateReset2;
+exports.inflateResetKeep = inflateResetKeep;
+exports.inflateInit = inflateInit;
+exports.inflateInit2 = inflateInit2;
+exports.inflate = inflate;
+exports.inflateEnd = inflateEnd;
+exports.inflateGetHeader = inflateGetHeader;
+exports.inflateSetDictionary = inflateSetDictionary;
+exports.inflateInfo = 'pako inflate (from Nodeca project)';
+
+/* Not implemented
+exports.inflateCopy = inflateCopy;
+exports.inflateGetDictionary = inflateGetDictionary;
+exports.inflateMark = inflateMark;
+exports.inflatePrime = inflatePrime;
+exports.inflateSync = inflateSync;
+exports.inflateSyncPoint = inflateSyncPoint;
+exports.inflateUndermine = inflateUndermine;
+*/
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/pako/lib/zlib/inftrees.js":
+/*!*******************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/pako/lib/zlib/inftrees.js ***!
+  \*******************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+// (C) 1995-2013 Jean-loup Gailly and Mark Adler
+// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+//   claim that you wrote the original software. If you use this software
+//   in a product, an acknowledgment in the product documentation would be
+//   appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+//   misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+
+var utils = __webpack_require__(/*! ../utils/common */ "./node_modules/jszip/node_modules/pako/lib/utils/common.js");
+
+var MAXBITS = 15;
+var ENOUGH_LENS = 852;
+var ENOUGH_DISTS = 592;
+//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);
+
+var CODES = 0;
+var LENS = 1;
+var DISTS = 2;
+
+var lbase = [ /* Length codes 257..285 base */
+  3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
+  35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0
+];
+
+var lext = [ /* Length codes 257..285 extra */
+  16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
+  19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78
+];
+
+var dbase = [ /* Distance codes 0..29 base */
+  1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
+  257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
+  8193, 12289, 16385, 24577, 0, 0
+];
+
+var dext = [ /* Distance codes 0..29 extra */
+  16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,
+  23, 23, 24, 24, 25, 25, 26, 26, 27, 27,
+  28, 28, 29, 29, 64, 64
+];
+
+module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts)
+{
+  var bits = opts.bits;
+      //here = opts.here; /* table entry for duplication */
+
+  var len = 0;               /* a code's length in bits */
+  var sym = 0;               /* index of code symbols */
+  var min = 0, max = 0;          /* minimum and maximum code lengths */
+  var root = 0;              /* number of index bits for root table */
+  var curr = 0;              /* number of index bits for current table */
+  var drop = 0;              /* code bits to drop for sub-table */
+  var left = 0;                   /* number of prefix codes available */
+  var used = 0;              /* code entries in table used */
+  var huff = 0;              /* Huffman code */
+  var incr;              /* for incrementing code, index */
+  var fill;              /* index for replicating entries */
+  var low;               /* low bits for current root entry */
+  var mask;              /* mask for low root bits */
+  var next;             /* next available space in table */
+  var base = null;     /* base value table to use */
+  var base_index = 0;
+//  var shoextra;    /* extra bits table to use */
+  var end;                    /* use base and extra for symbol > end */
+  var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1];    /* number of codes of each length */
+  var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1];     /* offsets in table for each length */
+  var extra = null;
+  var extra_index = 0;
+
+  var here_bits, here_op, here_val;
+
+  /*
+   Process a set of code lengths to create a canonical Huffman code.  The
+   code lengths are lens[0..codes-1].  Each length corresponds to the
+   symbols 0..codes-1.  The Huffman code is generated by first sorting the
+   symbols by length from short to long, and retaining the symbol order
+   for codes with equal lengths.  Then the code starts with all zero bits
+   for the first code of the shortest length, and the codes are integer
+   increments for the same length, and zeros are appended as the length
+   increases.  For the deflate format, these bits are stored backwards
+   from their more natural integer increment ordering, and so when the
+   decoding tables are built in the large loop below, the integer codes
+   are incremented backwards.
+
+   This routine assumes, but does not check, that all of the entries in
+   lens[] are in the range 0..MAXBITS.  The caller must assure this.
+   1..MAXBITS is interpreted as that code length.  zero means that that
+   symbol does not occur in this code.
+
+   The codes are sorted by computing a count of codes for each length,
+   creating from that a table of starting indices for each length in the
+   sorted table, and then entering the symbols in order in the sorted
+   table.  The sorted table is work[], with that space being provided by
+   the caller.
+
+   The length counts are used for other purposes as well, i.e. finding
+   the minimum and maximum length codes, determining if there are any
+   codes at all, checking for a valid set of lengths, and looking ahead
+   at length counts to determine sub-table sizes when building the
+   decoding tables.
+   */
+
+  /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */
+  for (len = 0; len <= MAXBITS; len++) {
+    count[len] = 0;
+  }
+  for (sym = 0; sym < codes; sym++) {
+    count[lens[lens_index + sym]]++;
+  }
+
+  /* bound code lengths, force root to be within code lengths */
+  root = bits;
+  for (max = MAXBITS; max >= 1; max--) {
+    if (count[max] !== 0) { break; }
+  }
+  if (root > max) {
+    root = max;
+  }
+  if (max === 0) {                     /* no symbols to code at all */
+    //table.op[opts.table_index] = 64;  //here.op = (var char)64;    /* invalid code marker */
+    //table.bits[opts.table_index] = 1;   //here.bits = (var char)1;
+    //table.val[opts.table_index++] = 0;   //here.val = (var short)0;
+    table[table_index++] = (1 << 24) | (64 << 16) | 0;
+
+
+    //table.op[opts.table_index] = 64;
+    //table.bits[opts.table_index] = 1;
+    //table.val[opts.table_index++] = 0;
+    table[table_index++] = (1 << 24) | (64 << 16) | 0;
+
+    opts.bits = 1;
+    return 0;     /* no symbols, but wait for decoding to report error */
+  }
+  for (min = 1; min < max; min++) {
+    if (count[min] !== 0) { break; }
+  }
+  if (root < min) {
+    root = min;
+  }
+
+  /* check for an over-subscribed or incomplete set of lengths */
+  left = 1;
+  for (len = 1; len <= MAXBITS; len++) {
+    left <<= 1;
+    left -= count[len];
+    if (left < 0) {
+      return -1;
+    }        /* over-subscribed */
+  }
+  if (left > 0 && (type === CODES || max !== 1)) {
+    return -1;                      /* incomplete set */
+  }
+
+  /* generate offsets into symbol table for each length for sorting */
+  offs[1] = 0;
+  for (len = 1; len < MAXBITS; len++) {
+    offs[len + 1] = offs[len] + count[len];
+  }
+
+  /* sort symbols by length, by symbol order within each length */
+  for (sym = 0; sym < codes; sym++) {
+    if (lens[lens_index + sym] !== 0) {
+      work[offs[lens[lens_index + sym]]++] = sym;
+    }
+  }
+
+  /*
+   Create and fill in decoding tables.  In this loop, the table being
+   filled is at next and has curr index bits.  The code being used is huff
+   with length len.  That code is converted to an index by dropping drop
+   bits off of the bottom.  For codes where len is less than drop + curr,
+   those top drop + curr - len bits are incremented through all values to
+   fill the table with replicated entries.
+
+   root is the number of index bits for the root table.  When len exceeds
+   root, sub-tables are created pointed to by the root entry with an index
+   of the low root bits of huff.  This is saved in low to check for when a
+   new sub-table should be started.  drop is zero when the root table is
+   being filled, and drop is root when sub-tables are being filled.
+
+   When a new sub-table is needed, it is necessary to look ahead in the
+   code lengths to determine what size sub-table is needed.  The length
+   counts are used for this, and so count[] is decremented as codes are
+   entered in the tables.
+
+   used keeps track of how many table entries have been allocated from the
+   provided *table space.  It is checked for LENS and DIST tables against
+   the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in
+   the initial root table size constants.  See the comments in inftrees.h
+   for more information.
+
+   sym increments through all symbols, and the loop terminates when
+   all codes of length max, i.e. all codes, have been processed.  This
+   routine permits incomplete codes, so another loop after this one fills
+   in the rest of the decoding tables with invalid code markers.
+   */
+
+  /* set up for code type */
+  // poor man optimization - use if-else instead of switch,
+  // to avoid deopts in old v8
+  if (type === CODES) {
+    base = extra = work;    /* dummy value--not used */
+    end = 19;
+
+  } else if (type === LENS) {
+    base = lbase;
+    base_index -= 257;
+    extra = lext;
+    extra_index -= 257;
+    end = 256;
+
+  } else {                    /* DISTS */
+    base = dbase;
+    extra = dext;
+    end = -1;
+  }
+
+  /* initialize opts for loop */
+  huff = 0;                   /* starting code */
+  sym = 0;                    /* starting code symbol */
+  len = min;                  /* starting code length */
+  next = table_index;              /* current table to fill in */
+  curr = root;                /* current table index bits */
+  drop = 0;                   /* current bits to drop from code for index */
+  low = -1;                   /* trigger new sub-table when len > root */
+  used = 1 << root;          /* use root table entries */
+  mask = used - 1;            /* mask for comparing low */
+
+  /* check available table space */
+  if ((type === LENS && used > ENOUGH_LENS) ||
+    (type === DISTS && used > ENOUGH_DISTS)) {
+    return 1;
+  }
+
+  /* process all codes and make table entries */
+  for (;;) {
+    /* create table entry */
+    here_bits = len - drop;
+    if (work[sym] < end) {
+      here_op = 0;
+      here_val = work[sym];
+    }
+    else if (work[sym] > end) {
+      here_op = extra[extra_index + work[sym]];
+      here_val = base[base_index + work[sym]];
+    }
+    else {
+      here_op = 32 + 64;         /* end of block */
+      here_val = 0;
+    }
+
+    /* replicate for those indices with low len bits equal to huff */
+    incr = 1 << (len - drop);
+    fill = 1 << curr;
+    min = fill;                 /* save offset to next table */
+    do {
+      fill -= incr;
+      table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;
+    } while (fill !== 0);
+
+    /* backwards increment the len-bit code huff */
+    incr = 1 << (len - 1);
+    while (huff & incr) {
+      incr >>= 1;
+    }
+    if (incr !== 0) {
+      huff &= incr - 1;
+      huff += incr;
+    } else {
+      huff = 0;
+    }
+
+    /* go to next symbol, update count, len */
+    sym++;
+    if (--count[len] === 0) {
+      if (len === max) { break; }
+      len = lens[lens_index + work[sym]];
+    }
+
+    /* create new sub-table if needed */
+    if (len > root && (huff & mask) !== low) {
+      /* if first time, transition to sub-tables */
+      if (drop === 0) {
+        drop = root;
+      }
+
+      /* increment past last table */
+      next += min;            /* here min is 1 << curr */
+
+      /* determine length of next table */
+      curr = len - drop;
+      left = 1 << curr;
+      while (curr + drop < max) {
+        left -= count[curr + drop];
+        if (left <= 0) { break; }
+        curr++;
+        left <<= 1;
+      }
+
+      /* check for enough space */
+      used += 1 << curr;
+      if ((type === LENS && used > ENOUGH_LENS) ||
+        (type === DISTS && used > ENOUGH_DISTS)) {
+        return 1;
+      }
+
+      /* point entry in root table to sub-table */
+      low = huff & mask;
+      /*table.op[low] = curr;
+      table.bits[low] = root;
+      table.val[low] = next - opts.table_index;*/
+      table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;
+    }
+  }
+
+  /* fill in remaining table entry if code is incomplete (guaranteed to have
+   at most one remaining entry, since if the code is incomplete, the
+   maximum code length that was allowed to get this far is one bit) */
+  if (huff !== 0) {
+    //table.op[next + huff] = 64;            /* invalid code marker */
+    //table.bits[next + huff] = len - drop;
+    //table.val[next + huff] = 0;
+    table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;
+  }
+
+  /* set return parameters */
+  //opts.table_index += used;
+  opts.bits = root;
+  return 0;
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/pako/lib/zlib/messages.js":
+/*!*******************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/pako/lib/zlib/messages.js ***!
+  \*******************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+// (C) 1995-2013 Jean-loup Gailly and Mark Adler
+// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+//   claim that you wrote the original software. If you use this software
+//   in a product, an acknowledgment in the product documentation would be
+//   appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+//   misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+
+module.exports = {
+  2:      'need dictionary',     /* Z_NEED_DICT       2  */
+  1:      'stream end',          /* Z_STREAM_END      1  */
+  0:      '',                    /* Z_OK              0  */
+  '-1':   'file error',          /* Z_ERRNO         (-1) */
+  '-2':   'stream error',        /* Z_STREAM_ERROR  (-2) */
+  '-3':   'data error',          /* Z_DATA_ERROR    (-3) */
+  '-4':   'insufficient memory', /* Z_MEM_ERROR     (-4) */
+  '-5':   'buffer error',        /* Z_BUF_ERROR     (-5) */
+  '-6':   'incompatible version' /* Z_VERSION_ERROR (-6) */
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/pako/lib/zlib/trees.js":
+/*!****************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/pako/lib/zlib/trees.js ***!
+  \****************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+// (C) 1995-2013 Jean-loup Gailly and Mark Adler
+// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+//   claim that you wrote the original software. If you use this software
+//   in a product, an acknowledgment in the product documentation would be
+//   appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+//   misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+
+var utils = __webpack_require__(/*! ../utils/common */ "./node_modules/jszip/node_modules/pako/lib/utils/common.js");
+
+/* Public constants ==========================================================*/
+/* ===========================================================================*/
+
+
+//var Z_FILTERED          = 1;
+//var Z_HUFFMAN_ONLY      = 2;
+//var Z_RLE               = 3;
+var Z_FIXED               = 4;
+//var Z_DEFAULT_STRATEGY  = 0;
+
+/* Possible values of the data_type field (though see inflate()) */
+var Z_BINARY              = 0;
+var Z_TEXT                = 1;
+//var Z_ASCII             = 1; // = Z_TEXT
+var Z_UNKNOWN             = 2;
+
+/*============================================================================*/
+
+
+function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }
+
+// From zutil.h
+
+var STORED_BLOCK = 0;
+var STATIC_TREES = 1;
+var DYN_TREES    = 2;
+/* The three kinds of block type */
+
+var MIN_MATCH    = 3;
+var MAX_MATCH    = 258;
+/* The minimum and maximum match lengths */
+
+// From deflate.h
+/* ===========================================================================
+ * Internal compression state.
+ */
+
+var LENGTH_CODES  = 29;
+/* number of length codes, not counting the special END_BLOCK code */
+
+var LITERALS      = 256;
+/* number of literal bytes 0..255 */
+
+var L_CODES       = LITERALS + 1 + LENGTH_CODES;
+/* number of Literal or Length codes, including the END_BLOCK code */
+
+var D_CODES       = 30;
+/* number of distance codes */
+
+var BL_CODES      = 19;
+/* number of codes used to transfer the bit lengths */
+
+var HEAP_SIZE     = 2 * L_CODES + 1;
+/* maximum heap size */
+
+var MAX_BITS      = 15;
+/* All codes must not exceed MAX_BITS bits */
+
+var Buf_size      = 16;
+/* size of bit buffer in bi_buf */
+
+
+/* ===========================================================================
+ * Constants
+ */
+
+var MAX_BL_BITS = 7;
+/* Bit length codes must not exceed MAX_BL_BITS bits */
+
+var END_BLOCK   = 256;
+/* end of block literal code */
+
+var REP_3_6     = 16;
+/* repeat previous bit length 3-6 times (2 bits of repeat count) */
+
+var REPZ_3_10   = 17;
+/* repeat a zero length 3-10 times  (3 bits of repeat count) */
+
+var REPZ_11_138 = 18;
+/* repeat a zero length 11-138 times  (7 bits of repeat count) */
+
+/* eslint-disable comma-spacing,array-bracket-spacing */
+var extra_lbits =   /* extra bits for each length code */
+  [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];
+
+var extra_dbits =   /* extra bits for each distance code */
+  [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];
+
+var extra_blbits =  /* extra bits for each bit length code */
+  [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];
+
+var bl_order =
+  [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];
+/* eslint-enable comma-spacing,array-bracket-spacing */
+
+/* The lengths of the bit length codes are sent in order of decreasing
+ * probability, to avoid transmitting the lengths for unused bit length codes.
+ */
+
+/* ===========================================================================
+ * Local data. These are initialized only once.
+ */
+
+// We pre-fill arrays with 0 to avoid uninitialized gaps
+
+var DIST_CODE_LEN = 512; /* see definition of array dist_code below */
+
+// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1
+var static_ltree  = new Array((L_CODES + 2) * 2);
+zero(static_ltree);
+/* The static literal tree. Since the bit lengths are imposed, there is no
+ * need for the L_CODES extra codes used during heap construction. However
+ * The codes 286 and 287 are needed to build a canonical tree (see _tr_init
+ * below).
+ */
+
+var static_dtree  = new Array(D_CODES * 2);
+zero(static_dtree);
+/* The static distance tree. (Actually a trivial tree since all codes use
+ * 5 bits.)
+ */
+
+var _dist_code    = new Array(DIST_CODE_LEN);
+zero(_dist_code);
+/* Distance codes. The first 256 values correspond to the distances
+ * 3 .. 258, the last 256 values correspond to the top 8 bits of
+ * the 15 bit distances.
+ */
+
+var _length_code  = new Array(MAX_MATCH - MIN_MATCH + 1);
+zero(_length_code);
+/* length code for each normalized match length (0 == MIN_MATCH) */
+
+var base_length   = new Array(LENGTH_CODES);
+zero(base_length);
+/* First normalized length for each code (0 = MIN_MATCH) */
+
+var base_dist     = new Array(D_CODES);
+zero(base_dist);
+/* First normalized distance for each code (0 = distance of 1) */
+
+
+function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {
+
+  this.static_tree  = static_tree;  /* static tree or NULL */
+  this.extra_bits   = extra_bits;   /* extra bits for each code or NULL */
+  this.extra_base   = extra_base;   /* base index for extra_bits */
+  this.elems        = elems;        /* max number of elements in the tree */
+  this.max_length   = max_length;   /* max bit length for the codes */
+
+  // show if `static_tree` has data or dummy - needed for monomorphic objects
+  this.has_stree    = static_tree && static_tree.length;
+}
+
+
+var static_l_desc;
+var static_d_desc;
+var static_bl_desc;
+
+
+function TreeDesc(dyn_tree, stat_desc) {
+  this.dyn_tree = dyn_tree;     /* the dynamic tree */
+  this.max_code = 0;            /* largest code with non zero frequency */
+  this.stat_desc = stat_desc;   /* the corresponding static tree */
+}
+
+
+
+function d_code(dist) {
+  return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];
+}
+
+
+/* ===========================================================================
+ * Output a short LSB first on the stream.
+ * IN assertion: there is enough room in pendingBuf.
+ */
+function put_short(s, w) {
+//    put_byte(s, (uch)((w) & 0xff));
+//    put_byte(s, (uch)((ush)(w) >> 8));
+  s.pending_buf[s.pending++] = (w) & 0xff;
+  s.pending_buf[s.pending++] = (w >>> 8) & 0xff;
+}
+
+
+/* ===========================================================================
+ * Send a value on a given number of bits.
+ * IN assertion: length <= 16 and value fits in length bits.
+ */
+function send_bits(s, value, length) {
+  if (s.bi_valid > (Buf_size - length)) {
+    s.bi_buf |= (value << s.bi_valid) & 0xffff;
+    put_short(s, s.bi_buf);
+    s.bi_buf = value >> (Buf_size - s.bi_valid);
+    s.bi_valid += length - Buf_size;
+  } else {
+    s.bi_buf |= (value << s.bi_valid) & 0xffff;
+    s.bi_valid += length;
+  }
+}
+
+
+function send_code(s, c, tree) {
+  send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);
+}
+
+
+/* ===========================================================================
+ * Reverse the first len bits of a code, using straightforward code (a faster
+ * method would use a table)
+ * IN assertion: 1 <= len <= 15
+ */
+function bi_reverse(code, len) {
+  var res = 0;
+  do {
+    res |= code & 1;
+    code >>>= 1;
+    res <<= 1;
+  } while (--len > 0);
+  return res >>> 1;
+}
+
+
+/* ===========================================================================
+ * Flush the bit buffer, keeping at most 7 bits in it.
+ */
+function bi_flush(s) {
+  if (s.bi_valid === 16) {
+    put_short(s, s.bi_buf);
+    s.bi_buf = 0;
+    s.bi_valid = 0;
+
+  } else if (s.bi_valid >= 8) {
+    s.pending_buf[s.pending++] = s.bi_buf & 0xff;
+    s.bi_buf >>= 8;
+    s.bi_valid -= 8;
+  }
+}
+
+
+/* ===========================================================================
+ * Compute the optimal bit lengths for a tree and update the total bit length
+ * for the current block.
+ * IN assertion: the fields freq and dad are set, heap[heap_max] and
+ *    above are the tree nodes sorted by increasing frequency.
+ * OUT assertions: the field len is set to the optimal bit length, the
+ *     array bl_count contains the frequencies for each bit length.
+ *     The length opt_len is updated; static_len is also updated if stree is
+ *     not null.
+ */
+function gen_bitlen(s, desc)
+//    deflate_state *s;
+//    tree_desc *desc;    /* the tree descriptor */
+{
+  var tree            = desc.dyn_tree;
+  var max_code        = desc.max_code;
+  var stree           = desc.stat_desc.static_tree;
+  var has_stree       = desc.stat_desc.has_stree;
+  var extra           = desc.stat_desc.extra_bits;
+  var base            = desc.stat_desc.extra_base;
+  var max_length      = desc.stat_desc.max_length;
+  var h;              /* heap index */
+  var n, m;           /* iterate over the tree elements */
+  var bits;           /* bit length */
+  var xbits;          /* extra bits */
+  var f;              /* frequency */
+  var overflow = 0;   /* number of elements with bit length too large */
+
+  for (bits = 0; bits <= MAX_BITS; bits++) {
+    s.bl_count[bits] = 0;
+  }
+
+  /* In a first pass, compute the optimal bit lengths (which may
+   * overflow in the case of the bit length tree).
+   */
+  tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */
+
+  for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {
+    n = s.heap[h];
+    bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;
+    if (bits > max_length) {
+      bits = max_length;
+      overflow++;
+    }
+    tree[n * 2 + 1]/*.Len*/ = bits;
+    /* We overwrite tree[n].Dad which is no longer needed */
+
+    if (n > max_code) { continue; } /* not a leaf node */
+
+    s.bl_count[bits]++;
+    xbits = 0;
+    if (n >= base) {
+      xbits = extra[n - base];
+    }
+    f = tree[n * 2]/*.Freq*/;
+    s.opt_len += f * (bits + xbits);
+    if (has_stree) {
+      s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);
+    }
+  }
+  if (overflow === 0) { return; }
+
+  // Trace((stderr,"\nbit length overflow\n"));
+  /* This happens for example on obj2 and pic of the Calgary corpus */
+
+  /* Find the first bit length which could increase: */
+  do {
+    bits = max_length - 1;
+    while (s.bl_count[bits] === 0) { bits--; }
+    s.bl_count[bits]--;      /* move one leaf down the tree */
+    s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */
+    s.bl_count[max_length]--;
+    /* The brother of the overflow item also moves one step up,
+     * but this does not affect bl_count[max_length]
+     */
+    overflow -= 2;
+  } while (overflow > 0);
+
+  /* Now recompute all bit lengths, scanning in increasing frequency.
+   * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all
+   * lengths instead of fixing only the wrong ones. This idea is taken
+   * from 'ar' written by Haruhiko Okumura.)
+   */
+  for (bits = max_length; bits !== 0; bits--) {
+    n = s.bl_count[bits];
+    while (n !== 0) {
+      m = s.heap[--h];
+      if (m > max_code) { continue; }
+      if (tree[m * 2 + 1]/*.Len*/ !== bits) {
+        // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
+        s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;
+        tree[m * 2 + 1]/*.Len*/ = bits;
+      }
+      n--;
+    }
+  }
+}
+
+
+/* ===========================================================================
+ * Generate the codes for a given tree and bit counts (which need not be
+ * optimal).
+ * IN assertion: the array bl_count contains the bit length statistics for
+ * the given tree and the field len is set for all tree elements.
+ * OUT assertion: the field code is set for all tree elements of non
+ *     zero code length.
+ */
+function gen_codes(tree, max_code, bl_count)
+//    ct_data *tree;             /* the tree to decorate */
+//    int max_code;              /* largest code with non zero frequency */
+//    ushf *bl_count;            /* number of codes at each bit length */
+{
+  var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */
+  var code = 0;              /* running code value */
+  var bits;                  /* bit index */
+  var n;                     /* code index */
+
+  /* The distribution counts are first used to generate the code values
+   * without bit reversal.
+   */
+  for (bits = 1; bits <= MAX_BITS; bits++) {
+    next_code[bits] = code = (code + bl_count[bits - 1]) << 1;
+  }
+  /* Check that the bit counts in bl_count are consistent. The last code
+   * must be all ones.
+   */
+  //Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,
+  //        "inconsistent bit counts");
+  //Tracev((stderr,"\ngen_codes: max_code %d ", max_code));
+
+  for (n = 0;  n <= max_code; n++) {
+    var len = tree[n * 2 + 1]/*.Len*/;
+    if (len === 0) { continue; }
+    /* Now reverse the bits */
+    tree[n * 2]/*.Code*/ = bi_reverse(next_code[len]++, len);
+
+    //Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",
+    //     n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));
+  }
+}
+
+
+/* ===========================================================================
+ * Initialize the various 'constant' tables.
+ */
+function tr_static_init() {
+  var n;        /* iterates over tree elements */
+  var bits;     /* bit counter */
+  var length;   /* length value */
+  var code;     /* code value */
+  var dist;     /* distance index */
+  var bl_count = new Array(MAX_BITS + 1);
+  /* number of codes at each bit length for an optimal tree */
+
+  // do check in _tr_init()
+  //if (static_init_done) return;
+
+  /* For some embedded targets, global variables are not initialized: */
+/*#ifdef NO_INIT_GLOBAL_POINTERS
+  static_l_desc.static_tree = static_ltree;
+  static_l_desc.extra_bits = extra_lbits;
+  static_d_desc.static_tree = static_dtree;
+  static_d_desc.extra_bits = extra_dbits;
+  static_bl_desc.extra_bits = extra_blbits;
+#endif*/
+
+  /* Initialize the mapping length (0..255) -> length code (0..28) */
+  length = 0;
+  for (code = 0; code < LENGTH_CODES - 1; code++) {
+    base_length[code] = length;
+    for (n = 0; n < (1 << extra_lbits[code]); n++) {
+      _length_code[length++] = code;
+    }
+  }
+  //Assert (length == 256, "tr_static_init: length != 256");
+  /* Note that the length 255 (match length 258) can be represented
+   * in two different ways: code 284 + 5 bits or code 285, so we
+   * overwrite length_code[255] to use the best encoding:
+   */
+  _length_code[length - 1] = code;
+
+  /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
+  dist = 0;
+  for (code = 0; code < 16; code++) {
+    base_dist[code] = dist;
+    for (n = 0; n < (1 << extra_dbits[code]); n++) {
+      _dist_code[dist++] = code;
+    }
+  }
+  //Assert (dist == 256, "tr_static_init: dist != 256");
+  dist >>= 7; /* from now on, all distances are divided by 128 */
+  for (; code < D_CODES; code++) {
+    base_dist[code] = dist << 7;
+    for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {
+      _dist_code[256 + dist++] = code;
+    }
+  }
+  //Assert (dist == 256, "tr_static_init: 256+dist != 512");
+
+  /* Construct the codes of the static literal tree */
+  for (bits = 0; bits <= MAX_BITS; bits++) {
+    bl_count[bits] = 0;
+  }
+
+  n = 0;
+  while (n <= 143) {
+    static_ltree[n * 2 + 1]/*.Len*/ = 8;
+    n++;
+    bl_count[8]++;
+  }
+  while (n <= 255) {
+    static_ltree[n * 2 + 1]/*.Len*/ = 9;
+    n++;
+    bl_count[9]++;
+  }
+  while (n <= 279) {
+    static_ltree[n * 2 + 1]/*.Len*/ = 7;
+    n++;
+    bl_count[7]++;
+  }
+  while (n <= 287) {
+    static_ltree[n * 2 + 1]/*.Len*/ = 8;
+    n++;
+    bl_count[8]++;
+  }
+  /* Codes 286 and 287 do not exist, but we must include them in the
+   * tree construction to get a canonical Huffman tree (longest code
+   * all ones)
+   */
+  gen_codes(static_ltree, L_CODES + 1, bl_count);
+
+  /* The static distance tree is trivial: */
+  for (n = 0; n < D_CODES; n++) {
+    static_dtree[n * 2 + 1]/*.Len*/ = 5;
+    static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);
+  }
+
+  // Now data ready and we can init static trees
+  static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);
+  static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0,          D_CODES, MAX_BITS);
+  static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0,         BL_CODES, MAX_BL_BITS);
+
+  //static_init_done = true;
+}
+
+
+/* ===========================================================================
+ * Initialize a new block.
+ */
+function init_block(s) {
+  var n; /* iterates over tree elements */
+
+  /* Initialize the trees. */
+  for (n = 0; n < L_CODES;  n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }
+  for (n = 0; n < D_CODES;  n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }
+  for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }
+
+  s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;
+  s.opt_len = s.static_len = 0;
+  s.last_lit = s.matches = 0;
+}
+
+
+/* ===========================================================================
+ * Flush the bit buffer and align the output on a byte boundary
+ */
+function bi_windup(s)
+{
+  if (s.bi_valid > 8) {
+    put_short(s, s.bi_buf);
+  } else if (s.bi_valid > 0) {
+    //put_byte(s, (Byte)s->bi_buf);
+    s.pending_buf[s.pending++] = s.bi_buf;
+  }
+  s.bi_buf = 0;
+  s.bi_valid = 0;
+}
+
+/* ===========================================================================
+ * Copy a stored block, storing first the length and its
+ * one's complement if requested.
+ */
+function copy_block(s, buf, len, header)
+//DeflateState *s;
+//charf    *buf;    /* the input data */
+//unsigned len;     /* its length */
+//int      header;  /* true if block header must be written */
+{
+  bi_windup(s);        /* align on byte boundary */
+
+  if (header) {
+    put_short(s, len);
+    put_short(s, ~len);
+  }
+//  while (len--) {
+//    put_byte(s, *buf++);
+//  }
+  utils.arraySet(s.pending_buf, s.window, buf, len, s.pending);
+  s.pending += len;
+}
+
+/* ===========================================================================
+ * Compares to subtrees, using the tree depth as tie breaker when
+ * the subtrees have equal frequency. This minimizes the worst case length.
+ */
+function smaller(tree, n, m, depth) {
+  var _n2 = n * 2;
+  var _m2 = m * 2;
+  return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||
+         (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));
+}
+
+/* ===========================================================================
+ * Restore the heap property by moving down the tree starting at node k,
+ * exchanging a node with the smallest of its two sons if necessary, stopping
+ * when the heap property is re-established (each father smaller than its
+ * two sons).
+ */
+function pqdownheap(s, tree, k)
+//    deflate_state *s;
+//    ct_data *tree;  /* the tree to restore */
+//    int k;               /* node to move down */
+{
+  var v = s.heap[k];
+  var j = k << 1;  /* left son of k */
+  while (j <= s.heap_len) {
+    /* Set j to the smallest of the two sons: */
+    if (j < s.heap_len &&
+      smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {
+      j++;
+    }
+    /* Exit if v is smaller than both sons */
+    if (smaller(tree, v, s.heap[j], s.depth)) { break; }
+
+    /* Exchange v with the smallest son */
+    s.heap[k] = s.heap[j];
+    k = j;
+
+    /* And continue down the tree, setting j to the left son of k */
+    j <<= 1;
+  }
+  s.heap[k] = v;
+}
+
+
+// inlined manually
+// var SMALLEST = 1;
+
+/* ===========================================================================
+ * Send the block data compressed using the given Huffman trees
+ */
+function compress_block(s, ltree, dtree)
+//    deflate_state *s;
+//    const ct_data *ltree; /* literal tree */
+//    const ct_data *dtree; /* distance tree */
+{
+  var dist;           /* distance of matched string */
+  var lc;             /* match length or unmatched char (if dist == 0) */
+  var lx = 0;         /* running index in l_buf */
+  var code;           /* the code to send */
+  var extra;          /* number of extra bits to send */
+
+  if (s.last_lit !== 0) {
+    do {
+      dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);
+      lc = s.pending_buf[s.l_buf + lx];
+      lx++;
+
+      if (dist === 0) {
+        send_code(s, lc, ltree); /* send a literal byte */
+        //Tracecv(isgraph(lc), (stderr," '%c' ", lc));
+      } else {
+        /* Here, lc is the match length - MIN_MATCH */
+        code = _length_code[lc];
+        send_code(s, code + LITERALS + 1, ltree); /* send the length code */
+        extra = extra_lbits[code];
+        if (extra !== 0) {
+          lc -= base_length[code];
+          send_bits(s, lc, extra);       /* send the extra length bits */
+        }
+        dist--; /* dist is now the match distance - 1 */
+        code = d_code(dist);
+        //Assert (code < D_CODES, "bad d_code");
+
+        send_code(s, code, dtree);       /* send the distance code */
+        extra = extra_dbits[code];
+        if (extra !== 0) {
+          dist -= base_dist[code];
+          send_bits(s, dist, extra);   /* send the extra distance bits */
+        }
+      } /* literal or match pair ? */
+
+      /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */
+      //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,
+      //       "pendingBuf overflow");
+
+    } while (lx < s.last_lit);
+  }
+
+  send_code(s, END_BLOCK, ltree);
+}
+
+
+/* ===========================================================================
+ * Construct one Huffman tree and assigns the code bit strings and lengths.
+ * Update the total bit length for the current block.
+ * IN assertion: the field freq is set for all tree elements.
+ * OUT assertions: the fields len and code are set to the optimal bit length
+ *     and corresponding code. The length opt_len is updated; static_len is
+ *     also updated if stree is not null. The field max_code is set.
+ */
+function build_tree(s, desc)
+//    deflate_state *s;
+//    tree_desc *desc; /* the tree descriptor */
+{
+  var tree     = desc.dyn_tree;
+  var stree    = desc.stat_desc.static_tree;
+  var has_stree = desc.stat_desc.has_stree;
+  var elems    = desc.stat_desc.elems;
+  var n, m;          /* iterate over heap elements */
+  var max_code = -1; /* largest code with non zero frequency */
+  var node;          /* new node being created */
+
+  /* Construct the initial heap, with least frequent element in
+   * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].
+   * heap[0] is not used.
+   */
+  s.heap_len = 0;
+  s.heap_max = HEAP_SIZE;
+
+  for (n = 0; n < elems; n++) {
+    if (tree[n * 2]/*.Freq*/ !== 0) {
+      s.heap[++s.heap_len] = max_code = n;
+      s.depth[n] = 0;
+
+    } else {
+      tree[n * 2 + 1]/*.Len*/ = 0;
+    }
+  }
+
+  /* The pkzip format requires that at least one distance code exists,
+   * and that at least one bit should be sent even if there is only one
+   * possible code. So to avoid special checks later on we force at least
+   * two codes of non zero frequency.
+   */
+  while (s.heap_len < 2) {
+    node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);
+    tree[node * 2]/*.Freq*/ = 1;
+    s.depth[node] = 0;
+    s.opt_len--;
+
+    if (has_stree) {
+      s.static_len -= stree[node * 2 + 1]/*.Len*/;
+    }
+    /* node is 0 or 1 so it does not have extra bits */
+  }
+  desc.max_code = max_code;
+
+  /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,
+   * establish sub-heaps of increasing lengths:
+   */
+  for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }
+
+  /* Construct the Huffman tree by repeatedly combining the least two
+   * frequent nodes.
+   */
+  node = elems;              /* next internal node of the tree */
+  do {
+    //pqremove(s, tree, n);  /* n = node of least frequency */
+    /*** pqremove ***/
+    n = s.heap[1/*SMALLEST*/];
+    s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];
+    pqdownheap(s, tree, 1/*SMALLEST*/);
+    /***/
+
+    m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */
+
+    s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */
+    s.heap[--s.heap_max] = m;
+
+    /* Create a new node father of n and m */
+    tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;
+    s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;
+    tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;
+
+    /* and insert the new node in the heap */
+    s.heap[1/*SMALLEST*/] = node++;
+    pqdownheap(s, tree, 1/*SMALLEST*/);
+
+  } while (s.heap_len >= 2);
+
+  s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];
+
+  /* At this point, the fields freq and dad are set. We can now
+   * generate the bit lengths.
+   */
+  gen_bitlen(s, desc);
+
+  /* The field len is now set, we can generate the bit codes */
+  gen_codes(tree, max_code, s.bl_count);
+}
+
+
+/* ===========================================================================
+ * Scan a literal or distance tree to determine the frequencies of the codes
+ * in the bit length tree.
+ */
+function scan_tree(s, tree, max_code)
+//    deflate_state *s;
+//    ct_data *tree;   /* the tree to be scanned */
+//    int max_code;    /* and its largest code of non zero frequency */
+{
+  var n;                     /* iterates over all tree elements */
+  var prevlen = -1;          /* last emitted length */
+  var curlen;                /* length of current code */
+
+  var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */
+
+  var count = 0;             /* repeat count of the current code */
+  var max_count = 7;         /* max repeat count */
+  var min_count = 4;         /* min repeat count */
+
+  if (nextlen === 0) {
+    max_count = 138;
+    min_count = 3;
+  }
+  tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */
+
+  for (n = 0; n <= max_code; n++) {
+    curlen = nextlen;
+    nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;
+
+    if (++count < max_count && curlen === nextlen) {
+      continue;
+
+    } else if (count < min_count) {
+      s.bl_tree[curlen * 2]/*.Freq*/ += count;
+
+    } else if (curlen !== 0) {
+
+      if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }
+      s.bl_tree[REP_3_6 * 2]/*.Freq*/++;
+
+    } else if (count <= 10) {
+      s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;
+
+    } else {
+      s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;
+    }
+
+    count = 0;
+    prevlen = curlen;
+
+    if (nextlen === 0) {
+      max_count = 138;
+      min_count = 3;
+
+    } else if (curlen === nextlen) {
+      max_count = 6;
+      min_count = 3;
+
+    } else {
+      max_count = 7;
+      min_count = 4;
+    }
+  }
+}
+
+
+/* ===========================================================================
+ * Send a literal or distance tree in compressed form, using the codes in
+ * bl_tree.
+ */
+function send_tree(s, tree, max_code)
+//    deflate_state *s;
+//    ct_data *tree; /* the tree to be scanned */
+//    int max_code;       /* and its largest code of non zero frequency */
+{
+  var n;                     /* iterates over all tree elements */
+  var prevlen = -1;          /* last emitted length */
+  var curlen;                /* length of current code */
+
+  var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */
+
+  var count = 0;             /* repeat count of the current code */
+  var max_count = 7;         /* max repeat count */
+  var min_count = 4;         /* min repeat count */
+
+  /* tree[max_code+1].Len = -1; */  /* guard already set */
+  if (nextlen === 0) {
+    max_count = 138;
+    min_count = 3;
+  }
+
+  for (n = 0; n <= max_code; n++) {
+    curlen = nextlen;
+    nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;
+
+    if (++count < max_count && curlen === nextlen) {
+      continue;
+
+    } else if (count < min_count) {
+      do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);
+
+    } else if (curlen !== 0) {
+      if (curlen !== prevlen) {
+        send_code(s, curlen, s.bl_tree);
+        count--;
+      }
+      //Assert(count >= 3 && count <= 6, " 3_6?");
+      send_code(s, REP_3_6, s.bl_tree);
+      send_bits(s, count - 3, 2);
+
+    } else if (count <= 10) {
+      send_code(s, REPZ_3_10, s.bl_tree);
+      send_bits(s, count - 3, 3);
+
+    } else {
+      send_code(s, REPZ_11_138, s.bl_tree);
+      send_bits(s, count - 11, 7);
+    }
+
+    count = 0;
+    prevlen = curlen;
+    if (nextlen === 0) {
+      max_count = 138;
+      min_count = 3;
+
+    } else if (curlen === nextlen) {
+      max_count = 6;
+      min_count = 3;
+
+    } else {
+      max_count = 7;
+      min_count = 4;
+    }
+  }
+}
+
+
+/* ===========================================================================
+ * Construct the Huffman tree for the bit lengths and return the index in
+ * bl_order of the last bit length code to send.
+ */
+function build_bl_tree(s) {
+  var max_blindex;  /* index of last bit length code of non zero freq */
+
+  /* Determine the bit length frequencies for literal and distance trees */
+  scan_tree(s, s.dyn_ltree, s.l_desc.max_code);
+  scan_tree(s, s.dyn_dtree, s.d_desc.max_code);
+
+  /* Build the bit length tree: */
+  build_tree(s, s.bl_desc);
+  /* opt_len now includes the length of the tree representations, except
+   * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
+   */
+
+  /* Determine the number of bit length codes to send. The pkzip format
+   * requires that at least 4 bit length codes be sent. (appnote.txt says
+   * 3 but the actual value used is 4.)
+   */
+  for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {
+    if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {
+      break;
+    }
+  }
+  /* Update opt_len to include the bit length tree and counts */
+  s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;
+  //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
+  //        s->opt_len, s->static_len));
+
+  return max_blindex;
+}
+
+
+/* ===========================================================================
+ * Send the header for a block using dynamic Huffman trees: the counts, the
+ * lengths of the bit length codes, the literal tree and the distance tree.
+ * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
+ */
+function send_all_trees(s, lcodes, dcodes, blcodes)
+//    deflate_state *s;
+//    int lcodes, dcodes, blcodes; /* number of codes for each tree */
+{
+  var rank;                    /* index in bl_order */
+
+  //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
+  //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,
+  //        "too many codes");
+  //Tracev((stderr, "\nbl counts: "));
+  send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */
+  send_bits(s, dcodes - 1,   5);
+  send_bits(s, blcodes - 4,  4); /* not -3 as stated in appnote.txt */
+  for (rank = 0; rank < blcodes; rank++) {
+    //Tracev((stderr, "\nbl code %2d ", bl_order[rank]));
+    send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);
+  }
+  //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent));
+
+  send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */
+  //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent));
+
+  send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */
+  //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent));
+}
+
+
+/* ===========================================================================
+ * Check if the data type is TEXT or BINARY, using the following algorithm:
+ * - TEXT if the two conditions below are satisfied:
+ *    a) There are no non-portable control characters belonging to the
+ *       "black list" (0..6, 14..25, 28..31).
+ *    b) There is at least one printable character belonging to the
+ *       "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).
+ * - BINARY otherwise.
+ * - The following partially-portable control characters form a
+ *   "gray list" that is ignored in this detection algorithm:
+ *   (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).
+ * IN assertion: the fields Freq of dyn_ltree are set.
+ */
+function detect_data_type(s) {
+  /* black_mask is the bit mask of black-listed bytes
+   * set bits 0..6, 14..25, and 28..31
+   * 0xf3ffc07f = binary 11110011111111111100000001111111
+   */
+  var black_mask = 0xf3ffc07f;
+  var n;
+
+  /* Check for non-textual ("black-listed") bytes. */
+  for (n = 0; n <= 31; n++, black_mask >>>= 1) {
+    if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {
+      return Z_BINARY;
+    }
+  }
+
+  /* Check for textual ("white-listed") bytes. */
+  if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||
+      s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {
+    return Z_TEXT;
+  }
+  for (n = 32; n < LITERALS; n++) {
+    if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {
+      return Z_TEXT;
+    }
+  }
+
+  /* There are no "black-listed" or "white-listed" bytes:
+   * this stream either is empty or has tolerated ("gray-listed") bytes only.
+   */
+  return Z_BINARY;
+}
+
+
+var static_init_done = false;
+
+/* ===========================================================================
+ * Initialize the tree data structures for a new zlib stream.
+ */
+function _tr_init(s)
+{
+
+  if (!static_init_done) {
+    tr_static_init();
+    static_init_done = true;
+  }
+
+  s.l_desc  = new TreeDesc(s.dyn_ltree, static_l_desc);
+  s.d_desc  = new TreeDesc(s.dyn_dtree, static_d_desc);
+  s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);
+
+  s.bi_buf = 0;
+  s.bi_valid = 0;
+
+  /* Initialize the first block of the first file: */
+  init_block(s);
+}
+
+
+/* ===========================================================================
+ * Send a stored block
+ */
+function _tr_stored_block(s, buf, stored_len, last)
+//DeflateState *s;
+//charf *buf;       /* input block */
+//ulg stored_len;   /* length of input block */
+//int last;         /* one if this is the last block for a file */
+{
+  send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3);    /* send block type */
+  copy_block(s, buf, stored_len, true); /* with header */
+}
+
+
+/* ===========================================================================
+ * Send one empty static block to give enough lookahead for inflate.
+ * This takes 10 bits, of which 7 may remain in the bit buffer.
+ */
+function _tr_align(s) {
+  send_bits(s, STATIC_TREES << 1, 3);
+  send_code(s, END_BLOCK, static_ltree);
+  bi_flush(s);
+}
+
+
+/* ===========================================================================
+ * Determine the best encoding for the current block: dynamic trees, static
+ * trees or store, and output the encoded block to the zip file.
+ */
+function _tr_flush_block(s, buf, stored_len, last)
+//DeflateState *s;
+//charf *buf;       /* input block, or NULL if too old */
+//ulg stored_len;   /* length of input block */
+//int last;         /* one if this is the last block for a file */
+{
+  var opt_lenb, static_lenb;  /* opt_len and static_len in bytes */
+  var max_blindex = 0;        /* index of last bit length code of non zero freq */
+
+  /* Build the Huffman trees unless a stored block is forced */
+  if (s.level > 0) {
+
+    /* Check if the file is binary or text */
+    if (s.strm.data_type === Z_UNKNOWN) {
+      s.strm.data_type = detect_data_type(s);
+    }
+
+    /* Construct the literal and distance trees */
+    build_tree(s, s.l_desc);
+    // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len,
+    //        s->static_len));
+
+    build_tree(s, s.d_desc);
+    // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len,
+    //        s->static_len));
+    /* At this point, opt_len and static_len are the total bit lengths of
+     * the compressed block data, excluding the tree representations.
+     */
+
+    /* Build the bit length tree for the above two trees, and get the index
+     * in bl_order of the last bit length code to send.
+     */
+    max_blindex = build_bl_tree(s);
+
+    /* Determine the best encoding. Compute the block lengths in bytes. */
+    opt_lenb = (s.opt_len + 3 + 7) >>> 3;
+    static_lenb = (s.static_len + 3 + 7) >>> 3;
+
+    // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ",
+    //        opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,
+    //        s->last_lit));
+
+    if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }
+
+  } else {
+    // Assert(buf != (char*)0, "lost buf");
+    opt_lenb = static_lenb = stored_len + 5; /* force a stored block */
+  }
+
+  if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {
+    /* 4: two words for the lengths */
+
+    /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.
+     * Otherwise we can't have processed more than WSIZE input bytes since
+     * the last block flush, because compression would have been
+     * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
+     * transform a block into a stored block.
+     */
+    _tr_stored_block(s, buf, stored_len, last);
+
+  } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {
+
+    send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);
+    compress_block(s, static_ltree, static_dtree);
+
+  } else {
+    send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);
+    send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);
+    compress_block(s, s.dyn_ltree, s.dyn_dtree);
+  }
+  // Assert (s->compressed_len == s->bits_sent, "bad compressed size");
+  /* The above check is made mod 2^32, for files larger than 512 MB
+   * and uLong implemented on 32 bits.
+   */
+  init_block(s);
+
+  if (last) {
+    bi_windup(s);
+  }
+  // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3,
+  //       s->compressed_len-7*last));
+}
+
+/* ===========================================================================
+ * Save the match info and tally the frequency counts. Return true if
+ * the current block must be flushed.
+ */
+function _tr_tally(s, dist, lc)
+//    deflate_state *s;
+//    unsigned dist;  /* distance of matched string */
+//    unsigned lc;    /* match length-MIN_MATCH or unmatched char (if dist==0) */
+{
+  //var out_length, in_length, dcode;
+
+  s.pending_buf[s.d_buf + s.last_lit * 2]     = (dist >>> 8) & 0xff;
+  s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;
+
+  s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;
+  s.last_lit++;
+
+  if (dist === 0) {
+    /* lc is the unmatched char */
+    s.dyn_ltree[lc * 2]/*.Freq*/++;
+  } else {
+    s.matches++;
+    /* Here, lc is the match length - MIN_MATCH */
+    dist--;             /* dist = match distance - 1 */
+    //Assert((ush)dist < (ush)MAX_DIST(s) &&
+    //       (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&
+    //       (ush)d_code(dist) < (ush)D_CODES,  "_tr_tally: bad match");
+
+    s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;
+    s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;
+  }
+
+// (!) This block is disabled in zlib defaults,
+// don't enable it for binary compatibility
+
+//#ifdef TRUNCATE_BLOCK
+//  /* Try to guess if it is profitable to stop the current block here */
+//  if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {
+//    /* Compute an upper bound for the compressed length */
+//    out_length = s.last_lit*8;
+//    in_length = s.strstart - s.block_start;
+//
+//    for (dcode = 0; dcode < D_CODES; dcode++) {
+//      out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);
+//    }
+//    out_length >>>= 3;
+//    //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ",
+//    //       s->last_lit, in_length, out_length,
+//    //       100L - out_length*100L/in_length));
+//    if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {
+//      return true;
+//    }
+//  }
+//#endif
+
+  return (s.last_lit === s.lit_bufsize - 1);
+  /* We avoid equality with lit_bufsize because of wraparound at 64K
+   * on 16 bit machines and because stored blocks are restricted to
+   * 64K-1 bytes.
+   */
+}
+
+exports._tr_init  = _tr_init;
+exports._tr_stored_block = _tr_stored_block;
+exports._tr_flush_block  = _tr_flush_block;
+exports._tr_tally = _tr_tally;
+exports._tr_align = _tr_align;
+
+
+/***/ }),
+
+/***/ "./node_modules/jszip/node_modules/pako/lib/zlib/zstream.js":
+/*!******************************************************************!*\
+  !*** ./node_modules/jszip/node_modules/pako/lib/zlib/zstream.js ***!
+  \******************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+// (C) 1995-2013 Jean-loup Gailly and Mark Adler
+// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+//   claim that you wrote the original software. If you use this software
+//   in a product, an acknowledgment in the product documentation would be
+//   appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+//   misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+
+function ZStream() {
+  /* next input byte */
+  this.input = null; // JS specific, because we have no pointers
+  this.next_in = 0;
+  /* number of bytes available at input */
+  this.avail_in = 0;
+  /* total number of input bytes read so far */
+  this.total_in = 0;
+  /* next output byte should be put there */
+  this.output = null; // JS specific, because we have no pointers
+  this.next_out = 0;
+  /* remaining free space at output */
+  this.avail_out = 0;
+  /* total number of bytes output so far */
+  this.total_out = 0;
+  /* last error message, NULL if no error */
+  this.msg = ''/*Z_NULL*/;
+  /* not visible by applications */
+  this.state = null;
+  /* best guess about the data type: binary or text */
+  this.data_type = 2/*Z_UNKNOWN*/;
+  /* adler32 value of the uncompressed data */
+  this.adler = 0;
+}
+
+module.exports = ZStream;
+
+
+/***/ }),
+
+/***/ "./node_modules/moment/min/moment.min.js":
+/*!***********************************************!*\
+  !*** ./node_modules/moment/min/moment.min.js ***!
+  \***********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* WEBPACK VAR INJECTION */(function(module) {!function(e,t){ true?module.exports=t():undefined}(this,function(){"use strict";var e,i;function c(){return e.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function u(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function l(e){return void 0===e}function d(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function h(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var n,s=[];for(n=0;n<e.length;++n)s.push(t(e[n],n));return s}function m(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function _(e,t){for(var n in t)m(t,n)&&(e[n]=t[n]);return m(t,"toString")&&(e.toString=t.toString),m(t,"valueOf")&&(e.valueOf=t.valueOf),e}function y(e,t,n,s){return Ot(e,t,n,s,!0).utc()}function g(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function p(e){if(null==e._isValid){var t=g(e),n=i.call(t.parsedDateParts,function(e){return null!=e}),s=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(s=s&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return s;e._isValid=s}return e._isValid}function v(e){var t=y(NaN);return null!=e?_(g(t),e):g(t).userInvalidated=!0,t}i=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,s=0;s<n;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1};var r=c.momentProperties=[];function w(e,t){var n,s,i;if(l(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),l(t._i)||(e._i=t._i),l(t._f)||(e._f=t._f),l(t._l)||(e._l=t._l),l(t._strict)||(e._strict=t._strict),l(t._tzm)||(e._tzm=t._tzm),l(t._isUTC)||(e._isUTC=t._isUTC),l(t._offset)||(e._offset=t._offset),l(t._pf)||(e._pf=g(t)),l(t._locale)||(e._locale=t._locale),0<r.length)for(n=0;n<r.length;n++)l(i=t[s=r[n]])||(e[s]=i);return e}var t=!1;function M(e){w(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===t&&(t=!0,c.updateOffset(this),t=!1)}function S(e){return e instanceof M||null!=e&&null!=e._isAMomentObject}function D(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function k(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=D(t)),n}function a(e,t,n){var s,i=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),a=0;for(s=0;s<i;s++)(n&&e[s]!==t[s]||!n&&k(e[s])!==k(t[s]))&&a++;return a+r}function Y(e){!1===c.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function n(i,r){var a=!0;return _(function(){if(null!=c.deprecationHandler&&c.deprecationHandler(null,i),a){for(var e,t=[],n=0;n<arguments.length;n++){if(e="","object"==typeof arguments[n]){for(var s in e+="\n["+n+"] ",arguments[0])e+=s+": "+arguments[0][s]+", ";e=e.slice(0,-2)}else e=arguments[n];t.push(e)}Y(i+"\nArguments: "+Array.prototype.slice.call(t).join("")+"\n"+(new Error).stack),a=!1}return r.apply(this,arguments)},r)}var s,O={};function T(e,t){null!=c.deprecationHandler&&c.deprecationHandler(e,t),O[e]||(Y(t),O[e]=!0)}function x(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function b(e,t){var n,s=_({},e);for(n in t)m(t,n)&&(u(e[n])&&u(t[n])?(s[n]={},_(s[n],e[n]),_(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)m(e,n)&&!m(t,n)&&u(e[n])&&(s[n]=_({},s[n]));return s}function P(e){null!=e&&this.set(e)}c.suppressDeprecationWarnings=!1,c.deprecationHandler=null,s=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)m(e,t)&&n.push(t);return n};var W={};function H(e,t){var n=e.toLowerCase();W[n]=W[n+"s"]=W[t]=e}function R(e){return"string"==typeof e?W[e]||W[e.toLowerCase()]:void 0}function C(e){var t,n,s={};for(n in e)m(e,n)&&(t=R(n))&&(s[t]=e[n]);return s}var F={};function L(e,t){F[e]=t}function U(e,t,n){var s=""+Math.abs(e),i=t-s.length;return(0<=e?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+s}var N=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,G=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,V={},E={};function I(e,t,n,s){var i=s;"string"==typeof s&&(i=function(){return this[s]()}),e&&(E[e]=i),t&&(E[t[0]]=function(){return U(i.apply(this,arguments),t[1],t[2])}),n&&(E[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function A(e,t){return e.isValid()?(t=j(t,e.localeData()),V[t]=V[t]||function(s){var e,i,t,r=s.match(N);for(e=0,i=r.length;e<i;e++)E[r[e]]?r[e]=E[r[e]]:r[e]=(t=r[e]).match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"");return function(e){var t,n="";for(t=0;t<i;t++)n+=x(r[t])?r[t].call(e,s):r[t];return n}}(t),V[t](e)):e.localeData().invalidDate()}function j(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(G.lastIndex=0;0<=n&&G.test(e);)e=e.replace(G,s),G.lastIndex=0,n-=1;return e}var Z=/\d/,z=/\d\d/,$=/\d{3}/,q=/\d{4}/,J=/[+-]?\d{6}/,B=/\d\d?/,Q=/\d\d\d\d?/,X=/\d\d\d\d\d\d?/,K=/\d{1,3}/,ee=/\d{1,4}/,te=/[+-]?\d{1,6}/,ne=/\d+/,se=/[+-]?\d+/,ie=/Z|[+-]\d\d:?\d\d/gi,re=/Z|[+-]\d\d(?::?\d\d)?/gi,ae=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,oe={};function ue(e,n,s){oe[e]=x(n)?n:function(e,t){return e&&s?s:n}}function le(e,t){return m(oe,e)?oe[e](t._strict,t._locale):new RegExp(de(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,s,i){return t||n||s||i})))}function de(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var he={};function ce(e,n){var t,s=n;for("string"==typeof e&&(e=[e]),d(n)&&(s=function(e,t){t[n]=k(e)}),t=0;t<e.length;t++)he[e[t]]=s}function fe(e,i){ce(e,function(e,t,n,s){n._w=n._w||{},i(e,n._w,n,s)})}var me=0,_e=1,ye=2,ge=3,pe=4,ve=5,we=6,Me=7,Se=8;function De(e){return ke(e)?366:365}function ke(e){return e%4==0&&e%100!=0||e%400==0}I("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e}),I(0,["YY",2],0,function(){return this.year()%100}),I(0,["YYYY",4],0,"year"),I(0,["YYYYY",5],0,"year"),I(0,["YYYYYY",6,!0],0,"year"),H("year","y"),L("year",1),ue("Y",se),ue("YY",B,z),ue("YYYY",ee,q),ue("YYYYY",te,J),ue("YYYYYY",te,J),ce(["YYYYY","YYYYYY"],me),ce("YYYY",function(e,t){t[me]=2===e.length?c.parseTwoDigitYear(e):k(e)}),ce("YY",function(e,t){t[me]=c.parseTwoDigitYear(e)}),ce("Y",function(e,t){t[me]=parseInt(e,10)}),c.parseTwoDigitYear=function(e){return k(e)+(68<k(e)?1900:2e3)};var Ye,Oe=Te("FullYear",!0);function Te(t,n){return function(e){return null!=e?(be(this,t,e),c.updateOffset(this,n),this):xe(this,t)}}function xe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function be(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&ke(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Pe(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Pe(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,s=(t%(n=12)+n)%n;return e+=(t-s)/12,1===s?ke(e)?29:28:31-s%7%2}Ye=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},I("M",["MM",2],"Mo",function(){return this.month()+1}),I("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),I("MMMM",0,0,function(e){return this.localeData().months(this,e)}),H("month","M"),L("month",8),ue("M",B),ue("MM",B,z),ue("MMM",function(e,t){return t.monthsShortRegex(e)}),ue("MMMM",function(e,t){return t.monthsRegex(e)}),ce(["M","MM"],function(e,t){t[_e]=k(e)-1}),ce(["MMM","MMMM"],function(e,t,n,s){var i=n._locale.monthsParse(e,s,n._strict);null!=i?t[_e]=i:g(n).invalidMonth=e});var We=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,He="January_February_March_April_May_June_July_August_September_October_November_December".split("_");var Re="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Ce(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=k(t);else if(!d(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Pe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Fe(e){return null!=e?(Ce(this,e),c.updateOffset(this,!0),this):xe(this,"Month")}var Le=ae;var Ue=ae;function Ne(){function e(e,t){return t.length-e.length}var t,n,s=[],i=[],r=[];for(t=0;t<12;t++)n=y([2e3,t]),s.push(this.monthsShort(n,"")),i.push(this.months(n,"")),r.push(this.months(n,"")),r.push(this.monthsShort(n,""));for(s.sort(e),i.sort(e),r.sort(e),t=0;t<12;t++)s[t]=de(s[t]),i[t]=de(i[t]);for(t=0;t<24;t++)r[t]=de(r[t]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Ge(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&0<=e&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function Ve(e,t,n){var s=7+t-n;return-((7+Ge(e,0,s).getUTCDay()-t)%7)+s-1}function Ee(e,t,n,s,i){var r,a,o=1+7*(t-1)+(7+n-s)%7+Ve(e,s,i);return o<=0?a=De(r=e-1)+o:o>De(e)?(r=e+1,a=o-De(e)):(r=e,a=o),{year:r,dayOfYear:a}}function Ie(e,t,n){var s,i,r=Ve(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+Ae(i=e.year()-1,t,n):a>Ae(e.year(),t,n)?(s=a-Ae(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function Ae(e,t,n){var s=Ve(e,t,n),i=Ve(e+1,t,n);return(De(e)-s+i)/7}I("w",["ww",2],"wo","week"),I("W",["WW",2],"Wo","isoWeek"),H("week","w"),H("isoWeek","W"),L("week",5),L("isoWeek",5),ue("w",B),ue("ww",B,z),ue("W",B),ue("WW",B,z),fe(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=k(e)});I("d",0,"do","day"),I("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),I("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),I("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),I("e",0,0,"weekday"),I("E",0,0,"isoWeekday"),H("day","d"),H("weekday","e"),H("isoWeekday","E"),L("day",11),L("weekday",11),L("isoWeekday",11),ue("d",B),ue("e",B),ue("E",B),ue("dd",function(e,t){return t.weekdaysMinRegex(e)}),ue("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ue("dddd",function(e,t){return t.weekdaysRegex(e)}),fe(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e}),fe(["d","e","E"],function(e,t,n,s){t[s]=k(e)});var je="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var ze="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var $e=ae;var qe=ae;var Je=ae;function Be(){function e(e,t){return t.length-e.length}var t,n,s,i,r,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=y([2e3,1]).day(t),s=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),r=this.weekdays(n,""),a.push(s),o.push(i),u.push(r),l.push(s),l.push(i),l.push(r);for(a.sort(e),o.sort(e),u.sort(e),l.sort(e),t=0;t<7;t++)o[t]=de(o[t]),u[t]=de(u[t]),l[t]=de(l[t]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Qe(){return this.hours()%12||12}function Xe(e,t){I(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Ke(e,t){return t._meridiemParse}I("H",["HH",2],0,"hour"),I("h",["hh",2],0,Qe),I("k",["kk",2],0,function(){return this.hours()||24}),I("hmm",0,0,function(){return""+Qe.apply(this)+U(this.minutes(),2)}),I("hmmss",0,0,function(){return""+Qe.apply(this)+U(this.minutes(),2)+U(this.seconds(),2)}),I("Hmm",0,0,function(){return""+this.hours()+U(this.minutes(),2)}),I("Hmmss",0,0,function(){return""+this.hours()+U(this.minutes(),2)+U(this.seconds(),2)}),Xe("a",!0),Xe("A",!1),H("hour","h"),L("hour",13),ue("a",Ke),ue("A",Ke),ue("H",B),ue("h",B),ue("k",B),ue("HH",B,z),ue("hh",B,z),ue("kk",B,z),ue("hmm",Q),ue("hmmss",X),ue("Hmm",Q),ue("Hmmss",X),ce(["H","HH"],ge),ce(["k","kk"],function(e,t,n){var s=k(e);t[ge]=24===s?0:s}),ce(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ce(["h","hh"],function(e,t,n){t[ge]=k(e),g(n).bigHour=!0}),ce("hmm",function(e,t,n){var s=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s)),g(n).bigHour=!0}),ce("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s,2)),t[ve]=k(e.substr(i)),g(n).bigHour=!0}),ce("Hmm",function(e,t,n){var s=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s))}),ce("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s,2)),t[ve]=k(e.substr(i))});var et,tt=Te("Hours",!0),nt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:He,monthsShort:Re,week:{dow:0,doy:6},weekdays:je,weekdaysMin:ze,weekdaysShort:Ze,meridiemParse:/[ap]\.?m?\.?/i},st={},it={};function rt(e){return e?e.toLowerCase().replace("_","-"):e}function at(e){var t=null;if(!st[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=et._abbr,!(function webpackMissingModule() { var e = new Error("Cannot find module \"undefined\""); e.code = 'MODULE_NOT_FOUND'; throw e; }()),ot(t)}catch(e){}return st[e]}function ot(e,t){var n;return e&&((n=l(t)?lt(e):ut(e,t))?et=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),et._abbr}function ut(e,t){if(null!==t){var n,s=nt;if(t.abbr=e,null!=st[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=st[e]._config;else if(null!=t.parentLocale)if(null!=st[t.parentLocale])s=st[t.parentLocale]._config;else{if(null==(n=at(t.parentLocale)))return it[t.parentLocale]||(it[t.parentLocale]=[]),it[t.parentLocale].push({name:e,config:t}),null;s=n._config}return st[e]=new P(b(s,t)),it[e]&&it[e].forEach(function(e){ut(e.name,e.config)}),ot(e),st[e]}return delete st[e],null}function lt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return et;if(!o(e)){if(t=at(e))return t;e=[e]}return function(e){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=rt(e[r]).split("-")).length,n=(n=rt(e[r+1]))?n.split("-"):null;0<t;){if(s=at(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&a(i,n,!0)>=t-1)break;t--}r++}return et}(e)}function dt(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[_e]<0||11<n[_e]?_e:n[ye]<1||n[ye]>Pe(n[me],n[_e])?ye:n[ge]<0||24<n[ge]||24===n[ge]&&(0!==n[pe]||0!==n[ve]||0!==n[we])?ge:n[pe]<0||59<n[pe]?pe:n[ve]<0||59<n[ve]?ve:n[we]<0||999<n[we]?we:-1,g(e)._overflowDayOfYear&&(t<me||ye<t)&&(t=ye),g(e)._overflowWeeks&&-1===t&&(t=Me),g(e)._overflowWeekday&&-1===t&&(t=Se),g(e).overflow=t),e}function ht(e,t,n){return null!=e?e:null!=t?t:n}function ct(e){var t,n,s,i,r,a=[];if(!e._d){var o,u;for(o=e,u=new Date(c.now()),s=o._useUTC?[u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()]:[u.getFullYear(),u.getMonth(),u.getDate()],e._w&&null==e._a[ye]&&null==e._a[_e]&&function(e){var t,n,s,i,r,a,o,u;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)r=1,a=4,n=ht(t.GG,e._a[me],Ie(Tt(),1,4).year),s=ht(t.W,1),((i=ht(t.E,1))<1||7<i)&&(u=!0);else{r=e._locale._week.dow,a=e._locale._week.doy;var l=Ie(Tt(),r,a);n=ht(t.gg,e._a[me],l.year),s=ht(t.w,l.week),null!=t.d?((i=t.d)<0||6<i)&&(u=!0):null!=t.e?(i=t.e+r,(t.e<0||6<t.e)&&(u=!0)):i=r}s<1||s>Ae(n,r,a)?g(e)._overflowWeeks=!0:null!=u?g(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[me]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=ht(e._a[me],s[me]),(e._dayOfYear>De(r)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=Ge(r,0,e._dayOfYear),e._a[_e]=n.getUTCMonth(),e._a[ye]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=s[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ge]&&0===e._a[pe]&&0===e._a[ve]&&0===e._a[we]&&(e._nextDay=!0,e._a[ge]=0),e._d=(e._useUTC?Ge:function(e,t,n,s,i,r,a){var o=new Date(e,t,n,s,i,r,a);return e<100&&0<=e&&isFinite(o.getFullYear())&&o.setFullYear(e),o}).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ge]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}var ft=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,mt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/Z|[+-]\d\d(?::?\d\d)?/,yt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],gt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],pt=/^\/?Date\((\-?\d+)/i;function vt(e){var t,n,s,i,r,a,o=e._i,u=ft.exec(o)||mt.exec(o);if(u){for(g(e).iso=!0,t=0,n=yt.length;t<n;t++)if(yt[t][1].exec(u[1])){i=yt[t][0],s=!1!==yt[t][2];break}if(null==i)return void(e._isValid=!1);if(u[3]){for(t=0,n=gt.length;t<n;t++)if(gt[t][1].exec(u[3])){r=(u[2]||" ")+gt[t][0];break}if(null==r)return void(e._isValid=!1)}if(!s&&null!=r)return void(e._isValid=!1);if(u[4]){if(!_t.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=i+(r||"")+(a||""),kt(e)}else e._isValid=!1}var wt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function Mt(e,t,n,s,i,r){var a=[function(e){var t=parseInt(e,10);{if(t<=49)return 2e3+t;if(t<=999)return 1900+t}return t}(e),Re.indexOf(t),parseInt(n,10),parseInt(s,10),parseInt(i,10)];return r&&a.push(parseInt(r,10)),a}var St={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Dt(e){var t,n,s,i=wt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim());if(i){var r=Mt(i[4],i[3],i[2],i[5],i[6],i[7]);if(t=i[1],n=r,s=e,t&&Ze.indexOf(t)!==new Date(n[0],n[1],n[2]).getDay()&&(g(s).weekdayMismatch=!0,!(s._isValid=!1)))return;e._a=r,e._tzm=function(e,t,n){if(e)return St[e];if(t)return 0;var s=parseInt(n,10),i=s%100;return(s-i)/100*60+i}(i[8],i[9],i[10]),e._d=Ge.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function kt(e){if(e._f!==c.ISO_8601)if(e._f!==c.RFC_2822){e._a=[],g(e).empty=!0;var t,n,s,i,r,a,o,u,l=""+e._i,d=l.length,h=0;for(s=j(e._f,e._locale).match(N)||[],t=0;t<s.length;t++)i=s[t],(n=(l.match(le(i,e))||[])[0])&&(0<(r=l.substr(0,l.indexOf(n))).length&&g(e).unusedInput.push(r),l=l.slice(l.indexOf(n)+n.length),h+=n.length),E[i]?(n?g(e).empty=!1:g(e).unusedTokens.push(i),a=i,u=e,null!=(o=n)&&m(he,a)&&he[a](o,u._a,u,a)):e._strict&&!n&&g(e).unusedTokens.push(i);g(e).charsLeftOver=d-h,0<l.length&&g(e).unusedInput.push(l),e._a[ge]<=12&&!0===g(e).bigHour&&0<e._a[ge]&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[ge]=function(e,t,n){var s;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):(null!=e.isPM&&((s=e.isPM(n))&&t<12&&(t+=12),s||12!==t||(t=0)),t)}(e._locale,e._a[ge],e._meridiem),ct(e),dt(e)}else Dt(e);else vt(e)}function Yt(e){var t,n,s,i,r=e._i,a=e._f;return e._locale=e._locale||lt(e._l),null===r||void 0===a&&""===r?v({nullInput:!0}):("string"==typeof r&&(e._i=r=e._locale.preparse(r)),S(r)?new M(dt(r)):(h(r)?e._d=r:o(a)?function(e){var t,n,s,i,r;if(0===e._f.length)return g(e).invalidFormat=!0,e._d=new Date(NaN);for(i=0;i<e._f.length;i++)r=0,t=w({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],kt(t),p(t)&&(r+=g(t).charsLeftOver,r+=10*g(t).unusedTokens.length,g(t).score=r,(null==s||r<s)&&(s=r,n=t));_(e,n||t)}(e):a?kt(e):l(n=(t=e)._i)?t._d=new Date(c.now()):h(n)?t._d=new Date(n.valueOf()):"string"==typeof n?(s=t,null===(i=pt.exec(s._i))?(vt(s),!1===s._isValid&&(delete s._isValid,Dt(s),!1===s._isValid&&(delete s._isValid,c.createFromInputFallback(s)))):s._d=new Date(+i[1])):o(n)?(t._a=f(n.slice(0),function(e){return parseInt(e,10)}),ct(t)):u(n)?function(e){if(!e._d){var t=C(e._i);e._a=f([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),ct(e)}}(t):d(n)?t._d=new Date(n):c.createFromInputFallback(t),p(e)||(e._d=null),e))}function Ot(e,t,n,s,i){var r,a={};return!0!==n&&!1!==n||(s=n,n=void 0),(u(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||o(e)&&0===e.length)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=e,a._f=t,a._strict=s,(r=new M(dt(Yt(a))))._nextDay&&(r.add(1,"d"),r._nextDay=void 0),r}function Tt(e,t,n,s){return Ot(e,t,n,s,!1)}c.createFromInputFallback=n("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),c.ISO_8601=function(){},c.RFC_2822=function(){};var xt=n("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:v()}),bt=n("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:v()});function Pt(e,t){var n,s;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Tt();for(n=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](n)||(n=t[s]);return n}var Wt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ht(e){var t=C(e),n=t.year||0,s=t.quarter||0,i=t.month||0,r=t.week||0,a=t.day||0,o=t.hour||0,u=t.minute||0,l=t.second||0,d=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===Ye.call(Wt,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,s=0;s<Wt.length;++s)if(e[Wt[s]]){if(n)return!1;parseFloat(e[Wt[s]])!==k(e[Wt[s]])&&(n=!0)}return!0}(t),this._milliseconds=+d+1e3*l+6e4*u+1e3*o*60*60,this._days=+a+7*r,this._months=+i+3*s+12*n,this._data={},this._locale=lt(),this._bubble()}function Rt(e){return e instanceof Ht}function Ct(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ft(e,n){I(e,0,0,function(){var e=this.utcOffset(),t="+";return e<0&&(e=-e,t="-"),t+U(~~(e/60),2)+n+U(~~e%60,2)})}Ft("Z",":"),Ft("ZZ",""),ue("Z",re),ue("ZZ",re),ce(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Ut(re,e)});var Lt=/([\+\-]|\d\d)/gi;function Ut(e,t){var n=(t||"").match(e);if(null===n)return null;var s=((n[n.length-1]||[])+"").match(Lt)||["-",0,0],i=60*s[1]+k(s[2]);return 0===i?0:"+"===s[0]?i:-i}function Nt(e,t){var n,s;return t._isUTC?(n=t.clone(),s=(S(e)||h(e)?e.valueOf():Tt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+s),c.updateOffset(n,!1),n):Tt(e).local()}function Gt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Vt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}c.updateOffset=function(){};var Et=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,It=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function At(e,t){var n,s,i,r=e,a=null;return Rt(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:d(e)?(r={},t?r[t]=e:r.milliseconds=e):(a=Et.exec(e))?(n="-"===a[1]?-1:1,r={y:0,d:k(a[ye])*n,h:k(a[ge])*n,m:k(a[pe])*n,s:k(a[ve])*n,ms:k(Ct(1e3*a[we]))*n}):(a=It.exec(e))?(n="-"===a[1]?-1:(a[1],1),r={y:jt(a[2],n),M:jt(a[3],n),w:jt(a[4],n),d:jt(a[5],n),h:jt(a[6],n),m:jt(a[7],n),s:jt(a[8],n)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(i=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Nt(t,e),e.isBefore(t)?n=Zt(e,t):((n=Zt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(Tt(r.from),Tt(r.to)),(r={}).ms=i.milliseconds,r.M=i.months),s=new Ht(r),Rt(e)&&m(e,"_locale")&&(s._locale=e._locale),s}function jt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Zt(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function zt(s,i){return function(e,t){var n;return null===t||isNaN(+t)||(T(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=e,e=t,t=n),$t(this,At(e="string"==typeof e?+e:e,t),s),this}}function $t(e,t,n,s){var i=t._milliseconds,r=Ct(t._days),a=Ct(t._months);e.isValid()&&(s=null==s||s,a&&Ce(e,xe(e,"Month")+a*n),r&&be(e,"Date",xe(e,"Date")+r*n),i&&e._d.setTime(e._d.valueOf()+i*n),s&&c.updateOffset(e,r||a))}At.fn=Ht.prototype,At.invalid=function(){return At(NaN)};var qt=zt(1,"add"),Jt=zt(-1,"subtract");function Bt(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),s=e.clone().add(n,"months");return-(n+(t-s<0?(t-s)/(s-e.clone().add(n-1,"months")):(t-s)/(e.clone().add(n+1,"months")-s)))||0}function Qt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=lt(e))&&(this._locale=t),this)}c.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",c.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Xt=n("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function Kt(){return this._locale}function en(e,t){I(0,[e,e.length],0,t)}function tn(e,t,n,s,i){var r;return null==e?Ie(this,s,i).year:((r=Ae(e,s,i))<t&&(t=r),function(e,t,n,s,i){var r=Ee(e,t,n,s,i),a=Ge(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,n,s,i))}I(0,["gg",2],0,function(){return this.weekYear()%100}),I(0,["GG",2],0,function(){return this.isoWeekYear()%100}),en("gggg","weekYear"),en("ggggg","weekYear"),en("GGGG","isoWeekYear"),en("GGGGG","isoWeekYear"),H("weekYear","gg"),H("isoWeekYear","GG"),L("weekYear",1),L("isoWeekYear",1),ue("G",se),ue("g",se),ue("GG",B,z),ue("gg",B,z),ue("GGGG",ee,q),ue("gggg",ee,q),ue("GGGGG",te,J),ue("ggggg",te,J),fe(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=k(e)}),fe(["gg","GG"],function(e,t,n,s){t[s]=c.parseTwoDigitYear(e)}),I("Q",0,"Qo","quarter"),H("quarter","Q"),L("quarter",7),ue("Q",Z),ce("Q",function(e,t){t[_e]=3*(k(e)-1)}),I("D",["DD",2],"Do","date"),H("date","D"),L("date",9),ue("D",B),ue("DD",B,z),ue("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),ce(["D","DD"],ye),ce("Do",function(e,t){t[ye]=k(e.match(B)[0])});var nn=Te("Date",!0);I("DDD",["DDDD",3],"DDDo","dayOfYear"),H("dayOfYear","DDD"),L("dayOfYear",4),ue("DDD",K),ue("DDDD",$),ce(["DDD","DDDD"],function(e,t,n){n._dayOfYear=k(e)}),I("m",["mm",2],0,"minute"),H("minute","m"),L("minute",14),ue("m",B),ue("mm",B,z),ce(["m","mm"],pe);var sn=Te("Minutes",!1);I("s",["ss",2],0,"second"),H("second","s"),L("second",15),ue("s",B),ue("ss",B,z),ce(["s","ss"],ve);var rn,an=Te("Seconds",!1);for(I("S",0,0,function(){return~~(this.millisecond()/100)}),I(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),I(0,["SSS",3],0,"millisecond"),I(0,["SSSS",4],0,function(){return 10*this.millisecond()}),I(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),I(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),I(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),I(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),I(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),H("millisecond","ms"),L("millisecond",16),ue("S",K,Z),ue("SS",K,z),ue("SSS",K,$),rn="SSSS";rn.length<=9;rn+="S")ue(rn,ne);function on(e,t){t[we]=k(1e3*("0."+e))}for(rn="S";rn.length<=9;rn+="S")ce(rn,on);var un=Te("Milliseconds",!1);I("z",0,0,"zoneAbbr"),I("zz",0,0,"zoneName");var ln=M.prototype;function dn(e){return e}ln.add=qt,ln.calendar=function(e,t){var n=e||Tt(),s=Nt(n,this).startOf("day"),i=c.calendarFormat(this,s)||"sameElse",r=t&&(x(t[i])?t[i].call(this,n):t[i]);return this.format(r||this.localeData().calendar(i,this,Tt(n)))},ln.clone=function(){return new M(this)},ln.diff=function(e,t,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=Nt(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=R(t)){case"year":r=Bt(this,s)/12;break;case"month":r=Bt(this,s);break;case"quarter":r=Bt(this,s)/3;break;case"second":r=(this-s)/1e3;break;case"minute":r=(this-s)/6e4;break;case"hour":r=(this-s)/36e5;break;case"day":r=(this-s-i)/864e5;break;case"week":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:D(r)},ln.endOf=function(e){return void 0===(e=R(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},ln.format=function(e){e||(e=this.isUtc()?c.defaultFormatUtc:c.defaultFormat);var t=A(this,e);return this.localeData().postformat(t)},ln.from=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Tt(e).isValid())?At({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},ln.fromNow=function(e){return this.from(Tt(),e)},ln.to=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Tt(e).isValid())?At({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},ln.toNow=function(e){return this.to(Tt(),e)},ln.get=function(e){return x(this[e=R(e)])?this[e]():this},ln.invalidAt=function(){return g(this).overflow},ln.isAfter=function(e,t){var n=S(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=R(l(t)?"millisecond":t))?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},ln.isBefore=function(e,t){var n=S(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=R(l(t)?"millisecond":t))?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},ln.isBetween=function(e,t,n,s){return("("===(s=s||"()")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===s[1]?this.isBefore(t,n):!this.isAfter(t,n))},ln.isSame=function(e,t){var n,s=S(e)?e:Tt(e);return!(!this.isValid()||!s.isValid())&&("millisecond"===(t=R(t||"millisecond"))?this.valueOf()===s.valueOf():(n=s.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},ln.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},ln.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},ln.isValid=function(){return p(this)},ln.lang=Xt,ln.locale=Qt,ln.localeData=Kt,ln.max=bt,ln.min=xt,ln.parsingFlags=function(){return _({},g(this))},ln.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:F[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}(e=C(e)),s=0;s<n.length;s++)this[n[s].unit](e[n[s].unit]);else if(x(this[e=R(e)]))return this[e](t);return this},ln.startOf=function(e){switch(e=R(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this},ln.subtract=Jt,ln.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},ln.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},ln.toDate=function(){return new Date(this.valueOf())},ln.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||9999<n.year()?A(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):x(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",A(n,"Z")):A(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},ln.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',s=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=t+'[")]';return this.format(n+s+"-MM-DD[T]HH:mm:ss.SSS"+i)},ln.toJSON=function(){return this.isValid()?this.toISOString():null},ln.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},ln.unix=function(){return Math.floor(this.valueOf()/1e3)},ln.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},ln.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},ln.year=Oe,ln.isLeapYear=function(){return ke(this.year())},ln.weekYear=function(e){return tn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},ln.isoWeekYear=function(e){return tn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},ln.quarter=ln.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},ln.month=Fe,ln.daysInMonth=function(){return Pe(this.year(),this.month())},ln.week=ln.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},ln.isoWeek=ln.isoWeeks=function(e){var t=Ie(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},ln.weeksInYear=function(){var e=this.localeData()._week;return Ae(this.year(),e.dow,e.doy)},ln.isoWeeksInYear=function(){return Ae(this.year(),1,4)},ln.date=nn,ln.day=ln.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t,n,s=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(t=e,n=this.localeData(),e="string"!=typeof t?t:isNaN(t)?"number"==typeof(t=n.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-s,"d")):s},ln.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},ln.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=(n=e,s=this.localeData(),"string"==typeof n?s.weekdaysParse(n)%7||7:isNaN(n)?null:n);return this.day(this.day()%7?t:t-7)}return this.day()||7;var n,s},ln.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},ln.hour=ln.hours=tt,ln.minute=ln.minutes=sn,ln.second=ln.seconds=an,ln.millisecond=ln.milliseconds=un,ln.utcOffset=function(e,t,n){var s,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Ut(re,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(s=Gt(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,"m"),i!==e&&(!t||this._changeInProgress?$t(this,At(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,c.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Gt(this)},ln.utc=function(e){return this.utcOffset(0,e)},ln.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Gt(this),"m")),this},ln.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Ut(ie,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},ln.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Tt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},ln.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},ln.isLocal=function(){return!!this.isValid()&&!this._isUTC},ln.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},ln.isUtc=Vt,ln.isUTC=Vt,ln.zoneAbbr=function(){return this._isUTC?"UTC":""},ln.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},ln.dates=n("dates accessor is deprecated. Use date instead.",nn),ln.months=n("months accessor is deprecated. Use month instead",Fe),ln.years=n("years accessor is deprecated. Use year instead",Oe),ln.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),ln.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e={};if(w(e,this),(e=Yt(e))._a){var t=e._isUTC?y(e._a):Tt(e._a);this._isDSTShifted=this.isValid()&&0<a(e._a,t.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted});var hn=P.prototype;function cn(e,t,n,s){var i=lt(),r=y().set(s,t);return i[n](r,e)}function fn(e,t,n){if(d(e)&&(t=e,e=void 0),e=e||"",null!=t)return cn(e,t,n,"month");var s,i=[];for(s=0;s<12;s++)i[s]=cn(e,s,n,"month");return i}function mn(e,t,n,s){"boolean"==typeof e?d(t)&&(n=t,t=void 0):(t=e,e=!1,d(n=t)&&(n=t,t=void 0)),t=t||"";var i,r=lt(),a=e?r._week.dow:0;if(null!=n)return cn(t,(n+a)%7,s,"day");var o=[];for(i=0;i<7;i++)o[i]=cn(t,(i+a)%7,s,"day");return o}hn.calendar=function(e,t,n){var s=this._calendar[e]||this._calendar.sameElse;return x(s)?s.call(t,n):s},hn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},hn.invalidDate=function(){return this._invalidDate},hn.ordinal=function(e){return this._ordinal.replace("%d",e)},hn.preparse=dn,hn.postformat=dn,hn.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return x(i)?i(e,t,n,s):i.replace(/%d/i,e)},hn.pastFuture=function(e,t){var n=this._relativeTime[0<e?"future":"past"];return x(n)?n(t):n.replace(/%s/i,t)},hn.set=function(e){var t,n;for(n in e)x(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},hn.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||We).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone},hn.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[We.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},hn.monthsParse=function(e,t,n){var s,i,r;if(this._monthsParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=y([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=Ye.call(this._shortMonthsParse,a))?i:null:-1!==(i=Ye.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=Ye.call(this._shortMonthsParse,a))?i:-1!==(i=Ye.call(this._longMonthsParse,a))?i:null:-1!==(i=Ye.call(this._longMonthsParse,a))?i:-1!==(i=Ye.call(this._shortMonthsParse,a))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=y([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(r="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},hn.monthsRegex=function(e){return this._monthsParseExact?(m(this,"_monthsRegex")||Ne.call(this),e?this._monthsStrictRegex:this._monthsRegex):(m(this,"_monthsRegex")||(this._monthsRegex=Ue),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},hn.monthsShortRegex=function(e){return this._monthsParseExact?(m(this,"_monthsRegex")||Ne.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(m(this,"_monthsShortRegex")||(this._monthsShortRegex=Le),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},hn.week=function(e){return Ie(e,this._week.dow,this._week.doy).week},hn.firstDayOfYear=function(){return this._week.doy},hn.firstDayOfWeek=function(){return this._week.dow},hn.weekdays=function(e,t){return e?o(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:o(this._weekdays)?this._weekdays:this._weekdays.standalone},hn.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},hn.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},hn.weekdaysParse=function(e,t,n){var s,i,r;if(this._weekdaysParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=y([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=Ye.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=y([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".",".?")+"$","i")),this._weekdaysParse[s]||(r="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},hn.weekdaysRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Be.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(m(this,"_weekdaysRegex")||(this._weekdaysRegex=$e),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},hn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Be.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(m(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=qe),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},hn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Be.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(m(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Je),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},hn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},hn.meridiem=function(e,t,n){return 11<e?n?"pm":"PM":n?"am":"AM"},ot("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===k(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),c.lang=n("moment.lang is deprecated. Use moment.locale instead.",ot),c.langData=n("moment.langData is deprecated. Use moment.localeData instead.",lt);var _n=Math.abs;function yn(e,t,n,s){var i=At(t,n);return e._milliseconds+=s*i._milliseconds,e._days+=s*i._days,e._months+=s*i._months,e._bubble()}function gn(e){return e<0?Math.floor(e):Math.ceil(e)}function pn(e){return 4800*e/146097}function vn(e){return 146097*e/4800}function wn(e){return function(){return this.as(e)}}var Mn=wn("ms"),Sn=wn("s"),Dn=wn("m"),kn=wn("h"),Yn=wn("d"),On=wn("w"),Tn=wn("M"),xn=wn("y");function bn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Pn=bn("milliseconds"),Wn=bn("seconds"),Hn=bn("minutes"),Rn=bn("hours"),Cn=bn("days"),Fn=bn("months"),Ln=bn("years");var Un=Math.round,Nn={ss:44,s:45,m:45,h:22,d:26,M:11};var Gn=Math.abs;function Vn(e){return(0<e)-(e<0)||+e}function En(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Gn(this._milliseconds)/1e3,s=Gn(this._days),i=Gn(this._months);t=D((e=D(n/60))/60),n%=60,e%=60;var r=D(i/12),a=i%=12,o=s,u=t,l=e,d=n?n.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var c=h<0?"-":"",f=Vn(this._months)!==Vn(h)?"-":"",m=Vn(this._days)!==Vn(h)?"-":"",_=Vn(this._milliseconds)!==Vn(h)?"-":"";return c+"P"+(r?f+r+"Y":"")+(a?f+a+"M":"")+(o?m+o+"D":"")+(u||l||d?"T":"")+(u?_+u+"H":"")+(l?_+l+"M":"")+(d?_+d+"S":"")}var In=Ht.prototype;return In.isValid=function(){return this._isValid},In.abs=function(){var e=this._data;return this._milliseconds=_n(this._milliseconds),this._days=_n(this._days),this._months=_n(this._months),e.milliseconds=_n(e.milliseconds),e.seconds=_n(e.seconds),e.minutes=_n(e.minutes),e.hours=_n(e.hours),e.months=_n(e.months),e.years=_n(e.years),this},In.add=function(e,t){return yn(this,e,t,1)},In.subtract=function(e,t){return yn(this,e,t,-1)},In.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if("month"===(e=R(e))||"year"===e)return t=this._days+s/864e5,n=this._months+pn(t),"month"===e?n:n/12;switch(t=this._days+Math.round(vn(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}},In.asMilliseconds=Mn,In.asSeconds=Sn,In.asMinutes=Dn,In.asHours=kn,In.asDays=Yn,In.asWeeks=On,In.asMonths=Tn,In.asYears=xn,In.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},In._bubble=function(){var e,t,n,s,i,r=this._milliseconds,a=this._days,o=this._months,u=this._data;return 0<=r&&0<=a&&0<=o||r<=0&&a<=0&&o<=0||(r+=864e5*gn(vn(o)+a),o=a=0),u.milliseconds=r%1e3,e=D(r/1e3),u.seconds=e%60,t=D(e/60),u.minutes=t%60,n=D(t/60),u.hours=n%24,o+=i=D(pn(a+=D(n/24))),a-=gn(vn(i)),s=D(o/12),o%=12,u.days=a,u.months=o,u.years=s,this},In.clone=function(){return At(this)},In.get=function(e){return e=R(e),this.isValid()?this[e+"s"]():NaN},In.milliseconds=Pn,In.seconds=Wn,In.minutes=Hn,In.hours=Rn,In.days=Cn,In.weeks=function(){return D(this.days()/7)},In.months=Fn,In.years=Ln,In.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t,n,s,i,r,a,o,u,l,d,h,c=this.localeData(),f=(n=!e,s=c,i=At(t=this).abs(),r=Un(i.as("s")),a=Un(i.as("m")),o=Un(i.as("h")),u=Un(i.as("d")),l=Un(i.as("M")),d=Un(i.as("y")),(h=r<=Nn.ss&&["s",r]||r<Nn.s&&["ss",r]||a<=1&&["m"]||a<Nn.m&&["mm",a]||o<=1&&["h"]||o<Nn.h&&["hh",o]||u<=1&&["d"]||u<Nn.d&&["dd",u]||l<=1&&["M"]||l<Nn.M&&["MM",l]||d<=1&&["y"]||["yy",d])[2]=n,h[3]=0<+t,h[4]=s,function(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}.apply(null,h));return e&&(f=c.pastFuture(+this,f)),c.postformat(f)},In.toISOString=En,In.toString=En,In.toJSON=En,In.locale=Qt,In.localeData=Kt,In.toIsoString=n("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",En),In.lang=Xt,I("X",0,0,"unix"),I("x",0,0,"valueOf"),ue("x",se),ue("X",/[+-]?\d+(\.\d{1,3})?/),ce("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),ce("x",function(e,t,n){n._d=new Date(k(e))}),c.version="2.22.1",e=Tt,c.fn=ln,c.min=function(){return Pt("isBefore",[].slice.call(arguments,0))},c.max=function(){return Pt("isAfter",[].slice.call(arguments,0))},c.now=function(){return Date.now?Date.now():+new Date},c.utc=y,c.unix=function(e){return Tt(1e3*e)},c.months=function(e,t){return fn(e,t,"months")},c.isDate=h,c.locale=ot,c.invalid=v,c.duration=At,c.isMoment=S,c.weekdays=function(e,t,n){return mn(e,t,n,"weekdays")},c.parseZone=function(){return Tt.apply(null,arguments).parseZone()},c.localeData=lt,c.isDuration=Rt,c.monthsShort=function(e,t){return fn(e,t,"monthsShort")},c.weekdaysMin=function(e,t,n){return mn(e,t,n,"weekdaysMin")},c.defineLocale=ut,c.updateLocale=function(e,t){if(null!=t){var n,s,i=nt;null!=(s=at(e))&&(i=s._config),(n=new P(t=b(i,t))).parentLocale=st[e],st[e]=n,ot(e)}else null!=st[e]&&(null!=st[e].parentLocale?st[e]=st[e].parentLocale:null!=st[e]&&delete st[e]);return st[e]},c.locales=function(){return s(st)},c.weekdaysShort=function(e,t,n){return mn(e,t,n,"weekdaysShort")},c.normalizeUnits=R,c.relativeTimeRounding=function(e){return void 0===e?Un:"function"==typeof e&&(Un=e,!0)},c.relativeTimeThreshold=function(e,t){return void 0!==Nn[e]&&(void 0===t?Nn[e]:(Nn[e]=t,"s"===e&&(Nn.ss=t-1),!0))},c.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},c.prototype=ln,c.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},c});
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
+
+/***/ }),
+
+/***/ "./node_modules/node-fetch/browser.js":
+/*!********************************************!*\
+  !*** ./node_modules/node-fetch/browser.js ***!
+  \********************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+module.exports = exports = window.fetch;
+
+// Needed for TypeScript and Webpack.
+exports.default = window.fetch.bind(window);
+
+exports.Headers = window.Headers;
+exports.Request = window.Request;
+exports.Response = window.Response;
+
+
+/***/ }),
+
+/***/ "./node_modules/preact-compat/dist/preact-compat.es.js":
+/*!*************************************************************!*\
+  !*** ./node_modules/preact-compat/dist/preact-compat.es.js ***!
+  \*************************************************************/
+/*! exports provided: version, DOM, PropTypes, Children, render, createClass, createFactory, createElement, cloneElement, isValidElement, findDOMNode, unmountComponentAtNode, Component, PureComponent, unstable_renderSubtreeIntoContainer, __spread, default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "version", function() { return version; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DOM", function() { return DOM; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Children", function() { return Children; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render$1; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createClass", function() { return createClass; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createFactory", function() { return createFactory; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createElement", function() { return createElement; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cloneElement", function() { return cloneElement$1; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValidElement", function() { return isValidElement; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findDOMNode", function() { return findDOMNode; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unmountComponentAtNode", function() { return unmountComponentAtNode; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Component", function() { return Component$1; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PureComponent", function() { return PureComponent; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unstable_renderSubtreeIntoContainer", function() { return renderSubtreeIntoContainer; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spread", function() { return extend; });
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "./node_modules/preact-compat/node_modules/prop-types/index.js");
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony reexport (default from non-harmony) */ __webpack_require__.d(__webpack_exports__, "PropTypes", function() { return prop_types__WEBPACK_IMPORTED_MODULE_0___default.a; });
+/* harmony import */ var preact__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+
+
+var version = '15.1.0'; // trick libraries to think we are react
+
+var ELEMENTS = 'a abbr address area article aside audio b base bdi bdo big blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins kbd keygen label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script section select small source span strong style sub summary sup table tbody td textarea tfoot th thead time title tr track u ul var video wbr circle clipPath defs ellipse g image line linearGradient mask path pattern polygon polyline radialGradient rect stop svg text tspan'.split(' ');
+
+var REACT_ELEMENT_TYPE = (typeof Symbol!=='undefined' && Symbol.for && Symbol.for('react.element')) || 0xeac7;
+
+var COMPONENT_WRAPPER_KEY = (typeof Symbol!=='undefined' && Symbol.for) ? Symbol.for('__preactCompatWrapper') : '__preactCompatWrapper';
+
+// don't autobind these methods since they already have guaranteed context.
+var AUTOBIND_BLACKLIST = {
+	constructor: 1,
+	render: 1,
+	shouldComponentUpdate: 1,
+	componentWillReceiveProps: 1,
+	componentWillUpdate: 1,
+	componentDidUpdate: 1,
+	componentWillMount: 1,
+	componentDidMount: 1,
+	componentWillUnmount: 1,
+	componentDidUnmount: 1
+};
+
+
+var CAMEL_PROPS = /^(?:accent|alignment|arabic|baseline|cap|clip|color|fill|flood|font|glyph|horiz|marker|overline|paint|stop|strikethrough|stroke|text|underline|unicode|units|v|vector|vert|word|writing|x)[A-Z]/;
+
+
+var BYPASS_HOOK = {};
+
+/*global process*/
+var DEV = typeof process==='undefined' || !process.env || "development"!=='production';
+
+// a component that renders nothing. Used to replace components for unmountComponentAtNode.
+function EmptyComponent() { return null; }
+
+
+
+// make react think we're react.
+var VNode = Object(preact__WEBPACK_IMPORTED_MODULE_1__["h"])('a', null).constructor;
+VNode.prototype.$$typeof = REACT_ELEMENT_TYPE;
+VNode.prototype.preactCompatUpgraded = false;
+VNode.prototype.preactCompatNormalized = false;
+
+Object.defineProperty(VNode.prototype, 'type', {
+	get: function() { return this.nodeName; },
+	set: function(v) { this.nodeName = v; },
+	configurable:true
+});
+
+Object.defineProperty(VNode.prototype, 'props', {
+	get: function() { return this.attributes; },
+	set: function(v) { this.attributes = v; },
+	configurable:true
+});
+
+
+
+var oldEventHook = preact__WEBPACK_IMPORTED_MODULE_1__["options"].event;
+preact__WEBPACK_IMPORTED_MODULE_1__["options"].event = function (e) {
+	if (oldEventHook) { e = oldEventHook(e); }
+	e.persist = Object;
+	e.nativeEvent = e;
+	return e;
+};
+
+
+var oldVnodeHook = preact__WEBPACK_IMPORTED_MODULE_1__["options"].vnode;
+preact__WEBPACK_IMPORTED_MODULE_1__["options"].vnode = function (vnode) {
+	if (!vnode.preactCompatUpgraded) {
+		vnode.preactCompatUpgraded = true;
+
+		var tag = vnode.nodeName,
+			attrs = vnode.attributes = extend({}, vnode.attributes);
+
+		if (typeof tag==='function') {
+			if (tag[COMPONENT_WRAPPER_KEY]===true || (tag.prototype && 'isReactComponent' in tag.prototype)) {
+				if (vnode.children && String(vnode.children)==='') { vnode.children = undefined; }
+				if (vnode.children) { attrs.children = vnode.children; }
+
+				if (!vnode.preactCompatNormalized) {
+					normalizeVNode(vnode);
+				}
+				handleComponentVNode(vnode);
+			}
+		}
+		else {
+			if (vnode.children && String(vnode.children)==='') { vnode.children = undefined; }
+			if (vnode.children) { attrs.children = vnode.children; }
+
+			if (attrs.defaultValue) {
+				if (!attrs.value && attrs.value!==0) {
+					attrs.value = attrs.defaultValue;
+				}
+				delete attrs.defaultValue;
+			}
+
+			handleElementVNode(vnode, attrs);
+		}
+	}
+
+	if (oldVnodeHook) { oldVnodeHook(vnode); }
+};
+
+function handleComponentVNode(vnode) {
+	var tag = vnode.nodeName,
+		a = vnode.attributes;
+
+	vnode.attributes = {};
+	if (tag.defaultProps) { extend(vnode.attributes, tag.defaultProps); }
+	if (a) { extend(vnode.attributes, a); }
+}
+
+function handleElementVNode(vnode, a) {
+	var shouldSanitize, attrs, i;
+	if (a) {
+		for (i in a) { if ((shouldSanitize = CAMEL_PROPS.test(i))) { break; } }
+		if (shouldSanitize) {
+			attrs = vnode.attributes = {};
+			for (i in a) {
+				if (a.hasOwnProperty(i)) {
+					attrs[ CAMEL_PROPS.test(i) ? i.replace(/([A-Z0-9])/, '-$1').toLowerCase() : i ] = a[i];
+				}
+			}
+		}
+	}
+}
+
+
+
+// proxy render() since React returns a Component reference.
+function render$1(vnode, parent, callback) {
+	var prev = parent && parent._preactCompatRendered && parent._preactCompatRendered.base;
+
+	// ignore impossible previous renders
+	if (prev && prev.parentNode!==parent) { prev = null; }
+
+	// default to first Element child
+	if (!prev && parent) { prev = parent.firstElementChild; }
+
+	// remove unaffected siblings
+	for (var i=parent.childNodes.length; i--; ) {
+		if (parent.childNodes[i]!==prev) {
+			parent.removeChild(parent.childNodes[i]);
+		}
+	}
+
+	var out = Object(preact__WEBPACK_IMPORTED_MODULE_1__["render"])(vnode, parent, prev);
+	if (parent) { parent._preactCompatRendered = out && (out._component || { base: out }); }
+	if (typeof callback==='function') { callback(); }
+	return out && out._component || out;
+}
+
+
+var ContextProvider = function () {};
+
+ContextProvider.prototype.getChildContext = function () {
+	return this.props.context;
+};
+ContextProvider.prototype.render = function (props) {
+	return props.children[0];
+};
+
+function renderSubtreeIntoContainer(parentComponent, vnode, container, callback) {
+	var wrap = Object(preact__WEBPACK_IMPORTED_MODULE_1__["h"])(ContextProvider, { context: parentComponent.context }, vnode);
+	var renderContainer = render$1(wrap, container);
+	var component = renderContainer._component || renderContainer.base;
+	if (callback) { callback.call(component, renderContainer); }
+	return component;
+}
+
+
+function unmountComponentAtNode(container) {
+	var existing = container._preactCompatRendered && container._preactCompatRendered.base;
+	if (existing && existing.parentNode===container) {
+		Object(preact__WEBPACK_IMPORTED_MODULE_1__["render"])(Object(preact__WEBPACK_IMPORTED_MODULE_1__["h"])(EmptyComponent), container, existing);
+		return true;
+	}
+	return false;
+}
+
+
+
+var ARR = [];
+
+// This API is completely unnecessary for Preact, so it's basically passthrough.
+var Children = {
+	map: function(children, fn, ctx) {
+		if (children == null) { return null; }
+		children = Children.toArray(children);
+		if (ctx && ctx!==children) { fn = fn.bind(ctx); }
+		return children.map(fn);
+	},
+	forEach: function(children, fn, ctx) {
+		if (children == null) { return null; }
+		children = Children.toArray(children);
+		if (ctx && ctx!==children) { fn = fn.bind(ctx); }
+		children.forEach(fn);
+	},
+	count: function(children) {
+		return children && children.length || 0;
+	},
+	only: function(children) {
+		children = Children.toArray(children);
+		if (children.length!==1) { throw new Error('Children.only() expects only one child.'); }
+		return children[0];
+	},
+	toArray: function(children) {
+		if (children == null) { return []; }
+		return ARR.concat(children);
+	}
+};
+
+
+/** Track current render() component for ref assignment */
+var currentComponent;
+
+
+function createFactory(type) {
+	return createElement.bind(null, type);
+}
+
+
+var DOM = {};
+for (var i=ELEMENTS.length; i--; ) {
+	DOM[ELEMENTS[i]] = createFactory(ELEMENTS[i]);
+}
+
+function upgradeToVNodes(arr, offset) {
+	for (var i=offset || 0; i<arr.length; i++) {
+		var obj = arr[i];
+		if (Array.isArray(obj)) {
+			upgradeToVNodes(obj);
+		}
+		else if (obj && typeof obj==='object' && !isValidElement(obj) && ((obj.props && obj.type) || (obj.attributes && obj.nodeName) || obj.children)) {
+			arr[i] = createElement(obj.type || obj.nodeName, obj.props || obj.attributes, obj.children);
+		}
+	}
+}
+
+function isStatelessComponent(c) {
+	return typeof c==='function' && !(c.prototype && c.prototype.render);
+}
+
+
+// wraps stateless functional components in a PropTypes validator
+function wrapStatelessComponent(WrappedComponent) {
+	return createClass({
+		displayName: WrappedComponent.displayName || WrappedComponent.name,
+		render: function() {
+			return WrappedComponent(this.props, this.context);
+		}
+	});
+}
+
+
+function statelessComponentHook(Ctor) {
+	var Wrapped = Ctor[COMPONENT_WRAPPER_KEY];
+	if (Wrapped) { return Wrapped===true ? Ctor : Wrapped; }
+
+	Wrapped = wrapStatelessComponent(Ctor);
+
+	Object.defineProperty(Wrapped, COMPONENT_WRAPPER_KEY, { configurable:true, value:true });
+	Wrapped.displayName = Ctor.displayName;
+	Wrapped.propTypes = Ctor.propTypes;
+	Wrapped.defaultProps = Ctor.defaultProps;
+
+	Object.defineProperty(Ctor, COMPONENT_WRAPPER_KEY, { configurable:true, value:Wrapped });
+
+	return Wrapped;
+}
+
+
+function createElement() {
+	var args = [], len = arguments.length;
+	while ( len-- ) args[ len ] = arguments[ len ];
+
+	upgradeToVNodes(args, 2);
+	return normalizeVNode(preact__WEBPACK_IMPORTED_MODULE_1__["h"].apply(void 0, args));
+}
+
+
+function normalizeVNode(vnode) {
+	vnode.preactCompatNormalized = true;
+
+	applyClassName(vnode);
+
+	if (isStatelessComponent(vnode.nodeName)) {
+		vnode.nodeName = statelessComponentHook(vnode.nodeName);
+	}
+
+	var ref = vnode.attributes.ref,
+		type = ref && typeof ref;
+	if (currentComponent && (type==='string' || type==='number')) {
+		vnode.attributes.ref = createStringRefProxy(ref, currentComponent);
+	}
+
+	applyEventNormalization(vnode);
+
+	return vnode;
+}
+
+
+function cloneElement$1(element, props) {
+	var children = [], len = arguments.length - 2;
+	while ( len-- > 0 ) children[ len ] = arguments[ len + 2 ];
+
+	if (!isValidElement(element)) { return element; }
+	var elementProps = element.attributes || element.props;
+	var node = Object(preact__WEBPACK_IMPORTED_MODULE_1__["h"])(
+		element.nodeName || element.type,
+		extend({}, elementProps),
+		element.children || elementProps && elementProps.children
+	);
+	// Only provide the 3rd argument if needed.
+	// Arguments 3+ overwrite element.children in preactCloneElement
+	var cloneArgs = [node, props];
+	if (children && children.length) {
+		cloneArgs.push(children);
+	}
+	else if (props && props.children) {
+		cloneArgs.push(props.children);
+	}
+	return normalizeVNode(preact__WEBPACK_IMPORTED_MODULE_1__["cloneElement"].apply(void 0, cloneArgs));
+}
+
+
+function isValidElement(element) {
+	return element && ((element instanceof VNode) || element.$$typeof===REACT_ELEMENT_TYPE);
+}
+
+
+function createStringRefProxy(name, component) {
+	return component._refProxies[name] || (component._refProxies[name] = function (resolved) {
+		if (component && component.refs) {
+			component.refs[name] = resolved;
+			if (resolved===null) {
+				delete component._refProxies[name];
+				component = null;
+			}
+		}
+	});
+}
+
+
+function applyEventNormalization(ref) {
+	var nodeName = ref.nodeName;
+	var attributes = ref.attributes;
+
+	if (!attributes || typeof nodeName!=='string') { return; }
+	var props = {};
+	for (var i in attributes) {
+		props[i.toLowerCase()] = i;
+	}
+	if (props.ondoubleclick) {
+		attributes.ondblclick = attributes[props.ondoubleclick];
+		delete attributes[props.ondoubleclick];
+	}
+	// for *textual inputs* (incl textarea), normalize `onChange` -> `onInput`:
+	if (props.onchange && (nodeName==='textarea' || (nodeName.toLowerCase()==='input' && !/^fil|che|rad/i.test(attributes.type)))) {
+		var normalized = props.oninput || 'oninput';
+		if (!attributes[normalized]) {
+			attributes[normalized] = multihook([attributes[normalized], attributes[props.onchange]]);
+			delete attributes[props.onchange];
+		}
+	}
+}
+
+
+function applyClassName(vnode) {
+	var a = vnode.attributes || (vnode.attributes = {});
+	classNameDescriptor.enumerable = 'className' in a;
+	if (a.className) { a.class = a.className; }
+	Object.defineProperty(a, 'className', classNameDescriptor);
+}
+
+
+var classNameDescriptor = {
+	configurable: true,
+	get: function() { return this.class; },
+	set: function(v) { this.class = v; }
+};
+
+function extend(base, props) {
+	var arguments$1 = arguments;
+
+	for (var i=1, obj = (void 0); i<arguments.length; i++) {
+		if ((obj = arguments$1[i])) {
+			for (var key in obj) {
+				if (obj.hasOwnProperty(key)) {
+					base[key] = obj[key];
+				}
+			}
+		}
+	}
+	return base;
+}
+
+
+function shallowDiffers(a, b) {
+	for (var i in a) { if (!(i in b)) { return true; } }
+	for (var i$1 in b) { if (a[i$1]!==b[i$1]) { return true; } }
+	return false;
+}
+
+
+function findDOMNode(component) {
+	return component && component.base || component;
+}
+
+
+function F(){}
+
+function createClass(obj) {
+	function cl(props, context) {
+		bindAll(this);
+		Component$1.call(this, props, context, BYPASS_HOOK);
+		newComponentHook.call(this, props, context);
+	}
+
+	obj = extend({ constructor: cl }, obj);
+
+	// We need to apply mixins here so that getDefaultProps is correctly mixed
+	if (obj.mixins) {
+		applyMixins(obj, collateMixins(obj.mixins));
+	}
+	if (obj.statics) {
+		extend(cl, obj.statics);
+	}
+	if (obj.propTypes) {
+		cl.propTypes = obj.propTypes;
+	}
+	if (obj.defaultProps) {
+		cl.defaultProps = obj.defaultProps;
+	}
+	if (obj.getDefaultProps) {
+		cl.defaultProps = obj.getDefaultProps.call(cl);
+	}
+
+	F.prototype = Component$1.prototype;
+	cl.prototype = extend(new F(), obj);
+
+	cl.displayName = obj.displayName || 'Component';
+
+	return cl;
+}
+
+
+// Flatten an Array of mixins to a map of method name to mixin implementations
+function collateMixins(mixins) {
+	var keyed = {};
+	for (var i=0; i<mixins.length; i++) {
+		var mixin = mixins[i];
+		for (var key in mixin) {
+			if (mixin.hasOwnProperty(key) && typeof mixin[key]==='function') {
+				(keyed[key] || (keyed[key]=[])).push(mixin[key]);
+			}
+		}
+	}
+	return keyed;
+}
+
+
+// apply a mapping of Arrays of mixin methods to a component prototype
+function applyMixins(proto, mixins) {
+	for (var key in mixins) { if (mixins.hasOwnProperty(key)) {
+		proto[key] = multihook(
+			mixins[key].concat(proto[key] || ARR),
+			key==='getDefaultProps' || key==='getInitialState' || key==='getChildContext'
+		);
+	} }
+}
+
+
+function bindAll(ctx) {
+	for (var i in ctx) {
+		var v = ctx[i];
+		if (typeof v==='function' && !v.__bound && !AUTOBIND_BLACKLIST.hasOwnProperty(i)) {
+			(ctx[i] = v.bind(ctx)).__bound = true;
+		}
+	}
+}
+
+
+function callMethod(ctx, m, args) {
+	if (typeof m==='string') {
+		m = ctx.constructor.prototype[m];
+	}
+	if (typeof m==='function') {
+		return m.apply(ctx, args);
+	}
+}
+
+function multihook(hooks, skipDuplicates) {
+	return function() {
+		var arguments$1 = arguments;
+		var this$1 = this;
+
+		var ret;
+		for (var i=0; i<hooks.length; i++) {
+			var r = callMethod(this$1, hooks[i], arguments$1);
+
+			if (skipDuplicates && r!=null) {
+				if (!ret) { ret = {}; }
+				for (var key in r) { if (r.hasOwnProperty(key)) {
+					ret[key] = r[key];
+				} }
+			}
+			else if (typeof r!=='undefined') { ret = r; }
+		}
+		return ret;
+	};
+}
+
+
+function newComponentHook(props, context) {
+	propsHook.call(this, props, context);
+	this.componentWillReceiveProps = multihook([propsHook, this.componentWillReceiveProps || 'componentWillReceiveProps']);
+	this.render = multihook([propsHook, beforeRender, this.render || 'render', afterRender]);
+}
+
+
+function propsHook(props, context) {
+	if (!props) { return; }
+
+	// React annoyingly special-cases single children, and some react components are ridiculously strict about this.
+	var c = props.children;
+	if (c && Array.isArray(c) && c.length===1 && (typeof c[0]==='string' || typeof c[0]==='function' || c[0] instanceof VNode)) {
+		props.children = c[0];
+
+		// but its totally still going to be an Array.
+		if (props.children && typeof props.children==='object') {
+			props.children.length = 1;
+			props.children[0] = props.children;
+		}
+	}
+
+	// add proptype checking
+	if (DEV) {
+		var ctor = typeof this==='function' ? this : this.constructor,
+			propTypes = this.propTypes || ctor.propTypes;
+		var displayName = this.displayName || ctor.name;
+
+		if (propTypes) {
+			prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.checkPropTypes(propTypes, props, 'prop', displayName);
+		}
+	}
+}
+
+
+function beforeRender(props) {
+	currentComponent = this;
+}
+
+function afterRender() {
+	if (currentComponent===this) {
+		currentComponent = null;
+	}
+}
+
+
+
+function Component$1(props, context, opts) {
+	preact__WEBPACK_IMPORTED_MODULE_1__["Component"].call(this, props, context);
+	this.state = this.getInitialState ? this.getInitialState() : {};
+	this.refs = {};
+	this._refProxies = {};
+	if (opts!==BYPASS_HOOK) {
+		newComponentHook.call(this, props, context);
+	}
+}
+extend(Component$1.prototype = new preact__WEBPACK_IMPORTED_MODULE_1__["Component"](), {
+	constructor: Component$1,
+
+	isReactComponent: {},
+
+	replaceState: function(state, callback) {
+		var this$1 = this;
+
+		this.setState(state, callback);
+		for (var i in this$1.state) {
+			if (!(i in state)) {
+				delete this$1.state[i];
+			}
+		}
+	},
+
+	getDOMNode: function() {
+		return this.base;
+	},
+
+	isMounted: function() {
+		return !!this.base;
+	}
+});
+
+
+
+function PureComponent(props, context) {
+	Component$1.call(this, props, context);
+}
+F.prototype = Component$1.prototype;
+PureComponent.prototype = new F();
+PureComponent.prototype.isPureReactComponent = true;
+PureComponent.prototype.shouldComponentUpdate = function(props, state) {
+	return shallowDiffers(this.props, props) || shallowDiffers(this.state, state);
+};
+
+var index = {
+	version: version,
+	DOM: DOM,
+	PropTypes: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a,
+	Children: Children,
+	render: render$1,
+	createClass: createClass,
+	createFactory: createFactory,
+	createElement: createElement,
+	cloneElement: cloneElement$1,
+	isValidElement: isValidElement,
+	findDOMNode: findDOMNode,
+	unmountComponentAtNode: unmountComponentAtNode,
+	Component: Component$1,
+	PureComponent: PureComponent,
+	unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer,
+	__spread: extend
+};
+
+/* harmony default export */ __webpack_exports__["default"] = (index);
+//# sourceMappingURL=preact-compat.es.js.map
+
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/node_modules/process/browser.js */ "./node_modules/webpack/node_modules/process/browser.js")))
+
+/***/ }),
+
+/***/ "./node_modules/preact-compat/node_modules/fbjs/lib/emptyFunction.js":
+/*!***************************************************************************!*\
+  !*** ./node_modules/preact-compat/node_modules/fbjs/lib/emptyFunction.js ***!
+  \***************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ * 
+ */
+
+function makeEmptyFunction(arg) {
+  return function () {
+    return arg;
+  };
+}
+
+/**
+ * This function accepts and discards inputs; it has no side effects. This is
+ * primarily useful idiomatically for overridable function endpoints which
+ * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
+ */
+var emptyFunction = function emptyFunction() {};
+
+emptyFunction.thatReturns = makeEmptyFunction;
+emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
+emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
+emptyFunction.thatReturnsNull = makeEmptyFunction(null);
+emptyFunction.thatReturnsThis = function () {
+  return this;
+};
+emptyFunction.thatReturnsArgument = function (arg) {
+  return arg;
+};
+
+module.exports = emptyFunction;
+
+/***/ }),
+
+/***/ "./node_modules/preact-compat/node_modules/fbjs/lib/invariant.js":
+/*!***********************************************************************!*\
+  !*** ./node_modules/preact-compat/node_modules/fbjs/lib/invariant.js ***!
+  \***********************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+
+
+
+/**
+ * Use invariant() to assert state which your program assumes to be true.
+ *
+ * Provide sprintf-style format (only %s is supported) and arguments
+ * to provide information about what broke and what you were
+ * expecting.
+ *
+ * The invariant message will be stripped in production, but the invariant
+ * will remain to ensure logic does not differ in production.
+ */
+
+var validateFormat = function validateFormat(format) {};
+
+if (true) {
+  validateFormat = function validateFormat(format) {
+    if (format === undefined) {
+      throw new Error('invariant requires an error message argument');
+    }
+  };
+}
+
+function invariant(condition, format, a, b, c, d, e, f) {
+  validateFormat(format);
+
+  if (!condition) {
+    var error;
+    if (format === undefined) {
+      error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
+    } else {
+      var args = [a, b, c, d, e, f];
+      var argIndex = 0;
+      error = new Error(format.replace(/%s/g, function () {
+        return args[argIndex++];
+      }));
+      error.name = 'Invariant Violation';
+    }
+
+    error.framesToPop = 1; // we don't care about invariant's own frame
+    throw error;
+  }
+}
+
+module.exports = invariant;
+
+/***/ }),
+
+/***/ "./node_modules/preact-compat/node_modules/fbjs/lib/warning.js":
+/*!*********************************************************************!*\
+  !*** ./node_modules/preact-compat/node_modules/fbjs/lib/warning.js ***!
+  \*********************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright (c) 2014-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+
+
+
+var emptyFunction = __webpack_require__(/*! ./emptyFunction */ "./node_modules/preact-compat/node_modules/fbjs/lib/emptyFunction.js");
+
+/**
+ * Similar to invariant but only logs a warning if the condition is not met.
+ * This can be used to log issues in development environments in critical
+ * paths. Removing the logging code for production environments will keep the
+ * same logic and follow the same code paths.
+ */
+
+var warning = emptyFunction;
+
+if (true) {
+  var printWarning = function printWarning(format) {
+    for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+      args[_key - 1] = arguments[_key];
+    }
+
+    var argIndex = 0;
+    var message = 'Warning: ' + format.replace(/%s/g, function () {
+      return args[argIndex++];
+    });
+    if (typeof console !== 'undefined') {
+      console.error(message);
+    }
+    try {
+      // --- Welcome to debugging React ---
+      // This error was thrown as a convenience so that you can use this stack
+      // to find the callsite that caused this warning to fire.
+      throw new Error(message);
+    } catch (x) {}
+  };
+
+  warning = function warning(condition, format) {
+    if (format === undefined) {
+      throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
+    }
+
+    if (format.indexOf('Failed Composite propType: ') === 0) {
+      return; // Ignore CompositeComponent proptype check.
+    }
+
+    if (!condition) {
+      for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
+        args[_key2 - 2] = arguments[_key2];
+      }
+
+      printWarning.apply(undefined, [format].concat(args));
+    }
+  };
+}
+
+module.exports = warning;
+
+/***/ }),
+
+/***/ "./node_modules/preact-compat/node_modules/object-assign/index.js":
+/*!************************************************************************!*\
+  !*** ./node_modules/preact-compat/node_modules/object-assign/index.js ***!
+  \************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/*
+object-assign
+(c) Sindre Sorhus
+@license MIT
+*/
+
+
+/* eslint-disable no-unused-vars */
+var getOwnPropertySymbols = Object.getOwnPropertySymbols;
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+var propIsEnumerable = Object.prototype.propertyIsEnumerable;
+
+function toObject(val) {
+	if (val === null || val === undefined) {
+		throw new TypeError('Object.assign cannot be called with null or undefined');
+	}
+
+	return Object(val);
+}
+
+function shouldUseNative() {
+	try {
+		if (!Object.assign) {
+			return false;
+		}
+
+		// Detect buggy property enumeration order in older V8 versions.
+
+		// https://bugs.chromium.org/p/v8/issues/detail?id=4118
+		var test1 = new String('abc');  // eslint-disable-line no-new-wrappers
+		test1[5] = 'de';
+		if (Object.getOwnPropertyNames(test1)[0] === '5') {
+			return false;
+		}
+
+		// https://bugs.chromium.org/p/v8/issues/detail?id=3056
+		var test2 = {};
+		for (var i = 0; i < 10; i++) {
+			test2['_' + String.fromCharCode(i)] = i;
+		}
+		var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
+			return test2[n];
+		});
+		if (order2.join('') !== '0123456789') {
+			return false;
+		}
+
+		// https://bugs.chromium.org/p/v8/issues/detail?id=3056
+		var test3 = {};
+		'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
+			test3[letter] = letter;
+		});
+		if (Object.keys(Object.assign({}, test3)).join('') !==
+				'abcdefghijklmnopqrst') {
+			return false;
+		}
+
+		return true;
+	} catch (err) {
+		// We don't expect any of the above to throw, but better to be safe.
+		return false;
+	}
+}
+
+module.exports = shouldUseNative() ? Object.assign : function (target, source) {
+	var from;
+	var to = toObject(target);
+	var symbols;
+
+	for (var s = 1; s < arguments.length; s++) {
+		from = Object(arguments[s]);
+
+		for (var key in from) {
+			if (hasOwnProperty.call(from, key)) {
+				to[key] = from[key];
+			}
+		}
+
+		if (getOwnPropertySymbols) {
+			symbols = getOwnPropertySymbols(from);
+			for (var i = 0; i < symbols.length; i++) {
+				if (propIsEnumerable.call(from, symbols[i])) {
+					to[symbols[i]] = from[symbols[i]];
+				}
+			}
+		}
+	}
+
+	return to;
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/preact-compat/node_modules/prop-types/checkPropTypes.js":
+/*!******************************************************************************!*\
+  !*** ./node_modules/preact-compat/node_modules/prop-types/checkPropTypes.js ***!
+  \******************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+
+
+if (true) {
+  var invariant = __webpack_require__(/*! fbjs/lib/invariant */ "./node_modules/preact-compat/node_modules/fbjs/lib/invariant.js");
+  var warning = __webpack_require__(/*! fbjs/lib/warning */ "./node_modules/preact-compat/node_modules/fbjs/lib/warning.js");
+  var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/preact-compat/node_modules/prop-types/lib/ReactPropTypesSecret.js");
+  var loggedTypeFailures = {};
+}
+
+/**
+ * Assert that the values match with the type specs.
+ * Error messages are memorized and will only be shown once.
+ *
+ * @param {object} typeSpecs Map of name to a ReactPropType
+ * @param {object} values Runtime values that need to be type-checked
+ * @param {string} location e.g. "prop", "context", "child context"
+ * @param {string} componentName Name of the component for error messages.
+ * @param {?Function} getStack Returns the component stack.
+ * @private
+ */
+function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
+  if (true) {
+    for (var typeSpecName in typeSpecs) {
+      if (typeSpecs.hasOwnProperty(typeSpecName)) {
+        var error;
+        // Prop type validation may throw. In case they do, we don't want to
+        // fail the render phase where it didn't fail before. So we log it.
+        // After these have been cleaned up, we'll let them throw.
+        try {
+          // This is intentionally an invariant that gets caught. It's the same
+          // behavior as without this statement except with a better message.
+          invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);
+          error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
+        } catch (ex) {
+          error = ex;
+        }
+        warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);
+        if (error instanceof Error && !(error.message in loggedTypeFailures)) {
+          // Only monitor this failure once because there tends to be a lot of the
+          // same error.
+          loggedTypeFailures[error.message] = true;
+
+          var stack = getStack ? getStack() : '';
+
+          warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
+        }
+      }
+    }
+  }
+}
+
+module.exports = checkPropTypes;
+
+
+/***/ }),
+
+/***/ "./node_modules/preact-compat/node_modules/prop-types/factoryWithTypeCheckers.js":
+/*!***************************************************************************************!*\
+  !*** ./node_modules/preact-compat/node_modules/prop-types/factoryWithTypeCheckers.js ***!
+  \***************************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+
+
+var emptyFunction = __webpack_require__(/*! fbjs/lib/emptyFunction */ "./node_modules/preact-compat/node_modules/fbjs/lib/emptyFunction.js");
+var invariant = __webpack_require__(/*! fbjs/lib/invariant */ "./node_modules/preact-compat/node_modules/fbjs/lib/invariant.js");
+var warning = __webpack_require__(/*! fbjs/lib/warning */ "./node_modules/preact-compat/node_modules/fbjs/lib/warning.js");
+var assign = __webpack_require__(/*! object-assign */ "./node_modules/preact-compat/node_modules/object-assign/index.js");
+
+var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/preact-compat/node_modules/prop-types/lib/ReactPropTypesSecret.js");
+var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "./node_modules/preact-compat/node_modules/prop-types/checkPropTypes.js");
+
+module.exports = function(isValidElement, throwOnDirectAccess) {
+  /* global Symbol */
+  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
+  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
+
+  /**
+   * Returns the iterator method function contained on the iterable object.
+   *
+   * Be sure to invoke the function with the iterable as context:
+   *
+   *     var iteratorFn = getIteratorFn(myIterable);
+   *     if (iteratorFn) {
+   *       var iterator = iteratorFn.call(myIterable);
+   *       ...
+   *     }
+   *
+   * @param {?object} maybeIterable
+   * @return {?function}
+   */
+  function getIteratorFn(maybeIterable) {
+    var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
+    if (typeof iteratorFn === 'function') {
+      return iteratorFn;
+    }
+  }
+
+  /**
+   * Collection of methods that allow declaration and validation of props that are
+   * supplied to React components. Example usage:
+   *
+   *   var Props = require('ReactPropTypes');
+   *   var MyArticle = React.createClass({
+   *     propTypes: {
+   *       // An optional string prop named "description".
+   *       description: Props.string,
+   *
+   *       // A required enum prop named "category".
+   *       category: Props.oneOf(['News','Photos']).isRequired,
+   *
+   *       // A prop named "dialog" that requires an instance of Dialog.
+   *       dialog: Props.instanceOf(Dialog).isRequired
+   *     },
+   *     render: function() { ... }
+   *   });
+   *
+   * A more formal specification of how these methods are used:
+   *
+   *   type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
+   *   decl := ReactPropTypes.{type}(.isRequired)?
+   *
+   * Each and every declaration produces a function with the same signature. This
+   * allows the creation of custom validation functions. For example:
+   *
+   *  var MyLink = React.createClass({
+   *    propTypes: {
+   *      // An optional string or URI prop named "href".
+   *      href: function(props, propName, componentName) {
+   *        var propValue = props[propName];
+   *        if (propValue != null && typeof propValue !== 'string' &&
+   *            !(propValue instanceof URI)) {
+   *          return new Error(
+   *            'Expected a string or an URI for ' + propName + ' in ' +
+   *            componentName
+   *          );
+   *        }
+   *      }
+   *    },
+   *    render: function() {...}
+   *  });
+   *
+   * @internal
+   */
+
+  var ANONYMOUS = '<<anonymous>>';
+
+  // Important!
+  // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
+  var ReactPropTypes = {
+    array: createPrimitiveTypeChecker('array'),
+    bool: createPrimitiveTypeChecker('boolean'),
+    func: createPrimitiveTypeChecker('function'),
+    number: createPrimitiveTypeChecker('number'),
+    object: createPrimitiveTypeChecker('object'),
+    string: createPrimitiveTypeChecker('string'),
+    symbol: createPrimitiveTypeChecker('symbol'),
+
+    any: createAnyTypeChecker(),
+    arrayOf: createArrayOfTypeChecker,
+    element: createElementTypeChecker(),
+    instanceOf: createInstanceTypeChecker,
+    node: createNodeChecker(),
+    objectOf: createObjectOfTypeChecker,
+    oneOf: createEnumTypeChecker,
+    oneOfType: createUnionTypeChecker,
+    shape: createShapeTypeChecker,
+    exact: createStrictShapeTypeChecker,
+  };
+
+  /**
+   * inlined Object.is polyfill to avoid requiring consumers ship their own
+   * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
+   */
+  /*eslint-disable no-self-compare*/
+  function is(x, y) {
+    // SameValue algorithm
+    if (x === y) {
+      // Steps 1-5, 7-10
+      // Steps 6.b-6.e: +0 != -0
+      return x !== 0 || 1 / x === 1 / y;
+    } else {
+      // Step 6.a: NaN == NaN
+      return x !== x && y !== y;
+    }
+  }
+  /*eslint-enable no-self-compare*/
+
+  /**
+   * We use an Error-like object for backward compatibility as people may call
+   * PropTypes directly and inspect their output. However, we don't use real
+   * Errors anymore. We don't inspect their stack anyway, and creating them
+   * is prohibitively expensive if they are created too often, such as what
+   * happens in oneOfType() for any type before the one that matched.
+   */
+  function PropTypeError(message) {
+    this.message = message;
+    this.stack = '';
+  }
+  // Make `instanceof Error` still work for returned errors.
+  PropTypeError.prototype = Error.prototype;
+
+  function createChainableTypeChecker(validate) {
+    if (true) {
+      var manualPropTypeCallCache = {};
+      var manualPropTypeWarningCount = 0;
+    }
+    function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
+      componentName = componentName || ANONYMOUS;
+      propFullName = propFullName || propName;
+
+      if (secret !== ReactPropTypesSecret) {
+        if (throwOnDirectAccess) {
+          // New behavior only for users of `prop-types` package
+          invariant(
+            false,
+            'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
+            'Use `PropTypes.checkPropTypes()` to call them. ' +
+            'Read more at http://fb.me/use-check-prop-types'
+          );
+        } else if ("development" !== 'production' && typeof console !== 'undefined') {
+          // Old behavior for people using React.PropTypes
+          var cacheKey = componentName + ':' + propName;
+          if (
+            !manualPropTypeCallCache[cacheKey] &&
+            // Avoid spamming the console because they are often not actionable except for lib authors
+            manualPropTypeWarningCount < 3
+          ) {
+            warning(
+              false,
+              'You are manually calling a React.PropTypes validation ' +
+              'function for the `%s` prop on `%s`. This is deprecated ' +
+              'and will throw in the standalone `prop-types` package. ' +
+              'You may be seeing this warning due to a third-party PropTypes ' +
+              'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',
+              propFullName,
+              componentName
+            );
+            manualPropTypeCallCache[cacheKey] = true;
+            manualPropTypeWarningCount++;
+          }
+        }
+      }
+      if (props[propName] == null) {
+        if (isRequired) {
+          if (props[propName] === null) {
+            return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
+          }
+          return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
+        }
+        return null;
+      } else {
+        return validate(props, propName, componentName, location, propFullName);
+      }
+    }
+
+    var chainedCheckType = checkType.bind(null, false);
+    chainedCheckType.isRequired = checkType.bind(null, true);
+
+    return chainedCheckType;
+  }
+
+  function createPrimitiveTypeChecker(expectedType) {
+    function validate(props, propName, componentName, location, propFullName, secret) {
+      var propValue = props[propName];
+      var propType = getPropType(propValue);
+      if (propType !== expectedType) {
+        // `propValue` being instance of, say, date/regexp, pass the 'object'
+        // check, but we can offer a more precise error message here rather than
+        // 'of type `object`'.
+        var preciseType = getPreciseType(propValue);
+
+        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
+      }
+      return null;
+    }
+    return createChainableTypeChecker(validate);
+  }
+
+  function createAnyTypeChecker() {
+    return createChainableTypeChecker(emptyFunction.thatReturnsNull);
+  }
+
+  function createArrayOfTypeChecker(typeChecker) {
+    function validate(props, propName, componentName, location, propFullName) {
+      if (typeof typeChecker !== 'function') {
+        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
+      }
+      var propValue = props[propName];
+      if (!Array.isArray(propValue)) {
+        var propType = getPropType(propValue);
+        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
+      }
+      for (var i = 0; i < propValue.length; i++) {
+        var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
+        if (error instanceof Error) {
+          return error;
+        }
+      }
+      return null;
+    }
+    return createChainableTypeChecker(validate);
+  }
+
+  function createElementTypeChecker() {
+    function validate(props, propName, componentName, location, propFullName) {
+      var propValue = props[propName];
+      if (!isValidElement(propValue)) {
+        var propType = getPropType(propValue);
+        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
+      }
+      return null;
+    }
+    return createChainableTypeChecker(validate);
+  }
+
+  function createInstanceTypeChecker(expectedClass) {
+    function validate(props, propName, componentName, location, propFullName) {
+      if (!(props[propName] instanceof expectedClass)) {
+        var expectedClassName = expectedClass.name || ANONYMOUS;
+        var actualClassName = getClassName(props[propName]);
+        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
+      }
+      return null;
+    }
+    return createChainableTypeChecker(validate);
+  }
+
+  function createEnumTypeChecker(expectedValues) {
+    if (!Array.isArray(expectedValues)) {
+       true ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : undefined;
+      return emptyFunction.thatReturnsNull;
+    }
+
+    function validate(props, propName, componentName, location, propFullName) {
+      var propValue = props[propName];
+      for (var i = 0; i < expectedValues.length; i++) {
+        if (is(propValue, expectedValues[i])) {
+          return null;
+        }
+      }
+
+      var valuesString = JSON.stringify(expectedValues);
+      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
+    }
+    return createChainableTypeChecker(validate);
+  }
+
+  function createObjectOfTypeChecker(typeChecker) {
+    function validate(props, propName, componentName, location, propFullName) {
+      if (typeof typeChecker !== 'function') {
+        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
+      }
+      var propValue = props[propName];
+      var propType = getPropType(propValue);
+      if (propType !== 'object') {
+        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
+      }
+      for (var key in propValue) {
+        if (propValue.hasOwnProperty(key)) {
+          var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
+          if (error instanceof Error) {
+            return error;
+          }
+        }
+      }
+      return null;
+    }
+    return createChainableTypeChecker(validate);
+  }
+
+  function createUnionTypeChecker(arrayOfTypeCheckers) {
+    if (!Array.isArray(arrayOfTypeCheckers)) {
+       true ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : undefined;
+      return emptyFunction.thatReturnsNull;
+    }
+
+    for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
+      var checker = arrayOfTypeCheckers[i];
+      if (typeof checker !== 'function') {
+        warning(
+          false,
+          'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
+          'received %s at index %s.',
+          getPostfixForTypeWarning(checker),
+          i
+        );
+        return emptyFunction.thatReturnsNull;
+      }
+    }
+
+    function validate(props, propName, componentName, location, propFullName) {
+      for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
+        var checker = arrayOfTypeCheckers[i];
+        if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
+          return null;
+        }
+      }
+
+      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
+    }
+    return createChainableTypeChecker(validate);
+  }
+
+  function createNodeChecker() {
+    function validate(props, propName, componentName, location, propFullName) {
+      if (!isNode(props[propName])) {
+        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
+      }
+      return null;
+    }
+    return createChainableTypeChecker(validate);
+  }
+
+  function createShapeTypeChecker(shapeTypes) {
+    function validate(props, propName, componentName, location, propFullName) {
+      var propValue = props[propName];
+      var propType = getPropType(propValue);
+      if (propType !== 'object') {
+        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
+      }
+      for (var key in shapeTypes) {
+        var checker = shapeTypes[key];
+        if (!checker) {
+          continue;
+        }
+        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
+        if (error) {
+          return error;
+        }
+      }
+      return null;
+    }
+    return createChainableTypeChecker(validate);
+  }
+
+  function createStrictShapeTypeChecker(shapeTypes) {
+    function validate(props, propName, componentName, location, propFullName) {
+      var propValue = props[propName];
+      var propType = getPropType(propValue);
+      if (propType !== 'object') {
+        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
+      }
+      // We need to check all keys in case some are required but missing from
+      // props.
+      var allKeys = assign({}, props[propName], shapeTypes);
+      for (var key in allKeys) {
+        var checker = shapeTypes[key];
+        if (!checker) {
+          return new PropTypeError(
+            'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
+            '\nBad object: ' + JSON.stringify(props[propName], null, '  ') +
+            '\nValid keys: ' +  JSON.stringify(Object.keys(shapeTypes), null, '  ')
+          );
+        }
+        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
+        if (error) {
+          return error;
+        }
+      }
+      return null;
+    }
+
+    return createChainableTypeChecker(validate);
+  }
+
+  function isNode(propValue) {
+    switch (typeof propValue) {
+      case 'number':
+      case 'string':
+      case 'undefined':
+        return true;
+      case 'boolean':
+        return !propValue;
+      case 'object':
+        if (Array.isArray(propValue)) {
+          return propValue.every(isNode);
+        }
+        if (propValue === null || isValidElement(propValue)) {
+          return true;
+        }
+
+        var iteratorFn = getIteratorFn(propValue);
+        if (iteratorFn) {
+          var iterator = iteratorFn.call(propValue);
+          var step;
+          if (iteratorFn !== propValue.entries) {
+            while (!(step = iterator.next()).done) {
+              if (!isNode(step.value)) {
+                return false;
+              }
+            }
+          } else {
+            // Iterator will provide entry [k,v] tuples rather than values.
+            while (!(step = iterator.next()).done) {
+              var entry = step.value;
+              if (entry) {
+                if (!isNode(entry[1])) {
+                  return false;
+                }
+              }
+            }
+          }
+        } else {
+          return false;
+        }
+
+        return true;
+      default:
+        return false;
+    }
+  }
+
+  function isSymbol(propType, propValue) {
+    // Native Symbol.
+    if (propType === 'symbol') {
+      return true;
+    }
+
+    // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
+    if (propValue['@@toStringTag'] === 'Symbol') {
+      return true;
+    }
+
+    // Fallback for non-spec compliant Symbols which are polyfilled.
+    if (typeof Symbol === 'function' && propValue instanceof Symbol) {
+      return true;
+    }
+
+    return false;
+  }
+
+  // Equivalent of `typeof` but with special handling for array and regexp.
+  function getPropType(propValue) {
+    var propType = typeof propValue;
+    if (Array.isArray(propValue)) {
+      return 'array';
+    }
+    if (propValue instanceof RegExp) {
+      // Old webkits (at least until Android 4.0) return 'function' rather than
+      // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
+      // passes PropTypes.object.
+      return 'object';
+    }
+    if (isSymbol(propType, propValue)) {
+      return 'symbol';
+    }
+    return propType;
+  }
+
+  // This handles more types than `getPropType`. Only used for error messages.
+  // See `createPrimitiveTypeChecker`.
+  function getPreciseType(propValue) {
+    if (typeof propValue === 'undefined' || propValue === null) {
+      return '' + propValue;
+    }
+    var propType = getPropType(propValue);
+    if (propType === 'object') {
+      if (propValue instanceof Date) {
+        return 'date';
+      } else if (propValue instanceof RegExp) {
+        return 'regexp';
+      }
+    }
+    return propType;
+  }
+
+  // Returns a string that is postfixed to a warning about an invalid type.
+  // For example, "undefined" or "of type array"
+  function getPostfixForTypeWarning(value) {
+    var type = getPreciseType(value);
+    switch (type) {
+      case 'array':
+      case 'object':
+        return 'an ' + type;
+      case 'boolean':
+      case 'date':
+      case 'regexp':
+        return 'a ' + type;
+      default:
+        return type;
+    }
+  }
+
+  // Returns class name of the object, if any.
+  function getClassName(propValue) {
+    if (!propValue.constructor || !propValue.constructor.name) {
+      return ANONYMOUS;
+    }
+    return propValue.constructor.name;
+  }
+
+  ReactPropTypes.checkPropTypes = checkPropTypes;
+  ReactPropTypes.PropTypes = ReactPropTypes;
+
+  return ReactPropTypes;
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/preact-compat/node_modules/prop-types/index.js":
+/*!*********************************************************************!*\
+  !*** ./node_modules/preact-compat/node_modules/prop-types/index.js ***!
+  \*********************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+if (true) {
+  var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
+    Symbol.for &&
+    Symbol.for('react.element')) ||
+    0xeac7;
+
+  var isValidElement = function(object) {
+    return typeof object === 'object' &&
+      object !== null &&
+      object.$$typeof === REACT_ELEMENT_TYPE;
+  };
+
+  // By explicitly using `prop-types` you are opting into new development behavior.
+  // http://fb.me/prop-types-in-prod
+  var throwOnDirectAccess = true;
+  module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "./node_modules/preact-compat/node_modules/prop-types/factoryWithTypeCheckers.js")(isValidElement, throwOnDirectAccess);
+} else {}
+
+
+/***/ }),
+
+/***/ "./node_modules/preact-compat/node_modules/prop-types/lib/ReactPropTypesSecret.js":
+/*!****************************************************************************************!*\
+  !*** ./node_modules/preact-compat/node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
+  \****************************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+
+
+var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
+
+module.exports = ReactPropTypesSecret;
+
+
+/***/ }),
+
+/***/ "./node_modules/preact/dist/preact.esm.js":
+/*!************************************************!*\
+  !*** ./node_modules/preact/dist/preact.esm.js ***!
+  \************************************************/
+/*! exports provided: default, h, createElement, cloneElement, Component, render, rerender, options */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return h; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createElement", function() { return h; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cloneElement", function() { return cloneElement; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Component", function() { return Component; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rerender", function() { return rerender; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "options", function() { return options; });
+/** Virtual DOM Node */
+function VNode() {}
+
+/** Global options
+ *	@public
+ *	@namespace options {Object}
+ */
+var options = {
+
+	/** If `true`, `prop` changes trigger synchronous component updates.
+  *	@name syncComponentUpdates
+  *	@type Boolean
+  *	@default true
+  */
+	//syncComponentUpdates: true,
+
+	/** Processes all created VNodes.
+  *	@param {VNode} vnode	A newly-created VNode to normalize/process
+  */
+	//vnode(vnode) { }
+
+	/** Hook invoked after a component is mounted. */
+	// afterMount(component) { }
+
+	/** Hook invoked after the DOM is updated with a component's latest render. */
+	// afterUpdate(component) { }
+
+	/** Hook invoked immediately before a component is unmounted. */
+	// beforeUnmount(component) { }
+};
+
+var stack = [];
+
+var EMPTY_CHILDREN = [];
+
+/**
+ * JSX/hyperscript reviver.
+ * @see http://jasonformat.com/wtf-is-jsx
+ * Benchmarks: https://esbench.com/bench/57ee8f8e330ab09900a1a1a0
+ *
+ * Note: this is exported as both `h()` and `createElement()` for compatibility reasons.
+ *
+ * Creates a VNode (virtual DOM element). A tree of VNodes can be used as a lightweight representation
+ * of the structure of a DOM tree. This structure can be realized by recursively comparing it against
+ * the current _actual_ DOM structure, and applying only the differences.
+ *
+ * `h()`/`createElement()` accepts an element name, a list of attributes/props,
+ * and optionally children to append to the element.
+ *
+ * @example The following DOM tree
+ *
+ * `<div id="foo" name="bar">Hello!</div>`
+ *
+ * can be constructed using this function as:
+ *
+ * `h('div', { id: 'foo', name : 'bar' }, 'Hello!');`
+ *
+ * @param {string} nodeName	An element name. Ex: `div`, `a`, `span`, etc.
+ * @param {Object} attributes	Any attributes/props to set on the created element.
+ * @param rest			Additional arguments are taken to be children to append. Can be infinitely nested Arrays.
+ *
+ * @public
+ */
+function h(nodeName, attributes) {
+	var children = EMPTY_CHILDREN,
+	    lastSimple,
+	    child,
+	    simple,
+	    i;
+	for (i = arguments.length; i-- > 2;) {
+		stack.push(arguments[i]);
+	}
+	if (attributes && attributes.children != null) {
+		if (!stack.length) stack.push(attributes.children);
+		delete attributes.children;
+	}
+	while (stack.length) {
+		if ((child = stack.pop()) && child.pop !== undefined) {
+			for (i = child.length; i--;) {
+				stack.push(child[i]);
+			}
+		} else {
+			if (typeof child === 'boolean') child = null;
+
+			if (simple = typeof nodeName !== 'function') {
+				if (child == null) child = '';else if (typeof child === 'number') child = String(child);else if (typeof child !== 'string') simple = false;
+			}
+
+			if (simple && lastSimple) {
+				children[children.length - 1] += child;
+			} else if (children === EMPTY_CHILDREN) {
+				children = [child];
+			} else {
+				children.push(child);
+			}
+
+			lastSimple = simple;
+		}
+	}
+
+	var p = new VNode();
+	p.nodeName = nodeName;
+	p.children = children;
+	p.attributes = attributes == null ? undefined : attributes;
+	p.key = attributes == null ? undefined : attributes.key;
+
+	// if a "vnode hook" is defined, pass every created VNode to it
+	if (options.vnode !== undefined) options.vnode(p);
+
+	return p;
+}
+
+/**
+ *  Copy all properties from `props` onto `obj`.
+ *  @param {Object} obj		Object onto which properties should be copied.
+ *  @param {Object} props	Object from which to copy properties.
+ *  @returns obj
+ *  @private
+ */
+function extend(obj, props) {
+  for (var i in props) {
+    obj[i] = props[i];
+  }return obj;
+}
+
+/**
+ * Call a function asynchronously, as soon as possible. Makes
+ * use of HTML Promise to schedule the callback if available,
+ * otherwise falling back to `setTimeout` (mainly for IE<11).
+ *
+ * @param {Function} callback
+ */
+var defer = typeof Promise == 'function' ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;
+
+/**
+ * Clones the given VNode, optionally adding attributes/props and replacing its children.
+ * @param {VNode} vnode		The virtual DOM element to clone
+ * @param {Object} props	Attributes/props to add when cloning
+ * @param {VNode} rest		Any additional arguments will be used as replacement children.
+ */
+function cloneElement(vnode, props) {
+  return h(vnode.nodeName, extend(extend({}, vnode.attributes), props), arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children);
+}
+
+// DOM properties that should NOT have "px" added when numeric
+var IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;
+
+/** Managed queue of dirty components to be re-rendered */
+
+var items = [];
+
+function enqueueRender(component) {
+	if (!component._dirty && (component._dirty = true) && items.push(component) == 1) {
+		(options.debounceRendering || defer)(rerender);
+	}
+}
+
+function rerender() {
+	var p,
+	    list = items;
+	items = [];
+	while (p = list.pop()) {
+		if (p._dirty) renderComponent(p);
+	}
+}
+
+/**
+ * Check if two nodes are equivalent.
+ *
+ * @param {Node} node			DOM Node to compare
+ * @param {VNode} vnode			Virtual DOM node to compare
+ * @param {boolean} [hydrating=false]	If true, ignores component constructors when comparing.
+ * @private
+ */
+function isSameNodeType(node, vnode, hydrating) {
+  if (typeof vnode === 'string' || typeof vnode === 'number') {
+    return node.splitText !== undefined;
+  }
+  if (typeof vnode.nodeName === 'string') {
+    return !node._componentConstructor && isNamedNode(node, vnode.nodeName);
+  }
+  return hydrating || node._componentConstructor === vnode.nodeName;
+}
+
+/**
+ * Check if an Element has a given nodeName, case-insensitively.
+ *
+ * @param {Element} node	A DOM Element to inspect the name of.
+ * @param {String} nodeName	Unnormalized name to compare against.
+ */
+function isNamedNode(node, nodeName) {
+  return node.normalizedNodeName === nodeName || node.nodeName.toLowerCase() === nodeName.toLowerCase();
+}
+
+/**
+ * Reconstruct Component-style `props` from a VNode.
+ * Ensures default/fallback values from `defaultProps`:
+ * Own-properties of `defaultProps` not present in `vnode.attributes` are added.
+ *
+ * @param {VNode} vnode
+ * @returns {Object} props
+ */
+function getNodeProps(vnode) {
+  var props = extend({}, vnode.attributes);
+  props.children = vnode.children;
+
+  var defaultProps = vnode.nodeName.defaultProps;
+  if (defaultProps !== undefined) {
+    for (var i in defaultProps) {
+      if (props[i] === undefined) {
+        props[i] = defaultProps[i];
+      }
+    }
+  }
+
+  return props;
+}
+
+/** Create an element with the given nodeName.
+ *	@param {String} nodeName
+ *	@param {Boolean} [isSvg=false]	If `true`, creates an element within the SVG namespace.
+ *	@returns {Element} node
+ */
+function createNode(nodeName, isSvg) {
+	var node = isSvg ? document.createElementNS('http://www.w3.org/2000/svg', nodeName) : document.createElement(nodeName);
+	node.normalizedNodeName = nodeName;
+	return node;
+}
+
+/** Remove a child node from its parent if attached.
+ *	@param {Element} node		The node to remove
+ */
+function removeNode(node) {
+	var parentNode = node.parentNode;
+	if (parentNode) parentNode.removeChild(node);
+}
+
+/** Set a named attribute on the given Node, with special behavior for some names and event handlers.
+ *	If `value` is `null`, the attribute/handler will be removed.
+ *	@param {Element} node	An element to mutate
+ *	@param {string} name	The name/key to set, such as an event or attribute name
+ *	@param {any} old	The last value that was set for this name/node pair
+ *	@param {any} value	An attribute value, such as a function to be used as an event handler
+ *	@param {Boolean} isSvg	Are we currently diffing inside an svg?
+ *	@private
+ */
+function setAccessor(node, name, old, value, isSvg) {
+	if (name === 'className') name = 'class';
+
+	if (name === 'key') {
+		// ignore
+	} else if (name === 'ref') {
+		if (old) old(null);
+		if (value) value(node);
+	} else if (name === 'class' && !isSvg) {
+		node.className = value || '';
+	} else if (name === 'style') {
+		if (!value || typeof value === 'string' || typeof old === 'string') {
+			node.style.cssText = value || '';
+		}
+		if (value && typeof value === 'object') {
+			if (typeof old !== 'string') {
+				for (var i in old) {
+					if (!(i in value)) node.style[i] = '';
+				}
+			}
+			for (var i in value) {
+				node.style[i] = typeof value[i] === 'number' && IS_NON_DIMENSIONAL.test(i) === false ? value[i] + 'px' : value[i];
+			}
+		}
+	} else if (name === 'dangerouslySetInnerHTML') {
+		if (value) node.innerHTML = value.__html || '';
+	} else if (name[0] == 'o' && name[1] == 'n') {
+		var useCapture = name !== (name = name.replace(/Capture$/, ''));
+		name = name.toLowerCase().substring(2);
+		if (value) {
+			if (!old) node.addEventListener(name, eventProxy, useCapture);
+		} else {
+			node.removeEventListener(name, eventProxy, useCapture);
+		}
+		(node._listeners || (node._listeners = {}))[name] = value;
+	} else if (name !== 'list' && name !== 'type' && !isSvg && name in node) {
+		setProperty(node, name, value == null ? '' : value);
+		if (value == null || value === false) node.removeAttribute(name);
+	} else {
+		var ns = isSvg && name !== (name = name.replace(/^xlink:?/, ''));
+		if (value == null || value === false) {
+			if (ns) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase());else node.removeAttribute(name);
+		} else if (typeof value !== 'function') {
+			if (ns) node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value);else node.setAttribute(name, value);
+		}
+	}
+}
+
+/** Attempt to set a DOM property to the given value.
+ *	IE & FF throw for certain property-value combinations.
+ */
+function setProperty(node, name, value) {
+	try {
+		node[name] = value;
+	} catch (e) {}
+}
+
+/** Proxy an event to hooked event handlers
+ *	@private
+ */
+function eventProxy(e) {
+	return this._listeners[e.type](options.event && options.event(e) || e);
+}
+
+/** Queue of components that have been mounted and are awaiting componentDidMount */
+var mounts = [];
+
+/** Diff recursion count, used to track the end of the diff cycle. */
+var diffLevel = 0;
+
+/** Global flag indicating if the diff is currently within an SVG */
+var isSvgMode = false;
+
+/** Global flag indicating if the diff is performing hydration */
+var hydrating = false;
+
+/** Invoke queued componentDidMount lifecycle methods */
+function flushMounts() {
+	var c;
+	while (c = mounts.pop()) {
+		if (options.afterMount) options.afterMount(c);
+		if (c.componentDidMount) c.componentDidMount();
+	}
+}
+
+/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.
+ *	@param {Element} [dom=null]		A DOM node to mutate into the shape of the `vnode`
+ *	@param {VNode} vnode			A VNode (with descendants forming a tree) representing the desired DOM structure
+ *	@returns {Element} dom			The created/mutated element
+ *	@private
+ */
+function diff(dom, vnode, context, mountAll, parent, componentRoot) {
+	// diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)
+	if (!diffLevel++) {
+		// when first starting the diff, check if we're diffing an SVG or within an SVG
+		isSvgMode = parent != null && parent.ownerSVGElement !== undefined;
+
+		// hydration is indicated by the existing element to be diffed not having a prop cache
+		hydrating = dom != null && !('__preactattr_' in dom);
+	}
+
+	var ret = idiff(dom, vnode, context, mountAll, componentRoot);
+
+	// append the element if its a new parent
+	if (parent && ret.parentNode !== parent) parent.appendChild(ret);
+
+	// diffLevel being reduced to 0 means we're exiting the diff
+	if (! --diffLevel) {
+		hydrating = false;
+		// invoke queued componentDidMount lifecycle methods
+		if (!componentRoot) flushMounts();
+	}
+
+	return ret;
+}
+
+/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */
+function idiff(dom, vnode, context, mountAll, componentRoot) {
+	var out = dom,
+	    prevSvgMode = isSvgMode;
+
+	// empty values (null, undefined, booleans) render as empty Text nodes
+	if (vnode == null || typeof vnode === 'boolean') vnode = '';
+
+	// Fast case: Strings & Numbers create/update Text nodes.
+	if (typeof vnode === 'string' || typeof vnode === 'number') {
+
+		// update if it's already a Text node:
+		if (dom && dom.splitText !== undefined && dom.parentNode && (!dom._component || componentRoot)) {
+			/* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */
+			if (dom.nodeValue != vnode) {
+				dom.nodeValue = vnode;
+			}
+		} else {
+			// it wasn't a Text node: replace it with one and recycle the old Element
+			out = document.createTextNode(vnode);
+			if (dom) {
+				if (dom.parentNode) dom.parentNode.replaceChild(out, dom);
+				recollectNodeTree(dom, true);
+			}
+		}
+
+		out['__preactattr_'] = true;
+
+		return out;
+	}
+
+	// If the VNode represents a Component, perform a component diff:
+	var vnodeName = vnode.nodeName;
+	if (typeof vnodeName === 'function') {
+		return buildComponentFromVNode(dom, vnode, context, mountAll);
+	}
+
+	// Tracks entering and exiting SVG namespace when descending through the tree.
+	isSvgMode = vnodeName === 'svg' ? true : vnodeName === 'foreignObject' ? false : isSvgMode;
+
+	// If there's no existing element or it's the wrong type, create a new one:
+	vnodeName = String(vnodeName);
+	if (!dom || !isNamedNode(dom, vnodeName)) {
+		out = createNode(vnodeName, isSvgMode);
+
+		if (dom) {
+			// move children into the replacement node
+			while (dom.firstChild) {
+				out.appendChild(dom.firstChild);
+			} // if the previous Element was mounted into the DOM, replace it inline
+			if (dom.parentNode) dom.parentNode.replaceChild(out, dom);
+
+			// recycle the old element (skips non-Element node types)
+			recollectNodeTree(dom, true);
+		}
+	}
+
+	var fc = out.firstChild,
+	    props = out['__preactattr_'],
+	    vchildren = vnode.children;
+
+	if (props == null) {
+		props = out['__preactattr_'] = {};
+		for (var a = out.attributes, i = a.length; i--;) {
+			props[a[i].name] = a[i].value;
+		}
+	}
+
+	// Optimization: fast-path for elements containing a single TextNode:
+	if (!hydrating && vchildren && vchildren.length === 1 && typeof vchildren[0] === 'string' && fc != null && fc.splitText !== undefined && fc.nextSibling == null) {
+		if (fc.nodeValue != vchildren[0]) {
+			fc.nodeValue = vchildren[0];
+		}
+	}
+	// otherwise, if there are existing or new children, diff them:
+	else if (vchildren && vchildren.length || fc != null) {
+			innerDiffNode(out, vchildren, context, mountAll, hydrating || props.dangerouslySetInnerHTML != null);
+		}
+
+	// Apply attributes/props from VNode to the DOM Element:
+	diffAttributes(out, vnode.attributes, props);
+
+	// restore previous SVG mode: (in case we're exiting an SVG namespace)
+	isSvgMode = prevSvgMode;
+
+	return out;
+}
+
+/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.
+ *	@param {Element} dom			Element whose children should be compared & mutated
+ *	@param {Array} vchildren		Array of VNodes to compare to `dom.childNodes`
+ *	@param {Object} context			Implicitly descendant context object (from most recent `getChildContext()`)
+ *	@param {Boolean} mountAll
+ *	@param {Boolean} isHydrating	If `true`, consumes externally created elements similar to hydration
+ */
+function innerDiffNode(dom, vchildren, context, mountAll, isHydrating) {
+	var originalChildren = dom.childNodes,
+	    children = [],
+	    keyed = {},
+	    keyedLen = 0,
+	    min = 0,
+	    len = originalChildren.length,
+	    childrenLen = 0,
+	    vlen = vchildren ? vchildren.length : 0,
+	    j,
+	    c,
+	    f,
+	    vchild,
+	    child;
+
+	// Build up a map of keyed children and an Array of unkeyed children:
+	if (len !== 0) {
+		for (var i = 0; i < len; i++) {
+			var _child = originalChildren[i],
+			    props = _child['__preactattr_'],
+			    key = vlen && props ? _child._component ? _child._component.__key : props.key : null;
+			if (key != null) {
+				keyedLen++;
+				keyed[key] = _child;
+			} else if (props || (_child.splitText !== undefined ? isHydrating ? _child.nodeValue.trim() : true : isHydrating)) {
+				children[childrenLen++] = _child;
+			}
+		}
+	}
+
+	if (vlen !== 0) {
+		for (var i = 0; i < vlen; i++) {
+			vchild = vchildren[i];
+			child = null;
+
+			// attempt to find a node based on key matching
+			var key = vchild.key;
+			if (key != null) {
+				if (keyedLen && keyed[key] !== undefined) {
+					child = keyed[key];
+					keyed[key] = undefined;
+					keyedLen--;
+				}
+			}
+			// attempt to pluck a node of the same type from the existing children
+			else if (!child && min < childrenLen) {
+					for (j = min; j < childrenLen; j++) {
+						if (children[j] !== undefined && isSameNodeType(c = children[j], vchild, isHydrating)) {
+							child = c;
+							children[j] = undefined;
+							if (j === childrenLen - 1) childrenLen--;
+							if (j === min) min++;
+							break;
+						}
+					}
+				}
+
+			// morph the matched/found/created DOM child to match vchild (deep)
+			child = idiff(child, vchild, context, mountAll);
+
+			f = originalChildren[i];
+			if (child && child !== dom && child !== f) {
+				if (f == null) {
+					dom.appendChild(child);
+				} else if (child === f.nextSibling) {
+					removeNode(f);
+				} else {
+					dom.insertBefore(child, f);
+				}
+			}
+		}
+	}
+
+	// remove unused keyed children:
+	if (keyedLen) {
+		for (var i in keyed) {
+			if (keyed[i] !== undefined) recollectNodeTree(keyed[i], false);
+		}
+	}
+
+	// remove orphaned unkeyed children:
+	while (min <= childrenLen) {
+		if ((child = children[childrenLen--]) !== undefined) recollectNodeTree(child, false);
+	}
+}
+
+/** Recursively recycle (or just unmount) a node and its descendants.
+ *	@param {Node} node						DOM node to start unmount/removal from
+ *	@param {Boolean} [unmountOnly=false]	If `true`, only triggers unmount lifecycle, skips removal
+ */
+function recollectNodeTree(node, unmountOnly) {
+	var component = node._component;
+	if (component) {
+		// if node is owned by a Component, unmount that component (ends up recursing back here)
+		unmountComponent(component);
+	} else {
+		// If the node's VNode had a ref function, invoke it with null here.
+		// (this is part of the React spec, and smart for unsetting references)
+		if (node['__preactattr_'] != null && node['__preactattr_'].ref) node['__preactattr_'].ref(null);
+
+		if (unmountOnly === false || node['__preactattr_'] == null) {
+			removeNode(node);
+		}
+
+		removeChildren(node);
+	}
+}
+
+/** Recollect/unmount all children.
+ *	- we use .lastChild here because it causes less reflow than .firstChild
+ *	- it's also cheaper than accessing the .childNodes Live NodeList
+ */
+function removeChildren(node) {
+	node = node.lastChild;
+	while (node) {
+		var next = node.previousSibling;
+		recollectNodeTree(node, true);
+		node = next;
+	}
+}
+
+/** Apply differences in attributes from a VNode to the given DOM Element.
+ *	@param {Element} dom		Element with attributes to diff `attrs` against
+ *	@param {Object} attrs		The desired end-state key-value attribute pairs
+ *	@param {Object} old			Current/previous attributes (from previous VNode or element's prop cache)
+ */
+function diffAttributes(dom, attrs, old) {
+	var name;
+
+	// remove attributes no longer present on the vnode by setting them to undefined
+	for (name in old) {
+		if (!(attrs && attrs[name] != null) && old[name] != null) {
+			setAccessor(dom, name, old[name], old[name] = undefined, isSvgMode);
+		}
+	}
+
+	// add new & update changed attributes
+	for (name in attrs) {
+		if (name !== 'children' && name !== 'innerHTML' && (!(name in old) || attrs[name] !== (name === 'value' || name === 'checked' ? dom[name] : old[name]))) {
+			setAccessor(dom, name, old[name], old[name] = attrs[name], isSvgMode);
+		}
+	}
+}
+
+/** Retains a pool of Components for re-use, keyed on component name.
+ *	Note: since component names are not unique or even necessarily available, these are primarily a form of sharding.
+ *	@private
+ */
+var components = {};
+
+/** Reclaim a component for later re-use by the recycler. */
+function collectComponent(component) {
+	var name = component.constructor.name;
+	(components[name] || (components[name] = [])).push(component);
+}
+
+/** Create a component. Normalizes differences between PFC's and classful Components. */
+function createComponent(Ctor, props, context) {
+	var list = components[Ctor.name],
+	    inst;
+
+	if (Ctor.prototype && Ctor.prototype.render) {
+		inst = new Ctor(props, context);
+		Component.call(inst, props, context);
+	} else {
+		inst = new Component(props, context);
+		inst.constructor = Ctor;
+		inst.render = doRender;
+	}
+
+	if (list) {
+		for (var i = list.length; i--;) {
+			if (list[i].constructor === Ctor) {
+				inst.nextBase = list[i].nextBase;
+				list.splice(i, 1);
+				break;
+			}
+		}
+	}
+	return inst;
+}
+
+/** The `.render()` method for a PFC backing instance. */
+function doRender(props, state, context) {
+	return this.constructor(props, context);
+}
+
+/** Set a component's `props` (generally derived from JSX attributes).
+ *	@param {Object} props
+ *	@param {Object} [opts]
+ *	@param {boolean} [opts.renderSync=false]	If `true` and {@link options.syncComponentUpdates} is `true`, triggers synchronous rendering.
+ *	@param {boolean} [opts.render=true]			If `false`, no render will be triggered.
+ */
+function setComponentProps(component, props, opts, context, mountAll) {
+	if (component._disable) return;
+	component._disable = true;
+
+	if (component.__ref = props.ref) delete props.ref;
+	if (component.__key = props.key) delete props.key;
+
+	if (!component.base || mountAll) {
+		if (component.componentWillMount) component.componentWillMount();
+	} else if (component.componentWillReceiveProps) {
+		component.componentWillReceiveProps(props, context);
+	}
+
+	if (context && context !== component.context) {
+		if (!component.prevContext) component.prevContext = component.context;
+		component.context = context;
+	}
+
+	if (!component.prevProps) component.prevProps = component.props;
+	component.props = props;
+
+	component._disable = false;
+
+	if (opts !== 0) {
+		if (opts === 1 || options.syncComponentUpdates !== false || !component.base) {
+			renderComponent(component, 1, mountAll);
+		} else {
+			enqueueRender(component);
+		}
+	}
+
+	if (component.__ref) component.__ref(component);
+}
+
+/** Render a Component, triggering necessary lifecycle events and taking High-Order Components into account.
+ *	@param {Component} component
+ *	@param {Object} [opts]
+ *	@param {boolean} [opts.build=false]		If `true`, component will build and store a DOM node if not already associated with one.
+ *	@private
+ */
+function renderComponent(component, opts, mountAll, isChild) {
+	if (component._disable) return;
+
+	var props = component.props,
+	    state = component.state,
+	    context = component.context,
+	    previousProps = component.prevProps || props,
+	    previousState = component.prevState || state,
+	    previousContext = component.prevContext || context,
+	    isUpdate = component.base,
+	    nextBase = component.nextBase,
+	    initialBase = isUpdate || nextBase,
+	    initialChildComponent = component._component,
+	    skip = false,
+	    rendered,
+	    inst,
+	    cbase;
+
+	// if updating
+	if (isUpdate) {
+		component.props = previousProps;
+		component.state = previousState;
+		component.context = previousContext;
+		if (opts !== 2 && component.shouldComponentUpdate && component.shouldComponentUpdate(props, state, context) === false) {
+			skip = true;
+		} else if (component.componentWillUpdate) {
+			component.componentWillUpdate(props, state, context);
+		}
+		component.props = props;
+		component.state = state;
+		component.context = context;
+	}
+
+	component.prevProps = component.prevState = component.prevContext = component.nextBase = null;
+	component._dirty = false;
+
+	if (!skip) {
+		rendered = component.render(props, state, context);
+
+		// context to pass to the child, can be updated via (grand-)parent component
+		if (component.getChildContext) {
+			context = extend(extend({}, context), component.getChildContext());
+		}
+
+		var childComponent = rendered && rendered.nodeName,
+		    toUnmount,
+		    base;
+
+		if (typeof childComponent === 'function') {
+			// set up high order component link
+
+			var childProps = getNodeProps(rendered);
+			inst = initialChildComponent;
+
+			if (inst && inst.constructor === childComponent && childProps.key == inst.__key) {
+				setComponentProps(inst, childProps, 1, context, false);
+			} else {
+				toUnmount = inst;
+
+				component._component = inst = createComponent(childComponent, childProps, context);
+				inst.nextBase = inst.nextBase || nextBase;
+				inst._parentComponent = component;
+				setComponentProps(inst, childProps, 0, context, false);
+				renderComponent(inst, 1, mountAll, true);
+			}
+
+			base = inst.base;
+		} else {
+			cbase = initialBase;
+
+			// destroy high order component link
+			toUnmount = initialChildComponent;
+			if (toUnmount) {
+				cbase = component._component = null;
+			}
+
+			if (initialBase || opts === 1) {
+				if (cbase) cbase._component = null;
+				base = diff(cbase, rendered, context, mountAll || !isUpdate, initialBase && initialBase.parentNode, true);
+			}
+		}
+
+		if (initialBase && base !== initialBase && inst !== initialChildComponent) {
+			var baseParent = initialBase.parentNode;
+			if (baseParent && base !== baseParent) {
+				baseParent.replaceChild(base, initialBase);
+
+				if (!toUnmount) {
+					initialBase._component = null;
+					recollectNodeTree(initialBase, false);
+				}
+			}
+		}
+
+		if (toUnmount) {
+			unmountComponent(toUnmount);
+		}
+
+		component.base = base;
+		if (base && !isChild) {
+			var componentRef = component,
+			    t = component;
+			while (t = t._parentComponent) {
+				(componentRef = t).base = base;
+			}
+			base._component = componentRef;
+			base._componentConstructor = componentRef.constructor;
+		}
+	}
+
+	if (!isUpdate || mountAll) {
+		mounts.unshift(component);
+	} else if (!skip) {
+		// Ensure that pending componentDidMount() hooks of child components
+		// are called before the componentDidUpdate() hook in the parent.
+		// Note: disabled as it causes duplicate hooks, see https://github.com/developit/preact/issues/750
+		// flushMounts();
+
+		if (component.componentDidUpdate) {
+			component.componentDidUpdate(previousProps, previousState, previousContext);
+		}
+		if (options.afterUpdate) options.afterUpdate(component);
+	}
+
+	if (component._renderCallbacks != null) {
+		while (component._renderCallbacks.length) {
+			component._renderCallbacks.pop().call(component);
+		}
+	}
+
+	if (!diffLevel && !isChild) flushMounts();
+}
+
+/** Apply the Component referenced by a VNode to the DOM.
+ *	@param {Element} dom	The DOM node to mutate
+ *	@param {VNode} vnode	A Component-referencing VNode
+ *	@returns {Element} dom	The created/mutated element
+ *	@private
+ */
+function buildComponentFromVNode(dom, vnode, context, mountAll) {
+	var c = dom && dom._component,
+	    originalComponent = c,
+	    oldDom = dom,
+	    isDirectOwner = c && dom._componentConstructor === vnode.nodeName,
+	    isOwner = isDirectOwner,
+	    props = getNodeProps(vnode);
+	while (c && !isOwner && (c = c._parentComponent)) {
+		isOwner = c.constructor === vnode.nodeName;
+	}
+
+	if (c && isOwner && (!mountAll || c._component)) {
+		setComponentProps(c, props, 3, context, mountAll);
+		dom = c.base;
+	} else {
+		if (originalComponent && !isDirectOwner) {
+			unmountComponent(originalComponent);
+			dom = oldDom = null;
+		}
+
+		c = createComponent(vnode.nodeName, props, context);
+		if (dom && !c.nextBase) {
+			c.nextBase = dom;
+			// passing dom/oldDom as nextBase will recycle it if unused, so bypass recycling on L229:
+			oldDom = null;
+		}
+		setComponentProps(c, props, 1, context, mountAll);
+		dom = c.base;
+
+		if (oldDom && dom !== oldDom) {
+			oldDom._component = null;
+			recollectNodeTree(oldDom, false);
+		}
+	}
+
+	return dom;
+}
+
+/** Remove a component from the DOM and recycle it.
+ *	@param {Component} component	The Component instance to unmount
+ *	@private
+ */
+function unmountComponent(component) {
+	if (options.beforeUnmount) options.beforeUnmount(component);
+
+	var base = component.base;
+
+	component._disable = true;
+
+	if (component.componentWillUnmount) component.componentWillUnmount();
+
+	component.base = null;
+
+	// recursively tear down & recollect high-order component children:
+	var inner = component._component;
+	if (inner) {
+		unmountComponent(inner);
+	} else if (base) {
+		if (base['__preactattr_'] && base['__preactattr_'].ref) base['__preactattr_'].ref(null);
+
+		component.nextBase = base;
+
+		removeNode(base);
+		collectComponent(component);
+
+		removeChildren(base);
+	}
+
+	if (component.__ref) component.__ref(null);
+}
+
+/** Base Component class.
+ *	Provides `setState()` and `forceUpdate()`, which trigger rendering.
+ *	@public
+ *
+ *	@example
+ *	class MyFoo extends Component {
+ *		render(props, state) {
+ *			return <div />;
+ *		}
+ *	}
+ */
+function Component(props, context) {
+	this._dirty = true;
+
+	/** @public
+  *	@type {object}
+  */
+	this.context = context;
+
+	/** @public
+  *	@type {object}
+  */
+	this.props = props;
+
+	/** @public
+  *	@type {object}
+  */
+	this.state = this.state || {};
+}
+
+extend(Component.prototype, {
+
+	/** Returns a `boolean` indicating if the component should re-render when receiving the given `props` and `state`.
+  *	@param {object} nextProps
+  *	@param {object} nextState
+  *	@param {object} nextContext
+  *	@returns {Boolean} should the component re-render
+  *	@name shouldComponentUpdate
+  *	@function
+  */
+
+	/** Update component state by copying properties from `state` to `this.state`.
+  *	@param {object} state		A hash of state properties to update with new values
+  *	@param {function} callback	A function to be called once component state is updated
+  */
+	setState: function setState(state, callback) {
+		var s = this.state;
+		if (!this.prevState) this.prevState = extend({}, s);
+		extend(s, typeof state === 'function' ? state(s, this.props) : state);
+		if (callback) (this._renderCallbacks = this._renderCallbacks || []).push(callback);
+		enqueueRender(this);
+	},
+
+
+	/** Immediately perform a synchronous re-render of the component.
+  *	@param {function} callback		A function to be called after component is re-rendered.
+  *	@private
+  */
+	forceUpdate: function forceUpdate(callback) {
+		if (callback) (this._renderCallbacks = this._renderCallbacks || []).push(callback);
+		renderComponent(this, 2);
+	},
+
+
+	/** Accepts `props` and `state`, and returns a new Virtual DOM tree to build.
+  *	Virtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).
+  *	@param {object} props		Props (eg: JSX attributes) received from parent element/component
+  *	@param {object} state		The component's current state
+  *	@param {object} context		Context object (if a parent component has provided context)
+  *	@returns VNode
+  */
+	render: function render() {}
+});
+
+/** Render JSX into a `parent` Element.
+ *	@param {VNode} vnode		A (JSX) VNode to render
+ *	@param {Element} parent		DOM element to render into
+ *	@param {Element} [merge]	Attempt to re-use an existing DOM tree rooted at `merge`
+ *	@public
+ *
+ *	@example
+ *	// render a div into <body>:
+ *	render(<div id="hello">hello!</div>, document.body);
+ *
+ *	@example
+ *	// render a "Thing" component into #foo:
+ *	const Thing = ({ name }) => <span>{ name }</span>;
+ *	render(<Thing name="one" />, document.querySelector('#foo'));
+ */
+function render(vnode, parent, merge) {
+  return diff(merge, vnode, {}, false, parent, false);
+}
+
+var preact = {
+	h: h,
+	createElement: h,
+	cloneElement: cloneElement,
+	Component: Component,
+	render: render,
+	rerender: rerender,
+	options: options
+};
+
+/* harmony default export */ __webpack_exports__["default"] = (preact);
+
+//# sourceMappingURL=preact.esm.js.map
+
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/es/components/Provider.js":
+/*!************************************************************!*\
+  !*** ./node_modules/react-redux/es/components/Provider.js ***!
+  \************************************************************/
+/*! exports provided: createProvider, default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createProvider", function() { return createProvider; });
+/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/preact-compat/dist/preact-compat.es.js");
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/react-redux/node_modules/prop-types/index.js");
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
+/* harmony import */ var _utils_PropTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/PropTypes */ "./node_modules/react-redux/es/utils/PropTypes.js");
+/* harmony import */ var _utils_warning__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/warning */ "./node_modules/react-redux/es/utils/warning.js");
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+
+
+
+
+
+var didWarnAboutReceivingStore = false;
+function warnAboutReceivingStore() {
+  if (didWarnAboutReceivingStore) {
+    return;
+  }
+  didWarnAboutReceivingStore = true;
+
+  Object(_utils_warning__WEBPACK_IMPORTED_MODULE_3__["default"])('<Provider> does not support changing `store` on the fly. ' + 'It is most likely that you see this error because you updated to ' + 'Redux 2.x and React Redux 2.x which no longer hot reload reducers ' + 'automatically. See https://github.com/reactjs/react-redux/releases/' + 'tag/v2.0.0 for the migration instructions.');
+}
+
+function createProvider() {
+  var _Provider$childContex;
+
+  var storeKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'store';
+  var subKey = arguments[1];
+
+  var subscriptionKey = subKey || storeKey + 'Subscription';
+
+  var Provider = function (_Component) {
+    _inherits(Provider, _Component);
+
+    Provider.prototype.getChildContext = function getChildContext() {
+      var _ref;
+
+      return _ref = {}, _ref[storeKey] = this[storeKey], _ref[subscriptionKey] = null, _ref;
+    };
+
+    function Provider(props, context) {
+      _classCallCheck(this, Provider);
+
+      var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));
+
+      _this[storeKey] = props.store;
+      return _this;
+    }
+
+    Provider.prototype.render = function render() {
+      return react__WEBPACK_IMPORTED_MODULE_0__["Children"].only(this.props.children);
+    };
+
+    return Provider;
+  }(react__WEBPACK_IMPORTED_MODULE_0__["Component"]);
+
+  if (true) {
+    Provider.prototype.componentWillReceiveProps = function (nextProps) {
+      if (this[storeKey] !== nextProps.store) {
+        warnAboutReceivingStore();
+      }
+    };
+  }
+
+  Provider.propTypes = {
+    store: _utils_PropTypes__WEBPACK_IMPORTED_MODULE_2__["storeShape"].isRequired,
+    children: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.element.isRequired
+  };
+  Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[storeKey] = _utils_PropTypes__WEBPACK_IMPORTED_MODULE_2__["storeShape"].isRequired, _Provider$childContex[subscriptionKey] = _utils_PropTypes__WEBPACK_IMPORTED_MODULE_2__["subscriptionShape"], _Provider$childContex);
+
+  return Provider;
+}
+
+/* harmony default export */ __webpack_exports__["default"] = (createProvider());
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/es/components/connectAdvanced.js":
+/*!*******************************************************************!*\
+  !*** ./node_modules/react-redux/es/components/connectAdvanced.js ***!
+  \*******************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return connectAdvanced; });
+/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! hoist-non-react-statics */ "./node_modules/react-redux/node_modules/hoist-non-react-statics/index.js");
+/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! invariant */ "./node_modules/react-redux/node_modules/invariant/browser.js");
+/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(invariant__WEBPACK_IMPORTED_MODULE_1__);
+/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "./node_modules/preact-compat/dist/preact-compat.es.js");
+/* harmony import */ var _utils_Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/Subscription */ "./node_modules/react-redux/es/utils/Subscription.js");
+/* harmony import */ var _utils_PropTypes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/PropTypes */ "./node_modules/react-redux/es/utils/PropTypes.js");
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+
+
+
+
+
+
+
+
+var hotReloadingVersion = 0;
+var dummyState = {};
+function noop() {}
+function makeSelectorStateful(sourceSelector, store) {
+  // wrap the selector in an object that tracks its results between runs.
+  var selector = {
+    run: function runComponentSelector(props) {
+      try {
+        var nextProps = sourceSelector(store.getState(), props);
+        if (nextProps !== selector.props || selector.error) {
+          selector.shouldComponentUpdate = true;
+          selector.props = nextProps;
+          selector.error = null;
+        }
+      } catch (error) {
+        selector.shouldComponentUpdate = true;
+        selector.error = error;
+      }
+    }
+  };
+
+  return selector;
+}
+
+function connectAdvanced(
+/*
+  selectorFactory is a func that is responsible for returning the selector function used to
+  compute new props from state, props, and dispatch. For example:
+     export default connectAdvanced((dispatch, options) => (state, props) => ({
+      thing: state.things[props.thingId],
+      saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)),
+    }))(YourComponent)
+   Access to dispatch is provided to the factory so selectorFactories can bind actionCreators
+  outside of their selector as an optimization. Options passed to connectAdvanced are passed to
+  the selectorFactory, along with displayName and WrappedComponent, as the second argument.
+   Note that selectorFactory is responsible for all caching/memoization of inbound and outbound
+  props. Do not use connectAdvanced directly without memoizing results between calls to your
+  selector, otherwise the Connect component will re-render on every state or props change.
+*/
+selectorFactory) {
+  var _contextTypes, _childContextTypes;
+
+  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
+      _ref$getDisplayName = _ref.getDisplayName,
+      getDisplayName = _ref$getDisplayName === undefined ? function (name) {
+    return 'ConnectAdvanced(' + name + ')';
+  } : _ref$getDisplayName,
+      _ref$methodName = _ref.methodName,
+      methodName = _ref$methodName === undefined ? 'connectAdvanced' : _ref$methodName,
+      _ref$renderCountProp = _ref.renderCountProp,
+      renderCountProp = _ref$renderCountProp === undefined ? undefined : _ref$renderCountProp,
+      _ref$shouldHandleStat = _ref.shouldHandleStateChanges,
+      shouldHandleStateChanges = _ref$shouldHandleStat === undefined ? true : _ref$shouldHandleStat,
+      _ref$storeKey = _ref.storeKey,
+      storeKey = _ref$storeKey === undefined ? 'store' : _ref$storeKey,
+      _ref$withRef = _ref.withRef,
+      withRef = _ref$withRef === undefined ? false : _ref$withRef,
+      connectOptions = _objectWithoutProperties(_ref, ['getDisplayName', 'methodName', 'renderCountProp', 'shouldHandleStateChanges', 'storeKey', 'withRef']);
+
+  var subscriptionKey = storeKey + 'Subscription';
+  var version = hotReloadingVersion++;
+
+  var contextTypes = (_contextTypes = {}, _contextTypes[storeKey] = _utils_PropTypes__WEBPACK_IMPORTED_MODULE_4__["storeShape"], _contextTypes[subscriptionKey] = _utils_PropTypes__WEBPACK_IMPORTED_MODULE_4__["subscriptionShape"], _contextTypes);
+  var childContextTypes = (_childContextTypes = {}, _childContextTypes[subscriptionKey] = _utils_PropTypes__WEBPACK_IMPORTED_MODULE_4__["subscriptionShape"], _childContextTypes);
+
+  return function wrapWithConnect(WrappedComponent) {
+    invariant__WEBPACK_IMPORTED_MODULE_1___default()(typeof WrappedComponent == 'function', 'You must pass a component to the function returned by ' + (methodName + '. Instead received ' + JSON.stringify(WrappedComponent)));
+
+    var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';
+
+    var displayName = getDisplayName(wrappedComponentName);
+
+    var selectorFactoryOptions = _extends({}, connectOptions, {
+      getDisplayName: getDisplayName,
+      methodName: methodName,
+      renderCountProp: renderCountProp,
+      shouldHandleStateChanges: shouldHandleStateChanges,
+      storeKey: storeKey,
+      withRef: withRef,
+      displayName: displayName,
+      wrappedComponentName: wrappedComponentName,
+      WrappedComponent: WrappedComponent
+    });
+
+    var Connect = function (_Component) {
+      _inherits(Connect, _Component);
+
+      function Connect(props, context) {
+        _classCallCheck(this, Connect);
+
+        var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));
+
+        _this.version = version;
+        _this.state = {};
+        _this.renderCount = 0;
+        _this.store = props[storeKey] || context[storeKey];
+        _this.propsMode = Boolean(props[storeKey]);
+        _this.setWrappedInstance = _this.setWrappedInstance.bind(_this);
+
+        invariant__WEBPACK_IMPORTED_MODULE_1___default()(_this.store, 'Could not find "' + storeKey + '" in either the context or props of ' + ('"' + displayName + '". Either wrap the root component in a <Provider>, ') + ('or explicitly pass "' + storeKey + '" as a prop to "' + displayName + '".'));
+
+        _this.initSelector();
+        _this.initSubscription();
+        return _this;
+      }
+
+      Connect.prototype.getChildContext = function getChildContext() {
+        var _ref2;
+
+        // If this component received store from props, its subscription should be transparent
+        // to any descendants receiving store+subscription from context; it passes along
+        // subscription passed to it. Otherwise, it shadows the parent subscription, which allows
+        // Connect to control ordering of notifications to flow top-down.
+        var subscription = this.propsMode ? null : this.subscription;
+        return _ref2 = {}, _ref2[subscriptionKey] = subscription || this.context[subscriptionKey], _ref2;
+      };
+
+      Connect.prototype.componentDidMount = function componentDidMount() {
+        if (!shouldHandleStateChanges) return;
+
+        // componentWillMount fires during server side rendering, but componentDidMount and
+        // componentWillUnmount do not. Because of this, trySubscribe happens during ...didMount.
+        // Otherwise, unsubscription would never take place during SSR, causing a memory leak.
+        // To handle the case where a child component may have triggered a state change by
+        // dispatching an action in its componentWillMount, we have to re-run the select and maybe
+        // re-render.
+        this.subscription.trySubscribe();
+        this.selector.run(this.props);
+        if (this.selector.shouldComponentUpdate) this.forceUpdate();
+      };
+
+      Connect.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
+        this.selector.run(nextProps);
+      };
+
+      Connect.prototype.shouldComponentUpdate = function shouldComponentUpdate() {
+        return this.selector.shouldComponentUpdate;
+      };
+
+      Connect.prototype.componentWillUnmount = function componentWillUnmount() {
+        if (this.subscription) this.subscription.tryUnsubscribe();
+        this.subscription = null;
+        this.notifyNestedSubs = noop;
+        this.store = null;
+        this.selector.run = noop;
+        this.selector.shouldComponentUpdate = false;
+      };
+
+      Connect.prototype.getWrappedInstance = function getWrappedInstance() {
+        invariant__WEBPACK_IMPORTED_MODULE_1___default()(withRef, 'To access the wrapped instance, you need to specify ' + ('{ withRef: true } in the options argument of the ' + methodName + '() call.'));
+        return this.wrappedInstance;
+      };
+
+      Connect.prototype.setWrappedInstance = function setWrappedInstance(ref) {
+        this.wrappedInstance = ref;
+      };
+
+      Connect.prototype.initSelector = function initSelector() {
+        var sourceSelector = selectorFactory(this.store.dispatch, selectorFactoryOptions);
+        this.selector = makeSelectorStateful(sourceSelector, this.store);
+        this.selector.run(this.props);
+      };
+
+      Connect.prototype.initSubscription = function initSubscription() {
+        if (!shouldHandleStateChanges) return;
+
+        // parentSub's source should match where store came from: props vs. context. A component
+        // connected to the store via props shouldn't use subscription from context, or vice versa.
+        var parentSub = (this.propsMode ? this.props : this.context)[subscriptionKey];
+        this.subscription = new _utils_Subscription__WEBPACK_IMPORTED_MODULE_3__["default"](this.store, parentSub, this.onStateChange.bind(this));
+
+        // `notifyNestedSubs` is duplicated to handle the case where the component is  unmounted in
+        // the middle of the notification loop, where `this.subscription` will then be null. An
+        // extra null check every change can be avoided by copying the method onto `this` and then
+        // replacing it with a no-op on unmount. This can probably be avoided if Subscription's
+        // listeners logic is changed to not call listeners that have been unsubscribed in the
+        // middle of the notification loop.
+        this.notifyNestedSubs = this.subscription.notifyNestedSubs.bind(this.subscription);
+      };
+
+      Connect.prototype.onStateChange = function onStateChange() {
+        this.selector.run(this.props);
+
+        if (!this.selector.shouldComponentUpdate) {
+          this.notifyNestedSubs();
+        } else {
+          this.componentDidUpdate = this.notifyNestedSubsOnComponentDidUpdate;
+          this.setState(dummyState);
+        }
+      };
+
+      Connect.prototype.notifyNestedSubsOnComponentDidUpdate = function notifyNestedSubsOnComponentDidUpdate() {
+        // `componentDidUpdate` is conditionally implemented when `onStateChange` determines it
+        // needs to notify nested subs. Once called, it unimplements itself until further state
+        // changes occur. Doing it this way vs having a permanent `componentDidUpdate` that does
+        // a boolean check every time avoids an extra method call most of the time, resulting
+        // in some perf boost.
+        this.componentDidUpdate = undefined;
+        this.notifyNestedSubs();
+      };
+
+      Connect.prototype.isSubscribed = function isSubscribed() {
+        return Boolean(this.subscription) && this.subscription.isSubscribed();
+      };
+
+      Connect.prototype.addExtraProps = function addExtraProps(props) {
+        if (!withRef && !renderCountProp && !(this.propsMode && this.subscription)) return props;
+        // make a shallow copy so that fields added don't leak to the original selector.
+        // this is especially important for 'ref' since that's a reference back to the component
+        // instance. a singleton memoized selector would then be holding a reference to the
+        // instance, preventing the instance from being garbage collected, and that would be bad
+        var withExtras = _extends({}, props);
+        if (withRef) withExtras.ref = this.setWrappedInstance;
+        if (renderCountProp) withExtras[renderCountProp] = this.renderCount++;
+        if (this.propsMode && this.subscription) withExtras[subscriptionKey] = this.subscription;
+        return withExtras;
+      };
+
+      Connect.prototype.render = function render() {
+        var selector = this.selector;
+        selector.shouldComponentUpdate = false;
+
+        if (selector.error) {
+          throw selector.error;
+        } else {
+          return Object(react__WEBPACK_IMPORTED_MODULE_2__["createElement"])(WrappedComponent, this.addExtraProps(selector.props));
+        }
+      };
+
+      return Connect;
+    }(react__WEBPACK_IMPORTED_MODULE_2__["Component"]);
+
+    Connect.WrappedComponent = WrappedComponent;
+    Connect.displayName = displayName;
+    Connect.childContextTypes = childContextTypes;
+    Connect.contextTypes = contextTypes;
+    Connect.propTypes = contextTypes;
+
+    if (true) {
+      Connect.prototype.componentWillUpdate = function componentWillUpdate() {
+        var _this2 = this;
+
+        // We are hot reloading!
+        if (this.version !== version) {
+          this.version = version;
+          this.initSelector();
+
+          // If any connected descendants don't hot reload (and resubscribe in the process), their
+          // listeners will be lost when we unsubscribe. Unfortunately, by copying over all
+          // listeners, this does mean that the old versions of connected descendants will still be
+          // notified of state changes; however, their onStateChange function is a no-op so this
+          // isn't a huge deal.
+          var oldListeners = [];
+
+          if (this.subscription) {
+            oldListeners = this.subscription.listeners.get();
+            this.subscription.tryUnsubscribe();
+          }
+          this.initSubscription();
+          if (shouldHandleStateChanges) {
+            this.subscription.trySubscribe();
+            oldListeners.forEach(function (listener) {
+              return _this2.subscription.listeners.subscribe(listener);
+            });
+          }
+        }
+      };
+    }
+
+    return hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_0___default()(Connect, WrappedComponent);
+  };
+}
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/es/connect/connect.js":
+/*!********************************************************!*\
+  !*** ./node_modules/react-redux/es/connect/connect.js ***!
+  \********************************************************/
+/*! exports provided: createConnect, default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createConnect", function() { return createConnect; });
+/* harmony import */ var _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../components/connectAdvanced */ "./node_modules/react-redux/es/components/connectAdvanced.js");
+/* harmony import */ var _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/shallowEqual */ "./node_modules/react-redux/es/utils/shallowEqual.js");
+/* harmony import */ var _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mapDispatchToProps */ "./node_modules/react-redux/es/connect/mapDispatchToProps.js");
+/* harmony import */ var _mapStateToProps__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./mapStateToProps */ "./node_modules/react-redux/es/connect/mapStateToProps.js");
+/* harmony import */ var _mergeProps__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mergeProps */ "./node_modules/react-redux/es/connect/mergeProps.js");
+/* harmony import */ var _selectorFactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./selectorFactory */ "./node_modules/react-redux/es/connect/selectorFactory.js");
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+
+
+
+
+
+
+
+
+/*
+  connect is a facade over connectAdvanced. It turns its args into a compatible
+  selectorFactory, which has the signature:
+
+    (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps
+  
+  connect passes its args to connectAdvanced as options, which will in turn pass them to
+  selectorFactory each time a Connect component instance is instantiated or hot reloaded.
+
+  selectorFactory returns a final props selector from its mapStateToProps,
+  mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps,
+  mergePropsFactories, and pure args.
+
+  The resulting final props selector is called by the Connect component instance whenever
+  it receives new props or store state.
+ */
+
+function match(arg, factories, name) {
+  for (var i = factories.length - 1; i >= 0; i--) {
+    var result = factories[i](arg);
+    if (result) return result;
+  }
+
+  return function (dispatch, options) {
+    throw new Error('Invalid value of type ' + typeof arg + ' for ' + name + ' argument when connecting component ' + options.wrappedComponentName + '.');
+  };
+}
+
+function strictEqual(a, b) {
+  return a === b;
+}
+
+// createConnect with default args builds the 'official' connect behavior. Calling it with
+// different options opens up some testing and extensibility scenarios
+function createConnect() {
+  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
+      _ref$connectHOC = _ref.connectHOC,
+      connectHOC = _ref$connectHOC === undefined ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_0__["default"] : _ref$connectHOC,
+      _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,
+      mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_3__["default"] : _ref$mapStateToPropsF,
+      _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,
+      mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_2__["default"] : _ref$mapDispatchToPro,
+      _ref$mergePropsFactor = _ref.mergePropsFactories,
+      mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps__WEBPACK_IMPORTED_MODULE_4__["default"] : _ref$mergePropsFactor,
+      _ref$selectorFactory = _ref.selectorFactory,
+      selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory__WEBPACK_IMPORTED_MODULE_5__["default"] : _ref$selectorFactory;
+
+  return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {
+    var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},
+        _ref2$pure = _ref2.pure,
+        pure = _ref2$pure === undefined ? true : _ref2$pure,
+        _ref2$areStatesEqual = _ref2.areStatesEqual,
+        areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,
+        _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,
+        areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__["default"] : _ref2$areOwnPropsEqua,
+        _ref2$areStatePropsEq = _ref2.areStatePropsEqual,
+        areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__["default"] : _ref2$areStatePropsEq,
+        _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,
+        areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__["default"] : _ref2$areMergedPropsE,
+        extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);
+
+    var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');
+    var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');
+    var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');
+
+    return connectHOC(selectorFactory, _extends({
+      // used in error messages
+      methodName: 'connect',
+
+      // used to compute Connect's displayName from the wrapped component's displayName.
+      getDisplayName: function getDisplayName(name) {
+        return 'Connect(' + name + ')';
+      },
+
+      // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes
+      shouldHandleStateChanges: Boolean(mapStateToProps),
+
+      // passed through to selectorFactory
+      initMapStateToProps: initMapStateToProps,
+      initMapDispatchToProps: initMapDispatchToProps,
+      initMergeProps: initMergeProps,
+      pure: pure,
+      areStatesEqual: areStatesEqual,
+      areOwnPropsEqual: areOwnPropsEqual,
+      areStatePropsEqual: areStatePropsEqual,
+      areMergedPropsEqual: areMergedPropsEqual
+
+    }, extraOptions));
+  };
+}
+
+/* harmony default export */ __webpack_exports__["default"] = (createConnect());
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/es/connect/mapDispatchToProps.js":
+/*!*******************************************************************!*\
+  !*** ./node_modules/react-redux/es/connect/mapDispatchToProps.js ***!
+  \*******************************************************************/
+/*! exports provided: whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject, default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whenMapDispatchToPropsIsFunction", function() { return whenMapDispatchToPropsIsFunction; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whenMapDispatchToPropsIsMissing", function() { return whenMapDispatchToPropsIsMissing; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whenMapDispatchToPropsIsObject", function() { return whenMapDispatchToPropsIsObject; });
+/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+/* harmony import */ var _wrapMapToProps__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./wrapMapToProps */ "./node_modules/react-redux/es/connect/wrapMapToProps.js");
+
+
+
+function whenMapDispatchToPropsIsFunction(mapDispatchToProps) {
+  return typeof mapDispatchToProps === 'function' ? Object(_wrapMapToProps__WEBPACK_IMPORTED_MODULE_1__["wrapMapToPropsFunc"])(mapDispatchToProps, 'mapDispatchToProps') : undefined;
+}
+
+function whenMapDispatchToPropsIsMissing(mapDispatchToProps) {
+  return !mapDispatchToProps ? Object(_wrapMapToProps__WEBPACK_IMPORTED_MODULE_1__["wrapMapToPropsConstant"])(function (dispatch) {
+    return { dispatch: dispatch };
+  }) : undefined;
+}
+
+function whenMapDispatchToPropsIsObject(mapDispatchToProps) {
+  return mapDispatchToProps && typeof mapDispatchToProps === 'object' ? Object(_wrapMapToProps__WEBPACK_IMPORTED_MODULE_1__["wrapMapToPropsConstant"])(function (dispatch) {
+    return Object(redux__WEBPACK_IMPORTED_MODULE_0__["bindActionCreators"])(mapDispatchToProps, dispatch);
+  }) : undefined;
+}
+
+/* harmony default export */ __webpack_exports__["default"] = ([whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject]);
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/es/connect/mapStateToProps.js":
+/*!****************************************************************!*\
+  !*** ./node_modules/react-redux/es/connect/mapStateToProps.js ***!
+  \****************************************************************/
+/*! exports provided: whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing, default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whenMapStateToPropsIsFunction", function() { return whenMapStateToPropsIsFunction; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whenMapStateToPropsIsMissing", function() { return whenMapStateToPropsIsMissing; });
+/* harmony import */ var _wrapMapToProps__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./wrapMapToProps */ "./node_modules/react-redux/es/connect/wrapMapToProps.js");
+
+
+function whenMapStateToPropsIsFunction(mapStateToProps) {
+  return typeof mapStateToProps === 'function' ? Object(_wrapMapToProps__WEBPACK_IMPORTED_MODULE_0__["wrapMapToPropsFunc"])(mapStateToProps, 'mapStateToProps') : undefined;
+}
+
+function whenMapStateToPropsIsMissing(mapStateToProps) {
+  return !mapStateToProps ? Object(_wrapMapToProps__WEBPACK_IMPORTED_MODULE_0__["wrapMapToPropsConstant"])(function () {
+    return {};
+  }) : undefined;
+}
+
+/* harmony default export */ __webpack_exports__["default"] = ([whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing]);
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/es/connect/mergeProps.js":
+/*!***********************************************************!*\
+  !*** ./node_modules/react-redux/es/connect/mergeProps.js ***!
+  \***********************************************************/
+/*! exports provided: defaultMergeProps, wrapMergePropsFunc, whenMergePropsIsFunction, whenMergePropsIsOmitted, default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultMergeProps", function() { return defaultMergeProps; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapMergePropsFunc", function() { return wrapMergePropsFunc; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whenMergePropsIsFunction", function() { return whenMergePropsIsFunction; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whenMergePropsIsOmitted", function() { return whenMergePropsIsOmitted; });
+/* harmony import */ var _utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/verifyPlainObject */ "./node_modules/react-redux/es/utils/verifyPlainObject.js");
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+
+
+function defaultMergeProps(stateProps, dispatchProps, ownProps) {
+  return _extends({}, ownProps, stateProps, dispatchProps);
+}
+
+function wrapMergePropsFunc(mergeProps) {
+  return function initMergePropsProxy(dispatch, _ref) {
+    var displayName = _ref.displayName,
+        pure = _ref.pure,
+        areMergedPropsEqual = _ref.areMergedPropsEqual;
+
+    var hasRunOnce = false;
+    var mergedProps = void 0;
+
+    return function mergePropsProxy(stateProps, dispatchProps, ownProps) {
+      var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps);
+
+      if (hasRunOnce) {
+        if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps;
+      } else {
+        hasRunOnce = true;
+        mergedProps = nextMergedProps;
+
+        if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__["default"])(mergedProps, displayName, 'mergeProps');
+      }
+
+      return mergedProps;
+    };
+  };
+}
+
+function whenMergePropsIsFunction(mergeProps) {
+  return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined;
+}
+
+function whenMergePropsIsOmitted(mergeProps) {
+  return !mergeProps ? function () {
+    return defaultMergeProps;
+  } : undefined;
+}
+
+/* harmony default export */ __webpack_exports__["default"] = ([whenMergePropsIsFunction, whenMergePropsIsOmitted]);
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/es/connect/selectorFactory.js":
+/*!****************************************************************!*\
+  !*** ./node_modules/react-redux/es/connect/selectorFactory.js ***!
+  \****************************************************************/
+/*! exports provided: impureFinalPropsSelectorFactory, pureFinalPropsSelectorFactory, default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "impureFinalPropsSelectorFactory", function() { return impureFinalPropsSelectorFactory; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pureFinalPropsSelectorFactory", function() { return pureFinalPropsSelectorFactory; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return finalPropsSelectorFactory; });
+/* harmony import */ var _verifySubselectors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./verifySubselectors */ "./node_modules/react-redux/es/connect/verifySubselectors.js");
+function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+
+
+
+function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) {
+  return function impureFinalPropsSelector(state, ownProps) {
+    return mergeProps(mapStateToProps(state, ownProps), mapDispatchToProps(dispatch, ownProps), ownProps);
+  };
+}
+
+function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref) {
+  var areStatesEqual = _ref.areStatesEqual,
+      areOwnPropsEqual = _ref.areOwnPropsEqual,
+      areStatePropsEqual = _ref.areStatePropsEqual;
+
+  var hasRunAtLeastOnce = false;
+  var state = void 0;
+  var ownProps = void 0;
+  var stateProps = void 0;
+  var dispatchProps = void 0;
+  var mergedProps = void 0;
+
+  function handleFirstCall(firstState, firstOwnProps) {
+    state = firstState;
+    ownProps = firstOwnProps;
+    stateProps = mapStateToProps(state, ownProps);
+    dispatchProps = mapDispatchToProps(dispatch, ownProps);
+    mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
+    hasRunAtLeastOnce = true;
+    return mergedProps;
+  }
+
+  function handleNewPropsAndNewState() {
+    stateProps = mapStateToProps(state, ownProps);
+
+    if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);
+
+    mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
+    return mergedProps;
+  }
+
+  function handleNewProps() {
+    if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps);
+
+    if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);
+
+    mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
+    return mergedProps;
+  }
+
+  function handleNewState() {
+    var nextStateProps = mapStateToProps(state, ownProps);
+    var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps);
+    stateProps = nextStateProps;
+
+    if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
+
+    return mergedProps;
+  }
+
+  function handleSubsequentCalls(nextState, nextOwnProps) {
+    var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps);
+    var stateChanged = !areStatesEqual(nextState, state);
+    state = nextState;
+    ownProps = nextOwnProps;
+
+    if (propsChanged && stateChanged) return handleNewPropsAndNewState();
+    if (propsChanged) return handleNewProps();
+    if (stateChanged) return handleNewState();
+    return mergedProps;
+  }
+
+  return function pureFinalPropsSelector(nextState, nextOwnProps) {
+    return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps);
+  };
+}
+
+// TODO: Add more comments
+
+// If pure is true, the selector returned by selectorFactory will memoize its results,
+// allowing connectAdvanced's shouldComponentUpdate to return false if final
+// props have not changed. If false, the selector will always return a new
+// object and shouldComponentUpdate will always return true.
+
+function finalPropsSelectorFactory(dispatch, _ref2) {
+  var initMapStateToProps = _ref2.initMapStateToProps,
+      initMapDispatchToProps = _ref2.initMapDispatchToProps,
+      initMergeProps = _ref2.initMergeProps,
+      options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);
+
+  var mapStateToProps = initMapStateToProps(dispatch, options);
+  var mapDispatchToProps = initMapDispatchToProps(dispatch, options);
+  var mergeProps = initMergeProps(dispatch, options);
+
+  if (true) {
+    Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_0__["default"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);
+  }
+
+  var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;
+
+  return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);
+}
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/es/connect/verifySubselectors.js":
+/*!*******************************************************************!*\
+  !*** ./node_modules/react-redux/es/connect/verifySubselectors.js ***!
+  \*******************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return verifySubselectors; });
+/* harmony import */ var _utils_warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/warning */ "./node_modules/react-redux/es/utils/warning.js");
+
+
+function verify(selector, methodName, displayName) {
+  if (!selector) {
+    throw new Error('Unexpected value for ' + methodName + ' in ' + displayName + '.');
+  } else if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') {
+    if (!selector.hasOwnProperty('dependsOnOwnProps')) {
+      Object(_utils_warning__WEBPACK_IMPORTED_MODULE_0__["default"])('The selector for ' + methodName + ' of ' + displayName + ' did not specify a value for dependsOnOwnProps.');
+    }
+  }
+}
+
+function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, displayName) {
+  verify(mapStateToProps, 'mapStateToProps', displayName);
+  verify(mapDispatchToProps, 'mapDispatchToProps', displayName);
+  verify(mergeProps, 'mergeProps', displayName);
+}
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/es/connect/wrapMapToProps.js":
+/*!***************************************************************!*\
+  !*** ./node_modules/react-redux/es/connect/wrapMapToProps.js ***!
+  \***************************************************************/
+/*! exports provided: wrapMapToPropsConstant, getDependsOnOwnProps, wrapMapToPropsFunc */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapMapToPropsConstant", function() { return wrapMapToPropsConstant; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDependsOnOwnProps", function() { return getDependsOnOwnProps; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapMapToPropsFunc", function() { return wrapMapToPropsFunc; });
+/* harmony import */ var _utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/verifyPlainObject */ "./node_modules/react-redux/es/utils/verifyPlainObject.js");
+
+
+function wrapMapToPropsConstant(getConstant) {
+  return function initConstantSelector(dispatch, options) {
+    var constant = getConstant(dispatch, options);
+
+    function constantSelector() {
+      return constant;
+    }
+    constantSelector.dependsOnOwnProps = false;
+    return constantSelector;
+  };
+}
+
+// dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args
+// to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine
+// whether mapToProps needs to be invoked when props have changed.
+// 
+// A length of one signals that mapToProps does not depend on props from the parent component.
+// A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and
+// therefore not reporting its length accurately..
+function getDependsOnOwnProps(mapToProps) {
+  return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1;
+}
+
+// Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction,
+// this function wraps mapToProps in a proxy function which does several things:
+// 
+//  * Detects whether the mapToProps function being called depends on props, which
+//    is used by selectorFactory to decide if it should reinvoke on props changes.
+//    
+//  * On first call, handles mapToProps if returns another function, and treats that
+//    new function as the true mapToProps for subsequent calls.
+//    
+//  * On first call, verifies the first result is a plain object, in order to warn
+//    the developer that their mapToProps function is not returning a valid result.
+//    
+function wrapMapToPropsFunc(mapToProps, methodName) {
+  return function initProxySelector(dispatch, _ref) {
+    var displayName = _ref.displayName;
+
+    var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {
+      return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);
+    };
+
+    // allow detectFactoryAndVerify to get ownProps
+    proxy.dependsOnOwnProps = true;
+
+    proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {
+      proxy.mapToProps = mapToProps;
+      proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);
+      var props = proxy(stateOrDispatch, ownProps);
+
+      if (typeof props === 'function') {
+        proxy.mapToProps = props;
+        proxy.dependsOnOwnProps = getDependsOnOwnProps(props);
+        props = proxy(stateOrDispatch, ownProps);
+      }
+
+      if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__["default"])(props, displayName, methodName);
+
+      return props;
+    };
+
+    return proxy;
+  };
+}
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/es/index.js":
+/*!**********************************************!*\
+  !*** ./node_modules/react-redux/es/index.js ***!
+  \**********************************************/
+/*! exports provided: Provider, createProvider, connectAdvanced, connect */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _components_Provider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./components/Provider */ "./node_modules/react-redux/es/components/Provider.js");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Provider", function() { return _components_Provider__WEBPACK_IMPORTED_MODULE_0__["default"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createProvider", function() { return _components_Provider__WEBPACK_IMPORTED_MODULE_0__["createProvider"]; });
+
+/* harmony import */ var _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/connectAdvanced */ "./node_modules/react-redux/es/components/connectAdvanced.js");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "connectAdvanced", function() { return _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_1__["default"]; });
+
+/* harmony import */ var _connect_connect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./connect/connect */ "./node_modules/react-redux/es/connect/connect.js");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "connect", function() { return _connect_connect__WEBPACK_IMPORTED_MODULE_2__["default"]; });
+
+
+
+
+
+
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/es/utils/PropTypes.js":
+/*!********************************************************!*\
+  !*** ./node_modules/react-redux/es/utils/PropTypes.js ***!
+  \********************************************************/
+/*! exports provided: subscriptionShape, storeShape */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscriptionShape", function() { return subscriptionShape; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "storeShape", function() { return storeShape; });
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "./node_modules/react-redux/node_modules/prop-types/index.js");
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);
+
+
+var subscriptionShape = prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({
+  trySubscribe: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.func.isRequired,
+  tryUnsubscribe: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.func.isRequired,
+  notifyNestedSubs: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.func.isRequired,
+  isSubscribed: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.func.isRequired
+});
+
+var storeShape = prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({
+  subscribe: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.func.isRequired,
+  dispatch: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.func.isRequired,
+  getState: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.func.isRequired
+});
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/es/utils/Subscription.js":
+/*!***********************************************************!*\
+  !*** ./node_modules/react-redux/es/utils/Subscription.js ***!
+  \***********************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Subscription; });
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+// encapsulates the subscription logic for connecting a component to the redux store, as
+// well as nesting subscriptions of descendant components, so that we can ensure the
+// ancestor components re-render before descendants
+
+var CLEARED = null;
+var nullListeners = {
+  notify: function notify() {}
+};
+
+function createListenerCollection() {
+  // the current/next pattern is copied from redux's createStore code.
+  // TODO: refactor+expose that code to be reusable here?
+  var current = [];
+  var next = [];
+
+  return {
+    clear: function clear() {
+      next = CLEARED;
+      current = CLEARED;
+    },
+    notify: function notify() {
+      var listeners = current = next;
+      for (var i = 0; i < listeners.length; i++) {
+        listeners[i]();
+      }
+    },
+    get: function get() {
+      return next;
+    },
+    subscribe: function subscribe(listener) {
+      var isSubscribed = true;
+      if (next === current) next = current.slice();
+      next.push(listener);
+
+      return function unsubscribe() {
+        if (!isSubscribed || current === CLEARED) return;
+        isSubscribed = false;
+
+        if (next === current) next = current.slice();
+        next.splice(next.indexOf(listener), 1);
+      };
+    }
+  };
+}
+
+var Subscription = function () {
+  function Subscription(store, parentSub, onStateChange) {
+    _classCallCheck(this, Subscription);
+
+    this.store = store;
+    this.parentSub = parentSub;
+    this.onStateChange = onStateChange;
+    this.unsubscribe = null;
+    this.listeners = nullListeners;
+  }
+
+  Subscription.prototype.addNestedSub = function addNestedSub(listener) {
+    this.trySubscribe();
+    return this.listeners.subscribe(listener);
+  };
+
+  Subscription.prototype.notifyNestedSubs = function notifyNestedSubs() {
+    this.listeners.notify();
+  };
+
+  Subscription.prototype.isSubscribed = function isSubscribed() {
+    return Boolean(this.unsubscribe);
+  };
+
+  Subscription.prototype.trySubscribe = function trySubscribe() {
+    if (!this.unsubscribe) {
+      this.unsubscribe = this.parentSub ? this.parentSub.addNestedSub(this.onStateChange) : this.store.subscribe(this.onStateChange);
+
+      this.listeners = createListenerCollection();
+    }
+  };
+
+  Subscription.prototype.tryUnsubscribe = function tryUnsubscribe() {
+    if (this.unsubscribe) {
+      this.unsubscribe();
+      this.unsubscribe = null;
+      this.listeners.clear();
+      this.listeners = nullListeners;
+    }
+  };
+
+  return Subscription;
+}();
+
+
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/es/utils/shallowEqual.js":
+/*!***********************************************************!*\
+  !*** ./node_modules/react-redux/es/utils/shallowEqual.js ***!
+  \***********************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return shallowEqual; });
+var hasOwn = Object.prototype.hasOwnProperty;
+
+function is(x, y) {
+  if (x === y) {
+    return x !== 0 || y !== 0 || 1 / x === 1 / y;
+  } else {
+    return x !== x && y !== y;
+  }
+}
+
+function shallowEqual(objA, objB) {
+  if (is(objA, objB)) return true;
+
+  if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
+    return false;
+  }
+
+  var keysA = Object.keys(objA);
+  var keysB = Object.keys(objB);
+
+  if (keysA.length !== keysB.length) return false;
+
+  for (var i = 0; i < keysA.length; i++) {
+    if (!hasOwn.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
+      return false;
+    }
+  }
+
+  return true;
+}
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/es/utils/verifyPlainObject.js":
+/*!****************************************************************!*\
+  !*** ./node_modules/react-redux/es/utils/verifyPlainObject.js ***!
+  \****************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return verifyPlainObject; });
+/* harmony import */ var lodash_es_isPlainObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash-es/isPlainObject */ "./node_modules/react-redux/node_modules/lodash-es/isPlainObject.js");
+/* harmony import */ var _warning__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./warning */ "./node_modules/react-redux/es/utils/warning.js");
+
+
+
+function verifyPlainObject(value, displayName, methodName) {
+  if (!Object(lodash_es_isPlainObject__WEBPACK_IMPORTED_MODULE_0__["default"])(value)) {
+    Object(_warning__WEBPACK_IMPORTED_MODULE_1__["default"])(methodName + '() in ' + displayName + ' must return a plain object. Instead received ' + value + '.');
+  }
+}
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/es/utils/warning.js":
+/*!******************************************************!*\
+  !*** ./node_modules/react-redux/es/utils/warning.js ***!
+  \******************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return warning; });
+/**
+ * Prints a warning in the console if it exists.
+ *
+ * @param {String} message The warning message.
+ * @returns {void}
+ */
+function warning(message) {
+  /* eslint-disable no-console */
+  if (typeof console !== 'undefined' && typeof console.error === 'function') {
+    console.error(message);
+  }
+  /* eslint-enable no-console */
+  try {
+    // This error was thrown as a convenience so that if you enable
+    // "break on all exceptions" in your console,
+    // it would pause the execution at this line.
+    throw new Error(message);
+    /* eslint-disable no-empty */
+  } catch (e) {}
+  /* eslint-enable no-empty */
+}
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/node_modules/fbjs/lib/emptyFunction.js":
+/*!*************************************************************************!*\
+  !*** ./node_modules/react-redux/node_modules/fbjs/lib/emptyFunction.js ***!
+  \*************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ * 
+ */
+
+function makeEmptyFunction(arg) {
+  return function () {
+    return arg;
+  };
+}
+
+/**
+ * This function accepts and discards inputs; it has no side effects. This is
+ * primarily useful idiomatically for overridable function endpoints which
+ * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
+ */
+var emptyFunction = function emptyFunction() {};
+
+emptyFunction.thatReturns = makeEmptyFunction;
+emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
+emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
+emptyFunction.thatReturnsNull = makeEmptyFunction(null);
+emptyFunction.thatReturnsThis = function () {
+  return this;
+};
+emptyFunction.thatReturnsArgument = function (arg) {
+  return arg;
+};
+
+module.exports = emptyFunction;
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/node_modules/fbjs/lib/invariant.js":
+/*!*********************************************************************!*\
+  !*** ./node_modules/react-redux/node_modules/fbjs/lib/invariant.js ***!
+  \*********************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+
+
+
+/**
+ * Use invariant() to assert state which your program assumes to be true.
+ *
+ * Provide sprintf-style format (only %s is supported) and arguments
+ * to provide information about what broke and what you were
+ * expecting.
+ *
+ * The invariant message will be stripped in production, but the invariant
+ * will remain to ensure logic does not differ in production.
+ */
+
+var validateFormat = function validateFormat(format) {};
+
+if (true) {
+  validateFormat = function validateFormat(format) {
+    if (format === undefined) {
+      throw new Error('invariant requires an error message argument');
+    }
+  };
+}
+
+function invariant(condition, format, a, b, c, d, e, f) {
+  validateFormat(format);
+
+  if (!condition) {
+    var error;
+    if (format === undefined) {
+      error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
+    } else {
+      var args = [a, b, c, d, e, f];
+      var argIndex = 0;
+      error = new Error(format.replace(/%s/g, function () {
+        return args[argIndex++];
+      }));
+      error.name = 'Invariant Violation';
+    }
+
+    error.framesToPop = 1; // we don't care about invariant's own frame
+    throw error;
+  }
+}
+
+module.exports = invariant;
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/node_modules/fbjs/lib/warning.js":
+/*!*******************************************************************!*\
+  !*** ./node_modules/react-redux/node_modules/fbjs/lib/warning.js ***!
+  \*******************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright (c) 2014-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+
+
+
+var emptyFunction = __webpack_require__(/*! ./emptyFunction */ "./node_modules/react-redux/node_modules/fbjs/lib/emptyFunction.js");
+
+/**
+ * Similar to invariant but only logs a warning if the condition is not met.
+ * This can be used to log issues in development environments in critical
+ * paths. Removing the logging code for production environments will keep the
+ * same logic and follow the same code paths.
+ */
+
+var warning = emptyFunction;
+
+if (true) {
+  var printWarning = function printWarning(format) {
+    for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+      args[_key - 1] = arguments[_key];
+    }
+
+    var argIndex = 0;
+    var message = 'Warning: ' + format.replace(/%s/g, function () {
+      return args[argIndex++];
+    });
+    if (typeof console !== 'undefined') {
+      console.error(message);
+    }
+    try {
+      // --- Welcome to debugging React ---
+      // This error was thrown as a convenience so that you can use this stack
+      // to find the callsite that caused this warning to fire.
+      throw new Error(message);
+    } catch (x) {}
+  };
+
+  warning = function warning(condition, format) {
+    if (format === undefined) {
+      throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
+    }
+
+    if (format.indexOf('Failed Composite propType: ') === 0) {
+      return; // Ignore CompositeComponent proptype check.
+    }
+
+    if (!condition) {
+      for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
+        args[_key2 - 2] = arguments[_key2];
+      }
+
+      printWarning.apply(undefined, [format].concat(args));
+    }
+  };
+}
+
+module.exports = warning;
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/node_modules/hoist-non-react-statics/index.js":
+/*!********************************************************************************!*\
+  !*** ./node_modules/react-redux/node_modules/hoist-non-react-statics/index.js ***!
+  \********************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+/**
+ * Copyright 2015, Yahoo! Inc.
+ * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
+ */
+(function (global, factory) {
+     true ? module.exports = factory() :
+    undefined;
+}(this, (function () {
+    'use strict';
+    
+    var REACT_STATICS = {
+        childContextTypes: true,
+        contextTypes: true,
+        defaultProps: true,
+        displayName: true,
+        getDefaultProps: true,
+        getDerivedStateFromProps: true,
+        mixins: true,
+        propTypes: true,
+        type: true
+    };
+    
+    var KNOWN_STATICS = {
+        name: true,
+        length: true,
+        prototype: true,
+        caller: true,
+        callee: true,
+        arguments: true,
+        arity: true
+    };
+    
+    var defineProperty = Object.defineProperty;
+    var getOwnPropertyNames = Object.getOwnPropertyNames;
+    var getOwnPropertySymbols = Object.getOwnPropertySymbols;
+    var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
+    var getPrototypeOf = Object.getPrototypeOf;
+    var objectPrototype = getPrototypeOf && getPrototypeOf(Object);
+    
+    return function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
+        if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components
+            
+            if (objectPrototype) {
+                var inheritedComponent = getPrototypeOf(sourceComponent);
+                if (inheritedComponent && inheritedComponent !== objectPrototype) {
+                    hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
+                }
+            }
+            
+            var keys = getOwnPropertyNames(sourceComponent);
+            
+            if (getOwnPropertySymbols) {
+                keys = keys.concat(getOwnPropertySymbols(sourceComponent));
+            }
+            
+            for (var i = 0; i < keys.length; ++i) {
+                var key = keys[i];
+                if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {
+                    var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
+                    try { // Avoid failures from read-only properties
+                        defineProperty(targetComponent, key, descriptor);
+                    } catch (e) {}
+                }
+            }
+            
+            return targetComponent;
+        }
+        
+        return targetComponent;
+    };
+})));
+
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/node_modules/invariant/browser.js":
+/*!********************************************************************!*\
+  !*** ./node_modules/react-redux/node_modules/invariant/browser.js ***!
+  \********************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+
+
+/**
+ * Use invariant() to assert state which your program assumes to be true.
+ *
+ * Provide sprintf-style format (only %s is supported) and arguments
+ * to provide information about what broke and what you were
+ * expecting.
+ *
+ * The invariant message will be stripped in production, but the invariant
+ * will remain to ensure logic does not differ in production.
+ */
+
+var invariant = function(condition, format, a, b, c, d, e, f) {
+  if (true) {
+    if (format === undefined) {
+      throw new Error('invariant requires an error message argument');
+    }
+  }
+
+  if (!condition) {
+    var error;
+    if (format === undefined) {
+      error = new Error(
+        'Minified exception occurred; use the non-minified dev environment ' +
+        'for the full error message and additional helpful warnings.'
+      );
+    } else {
+      var args = [a, b, c, d, e, f];
+      var argIndex = 0;
+      error = new Error(
+        format.replace(/%s/g, function() { return args[argIndex++]; })
+      );
+      error.name = 'Invariant Violation';
+    }
+
+    error.framesToPop = 1; // we don't care about invariant's own frame
+    throw error;
+  }
+};
+
+module.exports = invariant;
+
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/node_modules/lodash-es/_Symbol.js":
+/*!********************************************************************!*\
+  !*** ./node_modules/react-redux/node_modules/lodash-es/_Symbol.js ***!
+  \********************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _root_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_root.js */ "./node_modules/react-redux/node_modules/lodash-es/_root.js");
+
+
+/** Built-in value references. */
+var Symbol = _root_js__WEBPACK_IMPORTED_MODULE_0__["default"].Symbol;
+
+/* harmony default export */ __webpack_exports__["default"] = (Symbol);
+
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/node_modules/lodash-es/_baseGetTag.js":
+/*!************************************************************************!*\
+  !*** ./node_modules/react-redux/node_modules/lodash-es/_baseGetTag.js ***!
+  \************************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _Symbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_Symbol.js */ "./node_modules/react-redux/node_modules/lodash-es/_Symbol.js");
+/* harmony import */ var _getRawTag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_getRawTag.js */ "./node_modules/react-redux/node_modules/lodash-es/_getRawTag.js");
+/* harmony import */ var _objectToString_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_objectToString.js */ "./node_modules/react-redux/node_modules/lodash-es/_objectToString.js");
+
+
+
+
+/** `Object#toString` result references. */
+var nullTag = '[object Null]',
+    undefinedTag = '[object Undefined]';
+
+/** Built-in value references. */
+var symToStringTag = _Symbol_js__WEBPACK_IMPORTED_MODULE_0__["default"] ? _Symbol_js__WEBPACK_IMPORTED_MODULE_0__["default"].toStringTag : undefined;
+
+/**
+ * The base implementation of `getTag` without fallbacks for buggy environments.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+function baseGetTag(value) {
+  if (value == null) {
+    return value === undefined ? undefinedTag : nullTag;
+  }
+  return (symToStringTag && symToStringTag in Object(value))
+    ? Object(_getRawTag_js__WEBPACK_IMPORTED_MODULE_1__["default"])(value)
+    : Object(_objectToString_js__WEBPACK_IMPORTED_MODULE_2__["default"])(value);
+}
+
+/* harmony default export */ __webpack_exports__["default"] = (baseGetTag);
+
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/node_modules/lodash-es/_freeGlobal.js":
+/*!************************************************************************!*\
+  !*** ./node_modules/react-redux/node_modules/lodash-es/_freeGlobal.js ***!
+  \************************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */
+var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+
+/* harmony default export */ __webpack_exports__["default"] = (freeGlobal);
+
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/node_modules/lodash-es/_getPrototype.js":
+/*!**************************************************************************!*\
+  !*** ./node_modules/react-redux/node_modules/lodash-es/_getPrototype.js ***!
+  \**************************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _overArg_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_overArg.js */ "./node_modules/react-redux/node_modules/lodash-es/_overArg.js");
+
+
+/** Built-in value references. */
+var getPrototype = Object(_overArg_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object.getPrototypeOf, Object);
+
+/* harmony default export */ __webpack_exports__["default"] = (getPrototype);
+
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/node_modules/lodash-es/_getRawTag.js":
+/*!***********************************************************************!*\
+  !*** ./node_modules/react-redux/node_modules/lodash-es/_getRawTag.js ***!
+  \***********************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _Symbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_Symbol.js */ "./node_modules/react-redux/node_modules/lodash-es/_Symbol.js");
+
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var nativeObjectToString = objectProto.toString;
+
+/** Built-in value references. */
+var symToStringTag = _Symbol_js__WEBPACK_IMPORTED_MODULE_0__["default"] ? _Symbol_js__WEBPACK_IMPORTED_MODULE_0__["default"].toStringTag : undefined;
+
+/**
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the raw `toStringTag`.
+ */
+function getRawTag(value) {
+  var isOwn = hasOwnProperty.call(value, symToStringTag),
+      tag = value[symToStringTag];
+
+  try {
+    value[symToStringTag] = undefined;
+    var unmasked = true;
+  } catch (e) {}
+
+  var result = nativeObjectToString.call(value);
+  if (unmasked) {
+    if (isOwn) {
+      value[symToStringTag] = tag;
+    } else {
+      delete value[symToStringTag];
+    }
+  }
+  return result;
+}
+
+/* harmony default export */ __webpack_exports__["default"] = (getRawTag);
+
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/node_modules/lodash-es/_objectToString.js":
+/*!****************************************************************************!*\
+  !*** ./node_modules/react-redux/node_modules/lodash-es/_objectToString.js ***!
+  \****************************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var nativeObjectToString = objectProto.toString;
+
+/**
+ * Converts `value` to a string using `Object.prototype.toString`.
+ *
+ * @private
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ */
+function objectToString(value) {
+  return nativeObjectToString.call(value);
+}
+
+/* harmony default export */ __webpack_exports__["default"] = (objectToString);
+
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/node_modules/lodash-es/_overArg.js":
+/*!*********************************************************************!*\
+  !*** ./node_modules/react-redux/node_modules/lodash-es/_overArg.js ***!
+  \*********************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/**
+ * Creates a unary function that invokes `func` with its argument transformed.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} transform The argument transform.
+ * @returns {Function} Returns the new function.
+ */
+function overArg(func, transform) {
+  return function(arg) {
+    return func(transform(arg));
+  };
+}
+
+/* harmony default export */ __webpack_exports__["default"] = (overArg);
+
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/node_modules/lodash-es/_root.js":
+/*!******************************************************************!*\
+  !*** ./node_modules/react-redux/node_modules/lodash-es/_root.js ***!
+  \******************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _freeGlobal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_freeGlobal.js */ "./node_modules/react-redux/node_modules/lodash-es/_freeGlobal.js");
+
+
+/** Detect free variable `self`. */
+var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
+
+/** Used as a reference to the global object. */
+var root = _freeGlobal_js__WEBPACK_IMPORTED_MODULE_0__["default"] || freeSelf || Function('return this')();
+
+/* harmony default export */ __webpack_exports__["default"] = (root);
+
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/node_modules/lodash-es/isObjectLike.js":
+/*!*************************************************************************!*\
+  !*** ./node_modules/react-redux/node_modules/lodash-es/isObjectLike.js ***!
+  \*************************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+  return value != null && typeof value == 'object';
+}
+
+/* harmony default export */ __webpack_exports__["default"] = (isObjectLike);
+
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/node_modules/lodash-es/isPlainObject.js":
+/*!**************************************************************************!*\
+  !*** ./node_modules/react-redux/node_modules/lodash-es/isPlainObject.js ***!
+  \**************************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _baseGetTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_baseGetTag.js */ "./node_modules/react-redux/node_modules/lodash-es/_baseGetTag.js");
+/* harmony import */ var _getPrototype_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_getPrototype.js */ "./node_modules/react-redux/node_modules/lodash-es/_getPrototype.js");
+/* harmony import */ var _isObjectLike_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./isObjectLike.js */ "./node_modules/react-redux/node_modules/lodash-es/isObjectLike.js");
+
+
+
+
+/** `Object#toString` result references. */
+var objectTag = '[object Object]';
+
+/** Used for built-in method references. */
+var funcProto = Function.prototype,
+    objectProto = Object.prototype;
+
+/** Used to resolve the decompiled source of functions. */
+var funcToString = funcProto.toString;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/** Used to infer the `Object` constructor. */
+var objectCtorString = funcToString.call(Object);
+
+/**
+ * Checks if `value` is a plain object, that is, an object created by the
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.8.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
+ * @example
+ *
+ * function Foo() {
+ *   this.a = 1;
+ * }
+ *
+ * _.isPlainObject(new Foo);
+ * // => false
+ *
+ * _.isPlainObject([1, 2, 3]);
+ * // => false
+ *
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
+ * // => true
+ *
+ * _.isPlainObject(Object.create(null));
+ * // => true
+ */
+function isPlainObject(value) {
+  if (!Object(_isObjectLike_js__WEBPACK_IMPORTED_MODULE_2__["default"])(value) || Object(_baseGetTag_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value) != objectTag) {
+    return false;
+  }
+  var proto = Object(_getPrototype_js__WEBPACK_IMPORTED_MODULE_1__["default"])(value);
+  if (proto === null) {
+    return true;
+  }
+  var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
+  return typeof Ctor == 'function' && Ctor instanceof Ctor &&
+    funcToString.call(Ctor) == objectCtorString;
+}
+
+/* harmony default export */ __webpack_exports__["default"] = (isPlainObject);
+
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/node_modules/object-assign/index.js":
+/*!**********************************************************************!*\
+  !*** ./node_modules/react-redux/node_modules/object-assign/index.js ***!
+  \**********************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/*
+object-assign
+(c) Sindre Sorhus
+@license MIT
+*/
+
+
+/* eslint-disable no-unused-vars */
+var getOwnPropertySymbols = Object.getOwnPropertySymbols;
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+var propIsEnumerable = Object.prototype.propertyIsEnumerable;
+
+function toObject(val) {
+	if (val === null || val === undefined) {
+		throw new TypeError('Object.assign cannot be called with null or undefined');
+	}
+
+	return Object(val);
+}
+
+function shouldUseNative() {
+	try {
+		if (!Object.assign) {
+			return false;
+		}
+
+		// Detect buggy property enumeration order in older V8 versions.
+
+		// https://bugs.chromium.org/p/v8/issues/detail?id=4118
+		var test1 = new String('abc');  // eslint-disable-line no-new-wrappers
+		test1[5] = 'de';
+		if (Object.getOwnPropertyNames(test1)[0] === '5') {
+			return false;
+		}
+
+		// https://bugs.chromium.org/p/v8/issues/detail?id=3056
+		var test2 = {};
+		for (var i = 0; i < 10; i++) {
+			test2['_' + String.fromCharCode(i)] = i;
+		}
+		var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
+			return test2[n];
+		});
+		if (order2.join('') !== '0123456789') {
+			return false;
+		}
+
+		// https://bugs.chromium.org/p/v8/issues/detail?id=3056
+		var test3 = {};
+		'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
+			test3[letter] = letter;
+		});
+		if (Object.keys(Object.assign({}, test3)).join('') !==
+				'abcdefghijklmnopqrst') {
+			return false;
+		}
+
+		return true;
+	} catch (err) {
+		// We don't expect any of the above to throw, but better to be safe.
+		return false;
+	}
+}
+
+module.exports = shouldUseNative() ? Object.assign : function (target, source) {
+	var from;
+	var to = toObject(target);
+	var symbols;
+
+	for (var s = 1; s < arguments.length; s++) {
+		from = Object(arguments[s]);
+
+		for (var key in from) {
+			if (hasOwnProperty.call(from, key)) {
+				to[key] = from[key];
+			}
+		}
+
+		if (getOwnPropertySymbols) {
+			symbols = getOwnPropertySymbols(from);
+			for (var i = 0; i < symbols.length; i++) {
+				if (propIsEnumerable.call(from, symbols[i])) {
+					to[symbols[i]] = from[symbols[i]];
+				}
+			}
+		}
+	}
+
+	return to;
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/node_modules/prop-types/checkPropTypes.js":
+/*!****************************************************************************!*\
+  !*** ./node_modules/react-redux/node_modules/prop-types/checkPropTypes.js ***!
+  \****************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+
+
+if (true) {
+  var invariant = __webpack_require__(/*! fbjs/lib/invariant */ "./node_modules/react-redux/node_modules/fbjs/lib/invariant.js");
+  var warning = __webpack_require__(/*! fbjs/lib/warning */ "./node_modules/react-redux/node_modules/fbjs/lib/warning.js");
+  var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/react-redux/node_modules/prop-types/lib/ReactPropTypesSecret.js");
+  var loggedTypeFailures = {};
+}
+
+/**
+ * Assert that the values match with the type specs.
+ * Error messages are memorized and will only be shown once.
  *
- * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
- * @license  MIT
+ * @param {object} typeSpecs Map of name to a ReactPropType
+ * @param {object} values Runtime values that need to be type-checked
+ * @param {string} location e.g. "prop", "context", "child context"
+ * @param {string} componentName Name of the component for error messages.
+ * @param {?Function} getStack Returns the component stack.
+ * @private
+ */
+function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
+  if (true) {
+    for (var typeSpecName in typeSpecs) {
+      if (typeSpecs.hasOwnProperty(typeSpecName)) {
+        var error;
+        // Prop type validation may throw. In case they do, we don't want to
+        // fail the render phase where it didn't fail before. So we log it.
+        // After these have been cleaned up, we'll let them throw.
+        try {
+          // This is intentionally an invariant that gets caught. It's the same
+          // behavior as without this statement except with a better message.
+          invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);
+          error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
+        } catch (ex) {
+          error = ex;
+        }
+        warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);
+        if (error instanceof Error && !(error.message in loggedTypeFailures)) {
+          // Only monitor this failure once because there tends to be a lot of the
+          // same error.
+          loggedTypeFailures[error.message] = true;
+
+          var stack = getStack ? getStack() : '';
+
+          warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
+        }
+      }
+    }
+  }
+}
+
+module.exports = checkPropTypes;
+
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/node_modules/prop-types/factoryWithTypeCheckers.js":
+/*!*************************************************************************************!*\
+  !*** ./node_modules/react-redux/node_modules/prop-types/factoryWithTypeCheckers.js ***!
+  \*************************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+
+
+var emptyFunction = __webpack_require__(/*! fbjs/lib/emptyFunction */ "./node_modules/react-redux/node_modules/fbjs/lib/emptyFunction.js");
+var invariant = __webpack_require__(/*! fbjs/lib/invariant */ "./node_modules/react-redux/node_modules/fbjs/lib/invariant.js");
+var warning = __webpack_require__(/*! fbjs/lib/warning */ "./node_modules/react-redux/node_modules/fbjs/lib/warning.js");
+var assign = __webpack_require__(/*! object-assign */ "./node_modules/react-redux/node_modules/object-assign/index.js");
+
+var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/react-redux/node_modules/prop-types/lib/ReactPropTypesSecret.js");
+var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "./node_modules/react-redux/node_modules/prop-types/checkPropTypes.js");
+
+module.exports = function(isValidElement, throwOnDirectAccess) {
+  /* global Symbol */
+  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
+  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
+
+  /**
+   * Returns the iterator method function contained on the iterable object.
+   *
+   * Be sure to invoke the function with the iterable as context:
+   *
+   *     var iteratorFn = getIteratorFn(myIterable);
+   *     if (iteratorFn) {
+   *       var iterator = iteratorFn.call(myIterable);
+   *       ...
+   *     }
+   *
+   * @param {?object} maybeIterable
+   * @return {?function}
+   */
+  function getIteratorFn(maybeIterable) {
+    var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
+    if (typeof iteratorFn === 'function') {
+      return iteratorFn;
+    }
+  }
+
+  /**
+   * Collection of methods that allow declaration and validation of props that are
+   * supplied to React components. Example usage:
+   *
+   *   var Props = require('ReactPropTypes');
+   *   var MyArticle = React.createClass({
+   *     propTypes: {
+   *       // An optional string prop named "description".
+   *       description: Props.string,
+   *
+   *       // A required enum prop named "category".
+   *       category: Props.oneOf(['News','Photos']).isRequired,
+   *
+   *       // A prop named "dialog" that requires an instance of Dialog.
+   *       dialog: Props.instanceOf(Dialog).isRequired
+   *     },
+   *     render: function() { ... }
+   *   });
+   *
+   * A more formal specification of how these methods are used:
+   *
+   *   type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
+   *   decl := ReactPropTypes.{type}(.isRequired)?
+   *
+   * Each and every declaration produces a function with the same signature. This
+   * allows the creation of custom validation functions. For example:
+   *
+   *  var MyLink = React.createClass({
+   *    propTypes: {
+   *      // An optional string or URI prop named "href".
+   *      href: function(props, propName, componentName) {
+   *        var propValue = props[propName];
+   *        if (propValue != null && typeof propValue !== 'string' &&
+   *            !(propValue instanceof URI)) {
+   *          return new Error(
+   *            'Expected a string or an URI for ' + propName + ' in ' +
+   *            componentName
+   *          );
+   *        }
+   *      }
+   *    },
+   *    render: function() {...}
+   *  });
+   *
+   * @internal
+   */
+
+  var ANONYMOUS = '<<anonymous>>';
+
+  // Important!
+  // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
+  var ReactPropTypes = {
+    array: createPrimitiveTypeChecker('array'),
+    bool: createPrimitiveTypeChecker('boolean'),
+    func: createPrimitiveTypeChecker('function'),
+    number: createPrimitiveTypeChecker('number'),
+    object: createPrimitiveTypeChecker('object'),
+    string: createPrimitiveTypeChecker('string'),
+    symbol: createPrimitiveTypeChecker('symbol'),
+
+    any: createAnyTypeChecker(),
+    arrayOf: createArrayOfTypeChecker,
+    element: createElementTypeChecker(),
+    instanceOf: createInstanceTypeChecker,
+    node: createNodeChecker(),
+    objectOf: createObjectOfTypeChecker,
+    oneOf: createEnumTypeChecker,
+    oneOfType: createUnionTypeChecker,
+    shape: createShapeTypeChecker,
+    exact: createStrictShapeTypeChecker,
+  };
+
+  /**
+   * inlined Object.is polyfill to avoid requiring consumers ship their own
+   * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
+   */
+  /*eslint-disable no-self-compare*/
+  function is(x, y) {
+    // SameValue algorithm
+    if (x === y) {
+      // Steps 1-5, 7-10
+      // Steps 6.b-6.e: +0 != -0
+      return x !== 0 || 1 / x === 1 / y;
+    } else {
+      // Step 6.a: NaN == NaN
+      return x !== x && y !== y;
+    }
+  }
+  /*eslint-enable no-self-compare*/
+
+  /**
+   * We use an Error-like object for backward compatibility as people may call
+   * PropTypes directly and inspect their output. However, we don't use real
+   * Errors anymore. We don't inspect their stack anyway, and creating them
+   * is prohibitively expensive if they are created too often, such as what
+   * happens in oneOfType() for any type before the one that matched.
+   */
+  function PropTypeError(message) {
+    this.message = message;
+    this.stack = '';
+  }
+  // Make `instanceof Error` still work for returned errors.
+  PropTypeError.prototype = Error.prototype;
+
+  function createChainableTypeChecker(validate) {
+    if (true) {
+      var manualPropTypeCallCache = {};
+      var manualPropTypeWarningCount = 0;
+    }
+    function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
+      componentName = componentName || ANONYMOUS;
+      propFullName = propFullName || propName;
+
+      if (secret !== ReactPropTypesSecret) {
+        if (throwOnDirectAccess) {
+          // New behavior only for users of `prop-types` package
+          invariant(
+            false,
+            'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
+            'Use `PropTypes.checkPropTypes()` to call them. ' +
+            'Read more at http://fb.me/use-check-prop-types'
+          );
+        } else if ("development" !== 'production' && typeof console !== 'undefined') {
+          // Old behavior for people using React.PropTypes
+          var cacheKey = componentName + ':' + propName;
+          if (
+            !manualPropTypeCallCache[cacheKey] &&
+            // Avoid spamming the console because they are often not actionable except for lib authors
+            manualPropTypeWarningCount < 3
+          ) {
+            warning(
+              false,
+              'You are manually calling a React.PropTypes validation ' +
+              'function for the `%s` prop on `%s`. This is deprecated ' +
+              'and will throw in the standalone `prop-types` package. ' +
+              'You may be seeing this warning due to a third-party PropTypes ' +
+              'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',
+              propFullName,
+              componentName
+            );
+            manualPropTypeCallCache[cacheKey] = true;
+            manualPropTypeWarningCount++;
+          }
+        }
+      }
+      if (props[propName] == null) {
+        if (isRequired) {
+          if (props[propName] === null) {
+            return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
+          }
+          return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
+        }
+        return null;
+      } else {
+        return validate(props, propName, componentName, location, propFullName);
+      }
+    }
+
+    var chainedCheckType = checkType.bind(null, false);
+    chainedCheckType.isRequired = checkType.bind(null, true);
+
+    return chainedCheckType;
+  }
+
+  function createPrimitiveTypeChecker(expectedType) {
+    function validate(props, propName, componentName, location, propFullName, secret) {
+      var propValue = props[propName];
+      var propType = getPropType(propValue);
+      if (propType !== expectedType) {
+        // `propValue` being instance of, say, date/regexp, pass the 'object'
+        // check, but we can offer a more precise error message here rather than
+        // 'of type `object`'.
+        var preciseType = getPreciseType(propValue);
+
+        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
+      }
+      return null;
+    }
+    return createChainableTypeChecker(validate);
+  }
+
+  function createAnyTypeChecker() {
+    return createChainableTypeChecker(emptyFunction.thatReturnsNull);
+  }
+
+  function createArrayOfTypeChecker(typeChecker) {
+    function validate(props, propName, componentName, location, propFullName) {
+      if (typeof typeChecker !== 'function') {
+        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
+      }
+      var propValue = props[propName];
+      if (!Array.isArray(propValue)) {
+        var propType = getPropType(propValue);
+        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
+      }
+      for (var i = 0; i < propValue.length; i++) {
+        var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
+        if (error instanceof Error) {
+          return error;
+        }
+      }
+      return null;
+    }
+    return createChainableTypeChecker(validate);
+  }
+
+  function createElementTypeChecker() {
+    function validate(props, propName, componentName, location, propFullName) {
+      var propValue = props[propName];
+      if (!isValidElement(propValue)) {
+        var propType = getPropType(propValue);
+        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
+      }
+      return null;
+    }
+    return createChainableTypeChecker(validate);
+  }
+
+  function createInstanceTypeChecker(expectedClass) {
+    function validate(props, propName, componentName, location, propFullName) {
+      if (!(props[propName] instanceof expectedClass)) {
+        var expectedClassName = expectedClass.name || ANONYMOUS;
+        var actualClassName = getClassName(props[propName]);
+        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
+      }
+      return null;
+    }
+    return createChainableTypeChecker(validate);
+  }
+
+  function createEnumTypeChecker(expectedValues) {
+    if (!Array.isArray(expectedValues)) {
+       true ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : undefined;
+      return emptyFunction.thatReturnsNull;
+    }
+
+    function validate(props, propName, componentName, location, propFullName) {
+      var propValue = props[propName];
+      for (var i = 0; i < expectedValues.length; i++) {
+        if (is(propValue, expectedValues[i])) {
+          return null;
+        }
+      }
+
+      var valuesString = JSON.stringify(expectedValues);
+      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
+    }
+    return createChainableTypeChecker(validate);
+  }
+
+  function createObjectOfTypeChecker(typeChecker) {
+    function validate(props, propName, componentName, location, propFullName) {
+      if (typeof typeChecker !== 'function') {
+        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
+      }
+      var propValue = props[propName];
+      var propType = getPropType(propValue);
+      if (propType !== 'object') {
+        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
+      }
+      for (var key in propValue) {
+        if (propValue.hasOwnProperty(key)) {
+          var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
+          if (error instanceof Error) {
+            return error;
+          }
+        }
+      }
+      return null;
+    }
+    return createChainableTypeChecker(validate);
+  }
+
+  function createUnionTypeChecker(arrayOfTypeCheckers) {
+    if (!Array.isArray(arrayOfTypeCheckers)) {
+       true ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : undefined;
+      return emptyFunction.thatReturnsNull;
+    }
+
+    for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
+      var checker = arrayOfTypeCheckers[i];
+      if (typeof checker !== 'function') {
+        warning(
+          false,
+          'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
+          'received %s at index %s.',
+          getPostfixForTypeWarning(checker),
+          i
+        );
+        return emptyFunction.thatReturnsNull;
+      }
+    }
+
+    function validate(props, propName, componentName, location, propFullName) {
+      for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
+        var checker = arrayOfTypeCheckers[i];
+        if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
+          return null;
+        }
+      }
+
+      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
+    }
+    return createChainableTypeChecker(validate);
+  }
+
+  function createNodeChecker() {
+    function validate(props, propName, componentName, location, propFullName) {
+      if (!isNode(props[propName])) {
+        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
+      }
+      return null;
+    }
+    return createChainableTypeChecker(validate);
+  }
+
+  function createShapeTypeChecker(shapeTypes) {
+    function validate(props, propName, componentName, location, propFullName) {
+      var propValue = props[propName];
+      var propType = getPropType(propValue);
+      if (propType !== 'object') {
+        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
+      }
+      for (var key in shapeTypes) {
+        var checker = shapeTypes[key];
+        if (!checker) {
+          continue;
+        }
+        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
+        if (error) {
+          return error;
+        }
+      }
+      return null;
+    }
+    return createChainableTypeChecker(validate);
+  }
+
+  function createStrictShapeTypeChecker(shapeTypes) {
+    function validate(props, propName, componentName, location, propFullName) {
+      var propValue = props[propName];
+      var propType = getPropType(propValue);
+      if (propType !== 'object') {
+        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
+      }
+      // We need to check all keys in case some are required but missing from
+      // props.
+      var allKeys = assign({}, props[propName], shapeTypes);
+      for (var key in allKeys) {
+        var checker = shapeTypes[key];
+        if (!checker) {
+          return new PropTypeError(
+            'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
+            '\nBad object: ' + JSON.stringify(props[propName], null, '  ') +
+            '\nValid keys: ' +  JSON.stringify(Object.keys(shapeTypes), null, '  ')
+          );
+        }
+        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
+        if (error) {
+          return error;
+        }
+      }
+      return null;
+    }
+
+    return createChainableTypeChecker(validate);
+  }
+
+  function isNode(propValue) {
+    switch (typeof propValue) {
+      case 'number':
+      case 'string':
+      case 'undefined':
+        return true;
+      case 'boolean':
+        return !propValue;
+      case 'object':
+        if (Array.isArray(propValue)) {
+          return propValue.every(isNode);
+        }
+        if (propValue === null || isValidElement(propValue)) {
+          return true;
+        }
+
+        var iteratorFn = getIteratorFn(propValue);
+        if (iteratorFn) {
+          var iterator = iteratorFn.call(propValue);
+          var step;
+          if (iteratorFn !== propValue.entries) {
+            while (!(step = iterator.next()).done) {
+              if (!isNode(step.value)) {
+                return false;
+              }
+            }
+          } else {
+            // Iterator will provide entry [k,v] tuples rather than values.
+            while (!(step = iterator.next()).done) {
+              var entry = step.value;
+              if (entry) {
+                if (!isNode(entry[1])) {
+                  return false;
+                }
+              }
+            }
+          }
+        } else {
+          return false;
+        }
+
+        return true;
+      default:
+        return false;
+    }
+  }
+
+  function isSymbol(propType, propValue) {
+    // Native Symbol.
+    if (propType === 'symbol') {
+      return true;
+    }
+
+    // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
+    if (propValue['@@toStringTag'] === 'Symbol') {
+      return true;
+    }
+
+    // Fallback for non-spec compliant Symbols which are polyfilled.
+    if (typeof Symbol === 'function' && propValue instanceof Symbol) {
+      return true;
+    }
+
+    return false;
+  }
+
+  // Equivalent of `typeof` but with special handling for array and regexp.
+  function getPropType(propValue) {
+    var propType = typeof propValue;
+    if (Array.isArray(propValue)) {
+      return 'array';
+    }
+    if (propValue instanceof RegExp) {
+      // Old webkits (at least until Android 4.0) return 'function' rather than
+      // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
+      // passes PropTypes.object.
+      return 'object';
+    }
+    if (isSymbol(propType, propValue)) {
+      return 'symbol';
+    }
+    return propType;
+  }
+
+  // This handles more types than `getPropType`. Only used for error messages.
+  // See `createPrimitiveTypeChecker`.
+  function getPreciseType(propValue) {
+    if (typeof propValue === 'undefined' || propValue === null) {
+      return '' + propValue;
+    }
+    var propType = getPropType(propValue);
+    if (propType === 'object') {
+      if (propValue instanceof Date) {
+        return 'date';
+      } else if (propValue instanceof RegExp) {
+        return 'regexp';
+      }
+    }
+    return propType;
+  }
+
+  // Returns a string that is postfixed to a warning about an invalid type.
+  // For example, "undefined" or "of type array"
+  function getPostfixForTypeWarning(value) {
+    var type = getPreciseType(value);
+    switch (type) {
+      case 'array':
+      case 'object':
+        return 'an ' + type;
+      case 'boolean':
+      case 'date':
+      case 'regexp':
+        return 'a ' + type;
+      default:
+        return type;
+    }
+  }
+
+  // Returns class name of the object, if any.
+  function getClassName(propValue) {
+    if (!propValue.constructor || !propValue.constructor.name) {
+      return ANONYMOUS;
+    }
+    return propValue.constructor.name;
+  }
+
+  ReactPropTypes.checkPropTypes = checkPropTypes;
+  ReactPropTypes.PropTypes = ReactPropTypes;
+
+  return ReactPropTypes;
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/node_modules/prop-types/index.js":
+/*!*******************************************************************!*\
+  !*** ./node_modules/react-redux/node_modules/prop-types/index.js ***!
+  \*******************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+if (true) {
+  var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
+    Symbol.for &&
+    Symbol.for('react.element')) ||
+    0xeac7;
+
+  var isValidElement = function(object) {
+    return typeof object === 'object' &&
+      object !== null &&
+      object.$$typeof === REACT_ELEMENT_TYPE;
+  };
+
+  // By explicitly using `prop-types` you are opting into new development behavior.
+  // http://fb.me/prop-types-in-prod
+  var throwOnDirectAccess = true;
+  module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "./node_modules/react-redux/node_modules/prop-types/factoryWithTypeCheckers.js")(isValidElement, throwOnDirectAccess);
+} else {}
+
+
+/***/ }),
+
+/***/ "./node_modules/react-redux/node_modules/prop-types/lib/ReactPropTypesSecret.js":
+/*!**************************************************************************************!*\
+  !*** ./node_modules/react-redux/node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
+  \**************************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+
+
+var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
+
+module.exports = ReactPropTypesSecret;
+
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/es/BrowserRouter.js":
+/*!***********************************************************!*\
+  !*** ./node_modules/react-router-dom/es/BrowserRouter.js ***!
+  \***********************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! warning */ "./node_modules/react-router-dom/node_modules/warning/browser.js");
+/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "./node_modules/preact-compat/dist/preact-compat.es.js");
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "./node_modules/react-router-dom/node_modules/prop-types/index.js");
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
+/* harmony import */ var history_createBrowserHistory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! history/createBrowserHistory */ "./node_modules/react-router-dom/node_modules/history/createBrowserHistory.js");
+/* harmony import */ var history_createBrowserHistory__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(history_createBrowserHistory__WEBPACK_IMPORTED_MODULE_3__);
+/* harmony import */ var _Router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Router */ "./node_modules/react-router-dom/es/Router.js");
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+
+
+
+
+
+
+/**
+ * The public API for a <Router> that uses HTML5 history.
+ */
+
+var BrowserRouter = function (_React$Component) {
+  _inherits(BrowserRouter, _React$Component);
+
+  function BrowserRouter() {
+    var _temp, _this, _ret;
+
+    _classCallCheck(this, BrowserRouter);
+
+    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+      args[_key] = arguments[_key];
+    }
+
+    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = history_createBrowserHistory__WEBPACK_IMPORTED_MODULE_3___default()(_this.props), _temp), _possibleConstructorReturn(_this, _ret);
+  }
+
+  BrowserRouter.prototype.componentWillMount = function componentWillMount() {
+    warning__WEBPACK_IMPORTED_MODULE_0___default()(!this.props.history, '<BrowserRouter> ignores the history prop. To use a custom history, ' + 'use `import { Router }` instead of `import { BrowserRouter as Router }`.');
+  };
+
+  BrowserRouter.prototype.render = function render() {
+    return react__WEBPACK_IMPORTED_MODULE_1__["default"].createElement(_Router__WEBPACK_IMPORTED_MODULE_4__["default"], { history: this.history, children: this.props.children });
+  };
+
+  return BrowserRouter;
+}(react__WEBPACK_IMPORTED_MODULE_1__["default"].Component);
+
+BrowserRouter.propTypes = {
+  basename: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,
+  forceRefresh: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,
+  getUserConfirmation: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func,
+  keyLength: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
+  children: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.node
+};
+
+
+/* harmony default export */ __webpack_exports__["default"] = (BrowserRouter);
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/es/HashRouter.js":
+/*!********************************************************!*\
+  !*** ./node_modules/react-router-dom/es/HashRouter.js ***!
+  \********************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! warning */ "./node_modules/react-router-dom/node_modules/warning/browser.js");
+/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "./node_modules/preact-compat/dist/preact-compat.es.js");
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "./node_modules/react-router-dom/node_modules/prop-types/index.js");
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
+/* harmony import */ var history_createHashHistory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! history/createHashHistory */ "./node_modules/react-router-dom/node_modules/history/createHashHistory.js");
+/* harmony import */ var history_createHashHistory__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(history_createHashHistory__WEBPACK_IMPORTED_MODULE_3__);
+/* harmony import */ var _Router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Router */ "./node_modules/react-router-dom/es/Router.js");
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+
+
+
+
+
+
+/**
+ * The public API for a <Router> that uses window.location.hash.
+ */
+
+var HashRouter = function (_React$Component) {
+  _inherits(HashRouter, _React$Component);
+
+  function HashRouter() {
+    var _temp, _this, _ret;
+
+    _classCallCheck(this, HashRouter);
+
+    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+      args[_key] = arguments[_key];
+    }
+
+    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = history_createHashHistory__WEBPACK_IMPORTED_MODULE_3___default()(_this.props), _temp), _possibleConstructorReturn(_this, _ret);
+  }
+
+  HashRouter.prototype.componentWillMount = function componentWillMount() {
+    warning__WEBPACK_IMPORTED_MODULE_0___default()(!this.props.history, '<HashRouter> ignores the history prop. To use a custom history, ' + 'use `import { Router }` instead of `import { HashRouter as Router }`.');
+  };
+
+  HashRouter.prototype.render = function render() {
+    return react__WEBPACK_IMPORTED_MODULE_1__["default"].createElement(_Router__WEBPACK_IMPORTED_MODULE_4__["default"], { history: this.history, children: this.props.children });
+  };
+
+  return HashRouter;
+}(react__WEBPACK_IMPORTED_MODULE_1__["default"].Component);
+
+HashRouter.propTypes = {
+  basename: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,
+  getUserConfirmation: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func,
+  hashType: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOf(['hashbang', 'noslash', 'slash']),
+  children: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.node
+};
+
+
+/* harmony default export */ __webpack_exports__["default"] = (HashRouter);
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/es/Link.js":
+/*!**************************************************!*\
+  !*** ./node_modules/react-router-dom/es/Link.js ***!
+  \**************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/preact-compat/dist/preact-compat.es.js");
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/react-router-dom/node_modules/prop-types/index.js");
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
+/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! invariant */ "./node_modules/react-router-dom/node_modules/invariant/browser.js");
+/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(invariant__WEBPACK_IMPORTED_MODULE_2__);
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+
+
+
+
+var isModifiedEvent = function isModifiedEvent(event) {
+  return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
+};
+
+/**
+ * The public API for rendering a history-aware <a>.
+ */
+
+var Link = function (_React$Component) {
+  _inherits(Link, _React$Component);
+
+  function Link() {
+    var _temp, _this, _ret;
+
+    _classCallCheck(this, Link);
+
+    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+      args[_key] = arguments[_key];
+    }
+
+    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleClick = function (event) {
+      if (_this.props.onClick) _this.props.onClick(event);
+
+      if (!event.defaultPrevented && // onClick prevented default
+      event.button === 0 && // ignore right clicks
+      !_this.props.target && // let browser handle "target=_blank" etc.
+      !isModifiedEvent(event) // ignore clicks with modifier keys
+      ) {
+          event.preventDefault();
+
+          var history = _this.context.router.history;
+          var _this$props = _this.props,
+              replace = _this$props.replace,
+              to = _this$props.to;
+
+
+          if (replace) {
+            history.replace(to);
+          } else {
+            history.push(to);
+          }
+        }
+    }, _temp), _possibleConstructorReturn(_this, _ret);
+  }
+
+  Link.prototype.render = function render() {
+    var _props = this.props,
+        replace = _props.replace,
+        to = _props.to,
+        innerRef = _props.innerRef,
+        props = _objectWithoutProperties(_props, ['replace', 'to', 'innerRef']); // eslint-disable-line no-unused-vars
+
+    invariant__WEBPACK_IMPORTED_MODULE_2___default()(this.context.router, 'You should not use <Link> outside a <Router>');
+
+    var href = this.context.router.history.createHref(typeof to === 'string' ? { pathname: to } : to);
+
+    return react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement('a', _extends({}, props, { onClick: this.handleClick, href: href, ref: innerRef }));
+  };
+
+  return Link;
+}(react__WEBPACK_IMPORTED_MODULE_0__["default"].Component);
+
+Link.propTypes = {
+  onClick: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,
+  target: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,
+  replace: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,
+  to: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object]).isRequired,
+  innerRef: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func])
+};
+Link.defaultProps = {
+  replace: false
+};
+Link.contextTypes = {
+  router: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({
+    history: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({
+      push: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func.isRequired,
+      replace: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func.isRequired,
+      createHref: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func.isRequired
+    }).isRequired
+  }).isRequired
+};
+
+
+/* harmony default export */ __webpack_exports__["default"] = (Link);
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/es/MemoryRouter.js":
+/*!**********************************************************!*\
+  !*** ./node_modules/react-router-dom/es/MemoryRouter.js ***!
+  \**********************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var react_router_es_MemoryRouter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-router/es/MemoryRouter */ "./node_modules/react-router-dom/node_modules/react-router/es/MemoryRouter.js");
+// Written in this round about way for babel-transform-imports
+
+
+/* harmony default export */ __webpack_exports__["default"] = (react_router_es_MemoryRouter__WEBPACK_IMPORTED_MODULE_0__["default"]);
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/es/NavLink.js":
+/*!*****************************************************!*\
+  !*** ./node_modules/react-router-dom/es/NavLink.js ***!
+  \*****************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/preact-compat/dist/preact-compat.es.js");
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/react-router-dom/node_modules/prop-types/index.js");
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
+/* harmony import */ var _Route__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Route */ "./node_modules/react-router-dom/es/Route.js");
+/* harmony import */ var _Link__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Link */ "./node_modules/react-router-dom/es/Link.js");
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+
+
+
+
+
+
+/**
+ * A <Link> wrapper that knows if it's "active" or not.
+ */
+var NavLink = function NavLink(_ref) {
+  var to = _ref.to,
+      exact = _ref.exact,
+      strict = _ref.strict,
+      location = _ref.location,
+      activeClassName = _ref.activeClassName,
+      className = _ref.className,
+      activeStyle = _ref.activeStyle,
+      style = _ref.style,
+      getIsActive = _ref.isActive,
+      ariaCurrent = _ref.ariaCurrent,
+      rest = _objectWithoutProperties(_ref, ['to', 'exact', 'strict', 'location', 'activeClassName', 'className', 'activeStyle', 'style', 'isActive', 'ariaCurrent']);
+
+  return react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(_Route__WEBPACK_IMPORTED_MODULE_2__["default"], {
+    path: (typeof to === 'undefined' ? 'undefined' : _typeof(to)) === 'object' ? to.pathname : to,
+    exact: exact,
+    strict: strict,
+    location: location,
+    children: function children(_ref2) {
+      var location = _ref2.location,
+          match = _ref2.match;
+
+      var isActive = !!(getIsActive ? getIsActive(match, location) : match);
+
+      return react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(_Link__WEBPACK_IMPORTED_MODULE_3__["default"], _extends({
+        to: to,
+        className: isActive ? [className, activeClassName].filter(function (i) {
+          return i;
+        }).join(' ') : className,
+        style: isActive ? _extends({}, style, activeStyle) : style,
+        'aria-current': isActive && ariaCurrent
+      }, rest));
+    }
+  });
+};
+
+NavLink.propTypes = {
+  to: _Link__WEBPACK_IMPORTED_MODULE_3__["default"].propTypes.to,
+  exact: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,
+  strict: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,
+  location: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,
+  activeClassName: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,
+  className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,
+  activeStyle: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,
+  style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,
+  isActive: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,
+  ariaCurrent: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['page', 'step', 'location', 'true'])
+};
+
+NavLink.defaultProps = {
+  activeClassName: 'active',
+  ariaCurrent: 'true'
+};
+
+/* harmony default export */ __webpack_exports__["default"] = (NavLink);
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/es/Prompt.js":
+/*!****************************************************!*\
+  !*** ./node_modules/react-router-dom/es/Prompt.js ***!
+  \****************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var react_router_es_Prompt__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-router/es/Prompt */ "./node_modules/react-router-dom/node_modules/react-router/es/Prompt.js");
+// Written in this round about way for babel-transform-imports
+
+
+/* harmony default export */ __webpack_exports__["default"] = (react_router_es_Prompt__WEBPACK_IMPORTED_MODULE_0__["default"]);
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/es/Redirect.js":
+/*!******************************************************!*\
+  !*** ./node_modules/react-router-dom/es/Redirect.js ***!
+  \******************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var react_router_es_Redirect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-router/es/Redirect */ "./node_modules/react-router-dom/node_modules/react-router/es/Redirect.js");
+// Written in this round about way for babel-transform-imports
+
+
+/* harmony default export */ __webpack_exports__["default"] = (react_router_es_Redirect__WEBPACK_IMPORTED_MODULE_0__["default"]);
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/es/Route.js":
+/*!***************************************************!*\
+  !*** ./node_modules/react-router-dom/es/Route.js ***!
+  \***************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var react_router_es_Route__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-router/es/Route */ "./node_modules/react-router-dom/node_modules/react-router/es/Route.js");
+// Written in this round about way for babel-transform-imports
+
+
+/* harmony default export */ __webpack_exports__["default"] = (react_router_es_Route__WEBPACK_IMPORTED_MODULE_0__["default"]);
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/es/Router.js":
+/*!****************************************************!*\
+  !*** ./node_modules/react-router-dom/es/Router.js ***!
+  \****************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var react_router_es_Router__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-router/es/Router */ "./node_modules/react-router-dom/node_modules/react-router/es/Router.js");
+// Written in this round about way for babel-transform-imports
+
+
+/* harmony default export */ __webpack_exports__["default"] = (react_router_es_Router__WEBPACK_IMPORTED_MODULE_0__["default"]);
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/es/StaticRouter.js":
+/*!**********************************************************!*\
+  !*** ./node_modules/react-router-dom/es/StaticRouter.js ***!
+  \**********************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var react_router_es_StaticRouter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-router/es/StaticRouter */ "./node_modules/react-router-dom/node_modules/react-router/es/StaticRouter.js");
+// Written in this round about way for babel-transform-imports
+
+
+/* harmony default export */ __webpack_exports__["default"] = (react_router_es_StaticRouter__WEBPACK_IMPORTED_MODULE_0__["default"]);
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/es/Switch.js":
+/*!****************************************************!*\
+  !*** ./node_modules/react-router-dom/es/Switch.js ***!
+  \****************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var react_router_es_Switch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-router/es/Switch */ "./node_modules/react-router-dom/node_modules/react-router/es/Switch.js");
+// Written in this round about way for babel-transform-imports
+
+
+/* harmony default export */ __webpack_exports__["default"] = (react_router_es_Switch__WEBPACK_IMPORTED_MODULE_0__["default"]);
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/es/index.js":
+/*!***************************************************!*\
+  !*** ./node_modules/react-router-dom/es/index.js ***!
+  \***************************************************/
+/*! exports provided: BrowserRouter, HashRouter, Link, MemoryRouter, NavLink, Prompt, Redirect, Route, Router, StaticRouter, Switch, matchPath, withRouter */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _BrowserRouter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BrowserRouter */ "./node_modules/react-router-dom/es/BrowserRouter.js");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BrowserRouter", function() { return _BrowserRouter__WEBPACK_IMPORTED_MODULE_0__["default"]; });
+
+/* harmony import */ var _HashRouter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./HashRouter */ "./node_modules/react-router-dom/es/HashRouter.js");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HashRouter", function() { return _HashRouter__WEBPACK_IMPORTED_MODULE_1__["default"]; });
+
+/* harmony import */ var _Link__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Link */ "./node_modules/react-router-dom/es/Link.js");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Link", function() { return _Link__WEBPACK_IMPORTED_MODULE_2__["default"]; });
+
+/* harmony import */ var _MemoryRouter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./MemoryRouter */ "./node_modules/react-router-dom/es/MemoryRouter.js");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MemoryRouter", function() { return _MemoryRouter__WEBPACK_IMPORTED_MODULE_3__["default"]; });
+
+/* harmony import */ var _NavLink__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./NavLink */ "./node_modules/react-router-dom/es/NavLink.js");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NavLink", function() { return _NavLink__WEBPACK_IMPORTED_MODULE_4__["default"]; });
+
+/* harmony import */ var _Prompt__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Prompt */ "./node_modules/react-router-dom/es/Prompt.js");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Prompt", function() { return _Prompt__WEBPACK_IMPORTED_MODULE_5__["default"]; });
+
+/* harmony import */ var _Redirect__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Redirect */ "./node_modules/react-router-dom/es/Redirect.js");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Redirect", function() { return _Redirect__WEBPACK_IMPORTED_MODULE_6__["default"]; });
+
+/* harmony import */ var _Route__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Route */ "./node_modules/react-router-dom/es/Route.js");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Route", function() { return _Route__WEBPACK_IMPORTED_MODULE_7__["default"]; });
+
+/* harmony import */ var _Router__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Router */ "./node_modules/react-router-dom/es/Router.js");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Router", function() { return _Router__WEBPACK_IMPORTED_MODULE_8__["default"]; });
+
+/* harmony import */ var _StaticRouter__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./StaticRouter */ "./node_modules/react-router-dom/es/StaticRouter.js");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StaticRouter", function() { return _StaticRouter__WEBPACK_IMPORTED_MODULE_9__["default"]; });
+
+/* harmony import */ var _Switch__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Switch */ "./node_modules/react-router-dom/es/Switch.js");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Switch", function() { return _Switch__WEBPACK_IMPORTED_MODULE_10__["default"]; });
+
+/* harmony import */ var _matchPath__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./matchPath */ "./node_modules/react-router-dom/es/matchPath.js");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matchPath", function() { return _matchPath__WEBPACK_IMPORTED_MODULE_11__["default"]; });
+
+/* harmony import */ var _withRouter__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./withRouter */ "./node_modules/react-router-dom/es/withRouter.js");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withRouter", function() { return _withRouter__WEBPACK_IMPORTED_MODULE_12__["default"]; });
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/es/matchPath.js":
+/*!*******************************************************!*\
+  !*** ./node_modules/react-router-dom/es/matchPath.js ***!
+  \*******************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var react_router_es_matchPath__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-router/es/matchPath */ "./node_modules/react-router-dom/node_modules/react-router/es/matchPath.js");
+// Written in this round about way for babel-transform-imports
+
+
+/* harmony default export */ __webpack_exports__["default"] = (react_router_es_matchPath__WEBPACK_IMPORTED_MODULE_0__["default"]);
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/es/withRouter.js":
+/*!********************************************************!*\
+  !*** ./node_modules/react-router-dom/es/withRouter.js ***!
+  \********************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var react_router_es_withRouter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-router/es/withRouter */ "./node_modules/react-router-dom/node_modules/react-router/es/withRouter.js");
+// Written in this round about way for babel-transform-imports
+
+
+/* harmony default export */ __webpack_exports__["default"] = (react_router_es_withRouter__WEBPACK_IMPORTED_MODULE_0__["default"]);
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/fbjs/lib/emptyFunction.js":
+/*!******************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/fbjs/lib/emptyFunction.js ***!
+  \******************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ * 
+ */
+
+function makeEmptyFunction(arg) {
+  return function () {
+    return arg;
+  };
+}
+
+/**
+ * This function accepts and discards inputs; it has no side effects. This is
+ * primarily useful idiomatically for overridable function endpoints which
+ * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
+ */
+var emptyFunction = function emptyFunction() {};
+
+emptyFunction.thatReturns = makeEmptyFunction;
+emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
+emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
+emptyFunction.thatReturnsNull = makeEmptyFunction(null);
+emptyFunction.thatReturnsThis = function () {
+  return this;
+};
+emptyFunction.thatReturnsArgument = function (arg) {
+  return arg;
+};
+
+module.exports = emptyFunction;
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/fbjs/lib/invariant.js":
+/*!**************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/fbjs/lib/invariant.js ***!
+  \**************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+
+
+
+/**
+ * Use invariant() to assert state which your program assumes to be true.
+ *
+ * Provide sprintf-style format (only %s is supported) and arguments
+ * to provide information about what broke and what you were
+ * expecting.
+ *
+ * The invariant message will be stripped in production, but the invariant
+ * will remain to ensure logic does not differ in production.
+ */
+
+var validateFormat = function validateFormat(format) {};
+
+if (true) {
+  validateFormat = function validateFormat(format) {
+    if (format === undefined) {
+      throw new Error('invariant requires an error message argument');
+    }
+  };
+}
+
+function invariant(condition, format, a, b, c, d, e, f) {
+  validateFormat(format);
+
+  if (!condition) {
+    var error;
+    if (format === undefined) {
+      error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
+    } else {
+      var args = [a, b, c, d, e, f];
+      var argIndex = 0;
+      error = new Error(format.replace(/%s/g, function () {
+        return args[argIndex++];
+      }));
+      error.name = 'Invariant Violation';
+    }
+
+    error.framesToPop = 1; // we don't care about invariant's own frame
+    throw error;
+  }
+}
+
+module.exports = invariant;
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/fbjs/lib/warning.js":
+/*!************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/fbjs/lib/warning.js ***!
+  \************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright (c) 2014-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+
+
+
+var emptyFunction = __webpack_require__(/*! ./emptyFunction */ "./node_modules/react-router-dom/node_modules/fbjs/lib/emptyFunction.js");
+
+/**
+ * Similar to invariant but only logs a warning if the condition is not met.
+ * This can be used to log issues in development environments in critical
+ * paths. Removing the logging code for production environments will keep the
+ * same logic and follow the same code paths.
+ */
+
+var warning = emptyFunction;
+
+if (true) {
+  var printWarning = function printWarning(format) {
+    for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+      args[_key - 1] = arguments[_key];
+    }
+
+    var argIndex = 0;
+    var message = 'Warning: ' + format.replace(/%s/g, function () {
+      return args[argIndex++];
+    });
+    if (typeof console !== 'undefined') {
+      console.error(message);
+    }
+    try {
+      // --- Welcome to debugging React ---
+      // This error was thrown as a convenience so that you can use this stack
+      // to find the callsite that caused this warning to fire.
+      throw new Error(message);
+    } catch (x) {}
+  };
+
+  warning = function warning(condition, format) {
+    if (format === undefined) {
+      throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
+    }
+
+    if (format.indexOf('Failed Composite propType: ') === 0) {
+      return; // Ignore CompositeComponent proptype check.
+    }
+
+    if (!condition) {
+      for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
+        args[_key2 - 2] = arguments[_key2];
+      }
+
+      printWarning.apply(undefined, [format].concat(args));
+    }
+  };
+}
+
+module.exports = warning;
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/history/DOMUtils.js":
+/*!************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/history/DOMUtils.js ***!
+  \************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+var canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
+
+var addEventListener = exports.addEventListener = function addEventListener(node, event, listener) {
+  return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener);
+};
+
+var removeEventListener = exports.removeEventListener = function removeEventListener(node, event, listener) {
+  return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener);
+};
+
+var getConfirmation = exports.getConfirmation = function getConfirmation(message, callback) {
+  return callback(window.confirm(message));
+}; // eslint-disable-line no-alert
+
+/**
+ * Returns true if the HTML5 history API is supported. Taken from Modernizr.
+ *
+ * https://github.com/Modernizr/Modernizr/blob/master/LICENSE
+ * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js
+ * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586
+ */
+var supportsHistory = exports.supportsHistory = function supportsHistory() {
+  var ua = window.navigator.userAgent;
+
+  if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;
+
+  return window.history && 'pushState' in window.history;
+};
+
+/**
+ * Returns true if browser fires popstate on hash change.
+ * IE10 and IE11 do not.
+ */
+var supportsPopStateOnHashChange = exports.supportsPopStateOnHashChange = function supportsPopStateOnHashChange() {
+  return window.navigator.userAgent.indexOf('Trident') === -1;
+};
+
+/**
+ * Returns false if using go(n) with hash history causes a full page reload.
+ */
+var supportsGoWithoutReloadUsingHash = exports.supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() {
+  return window.navigator.userAgent.indexOf('Firefox') === -1;
+};
+
+/**
+ * Returns true if a given popstate event is an extraneous WebKit event.
+ * Accounts for the fact that Chrome on iOS fires real popstate events
+ * containing undefined state when pressing the back button.
+ */
+var isExtraneousPopstateEvent = exports.isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) {
+  return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;
+};
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/history/LocationUtils.js":
+/*!*****************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/history/LocationUtils.js ***!
+  \*****************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+exports.locationsAreEqual = exports.createLocation = undefined;
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _resolvePathname = __webpack_require__(/*! resolve-pathname */ "./node_modules/react-router-dom/node_modules/resolve-pathname/index.js");
+
+var _resolvePathname2 = _interopRequireDefault(_resolvePathname);
+
+var _valueEqual = __webpack_require__(/*! value-equal */ "./node_modules/react-router-dom/node_modules/value-equal/index.js");
+
+var _valueEqual2 = _interopRequireDefault(_valueEqual);
+
+var _PathUtils = __webpack_require__(/*! ./PathUtils */ "./node_modules/react-router-dom/node_modules/history/PathUtils.js");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var createLocation = exports.createLocation = function createLocation(path, state, key, currentLocation) {
+  var location = void 0;
+  if (typeof path === 'string') {
+    // Two-arg form: push(path, state)
+    location = (0, _PathUtils.parsePath)(path);
+    location.state = state;
+  } else {
+    // One-arg form: push(location)
+    location = _extends({}, path);
+
+    if (location.pathname === undefined) location.pathname = '';
+
+    if (location.search) {
+      if (location.search.charAt(0) !== '?') location.search = '?' + location.search;
+    } else {
+      location.search = '';
+    }
+
+    if (location.hash) {
+      if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;
+    } else {
+      location.hash = '';
+    }
+
+    if (state !== undefined && location.state === undefined) location.state = state;
+  }
+
+  try {
+    location.pathname = decodeURI(location.pathname);
+  } catch (e) {
+    if (e instanceof URIError) {
+      throw new URIError('Pathname "' + location.pathname + '" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');
+    } else {
+      throw e;
+    }
+  }
+
+  if (key) location.key = key;
+
+  if (currentLocation) {
+    // Resolve incomplete/relative pathname relative to current location.
+    if (!location.pathname) {
+      location.pathname = currentLocation.pathname;
+    } else if (location.pathname.charAt(0) !== '/') {
+      location.pathname = (0, _resolvePathname2.default)(location.pathname, currentLocation.pathname);
+    }
+  } else {
+    // When there is no prior location and pathname is empty, set it to /
+    if (!location.pathname) {
+      location.pathname = '/';
+    }
+  }
+
+  return location;
+};
+
+var locationsAreEqual = exports.locationsAreEqual = function locationsAreEqual(a, b) {
+  return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && (0, _valueEqual2.default)(a.state, b.state);
+};
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/history/PathUtils.js":
+/*!*************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/history/PathUtils.js ***!
+  \*************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+var addLeadingSlash = exports.addLeadingSlash = function addLeadingSlash(path) {
+  return path.charAt(0) === '/' ? path : '/' + path;
+};
+
+var stripLeadingSlash = exports.stripLeadingSlash = function stripLeadingSlash(path) {
+  return path.charAt(0) === '/' ? path.substr(1) : path;
+};
+
+var hasBasename = exports.hasBasename = function hasBasename(path, prefix) {
+  return new RegExp('^' + prefix + '(\\/|\\?|#|$)', 'i').test(path);
+};
+
+var stripBasename = exports.stripBasename = function stripBasename(path, prefix) {
+  return hasBasename(path, prefix) ? path.substr(prefix.length) : path;
+};
+
+var stripTrailingSlash = exports.stripTrailingSlash = function stripTrailingSlash(path) {
+  return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;
+};
+
+var parsePath = exports.parsePath = function parsePath(path) {
+  var pathname = path || '/';
+  var search = '';
+  var hash = '';
+
+  var hashIndex = pathname.indexOf('#');
+  if (hashIndex !== -1) {
+    hash = pathname.substr(hashIndex);
+    pathname = pathname.substr(0, hashIndex);
+  }
+
+  var searchIndex = pathname.indexOf('?');
+  if (searchIndex !== -1) {
+    search = pathname.substr(searchIndex);
+    pathname = pathname.substr(0, searchIndex);
+  }
+
+  return {
+    pathname: pathname,
+    search: search === '?' ? '' : search,
+    hash: hash === '#' ? '' : hash
+  };
+};
+
+var createPath = exports.createPath = function createPath(location) {
+  var pathname = location.pathname,
+      search = location.search,
+      hash = location.hash;
+
+
+  var path = pathname || '/';
+
+  if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search;
+
+  if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash;
+
+  return path;
+};
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/history/createBrowserHistory.js":
+/*!************************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/history/createBrowserHistory.js ***!
+  \************************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _warning = __webpack_require__(/*! warning */ "./node_modules/react-router-dom/node_modules/warning/browser.js");
+
+var _warning2 = _interopRequireDefault(_warning);
+
+var _invariant = __webpack_require__(/*! invariant */ "./node_modules/react-router-dom/node_modules/invariant/browser.js");
+
+var _invariant2 = _interopRequireDefault(_invariant);
+
+var _LocationUtils = __webpack_require__(/*! ./LocationUtils */ "./node_modules/react-router-dom/node_modules/history/LocationUtils.js");
+
+var _PathUtils = __webpack_require__(/*! ./PathUtils */ "./node_modules/react-router-dom/node_modules/history/PathUtils.js");
+
+var _createTransitionManager = __webpack_require__(/*! ./createTransitionManager */ "./node_modules/react-router-dom/node_modules/history/createTransitionManager.js");
+
+var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager);
+
+var _DOMUtils = __webpack_require__(/*! ./DOMUtils */ "./node_modules/react-router-dom/node_modules/history/DOMUtils.js");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var PopStateEvent = 'popstate';
+var HashChangeEvent = 'hashchange';
+
+var getHistoryState = function getHistoryState() {
+  try {
+    return window.history.state || {};
+  } catch (e) {
+    // IE 11 sometimes throws when accessing window.history.state
+    // See https://github.com/ReactTraining/history/pull/289
+    return {};
+  }
+};
+
+/**
+ * Creates a history object that uses the HTML5 history API including
+ * pushState, replaceState, and the popstate event.
+ */
+var createBrowserHistory = function createBrowserHistory() {
+  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+
+  (0, _invariant2.default)(_DOMUtils.canUseDOM, 'Browser history needs a DOM');
+
+  var globalHistory = window.history;
+  var canUseHistory = (0, _DOMUtils.supportsHistory)();
+  var needsHashChangeListener = !(0, _DOMUtils.supportsPopStateOnHashChange)();
+
+  var _props$forceRefresh = props.forceRefresh,
+      forceRefresh = _props$forceRefresh === undefined ? false : _props$forceRefresh,
+      _props$getUserConfirm = props.getUserConfirmation,
+      getUserConfirmation = _props$getUserConfirm === undefined ? _DOMUtils.getConfirmation : _props$getUserConfirm,
+      _props$keyLength = props.keyLength,
+      keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;
+
+  var basename = props.basename ? (0, _PathUtils.stripTrailingSlash)((0, _PathUtils.addLeadingSlash)(props.basename)) : '';
+
+  var getDOMLocation = function getDOMLocation(historyState) {
+    var _ref = historyState || {},
+        key = _ref.key,
+        state = _ref.state;
+
+    var _window$location = window.location,
+        pathname = _window$location.pathname,
+        search = _window$location.search,
+        hash = _window$location.hash;
+
+
+    var path = pathname + search + hash;
+
+    (0, _warning2.default)(!basename || (0, _PathUtils.hasBasename)(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path "' + path + '" to begin with "' + basename + '".');
+
+    if (basename) path = (0, _PathUtils.stripBasename)(path, basename);
+
+    return (0, _LocationUtils.createLocation)(path, state, key);
+  };
+
+  var createKey = function createKey() {
+    return Math.random().toString(36).substr(2, keyLength);
+  };
+
+  var transitionManager = (0, _createTransitionManager2.default)();
+
+  var setState = function setState(nextState) {
+    _extends(history, nextState);
+
+    history.length = globalHistory.length;
+
+    transitionManager.notifyListeners(history.location, history.action);
+  };
+
+  var handlePopState = function handlePopState(event) {
+    // Ignore extraneous popstate events in WebKit.
+    if ((0, _DOMUtils.isExtraneousPopstateEvent)(event)) return;
+
+    handlePop(getDOMLocation(event.state));
+  };
+
+  var handleHashChange = function handleHashChange() {
+    handlePop(getDOMLocation(getHistoryState()));
+  };
+
+  var forceNextPop = false;
+
+  var handlePop = function handlePop(location) {
+    if (forceNextPop) {
+      forceNextPop = false;
+      setState();
+    } else {
+      var action = 'POP';
+
+      transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
+        if (ok) {
+          setState({ action: action, location: location });
+        } else {
+          revertPop(location);
+        }
+      });
+    }
+  };
+
+  var revertPop = function revertPop(fromLocation) {
+    var toLocation = history.location;
+
+    // TODO: We could probably make this more reliable by
+    // keeping a list of keys we've seen in sessionStorage.
+    // Instead, we just default to 0 for keys we don't know.
+
+    var toIndex = allKeys.indexOf(toLocation.key);
+
+    if (toIndex === -1) toIndex = 0;
+
+    var fromIndex = allKeys.indexOf(fromLocation.key);
+
+    if (fromIndex === -1) fromIndex = 0;
+
+    var delta = toIndex - fromIndex;
+
+    if (delta) {
+      forceNextPop = true;
+      go(delta);
+    }
+  };
+
+  var initialLocation = getDOMLocation(getHistoryState());
+  var allKeys = [initialLocation.key];
+
+  // Public interface
+
+  var createHref = function createHref(location) {
+    return basename + (0, _PathUtils.createPath)(location);
+  };
+
+  var push = function push(path, state) {
+    (0, _warning2.default)(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');
+
+    var action = 'PUSH';
+    var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location);
+
+    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
+      if (!ok) return;
+
+      var href = createHref(location);
+      var key = location.key,
+          state = location.state;
+
+
+      if (canUseHistory) {
+        globalHistory.pushState({ key: key, state: state }, null, href);
+
+        if (forceRefresh) {
+          window.location.href = href;
+        } else {
+          var prevIndex = allKeys.indexOf(history.location.key);
+          var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);
+
+          nextKeys.push(location.key);
+          allKeys = nextKeys;
+
+          setState({ action: action, location: location });
+        }
+      } else {
+        (0, _warning2.default)(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history');
+
+        window.location.href = href;
+      }
+    });
+  };
+
+  var replace = function replace(path, state) {
+    (0, _warning2.default)(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');
+
+    var action = 'REPLACE';
+    var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location);
+
+    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
+      if (!ok) return;
+
+      var href = createHref(location);
+      var key = location.key,
+          state = location.state;
+
+
+      if (canUseHistory) {
+        globalHistory.replaceState({ key: key, state: state }, null, href);
+
+        if (forceRefresh) {
+          window.location.replace(href);
+        } else {
+          var prevIndex = allKeys.indexOf(history.location.key);
+
+          if (prevIndex !== -1) allKeys[prevIndex] = location.key;
+
+          setState({ action: action, location: location });
+        }
+      } else {
+        (0, _warning2.default)(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history');
+
+        window.location.replace(href);
+      }
+    });
+  };
+
+  var go = function go(n) {
+    globalHistory.go(n);
+  };
+
+  var goBack = function goBack() {
+    return go(-1);
+  };
+
+  var goForward = function goForward() {
+    return go(1);
+  };
+
+  var listenerCount = 0;
+
+  var checkDOMListeners = function checkDOMListeners(delta) {
+    listenerCount += delta;
+
+    if (listenerCount === 1) {
+      (0, _DOMUtils.addEventListener)(window, PopStateEvent, handlePopState);
+
+      if (needsHashChangeListener) (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleHashChange);
+    } else if (listenerCount === 0) {
+      (0, _DOMUtils.removeEventListener)(window, PopStateEvent, handlePopState);
+
+      if (needsHashChangeListener) (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleHashChange);
+    }
+  };
+
+  var isBlocked = false;
+
+  var block = function block() {
+    var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
+
+    var unblock = transitionManager.setPrompt(prompt);
+
+    if (!isBlocked) {
+      checkDOMListeners(1);
+      isBlocked = true;
+    }
+
+    return function () {
+      if (isBlocked) {
+        isBlocked = false;
+        checkDOMListeners(-1);
+      }
+
+      return unblock();
+    };
+  };
+
+  var listen = function listen(listener) {
+    var unlisten = transitionManager.appendListener(listener);
+    checkDOMListeners(1);
+
+    return function () {
+      checkDOMListeners(-1);
+      unlisten();
+    };
+  };
+
+  var history = {
+    length: globalHistory.length,
+    action: 'POP',
+    location: initialLocation,
+    createHref: createHref,
+    push: push,
+    replace: replace,
+    go: go,
+    goBack: goBack,
+    goForward: goForward,
+    block: block,
+    listen: listen
+  };
+
+  return history;
+};
+
+exports.default = createBrowserHistory;
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/history/createHashHistory.js":
+/*!*********************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/history/createHashHistory.js ***!
+  \*********************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _warning = __webpack_require__(/*! warning */ "./node_modules/react-router-dom/node_modules/warning/browser.js");
+
+var _warning2 = _interopRequireDefault(_warning);
+
+var _invariant = __webpack_require__(/*! invariant */ "./node_modules/react-router-dom/node_modules/invariant/browser.js");
+
+var _invariant2 = _interopRequireDefault(_invariant);
+
+var _LocationUtils = __webpack_require__(/*! ./LocationUtils */ "./node_modules/react-router-dom/node_modules/history/LocationUtils.js");
+
+var _PathUtils = __webpack_require__(/*! ./PathUtils */ "./node_modules/react-router-dom/node_modules/history/PathUtils.js");
+
+var _createTransitionManager = __webpack_require__(/*! ./createTransitionManager */ "./node_modules/react-router-dom/node_modules/history/createTransitionManager.js");
+
+var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager);
+
+var _DOMUtils = __webpack_require__(/*! ./DOMUtils */ "./node_modules/react-router-dom/node_modules/history/DOMUtils.js");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var HashChangeEvent = 'hashchange';
+
+var HashPathCoders = {
+  hashbang: {
+    encodePath: function encodePath(path) {
+      return path.charAt(0) === '!' ? path : '!/' + (0, _PathUtils.stripLeadingSlash)(path);
+    },
+    decodePath: function decodePath(path) {
+      return path.charAt(0) === '!' ? path.substr(1) : path;
+    }
+  },
+  noslash: {
+    encodePath: _PathUtils.stripLeadingSlash,
+    decodePath: _PathUtils.addLeadingSlash
+  },
+  slash: {
+    encodePath: _PathUtils.addLeadingSlash,
+    decodePath: _PathUtils.addLeadingSlash
+  }
+};
+
+var getHashPath = function getHashPath() {
+  // We can't use window.location.hash here because it's not
+  // consistent across browsers - Firefox will pre-decode it!
+  var href = window.location.href;
+  var hashIndex = href.indexOf('#');
+  return hashIndex === -1 ? '' : href.substring(hashIndex + 1);
+};
+
+var pushHashPath = function pushHashPath(path) {
+  return window.location.hash = path;
+};
+
+var replaceHashPath = function replaceHashPath(path) {
+  var hashIndex = window.location.href.indexOf('#');
+
+  window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path);
+};
+
+var createHashHistory = function createHashHistory() {
+  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+
+  (0, _invariant2.default)(_DOMUtils.canUseDOM, 'Hash history needs a DOM');
+
+  var globalHistory = window.history;
+  var canGoWithoutReload = (0, _DOMUtils.supportsGoWithoutReloadUsingHash)();
+
+  var _props$getUserConfirm = props.getUserConfirmation,
+      getUserConfirmation = _props$getUserConfirm === undefined ? _DOMUtils.getConfirmation : _props$getUserConfirm,
+      _props$hashType = props.hashType,
+      hashType = _props$hashType === undefined ? 'slash' : _props$hashType;
+
+  var basename = props.basename ? (0, _PathUtils.stripTrailingSlash)((0, _PathUtils.addLeadingSlash)(props.basename)) : '';
+
+  var _HashPathCoders$hashT = HashPathCoders[hashType],
+      encodePath = _HashPathCoders$hashT.encodePath,
+      decodePath = _HashPathCoders$hashT.decodePath;
+
+
+  var getDOMLocation = function getDOMLocation() {
+    var path = decodePath(getHashPath());
+
+    (0, _warning2.default)(!basename || (0, _PathUtils.hasBasename)(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path "' + path + '" to begin with "' + basename + '".');
+
+    if (basename) path = (0, _PathUtils.stripBasename)(path, basename);
+
+    return (0, _LocationUtils.createLocation)(path);
+  };
+
+  var transitionManager = (0, _createTransitionManager2.default)();
+
+  var setState = function setState(nextState) {
+    _extends(history, nextState);
+
+    history.length = globalHistory.length;
+
+    transitionManager.notifyListeners(history.location, history.action);
+  };
+
+  var forceNextPop = false;
+  var ignorePath = null;
+
+  var handleHashChange = function handleHashChange() {
+    var path = getHashPath();
+    var encodedPath = encodePath(path);
+
+    if (path !== encodedPath) {
+      // Ensure we always have a properly-encoded hash.
+      replaceHashPath(encodedPath);
+    } else {
+      var location = getDOMLocation();
+      var prevLocation = history.location;
+
+      if (!forceNextPop && (0, _LocationUtils.locationsAreEqual)(prevLocation, location)) return; // A hashchange doesn't always == location change.
+
+      if (ignorePath === (0, _PathUtils.createPath)(location)) return; // Ignore this change; we already setState in push/replace.
+
+      ignorePath = null;
+
+      handlePop(location);
+    }
+  };
+
+  var handlePop = function handlePop(location) {
+    if (forceNextPop) {
+      forceNextPop = false;
+      setState();
+    } else {
+      var action = 'POP';
+
+      transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
+        if (ok) {
+          setState({ action: action, location: location });
+        } else {
+          revertPop(location);
+        }
+      });
+    }
+  };
+
+  var revertPop = function revertPop(fromLocation) {
+    var toLocation = history.location;
+
+    // TODO: We could probably make this more reliable by
+    // keeping a list of paths we've seen in sessionStorage.
+    // Instead, we just default to 0 for paths we don't know.
+
+    var toIndex = allPaths.lastIndexOf((0, _PathUtils.createPath)(toLocation));
+
+    if (toIndex === -1) toIndex = 0;
+
+    var fromIndex = allPaths.lastIndexOf((0, _PathUtils.createPath)(fromLocation));
+
+    if (fromIndex === -1) fromIndex = 0;
+
+    var delta = toIndex - fromIndex;
+
+    if (delta) {
+      forceNextPop = true;
+      go(delta);
+    }
+  };
+
+  // Ensure the hash is encoded properly before doing anything else.
+  var path = getHashPath();
+  var encodedPath = encodePath(path);
+
+  if (path !== encodedPath) replaceHashPath(encodedPath);
+
+  var initialLocation = getDOMLocation();
+  var allPaths = [(0, _PathUtils.createPath)(initialLocation)];
+
+  // Public interface
+
+  var createHref = function createHref(location) {
+    return '#' + encodePath(basename + (0, _PathUtils.createPath)(location));
+  };
+
+  var push = function push(path, state) {
+    (0, _warning2.default)(state === undefined, 'Hash history cannot push state; it is ignored');
+
+    var action = 'PUSH';
+    var location = (0, _LocationUtils.createLocation)(path, undefined, undefined, history.location);
+
+    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
+      if (!ok) return;
+
+      var path = (0, _PathUtils.createPath)(location);
+      var encodedPath = encodePath(basename + path);
+      var hashChanged = getHashPath() !== encodedPath;
+
+      if (hashChanged) {
+        // We cannot tell if a hashchange was caused by a PUSH, so we'd
+        // rather setState here and ignore the hashchange. The caveat here
+        // is that other hash histories in the page will consider it a POP.
+        ignorePath = path;
+        pushHashPath(encodedPath);
+
+        var prevIndex = allPaths.lastIndexOf((0, _PathUtils.createPath)(history.location));
+        var nextPaths = allPaths.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);
+
+        nextPaths.push(path);
+        allPaths = nextPaths;
+
+        setState({ action: action, location: location });
+      } else {
+        (0, _warning2.default)(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack');
+
+        setState();
+      }
+    });
+  };
+
+  var replace = function replace(path, state) {
+    (0, _warning2.default)(state === undefined, 'Hash history cannot replace state; it is ignored');
+
+    var action = 'REPLACE';
+    var location = (0, _LocationUtils.createLocation)(path, undefined, undefined, history.location);
+
+    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
+      if (!ok) return;
+
+      var path = (0, _PathUtils.createPath)(location);
+      var encodedPath = encodePath(basename + path);
+      var hashChanged = getHashPath() !== encodedPath;
+
+      if (hashChanged) {
+        // We cannot tell if a hashchange was caused by a REPLACE, so we'd
+        // rather setState here and ignore the hashchange. The caveat here
+        // is that other hash histories in the page will consider it a POP.
+        ignorePath = path;
+        replaceHashPath(encodedPath);
+      }
+
+      var prevIndex = allPaths.indexOf((0, _PathUtils.createPath)(history.location));
+
+      if (prevIndex !== -1) allPaths[prevIndex] = path;
+
+      setState({ action: action, location: location });
+    });
+  };
+
+  var go = function go(n) {
+    (0, _warning2.default)(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser');
+
+    globalHistory.go(n);
+  };
+
+  var goBack = function goBack() {
+    return go(-1);
+  };
+
+  var goForward = function goForward() {
+    return go(1);
+  };
+
+  var listenerCount = 0;
+
+  var checkDOMListeners = function checkDOMListeners(delta) {
+    listenerCount += delta;
+
+    if (listenerCount === 1) {
+      (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleHashChange);
+    } else if (listenerCount === 0) {
+      (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleHashChange);
+    }
+  };
+
+  var isBlocked = false;
+
+  var block = function block() {
+    var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
+
+    var unblock = transitionManager.setPrompt(prompt);
+
+    if (!isBlocked) {
+      checkDOMListeners(1);
+      isBlocked = true;
+    }
+
+    return function () {
+      if (isBlocked) {
+        isBlocked = false;
+        checkDOMListeners(-1);
+      }
+
+      return unblock();
+    };
+  };
+
+  var listen = function listen(listener) {
+    var unlisten = transitionManager.appendListener(listener);
+    checkDOMListeners(1);
+
+    return function () {
+      checkDOMListeners(-1);
+      unlisten();
+    };
+  };
+
+  var history = {
+    length: globalHistory.length,
+    action: 'POP',
+    location: initialLocation,
+    createHref: createHref,
+    push: push,
+    replace: replace,
+    go: go,
+    goBack: goBack,
+    goForward: goForward,
+    block: block,
+    listen: listen
+  };
+
+  return history;
+};
+
+exports.default = createHashHistory;
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/history/createTransitionManager.js":
+/*!***************************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/history/createTransitionManager.js ***!
+  \***************************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+
+var _warning = __webpack_require__(/*! warning */ "./node_modules/react-router-dom/node_modules/warning/browser.js");
+
+var _warning2 = _interopRequireDefault(_warning);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var createTransitionManager = function createTransitionManager() {
+  var prompt = null;
+
+  var setPrompt = function setPrompt(nextPrompt) {
+    (0, _warning2.default)(prompt == null, 'A history supports only one prompt at a time');
+
+    prompt = nextPrompt;
+
+    return function () {
+      if (prompt === nextPrompt) prompt = null;
+    };
+  };
+
+  var confirmTransitionTo = function confirmTransitionTo(location, action, getUserConfirmation, callback) {
+    // TODO: If another transition starts while we're still confirming
+    // the previous one, we may end up in a weird state. Figure out the
+    // best way to handle this.
+    if (prompt != null) {
+      var result = typeof prompt === 'function' ? prompt(location, action) : prompt;
+
+      if (typeof result === 'string') {
+        if (typeof getUserConfirmation === 'function') {
+          getUserConfirmation(result, callback);
+        } else {
+          (0, _warning2.default)(false, 'A history needs a getUserConfirmation function in order to use a prompt message');
+
+          callback(true);
+        }
+      } else {
+        // Return false from a transition hook to cancel the transition.
+        callback(result !== false);
+      }
+    } else {
+      callback(true);
+    }
+  };
+
+  var listeners = [];
+
+  var appendListener = function appendListener(fn) {
+    var isActive = true;
+
+    var listener = function listener() {
+      if (isActive) fn.apply(undefined, arguments);
+    };
+
+    listeners.push(listener);
+
+    return function () {
+      isActive = false;
+      listeners = listeners.filter(function (item) {
+        return item !== listener;
+      });
+    };
+  };
+
+  var notifyListeners = function notifyListeners() {
+    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+      args[_key] = arguments[_key];
+    }
+
+    listeners.forEach(function (listener) {
+      return listener.apply(undefined, args);
+    });
+  };
+
+  return {
+    setPrompt: setPrompt,
+    confirmTransitionTo: confirmTransitionTo,
+    appendListener: appendListener,
+    notifyListeners: notifyListeners
+  };
+};
+
+exports.default = createTransitionManager;
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/history/es/DOMUtils.js":
+/*!***************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/history/es/DOMUtils.js ***!
+  \***************************************************************************/
+/*! exports provided: canUseDOM, addEventListener, removeEventListener, getConfirmation, supportsHistory, supportsPopStateOnHashChange, supportsGoWithoutReloadUsingHash, isExtraneousPopstateEvent */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "canUseDOM", function() { return canUseDOM; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addEventListener", function() { return addEventListener; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeEventListener", function() { return removeEventListener; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getConfirmation", function() { return getConfirmation; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "supportsHistory", function() { return supportsHistory; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "supportsPopStateOnHashChange", function() { return supportsPopStateOnHashChange; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "supportsGoWithoutReloadUsingHash", function() { return supportsGoWithoutReloadUsingHash; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isExtraneousPopstateEvent", function() { return isExtraneousPopstateEvent; });
+var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
+
+var addEventListener = function addEventListener(node, event, listener) {
+  return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener);
+};
+
+var removeEventListener = function removeEventListener(node, event, listener) {
+  return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener);
+};
+
+var getConfirmation = function getConfirmation(message, callback) {
+  return callback(window.confirm(message));
+}; // eslint-disable-line no-alert
+
+/**
+ * Returns true if the HTML5 history API is supported. Taken from Modernizr.
+ *
+ * https://github.com/Modernizr/Modernizr/blob/master/LICENSE
+ * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js
+ * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586
+ */
+var supportsHistory = function supportsHistory() {
+  var ua = window.navigator.userAgent;
+
+  if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;
+
+  return window.history && 'pushState' in window.history;
+};
+
+/**
+ * Returns true if browser fires popstate on hash change.
+ * IE10 and IE11 do not.
+ */
+var supportsPopStateOnHashChange = function supportsPopStateOnHashChange() {
+  return window.navigator.userAgent.indexOf('Trident') === -1;
+};
+
+/**
+ * Returns false if using go(n) with hash history causes a full page reload.
+ */
+var supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() {
+  return window.navigator.userAgent.indexOf('Firefox') === -1;
+};
+
+/**
+ * Returns true if a given popstate event is an extraneous WebKit event.
+ * Accounts for the fact that Chrome on iOS fires real popstate events
+ * containing undefined state when pressing the back button.
+ */
+var isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) {
+  return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;
+};
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/history/es/LocationUtils.js":
+/*!********************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/history/es/LocationUtils.js ***!
+  \********************************************************************************/
+/*! exports provided: createLocation, locationsAreEqual */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createLocation", function() { return createLocation; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "locationsAreEqual", function() { return locationsAreEqual; });
+/* harmony import */ var resolve_pathname__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! resolve-pathname */ "./node_modules/react-router-dom/node_modules/resolve-pathname/index.js");
+/* harmony import */ var value_equal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! value-equal */ "./node_modules/react-router-dom/node_modules/value-equal/index.js");
+/* harmony import */ var _PathUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PathUtils */ "./node_modules/react-router-dom/node_modules/history/es/PathUtils.js");
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+
+
+
+
+var createLocation = function createLocation(path, state, key, currentLocation) {
+  var location = void 0;
+  if (typeof path === 'string') {
+    // Two-arg form: push(path, state)
+    location = Object(_PathUtils__WEBPACK_IMPORTED_MODULE_2__["parsePath"])(path);
+    location.state = state;
+  } else {
+    // One-arg form: push(location)
+    location = _extends({}, path);
+
+    if (location.pathname === undefined) location.pathname = '';
+
+    if (location.search) {
+      if (location.search.charAt(0) !== '?') location.search = '?' + location.search;
+    } else {
+      location.search = '';
+    }
+
+    if (location.hash) {
+      if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;
+    } else {
+      location.hash = '';
+    }
+
+    if (state !== undefined && location.state === undefined) location.state = state;
+  }
+
+  try {
+    location.pathname = decodeURI(location.pathname);
+  } catch (e) {
+    if (e instanceof URIError) {
+      throw new URIError('Pathname "' + location.pathname + '" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');
+    } else {
+      throw e;
+    }
+  }
+
+  if (key) location.key = key;
+
+  if (currentLocation) {
+    // Resolve incomplete/relative pathname relative to current location.
+    if (!location.pathname) {
+      location.pathname = currentLocation.pathname;
+    } else if (location.pathname.charAt(0) !== '/') {
+      location.pathname = Object(resolve_pathname__WEBPACK_IMPORTED_MODULE_0__["default"])(location.pathname, currentLocation.pathname);
+    }
+  } else {
+    // When there is no prior location and pathname is empty, set it to /
+    if (!location.pathname) {
+      location.pathname = '/';
+    }
+  }
+
+  return location;
+};
+
+var locationsAreEqual = function locationsAreEqual(a, b) {
+  return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && Object(value_equal__WEBPACK_IMPORTED_MODULE_1__["default"])(a.state, b.state);
+};
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/history/es/PathUtils.js":
+/*!****************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/history/es/PathUtils.js ***!
+  \****************************************************************************/
+/*! exports provided: addLeadingSlash, stripLeadingSlash, hasBasename, stripBasename, stripTrailingSlash, parsePath, createPath */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addLeadingSlash", function() { return addLeadingSlash; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stripLeadingSlash", function() { return stripLeadingSlash; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasBasename", function() { return hasBasename; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stripBasename", function() { return stripBasename; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stripTrailingSlash", function() { return stripTrailingSlash; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parsePath", function() { return parsePath; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createPath", function() { return createPath; });
+var addLeadingSlash = function addLeadingSlash(path) {
+  return path.charAt(0) === '/' ? path : '/' + path;
+};
+
+var stripLeadingSlash = function stripLeadingSlash(path) {
+  return path.charAt(0) === '/' ? path.substr(1) : path;
+};
+
+var hasBasename = function hasBasename(path, prefix) {
+  return new RegExp('^' + prefix + '(\\/|\\?|#|$)', 'i').test(path);
+};
+
+var stripBasename = function stripBasename(path, prefix) {
+  return hasBasename(path, prefix) ? path.substr(prefix.length) : path;
+};
+
+var stripTrailingSlash = function stripTrailingSlash(path) {
+  return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;
+};
+
+var parsePath = function parsePath(path) {
+  var pathname = path || '/';
+  var search = '';
+  var hash = '';
+
+  var hashIndex = pathname.indexOf('#');
+  if (hashIndex !== -1) {
+    hash = pathname.substr(hashIndex);
+    pathname = pathname.substr(0, hashIndex);
+  }
+
+  var searchIndex = pathname.indexOf('?');
+  if (searchIndex !== -1) {
+    search = pathname.substr(searchIndex);
+    pathname = pathname.substr(0, searchIndex);
+  }
+
+  return {
+    pathname: pathname,
+    search: search === '?' ? '' : search,
+    hash: hash === '#' ? '' : hash
+  };
+};
+
+var createPath = function createPath(location) {
+  var pathname = location.pathname,
+      search = location.search,
+      hash = location.hash;
+
+
+  var path = pathname || '/';
+
+  if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search;
+
+  if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash;
+
+  return path;
+};
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/history/es/createBrowserHistory.js":
+/*!***************************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/history/es/createBrowserHistory.js ***!
+  \***************************************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! warning */ "./node_modules/react-router-dom/node_modules/warning/browser.js");
+/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! invariant */ "./node_modules/react-router-dom/node_modules/invariant/browser.js");
+/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(invariant__WEBPACK_IMPORTED_MODULE_1__);
+/* harmony import */ var _LocationUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./LocationUtils */ "./node_modules/react-router-dom/node_modules/history/es/LocationUtils.js");
+/* harmony import */ var _PathUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PathUtils */ "./node_modules/react-router-dom/node_modules/history/es/PathUtils.js");
+/* harmony import */ var _createTransitionManager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./createTransitionManager */ "./node_modules/react-router-dom/node_modules/history/es/createTransitionManager.js");
+/* harmony import */ var _DOMUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./DOMUtils */ "./node_modules/react-router-dom/node_modules/history/es/DOMUtils.js");
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+
+
+
+
+
+
+
+var PopStateEvent = 'popstate';
+var HashChangeEvent = 'hashchange';
+
+var getHistoryState = function getHistoryState() {
+  try {
+    return window.history.state || {};
+  } catch (e) {
+    // IE 11 sometimes throws when accessing window.history.state
+    // See https://github.com/ReactTraining/history/pull/289
+    return {};
+  }
+};
+
+/**
+ * Creates a history object that uses the HTML5 history API including
+ * pushState, replaceState, and the popstate event.
+ */
+var createBrowserHistory = function createBrowserHistory() {
+  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+
+  invariant__WEBPACK_IMPORTED_MODULE_1___default()(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["canUseDOM"], 'Browser history needs a DOM');
+
+  var globalHistory = window.history;
+  var canUseHistory = Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["supportsHistory"])();
+  var needsHashChangeListener = !Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["supportsPopStateOnHashChange"])();
+
+  var _props$forceRefresh = props.forceRefresh,
+      forceRefresh = _props$forceRefresh === undefined ? false : _props$forceRefresh,
+      _props$getUserConfirm = props.getUserConfirmation,
+      getUserConfirmation = _props$getUserConfirm === undefined ? _DOMUtils__WEBPACK_IMPORTED_MODULE_5__["getConfirmation"] : _props$getUserConfirm,
+      _props$keyLength = props.keyLength,
+      keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;
+
+  var basename = props.basename ? Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["stripTrailingSlash"])(Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["addLeadingSlash"])(props.basename)) : '';
+
+  var getDOMLocation = function getDOMLocation(historyState) {
+    var _ref = historyState || {},
+        key = _ref.key,
+        state = _ref.state;
+
+    var _window$location = window.location,
+        pathname = _window$location.pathname,
+        search = _window$location.search,
+        hash = _window$location.hash;
+
+
+    var path = pathname + search + hash;
+
+    warning__WEBPACK_IMPORTED_MODULE_0___default()(!basename || Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["hasBasename"])(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path "' + path + '" to begin with "' + basename + '".');
+
+    if (basename) path = Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["stripBasename"])(path, basename);
+
+    return Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(path, state, key);
+  };
+
+  var createKey = function createKey() {
+    return Math.random().toString(36).substr(2, keyLength);
+  };
+
+  var transitionManager = Object(_createTransitionManager__WEBPACK_IMPORTED_MODULE_4__["default"])();
+
+  var setState = function setState(nextState) {
+    _extends(history, nextState);
+
+    history.length = globalHistory.length;
+
+    transitionManager.notifyListeners(history.location, history.action);
+  };
+
+  var handlePopState = function handlePopState(event) {
+    // Ignore extraneous popstate events in WebKit.
+    if (Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["isExtraneousPopstateEvent"])(event)) return;
+
+    handlePop(getDOMLocation(event.state));
+  };
+
+  var handleHashChange = function handleHashChange() {
+    handlePop(getDOMLocation(getHistoryState()));
+  };
+
+  var forceNextPop = false;
+
+  var handlePop = function handlePop(location) {
+    if (forceNextPop) {
+      forceNextPop = false;
+      setState();
+    } else {
+      var action = 'POP';
+
+      transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
+        if (ok) {
+          setState({ action: action, location: location });
+        } else {
+          revertPop(location);
+        }
+      });
+    }
+  };
+
+  var revertPop = function revertPop(fromLocation) {
+    var toLocation = history.location;
+
+    // TODO: We could probably make this more reliable by
+    // keeping a list of keys we've seen in sessionStorage.
+    // Instead, we just default to 0 for keys we don't know.
+
+    var toIndex = allKeys.indexOf(toLocation.key);
+
+    if (toIndex === -1) toIndex = 0;
+
+    var fromIndex = allKeys.indexOf(fromLocation.key);
+
+    if (fromIndex === -1) fromIndex = 0;
+
+    var delta = toIndex - fromIndex;
+
+    if (delta) {
+      forceNextPop = true;
+      go(delta);
+    }
+  };
+
+  var initialLocation = getDOMLocation(getHistoryState());
+  var allKeys = [initialLocation.key];
+
+  // Public interface
+
+  var createHref = function createHref(location) {
+    return basename + Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(location);
+  };
+
+  var push = function push(path, state) {
+    warning__WEBPACK_IMPORTED_MODULE_0___default()(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');
+
+    var action = 'PUSH';
+    var location = Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(path, state, createKey(), history.location);
+
+    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
+      if (!ok) return;
+
+      var href = createHref(location);
+      var key = location.key,
+          state = location.state;
+
+
+      if (canUseHistory) {
+        globalHistory.pushState({ key: key, state: state }, null, href);
+
+        if (forceRefresh) {
+          window.location.href = href;
+        } else {
+          var prevIndex = allKeys.indexOf(history.location.key);
+          var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);
+
+          nextKeys.push(location.key);
+          allKeys = nextKeys;
+
+          setState({ action: action, location: location });
+        }
+      } else {
+        warning__WEBPACK_IMPORTED_MODULE_0___default()(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history');
+
+        window.location.href = href;
+      }
+    });
+  };
+
+  var replace = function replace(path, state) {
+    warning__WEBPACK_IMPORTED_MODULE_0___default()(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');
+
+    var action = 'REPLACE';
+    var location = Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(path, state, createKey(), history.location);
+
+    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
+      if (!ok) return;
+
+      var href = createHref(location);
+      var key = location.key,
+          state = location.state;
+
+
+      if (canUseHistory) {
+        globalHistory.replaceState({ key: key, state: state }, null, href);
+
+        if (forceRefresh) {
+          window.location.replace(href);
+        } else {
+          var prevIndex = allKeys.indexOf(history.location.key);
+
+          if (prevIndex !== -1) allKeys[prevIndex] = location.key;
+
+          setState({ action: action, location: location });
+        }
+      } else {
+        warning__WEBPACK_IMPORTED_MODULE_0___default()(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history');
+
+        window.location.replace(href);
+      }
+    });
+  };
+
+  var go = function go(n) {
+    globalHistory.go(n);
+  };
+
+  var goBack = function goBack() {
+    return go(-1);
+  };
+
+  var goForward = function goForward() {
+    return go(1);
+  };
+
+  var listenerCount = 0;
+
+  var checkDOMListeners = function checkDOMListeners(delta) {
+    listenerCount += delta;
+
+    if (listenerCount === 1) {
+      Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["addEventListener"])(window, PopStateEvent, handlePopState);
+
+      if (needsHashChangeListener) Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["addEventListener"])(window, HashChangeEvent, handleHashChange);
+    } else if (listenerCount === 0) {
+      Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["removeEventListener"])(window, PopStateEvent, handlePopState);
+
+      if (needsHashChangeListener) Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["removeEventListener"])(window, HashChangeEvent, handleHashChange);
+    }
+  };
+
+  var isBlocked = false;
+
+  var block = function block() {
+    var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
+
+    var unblock = transitionManager.setPrompt(prompt);
+
+    if (!isBlocked) {
+      checkDOMListeners(1);
+      isBlocked = true;
+    }
+
+    return function () {
+      if (isBlocked) {
+        isBlocked = false;
+        checkDOMListeners(-1);
+      }
+
+      return unblock();
+    };
+  };
+
+  var listen = function listen(listener) {
+    var unlisten = transitionManager.appendListener(listener);
+    checkDOMListeners(1);
+
+    return function () {
+      checkDOMListeners(-1);
+      unlisten();
+    };
+  };
+
+  var history = {
+    length: globalHistory.length,
+    action: 'POP',
+    location: initialLocation,
+    createHref: createHref,
+    push: push,
+    replace: replace,
+    go: go,
+    goBack: goBack,
+    goForward: goForward,
+    block: block,
+    listen: listen
+  };
+
+  return history;
+};
+
+/* harmony default export */ __webpack_exports__["default"] = (createBrowserHistory);
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/history/es/createHashHistory.js":
+/*!************************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/history/es/createHashHistory.js ***!
+  \************************************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! warning */ "./node_modules/react-router-dom/node_modules/warning/browser.js");
+/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! invariant */ "./node_modules/react-router-dom/node_modules/invariant/browser.js");
+/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(invariant__WEBPACK_IMPORTED_MODULE_1__);
+/* harmony import */ var _LocationUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./LocationUtils */ "./node_modules/react-router-dom/node_modules/history/es/LocationUtils.js");
+/* harmony import */ var _PathUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PathUtils */ "./node_modules/react-router-dom/node_modules/history/es/PathUtils.js");
+/* harmony import */ var _createTransitionManager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./createTransitionManager */ "./node_modules/react-router-dom/node_modules/history/es/createTransitionManager.js");
+/* harmony import */ var _DOMUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./DOMUtils */ "./node_modules/react-router-dom/node_modules/history/es/DOMUtils.js");
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+
+
+
+
+
+
+
+var HashChangeEvent = 'hashchange';
+
+var HashPathCoders = {
+  hashbang: {
+    encodePath: function encodePath(path) {
+      return path.charAt(0) === '!' ? path : '!/' + Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["stripLeadingSlash"])(path);
+    },
+    decodePath: function decodePath(path) {
+      return path.charAt(0) === '!' ? path.substr(1) : path;
+    }
+  },
+  noslash: {
+    encodePath: _PathUtils__WEBPACK_IMPORTED_MODULE_3__["stripLeadingSlash"],
+    decodePath: _PathUtils__WEBPACK_IMPORTED_MODULE_3__["addLeadingSlash"]
+  },
+  slash: {
+    encodePath: _PathUtils__WEBPACK_IMPORTED_MODULE_3__["addLeadingSlash"],
+    decodePath: _PathUtils__WEBPACK_IMPORTED_MODULE_3__["addLeadingSlash"]
+  }
+};
+
+var getHashPath = function getHashPath() {
+  // We can't use window.location.hash here because it's not
+  // consistent across browsers - Firefox will pre-decode it!
+  var href = window.location.href;
+  var hashIndex = href.indexOf('#');
+  return hashIndex === -1 ? '' : href.substring(hashIndex + 1);
+};
+
+var pushHashPath = function pushHashPath(path) {
+  return window.location.hash = path;
+};
+
+var replaceHashPath = function replaceHashPath(path) {
+  var hashIndex = window.location.href.indexOf('#');
+
+  window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path);
+};
+
+var createHashHistory = function createHashHistory() {
+  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+
+  invariant__WEBPACK_IMPORTED_MODULE_1___default()(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["canUseDOM"], 'Hash history needs a DOM');
+
+  var globalHistory = window.history;
+  var canGoWithoutReload = Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["supportsGoWithoutReloadUsingHash"])();
+
+  var _props$getUserConfirm = props.getUserConfirmation,
+      getUserConfirmation = _props$getUserConfirm === undefined ? _DOMUtils__WEBPACK_IMPORTED_MODULE_5__["getConfirmation"] : _props$getUserConfirm,
+      _props$hashType = props.hashType,
+      hashType = _props$hashType === undefined ? 'slash' : _props$hashType;
+
+  var basename = props.basename ? Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["stripTrailingSlash"])(Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["addLeadingSlash"])(props.basename)) : '';
+
+  var _HashPathCoders$hashT = HashPathCoders[hashType],
+      encodePath = _HashPathCoders$hashT.encodePath,
+      decodePath = _HashPathCoders$hashT.decodePath;
+
+
+  var getDOMLocation = function getDOMLocation() {
+    var path = decodePath(getHashPath());
+
+    warning__WEBPACK_IMPORTED_MODULE_0___default()(!basename || Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["hasBasename"])(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path "' + path + '" to begin with "' + basename + '".');
+
+    if (basename) path = Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["stripBasename"])(path, basename);
+
+    return Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(path);
+  };
+
+  var transitionManager = Object(_createTransitionManager__WEBPACK_IMPORTED_MODULE_4__["default"])();
+
+  var setState = function setState(nextState) {
+    _extends(history, nextState);
+
+    history.length = globalHistory.length;
+
+    transitionManager.notifyListeners(history.location, history.action);
+  };
+
+  var forceNextPop = false;
+  var ignorePath = null;
+
+  var handleHashChange = function handleHashChange() {
+    var path = getHashPath();
+    var encodedPath = encodePath(path);
+
+    if (path !== encodedPath) {
+      // Ensure we always have a properly-encoded hash.
+      replaceHashPath(encodedPath);
+    } else {
+      var location = getDOMLocation();
+      var prevLocation = history.location;
+
+      if (!forceNextPop && Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["locationsAreEqual"])(prevLocation, location)) return; // A hashchange doesn't always == location change.
+
+      if (ignorePath === Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(location)) return; // Ignore this change; we already setState in push/replace.
+
+      ignorePath = null;
+
+      handlePop(location);
+    }
+  };
+
+  var handlePop = function handlePop(location) {
+    if (forceNextPop) {
+      forceNextPop = false;
+      setState();
+    } else {
+      var action = 'POP';
+
+      transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
+        if (ok) {
+          setState({ action: action, location: location });
+        } else {
+          revertPop(location);
+        }
+      });
+    }
+  };
+
+  var revertPop = function revertPop(fromLocation) {
+    var toLocation = history.location;
+
+    // TODO: We could probably make this more reliable by
+    // keeping a list of paths we've seen in sessionStorage.
+    // Instead, we just default to 0 for paths we don't know.
+
+    var toIndex = allPaths.lastIndexOf(Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(toLocation));
+
+    if (toIndex === -1) toIndex = 0;
+
+    var fromIndex = allPaths.lastIndexOf(Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(fromLocation));
+
+    if (fromIndex === -1) fromIndex = 0;
+
+    var delta = toIndex - fromIndex;
+
+    if (delta) {
+      forceNextPop = true;
+      go(delta);
+    }
+  };
+
+  // Ensure the hash is encoded properly before doing anything else.
+  var path = getHashPath();
+  var encodedPath = encodePath(path);
+
+  if (path !== encodedPath) replaceHashPath(encodedPath);
+
+  var initialLocation = getDOMLocation();
+  var allPaths = [Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(initialLocation)];
+
+  // Public interface
+
+  var createHref = function createHref(location) {
+    return '#' + encodePath(basename + Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(location));
+  };
+
+  var push = function push(path, state) {
+    warning__WEBPACK_IMPORTED_MODULE_0___default()(state === undefined, 'Hash history cannot push state; it is ignored');
+
+    var action = 'PUSH';
+    var location = Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(path, undefined, undefined, history.location);
+
+    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
+      if (!ok) return;
+
+      var path = Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(location);
+      var encodedPath = encodePath(basename + path);
+      var hashChanged = getHashPath() !== encodedPath;
+
+      if (hashChanged) {
+        // We cannot tell if a hashchange was caused by a PUSH, so we'd
+        // rather setState here and ignore the hashchange. The caveat here
+        // is that other hash histories in the page will consider it a POP.
+        ignorePath = path;
+        pushHashPath(encodedPath);
+
+        var prevIndex = allPaths.lastIndexOf(Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(history.location));
+        var nextPaths = allPaths.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);
+
+        nextPaths.push(path);
+        allPaths = nextPaths;
+
+        setState({ action: action, location: location });
+      } else {
+        warning__WEBPACK_IMPORTED_MODULE_0___default()(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack');
+
+        setState();
+      }
+    });
+  };
+
+  var replace = function replace(path, state) {
+    warning__WEBPACK_IMPORTED_MODULE_0___default()(state === undefined, 'Hash history cannot replace state; it is ignored');
+
+    var action = 'REPLACE';
+    var location = Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(path, undefined, undefined, history.location);
+
+    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
+      if (!ok) return;
+
+      var path = Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(location);
+      var encodedPath = encodePath(basename + path);
+      var hashChanged = getHashPath() !== encodedPath;
+
+      if (hashChanged) {
+        // We cannot tell if a hashchange was caused by a REPLACE, so we'd
+        // rather setState here and ignore the hashchange. The caveat here
+        // is that other hash histories in the page will consider it a POP.
+        ignorePath = path;
+        replaceHashPath(encodedPath);
+      }
+
+      var prevIndex = allPaths.indexOf(Object(_PathUtils__WEBPACK_IMPORTED_MODULE_3__["createPath"])(history.location));
+
+      if (prevIndex !== -1) allPaths[prevIndex] = path;
+
+      setState({ action: action, location: location });
+    });
+  };
+
+  var go = function go(n) {
+    warning__WEBPACK_IMPORTED_MODULE_0___default()(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser');
+
+    globalHistory.go(n);
+  };
+
+  var goBack = function goBack() {
+    return go(-1);
+  };
+
+  var goForward = function goForward() {
+    return go(1);
+  };
+
+  var listenerCount = 0;
+
+  var checkDOMListeners = function checkDOMListeners(delta) {
+    listenerCount += delta;
+
+    if (listenerCount === 1) {
+      Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["addEventListener"])(window, HashChangeEvent, handleHashChange);
+    } else if (listenerCount === 0) {
+      Object(_DOMUtils__WEBPACK_IMPORTED_MODULE_5__["removeEventListener"])(window, HashChangeEvent, handleHashChange);
+    }
+  };
+
+  var isBlocked = false;
+
+  var block = function block() {
+    var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
+
+    var unblock = transitionManager.setPrompt(prompt);
+
+    if (!isBlocked) {
+      checkDOMListeners(1);
+      isBlocked = true;
+    }
+
+    return function () {
+      if (isBlocked) {
+        isBlocked = false;
+        checkDOMListeners(-1);
+      }
+
+      return unblock();
+    };
+  };
+
+  var listen = function listen(listener) {
+    var unlisten = transitionManager.appendListener(listener);
+    checkDOMListeners(1);
+
+    return function () {
+      checkDOMListeners(-1);
+      unlisten();
+    };
+  };
+
+  var history = {
+    length: globalHistory.length,
+    action: 'POP',
+    location: initialLocation,
+    createHref: createHref,
+    push: push,
+    replace: replace,
+    go: go,
+    goBack: goBack,
+    goForward: goForward,
+    block: block,
+    listen: listen
+  };
+
+  return history;
+};
+
+/* harmony default export */ __webpack_exports__["default"] = (createHashHistory);
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/history/es/createMemoryHistory.js":
+/*!**************************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/history/es/createMemoryHistory.js ***!
+  \**************************************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! warning */ "./node_modules/react-router-dom/node_modules/warning/browser.js");
+/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var _PathUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PathUtils */ "./node_modules/react-router-dom/node_modules/history/es/PathUtils.js");
+/* harmony import */ var _LocationUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./LocationUtils */ "./node_modules/react-router-dom/node_modules/history/es/LocationUtils.js");
+/* harmony import */ var _createTransitionManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./createTransitionManager */ "./node_modules/react-router-dom/node_modules/history/es/createTransitionManager.js");
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+
+
+
+
+
+var clamp = function clamp(n, lowerBound, upperBound) {
+  return Math.min(Math.max(n, lowerBound), upperBound);
+};
+
+/**
+ * Creates a history object that stores locations in memory.
+ */
+var createMemoryHistory = function createMemoryHistory() {
+  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+  var getUserConfirmation = props.getUserConfirmation,
+      _props$initialEntries = props.initialEntries,
+      initialEntries = _props$initialEntries === undefined ? ['/'] : _props$initialEntries,
+      _props$initialIndex = props.initialIndex,
+      initialIndex = _props$initialIndex === undefined ? 0 : _props$initialIndex,
+      _props$keyLength = props.keyLength,
+      keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;
+
+
+  var transitionManager = Object(_createTransitionManager__WEBPACK_IMPORTED_MODULE_3__["default"])();
+
+  var setState = function setState(nextState) {
+    _extends(history, nextState);
+
+    history.length = history.entries.length;
+
+    transitionManager.notifyListeners(history.location, history.action);
+  };
+
+  var createKey = function createKey() {
+    return Math.random().toString(36).substr(2, keyLength);
+  };
+
+  var index = clamp(initialIndex, 0, initialEntries.length - 1);
+  var entries = initialEntries.map(function (entry) {
+    return typeof entry === 'string' ? Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(entry, undefined, createKey()) : Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(entry, undefined, entry.key || createKey());
+  });
+
+  // Public interface
+
+  var createHref = _PathUtils__WEBPACK_IMPORTED_MODULE_1__["createPath"];
+
+  var push = function push(path, state) {
+    warning__WEBPACK_IMPORTED_MODULE_0___default()(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');
+
+    var action = 'PUSH';
+    var location = Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(path, state, createKey(), history.location);
+
+    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
+      if (!ok) return;
+
+      var prevIndex = history.index;
+      var nextIndex = prevIndex + 1;
+
+      var nextEntries = history.entries.slice(0);
+      if (nextEntries.length > nextIndex) {
+        nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);
+      } else {
+        nextEntries.push(location);
+      }
+
+      setState({
+        action: action,
+        location: location,
+        index: nextIndex,
+        entries: nextEntries
+      });
+    });
+  };
+
+  var replace = function replace(path, state) {
+    warning__WEBPACK_IMPORTED_MODULE_0___default()(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');
+
+    var action = 'REPLACE';
+    var location = Object(_LocationUtils__WEBPACK_IMPORTED_MODULE_2__["createLocation"])(path, state, createKey(), history.location);
+
+    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
+      if (!ok) return;
+
+      history.entries[history.index] = location;
+
+      setState({ action: action, location: location });
+    });
+  };
+
+  var go = function go(n) {
+    var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);
+
+    var action = 'POP';
+    var location = history.entries[nextIndex];
+
+    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
+      if (ok) {
+        setState({
+          action: action,
+          location: location,
+          index: nextIndex
+        });
+      } else {
+        // Mimic the behavior of DOM histories by
+        // causing a render after a cancelled POP.
+        setState();
+      }
+    });
+  };
+
+  var goBack = function goBack() {
+    return go(-1);
+  };
+
+  var goForward = function goForward() {
+    return go(1);
+  };
+
+  var canGo = function canGo(n) {
+    var nextIndex = history.index + n;
+    return nextIndex >= 0 && nextIndex < history.entries.length;
+  };
+
+  var block = function block() {
+    var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
+    return transitionManager.setPrompt(prompt);
+  };
+
+  var listen = function listen(listener) {
+    return transitionManager.appendListener(listener);
+  };
+
+  var history = {
+    length: entries.length,
+    action: 'POP',
+    location: entries[index],
+    index: index,
+    entries: entries,
+    createHref: createHref,
+    push: push,
+    replace: replace,
+    go: go,
+    goBack: goBack,
+    goForward: goForward,
+    canGo: canGo,
+    block: block,
+    listen: listen
+  };
+
+  return history;
+};
+
+/* harmony default export */ __webpack_exports__["default"] = (createMemoryHistory);
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/history/es/createTransitionManager.js":
+/*!******************************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/history/es/createTransitionManager.js ***!
+  \******************************************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! warning */ "./node_modules/react-router-dom/node_modules/warning/browser.js");
+/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_0__);
+
+
+var createTransitionManager = function createTransitionManager() {
+  var prompt = null;
+
+  var setPrompt = function setPrompt(nextPrompt) {
+    warning__WEBPACK_IMPORTED_MODULE_0___default()(prompt == null, 'A history supports only one prompt at a time');
+
+    prompt = nextPrompt;
+
+    return function () {
+      if (prompt === nextPrompt) prompt = null;
+    };
+  };
+
+  var confirmTransitionTo = function confirmTransitionTo(location, action, getUserConfirmation, callback) {
+    // TODO: If another transition starts while we're still confirming
+    // the previous one, we may end up in a weird state. Figure out the
+    // best way to handle this.
+    if (prompt != null) {
+      var result = typeof prompt === 'function' ? prompt(location, action) : prompt;
+
+      if (typeof result === 'string') {
+        if (typeof getUserConfirmation === 'function') {
+          getUserConfirmation(result, callback);
+        } else {
+          warning__WEBPACK_IMPORTED_MODULE_0___default()(false, 'A history needs a getUserConfirmation function in order to use a prompt message');
+
+          callback(true);
+        }
+      } else {
+        // Return false from a transition hook to cancel the transition.
+        callback(result !== false);
+      }
+    } else {
+      callback(true);
+    }
+  };
+
+  var listeners = [];
+
+  var appendListener = function appendListener(fn) {
+    var isActive = true;
+
+    var listener = function listener() {
+      if (isActive) fn.apply(undefined, arguments);
+    };
+
+    listeners.push(listener);
+
+    return function () {
+      isActive = false;
+      listeners = listeners.filter(function (item) {
+        return item !== listener;
+      });
+    };
+  };
+
+  var notifyListeners = function notifyListeners() {
+    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+      args[_key] = arguments[_key];
+    }
+
+    listeners.forEach(function (listener) {
+      return listener.apply(undefined, args);
+    });
+  };
+
+  return {
+    setPrompt: setPrompt,
+    confirmTransitionTo: confirmTransitionTo,
+    appendListener: appendListener,
+    notifyListeners: notifyListeners
+  };
+};
+
+/* harmony default export */ __webpack_exports__["default"] = (createTransitionManager);
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/history/es/index.js":
+/*!************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/history/es/index.js ***!
+  \************************************************************************/
+/*! exports provided: createBrowserHistory, createHashHistory, createMemoryHistory, createLocation, locationsAreEqual, parsePath, createPath */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _createBrowserHistory__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./createBrowserHistory */ "./node_modules/react-router-dom/node_modules/history/es/createBrowserHistory.js");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createBrowserHistory", function() { return _createBrowserHistory__WEBPACK_IMPORTED_MODULE_0__["default"]; });
+
+/* harmony import */ var _createHashHistory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./createHashHistory */ "./node_modules/react-router-dom/node_modules/history/es/createHashHistory.js");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createHashHistory", function() { return _createHashHistory__WEBPACK_IMPORTED_MODULE_1__["default"]; });
+
+/* harmony import */ var _createMemoryHistory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./createMemoryHistory */ "./node_modules/react-router-dom/node_modules/history/es/createMemoryHistory.js");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createMemoryHistory", function() { return _createMemoryHistory__WEBPACK_IMPORTED_MODULE_2__["default"]; });
+
+/* harmony import */ var _LocationUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./LocationUtils */ "./node_modules/react-router-dom/node_modules/history/es/LocationUtils.js");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createLocation", function() { return _LocationUtils__WEBPACK_IMPORTED_MODULE_3__["createLocation"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "locationsAreEqual", function() { return _LocationUtils__WEBPACK_IMPORTED_MODULE_3__["locationsAreEqual"]; });
+
+/* harmony import */ var _PathUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./PathUtils */ "./node_modules/react-router-dom/node_modules/history/es/PathUtils.js");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "parsePath", function() { return _PathUtils__WEBPACK_IMPORTED_MODULE_4__["parsePath"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createPath", function() { return _PathUtils__WEBPACK_IMPORTED_MODULE_4__["createPath"]; });
+
+
+
+
+
+
+
+
+
+
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/hoist-non-react-statics/index.js":
+/*!*************************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/hoist-non-react-statics/index.js ***!
+  \*************************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+/**
+ * Copyright 2015, Yahoo! Inc.
+ * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
+ */
+(function (global, factory) {
+     true ? module.exports = factory() :
+    undefined;
+}(this, (function () {
+    'use strict';
+    
+    var REACT_STATICS = {
+        childContextTypes: true,
+        contextTypes: true,
+        defaultProps: true,
+        displayName: true,
+        getDefaultProps: true,
+        getDerivedStateFromProps: true,
+        mixins: true,
+        propTypes: true,
+        type: true
+    };
+    
+    var KNOWN_STATICS = {
+        name: true,
+        length: true,
+        prototype: true,
+        caller: true,
+        callee: true,
+        arguments: true,
+        arity: true
+    };
+    
+    var defineProperty = Object.defineProperty;
+    var getOwnPropertyNames = Object.getOwnPropertyNames;
+    var getOwnPropertySymbols = Object.getOwnPropertySymbols;
+    var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
+    var getPrototypeOf = Object.getPrototypeOf;
+    var objectPrototype = getPrototypeOf && getPrototypeOf(Object);
+    
+    return function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
+        if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components
+            
+            if (objectPrototype) {
+                var inheritedComponent = getPrototypeOf(sourceComponent);
+                if (inheritedComponent && inheritedComponent !== objectPrototype) {
+                    hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
+                }
+            }
+            
+            var keys = getOwnPropertyNames(sourceComponent);
+            
+            if (getOwnPropertySymbols) {
+                keys = keys.concat(getOwnPropertySymbols(sourceComponent));
+            }
+            
+            for (var i = 0; i < keys.length; ++i) {
+                var key = keys[i];
+                if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {
+                    var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
+                    try { // Avoid failures from read-only properties
+                        defineProperty(targetComponent, key, descriptor);
+                    } catch (e) {}
+                }
+            }
+            
+            return targetComponent;
+        }
+        
+        return targetComponent;
+    };
+})));
+
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/invariant/browser.js":
+/*!*************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/invariant/browser.js ***!
+  \*************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+
+
+/**
+ * Use invariant() to assert state which your program assumes to be true.
+ *
+ * Provide sprintf-style format (only %s is supported) and arguments
+ * to provide information about what broke and what you were
+ * expecting.
+ *
+ * The invariant message will be stripped in production, but the invariant
+ * will remain to ensure logic does not differ in production.
+ */
+
+var invariant = function(condition, format, a, b, c, d, e, f) {
+  if (true) {
+    if (format === undefined) {
+      throw new Error('invariant requires an error message argument');
+    }
+  }
+
+  if (!condition) {
+    var error;
+    if (format === undefined) {
+      error = new Error(
+        'Minified exception occurred; use the non-minified dev environment ' +
+        'for the full error message and additional helpful warnings.'
+      );
+    } else {
+      var args = [a, b, c, d, e, f];
+      var argIndex = 0;
+      error = new Error(
+        format.replace(/%s/g, function() { return args[argIndex++]; })
+      );
+      error.name = 'Invariant Violation';
+    }
+
+    error.framesToPop = 1; // we don't care about invariant's own frame
+    throw error;
+  }
+};
+
+module.exports = invariant;
+
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/isarray/index.js":
+/*!*********************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/isarray/index.js ***!
+  \*********************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+module.exports = Array.isArray || function (arr) {
+  return Object.prototype.toString.call(arr) == '[object Array]';
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/object-assign/index.js":
+/*!***************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/object-assign/index.js ***!
+  \***************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/*
+object-assign
+(c) Sindre Sorhus
+@license MIT
+*/
+
+
+/* eslint-disable no-unused-vars */
+var getOwnPropertySymbols = Object.getOwnPropertySymbols;
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+var propIsEnumerable = Object.prototype.propertyIsEnumerable;
+
+function toObject(val) {
+	if (val === null || val === undefined) {
+		throw new TypeError('Object.assign cannot be called with null or undefined');
+	}
+
+	return Object(val);
+}
+
+function shouldUseNative() {
+	try {
+		if (!Object.assign) {
+			return false;
+		}
+
+		// Detect buggy property enumeration order in older V8 versions.
+
+		// https://bugs.chromium.org/p/v8/issues/detail?id=4118
+		var test1 = new String('abc');  // eslint-disable-line no-new-wrappers
+		test1[5] = 'de';
+		if (Object.getOwnPropertyNames(test1)[0] === '5') {
+			return false;
+		}
+
+		// https://bugs.chromium.org/p/v8/issues/detail?id=3056
+		var test2 = {};
+		for (var i = 0; i < 10; i++) {
+			test2['_' + String.fromCharCode(i)] = i;
+		}
+		var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
+			return test2[n];
+		});
+		if (order2.join('') !== '0123456789') {
+			return false;
+		}
+
+		// https://bugs.chromium.org/p/v8/issues/detail?id=3056
+		var test3 = {};
+		'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
+			test3[letter] = letter;
+		});
+		if (Object.keys(Object.assign({}, test3)).join('') !==
+				'abcdefghijklmnopqrst') {
+			return false;
+		}
+
+		return true;
+	} catch (err) {
+		// We don't expect any of the above to throw, but better to be safe.
+		return false;
+	}
+}
+
+module.exports = shouldUseNative() ? Object.assign : function (target, source) {
+	var from;
+	var to = toObject(target);
+	var symbols;
+
+	for (var s = 1; s < arguments.length; s++) {
+		from = Object(arguments[s]);
+
+		for (var key in from) {
+			if (hasOwnProperty.call(from, key)) {
+				to[key] = from[key];
+			}
+		}
+
+		if (getOwnPropertySymbols) {
+			symbols = getOwnPropertySymbols(from);
+			for (var i = 0; i < symbols.length; i++) {
+				if (propIsEnumerable.call(from, symbols[i])) {
+					to[symbols[i]] = from[symbols[i]];
+				}
+			}
+		}
+	}
+
+	return to;
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/path-to-regexp/index.js":
+/*!****************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/path-to-regexp/index.js ***!
+  \****************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+var isarray = __webpack_require__(/*! isarray */ "./node_modules/react-router-dom/node_modules/isarray/index.js")
+
+/**
+ * Expose `pathToRegexp`.
+ */
+module.exports = pathToRegexp
+module.exports.parse = parse
+module.exports.compile = compile
+module.exports.tokensToFunction = tokensToFunction
+module.exports.tokensToRegExp = tokensToRegExp
+
+/**
+ * The main path matching regexp utility.
+ *
+ * @type {RegExp}
+ */
+var PATH_REGEXP = new RegExp([
+  // Match escaped characters that would otherwise appear in future matches.
+  // This allows the user to escape special characters that won't transform.
+  '(\\\\.)',
+  // Match Express-style parameters and un-named parameters with a prefix
+  // and optional suffixes. Matches appear as:
+  //
+  // "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?", undefined]
+  // "/route(\\d+)"  => [undefined, undefined, undefined, "\d+", undefined, undefined]
+  // "/*"            => ["/", undefined, undefined, undefined, undefined, "*"]
+  '([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))'
+].join('|'), 'g')
+
+/**
+ * Parse a string for the raw tokens.
+ *
+ * @param  {string}  str
+ * @param  {Object=} options
+ * @return {!Array}
+ */
+function parse (str, options) {
+  var tokens = []
+  var key = 0
+  var index = 0
+  var path = ''
+  var defaultDelimiter = options && options.delimiter || '/'
+  var res
+
+  while ((res = PATH_REGEXP.exec(str)) != null) {
+    var m = res[0]
+    var escaped = res[1]
+    var offset = res.index
+    path += str.slice(index, offset)
+    index = offset + m.length
+
+    // Ignore already escaped sequences.
+    if (escaped) {
+      path += escaped[1]
+      continue
+    }
+
+    var next = str[index]
+    var prefix = res[2]
+    var name = res[3]
+    var capture = res[4]
+    var group = res[5]
+    var modifier = res[6]
+    var asterisk = res[7]
+
+    // Push the current path onto the tokens.
+    if (path) {
+      tokens.push(path)
+      path = ''
+    }
+
+    var partial = prefix != null && next != null && next !== prefix
+    var repeat = modifier === '+' || modifier === '*'
+    var optional = modifier === '?' || modifier === '*'
+    var delimiter = res[2] || defaultDelimiter
+    var pattern = capture || group
+
+    tokens.push({
+      name: name || key++,
+      prefix: prefix || '',
+      delimiter: delimiter,
+      optional: optional,
+      repeat: repeat,
+      partial: partial,
+      asterisk: !!asterisk,
+      pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')
+    })
+  }
+
+  // Match any characters still remaining.
+  if (index < str.length) {
+    path += str.substr(index)
+  }
+
+  // If the path exists, push it onto the end.
+  if (path) {
+    tokens.push(path)
+  }
+
+  return tokens
+}
+
+/**
+ * Compile a string to a template function for the path.
+ *
+ * @param  {string}             str
+ * @param  {Object=}            options
+ * @return {!function(Object=, Object=)}
+ */
+function compile (str, options) {
+  return tokensToFunction(parse(str, options))
+}
+
+/**
+ * Prettier encoding of URI path segments.
+ *
+ * @param  {string}
+ * @return {string}
+ */
+function encodeURIComponentPretty (str) {
+  return encodeURI(str).replace(/[\/?#]/g, function (c) {
+    return '%' + c.charCodeAt(0).toString(16).toUpperCase()
+  })
+}
+
+/**
+ * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.
+ *
+ * @param  {string}
+ * @return {string}
+ */
+function encodeAsterisk (str) {
+  return encodeURI(str).replace(/[?#]/g, function (c) {
+    return '%' + c.charCodeAt(0).toString(16).toUpperCase()
+  })
+}
+
+/**
+ * Expose a method for transforming tokens into the path function.
+ */
+function tokensToFunction (tokens) {
+  // Compile all the tokens into regexps.
+  var matches = new Array(tokens.length)
+
+  // Compile all the patterns before compilation.
+  for (var i = 0; i < tokens.length; i++) {
+    if (typeof tokens[i] === 'object') {
+      matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')
+    }
+  }
+
+  return function (obj, opts) {
+    var path = ''
+    var data = obj || {}
+    var options = opts || {}
+    var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent
+
+    for (var i = 0; i < tokens.length; i++) {
+      var token = tokens[i]
+
+      if (typeof token === 'string') {
+        path += token
+
+        continue
+      }
+
+      var value = data[token.name]
+      var segment
+
+      if (value == null) {
+        if (token.optional) {
+          // Prepend partial segment prefixes.
+          if (token.partial) {
+            path += token.prefix
+          }
+
+          continue
+        } else {
+          throw new TypeError('Expected "' + token.name + '" to be defined')
+        }
+      }
+
+      if (isarray(value)) {
+        if (!token.repeat) {
+          throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + '`')
+        }
+
+        if (value.length === 0) {
+          if (token.optional) {
+            continue
+          } else {
+            throw new TypeError('Expected "' + token.name + '" to not be empty')
+          }
+        }
+
+        for (var j = 0; j < value.length; j++) {
+          segment = encode(value[j])
+
+          if (!matches[i].test(segment)) {
+            throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but received `' + JSON.stringify(segment) + '`')
+          }
+
+          path += (j === 0 ? token.prefix : token.delimiter) + segment
+        }
+
+        continue
+      }
+
+      segment = token.asterisk ? encodeAsterisk(value) : encode(value)
+
+      if (!matches[i].test(segment)) {
+        throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but received "' + segment + '"')
+      }
+
+      path += token.prefix + segment
+    }
+
+    return path
+  }
+}
+
+/**
+ * Escape a regular expression string.
+ *
+ * @param  {string} str
+ * @return {string}
+ */
+function escapeString (str) {
+  return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, '\\$1')
+}
+
+/**
+ * Escape the capturing group by escaping special characters and meaning.
+ *
+ * @param  {string} group
+ * @return {string}
+ */
+function escapeGroup (group) {
+  return group.replace(/([=!:$\/()])/g, '\\$1')
+}
+
+/**
+ * Attach the keys as a property of the regexp.
+ *
+ * @param  {!RegExp} re
+ * @param  {Array}   keys
+ * @return {!RegExp}
+ */
+function attachKeys (re, keys) {
+  re.keys = keys
+  return re
+}
+
+/**
+ * Get the flags for a regexp from the options.
+ *
+ * @param  {Object} options
+ * @return {string}
+ */
+function flags (options) {
+  return options.sensitive ? '' : 'i'
+}
+
+/**
+ * Pull out keys from a regexp.
+ *
+ * @param  {!RegExp} path
+ * @param  {!Array}  keys
+ * @return {!RegExp}
+ */
+function regexpToRegexp (path, keys) {
+  // Use a negative lookahead to match only capturing groups.
+  var groups = path.source.match(/\((?!\?)/g)
+
+  if (groups) {
+    for (var i = 0; i < groups.length; i++) {
+      keys.push({
+        name: i,
+        prefix: null,
+        delimiter: null,
+        optional: false,
+        repeat: false,
+        partial: false,
+        asterisk: false,
+        pattern: null
+      })
+    }
+  }
+
+  return attachKeys(path, keys)
+}
+
+/**
+ * Transform an array into a regexp.
+ *
+ * @param  {!Array}  path
+ * @param  {Array}   keys
+ * @param  {!Object} options
+ * @return {!RegExp}
+ */
+function arrayToRegexp (path, keys, options) {
+  var parts = []
+
+  for (var i = 0; i < path.length; i++) {
+    parts.push(pathToRegexp(path[i], keys, options).source)
+  }
+
+  var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))
+
+  return attachKeys(regexp, keys)
+}
+
+/**
+ * Create a path regexp from string input.
+ *
+ * @param  {string}  path
+ * @param  {!Array}  keys
+ * @param  {!Object} options
+ * @return {!RegExp}
+ */
+function stringToRegexp (path, keys, options) {
+  return tokensToRegExp(parse(path, options), keys, options)
+}
+
+/**
+ * Expose a function for taking tokens and returning a RegExp.
+ *
+ * @param  {!Array}          tokens
+ * @param  {(Array|Object)=} keys
+ * @param  {Object=}         options
+ * @return {!RegExp}
+ */
+function tokensToRegExp (tokens, keys, options) {
+  if (!isarray(keys)) {
+    options = /** @type {!Object} */ (keys || options)
+    keys = []
+  }
+
+  options = options || {}
+
+  var strict = options.strict
+  var end = options.end !== false
+  var route = ''
+
+  // Iterate over the tokens and create our regexp string.
+  for (var i = 0; i < tokens.length; i++) {
+    var token = tokens[i]
+
+    if (typeof token === 'string') {
+      route += escapeString(token)
+    } else {
+      var prefix = escapeString(token.prefix)
+      var capture = '(?:' + token.pattern + ')'
+
+      keys.push(token)
+
+      if (token.repeat) {
+        capture += '(?:' + prefix + capture + ')*'
+      }
+
+      if (token.optional) {
+        if (!token.partial) {
+          capture = '(?:' + prefix + '(' + capture + '))?'
+        } else {
+          capture = prefix + '(' + capture + ')?'
+        }
+      } else {
+        capture = prefix + '(' + capture + ')'
+      }
+
+      route += capture
+    }
+  }
+
+  var delimiter = escapeString(options.delimiter || '/')
+  var endsWithDelimiter = route.slice(-delimiter.length) === delimiter
+
+  // In non-strict mode we allow a slash at the end of match. If the path to
+  // match already ends with a slash, we remove it for consistency. The slash
+  // is valid at the end of a path match, not in the middle. This is important
+  // in non-ending mode, where "/test/" shouldn't match "/test//route".
+  if (!strict) {
+    route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'
+  }
+
+  if (end) {
+    route += '$'
+  } else {
+    // In non-ending mode, we need the capturing groups to match as much as
+    // possible by using a positive lookahead to the end or next path segment.
+    route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'
+  }
+
+  return attachKeys(new RegExp('^' + route, flags(options)), keys)
+}
+
+/**
+ * Normalize the given path string, returning a regular expression.
+ *
+ * An empty array can be passed in for the keys, which will hold the
+ * placeholder key descriptions. For example, using `/user/:id`, `keys` will
+ * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.
+ *
+ * @param  {(string|RegExp|Array)} path
+ * @param  {(Array|Object)=}       keys
+ * @param  {Object=}               options
+ * @return {!RegExp}
+ */
+function pathToRegexp (path, keys, options) {
+  if (!isarray(keys)) {
+    options = /** @type {!Object} */ (keys || options)
+    keys = []
+  }
+
+  options = options || {}
+
+  if (path instanceof RegExp) {
+    return regexpToRegexp(path, /** @type {!Array} */ (keys))
+  }
+
+  if (isarray(path)) {
+    return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)
+  }
+
+  return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)
+}
+
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/prop-types/checkPropTypes.js":
+/*!*********************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/prop-types/checkPropTypes.js ***!
+  \*********************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+
+
+if (true) {
+  var invariant = __webpack_require__(/*! fbjs/lib/invariant */ "./node_modules/react-router-dom/node_modules/fbjs/lib/invariant.js");
+  var warning = __webpack_require__(/*! fbjs/lib/warning */ "./node_modules/react-router-dom/node_modules/fbjs/lib/warning.js");
+  var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/react-router-dom/node_modules/prop-types/lib/ReactPropTypesSecret.js");
+  var loggedTypeFailures = {};
+}
+
+/**
+ * Assert that the values match with the type specs.
+ * Error messages are memorized and will only be shown once.
+ *
+ * @param {object} typeSpecs Map of name to a ReactPropType
+ * @param {object} values Runtime values that need to be type-checked
+ * @param {string} location e.g. "prop", "context", "child context"
+ * @param {string} componentName Name of the component for error messages.
+ * @param {?Function} getStack Returns the component stack.
+ * @private
+ */
+function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
+  if (true) {
+    for (var typeSpecName in typeSpecs) {
+      if (typeSpecs.hasOwnProperty(typeSpecName)) {
+        var error;
+        // Prop type validation may throw. In case they do, we don't want to
+        // fail the render phase where it didn't fail before. So we log it.
+        // After these have been cleaned up, we'll let them throw.
+        try {
+          // This is intentionally an invariant that gets caught. It's the same
+          // behavior as without this statement except with a better message.
+          invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);
+          error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
+        } catch (ex) {
+          error = ex;
+        }
+        warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);
+        if (error instanceof Error && !(error.message in loggedTypeFailures)) {
+          // Only monitor this failure once because there tends to be a lot of the
+          // same error.
+          loggedTypeFailures[error.message] = true;
+
+          var stack = getStack ? getStack() : '';
+
+          warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
+        }
+      }
+    }
+  }
+}
+
+module.exports = checkPropTypes;
+
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/prop-types/factoryWithTypeCheckers.js":
+/*!******************************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/prop-types/factoryWithTypeCheckers.js ***!
+  \******************************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+
+
+var emptyFunction = __webpack_require__(/*! fbjs/lib/emptyFunction */ "./node_modules/react-router-dom/node_modules/fbjs/lib/emptyFunction.js");
+var invariant = __webpack_require__(/*! fbjs/lib/invariant */ "./node_modules/react-router-dom/node_modules/fbjs/lib/invariant.js");
+var warning = __webpack_require__(/*! fbjs/lib/warning */ "./node_modules/react-router-dom/node_modules/fbjs/lib/warning.js");
+var assign = __webpack_require__(/*! object-assign */ "./node_modules/react-router-dom/node_modules/object-assign/index.js");
+
+var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/react-router-dom/node_modules/prop-types/lib/ReactPropTypesSecret.js");
+var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "./node_modules/react-router-dom/node_modules/prop-types/checkPropTypes.js");
+
+module.exports = function(isValidElement, throwOnDirectAccess) {
+  /* global Symbol */
+  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
+  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
+
+  /**
+   * Returns the iterator method function contained on the iterable object.
+   *
+   * Be sure to invoke the function with the iterable as context:
+   *
+   *     var iteratorFn = getIteratorFn(myIterable);
+   *     if (iteratorFn) {
+   *       var iterator = iteratorFn.call(myIterable);
+   *       ...
+   *     }
+   *
+   * @param {?object} maybeIterable
+   * @return {?function}
+   */
+  function getIteratorFn(maybeIterable) {
+    var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
+    if (typeof iteratorFn === 'function') {
+      return iteratorFn;
+    }
+  }
+
+  /**
+   * Collection of methods that allow declaration and validation of props that are
+   * supplied to React components. Example usage:
+   *
+   *   var Props = require('ReactPropTypes');
+   *   var MyArticle = React.createClass({
+   *     propTypes: {
+   *       // An optional string prop named "description".
+   *       description: Props.string,
+   *
+   *       // A required enum prop named "category".
+   *       category: Props.oneOf(['News','Photos']).isRequired,
+   *
+   *       // A prop named "dialog" that requires an instance of Dialog.
+   *       dialog: Props.instanceOf(Dialog).isRequired
+   *     },
+   *     render: function() { ... }
+   *   });
+   *
+   * A more formal specification of how these methods are used:
+   *
+   *   type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
+   *   decl := ReactPropTypes.{type}(.isRequired)?
+   *
+   * Each and every declaration produces a function with the same signature. This
+   * allows the creation of custom validation functions. For example:
+   *
+   *  var MyLink = React.createClass({
+   *    propTypes: {
+   *      // An optional string or URI prop named "href".
+   *      href: function(props, propName, componentName) {
+   *        var propValue = props[propName];
+   *        if (propValue != null && typeof propValue !== 'string' &&
+   *            !(propValue instanceof URI)) {
+   *          return new Error(
+   *            'Expected a string or an URI for ' + propName + ' in ' +
+   *            componentName
+   *          );
+   *        }
+   *      }
+   *    },
+   *    render: function() {...}
+   *  });
+   *
+   * @internal
+   */
+
+  var ANONYMOUS = '<<anonymous>>';
+
+  // Important!
+  // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
+  var ReactPropTypes = {
+    array: createPrimitiveTypeChecker('array'),
+    bool: createPrimitiveTypeChecker('boolean'),
+    func: createPrimitiveTypeChecker('function'),
+    number: createPrimitiveTypeChecker('number'),
+    object: createPrimitiveTypeChecker('object'),
+    string: createPrimitiveTypeChecker('string'),
+    symbol: createPrimitiveTypeChecker('symbol'),
+
+    any: createAnyTypeChecker(),
+    arrayOf: createArrayOfTypeChecker,
+    element: createElementTypeChecker(),
+    instanceOf: createInstanceTypeChecker,
+    node: createNodeChecker(),
+    objectOf: createObjectOfTypeChecker,
+    oneOf: createEnumTypeChecker,
+    oneOfType: createUnionTypeChecker,
+    shape: createShapeTypeChecker,
+    exact: createStrictShapeTypeChecker,
+  };
+
+  /**
+   * inlined Object.is polyfill to avoid requiring consumers ship their own
+   * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
+   */
+  /*eslint-disable no-self-compare*/
+  function is(x, y) {
+    // SameValue algorithm
+    if (x === y) {
+      // Steps 1-5, 7-10
+      // Steps 6.b-6.e: +0 != -0
+      return x !== 0 || 1 / x === 1 / y;
+    } else {
+      // Step 6.a: NaN == NaN
+      return x !== x && y !== y;
+    }
+  }
+  /*eslint-enable no-self-compare*/
+
+  /**
+   * We use an Error-like object for backward compatibility as people may call
+   * PropTypes directly and inspect their output. However, we don't use real
+   * Errors anymore. We don't inspect their stack anyway, and creating them
+   * is prohibitively expensive if they are created too often, such as what
+   * happens in oneOfType() for any type before the one that matched.
+   */
+  function PropTypeError(message) {
+    this.message = message;
+    this.stack = '';
+  }
+  // Make `instanceof Error` still work for returned errors.
+  PropTypeError.prototype = Error.prototype;
+
+  function createChainableTypeChecker(validate) {
+    if (true) {
+      var manualPropTypeCallCache = {};
+      var manualPropTypeWarningCount = 0;
+    }
+    function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
+      componentName = componentName || ANONYMOUS;
+      propFullName = propFullName || propName;
+
+      if (secret !== ReactPropTypesSecret) {
+        if (throwOnDirectAccess) {
+          // New behavior only for users of `prop-types` package
+          invariant(
+            false,
+            'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
+            'Use `PropTypes.checkPropTypes()` to call them. ' +
+            'Read more at http://fb.me/use-check-prop-types'
+          );
+        } else if ("development" !== 'production' && typeof console !== 'undefined') {
+          // Old behavior for people using React.PropTypes
+          var cacheKey = componentName + ':' + propName;
+          if (
+            !manualPropTypeCallCache[cacheKey] &&
+            // Avoid spamming the console because they are often not actionable except for lib authors
+            manualPropTypeWarningCount < 3
+          ) {
+            warning(
+              false,
+              'You are manually calling a React.PropTypes validation ' +
+              'function for the `%s` prop on `%s`. This is deprecated ' +
+              'and will throw in the standalone `prop-types` package. ' +
+              'You may be seeing this warning due to a third-party PropTypes ' +
+              'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',
+              propFullName,
+              componentName
+            );
+            manualPropTypeCallCache[cacheKey] = true;
+            manualPropTypeWarningCount++;
+          }
+        }
+      }
+      if (props[propName] == null) {
+        if (isRequired) {
+          if (props[propName] === null) {
+            return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
+          }
+          return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
+        }
+        return null;
+      } else {
+        return validate(props, propName, componentName, location, propFullName);
+      }
+    }
+
+    var chainedCheckType = checkType.bind(null, false);
+    chainedCheckType.isRequired = checkType.bind(null, true);
+
+    return chainedCheckType;
+  }
+
+  function createPrimitiveTypeChecker(expectedType) {
+    function validate(props, propName, componentName, location, propFullName, secret) {
+      var propValue = props[propName];
+      var propType = getPropType(propValue);
+      if (propType !== expectedType) {
+        // `propValue` being instance of, say, date/regexp, pass the 'object'
+        // check, but we can offer a more precise error message here rather than
+        // 'of type `object`'.
+        var preciseType = getPreciseType(propValue);
+
+        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
+      }
+      return null;
+    }
+    return createChainableTypeChecker(validate);
+  }
+
+  function createAnyTypeChecker() {
+    return createChainableTypeChecker(emptyFunction.thatReturnsNull);
+  }
+
+  function createArrayOfTypeChecker(typeChecker) {
+    function validate(props, propName, componentName, location, propFullName) {
+      if (typeof typeChecker !== 'function') {
+        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
+      }
+      var propValue = props[propName];
+      if (!Array.isArray(propValue)) {
+        var propType = getPropType(propValue);
+        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
+      }
+      for (var i = 0; i < propValue.length; i++) {
+        var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
+        if (error instanceof Error) {
+          return error;
+        }
+      }
+      return null;
+    }
+    return createChainableTypeChecker(validate);
+  }
+
+  function createElementTypeChecker() {
+    function validate(props, propName, componentName, location, propFullName) {
+      var propValue = props[propName];
+      if (!isValidElement(propValue)) {
+        var propType = getPropType(propValue);
+        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
+      }
+      return null;
+    }
+    return createChainableTypeChecker(validate);
+  }
+
+  function createInstanceTypeChecker(expectedClass) {
+    function validate(props, propName, componentName, location, propFullName) {
+      if (!(props[propName] instanceof expectedClass)) {
+        var expectedClassName = expectedClass.name || ANONYMOUS;
+        var actualClassName = getClassName(props[propName]);
+        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
+      }
+      return null;
+    }
+    return createChainableTypeChecker(validate);
+  }
+
+  function createEnumTypeChecker(expectedValues) {
+    if (!Array.isArray(expectedValues)) {
+       true ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : undefined;
+      return emptyFunction.thatReturnsNull;
+    }
+
+    function validate(props, propName, componentName, location, propFullName) {
+      var propValue = props[propName];
+      for (var i = 0; i < expectedValues.length; i++) {
+        if (is(propValue, expectedValues[i])) {
+          return null;
+        }
+      }
+
+      var valuesString = JSON.stringify(expectedValues);
+      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
+    }
+    return createChainableTypeChecker(validate);
+  }
+
+  function createObjectOfTypeChecker(typeChecker) {
+    function validate(props, propName, componentName, location, propFullName) {
+      if (typeof typeChecker !== 'function') {
+        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
+      }
+      var propValue = props[propName];
+      var propType = getPropType(propValue);
+      if (propType !== 'object') {
+        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
+      }
+      for (var key in propValue) {
+        if (propValue.hasOwnProperty(key)) {
+          var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
+          if (error instanceof Error) {
+            return error;
+          }
+        }
+      }
+      return null;
+    }
+    return createChainableTypeChecker(validate);
+  }
+
+  function createUnionTypeChecker(arrayOfTypeCheckers) {
+    if (!Array.isArray(arrayOfTypeCheckers)) {
+       true ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : undefined;
+      return emptyFunction.thatReturnsNull;
+    }
+
+    for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
+      var checker = arrayOfTypeCheckers[i];
+      if (typeof checker !== 'function') {
+        warning(
+          false,
+          'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
+          'received %s at index %s.',
+          getPostfixForTypeWarning(checker),
+          i
+        );
+        return emptyFunction.thatReturnsNull;
+      }
+    }
+
+    function validate(props, propName, componentName, location, propFullName) {
+      for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
+        var checker = arrayOfTypeCheckers[i];
+        if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
+          return null;
+        }
+      }
+
+      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
+    }
+    return createChainableTypeChecker(validate);
+  }
+
+  function createNodeChecker() {
+    function validate(props, propName, componentName, location, propFullName) {
+      if (!isNode(props[propName])) {
+        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
+      }
+      return null;
+    }
+    return createChainableTypeChecker(validate);
+  }
+
+  function createShapeTypeChecker(shapeTypes) {
+    function validate(props, propName, componentName, location, propFullName) {
+      var propValue = props[propName];
+      var propType = getPropType(propValue);
+      if (propType !== 'object') {
+        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
+      }
+      for (var key in shapeTypes) {
+        var checker = shapeTypes[key];
+        if (!checker) {
+          continue;
+        }
+        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
+        if (error) {
+          return error;
+        }
+      }
+      return null;
+    }
+    return createChainableTypeChecker(validate);
+  }
+
+  function createStrictShapeTypeChecker(shapeTypes) {
+    function validate(props, propName, componentName, location, propFullName) {
+      var propValue = props[propName];
+      var propType = getPropType(propValue);
+      if (propType !== 'object') {
+        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
+      }
+      // We need to check all keys in case some are required but missing from
+      // props.
+      var allKeys = assign({}, props[propName], shapeTypes);
+      for (var key in allKeys) {
+        var checker = shapeTypes[key];
+        if (!checker) {
+          return new PropTypeError(
+            'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
+            '\nBad object: ' + JSON.stringify(props[propName], null, '  ') +
+            '\nValid keys: ' +  JSON.stringify(Object.keys(shapeTypes), null, '  ')
+          );
+        }
+        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
+        if (error) {
+          return error;
+        }
+      }
+      return null;
+    }
+
+    return createChainableTypeChecker(validate);
+  }
+
+  function isNode(propValue) {
+    switch (typeof propValue) {
+      case 'number':
+      case 'string':
+      case 'undefined':
+        return true;
+      case 'boolean':
+        return !propValue;
+      case 'object':
+        if (Array.isArray(propValue)) {
+          return propValue.every(isNode);
+        }
+        if (propValue === null || isValidElement(propValue)) {
+          return true;
+        }
+
+        var iteratorFn = getIteratorFn(propValue);
+        if (iteratorFn) {
+          var iterator = iteratorFn.call(propValue);
+          var step;
+          if (iteratorFn !== propValue.entries) {
+            while (!(step = iterator.next()).done) {
+              if (!isNode(step.value)) {
+                return false;
+              }
+            }
+          } else {
+            // Iterator will provide entry [k,v] tuples rather than values.
+            while (!(step = iterator.next()).done) {
+              var entry = step.value;
+              if (entry) {
+                if (!isNode(entry[1])) {
+                  return false;
+                }
+              }
+            }
+          }
+        } else {
+          return false;
+        }
+
+        return true;
+      default:
+        return false;
+    }
+  }
+
+  function isSymbol(propType, propValue) {
+    // Native Symbol.
+    if (propType === 'symbol') {
+      return true;
+    }
+
+    // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
+    if (propValue['@@toStringTag'] === 'Symbol') {
+      return true;
+    }
+
+    // Fallback for non-spec compliant Symbols which are polyfilled.
+    if (typeof Symbol === 'function' && propValue instanceof Symbol) {
+      return true;
+    }
+
+    return false;
+  }
+
+  // Equivalent of `typeof` but with special handling for array and regexp.
+  function getPropType(propValue) {
+    var propType = typeof propValue;
+    if (Array.isArray(propValue)) {
+      return 'array';
+    }
+    if (propValue instanceof RegExp) {
+      // Old webkits (at least until Android 4.0) return 'function' rather than
+      // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
+      // passes PropTypes.object.
+      return 'object';
+    }
+    if (isSymbol(propType, propValue)) {
+      return 'symbol';
+    }
+    return propType;
+  }
+
+  // This handles more types than `getPropType`. Only used for error messages.
+  // See `createPrimitiveTypeChecker`.
+  function getPreciseType(propValue) {
+    if (typeof propValue === 'undefined' || propValue === null) {
+      return '' + propValue;
+    }
+    var propType = getPropType(propValue);
+    if (propType === 'object') {
+      if (propValue instanceof Date) {
+        return 'date';
+      } else if (propValue instanceof RegExp) {
+        return 'regexp';
+      }
+    }
+    return propType;
+  }
+
+  // Returns a string that is postfixed to a warning about an invalid type.
+  // For example, "undefined" or "of type array"
+  function getPostfixForTypeWarning(value) {
+    var type = getPreciseType(value);
+    switch (type) {
+      case 'array':
+      case 'object':
+        return 'an ' + type;
+      case 'boolean':
+      case 'date':
+      case 'regexp':
+        return 'a ' + type;
+      default:
+        return type;
+    }
+  }
+
+  // Returns class name of the object, if any.
+  function getClassName(propValue) {
+    if (!propValue.constructor || !propValue.constructor.name) {
+      return ANONYMOUS;
+    }
+    return propValue.constructor.name;
+  }
+
+  ReactPropTypes.checkPropTypes = checkPropTypes;
+  ReactPropTypes.PropTypes = ReactPropTypes;
+
+  return ReactPropTypes;
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/prop-types/index.js":
+/*!************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/prop-types/index.js ***!
+  \************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+if (true) {
+  var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
+    Symbol.for &&
+    Symbol.for('react.element')) ||
+    0xeac7;
+
+  var isValidElement = function(object) {
+    return typeof object === 'object' &&
+      object !== null &&
+      object.$$typeof === REACT_ELEMENT_TYPE;
+  };
+
+  // By explicitly using `prop-types` you are opting into new development behavior.
+  // http://fb.me/prop-types-in-prod
+  var throwOnDirectAccess = true;
+  module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "./node_modules/react-router-dom/node_modules/prop-types/factoryWithTypeCheckers.js")(isValidElement, throwOnDirectAccess);
+} else {}
+
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/prop-types/lib/ReactPropTypesSecret.js":
+/*!*******************************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
+  \*******************************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+
+
+var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
+
+module.exports = ReactPropTypesSecret;
+
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/react-router/es/MemoryRouter.js":
+/*!************************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/react-router/es/MemoryRouter.js ***!
+  \************************************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! warning */ "./node_modules/react-router-dom/node_modules/react-router/node_modules/warning/warning.js");
+/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "./node_modules/preact-compat/dist/preact-compat.es.js");
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "./node_modules/react-router-dom/node_modules/prop-types/index.js");
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
+/* harmony import */ var history__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! history */ "./node_modules/react-router-dom/node_modules/history/es/index.js");
+/* harmony import */ var _Router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Router */ "./node_modules/react-router-dom/node_modules/react-router/es/Router.js");
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+
+
+
+
+
+
+/**
+ * The public API for a <Router> that stores location in memory.
+ */
+
+var MemoryRouter = function (_React$Component) {
+  _inherits(MemoryRouter, _React$Component);
+
+  function MemoryRouter() {
+    var _temp, _this, _ret;
+
+    _classCallCheck(this, MemoryRouter);
+
+    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+      args[_key] = arguments[_key];
+    }
+
+    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = Object(history__WEBPACK_IMPORTED_MODULE_3__["createMemoryHistory"])(_this.props), _temp), _possibleConstructorReturn(_this, _ret);
+  }
+
+  MemoryRouter.prototype.componentWillMount = function componentWillMount() {
+    warning__WEBPACK_IMPORTED_MODULE_0___default()(!this.props.history, "<MemoryRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { MemoryRouter as Router }`.");
+  };
+
+  MemoryRouter.prototype.render = function render() {
+    return react__WEBPACK_IMPORTED_MODULE_1__["default"].createElement(_Router__WEBPACK_IMPORTED_MODULE_4__["default"], { history: this.history, children: this.props.children });
+  };
+
+  return MemoryRouter;
+}(react__WEBPACK_IMPORTED_MODULE_1__["default"].Component);
+
+MemoryRouter.propTypes = {
+  initialEntries: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.array,
+  initialIndex: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
+  getUserConfirmation: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func,
+  keyLength: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,
+  children: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.node
+};
+
+
+/* harmony default export */ __webpack_exports__["default"] = (MemoryRouter);
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/react-router/es/Prompt.js":
+/*!******************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/react-router/es/Prompt.js ***!
+  \******************************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/preact-compat/dist/preact-compat.es.js");
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/react-router-dom/node_modules/prop-types/index.js");
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
+/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! invariant */ "./node_modules/react-router-dom/node_modules/invariant/browser.js");
+/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(invariant__WEBPACK_IMPORTED_MODULE_2__);
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+
+
+
+
+/**
+ * The public API for prompting the user before navigating away
+ * from a screen with a component.
+ */
+
+var Prompt = function (_React$Component) {
+  _inherits(Prompt, _React$Component);
+
+  function Prompt() {
+    _classCallCheck(this, Prompt);
+
+    return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
+  }
+
+  Prompt.prototype.enable = function enable(message) {
+    if (this.unblock) this.unblock();
+
+    this.unblock = this.context.router.history.block(message);
+  };
+
+  Prompt.prototype.disable = function disable() {
+    if (this.unblock) {
+      this.unblock();
+      this.unblock = null;
+    }
+  };
+
+  Prompt.prototype.componentWillMount = function componentWillMount() {
+    invariant__WEBPACK_IMPORTED_MODULE_2___default()(this.context.router, "You should not use <Prompt> outside a <Router>");
+
+    if (this.props.when) this.enable(this.props.message);
+  };
+
+  Prompt.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
+    if (nextProps.when) {
+      if (!this.props.when || this.props.message !== nextProps.message) this.enable(nextProps.message);
+    } else {
+      this.disable();
+    }
+  };
+
+  Prompt.prototype.componentWillUnmount = function componentWillUnmount() {
+    this.disable();
+  };
+
+  Prompt.prototype.render = function render() {
+    return null;
+  };
+
+  return Prompt;
+}(react__WEBPACK_IMPORTED_MODULE_0__["default"].Component);
+
+Prompt.propTypes = {
+  when: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,
+  message: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]).isRequired
+};
+Prompt.defaultProps = {
+  when: true
+};
+Prompt.contextTypes = {
+  router: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({
+    history: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({
+      block: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func.isRequired
+    }).isRequired
+  }).isRequired
+};
+
+
+/* harmony default export */ __webpack_exports__["default"] = (Prompt);
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/react-router/es/Redirect.js":
+/*!********************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/react-router/es/Redirect.js ***!
+  \********************************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/preact-compat/dist/preact-compat.es.js");
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/react-router-dom/node_modules/prop-types/index.js");
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
+/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! warning */ "./node_modules/react-router-dom/node_modules/react-router/node_modules/warning/warning.js");
+/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_2__);
+/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! invariant */ "./node_modules/react-router-dom/node_modules/invariant/browser.js");
+/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(invariant__WEBPACK_IMPORTED_MODULE_3__);
+/* harmony import */ var history__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! history */ "./node_modules/react-router-dom/node_modules/history/es/index.js");
+/* harmony import */ var _generatePath__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./generatePath */ "./node_modules/react-router-dom/node_modules/react-router/es/generatePath.js");
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+
+
+
+
+
+
+
+/**
+ * The public API for updating the location programmatically
+ * with a component.
+ */
+
+var Redirect = function (_React$Component) {
+  _inherits(Redirect, _React$Component);
+
+  function Redirect() {
+    _classCallCheck(this, Redirect);
+
+    return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
+  }
+
+  Redirect.prototype.isStatic = function isStatic() {
+    return this.context.router && this.context.router.staticContext;
+  };
+
+  Redirect.prototype.componentWillMount = function componentWillMount() {
+    invariant__WEBPACK_IMPORTED_MODULE_3___default()(this.context.router, "You should not use <Redirect> outside a <Router>");
+
+    if (this.isStatic()) this.perform();
+  };
+
+  Redirect.prototype.componentDidMount = function componentDidMount() {
+    if (!this.isStatic()) this.perform();
+  };
+
+  Redirect.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
+    var prevTo = Object(history__WEBPACK_IMPORTED_MODULE_4__["createLocation"])(prevProps.to);
+    var nextTo = Object(history__WEBPACK_IMPORTED_MODULE_4__["createLocation"])(this.props.to);
+
+    if (Object(history__WEBPACK_IMPORTED_MODULE_4__["locationsAreEqual"])(prevTo, nextTo)) {
+      warning__WEBPACK_IMPORTED_MODULE_2___default()(false, "You tried to redirect to the same route you're currently on: " + ("\"" + nextTo.pathname + nextTo.search + "\""));
+      return;
+    }
+
+    this.perform();
+  };
+
+  Redirect.prototype.computeTo = function computeTo(_ref) {
+    var computedMatch = _ref.computedMatch,
+        to = _ref.to;
+
+    if (computedMatch) {
+      if (typeof to === "string") {
+        return Object(_generatePath__WEBPACK_IMPORTED_MODULE_5__["default"])(to, computedMatch.params);
+      } else {
+        return _extends({}, to, {
+          pathname: Object(_generatePath__WEBPACK_IMPORTED_MODULE_5__["default"])(to.pathname, computedMatch.params)
+        });
+      }
+    }
+
+    return to;
+  };
+
+  Redirect.prototype.perform = function perform() {
+    var history = this.context.router.history;
+    var push = this.props.push;
+
+    var to = this.computeTo(this.props);
+
+    if (push) {
+      history.push(to);
+    } else {
+      history.replace(to);
+    }
+  };
+
+  Redirect.prototype.render = function render() {
+    return null;
+  };
+
+  return Redirect;
+}(react__WEBPACK_IMPORTED_MODULE_0__["default"].Component);
+
+Redirect.propTypes = {
+  computedMatch: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, // private, from <Switch>
+  push: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,
+  from: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,
+  to: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object]).isRequired
+};
+Redirect.defaultProps = {
+  push: false
+};
+Redirect.contextTypes = {
+  router: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({
+    history: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({
+      push: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func.isRequired,
+      replace: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func.isRequired
+    }).isRequired,
+    staticContext: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object
+  }).isRequired
+};
+
+
+/* harmony default export */ __webpack_exports__["default"] = (Redirect);
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/react-router/es/Route.js":
+/*!*****************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/react-router/es/Route.js ***!
+  \*****************************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! warning */ "./node_modules/react-router-dom/node_modules/react-router/node_modules/warning/warning.js");
+/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! invariant */ "./node_modules/react-router-dom/node_modules/invariant/browser.js");
+/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(invariant__WEBPACK_IMPORTED_MODULE_1__);
+/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "./node_modules/preact-compat/dist/preact-compat.es.js");
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "./node_modules/react-router-dom/node_modules/prop-types/index.js");
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);
+/* harmony import */ var _matchPath__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./matchPath */ "./node_modules/react-router-dom/node_modules/react-router/es/matchPath.js");
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+
+
+
+
+
+
+var isEmptyChildren = function isEmptyChildren(children) {
+  return react__WEBPACK_IMPORTED_MODULE_2__["default"].Children.count(children) === 0;
+};
+
+/**
+ * The public API for matching a single path and rendering.
+ */
+
+var Route = function (_React$Component) {
+  _inherits(Route, _React$Component);
+
+  function Route() {
+    var _temp, _this, _ret;
+
+    _classCallCheck(this, Route);
+
+    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+      args[_key] = arguments[_key];
+    }
+
+    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {
+      match: _this.computeMatch(_this.props, _this.context.router)
+    }, _temp), _possibleConstructorReturn(_this, _ret);
+  }
+
+  Route.prototype.getChildContext = function getChildContext() {
+    return {
+      router: _extends({}, this.context.router, {
+        route: {
+          location: this.props.location || this.context.router.route.location,
+          match: this.state.match
+        }
+      })
+    };
+  };
+
+  Route.prototype.computeMatch = function computeMatch(_ref, router) {
+    var computedMatch = _ref.computedMatch,
+        location = _ref.location,
+        path = _ref.path,
+        strict = _ref.strict,
+        exact = _ref.exact,
+        sensitive = _ref.sensitive;
+
+    if (computedMatch) return computedMatch; // <Switch> already computed the match for us
+
+    invariant__WEBPACK_IMPORTED_MODULE_1___default()(router, "You should not use <Route> or withRouter() outside a <Router>");
+
+    var route = router.route;
+
+    var pathname = (location || route.location).pathname;
+
+    return Object(_matchPath__WEBPACK_IMPORTED_MODULE_4__["default"])(pathname, { path: path, strict: strict, exact: exact, sensitive: sensitive }, route.match);
+  };
+
+  Route.prototype.componentWillMount = function componentWillMount() {
+    warning__WEBPACK_IMPORTED_MODULE_0___default()(!(this.props.component && this.props.render), "You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored");
+
+    warning__WEBPACK_IMPORTED_MODULE_0___default()(!(this.props.component && this.props.children && !isEmptyChildren(this.props.children)), "You should not use <Route component> and <Route children> in the same route; <Route children> will be ignored");
+
+    warning__WEBPACK_IMPORTED_MODULE_0___default()(!(this.props.render && this.props.children && !isEmptyChildren(this.props.children)), "You should not use <Route render> and <Route children> in the same route; <Route children> will be ignored");
+  };
+
+  Route.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps, nextContext) {
+    warning__WEBPACK_IMPORTED_MODULE_0___default()(!(nextProps.location && !this.props.location), '<Route> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.');
+
+    warning__WEBPACK_IMPORTED_MODULE_0___default()(!(!nextProps.location && this.props.location), '<Route> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.');
+
+    this.setState({
+      match: this.computeMatch(nextProps, nextContext.router)
+    });
+  };
+
+  Route.prototype.render = function render() {
+    var match = this.state.match;
+    var _props = this.props,
+        children = _props.children,
+        component = _props.component,
+        render = _props.render;
+    var _context$router = this.context.router,
+        history = _context$router.history,
+        route = _context$router.route,
+        staticContext = _context$router.staticContext;
+
+    var location = this.props.location || route.location;
+    var props = { match: match, location: location, history: history, staticContext: staticContext };
+
+    if (component) return match ? react__WEBPACK_IMPORTED_MODULE_2__["default"].createElement(component, props) : null;
+
+    if (render) return match ? render(props) : null;
+
+    if (typeof children === "function") return children(props);
+
+    if (children && !isEmptyChildren(children)) return react__WEBPACK_IMPORTED_MODULE_2__["default"].Children.only(children);
+
+    return null;
+  };
+
+  return Route;
+}(react__WEBPACK_IMPORTED_MODULE_2__["default"].Component);
+
+Route.propTypes = {
+  computedMatch: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object, // private, from <Switch>
+  path: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,
+  exact: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,
+  strict: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,
+  sensitive: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,
+  component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,
+  render: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,
+  children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node]),
+  location: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object
+};
+Route.contextTypes = {
+  router: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.shape({
+    history: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object.isRequired,
+    route: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object.isRequired,
+    staticContext: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object
+  })
+};
+Route.childContextTypes = {
+  router: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object.isRequired
+};
+
+
+/* harmony default export */ __webpack_exports__["default"] = (Route);
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/react-router/es/Router.js":
+/*!******************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/react-router/es/Router.js ***!
+  \******************************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! warning */ "./node_modules/react-router-dom/node_modules/react-router/node_modules/warning/warning.js");
+/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! invariant */ "./node_modules/react-router-dom/node_modules/invariant/browser.js");
+/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(invariant__WEBPACK_IMPORTED_MODULE_1__);
+/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "./node_modules/preact-compat/dist/preact-compat.es.js");
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "./node_modules/react-router-dom/node_modules/prop-types/index.js");
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+
+
+
+
+
+/**
+ * The public API for putting history on context.
+ */
+
+var Router = function (_React$Component) {
+  _inherits(Router, _React$Component);
+
+  function Router() {
+    var _temp, _this, _ret;
+
+    _classCallCheck(this, Router);
+
+    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+      args[_key] = arguments[_key];
+    }
+
+    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {
+      match: _this.computeMatch(_this.props.history.location.pathname)
+    }, _temp), _possibleConstructorReturn(_this, _ret);
+  }
+
+  Router.prototype.getChildContext = function getChildContext() {
+    return {
+      router: _extends({}, this.context.router, {
+        history: this.props.history,
+        route: {
+          location: this.props.history.location,
+          match: this.state.match
+        }
+      })
+    };
+  };
+
+  Router.prototype.computeMatch = function computeMatch(pathname) {
+    return {
+      path: "/",
+      url: "/",
+      params: {},
+      isExact: pathname === "/"
+    };
+  };
+
+  Router.prototype.componentWillMount = function componentWillMount() {
+    var _this2 = this;
+
+    var _props = this.props,
+        children = _props.children,
+        history = _props.history;
+
+
+    invariant__WEBPACK_IMPORTED_MODULE_1___default()(children == null || react__WEBPACK_IMPORTED_MODULE_2__["default"].Children.count(children) === 1, "A <Router> may have only one child element");
+
+    // Do this here so we can setState when a <Redirect> changes the
+    // location in componentWillMount. This happens e.g. when doing
+    // server rendering using a <StaticRouter>.
+    this.unlisten = history.listen(function () {
+      _this2.setState({
+        match: _this2.computeMatch(history.location.pathname)
+      });
+    });
+  };
+
+  Router.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
+    warning__WEBPACK_IMPORTED_MODULE_0___default()(this.props.history === nextProps.history, "You cannot change <Router history>");
+  };
+
+  Router.prototype.componentWillUnmount = function componentWillUnmount() {
+    this.unlisten();
+  };
+
+  Router.prototype.render = function render() {
+    var children = this.props.children;
+
+    return children ? react__WEBPACK_IMPORTED_MODULE_2__["default"].Children.only(children) : null;
+  };
+
+  return Router;
+}(react__WEBPACK_IMPORTED_MODULE_2__["default"].Component);
+
+Router.propTypes = {
+  history: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object.isRequired,
+  children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node
+};
+Router.contextTypes = {
+  router: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object
+};
+Router.childContextTypes = {
+  router: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object.isRequired
+};
+
+
+/* harmony default export */ __webpack_exports__["default"] = (Router);
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/react-router/es/StaticRouter.js":
+/*!************************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/react-router/es/StaticRouter.js ***!
+  \************************************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! warning */ "./node_modules/react-router-dom/node_modules/react-router/node_modules/warning/warning.js");
+/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! invariant */ "./node_modules/react-router-dom/node_modules/invariant/browser.js");
+/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(invariant__WEBPACK_IMPORTED_MODULE_1__);
+/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "./node_modules/preact-compat/dist/preact-compat.es.js");
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "./node_modules/react-router-dom/node_modules/prop-types/index.js");
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);
+/* harmony import */ var history__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! history */ "./node_modules/react-router-dom/node_modules/history/es/index.js");
+/* harmony import */ var _Router__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Router */ "./node_modules/react-router-dom/node_modules/react-router/es/Router.js");
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+
+
+
+
+
+
+
+var addLeadingSlash = function addLeadingSlash(path) {
+  return path.charAt(0) === "/" ? path : "/" + path;
+};
+
+var addBasename = function addBasename(basename, location) {
+  if (!basename) return location;
+
+  return _extends({}, location, {
+    pathname: addLeadingSlash(basename) + location.pathname
+  });
+};
+
+var stripBasename = function stripBasename(basename, location) {
+  if (!basename) return location;
+
+  var base = addLeadingSlash(basename);
+
+  if (location.pathname.indexOf(base) !== 0) return location;
+
+  return _extends({}, location, {
+    pathname: location.pathname.substr(base.length)
+  });
+};
+
+var createURL = function createURL(location) {
+  return typeof location === "string" ? location : Object(history__WEBPACK_IMPORTED_MODULE_4__["createPath"])(location);
+};
+
+var staticHandler = function staticHandler(methodName) {
+  return function () {
+    invariant__WEBPACK_IMPORTED_MODULE_1___default()(false, "You cannot %s with <StaticRouter>", methodName);
+  };
+};
+
+var noop = function noop() {};
+
+/**
+ * The public top-level API for a "static" <Router>, so-called because it
+ * can't actually change the current location. Instead, it just records
+ * location changes in a context object. Useful mainly in testing and
+ * server-rendering scenarios.
+ */
+
+var StaticRouter = function (_React$Component) {
+  _inherits(StaticRouter, _React$Component);
+
+  function StaticRouter() {
+    var _temp, _this, _ret;
+
+    _classCallCheck(this, StaticRouter);
+
+    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+      args[_key] = arguments[_key];
+    }
+
+    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.createHref = function (path) {
+      return addLeadingSlash(_this.props.basename + createURL(path));
+    }, _this.handlePush = function (location) {
+      var _this$props = _this.props,
+          basename = _this$props.basename,
+          context = _this$props.context;
+
+      context.action = "PUSH";
+      context.location = addBasename(basename, Object(history__WEBPACK_IMPORTED_MODULE_4__["createLocation"])(location));
+      context.url = createURL(context.location);
+    }, _this.handleReplace = function (location) {
+      var _this$props2 = _this.props,
+          basename = _this$props2.basename,
+          context = _this$props2.context;
+
+      context.action = "REPLACE";
+      context.location = addBasename(basename, Object(history__WEBPACK_IMPORTED_MODULE_4__["createLocation"])(location));
+      context.url = createURL(context.location);
+    }, _this.handleListen = function () {
+      return noop;
+    }, _this.handleBlock = function () {
+      return noop;
+    }, _temp), _possibleConstructorReturn(_this, _ret);
+  }
+
+  StaticRouter.prototype.getChildContext = function getChildContext() {
+    return {
+      router: {
+        staticContext: this.props.context
+      }
+    };
+  };
+
+  StaticRouter.prototype.componentWillMount = function componentWillMount() {
+    warning__WEBPACK_IMPORTED_MODULE_0___default()(!this.props.history, "<StaticRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { StaticRouter as Router }`.");
+  };
+
+  StaticRouter.prototype.render = function render() {
+    var _props = this.props,
+        basename = _props.basename,
+        context = _props.context,
+        location = _props.location,
+        props = _objectWithoutProperties(_props, ["basename", "context", "location"]);
+
+    var history = {
+      createHref: this.createHref,
+      action: "POP",
+      location: stripBasename(basename, Object(history__WEBPACK_IMPORTED_MODULE_4__["createLocation"])(location)),
+      push: this.handlePush,
+      replace: this.handleReplace,
+      go: staticHandler("go"),
+      goBack: staticHandler("goBack"),
+      goForward: staticHandler("goForward"),
+      listen: this.handleListen,
+      block: this.handleBlock
+    };
+
+    return react__WEBPACK_IMPORTED_MODULE_2__["default"].createElement(_Router__WEBPACK_IMPORTED_MODULE_5__["default"], _extends({}, props, { history: history }));
+  };
+
+  return StaticRouter;
+}(react__WEBPACK_IMPORTED_MODULE_2__["default"].Component);
+
+StaticRouter.propTypes = {
+  basename: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,
+  context: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object.isRequired,
+  location: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object])
+};
+StaticRouter.defaultProps = {
+  basename: "",
+  location: "/"
+};
+StaticRouter.childContextTypes = {
+  router: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object.isRequired
+};
+
+
+/* harmony default export */ __webpack_exports__["default"] = (StaticRouter);
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/react-router/es/Switch.js":
+/*!******************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/react-router/es/Switch.js ***!
+  \******************************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/preact-compat/dist/preact-compat.es.js");
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/react-router-dom/node_modules/prop-types/index.js");
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
+/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! warning */ "./node_modules/react-router-dom/node_modules/react-router/node_modules/warning/warning.js");
+/* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_2__);
+/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! invariant */ "./node_modules/react-router-dom/node_modules/invariant/browser.js");
+/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(invariant__WEBPACK_IMPORTED_MODULE_3__);
+/* harmony import */ var _matchPath__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./matchPath */ "./node_modules/react-router-dom/node_modules/react-router/es/matchPath.js");
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+
+
+
+
+
+
+/**
+ * The public API for rendering the first <Route> that matches.
+ */
+
+var Switch = function (_React$Component) {
+  _inherits(Switch, _React$Component);
+
+  function Switch() {
+    _classCallCheck(this, Switch);
+
+    return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
+  }
+
+  Switch.prototype.componentWillMount = function componentWillMount() {
+    invariant__WEBPACK_IMPORTED_MODULE_3___default()(this.context.router, "You should not use <Switch> outside a <Router>");
+  };
+
+  Switch.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
+    warning__WEBPACK_IMPORTED_MODULE_2___default()(!(nextProps.location && !this.props.location), '<Switch> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.');
+
+    warning__WEBPACK_IMPORTED_MODULE_2___default()(!(!nextProps.location && this.props.location), '<Switch> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.');
+  };
+
+  Switch.prototype.render = function render() {
+    var route = this.context.router.route;
+    var children = this.props.children;
+
+    var location = this.props.location || route.location;
+
+    var match = void 0,
+        child = void 0;
+    react__WEBPACK_IMPORTED_MODULE_0__["default"].Children.forEach(children, function (element) {
+      if (match == null && react__WEBPACK_IMPORTED_MODULE_0__["default"].isValidElement(element)) {
+        var _element$props = element.props,
+            pathProp = _element$props.path,
+            exact = _element$props.exact,
+            strict = _element$props.strict,
+            sensitive = _element$props.sensitive,
+            from = _element$props.from;
+
+        var path = pathProp || from;
+
+        child = element;
+        match = Object(_matchPath__WEBPACK_IMPORTED_MODULE_4__["default"])(location.pathname, { path: path, exact: exact, strict: strict, sensitive: sensitive }, route.match);
+      }
+    });
+
+    return match ? react__WEBPACK_IMPORTED_MODULE_0__["default"].cloneElement(child, { location: location, computedMatch: match }) : null;
+  };
+
+  return Switch;
+}(react__WEBPACK_IMPORTED_MODULE_0__["default"].Component);
+
+Switch.contextTypes = {
+  router: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({
+    route: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object.isRequired
+  }).isRequired
+};
+Switch.propTypes = {
+  children: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.node,
+  location: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object
+};
+
+
+/* harmony default export */ __webpack_exports__["default"] = (Switch);
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/react-router/es/generatePath.js":
+/*!************************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/react-router/es/generatePath.js ***!
+  \************************************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var path_to_regexp__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! path-to-regexp */ "./node_modules/react-router-dom/node_modules/path-to-regexp/index.js");
+/* harmony import */ var path_to_regexp__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path_to_regexp__WEBPACK_IMPORTED_MODULE_0__);
+
+
+var patternCache = {};
+var cacheLimit = 10000;
+var cacheCount = 0;
+
+var compileGenerator = function compileGenerator(pattern) {
+  var cacheKey = pattern;
+  var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});
+
+  if (cache[pattern]) return cache[pattern];
+
+  var compiledGenerator = path_to_regexp__WEBPACK_IMPORTED_MODULE_0___default.a.compile(pattern);
+
+  if (cacheCount < cacheLimit) {
+    cache[pattern] = compiledGenerator;
+    cacheCount++;
+  }
+
+  return compiledGenerator;
+};
+
+/**
+ * Public API for generating a URL pathname from a pattern and parameters.
+ */
+var generatePath = function generatePath() {
+  var pattern = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "/";
+  var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+  if (pattern === "/") {
+    return pattern;
+  }
+  var generator = compileGenerator(pattern);
+  return generator(params, { pretty: true });
+};
+
+/* harmony default export */ __webpack_exports__["default"] = (generatePath);
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/react-router/es/matchPath.js":
+/*!*********************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/react-router/es/matchPath.js ***!
+  \*********************************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var path_to_regexp__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! path-to-regexp */ "./node_modules/react-router-dom/node_modules/path-to-regexp/index.js");
+/* harmony import */ var path_to_regexp__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path_to_regexp__WEBPACK_IMPORTED_MODULE_0__);
+
+
+var patternCache = {};
+var cacheLimit = 10000;
+var cacheCount = 0;
+
+var compilePath = function compilePath(pattern, options) {
+  var cacheKey = "" + options.end + options.strict + options.sensitive;
+  var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});
+
+  if (cache[pattern]) return cache[pattern];
+
+  var keys = [];
+  var re = path_to_regexp__WEBPACK_IMPORTED_MODULE_0___default()(pattern, keys, options);
+  var compiledPattern = { re: re, keys: keys };
+
+  if (cacheCount < cacheLimit) {
+    cache[pattern] = compiledPattern;
+    cacheCount++;
+  }
+
+  return compiledPattern;
+};
+
+/**
+ * Public API for matching a URL pathname to a path pattern.
+ */
+var matchPath = function matchPath(pathname) {
+  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+  var parent = arguments[2];
+
+  if (typeof options === "string") options = { path: options };
+
+  var _options = options,
+      path = _options.path,
+      _options$exact = _options.exact,
+      exact = _options$exact === undefined ? false : _options$exact,
+      _options$strict = _options.strict,
+      strict = _options$strict === undefined ? false : _options$strict,
+      _options$sensitive = _options.sensitive,
+      sensitive = _options$sensitive === undefined ? false : _options$sensitive;
+
+
+  if (path == null) return parent;
+
+  var _compilePath = compilePath(path, { end: exact, strict: strict, sensitive: sensitive }),
+      re = _compilePath.re,
+      keys = _compilePath.keys;
+
+  var match = re.exec(pathname);
+
+  if (!match) return null;
+
+  var url = match[0],
+      values = match.slice(1);
+
+  var isExact = pathname === url;
+
+  if (exact && !isExact) return null;
+
+  return {
+    path: path, // the path pattern used to match
+    url: path === "/" && url === "" ? "/" : url, // the matched portion of the URL
+    isExact: isExact, // whether or not we matched exactly
+    params: keys.reduce(function (memo, key, index) {
+      memo[key.name] = values[index];
+      return memo;
+    }, {})
+  };
+};
+
+/* harmony default export */ __webpack_exports__["default"] = (matchPath);
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/react-router/es/withRouter.js":
+/*!**********************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/react-router/es/withRouter.js ***!
+  \**********************************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/preact-compat/dist/preact-compat.es.js");
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/react-router-dom/node_modules/prop-types/index.js");
+/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
+/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! hoist-non-react-statics */ "./node_modules/react-router-dom/node_modules/hoist-non-react-statics/index.js");
+/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2__);
+/* harmony import */ var _Route__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Route */ "./node_modules/react-router-dom/node_modules/react-router/es/Route.js");
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+
+
+
+
+
+
+/**
+ * A public higher-order component to access the imperative API
+ */
+var withRouter = function withRouter(Component) {
+  var C = function C(props) {
+    var wrappedComponentRef = props.wrappedComponentRef,
+        remainingProps = _objectWithoutProperties(props, ["wrappedComponentRef"]);
+
+    return react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(_Route__WEBPACK_IMPORTED_MODULE_3__["default"], {
+      children: function children(routeComponentProps) {
+        return react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(Component, _extends({}, remainingProps, routeComponentProps, {
+          ref: wrappedComponentRef
+        }));
+      }
+    });
+  };
+
+  C.displayName = "withRouter(" + (Component.displayName || Component.name) + ")";
+  C.WrappedComponent = Component;
+  C.propTypes = {
+    wrappedComponentRef: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func
+  };
+
+  return hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2___default()(C, Component);
+};
+
+/* harmony default export */ __webpack_exports__["default"] = (withRouter);
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/react-router/node_modules/warning/warning.js":
+/*!*************************************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/react-router/node_modules/warning/warning.js ***!
+  \*************************************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright (c) 2014-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ * @providesModule warning
+ */
+
+
+
+/**
+ * Similar to invariant but only logs a warning if the condition is not met.
+ * This can be used to log issues in development environments in critical
+ * paths. Removing the logging code for production environments will keep the
+ * same logic and follow the same code paths.
+ */
+
+var __DEV__ = "development" !== 'production';
+
+var warning = function() {};
+
+if (__DEV__) {
+  var printWarning = function printWarning(format, args) {
+    var len = arguments.length;
+    args = new Array(len > 2 ? len - 2 : 0);
+    for (var key = 2; key < len; key++) {
+      args[key - 2] = arguments[key];
+    }
+    var argIndex = 0;
+    var message = 'Warning: ' +
+      format.replace(/%s/g, function() {
+        return args[argIndex++];
+      });
+    if (typeof console !== 'undefined') {
+      console.error(message);
+    }
+    try {
+      // --- Welcome to debugging React ---
+      // This error was thrown as a convenience so that you can use this stack
+      // to find the callsite that caused this warning to fire.
+      throw new Error(message);
+    } catch (x) {}
+  }
+
+  warning = function(condition, format, args) {
+    var len = arguments.length;
+    args = new Array(len > 2 ? len - 2 : 0);
+    for (var key = 2; key < len; key++) {
+      args[key - 2] = arguments[key];
+    }
+    if (format === undefined) {
+      throw new Error(
+          '`warning(condition, format, ...args)` requires a warning ' +
+          'message argument'
+      );
+    }
+    if (!condition) {
+      printWarning.apply(null, [format].concat(args));
+    }
+  };
+}
+
+module.exports = warning;
+
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/resolve-pathname/index.js":
+/*!******************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/resolve-pathname/index.js ***!
+  \******************************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+function isAbsolute(pathname) {
+  return pathname.charAt(0) === '/';
+}
+
+// About 1.5x faster than the two-arg version of Array#splice()
+function spliceOne(list, index) {
+  for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {
+    list[i] = list[k];
+  }
+
+  list.pop();
+}
+
+// This implementation is based heavily on node's url.parse
+function resolvePathname(to) {
+  var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
+
+  var toParts = to && to.split('/') || [];
+  var fromParts = from && from.split('/') || [];
+
+  var isToAbs = to && isAbsolute(to);
+  var isFromAbs = from && isAbsolute(from);
+  var mustEndAbs = isToAbs || isFromAbs;
+
+  if (to && isAbsolute(to)) {
+    // to is absolute
+    fromParts = toParts;
+  } else if (toParts.length) {
+    // to is relative, drop the filename
+    fromParts.pop();
+    fromParts = fromParts.concat(toParts);
+  }
+
+  if (!fromParts.length) return '/';
+
+  var hasTrailingSlash = void 0;
+  if (fromParts.length) {
+    var last = fromParts[fromParts.length - 1];
+    hasTrailingSlash = last === '.' || last === '..' || last === '';
+  } else {
+    hasTrailingSlash = false;
+  }
+
+  var up = 0;
+  for (var i = fromParts.length; i >= 0; i--) {
+    var part = fromParts[i];
+
+    if (part === '.') {
+      spliceOne(fromParts, i);
+    } else if (part === '..') {
+      spliceOne(fromParts, i);
+      up++;
+    } else if (up) {
+      spliceOne(fromParts, i);
+      up--;
+    }
+  }
+
+  if (!mustEndAbs) for (; up--; up) {
+    fromParts.unshift('..');
+  }if (mustEndAbs && fromParts[0] !== '' && (!fromParts[0] || !isAbsolute(fromParts[0]))) fromParts.unshift('');
+
+  var result = fromParts.join('/');
+
+  if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';
+
+  return result;
+}
+
+/* harmony default export */ __webpack_exports__["default"] = (resolvePathname);
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/value-equal/index.js":
+/*!*************************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/value-equal/index.js ***!
+  \*************************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+function valueEqual(a, b) {
+  if (a === b) return true;
+
+  if (a == null || b == null) return false;
+
+  if (Array.isArray(a)) {
+    return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {
+      return valueEqual(item, b[index]);
+    });
+  }
+
+  var aType = typeof a === 'undefined' ? 'undefined' : _typeof(a);
+  var bType = typeof b === 'undefined' ? 'undefined' : _typeof(b);
+
+  if (aType !== bType) return false;
+
+  if (aType === 'object') {
+    var aValue = a.valueOf();
+    var bValue = b.valueOf();
+
+    if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);
+
+    var aKeys = Object.keys(a);
+    var bKeys = Object.keys(b);
+
+    if (aKeys.length !== bKeys.length) return false;
+
+    return aKeys.every(function (key) {
+      return valueEqual(a[key], b[key]);
+    });
+  }
+
+  return false;
+}
+
+/* harmony default export */ __webpack_exports__["default"] = (valueEqual);
+
+/***/ }),
+
+/***/ "./node_modules/react-router-dom/node_modules/warning/browser.js":
+/*!***********************************************************************!*\
+  !*** ./node_modules/react-router-dom/node_modules/warning/browser.js ***!
+  \***********************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright 2014-2015, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ */
+
+
+
+/**
+ * Similar to invariant but only logs a warning if the condition is not met.
+ * This can be used to log issues in development environments in critical
+ * paths. Removing the logging code for production environments will keep the
+ * same logic and follow the same code paths.
+ */
+
+var warning = function() {};
+
+if (true) {
+  warning = function(condition, format, args) {
+    var len = arguments.length;
+    args = new Array(len > 2 ? len - 2 : 0);
+    for (var key = 2; key < len; key++) {
+      args[key - 2] = arguments[key];
+    }
+    if (format === undefined) {
+      throw new Error(
+        '`warning(condition, format, ...args)` requires a warning ' +
+        'message argument'
+      );
+    }
+
+    if (format.length < 10 || (/^[s\W]*$/).test(format)) {
+      throw new Error(
+        'The warning format should be able to uniquely identify this ' +
+        'warning. Please, use a more descriptive format than: ' + format
+      );
+    }
+
+    if (!condition) {
+      var argIndex = 0;
+      var message = 'Warning: ' +
+        format.replace(/%s/g, function() {
+          return args[argIndex++];
+        });
+      if (typeof console !== 'undefined') {
+        console.error(message);
+      }
+      try {
+        // This error was thrown as a convenience so that you can use this stack
+        // to find the callsite that caused this warning to fire.
+        throw new Error(message);
+      } catch(x) {}
+    }
+  };
+}
+
+module.exports = warning;
+
+
+/***/ }),
+
+/***/ "./node_modules/react-router-redux/lib/actions.js":
+/*!********************************************************!*\
+  !*** ./node_modules/react-router-redux/lib/actions.js ***!
+  \********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+/**
+ * This action type will be dispatched by the history actions below.
+ * If you're writing a middleware to watch for navigation events, be sure to
+ * look for actions of this type.
+ */
+var CALL_HISTORY_METHOD = exports.CALL_HISTORY_METHOD = '@@router/CALL_HISTORY_METHOD';
+
+function updateLocation(method) {
+  return function () {
+    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+      args[_key] = arguments[_key];
+    }
+
+    return {
+      type: CALL_HISTORY_METHOD,
+      payload: { method: method, args: args }
+    };
+  };
+}
+
+/**
+ * These actions correspond to the history API.
+ * The associated routerMiddleware will capture these events before they get to
+ * your reducer and reissue them as the matching function on your history.
+ */
+var push = exports.push = updateLocation('push');
+var replace = exports.replace = updateLocation('replace');
+var go = exports.go = updateLocation('go');
+var goBack = exports.goBack = updateLocation('goBack');
+var goForward = exports.goForward = updateLocation('goForward');
+
+var routerActions = exports.routerActions = { push: push, replace: replace, go: go, goBack: goBack, goForward: goForward };
+
+/***/ }),
+
+/***/ "./node_modules/react-router-redux/lib/index.js":
+/*!******************************************************!*\
+  !*** ./node_modules/react-router-redux/lib/index.js ***!
+  \******************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.routerMiddleware = exports.routerActions = exports.goForward = exports.goBack = exports.go = exports.replace = exports.push = exports.CALL_HISTORY_METHOD = exports.routerReducer = exports.LOCATION_CHANGE = exports.syncHistoryWithStore = undefined;
+
+var _reducer = __webpack_require__(/*! ./reducer */ "./node_modules/react-router-redux/lib/reducer.js");
+
+Object.defineProperty(exports, 'LOCATION_CHANGE', {
+  enumerable: true,
+  get: function get() {
+    return _reducer.LOCATION_CHANGE;
+  }
+});
+Object.defineProperty(exports, 'routerReducer', {
+  enumerable: true,
+  get: function get() {
+    return _reducer.routerReducer;
+  }
+});
+
+var _actions = __webpack_require__(/*! ./actions */ "./node_modules/react-router-redux/lib/actions.js");
+
+Object.defineProperty(exports, 'CALL_HISTORY_METHOD', {
+  enumerable: true,
+  get: function get() {
+    return _actions.CALL_HISTORY_METHOD;
+  }
+});
+Object.defineProperty(exports, 'push', {
+  enumerable: true,
+  get: function get() {
+    return _actions.push;
+  }
+});
+Object.defineProperty(exports, 'replace', {
+  enumerable: true,
+  get: function get() {
+    return _actions.replace;
+  }
+});
+Object.defineProperty(exports, 'go', {
+  enumerable: true,
+  get: function get() {
+    return _actions.go;
+  }
+});
+Object.defineProperty(exports, 'goBack', {
+  enumerable: true,
+  get: function get() {
+    return _actions.goBack;
+  }
+});
+Object.defineProperty(exports, 'goForward', {
+  enumerable: true,
+  get: function get() {
+    return _actions.goForward;
+  }
+});
+Object.defineProperty(exports, 'routerActions', {
+  enumerable: true,
+  get: function get() {
+    return _actions.routerActions;
+  }
+});
+
+var _sync = __webpack_require__(/*! ./sync */ "./node_modules/react-router-redux/lib/sync.js");
+
+var _sync2 = _interopRequireDefault(_sync);
+
+var _middleware = __webpack_require__(/*! ./middleware */ "./node_modules/react-router-redux/lib/middleware.js");
+
+var _middleware2 = _interopRequireDefault(_middleware);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+
+exports.syncHistoryWithStore = _sync2['default'];
+exports.routerMiddleware = _middleware2['default'];
+
+/***/ }),
+
+/***/ "./node_modules/react-router-redux/lib/middleware.js":
+/*!***********************************************************!*\
+  !*** ./node_modules/react-router-redux/lib/middleware.js ***!
+  \***********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports['default'] = routerMiddleware;
+
+var _actions = __webpack_require__(/*! ./actions */ "./node_modules/react-router-redux/lib/actions.js");
+
+function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
+
+/**
+ * This middleware captures CALL_HISTORY_METHOD actions to redirect to the
+ * provided history object. This will prevent these actions from reaching your
+ * reducer or any middleware that comes after this one.
+ */
+function routerMiddleware(history) {
+  return function () {
+    return function (next) {
+      return function (action) {
+        if (action.type !== _actions.CALL_HISTORY_METHOD) {
+          return next(action);
+        }
+
+        var _action$payload = action.payload,
+            method = _action$payload.method,
+            args = _action$payload.args;
+
+        history[method].apply(history, _toConsumableArray(args));
+      };
+    };
+  };
+}
+
+/***/ }),
+
+/***/ "./node_modules/react-router-redux/lib/reducer.js":
+/*!********************************************************!*\
+  !*** ./node_modules/react-router-redux/lib/reducer.js ***!
+  \********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+exports.routerReducer = routerReducer;
+/**
+ * This action type will be dispatched when your history
+ * receives a location change.
+ */
+var LOCATION_CHANGE = exports.LOCATION_CHANGE = '@@router/LOCATION_CHANGE';
+
+var initialState = {
+  locationBeforeTransitions: null
+};
+
+/**
+ * This reducer will update the state with the most recent location history
+ * has transitioned to. This may not be in sync with the router, particularly
+ * if you have asynchronously-loaded routes, so reading from and relying on
+ * this state is discouraged.
+ */
+function routerReducer() {
+  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
+
+  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
+      type = _ref.type,
+      payload = _ref.payload;
+
+  if (type === LOCATION_CHANGE) {
+    return _extends({}, state, { locationBeforeTransitions: payload });
+  }
+
+  return state;
+}
+
+/***/ }),
+
+/***/ "./node_modules/react-router-redux/lib/sync.js":
+/*!*****************************************************!*\
+  !*** ./node_modules/react-router-redux/lib/sync.js ***!
+  \*****************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+exports['default'] = syncHistoryWithStore;
+
+var _reducer = __webpack_require__(/*! ./reducer */ "./node_modules/react-router-redux/lib/reducer.js");
+
+var defaultSelectLocationState = function defaultSelectLocationState(state) {
+  return state.routing;
+};
+
+/**
+ * This function synchronizes your history state with the Redux store.
+ * Location changes flow from history to the store. An enhanced history is
+ * returned with a listen method that responds to store updates for location.
+ *
+ * When this history is provided to the router, this means the location data
+ * will flow like this:
+ * history.push -> store.dispatch -> enhancedHistory.listen -> router
+ * This ensures that when the store state changes due to a replay or other
+ * event, the router will be updated appropriately and can transition to the
+ * correct router state.
+ */
+function syncHistoryWithStore(history, store) {
+  var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
+      _ref$selectLocationSt = _ref.selectLocationState,
+      selectLocationState = _ref$selectLocationSt === undefined ? defaultSelectLocationState : _ref$selectLocationSt,
+      _ref$adjustUrlOnRepla = _ref.adjustUrlOnReplay,
+      adjustUrlOnReplay = _ref$adjustUrlOnRepla === undefined ? true : _ref$adjustUrlOnRepla;
+
+  // Ensure that the reducer is mounted on the store and functioning properly.
+  if (typeof selectLocationState(store.getState()) === 'undefined') {
+    throw new Error('Expected the routing state to be available either as `state.routing` ' + 'or as the custom expression you can specify as `selectLocationState` ' + 'in the `syncHistoryWithStore()` options. ' + 'Ensure you have added the `routerReducer` to your store\'s ' + 'reducers via `combineReducers` or whatever method you use to isolate ' + 'your reducers.');
+  }
+
+  var initialLocation = void 0;
+  var isTimeTraveling = void 0;
+  var unsubscribeFromStore = void 0;
+  var unsubscribeFromHistory = void 0;
+  var currentLocation = void 0;
+
+  // What does the store say about current location?
+  var getLocationInStore = function getLocationInStore(useInitialIfEmpty) {
+    var locationState = selectLocationState(store.getState());
+    return locationState.locationBeforeTransitions || (useInitialIfEmpty ? initialLocation : undefined);
+  };
+
+  // Init initialLocation with potential location in store
+  initialLocation = getLocationInStore();
+
+  // If the store is replayed, update the URL in the browser to match.
+  if (adjustUrlOnReplay) {
+    var handleStoreChange = function handleStoreChange() {
+      var locationInStore = getLocationInStore(true);
+      if (currentLocation === locationInStore || initialLocation === locationInStore) {
+        return;
+      }
+
+      // Update address bar to reflect store state
+      isTimeTraveling = true;
+      currentLocation = locationInStore;
+      history.transitionTo(_extends({}, locationInStore, {
+        action: 'PUSH'
+      }));
+      isTimeTraveling = false;
+    };
+
+    unsubscribeFromStore = store.subscribe(handleStoreChange);
+    handleStoreChange();
+  }
+
+  // Whenever location changes, dispatch an action to get it in the store
+  var handleLocationChange = function handleLocationChange(location) {
+    // ... unless we just caused that location change
+    if (isTimeTraveling) {
+      return;
+    }
+
+    // Remember where we are
+    currentLocation = location;
+
+    // Are we being called for the first time?
+    if (!initialLocation) {
+      // Remember as a fallback in case state is reset
+      initialLocation = location;
+
+      // Respect persisted location, if any
+      if (getLocationInStore()) {
+        return;
+      }
+    }
+
+    // Tell the store to update by dispatching an action
+    store.dispatch({
+      type: _reducer.LOCATION_CHANGE,
+      payload: location
+    });
+  };
+  unsubscribeFromHistory = history.listen(handleLocationChange);
+
+  // History 3.x doesn't call listen synchronously, so fire the initial location change ourselves
+  if (history.getCurrentLocation) {
+    handleLocationChange(history.getCurrentLocation());
+  }
+
+  // The enhanced history uses store as source of truth
+  return _extends({}, history, {
+    // The listeners are subscribed to the store instead of history
+    listen: function listen(listener) {
+      // Copy of last location.
+      var lastPublishedLocation = getLocationInStore(true);
+
+      // Keep track of whether we unsubscribed, as Redux store
+      // only applies changes in subscriptions on next dispatch
+      var unsubscribed = false;
+      var unsubscribeFromStore = store.subscribe(function () {
+        var currentLocation = getLocationInStore(true);
+        if (currentLocation === lastPublishedLocation) {
+          return;
+        }
+        lastPublishedLocation = currentLocation;
+        if (!unsubscribed) {
+          listener(lastPublishedLocation);
+        }
+      });
+
+      // History 2.x listeners expect a synchronous call. Make the first call to the
+      // listener after subscribing to the store, in case the listener causes a
+      // location change (e.g. when it redirects)
+      if (!history.getCurrentLocation) {
+        listener(lastPublishedLocation);
+      }
+
+      // Let user unsubscribe later
+      return function () {
+        unsubscribed = true;
+        unsubscribeFromStore();
+      };
+    },
+
+
+    // It also provides a way to destroy internal listeners
+    unsubscribe: function unsubscribe() {
+      if (adjustUrlOnReplay) {
+        unsubscribeFromStore();
+      }
+      unsubscribeFromHistory();
+    }
+  });
+}
+
+/***/ }),
+
+/***/ "./node_modules/redux-thunk/lib/index.js":
+/*!***********************************************!*\
+  !*** ./node_modules/redux-thunk/lib/index.js ***!
+  \***********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+function createThunkMiddleware(extraArgument) {
+  return function (_ref) {
+    var dispatch = _ref.dispatch,
+        getState = _ref.getState;
+    return function (next) {
+      return function (action) {
+        if (typeof action === 'function') {
+          return action(dispatch, getState, extraArgument);
+        }
+
+        return next(action);
+      };
+    };
+  };
+}
+
+var thunk = createThunkMiddleware();
+thunk.withExtraArgument = createThunkMiddleware;
+
+exports['default'] = thunk;
+
+/***/ }),
+
+/***/ "./node_modules/redux/es/redux.js":
+/*!****************************************!*\
+  !*** ./node_modules/redux/es/redux.js ***!
+  \****************************************/
+/*! exports provided: createStore, combineReducers, bindActionCreators, applyMiddleware, compose, __DO_NOT_USE__ActionTypes */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStore", function() { return createStore; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineReducers", function() { return combineReducers; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindActionCreators", function() { return bindActionCreators; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "applyMiddleware", function() { return applyMiddleware; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return compose; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__DO_NOT_USE__ActionTypes", function() { return ActionTypes; });
+/* harmony import */ var symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! symbol-observable */ "./node_modules/redux/node_modules/symbol-observable/es/index.js");
+
+
+/**
+ * These are private action types reserved by Redux.
+ * For any unknown actions, you must return the current state.
+ * If the current state is undefined, you must return the initial state.
+ * Do not reference these action types directly in your code.
+ */
+var ActionTypes = {
+  INIT: '@@redux/INIT' + Math.random().toString(36).substring(7).split('').join('.'),
+  REPLACE: '@@redux/REPLACE' + Math.random().toString(36).substring(7).split('').join('.')
+};
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
+  return typeof obj;
+} : function (obj) {
+  return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
+};
+
+var _extends = Object.assign || function (target) {
+  for (var i = 1; i < arguments.length; i++) {
+    var source = arguments[i];
+
+    for (var key in source) {
+      if (Object.prototype.hasOwnProperty.call(source, key)) {
+        target[key] = source[key];
+      }
+    }
+  }
+
+  return target;
+};
+
+/**
+ * @param {any} obj The object to inspect.
+ * @returns {boolean} True if the argument appears to be a plain object.
+ */
+function isPlainObject(obj) {
+  if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || obj === null) return false;
+
+  var proto = obj;
+  while (Object.getPrototypeOf(proto) !== null) {
+    proto = Object.getPrototypeOf(proto);
+  }
+
+  return Object.getPrototypeOf(obj) === proto;
+}
+
+/**
+ * Creates a Redux store that holds the state tree.
+ * The only way to change the data in the store is to call `dispatch()` on it.
+ *
+ * There should only be a single store in your app. To specify how different
+ * parts of the state tree respond to actions, you may combine several reducers
+ * into a single reducer function by using `combineReducers`.
+ *
+ * @param {Function} reducer A function that returns the next state tree, given
+ * the current state tree and the action to handle.
+ *
+ * @param {any} [preloadedState] The initial state. You may optionally specify it
+ * to hydrate the state from the server in universal apps, or to restore a
+ * previously serialized user session.
+ * If you use `combineReducers` to produce the root reducer function, this must be
+ * an object with the same shape as `combineReducers` keys.
+ *
+ * @param {Function} [enhancer] The store enhancer. You may optionally specify it
+ * to enhance the store with third-party capabilities such as middleware,
+ * time travel, persistence, etc. The only store enhancer that ships with Redux
+ * is `applyMiddleware()`.
+ *
+ * @returns {Store} A Redux store that lets you read the state, dispatch actions
+ * and subscribe to changes.
+ */
+function createStore(reducer, preloadedState, enhancer) {
+  var _ref2;
+
+  if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
+    enhancer = preloadedState;
+    preloadedState = undefined;
+  }
+
+  if (typeof enhancer !== 'undefined') {
+    if (typeof enhancer !== 'function') {
+      throw new Error('Expected the enhancer to be a function.');
+    }
+
+    return enhancer(createStore)(reducer, preloadedState);
+  }
+
+  if (typeof reducer !== 'function') {
+    throw new Error('Expected the reducer to be a function.');
+  }
+
+  var currentReducer = reducer;
+  var currentState = preloadedState;
+  var currentListeners = [];
+  var nextListeners = currentListeners;
+  var isDispatching = false;
+
+  function ensureCanMutateNextListeners() {
+    if (nextListeners === currentListeners) {
+      nextListeners = currentListeners.slice();
+    }
+  }
+
+  /**
+   * Reads the state tree managed by the store.
+   *
+   * @returns {any} The current state tree of your application.
+   */
+  function getState() {
+    if (isDispatching) {
+      throw new Error('You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.');
+    }
+
+    return currentState;
+  }
+
+  /**
+   * Adds a change listener. It will be called any time an action is dispatched,
+   * and some part of the state tree may potentially have changed. You may then
+   * call `getState()` to read the current state tree inside the callback.
+   *
+   * You may call `dispatch()` from a change listener, with the following
+   * caveats:
+   *
+   * 1. The subscriptions are snapshotted just before every `dispatch()` call.
+   * If you subscribe or unsubscribe while the listeners are being invoked, this
+   * will not have any effect on the `dispatch()` that is currently in progress.
+   * However, the next `dispatch()` call, whether nested or not, will use a more
+   * recent snapshot of the subscription list.
+   *
+   * 2. The listener should not expect to see all state changes, as the state
+   * might have been updated multiple times during a nested `dispatch()` before
+   * the listener is called. It is, however, guaranteed that all subscribers
+   * registered before the `dispatch()` started will be called with the latest
+   * state by the time it exits.
+   *
+   * @param {Function} listener A callback to be invoked on every dispatch.
+   * @returns {Function} A function to remove this change listener.
+   */
+  function subscribe(listener) {
+    if (typeof listener !== 'function') {
+      throw new Error('Expected the listener to be a function.');
+    }
+
+    if (isDispatching) {
+      throw new Error('You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');
+    }
+
+    var isSubscribed = true;
+
+    ensureCanMutateNextListeners();
+    nextListeners.push(listener);
+
+    return function unsubscribe() {
+      if (!isSubscribed) {
+        return;
+      }
+
+      if (isDispatching) {
+        throw new Error('You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');
+      }
+
+      isSubscribed = false;
+
+      ensureCanMutateNextListeners();
+      var index = nextListeners.indexOf(listener);
+      nextListeners.splice(index, 1);
+    };
+  }
+
+  /**
+   * Dispatches an action. It is the only way to trigger a state change.
+   *
+   * The `reducer` function, used to create the store, will be called with the
+   * current state tree and the given `action`. Its return value will
+   * be considered the **next** state of the tree, and the change listeners
+   * will be notified.
+   *
+   * The base implementation only supports plain object actions. If you want to
+   * dispatch a Promise, an Observable, a thunk, or something else, you need to
+   * wrap your store creating function into the corresponding middleware. For
+   * example, see the documentation for the `redux-thunk` package. Even the
+   * middleware will eventually dispatch plain object actions using this method.
+   *
+   * @param {Object} action A plain object representing “what changed”. It is
+   * a good idea to keep actions serializable so you can record and replay user
+   * sessions, or use the time travelling `redux-devtools`. An action must have
+   * a `type` property which may not be `undefined`. It is a good idea to use
+   * string constants for action types.
+   *
+   * @returns {Object} For convenience, the same action object you dispatched.
+   *
+   * Note that, if you use a custom middleware, it may wrap `dispatch()` to
+   * return something else (for example, a Promise you can await).
+   */
+  function dispatch(action) {
+    if (!isPlainObject(action)) {
+      throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');
+    }
+
+    if (typeof action.type === 'undefined') {
+      throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?');
+    }
+
+    if (isDispatching) {
+      throw new Error('Reducers may not dispatch actions.');
+    }
+
+    try {
+      isDispatching = true;
+      currentState = currentReducer(currentState, action);
+    } finally {
+      isDispatching = false;
+    }
+
+    var listeners = currentListeners = nextListeners;
+    for (var i = 0; i < listeners.length; i++) {
+      var listener = listeners[i];
+      listener();
+    }
+
+    return action;
+  }
+
+  /**
+   * Replaces the reducer currently used by the store to calculate the state.
+   *
+   * You might need this if your app implements code splitting and you want to
+   * load some of the reducers dynamically. You might also need this if you
+   * implement a hot reloading mechanism for Redux.
+   *
+   * @param {Function} nextReducer The reducer for the store to use instead.
+   * @returns {void}
+   */
+  function replaceReducer(nextReducer) {
+    if (typeof nextReducer !== 'function') {
+      throw new Error('Expected the nextReducer to be a function.');
+    }
+
+    currentReducer = nextReducer;
+    dispatch({ type: ActionTypes.REPLACE });
+  }
+
+  /**
+   * Interoperability point for observable/reactive libraries.
+   * @returns {observable} A minimal observable of state changes.
+   * For more information, see the observable proposal:
+   * https://github.com/tc39/proposal-observable
+   */
+  function observable() {
+    var _ref;
+
+    var outerSubscribe = subscribe;
+    return _ref = {
+      /**
+       * The minimal observable subscription method.
+       * @param {Object} observer Any object that can be used as an observer.
+       * The observer object should have a `next` method.
+       * @returns {subscription} An object with an `unsubscribe` method that can
+       * be used to unsubscribe the observable from the store, and prevent further
+       * emission of values from the observable.
+       */
+      subscribe: function subscribe(observer) {
+        if ((typeof observer === 'undefined' ? 'undefined' : _typeof(observer)) !== 'object' || observer === null) {
+          throw new TypeError('Expected the observer to be an object.');
+        }
+
+        function observeState() {
+          if (observer.next) {
+            observer.next(getState());
+          }
+        }
+
+        observeState();
+        var unsubscribe = outerSubscribe(observeState);
+        return { unsubscribe: unsubscribe };
+      }
+    }, _ref[symbol_observable__WEBPACK_IMPORTED_MODULE_0__["default"]] = function () {
+      return this;
+    }, _ref;
+  }
+
+  // When a store is created, an "INIT" action is dispatched so that every
+  // reducer returns their initial state. This effectively populates
+  // the initial state tree.
+  dispatch({ type: ActionTypes.INIT });
+
+  return _ref2 = {
+    dispatch: dispatch,
+    subscribe: subscribe,
+    getState: getState,
+    replaceReducer: replaceReducer
+  }, _ref2[symbol_observable__WEBPACK_IMPORTED_MODULE_0__["default"]] = observable, _ref2;
+}
+
+/**
+ * Prints a warning in the console if it exists.
+ *
+ * @param {String} message The warning message.
+ * @returns {void}
+ */
+function warning(message) {
+  /* eslint-disable no-console */
+  if (typeof console !== 'undefined' && typeof console.error === 'function') {
+    console.error(message);
+  }
+  /* eslint-enable no-console */
+  try {
+    // This error was thrown as a convenience so that if you enable
+    // "break on all exceptions" in your console,
+    // it would pause the execution at this line.
+    throw new Error(message);
+  } catch (e) {} // eslint-disable-line no-empty
+}
+
+function getUndefinedStateErrorMessage(key, action) {
+  var actionType = action && action.type;
+  var actionDescription = actionType && 'action "' + String(actionType) + '"' || 'an action';
+
+  return 'Given ' + actionDescription + ', reducer "' + key + '" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state. ' + 'If you want this reducer to hold no value, you can return null instead of undefined.';
+}
+
+function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
+  var reducerKeys = Object.keys(reducers);
+  var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';
+
+  if (reducerKeys.length === 0) {
+    return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
+  }
+
+  if (!isPlainObject(inputState)) {
+    return 'The ' + argumentName + ' has unexpected type of "' + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"');
+  }
+
+  var unexpectedKeys = Object.keys(inputState).filter(function (key) {
+    return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];
+  });
+
+  unexpectedKeys.forEach(function (key) {
+    unexpectedKeyCache[key] = true;
+  });
+
+  if (action && action.type === ActionTypes.REPLACE) return;
+
+  if (unexpectedKeys.length > 0) {
+    return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.');
+  }
+}
+
+function assertReducerShape(reducers) {
+  Object.keys(reducers).forEach(function (key) {
+    var reducer = reducers[key];
+    var initialState = reducer(undefined, { type: ActionTypes.INIT });
+
+    if (typeof initialState === 'undefined') {
+      throw new Error('Reducer "' + key + '" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined. If you don\'t want to set a value for this reducer, ' + 'you can use null instead of undefined.');
+    }
+
+    var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');
+    if (typeof reducer(undefined, { type: type }) === 'undefined') {
+      throw new Error('Reducer "' + key + '" returned undefined when probed with a random type. ' + ('Don\'t try to handle ' + ActionTypes.INIT + ' or other actions in "redux/*" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined, but can be null.');
+    }
+  });
+}
+
+/**
+ * Turns an object whose values are different reducer functions, into a single
+ * reducer function. It will call every child reducer, and gather their results
+ * into a single state object, whose keys correspond to the keys of the passed
+ * reducer functions.
+ *
+ * @param {Object} reducers An object whose values correspond to different
+ * reducer functions that need to be combined into one. One handy way to obtain
+ * it is to use ES6 `import * as reducers` syntax. The reducers may never return
+ * undefined for any action. Instead, they should return their initial state
+ * if the state passed to them was undefined, and the current state for any
+ * unrecognized action.
+ *
+ * @returns {Function} A reducer function that invokes every reducer inside the
+ * passed object, and builds a state object with the same shape.
+ */
+function combineReducers(reducers) {
+  var reducerKeys = Object.keys(reducers);
+  var finalReducers = {};
+  for (var i = 0; i < reducerKeys.length; i++) {
+    var key = reducerKeys[i];
+
+    if (true) {
+      if (typeof reducers[key] === 'undefined') {
+        warning('No reducer provided for key "' + key + '"');
+      }
+    }
+
+    if (typeof reducers[key] === 'function') {
+      finalReducers[key] = reducers[key];
+    }
+  }
+  var finalReducerKeys = Object.keys(finalReducers);
+
+  var unexpectedKeyCache = void 0;
+  if (true) {
+    unexpectedKeyCache = {};
+  }
+
+  var shapeAssertionError = void 0;
+  try {
+    assertReducerShape(finalReducers);
+  } catch (e) {
+    shapeAssertionError = e;
+  }
+
+  return function combination() {
+    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+    var action = arguments[1];
+
+    if (shapeAssertionError) {
+      throw shapeAssertionError;
+    }
+
+    if (true) {
+      var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);
+      if (warningMessage) {
+        warning(warningMessage);
+      }
+    }
+
+    var hasChanged = false;
+    var nextState = {};
+    for (var _i = 0; _i < finalReducerKeys.length; _i++) {
+      var _key = finalReducerKeys[_i];
+      var reducer = finalReducers[_key];
+      var previousStateForKey = state[_key];
+      var nextStateForKey = reducer(previousStateForKey, action);
+      if (typeof nextStateForKey === 'undefined') {
+        var errorMessage = getUndefinedStateErrorMessage(_key, action);
+        throw new Error(errorMessage);
+      }
+      nextState[_key] = nextStateForKey;
+      hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
+    }
+    return hasChanged ? nextState : state;
+  };
+}
+
+function bindActionCreator(actionCreator, dispatch) {
+  return function () {
+    return dispatch(actionCreator.apply(this, arguments));
+  };
+}
+
+/**
+ * Turns an object whose values are action creators, into an object with the
+ * same keys, but with every function wrapped into a `dispatch` call so they
+ * may be invoked directly. This is just a convenience method, as you can call
+ * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
+ *
+ * For convenience, you can also pass a single function as the first argument,
+ * and get a function in return.
+ *
+ * @param {Function|Object} actionCreators An object whose values are action
+ * creator functions. One handy way to obtain it is to use ES6 `import * as`
+ * syntax. You may also pass a single function.
+ *
+ * @param {Function} dispatch The `dispatch` function available on your Redux
+ * store.
+ *
+ * @returns {Function|Object} The object mimicking the original object, but with
+ * every action creator wrapped into the `dispatch` call. If you passed a
+ * function as `actionCreators`, the return value will also be a single
+ * function.
  */
-var i=n(215),r=n(214),o=n(115);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return h(this,t)}return l(this,t,e,n)}function l(t,e,n,i){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,i){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,n):new Uint8Array(e,n,i);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=p(t,e);return t}(t,e,n,i):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|d(e,n),r=(t=a(t,i)).write(e,n);r!==i&&(t=t.slice(0,r));return t}(t,e,n):function(t,e){if(u.isBuffer(e)){var n=0|f(e.length);return 0===(t=a(t,n)).length?t:(e.copy(t,0,0,n),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(i=e.length)!=i?a(t,0):p(t,e);if("Buffer"===e.type&&o(e.data))return p(t,e.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function c(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function h(t,e){if(c(e),t=a(t,e<0?0:0|f(e)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function p(t,e){var n=e.length<0?0:0|f(e.length);t=a(t,n);for(var i=0;i<n;i+=1)t[i]=255&e[i];return t}function f(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return B(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(t).length;default:if(i)return B(t).length;e=(""+e).toLowerCase(),i=!0}}function y(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function m(t,e,n,i,r){if(0===t.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(r)return-1;n=t.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof e&&(e=u.from(e,i)),u.isBuffer(e))return 0===e.length?-1:_(t,e,n,i,r);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):_(t,[e],n,i,r);throw new TypeError("val must be string, number or Buffer")}function _(t,e,n,i,r){var o,s=1,a=t.length,u=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,n/=2}function l(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(r){var c=-1;for(o=n;o<a;o++)if(l(t,o)===l(e,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*s}else-1!==c&&(o-=o-c),c=-1}else for(n+u>a&&(n=a-u),o=n;o>=0;o--){for(var h=!0,p=0;p<u;p++)if(l(t,o+p)!==l(e,p)){h=!1;break}if(h)return o}return-1}function v(t,e,n,i){n=Number(n)||0;var r=t.length-n;i?(i=Number(i))>r&&(i=r):i=r;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");i>o/2&&(i=o/2);for(var s=0;s<i;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[n+s]=a}return s}function g(t,e,n,i){return z(B(e,t.length-n),t,n,i)}function b(t,e,n,i){return z(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,i)}function w(t,e,n,i){return b(t,e,n,i)}function k(t,e,n,i){return z(U(e),t,n,i)}function S(t,e,n,i){return z(function(t,e){for(var n,i,r,o=[],s=0;s<t.length&&!((e-=2)<0);++s)n=t.charCodeAt(s),i=n>>8,r=n%256,o.push(r),o.push(i);return o}(e,t.length-n),t,n,i)}function T(t,e,n){return 0===e&&n===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,n))}function x(t,e,n){n=Math.min(t.length,n);for(var i=[],r=e;r<n;){var o,s,a,u,l=t[r],c=null,h=l>239?4:l>223?3:l>191?2:1;if(r+h<=n)switch(h){case 1:l<128&&(c=l);break;case 2:128==(192&(o=t[r+1]))&&(u=(31&l)<<6|63&o)>127&&(c=u);break;case 3:o=t[r+1],s=t[r+2],128==(192&o)&&128==(192&s)&&(u=(15&l)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=t[r+1],s=t[r+2],a=t[r+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(c=u)}null===c?(c=65533,h=1):c>65535&&(c-=65536,i.push(c>>>10&1023|55296),c=56320|1023&c),i.push(c),r+=h}return function(t){var e=t.length;if(e<=O)return String.fromCharCode.apply(String,t);var n="",i=0;for(;i<e;)n+=String.fromCharCode.apply(String,t.slice(i,i+=O));return n}(i)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,n){return l(null,t,e,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,n){return function(t,e,n,i){return c(e),e<=0?a(t,e):void 0!==n?"string"==typeof i?a(t,e).fill(n,i):a(t,e).fill(n):a(t,e)}(null,t,e,n)},u.allocUnsafe=function(t){return h(null,t)},u.allocUnsafeSlow=function(t){return h(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,i=e.length,r=0,o=Math.min(n,i);r<o;++r)if(t[r]!==e[r]){n=t[r],i=e[r];break}return n<i?-1:i<n?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var i=u.allocUnsafe(e),r=0;for(n=0;n<t.length;++n){var s=t[n];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,r),r+=s.length}return i},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?x(this,0,t):function(t,e,n){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return E(this,e,n);case"utf8":case"utf-8":return x(this,e,n);case"ascii":return P(this,e,n);case"latin1":case"binary":return A(this,e,n);case"base64":return T(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,n);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,n,i,r){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),e<0||n>t.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&e>=n)return 0;if(i>=r)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,r>>>=0,this===t)return 0;for(var o=r-i,s=n-e,a=Math.min(o,s),l=this.slice(i,r),c=t.slice(e,n),h=0;h<a;++h)if(l[h]!==c[h]){o=l[h],s=c[h];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},u.prototype.indexOf=function(t,e,n){return m(this,t,e,n,!0)},u.prototype.lastIndexOf=function(t,e,n){return m(this,t,e,n,!1)},u.prototype.write=function(t,e,n,i){if(void 0===e)i="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)i=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}var r=this.length-e;if((void 0===n||n>r)&&(n=r),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return v(this,t,e,n);case"utf8":case"utf-8":return g(this,t,e,n);case"ascii":return b(this,t,e,n);case"latin1":case"binary":return w(this,t,e,n);case"base64":return k(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function P(t,e,n){var i="";n=Math.min(t.length,n);for(var r=e;r<n;++r)i+=String.fromCharCode(127&t[r]);return i}function A(t,e,n){var i="";n=Math.min(t.length,n);for(var r=e;r<n;++r)i+=String.fromCharCode(t[r]);return i}function E(t,e,n){var i=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>i)&&(n=i);for(var r="",o=e;o<n;++o)r+=I(t[o]);return r}function C(t,e,n){for(var i=t.slice(e,n),r="",o=0;o<i.length;o+=2)r+=String.fromCharCode(i[o]+256*i[o+1]);return r}function M(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function R(t,e,n,i,r,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>r||e<o)throw new RangeError('"value" argument is out of bounds');if(n+i>t.length)throw new RangeError("Index out of range")}function j(t,e,n,i){e<0&&(e=65535+e+1);for(var r=0,o=Math.min(t.length-n,2);r<o;++r)t[n+r]=(e&255<<8*(i?r:1-r))>>>8*(i?r:1-r)}function F(t,e,n,i){e<0&&(e=4294967295+e+1);for(var r=0,o=Math.min(t.length-n,4);r<o;++r)t[n+r]=e>>>8*(i?r:3-r)&255}function N(t,e,n,i,r,o){if(n+i>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(t,e,n,i,o){return o||N(t,0,n,4),r.write(t,e,n,i,23,4),n+4}function D(t,e,n,i,o){return o||N(t,0,n,8),r.write(t,e,n,i,52,8),n+8}u.prototype.slice=function(t,e){var n,i=this.length;if(t=~~t,e=void 0===e?i:~~e,t<0?(t+=i)<0&&(t=0):t>i&&(t=i),e<0?(e+=i)<0&&(e=0):e>i&&(e=i),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=u.prototype;else{var r=e-t;n=new u(r,void 0);for(var o=0;o<r;++o)n[o]=this[o+t]}return n},u.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||M(t,e,this.length);for(var i=this[t],r=1,o=0;++o<e&&(r*=256);)i+=this[t+o]*r;return i},u.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||M(t,e,this.length);for(var i=this[t+--e],r=1;e>0&&(r*=256);)i+=this[t+--e]*r;return i},u.prototype.readUInt8=function(t,e){return e||M(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||M(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||M(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||M(t,e,this.length);for(var i=this[t],r=1,o=0;++o<e&&(r*=256);)i+=this[t+o]*r;return i>=(r*=128)&&(i-=Math.pow(2,8*e)),i},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||M(t,e,this.length);for(var i=e,r=1,o=this[t+--i];i>0&&(r*=256);)o+=this[t+--i]*r;return o>=(r*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||M(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){e||M(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return e||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||M(t,4,this.length),r.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||M(t,4,this.length),r.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||M(t,8,this.length),r.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||M(t,8,this.length),r.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,i){(t=+t,e|=0,n|=0,i)||R(this,t,e,n,Math.pow(2,8*n)-1,0);var r=1,o=0;for(this[e]=255&t;++o<n&&(r*=256);)this[e+o]=t/r&255;return e+n},u.prototype.writeUIntBE=function(t,e,n,i){(t=+t,e|=0,n|=0,i)||R(this,t,e,n,Math.pow(2,8*n)-1,0);var r=n-1,o=1;for(this[e+r]=255&t;--r>=0&&(o*=256);)this[e+r]=t/o&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):F(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):F(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e|=0,!i){var r=Math.pow(2,8*n-1);R(this,t,e,n,r-1,-r)}var o=0,s=1,a=0;for(this[e]=255&t;++o<n&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},u.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e|=0,!i){var r=Math.pow(2,8*n-1);R(this,t,e,n,r-1,-r)}var o=n-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):F(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):F(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,n){return L(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return L(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return D(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return D(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,i){if(n||(n=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-n&&(i=t.length-e+n);var r,o=i-n;if(this===t&&n<e&&e<i)for(r=o-1;r>=0;--r)t[r+e]=this[r+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(r=0;r<o;++r)t[r+e]=this[r+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},u.prototype.fill=function(t,e,n,i){if("string"==typeof t){if("string"==typeof e?(i=e,e=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===t.length){var r=t.charCodeAt(0);r<256&&(t=r)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!u.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{var s=u.isBuffer(t)?t:B(new u(t,i).toString()),a=s.length;for(o=0;o<n-e;++o)this[o+e]=s[o%a]}return this};var q=/[^+\/0-9A-Za-z-_]/g;function I(t){return t<16?"0"+t.toString(16):t.toString(16)}function B(t,e){var n;e=e||1/0;for(var i=t.length,r=null,o=[],s=0;s<i;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!r){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(e-=3)>-1&&o.push(239,191,189);continue}r=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(e-=3)>-1&&o.push(239,191,189);if(r=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function U(t){return i.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(q,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,n,i){for(var r=0;r<i&&!(r+n>=e.length||r>=t.length);++r)e[r+n]=t[r];return r}}).call(this,n(21))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default={name:"pix2pixhd",displayName:"Pix2PixHD",datatype:"video"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.count_dataset=e.list_epochs=e.load_results=e.load_directories=void 0;var i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=(l(n(17)),l(n(14)),l(n(6))),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(43)),s=l(n(8)),a=l(n(5)),u=l(n(38));function l(t){return t&&t.__esModule?t:{default:t}}e.load_directories=function(t){return function(e){var n=u.default.name;a.default.allProgress([o.load(n),s.default.socket.list_directory({module:n,dir:"sequences"}),s.default.socket.list_directory({module:n,dir:"datasets"}),s.default.socket.list_directory({module:n,dir:"checkpoints"})],function(t,n,i){console.log("pix2pixhd load progress",n,i),e({type:r.default.app.load_progress,progress:{i:n,n:i},data:{module:"pix2pixhd"}})}).then(function(s){var a=i(s,4),u=a[0],l=a[1],c=a[2],h=a[3],p=u.folderLookup,f=u.fileLookup,d=u.datasetLookup,y=u.folders,m=u.files,_=(u.unsortedFolder,u.resultsFolder),v=l.filter(function(t){return t.dir});v.forEach(function(t){o.getDataset(n,d,t.name).isBuilt=!0}),c.filter(function(t){return t.dir}).forEach(function(t){o.getDataset(n,d,t.name).hasDataset=!0});var g=h.filter(function(t){return t.dir});g.forEach(function(t){var e=o.getDataset(n,d,t.name);e.hasCheckpoints=!0,e.checkpoints=[t]}),e({type:r.default.dataset.load,data:{module:n,folderLookup:p,fileLookup:f,datasetLookup:d,folders:y,files:m,sequences:v,datasets:c,checkpoints:g,resultsFolder:_}}),t&&(console.log("folder id",t),e({type:r.default.dataset.set_folder,data:{folder_id:t,module:n}}))}).catch(function(t){console.error(t)}),t&&(console.log("folder id",t),e({type:r.default.dataset.set_folder,data:{folder_id:t,module:n}}))}},e.load_results=function(t){return function(t){var e=u.default.name;a.default.allProgress([s.default.folder.index({name:"results"}),s.default.file.index({module:e,generated:1}),s.default.socket.list_sequences({module:e,dir:"results"}),s.default.socket.list_directory({module:e,dir:"renders"})],function(e,n,i){console.log("pix2pixhd load progress",n,i),t({type:r.default.app.load_progress,progress:{i:n,n:i},data:{module:"pix2pixhd"}})}).then(function(e){var n=i(e,4),o=n[0],s=n[1],a=n[2],u=n[3];console.log(s,a,u),t({type:r.default.pix2pixhd.load_results,results:{resultsFolder:o[0],files:s,results:a,renders:u}})})}};var c=new RegExp("_net_G.pth$");e.list_epochs=function(t){return function(e){var n=u.default.name;s.default.socket.list_directory({module:n,dir:"checkpoints/"+t}).then(function(t){var i=t.map(function(t){return t.name.match(c)?t.name.replace(c,""):null}).filter(function(t){return!!t});e({type:r.default.dataset.list_epochs,data:{epochs:i,module:n}})})}},e.count_dataset=function(t){return function(e){var n=u.default.name;a.default.allProgress([s.default.socket.count_directory({module:n,dir:"sequences/"+t+"/"}),s.default.socket.count_directory({module:n,dir:"datasets/"+t+"/train_A/"})],function(t,n,i){console.log("pix2pixhd load progress",n,i),e({type:r.default.app.load_progress,progress:{i:n,n:i},data:{module:"pix2pixhd"}})}).then(function(n){var o=i(n,2),s=o[0],a=o[1];console.log(s,a),e({type:r.default.pix2pixhd.load_dataset_count,data:{name:t,sequenceCount:s,datasetCount:a}})})}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(1),o=(n(2),n(3)),s=n(18);(i=s)&&i.__esModule;e.default=(0,o.connect)(function(t){return t.upload},function(t,e){return{}})(function(t){return(0,r.h)("div",{class:"status"},t.status)})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1);function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var s=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={value:null,changed:!1},n.handleInput=n.handleInput.bind(n),n.handleKeydown=n.handleKeydown.bind(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"handleInput",value:function(t){this.setState({value:t.target.value,changed:!0}),this.props.onInput&&this.props.onInput(t.target.value,t.target.name)}},{key:"handleKeydown",value:function(t){13===t.keyCode&&(this.setState({value:t.target.value,changed:!1}),this.props.onSave&&this.props.onSave(t.target.value,t.target.name))}},{key:"render",value:function(){var t;return(0,r.h)("div",{className:"textInput param"},(0,r.h)("label",null,(0,r.h)("span",null,this.props.title),(0,r.h)("input",(o(t={type:this.props.type||"text",name:this.props.name||"text",value:this.state.changed?this.state.value:this.props.value,onInput:this.handleInput,onKeydown:this.handleKeydown,autofocus:this.props.autofocus,autoComplete:this.props.autocomplete,autoCapitalize:this.props.autocapitalize||"off",placeholder:this.props.placeholder},"autofocus",this.props.autofocus),o(t,"className",this.props.className||""),t))))}}]),e}();e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),s=n(3),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(59)),u=h(n(24)),l=(h(n(31)),n(26),h(n(121))),c=h(n(41));function h(t){return t&&t.__esModule?t:{default:t}}var p=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"render",value:function(){var t=this.props,e=(t.loading,t.status,t.error,t.module,t.folder),n=(t.title,t.canRename),i=t.canUpload,o=t.canAddURL;return e.id?(0,r.h)("div",{className:"form params row"},(0,r.h)("div",{className:"col"},(0,r.h)(u.default,null,n&&this.renderFolderNameInput(e.name),i&&this.renderUploadInput(),o&&this.renderURLInput()))):(0,r.h)("div",{className:"params row"},(0,r.h)("div",{className:"column"},this.renderFolderNameInput(e.name)))}},{key:"curry",value:function(t){var e=this.props,n=e.module,i=e.folder;return function(e){return t(n,i,e)}}},{key:"renderFolderNameInput",value:function(t){return(0,r.h)(c.default,{title:"Dataset name",value:t,onSave:this.curry(this.props.actions.dataset.updateFolder)})}},{key:"renderUploadInput",value:function(){return(0,r.h)(l.default,{title:"Upload a file",mime:"image.*",onUpload:this.curry(this.props.actions.dataset.uploadFile)})}},{key:"renderURLInput",value:function(){return(0,r.h)(c.default,{title:"Fetch a URL",placeholder:"http://",onSave:this.curry(this.props.actions.dataset.fetchURL)})}}]),e}();e.default=(0,s.connect)(function(t){return t.upload},function(t,e){return{actions:{dataset:(0,o.bindActionCreators)(a,t)}}})(p)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.load=e.getDataset=e.emptyDataset=e.unsortedFolder=void 0;var i,r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=n(8),s=(i=o)&&i.__esModule?i:{default:i};var a={},u=e.unsortedFolder=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!a[t]||e){var n={id:0,module:t,name:"unsorted",files:[],datasets:[]};a[t]=n}return a[t]},l=e.emptyDataset=function(t,e,n,i){var r={name:n,input:[],checkpoints:[],output:[]};return e[n]=r,(i=i||u(t)).datasets.push(n),r},c=e.getDataset=function(t,e,n,i,r){var o=e[n=n.toLowerCase()]||l(t,e,n,i);return r&&(o.date=o.date&&!isNaN(o.date)?Math.max(+new Date(r),o.date):+new Date(r)),o};e.load=function(t){return console.log(t),Promise.all([s.default.folder.index({module:t,limit:0}),s.default.file.index({module:t,limit:0}),s.default.task.index({module:t})]).then(function(e){var n=r(e,3),i=n[0],o=n[1],a=(n[2],{}),l={},h={},p=void 0;l=i.reduce(function(t,e){return t[e.id]={id:e.id,name:e.name,folder:e,files:[],datasets:[]},"results"===e.name&&(p=e),t},{unsorted:u(t,!0)}),p?console.log("got results folder",p):(console.log("creating results folder..."),s.default.folder.create({module:t,name:"results",activity:"results"}).then(function(t){console.log("created folder",t),l.results=t}));var f=o.filter(function(t){return t.generated});return o.filter(function(t){return!t.generated}).reduce(function(e,n){h[n.id]=n,n.name||(n.opt&&n.opt.media&&n.opt.media.token?n.name=n.opt.media.token:n.name=n.url.replace(/^https?:\/\/(www.)?/,"").replace(/[^a-zA-Z0-9_]/g,"_").replace(/_+/g,"_")||"unknown_"+Math.floor(1e3*Math.random()));var i=(n.name||"unsorted").split(".")[0],r=l[n.folder_id]||u(t),o=c(t,e,n.dataset||i,r,n.date||n.created_at);return n.url.match(n.name)&&(n.persisted=!0),o.input.push(n.id),r.files.push(n.id),e},a),f.map(function(e){h[e.id]=e;var n=e.name.split(".")[0].split("-"),i=l[e.folder_id]||u(t);c(t,a,e.dataset||n[0],i,e.date||e.created_at).output.push(e.id),i.files.push(e.id),e.epoch=e.epoch||n[1]}),{folderLookup:l,fileLookup:h,datasetLookup:a,folders:i,files:o,unsortedFolder:l.unsorted,resultsFolder:p}}).catch(function(t){console.error(t)})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stop_queue=e.start_queue=e.add_task=e.stop_task=e.start_task=void 0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=a(n(14)),o=a(n(6)),s=a(n(8));function a(t){return t&&t.__esModule?t:{default:t}}e.start_task=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.task.start_task(t,e),i({type:o.default.task.starting_task,task:t},e)},e.stop_task=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.task.stop_task(t,e),i({type:o.default.task.stopping_task,task:t},e)},e.add_task=function(t){return function(e){s.default.task.create(t).then(function(t){r.default.task.add_task(t)})}},e.start_queue=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.task.start_queue(t,e),i({type:o.default.task.starting_queue,task:t},e)},e.stop_queue=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.task.stop_queue(t,e),i({type:o.default.task.stopping_queue,task:t},e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(3);n(2),function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);e.default=t}(n(20));var s=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.handleClick=n.handleClick.bind(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"handleClick",value:function(t){this.props.onClick&&this.props.onClick()}},{key:"render",value:function(){return(0,r.h)("div",{className:"button param"},(0,r.h)("label",null,(0,r.h)("span",null,this.props.title),(0,r.h)("button",{onClick:this.handleClick},this.props.value||this.props.children)))}}]),e}();e.default=(0,o.connect)(function(t){return{}},function(t,e){return{}})(s)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enqueue=e.resume=e.pause=e.play=void 0;var i,r=n(6),o=(i=r)&&i.__esModule?i:{default:i};e.play=function(t){return{type:o.default.audioPlayer.play,file:t}},e.pause=function(){return{type:o.default.audioPlayer.pause}},e.resume=function(){return{type:o.default.audioPlayer.resume}},e.enqueue=function(t){return{type:o.default.audioPlayer.enqueue,file:t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.clearCurrentUser=e.setCurrentUser=e.setError=e.setReturnTo=e.setToken=void 0,e.initialized=c,e.loading=h,e.InvalidCredentialsException=function(t){this.message=t,this.name="InvalidCredentialsException"},e.login=function(t,e){return function(n){n(h()),fetch(p.login,(0,s.put)({username:t,password:e})).then(function(t){return t.json()}).then(function(t){console.log(t),console.log("logged in",t.user.username),n(u(t.user))}).catch(function(t){console.error("login error",t),n(a(!0))})}},e.signup=function(t){return function(e){e(h()),fetch(p.signup,(0,s.put)(t)).then(function(t){return t.json()}).then(function(t){console.log(t),console.log("signed up",t.user.username),e(u(t.user))}).catch(function(t){console.error("signup error",t),e(c())})}},e.checkin=function(){return function(t){t(h()),fetch(p.checkin,(0,s.put)({})).then(function(t){return t.json()}).then(function(e){console.log("checked in",e.user.username),t(u(e.user))}).catch(function(e){console.error("checkin error",e),t(c())})}},e.logout=function(){return function(t){t(h()),fetch(p.logout,(0,s._get_headers)({})).then(function(t){return t.json()}).then(function(e){console.log("logged out",e),t(l()),t(c())}).catch(function(e){console.error("logout error",e),t(l()),t(c())})}};var i,r=n(6),o=(i=r)&&i.__esModule?i:{default:i},s=n(125);e.setToken=function(t){return{type:o.default.auth.set_token,data:t}},e.setReturnTo=function(t){return{type:o.default.auth.set_return_to,data:t}};var a=e.setError=function(t){return{type:o.default.auth.set_error,data:t}},u=e.setCurrentUser=function(t){return{type:o.default.auth.set_current_user,data:t}},l=e.clearCurrentUser=function(){return{type:o.default.auth.logout_user}};function c(){return{type:o.default.auth.initialized}}function h(){return{type:o.default.auth.loading}}var p={login:"/api/login",logout:"/api/logout",signup:"/api/signup",checkin:"/api/checkin"}},function(t,e,n){var i;void 0===(i=function(){return function(){"use strict";var t,e;function n(e){e(t)}
+function bindActionCreators(actionCreators, dispatch) {
+  if (typeof actionCreators === 'function') {
+    return bindActionCreator(actionCreators, dispatch);
+  }
+
+  if ((typeof actionCreators === 'undefined' ? 'undefined' : _typeof(actionCreators)) !== 'object' || actionCreators === null) {
+    throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators === 'undefined' ? 'undefined' : _typeof(actionCreators)) + '. ' + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');
+  }
+
+  var keys = Object.keys(actionCreators);
+  var boundActionCreators = {};
+  for (var i = 0; i < keys.length; i++) {
+    var key = keys[i];
+    var actionCreator = actionCreators[key];
+    if (typeof actionCreator === 'function') {
+      boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
+    }
+  }
+  return boundActionCreators;
+}
+
 /**
+ * Composes single-argument functions from right to left. The rightmost
+ * function can take multiple arguments as it provides the signature for
+ * the resulting composite function.
+ *
+ * @param {...Function} funcs The functions to compose.
+ * @returns {Function} A function obtained by composing the argument functions
+ * from right to left. For example, compose(f, g, h) is identical to doing
+ * (...args) => f(g(h(...args))).
+ */
+
+function compose() {
+  for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {
+    funcs[_key] = arguments[_key];
+  }
+
+  if (funcs.length === 0) {
+    return function (arg) {
+      return arg;
+    };
+  }
+
+  if (funcs.length === 1) {
+    return funcs[0];
+  }
+
+  return funcs.reduce(function (a, b) {
+    return function () {
+      return a(b.apply(undefined, arguments));
+    };
+  });
+}
+
+/**
+ * Creates a store enhancer that applies middleware to the dispatch method
+ * of the Redux store. This is handy for a variety of tasks, such as expressing
+ * asynchronous actions in a concise manner, or logging every action payload.
+ *
+ * See `redux-thunk` package as an example of the Redux middleware.
+ *
+ * Because middleware is potentially asynchronous, this should be the first
+ * store enhancer in the composition chain.
+ *
+ * Note that each middleware will be given the `dispatch` and `getState` functions
+ * as named arguments.
+ *
+ * @param {...Function} middlewares The middleware chain to be applied.
+ * @returns {Function} A store enhancer applying the middleware.
+ */
+function applyMiddleware() {
+  for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {
+    middlewares[_key] = arguments[_key];
+  }
+
+  return function (createStore) {
+    return function () {
+      for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
+        args[_key2] = arguments[_key2];
+      }
+
+      var store = createStore.apply(undefined, args);
+      var _dispatch = function dispatch() {
+        throw new Error('Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');
+      };
+
+      var middlewareAPI = {
+        getState: store.getState,
+        dispatch: function dispatch() {
+          return _dispatch.apply(undefined, arguments);
+        }
+      };
+      var chain = middlewares.map(function (middleware) {
+        return middleware(middlewareAPI);
+      });
+      _dispatch = compose.apply(undefined, chain)(store.dispatch);
+
+      return _extends({}, store, {
+        dispatch: _dispatch
+      });
+    };
+  };
+}
+
+/*
+ * This is a dummy function to check if the function name has been altered by minification.
+ * If the function has been minified and NODE_ENV !== 'production', warn the user.
+ */
+function isCrushed() {}
+
+if ("development" !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {
+  warning("You are currently using minified code outside of NODE_ENV === 'production'. " + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.');
+}
+
+
+
+
+/***/ }),
+
+/***/ "./node_modules/redux/node_modules/symbol-observable/es/index.js":
+/*!***********************************************************************!*\
+  !*** ./node_modules/redux/node_modules/symbol-observable/es/index.js ***!
+  \***********************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* WEBPACK VAR INJECTION */(function(global, module) {/* harmony import */ var _ponyfill_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ponyfill.js */ "./node_modules/redux/node_modules/symbol-observable/es/ponyfill.js");
+/* global window */
+
+
+var root;
+
+if (typeof self !== 'undefined') {
+  root = self;
+} else if (typeof window !== 'undefined') {
+  root = window;
+} else if (typeof global !== 'undefined') {
+  root = global;
+} else if (true) {
+  root = module;
+} else {}
+
+var result = Object(_ponyfill_js__WEBPACK_IMPORTED_MODULE_0__["default"])(root);
+/* harmony default export */ __webpack_exports__["default"] = (result);
+
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../../../../webpack/buildin/harmony-module.js */ "./node_modules/webpack/buildin/harmony-module.js")(module)))
+
+/***/ }),
+
+/***/ "./node_modules/redux/node_modules/symbol-observable/es/ponyfill.js":
+/*!**************************************************************************!*\
+  !*** ./node_modules/redux/node_modules/symbol-observable/es/ponyfill.js ***!
+  \**************************************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return symbolObservablePonyfill; });
+function symbolObservablePonyfill(root) {
+	var result;
+	var Symbol = root.Symbol;
+
+	if (typeof Symbol === 'function') {
+		if (Symbol.observable) {
+			result = Symbol.observable;
+		} else {
+			result = Symbol('observable');
+			Symbol.observable = result;
+		}
+	} else {
+		result = '@@observable';
+	}
+
+	return result;
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/resolve-pathname/index.js":
+/*!************************************************!*\
+  !*** ./node_modules/resolve-pathname/index.js ***!
+  \************************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+function isAbsolute(pathname) {
+  return pathname.charAt(0) === '/';
+}
+
+// About 1.5x faster than the two-arg version of Array#splice()
+function spliceOne(list, index) {
+  for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {
+    list[i] = list[k];
+  }
+
+  list.pop();
+}
+
+// This implementation is based heavily on node's url.parse
+function resolvePathname(to) {
+  var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
+
+  var toParts = to && to.split('/') || [];
+  var fromParts = from && from.split('/') || [];
+
+  var isToAbs = to && isAbsolute(to);
+  var isFromAbs = from && isAbsolute(from);
+  var mustEndAbs = isToAbs || isFromAbs;
+
+  if (to && isAbsolute(to)) {
+    // to is absolute
+    fromParts = toParts;
+  } else if (toParts.length) {
+    // to is relative, drop the filename
+    fromParts.pop();
+    fromParts = fromParts.concat(toParts);
+  }
+
+  if (!fromParts.length) return '/';
+
+  var hasTrailingSlash = void 0;
+  if (fromParts.length) {
+    var last = fromParts[fromParts.length - 1];
+    hasTrailingSlash = last === '.' || last === '..' || last === '';
+  } else {
+    hasTrailingSlash = false;
+  }
+
+  var up = 0;
+  for (var i = fromParts.length; i >= 0; i--) {
+    var part = fromParts[i];
+
+    if (part === '.') {
+      spliceOne(fromParts, i);
+    } else if (part === '..') {
+      spliceOne(fromParts, i);
+      up++;
+    } else if (up) {
+      spliceOne(fromParts, i);
+      up--;
+    }
+  }
+
+  if (!mustEndAbs) for (; up--; up) {
+    fromParts.unshift('..');
+  }if (mustEndAbs && fromParts[0] !== '' && (!fromParts[0] || !isAbsolute(fromParts[0]))) fromParts.unshift('');
+
+  var result = fromParts.join('/');
+
+  if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';
+
+  return result;
+}
+
+/* harmony default export */ __webpack_exports__["default"] = (resolvePathname);
+
+/***/ }),
+
+/***/ "./node_modules/signal-windows/index.js":
+/*!**********************************************!*\
+  !*** ./node_modules/signal-windows/index.js ***!
+  \**********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = {
+  framer: __webpack_require__(/*! ./src/framer.js */ "./node_modules/signal-windows/src/framer.js"),
+  windows: __webpack_require__(/*! ./src/windows.js */ "./node_modules/signal-windows/src/windows.js")
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/signal-windows/src/framer.js":
+/*!***************************************************!*\
+  !*** ./node_modules/signal-windows/src/framer.js ***!
+  \***************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+/*===========================================================================*\
+ * Framer for breaking a U-Law ByteBuffer or Array into windows of a particular
+ * size at an arbitrary step.
+ *
+ * (c) Vail Systems. Joshua Jung and Ben Bryan. 2015
+\*===========================================================================*/
+var Framer = function (options) {
+  options = options || {};
+
+  this.frameIx = 0;
+  this.frameSize = options.frameSize || 64;
+  this.frameStep = options.frameStep|| this.frameSize;
+  this.map = options.map || undefined;
+  this.scale = options.scale || undefined;
+  this.offset = options.offset ? options.offset : 0;
+  this.sampleType = options.sampleType || 'UInt8';
+  this.wordSize = options.wordSize || 1;
+};
+
+Framer.prototype = {
+  /**
+   * Frames a buffer of single-byte char values or an array of Numbers into windows of the specified size.
+   */
+  frame: function(bufferOrArray, callback) {
+    var self = this,
+        ix = this.offset,
+        frame = [],
+        isArray = Object.prototype.toString.call( bufferOrArray) === '[object Array]';
+
+    self.frameIx = 0;
+
+    while (ix < bufferOrArray.length) {
+      var value = isArray ? bufferOrArray[ix] : bufferOrArray['read' + self.sampleType](ix); 
+
+      frame.push(this.map ? this.map[value] : value);
+
+      if (frame.length == this.frameSize || ix+self.wordSize == bufferOrArray.length) finishFrame(frame);
+
+      ix += self.wordSize;
+    }
+
+    // Did we not process any frames at all for some reason?
+    if (this.frameIx == 0) callback(undefined);
+
+    function finishFrame(frame) {
+      if (this.scale) frame = frame.map(function (s, ix) {return s * self.scale[ix];});
+
+      callback(frame, self.frameIx);
+
+      if (ix != bufferOrArray.length - self.wordSize)
+      {
+          ix -= (self.frameSize - self.frameStep) * self.wordSize;
+
+          self.frameIx++;
+          frame.length = 0;
+      }
+    }
+  }
+};
+
+module.exports = Framer;
+
+
+/***/ }),
+
+/***/ "./node_modules/signal-windows/src/windows.js":
+/*!****************************************************!*\
+  !*** ./node_modules/signal-windows/src/windows.js ***!
+  \****************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+/*===========================================================================*\
+ * Method for producing the coefficients for windowing functions of an
+ * arbitrary length.
+ *
+ * (c) Vail Systems. Joshua Jung and Ben Bryan. 2015
+\*===========================================================================*/
+module.exports = {
+    construct: function (type, sampleCount, alpha)  {
+       var coef = [];
+       switch (type)
+       {
+           case 'ham': 
+               for (var i = 0; i < sampleCount; i++) {
+                   coef[i] = 0.54 - 0.46 * Math.cos((2 * Math.PI * i)/(sampleCount - 1));
+               }
+           break;
+           case 'tukey':
+               var sm1 = sampleCount - 1,
+                   asm1 = alpha * sm1;
+               for (var i = 0; i < sampleCount; i++) {
+                   // Left tail
+                   if (i < asm1 / 2)
+                      coef[i] = 0.5 * (1 + Math.cos(Math.PI * ((2 * sampleCount)/(asm1) - 1))); 
+                   // Right tail
+                   else if (i > (sm1 * (1 - alpha / 2)))
+                      coef[i] = 0.5 * (1 + Math.cos(Math.PI * ((2 * sampleCount)/(asm1) - (2 / alpha) + 1)));
+                   // Middle (rectangular)
+                   else coef[i] = 1;
+               }
+           break;
+           case 'rectangular':
+               for (var i = 0; i < sampleCount; i++)
+                   coef[i] = 1.0;
+           break;
+       }
+       return coef;
+    }
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/sprintf-js/src/sprintf.js":
+/*!************************************************!*\
+  !*** ./node_modules/sprintf-js/src/sprintf.js ***!
+  \************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+var __WEBPACK_AMD_DEFINE_RESULT__;/* global window, exports, define */
+
+!function() {
+    'use strict'
+
+    var re = {
+        not_string: /[^s]/,
+        not_bool: /[^t]/,
+        not_type: /[^T]/,
+        not_primitive: /[^v]/,
+        number: /[diefg]/,
+        numeric_arg: /[bcdiefguxX]/,
+        json: /[j]/,
+        not_json: /[^j]/,
+        text: /^[^\x25]+/,
+        modulo: /^\x25{2}/,
+        placeholder: /^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,
+        key: /^([a-z_][a-z_\d]*)/i,
+        key_access: /^\.([a-z_][a-z_\d]*)/i,
+        index_access: /^\[(\d+)\]/,
+        sign: /^[\+\-]/
+    }
+
+    function sprintf(key) {
+        // `arguments` is not an array, but should be fine for this call
+        return sprintf_format(sprintf_parse(key), arguments)
+    }
+
+    function vsprintf(fmt, argv) {
+        return sprintf.apply(null, [fmt].concat(argv || []))
+    }
+
+    function sprintf_format(parse_tree, argv) {
+        var cursor = 1, tree_length = parse_tree.length, arg, output = '', i, k, match, pad, pad_character, pad_length, is_positive, sign
+        for (i = 0; i < tree_length; i++) {
+            if (typeof parse_tree[i] === 'string') {
+                output += parse_tree[i]
+            }
+            else if (Array.isArray(parse_tree[i])) {
+                match = parse_tree[i] // convenience purposes only
+                if (match[2]) { // keyword argument
+                    arg = argv[cursor]
+                    for (k = 0; k < match[2].length; k++) {
+                        if (!arg.hasOwnProperty(match[2][k])) {
+                            throw new Error(sprintf('[sprintf] property "%s" does not exist', match[2][k]))
+                        }
+                        arg = arg[match[2][k]]
+                    }
+                }
+                else if (match[1]) { // positional argument (explicit)
+                    arg = argv[match[1]]
+                }
+                else { // positional argument (implicit)
+                    arg = argv[cursor++]
+                }
+
+                if (re.not_type.test(match[8]) && re.not_primitive.test(match[8]) && arg instanceof Function) {
+                    arg = arg()
+                }
+
+                if (re.numeric_arg.test(match[8]) && (typeof arg !== 'number' && isNaN(arg))) {
+                    throw new TypeError(sprintf('[sprintf] expecting number but found %T', arg))
+                }
+
+                if (re.number.test(match[8])) {
+                    is_positive = arg >= 0
+                }
+
+                switch (match[8]) {
+                    case 'b':
+                        arg = parseInt(arg, 10).toString(2)
+                        break
+                    case 'c':
+                        arg = String.fromCharCode(parseInt(arg, 10))
+                        break
+                    case 'd':
+                    case 'i':
+                        arg = parseInt(arg, 10)
+                        break
+                    case 'j':
+                        arg = JSON.stringify(arg, null, match[6] ? parseInt(match[6]) : 0)
+                        break
+                    case 'e':
+                        arg = match[7] ? parseFloat(arg).toExponential(match[7]) : parseFloat(arg).toExponential()
+                        break
+                    case 'f':
+                        arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg)
+                        break
+                    case 'g':
+                        arg = match[7] ? String(Number(arg.toPrecision(match[7]))) : parseFloat(arg)
+                        break
+                    case 'o':
+                        arg = (parseInt(arg, 10) >>> 0).toString(8)
+                        break
+                    case 's':
+                        arg = String(arg)
+                        arg = (match[7] ? arg.substring(0, match[7]) : arg)
+                        break
+                    case 't':
+                        arg = String(!!arg)
+                        arg = (match[7] ? arg.substring(0, match[7]) : arg)
+                        break
+                    case 'T':
+                        arg = Object.prototype.toString.call(arg).slice(8, -1).toLowerCase()
+                        arg = (match[7] ? arg.substring(0, match[7]) : arg)
+                        break
+                    case 'u':
+                        arg = parseInt(arg, 10) >>> 0
+                        break
+                    case 'v':
+                        arg = arg.valueOf()
+                        arg = (match[7] ? arg.substring(0, match[7]) : arg)
+                        break
+                    case 'x':
+                        arg = (parseInt(arg, 10) >>> 0).toString(16)
+                        break
+                    case 'X':
+                        arg = (parseInt(arg, 10) >>> 0).toString(16).toUpperCase()
+                        break
+                }
+                if (re.json.test(match[8])) {
+                    output += arg
+                }
+                else {
+                    if (re.number.test(match[8]) && (!is_positive || match[3])) {
+                        sign = is_positive ? '+' : '-'
+                        arg = arg.toString().replace(re.sign, '')
+                    }
+                    else {
+                        sign = ''
+                    }
+                    pad_character = match[4] ? match[4] === '0' ? '0' : match[4].charAt(1) : ' '
+                    pad_length = match[6] - (sign + arg).length
+                    pad = match[6] ? (pad_length > 0 ? pad_character.repeat(pad_length) : '') : ''
+                    output += match[5] ? sign + arg + pad : (pad_character === '0' ? sign + pad + arg : pad + sign + arg)
+                }
+            }
+        }
+        return output
+    }
+
+    var sprintf_cache = Object.create(null)
+
+    function sprintf_parse(fmt) {
+        if (sprintf_cache[fmt]) {
+            return sprintf_cache[fmt]
+        }
+
+        var _fmt = fmt, match, parse_tree = [], arg_names = 0
+        while (_fmt) {
+            if ((match = re.text.exec(_fmt)) !== null) {
+                parse_tree.push(match[0])
+            }
+            else if ((match = re.modulo.exec(_fmt)) !== null) {
+                parse_tree.push('%')
+            }
+            else if ((match = re.placeholder.exec(_fmt)) !== null) {
+                if (match[2]) {
+                    arg_names |= 1
+                    var field_list = [], replacement_field = match[2], field_match = []
+                    if ((field_match = re.key.exec(replacement_field)) !== null) {
+                        field_list.push(field_match[1])
+                        while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {
+                            if ((field_match = re.key_access.exec(replacement_field)) !== null) {
+                                field_list.push(field_match[1])
+                            }
+                            else if ((field_match = re.index_access.exec(replacement_field)) !== null) {
+                                field_list.push(field_match[1])
+                            }
+                            else {
+                                throw new SyntaxError('[sprintf] failed to parse named argument key')
+                            }
+                        }
+                    }
+                    else {
+                        throw new SyntaxError('[sprintf] failed to parse named argument key')
+                    }
+                    match[2] = field_list
+                }
+                else {
+                    arg_names |= 2
+                }
+                if (arg_names === 3) {
+                    throw new Error('[sprintf] mixing positional and named placeholders is not (yet) supported')
+                }
+                parse_tree.push(match)
+            }
+            else {
+                throw new SyntaxError('[sprintf] unexpected placeholder')
+            }
+            _fmt = _fmt.substring(match[0].length)
+        }
+        return sprintf_cache[fmt] = parse_tree
+    }
+
+    /**
+     * export to either browser or node.js
+     */
+    /* eslint-disable quote-props */
+    if (true) {
+        exports['sprintf'] = sprintf
+        exports['vsprintf'] = vsprintf
+    }
+    if (typeof window !== 'undefined') {
+        window['sprintf'] = sprintf
+        window['vsprintf'] = vsprintf
+
+        if (true) {
+            !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
+                return {
+                    'sprintf': sprintf,
+                    'vsprintf': vsprintf
+                }
+            }).call(exports, __webpack_require__, exports, module),
+				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))
+        }
+    }
+    /* eslint-enable quote-props */
+}()
+
+
+/***/ }),
+
+/***/ "./node_modules/tone/build/Tone.js":
+/*!*****************************************!*\
+  !*** ./node_modules/tone/build/Tone.js ***!
+  \*****************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+var __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory){
+
+	//UMD
+	if ( true ) {
+		!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
+			return factory();
+		}).call(exports, __webpack_require__, exports, module),
+				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+	} else {}
+
+}(this, function(){
+
+	"use strict";
+	
+	var Tone;
+	//constructs the main Tone object
+	function Main(func){
+		Tone = func();
+	}
+	//invokes each of the modules with the main Tone object as the argument
+	function Module(func){
+		func(Tone);
+	}	/**
 	 *  Tone.js
 	 *  @author Yotam Mann
 	 *  @license http://opensource.org/licenses/MIT MIT License
 	 *  @copyright 2014-2018 Yotam Mann
-	 */return e=function(){var t=function(){if(!(this instanceof t))throw new Error("constructor needs to be called with the 'new' keyword")};t.prototype.toString=function(){for(var e in t){var n=e[0].match(/^[A-Z]$/),i=t[e]===this.constructor;if(t.isFunction(t[e])&&n&&i)return e}return"Tone"},t.prototype.dispose=function(){return this},t.prototype.set=function(e,n,i){if(t.isObject(e))i=n;else if(t.isString(e)){var r={};r[e]=n,e=r}t:for(var o in e){n=e[o];var s=this;if(-1!==o.indexOf(".")){for(var a=o.split("."),u=0;u<a.length-1;u++)if((s=s[a[u]])instanceof t){a.splice(0,u+1);var l=a.join(".");s.set(l,n);continue t}o=a[a.length-1]}var c=s[o];t.isUndef(c)||(t.Signal&&c instanceof t.Signal||t.Param&&c instanceof t.Param?c.value!==n&&(t.isUndef(i)?c.value=n:c.rampTo(n,i)):c instanceof AudioParam?c.value!==n&&(c.value=n):t.TimeBase&&c instanceof t.TimeBase?s[o]=n:c instanceof t?c.set(n):c!==n&&(s[o]=n))}return this},t.prototype.get=function(e){t.isUndef(e)?e=this._collectDefaults(this.constructor):t.isString(e)&&(e=[e]);for(var n={},i=0;i<e.length;i++){var r=e[i],o=this,s=n;if(-1!==r.indexOf(".")){for(var a=r.split("."),u=0;u<a.length-1;u++){var l=a[u];s[l]=s[l]||{},s=s[l],o=o[l]}r=a[a.length-1]}var c=o[r];t.isObject(e[r])?s[r]=c.get():t.Signal&&c instanceof t.Signal?s[r]=c.value:t.Param&&c instanceof t.Param?s[r]=c.value:c instanceof AudioParam?s[r]=c.value:c instanceof t?s[r]=c.get():!t.isFunction(c)&&t.isDefined(c)&&(s[r]=c)}return n},t.prototype._collectDefaults=function(e){var n=[];if(t.isDefined(e.defaults)&&(n=Object.keys(e.defaults)),t.isDefined(e._super))for(var i=this._collectDefaults(e._super),r=0;r<i.length;r++)-1===n.indexOf(i[r])&&n.push(i[r]);return n},t.defaults=function(e,n,i){var r={};if(1===e.length&&t.isObject(e[0]))r=e[0];else for(var o=0;o<n.length;o++)r[n[o]]=e[o];return t.isDefined(i.defaults)?t.defaultArg(r,i.defaults):t.isObject(i)?t.defaultArg(r,i):r},t.defaultArg=function(e,n){if(t.isObject(e)&&t.isObject(n)){var i={};for(var r in e)i[r]=t.defaultArg(n[r],e[r]);for(var o in n)i[o]=t.defaultArg(e[o],n[o]);return i}return t.isUndef(e)?n:e},t.connectSeries=function(){for(var e=arguments[0],n=1;n<arguments.length;n++){var i=arguments[n];e.connect(i),e=i}return t},t.isUndef=function(t){return void 0===t},t.isDefined=function(e){return!t.isUndef(e)},t.isFunction=function(t){return"function"==typeof t},t.isNumber=function(t){return"number"==typeof t},t.isObject=function(t){return"[object Object]"===Object.prototype.toString.call(t)&&t.constructor===Object},t.isBoolean=function(t){return"boolean"==typeof t},t.isArray=function(t){return Array.isArray(t)},t.isString=function(t){return"string"==typeof t},t.isNote=function(e){return t.isString(e)&&/^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i.test(e)},t.noOp=function(){},t.prototype._readOnly=function(t){if(Array.isArray(t))for(var e=0;e<t.length;e++)this._readOnly(t[e]);else Object.defineProperty(this,t,{writable:!1,enumerable:!0})},t.prototype._writable=function(t){if(Array.isArray(t))for(var e=0;e<t.length;e++)this._writable(t[e]);else Object.defineProperty(this,t,{writable:!0})},t.State={Started:"started",Stopped:"stopped",Paused:"paused"},t.equalPowerScale=function(t){var e=.5*Math.PI;return Math.sin(t*e)},t.dbToGain=function(t){return Math.pow(10,t/20)},t.gainToDb=function(t){return Math.log(t)/Math.LN10*20},t.intervalToFrequencyRatio=function(t){return Math.pow(2,t/12)},t.prototype.now=function(){return t.context.now()},t.now=function(){return t.context.now()},t.extend=function(e,n){function i(){}t.isUndef(n)&&(n=t),i.prototype=n.prototype,e.prototype=new i,e.prototype.constructor=e,e._super=n};var e=null;return Object.defineProperty(t,"context",{get:function(){return e},set:function(n){e=t.Context&&n instanceof t.Context?n:new t.Context(n),t.Context.emit("init",e)}}),Object.defineProperty(t.prototype,"context",{get:function(){return t.context}}),t.setContext=function(e){t.context=e},Object.defineProperty(t.prototype,"blockTime",{get:function(){return 128/this.context.sampleRate}}),Object.defineProperty(t.prototype,"sampleTime",{get:function(){return 1/this.context.sampleRate}}),Object.defineProperty(t,"supported",{get:function(){var t=window.hasOwnProperty("AudioContext")||window.hasOwnProperty("webkitAudioContext"),e=window.hasOwnProperty("Promise"),n=window.hasOwnProperty("Worker");return t&&e&&n}}),Object.defineProperty(t,"initialized",{get:function(){return null!==e}}),t.getContext=function(e){if(t.initialized)e(t.context);else{var n=function(){e(t.context),t.Context.off("init",n)};t.Context.on("init",n)}return t},t.version="r12",t},t=e(),n(function(t){return t.Emitter=function(){t.call(this),this._events={}},t.extend(t.Emitter),t.Emitter.prototype.on=function(t,e){for(var n=t.split(/\W+/),i=0;i<n.length;i++){var r=n[i];this._events.hasOwnProperty(r)||(this._events[r]=[]),this._events[r].push(e)}return this},t.Emitter.prototype.once=function(t,e){var n=function(){e.apply(this,arguments),this.off(t,n)}.bind(this);return this.on(t,n),this},t.Emitter.prototype.off=function(e,n){for(var i=e.split(/\W+/),r=0;r<i.length;r++)if(e=i[r],this._events.hasOwnProperty(e))if(t.isUndef(n))this._events[e]=[];else for(var o=this._events[e],s=0;s<o.length;s++)o[s]===n&&o.splice(s,1);return this},t.Emitter.prototype.emit=function(t){if(this._events){var e=Array.apply(null,arguments).slice(1);if(this._events.hasOwnProperty(t))for(var n=this._events[t].slice(0),i=0,r=n.length;i<r;i++)n[i].apply(this,e)}return this},t.Emitter.mixin=function(e){var n=["on","once","off","emit"];e._events={};for(var i=0;i<n.length;i++){var r=n[i],o=t.Emitter.prototype[r];e[r]=o}return t.Emitter},t.Emitter.prototype.dispose=function(){return t.prototype.dispose.call(this),this._events=null,this},t.Emitter}),n(function(t){return t.Timeline=function(){var e=t.defaults(arguments,["memory"],t.Timeline);t.call(this),this._timeline=[],this.memory=e.memory},t.extend(t.Timeline),t.Timeline.defaults={memory:1/0},Object.defineProperty(t.Timeline.prototype,"length",{get:function(){return this._timeline.length}}),t.Timeline.prototype.add=function(e){if(t.isUndef(e.time))throw new Error("Tone.Timeline: events must have a time attribute");e.time=e.time.valueOf();var n=this._search(e.time);if(this._timeline.splice(n+1,0,e),this.length>this.memory){var i=this.length-this.memory;this._timeline.splice(0,i)}return this},t.Timeline.prototype.remove=function(t){var e=this._timeline.indexOf(t);return-1!==e&&this._timeline.splice(e,1),this},t.Timeline.prototype.get=function(e,n){n=t.defaultArg(n,"time");var i=this._search(e,n);return-1!==i?this._timeline[i]:null},t.Timeline.prototype.peek=function(){return this._timeline[0]},t.Timeline.prototype.shift=function(){return this._timeline.shift()},t.Timeline.prototype.getAfter=function(e,n){n=t.defaultArg(n,"time");var i=this._search(e,n);return i+1<this._timeline.length?this._timeline[i+1]:null},t.Timeline.prototype.getBefore=function(e,n){n=t.defaultArg(n,"time");var i=this._timeline.length;if(i>0&&this._timeline[i-1][n]<e)return this._timeline[i-1];var r=this._search(e,n);return r-1>=0?this._timeline[r-1]:null},t.Timeline.prototype.cancel=function(t){if(this._timeline.length>1){var e=this._search(t);if(e>=0)if(this._timeline[e].time===t){for(var n=e;n>=0&&this._timeline[n].time===t;n--)e=n;this._timeline=this._timeline.slice(0,e)}else this._timeline=this._timeline.slice(0,e+1);else this._timeline=[]}else 1===this._timeline.length&&this._timeline[0].time>=t&&(this._timeline=[]);return this},t.Timeline.prototype.cancelBefore=function(t){var e=this._search(t);return e>=0&&(this._timeline=this._timeline.slice(e+1)),this},t.Timeline.prototype.previousEvent=function(t){var e=this._timeline.indexOf(t);return e>0?this._timeline[e-1]:null},t.Timeline.prototype._search=function(e,n){if(0===this._timeline.length)return-1;n=t.defaultArg(n,"time");var i=0,r=this._timeline.length,o=r;if(r>0&&this._timeline[r-1][n]<=e)return r-1;for(;i<o;){var s=Math.floor(i+(o-i)/2),a=this._timeline[s],u=this._timeline[s+1];if(a[n]===e){for(var l=s;l<this._timeline.length;l++)this._timeline[l][n]===e&&(s=l);return s}if(a[n]<e&&u[n]>e)return s;a[n]>e?o=s:i=s+1}return-1},t.Timeline.prototype._iterate=function(e,n,i){n=t.defaultArg(n,0),i=t.defaultArg(i,this._timeline.length-1),this._timeline.slice(n,i+1).forEach(function(t){e.call(this,t)}.bind(this))},t.Timeline.prototype.forEach=function(t){return this._iterate(t),this},t.Timeline.prototype.forEachBefore=function(t,e){var n=this._search(t);return-1!==n&&this._iterate(e,0,n),this},t.Timeline.prototype.forEachAfter=function(t,e){var n=this._search(t);return this._iterate(e,n+1),this},t.Timeline.prototype.forEachBetween=function(t,e,n){var i=this._search(t),r=this._search(e);return-1!==i&&-1!==r?(this._timeline[i].time!==t&&(i+=1),this._timeline[r].time===e&&(r-=1),this._iterate(n,i,r)):-1===i&&this._iterate(n,0,r),this},t.Timeline.prototype.forEachFrom=function(t,e){for(var n=this._search(t);n>=0&&this._timeline[n].time>=t;)n--;return this._iterate(e,n+1),this},t.Timeline.prototype.forEachAtTime=function(t,e){var n=this._search(t);return-1!==n&&this._iterate(function(n){n.time===t&&e.call(this,n)},0,n),this},t.Timeline.prototype.dispose=function(){return t.prototype.dispose.call(this),this._timeline=null,this},t.Timeline}),n(function(t){t.supported&&(!window.hasOwnProperty("OfflineAudioContext")&&window.hasOwnProperty("webkitOfflineAudioContext")&&(window.OfflineAudioContext=window.webkitOfflineAudioContext),new OfflineAudioContext(1,1,44100).startRendering()instanceof Promise||(OfflineAudioContext.prototype._native_startRendering=OfflineAudioContext.prototype.startRendering,OfflineAudioContext.prototype.startRendering=function(){return new Promise(function(t){this.oncomplete=function(e){t(e.renderedBuffer)},this._native_startRendering()}.bind(this))}))}),n(function(t){if(t.supported){!window.hasOwnProperty("AudioContext")&&window.hasOwnProperty("webkitAudioContext")&&(window.AudioContext=window.webkitAudioContext),AudioContext.prototype.close||(AudioContext.prototype.close=function(){return t.isFunction(this.suspend)&&this.suspend(),Promise.resolve()}),AudioContext.prototype.resume||(AudioContext.prototype.resume=function(){return Promise.resolve()}),!AudioContext.prototype.createGain&&AudioContext.prototype.createGainNode&&(AudioContext.prototype.createGain=AudioContext.prototype.createGainNode),!AudioContext.prototype.createDelay&&AudioContext.prototype.createDelayNode&&(AudioContext.prototype.createDelay=AudioContext.prototype.createDelayNode);var e=!1,n=new OfflineAudioContext(1,1,44100),i=new Uint32Array([1179011410,48,1163280727,544501094,16,131073,44100,176400,1048580,1635017060,8,0,0,0,0]).buffer;try{n.decodeAudioData(i)instanceof Promise&&(e=!0)}catch(t){e=!1}e||(AudioContext.prototype._native_decodeAudioData=AudioContext.prototype.decodeAudioData,AudioContext.prototype.decodeAudioData=function(t){return new Promise(function(e,n){this._native_decodeAudioData(t,e,n)}.bind(this))})}}),n(function(t){t.Context=function(){t.Emitter.call(this);var n=t.defaults(arguments,["context"],t.Context);if(!n.context&&(n.context=new window.AudioContext,!n.context))throw new Error("could not create AudioContext. Possibly too many AudioContexts running already.");for(var i in this._context=n.context,this._context)this._defineProperty(this._context,i);this._latencyHint=n.latencyHint,this._constants={},this.lookAhead=n.lookAhead,this._computedUpdateInterval=0,this._ticker=new e(this.emit.bind(this,"tick"),n.clockSource,n.updateInterval),this._timeouts=new t.Timeline,this._timeoutIds=0,this.on("tick",this._timeoutLoop.bind(this))},t.extend(t.Context,t.Emitter),t.Emitter.mixin(t.Context),t.Context.defaults={clockSource:"worker",latencyHint:"interactive",lookAhead:.1,updateInterval:.03},t.Context.prototype._defineProperty=function(e,n){t.isUndef(this[n])&&Object.defineProperty(this,n,{get:function(){return"function"==typeof e[n]?e[n].bind(e):e[n]},set:function(t){e[n]=t}})},t.Context.prototype.now=function(){return this._context.currentTime+this.lookAhead},t.Context.prototype.ready=function(){return new Promise(function(t){"running"===this._context.state?t():this._context.resume().then(function(){t()})}.bind(this))},t.Context.prototype.close=function(){return this._context.close().then(function(){t.Context.emit("close",this)}.bind(this))},t.Context.prototype.getConstant=function(t){if(this._constants[t])return this._constants[t];for(var e=this._context.createBuffer(1,128,this._context.sampleRate),n=e.getChannelData(0),i=0;i<n.length;i++)n[i]=t;var r=this._context.createBufferSource();return r.channelCount=1,r.channelCountMode="explicit",r.buffer=e,r.loop=!0,r.start(0),this._constants[t]=r,r},t.Context.prototype._timeoutLoop=function(){for(var t=this.now();this._timeouts&&this._timeouts.length&&this._timeouts.peek().time<=t;)this._timeouts.shift().callback()},t.Context.prototype.setTimeout=function(t,e){this._timeoutIds++;var n=this.now();return this._timeouts.add({callback:t,time:n+e,id:this._timeoutIds}),this._timeoutIds},t.Context.prototype.clearTimeout=function(t){return this._timeouts.forEach(function(e){e.id===t&&this.remove(e)}),this},Object.defineProperty(t.Context.prototype,"updateInterval",{get:function(){return this._ticker.updateInterval},set:function(t){this._ticker.updateInterval=t}}),Object.defineProperty(t.Context.prototype,"clockSource",{get:function(){return this._ticker.type},set:function(t){this._ticker.type=t}}),Object.defineProperty(t.Context.prototype,"latencyHint",{get:function(){return this._latencyHint},set:function(e){var n=e;if(this._latencyHint=e,t.isString(e))switch(e){case"interactive":n=.1,this._context.latencyHint=e;break;case"playback":n=.8,this._context.latencyHint=e;break;case"balanced":n=.25,this._context.latencyHint=e;break;case"fastest":this._context.latencyHint="interactive",n=.01}this.lookAhead=n,this.updateInterval=n/3}}),t.Context.prototype.dispose=function(){return this.close().then(function(){for(var e in t.Emitter.prototype.dispose.call(this),this._ticker.dispose(),this._ticker=null,this._timeouts.dispose(),this._timeouts=null,this._constants)this._constants[e].disconnect();this._constants=null}.bind(this))};var e=function(e,n,i){this._type=n,this._updateInterval=i,this._callback=t.defaultArg(e,t.noOp),this._createClock()};return e.Type={Worker:"worker",Timeout:"timeout",Offline:"offline"},e.prototype._createWorker=function(){window.URL=window.URL||window.webkitURL;var t=new Blob(["var timeoutTime = "+(1e3*this._updateInterval).toFixed(1)+";self.onmessage = function(msg){\ttimeoutTime = parseInt(msg.data);};function tick(){\tsetTimeout(tick, timeoutTime);\tself.postMessage('tick');}tick();"]),e=URL.createObjectURL(t),n=new Worker(e);n.onmessage=this._callback.bind(this),this._worker=n},e.prototype._createTimeout=function(){this._timeout=setTimeout(function(){this._createTimeout(),this._callback()}.bind(this),1e3*this._updateInterval)},e.prototype._createClock=function(){if(this._type===e.Type.Worker)try{this._createWorker()}catch(t){this._type=e.Type.Timeout,this._createClock()}else this._type===e.Type.Timeout&&this._createTimeout()},Object.defineProperty(e.prototype,"updateInterval",{get:function(){return this._updateInterval},set:function(t){this._updateInterval=Math.max(t,128/44100),this._type===e.Type.Worker&&this._worker.postMessage(Math.max(1e3*t,1))}}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},set:function(t){this._disposeClock(),this._type=t,this._createClock()}}),e.prototype._disposeClock=function(){this._timeout&&(clearTimeout(this._timeout),this._timeout=null),this._worker&&(this._worker.terminate(),this._worker.onmessage=null,this._worker=null)},e.prototype.dispose=function(){this._disposeClock(),this._callback=null},t.getContext(function(){var e=AudioNode.prototype.connect,n=AudioNode.prototype.disconnect;function i(n,i,r){if(n.input)return r=t.defaultArg(r,0),t.isArray(n.input)?this.connect(n.input[r]):this.connect(n.input,i,r);try{return n instanceof AudioNode?(e.call(this,n,i,r),n):(e.call(this,n,i),n)}catch(t){throw new Error("error connecting to node: "+n+"\n"+t)}}AudioNode.prototype.connect!==i&&(AudioNode.prototype.connect=i,AudioNode.prototype.disconnect=function(e,i,r){if(e&&e.input&&t.isArray(e.input))r=t.defaultArg(r,0),this.disconnect(e.input[r],i,0);else if(e&&e.input)this.disconnect(e.input,i,r);else try{n.apply(this,arguments)}catch(t){throw new Error("error disconnecting node: "+e+"\n"+t)}})}),t.supported&&!t.initialized?(t.context=new t.Context,window.TONE_SILENCE_VERSION_LOGGING||console.log("%c * Tone.js "+t.version+" * ","background: #000; color: #fff")):t.supported||console.warn("This browser does not support Tone.js"),t.Context}),n(function(t){return t.AudioNode=function(){t.call(this);var e=t.defaults(arguments,["context"],{context:t.context});this._context=e.context},t.extend(t.AudioNode),Object.defineProperty(t.AudioNode.prototype,"context",{get:function(){return this._context}}),t.AudioNode.prototype.createInsOuts=function(t,e){1===t?this.input=this.context.createGain():t>1&&(this.input=new Array(t)),1===e?this.output=this.context.createGain():e>1&&(this.output=new Array(e))},Object.defineProperty(t.AudioNode.prototype,"channelCount",{get:function(){return this.output.channelCount},set:function(t){return this.output.channelCount=t}}),Object.defineProperty(t.AudioNode.prototype,"channelCountMode",{get:function(){return this.output.channelCountMode},set:function(t){return this.output.channelCountMode=t}}),Object.defineProperty(t.AudioNode.prototype,"channelInterpretation",{get:function(){return this.output.channelInterpretation},set:function(t){return this.output.channelInterpretation=t}}),Object.defineProperty(t.AudioNode.prototype,"numberOfInputs",{get:function(){return this.input?t.isArray(this.input)?this.input.length:1:0}}),Object.defineProperty(t.AudioNode.prototype,"numberOfOutputs",{get:function(){return this.output?t.isArray(this.output)?this.output.length:1:0}}),t.AudioNode.prototype._onConnect=function(){},t.AudioNode.prototype.connect=function(e,n,i){return e._onConnect&&e._onConnect(this),t.isArray(this.output)?(n=t.defaultArg(n,0),this.output[n].connect(e,0,i)):this.output.connect(e,n,i),this},t.AudioNode.prototype.disconnect=function(e,n,i){t.isArray(this.output)?t.isNumber(e)?this.output[e].disconnect():(n=t.defaultArg(n,0),this.output[n].disconnect(e,0,i)):this.output.disconnect.apply(this.output,arguments)},t.AudioNode.prototype.chain=function(){for(var t=this,e=0;e<arguments.length;e++){var n=arguments[e];t.connect(n),t=n}return this},t.AudioNode.prototype.fan=function(){for(var t=0;t<arguments.length;t++)this.connect(arguments[t]);return this},window.AudioNode&&(AudioNode.prototype.chain=t.AudioNode.prototype.chain,AudioNode.prototype.fan=t.AudioNode.prototype.fan),t.AudioNode.prototype.dispose=function(){return t.isDefined(this.input)&&(this.input instanceof AudioNode&&this.input.disconnect(),this.input=null),t.isDefined(this.output)&&(this.output instanceof AudioNode&&this.output.disconnect(),this.output=null),this._context=null,this},t.AudioNode}),n(function(t){return t.SignalBase=function(){t.AudioNode.call(this)},t.extend(t.SignalBase,t.AudioNode),t.SignalBase.prototype.connect=function(e,n,i){return t.Signal&&t.Signal===e.constructor||t.Param&&t.Param===e.constructor?(e._param.cancelScheduledValues(0),e._param.value=0,e.overridden=!0):e instanceof AudioParam&&(e.cancelScheduledValues(0),e.value=0),t.AudioNode.prototype.connect.call(this,e,n,i),this},t.SignalBase}),n(function(t){if(t.supported){var e=navigator.userAgent.toLowerCase();if(e.includes("safari")&&!e.includes("chrome")){var n=function(t){for(var e in this._internalNode=this.input=this.output=t._native_createWaveShaper(),this._curve=null,this._internalNode)this._defineProperty(this._internalNode,e)};Object.defineProperty(n.prototype,"curve",{get:function(){return this._curve},set:function(t){this._curve=t;var e=new Float32Array(t.length+1);e.set(t,1),e[0]=t[0],this._internalNode.curve=e}}),n.prototype._defineProperty=function(e,n){t.isUndef(this[n])&&Object.defineProperty(this,n,{get:function(){return"function"==typeof e[n]?e[n].bind(e):e[n]},set:function(t){e[n]=t}})},AudioContext.prototype._native_createWaveShaper=AudioContext.prototype.createWaveShaper,AudioContext.prototype.createWaveShaper=function(){return new n(this)}}}}),n(function(t){return t.WaveShaper=function(e,n){t.SignalBase.call(this),this._shaper=this.input=this.output=this.context.createWaveShaper(),this._curve=null,Array.isArray(e)?this.curve=e:isFinite(e)||t.isUndef(e)?this._curve=new Float32Array(t.defaultArg(e,1024)):t.isFunction(e)&&(this._curve=new Float32Array(t.defaultArg(n,1024)),this.setMap(e))},t.extend(t.WaveShaper,t.SignalBase),t.WaveShaper.prototype.setMap=function(t){for(var e=new Array(this._curve.length),n=0,i=this._curve.length;n<i;n++){var r=n/(i-1)*2-1;e[n]=t(r,n)}return this.curve=e,this},Object.defineProperty(t.WaveShaper.prototype,"curve",{get:function(){return this._shaper.curve},set:function(t){this._curve=new Float32Array(t),this._shaper.curve=this._curve}}),Object.defineProperty(t.WaveShaper.prototype,"oversample",{get:function(){return this._shaper.oversample},set:function(t){if(!["none","2x","4x"].includes(t))throw new RangeError("Tone.WaveShaper: oversampling must be either 'none', '2x', or '4x'");this._shaper.oversample=t}}),t.WaveShaper.prototype.dispose=function(){return t.SignalBase.prototype.dispose.call(this),this._shaper.disconnect(),this._shaper=null,this._curve=null,this},t.WaveShaper}),n(function(t){return t.TimeBase=function(e,n){if(!(this instanceof t.TimeBase))return new t.TimeBase(e,n);if(this._val=e,this._units=n,t.isUndef(this._units)&&t.isString(this._val)&&parseFloat(this._val)==this._val&&"+"!==this._val.charAt(0))this._val=parseFloat(this._val),this._units=this._defaultUnits;else if(e&&e.constructor===this.constructor)this._val=e._val,this._units=e._units;else if(e instanceof t.TimeBase)switch(this._defaultUnits){case"s":this._val=e.toSeconds();break;case"i":this._val=e.toTicks();break;case"hz":this._val=e.toFrequency();break;case"midi":this._val=e.toMidi();break;default:throw new Error("Unrecognized default units "+this._defaultUnits)}},t.extend(t.TimeBase),t.TimeBase.prototype._expressions={n:{regexp:/^(\d+)n(\.?)$/i,method:function(t,e){t=parseInt(t);var n="."===e?1.5:1;return 1===t?this._beatsToUnits(this._getTimeSignature())*n:this._beatsToUnits(4/t)*n}},t:{regexp:/^(\d+)t$/i,method:function(t){return t=parseInt(t),this._beatsToUnits(8/(3*parseInt(t)))}},m:{regexp:/^(\d+)m$/i,method:function(t){return this._beatsToUnits(parseInt(t)*this._getTimeSignature())}},i:{regexp:/^(\d+)i$/i,method:function(t){return this._ticksToUnits(parseInt(t))}},hz:{regexp:/^(\d+(?:\.\d+)?)hz$/i,method:function(t){return this._frequencyToUnits(parseFloat(t))}},tr:{regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?$/,method:function(t,e,n){var i=0;return t&&"0"!==t&&(i+=this._beatsToUnits(this._getTimeSignature()*parseFloat(t))),e&&"0"!==e&&(i+=this._beatsToUnits(parseFloat(e))),n&&"0"!==n&&(i+=this._beatsToUnits(parseFloat(n)/4)),i}},s:{regexp:/^(\d+(?:\.\d+)?)s$/,method:function(t){return this._secondsToUnits(parseFloat(t))}},samples:{regexp:/^(\d+)samples$/,method:function(t){return parseInt(t)/this.context.sampleRate}},default:{regexp:/^(\d+(?:\.\d+)?)$/,method:function(t){return this._expressions[this._defaultUnits].method.call(this,t)}}},t.TimeBase.prototype._defaultUnits="s",t.TimeBase.prototype._getBpm=function(){return t.Transport?t.Transport.bpm.value:120},t.TimeBase.prototype._getTimeSignature=function(){return t.Transport?t.Transport.timeSignature:4},t.TimeBase.prototype._getPPQ=function(){return t.Transport?t.Transport.PPQ:192},t.TimeBase.prototype._now=function(){return this.now()},t.TimeBase.prototype._frequencyToUnits=function(t){return 1/t},t.TimeBase.prototype._beatsToUnits=function(t){return 60/this._getBpm()*t},t.TimeBase.prototype._secondsToUnits=function(t){return t},t.TimeBase.prototype._ticksToUnits=function(t){return t*(this._beatsToUnits(1)/this._getPPQ())},t.TimeBase.prototype._noArg=function(){return this._now()},t.TimeBase.prototype.valueOf=function(){if(t.isUndef(this._val))return this._noArg();if(t.isString(this._val)&&t.isUndef(this._units))for(var e in this._expressions)if(this._expressions[e].regexp.test(this._val.trim())){this._units=e;break}if(t.isDefined(this._units)){var n=this._expressions[this._units],i=this._val.toString().trim().match(n.regexp);return i?n.method.apply(this,i.slice(1)):n.method.call(this,parseFloat(this._val))}return this._val},t.TimeBase.prototype.toSeconds=function(){return this.valueOf()},t.TimeBase.prototype.toFrequency=function(){return 1/this.toSeconds()},t.TimeBase.prototype.toSamples=function(){return this.toSeconds()*this.context.sampleRate},t.TimeBase.prototype.toMilliseconds=function(){return 1e3*this.toSeconds()},t.TimeBase.prototype.dispose=function(){this._val=null,this._units=null},t.TimeBase}),n(function(t){t.Frequency=function(e,n){if(!(this instanceof t.Frequency))return new t.Frequency(e,n);t.TimeBase.call(this,e,n)},t.extend(t.Frequency,t.TimeBase),t.Frequency.prototype._expressions=Object.assign({},t.TimeBase.prototype._expressions,{midi:{regexp:/^(\d+(?:\.\d+)?midi)/,method:function(e){return"midi"===this._defaultUnits?e:t.Frequency.mtof(e)}},note:{regexp:/^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i,method:function(n,i){var r=e[n.toLowerCase()]+12*(parseInt(i)+1);return"midi"===this._defaultUnits?r:t.Frequency.mtof(r)}},tr:{regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?/,method:function(t,e,n){var i=1;return t&&"0"!==t&&(i*=this._beatsToUnits(this._getTimeSignature()*parseFloat(t))),e&&"0"!==e&&(i*=this._beatsToUnits(parseFloat(e))),n&&"0"!==n&&(i*=this._beatsToUnits(parseFloat(n)/4)),i}}}),t.Frequency.prototype.transpose=function(e){return new this.constructor(this.valueOf()*t.intervalToFrequencyRatio(e))},t.Frequency.prototype.harmonize=function(t){return t.map(function(t){return this.transpose(t)}.bind(this))},t.Frequency.prototype.toMidi=function(){return t.Frequency.ftom(this.valueOf())},t.Frequency.prototype.toNote=function(){var e=this.toFrequency(),i=Math.log2(e/t.Frequency.A4),r=Math.round(12*i)+57,o=Math.floor(r/12);return o<0&&(r+=-12*o),n[r%12]+o.toString()},t.Frequency.prototype.toSeconds=function(){return 1/t.TimeBase.prototype.toSeconds.call(this)},t.Frequency.prototype.toFrequency=function(){return t.TimeBase.prototype.toFrequency.call(this)},t.Frequency.prototype.toTicks=function(){var e=this._beatsToUnits(1),n=this.valueOf()/e;return Math.floor(n*t.Transport.PPQ)},t.Frequency.prototype._noArg=function(){return 0},t.Frequency.prototype._frequencyToUnits=function(t){return t},t.Frequency.prototype._ticksToUnits=function(e){return 1/(60*e/(t.Transport.bpm.value*t.Transport.PPQ))},t.Frequency.prototype._beatsToUnits=function(e){return 1/t.TimeBase.prototype._beatsToUnits.call(this,e)},t.Frequency.prototype._secondsToUnits=function(t){return 1/t},t.Frequency.prototype._defaultUnits="hz";var e={cbb:-2,cb:-1,c:0,"c#":1,cx:2,dbb:0,db:1,d:2,"d#":3,dx:4,ebb:2,eb:3,e:4,"e#":5,ex:6,fbb:3,fb:4,f:5,"f#":6,fx:7,gbb:5,gb:6,g:7,"g#":8,gx:9,abb:7,ab:8,a:9,"a#":10,ax:11,bbb:9,bb:10,b:11,"b#":12,bx:13},n=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"];return t.Frequency.A4=440,t.Frequency.mtof=function(e){return t.Frequency.A4*Math.pow(2,(e-69)/12)},t.Frequency.ftom=function(e){return 69+Math.round(12*Math.log2(e/t.Frequency.A4))},t.Frequency}),n(function(t){return t.Time=function(e,n){if(!(this instanceof t.Time))return new t.Time(e,n);t.TimeBase.call(this,e,n)},t.extend(t.Time,t.TimeBase),t.Time.prototype._expressions=Object.assign({},t.TimeBase.prototype._expressions,{quantize:{regexp:/^@(.+)/,method:function(e){if(t.Transport){var n=new this.constructor(e);return t.Transport.nextSubdivision(n)}return 0}},now:{regexp:/^\+(.+)/,method:function(t){return this._now()+new this.constructor(t)}}}),t.Time.prototype.quantize=function(e,n){n=t.defaultArg(n,1);var i=new this.constructor(e),r=this.valueOf();return r+(Math.round(r/i)*i-r)*n},t.Time.prototype.toNotation=function(){for(var e=this.toSeconds(),n=["1m"],i=1;i<8;i++){var r=Math.pow(2,i);n.push(r+"n."),n.push(r+"n"),n.push(r+"t")}n.push("0");var o=n[0],s=t.Time(n[0]).toSeconds();return n.forEach(function(n){var i=t.Time(n).toSeconds();Math.abs(i-e)<Math.abs(s-e)&&(o=n,s=i)}),o},t.Time.prototype.toBarsBeatsSixteenths=function(){var t=this._beatsToUnits(1),e=this.valueOf()/t,n=Math.floor(e/this._getTimeSignature()),i=e%1*4;return e=Math.floor(e)%this._getTimeSignature(),(i=i.toString()).length>3&&(i=parseFloat(parseFloat(i).toFixed(3))),[n,e,i].join(":")},t.Time.prototype.toTicks=function(){var t=this._beatsToUnits(1),e=this.valueOf()/t;return Math.round(e*this._getPPQ())},t.Time.prototype.toSeconds=function(){return this.valueOf()},t.Time.prototype.toMidi=function(){return t.Frequency.ftom(this.toFrequency())},t.Time}),n(function(t){return t.TransportTime=function(e,n){if(!(this instanceof t.TransportTime))return new t.TransportTime(e,n);t.Time.call(this,e,n)},t.extend(t.TransportTime,t.Time),t.TransportTime.prototype._now=function(){return t.Transport.seconds},t.TransportTime}),n(function(t){return t.Type={Default:"number",Time:"time",Frequency:"frequency",TransportTime:"transportTime",Ticks:"ticks",NormalRange:"normalRange",AudioRange:"audioRange",Decibels:"db",Interval:"interval",BPM:"bpm",Positive:"positive",Gain:"gain",Cents:"cents",Degrees:"degrees",MIDI:"midi",BarsBeatsSixteenths:"barsBeatsSixteenths",Samples:"samples",Hertz:"hertz",Note:"note",Milliseconds:"milliseconds",Seconds:"seconds",Notation:"notation"},t.prototype.toSeconds=function(e){return t.isNumber(e)?e:t.isUndef(e)?this.now():t.isString(e)?new t.Time(e).toSeconds():e instanceof t.TimeBase?e.toSeconds():void 0},t.prototype.toFrequency=function(e){return t.isNumber(e)?e:t.isString(e)||t.isUndef(e)?new t.Frequency(e).valueOf():e instanceof t.TimeBase?e.toFrequency():void 0},t.prototype.toTicks=function(e){return t.isNumber(e)||t.isString(e)?new t.TransportTime(e).toTicks():t.isUndef(e)?t.Transport.ticks:e instanceof t.TimeBase?e.toTicks():void 0},t}),n(function(t){return t.Param=function(){var e=t.defaults(arguments,["param","units","convert"],t.Param);t.AudioNode.call(this),this._param=this.input=e.param,this.units=e.units,this.convert=e.convert,this.overridden=!1,this._events=new t.Timeline(1e3),t.isDefined(e.value)&&this._param&&(this.value=e.value)},t.extend(t.Param,t.AudioNode),t.Param.defaults={units:t.Type.Default,convert:!0,param:void 0},Object.defineProperty(t.Param.prototype,"value",{get:function(){var t=this.now();return this._toUnits(this.getValueAtTime(t))},set:function(t){this._initialValue=this._fromUnits(t),this.cancelScheduledValues(this.context.currentTime),this.setValueAtTime(t,this.context.currentTime)}}),Object.defineProperty(t.Param.prototype,"minValue",{get:function(){return this.units===t.Type.Time||this.units===t.Type.Frequency||this.units===t.Type.NormalRange||this.units===t.Type.Positive||this.units===t.Type.BPM?0:this.units===t.Type.AudioRange?-1:this.units===t.Type.Decibels?-1/0:this._param.minValue}}),Object.defineProperty(t.Param.prototype,"maxValue",{get:function(){return this.units===t.Type.NormalRange||this.units===t.Type.AudioRange?1:this._param.maxValue}}),t.Param.prototype._fromUnits=function(e){if(!this.convert&&!t.isUndef(this.convert)||this.overridden)return e;switch(this.units){case t.Type.Time:return this.toSeconds(e);case t.Type.Frequency:return this.toFrequency(e);case t.Type.Decibels:return t.dbToGain(e);case t.Type.NormalRange:return Math.min(Math.max(e,0),1);case t.Type.AudioRange:return Math.min(Math.max(e,-1),1);case t.Type.Positive:return Math.max(e,0);default:return e}},t.Param.prototype._toUnits=function(e){if(!this.convert&&!t.isUndef(this.convert))return e;switch(this.units){case t.Type.Decibels:return t.gainToDb(e);default:return e}},t.Param.prototype._minOutput=1e-5,t.Param.AutomationType={Linear:"linearRampToValueAtTime",Exponential:"exponentialRampToValueAtTime",Target:"setTargetAtTime",SetValue:"setValueAtTime"},t.Param.prototype.setValueAtTime=function(e,n){return n=this.toSeconds(n),e=this._fromUnits(e),this._events.add({type:t.Param.AutomationType.SetValue,value:e,time:n}),this._param.setValueAtTime(e,n),this},t.Param.prototype.getValueAtTime=function(e){e=this.toSeconds(e);var n=this._events.getAfter(e),i=this._events.get(e),r=t.defaultArg(this._initialValue,this._param.defaultValue),o=r;if(null===i)o=r;else if(i.type===t.Param.AutomationType.Target){var s,a=this._events.getBefore(i.time);s=null===a?r:a.value,o=this._exponentialApproach(i.time,s,i.value,i.constant,e)}else o=null===n?i.value:n.type===t.Param.AutomationType.Linear?this._linearInterpolate(i.time,i.value,n.time,n.value,e):n.type===t.Param.AutomationType.Exponential?this._exponentialInterpolate(i.time,i.value,n.time,n.value,e):i.value;return o},t.Param.prototype.setRampPoint=function(t){t=this.toSeconds(t);var e=this.getValueAtTime(t);return this.cancelAndHoldAtTime(t),0===e&&(e=this._minOutput),this.setValueAtTime(this._toUnits(e),t),this},t.Param.prototype.linearRampToValueAtTime=function(e,n){return e=this._fromUnits(e),n=this.toSeconds(n),this._events.add({type:t.Param.AutomationType.Linear,value:e,time:n}),this._param.linearRampToValueAtTime(e,n),this},t.Param.prototype.exponentialRampToValueAtTime=function(e,n){return e=this._fromUnits(e),e=Math.max(this._minOutput,e),n=this.toSeconds(n),this._events.add({type:t.Param.AutomationType.Exponential,time:n,value:e}),this._param.exponentialRampToValueAtTime(e,n),this},t.Param.prototype.exponentialRampTo=function(t,e,n){return n=this.toSeconds(n),this.setRampPoint(n),this.exponentialRampToValueAtTime(t,n+this.toSeconds(e)),this},t.Param.prototype.linearRampTo=function(t,e,n){return n=this.toSeconds(n),this.setRampPoint(n),this.linearRampToValueAtTime(t,n+this.toSeconds(e)),this},t.Param.prototype.targetRampTo=function(t,e,n){return n=this.toSeconds(n),this.setRampPoint(n),this.exponentialApproachValueAtTime(t,n,e),this},t.Param.prototype.exponentialApproachValueAtTime=function(t,e,n){var i=Math.log(this.toSeconds(n)+1)/Math.log(200);return e=this.toSeconds(e),this.setTargetAtTime(t,e,i)},t.Param.prototype.setTargetAtTime=function(e,n,i){if(e=this._fromUnits(e),i<=0)throw new Error("timeConstant must be greater than 0");return n=this.toSeconds(n),this._events.add({type:t.Param.AutomationType.Target,value:e,time:n,constant:i}),this._param.setTargetAtTime(e,n,i),this},t.Param.prototype.setValueCurveAtTime=function(e,n,i,r){r=t.defaultArg(r,1),i=this.toSeconds(i),n=this.toSeconds(n),this.setValueAtTime(e[0]*r,n);for(var o=i/(e.length-1),s=1;s<e.length;s++)this.linearRampToValueAtTime(e[s]*r,n+s*o);return this},t.Param.prototype.cancelScheduledValues=function(t){return t=this.toSeconds(t),this._events.cancel(t),this._param.cancelScheduledValues(t),this},t.Param.prototype.cancelAndHoldAtTime=function(e){var n=this.getValueAtTime(e),i=this._events.get(e),r=this._events.getAfter(e);return i&&i.time===e?r?this._events.cancel(r.time):this._events.cancel(e+1e-6):r&&(this._events.cancel(r.time),this._param.cancelAndHoldAtTime||this._param.cancelScheduledValues(e),r.type===t.Param.AutomationType.Linear?this._param.cancelAndHoldAtTime?this._events.add({type:t.Param.AutomationType.Linear,value:n,time:e}):this.linearRampToValueAtTime(n,e):r.type===t.Param.AutomationType.Exponential&&(this._param.cancelAndHoldAtTime?this._events.add({type:t.Param.AutomationType.Exponential,value:n,time:e}):this.exponentialRampToValueAtTime(n,e))),this._events.add({type:t.Param.AutomationType.SetValue,value:n,time:e}),this._param.cancelAndHoldAtTime?this._param.cancelAndHoldAtTime(e):this._param.setValueAtTime(n,e),this},t.Param.prototype.rampTo=function(e,n,i){return n=t.defaultArg(n,.1),this.units===t.Type.Frequency||this.units===t.Type.BPM||this.units===t.Type.Decibels?this.exponentialRampTo(e,n,i):this.linearRampTo(e,n,i),this},t.Param.prototype._exponentialApproach=function(t,e,n,i,r){return n+(e-n)*Math.exp(-(r-t)/i)},t.Param.prototype._linearInterpolate=function(t,e,n,i,r){return e+(r-t)/(n-t)*(i-e)},t.Param.prototype._exponentialInterpolate=function(t,e,n,i,r){return e*Math.pow(i/e,(r-t)/(n-t))},t.Param.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._param=null,this._events=null,this},t.Param}),n(function(t){return t.OfflineContext=function(e,n,i){var r=new OfflineAudioContext(e,n*i,i);t.Context.call(this,{context:r,clockSource:"offline",lookAhead:0,updateInterval:128/i}),this._duration=n,this._currentTime=0},t.extend(t.OfflineContext,t.Context),t.OfflineContext.prototype.now=function(){return this._currentTime},t.OfflineContext.prototype.render=function(){for(;this._duration-this._currentTime>=0;)this.emit("tick"),this._currentTime+=this.blockTime;return this._context.startRendering()},t.OfflineContext.prototype.close=function(){return this._context=null,Promise.resolve()},t.OfflineContext}),n(function(t){if(t.supported){var e=navigator.userAgent.toLowerCase();e.includes("safari")&&!e.includes("chrome")&&e.includes("mobile")&&(t.OfflineContext.prototype.createBufferSource=function(){var t=this._context.createBufferSource(),e=t.start;return t.start=function(n){this.setTimeout(function(){e.call(t,n)}.bind(this),0)}.bind(this),t})}}),n(function(t){return t.Gain=function(){var e=t.defaults(arguments,["gain","units"],t.Gain);t.AudioNode.call(this),this.input=this.output=this._gainNode=this.context.createGain(),this.gain=new t.Param({param:this._gainNode.gain,units:e.units,value:e.gain,convert:e.convert}),this._readOnly("gain")},t.extend(t.Gain,t.AudioNode),t.Gain.defaults={gain:1,convert:!0},t.Gain.prototype.dispose=function(){t.AudioNode.prototype.dispose.call(this),this._gainNode.disconnect(),this._gainNode=null,this._writable("gain"),this.gain.dispose(),this.gain=null},t.Gain}),n(function(t){if(t.supported&&!AudioContext.prototype.createConstantSource){var e=function(t){this.context=t;for(var e=t.createBuffer(1,128,t.sampleRate),n=e.getChannelData(0),i=0;i<n.length;i++)n[i]=1;this._bufferSource=t.createBufferSource(),this._bufferSource.channelCount=1,this._bufferSource.channelCountMode="explicit",this._bufferSource.buffer=e,this._bufferSource.loop=!0;var r=this._output=t.createGain();this.offset=r.gain,this._bufferSource.connect(r)};e.prototype.start=function(t){return this._bufferSource.start(t),this},e.prototype.stop=function(t){return this._bufferSource.stop(t),this},e.prototype.connect=function(){return this._output.connect.apply(this._output,arguments),this},e.prototype.disconnect=function(){return this._output.disconnect.apply(this._output,arguments),this},AudioContext.prototype.createConstantSource=function(){return new e(this)},t.Context.prototype.createConstantSource=function(){return new e(this)}}}),n(function(t){return t.Signal=function(){var e=t.defaults(arguments,["value","units"],t.Signal);t.Param.call(this,e),this._proxies=[],this._sourceStarted=!1,this._constantSource=this.context.createConstantSource(),this._param=this._constantSource.offset,this.value=e.value,this.output=this._constantSource,this.input=this._param=this.output.offset},t.extend(t.Signal,t.Param),t.Signal.defaults={value:0,units:t.Type.Default,convert:!0},t.Signal.prototype.connect=function(e){return this._isParam(e)&&!this._sourceStarted?(this._proxies.push(e),e.overridden=!0,this._applyAutomations(e)):(t.SignalBase.prototype.connect.apply(this,arguments),this._sourceStarted||(this._sourceStarted=!0,this._constantSource.start(0))),this},t.Signal.prototype._isParam=function(e){return t.Param&&t.Param===e.constructor||e instanceof AudioParam},t.Signal.prototype._connectProxies=function(){this._sourceStarted||(this._sourceStarted=!0,this._constantSource.start(0)),this._proxies.forEach(function(e){t.SignalBase.prototype.connect.call(this,e),e._proxies&&e._connectProxies()}.bind(this))},t.Signal.prototype._onConnect=function(t){this._isParam(t)||this._connectProxies()},t.Signal.prototype._applyAutomations=function(t){var e=this.context.currentTime;t.cancelScheduledValues(e);var n=this.getValueAtTime(e);t.setValueAtTime(n,e),this._events.forEachFrom(e,function(e){t[e.type](e.value,e.time,e.constant)})},t.Signal.prototype.disconnect=function(e){if(this._proxies.includes(e)){var n=this._proxies.indexOf(e);this._proxies.splice(n,1)}else e||(this._proxies=[]);return t.SignalBase.prototype.disconnect.apply(this,arguments)},t.Signal.prototype.getValueAtTime=function(e){return this._param.getValueAtTime?this._param.getValueAtTime(e):t.Param.prototype.getValueAtTime.call(this,e)},["setValueAtTime","linearRampToValueAtTime","exponentialRampToValueAtTime","setTargetAtTime"].forEach(function(e){var n=t.Signal.prototype[e];t.Signal.prototype[e]=function(){var t=arguments;n.apply(this,arguments),t[0]=this._fromUnits(t[0]),t[1]=this.toSeconds(t[1]),this._proxies.forEach(function(n){n[e].apply(n,t)})}}),["cancelScheduledValues","cancelAndHoldAtTime"].forEach(function(e){var n=t.Signal.prototype[e];t.Signal.prototype[e]=function(){var t=arguments;n.apply(this,arguments),t[0]=this.toSeconds(t[0]),this._proxies.forEach(function(n){n[e].apply(n,t)})}}),t.Signal.prototype.dispose=function(){return t.Param.prototype.dispose.call(this),this._constantSource.disconnect(),this._constantSource=null,this._proxies=null,this},t.Signal}),n(function(t){return t.Pow=function(e){t.SignalBase.call(this),this._exp=t.defaultArg(e,1),this._expScaler=this.input=this.output=new t.WaveShaper(this._expFunc(this._exp),8192)},t.extend(t.Pow,t.SignalBase),Object.defineProperty(t.Pow.prototype,"value",{get:function(){return this._exp},set:function(t){this._exp=t,this._expScaler.setMap(this._expFunc(this._exp))}}),t.Pow.prototype._expFunc=function(t){return function(e){return Math.pow(Math.abs(e),t)}},t.Pow.prototype.dispose=function(){return t.SignalBase.prototype.dispose.call(this),this._expScaler.dispose(),this._expScaler=null,this},t.Pow}),n(function(t){return t.Envelope=function(){var e=t.defaults(arguments,["attack","decay","sustain","release"],t.Envelope);t.AudioNode.call(this),this.attack=e.attack,this.decay=e.decay,this.sustain=e.sustain,this.release=e.release,this._attackCurve="linear",this._releaseCurve="exponential",this._sig=this.output=new t.Signal(0),this.attackCurve=e.attackCurve,this.releaseCurve=e.releaseCurve},t.extend(t.Envelope,t.AudioNode),t.Envelope.defaults={attack:.01,decay:.1,sustain:.5,release:1,attackCurve:"linear",releaseCurve:"exponential"},Object.defineProperty(t.Envelope.prototype,"value",{get:function(){return this.getValueAtTime(this.now())}}),Object.defineProperty(t.Envelope.prototype,"attackCurve",{get:function(){if(t.isString(this._attackCurve))return this._attackCurve;if(t.isArray(this._attackCurve)){for(var e in t.Envelope.Type)if(t.Envelope.Type[e].In===this._attackCurve)return e;return this._attackCurve}},set:function(e){if(t.Envelope.Type.hasOwnProperty(e)){var n=t.Envelope.Type[e];t.isObject(n)?this._attackCurve=n.In:this._attackCurve=n}else{if(!t.isArray(e))throw new Error("Tone.Envelope: invalid curve: "+e);this._attackCurve=e}}}),Object.defineProperty(t.Envelope.prototype,"releaseCurve",{get:function(){if(t.isString(this._releaseCurve))return this._releaseCurve;if(t.isArray(this._releaseCurve)){for(var e in t.Envelope.Type)if(t.Envelope.Type[e].Out===this._releaseCurve)return e;return this._releaseCurve}},set:function(e){if(t.Envelope.Type.hasOwnProperty(e)){var n=t.Envelope.Type[e];t.isObject(n)?this._releaseCurve=n.Out:this._releaseCurve=n}else{if(!t.isArray(e))throw new Error("Tone.Envelope: invalid curve: "+e);this._releaseCurve=e}}}),t.Envelope.prototype.triggerAttack=function(e,n){e=this.toSeconds(e);var i=this.toSeconds(this.attack),r=i,o=this.toSeconds(this.decay);n=t.defaultArg(n,1);var s=this.getValueAtTime(e);if(s>0&&(r=(1-s)/(1/r)),"linear"===this._attackCurve)this._sig.linearRampTo(n,r,e);else if("exponential"===this._attackCurve)this._sig.targetRampTo(n,r,e);else if(r>0){this._sig.cancelAndHoldAtTime(e);var a=this._attackCurve;if(r<i){var u=1-r/i,l=Math.floor(u*this._attackCurve.length);(a=this._attackCurve.slice(l))[0]=s}this._sig.setValueCurveAtTime(a,e,r,n)}return o&&this._sig.targetRampTo(n*this.sustain,o,r+e),this},t.Envelope.prototype.triggerRelease=function(e){e=this.toSeconds(e);var n=this.getValueAtTime(e);if(n>0){var i=this.toSeconds(this.release);if("linear"===this._releaseCurve)this._sig.linearRampTo(0,i,e);else if("exponential"===this._releaseCurve)this._sig.targetRampTo(0,i,e);else{var r=this._releaseCurve;t.isArray(r)&&(this._sig.cancelAndHoldAtTime(e),this._sig.setValueCurveAtTime(r,e,i,n))}}return this},t.Envelope.prototype.getValueAtTime=function(t){return this._sig.getValueAtTime(t)},t.Envelope.prototype.triggerAttackRelease=function(t,e,n){return e=this.toSeconds(e),this.triggerAttack(e,n),this.triggerRelease(e+this.toSeconds(t)),this},t.Envelope.prototype.cancel=function(t){return this._sig.cancelScheduledValues(t),this},t.Envelope.prototype.connect=t.SignalBase.prototype.connect,function(){var e,n,i=[];for(e=0;e<128;e++)i[e]=Math.sin(e/127*(Math.PI/2));var r=[];for(e=0;e<127;e++){n=e/127;var o=Math.sin(n*(2*Math.PI)*6.4-Math.PI/2)+1;r[e]=o/10+.83*n}r[127]=1;var s=[];for(e=0;e<128;e++)s[e]=Math.ceil(e/127*5)/5;var a=[];for(e=0;e<128;e++)n=e/127,a[e]=.5*(1-Math.cos(Math.PI*n));var u,l=[];for(e=0;e<128;e++){n=e/127;var c=4*Math.pow(n,3)+.2,h=Math.cos(c*Math.PI*2*n);l[e]=Math.abs(h*(1-n))}function p(t){for(var e=new Array(t.length),n=0;n<t.length;n++)e[n]=1-t[n];return e}t.Envelope.Type={linear:"linear",exponential:"exponential",bounce:{In:p(l),Out:l},cosine:{In:i,Out:(u=i,u.slice(0).reverse())},step:{In:s,Out:p(s)},ripple:{In:r,Out:p(r)},sine:{In:a,Out:p(a)}}}(),t.Envelope.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._sig.dispose(),this._sig=null,this._attackCurve=null,this._releaseCurve=null,this},t.Envelope}),n(function(t){return t.AmplitudeEnvelope=function(){t.Envelope.apply(this,arguments),this.input=this.output=new t.Gain,this._sig.connect(this.output.gain)},t.extend(t.AmplitudeEnvelope,t.Envelope),t.AmplitudeEnvelope.prototype.dispose=function(){return t.Envelope.prototype.dispose.call(this),this},t.AmplitudeEnvelope}),n(function(t){t.supported&&(AnalyserNode.prototype.getFloatTimeDomainData||(AnalyserNode.prototype.getFloatTimeDomainData=function(t){var e=new Uint8Array(t.length);this.getByteTimeDomainData(e);for(var n=0;n<e.length;n++)t[n]=(e[n]-128)/128}))}),n(function(t){return t.Analyser=function(){var e=t.defaults(arguments,["type","size"],t.Analyser);t.AudioNode.call(this),this._analyser=this.input=this.output=this.context.createAnalyser(),this._type=e.type,this._buffer=null,this.size=e.size,this.type=e.type},t.extend(t.Analyser,t.AudioNode),t.Analyser.defaults={size:1024,type:"fft",smoothing:.8},t.Analyser.Type={Waveform:"waveform",FFT:"fft"},t.Analyser.prototype.getValue=function(){return this._type===t.Analyser.Type.FFT?this._analyser.getFloatFrequencyData(this._buffer):this._type===t.Analyser.Type.Waveform&&this._analyser.getFloatTimeDomainData(this._buffer),this._buffer},Object.defineProperty(t.Analyser.prototype,"size",{get:function(){return this._analyser.frequencyBinCount},set:function(t){this._analyser.fftSize=2*t,this._buffer=new Float32Array(t)}}),Object.defineProperty(t.Analyser.prototype,"type",{get:function(){return this._type},set:function(e){if(e!==t.Analyser.Type.Waveform&&e!==t.Analyser.Type.FFT)throw new TypeError("Tone.Analyser: invalid type: "+e);this._type=e}}),Object.defineProperty(t.Analyser.prototype,"smoothing",{get:function(){return this._analyser.smoothingTimeConstant},set:function(t){this._analyser.smoothingTimeConstant=t}}),t.Analyser.prototype.dispose=function(){t.AudioNode.prototype.dispose.call(this),this._analyser.disconnect(),this._analyser=null,this._buffer=null},t.Analyser}),n(function(t){return t.Compressor=function(){var e=t.defaults(arguments,["threshold","ratio"],t.Compressor);t.AudioNode.call(this),this._compressor=this.input=this.output=this.context.createDynamicsCompressor(),this.threshold=new t.Param({param:this._compressor.threshold,units:t.Type.Decibels,convert:!1}),this.attack=new t.Param(this._compressor.attack,t.Type.Time),this.release=new t.Param(this._compressor.release,t.Type.Time),this.knee=new t.Param({param:this._compressor.knee,units:t.Type.Decibels,convert:!1}),this.ratio=new t.Param({param:this._compressor.ratio,convert:!1}),this._readOnly(["knee","release","attack","ratio","threshold"]),this.set(e)},t.extend(t.Compressor,t.AudioNode),t.Compressor.defaults={ratio:12,threshold:-24,release:.25,attack:.003,knee:30},t.Compressor.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._writable(["knee","release","attack","ratio","threshold"]),this._compressor.disconnect(),this._compressor=null,this.attack.dispose(),this.attack=null,this.release.dispose(),this.release=null,this.threshold.dispose(),this.threshold=null,this.ratio.dispose(),this.ratio=null,this.knee.dispose(),this.knee=null,this},t.Compressor}),n(function(t){return t.Add=function(e){t.Signal.call(this),this.createInsOuts(2,0),this._sum=this.input[0]=this.input[1]=this.output=new t.Gain,this._param=this.input[1]=new t.Signal(e),this._param.connect(this._sum)},t.extend(t.Add,t.Signal),t.Add.prototype.dispose=function(){return t.Signal.prototype.dispose.call(this),this._sum.dispose(),this._sum=null,this},t.Add}),n(function(t){return t.Multiply=function(e){t.Signal.call(this),this.createInsOuts(2,0),this._mult=this.input[0]=this.output=new t.Gain,this._param=this.input[1]=this.output.gain,this.value=t.defaultArg(e,0)},t.extend(t.Multiply,t.Signal),t.Multiply.prototype.dispose=function(){return t.Signal.prototype.dispose.call(this),this._mult.dispose(),this._mult=null,this._param=null,this},t.Multiply}),n(function(t){return t.Negate=function(){t.SignalBase.call(this),this._multiply=this.input=this.output=new t.Multiply(-1)},t.extend(t.Negate,t.SignalBase),t.Negate.prototype.dispose=function(){return t.SignalBase.prototype.dispose.call(this),this._multiply.dispose(),this._multiply=null,this},t.Negate}),n(function(t){return t.Subtract=function(e){t.Signal.call(this),this.createInsOuts(2,0),this._sum=this.input[0]=this.output=new t.Gain,this._neg=new t.Negate,this._param=this.input[1]=new t.Signal(e),this._param.chain(this._neg,this._sum)},t.extend(t.Subtract,t.Signal),t.Subtract.prototype.dispose=function(){return t.Signal.prototype.dispose.call(this),this._neg.dispose(),this._neg=null,this._sum.disconnect(),this._sum=null,this},t.Subtract}),n(function(t){return t.EqualPowerGain=function(){t.SignalBase.call(this),this._eqPower=this.input=this.output=new t.WaveShaper(function(e){return Math.abs(e)<.001?0:t.equalPowerScale(e)}.bind(this),4096)},t.extend(t.EqualPowerGain,t.SignalBase),t.EqualPowerGain.prototype.dispose=function(){return t.SignalBase.prototype.dispose.call(this),this._eqPower.dispose(),this._eqPower=null,this},t.EqualPowerGain}),n(function(t){return t.CrossFade=function(e){t.AudioNode.call(this),this.createInsOuts(2,1),this.a=this.input[0]=new t.Gain,this.b=this.input[1]=new t.Gain,this.fade=new t.Signal(t.defaultArg(e,.5),t.Type.NormalRange),this._equalPowerA=new t.EqualPowerGain,this._equalPowerB=new t.EqualPowerGain,this._one=this.context.getConstant(1),this._invert=new t.Subtract,this.a.connect(this.output),this.b.connect(this.output),this.fade.chain(this._equalPowerB,this.b.gain),this._one.connect(this._invert,0,0),this.fade.connect(this._invert,0,1),this._invert.chain(this._equalPowerA,this.a.gain),this._readOnly("fade")},t.extend(t.CrossFade,t.AudioNode),t.CrossFade.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._writable("fade"),this._equalPowerA.dispose(),this._equalPowerA=null,this._equalPowerB.dispose(),this._equalPowerB=null,this.fade.dispose(),this.fade=null,this._invert.dispose(),this._invert=null,this._one=null,this.a.dispose(),this.a=null,this.b.dispose(),this.b=null,this},t.CrossFade}),n(function(t){return t.Filter=function(){var e=t.defaults(arguments,["frequency","type","rolloff"],t.Filter);t.AudioNode.call(this),this.createInsOuts(1,1),this._filters=[],this.frequency=new t.Signal(e.frequency,t.Type.Frequency),this.detune=new t.Signal(0,t.Type.Cents),this.gain=new t.Signal({value:e.gain,convert:!1}),this.Q=new t.Signal(e.Q),this._type=e.type,this._rolloff=e.rolloff,this.rolloff=e.rolloff,this._readOnly(["detune","frequency","gain","Q"])},t.extend(t.Filter,t.AudioNode),t.Filter.defaults={type:"lowpass",frequency:350,rolloff:-12,Q:1,gain:0},Object.defineProperty(t.Filter.prototype,"type",{get:function(){return this._type},set:function(t){if(-1===["lowpass","highpass","bandpass","lowshelf","highshelf","notch","allpass","peaking"].indexOf(t))throw new TypeError("Tone.Filter: invalid type "+t);this._type=t;for(var e=0;e<this._filters.length;e++)this._filters[e].type=t}}),Object.defineProperty(t.Filter.prototype,"rolloff",{get:function(){return this._rolloff},set:function(e){e=parseInt(e,10);var n=[-12,-24,-48,-96].indexOf(e);if(-1===n)throw new RangeError("Tone.Filter: rolloff can only be -12, -24, -48 or -96");n+=1,this._rolloff=e,this.input.disconnect();for(var i=0;i<this._filters.length;i++)this._filters[i].disconnect(),this._filters[i]=null;this._filters=new Array(n);for(var r=0;r<n;r++){var o=this.context.createBiquadFilter();o.type=this._type,this.frequency.connect(o.frequency),this.detune.connect(o.detune),this.Q.connect(o.Q),this.gain.connect(o.gain),this._filters[r]=o}var s=[this.input].concat(this._filters).concat([this.output]);t.connectSeries.apply(t,s)}}),t.Filter.prototype.dispose=function(){t.AudioNode.prototype.dispose.call(this);for(var e=0;e<this._filters.length;e++)this._filters[e].disconnect(),this._filters[e]=null;return this._filters=null,this._writable(["detune","frequency","gain","Q"]),this.frequency.dispose(),this.Q.dispose(),this.frequency=null,this.Q=null,this.detune.dispose(),this.detune=null,this.gain.dispose(),this.gain=null,this},t.Filter}),n(function(t){return t.MultibandSplit=function(){var e=t.defaults(arguments,["lowFrequency","highFrequency"],t.MultibandSplit);t.AudioNode.call(this),this.input=new t.Gain,this.output=new Array(3),this.low=this.output[0]=new t.Filter(0,"lowpass"),this._lowMidFilter=new t.Filter(0,"highpass"),this.mid=this.output[1]=new t.Filter(0,"lowpass"),this.high=this.output[2]=new t.Filter(0,"highpass"),this.lowFrequency=new t.Signal(e.lowFrequency,t.Type.Frequency),this.highFrequency=new t.Signal(e.highFrequency,t.Type.Frequency),this.Q=new t.Signal(e.Q),this.input.fan(this.low,this.high),this.input.chain(this._lowMidFilter,this.mid),this.lowFrequency.connect(this.low.frequency),this.lowFrequency.connect(this._lowMidFilter.frequency),this.highFrequency.connect(this.mid.frequency),this.highFrequency.connect(this.high.frequency),this.Q.connect(this.low.Q),this.Q.connect(this._lowMidFilter.Q),this.Q.connect(this.mid.Q),this.Q.connect(this.high.Q),this._readOnly(["high","mid","low","highFrequency","lowFrequency"])},t.extend(t.MultibandSplit,t.AudioNode),t.MultibandSplit.defaults={lowFrequency:400,highFrequency:2500,Q:1},t.MultibandSplit.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._writable(["high","mid","low","highFrequency","lowFrequency"]),this.low.dispose(),this.low=null,this._lowMidFilter.dispose(),this._lowMidFilter=null,this.mid.dispose(),this.mid=null,this.high.dispose(),this.high=null,this.lowFrequency.dispose(),this.lowFrequency=null,this.highFrequency.dispose(),this.highFrequency=null,this.Q.dispose(),this.Q=null,this},t.MultibandSplit}),n(function(t){return t.EQ3=function(){var e=t.defaults(arguments,["low","mid","high"],t.EQ3);t.AudioNode.call(this),this.output=new t.Gain,this._multibandSplit=this.input=new t.MultibandSplit({lowFrequency:e.lowFrequency,highFrequency:e.highFrequency}),this._lowGain=new t.Gain(e.low,t.Type.Decibels),this._midGain=new t.Gain(e.mid,t.Type.Decibels),this._highGain=new t.Gain(e.high,t.Type.Decibels),this.low=this._lowGain.gain,this.mid=this._midGain.gain,this.high=this._highGain.gain,this.Q=this._multibandSplit.Q,this.lowFrequency=this._multibandSplit.lowFrequency,this.highFrequency=this._multibandSplit.highFrequency,this._multibandSplit.low.chain(this._lowGain,this.output),this._multibandSplit.mid.chain(this._midGain,this.output),this._multibandSplit.high.chain(this._highGain,this.output),this._readOnly(["low","mid","high","lowFrequency","highFrequency"])},t.extend(t.EQ3,t.AudioNode),t.EQ3.defaults={low:0,mid:0,high:0,lowFrequency:400,highFrequency:2500},t.EQ3.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._writable(["low","mid","high","lowFrequency","highFrequency"]),this._multibandSplit.dispose(),this._multibandSplit=null,this.lowFrequency=null,this.highFrequency=null,this._lowGain.dispose(),this._lowGain=null,this._midGain.dispose(),this._midGain=null,this._highGain.dispose(),this._highGain=null,this.low=null,this.mid=null,this.high=null,this.Q=null,this},t.EQ3}),n(function(t){return t.Scale=function(e,n){t.SignalBase.call(this),this._outputMin=t.defaultArg(e,0),this._outputMax=t.defaultArg(n,1),this._scale=this.input=new t.Multiply(1),this._add=this.output=new t.Add(0),this._scale.connect(this._add),this._setRange()},t.extend(t.Scale,t.SignalBase),Object.defineProperty(t.Scale.prototype,"min",{get:function(){return this._outputMin},set:function(t){this._outputMin=t,this._setRange()}}),Object.defineProperty(t.Scale.prototype,"max",{get:function(){return this._outputMax},set:function(t){this._outputMax=t,this._setRange()}}),t.Scale.prototype._setRange=function(){this._add.value=this._outputMin,this._scale.value=this._outputMax-this._outputMin},t.Scale.prototype.dispose=function(){return t.SignalBase.prototype.dispose.call(this),this._add.dispose(),this._add=null,this._scale.dispose(),this._scale=null,this},t.Scale}),n(function(t){return t.ScaleExp=function(e,n,i){t.SignalBase.call(this),this._scale=this.output=new t.Scale(e,n),this._exp=this.input=new t.Pow(t.defaultArg(i,2)),this._exp.connect(this._scale)},t.extend(t.ScaleExp,t.SignalBase),Object.defineProperty(t.ScaleExp.prototype,"exponent",{get:function(){return this._exp.value},set:function(t){this._exp.value=t}}),Object.defineProperty(t.ScaleExp.prototype,"min",{get:function(){return this._scale.min},set:function(t){this._scale.min=t}}),Object.defineProperty(t.ScaleExp.prototype,"max",{get:function(){return this._scale.max},set:function(t){this._scale.max=t}}),t.ScaleExp.prototype.dispose=function(){return t.SignalBase.prototype.dispose.call(this),this._scale.dispose(),this._scale=null,this._exp.dispose(),this._exp=null,this},t.ScaleExp}),n(function(t){return t.Delay=function(){var e=t.defaults(arguments,["delayTime","maxDelay"],t.Delay);t.AudioNode.call(this),this._maxDelay=Math.max(this.toSeconds(e.maxDelay),this.toSeconds(e.delayTime)),this._delayNode=this.input=this.output=this.context.createDelay(this._maxDelay),this.delayTime=new t.Param({param:this._delayNode.delayTime,units:t.Type.Time,value:e.delayTime}),this._readOnly("delayTime")},t.extend(t.Delay,t.AudioNode),t.Delay.defaults={maxDelay:1,delayTime:0},Object.defineProperty(t.Delay.prototype,"maxDelay",{get:function(){return this._maxDelay}}),t.Delay.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._delayNode.disconnect(),this._delayNode=null,this._writable("delayTime"),this.delayTime=null,this},t.Delay}),n(function(t){return t.FeedbackCombFilter=function(){var e=t.defaults(arguments,["delayTime","resonance"],t.FeedbackCombFilter);t.AudioNode.call(this),this._delay=this.input=this.output=new t.Delay(e.delayTime),this.delayTime=this._delay.delayTime,this._feedback=new t.Gain(e.resonance,t.Type.NormalRange),this.resonance=this._feedback.gain,this._delay.chain(this._feedback,this._delay),this._readOnly(["resonance","delayTime"])},t.extend(t.FeedbackCombFilter,t.AudioNode),t.FeedbackCombFilter.defaults={delayTime:.1,resonance:.5},t.FeedbackCombFilter.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._writable(["resonance","delayTime"]),this._delay.dispose(),this._delay=null,this.delayTime=null,this._feedback.dispose(),this._feedback=null,this.resonance=null,this},t.FeedbackCombFilter}),n(function(t){return t.FFT=function(){var e=t.defaults(arguments,["size"],t.FFT);e.type=t.Analyser.Type.FFT,t.AudioNode.call(this),this._analyser=this.input=this.output=new t.Analyser(e)},t.extend(t.FFT,t.AudioNode),t.FFT.defaults={size:1024},t.FFT.prototype.getValue=function(){return this._analyser.getValue()},Object.defineProperty(t.FFT.prototype,"size",{get:function(){return this._analyser.size},set:function(t){this._analyser.size=t}}),t.FFT.prototype.dispose=function(){t.AudioNode.prototype.dispose.call(this),this._analyser.dispose(),this._analyser=null},t.FFT}),n(function(t){return t.Abs=function(){t.SignalBase.call(this),this._abs=this.input=this.output=new t.WaveShaper(function(t){return Math.abs(t)<.001?0:Math.abs(t)},1024)},t.extend(t.Abs,t.SignalBase),t.Abs.prototype.dispose=function(){return t.SignalBase.prototype.dispose.call(this),this._abs.dispose(),this._abs=null,this},t.Abs}),n(function(t){return t.Follower=function(){var e=t.defaults(arguments,["attack","release"],t.Follower);t.AudioNode.call(this),this.createInsOuts(1,1),this._abs=new t.Abs,this._filter=this.context.createBiquadFilter(),this._filter.type="lowpass",this._filter.frequency.value=0,this._filter.Q.value=-100,this._frequencyValues=new t.WaveShaper,this._sub=new t.Subtract,this._delay=new t.Delay(this.blockTime),this._mult=new t.Multiply(1e4),this._attack=e.attack,this._release=e.release,this.input.chain(this._abs,this._filter,this.output),this._abs.connect(this._sub,0,1),this._filter.chain(this._delay,this._sub),this._sub.chain(this._mult,this._frequencyValues,this._filter.frequency),this._setAttackRelease(this._attack,this._release)},t.extend(t.Follower,t.AudioNode),t.Follower.defaults={attack:.05,release:.5},t.Follower.prototype._setAttackRelease=function(e,n){var i=this.blockTime;e=t.Time(e).toFrequency(),n=t.Time(n).toFrequency(),e=Math.max(e,i),n=Math.max(n,i),this._frequencyValues.setMap(function(t){return t<=0?e:n})},Object.defineProperty(t.Follower.prototype,"attack",{get:function(){return this._attack},set:function(t){this._attack=t,this._setAttackRelease(this._attack,this._release)}}),Object.defineProperty(t.Follower.prototype,"release",{get:function(){return this._release},set:function(t){this._release=t,this._setAttackRelease(this._attack,this._release)}}),t.Follower.prototype.connect=t.SignalBase.prototype.connect,t.Follower.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._filter.disconnect(),this._filter=null,this._frequencyValues.disconnect(),this._frequencyValues=null,this._delay.dispose(),this._delay=null,this._sub.disconnect(),this._sub=null,this._abs.dispose(),this._abs=null,this._mult.dispose(),this._mult=null,this._curve=null,this},t.Follower}),n(function(t){return t.ScaledEnvelope=function(){var e=t.defaults(arguments,["attack","decay","sustain","release"],t.Envelope);t.Envelope.call(this,e),e=t.defaultArg(e,t.ScaledEnvelope.defaults),this._exp=this.output=new t.Pow(e.exponent),this._scale=this.output=new t.Scale(e.min,e.max),this._sig.chain(this._exp,this._scale)},t.extend(t.ScaledEnvelope,t.Envelope),t.ScaledEnvelope.defaults={min:0,max:1,exponent:1},Object.defineProperty(t.ScaledEnvelope.prototype,"min",{get:function(){return this._scale.min},set:function(t){this._scale.min=t}}),Object.defineProperty(t.ScaledEnvelope.prototype,"max",{get:function(){return this._scale.max},set:function(t){this._scale.max=t}}),Object.defineProperty(t.ScaledEnvelope.prototype,"exponent",{get:function(){return this._exp.value},set:function(t){this._exp.value=t}}),t.ScaledEnvelope.prototype.dispose=function(){return t.Envelope.prototype.dispose.call(this),this._scale.dispose(),this._scale=null,this._exp.dispose(),this._exp=null,this},t.ScaledEnvelope}),n(function(t){return t.FrequencyEnvelope=function(){var e=t.defaults(arguments,["attack","decay","sustain","release"],t.Envelope);t.ScaledEnvelope.call(this,e),e=t.defaultArg(e,t.FrequencyEnvelope.defaults),this._octaves=e.octaves,this.baseFrequency=e.baseFrequency,this.octaves=e.octaves},t.extend(t.FrequencyEnvelope,t.Envelope),t.FrequencyEnvelope.defaults={baseFrequency:200,octaves:4,exponent:2},Object.defineProperty(t.FrequencyEnvelope.prototype,"baseFrequency",{get:function(){return this._scale.min},set:function(t){this._scale.min=this.toFrequency(t),this.octaves=this._octaves}}),Object.defineProperty(t.FrequencyEnvelope.prototype,"octaves",{get:function(){return this._octaves},set:function(t){this._octaves=t,this._scale.max=this.baseFrequency*Math.pow(2,t)}}),Object.defineProperty(t.FrequencyEnvelope.prototype,"exponent",{get:function(){return this._exp.value},set:function(t){this._exp.value=t}}),t.FrequencyEnvelope.prototype.dispose=function(){return t.ScaledEnvelope.prototype.dispose.call(this),this},t.FrequencyEnvelope}),n(function(t){return t.GreaterThanZero=function(){t.SignalBase.call(this),this._thresh=this.output=new t.WaveShaper(function(t){return t<=0?0:1},127),this._scale=this.input=new t.Multiply(1e4),this._scale.connect(this._thresh)},t.extend(t.GreaterThanZero,t.SignalBase),t.GreaterThanZero.prototype.dispose=function(){return t.SignalBase.prototype.dispose.call(this),this._scale.dispose(),this._scale=null,this._thresh.dispose(),this._thresh=null,this},t.GreaterThanZero}),n(function(t){return t.GreaterThan=function(e){t.Signal.call(this),this.createInsOuts(2,0),this._param=this.input[0]=new t.Subtract(e),this.input[1]=this._param.input[1],this._gtz=this.output=new t.GreaterThanZero,this._param.connect(this._gtz)},t.extend(t.GreaterThan,t.Signal),t.GreaterThan.prototype.dispose=function(){return t.Signal.prototype.dispose.call(this),this._gtz.dispose(),this._gtz=null,this},t.GreaterThan}),n(function(t){return t.Gate=function(){var e=t.defaults(arguments,["threshold","attack","release"],t.Gate);t.AudioNode.call(this),this.createInsOuts(1,1),this._follower=new t.Follower(e.attack,e.release),this._gt=new t.GreaterThan(t.dbToGain(e.threshold)),this.input.connect(this.output),this.input.chain(this._gt,this._follower,this.output.gain)},t.extend(t.Gate,t.AudioNode),t.Gate.defaults={attack:.1,release:.1,threshold:-40},Object.defineProperty(t.Gate.prototype,"threshold",{get:function(){return t.gainToDb(this._gt.value)},set:function(e){this._gt.value=t.dbToGain(e)}}),Object.defineProperty(t.Gate.prototype,"attack",{get:function(){return this._follower.attack},set:function(t){this._follower.attack=t}}),Object.defineProperty(t.Gate.prototype,"release",{get:function(){return this._follower.release},set:function(t){this._follower.release=t}}),t.Gate.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._follower.dispose(),this._gt.dispose(),this._follower=null,this._gt=null,this},t.Gate}),n(function(t){function e(t){return function(e,n){n=this.toSeconds(n),t.apply(this,arguments);var i=this._events.get(n),r=this._events.previousEvent(i),o=this._getTicksUntilEvent(r,n);return i.ticks=Math.max(o,0),this}}return t.TickSignal=function(e){e=t.defaultArg(e,1),t.Signal.call(this,{units:t.Type.Ticks,value:e}),this._events.memory=1/0,this.cancelScheduledValues(0),this._events.add({type:t.Param.AutomationType.SetValue,time:0,value:e})},t.extend(t.TickSignal,t.Signal),t.TickSignal.prototype.setValueAtTime=e(t.Signal.prototype.setValueAtTime),t.TickSignal.prototype.linearRampToValueAtTime=e(t.Signal.prototype.linearRampToValueAtTime),t.TickSignal.prototype.setTargetAtTime=function(t,e,n){e=this.toSeconds(e),this.setRampPoint(e),t=this._fromUnits(t);for(var i=this._events.get(e),r=Math.round(Math.max(1/n,1)),o=0;o<=r;o++){var s=n*o+e,a=this._exponentialApproach(i.time,i.value,t,n,s);this.linearRampToValueAtTime(this._toUnits(a),s)}return this},t.TickSignal.prototype.exponentialRampToValueAtTime=function(t,e){e=this.toSeconds(e),t=this._fromUnits(t);var n=this._events.get(e);null===n&&(n={value:this._initialValue,time:0});for(var i=Math.round(Math.max(10*(e-n.time),1)),r=(e-n.time)/i,o=0;o<=i;o++){var s=r*o+n.time,a=this._exponentialInterpolate(n.time,n.value,e,t,s);this.linearRampToValueAtTime(this._toUnits(a),s)}return this},t.TickSignal.prototype._getTicksUntilEvent=function(e,n){if(null===e)e={ticks:0,time:0};else if(t.isUndef(e.ticks)){var i=this._events.previousEvent(e);e.ticks=this._getTicksUntilEvent(i,e.time)}var r=this.getValueAtTime(e.time),o=this.getValueAtTime(n);return this._events.get(n).time===n&&this._events.get(n).type===t.Param.AutomationType.SetValue&&(o=this.getValueAtTime(n-this.sampleTime)),.5*(n-e.time)*(r+o)+e.ticks},t.TickSignal.prototype.getTicksAtTime=function(t){t=this.toSeconds(t);var e=this._events.get(t);return Math.max(this._getTicksUntilEvent(e,t),0)},t.TickSignal.prototype.getDurationOfTicks=function(t,e){e=this.toSeconds(e);var n=this.getTicksAtTime(e);return this.getTimeOfTick(n+t)-e},t.TickSignal.prototype.getTimeOfTick=function(e){var n=this._events.get(e,"ticks"),i=this._events.getAfter(e,"ticks");if(n&&n.ticks===e)return n.time;if(n&&i&&i.type===t.Param.AutomationType.Linear&&n.value!==i.value){var r=this.getValueAtTime(n.time),o=(this.getValueAtTime(i.time)-r)/(i.time-n.time),s=Math.sqrt(Math.pow(r,2)-2*o*(n.ticks-e)),a=(-r+s)/o;return(a>0?a:(-r-s)/o)+n.time}return n?0===n.value?1/0:n.time+(e-n.ticks)/n.value:e/this._initialValue},t.TickSignal.prototype.ticksToTime=function(e,n){return n=this.toSeconds(n),new t.Time(this.getDurationOfTicks(e,n))},t.TickSignal.prototype.timeToTicks=function(e,n){n=this.toSeconds(n),e=this.toSeconds(e);var i=this.getTicksAtTime(n),r=this.getTicksAtTime(n+e);return new t.Ticks(r-i)},t.TickSignal}),n(function(t){return t.TimelineState=function(e){t.Timeline.call(this),this._initial=e},t.extend(t.TimelineState,t.Timeline),t.TimelineState.prototype.getValueAtTime=function(t){var e=this.get(t);return null!==e?e.state:this._initial},t.TimelineState.prototype.setStateAtTime=function(t,e){return this.add({state:t,time:e}),this},t.TimelineState.prototype.getLastState=function(t,e){e=this.toSeconds(e);for(var n=this._search(e);n>=0;n--){var i=this._timeline[n];if(i.state===t)return i}},t.TimelineState.prototype.getNextState=function(t,e){e=this.toSeconds(e);var n=this._search(e);if(-1!==n)for(var i=n;i<this._timeline.length;i++){var r=this._timeline[i];if(r.state===t)return r}},t.TimelineState}),n(function(t){return t.TickSource=function(){var e=t.defaults(arguments,["frequency"],t.TickSource);this.frequency=new t.TickSignal(e.frequency,t.Type.Frequency),this._readOnly("frequency"),this._state=new t.TimelineState(t.State.Stopped),this._state.setStateAtTime(t.State.Stopped,0),this._tickOffset=new t.Timeline,this.setTicksAtTime(0,0)},t.extend(t.TickSource),t.TickSource.defaults={frequency:1},Object.defineProperty(t.TickSource.prototype,"state",{get:function(){return this._state.getValueAtTime(this.now())}}),t.TickSource.prototype.start=function(e,n){return e=this.toSeconds(e),this._state.getValueAtTime(e)!==t.State.Started&&(this._state.setStateAtTime(t.State.Started,e),t.isDefined(n)&&this.setTicksAtTime(n,e)),this},t.TickSource.prototype.stop=function(e){if(e=this.toSeconds(e),this._state.getValueAtTime(e)===t.State.Stopped){var n=this._state.get(e);n.time>0&&(this._tickOffset.cancel(n.time),this._state.cancel(n.time))}return this._state.cancel(e),this._state.setStateAtTime(t.State.Stopped,e),this.setTicksAtTime(0,e),this},t.TickSource.prototype.pause=function(e){return e=this.toSeconds(e),this._state.getValueAtTime(e)===t.State.Started&&this._state.setStateAtTime(t.State.Paused,e),this},t.TickSource.prototype.cancel=function(t){return t=this.toSeconds(t),this._state.cancel(t),this._tickOffset.cancel(t),this},t.TickSource.prototype.getTicksAtTime=function(e){e=this.toSeconds(e);var n=this._state.getLastState(t.State.Stopped,e),i={state:t.State.Paused,time:e};this._state.add(i);var r=n,o=0;return this._state.forEachBetween(n.time,e+this.sampleTime,function(e){var n=r.time,i=this._tickOffset.get(e.time);i.time>=r.time&&(o=i.ticks,n=i.time),r.state===t.State.Started&&e.state!==t.State.Started&&(o+=this.frequency.getTicksAtTime(e.time)-this.frequency.getTicksAtTime(n)),r=e}.bind(this)),this._state.remove(i),o},Object.defineProperty(t.TickSource.prototype,"ticks",{get:function(){return this.getTicksAtTime(this.now())},set:function(t){this.setTicksAtTime(t,this.now())}}),Object.defineProperty(t.TickSource.prototype,"seconds",{get:function(){return this.getSecondsAtTime(this.now())},set:function(t){var e=this.now(),n=this.frequency.timeToTicks(t,e);this.setTicksAtTime(n,e)}}),t.TickSource.prototype.getSecondsAtTime=function(e){e=this.toSeconds(e);var n=this._state.getLastState(t.State.Stopped,e),i={state:t.State.Paused,time:e};this._state.add(i);var r=n,o=0;return this._state.forEachBetween(n.time,e+this.sampleTime,function(e){var n=r.time,i=this._tickOffset.get(e.time);i.time>=r.time&&(o=i.seconds,n=i.time),r.state===t.State.Started&&e.state!==t.State.Started&&(o+=e.time-n),r=e}.bind(this)),this._state.remove(i),o},t.TickSource.prototype.setTicksAtTime=function(t,e){return e=this.toSeconds(e),this._tickOffset.cancel(e),this._tickOffset.add({time:e,ticks:t,seconds:this.frequency.getDurationOfTicks(t,e)}),this},t.TickSource.prototype.getStateAtTime=function(t){return t=this.toSeconds(t),this._state.getValueAtTime(t)},t.TickSource.prototype.getTimeOfTick=function(e,n){n=t.defaultArg(n,this.now());var i=this._tickOffset.get(n),r=this._state.get(n),o=Math.max(i.time,r.time),s=this.frequency.getTicksAtTime(o)+e-i.ticks;return this.frequency.getTimeOfTick(s)},t.TickSource.prototype.forEachTickBetween=function(e,n,i){var r=this._state.get(e);if(this._state.forEachBetween(e,n,function(n){r.state===t.State.Started&&n.state!==t.State.Started&&this.forEachTickBetween(Math.max(r.time,e),n.time-this.sampleTime,i),r=n}.bind(this)),e=Math.max(r.time,e),r.state===t.State.Started&&this._state){var o=this.frequency.getTicksAtTime(e),s=(o-this.frequency.getTicksAtTime(r.time))%1;0!==s&&(s=1-s);for(var a=this.frequency.getTimeOfTick(o+s),u=null;a<n&&this._state;){try{i(a,Math.round(this.getTicksAtTime(a)))}catch(t){u=t;break}this._state&&(a+=this.frequency.getDurationOfTicks(1,a))}}if(u)throw u;return this},t.TickSource.prototype.dispose=function(){return t.Param.prototype.dispose.call(this),this._state.dispose(),this._state=null,this._tickOffset.dispose(),this._tickOffset=null,this._writable("frequency"),this.frequency.dispose(),this.frequency=null,this},t.TickSource}),n(function(t){return t.Clock=function(){var e=t.defaults(arguments,["callback","frequency"],t.Clock);t.Emitter.call(this),this.callback=e.callback,this._nextTick=0,this._tickSource=new t.TickSource(e.frequency),this._lastUpdate=0,this.frequency=this._tickSource.frequency,this._readOnly("frequency"),this._state=new t.TimelineState(t.State.Stopped),this._state.setStateAtTime(t.State.Stopped,0),this._boundLoop=this._loop.bind(this),this.context.on("tick",this._boundLoop)},t.extend(t.Clock,t.Emitter),t.Clock.defaults={callback:t.noOp,frequency:1},Object.defineProperty(t.Clock.prototype,"state",{get:function(){return this._state.getValueAtTime(this.now())}}),t.Clock.prototype.start=function(e,n){return e=this.toSeconds(e),this._state.getValueAtTime(e)!==t.State.Started&&(this._state.setStateAtTime(t.State.Started,e),this._tickSource.start(e,n),e<this._lastUpdate&&this.emit("start",e,n)),this},t.Clock.prototype.stop=function(e){return e=this.toSeconds(e),this._state.cancel(e),this._state.setStateAtTime(t.State.Stopped,e),this._tickSource.stop(e),e<this._lastUpdate&&this.emit("stop",e),this},t.Clock.prototype.pause=function(e){return e=this.toSeconds(e),this._state.getValueAtTime(e)===t.State.Started&&(this._state.setStateAtTime(t.State.Paused,e),this._tickSource.pause(e),e<this._lastUpdate&&this.emit("pause",e)),this},Object.defineProperty(t.Clock.prototype,"ticks",{get:function(){return Math.ceil(this.getTicksAtTime(this.now()))},set:function(t){this._tickSource.ticks=t}}),Object.defineProperty(t.Clock.prototype,"seconds",{get:function(){return this._tickSource.seconds},set:function(t){this._tickSource.seconds=t}}),t.Clock.prototype.getSecondsAtTime=function(t){return this._tickSource.getSecondsAtTime(t)},t.Clock.prototype.setTicksAtTime=function(t,e){return this._tickSource.setTicksAtTime(t,e),this},t.Clock.prototype.getTicksAtTime=function(t){return this._tickSource.getTicksAtTime(t)},t.Clock.prototype.nextTickTime=function(t,e){e=this.toSeconds(e);var n=this.getTicksAtTime(e);return this._tickSource.getTimeOfTick(n+t,e)},t.Clock.prototype._loop=function(){var e=this._lastUpdate,n=this.now();this._lastUpdate=n,e!==n&&(this._state.forEachBetween(e,n,function(e){switch(e.state){case t.State.Started:var n=this._tickSource.getTicksAtTime(e.time);this.emit("start",e.time,n);break;case t.State.Stopped:0!==e.time&&this.emit("stop",e.time);break;case t.State.Paused:this.emit("pause",e.time)}}.bind(this)),this._tickSource.forEachTickBetween(e,n,function(t,e){this.callback(t,e)}.bind(this)))},t.Clock.prototype.getStateAtTime=function(t){return t=this.toSeconds(t),this._state.getValueAtTime(t)},t.Clock.prototype.dispose=function(){t.Emitter.prototype.dispose.call(this),this.context.off("tick",this._boundLoop),this._writable("frequency"),this._tickSource.dispose(),this._tickSource=null,this.frequency=null,this._boundLoop=null,this._nextTick=1/0,this.callback=null,this._state.dispose(),this._state=null},t.Clock}),n(function(t){t.IntervalTimeline=function(){t.call(this),this._root=null,this._length=0},t.extend(t.IntervalTimeline),t.IntervalTimeline.prototype.add=function(n){if(t.isUndef(n.time)||t.isUndef(n.duration))throw new Error("Tone.IntervalTimeline: events must have time and duration parameters");n.time=n.time.valueOf();var i=new e(n.time,n.time+n.duration,n);for(null===this._root?this._root=i:this._root.insert(i),this._length++;null!==i;)i.updateHeight(),i.updateMax(),this._rebalance(i),i=i.parent;return this},t.IntervalTimeline.prototype.remove=function(t){if(null!==this._root){var e=[];this._root.search(t.time,e);for(var n=0;n<e.length;n++){var i=e[n];if(i.event===t){this._removeNode(i),this._length--;break}}}return this},Object.defineProperty(t.IntervalTimeline.prototype,"length",{get:function(){return this._length}}),t.IntervalTimeline.prototype.cancel=function(t){return this.forEachFrom(t,function(t){this.remove(t)}.bind(this)),this},t.IntervalTimeline.prototype._setRoot=function(t){this._root=t,null!==this._root&&(this._root.parent=null)},t.IntervalTimeline.prototype._replaceNodeInParent=function(t,e){null!==t.parent?(t.isLeftChild()?t.parent.left=e:t.parent.right=e,this._rebalance(t.parent)):this._setRoot(e)},t.IntervalTimeline.prototype._removeNode=function(t){if(null===t.left&&null===t.right)this._replaceNodeInParent(t,null);else if(null===t.right)this._replaceNodeInParent(t,t.left);else if(null===t.left)this._replaceNodeInParent(t,t.right);else{var e,n;if(t.getBalance()>0)if(null===t.left.right)(e=t.left).right=t.right,n=e;else{for(e=t.left.right;null!==e.right;)e=e.right;e.parent.right=e.left,n=e.parent,e.left=t.left,e.right=t.right}else if(null===t.right.left)(e=t.right).left=t.left,n=e;else{for(e=t.right.left;null!==e.left;)e=e.left;e.parent=e.parent,e.parent.left=e.right,n=e.parent,e.left=t.left,e.right=t.right}null!==t.parent?t.isLeftChild()?t.parent.left=e:t.parent.right=e:this._setRoot(e),this._rebalance(n)}t.dispose()},t.IntervalTimeline.prototype._rotateLeft=function(t){var e=t.parent,n=t.isLeftChild(),i=t.right;t.right=i.left,i.left=t,null!==e?n?e.left=i:e.right=i:this._setRoot(i)},t.IntervalTimeline.prototype._rotateRight=function(t){var e=t.parent,n=t.isLeftChild(),i=t.left;t.left=i.right,i.right=t,null!==e?n?e.left=i:e.right=i:this._setRoot(i)},t.IntervalTimeline.prototype._rebalance=function(t){var e=t.getBalance();e>1?t.left.getBalance()<0?this._rotateLeft(t.left):this._rotateRight(t):e<-1&&(t.right.getBalance()>0?this._rotateRight(t.right):this._rotateLeft(t))},t.IntervalTimeline.prototype.get=function(t){if(null!==this._root){var e=[];if(this._root.search(t,e),e.length>0){for(var n=e[0],i=1;i<e.length;i++)e[i].low>n.low&&(n=e[i]);return n.event}}return null},t.IntervalTimeline.prototype.forEach=function(t){if(null!==this._root){var e=[];this._root.traverse(function(t){e.push(t)});for(var n=0;n<e.length;n++){var i=e[n].event;i&&t(i)}}return this},t.IntervalTimeline.prototype.forEachAtTime=function(t,e){if(null!==this._root){var n=[];this._root.search(t,n);for(var i=n.length-1;i>=0;i--){var r=n[i].event;r&&e(r)}}return this},t.IntervalTimeline.prototype.forEachFrom=function(t,e){if(null!==this._root){var n=[];this._root.searchAfter(t,n);for(var i=n.length-1;i>=0;i--)e(n[i].event)}return this},t.IntervalTimeline.prototype.dispose=function(){var t=[];null!==this._root&&this._root.traverse(function(e){t.push(e)});for(var e=0;e<t.length;e++)t[e].dispose();return t=null,this._root=null,this};var e=function(t,e,n){this.event=n,this.low=t,this.high=e,this.max=this.high,this._left=null,this._right=null,this.parent=null,this.height=0};return e.prototype.insert=function(t){t.low<=this.low?null===this.left?this.left=t:this.left.insert(t):null===this.right?this.right=t:this.right.insert(t)},e.prototype.search=function(t,e){t>this.max||(null!==this.left&&this.left.search(t,e),this.low<=t&&this.high>t&&e.push(this),this.low>t||null!==this.right&&this.right.search(t,e))},e.prototype.searchAfter=function(t,e){this.low>=t&&(e.push(this),null!==this.left&&this.left.searchAfter(t,e)),null!==this.right&&this.right.searchAfter(t,e)},e.prototype.traverse=function(t){t(this),null!==this.left&&this.left.traverse(t),null!==this.right&&this.right.traverse(t)},e.prototype.updateHeight=function(){null!==this.left&&null!==this.right?this.height=Math.max(this.left.height,this.right.height)+1:null!==this.right?this.height=this.right.height+1:null!==this.left?this.height=this.left.height+1:this.height=0},e.prototype.updateMax=function(){this.max=this.high,null!==this.left&&(this.max=Math.max(this.max,this.left.max)),null!==this.right&&(this.max=Math.max(this.max,this.right.max))},e.prototype.getBalance=function(){var t=0;return null!==this.left&&null!==this.right?t=this.left.height-this.right.height:null!==this.left?t=this.left.height+1:null!==this.right&&(t=-(this.right.height+1)),t},e.prototype.isLeftChild=function(){return null!==this.parent&&this.parent.left===this},Object.defineProperty(e.prototype,"left",{get:function(){return this._left},set:function(t){this._left=t,null!==t&&(t.parent=this),this.updateHeight(),this.updateMax()}}),Object.defineProperty(e.prototype,"right",{get:function(){return this._right},set:function(t){this._right=t,null!==t&&(t.parent=this),this.updateHeight(),this.updateMax()}}),e.prototype.dispose=function(){this.parent=null,this._left=null,this._right=null,this.event=null},t.IntervalTimeline}),n(function(t){return t.Ticks=function(e,n){if(!(this instanceof t.Ticks))return new t.Ticks(e,n);t.TransportTime.call(this,e,n)},t.extend(t.Ticks,t.TransportTime),t.Ticks.prototype._defaultUnits="i",t.Ticks.prototype._now=function(){return t.Transport.ticks},t.Ticks.prototype._beatsToUnits=function(t){return this._getPPQ()*t},t.Ticks.prototype._secondsToUnits=function(t){return t/(60/this._getBpm())*this._getPPQ()},t.Ticks.prototype._ticksToUnits=function(t){return t},t.Ticks.prototype.toTicks=function(){return this.valueOf()},t.Ticks.prototype.toSeconds=function(){return this.valueOf()/this._getPPQ()*(60/this._getBpm())},t.Ticks}),n(function(t){return t.TransportEvent=function(e,n){n=t.defaultArg(n,t.TransportEvent.defaults),t.call(this),this.Transport=e,this.id=t.TransportEvent._eventId++,this.time=t.Ticks(n.time),this.callback=n.callback,this._once=n.once},t.extend(t.TransportEvent),t.TransportEvent.defaults={once:!1,callback:t.noOp},t.TransportEvent._eventId=0,t.TransportEvent.prototype.invoke=function(t){this.callback&&(this.callback(t),this._once&&this.Transport&&this.Transport.clear(this.id))},t.TransportEvent.prototype.dispose=function(){return t.prototype.dispose.call(this),this.Transport=null,this.callback=null,this.time=null,this},t.TransportEvent}),n(function(t){return t.TransportRepeatEvent=function(e,n){t.TransportEvent.call(this,e,n),n=t.defaultArg(n,t.TransportRepeatEvent.defaults),this.duration=t.Ticks(n.duration),this._interval=t.Ticks(n.interval),this._currentId=-1,this._nextId=-1,this._nextTick=this.time,this._boundRestart=this._restart.bind(this),this.Transport.on("start loopStart",this._boundRestart),this._restart()},t.extend(t.TransportRepeatEvent,t.TransportEvent),t.TransportRepeatEvent.defaults={duration:1/0,interval:1},t.TransportRepeatEvent.prototype.invoke=function(e){this._createEvents(e),t.TransportEvent.prototype.invoke.call(this,e)},t.TransportRepeatEvent.prototype._createEvents=function(e){var n=this.Transport.getTicksAtTime(e);n>=this.time&&n>=this._nextTick&&this._nextTick+this._interval<this.time+this.duration&&(this._nextTick+=this._interval,this._currentId=this._nextId,this._nextId=this.Transport.scheduleOnce(this.invoke.bind(this),t.Ticks(this._nextTick)))},t.TransportRepeatEvent.prototype._restart=function(e){this.Transport.clear(this._currentId),this.Transport.clear(this._nextId),this._nextTick=this.time;var n=this.Transport.getTicksAtTime(e);n>this.time&&(this._nextTick=this.time+Math.ceil((n-this.time)/this._interval)*this._interval),this._currentId=this.Transport.scheduleOnce(this.invoke.bind(this),t.Ticks(this._nextTick)),this._nextTick+=this._interval,this._nextId=this.Transport.scheduleOnce(this.invoke.bind(this),t.Ticks(this._nextTick))},t.TransportRepeatEvent.prototype.dispose=function(){return this.Transport.clear(this._currentId),this.Transport.clear(this._nextId),this.Transport.off("start loopStart",this._boundRestart),this._boundCreateEvents=null,t.TransportEvent.prototype.dispose.call(this),this.duration=null,this._interval=null,this},t.TransportRepeatEvent}),n(function(t){t.Transport=function(){t.Emitter.call(this),t.getContext(function(){this.loop=!1,this._loopStart=0,this._loopEnd=0,this._ppq=e.defaults.PPQ,this._clock=new t.Clock({callback:this._processTick.bind(this),frequency:0}),this._bindClockEvents(),this.bpm=this._clock.frequency,this.bpm._toUnits=this._toUnits.bind(this),this.bpm._fromUnits=this._fromUnits.bind(this),this.bpm.units=t.Type.BPM,this.bpm.value=e.defaults.bpm,this._readOnly("bpm"),this._timeSignature=e.defaults.timeSignature,this._scheduledEvents={},this._timeline=new t.Timeline,this._repeatedEvents=new t.IntervalTimeline,this._syncedSignals=[],this._swingTicks=e.defaults.PPQ/2,this._swingAmount=0}.bind(this))},t.extend(t.Transport,t.Emitter),t.Transport.defaults={bpm:120,swing:0,swingSubdivision:"8n",timeSignature:4,loopStart:0,loopEnd:"4m",PPQ:192},t.Transport.prototype._processTick=function(e,n){if(this._swingAmount>0&&n%this._ppq!=0&&n%(2*this._swingTicks)!=0){var i=n%(2*this._swingTicks)/(2*this._swingTicks),r=Math.sin(i*Math.PI)*this._swingAmount;e+=t.Ticks(2*this._swingTicks/3).toSeconds()*r}this.loop&&n>=this._loopEnd&&(this.emit("loopEnd",e),this._clock.setTicksAtTime(this._loopStart,e),n=this._loopStart,this.emit("loopStart",e,this._clock.getSecondsAtTime(e)),this.emit("loop",e)),this._timeline.forEachAtTime(n,function(t){t.invoke(e)})},t.Transport.prototype.schedule=function(e,n){var i=new t.TransportEvent(this,{time:t.TransportTime(n),callback:e});return this._addEvent(i,this._timeline)},t.Transport.prototype.scheduleRepeat=function(e,n,i,r){var o=new t.TransportRepeatEvent(this,{callback:e,interval:t.Time(n),time:t.TransportTime(i),duration:t.Time(t.defaultArg(r,1/0))});return this._addEvent(o,this._repeatedEvents)},t.Transport.prototype.scheduleOnce=function(e,n){var i=new t.TransportEvent(this,{time:t.TransportTime(n),callback:e,once:!0});return this._addEvent(i,this._timeline)},t.Transport.prototype.clear=function(t){if(this._scheduledEvents.hasOwnProperty(t)){var e=this._scheduledEvents[t.toString()];e.timeline.remove(e.event),e.event.dispose(),delete this._scheduledEvents[t.toString()]}return this},t.Transport.prototype._addEvent=function(t,e){return this._scheduledEvents[t.id.toString()]={event:t,timeline:e},e.add(t),t.id},t.Transport.prototype.cancel=function(e){return e=t.defaultArg(e,0),e=this.toTicks(e),this._timeline.forEachFrom(e,function(t){this.clear(t.id)}.bind(this)),this._repeatedEvents.forEachFrom(e,function(t){this.clear(t.id)}.bind(this)),this},t.Transport.prototype._bindClockEvents=function(){this._clock.on("start",function(e,n){n=t.Ticks(n).toSeconds(),this.emit("start",e,n)}.bind(this)),this._clock.on("stop",function(t){this.emit("stop",t)}.bind(this)),this._clock.on("pause",function(t){this.emit("pause",t)}.bind(this))},Object.defineProperty(t.Transport.prototype,"state",{get:function(){return this._clock.getStateAtTime(this.now())}}),t.Transport.prototype.start=function(e,n){return t.isDefined(n)&&(n=this.toTicks(n)),this._clock.start(e,n),this},t.Transport.prototype.stop=function(t){return this._clock.stop(t),this},t.Transport.prototype.pause=function(t){return this._clock.pause(t),this},t.Transport.prototype.toggle=function(e){return e=this.toSeconds(e),this._clock.getStateAtTime(e)!==t.State.Started?this.start(e):this.stop(e),this},Object.defineProperty(t.Transport.prototype,"timeSignature",{get:function(){return this._timeSignature},set:function(e){t.isArray(e)&&(e=e[0]/e[1]*4),this._timeSignature=e}}),Object.defineProperty(t.Transport.prototype,"loopStart",{get:function(){return t.Ticks(this._loopStart).toSeconds()},set:function(t){this._loopStart=this.toTicks(t)}}),Object.defineProperty(t.Transport.prototype,"loopEnd",{get:function(){return t.Ticks(this._loopEnd).toSeconds()},set:function(t){this._loopEnd=this.toTicks(t)}}),t.Transport.prototype.setLoopPoints=function(t,e){return this.loopStart=t,this.loopEnd=e,this},Object.defineProperty(t.Transport.prototype,"swing",{get:function(){return this._swingAmount},set:function(t){this._swingAmount=t}}),Object.defineProperty(t.Transport.prototype,"swingSubdivision",{get:function(){return t.Ticks(this._swingTicks).toNotation()},set:function(t){this._swingTicks=this.toTicks(t)}}),Object.defineProperty(t.Transport.prototype,"position",{get:function(){var e=this.now(),n=this._clock.getTicksAtTime(e);return t.Ticks(n).toBarsBeatsSixteenths()},set:function(t){var e=this.toTicks(t);this.ticks=e}}),Object.defineProperty(t.Transport.prototype,"seconds",{get:function(){return this._clock.seconds},set:function(t){var e=this.now(),n=this.bpm.timeToTicks(t,e);this.ticks=n}}),Object.defineProperty(t.Transport.prototype,"progress",{get:function(){if(this.loop){var t=this.now();return(this._clock.getTicksAtTime(t)-this._loopStart)/(this._loopEnd-this._loopStart)}return 0}}),Object.defineProperty(t.Transport.prototype,"ticks",{get:function(){return this._clock.ticks},set:function(e){if(this._clock.ticks!==e){var n=this.now();this.state===t.State.Started?(this.emit("stop",n),this._clock.setTicksAtTime(e,n),this.emit("start",n,this.seconds)):this._clock.setTicksAtTime(e,n)}}}),t.Transport.prototype.getTicksAtTime=function(t){return Math.round(this._clock.getTicksAtTime(t))},t.Transport.prototype.getSecondsAtTime=function(t){return this._clock.getSecondsAtTime(t)},Object.defineProperty(t.Transport.prototype,"PPQ",{get:function(){return this._ppq},set:function(t){var e=this.bpm.value;this._ppq=t,this.bpm.value=e}}),t.Transport.prototype._fromUnits=function(t){return 1/(60/t/this.PPQ)},t.Transport.prototype._toUnits=function(t){return t/this.PPQ*60},t.Transport.prototype.nextSubdivision=function(e){if(e=this.toTicks(e),this.state!==t.State.Started)return 0;var n=this.now(),i=e-this.getTicksAtTime(n)%e;return this._clock.nextTickTime(i,n)},t.Transport.prototype.syncSignal=function(e,n){if(!n){var i=this.now();n=0!==e.getValueAtTime(i)?e.getValueAtTime(i)/this.bpm.getValueAtTime(i):0}var r=new t.Gain(n);return this.bpm.chain(r,e._param),this._syncedSignals.push({ratio:r,signal:e,initial:e.value}),e.value=0,this},t.Transport.prototype.unsyncSignal=function(t){for(var e=this._syncedSignals.length-1;e>=0;e--){var n=this._syncedSignals[e];n.signal===t&&(n.ratio.dispose(),n.signal.value=n.initial,this._syncedSignals.splice(e,1))}return this},t.Transport.prototype.dispose=function(){return t.Emitter.prototype.dispose.call(this),this._clock.dispose(),this._clock=null,this._writable("bpm"),this.bpm=null,this._timeline.dispose(),this._timeline=null,this._repeatedEvents.dispose(),this._repeatedEvents=null,this};var e=t.Transport;return t.Transport=new e,t.Context.on("init",function(n){n.Transport instanceof e?t.Transport=n.Transport:t.Transport=new e,n.Transport=t.Transport}),t.Context.on("close",function(t){t.Transport instanceof e&&t.Transport.dispose()}),t.Transport}),n(function(t){return t.Volume=function(){var e=t.defaults(arguments,["volume"],t.Volume);t.AudioNode.call(this),this.output=this.input=new t.Gain(e.volume,t.Type.Decibels),this._unmutedVolume=e.volume,this.volume=this.output.gain,this._readOnly("volume"),this.mute=e.mute},t.extend(t.Volume,t.AudioNode),t.Volume.defaults={volume:0,mute:!1},Object.defineProperty(t.Volume.prototype,"mute",{get:function(){return this.volume.value===-1/0},set:function(t){!this.mute&&t?(this._unmutedVolume=this.volume.value,this.volume.value=-1/0):this.mute&&!t&&(this.volume.value=this._unmutedVolume)}}),t.Volume.prototype.dispose=function(){return this.input.dispose(),t.AudioNode.prototype.dispose.call(this),this._writable("volume"),this.volume.dispose(),this.volume=null,this},t.Volume}),n(function(t){t.Master=function(){t.AudioNode.call(this),t.getContext(function(){this.createInsOuts(1,0),this._volume=this.output=new t.Volume,this.volume=this._volume.volume,this._readOnly("volume"),this.input.chain(this.output,this.context.destination)}.bind(this))},t.extend(t.Master,t.AudioNode),t.Master.defaults={volume:0,mute:!1},Object.defineProperty(t.Master.prototype,"mute",{get:function(){return this._volume.mute},set:function(t){this._volume.mute=t}}),t.Master.prototype.chain=function(){this.input.disconnect(),this.input.chain.apply(this.input,arguments),arguments[arguments.length-1].connect(this.output)},t.Master.prototype.dispose=function(){t.AudioNode.prototype.dispose.call(this),this._writable("volume"),this._volume.dispose(),this._volume=null,this.volume=null},t.AudioNode.prototype.toMaster=function(){return this.connect(t.Master),this},window.AudioNode&&(AudioNode.prototype.toMaster=function(){return this.connect(t.Master),this});var e=t.Master;return t.Master=new e,t.Context.on("init",function(n){n.Master instanceof e?t.Master=n.Master:t.Master=new e,n.Master=t.Master}),t.Context.on("close",function(t){t.Master instanceof e&&t.Master.dispose()}),t.Master}),n(function(t){return t.Source=function(e){e=t.defaultArg(e,t.Source.defaults),t.AudioNode.call(this),this._volume=this.output=new t.Volume(e.volume),this.volume=this._volume.volume,this._readOnly("volume"),this._state=new t.TimelineState(t.State.Stopped),this._state.memory=100,this._synced=!1,this._scheduled=[],this._volume.output.output.channelCount=2,this._volume.output.output.channelCountMode="explicit",this.mute=e.mute},t.extend(t.Source,t.AudioNode),t.Source.defaults={volume:0,mute:!1},Object.defineProperty(t.Source.prototype,"state",{get:function(){return this._synced?t.Transport.state===t.State.Started?this._state.getValueAtTime(t.Transport.seconds):t.State.Stopped:this._state.getValueAtTime(this.now())}}),Object.defineProperty(t.Source.prototype,"mute",{get:function(){return this._volume.mute},set:function(t){this._volume.mute=t}}),t.Source.prototype._start=t.noOp,t.Source.prototype.restart=t.noOp,t.Source.prototype._stop=t.noOp,t.Source.prototype.start=function(e,n,i){if(e=t.isUndef(e)&&this._synced?t.Transport.seconds:this.toSeconds(e),this._state.getValueAtTime(e)===t.State.Started)this._state.cancel(e),this._state.setStateAtTime(t.State.Started,e),this.restart(e,n,i);else if(this._state.setStateAtTime(t.State.Started,e),this._synced){var r=this._state.get(e);r.offset=t.defaultArg(n,0),r.duration=i;var o=t.Transport.schedule(function(t){this._start(t,n,i)}.bind(this),e);this._scheduled.push(o),t.Transport.state===t.State.Started&&this._syncedStart(this.now(),t.Transport.seconds)}else this._start.apply(this,arguments);return this},t.Source.prototype.stop=function(e){if(e=t.isUndef(e)&&this._synced?t.Transport.seconds:this.toSeconds(e),this._synced){var n=t.Transport.schedule(this._stop.bind(this),e);this._scheduled.push(n)}else this._stop.apply(this,arguments);return this._state.cancel(e),this._state.setStateAtTime(t.State.Stopped,e),this},t.Source.prototype.sync=function(){return this._synced=!0,this._syncedStart=function(e,n){if(n>0){var i=this._state.get(n);if(i&&i.state===t.State.Started&&i.time!==n){var r,o=n-this.toSeconds(i.time);i.duration&&(r=this.toSeconds(i.duration)-o),this._start(e,this.toSeconds(i.offset)+o,r)}}}.bind(this),this._syncedStop=function(e){var n=t.Transport.getSecondsAtTime(Math.max(e-this.sampleTime,0));this._state.getValueAtTime(n)===t.State.Started&&this._stop(e)}.bind(this),t.Transport.on("start loopStart",this._syncedStart),t.Transport.on("stop pause loopEnd",this._syncedStop),this},t.Source.prototype.unsync=function(){this._synced&&(t.Transport.off("stop pause loopEnd",this._syncedStop),t.Transport.off("start loopStart",this._syncedStart)),this._synced=!1;for(var e=0;e<this._scheduled.length;e++){var n=this._scheduled[e];t.Transport.clear(n)}return this._scheduled=[],this._state.cancel(0),this},t.Source.prototype.dispose=function(){t.AudioNode.prototype.dispose.call(this),this.unsync(),this._scheduled=null,this._writable("volume"),this._volume.dispose(),this._volume=null,this.volume=null,this._state.dispose(),this._state=null},t.Source}),n(function(t){t.supported&&(AudioBuffer.prototype.copyToChannel||(AudioBuffer.prototype.copyToChannel=function(t,e,n){var i=this.getChannelData(e);n=n||0;for(var r=0;r<i.length;r++)i[r+n]=t[r]},AudioBuffer.prototype.copyFromChannel=function(t,e,n){var i=this.getChannelData(e);n=n||0;for(var r=0;r<t.length;r++)t[r]=i[r+n]}))}),n(function(t){return t.Buffer=function(){var e=t.defaults(arguments,["url","onload","onerror"],t.Buffer);t.call(this),this._buffer=null,this._reversed=e.reverse,this._xhr=null,this._onload=t.noOp,e.url instanceof AudioBuffer||e.url instanceof t.Buffer?(this.set(e.url),e.onload&&(this.loaded?e.onload(this):this._onload=e.onload)):t.isString(e.url)&&this.load(e.url).then(e.onload).catch(e.onerror)},t.extend(t.Buffer),t.Buffer.defaults={url:void 0,reverse:!1,onload:t.noOp,onerror:t.noOp},t.Buffer.prototype.set=function(e){return e instanceof t.Buffer?e.loaded?this._buffer=e.get():e._onload=function(){this.set(e),this._onload(this)}.bind(this):this._buffer=e,this},t.Buffer.prototype.get=function(){return this._buffer},t.Buffer.prototype.load=function(e,n,i){return new Promise(function(r,o){this._xhr=t.Buffer.load(e,function(t){this._xhr=null,this.set(t),r(this),this._onload(this),n&&n(this)}.bind(this),function(t){this._xhr=null,o(t),i&&i(t)}.bind(this))}.bind(this))},t.Buffer.prototype.dispose=function(){return t.prototype.dispose.call(this),this._buffer=null,this._xhr&&(t.Buffer._removeFromDownloadQueue(this._xhr),this._xhr.abort(),this._xhr=null),this},Object.defineProperty(t.Buffer.prototype,"loaded",{get:function(){return this.length>0}}),Object.defineProperty(t.Buffer.prototype,"duration",{get:function(){return this._buffer?this._buffer.duration:0}}),Object.defineProperty(t.Buffer.prototype,"length",{get:function(){return this._buffer?this._buffer.length:0}}),Object.defineProperty(t.Buffer.prototype,"numberOfChannels",{get:function(){return this._buffer?this._buffer.numberOfChannels:0}}),t.Buffer.prototype.fromArray=function(t){var e=t[0].length>0,n=e?t.length:1,i=e?t[0].length:t.length,r=this.context.createBuffer(n,i,this.context.sampleRate);e||1!==n||(t=[t]);for(var o=0;o<n;o++)r.copyToChannel(t[o],o);return this._buffer=r,this},t.Buffer.prototype.toMono=function(e){if(t.isNumber(e))this.fromArray(this.toArray(e));else{for(var n=new Float32Array(this.length),i=this.numberOfChannels,r=0;r<i;r++)for(var o=this.toArray(r),s=0;s<o.length;s++)n[s]+=o[s];n=n.map(function(t){return t/i}),this.fromArray(n)}return this},t.Buffer.prototype.toArray=function(e){if(t.isNumber(e))return this.getChannelData(e);if(1===this.numberOfChannels)return this.toArray(0);for(var n=[],i=0;i<this.numberOfChannels;i++)n[i]=this.getChannelData(i);return n},t.Buffer.prototype.getChannelData=function(t){return this._buffer.getChannelData(t)},t.Buffer.prototype.slice=function(e,n){n=t.defaultArg(n,this.duration);for(var i=Math.floor(this.context.sampleRate*this.toSeconds(e)),r=Math.floor(this.context.sampleRate*this.toSeconds(n)),o=[],s=0;s<this.numberOfChannels;s++)o[s]=this.toArray(s).slice(i,r);return(new t.Buffer).fromArray(o)},t.Buffer.prototype._reverse=function(){if(this.loaded)for(var t=0;t<this.numberOfChannels;t++)Array.prototype.reverse.call(this.getChannelData(t));return this},Object.defineProperty(t.Buffer.prototype,"reverse",{get:function(){return this._reversed},set:function(t){this._reversed!==t&&(this._reversed=t,this._reverse())}}),t.Emitter.mixin(t.Buffer),t.Buffer._downloadQueue=[],t.Buffer.baseUrl="",t.Buffer.fromArray=function(e){return(new t.Buffer).fromArray(e)},t.Buffer.fromUrl=function(e){var n=new t.Buffer;return n.load(e).then(function(){return n})},t.Buffer._removeFromDownloadQueue=function(e){var n=t.Buffer._downloadQueue.indexOf(e);-1!==n&&t.Buffer._downloadQueue.splice(n,1)},t.Buffer.load=function(e,n,i){n=t.defaultArg(n,t.noOp);var r=e.match(/\[(.+\|?)+\]$/);if(r){for(var o=r[1].split("|"),s=o[0],a=0;a<o.length;a++)if(t.Buffer.supportsType(o[a])){s=o[a];break}e=e.replace(r[0],s)}function u(e){if(t.Buffer._removeFromDownloadQueue(c),t.Buffer.emit("error",e),!i)throw e;i(e)}function l(){for(var e=0,n=0;n<t.Buffer._downloadQueue.length;n++)e+=t.Buffer._downloadQueue[n].progress;t.Buffer.emit("progress",e/t.Buffer._downloadQueue.length)}var c=new XMLHttpRequest;return c.open("GET",t.Buffer.baseUrl+e,!0),c.responseType="arraybuffer",c.progress=0,t.Buffer._downloadQueue.push(c),c.addEventListener("load",function(){200===c.status?t.context.decodeAudioData(c.response).then(function(e){c.progress=1,l(),n(e),t.Buffer._removeFromDownloadQueue(c),0===t.Buffer._downloadQueue.length&&t.Buffer.emit("load")}).catch(function(){t.Buffer._removeFromDownloadQueue(c),u("Tone.Buffer: could not decode audio data: "+e)}):u("Tone.Buffer: could not locate file: "+e)}),c.addEventListener("error",u),c.addEventListener("progress",function(t){t.lengthComputable&&(c.progress=t.loaded/t.total*.95,l())}),c.send(),c},t.Buffer.cancelDownloads=function(){return t.Buffer._downloadQueue.slice().forEach(function(e){t.Buffer._removeFromDownloadQueue(e),e.abort()}),t.Buffer},t.Buffer.supportsType=function(t){var e=t.split(".");return e=e[e.length-1],""!==document.createElement("audio").canPlayType("audio/"+e)},t.loaded=function(){var e,n;function i(){t.Buffer.off("load",e),t.Buffer.off("error",n)}return new Promise(function(i,r){e=function(){i()},n=function(){r()},t.Buffer.on("load",e),t.Buffer.on("error",n)}).then(i).catch(function(t){throw i(),new Error(t)})},t.Buffer}),n(function(t){return t.OscillatorNode=function(){var e=t.defaults(arguments,["frequency","type"],t.OscillatorNode);t.AudioNode.call(this,e),this.onended=e.onended,this._startTime=-1,this._stopTime=-1,this._gainNode=this.output=new t.Gain,this._gainNode.gain.setValueAtTime(0,this.context.currentTime),this._oscillator=this.context.createOscillator(),this._oscillator.connect(this._gainNode),this.type=e.type,this.frequency=new t.Param(this._oscillator.frequency,t.Type.Frequency),this.frequency.value=e.frequency,this.detune=new t.Param(this._oscillator.detune,t.Type.Cents),this.detune.value=e.detune,this._gain=1},t.extend(t.OscillatorNode,t.AudioNode),t.OscillatorNode.defaults={frequency:440,detune:0,type:"sine",onended:t.noOp},Object.defineProperty(t.OscillatorNode.prototype,"state",{get:function(){return this.getStateAtTime(this.now())}}),t.OscillatorNode.prototype.getStateAtTime=function(e){return e=this.toSeconds(e),-1!==this._startTime&&e>=this._startTime&&(-1===this._stopTime||e<=this._stopTime)?t.State.Started:t.State.Stopped},t.OscillatorNode.prototype.start=function(t){if(-1!==this._startTime)throw new Error("cannot call OscillatorNode.start more than once");this._startTime=this.toSeconds(t),this._oscillator.start(this._startTime);var e=this.context.currentTime;return this._gainNode.gain.cancelScheduledValues(e),this._gainNode.gain.setValueAtTime(0,e),this._gainNode.gain.setValueAtTime(1,this._startTime),this},t.OscillatorNode.prototype.setPeriodicWave=function(t){return this._oscillator.setPeriodicWave(t),this},t.OscillatorNode.prototype.stop=function(t){return this.cancelStop(),this._stopTime=this.toSeconds(t),this._gainNode.gain.setValueAtTime(0,this._stopTime),this.context.clearTimeout(this._timeout),this._timeout=this.context.setTimeout(function(){this._oscillator.stop(this.now()),this.onended()}.bind(this),this._stopTime-this.now()),this},t.OscillatorNode.prototype.cancelStop=function(){return-1!==this._startTime&&(this._gainNode.gain.cancelScheduledValues(this._startTime+this.sampleTime),this._gainNode.gain.setValueAtTime(1,Math.max(this.now(),this._startTime)),this.context.clearTimeout(this._timeout),this._stopTime=-1),this},Object.defineProperty(t.OscillatorNode.prototype,"type",{get:function(){return this._oscillator.type},set:function(t){this._oscillator.type=t}}),t.OscillatorNode.prototype.dispose=function(){return this.context.clearTimeout(this._timeout),t.AudioNode.prototype.dispose.call(this),this.onended=null,this._oscillator.disconnect(),this._oscillator=null,this._gainNode.dispose(),this._gainNode=null,this.frequency.dispose(),this.frequency=null,this.detune.dispose(),this.detune=null,this},t.OscillatorNode}),n(function(t){return t.Oscillator=function(){var e=t.defaults(arguments,["frequency","type"],t.Oscillator);t.Source.call(this,e),this._oscillator=null,this.frequency=new t.Signal(e.frequency,t.Type.Frequency),this.detune=new t.Signal(e.detune,t.Type.Cents),this._wave=null,this._partials=t.defaultArg(e.partials,[1]),this._phase=e.phase,this._type=null,this.type=e.type,this.phase=this._phase,this._readOnly(["frequency","detune"])},t.extend(t.Oscillator,t.Source),t.Oscillator.defaults={type:"sine",frequency:440,detune:0,phase:0,partials:[]},t.Oscillator.Type={Sine:"sine",Triangle:"triangle",Sawtooth:"sawtooth",Square:"square",Custom:"custom"},t.Oscillator.prototype._start=function(e){this._oscillator=new t.OscillatorNode,this._wave?this._oscillator.setPeriodicWave(this._wave):this._oscillator.type=this._type,this._oscillator.connect(this.output),this.frequency.connect(this._oscillator.frequency),this.detune.connect(this._oscillator.detune),e=this.toSeconds(e),this._oscillator.start(e)},t.Oscillator.prototype._stop=function(t){return this._oscillator&&(t=this.toSeconds(t),this._oscillator.stop(t)),this},t.Oscillator.prototype.restart=function(t){return this._oscillator.cancelStop(),this._state.cancel(this.toSeconds(t)),this},t.Oscillator.prototype.syncFrequency=function(){return t.Transport.syncSignal(this.frequency),this},t.Oscillator.prototype.unsyncFrequency=function(){return t.Transport.unsyncSignal(this.frequency),this},Object.defineProperty(t.Oscillator.prototype,"type",{get:function(){return this._type},set:function(e){var n=[t.Oscillator.Type.Sine,t.Oscillator.Type.Square,t.Oscillator.Type.Triangle,t.Oscillator.Type.Sawtooth].includes(e);if(0===this._phase&&n)this._wave=null,null!==this._oscillator&&this._oscillator.type;else{var i=this._getRealImaginary(e,this._phase),r=this.context.createPeriodicWave(i[0],i[1]);this._wave=r,null!==this._oscillator&&this._oscillator.setPeriodicWave(this._wave)}this._type=e}}),t.Oscillator.prototype._getRealImaginary=function(e,n){var i=2048,r=new Float32Array(i),o=new Float32Array(i),s=1;if(e===t.Oscillator.Type.Custom)i=s=this._partials.length+1;else{var a=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(e);a&&(s=parseInt(a[2])+1,e=a[1],i=s=Math.max(s,2))}for(var u=1;u<i;++u){var l,c=2/(u*Math.PI);switch(e){case t.Oscillator.Type.Sine:l=u<=s?1:0;break;case t.Oscillator.Type.Square:l=1&u?2*c:0;break;case t.Oscillator.Type.Sawtooth:l=c*(1&u?1:-1);break;case t.Oscillator.Type.Triangle:l=1&u?c*c*2*(u-1>>1&1?-1:1):0;break;case t.Oscillator.Type.Custom:l=this._partials[u-1];break;default:throw new TypeError("Tone.Oscillator: invalid type: "+e)}0!==l?(r[u]=-l*Math.sin(n*u),o[u]=l*Math.cos(n*u)):(r[u]=0,o[u]=0)}return[r,o]},t.Oscillator.prototype._inverseFFT=function(t,e,n){for(var i=0,r=t.length,o=0;o<r;o++)i+=t[o]*Math.cos(o*n)+e[o]*Math.sin(o*n);return i},t.Oscillator.prototype._getInitialValue=function(){for(var t=this._getRealImaginary(this._type,0),e=t[0],n=t[1],i=0,r=2*Math.PI,o=0;o<8;o++)i=Math.max(this._inverseFFT(e,n,o/8*r),i);return-this._inverseFFT(e,n,this._phase)/i},Object.defineProperty(t.Oscillator.prototype,"partials",{get:function(){return this._type!==t.Oscillator.Type.Custom?[]:this._partials},set:function(e){this._partials=e,this.type=t.Oscillator.Type.Custom}}),Object.defineProperty(t.Oscillator.prototype,"phase",{get:function(){return this._phase*(180/Math.PI)},set:function(t){this._phase=t*Math.PI/180,this.type=this._type}}),t.Oscillator.prototype.dispose=function(){return t.Source.prototype.dispose.call(this),null!==this._oscillator&&(this._oscillator.dispose(),this._oscillator=null),this._wave=null,this._writable(["frequency","detune"]),this.frequency.dispose(),this.frequency=null,this.detune.dispose(),this.detune=null,this._partials=null,this},t.Oscillator}),n(function(t){return t.AudioToGain=function(){t.SignalBase.call(this),this._norm=this.input=this.output=new t.WaveShaper(function(t){return(t+1)/2})},t.extend(t.AudioToGain,t.SignalBase),t.AudioToGain.prototype.dispose=function(){return t.SignalBase.prototype.dispose.call(this),this._norm.dispose(),this._norm=null,this},t.AudioToGain}),n(function(t){return t.Zero=function(){t.SignalBase.call(this),this._gain=this.input=this.output=new t.Gain,this.context.getConstant(0).connect(this._gain)},t.extend(t.Zero,t.SignalBase),t.Zero.prototype.dispose=function(){return t.SignalBase.prototype.dispose.call(this),this._gain.dispose(),this._gain=null,this},t.Zero}),n(function(t){return t.LFO=function(){var e=t.defaults(arguments,["frequency","min","max"],t.LFO);t.AudioNode.call(this),this._oscillator=new t.Oscillator({frequency:e.frequency,type:e.type}),this.frequency=this._oscillator.frequency,this.amplitude=this._oscillator.volume,this.amplitude.units=t.Type.NormalRange,this.amplitude.value=e.amplitude,this._stoppedSignal=new t.Signal(0,t.Type.AudioRange),this._zeros=new t.Zero,this._stoppedValue=0,this._a2g=new t.AudioToGain,this._scaler=this.output=new t.Scale(e.min,e.max),this._units=t.Type.Default,this.units=e.units,this._oscillator.chain(this._a2g,this._scaler),this._zeros.connect(this._a2g),this._stoppedSignal.connect(this._a2g),this._readOnly(["amplitude","frequency"]),this.phase=e.phase},t.extend(t.LFO,t.AudioNode),t.LFO.defaults={type:"sine",min:0,max:1,phase:0,frequency:"4n",amplitude:1,units:t.Type.Default},t.LFO.prototype.start=function(t){return t=this.toSeconds(t),this._stoppedSignal.setValueAtTime(0,t),this._oscillator.start(t),this},t.LFO.prototype.stop=function(t){return t=this.toSeconds(t),this._stoppedSignal.setValueAtTime(this._stoppedValue,t),this._oscillator.stop(t),this},t.LFO.prototype.sync=function(){return this._oscillator.sync(),this._oscillator.syncFrequency(),this},t.LFO.prototype.unsync=function(){return this._oscillator.unsync(),this._oscillator.unsyncFrequency(),this},Object.defineProperty(t.LFO.prototype,"min",{get:function(){return this._toUnits(this._scaler.min)},set:function(t){t=this._fromUnits(t),this._scaler.min=t}}),Object.defineProperty(t.LFO.prototype,"max",{get:function(){return this._toUnits(this._scaler.max)},set:function(t){t=this._fromUnits(t),this._scaler.max=t}}),Object.defineProperty(t.LFO.prototype,"type",{get:function(){return this._oscillator.type},set:function(t){this._oscillator.type=t,this._stoppedValue=this._oscillator._getInitialValue(),this._stoppedSignal.value=this._stoppedValue}}),Object.defineProperty(t.LFO.prototype,"phase",{get:function(){return this._oscillator.phase},set:function(t){this._oscillator.phase=t,this._stoppedValue=this._oscillator._getInitialValue(),this._stoppedSignal.value=this._stoppedValue}}),Object.defineProperty(t.LFO.prototype,"units",{get:function(){return this._units},set:function(t){var e=this.min,n=this.max;this._units=t,this.min=e,this.max=n}}),Object.defineProperty(t.LFO.prototype,"mute",{get:function(){return this._oscillator.mute},set:function(t){this._oscillator.mute=t}}),Object.defineProperty(t.LFO.prototype,"state",{get:function(){return this._oscillator.state}}),t.LFO.prototype.connect=function(e){return e.constructor!==t.Signal&&e.constructor!==t.Param||(this.convert=e.convert,this.units=e.units),t.SignalBase.prototype.connect.apply(this,arguments),this},t.LFO.prototype._fromUnits=t.Param.prototype._fromUnits,t.LFO.prototype._toUnits=t.Param.prototype._toUnits,t.LFO.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._writable(["amplitude","frequency"]),this._oscillator.dispose(),this._oscillator=null,this._stoppedSignal.dispose(),this._stoppedSignal=null,this._zeros.dispose(),this._zeros=null,this._scaler.dispose(),this._scaler=null,this._a2g.dispose(),this._a2g=null,this.frequency=null,this.amplitude=null,this},t.LFO}),n(function(t){return t.Limiter=function(){var e=t.defaults(arguments,["threshold"],t.Limiter);t.AudioNode.call(this),this._compressor=this.input=this.output=new t.Compressor({attack:.001,decay:.001,threshold:e.threshold}),this.threshold=this._compressor.threshold,this._readOnly("threshold")},t.extend(t.Limiter,t.AudioNode),t.Limiter.defaults={threshold:-12},t.Limiter.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._compressor.dispose(),this._compressor=null,this._writable("threshold"),this.threshold=null,this},t.Limiter}),n(function(t){return t.LowpassCombFilter=function(){var e=t.defaults(arguments,["delayTime","resonance","dampening"],t.LowpassCombFilter);t.AudioNode.call(this),this.createInsOuts(1,1),this._delay=this.input=new t.Delay(e.delayTime),this.delayTime=this._delay.delayTime,this._lowpass=this.output=this.context.createBiquadFilter(),this._lowpass.Q.value=-3.0102999566398125,this._lowpass.type="lowpass",this.dampening=new t.Param({param:this._lowpass.frequency,units:t.Type.Frequency,value:e.dampening}),this._feedback=new t.Gain(e.resonance,t.Type.NormalRange),this.resonance=this._feedback.gain,this._delay.chain(this._lowpass,this._feedback,this._delay),this._readOnly(["dampening","resonance","delayTime"])},t.extend(t.LowpassCombFilter,t.AudioNode),t.LowpassCombFilter.defaults={delayTime:.1,resonance:.5,dampening:3e3},t.LowpassCombFilter.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._writable(["dampening","resonance","delayTime"]),this.dampening.dispose(),this.dampening=null,this.resonance.dispose(),this.resonance=null,this._delay.dispose(),this._delay=null,this.delayTime=null,this._lowpass.disconnect(),this._lowpass=null,this._feedback.disconnect(),this._feedback=null,this},t.LowpassCombFilter}),n(function(t){return t.Merge=function(){t.AudioNode.call(this),this.createInsOuts(2,0),this.left=this.input[0]=new t.Gain,this.right=this.input[1]=new t.Gain,this._merger=this.output=this.context.createChannelMerger(2),this.left.connect(this._merger,0,0),this.right.connect(this._merger,0,1),this.left.channelCount=1,this.right.channelCount=1,this.left.channelCountMode="explicit",this.right.channelCountMode="explicit"},t.extend(t.Merge,t.AudioNode),t.Merge.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this.left.dispose(),this.left=null,this.right.dispose(),this.right=null,this._merger.disconnect(),this._merger=null,this},t.Merge}),n(function(t){return t.Meter=function(){var e=t.defaults(arguments,["smoothing"],t.Meter);t.AudioNode.call(this),this.input=this.output=this._analyser=new t.Analyser("waveform",1024),this.smoothing=e.smoothing},t.extend(t.Meter,t.AudioNode),t.Meter.defaults={smoothing:.8},t.Meter.prototype.getLevel=function(){this._analyser.type="fft";var t=this._analyser.getValue();return Math.max.apply(this,t)+28},t.Meter.prototype.getValue=function(){return this._analyser.type="waveform",this._analyser.getValue()[0]},Object.defineProperty(t.Meter.prototype,"smoothing",{get:function(){return this._analyser.smoothing},set:function(t){this._analyser.smoothing=t}}),t.Meter.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._analyser.dispose(),this._analyser=null,this},t.Meter}),n(function(t){return t.Split=function(){t.AudioNode.call(this),this.createInsOuts(0,2),this._splitter=this.input=this.context.createChannelSplitter(2),this._splitter.channelCount=2,this._splitter.channelCountMode="explicit",this.left=this.output[0]=new t.Gain,this.right=this.output[1]=new t.Gain,this._splitter.connect(this.left,0,0),this._splitter.connect(this.right,1,0)},t.extend(t.Split,t.AudioNode),t.Split.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._splitter.disconnect(),this.left.dispose(),this.left=null,this.right.dispose(),this.right=null,this._splitter=null,this},t.Split}),n(function(t){return t.MidSideSplit=function(){t.AudioNode.call(this),this.createInsOuts(0,2),this._split=this.input=new t.Split,this._midAdd=new t.Add,this.mid=this.output[0]=new t.Multiply(Math.SQRT1_2),this._sideSubtract=new t.Subtract,this.side=this.output[1]=new t.Multiply(Math.SQRT1_2),this._split.connect(this._midAdd,0,0),this._split.connect(this._midAdd,1,1),this._split.connect(this._sideSubtract,0,0),this._split.connect(this._sideSubtract,1,1),this._midAdd.connect(this.mid),this._sideSubtract.connect(this.side)},t.extend(t.MidSideSplit,t.AudioNode),t.MidSideSplit.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this.mid.dispose(),this.mid=null,this.side.dispose(),this.side=null,this._midAdd.dispose(),this._midAdd=null,this._sideSubtract.dispose(),this._sideSubtract=null,this._split.dispose(),this._split=null,this},t.MidSideSplit}),n(function(t){return t.MidSideMerge=function(){t.AudioNode.call(this),this.createInsOuts(2,0),this.mid=this.input[0]=new t.Gain,this._left=new t.Add,this._timesTwoLeft=new t.Multiply(Math.SQRT1_2),this.side=this.input[1]=new t.Gain,this._right=new t.Subtract,this._timesTwoRight=new t.Multiply(Math.SQRT1_2),this._merge=this.output=new t.Merge,this.mid.connect(this._left,0,0),this.side.connect(this._left,0,1),this.mid.connect(this._right,0,0),this.side.connect(this._right,0,1),this._left.connect(this._timesTwoLeft),this._right.connect(this._timesTwoRight),this._timesTwoLeft.connect(this._merge,0,0),this._timesTwoRight.connect(this._merge,0,1)},t.extend(t.MidSideMerge,t.AudioNode),t.MidSideMerge.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this.mid.dispose(),this.mid=null,this.side.dispose(),this.side=null,this._left.dispose(),this._left=null,this._timesTwoLeft.dispose(),this._timesTwoLeft=null,this._right.dispose(),this._right=null,this._timesTwoRight.dispose(),this._timesTwoRight=null,this._merge.dispose(),this._merge=null,this},t.MidSideMerge}),n(function(t){return t.MidSideCompressor=function(e){t.AudioNode.call(this),e=t.defaultArg(e,t.MidSideCompressor.defaults),this._midSideSplit=this.input=new t.MidSideSplit,this._midSideMerge=this.output=new t.MidSideMerge,this.mid=new t.Compressor(e.mid),this.side=new t.Compressor(e.side),this._midSideSplit.mid.chain(this.mid,this._midSideMerge.mid),this._midSideSplit.side.chain(this.side,this._midSideMerge.side),this._readOnly(["mid","side"])},t.extend(t.MidSideCompressor,t.AudioNode),t.MidSideCompressor.defaults={mid:{ratio:3,threshold:-24,release:.03,attack:.02,knee:16},side:{ratio:6,threshold:-30,release:.25,attack:.03,knee:10}},t.MidSideCompressor.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._writable(["mid","side"]),this.mid.dispose(),this.mid=null,this.side.dispose(),this.side=null,this._midSideSplit.dispose(),this._midSideSplit=null,this._midSideMerge.dispose(),this._midSideMerge=null,this},t.MidSideCompressor}),n(function(t){return t.Mono=function(){t.AudioNode.call(this),this.createInsOuts(1,0),this._merge=this.output=new t.Merge,this.input.connect(this._merge,0,0),this.input.connect(this._merge,0,1)},t.extend(t.Mono,t.AudioNode),t.Mono.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._merge.dispose(),this._merge=null,this},t.Mono}),n(function(t){return t.MultibandCompressor=function(e){t.AudioNode.call(this),e=t.defaultArg(arguments,t.MultibandCompressor.defaults),this._splitter=this.input=new t.MultibandSplit({lowFrequency:e.lowFrequency,highFrequency:e.highFrequency}),this.lowFrequency=this._splitter.lowFrequency,this.highFrequency=this._splitter.highFrequency,this.output=new t.Gain,this.low=new t.Compressor(e.low),this.mid=new t.Compressor(e.mid),this.high=new t.Compressor(e.high),this._splitter.low.chain(this.low,this.output),this._splitter.mid.chain(this.mid,this.output),this._splitter.high.chain(this.high,this.output),this._readOnly(["high","mid","low","highFrequency","lowFrequency"])},t.extend(t.MultibandCompressor,t.AudioNode),t.MultibandCompressor.defaults={low:t.Compressor.defaults,mid:t.Compressor.defaults,high:t.Compressor.defaults,lowFrequency:250,highFrequency:2e3},t.MultibandCompressor.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._splitter.dispose(),this._writable(["high","mid","low","highFrequency","lowFrequency"]),this.low.dispose(),this.mid.dispose(),this.high.dispose(),this._splitter=null,this.low=null,this.mid=null,this.high=null,this.lowFrequency=null,this.highFrequency=null,this},t.MultibandCompressor}),n(function(t){if(t.supported&&!window.StereoPannerNode){var e=function(e){this.context=e,this.pan=new t.Signal(0,t.Type.AudioRange);var n=new t.WaveShaper(function(e){return t.equalPowerScale((e+1)/2)},4096),i=new t.WaveShaper(function(e){return t.equalPowerScale(1-(e+1)/2)},4096),r=new t.Gain,o=new t.Gain,s=this.input=new t.Split;(new t.Zero).fan(n,i);var a=this.output=new t.Merge;s.left.chain(r,a.left),s.right.chain(o,a.right),this.pan.chain(i,r.gain),this.pan.chain(n,o.gain)};e.prototype.disconnect=function(){this.output.disconnect.apply(this.output,arguments)},e.prototype.connect=function(){this.output.connect.apply(this.output,arguments)},AudioContext.prototype.createStereoPanner=function(){return new e(this)},t.Context.prototype.createStereoPanner=function(){return new e(this)}}}),n(function(t){return t.Panner=function(e){t.AudioNode.call(this),this._panner=this.input=this.output=this.context.createStereoPanner(),this.pan=this._panner.pan,this.pan.value=t.defaultArg(e,0),this._readOnly("pan")},t.extend(t.Panner,t.AudioNode),t.Panner.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._writable("pan"),this._panner.disconnect(),this._panner=null,this.pan=null,this},t.Panner}),n(function(t){return t.Panner3D=function(){var e=t.defaults(arguments,["positionX","positionY","positionZ"],t.Panner3D);t.AudioNode.call(this),this._panner=this.input=this.output=this.context.createPanner(),this._panner.panningModel=e.panningModel,this._panner.maxDistance=e.maxDistance,this._panner.distanceModel=e.distanceModel,this._panner.coneOuterGain=e.coneOuterGain,this._panner.coneOuterAngle=e.coneOuterAngle,this._panner.coneInnerAngle=e.coneInnerAngle,this._panner.refDistance=e.refDistance,this._panner.rolloffFactor=e.rolloffFactor,this._orientation=[e.orientationX,e.orientationY,e.orientationZ],this._position=[e.positionX,e.positionY,e.positionZ],this.orientationX=e.orientationX,this.orientationY=e.orientationY,this.orientationZ=e.orientationZ,this.positionX=e.positionX,this.positionY=e.positionY,this.positionZ=e.positionZ},t.extend(t.Panner3D,t.AudioNode),t.Panner3D.defaults={positionX:0,positionY:0,positionZ:0,orientationX:0,orientationY:0,orientationZ:0,panningModel:"equalpower",maxDistance:1e4,distanceModel:"inverse",coneOuterGain:0,coneOuterAngle:360,coneInnerAngle:360,refDistance:1,rolloffFactor:1},t.Panner3D.prototype._rampTimeConstant=.01,t.Panner3D.prototype.setPosition=function(t,e,n){if(this._panner.positionX){var i=this.now();this._panner.positionX.setTargetAtTime(t,i,this._rampTimeConstant),this._panner.positionY.setTargetAtTime(e,i,this._rampTimeConstant),this._panner.positionZ.setTargetAtTime(n,i,this._rampTimeConstant)}else this._panner.setPosition(t,e,n);return this._position=Array.prototype.slice.call(arguments),this},t.Panner3D.prototype.setOrientation=function(t,e,n){if(this._panner.orientationX){var i=this.now();this._panner.orientationX.setTargetAtTime(t,i,this._rampTimeConstant),this._panner.orientationY.setTargetAtTime(e,i,this._rampTimeConstant),this._panner.orientationZ.setTargetAtTime(n,i,this._rampTimeConstant)}else this._panner.setOrientation(t,e,n);return this._orientation=Array.prototype.slice.call(arguments),this},Object.defineProperty(t.Panner3D.prototype,"positionX",{set:function(t){this._position[0]=t,this.setPosition.apply(this,this._position)},get:function(){return this._position[0]}}),Object.defineProperty(t.Panner3D.prototype,"positionY",{set:function(t){this._position[1]=t,this.setPosition.apply(this,this._position)},get:function(){return this._position[1]}}),Object.defineProperty(t.Panner3D.prototype,"positionZ",{set:function(t){this._position[2]=t,this.setPosition.apply(this,this._position)},get:function(){return this._position[2]}}),Object.defineProperty(t.Panner3D.prototype,"orientationX",{set:function(t){this._orientation[0]=t,this.setOrientation.apply(this,this._orientation)},get:function(){return this._orientation[0]}}),Object.defineProperty(t.Panner3D.prototype,"orientationY",{set:function(t){this._orientation[1]=t,this.setOrientation.apply(this,this._orientation)},get:function(){return this._orientation[1]}}),Object.defineProperty(t.Panner3D.prototype,"orientationZ",{set:function(t){this._orientation[2]=t,this.setOrientation.apply(this,this._orientation)},get:function(){return this._orientation[2]}}),t.Panner3D._aliasProperty=function(e){Object.defineProperty(t.Panner3D.prototype,e,{set:function(t){this._panner[e]=t},get:function(){return this._panner[e]}})},t.Panner3D._aliasProperty("panningModel"),t.Panner3D._aliasProperty("refDistance"),t.Panner3D._aliasProperty("rolloffFactor"),t.Panner3D._aliasProperty("distanceModel"),t.Panner3D._aliasProperty("coneInnerAngle"),t.Panner3D._aliasProperty("coneOuterAngle"),t.Panner3D._aliasProperty("coneOuterGain"),t.Panner3D._aliasProperty("maxDistance"),t.Panner3D.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._panner.disconnect(),this._panner=null,this._orientation=null,this._position=null,this},t.Panner3D}),n(function(t){return t.PanVol=function(){var e=t.defaults(arguments,["pan","volume"],t.PanVol);t.AudioNode.call(this),this._panner=this.input=new t.Panner(e.pan),this.pan=this._panner.pan,this._volume=this.output=new t.Volume(e.volume),this.volume=this._volume.volume,this._panner.connect(this._volume),this.mute=e.mute,this._readOnly(["pan","volume"])},t.extend(t.PanVol,t.AudioNode),t.PanVol.defaults={pan:0,volume:0,mute:!1},Object.defineProperty(t.PanVol.prototype,"mute",{get:function(){return this._volume.mute},set:function(t){this._volume.mute=t}}),t.PanVol.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._writable(["pan","volume"]),this._panner.dispose(),this._panner=null,this.pan=null,this._volume.dispose(),this._volume=null,this.volume=null,this},t.PanVol}),n(function(t){return t.Solo=function(){var e=t.defaults(arguments,["solo"],t.Solo);t.AudioNode.call(this),this.input=this.output=new t.Gain,this._soloBind=this._soloed.bind(this),this.context.on("solo",this._soloBind),this.solo=e.solo},t.extend(t.Solo,t.AudioNode),t.Solo.defaults={solo:!1},Object.defineProperty(t.Solo.prototype,"solo",{get:function(){return this._isSoloed()},set:function(t){t?this._addSolo():this._removeSolo(),this.context.emit("solo",this)}}),Object.defineProperty(t.Solo.prototype,"muted",{get:function(){return 0===this.input.gain.value}}),t.Solo.prototype._addSolo=function(){t.isArray(this.context._currentSolo)||(this.context._currentSolo=[]),this._isSoloed()||this.context._currentSolo.push(this)},t.Solo.prototype._removeSolo=function(){if(this._isSoloed()){var t=this.context._currentSolo.indexOf(this);this.context._currentSolo.splice(t,1)}},t.Solo.prototype._isSoloed=function(){return!!t.isArray(this.context._currentSolo)&&0!==this.context._currentSolo.length&&-1!==this.context._currentSolo.indexOf(this)},t.Solo.prototype._noSolos=function(){return!t.isArray(this.context._currentSolo)||0===this.context._currentSolo.length},t.Solo.prototype._soloed=function(){this._isSoloed()?this.input.gain.value=1:this._noSolos()?this.input.gain.value=1:this.input.gain.value=0},t.Solo.prototype.dispose=function(){return this.context.off("solo",this._soloBind),this._removeSolo(),this._soloBind=null,t.AudioNode.prototype.dispose.call(this),this},t.Solo}),n(function(t){return t.Waveform=function(){var e=t.defaults(arguments,["size"],t.Waveform);e.type=t.Analyser.Type.Waveform,t.AudioNode.call(this),this._analyser=this.input=this.output=new t.Analyser(e)},t.extend(t.Waveform,t.AudioNode),t.Waveform.defaults={size:1024},t.Waveform.prototype.getValue=function(){return this._analyser.getValue()},Object.defineProperty(t.Waveform.prototype,"size",{get:function(){return this._analyser.size},set:function(t){this._analyser.size=t}}),t.Waveform.prototype.dispose=function(){t.AudioNode.prototype.dispose.call(this),this._analyser.dispose(),this._analyser=null},t.Waveform}),n(function(t){return t.CtrlInterpolate=function(){var e=t.defaults(arguments,["values","index"],t.CtrlInterpolate);t.call(this),this.values=e.values,this.index=e.index},t.extend(t.CtrlInterpolate),t.CtrlInterpolate.defaults={index:0,values:[]},Object.defineProperty(t.CtrlInterpolate.prototype,"value",{get:function(){var t=this.index;t=Math.min(t,this.values.length-1);var e=Math.floor(t),n=this.values[e],i=this.values[Math.ceil(t)];return this._interpolate(t-e,n,i)}}),t.CtrlInterpolate.prototype._interpolate=function(e,n,i){if(t.isArray(n)){for(var r=[],o=0;o<n.length;o++)r[o]=this._interpolate(e,n[o],i[o]);return r}if(t.isObject(n)){var s={};for(var a in n)s[a]=this._interpolate(e,n[a],i[a]);return s}return(1-e)*(n=this._toNumber(n))+e*(i=this._toNumber(i))},t.CtrlInterpolate.prototype._toNumber=function(e){return t.isNumber(e)?e:this.toSeconds(e)},t.CtrlInterpolate.prototype.dispose=function(){this.values=null},t.CtrlInterpolate}),n(function(t){return t.CtrlMarkov=function(e,n){t.call(this),this.values=t.defaultArg(e,{}),this.value=t.defaultArg(n,Object.keys(this.values)[0])},t.extend(t.CtrlMarkov),t.CtrlMarkov.prototype.next=function(){if(this.values.hasOwnProperty(this.value)){var e=this.values[this.value];if(t.isArray(e))for(var n=this._getProbDistribution(e),i=Math.random(),r=0,o=0;o<n.length;o++){var s=n[o];if(i>r&&i<r+s){var a=e[o];t.isObject(a)?this.value=a.value:this.value=a}r+=s}else this.value=e}return this.value},t.CtrlMarkov.prototype._getProbDistribution=function(e){for(var n=[],i=0,r=!1,o=0;o<e.length;o++){var s=e[o];t.isObject(s)?(r=!0,n[o]=s.probability):n[o]=1/e.length,i+=n[o]}if(r)for(var a=0;a<n.length;a++)n[a]=n[a]/i;return n},t.CtrlMarkov.prototype.dispose=function(){this.values=null},t.CtrlMarkov}),n(function(t){return t.CtrlPattern=function(){var e=t.defaults(arguments,["values","type"],t.CtrlPattern);t.call(this),this.values=e.values,this.index=0,this._type=null,this._shuffled=null,this._direction=null,this.type=e.type},t.extend(t.CtrlPattern),t.CtrlPattern.Type={Up:"up",Down:"down",UpDown:"upDown",DownUp:"downUp",AlternateUp:"alternateUp",AlternateDown:"alternateDown",Random:"random",RandomWalk:"randomWalk",RandomOnce:"randomOnce"},t.CtrlPattern.defaults={type:t.CtrlPattern.Type.Up,values:[]},Object.defineProperty(t.CtrlPattern.prototype,"value",{get:function(){if(0!==this.values.length){if(1===this.values.length)return this.values[0];this.index=Math.min(this.index,this.values.length-1);var e=this.values[this.index];return this.type===t.CtrlPattern.Type.RandomOnce&&(this.values.length!==this._shuffled.length&&this._shuffleValues(),e=this.values[this._shuffled[this.index]]),e}}}),Object.defineProperty(t.CtrlPattern.prototype,"type",{get:function(){return this._type},set:function(e){this._type=e,this._shuffled=null,this._type===t.CtrlPattern.Type.Up||this._type===t.CtrlPattern.Type.UpDown||this._type===t.CtrlPattern.Type.RandomOnce||this._type===t.CtrlPattern.Type.AlternateUp?this.index=0:this._type!==t.CtrlPattern.Type.Down&&this._type!==t.CtrlPattern.Type.DownUp&&this._type!==t.CtrlPattern.Type.AlternateDown||(this.index=this.values.length-1),this._type===t.CtrlPattern.Type.UpDown||this._type===t.CtrlPattern.Type.AlternateUp?this._direction=t.CtrlPattern.Type.Up:this._type!==t.CtrlPattern.Type.DownUp&&this._type!==t.CtrlPattern.Type.AlternateDown||(this._direction=t.CtrlPattern.Type.Down),this._type===t.CtrlPattern.Type.RandomOnce?this._shuffleValues():this._type===t.CtrlPattern.Random&&(this.index=Math.floor(Math.random()*this.values.length))}}),t.CtrlPattern.prototype.next=function(){var e=this.type;return e===t.CtrlPattern.Type.Up?(this.index++,this.index>=this.values.length&&(this.index=0)):e===t.CtrlPattern.Type.Down?(this.index--,this.index<0&&(this.index=this.values.length-1)):e===t.CtrlPattern.Type.UpDown||e===t.CtrlPattern.Type.DownUp?(this._direction===t.CtrlPattern.Type.Up?this.index++:this.index--,this.index<0?(this.index=1,this._direction=t.CtrlPattern.Type.Up):this.index>=this.values.length&&(this.index=this.values.length-2,this._direction=t.CtrlPattern.Type.Down)):e===t.CtrlPattern.Type.Random?this.index=Math.floor(Math.random()*this.values.length):e===t.CtrlPattern.Type.RandomWalk?Math.random()<.5?(this.index--,this.index=Math.max(this.index,0)):(this.index++,this.index=Math.min(this.index,this.values.length-1)):e===t.CtrlPattern.Type.RandomOnce?(this.index++,this.index>=this.values.length&&(this.index=0,this._shuffleValues())):e===t.CtrlPattern.Type.AlternateUp?(this._direction===t.CtrlPattern.Type.Up?(this.index+=2,this._direction=t.CtrlPattern.Type.Down):(this.index-=1,this._direction=t.CtrlPattern.Type.Up),this.index>=this.values.length&&(this.index=0,this._direction=t.CtrlPattern.Type.Up)):e===t.CtrlPattern.Type.AlternateDown&&(this._direction===t.CtrlPattern.Type.Up?(this.index+=1,this._direction=t.CtrlPattern.Type.Down):(this.index-=2,this._direction=t.CtrlPattern.Type.Up),this.index<0&&(this.index=this.values.length-1,this._direction=t.CtrlPattern.Type.Down)),this.value},t.CtrlPattern.prototype._shuffleValues=function(){var t=[];this._shuffled=[];for(var e=0;e<this.values.length;e++)t[e]=e;for(;t.length>0;){var n=t.splice(Math.floor(t.length*Math.random()),1);this._shuffled.push(n[0])}},t.CtrlPattern.prototype.dispose=function(){this._shuffled=null,this.values=null},t.CtrlPattern}),n(function(t){return t.CtrlRandom=function(){var e=t.defaults(arguments,["min","max"],t.CtrlRandom);t.call(this),this.min=e.min,this.max=e.max,this.integer=e.integer},t.extend(t.CtrlRandom),t.CtrlRandom.defaults={min:0,max:1,integer:!1},Object.defineProperty(t.CtrlRandom.prototype,"value",{get:function(){var t=this.toSeconds(this.min),e=this.toSeconds(this.max),n=Math.random(),i=n*t+(1-n)*e;return this.integer&&(i=Math.floor(i)),i}}),t.CtrlRandom}),n(function(t){return t.Buffers=function(e){var n=Array.prototype.slice.call(arguments);n.shift();var i=t.defaults(n,["onload","baseUrl"],t.Buffers);for(var r in t.call(this),this._buffers={},this.baseUrl=i.baseUrl,this._loadingCount=0,e)this._loadingCount++,this.add(r,e[r],this._bufferLoaded.bind(this,i.onload))},t.extend(t.Buffers),t.Buffers.defaults={onload:t.noOp,baseUrl:""},t.Buffers.prototype.has=function(t){return this._buffers.hasOwnProperty(t)},t.Buffers.prototype.get=function(t){if(this.has(t))return this._buffers[t];throw new Error("Tone.Buffers: no buffer named "+t)},t.Buffers.prototype._bufferLoaded=function(t){this._loadingCount--,0===this._loadingCount&&t&&t(this)},Object.defineProperty(t.Buffers.prototype,"loaded",{get:function(){var t=!0;for(var e in this._buffers){var n=this.get(e);t=t&&n.loaded}return t}}),t.Buffers.prototype.add=function(e,n,i){return i=t.defaultArg(i,t.noOp),n instanceof t.Buffer?(this._buffers[e]=n,i(this)):n instanceof AudioBuffer?(this._buffers[e]=new t.Buffer(n),i(this)):t.isString(n)&&(this._buffers[e]=new t.Buffer(this.baseUrl+n,i)),this},t.Buffers.prototype.dispose=function(){for(var e in t.prototype.dispose.call(this),this._buffers)this._buffers[e].dispose();return this._buffers=null,this},t.Buffers}),n(function(t){var e={};return t.prototype.send=function(n,i){e.hasOwnProperty(n)||(e[n]=this.context.createGain()),i=t.defaultArg(i,0);var r=new t.Gain(i,t.Type.Decibels);return this.connect(r),r.connect(e[n]),r},t.prototype.receive=function(t,n){return e.hasOwnProperty(t)||(e[t]=this.context.createGain()),e[t].connect(this,0,n),this},t.Context.on("init",function(t){t.Buses?e=t.Buses:(e={},t.Buses=e)}),t}),n(function(t){return t.Draw=function(){t.call(this),this._events=new t.Timeline,this.expiration=.25,this.anticipation=.008,this._boundDrawLoop=this._drawLoop.bind(this)},t.extend(t.Draw),t.Draw.prototype.schedule=function(t,e){return this._events.add({callback:t,time:this.toSeconds(e)}),1===this._events.length&&requestAnimationFrame(this._boundDrawLoop),this},t.Draw.prototype.cancel=function(t){return this._events.cancel(this.toSeconds(t)),this},t.Draw.prototype._drawLoop=function(){for(var e=t.now();this._events.length&&this._events.peek().time-this.anticipation<=e;){var n=this._events.shift();e-n.time<=this.expiration&&n.callback()}this._events.length>0&&requestAnimationFrame(this._boundDrawLoop)},t.Draw=new t.Draw,t.Draw}),n(function(t){t.Listener=function(){t.call(this),this._orientation=[0,0,0,0,0,0],this._position=[0,0,0],t.getContext(function(){this.set(e.defaults)}.bind(this))},t.extend(t.Listener),t.Listener.defaults={positionX:0,positionY:0,positionZ:0,forwardX:0,forwardY:0,forwardZ:1,upX:0,upY:1,upZ:0},t.Listener.prototype._rampTimeConstant=.01,t.Listener.prototype.setPosition=function(t,e,n){if(this.context.listener.positionX){var i=this.now();this.context.listener.positionX.setTargetAtTime(t,i,this._rampTimeConstant),this.context.listener.positionY.setTargetAtTime(e,i,this._rampTimeConstant),this.context.listener.positionZ.setTargetAtTime(n,i,this._rampTimeConstant)}else this.context.listener.setPosition(t,e,n);return this._position=Array.prototype.slice.call(arguments),this},t.Listener.prototype.setOrientation=function(t,e,n,i,r,o){if(this.context.listener.forwardX){var s=this.now();this.context.listener.forwardX.setTargetAtTime(t,s,this._rampTimeConstant),this.context.listener.forwardY.setTargetAtTime(e,s,this._rampTimeConstant),this.context.listener.forwardZ.setTargetAtTime(n,s,this._rampTimeConstant),this.context.listener.upX.setTargetAtTime(i,s,this._rampTimeConstant),this.context.listener.upY.setTargetAtTime(r,s,this._rampTimeConstant),this.context.listener.upZ.setTargetAtTime(o,s,this._rampTimeConstant)}else this.context.listener.setOrientation(t,e,n,i,r,o);return this._orientation=Array.prototype.slice.call(arguments),this},Object.defineProperty(t.Listener.prototype,"positionX",{set:function(t){this._position[0]=t,this.setPosition.apply(this,this._position)},get:function(){return this._position[0]}}),Object.defineProperty(t.Listener.prototype,"positionY",{set:function(t){this._position[1]=t,this.setPosition.apply(this,this._position)},get:function(){return this._position[1]}}),Object.defineProperty(t.Listener.prototype,"positionZ",{set:function(t){this._position[2]=t,this.setPosition.apply(this,this._position)},get:function(){return this._position[2]}}),Object.defineProperty(t.Listener.prototype,"forwardX",{set:function(t){this._orientation[0]=t,this.setOrientation.apply(this,this._orientation)},get:function(){return this._orientation[0]}}),Object.defineProperty(t.Listener.prototype,"forwardY",{set:function(t){this._orientation[1]=t,this.setOrientation.apply(this,this._orientation)},get:function(){return this._orientation[1]}}),Object.defineProperty(t.Listener.prototype,"forwardZ",{set:function(t){this._orientation[2]=t,this.setOrientation.apply(this,this._orientation)},get:function(){return this._orientation[2]}}),Object.defineProperty(t.Listener.prototype,"upX",{set:function(t){this._orientation[3]=t,this.setOrientation.apply(this,this._orientation)},get:function(){return this._orientation[3]}}),Object.defineProperty(t.Listener.prototype,"upY",{set:function(t){this._orientation[4]=t,this.setOrientation.apply(this,this._orientation)},get:function(){return this._orientation[4]}}),Object.defineProperty(t.Listener.prototype,"upZ",{set:function(t){this._orientation[5]=t,this.setOrientation.apply(this,this._orientation)},get:function(){return this._orientation[5]}}),t.Listener.prototype.dispose=function(){return this._orientation=null,this._position=null,this};var e=t.Listener;return t.Listener=new e,t.Context.on("init",function(n){n.Listener instanceof e?t.Listener=n.Listener:t.Listener=new e,n.Listener=t.Listener}),t.Listener}),n(function(t){return t.Offline=function(e,n){var i,r=t.context.sampleRate,o=t.context,s=function e(n,i,r,o){o=t.defaultArg(o,0);var s=new t.OfflineContext(2,i,r);t.context=s;var a=n(t.Transport);return s.currentTime>0&&o<1e3?e(n,i,r,++o):{response:a,context:s}}(e,n,r),a=s.response,u=s.context;return i=a instanceof Promise?a.then(function(){return u.render()}):u.render(),t.context=o,i.then(function(e){return new t.Buffer(e)})},t.Offline}),n(function(t){return t.Effect=function(){var e=t.defaults(arguments,["wet"],t.Effect);t.AudioNode.call(this),this.createInsOuts(1,1),this._dryWet=new t.CrossFade(e.wet),this.wet=this._dryWet.fade,this.effectSend=new t.Gain,this.effectReturn=new t.Gain,this.input.connect(this._dryWet.a),this.input.connect(this.effectSend),this.effectReturn.connect(this._dryWet.b),this._dryWet.connect(this.output),this._readOnly(["wet"])},t.extend(t.Effect,t.AudioNode),t.Effect.defaults={wet:1},t.Effect.prototype.connectEffect=function(t){return this.effectSend.chain(t,this.effectReturn),this},t.Effect.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._dryWet.dispose(),this._dryWet=null,this.effectSend.dispose(),this.effectSend=null,this.effectReturn.dispose(),this.effectReturn=null,this._writable(["wet"]),this.wet=null,this},t.Effect}),n(function(t){return t.AutoFilter=function(){var e=t.defaults(arguments,["frequency","baseFrequency","octaves"],t.AutoFilter);t.Effect.call(this,e),this._lfo=new t.LFO({frequency:e.frequency,amplitude:e.depth}),this.depth=this._lfo.amplitude,this.frequency=this._lfo.frequency,this.filter=new t.Filter(e.filter),this._octaves=0,this.connectEffect(this.filter),this._lfo.connect(this.filter.frequency),this.type=e.type,this._readOnly(["frequency","depth"]),this.octaves=e.octaves,this.baseFrequency=e.baseFrequency},t.extend(t.AutoFilter,t.Effect),t.AutoFilter.defaults={frequency:1,type:"sine",depth:1,baseFrequency:200,octaves:2.6,filter:{type:"lowpass",rolloff:-12,Q:1}},t.AutoFilter.prototype.start=function(t){return this._lfo.start(t),this},t.AutoFilter.prototype.stop=function(t){return this._lfo.stop(t),this},t.AutoFilter.prototype.sync=function(t){return this._lfo.sync(t),this},t.AutoFilter.prototype.unsync=function(){return this._lfo.unsync(),this},Object.defineProperty(t.AutoFilter.prototype,"type",{get:function(){return this._lfo.type},set:function(t){this._lfo.type=t}}),Object.defineProperty(t.AutoFilter.prototype,"baseFrequency",{get:function(){return this._lfo.min},set:function(t){this._lfo.min=this.toFrequency(t),this.octaves=this._octaves}}),Object.defineProperty(t.AutoFilter.prototype,"octaves",{get:function(){return this._octaves},set:function(t){this._octaves=t,this._lfo.max=this.baseFrequency*Math.pow(2,t)}}),t.AutoFilter.prototype.dispose=function(){return t.Effect.prototype.dispose.call(this),this._lfo.dispose(),this._lfo=null,this.filter.dispose(),this.filter=null,this._writable(["frequency","depth"]),this.frequency=null,this.depth=null,this},t.AutoFilter}),n(function(t){return t.AutoPanner=function(){var e=t.defaults(arguments,["frequency"],t.AutoPanner);t.Effect.call(this,e),this._lfo=new t.LFO({frequency:e.frequency,amplitude:e.depth,min:-1,max:1}),this.depth=this._lfo.amplitude,this._panner=new t.Panner,this.frequency=this._lfo.frequency,this.connectEffect(this._panner),this._lfo.connect(this._panner.pan),this.type=e.type,this._readOnly(["depth","frequency"])},t.extend(t.AutoPanner,t.Effect),t.AutoPanner.defaults={frequency:1,type:"sine",depth:1},t.AutoPanner.prototype.start=function(t){return this._lfo.start(t),this},t.AutoPanner.prototype.stop=function(t){return this._lfo.stop(t),this},t.AutoPanner.prototype.sync=function(t){return this._lfo.sync(t),this},t.AutoPanner.prototype.unsync=function(){return this._lfo.unsync(),this},Object.defineProperty(t.AutoPanner.prototype,"type",{get:function(){return this._lfo.type},set:function(t){this._lfo.type=t}}),t.AutoPanner.prototype.dispose=function(){return t.Effect.prototype.dispose.call(this),this._lfo.dispose(),this._lfo=null,this._panner.dispose(),this._panner=null,this._writable(["depth","frequency"]),this.frequency=null,this.depth=null,this},t.AutoPanner}),n(function(t){return t.AutoWah=function(){var e=t.defaults(arguments,["baseFrequency","octaves","sensitivity"],t.AutoWah);t.Effect.call(this,e),this.follower=new t.Follower(e.follower),this._sweepRange=new t.ScaleExp(0,1,.5),this._baseFrequency=e.baseFrequency,this._octaves=e.octaves,this._inputBoost=new t.Gain,this._bandpass=new t.Filter({rolloff:-48,frequency:0,Q:e.Q}),this._peaking=new t.Filter(0,"peaking"),this._peaking.gain.value=e.gain,this.gain=this._peaking.gain,this.Q=this._bandpass.Q,this.effectSend.chain(this._inputBoost,this.follower,this._sweepRange),this._sweepRange.connect(this._bandpass.frequency),this._sweepRange.connect(this._peaking.frequency),this.effectSend.chain(this._bandpass,this._peaking,this.effectReturn),this._setSweepRange(),this.sensitivity=e.sensitivity,this._readOnly(["gain","Q"])},t.extend(t.AutoWah,t.Effect),t.AutoWah.defaults={baseFrequency:100,octaves:6,sensitivity:0,Q:2,gain:2,follower:{attack:.3,release:.5}},Object.defineProperty(t.AutoWah.prototype,"octaves",{get:function(){return this._octaves},set:function(t){this._octaves=t,this._setSweepRange()}}),Object.defineProperty(t.AutoWah.prototype,"baseFrequency",{get:function(){return this._baseFrequency},set:function(t){this._baseFrequency=t,this._setSweepRange()}}),Object.defineProperty(t.AutoWah.prototype,"sensitivity",{get:function(){return t.gainToDb(1/this._inputBoost.gain.value)},set:function(e){this._inputBoost.gain.value=1/t.dbToGain(e)}}),t.AutoWah.prototype._setSweepRange=function(){this._sweepRange.min=this._baseFrequency,this._sweepRange.max=Math.min(this._baseFrequency*Math.pow(2,this._octaves),this.context.sampleRate/2)},t.AutoWah.prototype.dispose=function(){return t.Effect.prototype.dispose.call(this),this.follower.dispose(),this.follower=null,this._sweepRange.dispose(),this._sweepRange=null,this._bandpass.dispose(),this._bandpass=null,this._peaking.dispose(),this._peaking=null,this._inputBoost.dispose(),this._inputBoost=null,this._writable(["gain","Q"]),this.gain=null,this.Q=null,this},t.AutoWah}),n(function(t){return t.Modulo=function(e){t.SignalBase.call(this),this.createInsOuts(1,0),this._shaper=new t.WaveShaper(Math.pow(2,16)),this._multiply=new t.Multiply,this._subtract=this.output=new t.Subtract,this._modSignal=new t.Signal(e),this.input.fan(this._shaper,this._subtract),this._modSignal.connect(this._multiply,0,0),this._shaper.connect(this._multiply,0,1),this._multiply.connect(this._subtract,0,1),this._setWaveShaper(e)},t.extend(t.Modulo,t.SignalBase),t.Modulo.prototype._setWaveShaper=function(t){this._shaper.setMap(function(e){return Math.floor((e+1e-4)/t)})},Object.defineProperty(t.Modulo.prototype,"value",{get:function(){return this._modSignal.value},set:function(t){this._modSignal.value=t,this._setWaveShaper(t)}}),t.Modulo.prototype.dispose=function(){return t.SignalBase.prototype.dispose.call(this),this._shaper.dispose(),this._shaper=null,this._multiply.dispose(),this._multiply=null,this._subtract.dispose(),this._subtract=null,this._modSignal.dispose(),this._modSignal=null,this},t.Modulo}),n(function(t){return t.BitCrusher=function(){var e=t.defaults(arguments,["bits"],t.BitCrusher);t.Effect.call(this,e);var n=1/Math.pow(2,e.bits-1);this._subtract=new t.Subtract,this._modulo=new t.Modulo(n),this._bits=e.bits,this.effectSend.fan(this._subtract,this._modulo),this._modulo.connect(this._subtract,0,1),this._subtract.connect(this.effectReturn)},t.extend(t.BitCrusher,t.Effect),t.BitCrusher.defaults={bits:4},Object.defineProperty(t.BitCrusher.prototype,"bits",{get:function(){return this._bits},set:function(t){this._bits=t;var e=1/Math.pow(2,t-1);this._modulo.value=e}}),t.BitCrusher.prototype.dispose=function(){return t.Effect.prototype.dispose.call(this),this._subtract.dispose(),this._subtract=null,this._modulo.dispose(),this._modulo=null,this},t.BitCrusher}),n(function(t){return t.Chebyshev=function(){var e=t.defaults(arguments,["order"],t.Chebyshev);t.Effect.call(this,e),this._shaper=new t.WaveShaper(4096),this._order=e.order,this.connectEffect(this._shaper),this.order=e.order,this.oversample=e.oversample},t.extend(t.Chebyshev,t.Effect),t.Chebyshev.defaults={order:1,oversample:"none"},t.Chebyshev.prototype._getCoefficient=function(t,e,n){return n.hasOwnProperty(e)?n[e]:(n[e]=0===e?0:1===e?t:2*t*this._getCoefficient(t,e-1,n)-this._getCoefficient(t,e-2,n),n[e])},Object.defineProperty(t.Chebyshev.prototype,"order",{get:function(){return this._order},set:function(t){this._order=t;for(var e=new Array(4096),n=e.length,i=0;i<n;++i){var r=2*i/n-1;e[i]=0===r?0:this._getCoefficient(r,t,{})}this._shaper.curve=e}}),Object.defineProperty(t.Chebyshev.prototype,"oversample",{get:function(){return this._shaper.oversample},set:function(t){this._shaper.oversample=t}}),t.Chebyshev.prototype.dispose=function(){return t.Effect.prototype.dispose.call(this),this._shaper.dispose(),this._shaper=null,this},t.Chebyshev}),n(function(t){return t.StereoEffect=function(){t.AudioNode.call(this);var e=t.defaults(arguments,["wet"],t.Effect);this.createInsOuts(1,1),this._dryWet=new t.CrossFade(e.wet),this.wet=this._dryWet.fade,this._split=new t.Split,this.effectSendL=this._split.left,this.effectSendR=this._split.right,this._merge=new t.Merge,this.effectReturnL=this._merge.left,this.effectReturnR=this._merge.right,this.input.connect(this._split),this.input.connect(this._dryWet,0,0),this._merge.connect(this._dryWet,0,1),this._dryWet.connect(this.output),this._readOnly(["wet"])},t.extend(t.StereoEffect,t.Effect),t.StereoEffect.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._dryWet.dispose(),this._dryWet=null,this._split.dispose(),this._split=null,this._merge.dispose(),this._merge=null,this.effectSendL=null,this.effectSendR=null,this.effectReturnL=null,this.effectReturnR=null,this._writable(["wet"]),this.wet=null,this},t.StereoEffect}),n(function(t){return t.Chorus=function(){var e=t.defaults(arguments,["frequency","delayTime","depth"],t.Chorus);t.StereoEffect.call(this,e),this._depth=e.depth,this._delayTime=e.delayTime/1e3,this._lfoL=new t.LFO({frequency:e.frequency,min:0,max:1}),this._lfoR=new t.LFO({frequency:e.frequency,min:0,max:1,phase:180}),this._delayNodeL=new t.Delay,this._delayNodeR=new t.Delay,this.frequency=this._lfoL.frequency,this.effectSendL.chain(this._delayNodeL,this.effectReturnL),this.effectSendR.chain(this._delayNodeR,this.effectReturnR),this.effectSendL.connect(this.effectReturnL),this.effectSendR.connect(this.effectReturnR),this._lfoL.connect(this._delayNodeL.delayTime),this._lfoR.connect(this._delayNodeR.delayTime),this._lfoL.start(),this._lfoR.start(),this._lfoL.frequency.connect(this._lfoR.frequency),this.depth=this._depth,this.frequency.value=e.frequency,this.type=e.type,this._readOnly(["frequency"]),this.spread=e.spread},t.extend(t.Chorus,t.StereoEffect),t.Chorus.defaults={frequency:1.5,delayTime:3.5,depth:.7,type:"sine",spread:180},Object.defineProperty(t.Chorus.prototype,"depth",{get:function(){return this._depth},set:function(t){this._depth=t;var e=this._delayTime*t;this._lfoL.min=Math.max(this._delayTime-e,0),this._lfoL.max=this._delayTime+e,this._lfoR.min=Math.max(this._delayTime-e,0),this._lfoR.max=this._delayTime+e}}),Object.defineProperty(t.Chorus.prototype,"delayTime",{get:function(){return 1e3*this._delayTime},set:function(t){this._delayTime=t/1e3,this.depth=this._depth}}),Object.defineProperty(t.Chorus.prototype,"type",{get:function(){return this._lfoL.type},set:function(t){this._lfoL.type=t,this._lfoR.type=t}}),Object.defineProperty(t.Chorus.prototype,"spread",{get:function(){return this._lfoR.phase-this._lfoL.phase},set:function(t){this._lfoL.phase=90-t/2,this._lfoR.phase=t/2+90}}),t.Chorus.prototype.dispose=function(){return t.StereoEffect.prototype.dispose.call(this),this._lfoL.dispose(),this._lfoL=null,this._lfoR.dispose(),this._lfoR=null,this._delayNodeL.dispose(),this._delayNodeL=null,this._delayNodeR.dispose(),this._delayNodeR=null,this._writable("frequency"),this.frequency=null,this},t.Chorus}),n(function(t){return t.Convolver=function(){var e=t.defaults(arguments,["url","onload"],t.Convolver);t.Effect.call(this,e),this._convolver=this.context.createConvolver(),this._buffer=new t.Buffer(e.url,function(t){this._convolver.buffer=t.get(),e.onload()}.bind(this)),this.connectEffect(this._convolver)},t.extend(t.Convolver,t.Effect),t.Convolver.defaults={onload:t.noOp},Object.defineProperty(t.Convolver.prototype,"buffer",{get:function(){return this._buffer.get()},set:function(t){this._buffer.set(t),this._convolver.buffer=this._buffer.get()}}),t.Convolver.prototype.load=function(t,e){return this._buffer.load(t,function(t){this.buffer=t,e&&e()}.bind(this))},t.Convolver.prototype.dispose=function(){return t.Effect.prototype.dispose.call(this),this._convolver.disconnect(),this._convolver=null,this._buffer.dispose(),this._buffer=null,this},t.Convolver}),n(function(t){return t.Distortion=function(){var e=t.defaults(arguments,["distortion"],t.Distortion);t.Effect.call(this,e),this._shaper=new t.WaveShaper(4096),this._distortion=e.distortion,this.connectEffect(this._shaper),this.distortion=e.distortion,this.oversample=e.oversample},t.extend(t.Distortion,t.Effect),t.Distortion.defaults={distortion:.4,oversample:"none"},Object.defineProperty(t.Distortion.prototype,"distortion",{get:function(){return this._distortion},set:function(t){this._distortion=t;var e=100*t,n=Math.PI/180;this._shaper.setMap(function(t){return Math.abs(t)<.001?0:(3+e)*t*20*n/(Math.PI+e*Math.abs(t))})}}),Object.defineProperty(t.Distortion.prototype,"oversample",{get:function(){return this._shaper.oversample},set:function(t){this._shaper.oversample=t}}),t.Distortion.prototype.dispose=function(){return t.Effect.prototype.dispose.call(this),this._shaper.dispose(),this._shaper=null,this},t.Distortion}),n(function(t){return t.FeedbackEffect=function(){var e=t.defaults(arguments,["feedback"],t.FeedbackEffect);t.Effect.call(this,e),this._feedbackGain=new t.Gain(e.feedback,t.Type.NormalRange),this.feedback=this._feedbackGain.gain,this.effectReturn.chain(this._feedbackGain,this.effectSend),this._readOnly(["feedback"])},t.extend(t.FeedbackEffect,t.Effect),t.FeedbackEffect.defaults={feedback:.125},t.FeedbackEffect.prototype.dispose=function(){return t.Effect.prototype.dispose.call(this),this._writable(["feedback"]),this._feedbackGain.dispose(),this._feedbackGain=null,this.feedback=null,this},t.FeedbackEffect}),n(function(t){return t.FeedbackDelay=function(){var e=t.defaults(arguments,["delayTime","feedback"],t.FeedbackDelay);t.FeedbackEffect.call(this,e),this._delayNode=new t.Delay(e.delayTime,e.maxDelay),this.delayTime=this._delayNode.delayTime,this.connectEffect(this._delayNode),this._readOnly(["delayTime"])},t.extend(t.FeedbackDelay,t.FeedbackEffect),t.FeedbackDelay.defaults={delayTime:.25,maxDelay:1},t.FeedbackDelay.prototype.dispose=function(){return t.FeedbackEffect.prototype.dispose.call(this),this._delayNode.dispose(),this._delayNode=null,this._writable(["delayTime"]),this.delayTime=null,this},t.FeedbackDelay}),n(function(t){var e=[1557/44100,1617/44100,1491/44100,1422/44100,1277/44100,1356/44100,1188/44100,1116/44100],n=[225,556,441,341];return t.Freeverb=function(){var i=t.defaults(arguments,["roomSize","dampening"],t.Freeverb);t.StereoEffect.call(this,i),this.roomSize=new t.Signal(i.roomSize,t.Type.NormalRange),this.dampening=new t.Signal(i.dampening,t.Type.Frequency),this._combFilters=[],this._allpassFiltersL=[],this._allpassFiltersR=[];for(var r=0;r<n.length;r++){var o=this.context.createBiquadFilter();o.type="allpass",o.frequency.value=n[r],this._allpassFiltersL.push(o)}for(var s=0;s<n.length;s++){var a=this.context.createBiquadFilter();a.type="allpass",a.frequency.value=n[s],this._allpassFiltersR.push(a)}for(var u=0;u<e.length;u++){var l=new t.LowpassCombFilter(e[u]);u<e.length/2?this.effectSendL.chain(l,this._allpassFiltersL[0]):this.effectSendR.chain(l,this._allpassFiltersR[0]),this.roomSize.connect(l.resonance),this.dampening.connect(l.dampening),this._combFilters.push(l)}t.connectSeries.apply(t,this._allpassFiltersL),t.connectSeries.apply(t,this._allpassFiltersR),this._allpassFiltersL[this._allpassFiltersL.length-1].connect(this.effectReturnL),this._allpassFiltersR[this._allpassFiltersR.length-1].connect(this.effectReturnR),this._readOnly(["roomSize","dampening"])},t.extend(t.Freeverb,t.StereoEffect),t.Freeverb.defaults={roomSize:.7,dampening:3e3},t.Freeverb.prototype.dispose=function(){t.StereoEffect.prototype.dispose.call(this);for(var e=0;e<this._allpassFiltersL.length;e++)this._allpassFiltersL[e].disconnect(),this._allpassFiltersL[e]=null;this._allpassFiltersL=null;for(var n=0;n<this._allpassFiltersR.length;n++)this._allpassFiltersR[n].disconnect(),this._allpassFiltersR[n]=null;this._allpassFiltersR=null;for(var i=0;i<this._combFilters.length;i++)this._combFilters[i].dispose(),this._combFilters[i]=null;return this._combFilters=null,this._writable(["roomSize","dampening"]),this.roomSize.dispose(),this.roomSize=null,this.dampening.dispose(),this.dampening=null,this},t.Freeverb}),n(function(t){var e=[.06748,.06404,.08212,.09004],n=[.773,.802,.753,.733],i=[347,113,37];return t.JCReverb=function(){var r=t.defaults(arguments,["roomSize"],t.JCReverb);t.StereoEffect.call(this,r),this.roomSize=new t.Signal(r.roomSize,t.Type.NormalRange),this._scaleRoomSize=new t.Scale(-.733,.197),this._allpassFilters=[],this._feedbackCombFilters=[];for(var o=0;o<i.length;o++){var s=this.context.createBiquadFilter();s.type="allpass",s.frequency.value=i[o],this._allpassFilters.push(s)}for(var a=0;a<e.length;a++){var u=new t.FeedbackCombFilter(e[a],.1);this._scaleRoomSize.connect(u.resonance),u.resonance.value=n[a],this._allpassFilters[this._allpassFilters.length-1].connect(u),a<e.length/2?u.connect(this.effectReturnL):u.connect(this.effectReturnR),this._feedbackCombFilters.push(u)}this.roomSize.connect(this._scaleRoomSize),t.connectSeries.apply(t,this._allpassFilters),this.effectSendL.connect(this._allpassFilters[0]),this.effectSendR.connect(this._allpassFilters[0]),this._readOnly(["roomSize"])},t.extend(t.JCReverb,t.StereoEffect),t.JCReverb.defaults={roomSize:.5},t.JCReverb.prototype.dispose=function(){t.StereoEffect.prototype.dispose.call(this);for(var e=0;e<this._allpassFilters.length;e++)this._allpassFilters[e].disconnect(),this._allpassFilters[e]=null;this._allpassFilters=null;for(var n=0;n<this._feedbackCombFilters.length;n++)this._feedbackCombFilters[n].dispose(),this._feedbackCombFilters[n]=null;return this._feedbackCombFilters=null,this._writable(["roomSize"]),this.roomSize.dispose(),this.roomSize=null,this._scaleRoomSize.dispose(),this._scaleRoomSize=null,this},t.JCReverb}),n(function(t){return t.MidSideEffect=function(){t.Effect.apply(this,arguments),this._midSideSplit=new t.MidSideSplit,this._midSideMerge=new t.MidSideMerge,this.midSend=this._midSideSplit.mid,this.sideSend=this._midSideSplit.side,this.midReturn=this._midSideMerge.mid,this.sideReturn=this._midSideMerge.side,this.effectSend.connect(this._midSideSplit),this._midSideMerge.connect(this.effectReturn)},t.extend(t.MidSideEffect,t.Effect),t.MidSideEffect.prototype.dispose=function(){return t.Effect.prototype.dispose.call(this),this._midSideSplit.dispose(),this._midSideSplit=null,this._midSideMerge.dispose(),this._midSideMerge=null,this.midSend=null,this.sideSend=null,this.midReturn=null,this.sideReturn=null,this},t.MidSideEffect}),n(function(t){return t.Phaser=function(){var e=t.defaults(arguments,["frequency","octaves","baseFrequency"],t.Phaser);t.StereoEffect.call(this,e),this._lfoL=new t.LFO(e.frequency,0,1),this._lfoR=new t.LFO(e.frequency,0,1),this._lfoR.phase=180,this._baseFrequency=e.baseFrequency,this._octaves=e.octaves,this.Q=new t.Signal(e.Q,t.Type.Positive),this._filtersL=this._makeFilters(e.stages,this._lfoL,this.Q),this._filtersR=this._makeFilters(e.stages,this._lfoR,this.Q),this.frequency=this._lfoL.frequency,this.frequency.value=e.frequency,this.effectSendL.connect(this._filtersL[0]),this.effectSendR.connect(this._filtersR[0]),this._filtersL[e.stages-1].connect(this.effectReturnL),this._filtersR[e.stages-1].connect(this.effectReturnR),this._lfoL.frequency.connect(this._lfoR.frequency),this.baseFrequency=e.baseFrequency,this.octaves=e.octaves,this._lfoL.start(),this._lfoR.start(),this._readOnly(["frequency","Q"])},t.extend(t.Phaser,t.StereoEffect),t.Phaser.defaults={frequency:.5,octaves:3,stages:10,Q:10,baseFrequency:350},t.Phaser.prototype._makeFilters=function(e,n,i){for(var r=new Array(e),o=0;o<e;o++){var s=this.context.createBiquadFilter();s.type="allpass",i.connect(s.Q),n.connect(s.frequency),r[o]=s}return t.connectSeries.apply(t,r),r},Object.defineProperty(t.Phaser.prototype,"octaves",{get:function(){return this._octaves},set:function(t){this._octaves=t;var e=this._baseFrequency*Math.pow(2,t);this._lfoL.max=e,this._lfoR.max=e}}),Object.defineProperty(t.Phaser.prototype,"baseFrequency",{get:function(){return this._baseFrequency},set:function(t){this._baseFrequency=t,this._lfoL.min=t,this._lfoR.min=t,this.octaves=this._octaves}}),t.Phaser.prototype.dispose=function(){t.StereoEffect.prototype.dispose.call(this),this._writable(["frequency","Q"]),this.Q.dispose(),this.Q=null,this._lfoL.dispose(),this._lfoL=null,this._lfoR.dispose(),this._lfoR=null;for(var e=0;e<this._filtersL.length;e++)this._filtersL[e].disconnect(),this._filtersL[e]=null;this._filtersL=null;for(var n=0;n<this._filtersR.length;n++)this._filtersR[n].disconnect(),this._filtersR[n]=null;return this._filtersR=null,this.frequency=null,this},t.Phaser}),n(function(t){return t.StereoXFeedbackEffect=function(){var e=t.defaults(arguments,["feedback"],t.FeedbackEffect);t.StereoEffect.call(this,e),this.feedback=new t.Signal(e.feedback,t.Type.NormalRange),this._feedbackLR=new t.Gain,this._feedbackRL=new t.Gain,this.effectReturnL.chain(this._feedbackLR,this.effectSendR),this.effectReturnR.chain(this._feedbackRL,this.effectSendL),this.feedback.fan(this._feedbackLR.gain,this._feedbackRL.gain),this._readOnly(["feedback"])},t.extend(t.StereoXFeedbackEffect,t.StereoEffect),t.StereoXFeedbackEffect.prototype.dispose=function(){return t.StereoEffect.prototype.dispose.call(this),this._writable(["feedback"]),this.feedback.dispose(),this.feedback=null,this._feedbackLR.dispose(),this._feedbackLR=null,this._feedbackRL.dispose(),this._feedbackRL=null,this},t.StereoXFeedbackEffect}),n(function(t){return t.PingPongDelay=function(){var e=t.defaults(arguments,["delayTime","feedback"],t.PingPongDelay);t.StereoXFeedbackEffect.call(this,e),this._leftDelay=new t.Delay(0,e.maxDelayTime),this._rightDelay=new t.Delay(0,e.maxDelayTime),this._rightPreDelay=new t.Delay(0,e.maxDelayTime),this.delayTime=new t.Signal(e.delayTime,t.Type.Time),this.effectSendL.chain(this._leftDelay,this.effectReturnL),this.effectSendR.chain(this._rightPreDelay,this._rightDelay,this.effectReturnR),this.delayTime.fan(this._leftDelay.delayTime,this._rightDelay.delayTime,this._rightPreDelay.delayTime),this._feedbackLR.disconnect(),this._feedbackLR.connect(this._rightDelay),this._readOnly(["delayTime"])},t.extend(t.PingPongDelay,t.StereoXFeedbackEffect),t.PingPongDelay.defaults={delayTime:.25,maxDelayTime:1},t.PingPongDelay.prototype.dispose=function(){return t.StereoXFeedbackEffect.prototype.dispose.call(this),this._leftDelay.dispose(),this._leftDelay=null,this._rightDelay.dispose(),this._rightDelay=null,this._rightPreDelay.dispose(),this._rightPreDelay=null,this._writable(["delayTime"]),this.delayTime.dispose(),this.delayTime=null,this},t.PingPongDelay}),n(function(t){return t.PitchShift=function(){var e=t.defaults(arguments,["pitch"],t.PitchShift);t.FeedbackEffect.call(this,e),this._frequency=new t.Signal(0),this._delayA=new t.Delay(0,1),this._lfoA=new t.LFO({min:0,max:.1,type:"sawtooth"}).connect(this._delayA.delayTime),this._delayB=new t.Delay(0,1),this._lfoB=new t.LFO({min:0,max:.1,type:"sawtooth",phase:180}).connect(this._delayB.delayTime),this._crossFade=new t.CrossFade,this._crossFadeLFO=new t.LFO({min:0,max:1,type:"triangle",phase:90}).connect(this._crossFade.fade),this._feedbackDelay=new t.Delay(e.delayTime),this.delayTime=this._feedbackDelay.delayTime,this._readOnly("delayTime"),this._pitch=e.pitch,this._windowSize=e.windowSize,this._delayA.connect(this._crossFade.a),this._delayB.connect(this._crossFade.b),this._frequency.fan(this._lfoA.frequency,this._lfoB.frequency,this._crossFadeLFO.frequency),this.effectSend.fan(this._delayA,this._delayB),this._crossFade.chain(this._feedbackDelay,this.effectReturn);var n=this.now();this._lfoA.start(n),this._lfoB.start(n),this._crossFadeLFO.start(n),this.windowSize=this._windowSize},t.extend(t.PitchShift,t.FeedbackEffect),t.PitchShift.defaults={pitch:0,windowSize:.1,delayTime:0,feedback:0},Object.defineProperty(t.PitchShift.prototype,"pitch",{get:function(){return this._pitch},set:function(e){this._pitch=e;var n=0;e<0?(this._lfoA.min=0,this._lfoA.max=this._windowSize,this._lfoB.min=0,this._lfoB.max=this._windowSize,n=t.intervalToFrequencyRatio(e-1)+1):(this._lfoA.min=this._windowSize,this._lfoA.max=0,this._lfoB.min=this._windowSize,this._lfoB.max=0,n=t.intervalToFrequencyRatio(e)-1),this._frequency.value=n*(1.2/this._windowSize)}}),Object.defineProperty(t.PitchShift.prototype,"windowSize",{get:function(){return this._windowSize},set:function(t){this._windowSize=this.toSeconds(t),this.pitch=this._pitch}}),t.PitchShift.prototype.dispose=function(){return t.FeedbackEffect.prototype.dispose.call(this),this._frequency.dispose(),this._frequency=null,this._delayA.disconnect(),this._delayA=null,this._delayB.disconnect(),this._delayB=null,this._lfoA.dispose(),this._lfoA=null,this._lfoB.dispose(),this._lfoB=null,this._crossFade.dispose(),this._crossFade=null,this._crossFadeLFO.dispose(),this._crossFadeLFO=null,this._writable("delayTime"),this._feedbackDelay.dispose(),this._feedbackDelay=null,this.delayTime=null,this},t.PitchShift}),n(function(t){return t.BufferSource=function(){var e=t.defaults(arguments,["buffer","onload"],t.BufferSource);t.AudioNode.call(this,e),this.onended=e.onended,this._startTime=-1,this._sourceStarted=!1,this._sourceStopped=!1,this._stopTime=-1,this._gainNode=this.output=new t.Gain,this._source=this.context.createBufferSource(),this._source.connect(this._gainNode),this._source.onended=this._onended.bind(this),this._buffer=new t.Buffer(e.buffer,e.onload),this.playbackRate=new t.Param(this._source.playbackRate,t.Type.Positive),this.fadeIn=e.fadeIn,this.fadeOut=e.fadeOut,this.curve=e.curve,this._gain=1,this._onendedTimeout=-1,this.loop=e.loop,this.loopStart=e.loopStart,this.loopEnd=e.loopEnd,this.playbackRate.value=e.playbackRate},t.extend(t.BufferSource,t.AudioNode),t.BufferSource.defaults={onended:t.noOp,onload:t.noOp,loop:!1,loopStart:0,loopEnd:0,fadeIn:0,fadeOut:0,curve:"linear",playbackRate:1},Object.defineProperty(t.BufferSource.prototype,"state",{get:function(){return this.getStateAtTime(this.now())}}),t.BufferSource.prototype.getStateAtTime=function(e){return e=this.toSeconds(e),-1!==this._startTime&&e>=this._startTime&&!this._sourceStopped?t.State.Started:t.State.Stopped},t.BufferSource.prototype.start=function(e,n,i,r,o){if(-1!==this._startTime)throw new Error("Tone.BufferSource can only be started once.");if(!this.buffer.loaded)throw new Error("Tone.BufferSource: buffer is either not set or not loaded.");e=this.toSeconds(e),n=this.loop?t.defaultArg(n,this.loopStart):t.defaultArg(n,0),n=this.toSeconds(n),r=t.defaultArg(r,1),this._gain=r,o=this.toSeconds(t.defaultArg(o,this.fadeIn)),this.fadeIn=o,o>0?(this._gainNode.gain.setValueAtTime(0,e),"linear"===this.curve?this._gainNode.gain.linearRampToValueAtTime(this._gain,e+o):this._gainNode.gain.exponentialApproachValueAtTime(this._gain,e,o)):this._gainNode.gain.setValueAtTime(r,e),this._startTime=e;var s=this.toSeconds(t.defaultArg(i,this.buffer.duration-n%this.buffer.duration));if(s=Math.max(s,0),t.isDefined(i)&&(this.loop||(s=Math.min(s,this.buffer.duration-n%this.buffer.duration)),this.stop(e+s,this.fadeOut)),this.loop){var a=this.loopEnd||this.buffer.duration,u=this.loopStart;n>=a&&(n=(n-u)%(a-u)+u)}return this._source.buffer=this.buffer.get(),this._source.loopEnd=this.loopEnd||this.buffer.duration,n<this.buffer.duration&&(this._sourceStarted=!0,this._source.start(e,n)),this},t.BufferSource.prototype.stop=function(e,n){if(!this.buffer.loaded)throw new Error("Tone.BufferSource: buffer is either not set or not loaded.");if(!this._sourceStopped){if(e=this.toSeconds(e),-1!==this._stopTime&&this.cancelStop(),e<=this._startTime)return this._gainNode.gain.cancelScheduledValues(e),this._gainNode.gain.value=0,this;e=Math.max(this._startTime+this.fadeIn+this.sampleTime,e),this._gainNode.gain.cancelScheduledValues(e),this._stopTime=e,n=this.toSeconds(t.defaultArg(n,this.fadeOut));var i=e-this._startTime-this.fadeIn-this.sampleTime;this.loop||(i=Math.min(i,this.buffer.duration));var r=e-(n=Math.min(i,n));return n>this.sampleTime?(this._gainNode.gain.setValueAtTime(this._gain,r),"linear"===this.curve?this._gainNode.gain.linearRampToValueAtTime(0,e):this._gainNode.gain.exponentialApproachValueAtTime(0,r,n)):this._gainNode.gain.setValueAtTime(0,e),t.context.clearTimeout(this._onendedTimeout),this._onendedTimeout=t.context.setTimeout(this._onended.bind(this),this._stopTime-this.now()),this}},t.BufferSource.prototype.cancelStop=function(){if(-1!==this._startTime&&!this._sourceStopped){var t=this.toSeconds(this.fadeIn);this._gainNode.gain.cancelScheduledValues(this._startTime+t+this.sampleTime),this._gainNode.gain.setValueAtTime(1,Math.max(this.now(),this._startTime+t+this.sampleTime)),this.context.clearTimeout(this._onendedTimeout),this._stopTime=-1}return this},t.BufferSource.prototype._onended=function(){if(!this._sourceStopped){this._sourceStopped=!0;var t="exponential"===this.curve?2*this.fadeOut:0;this._sourceStarted&&-1!==this._stopTime&&this._source.stop(this._stopTime+t),this.onended(this)}},Object.defineProperty(t.BufferSource.prototype,"loopStart",{get:function(){return this._source.loopStart},set:function(t){this._source.loopStart=this.toSeconds(t)}}),Object.defineProperty(t.BufferSource.prototype,"loopEnd",{get:function(){return this._source.loopEnd},set:function(t){this._source.loopEnd=this.toSeconds(t)}}),Object.defineProperty(t.BufferSource.prototype,"buffer",{get:function(){return this._buffer},set:function(t){this._buffer.set(t)}}),Object.defineProperty(t.BufferSource.prototype,"loop",{get:function(){return this._source.loop},set:function(t){this._source.loop=t,this.cancelStop()}}),t.BufferSource.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this.onended=null,this._source.onended=null,this._source.disconnect(),this._source=null,this._gainNode.dispose(),this._gainNode=null,this._buffer.dispose(),this._buffer=null,this._startTime=-1,this.playbackRate=null,t.context.clearTimeout(this._onendedTimeout),this},t.BufferSource}),n(function(t){t.Noise=function(){var e=t.defaults(arguments,["type"],t.Noise);t.Source.call(this,e),this._source=null,this._type=e.type,this._playbackRate=e.playbackRate},t.extend(t.Noise,t.Source),t.Noise.defaults={type:"white",playbackRate:1},Object.defineProperty(t.Noise.prototype,"type",{get:function(){return this._type},set:function(e){if(this._type!==e){if(!(e in n))throw new TypeError("Tone.Noise: invalid type: "+e);if(this._type=e,this.state===t.State.Started){var i=this.now();this._stop(i),this._start(i)}}}}),Object.defineProperty(t.Noise.prototype,"playbackRate",{get:function(){return this._playbackRate},set:function(t){this._playbackRate=t,this._source&&(this._source.playbackRate.value=t)}}),t.Noise.prototype._start=function(e){var i=n[this._type];this._source=new t.BufferSource(i).connect(this.output),this._source.loop=!0,this._source.playbackRate.value=this._playbackRate,this._source.start(this.toSeconds(e),Math.random()*(i.duration-.001))},t.Noise.prototype._stop=function(t){this._source&&(this._source.stop(this.toSeconds(t)),this._source=null)},t.Noise.prototype.restart=function(t){this._stop(t),this._start(t)},t.Noise.prototype.dispose=function(){return t.Source.prototype.dispose.call(this),null!==this._source&&(this._source.disconnect(),this._source=null),this._buffer=null,this};var e={pink:function(){for(var t=[],e=0;e<2;e++){var n,i,r,o,s,a,u,l=new Float32Array(220500);t[e]=l,n=i=r=o=s=a=u=0;for(var c=0;c<220500;c++){var h=2*Math.random()-1;n=.99886*n+.0555179*h,i=.99332*i+.0750759*h,r=.969*r+.153852*h,o=.8665*o+.3104856*h,s=.55*s+.5329522*h,a=-.7616*a-.016898*h,l[c]=n+i+r+o+s+a+u+.5362*h,l[c]*=.11,u=.115926*h}}return t}(),brown:function(){for(var t=[],e=0;e<2;e++){var n=new Float32Array(220500);t[e]=n;for(var i=0,r=0;r<220500;r++){var o=2*Math.random()-1;n[r]=(i+.02*o)/1.02,i=n[r],n[r]*=3.5}}return t}(),white:function(){for(var t=[],e=0;e<2;e++){var n=new Float32Array(220500);t[e]=n;for(var i=0;i<220500;i++)n[i]=2*Math.random()-1}return t}()},n={};function i(){for(var i in e)n[i]=(new t.Buffer).fromArray(e[i])}return t.getContext(i),t.Context.on("init",i),t.Noise}),n(function(t){return t.Reverb=function(){var e=t.defaults(arguments,["decay"],t.Reverb);t.Effect.call(this,e),this._convolver=this.context.createConvolver(),this.decay=e.decay,this.preDelay=e.preDelay,this.connectEffect(this._convolver)},t.extend(t.Reverb,t.Effect),t.Reverb.defaults={decay:1.5,preDelay:.01},t.Reverb.prototype.generate=function(){return t.Offline(function(){var e=new t.Noise,n=new t.Noise,i=new t.Merge;e.connect(i.left),n.connect(i.right);var r=(new t.Gain).toMaster();i.connect(r),e.start(0),n.start(0),r.gain.setValueAtTime(0,0),r.gain.linearRampToValueAtTime(1,this.preDelay),r.gain.exponentialApproachValueAtTime(0,this.preDelay,this.decay-this.preDelay)}.bind(this),this.decay).then(function(t){return this._convolver.buffer=t.get(),this}.bind(this))},t.Reverb.prototype.dispose=function(){return t.Effect.prototype.dispose.call(this),this._convolver.disconnect(),this._convolver=null,this},t.Reverb}),n(function(t){return t.StereoFeedbackEffect=function(){var e=t.defaults(arguments,["feedback"],t.FeedbackEffect);t.StereoEffect.call(this,e),this.feedback=new t.Signal(e.feedback,t.Type.NormalRange),this._feedbackL=new t.Gain,this._feedbackR=new t.Gain,this.effectReturnL.chain(this._feedbackL,this.effectSendL),this.effectReturnR.chain(this._feedbackR,this.effectSendR),this.feedback.fan(this._feedbackL.gain,this._feedbackR.gain),this._readOnly(["feedback"])},t.extend(t.StereoFeedbackEffect,t.StereoEffect),t.StereoFeedbackEffect.prototype.dispose=function(){return t.StereoEffect.prototype.dispose.call(this),this._writable(["feedback"]),this.feedback.dispose(),this.feedback=null,this._feedbackL.dispose(),this._feedbackL=null,this._feedbackR.dispose(),this._feedbackR=null,this},t.StereoFeedbackEffect}),n(function(t){return t.StereoWidener=function(){var e=t.defaults(arguments,["width"],t.StereoWidener);t.MidSideEffect.call(this,e),this.width=new t.Signal(e.width,t.Type.NormalRange),this._readOnly(["width"]),this._twoTimesWidthMid=new t.Multiply(2),this._twoTimesWidthSide=new t.Multiply(2),this._midMult=new t.Multiply,this._twoTimesWidthMid.connect(this._midMult,0,1),this.midSend.chain(this._midMult,this.midReturn),this._oneMinusWidth=new t.Subtract,this._oneMinusWidth.connect(this._twoTimesWidthMid),this.context.getConstant(1).connect(this._oneMinusWidth,0,0),this.width.connect(this._oneMinusWidth,0,1),this._sideMult=new t.Multiply,this.width.connect(this._twoTimesWidthSide),this._twoTimesWidthSide.connect(this._sideMult,0,1),this.sideSend.chain(this._sideMult,this.sideReturn)},t.extend(t.StereoWidener,t.MidSideEffect),t.StereoWidener.defaults={width:.5},t.StereoWidener.prototype.dispose=function(){return t.MidSideEffect.prototype.dispose.call(this),this._writable(["width"]),this.width.dispose(),this.width=null,this._midMult.dispose(),this._midMult=null,this._sideMult.dispose(),this._sideMult=null,this._twoTimesWidthMid.dispose(),this._twoTimesWidthMid=null,this._twoTimesWidthSide.dispose(),this._twoTimesWidthSide=null,this._oneMinusWidth.dispose(),this._oneMinusWidth=null,this},t.StereoWidener}),n(function(t){return t.Tremolo=function(){var e=t.defaults(arguments,["frequency","depth"],t.Tremolo);t.StereoEffect.call(this,e),this._lfoL=new t.LFO({phase:e.spread,min:1,max:0}),this._lfoR=new t.LFO({phase:e.spread,min:1,max:0}),this._amplitudeL=new t.Gain,this._amplitudeR=new t.Gain,this.frequency=new t.Signal(e.frequency,t.Type.Frequency),this.depth=new t.Signal(e.depth,t.Type.NormalRange),this._readOnly(["frequency","depth"]),this.effectSendL.chain(this._amplitudeL,this.effectReturnL),this.effectSendR.chain(this._amplitudeR,this.effectReturnR),this._lfoL.connect(this._amplitudeL.gain),this._lfoR.connect(this._amplitudeR.gain),this.frequency.fan(this._lfoL.frequency,this._lfoR.frequency),this.depth.fan(this._lfoR.amplitude,this._lfoL.amplitude),this.type=e.type,this.spread=e.spread},t.extend(t.Tremolo,t.StereoEffect),t.Tremolo.defaults={frequency:10,type:"sine",depth:.5,spread:180},t.Tremolo.prototype.start=function(t){return this._lfoL.start(t),this._lfoR.start(t),this},t.Tremolo.prototype.stop=function(t){return this._lfoL.stop(t),this._lfoR.stop(t),this},t.Tremolo.prototype.sync=function(e){return this._lfoL.sync(e),this._lfoR.sync(e),t.Transport.syncSignal(this.frequency),this},t.Tremolo.prototype.unsync=function(){return this._lfoL.unsync(),this._lfoR.unsync(),t.Transport.unsyncSignal(this.frequency),this},Object.defineProperty(t.Tremolo.prototype,"type",{get:function(){return this._lfoL.type},set:function(t){this._lfoL.type=t,this._lfoR.type=t}}),Object.defineProperty(t.Tremolo.prototype,"spread",{get:function(){return this._lfoR.phase-this._lfoL.phase},set:function(t){this._lfoL.phase=90-t/2,this._lfoR.phase=t/2+90}}),t.Tremolo.prototype.dispose=function(){return t.StereoEffect.prototype.dispose.call(this),this._writable(["frequency","depth"]),this._lfoL.dispose(),this._lfoL=null,this._lfoR.dispose(),this._lfoR=null,this._amplitudeL.dispose(),this._amplitudeL=null,this._amplitudeR.dispose(),this._amplitudeR=null,this.frequency=null,this.depth=null,this},t.Tremolo}),n(function(t){return t.Vibrato=function(){var e=t.defaults(arguments,["frequency","depth"],t.Vibrato);t.Effect.call(this,e),this._delayNode=new t.Delay(0,e.maxDelay),this._lfo=new t.LFO({type:e.type,min:0,max:e.maxDelay,frequency:e.frequency,phase:-90}).start().connect(this._delayNode.delayTime),this.frequency=this._lfo.frequency,this.depth=this._lfo.amplitude,this.depth.value=e.depth,this._readOnly(["frequency","depth"]),this.effectSend.chain(this._delayNode,this.effectReturn)},t.extend(t.Vibrato,t.Effect),t.Vibrato.defaults={maxDelay:.005,frequency:5,depth:.1,type:"sine"},Object.defineProperty(t.Vibrato.prototype,"type",{get:function(){return this._lfo.type},set:function(t){this._lfo.type=t}}),t.Vibrato.prototype.dispose=function(){t.Effect.prototype.dispose.call(this),this._delayNode.dispose(),this._delayNode=null,this._lfo.dispose(),this._lfo=null,this._writable(["frequency","depth"]),this.frequency=null,this.depth=null},t.Vibrato}),n(function(t){return t.Event=function(){var e=t.defaults(arguments,["callback","value"],t.Event);t.call(this),this._loop=e.loop,this.callback=e.callback,this.value=e.value,this._loopStart=this.toTicks(e.loopStart),this._loopEnd=this.toTicks(e.loopEnd),this._state=new t.TimelineState(t.State.Stopped),this._playbackRate=1,this._startOffset=0,this._probability=e.probability,this._humanize=e.humanize,this.mute=e.mute,this.playbackRate=e.playbackRate},t.extend(t.Event),t.Event.defaults={callback:t.noOp,loop:!1,loopEnd:"1m",loopStart:0,playbackRate:1,value:null,probability:1,mute:!1,humanize:!1},t.Event.prototype._rescheduleEvents=function(e){return e=t.defaultArg(e,-1),this._state.forEachFrom(e,function(e){var n;if(e.state===t.State.Started){t.isDefined(e.id)&&t.Transport.clear(e.id);var i=e.time+Math.round(this.startOffset/this._playbackRate);if(this._loop){n=1/0,t.isNumber(this._loop)&&(n=this._loop*this._getLoopDuration());var r=this._state.getAfter(i);null!==r&&(n=Math.min(n,r.time-i)),n!==1/0&&(this._state.setStateAtTime(t.State.Stopped,i+n+1),n=t.Ticks(n));var o=t.Ticks(this._getLoopDuration());e.id=t.Transport.scheduleRepeat(this._tick.bind(this),o,t.Ticks(i),n)}else e.id=t.Transport.schedule(this._tick.bind(this),t.Ticks(i))}}.bind(this)),this},Object.defineProperty(t.Event.prototype,"state",{get:function(){return this._state.getValueAtTime(t.Transport.ticks)}}),Object.defineProperty(t.Event.prototype,"startOffset",{get:function(){return this._startOffset},set:function(t){this._startOffset=t}}),Object.defineProperty(t.Event.prototype,"probability",{get:function(){return this._probability},set:function(t){this._probability=t}}),Object.defineProperty(t.Event.prototype,"humanize",{get:function(){return this._humanize},set:function(t){this._humanize=t}}),t.Event.prototype.start=function(e){return e=this.toTicks(e),this._state.getValueAtTime(e)===t.State.Stopped&&(this._state.add({state:t.State.Started,time:e,id:void 0}),this._rescheduleEvents(e)),this},t.Event.prototype.stop=function(e){if(this.cancel(e),e=this.toTicks(e),this._state.getValueAtTime(e)===t.State.Started){this._state.setStateAtTime(t.State.Stopped,e);var n=this._state.getBefore(e),i=e;null!==n&&(i=n.time),this._rescheduleEvents(i)}return this},t.Event.prototype.cancel=function(e){return e=t.defaultArg(e,-1/0),e=this.toTicks(e),this._state.forEachFrom(e,function(e){t.Transport.clear(e.id)}),this._state.cancel(e),this},t.Event.prototype._tick=function(e){var n=t.Transport.getTicksAtTime(e);if(!this.mute&&this._state.getValueAtTime(n)===t.State.Started){if(this.probability<1&&Math.random()>this.probability)return;if(this.humanize){var i=.02;t.isBoolean(this.humanize)||(i=this.toSeconds(this.humanize)),e+=(2*Math.random()-1)*i}this.callback(e,this.value)}},t.Event.prototype._getLoopDuration=function(){return Math.round((this._loopEnd-this._loopStart)/this._playbackRate)},Object.defineProperty(t.Event.prototype,"loop",{get:function(){return this._loop},set:function(t){this._loop=t,this._rescheduleEvents()}}),Object.defineProperty(t.Event.prototype,"playbackRate",{get:function(){return this._playbackRate},set:function(t){this._playbackRate=t,this._rescheduleEvents()}}),Object.defineProperty(t.Event.prototype,"loopEnd",{get:function(){return t.Ticks(this._loopEnd).toSeconds()},set:function(t){this._loopEnd=this.toTicks(t),this._loop&&this._rescheduleEvents()}}),Object.defineProperty(t.Event.prototype,"loopStart",{get:function(){return t.Ticks(this._loopStart).toSeconds()},set:function(t){this._loopStart=this.toTicks(t),this._loop&&this._rescheduleEvents()}}),Object.defineProperty(t.Event.prototype,"progress",{get:function(){if(this._loop){var e=t.Transport.ticks,n=this._state.get(e);if(null!==n&&n.state===t.State.Started){var i=this._getLoopDuration();return(e-n.time)%i/i}return 0}return 0}}),t.Event.prototype.dispose=function(){this.cancel(),this._state.dispose(),this._state=null,this.callback=null,this.value=null},t.Event}),n(function(t){return t.Loop=function(){var e=t.defaults(arguments,["callback","interval"],t.Loop);t.call(this),this._event=new t.Event({callback:this._tick.bind(this),loop:!0,loopEnd:e.interval,playbackRate:e.playbackRate,probability:e.probability}),this.callback=e.callback,this.iterations=e.iterations},t.extend(t.Loop),t.Loop.defaults={interval:"4n",callback:t.noOp,playbackRate:1,iterations:1/0,probability:!0,mute:!1},t.Loop.prototype.start=function(t){return this._event.start(t),this},t.Loop.prototype.stop=function(t){return this._event.stop(t),this},t.Loop.prototype.cancel=function(t){return this._event.cancel(t),this},t.Loop.prototype._tick=function(t){this.callback(t)},Object.defineProperty(t.Loop.prototype,"state",{get:function(){return this._event.state}}),Object.defineProperty(t.Loop.prototype,"progress",{get:function(){return this._event.progress}}),Object.defineProperty(t.Loop.prototype,"interval",{get:function(){return this._event.loopEnd},set:function(t){this._event.loopEnd=t}}),Object.defineProperty(t.Loop.prototype,"playbackRate",{get:function(){return this._event.playbackRate},set:function(t){this._event.playbackRate=t}}),Object.defineProperty(t.Loop.prototype,"humanize",{get:function(){return this._event.humanize},set:function(t){this._event.humanize=t}}),Object.defineProperty(t.Loop.prototype,"probability",{get:function(){return this._event.probability},set:function(t){this._event.probability=t}}),Object.defineProperty(t.Loop.prototype,"mute",{get:function(){return this._event.mute},set:function(t){this._event.mute=t}}),Object.defineProperty(t.Loop.prototype,"iterations",{get:function(){return!0===this._event.loop?1/0:this._event.loop},set:function(t){this._event.loop=t===1/0||t}}),t.Loop.prototype.dispose=function(){this._event.dispose(),this._event=null,this.callback=null},t.Loop}),n(function(t){return t.Part=function(){var e=t.defaults(arguments,["callback","events"],t.Part);t.Event.call(this,e),this._events=[];for(var n=0;n<e.events.length;n++)Array.isArray(e.events[n])?this.add(e.events[n][0],e.events[n][1]):this.add(e.events[n])},t.extend(t.Part,t.Event),t.Part.defaults={callback:t.noOp,loop:!1,loopEnd:"1m",loopStart:0,playbackRate:1,probability:1,humanize:!1,mute:!1,events:[]},t.Part.prototype.start=function(e,n){var i=this.toTicks(e);return this._state.getValueAtTime(i)!==t.State.Started&&(n=this._loop?t.defaultArg(n,this._loopStart):t.defaultArg(n,0),n=this.toTicks(n),this._state.add({state:t.State.Started,time:i,offset:n}),this._forEach(function(t){this._startNote(t,i,n)})),this},t.Part.prototype._startNote=function(e,n,i){n-=i,this._loop?e.startOffset>=this._loopStart&&e.startOffset<this._loopEnd?(e.startOffset<i&&(n+=this._getLoopDuration()),e.start(t.Ticks(n))):e.startOffset<this._loopStart&&e.startOffset>=i&&(e.loop=!1,e.start(t.Ticks(n))):e.startOffset>=i&&e.start(t.Ticks(n))},Object.defineProperty(t.Part.prototype,"startOffset",{get:function(){return this._startOffset},set:function(t){this._startOffset=t,this._forEach(function(t){t.startOffset+=this._startOffset})}}),t.Part.prototype.stop=function(e){var n=this.toTicks(e);return this._state.cancel(n),this._state.setStateAtTime(t.State.Stopped,n),this._forEach(function(t){t.stop(e)}),this},t.Part.prototype.at=function(e,n){e=t.TransportTime(e);for(var i=t.Ticks(1).toSeconds(),r=0;r<this._events.length;r++){var o=this._events[r];if(Math.abs(e.toTicks()-o.startOffset)<i)return t.isDefined(n)&&(o.value=n),o}return t.isDefined(n)?(this.add(e,n),this._events[this._events.length-1]):null},t.Part.prototype.add=function(e,n){var i;return e.hasOwnProperty("time")&&(e=(n=e).time),e=this.toTicks(e),n instanceof t.Event?(i=n).callback=this._tick.bind(this):i=new t.Event({callback:this._tick.bind(this),value:n}),i.startOffset=e,i.set({loopEnd:this.loopEnd,loopStart:this.loopStart,loop:this.loop,humanize:this.humanize,playbackRate:this.playbackRate,probability:this.probability}),this._events.push(i),this._restartEvent(i),this},t.Part.prototype._restartEvent=function(e){this._state.forEach(function(n){n.state===t.State.Started?this._startNote(e,n.time,n.offset):e.stop(t.Ticks(n.time))}.bind(this))},t.Part.prototype.remove=function(e,n){e.hasOwnProperty("time")&&(e=(n=e).time),e=this.toTicks(e);for(var i=this._events.length-1;i>=0;i--){var r=this._events[i];r instanceof t.Part?r.remove(e,n):r.startOffset===e&&(t.isUndef(n)||t.isDefined(n)&&r.value===n)&&(this._events.splice(i,1),r.dispose())}return this},t.Part.prototype.removeAll=function(){return this._forEach(function(t){t.dispose()}),this._events=[],this},t.Part.prototype.cancel=function(t){return this._forEach(function(e){e.cancel(t)}),this._state.cancel(this.toTicks(t)),this},t.Part.prototype._forEach=function(e,n){if(this._events){n=t.defaultArg(n,this);for(var i=this._events.length-1;i>=0;i--){var r=this._events[i];r instanceof t.Part?r._forEach(e,n):e.call(n,r)}}return this},t.Part.prototype._setAll=function(t,e){this._forEach(function(n){n[t]=e})},t.Part.prototype._tick=function(t,e){this.mute||this.callback(t,e)},t.Part.prototype._testLoopBoundries=function(e){e.startOffset<this._loopStart||e.startOffset>=this._loopEnd?e.cancel(0):e.state===t.State.Stopped&&this._restartEvent(e)},Object.defineProperty(t.Part.prototype,"probability",{get:function(){return this._probability},set:function(t){this._probability=t,this._setAll("probability",t)}}),Object.defineProperty(t.Part.prototype,"humanize",{get:function(){return this._humanize},set:function(t){this._humanize=t,this._setAll("humanize",t)}}),Object.defineProperty(t.Part.prototype,"loop",{get:function(){return this._loop},set:function(t){this._loop=t,this._forEach(function(e){e._loopStart=this._loopStart,e._loopEnd=this._loopEnd,e.loop=t,this._testLoopBoundries(e)})}}),Object.defineProperty(t.Part.prototype,"loopEnd",{get:function(){return t.Ticks(this._loopEnd).toSeconds()},set:function(t){this._loopEnd=this.toTicks(t),this._loop&&this._forEach(function(e){e.loopEnd=t,this._testLoopBoundries(e)})}}),Object.defineProperty(t.Part.prototype,"loopStart",{get:function(){return t.Ticks(this._loopStart).toSeconds()},set:function(t){this._loopStart=this.toTicks(t),this._loop&&this._forEach(function(t){t.loopStart=this.loopStart,this._testLoopBoundries(t)})}}),Object.defineProperty(t.Part.prototype,"playbackRate",{get:function(){return this._playbackRate},set:function(t){this._playbackRate=t,this._setAll("playbackRate",t)}}),Object.defineProperty(t.Part.prototype,"length",{get:function(){return this._events.length}}),t.Part.prototype.dispose=function(){return this.removeAll(),this._state.dispose(),this._state=null,this.callback=null,this._events=null,this},t.Part}),n(function(t){return t.Pattern=function(){var e=t.defaults(arguments,["callback","values","pattern"],t.Pattern);t.Loop.call(this,e),this._pattern=new t.CtrlPattern({values:e.values,type:e.pattern,index:e.index})},t.extend(t.Pattern,t.Loop),t.Pattern.defaults={pattern:t.CtrlPattern.Type.Up,callback:t.noOp,values:[]},t.Pattern.prototype._tick=function(t){this.callback(t,this._pattern.value),this._pattern.next()},Object.defineProperty(t.Pattern.prototype,"index",{get:function(){return this._pattern.index},set:function(t){this._pattern.index=t}}),Object.defineProperty(t.Pattern.prototype,"values",{get:function(){return this._pattern.values},set:function(t){this._pattern.values=t}}),Object.defineProperty(t.Pattern.prototype,"value",{get:function(){return this._pattern.value}}),Object.defineProperty(t.Pattern.prototype,"pattern",{get:function(){return this._pattern.type},set:function(t){this._pattern.type=t}}),t.Pattern.prototype.dispose=function(){t.Loop.prototype.dispose.call(this),this._pattern.dispose(),this._pattern=null},t.Pattern}),n(function(t){return t.Sequence=function(){var e=t.defaults(arguments,["callback","events","subdivision"],t.Sequence),n=e.events;if(delete e.events,t.Part.call(this,e),this._subdivision=this.toTicks(e.subdivision),t.isUndef(e.loopEnd)&&t.isDefined(n)&&(this._loopEnd=n.length*this._subdivision),this._loop=!0,t.isDefined(n))for(var i=0;i<n.length;i++)this.add(i,n[i])},t.extend(t.Sequence,t.Part),t.Sequence.defaults={subdivision:"4n"},Object.defineProperty(t.Sequence.prototype,"subdivision",{get:function(){return t.Ticks(this._subdivision).toSeconds()}}),t.Sequence.prototype.at=function(e,n){return t.isArray(n)&&this.remove(e),t.Part.prototype.at.call(this,this._indexTime(e),n)},t.Sequence.prototype.add=function(e,n){if(null===n)return this;if(t.isArray(n)){var i=Math.round(this._subdivision/n.length);n=new t.Sequence(this._tick.bind(this),n,t.Ticks(i))}return t.Part.prototype.add.call(this,this._indexTime(e),n),this},t.Sequence.prototype.remove=function(e,n){return t.Part.prototype.remove.call(this,this._indexTime(e),n),this},t.Sequence.prototype._indexTime=function(e){return e instanceof t.TransportTime?e:t.Ticks(e*this._subdivision+this.startOffset).toSeconds()},t.Sequence.prototype.dispose=function(){return t.Part.prototype.dispose.call(this),this},t.Sequence}),n(function(t){return t.PulseOscillator=function(){var e=t.defaults(arguments,["frequency","width"],t.Oscillator);t.Source.call(this,e),this.width=new t.Signal(e.width,t.Type.NormalRange),this._widthGate=new t.Gain,this._sawtooth=new t.Oscillator({frequency:e.frequency,detune:e.detune,type:"sawtooth",phase:e.phase}),this.frequency=this._sawtooth.frequency,this.detune=this._sawtooth.detune,this._thresh=new t.WaveShaper(function(t){return t<0?-1:1}),this._sawtooth.chain(this._thresh,this.output),this.width.chain(this._widthGate,this._thresh),this._readOnly(["width","frequency","detune"])},t.extend(t.PulseOscillator,t.Source),t.PulseOscillator.defaults={frequency:440,detune:0,phase:0,width:.2},t.PulseOscillator.prototype._start=function(t){t=this.toSeconds(t),this._sawtooth.start(t),this._widthGate.gain.setValueAtTime(1,t)},t.PulseOscillator.prototype._stop=function(t){t=this.toSeconds(t),this._sawtooth.stop(t),this._widthGate.gain.setValueAtTime(0,t)},t.PulseOscillator.prototype.restart=function(t){this._sawtooth.restart(t)},Object.defineProperty(t.PulseOscillator.prototype,"phase",{get:function(){return this._sawtooth.phase},set:function(t){this._sawtooth.phase=t}}),Object.defineProperty(t.PulseOscillator.prototype,"type",{get:function(){return"pulse"}}),Object.defineProperty(t.PulseOscillator.prototype,"partials",{get:function(){return[]}}),t.PulseOscillator.prototype.dispose=function(){return t.Source.prototype.dispose.call(this),this._sawtooth.dispose(),this._sawtooth=null,this._writable(["width","frequency","detune"]),this.width.dispose(),this.width=null,this._widthGate.dispose(),this._widthGate=null,this._thresh.dispose(),this._thresh=null,this.frequency=null,this.detune=null,this},t.PulseOscillator}),n(function(t){return t.PWMOscillator=function(){var e=t.defaults(arguments,["frequency","modulationFrequency"],t.PWMOscillator);t.Source.call(this,e),this._pulse=new t.PulseOscillator(e.modulationFrequency),this._pulse._sawtooth.type="sine",this._modulator=new t.Oscillator({frequency:e.frequency,detune:e.detune,phase:e.phase}),this._scale=new t.Multiply(2),this.frequency=this._modulator.frequency,this.detune=this._modulator.detune,this.modulationFrequency=this._pulse.frequency,this._modulator.chain(this._scale,this._pulse.width),this._pulse.connect(this.output),this._readOnly(["modulationFrequency","frequency","detune"])},t.extend(t.PWMOscillator,t.Source),t.PWMOscillator.defaults={frequency:440,detune:0,phase:0,modulationFrequency:.4},t.PWMOscillator.prototype._start=function(t){t=this.toSeconds(t),this._modulator.start(t),this._pulse.start(t)},t.PWMOscillator.prototype._stop=function(t){t=this.toSeconds(t),this._modulator.stop(t),this._pulse.stop(t)},t.PWMOscillator.prototype.restart=function(t){this._modulator.restart(t),this._pulse.restart(t)},Object.defineProperty(t.PWMOscillator.prototype,"type",{get:function(){return"pwm"}}),Object.defineProperty(t.PWMOscillator.prototype,"partials",{get:function(){return[]}}),Object.defineProperty(t.PWMOscillator.prototype,"phase",{get:function(){return this._modulator.phase},set:function(t){this._modulator.phase=t}}),t.PWMOscillator.prototype.dispose=function(){return t.Source.prototype.dispose.call(this),this._pulse.dispose(),this._pulse=null,this._scale.dispose(),this._scale=null,this._modulator.dispose(),this._modulator=null,this._writable(["modulationFrequency","frequency","detune"]),this.frequency=null,this.detune=null,this.modulationFrequency=null,this},t.PWMOscillator}),n(function(t){return t.FMOscillator=function(){var e=t.defaults(arguments,["frequency","type","modulationType"],t.FMOscillator);t.Source.call(this,e),this._carrier=new t.Oscillator(e.frequency,e.type),this.frequency=new t.Signal(e.frequency,t.Type.Frequency),this.detune=this._carrier.detune,this.detune.value=e.detune,this.modulationIndex=new t.Multiply(e.modulationIndex),this.modulationIndex.units=t.Type.Positive,this._modulator=new t.Oscillator(e.frequency,e.modulationType),this.harmonicity=new t.Multiply(e.harmonicity),this.harmonicity.units=t.Type.Positive,this._modulationNode=new t.Gain(0),this.frequency.connect(this._carrier.frequency),this.frequency.chain(this.harmonicity,this._modulator.frequency),this.frequency.chain(this.modulationIndex,this._modulationNode),this._modulator.connect(this._modulationNode.gain),this._modulationNode.connect(this._carrier.frequency),this._carrier.connect(this.output),this.detune.connect(this._modulator.detune),this.phase=e.phase,this._readOnly(["modulationIndex","frequency","detune","harmonicity"])},t.extend(t.FMOscillator,t.Source),t.FMOscillator.defaults={frequency:440,detune:0,phase:0,modulationIndex:2,modulationType:"square",harmonicity:1},t.FMOscillator.prototype._start=function(t){this._modulator.start(t),this._carrier.start(t)},t.FMOscillator.prototype._stop=function(t){this._modulator.stop(t),this._carrier.stop(t)},t.FMOscillator.prototype.restart=function(t){this._modulator.restart(t),this._carrier.restart(t)},Object.defineProperty(t.FMOscillator.prototype,"type",{get:function(){return this._carrier.type},set:function(t){this._carrier.type=t}}),Object.defineProperty(t.FMOscillator.prototype,"modulationType",{get:function(){return this._modulator.type},set:function(t){this._modulator.type=t}}),Object.defineProperty(t.FMOscillator.prototype,"phase",{get:function(){return this._carrier.phase},set:function(t){this._carrier.phase=t,this._modulator.phase=t}}),Object.defineProperty(t.FMOscillator.prototype,"partials",{get:function(){return this._carrier.partials},set:function(t){this._carrier.partials=t}}),t.FMOscillator.prototype.dispose=function(){return t.Source.prototype.dispose.call(this),this._writable(["modulationIndex","frequency","detune","harmonicity"]),this.frequency.dispose(),this.frequency=null,this.detune=null,this.harmonicity.dispose(),this.harmonicity=null,this._carrier.dispose(),this._carrier=null,this._modulator.dispose(),this._modulator=null,this._modulationNode.dispose(),this._modulationNode=null,this.modulationIndex.dispose(),this.modulationIndex=null,this},t.FMOscillator}),n(function(t){return t.AMOscillator=function(){var e=t.defaults(arguments,["frequency","type","modulationType"],t.AMOscillator);t.Source.call(this,e),this._carrier=new t.Oscillator(e.frequency,e.type),this.frequency=this._carrier.frequency,this.detune=this._carrier.detune,this.detune.value=e.detune,this._modulator=new t.Oscillator(e.frequency,e.modulationType),this._modulationScale=new t.AudioToGain,this.harmonicity=new t.Multiply(e.harmonicity),this.harmonicity.units=t.Type.Positive,this._modulationNode=new t.Gain(0),this.frequency.chain(this.harmonicity,this._modulator.frequency),this.detune.connect(this._modulator.detune),this._modulator.chain(this._modulationScale,this._modulationNode.gain),this._carrier.chain(this._modulationNode,this.output),this.phase=e.phase,this._readOnly(["frequency","detune","harmonicity"])},t.extend(t.AMOscillator,t.Oscillator),t.AMOscillator.defaults={frequency:440,detune:0,phase:0,modulationType:"square",harmonicity:1},t.AMOscillator.prototype._start=function(t){this._modulator.start(t),this._carrier.start(t)},t.AMOscillator.prototype._stop=function(t){this._modulator.stop(t),this._carrier.stop(t)},t.AMOscillator.prototype.restart=function(t){this._modulator.restart(t),this._carrier.restart(t)},Object.defineProperty(t.AMOscillator.prototype,"type",{get:function(){return this._carrier.type},set:function(t){this._carrier.type=t}}),Object.defineProperty(t.AMOscillator.prototype,"modulationType",{get:function(){return this._modulator.type},set:function(t){this._modulator.type=t}}),Object.defineProperty(t.AMOscillator.prototype,"phase",{get:function(){return this._carrier.phase},set:function(t){this._carrier.phase=t,this._modulator.phase=t}}),Object.defineProperty(t.AMOscillator.prototype,"partials",{get:function(){return this._carrier.partials},set:function(t){this._carrier.partials=t}}),t.AMOscillator.prototype.dispose=function(){return t.Source.prototype.dispose.call(this),this._writable(["frequency","detune","harmonicity"]),this.frequency=null,this.detune=null,this.harmonicity.dispose(),this.harmonicity=null,this._carrier.dispose(),this._carrier=null,this._modulator.dispose(),this._modulator=null,this._modulationNode.dispose(),this._modulationNode=null,this._modulationScale.dispose(),this._modulationScale=null,this},t.AMOscillator}),n(function(t){return t.FatOscillator=function(){var e=t.defaults(arguments,["frequency","type","spread"],t.FatOscillator);t.Source.call(this,e),this.frequency=new t.Signal(e.frequency,t.Type.Frequency),this.detune=new t.Signal(e.detune,t.Type.Cents),this._oscillators=[],this._spread=e.spread,this._type=e.type,this._phase=e.phase,this._partials=t.defaultArg(e.partials,[]),this.count=e.count,this._readOnly(["frequency","detune"])},t.extend(t.FatOscillator,t.Source),t.FatOscillator.defaults={frequency:440,detune:0,phase:0,spread:20,count:3,type:"sawtooth"},t.FatOscillator.prototype._start=function(t){t=this.toSeconds(t),this._forEach(function(e){e.start(t)})},t.FatOscillator.prototype._stop=function(t){t=this.toSeconds(t),this._forEach(function(e){e.stop(t)})},t.FatOscillator.prototype.restart=function(t){t=this.toSeconds(t),this._forEach(function(e){e.restart(t)})},t.FatOscillator.prototype._forEach=function(t){for(var e=0;e<this._oscillators.length;e++)t.call(this,this._oscillators[e],e)},Object.defineProperty(t.FatOscillator.prototype,"type",{get:function(){return this._type},set:function(t){this._type=t,this._forEach(function(e){e.type=t})}}),Object.defineProperty(t.FatOscillator.prototype,"spread",{get:function(){return this._spread},set:function(t){if(this._spread=t,this._oscillators.length>1){var e=-t/2,n=t/(this._oscillators.length-1);this._forEach(function(t,i){t.detune.value=e+n*i})}}}),Object.defineProperty(t.FatOscillator.prototype,"count",{get:function(){return this._oscillators.length},set:function(e){if(e=Math.max(e,1),this._oscillators.length!==e){this._forEach(function(t){t.dispose()}),this._oscillators=[];for(var n=0;n<e;n++){var i=new t.Oscillator;this.type===t.Oscillator.Type.Custom?i.partials=this._partials:i.type=this._type,i.phase=this._phase,i.volume.value=-6-1.1*e,this.frequency.connect(i.frequency),this.detune.connect(i.detune),i.connect(this.output),this._oscillators[n]=i}this.spread=this._spread,this.state===t.State.Started&&this._forEach(function(t){t.start()})}}}),Object.defineProperty(t.FatOscillator.prototype,"phase",{get:function(){return this._phase},set:function(t){this._phase=t,this._forEach(function(e){e.phase=t})}}),Object.defineProperty(t.FatOscillator.prototype,"partials",{get:function(){return this._partials},set:function(e){this._partials=e,this._type=t.Oscillator.Type.Custom,this._forEach(function(t){t.partials=e})}}),t.FatOscillator.prototype.dispose=function(){return t.Source.prototype.dispose.call(this),this._writable(["frequency","detune"]),this.frequency.dispose(),this.frequency=null,this.detune.dispose(),this.detune=null,this._forEach(function(t){t.dispose()}),this._oscillators=null,this._partials=null,this},t.FatOscillator}),n(function(t){t.OmniOscillator=function(){var e=t.defaults(arguments,["frequency","type"],t.OmniOscillator);t.Source.call(this,e),this.frequency=new t.Signal(e.frequency,t.Type.Frequency),this.detune=new t.Signal(e.detune,t.Type.Cents),this._sourceType=void 0,this._oscillator=null,this.type=e.type,this._readOnly(["frequency","detune"]),this.set(e)},t.extend(t.OmniOscillator,t.Source),t.OmniOscillator.defaults={frequency:440,detune:0,type:"sine",phase:0};var e="PulseOscillator",n="PWMOscillator",i="Oscillator",r="FMOscillator",o="AMOscillator",s="FatOscillator";return t.OmniOscillator.prototype._start=function(t){this._oscillator.start(t)},t.OmniOscillator.prototype._stop=function(t){this._oscillator.stop(t)},t.OmniOscillator.prototype.restart=function(t){this._oscillator.restart(t)},Object.defineProperty(t.OmniOscillator.prototype,"type",{get:function(){var t="";return this._sourceType===r?t="fm":this._sourceType===o?t="am":this._sourceType===s&&(t="fat"),t+this._oscillator.type},set:function(t){"fm"===t.substr(0,2)?(this._createNewOscillator(r),this._oscillator.type=t.substr(2)):"am"===t.substr(0,2)?(this._createNewOscillator(o),this._oscillator.type=t.substr(2)):"fat"===t.substr(0,3)?(this._createNewOscillator(s),this._oscillator.type=t.substr(3)):"pwm"===t?this._createNewOscillator(n):"pulse"===t?this._createNewOscillator(e):(this._createNewOscillator(i),this._oscillator.type=t)}}),Object.defineProperty(t.OmniOscillator.prototype,"partials",{get:function(){return this._oscillator.partials},set:function(t){this._oscillator.partials=t}}),t.OmniOscillator.prototype.set=function(e,n){return"type"===e?this.type=n:t.isObject(e)&&e.hasOwnProperty("type")&&(this.type=e.type),t.prototype.set.apply(this,arguments),this},t.OmniOscillator.prototype._createNewOscillator=function(e){if(e!==this._sourceType){this._sourceType=e;var n=t[e],i=this.now();if(null!==this._oscillator){var r=this._oscillator;r.stop(i),this.context.setTimeout(function(){r.dispose(),r=null},this.blockTime)}this._oscillator=new n,this.frequency.connect(this._oscillator.frequency),this.detune.connect(this._oscillator.detune),this._oscillator.connect(this.output),this.state===t.State.Started&&this._oscillator.start(i)}},Object.defineProperty(t.OmniOscillator.prototype,"phase",{get:function(){return this._oscillator.phase},set:function(t){this._oscillator.phase=t}}),Object.defineProperty(t.OmniOscillator.prototype,"width",{get:function(){if(this._sourceType===e)return this._oscillator.width}}),Object.defineProperty(t.OmniOscillator.prototype,"count",{get:function(){if(this._sourceType===s)return this._oscillator.count},set:function(t){this._sourceType===s&&(this._oscillator.count=t)}}),Object.defineProperty(t.OmniOscillator.prototype,"spread",{get:function(){if(this._sourceType===s)return this._oscillator.spread},set:function(t){this._sourceType===s&&(this._oscillator.spread=t)}}),Object.defineProperty(t.OmniOscillator.prototype,"modulationType",{get:function(){if(this._sourceType===r||this._sourceType===o)return this._oscillator.modulationType},set:function(t){this._sourceType!==r&&this._sourceType!==o||(this._oscillator.modulationType=t)}}),Object.defineProperty(t.OmniOscillator.prototype,"modulationIndex",{get:function(){if(this._sourceType===r)return this._oscillator.modulationIndex}}),Object.defineProperty(t.OmniOscillator.prototype,"harmonicity",{get:function(){if(this._sourceType===r||this._sourceType===o)return this._oscillator.harmonicity}}),Object.defineProperty(t.OmniOscillator.prototype,"modulationFrequency",{get:function(){if(this._sourceType===n)return this._oscillator.modulationFrequency}}),t.OmniOscillator.prototype.dispose=function(){return t.Source.prototype.dispose.call(this),this._writable(["frequency","detune"]),this.detune.dispose(),this.detune=null,this.frequency.dispose(),this.frequency=null,this._oscillator.dispose(),this._oscillator=null,this._sourceType=null,this},t.OmniOscillator}),n(function(t){return t.Instrument=function(e){e=t.defaultArg(e,t.Instrument.defaults),t.AudioNode.call(this),this._volume=this.output=new t.Volume(e.volume),this.volume=this._volume.volume,this._readOnly("volume"),this._scheduledEvents=[]},t.extend(t.Instrument,t.AudioNode),t.Instrument.defaults={volume:0},t.Instrument.prototype.triggerAttack=t.noOp,t.Instrument.prototype.triggerRelease=t.noOp,t.Instrument.prototype.sync=function(){return this._syncMethod("triggerAttack",1),this._syncMethod("triggerRelease",0),this},t.Instrument.prototype._syncMethod=function(e,n){var i=this["_original_"+e]=this[e];this[e]=function(){var e=Array.prototype.slice.call(arguments),r=e[n],o=t.Transport.schedule(function(t){e[n]=t,i.apply(this,e)}.bind(this),r);this._scheduledEvents.push(o)}.bind(this)},t.Instrument.prototype.unsync=function(){return this._scheduledEvents.forEach(function(e){t.Transport.clear(e)}),this._scheduledEvents=[],this._original_triggerAttack&&(this.triggerAttack=this._original_triggerAttack,this.triggerRelease=this._original_triggerRelease),this},t.Instrument.prototype.triggerAttackRelease=function(t,e,n,i){return n=this.toSeconds(n),e=this.toSeconds(e),this.triggerAttack(t,n,i),this.triggerRelease(n+e),this},t.Instrument.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._volume.dispose(),this._volume=null,this._writable(["volume"]),this.volume=null,this.unsync(),this._scheduledEvents=null,this},t.Instrument}),n(function(t){return t.Monophonic=function(e){e=t.defaultArg(e,t.Monophonic.defaults),t.Instrument.call(this,e),this.portamento=e.portamento},t.extend(t.Monophonic,t.Instrument),t.Monophonic.defaults={portamento:0},t.Monophonic.prototype.triggerAttack=function(t,e,n){return e=this.toSeconds(e),this._triggerEnvelopeAttack(e,n),this.setNote(t,e),this},t.Monophonic.prototype.triggerRelease=function(t){return t=this.toSeconds(t),this._triggerEnvelopeRelease(t),this},t.Monophonic.prototype._triggerEnvelopeAttack=function(){},t.Monophonic.prototype._triggerEnvelopeRelease=function(){},t.Monophonic.prototype.getLevelAtTime=function(t){return t=this.toSeconds(t),this.envelope.getValueAtTime(t)},t.Monophonic.prototype.setNote=function(t,e){if(e=this.toSeconds(e),this.portamento>0&&this.getLevelAtTime(e)>.05){var n=this.toSeconds(this.portamento);this.frequency.exponentialRampTo(t,n,e)}else this.frequency.setValueAtTime(t,e);return this},t.Monophonic}),n(function(t){return t.Synth=function(e){e=t.defaultArg(e,t.Synth.defaults),t.Monophonic.call(this,e),this.oscillator=new t.OmniOscillator(e.oscillator),this.frequency=this.oscillator.frequency,this.detune=this.oscillator.detune,this.envelope=new t.AmplitudeEnvelope(e.envelope),this.oscillator.chain(this.envelope,this.output),this._readOnly(["oscillator","frequency","detune","envelope"])},t.extend(t.Synth,t.Monophonic),t.Synth.defaults={oscillator:{type:"triangle"},envelope:{attack:.005,decay:.1,sustain:.3,release:1}},t.Synth.prototype._triggerEnvelopeAttack=function(t,e){return this.envelope.triggerAttack(t,e),this.oscillator.start(t),0===this.envelope.sustain&&this.oscillator.stop(t+this.envelope.attack+this.envelope.decay),this},t.Synth.prototype._triggerEnvelopeRelease=function(t){return t=this.toSeconds(t),this.envelope.triggerRelease(t),this.oscillator.stop(t+this.envelope.release),this},t.Synth.prototype.dispose=function(){return t.Monophonic.prototype.dispose.call(this),this._writable(["oscillator","frequency","detune","envelope"]),this.oscillator.dispose(),this.oscillator=null,this.envelope.dispose(),this.envelope=null,this.frequency=null,this.detune=null,this},t.Synth}),n(function(t){return t.AMSynth=function(e){e=t.defaultArg(e,t.AMSynth.defaults),t.Monophonic.call(this,e),this._carrier=new t.Synth,this._carrier.volume.value=-10,this.oscillator=this._carrier.oscillator,this.envelope=this._carrier.envelope.set(e.envelope),this._modulator=new t.Synth,this._modulator.volume.value=-10,this.modulation=this._modulator.oscillator.set(e.modulation),this.modulationEnvelope=this._modulator.envelope.set(e.modulationEnvelope),this.frequency=new t.Signal(440,t.Type.Frequency),this.detune=new t.Signal(e.detune,t.Type.Cents),this.harmonicity=new t.Multiply(e.harmonicity),this.harmonicity.units=t.Type.Positive,this._modulationScale=new t.AudioToGain,this._modulationNode=new t.Gain,this.frequency.connect(this._carrier.frequency),this.frequency.chain(this.harmonicity,this._modulator.frequency),this.detune.fan(this._carrier.detune,this._modulator.detune),this._modulator.chain(this._modulationScale,this._modulationNode.gain),this._carrier.chain(this._modulationNode,this.output),this._readOnly(["frequency","harmonicity","oscillator","envelope","modulation","modulationEnvelope","detune"])},t.extend(t.AMSynth,t.Monophonic),t.AMSynth.defaults={harmonicity:3,detune:0,oscillator:{type:"sine"},envelope:{attack:.01,decay:.01,sustain:1,release:.5},modulation:{type:"square"},modulationEnvelope:{attack:.5,decay:0,sustain:1,release:.5}},t.AMSynth.prototype._triggerEnvelopeAttack=function(t,e){return t=this.toSeconds(t),this._carrier._triggerEnvelopeAttack(t,e),this._modulator._triggerEnvelopeAttack(t),this},t.AMSynth.prototype._triggerEnvelopeRelease=function(t){return this._carrier._triggerEnvelopeRelease(t),this._modulator._triggerEnvelopeRelease(t),this},t.AMSynth.prototype.dispose=function(){return t.Monophonic.prototype.dispose.call(this),this._writable(["frequency","harmonicity","oscillator","envelope","modulation","modulationEnvelope","detune"]),this._carrier.dispose(),this._carrier=null,this._modulator.dispose(),this._modulator=null,this.frequency.dispose(),this.frequency=null,this.detune.dispose(),this.detune=null,this.harmonicity.dispose(),this.harmonicity=null,this._modulationScale.dispose(),this._modulationScale=null,this._modulationNode.dispose(),this._modulationNode=null,this.oscillator=null,this.envelope=null,this.modulationEnvelope=null,this.modulation=null,this},t.AMSynth}),n(function(t){return t.MonoSynth=function(e){e=t.defaultArg(e,t.MonoSynth.defaults),t.Monophonic.call(this,e),this.oscillator=new t.OmniOscillator(e.oscillator),this.frequency=this.oscillator.frequency,this.detune=this.oscillator.detune,this.filter=new t.Filter(e.filter),this.filterEnvelope=new t.FrequencyEnvelope(e.filterEnvelope),this.envelope=new t.AmplitudeEnvelope(e.envelope),this.oscillator.chain(this.filter,this.envelope,this.output),this.filterEnvelope.connect(this.filter.frequency),this._readOnly(["oscillator","frequency","detune","filter","filterEnvelope","envelope"])},t.extend(t.MonoSynth,t.Monophonic),t.MonoSynth.defaults={frequency:"C4",detune:0,oscillator:{type:"square"},filter:{Q:6,type:"lowpass",rolloff:-24},envelope:{attack:.005,decay:.1,sustain:.9,release:1},filterEnvelope:{attack:.06,decay:.2,sustain:.5,release:2,baseFrequency:200,octaves:7,exponent:2}},t.MonoSynth.prototype._triggerEnvelopeAttack=function(t,e){return t=this.toSeconds(t),this.envelope.triggerAttack(t,e),this.filterEnvelope.triggerAttack(t),this.oscillator.start(t),0===this.envelope.sustain&&this.oscillator.stop(t+this.envelope.attack+this.envelope.decay),this},t.MonoSynth.prototype._triggerEnvelopeRelease=function(t){return this.envelope.triggerRelease(t),this.filterEnvelope.triggerRelease(t),this.oscillator.stop(t+this.envelope.release),this},t.MonoSynth.prototype.dispose=function(){return t.Monophonic.prototype.dispose.call(this),this._writable(["oscillator","frequency","detune","filter","filterEnvelope","envelope"]),this.oscillator.dispose(),this.oscillator=null,this.envelope.dispose(),this.envelope=null,this.filterEnvelope.dispose(),this.filterEnvelope=null,this.filter.dispose(),this.filter=null,this.frequency=null,this.detune=null,this},t.MonoSynth}),n(function(t){return t.DuoSynth=function(e){e=t.defaultArg(e,t.DuoSynth.defaults),t.Monophonic.call(this,e),this.voice0=new t.MonoSynth(e.voice0),this.voice0.volume.value=-10,this.voice1=new t.MonoSynth(e.voice1),this.voice1.volume.value=-10,this._vibrato=new t.LFO(e.vibratoRate,-50,50),this._vibrato.start(),this.vibratoRate=this._vibrato.frequency,this._vibratoGain=new t.Gain(e.vibratoAmount,t.Type.Positive),this.vibratoAmount=this._vibratoGain.gain,this.frequency=new t.Signal(440,t.Type.Frequency),this.harmonicity=new t.Multiply(e.harmonicity),this.harmonicity.units=t.Type.Positive,this.frequency.connect(this.voice0.frequency),this.frequency.chain(this.harmonicity,this.voice1.frequency),this._vibrato.connect(this._vibratoGain),this._vibratoGain.fan(this.voice0.detune,this.voice1.detune),this.voice0.connect(this.output),this.voice1.connect(this.output),this._readOnly(["voice0","voice1","frequency","vibratoAmount","vibratoRate"])},t.extend(t.DuoSynth,t.Monophonic),t.DuoSynth.defaults={vibratoAmount:.5,vibratoRate:5,harmonicity:1.5,voice0:{volume:-10,portamento:0,oscillator:{type:"sine"},filterEnvelope:{attack:.01,decay:0,sustain:1,release:.5},envelope:{attack:.01,decay:0,sustain:1,release:.5}},voice1:{volume:-10,portamento:0,oscillator:{type:"sine"},filterEnvelope:{attack:.01,decay:0,sustain:1,release:.5},envelope:{attack:.01,decay:0,sustain:1,release:.5}}},t.DuoSynth.prototype._triggerEnvelopeAttack=function(t,e){return t=this.toSeconds(t),this.voice0._triggerEnvelopeAttack(t,e),this.voice1._triggerEnvelopeAttack(t,e),this},t.DuoSynth.prototype._triggerEnvelopeRelease=function(t){return this.voice0._triggerEnvelopeRelease(t),this.voice1._triggerEnvelopeRelease(t),this},t.DuoSynth.prototype.getLevelAtTime=function(t){return(this.voice0.getLevelAtTime(t)+this.voice1.getLevelAtTime(t))/2},t.DuoSynth.prototype.dispose=function(){return t.Monophonic.prototype.dispose.call(this),this._writable(["voice0","voice1","frequency","vibratoAmount","vibratoRate"]),this.voice0.dispose(),this.voice0=null,this.voice1.dispose(),this.voice1=null,this.frequency.dispose(),this.frequency=null,this._vibratoGain.dispose(),this._vibratoGain=null,this._vibrato=null,this.harmonicity.dispose(),this.harmonicity=null,this.vibratoAmount.dispose(),this.vibratoAmount=null,this.vibratoRate=null,this},t.DuoSynth}),n(function(t){return t.FMSynth=function(e){e=t.defaultArg(e,t.FMSynth.defaults),t.Monophonic.call(this,e),this._carrier=new t.Synth(e.carrier),this._carrier.volume.value=-10,this.oscillator=this._carrier.oscillator,this.envelope=this._carrier.envelope.set(e.envelope),this._modulator=new t.Synth(e.modulator),this._modulator.volume.value=-10,this.modulation=this._modulator.oscillator.set(e.modulation),this.modulationEnvelope=this._modulator.envelope.set(e.modulationEnvelope),this.frequency=new t.Signal(440,t.Type.Frequency),this.detune=new t.Signal(e.detune,t.Type.Cents),this.harmonicity=new t.Multiply(e.harmonicity),this.harmonicity.units=t.Type.Positive,this.modulationIndex=new t.Multiply(e.modulationIndex),this.modulationIndex.units=t.Type.Positive,this._modulationNode=new t.Gain(0),this.frequency.connect(this._carrier.frequency),this.frequency.chain(this.harmonicity,this._modulator.frequency),this.frequency.chain(this.modulationIndex,this._modulationNode),this.detune.fan(this._carrier.detune,this._modulator.detune),this._modulator.connect(this._modulationNode.gain),this._modulationNode.connect(this._carrier.frequency),this._carrier.connect(this.output),this._readOnly(["frequency","harmonicity","modulationIndex","oscillator","envelope","modulation","modulationEnvelope","detune"])},t.extend(t.FMSynth,t.Monophonic),t.FMSynth.defaults={harmonicity:3,modulationIndex:10,detune:0,oscillator:{type:"sine"},envelope:{attack:.01,decay:.01,sustain:1,release:.5},modulation:{type:"square"},modulationEnvelope:{attack:.5,decay:0,sustain:1,release:.5}},t.FMSynth.prototype._triggerEnvelopeAttack=function(t,e){return t=this.toSeconds(t),this._carrier._triggerEnvelopeAttack(t,e),this._modulator._triggerEnvelopeAttack(t),this},t.FMSynth.prototype._triggerEnvelopeRelease=function(t){return t=this.toSeconds(t),this._carrier._triggerEnvelopeRelease(t),this._modulator._triggerEnvelopeRelease(t),this},t.FMSynth.prototype.dispose=function(){return t.Monophonic.prototype.dispose.call(this),this._writable(["frequency","harmonicity","modulationIndex","oscillator","envelope","modulation","modulationEnvelope","detune"]),this._carrier.dispose(),this._carrier=null,this._modulator.dispose(),this._modulator=null,this.frequency.dispose(),this.frequency=null,this.detune.dispose(),this.detune=null,this.modulationIndex.dispose(),this.modulationIndex=null,this.harmonicity.dispose(),this.harmonicity=null,this._modulationNode.dispose(),this._modulationNode=null,this.oscillator=null,this.envelope=null,this.modulationEnvelope=null,this.modulation=null,this},t.FMSynth}),n(function(t){return t.MembraneSynth=function(e){e=t.defaultArg(e,t.MembraneSynth.defaults),t.Instrument.call(this,e),this.oscillator=new t.OmniOscillator(e.oscillator),this.envelope=new t.AmplitudeEnvelope(e.envelope),this.octaves=e.octaves,this.pitchDecay=e.pitchDecay,this.oscillator.chain(this.envelope,this.output),this._readOnly(["oscillator","envelope"])},t.extend(t.MembraneSynth,t.Instrument),t.MembraneSynth.defaults={pitchDecay:.05,octaves:10,oscillator:{type:"sine"},envelope:{attack:.001,decay:.4,sustain:.01,release:1.4,attackCurve:"exponential"}},t.MembraneSynth.prototype.triggerAttack=function(t,e,n){e=this.toSeconds(e);var i=(t=this.toFrequency(t))*this.octaves;return this.oscillator.frequency.setValueAtTime(i,e),this.oscillator.frequency.exponentialRampToValueAtTime(t,e+this.toSeconds(this.pitchDecay)),this.envelope.triggerAttack(e,n),this.oscillator.start(e),this},t.MembraneSynth.prototype.triggerRelease=function(t){return t=this.toSeconds(t),this.envelope.triggerRelease(t),this.oscillator.stop(t+this.envelope.release),this},t.MembraneSynth.prototype.dispose=function(){return t.Instrument.prototype.dispose.call(this),this._writable(["oscillator","envelope"]),this.oscillator.dispose(),this.oscillator=null,this.envelope.dispose(),this.envelope=null,this},t.MembraneSynth}),n(function(t){var e=[1,1.483,1.932,2.546,2.63,3.897];return t.MetalSynth=function(n){n=t.defaultArg(n,t.MetalSynth.defaults),t.Instrument.call(this,n),this.frequency=new t.Signal(n.frequency,t.Type.Frequency),this._oscillators=[],this._freqMultipliers=[],this._amplitue=new t.Gain(0).connect(this.output),this._highpass=new t.Filter({type:"highpass",Q:-3.0102999566398125}).connect(this._amplitue),this._octaves=n.octaves,this._filterFreqScaler=new t.Scale(n.resonance,7e3),this.envelope=new t.Envelope({attack:n.envelope.attack,attackCurve:"linear",decay:n.envelope.decay,sustain:0,release:n.envelope.release}).chain(this._filterFreqScaler,this._highpass.frequency),this.envelope.connect(this._amplitue.gain);for(var i=0;i<e.length;i++){var r=new t.FMOscillator({type:"square",modulationType:"square",harmonicity:n.harmonicity,modulationIndex:n.modulationIndex});r.connect(this._highpass),this._oscillators[i]=r;var o=new t.Multiply(e[i]);this._freqMultipliers[i]=o,this.frequency.chain(o,r.frequency)}this.octaves=n.octaves},t.extend(t.MetalSynth,t.Instrument),t.MetalSynth.defaults={frequency:200,envelope:{attack:.001,decay:1.4,release:.2},harmonicity:5.1,modulationIndex:32,resonance:4e3,octaves:1.5},t.MetalSynth.prototype.triggerAttack=function(e,n){return e=this.toSeconds(e),n=t.defaultArg(n,1),this.envelope.triggerAttack(e,n),this._oscillators.forEach(function(t){t.start(e)}),0===this.envelope.sustain&&this._oscillators.forEach(function(t){t.stop(e+this.envelope.attack+this.envelope.decay)}.bind(this)),this},t.MetalSynth.prototype.triggerRelease=function(t){return t=this.toSeconds(t),this.envelope.triggerRelease(t),this._oscillators.forEach(function(e){e.stop(t+this.envelope.release)}.bind(this)),this},t.MetalSynth.prototype.sync=function(){return this._syncMethod("triggerAttack",0),this._syncMethod("triggerRelease",0),this},t.MetalSynth.prototype.triggerAttackRelease=function(t,e,n){return e=this.toSeconds(e),t=this.toSeconds(t),this.triggerAttack(e,n),this.triggerRelease(e+t),this},Object.defineProperty(t.MetalSynth.prototype,"modulationIndex",{get:function(){return this._oscillators[0].modulationIndex.value},set:function(t){for(var e=0;e<this._oscillators.length;e++)this._oscillators[e].modulationIndex.value=t}}),Object.defineProperty(t.MetalSynth.prototype,"harmonicity",{get:function(){return this._oscillators[0].harmonicity.value},set:function(t){for(var e=0;e<this._oscillators.length;e++)this._oscillators[e].harmonicity.value=t}}),Object.defineProperty(t.MetalSynth.prototype,"resonance",{get:function(){return this._filterFreqScaler.min},set:function(t){this._filterFreqScaler.min=t,this.octaves=this._octaves}}),Object.defineProperty(t.MetalSynth.prototype,"octaves",{get:function(){return this._octaves},set:function(t){this._octaves=t,this._filterFreqScaler.max=this._filterFreqScaler.min*Math.pow(2,t)}}),t.MetalSynth.prototype.dispose=function(){t.Instrument.prototype.dispose.call(this);for(var e=0;e<this._oscillators.length;e++)this._oscillators[e].dispose(),this._freqMultipliers[e].dispose();this._oscillators=null,this._freqMultipliers=null,this.frequency.dispose(),this.frequency=null,this._filterFreqScaler.dispose(),this._filterFreqScaler=null,this._amplitue.dispose(),this._amplitue=null,this.envelope.dispose(),this.envelope=null,this._highpass.dispose(),this._highpass=null},t.MetalSynth}),n(function(t){return t.NoiseSynth=function(e){e=t.defaultArg(e,t.NoiseSynth.defaults),t.Instrument.call(this,e),this.noise=new t.Noise,this.envelope=new t.AmplitudeEnvelope(e.envelope),this.noise.chain(this.envelope,this.output),this._readOnly(["noise","envelope"])},t.extend(t.NoiseSynth,t.Instrument),t.NoiseSynth.defaults={noise:{type:"white"},envelope:{attack:.005,decay:.1,sustain:0}},t.NoiseSynth.prototype.triggerAttack=function(t,e){return this.envelope.triggerAttack(t,e),this.noise.start(t),0===this.envelope.sustain&&this.noise.stop(t=this.envelope.attack+this.envelope.decay),this},t.NoiseSynth.prototype.triggerRelease=function(t){return this.envelope.triggerRelease(t),this.noise.stop(t+this.envelope.release),this},t.NoiseSynth.prototype.sync=function(){return this._syncMethod("triggerAttack",0),this._syncMethod("triggerRelease",0),this},t.NoiseSynth.prototype.triggerAttackRelease=function(t,e,n){return e=this.toSeconds(e),t=this.toSeconds(t),this.triggerAttack(e,n),this.triggerRelease(e+t),this},t.NoiseSynth.prototype.dispose=function(){return t.Instrument.prototype.dispose.call(this),this._writable(["noise","envelope"]),this.noise.dispose(),this.noise=null,this.envelope.dispose(),this.envelope=null,this},t.NoiseSynth}),n(function(t){return t.PluckSynth=function(e){e=t.defaultArg(e,t.PluckSynth.defaults),t.Instrument.call(this,e),this._noise=new t.Noise("pink"),this.attackNoise=e.attackNoise,this._lfcf=new t.LowpassCombFilter({resonance:e.resonance,dampening:e.dampening}),this.resonance=this._lfcf.resonance,this.dampening=this._lfcf.dampening,this._noise.connect(this._lfcf),this._lfcf.connect(this.output),this._readOnly(["resonance","dampening"])},t.extend(t.PluckSynth,t.Instrument),t.PluckSynth.defaults={attackNoise:1,dampening:4e3,resonance:.7},t.PluckSynth.prototype.triggerAttack=function(t,e){t=this.toFrequency(t),e=this.toSeconds(e);var n=1/t;return this._lfcf.delayTime.setValueAtTime(n,e),this._noise.start(e),this._noise.stop(e+n*this.attackNoise),this},t.PluckSynth.prototype.dispose=function(){return t.Instrument.prototype.dispose.call(this),this._noise.dispose(),this._lfcf.dispose(),this._noise=null,this._lfcf=null,this._writable(["resonance","dampening"]),this.dampening=null,this.resonance=null,this},t.PluckSynth}),n(function(t){return t.PolySynth=function(){var e=t.defaults(arguments,["polyphony","voice"],t.PolySynth);t.Instrument.call(this,e),(e=t.defaultArg(e,t.Instrument.defaults)).polyphony=Math.min(t.PolySynth.MAX_POLYPHONY,e.polyphony),this.voices=new Array(e.polyphony),this._triggers=new Array(e.polyphony),this.detune=new t.Signal(e.detune,t.Type.Cents),this._readOnly("detune");for(var n=0;n<e.polyphony;n++){var i=new e.voice(arguments[2],arguments[3]);if(!(i instanceof t.Monophonic))throw new Error("Synth constructor must be instance of Tone.Monophonic");this.voices[n]=i,i.connect(this.output),i.hasOwnProperty("detune")&&this.detune.connect(i.detune),this._triggers[n]={release:-1,note:null,voice:i}}},t.extend(t.PolySynth,t.Instrument),t.PolySynth.defaults={polyphony:4,volume:0,detune:0,voice:t.Synth},t.PolySynth.prototype.triggerAttack=function(t,e,n){Array.isArray(t)||(t=[t]),e=this.toSeconds(e);for(var i=0;i<t.length;i++){for(var r=t[i],o=this._triggers[0],s=1;s<this._triggers.length;s++)this._triggers[s].release<o.release&&(o=this._triggers[s]);o.release=1/0,o.note=JSON.stringify(r),o.voice.triggerAttack(r,e,n)}return this},t.PolySynth.prototype.triggerAttackRelease=function(e,n,i,r){if(i=this.toSeconds(i),this.triggerAttack(e,i,r),t.isArray(n)&&t.isArray(e))for(var o=0;o<e.length;o++){var s=n[Math.min(o,n.length-1)];this.triggerRelease(e[o],i+this.toSeconds(s))}else this.triggerRelease(e,i+this.toSeconds(n));return this},t.PolySynth.prototype.triggerRelease=function(t,e){Array.isArray(t)||(t=[t]),e=this.toSeconds(e);for(var n=0;n<t.length;n++)for(var i=JSON.stringify(t[n]),r=0;r<this._triggers.length;r++){var o=this._triggers[r];o.note===i&&o.release>e&&(o.voice.triggerRelease(e),o.release=e)}return this},t.PolySynth.prototype.sync=function(){return this._syncMethod("triggerAttack",1),this._syncMethod("triggerRelease",1),this},t.PolySynth.prototype.set=function(t,e,n){for(var i=0;i<this.voices.length;i++)this.voices[i].set(t,e,n);return this},t.PolySynth.prototype.get=function(t){return this.voices[0].get(t)},t.PolySynth.prototype.releaseAll=function(t){t=this.toSeconds(t);for(var e=0;e<this._triggers.length;e++){var n=this._triggers[e];n.release>t&&(n.release=t,n.voice.triggerRelease(t))}return this},t.PolySynth.prototype.dispose=function(){t.Instrument.prototype.dispose.call(this);for(var e=0;e<this.voices.length;e++)this.voices[e].dispose(),this.voices[e]=null;return this._writable("detune"),this.detune.dispose(),this.detune=null,this.voices=null,this._triggers=null,this},t.PolySynth.MAX_POLYPHONY=20,t.PolySynth}),n(function(t){return t.Sampler=function(e){var n=Array.prototype.slice.call(arguments);n.shift();var i=t.defaults(n,["onload","baseUrl"],t.Sampler);t.Instrument.call(this,i);var r={};for(var o in e)if(t.isNote(o))r[t.Frequency(o).toMidi()]=e[o];else{if(isNaN(parseFloat(o)))throw new Error("Tone.Sampler: url keys must be the note's pitch");r[o]=e[o]}this._buffers=new t.Buffers(r,i.onload,i.baseUrl),this._activeSources={},this.attack=i.attack,this.release=i.release},t.extend(t.Sampler,t.Instrument),t.Sampler.defaults={attack:0,release:.1,onload:t.noOp,baseUrl:""},t.Sampler.prototype._findClosest=function(t){for(var e=0;e<96;){if(this._buffers.has(t+e))return-e;if(this._buffers.has(t-e))return e;e++}return null},t.Sampler.prototype.triggerAttack=function(e,n,i){var r=t.Frequency(e).toMidi(),o=this._findClosest(r);if(null!==o){var s=r-o,a=this._buffers.get(s),u=new t.BufferSource({buffer:a,playbackRate:t.intervalToFrequencyRatio(o),fadeIn:this.attack,fadeOut:this.release,curve:"exponential"}).connect(this.output);u.start(n,0,a.duration,i),t.isArray(this._activeSources[r])||(this._activeSources[r]=[]),this._activeSources[r].push({note:r,source:u})}return this},t.Sampler.prototype.triggerRelease=function(e,n){var i=t.Frequency(e).toMidi();if(this._activeSources[i]&&this._activeSources[i].length){var r=this._activeSources[i].shift().source;n=this.toSeconds(n),r.stop(n+this.release,this.release)}return this},t.Sampler.prototype.releaseAll=function(t){for(var e in t=this.toSeconds(t),this._activeSources)for(var n=this._activeSources[e];n.length;)n.shift().source.stop(t+this.release,this.release);return this},t.Sampler.prototype.sync=function(){return this._syncMethod("triggerAttack",1),this._syncMethod("triggerRelease",1),this},t.Sampler.prototype.triggerAttackRelease=function(t,e,n,i){return n=this.toSeconds(n),e=this.toSeconds(e),this.triggerAttack(t,n,i),this.triggerRelease(t,n+e),this},t.Sampler.prototype.add=function(e,n,i){if(t.isNote(e)){var r=t.Frequency(e).toMidi();this._buffers.add(r,n,i)}else{if(isNaN(parseFloat(e)))throw new Error("Tone.Sampler: note must be the note's pitch. Instead got "+e);this._buffers.add(e,n,i)}},Object.defineProperty(t.Sampler.prototype,"loaded",{get:function(){return this._buffers.loaded}}),t.Sampler.prototype.dispose=function(){for(var e in t.Instrument.prototype.dispose.call(this),this._buffers.dispose(),this._buffers=null,this._activeSources)this._activeSources[e].forEach(function(t){t.source.dispose()});return this._activeSources=null,this},t.Sampler}),n(function(t){t.supported&&(OscillatorNode.prototype.setPeriodicWave||(OscillatorNode.prototype.setPeriodicWave=OscillatorNode.prototype.setWaveTable),AudioContext.prototype.createPeriodicWave||(AudioContext.prototype.createPeriodicWave=AudioContext.prototype.createWaveTable))}),n(function(t){return t.GainToAudio=function(){t.SignalBase.call(this),this._norm=this.input=this.output=new t.WaveShaper(function(t){return 2*Math.abs(t)-1})},t.extend(t.GainToAudio,t.SignalBase),t.GainToAudio.prototype.dispose=function(){return t.SignalBase.prototype.dispose.call(this),this._norm.dispose(),this._norm=null,this},t.GainToAudio}),n(function(t){return t.Normalize=function(e,n){t.SignalBase.call(this),this._inputMin=t.defaultArg(e,0),this._inputMax=t.defaultArg(n,1),this._sub=this.input=new t.Add(0),this._div=this.output=new t.Multiply(1),this._sub.connect(this._div),this._setRange()},t.extend(t.Normalize,t.SignalBase),Object.defineProperty(t.Normalize.prototype,"min",{get:function(){return this._inputMin},set:function(t){this._inputMin=t,this._setRange()}}),Object.defineProperty(t.Normalize.prototype,"max",{get:function(){return this._inputMax},set:function(t){this._inputMax=t,this._setRange()}}),t.Normalize.prototype._setRange=function(){this._sub.value=-this._inputMin,this._div.value=1/(this._inputMax-this._inputMin)},t.Normalize.prototype.dispose=function(){return t.SignalBase.prototype.dispose.call(this),this._sub.dispose(),this._sub=null,this._div.dispose(),this._div=null,this},t.Normalize}),n(function(t){return t.TransportTimelineSignal=function(){t.Signal.apply(this,arguments),this.output=this._outputSig=new t.Signal(this._initialValue),this._lastVal=this.value,this._synced=t.Transport.scheduleRepeat(this._onTick.bind(this),"1i"),this._bindAnchorValue=this._anchorValue.bind(this),t.Transport.on("start stop pause",this._bindAnchorValue),this._events.memory=1/0},t.extend(t.TransportTimelineSignal,t.Signal),t.TransportTimelineSignal.prototype._onTick=function(e){var n=this.getValueAtTime(t.Transport.seconds);this._lastVal!==n&&(this._lastVal=n,this._outputSig.linearRampToValueAtTime(n,e))},t.TransportTimelineSignal.prototype._anchorValue=function(e){var n=this.getValueAtTime(t.Transport.seconds);return this._lastVal=n,this._outputSig.cancelScheduledValues(e),this._outputSig.setValueAtTime(n,e),this},t.TransportTimelineSignal.prototype.getValueAtTime=function(e){return e=t.TransportTime(e),t.Signal.prototype.getValueAtTime.call(this,e)},t.TransportTimelineSignal.prototype.setValueAtTime=function(e,n){return n=t.TransportTime(n),t.Signal.prototype.setValueAtTime.call(this,e,n),this},t.TransportTimelineSignal.prototype.linearRampToValueAtTime=function(e,n){return n=t.TransportTime(n),t.Signal.prototype.linearRampToValueAtTime.call(this,e,n),this},t.TransportTimelineSignal.prototype.exponentialRampToValueAtTime=function(e,n){return n=t.TransportTime(n),t.Signal.prototype.exponentialRampToValueAtTime.call(this,e,n),this},t.TransportTimelineSignal.prototype.setTargetAtTime=function(e,n,i){return n=t.TransportTime(n),t.Signal.prototype.setTargetAtTime.call(this,e,n,i),this},t.TransportTimelineSignal.prototype.cancelScheduledValues=function(e){return e=t.TransportTime(e),t.Signal.prototype.cancelScheduledValues.call(this,e),this},t.TransportTimelineSignal.prototype.setValueCurveAtTime=function(e,n,i,r){return n=t.TransportTime(n),i=t.TransportTime(i),t.Signal.prototype.setValueCurveAtTime.call(this,e,n,i,r),this},t.TransportTimelineSignal.prototype.cancelAndHoldAtTime=function(e){return t.Signal.prototype.cancelAndHoldAtTime.call(this,t.TransportTime(e))},t.TransportTimelineSignal.prototype.dispose=function(){t.Transport.clear(this._synced),t.Transport.off("start stop pause",this._syncedCallback),this._events.cancel(0),t.Signal.prototype.dispose.call(this),this._outputSig.dispose(),this._outputSig=null},t.TransportTimelineSignal}),n(function(t){return t.GrainPlayer=function(){var e=t.defaults(arguments,["url","onload"],t.GrainPlayer);t.Source.call(this,e),this.buffer=new t.Buffer(e.url,e.onload),this._clock=new t.Clock(this._tick.bind(this),e.grainSize),this._loopStart=0,this._loopEnd=0,this._activeSources=[],this._playbackRate=e.playbackRate,this._grainSize=e.grainSize,this._overlap=e.overlap,this.detune=e.detune,this.overlap=e.overlap,this.loop=e.loop,this.playbackRate=e.playbackRate,this.grainSize=e.grainSize,this.loopStart=e.loopStart,this.loopEnd=e.loopEnd,this.reverse=e.reverse,this._clock.on("stop",this._onstop.bind(this))},t.extend(t.GrainPlayer,t.Source),t.GrainPlayer.defaults={onload:t.noOp,overlap:.1,grainSize:.2,playbackRate:1,detune:0,loop:!1,loopStart:0,loopEnd:0,reverse:!1},t.GrainPlayer.prototype._start=function(e,n,i){n=t.defaultArg(n,0),n=this.toSeconds(n),e=this.toSeconds(e),this._offset=n,this._clock.start(e),i&&this.stop(e+this.toSeconds(i))},t.GrainPlayer.prototype._stop=function(t){this._clock.stop(t)},t.GrainPlayer.prototype._onstop=function(t){this._activeSources.forEach(function(e){e.stop(t,0)})},t.GrainPlayer.prototype._tick=function(e){var n=this._offset<this._overlap?0:this._overlap,i=new t.BufferSource({buffer:this.buffer,fadeIn:n,fadeOut:this._overlap,loop:this.loop,loopStart:this._loopStart,loopEnd:this._loopEnd,playbackRate:t.intervalToFrequencyRatio(this.detune/100)}).connect(this.output);i.start(e,this._offset),this._offset+=this.grainSize,i.stop(e+this.grainSize),this._activeSources.push(i),i.onended=function(){var t=this._activeSources.indexOf(i);-1!==t&&this._activeSources.splice(t,1)}.bind(this)},t.GrainPlayer.prototype.seek=function(t,e){return this._offset=this.toSeconds(t),this._tick(this.toSeconds(e)),this},Object.defineProperty(t.GrainPlayer.prototype,"playbackRate",{get:function(){return this._playbackRate},set:function(t){this._playbackRate=t,this.grainSize=this._grainSize}}),Object.defineProperty(t.GrainPlayer.prototype,"loopStart",{get:function(){return this._loopStart},set:function(t){this._loopStart=this.toSeconds(t)}}),Object.defineProperty(t.GrainPlayer.prototype,"loopEnd",{get:function(){return this._loopEnd},set:function(t){this._loopEnd=this.toSeconds(t)}}),Object.defineProperty(t.GrainPlayer.prototype,"reverse",{get:function(){return this.buffer.reverse},set:function(t){this.buffer.reverse=t}}),Object.defineProperty(t.GrainPlayer.prototype,"grainSize",{get:function(){return this._grainSize},set:function(t){this._grainSize=this.toSeconds(t),this._clock.frequency.value=this._playbackRate/this._grainSize}}),Object.defineProperty(t.GrainPlayer.prototype,"overlap",{get:function(){return this._overlap},set:function(t){this._overlap=this.toSeconds(t)}}),t.GrainPlayer.prototype.dispose=function(){return t.Source.prototype.dispose.call(this),this.buffer.dispose(),this.buffer=null,this._clock.dispose(),this._clock=null,this._activeSources.forEach(function(t){t.dispose()}),this._activeSources=null,this},t.GrainPlayer}),n(function(t){return t.Player=function(e){var n;e instanceof t.Buffer&&e.loaded?(e=e.get(),n=t.Player.defaults):n=t.defaults(arguments,["url","onload"],t.Player),t.Source.call(this,n),this.autostart=n.autostart,this._buffer=new t.Buffer({url:n.url,onload:this._onload.bind(this,n.onload),reverse:n.reverse}),e instanceof AudioBuffer&&this._buffer.set(e),this._loop=n.loop,this._loopStart=n.loopStart,this._loopEnd=n.loopEnd,this._playbackRate=n.playbackRate,this._activeSources=[],this._elapsedTime=new t.TickSource(n.playbackRate),this.fadeIn=n.fadeIn,this.fadeOut=n.fadeOut},t.extend(t.Player,t.Source),t.Player.defaults={onload:t.noOp,playbackRate:1,loop:!1,autostart:!1,loopStart:0,loopEnd:0,retrigger:!1,reverse:!1,fadeIn:0,fadeOut:0},t.Player.prototype.load=function(t,e){return this._buffer.load(t,this._onload.bind(this,e))},t.Player.prototype._onload=function(e){(e=t.defaultArg(e,t.noOp))(this),this.autostart&&this.start()},t.Player.prototype._onSourceEnd=function(t){var e=this._activeSources.indexOf(t);this._activeSources.splice(e,1)},t.Player.prototype._start=function(e,n,i){n=this._loop?t.defaultArg(n,this._loopStart):t.defaultArg(n,0),n=this.toSeconds(n);var r=t.defaultArg(i,Math.max(this._buffer.duration-n,0));r=this.toSeconds(r),e=this.toSeconds(e),this._elapsedTime.start(e,n);var o=new t.BufferSource({buffer:this._buffer,loop:this._loop,loopStart:this._loopStart,loopEnd:this._loopEnd,onended:this._onSourceEnd.bind(this),playbackRate:this._playbackRate,fadeIn:this.fadeIn,fadeOut:this.fadeOut}).connect(this.output);return this._loop||this._synced||this._state.setStateAtTime(t.State.Stopped,e+r/this._playbackRate),this._activeSources.push(o),this._loop&&t.isUndef(i)?o.start(e,n):o.start(e,n,r),this},t.Player.prototype._stop=function(t){return t=this.toSeconds(t),this._elapsedTime.stop(t),this._activeSources.forEach(function(e){e.stop(t)}),this},t.Player.prototype.restart=function(t,e,n){return this._stop(t),this._start(t,e,n),this},t.Player.prototype.seek=function(e,n){return n=this.toSeconds(n),this._state.getValueAtTime(n)===t.State.Started&&(e=this.toSeconds(e),this._stop(n),this._start(n,e)),this},t.Player.prototype.setLoopPoints=function(t,e){return this.loopStart=t,this.loopEnd=e,this},Object.defineProperty(t.Player.prototype,"loopStart",{get:function(){return this._loopStart},set:function(t){this._loopStart=t,this._activeSources.forEach(function(e){e.loopStart=t})}}),Object.defineProperty(t.Player.prototype,"loopEnd",{get:function(){return this._loopEnd},set:function(t){this._loopEnd=t,this._activeSources.forEach(function(e){e.loopEnd=t})}}),Object.defineProperty(t.Player.prototype,"buffer",{get:function(){return this._buffer},set:function(t){this._buffer.set(t)}}),Object.defineProperty(t.Player.prototype,"loop",{get:function(){return this._loop},set:function(e){if(this._loop!==e){this._loop=e;var n=this.now();if(e){var i=this._state.getNextState(t.State.Stopped,n);i&&(this._activeSources.forEach(function(t){t.loop=e}),this._state.cancel(i.time),this._elapsedTime.cancel(i.time))}else this._stopAtNextIteration(n)}}}),t.Player.prototype._stopAtNextIteration=function(e){if(this._state.getValueAtTime(e)===t.State.Started){var n=this._state.getNextState(t.State.Stopped,e),i=this._elapsedTime.getTicksAtTime(e),r=Math.max(Math.ceil(i/this.buffer.duration),1),o=this._elapsedTime.getTimeOfTick(r*this.buffer.duration,n?n.time-this.sampleTime:1/0);this.stop(o)}},Object.defineProperty(t.Player.prototype,"playbackRate",{get:function(){return this._playbackRate},set:function(t){this._playbackRate=t;var e=this.now();this._elapsedTime.frequency.setValueAtTime(t,e),this._loop||this._stopAtNextIteration(e),this._activeSources.forEach(function(n){n.playbackRate.setValueAtTime(t,e)})}}),Object.defineProperty(t.Player.prototype,"position",{get:function(){var e=this.now();if(this._state.getValueAtTime(e)===t.State.Started&&this.loaded){var n=this.buffer.duration;return this._elapsedTime.getTicksAtTime(e)%n}return 0}}),Object.defineProperty(t.Player.prototype,"reverse",{get:function(){return this._buffer.reverse},set:function(t){this._buffer.reverse=t}}),Object.defineProperty(t.Player.prototype,"loaded",{get:function(){return this._buffer.loaded}}),t.Player.prototype.dispose=function(){return this._activeSources.forEach(function(t){t.dispose()}),this._activeSources=null,t.Source.prototype.dispose.call(this),this._buffer.dispose(),this._buffer=null,this._elapsedTime.dispose(),this._elapsedTime=null,this},t.Player}),n(function(t){return t.Players=function(e){var n=Array.prototype.slice.call(arguments);n.shift();var i=t.defaults(n,["onload"],t.Players);for(var r in t.call(this),this._volume=this.output=new t.Volume(i.volume),this.volume=this._volume.volume,this._readOnly("volume"),this._volume.output.output.channelCount=2,this._volume.output.output.channelCountMode="explicit",this.mute=i.mute,this._players={},this._loadingCount=0,this._fadeIn=i.fadeIn,this._fadeOut=i.fadeOut,e)this._loadingCount++,this.add(r,e[r],this._bufferLoaded.bind(this,i.onload))},t.extend(t.Players,t.AudioNode),t.Players.defaults={volume:0,mute:!1,onload:t.noOp,fadeIn:0,fadeOut:0},t.Players.prototype._bufferLoaded=function(t){this._loadingCount--,0===this._loadingCount&&t&&t(this)},Object.defineProperty(t.Players.prototype,"mute",{get:function(){return this._volume.mute},set:function(t){this._volume.mute=t}}),Object.defineProperty(t.Players.prototype,"fadeIn",{get:function(){return this._fadeIn},set:function(t){this._fadeIn=t,this._forEach(function(e){e.fadeIn=t})}}),Object.defineProperty(t.Players.prototype,"fadeOut",{get:function(){return this._fadeOut},set:function(t){this._fadeOut=t,this._forEach(function(e){e.fadeOut=t})}}),Object.defineProperty(t.Players.prototype,"state",{get:function(){var e=!1;return this._forEach(function(n){e=e||n.state===t.State.Started}),e?t.State.Started:t.State.Stopped}}),t.Players.prototype.has=function(t){return this._players.hasOwnProperty(t)},t.Players.prototype.get=function(t){if(this.has(t))return this._players[t];throw new Error("Tone.Players: no player named "+t)},t.Players.prototype._forEach=function(t){for(var e in this._players)t(this._players[e],e);return this},Object.defineProperty(t.Players.prototype,"loaded",{get:function(){var t=!0;return this._forEach(function(e){t=t&&e.loaded}),t}}),t.Players.prototype.add=function(e,n,i){return this._players[e]=new t.Player(n,i).connect(this.output),this._players[e].fadeIn=this._fadeIn,this._players[e].fadeOut=this._fadeOut,this},t.Players.prototype.stopAll=function(t){this._forEach(function(e){e.stop(t)})},t.Players.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._volume.dispose(),this._volume=null,this._writable("volume"),this.volume=null,this.output=null,this._forEach(function(t){t.dispose()}),this._players=null,this},t.Players}),n(function(t){return t.UserMedia=function(){var e=t.defaults(arguments,["volume"],t.UserMedia);t.AudioNode.call(this),this._mediaStream=null,this._stream=null,this._device=null,this._volume=this.output=new t.Volume(e.volume),this.volume=this._volume.volume,this._readOnly("volume"),this.mute=e.mute},t.extend(t.UserMedia,t.AudioNode),t.UserMedia.defaults={volume:0,mute:!1},t.UserMedia.prototype.open=function(e){return t.UserMedia.enumerateDevices().then(function(n){var i;if(t.isNumber(e))i=n[e];else if(!(i=n.find(function(t){return t.label===e||t.deviceId===e}))&&n.length>0)i=n[0];else if(!i&&t.isDefined(e))throw new Error("Tone.UserMedia: no matching device: "+e);this._device=i;var r={audio:{echoCancellation:!1,sampleRate:this.context.sampleRate}};return i&&(r.audio.deviceId=i.deviceId),navigator.mediaDevices.getUserMedia(r).then(function(t){return this._stream||(this._stream=t,this._mediaStream=this.context.createMediaStreamSource(t),this._mediaStream.connect(this.output)),this}.bind(this))}.bind(this))},t.UserMedia.prototype.close=function(){return this._stream&&(this._stream.getAudioTracks().forEach(function(t){t.stop()}),this._stream=null,this._mediaStream.disconnect(),this._mediaStream=null),this._device=null,this},t.UserMedia.enumerateDevices=function(){return navigator.mediaDevices.enumerateDevices().then(function(t){return t.filter(function(t){return"audioinput"===t.kind})})},Object.defineProperty(t.UserMedia.prototype,"state",{get:function(){return this._stream&&this._stream.active?t.State.Started:t.State.Stopped}}),Object.defineProperty(t.UserMedia.prototype,"deviceId",{get:function(){if(this._device)return this._device.deviceId}}),Object.defineProperty(t.UserMedia.prototype,"groupId",{get:function(){if(this._device)return this._device.groupId}}),Object.defineProperty(t.UserMedia.prototype,"label",{get:function(){if(this._device)return this._device.label}}),Object.defineProperty(t.UserMedia.prototype,"mute",{get:function(){return this._volume.mute},set:function(t){this._volume.mute=t}}),t.UserMedia.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this.close(),this._writable("volume"),this._volume.dispose(),this._volume=null,this.volume=null,this},Object.defineProperty(t.UserMedia,"supported",{get:function(){return t.isDefined(navigator.mediaDevices)&&t.isFunction(navigator.mediaDevices.getUserMedia)}}),t.UserMedia}),n(function(t){return t.Midi=function(e,n){if(!(this instanceof t.Midi))return new t.Midi(e,n);t.Frequency.call(this,e,n)},t.extend(t.Midi,t.Frequency),t.Midi.prototype._defaultUnits="midi",t.Midi.prototype._frequencyToUnits=function(e){return t.Frequency.ftom(t.Frequency.prototype._frequencyToUnits.call(this,e))},t.Midi.prototype._ticksToUnits=function(e){return t.Frequency.ftom(t.Frequency.prototype._ticksToUnits.call(this,e))},t.Midi.prototype._beatsToUnits=function(e){return t.Frequency.ftom(t.Frequency.prototype._beatsToUnits.call(this,e))},t.Midi.prototype._secondsToUnits=function(e){return t.Frequency.ftom(t.Frequency.prototype._secondsToUnits.call(this,e))},t.Midi.prototype.toMidi=function(){return this.valueOf()},t.Midi.prototype.toFrequency=function(){return t.Frequency.mtof(this.toMidi())},t.Midi.prototype.transpose=function(t){return new this.constructor(this.toMidi()+t)},t.Midi}),t}()}.call(e,n,e,t))||(t.exports=i)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.startSynthesizing=function(){p=!0},e.stopSynthesizing=function(){p=!1},e.startRecording=function(){f=new r.default.Video(25,.95),c=!0,i.store.dispatch({type:o.default.player.start_recording})},e.stopRecording=function(){if(!c)return;c=!1,i.store.dispatch({type:o.default.player.saving_video}),f.compile(!1,function(t){i.store.dispatch({type:o.default.player.save_video,blob:t})})},e.saveFrame=function(){h=!0},e.onFrame=function(t){var e=new Blob([t.frame],{type:"image/jpg"}),n=URL.createObjectURL(e),r=new Image,a=document.querySelector(".player canvas");if(!a)return console.error("no canvas for frame");r.onload=function(){r.onload=null,l=t.meta,URL.revokeObjectURL(n);var e=a.getContext("2d-lodpi");if(e.drawImage(r,0,0,a.width,a.height),p){var d=e.getImageData(0,0,a.width,a.height);s.play({imageData:d})}c&&(console.log("record frame"),f.add(a),i.store.dispatch({type:o.default.player.add_record_frame})),h&&(h=!1,a.toBlob(function(t){i.store.dispatch({type:o.default.player.save_frame,blob:t})})),u+=1},r.src=n},e.toggleFPS=function(t){y=void 0!==t?t:i.store.getState().live.playing,d!==y&&(y?_():v());d=y},e.startWatchingFPS=_,e.stopWatchingFPS=v;var i=n(19),r=a(n(255)),o=a(n(6)),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(129));function a(t){return t&&t.__esModule?t:{default:t}}var u=0,l=void 0,c=!1,h=!1,p=!1,f=void 0;var d=void 0,y=void 0;var m=void 0;function _(){clearInterval(m),m=setInterval(function(){i.store.dispatch({type:o.default.player.set_fps,fps:u}),i.store.dispatch({type:o.default.player.current_frame,meta:l}),u=0},1e3)}function v(){clearInterval(m)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},o=n(6),s=(i=o)&&i.__esModule?i:{default:i};function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{loading:!0,progress:null,error:null,data:null,folder_id:0},e=arguments[1];switch(e.type){case s.default.app.load_progress:return r({},t,{progress:e.progress});case s.default.dataset.load:return r({},t,{loading:!1,data:e.data});case s.default.dataset.set_folder:return r({},t,{folder_id:e.data.folder_id});case s.default.folder.create:return r({},t,{loading:!1,data:{folders:t.data.folders.concat([e.data.id]),folderLookup:r({},t.data.folderLookup,a({},e.data.id,e.data))}});case s.default.file.create:return function(t,e){if(console.log(e.data),!t.data||!t.data.datasetLookup)return t;var n=void 0,i=void 0,o=void 0,s=void 0,u=void 0;return(u=e.data.dataset?e.data.dataset:e.data.name?e.data.name.split(".")[0]:e.data.url?e.data.url:null)in t.data.datasetLookup?(i=t.data.datasetLookup[u],n=r({},i,{input:e.data.generated?i.input:[e.data.id].concat(i.input),output:e.data.generated?[e.data.id].concat(i.output):i.output})):(console.log(e.data.created_at,e.data.date),n={name:u,date:e.data.created_at||e.data.date,input:e.data.generated?[]:[e.data.id],checkpoints:[],output:e.data.generated?[e.data.id]:[]}),s=t.data.folderLookup[e.data.folder_id],o=r({},s,{datasets:s.datasets.concat([u]),files:s.files.concat([e.data.id])}),r({},t,{loading:!1,data:r({},t.data,{files:t.data.files.concat([e.data.id]),folderLookup:r({},t.data.folderLookup,a({},e.data.folder_id,o)),fileLookup:r({},t.data.fileLookup,a({},e.data.id,e.data)),datasetLookup:r({},t.data.datasetLookup,a({},u,n))})})}(t,e);case s.default.file.update:return function(t,e){var n,i=void 0,o=t.data.datasetLookup[e.data.dataset],s=t.data.fileLookup[e.data.id],u=void 0;return s&&e.data.dataset!==s.dataset&&(t.data.datasetLookup[s.dataset]&&(i=t.data.datasetLookup[s.dataset],old_dataset_update=r({},i,{input:i.input.filter(function(t){return t!==e.data.id}),output:i.output.filter(function(t){return t!==e.data.id})})),u=r({},o,{input:e.data.generated?[]:[e.data.id],output:e.data.generated?[e.data.id]:[]})),console.log("old_dataset",old_dataset_update.name),console.log("new_dataset",u.name),r({},t,{loading:!1,data:r({},t.data,{datasetLookup:i?r({},t.data.datasetLookup,(n={},a(n,i.name,old_dataset_update),a(n,o.name,u),n)):u?r({},t.data.datasetLookup,a({},o.name,u)):t.data.datasetLookup,fileLookup:r({},t.data.fileLookup,a({},e.data.id,e.data))})})}(t,e);case s.default.file.destroy:return function(t,e){if(!t.data)return t;var n=r({},t.data.fileLookup),i=r({},t.data.datasetLookup),o=r({},t.data.folderLookup),s=n[e.data.id];if(!s)return t;var a=t.data.datasetLookup[s.dataset],u=void 0;if(a)if((u=r({},a,{input:a.input.filter(function(t){return t!==s.id}),output:a.output.filter(function(t){return t!==s.id})})).input.length||u.checkpoints.length||u.output.length)console.log("dataset just needs sweeping"),i[s.dataset]=u;else{delete i[s.dataset];var l=o[s.folder_id];o[s.folder_id]=r({},l,{datasets:l.datasets.filter(function(t){return t!==s.dataset})})}return delete n[s.id],r({},t,{loading:!1,data:r({},t.data,{folderLookup:o,fileLookup:n,datasetLookup:i})})}(t,e);case s.default.dataset.list_epochs:return r({},t,{data:r({},t.data,{epochs:e.data.epochs})});default:return t}}},function(t,e){var n,i,r=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(t){i=s}}();var u,l=[],c=!1,h=-1;function p(){c&&u&&(c=!1,u.length?l=u.concat(l):h=-1,l.length&&f())}function f(){if(!c){var t=a(p);c=!0;for(var e=l.length;e;){for(u=l,l=[];++h<e;)u&&u[h].run();h=-1,e=l.length}u=null,c=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function y(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];l.push(new d(t,e)),1!==l.length||c||a(f)},d.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=y,r.addListener=y,r.once=y,r.off=y,r.removeListener=y,r.removeAllListeners=y,r.emit=y,r.prependListener=y,r.prependOnceListener=y,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),s=n(1),a=n(3);n(2);var u=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.handleChange=n.handleChange.bind(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,s.Component),o(e,[{key:"handleChange",value:function(t){clearTimeout(this.timeout);var e=t.target.value;"PLACEHOLDER"!==e&&this.props.onChange&&this.props.onChange(this.props.name,e)}},{key:"render",value:function(){var t=this.props.live?this.props.opt[this.props.name]:this.props.value,e=void 0,n=(this.props.options||[]).map(function(t,n){var o=void 0,a=void 0;if("string"==typeof t)o=t.length<2?t.toUpperCase():t,a=t;else if("object"===(void 0===t?"undefined":r(t)))if(t.length){var u=i(t,2);o=u[0],a=u[1]}else if(t.count){var l=Math.round(t.count/30)+" s.";o=t.name.replace(/_/g," ")+" ("+l+")",a=t.name}else o=t.name,a=t.value||t.name;return e=a,(0,s.h)("option",{value:a,key:n},o)});return(0,s.h)("div",{className:"select param"},(0,s.h)("label",null,(0,s.h)("span",null,this.props.title),(0,s.h)("select",{onChange:this.handleChange,value:t||e},this.props.placeholder&&(0,s.h)("option",{value:"PLACEHOLDER"},this.props.placeholder),n)),this.props.children)}}]),e}();e.default=(0,a.connect)(function(t,e){return{opt:e.opt||t.live.opt}},function(t,e){return{}})(u)},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){"use strict";(function(e){t.exports={isNode:void 0!==e,newBufferFrom:function(t,n){return new e(t,n)},allocBuffer:function(t){return e.alloc?e.alloc(t):new e(t)},isBuffer:function(t){return e.isBuffer(t)},isStream:function(t){return t&&"function"==typeof t.on&&"function"==typeof t.pause&&"function"==typeof t.resume}}}).call(this,n(37).Buffer)},function(t,e,n){var i=n(37),r=i.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function s(t,e,n){return r(t,e,n)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=i:(o(i,e),e.Buffer=s),o(r,s),s.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return r(t,e,n)},s.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=r(t);return void 0!==e?"string"==typeof n?i.fill(e,n):i.fill(e):i.fill(0),i},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i.SlowBuffer(t)}},function(t,e,n){"use strict";(function(e){!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,n,i,r){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,n)});case 3:return e.nextTick(function(){t.call(null,n,i)});case 4:return e.nextTick(function(){t.call(null,n,i,r)});default:for(o=new Array(a-1),s=0;s<o.length;)o[s++]=arguments[s];return e.nextTick(function(){t.apply(null,o)})}}}:t.exports=e}).call(this,n(51))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default={name:"pix2wav",displayName:"Pix2Wav",datatype:"spectrogram"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.clear_recursive_task=e.augment_task=e.live_task=e.train_task=e.fetch_task=void 0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=(s(n(17)),s(n(14)),s(n(6)),s(n(8))),o=s(n(38));function s(t){return t&&t.__esModule?t:{default:t}}e.fetch_task=function(t,e,n){return function(i){if(!t)return console.log("input file inaccessible (no url)");var s={module:o.default.name,activity:"fetch",dataset:n,opt:{url:t,file_id:e,dataset:n}};return r.default.queue.add_task(s)}},e.train_task=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(i){var s={module:o.default.name,activity:"train",dataset:t.name||t,epoch:0,epochs:n,opt:{folder_id:e}};if(s.dataset)return console.log(s),r.default.queue.add_task(s);console.error("train task: no dataset specified")}},e.live_task=function(t,e,n){return function(s){var a={module:o.default.name,activity:"live",dataset:t,checkpoint:e,opt:i({},n,{poll_delay:.01})};return console.log(a),console.log("add live task"),r.default.queue.add_task(a)}},e.augment_task=function(t,e){return function(n){var s={module:o.default.name,activity:"augment",dataset:t,folder_id:e.folder_id,opt:i({},e)};return console.log(s),console.log("add augment task"),r.default.queue.add_task(s)}},e.clear_recursive_task=function(t){return function(e){var n={module:o.default.name,activity:"clear_recursive",dataset:t};return console.log(n),console.log("add clear recursive task"),r.default.queue.add_task(n)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.uploadFiles=e.fetchURL=e.uploadFile=e.updateFolder=e.createFolder=void 0;var i=s(n(6)),r=s(n(8)),o=n(118);function s(t){return t&&t.__esModule?t:{default:t}}e.createFolder=function(t,e){return function(n){return r.default.folder.create({module:t.name,datatype:t.datatype,activity:"dataset",name:e})}},e.updateFolder=function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return function(o){return e&&e.id?r.default.folder.update({id:e.id,module:t.name,datatype:t.datatype,activity:"dataset",name:n,opt:i}):null}},e.uploadFile=function(t,e,n,i,o){return function(s){var a=new FormData;a.append("file",n,i),r.default.folder.upload(a,{id:e.id,module:t.name,activity:"file",epoch:0,processed:!1,generated:!1,opt:o})}},e.fetchURL=function(t,e,n){return function(i){console.log(t,e,n);var s=e.files.some(function(t){return t.url===n});console.log(s),s?console.log("already seen this url"):o.parser.parse(n,function(i){i&&(console.log("media",i),r.default.file.create({folder_id:e.id,name:(i.title||"").replace(/\.[^.]+$/g,"").replace(/[^a-zA-Z0-9_]/g,"_").replace(/\s+/g,"_").replace(/_+/g,"_"),module:t.name,dataset:i.token,activity:"url",duration:parseInt(i.duration)||0,epoch:0,processed:!1,generated:!1,opt:i,url:n}))})}},e.uploadFiles=function(t){return{type:i.default.dataset.upload_files}}},function(t,e,n){var i=n(290);t.exports=f,t.exports.parse=o,t.exports.compile=function(t,e){return a(o(t,e))},t.exports.tokensToFunction=a,t.exports.tokensToRegExp=p;var r=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(t,e){for(var n,i=[],o=0,s=0,a="",c=e&&e.delimiter||"/";null!=(n=r.exec(t));){var h=n[0],p=n[1],f=n.index;if(a+=t.slice(s,f),s=f+h.length,p)a+=p[1];else{var d=t[s],y=n[2],m=n[3],_=n[4],v=n[5],g=n[6],b=n[7];a&&(i.push(a),a="");var w=null!=y&&null!=d&&d!==y,k="+"===g||"*"===g,S="?"===g||"*"===g,T=n[2]||c,x=_||v;i.push({name:m||o++,prefix:y||"",delimiter:T,optional:S,repeat:k,partial:w,asterisk:!!b,pattern:x?l(x):b?".*":"[^"+u(T)+"]+?"})}}return s<t.length&&(a+=t.substr(s)),a&&i.push(a),i}function s(t){return encodeURI(t).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function a(t){for(var e=new Array(t.length),n=0;n<t.length;n++)"object"==typeof t[n]&&(e[n]=new RegExp("^(?:"+t[n].pattern+")$"));return function(n,r){for(var o="",a=n||{},u=(r||{}).pretty?s:encodeURIComponent,l=0;l<t.length;l++){var c=t[l];if("string"!=typeof c){var h,p=a[c.name];if(null==p){if(c.optional){c.partial&&(o+=c.prefix);continue}throw new TypeError('Expected "'+c.name+'" to be defined')}if(i(p)){if(!c.repeat)throw new TypeError('Expected "'+c.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(c.optional)continue;throw new TypeError('Expected "'+c.name+'" to not be empty')}for(var f=0;f<p.length;f++){if(h=u(p[f]),!e[l].test(h))throw new TypeError('Expected all "'+c.name+'" to match "'+c.pattern+'", but received `'+JSON.stringify(h)+"`");o+=(0===f?c.prefix:c.delimiter)+h}}else{if(h=c.asterisk?encodeURI(p).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}):u(p),!e[l].test(h))throw new TypeError('Expected "'+c.name+'" to match "'+c.pattern+'", but received "'+h+'"');o+=c.prefix+h}}else o+=c}return o}}function u(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function l(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function c(t,e){return t.keys=e,t}function h(t){return t.sensitive?"":"i"}function p(t,e,n){i(e)||(n=e||n,e=[]);for(var r=(n=n||{}).strict,o=!1!==n.end,s="",a=0;a<t.length;a++){var l=t[a];if("string"==typeof l)s+=u(l);else{var p=u(l.prefix),f="(?:"+l.pattern+")";e.push(l),l.repeat&&(f+="(?:"+p+f+")*"),s+=f=l.optional?l.partial?p+"("+f+")?":"(?:"+p+"("+f+"))?":p+"("+f+")"}}var d=u(n.delimiter||"/"),y=s.slice(-d.length)===d;return r||(s=(y?s.slice(0,-d.length):s)+"(?:"+d+"(?=$))?"),s+=o?"$":r&&y?"":"(?="+d+"|$)",c(new RegExp("^"+s,h(n)),e)}function f(t,e,n){return i(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?function(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var i=0;i<n.length;i++)e.push({name:i,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return c(t,e)}(t,e):i(t)?function(t,e,n){for(var i=[],r=0;r<t.length;r++)i.push(f(t[r],e,n).source);return c(new RegExp("(?:"+i.join("|")+")",h(n)),e)}(t,e,n):function(t,e,n){return p(o(t,n),e,n)}(t,e,n)}},function(t,e,n){t.exports=n(303)()},function(t,e,n){"use strict";t.exports=function(t,e,n,i,r,o,s,a){if(!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,i,r,o,s,a],c=0;(u=new Error(e.replace(/%s/g,function(){return l[c++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(3),s=n(2),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(20));var u=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.timeout=0,n.state={value:t.live?t.opt[t.name]:t.value},n.handleInput=n.handleInput.bind(n),n.handleRange=n.handleRange.bind(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"componentWillReceiveProps",value:function(t){var e=t.value||t.opt[t.name];e!==this.state.value&&this.setState({value:e})}},{key:"handleInput",value:function(t){var e=this.props,n=e.name,i=e.opt[n],r=t.target.value;""===r?r=this.props.defaultValue||(this.props.max-this.props.min)/2:"int"===this.props.type?r=parseInt(r):"odd"===this.props.type&&(r=parseInt(2*Math.floor(r/2)+1)),i!==r&&(this.setState({value:r}),this.props.live&&this.props.actions.set_param(this.props.name,r),this.props.onChange&&this.props.onChange(r)),clearTimeout(this.timeout)}},{key:"handleRange",value:function(t){var e=this;clearTimeout(this.timeout);var n=t.target.value;"int"===this.props.type&&(n=parseInt(n)),"odd"===this.props.type&&(n=parseInt(2*Math.floor(n/2)+1)),"list"===this.props.type&&(n=this.props.options[n]||this.props.options[0]),this.setState({value:n}),this.timeout=setTimeout(function(){e.props.live&&e.props.actions.set_param(e.props.name,n),e.props.onChange&&e.props.onChange(n)},100)}},{key:"render",value:function(){var t=this.props,e=t.name,n=t.title,i=this.state.value;void 0===i&&(i=this.props.min);var o=i,s=void 0,a=this.props.min||0,u=this.props.max||0;return"int"===this.props.type?s=1:"list"===this.props.type?(a=0,u=this.props.options.length-1,s=1,i=this.props.options.indexOf(i)):(s=(this.props.max-this.props.min)/100,o=parseFloat(i).toFixed(2)),(0,r.h)("div",{class:"slider param"},(0,r.h)("label",null,(0,r.h)("span",null,n||e.replace(/_/g," ")),(0,r.h)("input",{type:"text",value:o,onBlur:this.handleInput})),(0,r.h)("input",{type:"range",min:a,max:u,step:s,value:i,onInput:this.handleRange}))}}]),e}();e.default=(0,o.connect)(function(t){return{opt:t.live.opt}},function(t,e){return{actions:(0,s.bindActionCreators)(a,t)}})(u)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default={name:"samplernn",displayName:"SampleRNN",datatype:"audio"}},function(t,e,n){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(t,e,n){"use strict";var i=n(9);var r=function(){for(var t,e=[],n=0;n<256;n++){t=n;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[n]=t}return e}();t.exports=function(t,e){return void 0!==t&&t.length?"string"!==i.getTypeOf(t)?function(t,e,n,i){var o=r,s=i+n;t^=-1;for(var a=i;a<s;a++)t=t>>>8^o[255&(t^e[a])];return-1^t}(0|e,t,t.length,0):function(t,e,n,i){var o=r,s=i+n;t^=-1;for(var a=i;a<s;a++)t=t>>>8^o[255&(t^e.charCodeAt(a))];return-1^t}(0|e,t,t.length,0):0}},function(t,e,n){"use strict";var i=n(35),r=n(101),o=n(100),s=n(99);o=n(100);function a(t,e,n,i,r){this.compressedSize=t,this.uncompressedSize=e,this.crc32=n,this.compression=i,this.compressedContent=r}a.prototype={getContentWorker:function(){var t=new r(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),e=this;return t.on("end",function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),t},getCompressedWorker:function(){return new r(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(t,e,n){return t.pipe(new s).pipe(new o("uncompressedSize")).pipe(e.compressWorker(n)).pipe(new o("compressedSize")).withStreamInfo("compression",e)},t.exports=a},function(t,e,n){t.exports=!n(105)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){"use strict";(function(e,i,r){var o=n(56);function s(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var i=t.entry;t.entry=null;for(;i;){var r=i.callback;e.pendingcb--,r(n),i=i.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=v;var a,u=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?i:o.nextTick;v.WritableState=_;var l=n(36);l.inherits=n(27);var c={deprecate:n(207)},h=n(112),p=n(55).Buffer,f=r.Uint8Array||function(){};var d,y=n(111);function m(){}function _(t,e){a=a||n(25),t=t||{};var i=e instanceof a;this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var r=t.highWaterMark,l=t.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i&&(l||0===l)?l:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===t.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,i=n.sync,r=n.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,i,r){--e.pendingcb,n?(o.nextTick(r,i),o.nextTick(T,t,e),t._writableState.errorEmitted=!0,t.emit("error",i)):(r(i),t._writableState.errorEmitted=!0,t.emit("error",i),T(t,e))}(t,n,i,e,r);else{var s=k(n);s||n.corked||n.bufferProcessing||!n.bufferedRequest||w(t,n),i?u(b,t,n,s,r):b(t,n,s,r)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function v(t){if(a=a||n(25),!(d.call(v,this)||this instanceof a))return new v(t);this._writableState=new _(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),h.call(this)}function g(t,e,n,i,r,o,s){e.writelen=i,e.writecb=s,e.writing=!0,e.sync=!0,n?t._writev(r,e.onwrite):t._write(r,o,e.onwrite),e.sync=!1}function b(t,e,n,i){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,i(),T(t,e)}function w(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var i=e.bufferedRequestCount,r=new Array(i),o=e.corkedRequestsFree;o.entry=n;for(var a=0,u=!0;n;)r[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;r.allBuffers=u,g(t,e,!0,e.length,r,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new s(e),e.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,h=n.callback;if(g(t,e,!1,e.objectMode?1:l.length,l,c,h),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function k(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function S(t,e){t._final(function(n){e.pendingcb--,n&&t.emit("error",n),e.prefinished=!0,t.emit("prefinish"),T(t,e)})}function T(t,e){var n=k(e);return n&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(S,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),n}l.inherits(v,h),_.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(_.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(t){return!!d.call(this,t)||this===v&&(t&&t._writableState instanceof _)}})):d=function(t){return t instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(t,e,n){var i,r=this._writableState,s=!1,a=!r.objectMode&&(i=t,p.isBuffer(i)||i instanceof f);return a&&!p.isBuffer(t)&&(t=function(t){return p.from(t)}(t)),"function"==typeof e&&(n=e,e=null),a?e="buffer":e||(e=r.defaultEncoding),"function"!=typeof n&&(n=m),r.ended?function(t,e){var n=new Error("write after end");t.emit("error",n),o.nextTick(e,n)}(this,n):(a||function(t,e,n,i){var r=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),o.nextTick(i,s),r=!1),r}(this,r,t,n))&&(r.pendingcb++,s=function(t,e,n,i,r,o){if(!n){var s=function(t,e,n){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=p.from(e,n));return e}(e,i,r);i!==s&&(n=!0,r="buffer",i=s)}var a=e.objectMode?1:i.length;e.length+=a;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:r,isBuf:n,callback:o,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else g(t,e,!1,a,i,r,o);return u}(this,r,a,t,e,n)),s},v.prototype.cork=function(){this._writableState.corked++},v.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||w(this,t))},v.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(t,e,n){var i=this._writableState;"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!==t&&void 0!==t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||function(t,e,n){e.ending=!0,T(t,e),n&&(e.finished?o.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,i,n)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),v.prototype.destroy=y.destroy,v.prototype._undestroy=y.undestroy,v.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,n(51),n(209).setImmediate,n(21))},function(t,e,n){(e=t.exports=n(113)).Stream=e,e.Readable=e,e.Writable=n(70),e.Duplex=n(25),e.Transform=n(109),e.PassThrough=n(206)},function(t,e){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(t){return"function"==typeof t}function r(t){return"object"==typeof t&&null!==t}function o(t){return void 0===t}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,n,s,a,u,l;if(this._events||(this._events={}),"error"===t&&(!this._events.error||r(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(o(n=this._events[t]))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(r(n))for(a=Array.prototype.slice.call(arguments,1),s=(l=n.slice()).length,u=0;u<s;u++)l[u].apply(this,a);return!0},n.prototype.addListener=function(t,e){var s;if(!i(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,i(e.listener)?e.listener:e),this._events[t]?r(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,r(this._events[t])&&!this._events[t].warned&&(s=o(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&s>0&&this._events[t].length>s&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){if(!i(e))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(t,r),n||(n=!0,e.apply(this,arguments))}return r.listener=e,this.on(t,r),this},n.prototype.removeListener=function(t,e){var n,o,s,a;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(s=(n=this._events[t]).length,o=-1,n===e||i(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(r(n)){for(a=s;a-- >0;)if(n[a]===e||n[a].listener&&n[a].listener===e){o=a;break}if(o<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(o,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(i(n=this._events[t]))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){return this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(i(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.live_task=void 0;r(n(17)),r(n(14)),r(n(6));var i=r(n(8));function r(t){return t&&t.__esModule?t:{default:t}}e.live_task=function(t,e){return function(n){var r={module:"pix2wav",activity:"live",dataset:t,checkpoint:e,opt:{poll_delay:.2}};return console.log(r),console.log("add live task"),i.default.queue.add_task(r)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.load_directories=void 0;var i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=(l(n(17)),l(n(14)),l(n(6))),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(43)),s=l(n(8)),a=l(n(5)),u=l(n(57));function l(t){return t&&t.__esModule?t:{default:t}}e.load_directories=function(t){return function(e){var n=u.default.name;a.default.allProgress([o.load(n),s.default.socket.list_directory({module:"pix2pix",dir:"sequences/pix2wav/"}),s.default.socket.list_directory({module:"pix2pix",dir:"datasets/pix2wav/"}),s.default.socket.list_directory({module:"pix2pix",dir:"checkpoints/pix2wav/"}),s.default.socket.list_directory({module:"pix2pix",dir:"checkpoints/pix2pix/"})],function(t,n,i){console.log("progress",n,i),e({type:r.default.app.load_progress,progress:{i:n,n:i}})}).then(function(t){var s=i(t,5),a=s[0],u=s[1],l=s[2],c=s[3],h=s[4],p=a.folderLookup,f=a.fileLookup,d=a.datasetLookup,y=a.folders,m=a.files,_=(a.unsortedFolder,u.filter(function(t){return t.dir}));_.forEach(function(t){o.getDataset(n,d,t.name).isBuilt=!0}),l.filter(function(t){return t.dir}).forEach(function(t){o.getDataset(n,d,t.name).hasDataset=!0});var v=c.filter(function(t){return t.dir});v.forEach(function(t){o.getDataset(n,d,t.name).hasCheckpoints=!0,t.module="pix2wav"});var g=h.filter(function(t){return t.dir});g.forEach(function(t){o.getDataset(n,d,t.name).hasCheckpoints=!0,t.module="pix2pix"}),console.log(t),console.log(v),console.log(g),e({type:r.default.dataset.load,data:{module:n,folderLookup:p,fileLookup:f,datasetLookup:d,folders:y,files:m,sequences:_,datasets:l,checkpoints:v.concat(g)}})}).catch(function(t){console.error(t)}),t&&(console.log("folder id",t),e({type:r.default.dataset.set_folder,data:{folder_id:t,module:n}}))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default={name:"pix2pix",displayName:"Pix2Pix",datatype:"video"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.load_directories=void 0;var i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=(l(n(17)),l(n(14)),l(n(6))),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(43)),s=l(n(8)),a=l(n(5)),u=l(n(75));function l(t){return t&&t.__esModule?t:{default:t}}e.load_directories=function(t){return function(e){var n=u.default.name;a.default.allProgress([o.load(n),s.default.socket.list_directory({module:n,dir:"sequences/pix2pix/"}),s.default.socket.list_directory({module:n,dir:"datasets/pix2pix/"}),s.default.socket.list_directory({module:n,dir:"checkpoints/pix2pix/"})],function(t,n,i){console.log("pix2pix load progress",n,i),e({type:r.default.app.load_progress,progress:{i:n,n:i}})}).then(function(t){var s=i(t,4),a=s[0],u=s[1],l=s[2],c=s[3],h=a.folderLookup,p=a.fileLookup,f=a.datasetLookup,d=a.folders,y=a.files,m=(a.unsortedFolder,u.filter(function(t){return t.dir}));m.forEach(function(t){o.getDataset(n,f,t.name).isBuilt=!0}),l.filter(function(t){return t.dir}).forEach(function(t){o.getDataset(n,f,t.name).hasDataset=!0});var _=c.filter(function(t){return t.dir});_.forEach(function(t){var e=o.getDataset(n,f,t.name);e.hasCheckpoints=!0,e.checkpoints=[t]}),e({type:r.default.dataset.load,data:{module:n,folderLookup:h,fileLookup:p,datasetLookup:f,folders:d,files:y,sequences:m,datasets:l,checkpoints:_}})}).catch(function(t){console.error(t)}),t&&(console.log("folder id",t),e({type:r.default.dataset.set_folder,data:{folder_id:t,module:n}}))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=u(n(240)),r=u(n(232)),o=u(n(228)),s=u(n(222)),a=u(n(160));function u(t){return t&&t.__esModule?t:{default:t}}e.default={morph:i.default,pix2pix:r.default,pix2pixhd:o.default,pix2wav:s.default,samplernn:a.default}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enqueue_test_task=e.changeTool=e.countDirectory=e.listDirectory=e.run=void 0;var i=o(n(14)),r=o(n(6));function o(t){return t&&t.__esModule?t:{default:t}}e.run=function(t){return function(e){e({type:r.default.system.running_command,cmd:t}),i.default.actions.run_system_command({cmd:t}).then(function(t){e({type:r.default.system.command_output,data:t})})}},e.listDirectory=function(t){return function(e){e({type:r.default.system.listing_directory,opt:t}),i.default.actions.list_directory(t).then(function(t){e({type:r.default.system.list_directory,data:t})})}},e.countDirectory=function(t){return function(e){e({type:r.default.system.counting_directory,opt:t}),i.default.actions.count_directory(t).then(function(t){e({type:r.default.system.count_directory,data:t})})}},e.changeTool=function(t){return localStorage.setItem("system.last_tool",t),{type:r.default.app.change_tool,tool:t}},e.enqueue_test_task=function(t){return function(t){}};window.addEventListener("keyDown",function(t){t.altKey&&t.keyCode})},function(t,e,n){var i,r=r||function(t){"use strict";if(!(void 0===t||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var e=function(){return t.URL||t.webkitURL||t},n=t.document.createElementNS("http://www.w3.org/1999/xhtml","a"),i="download"in n,r=/constructor/i.test(t.HTMLElement)||t.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent),s=function(e){(t.setImmediate||t.setTimeout)(function(){throw e},0)},a=function(t){setTimeout(function(){"string"==typeof t?e().revokeObjectURL(t):t.remove()},4e4)},u=function(t){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t},l=function(l,c,h){h||(l=u(l));var p,f=this,d="application/octet-stream"===l.type,y=function(){!function(t,e,n){for(var i=(e=[].concat(e)).length;i--;){var r=t["on"+e[i]];if("function"==typeof r)try{r.call(t,n||t)}catch(t){s(t)}}}(f,"writestart progress write writeend".split(" "))};if(f.readyState=f.INIT,i)return p=e().createObjectURL(l),void setTimeout(function(){var t,e;n.href=p,n.download=c,t=n,e=new MouseEvent("click"),t.dispatchEvent(e),y(),a(p),f.readyState=f.DONE});!function(){if((o||d&&r)&&t.FileReader){var n=new FileReader;return n.onloadend=function(){var e=o?n.result:n.result.replace(/^data:[^;]*;/,"data:attachment/file;");t.open(e,"_blank")||(t.location.href=e),e=void 0,f.readyState=f.DONE,y()},n.readAsDataURL(l),void(f.readyState=f.INIT)}p||(p=e().createObjectURL(l)),d?t.location.href=p:t.open(p,"_blank")||(t.location.href=p);f.readyState=f.DONE,y(),a(p)}()},c=l.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(t,e,n){return e=e||t.name||"download",n||(t=u(t)),navigator.msSaveOrOpenBlob(t,e)}:(c.abort=function(){},c.readyState=c.INIT=0,c.WRITING=1,c.DONE=2,c.error=c.onwritestart=c.onprogress=c.onwrite=c.onabort=c.onerror=c.onwriteend=null,function(t,e,n){return new l(t,e||t.name||"download",n)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);
-/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */void 0!==t&&t.exports?t.exports.saveAs=r:null!==n(275)&&null!==n(274)&&(void 0===(i=function(){return r}.call(e,n,e,t))||(t.exports=i))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=e.as_type=function(t,e){return[t,e].join("_").toUpperCase()},r=e.with_type=function(t,e){return e.reduce(function(e,n){return(e[n]=i(t,n))&&e},{})};e.crud_type=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return r(t,e.concat(["index_loading","index","index_error","show_loading","show","show_error","create_loading","create","create_error","update_loading","update","update_error","destroy_loading","destroy","destroy_error","upload_loading","upload_progress","upload_waiting","upload_complete","upload_error","sort"]))}},function(t,e,n){"use strict";e.__esModule=!0;e.addLeadingSlash=function(t){return"/"===t.charAt(0)?t:"/"+t},e.stripLeadingSlash=function(t){return"/"===t.charAt(0)?t.substr(1):t};var i=e.hasBasename=function(t,e){return new RegExp("^"+e+"(\\/|\\?|#|$)","i").test(t)};e.stripBasename=function(t,e){return i(t,e)?t.substr(e.length):t},e.stripTrailingSlash=function(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t},e.parsePath=function(t){var e=t||"/",n="",i="",r=e.indexOf("#");-1!==r&&(i=e.substr(r),e=e.substr(0,r));var o=e.indexOf("?");return-1!==o&&(n=e.substr(o),e=e.substr(0,o)),{pathname:e,search:"?"===n?"":n,hash:"#"===i?"":i}},e.createPath=function(t){var e=t.pathname,n=t.search,i=t.hash,r=e||"/";return n&&"?"!==n&&(r+="?"===n.charAt(0)?n:"?"+n),i&&"#"!==i&&(r+="#"===i.charAt(0)?i:"#"+i),r}},function(t,e,n){"use strict";n.r(e);var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.default=function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(Array.isArray(e))return Array.isArray(n)&&e.length===n.length&&e.every(function(e,i){return t(e,n[i])});var r=void 0===e?"undefined":i(e);if(r!==(void 0===n?"undefined":i(n)))return!1;if("object"===r){var o=e.valueOf(),s=n.valueOf();if(o!==e||s!==n)return t(o,s);var a=Object.keys(e),u=Object.keys(n);return a.length===u.length&&a.every(function(i){return t(e[i],n[i])})}return!1}},function(t,e,n){"use strict";function i(t){return"/"===t.charAt(0)}function r(t,e){for(var n=e,i=n+1,r=t.length;i<r;n+=1,i+=1)t[n]=t[i];t.pop()}n.r(e),e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t&&t.split("/")||[],o=e&&e.split("/")||[],s=t&&i(t),a=e&&i(e),u=s||a;if(t&&i(t)?o=n:n.length&&(o.pop(),o=o.concat(n)),!o.length)return"/";var l=void 0;if(o.length){var c=o[o.length-1];l="."===c||".."===c||""===c}else l=!1;for(var h=0,p=o.length;p>=0;p--){var f=o[p];"."===f?r(o,p):".."===f?(r(o,p),h++):h&&(r(o,p),h--)}if(!u)for(;h--;h)o.unshift("..");!u||""===o[0]||o[0]&&i(o[0])||o.unshift("");var d=o.join("/");return l&&"/"!==d.substr(-1)&&(d+="/"),d}},function(t,e,n){"use strict";(function(t,i){var r,o=n(142);r="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:i;var s=Object(o.a)(r);e.a=s}).call(this,n(21),n(295)(t))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(1),s=n(2),a=n(3),u=n(10),l=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(47)),c=n(13);var h=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var t=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.state={username:"",password:"",password2:""},t.handleChange=t.handleChange.bind(t),t.handleSubmit=t.handleSubmit.bind(t),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.Component),r(e,[{key:"handleChange",value:function(t,e){this.setState(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},e,t))}},{key:"validate",value:function(){return!(!this.state.password||this.state.password!==this.state.password2)}},{key:"handleSubmit",value:function(t){if(t.preventDefault(),!this.props.auth.loading){if(!this.validate())return this.props.actions.setError("bad password");var e=function(t,e){var n={};for(var i in t)e.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(this.state,[]);this.props.actions.signup(e)}}},{key:"render",value:function(){if(this.props.auth.isAuthenticated){var t=this.props.auth.returnTo;return t&&!t.match(/(api|login|logout|signup)/i)||(t="/"),(0,o.h)(u.Redirect,{to:t})}return(0,o.h)("form",{onSubmit:this.handleSubmit},(0,o.h)("h1",null,"New account"),(0,o.h)("br",null),(0,o.h)(c.Group,null,(0,o.h)(c.TextInput,{autofocus:!0,autocapitalize:"off",autocomplete:"off",title:"Username",name:"username",type:"text",value:this.state.username,onInput:this.handleChange}),(0,o.h)(c.TextInput,{title:"Password",name:"password",type:"password",value:this.state.password,onInput:this.handleChange}),(0,o.h)(c.TextInput,{title:"Password again :)",name:"password2",type:"password",value:this.state.password2,onInput:this.handleChange}),(0,o.h)(c.Button,{loading:this.props.auth.loading},"Sign up"),this.renderAuthError()))}},{key:"renderAuthError",value:function(){return this.props.auth.error?(0,o.h)("div",{className:"form-input-hint"},"Please doublecheck the form (o=_o~~)"):(0,o.h)("div",{className:"form-input-hint"})}}]),e}();e.default=(0,a.connect)(function(t){return{auth:t.auth}},function(t){return{actions:(0,s.bindActionCreators)(i({},l),t)}})(h)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),s=n(3),a=n(10),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(47));var l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"componentWillMount",value:function(t){this.props.actions.logout()}},{key:"render",value:function(){return(0,r.h)(a.Redirect,{to:"/"})}}]),e}();e.default=(0,s.connect)(function(t){return{}},function(t){return{actions:(0,o.bindActionCreators)(u,t)}})(l)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(3);e.default=(0,r.connect)(function(t){return{}},function(t,e){return{}})(function(t){var e=t.fullscreen?"player fullscreen":"player";return(0,i.h)("div",{className:e},(0,i.h)("canvas",{width:t.width,height:t.height}))})},function(t,e,n){"use strict";var i=n(90);function r(t){i.call(this,t)}n(9).inherits(r,i),r.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},t.exports=r},function(t,e,n){"use strict";var i=n(9);function r(t){this.data=t,this.length=t.length,this.index=0,this.zero=0}r.prototype={checkOffset:function(t){this.checkIndex(this.index+t)},checkIndex:function(t){if(this.length<this.zero+t||t<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+t+"). Corrupted zip ?")},setIndex:function(t){this.checkIndex(t),this.index=t},skip:function(t){this.setIndex(this.index+t)},byteAt:function(t){},readInt:function(t){var e,n=0;for(this.checkOffset(t),e=this.index+t-1;e>=this.index;e--)n=(n<<8)+this.byteAt(e);return this.index+=t,n},readString:function(t){return i.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},t.exports=r},function(t,e,n){"use strict";var i=n(89);function r(t){i.call(this,t);for(var e=0;e<this.data.length;e++)t[e]=255&t[e]}n(9).inherits(r,i),r.prototype.byteAt=function(t){return this.data[this.zero+t]},r.prototype.lastIndexOfSignature=function(t){for(var e=t.charCodeAt(0),n=t.charCodeAt(1),i=t.charCodeAt(2),r=t.charCodeAt(3),o=this.length-4;o>=0;--o)if(this.data[o]===e&&this.data[o+1]===n&&this.data[o+2]===i&&this.data[o+3]===r)return o-this.zero;return-1},r.prototype.readAndCheckSignature=function(t){var e=t.charCodeAt(0),n=t.charCodeAt(1),i=t.charCodeAt(2),r=t.charCodeAt(3),o=this.readData(4);return e===o[0]&&n===o[1]&&i===o[2]&&r===o[3]},r.prototype.readData=function(t){if(this.checkOffset(t),0===t)return[];var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},t.exports=r},function(t,e,n){"use strict";var i=n(9),r=n(23),o=n(90),s=n(167),a=n(166),u=n(88);t.exports=function(t){var e=i.getTypeOf(t);return i.checkSupport(e),"string"!==e||r.uint8array?"nodebuffer"===e?new a(t):r.uint8array?new u(i.transformTo("uint8array",t)):new o(i.transformTo("array",t)):new s(t)}},function(t,e,n){"use strict";e.LOCAL_FILE_HEADER="PK",e.CENTRAL_FILE_HEADER="PK",e.CENTRAL_DIRECTORY_END="PK",e.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",e.ZIP64_CENTRAL_DIRECTORY_END="PK",e.DATA_DESCRIPTOR="PK\b"},function(t,e,n){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(t,e,n){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},function(t,e,n){"use strict";var i=n(22),r=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(t){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){o=!1}for(var s=new i.Buf8(256),a=0;a<256;a++)s[a]=a>=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;function u(t,e){if(e<65537&&(t.subarray&&o||!t.subarray&&r))return String.fromCharCode.apply(null,i.shrinkBuf(t,e));for(var n="",s=0;s<e;s++)n+=String.fromCharCode(t[s]);return n}s[254]=s[254]=1,e.string2buf=function(t){var e,n,r,o,s,a=t.length,u=0;for(o=0;o<a;o++)55296==(64512&(n=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(r=t.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),u+=n<128?1:n<2048?2:n<65536?3:4;for(e=new i.Buf8(u),s=0,o=0;s<u;o++)55296==(64512&(n=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(r=t.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),n<128?e[s++]=n:n<2048?(e[s++]=192|n>>>6,e[s++]=128|63&n):n<65536?(e[s++]=224|n>>>12,e[s++]=128|n>>>6&63,e[s++]=128|63&n):(e[s++]=240|n>>>18,e[s++]=128|n>>>12&63,e[s++]=128|n>>>6&63,e[s++]=128|63&n);return e},e.buf2binstring=function(t){return u(t,t.length)},e.binstring2buf=function(t){for(var e=new i.Buf8(t.length),n=0,r=e.length;n<r;n++)e[n]=t.charCodeAt(n);return e},e.buf2string=function(t,e){var n,i,r,o,a=e||t.length,l=new Array(2*a);for(i=0,n=0;n<a;)if((r=t[n++])<128)l[i++]=r;else if((o=s[r])>4)l[i++]=65533,n+=o-1;else{for(r&=2===o?31:3===o?15:7;o>1&&n<a;)r=r<<6|63&t[n++],o--;o>1?l[i++]=65533:r<65536?l[i++]=r:(r-=65536,l[i++]=55296|r>>10&1023,l[i++]=56320|1023&r)}return u(l,i)},e.utf8border=function(t,e){var n;for((e=e||t.length)>t.length&&(e=t.length),n=e-1;n>=0&&128==(192&t[n]);)n--;return n<0?e:0===n?e:n+s[t[n]]>e?n:e}},function(t,e,n){"use strict";var i=function(){for(var t,e=[],n=0;n<256;n++){t=n;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[n]=t}return e}();t.exports=function(t,e,n,r){var o=i,s=r+n;t^=-1;for(var a=r;a<s;a++)t=t>>>8^o[255&(t^e[a])];return-1^t}},function(t,e,n){"use strict";t.exports=function(t,e,n,i){for(var r=65535&t|0,o=t>>>16&65535|0,s=0;0!==n;){n-=s=n>2e3?2e3:n;do{o=o+(r=r+e[i++]|0)|0}while(--s);r%=65521,o%=65521}return r|o<<16|0}},function(t,e,n){"use strict";var i=n(15);e.STORE={magic:"\0\0",compressWorker:function(t){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},e.DEFLATE=n(181)},function(t,e,n){"use strict";var i=n(15),r=n(66);function o(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n(9).inherits(o,i),o.prototype.processChunk=function(t){this.streamInfo.crc32=r(t.data,this.streamInfo.crc32||0),this.push(t)},t.exports=o},function(t,e,n){"use strict";var i=n(9),r=n(15);function o(t){r.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}i.inherits(o,r),o.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}r.prototype.processChunk.call(this,t)},t.exports=o},function(t,e,n){"use strict";var i=n(9),r=n(15);function o(t){r.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then(function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=i.getTypeOf(t),e.isPaused||e._tickAndRepeat()},function(t){e.error(t)})}i.inherits(o,r),o.prototype.cleanUp=function(){r.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=o},function(t,e,n){"use strict";e.base64=!1,e.binary=!1,e.dir=!1,e.createFolders=!0,e.date=null,e.compression=null,e.compressionOptions=null,e.comment=null,e.unixPermissions=null,e.dosPermissions=null},function(t,e,n){"use strict";(function(e){var i=n(9),r=n(185),o=n(15),s=n(108),a=n(23),u=n(35),l=null;if(a.nodestream)try{l=n(184)}catch(t){}function c(t,n){return new u.Promise(function(r,o){var a=[],u=t._internalType,l=t._outputType,c=t._mimeType;t.on("data",function(t,e){a.push(t),n&&n(e)}).on("error",function(t){a=[],o(t)}).on("end",function(){try{var t=function(t,e,n){switch(t){case"blob":return i.newBlob(i.transformTo("arraybuffer",e),n);case"base64":return s.encode(e);default:return i.transformTo(t,e)}}(l,function(t,n){var i,r=0,o=null,s=0;for(i=0;i<n.length;i++)s+=n[i].length;switch(t){case"string":return n.join("");case"array":return Array.prototype.concat.apply([],n);case"uint8array":for(o=new Uint8Array(s),i=0;i<n.length;i++)o.set(n[i],r),r+=n[i].length;return o;case"nodebuffer":return e.concat(n);default:throw new Error("concat : unsupported type '"+t+"'")}}(u,a),c);r(t)}catch(t){o(t)}a=[]}).resume()})}function h(t,e,n){var s=e;switch(e){case"blob":case"arraybuffer":s="uint8array";break;case"base64":s="string"}try{this._internalType=s,this._outputType=e,this._mimeType=n,i.checkSupport(s),this._worker=t.pipe(new r(s)),t.lock()}catch(t){this._worker=new o("error"),this._worker.error(t)}}h.prototype={accumulate:function(t){return c(this,t)},on:function(t,e){var n=this;return"data"===t?this._worker.on(t,function(t){e.call(n,t.data,t.meta)}):this._worker.on(t,function(){i.delay(e,arguments,n)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(t){if(i.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new l(this,{objectMode:"nodebuffer"!==this._outputType},t)}},t.exports=h}).call(this,n(37).Buffer)},function(t,e,n){var i=n(69),r=n(53).document,o=i(r)&&i(r.createElement);t.exports=function(t){return o?r.createElement(t):{}}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var i=n(198);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},function(t,e){var n=t.exports={version:"2.3.0"};"number"==typeof __e&&(__e=n)},function(t,e,n){"use strict";var i=n(9),r=n(23),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";e.encode=function(t){for(var e,n,r,s,a,u,l,c=[],h=0,p=t.length,f=p,d="string"!==i.getTypeOf(t);h<t.length;)f=p-h,d?(e=t[h++],n=h<p?t[h++]:0,r=h<p?t[h++]:0):(e=t.charCodeAt(h++),n=h<p?t.charCodeAt(h++):0,r=h<p?t.charCodeAt(h++):0),s=e>>2,a=(3&e)<<4|n>>4,u=f>1?(15&n)<<2|r>>6:64,l=f>2?63&r:64,c.push(o.charAt(s)+o.charAt(a)+o.charAt(u)+o.charAt(l));return c.join("")},e.decode=function(t){var e,n,i,s,a,u,l=0,c=0;if("data:"===t.substr(0,"data:".length))throw new Error("Invalid base64 input, it looks like a data url.");var h,p=3*(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(t.charAt(t.length-1)===o.charAt(64)&&p--,t.charAt(t.length-2)===o.charAt(64)&&p--,p%1!=0)throw new Error("Invalid base64 input, bad content length.");for(h=r.uint8array?new Uint8Array(0|p):new Array(0|p);l<t.length;)e=o.indexOf(t.charAt(l++))<<2|(s=o.indexOf(t.charAt(l++)))>>4,n=(15&s)<<4|(a=o.indexOf(t.charAt(l++)))>>2,i=(3&a)<<6|(u=o.indexOf(t.charAt(l++))),h[c++]=e,64!==a&&(h[c++]=n),64!==u&&(h[c++]=i);return h}},function(t,e,n){"use strict";t.exports=o;var i=n(25),r=n(36);function o(t){if(!(this instanceof o))return new o(t);i.call(this,t),this._transformState={afterTransform:function(t,e){var n=this._transformState;n.transforming=!1;var i=n.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=e&&this.push(e),i(t);var r=this._readableState;r.reading=!1,(r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",s)}function s(){var t=this;"function"==typeof this._flush?this._flush(function(e,n){a(t,e,n)}):a(this,null,null)}function a(t,e,n){if(e)return t.emit("error",e);if(null!=n&&t.push(n),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}r.inherits=n(27),r.inherits(o,i),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,i.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,n){throw new Error("_transform() is not implemented")},o.prototype._write=function(t,e,n){var i=this._transformState;if(i.writecb=n,i.writechunk=t,i.writeencoding=e,!i.transforming){var r=this._readableState;(i.needTransform||r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},o.prototype._destroy=function(t,e){var n=this;i.prototype._destroy.call(this,t,function(t){e(t),n.emit("close")})}},function(t,e,n){"use strict";var i=n(55).Buffer,r=i.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(i.isEncoding===r||!r(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=l,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=c,this.end=h,e=3;break;default:return this.write=p,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var i=n.charCodeAt(n.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function l(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function c(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function p(t){return t.toString(this.encoding)}function f(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<t.length?e?e+this.text(t,n):this.text(t,n):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var n=function(t,e,n){var i=e.length-1;if(i<n)return 0;var r=s(e[i]);if(r>=0)return r>0&&(t.lastNeed=r-1),r;if(--i<n||-2===r)return 0;if((r=s(e[i]))>=0)return r>0&&(t.lastNeed=r-2),r;if(--i<n||-2===r)return 0;if((r=s(e[i]))>=0)return r>0&&(2===r?r=0:t.lastNeed=r-3),r;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var i=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,n){"use strict";var i=n(56);function r(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var n=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||i.nextTick(r,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?(i.nextTick(r,n,t),n._writableState&&(n._writableState.errorEmitted=!0)):e&&e(t)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,n){t.exports=n(72).EventEmitter},function(t,e,n){"use strict";(function(e,i){var r=n(56);t.exports=g;var o,s=n(115);g.ReadableState=v;n(72).EventEmitter;var a=function(t,e){return t.listeners(e).length},u=n(112),l=n(55).Buffer,c=e.Uint8Array||function(){};var h=n(36);h.inherits=n(27);var p=n(212),f=void 0;f=p&&p.debuglog?p.debuglog("stream"):function(){};var d,y=n(211),m=n(111);h.inherits(g,u);var _=["error","close","destroy","pause","resume"];function v(t,e){o=o||n(25),t=t||{};var i=e instanceof o;this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var r=t.highWaterMark,s=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(d||(d=n(110).StringDecoder),this.decoder=new d(t.encoding),this.encoding=t.encoding)}function g(t){if(o=o||n(25),!(this instanceof g))return new g(t);this._readableState=new v(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function b(t,e,n,i,r){var o,s=t._readableState;null===e?(s.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,T(t)}(t,s)):(r||(o=function(t,e){var n;i=e,l.isBuffer(i)||i instanceof c||"string"==typeof e||void 0===e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var i;return n}(s,e)),o?t.emit("error",o):s.objectMode||e&&e.length>0?("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===l.prototype||(e=function(t){return l.from(t)}(e)),i?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):w(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!n?(e=s.decoder.write(e),s.objectMode||0!==e.length?w(t,s,e,!1):O(t,s)):w(t,s,e,!1))):i||(s.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(s)}function w(t,e,n,i){e.flowing&&0===e.length&&!e.sync?(t.emit("data",n),t.read(0)):(e.length+=e.objectMode?1:n.length,i?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&T(t)),O(t,e)}Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),g.prototype.destroy=m.destroy,g.prototype._undestroy=m.undestroy,g.prototype._destroy=function(t,e){this.push(null),e(t)},g.prototype.push=function(t,e){var n,i=this._readableState;return i.objectMode?n=!0:"string"==typeof t&&((e=e||i.defaultEncoding)!==i.encoding&&(t=l.from(t,e),e=""),n=!0),b(this,t,e,!1,n)},g.prototype.unshift=function(t){return b(this,t,null,!0,!1)},g.prototype.isPaused=function(){return!1===this._readableState.flowing},g.prototype.setEncoding=function(t){return d||(d=n(110).StringDecoder),this._readableState.decoder=new d(t),this._readableState.encoding=t,this};var k=8388608;function S(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=k?t=k:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function T(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(f("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?r.nextTick(x,t):x(t))}function x(t){f("emit readable"),t.emit("readable"),C(t)}function O(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(P,t,e))}function P(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(f("maybeReadMore read 0"),t.read(0),n!==e.length);)n=e.length;e.readingMore=!1}function A(t){f("readable nexttick read 0"),t.read(0)}function E(t,e){e.reading||(f("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),C(t),e.flowing&&!e.reading&&t.read(0)}function C(t){var e=t._readableState;for(f("flow",e.flowing);e.flowing&&null!==t.read(););}function M(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=function(t,e,n){var i;t<e.head.data.length?(i=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):i=t===e.head.data.length?e.shift():n?function(t,e){var n=e.head,i=1,r=n.data;t-=r.length;for(;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(s===o.length?r+=o:r+=o.slice(0,t),0===(t-=s)){s===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++i}return e.length-=i,r}(t,e):function(t,e){var n=l.allocUnsafe(t),i=e.head,r=1;i.data.copy(n),t-=i.data.length;for(;i=i.next;){var o=i.data,s=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,s),0===(t-=s)){s===o.length?(++r,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=o.slice(s));break}++r}return e.length-=r,n}(t,e);return i}(t,e.buffer,e.decoder),n);var n}function R(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,r.nextTick(j,e,t))}function j(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function F(t,e){for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1}g.prototype.read=function(t){f("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return f("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?R(this):T(this),null;if(0===(t=S(t,e))&&e.ended)return 0===e.length&&R(this),null;var i,r=e.needReadable;return f("need readable",r),(0===e.length||e.length-t<e.highWaterMark)&&f("length less than watermark",r=!0),e.ended||e.reading?f("reading or ended",r=!1):r&&(f("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=S(n,e))),null===(i=t>0?M(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&R(this)),null!==i&&this.emit("data",i),i},g.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},g.prototype.pipe=function(t,e){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,f("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==i.stdout&&t!==i.stderr?c:g;function l(e,i){f("onunpipe"),e===n&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,f("cleanup"),t.removeListener("close",_),t.removeListener("finish",v),t.removeListener("drain",h),t.removeListener("error",m),t.removeListener("unpipe",l),n.removeListener("end",c),n.removeListener("end",g),n.removeListener("data",y),p=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||h())}function c(){f("onend"),t.end()}o.endEmitted?r.nextTick(u):n.once("end",u),t.on("unpipe",l);var h=function(t){return function(){var e=t._readableState;f("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,C(t))}}(n);t.on("drain",h);var p=!1;var d=!1;function y(e){f("ondata"),d=!1,!1!==t.write(e)||d||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==F(o.pipes,t))&&!p&&(f("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function m(e){f("onerror",e),g(),t.removeListener("error",m),0===a(t,"error")&&t.emit("error",e)}function _(){t.removeListener("finish",v),g()}function v(){f("onfinish"),t.removeListener("close",_),g()}function g(){f("unpipe"),n.unpipe(t)}return n.on("data",y),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",m),t.once("close",_),t.once("finish",v),t.emit("pipe",n),o.flowing||(f("pipe resume"),n.resume()),t},g.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n),this);if(!t){var i=e.pipes,r=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<r;o++)i[o].emit("unpipe",this,n);return this}var s=F(e.pipes,t);return-1===s?this:(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,n),this)},g.prototype.on=function(t,e){var n=u.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&T(this):r.nextTick(A,this))}return n},g.prototype.addListener=g.prototype.on,g.prototype.resume=function(){var t=this._readableState;return t.flowing||(f("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(E,t,e))}(this,t)),this},g.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this},g.prototype.wrap=function(t){var e=this,n=this._readableState,i=!1;for(var r in t.on("end",function(){if(f("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)}),t.on("data",function(r){(f("wrapped data"),n.decoder&&(r=n.decoder.write(r)),!n.objectMode||null!==r&&void 0!==r)&&((n.objectMode||r&&r.length)&&(e.push(r)||(i=!0,t.pause())))}),t)void 0===this[r]&&"function"==typeof t[r]&&(this[r]=function(e){return function(){return t[e].apply(t,arguments)}}(r));for(var o=0;o<_.length;o++)t.on(_[o],this.emit.bind(this,_[o]));return this._read=function(e){f("wrapped _read",e),i&&(i=!1,t.resume())},this},Object.defineProperty(g.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),g._fromList=M}).call(this,n(21),n(51))},function(t,e,n){t.exports=n(213)},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.train_task=e.live_task=e.fetch_task=void 0;r(n(17)),r(n(14)),r(n(6));var i=r(n(8));function r(t){return t&&t.__esModule?t:{default:t}}e.fetch_task=function(t,e,n){return function(r){if(!t)return console.log("input file inaccessible (no url)");var o={module:"pix2pix",activity:"fetch",dataset:n,opt:{url:t,file_id:e,dataset:n}};return i.default.queue.add_task(o)}},e.live_task=function(t,e){return function(n){var r={module:"pix2pix",activity:"live",dataset:t,checkpoint:e,opt:{poll_delay:.09}};return console.log(r),console.log("add live task"),i.default.queue.add_task(r)}},e.train_task=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(r){var o={module:"pix2pix",activity:"train",dataset:t.name,epoch:0,epochs:n,opt:{folder_id:e,load_size:264}};return console.log(o),i.default.queue.add_task(o)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default={name:"morph",displayName:"Morph",datatype:"video"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.actions=e.parser=e.util=void 0;var i,r=n(239),o=n(5),s=(i=o)&&i.__esModule?i:{default:i},a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(237));e.util=s.default,e.parser=a;e.actions=["folder","file","dataset","task","user"].reduce(function(t,e){return(t[e]=(0,r.crud_actions)(e))&&t},{})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.progress;if(!e)return;for(var n=e.i,r=e.n,o=[],s=0;s<r;s++)o.push((0,i.h)("div",{key:s,className:s<n?"x":"o"}));return(0,i.h)("div",{className:"progress"},o)};var i=n(1)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.default=function(t){var e=t.db,n=t.path,c=t.emptyText,h=t.activity;if(!e)return null;if(e.loading||!e.data)return(0,r.h)("div",{class:"col folderList"},(0,r.h)(l.default,{progress:e.progress}));var p=e.data.folders;h&&(p=p.filter(function(t){return t.activity===h}));if(!p.length&&c)return(0,r.h)("div",{class:"col folderList"},c);console.log(f);var f=p.map(function(t){var a=e.data.folderLookup[t.id],l=a.files?a.files.length:0,c=s.default.hush_null(l),h=i(c,2),p=h[0];h[1];return(0,r.h)(u.default,{title:(0,r.h)(o.Link,{to:n+a.id+"/"},a.name)},(0,r.h)("span",{className:p},l," file",s.default.courtesy_s(l)))});return(0,r.h)("div",{class:"col folderList"},(0,r.h)(a.default,{title:"Projects"},f))};var r=n(1),o=(n(2),n(3),n(10)),s=c(n(5)),a=c(n(24)),u=c(n(31)),l=c(n(18));function c(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1);var o=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.handleChange=n.handleChange.bind(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"handleChange",value:function(t){this.props.onChange&&this.props.onChange(),t.stopPropagation(),t.preventDefault(),this.setState({thumbnails:[],images:[]});var e=t.dataTransfer?t.dataTransfer.files:t.target.files,n=void 0,i=void 0;for(n=0;n<e.length&&!(i=e[n]);n++);this.props.onUpload&&this.props.onUpload(i)}},{key:"render",value:function(){return(0,r.h)("div",{className:"fileUpload param"},(0,r.h)("label",null,(0,r.h)("span",null,this.props.title),(0,r.h)("input",{type:"file",accept:this.props.accept||"*/*",multiple:this.props.multiple,onChange:this.handleChange}),(0,r.h)("button",null,this.props.label||"Choose file...")))}}]),e}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1);function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var s=function(t){function e(){var t,n,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=arguments.length,s=Array(r),a=0;a<r;a++)s[a]=arguments[a];return n=i=o(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(s))),i.state={x:0,y:0},o(i,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"render",value:function(){var t=this,e=this.state,n=e.x,i=e.y,o=this.props,s=o.x,a=o.y,u=o.max,l=void 0===u?1/0:u,c=o.onClick,h=o.onHover;return(0,r.h)("table",{className:"buttonGrid"},(0,r.h)("tr",{className:"row"},(0,r.h)("th",null," "),s.map(function(t){return(0,r.h)("th",{className:t===n&&"bold"},t)})),a.map(function(e){return(0,r.h)("tr",{className:"row"},(0,r.h)("th",{className:e===i&&"bold"},e),s.map(function(n){return(0,r.h)("td",null,n*e>l?" ":(0,r.h)("button",{onClick:function(){return c(n,e)},onMouseEnter:function(){t.setState({x:n,y:e}),h(n,e)}}," "))}))}))}}]),e}();e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),s=n(3),a=(n(10),function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(47))),u=n(13);function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var c=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var t=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.state={username:"",password:""},t.handleChange=t.handleChange.bind(t),t.handleSubmit=t.handleSubmit.bind(t),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"handleChange",value:function(t,e){var n;this.setState((l(n={},e,t),l(n,"error",null),n))}},{key:"handleSubmit",value:function(t){t.preventDefault(),this.props.auth.loading||this.props.actions.login(this.state.username,this.state.password)}},{key:"render",value:function(){return(0,r.h)("form",{onSubmit:this.handleSubmit},(0,r.h)("h1",null,"Log in"),(0,r.h)("br",null),(0,r.h)(u.Group,null,(0,r.h)(u.TextInput,{autofocus:!0,autocapitalize:"off",autocomplete:"off",title:"Username",name:"username",type:"text",value:this.state.username,onInput:this.handleChange}),(0,r.h)(u.TextInput,{title:"Password",name:"password",type:"password",value:this.state.password,onInput:this.handleChange}),(0,r.h)(u.Button,{loading:this.props.auth.loading},"Login"),this.renderAuthError()))}},{key:"renderAuthError",value:function(){return this.props.auth.error?(0,r.h)("div",{className:"form-input-hint"},"There was an error logging you in (bad password?)"):null}}]),e}();e.default=(0,s.connect)(function(t){return{auth:t.auth}},function(t){return{actions:(0,o.bindActionCreators)(a,t)}})(c)},function(t,e){t.exports=e=window.fetch,e.default=window.fetch.bind(window),e.Headers=window.Headers,e.Request=window.Request,e.Response=window.Response},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.destroy=void 0,e.crud_fetch=function(t,e){var n="/api/"+t+"/"+(e||"");return{index:function(t){return(0,o.default)(function(t,e){var n=new URL(window.location.origin+t);e&&Object.keys(e).forEach(function(t){return n.searchParams.append(t,e[t])});return n}(n,t),{method:"GET",credentials:"same-origin",headers:{Accept:"application/json"}}).then(function(t){return t.json()}).catch(c)},show:function(t){return(0,o.default)(n+t,{method:"GET",credentials:"same-origin",headers:{Accept:"application/json"}},{method:"GET",credentials:"same-origin",headers:{Accept:"application/json"}}).then(function(t){return t.json()}).catch(c)},create:function(t){return(0,o.default)(n,a(t)).then(function(t){return t.json()}).catch(c)},update:function(t){return(0,o.default)(n+t.id,u(t)).then(function(t){return t.json()}).catch(c)},destroy:function(t){return(0,o.default)(n+t.id,l(t)).then(function(t){return t.json()}).catch(c)}}},e._get_headers=s,e.post=a,e.postBody=function(t){return{method:"POST",body:t,credentials:"same-origin",headers:{Accept:"application/json"}}},e.put=u;var i,r=n(124),o=(i=r)&&i.__esModule?i:{default:i};function s(){return{method:"GET",credentials:"same-origin",headers:{Accept:"application/json"}}}function a(t){return{method:"POST",body:JSON.stringify(t),credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"}}}function u(t){return{method:"PUT",body:JSON.stringify(t),credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"}}}function l(t){return{method:"DELETE",body:JSON.stringify(t),credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"}}}function c(t){console.warn(t)}e.destroy=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a(n(48)),r=n(5),o=n(254),s=a(n(251));function a(t){return t&&t.__esModule?t:{default:t}}var u=512,l=u/4,c=new s.default(u);function h(t,e){var n=t.length,i=0,r=void 0;for(r=0;r<e;r++)i=r/e,i*=i,t[r]*=i,t[n-r]*=i}function p(t){var e=t.data,n=t.fft_size,i=t.sr,r=t.fft_overlap,o=e.length,s=new Array(o),a=void 0;for(a=0;a<o;a++)s[a]=e[a].concat(),s[a][2]=0;return{data:s,fft_size:n,sr:i,fft_overlap:r}}function f(t,e){var n=p(t),i=t.data,r=t.sr,o=t.fft_size,s=t.fft_overlap,a=i.length,u=n.data,l=void 0,c=void 0,h=void 0,f=void 0;for(c=e.length;c<o;c++)e[c]=c;for(l=0;l<a;l++){for(h=i[l],f=u[l]=i[l].concat(),h[0]=0,h[2]=0,h[4]=0,c=0;c<o/2;c++)f[2*c]=h[2*e[c]],f[2*c+1]=h[2*e[c]+1];for(;c<o;c++)f[2*c]=0,f[2*c+1]=0}return{data:u,sr:r,fft_size:o,fft_overlap:s}}e.default={fft_size:u,fft_overlap:l,toSpectrum:function(t,e){e=e||44100;var n=o.windows.construct("ham",u),i=new Array(u),r=t.length,s=Math.ceil(r/u)*u,a=void 0,h=void 0,p=void 0,f=[];for(a=-u;a<s;a+=l){for(h=0;h<u;h++)i[h]=t[a+h]*n[h]||0;p=c.createComplexArray(),c.realTransform(p,i),c.completeSpectrum(p),f.push(p)}return{data:f,sr:e,fft_size:u,fft_overlap:l}},fromSpectrum:function(t){var e=t.data,n=t.sr,r=t.fft_size,s=t.fft_overlap,a=e.length,u=o.windows.construct("ham",r),l=c.createComplexArray(),p=s*a,f=i.default.context.createBuffer(1,p,n),d=f.getChannelData(0),y=void 0,m=void 0,_=void 0,v=void 0;for(y=0;y<a;y++)for(v=e[y],c.inverseTransform(l,v),_=y*s,m=0;m<r;m++)d[_+m]+=l[2*m]*u[m]||0;return h(d,r),f},fromImageData:function(t,e,n,i){var r=t.data,o=t.width,s=t.height,a=new Array(o),c=void 0,h=void 0,p=void 0,f=void 0,d=void 0;for(h=0;h<s;h++){var y=a[h]=new Float32Array(4*s);for(c=0;c<o;c++)p=4*(c*o+h),y[f=2*c]=(r[p]/255-.5)*n,y[f+1]=(r[p+1]/255-.5)*i,y[d=2*(s-h+s)]=y[f],y[d+1]=0;y[2*s]=y[2*s+1]=y[2*s-1]=y[2*s-2]=0}return{data:a,sr:e,fft_size:u,fft_overlap:l}},binToHz:function(t,e){return e/t.fft_size*t.sr},fadeInOut:h,cloneSpectrum:p,reverseSpectrum:function(t){var e=p(t);return e.data=e.data.reverse(),e},shuffleSpectrum:function(t){var e=t.fft_size,n=new Array(e),i=void 0;for(i=0;i<e;i++)n[i]=i;return(0,r.shuffle)(n),f(t,n)},invertSpectrum:function(t){var e=t.fft_size,n=new Array(e),i=void 0;for(i=0;i<e;i++)n[i]=e-i-1;return f(t,n)},rotateSpectrum:function(t,e){var n=t.fft_size;e&&e<1&&(e-=.5,e*=n),e=Math.floor(e);var i=new Array(n),o=void 0;for(o=0;o<n;o++)i[o]=(0,r.mod)(o+e,n/2);return f(t,i)},reorderBins:f,linearBins:function(t,e){e=e||1;var n=[],i=void 0,o=void 0;for(o=0;o<e;o++)n[o]=[];var s=Math.floor(t.fft_size/e),a=(0,r.quantize)(t.fft_size,e);for(i=0;i<a;i++)n[o=Math.floor(i/s)]=n[o]||[],n[o].push(i);for(;i<t.fft_size;i++)n[o].push(i);return n},logarithmicBins:function(t){var e=[],n=void 0,i=void 0,r=void 0,o=Math.log2(t.fft_size)-1;for(n=0,r=0,i=0;n<o;n++)for(i+=1<<n,e[n]=[];r<i;r++)e[n].push(r);return e},concatBins:function(t){return t.reduce(function(t,e){return t.concat(e)},[])},reverseBins:function(t){return t.map(function(t){return t.reverse()})},minBins:function(t){return t.map(function(t){var e=t[0];return t.map(function(){return e})})},maxBins:function(t){return t.map(function(t){var e=t[t.length-1];return t.map(function(){return e})})},rotatePhase:function(t,e){var n=t.data,i=t.fft_size,r=void 0,o=void 0,s=void 0,a=n.length;for(r=0;r<a;r++)for(s=n[r],o=0;o<i;o++)s[2*o+1]+=e;return t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(48),o=(i=r)&&i.__esModule?i:{default:i};var s=new o.default.Compressor(-30,3).toMaster(),a=new o.default.Gain(1).connect(s);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.spectrum=function(t,e,n,i,r){var o=t.data,c=(t.fft_size,t.fft_size/2),h=o.length;s.width=o.length,s.height=c;var p=ctx.createImageData(s.width,s.height),f=p.data,d=void 0,y=void 0,m=void 0,_=void 0,v=void 0,g=void 0,b=void 0,w=void 0;for(d=0;d<h;d++)for(b=o[d],y=0;y<c;y++)m=4*((c-y)*h+d),v=b[_=2*y],g=mod(b[_+1],2*Math.PI)/(2*Math.PI),w=color.hsl2rgb((g+1)/2,1,1-Math.abs(v/10)),f[m]=w[0],f[m+1]=w[1],f[m+2]=w[2],f[m+3]=255;a.putImageData(p,0,0);var k=t.fft_overlap*h;e=e*devicePixelRatio||0,n=n*devicePixelRatio||Math.floor(l/4),i=i*devicePixelRatio||u,r=r*devicePixelRatio||l/4;var S=Math.round(k/t.sr*pixels_per_second),T=Math.floor(r);ctx.save(),clear(1,e,n,u,T),ctx.drawImage(s,e,n,S,T),ctx.restore()},e.raw_spectrum=function(t,e,n,i,r,s,a){var u=t.data,l=(t.fft_size,t.fft_size/2),c=u.length,h=document.createElement("canvas"),p=h.getContext("2d-lodpi");h.width=u.length,h.height=l;var f=p.createImageData(h.width,h.height),d=f.data,y=void 0,m=void 0,_=void 0,v=void 0,g=void 0,b=void 0,w=void 0,k=-s,S=-a,T=s-k,x=a-S,O=0,P=0,A=void 0,E=void 0;for(y=0;y<c;y++){for(w=u[y],O=0,P=0,m=0;m<l;m++)_=4*(m*c+y),A=w[v=2*m],E=w[v+1],O+=A,P+=E,g=o.default.clamp((A-k)/T*255,0,255),b=o.default.clamp((E-S)/x*255,0,255),d[_+0]=g,d[_+1]=b,d[_+2]=127,d[_+3]=255;O/=l,P/=l}return c,c,p.putImageData(f,0,0),{canvas:h,imageData:f}};var i,r=n(5),o=(i=r)&&i.__esModule?i:{default:i};var s=document.createElement("canvas"),a=s.getContext("2d-lodpi"),u=256,l=256},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.play=function(t){var e=o.default.fromImageData(t.imageData,44100,a,u),n=o.default.fromSpectrum(e),s=new i.default.Player(n);s.connect(r.default),s.start(i.default.now())};s(n(6));var i=s(n(48)),r=(function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);e.default=t}(n(128)),s(n(127))),o=s(n(126));function s(t){return t&&t.__esModule?t:{default:t}}var a=8,u=8},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.syscall_async=e.upload_file=e.run_script=e.list_sequences=e.count_directory=e.list_directory=e.disk_usage=e.run_system_command=void 0;var i,r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},o=n(17),s=(i=o)&&i.__esModule?i:{default:i},a=n(32);e.run_system_command=function(t){return u("run_system_command",t)},e.disk_usage=function(t){return u("run_system_command",r({cmd:"du"},t))},e.list_directory=function(t){return u("list_directory",t).then(function(t){return t.files})},e.count_directory=function(t){return u("count_directory",t).then(function(t){return t.count})},e.list_sequences=function(t){return u("list_sequences",t).then(function(t){return t.sequences})},e.run_script=function(t){return u("run_script",t)},e.upload_file=function(t){return u("upload_file",t)};var u=e.syscall_async=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e4;return n=e.ttl||n,new Promise(function(i,r){var o=(0,s.default)(),u=setTimeout(function(){a.socket.off("system_res",l),r("timeout")},n),l=function t(e){e.uuid&&e.uuid===o&&(clearTimeout(u),a.socket.off("system_res",t),i(e))};a.socket.emit("system",{cmd:t,payload:e,uuid:o}),a.socket.on("system_res",l)})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.randrange=function(t,e){return Math.random()*(e-t)+t},e.randsign=function(){return Math.random()>=.5?-1:1},e.choice=function(t){return t[Math.floor(Math.random()*t.length)]},e.angle=function(t,e,n,i){return Math.atan2(i-e,n-t)},e.dist=function(t,e,n,i){return Math.sqrt(Math.pow(n-t,2)+Math.pow(i-e,2))},e.xor=function(t,e){return e=!!e,((t=!!t)||e)&&!(t&&e)},e.quantize=function(t,e){return Math.floor(t/e)*e},e.shuffle=function(t){for(var e=t.length;e>0;e--){var n=i(e),r=t[e-1];t[e-1]=t[n],t[n]=r}return t},e.gaussian=function(t,e){var n=void 0,i=!1;return function(){var r=void 0;if(i)r=n,i=!1;else{var o=void 0,s=void 0,a=void 0;do{o=2*Math.random()-1,s=2*Math.random()-1,a=o*o+s*s}while(a>=1);a=Math.sqrt(-2*Math.log(a)/a),r=o*a,n=s*a,i=!0}var u=t+e*r;return u>0?u:-u}};e.mod=function(t,e){return t-e*Math.floor(t/e)},e.clamp=function(t,e,n){return t<e?e:t<n?t:n},e.norm=function(t,e,n){return(t-e)/(n-e)},e.lerp=function(t,e,n){return(n-e)*t+e},e.mix=function(t,e,n){return e*(1-t)+n*t};var i=e.randint=function(t){return Math.floor(Math.random()*t)}},function(t,e,n){"use strict";e.__esModule=!0;e.addLeadingSlash=function(t){return"/"===t.charAt(0)?t:"/"+t},e.stripLeadingSlash=function(t){return"/"===t.charAt(0)?t.substr(1):t};var i=e.hasBasename=function(t,e){return new RegExp("^"+e+"(\\/|\\?|#|$)","i").test(t)};e.stripBasename=function(t,e){return i(t,e)?t.substr(e.length):t},e.stripTrailingSlash=function(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t},e.parsePath=function(t){var e=t||"/",n="",i="",r=e.indexOf("#");-1!==r&&(i=e.substr(r),e=e.substr(0,r));var o=e.indexOf("?");return-1!==o&&(n=e.substr(o),e=e.substr(0,o)),{pathname:e,search:"?"===n?"":n,hash:"#"===i?"":i}},e.createPath=function(t){var e=t.pathname,n=t.search,i=t.hash,r=e||"/";return n&&"?"!==n&&(r+="?"===n.charAt(0)?n:"?"+n),i&&"#"!==i&&(r+="#"===i.charAt(0)?i:"#"+i),r}},function(t,e,n){"use strict";t.exports=function(){}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=e.CALL_HISTORY_METHOD="@@router/CALL_HISTORY_METHOD";function r(t){return function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return{type:i,payload:{method:t,args:n}}}}var o=e.push=r("push"),s=e.replace=r("replace"),a=e.go=r("go"),u=e.goBack=r("goBack"),l=e.goForward=r("goForward");e.routerActions={push:o,replace:s,go:a,goBack:u,goForward:l}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};e.routerReducer=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.type,s=e.payload;if(n===r)return i({},t,{locationBeforeTransitions:s});return t};var r=e.LOCATION_CHANGE="@@router/LOCATION_CHANGE",o={locationBeforeTransitions:null}},function(t,e,n){"use strict";e.__esModule=!0;e.canUseDOM=!("undefined"==typeof window||!window.document||!window.document.createElement),e.addEventListener=function(t,e,n){return t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)},e.removeEventListener=function(t,e,n){return t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent("on"+e,n)},e.getConfirmation=function(t,e){return e(window.confirm(t))},e.supportsHistory=function(){var t=window.navigator.userAgent;return(-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)},e.supportsPopStateOnHashChange=function(){return-1===window.navigator.userAgent.indexOf("Trident")},e.supportsGoWithoutReloadUsingHash=function(){return-1===window.navigator.userAgent.indexOf("Firefox")},e.isExtraneousPopstateEvent=function(t){return void 0===t.state&&-1===navigator.userAgent.indexOf("CriOS")}},function(t,e,n){"use strict";e.__esModule=!0;var i,r=n(7),o=(i=r)&&i.__esModule?i:{default:i};e.default=function(){var t=null,e=[];return{setPrompt:function(e){return(0,o.default)(null==t,"A history supports only one prompt at a time"),t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,i,r){if(null!=t){var s="function"==typeof t?t(e,n):t;"string"==typeof s?"function"==typeof i?i(s,r):((0,o.default)(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),r(!0)):r(!1!==s)}else r(!0)},appendListener:function(t){var n=!0,i=function(){n&&t.apply(void 0,arguments)};return e.push(i),function(){n=!1,e=e.filter(function(t){return t!==i})}},notifyListeners:function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];e.forEach(function(t){return t.apply(void 0,n)})}}}},function(t,e,n){"use strict";e.__esModule=!0,e.locationsAreEqual=e.createLocation=void 0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=a(n(83)),o=a(n(82)),s=n(81);function a(t){return t&&t.__esModule?t:{default:t}}e.createLocation=function(t,e,n,o){var a=void 0;"string"==typeof t?(a=(0,s.parsePath)(t)).state=e:(void 0===(a=i({},t)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==e&&void 0===a.state&&(a.state=e));try{a.pathname=decodeURI(a.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(a.key=n),o?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=(0,r.default)(a.pathname,o.pathname)):a.pathname=o.pathname:a.pathname||(a.pathname="/"),a},e.locationsAreEqual=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&(0,o.default)(t.state,e.state)}},function(t,e,n){t.exports=function(){"use strict";var t={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},e={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n=Object.defineProperty,i=Object.getOwnPropertyNames,r=Object.getOwnPropertySymbols,o=Object.getOwnPropertyDescriptor,s=Object.getPrototypeOf,a=s&&s(Object);return function u(l,c,h){if("string"!=typeof c){if(a){var p=s(c);p&&p!==a&&u(l,p,h)}var f=i(c);r&&(f=f.concat(r(c)));for(var d=0;d<f.length;++d){var y=f[d];if(!(t[y]||e[y]||h&&h[y])){var m=o(c,y);try{n(l,y,m)}catch(t){}}}return l}return l}}()},function(t,e,n){"use strict";e.__esModule=!0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=c(n(7)),o=c(n(11)),s=n(138),a=n(81),u=c(n(137)),l=n(136);function c(t){return t&&t.__esModule?t:{default:t}}var h={hashbang:{encodePath:function(t){return"!"===t.charAt(0)?t:"!/"+(0,a.stripLeadingSlash)(t)},decodePath:function(t){return"!"===t.charAt(0)?t.substr(1):t}},noslash:{encodePath:a.stripLeadingSlash,decodePath:a.addLeadingSlash},slash:{encodePath:a.addLeadingSlash,decodePath:a.addLeadingSlash}},p=function(){var t=window.location.href,e=t.indexOf("#");return-1===e?"":t.substring(e+1)},f=function(t){var e=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,e>=0?e:0)+"#"+t)};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,o.default)(l.canUseDOM,"Hash history needs a DOM");var e=window.history,n=(0,l.supportsGoWithoutReloadUsingHash)(),c=t.getUserConfirmation,d=void 0===c?l.getConfirmation:c,y=t.hashType,m=void 0===y?"slash":y,_=t.basename?(0,a.stripTrailingSlash)((0,a.addLeadingSlash)(t.basename)):"",v=h[m],g=v.encodePath,b=v.decodePath,w=function(){var t=b(p());return(0,r.default)(!_||(0,a.hasBasename)(t,_),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+t+'" to begin with "'+_+'".'),_&&(t=(0,a.stripBasename)(t,_)),(0,s.createLocation)(t)},k=(0,u.default)(),S=function(t){i(D,t),D.length=e.length,k.notifyListeners(D.location,D.action)},T=!1,x=null,O=function(){var t=p(),e=g(t);if(t!==e)f(e);else{var n=w(),i=D.location;if(!T&&(0,s.locationsAreEqual)(i,n))return;if(x===(0,a.createPath)(n))return;x=null,P(n)}},P=function(t){T?(T=!1,S()):k.confirmTransitionTo(t,"POP",d,function(e){e?S({action:"POP",location:t}):A(t)})},A=function(t){var e=D.location,n=R.lastIndexOf((0,a.createPath)(e));-1===n&&(n=0);var i=R.lastIndexOf((0,a.createPath)(t));-1===i&&(i=0);var r=n-i;r&&(T=!0,j(r))},E=p(),C=g(E);E!==C&&f(C);var M=w(),R=[(0,a.createPath)(M)],j=function(t){(0,r.default)(n,"Hash history go(n) causes a full page reload in this browser"),e.go(t)},F=0,N=function(t){1===(F+=t)?(0,l.addEventListener)(window,"hashchange",O):0===F&&(0,l.removeEventListener)(window,"hashchange",O)},L=!1,D={length:e.length,action:"POP",location:M,createHref:function(t){return"#"+g(_+(0,a.createPath)(t))},push:function(t,e){(0,r.default)(void 0===e,"Hash history cannot push state; it is ignored");var n=(0,s.createLocation)(t,void 0,void 0,D.location);k.confirmTransitionTo(n,"PUSH",d,function(t){if(t){var e=(0,a.createPath)(n),i=g(_+e);if(p()!==i){x=e,function(t){window.location.hash=t}(i);var o=R.lastIndexOf((0,a.createPath)(D.location)),s=R.slice(0,-1===o?0:o+1);s.push(e),R=s,S({action:"PUSH",location:n})}else(0,r.default)(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),S()}})},replace:function(t,e){(0,r.default)(void 0===e,"Hash history cannot replace state; it is ignored");var n=(0,s.createLocation)(t,void 0,void 0,D.location);k.confirmTransitionTo(n,"REPLACE",d,function(t){if(t){var e=(0,a.createPath)(n),i=g(_+e);p()!==i&&(x=e,f(i));var r=R.indexOf((0,a.createPath)(D.location));-1!==r&&(R[r]=e),S({action:"REPLACE",location:n})}})},go:j,goBack:function(){return j(-1)},goForward:function(){return j(1)},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=k.setPrompt(t);return L||(N(1),L=!0),function(){return L&&(L=!1,N(-1)),e()}},listen:function(t){var e=k.appendListener(t);return N(1),function(){N(-1),e()}}};return D}},function(t,e,n){"use strict";e.__esModule=!0;var i="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},r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},o=h(n(7)),s=h(n(11)),a=n(138),u=n(81),l=h(n(137)),c=n(136);function h(t){return t&&t.__esModule?t:{default:t}}var p=function(){try{return window.history.state||{}}catch(t){return{}}};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.default)(c.canUseDOM,"Browser history needs a DOM");var e=window.history,n=(0,c.supportsHistory)(),h=!(0,c.supportsPopStateOnHashChange)(),f=t.forceRefresh,d=void 0!==f&&f,y=t.getUserConfirmation,m=void 0===y?c.getConfirmation:y,_=t.keyLength,v=void 0===_?6:_,g=t.basename?(0,u.stripTrailingSlash)((0,u.addLeadingSlash)(t.basename)):"",b=function(t){var e=t||{},n=e.key,i=e.state,r=window.location,s=r.pathname+r.search+r.hash;return(0,o.default)(!g||(0,u.hasBasename)(s,g),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+s+'" to begin with "'+g+'".'),g&&(s=(0,u.stripBasename)(s,g)),(0,a.createLocation)(s,i,n)},w=function(){return Math.random().toString(36).substr(2,v)},k=(0,l.default)(),S=function(t){r(L,t),L.length=e.length,k.notifyListeners(L.location,L.action)},T=function(t){(0,c.isExtraneousPopstateEvent)(t)||P(b(t.state))},x=function(){P(b(p()))},O=!1,P=function(t){O?(O=!1,S()):k.confirmTransitionTo(t,"POP",m,function(e){e?S({action:"POP",location:t}):A(t)})},A=function(t){var e=L.location,n=C.indexOf(e.key);-1===n&&(n=0);var i=C.indexOf(t.key);-1===i&&(i=0);var r=n-i;r&&(O=!0,R(r))},E=b(p()),C=[E.key],M=function(t){return g+(0,u.createPath)(t)},R=function(t){e.go(t)},j=0,F=function(t){1===(j+=t)?((0,c.addEventListener)(window,"popstate",T),h&&(0,c.addEventListener)(window,"hashchange",x)):0===j&&((0,c.removeEventListener)(window,"popstate",T),h&&(0,c.removeEventListener)(window,"hashchange",x))},N=!1,L={length:e.length,action:"POP",location:E,createHref:M,push:function(t,r){(0,o.default)(!("object"===(void 0===t?"undefined":i(t))&&void 0!==t.state&&void 0!==r),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var s=(0,a.createLocation)(t,r,w(),L.location);k.confirmTransitionTo(s,"PUSH",m,function(t){if(t){var i=M(s),r=s.key,a=s.state;if(n)if(e.pushState({key:r,state:a},null,i),d)window.location.href=i;else{var u=C.indexOf(L.location.key),l=C.slice(0,-1===u?0:u+1);l.push(s.key),C=l,S({action:"PUSH",location:s})}else(0,o.default)(void 0===a,"Browser history cannot push state in browsers that do not support HTML5 history"),window.location.href=i}})},replace:function(t,r){(0,o.default)(!("object"===(void 0===t?"undefined":i(t))&&void 0!==t.state&&void 0!==r),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var s=(0,a.createLocation)(t,r,w(),L.location);k.confirmTransitionTo(s,"REPLACE",m,function(t){if(t){var i=M(s),r=s.key,a=s.state;if(n)if(e.replaceState({key:r,state:a},null,i),d)window.location.replace(i);else{var u=C.indexOf(L.location.key);-1!==u&&(C[u]=s.key),S({action:"REPLACE",location:s})}else(0,o.default)(void 0===a,"Browser history cannot replace state in browsers that do not support HTML5 history"),window.location.replace(i)}})},go:R,goBack:function(){return R(-1)},goForward:function(){return R(1)},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=k.setPrompt(t);return N||(F(1),N=!0),function(){return N&&(N=!1,F(-1)),e()}},listen:function(t){var e=k.appendListener(t);return F(1),function(){F(-1),e()}}};return L}},function(t,e,n){"use strict";function i(t){var e,n=t.Symbol;return"function"==typeof n?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable",e}n.d(e,"a",function(){return i})},function(t,e,n){t.exports=function(){"use strict";var t={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},e={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n=Object.defineProperty,i=Object.getOwnPropertyNames,r=Object.getOwnPropertySymbols,o=Object.getOwnPropertyDescriptor,s=Object.getPrototypeOf,a=s&&s(Object);return function u(l,c,h){if("string"!=typeof c){if(a){var p=s(c);p&&p!==a&&u(l,p,h)}var f=i(c);r&&(f=f.concat(r(c)));for(var d=0;d<f.length;++d){var y=f[d];if(!(t[y]||e[y]||h&&h[y])){var m=o(c,y);try{n(l,y,m)}catch(t){}}}return l}return l}}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.load=void 0;var i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=a(n(6)),o=a(n(8)),s=a(n(5));function a(t){return t&&t.__esModule?t:{default:t}}e.load=function(){return function(t){s.default.allProgress([o.default.task.index({limit:40,orderBy:"created_at desc"}),o.default.folder.index({activity:"dataset"}),o.default.file.index({module:"samplernn",generated:1,limit:15,orderBy:"created_at desc"}),o.default.file.index({module:"pix2pixhd",generated:1,limit:15,orderBy:"created_at desc"}),o.default.file.index({module:"morph",generated:1,limit:15,orderBy:"created_at desc"})],function(e,n,i){t({type:r.default.app.load_progress,progress:{i:n,n:i},data:{module:"dashboard"}})}).then(function(e){var n=i(e,5),o=n[0],a=n[1],u=n[2],l=n[3],c=n[4],h=s.default.sort.orderByFn("date desc"),p=h.mapFn,f=h.sortFn,d=a.map(p).sort(f).reduce(function(t,e){var n=e[1].module;return t[n]=t[n]||[],t[n].push(e[1]),t},{});t({type:r.default.dashboard.load,data:{tasks:o,folders:a,foldersByModule:d,renders:{samplernn:u,pix2pixhd:l,morph:c}}})})}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(1),s=n(3),a=(n(2),n(5)),u=(i=a)&&i.__esModule?i:{default:i};var l=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.handleClick=n.handleClick.bind(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.Component),r(e,[{key:"handleClick",value:function(t){this.props.onClick&&this.props.onClick()}},{key:"render",value:function(){var t=this.props,e=t.site,n=t.runner;return(0,o.h)("div",{class:"dashboardHeader heading"},(0,o.h)("h1",null,e.name," cortex"),this.renderStatus("GPU",n.gpu),this.renderStatus("CPU",n.cpu))}},{key:"renderStatus",value:function(t,e){if("IDLE"===e.status)return(0,o.h)("div",null,t," idle");var n=e.task;return"live"===n.activity?(0,o.h)("div",null,t," running ",(0,o.h)("b",null,n.module),' live on "',n.dataset,'"'):(0,o.h)("div",null,t," ",u.default.gerund(n.activity)," ",(0,o.h)("b",null,n.module)," on ",(0,o.h)("b",null,n.dataset),!!n.epoch&&(0,o.h)("span",null,"Epoch: ",n.epoch," / ",n.epochs,(0,o.h)("br",null)))}}]),e}();e.default=(0,s.connect)(function(t){return{runner:t.system.runner,site:t.system.site}},function(t,e){return{}})(l)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),s=n(10),a=n(3),u=(y(n(87)),y(n(24))),l=(y(n(63)),y(n(52)),y(n(45)),y(n(145))),c=n(13),h=d(n(144)),p=d(n(46)),f=y(n(77));y(n(8));function d(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function y(t){return t&&t.__esModule?t:{default:t}}var m=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.actions.load(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"componentWillUpdate",value:function(t){}},{key:"render",value:function(){var t=this,e=this.props,n=e.loading,i=e.progress,o=(e.site,e.foldersByModule),a=e.renders,h=e.queue;e.images;if(n)return(0,r.h)(c.Loading,{progress:i});var p=h.tasks,d=o&&Object.keys(f.default).sort().map(function(e){var n="samplernn"===e?"/samplernn/datasets/":"/"+e+"/sequences/",i=(o[e]||[]).map(function(t){return(0,r.h)("div",{key:t.id},(0,r.h)(s.Link,{to:n+t.id+"/"},t.name))}),u=a[e]&&(0,r.h)(c.FileList,{linkFiles:!0,files:a[e],orderBy:"date desc",fields:"name date epoch size",onClick:"samplernn"===e?function(e,n){n.preventDefault(),n.stopPropagation(),console.log("picked a file",e),t.handlePick(e)}:null});return(0,r.h)("div",{className:"dashboardModule",key:e},(0,r.h)("div",{className:"row moduleHeading"},(0,r.h)("h3",null,e),(0,r.h)("div",null,(0,r.h)(s.Link,{to:"/"+e+"/new/"},"new")),i),u)}).filter(function(t){return!!t});return(0,r.h)("div",{className:"app dashboard"},(0,r.h)(l.default,null),(0,r.h)("div",{className:"params row"},(0,r.h)("div",{className:"column"},!!h.queue.length&&(0,r.h)(u.default,{title:"Upcoming Tasks"},(0,r.h)(c.TaskList,{tasks:h.queue.map(function(t){return p[t]})})),!!h.completed.length&&(0,r.h)(u.default,{title:"Completed Tasks"},(0,r.h)(c.TaskList,{tasks:h.completed.map(function(t){return p[t]})}))),(0,r.h)("div",{className:"column"},d)))}},{key:"handlePick",value:function(t){this.props.audioPlayer.play(t)}}]),e}();e.default=(0,a.connect)(function(t){return{loading:t.dashboard.loading,progress:t.dashboard.progress,site:t.system.site,foldersByModule:t.dashboard.data.foldersByModule,renders:t.dashboard.data.renders,images:t.dashboard.images,files:t.dashboard.files,queue:t.queue}},function(t,e){return{actions:(0,o.bindActionCreators)(h,t),audioPlayer:(0,o.bindActionCreators)(p,t)}})(m)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(1),s=n(2),a=n(3),u=y(n(24)),l=y(n(31)),c=d(n(78)),h=d(n(20)),p=d(n(44)),f=d(n(47));function d(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function y(t){return t&&t.__esModule?t:{default:t}}var m={activity:"cpu",module:"test",dataset:"test",epochs:1,opt:{}},_={activity:"gpu",module:"test",dataset:"test",epochs:1,opt:{}},v={activity:"live",module:"test",dataset:"test",epochs:1,opt:{}},g={activity:"wait",module:"test",dataset:"test",epochs:1,opt:{}},b=["apple","pear","orange","strawberry"];function w(t){return t[Math.floor(Math.random()*t.length)]}var k=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.Component),r(e,[{key:"componentDidUpdate",value:function(){this._screen.scrollHeight>this._screen.scrollTop-this._screen.offsetHeight+100&&(this._screen.scrollTop=this._screen.scrollHeight)}},{key:"render",value:function(){var t=this.props,e=t.site,n=t.server,i=t.relay,r=t.runner,s=t.rpc,a=t.actions,c=t.user;return(0,o.h)("div",{className:"app system"},(0,o.h)("div",{className:"heading"},(0,o.h)("h1",null,e.name," system")),(0,o.h)("div",{className:"row params"},(0,o.h)("div",{className:"column"},(0,o.h)(u.default,{title:"Status"},(0,o.h)(l.default,{title:"Server"},n.status),n.error&&(0,o.h)(l.default,{title:"Server error"},n.error.message),(0,o.h)(l.default,{title:"Relay"},i.status),(0,o.h)(l.default,{title:"RPC"},s.status),(0,o.h)(l.default,{title:"CPU"},this.renderStatus(r.cpu)),(0,o.h)(l.default,{title:"GPU"},this.renderStatus(r.gpu))),(0,o.h)(u.default,{title:"Diagnostics"},(0,o.h)(l.default,{title:"Check GPU"},(0,o.h)("button",{onClick:function(){return a.system.run("nvidia-smi")}},"nvidia-smi")),(0,o.h)(l.default,{title:"List processes"},(0,o.h)("button",{onClick:function(){return a.system.run("ps")}},"ps")),(0,o.h)(l.default,{title:"List users"},(0,o.h)("button",{onClick:function(){return a.system.run("w")}},"w")),(0,o.h)(l.default,{title:"Disk free space"},(0,o.h)("button",{onClick:function(){return a.system.run("df")}},"df"))),(0,o.h)(u.default,{title:"Tasks"},(0,o.h)(l.default,{title:"Kill task"},(0,o.h)("button",{onClick:function(){return a.queue.stop_task("cpu")}},"CPU"),(0,o.h)("button",{onClick:function(){return a.queue.stop_task("gpu")}},"GPU")),(0,o.h)(l.default,{title:"Queue"},(0,o.h)("button",{onClick:function(){return a.queue.start_queue()}},"Start"),(0,o.h)("button",{onClick:function(){return a.queue.stop_queue()}},"Stop"))),(0,o.h)(u.default,{title:"Auth"},(0,o.h)(l.default,{title:"Logged in as "+c.username},(0,o.h)("button",{onClick:function(){return a.auth.logout()}},"Logout"))),(0,o.h)(u.default,{title:"Test"},(0,o.h)(l.default,{title:"CPU Test Task"},(0,o.h)("button",{onClick:function(){return a.queue.start_task(m,{preempt:!0,watch:!0})}},"Start"),(0,o.h)("button",{onClick:function(){return a.queue.stop_task(r.cpu.task)}},"Stop")),(0,o.h)(l.default,{title:"GPU Test Task"},(0,o.h)("button",{onClick:function(){return a.queue.start_task(_,{preempt:!0,watch:!0})}},"Start"),(0,o.h)("button",{onClick:function(){return a.queue.stop_task(r.gpu.task)}},"Stop")),(0,o.h)(l.default,{title:"Live Test Task"},(0,o.h)("button",{onClick:function(){return a.queue.start_task(v,{preempt:!0,watch:!0})}},"Start"),(0,o.h)("button",{onClick:function(){return a.queue.stop_task(r.cpu.task)}},"Stop")),(0,o.h)(l.default,{title:"Test Live RPC"},(0,o.h)("button",{onClick:function(){return a.live.get_params()}},"Get"),(0,o.h)("button",{onClick:function(){return a.live.set_param("fruit",w(b))}},"Set")),(0,o.h)(l.default,{title:"Queue Tests"},(0,o.h)("button",{onClick:function(){return a.system.enqueue_test_task(w(b))}},"+Add test task")),(0,o.h)(l.default,{title:""},(0,o.h)("button",{onClick:function(){return a.queue.start_task(g,{preempt:!0,watch:!0})}},"Wait and Buzz")))),this.renderCommandOutput()))}},{key:"renderStatus",value:function(t){if(!t)return"unknown";if("IDLE"===t.status)return"idle";var e=t.task;return e.activity+" "+e.module}},{key:"renderCommandOutput",value:function(){var t=this,e=this.props,n=e.cmd,i=e.stdout,r=e.stderr,s=void 0;return n.loading?s="Loading: "+n.name:n.loaded?n.error?s="Error: "+n.name+"\n\n"+JSON.stringify(n.error,null,2):(s=n.stdout,n.stderr&&(s+="\n\n_________________________________\n\n",s+=n.stderr)):(s=i,r.length&&(s+="\n\n_________________________________\n\n",s+=r)),(0,o.h)("div",null,(0,o.h)("div",{ref:function(e){return t._screen=e},className:"screen"},s))}}]),e}();e.default=(0,a.connect)(function(t){return i({user:t.auth.user},t.system,t.live)},function(t,e){return{actions:{auth:(0,s.bindActionCreators)(f,t),system:(0,s.bindActionCreators)(c,t),queue:(0,s.bindActionCreators)(p,t),live:(0,s.bindActionCreators)(h,t)}}})(k)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=(n(2),n(3),n(10),a(n(5)),a(n(24)),a(n(31)),a(n(18)),a(n(120))),s=a(n(30));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return console.log(t),t.db.data||t.actions.load_directories(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"render",value:function(){var t=this.props,e=t.module,n=t.history,i=t.db,a=t.path;return(0,r.h)("div",{class:"app new-view "+e.name},(0,r.h)("div",{class:"heading"},(0,r.h)("h1",null,e.displayName||e.name)),(0,r.h)("div",{class:"col narrow"},(0,r.h)(s.default,{module:e,history:n}),(0,r.h)(o.default,{db:i,path:a,activity:"dataset",emptyText:(0,r.h)("i",null,"No projects yet. Please create one~")})))}}]),e}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.New=void 0;var i,r=n(148),o=(i=r)&&i.__esModule?i:{default:i};e.New=o.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=(n(2),n(3)),s=n(10),a=l(n(5)),u=l(n(8));function l(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"shouldComponentUpdate",value:function(t){return t.tasks.length!==this.props.tasks.length||t.tasks[0]!==this.props.tasks[0]}},{key:"render",value:function(){var t=this,e=this.props,n=(e.title,e.tasks),i=a.default.sort.orderByFn(this.props.sort||"date desc"),o=i.mapFn,u=i.sortFn,l=n.map(o).sort(u).map(function(e){var n=e[1],i=void 0,o=n.dataset;switch(n.activity){case"train":0===n.epoch?o+=", latest":o+=", "+n.epoch,o+=" + "+n.epochs;break;case"augment":try{var u=JSON.parse(n.opt);o+=", "+u.augment_take+" x "+u.augment_make}catch(t){}}if(n.folder_id){var l="/"+n.module+"/"+("samplernn"===n.module?"datasets":"sequences")+"/"+n.folder_id+"/";i=(0,r.h)(s.Link,{to:l},o)}else i=o;return(0,r.h)("div",{class:"row"},(0,r.h)("div",{class:"activity"},n.activity," ",n.module),(0,r.h)("div",{class:"dataset"},i),(0,r.h)("div",{className:"age "+a.default.carbon_date(n.updated_at)},a.default.get_age(n.updated_at)),(0,r.h)("div",{class:"options"},(0,r.h)("span",{class:"destroy",onClick:function(){return t.handleDestroy(n)}},"x")))});return(0,r.h)("div",{class:"tasklist rows"},l)}},{key:"handleDestroy",value:function(t){confirm("Are you sure you want to delete this task?")&&u.default.task.destroy(t)}}]),e}();e.default=(0,o.connect)(function(t){return{}},function(t,e){return{}})(c)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(3);n(2);var s=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.handleChange=n.handleChange.bind(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"handleChange",value:function(t){clearTimeout(this.timeout);var e=t.target.value;"PLACEHOLDER"!==e&&this.props.onChange&&this.props.onChange(this.props.name,e)}},{key:"render",value:function(){var t=this.props.live?this.props.opt[this.props.name]:this.props.value,e=void 0,n=(this.props.options||[]).map(function(t,n){var i=t.name,o=t.options.map(function(t){var n=t.length<2?t.toUpperCase():t;n=n.replace(/_/g," ");var i=t;return e=i,(0,r.h)("option",{value:i,key:i},n)});return(0,r.h)("optgroup",{label:i,key:i},o)});return(0,r.h)("div",{className:"select param"},(0,r.h)("label",null,(0,r.h)("span",null,this.props.title),(0,r.h)("select",{onChange:this.handleChange,value:t||e},this.props.placeholder&&(0,r.h)("option",{value:"PLACEHOLDER"},this.props.placeholder),n)),this.props.children)}}]),e}();e.default=(0,o.connect)(function(t,e){return{opt:e.opt||t.live.opt}},function(t,e){return{}})(s)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(3),s=n(2),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(20));var u=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.handleClick=n.handleClick.bind(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"handleClick",value:function(t){clearTimeout(this.timeout);var e=t.target.checked;this.props.actions.set_param(this.props.name,e),this.props.onToggle&&this.props.onToggle(e)}},{key:"render",value:function(){var t=this.props.opt[this.props.name],e=!this.props.noToggle,n=!this.props.noDim&&e&&!t?"paramGroup inactive":"paramGroup active";return(0,r.h)("div",{className:n},(0,r.h)("label",null,(0,r.h)("h3",null,this.props.title),e?(0,r.h)("input",{type:"checkbox",onClick:this.handleClick,checked:t}):null),this.props.children)}}]),e}();e.default=(0,o.connect)(function(t){return{opt:t.live.opt}},function(t,e){return{actions:(0,s.bindActionCreators)(a,t)}})(u)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1);var o=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={value:null,changed:!1},n.handleInput=n.handleInput.bind(n),n.handleKeydown=n.handleKeydown.bind(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"handleInput",value:function(t){this.setState({value:t.target.value,changed:!0}),this.props.onInput&&this.props.onInput(t.target.value,t.target.name),this.props.onChange&&this.props.onChange(t.target.name,t.target.value)}},{key:"handleKeydown",value:function(t){13===t.keyCode&&(this.setState({value:t.target.value,changed:!1}),this.props.onSave&&this.props.onSave(t.target.value,t.target.name))}},{key:"render",value:function(){return(0,r.h)("div",{className:"numberInput param"},(0,r.h)("label",null,(0,r.h)("span",null,this.props.title),(0,r.h)("input",{type:"number",name:this.props.name||"number",value:this.state.changed?this.state.value:this.props.value,onInput:this.handleInput,onKeydown:this.handleKeydown,placeholder:this.props.placeholder,autofocus:this.props.autofocus,min:this.props.min,max:this.props.max,step:this.props.step||"int"===this.props.type?1:.01})))}}]),e}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),s=n(3),a=l(n(5)),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(34));l(n(24)),l(n(63)),l(n(52)),l(n(45)),n(26),l(n(41));function l(t){return t&&t.__esModule?t:{default:t}}var c=a.default.lerp,h=a.default.norm,p=(a.default.randint,a.default.randrange),f=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.actions.load_graph(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"render",value:function(){var t=this;return this.refs={},(0,r.h)("div",{className:"app lossGraph"},(0,r.h)("div",{className:"heading"},(0,r.h)("h3",null,"SampleRNN Loss Graph"),(0,r.h)("canvas",{ref:function(e){return t.refs.canvas=e}})))}},{key:"componentDidUpdate",value:function(){var t=this.props.samplernn,e=t.lossReport,n=t.results;if(e&&n){var i=this.refs.canvas;i.width=window.innerWidth,i.height=window.innerHeight,i.style.width=i.width+"px",i.style.height=i.height+"px";var r=i.getContext("2d"),o=i.width,s=i.height;r.clearRect(0,0,o,s);var a=n.map(function(t){if(!t.name.match(/^exp:/))return null;var e=t.name.split("-")[3].split(":")[1];return[+new Date(t.date),e]}).filter(function(t){return!!t}).sort(function(t,e){return t[0]-t[1]}),u=0,l=1/0,f=0;Object.keys(e).filter(function(t){return!!e[t].length}).forEach(function(t){var n=e[t];f=Math.max(n.length,f),n.forEach(function(t){var e=parseFloat(t.training_loss);e&&(u=Math.max(e,u),l=Math.min(e,l))})}),u=3,l=0;var d=o/2,y=s/2;r.save();for(var m=void 0,_=void 0,v=0;v<f;v++)if(m=c(v/(f/1)*1,0,d),r.strokeStyle="rgba(0,0,0,0.3)",r.beginPath(0,0),r.moveTo(m,0),r.lineTo(m,s),r.lineWidth=.5,(v+1)%6==0){r.lineWidth=.5,r.stroke();r.font='italic 12px "Georgia"',r.fillStyle="rgba(0,12,28,0.6)",r.fillText(v/5*6,m+8,s-16)}for(v=l;v<u;v+=1){_=c(v/u,0,y),r.beginPath(0,0),r.moveTo(0,s-_),r.lineTo(o,s-_),r.lineWidth=1,r.lineWidth=2,r.setLineDash([4,4]),r.stroke(),r.stroke(),r.stroke(),r.setLineDash([1,1]);r.font='italic 12px "Georgia"',r.fillStyle="rgba(0,12,28,0.6)",r.fillText(v.toFixed(1),o-50,s-_+12+10)}r.lineWidth=1,r.restore();a[0][0],a[a.length-1][0];a.forEach(function(t){t[0];var n=t[1],i=e[n];if(n&&i&&i.length){var o=parseFloat(i[i.length-1].training_loss)||0;parseFloat(i[0].training_loss),h(o,l,u/2);r.lineWidth=4*(1-h(o,l,u)),r.strokeStyle="rgba("+[p(30,190),p(30,150),p(60,120)].join(",")+",0.8)";var s=!1;i.forEach(function(t,e){var n=parseFloat(t.training_loss);if(n){var i=c(e/(f/1)*1,0,d),o=c(h(n,l,u),y,0);s?r.lineTo(i,o):(s=!0,r.beginPath(0,0),r.moveTo(i,o))}}),r.stroke();var a=i.length-1,m=parseFloat(i[a].training_loss),_=c(a/(f/1)*1,0,d),v=c(h(m,l,u),y,0);r.font='italic 9px "Georgia"',r.fillStyle="rgba(0,12,28,0.6)",r.fillText(n,_+4,v+4.5)}})}}}]),e}();e.default=(0,s.connect)(function(t){return{samplernn:t.module.samplernn}},function(t,e){return{actions:(0,o.bindActionCreators)(u,t)}})(f)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),s=n(10),a=n(3),u=d(n(5)),l=f(n(34)),c=f(n(46)),h=d(n(18)),p=n(26);function f(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function d(t){return t&&t.__esModule?t:{default:t}}var y=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.samplernn.data||t.actions.load_directories(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"render",value:function(){var t=this;if(this.props.samplernn.loading)return(0,r.h)(h.default,{progress:this.props.samplernn.progress});var e=this.props.samplernn.data,n=e.folderLookup,i=e.fileLookup,o=e.datasetLookup,a=Object.keys(n).sort(u.default.sort.stringSort.asc).map(function(e){var a=n[e],l=u.default.sort.orderByFn("epoch desc"),c=l.mapFn,h=l.sortFn,f=a.datasets.map(function(t){return o[t]}).map(c).sort(h).map(function(t){return t[1]}).filter(function(t){return t.output.length}).map(function(t){return t.output.map(function(t){return i[t]}).map(c).sort(h)[0][1]}),d="unsorted"===a.name?"/samplernn/import/":"/samplernn/datasets/"+a.id+"/";return(0,r.h)("div",{className:"col bestRenders"},(0,r.h)("h3",null,(0,r.h)(s.Link,{to:d},a.name)),(0,r.h)(p.FileList,{linkFiles:!0,files:f,orderBy:"date desc",fields:"name date epoch size",onClick:function(e,n){n.preventDefault(),n.stopPropagation(),console.log("picked a file",e),t.handlePick(e)}}))});return(0,r.h)("div",{className:"app samplernn"},(0,r.h)("div",{className:"heading row middle"},(0,r.h)("h1",null,"SampleRNN Results")),(0,r.h)("div",{class:"rows params renders"},a))}},{key:"handlePick",value:function(t){this.props.audioPlayer.play(t)}}]),e}();e.default=(0,a.connect)(function(t){return{samplernn:t.module.samplernn}},function(t,e){return{actions:(0,o.bindActionCreators)(l,t),audioPlayer:(0,o.bindActionCreators)(c,t)}})(y)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(1),s=n(2),a=n(3),u=(f(n(5)),function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(34))),l=f(n(52)),c=f(n(41)),h=f(n(45)),p=f(n(29));function f(t){return t&&t.__esModule?t:{default:t}}var d={name:"samplernn",datatype:"audio"},y=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var t=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.state={folder_id:1,import_action:"Hotlink",url_base:"https://s3.amazonaws.com/i.asdf.us/bucky/data/4279/",selected:{}},t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.Component),r(e,[{key:"componentWillMount",value:function(){var t=this.props.match.params.id||localStorage.getItem("samplernn.last_id");console.log("load dataset:",t);var e=this.props,n=(e.match,e.samplernn);e.samplernnActions;"new"!==t&&t&&(parseInt(t)&&localStorage.setItem("samplernn.last_id",t),n.folder&&n.folder.id===t||this.props.actions.load_directories(t))}},{key:"render",value:function(){var t=this,e=this.props.samplernn,n=[],i=void 0;return this.props.samplernn.data&&(n=(this.props.samplernn.data.folders||[]).map(function(t){return[t.name,t.id]}),i=this.props.samplernn.data.folderLookup.unsorted),(0,o.h)("div",{className:"app top"},(0,o.h)("div",{class:"heading"},(0,o.h)("h1",null,"Import")),(0,o.h)("div",{class:"params form row datasets"},(0,o.h)("div",{class:"row dataset"},(0,o.h)("div",{class:"col"}),(0,o.h)("div",{class:"col"}),(0,o.h)("div",{class:"col"}),(0,o.h)("div",{class:"col"},(0,o.h)("h2",null,"Import to dataset"),(0,o.h)(l.default,{title:"Destination dataset",options:n,name:"folder_id",opt:this.state,onChange:function(e,n){return t.setState({folder_id:n})}}),(0,o.h)(l.default,{title:"Import action",options:["Hotlink","Upload"],name:"import_action",opt:this.state,onChange:function(e,n){return t.setState({import_action:n})}}),(0,o.h)(c.default,{title:"Remote URL base",value:this.state.url_base,placeholder:"http://",onSave:function(e){return t.setState({url_base:e})}}),(0,o.h)(h.default,{title:"",onClick:function(){return t.doImport()}},"Import")))),(0,o.h)(p.default,{loading:e.loading,progress:e.progress,module:d,data:e.data,id:"unsorted",folder:i,history:this.props.history,onPickDataset:function(e){return t.toggle(e.name,t.state.selected[name])},beforeRow:function(e){return t.beforeRow(e)},afterRow:function(e){return t.afterRow(e)}}))}},{key:"toggle",value:function(t){var e,n,r;this.setState(i({},this.state,{selected:i({},this.state.selected,(e={},n=t,r=!this.state.selected[t],n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e))}))}},{key:"beforeRow",value:function(t){}},{key:"afterRow",value:function(t){var e=t.name;return(0,o.h)("div",null,(0,o.h)("input",{type:"checkbox",value:e,checked:!!this.state.selected[e]}))}},{key:"doImport",value:function(){var t=this.props.samplernn;console.log(this.state),this.props.actions.import_files(this.state,t.data.datasetLookup,t.data.fileLookup)}}]),e}();e.default=(0,a.connect)(function(t){return{samplernn:t.module.samplernn,runner:t.system.runner,task:t.task}},function(t,e){return{actions:(0,s.bindActionCreators)(u,t)}})(y)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.clear_cache_task=e.log_task=e.fetch_task=e.train_task=void 0;r(n(17)),r(n(14)),r(n(6));var i=r(n(8));function r(t){return t&&t.__esModule?t:{default:t}}e.train_task=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(r){var o={module:"samplernn",activity:"train",dataset:t.name,epoch:t.checkpoints.length&&t.checkpoints[0].epoch||0,epochs:n,folder_id:e,opt:{sample_length:220500,n_samples:6,keep_old_checkpoints:!1}};return console.log(o),i.default.queue.add_task(o)}},e.fetch_task=function(t,e,n,r){return function(o){if(!t)return console.log("input file inaccessible (no url)");var s={module:"samplernn",activity:"fetch",dataset:r,folder_id:e,opt:{url:t,file_id:n,dataset:r}};return i.default.queue.add_task(s)}},e.log_task=function(t){return function(e){var n={module:"samplernn",activity:"log",dataset:t.name};return i.default.queue.add_task(n)}},e.clear_cache_task=function(t){return function(e){var n={module:"samplernn",activity:"clear_cache",dataset:t.name};return i.default.queue.add_task(n)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),s=n(3),a=(m(n(5)),y(n(34))),u=y(n(157)),l=y(n(46)),c=n(13),h=m(n(42)),p=m(n(40)),f=m(n(29)),d=m(n(64));function y(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function m(t){return t&&t.__esModule?t:{default:t}}var _=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.datasetActions=n.datasetActions.bind(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"componentWillMount",value:function(){var t=this.props.match.params.id||localStorage.getItem("samplernn.last_id");console.log("load dataset:",t);var e=this.props,n=(e.match,e.samplernn),i=e.actions;"new"!==t&&(t?(parseInt(t)&&localStorage.setItem("samplernn.last_id",t),n.folder&&n.folder.id===t||i.load_directories(t)):this.props.history.push("/samplernn/new/"))}},{key:"render",value:function(){var t=this,e=this.props,n=e.samplernn,i=(e.runner,e.match,e.history),o=((n.data||{}).folderLookup||{})[n.folder_id]||{};return(0,r.h)("div",{className:"app samplernn"},(0,r.h)("div",{className:"heading"},(0,r.h)("h1",null,o?o.name:(0,r.h)(c.Loading,null))),(0,r.h)("div",{className:"row"},o&&o.name&&"unsorted"!==o.name&&(0,r.h)(h.default,{title:"Add Files",module:d.default,folder:o,canUpload:!0,canAddURL:!0}),(0,r.h)("div",null,(0,r.h)(p.default,null),(0,r.h)(c.CurrentTask,{processor:"gpu"}))),(0,r.h)(f.default,{loading:n.loading,progress:n.progress,id:n.folder_id,module:d.default,data:n.data,folder:o,history:i,onPickFile:function(e,n){n.preventDefault(),n.stopPropagation(),t.handlePick(e)},datasetActions:this.datasetActions}))}},{key:"datasetActions",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(arguments.length>2&&void 0!==arguments[2]&&arguments[2],this.props),i=n.samplernn,o=n.remote,s=i.data.fileLookup[t.input[0]];return s?s.name&&s.name.match(/(gif|jpe?g|png)$/i)?null:(0,r.h)("div",null,(0,r.h)("div",{class:"actions"},(0,r.h)("span",{class:"link",onClick:function(){return o.train_task(t,i.folder_id,1)}},"train"),(0,r.h)("span",{class:"link",onClick:function(){return o.train_task(t,i.folder_id,2)}},"2x"),(0,r.h)("span",{class:"link",onClick:function(){return o.train_task(t,i.folder_id,4)}},"4x"),(0,r.h)("span",{class:"link",onClick:function(){return o.train_task(t,i.folder_id,6)}},"6x"),(0,r.h)("span",{class:"link",onClick:function(){return o.train_task(t,i.folder_id,18)}},"18x")),t.isBuilt?(0,r.h)("div",{class:"subtext"},"fetched ",(0,r.h)("span",{class:"link",onClick:function(){return o.clear_cache_task(t)}},"x")):e?(0,r.h)("div",{class:"subtext"},"fetching"):(0,r.h)("div",{class:"subtext"},(0,r.h)("span",{class:"link",onClick:function(){return o.fetch_task(s.url,i.folder_id,s.id,t.name)}},"fetch"))):null}},{key:"handlePick",value:function(t){this.props.audioPlayer.play(t)}}]),e}();e.default=(0,s.connect)(function(t){return{samplernn:t.module.samplernn,runner:t.system.runner}},function(t,e){return{actions:(0,o.bindActionCreators)(a,t),remote:(0,o.bindActionCreators)(u,t),audioPlayer:(0,o.bindActionCreators)(l,t)}})(_)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(2),o=n(3),s=(n(10),l(n(5)),n(13)),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(34)),u=l(n(64));function l(t){return t&&t.__esModule?t:{default:t}}e.default=(0,o.connect)(function(t){return{samplernn:t.module.samplernn}},function(t,e){return{actions:(0,r.bindActionCreators)(a,t)}})(function(t){return(0,i.h)(s.Views.New,{db:t.samplernn,path:"/samplernn/datasets/",actions:t.actions,module:u.default,history:t.history})})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(10),s=f(n(8)),a=f(n(5)),u=f(n(159)),l=f(n(158)),c=f(n(156)),h=f(n(155)),p=f(n(154));function f(t){return t&&t.__esModule?t:{default:t}}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return i(t,[{key:"componentWillMount",value:function(){s.default.system.changeTool("samplernn"),document.body.style.backgroundImage="linear-gradient("+(a.default.randint(40)+40)+"deg, #eef, #fef)"}},{key:"componentWillReceiveProps",value:function(){s.default.system.changeTool("samplernn"),document.body.style.backgroundImage="linear-gradient("+(a.default.randint(40)+40)+"deg, #eef, #fef)"}},{key:"render",value:function(){return(0,r.h)("section",null,(0,r.h)(o.Route,{exact:!0,path:"/samplernn/new",component:u.default}),(0,r.h)(o.Route,{exact:!0,path:"/samplernn/datasets",component:l.default}),(0,r.h)(o.Route,{exact:!0,path:"/samplernn/datasets/:id",component:l.default}),(0,r.h)(o.Route,{exact:!0,path:"/samplernn/import",component:c.default}),(0,r.h)(o.Route,{exact:!0,path:"/samplernn/results",component:h.default}),(0,r.h)(o.Route,{exact:!0,path:"/samplernn/graph",component:p.default}))}}]),t}();e.default={name:"samplernn",router:d,links:function(){return[{url:"/samplernn/new/",name:"new"},{url:"/samplernn/datasets/",name:"datasets"},{url:"/samplernn/graph/",name:"graph"},{url:"/samplernn/results/",name:"results"}]}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),a=n(3),u=n(13),l=n(49),c=y(l),h=y(n(20)),p=y(n(44)),f=y(n(73)),d=y(n(74));function y(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var m=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.actions.pix2wav.load_directories(),t.actions.live.get_params(),n.changeCheckpoint=n.changeCheckpoint.bind(n),n.changeEpoch=n.changeEpoch.bind(n),n.changeSequence=n.changeSequence.bind(n),n.seek=n.seek.bind(n),n.togglePlaying=n.togglePlaying.bind(n),n.toggleRecording=n.toggleRecording.bind(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"componentWillUpdate",value:function(t){t.opt.checkpoint_name&&t.opt.checkpoint_name!==this.props.opt.checkpoint_name&&(console.log("fetch checkpoint",t.opt.checkpoint_name),this.props.actions.live.list_epochs("pix2wav",t.opt.checkpoint_name))}},{key:"changeCheckpoint",value:function(t,e){this.props.actions.live.load_epoch(e,"latest")}},{key:"changeEpoch",value:function(t,e){this.props.actions.live.load_epoch(this.props.opt.checkpoint_name,e)}},{key:"changeSequence",value:function(t,e){console.log("got sequence",e),this.props.actions.live.load_sequence(e)}},{key:"seek",value:function(t){var e=Math.floor(t*(parseInt(this.props.frame.sequence_len)||1)+1);this.props.actions.live.seek(e)}},{key:"start",value:function(){console.log(this.props.pix2wav.data);var t=this.props.pix2wav.data.sequences[0].name||"",e=this.props.pix2wav.data.checkpoints[0].name||"";console.log("starting up!",t,e),this.props.actions.tasks.live_task(t,e)}},{key:"interrupt",value:function(){this.props.actions.queue.stop_task("gpu")}},{key:"exit",value:function(){this.props.actions.queue.stop_task("gpu",{sigkill:!0})}},{key:"togglePlaying",value:function(){this.props.opt.processing?this.props.actions.live.pause():this.props.actions.live.play()}},{key:"toggleRecording",value:function(){this.props.opt.recording?((0,l.stopRecording)(),this.props.actions.live.pause()):(0,l.startRecording)()}},{key:"render",value:function(){return this.props.pix2wav.loading?(0,r.h)(u.Loading,null):(0,r.h)("div",{className:"app pix2wav centered"},(0,r.h)("div",{className:"row"},(0,r.h)("div",{className:"column"},(0,r.h)(u.Player,{width:256,height:256})),(0,r.h)("div",{className:"params column audioParams"},(0,r.h)(u.Group,{title:"Audio playback"},(0,r.h)(u.Button,{title:"Start playback",onClick:function(){return c.startSynthesizing()}},"Start"),(0,r.h)(u.Button,{title:"Stop playback",onClick:function(){return c.stopSynthesizing()}},"Stop")))),(0,r.h)("div",{className:"params row"},(0,r.h)("div",{className:"column"},(0,r.h)(u.ParamGroup,{title:"Playback",noToggle:!0},(0,r.h)(u.Select,{name:"send_image",title:"view mode",options:["a","b","sequence","recursive"],onChange:this.props.actions.live.set_param}),(0,r.h)(u.Select,{name:"sequence_name",title:"sequence",options:this.props.pix2wav.data.sequences,onChange:this.changeSequence}),(0,r.h)(u.Select,{name:"output_format",title:"format",options:["JPEG","PNG"]}),(0,r.h)(u.Select,{name:"checkpoint_name",title:"checkpoint",options:this.props.pix2wav.data.checkpoints,onChange:this.changeCheckpoint}),(0,r.h)(u.Select,{name:"epoch",title:"epoch",options:this.props.epochs,onChange:this.changeEpoch}),(0,r.h)(u.Slider,{live:!0,name:"position",min:0,max:1,type:"float",value:(this.props.frame.sequence_i||0)/(this.props.frame.sequence_len||1),onChange:this.seek}),this.renderRestartButton(),(0,r.h)(u.Button,{title:this.props.opt.savingVideo?"Saving video...":this.props.opt.recording?"Recording ("+(t=this.props.opt.recordFrames,(t/10).toFixed(1)+" s.")+")":"Record video",onClick:this.toggleRecording},this.props.opt.savingVideo?"Saving":this.props.opt.recording?"Recording":"Record"),(0,r.h)(u.Button,{title:"Save frame",onClick:l.saveFrame},"Save"),(0,r.h)("p",{class:"last_message"},this.props.last_message))),(0,r.h)("div",{className:"column"},(0,r.h)(u.ParamGroup,{title:"Transition",name:"transition"},(0,r.h)(u.Slider,{live:!0,name:"transition_period",min:10,max:5e3,type:"int"}),(0,r.h)(u.Slider,{live:!0,name:"transition_min",min:.001,max:.2,type:"float"}),(0,r.h)(u.Slider,{live:!0,name:"transition_max",min:.1,max:1,type:"float"})),(0,r.h)(u.ParamGroup,{title:"Recursion",name:"recursive"},(0,r.h)(u.Slider,{live:!0,name:"recursive_frac",min:0,max:.5,type:"float"}),(0,r.h)(u.Slider,{live:!0,name:"recurse_roll",min:-64,max:64,type:"int"}),(0,r.h)(u.Slider,{live:!0,name:"recurse_roll_axis",min:0,max:1,type:"int"})),(0,r.h)(u.ParamGroup,{title:"Sequence",name:"sequence"},(0,r.h)(u.Slider,{live:!0,name:"sequence_frac",min:0,max:1,type:"float"}),(0,r.h)(u.Slider,{live:!0,name:"process_frac",min:0,max:1,type:"float"}))),(0,r.h)("div",{className:"column"},(0,r.h)(u.ParamGroup,{title:"Clahe",name:"clahe"},(0,r.h)(u.Slider,{live:!0,name:"clip_limit",min:1,max:4,type:"float"})),(0,r.h)(u.ParamGroup,{title:"Posterize",name:"posterize"},(0,r.h)(u.Slider,{live:!0,name:"spatial_window",min:2,max:128,type:"int"}),(0,r.h)(u.Slider,{live:!0,name:"color_window",min:2,max:128,type:"int"})),(0,r.h)(u.ParamGroup,{title:"Blur",name:"blur"},(0,r.h)(u.Slider,{live:!0,name:"blur_radius",min:3,max:7,type:"odd"}),(0,r.h)(u.Slider,{live:!0,name:"blur_sigma",min:0,max:2,type:"float"})),(0,r.h)(u.ParamGroup,{title:"Canny Edge Detection",name:"canny"},(0,r.h)(u.Slider,{live:!0,name:"canny_lo",min:10,max:200,type:"int"}),(0,r.h)(u.Slider,{live:!0,name:"canny_hi",min:10,max:200,type:"int"})))));var t}},{key:"renderRestartButton",value:function(){var t=this;return"IDLE"===this.props.runner.gpu.status?(0,r.h)(u.Button,{title:"GPU Idle",onClick:function(){return t.start()}},"Start"):"pix2pix"!==this.props.runner.gpu.task.module&&"pix2wav"!==this.props.runner.gpu.task.module?(0,r.h)(u.Button,{title:"GPU Busy",onClick:function(){return t.interrupt()}},"Interrupt"):this.props.opt.processing?(0,r.h)("div",null,(0,r.h)(u.Button,{title:"Processing",onClick:this.togglePlaying},"Pause"),(0,r.h)(u.Button,{title:"GPU Busy",onClick:function(){return t.interrupt()}},"Interrupt"),(0,r.h)(u.Button,{title:"Last resort",onClick:function(){return t.exit()}},"Exit")):(0,r.h)("div",null,(0,r.h)(u.Button,{title:"Not processing",onClick:this.togglePlaying},"Restart"),(0,r.h)(u.Button,{title:"GPU Busy",onClick:function(){return t.interrupt()}},"Interrupt"),(0,r.h)(u.Button,{title:"Last resort",onClick:function(){return t.exit()}},"Exit"))}}]),e}();e.default=(0,a.connect)(function(t){return{last_message:t.live.last_message,opt:t.live.opt,frame:t.live.frame,checkpoints:t.live.checkpoints,epochs:t.live.epochs,sequences:t.live.sequences,runner:t.system.runner,pix2wav:t.module.pix2wav}},function(t,e){return{actions:{live:(0,o.bindActionCreators)(h,t),queue:(0,o.bindActionCreators)(p,t),pix2wav:(0,o.bindActionCreators)(d,t),tasks:(0,o.bindActionCreators)(f,t),s:s}}})(m)},function(t,e,n){"use strict";var i,r,o;"function"==typeof Symbol&&Symbol.iterator;r=[],void 0===(o="function"==typeof(i=function(){var t={context:null,_tapListeners:[],_onStarted:[],setContext:function(e){return t.context=e,t},on:function(i){if(Array.isArray(i)||NodeList&&i instanceof NodeList)for(var r=0;r<i.length;r++)t.on(i[r]);else if("string"==typeof i)t.on(document.querySelectorAll(i));else if(i.jquery&&"function"==typeof i.toArray)t.on(i.toArray());else if(Element&&i instanceof Element){var o=new e(i,n);t._tapListeners.push(o)}return t},onStarted:function(e){return t.isStarted()?e():t._onStarted.push(e),t},isStarted:function(){return null!==t.context&&"running"===t.context.state}},e=function(t){this._dragged=!1,this._element=t,this._bindedMove=this._moved.bind(this),this._bindedEnd=this._ended.bind(this),t.addEventListener("touchmove",this._bindedMove),t.addEventListener("touchend",this._bindedEnd),t.addEventListener("mouseup",this._bindedEnd)};function n(){if(t.context&&!t.isStarted()){var e=t.context.createOscillator(),n=t.context.createGain();n.gain.value=0,e.connect(n),n.connect(t.context.destination);var i=t.context.currentTime;e.start(i),e.stop(i+.5)}if(t._tapListeners){for(var r=0;r<t._tapListeners.length;r++)t._tapListeners[r].dispose();t._tapListeners=null}if(t._onStarted){for(var o=0;o<t._onStarted.length;o++)t._onStarted[o]();t._onStarted=null}}return e.prototype._moved=function(t){this._dragged=!0},e.prototype._ended=function(t){this._dragged||n(),this._dragged=!1},e.prototype.dispose=function(){this._element.removeEventListener("touchmove",this._bindedMove),this._element.removeEventListener("touchend",this._bindedEnd),this._element.removeEventListener("mouseup",this._bindedEnd),this._bindedMove=null,this._bindedEnd=null,this._element=null},t})?i.apply(e,r):i)||(t.exports=o)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.requestAudioContext=function(t){if(o.is_mobile){var e=document.createElement("div"),n=document.createElement("div");n.innerHTML="Tap to start - please unmute your phone",Object.assign(e.style,{display:"block",position:"absolute",width:"100%",height:"100%",zIndex:"10000",top:"0px",left:"0px",backgroundColor:"rgba(0, 0, 0, 0.8)"}),Object.assign(n.style,{display:"block",position:"absolute",left:"50%",top:"50%",padding:"20px",backgroundColor:"#7F33ED",color:"white",fontFamily:"monospace",borderRadius:"3px",transform:"translate3D(-50%,-50%,0)",textAlign:"center",lineHeight:"1.5",width:"150px"}),e.appendChild(n),document.body.appendChild(e),r.default.setContext(i.default.context),r.default.on(n),r.default.onStarted(function(n){e.remove(),t()})}else t()};var i=s(n(48)),r=s(n(162)),o=n(5);function s(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){var i;!function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[\+\-]/};function o(t){return function(t,e){var n,i,s,a,u,l,c,h,p,f=1,d=t.length,y="";for(i=0;i<d;i++)if("string"==typeof t[i])y+=t[i];else if(Array.isArray(t[i])){if((a=t[i])[2])for(n=e[f],s=0;s<a[2].length;s++){if(!n.hasOwnProperty(a[2][s]))throw new Error(o('[sprintf] property "%s" does not exist',a[2][s]));n=n[a[2][s]]}else n=a[1]?e[a[1]]:e[f++];if(r.not_type.test(a[8])&&r.not_primitive.test(a[8])&&n instanceof Function&&(n=n()),r.numeric_arg.test(a[8])&&"number"!=typeof n&&isNaN(n))throw new TypeError(o("[sprintf] expecting number but found %T",n));switch(r.number.test(a[8])&&(h=n>=0),a[8]){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,a[6]?parseInt(a[6]):0);break;case"e":n=a[7]?parseFloat(n).toExponential(a[7]):parseFloat(n).toExponential();break;case"f":n=a[7]?parseFloat(n).toFixed(a[7]):parseFloat(n);break;case"g":n=a[7]?String(Number(n.toPrecision(a[7]))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=a[7]?n.substring(0,a[7]):n;break;case"t":n=String(!!n),n=a[7]?n.substring(0,a[7]):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=a[7]?n.substring(0,a[7]):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=a[7]?n.substring(0,a[7]):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}r.json.test(a[8])?y+=n:(!r.number.test(a[8])||h&&!a[3]?p="":(p=h?"+":"-",n=n.toString().replace(r.sign,"")),l=a[4]?"0"===a[4]?"0":a[4].charAt(1):" ",c=a[6]-(p+n).length,u=a[6]&&c>0?l.repeat(c):"",y+=a[5]?p+n+u:"0"===l?p+u+n:u+p+n)}return y}(function(t){if(a[t])return a[t];var e,n=t,i=[],o=0;for(;n;){if(null!==(e=r.text.exec(n)))i.push(e[0]);else if(null!==(e=r.modulo.exec(n)))i.push("%");else{if(null===(e=r.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var s=[],u=e[2],l=[];if(null===(l=r.key.exec(u)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(l[1]);""!==(u=u.substring(l[0].length));)if(null!==(l=r.key_access.exec(u)))s.push(l[1]);else{if(null===(l=r.index_access.exec(u)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(l[1])}e[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push(e)}n=n.substring(e[0].length)}return a[t]=i}(t),arguments)}function s(t,e){return o.apply(null,[t].concat(e||[]))}var a=Object.create(null);e.sprintf=o,e.vsprintf=s,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=s,void 0===(i=function(){return{sprintf:o,vsprintf:s}}.call(e,n,e,t))||(t.exports=i))}()},function(t,e,n){"use strict";var i=n(91),r=n(9),o=n(67),s=n(66),a=n(28),u=n(98),l=n(23);function c(t,e){this.options=t,this.loadOptions=e}c.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(t){var e,n;if(t.skip(22),this.fileNameLength=t.readInt(2),n=t.readInt(2),this.fileName=t.readData(this.fileNameLength),t.skip(n),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(e=function(t){for(var e in u)if(u.hasOwnProperty(e)&&u[e].magic===t)return u[e];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+r.pretty(this.compressionMethod)+" unknown (inner file : "+r.transformTo("string",this.fileName)+")");this.decompressed=new o(this.compressedSize,this.uncompressedSize,this.crc32,e,t.readData(this.compressedSize))},readCentralPart:function(t){this.versionMadeBy=t.readInt(2),t.skip(2),this.bitFlag=t.readInt(2),this.compressionMethod=t.readString(2),this.date=t.readDate(),this.crc32=t.readInt(4),this.compressedSize=t.readInt(4),this.uncompressedSize=t.readInt(4);var e=t.readInt(2);if(this.extraFieldsLength=t.readInt(2),this.fileCommentLength=t.readInt(2),this.diskNumberStart=t.readInt(2),this.internalFileAttributes=t.readInt(2),this.externalFileAttributes=t.readInt(4),this.localHeaderOffset=t.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");t.skip(e),this.readExtraFields(t),this.parseZIP64ExtraField(t),this.fileComment=t.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var t=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0===t&&(this.dosPermissions=63&this.externalFileAttributes),3===t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=i(this.extraFields[1].value);this.uncompressedSize===r.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===r.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===r.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===r.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(t){var e,n,i,r=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index<r;)e=t.readInt(2),n=t.readInt(2),i=t.readData(n),this.extraFields[e]={id:e,length:n,value:i}},handleUTF8:function(){var t=l.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=a.utf8decode(this.fileName),this.fileCommentStr=a.utf8decode(this.fileComment);else{var e=this.findExtraFieldUnicodePath();if(null!==e)this.fileNameStr=e;else{var n=r.transformTo(t,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(n)}var i=this.findExtraFieldUnicodeComment();if(null!==i)this.fileCommentStr=i;else{var o=r.transformTo(t,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(o)}}},findExtraFieldUnicodePath:function(){var t=this.extraFields[28789];if(t){var e=i(t.value);return 1!==e.readInt(1)?null:s(this.fileName)!==e.readInt(4)?null:a.utf8decode(e.readData(t.length-5))}return null},findExtraFieldUnicodeComment:function(){var t=this.extraFields[25461];if(t){var e=i(t.value);return 1!==e.readInt(1)?null:s(this.fileComment)!==e.readInt(4)?null:a.utf8decode(e.readData(t.length-5))}return null}},t.exports=c},function(t,e,n){"use strict";var i=n(88);function r(t){i.call(this,t)}n(9).inherits(r,i),r.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},t.exports=r},function(t,e,n){"use strict";var i=n(89);function r(t){i.call(this,t)}n(9).inherits(r,i),r.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},r.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},r.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},r.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},t.exports=r},function(t,e,n){"use strict";var i=n(91),r=n(9),o=n(92),s=n(165),a=(n(28),n(23));function u(t){this.files=[],this.loadOptions=t}u.prototype={checkSignature:function(t){if(!this.reader.readAndCheckSignature(t)){this.reader.index-=4;var e=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+r.pretty(e)+", expected "+r.pretty(t)+")")}},isSignature:function(t,e){var n=this.reader.index;this.reader.setIndex(t);var i=this.reader.readString(4)===e;return this.reader.setIndex(n),i},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var t=this.reader.readData(this.zipCommentLength),e=a.uint8array?"uint8array":"array",n=r.transformTo(e,t);this.zipComment=this.loadOptions.decodeFileName(n)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var t,e,n,i=this.zip64EndOfCentralSize-44;0<i;)t=this.reader.readInt(2),e=this.reader.readInt(4),n=this.reader.readData(e),this.zip64ExtensibleData[t]={id:t,length:e,value:n}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var t,e;for(t=0;t<this.files.length;t++)e=this.files[t],this.reader.setIndex(e.localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),e.readLocalPart(this.reader),e.handleUTF8(),e.processAttributes()},readCentralDir:function(){var t;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(t=new s({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(t);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var t=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(t<0)throw!this.isSignature(0,o.LOCAL_FILE_HEADER)?new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip: can't find end of central directory");this.reader.setIndex(t);var e=t;if(this.checkSignature(o.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===r.MAX_VALUE_16BITS||this.diskWithCentralDirStart===r.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===r.MAX_VALUE_16BITS||this.centralDirRecords===r.MAX_VALUE_16BITS||this.centralDirSize===r.MAX_VALUE_32BITS||this.centralDirOffset===r.MAX_VALUE_32BITS){if(this.zip64=!0,(t=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(t),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,o.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var i=e-n;if(i>0)this.isSignature(e,o.CENTRAL_FILE_HEADER)||(this.reader.zero=i);else if(i<0)throw new Error("Corrupted zip: missing "+Math.abs(i)+" bytes.")},prepareReader:function(t){this.reader=i(t)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=u},function(t,e,n){"use strict";var i=n(9),r=n(35),o=n(28),s=(i=n(9),n(168)),a=n(99),u=n(54);function l(t){return new r.Promise(function(e,n){var i=t.decompressed.getContentWorker().pipe(new a);i.on("error",function(t){n(t)}).on("end",function(){i.streamInfo.crc32!==t.decompressed.crc32?n(new Error("Corrupted zip : CRC32 mismatch")):e()}).resume()})}t.exports=function(t,e){var n=this;return e=i.extend(e||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),u.isNode&&u.isStream(t)?r.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",t,!0,e.optimizedBinaryString,e.base64).then(function(t){var n=new s(e);return n.load(t),n}).then(function(t){var n=[r.Promise.resolve(t)],i=t.files;if(e.checkCRC32)for(var o=0;o<i.length;o++)n.push(l(i[o]));return r.Promise.all(n)}).then(function(t){for(var i=t.shift(),r=i.files,o=0;o<r.length;o++){var s=r[o];n.file(s.fileNameStr,s.decompressed,{binary:!0,optimizedBinaryString:!0,date:s.date,dir:s.dir,comment:s.fileCommentStr.length?s.fileCommentStr:null,unixPermissions:s.unixPermissions,dosPermissions:s.dosPermissions,createFolders:e.createFolders})}return i.zipComment.length&&(n.comment=i.zipComment),n})}},function(t,e,n){"use strict";var i=n(9),r=n(15);function o(t,e){r.call(this,"Nodejs stream input adapter for "+t),this._upstreamEnded=!1,this._bindStream(e)}i.inherits(o,r),o.prototype._bindStream=function(t){var e=this;this._stream=t,t.pause(),t.on("data",function(t){e.push({data:t,meta:{percent:0}})}).on("error",function(t){e.isPaused?this.generatedError=t:e.error(t)}).on("end",function(){e.isPaused?e._upstreamEnded=!0:e.end()})},o.prototype.pause=function(){return!!r.prototype.pause.call(this)&&(this._stream.pause(),!0)},o.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=o},function(t,e,n){"use strict";var i=n(9),r=n(15),o=n(28),s=n(66),a=n(92),u=function(t,e){var n,i="";for(n=0;n<e;n++)i+=String.fromCharCode(255&t),t>>>=8;return i},l=function(t,e,n,r,l,c){var h,p,f=t.file,d=t.compression,y=c!==o.utf8encode,m=i.transformTo("string",c(f.name)),_=i.transformTo("string",o.utf8encode(f.name)),v=f.comment,g=i.transformTo("string",c(v)),b=i.transformTo("string",o.utf8encode(v)),w=_.length!==f.name.length,k=b.length!==v.length,S="",T="",x="",O=f.dir,P=f.date,A={crc32:0,compressedSize:0,uncompressedSize:0};e&&!n||(A.crc32=t.crc32,A.compressedSize=t.compressedSize,A.uncompressedSize=t.uncompressedSize);var E=0;e&&(E|=8),y||!w&&!k||(E|=2048);var C,M,R=0,j=0;O&&(R|=16),"UNIX"===l?(j=798,R|=(C=f.unixPermissions,M=C,C||(M=O?16893:33204),(65535&M)<<16)):(j=20,R|=63&(f.dosPermissions||0)),h=P.getUTCHours(),h<<=6,h|=P.getUTCMinutes(),h<<=5,h|=P.getUTCSeconds()/2,p=P.getUTCFullYear()-1980,p<<=4,p|=P.getUTCMonth()+1,p<<=5,p|=P.getUTCDate(),w&&(T=u(1,1)+u(s(m),4)+_,S+="up"+u(T.length,2)+T),k&&(x=u(1,1)+u(s(g),4)+b,S+="uc"+u(x.length,2)+x);var F="";return F+="\n\0",F+=u(E,2),F+=d.magic,F+=u(h,2),F+=u(p,2),F+=u(A.crc32,4),F+=u(A.compressedSize,4),F+=u(A.uncompressedSize,4),F+=u(m.length,2),F+=u(S.length,2),{fileRecord:a.LOCAL_FILE_HEADER+F+m+S,dirRecord:a.CENTRAL_FILE_HEADER+u(j,2)+F+u(g.length,2)+"\0\0\0\0"+u(R,4)+u(r,4)+m+S+g}};function c(t,e,n,i){r.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=n,this.encodeFileName=i,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}i.inherits(c,r),c.prototype.push=function(t){var e=t.meta.percent||0,n=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,r.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:n?(e+100*(n-i-1))/n:100}}))},c.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var n=l(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},c.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,n=l(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),e)this.push({data:function(t){return a.DATA_DESCRIPTOR+u(t.crc32,4)+u(t.compressedSize,4)+u(t.uncompressedSize,4)}(t),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},c.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e<this.dirRecords.length;e++)this.push({data:this.dirRecords[e],meta:{percent:100}});var n=this.bytesWritten-t,r=function(t,e,n,r,o){var s=i.transformTo("string",o(r));return a.CENTRAL_DIRECTORY_END+"\0\0\0\0"+u(t,2)+u(t,2)+u(e,4)+u(n,4)+u(s.length,2)+s}(this.dirRecords.length,n,t,this.zipComment,this.encodeFileName);this.push({data:r,meta:{percent:100}})},c.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},c.prototype.registerPrevious=function(t){this._sources.push(t);var e=this;return t.on("data",function(t){e.processChunk(t)}),t.on("end",function(){e.closedSource(e.previous.streamInfo),e._sources.length?e.prepareNextSource():e.end()}),t.on("error",function(t){e.error(t)}),this},c.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},c.prototype.error=function(t){var e=this._sources;if(!r.prototype.error.call(this,t))return!1;for(var n=0;n<e.length;n++)try{e[n].error(t)}catch(t){}return!0},c.prototype.lock=function(){r.prototype.lock.call(this);for(var t=this._sources,e=0;e<t.length;e++)t[e].lock()},t.exports=c},function(t,e,n){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},function(t,e,n){"use strict";var i=n(22),r=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(t,e,n,u,l,c,h,p){var f,d,y,m,_,v,g,b,w,k=p.bits,S=0,T=0,x=0,O=0,P=0,A=0,E=0,C=0,M=0,R=0,j=null,F=0,N=new i.Buf16(16),L=new i.Buf16(16),D=null,q=0;for(S=0;S<=15;S++)N[S]=0;for(T=0;T<u;T++)N[e[n+T]]++;for(P=k,O=15;O>=1&&0===N[O];O--);if(P>O&&(P=O),0===O)return l[c++]=20971520,l[c++]=20971520,p.bits=1,0;for(x=1;x<O&&0===N[x];x++);for(P<x&&(P=x),C=1,S=1;S<=15;S++)if(C<<=1,(C-=N[S])<0)return-1;if(C>0&&(0===t||1!==O))return-1;for(L[1]=0,S=1;S<15;S++)L[S+1]=L[S]+N[S];for(T=0;T<u;T++)0!==e[n+T]&&(h[L[e[n+T]]++]=T);if(0===t?(j=D=h,v=19):1===t?(j=r,F-=257,D=o,q-=257,v=256):(j=s,D=a,v=-1),R=0,T=0,S=x,_=c,A=P,E=0,y=-1,m=(M=1<<P)-1,1===t&&M>852||2===t&&M>592)return 1;for(;;){g=S-E,h[T]<v?(b=0,w=h[T]):h[T]>v?(b=D[q+h[T]],w=j[F+h[T]]):(b=96,w=0),f=1<<S-E,x=d=1<<A;do{l[_+(R>>E)+(d-=f)]=g<<24|b<<16|w|0}while(0!==d);for(f=1<<S-1;R&f;)f>>=1;if(0!==f?(R&=f-1,R+=f):R=0,T++,0==--N[S]){if(S===O)break;S=e[n+h[T]]}if(S>P&&(R&m)!==y){for(0===E&&(E=P),_+=x,C=1<<(A=S-E);A+E<O&&!((C-=N[A+E])<=0);)A++,C<<=1;if(M+=1<<A,1===t&&M>852||2===t&&M>592)return 1;l[y=R&m]=P<<24|A<<16|_-c|0}}return 0!==R&&(l[_+R]=S-E<<24|64<<16|0),p.bits=P,0}},function(t,e,n){"use strict";t.exports=function(t,e){var n,i,r,o,s,a,u,l,c,h,p,f,d,y,m,_,v,g,b,w,k,S,T,x,O;n=t.state,i=t.next_in,x=t.input,r=i+(t.avail_in-5),o=t.next_out,O=t.output,s=o-(e-t.avail_out),a=o+(t.avail_out-257),u=n.dmax,l=n.wsize,c=n.whave,h=n.wnext,p=n.window,f=n.hold,d=n.bits,y=n.lencode,m=n.distcode,_=(1<<n.lenbits)-1,v=(1<<n.distbits)-1;t:do{d<15&&(f+=x[i++]<<d,d+=8,f+=x[i++]<<d,d+=8),g=y[f&_];e:for(;;){if(f>>>=b=g>>>24,d-=b,0===(b=g>>>16&255))O[o++]=65535&g;else{if(!(16&b)){if(0==(64&b)){g=y[(65535&g)+(f&(1<<b)-1)];continue e}if(32&b){n.mode=12;break t}t.msg="invalid literal/length code",n.mode=30;break t}w=65535&g,(b&=15)&&(d<b&&(f+=x[i++]<<d,d+=8),w+=f&(1<<b)-1,f>>>=b,d-=b),d<15&&(f+=x[i++]<<d,d+=8,f+=x[i++]<<d,d+=8),g=m[f&v];n:for(;;){if(f>>>=b=g>>>24,d-=b,!(16&(b=g>>>16&255))){if(0==(64&b)){g=m[(65535&g)+(f&(1<<b)-1)];continue n}t.msg="invalid distance code",n.mode=30;break t}if(k=65535&g,d<(b&=15)&&(f+=x[i++]<<d,(d+=8)<b&&(f+=x[i++]<<d,d+=8)),(k+=f&(1<<b)-1)>u){t.msg="invalid distance too far back",n.mode=30;break t}if(f>>>=b,d-=b,k>(b=o-s)){if((b=k-b)>c&&n.sane){t.msg="invalid distance too far back",n.mode=30;break t}if(S=0,T=p,0===h){if(S+=l-b,b<w){w-=b;do{O[o++]=p[S++]}while(--b);S=o-k,T=O}}else if(h<b){if(S+=l+h-b,(b-=h)<w){w-=b;do{O[o++]=p[S++]}while(--b);if(S=0,h<w){w-=b=h;do{O[o++]=p[S++]}while(--b);S=o-k,T=O}}}else if(S+=h-b,b<w){w-=b;do{O[o++]=p[S++]}while(--b);S=o-k,T=O}for(;w>2;)O[o++]=T[S++],O[o++]=T[S++],O[o++]=T[S++],w-=3;w&&(O[o++]=T[S++],w>1&&(O[o++]=T[S++]))}else{S=o-k;do{O[o++]=O[S++],O[o++]=O[S++],O[o++]=O[S++],w-=3}while(w>2);w&&(O[o++]=O[S++],w>1&&(O[o++]=O[S++]))}break}}break}}while(i<r&&o<a);i-=w=d>>3,f&=(1<<(d-=w<<3))-1,t.next_in=i,t.next_out=o,t.avail_in=i<r?r-i+5:5-(i-r),t.avail_out=o<a?a-o+257:257-(o-a),n.hold=f,n.bits=d}},function(t,e,n){"use strict";var i=n(22),r=n(97),o=n(96),s=n(174),a=n(173),u=0,l=1,c=2,h=4,p=5,f=6,d=0,y=1,m=2,_=-2,v=-3,g=-4,b=-5,w=8,k=1,S=2,T=3,x=4,O=5,P=6,A=7,E=8,C=9,M=10,R=11,j=12,F=13,N=14,L=15,D=16,q=17,I=18,B=19,U=20,z=21,Y=22,W=23,G=24,V=25,H=26,Z=27,Q=28,K=29,X=30,$=31,J=32,tt=852,et=592,nt=15;function it(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function rt(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=k,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new i.Buf32(tt),e.distcode=e.distdyn=new i.Buf32(et),e.sane=1,e.back=-1,d):_}function ot(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,rt(t)):_}function st(t,e){var n,i;return t&&t.state?(i=t.state,e<0?(n=0,e=-e):(n=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?_:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=n,i.wbits=e,ot(t))):_}function at(t,e){var n,r;return t?(r=new function(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0},t.state=r,r.window=null,(n=st(t,e))!==d&&(t.state=null),n):_}var ut,lt,ct=!0;function ht(t){if(ct){var e;for(ut=new i.Buf32(512),lt=new i.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(a(l,t.lens,0,288,ut,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;a(c,t.lens,0,32,lt,0,t.work,{bits:5}),ct=!1}t.lencode=ut,t.lenbits=9,t.distcode=lt,t.distbits=5}function pt(t,e,n,r){var o,s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new i.Buf8(s.wsize)),r>=s.wsize?(i.arraySet(s.window,e,n-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((o=s.wsize-s.wnext)>r&&(o=r),i.arraySet(s.window,e,n-r,o,s.wnext),(r-=o)?(i.arraySet(s.window,e,n-r,r,0),s.wnext=r,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=o))),0}e.inflateReset=ot,e.inflateReset2=st,e.inflateResetKeep=rt,e.inflateInit=function(t){return at(t,nt)},e.inflateInit2=at,e.inflate=function(t,e){var n,tt,et,nt,rt,ot,st,at,ut,lt,ct,ft,dt,yt,mt,_t,vt,gt,bt,wt,kt,St,Tt,xt,Ot=0,Pt=new i.Buf8(4),At=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return _;(n=t.state).mode===j&&(n.mode=F),rt=t.next_out,et=t.output,st=t.avail_out,nt=t.next_in,tt=t.input,ot=t.avail_in,at=n.hold,ut=n.bits,lt=ot,ct=st,St=d;t:for(;;)switch(n.mode){case k:if(0===n.wrap){n.mode=F;break}for(;ut<16;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}if(2&n.wrap&&35615===at){n.check=0,Pt[0]=255&at,Pt[1]=at>>>8&255,n.check=o(n.check,Pt,2,0),at=0,ut=0,n.mode=S;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&at)<<8)+(at>>8))%31){t.msg="incorrect header check",n.mode=X;break}if((15&at)!==w){t.msg="unknown compression method",n.mode=X;break}if(ut-=4,kt=8+(15&(at>>>=4)),0===n.wbits)n.wbits=kt;else if(kt>n.wbits){t.msg="invalid window size",n.mode=X;break}n.dmax=1<<kt,t.adler=n.check=1,n.mode=512&at?M:j,at=0,ut=0;break;case S:for(;ut<16;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}if(n.flags=at,(255&n.flags)!==w){t.msg="unknown compression method",n.mode=X;break}if(57344&n.flags){t.msg="unknown header flags set",n.mode=X;break}n.head&&(n.head.text=at>>8&1),512&n.flags&&(Pt[0]=255&at,Pt[1]=at>>>8&255,n.check=o(n.check,Pt,2,0)),at=0,ut=0,n.mode=T;case T:for(;ut<32;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}n.head&&(n.head.time=at),512&n.flags&&(Pt[0]=255&at,Pt[1]=at>>>8&255,Pt[2]=at>>>16&255,Pt[3]=at>>>24&255,n.check=o(n.check,Pt,4,0)),at=0,ut=0,n.mode=x;case x:for(;ut<16;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}n.head&&(n.head.xflags=255&at,n.head.os=at>>8),512&n.flags&&(Pt[0]=255&at,Pt[1]=at>>>8&255,n.check=o(n.check,Pt,2,0)),at=0,ut=0,n.mode=O;case O:if(1024&n.flags){for(;ut<16;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}n.length=at,n.head&&(n.head.extra_len=at),512&n.flags&&(Pt[0]=255&at,Pt[1]=at>>>8&255,n.check=o(n.check,Pt,2,0)),at=0,ut=0}else n.head&&(n.head.extra=null);n.mode=P;case P:if(1024&n.flags&&((ft=n.length)>ot&&(ft=ot),ft&&(n.head&&(kt=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),i.arraySet(n.head.extra,tt,nt,ft,kt)),512&n.flags&&(n.check=o(n.check,tt,ft,nt)),ot-=ft,nt+=ft,n.length-=ft),n.length))break t;n.length=0,n.mode=A;case A:if(2048&n.flags){if(0===ot)break t;ft=0;do{kt=tt[nt+ft++],n.head&&kt&&n.length<65536&&(n.head.name+=String.fromCharCode(kt))}while(kt&&ft<ot);if(512&n.flags&&(n.check=o(n.check,tt,ft,nt)),ot-=ft,nt+=ft,kt)break t}else n.head&&(n.head.name=null);n.length=0,n.mode=E;case E:if(4096&n.flags){if(0===ot)break t;ft=0;do{kt=tt[nt+ft++],n.head&&kt&&n.length<65536&&(n.head.comment+=String.fromCharCode(kt))}while(kt&&ft<ot);if(512&n.flags&&(n.check=o(n.check,tt,ft,nt)),ot-=ft,nt+=ft,kt)break t}else n.head&&(n.head.comment=null);n.mode=C;case C:if(512&n.flags){for(;ut<16;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}if(at!==(65535&n.check)){t.msg="header crc mismatch",n.mode=X;break}at=0,ut=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=j;break;case M:for(;ut<32;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}t.adler=n.check=it(at),at=0,ut=0,n.mode=R;case R:if(0===n.havedict)return t.next_out=rt,t.avail_out=st,t.next_in=nt,t.avail_in=ot,n.hold=at,n.bits=ut,m;t.adler=n.check=1,n.mode=j;case j:if(e===p||e===f)break t;case F:if(n.last){at>>>=7&ut,ut-=7&ut,n.mode=Z;break}for(;ut<3;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}switch(n.last=1&at,ut-=1,3&(at>>>=1)){case 0:n.mode=N;break;case 1:if(ht(n),n.mode=U,e===f){at>>>=2,ut-=2;break t}break;case 2:n.mode=q;break;case 3:t.msg="invalid block type",n.mode=X}at>>>=2,ut-=2;break;case N:for(at>>>=7&ut,ut-=7&ut;ut<32;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}if((65535&at)!=(at>>>16^65535)){t.msg="invalid stored block lengths",n.mode=X;break}if(n.length=65535&at,at=0,ut=0,n.mode=L,e===f)break t;case L:n.mode=D;case D:if(ft=n.length){if(ft>ot&&(ft=ot),ft>st&&(ft=st),0===ft)break t;i.arraySet(et,tt,nt,ft,rt),ot-=ft,nt+=ft,st-=ft,rt+=ft,n.length-=ft;break}n.mode=j;break;case q:for(;ut<14;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}if(n.nlen=257+(31&at),at>>>=5,ut-=5,n.ndist=1+(31&at),at>>>=5,ut-=5,n.ncode=4+(15&at),at>>>=4,ut-=4,n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols",n.mode=X;break}n.have=0,n.mode=I;case I:for(;n.have<n.ncode;){for(;ut<3;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}n.lens[At[n.have++]]=7&at,at>>>=3,ut-=3}for(;n.have<19;)n.lens[At[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,Tt={bits:n.lenbits},St=a(u,n.lens,0,19,n.lencode,0,n.work,Tt),n.lenbits=Tt.bits,St){t.msg="invalid code lengths set",n.mode=X;break}n.have=0,n.mode=B;case B:for(;n.have<n.nlen+n.ndist;){for(;_t=(Ot=n.lencode[at&(1<<n.lenbits)-1])>>>16&255,vt=65535&Ot,!((mt=Ot>>>24)<=ut);){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}if(vt<16)at>>>=mt,ut-=mt,n.lens[n.have++]=vt;else{if(16===vt){for(xt=mt+2;ut<xt;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}if(at>>>=mt,ut-=mt,0===n.have){t.msg="invalid bit length repeat",n.mode=X;break}kt=n.lens[n.have-1],ft=3+(3&at),at>>>=2,ut-=2}else if(17===vt){for(xt=mt+3;ut<xt;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}ut-=mt,kt=0,ft=3+(7&(at>>>=mt)),at>>>=3,ut-=3}else{for(xt=mt+7;ut<xt;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}ut-=mt,kt=0,ft=11+(127&(at>>>=mt)),at>>>=7,ut-=7}if(n.have+ft>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=X;break}for(;ft--;)n.lens[n.have++]=kt}}if(n.mode===X)break;if(0===n.lens[256]){t.msg="invalid code -- missing end-of-block",n.mode=X;break}if(n.lenbits=9,Tt={bits:n.lenbits},St=a(l,n.lens,0,n.nlen,n.lencode,0,n.work,Tt),n.lenbits=Tt.bits,St){t.msg="invalid literal/lengths set",n.mode=X;break}if(n.distbits=6,n.distcode=n.distdyn,Tt={bits:n.distbits},St=a(c,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,Tt),n.distbits=Tt.bits,St){t.msg="invalid distances set",n.mode=X;break}if(n.mode=U,e===f)break t;case U:n.mode=z;case z:if(ot>=6&&st>=258){t.next_out=rt,t.avail_out=st,t.next_in=nt,t.avail_in=ot,n.hold=at,n.bits=ut,s(t,ct),rt=t.next_out,et=t.output,st=t.avail_out,nt=t.next_in,tt=t.input,ot=t.avail_in,at=n.hold,ut=n.bits,n.mode===j&&(n.back=-1);break}for(n.back=0;_t=(Ot=n.lencode[at&(1<<n.lenbits)-1])>>>16&255,vt=65535&Ot,!((mt=Ot>>>24)<=ut);){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}if(_t&&0==(240&_t)){for(gt=mt,bt=_t,wt=vt;_t=(Ot=n.lencode[wt+((at&(1<<gt+bt)-1)>>gt)])>>>16&255,vt=65535&Ot,!(gt+(mt=Ot>>>24)<=ut);){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}at>>>=gt,ut-=gt,n.back+=gt}if(at>>>=mt,ut-=mt,n.back+=mt,n.length=vt,0===_t){n.mode=H;break}if(32&_t){n.back=-1,n.mode=j;break}if(64&_t){t.msg="invalid literal/length code",n.mode=X;break}n.extra=15&_t,n.mode=Y;case Y:if(n.extra){for(xt=n.extra;ut<xt;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}n.length+=at&(1<<n.extra)-1,at>>>=n.extra,ut-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=W;case W:for(;_t=(Ot=n.distcode[at&(1<<n.distbits)-1])>>>16&255,vt=65535&Ot,!((mt=Ot>>>24)<=ut);){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}if(0==(240&_t)){for(gt=mt,bt=_t,wt=vt;_t=(Ot=n.distcode[wt+((at&(1<<gt+bt)-1)>>gt)])>>>16&255,vt=65535&Ot,!(gt+(mt=Ot>>>24)<=ut);){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}at>>>=gt,ut-=gt,n.back+=gt}if(at>>>=mt,ut-=mt,n.back+=mt,64&_t){t.msg="invalid distance code",n.mode=X;break}n.offset=vt,n.extra=15&_t,n.mode=G;case G:if(n.extra){for(xt=n.extra;ut<xt;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}n.offset+=at&(1<<n.extra)-1,at>>>=n.extra,ut-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=X;break}n.mode=V;case V:if(0===st)break t;if(ft=ct-st,n.offset>ft){if((ft=n.offset-ft)>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=X;break}ft>n.wnext?(ft-=n.wnext,dt=n.wsize-ft):dt=n.wnext-ft,ft>n.length&&(ft=n.length),yt=n.window}else yt=et,dt=rt-n.offset,ft=n.length;ft>st&&(ft=st),st-=ft,n.length-=ft;do{et[rt++]=yt[dt++]}while(--ft);0===n.length&&(n.mode=z);break;case H:if(0===st)break t;et[rt++]=n.length,st--,n.mode=z;break;case Z:if(n.wrap){for(;ut<32;){if(0===ot)break t;ot--,at|=tt[nt++]<<ut,ut+=8}if(ct-=st,t.total_out+=ct,n.total+=ct,ct&&(t.adler=n.check=n.flags?o(n.check,et,ct,rt-ct):r(n.check,et,ct,rt-ct)),ct=st,(n.flags?at:it(at))!==n.check){t.msg="incorrect data check",n.mode=X;break}at=0,ut=0}n.mode=Q;case Q:if(n.wrap&&n.flags){for(;ut<32;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}if(at!==(4294967295&n.total)){t.msg="incorrect length check",n.mode=X;break}at=0,ut=0}n.mode=K;case K:St=y;break t;case X:St=v;break t;case $:return g;case J:default:return _}return t.next_out=rt,t.avail_out=st,t.next_in=nt,t.avail_in=ot,n.hold=at,n.bits=ut,(n.wsize||ct!==t.avail_out&&n.mode<X&&(n.mode<Z||e!==h))&&pt(t,t.output,t.next_out,ct-t.avail_out)?(n.mode=$,g):(lt-=t.avail_in,ct-=t.avail_out,t.total_in+=lt,t.total_out+=ct,n.total+=ct,n.wrap&&ct&&(t.adler=n.check=n.flags?o(n.check,et,ct,t.next_out-ct):r(n.check,et,ct,t.next_out-ct)),t.data_type=n.bits+(n.last?64:0)+(n.mode===j?128:0)+(n.mode===U||n.mode===L?256:0),(0===lt&&0===ct||e===h)&&St===d&&(St=b),St)},e.inflateEnd=function(t){if(!t||!t.state)return _;var e=t.state;return e.window&&(e.window=null),t.state=null,d},e.inflateGetHeader=function(t,e){var n;return t&&t.state?0==(2&(n=t.state).wrap)?_:(n.head=e,e.done=!1,d):_},e.inflateSetDictionary=function(t,e){var n,i=e.length;return t&&t.state?0!==(n=t.state).wrap&&n.mode!==R?_:n.mode===R&&r(1,e,i,0)!==n.check?v:pt(t,e,i,i)?(n.mode=$,g):(n.havedict=1,d):_},e.inflateInfo="pako inflate (from Nodeca project)"},function(t,e,n){"use strict";var i=n(175),r=n(22),o=n(95),s=n(93),a=n(65),u=n(94),l=n(172),c=Object.prototype.toString;function h(t){if(!(this instanceof h))return new h(t);this.options=r.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var n=i.inflateInit2(this.strm,e.windowBits);if(n!==s.Z_OK)throw new Error(a[n]);this.header=new l,i.inflateGetHeader(this.strm,this.header)}function p(t,e){var n=new h(e);if(n.push(t,!0),n.err)throw n.msg||a[n.err];return n.result}h.prototype.push=function(t,e){var n,a,u,l,h,p,f=this.strm,d=this.options.chunkSize,y=this.options.dictionary,m=!1;if(this.ended)return!1;a=e===~~e?e:!0===e?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof t?f.input=o.binstring2buf(t):"[object ArrayBuffer]"===c.call(t)?f.input=new Uint8Array(t):f.input=t,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new r.Buf8(d),f.next_out=0,f.avail_out=d),(n=i.inflate(f,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&y&&(p="string"==typeof y?o.string2buf(y):"[object ArrayBuffer]"===c.call(y)?new Uint8Array(y):y,n=i.inflateSetDictionary(this.strm,p)),n===s.Z_BUF_ERROR&&!0===m&&(n=s.Z_OK,m=!1),n!==s.Z_STREAM_END&&n!==s.Z_OK)return this.onEnd(n),this.ended=!0,!1;f.next_out&&(0!==f.avail_out&&n!==s.Z_STREAM_END&&(0!==f.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(u=o.utf8border(f.output,f.next_out),l=f.next_out-u,h=o.buf2string(f.output,u),f.next_out=l,f.avail_out=d-l,l&&r.arraySet(f.output,f.output,u,l,0),this.onData(h)):this.onData(r.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(m=!0)}while((f.avail_in>0||0===f.avail_out)&&n!==s.Z_STREAM_END);return n===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(n=i.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),f.avail_out=0,!0)},h.prototype.onData=function(t){this.chunks.push(t)},h.prototype.onEnd=function(t){t===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Inflate=h,e.inflate=p,e.inflateRaw=function(t,e){return(e=e||{}).raw=!0,p(t,e)},e.ungzip=p},function(t,e,n){"use strict";var i=n(22),r=4,o=0,s=1,a=2;function u(t){for(var e=t.length;--e>=0;)t[e]=0}var l=0,c=1,h=2,p=29,f=256,d=f+1+p,y=30,m=19,_=2*d+1,v=15,g=16,b=7,w=256,k=16,S=17,T=18,x=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],O=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],P=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],E=new Array(2*(d+2));u(E);var C=new Array(2*y);u(C);var M=new Array(512);u(M);var R=new Array(256);u(R);var j=new Array(p);u(j);var F,N,L,D=new Array(y);function q(t,e,n,i,r){this.static_tree=t,this.extra_bits=e,this.extra_base=n,this.elems=i,this.max_length=r,this.has_stree=t&&t.length}function I(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function B(t){return t<256?M[t]:M[256+(t>>>7)]}function U(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function z(t,e,n){t.bi_valid>g-n?(t.bi_buf|=e<<t.bi_valid&65535,U(t,t.bi_buf),t.bi_buf=e>>g-t.bi_valid,t.bi_valid+=n-g):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=n)}function Y(t,e,n){z(t,n[2*e],n[2*e+1])}function W(t,e){var n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}function G(t,e,n){var i,r,o=new Array(v+1),s=0;for(i=1;i<=v;i++)o[i]=s=s+n[i-1]<<1;for(r=0;r<=e;r++){var a=t[2*r+1];0!==a&&(t[2*r]=W(o[a]++,a))}}function V(t){var e;for(e=0;e<d;e++)t.dyn_ltree[2*e]=0;for(e=0;e<y;e++)t.dyn_dtree[2*e]=0;for(e=0;e<m;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*w]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function H(t){t.bi_valid>8?U(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function Z(t,e,n,i){var r=2*e,o=2*n;return t[r]<t[o]||t[r]===t[o]&&i[e]<=i[n]}function Q(t,e,n){for(var i=t.heap[n],r=n<<1;r<=t.heap_len&&(r<t.heap_len&&Z(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!Z(e,i,t.heap[r],t.depth));)t.heap[n]=t.heap[r],n=r,r<<=1;t.heap[n]=i}function K(t,e,n){var i,r,o,s,a=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*a]<<8|t.pending_buf[t.d_buf+2*a+1],r=t.pending_buf[t.l_buf+a],a++,0===i?Y(t,r,e):(Y(t,(o=R[r])+f+1,e),0!==(s=x[o])&&z(t,r-=j[o],s),Y(t,o=B(--i),n),0!==(s=O[o])&&z(t,i-=D[o],s))}while(a<t.last_lit);Y(t,w,e)}function X(t,e){var n,i,r,o=e.dyn_tree,s=e.stat_desc.static_tree,a=e.stat_desc.has_stree,u=e.stat_desc.elems,l=-1;for(t.heap_len=0,t.heap_max=_,n=0;n<u;n++)0!==o[2*n]?(t.heap[++t.heap_len]=l=n,t.depth[n]=0):o[2*n+1]=0;for(;t.heap_len<2;)o[2*(r=t.heap[++t.heap_len]=l<2?++l:0)]=1,t.depth[r]=0,t.opt_len--,a&&(t.static_len-=s[2*r+1]);for(e.max_code=l,n=t.heap_len>>1;n>=1;n--)Q(t,o,n);r=u;do{n=t.heap[1],t.heap[1]=t.heap[t.heap_len--],Q(t,o,1),i=t.heap[1],t.heap[--t.heap_max]=n,t.heap[--t.heap_max]=i,o[2*r]=o[2*n]+o[2*i],t.depth[r]=(t.depth[n]>=t.depth[i]?t.depth[n]:t.depth[i])+1,o[2*n+1]=o[2*i+1]=r,t.heap[1]=r++,Q(t,o,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var n,i,r,o,s,a,u=e.dyn_tree,l=e.max_code,c=e.stat_desc.static_tree,h=e.stat_desc.has_stree,p=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,d=e.stat_desc.max_length,y=0;for(o=0;o<=v;o++)t.bl_count[o]=0;for(u[2*t.heap[t.heap_max]+1]=0,n=t.heap_max+1;n<_;n++)(o=u[2*u[2*(i=t.heap[n])+1]+1]+1)>d&&(o=d,y++),u[2*i+1]=o,i>l||(t.bl_count[o]++,s=0,i>=f&&(s=p[i-f]),a=u[2*i],t.opt_len+=a*(o+s),h&&(t.static_len+=a*(c[2*i+1]+s)));if(0!==y){do{for(o=d-1;0===t.bl_count[o];)o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[d]--,y-=2}while(y>0);for(o=d;0!==o;o--)for(i=t.bl_count[o];0!==i;)(r=t.heap[--n])>l||(u[2*r+1]!==o&&(t.opt_len+=(o-u[2*r+1])*u[2*r],u[2*r+1]=o),i--)}}(t,e),G(o,l,t.bl_count)}function $(t,e,n){var i,r,o=-1,s=e[1],a=0,u=7,l=4;for(0===s&&(u=138,l=3),e[2*(n+1)+1]=65535,i=0;i<=n;i++)r=s,s=e[2*(i+1)+1],++a<u&&r===s||(a<l?t.bl_tree[2*r]+=a:0!==r?(r!==o&&t.bl_tree[2*r]++,t.bl_tree[2*k]++):a<=10?t.bl_tree[2*S]++:t.bl_tree[2*T]++,a=0,o=r,0===s?(u=138,l=3):r===s?(u=6,l=3):(u=7,l=4))}function J(t,e,n){var i,r,o=-1,s=e[1],a=0,u=7,l=4;for(0===s&&(u=138,l=3),i=0;i<=n;i++)if(r=s,s=e[2*(i+1)+1],!(++a<u&&r===s)){if(a<l)do{Y(t,r,t.bl_tree)}while(0!=--a);else 0!==r?(r!==o&&(Y(t,r,t.bl_tree),a--),Y(t,k,t.bl_tree),z(t,a-3,2)):a<=10?(Y(t,S,t.bl_tree),z(t,a-3,3)):(Y(t,T,t.bl_tree),z(t,a-11,7));a=0,o=r,0===s?(u=138,l=3):r===s?(u=6,l=3):(u=7,l=4)}}u(D);var tt=!1;function et(t,e,n,r){z(t,(l<<1)+(r?1:0),3),function(t,e,n,r){H(t),r&&(U(t,n),U(t,~n)),i.arraySet(t.pending_buf,t.window,e,n,t.pending),t.pending+=n}(t,e,n,!0)}e._tr_init=function(t){tt||(function(){var t,e,n,i,r,o=new Array(v+1);for(n=0,i=0;i<p-1;i++)for(j[i]=n,t=0;t<1<<x[i];t++)R[n++]=i;for(R[n-1]=i,r=0,i=0;i<16;i++)for(D[i]=r,t=0;t<1<<O[i];t++)M[r++]=i;for(r>>=7;i<y;i++)for(D[i]=r<<7,t=0;t<1<<O[i]-7;t++)M[256+r++]=i;for(e=0;e<=v;e++)o[e]=0;for(t=0;t<=143;)E[2*t+1]=8,t++,o[8]++;for(;t<=255;)E[2*t+1]=9,t++,o[9]++;for(;t<=279;)E[2*t+1]=7,t++,o[7]++;for(;t<=287;)E[2*t+1]=8,t++,o[8]++;for(G(E,d+1,o),t=0;t<y;t++)C[2*t+1]=5,C[2*t]=W(t,5);F=new q(E,x,f+1,d,v),N=new q(C,O,0,y,v),L=new q(new Array(0),P,0,m,b)}(),tt=!0),t.l_desc=new I(t.dyn_ltree,F),t.d_desc=new I(t.dyn_dtree,N),t.bl_desc=new I(t.bl_tree,L),t.bi_buf=0,t.bi_valid=0,V(t)},e._tr_stored_block=et,e._tr_flush_block=function(t,e,n,i){var u,l,p=0;t.level>0?(t.strm.data_type===a&&(t.strm.data_type=function(t){var e,n=4093624447;for(e=0;e<=31;e++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return o;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return s;for(e=32;e<f;e++)if(0!==t.dyn_ltree[2*e])return s;return o}(t)),X(t,t.l_desc),X(t,t.d_desc),p=function(t){var e;for($(t,t.dyn_ltree,t.l_desc.max_code),$(t,t.dyn_dtree,t.d_desc.max_code),X(t,t.bl_desc),e=m-1;e>=3&&0===t.bl_tree[2*A[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),u=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=u&&(u=l)):u=l=n+5,n+4<=u&&-1!==e?et(t,e,n,i):t.strategy===r||l===u?(z(t,(c<<1)+(i?1:0),3),K(t,E,C)):(z(t,(h<<1)+(i?1:0),3),function(t,e,n,i){var r;for(z(t,e-257,5),z(t,n-1,5),z(t,i-4,4),r=0;r<i;r++)z(t,t.bl_tree[2*A[r]+1],3);J(t,t.dyn_ltree,e-1),J(t,t.dyn_dtree,n-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,p+1),K(t,t.dyn_ltree,t.dyn_dtree)),V(t),i&&H(t)},e._tr_tally=function(t,e,n){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(R[n]+f+1)]++,t.dyn_dtree[2*B(e)]++),t.last_lit===t.lit_bufsize-1},e._tr_align=function(t){z(t,c<<1,3),Y(t,w,E),function(t){16===t.bi_valid?(U(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},function(t,e,n){"use strict";var i,r=n(22),o=n(177),s=n(97),a=n(96),u=n(65),l=0,c=1,h=3,p=4,f=5,d=0,y=1,m=-2,_=-3,v=-5,g=-1,b=1,w=2,k=3,S=4,T=0,x=2,O=8,P=9,A=15,E=8,C=286,M=30,R=19,j=2*C+1,F=15,N=3,L=258,D=L+N+1,q=32,I=42,B=69,U=73,z=91,Y=103,W=113,G=666,V=1,H=2,Z=3,Q=4,K=3;function X(t,e){return t.msg=u[e],e}function $(t){return(t<<1)-(t>4?9:0)}function J(t){for(var e=t.length;--e>=0;)t[e]=0}function tt(t){var e=t.state,n=e.pending;n>t.avail_out&&(n=t.avail_out),0!==n&&(r.arraySet(t.output,e.pending_buf,e.pending_out,n,t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,0===e.pending&&(e.pending_out=0))}function et(t,e){o._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,tt(t.strm)}function nt(t,e){t.pending_buf[t.pending++]=e}function it(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function rt(t,e){var n,i,r=t.max_chain_length,o=t.strstart,s=t.prev_length,a=t.nice_match,u=t.strstart>t.w_size-D?t.strstart-(t.w_size-D):0,l=t.window,c=t.w_mask,h=t.prev,p=t.strstart+L,f=l[o+s-1],d=l[o+s];t.prev_length>=t.good_match&&(r>>=2),a>t.lookahead&&(a=t.lookahead);do{if(l[(n=e)+s]===d&&l[n+s-1]===f&&l[n]===l[o]&&l[++n]===l[o+1]){o+=2,n++;do{}while(l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&o<p);if(i=L-(p-o),o=p-L,i>s){if(t.match_start=e,s=i,i>=a)break;f=l[o+s-1],d=l[o+s]}}}while((e=h[e&c])>u&&0!=--r);return s<=t.lookahead?s:t.lookahead}function ot(t){var e,n,i,o,u,l,c,h,p,f,d=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=d+(d-D)){r.arraySet(t.window,t.window,d,d,0),t.match_start-=d,t.strstart-=d,t.block_start-=d,e=n=t.hash_size;do{i=t.head[--e],t.head[e]=i>=d?i-d:0}while(--n);e=n=d;do{i=t.prev[--e],t.prev[e]=i>=d?i-d:0}while(--n);o+=d}if(0===t.strm.avail_in)break;if(l=t.strm,c=t.window,h=t.strstart+t.lookahead,p=o,f=void 0,(f=l.avail_in)>p&&(f=p),n=0===f?0:(l.avail_in-=f,r.arraySet(c,l.input,l.next_in,f,h),1===l.state.wrap?l.adler=s(l.adler,c,f,h):2===l.state.wrap&&(l.adler=a(l.adler,c,f,h)),l.next_in+=f,l.total_in+=f,f),t.lookahead+=n,t.lookahead+t.insert>=N)for(u=t.strstart-t.insert,t.ins_h=t.window[u],t.ins_h=(t.ins_h<<t.hash_shift^t.window[u+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[u+N-1])&t.hash_mask,t.prev[u&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=u,u++,t.insert--,!(t.lookahead+t.insert<N)););}while(t.lookahead<D&&0!==t.strm.avail_in)}function st(t,e){for(var n,i;;){if(t.lookahead<D){if(ot(t),t.lookahead<D&&e===l)return V;if(0===t.lookahead)break}if(n=0,t.lookahead>=N&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+N-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==n&&t.strstart-n<=t.w_size-D&&(t.match_length=rt(t,n)),t.match_length>=N)if(i=o._tr_tally(t,t.strstart-t.match_start,t.match_length-N),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=N){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+N-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else i=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(et(t,!1),0===t.strm.avail_out))return V}return t.insert=t.strstart<N-1?t.strstart:N-1,e===p?(et(t,!0),0===t.strm.avail_out?Z:Q):t.last_lit&&(et(t,!1),0===t.strm.avail_out)?V:H}function at(t,e){for(var n,i,r;;){if(t.lookahead<D){if(ot(t),t.lookahead<D&&e===l)return V;if(0===t.lookahead)break}if(n=0,t.lookahead>=N&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+N-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=N-1,0!==n&&t.prev_length<t.max_lazy_match&&t.strstart-n<=t.w_size-D&&(t.match_length=rt(t,n),t.match_length<=5&&(t.strategy===b||t.match_length===N&&t.strstart-t.match_start>4096)&&(t.match_length=N-1)),t.prev_length>=N&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-N,i=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-N),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+N-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=N-1,t.strstart++,i&&(et(t,!1),0===t.strm.avail_out))return V}else if(t.match_available){if((i=o._tr_tally(t,0,t.window[t.strstart-1]))&&et(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return V}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=o._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<N-1?t.strstart:N-1,e===p?(et(t,!0),0===t.strm.avail_out?Z:Q):t.last_lit&&(et(t,!1),0===t.strm.avail_out)?V:H}function ut(t,e,n,i,r){this.good_length=t,this.max_lazy=e,this.nice_length=n,this.max_chain=i,this.func=r}function lt(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=x,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?I:W,t.adler=2===e.wrap?0:1,e.last_flush=l,o._tr_init(e),d):X(t,m)}function ct(t){var e,n=lt(t);return n===d&&((e=t.state).window_size=2*e.w_size,J(e.head),e.max_lazy_match=i[e.level].max_lazy,e.good_match=i[e.level].good_length,e.nice_match=i[e.level].nice_length,e.max_chain_length=i[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=N-1,e.match_available=0,e.ins_h=0),n}function ht(t,e,n,i,o,s){if(!t)return m;var a=1;if(e===g&&(e=6),i<0?(a=0,i=-i):i>15&&(a=2,i-=16),o<1||o>P||n!==O||i<8||i>15||e<0||e>9||s<0||s>S)return X(t,m);8===i&&(i=9);var u=new function(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=O,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new r.Buf16(2*j),this.dyn_dtree=new r.Buf16(2*(2*M+1)),this.bl_tree=new r.Buf16(2*(2*R+1)),J(this.dyn_ltree),J(this.dyn_dtree),J(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new r.Buf16(F+1),this.heap=new r.Buf16(2*C+1),J(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new r.Buf16(2*C+1),J(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0};return t.state=u,u.strm=t,u.wrap=a,u.gzhead=null,u.w_bits=i,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=o+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+N-1)/N),u.window=new r.Buf8(2*u.w_size),u.head=new r.Buf16(u.hash_size),u.prev=new r.Buf16(u.w_size),u.lit_bufsize=1<<o+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new r.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=e,u.strategy=s,u.method=n,ct(t)}i=[new ut(0,0,0,0,function(t,e){var n=65535;for(n>t.pending_buf_size-5&&(n=t.pending_buf_size-5);;){if(t.lookahead<=1){if(ot(t),0===t.lookahead&&e===l)return V;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+n;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,et(t,!1),0===t.strm.avail_out))return V;if(t.strstart-t.block_start>=t.w_size-D&&(et(t,!1),0===t.strm.avail_out))return V}return t.insert=0,e===p?(et(t,!0),0===t.strm.avail_out?Z:Q):(t.strstart>t.block_start&&(et(t,!1),t.strm.avail_out),V)}),new ut(4,4,8,4,st),new ut(4,5,16,8,st),new ut(4,6,32,32,st),new ut(4,4,16,16,at),new ut(8,16,32,32,at),new ut(8,16,128,128,at),new ut(8,32,128,256,at),new ut(32,128,258,1024,at),new ut(32,258,258,4096,at)],e.deflateInit=function(t,e){return ht(t,e,O,A,E,T)},e.deflateInit2=ht,e.deflateReset=ct,e.deflateResetKeep=lt,e.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?m:(t.state.gzhead=e,d):m},e.deflate=function(t,e){var n,r,s,u;if(!t||!t.state||e>f||e<0)return t?X(t,m):m;if(r=t.state,!t.output||!t.input&&0!==t.avail_in||r.status===G&&e!==p)return X(t,0===t.avail_out?v:m);if(r.strm=t,n=r.last_flush,r.last_flush=e,r.status===I)if(2===r.wrap)t.adler=0,nt(r,31),nt(r,139),nt(r,8),r.gzhead?(nt(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),nt(r,255&r.gzhead.time),nt(r,r.gzhead.time>>8&255),nt(r,r.gzhead.time>>16&255),nt(r,r.gzhead.time>>24&255),nt(r,9===r.level?2:r.strategy>=w||r.level<2?4:0),nt(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(nt(r,255&r.gzhead.extra.length),nt(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=a(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=B):(nt(r,0),nt(r,0),nt(r,0),nt(r,0),nt(r,0),nt(r,9===r.level?2:r.strategy>=w||r.level<2?4:0),nt(r,K),r.status=W);else{var _=O+(r.w_bits-8<<4)<<8;_|=(r.strategy>=w||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(_|=q),_+=31-_%31,r.status=W,it(r,_),0!==r.strstart&&(it(r,t.adler>>>16),it(r,65535&t.adler)),t.adler=1}if(r.status===B)if(r.gzhead.extra){for(s=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>s&&(t.adler=a(t.adler,r.pending_buf,r.pending-s,s)),tt(t),s=r.pending,r.pending!==r.pending_buf_size));)nt(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>s&&(t.adler=a(t.adler,r.pending_buf,r.pending-s,s)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=U)}else r.status=U;if(r.status===U)if(r.gzhead.name){s=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>s&&(t.adler=a(t.adler,r.pending_buf,r.pending-s,s)),tt(t),s=r.pending,r.pending===r.pending_buf_size)){u=1;break}u=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,nt(r,u)}while(0!==u);r.gzhead.hcrc&&r.pending>s&&(t.adler=a(t.adler,r.pending_buf,r.pending-s,s)),0===u&&(r.gzindex=0,r.status=z)}else r.status=z;if(r.status===z)if(r.gzhead.comment){s=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>s&&(t.adler=a(t.adler,r.pending_buf,r.pending-s,s)),tt(t),s=r.pending,r.pending===r.pending_buf_size)){u=1;break}u=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,nt(r,u)}while(0!==u);r.gzhead.hcrc&&r.pending>s&&(t.adler=a(t.adler,r.pending_buf,r.pending-s,s)),0===u&&(r.status=Y)}else r.status=Y;if(r.status===Y&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&tt(t),r.pending+2<=r.pending_buf_size&&(nt(r,255&t.adler),nt(r,t.adler>>8&255),t.adler=0,r.status=W)):r.status=W),0!==r.pending){if(tt(t),0===t.avail_out)return r.last_flush=-1,d}else if(0===t.avail_in&&$(e)<=$(n)&&e!==p)return X(t,v);if(r.status===G&&0!==t.avail_in)return X(t,v);if(0!==t.avail_in||0!==r.lookahead||e!==l&&r.status!==G){var g=r.strategy===w?function(t,e){for(var n;;){if(0===t.lookahead&&(ot(t),0===t.lookahead)){if(e===l)return V;break}if(t.match_length=0,n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(et(t,!1),0===t.strm.avail_out))return V}return t.insert=0,e===p?(et(t,!0),0===t.strm.avail_out?Z:Q):t.last_lit&&(et(t,!1),0===t.strm.avail_out)?V:H}(r,e):r.strategy===k?function(t,e){for(var n,i,r,s,a=t.window;;){if(t.lookahead<=L){if(ot(t),t.lookahead<=L&&e===l)return V;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=N&&t.strstart>0&&(i=a[r=t.strstart-1])===a[++r]&&i===a[++r]&&i===a[++r]){s=t.strstart+L;do{}while(i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&r<s);t.match_length=L-(s-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=N?(n=o._tr_tally(t,1,t.match_length-N),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(et(t,!1),0===t.strm.avail_out))return V}return t.insert=0,e===p?(et(t,!0),0===t.strm.avail_out?Z:Q):t.last_lit&&(et(t,!1),0===t.strm.avail_out)?V:H}(r,e):i[r.level].func(r,e);if(g!==Z&&g!==Q||(r.status=G),g===V||g===Z)return 0===t.avail_out&&(r.last_flush=-1),d;if(g===H&&(e===c?o._tr_align(r):e!==f&&(o._tr_stored_block(r,0,0,!1),e===h&&(J(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),tt(t),0===t.avail_out))return r.last_flush=-1,d}return e!==p?d:r.wrap<=0?y:(2===r.wrap?(nt(r,255&t.adler),nt(r,t.adler>>8&255),nt(r,t.adler>>16&255),nt(r,t.adler>>24&255),nt(r,255&t.total_in),nt(r,t.total_in>>8&255),nt(r,t.total_in>>16&255),nt(r,t.total_in>>24&255)):(it(r,t.adler>>>16),it(r,65535&t.adler)),tt(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?d:y)},e.deflateEnd=function(t){var e;return t&&t.state?(e=t.state.status)!==I&&e!==B&&e!==U&&e!==z&&e!==Y&&e!==W&&e!==G?X(t,m):(t.state=null,e===W?X(t,_):d):m},e.deflateSetDictionary=function(t,e){var n,i,o,a,u,l,c,h,p=e.length;if(!t||!t.state)return m;if(2===(a=(n=t.state).wrap)||1===a&&n.status!==I||n.lookahead)return m;for(1===a&&(t.adler=s(t.adler,e,p,0)),n.wrap=0,p>=n.w_size&&(0===a&&(J(n.head),n.strstart=0,n.block_start=0,n.insert=0),h=new r.Buf8(n.w_size),r.arraySet(h,e,p-n.w_size,n.w_size,0),e=h,p=n.w_size),u=t.avail_in,l=t.next_in,c=t.input,t.avail_in=p,t.next_in=0,t.input=e,ot(n);n.lookahead>=N;){i=n.strstart,o=n.lookahead-(N-1);do{n.ins_h=(n.ins_h<<n.hash_shift^n.window[i+N-1])&n.hash_mask,n.prev[i&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=i,i++}while(--o);n.strstart=i,n.lookahead=N-1,ot(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=N-1,n.match_available=0,t.next_in=l,t.input=c,t.avail_in=u,n.wrap=a,d},e.deflateInfo="pako deflate (from Nodeca project)"},function(t,e,n){"use strict";var i=n(178),r=n(22),o=n(95),s=n(65),a=n(94),u=Object.prototype.toString,l=0,c=-1,h=0,p=8;function f(t){if(!(this instanceof f))return new f(t);this.options=r.assign({level:c,method:p,chunkSize:16384,windowBits:15,memLevel:8,strategy:h,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var n=i.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(n!==l)throw new Error(s[n]);if(e.header&&i.deflateSetHeader(this.strm,e.header),e.dictionary){var d;if(d="string"==typeof e.dictionary?o.string2buf(e.dictionary):"[object ArrayBuffer]"===u.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,(n=i.deflateSetDictionary(this.strm,d))!==l)throw new Error(s[n]);this._dict_set=!0}}function d(t,e){var n=new f(e);if(n.push(t,!0),n.err)throw n.msg||s[n.err];return n.result}f.prototype.push=function(t,e){var n,s,a=this.strm,c=this.options.chunkSize;if(this.ended)return!1;s=e===~~e?e:!0===e?4:0,"string"==typeof t?a.input=o.string2buf(t):"[object ArrayBuffer]"===u.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new r.Buf8(c),a.next_out=0,a.avail_out=c),1!==(n=i.deflate(a,s))&&n!==l)return this.onEnd(n),this.ended=!0,!1;0!==a.avail_out&&(0!==a.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(o.buf2binstring(r.shrinkBuf(a.output,a.next_out))):this.onData(r.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||0===a.avail_out)&&1!==n);return 4===s?(n=i.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===l):2!==s||(this.onEnd(l),a.avail_out=0,!0)},f.prototype.onData=function(t){this.chunks.push(t)},f.prototype.onEnd=function(t){t===l&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Deflate=f,e.deflate=d,e.deflateRaw=function(t,e){return(e=e||{}).raw=!0,d(t,e)},e.gzip=function(t,e){return(e=e||{}).gzip=!0,d(t,e)}},function(t,e,n){"use strict";var i={};(0,n(22).assign)(i,n(179),n(176),n(93)),t.exports=i},function(t,e,n){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,r=n(180),o=n(9),s=n(15),a=i?"uint8array":"array";function u(t,e){s.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}e.magic="\b\0",o.inherits(u,s),u.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(a,t.data),!1)},u.prototype.flush=function(){s.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new r[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},e.compressWorker=function(t){return new u("Deflate",t)},e.uncompressWorker=function(){return new u("Inflate",{})}},function(t,e,n){"use strict";var i=n(98),r=n(171);e.generateWorker=function(t,e,n){var o=new r(e.streamFiles,n,e.platform,e.encodeFileName),s=0;try{t.forEach(function(t,n){s++;var r=function(t,e){var n=t||e,r=i[n];if(!r)throw new Error(n+" is not a valid compression method !");return r}(n.options.compression,e.compression),a=n.options.compressionOptions||e.compressionOptions||{},u=n.dir,l=n.date;n._compressWorker(r,a).withStreamInfo("file",{name:t,dir:u,date:l,comment:n.comment||"",unixPermissions:n.unixPermissions,dosPermissions:n.dosPermissions}).pipe(o)}),o.entriesCount=s}catch(t){o.error(t)}return o}},function(t,e,n){"use strict";var i=n(103),r=n(101),o=n(28),s=n(67),a=n(15),u=function(t,e,n){this.name=t,this.dir=n.dir,this.date=n.date,this.comment=n.comment,this.unixPermissions=n.unixPermissions,this.dosPermissions=n.dosPermissions,this._data=e,this._dataBinary=n.binary,this.options={compression:n.compression,compressionOptions:n.compressionOptions}};u.prototype={internalStream:function(t){var e=null,n="string";try{if(!t)throw new Error("No output type specified.");var r="string"===(n=t.toLowerCase())||"text"===n;"binarystring"!==n&&"text"!==n||(n="string"),e=this._decompressWorker();var s=!this._dataBinary;s&&!r&&(e=e.pipe(new o.Utf8EncodeWorker)),!s&&r&&(e=e.pipe(new o.Utf8DecodeWorker))}catch(t){(e=new a("error")).error(t)}return new i(e,n,"")},async:function(t,e){return this.internalStream(t).accumulate(e)},nodeStream:function(t,e){return this.internalStream(t||"nodebuffer").toNodejsStream(e)},_compressWorker:function(t,e){if(this._data instanceof s&&this._data.compression.magic===t.magic)return this._data.getCompressedWorker();var n=this._decompressWorker();return this._dataBinary||(n=n.pipe(new o.Utf8EncodeWorker)),s.createWorkerFrom(n,t,e)},_decompressWorker:function(){return this._data instanceof s?this._data.getContentWorker():this._data instanceof a?this._data:new r(this._data)}};for(var l=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],c=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},h=0;h<l.length;h++)u.prototype[l[h]]=c;t.exports=u},function(t,e,n){"use strict";var i=n(114).Readable;function r(t,e,n){i.call(this,e),this._helper=t;var r=this;t.on("data",function(t,e){r.push(t)||r._helper.pause(),n&&n(e)}).on("error",function(t){r.emit("error",t)}).on("end",function(){r.push(null)})}n(9).inherits(r,i),r.prototype._read=function(){this._helper.resume()},t.exports=r},function(t,e,n){"use strict";var i=n(15),r=n(9);function o(t){i.call(this,"ConvertWorker to "+t),this.destType=t}r.inherits(o,i),o.prototype.processChunk=function(t){this.push({data:r.transformTo(this.destType,t.data),meta:t.meta})},t.exports=o},function(t,e,n){"use strict";(function(e){var n,i,r=e.MutationObserver||e.WebKitMutationObserver;if(r){var o=0,s=new r(c),a=e.document.createTextNode("");s.observe(a,{characterData:!0}),n=function(){a.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)n="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){c(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(c,0)};else{var u=new e.MessageChannel;u.port1.onmessage=c,n=function(){u.port2.postMessage(0)}}var l=[];function c(){var t,e;i=!0;for(var n=l.length;n;){for(e=l,l=[],t=-1;++t<n;)e[t]();n=l.length}i=!1}t.exports=function(t){1!==l.push(t)||i||n()}}).call(this,n(21))},function(t,e,n){"use strict";var i=n(186);function r(){}var o={},s=["REJECTED"],a=["FULFILLED"],u=["PENDING"];function l(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,t!==r&&f(this,t)}function c(t,e,n){this.promise=t,"function"==typeof e&&(this.onFulfilled=e,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function h(t,e,n){i(function(){var i;try{i=e(n)}catch(e){return o.reject(t,e)}i===t?o.reject(t,new TypeError("Cannot resolve promise with itself")):o.resolve(t,i)})}function p(t){var e=t&&t.then;if(t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof e)return function(){e.apply(t,arguments)}}function f(t,e){var n=!1;function i(e){n||(n=!0,o.reject(t,e))}function r(e){n||(n=!0,o.resolve(t,e))}var s=d(function(){e(r,i)});"error"===s.status&&i(s.value)}function d(t,e){var n={};try{n.value=t(e),n.status="success"}catch(t){n.status="error",n.value=t}return n}t.exports=l,l.prototype.catch=function(t){return this.then(null,t)},l.prototype.then=function(t,e){if("function"!=typeof t&&this.state===a||"function"!=typeof e&&this.state===s)return this;var n=new this.constructor(r);this.state!==u?h(n,this.state===a?t:e,this.outcome):this.queue.push(new c(n,t,e));return n},c.prototype.callFulfilled=function(t){o.resolve(this.promise,t)},c.prototype.otherCallFulfilled=function(t){h(this.promise,this.onFulfilled,t)},c.prototype.callRejected=function(t){o.reject(this.promise,t)},c.prototype.otherCallRejected=function(t){h(this.promise,this.onRejected,t)},o.resolve=function(t,e){var n=d(p,e);if("error"===n.status)return o.reject(t,n.value);var i=n.value;if(i)f(t,i);else{t.state=a,t.outcome=e;for(var r=-1,s=t.queue.length;++r<s;)t.queue[r].callFulfilled(e)}return t},o.reject=function(t,e){t.state=s,t.outcome=e;for(var n=-1,i=t.queue.length;++n<i;)t.queue[n].callRejected(e);return t},l.resolve=function(t){if(t instanceof this)return t;return o.resolve(new this(r),t)},l.reject=function(t){var e=new this(r);return o.reject(e,t)},l.all=function(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var n=t.length,i=!1;if(!n)return this.resolve([]);var s=new Array(n),a=0,u=-1,l=new this(r);for(;++u<n;)c(t[u],u);return l;function c(t,r){e.resolve(t).then(function(t){s[r]=t,++a!==n||i||(i=!0,o.resolve(l,s))},function(t){i||(i=!0,o.reject(l,t))})}},l.race=function(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var n=t.length,i=!1;if(!n)return this.resolve([]);var s=-1,a=new this(r);for(;++s<n;)u=t[s],e.resolve(u).then(function(t){i||(i=!0,o.resolve(a,t))},function(t){i||(i=!0,o.reject(a,t))});var u;return a}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){t.exports=n(53).document&&document.documentElement},function(t,e){t.exports=function(t,e,n){var i=void 0===n;switch(e.length){case 0:return i?t():t.call(n);case 1:return i?t(e[0]):t.call(n,e[0]);case 2:return i?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return i?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return i?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var i,r,o,s=n(106),a=n(190),u=n(189),l=n(104),c=n(53),h=c.process,p=c.setImmediate,f=c.clearImmediate,d=c.MessageChannel,y=0,m={},_=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},v=function(t){_.call(t.data)};p&&f||(p=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return m[++y]=function(){a("function"==typeof t?t:Function(t),e)},i(y),y},f=function(t){delete m[t]},"process"==n(188)(h)?i=function(t){h.nextTick(s(_,t,1))}:d?(o=(r=new d).port2,r.port1.onmessage=v,i=s(o.postMessage,o,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(i=function(t){c.postMessage(t+"","*")},c.addEventListener("message",v,!1)):i="onreadystatechange"in l("script")?function(t){u.appendChild(l("script")).onreadystatechange=function(){u.removeChild(this),_.call(t)}}:function(t){setTimeout(s(_,t,1),0)}),t.exports={set:p,clear:f}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var i=n(69);t.exports=function(t,e){if(!i(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){t.exports=!n(68)&&!n(105)(function(){return 7!=Object.defineProperty(n(104)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var i=n(69);t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var i=n(195),r=n(194),o=n(193),s=Object.defineProperty;e.f=n(68)?Object.defineProperty:function(t,e,n){if(i(t),e=o(e,!0),i(n),r)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var i=n(196),r=n(192);t.exports=n(68)?function(t,e,n){return i.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var i=n(53),r=n(107),o=n(106),s=n(197),a=function(t,e,n){var u,l,c,h=t&a.F,p=t&a.G,f=t&a.S,d=t&a.P,y=t&a.B,m=t&a.W,_=p?r:r[e]||(r[e]={}),v=_.prototype,g=p?i:f?i[e]:(i[e]||{}).prototype;for(u in p&&(n=e),n)(l=!h&&g&&void 0!==g[u])&&u in _||(c=l?g[u]:n[u],_[u]=p&&"function"!=typeof g[u]?n[u]:y&&l?o(c,i):m&&g[u]==c?function(t){var e=function(e,n,i){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(c):d&&"function"==typeof c?o(Function.call,c):c,d&&((_.virtual||(_.virtual={}))[u]=c,t&a.R&&v&&!v[u]&&s(v,u,c)))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,e,n){var i=n(199),r=n(191);i(i.G+i.B,{setImmediate:r.set,clearImmediate:r.clear})},function(t,e,n){n(200),t.exports=n(107).setImmediate},function(t,e,n){t.exports=n(71).PassThrough},function(t,e,n){t.exports=n(71).Transform},function(t,e,n){t.exports=n(25)},function(t,e,n){t.exports=n(70)},function(t,e,n){"use strict";t.exports=o;var i=n(109),r=n(36);function o(t){if(!(this instanceof o))return new o(t);i.call(this,t)}r.inherits=n(27),r.inherits(o,i),o.prototype._transform=function(t,e,n){n(null,t)}},function(t,e,n){(function(e){function n(t){try{if(!e.localStorage)return!1}catch(t){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var i=!1;return function(){if(!i){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),i=!0}return t.apply(this,arguments)}}}).call(this,n(21))},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var i,r,o,s,a,u=1,l={},c=!1,h=t.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(t);p=p&&p.setTimeout?p:t,"[object process]"==={}.toString.call(t.process)?i=function(t){e.nextTick(function(){d(t)})}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){d(t.data)},i=function(t){o.port2.postMessage(t)}):h&&"onreadystatechange"in h.createElement("script")?(r=h.documentElement,i=function(t){var e=h.createElement("script");e.onreadystatechange=function(){d(t),e.onreadystatechange=null,r.removeChild(e),e=null},r.appendChild(e)}):i=function(t){setTimeout(d,0,t)}:(s="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(s)&&d(+e.data.slice(s.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),i=function(e){t.postMessage(s+e,"*")}),p.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var r={callback:t,args:e};return l[u]=r,i(u),u++},p.clearImmediate=f}function f(t){delete l[t]}function d(t){if(c)setTimeout(d,0,t);else{var e=l[t];if(e){c=!0;try{!function(t){var e=t.callback,i=t.args;switch(i.length){case 0:e();break;case 1:e(i[0]);break;case 2:e(i[0],i[1]);break;case 3:e(i[0],i[1],i[2]);break;default:e.apply(n,i)}}(e)}finally{f(t),c=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n(21),n(51))},function(t,e,n){(function(t){var i=void 0!==t&&t||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(r.call(setTimeout,i,arguments),clearTimeout)},e.setInterval=function(){return new o(r.call(setInterval,i,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(i,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(208),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(21))},function(t,e){},function(t,e,n){"use strict";var i=n(55).Buffer,r=n(210);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n},t.prototype.concat=function(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var e,n,r,o=i.allocUnsafe(t>>>0),s=this.head,a=0;s;)e=s.data,n=o,r=a,e.copy(n,r),a+=s.data.length,s=s.next;return o},t}(),r&&r.inspect&&r.inspect.custom&&(t.exports.prototype[r.inspect.custom]=function(){var t=r.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,n){t.exports=r;var i=n(72).EventEmitter;function r(){i.call(this)}n(27)(r,i),r.Readable=n(71),r.Writable=n(205),r.Duplex=n(204),r.Transform=n(203),r.PassThrough=n(202),r.Stream=r,r.prototype.pipe=function(t,e){var n=this;function r(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",r),t.on("drain",o),t._isStdio||e&&!1===e.end||(n.on("end",a),n.on("close",u));var s=!1;function a(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function l(t){if(c(),0===i.listenerCount(this,"error"))throw t}function c(){n.removeListener("data",r),t.removeListener("drain",o),n.removeListener("end",a),n.removeListener("close",u),n.removeListener("error",l),t.removeListener("error",l),n.removeListener("end",c),n.removeListener("close",c),t.removeListener("close",c)}return n.on("error",l),t.on("error",l),n.on("end",c),n.on("close",c),t.on("close",c),t.emit("pipe",n),t}},function(t,e){e.read=function(t,e,n,i,r){var o,s,a=8*r-i-1,u=(1<<a)-1,l=u>>1,c=-7,h=n?r-1:0,p=n?-1:1,f=t[e+h];for(h+=p,o=f&(1<<-c)-1,f>>=-c,c+=a;c>0;o=256*o+t[e+h],h+=p,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=i;c>0;s=256*s+t[e+h],h+=p,c-=8);if(0===o)o=1-l;else{if(o===u)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,i),o-=l}return(f?-1:1)*s*Math.pow(2,o-i)},e.write=function(t,e,n,i,r,o){var s,a,u,l=8*o-r-1,c=(1<<l)-1,h=c>>1,p=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,d=i?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?p/u:p*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(e*u-1)*Math.pow(2,r),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,r),s=0));r>=8;t[n+f]=255&a,f+=d,a/=256,r-=8);for(s=s<<r|a,l+=r;l>0;t[n+f]=255&s,f+=d,s/=256,l-=8);t[n+f-d]|=128*y}},function(t,e,n){"use strict";e.byteLength=function(t){var e=l(t),n=e[0],i=e[1];return 3*(n+i)/4-i},e.toByteArray=function(t){for(var e,n=l(t),i=n[0],s=n[1],a=new o(function(t,e,n){return 3*(e+n)/4-n}(0,i,s)),u=0,c=s>0?i-4:i,h=0;h<c;h+=4)e=r[t.charCodeAt(h)]<<18|r[t.charCodeAt(h+1)]<<12|r[t.charCodeAt(h+2)]<<6|r[t.charCodeAt(h+3)],a[u++]=e>>16&255,a[u++]=e>>8&255,a[u++]=255&e;2===s&&(e=r[t.charCodeAt(h)]<<2|r[t.charCodeAt(h+1)]>>4,a[u++]=255&e);1===s&&(e=r[t.charCodeAt(h)]<<10|r[t.charCodeAt(h+1)]<<4|r[t.charCodeAt(h+2)]>>2,a[u++]=e>>8&255,a[u++]=255&e);return a},e.fromByteArray=function(t){for(var e,n=t.length,r=n%3,o=[],s=0,a=n-r;s<a;s+=16383)o.push(c(t,s,s+16383>a?a:s+16383));1===r?(e=t[n-1],o.push(i[e>>2]+i[e<<4&63]+"==")):2===r&&(e=(t[n-2]<<8)+t[n-1],o.push(i[e>>10]+i[e>>4&63]+i[e<<2&63]+"="));return o.join("")};for(var i=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)i[a]=s[a],r[s.charCodeAt(a)]=a;function l(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function c(t,e,n){for(var r,o,s=[],a=e;a<n;a+=3)r=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(i[(o=r)>>18&63]+i[o>>12&63]+i[o>>6&63]+i[63&o]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},function(t,e,n){"use strict";var i=n(28),r=n(9),o=n(15),s=n(103),a=n(102),u=n(67),l=n(183),c=n(182),h=n(54),p=n(170),f=function(t,e,n){var i,s=r.getTypeOf(e),c=r.extend(n||{},a);c.date=c.date||new Date,null!==c.compression&&(c.compression=c.compression.toUpperCase()),"string"==typeof c.unixPermissions&&(c.unixPermissions=parseInt(c.unixPermissions,8)),c.unixPermissions&&16384&c.unixPermissions&&(c.dir=!0),c.dosPermissions&&16&c.dosPermissions&&(c.dir=!0),c.dir&&(t=y(t)),c.createFolders&&(i=d(t))&&m.call(this,i,!0);var f="string"===s&&!1===c.binary&&!1===c.base64;n&&void 0!==n.binary||(c.binary=!f),(e instanceof u&&0===e.uncompressedSize||c.dir||!e||0===e.length)&&(c.base64=!1,c.binary=!0,e="",c.compression="STORE",s="string");var _=null;_=e instanceof u||e instanceof o?e:h.isNode&&h.isStream(e)?new p(t,e):r.prepareContent(t,e,c.binary,c.optimizedBinaryString,c.base64);var v=new l(t,_,c);this.files[t]=v},d=function(t){"/"===t.slice(-1)&&(t=t.substring(0,t.length-1));var e=t.lastIndexOf("/");return e>0?t.substring(0,e):""},y=function(t){return"/"!==t.slice(-1)&&(t+="/"),t},m=function(t,e){return e=void 0!==e?e:a.createFolders,t=y(t),this.files[t]||f.call(this,t,null,{dir:!0,createFolders:e}),this.files[t]};function _(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var v={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(t){var e,n,i;for(e in this.files)this.files.hasOwnProperty(e)&&(i=this.files[e],(n=e.slice(this.root.length,e.length))&&e.slice(0,this.root.length)===this.root&&t(n,i))},filter:function(t){var e=[];return this.forEach(function(n,i){t(n,i)&&e.push(i)}),e},file:function(t,e,n){if(1===arguments.length){if(_(t)){var i=t;return this.filter(function(t,e){return!e.dir&&i.test(t)})}var r=this.files[this.root+t];return r&&!r.dir?r:null}return t=this.root+t,f.call(this,t,e,n),this},folder:function(t){if(!t)return this;if(_(t))return this.filter(function(e,n){return n.dir&&t.test(e)});var e=this.root+t,n=m.call(this,e),i=this.clone();return i.root=n.name,i},remove:function(t){t=this.root+t;var e=this.files[t];if(e||("/"!==t.slice(-1)&&(t+="/"),e=this.files[t]),e&&!e.dir)delete this.files[t];else for(var n=this.filter(function(e,n){return n.name.slice(0,t.length)===t}),i=0;i<n.length;i++)delete this.files[n[i].name];return this},generate:function(t){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(t){var e,n={};try{if((n=r.extend(t||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=n.type.toLowerCase(),n.compression=n.compression.toUpperCase(),"binarystring"===n.type&&(n.type="string"),!n.type)throw new Error("No output type specified.");r.checkSupport(n.type),"darwin"!==n.platform&&"freebsd"!==n.platform&&"linux"!==n.platform&&"sunos"!==n.platform||(n.platform="UNIX"),"win32"===n.platform&&(n.platform="DOS");var a=n.comment||this.comment||"";e=c.generateWorker(this,n,a)}catch(t){(e=new o("error")).error(t)}return new s(e,n.type||"string",n.mimeType)},generateAsync:function(t,e){return this.generateInternalStream(t).accumulate(e)},generateNodeStream:function(t,e){return(t=t||{}).type||(t.type="nodebuffer"),this.generateInternalStream(t).toNodejsStream(e)}};t.exports=v},function(t,e,n){"use strict";function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var t=new i;for(var e in this)"function"!=typeof this[e]&&(t[e]=this[e]);return t}}i.prototype=n(216),i.prototype.loadAsync=n(169),i.support=n(23),i.defaults=n(102),i.version="3.1.5",i.loadAsync=function(t,e){return(new i).loadAsync(t,e)},i.external=n(35),t.exports=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buildZip=e.renderFrames=e.loadPCM=e.loadBuffer=e.spectrum=e.FRAME_STEP=e.FRAME_LENGTH=void 0;var i=l(n(6)),r=l(n(48)),o=l(n(217)),s=n(164),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(128)),u=(l(n(127)),l(n(126)));n(163);function l(t){return t&&t.__esModule?t:{default:t}}var c=e.FRAME_LENGTH=32130,h=e.FRAME_STEP=Math.round(c/4),p=8,f=8;e.spectrum=u.default;var d=e.loadBuffer=function(t){return new Promise(function(e,n){var i=URL.createObjectURL(t),o=new r.default.Buffer(i,function(){URL.revokeObjectURL(i),e(o)},function(t){console.error("err",t),n(t)})})},y=e.loadPCM=function(t){return new Promise(function(e,n){if(t.pcm)return e(t);d(t).then(function(i){var r=i._buffer.getChannelData(0),o=i._buffer.sampleRate;if(!r)return n();console.log(r.length,o),e({file:t,buffer:i,pcm:r,sr:o})})})};e.renderFrames=function(t,e){var n=e.frame_step,r=void 0===n?h:n,o=e.frame_start,s=void 0===o?0:o,a=e.max,u=void 0===a?12:a;return function(e){return new Promise(function(n,o){y(t).then(function(t){t.file,t.buffer;var o=t.pcm,a=t.sr;e({type:i.default.wav2pix.load});for(var l=[],h=0,p=o.length-c,f=Math.round(p*s);f<p&&h<u;f+=r,h+=1)l.push(m(o.slice(f,f+c),a,h));e({type:i.default.wav2pix.finish,message:"Rendered "+h+" images"}),n({pcm:t,frames:l})})})}},e.buildZip=function(t,e,n){var r=n.frame_step,s=void 0===r?h:r,a=n.frame_start,u=void 0===a?0:a,l=n.max,p=void 0===l?1e4:l;return function(n){return new Promise(function(r,a){y(e).then(function(e){e.buffer;var a=e.pcm,l=e.sr;n({type:i.default.wav2pix.load});var h=new o.default,f=h.folder("wav2pix_"+t),d=(a.length-c)/s;console.log(d);for(var y=0,_=a.length-c,v=Math.round(_*u);v<_&&y<p;v+=s,y+=1)y%10==0&&n({type:i.default.wav2pix.progress,progress:{i:y/p*6,n:6}}),m(a.slice(v,v+c),l,y,f);n({type:i.default.wav2pix.finish,message:"Rendered "+y+" images"}),h.generateAsync({type:"blob"}).then(function(e){n({type:i.default.wav2pix.zip,size:e.size}),r({zip:e,filename:"wav2pix_"+t+".zip",count:y})})})})}};function m(t,e,n,i){var r=u.default.toSpectrum(t,e),o=a.raw_spectrum(r,0,256,0,256,p,f),l=o.canvas,c=o.imageData;if(i){var h=(0,s.sprintf)("frame_%05d.png",n),d=l.toDataURL("image/png");i.file(h,d.split(",")[1],{base64:!0})}return{fft:r,canvas:l,imageData:c}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(1),s=n(2),a=n(3),u=_(n(33)),l=_(n(5)),c=m(n(74)),h=m(n(73)),p=n(13),f=m(n(59)),d=m(n(218)),y=m(n(129));_(n(57));function m(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function _(t){return t&&t.__esModule?t:{default:t}}var v=function(){return(0,u.default)().format("_YYYYMMDD_HHmm")},g=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));n.state={file:null,pcm:null,name:"",datasetName:"",frames:[],frame_start:0,max:1e3,preview_count:32,frame_step:d.FRAME_STEP};var i=document.createElement("audio");return i.addEventListener("loadedmetadata",function(){var t=i.duration,e=Math.floor((44100*t-d.FRAME_LENGTH)/n.state.frame_step);n.setState({duration:t,max:Math.min(n.state.max,e,1e3)})}),n.audioElement=i,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.Component),r(e,[{key:"pickFile",value:function(t){var e=this,n=t.name.split(".")[0].replace(/\s+/g,"_").replace(/-/g,"_").replace(/_+/g,"_");this.setState({file:t,name:n+v(),datasetName:n,pcm:""},function(){e.rebuildFrames()}),this.audioElement.src=URL.createObjectURL(t)}},{key:"rebuildFrames",value:function(){var t=this,e=this.state,n=e.file,r=e.pcm,o=e.frame_step,s=e.frame_start,a=e.preview_count;this.props.wav2pix.renderFrames(r||n,{frame_start:s,frame_step:o,max:a}).then(function(e){console.log("got frames",e.frames.length),t.setState(i({},t.state,{frames:e.frames,pcm:e.pcm}))})}},{key:"buildZip",value:function(){var t=this,e=this.state,n=e.pcm,i=e.file,r=e.max,o=e.frame_step,s=e.frame_start;this.props.wav2pix.buildZip(this.state.name,n||i,{frame_start:s,frame_step:o,max:r}).then(function(e){var n=e.zip,i=e.filename,s=e.count;t.props.datasetActions.uploadFile(t.props.module,t.props.folder,n,i,{count:s,max:r,frame_step:o,frame_size:d.FRAME_LENGTH/44100})})}},{key:"playFrame",value:function(t){var e=this;return function(){var n=e.state.frames[t];y.play(n)}}},{key:"render",value:function(){for(var t=this,e=this.state,n=e.file,i=(e.frames,[]),r=0,s=e.preview_count;r<s;r++)i.push((0,o.h)("canvas",{key:r,onClick:this.playFrame(r)}));return(0,o.h)("div",{className:"row"},(0,o.h)("div",{className:"col spectrogramBuilder"},(0,o.h)(p.Group,{title:"Spectrogram Builder"},(0,o.h)("p",null,"Convert your sounds into spectrograms. ","Sound files can be WAV, MP3, AIFF, or FLAC. "),(0,o.h)(p.FileUpload,{title:"Choose a sound file",accept:"audio/*",onUpload:function(e){return t.pickFile(e)}}),n&&this.renderMetadata(n))),(0,o.h)("div",{ref:function(e){t.canvases=e},className:"thumbs",id:"pix2wav_canvases"},i))}},{key:"renderMetadata",value:function(t){var e=this,n=this.state,i=n.duration,r=(n.preview_count,l.default.hush_size(t.size)),s=Math.floor((44100*i-d.FRAME_LENGTH)/this.state.frame_step),a=Math.round(d.FRAME_LENGTH/44100*1e3)+" ms.",c=Math.round(this.state.frame_step/44100*1e3)+" ms.";return(0,o.h)("div",{className:"fileMetadata"},(0,o.h)(p.Group,{title:"Metadata"},(0,o.h)(p.Param,{title:"Name"},t.name),(0,o.h)(p.Param,{title:"Type"},t.type),(0,o.h)(p.Param,{title:"Size"},(0,o.h)("span",{className:r[0]},r[1])),(0,o.h)(p.Param,{title:"Date"},(0,u.default)(t.lastModifiedDate).format("YYYY-MM-DD h:mm a")),(0,o.h)(p.Param,{title:"Duration"},Math.floor(i)+" s."),(0,o.h)("br",null),(0,o.h)(p.Param,{title:"Frames"},s),(0,o.h)(p.Param,{title:"Frame Size"},a),(0,o.h)(p.Param,{title:"Frame Step"},c),(0,o.h)(p.Param,{title:"FFT Size"},d.spectrum.fft_size),(0,o.h)("br",null),(0,o.h)(p.Param,{title:"Status"},this.props.pix2wav.status),(0,o.h)("br",null)),(0,o.h)(p.Group,{title:"Data settings"},(0,o.h)(p.TextInput,{title:"Dataset name",onChange:function(t){return e.setState({name:t.target.value})},value:this.state.name}),(0,o.h)(p.Slider,{name:"Starting Frame",min:0,max:1,type:"float",value:this.state.frame_start,defaultValue:0,onChange:function(t){e.setState({frame_start:t},function(){e.rebuildFrames()})}}),(0,o.h)(p.Slider,{name:"No. Frames",min:10,max:Math.min(s,1e3),type:"int",value:this.state.max,defaultValue:Math.min(s,300),onChange:function(t){return e.setState({max:t})}}),(0,o.h)(p.Slider,{name:"Frame step",min:10,max:2e4,type:"int",value:this.state.frame_step,defaultValue:d.FRAME_STEP,onChange:function(t){var n=Math.floor((44100*i-d.FRAME_LENGTH)/t);e.setState({name:e.state.datasetName+"_step_"+t+v(),frame_step:t,max:Math.min(e.state.max,n)},function(){e.rebuildFrames()})}}),(0,o.h)(p.Button,{onClick:function(){return e.buildZip()}},"Upload Frames")),(0,o.h)(p.Progress,null))}},{key:"componentDidUpdate",value:function(){var t=this;(this.state.frames||[]).map(function(e,n){var i=t.canvases.children[n],r=i.getContext("2d-lodpi");i.width=e.canvas.width,i.height=e.canvas.height,r.drawImage(e.canvas,0,0)})}}]),e}();e.default=(0,a.connect)(function(t){return{pix2wav:t.module.pix2wav,upload:t.upload}},function(t,e){return{datasetActions:(0,s.bindActionCreators)(f,t),actions:(0,s.bindActionCreators)(c,t),remote:(0,s.bindActionCreators)(h,t),wav2pix:(0,s.bindActionCreators)(d,t)}})(g)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),s=n(3),a=(y(n(5)),d(n(74))),u=d(n(73)),l=y(n(18)),c=(y(n(42)),y(n(30)),y(n(40))),h=(n(26),y(n(219))),p=y(n(29)),f=y(n(57));function d(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function y(t){return t&&t.__esModule?t:{default:t}}var m=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.datasetActions=n.datasetActions.bind(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"componentWillMount",value:function(){var t=this.props.match.params.id||localStorage.getItem("pix2wav.last_id");console.log("load dataset:",t);var e=this.props,n=(e.match,e.pix2wav),i=e.actions;"new"!==t&&(t?(parseInt(t)&&localStorage.setItem("pix2wav.last_id",t),n.folder&&n.folder.id===t||i.load_directories(t)):this.props.history.push("/pix2wav/new/"))}},{key:"render",value:function(){var t=this.props,e=t.pix2wav,n=(t.match,t.history),i=((e.data||{}).folderLookup||{})[e.folder_id]||{};return(0,r.h)("div",{className:"app pix2wav"},(0,r.h)("div",{class:"heading"},(0,r.h)("div",{class:"spaced"},(0,r.h)("h1",null,i?i.name:(0,r.h)(l.default,null)),(0,r.h)(c.default,null))),(0,r.h)(h.default,{loading:e.loading,progress:e.progress,id:e.folder_id,module:f.default,data:e.data,folder:i}),(0,r.h)(p.default,{loading:e.loading,progress:e.progress,id:e.folder_id,module:f.default,data:e.data,folder:i,history:n,onPickFile:function(t,e){e.preventDefault(),e.stopPropagation(),console.log("picked a file",t)},datasetActions:this.datasetActions}))}},{key:"datasetActions",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(arguments.length>2&&void 0!==arguments[2]&&arguments[2],this.props),i=n.pix2wav,o=n.remote,s=i.data.fileLookup[t.input[0]];return s?s.name&&s.name.match(/(gif|jpe?g|png)$/i)?null:(0,r.h)("div",null,(0,r.h)("div",{class:"actions"},(0,r.h)("span",{class:"link",onClick:function(){return o.train_task(t,i.folder_id,1)}},"train"),(0,r.h)("span",{class:"link",onClick:function(){return o.train_task(t,i.folder_id,2)}},"2x"),(0,r.h)("span",{class:"link",onClick:function(){return o.train_task(t,i.folder_id,4)}},"4x"),(0,r.h)("span",{class:"link",onClick:function(){return o.train_task(t,i.folder_id,6)}},"6x"),(0,r.h)("span",{class:"link",onClick:function(){return o.train_task(t,i.folder_id,18)}},"18x")),t.isBuilt?(0,r.h)("div",{class:"subtext"},"fetched ",(0,r.h)("span",{class:"link",onClick:function(){return o.clear_cache_task(t)}},"rm")):e?(0,r.h)("div",{class:"subtext"},"fetching"):(0,r.h)("div",{class:"subtext"},(0,r.h)("span",{class:"link",onClick:function(){return o.fetch_task(s.url,s.id,t.name)}},"fetch"))):null}}]),e}();e.default=(0,s.connect)(function(t){return{pix2wav:t.module.pix2wav}},function(t,e){return{actions:(0,o.bindActionCreators)(a,t),remote:(0,o.bindActionCreators)(u,t)}})(m)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.history;return(0,i.h)("div",{class:"app pix2wav"},(0,i.h)(r.default,{module:o.default,history:e}))};var i=n(1),r=s(n(30)),o=s(n(57));function s(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(10),s=h(n(8)),a=h(n(5)),u=h(n(221)),l=h(n(220)),c=h(n(161));function h(t){return t&&t.__esModule?t:{default:t}}var p=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return i(t,[{key:"componentWillMount",value:function(){s.default.system.changeTool("pix2wav"),document.body.style.backgroundImage="linear-gradient("+(a.default.randint(40)+40)+"deg, #bdf, #def)"}},{key:"componentWillReceiveProps",value:function(){s.default.system.changeTool("pix2wav"),document.body.style.backgroundImage="linear-gradient("+(a.default.randint(40)+40)+"deg, #bdf, #def)"}},{key:"render",value:function(){return(0,r.h)("section",null,(0,r.h)(o.Route,{exact:!0,path:"/pix2wav/new/",component:u.default}),(0,r.h)(o.Route,{exact:!0,path:"/pix2wav/datasets/",component:l.default}),(0,r.h)(o.Route,{exact:!0,path:"/pix2wav/datasets/:id/",component:l.default}),(0,r.h)(o.Route,{exact:!0,path:"/pix2wav/live/",component:c.default}))}}]),t}();e.default={name:"pix2wav",router:p,links:function(){return[{url:"/pix2wav/new/",name:"new"},{url:"/pix2wav/datasets/",name:"datasets"},{url:"/pix2wav/live/",name:"live"}]}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),a=n(3),u=n(13),l=n(49),c=d(n(20)),h=d(n(44)),p=d(n(58)),f=d(n(39));function d(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var y=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.actions.pix2pixhd.load_directories(),t.actions.live.get_params(),n.changeCheckpoint=n.changeCheckpoint.bind(n),n.changeEpoch=n.changeEpoch.bind(n),n.changeSequence=n.changeSequence.bind(n),n.seek=n.seek.bind(n),n.togglePlaying=n.togglePlaying.bind(n),n.toggleRecording=n.toggleRecording.bind(n),n.handleKeydown=n.handleKeydown.bind(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"componentWillMount",value:function(){document.addEventListener("keydown",this.handleKeydown)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeydown)}},{key:"componentWillUpdate",value:function(t){t.opt.checkpoint_name&&t.opt.checkpoint_name!==this.props.opt.checkpoint_name&&(console.log("listing epochs"),this.props.actions.live.list_epochs("pix2pixhd",t.opt.checkpoint_name))}},{key:"handleKeydown",value:function(t){if(console.log(t.keyCode),!(t.altKey||t.ctrlKey||t.metaKey))switch(t.keyCode){case 27:t.preventDefault(),this.props.actions.live.set_fullscreen(!this.props.fullscreen)}}},{key:"changeCheckpoint",value:function(t,e){this.props.actions.live.load_epoch(e,"latest")}},{key:"changeEpoch",value:function(t,e){this.props.actions.live.load_epoch(this.props.opt.checkpoint_name,e)}},{key:"changeSequence",value:function(t,e){console.log("load sequence",e),this.props.actions.live.load_sequence(e)}},{key:"seek",value:function(t){var e=Math.floor(t*(parseInt(this.props.frame.sequence_len)||1)+1);console.log("seek to frame",t,e),this.props.actions.live.seek(e)}},{key:"start",value:function(){console.log(this.props.opt);var t=this.props.opt.sequence_name||this.props.pix2pixhd.data.sequences[0].name,e=this.props.opt.checkpoint_name||this.props.pix2pixhd.data.checkpoints[0].name;console.log("starting up!",t,e),this.props.actions.tasks.live_task(t,e,{folder_id:this.props.pix2pixhd.data.resultsFolder.id})}},{key:"interrupt",value:function(){this.props.actions.queue.stop_task("gpu")}},{key:"togglePlaying",value:function(){this.props.opt.processing?this.props.actions.live.pause():this.props.actions.live.play()}},{key:"toggleRecording",value:function(){this.props.opt.recording?((0,l.stopRecording)(),this.props.actions.live.pause()):(0,l.startRecording)()}},{key:"render",value:function(){var t=this;if(this.props.pix2pixhd.loading)return(0,r.h)(u.Loading,{progress:this.props.pix2pixhd.progress});var e=this.props.pix2pixhd.data,n=e.folderLookup,i=e.datasetLookup,o=e.sequences.reduce(function(t,e){return t[e.name]=!0,t},{}),s=Object.keys(n).map(function(e){var n=t.props.pix2pixhd.data.folderLookup[e];if("results"!==n.name){var i=n.datasets.map(function(t){return o[t]?t:null}).filter(function(t){return!!t});return{name:n.name,options:i.sort()}}}).filter(function(t){return!!t&&!!t.options.length}).sort(function(t,e){return t.name.localeCompare(e.name)}),a=Object.keys(n).map(function(e){var n=t.props.pix2pixhd.data.folderLookup[e];if("results"!==n.name){var r=n.datasets.map(function(t){return i[t].checkpoints.length?t:null}).filter(function(t){return!!t});return{name:n.name,options:r.sort()}}}).filter(function(t){return!!t&&!!t.options.length}).sort(function(t,e){return t.name.localeCompare(e.name)});return(0,r.h)("div",{className:"app live centered"},(0,r.h)(u.Player,{width:424,height:256,fullscreen:this.props.fullscreen}),(0,r.h)("div",{className:"params row"},(0,r.h)("div",{className:"column"},(0,r.h)(u.ParamGroup,{title:"Network",noToggle:!0},(0,r.h)(u.Select,{live:!0,name:"send_image",title:"view mode",options:["a","b","sequence","recursive"],onChange:this.props.actions.live.set_param}),(0,r.h)(u.SelectGroup,{live:!0,name:"sequence_name",title:"sequence",options:s,onChange:this.changeSequence}),(0,r.h)(u.SelectGroup,{live:!0,name:"checkpoint_name",title:"checkpoint",options:a,onChange:this.changeCheckpoint}),(0,r.h)(u.Select,{live:!0,name:"epoch",title:"epoch",options:this.props.epochs,onChange:this.changeEpoch})),(0,r.h)("div",null,(0,r.h)(u.ParamGroup,{title:"Playback",name:"sequence_playing"},(0,r.h)(u.Slider,{name:"position",min:0,max:1,type:"float",value:(this.props.frame.sequence_i||0)/(this.props.frame.sequence_len||1),onChange:this.seek}),(0,r.h)(u.Slider,{live:!0,title:"playback rate",name:"sequence_step",min:-4,max:4,type:"float"}),(0,r.h)(u.Slider,{live:!0,title:"skip frames",name:"sequence_skip",min:0,max:1e3,type:"int"}),(0,r.h)(u.Slider,{live:!0,title:"fade sequence",name:"fade_sequence",min:0,max:4,type:"float"}),(0,r.h)(u.Slider,{live:!0,name:"frame_delay",min:0,max:2,type:"float"}))),(0,r.h)(u.Group,null,this.renderRestartButton(),this.renderLiveButtons(),this.renderRecordButton(),(0,r.h)("p",{class:"last_message"},this.props.last_message))),(0,r.h)("div",{className:"column"},(0,r.h)(u.ParamGroup,{title:"Transition",name:"transition"},(0,r.h)(u.Slider,{live:!0,name:"transition_period",min:10,max:5e3,type:"int"}),(0,r.h)(u.Slider,{live:!0,name:"transition_min",min:.001,max:.2,type:"float"}),(0,r.h)(u.Slider,{live:!0,name:"transition_max",min:.1,max:1,type:"float"})),(0,r.h)(u.ParamGroup,{title:"Recursion",name:"recursive"},(0,r.h)(u.Slider,{live:!0,name:"recursive_frac",min:0,max:.5,type:"float"}),(0,r.h)(u.Slider,{live:!0,name:"recurse_roll",min:-64,max:64,type:"int"}),(0,r.h)(u.Slider,{live:!0,name:"recurse_roll_axis",min:0,max:1,type:"int"})),(0,r.h)(u.ParamGroup,{title:"Sequence",name:"sequence"},(0,r.h)(u.Slider,{live:!0,name:"sequence_frac",min:0,max:1,type:"float"}),(0,r.h)(u.Slider,{live:!0,name:"process_frac",min:0,max:1,type:"float"})),(0,r.h)(u.ParamGroup,{title:"Transform",name:"transform"},(0,r.h)(u.Slider,{live:!0,name:"rotate",min:-1,max:1,type:"float"}),(0,r.h)(u.Slider,{live:!0,name:"scale",min:.9,max:1.1,type:"float"}))),(0,r.h)("div",{className:"column"},(0,r.h)(u.ParamGroup,{title:"Clahe",name:"clahe"},(0,r.h)(u.Slider,{live:!0,name:"clip_limit",min:1,max:4,type:"float"})),(0,r.h)(u.ParamGroup,{title:"Posterize",name:"posterize"},(0,r.h)(u.Slider,{live:!0,name:"spatial_window",min:2,max:128,type:"int"}),(0,r.h)(u.Slider,{live:!0,name:"color_window",min:2,max:128,type:"int"})),(0,r.h)(u.ParamGroup,{title:"Blur",name:"blur"},(0,r.h)(u.Slider,{live:!0,name:"blur_radius",min:3,max:7,type:"odd"}),(0,r.h)(u.Slider,{live:!0,name:"blur_sigma",min:0,max:2,type:"float"})),(0,r.h)(u.ParamGroup,{title:"Canny Edge Detection",name:"canny"},(0,r.h)(u.Slider,{live:!0,name:"canny_lo",min:10,max:200,type:"int"}),(0,r.h)(u.Slider,{live:!0,name:"canny_hi",min:10,max:200,type:"int"})),(0,r.h)(u.ParamGroup,{title:"Hue / Saturation",name:"hsl"},(0,r.h)(u.Slider,{live:!0,name:"hue",min:-127,max:127,type:"int"}),(0,r.h)(u.Slider,{live:!0,name:"saturation",min:-255,max:255,type:"int"}),(0,r.h)(u.Slider,{live:!0,name:"luminosity",min:-255,max:255,type:"int"})))))}},{key:"renderRestartButton",value:function(){var t=this;return"IDLE"===this.props.runner.gpu.status?(0,r.h)(u.Button,{title:"GPU Idle",onClick:function(){return t.start()}},"Start"):"pix2pixhd"!==this.props.runner.gpu.task.module?(0,r.h)(u.Button,{title:"GPU Busy",onClick:function(){return t.interrupt()}},"Interrupt"):this.props.opt.processing?(0,r.h)("div",null,(0,r.h)(u.Button,{title:"Processing",onClick:this.togglePlaying},"Stop"),(0,r.h)(u.Button,{title:"GPU Busy",onClick:function(){return t.interrupt()}},"Interrupt")):(0,r.h)("div",null,(0,r.h)(u.Button,{title:"Not processing",onClick:this.togglePlaying},"Restart"),(0,r.h)(u.Button,{title:"GPU Busy",onClick:function(){return t.interrupt()}},"Interrupt"))}},{key:"renderRecordButton",value:function(){return null}},{key:"renderLiveButtons",value:function(){var t=this;return(0,r.h)("div",null,(0,r.h)(u.Button,{title:"Save frame",onClick:l.saveFrame},"Save"),(0,r.h)(u.ParamGroup,{title:"Record video",name:"store_b",noDim:!0,onToggle:function(t){}},(0,r.h)(u.TextInput,{title:"Video name",name:"final_tag",value:this.props.opt.final_tag,onSave:function(e){t.props.actions.live.set_param("final_tag",e)}})))}}]),e}();e.default=(0,a.connect)(function(t){return{last_message:t.live.last_message,fullscreen:t.live.fullscreen,opt:t.live.opt,frame:t.live.frame,checkpoints:t.live.checkpoints,epochs:t.live.epochs,sequences:t.live.sequences,runner:t.system.runner,pix2pixhd:t.module.pix2pixhd}},function(t,e){return{actions:{live:(0,o.bindActionCreators)(c,t),queue:(0,o.bindActionCreators)(h,t),pix2pixhd:(0,o.bindActionCreators)(f,t),tasks:(0,o.bindActionCreators)(p,t),s:s}}})(y)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(1),s=n(2),a=n(3),u=(p(n(5)),h(n(39))),l=h(n(58)),c=n(13);p(n(42)),p(n(30)),p(n(40)),p(n(29)),p(n(38));function h(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function p(t){return t&&t.__esModule?t:{default:t}}var f=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.handleChange=n.handleChange.bind(n),n.state={checkpoint_name:"PLACEHOLDER",epoch:"latest",augment_name:"",augment_take:100,augment_make:20},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.Component),r(e,[{key:"componentWillMount",value:function(){var t=this.props.match.params.id||localStorage.getItem("pix2pixhd.last_id");console.log("load dataset:",t);var e=this.props,n=(e.match,e.pix2pixhd),i=e.actions;"new"!==t&&(t?(parseInt(t)&&localStorage.setItem("pix2pixhd.last_id",t),n.folder&&n.folder.id===t||i.load_directories(t)):this.props.history.push("/pix2pixhd/new/"))}},{key:"componentDidUpdate",value:function(t,e){e.checkpoint_name!==this.state.checkpoint_name&&(this.setState({epoch:"latest"}),this.props.actions.list_epochs(this.state.checkpoint_name),this.props.actions.count_dataset(this.state.checkpoint_name))}},{key:"handleChange",value:function(t,e){console.log("name",t,"value",e),this.setState(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},t,e))}},{key:"interrupt",value:function(){this.props.actions.queue.stop_task("gpu")}},{key:"render",value:function(){var t=this;if(this.props.pix2pixhd.loading)return(0,o.h)(c.Loading,{progress:this.props.pix2pixhd.progress});var e=this.props,n=e.pix2pixhd,r=(e.match,e.history,e.queue),s=n.data||{},a=s.folderLookup,u=s.datasetLookup,l=((a||{})[n.folder_id],Object.keys(a).map(function(e){var n=t.props.pix2pixhd.data.folderLookup[e];if("results"!==n.name){var i=n.datasets.map(function(t){return u[t].checkpoints.length?t:null}).filter(function(t){return!!t});return{name:n.name,options:i.sort()}}}).filter(function(t){return!!t&&!!t.options.length}).sort(function(t,e){return t.name.localeCompare(e.name)}));return(0,o.h)("div",{className:"app pix2pixhd"},(0,o.h)("div",{className:"heading"},(0,o.h)("h1",null,"pix2pixhd training")),(0,o.h)("div",{className:"columns"},(0,o.h)("div",{className:"column"},(0,o.h)(c.Group,{title:"Dataset"},(0,o.h)(c.SelectGroup,{name:"checkpoint_name",title:"Dataset",options:l,onChange:this.handleChange,placeholder:"Pick a dataset",value:this.state.checkpoint_name}),(0,o.h)(c.Select,{title:"Epoch",name:"epoch",options:this.props.pix2pixhd.data.epochs,onChange:this.handleChange,value:this.state.epoch})),(0,o.h)(c.Group,{title:"Augment"},(0,o.h)(c.NumberInput,{name:"augment_take",title:"Pick N random frames",value:this.state.augment_take,onChange:this.handleChange,type:"int",min:"1",max:"1000"}),(0,o.h)(c.NumberInput,{name:"augment_make",title:"Generate N recursively",value:this.state.augment_make,onChange:this.handleChange,type:"int",min:"1",max:"1000"}),(0,o.h)(c.Button,{title:"Augment dataset",value:"Augment",onClick:function(){return t.props.remote.augment_task(t.state.checkpoint_name,t.state)}}),(0,o.h)(c.Button,{title:"Make a movie without augmenting",value:"Generate",onClick:function(){t.props.remote.augment_task(t.state.checkpoint_name,i({},t.state,{no_symlinks:!0,mov:!0,folder_id:t.props.pix2pixhd.data.resultsFolder.id}))}})),(0,o.h)(c.Group,{title:"Augmentation Grid"},(0,o.h)(c.AugmentationGrid,{checkpoint:this.props.pix2pixhd.checkpoint,take:[1,2,3,4,5,10,15,20,25,50,75,100,200,300,400,500,1e3],make:[1,2,3,4,5,10,15,20,25,50,75,100,200],onAugment:function(e,n){t.props.remote.augment_task(t.state.checkpoint_name,i({},t.state,{augment_take:e,augment_make:n}))},onTrain:function(){t.props.remote.train_task(t.state.checkpoint_name,n.folder_id,1),setTimeout(function(){t.props.remote.augment_task(t.state.checkpoint_name,i({},t.state,{augment_take:10,augment_make:150,no_symlinks:!0,mov:!0,folder_id:t.props.pix2pixhd.data.resultsFolder.id}))},250)}})),(0,o.h)(c.Group,{title:"Status"},(0,o.h)(c.Button,{title:"GPU",value:"IDLE"===this.props.runner.gpu.status?"Idle":"Interrupt",onClick:function(){return t.interrupt()}}),(0,o.h)(c.CurrentTask,null))),(0,o.h)("div",{className:"column"},(0,o.h)(c.Group,{title:"Upcoming Tasks"},(0,o.h)(c.TaskList,{tasks:r.queue.map(function(t){return r.tasks[t]}),sort:"date asc"})))))}}]),e}();e.default=(0,a.connect)(function(t){return{pix2pixhd:t.module.pix2pixhd,runner:t.system.runner,queue:t.queue}},function(t,e){return{actions:(0,s.bindActionCreators)(u,t),remote:(0,s.bindActionCreators)(l,t)}})(f)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),s=(n(10),n(3)),a=(f(n(5)),f(n(8))),u=p(n(39)),l=p(n(58)),c=f(n(18)),h=n(26);function p(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function f(t){return t&&t.__esModule?t:{default:t}}var d=0,y=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.pix2pixhd.results||t.actions.load_results(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"componentDidMount",value:function(){d=0}},{key:"render",value:function(){var t=this;if(!this.props.pix2pixhd.results)return(0,r.h)(c.default,{progress:this.props.pix2pixhd.progress});var e=this.props.pix2pixhd.results,n=(e.resultsFolder,e.results),i=e.renders,o=e.files;return(0,r.h)("div",{className:"app pix2pixhd"},(0,r.h)("div",{className:"heading row middle"},(0,r.h)("h1",null,"Pix2PixHD Results")),(0,r.h)("div",{class:"rows params renders"},(0,r.h)(h.FileList,{linkFiles:!0,files:o,orderBy:"date desc",fields:"name date size delete",onDelete:function(t){(!(d<3)||confirm("Are you sure you want to delete this file?"))&&(d+=1,console.log("delete: confirmed"),a.default.file.destroy(t))}}),(0,r.h)("br",null),(0,r.h)("h3",null,"renders on server"),(0,r.h)(h.FileList,{files:i,orderBy:"date desc",fields:"name date size",onClick:function(e,n){n.preventDefault(),n.stopPropagation(),console.log("picked a result",e),t.handlePick(e)}}),(0,r.h)("br",null),(0,r.h)("h3",null,"folders on server"),(0,r.h)(h.FileList,{files:n,orderBy:"date desc",fields:"name date count",onClick:function(e,n){n.preventDefault(),n.stopPropagation(),console.log("picked a result",e),t.handlePick(e)}})))}},{key:"handlePick",value:function(t){}}]),e}();e.default=(0,s.connect)(function(t){return{pix2pixhd:t.module.pix2pixhd}},function(t,e){return{actions:(0,o.bindActionCreators)(u,t),remote:(0,o.bindActionCreators)(l,t)}})(y)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),s=n(3),a=(y(n(5)),d(n(39))),u=d(n(58)),l=n(13),c=y(n(42)),h=(y(n(30)),y(n(40))),p=y(n(29)),f=y(n(38));function d(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function y(t){return t&&t.__esModule?t:{default:t}}var m=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.datasetActions=n.datasetActions.bind(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"componentWillMount",value:function(){var t=this.props.match.params.id||localStorage.getItem("pix2pixhd.last_id");console.log("load dataset:",t);var e=this.props,n=(e.match,e.pix2pixhd),i=e.actions;"new"!==t&&(t?(parseInt(t)&&localStorage.setItem("pix2pixhd.last_id",t),n.folder&&n.folder.id===t||i.load_directories(t)):this.props.history.push("/pix2pixhd/new/"))}},{key:"render",value:function(){var t=this.props,e=t.pix2pixhd,n=(t.match,t.history),i=((e.data||{}).folderLookup||{})[e.folder_id]||{};return(0,r.h)("div",{className:"app pix2pixhd"},(0,r.h)("div",{class:"heading"},(0,r.h)("div",{class:"spaced"},(0,r.h)("h1",null,i?i.name:(0,r.h)(l.Loading,null)),(0,r.h)(h.default,null))),(0,r.h)("div",{className:"row"},i&&i.name&&"unsorted"!==i.name&&(0,r.h)(c.default,{title:"Add Files",module:f.default,folder:i,canUpload:!0,canAddURL:!0}),(0,r.h)("div",null,(0,r.h)(h.default,null),(0,r.h)(l.CurrentTask,null))),(0,r.h)(p.default,{loading:e.loading,progress:e.progress,id:e.folder_id,module:f.default,data:e.data,folder:i,history:n,onPickFile:function(t,e){e.preventDefault(),e.stopPropagation(),console.log("picked a file",t)},datasetActions:this.datasetActions}))}},{key:"datasetActions",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(arguments.length>2&&void 0!==arguments[2]&&arguments[2],this.props),i=n.pix2pixhd,o=n.remote,s=i.data.fileLookup[t.input[0]];return s?s.name&&s.name.match(/(gif|jpe?g|png)$/i)?null:(0,r.h)("div",null,(0,r.h)("div",{class:"actions"},(0,r.h)("span",{class:"link",onClick:function(){return o.train_task(t,i.folder_id,1)}},"train"),(0,r.h)("span",{class:"link",onClick:function(){return o.train_task(t,i.folder_id,5)}},"5x"),(0,r.h)("span",{class:"link",onClick:function(){return o.train_task(t,i.folder_id,10)}},"10x"),(0,r.h)("span",{class:"link",onClick:function(){return o.train_task(t,i.folder_id,20)}},"20x"),(0,r.h)("span",{class:"link",onClick:function(){return o.train_task(t,i.folder_id,50)}},"50x")),t.isBuilt?(0,r.h)("div",{class:"subtext"},"fetched ",(0,r.h)("span",{class:"link",onClick:function(){return o.clear_cache_task(t)}},"rm")):e?(0,r.h)("div",{class:"subtext"},"fetching"):(0,r.h)("div",{class:"subtext"},(0,r.h)("span",{class:"link",onClick:function(){return o.fetch_task(s.url,s.id,t.name)}},"fetch"))):null}}]),e}();e.default=(0,s.connect)(function(t){return{pix2pixhd:t.module.pix2pixhd}},function(t,e){return{actions:(0,o.bindActionCreators)(a,t),remote:(0,o.bindActionCreators)(u,t)}})(m)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(2),o=n(3),s=(n(10),l(n(5)),n(13)),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(39)),u=l(n(38));function l(t){return t&&t.__esModule?t:{default:t}}e.default=(0,o.connect)(function(t){return{pix2pixhd:t.module.pix2pixhd}},function(t,e){return{actions:(0,r.bindActionCreators)(a,t)}})(function(t){return(0,i.h)(s.Views.New,{db:t.pix2pixhd,path:"/pix2pixhd/sequences/",actions:t.actions,module:u.default,history:t.history})})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(10),s=f(n(8)),a=f(n(5)),u=f(n(227)),l=f(n(226)),c=f(n(225)),h=f(n(224)),p=f(n(223));function f(t){return t&&t.__esModule?t:{default:t}}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return i(t,[{key:"componentWillMount",value:function(){s.default.system.changeTool("pix2pixhd"),document.body.style.backgroundImage="linear-gradient("+(a.default.randint(40)+40)+"deg, #def, #dfe)"}},{key:"componentWillReceiveProps",value:function(){s.default.system.changeTool("pix2pixhd"),document.body.style.backgroundImage="linear-gradient("+(a.default.randint(40)+40)+"deg, #def, #dfe)"}},{key:"render",value:function(){return(0,r.h)("section",null,(0,r.h)(o.Route,{exact:!0,path:"/pix2pixhd/new/",component:u.default}),(0,r.h)(o.Route,{exact:!0,path:"/pix2pixhd/sequences/",component:l.default}),(0,r.h)(o.Route,{exact:!0,path:"/pix2pixhd/sequences/:id/",component:l.default}),(0,r.h)(o.Route,{exact:!0,path:"/pix2pixhd/train/",component:h.default}),(0,r.h)(o.Route,{exact:!0,path:"/pix2pixhd/results/",component:c.default}),(0,r.h)(o.Route,{exact:!0,path:"/pix2pixhd/live/",component:p.default}))}}]),t}();e.default={name:"pix2pixhd",router:d,links:function(){return[{url:"/pix2pixhd/new/",name:"folders"},{url:"/pix2pixhd/sequences/",name:"sequences"},{url:"/pix2pixhd/train/",name:"checkpoints"},{url:"/pix2pixhd/results/",name:"results"},{url:"/pix2pixhd/live/",name:"live"}]}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),a=n(3),u=n(13),l=n(49),c=d(n(20)),h=d(n(44)),p=d(n(116)),f=d(n(76));function d(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var y=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.actions.pix2pix.load_directories(),t.actions.live.get_params(),n.changeCheckpoint=n.changeCheckpoint.bind(n),n.changeEpoch=n.changeEpoch.bind(n),n.changeSequence=n.changeSequence.bind(n),n.seek=n.seek.bind(n),n.togglePlaying=n.togglePlaying.bind(n),n.toggleRecording=n.toggleRecording.bind(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"componentWillUpdate",value:function(t){t.opt.checkpoint_name&&t.opt.checkpoint_name!==this.props.opt.checkpoint_name&&this.props.actions.live.list_epochs("pix2pix",t.opt.checkpoint_name)}},{key:"changeCheckpoint",value:function(t,e){this.props.actions.live.load_epoch(e,"latest")}},{key:"changeEpoch",value:function(t,e){this.props.actions.live.load_epoch(this.props.opt.checkpoint_name,e)}},{key:"changeSequence",value:function(t,e){console.log("load sequence",e),this.props.actions.live.load_sequence(e)}},{key:"seek",value:function(t){var e=Math.floor(t*(parseInt(this.props.frame.sequence_len)||1)+1);console.log("seek to frame",t,e),this.props.actions.live.seek(e)}},{key:"start",value:function(){var t=this.props.pix2pix.data.sequences[0].name,e=this.props.pix2pix.data.checkpoints[0].name;console.log("starting up!",t,e),this.props.actions.tasks.live_task(t,e)}},{key:"interrupt",value:function(){this.props.actions.queue.stop_task("gpu")}},{key:"togglePlaying",value:function(){this.props.opt.processing?this.props.actions.live.pause():this.props.actions.live.play()}},{key:"toggleRecording",value:function(){this.props.opt.recording?((0,l.stopRecording)(),this.props.actions.live.pause()):(0,l.startRecording)()}},{key:"render",value:function(){return this.props.pix2pix.loading?(0,r.h)(u.Loading,null):(0,r.h)("div",{className:"app centered"},(0,r.h)(u.Player,{width:424,height:256}),(0,r.h)("div",{className:"params row"},(0,r.h)("div",{className:"column"},(0,r.h)(u.ParamGroup,{title:"Playback",noToggle:!0},(0,r.h)(u.Select,{name:"send_image",title:"view mode",options:["a","b","sequence","recursive"],onChange:this.props.actions.live.set_param}),(0,r.h)(u.Select,{name:"sequence_name",title:"sequence",options:this.props.pix2pix.data.sequences.map(function(t){return t.name}),onChange:this.changeSequence}),(0,r.h)(u.Select,{name:"checkpoint_name",title:"checkpoint",options:this.props.pix2pix.data.checkpoints.map(function(t){return t.name}),onChange:this.changeCheckpoint}),(0,r.h)(u.Select,{name:"epoch",title:"epoch",options:this.props.epochs,onChange:this.changeEpoch}),(0,r.h)(u.Slider,{name:"position",min:0,max:1,type:"float",value:(this.props.frame.sequence_i||0)/(this.props.frame.sequence_len||1),onChange:this.seek}),(0,r.h)(u.Slider,{live:!0,name:"frame_delay",min:.05,max:2,type:"float"}),this.renderRestartButton(),(0,r.h)(u.Button,{title:this.props.opt.savingVideo?"Saving video...":this.props.opt.recording?"Recording ("+(t=this.props.opt.recordFrames/25,t.toFixed(1)+" s.")+")":"Record video",onClick:this.toggleRecording},this.props.opt.savingVideo?"Saving":this.props.opt.recording?"Recording":"Record"),(0,r.h)(u.Button,{title:"Save frame",onClick:l.saveFrame},"Save"),(0,r.h)(u.ParamGroup,{title:"Render on server",name:"store_b",onToggle:function(t){}}),(0,r.h)("p",{class:"last_message"},this.props.last_message))),(0,r.h)("div",{className:"column"},(0,r.h)(u.ParamGroup,{title:"Transition",name:"transition"},(0,r.h)(u.Slider,{live:!0,name:"transition_period",min:10,max:5e3,type:"int"}),(0,r.h)(u.Slider,{live:!0,name:"transition_min",min:.001,max:.2,type:"float"}),(0,r.h)(u.Slider,{live:!0,name:"transition_max",min:.1,max:1,type:"float"})),(0,r.h)(u.ParamGroup,{title:"Recursion",name:"recursive"},(0,r.h)(u.Slider,{live:!0,name:"recursive_frac",min:0,max:.5,type:"float"}),(0,r.h)(u.Slider,{live:!0,name:"recurse_roll",min:-64,max:64,type:"int"}),(0,r.h)(u.Slider,{live:!0,name:"recurse_roll_axis",min:0,max:1,type:"int"})),(0,r.h)(u.ParamGroup,{title:"Sequence",name:"sequence"},(0,r.h)(u.Slider,{live:!0,name:"sequence_frac",min:0,max:.5,type:"float"}),(0,r.h)(u.Slider,{live:!0,name:"process_frac",min:0,max:1,type:"float"}))),(0,r.h)("div",{className:"column"},(0,r.h)(u.ParamGroup,{title:"Clahe",name:"clahe"},(0,r.h)(u.Slider,{live:!0,name:"clip_limit",min:1,max:4,type:"float"})),(0,r.h)(u.ParamGroup,{title:"Posterize",name:"posterize"},(0,r.h)(u.Slider,{live:!0,name:"spatial_window",min:2,max:128,type:"int"}),(0,r.h)(u.Slider,{live:!0,name:"color_window",min:2,max:128,type:"int"})),(0,r.h)(u.ParamGroup,{title:"Blur",name:"blur"},(0,r.h)(u.Slider,{live:!0,name:"blur_radius",min:3,max:7,type:"odd"}),(0,r.h)(u.Slider,{live:!0,name:"blur_sigma",min:0,max:2,type:"float"})),(0,r.h)(u.ParamGroup,{title:"Canny Edge Detection",name:"canny"},(0,r.h)(u.Slider,{live:!0,name:"canny_lo",min:10,max:200,type:"int"}),(0,r.h)(u.Slider,{live:!0,name:"canny_hi",min:10,max:200,type:"int"})))));var t}},{key:"renderRestartButton",value:function(){var t=this;return"IDLE"===this.props.runner.gpu.status?(0,r.h)(u.Button,{title:"GPU Idle",onClick:function(){return t.start()}},"Start"):"pix2pix"!==this.props.runner.gpu.task.module?(0,r.h)(u.Button,{title:"GPU Busy",onClick:function(){return t.interrupt()}},"Interrupt"):this.props.opt.processing?(0,r.h)("div",null,(0,r.h)(u.Button,{title:"Processing",onClick:this.togglePlaying},"Stop"),(0,r.h)(u.Button,{title:"GPU Busy",onClick:function(){return t.interrupt()}},"Interrupt")):(0,r.h)("div",null,(0,r.h)(u.Button,{title:"Not processing",onClick:this.togglePlaying},"Restart"),(0,r.h)(u.Button,{title:"GPU Busy",onClick:function(){return t.interrupt()}},"Interrupt"))}}]),e}();e.default=(0,a.connect)(function(t){return{last_message:t.live.last_message,opt:t.live.opt,frame:t.live.frame,checkpoints:t.live.checkpoints,epochs:t.live.epochs,sequences:t.live.sequences,runner:t.system.runner,pix2pix:t.module.pix2pix}},function(t,e){return{actions:{live:(0,o.bindActionCreators)(c,t),queue:(0,o.bindActionCreators)(h,t),pix2pix:(0,o.bindActionCreators)(f,t),tasks:(0,o.bindActionCreators)(p,t),s:s}}})(y)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),s=n(3),a=(y(n(5)),d(n(76))),u=d(n(116)),l=n(13),c=y(n(42)),h=(y(n(30)),y(n(40))),p=y(n(29)),f=y(n(75));function d(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function y(t){return t&&t.__esModule?t:{default:t}}var m=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.datasetActions=n.datasetActions.bind(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"componentWillMount",value:function(){var t=this.props.match.params.id||localStorage.getItem("pix2pix.last_id");console.log("load dataset:",t);var e=this.props,n=(e.match,e.pix2pix),i=e.actions;"new"!==t&&(t?(parseInt(t)&&localStorage.setItem("pix2pix.last_id",t),n.folder&&n.folder.id===t||i.load_directories(t)):this.props.history.push("/pix2pix/new/"))}},{key:"render",value:function(){var t=this.props,e=t.pix2pix,n=(t.match,t.history),i=((e.data||{}).folderLookup||{})[e.folder_id]||{};return(0,r.h)("div",{className:"app pix2pix"},(0,r.h)("div",{class:"heading"},(0,r.h)("div",{class:"spaced"},(0,r.h)("h1",null,i?i.name:(0,r.h)(l.Loading,null)),(0,r.h)(h.default,null))),(0,r.h)("div",{className:"row"},i&&i.name&&"unsorted"!==i.name&&(0,r.h)(c.default,{title:"Add Files",module:f.default,folder:i,canUpload:!0,canAddURL:!0}),(0,r.h)("div",null,(0,r.h)(h.default,null),(0,r.h)(l.CurrentTask,null))),(0,r.h)(p.default,{loading:e.loading,progress:e.progress,id:e.folder_id,module:f.default,data:e.data,folder:i,history:n,onPickFile:function(t,e){e.preventDefault(),e.stopPropagation(),console.log("picked a file",t)},datasetActions:this.datasetActions}))}},{key:"datasetActions",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(arguments.length>2&&void 0!==arguments[2]&&arguments[2],this.props),i=n.pix2pix,o=n.remote,s=i.data.fileLookup[t.input[0]];return s?s.name&&s.name.match(/(gif|jpe?g|png)$/i)?null:(console.log(t),(0,r.h)("div",null,(0,r.h)("div",{class:"actions"},(0,r.h)("span",{class:"link",onClick:function(){return o.train_task(t,i.folder_id,1)}},"train"),(0,r.h)("span",{class:"link",onClick:function(){return o.train_task(t,i.folder_id,5)}},"5x"),(0,r.h)("span",{class:"link",onClick:function(){return o.train_task(t,i.folder_id,10)}},"10x"),(0,r.h)("span",{class:"link",onClick:function(){return o.train_task(t,i.folder_id,20)}},"20x"),(0,r.h)("span",{class:"link",onClick:function(){return o.train_task(t,i.folder_id,50)}},"50x")),t.isBuilt?(0,r.h)("div",{class:"subtext"},"fetched ",(0,r.h)("span",{class:"link",onClick:function(){return o.clear_cache_task(t)}},"rm")):e?(0,r.h)("div",{class:"subtext"},"fetching"):(0,r.h)("div",{class:"subtext"},(0,r.h)("span",{class:"link",onClick:function(){return o.fetch_task(s.url,s.id,t.name)}},"fetch")))):null}}]),e}();e.default=(0,s.connect)(function(t){return{pix2pix:t.module.pix2pix}},function(t,e){return{actions:(0,o.bindActionCreators)(a,t),remote:(0,o.bindActionCreators)(u,t)}})(m)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(2),o=n(3),s=(n(10),l(n(5)),n(13)),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(76)),u=l(n(75));function l(t){return t&&t.__esModule?t:{default:t}}e.default=(0,o.connect)(function(t){return{pix2pix:t.module.pix2pix}},function(t,e){return{actions:(0,r.bindActionCreators)(a,t)}})(function(t){return(0,i.h)(s.Views.New,{db:t.pix2pix,path:"/pix2pix/sequences/",actions:t.actions,module:u.default,history:t.history})})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(10),s=h(n(8)),a=h(n(5)),u=h(n(231)),l=h(n(230)),c=h(n(229));function h(t){return t&&t.__esModule?t:{default:t}}var p=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return i(t,[{key:"componentWillMount",value:function(){s.default.system.changeTool("pix2pix"),document.body.style.backgroundImage="linear-gradient("+(a.default.randint(40)+40)+"deg, #fde, #ffe)"}},{key:"componentWillReceiveProps",value:function(){s.default.system.changeTool("pix2pix"),document.body.style.backgroundImage="linear-gradient("+(a.default.randint(40)+40)+"deg, #fde, #ffe)"}},{key:"render",value:function(){return(0,r.h)("section",null,(0,r.h)(o.Route,{exact:!0,path:"/pix2pix/new/",component:u.default}),(0,r.h)(o.Route,{exact:!0,path:"/pix2pix/sequences/",component:l.default}),(0,r.h)(o.Route,{exact:!0,path:"/pix2pix/sequences/:id/",component:l.default}),(0,r.h)(o.Route,{exact:!0,path:"/pix2pix/live/",component:c.default}))}}]),t}();e.default={name:"pix2pix",router:p,links:function(){return[{url:"/pix2pix/new/",name:"new"},{url:"/pix2pix/sequences/",name:"sequences"},{url:"/pix2pix/live/",name:"live"}]}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.morph_task=void 0;o(n(17)),o(n(14)),o(n(6));var i=o(n(8)),r=o(n(117));function o(t){return t&&t.__esModule?t:{default:t}}e.morph_task=function(t,e){return function(n){if("PLACEHOLDER"!==t.a&&"PLACEHOLDER"!==t.b){var o={module:r.default.name,activity:"morph",dataset:t.a,folder_id:e.id,opt:t};return i.default.queue.add_task(o)}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.load_data=void 0;var i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=(l(n(17)),l(n(14)),l(n(6))),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(43)),s=l(n(8)),a=l(n(5)),u=l(n(117));function l(t){return t&&t.__esModule?t:{default:t}}e.load_data=function(t){return function(t){var e=u.default.name;a.default.allProgress([o.load(e),s.default.socket.list_sequences({module:"pix2pixhd",dir:"sequences"}),s.default.socket.list_directory({module:e,dir:"renders"})],function(e,n,i){console.log("morph load progress",n,i),t({type:r.default.app.load_progress,progress:{i:n,n:i},data:{module:"morph"}})}).then(function(e){var n=i(e,3),o=n[0],s=n[1],a=n[2],u=(o.folderLookup,o.fileLookup,o.datasetLookup,o.folders,o.files),l=(o.unsortedFolder,o.resultsFolder);t({type:r.default.morph.load,data:o,app:{resultsFolder:l,files:u,sequences:s,renders:a}})})}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),s=(n(10),n(3)),a=(f(n(5)),f(n(8))),u=p(n(234)),l=p(n(233)),c=f(n(18)),h=n(13);function p(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function f(t){return t&&t.__esModule?t:{default:t}}var d=0,y=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n.state={dataset_module:"pix2pixhd",a:"PLACEHOLDER",b:"PLACEHOLDER",a_offset:0,a_duration:1,a_pos:0,b_offset:0,b_duration:1,b_pos:0,steps:16,dilate:2,frames:32,padding:3,smooth:!0,mode:"mix"},t.morph.data||t.actions.load_data(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"componentDidMount",value:function(){d=0}},{key:"render",value:function(){var t=this;if(!this.props.morph.app)return(0,r.h)(c.default,{progress:this.props.morph.progress});var e=this.props.morph.app,n=e.resultsFolder,i=e.sequences,o=e.renders,s=e.files,u=i.map(function(t){return[t.name.split("_").slice(0,3).join(" ")+"~ ("+t.count+")",t.name]}),l=i.reduce(function(t,e){return t[e.name]=e,t},{}),p=this.state.frames/25,f=void 0;return this.state.steps/this.state.dilate>64&&"mix"===this.state.mode&&(f=(0,r.h)("span",null,(0,r.h)("br",null),"warning, this will take a while")),(0,r.h)("div",{className:"app morph"},(0,r.h)("div",{className:"heading row middle"},(0,r.h)("h1",null,"Morph")),(0,r.h)("div",{class:"rows params renders"},(0,r.h)("div",{class:"column"},(0,r.h)(h.Group,{title:"From"},(0,r.h)(h.Select,{title:"Starting sequence",placeholder:"Please choose a video",value:this.state.a,options:u,onChange:function(e,n){return t.setState({a:n,a_duration:l[n].count,a_pos:0,a_offset:0})}}),(0,r.h)(h.Slider,{title:"Offset",value:this.state.a_pos,min:0,max:1,step:.01,onChange:function(e){return t.setState({a_pos:e,a_offset:Math.floor(e*(t.state.a_duration-t.state.frames))})}})),(0,r.h)(h.Group,{title:"To"},(0,r.h)(h.Select,{title:"Ending sequence",placeholder:"Please choose a video",value:this.state.b,options:u,onChange:function(e,n){return t.setState({b:n,b_duration:l[n].count,b_pos:0,b_offset:0})}}),(0,r.h)(h.Slider,{title:"Offset",value:this.state.b_pos,min:0,max:1,step:.01,onChange:function(e){return t.setState({b_pos:e,b_offset:Math.floor(e*(t.state.b_duration-t.state.frames))})}})),(0,r.h)(h.Group,{title:"Morph Settings"},(0,r.h)(h.Select,{title:"Mode",value:this.state.mode,options:["mix","average","mix_images"],onChange:function(e,n){return t.setState({mode:n})}}),(0,r.h)(h.Slider,{type:"list",title:"Steps",value:this.state.steps,options:[2,4,8,16,32,64,128,256,512,1024,2048,4096],onChange:function(e){return t.setState({steps:e,frames:e*t.state.dilate})}}),(0,r.h)(h.Slider,{type:"list",title:"Dilate",value:this.state.dilate,options:[1,2,4,8,16,32],onChange:function(e){return t.setState({dilate:e,frames:t.state.steps*e})}}),(0,r.h)(h.Checkbox,{title:"Smooth",value:this.state.smooth,onToggle:function(e){return t.setState({smooth:e})}}),(0,r.h)(h.Slider,{type:"int",title:"Padding (in seconds)",value:this.state.padding,min:0,max:30,step:1,onChange:function(e){return t.setState({padding:e})}}),(0,r.h)(h.Button,{title:"Run task",value:"Morph!",onClick:function(){return t.props.remote.morph_task(t.state,n)}}),(0,r.h)("br",null),(0,r.h)(h.Param,{title:"Total length"},p.toFixed(1)+" seconds"),(0,r.h)(h.Param,{title:"Total frames"},this.state.frames+" frames"),f,(0,r.h)("br",null),(0,r.h)(h.CurrentTask,null))),(0,r.h)("h3",null,"morphed videos"),(0,r.h)(h.FileList,{linkFiles:!0,files:s,orderBy:"date desc",fields:"name datetime size delete",onDelete:function(t){(!(d<3)||confirm("Are you sure you want to delete this file?"))&&(d+=1,console.log("delete: confirmed"),a.default.file.destroy(t))}}),(0,r.h)("br",null),(0,r.h)("h3",null,"renders on server"),(0,r.h)(h.FileList,{files:o,orderBy:"date desc",fields:"name datetime time size",onClick:function(e,n){n.preventDefault(),n.stopPropagation(),console.log("picked a result",e),t.handlePick(e)}})))}},{key:"handlePick",value:function(t){}}]),e}();e.default=(0,s.connect)(function(t){return{morph:t.module.morph}},function(t,e){return{actions:(0,o.bindActionCreators)(u,t),remote:(0,o.bindActionCreators)(l,t)}})(y)},function(t,e,n){var i,r,o;r=[e,t],void 0===(o="function"==typeof(i=function(t,e){"use strict";var n={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};function i(t){try{delete window[t]}catch(e){window[t]=void 0}}function r(t){var e=document.getElementById(t);e&&document.getElementsByTagName("head")[0].removeChild(e)}e.exports=function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],o=t,s=e.timeout||n.timeout,a=e.jsonpCallback||n.jsonpCallback,u=void 0;return new Promise(function(n,l){var c=e.jsonpCallbackFunction||"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),h=a+"_"+c;window[c]=function(t){n({ok:!0,json:function(){return Promise.resolve(t)}}),u&&clearTimeout(u),r(h),i(c)},o+=-1===o.indexOf("?")?"?":"&";var p=document.createElement("script");p.setAttribute("src",""+o+a+"="+c),e.charset&&p.setAttribute("charset",e.charset),p.id=h,document.getElementsByTagName("head")[0].appendChild(p),u=setTimeout(function(){l(new Error("JSONP request to "+t+" timed out")),i(c),r(h),window[c]=function(){i(c)}},s),p.onerror=function(){l(new Error("JSONP request to "+t+" failed")),i(c),r(h),u&&clearTimeout(u)}})}})?i.apply(e,r):i)||(t.exports=o)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.tumblr=e.thumbnail=e.loadImage=e.tag=e.parse=e.lookup=e.integrations=void 0;var i=o(n(124)),r=o(n(236));function o(t){return t&&t.__esModule?t:{default:t}}var s=e.integrations=[{type:"image",regex:/\.(jpeg|jpg|gif|png|svg)(\?.*)?$/i,fetch:function(t,e){var n=new Image;n.onload=function(){if(n){var i=n.naturalWidth,r=n.naturalHeight;n=null,e({url:t,type:"image",token:"",thumbnail:"",title:"",width:i,height:r})}},n.src=t,n.complete&&n.onload()},tag:function(t){return'<img src="'+t.url+'">'}},{type:"video",regex:/\.(mp4|webm)(\?.*)?$/i,fetch:function(t,e){var n=document.createElement("video"),i=t.replace(/\?.*$/,"").split("/"),r=i[i.length-1];n.addEventListener("loadedmetadata",function(){var i=n.videoWidth,o=n.videoHeight;n=null,e({url:t,type:"video",token:t,thumbnail:"/public/assets/img/video-thumbnail.png",title:r,width:i,height:o})}),n.src=t,n.load()},tag:function(t){return'<video src="'+t.url+'">'}},{type:"audio",regex:/\.(wav|mp3)(\?.*)?$/i,fetch:function(t,e){var n=document.createElement("audio"),i=t.replace(/\?.*$/,"").split("/"),r=i[i.length-1];n.addEventListener("loadedmetadata",function(){var i=n.duration;n=null,e({url:t,type:"audio",token:t,thumbnail:"/public/assets/img/audio-thumbnail.png",title:r,duration:i})}),n.src=t,n.load()},tag:function(t){return'<audio src="'+t.url+'">'}},{type:"youtube",regex:/(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/ ]{11})/i,fetch:function(t,e){var n=(t.match(/v=([-_a-zA-Z0-9]{11})/i)||t.match(/youtu.be\/([-_a-zA-Z0-9]{11})/i)||t.match(/embed\/([-_a-zA-Z0-9]{11})/i))[1].split("&")[0],i="https://i.ytimg.com/vi/"+n+"/hqdefault.jpg",o=new URL("https://www.googleapis.com/youtube/v3/videos"),s={id:n,key:"AIzaSyCaLRGY-hxs92045X-Jew7w1FgQPkStHgc",part:"id,contentDetails,snippet,status"};Object.keys(s).forEach(function(t){return o.searchParams.append(t,s[t])}),(0,r.default)(o.toString()).then(function(t){return t.json()}).then(function(r){if(!r||!r.items.length)return alert("Sorry, this video URL is invalid.");var o=r.items[0],s=o.contentDetails.duration.match(/\d+/g).map(function(t){return parseInt(t)}),a=0;a=3==s.length?60*s[0]+60*s[1]+s[2]:2==s.length?60*s[0]+s[1]:s[0],["maxres","high","medium","standard","default"].some(function(t){return!!o.snippet.thumbnails[t]&&(i=o.snippet.thumbnails[t].url,!0)}),e({url:t,type:"youtube",token:n,thumbnail:i,title:o.snippet.title,duration:a,width:640,height:360})})},tag:function(t){return'<div class="video" style="width: '+t.width+"px; height: "+t.height+'px; overflow: hidden; position: relative;"><iframe frameborder="0" scrolling="no" seamless="seamless" webkitallowfullscreen="webkitAllowFullScreen" mozallowfullscreen="mozallowfullscreen" allowfullscreen="allowfullscreen" id="okplayer" width="'+t.width+'" height="'+t.height+'" src="https://youtube.com/embed/'+t.token+'?showinfo=0" style="position: absolute; top: 0px; left: 0px; width: '+t.width+"px; height: "+t.height+'px;"></iframe></div>'}},{type:"vimeo",regex:/vimeo.com\/\d+$/i,fetch:function(t,e){var n=t.match(/\d+$/i)[0];(0,i.default)("https://vimeo.com/api/v2/video/"+n+".json").then(function(t){return t.json()}).then(function(i){if(0==i.length)return e(n,"",640,360);var r=i[0];"anywhere"==r.embed_privacy?e({url:t,type:"vimeo",token:n,thumbnail:r.thumbnail_large,duration:r.duration,title:r.title,width:r.width,height:r.height}):alert("Sorry, the author of this video has marked it private, preventing it from being embedded.",function(){})})},tag:function(t){return'<div class="video" style="width: '+t.width+"px; height: "+t.height+'px; overflow: hidden; position: relative;"><iframe frameborder="0" scrolling="no" seamless="seamless" webkitallowfullscreen="webkitAllowFullScreen" mozallowfullscreen="mozallowfullscreen" allowfullscreen="allowfullscreen" id="okplayer" src="https://player.vimeo.com/video/'+t.token+'?api=1&title=0&byline=0&portrait=0&playbar=0&player_id=okplayer&loop=0&autoplay=0" width="'+t.width+'" height="'+t.height+'" style="position: absolute; top: 0px; left: 0px; width: '+t.width+"px; height: "+t.height+'px;"></iframe></div>'}},{type:"link",regex:/^http.+/i,fetch:function(t,e){e({url:t,type:"link",token:"",thumbnail:"",title:"",width:100,height:100})},tag:function(t){return'<a href="'+t.url+'" target="_blank">'+t.url+"</a>"}}],a=e.lookup=s.reduce(function(t,e){return(t[e.type]=e)&&t},{});e.parse=function(t,e){s.some(function(n){return!!n.regex.test(t)&&(n.fetch(t,function(t){e(t)}),!0)})||e(null)},e.tag=function(t){return t.type in a?a[t.type].tag(t):""},e.loadImage=function(t,e,n){a.image.regex.test(t)?a.image.fetch(t,function(t){e(t)}):n&&n()},e.thumbnail=function(t){return'<img src="'+(t.thumbnail||t.url)+'" class="thumb">'},e.tumblr=function(t,e){var n=t.replace(/^https?:\/\//,"").split("/")[0];-1==n.indexOf(".")&&(n+=".tumblr.com"),(0,r.default)("http://"+n+"/api/read").then(function(t){var n=t.posts.reduce(u,[]);e(n)})};function u(t,e){var n=void 0,i=void 0,r=void 0;switch(e.type){case"photo":i=stripHTML(e["photo-caption"]),e.photos.length?e.photos.forEach(function(e){n={url:e["photo-url-1280"],type:"image",token:"",thumbnail:e["photo-url-500"],description:i,width:parseInt(e.width),height:parseInt(e.height)},t.push(n)}):(n={url:e["photo-url-1280"],type:"image",token:"",thumbnail:e["photo-url-500"],description:i,width:parseInt(e.width),height:parseInt(e.height)},t.push(n));break;case"video":if(0!==(r=e["video-source"]).indexOf("http"))break;if(a.youtube.regex.test(r)){var o=(r.match(/v=([-_a-zA-Z0-9]{11})/i)||r.match(/youtu.be\/([-_a-zA-Z0-9]{11})/i)||r.match(/embed\/([-_a-zA-Z0-9]{11})/i))[1].split("&")[0],s="https://i.ytimg.com/vi/"+o+"/hqdefault.jpg";n={url:e["video-source"],type:"youtube",token:o,thumbnail:s,title:stripHTML(e["video-caption"]),width:640,height:360},t.push(n)}}return t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.upload_action=void 0,e.crud_upload=o;var i=n(80);function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e,n,o){return new Promise(function(s,a){var u=n.id;Object.keys(n).forEach(function(t){"id"!==t&&e.append(t,n[t])}),console.log("/api/"+t+"/"+u+"/upload/");var l=new XMLHttpRequest;l.upload.addEventListener("progress",function(e){if(e.lengthComputable){var n=Math.round(100*e.loaded/e.total)||0;n>99?o&&o(r({type:(0,i.as_type)(t,"upload_waiting"),percent:n},t,u)):o&&o(r({type:(0,i.as_type)(t,"upload_progress"),percent:n},t,u))}else o&&o(r({type:(0,i.as_type)(t,"upload_error"),error:"unable to compute upload progress"},t,u))},!1),l.addEventListener("load",function(e){var n=void 0;try{n=JSON.parse(e.target.responseText)}catch(e){return o&&o(r({type:(0,i.as_type)(t,"upload_error"),error:"upload failed"},t,u)),void a(e)}o&&o(r({type:(0,i.as_type)(t,"upload_complete"),data:n},t,u)),n.files&&n.files.length&&n.files.forEach(function(t){console.log(t),o&&o({type:(0,i.as_type)("file","create"),data:t})});s(n)},!1),l.addEventListener("error",function(e){o&&o(r({type:(0,i.as_type)(t,"upload_error"),error:"upload failed"},t,u)),a(e)},!1),l.addEventListener("abort",function(e){o&&o(r({type:(0,i.as_type)(t,"upload_error"),error:"upload cancelled"},t,u)),a(e)},!1),l.open("POST","/api/"+t+"/"+u+"/upload/"),l.send(e),o&&o({type:(0,i.as_type)(t,"upload_loading")})})}e.upload_action=function(t,e,n){return function(i){return o(t,e,n,i)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.crud_action=void 0,e.crud_actions=function(t){var e=(0,i.crud_fetch)(t);return["index","show","create","update","destroy"].reduce(function(n,i){return n[i]=s(t,i,function(t){return e[i](t)}),n},{action:function(e,n){return s(t,e,n)},upload:function(e,n){return(0,o.upload_action)(t,e,n)}})};var i=n(125),r=n(80),o=n(238);var s=e.crud_action=function(t,e,n){return function(i){return function(o){return new Promise(function(s,a){o({type:(0,r.as_type)(t,e+"_loading")}),n(i).then(function(n){o({type:(0,r.as_type)(t,e),data:n}),s(n)}).catch(function(n){o({type:(0,r.as_type)(t,e+"_error")}),a(n)})})}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(10),s=l(n(8)),a=l(n(5)),u=l(n(235));function l(t){return t&&t.__esModule?t:{default:t}}var c=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return i(t,[{key:"componentWillMount",value:function(){s.default.system.changeTool("morph"),document.body.style.backgroundImage="linear-gradient("+(a.default.randint(40)+40)+"deg, #def, #dfe)"}},{key:"componentWillReceiveProps",value:function(){s.default.system.changeTool("morph"),document.body.style.backgroundImage="linear-gradient("+(a.default.randint(40)+40)+"deg, #def, #dfe)"}},{key:"render",value:function(){return(0,r.h)("section",null,(0,r.h)(o.Route,{exact:!0,path:"/morph/app/",component:u.default}))}}]),t}();e.default={name:"morph",router:c,links:function(){return[{url:"/morph/app/",name:"morph"}]}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(1),o=n(2),s=n(10),a=n(3),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(78)),l=n(77),c=(i=l)&&i.__esModule?i:{default:i};function h(t){if(!t.to)return(0,r.h)("span",null,t.children);var e=t.to===t.location.pathname?(0,r.h)("b",null,t.children):t.children;return(0,r.h)("span",null,(0,r.h)(s.Link,{to:t.to},e))}e.default=(0,a.connect)(function(t){return{site:t.system.site,app:t.system.app,fps:t.live.fps,playing:t.live.playing}},function(t,e){return{actions:(0,o.bindActionCreators)(u,t)}})(function(t){var e=t.site,n=t.app,i=t.fps,o=t.playing,s=t.actions,a=t.location,u=t.history,l=Object.keys(c.default).map(function(t,e){var n=t.replace(/_/," ");return(0,r.h)("option",{value:t,key:e},n)}),p=c.default[n.tool].links().map(function(t,e){return(0,r.h)(h,{key:e,location:a,to:t.url},t.name)});return(0,r.h)("header",null,(0,r.h)("span",null,(0,r.h)("b",null,e.name," cortex")),(0,r.h)("span",null,(0,r.h)("select",{onChange:function(t){var e=window.location.pathname.split("/");e.shift(),console.log(e),e[0]in c.default&&e[1]&&u.push("/"+t.target.value+"/"+e[1]+"/"),s.changeTool(t.target.value,!0)},value:n.tool},l)),(0,r.h)(h,{location:a,to:"/system"},"system"),(0,r.h)(h,{location:a,to:"/dashboard"},"dashboard"),(0,r.h)("span",null,p),o&&(0,r.h)("span",null,i," fps"))})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=(n(2),n(3));var s=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"render",value:function(){var t=this.props,e=(t.title,t.images.map(function(t){return(0,r.h)("div",null,(0,r.h)("img",{src:t.url}))}));return(0,r.h)("div",{class:"gallery"},e)}}]),e}();e.default=(0,o.connect)(function(t){return{}},function(t,e){return{}})(s)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(1),o=(n(2),n(3)),s=n(5),a=(i=s)&&i.__esModule?i:{default:i};e.default=(0,o.connect)(function(t){return t.system.runner},function(t,e){return{}})(function(t){var e=t.cpu,n=t.gpu,i=t.processor,o=void 0;i?o="cpu"===i?"cpu":"gpu":"IDLE"!==n.status?o="gpu":"IDLE"!==e.status&&(o="cpu");var s="cpu"===o?e:n;if(!s)return(0,r.h)("div",null);if("IDLE"===s.status)return(0,r.h)("div",null,o," idle");var u=s.last_message,l=s.pid,c=s.task,h=c.activity,p=c.epoch,f=c.epochs,d=c.dataset,y=c.module;return(0,r.h)("div",{className:"currentTask"},"#",l,": ",(0,r.h)("b",null,y," ",h)," ",(0,r.h)("i",null,d),f?(0,r.h)("span",null,f," epoch",a.default.courtesy_s(f)):"",p?(0,r.h)("span",null,"(currently #",p,")"):"",(0,r.h)("br",null),(0,r.h)("br",null),(0,r.h)("div",{class:"quiet"},u))})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(3);n(2),function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);e.default=t}(n(20));var s=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.handleClick=n.handleClick.bind(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"handleClick",value:function(t){clearTimeout(this.timeout);var e=t.target.checked;this.props.onToggle&&this.props.onToggle(e)}},{key:"render",value:function(){var t=this.props.value;this.props.noDim;return(0,r.h)("div",{className:"checkbox param"},(0,r.h)("label",null,(0,r.h)("span",null,this.props.title),(0,r.h)("input",{type:"checkbox",onClick:this.handleClick,checked:t})))}}]),e}();e.default=(0,o.connect)(function(t){return{}},function(t,e){return{}})(s)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=l(n(24)),s=l(n(31)),a=l(n(45)),u=l(n(122));function l(t){return t&&t.__esModule?t:{default:t}}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var h=function(t){function e(){var t,n,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];return n=i=c(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(o))),i.state={x:0,y:0,sum:0},c(i,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"render",value:function(){var t=this,e=this.props,n=e.make,i=e.take,l=e.checkpoint,c=e.onTrain,h=e.onAugment,p=this.state,f=p.x,d=p.y,y=p.sum;return(0,r.h)(o.default,{className:"augmentationGrid"},(0,r.h)(u.default,{x:n,y:i,max:5e3,onHover:function(e,n){return t.setState({x:e,y:n})},onClick:function(e,n){t.setState({sum:y+e*n}),h(n,e)}}),(0,r.h)(s.default,{title:"Name"},l.name),(0,r.h)(s.default,{title:"Take"},d),(0,r.h)(s.default,{title:"Make"},f),(0,r.h)(s.default,{title:"Will add to dataset"},f*d),(0,r.h)(s.default,{title:"Total added this epoch"},y),(0,r.h)(s.default,{title:"Sequence length"},l.sequenceCount),(0,r.h)(s.default,{title:"Dataset size"},l.datasetCount),(0,r.h)(a.default,{onClick:function(){t.setState({sum:0}),c()}},"Train"))}}]),e}();e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(3),s=n(2),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(46));var u=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.handleClick=n.handleClick.bind(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"handleClick",value:function(t){var e=this.props,n=e.audioPlayer,i=e.actions;n.playing?i.pause():i.resume()}},{key:"render",value:function(){var t=this.props.audioPlayer;return(0,r.h)("div",{className:"audioPlayer"},(0,r.h)("span",null,this.props.title),(0,r.h)("button",{onClick:this.handleClick},t.playing?"▶":"~"))}}]),e}();e.default=(0,o.connect)(function(t){return{audioPlayer:t.audioPlayer}},function(t,e){return{actions:(0,s.bindActionCreators)(a,t)}})(u)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(10),s=n(2),a=n(3),u=n(19),l=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(47)),c=d(n(123)),h=d(n(86)),p=d(n(85)),f=n(131);function d(t){return t&&t.__esModule?t:{default:t}}function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function _(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var v=function(t){function e(){return y(this,e),m(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return _(e,r.Component),i(e,[{key:"render",value:function(){var t=this;return(0,r.h)(o.BrowserRouter,null,(0,r.h)("div",null,(0,r.h)("div",{className:"diamond"}),(0,r.h)(o.Route,{exact:!0,path:"/",component:c.default}),(0,r.h)(o.Route,{exact:!0,path:"/login",component:c.default}),(0,r.h)(o.Route,{exact:!0,path:"/logout",component:h.default}),(0,r.h)(o.Route,{exact:!0,path:"/signup",component:p.default}),(0,r.h)(o.Route,{path:"/:module",component:function(e){switch(e.location.pathname){case"/login":case"/logout":case"/signup":return null}return t.props.actions.setReturnTo(e.location.pathname),(0,r.h)(o.Redirect,{to:"/login"})}})))}},{key:"componentDidMount",value:function(){document.querySelector(".diamond").style.backgroundImage="linear-gradient("+((0,f.randint)(40)-5)+"deg, #fde, #ffe)"}}]),e}(),g=function(t){function e(){return y(this,e),m(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return _(e,r.Component),i(e,[{key:"render",value:function(){if(!this.props.auth.initialized)return console.log("loading auth"),(0,r.h)("div",{className:"loading"},"Loading");if(this.props.auth.isAuthenticated){if(console.log("authenticated..."),this.props.auth.returnTo){var t=this.props.auth.returnTo;return t&&!t.match(/(login|logout|signup)/i)||(t="/"),console.log("history.push",t),this.props.actions.setReturnTo(null),u.history.push(t),(0,r.h)("div",null,"Launching app")}return console.log("rendering as normal"),(0,r.h)("div",null,this.props.children)}return(0,r.h)(v,this.props)}},{key:"componentDidMount",value:function(){this.props.actions.checkin()}}]),e}();e.default=(0,a.connect)(function(t){return{auth:t.auth}},function(t){return{actions:(0,s.bindActionCreators)(l,t)}})(g)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a(n(247)),r=a(n(123)),o=a(n(86)),s=a(n(85));function a(t){return t&&t.__esModule?t:{default:t}}e.default={Gate:i.default,Login:r.default,Logout:o.default,Signup:s.default}},function(t,e,n){"use strict";var i,r=n(19),o=n(6),s=(i=o)&&i.__esModule?i:{default:i};n(32).socket.on("api_res",function(t){t=function(t){if("string"==typeof t)try{var e=JSON.parse(t);return e}catch(e){return console.error("not valid json"),t}return t}(t);var e=s.default[t.datatype];if(console.log("api_res",t.type,t.datatype),!e)return console.error("socket:api_res bad datatype",t.datatype);switch(t.type){case"create":return(0,r.dispatch)({type:e.create,source:"socket",data:t.data});case"update":return(0,r.dispatch)({type:e.update,source:"socket",data:t.data});case"destroy":return(0,r.dispatch)({type:e.destroy,source:"socket",data:t.data})}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stop_queue=e.start_queue=e.stop_task=e.start_task=e.remove_task=e.add_task=void 0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};e.emit=l;var r,o=n(19),s=n(6),a=(r=s)&&r.__esModule?r:{default:r},u=n(32);function l(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};u.socket.emit("task",i({type:t,task:e},n))}u.socket.on("task_res",function(t){var e=void 0;try{"string"==typeof t?"string"==typeof(e=JSON.parse(t))&&(e=JSON.parse(e)):e=t}catch(t){return void console.warn("problem with json",t)}switch(e.task&&(0,o.dispatch)({type:a.default.task.update,data:e.task}),e.type){case"start":case"stop":break;case"task_begin":(0,o.dispatch)({type:a.default.task.task_begin,task:e.task});break;case"task_finish":(0,o.dispatch)({type:a.default.task.task_finish,task:e.task});break;case"kill":break;case"stdout":return(0,o.dispatch)({type:a.default.system.stdout,data:e});case"stderr":return(0,o.dispatch)({type:a.default.system.stderr,data:e});case"add":case"remove":case"start_queue":case"stop_queue":case"list":case"set_priority":break;case"progress":(0,o.dispatch)({type:a.default.task.progress,task:e.task});break;case"epoch":(0,o.dispatch)({type:a.default.task.epoch,task:e.task});break;case"task_error":return console.log("task error",e);default:return console.log(e),console.log("no such task command",e.type)}});e.add_task=function(t){return l("add",t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})},e.remove_task=function(t){return l("remove",t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})},e.start_task=function(t){return l("start",t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})},e.stop_task=function(t){return l("stop",t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})},e.start_queue=function(){return l("start_queue",{},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},e.stop_queue=function(){return l("stop_queue",{},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}},function(t,e,n){"use strict";function i(t){if(this.size=0|t,this.size<=1||0!=(this.size&this.size-1))throw new Error("FFT size must be a power of two and bigger than 1");this._csize=t<<1;for(var e=new Array(2*this.size),n=0;n<e.length;n+=2){const t=Math.PI*n/this.size;e[n]=Math.cos(t),e[n+1]=-Math.sin(t)}this.table=e;for(var i=0,r=1;this.size>r;r<<=1)i++;this._width=i%2==0?i-1:i,this._bitrev=new Array(1<<this._width);for(var o=0;o<this._bitrev.length;o++){this._bitrev[o]=0;for(var s=0;s<this._width;s+=2){var a=this._width-s-2;this._bitrev[o]|=(o>>>s&3)<<a}}this._out=null,this._data=null,this._inv=0}t.exports=i,i.prototype.fromComplexArray=function(t,e){for(var n=e||new Array(t.length>>>1),i=0;i<t.length;i+=2)n[i>>>1]=t[i];return n},i.prototype.createComplexArray=function(){const t=new Array(this._csize);for(var e=0;e<t.length;e++)t[e]=0;return t},i.prototype.toComplexArray=function(t,e){for(var n=e||this.createComplexArray(),i=0;i<n.length;i+=2)n[i]=t[i>>>1],n[i+1]=0;return n},i.prototype.completeSpectrum=function(t){for(var e=this._csize,n=e>>>1,i=2;i<n;i+=2)t[e-i]=t[i],t[e-i+1]=-t[i+1]},i.prototype.transform=function(t,e){if(t===e)throw new Error("Input and output buffers must be different");this._out=t,this._data=e,this._inv=0,this._transform4(),this._out=null,this._data=null},i.prototype.realTransform=function(t,e){if(t===e)throw new Error("Input and output buffers must be different");this._out=t,this._data=e,this._inv=0,this._realTransform4(),this._out=null,this._data=null},i.prototype.inverseTransform=function(t,e){if(t===e)throw new Error("Input and output buffers must be different");this._out=t,this._data=e,this._inv=1,this._transform4();for(var n=0;n<t.length;n++)t[n]/=this.size;this._out=null,this._data=null},i.prototype._transform4=function(){var t,e,n=this._out,i=this._csize,r=1<<this._width,o=i/r<<1,s=this._bitrev;if(4===o)for(t=0,e=0;t<i;t+=o,e++){const n=s[e];this._singleTransform2(t,n,r)}else for(t=0,e=0;t<i;t+=o,e++){const n=s[e];this._singleTransform4(t,n,r)}var a=this._inv?-1:1,u=this.table;for(r>>=2;r>=2;r>>=2){var l=(o=i/r<<1)>>>2;for(t=0;t<i;t+=o)for(var c=t+l,h=t,p=0;h<c;h+=2,p+=r){const t=h,e=t+l,i=e+l,r=i+l,o=n[t],s=n[t+1],c=n[e],f=n[e+1],d=n[i],y=n[i+1],m=n[r],_=n[r+1],v=o,g=s,b=u[p],w=a*u[p+1],k=c*b-f*w,S=c*w+f*b,T=u[2*p],x=a*u[2*p+1],O=d*T-y*x,P=d*x+y*T,A=u[3*p],E=a*u[3*p+1],C=m*A-_*E,M=m*E+_*A,R=v+O,j=g+P,F=v-O,N=g-P,L=k+C,D=S+M,q=a*(k-C),I=a*(S-M),B=R+L,U=j+D,z=R-L,Y=j-D,W=F+I,G=N-q,V=F-I,H=N+q;n[t]=B,n[t+1]=U,n[e]=W,n[e+1]=G,n[i]=z,n[i+1]=Y,n[r]=V,n[r+1]=H}}},i.prototype._singleTransform2=function(t,e,n){const i=this._out,r=this._data,o=r[e],s=r[e+1],a=r[e+n],u=r[e+n+1],l=o+a,c=s+u,h=o-a,p=s-u;i[t]=l,i[t+1]=c,i[t+2]=h,i[t+3]=p},i.prototype._singleTransform4=function(t,e,n){const i=this._out,r=this._data,o=this._inv?-1:1,s=2*n,a=3*n,u=r[e],l=r[e+1],c=r[e+n],h=r[e+n+1],p=r[e+s],f=r[e+s+1],d=r[e+a],y=r[e+a+1],m=u+p,_=l+f,v=u-p,g=l-f,b=c+d,w=h+y,k=o*(c-d),S=o*(h-y),T=m+b,x=_+w,O=v+S,P=g-k,A=m-b,E=_-w,C=v-S,M=g+k;i[t]=T,i[t+1]=x,i[t+2]=O,i[t+3]=P,i[t+4]=A,i[t+5]=E,i[t+6]=C,i[t+7]=M},i.prototype._realTransform4=function(){var t,e,n=this._out,i=this._csize,r=1<<this._width,o=i/r<<1,s=this._bitrev;if(4===o)for(t=0,e=0;t<i;t+=o,e++){const n=s[e];this._singleRealTransform2(t,n>>>1,r>>>1)}else for(t=0,e=0;t<i;t+=o,e++){const n=s[e];this._singleRealTransform4(t,n>>>1,r>>>1)}var a=this._inv?-1:1,u=this.table;for(r>>=2;r>=2;r>>=2){var l=(o=i/r<<1)>>>1,c=l>>>1,h=c>>>1;for(t=0;t<i;t+=o)for(var p=0,f=0;p<=h;p+=2,f+=r){var d=t+p,y=d+c,m=y+c,_=m+c,v=n[d],g=n[d+1],b=n[y],w=n[y+1],k=n[m],S=n[m+1],T=n[_],x=n[_+1],O=v,P=g,A=u[f],E=a*u[f+1],C=b*A-w*E,M=b*E+w*A,R=u[2*f],j=a*u[2*f+1],F=k*R-S*j,N=k*j+S*R,L=u[3*f],D=a*u[3*f+1],q=T*L-x*D,I=T*D+x*L,B=O+F,U=P+N,z=O-F,Y=P-N,W=C+q,G=M+I,V=a*(C-q),H=a*(M-I),Z=B+W,Q=U+G,K=z+H,X=Y-V;if(n[d]=Z,n[d+1]=Q,n[y]=K,n[y+1]=X,0!==p){if(p!==h){var $=z+-a*H,J=-Y+-a*V,tt=B+-a*W,et=-U- -a*G,nt=t+c-p,it=t+l-p;n[nt]=$,n[nt+1]=J,n[it]=tt,n[it+1]=et}}else{var rt=B-W,ot=U-G;n[m]=rt,n[m+1]=ot}}}},i.prototype._singleRealTransform2=function(t,e,n){const i=this._out,r=this._data,o=r[e],s=r[e+n],a=o+s,u=o-s;i[t]=a,i[t+1]=0,i[t+2]=u,i[t+3]=0},i.prototype._singleRealTransform4=function(t,e,n){const i=this._out,r=this._data,o=this._inv?-1:1,s=2*n,a=3*n,u=r[e],l=r[e+n],c=r[e+s],h=r[e+a],p=u+c,f=u-c,d=l+h,y=o*(l-h),m=p+d,_=f,v=-y,g=p-d,b=f,w=y;i[t]=m,i[t+1]=0,i[t+2]=_,i[t+3]=v,i[t+4]=g,i[t+5]=0,i[t+6]=b,i[t+7]=w}},function(t,e){t.exports={construct:function(t,e,n){var i=[];switch(t){case"ham":for(var r=0;r<e;r++)i[r]=.54-.46*Math.cos(2*Math.PI*r/(e-1));break;case"tukey":var o=e-1,s=n*o;for(r=0;r<e;r++)i[r]=r<s/2?.5*(1+Math.cos(Math.PI*(2*e/s-1))):r>o*(1-n/2)?.5*(1+Math.cos(Math.PI*(2*e/s-2/n+1))):1;break;case"rectangular":for(r=0;r<e;r++)i[r]=1}return i}}},function(t,e){var n=function(t){t=t||{},this.frameIx=0,this.frameSize=t.frameSize||64,this.frameStep=t.frameStep||this.frameSize,this.map=t.map||void 0,this.scale=t.scale||void 0,this.offset=t.offset?t.offset:0,this.sampleType=t.sampleType||"UInt8",this.wordSize=t.wordSize||1};n.prototype={frame:function(t,e){var n=this,i=this.offset,r=[],o="[object Array]"===Object.prototype.toString.call(t);for(n.frameIx=0;i<t.length;){var s=o?t[i]:t["read"+n.sampleType](i);r.push(this.map?this.map[s]:s),r.length!=this.frameSize&&i+n.wordSize!=t.length||a(r),i+=n.wordSize}function a(r){this.scale&&(r=r.map(function(t,e){return t*n.scale[e]})),e(r,n.frameIx),i!=t.length-n.wordSize&&(i-=(n.frameSize-n.frameStep)*n.wordSize,n.frameIx++,r.length=0)}0==this.frameIx&&e(void 0)}},t.exports=n},function(t,e,n){t.exports={framer:n(253),windows:n(252)}},function(t,e,n){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(){function t(t,e){for(var n,i=function(t){for(var e=t[0].width,n=t[0].height,i=t[0].duration,r=1;r<t.length;r++){if(t[r].width!=e)throw"Frame "+(r+1)+" has a different width";if(t[r].height!=n)throw"Frame "+(r+1)+" has a different height";if(t[r].duration<0||t[r].duration>32767)throw"Frame "+(r+1)+" has a weird duration (must be between 0 and 32767)";i+=t[r].duration}return{duration:i,width:e,height:n}}(t),r=[{id:440786851,data:[{data:1,id:17030},{data:1,id:17143},{data:4,id:17138},{data:8,id:17139},{data:"webm",id:17026},{data:2,id:17031},{data:2,id:17029}]},{id:408125543,data:[{id:357149030,data:[{data:1e6,id:2807729},{data:"whammy",id:19840},{data:"whammy",id:22337},{data:(n=i.duration,[].slice.call(new Uint8Array(new Float64Array([n]).buffer),0).map(function(t){return String.fromCharCode(t)}).reverse().join("")),id:17545}]},{id:374648427,data:[{id:174,data:[{data:1,id:215},{data:1,id:29637},{data:0,id:156},{data:"und",id:2274716},{data:"V_VP8",id:134},{data:"VP8",id:2459272},{data:1,id:131},{id:224,data:[{data:i.width,id:176},{data:i.height,id:186}]}]}]},{id:475249515,data:[]}]}],o=r[1],u=o.data[2],l=0,c=0;l<t.length;){var h={id:187,data:[{data:Math.round(c),id:179},{id:183,data:[{data:1,id:247},{data:0,size:8,id:241}]}]};u.data.push(h);var p=[],f=0;do{p.push(t[l]),f+=t[l].duration,l++}while(l<t.length&&f<3e4);var d=0,y={id:524531317,data:[{data:Math.round(c),id:231}].concat(p.map(function(t){var e=a({discardable:0,frame:t.data.slice(4),invisible:0,keyframe:1,lacing:0,trackNum:1,timecode:Math.round(d)});return d+=t.duration,{data:e,id:163}}))};o.data.push(y),c+=f}for(var m=0,_=0;_<o.data.length;_++){_>=3&&(u.data[_-3].data[1].data[1].data=m);var v=s([o.data[_]],e);m+=v.size||v.byteLength||v.length,2!=_&&(o.data[_]=v)}return s(r,e)}function e(t){for(var e=[];t>0;)e.push(255&t),t>>=8;return new Uint8Array(e.reverse())}function n(t,e){for(var n=new Uint8Array(e),i=e-1;i>=0;i--)n[i]=255&t,t>>=8;return n}function r(t){for(var e=new Uint8Array(t.length),n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}function o(t){var e=[];t=(t.length%8?new Array(9-t.length%8).join("0"):"")+t;for(var n=0;n<t.length;n+=8)e.push(parseInt(t.substr(n,8),2));return new Uint8Array(e)}function s(t,a){for(var u=[],l=0;l<t.length;l++)if("id"in t[l]){var c=t[l].data;if("object"==(void 0===c?"undefined":i(c))&&(c=s(c,a)),"number"==typeof c&&(c="size"in t[l]?n(c,t[l].size):o(c.toString(2))),"string"==typeof c&&(c=r(c)),c.length);var h=c.size||c.byteLength||c.length,p=Math.ceil(Math.ceil(Math.log(h)/Math.log(2))/8),f=h.toString(2),d=new Array(7*p+7+1-f.length).join("0")+f,y=new Array(p).join("0")+"1"+d;u.push(e(t[l].id)),u.push(o(y)),u.push(c)}else u.push(t[l]);if(a){var m=function t(e,n){null==n&&(n=[]);for(var r=0;r<e.length;r++)"object"==i(e[r])?t(e[r],n):n.push(e[r]);return n}(u);return new Uint8Array(m)}return new Blob(u,{type:"video/webm"})}function a(t){var e=0;if(t.keyframe&&(e|=128),t.invisible&&(e|=8),t.lacing&&(e|=t.lacing<<1),t.discardable&&(e|=1),t.trackNum>127)throw"TrackNumber > 127 not supported";return[128|t.trackNum,t.timecode>>8,255&t.timecode,e].map(function(t){return String.fromCharCode(t)}).join("")+t.frame}function u(t){for(var e,n,i=t.RIFF[0].WEBP[0],r=i.indexOf("*"),o=0,s=[];o<4;o++)s[o]=i.charCodeAt(r+3+o);return e=16383&(n=s[1]<<8|s[0]),n>>14,(n=s[3]<<8|s[2])>>14,{width:e,height:16383&n,data:i,riff:t}}function l(t){for(var e=0,n={};e<t.length;){var i=t.substr(e,4);if(n[i]=n[i]||[],"RIFF"==i||"LIST"==i){var r=parseInt(t.substr(e+4,4).split("").map(function(t){var e=t.charCodeAt(0).toString(2);return new Array(8-e.length+1).join("0")+e}).join(""),2),o=t.substr(e+4+4,r);e+=8+r,n[i].push(l(o))}else"WEBP"==i?(n[i].push(t.substr(e+8)),e=t.length):(n[i].push(t.substr(e+4)),e=t.length)}return n}function c(t,e){this.frames=[],this.duration=1e3/t,this.quality=e||.8}return c.prototype.add=function(t,e){if(void 0!==e&&this.duration)throw"you can't pass a duration if the fps is set";if(void 0===e&&!this.duration)throw"if you don't have the fps set, you need to have durations here.";if(t.canvas&&(t=t.canvas),t.toDataURL)t=t.getContext("2d-lodpi").getImageData(0,0,t.width,t.height);else if("string"!=typeof t)throw"frame must be a a HTMLCanvasElement, a CanvasRenderingContext2D or a DataURI formatted string";if("string"==typeof t&&!/^data:image\/webp;base64,/gi.test(t))throw"Input must be formatted properly as a base64 encoded DataURI of type image/webp";this.frames.push({image:t,duration:e||this.duration})},c.prototype.encodeFrames=function(t){if(this.frames[0].image instanceof ImageData){var e=this.frames,n=document.createElement("canvas"),i=n.getContext("2d-lodpi");n.width=this.frames[0].image.width,n.height=this.frames[0].image.height;var r=function(o){console.log("encodeFrame",o);var s=e[o];i.putImageData(s.image,0,0),s.image=n.toDataURL("image/webp",this.quality),o<e.length-1?setTimeout(function(){r(o+1)},1):t()}.bind(this);r(0)}else t()},c.prototype.compile=function(e,n){this.encodeFrames(function(){var i=0,r=0,o=new t(this.frames.map(function(t){var e=u(l(atob(t.image.slice(23))));if(e.duration=t.duration,!e||!e.width||!e.height)return null;if(i){if(i!==e.width)return null}else i=e.width;if(r){if(r!==e.height)return null}else r=e.height;return e}).filter(function(t){return!!t}),e);n(o)}.bind(this))},{Video:c,fromImageArray:function(e,n,i){return t(e.map(function(t){var e=u(l(atob(t.slice(23))));return e.duration=1e3/n,e}),i)},toWebM:t}}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.list_checkpoints=function(t){u.socket.emit("cmd",{cmd:"list_checkpoints",payload:t})},e.list_all_checkpoints=function(t){u.socket.emit("cmd",{cmd:"list_all_checkpoints",payload:t})},e.list_epochs=function(t,e){u.socket.emit("cmd",{cmd:"list_epochs",payload:"pix2pix"===t||"pix2wav"===t?t+"/"+e:e})},e.list_sequences=function(t){u.socket.emit("cmd",{cmd:"list_sequences",payload:t})},e.load_epoch=function(t,e){console.log(">> SWITCH CHECKPOINT",t,e),u.socket.emit("cmd",{cmd:"load_epoch",payload:t+":"+e})},e.load_sequence=function(t){u.socket.emit("cmd",{cmd:"load_sequence",payload:t})},e.seek=function(t){u.socket.emit("cmd",{cmd:"seek",payload:t})},e.pause=function(t){u.socket.emit("cmd",{cmd:"pause"})},e.play=function(t){u.socket.emit("cmd",{cmd:"play"})},e.get_params=function(){u.socket.emit("cmd",{cmd:"get_params"})},e.set_param=function(t,e){u.socket.emit("cmd",{cmd:"set_param",payload:{key:t,value:e}})};var i,r=n(19),o=n(6),s=(i=o)&&i.__esModule?i:{default:i},a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(49)),u=n(32);u.socket.on("res",function(t){switch(t.cmd){case"get_last_frame":"working"!==t.res&&u.socket.emit("cmd",{cmd:"get_last_frame"});break;case"get_params":t.res&&(0,r.dispatch)({type:s.default.socket.load_params,opt:t.res}),t.res&&a.toggleFPS(t.res.processing);break;case"list_checkpoints":(0,r.dispatch)({type:s.default.socket.list_checkpoints,checkpoints:t.res});break;case"list_all_checkpoints":(0,r.dispatch)({type:s.default.socket.list_all_checkpoints,checkpoints:t.res});break;case"list_epochs":(0,r.dispatch)({type:s.default.socket.list_epochs,epochs:t.res});break;case"list_sequences":(0,r.dispatch)({type:s.default.socket.list_sequences,sequences:t.res})}}),u.socket.on("frame",a.onFrame)},function(t,e,n){"use strict";var i,r=n(19),o=n(6),s=(i=o)&&i.__esModule?i:{default:i};n(32).socket.on("system_res",function(t){switch(t.type){case"relay_connected":return(0,r.dispatch)({type:s.default.system.relay_connected});case"relay_disconnected":return(0,r.dispatch)({type:s.default.system.relay_disconnected});case"rpc_connected":return(0,r.dispatch)({type:s.default.system.rpc_connected,runner:t.runner});case"rpc_disconnected":return(0,r.dispatch)({type:s.default.system.rpc_disconnected});case"relay_status":return(0,r.dispatch)({type:t.rpc_connected?s.default.system.rpc_connected:s.default.system.rpc_disconnected,runner:t.runner});case"site":return(0,r.dispatch)({type:s.default.system.load_site,site:t.site})}})},function(t,e){for(var n=[],i=0;i<256;++i)n[i]=(i+256).toString(16).substr(1);t.exports=function(t,e){var i=e||0,r=n;return r[t[i++]]+r[t[i++]]+r[t[i++]]+r[t[i++]]+"-"+r[t[i++]]+r[t[i++]]+"-"+r[t[i++]]+r[t[i++]]+"-"+r[t[i++]]+r[t[i++]]+"-"+r[t[i++]]+r[t[i++]]+r[t[i++]]+r[t[i++]]+r[t[i++]]+r[t[i++]]}},function(t,e){var n="undefined"!=typeof crypto&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&msCrypto.getRandomValues.bind(msCrypto);if(n){var i=new Uint8Array(16);t.exports=function(){return n(i),i}}else{var r=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),r[e]=t>>>((3&e)<<3)&255;return r}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=s(n(6)),o=s(n(50));function s(t){return t&&t.__esModule?t:{default:t}}var a={loading:!0,progress:{i:0,n:0},error:null,folders:[],folder_id:0,data:null,lossReport:null,results:null};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,e=arguments[1];if(e.data&&"samplernn"===e.data.module)return(0,o.default)(t,e);switch(e.type){case r.default.samplernn.load_loss:return i({},t,{lossReport:e.lossReport});case r.default.samplernn.load_graph:return i({},t,{lossReport:e.lossReport,results:e.results});default:return t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=a(n(6)),o=a(n(50)),s=a(n(5));function a(t){return t&&t.__esModule?t:{default:t}}var u={loading:!0,progress:{i:0,n:0},status:"",error:null,folder_id:0,data:null};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,e=arguments[1];switch(e.data&&"pix2wav"===e.data.module&&(t=(0,o.default)(t,e)),e.type){case r.default.wav2pix.load:return i({},t,{status:"Loaded buffer"});case r.default.wav2pix.progress:return i({},t,{status:"Rendering frame "+e.count});case r.default.wav2pix.finish:return i({},t,{status:e.message||"Render complete"});case r.default.wav2pix.zip:return i({},t,{status:"Built zip file "+s.default.hush_size(t.size)[1]});case r.default.wav2pix.uploading:return i({},t,{status:"Uploading zip file"});default:return t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=s(n(6)),o=s(n(50));function s(t){return t&&t.__esModule?t:{default:t}}var a={loading:!0,progress:{i:0,n:0},error:null,folder_id:0,data:null,results:null,checkpoint:{name:"",sequenceCount:0,datasetCount:0}};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,e=arguments[1];switch(e.data&&"pix2pixhd"===e.data.module&&(t=(0,o.default)(t,e)),e.type){case r.default.pix2pixhd.load_results:return i({},t,{results:e.results});case r.default.pix2pixhd.load_dataset_count:return i({},t,{checkpoint:e.data});case r.default.file.destroy:return console.log("file destroy",t.results),i({},t,{results:i({},t.results,{files:t.results.files.filter(function(t){return t.id!==e.data.id})})});default:return t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});r(n(6));var i=r(n(50));function r(t){return t&&t.__esModule?t:{default:t}}var o={loading:!0,progress:{i:0,n:0},error:null,folder_id:0,data:null};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o,e=arguments[1];return e.data&&"pix2pix"===e.data.module&&(t=(0,i.default)(t,e)),e.type,t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=s(n(6)),o=s(n(50));function s(t){return t&&t.__esModule?t:{default:t}}var a={loading:!0,progress:{i:0,n:0},error:null,folder_id:0,data:null,app:null};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,e=arguments[1];switch(e.data&&"morph"===e.data.module&&(t=(0,o.default)(t,e)),e.type){case r.default.morph.load:return console.log("morph load",e.app),i({},t,{app:e.app,loading:!1,data:e.data});case r.default.file.create:return console.log(e),"morph"!==e.data.module?t:i({},t,{app:t.app&&i({},t.app,{files:[e.data].concat(t.app.files)})});default:return t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.moduleReducer=void 0;var i=n(2),r=l(n(264)),o=l(n(263)),s=l(n(262)),a=l(n(261)),u=l(n(260));function l(t){return t&&t.__esModule?t:{default:t}}e.moduleReducer=(0,i.combineReducers)({morph:r.default,pix2pix:o.default,pix2pixhd:s.default,pix2wav:a.default,samplernn:u.default})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},o=n(6),s=(i=o)&&i.__esModule?i:{default:i};var a={loading:!1,error:null,status:"",current:null,index:-1,playlist:[]},u=document.createElement("audio");e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,e=arguments[1];switch(e.type){case s.default.audioPlayer.play:return e.file.url?(u.src=e.file.url,u.play(),r({},t,{playing:!0,current:e.file})):t;case s.default.audioPlayer.pause:return u.pause(),r({},t,{playing:!1});case s.default.audioPlayer.resume:return u.play(),r({},t,{playing:!0});default:return t}}},function(t,e,n){"use strict";var i,r,o,s,a;i=window.CanvasRenderingContext2D.prototype,r=window.document.createElement("canvas").getContext("2d"),o=r.backingStorePixelRatio||r.webkitBackingStorePixelRatio||r.mozBackingStorePixelRatio||r.msBackingStorePixelRatio||r.oBackingStorePixelRatio||r.backingStorePixelRatio||1,1!==(a=(window.devicePixelRatio||1)/o)&&(function(t,e){for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)}({fillRect:"all",clearRect:"all",strokeRect:"all",moveTo:"all",lineTo:"all",arc:[0,1,2],arcTo:"all",bezierCurveTo:"all",isPointinPath:"all",isPointinStroke:"all",quadraticCurveTo:"all",rect:"all",translate:"all",createRadialGradient:"all",createLinearGradient:"all"},function(t,e){var n;i[e]=(n=i[e],function(){var e,i,r=Array.prototype.slice.call(arguments);if("all"===t)r=r.map(function(t){return t*a});else if(Array.isArray(t))for(e=0,i=t.length;e<i;e++)r[t[e]]*=a;return n.apply(this,r)})}),i.stroke=(s=i.stroke,function(){this.lineWidth*=a,s.apply(this,arguments),this.lineWidth/=a}),i.fillText=function(t){return function(){var e=Array.prototype.slice.call(arguments);e[1]*=a,e[2]*=a,this.font=this.font.replace(/(\d+)(px|em|rem|pt)/g,function(t,e,n){return e*a+n}),t.apply(this,e),this.font=this.font.replace(/(\d+)(px|em|rem|pt)/g,function(t,e,n){return e/a+n})}}(i.fillText),i.strokeText=function(t){return function(){var e=Array.prototype.slice.call(arguments);e[1]*=a,e[2]*=a,this.font=this.font.replace(/(\d+)(px|em|rem|pt)/g,function(t,e,n){return e*a+n}),t.apply(this,e),this.font=this.font.replace(/(\d+)(px|em|rem|pt)/g,function(t,e,n){return e/a+n})}}(i.strokeText)),function(t){var e;t.getContext=(e=t.getContext,function(t){var n,i,r;return"2d-lodpi"==t?r=e.call(this,"2d"):"2d"===t?(n=(r=e.call(this,"2d")).backingStorePixelRatio||r.webkitBackingStorePixelRatio||r.mozBackingStorePixelRatio||r.msBackingStorePixelRatio||r.oBackingStorePixelRatio||r.backingStorePixelRatio||1,(i=(window.devicePixelRatio||1)/n)>1&&(this.style.height=this.height+"px",this.style.width=this.width+"px",this.width*=i,this.height*=i)):r=e.call(this,t),r})}(window.HTMLCanvasElement.prototype)},function(t,e,n){"use strict";function i(t,e){e=e||1024;var n,i=[],r=0,o=Math.floor;t>e&&(t/=e,i.unshift(o(10*t%10)),i.unshift("."));do{n=t%10,!(t=o(t/10))||++r%3||(n=" "+o(n)),i.unshift(o(n))}while(t);return i.join("")}Object.defineProperty(e,"__esModule",{value:!0}),e.timeInSeconds=function(t){return(t/10).toFixed(1)+" s."},e.gerund=function(t){return t.replace(/e?$/,"ing")},e.commatize=i,e.carbon_date=function(t,e){var n,i=(+new Date-new Date(t))/1e3;n=!e&&i<86400?"new":i<604800?"recent":i<1209600?"med":i<3024e3?"old":i<12315200?"older":"quiet";return n},e.hush_views=function(t,e,n){var r=i(t,1e3);if(e=e||1,(t=t||0)<30)return["quiet",t+" v."];return t<200?["quiet",r+" v."]:t<500?["quiet",r+" v."]:t<1e3?["old",r+" v."]:t<5e3?["med",r+" kv."]:n||t<1e4?["recent",r+" kv."]:["new",r+" kv."]},e.hush_threads=function(t,e,n){var r=i(t,1e3);return e=e||1,(t=t||0)<10?["quiet",t+" t."]:t<25?["old",r+" t."]:t<50?["med",r+" t."]:n||t<100?["recent",r+" t."]:["new",r+" t."]},e.hush_size=function(t,e,n){var r=i(Math.round(t/1024));if(e=1,!(t=t||0))return["",""];if(t<1e3)return["quiet",t+" b."];return t<1e6?["quiet",r+" kb."]:t<2e7/e?["quiet",r+" mb."]:t<5e7/e?["old",r+" mb."]:t<8e7/e?["med",r+" mb."]:n||t<17e7/e?["recent",r+" mb."]:["new",r+" mb."]},e.hush_null=function(t,e,n){var i=e?t+" "+e+".":t;return t<3?["quiet",i]:t<6?["older",i]:t<10?["old",i]:t<16?["med",i]:n||t<21?["recent",i]:["new",i]},e.get_age=function(t){var e,n=Math.abs(+Date.now()-new Date(t))/1e3,i=Math.floor;if(n<5)return"now";if(n<60)return i(n)+"s";if((n/=60)<60)return i(n)+"m";if(e=i(n%60),n/=60,e>0&&n<2)return i(n)+"h"+e+"m";if(n<24)return i(n)+"h";if((n/=24)<7)return i(n)+"d";if((n/=7)<12)return i(n)+"w";if((n/=4)<12)return i(n)+"m";return i(n/=12)+"y"},e.courtesy_s=function(t,e){return 1==t?"":e||"s"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=e.numericSort={asc:function(t,e){return t[0]-e[0]},desc:function(t,e){return e[0]-t[0]}},o=e.stringSort={asc:function(t,e){return t[0].localeCompare(e[0])},desc:function(t,e){return e[0].localeCompare(t[0])}};e.orderByFn=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"name asc").split(" "),e=i(t,2),n=e[0],s=void 0===n?"name":n,a=e[1],u=void 0===a?"asc":a,l=void 0,c=void 0;switch(s){case"epoch":l=function(t){return[parseInt(t.epoch||t.epochs)||0,t]},c=r[u];break;case"size":l=function(t){return[parseInt(t.size)||0,t]},c=r[u];break;case"date":l=function(t){return[+new Date(t.date||t.created_at),t]},c=r[u];break;case"updated_at":l=function(t){return[+new Date(t.updated_at),t]},c=r[u];break;case"priority":l=function(t){return[parseInt(t.priority)||parseInt(t.id)||1e3,t]},c=r[u];case"name":default:l=function(t){return[t.name||"",t]},c=o[u]}return{mapFn:l,sortFn:c}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=s(n(6)),o=s(n(5));s(n(33));function s(t){return t&&t.__esModule?t:{default:t}}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var u={loading:!1,error:null,tasks:{},queue:[],completed:[]},l=o.default.sort.orderByFn("updated_at desc"),c=o.default.sort.orderByFn("priority asc");e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,e=arguments[1];switch(e.type){case r.default.task.index:return i({},t,{tasks:e.data.reduce(function(t,e){return t[e.id]=e,t},{}),queue:e.data.filter(function(t){return!t.completed}).map(l.mapFn).sort(l.sortFn).map(function(t){return t[1].id}),completed:e.data.filter(function(t){return t.completed}).map(c.mapFn).sort(c.sortFn).map(function(t){return t[1].id})});case r.default.task.create:return console.log(e.data),i({},t,{tasks:i({},t.tasks,a({},e.data.id,e.data)),queue:t.queue.concat([e.data.id])});case r.default.task.update:return i({},t,{tasks:i({},t.tasks,a({},e.data.id,e.data))});case r.default.task.destroy:var n=t.tasks,o=n[e.data.id],s=function(t,e){var n={};for(var i in t)e.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(n,[e.data.id]);return i({},t,{queue:t.queue.filter(function(t){return t!==o.id}),completed:t.completed.filter(function(t){return t!==o.id}),tasks:s});case r.default.task.task_finish:return i({},t,{queue:t.queue.filter(function(t){return t!==e.task.id}),completed:[e.task.id].concat(t.completed)});default:return t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(6),o=(i=r)&&i.__esModule?i:{default:i};var s={loading:!1,error:null,status:""};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,e=arguments[1];switch(e.type){case o.default.folder.upload_loading:return{error:null,loading:!0,status:"Loading..."};case o.default.folder.upload_error:return{error:null,loading:!1,status:"Error uploading :("};case o.default.folder.upload_progress:return{error:null,loading:!0,status:"Upload progress "+e.percent+"%"};case o.default.folder.upload_waiting:return{error:null,loading:!0,status:"Waiting for server to finish processing..."};case o.default.folder.upload_complete:return{error:null,loading:!1,status:"Upload complete"};case o.default.file.create_loading:return{error:null,loading:!0,status:"Creating file..."};default:return t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=a(n(33)),o=a(n(79)),s=a(n(6));function a(t){return t&&t.__esModule?t:{default:t}}var u={loading:!1,error:null,opt:{hue:0,saturation:0,luminosity:0,sequence_playing:!0,sequence_step:1,recurse_roll:0,rotate:0,scale:0,process_frac:.5,view_mode:"b"},all_checkpoints:[],checkpoints:[],epochs:["latest"],sequences:[],fps:0,playing:!1,last_message:"",fullscreen:!1,frame:{i:0,sequence_i:0,sequence_len:"1"}};e.default=function(){var t,e,n,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,l=arguments[1];switch(l.type){case s.default.socket.load_params:return l.opt&&Object.keys(l.opt).length?i({},a,{loading:!1,error:null,opt:l.opt}):a;case s.default.player.set_param:return i({},a,{opt:i({},a.opt,(t={},e=l.key,n=l.value,e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t))});case s.default.player.set_fullscreen:return i({},a,{fullscreen:l.value});case s.default.socket.list_checkpoints:return i({},a,{checkpoints:l.checkpoints,epochs:[]});case s.default.socket.list_all_checkpoints:return i({},a,{all_checkpoints:l.all_checkpoints,epochs:[]});case s.default.socket.list_epochs:return console.log(l),"not found"===l.epochs?i({},a,{epochs:[]}):i({},a,{epochs:(l.epochs||[]).map(function(t){return["latest"==t?1/0:t,t]}).sort(function(t,e){return t[0]-e[0]}).map(function(t){return t[1]})});case s.default.socket.list_sequences:return i({},a,{sequences:l.sequences});case s.default.player.loading_sequence:return i({},a,{opt:i({},a.opt,{sequence_name:l.sequence_name})});case s.default.player.loading_checkpoint:return i({},a,{opt:i({},a.opt,{checkpoint_name:l.checkpoint_name,epoch:l.epoch})});case s.default.player.set_fps:return i({},a,{fps:l.fps});case s.default.system.stdout:return"gpu"===l.data.processor?i({},a,{last_message:l.data.data}):a;case s.default.player.current_frame:return l.meta?i({},a,{frame:l.meta}):a;case s.default.player.pausing:return i({},a,{playing:!1});case s.default.player.playing:return i({},a,{playing:!0});case s.default.player.start_recording:return i({},a,{opt:i({},a.opt,{recording:!0})});case s.default.player.add_record_frame:return i({},a,{opt:i({},a.opt,{recordFrames:(a.opt.recordFrames||0)+1})});case s.default.player.save_frame:return o.default.saveAs(l.blob,a.opt.checkpoint_name+"_"+a.opt.sequence+"_"+(0,r.default)().format("YYYYMMDD_HHmm")+".png"),a;case s.default.player.saving_video:return i({},a,{opt:i({},a.opt,{savingVideo:!0})});case s.default.player.save_video:return o.default.saveAs(l.blob,a.opt.checkpoint_name+"_"+a.opt.sequence+"_"+(0,r.default)().format("YYYYMMDD_HHmm")+".webm"),i({},a,{opt:i({},a.opt,{recording:!1,savingVideo:!1,recordFrames:0})});default:return a}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=o(n(6));o(n(33));function o(t){return t&&t.__esModule?t:{default:t}}n(79);var s={loading:!1,progress:null,error:null,data:{},images:[],files:[]};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,e=arguments[1];switch(e.type){case r.default.app.load_progress:return e.data&&"dashboard"===e.data.module?i({},t,{loading:!0,progress:e.progress}):t;case r.default.dashboard.load:return i({},t,{loading:!1,error:null,data:e.data});default:return t}}},function(t,e){(function(e){t.exports=e}).call(this,{})},function(t,e){t.exports=function(){throw new Error("define cannot be used indirect")}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=o(n(6));o(n(33));function o(t){return t&&t.__esModule?t:{default:t}}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n(79);var a={loading:!1,error:null,site:{name:"loading"},app:{tool:localStorage.getItem("system.last_tool")||"pix2pix"},server:{connected:!1,status:"disconnected",error:null},relay:{connected:!1,status:"unknown",error:null},rpc:{connected:!1,status:"disconnected",error:null},cmd:{loading:!1,loaded:!1,name:null,error:null,stdout:"",stderr:""},runner:{cpu:{status:"IDLE",task:{}},gpu:{status:"IDLE",task:{}}},stdout:"",stderr:""},u=["pix2pix","samplernn","pix2wav"].reduce(function(t,e){return t[e]=e,t},{});e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,e=arguments[1],n=null;switch(e.type){case r.default.socket.connect:case r.default.socket.reconnecting:return i({},t,{server:{status:"connected",connected:!0,error:null}});case r.default.socket.reconnect:return i({},t,{server:{status:"reconnecting (attempt "+e.attempt+")",connected:!1,error:null}});case r.default.socket.connect_error:case r.default.socket.reconnect_error:case r.default.socket.disconnect:case r.default.socket.reconnect_failed:return i({},t,{server:{status:"disconnected",connected:!1,error:e.error||null}});case r.default.socket.error:return i({},t,{server:i({},t.socket,{error:e.error})});case r.default.system.relay_connected:return i({},t,{relay:{status:"connected",connected:!0,error:null}});case r.default.system.relay_disconnected:return i({},t,{relay:{status:"disconnected",connected:!1,error:null},rpc:{status:"disconnected",connected:!1,error:null}});case r.default.system.rpc_connected:return i({},t,{rpc:{status:"connected",connected:!0,error:null},runner:e.runner});case r.default.system.rpc_disconnected:return i({},t,{rpc:{status:"disconnected",connected:!1,error:null},runner:e.runner||t.runner});case r.default.system.load_site:document.querySelector("title").innerHTML=e.site.name+".cortex";var o=t.app.tool,l=window.location.pathname.split("/")[1];return l in u&&(o=l),i({},t,{site:e.site,app:i({},t.app,{tool:o})});case r.default.system.running_command:return i({},t,{cmd:{loading:!0,loaded:!1,name:e.cmd,error:null,stdout:null,stderr:null}});case r.default.system.command_output:return i({},t,{cmd:{loading:!1,loaded:!0,name:e.data.cmd,error:e.data.error,stdout:e.data.stdout,stderr:e.data.stderr}});case r.default.task.task_begin:return console.log("task begin",e.task,e.task.processor),i({},t,{runner:i({},t.runner,s({},e.task.processor,{status:"RUNNING",task:e.task})),cmd:i({},t.cmd,{loaded:!1,stdout:"",stderr:""}),stdout:"",stderr:""});case r.default.task.task_finish:return n="cpu"===e.task.processor||t.runner.cpu.task&&t.runner.cpu.task.uuid===e.task.uuid?"cpu":"gpu"===e.task.processor||t.runner.gpu.task&&t.runner.gpu.task.uuid===e.task.uuid?"gpu":null,console.log("task finish",e),i({},t,{rpc:{connected:!1,status:"disconnected",error:null},runner:n?i({},t.runner,s({},n,{status:"IDLE",task:{}})):t.runner});case r.default.app.change_tool:return i({},t,{app:i({},t.app,{tool:e.tool})});case r.default.system.stdout:return e.data.processor&&t.runner[e.data.processor]?i({},t,{runner:i({},t.runner,s({},e.data.processor,i({},t.runner[e.data.processor],{last_message:e.data.data}))),stdout:t.stdout+e.data.data}):i({},t,{stdout:t.stdout+e.data.data});case r.default.system.stderr:return i({},t,{last_message:e.data.data,stderr:t.stderr+e.data.data});default:return t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},o=n(6),s=(i=o)&&i.__esModule?i:{default:i};var a={token:null,user:{},groups:{},initialized:!1,loading:!1,isAuthenticated:!1,returnTo:null};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,e=arguments[1];switch(console.log(e),e.type){case s.default.auth.set_token:return r({},t,{token:e.data,isAuthenticated:!!e.data,loading:!1,error:null});case s.default.auth.initialized:return r({},t,{loading:!1,initialized:!0,error:null});case s.default.auth.loading:return r({},t,{loading:!0,error:null});case s.default.auth.set_current_user:return r({},t,{loading:!1,initialized:!0,isAuthenticated:!0,user:e.data,error:null});case s.default.auth.set_return_to:return r({},t,{returnTo:e.data});case s.default.auth.logout_user:return r({},a);case s.default.auth.set_error:return r({},t,{loading:!1,error:e.data});case s.default.auth.loading:default:return t}}},function(t,e,n){"use strict";e.__esModule=!0;e.canUseDOM=!("undefined"==typeof window||!window.document||!window.document.createElement),e.addEventListener=function(t,e,n){return t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)},e.removeEventListener=function(t,e,n){return t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent("on"+e,n)},e.getConfirmation=function(t,e){return e(window.confirm(t))},e.supportsHistory=function(){var t=window.navigator.userAgent;return(-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)},e.supportsPopStateOnHashChange=function(){return-1===window.navigator.userAgent.indexOf("Trident")},e.supportsGoWithoutReloadUsingHash=function(){return-1===window.navigator.userAgent.indexOf("Firefox")},e.isExtraneousPopstateEvent=function(t){return void 0===t.state&&-1===navigator.userAgent.indexOf("CriOS")}},function(t,e,n){"use strict";e.__esModule=!0;var i,r=n(133),o=(i=r)&&i.__esModule?i:{default:i};e.default=function(){var t=null,e=[];return{setPrompt:function(e){return(0,o.default)(null==t,"A history supports only one prompt at a time"),t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,i,r){if(null!=t){var s="function"==typeof t?t(e,n):t;"string"==typeof s?"function"==typeof i?i(s,r):((0,o.default)(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),r(!0)):r(!1!==s)}else r(!0)},appendListener:function(t){var n=!0,i=function(){n&&t.apply(void 0,arguments)};return e.push(i),function(){n=!1,e=e.filter(function(t){return t!==i})}},notifyListeners:function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];e.forEach(function(t){return t.apply(void 0,n)})}}}},function(t,e,n){"use strict";n.r(e);var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.default=function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(Array.isArray(e))return Array.isArray(n)&&e.length===n.length&&e.every(function(e,i){return t(e,n[i])});var r=void 0===e?"undefined":i(e);if(r!==(void 0===n?"undefined":i(n)))return!1;if("object"===r){var o=e.valueOf(),s=n.valueOf();if(o!==e||s!==n)return t(o,s);var a=Object.keys(e),u=Object.keys(n);return a.length===u.length&&a.every(function(i){return t(e[i],n[i])})}return!1}},function(t,e,n){"use strict";function i(t){return"/"===t.charAt(0)}function r(t,e){for(var n=e,i=n+1,r=t.length;i<r;n+=1,i+=1)t[n]=t[i];t.pop()}n.r(e),e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t&&t.split("/")||[],o=e&&e.split("/")||[],s=t&&i(t),a=e&&i(e),u=s||a;if(t&&i(t)?o=n:n.length&&(o.pop(),o=o.concat(n)),!o.length)return"/";var l=void 0;if(o.length){var c=o[o.length-1];l="."===c||".."===c||""===c}else l=!1;for(var h=0,p=o.length;p>=0;p--){var f=o[p];"."===f?r(o,p):".."===f?(r(o,p),h++):h&&(r(o,p),h--)}if(!u)for(;h--;h)o.unshift("..");!u||""===o[0]||o[0]&&i(o[0])||o.unshift("");var d=o.join("/");return l&&"/"!==d.substr(-1)&&(d+="/"),d}},function(t,e,n){"use strict";e.__esModule=!0,e.locationsAreEqual=e.createLocation=void 0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=a(n(282)),o=a(n(281)),s=n(132);function a(t){return t&&t.__esModule?t:{default:t}}e.createLocation=function(t,e,n,o){var a=void 0;"string"==typeof t?(a=(0,s.parsePath)(t)).state=e:(void 0===(a=i({},t)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==e&&void 0===a.state&&(a.state=e));try{a.pathname=decodeURI(a.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(a.key=n),o?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=(0,r.default)(a.pathname,o.pathname)):a.pathname=o.pathname:a.pathname||(a.pathname="/"),a},e.locationsAreEqual=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&(0,o.default)(t.state,e.state)}},function(t,e,n){"use strict";t.exports=function(t,e,n,i,r,o,s,a){if(!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,i,r,o,s,a],c=0;(u=new Error(e.replace(/%s/g,function(){return l[c++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}}},function(t,e,n){"use strict";e.__esModule=!0;var i="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},r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},o=h(n(133)),s=h(n(284)),a=n(283),u=n(132),l=h(n(280)),c=n(279);function h(t){return t&&t.__esModule?t:{default:t}}var p=function(){try{return window.history.state||{}}catch(t){return{}}};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.default)(c.canUseDOM,"Browser history needs a DOM");var e=window.history,n=(0,c.supportsHistory)(),h=!(0,c.supportsPopStateOnHashChange)(),f=t.forceRefresh,d=void 0!==f&&f,y=t.getUserConfirmation,m=void 0===y?c.getConfirmation:y,_=t.keyLength,v=void 0===_?6:_,g=t.basename?(0,u.stripTrailingSlash)((0,u.addLeadingSlash)(t.basename)):"",b=function(t){var e=t||{},n=e.key,i=e.state,r=window.location,s=r.pathname+r.search+r.hash;return(0,o.default)(!g||(0,u.hasBasename)(s,g),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+s+'" to begin with "'+g+'".'),g&&(s=(0,u.stripBasename)(s,g)),(0,a.createLocation)(s,i,n)},w=function(){return Math.random().toString(36).substr(2,v)},k=(0,l.default)(),S=function(t){r(L,t),L.length=e.length,k.notifyListeners(L.location,L.action)},T=function(t){(0,c.isExtraneousPopstateEvent)(t)||P(b(t.state))},x=function(){P(b(p()))},O=!1,P=function(t){O?(O=!1,S()):k.confirmTransitionTo(t,"POP",m,function(e){e?S({action:"POP",location:t}):A(t)})},A=function(t){var e=L.location,n=C.indexOf(e.key);-1===n&&(n=0);var i=C.indexOf(t.key);-1===i&&(i=0);var r=n-i;r&&(O=!0,R(r))},E=b(p()),C=[E.key],M=function(t){return g+(0,u.createPath)(t)},R=function(t){e.go(t)},j=0,F=function(t){1===(j+=t)?((0,c.addEventListener)(window,"popstate",T),h&&(0,c.addEventListener)(window,"hashchange",x)):0===j&&((0,c.removeEventListener)(window,"popstate",T),h&&(0,c.removeEventListener)(window,"hashchange",x))},N=!1,L={length:e.length,action:"POP",location:E,createHref:M,push:function(t,r){(0,o.default)(!("object"===(void 0===t?"undefined":i(t))&&void 0!==t.state&&void 0!==r),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var s=(0,a.createLocation)(t,r,w(),L.location);k.confirmTransitionTo(s,"PUSH",m,function(t){if(t){var i=M(s),r=s.key,a=s.state;if(n)if(e.pushState({key:r,state:a},null,i),d)window.location.href=i;else{var u=C.indexOf(L.location.key),l=C.slice(0,-1===u?0:u+1);l.push(s.key),C=l,S({action:"PUSH",location:s})}else(0,o.default)(void 0===a,"Browser history cannot push state in browsers that do not support HTML5 history"),window.location.href=i}})},replace:function(t,r){(0,o.default)(!("object"===(void 0===t?"undefined":i(t))&&void 0!==t.state&&void 0!==r),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var s=(0,a.createLocation)(t,r,w(),L.location);k.confirmTransitionTo(s,"REPLACE",m,function(t){if(t){var i=M(s),r=s.key,a=s.state;if(n)if(e.replaceState({key:r,state:a},null,i),d)window.location.replace(i);else{var u=C.indexOf(L.location.key);-1!==u&&(C[u]=s.key),S({action:"REPLACE",location:s})}else(0,o.default)(void 0===a,"Browser history cannot replace state in browsers that do not support HTML5 history"),window.location.replace(i)}})},go:R,goBack:function(){return R(-1)},goForward:function(){return R(1)},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=k.setPrompt(t);return N||(F(1),N=!0),function(){return N&&(N=!1,F(-1)),e()}},listen:function(t){var e=k.appendListener(t);return F(1),function(){F(-1),e()}}};return L}},function(t,e,n){"use strict";function i(t){return function(e){var n=e.dispatch,i=e.getState;return function(e){return function(r){return"function"==typeof r?r(n,i,t):e(r)}}}}e.__esModule=!0;var r=i();r.withExtraArgument=i,e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(){return function(e){return function(n){if(n.type!==i.CALL_HISTORY_METHOD)return e(n);var r=n.payload,o=r.method,s=r.args;t[o].apply(t,function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(s))}}}};var i=n(134)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};e.default=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=n.selectLocationState,a=void 0===s?o:s,u=n.adjustUrlOnReplay,l=void 0===u||u;if(void 0===a(e.getState()))throw new Error("Expected the routing state to be available either as `state.routing` or as the custom expression you can specify as `selectLocationState` in the `syncHistoryWithStore()` options. Ensure you have added the `routerReducer` to your store's reducers via `combineReducers` or whatever method you use to isolate your reducers.");var c=void 0,h=void 0,p=void 0,f=void 0,d=void 0,y=function(t){var n=a(e.getState());return n.locationBeforeTransitions||(t?c:void 0)};if(c=y(),l){var m=function(){var e=y(!0);d!==e&&c!==e&&(h=!0,d=e,t.transitionTo(i({},e,{action:"PUSH"})),h=!1)};p=e.subscribe(m),m()}var _=function(t){h||(d=t,!c&&(c=t,y())||e.dispatch({type:r.LOCATION_CHANGE,payload:t}))};f=t.listen(_),t.getCurrentLocation&&_(t.getCurrentLocation());return i({},t,{listen:function(n){var i=y(!0),r=!1,o=e.subscribe(function(){var t=y(!0);t!==i&&(i=t,r||n(i))});return t.getCurrentLocation||n(i),function(){r=!0,o()}},unsubscribe:function(){l&&p(),f()}})};var r=n(135),o=function(t){return t.routing}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.routerMiddleware=e.routerActions=e.goForward=e.goBack=e.go=e.replace=e.push=e.CALL_HISTORY_METHOD=e.routerReducer=e.LOCATION_CHANGE=e.syncHistoryWithStore=void 0;var i=n(135);Object.defineProperty(e,"LOCATION_CHANGE",{enumerable:!0,get:function(){return i.LOCATION_CHANGE}}),Object.defineProperty(e,"routerReducer",{enumerable:!0,get:function(){return i.routerReducer}});var r=n(134);Object.defineProperty(e,"CALL_HISTORY_METHOD",{enumerable:!0,get:function(){return r.CALL_HISTORY_METHOD}}),Object.defineProperty(e,"push",{enumerable:!0,get:function(){return r.push}}),Object.defineProperty(e,"replace",{enumerable:!0,get:function(){return r.replace}}),Object.defineProperty(e,"go",{enumerable:!0,get:function(){return r.go}}),Object.defineProperty(e,"goBack",{enumerable:!0,get:function(){return r.goBack}}),Object.defineProperty(e,"goForward",{enumerable:!0,get:function(){return r.goForward}}),Object.defineProperty(e,"routerActions",{enumerable:!0,get:function(){return r.routerActions}});var o=a(n(288)),s=a(n(287));function a(t){return t&&t.__esModule?t:{default:t}}e.syncHistoryWithStore=o.default,e.routerMiddleware=s.default},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){"use strict";var i=function(t){};t.exports=function(t,e,n,r,o,s,a,u){if(i(e),!t){var l;if(void 0===e)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,s,a,u],h=0;(l=new Error(e.replace(/%s/g,function(){return c[h++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(t,e,n){"use strict";function i(t){return function(){return t}}var r=function(){};r.thatReturns=i,r.thatReturnsFalse=i(!1),r.thatReturnsTrue=i(!0),r.thatReturnsNull=i(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(t){return t},t.exports=r},function(t,e,n){"use strict";var i=n(293),r=n(292),o=n(291);t.exports=function(){function t(t,e,n,i,s,a){a!==o&&r(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=i,n.PropTypes=n,n}},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){"use strict";var i=function(t){};t.exports=function(t,e,n,r,o,s,a,u){if(i(e),!t){var l;if(void 0===e)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,s,a,u],h=0;(l=new Error(e.replace(/%s/g,function(){return c[h++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(t,e,n){"use strict";function i(t){return function(){return t}}var r=function(){};r.thatReturns=i,r.thatReturnsFalse=i(!1),r.thatReturnsTrue=i(!0),r.thatReturnsNull=i(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(t){return t},t.exports=r},function(t,e,n){"use strict";var i=n(298),r=n(297),o=n(296);t.exports=function(){function t(t,e,n,i,s,a){a!==o&&r(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=i,n.PropTypes=n,n}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){"use strict";var i=function(t){};t.exports=function(t,e,n,r,o,s,a,u){if(i(e),!t){var l;if(void 0===e)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,s,a,u],h=0;(l=new Error(e.replace(/%s/g,function(){return c[h++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(t,e,n){"use strict";function i(t){return function(){return t}}var r=function(){};r.thatReturns=i,r.thatReturnsFalse=i(!1),r.thatReturnsTrue=i(!0),r.thatReturnsNull=i(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(t){return t},t.exports=r},function(t,e,n){"use strict";var i=n(302),r=n(301),o=n(300);t.exports=function(){function t(t,e,n,i,s,a){a!==o&&r(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=i,n.PropTypes=n,n}},function(t,e,n){"use strict";var i=n(1),r=n(3),o=n(10),s=n(19),a=(function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);e.default=t}(n(14)),p(n(5)),p(n(248))),u=n(13),l=p(n(147)),c=p(n(146)),h=p(n(77));function p(t){return t&&t.__esModule?t:{default:t}}var f=Object.keys(h.default).map(function(t){var e=h.default[t];return(0,i.h)(o.Route,{path:"/"+e.name,component:e.router})}),d=(0,i.h)(r.Provider,{store:s.store},(0,i.h)(a.default.Gate,null,(0,i.h)(o.BrowserRouter,null,(0,i.h)("div",{className:"everybody"},(0,i.h)(o.Route,{path:"/",children:function(t){return(0,i.h)("div",null,console.log(t.location.pathname))}}),(0,i.h)(o.Route,{exact:!0,path:"/system",component:l.default}),(0,i.h)(o.Route,{exact:!0,path:"/dashboard",component:c.default}),(0,i.h)(o.Route,{exact:!0,path:"/logout",component:a.default.Logout}),(0,i.h)(o.Route,{exact:!0,path:"/login",component:function(){console.log("pziss"),(0,i.h)(o.Redirect,{to:"/"})}}),(0,i.h)(o.Route,{exact:!0,path:"/signup",component:function(){console.log("pziss"),(0,i.h)(o.Redirect,{to:"/"})}}),f,(0,i.h)(o.Route,{exact:!0,path:"/",component:c.default}),(0,i.h)(o.Route,{path:"/",component:u.Header}))),(0,i.h)(u.AudioPlayer,null)));(0,i.render)(d,document.getElementById("container"))},function(t,e,n){"use strict";(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.a=n}).call(this,n(21))}]);
+	 */
+	Main(function () {
+	    
+	    ///////////////////////////////////////////////////////////////////////////
+	    //	TONE
+	    ///////////////////////////////////////////////////////////////////////////
+	    /**
+		 *  @class  Tone is the base class of all other classes.
+		 *  @constructor
+		 */
+	    var Tone = function () {
+	        if (!(this instanceof Tone)) {
+	            throw new Error('constructor needs to be called with the \'new\' keyword');
+	        }
+	    };
+	    /**
+		 *  @memberOf Tone#
+		 *  @returns {String} returns the name of the class as a string
+		 */
+	    Tone.prototype.toString = function () {
+	        for (var className in Tone) {
+	            var isLetter = className[0].match(/^[A-Z]$/);
+	            var sameConstructor = Tone[className] === this.constructor;
+	            if (Tone.isFunction(Tone[className]) && isLetter && sameConstructor) {
+	                return className;
+	            }
+	        }
+	        return 'Tone';
+	    };
+	    /**
+		 *  @memberOf Tone#
+		 *  disconnect and dispose
+		 *  @returns {Tone} this
+		 */
+	    Tone.prototype.dispose = function () {
+	        return this;
+	    };
+	    ///////////////////////////////////////////////////////////////////////////
+	    //	GET/SET
+	    ///////////////////////////////////////////////////////////////////////////
+	    /**
+		 *  Set the parameters at once. Either pass in an
+		 *  object mapping parameters to values, or to set a
+		 *  single parameter, by passing in a string and value.
+		 *  The last argument is an optional ramp time which
+		 *  will ramp any signal values to their destination value
+		 *  over the duration of the rampTime.
+		 *  @param {Object|String} params
+		 *  @param {Number=} value
+		 *  @param {Time=} rampTime
+		 *  @returns {Tone} this
+		 *  @memberOf Tone#
+		 *  @example
+		 * //set values using an object
+		 * filter.set({
+		 * 	"frequency" : 300,
+		 * 	"type" : highpass
+		 * });
+		 *  @example
+		 * filter.set("type", "highpass");
+		 *  @example
+		 * //ramp to the value 220 over 3 seconds.
+		 * oscillator.set({
+		 * 	"frequency" : 220
+		 * }, 3);
+		 */
+	    Tone.prototype.set = function (params, value, rampTime) {
+	        if (Tone.isObject(params)) {
+	            rampTime = value;
+	        } else if (Tone.isString(params)) {
+	            var tmpObj = {};
+	            tmpObj[params] = value;
+	            params = tmpObj;
+	        }
+	        paramLoop:
+	            for (var attr in params) {
+	                value = params[attr];
+	                var parent = this;
+	                if (attr.indexOf('.') !== -1) {
+	                    var attrSplit = attr.split('.');
+	                    for (var i = 0; i < attrSplit.length - 1; i++) {
+	                        parent = parent[attrSplit[i]];
+	                        if (parent instanceof Tone) {
+	                            attrSplit.splice(0, i + 1);
+	                            var innerParam = attrSplit.join('.');
+	                            parent.set(innerParam, value);
+	                            continue paramLoop;
+	                        }
+	                    }
+	                    attr = attrSplit[attrSplit.length - 1];
+	                }
+	                var param = parent[attr];
+	                if (Tone.isUndef(param)) {
+	                    continue;
+	                }
+	                if (Tone.Signal && param instanceof Tone.Signal || Tone.Param && param instanceof Tone.Param) {
+	                    if (param.value !== value) {
+	                        if (Tone.isUndef(rampTime)) {
+	                            param.value = value;
+	                        } else {
+	                            param.rampTo(value, rampTime);
+	                        }
+	                    }
+	                } else if (param instanceof AudioParam) {
+	                    if (param.value !== value) {
+	                        param.value = value;
+	                    }
+	                } else if (Tone.TimeBase && param instanceof Tone.TimeBase) {
+	                    parent[attr] = value;
+	                } else if (param instanceof Tone) {
+	                    param.set(value);
+	                } else if (param !== value) {
+	                    parent[attr] = value;
+	                }
+	            }
+	        return this;
+	    };
+	    /**
+		 *  Get the object's attributes. Given no arguments get
+		 *  will return all available object properties and their corresponding
+		 *  values. Pass in a single attribute to retrieve or an array
+		 *  of attributes. The attribute strings can also include a "."
+		 *  to access deeper properties.
+		 *  @memberOf Tone#
+		 *  @example
+		 * osc.get();
+		 * //returns {"type" : "sine", "frequency" : 440, ...etc}
+		 *  @example
+		 * osc.get("type");
+		 * //returns { "type" : "sine"}
+		 * @example
+		 * //use dot notation to access deep properties
+		 * synth.get(["envelope.attack", "envelope.release"]);
+		 * //returns {"envelope" : {"attack" : 0.2, "release" : 0.4}}
+		 *  @param {Array=|string|undefined} params the parameters to get, otherwise will return
+		 *  					                  all available.
+		 *  @returns {Object}
+		 */
+	    Tone.prototype.get = function (params) {
+	        if (Tone.isUndef(params)) {
+	            params = this._collectDefaults(this.constructor);
+	        } else if (Tone.isString(params)) {
+	            params = [params];
+	        }
+	        var ret = {};
+	        for (var i = 0; i < params.length; i++) {
+	            var attr = params[i];
+	            var parent = this;
+	            var subRet = ret;
+	            if (attr.indexOf('.') !== -1) {
+	                var attrSplit = attr.split('.');
+	                for (var j = 0; j < attrSplit.length - 1; j++) {
+	                    var subAttr = attrSplit[j];
+	                    subRet[subAttr] = subRet[subAttr] || {};
+	                    subRet = subRet[subAttr];
+	                    parent = parent[subAttr];
+	                }
+	                attr = attrSplit[attrSplit.length - 1];
+	            }
+	            var param = parent[attr];
+	            if (Tone.isObject(params[attr])) {
+	                subRet[attr] = param.get();
+	            } else if (Tone.Signal && param instanceof Tone.Signal) {
+	                subRet[attr] = param.value;
+	            } else if (Tone.Param && param instanceof Tone.Param) {
+	                subRet[attr] = param.value;
+	            } else if (param instanceof AudioParam) {
+	                subRet[attr] = param.value;
+	            } else if (param instanceof Tone) {
+	                subRet[attr] = param.get();
+	            } else if (!Tone.isFunction(param) && Tone.isDefined(param)) {
+	                subRet[attr] = param;
+	            }
+	        }
+	        return ret;
+	    };
+	    /**
+		 *  collect all of the default attributes in one
+		 *  @private
+		 *  @param {Function} constr the constructor to find the defaults from
+		 *  @return {Array} all of the attributes which belong to the class
+		 */
+	    Tone.prototype._collectDefaults = function (constr) {
+	        var ret = [];
+	        if (Tone.isDefined(constr.defaults)) {
+	            ret = Object.keys(constr.defaults);
+	        }
+	        if (Tone.isDefined(constr._super)) {
+	            var superDefs = this._collectDefaults(constr._super);
+	            //filter out repeats
+	            for (var i = 0; i < superDefs.length; i++) {
+	                if (ret.indexOf(superDefs[i]) === -1) {
+	                    ret.push(superDefs[i]);
+	                }
+	            }
+	        }
+	        return ret;
+	    };
+	    ///////////////////////////////////////////////////////////////////////////
+	    //	DEFAULTS
+	    ///////////////////////////////////////////////////////////////////////////
+	    /**
+		 *  @memberOf Tone
+		 *  @param  {Array}  values  The arguments array
+		 *  @param  {Array}  keys    The names of the arguments
+		 *  @param {Function|Object} constr The class constructor
+		 *  @return  {Object}  An object composed of the  defaults between the class' defaults
+		 *                        and the passed in arguments.
+		 */
+	    Tone.defaults = function (values, keys, constr) {
+	        var options = {};
+	        if (values.length === 1 && Tone.isObject(values[0])) {
+	            options = values[0];
+	        } else {
+	            for (var i = 0; i < keys.length; i++) {
+	                options[keys[i]] = values[i];
+	            }
+	        }
+	        if (Tone.isDefined(constr.defaults)) {
+	            return Tone.defaultArg(options, constr.defaults);
+	        } else if (Tone.isObject(constr)) {
+	            return Tone.defaultArg(options, constr);
+	        } else {
+	            return options;
+	        }
+	    };
+	    /**
+		 *  If the `given` parameter is undefined, use the `fallback`.
+		 *  If both `given` and `fallback` are object literals, it will
+		 *  return a deep copy which includes all of the parameters from both
+		 *  objects. If a parameter is undefined in given, it will return
+		 *  the fallback property.
+		 *  <br><br>
+		 *  WARNING: if object is self referential, it will go into an an
+		 *  infinite recursive loop.
+		 *  @memberOf Tone
+		 *  @param  {*} given
+		 *  @param  {*} fallback
+		 *  @return {*}
+		 */
+	    Tone.defaultArg = function (given, fallback) {
+	        if (Tone.isObject(given) && Tone.isObject(fallback)) {
+	            var ret = {};
+	            //make a deep copy of the given object
+	            for (var givenProp in given) {
+	                ret[givenProp] = Tone.defaultArg(fallback[givenProp], given[givenProp]);
+	            }
+	            for (var fallbackProp in fallback) {
+	                ret[fallbackProp] = Tone.defaultArg(given[fallbackProp], fallback[fallbackProp]);
+	            }
+	            return ret;
+	        } else {
+	            return Tone.isUndef(given) ? fallback : given;
+	        }
+	    };
+	    ///////////////////////////////////////////////////////////////////////////
+	    //	CONNECTIONS
+	    ///////////////////////////////////////////////////////////////////////////
+	    /**
+		 *  connect together all of the arguments in series
+		 *  @param {...AudioParam|Tone|AudioNode} nodes
+		 *  @returns {Tone}
+		 *  @memberOf Tone
+		 *  @static
+		 */
+	    Tone.connectSeries = function () {
+	        var currentUnit = arguments[0];
+	        for (var i = 1; i < arguments.length; i++) {
+	            var toUnit = arguments[i];
+	            currentUnit.connect(toUnit);
+	            currentUnit = toUnit;
+	        }
+	        return Tone;
+	    };
+	    ///////////////////////////////////////////////////////////////////////////
+	    // TYPE CHECKING
+	    ///////////////////////////////////////////////////////////////////////////
+	    /**
+		 *  Test if the arg is undefined
+		 *  @param {*} arg the argument to test
+		 *  @returns {Boolean} true if the arg is undefined
+		 *  @static
+		 *  @memberOf Tone
+		 */
+	    Tone.isUndef = function (val) {
+	        return typeof val === 'undefined';
+	    };
+	    /**
+		 *  Test if the arg is not undefined
+		 *  @param {*} arg the argument to test
+		 *  @returns {Boolean} true if the arg is undefined
+		 *  @static
+		 *  @memberOf Tone
+		 */
+	    Tone.isDefined = function (val) {
+	        return !Tone.isUndef(val);
+	    };
+	    /**
+		 *  Test if the arg is a function
+		 *  @param {*} arg the argument to test
+		 *  @returns {Boolean} true if the arg is a function
+		 *  @static
+		 *  @memberOf Tone
+		 */
+	    Tone.isFunction = function (val) {
+	        return typeof val === 'function';
+	    };
+	    /**
+		 *  Test if the argument is a number.
+		 *  @param {*} arg the argument to test
+		 *  @returns {Boolean} true if the arg is a number
+		 *  @static
+		 *  @memberOf Tone
+		 */
+	    Tone.isNumber = function (arg) {
+	        return typeof arg === 'number';
+	    };
+	    /**
+		 *  Test if the given argument is an object literal (i.e. `{}`);
+		 *  @param {*} arg the argument to test
+		 *  @returns {Boolean} true if the arg is an object literal.
+		 *  @static
+		 *  @memberOf Tone
+		 */
+	    Tone.isObject = function (arg) {
+	        return Object.prototype.toString.call(arg) === '[object Object]' && arg.constructor === Object;
+	    };
+	    /**
+		 *  Test if the argument is a boolean.
+		 *  @param {*} arg the argument to test
+		 *  @returns {Boolean} true if the arg is a boolean
+		 *  @static
+		 *  @memberOf Tone
+		 */
+	    Tone.isBoolean = function (arg) {
+	        return typeof arg === 'boolean';
+	    };
+	    /**
+		 *  Test if the argument is an Array
+		 *  @param {*} arg the argument to test
+		 *  @returns {Boolean} true if the arg is an array
+		 *  @static
+		 *  @memberOf Tone
+		 */
+	    Tone.isArray = function (arg) {
+	        return Array.isArray(arg);
+	    };
+	    /**
+		 *  Test if the argument is a string.
+		 *  @param {*} arg the argument to test
+		 *  @returns {Boolean} true if the arg is a string
+		 *  @static
+		 *  @memberOf Tone
+		 */
+	    Tone.isString = function (arg) {
+	        return typeof arg === 'string';
+	    };
+	    /**
+		 *  Test if the argument is in the form of a note in scientific pitch notation.
+		 *  e.g. "C4"
+		 *  @param {*} arg the argument to test
+		 *  @returns {Boolean} true if the arg is a string
+		 *  @static
+		 *  @memberOf Tone
+		 */
+	    Tone.isNote = function (arg) {
+	        return Tone.isString(arg) && /^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i.test(arg);
+	    };
+	    /**
+		 *  An empty function.
+		 *  @static
+		 */
+	    Tone.noOp = function () {
+	    };
+	    /**
+		 *  Make the property not writable. Internal use only.
+		 *  @private
+		 *  @param  {String}  property  the property to make not writable
+		 */
+	    Tone.prototype._readOnly = function (property) {
+	        if (Array.isArray(property)) {
+	            for (var i = 0; i < property.length; i++) {
+	                this._readOnly(property[i]);
+	            }
+	        } else {
+	            Object.defineProperty(this, property, {
+	                writable: false,
+	                enumerable: true
+	            });
+	        }
+	    };
+	    /**
+		 *  Make an attribute writeable. Interal use only.
+		 *  @private
+		 *  @param  {String}  property  the property to make writable
+		 */
+	    Tone.prototype._writable = function (property) {
+	        if (Array.isArray(property)) {
+	            for (var i = 0; i < property.length; i++) {
+	                this._writable(property[i]);
+	            }
+	        } else {
+	            Object.defineProperty(this, property, { writable: true });
+	        }
+	    };
+	    /**
+		 * Possible play states.
+		 * @enum {String}
+		 */
+	    Tone.State = {
+	        Started: 'started',
+	        Stopped: 'stopped',
+	        Paused: 'paused'
+	    };
+	    ///////////////////////////////////////////////////////////////////////////
+	    // CONVERSIONS
+	    ///////////////////////////////////////////////////////////////////////////
+	    /**
+		 *  Equal power gain scale. Good for cross-fading.
+		 *  @param  {NormalRange} percent (0-1)
+		 *  @return {Number}         output gain (0-1)
+		 *  @static
+		 *  @memberOf Tone
+		 */
+	    Tone.equalPowerScale = function (percent) {
+	        var piFactor = 0.5 * Math.PI;
+	        return Math.sin(percent * piFactor);
+	    };
+	    /**
+		 *  Convert decibels into gain.
+		 *  @param  {Decibels} db
+		 *  @return {Number}
+		 *  @static
+		 *  @memberOf Tone
+		 */
+	    Tone.dbToGain = function (db) {
+	        return Math.pow(10, db / 20);
+	    };
+	    /**
+		 *  Convert gain to decibels.
+		 *  @param  {Number} gain (0-1)
+		 *  @return {Decibels}
+		 *  @static
+		 *  @memberOf Tone
+		 */
+	    Tone.gainToDb = function (gain) {
+	        return 20 * (Math.log(gain) / Math.LN10);
+	    };
+	    /**
+		 *  Convert an interval (in semitones) to a frequency ratio.
+		 *  @param  {Interval} interval the number of semitones above the base note
+		 *  @return {Number}          the frequency ratio
+		 *  @static
+		 *  @memberOf Tone
+		 *  @example
+		 * tone.intervalToFrequencyRatio(0); // 1
+		 * tone.intervalToFrequencyRatio(12); // 2
+		 * tone.intervalToFrequencyRatio(-12); // 0.5
+		 */
+	    Tone.intervalToFrequencyRatio = function (interval) {
+	        return Math.pow(2, interval / 12);
+	    };
+	    ///////////////////////////////////////////////////////////////////////////
+	    //	TIMING
+	    ///////////////////////////////////////////////////////////////////////////
+	    /**
+		 *  Return the current time of the AudioContext clock.
+		 *  @return {Number} the currentTime from the AudioContext
+		 *  @memberOf Tone#
+		 */
+	    Tone.prototype.now = function () {
+	        return Tone.context.now();
+	    };
+	    /**
+		 *  Return the current time of the AudioContext clock.
+		 *  @return {Number} the currentTime from the AudioContext
+		 *  @static
+		 *  @memberOf Tone
+		 */
+	    Tone.now = function () {
+	        return Tone.context.now();
+	    };
+	    ///////////////////////////////////////////////////////////////////////////
+	    //	INHERITANCE
+	    ///////////////////////////////////////////////////////////////////////////
+	    /**
+		 *  have a child inherit all of Tone's (or a parent's) prototype
+		 *  to inherit the parent's properties, make sure to call
+		 *  Parent.call(this) in the child's constructor
+		 *
+		 *  based on closure library's inherit function
+		 *
+		 *  @memberOf Tone
+		 *  @static
+		 *  @param  {Function} 	child
+		 *  @param  {Function=} parent (optional) parent to inherit from
+		 *                             if no parent is supplied, the child
+		 *                             will inherit from Tone
+		 */
+	    Tone.extend = function (child, parent) {
+	        if (Tone.isUndef(parent)) {
+	            parent = Tone;
+	        }
+	        function TempConstructor() {
+	        }
+	        TempConstructor.prototype = parent.prototype;
+	        child.prototype = new TempConstructor();
+	        /** @override */
+	        child.prototype.constructor = child;
+	        child._super = parent;
+	    };
+	    ///////////////////////////////////////////////////////////////////////////
+	    //	CONTEXT
+	    ///////////////////////////////////////////////////////////////////////////
+	    /**
+		 *  Private reference to the global AudioContext
+		 *  @type {AudioContext}
+		 *  @private
+		 */
+	    var audioContext = null;
+	    /**
+		 *  A static pointer to the audio context accessible as Tone.context.
+		 *  @type {Tone.Context}
+		 *  @name context
+		 *  @memberOf Tone
+		 */
+	    Object.defineProperty(Tone, 'context', {
+	        get: function () {
+	            return audioContext;
+	        },
+	        set: function (context) {
+	            if (Tone.Context && context instanceof Tone.Context) {
+	                audioContext = context;
+	            } else {
+	                audioContext = new Tone.Context(context);
+	            }
+	            //initialize the new audio context
+	            Tone.Context.emit('init', audioContext);
+	        }
+	    });
+	    /**
+		 *  The AudioContext
+		 *  @type {Tone.Context}
+		 *  @name context
+		 *  @memberOf Tone#
+		 *  @readOnly
+		 */
+	    Object.defineProperty(Tone.prototype, 'context', {
+	        get: function () {
+	            return Tone.context;
+	        }
+	    });
+	    /**
+		 *  Tone automatically creates a context on init, but if you are working
+		 *  with other libraries which also create an AudioContext, it can be
+		 *  useful to set your own. If you are going to set your own context,
+		 *  be sure to do it at the start of your code, before creating any objects.
+		 *  @static
+		 *  @param {AudioContext} ctx The new audio context to set
+		 */
+	    Tone.setContext = function (ctx) {
+	        Tone.context = ctx;
+	    };
+	    ///////////////////////////////////////////////////////////////////////////
+	    //	ATTRIBUTES
+	    ///////////////////////////////////////////////////////////////////////////
+	    /**
+		 *  The number of seconds of 1 processing block (128 samples)
+		 *  @type {Number}
+		 *  @name blockTime
+		 *  @memberOf Tone
+		 *  @static
+		 *  @readOnly
+		 */
+	    Object.defineProperty(Tone.prototype, 'blockTime', {
+	        get: function () {
+	            return 128 / this.context.sampleRate;
+	        }
+	    });
+	    /**
+		 *  The duration in seconds of one sample.
+		 *  @type {Number}
+		 *  @name sampleTime
+		 *  @memberOf Tone
+		 *  @static
+		 *  @readOnly
+		 */
+	    Object.defineProperty(Tone.prototype, 'sampleTime', {
+	        get: function () {
+	            return 1 / this.context.sampleRate;
+	        }
+	    });
+	    /**
+		 *  Whether or not all the technologies that Tone.js relies on are supported by the current browser.
+		 *  @type {Boolean}
+		 *  @name supported
+		 *  @memberOf Tone
+		 *  @readOnly
+		 *  @static
+		 */
+	    Object.defineProperty(Tone, 'supported', {
+	        get: function () {
+	            var hasAudioContext = window.hasOwnProperty('AudioContext') || window.hasOwnProperty('webkitAudioContext');
+	            var hasPromises = window.hasOwnProperty('Promise');
+	            var hasWorkers = window.hasOwnProperty('Worker');
+	            return hasAudioContext && hasPromises && hasWorkers;
+	        }
+	    });
+	    /**
+		 *  Boolean value if the audio context has been initialized.
+		 *  @type {Boolean}
+		 *  @memberOf Tone
+		 *  @static
+		 *  @name initialized
+		 */
+	    Object.defineProperty(Tone, 'initialized', {
+	        get: function () {
+	            return audioContext !== null;
+	        }
+	    });
+	    /**
+		 *  Get the context when it becomes available
+		 *  @param  {Function}  resolve  Callback when the context is initialized
+		 *  @return  {Tone}
+		 */
+	    Tone.getContext = function (resolve) {
+	        if (Tone.initialized) {
+	            resolve(Tone.context);
+	        } else {
+	            var resCallback = function () {
+	                resolve(Tone.context);
+	                Tone.Context.off('init', resCallback);
+	            };
+	            Tone.Context.on('init', resCallback);
+	        }
+	        return Tone;
+	    };
+	    /**
+		 * The version number
+		 * @type {String}
+		 * @static
+		 */
+	    Tone.version = 'r12';
+	    return Tone;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.Emitter gives classes which extend it
+		 *         the ability to listen for and emit events.
+		 *         Inspiration and reference from Jerome Etienne's [MicroEvent](https://github.com/jeromeetienne/microevent.js).
+		 *         MIT (c) 2011 Jerome Etienne.
+		 *
+		 *  @extends {Tone}
+		 */
+	    Tone.Emitter = function () {
+	        Tone.call(this);
+	        /**
+			 *  Contains all of the events.
+			 *  @private
+			 *  @type  {Object}
+			 */
+	        this._events = {};
+	    };
+	    Tone.extend(Tone.Emitter);
+	    /**
+		 *  Bind a callback to a specific event.
+		 *  @param  {String}    event     The name of the event to listen for.
+		 *  @param  {Function}  callback  The callback to invoke when the
+		 *                                event is emitted
+		 *  @return  {Tone.Emitter}    this
+		 */
+	    Tone.Emitter.prototype.on = function (event, callback) {
+	        //split the event
+	        var events = event.split(/\W+/);
+	        for (var i = 0; i < events.length; i++) {
+	            var eventName = events[i];
+	            if (!this._events.hasOwnProperty(eventName)) {
+	                this._events[eventName] = [];
+	            }
+	            this._events[eventName].push(callback);
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Bind a callback which is only invoked once
+		 *  @param  {String}    event     The name of the event to listen for.
+		 *  @param  {Function}  callback  The callback to invoke when the
+		 *                                event is emitted
+		 *  @return  {Tone.Emitter}    this
+		 */
+	    Tone.Emitter.prototype.once = function (event, callback) {
+	        var boundCallback = function () {
+	            //invoke the callback
+	            callback.apply(this, arguments);
+	            this.off(event, boundCallback);
+	        }.bind(this);
+	        this.on(event, boundCallback);
+	        return this;
+	    };
+	    /**
+		 *  Remove the event listener.
+		 *  @param  {String}    event     The event to stop listening to.
+		 *  @param  {Function=}  callback  The callback which was bound to
+		 *                                the event with Tone.Emitter.on.
+		 *                                If no callback is given, all callbacks
+		 *                                events are removed.
+		 *  @return  {Tone.Emitter}    this
+		 */
+	    Tone.Emitter.prototype.off = function (event, callback) {
+	        var events = event.split(/\W+/);
+	        for (var ev = 0; ev < events.length; ev++) {
+	            event = events[ev];
+	            if (this._events.hasOwnProperty(event)) {
+	                if (Tone.isUndef(callback)) {
+	                    this._events[event] = [];
+	                } else {
+	                    var eventList = this._events[event];
+	                    for (var i = 0; i < eventList.length; i++) {
+	                        if (eventList[i] === callback) {
+	                            eventList.splice(i, 1);
+	                        }
+	                    }
+	                }
+	            }
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Invoke all of the callbacks bound to the event
+		 *  with any arguments passed in.
+		 *  @param  {String}  event  The name of the event.
+		 *  @param {*} args... The arguments to pass to the functions listening.
+		 *  @return  {Tone.Emitter}  this
+		 */
+	    Tone.Emitter.prototype.emit = function (event) {
+	        if (this._events) {
+	            var args = Array.apply(null, arguments).slice(1);
+	            if (this._events.hasOwnProperty(event)) {
+	                var eventList = this._events[event].slice(0);
+	                for (var i = 0, len = eventList.length; i < len; i++) {
+	                    eventList[i].apply(this, args);
+	                }
+	            }
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Add Emitter functions (on/off/emit) to the object
+		 *  @param  {Object|Function}  object  The object or class to extend.
+		 *  @returns {Tone.Emitter}
+		 */
+	    Tone.Emitter.mixin = function (object) {
+	        var functions = [
+	            'on',
+	            'once',
+	            'off',
+	            'emit'
+	        ];
+	        object._events = {};
+	        for (var i = 0; i < functions.length; i++) {
+	            var func = functions[i];
+	            var emitterFunc = Tone.Emitter.prototype[func];
+	            object[func] = emitterFunc;
+	        }
+	        return Tone.Emitter;
+	    };
+	    /**
+		 *  Clean up
+		 *  @return  {Tone.Emitter}  this
+		 */
+	    Tone.Emitter.prototype.dispose = function () {
+	        Tone.prototype.dispose.call(this);
+	        this._events = null;
+	        return this;
+	    };
+	    return Tone.Emitter;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class A Timeline class for scheduling and maintaining state
+		 *         along a timeline. All events must have a "time" property.
+		 *         Internally, events are stored in time order for fast
+		 *         retrieval.
+		 *  @extends {Tone}
+		 *  @param {Positive} [memory=Infinity] The number of previous events that are retained.
+		 */
+	    Tone.Timeline = function () {
+	        var options = Tone.defaults(arguments, ['memory'], Tone.Timeline);
+	        Tone.call(this);
+	        /**
+			 *  The array of scheduled timeline events
+			 *  @type  {Array}
+			 *  @private
+			 */
+	        this._timeline = [];
+	        /**
+			 *  The memory of the timeline, i.e.
+			 *  how many events in the past it will retain
+			 *  @type {Positive}
+			 */
+	        this.memory = options.memory;
+	    };
+	    Tone.extend(Tone.Timeline);
+	    /**
+		 *  the default parameters
+		 *  @static
+		 *  @const
+		 */
+	    Tone.Timeline.defaults = { 'memory': Infinity };
+	    /**
+		 *  The number of items in the timeline.
+		 *  @type {Number}
+		 *  @memberOf Tone.Timeline#
+		 *  @name length
+		 *  @readOnly
+		 */
+	    Object.defineProperty(Tone.Timeline.prototype, 'length', {
+	        get: function () {
+	            return this._timeline.length;
+	        }
+	    });
+	    /**
+		 *  Insert an event object onto the timeline. Events must have a "time" attribute.
+		 *  @param  {Object}  event  The event object to insert into the
+		 *                           timeline.
+		 *  @returns {Tone.Timeline} this
+		 */
+	    Tone.Timeline.prototype.add = function (event) {
+	        //the event needs to have a time attribute
+	        if (Tone.isUndef(event.time)) {
+	            throw new Error('Tone.Timeline: events must have a time attribute');
+	        }
+	        event.time = event.time.valueOf();
+	        var index = this._search(event.time);
+	        this._timeline.splice(index + 1, 0, event);
+	        //if the length is more than the memory, remove the previous ones
+	        if (this.length > this.memory) {
+	            var diff = this.length - this.memory;
+	            this._timeline.splice(0, diff);
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Remove an event from the timeline.
+		 *  @param  {Object}  event  The event object to remove from the list.
+		 *  @returns {Tone.Timeline} this
+		 */
+	    Tone.Timeline.prototype.remove = function (event) {
+	        var index = this._timeline.indexOf(event);
+	        if (index !== -1) {
+	            this._timeline.splice(index, 1);
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Get the nearest event whose time is less than or equal to the given time.
+		 *  @param  {Number}  time  The time to query.
+		 *  @param  {String}  comparator Which value in the object to compare
+		 *  @returns {Object} The event object set after that time.
+		 */
+	    Tone.Timeline.prototype.get = function (time, comparator) {
+	        comparator = Tone.defaultArg(comparator, 'time');
+	        var index = this._search(time, comparator);
+	        if (index !== -1) {
+	            return this._timeline[index];
+	        } else {
+	            return null;
+	        }
+	    };
+	    /**
+		 *  Return the first event in the timeline without removing it
+		 *  @returns {Object} The first event object
+		 */
+	    Tone.Timeline.prototype.peek = function () {
+	        return this._timeline[0];
+	    };
+	    /**
+		 *  Return the first event in the timeline and remove it
+		 *  @returns {Object} The first event object
+		 */
+	    Tone.Timeline.prototype.shift = function () {
+	        return this._timeline.shift();
+	    };
+	    /**
+		 *  Get the event which is scheduled after the given time.
+		 *  @param  {Number}  time  The time to query.
+		 *  @param  {String}  comparator Which value in the object to compare
+		 *  @returns {Object} The event object after the given time
+		 */
+	    Tone.Timeline.prototype.getAfter = function (time, comparator) {
+	        comparator = Tone.defaultArg(comparator, 'time');
+	        var index = this._search(time, comparator);
+	        if (index + 1 < this._timeline.length) {
+	            return this._timeline[index + 1];
+	        } else {
+	            return null;
+	        }
+	    };
+	    /**
+		 *  Get the event before the event at the given time.
+		 *  @param  {Number}  time  The time to query.
+		 *  @param  {String}  comparator Which value in the object to compare
+		 *  @returns {Object} The event object before the given time
+		 */
+	    Tone.Timeline.prototype.getBefore = function (time, comparator) {
+	        comparator = Tone.defaultArg(comparator, 'time');
+	        var len = this._timeline.length;
+	        //if it's after the last item, return the last item
+	        if (len > 0 && this._timeline[len - 1][comparator] < time) {
+	            return this._timeline[len - 1];
+	        }
+	        var index = this._search(time, comparator);
+	        if (index - 1 >= 0) {
+	            return this._timeline[index - 1];
+	        } else {
+	            return null;
+	        }
+	    };
+	    /**
+		 *  Cancel events after the given time
+		 *  @param  {Number}  time  The time to query.
+		 *  @returns {Tone.Timeline} this
+		 */
+	    Tone.Timeline.prototype.cancel = function (after) {
+	        if (this._timeline.length > 1) {
+	            var index = this._search(after);
+	            if (index >= 0) {
+	                if (this._timeline[index].time === after) {
+	                    //get the first item with that time
+	                    for (var i = index; i >= 0; i--) {
+	                        if (this._timeline[i].time === after) {
+	                            index = i;
+	                        } else {
+	                            break;
+	                        }
+	                    }
+	                    this._timeline = this._timeline.slice(0, index);
+	                } else {
+	                    this._timeline = this._timeline.slice(0, index + 1);
+	                }
+	            } else {
+	                this._timeline = [];
+	            }
+	        } else if (this._timeline.length === 1) {
+	            //the first item's time
+	            if (this._timeline[0].time >= after) {
+	                this._timeline = [];
+	            }
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Cancel events before or equal to the given time.
+		 *  @param  {Number}  time  The time to cancel before.
+		 *  @returns {Tone.Timeline} this
+		 */
+	    Tone.Timeline.prototype.cancelBefore = function (time) {
+	        var index = this._search(time);
+	        if (index >= 0) {
+	            this._timeline = this._timeline.slice(index + 1);
+	        }
+	        return this;
+	    };
+	    /**
+		 * Returns the previous event if there is one. null otherwise
+		 * @param  {Object} event The event to find the previous one of
+		 * @return {Object}       The event right before the given event
+		 */
+	    Tone.Timeline.prototype.previousEvent = function (event) {
+	        var index = this._timeline.indexOf(event);
+	        if (index > 0) {
+	            return this._timeline[index - 1];
+	        } else {
+	            return null;
+	        }
+	    };
+	    /**
+		 *  Does a binary search on the timeline array and returns the
+		 *  nearest event index whose time is after or equal to the given time.
+		 *  If a time is searched before the first index in the timeline, -1 is returned.
+		 *  If the time is after the end, the index of the last item is returned.
+		 *  @param  {Number}  time
+		 *  @param  {String}  comparator Which value in the object to compare
+		 *  @return  {Number} the index in the timeline array
+		 *  @private
+		 */
+	    Tone.Timeline.prototype._search = function (time, comparator) {
+	        if (this._timeline.length === 0) {
+	            return -1;
+	        }
+	        comparator = Tone.defaultArg(comparator, 'time');
+	        var beginning = 0;
+	        var len = this._timeline.length;
+	        var end = len;
+	        if (len > 0 && this._timeline[len - 1][comparator] <= time) {
+	            return len - 1;
+	        }
+	        while (beginning < end) {
+	            // calculate the midpoint for roughly equal partition
+	            var midPoint = Math.floor(beginning + (end - beginning) / 2);
+	            var event = this._timeline[midPoint];
+	            var nextEvent = this._timeline[midPoint + 1];
+	            if (event[comparator] === time) {
+	                //choose the last one that has the same time
+	                for (var i = midPoint; i < this._timeline.length; i++) {
+	                    var testEvent = this._timeline[i];
+	                    if (testEvent[comparator] === time) {
+	                        midPoint = i;
+	                    }
+	                }
+	                return midPoint;
+	            } else if (event[comparator] < time && nextEvent[comparator] > time) {
+	                return midPoint;
+	            } else if (event[comparator] > time) {
+	                //search lower
+	                end = midPoint;
+	            } else {
+	                //search upper
+	                beginning = midPoint + 1;
+	            }
+	        }
+	        return -1;
+	    };
+	    /**
+		 *  Internal iterator. Applies extra safety checks for
+		 *  removing items from the array.
+		 *  @param  {Function}  callback
+		 *  @param  {Number=}    lowerBound
+		 *  @param  {Number=}    upperBound
+		 *  @private
+		 */
+	    Tone.Timeline.prototype._iterate = function (callback, lowerBound, upperBound) {
+	        lowerBound = Tone.defaultArg(lowerBound, 0);
+	        upperBound = Tone.defaultArg(upperBound, this._timeline.length - 1);
+	        this._timeline.slice(lowerBound, upperBound + 1).forEach(function (event) {
+	            callback.call(this, event);
+	        }.bind(this));
+	    };
+	    /**
+		 *  Iterate over everything in the array
+		 *  @param  {Function}  callback The callback to invoke with every item
+		 *  @returns {Tone.Timeline} this
+		 */
+	    Tone.Timeline.prototype.forEach = function (callback) {
+	        this._iterate(callback);
+	        return this;
+	    };
+	    /**
+		 *  Iterate over everything in the array at or before the given time.
+		 *  @param  {Number}  time The time to check if items are before
+		 *  @param  {Function}  callback The callback to invoke with every item
+		 *  @returns {Tone.Timeline} this
+		 */
+	    Tone.Timeline.prototype.forEachBefore = function (time, callback) {
+	        //iterate over the items in reverse so that removing an item doesn't break things
+	        var upperBound = this._search(time);
+	        if (upperBound !== -1) {
+	            this._iterate(callback, 0, upperBound);
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Iterate over everything in the array after the given time.
+		 *  @param  {Number}  time The time to check if items are before
+		 *  @param  {Function}  callback The callback to invoke with every item
+		 *  @returns {Tone.Timeline} this
+		 */
+	    Tone.Timeline.prototype.forEachAfter = function (time, callback) {
+	        //iterate over the items in reverse so that removing an item doesn't break things
+	        var lowerBound = this._search(time);
+	        this._iterate(callback, lowerBound + 1);
+	        return this;
+	    };
+	    /**
+		 *  Iterate over everything in the array between the startTime and endTime. 
+		 *  The timerange is inclusive of the startTime, but exclusive of the endTime. 
+		 *  range = [startTime, endTime). 
+		 *  @param  {Number}  startTime The time to check if items are before
+		 *  @param  {Number}  endTime The end of the test interval. 
+		 *  @param  {Function}  callback The callback to invoke with every item
+		 *  @returns {Tone.Timeline} this
+		 */
+	    Tone.Timeline.prototype.forEachBetween = function (startTime, endTime, callback) {
+	        var lowerBound = this._search(startTime);
+	        var upperBound = this._search(endTime);
+	        if (lowerBound !== -1 && upperBound !== -1) {
+	            if (this._timeline[lowerBound].time !== startTime) {
+	                lowerBound += 1;
+	            }
+	            //exclusive of the end time
+	            if (this._timeline[upperBound].time === endTime) {
+	                upperBound -= 1;
+	            }
+	            this._iterate(callback, lowerBound, upperBound);
+	        } else if (lowerBound === -1) {
+	            this._iterate(callback, 0, upperBound);
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Iterate over everything in the array at or after the given time. Similar to
+		 *  forEachAfter, but includes the item(s) at the given time.
+		 *  @param  {Number}  time The time to check if items are before
+		 *  @param  {Function}  callback The callback to invoke with every item
+		 *  @returns {Tone.Timeline} this
+		 */
+	    Tone.Timeline.prototype.forEachFrom = function (time, callback) {
+	        //iterate over the items in reverse so that removing an item doesn't break things
+	        var lowerBound = this._search(time);
+	        //work backwards until the event time is less than time
+	        while (lowerBound >= 0 && this._timeline[lowerBound].time >= time) {
+	            lowerBound--;
+	        }
+	        this._iterate(callback, lowerBound + 1);
+	        return this;
+	    };
+	    /**
+		 *  Iterate over everything in the array at the given time
+		 *  @param  {Number}  time The time to check if items are before
+		 *  @param  {Function}  callback The callback to invoke with every item
+		 *  @returns {Tone.Timeline} this
+		 */
+	    Tone.Timeline.prototype.forEachAtTime = function (time, callback) {
+	        //iterate over the items in reverse so that removing an item doesn't break things
+	        var upperBound = this._search(time);
+	        if (upperBound !== -1) {
+	            this._iterate(function (event) {
+	                if (event.time === time) {
+	                    callback.call(this, event);
+	                }
+	            }, 0, upperBound);
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Clean up.
+		 *  @return  {Tone.Timeline}  this
+		 */
+	    Tone.Timeline.prototype.dispose = function () {
+	        Tone.prototype.dispose.call(this);
+	        this._timeline = null;
+	        return this;
+	    };
+	    return Tone.Timeline;
+	});
+	Module(function (Tone) {
+	    if (Tone.supported) {
+	        if (!window.hasOwnProperty('OfflineAudioContext') && window.hasOwnProperty('webkitOfflineAudioContext')) {
+	            window.OfflineAudioContext = window.webkitOfflineAudioContext;
+	        }
+	        //returns promise?
+	        var context = new OfflineAudioContext(1, 1, 44100);
+	        var ret = context.startRendering();
+	        if (!(ret instanceof Promise)) {
+	            OfflineAudioContext.prototype._native_startRendering = OfflineAudioContext.prototype.startRendering;
+	            OfflineAudioContext.prototype.startRendering = function () {
+	                return new Promise(function (done) {
+	                    this.oncomplete = function (e) {
+	                        done(e.renderedBuffer);
+	                    };
+	                    this._native_startRendering();
+	                }.bind(this));
+	            };
+	        }
+	    }
+	});
+	Module(function (Tone) {
+	    if (Tone.supported) {
+	        if (!window.hasOwnProperty('AudioContext') && window.hasOwnProperty('webkitAudioContext')) {
+	            window.AudioContext = window.webkitAudioContext;
+	        }
+	        //not functionally equivalent, but only an API placeholder
+	        if (!AudioContext.prototype.close) {
+	            AudioContext.prototype.close = function () {
+	                if (Tone.isFunction(this.suspend)) {
+	                    this.suspend();
+	                }
+	                return Promise.resolve();
+	            };
+	        }
+	        //not functionally equivalent
+	        if (!AudioContext.prototype.resume) {
+	            AudioContext.prototype.resume = function () {
+	                return Promise.resolve();
+	            };
+	        }
+	        //createGain
+	        if (!AudioContext.prototype.createGain && AudioContext.prototype.createGainNode) {
+	            AudioContext.prototype.createGain = AudioContext.prototype.createGainNode;
+	        }
+	        //createDelay
+	        if (!AudioContext.prototype.createDelay && AudioContext.prototype.createDelayNode) {
+	            AudioContext.prototype.createDelay = AudioContext.prototype.createDelayNode;
+	        }
+	        //test decodeAudioData returns a promise
+	        // https://github.com/mohayonao/web-audio-api-shim/blob/master/src/AudioContext.js
+	        // MIT License (c) 2015 @mohayonao
+	        var decodeAudioDataPromise = false;
+	        var offlineContext = new OfflineAudioContext(1, 1, 44100);
+	        var audioData = new Uint32Array([
+	            1179011410,
+	            48,
+	            1163280727,
+	            544501094,
+	            16,
+	            131073,
+	            44100,
+	            176400,
+	            1048580,
+	            1635017060,
+	            8,
+	            0,
+	            0,
+	            0,
+	            0
+	        ]).buffer;
+	        try {
+	            var ret = offlineContext.decodeAudioData(audioData);
+	            if (ret instanceof Promise) {
+	                decodeAudioDataPromise = true;
+	            }
+	        } catch (e) {
+	            decodeAudioDataPromise = false;
+	        }
+	        if (!decodeAudioDataPromise) {
+	            AudioContext.prototype._native_decodeAudioData = AudioContext.prototype.decodeAudioData;
+	            AudioContext.prototype.decodeAudioData = function (audioData) {
+	                return new Promise(function (success, error) {
+	                    this._native_decodeAudioData(audioData, success, error);
+	                }.bind(this));
+	            };
+	        }
+	    }
+	});
+	Module(function (Tone) {
+	    /**
+		 *  @class Wrapper around the native AudioContext.
+		 *  @extends {Tone.Emitter}
+		 *  @param {AudioContext=} context optionally pass in a context
+		 */
+	    Tone.Context = function () {
+	        Tone.Emitter.call(this);
+	        var options = Tone.defaults(arguments, ['context'], Tone.Context);
+	        if (!options.context) {
+	            options.context = new window.AudioContext();
+	            if (!options.context) {
+	                throw new Error('could not create AudioContext. Possibly too many AudioContexts running already.');
+	            }
+	        }
+	        this._context = options.context;
+	        // extend all of the methods
+	        for (var prop in this._context) {
+	            this._defineProperty(this._context, prop);
+	        }
+	        /**
+			 *  The default latency hint
+			 *  @type  {String}
+			 *  @private
+			 */
+	        this._latencyHint = options.latencyHint;
+	        /**
+			 *  An object containing all of the constants AudioBufferSourceNodes
+			 *  @type  {Object}
+			 *  @private
+			 */
+	        this._constants = {};
+	        ///////////////////////////////////////////////////////////////////////
+	        // WORKER
+	        ///////////////////////////////////////////////////////////////////////
+	        /**
+			 *  The amount of time events are scheduled
+			 *  into the future
+			 *  @type  {Number}
+			 */
+	        this.lookAhead = options.lookAhead;
+	        /**
+			 *  A reference to the actual computed update interval
+			 *  @type  {Number}
+			 *  @private
+			 */
+	        this._computedUpdateInterval = 0;
+	        /**
+			 *  A reliable callback method
+			 *  @private
+			 *  @type  {Ticker}
+			 */
+	        this._ticker = new Ticker(this.emit.bind(this, 'tick'), options.clockSource, options.updateInterval);
+	        ///////////////////////////////////////////////////////////////////////
+	        // TIMEOUTS
+	        ///////////////////////////////////////////////////////////////////////
+	        /**
+			 *  All of the setTimeout events.
+			 *  @type  {Tone.Timeline}
+			 *  @private
+			 */
+	        this._timeouts = new Tone.Timeline();
+	        /**
+			 *  The timeout id counter
+			 *  @private
+			 *  @type {Number}
+			 */
+	        this._timeoutIds = 0;
+	        this.on('tick', this._timeoutLoop.bind(this));
+	    };
+	    Tone.extend(Tone.Context, Tone.Emitter);
+	    Tone.Emitter.mixin(Tone.Context);
+	    /**
+		 * defaults
+		 * @static
+		 * @type {Object}
+		 */
+	    Tone.Context.defaults = {
+	        'clockSource': 'worker',
+	        'latencyHint': 'interactive',
+	        'lookAhead': 0.1,
+	        'updateInterval': 0.03
+	    };
+	    /**
+		 *  Define a property on this Tone.Context.
+		 *  This is used to extend the native AudioContext
+		 *  @param  {AudioContext}  context
+		 *  @param  {String}  prop
+		 *  @private
+		 */
+	    Tone.Context.prototype._defineProperty = function (context, prop) {
+	        if (Tone.isUndef(this[prop])) {
+	            Object.defineProperty(this, prop, {
+	                get: function () {
+	                    if (typeof context[prop] === 'function') {
+	                        return context[prop].bind(context);
+	                    } else {
+	                        return context[prop];
+	                    }
+	                },
+	                set: function (val) {
+	                    context[prop] = val;
+	                }
+	            });
+	        }
+	    };
+	    /**
+		 *  The current audio context time
+		 *  @return  {Number}
+		 */
+	    Tone.Context.prototype.now = function () {
+	        return this._context.currentTime + this.lookAhead;
+	    };
+	    /**
+		 *  Promise which is invoked when the context is running.
+		 *  Tries to resume the context if it's not started.
+		 *  @return  {Promise}
+		 */
+	    Tone.Context.prototype.ready = function () {
+	        return new Promise(function (done) {
+	            if (this._context.state === 'running') {
+	                done();
+	            } else {
+	                this._context.resume().then(function () {
+	                    done();
+	                });
+	            }
+	        }.bind(this));
+	    };
+	    /**
+		 *  Promise which is invoked when the context is running.
+		 *  Tries to resume the context if it's not started.
+		 *  @return  {Promise}
+		 */
+	    Tone.Context.prototype.close = function () {
+	        return this._context.close().then(function () {
+	            Tone.Context.emit('close', this);
+	        }.bind(this));
+	    };
+	    /**
+		 *  Generate a looped buffer at some constant value.
+		 *  @param  {Number}  val
+		 *  @return  {BufferSourceNode}
+		 */
+	    Tone.Context.prototype.getConstant = function (val) {
+	        if (this._constants[val]) {
+	            return this._constants[val];
+	        } else {
+	            var buffer = this._context.createBuffer(1, 128, this._context.sampleRate);
+	            var arr = buffer.getChannelData(0);
+	            for (var i = 0; i < arr.length; i++) {
+	                arr[i] = val;
+	            }
+	            var constant = this._context.createBufferSource();
+	            constant.channelCount = 1;
+	            constant.channelCountMode = 'explicit';
+	            constant.buffer = buffer;
+	            constant.loop = true;
+	            constant.start(0);
+	            this._constants[val] = constant;
+	            return constant;
+	        }
+	    };
+	    /**
+		 *  The private loop which keeps track of the context scheduled timeouts
+		 *  Is invoked from the clock source
+		 *  @private
+		 */
+	    Tone.Context.prototype._timeoutLoop = function () {
+	        var now = this.now();
+	        while (this._timeouts && this._timeouts.length && this._timeouts.peek().time <= now) {
+	            this._timeouts.shift().callback();
+	        }
+	    };
+	    /**
+		 *  A setTimeout which is gaurenteed by the clock source.
+		 *  Also runs in the offline context.
+		 *  @param  {Function}  fn       The callback to invoke
+		 *  @param  {Seconds}    timeout  The timeout in seconds
+		 *  @returns {Number} ID to use when invoking Tone.Context.clearTimeout
+		 */
+	    Tone.Context.prototype.setTimeout = function (fn, timeout) {
+	        this._timeoutIds++;
+	        var now = this.now();
+	        this._timeouts.add({
+	            callback: fn,
+	            time: now + timeout,
+	            id: this._timeoutIds
+	        });
+	        return this._timeoutIds;
+	    };
+	    /**
+		 *  Clears a previously scheduled timeout with Tone.context.setTimeout
+		 *  @param  {Number}  id  The ID returned from setTimeout
+		 *  @return  {Tone.Context}  this
+		 */
+	    Tone.Context.prototype.clearTimeout = function (id) {
+	        this._timeouts.forEach(function (event) {
+	            if (event.id === id) {
+	                this.remove(event);
+	            }
+	        });
+	        return this;
+	    };
+	    /**
+		 *  How often the Web Worker callback is invoked.
+		 *  This number corresponds to how responsive the scheduling
+		 *  can be. Context.updateInterval + Context.lookAhead gives you the
+		 *  total latency between scheduling an event and hearing it.
+		 *  @type {Number}
+		 *  @memberOf Tone.Context#
+		 *  @name updateInterval
+		 */
+	    Object.defineProperty(Tone.Context.prototype, 'updateInterval', {
+	        get: function () {
+	            return this._ticker.updateInterval;
+	        },
+	        set: function (interval) {
+	            this._ticker.updateInterval = interval;
+	        }
+	    });
+	    /**
+		 *  What the source of the clock is, either "worker" (Web Worker [default]),
+		 *  "timeout" (setTimeout), or "offline" (none).
+		 *  @type {String}
+		 *  @memberOf Tone.Context#
+		 *  @name clockSource
+		 */
+	    Object.defineProperty(Tone.Context.prototype, 'clockSource', {
+	        get: function () {
+	            return this._ticker.type;
+	        },
+	        set: function (type) {
+	            this._ticker.type = type;
+	        }
+	    });
+	    /**
+		 *  The type of playback, which affects tradeoffs between audio
+		 *  output latency and responsiveness.
+		 *
+		 *  In addition to setting the value in seconds, the latencyHint also
+		 *  accepts the strings "interactive" (prioritizes low latency),
+		 *  "playback" (prioritizes sustained playback), "balanced" (balances
+		 *  latency and performance), and "fastest" (lowest latency, might glitch more often).
+		 *  @type {String|Seconds}
+		 *  @memberOf Tone.Context#
+		 *  @name latencyHint
+		 *  @example
+		 * //set the lookAhead to 0.3 seconds
+		 * Tone.context.latencyHint = 0.3;
+		 */
+	    Object.defineProperty(Tone.Context.prototype, 'latencyHint', {
+	        get: function () {
+	            return this._latencyHint;
+	        },
+	        set: function (hint) {
+	            var lookAhead = hint;
+	            this._latencyHint = hint;
+	            if (Tone.isString(hint)) {
+	                switch (hint) {
+	                case 'interactive':
+	                    lookAhead = 0.1;
+	                    this._context.latencyHint = hint;
+	                    break;
+	                case 'playback':
+	                    lookAhead = 0.8;
+	                    this._context.latencyHint = hint;
+	                    break;
+	                case 'balanced':
+	                    lookAhead = 0.25;
+	                    this._context.latencyHint = hint;
+	                    break;
+	                case 'fastest':
+	                    this._context.latencyHint = 'interactive';
+	                    lookAhead = 0.01;
+	                    break;
+	                }
+	            }
+	            this.lookAhead = lookAhead;
+	            this.updateInterval = lookAhead / 3;
+	        }
+	    });
+	    /**
+		 *  Unlike other dispose methods, this returns a Promise
+		 *  which executes when the context is closed and disposed
+		 *  @returns {Promise} this
+		 */
+	    Tone.Context.prototype.dispose = function () {
+	        return this.close().then(function () {
+	            Tone.Emitter.prototype.dispose.call(this);
+	            this._ticker.dispose();
+	            this._ticker = null;
+	            this._timeouts.dispose();
+	            this._timeouts = null;
+	            for (var con in this._constants) {
+	                this._constants[con].disconnect();
+	            }
+	            this._constants = null;
+	        }.bind(this));
+	    };
+	    /**
+		 * @class A class which provides a reliable callback using either
+		 *        a Web Worker, or if that isn't supported, falls back to setTimeout.
+		 * @private
+		 */
+	    var Ticker = function (callback, type, updateInterval) {
+	        /**
+			 * Either "worker" or "timeout"
+			 * @type {String}
+			 * @private
+			 */
+	        this._type = type;
+	        /**
+			 * The update interval of the worker
+			 * @private
+			 * @type {Number}
+			 */
+	        this._updateInterval = updateInterval;
+	        /**
+			 * The callback to invoke at regular intervals
+			 * @type {Function}
+			 * @private
+			 */
+	        this._callback = Tone.defaultArg(callback, Tone.noOp);
+	        //create the clock source for the first time
+	        this._createClock();
+	    };
+	    /**
+		 * The possible ticker types
+		 * @private
+		 * @type {Object}
+		 */
+	    Ticker.Type = {
+	        Worker: 'worker',
+	        Timeout: 'timeout',
+	        Offline: 'offline'
+	    };
+	    /**
+		 *  Generate a web worker
+		 *  @return  {WebWorker}
+		 *  @private
+		 */
+	    Ticker.prototype._createWorker = function () {
+	        //URL Shim
+	        window.URL = window.URL || window.webkitURL;
+	        var blob = new Blob([//the initial timeout time
+	            'var timeoutTime = ' + (this._updateInterval * 1000).toFixed(1) + ';' + //onmessage callback
+	            'self.onmessage = function(msg){' + '\ttimeoutTime = parseInt(msg.data);' + '};' + //the tick function which posts a message
+	            //and schedules a new tick
+	            'function tick(){' + '\tsetTimeout(tick, timeoutTime);' + '\tself.postMessage(\'tick\');' + '}' + //call tick initially
+	            'tick();']);
+	        var blobUrl = URL.createObjectURL(blob);
+	        var worker = new Worker(blobUrl);
+	        worker.onmessage = this._callback.bind(this);
+	        this._worker = worker;
+	    };
+	    /**
+		 * Create a timeout loop
+		 * @private
+		 */
+	    Ticker.prototype._createTimeout = function () {
+	        this._timeout = setTimeout(function () {
+	            this._createTimeout();
+	            this._callback();
+	        }.bind(this), this._updateInterval * 1000);
+	    };
+	    /**
+		 * Create the clock source.
+		 * @private
+		 */
+	    Ticker.prototype._createClock = function () {
+	        if (this._type === Ticker.Type.Worker) {
+	            try {
+	                this._createWorker();
+	            } catch (e) {
+	                // workers not supported, fallback to timeout
+	                this._type = Ticker.Type.Timeout;
+	                this._createClock();
+	            }
+	        } else if (this._type === Ticker.Type.Timeout) {
+	            this._createTimeout();
+	        }
+	    };
+	    /**
+		 * @memberOf Ticker#
+		 * @type {Number}
+		 * @name updateInterval
+		 * @private
+		 */
+	    Object.defineProperty(Ticker.prototype, 'updateInterval', {
+	        get: function () {
+	            return this._updateInterval;
+	        },
+	        set: function (interval) {
+	            this._updateInterval = Math.max(interval, 128 / 44100);
+	            if (this._type === Ticker.Type.Worker) {
+	                this._worker.postMessage(Math.max(interval * 1000, 1));
+	            }
+	        }
+	    });
+	    /**
+		 * The type of the ticker, either a worker or a timeout
+		 * @memberOf Ticker#
+		 * @type {Number}
+		 * @name type
+		 * @private
+		 */
+	    Object.defineProperty(Ticker.prototype, 'type', {
+	        get: function () {
+	            return this._type;
+	        },
+	        set: function (type) {
+	            this._disposeClock();
+	            this._type = type;
+	            this._createClock();
+	        }
+	    });
+	    /**
+		 * Clean up the current clock source
+		 * @private
+		 */
+	    Ticker.prototype._disposeClock = function () {
+	        if (this._timeout) {
+	            clearTimeout(this._timeout);
+	            this._timeout = null;
+	        }
+	        if (this._worker) {
+	            this._worker.terminate();
+	            this._worker.onmessage = null;
+	            this._worker = null;
+	        }
+	    };
+	    /**
+		 * Clean up
+		 * @private
+		 */
+	    Ticker.prototype.dispose = function () {
+	        this._disposeClock();
+	        this._callback = null;
+	    };
+	    /**
+		 *  Shim all connect/disconnect and some deprecated methods which are still in
+		 *  some older implementations.
+		 *  @private
+		 */
+	    Tone.getContext(function () {
+	        var nativeConnect = AudioNode.prototype.connect;
+	        var nativeDisconnect = AudioNode.prototype.disconnect;
+	        //replace the old connect method
+	        function toneConnect(B, outNum, inNum) {
+	            if (B.input) {
+	                inNum = Tone.defaultArg(inNum, 0);
+	                if (Tone.isArray(B.input)) {
+	                    return this.connect(B.input[inNum]);
+	                } else {
+	                    return this.connect(B.input, outNum, inNum);
+	                }
+	            } else {
+	                try {
+	                    if (B instanceof AudioNode) {
+	                        nativeConnect.call(this, B, outNum, inNum);
+	                        return B;
+	                    } else {
+	                        nativeConnect.call(this, B, outNum);
+	                        return B;
+	                    }
+	                } catch (e) {
+	                    throw new Error('error connecting to node: ' + B + '\n' + e);
+	                }
+	            }
+	        }
+	        //replace the old disconnect method
+	        function toneDisconnect(B, outNum, inNum) {
+	            if (B && B.input && Tone.isArray(B.input)) {
+	                inNum = Tone.defaultArg(inNum, 0);
+	                this.disconnect(B.input[inNum], outNum, 0);
+	            } else if (B && B.input) {
+	                this.disconnect(B.input, outNum, inNum);
+	            } else {
+	                try {
+	                    nativeDisconnect.apply(this, arguments);
+	                } catch (e) {
+	                    throw new Error('error disconnecting node: ' + B + '\n' + e);
+	                }
+	            }
+	        }
+	        if (AudioNode.prototype.connect !== toneConnect) {
+	            AudioNode.prototype.connect = toneConnect;
+	            AudioNode.prototype.disconnect = toneDisconnect;
+	        }
+	    });
+	    // set the audio context initially, and if one is not already created
+	    if (Tone.supported && !Tone.initialized) {
+	        Tone.context = new Tone.Context();
+	        // log on first initialization
+	        // allow optional silencing of this log
+	        if (!window.TONE_SILENCE_VERSION_LOGGING) {
+	            // eslint-disable-next-line no-console
+	            console.log('%c * Tone.js ' + Tone.version + ' * ', 'background: #000; color: #fff');
+	        }
+	    } else if (!Tone.supported) {
+	        // eslint-disable-next-line no-console
+	        console.warn('This browser does not support Tone.js');
+	    }
+	    return Tone.Context;
+	});
+	Module(function (Tone) {
+	    /**
+		 *  @class Tone.AudioNode is the base class for classes which process audio.
+		 *         AudioNodes have inputs and outputs.
+		 *  @param	{AudioContext=} context	The audio context to use with the class
+		 *  @extends {Tone}
+		 */
+	    Tone.AudioNode = function () {
+	        Tone.call(this);
+	        //use the default context if one is not passed in
+	        var options = Tone.defaults(arguments, ['context'], { 'context': Tone.context });
+	        /**
+			 * The AudioContext of this instance
+			 * @private
+			 * @type {AudioContext}
+			 */
+	        this._context = options.context;
+	    };
+	    Tone.extend(Tone.AudioNode);
+	    /**
+		 * Get the audio context belonging to this instance.
+		 * @type {Tone.Context}
+		 * @memberOf Tone.AudioNode#
+		 * @name context
+		 * @readOnly
+		 */
+	    Object.defineProperty(Tone.AudioNode.prototype, 'context', {
+	        get: function () {
+	            return this._context;
+	        }
+	    });
+	    /**
+		 *  Create input and outputs for this object.
+		 *  @param  {Number}  [input=0]   The number of inputs
+		 *  @param  {Number}  [outputs=0]  The number of outputs
+		 *  @return  {Tone.AudioNode}  this
+		 *  @private
+		 */
+	    Tone.AudioNode.prototype.createInsOuts = function (inputs, outputs) {
+	        if (inputs === 1) {
+	            this.input = this.context.createGain();
+	        } else if (inputs > 1) {
+	            this.input = new Array(inputs);
+	        }
+	        if (outputs === 1) {
+	            this.output = this.context.createGain();
+	        } else if (outputs > 1) {
+	            this.output = new Array(outputs);
+	        }
+	    };
+	    /**
+		 *  channelCount is the number of channels used when up-mixing and down-mixing
+		 *  connections to any inputs to the node. The default value is 2 except for
+		 *  specific nodes where its value is specially determined.
+		 *
+		 *  @memberof Tone.AudioNode#
+		 *  @type {Number}
+		 *  @name channelCount
+		 *  @readOnly
+		 */
+	    Object.defineProperty(Tone.AudioNode.prototype, 'channelCount', {
+	        get: function () {
+	            return this.output.channelCount;
+	        },
+	        set: function (c) {
+	            return this.output.channelCount = c;
+	        }
+	    });
+	    /**
+		 *  channelCountMode determines how channels will be counted when up-mixing and
+		 *  down-mixing connections to any inputs to the node.
+		 *  The default value is "max". This attribute has no effect for nodes with no inputs.
+		 *  @memberof Tone.AudioNode#
+		 *  @type {String}
+		 *  @name channelCountMode
+		 *  @readOnly
+		 */
+	    Object.defineProperty(Tone.AudioNode.prototype, 'channelCountMode', {
+	        get: function () {
+	            return this.output.channelCountMode;
+	        },
+	        set: function (m) {
+	            return this.output.channelCountMode = m;
+	        }
+	    });
+	    /**
+		 *  channelInterpretation determines how individual channels will be treated
+		 *  when up-mixing and down-mixing connections to any inputs to the node.
+		 *  The default value is "speakers".
+		 *  @memberof Tone.AudioNode#
+		 *  @type {String}
+		 *  @name channelInterpretation
+		 *  @readOnly
+		 */
+	    Object.defineProperty(Tone.AudioNode.prototype, 'channelInterpretation', {
+	        get: function () {
+	            return this.output.channelInterpretation;
+	        },
+	        set: function (i) {
+	            return this.output.channelInterpretation = i;
+	        }
+	    });
+	    /**
+		 *  The number of inputs feeding into the AudioNode.
+		 *  For source nodes, this will be 0.
+		 *  @type {Number}
+		 *  @name numberOfInputs
+		 *  @memberof Tone.AudioNode#
+		 *  @readOnly
+		 */
+	    Object.defineProperty(Tone.AudioNode.prototype, 'numberOfInputs', {
+	        get: function () {
+	            if (this.input) {
+	                if (Tone.isArray(this.input)) {
+	                    return this.input.length;
+	                } else {
+	                    return 1;
+	                }
+	            } else {
+	                return 0;
+	            }
+	        }
+	    });
+	    /**
+		 *  The number of outputs coming out of the AudioNode.
+		 *  @type {Number}
+		 *  @name numberOfOutputs
+		 *  @memberof Tone.AudioNode#
+		 *  @readOnly
+		 */
+	    Object.defineProperty(Tone.AudioNode.prototype, 'numberOfOutputs', {
+	        get: function () {
+	            if (this.output) {
+	                if (Tone.isArray(this.output)) {
+	                    return this.output.length;
+	                } else {
+	                    return 1;
+	                }
+	            } else {
+	                return 0;
+	            }
+	        }
+	    });
+	    /**
+		 * Called when an audio param connects to this node
+		 * @private
+		 */
+	    Tone.AudioNode.prototype._onConnect = function () {
+	    };
+	    /**
+		 *  connect the output of a ToneNode to an AudioParam, AudioNode, or ToneNode
+		 *  @param  {Tone | AudioParam | AudioNode} unit
+		 *  @param {number} [outputNum=0] optionally which output to connect from
+		 *  @param {number} [inputNum=0] optionally which input to connect to
+		 *  @returns {Tone.AudioNode} this
+		 */
+	    Tone.AudioNode.prototype.connect = function (unit, outputNum, inputNum) {
+	        if (unit._onConnect) {
+	            unit._onConnect(this);
+	        }
+	        if (Tone.isArray(this.output)) {
+	            outputNum = Tone.defaultArg(outputNum, 0);
+	            this.output[outputNum].connect(unit, 0, inputNum);
+	        } else {
+	            this.output.connect(unit, outputNum, inputNum);
+	        }
+	        return this;
+	    };
+	    /**
+		 *  disconnect the output
+		 *  @param {Number|AudioNode} output Either the output index to disconnect
+		 *                                   if the output is an array, or the
+		 *                                   node to disconnect from.
+		 *  @returns {Tone.AudioNode} this
+		 */
+	    Tone.AudioNode.prototype.disconnect = function (destination, outputNum, inputNum) {
+	        if (Tone.isArray(this.output)) {
+	            if (Tone.isNumber(destination)) {
+	                this.output[destination].disconnect();
+	            } else {
+	                outputNum = Tone.defaultArg(outputNum, 0);
+	                this.output[outputNum].disconnect(destination, 0, inputNum);
+	            }
+	        } else {
+	            this.output.disconnect.apply(this.output, arguments);
+	        }
+	    };
+	    /**
+		 *  Connect the output of this node to the rest of the nodes in series.
+		 *  @example
+		 *  //connect a node to an effect, panVol and then to the master output
+		 *  node.chain(effect, panVol, Tone.Master);
+		 *  @param {...AudioParam|Tone|AudioNode} nodes
+		 *  @returns {Tone.AudioNode} this
+		 *  @private
+		 */
+	    Tone.AudioNode.prototype.chain = function () {
+	        var currentUnit = this;
+	        for (var i = 0; i < arguments.length; i++) {
+	            var toUnit = arguments[i];
+	            currentUnit.connect(toUnit);
+	            currentUnit = toUnit;
+	        }
+	        return this;
+	    };
+	    /**
+		 *  connect the output of this node to the rest of the nodes in parallel.
+		 *  @param {...AudioParam|Tone|AudioNode} nodes
+		 *  @returns {Tone.AudioNode} this
+		 *  @private
+		 */
+	    Tone.AudioNode.prototype.fan = function () {
+	        for (var i = 0; i < arguments.length; i++) {
+	            this.connect(arguments[i]);
+	        }
+	        return this;
+	    };
+	    if (window.AudioNode) {
+	        //give native nodes chain and fan methods
+	        AudioNode.prototype.chain = Tone.AudioNode.prototype.chain;
+	        AudioNode.prototype.fan = Tone.AudioNode.prototype.fan;
+	    }
+	    /**
+		 * Dispose and disconnect
+		 * @return {Tone.AudioNode} this
+		 */
+	    Tone.AudioNode.prototype.dispose = function () {
+	        if (Tone.isDefined(this.input)) {
+	            if (this.input instanceof AudioNode) {
+	                this.input.disconnect();
+	            }
+	            this.input = null;
+	        }
+	        if (Tone.isDefined(this.output)) {
+	            if (this.output instanceof AudioNode) {
+	                this.output.disconnect();
+	            }
+	            this.output = null;
+	        }
+	        this._context = null;
+	        return this;
+	    };
+	    return Tone.AudioNode;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Base class for all Signals. Used Internally.
+		 *
+		 *  @constructor
+		 *  @extends {Tone}
+		 */
+	    Tone.SignalBase = function () {
+	        Tone.AudioNode.call(this);
+	    };
+	    Tone.extend(Tone.SignalBase, Tone.AudioNode);
+	    /**
+		 *  When signals connect to other signals or AudioParams,
+		 *  they take over the output value of that signal or AudioParam.
+		 *  For all other nodes, the behavior is the same as a default <code>connect</code>.
+		 *
+		 *  @override
+		 *  @param {AudioParam|AudioNode|Tone.Signal|Tone} node
+		 *  @param {number} [outputNumber=0] The output number to connect from.
+		 *  @param {number} [inputNumber=0] The input number to connect to.
+		 *  @returns {Tone.SignalBase} this
+		 */
+	    Tone.SignalBase.prototype.connect = function (node, outputNumber, inputNumber) {
+	        //zero it out so that the signal can have full control
+	        if (Tone.Signal && Tone.Signal === node.constructor || Tone.Param && Tone.Param === node.constructor) {
+	            //cancel changes
+	            node._param.cancelScheduledValues(0);
+	            //reset the value
+	            node._param.value = 0;
+	            //mark the value as overridden
+	            node.overridden = true;
+	        } else if (node instanceof AudioParam) {
+	            node.cancelScheduledValues(0);
+	            node.value = 0;
+	        }
+	        Tone.AudioNode.prototype.connect.call(this, node, outputNumber, inputNumber);
+	        return this;
+	    };
+	    return Tone.SignalBase;
+	});
+	Module(function (Tone) {
+	    if (Tone.supported) {
+	        //fixes safari only bug which is still present in 11
+	        var ua = navigator.userAgent.toLowerCase();
+	        var isSafari = ua.includes('safari') && !ua.includes('chrome');
+	        if (isSafari) {
+	            var WaveShaperNode = function (context) {
+	                this._internalNode = this.input = this.output = context._native_createWaveShaper();
+	                this._curve = null;
+	                for (var prop in this._internalNode) {
+	                    this._defineProperty(this._internalNode, prop);
+	                }
+	            };
+	            Object.defineProperty(WaveShaperNode.prototype, 'curve', {
+	                get: function () {
+	                    return this._curve;
+	                },
+	                set: function (curve) {
+	                    this._curve = curve;
+	                    var array = new Float32Array(curve.length + 1);
+	                    array.set(curve, 1);
+	                    array[0] = curve[0];
+	                    this._internalNode.curve = array;
+	                }
+	            });
+	            WaveShaperNode.prototype._defineProperty = function (context, prop) {
+	                if (Tone.isUndef(this[prop])) {
+	                    Object.defineProperty(this, prop, {
+	                        get: function () {
+	                            if (typeof context[prop] === 'function') {
+	                                return context[prop].bind(context);
+	                            } else {
+	                                return context[prop];
+	                            }
+	                        },
+	                        set: function (val) {
+	                            context[prop] = val;
+	                        }
+	                    });
+	                }
+	            };
+	            AudioContext.prototype._native_createWaveShaper = AudioContext.prototype.createWaveShaper;
+	            AudioContext.prototype.createWaveShaper = function () {
+	                return new WaveShaperNode(this);
+	            };
+	        }
+	    }
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Wraps the native Web Audio API
+		 *         [WaveShaperNode](http://webaudio.github.io/web-audio-api/#the-waveshapernode-interface).
+		 *
+		 *  @extends {Tone.SignalBase}
+		 *  @constructor
+		 *  @param {function|Array|Number} mapping The function used to define the values.
+		 *                                    The mapping function should take two arguments:
+		 *                                    the first is the value at the current position
+		 *                                    and the second is the array position.
+		 *                                    If the argument is an array, that array will be
+		 *                                    set as the wave shaping function. The input
+		 *                                    signal is an AudioRange [-1, 1] value and the output
+		 *                                    signal can take on any numerical values.
+		 *
+		 *  @param {Number} [bufferLen=1024] The length of the WaveShaperNode buffer.
+		 *  @example
+		 * var timesTwo = new Tone.WaveShaper(function(val){
+		 * 	return val * 2;
+		 * }, 2048);
+		 *  @example
+		 * //a waveshaper can also be constructed with an array of values
+		 * var invert = new Tone.WaveShaper([1, -1]);
+		 */
+	    Tone.WaveShaper = function (mapping, bufferLen) {
+	        Tone.SignalBase.call(this);
+	        /**
+			 *  the waveshaper
+			 *  @type {WaveShaperNode}
+			 *  @private
+			 */
+	        this._shaper = this.input = this.output = this.context.createWaveShaper();
+	        /**
+			 *  the waveshapers curve
+			 *  @type {Float32Array}
+			 *  @private
+			 */
+	        this._curve = null;
+	        if (Array.isArray(mapping)) {
+	            this.curve = mapping;
+	        } else if (isFinite(mapping) || Tone.isUndef(mapping)) {
+	            this._curve = new Float32Array(Tone.defaultArg(mapping, 1024));
+	        } else if (Tone.isFunction(mapping)) {
+	            this._curve = new Float32Array(Tone.defaultArg(bufferLen, 1024));
+	            this.setMap(mapping);
+	        }
+	    };
+	    Tone.extend(Tone.WaveShaper, Tone.SignalBase);
+	    /**
+		 *  Uses a mapping function to set the value of the curve.
+		 *  @param {function} mapping The function used to define the values.
+		 *                            The mapping function take two arguments:
+		 *                            the first is the value at the current position
+		 *                            which goes from -1 to 1 over the number of elements
+		 *                            in the curve array. The second argument is the array position.
+		 *  @returns {Tone.WaveShaper} this
+		 *  @example
+		 * //map the input signal from [-1, 1] to [0, 10]
+		 * shaper.setMap(function(val, index){
+		 * 	return (val + 1) * 5;
+		 * })
+		 */
+	    Tone.WaveShaper.prototype.setMap = function (mapping) {
+	        var array = new Array(this._curve.length);
+	        for (var i = 0, len = this._curve.length; i < len; i++) {
+	            var normalized = i / (len - 1) * 2 - 1;
+	            array[i] = mapping(normalized, i);
+	        }
+	        this.curve = array;
+	        return this;
+	    };
+	    /**
+		 * The array to set as the waveshaper curve. For linear curves
+		 * array length does not make much difference, but for complex curves
+		 * longer arrays will provide smoother interpolation.
+		 * @memberOf Tone.WaveShaper#
+		 * @type {Array}
+		 * @name curve
+		 */
+	    Object.defineProperty(Tone.WaveShaper.prototype, 'curve', {
+	        get: function () {
+	            return this._shaper.curve;
+	        },
+	        set: function (mapping) {
+	            this._curve = new Float32Array(mapping);
+	            this._shaper.curve = this._curve;
+	        }
+	    });
+	    /**
+		 * Specifies what type of oversampling (if any) should be used when
+		 * applying the shaping curve. Can either be "none", "2x" or "4x".
+		 * @memberOf Tone.WaveShaper#
+		 * @type {string}
+		 * @name oversample
+		 */
+	    Object.defineProperty(Tone.WaveShaper.prototype, 'oversample', {
+	        get: function () {
+	            return this._shaper.oversample;
+	        },
+	        set: function (oversampling) {
+	            if ([
+	                    'none',
+	                    '2x',
+	                    '4x'
+	                ].includes(oversampling)) {
+	                this._shaper.oversample = oversampling;
+	            } else {
+	                throw new RangeError('Tone.WaveShaper: oversampling must be either \'none\', \'2x\', or \'4x\'');
+	            }
+	        }
+	    });
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.WaveShaper} this
+		 */
+	    Tone.WaveShaper.prototype.dispose = function () {
+	        Tone.SignalBase.prototype.dispose.call(this);
+	        this._shaper.disconnect();
+	        this._shaper = null;
+	        this._curve = null;
+	        return this;
+	    };
+	    return Tone.WaveShaper;
+	});
+	Module(function (Tone) {
+	    /**
+		 *  @class Tone.TimeBase is a flexible encoding of time
+		 *         which can be evaluated to and from a string.
+		 *  @extends {Tone}
+		 *  @param  {Time}  val    The time value as a number or string
+		 *  @param  {String=}  units  Unit values
+		 *  @example
+		 * Tone.TimeBase(4, "n")
+		 * Tone.TimeBase(2, "t")
+		 * Tone.TimeBase("2t")
+		 * Tone.TimeBase("2t") + Tone.TimeBase("4n");
+		 */
+	    Tone.TimeBase = function (val, units) {
+	        //allows it to be constructed with or without 'new'
+	        if (this instanceof Tone.TimeBase) {
+	            /**
+				 *  The value
+				 *  @type  {Number|String|Tone.TimeBase}
+				 *  @private
+				 */
+	            this._val = val;
+	            /**
+				 * The units
+				 * @type {String?}
+				 * @private
+				 */
+	            this._units = units;
+	            //test if the value is a string representation of a number
+	            if (Tone.isUndef(this._units) && Tone.isString(this._val) && // eslint-disable-next-line eqeqeq
+	                parseFloat(this._val) == this._val && this._val.charAt(0) !== '+') {
+	                this._val = parseFloat(this._val);
+	                this._units = this._defaultUnits;
+	            } else if (val && val.constructor === this.constructor) {
+	                //if they're the same type, just copy values over
+	                this._val = val._val;
+	                this._units = val._units;
+	            } else if (val instanceof Tone.TimeBase) {
+	                switch (this._defaultUnits) {
+	                case 's':
+	                    this._val = val.toSeconds();
+	                    break;
+	                case 'i':
+	                    this._val = val.toTicks();
+	                    break;
+	                case 'hz':
+	                    this._val = val.toFrequency();
+	                    break;
+	                case 'midi':
+	                    this._val = val.toMidi();
+	                    break;
+	                default:
+	                    throw new Error('Unrecognized default units ' + this._defaultUnits);
+	                }
+	            }
+	        } else {
+	            return new Tone.TimeBase(val, units);
+	        }
+	    };
+	    Tone.extend(Tone.TimeBase);
+	    ///////////////////////////////////////////////////////////////////////////
+	    //	ABSTRACT SYNTAX TREE PARSER
+	    ///////////////////////////////////////////////////////////////////////////
+	    /**
+		 *  All the primary expressions.
+		 *  @private
+		 *  @type  {Object}
+		 */
+	    Tone.TimeBase.prototype._expressions = {
+	        'n': {
+	            regexp: /^(\d+)n(\.?)$/i,
+	            method: function (value, dot) {
+	                value = parseInt(value);
+	                var scalar = dot === '.' ? 1.5 : 1;
+	                if (value === 1) {
+	                    return this._beatsToUnits(this._getTimeSignature()) * scalar;
+	                } else {
+	                    return this._beatsToUnits(4 / value) * scalar;
+	                }
+	            }
+	        },
+	        't': {
+	            regexp: /^(\d+)t$/i,
+	            method: function (value) {
+	                value = parseInt(value);
+	                return this._beatsToUnits(8 / (parseInt(value) * 3));
+	            }
+	        },
+	        'm': {
+	            regexp: /^(\d+)m$/i,
+	            method: function (value) {
+	                return this._beatsToUnits(parseInt(value) * this._getTimeSignature());
+	            }
+	        },
+	        'i': {
+	            regexp: /^(\d+)i$/i,
+	            method: function (value) {
+	                return this._ticksToUnits(parseInt(value));
+	            }
+	        },
+	        'hz': {
+	            regexp: /^(\d+(?:\.\d+)?)hz$/i,
+	            method: function (value) {
+	                return this._frequencyToUnits(parseFloat(value));
+	            }
+	        },
+	        'tr': {
+	            regexp: /^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?$/,
+	            method: function (m, q, s) {
+	                var total = 0;
+	                if (m && m !== '0') {
+	                    total += this._beatsToUnits(this._getTimeSignature() * parseFloat(m));
+	                }
+	                if (q && q !== '0') {
+	                    total += this._beatsToUnits(parseFloat(q));
+	                }
+	                if (s && s !== '0') {
+	                    total += this._beatsToUnits(parseFloat(s) / 4);
+	                }
+	                return total;
+	            }
+	        },
+	        's': {
+	            regexp: /^(\d+(?:\.\d+)?)s$/,
+	            method: function (value) {
+	                return this._secondsToUnits(parseFloat(value));
+	            }
+	        },
+	        'samples': {
+	            regexp: /^(\d+)samples$/,
+	            method: function (value) {
+	                return parseInt(value) / this.context.sampleRate;
+	            }
+	        },
+	        'default': {
+	            regexp: /^(\d+(?:\.\d+)?)$/,
+	            method: function (value) {
+	                return this._expressions[this._defaultUnits].method.call(this, value);
+	            }
+	        }
+	    };
+	    /**
+		 *  The default units if none are given.
+		 *  @type {String}
+		 *  @private
+		 */
+	    Tone.TimeBase.prototype._defaultUnits = 's';
+	    ///////////////////////////////////////////////////////////////////////////
+	    //	TRANSPORT FALLBACKS
+	    ///////////////////////////////////////////////////////////////////////////
+	    /**
+		 * Return the bpm, or 120 if Transport is not available
+		 * @type {Number}
+		 * @private
+		 */
+	    Tone.TimeBase.prototype._getBpm = function () {
+	        if (Tone.Transport) {
+	            return Tone.Transport.bpm.value;
+	        } else {
+	            return 120;
+	        }
+	    };
+	    /**
+		 * Return the timeSignature or 4 if Transport is not available
+		 * @type {Number}
+		 * @private
+		 */
+	    Tone.TimeBase.prototype._getTimeSignature = function () {
+	        if (Tone.Transport) {
+	            return Tone.Transport.timeSignature;
+	        } else {
+	            return 4;
+	        }
+	    };
+	    /**
+		 * Return the PPQ or 192 if Transport is not available
+		 * @type {Number}
+		 * @private
+		 */
+	    Tone.TimeBase.prototype._getPPQ = function () {
+	        if (Tone.Transport) {
+	            return Tone.Transport.PPQ;
+	        } else {
+	            return 192;
+	        }
+	    };
+	    /**
+		 * Return the current time in whichever context is relevant
+		 * @type {Number}
+		 * @private
+		 */
+	    Tone.TimeBase.prototype._now = function () {
+	        return this.now();
+	    };
+	    ///////////////////////////////////////////////////////////////////////////
+	    //	UNIT CONVERSIONS
+	    ///////////////////////////////////////////////////////////////////////////
+	    /**
+		 *  Returns the value of a frequency in the current units
+		 *  @param {Frequency} freq
+		 *  @return  {Number}
+		 *  @private
+		 */
+	    Tone.TimeBase.prototype._frequencyToUnits = function (freq) {
+	        return 1 / freq;
+	    };
+	    /**
+		 *  Return the value of the beats in the current units
+		 *  @param {Number} beats
+		 *  @return  {Number}
+		 *  @private
+		 */
+	    Tone.TimeBase.prototype._beatsToUnits = function (beats) {
+	        return 60 / this._getBpm() * beats;
+	    };
+	    /**
+		 *  Returns the value of a second in the current units
+		 *  @param {Seconds} seconds
+		 *  @return  {Number}
+		 *  @private
+		 */
+	    Tone.TimeBase.prototype._secondsToUnits = function (seconds) {
+	        return seconds;
+	    };
+	    /**
+		 *  Returns the value of a tick in the current time units
+		 *  @param {Ticks} ticks
+		 *  @return  {Number}
+		 *  @private
+		 */
+	    Tone.TimeBase.prototype._ticksToUnits = function (ticks) {
+	        return ticks * (this._beatsToUnits(1) / this._getPPQ());
+	    };
+	    /**
+		 * With no arguments, return 'now'
+		 *  @return  {Number}
+		 *  @private
+		 */
+	    Tone.TimeBase.prototype._noArg = function () {
+	        return this._now();
+	    };
+	    ///////////////////////////////////////////////////////////////////////////
+	    //	EXPRESSIONS
+	    ///////////////////////////////////////////////////////////////////////////
+	    /**
+		 *  Evaluate the time value. Returns the time
+		 *  in seconds.
+		 *  @return  {Seconds}
+		 */
+	    Tone.TimeBase.prototype.valueOf = function () {
+	        if (Tone.isUndef(this._val)) {
+	            return this._noArg();
+	        } else if (Tone.isString(this._val) && Tone.isUndef(this._units)) {
+	            for (var units in this._expressions) {
+	                if (this._expressions[units].regexp.test(this._val.trim())) {
+	                    this._units = units;
+	                    break;
+	                }
+	            }
+	        }
+	        if (Tone.isDefined(this._units)) {
+	            var expr = this._expressions[this._units];
+	            var matching = this._val.toString().trim().match(expr.regexp);
+	            if (matching) {
+	                return expr.method.apply(this, matching.slice(1));
+	            } else {
+	                return expr.method.call(this, parseFloat(this._val));
+	            }
+	        } else {
+	            return this._val;
+	        }
+	    };
+	    /**
+		 *  Return the value in seconds
+		 *  @return {Seconds}
+		 */
+	    Tone.TimeBase.prototype.toSeconds = function () {
+	        return this.valueOf();
+	    };
+	    /**
+		 *  Return the value in hertz
+		 *  @return {Frequency}
+		 */
+	    Tone.TimeBase.prototype.toFrequency = function () {
+	        return 1 / this.toSeconds();
+	    };
+	    /**
+		 *  Return the time in samples
+		 *  @return  {Samples}
+		 */
+	    Tone.TimeBase.prototype.toSamples = function () {
+	        return this.toSeconds() * this.context.sampleRate;
+	    };
+	    /**
+		 *  Return the time in milliseconds.
+		 *  @return  {Milliseconds}
+		 */
+	    Tone.TimeBase.prototype.toMilliseconds = function () {
+	        return this.toSeconds() * 1000;
+	    };
+	    /**
+		 *  Clean up
+		 *  @return {Tone.TimeBase} this
+		 */
+	    Tone.TimeBase.prototype.dispose = function () {
+	        this._val = null;
+	        this._units = null;
+	    };
+	    return Tone.TimeBase;
+	});
+	Module(function (Tone) {
+	    /**
+		 *  @class Tone.Frequency is a primitive type for encoding Frequency values.
+		 *         Eventually all time values are evaluated to hertz
+		 *         using the `eval` method.
+		 *  @constructor
+		 *  @extends {Tone.TimeBase}
+		 *  @param  {String|Number}  val    The time value.
+		 *  @param  {String=}  units  The units of the value.
+		 *  @example
+		 * Tone.Frequency("C3") // 261
+		 * Tone.Frequency(38, "midi") //
+		 * Tone.Frequency("C3").transpose(4);
+		 */
+	    Tone.Frequency = function (val, units) {
+	        if (this instanceof Tone.Frequency) {
+	            Tone.TimeBase.call(this, val, units);
+	        } else {
+	            return new Tone.Frequency(val, units);
+	        }
+	    };
+	    Tone.extend(Tone.Frequency, Tone.TimeBase);
+	    ///////////////////////////////////////////////////////////////////////////
+	    //	AUGMENT BASE EXPRESSIONS
+	    ///////////////////////////////////////////////////////////////////////////
+	    Tone.Frequency.prototype._expressions = Object.assign({}, Tone.TimeBase.prototype._expressions, {
+	        'midi': {
+	            regexp: /^(\d+(?:\.\d+)?midi)/,
+	            method: function (value) {
+	                if (this._defaultUnits === 'midi') {
+	                    return value;
+	                } else {
+	                    return Tone.Frequency.mtof(value);
+	                }
+	            }
+	        },
+	        'note': {
+	            regexp: /^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i,
+	            method: function (pitch, octave) {
+	                var index = noteToScaleIndex[pitch.toLowerCase()];
+	                var noteNumber = index + (parseInt(octave) + 1) * 12;
+	                if (this._defaultUnits === 'midi') {
+	                    return noteNumber;
+	                } else {
+	                    return Tone.Frequency.mtof(noteNumber);
+	                }
+	            }
+	        },
+	        'tr': {
+	            regexp: /^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?/,
+	            method: function (m, q, s) {
+	                var total = 1;
+	                if (m && m !== '0') {
+	                    total *= this._beatsToUnits(this._getTimeSignature() * parseFloat(m));
+	                }
+	                if (q && q !== '0') {
+	                    total *= this._beatsToUnits(parseFloat(q));
+	                }
+	                if (s && s !== '0') {
+	                    total *= this._beatsToUnits(parseFloat(s) / 4);
+	                }
+	                return total;
+	            }
+	        }
+	    });
+	    ///////////////////////////////////////////////////////////////////////////
+	    //	EXPRESSIONS
+	    ///////////////////////////////////////////////////////////////////////////
+	    /**
+		 *  Transposes the frequency by the given number of semitones.
+		 *  @param  {Interval}  interval
+		 *  @return  {Tone.Frequency} A new transposed frequency
+		 *  @example
+		 * Tone.Frequency("A4").transpose(3); //"C5"
+		 */
+	    Tone.Frequency.prototype.transpose = function (interval) {
+	        return new this.constructor(this.valueOf() * Tone.intervalToFrequencyRatio(interval));
+	    };
+	    /**
+		 *  Takes an array of semitone intervals and returns
+		 *  an array of frequencies transposed by those intervals.
+		 *  @param  {Array}  intervals
+		 *  @return  {Array<Tone.Frequency>} Returns an array of Frequencies
+		 *  @example
+		 * Tone.Frequency("A4").harmonize([0, 3, 7]); //["A4", "C5", "E5"]
+		 */
+	    Tone.Frequency.prototype.harmonize = function (intervals) {
+	        return intervals.map(function (interval) {
+	            return this.transpose(interval);
+	        }.bind(this));
+	    };
+	    ///////////////////////////////////////////////////////////////////////////
+	    //	UNIT CONVERSIONS
+	    ///////////////////////////////////////////////////////////////////////////
+	    /**
+		 *  Return the value of the frequency as a MIDI note
+		 *  @return  {MIDI}
+		 *  @example
+		 * Tone.Frequency("C4").toMidi(); //60
+		 */
+	    Tone.Frequency.prototype.toMidi = function () {
+	        return Tone.Frequency.ftom(this.valueOf());
+	    };
+	    /**
+		 *  Return the value of the frequency in Scientific Pitch Notation
+		 *  @return  {Note}
+		 *  @example
+		 * Tone.Frequency(69, "midi").toNote(); //"A4"
+		 */
+	    Tone.Frequency.prototype.toNote = function () {
+	        var freq = this.toFrequency();
+	        var log = Math.log2(freq / Tone.Frequency.A4);
+	        var noteNumber = Math.round(12 * log) + 57;
+	        var octave = Math.floor(noteNumber / 12);
+	        if (octave < 0) {
+	            noteNumber += -12 * octave;
+	        }
+	        var noteName = scaleIndexToNote[noteNumber % 12];
+	        return noteName + octave.toString();
+	    };
+	    /**
+		 *  Return the duration of one cycle in seconds.
+		 *  @return  {Seconds}
+		 */
+	    Tone.Frequency.prototype.toSeconds = function () {
+	        return 1 / Tone.TimeBase.prototype.toSeconds.call(this);
+	    };
+	    /**
+		 *  Return the value in Hertz
+		 *  @return  {Frequency}
+		 */
+	    Tone.Frequency.prototype.toFrequency = function () {
+	        return Tone.TimeBase.prototype.toFrequency.call(this);
+	    };
+	    /**
+		 *  Return the duration of one cycle in ticks
+		 *  @return  {Ticks}
+		 */
+	    Tone.Frequency.prototype.toTicks = function () {
+	        var quarterTime = this._beatsToUnits(1);
+	        var quarters = this.valueOf() / quarterTime;
+	        return Math.floor(quarters * Tone.Transport.PPQ);
+	    };
+	    ///////////////////////////////////////////////////////////////////////////
+	    //	UNIT CONVERSIONS HELPERS
+	    ///////////////////////////////////////////////////////////////////////////
+	    /**
+		 *  With no arguments, return 0
+		 *  @return  {Number}
+		 *  @private
+		 */
+	    Tone.Frequency.prototype._noArg = function () {
+	        return 0;
+	    };
+	    /**
+		 *  Returns the value of a frequency in the current units
+		 *  @param {Frequency} freq
+		 *  @return  {Number}
+		 *  @private
+		 */
+	    Tone.Frequency.prototype._frequencyToUnits = function (freq) {
+	        return freq;
+	    };
+	    /**
+		 *  Returns the value of a tick in the current time units
+		 *  @param {Ticks} ticks
+		 *  @return  {Number}
+		 *  @private
+		 */
+	    Tone.Frequency.prototype._ticksToUnits = function (ticks) {
+	        return 1 / (ticks * 60 / (Tone.Transport.bpm.value * Tone.Transport.PPQ));
+	    };
+	    /**
+		 *  Return the value of the beats in the current units
+		 *  @param {Number} beats
+		 *  @return  {Number}
+		 *  @private
+		 */
+	    Tone.Frequency.prototype._beatsToUnits = function (beats) {
+	        return 1 / Tone.TimeBase.prototype._beatsToUnits.call(this, beats);
+	    };
+	    /**
+		 *  Returns the value of a second in the current units
+		 *  @param {Seconds} seconds
+		 *  @return  {Number}
+		 *  @private
+		 */
+	    Tone.Frequency.prototype._secondsToUnits = function (seconds) {
+	        return 1 / seconds;
+	    };
+	    /**
+		 *  The default units if none are given.
+		 *  @private
+		 */
+	    Tone.Frequency.prototype._defaultUnits = 'hz';
+	    ///////////////////////////////////////////////////////////////////////////
+	    //	FREQUENCY CONVERSIONS
+	    ///////////////////////////////////////////////////////////////////////////
+	    /**
+		 *  Note to scale index
+		 *  @type  {Object}
+		 */
+	    var noteToScaleIndex = {
+	        'cbb': -2,
+	        'cb': -1,
+	        'c': 0,
+	        'c#': 1,
+	        'cx': 2,
+	        'dbb': 0,
+	        'db': 1,
+	        'd': 2,
+	        'd#': 3,
+	        'dx': 4,
+	        'ebb': 2,
+	        'eb': 3,
+	        'e': 4,
+	        'e#': 5,
+	        'ex': 6,
+	        'fbb': 3,
+	        'fb': 4,
+	        'f': 5,
+	        'f#': 6,
+	        'fx': 7,
+	        'gbb': 5,
+	        'gb': 6,
+	        'g': 7,
+	        'g#': 8,
+	        'gx': 9,
+	        'abb': 7,
+	        'ab': 8,
+	        'a': 9,
+	        'a#': 10,
+	        'ax': 11,
+	        'bbb': 9,
+	        'bb': 10,
+	        'b': 11,
+	        'b#': 12,
+	        'bx': 13
+	    };
+	    /**
+		 *  scale index to note (sharps)
+		 *  @type  {Array}
+		 */
+	    var scaleIndexToNote = [
+	        'C',
+	        'C#',
+	        'D',
+	        'D#',
+	        'E',
+	        'F',
+	        'F#',
+	        'G',
+	        'G#',
+	        'A',
+	        'A#',
+	        'B'
+	    ];
+	    /**
+		 *  The [concert pitch](https://en.wikipedia.org/wiki/Concert_pitch)
+		 *  A4's values in Hertz.
+		 *  @type {Frequency}
+		 *  @static
+		 */
+	    Tone.Frequency.A4 = 440;
+	    /**
+		 *  Convert a MIDI note to frequency value.
+		 *  @param  {MIDI} midi The midi number to convert.
+		 *  @return {Frequency} the corresponding frequency value
+		 *  @static
+		 *  @example
+		 * Tone.Frequency.mtof(69); // returns 440
+		 */
+	    Tone.Frequency.mtof = function (midi) {
+	        return Tone.Frequency.A4 * Math.pow(2, (midi - 69) / 12);
+	    };
+	    /**
+		 *  Convert a frequency value to a MIDI note.
+		 *  @param {Frequency} frequency The value to frequency value to convert.
+		 *  @returns  {MIDI}
+		 *  @static
+		 *  @example
+		 * Tone.Frequency.ftom(440); // returns 69
+		 */
+	    Tone.Frequency.ftom = function (frequency) {
+	        return 69 + Math.round(12 * Math.log2(frequency / Tone.Frequency.A4));
+	    };
+	    return Tone.Frequency;
+	});
+	Module(function (Tone) {
+	    /**
+		 *  @class Tone.Time is a primitive type for encoding Time values.
+		 *         Tone.Time can be constructed with or without the `new` keyword. Tone.Time can be passed
+		 *         into the parameter of any method which takes time as an argument.
+		 *  @constructor
+		 *  @extends {Tone.TimeBase}
+		 *  @param  {String|Number}  val    The time value.
+		 *  @param  {String=}  units  The units of the value.
+		 *  @example
+		 * var t = Tone.Time("4n");//a quarter note
+		 */
+	    Tone.Time = function (val, units) {
+	        if (this instanceof Tone.Time) {
+	            Tone.TimeBase.call(this, val, units);
+	        } else {
+	            return new Tone.Time(val, units);
+	        }
+	    };
+	    Tone.extend(Tone.Time, Tone.TimeBase);
+	    /**
+		 * Extend the base expressions
+		 */
+	    Tone.Time.prototype._expressions = Object.assign({}, Tone.TimeBase.prototype._expressions, {
+	        'quantize': {
+	            regexp: /^@(.+)/,
+	            method: function (capture) {
+	                if (Tone.Transport) {
+	                    var quantTo = new this.constructor(capture);
+	                    return Tone.Transport.nextSubdivision(quantTo);
+	                } else {
+	                    return 0;
+	                }
+	            }
+	        },
+	        'now': {
+	            regexp: /^\+(.+)/,
+	            method: function (capture) {
+	                return this._now() + new this.constructor(capture);
+	            }
+	        }
+	    });
+	    /**
+		 *  Quantize the time by the given subdivision. Optionally add a
+		 *  percentage which will move the time value towards the ideal
+		 *  quantized value by that percentage.
+		 *  @param  {Number|Time}  val    The subdivision to quantize to
+		 *  @param  {NormalRange}  [percent=1]  Move the time value
+		 *                                   towards the quantized value by
+		 *                                   a percentage.
+		 *  @return  {Number}  this
+		 *  @example
+		 * Tone.Time(21).quantize(2) //returns 22
+		 * Tone.Time(0.6).quantize("4n", 0.5) //returns 0.55
+		 */
+	    Tone.Time.prototype.quantize = function (subdiv, percent) {
+	        percent = Tone.defaultArg(percent, 1);
+	        var subdivision = new this.constructor(subdiv);
+	        var value = this.valueOf();
+	        var multiple = Math.round(value / subdivision);
+	        var ideal = multiple * subdivision;
+	        var diff = ideal - value;
+	        return value + diff * percent;
+	    };
+	    ///////////////////////////////////////////////////////////////////////////
+	    // CONVERSIONS
+	    ///////////////////////////////////////////////////////////////////////////
+	    /**
+		 *  Convert a Time to Notation. The notation values are will be the
+		 *  closest representation between 1m to 128th note.
+		 *  @return {Notation}
+		 *  @example
+		 * //if the Transport is at 120bpm:
+		 * Tone.Time(2).toNotation();//returns "1m"
+		 */
+	    Tone.Time.prototype.toNotation = function () {
+	        var time = this.toSeconds();
+	        var testNotations = ['1m'];
+	        for (var power = 1; power < 8; power++) {
+	            var subdiv = Math.pow(2, power);
+	            testNotations.push(subdiv + 'n.');
+	            testNotations.push(subdiv + 'n');
+	            testNotations.push(subdiv + 't');
+	        }
+	        testNotations.push('0');
+	        //find the closets notation representation
+	        var closest = testNotations[0];
+	        var closestSeconds = Tone.Time(testNotations[0]).toSeconds();
+	        testNotations.forEach(function (notation) {
+	            var notationSeconds = Tone.Time(notation).toSeconds();
+	            if (Math.abs(notationSeconds - time) < Math.abs(closestSeconds - time)) {
+	                closest = notation;
+	                closestSeconds = notationSeconds;
+	            }
+	        });
+	        return closest;
+	    };
+	    /**
+		 *  Return the time encoded as Bars:Beats:Sixteenths.
+		 *  @return  {BarsBeatsSixteenths}
+		 */
+	    Tone.Time.prototype.toBarsBeatsSixteenths = function () {
+	        var quarterTime = this._beatsToUnits(1);
+	        var quarters = this.valueOf() / quarterTime;
+	        var measures = Math.floor(quarters / this._getTimeSignature());
+	        var sixteenths = quarters % 1 * 4;
+	        quarters = Math.floor(quarters) % this._getTimeSignature();
+	        sixteenths = sixteenths.toString();
+	        if (sixteenths.length > 3) {
+	            // the additional parseFloat removes insignificant trailing zeroes
+	            sixteenths = parseFloat(parseFloat(sixteenths).toFixed(3));
+	        }
+	        var progress = [
+	            measures,
+	            quarters,
+	            sixteenths
+	        ];
+	        return progress.join(':');
+	    };
+	    /**
+		 *  Return the time in ticks.
+		 *  @return  {Ticks}
+		 */
+	    Tone.Time.prototype.toTicks = function () {
+	        var quarterTime = this._beatsToUnits(1);
+	        var quarters = this.valueOf() / quarterTime;
+	        return Math.round(quarters * this._getPPQ());
+	    };
+	    /**
+		 *  Return the time in seconds.
+		 *  @return  {Seconds}
+		 */
+	    Tone.Time.prototype.toSeconds = function () {
+	        return this.valueOf();
+	    };
+	    /**
+		 *  Return the value as a midi note.
+		 *  @return  {Midi}
+		 */
+	    Tone.Time.prototype.toMidi = function () {
+	        return Tone.Frequency.ftom(this.toFrequency());
+	    };
+	    return Tone.Time;
+	});
+	Module(function (Tone) {
+	    /**
+		 *  @class Tone.TransportTime is a the time along the Transport's
+		 *         timeline. It is similar to Tone.Time, but instead of evaluating
+		 *         against the AudioContext's clock, it is evaluated against
+		 *         the Transport's position. See [TransportTime wiki](https://github.com/Tonejs/Tone.js/wiki/TransportTime).
+		 *  @constructor
+		 *  @param  {Time}  val    The time value as a number or string
+		 *  @param  {String=}  units  Unit values
+		 *  @extends {Tone.Time}
+		 */
+	    Tone.TransportTime = function (val, units) {
+	        if (this instanceof Tone.TransportTime) {
+	            Tone.Time.call(this, val, units);
+	        } else {
+	            return new Tone.TransportTime(val, units);
+	        }
+	    };
+	    Tone.extend(Tone.TransportTime, Tone.Time);
+	    /**
+		 * Return the current time in whichever context is relevant
+		 * @type {Number}
+		 * @private
+		 */
+	    Tone.TransportTime.prototype._now = function () {
+	        return Tone.Transport.seconds;
+	    };
+	    return Tone.TransportTime;
+	});
+	Module(function (Tone) {
+	    ///////////////////////////////////////////////////////////////////////////
+	    //	TYPES
+	    ///////////////////////////////////////////////////////////////////////////
+	    /**
+		 * Units which a value can take on.
+		 * @enum {String}
+		 */
+	    Tone.Type = {
+	        /**
+			 *  Default units
+			 *  @typedef {Default}
+			 */
+	        Default: 'number',
+	        /**
+			 *  Time can be described in a number of ways. Read more [Time](https://github.com/Tonejs/Tone.js/wiki/Time).
+			 *
+			 *  * Numbers, which will be taken literally as the time (in seconds).
+			 *  * Notation, ("4n", "8t") describes time in BPM and time signature relative values.
+			 *  * TransportTime, ("4:3:2") will also provide tempo and time signature relative times
+			 *  in the form BARS:QUARTERS:SIXTEENTHS.
+			 *  * Frequency, ("8hz") is converted to the length of the cycle in seconds.
+			 *  * Now-Relative, ("+1") prefix any of the above with "+" and it will be interpreted as
+			 *  "the current time plus whatever expression follows".
+			 *  * Expressions, ("3:0 + 2 - (1m / 7)") any of the above can also be combined
+			 *  into a mathematical expression which will be evaluated to compute the desired time.
+			 *  * No Argument, for methods which accept time, no argument will be interpreted as
+			 *  "now" (i.e. the currentTime).
+			 *
+			 *  @typedef {Time}
+			 */
+	        Time: 'time',
+	        /**
+			 *  Frequency can be described similar to time, except ultimately the
+			 *  values are converted to frequency instead of seconds. A number
+			 *  is taken literally as the value in hertz. Additionally any of the
+			 *  Time encodings can be used. Note names in the form
+			 *  of NOTE OCTAVE (i.e. C4) are also accepted and converted to their
+			 *  frequency value.
+			 *  @typedef {Frequency}
+			 */
+	        Frequency: 'frequency',
+	        /**
+			 *  TransportTime describes a position along the Transport's timeline. It is
+			 *  similar to Time in that it uses all the same encodings, but TransportTime specifically
+			 *  pertains to the Transport's timeline, which is startable, stoppable, loopable, and seekable.
+			 *  [Read more](https://github.com/Tonejs/Tone.js/wiki/TransportTime)
+			 *  @typedef {TransportTime}
+			 */
+	        TransportTime: 'transportTime',
+	        /**
+			 *  Ticks are the basic subunit of the Transport. They are
+			 *  the smallest unit of time that the Transport supports.
+			 *  @typedef {Ticks}
+			 */
+	        Ticks: 'ticks',
+	        /**
+			 *  Normal values are within the range [0, 1].
+			 *  @typedef {NormalRange}
+			 */
+	        NormalRange: 'normalRange',
+	        /**
+			 *  AudioRange values are between [-1, 1].
+			 *  @typedef {AudioRange}
+			 */
+	        AudioRange: 'audioRange',
+	        /**
+			 *  Decibels are a logarithmic unit of measurement which is useful for volume
+			 *  because of the logarithmic way that we perceive loudness. 0 decibels
+			 *  means no change in volume. -10db is approximately half as loud and 10db
+			 *  is twice is loud.
+			 *  @typedef {Decibels}
+			 */
+	        Decibels: 'db',
+	        /**
+			 *  Half-step note increments, i.e. 12 is an octave above the root. and 1 is a half-step up.
+			 *  @typedef {Interval}
+			 */
+	        Interval: 'interval',
+	        /**
+			 *  Beats per minute.
+			 *  @typedef {BPM}
+			 */
+	        BPM: 'bpm',
+	        /**
+			 *  The value must be greater than or equal to 0.
+			 *  @typedef {Positive}
+			 */
+	        Positive: 'positive',
+	        /**
+			 *  Gain is the ratio between input and output of a signal.
+			 *  A gain of 0 is the same as silencing the signal. A gain of
+			 *  1, causes no change to the incoming signal.
+			 *  @typedef {Gain}
+			 */
+	        Gain: 'gain',
+	        /**
+			 *  A cent is a hundredth of a semitone.
+			 *  @typedef {Cents}
+			 */
+	        Cents: 'cents',
+	        /**
+			 *  Angle between 0 and 360.
+			 *  @typedef {Degrees}
+			 */
+	        Degrees: 'degrees',
+	        /**
+			 *  A number representing a midi note.
+			 *  @typedef {MIDI}
+			 */
+	        MIDI: 'midi',
+	        /**
+			 *  A colon-separated representation of time in the form of
+			 *  Bars:Beats:Sixteenths.
+			 *  @typedef {BarsBeatsSixteenths}
+			 */
+	        BarsBeatsSixteenths: 'barsBeatsSixteenths',
+	        /**
+			 *  Sampling is the reduction of a continuous signal to a discrete signal.
+			 *  Audio is typically sampled 44100 times per second.
+			 *  @typedef {Samples}
+			 */
+	        Samples: 'samples',
+	        /**
+			 *  Hertz are a frequency representation defined as one cycle per second.
+			 *  @typedef {Hertz}
+			 */
+	        Hertz: 'hertz',
+	        /**
+			 *  A frequency represented by a letter name,
+			 *  accidental and octave. This system is known as
+			 *  [Scientific Pitch Notation](https://en.wikipedia.org/wiki/Scientific_pitch_notation).
+			 *  @typedef {Note}
+			 */
+	        Note: 'note',
+	        /**
+			 *  One millisecond is a thousandth of a second.
+			 *  @typedef {Milliseconds}
+			 */
+	        Milliseconds: 'milliseconds',
+	        /**
+			 *  Seconds are the time unit of the AudioContext. In the end,
+			 *  all values need to be evaluated to seconds.
+			 *  @typedef {Seconds}
+			 */
+	        Seconds: 'seconds',
+	        /**
+			 *  A string representing a duration relative to a measure.
+			 *  * "4n" = quarter note
+			 *  * "2m" = two measures
+			 *  * "8t" = eighth-note triplet
+			 *  @typedef {Notation}
+			 */
+	        Notation: 'notation'
+	    };
+	    ///////////////////////////////////////////////////////////////////////////
+	    // AUGMENT TONE's PROTOTYPE
+	    ///////////////////////////////////////////////////////////////////////////
+	    /**
+		 *  Convert Time into seconds.
+		 *
+		 *  Unlike the method which it overrides, this takes into account
+		 *  transporttime and musical notation.
+		 *
+		 *  Time : 1.40
+		 *  Notation: 4n or 1m or 2t
+		 *  Now Relative: +3n
+		 *  Math: 3n+16n or even complicated expressions ((3n*2)/6 + 1)
+		 *
+		 *  @param  {Time} time
+		 *  @return {Seconds}
+		 */
+	    Tone.prototype.toSeconds = function (time) {
+	        if (Tone.isNumber(time)) {
+	            return time;
+	        } else if (Tone.isUndef(time)) {
+	            return this.now();
+	        } else if (Tone.isString(time)) {
+	            return new Tone.Time(time).toSeconds();
+	        } else if (time instanceof Tone.TimeBase) {
+	            return time.toSeconds();
+	        }
+	    };
+	    /**
+		 *  Convert a frequency representation into a number.
+		 *  @param  {Frequency} freq
+		 *  @return {Hertz}      the frequency in hertz
+		 */
+	    Tone.prototype.toFrequency = function (freq) {
+	        if (Tone.isNumber(freq)) {
+	            return freq;
+	        } else if (Tone.isString(freq) || Tone.isUndef(freq)) {
+	            return new Tone.Frequency(freq).valueOf();
+	        } else if (freq instanceof Tone.TimeBase) {
+	            return freq.toFrequency();
+	        }
+	    };
+	    /**
+		 *  Convert a time representation into ticks.
+		 *  @param  {Time} time
+		 *  @return {Ticks}  the time in ticks
+		 */
+	    Tone.prototype.toTicks = function (time) {
+	        if (Tone.isNumber(time) || Tone.isString(time)) {
+	            return new Tone.TransportTime(time).toTicks();
+	        } else if (Tone.isUndef(time)) {
+	            return Tone.Transport.ticks;
+	        } else if (time instanceof Tone.TimeBase) {
+	            return time.toTicks();
+	        }
+	    };
+	    return Tone;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.Param wraps the native Web Audio's AudioParam to provide
+		 *         additional unit conversion functionality. It also
+		 *         serves as a base-class for classes which have a single,
+		 *         automatable parameter.
+		 *  @extends {Tone.AudioNode}
+		 *  @param  {AudioParam}  param  The parameter to wrap.
+		 *  @param  {Tone.Type} units The units of the audio param.
+		 *  @param  {Boolean} convert If the param should be converted.
+		 */
+	    Tone.Param = function () {
+	        var options = Tone.defaults(arguments, [
+	            'param',
+	            'units',
+	            'convert'
+	        ], Tone.Param);
+	        Tone.AudioNode.call(this);
+	        /**
+			 *  The native parameter to control
+			 *  @type  {AudioParam}
+			 *  @private
+			 */
+	        this._param = this.input = options.param;
+	        /**
+			 *  The units of the parameter
+			 *  @type {Tone.Type}
+			 */
+	        this.units = options.units;
+	        /**
+			 *  If the value should be converted or not
+			 *  @type {Boolean}
+			 */
+	        this.convert = options.convert;
+	        /**
+			 *  True if the signal value is being overridden by
+			 *  a connected signal.
+			 *  @readOnly
+			 *  @type  {boolean}
+			 *  @private
+			 */
+	        this.overridden = false;
+	        /**
+			 * The timeline which tracks all of the automations.
+			 * @type {Tone.Timeline}
+			 * @private
+			 */
+	        this._events = new Tone.Timeline(1000);
+	        if (Tone.isDefined(options.value) && this._param) {
+	            this.value = options.value;
+	        }
+	    };
+	    Tone.extend(Tone.Param, Tone.AudioNode);
+	    /**
+		 *  Defaults
+		 *  @type  {Object}
+		 *  @const
+		 */
+	    Tone.Param.defaults = {
+	        'units': Tone.Type.Default,
+	        'convert': true,
+	        'param': undefined
+	    };
+	    /**
+		 * The current value of the parameter.
+		 * @memberOf Tone.Param#
+		 * @type {Number}
+		 * @name value
+		 */
+	    Object.defineProperty(Tone.Param.prototype, 'value', {
+	        get: function () {
+	            var now = this.now();
+	            return this._toUnits(this.getValueAtTime(now));
+	        },
+	        set: function (value) {
+	            this._initialValue = this._fromUnits(value);
+	            this.cancelScheduledValues(this.context.currentTime);
+	            this.setValueAtTime(value, this.context.currentTime);
+	        }
+	    });
+	    /**
+		 * The minimum output value of the parameter
+		 * @memberOf Tone.Param#
+		 * @type {Number}
+		 * @name value
+		 */
+	    Object.defineProperty(Tone.Param.prototype, 'minValue', {
+	        get: function () {
+	            if (this.units === Tone.Type.Time || this.units === Tone.Type.Frequency || this.units === Tone.Type.NormalRange || this.units === Tone.Type.Positive || this.units === Tone.Type.BPM) {
+	                return 0;
+	            } else if (this.units === Tone.Type.AudioRange) {
+	                return -1;
+	            } else if (this.units === Tone.Type.Decibels) {
+	                return -Infinity;
+	            } else {
+	                return this._param.minValue;
+	            }
+	        }
+	    });
+	    /**
+		 * The maximum output value of the parameter
+		 * @memberOf Tone.Param#
+		 * @type {Number}
+		 * @name value
+		 */
+	    Object.defineProperty(Tone.Param.prototype, 'maxValue', {
+	        get: function () {
+	            if (this.units === Tone.Type.NormalRange || this.units === Tone.Type.AudioRange) {
+	                return 1;
+	            } else {
+	                return this._param.maxValue;
+	            }
+	        }
+	    });
+	    /**
+		 *  Convert the given value from the type specified by Tone.Param.units
+		 *  into the destination value (such as Gain or Frequency).
+		 *  @private
+		 *  @param  {*} val the value to convert
+		 *  @return {number}     the number which the value should be set to
+		 */
+	    Tone.Param.prototype._fromUnits = function (val) {
+	        if ((this.convert || Tone.isUndef(this.convert)) && !this.overridden) {
+	            switch (this.units) {
+	            case Tone.Type.Time:
+	                return this.toSeconds(val);
+	            case Tone.Type.Frequency:
+	                return this.toFrequency(val);
+	            case Tone.Type.Decibels:
+	                return Tone.dbToGain(val);
+	            case Tone.Type.NormalRange:
+	                return Math.min(Math.max(val, 0), 1);
+	            case Tone.Type.AudioRange:
+	                return Math.min(Math.max(val, -1), 1);
+	            case Tone.Type.Positive:
+	                return Math.max(val, 0);
+	            default:
+	                return val;
+	            }
+	        } else {
+	            return val;
+	        }
+	    };
+	    /**
+		 * Convert the parameters value into the units specified by Tone.Param.units.
+		 * @private
+		 * @param  {number} val the value to convert
+		 * @return {number}
+		 */
+	    Tone.Param.prototype._toUnits = function (val) {
+	        if (this.convert || Tone.isUndef(this.convert)) {
+	            switch (this.units) {
+	            case Tone.Type.Decibels:
+	                return Tone.gainToDb(val);
+	            default:
+	                return val;
+	            }
+	        } else {
+	            return val;
+	        }
+	    };
+	    /**
+		 *  the minimum output value
+		 *  @type {Number}
+		 *  @private
+		 */
+	    Tone.Param.prototype._minOutput = 0.00001;
+	    /**
+		 *  The event types
+		 *  @enum {String}
+		 *  @private
+		 */
+	    Tone.Param.AutomationType = {
+	        Linear: 'linearRampToValueAtTime',
+	        Exponential: 'exponentialRampToValueAtTime',
+	        Target: 'setTargetAtTime',
+	        SetValue: 'setValueAtTime'
+	    };
+	    /**
+		 *  Schedules a parameter value change at the given time.
+		 *  @param {*}	value The value to set the signal.
+		 *  @param {Time}  time The time when the change should occur.
+		 *  @returns {Tone.Param} this
+		 *  @example
+		 * //set the frequency to "G4" in exactly 1 second from now.
+		 * freq.setValueAtTime("G4", "+1");
+		 */
+	    Tone.Param.prototype.setValueAtTime = function (value, time) {
+	        time = this.toSeconds(time);
+	        value = this._fromUnits(value);
+	        this._events.add({
+	            'type': Tone.Param.AutomationType.SetValue,
+	            'value': value,
+	            'time': time
+	        });
+	        this._param.setValueAtTime(value, time);
+	        return this;
+	    };
+	    /**
+		 *  Get the signals value at the given time. Subsequent scheduling
+		 *  may invalidate the returned value.
+		 *  @param {Time} time When to get the value
+		 *  @returns {Number} The value at the given time
+		 */
+	    Tone.Param.prototype.getValueAtTime = function (time) {
+	        time = this.toSeconds(time);
+	        var after = this._events.getAfter(time);
+	        var before = this._events.get(time);
+	        var initialValue = Tone.defaultArg(this._initialValue, this._param.defaultValue);
+	        var value = initialValue;
+	        //if it was set by
+	        if (before === null) {
+	            value = initialValue;
+	        } else if (before.type === Tone.Param.AutomationType.Target) {
+	            var previous = this._events.getBefore(before.time);
+	            var previousVal;
+	            if (previous === null) {
+	                previousVal = initialValue;
+	            } else {
+	                previousVal = previous.value;
+	            }
+	            value = this._exponentialApproach(before.time, previousVal, before.value, before.constant, time);
+	        } else if (after === null) {
+	            value = before.value;
+	        } else if (after.type === Tone.Param.AutomationType.Linear) {
+	            value = this._linearInterpolate(before.time, before.value, after.time, after.value, time);
+	        } else if (after.type === Tone.Param.AutomationType.Exponential) {
+	            value = this._exponentialInterpolate(before.time, before.value, after.time, after.value, time);
+	        } else {
+	            value = before.value;
+	        }
+	        return value;
+	    };
+	    /**
+		 *  Creates a schedule point with the current value at the current time.
+		 *  This is useful for creating an automation anchor point in order to
+		 *  schedule changes from the current value.
+		 *
+		 *  @param {number=} now (Optionally) pass the now value in.
+		 *  @returns {Tone.Param} this
+		 */
+	    Tone.Param.prototype.setRampPoint = function (time) {
+	        time = this.toSeconds(time);
+	        var currentVal = this.getValueAtTime(time);
+	        this.cancelAndHoldAtTime(time);
+	        if (currentVal === 0) {
+	            currentVal = this._minOutput;
+	        }
+	        this.setValueAtTime(this._toUnits(currentVal), time);
+	        return this;
+	    };
+	    /**
+		 *  Schedules a linear continuous change in parameter value from the
+		 *  previous scheduled parameter value to the given value.
+		 *
+		 *  @param  {number} value
+		 *  @param  {Time} endTime
+		 *  @returns {Tone.Param} this
+		 */
+	    Tone.Param.prototype.linearRampToValueAtTime = function (value, endTime) {
+	        value = this._fromUnits(value);
+	        endTime = this.toSeconds(endTime);
+	        this._events.add({
+	            'type': Tone.Param.AutomationType.Linear,
+	            'value': value,
+	            'time': endTime
+	        });
+	        this._param.linearRampToValueAtTime(value, endTime);
+	        return this;
+	    };
+	    /**
+		 *  Schedules an exponential continuous change in parameter value from
+		 *  the previous scheduled parameter value to the given value.
+		 *
+		 *  @param  {number} value
+		 *  @param  {Time} endTime
+		 *  @returns {Tone.Param} this
+		 */
+	    Tone.Param.prototype.exponentialRampToValueAtTime = function (value, endTime) {
+	        value = this._fromUnits(value);
+	        value = Math.max(this._minOutput, value);
+	        endTime = this.toSeconds(endTime);
+	        //store the event
+	        this._events.add({
+	            'type': Tone.Param.AutomationType.Exponential,
+	            'time': endTime,
+	            'value': value
+	        });
+	        this._param.exponentialRampToValueAtTime(value, endTime);
+	        return this;
+	    };
+	    /**
+		 *  Schedules an exponential continuous change in parameter value from
+		 *  the current time and current value to the given value over the
+		 *  duration of the rampTime.
+		 *
+		 *  @param  {number} value   The value to ramp to.
+		 *  @param  {Time} rampTime the time that it takes the
+		 *                               value to ramp from it's current value
+		 *  @param {Time}	[startTime=now] 	When the ramp should start.
+		 *  @returns {Tone.Param} this
+		 *  @example
+		 * //exponentially ramp to the value 2 over 4 seconds.
+		 * signal.exponentialRampTo(2, 4);
+		 */
+	    Tone.Param.prototype.exponentialRampTo = function (value, rampTime, startTime) {
+	        startTime = this.toSeconds(startTime);
+	        this.setRampPoint(startTime);
+	        this.exponentialRampToValueAtTime(value, startTime + this.toSeconds(rampTime));
+	        return this;
+	    };
+	    /**
+		 *  Schedules an linear continuous change in parameter value from
+		 *  the current time and current value to the given value over the
+		 *  duration of the rampTime.
+		 *
+		 *  @param  {number} value   The value to ramp to.
+		 *  @param  {Time} rampTime the time that it takes the
+		 *                               value to ramp from it's current value
+		 *  @param {Time}	[startTime=now] 	When the ramp should start.
+		 *  @returns {Tone.Param} this
+		 *  @example
+		 * //linearly ramp to the value 4 over 3 seconds.
+		 * signal.linearRampTo(4, 3);
+		 */
+	    Tone.Param.prototype.linearRampTo = function (value, rampTime, startTime) {
+	        startTime = this.toSeconds(startTime);
+	        this.setRampPoint(startTime);
+	        this.linearRampToValueAtTime(value, startTime + this.toSeconds(rampTime));
+	        return this;
+	    };
+	    /**
+		 *  Start exponentially approaching the target value at the given time. Since it
+		 *  is an exponential approach it will continue approaching after the ramp duration. The
+		 *  rampTime is the time that it takes to reach over 99% of the way towards the value.
+		 *  @param  {number} value   The value to ramp to.
+		 *  @param  {Time} rampTime the time that it takes the
+		 *                               value to ramp from it's current value
+		 *  @param {Time}	[startTime=now] 	When the ramp should start.
+		 *  @returns {Tone.Param} this
+		 *  @example
+		 * //exponentially ramp to the value 2 over 4 seconds.
+		 * signal.exponentialRampTo(2, 4);
+		 */
+	    Tone.Param.prototype.targetRampTo = function (value, rampTime, startTime) {
+	        startTime = this.toSeconds(startTime);
+	        this.setRampPoint(startTime);
+	        this.exponentialApproachValueAtTime(value, startTime, rampTime);
+	        return this;
+	    };
+	    /**
+		 *  Start exponentially approaching the target value at the given time. Since it
+		 *  is an exponential approach it will continue approaching after the ramp duration. The
+		 *  rampTime is the time that it takes to reach over 99% of the way towards the value. This methods
+		 *  is similar to setTargetAtTime except the third argument is a time instead of a 'timeConstant'
+		 *  @param  {number} value   The value to ramp to.
+		 *  @param {Time}	time 	When the ramp should start.
+		 *  @param  {Time} rampTime the time that it takes the
+		 *                               value to ramp from it's current value
+		 *  @returns {Tone.Param} this
+		 *  @example
+		 * //exponentially ramp to the value 2 over 4 seconds.
+		 * signal.exponentialRampTo(2, 4);
+		 */
+	    Tone.Param.prototype.exponentialApproachValueAtTime = function (value, time, rampTime) {
+	        var timeConstant = Math.log(this.toSeconds(rampTime) + 1) / Math.log(200);
+	        time = this.toSeconds(time);
+	        return this.setTargetAtTime(value, time, timeConstant);
+	    };
+	    /**
+		 *  Start exponentially approaching the target value at the given time with
+		 *  a rate having the given time constant.
+		 *  @param {number} value
+		 *  @param {Time} startTime
+		 *  @param {number} timeConstant
+		 *  @returns {Tone.Param} this
+		 */
+	    Tone.Param.prototype.setTargetAtTime = function (value, startTime, timeConstant) {
+	        value = this._fromUnits(value);
+	        // The value will never be able to approach without timeConstant > 0.
+	        if (timeConstant <= 0) {
+	            throw new Error('timeConstant must be greater than 0');
+	        }
+	        startTime = this.toSeconds(startTime);
+	        this._events.add({
+	            'type': Tone.Param.AutomationType.Target,
+	            'value': value,
+	            'time': startTime,
+	            'constant': timeConstant
+	        });
+	        this._param.setTargetAtTime(value, startTime, timeConstant);
+	        return this;
+	    };
+	    /**
+		 *  Sets an array of arbitrary parameter values starting at the given time
+		 *  for the given duration.
+		 *
+		 *  @param {Array} values
+		 *  @param {Time} startTime
+		 *  @param {Time} duration
+		 *  @param {NormalRange} [scaling=1] If the values in the curve should be scaled by some value
+		 *  @returns {Tone.Param} this
+		 */
+	    Tone.Param.prototype.setValueCurveAtTime = function (values, startTime, duration, scaling) {
+	        scaling = Tone.defaultArg(scaling, 1);
+	        duration = this.toSeconds(duration);
+	        startTime = this.toSeconds(startTime);
+	        this.setValueAtTime(values[0] * scaling, startTime);
+	        var segTime = duration / (values.length - 1);
+	        for (var i = 1; i < values.length; i++) {
+	            this.linearRampToValueAtTime(values[i] * scaling, startTime + i * segTime);
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Cancels all scheduled parameter changes with times greater than or
+		 *  equal to startTime.
+		 *
+		 *  @param  {Time} time
+		 *  @returns {Tone.Param} this
+		 */
+	    Tone.Param.prototype.cancelScheduledValues = function (time) {
+	        time = this.toSeconds(time);
+	        this._events.cancel(time);
+	        this._param.cancelScheduledValues(time);
+	        return this;
+	    };
+	    /**
+		 *  This is similar to [cancelScheduledValues](#cancelScheduledValues) except
+		 *  it holds the automated value at time until the next automated event.
+		 *  @param  {Time} time
+		 *  @returns {Tone.Param} this
+		 */
+	    Tone.Param.prototype.cancelAndHoldAtTime = function (time) {
+	        var valueAtTime = this.getValueAtTime(time);
+	        //if there is an event at the given time
+	        //and that even is not a "set"
+	        var before = this._events.get(time);
+	        var after = this._events.getAfter(time);
+	        if (before && before.time === time) {
+	            //remove everything after
+	            if (after) {
+	                this._events.cancel(after.time);
+	            } else {
+	                this._events.cancel(time + 0.000001);
+	            }
+	        } else if (after) {
+	            //cancel the next event(s)
+	            this._events.cancel(after.time);
+	            if (!this._param.cancelAndHoldAtTime) {
+	                this._param.cancelScheduledValues(time);
+	            }
+	            if (after.type === Tone.Param.AutomationType.Linear) {
+	                if (!this._param.cancelAndHoldAtTime) {
+	                    this.linearRampToValueAtTime(valueAtTime, time);
+	                } else {
+	                    this._events.add({
+	                        'type': Tone.Param.AutomationType.Linear,
+	                        'value': valueAtTime,
+	                        'time': time
+	                    });
+	                }
+	            } else if (after.type === Tone.Param.AutomationType.Exponential) {
+	                if (!this._param.cancelAndHoldAtTime) {
+	                    this.exponentialRampToValueAtTime(valueAtTime, time);
+	                } else {
+	                    this._events.add({
+	                        'type': Tone.Param.AutomationType.Exponential,
+	                        'value': valueAtTime,
+	                        'time': time
+	                    });
+	                }
+	            }
+	        }
+	        //set the value at the given time
+	        this._events.add({
+	            'type': Tone.Param.AutomationType.SetValue,
+	            'value': valueAtTime,
+	            'time': time
+	        });
+	        if (this._param.cancelAndHoldAtTime) {
+	            this._param.cancelAndHoldAtTime(time);
+	        } else {
+	            this._param.setValueAtTime(valueAtTime, time);
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Ramps to the given value over the duration of the rampTime.
+		 *  Automatically selects the best ramp type (exponential or linear)
+		 *  depending on the `units` of the signal
+		 *
+		 *  @param  {number} value
+		 *  @param  {Time} rampTime 	The time that it takes the
+		 *                              value to ramp from it's current value
+		 *  @param {Time}	[startTime=now] 	When the ramp should start.
+		 *  @returns {Tone.Param} this
+		 *  @example
+		 * //ramp to the value either linearly or exponentially
+		 * //depending on the "units" value of the signal
+		 * signal.rampTo(0, 10);
+		 *  @example
+		 * //schedule it to ramp starting at a specific time
+		 * signal.rampTo(0, 10, 5)
+		 */
+	    Tone.Param.prototype.rampTo = function (value, rampTime, startTime) {
+	        rampTime = Tone.defaultArg(rampTime, 0.1);
+	        if (this.units === Tone.Type.Frequency || this.units === Tone.Type.BPM || this.units === Tone.Type.Decibels) {
+	            this.exponentialRampTo(value, rampTime, startTime);
+	        } else {
+	            this.linearRampTo(value, rampTime, startTime);
+	        }
+	        return this;
+	    };
+	    ///////////////////////////////////////////////////////////////////////////
+	    //	AUTOMATION CURVE CALCULATIONS
+	    //	MIT License, copyright (c) 2014 Jordan Santell
+	    ///////////////////////////////////////////////////////////////////////////
+	    // Calculates the the value along the curve produced by setTargetAtTime
+	    Tone.Param.prototype._exponentialApproach = function (t0, v0, v1, timeConstant, t) {
+	        return v1 + (v0 - v1) * Math.exp(-(t - t0) / timeConstant);
+	    };
+	    // Calculates the the value along the curve produced by linearRampToValueAtTime
+	    Tone.Param.prototype._linearInterpolate = function (t0, v0, t1, v1, t) {
+	        return v0 + (v1 - v0) * ((t - t0) / (t1 - t0));
+	    };
+	    // Calculates the the value along the curve produced by exponentialRampToValueAtTime
+	    Tone.Param.prototype._exponentialInterpolate = function (t0, v0, t1, v1, t) {
+	        return v0 * Math.pow(v1 / v0, (t - t0) / (t1 - t0));
+	    };
+	    /**
+		 *  Clean up
+		 *  @returns {Tone.Param} this
+		 */
+	    Tone.Param.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._param = null;
+	        this._events = null;
+	        return this;
+	    };
+	    return Tone.Param;
+	});
+	Module(function (Tone) {
+	    /**
+		 *  @class Wrapper around the OfflineAudioContext
+		 *  @extends {Tone.Context}
+		 *  @param  {Number}  channels  The number of channels to render
+		 *  @param  {Number}  duration  The duration to render in samples
+		 *  @param {Number} sampleRate the sample rate to render at
+		 */
+	    Tone.OfflineContext = function (channels, duration, sampleRate) {
+	        /**
+			 *  The offline context
+			 *  @private
+			 *  @type  {OfflineAudioContext}
+			 */
+	        var offlineContext = new OfflineAudioContext(channels, duration * sampleRate, sampleRate);
+	        //wrap the methods/members
+	        Tone.Context.call(this, {
+	            'context': offlineContext,
+	            'clockSource': 'offline',
+	            'lookAhead': 0,
+	            'updateInterval': 128 / sampleRate
+	        });
+	        /**
+			 *  A private reference to the duration
+			 *  @private
+			 *  @type  {Number}
+			 */
+	        this._duration = duration;
+	        /**
+			 *  An artificial clock source
+			 *  @type  {Number}
+			 *  @private
+			 */
+	        this._currentTime = 0;
+	    };
+	    Tone.extend(Tone.OfflineContext, Tone.Context);
+	    /**
+		 *  Override the now method to point to the internal clock time
+		 *  @return  {Number}
+		 */
+	    Tone.OfflineContext.prototype.now = function () {
+	        return this._currentTime;
+	    };
+	    /**
+		 *  Render the output of the OfflineContext
+		 *  @return  {Promise}
+		 */
+	    Tone.OfflineContext.prototype.render = function () {
+	        while (this._duration - this._currentTime >= 0) {
+	            //invoke all the callbacks on that time
+	            this.emit('tick');
+	            //increment the clock
+	            this._currentTime += this.blockTime;
+	        }
+	        return this._context.startRendering();
+	    };
+	    /**
+		 *  Close the context
+		 *  @return  {Promise}
+		 */
+	    Tone.OfflineContext.prototype.close = function () {
+	        this._context = null;
+	        return Promise.resolve();
+	    };
+	    return Tone.OfflineContext;
+	});
+	Module(function (Tone) {
+	    if (Tone.supported) {
+	        var ua = navigator.userAgent.toLowerCase();
+	        var isMobileSafari = ua.includes('safari') && !ua.includes('chrome') && ua.includes('mobile');
+	        if (isMobileSafari) {
+	            //mobile safari has a bizarre bug with the offline context
+	            //when a BufferSourceNode is started, it starts the offline context
+	            //
+	            //deferring all BufferSource starts till the last possible moment
+	            //reduces the likelihood of this happening
+	            Tone.OfflineContext.prototype.createBufferSource = function () {
+	                var bufferSource = this._context.createBufferSource();
+	                var _native_start = bufferSource.start;
+	                bufferSource.start = function (time) {
+	                    this.setTimeout(function () {
+	                        _native_start.call(bufferSource, time);
+	                    }.bind(this), 0);
+	                }.bind(this);
+	                return bufferSource;
+	            };
+	        }
+	    }
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class A thin wrapper around the Native Web Audio GainNode.
+		 *         The GainNode is a basic building block of the Web Audio
+		 *         API and is useful for routing audio and adjusting gains.
+		 *  @extends {Tone}
+		 *  @param  {Number=}  gain  The initial gain of the GainNode
+		 *  @param {Tone.Type=} units The units of the gain parameter.
+		 */
+	    Tone.Gain = function () {
+	        var options = Tone.defaults(arguments, [
+	            'gain',
+	            'units'
+	        ], Tone.Gain);
+	        Tone.AudioNode.call(this);
+	        /**
+			 *  The GainNode
+			 *  @type  {GainNode}
+			 *  @private
+			 */
+	        this.input = this.output = this._gainNode = this.context.createGain();
+	        /**
+			 *  The gain parameter of the gain node.
+			 *  @type {Gain}
+			 *  @signal
+			 */
+	        this.gain = new Tone.Param({
+	            'param': this._gainNode.gain,
+	            'units': options.units,
+	            'value': options.gain,
+	            'convert': options.convert
+	        });
+	        this._readOnly('gain');
+	    };
+	    Tone.extend(Tone.Gain, Tone.AudioNode);
+	    /**
+		 *  The defaults
+		 *  @const
+		 *  @type  {Object}
+		 */
+	    Tone.Gain.defaults = {
+	        'gain': 1,
+	        'convert': true
+	    };
+	    /**
+		 *  Clean up.
+		 *  @return  {Tone.Gain}  this
+		 */
+	    Tone.Gain.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._gainNode.disconnect();
+	        this._gainNode = null;
+	        this._writable('gain');
+	        this.gain.dispose();
+	        this.gain = null;
+	    };
+	    return Tone.Gain;
+	});
+	Module(function (Tone) {
+	    if (Tone.supported && !AudioContext.prototype.createConstantSource) {
+	        var ConstantSourceNode = function (context) {
+	            this.context = context;
+	            var buffer = context.createBuffer(1, 128, context.sampleRate);
+	            var arr = buffer.getChannelData(0);
+	            for (var i = 0; i < arr.length; i++) {
+	                arr[i] = 1;
+	            }
+	            this._bufferSource = context.createBufferSource();
+	            this._bufferSource.channelCount = 1;
+	            this._bufferSource.channelCountMode = 'explicit';
+	            this._bufferSource.buffer = buffer;
+	            this._bufferSource.loop = true;
+	            var gainNode = this._output = context.createGain();
+	            this.offset = gainNode.gain;
+	            this._bufferSource.connect(gainNode);
+	        };
+	        ConstantSourceNode.prototype.start = function (time) {
+	            this._bufferSource.start(time);
+	            return this;
+	        };
+	        ConstantSourceNode.prototype.stop = function (time) {
+	            this._bufferSource.stop(time);
+	            return this;
+	        };
+	        ConstantSourceNode.prototype.connect = function () {
+	            this._output.connect.apply(this._output, arguments);
+	            return this;
+	        };
+	        ConstantSourceNode.prototype.disconnect = function () {
+	            this._output.disconnect.apply(this._output, arguments);
+	            return this;
+	        };
+	        AudioContext.prototype.createConstantSource = function () {
+	            return new ConstantSourceNode(this);
+	        };
+	        Tone.Context.prototype.createConstantSource = function () {
+	            return new ConstantSourceNode(this);
+	        };
+	    }
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  A signal is an audio-rate value. Tone.Signal is a core component of the library.
+		 *          Unlike a number, Signals can be scheduled with sample-level accuracy. Tone.Signal
+		 *          has all of the methods available to native Web Audio
+		 *          [AudioParam](http://webaudio.github.io/web-audio-api/#the-audioparam-interface)
+		 *          as well as additional conveniences. Read more about working with signals
+		 *          [here](https://github.com/Tonejs/Tone.js/wiki/Signals).
+		 *
+		 *  @constructor
+		 *  @extends {Tone.Param}
+		 *  @param {Number|AudioParam} [value] Initial value of the signal. If an AudioParam
+		 *                                     is passed in, that parameter will be wrapped
+		 *                                     and controlled by the Signal.
+		 *  @param {string} [units=Number] unit The units the signal is in.
+		 *  @example
+		 * var signal = new Tone.Signal(10);
+		 */
+	    Tone.Signal = function () {
+	        var options = Tone.defaults(arguments, [
+	            'value',
+	            'units'
+	        ], Tone.Signal);
+	        Tone.Param.call(this, options);
+	        /**
+			* When a signal is connected to another signal or audio param,
+			* this signal becomes a proxy for it
+			* @type {Array}
+			* @private
+			*/
+	        this._proxies = [];
+	        /**
+			* Indicates if the constant source was started or not
+			* @private
+			* @type {Boolean}
+			*/
+	        this._sourceStarted = false;
+	        /**
+			 * The constant source node which generates the signal
+			 * @type {ConstantSourceNode}
+			 * @private
+			 */
+	        this._constantSource = this.context.createConstantSource();
+	        this._param = this._constantSource.offset;
+	        this.value = options.value;
+	        /**
+			 * The node where the constant signal value is scaled.
+			 * @type {GainNode}
+			 * @private
+			 */
+	        this.output = this._constantSource;
+	        /**
+			 * The node where the value is set.
+			 * @type {Tone.Param}
+			 * @private
+			 */
+	        this.input = this._param = this.output.offset;
+	    };
+	    Tone.extend(Tone.Signal, Tone.Param);
+	    /**
+		 *  The default values
+		 *  @type  {Object}
+		 *  @static
+		 *  @const
+		 */
+	    Tone.Signal.defaults = {
+	        'value': 0,
+	        'units': Tone.Type.Default,
+	        'convert': true
+	    };
+	    /**
+		 *  When signals connect to other signals or AudioParams,
+		 *  they take over the output value of that signal or AudioParam.
+		 *  For all other nodes, the behavior is the same as a default <code>connect</code>.
+		 *
+		 *  @override
+		 *  @param {AudioParam|AudioNode|Tone.Signal|Tone} node
+		 *  @param {number} [outputNumber=0] The output number to connect from.
+		 *  @param {number} [inputNumber=0] The input number to connect to.
+		 *  @returns {Tone.Signal} this
+		 *  @method
+		 */
+	    Tone.Signal.prototype.connect = function (node) {
+	        //this is an optimization where this node will forward automations
+	        //to connected nodes without any signal if possible.
+	        if (this._isParam(node) && !this._sourceStarted) {
+	            this._proxies.push(node);
+	            node.overridden = true;
+	            this._applyAutomations(node);
+	        } else {
+	            Tone.SignalBase.prototype.connect.apply(this, arguments);
+	            if (!this._sourceStarted) {
+	                this._sourceStarted = true;
+	                this._constantSource.start(0);
+	            }
+	        }
+	        return this;
+	    };
+	    /**
+		 * Takes a node as an argument and returns if it is a Param or AudioParam
+		 * @param  {*} node The node to test
+		 * @return {Boolean}
+		 * @private
+		 */
+	    Tone.Signal.prototype._isParam = function (node) {
+	        return Tone.Param && Tone.Param === node.constructor || node instanceof AudioParam;
+	    };
+	    /**
+		 * Discard the optimization and connect all of the proxies
+		 * @private
+		 */
+	    Tone.Signal.prototype._connectProxies = function () {
+	        if (!this._sourceStarted) {
+	            this._sourceStarted = true;
+	            this._constantSource.start(0);
+	        }
+	        this._proxies.forEach(function (proxy) {
+	            Tone.SignalBase.prototype.connect.call(this, proxy);
+	            if (proxy._proxies) {
+	                proxy._connectProxies();
+	            }
+	        }.bind(this));
+	    };
+	    /**
+		 * Invoked when a node is connected to this
+		 * @param  {AudioNode} from
+		 * @private
+		 */
+	    Tone.Signal.prototype._onConnect = function (from) {
+	        if (!this._isParam(from)) {
+	            //connect all the proxies
+	            this._connectProxies();
+	        }
+	    };
+	    /**
+		 * Apply all the current automations to the given parameter
+		 * @param  {AudioParam} param
+		 * @private
+		 */
+	    Tone.Signal.prototype._applyAutomations = function (param) {
+	        var now = this.context.currentTime;
+	        param.cancelScheduledValues(now);
+	        var currentVal = this.getValueAtTime(now);
+	        param.setValueAtTime(currentVal, now);
+	        this._events.forEachFrom(now, function (event) {
+	            param[event.type](event.value, event.time, event.constant);
+	        });
+	    };
+	    /**
+		 * Disconnect from the given node or all nodes if no param is given.
+		 * @param  {AudioNode|AudioParam} node
+		 * @return {Tone.Signal}      this
+		 */
+	    Tone.Signal.prototype.disconnect = function (node) {
+	        if (this._proxies.includes(node)) {
+	            var index = this._proxies.indexOf(node);
+	            this._proxies.splice(index, 1);
+	        } else if (!node) {
+	            //no argument, disconnect everything
+	            this._proxies = [];
+	        }
+	        return Tone.SignalBase.prototype.disconnect.apply(this, arguments);
+	    };
+	    /**
+		 * Return the current signal value at the given time.
+		 * @param  {Time} time When to get the signal value
+		 * @return {Number}
+		 */
+	    Tone.Signal.prototype.getValueAtTime = function (time) {
+	        if (this._param.getValueAtTime) {
+	            return this._param.getValueAtTime(time);
+	        } else {
+	            return Tone.Param.prototype.getValueAtTime.call(this, time);
+	        }
+	    };
+	    //wrap all of the automation methods
+	    [
+	        'setValueAtTime',
+	        'linearRampToValueAtTime',
+	        'exponentialRampToValueAtTime',
+	        'setTargetAtTime'
+	    ].forEach(function (method) {
+	        var previousMethod = Tone.Signal.prototype[method];
+	        Tone.Signal.prototype[method] = function () {
+	            var args = arguments;
+	            previousMethod.apply(this, arguments);
+	            args[0] = this._fromUnits(args[0]);
+	            args[1] = this.toSeconds(args[1]);
+	            //apply it to the proxies
+	            this._proxies.forEach(function (signal) {
+	                signal[method].apply(signal, args);
+	            });
+	        };
+	    });
+	    [
+	        'cancelScheduledValues',
+	        'cancelAndHoldAtTime'
+	    ].forEach(function (method) {
+	        var previousMethod = Tone.Signal.prototype[method];
+	        Tone.Signal.prototype[method] = function () {
+	            var args = arguments;
+	            previousMethod.apply(this, arguments);
+	            args[0] = this.toSeconds(args[0]);
+	            //apply it to the proxies
+	            this._proxies.forEach(function (signal) {
+	                signal[method].apply(signal, args);
+	            });
+	        };
+	    });
+	    /**
+		 *  dispose and disconnect
+		 *  @returns {Tone.Signal} this
+		 */
+	    Tone.Signal.prototype.dispose = function () {
+	        Tone.Param.prototype.dispose.call(this);
+	        this._constantSource.disconnect();
+	        this._constantSource = null;
+	        this._proxies = null;
+	        return this;
+	    };
+	    return Tone.Signal;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Pow applies an exponent to the incoming signal. The incoming signal
+		 *         must be AudioRange.
+		 *
+		 *  @extends {Tone.SignalBase}
+		 *  @constructor
+		 *  @param {Positive} exp The exponent to apply to the incoming signal, must be at least 2. 
+		 *  @example
+		 * var pow = new Tone.Pow(2);
+		 * var sig = new Tone.Signal(0.5).connect(pow);
+		 * //output of pow is 0.25. 
+		 */
+	    Tone.Pow = function (exp) {
+	        Tone.SignalBase.call(this);
+	        /**
+			 * the exponent
+			 * @private
+			 * @type {number}
+			 */
+	        this._exp = Tone.defaultArg(exp, 1);
+	        /**
+			 *  @type {WaveShaperNode}
+			 *  @private
+			 */
+	        this._expScaler = this.input = this.output = new Tone.WaveShaper(this._expFunc(this._exp), 8192);
+	    };
+	    Tone.extend(Tone.Pow, Tone.SignalBase);
+	    /**
+		 * The value of the exponent.
+		 * @memberOf Tone.Pow#
+		 * @type {number}
+		 * @name value
+		 */
+	    Object.defineProperty(Tone.Pow.prototype, 'value', {
+	        get: function () {
+	            return this._exp;
+	        },
+	        set: function (exp) {
+	            this._exp = exp;
+	            this._expScaler.setMap(this._expFunc(this._exp));
+	        }
+	    });
+	    /**
+		 *  the function which maps the waveshaper
+		 *  @param   {number} exp
+		 *  @return {function}
+		 *  @private
+		 */
+	    Tone.Pow.prototype._expFunc = function (exp) {
+	        return function (val) {
+	            return Math.pow(Math.abs(val), exp);
+	        };
+	    };
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.Pow} this
+		 */
+	    Tone.Pow.prototype.dispose = function () {
+	        Tone.SignalBase.prototype.dispose.call(this);
+	        this._expScaler.dispose();
+	        this._expScaler = null;
+	        return this;
+	    };
+	    return Tone.Pow;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Tone.Envelope is an [ADSR](https://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope)
+		 *          envelope generator. Tone.Envelope outputs a signal which
+		 *          can be connected to an AudioParam or Tone.Signal.
+		 *          <img src="https://upload.wikimedia.org/wikipedia/commons/e/ea/ADSR_parameter.svg">
+		 *
+		 *  @constructor
+		 *  @extends {Tone.AudioNode}
+		 *  @param {Time} [attack] The amount of time it takes for the envelope to go from
+		 *                         0 to it's maximum value.
+		 *  @param {Time} [decay]	The period of time after the attack that it takes for the envelope
+		 *                       	to fall to the sustain value.
+		 *  @param {NormalRange} [sustain]	The percent of the maximum value that the envelope rests at until
+		 *                                	the release is triggered.
+		 *  @param {Time} [release]	The amount of time after the release is triggered it takes to reach 0.
+		 *  @example
+		 * //an amplitude envelope
+		 * var gainNode = Tone.context.createGain();
+		 * var env = new Tone.Envelope({
+		 * 	"attack" : 0.1,
+		 * 	"decay" : 0.2,
+		 * 	"sustain" : 1,
+		 * 	"release" : 0.8,
+		 * });
+		 * env.connect(gainNode.gain);
+		 */
+	    Tone.Envelope = function () {
+	        //get all of the defaults
+	        var options = Tone.defaults(arguments, [
+	            'attack',
+	            'decay',
+	            'sustain',
+	            'release'
+	        ], Tone.Envelope);
+	        Tone.AudioNode.call(this);
+	        /**
+			 *  When triggerAttack is called, the attack time is the amount of
+			 *  time it takes for the envelope to reach it's maximum value.
+			 *  @type {Time}
+			 */
+	        this.attack = options.attack;
+	        /**
+			 *  After the attack portion of the envelope, the value will fall
+			 *  over the duration of the decay time to it's sustain value.
+			 *  @type {Time}
+			 */
+	        this.decay = options.decay;
+	        /**
+			 * 	The sustain value is the value
+			 * 	which the envelope rests at after triggerAttack is
+			 * 	called, but before triggerRelease is invoked.
+			 *  @type {NormalRange}
+			 */
+	        this.sustain = options.sustain;
+	        /**
+			 *  After triggerRelease is called, the envelope's
+			 *  value will fall to it's miminum value over the
+			 *  duration of the release time.
+			 *  @type {Time}
+			 */
+	        this.release = options.release;
+	        /**
+			 *  the next time the envelope is at standby
+			 *  @type {number}
+			 *  @private
+			 */
+	        this._attackCurve = 'linear';
+	        /**
+			 *  the next time the envelope is at standby
+			 *  @type {number}
+			 *  @private
+			 */
+	        this._releaseCurve = 'exponential';
+	        /**
+			 *  the signal
+			 *  @type {Tone.Signal}
+			 *  @private
+			 */
+	        this._sig = this.output = new Tone.Signal(0);
+	        //set the attackCurve initially
+	        this.attackCurve = options.attackCurve;
+	        this.releaseCurve = options.releaseCurve;
+	    };
+	    Tone.extend(Tone.Envelope, Tone.AudioNode);
+	    /**
+		 *  the default parameters
+		 *  @static
+		 *  @const
+		 */
+	    Tone.Envelope.defaults = {
+	        'attack': 0.01,
+	        'decay': 0.1,
+	        'sustain': 0.5,
+	        'release': 1,
+	        'attackCurve': 'linear',
+	        'releaseCurve': 'exponential'
+	    };
+	    /**
+		 * Read the current value of the envelope. Useful for
+		 * syncronizing visual output to the envelope.
+		 * @memberOf Tone.Envelope#
+		 * @type {Number}
+		 * @name value
+		 * @readOnly
+		 */
+	    Object.defineProperty(Tone.Envelope.prototype, 'value', {
+	        get: function () {
+	            return this.getValueAtTime(this.now());
+	        }
+	    });
+	    /**
+		 * The shape of the attack.
+		 * Can be any of these strings:
+		 * <ul>
+		 *   <li>linear</li>
+		 *   <li>exponential</li>
+		 *   <li>sine</li>
+		 *   <li>cosine</li>
+		 *   <li>bounce</li>
+		 *   <li>ripple</li>
+		 *   <li>step</li>
+		 * </ul>
+		 * Can also be an array which describes the curve. Values
+		 * in the array are evenly subdivided and linearly
+		 * interpolated over the duration of the attack.
+		 * @memberOf Tone.Envelope#
+		 * @type {String|Array}
+		 * @name attackCurve
+		 * @example
+		 * env.attackCurve = "linear";
+		 * @example
+		 * //can also be an array
+		 * env.attackCurve = [0, 0.2, 0.3, 0.4, 1]
+		 */
+	    Object.defineProperty(Tone.Envelope.prototype, 'attackCurve', {
+	        get: function () {
+	            if (Tone.isString(this._attackCurve)) {
+	                return this._attackCurve;
+	            } else if (Tone.isArray(this._attackCurve)) {
+	                //look up the name in the curves array
+	                for (var type in Tone.Envelope.Type) {
+	                    if (Tone.Envelope.Type[type].In === this._attackCurve) {
+	                        return type;
+	                    }
+	                }
+	                //otherwise just return the array
+	                return this._attackCurve;
+	            }
+	        },
+	        set: function (curve) {
+	            //check if it's a valid type
+	            if (Tone.Envelope.Type.hasOwnProperty(curve)) {
+	                var curveDef = Tone.Envelope.Type[curve];
+	                if (Tone.isObject(curveDef)) {
+	                    this._attackCurve = curveDef.In;
+	                } else {
+	                    this._attackCurve = curveDef;
+	                }
+	            } else if (Tone.isArray(curve)) {
+	                this._attackCurve = curve;
+	            } else {
+	                throw new Error('Tone.Envelope: invalid curve: ' + curve);
+	            }
+	        }
+	    });
+	    /**
+		 * The shape of the release. See the attack curve types.
+		 * @memberOf Tone.Envelope#
+		 * @type {String|Array}
+		 * @name releaseCurve
+		 * @example
+		 * env.releaseCurve = "linear";
+		 */
+	    Object.defineProperty(Tone.Envelope.prototype, 'releaseCurve', {
+	        get: function () {
+	            if (Tone.isString(this._releaseCurve)) {
+	                return this._releaseCurve;
+	            } else if (Tone.isArray(this._releaseCurve)) {
+	                //look up the name in the curves array
+	                for (var type in Tone.Envelope.Type) {
+	                    if (Tone.Envelope.Type[type].Out === this._releaseCurve) {
+	                        return type;
+	                    }
+	                }
+	                //otherwise just return the array
+	                return this._releaseCurve;
+	            }
+	        },
+	        set: function (curve) {
+	            //check if it's a valid type
+	            if (Tone.Envelope.Type.hasOwnProperty(curve)) {
+	                var curveDef = Tone.Envelope.Type[curve];
+	                if (Tone.isObject(curveDef)) {
+	                    this._releaseCurve = curveDef.Out;
+	                } else {
+	                    this._releaseCurve = curveDef;
+	                }
+	            } else if (Tone.isArray(curve)) {
+	                this._releaseCurve = curve;
+	            } else {
+	                throw new Error('Tone.Envelope: invalid curve: ' + curve);
+	            }
+	        }
+	    });
+	    /**
+		 *  Trigger the attack/decay portion of the ADSR envelope.
+		 *  @param  {Time} [time=now] When the attack should start.
+		 *  @param {NormalRange} [velocity=1] The velocity of the envelope scales the vales.
+		 *                               number between 0-1
+		 *  @returns {Tone.Envelope} this
+		 *  @example
+		 *  //trigger the attack 0.5 seconds from now with a velocity of 0.2
+		 *  env.triggerAttack("+0.5", 0.2);
+		 */
+	    Tone.Envelope.prototype.triggerAttack = function (time, velocity) {
+	        time = this.toSeconds(time);
+	        var originalAttack = this.toSeconds(this.attack);
+	        var attack = originalAttack;
+	        var decay = this.toSeconds(this.decay);
+	        velocity = Tone.defaultArg(velocity, 1);
+	        //check if it's not a complete attack
+	        var currentValue = this.getValueAtTime(time);
+	        if (currentValue > 0) {
+	            //subtract the current value from the attack time
+	            var attackRate = 1 / attack;
+	            var remainingDistance = 1 - currentValue;
+	            //the attack is now the remaining time
+	            attack = remainingDistance / attackRate;
+	        }
+	        //attack
+	        if (this._attackCurve === 'linear') {
+	            this._sig.linearRampTo(velocity, attack, time);
+	        } else if (this._attackCurve === 'exponential') {
+	            this._sig.targetRampTo(velocity, attack, time);
+	        } else if (attack > 0) {
+	            this._sig.cancelAndHoldAtTime(time);
+	            var curve = this._attackCurve;
+	            //take only a portion of the curve
+	            if (attack < originalAttack) {
+	                var percentComplete = 1 - attack / originalAttack;
+	                var sliceIndex = Math.floor(percentComplete * this._attackCurve.length);
+	                curve = this._attackCurve.slice(sliceIndex);
+	                //the first index is the current value
+	                curve[0] = currentValue;
+	            }
+	            this._sig.setValueCurveAtTime(curve, time, attack, velocity);
+	        }
+	        //decay
+	        if (decay) {
+	            this._sig.targetRampTo(velocity * this.sustain, decay, attack + time);
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Triggers the release of the envelope.
+		 *  @param  {Time} [time=now] When the release portion of the envelope should start.
+		 *  @returns {Tone.Envelope} this
+		 *  @example
+		 *  //trigger release immediately
+		 *  env.triggerRelease();
+		 */
+	    Tone.Envelope.prototype.triggerRelease = function (time) {
+	        time = this.toSeconds(time);
+	        var currentValue = this.getValueAtTime(time);
+	        if (currentValue > 0) {
+	            var release = this.toSeconds(this.release);
+	            if (this._releaseCurve === 'linear') {
+	                this._sig.linearRampTo(0, release, time);
+	            } else if (this._releaseCurve === 'exponential') {
+	                this._sig.targetRampTo(0, release, time);
+	            } else {
+	                var curve = this._releaseCurve;
+	                if (Tone.isArray(curve)) {
+	                    this._sig.cancelAndHoldAtTime(time);
+	                    this._sig.setValueCurveAtTime(curve, time, release, currentValue);
+	                }
+	            }
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Get the scheduled value at the given time. This will
+		 *  return the unconverted (raw) value.
+		 *  @param  {Number}  time  The time in seconds.
+		 *  @return  {Number}  The scheduled value at the given time.
+		 */
+	    Tone.Envelope.prototype.getValueAtTime = function (time) {
+	        return this._sig.getValueAtTime(time);
+	    };
+	    /**
+		 *  triggerAttackRelease is shorthand for triggerAttack, then waiting
+		 *  some duration, then triggerRelease.
+		 *  @param {Time} duration The duration of the sustain.
+		 *  @param {Time} [time=now] When the attack should be triggered.
+		 *  @param {number} [velocity=1] The velocity of the envelope.
+		 *  @returns {Tone.Envelope} this
+		 *  @example
+		 * //trigger the attack and then the release after 0.6 seconds.
+		 * env.triggerAttackRelease(0.6);
+		 */
+	    Tone.Envelope.prototype.triggerAttackRelease = function (duration, time, velocity) {
+	        time = this.toSeconds(time);
+	        this.triggerAttack(time, velocity);
+	        this.triggerRelease(time + this.toSeconds(duration));
+	        return this;
+	    };
+	    /**
+		 *  Cancels all scheduled envelope changes after the given time.
+		 *  @param  {Time} after
+		 *  @returns {Tone.Envelope} this
+		 */
+	    Tone.Envelope.prototype.cancel = function (after) {
+	        this._sig.cancelScheduledValues(after);
+	        return this;
+	    };
+	    /**
+		 *  Borrows the connect method from Tone.Signal.
+		 *  @function
+		 *  @private
+		 */
+	    Tone.Envelope.prototype.connect = Tone.SignalBase.prototype.connect;
+	    /**
+	 	 *  Generate some complex envelope curves.
+	 	 */
+	    (function _createCurves() {
+	        var curveLen = 128;
+	        var i, k;
+	        //cosine curve
+	        var cosineCurve = [];
+	        for (i = 0; i < curveLen; i++) {
+	            cosineCurve[i] = Math.sin(i / (curveLen - 1) * (Math.PI / 2));
+	        }
+	        //ripple curve
+	        var rippleCurve = [];
+	        var rippleCurveFreq = 6.4;
+	        for (i = 0; i < curveLen - 1; i++) {
+	            k = i / (curveLen - 1);
+	            var sineWave = Math.sin(k * (Math.PI * 2) * rippleCurveFreq - Math.PI / 2) + 1;
+	            rippleCurve[i] = sineWave / 10 + k * 0.83;
+	        }
+	        rippleCurve[curveLen - 1] = 1;
+	        //stairs curve
+	        var stairsCurve = [];
+	        var steps = 5;
+	        for (i = 0; i < curveLen; i++) {
+	            stairsCurve[i] = Math.ceil(i / (curveLen - 1) * steps) / steps;
+	        }
+	        //in-out easing curve
+	        var sineCurve = [];
+	        for (i = 0; i < curveLen; i++) {
+	            k = i / (curveLen - 1);
+	            sineCurve[i] = 0.5 * (1 - Math.cos(Math.PI * k));
+	        }
+	        //a bounce curve
+	        var bounceCurve = [];
+	        for (i = 0; i < curveLen; i++) {
+	            k = i / (curveLen - 1);
+	            var freq = Math.pow(k, 3) * 4 + 0.2;
+	            var val = Math.cos(freq * Math.PI * 2 * k);
+	            bounceCurve[i] = Math.abs(val * (1 - k));
+	        }
+	        /**
+			 *  Invert a value curve to make it work for the release
+			 *  @private
+			 */
+	        function invertCurve(curve) {
+	            var out = new Array(curve.length);
+	            for (var j = 0; j < curve.length; j++) {
+	                out[j] = 1 - curve[j];
+	            }
+	            return out;
+	        }
+	        /**
+			 *  reverse the curve
+			 *  @private
+			 */
+	        function reverseCurve(curve) {
+	            return curve.slice(0).reverse();
+	        }
+	        /**
+			 *  attack and release curve arrays
+			 *  @type  {Object}
+			 *  @private
+			 */
+	        Tone.Envelope.Type = {
+	            'linear': 'linear',
+	            'exponential': 'exponential',
+	            'bounce': {
+	                In: invertCurve(bounceCurve),
+	                Out: bounceCurve
+	            },
+	            'cosine': {
+	                In: cosineCurve,
+	                Out: reverseCurve(cosineCurve)
+	            },
+	            'step': {
+	                In: stairsCurve,
+	                Out: invertCurve(stairsCurve)
+	            },
+	            'ripple': {
+	                In: rippleCurve,
+	                Out: invertCurve(rippleCurve)
+	            },
+	            'sine': {
+	                In: sineCurve,
+	                Out: invertCurve(sineCurve)
+	            }
+	        };
+	    }());
+	    /**
+		 *  Disconnect and dispose.
+		 *  @returns {Tone.Envelope} this
+		 */
+	    Tone.Envelope.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._sig.dispose();
+	        this._sig = null;
+	        this._attackCurve = null;
+	        this._releaseCurve = null;
+	        return this;
+	    };
+	    return Tone.Envelope;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Tone.AmplitudeEnvelope is a Tone.Envelope connected to a gain node.
+		 *          Unlike Tone.Envelope, which outputs the envelope's value, Tone.AmplitudeEnvelope accepts
+		 *          an audio signal as the input and will apply the envelope to the amplitude
+		 *          of the signal. Read more about ADSR Envelopes on [Wikipedia](https://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope).
+		 *
+		 *  @constructor
+		 *  @extends {Tone.Envelope}
+		 *  @param {Time|Object} [attack] The amount of time it takes for the envelope to go from
+		 *                               0 to it's maximum value.
+		 *  @param {Time} [decay]	The period of time after the attack that it takes for the envelope
+		 *                       	to fall to the sustain value.
+		 *  @param {NormalRange} [sustain]	The percent of the maximum value that the envelope rests at until
+		 *                                	the release is triggered.
+		 *  @param {Time} [release]	The amount of time after the release is triggered it takes to reach 0.
+		 *  @example
+		 * var ampEnv = new Tone.AmplitudeEnvelope({
+		 * 	"attack": 0.1,
+		 * 	"decay": 0.2,
+		 * 	"sustain": 1.0,
+		 * 	"release": 0.8
+		 * }).toMaster();
+		 * //create an oscillator and connect it
+		 * var osc = new Tone.Oscillator().connect(ampEnv).start();
+		 * //trigger the envelopes attack and release "8t" apart
+		 * ampEnv.triggerAttackRelease("8t");
+		 */
+	    Tone.AmplitudeEnvelope = function () {
+	        Tone.Envelope.apply(this, arguments);
+	        /**
+			 *  the input node
+			 *  @type {GainNode}
+			 *  @private
+			 */
+	        this.input = this.output = new Tone.Gain();
+	        this._sig.connect(this.output.gain);
+	    };
+	    Tone.extend(Tone.AmplitudeEnvelope, Tone.Envelope);
+	    /**
+		 *  Clean up
+		 *  @return  {Tone.AmplitudeEnvelope}  this
+		 */
+	    Tone.AmplitudeEnvelope.prototype.dispose = function () {
+	        Tone.Envelope.prototype.dispose.call(this);
+	        return this;
+	    };
+	    return Tone.AmplitudeEnvelope;
+	});
+	Module(function (Tone) {
+	    /**
+		 *  AnalyserNode.getFloatTimeDomainData polyfill
+		 *  @private
+		 */
+	    if (Tone.supported) {
+	        if (!AnalyserNode.prototype.getFloatTimeDomainData) {
+	            //referenced https://github.com/mohayonao/get-float-time-domain-data
+	            AnalyserNode.prototype.getFloatTimeDomainData = function (array) {
+	                var uint8 = new Uint8Array(array.length);
+	                this.getByteTimeDomainData(uint8);
+	                for (var i = 0; i < uint8.length; i++) {
+	                    array[i] = (uint8[i] - 128) / 128;
+	                }
+	            };
+	        }
+	    }
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Wrapper around the native Web Audio's
+		 *          [AnalyserNode](http://webaudio.github.io/web-audio-api/#idl-def-AnalyserNode).
+		 *          Extracts FFT or Waveform data from the incoming signal.
+		 *  @extends {Tone.AudioNode}
+		 *  @param {String=} type The return type of the analysis, either "fft", or "waveform".
+		 *  @param {Number=} size The size of the FFT. Value must be a power of
+		 *                       two in the range 32 to 32768.
+		 */
+	    Tone.Analyser = function () {
+	        var options = Tone.defaults(arguments, [
+	            'type',
+	            'size'
+	        ], Tone.Analyser);
+	        Tone.AudioNode.call(this);
+	        /**
+			 *  The analyser node.
+			 *  @private
+			 *  @type {AnalyserNode}
+			 */
+	        this._analyser = this.input = this.output = this.context.createAnalyser();
+	        /**
+			 *  The analysis type
+			 *  @type {String}
+			 *  @private
+			 */
+	        this._type = options.type;
+	        /**
+			 *  The buffer that the FFT data is written to
+			 *  @type {TypedArray}
+			 *  @private
+			 */
+	        this._buffer = null;
+	        //set the values initially
+	        this.size = options.size;
+	        this.type = options.type;
+	    };
+	    Tone.extend(Tone.Analyser, Tone.AudioNode);
+	    /**
+		 *  The default values.
+		 *  @type {Object}
+		 *  @const
+		 */
+	    Tone.Analyser.defaults = {
+	        'size': 1024,
+	        'type': 'fft',
+	        'smoothing': 0.8
+	    };
+	    /**
+		 *  Possible return types of analyser.getValue()
+		 *  @enum {String}
+		 */
+	    Tone.Analyser.Type = {
+	        Waveform: 'waveform',
+	        FFT: 'fft'
+	    };
+	    /**
+		 *  Run the analysis given the current settings and return the
+		 *  result as a TypedArray.
+		 *  @returns {TypedArray}
+		 */
+	    Tone.Analyser.prototype.getValue = function () {
+	        if (this._type === Tone.Analyser.Type.FFT) {
+	            this._analyser.getFloatFrequencyData(this._buffer);
+	        } else if (this._type === Tone.Analyser.Type.Waveform) {
+	            this._analyser.getFloatTimeDomainData(this._buffer);
+	        }
+	        return this._buffer;
+	    };
+	    /**
+		 *  The size of analysis. This must be a power of two in the range 32 to 32768.
+		 *  @memberOf Tone.Analyser#
+		 *  @type {Number}
+		 *  @name size
+		 */
+	    Object.defineProperty(Tone.Analyser.prototype, 'size', {
+	        get: function () {
+	            return this._analyser.frequencyBinCount;
+	        },
+	        set: function (size) {
+	            this._analyser.fftSize = size * 2;
+	            this._buffer = new Float32Array(size);
+	        }
+	    });
+	    /**
+		 *  The analysis function returned by analyser.getValue(), either "fft" or "waveform".
+		 *  @memberOf Tone.Analyser#
+		 *  @type {String}
+		 *  @name type
+		 */
+	    Object.defineProperty(Tone.Analyser.prototype, 'type', {
+	        get: function () {
+	            return this._type;
+	        },
+	        set: function (type) {
+	            if (type !== Tone.Analyser.Type.Waveform && type !== Tone.Analyser.Type.FFT) {
+	                throw new TypeError('Tone.Analyser: invalid type: ' + type);
+	            }
+	            this._type = type;
+	        }
+	    });
+	    /**
+		 *  0 represents no time averaging with the last analysis frame.
+		 *  @memberOf Tone.Analyser#
+		 *  @type {NormalRange}
+		 *  @name smoothing
+		 */
+	    Object.defineProperty(Tone.Analyser.prototype, 'smoothing', {
+	        get: function () {
+	            return this._analyser.smoothingTimeConstant;
+	        },
+	        set: function (val) {
+	            this._analyser.smoothingTimeConstant = val;
+	        }
+	    });
+	    /**
+		 *  Clean up.
+		 *  @return  {Tone.Analyser}  this
+		 */
+	    Tone.Analyser.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._analyser.disconnect();
+	        this._analyser = null;
+	        this._buffer = null;
+	    };
+	    return Tone.Analyser;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.Compressor is a thin wrapper around the Web Audio
+		 *         [DynamicsCompressorNode](http://webaudio.github.io/web-audio-api/#the-dynamicscompressornode-interface).
+		 *         Compression reduces the volume of loud sounds or amplifies quiet sounds
+		 *         by narrowing or "compressing" an audio signal's dynamic range.
+		 *         Read more on [Wikipedia](https://en.wikipedia.org/wiki/Dynamic_range_compression).
+		 *
+		 *  @extends {Tone.AudioNode}
+		 *  @constructor
+		 *  @param {Decibels|Object} [threshold] The value above which the compression starts to be applied.
+		 *  @param {Positive} [ratio] The gain reduction ratio.
+		 *  @example
+		 * var comp = new Tone.Compressor(-30, 3);
+		 */
+	    Tone.Compressor = function () {
+	        var options = Tone.defaults(arguments, [
+	            'threshold',
+	            'ratio'
+	        ], Tone.Compressor);
+	        Tone.AudioNode.call(this);
+	        /**
+			 *  the compressor node
+			 *  @type {DynamicsCompressorNode}
+			 *  @private
+			 */
+	        this._compressor = this.input = this.output = this.context.createDynamicsCompressor();
+	        /**
+			 *  the threshold vaue
+			 *  @type {Decibels}
+			 *  @signal
+			 */
+	        this.threshold = new Tone.Param({
+	            'param': this._compressor.threshold,
+	            'units': Tone.Type.Decibels,
+	            'convert': false
+	        });
+	        /**
+			 *  The attack parameter
+			 *  @type {Time}
+			 *  @signal
+			 */
+	        this.attack = new Tone.Param(this._compressor.attack, Tone.Type.Time);
+	        /**
+			 *  The release parameter
+			 *  @type {Time}
+			 *  @signal
+			 */
+	        this.release = new Tone.Param(this._compressor.release, Tone.Type.Time);
+	        /**
+			 *  The knee parameter
+			 *  @type {Decibels}
+			 *  @signal
+			 */
+	        this.knee = new Tone.Param({
+	            'param': this._compressor.knee,
+	            'units': Tone.Type.Decibels,
+	            'convert': false
+	        });
+	        /**
+			 *  The ratio value
+			 *  @type {Number}
+			 *  @signal
+			 */
+	        this.ratio = new Tone.Param({
+	            'param': this._compressor.ratio,
+	            'convert': false
+	        });
+	        //set the defaults
+	        this._readOnly([
+	            'knee',
+	            'release',
+	            'attack',
+	            'ratio',
+	            'threshold'
+	        ]);
+	        this.set(options);
+	    };
+	    Tone.extend(Tone.Compressor, Tone.AudioNode);
+	    /**
+		 *  @static
+		 *  @const
+		 *  @type {Object}
+		 */
+	    Tone.Compressor.defaults = {
+	        'ratio': 12,
+	        'threshold': -24,
+	        'release': 0.25,
+	        'attack': 0.003,
+	        'knee': 30
+	    };
+	    /**
+		 *  clean up
+		 *  @returns {Tone.Compressor} this
+		 */
+	    Tone.Compressor.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._writable([
+	            'knee',
+	            'release',
+	            'attack',
+	            'ratio',
+	            'threshold'
+	        ]);
+	        this._compressor.disconnect();
+	        this._compressor = null;
+	        this.attack.dispose();
+	        this.attack = null;
+	        this.release.dispose();
+	        this.release = null;
+	        this.threshold.dispose();
+	        this.threshold = null;
+	        this.ratio.dispose();
+	        this.ratio = null;
+	        this.knee.dispose();
+	        this.knee = null;
+	        return this;
+	    };
+	    return Tone.Compressor;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Add a signal and a number or two signals. When no value is
+		 *         passed into the constructor, Tone.Add will sum <code>input[0]</code>
+		 *         and <code>input[1]</code>. If a value is passed into the constructor, 
+		 *         the it will be added to the input.
+		 *  
+		 *  @constructor
+		 *  @extends {Tone.Signal}
+		 *  @param {number=} value If no value is provided, Tone.Add will sum the first
+		 *                         and second inputs. 
+		 *  @example
+		 * var signal = new Tone.Signal(2);
+		 * var add = new Tone.Add(2);
+		 * signal.connect(add);
+		 * //the output of add equals 4
+		 *  @example
+		 * //if constructed with no arguments
+		 * //it will add the first and second inputs
+		 * var add = new Tone.Add();
+		 * var sig0 = new Tone.Signal(3).connect(add, 0, 0);
+		 * var sig1 = new Tone.Signal(4).connect(add, 0, 1);
+		 * //the output of add equals 7. 
+		 */
+	    Tone.Add = function (value) {
+	        Tone.Signal.call(this);
+	        this.createInsOuts(2, 0);
+	        /**
+			 *  the summing node
+			 *  @type {GainNode}
+			 *  @private
+			 */
+	        this._sum = this.input[0] = this.input[1] = this.output = new Tone.Gain();
+	        /**
+			 *  @private
+			 *  @type {Tone.Signal}
+			 */
+	        this._param = this.input[1] = new Tone.Signal(value);
+	        this._param.connect(this._sum);
+	    };
+	    Tone.extend(Tone.Add, Tone.Signal);
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.Add} this
+		 */
+	    Tone.Add.prototype.dispose = function () {
+	        Tone.Signal.prototype.dispose.call(this);
+	        this._sum.dispose();
+	        this._sum = null;
+	        return this;
+	    };
+	    return Tone.Add;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Multiply two incoming signals. Or, if a number is given in the constructor,
+		 *          multiplies the incoming signal by that value.
+		 *
+		 *  @constructor
+		 *  @extends {Tone.Signal}
+		 *  @param {number=} value Constant value to multiple. If no value is provided,
+		 *                         it will return the product of the first and second inputs
+		 *  @example
+		 * var mult = new Tone.Multiply();
+		 * var sigA = new Tone.Signal(3);
+		 * var sigB = new Tone.Signal(4);
+		 * sigA.connect(mult, 0, 0);
+		 * sigB.connect(mult, 0, 1);
+		 * //output of mult is 12.
+		 *  @example
+		 * var mult = new Tone.Multiply(10);
+		 * var sig = new Tone.Signal(2).connect(mult);
+		 * //the output of mult is 20.
+		 */
+	    Tone.Multiply = function (value) {
+	        Tone.Signal.call(this);
+	        this.createInsOuts(2, 0);
+	        /**
+			 *  the input node is the same as the output node
+			 *  it is also the GainNode which handles the scaling of incoming signal
+			 *
+			 *  @type {GainNode}
+			 *  @private
+			 */
+	        this._mult = this.input[0] = this.output = new Tone.Gain();
+	        /**
+			 *  the scaling parameter
+			 *  @type {AudioParam}
+			 *  @private
+			 */
+	        this._param = this.input[1] = this.output.gain;
+	        this.value = Tone.defaultArg(value, 0);
+	    };
+	    Tone.extend(Tone.Multiply, Tone.Signal);
+	    /**
+		 *  clean up
+		 *  @returns {Tone.Multiply} this
+		 */
+	    Tone.Multiply.prototype.dispose = function () {
+	        Tone.Signal.prototype.dispose.call(this);
+	        this._mult.dispose();
+	        this._mult = null;
+	        this._param = null;
+	        return this;
+	    };
+	    return Tone.Multiply;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Negate the incoming signal. i.e. an input signal of 10 will output -10
+		 *
+		 *  @constructor
+		 *  @extends {Tone.SignalBase}
+		 *  @example
+		 * var neg = new Tone.Negate();
+		 * var sig = new Tone.Signal(-2).connect(neg);
+		 * //output of neg is positive 2. 
+		 */
+	    Tone.Negate = function () {
+	        Tone.SignalBase.call(this);
+	        /**
+			 *  negation is done by multiplying by -1
+			 *  @type {Tone.Multiply}
+			 *  @private
+			 */
+	        this._multiply = this.input = this.output = new Tone.Multiply(-1);
+	    };
+	    Tone.extend(Tone.Negate, Tone.SignalBase);
+	    /**
+		 *  clean up
+		 *  @returns {Tone.Negate} this
+		 */
+	    Tone.Negate.prototype.dispose = function () {
+	        Tone.SignalBase.prototype.dispose.call(this);
+	        this._multiply.dispose();
+	        this._multiply = null;
+	        return this;
+	    };
+	    return Tone.Negate;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Subtract the signal connected to <code>input[1]</code> from the signal connected 
+		 *         to <code>input[0]</code>. If an argument is provided in the constructor, the 
+		 *         signals <code>.value</code> will be subtracted from the incoming signal.
+		 *
+		 *  @extends {Tone.Signal}
+		 *  @constructor
+		 *  @param {number=} value The value to subtract from the incoming signal. If the value
+		 *                         is omitted, it will subtract the second signal from the first.
+		 *  @example
+		 * var sub = new Tone.Subtract(1);
+		 * var sig = new Tone.Signal(4).connect(sub);
+		 * //the output of sub is 3. 
+		 *  @example
+		 * var sub = new Tone.Subtract();
+		 * var sigA = new Tone.Signal(10);
+		 * var sigB = new Tone.Signal(2.5);
+		 * sigA.connect(sub, 0, 0);
+		 * sigB.connect(sub, 0, 1);
+		 * //output of sub is 7.5
+		 */
+	    Tone.Subtract = function (value) {
+	        Tone.Signal.call(this);
+	        this.createInsOuts(2, 0);
+	        /**
+			 *  the summing node
+			 *  @type {GainNode}
+			 *  @private
+			 */
+	        this._sum = this.input[0] = this.output = new Tone.Gain();
+	        /**
+			 *  negate the input of the second input before connecting it
+			 *  to the summing node.
+			 *  @type {Tone.Negate}
+			 *  @private
+			 */
+	        this._neg = new Tone.Negate();
+	        /**
+			 *  the node where the value is set
+			 *  @private
+			 *  @type {Tone.Signal}
+			 */
+	        this._param = this.input[1] = new Tone.Signal(value);
+	        this._param.chain(this._neg, this._sum);
+	    };
+	    Tone.extend(Tone.Subtract, Tone.Signal);
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.SignalBase} this
+		 */
+	    Tone.Subtract.prototype.dispose = function () {
+	        Tone.Signal.prototype.dispose.call(this);
+	        this._neg.dispose();
+	        this._neg = null;
+	        this._sum.disconnect();
+	        this._sum = null;
+	        return this;
+	    };
+	    return Tone.Subtract;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Convert an incoming signal between 0, 1 to an equal power gain scale.
+		 *
+		 *  @extends {Tone.SignalBase}
+		 *  @constructor
+		 *  @example
+		 * var eqPowGain = new Tone.EqualPowerGain();
+		 */
+	    Tone.EqualPowerGain = function () {
+	        Tone.SignalBase.call(this);
+	        /**
+			 *  @type {Tone.WaveShaper}
+			 *  @private
+			 */
+	        this._eqPower = this.input = this.output = new Tone.WaveShaper(function (val) {
+	            if (Math.abs(val) < 0.001) {
+	                //should output 0 when input is 0
+	                return 0;
+	            } else {
+	                return Tone.equalPowerScale(val);
+	            }
+	        }.bind(this), 4096);
+	    };
+	    Tone.extend(Tone.EqualPowerGain, Tone.SignalBase);
+	    /**
+		 *  clean up
+		 *  @returns {Tone.EqualPowerGain} this
+		 */
+	    Tone.EqualPowerGain.prototype.dispose = function () {
+	        Tone.SignalBase.prototype.dispose.call(this);
+	        this._eqPower.dispose();
+	        this._eqPower = null;
+	        return this;
+	    };
+	    return Tone.EqualPowerGain;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 * @class  Tone.Crossfade provides equal power fading between two inputs.
+		 *         More on crossfading technique [here](https://en.wikipedia.org/wiki/Fade_(audio_engineering)#Crossfading).
+		 *
+		 * @constructor
+		 * @extends {Tone.AudioNode}
+		 * @param {NormalRange} [initialFade=0.5]
+		 * @example
+		 * var crossFade = new Tone.CrossFade(0.5);
+		 * //connect effect A to crossfade from
+		 * //effect output 0 to crossfade input 0
+		 * effectA.connect(crossFade, 0, 0);
+		 * //connect effect B to crossfade from
+		 * //effect output 0 to crossfade input 1
+		 * effectB.connect(crossFade, 0, 1);
+		 * crossFade.fade.value = 0;
+		 * // ^ only effectA is output
+		 * crossFade.fade.value = 1;
+		 * // ^ only effectB is output
+		 * crossFade.fade.value = 0.5;
+		 * // ^ the two signals are mixed equally.
+		 */
+	    Tone.CrossFade = function (initialFade) {
+	        Tone.AudioNode.call(this);
+	        this.createInsOuts(2, 1);
+	        /**
+			 *  Alias for <code>input[0]</code>.
+			 *  @type {Tone.Gain}
+			 */
+	        this.a = this.input[0] = new Tone.Gain();
+	        /**
+			 *  Alias for <code>input[1]</code>.
+			 *  @type {Tone.Gain}
+			 */
+	        this.b = this.input[1] = new Tone.Gain();
+	        /**
+			 * 	The mix between the two inputs. A fade value of 0
+			 * 	will output 100% <code>input[0]</code> and
+			 * 	a value of 1 will output 100% <code>input[1]</code>.
+			 *  @type {NormalRange}
+			 *  @signal
+			 */
+	        this.fade = new Tone.Signal(Tone.defaultArg(initialFade, 0.5), Tone.Type.NormalRange);
+	        /**
+			 *  equal power gain cross fade
+			 *  @private
+			 *  @type {Tone.EqualPowerGain}
+			 */
+	        this._equalPowerA = new Tone.EqualPowerGain();
+	        /**
+			 *  equal power gain cross fade
+			 *  @private
+			 *  @type {Tone.EqualPowerGain}
+			 */
+	        this._equalPowerB = new Tone.EqualPowerGain();
+	        /**
+			 *  invert the incoming signal
+			 *  @private
+			 *  @type {Tone}
+			 */
+	        this._one = this.context.getConstant(1);
+	        /**
+			 *  invert the incoming signal
+			 *  @private
+			 *  @type {Tone.Subtract}
+			 */
+	        this._invert = new Tone.Subtract();
+	        //connections
+	        this.a.connect(this.output);
+	        this.b.connect(this.output);
+	        this.fade.chain(this._equalPowerB, this.b.gain);
+	        this._one.connect(this._invert, 0, 0);
+	        this.fade.connect(this._invert, 0, 1);
+	        this._invert.chain(this._equalPowerA, this.a.gain);
+	        this._readOnly('fade');
+	    };
+	    Tone.extend(Tone.CrossFade, Tone.AudioNode);
+	    /**
+		 *  clean up
+		 *  @returns {Tone.CrossFade} this
+		 */
+	    Tone.CrossFade.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._writable('fade');
+	        this._equalPowerA.dispose();
+	        this._equalPowerA = null;
+	        this._equalPowerB.dispose();
+	        this._equalPowerB = null;
+	        this.fade.dispose();
+	        this.fade = null;
+	        this._invert.dispose();
+	        this._invert = null;
+	        this._one = null;
+	        this.a.dispose();
+	        this.a = null;
+	        this.b.dispose();
+	        this.b = null;
+	        return this;
+	    };
+	    return Tone.CrossFade;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Tone.Filter is a filter which allows for all of the same native methods
+		 *          as the [BiquadFilterNode](http://webaudio.github.io/web-audio-api/#the-biquadfilternode-interface).
+		 *          Tone.Filter has the added ability to set the filter rolloff at -12
+		 *          (default), -24 and -48.
+		 *
+		 *  @constructor
+		 *  @extends {Tone.AudioNode}
+		 *  @param {Frequency|Object} [frequency] The cutoff frequency of the filter.
+		 *  @param {string=} type The type of filter.
+		 *  @param {number=} rolloff The drop in decibels per octave after the cutoff frequency.
+		 *                            3 choices: -12, -24, and -48
+		 *  @example
+		 *  var filter = new Tone.Filter(200, "highpass");
+		 */
+	    Tone.Filter = function () {
+	        var options = Tone.defaults(arguments, [
+	            'frequency',
+	            'type',
+	            'rolloff'
+	        ], Tone.Filter);
+	        Tone.AudioNode.call(this);
+	        this.createInsOuts(1, 1);
+	        /**
+			 *  the filter(s)
+			 *  @type {Array}
+			 *  @private
+			 */
+	        this._filters = [];
+	        /**
+			 *  The cutoff frequency of the filter.
+			 *  @type {Frequency}
+			 *  @signal
+			 */
+	        this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);
+	        /**
+			 *  The detune parameter
+			 *  @type {Cents}
+			 *  @signal
+			 */
+	        this.detune = new Tone.Signal(0, Tone.Type.Cents);
+	        /**
+			 *  The gain of the filter, only used in certain filter types
+			 *  @type {Number}
+			 *  @signal
+			 */
+	        this.gain = new Tone.Signal({
+	            'value': options.gain,
+	            'convert': false
+	        });
+	        /**
+			 *  The Q or Quality of the filter
+			 *  @type {Positive}
+			 *  @signal
+			 */
+	        this.Q = new Tone.Signal(options.Q);
+	        /**
+			 *  the type of the filter
+			 *  @type {string}
+			 *  @private
+			 */
+	        this._type = options.type;
+	        /**
+			 *  the rolloff value of the filter
+			 *  @type {number}
+			 *  @private
+			 */
+	        this._rolloff = options.rolloff;
+	        //set the rolloff;
+	        this.rolloff = options.rolloff;
+	        this._readOnly([
+	            'detune',
+	            'frequency',
+	            'gain',
+	            'Q'
+	        ]);
+	    };
+	    Tone.extend(Tone.Filter, Tone.AudioNode);
+	    /**
+		 *  the default parameters
+		 *
+		 *  @static
+		 *  @type {Object}
+		 */
+	    Tone.Filter.defaults = {
+	        'type': 'lowpass',
+	        'frequency': 350,
+	        'rolloff': -12,
+	        'Q': 1,
+	        'gain': 0
+	    };
+	    /**
+		 * The type of the filter. Types: "lowpass", "highpass",
+		 * "bandpass", "lowshelf", "highshelf", "notch", "allpass", or "peaking".
+		 * @memberOf Tone.Filter#
+		 * @type {string}
+		 * @name type
+		 */
+	    Object.defineProperty(Tone.Filter.prototype, 'type', {
+	        get: function () {
+	            return this._type;
+	        },
+	        set: function (type) {
+	            var types = [
+	                'lowpass',
+	                'highpass',
+	                'bandpass',
+	                'lowshelf',
+	                'highshelf',
+	                'notch',
+	                'allpass',
+	                'peaking'
+	            ];
+	            if (types.indexOf(type) === -1) {
+	                throw new TypeError('Tone.Filter: invalid type ' + type);
+	            }
+	            this._type = type;
+	            for (var i = 0; i < this._filters.length; i++) {
+	                this._filters[i].type = type;
+	            }
+	        }
+	    });
+	    /**
+		 * The rolloff of the filter which is the drop in db
+		 * per octave. Implemented internally by cascading filters.
+		 * Only accepts the values -12, -24, -48 and -96.
+		 * @memberOf Tone.Filter#
+		 * @type {number}
+		 * @name rolloff
+		 */
+	    Object.defineProperty(Tone.Filter.prototype, 'rolloff', {
+	        get: function () {
+	            return this._rolloff;
+	        },
+	        set: function (rolloff) {
+	            rolloff = parseInt(rolloff, 10);
+	            var possibilities = [
+	                -12,
+	                -24,
+	                -48,
+	                -96
+	            ];
+	            var cascadingCount = possibilities.indexOf(rolloff);
+	            //check the rolloff is valid
+	            if (cascadingCount === -1) {
+	                throw new RangeError('Tone.Filter: rolloff can only be -12, -24, -48 or -96');
+	            }
+	            cascadingCount += 1;
+	            this._rolloff = rolloff;
+	            //first disconnect the filters and throw them away
+	            this.input.disconnect();
+	            for (var i = 0; i < this._filters.length; i++) {
+	                this._filters[i].disconnect();
+	                this._filters[i] = null;
+	            }
+	            this._filters = new Array(cascadingCount);
+	            for (var count = 0; count < cascadingCount; count++) {
+	                var filter = this.context.createBiquadFilter();
+	                filter.type = this._type;
+	                this.frequency.connect(filter.frequency);
+	                this.detune.connect(filter.detune);
+	                this.Q.connect(filter.Q);
+	                this.gain.connect(filter.gain);
+	                this._filters[count] = filter;
+	            }
+	            //connect them up
+	            var connectionChain = [this.input].concat(this._filters).concat([this.output]);
+	            Tone.connectSeries.apply(Tone, connectionChain);
+	        }
+	    });
+	    /**
+		 *  Clean up.
+		 *  @return {Tone.Filter} this
+		 */
+	    Tone.Filter.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        for (var i = 0; i < this._filters.length; i++) {
+	            this._filters[i].disconnect();
+	            this._filters[i] = null;
+	        }
+	        this._filters = null;
+	        this._writable([
+	            'detune',
+	            'frequency',
+	            'gain',
+	            'Q'
+	        ]);
+	        this.frequency.dispose();
+	        this.Q.dispose();
+	        this.frequency = null;
+	        this.Q = null;
+	        this.detune.dispose();
+	        this.detune = null;
+	        this.gain.dispose();
+	        this.gain = null;
+	        return this;
+	    };
+	    return Tone.Filter;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Split the incoming signal into three bands (low, mid, high)
+		 *         with two crossover frequency controls.
+		 *
+		 *  @extends {Tone.AudioNode}
+		 *  @constructor
+		 *  @param {Frequency|Object} [lowFrequency] the low/mid crossover frequency
+		 *  @param {Frequency} [highFrequency] the mid/high crossover frequency
+		 */
+	    Tone.MultibandSplit = function () {
+	        var options = Tone.defaults(arguments, [
+	            'lowFrequency',
+	            'highFrequency'
+	        ], Tone.MultibandSplit);
+	        Tone.AudioNode.call(this);
+	        /**
+			 *  the input
+			 *  @type {Tone.Gain}
+			 *  @private
+			 */
+	        this.input = new Tone.Gain();
+	        /**
+			 *  the outputs
+			 *  @type {Array}
+			 *  @private
+			 */
+	        this.output = new Array(3);
+	        /**
+			 *  The low band. Alias for <code>output[0]</code>
+			 *  @type {Tone.Filter}
+			 */
+	        this.low = this.output[0] = new Tone.Filter(0, 'lowpass');
+	        /**
+			 *  the lower filter of the mid band
+			 *  @type {Tone.Filter}
+			 *  @private
+			 */
+	        this._lowMidFilter = new Tone.Filter(0, 'highpass');
+	        /**
+			 *  The mid band output. Alias for <code>output[1]</code>
+			 *  @type {Tone.Filter}
+			 */
+	        this.mid = this.output[1] = new Tone.Filter(0, 'lowpass');
+	        /**
+			 *  The high band output. Alias for <code>output[2]</code>
+			 *  @type {Tone.Filter}
+			 */
+	        this.high = this.output[2] = new Tone.Filter(0, 'highpass');
+	        /**
+			 *  The low/mid crossover frequency.
+			 *  @type {Frequency}
+			 *  @signal
+			 */
+	        this.lowFrequency = new Tone.Signal(options.lowFrequency, Tone.Type.Frequency);
+	        /**
+			 *  The mid/high crossover frequency.
+			 *  @type {Frequency}
+			 *  @signal
+			 */
+	        this.highFrequency = new Tone.Signal(options.highFrequency, Tone.Type.Frequency);
+	        /**
+			 *  The quality of all the filters
+			 *  @type {Number}
+			 *  @signal
+			 */
+	        this.Q = new Tone.Signal(options.Q);
+	        this.input.fan(this.low, this.high);
+	        this.input.chain(this._lowMidFilter, this.mid);
+	        //the frequency control signal
+	        this.lowFrequency.connect(this.low.frequency);
+	        this.lowFrequency.connect(this._lowMidFilter.frequency);
+	        this.highFrequency.connect(this.mid.frequency);
+	        this.highFrequency.connect(this.high.frequency);
+	        //the Q value
+	        this.Q.connect(this.low.Q);
+	        this.Q.connect(this._lowMidFilter.Q);
+	        this.Q.connect(this.mid.Q);
+	        this.Q.connect(this.high.Q);
+	        this._readOnly([
+	            'high',
+	            'mid',
+	            'low',
+	            'highFrequency',
+	            'lowFrequency'
+	        ]);
+	    };
+	    Tone.extend(Tone.MultibandSplit, Tone.AudioNode);
+	    /**
+		 *  @private
+		 *  @static
+		 *  @type {Object}
+		 */
+	    Tone.MultibandSplit.defaults = {
+	        'lowFrequency': 400,
+	        'highFrequency': 2500,
+	        'Q': 1
+	    };
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.MultibandSplit} this
+		 */
+	    Tone.MultibandSplit.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._writable([
+	            'high',
+	            'mid',
+	            'low',
+	            'highFrequency',
+	            'lowFrequency'
+	        ]);
+	        this.low.dispose();
+	        this.low = null;
+	        this._lowMidFilter.dispose();
+	        this._lowMidFilter = null;
+	        this.mid.dispose();
+	        this.mid = null;
+	        this.high.dispose();
+	        this.high = null;
+	        this.lowFrequency.dispose();
+	        this.lowFrequency = null;
+	        this.highFrequency.dispose();
+	        this.highFrequency = null;
+	        this.Q.dispose();
+	        this.Q = null;
+	        return this;
+	    };
+	    return Tone.MultibandSplit;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.EQ3 is a three band EQ with control over low, mid, and high gain as
+		 *         well as the low and high crossover frequencies.
+		 *
+		 *  @constructor
+		 *  @extends {Tone.AudioNode}
+		 *
+		 *  @param {Decibels|Object} [lowLevel] The gain applied to the lows.
+		 *  @param {Decibels} [midLevel] The gain applied to the mid.
+		 *  @param {Decibels} [highLevel] The gain applied to the high.
+		 *  @example
+		 * var eq = new Tone.EQ3(-10, 3, -20);
+		 */
+	    Tone.EQ3 = function () {
+	        var options = Tone.defaults(arguments, [
+	            'low',
+	            'mid',
+	            'high'
+	        ], Tone.EQ3);
+	        Tone.AudioNode.call(this);
+	        /**
+			 *  the output node
+			 *  @type {GainNode}
+			 *  @private
+			 */
+	        this.output = new Tone.Gain();
+	        /**
+			 *  the multiband split
+			 *  @type {Tone.MultibandSplit}
+			 *  @private
+			 */
+	        this._multibandSplit = this.input = new Tone.MultibandSplit({
+	            'lowFrequency': options.lowFrequency,
+	            'highFrequency': options.highFrequency
+	        });
+	        /**
+			 *  The gain for the lower signals
+			 *  @type  {Tone.Gain}
+			 *  @private
+			 */
+	        this._lowGain = new Tone.Gain(options.low, Tone.Type.Decibels);
+	        /**
+			 *  The gain for the mid signals
+			 *  @type  {Tone.Gain}
+			 *  @private
+			 */
+	        this._midGain = new Tone.Gain(options.mid, Tone.Type.Decibels);
+	        /**
+			 * The gain in decibels of the high part
+			 * @type {Tone.Gain}
+			 * @private
+			 */
+	        this._highGain = new Tone.Gain(options.high, Tone.Type.Decibels);
+	        /**
+			 * The gain in decibels of the low part
+			 * @type {Decibels}
+			 * @signal
+			 */
+	        this.low = this._lowGain.gain;
+	        /**
+			 * The gain in decibels of the mid part
+			 * @type {Decibels}
+			 * @signal
+			 */
+	        this.mid = this._midGain.gain;
+	        /**
+			 * The gain in decibels of the high part
+			 * @type {Decibels}
+			 * @signal
+			 */
+	        this.high = this._highGain.gain;
+	        /**
+			 *  The Q value for all of the filters.
+			 *  @type {Positive}
+			 *  @signal
+			 */
+	        this.Q = this._multibandSplit.Q;
+	        /**
+			 *  The low/mid crossover frequency.
+			 *  @type {Frequency}
+			 *  @signal
+			 */
+	        this.lowFrequency = this._multibandSplit.lowFrequency;
+	        /**
+			 *  The mid/high crossover frequency.
+			 *  @type {Frequency}
+			 *  @signal
+			 */
+	        this.highFrequency = this._multibandSplit.highFrequency;
+	        //the frequency bands
+	        this._multibandSplit.low.chain(this._lowGain, this.output);
+	        this._multibandSplit.mid.chain(this._midGain, this.output);
+	        this._multibandSplit.high.chain(this._highGain, this.output);
+	        this._readOnly([
+	            'low',
+	            'mid',
+	            'high',
+	            'lowFrequency',
+	            'highFrequency'
+	        ]);
+	    };
+	    Tone.extend(Tone.EQ3, Tone.AudioNode);
+	    /**
+		 *  the default values
+		 */
+	    Tone.EQ3.defaults = {
+	        'low': 0,
+	        'mid': 0,
+	        'high': 0,
+	        'lowFrequency': 400,
+	        'highFrequency': 2500
+	    };
+	    /**
+		 *  clean up
+		 *  @returns {Tone.EQ3} this
+		 */
+	    Tone.EQ3.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._writable([
+	            'low',
+	            'mid',
+	            'high',
+	            'lowFrequency',
+	            'highFrequency'
+	        ]);
+	        this._multibandSplit.dispose();
+	        this._multibandSplit = null;
+	        this.lowFrequency = null;
+	        this.highFrequency = null;
+	        this._lowGain.dispose();
+	        this._lowGain = null;
+	        this._midGain.dispose();
+	        this._midGain = null;
+	        this._highGain.dispose();
+	        this._highGain = null;
+	        this.low = null;
+	        this.mid = null;
+	        this.high = null;
+	        this.Q = null;
+	        return this;
+	    };
+	    return Tone.EQ3;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Performs a linear scaling on an input signal.
+		 *          Scales a NormalRange input to between
+		 *          outputMin and outputMax.
+		 *
+		 *  @constructor
+		 *  @extends {Tone.SignalBase}
+		 *  @param {number} [outputMin=0] The output value when the input is 0. 
+		 *  @param {number} [outputMax=1]	The output value when the input is 1. 
+		 *  @example
+		 * var scale = new Tone.Scale(50, 100);
+		 * var signal = new Tone.Signal(0.5).connect(scale);
+		 * //the output of scale equals 75
+		 */
+	    Tone.Scale = function (outputMin, outputMax) {
+	        Tone.SignalBase.call(this);
+	        /** 
+			 *  @private
+			 *  @type {number}
+			 */
+	        this._outputMin = Tone.defaultArg(outputMin, 0);
+	        /** 
+			 *  @private
+			 *  @type {number}
+			 */
+	        this._outputMax = Tone.defaultArg(outputMax, 1);
+	        /** 
+			 *  @private
+			 *  @type {Tone.Multiply}
+			 *  @private
+			 */
+	        this._scale = this.input = new Tone.Multiply(1);
+	        /** 
+			 *  @private
+			 *  @type {Tone.Add}
+			 *  @private
+			 */
+	        this._add = this.output = new Tone.Add(0);
+	        this._scale.connect(this._add);
+	        this._setRange();
+	    };
+	    Tone.extend(Tone.Scale, Tone.SignalBase);
+	    /**
+		 * The minimum output value. This number is output when 
+		 * the value input value is 0. 
+		 * @memberOf Tone.Scale#
+		 * @type {number}
+		 * @name min
+		 */
+	    Object.defineProperty(Tone.Scale.prototype, 'min', {
+	        get: function () {
+	            return this._outputMin;
+	        },
+	        set: function (min) {
+	            this._outputMin = min;
+	            this._setRange();
+	        }
+	    });
+	    /**
+		 * The maximum output value. This number is output when 
+		 * the value input value is 1. 
+		 * @memberOf Tone.Scale#
+		 * @type {number}
+		 * @name max
+		 */
+	    Object.defineProperty(Tone.Scale.prototype, 'max', {
+	        get: function () {
+	            return this._outputMax;
+	        },
+	        set: function (max) {
+	            this._outputMax = max;
+	            this._setRange();
+	        }
+	    });
+	    /**
+		 *  set the values
+		 *  @private
+		 */
+	    Tone.Scale.prototype._setRange = function () {
+	        this._add.value = this._outputMin;
+	        this._scale.value = this._outputMax - this._outputMin;
+	    };
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.Scale} this
+		 */
+	    Tone.Scale.prototype.dispose = function () {
+	        Tone.SignalBase.prototype.dispose.call(this);
+	        this._add.dispose();
+	        this._add = null;
+	        this._scale.dispose();
+	        this._scale = null;
+	        return this;
+	    };
+	    return Tone.Scale;
+	});
+	Module(function (Tone) {
+	    /**
+		 *  @class  Performs an exponential scaling on an input signal.
+		 *          Scales a NormalRange value [0,1] exponentially
+		 *          to the output range of outputMin to outputMax.
+		 *
+		 *  @constructor
+		 *  @extends {Tone.SignalBase}
+		 *  @param {number} [outputMin=0] The output value when the input is 0.
+		 *  @param {number} [outputMax=1]	The output value when the input is 1.
+		 *  @param {number} [exponent=2] The exponent which scales the incoming signal.
+		 *  @example
+		 * var scaleExp = new Tone.ScaleExp(0, 100, 2);
+		 * var signal = new Tone.Signal(0.5).connect(scaleExp);
+		 */
+	    Tone.ScaleExp = function (outputMin, outputMax, exponent) {
+	        Tone.SignalBase.call(this);
+	        /**
+			 *  scale the input to the output range
+			 *  @type {Tone.Scale}
+			 *  @private
+			 */
+	        this._scale = this.output = new Tone.Scale(outputMin, outputMax);
+	        /**
+			 *  @private
+			 *  @type {Tone.Pow}
+			 *  @private
+			 */
+	        this._exp = this.input = new Tone.Pow(Tone.defaultArg(exponent, 2));
+	        this._exp.connect(this._scale);
+	    };
+	    Tone.extend(Tone.ScaleExp, Tone.SignalBase);
+	    /**
+		 * Instead of interpolating linearly between the <code>min</code> and
+		 * <code>max</code> values, setting the exponent will interpolate between
+		 * the two values with an exponential curve.
+		 * @memberOf Tone.ScaleExp#
+		 * @type {number}
+		 * @name exponent
+		 */
+	    Object.defineProperty(Tone.ScaleExp.prototype, 'exponent', {
+	        get: function () {
+	            return this._exp.value;
+	        },
+	        set: function (exp) {
+	            this._exp.value = exp;
+	        }
+	    });
+	    /**
+		 * The minimum output value. This number is output when
+		 * the value input value is 0.
+		 * @memberOf Tone.ScaleExp#
+		 * @type {number}
+		 * @name min
+		 */
+	    Object.defineProperty(Tone.ScaleExp.prototype, 'min', {
+	        get: function () {
+	            return this._scale.min;
+	        },
+	        set: function (min) {
+	            this._scale.min = min;
+	        }
+	    });
+	    /**
+		 * The maximum output value. This number is output when
+		 * the value input value is 1.
+		 * @memberOf Tone.ScaleExp#
+		 * @type {number}
+		 * @name max
+		 */
+	    Object.defineProperty(Tone.ScaleExp.prototype, 'max', {
+	        get: function () {
+	            return this._scale.max;
+	        },
+	        set: function (max) {
+	            this._scale.max = max;
+	        }
+	    });
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.ScaleExp} this
+		 */
+	    Tone.ScaleExp.prototype.dispose = function () {
+	        Tone.SignalBase.prototype.dispose.call(this);
+	        this._scale.dispose();
+	        this._scale = null;
+	        this._exp.dispose();
+	        this._exp = null;
+	        return this;
+	    };
+	    return Tone.ScaleExp;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Wrapper around Web Audio's native [DelayNode](http://webaudio.github.io/web-audio-api/#the-delaynode-interface).
+		 *  @extends {Tone}
+		 *  @param {Time=} delayTime The delay applied to the incoming signal.
+		 *  @param {Time=} maxDelay The maximum delay time.
+		 */
+	    Tone.Delay = function () {
+	        var options = Tone.defaults(arguments, [
+	            'delayTime',
+	            'maxDelay'
+	        ], Tone.Delay);
+	        Tone.AudioNode.call(this);
+	        /**
+			 * The maximum delay time initialized with the node
+			 * @type {Number}
+			 * @private
+			 */
+	        this._maxDelay = Math.max(this.toSeconds(options.maxDelay), this.toSeconds(options.delayTime));
+	        /**
+			 *  The native delay node
+			 *  @type {DelayNode}
+			 *  @private
+			 */
+	        this._delayNode = this.input = this.output = this.context.createDelay(this._maxDelay);
+	        /**
+			 *  The amount of time the incoming signal is
+			 *  delayed.
+			 *  @type {Time}
+			 *  @signal
+			 */
+	        this.delayTime = new Tone.Param({
+	            'param': this._delayNode.delayTime,
+	            'units': Tone.Type.Time,
+	            'value': options.delayTime
+	        });
+	        this._readOnly('delayTime');
+	    };
+	    Tone.extend(Tone.Delay, Tone.AudioNode);
+	    /**
+		 *  The defaults
+		 *  @const
+		 *  @type  {Object}
+		 */
+	    Tone.Delay.defaults = {
+	        'maxDelay': 1,
+	        'delayTime': 0
+	    };
+	    /**
+		 * The maximum delay time. This cannot be changed. The value is passed into the constructor.
+		 * @memberof Tone.Delay#
+		 * @type {Time}
+		 * @name maxDelay
+		 * @readOnly
+		 */
+	    Object.defineProperty(Tone.Delay.prototype, 'maxDelay', {
+	        get: function () {
+	            return this._maxDelay;
+	        }
+	    });
+	    /**
+		 *  Clean up.
+		 *  @return  {Tone.Delay}  this
+		 */
+	    Tone.Delay.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._delayNode.disconnect();
+	        this._delayNode = null;
+	        this._writable('delayTime');
+	        this.delayTime = null;
+	        return this;
+	    };
+	    return Tone.Delay;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Comb filters are basic building blocks for physical modeling. Read more
+		 *         about comb filters on [CCRMA's website](https://ccrma.stanford.edu/~jos/pasp/Feedback_Comb_Filters.html).
+		 *
+		 *  @extends {Tone.AudioNode}
+		 *  @constructor
+		 *  @param {Time|Object} [delayTime] The delay time of the filter.
+		 *  @param {NormalRange=} resonance The amount of feedback the filter has.
+		 */
+	    Tone.FeedbackCombFilter = function () {
+	        var options = Tone.defaults(arguments, [
+	            'delayTime',
+	            'resonance'
+	        ], Tone.FeedbackCombFilter);
+	        Tone.AudioNode.call(this);
+	        /**
+			 *  the delay node
+			 *  @type {DelayNode}
+			 *  @private
+			 */
+	        this._delay = this.input = this.output = new Tone.Delay(options.delayTime);
+	        /**
+			 *  The amount of delay of the comb filter.
+			 *  @type {Time}
+			 *  @signal
+			 */
+	        this.delayTime = this._delay.delayTime;
+	        /**
+			 *  the feedback node
+			 *  @type {GainNode}
+			 *  @private
+			 */
+	        this._feedback = new Tone.Gain(options.resonance, Tone.Type.NormalRange);
+	        /**
+			 *  The amount of feedback of the delayed signal.
+			 *  @type {NormalRange}
+			 *  @signal
+			 */
+	        this.resonance = this._feedback.gain;
+	        this._delay.chain(this._feedback, this._delay);
+	        this._readOnly([
+	            'resonance',
+	            'delayTime'
+	        ]);
+	    };
+	    Tone.extend(Tone.FeedbackCombFilter, Tone.AudioNode);
+	    /**
+		 *  the default parameters
+		 *  @static
+		 *  @const
+		 *  @type {Object}
+		 */
+	    Tone.FeedbackCombFilter.defaults = {
+	        'delayTime': 0.1,
+	        'resonance': 0.5
+	    };
+	    /**
+		 *  clean up
+		 *  @returns {Tone.FeedbackCombFilter} this
+		 */
+	    Tone.FeedbackCombFilter.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._writable([
+	            'resonance',
+	            'delayTime'
+	        ]);
+	        this._delay.dispose();
+	        this._delay = null;
+	        this.delayTime = null;
+	        this._feedback.dispose();
+	        this._feedback = null;
+	        this.resonance = null;
+	        return this;
+	    };
+	    return Tone.FeedbackCombFilter;
+	});
+	Module(function (Tone) {
+	    /**
+		 *  @class  Get the current waveform data of the connected audio source.
+		 *  @extends {Tone.AudioNode}
+		 *  @param {Number=} size The size of the FFT. Value must be a power of
+		 *                       two in the range 32 to 32768.
+		 */
+	    Tone.FFT = function () {
+	        var options = Tone.defaults(arguments, ['size'], Tone.FFT);
+	        options.type = Tone.Analyser.Type.FFT;
+	        Tone.AudioNode.call(this);
+	        /**
+			 *  The analyser node.
+			 *  @private
+			 *  @type {Tone.Analyser}
+			 */
+	        this._analyser = this.input = this.output = new Tone.Analyser(options);
+	    };
+	    Tone.extend(Tone.FFT, Tone.AudioNode);
+	    /**
+		 *  The default values.
+		 *  @type {Object}
+		 *  @const
+		 */
+	    Tone.FFT.defaults = { 'size': 1024 };
+	    /**
+		 *  Gets the waveform of the audio source. Returns the waveform data
+		 *  of length [size](#size) as a Float32Array with values between -1 and 1.
+		 *  @returns {TypedArray}
+		 */
+	    Tone.FFT.prototype.getValue = function () {
+	        return this._analyser.getValue();
+	    };
+	    /**
+		 *  The size of analysis. This must be a power of two in the range 32 to 32768.
+		 *  @memberOf Tone.FFT#
+		 *  @type {Number}
+		 *  @name size
+		 */
+	    Object.defineProperty(Tone.FFT.prototype, 'size', {
+	        get: function () {
+	            return this._analyser.size;
+	        },
+	        set: function (size) {
+	            this._analyser.size = size;
+	        }
+	    });
+	    /**
+		 *  Clean up.
+		 *  @return  {Tone.FFT}  this
+		 */
+	    Tone.FFT.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._analyser.dispose();
+	        this._analyser = null;
+	    };
+	    return Tone.FFT;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Return the absolute value of an incoming signal.
+		 *
+		 *  @constructor
+		 *  @extends {Tone.SignalBase}
+		 *  @example
+		 * var signal = new Tone.Signal(-1);
+		 * var abs = new Tone.Abs();
+		 * signal.connect(abs);
+		 * //the output of abs is 1.
+		 */
+	    Tone.Abs = function () {
+	        Tone.SignalBase.call(this);
+	        /**
+			 *  @type {Tone.LessThan}
+			 *  @private
+			 */
+	        this._abs = this.input = this.output = new Tone.WaveShaper(function (val) {
+	            if (Math.abs(val) < 0.001) {
+	                return 0;
+	            } else {
+	                return Math.abs(val);
+	            }
+	        }, 1024);
+	    };
+	    Tone.extend(Tone.Abs, Tone.SignalBase);
+	    /**
+		 *  dispose method
+		 *  @returns {Tone.Abs} this
+		 */
+	    Tone.Abs.prototype.dispose = function () {
+	        Tone.SignalBase.prototype.dispose.call(this);
+	        this._abs.dispose();
+	        this._abs = null;
+	        return this;
+	    };
+	    return Tone.Abs;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Tone.Follower is a  crude envelope follower which will follow
+		 *          the amplitude of an incoming signal.
+		 *          Take care with small (< 0.02) attack or decay values
+		 *          as follower has some ripple which is exaggerated
+		 *          at these values. Read more about envelope followers (also known
+		 *          as envelope detectors) on [Wikipedia](https://en.wikipedia.org/wiki/Envelope_detector).
+		 *
+		 *  @constructor
+		 *  @extends {Tone.AudioNode}
+		 *  @param {Time|Object} [attack] The rate at which the follower rises.
+		 *  @param {Time=} release The rate at which the folower falls.
+		 *  @example
+		 * var follower = new Tone.Follower(0.2, 0.4);
+		 */
+	    Tone.Follower = function () {
+	        var options = Tone.defaults(arguments, [
+	            'attack',
+	            'release'
+	        ], Tone.Follower);
+	        Tone.AudioNode.call(this);
+	        this.createInsOuts(1, 1);
+	        /**
+			 *  @type {Tone.Abs}
+			 *  @private
+			 */
+	        this._abs = new Tone.Abs();
+	        /**
+			 *  the lowpass filter which smooths the input
+			 *  @type {BiquadFilterNode}
+			 *  @private
+			 */
+	        this._filter = this.context.createBiquadFilter();
+	        this._filter.type = 'lowpass';
+	        this._filter.frequency.value = 0;
+	        this._filter.Q.value = -100;
+	        /**
+			 *  @type {WaveShaperNode}
+			 *  @private
+			 */
+	        this._frequencyValues = new Tone.WaveShaper();
+	        /**
+			 *  @type {Tone.Subtract}
+			 *  @private
+			 */
+	        this._sub = new Tone.Subtract();
+	        /**
+			 *  @type {Tone.Delay}
+			 *  @private
+			 */
+	        this._delay = new Tone.Delay(this.blockTime);
+	        /**
+			 *  this keeps it far from 0, even for very small differences
+			 *  @type {Tone.Multiply}
+			 *  @private
+			 */
+	        this._mult = new Tone.Multiply(10000);
+	        /**
+			 *  @private
+			 *  @type {number}
+			 */
+	        this._attack = options.attack;
+	        /**
+			 *  @private
+			 *  @type {number}
+			 */
+	        this._release = options.release;
+	        //the smoothed signal to get the values
+	        this.input.chain(this._abs, this._filter, this.output);
+	        //the difference path
+	        this._abs.connect(this._sub, 0, 1);
+	        this._filter.chain(this._delay, this._sub);
+	        //threshold the difference and use the thresh to set the frequency
+	        this._sub.chain(this._mult, this._frequencyValues, this._filter.frequency);
+	        //set the attack and release values in the table
+	        this._setAttackRelease(this._attack, this._release);
+	    };
+	    Tone.extend(Tone.Follower, Tone.AudioNode);
+	    /**
+		 *  @static
+		 *  @type {Object}
+		 */
+	    Tone.Follower.defaults = {
+	        'attack': 0.05,
+	        'release': 0.5
+	    };
+	    /**
+		 *  sets the attack and release times in the wave shaper
+		 *  @param   {Time} attack
+		 *  @param   {Time} release
+		 *  @private
+		 */
+	    Tone.Follower.prototype._setAttackRelease = function (attack, release) {
+	        var minTime = this.blockTime;
+	        attack = Tone.Time(attack).toFrequency();
+	        release = Tone.Time(release).toFrequency();
+	        attack = Math.max(attack, minTime);
+	        release = Math.max(release, minTime);
+	        this._frequencyValues.setMap(function (val) {
+	            if (val <= 0) {
+	                return attack;
+	            } else {
+	                return release;
+	            }
+	        });
+	    };
+	    /**
+		 * The attack time.
+		 * @memberOf Tone.Follower#
+		 * @type {Time}
+		 * @name attack
+		 */
+	    Object.defineProperty(Tone.Follower.prototype, 'attack', {
+	        get: function () {
+	            return this._attack;
+	        },
+	        set: function (attack) {
+	            this._attack = attack;
+	            this._setAttackRelease(this._attack, this._release);
+	        }
+	    });
+	    /**
+		 * The release time.
+		 * @memberOf Tone.Follower#
+		 * @type {Time}
+		 * @name release
+		 */
+	    Object.defineProperty(Tone.Follower.prototype, 'release', {
+	        get: function () {
+	            return this._release;
+	        },
+	        set: function (release) {
+	            this._release = release;
+	            this._setAttackRelease(this._attack, this._release);
+	        }
+	    });
+	    /**
+		 *  Borrows the connect method from Signal so that the output can be used
+		 *  as a Tone.Signal control signal.
+		 *  @function
+		 */
+	    Tone.Follower.prototype.connect = Tone.SignalBase.prototype.connect;
+	    /**
+		 *  dispose
+		 *  @returns {Tone.Follower} this
+		 */
+	    Tone.Follower.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._filter.disconnect();
+	        this._filter = null;
+	        this._frequencyValues.disconnect();
+	        this._frequencyValues = null;
+	        this._delay.dispose();
+	        this._delay = null;
+	        this._sub.disconnect();
+	        this._sub = null;
+	        this._abs.dispose();
+	        this._abs = null;
+	        this._mult.dispose();
+	        this._mult = null;
+	        this._curve = null;
+	        return this;
+	    };
+	    return Tone.Follower;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.ScaledEnvelop is an envelope which can be scaled
+		 *         to any range. It's useful for applying an envelope
+		 *         to a frequency or any other non-NormalRange signal
+		 *         parameter.
+		 *
+		 *  @extends {Tone.Envelope}
+		 *  @constructor
+		 *  @param {Time|Object} [attack]	the attack time in seconds
+		 *  @param {Time} [decay]	the decay time in seconds
+		 *  @param {number} [sustain] 	a percentage (0-1) of the full amplitude
+		 *  @param {Time} [release]	the release time in seconds
+		 *  @example
+		 *  var scaledEnv = new Tone.ScaledEnvelope({
+		 *  	"attack" : 0.2,
+		 *  	"min" : 200,
+		 *  	"max" : 2000
+		 *  });
+		 *  scaledEnv.connect(oscillator.frequency);
+		 */
+	    Tone.ScaledEnvelope = function () {
+	        //get all of the defaults
+	        var options = Tone.defaults(arguments, [
+	            'attack',
+	            'decay',
+	            'sustain',
+	            'release'
+	        ], Tone.Envelope);
+	        Tone.Envelope.call(this, options);
+	        options = Tone.defaultArg(options, Tone.ScaledEnvelope.defaults);
+	        /**
+			 *  scale the incoming signal by an exponent
+			 *  @type {Tone.Pow}
+			 *  @private
+			 */
+	        this._exp = this.output = new Tone.Pow(options.exponent);
+	        /**
+			 *  scale the signal to the desired range
+			 *  @type {Tone.Multiply}
+			 *  @private
+			 */
+	        this._scale = this.output = new Tone.Scale(options.min, options.max);
+	        this._sig.chain(this._exp, this._scale);
+	    };
+	    Tone.extend(Tone.ScaledEnvelope, Tone.Envelope);
+	    /**
+		 *  the default parameters
+		 *  @static
+		 */
+	    Tone.ScaledEnvelope.defaults = {
+	        'min': 0,
+	        'max': 1,
+	        'exponent': 1
+	    };
+	    /**
+		 * The envelope's min output value. This is the value which it
+		 * starts at.
+		 * @memberOf Tone.ScaledEnvelope#
+		 * @type {number}
+		 * @name min
+		 */
+	    Object.defineProperty(Tone.ScaledEnvelope.prototype, 'min', {
+	        get: function () {
+	            return this._scale.min;
+	        },
+	        set: function (min) {
+	            this._scale.min = min;
+	        }
+	    });
+	    /**
+		 * The envelope's max output value. In other words, the value
+		 * at the peak of the attack portion of the envelope.
+		 * @memberOf Tone.ScaledEnvelope#
+		 * @type {number}
+		 * @name max
+		 */
+	    Object.defineProperty(Tone.ScaledEnvelope.prototype, 'max', {
+	        get: function () {
+	            return this._scale.max;
+	        },
+	        set: function (max) {
+	            this._scale.max = max;
+	        }
+	    });
+	    /**
+		 * The envelope's exponent value.
+		 * @memberOf Tone.ScaledEnvelope#
+		 * @type {number}
+		 * @name exponent
+		 */
+	    Object.defineProperty(Tone.ScaledEnvelope.prototype, 'exponent', {
+	        get: function () {
+	            return this._exp.value;
+	        },
+	        set: function (exp) {
+	            this._exp.value = exp;
+	        }
+	    });
+	    /**
+		 *  clean up
+		 *  @returns {Tone.ScaledEnvelope} this
+		 */
+	    Tone.ScaledEnvelope.prototype.dispose = function () {
+	        Tone.Envelope.prototype.dispose.call(this);
+	        this._scale.dispose();
+	        this._scale = null;
+	        this._exp.dispose();
+	        this._exp = null;
+	        return this;
+	    };
+	    return Tone.ScaledEnvelope;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.FrequencyEnvelope is a Tone.ScaledEnvelope, but instead of `min` and `max`
+		 *         it's got a `baseFrequency` and `octaves` parameter.
+		 *
+		 *  @extends {Tone.Envelope}
+		 *  @constructor
+		 *  @param {Time|Object} [attack]	the attack time in seconds
+		 *  @param {Time} [decay]	the decay time in seconds
+		 *  @param {number} [sustain] 	a percentage (0-1) of the full amplitude
+		 *  @param {Time} [release]	the release time in seconds
+		 *  @example
+		 *  var freqEnv = new Tone.FrequencyEnvelope({
+		 *  	"attack" : 0.2,
+		 *  	"baseFrequency" : "C2",
+		 *  	"octaves" : 4
+		 *  });
+		 *  freqEnv.connect(oscillator.frequency);
+		 */
+	    Tone.FrequencyEnvelope = function () {
+	        var options = Tone.defaults(arguments, [
+	            'attack',
+	            'decay',
+	            'sustain',
+	            'release'
+	        ], Tone.Envelope);
+	        Tone.ScaledEnvelope.call(this, options);
+	        //merge it with the frequency envelope defaults
+	        options = Tone.defaultArg(options, Tone.FrequencyEnvelope.defaults);
+	        /**
+			 *  Stores the octave value
+			 *  @type {Positive}
+			 *  @private
+			 */
+	        this._octaves = options.octaves;
+	        //setup
+	        this.baseFrequency = options.baseFrequency;
+	        this.octaves = options.octaves;
+	    };
+	    Tone.extend(Tone.FrequencyEnvelope, Tone.Envelope);
+	    /**
+		 *  the default parameters
+		 *  @static
+		 */
+	    Tone.FrequencyEnvelope.defaults = {
+	        'baseFrequency': 200,
+	        'octaves': 4,
+	        'exponent': 2
+	    };
+	    /**
+		 * The envelope's mininum output value. This is the value which it
+		 * starts at.
+		 * @memberOf Tone.FrequencyEnvelope#
+		 * @type {Frequency}
+		 * @name baseFrequency
+		 */
+	    Object.defineProperty(Tone.FrequencyEnvelope.prototype, 'baseFrequency', {
+	        get: function () {
+	            return this._scale.min;
+	        },
+	        set: function (min) {
+	            this._scale.min = this.toFrequency(min);
+	            //also update the octaves
+	            this.octaves = this._octaves;
+	        }
+	    });
+	    /**
+		 * The number of octaves above the baseFrequency that the
+		 * envelope will scale to.
+		 * @memberOf Tone.FrequencyEnvelope#
+		 * @type {Positive}
+		 * @name octaves
+		 */
+	    Object.defineProperty(Tone.FrequencyEnvelope.prototype, 'octaves', {
+	        get: function () {
+	            return this._octaves;
+	        },
+	        set: function (octaves) {
+	            this._octaves = octaves;
+	            this._scale.max = this.baseFrequency * Math.pow(2, octaves);
+	        }
+	    });
+	    /**
+		 * The envelope's exponent value.
+		 * @memberOf Tone.FrequencyEnvelope#
+		 * @type {number}
+		 * @name exponent
+		 */
+	    Object.defineProperty(Tone.FrequencyEnvelope.prototype, 'exponent', {
+	        get: function () {
+	            return this._exp.value;
+	        },
+	        set: function (exp) {
+	            this._exp.value = exp;
+	        }
+	    });
+	    /**
+		 *  clean up
+		 *  @returns {Tone.FrequencyEnvelope} this
+		 */
+	    Tone.FrequencyEnvelope.prototype.dispose = function () {
+	        Tone.ScaledEnvelope.prototype.dispose.call(this);
+	        return this;
+	    };
+	    return Tone.FrequencyEnvelope;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  GreaterThanZero outputs 1 when the input is strictly greater than zero
+		 *
+		 *  @constructor
+		 *  @extends {Tone.SignalBase}
+		 *  @example
+		 * var gt0 = new Tone.GreaterThanZero();
+		 * var sig = new Tone.Signal(0.01).connect(gt0);
+		 * //the output of gt0 is 1.
+		 * sig.value = 0;
+		 * //the output of gt0 is 0.
+		 */
+	    Tone.GreaterThanZero = function () {
+	        Tone.SignalBase.call(this);
+	        /**
+			 *  @type {Tone.WaveShaper}
+			 *  @private
+			 */
+	        this._thresh = this.output = new Tone.WaveShaper(function (val) {
+	            if (val <= 0) {
+	                return 0;
+	            } else {
+	                return 1;
+	            }
+	        }, 127);
+	        /**
+			 *  scale the first thresholded signal by a large value.
+			 *  this will help with values which are very close to 0
+			 *  @type {Tone.Multiply}
+			 *  @private
+			 */
+	        this._scale = this.input = new Tone.Multiply(10000);
+	        //connections
+	        this._scale.connect(this._thresh);
+	    };
+	    Tone.extend(Tone.GreaterThanZero, Tone.SignalBase);
+	    /**
+		 *  dispose method
+		 *  @returns {Tone.GreaterThanZero} this
+		 */
+	    Tone.GreaterThanZero.prototype.dispose = function () {
+	        Tone.SignalBase.prototype.dispose.call(this);
+	        this._scale.dispose();
+	        this._scale = null;
+	        this._thresh.dispose();
+	        this._thresh = null;
+	        return this;
+	    };
+	    return Tone.GreaterThanZero;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Output 1 if the signal is greater than the value, otherwise outputs 0.
+		 *          can compare two signals or a signal and a number.
+		 *
+		 *  @constructor
+		 *  @extends {Tone.Signal}
+		 *  @param {number} [value=0] the value to compare to the incoming signal
+		 *  @example
+		 * var gt = new Tone.GreaterThan(2);
+		 * var sig = new Tone.Signal(4).connect(gt);
+		 * //output of gt is equal 1.
+		 */
+	    Tone.GreaterThan = function (value) {
+	        Tone.Signal.call(this);
+	        this.createInsOuts(2, 0);
+	        /**
+			 *  subtract the amount from the incoming signal
+			 *  @type {Tone.Subtract}
+			 *  @private
+			 */
+	        this._param = this.input[0] = new Tone.Subtract(value);
+	        this.input[1] = this._param.input[1];
+	        /**
+			 *  compare that amount to zero
+			 *  @type {Tone.GreaterThanZero}
+			 *  @private
+			 */
+	        this._gtz = this.output = new Tone.GreaterThanZero();
+	        //connect
+	        this._param.connect(this._gtz);
+	    };
+	    Tone.extend(Tone.GreaterThan, Tone.Signal);
+	    /**
+		 *  dispose method
+		 *  @returns {Tone.GreaterThan} this
+		 */
+	    Tone.GreaterThan.prototype.dispose = function () {
+	        Tone.Signal.prototype.dispose.call(this);
+	        this._gtz.dispose();
+	        this._gtz = null;
+	        return this;
+	    };
+	    return Tone.GreaterThan;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Tone.Gate only passes a signal through when the incoming
+		 *          signal exceeds a specified threshold. To do this, Gate uses
+		 *          a Tone.Follower to follow the amplitude of the incoming signal.
+		 *          A common implementation of this class is a [Noise Gate](https://en.wikipedia.org/wiki/Noise_gate).
+		 *
+		 *  @constructor
+		 *  @extends {Tone.AudioNode}
+		 *  @param {Decibels|Object} [threshold] The threshold above which the gate will open.
+		 *  @param {Time=} attack The follower's attack time
+		 *  @param {Time=} release The follower's release time
+		 *  @example
+		 * var gate = new Tone.Gate(-30, 0.2, 0.3).toMaster();
+		 * var mic = new Tone.UserMedia().connect(gate);
+		 * //the gate will only pass through the incoming
+		 * //signal when it's louder than -30db
+		 */
+	    Tone.Gate = function () {
+	        var options = Tone.defaults(arguments, [
+	            'threshold',
+	            'attack',
+	            'release'
+	        ], Tone.Gate);
+	        Tone.AudioNode.call(this);
+	        this.createInsOuts(1, 1);
+	        /**
+			 *  @type {Tone.Follower}
+			 *  @private
+			 */
+	        this._follower = new Tone.Follower(options.attack, options.release);
+	        /**
+			 *  @type {Tone.GreaterThan}
+			 *  @private
+			 */
+	        this._gt = new Tone.GreaterThan(Tone.dbToGain(options.threshold));
+	        //the connections
+	        this.input.connect(this.output);
+	        //the control signal
+	        this.input.chain(this._gt, this._follower, this.output.gain);
+	    };
+	    Tone.extend(Tone.Gate, Tone.AudioNode);
+	    /**
+		 *  @const
+		 *  @static
+		 *  @type {Object}
+		 */
+	    Tone.Gate.defaults = {
+	        'attack': 0.1,
+	        'release': 0.1,
+	        'threshold': -40
+	    };
+	    /**
+		 * The threshold of the gate in decibels
+		 * @memberOf Tone.Gate#
+		 * @type {Decibels}
+		 * @name threshold
+		 */
+	    Object.defineProperty(Tone.Gate.prototype, 'threshold', {
+	        get: function () {
+	            return Tone.gainToDb(this._gt.value);
+	        },
+	        set: function (thresh) {
+	            this._gt.value = Tone.dbToGain(thresh);
+	        }
+	    });
+	    /**
+		 * The attack speed of the gate
+		 * @memberOf Tone.Gate#
+		 * @type {Time}
+		 * @name attack
+		 */
+	    Object.defineProperty(Tone.Gate.prototype, 'attack', {
+	        get: function () {
+	            return this._follower.attack;
+	        },
+	        set: function (attackTime) {
+	            this._follower.attack = attackTime;
+	        }
+	    });
+	    /**
+		 * The release speed of the gate
+		 * @memberOf Tone.Gate#
+		 * @type {Time}
+		 * @name release
+		 */
+	    Object.defineProperty(Tone.Gate.prototype, 'release', {
+	        get: function () {
+	            return this._follower.release;
+	        },
+	        set: function (releaseTime) {
+	            this._follower.release = releaseTime;
+	        }
+	    });
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.Gate} this
+		 */
+	    Tone.Gate.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._follower.dispose();
+	        this._gt.dispose();
+	        this._follower = null;
+	        this._gt = null;
+	        return this;
+	    };
+	    return Tone.Gate;
+	});
+	Module(function (Tone) {
+	    /**
+		 * @class Tone.TickSignal extends Tone.Signal, but adds the capability
+		 *        to calculate the number of elapsed ticks. exponential and target curves
+		 *        are approximated with multiple linear ramps.
+		 *
+		 *        Thank you Bruno Dias, H. Sofia Pinto, and David M. Matos, for your [WAC paper](https://smartech.gatech.edu/bitstream/handle/1853/54588/WAC2016-49.pdf)
+		 *        describing integrating timing functions for tempo calculations.
+		 *
+		 * @param {Number} value The initial value of the signal
+		 * @extends {Tone.Signal}
+		 */
+	    Tone.TickSignal = function (value) {
+	        value = Tone.defaultArg(value, 1);
+	        Tone.Signal.call(this, {
+	            'units': Tone.Type.Ticks,
+	            'value': value
+	        });
+	        //extend the memory
+	        this._events.memory = Infinity;
+	        //clear the clock from the beginning
+	        this.cancelScheduledValues(0);
+	        //set an initial event
+	        this._events.add({
+	            'type': Tone.Param.AutomationType.SetValue,
+	            'time': 0,
+	            'value': value
+	        });
+	    };
+	    Tone.extend(Tone.TickSignal, Tone.Signal);
+	    /**
+		 * Wraps Tone.Signal methods so that they also
+		 * record the ticks.
+		 * @param  {Function} method
+		 * @return {Function}
+		 * @private
+		 */
+	    function _wrapScheduleMethods(method) {
+	        return function (value, time) {
+	            time = this.toSeconds(time);
+	            method.apply(this, arguments);
+	            var event = this._events.get(time);
+	            var previousEvent = this._events.previousEvent(event);
+	            var ticksUntilTime = this._getTicksUntilEvent(previousEvent, time);
+	            event.ticks = Math.max(ticksUntilTime, 0);
+	            return this;
+	        };
+	    }
+	    Tone.TickSignal.prototype.setValueAtTime = _wrapScheduleMethods(Tone.Signal.prototype.setValueAtTime);
+	    Tone.TickSignal.prototype.linearRampToValueAtTime = _wrapScheduleMethods(Tone.Signal.prototype.linearRampToValueAtTime);
+	    /**
+		 *  Start exponentially approaching the target value at the given time with
+		 *  a rate having the given time constant.
+		 *  @param {number} value
+		 *  @param {Time} startTime
+		 *  @param {number} timeConstant
+		 *  @returns {Tone.TickSignal} this
+		 */
+	    Tone.TickSignal.prototype.setTargetAtTime = function (value, time, constant) {
+	        //aproximate it with multiple linear ramps
+	        time = this.toSeconds(time);
+	        this.setRampPoint(time);
+	        value = this._fromUnits(value);
+	        //start from previously scheduled value
+	        var prevEvent = this._events.get(time);
+	        var segments = Math.round(Math.max(1 / constant, 1));
+	        for (var i = 0; i <= segments; i++) {
+	            var segTime = constant * i + time;
+	            var rampVal = this._exponentialApproach(prevEvent.time, prevEvent.value, value, constant, segTime);
+	            this.linearRampToValueAtTime(this._toUnits(rampVal), segTime);
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Schedules an exponential continuous change in parameter value from
+		 *  the previous scheduled parameter value to the given value.
+		 *  @param  {number} value
+		 *  @param  {Time} endTime
+		 *  @returns {Tone.TickSignal} this
+		 */
+	    Tone.TickSignal.prototype.exponentialRampToValueAtTime = function (value, time) {
+	        //aproximate it with multiple linear ramps
+	        time = this.toSeconds(time);
+	        value = this._fromUnits(value);
+	        //start from previously scheduled value
+	        var prevEvent = this._events.get(time);
+	        if (prevEvent === null) {
+	            prevEvent = {
+	                'value': this._initialValue,
+	                'time': 0
+	            };
+	        }
+	        //approx 10 segments per second
+	        var segments = Math.round(Math.max((time - prevEvent.time) * 10, 1));
+	        var segmentDur = (time - prevEvent.time) / segments;
+	        for (var i = 0; i <= segments; i++) {
+	            var segTime = segmentDur * i + prevEvent.time;
+	            var rampVal = this._exponentialInterpolate(prevEvent.time, prevEvent.value, time, value, segTime);
+	            this.linearRampToValueAtTime(this._toUnits(rampVal), segTime);
+	        }
+	        return this;
+	    };
+	    /**
+		 * Returns the tick value at the time. Takes into account
+		 * any automation curves scheduled on the signal.
+		 * @private
+		 * @param  {Time} time The time to get the tick count at
+		 * @return {Ticks}      The number of ticks which have elapsed at the time
+		 *                          given any automations.
+		 */
+	    Tone.TickSignal.prototype._getTicksUntilEvent = function (event, time) {
+	        if (event === null) {
+	            event = {
+	                'ticks': 0,
+	                'time': 0
+	            };
+	        } else if (Tone.isUndef(event.ticks)) {
+	            var previousEvent = this._events.previousEvent(event);
+	            event.ticks = this._getTicksUntilEvent(previousEvent, event.time);
+	        }
+	        var val0 = this.getValueAtTime(event.time);
+	        var val1 = this.getValueAtTime(time);
+	        //if it's right on the line, take the previous value
+	        if (this._events.get(time).time === time && this._events.get(time).type === Tone.Param.AutomationType.SetValue) {
+	            val1 = this.getValueAtTime(time - this.sampleTime);
+	        }
+	        return 0.5 * (time - event.time) * (val0 + val1) + event.ticks;
+	    };
+	    /**
+		 * Returns the tick value at the time. Takes into account
+		 * any automation curves scheduled on the signal.
+		 * @param  {Time} time The time to get the tick count at
+		 * @return {Ticks}      The number of ticks which have elapsed at the time
+		 *                          given any automations.
+		 */
+	    Tone.TickSignal.prototype.getTicksAtTime = function (time) {
+	        time = this.toSeconds(time);
+	        var event = this._events.get(time);
+	        return Math.max(this._getTicksUntilEvent(event, time), 0);
+	    };
+	    /**
+		 * Return the elapsed time of the number of ticks from the given time
+		 * @param {Ticks} ticks The number of ticks to calculate
+		 * @param  {Time} time The time to get the next tick from
+		 * @return {Seconds} The duration of the number of ticks from the given time in seconds
+		 */
+	    Tone.TickSignal.prototype.getDurationOfTicks = function (ticks, time) {
+	        time = this.toSeconds(time);
+	        var currentTick = this.getTicksAtTime(time);
+	        return this.getTimeOfTick(currentTick + ticks) - time;
+	    };
+	    /**
+		 * Given a tick, returns the time that tick occurs at.
+		 * @param  {Ticks} tick
+		 * @return {Time}      The time that the tick occurs.
+		 */
+	    Tone.TickSignal.prototype.getTimeOfTick = function (tick) {
+	        var before = this._events.get(tick, 'ticks');
+	        var after = this._events.getAfter(tick, 'ticks');
+	        if (before && before.ticks === tick) {
+	            return before.time;
+	        } else if (before && after && after.type === Tone.Param.AutomationType.Linear && before.value !== after.value) {
+	            var val0 = this.getValueAtTime(before.time);
+	            var val1 = this.getValueAtTime(after.time);
+	            var delta = (val1 - val0) / (after.time - before.time);
+	            var k = Math.sqrt(Math.pow(val0, 2) - 2 * delta * (before.ticks - tick));
+	            var sol1 = (-val0 + k) / delta;
+	            var sol2 = (-val0 - k) / delta;
+	            return (sol1 > 0 ? sol1 : sol2) + before.time;
+	        } else if (before) {
+	            if (before.value === 0) {
+	                return Infinity;
+	            } else {
+	                return before.time + (tick - before.ticks) / before.value;
+	            }
+	        } else {
+	            return tick / this._initialValue;
+	        }
+	    };
+	    /**
+		 * Convert some number of ticks their the duration in seconds accounting
+		 * for any automation curves starting at the given time.
+		 * @param  {Ticks} ticks The number of ticks to convert to seconds.
+		 * @param  {Time} [when=now]  When along the automation timeline to convert the ticks.
+		 * @return {Tone.Time}       The duration in seconds of the ticks.
+		 */
+	    Tone.TickSignal.prototype.ticksToTime = function (ticks, when) {
+	        when = this.toSeconds(when);
+	        return new Tone.Time(this.getDurationOfTicks(ticks, when));
+	    };
+	    /**
+		 * The inverse of [ticksToTime](#tickstotime). Convert a duration in
+		 * seconds to the corresponding number of ticks accounting for any
+		 * automation curves starting at the given time.
+		 * @param  {Time} duration The time interval to convert to ticks.
+		 * @param  {Time} [when=now]     When along the automation timeline to convert the ticks.
+		 * @return {Tone.Ticks}          The duration in ticks.
+		 */
+	    Tone.TickSignal.prototype.timeToTicks = function (duration, when) {
+	        when = this.toSeconds(when);
+	        duration = this.toSeconds(duration);
+	        var startTicks = this.getTicksAtTime(when);
+	        var endTicks = this.getTicksAtTime(when + duration);
+	        return new Tone.Ticks(endTicks - startTicks);
+	    };
+	    return Tone.TickSignal;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  A Timeline State. Provides the methods: <code>setStateAtTime("state", time)</code>
+		 *          and <code>getValueAtTime(time)</code>.
+		 *
+		 *  @extends {Tone.Timeline}
+		 *  @param {String} initial The initial state of the TimelineState. 
+		 *                          Defaults to <code>undefined</code>
+		 */
+	    Tone.TimelineState = function (initial) {
+	        Tone.Timeline.call(this);
+	        /**
+			 *  The initial state
+			 *  @private
+			 *  @type {String}
+			 */
+	        this._initial = initial;
+	    };
+	    Tone.extend(Tone.TimelineState, Tone.Timeline);
+	    /**
+		 *  Returns the scheduled state scheduled before or at
+		 *  the given time.
+		 *  @param  {Number}  time  The time to query.
+		 *  @return  {String}  The name of the state input in setStateAtTime.
+		 */
+	    Tone.TimelineState.prototype.getValueAtTime = function (time) {
+	        var event = this.get(time);
+	        if (event !== null) {
+	            return event.state;
+	        } else {
+	            return this._initial;
+	        }
+	    };
+	    /**
+		 *  Add a state to the timeline.
+		 *  @param  {String}  state The name of the state to set.
+		 *  @param  {Number}  time  The time to query.
+		 *  @returns {Tone.TimelineState} this
+		 */
+	    Tone.TimelineState.prototype.setStateAtTime = function (state, time) {
+	        //all state changes need to be >= the previous state time
+	        //TODO throw error if time < the previous event time
+	        this.add({
+	            'state': state,
+	            'time': time
+	        });
+	        return this;
+	    };
+	    /**
+		 *  Return the event before the time with the given state
+		 *  @param {Tone.State} state The state to look for
+		 *  @param  {Time}  time  When to check before			
+		 *  @return  {Object}  The event with the given state before the time
+		 */
+	    Tone.TimelineState.prototype.getLastState = function (state, time) {
+	        time = this.toSeconds(time);
+	        var index = this._search(time);
+	        for (var i = index; i >= 0; i--) {
+	            var event = this._timeline[i];
+	            if (event.state === state) {
+	                return event;
+	            }
+	        }
+	    };
+	    /**
+		 *  Return the event after the time with the given state
+		 *  @param {Tone.State} state The state to look for
+		 *  @param  {Time}  time  When to check from
+		 *  @return  {Object}  The event with the given state after the time
+		 */
+	    Tone.TimelineState.prototype.getNextState = function (state, time) {
+	        time = this.toSeconds(time);
+	        var index = this._search(time);
+	        if (index !== -1) {
+	            for (var i = index; i < this._timeline.length; i++) {
+	                var event = this._timeline[i];
+	                if (event.state === state) {
+	                    return event;
+	                }
+	            }
+	        }
+	    };
+	    return Tone.TimelineState;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Uses [Tone.TickSignal](TickSignal) to track elapsed ticks with
+		 *  		complex automation curves.
+		 *
+		 * 	@constructor
+	     *  @param {Frequency} frequency The initial frequency that the signal ticks at
+		 *  @extends {Tone}
+		 */
+	    Tone.TickSource = function () {
+	        var options = Tone.defaults(arguments, ['frequency'], Tone.TickSource);
+	        /**
+			 *  The frequency the callback function should be invoked.
+			 *  @type  {Frequency}
+			 *  @signal
+			 */
+	        this.frequency = new Tone.TickSignal(options.frequency, Tone.Type.Frequency);
+	        this._readOnly('frequency');
+	        /**
+			 *  The state timeline
+			 *  @type {Tone.TimelineState}
+			 *  @private
+			 */
+	        this._state = new Tone.TimelineState(Tone.State.Stopped);
+	        this._state.setStateAtTime(Tone.State.Stopped, 0);
+	        /**
+			 * The offset values of the ticks
+			 * @type {Tone.Timeline}
+			 * @private
+			 */
+	        this._tickOffset = new Tone.Timeline();
+	        //add the first event
+	        this.setTicksAtTime(0, 0);
+	    };
+	    Tone.extend(Tone.TickSource);
+	    /**
+		 *  The defaults
+		 *  @const
+		 *  @type  {Object}
+		 */
+	    Tone.TickSource.defaults = { 'frequency': 1 };
+	    /**
+		 *  Returns the playback state of the source, either "started", "stopped" or "paused".
+		 *  @type {Tone.State}
+		 *  @readOnly
+		 *  @memberOf Tone.TickSource#
+		 *  @name state
+		 */
+	    Object.defineProperty(Tone.TickSource.prototype, 'state', {
+	        get: function () {
+	            return this._state.getValueAtTime(this.now());
+	        }
+	    });
+	    /**
+		 *  Start the clock at the given time. Optionally pass in an offset
+		 *  of where to start the tick counter from.
+		 *  @param  {Time=}  time    The time the clock should start
+		 *  @param {Ticks=0} offset The number of ticks to start the source at
+		 *  @return  {Tone.TickSource}  this
+		 */
+	    Tone.TickSource.prototype.start = function (time, offset) {
+	        time = this.toSeconds(time);
+	        if (this._state.getValueAtTime(time) !== Tone.State.Started) {
+	            this._state.setStateAtTime(Tone.State.Started, time);
+	            if (Tone.isDefined(offset)) {
+	                this.setTicksAtTime(offset, time);
+	            }
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Stop the clock. Stopping the clock resets the tick counter to 0.
+		 *  @param {Time} [time=now] The time when the clock should stop.
+		 *  @returns {Tone.TickSource} this
+		 *  @example
+		 * clock.stop();
+		 */
+	    Tone.TickSource.prototype.stop = function (time) {
+	        time = this.toSeconds(time);
+	        //cancel the previous stop
+	        if (this._state.getValueAtTime(time) === Tone.State.Stopped) {
+	            var event = this._state.get(time);
+	            if (event.time > 0) {
+	                this._tickOffset.cancel(event.time);
+	                this._state.cancel(event.time);
+	            }
+	        }
+	        this._state.cancel(time);
+	        this._state.setStateAtTime(Tone.State.Stopped, time);
+	        this.setTicksAtTime(0, time);
+	        return this;
+	    };
+	    /**
+		 *  Pause the clock. Pausing does not reset the tick counter.
+		 *  @param {Time} [time=now] The time when the clock should stop.
+		 *  @returns {Tone.TickSource} this
+		 */
+	    Tone.TickSource.prototype.pause = function (time) {
+	        time = this.toSeconds(time);
+	        if (this._state.getValueAtTime(time) === Tone.State.Started) {
+	            this._state.setStateAtTime(Tone.State.Paused, time);
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Cancel start/stop/pause and setTickAtTime events scheduled after the given time.
+		 *  @param {Time} [time=now] When to clear the events after
+		 *  @returns {Tone.TickSource} this
+		 */
+	    Tone.TickSource.prototype.cancel = function (time) {
+	        time = this.toSeconds(time);
+	        this._state.cancel(time);
+	        this._tickOffset.cancel(time);
+	        return this;
+	    };
+	    /**
+		 * Get the elapsed ticks at the given time
+		 * @param  {Time} time  When to get the tick value
+		 * @return {Ticks}     The number of ticks
+		 */
+	    Tone.TickSource.prototype.getTicksAtTime = function (time) {
+	        time = this.toSeconds(time);
+	        var stopEvent = this._state.getLastState(Tone.State.Stopped, time);
+	        //this event allows forEachBetween to iterate until the current time
+	        var tmpEvent = {
+	            state: Tone.State.Paused,
+	            time: time
+	        };
+	        this._state.add(tmpEvent);
+	        //keep track of the previous offset event
+	        var lastState = stopEvent;
+	        var elapsedTicks = 0;
+	        //iterate through all the events since the last stop
+	        this._state.forEachBetween(stopEvent.time, time + this.sampleTime, function (e) {
+	            var periodStartTime = lastState.time;
+	            //if there is an offset event in this period use that
+	            var offsetEvent = this._tickOffset.get(e.time);
+	            if (offsetEvent.time >= lastState.time) {
+	                elapsedTicks = offsetEvent.ticks;
+	                periodStartTime = offsetEvent.time;
+	            }
+	            if (lastState.state === Tone.State.Started && e.state !== Tone.State.Started) {
+	                elapsedTicks += this.frequency.getTicksAtTime(e.time) - this.frequency.getTicksAtTime(periodStartTime);
+	            }
+	            lastState = e;
+	        }.bind(this));
+	        //remove the temporary event
+	        this._state.remove(tmpEvent);
+	        //return the ticks
+	        return elapsedTicks;
+	    };
+	    /**
+		 *  The number of times the callback was invoked. Starts counting at 0
+		 *  and increments after the callback was invoked. Returns -1 when stopped.
+		 *  @memberOf Tone.TickSource#
+		 *  @name ticks
+		 *  @type {Ticks}
+		 */
+	    Object.defineProperty(Tone.TickSource.prototype, 'ticks', {
+	        get: function () {
+	            return this.getTicksAtTime(this.now());
+	        },
+	        set: function (t) {
+	            this.setTicksAtTime(t, this.now());
+	        }
+	    });
+	    /**
+		 *  The time since ticks=0 that the TickSource has been running. Accounts
+		 *  for tempo curves
+		 *  @memberOf Tone.TickSource#
+		 *  @name seconds
+		 *  @type {Seconds}
+		 */
+	    Object.defineProperty(Tone.TickSource.prototype, 'seconds', {
+	        get: function () {
+	            return this.getSecondsAtTime(this.now());
+	        },
+	        set: function (s) {
+	            var now = this.now();
+	            var ticks = this.frequency.timeToTicks(s, now);
+	            this.setTicksAtTime(ticks, now);
+	        }
+	    });
+	    /**
+		 *  Return the elapsed seconds at the given time.
+		 *  @param  {Time}  time  When to get the elapsed seconds
+		 *  @return  {Seconds}  The number of elapsed seconds
+		 */
+	    Tone.TickSource.prototype.getSecondsAtTime = function (time) {
+	        time = this.toSeconds(time);
+	        var stopEvent = this._state.getLastState(Tone.State.Stopped, time);
+	        //this event allows forEachBetween to iterate until the current time
+	        var tmpEvent = {
+	            state: Tone.State.Paused,
+	            time: time
+	        };
+	        this._state.add(tmpEvent);
+	        //keep track of the previous offset event
+	        var lastState = stopEvent;
+	        var elapsedSeconds = 0;
+	        //iterate through all the events since the last stop
+	        this._state.forEachBetween(stopEvent.time, time + this.sampleTime, function (e) {
+	            var periodStartTime = lastState.time;
+	            //if there is an offset event in this period use that
+	            var offsetEvent = this._tickOffset.get(e.time);
+	            if (offsetEvent.time >= lastState.time) {
+	                elapsedSeconds = offsetEvent.seconds;
+	                periodStartTime = offsetEvent.time;
+	            }
+	            if (lastState.state === Tone.State.Started && e.state !== Tone.State.Started) {
+	                elapsedSeconds += e.time - periodStartTime;
+	            }
+	            lastState = e;
+	        }.bind(this));
+	        //remove the temporary event
+	        this._state.remove(tmpEvent);
+	        //return the ticks
+	        return elapsedSeconds;
+	    };
+	    /**
+		 * Set the clock's ticks at the given time.
+		 * @param  {Ticks} ticks The tick value to set
+		 * @param  {Time} time  When to set the tick value
+		 * @return {Tone.TickSource}       this
+		 */
+	    Tone.TickSource.prototype.setTicksAtTime = function (ticks, time) {
+	        time = this.toSeconds(time);
+	        this._tickOffset.cancel(time);
+	        this._tickOffset.add({
+	            'time': time,
+	            'ticks': ticks,
+	            'seconds': this.frequency.getDurationOfTicks(ticks, time)
+	        });
+	        return this;
+	    };
+	    /**
+		 *  Returns the scheduled state at the given time.
+		 *  @param  {Time}  time  The time to query.
+		 *  @return  {String}  The name of the state input in setStateAtTime.
+		 *  @example
+		 * source.start("+0.1");
+		 * source.getStateAtTime("+0.1"); //returns "started"
+		 */
+	    Tone.TickSource.prototype.getStateAtTime = function (time) {
+	        time = this.toSeconds(time);
+	        return this._state.getValueAtTime(time);
+	    };
+	    /**
+		 * Get the time of the given tick. The second argument
+		 * is when to test before. Since ticks can be set (with setTicksAtTime)
+		 * there may be multiple times for a given tick value. 
+		 * @param  {Ticks} ticks The tick number.
+		 * @param  {Time=} before When to measure the tick value from. 
+		 * @return {Time}       The time of the tick
+		 */
+	    Tone.TickSource.prototype.getTimeOfTick = function (tick, before) {
+	        before = Tone.defaultArg(before, this.now());
+	        var offset = this._tickOffset.get(before);
+	        var event = this._state.get(before);
+	        var startTime = Math.max(offset.time, event.time);
+	        var absoluteTicks = this.frequency.getTicksAtTime(startTime) + tick - offset.ticks;
+	        return this.frequency.getTimeOfTick(absoluteTicks);
+	    };
+	    /**
+		 *  Invoke the callback event at all scheduled ticks between the 
+		 *  start time and the end time
+		 *  @param  {Time}    startTime  The beginning of the search range
+		 *  @param  {Time}    endTime    The end of the search range
+		 *  @param  {Function<Time,Ticks>}  callback   The callback to invoke with each tick
+		 *  @return  {Tone.TickSource}    this
+		 */
+	    Tone.TickSource.prototype.forEachTickBetween = function (startTime, endTime, callback) {
+	        //only iterate through the sections where it is "started"
+	        var lastStateEvent = this._state.get(startTime);
+	        this._state.forEachBetween(startTime, endTime, function (event) {
+	            if (lastStateEvent.state === Tone.State.Started && event.state !== Tone.State.Started) {
+	                this.forEachTickBetween(Math.max(lastStateEvent.time, startTime), event.time - this.sampleTime, callback);
+	            }
+	            lastStateEvent = event;
+	        }.bind(this));
+	        startTime = Math.max(lastStateEvent.time, startTime);
+	        if (lastStateEvent.state === Tone.State.Started && this._state) {
+	            //figure out the difference between the frequency ticks and the 
+	            var startTicks = this.frequency.getTicksAtTime(startTime);
+	            var ticksAtStart = this.frequency.getTicksAtTime(lastStateEvent.time);
+	            var diff = startTicks - ticksAtStart;
+	            var offset = diff % 1;
+	            if (offset !== 0) {
+	                offset = 1 - offset;
+	            }
+	            var nextTickTime = this.frequency.getTimeOfTick(startTicks + offset);
+	            var error = null;
+	            while (nextTickTime < endTime && this._state) {
+	                try {
+	                    callback(nextTickTime, Math.round(this.getTicksAtTime(nextTickTime)));
+	                } catch (e) {
+	                    error = e;
+	                    break;
+	                }
+	                if (this._state) {
+	                    nextTickTime += this.frequency.getDurationOfTicks(1, nextTickTime);
+	                }
+	            }
+	        }
+	        if (error) {
+	            throw error;
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Clean up
+		 *  @returns {Tone.TickSource} this
+		 */
+	    Tone.TickSource.prototype.dispose = function () {
+	        Tone.Param.prototype.dispose.call(this);
+	        this._state.dispose();
+	        this._state = null;
+	        this._tickOffset.dispose();
+	        this._tickOffset = null;
+	        this._writable('frequency');
+	        this.frequency.dispose();
+	        this.frequency = null;
+	        return this;
+	    };
+	    return Tone.TickSource;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  A sample accurate clock which provides a callback at the given rate.
+		 *          While the callback is not sample-accurate (it is still susceptible to
+		 *          loose JS timing), the time passed in as the argument to the callback
+		 *          is precise. For most applications, it is better to use Tone.Transport
+		 *          instead of the Clock by itself since you can synchronize multiple callbacks.
+		 *
+		 * 	@constructor
+		 *  @extends {Tone.Emitter}
+		 * 	@param {function} callback The callback to be invoked with the time of the audio event
+		 * 	@param {Frequency} frequency The rate of the callback
+		 * 	@example
+		 * //the callback will be invoked approximately once a second
+		 * //and will print the time exactly once a second apart.
+		 * var clock = new Tone.Clock(function(time){
+		 * 	console.log(time);
+		 * }, 1);
+		 */
+	    Tone.Clock = function () {
+	        var options = Tone.defaults(arguments, [
+	            'callback',
+	            'frequency'
+	        ], Tone.Clock);
+	        Tone.Emitter.call(this);
+	        /**
+			 *  The callback function to invoke at the scheduled tick.
+			 *  @type  {Function}
+			 */
+	        this.callback = options.callback;
+	        /**
+			 *  The next time the callback is scheduled.
+			 *  @type {Number}
+			 *  @private
+			 */
+	        this._nextTick = 0;
+	        /**
+			 *  The tick counter
+			 *  @type  {Tone.TickSource}
+			 *  @private
+			 */
+	        this._tickSource = new Tone.TickSource(options.frequency);
+	        /**
+			 *  The last time the loop callback was invoked
+			 *  @private
+			 *  @type {Number}
+			 */
+	        this._lastUpdate = 0;
+	        /**
+			 *  The rate the callback function should be invoked.
+			 *  @type  {BPM}
+			 *  @signal
+			 */
+	        this.frequency = this._tickSource.frequency;
+	        this._readOnly('frequency');
+	        /**
+			 *  The state timeline
+			 *  @type {Tone.TimelineState}
+			 *  @private
+			 */
+	        this._state = new Tone.TimelineState(Tone.State.Stopped);
+	        //add an initial state
+	        this._state.setStateAtTime(Tone.State.Stopped, 0);
+	        /**
+			 *  The loop function bound to its context.
+			 *  This is necessary to remove the event in the end.
+			 *  @type {Function}
+			 *  @private
+			 */
+	        this._boundLoop = this._loop.bind(this);
+	        //bind a callback to the worker thread
+	        this.context.on('tick', this._boundLoop);
+	    };
+	    Tone.extend(Tone.Clock, Tone.Emitter);
+	    /**
+		 *  The defaults
+		 *  @const
+		 *  @type  {Object}
+		 */
+	    Tone.Clock.defaults = {
+	        'callback': Tone.noOp,
+	        'frequency': 1
+	    };
+	    /**
+		 *  Returns the playback state of the source, either "started", "stopped" or "paused".
+		 *  @type {Tone.State}
+		 *  @readOnly
+		 *  @memberOf Tone.Clock#
+		 *  @name state
+		 */
+	    Object.defineProperty(Tone.Clock.prototype, 'state', {
+	        get: function () {
+	            return this._state.getValueAtTime(this.now());
+	        }
+	    });
+	    /**
+		 *  Start the clock at the given time. Optionally pass in an offset
+		 *  of where to start the tick counter from.
+		 *  @param  {Time=}  time    The time the clock should start
+		 *  @param  {Ticks=}  offset  Where the tick counter starts counting from.
+		 *  @return  {Tone.Clock}  this
+		 */
+	    Tone.Clock.prototype.start = function (time, offset) {
+	        time = this.toSeconds(time);
+	        if (this._state.getValueAtTime(time) !== Tone.State.Started) {
+	            this._state.setStateAtTime(Tone.State.Started, time);
+	            this._tickSource.start(time, offset);
+	            if (time < this._lastUpdate) {
+	                this.emit('start', time, offset);
+	            }
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Stop the clock. Stopping the clock resets the tick counter to 0.
+		 *  @param {Time} [time=now] The time when the clock should stop.
+		 *  @returns {Tone.Clock} this
+		 *  @example
+		 * clock.stop();
+		 */
+	    Tone.Clock.prototype.stop = function (time) {
+	        time = this.toSeconds(time);
+	        this._state.cancel(time);
+	        this._state.setStateAtTime(Tone.State.Stopped, time);
+	        this._tickSource.stop(time);
+	        if (time < this._lastUpdate) {
+	            this.emit('stop', time);
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Pause the clock. Pausing does not reset the tick counter.
+		 *  @param {Time} [time=now] The time when the clock should stop.
+		 *  @returns {Tone.Clock} this
+		 */
+	    Tone.Clock.prototype.pause = function (time) {
+	        time = this.toSeconds(time);
+	        if (this._state.getValueAtTime(time) === Tone.State.Started) {
+	            this._state.setStateAtTime(Tone.State.Paused, time);
+	            this._tickSource.pause(time);
+	            if (time < this._lastUpdate) {
+	                this.emit('pause', time);
+	            }
+	        }
+	        return this;
+	    };
+	    /**
+		 *  The number of times the callback was invoked. Starts counting at 0
+		 *  and increments after the callback was invoked.
+		 *  @type {Ticks}
+		 */
+	    Object.defineProperty(Tone.Clock.prototype, 'ticks', {
+	        get: function () {
+	            return Math.ceil(this.getTicksAtTime(this.now()));
+	        },
+	        set: function (t) {
+	            this._tickSource.ticks = t;
+	        }
+	    });
+	    /**
+		 *  The time since ticks=0 that the Clock has been running. Accounts
+		 *  for tempo curves
+		 *  @type {Seconds}
+		 */
+	    Object.defineProperty(Tone.Clock.prototype, 'seconds', {
+	        get: function () {
+	            return this._tickSource.seconds;
+	        },
+	        set: function (s) {
+	            this._tickSource.seconds = s;
+	        }
+	    });
+	    /**
+		 *  Return the elapsed seconds at the given time.
+		 *  @param  {Time}  time  When to get the elapsed seconds
+		 *  @return  {Seconds}  The number of elapsed seconds
+		 */
+	    Tone.Clock.prototype.getSecondsAtTime = function (time) {
+	        return this._tickSource.getSecondsAtTime(time);
+	    };
+	    /**
+		 * Set the clock's ticks at the given time.
+		 * @param  {Ticks} ticks The tick value to set
+		 * @param  {Time} time  When to set the tick value
+		 * @return {Tone.Clock}       this
+		 */
+	    Tone.Clock.prototype.setTicksAtTime = function (ticks, time) {
+	        this._tickSource.setTicksAtTime(ticks, time);
+	        return this;
+	    };
+	    /**
+		 * Get the clock's ticks at the given time.
+		 * @param  {Time} time  When to get the tick value
+		 * @return {Ticks}       The tick value at the given time.
+		 */
+	    Tone.Clock.prototype.getTicksAtTime = function (time) {
+	        return this._tickSource.getTicksAtTime(time);
+	    };
+	    /**
+		 * Get the time of the next tick
+		 * @param  {Ticks} ticks The tick number.
+		 * @param  {Time} before 
+		 * @return {Tone.Clock}       this
+		 */
+	    Tone.Clock.prototype.nextTickTime = function (offset, when) {
+	        when = this.toSeconds(when);
+	        var currentTick = this.getTicksAtTime(when);
+	        return this._tickSource.getTimeOfTick(currentTick + offset, when);
+	    };
+	    /**
+		 *  The scheduling loop.
+		 *  @private
+		 */
+	    Tone.Clock.prototype._loop = function () {
+	        var startTime = this._lastUpdate;
+	        var endTime = this.now();
+	        this._lastUpdate = endTime;
+	        if (startTime !== endTime) {
+	            //the state change events
+	            this._state.forEachBetween(startTime, endTime, function (e) {
+	                switch (e.state) {
+	                case Tone.State.Started:
+	                    var offset = this._tickSource.getTicksAtTime(e.time);
+	                    this.emit('start', e.time, offset);
+	                    break;
+	                case Tone.State.Stopped:
+	                    if (e.time !== 0) {
+	                        this.emit('stop', e.time);
+	                    }
+	                    break;
+	                case Tone.State.Paused:
+	                    this.emit('pause', e.time);
+	                    break;
+	                }
+	            }.bind(this));
+	            //the tick callbacks
+	            this._tickSource.forEachTickBetween(startTime, endTime, function (time, ticks) {
+	                this.callback(time, ticks);
+	            }.bind(this));
+	        }
+	    };
+	    /**
+		 *  Returns the scheduled state at the given time.
+		 *  @param  {Time}  time  The time to query.
+		 *  @return  {String}  The name of the state input in setStateAtTime.
+		 *  @example
+		 * clock.start("+0.1");
+		 * clock.getStateAtTime("+0.1"); //returns "started"
+		 */
+	    Tone.Clock.prototype.getStateAtTime = function (time) {
+	        time = this.toSeconds(time);
+	        return this._state.getValueAtTime(time);
+	    };
+	    /**
+		 *  Clean up
+		 *  @returns {Tone.Clock} this
+		 */
+	    Tone.Clock.prototype.dispose = function () {
+	        Tone.Emitter.prototype.dispose.call(this);
+	        this.context.off('tick', this._boundLoop);
+	        this._writable('frequency');
+	        this._tickSource.dispose();
+	        this._tickSource = null;
+	        this.frequency = null;
+	        this._boundLoop = null;
+	        this._nextTick = Infinity;
+	        this.callback = null;
+	        this._state.dispose();
+	        this._state = null;
+	    };
+	    return Tone.Clock;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Similar to Tone.Timeline, but all events represent
+		 *         intervals with both "time" and "duration" times. The
+		 *         events are placed in a tree structure optimized
+		 *         for querying an intersection point with the timeline
+		 *         events. Internally uses an [Interval Tree](https://en.wikipedia.org/wiki/Interval_tree)
+		 *         to represent the data.
+		 *  @extends {Tone}
+		 */
+	    Tone.IntervalTimeline = function () {
+	        Tone.call(this);
+	        /**
+			 *  The root node of the inteval tree
+			 *  @type  {IntervalNode}
+			 *  @private
+			 */
+	        this._root = null;
+	        /**
+			 *  Keep track of the length of the timeline.
+			 *  @type  {Number}
+			 *  @private
+			 */
+	        this._length = 0;
+	    };
+	    Tone.extend(Tone.IntervalTimeline);
+	    /**
+		 *  The event to add to the timeline. All events must
+		 *  have a time and duration value
+		 *  @param  {Object}  event  The event to add to the timeline
+		 *  @return  {Tone.IntervalTimeline}  this
+		 */
+	    Tone.IntervalTimeline.prototype.add = function (event) {
+	        if (Tone.isUndef(event.time) || Tone.isUndef(event.duration)) {
+	            throw new Error('Tone.IntervalTimeline: events must have time and duration parameters');
+	        }
+	        event.time = event.time.valueOf();
+	        var node = new IntervalNode(event.time, event.time + event.duration, event);
+	        if (this._root === null) {
+	            this._root = node;
+	        } else {
+	            this._root.insert(node);
+	        }
+	        this._length++;
+	        // Restructure tree to be balanced
+	        while (node !== null) {
+	            node.updateHeight();
+	            node.updateMax();
+	            this._rebalance(node);
+	            node = node.parent;
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Remove an event from the timeline.
+		 *  @param  {Object}  event  The event to remove from the timeline
+		 *  @return  {Tone.IntervalTimeline}  this
+		 */
+	    Tone.IntervalTimeline.prototype.remove = function (event) {
+	        if (this._root !== null) {
+	            var results = [];
+	            this._root.search(event.time, results);
+	            for (var i = 0; i < results.length; i++) {
+	                var node = results[i];
+	                if (node.event === event) {
+	                    this._removeNode(node);
+	                    this._length--;
+	                    break;
+	                }
+	            }
+	        }
+	        return this;
+	    };
+	    /**
+		 *  The number of items in the timeline.
+		 *  @type {Number}
+		 *  @memberOf Tone.IntervalTimeline#
+		 *  @name length
+		 *  @readOnly
+		 */
+	    Object.defineProperty(Tone.IntervalTimeline.prototype, 'length', {
+	        get: function () {
+	            return this._length;
+	        }
+	    });
+	    /**
+		 *  Remove events whose time time is after the given time
+		 *  @param  {Number}  time  The time to query.
+		 *  @returns {Tone.IntervalTimeline} this
+		 */
+	    Tone.IntervalTimeline.prototype.cancel = function (after) {
+	        this.forEachFrom(after, function (event) {
+	            this.remove(event);
+	        }.bind(this));
+	        return this;
+	    };
+	    /**
+		 *  Set the root node as the given node
+		 *  @param {IntervalNode} node
+		 *  @private
+		 */
+	    Tone.IntervalTimeline.prototype._setRoot = function (node) {
+	        this._root = node;
+	        if (this._root !== null) {
+	            this._root.parent = null;
+	        }
+	    };
+	    /**
+		 *  Replace the references to the node in the node's parent
+		 *  with the replacement node.
+		 *  @param  {IntervalNode}  node
+		 *  @param  {IntervalNode}  replacement
+		 *  @private
+		 */
+	    Tone.IntervalTimeline.prototype._replaceNodeInParent = function (node, replacement) {
+	        if (node.parent !== null) {
+	            if (node.isLeftChild()) {
+	                node.parent.left = replacement;
+	            } else {
+	                node.parent.right = replacement;
+	            }
+	            this._rebalance(node.parent);
+	        } else {
+	            this._setRoot(replacement);
+	        }
+	    };
+	    /**
+		 *  Remove the node from the tree and replace it with
+		 *  a successor which follows the schema.
+		 *  @param  {IntervalNode}  node
+		 *  @private
+		 */
+	    Tone.IntervalTimeline.prototype._removeNode = function (node) {
+	        if (node.left === null && node.right === null) {
+	            this._replaceNodeInParent(node, null);
+	        } else if (node.right === null) {
+	            this._replaceNodeInParent(node, node.left);
+	        } else if (node.left === null) {
+	            this._replaceNodeInParent(node, node.right);
+	        } else {
+	            var balance = node.getBalance();
+	            var replacement, temp;
+	            if (balance > 0) {
+	                if (node.left.right === null) {
+	                    replacement = node.left;
+	                    replacement.right = node.right;
+	                    temp = replacement;
+	                } else {
+	                    replacement = node.left.right;
+	                    while (replacement.right !== null) {
+	                        replacement = replacement.right;
+	                    }
+	                    replacement.parent.right = replacement.left;
+	                    temp = replacement.parent;
+	                    replacement.left = node.left;
+	                    replacement.right = node.right;
+	                }
+	            } else if (node.right.left === null) {
+	                replacement = node.right;
+	                replacement.left = node.left;
+	                temp = replacement;
+	            } else {
+	                replacement = node.right.left;
+	                while (replacement.left !== null) {
+	                    replacement = replacement.left;
+	                }
+	                replacement.parent = replacement.parent;
+	                replacement.parent.left = replacement.right;
+	                temp = replacement.parent;
+	                replacement.left = node.left;
+	                replacement.right = node.right;
+	            }
+	            if (node.parent !== null) {
+	                if (node.isLeftChild()) {
+	                    node.parent.left = replacement;
+	                } else {
+	                    node.parent.right = replacement;
+	                }
+	            } else {
+	                this._setRoot(replacement);
+	            }
+	            // this._replaceNodeInParent(node, replacement);
+	            this._rebalance(temp);
+	        }
+	        node.dispose();
+	    };
+	    /**
+		 *  Rotate the tree to the left
+		 *  @param  {IntervalNode}  node
+		 *  @private
+		 */
+	    Tone.IntervalTimeline.prototype._rotateLeft = function (node) {
+	        var parent = node.parent;
+	        var isLeftChild = node.isLeftChild();
+	        // Make node.right the new root of this sub tree (instead of node)
+	        var pivotNode = node.right;
+	        node.right = pivotNode.left;
+	        pivotNode.left = node;
+	        if (parent !== null) {
+	            if (isLeftChild) {
+	                parent.left = pivotNode;
+	            } else {
+	                parent.right = pivotNode;
+	            }
+	        } else {
+	            this._setRoot(pivotNode);
+	        }
+	    };
+	    /**
+		 *  Rotate the tree to the right
+		 *  @param  {IntervalNode}  node
+		 *  @private
+		 */
+	    Tone.IntervalTimeline.prototype._rotateRight = function (node) {
+	        var parent = node.parent;
+	        var isLeftChild = node.isLeftChild();
+	        // Make node.left the new root of this sub tree (instead of node)
+	        var pivotNode = node.left;
+	        node.left = pivotNode.right;
+	        pivotNode.right = node;
+	        if (parent !== null) {
+	            if (isLeftChild) {
+	                parent.left = pivotNode;
+	            } else {
+	                parent.right = pivotNode;
+	            }
+	        } else {
+	            this._setRoot(pivotNode);
+	        }
+	    };
+	    /**
+		 *  Balance the BST
+		 *  @param  {IntervalNode}  node
+		 *  @private
+		 */
+	    Tone.IntervalTimeline.prototype._rebalance = function (node) {
+	        var balance = node.getBalance();
+	        if (balance > 1) {
+	            if (node.left.getBalance() < 0) {
+	                this._rotateLeft(node.left);
+	            } else {
+	                this._rotateRight(node);
+	            }
+	        } else if (balance < -1) {
+	            if (node.right.getBalance() > 0) {
+	                this._rotateRight(node.right);
+	            } else {
+	                this._rotateLeft(node);
+	            }
+	        }
+	    };
+	    /**
+		 *  Get an event whose time and duration span the give time. Will
+		 *  return the match whose "time" value is closest to the given time.
+		 *  @param  {Object}  event  The event to add to the timeline
+		 *  @return  {Object}  The event which spans the desired time
+		 */
+	    Tone.IntervalTimeline.prototype.get = function (time) {
+	        if (this._root !== null) {
+	            var results = [];
+	            this._root.search(time, results);
+	            if (results.length > 0) {
+	                var max = results[0];
+	                for (var i = 1; i < results.length; i++) {
+	                    if (results[i].low > max.low) {
+	                        max = results[i];
+	                    }
+	                }
+	                return max.event;
+	            }
+	        }
+	        return null;
+	    };
+	    /**
+		 *  Iterate over everything in the timeline.
+		 *  @param  {Function}  callback The callback to invoke with every item
+		 *  @returns {Tone.IntervalTimeline} this
+		 */
+	    Tone.IntervalTimeline.prototype.forEach = function (callback) {
+	        if (this._root !== null) {
+	            var allNodes = [];
+	            this._root.traverse(function (node) {
+	                allNodes.push(node);
+	            });
+	            for (var i = 0; i < allNodes.length; i++) {
+	                var ev = allNodes[i].event;
+	                if (ev) {
+	                    callback(ev);
+	                }
+	            }
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Iterate over everything in the array in which the given time
+		 *  overlaps with the time and duration time of the event.
+		 *  @param  {Number}  time The time to check if items are overlapping
+		 *  @param  {Function}  callback The callback to invoke with every item
+		 *  @returns {Tone.IntervalTimeline} this
+		 */
+	    Tone.IntervalTimeline.prototype.forEachAtTime = function (time, callback) {
+	        if (this._root !== null) {
+	            var results = [];
+	            this._root.search(time, results);
+	            for (var i = results.length - 1; i >= 0; i--) {
+	                var ev = results[i].event;
+	                if (ev) {
+	                    callback(ev);
+	                }
+	            }
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Iterate over everything in the array in which the time is greater
+		 *  than or equal to the given time.
+		 *  @param  {Number}  time The time to check if items are before
+		 *  @param  {Function}  callback The callback to invoke with every item
+		 *  @returns {Tone.IntervalTimeline} this
+		 */
+	    Tone.IntervalTimeline.prototype.forEachFrom = function (time, callback) {
+	        if (this._root !== null) {
+	            var results = [];
+	            this._root.searchAfter(time, results);
+	            for (var i = results.length - 1; i >= 0; i--) {
+	                var ev = results[i].event;
+	                callback(ev);
+	            }
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Clean up
+		 *  @return  {Tone.IntervalTimeline}  this
+		 */
+	    Tone.IntervalTimeline.prototype.dispose = function () {
+	        var allNodes = [];
+	        if (this._root !== null) {
+	            this._root.traverse(function (node) {
+	                allNodes.push(node);
+	            });
+	        }
+	        for (var i = 0; i < allNodes.length; i++) {
+	            allNodes[i].dispose();
+	        }
+	        allNodes = null;
+	        this._root = null;
+	        return this;
+	    };
+	    ///////////////////////////////////////////////////////////////////////////
+	    //	INTERVAL NODE HELPER
+	    ///////////////////////////////////////////////////////////////////////////
+	    /**
+		 *  Represents a node in the binary search tree, with the addition
+		 *  of a "high" value which keeps track of the highest value of
+		 *  its children.
+		 *  References:
+		 *  https://brooknovak.wordpress.com/2013/12/07/augmented-interval-tree-in-c/
+		 *  http://www.mif.vu.lt/~valdas/ALGORITMAI/LITERATURA/Cormen/Cormen.pdf
+		 *  @param {Number} low
+		 *  @param {Number} high
+		 *  @private
+		 */
+	    var IntervalNode = function (low, high, event) {
+	        //the event container
+	        this.event = event;
+	        //the low value
+	        this.low = low;
+	        //the high value
+	        this.high = high;
+	        //the high value for this and all child nodes
+	        this.max = this.high;
+	        //the nodes to the left
+	        this._left = null;
+	        //the nodes to the right
+	        this._right = null;
+	        //the parent node
+	        this.parent = null;
+	        //the number of child nodes
+	        this.height = 0;
+	    };
+	    /**
+		 *  Insert a node into the correct spot in the tree
+		 *  @param  {IntervalNode}  node
+		 */
+	    IntervalNode.prototype.insert = function (node) {
+	        if (node.low <= this.low) {
+	            if (this.left === null) {
+	                this.left = node;
+	            } else {
+	                this.left.insert(node);
+	            }
+	        } else if (this.right === null) {
+	            this.right = node;
+	        } else {
+	            this.right.insert(node);
+	        }
+	    };
+	    /**
+		 *  Search the tree for nodes which overlap
+		 *  with the given point
+		 *  @param  {Number}  point  The point to query
+		 *  @param  {Array}  results  The array to put the results
+		 */
+	    IntervalNode.prototype.search = function (point, results) {
+	        // If p is to the right of the rightmost point of any interval
+	        // in this node and all children, there won't be any matches.
+	        if (point > this.max) {
+	            return;
+	        }
+	        // Search left children
+	        if (this.left !== null) {
+	            this.left.search(point, results);
+	        }
+	        // Check this node
+	        if (this.low <= point && this.high > point) {
+	            results.push(this);
+	        }
+	        // If p is to the left of the time of this interval,
+	        // then it can't be in any child to the right.
+	        if (this.low > point) {
+	            return;
+	        }
+	        // Search right children
+	        if (this.right !== null) {
+	            this.right.search(point, results);
+	        }
+	    };
+	    /**
+		 *  Search the tree for nodes which are less
+		 *  than the given point
+		 *  @param  {Number}  point  The point to query
+		 *  @param  {Array}  results  The array to put the results
+		 */
+	    IntervalNode.prototype.searchAfter = function (point, results) {
+	        // Check this node
+	        if (this.low >= point) {
+	            results.push(this);
+	            if (this.left !== null) {
+	                this.left.searchAfter(point, results);
+	            }
+	        }
+	        // search the right side
+	        if (this.right !== null) {
+	            this.right.searchAfter(point, results);
+	        }
+	    };
+	    /**
+		 *  Invoke the callback on this element and both it's branches
+		 *  @param  {Function}  callback
+		 */
+	    IntervalNode.prototype.traverse = function (callback) {
+	        callback(this);
+	        if (this.left !== null) {
+	            this.left.traverse(callback);
+	        }
+	        if (this.right !== null) {
+	            this.right.traverse(callback);
+	        }
+	    };
+	    /**
+		 *  Update the height of the node
+		 */
+	    IntervalNode.prototype.updateHeight = function () {
+	        if (this.left !== null && this.right !== null) {
+	            this.height = Math.max(this.left.height, this.right.height) + 1;
+	        } else if (this.right !== null) {
+	            this.height = this.right.height + 1;
+	        } else if (this.left !== null) {
+	            this.height = this.left.height + 1;
+	        } else {
+	            this.height = 0;
+	        }
+	    };
+	    /**
+		 *  Update the height of the node
+		 */
+	    IntervalNode.prototype.updateMax = function () {
+	        this.max = this.high;
+	        if (this.left !== null) {
+	            this.max = Math.max(this.max, this.left.max);
+	        }
+	        if (this.right !== null) {
+	            this.max = Math.max(this.max, this.right.max);
+	        }
+	    };
+	    /**
+		 *  The balance is how the leafs are distributed on the node
+		 *  @return  {Number}  Negative numbers are balanced to the right
+		 */
+	    IntervalNode.prototype.getBalance = function () {
+	        var balance = 0;
+	        if (this.left !== null && this.right !== null) {
+	            balance = this.left.height - this.right.height;
+	        } else if (this.left !== null) {
+	            balance = this.left.height + 1;
+	        } else if (this.right !== null) {
+	            balance = -(this.right.height + 1);
+	        }
+	        return balance;
+	    };
+	    /**
+		 *  @returns {Boolean} true if this node is the left child
+		 *  of its parent
+		 */
+	    IntervalNode.prototype.isLeftChild = function () {
+	        return this.parent !== null && this.parent.left === this;
+	    };
+	    /**
+		 *  get/set the left node
+		 *  @type {IntervalNode}
+		 */
+	    Object.defineProperty(IntervalNode.prototype, 'left', {
+	        get: function () {
+	            return this._left;
+	        },
+	        set: function (node) {
+	            this._left = node;
+	            if (node !== null) {
+	                node.parent = this;
+	            }
+	            this.updateHeight();
+	            this.updateMax();
+	        }
+	    });
+	    /**
+		 *  get/set the right node
+		 *  @type {IntervalNode}
+		 */
+	    Object.defineProperty(IntervalNode.prototype, 'right', {
+	        get: function () {
+	            return this._right;
+	        },
+	        set: function (node) {
+	            this._right = node;
+	            if (node !== null) {
+	                node.parent = this;
+	            }
+	            this.updateHeight();
+	            this.updateMax();
+	        }
+	    });
+	    /**
+		 *  null out references.
+		 */
+	    IntervalNode.prototype.dispose = function () {
+	        this.parent = null;
+	        this._left = null;
+	        this._right = null;
+	        this.event = null;
+	    };
+	    ///////////////////////////////////////////////////////////////////////////
+	    //	END INTERVAL NODE HELPER
+	    ///////////////////////////////////////////////////////////////////////////
+	    return Tone.IntervalTimeline;
+	});
+	Module(function (Tone) {
+	    /**
+		 *  @class Tone.Ticks is a primitive type for encoding Time values.
+		 *         Tone.Ticks can be constructed with or without the `new` keyword. Tone.Ticks can be passed
+		 *         into the parameter of any method which takes time as an argument.
+		 *  @constructor
+		 *  @extends {Tone.TransportTime}
+		 *  @param  {String|Number}  val    The time value.
+		 *  @param  {String=}  units  The units of the value.
+		 *  @example
+		 * var t = Tone.Ticks("4n");//a quarter note
+		 */
+	    Tone.Ticks = function (val, units) {
+	        if (this instanceof Tone.Ticks) {
+	            Tone.TransportTime.call(this, val, units);
+	        } else {
+	            return new Tone.Ticks(val, units);
+	        }
+	    };
+	    Tone.extend(Tone.Ticks, Tone.TransportTime);
+	    /**
+		 *  The default units if none are given.
+		 *  @type {String}
+		 *  @private
+		 */
+	    Tone.Ticks.prototype._defaultUnits = 'i';
+	    /**
+		 * Get the current time in the given units
+		 * @return {Ticks}
+		 * @private
+		 */
+	    Tone.Ticks.prototype._now = function () {
+	        return Tone.Transport.ticks;
+	    };
+	    /**
+		 *  Return the value of the beats in the current units
+		 *  @param {Number} beats
+		 *  @return  {Number}
+		 *  @private
+		 */
+	    Tone.Ticks.prototype._beatsToUnits = function (beats) {
+	        return this._getPPQ() * beats;
+	    };
+	    /**
+		 *  Returns the value of a second in the current units
+		 *  @param {Seconds} seconds
+		 *  @return  {Number}
+		 *  @private
+		 */
+	    Tone.Ticks.prototype._secondsToUnits = function (seconds) {
+	        return seconds / (60 / this._getBpm()) * this._getPPQ();
+	    };
+	    /**
+		 *  Returns the value of a tick in the current time units
+		 *  @param {Ticks} ticks
+		 *  @return  {Number}
+		 *  @private
+		 */
+	    Tone.Ticks.prototype._ticksToUnits = function (ticks) {
+	        return ticks;
+	    };
+	    /**
+		 *  Return the time in ticks
+		 *  @return  {Ticks}
+		 */
+	    Tone.Ticks.prototype.toTicks = function () {
+	        return this.valueOf();
+	    };
+	    /**
+		 *  Return the time in ticks
+		 *  @return  {Ticks}
+		 */
+	    Tone.Ticks.prototype.toSeconds = function () {
+	        return this.valueOf() / this._getPPQ() * (60 / this._getBpm());
+	    };
+	    return Tone.Ticks;
+	});
+	Module(function (Tone) {
+	    /**
+		 *  @class Tone.TransportEvent is an internal class used by (Tone.Transport)[Transport]
+		 *         to schedule events. Do no invoke this class directly, it is
+		 *         handled from within Tone.Transport.
+		 *  @extends {Tone}
+		 *  @param {Object} options
+		 */
+	    Tone.TransportEvent = function (Transport, options) {
+	        options = Tone.defaultArg(options, Tone.TransportEvent.defaults);
+	        Tone.call(this);
+	        /**
+			 * Reference to the Transport that created it
+			 * @type {Tone.Transport}
+			 */
+	        this.Transport = Transport;
+	        /**
+			 * The unique id of the event
+			 * @type {Number}
+			 */
+	        this.id = Tone.TransportEvent._eventId++;
+	        /**
+			 * The time the event starts
+			 * @type {Ticks}
+			 */
+	        this.time = Tone.Ticks(options.time);
+	        /**
+			 * The callback to invoke
+			 * @type {Function}
+			 */
+	        this.callback = options.callback;
+	        /**
+			 * If the event should be removed after being created.
+			 * @type {Boolean}
+			 * @private
+			 */
+	        this._once = options.once;
+	    };
+	    Tone.extend(Tone.TransportEvent);
+	    /**
+		 * The defaults
+		 * @static
+		 * @type {Object}
+		 */
+	    Tone.TransportEvent.defaults = {
+	        'once': false,
+	        'callback': Tone.noOp
+	    };
+	    /**
+		 * Current ID counter
+		 * @private
+		 * @static
+		 * @type {Number}
+		 */
+	    Tone.TransportEvent._eventId = 0;
+	    /**
+		 * Invoke the event callback.
+		 * @param  {Time} time  The AudioContext time in seconds of the event
+		 */
+	    Tone.TransportEvent.prototype.invoke = function (time) {
+	        if (this.callback) {
+	            this.callback(time);
+	            if (this._once && this.Transport) {
+	                this.Transport.clear(this.id);
+	            }
+	        }
+	    };
+	    /**
+		 * Clean up
+		 * @return {Tone.TransportEvent} this
+		 */
+	    Tone.TransportEvent.prototype.dispose = function () {
+	        Tone.prototype.dispose.call(this);
+	        this.Transport = null;
+	        this.callback = null;
+	        this.time = null;
+	        return this;
+	    };
+	    return Tone.TransportEvent;
+	});
+	Module(function (Tone) {
+	    /**
+		 *  @class Tone.TransportRepeatEvent is an internal class used by Tone.Transport
+		 *         to schedule repeat events. This class should not be instantiated directly.
+		 *  @extends {Tone.TransportEvent}
+		 *  @param {Object} options
+		 */
+	    Tone.TransportRepeatEvent = function (Transport, options) {
+	        Tone.TransportEvent.call(this, Transport, options);
+	        options = Tone.defaultArg(options, Tone.TransportRepeatEvent.defaults);
+	        /**
+			 * When the event should stop repeating
+			 * @type {Ticks}
+			 * @private
+			 */
+	        this.duration = Tone.Ticks(options.duration);
+	        /**
+			 * The interval of the repeated event
+			 * @type {Ticks}
+			 * @private
+			 */
+	        this._interval = Tone.Ticks(options.interval);
+	        /**
+			 * The ID of the current timeline event
+			 * @type {Number}
+			 * @private
+			 */
+	        this._currentId = -1;
+	        /**
+			 * The ID of the next timeline event
+			 * @type {Number}
+			 * @private
+			 */
+	        this._nextId = -1;
+	        /**
+			  * The time of the next event
+			  * @type {Ticks}
+			  * @private
+			  */
+	        this._nextTick = this.time;
+	        /**
+			 * a reference to the bound start method
+			 * @type {Function}
+			 * @private
+			 */
+	        this._boundRestart = this._restart.bind(this);
+	        this.Transport.on('start loopStart', this._boundRestart);
+	        this._restart();
+	    };
+	    Tone.extend(Tone.TransportRepeatEvent, Tone.TransportEvent);
+	    /**
+		 * The defaults
+		 * @static
+		 * @type {Object}
+		 */
+	    Tone.TransportRepeatEvent.defaults = {
+	        'duration': Infinity,
+	        'interval': 1
+	    };
+	    /**
+		 * Invoke the callback. Returns the tick time which
+		 * the next event should be scheduled at.
+		 * @param  {Number} time  The AudioContext time in seconds of the event
+		 */
+	    Tone.TransportRepeatEvent.prototype.invoke = function (time) {
+	        //create more events if necessary
+	        this._createEvents(time);
+	        //call the super class
+	        Tone.TransportEvent.prototype.invoke.call(this, time);
+	    };
+	    /**
+		 * Push more events onto the timeline to keep up with the position of the timeline
+		 * @private
+		 */
+	    Tone.TransportRepeatEvent.prototype._createEvents = function (time) {
+	        // schedule the next event
+	        var ticks = this.Transport.getTicksAtTime(time);
+	        if (ticks >= this.time && ticks >= this._nextTick && this._nextTick + this._interval < this.time + this.duration) {
+	            this._nextTick += this._interval;
+	            this._currentId = this._nextId;
+	            this._nextId = this.Transport.scheduleOnce(this.invoke.bind(this), Tone.Ticks(this._nextTick));
+	        }
+	    };
+	    /**
+		 * Push more events onto the timeline to keep up with the position of the timeline
+		 * @private
+		 */
+	    Tone.TransportRepeatEvent.prototype._restart = function (time) {
+	        this.Transport.clear(this._currentId);
+	        this.Transport.clear(this._nextId);
+	        this._nextTick = this.time;
+	        var ticks = this.Transport.getTicksAtTime(time);
+	        if (ticks > this.time) {
+	            this._nextTick = this.time + Math.ceil((ticks - this.time) / this._interval) * this._interval;
+	        }
+	        this._currentId = this.Transport.scheduleOnce(this.invoke.bind(this), Tone.Ticks(this._nextTick));
+	        this._nextTick += this._interval;
+	        this._nextId = this.Transport.scheduleOnce(this.invoke.bind(this), Tone.Ticks(this._nextTick));
+	    };
+	    /**
+		 * Clean up
+		 * @return {Tone.TransportRepeatEvent} this
+		 */
+	    Tone.TransportRepeatEvent.prototype.dispose = function () {
+	        this.Transport.clear(this._currentId);
+	        this.Transport.clear(this._nextId);
+	        this.Transport.off('start loopStart', this._boundRestart);
+	        this._boundCreateEvents = null;
+	        Tone.TransportEvent.prototype.dispose.call(this);
+	        this.duration = null;
+	        this._interval = null;
+	        return this;
+	    };
+	    return Tone.TransportRepeatEvent;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Transport for timing musical events.
+		 *          Supports tempo curves and time changes. Unlike browser-based timing (setInterval, requestAnimationFrame)
+		 *          Tone.Transport timing events pass in the exact time of the scheduled event
+		 *          in the argument of the callback function. Pass that time value to the object
+		 *          you're scheduling. <br><br>
+		 *          A single transport is created for you when the library is initialized.
+		 *          <br><br>
+		 *          The transport emits the events: "start", "stop", "pause", and "loop" which are
+		 *          called with the time of that event as the argument.
+		 *
+		 *  @extends {Tone.Emitter}
+		 *  @singleton
+		 *  @example
+		 * //repeated event every 8th note
+		 * Tone.Transport.scheduleRepeat(function(time){
+		 * 	//do something with the time
+		 * }, "8n");
+		 *  @example
+		 * //schedule an event on the 16th measure
+		 * Tone.Transport.schedule(function(time){
+		 * 	//do something with the time
+		 * }, "16:0:0");
+		 */
+	    Tone.Transport = function () {
+	        Tone.Emitter.call(this);
+	        Tone.getContext(function () {
+	            ///////////////////////////////////////////////////////////////////////
+	            //	LOOPING
+	            //////////////////////////////////////////////////////////////////////
+	            /**
+				 * 	If the transport loops or not.
+				 *  @type {boolean}
+				 */
+	            this.loop = false;
+	            /**
+				 * 	The loop start position in ticks
+				 *  @type {Ticks}
+				 *  @private
+				 */
+	            this._loopStart = 0;
+	            /**
+				 * 	The loop end position in ticks
+				 *  @type {Ticks}
+				 *  @private
+				 */
+	            this._loopEnd = 0;
+	            ///////////////////////////////////////////////////////////////////////
+	            //	CLOCK/TEMPO
+	            //////////////////////////////////////////////////////////////////////
+	            /**
+				 *  Pulses per quarter is the number of ticks per quarter note.
+				 *  @private
+				 *  @type  {Number}
+				 */
+	            this._ppq = TransportConstructor.defaults.PPQ;
+	            /**
+				 *  watches the main oscillator for timing ticks
+				 *  initially starts at 120bpm
+				 *  @private
+				 *  @type {Tone.Clock}
+				 */
+	            this._clock = new Tone.Clock({
+	                'callback': this._processTick.bind(this),
+	                'frequency': 0
+	            });
+	            this._bindClockEvents();
+	            /**
+				 *  The Beats Per Minute of the Transport.
+				 *  @type {BPM}
+				 *  @signal
+				 *  @example
+				 * Tone.Transport.bpm.value = 80;
+				 * //ramp the bpm to 120 over 10 seconds
+				 * Tone.Transport.bpm.rampTo(120, 10);
+				 */
+	            this.bpm = this._clock.frequency;
+	            this.bpm._toUnits = this._toUnits.bind(this);
+	            this.bpm._fromUnits = this._fromUnits.bind(this);
+	            this.bpm.units = Tone.Type.BPM;
+	            this.bpm.value = TransportConstructor.defaults.bpm;
+	            this._readOnly('bpm');
+	            /**
+				 *  The time signature, or more accurately the numerator
+				 *  of the time signature over a denominator of 4.
+				 *  @type {Number}
+				 *  @private
+				 */
+	            this._timeSignature = TransportConstructor.defaults.timeSignature;
+	            ///////////////////////////////////////////////////////////////////////
+	            //	TIMELINE EVENTS
+	            //////////////////////////////////////////////////////////////////////
+	            /**
+				 *  All the events in an object to keep track by ID
+				 *  @type {Object}
+				 *  @private
+				 */
+	            this._scheduledEvents = {};
+	            /**
+				 * 	The scheduled events.
+				 *  @type {Tone.Timeline}
+				 *  @private
+				 */
+	            this._timeline = new Tone.Timeline();
+	            /**
+				 *  Repeated events
+				 *  @type {Array}
+				 *  @private
+				 */
+	            this._repeatedEvents = new Tone.IntervalTimeline();
+	            /**
+				 *  All of the synced Signals
+				 *  @private
+				 *  @type {Array}
+				 */
+	            this._syncedSignals = [];
+	            ///////////////////////////////////////////////////////////////////////
+	            //	SWING
+	            //////////////////////////////////////////////////////////////////////
+	            /**
+				 *  The subdivision of the swing
+				 *  @type  {Ticks}
+				 *  @private
+				 */
+	            this._swingTicks = TransportConstructor.defaults.PPQ / 2;
+	            //8n
+	            /**
+				 *  The swing amount
+				 *  @type {NormalRange}
+				 *  @private
+				 */
+	            this._swingAmount = 0;
+	        }.bind(this));
+	    };
+	    Tone.extend(Tone.Transport, Tone.Emitter);
+	    /**
+		 *  the defaults
+		 *  @type {Object}
+		 *  @const
+		 *  @static
+		 */
+	    Tone.Transport.defaults = {
+	        'bpm': 120,
+	        'swing': 0,
+	        'swingSubdivision': '8n',
+	        'timeSignature': 4,
+	        'loopStart': 0,
+	        'loopEnd': '4m',
+	        'PPQ': 192
+	    };
+	    ///////////////////////////////////////////////////////////////////////////////
+	    //	TICKS
+	    ///////////////////////////////////////////////////////////////////////////////
+	    /**
+		 *  called on every tick
+		 *  @param   {number} tickTime clock relative tick time
+		 *  @private
+		 */
+	    Tone.Transport.prototype._processTick = function (tickTime, ticks) {
+	        //handle swing
+	        if (this._swingAmount > 0 && ticks % this._ppq !== 0 && //not on a downbeat
+	            ticks % (this._swingTicks * 2) !== 0) {
+	            //add some swing
+	            var progress = ticks % (this._swingTicks * 2) / (this._swingTicks * 2);
+	            var amount = Math.sin(progress * Math.PI) * this._swingAmount;
+	            tickTime += Tone.Ticks(this._swingTicks * 2 / 3).toSeconds() * amount;
+	        }
+	        //do the loop test
+	        if (this.loop) {
+	            if (ticks >= this._loopEnd) {
+	                this.emit('loopEnd', tickTime);
+	                this._clock.setTicksAtTime(this._loopStart, tickTime);
+	                ticks = this._loopStart;
+	                this.emit('loopStart', tickTime, this._clock.getSecondsAtTime(tickTime));
+	                this.emit('loop', tickTime);
+	            }
+	        }
+	        //invoke the timeline events scheduled on this tick
+	        this._timeline.forEachAtTime(ticks, function (event) {
+	            event.invoke(tickTime);
+	        });
+	    };
+	    ///////////////////////////////////////////////////////////////////////////////
+	    //	SCHEDULABLE EVENTS
+	    ///////////////////////////////////////////////////////////////////////////////
+	    /**
+		 *  Schedule an event along the timeline.
+		 *  @param {Function} callback The callback to be invoked at the time.
+		 *  @param {TransportTime}  time The time to invoke the callback at.
+		 *  @return {Number} The id of the event which can be used for canceling the event.
+		 *  @example
+		 * //trigger the callback when the Transport reaches the desired time
+		 * Tone.Transport.schedule(function(time){
+		 * 	envelope.triggerAttack(time);
+		 * }, "128i");
+		 */
+	    Tone.Transport.prototype.schedule = function (callback, time) {
+	        var event = new Tone.TransportEvent(this, {
+	            'time': Tone.TransportTime(time),
+	            'callback': callback
+	        });
+	        return this._addEvent(event, this._timeline);
+	    };
+	    /**
+		 *  Schedule a repeated event along the timeline. The event will fire
+		 *  at the `interval` starting at the `startTime` and for the specified
+		 *  `duration`.
+		 *  @param  {Function}  callback   The callback to invoke.
+		 *  @param  {Time}    interval   The duration between successive
+		 *                               callbacks. Must be a positive number.
+		 *  @param  {TransportTime=}    startTime  When along the timeline the events should
+		 *                               start being invoked.
+		 *  @param {Time} [duration=Infinity] How long the event should repeat.
+		 *  @return  {Number}    The ID of the scheduled event. Use this to cancel
+		 *                           the event.
+		 *  @example
+		 * //a callback invoked every eighth note after the first measure
+		 * Tone.Transport.scheduleRepeat(callback, "8n", "1m");
+		 */
+	    Tone.Transport.prototype.scheduleRepeat = function (callback, interval, startTime, duration) {
+	        var event = new Tone.TransportRepeatEvent(this, {
+	            'callback': callback,
+	            'interval': Tone.Time(interval),
+	            'time': Tone.TransportTime(startTime),
+	            'duration': Tone.Time(Tone.defaultArg(duration, Infinity))
+	        });
+	        //kick it off if the Transport is started
+	        return this._addEvent(event, this._repeatedEvents);
+	    };
+	    /**
+		 *  Schedule an event that will be removed after it is invoked.
+		 *  Note that if the given time is less than the current transport time,
+		 *  the event will be invoked immediately.
+		 *  @param {Function} callback The callback to invoke once.
+		 *  @param {TransportTime} time The time the callback should be invoked.
+		 *  @returns {Number} The ID of the scheduled event.
+		 */
+	    Tone.Transport.prototype.scheduleOnce = function (callback, time) {
+	        var event = new Tone.TransportEvent(this, {
+	            'time': Tone.TransportTime(time),
+	            'callback': callback,
+	            'once': true
+	        });
+	        return this._addEvent(event, this._timeline);
+	    };
+	    /**
+		 *  Clear the passed in event id from the timeline
+		 *  @param {Number} eventId The id of the event.
+		 *  @returns {Tone.Transport} this
+		 */
+	    Tone.Transport.prototype.clear = function (eventId) {
+	        if (this._scheduledEvents.hasOwnProperty(eventId)) {
+	            var item = this._scheduledEvents[eventId.toString()];
+	            item.timeline.remove(item.event);
+	            item.event.dispose();
+	            delete this._scheduledEvents[eventId.toString()];
+	        }
+	        return this;
+	    };
+	    /**
+		 * Add an event to the correct timeline. Keep track of the
+		 * timeline it was added to.
+		 * @param {Tone.TransportEvent}	event
+		 * @param {Tone.Timeline} timeline
+		 * @returns {Number} the event id which was just added
+		 * @private
+		 */
+	    Tone.Transport.prototype._addEvent = function (event, timeline) {
+	        this._scheduledEvents[event.id.toString()] = {
+	            'event': event,
+	            'timeline': timeline
+	        };
+	        timeline.add(event);
+	        return event.id;
+	    };
+	    /**
+		 *  Remove scheduled events from the timeline after
+		 *  the given time. Repeated events will be removed
+		 *  if their startTime is after the given time
+		 *  @param {TransportTime} [after=0] Clear all events after
+		 *                          this time.
+		 *  @returns {Tone.Transport} this
+		 */
+	    Tone.Transport.prototype.cancel = function (after) {
+	        after = Tone.defaultArg(after, 0);
+	        after = this.toTicks(after);
+	        this._timeline.forEachFrom(after, function (event) {
+	            this.clear(event.id);
+	        }.bind(this));
+	        this._repeatedEvents.forEachFrom(after, function (event) {
+	            this.clear(event.id);
+	        }.bind(this));
+	        return this;
+	    };
+	    ///////////////////////////////////////////////////////////////////////////////
+	    //	START/STOP/PAUSE
+	    ///////////////////////////////////////////////////////////////////////////////
+	    /**
+		 *  Bind start/stop/pause events from the clock and emit them.
+		 *  @private
+		 */
+	    Tone.Transport.prototype._bindClockEvents = function () {
+	        this._clock.on('start', function (time, offset) {
+	            offset = Tone.Ticks(offset).toSeconds();
+	            this.emit('start', time, offset);
+	        }.bind(this));
+	        this._clock.on('stop', function (time) {
+	            this.emit('stop', time);
+	        }.bind(this));
+	        this._clock.on('pause', function (time) {
+	            this.emit('pause', time);
+	        }.bind(this));
+	    };
+	    /**
+		 *  Returns the playback state of the source, either "started", "stopped", or "paused"
+		 *  @type {Tone.State}
+		 *  @readOnly
+		 *  @memberOf Tone.Transport#
+		 *  @name state
+		 */
+	    Object.defineProperty(Tone.Transport.prototype, 'state', {
+	        get: function () {
+	            return this._clock.getStateAtTime(this.now());
+	        }
+	    });
+	    /**
+		 *  Start the transport and all sources synced to the transport.
+		 *  @param  {Time} [time=now] The time when the transport should start.
+		 *  @param  {TransportTime=} offset The timeline offset to start the transport.
+		 *  @returns {Tone.Transport} this
+		 *  @example
+		 * //start the transport in one second starting at beginning of the 5th measure.
+		 * Tone.Transport.start("+1", "4:0:0");
+		 */
+	    Tone.Transport.prototype.start = function (time, offset) {
+	        //start the clock
+	        if (Tone.isDefined(offset)) {
+	            offset = this.toTicks(offset);
+	        }
+	        this._clock.start(time, offset);
+	        return this;
+	    };
+	    /**
+		 *  Stop the transport and all sources synced to the transport.
+		 *  @param  {Time} [time=now] The time when the transport should stop.
+		 *  @returns {Tone.Transport} this
+		 *  @example
+		 * Tone.Transport.stop();
+		 */
+	    Tone.Transport.prototype.stop = function (time) {
+	        this._clock.stop(time);
+	        return this;
+	    };
+	    /**
+		 *  Pause the transport and all sources synced to the transport.
+		 *  @param  {Time} [time=now]
+		 *  @returns {Tone.Transport} this
+		 */
+	    Tone.Transport.prototype.pause = function (time) {
+	        this._clock.pause(time);
+	        return this;
+	    };
+	    /**
+		 * Toggle the current state of the transport. If it is
+		 * started, it will stop it, otherwise it will start the Transport.
+		 * @param  {Time=} time The time of the event
+		 * @return {Tone.Transport}      this
+		 */
+	    Tone.Transport.prototype.toggle = function (time) {
+	        time = this.toSeconds(time);
+	        if (this._clock.getStateAtTime(time) !== Tone.State.Started) {
+	            this.start(time);
+	        } else {
+	            this.stop(time);
+	        }
+	        return this;
+	    };
+	    ///////////////////////////////////////////////////////////////////////////////
+	    //	SETTERS/GETTERS
+	    ///////////////////////////////////////////////////////////////////////////////
+	    /**
+		 *  The time signature as just the numerator over 4.
+		 *  For example 4/4 would be just 4 and 6/8 would be 3.
+		 *  @memberOf Tone.Transport#
+		 *  @type {Number|Array}
+		 *  @name timeSignature
+		 *  @example
+		 * //common time
+		 * Tone.Transport.timeSignature = 4;
+		 * // 7/8
+		 * Tone.Transport.timeSignature = [7, 8];
+		 * //this will be reduced to a single number
+		 * Tone.Transport.timeSignature; //returns 3.5
+		 */
+	    Object.defineProperty(Tone.Transport.prototype, 'timeSignature', {
+	        get: function () {
+	            return this._timeSignature;
+	        },
+	        set: function (timeSig) {
+	            if (Tone.isArray(timeSig)) {
+	                timeSig = timeSig[0] / timeSig[1] * 4;
+	            }
+	            this._timeSignature = timeSig;
+	        }
+	    });
+	    /**
+		 * When the Tone.Transport.loop = true, this is the starting position of the loop.
+		 * @memberOf Tone.Transport#
+		 * @type {Time}
+		 * @name loopStart
+		 */
+	    Object.defineProperty(Tone.Transport.prototype, 'loopStart', {
+	        get: function () {
+	            return Tone.Ticks(this._loopStart).toSeconds();
+	        },
+	        set: function (startPosition) {
+	            this._loopStart = this.toTicks(startPosition);
+	        }
+	    });
+	    /**
+		 * When the Tone.Transport.loop = true, this is the ending position of the loop.
+		 * @memberOf Tone.Transport#
+		 * @type {Time}
+		 * @name loopEnd
+		 */
+	    Object.defineProperty(Tone.Transport.prototype, 'loopEnd', {
+	        get: function () {
+	            return Tone.Ticks(this._loopEnd).toSeconds();
+	        },
+	        set: function (endPosition) {
+	            this._loopEnd = this.toTicks(endPosition);
+	        }
+	    });
+	    /**
+		 *  Set the loop start and stop at the same time.
+		 *  @param {TransportTime} startPosition
+		 *  @param {TransportTime} endPosition
+		 *  @returns {Tone.Transport} this
+		 *  @example
+		 * //loop over the first measure
+		 * Tone.Transport.setLoopPoints(0, "1m");
+		 * Tone.Transport.loop = true;
+		 */
+	    Tone.Transport.prototype.setLoopPoints = function (startPosition, endPosition) {
+	        this.loopStart = startPosition;
+	        this.loopEnd = endPosition;
+	        return this;
+	    };
+	    /**
+		 *  The swing value. Between 0-1 where 1 equal to
+		 *  the note + half the subdivision.
+		 *  @memberOf Tone.Transport#
+		 *  @type {NormalRange}
+		 *  @name swing
+		 */
+	    Object.defineProperty(Tone.Transport.prototype, 'swing', {
+	        get: function () {
+	            return this._swingAmount;
+	        },
+	        set: function (amount) {
+	            //scale the values to a normal range
+	            this._swingAmount = amount;
+	        }
+	    });
+	    /**
+		 *  Set the subdivision which the swing will be applied to.
+		 *  The default value is an 8th note. Value must be less
+		 *  than a quarter note.
+		 *
+		 *  @memberOf Tone.Transport#
+		 *  @type {Time}
+		 *  @name swingSubdivision
+		 */
+	    Object.defineProperty(Tone.Transport.prototype, 'swingSubdivision', {
+	        get: function () {
+	            return Tone.Ticks(this._swingTicks).toNotation();
+	        },
+	        set: function (subdivision) {
+	            this._swingTicks = this.toTicks(subdivision);
+	        }
+	    });
+	    /**
+		 *  The Transport's position in Bars:Beats:Sixteenths.
+		 *  Setting the value will jump to that position right away.
+		 *  @memberOf Tone.Transport#
+		 *  @type {BarsBeatsSixteenths}
+		 *  @name position
+		 */
+	    Object.defineProperty(Tone.Transport.prototype, 'position', {
+	        get: function () {
+	            var now = this.now();
+	            var ticks = this._clock.getTicksAtTime(now);
+	            return Tone.Ticks(ticks).toBarsBeatsSixteenths();
+	        },
+	        set: function (progress) {
+	            var ticks = this.toTicks(progress);
+	            this.ticks = ticks;
+	        }
+	    });
+	    /**
+		 *  The Transport's position in seconds
+		 *  Setting the value will jump to that position right away.
+		 *  @memberOf Tone.Transport#
+		 *  @type {Seconds}
+		 *  @name seconds
+		 */
+	    Object.defineProperty(Tone.Transport.prototype, 'seconds', {
+	        get: function () {
+	            return this._clock.seconds;
+	        },
+	        set: function (s) {
+	            var now = this.now();
+	            var ticks = this.bpm.timeToTicks(s, now);
+	            this.ticks = ticks;
+	        }
+	    });
+	    /**
+		 *  The Transport's loop position as a normalized value. Always
+		 *  returns 0 if the transport if loop is not true.
+		 *  @memberOf Tone.Transport#
+		 *  @name progress
+		 *  @type {NormalRange}
+		 */
+	    Object.defineProperty(Tone.Transport.prototype, 'progress', {
+	        get: function () {
+	            if (this.loop) {
+	                var now = this.now();
+	                var ticks = this._clock.getTicksAtTime(now);
+	                return (ticks - this._loopStart) / (this._loopEnd - this._loopStart);
+	            } else {
+	                return 0;
+	            }
+	        }
+	    });
+	    /**
+		 *  The transports current tick position.
+		 *
+		 *  @memberOf Tone.Transport#
+		 *  @type {Ticks}
+		 *  @name ticks
+		 */
+	    Object.defineProperty(Tone.Transport.prototype, 'ticks', {
+	        get: function () {
+	            return this._clock.ticks;
+	        },
+	        set: function (t) {
+	            if (this._clock.ticks !== t) {
+	                var now = this.now();
+	                //stop everything synced to the transport
+	                if (this.state === Tone.State.Started) {
+	                    this.emit('stop', now);
+	                    this._clock.setTicksAtTime(t, now);
+	                    //restart it with the new time
+	                    this.emit('start', now, this.seconds);
+	                } else {
+	                    this._clock.setTicksAtTime(t, now);
+	                }
+	            }
+	        }
+	    });
+	    /**
+		 * Get the clock's ticks at the given time.
+		 * @param  {Time} time  When to get the tick value
+		 * @return {Ticks}       The tick value at the given time.
+		 */
+	    Tone.Transport.prototype.getTicksAtTime = function (time) {
+	        return Math.round(this._clock.getTicksAtTime(time));
+	    };
+	    /**
+		 *  Return the elapsed seconds at the given time.
+		 *  @param  {Time}  time  When to get the elapsed seconds
+		 *  @return  {Seconds}  The number of elapsed seconds
+		 */
+	    Tone.Transport.prototype.getSecondsAtTime = function (time) {
+	        return this._clock.getSecondsAtTime(time);
+	    };
+	    /**
+		 *  Pulses Per Quarter note. This is the smallest resolution
+		 *  the Transport timing supports. This should be set once
+		 *  on initialization and not set again. Changing this value
+		 *  after other objects have been created can cause problems.
+		 *
+		 *  @memberOf Tone.Transport#
+		 *  @type {Number}
+		 *  @name PPQ
+		 */
+	    Object.defineProperty(Tone.Transport.prototype, 'PPQ', {
+	        get: function () {
+	            return this._ppq;
+	        },
+	        set: function (ppq) {
+	            var bpm = this.bpm.value;
+	            this._ppq = ppq;
+	            this.bpm.value = bpm;
+	        }
+	    });
+	    /**
+		 *  Convert from BPM to frequency (factoring in PPQ)
+		 *  @param  {BPM}  bpm The BPM value to convert to frequency
+		 *  @return  {Frequency}  The BPM as a frequency with PPQ factored in.
+		 *  @private
+		 */
+	    Tone.Transport.prototype._fromUnits = function (bpm) {
+	        return 1 / (60 / bpm / this.PPQ);
+	    };
+	    /**
+		 *  Convert from frequency (with PPQ) into BPM
+		 *  @param  {Frequency}  freq The clocks frequency to convert to BPM
+		 *  @return  {BPM}  The frequency value as BPM.
+		 *  @private
+		 */
+	    Tone.Transport.prototype._toUnits = function (freq) {
+	        return freq / this.PPQ * 60;
+	    };
+	    ///////////////////////////////////////////////////////////////////////////////
+	    //	SYNCING
+	    ///////////////////////////////////////////////////////////////////////////////
+	    /**
+		 *  Returns the time aligned to the next subdivision
+		 *  of the Transport. If the Transport is not started,
+		 *  it will return 0.
+		 *  Note: this will not work precisely during tempo ramps.
+		 *  @param  {Time}  subdivision  The subdivision to quantize to
+		 *  @return  {Number}  The context time of the next subdivision.
+		 *  @example
+		 * Tone.Transport.start(); //the transport must be started
+		 * Tone.Transport.nextSubdivision("4n");
+		 */
+	    Tone.Transport.prototype.nextSubdivision = function (subdivision) {
+	        subdivision = this.toTicks(subdivision);
+	        if (this.state !== Tone.State.Started) {
+	            //if the transport's not started, return 0
+	            return 0;
+	        } else {
+	            var now = this.now();
+	            //the remainder of the current ticks and the subdivision
+	            var transportPos = this.getTicksAtTime(now);
+	            var remainingTicks = subdivision - transportPos % subdivision;
+	            return this._clock.nextTickTime(remainingTicks, now);
+	        }
+	    };
+	    /**
+		 *  Attaches the signal to the tempo control signal so that
+		 *  any changes in the tempo will change the signal in the same
+		 *  ratio.
+		 *
+		 *  @param  {Tone.Signal} signal
+		 *  @param {number=} ratio Optionally pass in the ratio between
+		 *                         the two signals. Otherwise it will be computed
+		 *                         based on their current values.
+		 *  @returns {Tone.Transport} this
+		 */
+	    Tone.Transport.prototype.syncSignal = function (signal, ratio) {
+	        if (!ratio) {
+	            //get the sync ratio
+	            var now = this.now();
+	            if (signal.getValueAtTime(now) !== 0) {
+	                ratio = signal.getValueAtTime(now) / this.bpm.getValueAtTime(now);
+	            } else {
+	                ratio = 0;
+	            }
+	        }
+	        var ratioSignal = new Tone.Gain(ratio);
+	        this.bpm.chain(ratioSignal, signal._param);
+	        this._syncedSignals.push({
+	            'ratio': ratioSignal,
+	            'signal': signal,
+	            'initial': signal.value
+	        });
+	        signal.value = 0;
+	        return this;
+	    };
+	    /**
+		 *  Unsyncs a previously synced signal from the transport's control.
+		 *  See Tone.Transport.syncSignal.
+		 *  @param  {Tone.Signal} signal
+		 *  @returns {Tone.Transport} this
+		 */
+	    Tone.Transport.prototype.unsyncSignal = function (signal) {
+	        for (var i = this._syncedSignals.length - 1; i >= 0; i--) {
+	            var syncedSignal = this._syncedSignals[i];
+	            if (syncedSignal.signal === signal) {
+	                syncedSignal.ratio.dispose();
+	                syncedSignal.signal.value = syncedSignal.initial;
+	                this._syncedSignals.splice(i, 1);
+	            }
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.Transport} this
+		 *  @private
+		 */
+	    Tone.Transport.prototype.dispose = function () {
+	        Tone.Emitter.prototype.dispose.call(this);
+	        this._clock.dispose();
+	        this._clock = null;
+	        this._writable('bpm');
+	        this.bpm = null;
+	        this._timeline.dispose();
+	        this._timeline = null;
+	        this._repeatedEvents.dispose();
+	        this._repeatedEvents = null;
+	        return this;
+	    };
+	    ///////////////////////////////////////////////////////////////////////////////
+	    //	INITIALIZATION
+	    ///////////////////////////////////////////////////////////////////////////////
+	    var TransportConstructor = Tone.Transport;
+	    Tone.Transport = new TransportConstructor();
+	    Tone.Context.on('init', function (context) {
+	        if (context.Transport instanceof TransportConstructor) {
+	            Tone.Transport = context.Transport;
+	        } else {
+	            Tone.Transport = new TransportConstructor();
+	        }
+	        //store the Transport on the context so it can be retrieved later
+	        context.Transport = Tone.Transport;
+	    });
+	    Tone.Context.on('close', function (context) {
+	        if (context.Transport instanceof TransportConstructor) {
+	            context.Transport.dispose();
+	        }
+	    });
+	    return Tone.Transport;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.Volume is a simple volume node, useful for creating a volume fader.
+		 *
+		 *  @extends {Tone.AudioNode}
+		 *  @constructor
+		 *  @param {Decibels} [volume=0] the initial volume
+		 *  @example
+		 * var vol = new Tone.Volume(-12);
+		 * instrument.chain(vol, Tone.Master);
+		 */
+	    Tone.Volume = function () {
+	        var options = Tone.defaults(arguments, ['volume'], Tone.Volume);
+	        Tone.AudioNode.call(this);
+	        /**
+			 * the output node
+			 * @type {GainNode}
+			 * @private
+			 */
+	        this.output = this.input = new Tone.Gain(options.volume, Tone.Type.Decibels);
+	        /**
+			 * The unmuted volume
+			 * @type {Decibels}
+			 * @private
+			 */
+	        this._unmutedVolume = options.volume;
+	        /**
+			 *  The volume control in decibels.
+			 *  @type {Decibels}
+			 *  @signal
+			 */
+	        this.volume = this.output.gain;
+	        this._readOnly('volume');
+	        //set the mute initially
+	        this.mute = options.mute;
+	    };
+	    Tone.extend(Tone.Volume, Tone.AudioNode);
+	    /**
+		 *  Defaults
+		 *  @type  {Object}
+		 *  @const
+		 *  @static
+		 */
+	    Tone.Volume.defaults = {
+	        'volume': 0,
+	        'mute': false
+	    };
+	    /**
+		 * Mute the output.
+		 * @memberOf Tone.Volume#
+		 * @type {boolean}
+		 * @name mute
+		 * @example
+		 * //mute the output
+		 * volume.mute = true;
+		 */
+	    Object.defineProperty(Tone.Volume.prototype, 'mute', {
+	        get: function () {
+	            return this.volume.value === -Infinity;
+	        },
+	        set: function (mute) {
+	            if (!this.mute && mute) {
+	                this._unmutedVolume = this.volume.value;
+	                //maybe it should ramp here?
+	                this.volume.value = -Infinity;
+	            } else if (this.mute && !mute) {
+	                this.volume.value = this._unmutedVolume;
+	            }
+	        }
+	    });
+	    /**
+		 *  clean up
+		 *  @returns {Tone.Volume} this
+		 */
+	    Tone.Volume.prototype.dispose = function () {
+	        this.input.dispose();
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._writable('volume');
+	        this.volume.dispose();
+	        this.volume = null;
+	        return this;
+	    };
+	    return Tone.Volume;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  A single master output which is connected to the
+		 *          AudioDestinationNode (aka your speakers).
+		 *          It provides useful conveniences such as the ability
+		 *          to set the volume and mute the entire application.
+		 *          It also gives you the ability to apply master effects to your application.
+		 *          <br><br>
+		 *          Like Tone.Transport, A single Tone.Master is created
+		 *          on initialization and you do not need to explicitly construct one.
+		 *
+		 *  @constructor
+		 *  @extends {Tone}
+		 *  @singleton
+		 *  @example
+		 * //the audio will go from the oscillator to the speakers
+		 * oscillator.connect(Tone.Master);
+		 * //a convenience for connecting to the master output is also provided:
+		 * oscillator.toMaster();
+		 * //the above two examples are equivalent.
+		 */
+	    Tone.Master = function () {
+	        Tone.AudioNode.call(this);
+	        Tone.getContext(function () {
+	            this.createInsOuts(1, 0);
+	            /**
+				 *  The private volume node
+				 *  @type  {Tone.Volume}
+				 *  @private
+				 */
+	            this._volume = this.output = new Tone.Volume();
+	            /**
+				 * The volume of the master output.
+				 * @type {Decibels}
+				 * @signal
+				 */
+	            this.volume = this._volume.volume;
+	            this._readOnly('volume');
+	            //connections
+	            this.input.chain(this.output, this.context.destination);
+	        }.bind(this));
+	    };
+	    Tone.extend(Tone.Master, Tone.AudioNode);
+	    /**
+		 *  @type {Object}
+		 *  @const
+		 */
+	    Tone.Master.defaults = {
+	        'volume': 0,
+	        'mute': false
+	    };
+	    /**
+		 * Mute the output.
+		 * @memberOf Tone.Master#
+		 * @type {boolean}
+		 * @name mute
+		 * @example
+		 * //mute the output
+		 * Tone.Master.mute = true;
+		 */
+	    Object.defineProperty(Tone.Master.prototype, 'mute', {
+	        get: function () {
+	            return this._volume.mute;
+	        },
+	        set: function (mute) {
+	            this._volume.mute = mute;
+	        }
+	    });
+	    /**
+		 *  Add a master effects chain. NOTE: this will disconnect any nodes which were previously
+		 *  chained in the master effects chain.
+		 *  @param {AudioNode|Tone} args... All arguments will be connected in a row
+		 *                                  and the Master will be routed through it.
+		 *  @return  {Tone.Master}  this
+		 *  @example
+		 * //some overall compression to keep the levels in check
+		 * var masterCompressor = new Tone.Compressor({
+		 * 	"threshold" : -6,
+		 * 	"ratio" : 3,
+		 * 	"attack" : 0.5,
+		 * 	"release" : 0.1
+		 * });
+		 * //give a little boost to the lows
+		 * var lowBump = new Tone.Filter(200, "lowshelf");
+		 * //route everything through the filter
+		 * //and compressor before going to the speakers
+		 * Tone.Master.chain(lowBump, masterCompressor);
+		 */
+	    Tone.Master.prototype.chain = function () {
+	        this.input.disconnect();
+	        this.input.chain.apply(this.input, arguments);
+	        arguments[arguments.length - 1].connect(this.output);
+	    };
+	    /**
+		 *  Clean up
+		 *  @return  {Tone.Master}  this
+		 */
+	    Tone.Master.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._writable('volume');
+	        this._volume.dispose();
+	        this._volume = null;
+	        this.volume = null;
+	    };
+	    ///////////////////////////////////////////////////////////////////////////
+	    //	AUGMENT TONE's PROTOTYPE
+	    ///////////////////////////////////////////////////////////////////////////
+	    /**
+		 *  Connect 'this' to the master output. Shorthand for this.connect(Tone.Master)
+		 *  @returns {Tone.AudioNode} this
+		 *  @example
+		 * //connect an oscillator to the master output
+		 * var osc = new Tone.Oscillator().toMaster();
+		 */
+	    Tone.AudioNode.prototype.toMaster = function () {
+	        this.connect(Tone.Master);
+	        return this;
+	    };
+	    if (window.AudioNode) {
+	        // Also augment AudioNode's prototype to include toMaster as a convenience
+	        AudioNode.prototype.toMaster = function () {
+	            this.connect(Tone.Master);
+	            return this;
+	        };
+	    }
+	    /**
+		 *  initialize the module and listen for new audio contexts
+		 */
+	    var MasterConstructor = Tone.Master;
+	    Tone.Master = new MasterConstructor();
+	    Tone.Context.on('init', function (context) {
+	        // if it already exists, just restore it
+	        if (context.Master instanceof MasterConstructor) {
+	            Tone.Master = context.Master;
+	        } else {
+	            Tone.Master = new MasterConstructor();
+	        }
+	        context.Master = Tone.Master;
+	    });
+	    Tone.Context.on('close', function (context) {
+	        if (context.Master instanceof MasterConstructor) {
+	            context.Master.dispose();
+	        }
+	    });
+	    return Tone.Master;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Base class for sources. Sources have start/stop methods
+		 *          and the ability to be synced to the
+		 *          start/stop of Tone.Transport.
+		 *
+		 *  @constructor
+		 *  @extends {Tone.AudioNode}
+		 *  @example
+		 * //Multiple state change events can be chained together,
+		 * //but must be set in the correct order and with ascending times
+		 *
+		 * // OK
+		 * state.start().stop("+0.2");
+		 * // AND
+		 * state.start().stop("+0.2").start("+0.4").stop("+0.7")
+		 *
+		 * // BAD
+		 * state.stop("+0.2").start();
+		 * // OR
+		 * state.start("+0.3").stop("+0.2");
+		 *
+		 */
+	    Tone.Source = function (options) {
+	        options = Tone.defaultArg(options, Tone.Source.defaults);
+	        Tone.AudioNode.call(this);
+	        /**
+			 *  The output volume node
+			 *  @type  {Tone.Volume}
+			 *  @private
+			 */
+	        this._volume = this.output = new Tone.Volume(options.volume);
+	        /**
+			 * The volume of the output in decibels.
+			 * @type {Decibels}
+			 * @signal
+			 * @example
+			 * source.volume.value = -6;
+			 */
+	        this.volume = this._volume.volume;
+	        this._readOnly('volume');
+	        /**
+			 * 	Keep track of the scheduled state.
+			 *  @type {Tone.TimelineState}
+			 *  @private
+			 */
+	        this._state = new Tone.TimelineState(Tone.State.Stopped);
+	        this._state.memory = 100;
+	        /**
+			 *  The synced `start` callback function from the transport
+			 *  @type {Function}
+			 *  @private
+			 */
+	        this._synced = false;
+	        /**
+			 *  Keep track of all of the scheduled event ids
+			 *  @type  {Array}
+			 *  @private
+			 */
+	        this._scheduled = [];
+	        //make the output explicitly stereo
+	        this._volume.output.output.channelCount = 2;
+	        this._volume.output.output.channelCountMode = 'explicit';
+	        //mute initially
+	        this.mute = options.mute;
+	    };
+	    Tone.extend(Tone.Source, Tone.AudioNode);
+	    /**
+		 *  The default parameters
+		 *  @static
+		 *  @const
+		 *  @type {Object}
+		 */
+	    Tone.Source.defaults = {
+	        'volume': 0,
+	        'mute': false
+	    };
+	    /**
+		 *  Returns the playback state of the source, either "started" or "stopped".
+		 *  @type {Tone.State}
+		 *  @readOnly
+		 *  @memberOf Tone.Source#
+		 *  @name state
+		 */
+	    Object.defineProperty(Tone.Source.prototype, 'state', {
+	        get: function () {
+	            if (this._synced) {
+	                if (Tone.Transport.state === Tone.State.Started) {
+	                    return this._state.getValueAtTime(Tone.Transport.seconds);
+	                } else {
+	                    return Tone.State.Stopped;
+	                }
+	            } else {
+	                return this._state.getValueAtTime(this.now());
+	            }
+	        }
+	    });
+	    /**
+		 * Mute the output.
+		 * @memberOf Tone.Source#
+		 * @type {boolean}
+		 * @name mute
+		 * @example
+		 * //mute the output
+		 * source.mute = true;
+		 */
+	    Object.defineProperty(Tone.Source.prototype, 'mute', {
+	        get: function () {
+	            return this._volume.mute;
+	        },
+	        set: function (mute) {
+	            this._volume.mute = mute;
+	        }
+	    });
+	    //overwrite these functions
+	    Tone.Source.prototype._start = Tone.noOp;
+	    Tone.Source.prototype.restart = Tone.noOp;
+	    Tone.Source.prototype._stop = Tone.noOp;
+	    /**
+		 *  Start the source at the specified time. If no time is given,
+		 *  start the source now.
+		 *  @param  {Time} [time=now] When the source should be started.
+		 *  @returns {Tone.Source} this
+		 *  @example
+		 * source.start("+0.5"); //starts the source 0.5 seconds from now
+		 */
+	    Tone.Source.prototype.start = function (time, offset, duration) {
+	        if (Tone.isUndef(time) && this._synced) {
+	            time = Tone.Transport.seconds;
+	        } else {
+	            time = this.toSeconds(time);
+	        }
+	        //if it's started, stop it and restart it
+	        if (this._state.getValueAtTime(time) === Tone.State.Started) {
+	            this._state.cancel(time);
+	            this._state.setStateAtTime(Tone.State.Started, time);
+	            this.restart(time, offset, duration);
+	        } else {
+	            this._state.setStateAtTime(Tone.State.Started, time);
+	            if (this._synced) {
+	                // add the offset time to the event
+	                var event = this._state.get(time);
+	                event.offset = Tone.defaultArg(offset, 0);
+	                event.duration = duration;
+	                var sched = Tone.Transport.schedule(function (t) {
+	                    this._start(t, offset, duration);
+	                }.bind(this), time);
+	                this._scheduled.push(sched);
+	                //if it's already started
+	                if (Tone.Transport.state === Tone.State.Started) {
+	                    this._syncedStart(this.now(), Tone.Transport.seconds);
+	                }
+	            } else {
+	                this._start.apply(this, arguments);
+	            }
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Stop the source at the specified time. If no time is given,
+		 *  stop the source now.
+		 *  @param  {Time} [time=now] When the source should be stopped.
+		 *  @returns {Tone.Source} this
+		 *  @example
+		 * source.stop(); // stops the source immediately
+		 */
+	    Tone.Source.prototype.stop = function (time) {
+	        if (Tone.isUndef(time) && this._synced) {
+	            time = Tone.Transport.seconds;
+	        } else {
+	            time = this.toSeconds(time);
+	        }
+	        if (!this._synced) {
+	            this._stop.apply(this, arguments);
+	        } else {
+	            var sched = Tone.Transport.schedule(this._stop.bind(this), time);
+	            this._scheduled.push(sched);
+	        }
+	        this._state.cancel(time);
+	        this._state.setStateAtTime(Tone.State.Stopped, time);
+	        return this;
+	    };
+	    /**
+		 *  Sync the source to the Transport so that all subsequent
+		 *  calls to `start` and `stop` are synced to the TransportTime
+		 *  instead of the AudioContext time.
+		 *
+		 *  @returns {Tone.Source} this
+		 *  @example
+		 * //sync the source so that it plays between 0 and 0.3 on the Transport's timeline
+		 * source.sync().start(0).stop(0.3);
+		 * //start the transport.
+		 * Tone.Transport.start();
+		 *
+		 *  @example
+		 * //start the transport with an offset and the sync'ed sources
+		 * //will start in the correct position
+		 * source.sync().start(0.1);
+		 * //the source will be invoked with an offset of 0.4
+		 * Tone.Transport.start("+0.5", 0.5);
+		 */
+	    Tone.Source.prototype.sync = function () {
+	        this._synced = true;
+	        this._syncedStart = function (time, offset) {
+	            if (offset > 0) {
+	                // get the playback state at that time
+	                var stateEvent = this._state.get(offset);
+	                // listen for start events which may occur in the middle of the sync'ed time
+	                if (stateEvent && stateEvent.state === Tone.State.Started && stateEvent.time !== offset) {
+	                    // get the offset
+	                    var startOffset = offset - this.toSeconds(stateEvent.time);
+	                    var duration;
+	                    if (stateEvent.duration) {
+	                        duration = this.toSeconds(stateEvent.duration) - startOffset;
+	                    }
+	                    this._start(time, this.toSeconds(stateEvent.offset) + startOffset, duration);
+	                }
+	            }
+	        }.bind(this);
+	        this._syncedStop = function (time) {
+	            var seconds = Tone.Transport.getSecondsAtTime(Math.max(time - this.sampleTime, 0));
+	            if (this._state.getValueAtTime(seconds) === Tone.State.Started) {
+	                this._stop(time);
+	            }
+	        }.bind(this);
+	        Tone.Transport.on('start loopStart', this._syncedStart);
+	        Tone.Transport.on('stop pause loopEnd', this._syncedStop);
+	        return this;
+	    };
+	    /**
+		 *  Unsync the source to the Transport. See Tone.Source.sync
+		 *  @returns {Tone.Source} this
+		 */
+	    Tone.Source.prototype.unsync = function () {
+	        if (this._synced) {
+	            Tone.Transport.off('stop pause loopEnd', this._syncedStop);
+	            Tone.Transport.off('start loopStart', this._syncedStart);
+	        }
+	        this._synced = false;
+	        // clear all of the scheduled ids
+	        for (var i = 0; i < this._scheduled.length; i++) {
+	            var id = this._scheduled[i];
+	            Tone.Transport.clear(id);
+	        }
+	        this._scheduled = [];
+	        this._state.cancel(0);
+	        return this;
+	    };
+	    /**
+		 *	Clean up.
+		 *  @return {Tone.Source} this
+		 */
+	    Tone.Source.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this.unsync();
+	        this._scheduled = null;
+	        this._writable('volume');
+	        this._volume.dispose();
+	        this._volume = null;
+	        this.volume = null;
+	        this._state.dispose();
+	        this._state = null;
+	    };
+	    return Tone.Source;
+	});
+	Module(function (Tone) {
+	    /**
+		 *  AudioBuffer.copyTo/FromChannel polyfill
+		 *  @private
+		 */
+	    if (Tone.supported) {
+	        if (!AudioBuffer.prototype.copyToChannel) {
+	            AudioBuffer.prototype.copyToChannel = function (src, chanNum, start) {
+	                var channel = this.getChannelData(chanNum);
+	                start = start || 0;
+	                for (var i = 0; i < channel.length; i++) {
+	                    channel[i + start] = src[i];
+	                }
+	            };
+	            AudioBuffer.prototype.copyFromChannel = function (dest, chanNum, start) {
+	                var channel = this.getChannelData(chanNum);
+	                start = start || 0;
+	                for (var i = 0; i < dest.length; i++) {
+	                    dest[i] = channel[i + start];
+	                }
+	            };
+	        }
+	    }
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Buffer loading and storage. Tone.Buffer is used internally by all
+		 *          classes that make requests for audio files such as Tone.Player,
+		 *          Tone.Sampler and Tone.Convolver.
+		 *
+		 *          Aside from load callbacks from individual buffers, Tone.Buffer
+		 *  		provides events which keep track of the loading progress
+		 *  		of _all_ of the buffers. These are Tone.Buffer.on("load" / "progress" / "error")
+		 *
+		 *  @constructor
+		 *  @extends {Tone}
+		 *  @param {AudioBuffer|String} url The url to load, or the audio buffer to set.
+		 *  @param {Function=} onload A callback which is invoked after the buffer is loaded.
+		 *                            It's recommended to use `Tone.Buffer.on('load', callback)` instead
+		 *                            since it will give you a callback when _all_ buffers are loaded.
+		 *  @param {Function=} onerror The callback to invoke if there is an error
+		 *  @example
+		 * var buffer = new Tone.Buffer("path/to/sound.mp3", function(){
+		 * 	//the buffer is now available.
+		 * 	var buff = buffer.get();
+		 * });
+		 *  @example
+		 * //can load provide fallback extension types if the first type is not supported.
+		 * var buffer = new Tone.Buffer("path/to/sound.[mp3|ogg|wav]");
+		 */
+	    Tone.Buffer = function () {
+	        var options = Tone.defaults(arguments, [
+	            'url',
+	            'onload',
+	            'onerror'
+	        ], Tone.Buffer);
+	        Tone.call(this);
+	        /**
+			 *  stores the loaded AudioBuffer
+			 *  @type {AudioBuffer}
+			 *  @private
+			 */
+	        this._buffer = null;
+	        /**
+			 *  indicates if the buffer should be reversed or not
+			 *  @type {Boolean}
+			 *  @private
+			 */
+	        this._reversed = options.reverse;
+	        /**
+			 *  The XHR
+			 *  @type  {XMLHttpRequest}
+			 *  @private
+			 */
+	        this._xhr = null;
+	        /**
+			 * Private callback when the buffer is loaded.
+			 * @type {Function}
+			 * @private
+			 */
+	        this._onload = Tone.noOp;
+	        if (options.url instanceof AudioBuffer || options.url instanceof Tone.Buffer) {
+	            this.set(options.url);
+	            // invoke the onload callback
+	            if (options.onload) {
+	                if (this.loaded) {
+	                    options.onload(this);
+	                } else {
+	                    this._onload = options.onload;
+	                }
+	            }
+	        } else if (Tone.isString(options.url)) {
+	            this.load(options.url).then(options.onload).catch(options.onerror);
+	        }
+	    };
+	    Tone.extend(Tone.Buffer);
+	    /**
+		 *  the default parameters
+		 *  @type {Object}
+		 */
+	    Tone.Buffer.defaults = {
+	        'url': undefined,
+	        'reverse': false,
+	        'onload': Tone.noOp,
+	        'onerror': Tone.noOp
+	    };
+	    /**
+		 *  Pass in an AudioBuffer or Tone.Buffer to set the value
+		 *  of this buffer.
+		 *  @param {AudioBuffer|Tone.Buffer} buffer the buffer
+		 *  @returns {Tone.Buffer} this
+		 */
+	    Tone.Buffer.prototype.set = function (buffer) {
+	        if (buffer instanceof Tone.Buffer) {
+	            if (buffer.loaded) {
+	                this._buffer = buffer.get();
+	            } else {
+	                buffer._onload = function () {
+	                    this.set(buffer);
+	                    this._onload(this);
+	                }.bind(this);
+	            }
+	        } else {
+	            this._buffer = buffer;
+	        }
+	        return this;
+	    };
+	    /**
+		 *  @return {AudioBuffer} The audio buffer stored in the object.
+		 */
+	    Tone.Buffer.prototype.get = function () {
+	        return this._buffer;
+	    };
+	    /**
+		 *  Makes an xhr reqest for the selected url then decodes
+		 *  the file as an audio buffer. Invokes
+		 *  the callback once the audio buffer loads.
+		 *  @param {String} url The url of the buffer to load.
+		 *                      filetype support depends on the
+		 *                      browser.
+		 *  @returns {Promise} returns a Promise which resolves with the Tone.Buffer
+		 */
+	    Tone.Buffer.prototype.load = function (url, onload, onerror) {
+	        var promise = new Promise(function (load, error) {
+	            this._xhr = Tone.Buffer.load(url, //success
+	            function (buff) {
+	                this._xhr = null;
+	                this.set(buff);
+	                load(this);
+	                this._onload(this);
+	                if (onload) {
+	                    onload(this);
+	                }
+	            }.bind(this), //error
+	            function (err) {
+	                this._xhr = null;
+	                error(err);
+	                if (onerror) {
+	                    onerror(err);
+	                }
+	            }.bind(this));
+	        }.bind(this));
+	        return promise;
+	    };
+	    /**
+		 *  dispose and disconnect
+		 *  @returns {Tone.Buffer} this
+		 */
+	    Tone.Buffer.prototype.dispose = function () {
+	        Tone.prototype.dispose.call(this);
+	        this._buffer = null;
+	        if (this._xhr) {
+	            Tone.Buffer._removeFromDownloadQueue(this._xhr);
+	            this._xhr.abort();
+	            this._xhr = null;
+	        }
+	        return this;
+	    };
+	    /**
+		 * If the buffer is loaded or not
+		 * @memberOf Tone.Buffer#
+		 * @type {Boolean}
+		 * @name loaded
+		 * @readOnly
+		 */
+	    Object.defineProperty(Tone.Buffer.prototype, 'loaded', {
+	        get: function () {
+	            return this.length > 0;
+	        }
+	    });
+	    /**
+		 * The duration of the buffer.
+		 * @memberOf Tone.Buffer#
+		 * @type {Number}
+		 * @name duration
+		 * @readOnly
+		 */
+	    Object.defineProperty(Tone.Buffer.prototype, 'duration', {
+	        get: function () {
+	            if (this._buffer) {
+	                return this._buffer.duration;
+	            } else {
+	                return 0;
+	            }
+	        }
+	    });
+	    /**
+		 * The length of the buffer in samples
+		 * @memberOf Tone.Buffer#
+		 * @type {Number}
+		 * @name length
+		 * @readOnly
+		 */
+	    Object.defineProperty(Tone.Buffer.prototype, 'length', {
+	        get: function () {
+	            if (this._buffer) {
+	                return this._buffer.length;
+	            } else {
+	                return 0;
+	            }
+	        }
+	    });
+	    /**
+		 * The number of discrete audio channels. Returns 0 if no buffer
+		 * is loaded.
+		 * @memberOf Tone.Buffer#
+		 * @type {Number}
+		 * @name numberOfChannels
+		 * @readOnly
+		 */
+	    Object.defineProperty(Tone.Buffer.prototype, 'numberOfChannels', {
+	        get: function () {
+	            if (this._buffer) {
+	                return this._buffer.numberOfChannels;
+	            } else {
+	                return 0;
+	            }
+	        }
+	    });
+	    /**
+		 *  Set the audio buffer from the array. To create a multichannel AudioBuffer,
+		 *  pass in a multidimensional array.
+		 *  @param {Float32Array} array The array to fill the audio buffer
+		 *  @return {Tone.Buffer} this
+		 */
+	    Tone.Buffer.prototype.fromArray = function (array) {
+	        var isMultidimensional = array[0].length > 0;
+	        var channels = isMultidimensional ? array.length : 1;
+	        var len = isMultidimensional ? array[0].length : array.length;
+	        var buffer = this.context.createBuffer(channels, len, this.context.sampleRate);
+	        if (!isMultidimensional && channels === 1) {
+	            array = [array];
+	        }
+	        for (var c = 0; c < channels; c++) {
+	            buffer.copyToChannel(array[c], c);
+	        }
+	        this._buffer = buffer;
+	        return this;
+	    };
+	    /**
+		 * 	Sums muliple channels into 1 channel
+		 *  @param {Number=} channel Optionally only copy a single channel from the array.
+		 *  @return {Array}
+		 */
+	    Tone.Buffer.prototype.toMono = function (chanNum) {
+	        if (Tone.isNumber(chanNum)) {
+	            this.fromArray(this.toArray(chanNum));
+	        } else {
+	            var outputArray = new Float32Array(this.length);
+	            var numChannels = this.numberOfChannels;
+	            for (var channel = 0; channel < numChannels; channel++) {
+	                var channelArray = this.toArray(channel);
+	                for (var i = 0; i < channelArray.length; i++) {
+	                    outputArray[i] += channelArray[i];
+	                }
+	            }
+	            //divide by the number of channels
+	            outputArray = outputArray.map(function (sample) {
+	                return sample / numChannels;
+	            });
+	            this.fromArray(outputArray);
+	        }
+	        return this;
+	    };
+	    /**
+		 * 	Get the buffer as an array. Single channel buffers will return a 1-dimensional
+		 * 	Float32Array, and multichannel buffers will return multidimensional arrays.
+		 *  @param {Number=} channel Optionally only copy a single channel from the array.
+		 *  @return {Array}
+		 */
+	    Tone.Buffer.prototype.toArray = function (channel) {
+	        if (Tone.isNumber(channel)) {
+	            return this.getChannelData(channel);
+	        } else if (this.numberOfChannels === 1) {
+	            return this.toArray(0);
+	        } else {
+	            var ret = [];
+	            for (var c = 0; c < this.numberOfChannels; c++) {
+	                ret[c] = this.getChannelData(c);
+	            }
+	            return ret;
+	        }
+	    };
+	    /**
+		 *  Returns the Float32Array representing the PCM audio data for the specific channel.
+		 *  @param  {Number}  channel  The channel number to return
+		 *  @return  {Float32Array}  The audio as a TypedArray
+		 */
+	    Tone.Buffer.prototype.getChannelData = function (channel) {
+	        return this._buffer.getChannelData(channel);
+	    };
+	    /**
+		 *  Cut a subsection of the array and return a buffer of the
+		 *  subsection. Does not modify the original buffer
+		 *  @param {Time} start The time to start the slice
+		 *  @param {Time=} end The end time to slice. If none is given
+		 *                     will default to the end of the buffer
+		 *  @return {Tone.Buffer} this
+		 */
+	    Tone.Buffer.prototype.slice = function (start, end) {
+	        end = Tone.defaultArg(end, this.duration);
+	        var startSamples = Math.floor(this.context.sampleRate * this.toSeconds(start));
+	        var endSamples = Math.floor(this.context.sampleRate * this.toSeconds(end));
+	        var replacement = [];
+	        for (var i = 0; i < this.numberOfChannels; i++) {
+	            replacement[i] = this.toArray(i).slice(startSamples, endSamples);
+	        }
+	        var retBuffer = new Tone.Buffer().fromArray(replacement);
+	        return retBuffer;
+	    };
+	    /**
+		 *  Reverse the buffer.
+		 *  @private
+		 *  @return {Tone.Buffer} this
+		 */
+	    Tone.Buffer.prototype._reverse = function () {
+	        if (this.loaded) {
+	            for (var i = 0; i < this.numberOfChannels; i++) {
+	                Array.prototype.reverse.call(this.getChannelData(i));
+	            }
+	        }
+	        return this;
+	    };
+	    /**
+		 * Reverse the buffer.
+		 * @memberOf Tone.Buffer#
+		 * @type {Boolean}
+		 * @name reverse
+		 */
+	    Object.defineProperty(Tone.Buffer.prototype, 'reverse', {
+	        get: function () {
+	            return this._reversed;
+	        },
+	        set: function (rev) {
+	            if (this._reversed !== rev) {
+	                this._reversed = rev;
+	                this._reverse();
+	            }
+	        }
+	    });
+	    ///////////////////////////////////////////////////////////////////////////
+	    // STATIC METHODS
+	    ///////////////////////////////////////////////////////////////////////////
+	    //statically inherits Emitter methods
+	    Tone.Emitter.mixin(Tone.Buffer);
+	    /**
+		 *  the static queue for all of the xhr requests
+		 *  @type {Array}
+		 *  @private
+		 */
+	    Tone.Buffer._downloadQueue = [];
+	    /**
+		 *  A path which is prefixed before every url.
+		 *  @type  {String}
+		 *  @static
+		 */
+	    Tone.Buffer.baseUrl = '';
+	    /**
+		 *  Create a Tone.Buffer from the array. To create a multichannel AudioBuffer,
+		 *  pass in a multidimensional array.
+		 *  @param {Float32Array} array The array to fill the audio buffer
+		 *  @return {Tone.Buffer} A Tone.Buffer created from the array
+		 */
+	    Tone.Buffer.fromArray = function (array) {
+	        return new Tone.Buffer().fromArray(array);
+	    };
+	    /**
+		 * Creates a Tone.Buffer from a URL, returns a promise
+		 * which resolves to a Tone.Buffer
+		 * @param  {String} url The url to load.
+		 * @return {Promise<Tone.Buffer>}     A promise which resolves to a Tone.Buffer
+		 */
+	    Tone.Buffer.fromUrl = function (url) {
+	        var buffer = new Tone.Buffer();
+	        return buffer.load(url).then(function () {
+	            return buffer;
+	        });
+	    };
+	    /**
+		 * Remove an xhr request from the download queue
+		 * @private
+		 */
+	    Tone.Buffer._removeFromDownloadQueue = function (request) {
+	        var index = Tone.Buffer._downloadQueue.indexOf(request);
+	        if (index !== -1) {
+	            Tone.Buffer._downloadQueue.splice(index, 1);
+	        }
+	    };
+	    /**
+		 *  Loads a url using XMLHttpRequest.
+		 *  @param {String} url
+		 *  @param {Function} onload
+		 *  @param {Function} onerror
+		 *  @param {Function} onprogress
+		 *  @return {XMLHttpRequest}
+		 */
+	    Tone.Buffer.load = function (url, onload, onerror) {
+	        //default
+	        onload = Tone.defaultArg(onload, Tone.noOp);
+	        // test if the url contains multiple extensions
+	        var matches = url.match(/\[(.+\|?)+\]$/);
+	        if (matches) {
+	            var extensions = matches[1].split('|');
+	            var extension = extensions[0];
+	            for (var i = 0; i < extensions.length; i++) {
+	                if (Tone.Buffer.supportsType(extensions[i])) {
+	                    extension = extensions[i];
+	                    break;
+	                }
+	            }
+	            url = url.replace(matches[0], extension);
+	        }
+	        function onError(e) {
+	            Tone.Buffer._removeFromDownloadQueue(request);
+	            Tone.Buffer.emit('error', e);
+	            if (onerror) {
+	                onerror(e);
+	            } else {
+	                throw e;
+	            }
+	        }
+	        function onProgress() {
+	            //calculate the progress
+	            var totalProgress = 0;
+	            for (var i = 0; i < Tone.Buffer._downloadQueue.length; i++) {
+	                totalProgress += Tone.Buffer._downloadQueue[i].progress;
+	            }
+	            Tone.Buffer.emit('progress', totalProgress / Tone.Buffer._downloadQueue.length);
+	        }
+	        var request = new XMLHttpRequest();
+	        request.open('GET', Tone.Buffer.baseUrl + url, true);
+	        request.responseType = 'arraybuffer';
+	        //start out as 0
+	        request.progress = 0;
+	        Tone.Buffer._downloadQueue.push(request);
+	        request.addEventListener('load', function () {
+	            if (request.status === 200) {
+	                Tone.context.decodeAudioData(request.response).then(function (buff) {
+	                    request.progress = 1;
+	                    onProgress();
+	                    onload(buff);
+	                    Tone.Buffer._removeFromDownloadQueue(request);
+	                    if (Tone.Buffer._downloadQueue.length === 0) {
+	                        //emit the event at the end
+	                        Tone.Buffer.emit('load');
+	                    }
+	                }).catch(function () {
+	                    Tone.Buffer._removeFromDownloadQueue(request);
+	                    onError('Tone.Buffer: could not decode audio data: ' + url);
+	                });
+	            } else {
+	                onError('Tone.Buffer: could not locate file: ' + url);
+	            }
+	        });
+	        request.addEventListener('error', onError);
+	        request.addEventListener('progress', function (event) {
+	            if (event.lengthComputable) {
+	                //only go to 95%, the last 5% is when the audio is decoded
+	                request.progress = event.loaded / event.total * 0.95;
+	                onProgress();
+	            }
+	        });
+	        request.send();
+	        return request;
+	    };
+	    /**
+		 *  Stop all of the downloads in progress
+		 *  @return {Tone.Buffer}
+		 *  @static
+		 */
+	    Tone.Buffer.cancelDownloads = function () {
+	        Tone.Buffer._downloadQueue.slice().forEach(function (request) {
+	            Tone.Buffer._removeFromDownloadQueue(request);
+	            request.abort();
+	        });
+	        return Tone.Buffer;
+	    };
+	    /**
+		 *  Checks a url's extension to see if the current browser can play that file type.
+		 *  @param {String} url The url/extension to test
+		 *  @return {Boolean} If the file extension can be played
+		 *  @static
+		 *  @example
+		 * Tone.Buffer.supportsType("wav"); //returns true
+		 * Tone.Buffer.supportsType("path/to/file.wav"); //returns true
+		 */
+	    Tone.Buffer.supportsType = function (url) {
+	        var extension = url.split('.');
+	        extension = extension[extension.length - 1];
+	        var response = document.createElement('audio').canPlayType('audio/' + extension);
+	        return response !== '';
+	    };
+	    /**
+		 *  Returns a Promise which resolves when all of the buffers have loaded
+		 *  @return {Promise}
+		 */
+	    Tone.loaded = function () {
+	        var onload, onerror;
+	        function removeEvents() {
+	            //remove the events when it's resolved
+	            Tone.Buffer.off('load', onload);
+	            Tone.Buffer.off('error', onerror);
+	        }
+	        return new Promise(function (success, fail) {
+	            onload = function () {
+	                success();
+	            };
+	            onerror = function () {
+	                fail();
+	            };
+	            //add the event listeners
+	            Tone.Buffer.on('load', onload);
+	            Tone.Buffer.on('error', onerror);
+	        }).then(removeEvents).catch(function (e) {
+	            removeEvents();
+	            throw new Error(e);
+	        });
+	    };
+	    return Tone.Buffer;
+	});
+	Module(function (Tone) {
+	    /**
+		 *  @class Wrapper around the native fire-and-forget OscillatorNode. Adds the
+		 *     ability to reschedule the stop method.
+		 *  @extends {Tone.AudioNode}
+		 *  @param  {AudioBuffer|Tone.Buffer}  buffer   The buffer to play
+		 *  @param  {Function}  onload  The callback to invoke when the
+		 *                               buffer is done playing.
+		 */
+	    Tone.OscillatorNode = function () {
+	        var options = Tone.defaults(arguments, [
+	            'frequency',
+	            'type'
+	        ], Tone.OscillatorNode);
+	        Tone.AudioNode.call(this, options);
+	        /**
+			 *  The callback to invoke after the
+			 *  buffer source is done playing.
+			 *  @type  {Function}
+			 */
+	        this.onended = options.onended;
+	        /**
+			 *  The oscillator start time
+			 *  @type  {Number}
+			 *  @private
+			 */
+	        this._startTime = -1;
+	        /**
+			 *  The oscillator stop time
+			 *  @type  {Number}
+			 *  @private
+			 */
+	        this._stopTime = -1;
+	        /**
+			 *  The gain node which envelopes the OscillatorNode
+			 *  @type  {Tone.Gain}
+			 *  @private
+			 */
+	        this._gainNode = this.output = new Tone.Gain();
+	        this._gainNode.gain.setValueAtTime(0, this.context.currentTime);
+	        /**
+			 *  The oscillator
+			 *  @type  {OscillatorNode}
+			 *  @private
+			 */
+	        this._oscillator = this.context.createOscillator();
+	        this._oscillator.connect(this._gainNode);
+	        this.type = options.type;
+	        /**
+			 *  The frequency of the oscillator
+			 *  @type {Frequency}
+			 *  @signal
+			 */
+	        this.frequency = new Tone.Param(this._oscillator.frequency, Tone.Type.Frequency);
+	        this.frequency.value = options.frequency;
+	        /**
+			 *  The detune of the oscillator
+			 *  @type {Frequency}
+			 *  @signal
+			 */
+	        this.detune = new Tone.Param(this._oscillator.detune, Tone.Type.Cents);
+	        this.detune.value = options.detune;
+	        /**
+			 *  The value that the buffer ramps to
+			 *  @type {Gain}
+			 *  @private
+			 */
+	        this._gain = 1;
+	    };
+	    Tone.extend(Tone.OscillatorNode, Tone.AudioNode);
+	    /**
+		 *  The defaults
+		 *  @const
+		 *  @type  {Object}
+		 */
+	    Tone.OscillatorNode.defaults = {
+	        'frequency': 440,
+	        'detune': 0,
+	        'type': 'sine',
+	        'onended': Tone.noOp
+	    };
+	    /**
+		 *  Returns the playback state of the oscillator, either "started" or "stopped".
+		 *  @type {Tone.State}
+		 *  @readOnly
+		 *  @memberOf Tone.OscillatorNode#
+		 *  @name state
+		 */
+	    Object.defineProperty(Tone.OscillatorNode.prototype, 'state', {
+	        get: function () {
+	            return this.getStateAtTime(this.now());
+	        }
+	    });
+	    /**
+		 *  Get the playback state at the given time
+		 *  @param  {Time}  time  The time to test the state at
+		 *  @return  {Tone.State}  The playback state. 
+		 */
+	    Tone.OscillatorNode.prototype.getStateAtTime = function (time) {
+	        time = this.toSeconds(time);
+	        if (this._startTime !== -1 && time >= this._startTime && (this._stopTime === -1 || time <= this._stopTime)) {
+	            return Tone.State.Started;
+	        } else {
+	            return Tone.State.Stopped;
+	        }
+	    };
+	    /**
+	     * Start the oscillator node at the given time
+	     * @param  {Time=} time When to start the oscillator
+	     * @return {OscillatorNode}      this
+	     */
+	    Tone.OscillatorNode.prototype.start = function (time) {
+	        if (this._startTime === -1) {
+	            this._startTime = this.toSeconds(time);
+	            this._oscillator.start(this._startTime);
+	            var now = this.context.currentTime;
+	            this._gainNode.gain.cancelScheduledValues(now);
+	            this._gainNode.gain.setValueAtTime(0, now);
+	            this._gainNode.gain.setValueAtTime(1, this._startTime);
+	        } else {
+	            throw new Error('cannot call OscillatorNode.start more than once');
+	        }
+	        return this;
+	    };
+	    /**
+	     * Sets an arbitrary custom periodic waveform given a PeriodicWave.
+	     * @param  {PeriodicWave} periodicWave PeriodicWave should be created with context.createPeriodicWave
+	     * @return {OscillatorNode} this
+	     */
+	    Tone.OscillatorNode.prototype.setPeriodicWave = function (periodicWave) {
+	        this._oscillator.setPeriodicWave(periodicWave);
+	        return this;
+	    };
+	    /**
+	     * Stop the oscillator node at the given time
+	     * @param  {Time=} time When to stop the oscillator
+	     * @return {OscillatorNode}      this
+	     */
+	    Tone.OscillatorNode.prototype.stop = function (time) {
+	        //cancel the previous stop
+	        this.cancelStop();
+	        //reschedule it
+	        this._stopTime = this.toSeconds(time);
+	        this._gainNode.gain.setValueAtTime(0, this._stopTime);
+	        this.context.clearTimeout(this._timeout);
+	        this._timeout = this.context.setTimeout(function () {
+	            this._oscillator.stop(this.now());
+	            this.onended();
+	        }.bind(this), this._stopTime - this.now());
+	        return this;
+	    };
+	    /**
+		 *  Cancel a scheduled stop event
+		 *  @return  {Tone.OscillatorNode}  this
+		 */
+	    Tone.OscillatorNode.prototype.cancelStop = function () {
+	        if (this._startTime !== -1) {
+	            //cancel the stop envelope
+	            this._gainNode.gain.cancelScheduledValues(this._startTime + this.sampleTime);
+	            this._gainNode.gain.setValueAtTime(1, Math.max(this.now(), this._startTime));
+	            this.context.clearTimeout(this._timeout);
+	            this._stopTime = -1;
+	        }
+	        return this;
+	    };
+	    /**
+		 * The oscillator type. Either 'sine', 'sawtooth', 'square', or 'triangle'
+		 * @memberOf Tone.OscillatorNode#
+		 * @type {Time}
+		 * @name type
+		 */
+	    Object.defineProperty(Tone.OscillatorNode.prototype, 'type', {
+	        get: function () {
+	            return this._oscillator.type;
+	        },
+	        set: function (type) {
+	            this._oscillator.type = type;
+	        }
+	    });
+	    /**
+		 *  Clean up.
+		 *  @return  {Tone.OscillatorNode}  this
+		 */
+	    Tone.OscillatorNode.prototype.dispose = function () {
+	        this.context.clearTimeout(this._timeout);
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this.onended = null;
+	        this._oscillator.disconnect();
+	        this._oscillator = null;
+	        this._gainNode.dispose();
+	        this._gainNode = null;
+	        this.frequency.dispose();
+	        this.frequency = null;
+	        this.detune.dispose();
+	        this.detune = null;
+	        return this;
+	    };
+	    return Tone.OscillatorNode;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.Oscillator supports a number of features including
+		 *         phase rotation, multiple oscillator types (see Tone.Oscillator.type),
+		 *         and Transport syncing (see Tone.Oscillator.syncFrequency).
+		 *
+		 *  @constructor
+		 *  @extends {Tone.Source}
+		 *  @param {Frequency} [frequency] Starting frequency
+		 *  @param {string} [type] The oscillator type. Read more about type below.
+		 *  @example
+		 * //make and start a 440hz sine tone
+		 * var osc = new Tone.Oscillator(440, "sine").toMaster().start();
+		 */
+	    Tone.Oscillator = function () {
+	        var options = Tone.defaults(arguments, [
+	            'frequency',
+	            'type'
+	        ], Tone.Oscillator);
+	        Tone.Source.call(this, options);
+	        /**
+			 *  the main oscillator
+			 *  @type {OscillatorNode}
+			 *  @private
+			 */
+	        this._oscillator = null;
+	        /**
+			 *  The frequency control.
+			 *  @type {Frequency}
+			 *  @signal
+			 */
+	        this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);
+	        /**
+			 *  The detune control signal.
+			 *  @type {Cents}
+			 *  @signal
+			 */
+	        this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);
+	        /**
+			 *  the periodic wave
+			 *  @type {PeriodicWave}
+			 *  @private
+			 */
+	        this._wave = null;
+	        /**
+			 *  The partials of the oscillator
+			 *  @type {Array}
+			 *  @private
+			 */
+	        this._partials = Tone.defaultArg(options.partials, [1]);
+	        /**
+			 *  the phase of the oscillator
+			 *  between 0 - 360
+			 *  @type {number}
+			 *  @private
+			 */
+	        this._phase = options.phase;
+	        /**
+			 *  the type of the oscillator
+			 *  @type {string}
+			 *  @private
+			 */
+	        this._type = null;
+	        //setup
+	        this.type = options.type;
+	        this.phase = this._phase;
+	        this._readOnly([
+	            'frequency',
+	            'detune'
+	        ]);
+	    };
+	    Tone.extend(Tone.Oscillator, Tone.Source);
+	    /**
+		 *  the default parameters
+		 *  @type {Object}
+		 */
+	    Tone.Oscillator.defaults = {
+	        'type': 'sine',
+	        'frequency': 440,
+	        'detune': 0,
+	        'phase': 0,
+	        'partials': []
+	    };
+	    /**
+		 *  The Oscillator types
+		 *  @enum {String}
+		 */
+	    Tone.Oscillator.Type = {
+	        Sine: 'sine',
+	        Triangle: 'triangle',
+	        Sawtooth: 'sawtooth',
+	        Square: 'square',
+	        Custom: 'custom'
+	    };
+	    /**
+		 *  start the oscillator
+		 *  @param  {Time} [time=now]
+		 *  @private
+		 */
+	    Tone.Oscillator.prototype._start = function (time) {
+	        //new oscillator with previous values
+	        this._oscillator = new Tone.OscillatorNode();
+	        if (this._wave) {
+	            this._oscillator.setPeriodicWave(this._wave);
+	        } else {
+	            this._oscillator.type = this._type;
+	        }
+	        //connect the control signal to the oscillator frequency & detune
+	        this._oscillator.connect(this.output);
+	        this.frequency.connect(this._oscillator.frequency);
+	        this.detune.connect(this._oscillator.detune);
+	        //start the oscillator
+	        time = this.toSeconds(time);
+	        this._oscillator.start(time);
+	    };
+	    /**
+		 *  stop the oscillator
+		 *  @private
+		 *  @param  {Time} [time=now] (optional) timing parameter
+		 *  @returns {Tone.Oscillator} this
+		 */
+	    Tone.Oscillator.prototype._stop = function (time) {
+	        if (this._oscillator) {
+	            time = this.toSeconds(time);
+	            this._oscillator.stop(time);
+	        }
+	        return this;
+	    };
+	    /**
+		 * Restart the oscillator. Does not stop the oscillator, but instead
+		 * just cancels any scheduled 'stop' from being invoked.
+		 * @param  {Time=} time
+		 * @return {Tone.Oscillator}      this
+		 */
+	    Tone.Oscillator.prototype.restart = function (time) {
+	        this._oscillator.cancelStop();
+	        this._state.cancel(this.toSeconds(time));
+	        return this;
+	    };
+	    /**
+		 *  Sync the signal to the Transport's bpm. Any changes to the transports bpm,
+		 *  will also affect the oscillators frequency.
+		 *  @returns {Tone.Oscillator} this
+		 *  @example
+		 * Tone.Transport.bpm.value = 120;
+		 * osc.frequency.value = 440;
+		 * //the ration between the bpm and the frequency will be maintained
+		 * osc.syncFrequency();
+		 * Tone.Transport.bpm.value = 240;
+		 * // the frequency of the oscillator is doubled to 880
+		 */
+	    Tone.Oscillator.prototype.syncFrequency = function () {
+	        Tone.Transport.syncSignal(this.frequency);
+	        return this;
+	    };
+	    /**
+		 *  Unsync the oscillator's frequency from the Transport.
+		 *  See Tone.Oscillator.syncFrequency
+		 *  @returns {Tone.Oscillator} this
+		 */
+	    Tone.Oscillator.prototype.unsyncFrequency = function () {
+	        Tone.Transport.unsyncSignal(this.frequency);
+	        return this;
+	    };
+	    /**
+		 * The type of the oscillator: either sine, square, triangle, or sawtooth. Also capable of
+		 * setting the first x number of partials of the oscillator. For example: "sine4" would
+		 * set be the first 4 partials of the sine wave and "triangle8" would set the first
+		 * 8 partials of the triangle wave.
+		 * <br><br>
+		 * Uses PeriodicWave internally even for native types so that it can set the phase.
+		 * PeriodicWave equations are from the
+		 * [Webkit Web Audio implementation](https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/modules/webaudio/PeriodicWave.cpp&sq=package:chromium).
+		 *
+		 * @memberOf Tone.Oscillator#
+		 * @type {string}
+		 * @name type
+		 * @example
+		 * //set it to a square wave
+		 * osc.type = "square";
+		 * @example
+		 * //set the first 6 partials of a sawtooth wave
+		 * osc.type = "sawtooth6";
+		 */
+	    Object.defineProperty(Tone.Oscillator.prototype, 'type', {
+	        get: function () {
+	            return this._type;
+	        },
+	        set: function (type) {
+	            var isBasicType = [
+	                Tone.Oscillator.Type.Sine,
+	                Tone.Oscillator.Type.Square,
+	                Tone.Oscillator.Type.Triangle,
+	                Tone.Oscillator.Type.Sawtooth
+	            ].includes(type);
+	            if (this._phase === 0 && isBasicType) {
+	                this._wave = null;
+	                //just go with the basic approach
+	                if (this._oscillator !== null) {
+	                    this._oscillator.type === type;
+	                }
+	            } else {
+	                var coefs = this._getRealImaginary(type, this._phase);
+	                var periodicWave = this.context.createPeriodicWave(coefs[0], coefs[1]);
+	                this._wave = periodicWave;
+	                if (this._oscillator !== null) {
+	                    this._oscillator.setPeriodicWave(this._wave);
+	                }
+	            }
+	            this._type = type;
+	        }
+	    });
+	    /**
+		 *  Returns the real and imaginary components based
+		 *  on the oscillator type.
+		 *  @returns {Array} [real, imaginary]
+		 *  @private
+		 */
+	    Tone.Oscillator.prototype._getRealImaginary = function (type, phase) {
+	        var fftSize = 4096;
+	        var periodicWaveSize = fftSize / 2;
+	        var real = new Float32Array(periodicWaveSize);
+	        var imag = new Float32Array(periodicWaveSize);
+	        var partialCount = 1;
+	        if (type === Tone.Oscillator.Type.Custom) {
+	            partialCount = this._partials.length + 1;
+	            periodicWaveSize = partialCount;
+	        } else {
+	            var partial = /^(sine|triangle|square|sawtooth)(\d+)$/.exec(type);
+	            if (partial) {
+	                partialCount = parseInt(partial[2]) + 1;
+	                type = partial[1];
+	                partialCount = Math.max(partialCount, 2);
+	                periodicWaveSize = partialCount;
+	            }
+	        }
+	        for (var n = 1; n < periodicWaveSize; ++n) {
+	            var piFactor = 2 / (n * Math.PI);
+	            var b;
+	            switch (type) {
+	            case Tone.Oscillator.Type.Sine:
+	                b = n <= partialCount ? 1 : 0;
+	                break;
+	            case Tone.Oscillator.Type.Square:
+	                b = n & 1 ? 2 * piFactor : 0;
+	                break;
+	            case Tone.Oscillator.Type.Sawtooth:
+	                b = piFactor * (n & 1 ? 1 : -1);
+	                break;
+	            case Tone.Oscillator.Type.Triangle:
+	                if (n & 1) {
+	                    b = 2 * (piFactor * piFactor) * (n - 1 >> 1 & 1 ? -1 : 1);
+	                } else {
+	                    b = 0;
+	                }
+	                break;
+	            case Tone.Oscillator.Type.Custom:
+	                b = this._partials[n - 1];
+	                break;
+	            default:
+	                throw new TypeError('Tone.Oscillator: invalid type: ' + type);
+	            }
+	            if (b !== 0) {
+	                real[n] = -b * Math.sin(phase * n);
+	                imag[n] = b * Math.cos(phase * n);
+	            } else {
+	                real[n] = 0;
+	                imag[n] = 0;
+	            }
+	        }
+	        return [
+	            real,
+	            imag
+	        ];
+	    };
+	    /**
+		 *  Compute the inverse FFT for a given phase.
+		 *  @param  {Float32Array}  real
+		 *  @param  {Float32Array}  imag
+		 *  @param  {NormalRange}  phase
+		 *  @return  {AudioRange}
+		 *  @private
+		 */
+	    Tone.Oscillator.prototype._inverseFFT = function (real, imag, phase) {
+	        var sum = 0;
+	        var len = real.length;
+	        for (var i = 0; i < len; i++) {
+	            sum += real[i] * Math.cos(i * phase) + imag[i] * Math.sin(i * phase);
+	        }
+	        return sum;
+	    };
+	    /**
+		 *  Returns the initial value of the oscillator.
+		 *  @return  {AudioRange}
+		 *  @private
+		 */
+	    Tone.Oscillator.prototype._getInitialValue = function () {
+	        var coefs = this._getRealImaginary(this._type, 0);
+	        var real = coefs[0];
+	        var imag = coefs[1];
+	        var maxValue = 0;
+	        var twoPi = Math.PI * 2;
+	        //check for peaks in 8 places
+	        for (var i = 0; i < 8; i++) {
+	            maxValue = Math.max(this._inverseFFT(real, imag, i / 8 * twoPi), maxValue);
+	        }
+	        return -this._inverseFFT(real, imag, this._phase) / maxValue;
+	    };
+	    /**
+		 * The partials of the waveform. A partial represents
+		 * the amplitude at a harmonic. The first harmonic is the
+		 * fundamental frequency, the second is the octave and so on
+		 * following the harmonic series.
+		 * Setting this value will automatically set the type to "custom".
+		 * The value is an empty array when the type is not "custom".
+		 * @memberOf Tone.Oscillator#
+		 * @type {Array}
+		 * @name partials
+		 * @example
+		 * osc.partials = [1, 0.2, 0.01];
+		 */
+	    Object.defineProperty(Tone.Oscillator.prototype, 'partials', {
+	        get: function () {
+	            if (this._type !== Tone.Oscillator.Type.Custom) {
+	                return [];
+	            } else {
+	                return this._partials;
+	            }
+	        },
+	        set: function (partials) {
+	            this._partials = partials;
+	            this.type = Tone.Oscillator.Type.Custom;
+	        }
+	    });
+	    /**
+		 * The phase of the oscillator in degrees.
+		 * @memberOf Tone.Oscillator#
+		 * @type {Degrees}
+		 * @name phase
+		 * @example
+		 * osc.phase = 180; //flips the phase of the oscillator
+		 */
+	    Object.defineProperty(Tone.Oscillator.prototype, 'phase', {
+	        get: function () {
+	            return this._phase * (180 / Math.PI);
+	        },
+	        set: function (phase) {
+	            this._phase = phase * Math.PI / 180;
+	            //reset the type
+	            this.type = this._type;
+	        }
+	    });
+	    /**
+		 *  Dispose and disconnect.
+		 *  @return {Tone.Oscillator} this
+		 */
+	    Tone.Oscillator.prototype.dispose = function () {
+	        Tone.Source.prototype.dispose.call(this);
+	        if (this._oscillator !== null) {
+	            this._oscillator.dispose();
+	            this._oscillator = null;
+	        }
+	        this._wave = null;
+	        this._writable([
+	            'frequency',
+	            'detune'
+	        ]);
+	        this.frequency.dispose();
+	        this.frequency = null;
+	        this.detune.dispose();
+	        this.detune = null;
+	        this._partials = null;
+	        return this;
+	    };
+	    return Tone.Oscillator;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class AudioToGain converts an input in AudioRange [-1,1] to NormalRange [0,1]. 
+		 *         See Tone.GainToAudio.
+		 *
+		 *  @extends {Tone.SignalBase}
+		 *  @constructor
+		 *  @example
+		 *  var a2g = new Tone.AudioToGain();
+		 */
+	    Tone.AudioToGain = function () {
+	        Tone.SignalBase.call(this);
+	        /**
+			 *  @type {WaveShaperNode}
+			 *  @private
+			 */
+	        this._norm = this.input = this.output = new Tone.WaveShaper(function (x) {
+	            return (x + 1) / 2;
+	        });
+	    };
+	    Tone.extend(Tone.AudioToGain, Tone.SignalBase);
+	    /**
+		 *  clean up
+		 *  @returns {Tone.AudioToGain} this
+		 */
+	    Tone.AudioToGain.prototype.dispose = function () {
+	        Tone.SignalBase.prototype.dispose.call(this);
+	        this._norm.dispose();
+	        this._norm = null;
+	        return this;
+	    };
+	    return Tone.AudioToGain;
+	});
+	Module(function (Tone) {
+	    /**
+		 *  @class Tone.Zero outputs 0's at audio-rate. The reason this has to be
+		 *         it's own class is that many browsers optimize out Tone.Signal
+		 *         with a value of 0 and will not process nodes further down the graph.
+		 *  @extends {Tone.SignalBase}
+		 */
+	    Tone.Zero = function () {
+	        Tone.SignalBase.call(this);
+	        /**
+			 *  The gain node
+			 *  @type  {Tone.Gain}
+			 *  @private
+			 */
+	        this._gain = this.input = this.output = new Tone.Gain();
+	        this.context.getConstant(0).connect(this._gain);
+	    };
+	    Tone.extend(Tone.Zero, Tone.SignalBase);
+	    /**
+		 *  clean up
+		 *  @return  {Tone.Zero}  this
+		 */
+	    Tone.Zero.prototype.dispose = function () {
+	        Tone.SignalBase.prototype.dispose.call(this);
+	        this._gain.dispose();
+	        this._gain = null;
+	        return this;
+	    };
+	    return Tone.Zero;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  LFO stands for low frequency oscillator. Tone.LFO produces an output signal
+		 *          which can be attached to an AudioParam or Tone.Signal
+		 *          in order to modulate that parameter with an oscillator. The LFO can
+		 *          also be synced to the transport to start/stop and change when the tempo changes.
+		 *
+		 *  @constructor
+		 *  @extends {Tone.AudioNode}
+		 *  @param {Frequency|Object} [frequency] The frequency of the oscillation. Typically, LFOs will be
+		 *                               in the frequency range of 0.1 to 10 hertz.
+		 *  @param {number=} min The minimum output value of the LFO.
+		 *  @param {number=} max The maximum value of the LFO.
+		 *  @example
+		 * var lfo = new Tone.LFO("4n", 400, 4000);
+		 * lfo.connect(filter.frequency);
+		 */
+	    Tone.LFO = function () {
+	        var options = Tone.defaults(arguments, [
+	            'frequency',
+	            'min',
+	            'max'
+	        ], Tone.LFO);
+	        Tone.AudioNode.call(this);
+	        /**
+			 *  The oscillator.
+			 *  @type {Tone.Oscillator}
+			 *  @private
+			 */
+	        this._oscillator = new Tone.Oscillator({
+	            'frequency': options.frequency,
+	            'type': options.type
+	        });
+	        /**
+			 *  the lfo's frequency
+			 *  @type {Frequency}
+			 *  @signal
+			 */
+	        this.frequency = this._oscillator.frequency;
+	        /**
+			 * The amplitude of the LFO, which controls the output range between
+			 * the min and max output. For example if the min is -10 and the max
+			 * is 10, setting the amplitude to 0.5 would make the LFO modulate
+			 * between -5 and 5.
+			 * @type {Number}
+			 * @signal
+			 */
+	        this.amplitude = this._oscillator.volume;
+	        this.amplitude.units = Tone.Type.NormalRange;
+	        this.amplitude.value = options.amplitude;
+	        /**
+			 *  The signal which is output when the LFO is stopped
+			 *  @type  {Tone.Signal}
+			 *  @private
+			 */
+	        this._stoppedSignal = new Tone.Signal(0, Tone.Type.AudioRange);
+	        /**
+			 *  Just outputs zeros.
+			 *  @type {Tone.Zero}
+			 *  @private
+			 */
+	        this._zeros = new Tone.Zero();
+	        /**
+			 *  The value that the LFO outputs when it's stopped
+			 *  @type {AudioRange}
+			 *  @private
+			 */
+	        this._stoppedValue = 0;
+	        /**
+			 *  @type {Tone.AudioToGain}
+			 *  @private
+			 */
+	        this._a2g = new Tone.AudioToGain();
+	        /**
+			 *  @type {Tone.Scale}
+			 *  @private
+			 */
+	        this._scaler = this.output = new Tone.Scale(options.min, options.max);
+	        /**
+			 *  the units of the LFO (used for converting)
+			 *  @type {Tone.Type}
+			 *  @private
+			 */
+	        this._units = Tone.Type.Default;
+	        this.units = options.units;
+	        //connect it up
+	        this._oscillator.chain(this._a2g, this._scaler);
+	        this._zeros.connect(this._a2g);
+	        this._stoppedSignal.connect(this._a2g);
+	        this._readOnly([
+	            'amplitude',
+	            'frequency'
+	        ]);
+	        this.phase = options.phase;
+	    };
+	    Tone.extend(Tone.LFO, Tone.AudioNode);
+	    /**
+		 *  the default parameters
+		 *
+		 *  @static
+		 *  @const
+		 *  @type {Object}
+		 */
+	    Tone.LFO.defaults = {
+	        'type': 'sine',
+	        'min': 0,
+	        'max': 1,
+	        'phase': 0,
+	        'frequency': '4n',
+	        'amplitude': 1,
+	        'units': Tone.Type.Default
+	    };
+	    /**
+		 *  Start the LFO.
+		 *  @param  {Time} [time=now] the time the LFO will start
+		 *  @returns {Tone.LFO} this
+		 */
+	    Tone.LFO.prototype.start = function (time) {
+	        time = this.toSeconds(time);
+	        this._stoppedSignal.setValueAtTime(0, time);
+	        this._oscillator.start(time);
+	        return this;
+	    };
+	    /**
+		 *  Stop the LFO.
+		 *  @param  {Time} [time=now] the time the LFO will stop
+		 *  @returns {Tone.LFO} this
+		 */
+	    Tone.LFO.prototype.stop = function (time) {
+	        time = this.toSeconds(time);
+	        this._stoppedSignal.setValueAtTime(this._stoppedValue, time);
+	        this._oscillator.stop(time);
+	        return this;
+	    };
+	    /**
+		 *  Sync the start/stop/pause to the transport
+		 *  and the frequency to the bpm of the transport
+		 *  @returns {Tone.LFO} this
+		 *  @example
+		 *  lfo.frequency.value = "8n";
+		 *  lfo.sync().start(0)
+		 *  //the rate of the LFO will always be an eighth note,
+		 *  //even as the tempo changes
+		 */
+	    Tone.LFO.prototype.sync = function () {
+	        this._oscillator.sync();
+	        this._oscillator.syncFrequency();
+	        return this;
+	    };
+	    /**
+		 *  unsync the LFO from transport control
+		 *  @returns {Tone.LFO} this
+		 */
+	    Tone.LFO.prototype.unsync = function () {
+	        this._oscillator.unsync();
+	        this._oscillator.unsyncFrequency();
+	        return this;
+	    };
+	    /**
+		 * The miniumum output of the LFO.
+		 * @memberOf Tone.LFO#
+		 * @type {number}
+		 * @name min
+		 */
+	    Object.defineProperty(Tone.LFO.prototype, 'min', {
+	        get: function () {
+	            return this._toUnits(this._scaler.min);
+	        },
+	        set: function (min) {
+	            min = this._fromUnits(min);
+	            this._scaler.min = min;
+	        }
+	    });
+	    /**
+		 * The maximum output of the LFO.
+		 * @memberOf Tone.LFO#
+		 * @type {number}
+		 * @name max
+		 */
+	    Object.defineProperty(Tone.LFO.prototype, 'max', {
+	        get: function () {
+	            return this._toUnits(this._scaler.max);
+	        },
+	        set: function (max) {
+	            max = this._fromUnits(max);
+	            this._scaler.max = max;
+	        }
+	    });
+	    /**
+		 * The type of the oscillator: sine, square, sawtooth, triangle.
+		 * @memberOf Tone.LFO#
+		 * @type {string}
+		 * @name type
+		 */
+	    Object.defineProperty(Tone.LFO.prototype, 'type', {
+	        get: function () {
+	            return this._oscillator.type;
+	        },
+	        set: function (type) {
+	            this._oscillator.type = type;
+	            this._stoppedValue = this._oscillator._getInitialValue();
+	            this._stoppedSignal.value = this._stoppedValue;
+	        }
+	    });
+	    /**
+		 * The phase of the LFO.
+		 * @memberOf Tone.LFO#
+		 * @type {number}
+		 * @name phase
+		 */
+	    Object.defineProperty(Tone.LFO.prototype, 'phase', {
+	        get: function () {
+	            return this._oscillator.phase;
+	        },
+	        set: function (phase) {
+	            this._oscillator.phase = phase;
+	            this._stoppedValue = this._oscillator._getInitialValue();
+	            this._stoppedSignal.value = this._stoppedValue;
+	        }
+	    });
+	    /**
+		 * The output units of the LFO.
+		 * @memberOf Tone.LFO#
+		 * @type {Tone.Type}
+		 * @name units
+		 */
+	    Object.defineProperty(Tone.LFO.prototype, 'units', {
+	        get: function () {
+	            return this._units;
+	        },
+	        set: function (val) {
+	            var currentMin = this.min;
+	            var currentMax = this.max;
+	            //convert the min and the max
+	            this._units = val;
+	            this.min = currentMin;
+	            this.max = currentMax;
+	        }
+	    });
+	    /**
+		 * Mute the output.
+		 * @memberOf Tone.LFO#
+		 * @type {Boolean}
+		 * @name mute
+		 */
+	    Object.defineProperty(Tone.LFO.prototype, 'mute', {
+	        get: function () {
+	            return this._oscillator.mute;
+	        },
+	        set: function (mute) {
+	            this._oscillator.mute = mute;
+	        }
+	    });
+	    /**
+		 *  Returns the playback state of the source, either "started" or "stopped".
+		 *  @type {Tone.State}
+		 *  @readOnly
+		 *  @memberOf Tone.LFO#
+		 *  @name state
+		 */
+	    Object.defineProperty(Tone.LFO.prototype, 'state', {
+	        get: function () {
+	            return this._oscillator.state;
+	        }
+	    });
+	    /**
+		 *  Connect the output of the LFO to an AudioParam, AudioNode, or Tone Node.
+		 *  Tone.LFO will automatically convert to the destination units of the
+		 *  will get the units from the connected node.
+		 *  @param  {Tone | AudioParam | AudioNode} node
+		 *  @param {number} [outputNum=0] optionally which output to connect from
+		 *  @param {number} [inputNum=0] optionally which input to connect to
+		 *  @returns {Tone.LFO} this
+		 *  @private
+		 */
+	    Tone.LFO.prototype.connect = function (node) {
+	        if (node.constructor === Tone.Signal || node.constructor === Tone.Param) {
+	            this.convert = node.convert;
+	            this.units = node.units;
+	        }
+	        Tone.SignalBase.prototype.connect.apply(this, arguments);
+	        return this;
+	    };
+	    /**
+		 *  private method borrowed from Param converts
+		 *  units from their destination value
+		 *  @function
+		 *  @private
+		 */
+	    Tone.LFO.prototype._fromUnits = Tone.Param.prototype._fromUnits;
+	    /**
+		 *  private method borrowed from Param converts
+		 *  units to their destination value
+		 *  @function
+		 *  @private
+		 */
+	    Tone.LFO.prototype._toUnits = Tone.Param.prototype._toUnits;
+	    /**
+		 *  disconnect and dispose
+		 *  @returns {Tone.LFO} this
+		 */
+	    Tone.LFO.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._writable([
+	            'amplitude',
+	            'frequency'
+	        ]);
+	        this._oscillator.dispose();
+	        this._oscillator = null;
+	        this._stoppedSignal.dispose();
+	        this._stoppedSignal = null;
+	        this._zeros.dispose();
+	        this._zeros = null;
+	        this._scaler.dispose();
+	        this._scaler = null;
+	        this._a2g.dispose();
+	        this._a2g = null;
+	        this.frequency = null;
+	        this.amplitude = null;
+	        return this;
+	    };
+	    return Tone.LFO;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.Limiter will limit the loudness of an incoming signal.
+		 *         It is composed of a Tone.Compressor with a fast attack
+		 *         and release. Limiters are commonly used to safeguard against
+		 *         signal clipping. Unlike a compressor, limiters do not provide
+		 *         smooth gain reduction and almost completely prevent
+		 *         additional gain above the threshold.
+		 *
+		 *  @extends {Tone.AudioNode}
+		 *  @constructor
+		 *  @param {number} threshold The theshold above which the limiting is applied.
+		 *  @example
+		 *  var limiter = new Tone.Limiter(-6);
+		 */
+	    Tone.Limiter = function () {
+	        var options = Tone.defaults(arguments, ['threshold'], Tone.Limiter);
+	        Tone.AudioNode.call(this);
+	        /**
+			 *  the compressor
+			 *  @private
+			 *  @type {Tone.Compressor}
+			 */
+	        this._compressor = this.input = this.output = new Tone.Compressor({
+	            'attack': 0.001,
+	            'decay': 0.001,
+	            'threshold': options.threshold
+	        });
+	        /**
+			 * The threshold of of the limiter
+			 * @type {Decibel}
+			 * @signal
+			 */
+	        this.threshold = this._compressor.threshold;
+	        this._readOnly('threshold');
+	    };
+	    Tone.extend(Tone.Limiter, Tone.AudioNode);
+	    /**
+		 *  The default value
+		 *  @type {Object}
+		 *  @const
+		 *  @static
+		 */
+	    Tone.Limiter.defaults = { 'threshold': -12 };
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.Limiter} this
+		 */
+	    Tone.Limiter.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._compressor.dispose();
+	        this._compressor = null;
+	        this._writable('threshold');
+	        this.threshold = null;
+	        return this;
+	    };
+	    return Tone.Limiter;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.Lowpass is a lowpass feedback comb filter. It is similar to
+		 *         Tone.FeedbackCombFilter, but includes a lowpass filter.
+		 *
+		 *  @extends {Tone.AudioNode}
+		 *  @constructor
+		 *  @param {Time|Object} [delayTime] The delay time of the comb filter
+		 *  @param {NormalRange=} resonance The resonance (feedback) of the comb filter
+		 *  @param {Frequency=} dampening The cutoff of the lowpass filter dampens the
+		 *                                signal as it is fedback.
+		 */
+	    Tone.LowpassCombFilter = function () {
+	        var options = Tone.defaults(arguments, [
+	            'delayTime',
+	            'resonance',
+	            'dampening'
+	        ], Tone.LowpassCombFilter);
+	        Tone.AudioNode.call(this);
+	        this.createInsOuts(1, 1);
+	        /**
+			 *  the delay node
+			 *  @type {DelayNode}
+			 *  @private
+			 */
+	        this._delay = this.input = new Tone.Delay(options.delayTime);
+	        /**
+			 *  The delayTime of the comb filter.
+			 *  @type {Time}
+			 *  @signal
+			 */
+	        this.delayTime = this._delay.delayTime;
+	        /**
+			 *  the lowpass filter
+			 *  @type  {BiquadFilterNode}
+			 *  @private
+			 */
+	        this._lowpass = this.output = this.context.createBiquadFilter();
+	        this._lowpass.Q.value = -3.0102999566398125;
+	        this._lowpass.type = 'lowpass';
+	        /**
+			 *  The dampening control of the feedback
+			 *  @type {Frequency}
+			 *  @signal
+			 */
+	        this.dampening = new Tone.Param({
+	            'param': this._lowpass.frequency,
+	            'units': Tone.Type.Frequency,
+	            'value': options.dampening
+	        });
+	        /**
+			 *  the feedback gain
+			 *  @type {Tone.Gain}
+			 *  @private
+			 */
+	        this._feedback = new Tone.Gain(options.resonance, Tone.Type.NormalRange);
+	        /**
+			 *  The amount of feedback of the delayed signal.
+			 *  @type {NormalRange}
+			 *  @signal
+			 */
+	        this.resonance = this._feedback.gain;
+	        //connections
+	        this._delay.chain(this._lowpass, this._feedback, this._delay);
+	        this._readOnly([
+	            'dampening',
+	            'resonance',
+	            'delayTime'
+	        ]);
+	    };
+	    Tone.extend(Tone.LowpassCombFilter, Tone.AudioNode);
+	    /**
+		 *  the default parameters
+		 *  @static
+		 *  @const
+		 *  @type {Object}
+		 */
+	    Tone.LowpassCombFilter.defaults = {
+	        'delayTime': 0.1,
+	        'resonance': 0.5,
+	        'dampening': 3000
+	    };
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.LowpassCombFilter} this
+		 */
+	    Tone.LowpassCombFilter.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._writable([
+	            'dampening',
+	            'resonance',
+	            'delayTime'
+	        ]);
+	        this.dampening.dispose();
+	        this.dampening = null;
+	        this.resonance.dispose();
+	        this.resonance = null;
+	        this._delay.dispose();
+	        this._delay = null;
+	        this.delayTime = null;
+	        this._lowpass.disconnect();
+	        this._lowpass = null;
+	        this._feedback.disconnect();
+	        this._feedback = null;
+	        return this;
+	    };
+	    return Tone.LowpassCombFilter;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Tone.Merge brings two signals into the left and right
+		 *          channels of a single stereo channel.
+		 *
+		 *  @constructor
+		 *  @extends {Tone.AudioNode}
+		 *  @example
+		 * var merge = new Tone.Merge().toMaster();
+		 * //routing a sine tone in the left channel
+		 * //and noise in the right channel
+		 * var osc = new Tone.Oscillator().connect(merge.left);
+		 * var noise = new Tone.Noise().connect(merge.right);
+		 * //starting our oscillators
+		 * noise.start();
+		 * osc.start();
+		 */
+	    Tone.Merge = function () {
+	        Tone.AudioNode.call(this);
+	        this.createInsOuts(2, 0);
+	        /**
+			 *  The left input channel.
+			 *  Alias for <code>input[0]</code>
+			 *  @type {GainNode}
+			 */
+	        this.left = this.input[0] = new Tone.Gain();
+	        /**
+			 *  The right input channel.
+			 *  Alias for <code>input[1]</code>.
+			 *  @type {GainNode}
+			 */
+	        this.right = this.input[1] = new Tone.Gain();
+	        /**
+			 *  the merger node for the two channels
+			 *  @type {ChannelMergerNode}
+			 *  @private
+			 */
+	        this._merger = this.output = this.context.createChannelMerger(2);
+	        //connections
+	        this.left.connect(this._merger, 0, 0);
+	        this.right.connect(this._merger, 0, 1);
+	        this.left.channelCount = 1;
+	        this.right.channelCount = 1;
+	        this.left.channelCountMode = 'explicit';
+	        this.right.channelCountMode = 'explicit';
+	    };
+	    Tone.extend(Tone.Merge, Tone.AudioNode);
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.Merge} this
+		 */
+	    Tone.Merge.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this.left.dispose();
+	        this.left = null;
+	        this.right.dispose();
+	        this.right = null;
+	        this._merger.disconnect();
+	        this._merger = null;
+	        return this;
+	    };
+	    return Tone.Merge;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Tone.Meter gets the [RMS](https://en.wikipedia.org/wiki/Root_mean_square)
+		 *          of an input signal with some averaging applied. It can also get the raw
+		 *          value of the input signal.
+		 *
+		 *  @constructor
+		 *  @extends {Tone.AudioNode}
+		 *  @param {Number} smoothing The amount of smoothing applied between frames.
+		 *  @example
+		 * var meter = new Tone.Meter();
+		 * var mic = new Tone.UserMedia().open();
+		 * //connect mic to the meter
+		 * mic.connect(meter);
+		 * //the current level of the mic input in decibels
+		 * var level = meter.getValue();
+		 */
+	    Tone.Meter = function () {
+	        var options = Tone.defaults(arguments, ['smoothing'], Tone.Meter);
+	        Tone.AudioNode.call(this);
+	        /**
+			 *  The analyser node which computes the levels.
+			 *  @private
+			 *  @type  {Tone.Analyser}
+			 */
+	        this.input = this.output = this._analyser = new Tone.Analyser('waveform', 1024);
+	        /**
+			 *  The amount of carryover between the current and last frame.
+			 *  Only applied meter for "level" type.
+			 *  @type  {Number}
+			 */
+	        this.smoothing = options.smoothing;
+	    };
+	    Tone.extend(Tone.Meter, Tone.AudioNode);
+	    /**
+		 *  The defaults
+		 *  @type {Object}
+		 *  @static
+		 *  @const
+		 */
+	    Tone.Meter.defaults = { 'smoothing': 0.8 };
+	    /**
+		 *  Get the current decibel value of the incoming signal
+		 *  @returns {Decibels}
+		 */
+	    Tone.Meter.prototype.getLevel = function () {
+	        this._analyser.type = 'fft';
+	        var values = this._analyser.getValue();
+	        var offset = 28;
+	        // normalizes most signal levels
+	        // TODO: compute loudness from FFT
+	        return Math.max.apply(this, values) + offset;
+	    };
+	    /**
+		 *  Get the signal value of the incoming signal
+		 *  @returns {Number}
+		 */
+	    Tone.Meter.prototype.getValue = function () {
+	        this._analyser.type = 'waveform';
+	        var value = this._analyser.getValue();
+	        return value[0];
+	    };
+	    /**
+		 * A value from 0 -> 1 where 0 represents no time averaging with the last analysis frame.
+		 * @memberOf Tone.Meter#
+		 * @type {Number}
+		 * @name smoothing
+		 * @readOnly
+		 */
+	    Object.defineProperty(Tone.Meter.prototype, 'smoothing', {
+	        get: function () {
+	            return this._analyser.smoothing;
+	        },
+	        set: function (val) {
+	            this._analyser.smoothing = val;
+	        }
+	    });
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.Meter} this
+		 */
+	    Tone.Meter.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._analyser.dispose();
+	        this._analyser = null;
+	        return this;
+	    };
+	    return Tone.Meter;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *	@class  Tone.Split splits an incoming signal into left and right channels.
+		 *
+		 *  @constructor
+		 *  @extends {Tone.AudioNode}
+		 *  @example
+		 * var split = new Tone.Split();
+		 * stereoSignal.connect(split);
+		 */
+	    Tone.Split = function () {
+	        Tone.AudioNode.call(this);
+	        this.createInsOuts(0, 2);
+	        /**
+			 *  @type {ChannelSplitterNode}
+			 *  @private
+			 */
+	        this._splitter = this.input = this.context.createChannelSplitter(2);
+	        this._splitter.channelCount = 2;
+	        this._splitter.channelCountMode = 'explicit';
+	        /**
+			 *  Left channel output.
+			 *  Alias for <code>output[0]</code>
+			 *  @type {Tone.Gain}
+			 */
+	        this.left = this.output[0] = new Tone.Gain();
+	        /**
+			 *  Right channel output.
+			 *  Alias for <code>output[1]</code>
+			 *  @type {Tone.Gain}
+			 */
+	        this.right = this.output[1] = new Tone.Gain();
+	        //connections
+	        this._splitter.connect(this.left, 0, 0);
+	        this._splitter.connect(this.right, 1, 0);
+	    };
+	    Tone.extend(Tone.Split, Tone.AudioNode);
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.Split} this
+		 */
+	    Tone.Split.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._splitter.disconnect();
+	        this.left.dispose();
+	        this.left = null;
+	        this.right.dispose();
+	        this.right = null;
+	        this._splitter = null;
+	        return this;
+	    };
+	    return Tone.Split;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Mid/Side processing separates the the 'mid' signal
+		 *         (which comes out of both the left and the right channel)
+		 *         and the 'side' (which only comes out of the the side channels). <br><br>
+		 *         <code>
+		 *         Mid = (Left+Right)/sqrt(2);   // obtain mid-signal from left and right<br>
+		 *         Side = (Left-Right)/sqrt(2);   // obtain side-signal from left and righ<br>
+		 *         </code>
+		 *
+		 *  @extends {Tone.AudioNode}
+		 *  @constructor
+		 */
+	    Tone.MidSideSplit = function () {
+	        Tone.AudioNode.call(this);
+	        this.createInsOuts(0, 2);
+	        /**
+			 *  split the incoming signal into left and right channels
+			 *  @type  {Tone.Split}
+			 *  @private
+			 */
+	        this._split = this.input = new Tone.Split();
+	        /**
+			 *  The mid send. Connect to mid processing. Alias for
+			 *  <code>output[0]</code>
+			 *  @type {Tone.Add}
+			 */
+	        this._midAdd = new Tone.Add();
+	        /**
+			 * Multiply the _midAdd by sqrt(1/2)
+			 * @type {Tone.Multiply}
+			 */
+	        this.mid = this.output[0] = new Tone.Multiply(Math.SQRT1_2);
+	        /**
+			 *  The side output. Connect to side processing. Also Output 1
+			 *  @type {Tone.Subtract}
+			 */
+	        this._sideSubtract = new Tone.Subtract();
+	        /**
+			 * Multiply the _midAdd by sqrt(1/2)
+			 * @type {Tone.Multiply}
+			 */
+	        this.side = this.output[1] = new Tone.Multiply(Math.SQRT1_2);
+	        this._split.connect(this._midAdd, 0, 0);
+	        this._split.connect(this._midAdd, 1, 1);
+	        this._split.connect(this._sideSubtract, 0, 0);
+	        this._split.connect(this._sideSubtract, 1, 1);
+	        this._midAdd.connect(this.mid);
+	        this._sideSubtract.connect(this.side);
+	    };
+	    Tone.extend(Tone.MidSideSplit, Tone.AudioNode);
+	    /**
+		 *  clean up
+		 *  @returns {Tone.MidSideSplit} this
+		 */
+	    Tone.MidSideSplit.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this.mid.dispose();
+	        this.mid = null;
+	        this.side.dispose();
+	        this.side = null;
+	        this._midAdd.dispose();
+	        this._midAdd = null;
+	        this._sideSubtract.dispose();
+	        this._sideSubtract = null;
+	        this._split.dispose();
+	        this._split = null;
+	        return this;
+	    };
+	    return Tone.MidSideSplit;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Mid/Side processing separates the the 'mid' signal
+		 *         (which comes out of both the left and the right channel)
+		 *         and the 'side' (which only comes out of the the side channels).
+		 *         MidSideMerge merges the mid and side signal after they've been seperated
+		 *         by Tone.MidSideSplit.<br><br>
+		 *         <code>
+		 *         Left = (Mid+Side)/sqrt(2);   // obtain left signal from mid and side<br>
+		 *         Right = (Mid-Side)/sqrt(2);   // obtain right signal from mid and side<br>
+		 *         </code>
+		 *
+		 *  @extends {Tone.AudioNode}
+		 *  @constructor
+		 */
+	    Tone.MidSideMerge = function () {
+	        Tone.AudioNode.call(this);
+	        this.createInsOuts(2, 0);
+	        /**
+			 *  The mid signal input. Alias for
+			 *  <code>input[0]</code>
+			 *  @type  {Tone.Gain}
+			 */
+	        this.mid = this.input[0] = new Tone.Gain();
+	        /**
+			 *  recombine the mid/side into Left
+			 *  @type {Tone.Add}
+			 *  @private
+			 */
+	        this._left = new Tone.Add();
+	        /**
+			 * Multiply the left by sqrt(1/2)
+			 * @type {Tone.Multiply}
+			 */
+	        this._timesTwoLeft = new Tone.Multiply(Math.SQRT1_2);
+	        /**
+			 *  The side signal input. Alias for
+			 *  <code>input[1]</code>
+			 *  @type  {Tone.Gain}
+			 */
+	        this.side = this.input[1] = new Tone.Gain();
+	        /**
+			 *  recombine the mid/side into Right
+			 *  @type {Tone.Subtract}
+			 *  @private
+			 */
+	        this._right = new Tone.Subtract();
+	        /**
+			 * Multiply the right by sqrt(1/2)
+			 * @type {Tone.Multiply}
+			 */
+	        this._timesTwoRight = new Tone.Multiply(Math.SQRT1_2);
+	        /**
+			 *  Merge the left/right signal back into a stereo signal.
+			 *  @type {Tone.Merge}
+			 *  @private
+			 */
+	        this._merge = this.output = new Tone.Merge();
+	        this.mid.connect(this._left, 0, 0);
+	        this.side.connect(this._left, 0, 1);
+	        this.mid.connect(this._right, 0, 0);
+	        this.side.connect(this._right, 0, 1);
+	        this._left.connect(this._timesTwoLeft);
+	        this._right.connect(this._timesTwoRight);
+	        this._timesTwoLeft.connect(this._merge, 0, 0);
+	        this._timesTwoRight.connect(this._merge, 0, 1);
+	    };
+	    Tone.extend(Tone.MidSideMerge, Tone.AudioNode);
+	    /**
+		 *  clean up
+		 *  @returns {Tone.MidSideMerge} this
+		 */
+	    Tone.MidSideMerge.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this.mid.dispose();
+	        this.mid = null;
+	        this.side.dispose();
+	        this.side = null;
+	        this._left.dispose();
+	        this._left = null;
+	        this._timesTwoLeft.dispose();
+	        this._timesTwoLeft = null;
+	        this._right.dispose();
+	        this._right = null;
+	        this._timesTwoRight.dispose();
+	        this._timesTwoRight = null;
+	        this._merge.dispose();
+	        this._merge = null;
+	        return this;
+	    };
+	    return Tone.MidSideMerge;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.MidSideCompressor applies two different compressors to the mid
+		 *         and side signal components. See Tone.MidSideSplit.
+		 *
+		 *  @extends {Tone.AudioNode}
+		 *  @param {Object} options The options that are passed to the mid and side
+		 *                          compressors.
+		 *  @constructor
+		 */
+	    Tone.MidSideCompressor = function (options) {
+	        Tone.AudioNode.call(this);
+	        options = Tone.defaultArg(options, Tone.MidSideCompressor.defaults);
+	        /**
+			 *  the mid/side split
+			 *  @type  {Tone.MidSideSplit}
+			 *  @private
+			 */
+	        this._midSideSplit = this.input = new Tone.MidSideSplit();
+	        /**
+			 *  the mid/side recombination
+			 *  @type  {Tone.MidSideMerge}
+			 *  @private
+			 */
+	        this._midSideMerge = this.output = new Tone.MidSideMerge();
+	        /**
+			 *  The compressor applied to the mid signal
+			 *  @type  {Tone.Compressor}
+			 */
+	        this.mid = new Tone.Compressor(options.mid);
+	        /**
+			 *  The compressor applied to the side signal
+			 *  @type  {Tone.Compressor}
+			 */
+	        this.side = new Tone.Compressor(options.side);
+	        this._midSideSplit.mid.chain(this.mid, this._midSideMerge.mid);
+	        this._midSideSplit.side.chain(this.side, this._midSideMerge.side);
+	        this._readOnly([
+	            'mid',
+	            'side'
+	        ]);
+	    };
+	    Tone.extend(Tone.MidSideCompressor, Tone.AudioNode);
+	    /**
+		 *  @const
+		 *  @static
+		 *  @type {Object}
+		 */
+	    Tone.MidSideCompressor.defaults = {
+	        'mid': {
+	            'ratio': 3,
+	            'threshold': -24,
+	            'release': 0.03,
+	            'attack': 0.02,
+	            'knee': 16
+	        },
+	        'side': {
+	            'ratio': 6,
+	            'threshold': -30,
+	            'release': 0.25,
+	            'attack': 0.03,
+	            'knee': 10
+	        }
+	    };
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.MidSideCompressor} this
+		 */
+	    Tone.MidSideCompressor.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._writable([
+	            'mid',
+	            'side'
+	        ]);
+	        this.mid.dispose();
+	        this.mid = null;
+	        this.side.dispose();
+	        this.side = null;
+	        this._midSideSplit.dispose();
+	        this._midSideSplit = null;
+	        this._midSideMerge.dispose();
+	        this._midSideMerge = null;
+	        return this;
+	    };
+	    return Tone.MidSideCompressor;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.Mono coerces the incoming mono or stereo signal into a mono signal
+		 *         where both left and right channels have the same value. This can be useful
+		 *         for [stereo imaging](https://en.wikipedia.org/wiki/Stereo_imaging).
+		 *
+		 *  @extends {Tone.AudioNode}
+		 *  @constructor
+		 */
+	    Tone.Mono = function () {
+	        Tone.AudioNode.call(this);
+	        this.createInsOuts(1, 0);
+	        /**
+			 *  merge the signal
+			 *  @type {Tone.Merge}
+			 *  @private
+			 */
+	        this._merge = this.output = new Tone.Merge();
+	        this.input.connect(this._merge, 0, 0);
+	        this.input.connect(this._merge, 0, 1);
+	    };
+	    Tone.extend(Tone.Mono, Tone.AudioNode);
+	    /**
+		 *  clean up
+		 *  @returns {Tone.Mono} this
+		 */
+	    Tone.Mono.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._merge.dispose();
+	        this._merge = null;
+	        return this;
+	    };
+	    return Tone.Mono;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class A compressor with seperate controls over low/mid/high dynamics
+		 *
+		 *  @extends {Tone.AudioNode}
+		 *  @constructor
+		 *  @param {Object} options The low/mid/high compressor settings.
+		 *  @example
+		 *  var multiband = new Tone.MultibandCompressor({
+		 *  	"lowFrequency" : 200,
+		 *  	"highFrequency" : 1300
+		 *  	"low" : {
+		 *  		"threshold" : -12
+		 *  	}
+		 *  })
+		 */
+	    Tone.MultibandCompressor = function (options) {
+	        Tone.AudioNode.call(this);
+	        options = Tone.defaultArg(arguments, Tone.MultibandCompressor.defaults);
+	        /**
+			 *  split the incoming signal into high/mid/low
+			 *  @type {Tone.MultibandSplit}
+			 *  @private
+			 */
+	        this._splitter = this.input = new Tone.MultibandSplit({
+	            'lowFrequency': options.lowFrequency,
+	            'highFrequency': options.highFrequency
+	        });
+	        /**
+			 *  low/mid crossover frequency.
+			 *  @type {Frequency}
+			 *  @signal
+			 */
+	        this.lowFrequency = this._splitter.lowFrequency;
+	        /**
+			 *  mid/high crossover frequency.
+			 *  @type {Frequency}
+			 *  @signal
+			 */
+	        this.highFrequency = this._splitter.highFrequency;
+	        /**
+			 *  the output
+			 *  @type {Tone.Gain}
+			 *  @private
+			 */
+	        this.output = new Tone.Gain();
+	        /**
+			 *  The compressor applied to the low frequencies.
+			 *  @type {Tone.Compressor}
+			 */
+	        this.low = new Tone.Compressor(options.low);
+	        /**
+			 *  The compressor applied to the mid frequencies.
+			 *  @type {Tone.Compressor}
+			 */
+	        this.mid = new Tone.Compressor(options.mid);
+	        /**
+			 *  The compressor applied to the high frequencies.
+			 *  @type {Tone.Compressor}
+			 */
+	        this.high = new Tone.Compressor(options.high);
+	        //connect the compressor
+	        this._splitter.low.chain(this.low, this.output);
+	        this._splitter.mid.chain(this.mid, this.output);
+	        this._splitter.high.chain(this.high, this.output);
+	        this._readOnly([
+	            'high',
+	            'mid',
+	            'low',
+	            'highFrequency',
+	            'lowFrequency'
+	        ]);
+	    };
+	    Tone.extend(Tone.MultibandCompressor, Tone.AudioNode);
+	    /**
+		 *  @const
+		 *  @static
+		 *  @type {Object}
+		 */
+	    Tone.MultibandCompressor.defaults = {
+	        'low': Tone.Compressor.defaults,
+	        'mid': Tone.Compressor.defaults,
+	        'high': Tone.Compressor.defaults,
+	        'lowFrequency': 250,
+	        'highFrequency': 2000
+	    };
+	    /**
+		 *  clean up
+		 *  @returns {Tone.MultibandCompressor} this
+		 */
+	    Tone.MultibandCompressor.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._splitter.dispose();
+	        this._writable([
+	            'high',
+	            'mid',
+	            'low',
+	            'highFrequency',
+	            'lowFrequency'
+	        ]);
+	        this.low.dispose();
+	        this.mid.dispose();
+	        this.high.dispose();
+	        this._splitter = null;
+	        this.low = null;
+	        this.mid = null;
+	        this.high = null;
+	        this.lowFrequency = null;
+	        this.highFrequency = null;
+	        return this;
+	    };
+	    return Tone.MultibandCompressor;
+	});
+	Module(function (Tone) {
+	    if (Tone.supported && !window.StereoPannerNode) {
+	        /**
+			 * @class Shimmed StereoPannerNode
+			 * @param  {AudioContext} context
+			 * @private
+			 */
+	        var StereoPannerNode = function (context) {
+	            /**
+				 * The audio context
+				 * @type {AudioContext}
+				 */
+	            this.context = context;
+	            /**
+				 * The left/right panning. [-1, 1]
+				 * @type {AudioRange}
+				 * @signal
+				 */
+	            this.pan = new Tone.Signal(0, Tone.Type.AudioRange);
+	            /**
+				 * Equal power scaling of the right gain
+				 * @type {Tone.WaveShaper}
+				 */
+	            var rightWaveShaper = new Tone.WaveShaper(function (val) {
+	                return Tone.equalPowerScale((val + 1) / 2);
+	            }, 4096);
+	            /**
+				 * Equal power scaling of the left gain
+				 * @type {Tone.WaveShaper}
+				 * @private
+				 */
+	            var leftWaveShaper = new Tone.WaveShaper(function (val) {
+	                return Tone.equalPowerScale(1 - (val + 1) / 2);
+	            }, 4096);
+	            /**
+				 * The left gain value
+				 * @type {Tone.Gain}
+				 * @private
+				 */
+	            var leftGain = new Tone.Gain();
+	            /**
+				 * The right gain value
+				 * @type {Tone.Gain}
+				 * @private
+				 */
+	            var rightGain = new Tone.Gain();
+	            /**
+				 * Split the incoming signal
+				 * @type {Tone.Split}
+				 * @private
+				 */
+	            var split = this.input = new Tone.Split();
+	            /**
+				 * Keeps the waveshapers from optimizing 0s
+				 * @type {Tone.Zero}
+				 * @private
+				 */
+	            var zero = new Tone.Zero();
+	            zero.fan(rightWaveShaper, leftWaveShaper);
+	            /**
+				 * Merge the outgoing signal
+				 * @type {Tone.Merge}
+				 * @private
+				 */
+	            var merge = this.output = new Tone.Merge();
+	            //connections
+	            split.left.chain(leftGain, merge.left);
+	            split.right.chain(rightGain, merge.right);
+	            this.pan.chain(leftWaveShaper, leftGain.gain);
+	            this.pan.chain(rightWaveShaper, rightGain.gain);
+	        };
+	        StereoPannerNode.prototype.disconnect = function () {
+	            this.output.disconnect.apply(this.output, arguments);
+	        };
+	        StereoPannerNode.prototype.connect = function () {
+	            this.output.connect.apply(this.output, arguments);
+	        };
+	        //add it to the AudioContext
+	        AudioContext.prototype.createStereoPanner = function () {
+	            return new StereoPannerNode(this);
+	        };
+	        Tone.Context.prototype.createStereoPanner = function () {
+	            return new StereoPannerNode(this);
+	        };
+	    }
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Tone.Panner is an equal power Left/Right Panner and does not
+		 *          support 3D. Panner uses the StereoPannerNode when available.
+		 *
+		 *  @constructor
+		 *  @extends {Tone.AudioNode}
+		 *  @param {NormalRange} [initialPan=0] The initail panner value (center).
+		 *  @example
+		 *  //pan the input signal hard right.
+		 *  var panner = new Tone.Panner(1);
+		 */
+	    Tone.Panner = function (initialPan) {
+	        Tone.AudioNode.call(this);
+	        /**
+			*  the panner node
+			*  @type {StereoPannerNode}
+			*  @private
+			*/
+	        this._panner = this.input = this.output = this.context.createStereoPanner();
+	        /**
+			*  The pan control. -1 = hard left, 1 = hard right.
+			*  @type {AudioRange}
+			*  @signal
+			*/
+	        this.pan = this._panner.pan;
+	        //initial value
+	        this.pan.value = Tone.defaultArg(initialPan, 0);
+	        this._readOnly('pan');
+	    };
+	    Tone.extend(Tone.Panner, Tone.AudioNode);
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.Panner} this
+		 */
+	    Tone.Panner.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._writable('pan');
+	        this._panner.disconnect();
+	        this._panner = null;
+	        this.pan = null;
+	        return this;
+	    };
+	    return Tone.Panner;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  A spatialized panner node which supports equalpower or HRTF panning.
+		 *          Tries to normalize the API across various browsers. See Tone.Listener
+		 *
+		 *  @constructor
+		 *  @extends {Tone.AudioNode}
+		 *  @param {Number} positionX The initial x position.
+		 *  @param {Number} positionY The initial y position.
+		 *  @param {Number} positionZ The initial z position.
+		 */
+	    Tone.Panner3D = function () {
+	        var options = Tone.defaults(arguments, [
+	            'positionX',
+	            'positionY',
+	            'positionZ'
+	        ], Tone.Panner3D);
+	        Tone.AudioNode.call(this);
+	        /**
+			 *  The panner node
+			 *  @type {PannerNode}
+			 *  @private
+			 */
+	        this._panner = this.input = this.output = this.context.createPanner();
+	        //set some values
+	        this._panner.panningModel = options.panningModel;
+	        this._panner.maxDistance = options.maxDistance;
+	        this._panner.distanceModel = options.distanceModel;
+	        this._panner.coneOuterGain = options.coneOuterGain;
+	        this._panner.coneOuterAngle = options.coneOuterAngle;
+	        this._panner.coneInnerAngle = options.coneInnerAngle;
+	        this._panner.refDistance = options.refDistance;
+	        this._panner.rolloffFactor = options.rolloffFactor;
+	        /**
+			 *  Holds the current orientation
+			 *  @type  {Array}
+			 *  @private
+			 */
+	        this._orientation = [
+	            options.orientationX,
+	            options.orientationY,
+	            options.orientationZ
+	        ];
+	        /**
+			 *  Holds the current position
+			 *  @type  {Array}
+			 *  @private
+			 */
+	        this._position = [
+	            options.positionX,
+	            options.positionY,
+	            options.positionZ
+	        ];
+	        // set the default position/orientation
+	        this.orientationX = options.orientationX;
+	        this.orientationY = options.orientationY;
+	        this.orientationZ = options.orientationZ;
+	        this.positionX = options.positionX;
+	        this.positionY = options.positionY;
+	        this.positionZ = options.positionZ;
+	    };
+	    Tone.extend(Tone.Panner3D, Tone.AudioNode);
+	    /**
+		 *  Defaults according to the specification
+		 *  @static
+		 *  @const
+		 *  @type {Object}
+		 */
+	    Tone.Panner3D.defaults = {
+	        'positionX': 0,
+	        'positionY': 0,
+	        'positionZ': 0,
+	        'orientationX': 0,
+	        'orientationY': 0,
+	        'orientationZ': 0,
+	        'panningModel': 'equalpower',
+	        'maxDistance': 10000,
+	        'distanceModel': 'inverse',
+	        'coneOuterGain': 0,
+	        'coneOuterAngle': 360,
+	        'coneInnerAngle': 360,
+	        'refDistance': 1,
+	        'rolloffFactor': 1
+	    };
+	    /**
+		 * The ramp time which is applied to the setTargetAtTime
+		 * @type {Number}
+		 * @private
+		 */
+	    Tone.Panner3D.prototype._rampTimeConstant = 0.01;
+	    /**
+		 *  Sets the position of the source in 3d space.
+		 *  @param  {Number}  x
+		 *  @param  {Number}  y
+		 *  @param  {Number}  z
+		 *  @return {Tone.Panner3D} this
+		 */
+	    Tone.Panner3D.prototype.setPosition = function (x, y, z) {
+	        if (this._panner.positionX) {
+	            var now = this.now();
+	            this._panner.positionX.setTargetAtTime(x, now, this._rampTimeConstant);
+	            this._panner.positionY.setTargetAtTime(y, now, this._rampTimeConstant);
+	            this._panner.positionZ.setTargetAtTime(z, now, this._rampTimeConstant);
+	        } else {
+	            this._panner.setPosition(x, y, z);
+	        }
+	        this._position = Array.prototype.slice.call(arguments);
+	        return this;
+	    };
+	    /**
+		 *  Sets the orientation of the source in 3d space.
+		 *  @param  {Number}  x
+		 *  @param  {Number}  y
+		 *  @param  {Number}  z
+		 *  @return {Tone.Panner3D} this
+		 */
+	    Tone.Panner3D.prototype.setOrientation = function (x, y, z) {
+	        if (this._panner.orientationX) {
+	            var now = this.now();
+	            this._panner.orientationX.setTargetAtTime(x, now, this._rampTimeConstant);
+	            this._panner.orientationY.setTargetAtTime(y, now, this._rampTimeConstant);
+	            this._panner.orientationZ.setTargetAtTime(z, now, this._rampTimeConstant);
+	        } else {
+	            this._panner.setOrientation(x, y, z);
+	        }
+	        this._orientation = Array.prototype.slice.call(arguments);
+	        return this;
+	    };
+	    /**
+		 *  The x position of the panner object.
+		 *  @type {Number}
+		 *  @memberOf Tone.Panner3D#
+		 *  @name positionX
+		 */
+	    Object.defineProperty(Tone.Panner3D.prototype, 'positionX', {
+	        set: function (pos) {
+	            this._position[0] = pos;
+	            this.setPosition.apply(this, this._position);
+	        },
+	        get: function () {
+	            return this._position[0];
+	        }
+	    });
+	    /**
+		 *  The y position of the panner object.
+		 *  @type {Number}
+		 *  @memberOf Tone.Panner3D#
+		 *  @name positionY
+		 */
+	    Object.defineProperty(Tone.Panner3D.prototype, 'positionY', {
+	        set: function (pos) {
+	            this._position[1] = pos;
+	            this.setPosition.apply(this, this._position);
+	        },
+	        get: function () {
+	            return this._position[1];
+	        }
+	    });
+	    /**
+		 *  The z position of the panner object.
+		 *  @type {Number}
+		 *  @memberOf Tone.Panner3D#
+		 *  @name positionZ
+		 */
+	    Object.defineProperty(Tone.Panner3D.prototype, 'positionZ', {
+	        set: function (pos) {
+	            this._position[2] = pos;
+	            this.setPosition.apply(this, this._position);
+	        },
+	        get: function () {
+	            return this._position[2];
+	        }
+	    });
+	    /**
+		 *  The x orientation of the panner object.
+		 *  @type {Number}
+		 *  @memberOf Tone.Panner3D#
+		 *  @name orientationX
+		 */
+	    Object.defineProperty(Tone.Panner3D.prototype, 'orientationX', {
+	        set: function (pos) {
+	            this._orientation[0] = pos;
+	            this.setOrientation.apply(this, this._orientation);
+	        },
+	        get: function () {
+	            return this._orientation[0];
+	        }
+	    });
+	    /**
+		 *  The y orientation of the panner object.
+		 *  @type {Number}
+		 *  @memberOf Tone.Panner3D#
+		 *  @name orientationY
+		 */
+	    Object.defineProperty(Tone.Panner3D.prototype, 'orientationY', {
+	        set: function (pos) {
+	            this._orientation[1] = pos;
+	            this.setOrientation.apply(this, this._orientation);
+	        },
+	        get: function () {
+	            return this._orientation[1];
+	        }
+	    });
+	    /**
+		 *  The z orientation of the panner object.
+		 *  @type {Number}
+		 *  @memberOf Tone.Panner3D#
+		 *  @name orientationZ
+		 */
+	    Object.defineProperty(Tone.Panner3D.prototype, 'orientationZ', {
+	        set: function (pos) {
+	            this._orientation[2] = pos;
+	            this.setOrientation.apply(this, this._orientation);
+	        },
+	        get: function () {
+	            return this._orientation[2];
+	        }
+	    });
+	    /**
+		 *  Proxy a property on the panner to an exposed public propery
+		 *  @param  {String}  prop
+		 *  @private
+		 */
+	    Tone.Panner3D._aliasProperty = function (prop) {
+	        Object.defineProperty(Tone.Panner3D.prototype, prop, {
+	            set: function (val) {
+	                this._panner[prop] = val;
+	            },
+	            get: function () {
+	                return this._panner[prop];
+	            }
+	        });
+	    };
+	    /**
+		 *  The panning model. Either "equalpower" or "HRTF".
+		 *  @type {String}
+		 *  @memberOf Tone.Panner3D#
+		 *  @name panningModel
+		 */
+	    Tone.Panner3D._aliasProperty('panningModel');
+	    /**
+		 *  A reference distance for reducing volume as source move further from the listener
+		 *  @type {Number}
+		 *  @memberOf Tone.Panner3D#
+		 *  @name refDistance
+		 */
+	    Tone.Panner3D._aliasProperty('refDistance');
+	    /**
+		 *  Describes how quickly the volume is reduced as source moves away from listener.
+		 *  @type {Number}
+		 *  @memberOf Tone.Panner3D#
+		 *  @name rolloffFactor
+		 */
+	    Tone.Panner3D._aliasProperty('rolloffFactor');
+	    /**
+		 *  The distance model used by,  "linear", "inverse", or "exponential".
+		 *  @type {String}
+		 *  @memberOf Tone.Panner3D#
+		 *  @name distanceModel
+		 */
+	    Tone.Panner3D._aliasProperty('distanceModel');
+	    /**
+		 *  The angle, in degrees, inside of which there will be no volume reduction
+		 *  @type {Degrees}
+		 *  @memberOf Tone.Panner3D#
+		 *  @name coneInnerAngle
+		 */
+	    Tone.Panner3D._aliasProperty('coneInnerAngle');
+	    /**
+		 *  The angle, in degrees, outside of which the volume will be reduced
+		 *  to a constant value of coneOuterGain
+		 *  @type {Degrees}
+		 *  @memberOf Tone.Panner3D#
+		 *  @name coneOuterAngle
+		 */
+	    Tone.Panner3D._aliasProperty('coneOuterAngle');
+	    /**
+		 *  The gain outside of the coneOuterAngle
+		 *  @type {Gain}
+		 *  @memberOf Tone.Panner3D#
+		 *  @name coneOuterGain
+		 */
+	    Tone.Panner3D._aliasProperty('coneOuterGain');
+	    /**
+		 *  The maximum distance between source and listener,
+		 *  after which the volume will not be reduced any further.
+		 *  @type {Positive}
+		 *  @memberOf Tone.Panner3D#
+		 *  @name maxDistance
+		 */
+	    Tone.Panner3D._aliasProperty('maxDistance');
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.Panner3D} this
+		 */
+	    Tone.Panner3D.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._panner.disconnect();
+	        this._panner = null;
+	        this._orientation = null;
+	        this._position = null;
+	        return this;
+	    };
+	    return Tone.Panner3D;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.PanVol is a Tone.Panner and Tone.Volume in one.
+		 *
+		 *  @extends {Tone.AudioNode}
+		 *  @constructor
+		 *  @param {AudioRange} pan the initial pan
+		 *  @param {number} volume The output volume.
+		 *  @example
+		 * //pan the incoming signal left and drop the volume
+		 * var panVol = new Tone.PanVol(-0.25, -12);
+		 */
+	    Tone.PanVol = function () {
+	        var options = Tone.defaults(arguments, [
+	            'pan',
+	            'volume'
+	        ], Tone.PanVol);
+	        Tone.AudioNode.call(this);
+	        /**
+			 *  The panning node
+			 *  @type {Tone.Panner}
+			 *  @private
+			 */
+	        this._panner = this.input = new Tone.Panner(options.pan);
+	        /**
+			 *  The L/R panning control.
+			 *  @type {AudioRange}
+			 *  @signal
+			 */
+	        this.pan = this._panner.pan;
+	        /**
+			 *  The volume node
+			 *  @type {Tone.Volume}
+			 *  @private
+			 */
+	        this._volume = this.output = new Tone.Volume(options.volume);
+	        /**
+			 *  The volume control in decibels.
+			 *  @type {Decibels}
+			 *  @signal
+			 */
+	        this.volume = this._volume.volume;
+	        //connections
+	        this._panner.connect(this._volume);
+	        this.mute = options.mute;
+	        this._readOnly([
+	            'pan',
+	            'volume'
+	        ]);
+	    };
+	    Tone.extend(Tone.PanVol, Tone.AudioNode);
+	    /**
+		 *  The defaults
+		 *  @type  {Object}
+		 *  @const
+		 *  @static
+		 */
+	    Tone.PanVol.defaults = {
+	        'pan': 0,
+	        'volume': 0,
+	        'mute': false
+	    };
+	    /**
+		 * Mute/unmute the volume
+		 * @memberOf Tone.PanVol#
+		 * @name mute
+		 * @type {Boolean}
+		 */
+	    Object.defineProperty(Tone.PanVol.prototype, 'mute', {
+	        get: function () {
+	            return this._volume.mute;
+	        },
+	        set: function (mute) {
+	            this._volume.mute = mute;
+	        }
+	    });
+	    /**
+		 *  clean up
+		 *  @returns {Tone.PanVol} this
+		 */
+	    Tone.PanVol.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._writable([
+	            'pan',
+	            'volume'
+	        ]);
+	        this._panner.dispose();
+	        this._panner = null;
+	        this.pan = null;
+	        this._volume.dispose();
+	        this._volume = null;
+	        this.volume = null;
+	        return this;
+	    };
+	    return Tone.PanVol;
+	});
+	Module(function (Tone) {
+	    /**
+		 *  @class Tone.Solo lets you isolate a specific audio stream. When
+		 *         an instance is set to `solo=true`, it will mute all other instances.
+		 *  @extends {Tone.AudioNode}
+		 *  @example
+		 * var soloA = new Tone.Solo()
+		 * var soloB = new Tone.Solo()
+		 * soloA.solo = true
+		 * //no audio will pass through soloB
+		 */
+	    Tone.Solo = function () {
+	        var options = Tone.defaults(arguments, ['solo'], Tone.Solo);
+	        Tone.AudioNode.call(this);
+	        /**
+			 *  The input and output node
+			 *  @type  {Tone.Gain}
+			 */
+	        this.input = this.output = new Tone.Gain();
+	        /**
+			 *  A bound _soloed method
+			 *  @type  {Function}
+			 *  @private
+			 */
+	        this._soloBind = this._soloed.bind(this);
+	        //listen for solo events class-wide.
+	        this.context.on('solo', this._soloBind);
+	        //set initially
+	        this.solo = options.solo;
+	    };
+	    Tone.extend(Tone.Solo, Tone.AudioNode);
+	    /**
+		 *  The defaults
+		 *  @type  {Object}
+		 *  @static
+		 */
+	    Tone.Solo.defaults = { solo: false };
+	    /**
+		 *  Isolates this instance and mutes all other instances of Tone.Solo.
+		 *  Only one instance can be soloed at a time. A soloed
+		 *  instance will report `solo=false` when another instance is soloed.
+		 *  @memberOf Tone.Solo#
+		 *  @type {Boolean}
+		 *  @name solo
+		 */
+	    Object.defineProperty(Tone.Solo.prototype, 'solo', {
+	        get: function () {
+	            return this._isSoloed();
+	        },
+	        set: function (solo) {
+	            if (solo) {
+	                this._addSolo();
+	            } else {
+	                this._removeSolo();
+	            }
+	            this.context.emit('solo', this);
+	        }
+	    });
+	    /**
+		 *  If the current instance is muted, i.e. another instance is soloed
+		 *  @memberOf Tone.Solo#
+		 *  @type {Boolean}
+		 *  @name muted
+		 *  @readOnly
+		 */
+	    Object.defineProperty(Tone.Solo.prototype, 'muted', {
+	        get: function () {
+	            return this.input.gain.value === 0;
+	        }
+	    });
+	    /**
+		 * Add this to the soloed array
+		 * @private
+		 */
+	    Tone.Solo.prototype._addSolo = function () {
+	        if (!Tone.isArray(this.context._currentSolo)) {
+	            this.context._currentSolo = [];
+	        }
+	        if (!this._isSoloed()) {
+	            this.context._currentSolo.push(this);
+	        }
+	    };
+	    /**
+		 * Remove this from the soloed array
+		 * @private
+		 */
+	    Tone.Solo.prototype._removeSolo = function () {
+	        if (this._isSoloed()) {
+	            var index = this.context._currentSolo.indexOf(this);
+	            this.context._currentSolo.splice(index, 1);
+	        }
+	    };
+	    /**
+		 * @return {Boolean} Is this on the soloed array
+		 * @private
+		 */
+	    Tone.Solo.prototype._isSoloed = function () {
+	        if (Tone.isArray(this.context._currentSolo)) {
+	            return this.context._currentSolo.length !== 0 && this.context._currentSolo.indexOf(this) !== -1;
+	        } else {
+	            return false;
+	        }
+	    };
+	    /**
+		 * @return {Boolean} Returns true if no one is soloed
+		 * @private
+		 */
+	    Tone.Solo.prototype._noSolos = function () {
+	        return !Tone.isArray(this.context._currentSolo) || this.context._currentSolo.length === 0;
+	    };
+	    /**
+		 *  Solo the current instance and unsolo all other instances.
+		 *  @param  {Tone.Solo}  instance  The instance which is being soloed/unsoloed.
+		 *  @private
+		 */
+	    Tone.Solo.prototype._soloed = function () {
+	        if (this._isSoloed()) {
+	            this.input.gain.value = 1;
+	        } else if (this._noSolos()) {
+	            //no one is soloed
+	            this.input.gain.value = 1;
+	        } else {
+	            this.input.gain.value = 0;
+	        }
+	    };
+	    /**
+		 *  Clean up
+		 *  @return  {Tone.Solo}  this
+		 */
+	    Tone.Solo.prototype.dispose = function () {
+	        this.context.off('solo', this._soloBind);
+	        this._removeSolo();
+	        this._soloBind = null;
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        return this;
+	    };
+	    return Tone.Solo;
+	});
+	Module(function (Tone) {
+	    /**
+		 *  @class  Get the current waveform data of the connected audio source.
+		 *  @extends {Tone.AudioNode}
+		 *  @param {Number=} size The size of the FFT. Value must be a power of
+		 *                       two in the range 32 to 32768.
+		 */
+	    Tone.Waveform = function () {
+	        var options = Tone.defaults(arguments, ['size'], Tone.Waveform);
+	        options.type = Tone.Analyser.Type.Waveform;
+	        Tone.AudioNode.call(this);
+	        /**
+			 *  The analyser node.
+			 *  @private
+			 *  @type {Tone.Analyser}
+			 */
+	        this._analyser = this.input = this.output = new Tone.Analyser(options);
+	    };
+	    Tone.extend(Tone.Waveform, Tone.AudioNode);
+	    /**
+		 *  The default values.
+		 *  @type {Object}
+		 *  @const
+		 */
+	    Tone.Waveform.defaults = { 'size': 1024 };
+	    /**
+		 *  Gets the waveform of the audio source. Returns the waveform data
+		 *  of length [size](#size) as a Float32Array with values between -1 and 1.
+		 *  @returns {TypedArray}
+		 */
+	    Tone.Waveform.prototype.getValue = function () {
+	        return this._analyser.getValue();
+	    };
+	    /**
+		 *  The size of analysis. This must be a power of two in the range 32 to 32768.
+		 *  @memberOf Tone.Waveform#
+		 *  @type {Number}
+		 *  @name size
+		 */
+	    Object.defineProperty(Tone.Waveform.prototype, 'size', {
+	        get: function () {
+	            return this._analyser.size;
+	        },
+	        set: function (size) {
+	            this._analyser.size = size;
+	        }
+	    });
+	    /**
+		 *  Clean up.
+		 *  @return  {Tone.Waveform}  this
+		 */
+	    Tone.Waveform.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._analyser.dispose();
+	        this._analyser = null;
+	    };
+	    return Tone.Waveform;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.CtrlInterpolate will interpolate between given values based
+		 *         on the "index" property. Passing in an array or object literal
+		 *         will interpolate each of the parameters. Note (i.e. "C3")
+		 *         and Time (i.e. "4n + 2") can be interpolated. All other values are
+		 *         assumed to be numbers. 
+		 *  @example
+		 * var interp = new Tone.CtrlInterpolate([0, 2, 9, 4]);
+		 * interp.index = 0.75;
+		 * interp.value; //returns 1.5
+		 *
+		 *  @example
+		 * var interp = new Tone.CtrlInterpolate([
+		 * 	[2, 4, 5],
+		 * 	[9, 3, 2],
+		 * ]);
+		 * @param {Array} values The array of values to interpolate over
+		 * @param {Positive} index The initial interpolation index.
+		 * @extends {Tone}
+		 */
+	    Tone.CtrlInterpolate = function () {
+	        var options = Tone.defaults(arguments, [
+	            'values',
+	            'index'
+	        ], Tone.CtrlInterpolate);
+	        Tone.call(this);
+	        /**
+			 *  The values to interpolate between
+			 *  @type  {Array}
+			 */
+	        this.values = options.values;
+	        /**
+			 *  The interpolated index between values. For example: a value of 1.5
+			 *  would interpolate equally between the value at index 1
+			 *  and the value at index 2. 
+			 *  @example
+			 * interp.index = 0; 
+			 * interp.value; //returns the value at 0
+			 * interp.index = 0.5;
+			 * interp.value; //returns the value between indices 0 and 1. 
+			 *  @type  {Positive}
+			 */
+	        this.index = options.index;
+	    };
+	    Tone.extend(Tone.CtrlInterpolate);
+	    /**
+		 *  The defaults
+		 *  @const
+		 *  @type  {Object}
+		 */
+	    Tone.CtrlInterpolate.defaults = {
+	        'index': 0,
+	        'values': []
+	    };
+	    /**
+		 *  The current interpolated value based on the index
+		 *  @readOnly
+		 *  @memberOf Tone.CtrlInterpolate#
+		 *  @type {*}
+		 *  @name value
+		 */
+	    Object.defineProperty(Tone.CtrlInterpolate.prototype, 'value', {
+	        get: function () {
+	            var index = this.index;
+	            index = Math.min(index, this.values.length - 1);
+	            var lowerPosition = Math.floor(index);
+	            var lower = this.values[lowerPosition];
+	            var upper = this.values[Math.ceil(index)];
+	            return this._interpolate(index - lowerPosition, lower, upper);
+	        }
+	    });
+	    /**
+		 *  Internal interpolation routine
+		 *  @param  {NormalRange}  index  The index between the lower and upper
+		 *  @param  {*}  lower 
+		 *  @param  {*}  upper 
+		 *  @return  {*}  The interpolated value
+		 *  @private
+		 */
+	    Tone.CtrlInterpolate.prototype._interpolate = function (index, lower, upper) {
+	        if (Tone.isArray(lower)) {
+	            var retArray = [];
+	            for (var i = 0; i < lower.length; i++) {
+	                retArray[i] = this._interpolate(index, lower[i], upper[i]);
+	            }
+	            return retArray;
+	        } else if (Tone.isObject(lower)) {
+	            var retObj = {};
+	            for (var attr in lower) {
+	                retObj[attr] = this._interpolate(index, lower[attr], upper[attr]);
+	            }
+	            return retObj;
+	        } else {
+	            lower = this._toNumber(lower);
+	            upper = this._toNumber(upper);
+	            return (1 - index) * lower + index * upper;
+	        }
+	    };
+	    /**
+		 *  Convert from the given type into a number
+		 *  @param  {Number|String}  value
+		 *  @return  {Number}
+		 *  @private
+		 */
+	    Tone.CtrlInterpolate.prototype._toNumber = function (val) {
+	        if (Tone.isNumber(val)) {
+	            return val;
+	        } else {
+	            //otherwise assume that it's Time...
+	            return this.toSeconds(val);
+	        }
+	    };
+	    /**
+		 *  Clean up
+		 *  @return  {Tone.CtrlInterpolate}  this
+		 */
+	    Tone.CtrlInterpolate.prototype.dispose = function () {
+	        this.values = null;
+	    };
+	    return Tone.CtrlInterpolate;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.CtrlMarkov represents a Markov Chain where each call
+		 *         to Tone.CtrlMarkov.next will move to the next state. If the next
+		 *         state choice is an array, the next state is chosen randomly with
+		 *         even probability for all of the choices. For a weighted probability
+		 *         of the next choices, pass in an object with "state" and "probability" attributes. 
+		 *         The probabilities will be normalized and then chosen. If no next options
+		 *         are given for the current state, the state will stay there. 
+		 *  @extends {Tone}
+		 *  @example
+		 * var chain = new Tone.CtrlMarkov({
+		 * 	"beginning" : ["end", "middle"],
+		 * 	"middle" : "end"
+		 * });
+		 * chain.value = "beginning";
+		 * chain.next(); //returns "end" or "middle" with 50% probability
+		 *
+		 *  @example
+		 * var chain = new Tone.CtrlMarkov({
+		 * 	"beginning" : [{"value" : "end", "probability" : 0.8}, 
+		 * 					{"value" : "middle", "probability" : 0.2}],
+		 * 	"middle" : "end"
+		 * });
+		 * chain.value = "beginning";
+		 * chain.next(); //returns "end" with 80% probability or "middle" with 20%.
+		 *  @param {Object} values An object with the state names as the keys
+		 *                         and the next state(s) as the values. 
+		 */
+	    Tone.CtrlMarkov = function (values, initial) {
+	        Tone.call(this);
+	        /**
+			 *  The Markov values with states as the keys
+			 *  and next state(s) as the values. 
+			 *  @type {Object}
+			 */
+	        this.values = Tone.defaultArg(values, {});
+	        /**
+			 *  The current state of the Markov values. The next
+			 *  state will be evaluated and returned when Tone.CtrlMarkov.next
+			 *  is invoked.
+			 *  @type {String}
+			 */
+	        this.value = Tone.defaultArg(initial, Object.keys(this.values)[0]);
+	    };
+	    Tone.extend(Tone.CtrlMarkov);
+	    /**
+		 *  Returns the next state of the Markov values. 
+		 *  @return  {String}
+		 */
+	    Tone.CtrlMarkov.prototype.next = function () {
+	        if (this.values.hasOwnProperty(this.value)) {
+	            var next = this.values[this.value];
+	            if (Tone.isArray(next)) {
+	                var distribution = this._getProbDistribution(next);
+	                var rand = Math.random();
+	                var total = 0;
+	                for (var i = 0; i < distribution.length; i++) {
+	                    var dist = distribution[i];
+	                    if (rand > total && rand < total + dist) {
+	                        var chosen = next[i];
+	                        if (Tone.isObject(chosen)) {
+	                            this.value = chosen.value;
+	                        } else {
+	                            this.value = chosen;
+	                        }
+	                    }
+	                    total += dist;
+	                }
+	            } else {
+	                this.value = next;
+	            }
+	        }
+	        return this.value;
+	    };
+	    /**
+		 *  Choose randomly from an array weighted options in the form 
+		 *  {"state" : string, "probability" : number} or an array of values
+		 *  @param  {Array}  options 
+		 *  @return  {Array}  The randomly selected choice
+		 *  @private
+		 */
+	    Tone.CtrlMarkov.prototype._getProbDistribution = function (options) {
+	        var distribution = [];
+	        var total = 0;
+	        var needsNormalizing = false;
+	        for (var i = 0; i < options.length; i++) {
+	            var option = options[i];
+	            if (Tone.isObject(option)) {
+	                needsNormalizing = true;
+	                distribution[i] = option.probability;
+	            } else {
+	                distribution[i] = 1 / options.length;
+	            }
+	            total += distribution[i];
+	        }
+	        if (needsNormalizing) {
+	            //normalize the values
+	            for (var j = 0; j < distribution.length; j++) {
+	                distribution[j] = distribution[j] / total;
+	            }
+	        }
+	        return distribution;
+	    };
+	    /**
+		 *  Clean up
+		 *  @return  {Tone.CtrlMarkov}  this
+		 */
+	    Tone.CtrlMarkov.prototype.dispose = function () {
+	        this.values = null;
+	    };
+	    return Tone.CtrlMarkov;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Generate patterns from an array of values.
+		 *         Has a number of arpeggiation and randomized
+		 *         selection patterns. 
+		 *           <ul>
+		 *  	        <li>"up" - cycles upward</li>
+		 *  			<li>"down" - cycles downward</li>
+		 *  			<li>"upDown" - up then and down</li>
+		 *  			<li>"downUp" - cycles down then and up</li>
+		 *  			<li>"alternateUp" - jump up two and down one</li>
+		 *  			<li>"alternateDown" - jump down two and up one</li>
+		 *  			<li>"random" - randomly select an index</li>
+		 *  			<li>"randomWalk" - randomly moves one index away from the current position</li>
+		 *  			<li>"randomOnce" - randomly select an index without repeating until all values have been chosen.</li>
+		 *     		</ul>
+		 *  @param  {Array}  values   An array of options to choose from.
+		 *  @param  {Tone.CtrlPattern.Type=}  type  The name of the pattern.
+		 *  @extends {Tone}
+		 */
+	    Tone.CtrlPattern = function () {
+	        var options = Tone.defaults(arguments, [
+	            'values',
+	            'type'
+	        ], Tone.CtrlPattern);
+	        Tone.call(this);
+	        /**
+			 *  The array of values to arpeggiate over
+			 *  @type {Array}
+			 */
+	        this.values = options.values;
+	        /**
+			 *  The current position in the values array
+			 *  @type  {Number}
+			 */
+	        this.index = 0;
+	        /**
+			 *  The type placeholder
+			 *  @type {Tone.CtrlPattern.Type}
+			 *  @private
+			 */
+	        this._type = null;
+	        /**
+			 *  Shuffled values for the RandomOnce type
+			 *  @type {Array}
+			 *  @private
+			 */
+	        this._shuffled = null;
+	        /**
+			 *  The direction of the movement
+			 *  @type {String}
+			 *  @private
+			 */
+	        this._direction = null;
+	        this.type = options.type;
+	    };
+	    Tone.extend(Tone.CtrlPattern);
+	    /**
+		 *  The Control Patterns
+		 *  @type  {Object}
+		 *  @static
+		 */
+	    Tone.CtrlPattern.Type = {
+	        Up: 'up',
+	        Down: 'down',
+	        UpDown: 'upDown',
+	        DownUp: 'downUp',
+	        AlternateUp: 'alternateUp',
+	        AlternateDown: 'alternateDown',
+	        Random: 'random',
+	        RandomWalk: 'randomWalk',
+	        RandomOnce: 'randomOnce'
+	    };
+	    /**
+		 *  The default values. 
+		 *  @type  {Object}
+		 */
+	    Tone.CtrlPattern.defaults = {
+	        'type': Tone.CtrlPattern.Type.Up,
+	        'values': []
+	    };
+	    /**
+		 *  The value at the current index of the pattern.
+		 *  @readOnly
+		 *  @memberOf Tone.CtrlPattern#
+		 *  @type {*}
+		 *  @name value
+		 */
+	    Object.defineProperty(Tone.CtrlPattern.prototype, 'value', {
+	        get: function () {
+	            //some safeguards
+	            if (this.values.length === 0) {
+	                return;
+	            } else if (this.values.length === 1) {
+	                return this.values[0];
+	            }
+	            this.index = Math.min(this.index, this.values.length - 1);
+	            var val = this.values[this.index];
+	            if (this.type === Tone.CtrlPattern.Type.RandomOnce) {
+	                if (this.values.length !== this._shuffled.length) {
+	                    this._shuffleValues();
+	                }
+	                val = this.values[this._shuffled[this.index]];
+	            }
+	            return val;
+	        }
+	    });
+	    /**
+		 *  The pattern used to select the next
+		 *  item from the values array
+		 *  @memberOf Tone.CtrlPattern#
+		 *  @type {Tone.CtrlPattern.Type}
+		 *  @name type
+		 */
+	    Object.defineProperty(Tone.CtrlPattern.prototype, 'type', {
+	        get: function () {
+	            return this._type;
+	        },
+	        set: function (type) {
+	            this._type = type;
+	            this._shuffled = null;
+	            //the first index
+	            if (this._type === Tone.CtrlPattern.Type.Up || this._type === Tone.CtrlPattern.Type.UpDown || this._type === Tone.CtrlPattern.Type.RandomOnce || this._type === Tone.CtrlPattern.Type.AlternateUp) {
+	                this.index = 0;
+	            } else if (this._type === Tone.CtrlPattern.Type.Down || this._type === Tone.CtrlPattern.Type.DownUp || this._type === Tone.CtrlPattern.Type.AlternateDown) {
+	                this.index = this.values.length - 1;
+	            }
+	            //the direction
+	            if (this._type === Tone.CtrlPattern.Type.UpDown || this._type === Tone.CtrlPattern.Type.AlternateUp) {
+	                this._direction = Tone.CtrlPattern.Type.Up;
+	            } else if (this._type === Tone.CtrlPattern.Type.DownUp || this._type === Tone.CtrlPattern.Type.AlternateDown) {
+	                this._direction = Tone.CtrlPattern.Type.Down;
+	            }
+	            //randoms
+	            if (this._type === Tone.CtrlPattern.Type.RandomOnce) {
+	                this._shuffleValues();
+	            } else if (this._type === Tone.CtrlPattern.Random) {
+	                this.index = Math.floor(Math.random() * this.values.length);
+	            }
+	        }
+	    });
+	    /**
+		 *  Return the next value given the current position
+		 *  and pattern.
+		 *  @return {*} The next value
+		 */
+	    Tone.CtrlPattern.prototype.next = function () {
+	        var type = this.type;
+	        //choose the next index
+	        if (type === Tone.CtrlPattern.Type.Up) {
+	            this.index++;
+	            if (this.index >= this.values.length) {
+	                this.index = 0;
+	            }
+	        } else if (type === Tone.CtrlPattern.Type.Down) {
+	            this.index--;
+	            if (this.index < 0) {
+	                this.index = this.values.length - 1;
+	            }
+	        } else if (type === Tone.CtrlPattern.Type.UpDown || type === Tone.CtrlPattern.Type.DownUp) {
+	            if (this._direction === Tone.CtrlPattern.Type.Up) {
+	                this.index++;
+	            } else {
+	                this.index--;
+	            }
+	            if (this.index < 0) {
+	                this.index = 1;
+	                this._direction = Tone.CtrlPattern.Type.Up;
+	            } else if (this.index >= this.values.length) {
+	                this.index = this.values.length - 2;
+	                this._direction = Tone.CtrlPattern.Type.Down;
+	            }
+	        } else if (type === Tone.CtrlPattern.Type.Random) {
+	            this.index = Math.floor(Math.random() * this.values.length);
+	        } else if (type === Tone.CtrlPattern.Type.RandomWalk) {
+	            if (Math.random() < 0.5) {
+	                this.index--;
+	                this.index = Math.max(this.index, 0);
+	            } else {
+	                this.index++;
+	                this.index = Math.min(this.index, this.values.length - 1);
+	            }
+	        } else if (type === Tone.CtrlPattern.Type.RandomOnce) {
+	            this.index++;
+	            if (this.index >= this.values.length) {
+	                this.index = 0;
+	                //reshuffle the values for next time
+	                this._shuffleValues();
+	            }
+	        } else if (type === Tone.CtrlPattern.Type.AlternateUp) {
+	            if (this._direction === Tone.CtrlPattern.Type.Up) {
+	                this.index += 2;
+	                this._direction = Tone.CtrlPattern.Type.Down;
+	            } else {
+	                this.index -= 1;
+	                this._direction = Tone.CtrlPattern.Type.Up;
+	            }
+	            if (this.index >= this.values.length) {
+	                this.index = 0;
+	                this._direction = Tone.CtrlPattern.Type.Up;
+	            }
+	        } else if (type === Tone.CtrlPattern.Type.AlternateDown) {
+	            if (this._direction === Tone.CtrlPattern.Type.Up) {
+	                this.index += 1;
+	                this._direction = Tone.CtrlPattern.Type.Down;
+	            } else {
+	                this.index -= 2;
+	                this._direction = Tone.CtrlPattern.Type.Up;
+	            }
+	            if (this.index < 0) {
+	                this.index = this.values.length - 1;
+	                this._direction = Tone.CtrlPattern.Type.Down;
+	            }
+	        }
+	        return this.value;
+	    };
+	    /**
+		 *  Shuffles the values and places the results into the _shuffled
+		 *  @private
+		 */
+	    Tone.CtrlPattern.prototype._shuffleValues = function () {
+	        var copy = [];
+	        this._shuffled = [];
+	        for (var i = 0; i < this.values.length; i++) {
+	            copy[i] = i;
+	        }
+	        while (copy.length > 0) {
+	            var randVal = copy.splice(Math.floor(copy.length * Math.random()), 1);
+	            this._shuffled.push(randVal[0]);
+	        }
+	    };
+	    /**
+		 *  Clean up
+		 *  @returns {Tone.CtrlPattern} this
+		 */
+	    Tone.CtrlPattern.prototype.dispose = function () {
+	        this._shuffled = null;
+	        this.values = null;
+	    };
+	    return Tone.CtrlPattern;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Choose a random value.
+		 *  @extends {Tone}
+		 *  @example
+		 * var randomWalk = new Tone.CtrlRandom({
+		 * 	"min" : 0,
+		 * 	"max" : 10,
+		 * 	"integer" : true
+		 * });
+		 * randomWalk.eval();
+		 *
+		 *  @param {Number|Time=} min The minimum return value.
+		 *  @param {Number|Time=} max The maximum return value.
+		 */
+	    Tone.CtrlRandom = function () {
+	        var options = Tone.defaults(arguments, [
+	            'min',
+	            'max'
+	        ], Tone.CtrlRandom);
+	        Tone.call(this);
+	        /**
+			 *  The minimum return value
+			 *  @type  {Number|Time}
+			 */
+	        this.min = options.min;
+	        /**
+			 *  The maximum return value
+			 *  @type  {Number|Time}
+			 */
+	        this.max = options.max;
+	        /**
+			 *  If the return value should be an integer
+			 *  @type  {Boolean}
+			 */
+	        this.integer = options.integer;
+	    };
+	    Tone.extend(Tone.CtrlRandom);
+	    /**
+		 *  The defaults
+		 *  @const
+		 *  @type  {Object}
+		 */
+	    Tone.CtrlRandom.defaults = {
+	        'min': 0,
+	        'max': 1,
+	        'integer': false
+	    };
+	    /**
+		 *  Return a random value between min and max. 
+		 *  @readOnly
+		 *  @memberOf Tone.CtrlRandom#
+		 *  @type {*}
+		 *  @name value
+		 */
+	    Object.defineProperty(Tone.CtrlRandom.prototype, 'value', {
+	        get: function () {
+	            var min = this.toSeconds(this.min);
+	            var max = this.toSeconds(this.max);
+	            var rand = Math.random();
+	            var val = rand * min + (1 - rand) * max;
+	            if (this.integer) {
+	                val = Math.floor(val);
+	            }
+	            return val;
+	        }
+	    });
+	    return Tone.CtrlRandom;
+	});
+	Module(function (Tone) {
+	    /**
+		 *  @class A data structure for holding multiple buffers.
+		 *  
+		 *  @param  {Object|Array}    urls      An object literal or array
+		 *                                      of urls to load.
+		 *  @param  {Function=}  callback  The callback to invoke when
+		 *                                 the buffers are loaded. 
+		 *  @extends {Tone}
+		 *  @example
+		 * //load a whole bank of piano samples
+		 * var pianoSamples = new Tone.Buffers({
+		 * 	"C4" : "path/to/C4.mp3"
+		 * 	"C#4" : "path/to/C#4.mp3"
+		 * 	"D4" : "path/to/D4.mp3"
+		 * 	"D#4" : "path/to/D#4.mp3"
+		 * 	...
+		 * }, function(){
+		 * 	//play one of the samples when they all load
+		 * 	player.buffer = pianoSamples.get("C4");
+		 * 	player.start();
+		 * });
+		 * 	@example
+		 * //To pass in additional parameters in the second parameter
+		 * var buffers = new Tone.Buffers(urls, {
+		 * 	"onload" : callback,
+		 * 	"baseUrl" : "../path/to/audio/"
+		 * })
+		 */
+	    Tone.Buffers = function (urls) {
+	        //remove the urls from the options
+	        var args = Array.prototype.slice.call(arguments);
+	        args.shift();
+	        var options = Tone.defaults(args, [
+	            'onload',
+	            'baseUrl'
+	        ], Tone.Buffers);
+	        Tone.call(this);
+	        /**
+			 *  All of the buffers
+			 *  @type  {Object}
+			 *  @private
+			 */
+	        this._buffers = {};
+	        /**
+			 *  A path which is prefixed before every url.
+			 *  @type  {String}
+			 */
+	        this.baseUrl = options.baseUrl;
+	        this._loadingCount = 0;
+	        //add each one
+	        for (var key in urls) {
+	            this._loadingCount++;
+	            this.add(key, urls[key], this._bufferLoaded.bind(this, options.onload));
+	        }
+	    };
+	    Tone.extend(Tone.Buffers);
+	    /**
+		 *  Defaults
+		 *  @type  {Object}
+		 */
+	    Tone.Buffers.defaults = {
+	        'onload': Tone.noOp,
+	        'baseUrl': ''
+	    };
+	    /**
+		 *  True if the buffers object has a buffer by that name.
+		 *  @param  {String|Number}  name  The key or index of the 
+		 *                                 buffer.
+		 *  @return  {Boolean}
+		 */
+	    Tone.Buffers.prototype.has = function (name) {
+	        return this._buffers.hasOwnProperty(name);
+	    };
+	    /**
+		 *  Get a buffer by name. If an array was loaded, 
+		 *  then use the array index.
+		 *  @param  {String|Number}  name  The key or index of the 
+		 *                                 buffer.
+		 *  @return  {Tone.Buffer}
+		 */
+	    Tone.Buffers.prototype.get = function (name) {
+	        if (this.has(name)) {
+	            return this._buffers[name];
+	        } else {
+	            throw new Error('Tone.Buffers: no buffer named ' + name);
+	        }
+	    };
+	    /**
+		 *  A buffer was loaded. decrement the counter.
+		 *  @param  {Function}  callback 
+		 *  @private
+		 */
+	    Tone.Buffers.prototype._bufferLoaded = function (callback) {
+	        this._loadingCount--;
+	        if (this._loadingCount === 0 && callback) {
+	            callback(this);
+	        }
+	    };
+	    /**
+		 * If the buffers are loaded or not
+		 * @memberOf Tone.Buffers#
+		 * @type {Boolean}
+		 * @name loaded
+		 * @readOnly
+		 */
+	    Object.defineProperty(Tone.Buffers.prototype, 'loaded', {
+	        get: function () {
+	            var isLoaded = true;
+	            for (var buffName in this._buffers) {
+	                var buff = this.get(buffName);
+	                isLoaded = isLoaded && buff.loaded;
+	            }
+	            return isLoaded;
+	        }
+	    });
+	    /**
+		 *  Add a buffer by name and url to the Buffers
+		 *  @param  {String}    name      A unique name to give
+		 *                                the buffer
+		 *  @param  {String|Tone.Buffer|Audiobuffer}  url  Either the url of the bufer, 
+		 *                                                 or a buffer which will be added
+		 *                                                 with the given name.
+		 *  @param  {Function=}  callback  The callback to invoke 
+		 *                                 when the url is loaded.
+		 */
+	    Tone.Buffers.prototype.add = function (name, url, callback) {
+	        callback = Tone.defaultArg(callback, Tone.noOp);
+	        if (url instanceof Tone.Buffer) {
+	            this._buffers[name] = url;
+	            callback(this);
+	        } else if (url instanceof AudioBuffer) {
+	            this._buffers[name] = new Tone.Buffer(url);
+	            callback(this);
+	        } else if (Tone.isString(url)) {
+	            this._buffers[name] = new Tone.Buffer(this.baseUrl + url, callback);
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Clean up.
+		 *  @return  {Tone.Buffers} this
+		 */
+	    Tone.Buffers.prototype.dispose = function () {
+	        Tone.prototype.dispose.call(this);
+	        for (var name in this._buffers) {
+	            this._buffers[name].dispose();
+	        }
+	        this._buffers = null;
+	        return this;
+	    };
+	    return Tone.Buffers;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  buses are another way of routing audio
+		 *
+		 *  augments Tone.prototype to include send and recieve
+		 */
+	    /**
+		 *  All of the routes
+		 *
+		 *  @type {Object}
+		 *  @static
+		 *  @private
+		 */
+	    var Buses = {};
+	    /**
+		 *  Send this signal to the channel name.
+		 *  @param  {String} channelName A named channel to send the signal to.
+		 *  @param  {Decibels} amount The amount of the source to send to the bus.
+		 *  @return {GainNode} The gain node which connects this node to the desired channel.
+		 *                     Can be used to adjust the levels of the send.
+		 *  @example
+		 * source.send("reverb", -12);
+		 */
+	    Tone.prototype.send = function (channelName, amount) {
+	        if (!Buses.hasOwnProperty(channelName)) {
+	            Buses[channelName] = this.context.createGain();
+	        }
+	        amount = Tone.defaultArg(amount, 0);
+	        var sendKnob = new Tone.Gain(amount, Tone.Type.Decibels);
+	        this.connect(sendKnob);
+	        sendKnob.connect(Buses[channelName]);
+	        return sendKnob;
+	    };
+	    /**
+		 *  Recieve the input from the desired channelName to the input
+		 *
+		 *  @param  {String} channelName A named channel to send the signal to.
+		 *  @param  {Number=} channelNumber The channel to connect to
+		 *  @returns {Tone} this
+		 *  @example
+		 * reverbEffect.receive("reverb");
+		 */
+	    Tone.prototype.receive = function (channelName, inputNum) {
+	        if (!Buses.hasOwnProperty(channelName)) {
+	            Buses[channelName] = this.context.createGain();
+	        }
+	        Buses[channelName].connect(this, 0, inputNum);
+	        return this;
+	    };
+	    //remove all the send/receives when a new audio context is passed in
+	    Tone.Context.on('init', function (context) {
+	        if (context.Buses) {
+	            Buses = context.Buses;
+	        } else {
+	            Buses = {};
+	            context.Buses = Buses;
+	        }
+	    });
+	    return Tone;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.Draw is useful for synchronizing visuals and audio events.
+		 *         Callbacks from Tone.Transport or any of the Tone.Event classes
+		 *         always happen _before_ the scheduled time and are not synchronized
+		 *         to the animation frame so they are not good for triggering tightly
+		 *         synchronized visuals and sound. Tone.Draw makes it easy to schedule
+		 *         callbacks using the AudioContext time and uses requestAnimationFrame.
+		 *         
+		 *  @singleton
+		 *  @extends {Tone}
+		 *  @example
+		 * Tone.Transport.schedule(function(time){
+		 * 	//use the time argument to schedule a callback with Tone.Draw
+		 * 	Tone.Draw.schedule(function(){
+		 * 		//do drawing or DOM manipulation here
+		 * 	}, time)
+		 * }, "+0.5")
+		 */
+	    Tone.Draw = function () {
+	        Tone.call(this);
+	        /**
+			 *  All of the events.
+			 *  @type  {Tone.Timeline}
+			 *  @private
+			 */
+	        this._events = new Tone.Timeline();
+	        /**
+			 *  The duration after which events are not invoked.
+			 *  @type  {Number}
+			 *  @default 0.25
+			 */
+	        this.expiration = 0.25;
+	        /**
+			 *  The amount of time before the scheduled time 
+			 *  that the callback can be invoked. Default is
+			 *  half the time of an animation frame (0.008 seconds).
+			 *  @type  {Number}
+			 *  @default 0.008
+			 */
+	        this.anticipation = 0.008;
+	        /**
+			 *  The draw loop
+			 *  @type  {Function}
+			 *  @private
+			 */
+	        this._boundDrawLoop = this._drawLoop.bind(this);
+	    };
+	    Tone.extend(Tone.Draw);
+	    /**
+		 *  Schedule a function at the given time to be invoked
+		 *  on the nearest animation frame.
+		 *  @param  {Function}  callback  Callback is invoked at the given time.
+		 *  @param  {Time}    time      The time relative to the AudioContext time
+		 *                              to invoke the callback.
+		 *  @return  {Tone.Draw}    this
+		 */
+	    Tone.Draw.prototype.schedule = function (callback, time) {
+	        this._events.add({
+	            callback: callback,
+	            time: this.toSeconds(time)
+	        });
+	        //start the draw loop on the first event
+	        if (this._events.length === 1) {
+	            requestAnimationFrame(this._boundDrawLoop);
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Cancel events scheduled after the given time
+		 *  @param  {Time=}  after  Time after which scheduled events will 
+		 *                          be removed from the scheduling timeline.
+		 *  @return  {Tone.Draw}  this
+		 */
+	    Tone.Draw.prototype.cancel = function (after) {
+	        this._events.cancel(this.toSeconds(after));
+	        return this;
+	    };
+	    /**
+		 *  The draw loop
+		 *  @private
+		 */
+	    Tone.Draw.prototype._drawLoop = function () {
+	        var now = Tone.now();
+	        while (this._events.length && this._events.peek().time - this.anticipation <= now) {
+	            var event = this._events.shift();
+	            if (now - event.time <= this.expiration) {
+	                event.callback();
+	            }
+	        }
+	        if (this._events.length > 0) {
+	            requestAnimationFrame(this._boundDrawLoop);
+	        }
+	    };
+	    //make a singleton
+	    Tone.Draw = new Tone.Draw();
+	    return Tone.Draw;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Both Tone.Panner3D and Tone.Listener have a position in 3D space
+		 *          using a right-handed cartesian coordinate system.
+		 *          The units used in the coordinate system are not defined;
+		 *          these coordinates are independent/invariant of any particular
+		 *          units such as meters or feet. Tone.Panner3D objects have an forward
+		 *          vector representing the direction the sound is projecting. Additionally,
+		 *          they have a sound cone representing how directional the sound is.
+		 *          For example, the sound could be omnidirectional, in which case it would
+		 *          be heard anywhere regardless of its forward, or it can be more directional
+		 *          and heard only if it is facing the listener. Tone.Listener objects
+		 *          (representing a person's ears) have an forward and up vector
+		 *          representing in which direction the person is facing. Because both the
+		 *          source stream and the listener can be moving, they both have a velocity
+		 *          vector representing both the speed and direction of movement. Taken together,
+		 *          these two velocities can be used to generate a doppler shift effect which changes the pitch.
+		 *          <br><br>
+		 *          Note: the position of the Listener will have no effect on nodes not connected to a Tone.Panner3D
+		 *
+		 *  @constructor
+		 *  @extends {Tone}
+		 *  @singleton
+		 */
+	    Tone.Listener = function () {
+	        Tone.call(this);
+	        /**
+			 *  Holds the current forward orientation
+			 *  @type  {Array}
+			 *  @private
+			 */
+	        this._orientation = [
+	            0,
+	            0,
+	            0,
+	            0,
+	            0,
+	            0
+	        ];
+	        /**
+			 *  Holds the current position
+			 *  @type  {Array}
+			 *  @private
+			 */
+	        this._position = [
+	            0,
+	            0,
+	            0
+	        ];
+	        Tone.getContext(function () {
+	            // set the default position/forward
+	            this.set(ListenerConstructor.defaults);
+	        }.bind(this));
+	    };
+	    Tone.extend(Tone.Listener);
+	    /**
+		 *  Defaults according to the specification
+		 *  @static
+		 *  @const
+		 *  @type {Object}
+		 */
+	    Tone.Listener.defaults = {
+	        'positionX': 0,
+	        'positionY': 0,
+	        'positionZ': 0,
+	        'forwardX': 0,
+	        'forwardY': 0,
+	        'forwardZ': 1,
+	        'upX': 0,
+	        'upY': 1,
+	        'upZ': 0
+	    };
+	    /**
+		 * The ramp time which is applied to the setTargetAtTime
+		 * @type {Number}
+		 * @private
+		 */
+	    Tone.Listener.prototype._rampTimeConstant = 0.01;
+	    /**
+		 *  Sets the position of the listener in 3d space.
+		 *  @param  {Number}  x
+		 *  @param  {Number}  y
+		 *  @param  {Number}  z
+		 *  @return {Tone.Listener} this
+		 */
+	    Tone.Listener.prototype.setPosition = function (x, y, z) {
+	        if (this.context.listener.positionX) {
+	            var now = this.now();
+	            this.context.listener.positionX.setTargetAtTime(x, now, this._rampTimeConstant);
+	            this.context.listener.positionY.setTargetAtTime(y, now, this._rampTimeConstant);
+	            this.context.listener.positionZ.setTargetAtTime(z, now, this._rampTimeConstant);
+	        } else {
+	            this.context.listener.setPosition(x, y, z);
+	        }
+	        this._position = Array.prototype.slice.call(arguments);
+	        return this;
+	    };
+	    /**
+		 *  Sets the orientation of the listener using two vectors, the forward
+		 *  vector (which direction the listener is facing) and the up vector
+		 *  (which the up direction of the listener). An up vector
+		 *  of 0, 0, 1 is equivalent to the listener standing up in the Z direction.
+		 *  @param  {Number}  x
+		 *  @param  {Number}  y
+		 *  @param  {Number}  z
+		 *  @param  {Number}  upX
+		 *  @param  {Number}  upY
+		 *  @param  {Number}  upZ
+		 *  @return {Tone.Listener} this
+		 */
+	    Tone.Listener.prototype.setOrientation = function (x, y, z, upX, upY, upZ) {
+	        if (this.context.listener.forwardX) {
+	            var now = this.now();
+	            this.context.listener.forwardX.setTargetAtTime(x, now, this._rampTimeConstant);
+	            this.context.listener.forwardY.setTargetAtTime(y, now, this._rampTimeConstant);
+	            this.context.listener.forwardZ.setTargetAtTime(z, now, this._rampTimeConstant);
+	            this.context.listener.upX.setTargetAtTime(upX, now, this._rampTimeConstant);
+	            this.context.listener.upY.setTargetAtTime(upY, now, this._rampTimeConstant);
+	            this.context.listener.upZ.setTargetAtTime(upZ, now, this._rampTimeConstant);
+	        } else {
+	            this.context.listener.setOrientation(x, y, z, upX, upY, upZ);
+	        }
+	        this._orientation = Array.prototype.slice.call(arguments);
+	        return this;
+	    };
+	    /**
+		 *  The x position of the panner object.
+		 *  @type {Number}
+		 *  @memberOf Tone.Listener#
+		 *  @name positionX
+		 */
+	    Object.defineProperty(Tone.Listener.prototype, 'positionX', {
+	        set: function (pos) {
+	            this._position[0] = pos;
+	            this.setPosition.apply(this, this._position);
+	        },
+	        get: function () {
+	            return this._position[0];
+	        }
+	    });
+	    /**
+		 *  The y position of the panner object.
+		 *  @type {Number}
+		 *  @memberOf Tone.Listener#
+		 *  @name positionY
+		 */
+	    Object.defineProperty(Tone.Listener.prototype, 'positionY', {
+	        set: function (pos) {
+	            this._position[1] = pos;
+	            this.setPosition.apply(this, this._position);
+	        },
+	        get: function () {
+	            return this._position[1];
+	        }
+	    });
+	    /**
+		 *  The z position of the panner object.
+		 *  @type {Number}
+		 *  @memberOf Tone.Listener#
+		 *  @name positionZ
+		 */
+	    Object.defineProperty(Tone.Listener.prototype, 'positionZ', {
+	        set: function (pos) {
+	            this._position[2] = pos;
+	            this.setPosition.apply(this, this._position);
+	        },
+	        get: function () {
+	            return this._position[2];
+	        }
+	    });
+	    /**
+		 *  The x coordinate of the listeners front direction. i.e.
+		 *  which way they are facing.
+		 *  @type {Number}
+		 *  @memberOf Tone.Listener#
+		 *  @name forwardX
+		 */
+	    Object.defineProperty(Tone.Listener.prototype, 'forwardX', {
+	        set: function (pos) {
+	            this._orientation[0] = pos;
+	            this.setOrientation.apply(this, this._orientation);
+	        },
+	        get: function () {
+	            return this._orientation[0];
+	        }
+	    });
+	    /**
+		 *  The y coordinate of the listeners front direction. i.e.
+		 *  which way they are facing.
+		 *  @type {Number}
+		 *  @memberOf Tone.Listener#
+		 *  @name forwardY
+		 */
+	    Object.defineProperty(Tone.Listener.prototype, 'forwardY', {
+	        set: function (pos) {
+	            this._orientation[1] = pos;
+	            this.setOrientation.apply(this, this._orientation);
+	        },
+	        get: function () {
+	            return this._orientation[1];
+	        }
+	    });
+	    /**
+		 *  The z coordinate of the listeners front direction. i.e.
+		 *  which way they are facing.
+		 *  @type {Number}
+		 *  @memberOf Tone.Listener#
+		 *  @name forwardZ
+		 */
+	    Object.defineProperty(Tone.Listener.prototype, 'forwardZ', {
+	        set: function (pos) {
+	            this._orientation[2] = pos;
+	            this.setOrientation.apply(this, this._orientation);
+	        },
+	        get: function () {
+	            return this._orientation[2];
+	        }
+	    });
+	    /**
+		 *  The x coordinate of the listener's up direction. i.e.
+		 *  the direction the listener is standing in.
+		 *  @type {Number}
+		 *  @memberOf Tone.Listener#
+		 *  @name upX
+		 */
+	    Object.defineProperty(Tone.Listener.prototype, 'upX', {
+	        set: function (pos) {
+	            this._orientation[3] = pos;
+	            this.setOrientation.apply(this, this._orientation);
+	        },
+	        get: function () {
+	            return this._orientation[3];
+	        }
+	    });
+	    /**
+		 *  The y coordinate of the listener's up direction. i.e.
+		 *  the direction the listener is standing in.
+		 *  @type {Number}
+		 *  @memberOf Tone.Listener#
+		 *  @name upY
+		 */
+	    Object.defineProperty(Tone.Listener.prototype, 'upY', {
+	        set: function (pos) {
+	            this._orientation[4] = pos;
+	            this.setOrientation.apply(this, this._orientation);
+	        },
+	        get: function () {
+	            return this._orientation[4];
+	        }
+	    });
+	    /**
+		 *  The z coordinate of the listener's up direction. i.e.
+		 *  the direction the listener is standing in.
+		 *  @type {Number}
+		 *  @memberOf Tone.Listener#
+		 *  @name upZ
+		 */
+	    Object.defineProperty(Tone.Listener.prototype, 'upZ', {
+	        set: function (pos) {
+	            this._orientation[5] = pos;
+	            this.setOrientation.apply(this, this._orientation);
+	        },
+	        get: function () {
+	            return this._orientation[5];
+	        }
+	    });
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.Listener} this
+		 */
+	    Tone.Listener.prototype.dispose = function () {
+	        this._orientation = null;
+	        this._position = null;
+	        return this;
+	    };
+	    //SINGLETON SETUP
+	    var ListenerConstructor = Tone.Listener;
+	    Tone.Listener = new ListenerConstructor();
+	    Tone.Context.on('init', function (context) {
+	        if (context.Listener instanceof ListenerConstructor) {
+	            //a single listener object
+	            Tone.Listener = context.Listener;
+	        } else {
+	            //make new Listener insides
+	            Tone.Listener = new ListenerConstructor();
+	        }
+	        context.Listener = Tone.Listener;
+	    });
+	    //END SINGLETON SETUP
+	    return Tone.Listener;
+	});
+	Module(function (Tone) {
+	    /**
+		 * Because of a bug in iOS causing the currentTime to increment
+		 * before the rendering is started, sometimes it takes multiple
+		 * attempts to render the audio correctly.
+		 * @private
+		 */
+	    function attemptRender(callback, duration, sampleRate, tries) {
+	        tries = Tone.defaultArg(tries, 0);
+	        var context = new Tone.OfflineContext(2, duration, sampleRate);
+	        Tone.context = context;
+	        //invoke the callback/scheduling
+	        var response = callback(Tone.Transport);
+	        if (context.currentTime > 0 && tries < 1000) {
+	            return attemptRender(callback, duration, sampleRate, ++tries);
+	        } else {
+	            return {
+	                'response': response,
+	                'context': context
+	            };
+	        }
+	    }
+	    /**
+		 *  Generate a buffer by rendering all of the Tone.js code within the callback using the OfflineAudioContext.
+		 *  The OfflineAudioContext is capable of rendering much faster than real time in many cases.
+		 *  The callback function also passes in an offline instance of Tone.Transport which can be used
+		 *  to schedule events along the Transport. **NOTE** OfflineAudioContext has the same restrictions
+		 *  as the AudioContext in that on certain platforms (like iOS) it must be invoked by an explicit
+		 *  user action like a click or tap. 
+		 *  @param  {Function}  callback  All Tone.js nodes which are created and scheduled within this callback are recorded into the output Buffer.
+		 *  @param  {Time}  duration     the amount of time to record for.
+		 *  @return  {Promise}  The promise which is invoked with the Tone.Buffer of the recorded output.
+		 *  @example
+		 * //render 2 seconds of the oscillator
+		 * Tone.Offline(function(){
+		 * 	//only nodes created in this callback will be recorded
+		 * 	var oscillator = new Tone.Oscillator().toMaster().start(0)
+		 * 	//schedule their events
+		 * }, 2).then(function(buffer){
+		 * 	//do something with the output buffer
+		 * })
+		 * @example
+		 * //can also schedule events along the Transport
+		 * //using the passed in Offline Transport
+		 * Tone.Offline(function(Transport){
+		 * 	var osc = new Tone.Oscillator().toMaster()
+		 * 	Transport.schedule(function(time){
+		 * 		osc.start(time).stop(time + 0.1)
+		 * 	}, 1)
+		 * 	Transport.start(0.2)
+		 * }, 4).then(function(buffer){
+		 * 	//do something with the output buffer
+		 * })
+		 */
+	    Tone.Offline = function (callback, duration) {
+	        //set the OfflineAudioContext
+	        var sampleRate = Tone.context.sampleRate;
+	        var originalContext = Tone.context;
+	        var renderRet = attemptRender(callback, duration, sampleRate);
+	        var response = renderRet.response;
+	        var context = renderRet.context;
+	        var ret;
+	        if (response instanceof Promise) {
+	            //wait for the promise to resolve
+	            ret = response.then(function () {
+	                //then render the audio
+	                return context.render();
+	            });
+	        } else {
+	            //process the audio
+	            ret = context.render();
+	        }
+	        //return the original AudioContext
+	        Tone.context = originalContext;
+	        //return the audio
+	        return ret.then(function (buffer) {
+	            //wrap it in a Tone.Buffer
+	            return new Tone.Buffer(buffer);
+	        });
+	    };
+	    return Tone.Offline;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 * 	@class  Tone.Effect is the base class for effects. Connect the effect between
+		 * 	        the effectSend and effectReturn GainNodes, then control the amount of
+		 * 	        effect which goes to the output using the wet control.
+		 *
+		 *  @constructor
+		 *  @extends {Tone.AudioNode}
+		 *  @param {NormalRange|Object} [wet] The starting wet value.
+		 */
+	    Tone.Effect = function () {
+	        var options = Tone.defaults(arguments, ['wet'], Tone.Effect);
+	        Tone.AudioNode.call(this);
+	        this.createInsOuts(1, 1);
+	        /**
+			 *  the drywet knob to control the amount of effect
+			 *  @type {Tone.CrossFade}
+			 *  @private
+			 */
+	        this._dryWet = new Tone.CrossFade(options.wet);
+	        /**
+			 *  The wet control is how much of the effected
+			 *  will pass through to the output. 1 = 100% effected
+			 *  signal, 0 = 100% dry signal.
+			 *  @type {NormalRange}
+			 *  @signal
+			 */
+	        this.wet = this._dryWet.fade;
+	        /**
+			 *  connect the effectSend to the input of hte effect
+			 *  @type {Tone.Gain}
+			 *  @private
+			 */
+	        this.effectSend = new Tone.Gain();
+	        /**
+			 *  connect the output of the effect to the effectReturn
+			 *  @type {Tone.Gain}
+			 *  @private
+			 */
+	        this.effectReturn = new Tone.Gain();
+	        //connections
+	        this.input.connect(this._dryWet.a);
+	        this.input.connect(this.effectSend);
+	        this.effectReturn.connect(this._dryWet.b);
+	        this._dryWet.connect(this.output);
+	        this._readOnly(['wet']);
+	    };
+	    Tone.extend(Tone.Effect, Tone.AudioNode);
+	    /**
+		 *  @static
+		 *  @type {Object}
+		 */
+	    Tone.Effect.defaults = { 'wet': 1 };
+	    /**
+		 *  chains the effect in between the effectSend and effectReturn
+		 *  @param  {Tone} effect
+		 *  @private
+		 *  @returns {Tone.Effect} this
+		 */
+	    Tone.Effect.prototype.connectEffect = function (effect) {
+	        this.effectSend.chain(effect, this.effectReturn);
+	        return this;
+	    };
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.Effect} this
+		 */
+	    Tone.Effect.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._dryWet.dispose();
+	        this._dryWet = null;
+	        this.effectSend.dispose();
+	        this.effectSend = null;
+	        this.effectReturn.dispose();
+	        this.effectReturn = null;
+	        this._writable(['wet']);
+	        this.wet = null;
+	        return this;
+	    };
+	    return Tone.Effect;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.AutoFilter is a Tone.Filter with a Tone.LFO connected to the filter cutoff frequency.
+		 *         Setting the LFO rate and depth allows for control over the filter modulation rate 
+		 *         and depth.
+		 *
+		 *  @constructor
+		 *  @extends {Tone.Effect}
+		 *  @param {Time|Object} [frequency] The rate of the LFO.
+		 *  @param {Frequency=} baseFrequency The lower value of the LFOs oscillation
+	 	 *  @param {Frequency=} octaves The number of octaves above the baseFrequency
+		 *  @example
+		 * //create an autofilter and start it's LFO
+		 * var autoFilter = new Tone.AutoFilter("4n").toMaster().start();
+		 * //route an oscillator through the filter and start it
+		 * var oscillator = new Tone.Oscillator().connect(autoFilter).start();
+		 */
+	    Tone.AutoFilter = function () {
+	        var options = Tone.defaults(arguments, [
+	            'frequency',
+	            'baseFrequency',
+	            'octaves'
+	        ], Tone.AutoFilter);
+	        Tone.Effect.call(this, options);
+	        /**
+			 *  the lfo which drives the filter cutoff
+			 *  @type {Tone.LFO}
+			 *  @private
+			 */
+	        this._lfo = new Tone.LFO({
+	            'frequency': options.frequency,
+	            'amplitude': options.depth
+	        });
+	        /**
+			 * The range of the filter modulating between the min and max frequency. 
+			 * 0 = no modulation. 1 = full modulation.
+			 * @type {NormalRange}
+			 * @signal
+			 */
+	        this.depth = this._lfo.amplitude;
+	        /**
+			 * How fast the filter modulates between min and max. 
+			 * @type {Frequency}
+			 * @signal
+			 */
+	        this.frequency = this._lfo.frequency;
+	        /**
+			 *  The filter node
+			 *  @type {Tone.Filter}
+			 */
+	        this.filter = new Tone.Filter(options.filter);
+	        /**
+			 *  The octaves placeholder
+			 *  @type {Positive}
+			 *  @private
+			 */
+	        this._octaves = 0;
+	        //connections
+	        this.connectEffect(this.filter);
+	        this._lfo.connect(this.filter.frequency);
+	        this.type = options.type;
+	        this._readOnly([
+	            'frequency',
+	            'depth'
+	        ]);
+	        this.octaves = options.octaves;
+	        this.baseFrequency = options.baseFrequency;
+	    };
+	    //extend Effect
+	    Tone.extend(Tone.AutoFilter, Tone.Effect);
+	    /**
+		 *  defaults
+		 *  @static
+		 *  @type {Object}
+		 */
+	    Tone.AutoFilter.defaults = {
+	        'frequency': 1,
+	        'type': 'sine',
+	        'depth': 1,
+	        'baseFrequency': 200,
+	        'octaves': 2.6,
+	        'filter': {
+	            'type': 'lowpass',
+	            'rolloff': -12,
+	            'Q': 1
+	        }
+	    };
+	    /**
+		 * Start the effect.
+		 * @param {Time} [time=now] When the LFO will start. 
+		 * @returns {Tone.AutoFilter} this
+		 */
+	    Tone.AutoFilter.prototype.start = function (time) {
+	        this._lfo.start(time);
+	        return this;
+	    };
+	    /**
+		 * Stop the effect.
+		 * @param {Time} [time=now] When the LFO will stop. 
+		 * @returns {Tone.AutoFilter} this
+		 */
+	    Tone.AutoFilter.prototype.stop = function (time) {
+	        this._lfo.stop(time);
+	        return this;
+	    };
+	    /**
+		 * Sync the filter to the transport.
+		 * @param {Time} [delay=0] Delay time before starting the effect after the
+		 *                               Transport has started. 
+		 * @returns {Tone.AutoFilter} this
+		 */
+	    Tone.AutoFilter.prototype.sync = function (delay) {
+	        this._lfo.sync(delay);
+	        return this;
+	    };
+	    /**
+		 * Unsync the filter from the transport.
+		 * @returns {Tone.AutoFilter} this
+		 */
+	    Tone.AutoFilter.prototype.unsync = function () {
+	        this._lfo.unsync();
+	        return this;
+	    };
+	    /**
+		 * Type of oscillator attached to the AutoFilter. 
+		 * Possible values: "sine", "square", "triangle", "sawtooth".
+		 * @memberOf Tone.AutoFilter#
+		 * @type {string}
+		 * @name type
+		 */
+	    Object.defineProperty(Tone.AutoFilter.prototype, 'type', {
+	        get: function () {
+	            return this._lfo.type;
+	        },
+	        set: function (type) {
+	            this._lfo.type = type;
+	        }
+	    });
+	    /**
+		 * The minimum value of the filter's cutoff frequency.
+		 * @memberOf Tone.AutoFilter#
+		 * @type {Frequency}
+		 * @name min
+		 */
+	    Object.defineProperty(Tone.AutoFilter.prototype, 'baseFrequency', {
+	        get: function () {
+	            return this._lfo.min;
+	        },
+	        set: function (freq) {
+	            this._lfo.min = this.toFrequency(freq);
+	            //and set the max
+	            this.octaves = this._octaves;
+	        }
+	    });
+	    /**
+		 * The maximum value of the filter's cutoff frequency. 
+		 * @memberOf Tone.AutoFilter#
+		 * @type {Positive}
+		 * @name octaves
+		 */
+	    Object.defineProperty(Tone.AutoFilter.prototype, 'octaves', {
+	        get: function () {
+	            return this._octaves;
+	        },
+	        set: function (oct) {
+	            this._octaves = oct;
+	            this._lfo.max = this.baseFrequency * Math.pow(2, oct);
+	        }
+	    });
+	    /**
+		 *  Clean up. 
+		 *  @returns {Tone.AutoFilter} this
+		 */
+	    Tone.AutoFilter.prototype.dispose = function () {
+	        Tone.Effect.prototype.dispose.call(this);
+	        this._lfo.dispose();
+	        this._lfo = null;
+	        this.filter.dispose();
+	        this.filter = null;
+	        this._writable([
+	            'frequency',
+	            'depth'
+	        ]);
+	        this.frequency = null;
+	        this.depth = null;
+	        return this;
+	    };
+	    return Tone.AutoFilter;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.AutoPanner is a Tone.Panner with an LFO connected to the pan amount. 
+		 *         More on using autopanners [here](https://www.ableton.com/en/blog/autopan-chopper-effect-and-more-liveschool/).
+		 *
+		 *  @constructor
+		 *  @extends {Tone.Effect}
+		 *  @param {Frequency|Object} [frequency] Rate of left-right oscillation. 
+		 *  @example
+		 * //create an autopanner and start it's LFO
+		 * var autoPanner = new Tone.AutoPanner("4n").toMaster().start();
+		 * //route an oscillator through the panner and start it
+		 * var oscillator = new Tone.Oscillator().connect(autoPanner).start();
+		 */
+	    Tone.AutoPanner = function () {
+	        var options = Tone.defaults(arguments, ['frequency'], Tone.AutoPanner);
+	        Tone.Effect.call(this, options);
+	        /**
+			 *  the lfo which drives the panning
+			 *  @type {Tone.LFO}
+			 *  @private
+			 */
+	        this._lfo = new Tone.LFO({
+	            'frequency': options.frequency,
+	            'amplitude': options.depth,
+	            'min': -1,
+	            'max': 1
+	        });
+	        /**
+			 * The amount of panning between left and right. 
+			 * 0 = always center. 1 = full range between left and right. 
+			 * @type {NormalRange}
+			 * @signal
+			 */
+	        this.depth = this._lfo.amplitude;
+	        /**
+			 *  the panner node which does the panning
+			 *  @type {Tone.Panner}
+			 *  @private
+			 */
+	        this._panner = new Tone.Panner();
+	        /**
+			 * How fast the panner modulates between left and right. 
+			 * @type {Frequency}
+			 * @signal
+			 */
+	        this.frequency = this._lfo.frequency;
+	        //connections
+	        this.connectEffect(this._panner);
+	        this._lfo.connect(this._panner.pan);
+	        this.type = options.type;
+	        this._readOnly([
+	            'depth',
+	            'frequency'
+	        ]);
+	    };
+	    //extend Effect
+	    Tone.extend(Tone.AutoPanner, Tone.Effect);
+	    /**
+		 *  defaults
+		 *  @static
+		 *  @type {Object}
+		 */
+	    Tone.AutoPanner.defaults = {
+	        'frequency': 1,
+	        'type': 'sine',
+	        'depth': 1
+	    };
+	    /**
+		 * Start the effect.
+		 * @param {Time} [time=now] When the LFO will start. 
+		 * @returns {Tone.AutoPanner} this
+		 */
+	    Tone.AutoPanner.prototype.start = function (time) {
+	        this._lfo.start(time);
+	        return this;
+	    };
+	    /**
+		 * Stop the effect.
+		 * @param {Time} [time=now] When the LFO will stop. 
+		 * @returns {Tone.AutoPanner} this
+		 */
+	    Tone.AutoPanner.prototype.stop = function (time) {
+	        this._lfo.stop(time);
+	        return this;
+	    };
+	    /**
+		 * Sync the panner to the transport.
+		 * @param {Time} [delay=0] Delay time before starting the effect after the
+		 *                               Transport has started. 
+		 * @returns {Tone.AutoPanner} this
+		 */
+	    Tone.AutoPanner.prototype.sync = function (delay) {
+	        this._lfo.sync(delay);
+	        return this;
+	    };
+	    /**
+		 * Unsync the panner from the transport
+		 * @returns {Tone.AutoPanner} this
+		 */
+	    Tone.AutoPanner.prototype.unsync = function () {
+	        this._lfo.unsync();
+	        return this;
+	    };
+	    /**
+		 * Type of oscillator attached to the AutoFilter. 
+		 * Possible values: "sine", "square", "triangle", "sawtooth".
+		 * @memberOf Tone.AutoFilter#
+		 * @type {string}
+		 * @name type
+		 */
+	    Object.defineProperty(Tone.AutoPanner.prototype, 'type', {
+	        get: function () {
+	            return this._lfo.type;
+	        },
+	        set: function (type) {
+	            this._lfo.type = type;
+	        }
+	    });
+	    /**
+		 *  clean up
+		 *  @returns {Tone.AutoPanner} this
+		 */
+	    Tone.AutoPanner.prototype.dispose = function () {
+	        Tone.Effect.prototype.dispose.call(this);
+	        this._lfo.dispose();
+	        this._lfo = null;
+	        this._panner.dispose();
+	        this._panner = null;
+	        this._writable([
+	            'depth',
+	            'frequency'
+	        ]);
+	        this.frequency = null;
+	        this.depth = null;
+	        return this;
+	    };
+	    return Tone.AutoPanner;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Tone.AutoWah connects a Tone.Follower to a bandpass filter (Tone.Filter).
+		 *          The frequency of the filter is adjusted proportionally to the
+		 *          incoming signal's amplitude. Inspiration from [Tuna.js](https://github.com/Dinahmoe/tuna).
+		 *
+		 *  @constructor
+		 *  @extends {Tone.Effect}
+		 *  @param {Frequency|Object} [baseFrequency] The frequency the filter is set
+		 *                                            to at the low point of the wah
+		 *  @param {Positive} [octaves] The number of octaves above the baseFrequency
+		 *                                the filter will sweep to when fully open
+		 *  @param {Decibels} [sensitivity] The decibel threshold sensitivity for
+		 *                                   the incoming signal. Normal range of -40 to 0.
+		 *  @example
+		 * var autoWah = new Tone.AutoWah(50, 6, -30).toMaster();
+		 * //initialize the synth and connect to autowah
+		 * var synth = new Synth.connect(autoWah);
+		 * //Q value influences the effect of the wah - default is 2
+		 * autoWah.Q.value = 6;
+		 * //more audible on higher notes
+		 * synth.triggerAttackRelease("C4", "8n")
+		 */
+	    Tone.AutoWah = function () {
+	        var options = Tone.defaults(arguments, [
+	            'baseFrequency',
+	            'octaves',
+	            'sensitivity'
+	        ], Tone.AutoWah);
+	        Tone.Effect.call(this, options);
+	        /**
+			 *  The envelope follower. Set the attack/release
+			 *  timing to adjust how the envelope is followed.
+			 *  @type {Tone.Follower}
+			 *  @private
+			 */
+	        this.follower = new Tone.Follower(options.follower);
+	        /**
+			 *  scales the follower value to the frequency domain
+			 *  @type {Tone}
+			 *  @private
+			 */
+	        this._sweepRange = new Tone.ScaleExp(0, 1, 0.5);
+	        /**
+			 *  @type {number}
+			 *  @private
+			 */
+	        this._baseFrequency = options.baseFrequency;
+	        /**
+			 *  @type {number}
+			 *  @private
+			 */
+	        this._octaves = options.octaves;
+	        /**
+			 *  the input gain to adjust the sensitivity
+			 *  @type {Tone.Gain}
+			 *  @private
+			 */
+	        this._inputBoost = new Tone.Gain();
+	        /**
+			 *  @type {BiquadFilterNode}
+			 *  @private
+			 */
+	        this._bandpass = new Tone.Filter({
+	            'rolloff': -48,
+	            'frequency': 0,
+	            'Q': options.Q
+	        });
+	        /**
+			 *  @type {Tone.Filter}
+			 *  @private
+			 */
+	        this._peaking = new Tone.Filter(0, 'peaking');
+	        this._peaking.gain.value = options.gain;
+	        /**
+			 * The gain of the filter.
+			 * @type {Number}
+			 * @signal
+			 */
+	        this.gain = this._peaking.gain;
+	        /**
+			 * The quality of the filter.
+			 * @type {Positive}
+			 * @signal
+			 */
+	        this.Q = this._bandpass.Q;
+	        //the control signal path
+	        this.effectSend.chain(this._inputBoost, this.follower, this._sweepRange);
+	        this._sweepRange.connect(this._bandpass.frequency);
+	        this._sweepRange.connect(this._peaking.frequency);
+	        //the filtered path
+	        this.effectSend.chain(this._bandpass, this._peaking, this.effectReturn);
+	        //set the initial value
+	        this._setSweepRange();
+	        this.sensitivity = options.sensitivity;
+	        this._readOnly([
+	            'gain',
+	            'Q'
+	        ]);
+	    };
+	    Tone.extend(Tone.AutoWah, Tone.Effect);
+	    /**
+		 *  @static
+		 *  @type {Object}
+		 */
+	    Tone.AutoWah.defaults = {
+	        'baseFrequency': 100,
+	        'octaves': 6,
+	        'sensitivity': 0,
+	        'Q': 2,
+	        'gain': 2,
+	        'follower': {
+	            'attack': 0.3,
+	            'release': 0.5
+	        }
+	    };
+	    /**
+		 * The number of octaves that the filter will sweep above the
+		 * baseFrequency.
+		 * @memberOf Tone.AutoWah#
+		 * @type {Number}
+		 * @name octaves
+		 */
+	    Object.defineProperty(Tone.AutoWah.prototype, 'octaves', {
+	        get: function () {
+	            return this._octaves;
+	        },
+	        set: function (octaves) {
+	            this._octaves = octaves;
+	            this._setSweepRange();
+	        }
+	    });
+	    /**
+		 * The base frequency from which the sweep will start from.
+		 * @memberOf Tone.AutoWah#
+		 * @type {Frequency}
+		 * @name baseFrequency
+		 */
+	    Object.defineProperty(Tone.AutoWah.prototype, 'baseFrequency', {
+	        get: function () {
+	            return this._baseFrequency;
+	        },
+	        set: function (baseFreq) {
+	            this._baseFrequency = baseFreq;
+	            this._setSweepRange();
+	        }
+	    });
+	    /**
+		 * The sensitivity to control how responsive to the input signal the filter is.
+		 * @memberOf Tone.AutoWah#
+		 * @type {Decibels}
+		 * @name sensitivity
+		 */
+	    Object.defineProperty(Tone.AutoWah.prototype, 'sensitivity', {
+	        get: function () {
+	            return Tone.gainToDb(1 / this._inputBoost.gain.value);
+	        },
+	        set: function (sensitivy) {
+	            this._inputBoost.gain.value = 1 / Tone.dbToGain(sensitivy);
+	        }
+	    });
+	    /**
+		 *  sets the sweep range of the scaler
+		 *  @private
+		 */
+	    Tone.AutoWah.prototype._setSweepRange = function () {
+	        this._sweepRange.min = this._baseFrequency;
+	        this._sweepRange.max = Math.min(this._baseFrequency * Math.pow(2, this._octaves), this.context.sampleRate / 2);
+	    };
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.AutoWah} this
+		 */
+	    Tone.AutoWah.prototype.dispose = function () {
+	        Tone.Effect.prototype.dispose.call(this);
+	        this.follower.dispose();
+	        this.follower = null;
+	        this._sweepRange.dispose();
+	        this._sweepRange = null;
+	        this._bandpass.dispose();
+	        this._bandpass = null;
+	        this._peaking.dispose();
+	        this._peaking = null;
+	        this._inputBoost.dispose();
+	        this._inputBoost = null;
+	        this._writable([
+	            'gain',
+	            'Q'
+	        ]);
+	        this.gain = null;
+	        this.Q = null;
+	        return this;
+	    };
+	    return Tone.AutoWah;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Signal-rate modulo operator. Only works in AudioRange [-1, 1] and for modulus
+		 *         values in the NormalRange.
+		 *
+		 *  @constructor
+		 *  @extends {Tone.SignalBase}
+		 *  @param {NormalRange} modulus The modulus to apply.
+		 *  @example
+		 * var mod = new Tone.Modulo(0.2)
+		 * var sig = new Tone.Signal(0.5).connect(mod);
+		 * //mod outputs 0.1
+		 */
+	    Tone.Modulo = function (modulus) {
+	        Tone.SignalBase.call(this);
+	        this.createInsOuts(1, 0);
+	        /**
+			 *  A waveshaper gets the integer multiple of
+			 *  the input signal and the modulus.
+			 *  @private
+			 *  @type {Tone.WaveShaper}
+			 */
+	        this._shaper = new Tone.WaveShaper(Math.pow(2, 16));
+	        /**
+			 *  the integer multiple is multiplied by the modulus
+			 *  @type  {Tone.Multiply}
+			 *  @private
+			 */
+	        this._multiply = new Tone.Multiply();
+	        /**
+			 *  and subtracted from the input signal
+			 *  @type  {Tone.Subtract}
+			 *  @private
+			 */
+	        this._subtract = this.output = new Tone.Subtract();
+	        /**
+			 *  the modulus signal
+			 *  @type  {Tone.Signal}
+			 *  @private
+			 */
+	        this._modSignal = new Tone.Signal(modulus);
+	        //connections
+	        this.input.fan(this._shaper, this._subtract);
+	        this._modSignal.connect(this._multiply, 0, 0);
+	        this._shaper.connect(this._multiply, 0, 1);
+	        this._multiply.connect(this._subtract, 0, 1);
+	        this._setWaveShaper(modulus);
+	    };
+	    Tone.extend(Tone.Modulo, Tone.SignalBase);
+	    /**
+		 *  @param  {number}  mod  the modulus to apply
+		 *  @private
+		 */
+	    Tone.Modulo.prototype._setWaveShaper = function (mod) {
+	        this._shaper.setMap(function (val) {
+	            var multiple = Math.floor((val + 0.0001) / mod);
+	            return multiple;
+	        });
+	    };
+	    /**
+		 * The modulus value.
+		 * @memberOf Tone.Modulo#
+		 * @type {NormalRange}
+		 * @name value
+		 */
+	    Object.defineProperty(Tone.Modulo.prototype, 'value', {
+	        get: function () {
+	            return this._modSignal.value;
+	        },
+	        set: function (mod) {
+	            this._modSignal.value = mod;
+	            this._setWaveShaper(mod);
+	        }
+	    });
+	    /**
+		 * clean up
+		 *  @returns {Tone.Modulo} this
+		 */
+	    Tone.Modulo.prototype.dispose = function () {
+	        Tone.SignalBase.prototype.dispose.call(this);
+	        this._shaper.dispose();
+	        this._shaper = null;
+	        this._multiply.dispose();
+	        this._multiply = null;
+	        this._subtract.dispose();
+	        this._subtract = null;
+	        this._modSignal.dispose();
+	        this._modSignal = null;
+	        return this;
+	    };
+	    return Tone.Modulo;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.Bitcrusher downsamples the incoming signal to a different bitdepth.
+		 *         Lowering the bitdepth of the signal creates distortion. Read more about Bitcrushing
+		 *         on [Wikipedia](https://en.wikipedia.org/wiki/Bitcrusher).
+		 *
+		 *  @constructor
+		 *  @extends {Tone.Effect}
+		 *  @param {Number} bits The number of bits to downsample the signal. Nominal range
+		 *                       of 1 to 8.
+		 *  @example
+		 * //initialize crusher and route a synth through it
+		 * var crusher = new Tone.BitCrusher(4).toMaster();
+		 * var synth = new Tone.MonoSynth().connect(crusher);
+		 */
+	    Tone.BitCrusher = function () {
+	        var options = Tone.defaults(arguments, ['bits'], Tone.BitCrusher);
+	        Tone.Effect.call(this, options);
+	        var invStepSize = 1 / Math.pow(2, options.bits - 1);
+	        /**
+			 *  Subtract the input signal and the modulus of the input signal
+			 *  @type {Tone.Subtract}
+			 *  @private
+			 */
+	        this._subtract = new Tone.Subtract();
+	        /**
+			 *  The mod function
+			 *  @type  {Tone.Modulo}
+			 *  @private
+			 */
+	        this._modulo = new Tone.Modulo(invStepSize);
+	        /**
+			 *  keeps track of the bits
+			 *  @type {number}
+			 *  @private
+			 */
+	        this._bits = options.bits;
+	        //connect it up
+	        this.effectSend.fan(this._subtract, this._modulo);
+	        this._modulo.connect(this._subtract, 0, 1);
+	        this._subtract.connect(this.effectReturn);
+	    };
+	    Tone.extend(Tone.BitCrusher, Tone.Effect);
+	    /**
+		 *  the default values
+		 *  @static
+		 *  @type {Object}
+		 */
+	    Tone.BitCrusher.defaults = { 'bits': 4 };
+	    /**
+		 * The bit depth of the effect. Nominal range of 1-8.
+		 * @memberOf Tone.BitCrusher#
+		 * @type {number}
+		 * @name bits
+		 */
+	    Object.defineProperty(Tone.BitCrusher.prototype, 'bits', {
+	        get: function () {
+	            return this._bits;
+	        },
+	        set: function (bits) {
+	            this._bits = bits;
+	            var invStepSize = 1 / Math.pow(2, bits - 1);
+	            this._modulo.value = invStepSize;
+	        }
+	    });
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.BitCrusher} this
+		 */
+	    Tone.BitCrusher.prototype.dispose = function () {
+	        Tone.Effect.prototype.dispose.call(this);
+	        this._subtract.dispose();
+	        this._subtract = null;
+	        this._modulo.dispose();
+	        this._modulo = null;
+	        return this;
+	    };
+	    return Tone.BitCrusher;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.ChebyShev is a Chebyshev waveshaper, an effect which is good 
+		 *         for making different types of distortion sounds.
+		 *         Note that odd orders sound very different from even ones, 
+		 *         and order = 1 is no change. 
+		 *         Read more at [music.columbia.edu](http://music.columbia.edu/cmc/musicandcomputers/chapter4/04_06.php).
+		 *
+		 *  @extends {Tone.Effect}
+		 *  @constructor
+		 *  @param {Positive|Object} [order] The order of the chebyshev polynomial. Normal range between 1-100. 
+		 *  @example
+		 * //create a new cheby
+		 * var cheby = new Tone.Chebyshev(50);
+		 * //create a monosynth connected to our cheby
+		 * synth = new Tone.MonoSynth().connect(cheby);
+		 */
+	    Tone.Chebyshev = function () {
+	        var options = Tone.defaults(arguments, ['order'], Tone.Chebyshev);
+	        Tone.Effect.call(this, options);
+	        /**
+			 *  @type {WaveShaperNode}
+			 *  @private
+			 */
+	        this._shaper = new Tone.WaveShaper(4096);
+	        /**
+			 * holds onto the order of the filter
+			 * @type {number}
+			 * @private
+			 */
+	        this._order = options.order;
+	        this.connectEffect(this._shaper);
+	        this.order = options.order;
+	        this.oversample = options.oversample;
+	    };
+	    Tone.extend(Tone.Chebyshev, Tone.Effect);
+	    /**
+		 *  @static
+		 *  @const
+		 *  @type {Object}
+		 */
+	    Tone.Chebyshev.defaults = {
+	        'order': 1,
+	        'oversample': 'none'
+	    };
+	    /**
+		 *  get the coefficient for that degree
+		 *  @param {number} x the x value
+		 *  @param   {number} degree 
+		 *  @param {Object} memo memoize the computed value. 
+		 *                       this speeds up computation greatly. 
+		 *  @return  {number}       the coefficient 
+		 *  @private
+		 */
+	    Tone.Chebyshev.prototype._getCoefficient = function (x, degree, memo) {
+	        if (memo.hasOwnProperty(degree)) {
+	            return memo[degree];
+	        } else if (degree === 0) {
+	            memo[degree] = 0;
+	        } else if (degree === 1) {
+	            memo[degree] = x;
+	        } else {
+	            memo[degree] = 2 * x * this._getCoefficient(x, degree - 1, memo) - this._getCoefficient(x, degree - 2, memo);
+	        }
+	        return memo[degree];
+	    };
+	    /**
+		 * The order of the Chebyshev polynomial which creates
+		 * the equation which is applied to the incoming 
+		 * signal through a Tone.WaveShaper. The equations
+		 * are in the form:<br>
+		 * order 2: 2x^2 + 1<br>
+		 * order 3: 4x^3 + 3x <br>
+		 * @memberOf Tone.Chebyshev#
+		 * @type {Positive}
+		 * @name order
+		 */
+	    Object.defineProperty(Tone.Chebyshev.prototype, 'order', {
+	        get: function () {
+	            return this._order;
+	        },
+	        set: function (order) {
+	            this._order = order;
+	            var curve = new Array(4096);
+	            var len = curve.length;
+	            for (var i = 0; i < len; ++i) {
+	                var x = i * 2 / len - 1;
+	                if (x === 0) {
+	                    //should output 0 when input is 0
+	                    curve[i] = 0;
+	                } else {
+	                    curve[i] = this._getCoefficient(x, order, {});
+	                }
+	            }
+	            this._shaper.curve = curve;
+	        }
+	    });
+	    /**
+		 * The oversampling of the effect. Can either be "none", "2x" or "4x".
+		 * @memberOf Tone.Chebyshev#
+		 * @type {string}
+		 * @name oversample
+		 */
+	    Object.defineProperty(Tone.Chebyshev.prototype, 'oversample', {
+	        get: function () {
+	            return this._shaper.oversample;
+	        },
+	        set: function (oversampling) {
+	            this._shaper.oversample = oversampling;
+	        }
+	    });
+	    /**
+		 *  Clean up. 
+		 *  @returns {Tone.Chebyshev} this
+		 */
+	    Tone.Chebyshev.prototype.dispose = function () {
+	        Tone.Effect.prototype.dispose.call(this);
+	        this._shaper.dispose();
+	        this._shaper = null;
+	        return this;
+	    };
+	    return Tone.Chebyshev;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Base class for Stereo effects. Provides effectSendL/R and effectReturnL/R.
+		 *
+		 *	@constructor
+		 *	@extends {Tone.Effect}
+		 */
+	    Tone.StereoEffect = function () {
+	        //get the defaults
+	        Tone.AudioNode.call(this);
+	        var options = Tone.defaults(arguments, ['wet'], Tone.Effect);
+	        this.createInsOuts(1, 1);
+	        /**
+			 *  the drywet knob to control the amount of effect
+			 *  @type {Tone.CrossFade}
+			 *  @private
+			 */
+	        this._dryWet = new Tone.CrossFade(options.wet);
+	        /**
+			 *  The wet control, i.e. how much of the effected
+			 *  will pass through to the output.
+			 *  @type {NormalRange}
+			 *  @signal
+			 */
+	        this.wet = this._dryWet.fade;
+	        /**
+			 *  then split it
+			 *  @type {Tone.Split}
+			 *  @private
+			 */
+	        this._split = new Tone.Split();
+	        /**
+			 *  the effects send LEFT
+			 *  @type {GainNode}
+			 *  @private
+			 */
+	        this.effectSendL = this._split.left;
+	        /**
+			 *  the effects send RIGHT
+			 *  @type {GainNode}
+			 *  @private
+			 */
+	        this.effectSendR = this._split.right;
+	        /**
+			 *  the stereo effect merger
+			 *  @type {Tone.Merge}
+			 *  @private
+			 */
+	        this._merge = new Tone.Merge();
+	        /**
+			 *  the effect return LEFT
+			 *  @type {GainNode}
+			 *  @private
+			 */
+	        this.effectReturnL = this._merge.left;
+	        /**
+			 *  the effect return RIGHT
+			 *  @type {GainNode}
+			 *  @private
+			 */
+	        this.effectReturnR = this._merge.right;
+	        //connections
+	        this.input.connect(this._split);
+	        //dry wet connections
+	        this.input.connect(this._dryWet, 0, 0);
+	        this._merge.connect(this._dryWet, 0, 1);
+	        this._dryWet.connect(this.output);
+	        this._readOnly(['wet']);
+	    };
+	    Tone.extend(Tone.StereoEffect, Tone.Effect);
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.StereoEffect} this
+		 */
+	    Tone.StereoEffect.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._dryWet.dispose();
+	        this._dryWet = null;
+	        this._split.dispose();
+	        this._split = null;
+	        this._merge.dispose();
+	        this._merge = null;
+	        this.effectSendL = null;
+	        this.effectSendR = null;
+	        this.effectReturnL = null;
+	        this.effectReturnR = null;
+	        this._writable(['wet']);
+	        this.wet = null;
+	        return this;
+	    };
+	    return Tone.StereoEffect;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.Chorus is a stereo chorus effect composed of
+		 *         a left and right delay with a Tone.LFO applied to the delayTime of each channel.
+		 *         Inspiration from [Tuna.js](https://github.com/Dinahmoe/tuna/blob/master/tuna.js).
+		 *         Read more on the chorus effect on [SoundOnSound](http://www.soundonsound.com/sos/jun04/articles/synthsecrets.htm).
+		 *
+		 *	@constructor
+		 *	@extends {Tone.StereoEffect}
+		 *	@param {Frequency|Object} [frequency] The frequency of the LFO.
+		 *	@param {Milliseconds} [delayTime] The delay of the chorus effect in ms.
+		 *	@param {NormalRange} [depth] The depth of the chorus.
+		 *	@example
+		 * var chorus = new Tone.Chorus(4, 2.5, 0.5);
+		 * var synth = new Tone.PolySynth(4, Tone.MonoSynth).connect(chorus);
+		 * synth.triggerAttackRelease(["C3","E3","G3"], "8n");
+		 */
+	    Tone.Chorus = function () {
+	        var options = Tone.defaults(arguments, [
+	            'frequency',
+	            'delayTime',
+	            'depth'
+	        ], Tone.Chorus);
+	        Tone.StereoEffect.call(this, options);
+	        /**
+			 *  the depth of the chorus
+			 *  @type {number}
+			 *  @private
+			 */
+	        this._depth = options.depth;
+	        /**
+			 *  the delayTime
+			 *  @type {number}
+			 *  @private
+			 */
+	        this._delayTime = options.delayTime / 1000;
+	        /**
+			 *  the lfo which controls the delayTime
+			 *  @type {Tone.LFO}
+			 *  @private
+			 */
+	        this._lfoL = new Tone.LFO({
+	            'frequency': options.frequency,
+	            'min': 0,
+	            'max': 1
+	        });
+	        /**
+			 *  another LFO for the right side with a 180 degree phase diff
+			 *  @type {Tone.LFO}
+			 *  @private
+			 */
+	        this._lfoR = new Tone.LFO({
+	            'frequency': options.frequency,
+	            'min': 0,
+	            'max': 1,
+	            'phase': 180
+	        });
+	        /**
+			 *  delay for left
+			 *  @type {Tone.Delay}
+			 *  @private
+			 */
+	        this._delayNodeL = new Tone.Delay();
+	        /**
+			 *  delay for right
+			 *  @type {Tone.Delay}
+			 *  @private
+			 */
+	        this._delayNodeR = new Tone.Delay();
+	        /**
+			 * The frequency of the LFO which modulates the delayTime.
+			 * @type {Frequency}
+			 * @signal
+			 */
+	        this.frequency = this._lfoL.frequency;
+	        //connections
+	        this.effectSendL.chain(this._delayNodeL, this.effectReturnL);
+	        this.effectSendR.chain(this._delayNodeR, this.effectReturnR);
+	        //and pass through to make the detune apparent
+	        this.effectSendL.connect(this.effectReturnL);
+	        this.effectSendR.connect(this.effectReturnR);
+	        //lfo setup
+	        this._lfoL.connect(this._delayNodeL.delayTime);
+	        this._lfoR.connect(this._delayNodeR.delayTime);
+	        //start the lfo
+	        this._lfoL.start();
+	        this._lfoR.start();
+	        //have one LFO frequency control the other
+	        this._lfoL.frequency.connect(this._lfoR.frequency);
+	        //set the initial values
+	        this.depth = this._depth;
+	        this.frequency.value = options.frequency;
+	        this.type = options.type;
+	        this._readOnly(['frequency']);
+	        this.spread = options.spread;
+	    };
+	    Tone.extend(Tone.Chorus, Tone.StereoEffect);
+	    /**
+		 *  @static
+		 *  @type {Object}
+		 */
+	    Tone.Chorus.defaults = {
+	        'frequency': 1.5,
+	        'delayTime': 3.5,
+	        'depth': 0.7,
+	        'type': 'sine',
+	        'spread': 180
+	    };
+	    /**
+		 * The depth of the effect. A depth of 1 makes the delayTime
+		 * modulate between 0 and 2*delayTime (centered around the delayTime).
+		 * @memberOf Tone.Chorus#
+		 * @type {NormalRange}
+		 * @name depth
+		 */
+	    Object.defineProperty(Tone.Chorus.prototype, 'depth', {
+	        get: function () {
+	            return this._depth;
+	        },
+	        set: function (depth) {
+	            this._depth = depth;
+	            var deviation = this._delayTime * depth;
+	            this._lfoL.min = Math.max(this._delayTime - deviation, 0);
+	            this._lfoL.max = this._delayTime + deviation;
+	            this._lfoR.min = Math.max(this._delayTime - deviation, 0);
+	            this._lfoR.max = this._delayTime + deviation;
+	        }
+	    });
+	    /**
+		 * The delayTime in milliseconds of the chorus. A larger delayTime
+		 * will give a more pronounced effect. Nominal range a delayTime
+		 * is between 2 and 20ms.
+		 * @memberOf Tone.Chorus#
+		 * @type {Milliseconds}
+		 * @name delayTime
+		 */
+	    Object.defineProperty(Tone.Chorus.prototype, 'delayTime', {
+	        get: function () {
+	            return this._delayTime * 1000;
+	        },
+	        set: function (delayTime) {
+	            this._delayTime = delayTime / 1000;
+	            this.depth = this._depth;
+	        }
+	    });
+	    /**
+		 * The oscillator type of the LFO.
+		 * @memberOf Tone.Chorus#
+		 * @type {string}
+		 * @name type
+		 */
+	    Object.defineProperty(Tone.Chorus.prototype, 'type', {
+	        get: function () {
+	            return this._lfoL.type;
+	        },
+	        set: function (type) {
+	            this._lfoL.type = type;
+	            this._lfoR.type = type;
+	        }
+	    });
+	    /**
+		 * Amount of stereo spread. When set to 0, both LFO's will be panned centrally.
+		 * When set to 180, LFO's will be panned hard left and right respectively.
+		 * @memberOf Tone.Chorus#
+		 * @type {Degrees}
+		 * @name spread
+		 */
+	    Object.defineProperty(Tone.Chorus.prototype, 'spread', {
+	        get: function () {
+	            return this._lfoR.phase - this._lfoL.phase;
+	        },
+	        set: function (spread) {
+	            this._lfoL.phase = 90 - spread / 2;
+	            this._lfoR.phase = spread / 2 + 90;
+	        }
+	    });
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.Chorus} this
+		 */
+	    Tone.Chorus.prototype.dispose = function () {
+	        Tone.StereoEffect.prototype.dispose.call(this);
+	        this._lfoL.dispose();
+	        this._lfoL = null;
+	        this._lfoR.dispose();
+	        this._lfoR = null;
+	        this._delayNodeL.dispose();
+	        this._delayNodeL = null;
+	        this._delayNodeR.dispose();
+	        this._delayNodeR = null;
+	        this._writable('frequency');
+	        this.frequency = null;
+	        return this;
+	    };
+	    return Tone.Chorus;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Tone.Convolver is a wrapper around the Native Web Audio
+		 *          [ConvolverNode](http://webaudio.github.io/web-audio-api/#the-convolvernode-interface).
+		 *          Convolution is useful for reverb and filter emulation. Read more about convolution reverb on
+		 *          [Wikipedia](https://en.wikipedia.org/wiki/Convolution_reverb).
+		 *
+		 *  @constructor
+		 *  @extends {Tone.Effect}
+		 *  @param {string|Tone.Buffer|Object} [url] The URL of the impulse response or the Tone.Buffer
+		 *                                           contianing the impulse response.
+		 *  @param {Function=} onload The callback to invoke when the url is loaded.
+		 *  @example
+		 * //initializing the convolver with an impulse response
+		 * var convolver = new Tone.Convolver("./path/to/ir.wav").toMaster();
+		 */
+	    Tone.Convolver = function () {
+	        var options = Tone.defaults(arguments, [
+	            'url',
+	            'onload'
+	        ], Tone.Convolver);
+	        Tone.Effect.call(this, options);
+	        /**
+			 *  convolver node
+			 *  @type {ConvolverNode}
+			 *  @private
+			 */
+	        this._convolver = this.context.createConvolver();
+	        /**
+			 *  the convolution buffer
+			 *  @type {Tone.Buffer}
+			 *  @private
+			 */
+	        this._buffer = new Tone.Buffer(options.url, function (buffer) {
+	            this._convolver.buffer = buffer.get();
+	            options.onload();
+	        }.bind(this));
+	        this.connectEffect(this._convolver);
+	    };
+	    Tone.extend(Tone.Convolver, Tone.Effect);
+	    /**
+		 *  @static
+		 *  @const
+		 *  @type  {Object}
+		 */
+	    Tone.Convolver.defaults = { 'onload': Tone.noOp };
+	    /**
+		 *  The convolver's buffer
+		 *  @memberOf Tone.Convolver#
+		 *  @type {AudioBuffer}
+		 *  @name buffer
+		 */
+	    Object.defineProperty(Tone.Convolver.prototype, 'buffer', {
+	        get: function () {
+	            return this._buffer.get();
+	        },
+	        set: function (buffer) {
+	            this._buffer.set(buffer);
+	            this._convolver.buffer = this._buffer.get();
+	        }
+	    });
+	    /**
+		 *  Load an impulse response url as an audio buffer.
+		 *  Decodes the audio asynchronously and invokes
+		 *  the callback once the audio buffer loads.
+		 *  @param {string} url The url of the buffer to load.
+		 *                      filetype support depends on the
+		 *                      browser.
+		 *  @param  {function=} callback
+		 *  @returns {Promise}
+		 */
+	    Tone.Convolver.prototype.load = function (url, callback) {
+	        return this._buffer.load(url, function (buff) {
+	            this.buffer = buff;
+	            if (callback) {
+	                callback();
+	            }
+	        }.bind(this));
+	    };
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.Convolver} this
+		 */
+	    Tone.Convolver.prototype.dispose = function () {
+	        Tone.Effect.prototype.dispose.call(this);
+	        this._convolver.disconnect();
+	        this._convolver = null;
+	        this._buffer.dispose();
+	        this._buffer = null;
+	        return this;
+	    };
+	    return Tone.Convolver;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.Distortion is a simple distortion effect using Tone.WaveShaper.
+		 *         Algorithm from [a stackoverflow answer](http://stackoverflow.com/a/22313408).
+		 *
+		 *  @extends {Tone.Effect}
+		 *  @constructor
+		 *  @param {Number|Object} [distortion] The amount of distortion (nominal range of 0-1)
+		 *  @example
+		 * var dist = new Tone.Distortion(0.8).toMaster();
+		 * var fm = new Tone.SimpleFM().connect(dist);
+		 * //this sounds good on bass notes
+		 * fm.triggerAttackRelease("A1", "8n");
+		 */
+	    Tone.Distortion = function () {
+	        var options = Tone.defaults(arguments, ['distortion'], Tone.Distortion);
+	        Tone.Effect.call(this, options);
+	        /**
+			 *  @type {Tone.WaveShaper}
+			 *  @private
+			 */
+	        this._shaper = new Tone.WaveShaper(4096);
+	        /**
+			 * holds the distortion amount
+			 * @type {number}
+			 * @private
+			 */
+	        this._distortion = options.distortion;
+	        this.connectEffect(this._shaper);
+	        this.distortion = options.distortion;
+	        this.oversample = options.oversample;
+	    };
+	    Tone.extend(Tone.Distortion, Tone.Effect);
+	    /**
+		 *  @static
+		 *  @const
+		 *  @type {Object}
+		 */
+	    Tone.Distortion.defaults = {
+	        'distortion': 0.4,
+	        'oversample': 'none'
+	    };
+	    /**
+		 * The amount of distortion.
+		 * @memberOf Tone.Distortion#
+		 * @type {NormalRange}
+		 * @name distortion
+		 */
+	    Object.defineProperty(Tone.Distortion.prototype, 'distortion', {
+	        get: function () {
+	            return this._distortion;
+	        },
+	        set: function (amount) {
+	            this._distortion = amount;
+	            var k = amount * 100;
+	            var deg = Math.PI / 180;
+	            this._shaper.setMap(function (x) {
+	                if (Math.abs(x) < 0.001) {
+	                    //should output 0 when input is 0
+	                    return 0;
+	                } else {
+	                    return (3 + k) * x * 20 * deg / (Math.PI + k * Math.abs(x));
+	                }
+	            });
+	        }
+	    });
+	    /**
+		 * The oversampling of the effect. Can either be "none", "2x" or "4x".
+		 * @memberOf Tone.Distortion#
+		 * @type {string}
+		 * @name oversample
+		 */
+	    Object.defineProperty(Tone.Distortion.prototype, 'oversample', {
+	        get: function () {
+	            return this._shaper.oversample;
+	        },
+	        set: function (oversampling) {
+	            this._shaper.oversample = oversampling;
+	        }
+	    });
+	    /**
+		 *  Clean up. 
+		 *  @returns {Tone.Distortion} this
+		 */
+	    Tone.Distortion.prototype.dispose = function () {
+	        Tone.Effect.prototype.dispose.call(this);
+	        this._shaper.dispose();
+	        this._shaper = null;
+	        return this;
+	    };
+	    return Tone.Distortion;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 * 	@class  Tone.FeedbackEffect provides a loop between an 
+		 * 	        audio source and its own output. This is a base-class
+		 * 	        for feedback effects. 
+		 *
+		 *  @constructor
+		 *  @extends {Tone.Effect}
+		 *  @param {NormalRange|Object} [feedback] The initial feedback value.
+		 */
+	    Tone.FeedbackEffect = function () {
+	        var options = Tone.defaults(arguments, ['feedback'], Tone.FeedbackEffect);
+	        Tone.Effect.call(this, options);
+	        /**
+			 *  the gain which controls the feedback
+			 *  @type {Tone.Gain}
+			 *  @private
+			 */
+	        this._feedbackGain = new Tone.Gain(options.feedback, Tone.Type.NormalRange);
+	        /**
+			 *  The amount of signal which is fed back into the effect input. 
+			 *  @type {NormalRange}
+			 *  @signal
+			 */
+	        this.feedback = this._feedbackGain.gain;
+	        //the feedback loop
+	        this.effectReturn.chain(this._feedbackGain, this.effectSend);
+	        this._readOnly(['feedback']);
+	    };
+	    Tone.extend(Tone.FeedbackEffect, Tone.Effect);
+	    /**
+		 *  @static
+		 *  @type {Object}
+		 */
+	    Tone.FeedbackEffect.defaults = { 'feedback': 0.125 };
+	    /**
+		 *  Clean up. 
+		 *  @returns {Tone.FeedbackEffect} this
+		 */
+	    Tone.FeedbackEffect.prototype.dispose = function () {
+	        Tone.Effect.prototype.dispose.call(this);
+	        this._writable(['feedback']);
+	        this._feedbackGain.dispose();
+	        this._feedbackGain = null;
+	        this.feedback = null;
+	        return this;
+	    };
+	    return Tone.FeedbackEffect;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Tone.FeedbackDelay is a DelayNode in which part of output
+		 *          signal is fed back into the delay.
+		 *
+		 *  @constructor
+		 *  @extends {Tone.FeedbackEffect}
+		 *  @param {Time|Object} [delayTime] The delay applied to the incoming signal.
+		 *  @param {NormalRange=} feedback The amount of the effected signal which
+		 *                            is fed back through the delay.
+		 *  @example
+		 * var feedbackDelay = new Tone.FeedbackDelay("8n", 0.5).toMaster();
+		 * var tom = new Tone.DrumSynth({
+		 * 	"octaves" : 4,
+		 * 	"pitchDecay" : 0.1
+		 * }).connect(feedbackDelay);
+		 * tom.triggerAttackRelease("A2","32n");
+		 */
+	    Tone.FeedbackDelay = function () {
+	        var options = Tone.defaults(arguments, [
+	            'delayTime',
+	            'feedback'
+	        ], Tone.FeedbackDelay);
+	        Tone.FeedbackEffect.call(this, options);
+	        /**
+			 *  the delay node
+			 *  @type {Tone.Delay}
+			 *  @private
+			 */
+	        this._delayNode = new Tone.Delay(options.delayTime, options.maxDelay);
+	        /**
+			 *  The delayTime of the DelayNode.
+			 *  @type {Time}
+			 *  @signal
+			 */
+	        this.delayTime = this._delayNode.delayTime;
+	        // connect it up
+	        this.connectEffect(this._delayNode);
+	        this._readOnly(['delayTime']);
+	    };
+	    Tone.extend(Tone.FeedbackDelay, Tone.FeedbackEffect);
+	    /**
+		 *  The default values.
+		 *  @const
+		 *  @static
+		 *  @type {Object}
+		 */
+	    Tone.FeedbackDelay.defaults = {
+	        'delayTime': 0.25,
+	        'maxDelay': 1
+	    };
+	    /**
+		 *  clean up
+		 *  @returns {Tone.FeedbackDelay} this
+		 */
+	    Tone.FeedbackDelay.prototype.dispose = function () {
+	        Tone.FeedbackEffect.prototype.dispose.call(this);
+	        this._delayNode.dispose();
+	        this._delayNode = null;
+	        this._writable(['delayTime']);
+	        this.delayTime = null;
+	        return this;
+	    };
+	    return Tone.FeedbackDelay;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  an array of comb filter delay values from Freeverb implementation
+		 *  @static
+		 *  @private
+		 *  @type {Array}
+		 */
+	    var combFilterTunings = [
+	        1557 / 44100,
+	        1617 / 44100,
+	        1491 / 44100,
+	        1422 / 44100,
+	        1277 / 44100,
+	        1356 / 44100,
+	        1188 / 44100,
+	        1116 / 44100
+	    ];
+	    /**
+		 *  an array of allpass filter frequency values from Freeverb implementation
+		 *  @private
+		 *  @static
+		 *  @type {Array}
+		 */
+	    var allpassFilterFrequencies = [
+	        225,
+	        556,
+	        441,
+	        341
+	    ];
+	    /**
+		 *  @class Tone.Freeverb is a reverb based on [Freeverb](https://ccrma.stanford.edu/~jos/pasp/Freeverb.html).
+		 *         Read more on reverb on [Sound On Sound](https://web.archive.org/web/20160404083902/http://www.soundonsound.com:80/sos/feb01/articles/synthsecrets.asp).
+		 *
+		 *  @extends {Tone.Effect}
+		 *  @constructor
+		 *  @param {NormalRange|Object} [roomSize] Correlated to the decay time.
+		 *  @param {Frequency} [dampening] The cutoff frequency of a lowpass filter as part
+		 *                                 of the reverb.
+		 *  @example
+		 * var freeverb = new Tone.Freeverb().toMaster();
+		 * freeverb.dampening.value = 1000;
+		 * //routing synth through the reverb
+		 * var synth = new Tone.AMSynth().connect(freeverb);
+		 */
+	    Tone.Freeverb = function () {
+	        var options = Tone.defaults(arguments, [
+	            'roomSize',
+	            'dampening'
+	        ], Tone.Freeverb);
+	        Tone.StereoEffect.call(this, options);
+	        /**
+			 *  The roomSize value between. A larger roomSize
+			 *  will result in a longer decay.
+			 *  @type {NormalRange}
+			 *  @signal
+			 */
+	        this.roomSize = new Tone.Signal(options.roomSize, Tone.Type.NormalRange);
+	        /**
+			 *  The amount of dampening of the reverberant signal.
+			 *  @type {Frequency}
+			 *  @signal
+			 */
+	        this.dampening = new Tone.Signal(options.dampening, Tone.Type.Frequency);
+	        /**
+			 *  the comb filters
+			 *  @type {Array}
+			 *  @private
+			 */
+	        this._combFilters = [];
+	        /**
+			 *  the allpass filters on the left
+			 *  @type {Array}
+			 *  @private
+			 */
+	        this._allpassFiltersL = [];
+	        /**
+			 *  the allpass filters on the right
+			 *  @type {Array}
+			 *  @private
+			 */
+	        this._allpassFiltersR = [];
+	        //make the allpass filters on the right
+	        for (var l = 0; l < allpassFilterFrequencies.length; l++) {
+	            var allpassL = this.context.createBiquadFilter();
+	            allpassL.type = 'allpass';
+	            allpassL.frequency.value = allpassFilterFrequencies[l];
+	            this._allpassFiltersL.push(allpassL);
+	        }
+	        //make the allpass filters on the left
+	        for (var r = 0; r < allpassFilterFrequencies.length; r++) {
+	            var allpassR = this.context.createBiquadFilter();
+	            allpassR.type = 'allpass';
+	            allpassR.frequency.value = allpassFilterFrequencies[r];
+	            this._allpassFiltersR.push(allpassR);
+	        }
+	        //make the comb filters
+	        for (var c = 0; c < combFilterTunings.length; c++) {
+	            var lfpf = new Tone.LowpassCombFilter(combFilterTunings[c]);
+	            if (c < combFilterTunings.length / 2) {
+	                this.effectSendL.chain(lfpf, this._allpassFiltersL[0]);
+	            } else {
+	                this.effectSendR.chain(lfpf, this._allpassFiltersR[0]);
+	            }
+	            this.roomSize.connect(lfpf.resonance);
+	            this.dampening.connect(lfpf.dampening);
+	            this._combFilters.push(lfpf);
+	        }
+	        //chain the allpass filters togetehr
+	        Tone.connectSeries.apply(Tone, this._allpassFiltersL);
+	        Tone.connectSeries.apply(Tone, this._allpassFiltersR);
+	        this._allpassFiltersL[this._allpassFiltersL.length - 1].connect(this.effectReturnL);
+	        this._allpassFiltersR[this._allpassFiltersR.length - 1].connect(this.effectReturnR);
+	        this._readOnly([
+	            'roomSize',
+	            'dampening'
+	        ]);
+	    };
+	    Tone.extend(Tone.Freeverb, Tone.StereoEffect);
+	    /**
+		 *  @static
+		 *  @type {Object}
+		 */
+	    Tone.Freeverb.defaults = {
+	        'roomSize': 0.7,
+	        'dampening': 3000
+	    };
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.Freeverb} this
+		 */
+	    Tone.Freeverb.prototype.dispose = function () {
+	        Tone.StereoEffect.prototype.dispose.call(this);
+	        for (var al = 0; al < this._allpassFiltersL.length; al++) {
+	            this._allpassFiltersL[al].disconnect();
+	            this._allpassFiltersL[al] = null;
+	        }
+	        this._allpassFiltersL = null;
+	        for (var ar = 0; ar < this._allpassFiltersR.length; ar++) {
+	            this._allpassFiltersR[ar].disconnect();
+	            this._allpassFiltersR[ar] = null;
+	        }
+	        this._allpassFiltersR = null;
+	        for (var cf = 0; cf < this._combFilters.length; cf++) {
+	            this._combFilters[cf].dispose();
+	            this._combFilters[cf] = null;
+	        }
+	        this._combFilters = null;
+	        this._writable([
+	            'roomSize',
+	            'dampening'
+	        ]);
+	        this.roomSize.dispose();
+	        this.roomSize = null;
+	        this.dampening.dispose();
+	        this.dampening = null;
+	        return this;
+	    };
+	    return Tone.Freeverb;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  an array of the comb filter delay time values
+		 *  @private
+		 *  @static
+		 *  @type {Array}
+		 */
+	    var combFilterDelayTimes = [
+	        1687 / 25000,
+	        1601 / 25000,
+	        2053 / 25000,
+	        2251 / 25000
+	    ];
+	    /**
+		 *  the resonances of each of the comb filters
+		 *  @private
+		 *  @static
+		 *  @type {Array}
+		 */
+	    var combFilterResonances = [
+	        0.773,
+	        0.802,
+	        0.753,
+	        0.733
+	    ];
+	    /**
+		 *  the allpass filter frequencies
+		 *  @private
+		 *  @static
+		 *  @type {Array}
+		 */
+	    var allpassFilterFreqs = [
+	        347,
+	        113,
+	        37
+	    ];
+	    /**
+		 *  @class Tone.JCReverb is a simple [Schroeder Reverberator](https://ccrma.stanford.edu/~jos/pasp/Schroeder_Reverberators.html)
+		 *         tuned by John Chowning in 1970.
+		 *         It is made up of three allpass filters and four Tone.FeedbackCombFilter.
+		 *
+		 *
+		 *  @extends {Tone.Effect}
+		 *  @constructor
+		 *  @param {NormalRange|Object} [roomSize] Coorelates to the decay time.
+		 *  @example
+		 * var reverb = new Tone.JCReverb(0.4).connect(Tone.Master);
+		 * var delay = new Tone.FeedbackDelay(0.5);
+		 * //connecting the synth to reverb through delay
+		 * var synth = new Tone.DuoSynth().chain(delay, reverb);
+		 * synth.triggerAttackRelease("A4","8n");
+		 */
+	    Tone.JCReverb = function () {
+	        var options = Tone.defaults(arguments, ['roomSize'], Tone.JCReverb);
+	        Tone.StereoEffect.call(this, options);
+	        /**
+			 *  room size control values between [0,1]
+			 *  @type {NormalRange}
+			 *  @signal
+			 */
+	        this.roomSize = new Tone.Signal(options.roomSize, Tone.Type.NormalRange);
+	        /**
+			 *  scale the room size
+			 *  @type {Tone.Scale}
+			 *  @private
+			 */
+	        this._scaleRoomSize = new Tone.Scale(-0.733, 0.197);
+	        /**
+			 *  a series of allpass filters
+			 *  @type {Array}
+			 *  @private
+			 */
+	        this._allpassFilters = [];
+	        /**
+			 *  parallel feedback comb filters
+			 *  @type {Array}
+			 *  @private
+			 */
+	        this._feedbackCombFilters = [];
+	        //make the allpass filters
+	        for (var af = 0; af < allpassFilterFreqs.length; af++) {
+	            var allpass = this.context.createBiquadFilter();
+	            allpass.type = 'allpass';
+	            allpass.frequency.value = allpassFilterFreqs[af];
+	            this._allpassFilters.push(allpass);
+	        }
+	        //and the comb filters
+	        for (var cf = 0; cf < combFilterDelayTimes.length; cf++) {
+	            var fbcf = new Tone.FeedbackCombFilter(combFilterDelayTimes[cf], 0.1);
+	            this._scaleRoomSize.connect(fbcf.resonance);
+	            fbcf.resonance.value = combFilterResonances[cf];
+	            this._allpassFilters[this._allpassFilters.length - 1].connect(fbcf);
+	            if (cf < combFilterDelayTimes.length / 2) {
+	                fbcf.connect(this.effectReturnL);
+	            } else {
+	                fbcf.connect(this.effectReturnR);
+	            }
+	            this._feedbackCombFilters.push(fbcf);
+	        }
+	        //chain the allpass filters together
+	        this.roomSize.connect(this._scaleRoomSize);
+	        Tone.connectSeries.apply(Tone, this._allpassFilters);
+	        this.effectSendL.connect(this._allpassFilters[0]);
+	        this.effectSendR.connect(this._allpassFilters[0]);
+	        this._readOnly(['roomSize']);
+	    };
+	    Tone.extend(Tone.JCReverb, Tone.StereoEffect);
+	    /**
+		 *  the default values
+		 *  @static
+		 *  @const
+		 *  @type {Object}
+		 */
+	    Tone.JCReverb.defaults = { 'roomSize': 0.5 };
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.JCReverb} this
+		 */
+	    Tone.JCReverb.prototype.dispose = function () {
+	        Tone.StereoEffect.prototype.dispose.call(this);
+	        for (var apf = 0; apf < this._allpassFilters.length; apf++) {
+	            this._allpassFilters[apf].disconnect();
+	            this._allpassFilters[apf] = null;
+	        }
+	        this._allpassFilters = null;
+	        for (var fbcf = 0; fbcf < this._feedbackCombFilters.length; fbcf++) {
+	            this._feedbackCombFilters[fbcf].dispose();
+	            this._feedbackCombFilters[fbcf] = null;
+	        }
+	        this._feedbackCombFilters = null;
+	        this._writable(['roomSize']);
+	        this.roomSize.dispose();
+	        this.roomSize = null;
+	        this._scaleRoomSize.dispose();
+	        this._scaleRoomSize = null;
+	        return this;
+	    };
+	    return Tone.JCReverb;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Mid/Side processing separates the the 'mid' signal
+		 *         (which comes out of both the left and the right channel)
+		 *         and the 'side' (which only comes out of the the side channels)
+		 *         and effects them separately before being recombined.
+		 *         Applies a Mid/Side seperation and recombination.
+		 *         Algorithm found in [kvraudio forums](http://www.kvraudio.com/forum/viewtopic.php?t=212587).
+		 *         <br><br>
+		 *         This is a base-class for Mid/Side Effects.
+		 *
+		 *  @extends {Tone.Effect}
+		 *  @constructor
+		 */
+	    Tone.MidSideEffect = function () {
+	        Tone.Effect.apply(this, arguments);
+	        /**
+			 *  The mid/side split
+			 *  @type  {Tone.MidSideSplit}
+			 *  @private
+			 */
+	        this._midSideSplit = new Tone.MidSideSplit();
+	        /**
+			 *  The mid/side merge
+			 *  @type  {Tone.MidSideMerge}
+			 *  @private
+			 */
+	        this._midSideMerge = new Tone.MidSideMerge();
+	        /**
+			 *  The mid send. Connect to mid processing
+			 *  @type {Tone}
+			 *  @private
+			 */
+	        this.midSend = this._midSideSplit.mid;
+	        /**
+			 *  The side send. Connect to side processing
+			 *  @type {Tone}
+			 *  @private
+			 */
+	        this.sideSend = this._midSideSplit.side;
+	        /**
+			 *  The mid return connection
+			 *  @type {GainNode}
+			 *  @private
+			 */
+	        this.midReturn = this._midSideMerge.mid;
+	        /**
+			 *  The side return connection
+			 *  @type {GainNode}
+			 *  @private
+			 */
+	        this.sideReturn = this._midSideMerge.side;
+	        //the connections
+	        this.effectSend.connect(this._midSideSplit);
+	        this._midSideMerge.connect(this.effectReturn);
+	    };
+	    Tone.extend(Tone.MidSideEffect, Tone.Effect);
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.MidSideEffect} this
+		 */
+	    Tone.MidSideEffect.prototype.dispose = function () {
+	        Tone.Effect.prototype.dispose.call(this);
+	        this._midSideSplit.dispose();
+	        this._midSideSplit = null;
+	        this._midSideMerge.dispose();
+	        this._midSideMerge = null;
+	        this.midSend = null;
+	        this.sideSend = null;
+	        this.midReturn = null;
+	        this.sideReturn = null;
+	        return this;
+	    };
+	    return Tone.MidSideEffect;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.Phaser is a phaser effect. Phasers work by changing the phase
+		 *         of different frequency components of an incoming signal. Read more on
+		 *         [Wikipedia](https://en.wikipedia.org/wiki/Phaser_(effect)).
+		 *         Inspiration for this phaser comes from [Tuna.js](https://github.com/Dinahmoe/tuna/).
+		 *
+		 *	@extends {Tone.StereoEffect}
+		 *	@constructor
+		 *	@param {Frequency|Object} [frequency] The speed of the phasing.
+		 *	@param {number} [octaves] The octaves of the effect.
+		 *	@param {Frequency} [baseFrequency] The base frequency of the filters.
+		 *	@example
+		 * var phaser = new Tone.Phaser({
+		 * 	"frequency" : 15,
+		 * 	"octaves" : 5,
+		 * 	"baseFrequency" : 1000
+		 * }).toMaster();
+		 * var synth = new Tone.FMSynth().connect(phaser);
+		 * synth.triggerAttackRelease("E3", "2n");
+		 */
+	    Tone.Phaser = function () {
+	        //set the defaults
+	        var options = Tone.defaults(arguments, [
+	            'frequency',
+	            'octaves',
+	            'baseFrequency'
+	        ], Tone.Phaser);
+	        Tone.StereoEffect.call(this, options);
+	        /**
+			 *  the lfo which controls the frequency on the left side
+			 *  @type {Tone.LFO}
+			 *  @private
+			 */
+	        this._lfoL = new Tone.LFO(options.frequency, 0, 1);
+	        /**
+			 *  the lfo which controls the frequency on the right side
+			 *  @type {Tone.LFO}
+			 *  @private
+			 */
+	        this._lfoR = new Tone.LFO(options.frequency, 0, 1);
+	        this._lfoR.phase = 180;
+	        /**
+			 *  the base modulation frequency
+			 *  @type {number}
+			 *  @private
+			 */
+	        this._baseFrequency = options.baseFrequency;
+	        /**
+			 *  the octaves of the phasing
+			 *  @type {number}
+			 *  @private
+			 */
+	        this._octaves = options.octaves;
+	        /**
+			 *  The quality factor of the filters
+			 *  @type {Positive}
+			 *  @signal
+			 */
+	        this.Q = new Tone.Signal(options.Q, Tone.Type.Positive);
+	        /**
+			 *  the array of filters for the left side
+			 *  @type {Array}
+			 *  @private
+			 */
+	        this._filtersL = this._makeFilters(options.stages, this._lfoL, this.Q);
+	        /**
+			 *  the array of filters for the left side
+			 *  @type {Array}
+			 *  @private
+			 */
+	        this._filtersR = this._makeFilters(options.stages, this._lfoR, this.Q);
+	        /**
+			 * the frequency of the effect
+			 * @type {Tone.Signal}
+			 */
+	        this.frequency = this._lfoL.frequency;
+	        this.frequency.value = options.frequency;
+	        //connect them up
+	        this.effectSendL.connect(this._filtersL[0]);
+	        this.effectSendR.connect(this._filtersR[0]);
+	        this._filtersL[options.stages - 1].connect(this.effectReturnL);
+	        this._filtersR[options.stages - 1].connect(this.effectReturnR);
+	        //control the frequency with one LFO
+	        this._lfoL.frequency.connect(this._lfoR.frequency);
+	        //set the options
+	        this.baseFrequency = options.baseFrequency;
+	        this.octaves = options.octaves;
+	        //start the lfo
+	        this._lfoL.start();
+	        this._lfoR.start();
+	        this._readOnly([
+	            'frequency',
+	            'Q'
+	        ]);
+	    };
+	    Tone.extend(Tone.Phaser, Tone.StereoEffect);
+	    /**
+		 *  defaults
+		 *  @static
+		 *  @type {object}
+		 */
+	    Tone.Phaser.defaults = {
+	        'frequency': 0.5,
+	        'octaves': 3,
+	        'stages': 10,
+	        'Q': 10,
+	        'baseFrequency': 350
+	    };
+	    /**
+		 *  @param {number} stages
+		 *  @returns {Array} the number of filters all connected together
+		 *  @private
+		 */
+	    Tone.Phaser.prototype._makeFilters = function (stages, connectToFreq, Q) {
+	        var filters = new Array(stages);
+	        //make all the filters
+	        for (var i = 0; i < stages; i++) {
+	            var filter = this.context.createBiquadFilter();
+	            filter.type = 'allpass';
+	            Q.connect(filter.Q);
+	            connectToFreq.connect(filter.frequency);
+	            filters[i] = filter;
+	        }
+	        Tone.connectSeries.apply(Tone, filters);
+	        return filters;
+	    };
+	    /**
+		 * The number of octaves the phase goes above
+		 * the baseFrequency
+		 * @memberOf Tone.Phaser#
+		 * @type {Positive}
+		 * @name octaves
+		 */
+	    Object.defineProperty(Tone.Phaser.prototype, 'octaves', {
+	        get: function () {
+	            return this._octaves;
+	        },
+	        set: function (octaves) {
+	            this._octaves = octaves;
+	            var max = this._baseFrequency * Math.pow(2, octaves);
+	            this._lfoL.max = max;
+	            this._lfoR.max = max;
+	        }
+	    });
+	    /**
+		 * The the base frequency of the filters.
+		 * @memberOf Tone.Phaser#
+		 * @type {number}
+		 * @name baseFrequency
+		 */
+	    Object.defineProperty(Tone.Phaser.prototype, 'baseFrequency', {
+	        get: function () {
+	            return this._baseFrequency;
+	        },
+	        set: function (freq) {
+	            this._baseFrequency = freq;
+	            this._lfoL.min = freq;
+	            this._lfoR.min = freq;
+	            this.octaves = this._octaves;
+	        }
+	    });
+	    /**
+		 *  clean up
+		 *  @returns {Tone.Phaser} this
+		 */
+	    Tone.Phaser.prototype.dispose = function () {
+	        Tone.StereoEffect.prototype.dispose.call(this);
+	        this._writable([
+	            'frequency',
+	            'Q'
+	        ]);
+	        this.Q.dispose();
+	        this.Q = null;
+	        this._lfoL.dispose();
+	        this._lfoL = null;
+	        this._lfoR.dispose();
+	        this._lfoR = null;
+	        for (var i = 0; i < this._filtersL.length; i++) {
+	            this._filtersL[i].disconnect();
+	            this._filtersL[i] = null;
+	        }
+	        this._filtersL = null;
+	        for (var j = 0; j < this._filtersR.length; j++) {
+	            this._filtersR[j].disconnect();
+	            this._filtersR[j] = null;
+	        }
+	        this._filtersR = null;
+	        this.frequency = null;
+	        return this;
+	    };
+	    return Tone.Phaser;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Just like a stereo feedback effect, but the feedback is routed from left to right
+		 *         and right to left instead of on the same channel.
+		 *
+		 *	@constructor
+		 *	@extends {Tone.StereoEffect}
+		 */
+	    Tone.StereoXFeedbackEffect = function () {
+	        var options = Tone.defaults(arguments, ['feedback'], Tone.FeedbackEffect);
+	        Tone.StereoEffect.call(this, options);
+	        /**
+			 *  The amount of feedback from the output
+			 *  back into the input of the effect (routed
+			 *  across left and right channels).
+			 *  @type {NormalRange}
+			 *  @signal
+			 */
+	        this.feedback = new Tone.Signal(options.feedback, Tone.Type.NormalRange);
+	        /**
+			 *  the left side feeback
+			 *  @type {Tone.Gain}
+			 *  @private
+			 */
+	        this._feedbackLR = new Tone.Gain();
+	        /**
+			 *  the right side feeback
+			 *  @type {Tone.Gain}
+			 *  @private
+			 */
+	        this._feedbackRL = new Tone.Gain();
+	        //connect it up
+	        this.effectReturnL.chain(this._feedbackLR, this.effectSendR);
+	        this.effectReturnR.chain(this._feedbackRL, this.effectSendL);
+	        this.feedback.fan(this._feedbackLR.gain, this._feedbackRL.gain);
+	        this._readOnly(['feedback']);
+	    };
+	    Tone.extend(Tone.StereoXFeedbackEffect, Tone.StereoEffect);
+	    /**
+		 *  clean up
+		 *  @returns {Tone.StereoXFeedbackEffect} this
+		 */
+	    Tone.StereoXFeedbackEffect.prototype.dispose = function () {
+	        Tone.StereoEffect.prototype.dispose.call(this);
+	        this._writable(['feedback']);
+	        this.feedback.dispose();
+	        this.feedback = null;
+	        this._feedbackLR.dispose();
+	        this._feedbackLR = null;
+	        this._feedbackRL.dispose();
+	        this._feedbackRL = null;
+	        return this;
+	    };
+	    return Tone.StereoXFeedbackEffect;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Tone.PingPongDelay is a feedback delay effect where the echo is heard
+		 *          first in one channel and next in the opposite channel. In a stereo
+		 *          system these are the right and left channels.
+		 *          PingPongDelay in more simplified terms is two Tone.FeedbackDelays
+		 *          with independent delay values. Each delay is routed to one channel
+		 *          (left or right), and the channel triggered second will always
+		 *          trigger at the same interval after the first.
+		 *
+		 * 	@constructor
+		 * 	@extends {Tone.StereoXFeedbackEffect}
+		 *  @param {Time|Object} [delayTime] The delayTime between consecutive echos.
+		 *  @param {NormalRange=} feedback The amount of the effected signal which
+		 *                                 is fed back through the delay.
+		 *  @example
+		 * var pingPong = new Tone.PingPongDelay("4n", 0.2).toMaster();
+		 * var drum = new Tone.DrumSynth().connect(pingPong);
+		 * drum.triggerAttackRelease("C4", "32n");
+		 */
+	    Tone.PingPongDelay = function () {
+	        var options = Tone.defaults(arguments, [
+	            'delayTime',
+	            'feedback'
+	        ], Tone.PingPongDelay);
+	        Tone.StereoXFeedbackEffect.call(this, options);
+	        /**
+			 *  the delay node on the left side
+			 *  @type {Tone.Delay}
+			 *  @private
+			 */
+	        this._leftDelay = new Tone.Delay(0, options.maxDelayTime);
+	        /**
+			 *  the delay node on the right side
+			 *  @type {Tone.Delay}
+			 *  @private
+			 */
+	        this._rightDelay = new Tone.Delay(0, options.maxDelayTime);
+	        /**
+			 *  the predelay on the right side
+			 *  @type {Tone.Delay}
+			 *  @private
+			 */
+	        this._rightPreDelay = new Tone.Delay(0, options.maxDelayTime);
+	        /**
+			 *  the delay time signal
+			 *  @type {Time}
+			 *  @signal
+			 */
+	        this.delayTime = new Tone.Signal(options.delayTime, Tone.Type.Time);
+	        //connect it up
+	        this.effectSendL.chain(this._leftDelay, this.effectReturnL);
+	        this.effectSendR.chain(this._rightPreDelay, this._rightDelay, this.effectReturnR);
+	        this.delayTime.fan(this._leftDelay.delayTime, this._rightDelay.delayTime, this._rightPreDelay.delayTime);
+	        //rearranged the feedback to be after the rightPreDelay
+	        this._feedbackLR.disconnect();
+	        this._feedbackLR.connect(this._rightDelay);
+	        this._readOnly(['delayTime']);
+	    };
+	    Tone.extend(Tone.PingPongDelay, Tone.StereoXFeedbackEffect);
+	    /**
+		 *  @static
+		 *  @type {Object}
+		 */
+	    Tone.PingPongDelay.defaults = {
+	        'delayTime': 0.25,
+	        'maxDelayTime': 1
+	    };
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.PingPongDelay} this
+		 */
+	    Tone.PingPongDelay.prototype.dispose = function () {
+	        Tone.StereoXFeedbackEffect.prototype.dispose.call(this);
+	        this._leftDelay.dispose();
+	        this._leftDelay = null;
+	        this._rightDelay.dispose();
+	        this._rightDelay = null;
+	        this._rightPreDelay.dispose();
+	        this._rightPreDelay = null;
+	        this._writable(['delayTime']);
+	        this.delayTime.dispose();
+	        this.delayTime = null;
+	        return this;
+	    };
+	    return Tone.PingPongDelay;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.PitchShift does near-realtime pitch shifting to the incoming signal.
+		 *         The effect is achieved by speeding up or slowing down the delayTime
+		 *         of a DelayNode using a sawtooth wave.
+		 *         Algorithm found in [this pdf](http://dsp-book.narod.ru/soundproc.pdf).
+		 *         Additional reference by [Miller Pucket](http://msp.ucsd.edu/techniques/v0.11/book-html/node115.html).
+		 *
+		 *  @extends {Tone.FeedbackEffect}
+		 *  @param {Interval=} pitch The interval to transpose the incoming signal by.
+		 */
+	    Tone.PitchShift = function () {
+	        var options = Tone.defaults(arguments, ['pitch'], Tone.PitchShift);
+	        Tone.FeedbackEffect.call(this, options);
+	        /**
+			 *  The pitch signal
+			 *  @type  {Tone.Signal}
+			 *  @private
+			 */
+	        this._frequency = new Tone.Signal(0);
+	        /**
+			 *  Uses two DelayNodes to cover up the jump in
+			 *  the sawtooth wave.
+			 *  @type  {DelayNode}
+			 *  @private
+			 */
+	        this._delayA = new Tone.Delay(0, 1);
+	        /**
+			 *  The first LFO.
+			 *  @type  {Tone.LFO}
+			 *  @private
+			 */
+	        this._lfoA = new Tone.LFO({
+	            'min': 0,
+	            'max': 0.1,
+	            'type': 'sawtooth'
+	        }).connect(this._delayA.delayTime);
+	        /**
+			 *  The second DelayNode
+			 *  @type  {DelayNode}
+			 *  @private
+			 */
+	        this._delayB = new Tone.Delay(0, 1);
+	        /**
+			 *  The first LFO.
+			 *  @type  {Tone.LFO}
+			 *  @private
+			 */
+	        this._lfoB = new Tone.LFO({
+	            'min': 0,
+	            'max': 0.1,
+	            'type': 'sawtooth',
+	            'phase': 180
+	        }).connect(this._delayB.delayTime);
+	        /**
+			 *  Crossfade quickly between the two delay lines
+			 *  to cover up the jump in the sawtooth wave
+			 *  @type  {Tone.CrossFade}
+			 *  @private
+			 */
+	        this._crossFade = new Tone.CrossFade();
+	        /**
+			 *  LFO which alternates between the two
+			 *  delay lines to cover up the disparity in the
+			 *  sawtooth wave.
+			 *  @type  {Tone.LFO}
+			 *  @private
+			 */
+	        this._crossFadeLFO = new Tone.LFO({
+	            'min': 0,
+	            'max': 1,
+	            'type': 'triangle',
+	            'phase': 90
+	        }).connect(this._crossFade.fade);
+	        /**
+			 *  The delay node
+			 *  @type {Tone.Delay}
+			 *  @private
+			 */
+	        this._feedbackDelay = new Tone.Delay(options.delayTime);
+	        /**
+			 *  The amount of delay on the input signal
+			 *  @type {Time}
+			 *  @signal
+			 */
+	        this.delayTime = this._feedbackDelay.delayTime;
+	        this._readOnly('delayTime');
+	        /**
+			 *  Hold the current pitch
+			 *  @type {Number}
+			 *  @private
+			 */
+	        this._pitch = options.pitch;
+	        /**
+			 *  Hold the current windowSize
+			 *  @type {Number}
+			 *  @private
+			 */
+	        this._windowSize = options.windowSize;
+	        //connect the two delay lines up
+	        this._delayA.connect(this._crossFade.a);
+	        this._delayB.connect(this._crossFade.b);
+	        //connect the frequency
+	        this._frequency.fan(this._lfoA.frequency, this._lfoB.frequency, this._crossFadeLFO.frequency);
+	        //route the input
+	        this.effectSend.fan(this._delayA, this._delayB);
+	        this._crossFade.chain(this._feedbackDelay, this.effectReturn);
+	        //start the LFOs at the same time
+	        var now = this.now();
+	        this._lfoA.start(now);
+	        this._lfoB.start(now);
+	        this._crossFadeLFO.start(now);
+	        //set the initial value
+	        this.windowSize = this._windowSize;
+	    };
+	    Tone.extend(Tone.PitchShift, Tone.FeedbackEffect);
+	    /**
+		 *  default values
+		 *  @static
+		 *  @type {Object}
+		 *  @const
+		 */
+	    Tone.PitchShift.defaults = {
+	        'pitch': 0,
+	        'windowSize': 0.1,
+	        'delayTime': 0,
+	        'feedback': 0
+	    };
+	    /**
+		 * Repitch the incoming signal by some interval (measured
+		 * in semi-tones).
+		 * @memberOf Tone.PitchShift#
+		 * @type {Interval}
+		 * @name pitch
+		 * @example
+		 * pitchShift.pitch = -12; //down one octave
+		 * pitchShift.pitch = 7; //up a fifth
+		 */
+	    Object.defineProperty(Tone.PitchShift.prototype, 'pitch', {
+	        get: function () {
+	            return this._pitch;
+	        },
+	        set: function (interval) {
+	            this._pitch = interval;
+	            var factor = 0;
+	            if (interval < 0) {
+	                this._lfoA.min = 0;
+	                this._lfoA.max = this._windowSize;
+	                this._lfoB.min = 0;
+	                this._lfoB.max = this._windowSize;
+	                factor = Tone.intervalToFrequencyRatio(interval - 1) + 1;
+	            } else {
+	                this._lfoA.min = this._windowSize;
+	                this._lfoA.max = 0;
+	                this._lfoB.min = this._windowSize;
+	                this._lfoB.max = 0;
+	                factor = Tone.intervalToFrequencyRatio(interval) - 1;
+	            }
+	            this._frequency.value = factor * (1.2 / this._windowSize);
+	        }
+	    });
+	    /**
+		 * The window size corresponds roughly to the sample length in a looping sampler.
+		 * Smaller values are desirable for a less noticeable delay time of the pitch shifted
+		 * signal, but larger values will result in smoother pitch shifting for larger intervals.
+		 * A nominal range of 0.03 to 0.1 is recommended.
+		 * @memberOf Tone.PitchShift#
+		 * @type {Time}
+		 * @name windowSize
+		 * @example
+		 * pitchShift.windowSize = 0.1;
+		 */
+	    Object.defineProperty(Tone.PitchShift.prototype, 'windowSize', {
+	        get: function () {
+	            return this._windowSize;
+	        },
+	        set: function (size) {
+	            this._windowSize = this.toSeconds(size);
+	            this.pitch = this._pitch;
+	        }
+	    });
+	    /**
+		 *  Clean up.
+		 *  @return  {Tone.PitchShift}  this
+		 */
+	    Tone.PitchShift.prototype.dispose = function () {
+	        Tone.FeedbackEffect.prototype.dispose.call(this);
+	        this._frequency.dispose();
+	        this._frequency = null;
+	        this._delayA.disconnect();
+	        this._delayA = null;
+	        this._delayB.disconnect();
+	        this._delayB = null;
+	        this._lfoA.dispose();
+	        this._lfoA = null;
+	        this._lfoB.dispose();
+	        this._lfoB = null;
+	        this._crossFade.dispose();
+	        this._crossFade = null;
+	        this._crossFadeLFO.dispose();
+	        this._crossFadeLFO = null;
+	        this._writable('delayTime');
+	        this._feedbackDelay.dispose();
+	        this._feedbackDelay = null;
+	        this.delayTime = null;
+	        return this;
+	    };
+	    return Tone.PitchShift;
+	});
+	Module(function (Tone) {
+	    /**
+		 *  @class Wrapper around the native BufferSourceNode.
+		 *  @extends {Tone.AudioNode}
+		 *  @param  {AudioBuffer|Tone.Buffer}  buffer   The buffer to play
+		 *  @param  {Function}  onload  The callback to invoke when the
+		 *                               buffer is done playing.
+		 */
+	    Tone.BufferSource = function () {
+	        var options = Tone.defaults(arguments, [
+	            'buffer',
+	            'onload'
+	        ], Tone.BufferSource);
+	        Tone.AudioNode.call(this, options);
+	        /**
+			 *  The callback to invoke after the
+			 *  buffer source is done playing.
+			 *  @type  {Function}
+			 */
+	        this.onended = options.onended;
+	        /**
+			 *  The time that the buffer was started.
+			 *  @type  {Number}
+			 *  @private
+			 */
+	        this._startTime = -1;
+	        /**
+			 *  An additional flag if the actual BufferSourceNode
+			 *  has been started. b/c stopping an unstarted buffer
+			 *  will throw it into an invalid state
+			 *  @type  {Boolean}
+			 *  @private
+			 */
+	        this._sourceStarted = false;
+	        /**
+			 *  Flag if the source has already been stopped
+			 *  @type  {Boolean}
+			 *  @private
+			 */
+	        this._sourceStopped = false;
+	        /**
+			 *  The time that the buffer is scheduled to stop.
+			 *  @type  {Number}
+			 *  @private
+			 */
+	        this._stopTime = -1;
+	        /**
+			 *  The gain node which envelopes the BufferSource
+			 *  @type  {Tone.Gain}
+			 *  @private
+			 */
+	        this._gainNode = this.output = new Tone.Gain();
+	        /**
+			 *  The buffer source
+			 *  @type  {AudioBufferSourceNode}
+			 *  @private
+			 */
+	        this._source = this.context.createBufferSource();
+	        this._source.connect(this._gainNode);
+	        this._source.onended = this._onended.bind(this);
+	        /**
+			 * The private buffer instance
+			 * @type {Tone.Buffer}
+			 * @private
+			 */
+	        this._buffer = new Tone.Buffer(options.buffer, options.onload);
+	        /**
+			 *  The playbackRate of the buffer
+			 *  @type {Positive}
+			 *  @signal
+			 */
+	        this.playbackRate = new Tone.Param(this._source.playbackRate, Tone.Type.Positive);
+	        /**
+			 *  The fadeIn time of the amplitude envelope.
+			 *  @type {Time}
+			 */
+	        this.fadeIn = options.fadeIn;
+	        /**
+			 *  The fadeOut time of the amplitude envelope.
+			 *  @type {Time}
+			 */
+	        this.fadeOut = options.fadeOut;
+	        /**
+			 * The curve applied to the fades, either "linear" or "exponential"
+			 * @type {String}
+			 */
+	        this.curve = options.curve;
+	        /**
+			 *  The value that the buffer ramps to
+			 *  @type {Gain}
+			 *  @private
+			 */
+	        this._gain = 1;
+	        /**
+			 * The onended timeout
+			 * @type {Number}
+			 * @private
+			 */
+	        this._onendedTimeout = -1;
+	        //set some values initially
+	        this.loop = options.loop;
+	        this.loopStart = options.loopStart;
+	        this.loopEnd = options.loopEnd;
+	        this.playbackRate.value = options.playbackRate;
+	    };
+	    Tone.extend(Tone.BufferSource, Tone.AudioNode);
+	    /**
+		 *  The defaults
+		 *  @const
+		 *  @type  {Object}
+		 */
+	    Tone.BufferSource.defaults = {
+	        'onended': Tone.noOp,
+	        'onload': Tone.noOp,
+	        'loop': false,
+	        'loopStart': 0,
+	        'loopEnd': 0,
+	        'fadeIn': 0,
+	        'fadeOut': 0,
+	        'curve': 'linear',
+	        'playbackRate': 1
+	    };
+	    /**
+		 *  Returns the playback state of the source, either "started" or "stopped".
+		 *  @type {Tone.State}
+		 *  @readOnly
+		 *  @memberOf Tone.BufferSource#
+		 *  @name state
+		 */
+	    Object.defineProperty(Tone.BufferSource.prototype, 'state', {
+	        get: function () {
+	            return this.getStateAtTime(this.now());
+	        }
+	    });
+	    /**
+		 *  Get the playback state at the given time
+		 *  @param  {Time}  time  The time to test the state at
+		 *  @return  {Tone.State}  The playback state. 
+		 */
+	    Tone.BufferSource.prototype.getStateAtTime = function (time) {
+	        time = this.toSeconds(time);
+	        if (this._startTime !== -1 && time >= this._startTime && !this._sourceStopped) {
+	            return Tone.State.Started;
+	        } else {
+	            return Tone.State.Stopped;
+	        }
+	    };
+	    /**
+		 *  Start the buffer
+		 *  @param  {Time} [startTime=now] When the player should start.
+		 *  @param  {Time} [offset=0] The offset from the beginning of the sample
+		 *                                 to start at.
+		 *  @param  {Time=} duration How long the sample should play. If no duration
+		 *                                is given, it will default to the full length
+		 *                                of the sample (minus any offset)
+		 *  @param  {Gain}  [gain=1]  The gain to play the buffer back at.
+		 *  @param  {Time=}  fadeInTime  The optional fadeIn ramp time.
+		 *  @return  {Tone.BufferSource}  this
+		 */
+	    Tone.BufferSource.prototype.start = function (time, offset, duration, gain, fadeInTime) {
+	        if (this._startTime !== -1) {
+	            throw new Error('Tone.BufferSource can only be started once.');
+	        }
+	        if (!this.buffer.loaded) {
+	            throw new Error('Tone.BufferSource: buffer is either not set or not loaded.');
+	        }
+	        time = this.toSeconds(time);
+	        //if it's a loop the default offset is the loopstart point
+	        if (this.loop) {
+	            offset = Tone.defaultArg(offset, this.loopStart);
+	        } else {
+	            //otherwise the default offset is 0
+	            offset = Tone.defaultArg(offset, 0);
+	        }
+	        offset = this.toSeconds(offset);
+	        gain = Tone.defaultArg(gain, 1);
+	        this._gain = gain;
+	        fadeInTime = this.toSeconds(Tone.defaultArg(fadeInTime, this.fadeIn));
+	        this.fadeIn = fadeInTime;
+	        if (fadeInTime > 0) {
+	            this._gainNode.gain.setValueAtTime(0, time);
+	            if (this.curve === 'linear') {
+	                this._gainNode.gain.linearRampToValueAtTime(this._gain, time + fadeInTime);
+	            } else {
+	                this._gainNode.gain.exponentialApproachValueAtTime(this._gain, time, fadeInTime);
+	            }
+	        } else {
+	            this._gainNode.gain.setValueAtTime(gain, time);
+	        }
+	        this._startTime = time;
+	        var computedDur = this.toSeconds(Tone.defaultArg(duration, this.buffer.duration - offset % this.buffer.duration));
+	        computedDur = Math.max(computedDur, 0);
+	        if (Tone.isDefined(duration)) {
+	            //clip the duration when not looping
+	            if (!this.loop) {
+	                computedDur = Math.min(computedDur, this.buffer.duration - offset % this.buffer.duration);
+	            }
+	            this.stop(time + computedDur, this.fadeOut);
+	        }
+	        //start the buffer source
+	        if (this.loop) {
+	            //modify the offset if it's greater than the loop time
+	            var loopEnd = this.loopEnd || this.buffer.duration;
+	            var loopStart = this.loopStart;
+	            var loopDuration = loopEnd - loopStart;
+	            //move the offset back
+	            if (offset >= loopEnd) {
+	                offset = (offset - loopStart) % loopDuration + loopStart;
+	            }
+	        }
+	        this._source.buffer = this.buffer.get();
+	        this._source.loopEnd = this.loopEnd || this.buffer.duration;
+	        if (offset < this.buffer.duration) {
+	            this._sourceStarted = true;
+	            this._source.start(time, offset);
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Stop the buffer. Optionally add a ramp time to fade the
+		 *  buffer out.
+		 *  @param  {Time=}  time         The time the buffer should stop.
+		 *  @param  {Time=}  fadeOutTime  How long the gain should fade out for
+		 *  @return  {Tone.BufferSource}  this
+		 */
+	    Tone.BufferSource.prototype.stop = function (time, fadeOutTime) {
+	        if (!this.buffer.loaded) {
+	            throw new Error('Tone.BufferSource: buffer is either not set or not loaded.');
+	        }
+	        if (this._sourceStopped) {
+	            return;
+	        }
+	        time = this.toSeconds(time);
+	        //if the event has already been scheduled, clear it
+	        if (this._stopTime !== -1) {
+	            this.cancelStop();
+	        }
+	        //stop if it's schedule before the start time
+	        if (time <= this._startTime) {
+	            this._gainNode.gain.cancelScheduledValues(time);
+	            this._gainNode.gain.value = 0;
+	            return this;
+	        }
+	        time = Math.max(this._startTime + this.fadeIn + this.sampleTime, time);
+	        //cancel the previous curve
+	        this._gainNode.gain.cancelScheduledValues(time);
+	        this._stopTime = time;
+	        //the fadeOut time
+	        fadeOutTime = this.toSeconds(Tone.defaultArg(fadeOutTime, this.fadeOut));
+	        var heldDuration = time - this._startTime - this.fadeIn - this.sampleTime;
+	        if (!this.loop) {
+	            //make sure the fade does not go beyond the length of the buffer
+	            heldDuration = Math.min(heldDuration, this.buffer.duration);
+	        }
+	        fadeOutTime = Math.min(heldDuration, fadeOutTime);
+	        var startFade = time - fadeOutTime;
+	        if (fadeOutTime > this.sampleTime) {
+	            this._gainNode.gain.setValueAtTime(this._gain, startFade);
+	            if (this.curve === 'linear') {
+	                this._gainNode.gain.linearRampToValueAtTime(0, time);
+	            } else {
+	                this._gainNode.gain.exponentialApproachValueAtTime(0, startFade, fadeOutTime);
+	            }
+	        } else {
+	            this._gainNode.gain.setValueAtTime(0, time);
+	        }
+	        Tone.context.clearTimeout(this._onendedTimeout);
+	        this._onendedTimeout = Tone.context.setTimeout(this._onended.bind(this), this._stopTime - this.now());
+	        return this;
+	    };
+	    /**
+		 *  Cancel a scheduled stop event
+		 *  @return  {Tone.BufferSource}  this
+		 */
+	    Tone.BufferSource.prototype.cancelStop = function () {
+	        if (this._startTime !== -1 && !this._sourceStopped) {
+	            //cancel the stop envelope
+	            var fadeInTime = this.toSeconds(this.fadeIn);
+	            this._gainNode.gain.cancelScheduledValues(this._startTime + fadeInTime + this.sampleTime);
+	            this._gainNode.gain.setValueAtTime(1, Math.max(this.now(), this._startTime + fadeInTime + this.sampleTime));
+	            this.context.clearTimeout(this._onendedTimeout);
+	            this._stopTime = -1;
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Internal callback when the buffer is ended.
+		 *  Invokes `onended` and disposes the node.
+		 *  @private
+		 */
+	    Tone.BufferSource.prototype._onended = function () {
+	        if (!this._sourceStopped) {
+	            this._sourceStopped = true;
+	            //allow additional time for the exponential curve to fully decay
+	            var additionalTail = this.curve === 'exponential' ? this.fadeOut * 2 : 0;
+	            if (this._sourceStarted && this._stopTime !== -1) {
+	                this._source.stop(this._stopTime + additionalTail);
+	            }
+	            this.onended(this);
+	        }
+	    };
+	    /**
+		 * If loop is true, the loop will start at this position.
+		 * @memberOf Tone.BufferSource#
+		 * @type {Time}
+		 * @name loopStart
+		 */
+	    Object.defineProperty(Tone.BufferSource.prototype, 'loopStart', {
+	        get: function () {
+	            return this._source.loopStart;
+	        },
+	        set: function (loopStart) {
+	            this._source.loopStart = this.toSeconds(loopStart);
+	        }
+	    });
+	    /**
+		 * If loop is true, the loop will end at this position.
+		 * @memberOf Tone.BufferSource#
+		 * @type {Time}
+		 * @name loopEnd
+		 */
+	    Object.defineProperty(Tone.BufferSource.prototype, 'loopEnd', {
+	        get: function () {
+	            return this._source.loopEnd;
+	        },
+	        set: function (loopEnd) {
+	            this._source.loopEnd = this.toSeconds(loopEnd);
+	        }
+	    });
+	    /**
+		 * The audio buffer belonging to the player.
+		 * @memberOf Tone.BufferSource#
+		 * @type {Tone.Buffer}
+		 * @name buffer
+		 */
+	    Object.defineProperty(Tone.BufferSource.prototype, 'buffer', {
+	        get: function () {
+	            return this._buffer;
+	        },
+	        set: function (buffer) {
+	            this._buffer.set(buffer);
+	        }
+	    });
+	    /**
+		 * If the buffer should loop once it's over.
+		 * @memberOf Tone.BufferSource#
+		 * @type {Boolean}
+		 * @name loop
+		 */
+	    Object.defineProperty(Tone.BufferSource.prototype, 'loop', {
+	        get: function () {
+	            return this._source.loop;
+	        },
+	        set: function (loop) {
+	            this._source.loop = loop;
+	            this.cancelStop();
+	        }
+	    });
+	    /**
+		 *  Clean up.
+		 *  @return  {Tone.BufferSource}  this
+		 */
+	    Tone.BufferSource.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this.onended = null;
+	        this._source.onended = null;
+	        this._source.disconnect();
+	        this._source = null;
+	        this._gainNode.dispose();
+	        this._gainNode = null;
+	        this._buffer.dispose();
+	        this._buffer = null;
+	        this._startTime = -1;
+	        this.playbackRate = null;
+	        Tone.context.clearTimeout(this._onendedTimeout);
+	        return this;
+	    };
+	    return Tone.BufferSource;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Tone.Noise is a noise generator. It uses looped noise buffers to save on performance.
+		 *          Tone.Noise supports the noise types: "pink", "white", and "brown". Read more about
+		 *          colors of noise on [Wikipedia](https://en.wikipedia.org/wiki/Colors_of_noise).
+		 *
+		 *  @constructor
+		 *  @extends {Tone.Source}
+		 *  @param {string} type the noise type (white|pink|brown)
+		 *  @example
+		 * //initialize the noise and start
+		 * var noise = new Tone.Noise("pink").start();
+		 *
+		 * //make an autofilter to shape the noise
+		 * var autoFilter = new Tone.AutoFilter({
+		 * 	"frequency" : "8m",
+		 * 	"min" : 800,
+		 * 	"max" : 15000
+		 * }).connect(Tone.Master);
+		 *
+		 * //connect the noise
+		 * noise.connect(autoFilter);
+		 * //start the autofilter LFO
+		 * autoFilter.start()
+		 */
+	    Tone.Noise = function () {
+	        var options = Tone.defaults(arguments, ['type'], Tone.Noise);
+	        Tone.Source.call(this, options);
+	        /**
+			 *  @private
+			 *  @type {AudioBufferSourceNode}
+			 */
+	        this._source = null;
+	        /**
+			 *  the buffer
+			 *  @private
+			 *  @type {AudioBuffer}
+			 */
+	        this._type = options.type;
+	        /**
+			 *  The playback rate of the noise. Affects
+			 *  the "frequency" of the noise.
+			 *  @type {Positive}
+			 *  @signal
+			 */
+	        this._playbackRate = options.playbackRate;
+	    };
+	    Tone.extend(Tone.Noise, Tone.Source);
+	    /**
+		 *  the default parameters
+		 *
+		 *  @static
+		 *  @const
+		 *  @type {Object}
+		 */
+	    Tone.Noise.defaults = {
+	        'type': 'white',
+	        'playbackRate': 1
+	    };
+	    /**
+		 * The type of the noise. Can be "white", "brown", or "pink".
+		 * @memberOf Tone.Noise#
+		 * @type {string}
+		 * @name type
+		 * @example
+		 * noise.type = "white";
+		 */
+	    Object.defineProperty(Tone.Noise.prototype, 'type', {
+	        get: function () {
+	            return this._type;
+	        },
+	        set: function (type) {
+	            if (this._type !== type) {
+	                if (type in _noiseBuffers) {
+	                    this._type = type;
+	                    //if it's playing, stop and restart it
+	                    if (this.state === Tone.State.Started) {
+	                        var now = this.now();
+	                        this._stop(now);
+	                        this._start(now);
+	                    }
+	                } else {
+	                    throw new TypeError('Tone.Noise: invalid type: ' + type);
+	                }
+	            }
+	        }
+	    });
+	    /**
+		 *  The playback rate of the noise. Affects
+		 *  the "frequency" of the noise.
+		 *  @type {Positive}
+		 *  @signal
+		 */
+	    Object.defineProperty(Tone.Noise.prototype, 'playbackRate', {
+	        get: function () {
+	            return this._playbackRate;
+	        },
+	        set: function (rate) {
+	            this._playbackRate = rate;
+	            if (this._source) {
+	                this._source.playbackRate.value = rate;
+	            }
+	        }
+	    });
+	    /**
+		 *  internal start method
+		 *
+		 *  @param {Time} time
+		 *  @private
+		 */
+	    Tone.Noise.prototype._start = function (time) {
+	        var buffer = _noiseBuffers[this._type];
+	        this._source = new Tone.BufferSource(buffer).connect(this.output);
+	        this._source.loop = true;
+	        this._source.playbackRate.value = this._playbackRate;
+	        this._source.start(this.toSeconds(time), Math.random() * (buffer.duration - 0.001));
+	    };
+	    /**
+		 *  internal stop method
+		 *
+		 *  @param {Time} time
+		 *  @private
+		 */
+	    Tone.Noise.prototype._stop = function (time) {
+	        if (this._source) {
+	            this._source.stop(this.toSeconds(time));
+	            this._source = null;
+	        }
+	    };
+	    /**
+		 * Restarts the noise.
+		 * @param  {[type]} time [description]
+		 * @return {[type]}      [description]
+		 */
+	    Tone.Noise.prototype.restart = function (time) {
+	        //TODO could be optimized by cancelling the buffer source 'stop'
+	        //stop and restart
+	        this._stop(time);
+	        this._start(time);
+	    };
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.Noise} this
+		 */
+	    Tone.Noise.prototype.dispose = function () {
+	        Tone.Source.prototype.dispose.call(this);
+	        if (this._source !== null) {
+	            this._source.disconnect();
+	            this._source = null;
+	        }
+	        this._buffer = null;
+	        return this;
+	    };
+	    ///////////////////////////////////////////////////////////////////////////
+	    // THE BUFFERS
+	    ///////////////////////////////////////////////////////////////////////////
+	    //Noise buffer stats
+	    var bufferLength = 44100 * 5;
+	    var channels = 2;
+	    /**
+		 *	The noise arrays. Generated on initialization.
+		 *  borrowed heavily from https://github.com/zacharydenton/noise.js
+		 *  (c) 2013 Zach Denton (MIT)
+		 *  @static
+		 *  @private
+		 *  @type {Array}
+		 */
+	    var _noiseArrays = {
+	        'pink': function () {
+	            var buffer = [];
+	            for (var channelNum = 0; channelNum < channels; channelNum++) {
+	                var channel = new Float32Array(bufferLength);
+	                buffer[channelNum] = channel;
+	                var b0, b1, b2, b3, b4, b5, b6;
+	                b0 = b1 = b2 = b3 = b4 = b5 = b6 = 0;
+	                for (var i = 0; i < bufferLength; i++) {
+	                    var white = Math.random() * 2 - 1;
+	                    b0 = 0.99886 * b0 + white * 0.0555179;
+	                    b1 = 0.99332 * b1 + white * 0.0750759;
+	                    b2 = 0.969 * b2 + white * 0.153852;
+	                    b3 = 0.8665 * b3 + white * 0.3104856;
+	                    b4 = 0.55 * b4 + white * 0.5329522;
+	                    b5 = -0.7616 * b5 - white * 0.016898;
+	                    channel[i] = b0 + b1 + b2 + b3 + b4 + b5 + b6 + white * 0.5362;
+	                    channel[i] *= 0.11;
+	                    // (roughly) compensate for gain
+	                    b6 = white * 0.115926;
+	                }
+	            }
+	            return buffer;
+	        }(),
+	        'brown': function () {
+	            var buffer = [];
+	            for (var channelNum = 0; channelNum < channels; channelNum++) {
+	                var channel = new Float32Array(bufferLength);
+	                buffer[channelNum] = channel;
+	                var lastOut = 0;
+	                for (var i = 0; i < bufferLength; i++) {
+	                    var white = Math.random() * 2 - 1;
+	                    channel[i] = (lastOut + 0.02 * white) / 1.02;
+	                    lastOut = channel[i];
+	                    channel[i] *= 3.5;    // (roughly) compensate for gain
+	                }
+	            }
+	            return buffer;
+	        }(),
+	        'white': function () {
+	            var buffer = [];
+	            for (var channelNum = 0; channelNum < channels; channelNum++) {
+	                var channel = new Float32Array(bufferLength);
+	                buffer[channelNum] = channel;
+	                for (var i = 0; i < bufferLength; i++) {
+	                    channel[i] = Math.random() * 2 - 1;
+	                }
+	            }
+	            return buffer;
+	        }()
+	    };
+	    /**
+		 *	static noise buffers
+		 *  @static
+		 *  @private
+		 *  @type {Tone.Buffer}
+		 */
+	    var _noiseBuffers = {};
+	    //create the Tone.Buffers
+	    function createBuffers() {
+	        for (var type in _noiseArrays) {
+	            _noiseBuffers[type] = new Tone.Buffer().fromArray(_noiseArrays[type]);
+	        }
+	    }
+	    //create the noise buffers
+	    Tone.getContext(createBuffers);
+	    Tone.Context.on('init', createBuffers);
+	    return Tone.Noise;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Simple convolution created with decaying noise.
+		 *  		Generates an Impulse Response Buffer
+		 * 			with Tone.Offline then feeds the IR into ConvolverNode.
+		 * 			Note: the Reverb will not make any sound until [generate](#generate)
+		 * 			has been invoked and resolved.
+		 *
+		 * 			Inspiration from [ReverbGen](https://github.com/adelespinasse/reverbGen).
+		 * 			Copyright (c) 2014 Alan deLespinasse Apache 2.0 License.
+		 *
+		 *  @extends {Tone.Convolver}
+		 *  @param {Time=} decay The amount of time it will reverberate for.
+		 */
+	    Tone.Reverb = function () {
+	        var options = Tone.defaults(arguments, ['decay'], Tone.Reverb);
+	        Tone.Effect.call(this, options);
+	        /**
+			 *  Convolver node
+			 *  @type {ConvolverNode}
+			 *  @private
+			 */
+	        this._convolver = this.context.createConvolver();
+	        /**
+			 * The duration of the reverb
+			 * @type {Time}
+			 */
+	        this.decay = options.decay;
+	        /**
+			 * The amount of time before the reverb is fully
+			 * ramped in.
+			 * @type {Time}
+			 */
+	        this.preDelay = options.preDelay;
+	        this.connectEffect(this._convolver);
+	    };
+	    Tone.extend(Tone.Reverb, Tone.Effect);
+	    /**
+		 * The defaults
+		 * @type {Object}
+		 * @static
+		 */
+	    Tone.Reverb.defaults = {
+	        'decay': 1.5,
+	        'preDelay': 0.01
+	    };
+	    /**
+		 * Generate the Impulse Response. Returns a promise while the IR is being
+		 * generated.
+		 * @return {Promise<Tone.Reverb>} Promise which returns this object.
+		 */
+	    Tone.Reverb.prototype.generate = function () {
+	        return Tone.Offline(function () {
+	            //create a noise burst which decays over the duration
+	            var noiseL = new Tone.Noise();
+	            var noiseR = new Tone.Noise();
+	            var merge = new Tone.Merge();
+	            noiseL.connect(merge.left);
+	            noiseR.connect(merge.right);
+	            var gainNode = new Tone.Gain().toMaster();
+	            merge.connect(gainNode);
+	            noiseL.start(0);
+	            noiseR.start(0);
+	            //short fade in
+	            gainNode.gain.setValueAtTime(0, 0);
+	            gainNode.gain.linearRampToValueAtTime(1, this.preDelay);
+	            //decay
+	            gainNode.gain.exponentialApproachValueAtTime(0, this.preDelay, this.decay - this.preDelay);
+	        }.bind(this), this.decay).then(function (buffer) {
+	            this._convolver.buffer = buffer.get();
+	            return this;
+	        }.bind(this));
+	    };
+	    /**
+		 *  Clean up.
+		 *  @return  {Tone.Reverb}  this
+		 */
+	    Tone.Reverb.prototype.dispose = function () {
+	        Tone.Effect.prototype.dispose.call(this);
+	        this._convolver.disconnect();
+	        this._convolver = null;
+	        return this;
+	    };
+	    return Tone.Reverb;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Base class for stereo feedback effects where the effectReturn
+		 *         is fed back into the same channel.
+		 *
+		 *	@constructor
+		 *	@extends {Tone.StereoEffect}
+		 */
+	    Tone.StereoFeedbackEffect = function () {
+	        var options = Tone.defaults(arguments, ['feedback'], Tone.FeedbackEffect);
+	        Tone.StereoEffect.call(this, options);
+	        /**
+			 *  controls the amount of feedback
+			 *  @type {NormalRange}
+			 *  @signal
+			 */
+	        this.feedback = new Tone.Signal(options.feedback, Tone.Type.NormalRange);
+	        /**
+			 *  the left side feeback
+			 *  @type {Tone.Gain}
+			 *  @private
+			 */
+	        this._feedbackL = new Tone.Gain();
+	        /**
+			 *  the right side feeback
+			 *  @type {Tone.Gain}
+			 *  @private
+			 */
+	        this._feedbackR = new Tone.Gain();
+	        //connect it up
+	        this.effectReturnL.chain(this._feedbackL, this.effectSendL);
+	        this.effectReturnR.chain(this._feedbackR, this.effectSendR);
+	        this.feedback.fan(this._feedbackL.gain, this._feedbackR.gain);
+	        this._readOnly(['feedback']);
+	    };
+	    Tone.extend(Tone.StereoFeedbackEffect, Tone.StereoEffect);
+	    /**
+		 *  clean up
+		 *  @returns {Tone.StereoFeedbackEffect} this
+		 */
+	    Tone.StereoFeedbackEffect.prototype.dispose = function () {
+	        Tone.StereoEffect.prototype.dispose.call(this);
+	        this._writable(['feedback']);
+	        this.feedback.dispose();
+	        this.feedback = null;
+	        this._feedbackL.dispose();
+	        this._feedbackL = null;
+	        this._feedbackR.dispose();
+	        this._feedbackR = null;
+	        return this;
+	    };
+	    return Tone.StereoFeedbackEffect;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Applies a width factor to the mid/side seperation.
+		 *         0 is all mid and 1 is all side.
+		 *         Algorithm found in [kvraudio forums](http://www.kvraudio.com/forum/viewtopic.php?t=212587).
+		 *         <br><br>
+		 *         <code>
+		 *         Mid *= 2*(1-width)<br>
+		 *         Side *= 2*width
+		 *         </code>
+		 *
+		 *  @extends {Tone.MidSideEffect}
+		 *  @constructor
+		 *  @param {NormalRange|Object} [width] The stereo width. A width of 0 is mono and 1 is stereo. 0.5 is no change.
+		 */
+	    Tone.StereoWidener = function () {
+	        var options = Tone.defaults(arguments, ['width'], Tone.StereoWidener);
+	        Tone.MidSideEffect.call(this, options);
+	        /**
+			 *  The width control. 0 = 100% mid. 1 = 100% side. 0.5 = no change.
+			 *  @type {NormalRange}
+			 *  @signal
+			 */
+	        this.width = new Tone.Signal(options.width, Tone.Type.NormalRange);
+	        this._readOnly(['width']);
+	        /**
+			 * Two times the (1-width) for the mid channel
+			 * @type {Tone.Multiply}
+			 * @private
+			 */
+	        this._twoTimesWidthMid = new Tone.Multiply(2);
+	        /**
+			 * Two times the width for the side channel
+			 * @type {Tone.Multiply}
+			 * @private
+			 */
+	        this._twoTimesWidthSide = new Tone.Multiply(2);
+	        /**
+			 *  Mid multiplier
+			 *  @type {Tone.Multiply}
+			 *  @private
+			 */
+	        this._midMult = new Tone.Multiply();
+	        this._twoTimesWidthMid.connect(this._midMult, 0, 1);
+	        this.midSend.chain(this._midMult, this.midReturn);
+	        /**
+			 * 1 - width
+			 * @type {Tone}
+			 */
+	        this._oneMinusWidth = new Tone.Subtract();
+	        this._oneMinusWidth.connect(this._twoTimesWidthMid);
+	        this.context.getConstant(1).connect(this._oneMinusWidth, 0, 0);
+	        this.width.connect(this._oneMinusWidth, 0, 1);
+	        /**
+			 *  Side multiplier
+			 *  @type {Tone.Multiply}
+			 *  @private
+			 */
+	        this._sideMult = new Tone.Multiply();
+	        this.width.connect(this._twoTimesWidthSide);
+	        this._twoTimesWidthSide.connect(this._sideMult, 0, 1);
+	        this.sideSend.chain(this._sideMult, this.sideReturn);
+	    };
+	    Tone.extend(Tone.StereoWidener, Tone.MidSideEffect);
+	    /**
+		 *  the default values
+		 *  @static
+		 *  @type {Object}
+		 */
+	    Tone.StereoWidener.defaults = { 'width': 0.5 };
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.StereoWidener} this
+		 */
+	    Tone.StereoWidener.prototype.dispose = function () {
+	        Tone.MidSideEffect.prototype.dispose.call(this);
+	        this._writable(['width']);
+	        this.width.dispose();
+	        this.width = null;
+	        this._midMult.dispose();
+	        this._midMult = null;
+	        this._sideMult.dispose();
+	        this._sideMult = null;
+	        this._twoTimesWidthMid.dispose();
+	        this._twoTimesWidthMid = null;
+	        this._twoTimesWidthSide.dispose();
+	        this._twoTimesWidthSide = null;
+	        this._oneMinusWidth.dispose();
+	        this._oneMinusWidth = null;
+	        return this;
+	    };
+	    return Tone.StereoWidener;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.Tremolo modulates the amplitude of an incoming signal using a Tone.LFO.
+		 *         The type, frequency, and depth of the LFO is controllable.
+		 *
+		 *  @extends {Tone.StereoEffect}
+		 *  @constructor
+		 *  @param {Frequency} [frequency] The rate of the effect.
+		 *  @param {NormalRange} [depth] The depth of the effect.
+		 *  @example
+		 * //create a tremolo and start it's LFO
+		 * var tremolo = new Tone.Tremolo(9, 0.75).toMaster().start();
+		 * //route an oscillator through the tremolo and start it
+		 * var oscillator = new Tone.Oscillator().connect(tremolo).start();
+		 */
+	    Tone.Tremolo = function () {
+	        var options = Tone.defaults(arguments, [
+	            'frequency',
+	            'depth'
+	        ], Tone.Tremolo);
+	        Tone.StereoEffect.call(this, options);
+	        /**
+			 *  The tremelo LFO in the left channel
+			 *  @type  {Tone.LFO}
+			 *  @private
+			 */
+	        this._lfoL = new Tone.LFO({
+	            'phase': options.spread,
+	            'min': 1,
+	            'max': 0
+	        });
+	        /**
+			 *  The tremelo LFO in the left channel
+			 *  @type  {Tone.LFO}
+			 *  @private
+			 */
+	        this._lfoR = new Tone.LFO({
+	            'phase': options.spread,
+	            'min': 1,
+	            'max': 0
+	        });
+	        /**
+			 *  Where the gain is multiplied
+			 *  @type  {Tone.Gain}
+			 *  @private
+			 */
+	        this._amplitudeL = new Tone.Gain();
+	        /**
+			 *  Where the gain is multiplied
+			 *  @type  {Tone.Gain}
+			 *  @private
+			 */
+	        this._amplitudeR = new Tone.Gain();
+	        /**
+			 *  The frequency of the tremolo.
+			 *  @type  {Frequency}
+			 *  @signal
+			 */
+	        this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);
+	        /**
+			 *  The depth of the effect. A depth of 0, has no effect
+			 *  on the amplitude, and a depth of 1 makes the amplitude
+			 *  modulate fully between 0 and 1.
+			 *  @type  {NormalRange}
+			 *  @signal
+			 */
+	        this.depth = new Tone.Signal(options.depth, Tone.Type.NormalRange);
+	        this._readOnly([
+	            'frequency',
+	            'depth'
+	        ]);
+	        this.effectSendL.chain(this._amplitudeL, this.effectReturnL);
+	        this.effectSendR.chain(this._amplitudeR, this.effectReturnR);
+	        this._lfoL.connect(this._amplitudeL.gain);
+	        this._lfoR.connect(this._amplitudeR.gain);
+	        this.frequency.fan(this._lfoL.frequency, this._lfoR.frequency);
+	        this.depth.fan(this._lfoR.amplitude, this._lfoL.amplitude);
+	        this.type = options.type;
+	        this.spread = options.spread;
+	    };
+	    Tone.extend(Tone.Tremolo, Tone.StereoEffect);
+	    /**
+		 *  @static
+		 *  @const
+		 *  @type {Object}
+		 */
+	    Tone.Tremolo.defaults = {
+	        'frequency': 10,
+	        'type': 'sine',
+	        'depth': 0.5,
+	        'spread': 180
+	    };
+	    /**
+		 * Start the tremolo.
+		 * @param {Time} [time=now] When the tremolo begins.
+		 * @returns {Tone.Tremolo} this
+		 */
+	    Tone.Tremolo.prototype.start = function (time) {
+	        this._lfoL.start(time);
+	        this._lfoR.start(time);
+	        return this;
+	    };
+	    /**
+		 * Stop the tremolo.
+		 * @param {Time} [time=now] When the tremolo stops.
+		 * @returns {Tone.Tremolo} this
+		 */
+	    Tone.Tremolo.prototype.stop = function (time) {
+	        this._lfoL.stop(time);
+	        this._lfoR.stop(time);
+	        return this;
+	    };
+	    /**
+		 * Sync the effect to the transport.
+		 * @param {Time} [delay=0] Delay time before starting the effect after the
+		 *                              Transport has started.
+		 * @returns {Tone.AutoFilter} this
+		 */
+	    Tone.Tremolo.prototype.sync = function (delay) {
+	        this._lfoL.sync(delay);
+	        this._lfoR.sync(delay);
+	        Tone.Transport.syncSignal(this.frequency);
+	        return this;
+	    };
+	    /**
+		 * Unsync the filter from the transport
+		 * @returns {Tone.Tremolo} this
+		 */
+	    Tone.Tremolo.prototype.unsync = function () {
+	        this._lfoL.unsync();
+	        this._lfoR.unsync();
+	        Tone.Transport.unsyncSignal(this.frequency);
+	        return this;
+	    };
+	    /**
+		 * The Tremolo's oscillator type.
+		 * @memberOf Tone.Tremolo#
+		 * @type {string}
+		 * @name type
+		 */
+	    Object.defineProperty(Tone.Tremolo.prototype, 'type', {
+	        get: function () {
+	            return this._lfoL.type;
+	        },
+	        set: function (type) {
+	            this._lfoL.type = type;
+	            this._lfoR.type = type;
+	        }
+	    });
+	    /**
+		 * Amount of stereo spread. When set to 0, both LFO's will be panned centrally.
+		 * When set to 180, LFO's will be panned hard left and right respectively.
+		 * @memberOf Tone.Tremolo#
+		 * @type {Degrees}
+		 * @name spread
+		 */
+	    Object.defineProperty(Tone.Tremolo.prototype, 'spread', {
+	        get: function () {
+	            return this._lfoR.phase - this._lfoL.phase;    //180
+	        },
+	        set: function (spread) {
+	            this._lfoL.phase = 90 - spread / 2;
+	            this._lfoR.phase = spread / 2 + 90;
+	        }
+	    });
+	    /**
+		 *  clean up
+		 *  @returns {Tone.Tremolo} this
+		 */
+	    Tone.Tremolo.prototype.dispose = function () {
+	        Tone.StereoEffect.prototype.dispose.call(this);
+	        this._writable([
+	            'frequency',
+	            'depth'
+	        ]);
+	        this._lfoL.dispose();
+	        this._lfoL = null;
+	        this._lfoR.dispose();
+	        this._lfoR = null;
+	        this._amplitudeL.dispose();
+	        this._amplitudeL = null;
+	        this._amplitudeR.dispose();
+	        this._amplitudeR = null;
+	        this.frequency = null;
+	        this.depth = null;
+	        return this;
+	    };
+	    return Tone.Tremolo;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class A Vibrato effect composed of a Tone.Delay and a Tone.LFO. The LFO
+		 *         modulates the delayTime of the delay, causing the pitch to rise
+		 *         and fall. 
+		 *  @extends {Tone.Effect}
+		 *  @param {Frequency} frequency The frequency of the vibrato.
+		 *  @param {NormalRange} depth The amount the pitch is modulated.
+		 */
+	    Tone.Vibrato = function () {
+	        var options = Tone.defaults(arguments, [
+	            'frequency',
+	            'depth'
+	        ], Tone.Vibrato);
+	        Tone.Effect.call(this, options);
+	        /**
+			 *  The delay node used for the vibrato effect
+			 *  @type {Tone.Delay}
+			 *  @private
+			 */
+	        this._delayNode = new Tone.Delay(0, options.maxDelay);
+	        /**
+			 *  The LFO used to control the vibrato
+			 *  @type {Tone.LFO}
+			 *  @private
+			 */
+	        this._lfo = new Tone.LFO({
+	            'type': options.type,
+	            'min': 0,
+	            'max': options.maxDelay,
+	            'frequency': options.frequency,
+	            'phase': -90    //offse the phase so the resting position is in the center
+	        }).start().connect(this._delayNode.delayTime);
+	        /**
+			 *  The frequency of the vibrato
+			 *  @type {Frequency}
+			 *  @signal
+			 */
+	        this.frequency = this._lfo.frequency;
+	        /**
+			 *  The depth of the vibrato. 
+			 *  @type {NormalRange}
+			 *  @signal
+			 */
+	        this.depth = this._lfo.amplitude;
+	        this.depth.value = options.depth;
+	        this._readOnly([
+	            'frequency',
+	            'depth'
+	        ]);
+	        this.effectSend.chain(this._delayNode, this.effectReturn);
+	    };
+	    Tone.extend(Tone.Vibrato, Tone.Effect);
+	    /**
+		 *  The defaults
+		 *  @type  {Object}
+		 *  @const
+		 */
+	    Tone.Vibrato.defaults = {
+	        'maxDelay': 0.005,
+	        'frequency': 5,
+	        'depth': 0.1,
+	        'type': 'sine'
+	    };
+	    /**
+		 * Type of oscillator attached to the Vibrato.
+		 * @memberOf Tone.Vibrato#
+		 * @type {string}
+		 * @name type
+		 */
+	    Object.defineProperty(Tone.Vibrato.prototype, 'type', {
+	        get: function () {
+	            return this._lfo.type;
+	        },
+	        set: function (type) {
+	            this._lfo.type = type;
+	        }
+	    });
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.Vibrato} this
+		 */
+	    Tone.Vibrato.prototype.dispose = function () {
+	        Tone.Effect.prototype.dispose.call(this);
+	        this._delayNode.dispose();
+	        this._delayNode = null;
+	        this._lfo.dispose();
+	        this._lfo = null;
+	        this._writable([
+	            'frequency',
+	            'depth'
+	        ]);
+	        this.frequency = null;
+	        this.depth = null;
+	    };
+	    return Tone.Vibrato;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Tone.Event abstracts away Tone.Transport.schedule and provides a schedulable
+		 *          callback for a single or repeatable events along the timeline.
+		 *
+		 *  @extends {Tone}
+		 *  @param {function} callback The callback to invoke at the time.
+		 *  @param {*} value The value or values which should be passed to
+		 *                      the callback function on invocation.
+		 *  @example
+		 * var chord = new Tone.Event(function(time, chord){
+		 * 	//the chord as well as the exact time of the event
+		 * 	//are passed in as arguments to the callback function
+		 * }, ["D4", "E4", "F4"]);
+		 * //start the chord at the beginning of the transport timeline
+		 * chord.start();
+		 * //loop it every measure for 8 measures
+		 * chord.loop = 8;
+		 * chord.loopEnd = "1m";
+		 */
+	    Tone.Event = function () {
+	        var options = Tone.defaults(arguments, [
+	            'callback',
+	            'value'
+	        ], Tone.Event);
+	        Tone.call(this);
+	        /**
+			 *  Loop value
+			 *  @type  {Boolean|Positive}
+			 *  @private
+			 */
+	        this._loop = options.loop;
+	        /**
+			 *  The callback to invoke.
+			 *  @type  {Function}
+			 */
+	        this.callback = options.callback;
+	        /**
+			 *  The value which is passed to the
+			 *  callback function.
+			 *  @type  {*}
+			 *  @private
+			 */
+	        this.value = options.value;
+	        /**
+			 *  When the note is scheduled to start.
+			 *  @type  {Number}
+			 *  @private
+			 */
+	        this._loopStart = this.toTicks(options.loopStart);
+	        /**
+			 *  When the note is scheduled to start.
+			 *  @type  {Number}
+			 *  @private
+			 */
+	        this._loopEnd = this.toTicks(options.loopEnd);
+	        /**
+			 *  Tracks the scheduled events
+			 *  @type {Tone.TimelineState}
+			 *  @private
+			 */
+	        this._state = new Tone.TimelineState(Tone.State.Stopped);
+	        /**
+			 *  The playback speed of the note. A speed of 1
+			 *  is no change.
+			 *  @private
+			 *  @type {Positive}
+			 */
+	        this._playbackRate = 1;
+	        /**
+			 *  A delay time from when the event is scheduled to start
+			 *  @type {Ticks}
+			 *  @private
+			 */
+	        this._startOffset = 0;
+	        /**
+			 *  private holder of probability value
+			 *  @type {NormalRange}
+			 *  @private
+			 */
+	        this._probability = options.probability;
+	        /**
+			 *  the amount of variation from the
+			 *  given time.
+			 *  @type {Boolean|Time}
+			 *  @private
+			 */
+	        this._humanize = options.humanize;
+	        /**
+			 *  If mute is true, the callback won't be
+			 *  invoked.
+			 *  @type {Boolean}
+			 */
+	        this.mute = options.mute;
+	        //set the initial values
+	        this.playbackRate = options.playbackRate;
+	    };
+	    Tone.extend(Tone.Event);
+	    /**
+		 *  The default values
+		 *  @type  {Object}
+		 *  @const
+		 */
+	    Tone.Event.defaults = {
+	        'callback': Tone.noOp,
+	        'loop': false,
+	        'loopEnd': '1m',
+	        'loopStart': 0,
+	        'playbackRate': 1,
+	        'value': null,
+	        'probability': 1,
+	        'mute': false,
+	        'humanize': false
+	    };
+	    /**
+		 *  Reschedule all of the events along the timeline
+		 *  with the updated values.
+		 *  @param {Time} after Only reschedules events after the given time.
+		 *  @return  {Tone.Event}  this
+		 *  @private
+		 */
+	    Tone.Event.prototype._rescheduleEvents = function (after) {
+	        //if no argument is given, schedules all of the events
+	        after = Tone.defaultArg(after, -1);
+	        this._state.forEachFrom(after, function (event) {
+	            var duration;
+	            if (event.state === Tone.State.Started) {
+	                if (Tone.isDefined(event.id)) {
+	                    Tone.Transport.clear(event.id);
+	                }
+	                var startTick = event.time + Math.round(this.startOffset / this._playbackRate);
+	                if (this._loop) {
+	                    duration = Infinity;
+	                    if (Tone.isNumber(this._loop)) {
+	                        duration = this._loop * this._getLoopDuration();
+	                    }
+	                    var nextEvent = this._state.getAfter(startTick);
+	                    if (nextEvent !== null) {
+	                        duration = Math.min(duration, nextEvent.time - startTick);
+	                    }
+	                    if (duration !== Infinity) {
+	                        //schedule a stop since it's finite duration
+	                        this._state.setStateAtTime(Tone.State.Stopped, startTick + duration + 1);
+	                        duration = Tone.Ticks(duration);
+	                    }
+	                    var interval = Tone.Ticks(this._getLoopDuration());
+	                    event.id = Tone.Transport.scheduleRepeat(this._tick.bind(this), interval, Tone.Ticks(startTick), duration);
+	                } else {
+	                    event.id = Tone.Transport.schedule(this._tick.bind(this), Tone.Ticks(startTick));
+	                }
+	            }
+	        }.bind(this));
+	        return this;
+	    };
+	    /**
+		 *  Returns the playback state of the note, either "started" or "stopped".
+		 *  @type {String}
+		 *  @readOnly
+		 *  @memberOf Tone.Event#
+		 *  @name state
+		 */
+	    Object.defineProperty(Tone.Event.prototype, 'state', {
+	        get: function () {
+	            return this._state.getValueAtTime(Tone.Transport.ticks);
+	        }
+	    });
+	    /**
+		 *  The start from the scheduled start time
+		 *  @type {Ticks}
+		 *  @memberOf Tone.Event#
+		 *  @name startOffset
+		 *  @private
+		 */
+	    Object.defineProperty(Tone.Event.prototype, 'startOffset', {
+	        get: function () {
+	            return this._startOffset;
+	        },
+	        set: function (offset) {
+	            this._startOffset = offset;
+	        }
+	    });
+	    /**
+		 *  The probability of the notes being triggered.
+		 *  @memberOf Tone.Event#
+		 *  @type {NormalRange}
+		 *  @name probability
+		 */
+	    Object.defineProperty(Tone.Event.prototype, 'probability', {
+	        get: function () {
+	            return this._probability;
+	        },
+	        set: function (prob) {
+	            this._probability = prob;
+	        }
+	    });
+	    /**
+		 *  If set to true, will apply small random variation
+		 *  to the callback time. If the value is given as a time, it will randomize
+		 *  by that amount.
+		 *  @example
+		 * event.humanize = true;
+		 *  @type {Boolean|Time}
+		 *  @name humanize
+		 */
+	    Object.defineProperty(Tone.Event.prototype, 'humanize', {
+	        get: function () {
+	            return this._humanize;
+	        },
+	        set: function (variation) {
+	            this._humanize = variation;
+	        }
+	    });
+	    /**
+		 *  Start the note at the given time.
+		 *  @param  {TimelinePosition}  time  When the note should start.
+		 *  @return  {Tone.Event}  this
+		 */
+	    Tone.Event.prototype.start = function (time) {
+	        time = this.toTicks(time);
+	        if (this._state.getValueAtTime(time) === Tone.State.Stopped) {
+	            this._state.add({
+	                'state': Tone.State.Started,
+	                'time': time,
+	                'id': undefined
+	            });
+	            this._rescheduleEvents(time);
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Stop the Event at the given time.
+		 *  @param  {TimelinePosition}  time  When the note should stop.
+		 *  @return  {Tone.Event}  this
+		 */
+	    Tone.Event.prototype.stop = function (time) {
+	        this.cancel(time);
+	        time = this.toTicks(time);
+	        if (this._state.getValueAtTime(time) === Tone.State.Started) {
+	            this._state.setStateAtTime(Tone.State.Stopped, time);
+	            var previousEvent = this._state.getBefore(time);
+	            var reschedulTime = time;
+	            if (previousEvent !== null) {
+	                reschedulTime = previousEvent.time;
+	            }
+	            this._rescheduleEvents(reschedulTime);
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Cancel all scheduled events greater than or equal to the given time
+		 *  @param  {TimelinePosition}  [time=0]  The time after which events will be cancel.
+		 *  @return  {Tone.Event}  this
+		 */
+	    Tone.Event.prototype.cancel = function (time) {
+	        time = Tone.defaultArg(time, -Infinity);
+	        time = this.toTicks(time);
+	        this._state.forEachFrom(time, function (event) {
+	            Tone.Transport.clear(event.id);
+	        });
+	        this._state.cancel(time);
+	        return this;
+	    };
+	    /**
+		 *  The callback function invoker. Also
+		 *  checks if the Event is done playing
+		 *  @param  {Number}  time  The time of the event in seconds
+		 *  @private
+		 */
+	    Tone.Event.prototype._tick = function (time) {
+	        var ticks = Tone.Transport.getTicksAtTime(time);
+	        if (!this.mute && this._state.getValueAtTime(ticks) === Tone.State.Started) {
+	            if (this.probability < 1 && Math.random() > this.probability) {
+	                return;
+	            }
+	            if (this.humanize) {
+	                var variation = 0.02;
+	                if (!Tone.isBoolean(this.humanize)) {
+	                    variation = this.toSeconds(this.humanize);
+	                }
+	                time += (Math.random() * 2 - 1) * variation;
+	            }
+	            this.callback(time, this.value);
+	        }
+	    };
+	    /**
+		 *  Get the duration of the loop.
+		 *  @return  {Ticks}
+		 *  @private
+		 */
+	    Tone.Event.prototype._getLoopDuration = function () {
+	        return Math.round((this._loopEnd - this._loopStart) / this._playbackRate);
+	    };
+	    /**
+		 *  If the note should loop or not
+		 *  between Tone.Event.loopStart and
+		 *  Tone.Event.loopEnd. An integer
+		 *  value corresponds to the number of
+		 *  loops the Event does after it starts.
+		 *  @memberOf Tone.Event#
+		 *  @type {Boolean|Positive}
+		 *  @name loop
+		 */
+	    Object.defineProperty(Tone.Event.prototype, 'loop', {
+	        get: function () {
+	            return this._loop;
+	        },
+	        set: function (loop) {
+	            this._loop = loop;
+	            this._rescheduleEvents();
+	        }
+	    });
+	    /**
+		 * 	The playback rate of the note. Defaults to 1.
+		 *  @memberOf Tone.Event#
+		 *  @type {Positive}
+		 *  @name playbackRate
+		 *  @example
+		 * note.loop = true;
+		 * //repeat the note twice as fast
+		 * note.playbackRate = 2;
+		 */
+	    Object.defineProperty(Tone.Event.prototype, 'playbackRate', {
+	        get: function () {
+	            return this._playbackRate;
+	        },
+	        set: function (rate) {
+	            this._playbackRate = rate;
+	            this._rescheduleEvents();
+	        }
+	    });
+	    /**
+		 *  The loopEnd point is the time the event will loop
+		 *  if Tone.Event.loop is true.
+		 *  @memberOf Tone.Event#
+		 *  @type {Time}
+		 *  @name loopEnd
+		 */
+	    Object.defineProperty(Tone.Event.prototype, 'loopEnd', {
+	        get: function () {
+	            return Tone.Ticks(this._loopEnd).toSeconds();
+	        },
+	        set: function (loopEnd) {
+	            this._loopEnd = this.toTicks(loopEnd);
+	            if (this._loop) {
+	                this._rescheduleEvents();
+	            }
+	        }
+	    });
+	    /**
+		 *  The time when the loop should start.
+		 *  @memberOf Tone.Event#
+		 *  @type {Time}
+		 *  @name loopStart
+		 */
+	    Object.defineProperty(Tone.Event.prototype, 'loopStart', {
+	        get: function () {
+	            return Tone.Ticks(this._loopStart).toSeconds();
+	        },
+	        set: function (loopStart) {
+	            this._loopStart = this.toTicks(loopStart);
+	            if (this._loop) {
+	                this._rescheduleEvents();
+	            }
+	        }
+	    });
+	    /**
+		 *  The current progress of the loop interval.
+		 *  Returns 0 if the event is not started yet or
+		 *  it is not set to loop.
+		 *  @memberOf Tone.Event#
+		 *  @type {NormalRange}
+		 *  @name progress
+		 *  @readOnly
+		 */
+	    Object.defineProperty(Tone.Event.prototype, 'progress', {
+	        get: function () {
+	            if (this._loop) {
+	                var ticks = Tone.Transport.ticks;
+	                var lastEvent = this._state.get(ticks);
+	                if (lastEvent !== null && lastEvent.state === Tone.State.Started) {
+	                    var loopDuration = this._getLoopDuration();
+	                    var progress = (ticks - lastEvent.time) % loopDuration;
+	                    return progress / loopDuration;
+	                } else {
+	                    return 0;
+	                }
+	            } else {
+	                return 0;
+	            }
+	        }
+	    });
+	    /**
+		 *  Clean up
+		 *  @return  {Tone.Event}  this
+		 */
+	    Tone.Event.prototype.dispose = function () {
+	        this.cancel();
+	        this._state.dispose();
+	        this._state = null;
+	        this.callback = null;
+	        this.value = null;
+	    };
+	    return Tone.Event;
+	});
+	Module(function (Tone) {
+	    /**
+		 *  @class Tone.Loop creates a looped callback at the 
+		 *         specified interval. The callback can be 
+		 *         started, stopped and scheduled along
+		 *         the Transport's timeline. 
+		 *  @example
+		 * var loop = new Tone.Loop(function(time){
+		 * 	//triggered every eighth note. 
+		 * 	console.log(time);
+		 * }, "8n").start(0);
+		 * Tone.Transport.start();
+		 *  @extends {Tone}
+		 *  @param {Function} callback The callback to invoke with the event.
+		 *  @param {Time} interval The time between successive callback calls. 
+		 */
+	    Tone.Loop = function () {
+	        var options = Tone.defaults(arguments, [
+	            'callback',
+	            'interval'
+	        ], Tone.Loop);
+	        Tone.call(this);
+	        /**
+			 *  The event which produces the callbacks
+			 */
+	        this._event = new Tone.Event({
+	            'callback': this._tick.bind(this),
+	            'loop': true,
+	            'loopEnd': options.interval,
+	            'playbackRate': options.playbackRate,
+	            'probability': options.probability
+	        });
+	        /**
+			 *  The callback to invoke with the next event in the pattern
+			 *  @type {Function}
+			 */
+	        this.callback = options.callback;
+	        //set the iterations
+	        this.iterations = options.iterations;
+	    };
+	    Tone.extend(Tone.Loop);
+	    /**
+		 *  The defaults
+		 *  @const
+		 *  @type  {Object}
+		 */
+	    Tone.Loop.defaults = {
+	        'interval': '4n',
+	        'callback': Tone.noOp,
+	        'playbackRate': 1,
+	        'iterations': Infinity,
+	        'probability': true,
+	        'mute': false
+	    };
+	    /**
+		 *  Start the loop at the specified time along the Transport's
+		 *  timeline.
+		 *  @param  {TimelinePosition=}  time  When to start the Loop.
+		 *  @return  {Tone.Loop}  this
+		 */
+	    Tone.Loop.prototype.start = function (time) {
+	        this._event.start(time);
+	        return this;
+	    };
+	    /**
+		 *  Stop the loop at the given time.
+		 *  @param  {TimelinePosition=}  time  When to stop the Arpeggio
+		 *  @return  {Tone.Loop}  this
+		 */
+	    Tone.Loop.prototype.stop = function (time) {
+	        this._event.stop(time);
+	        return this;
+	    };
+	    /**
+		 *  Cancel all scheduled events greater than or equal to the given time
+		 *  @param  {TimelinePosition}  [time=0]  The time after which events will be cancel.
+		 *  @return  {Tone.Loop}  this
+		 */
+	    Tone.Loop.prototype.cancel = function (time) {
+	        this._event.cancel(time);
+	        return this;
+	    };
+	    /**
+		 *  Internal function called when the notes should be called
+		 *  @param  {Number}  time  The time the event occurs
+		 *  @private
+		 */
+	    Tone.Loop.prototype._tick = function (time) {
+	        this.callback(time);
+	    };
+	    /**
+		 *  The state of the Loop, either started or stopped.
+		 *  @memberOf Tone.Loop#
+		 *  @type {String}
+		 *  @name state
+		 *  @readOnly
+		 */
+	    Object.defineProperty(Tone.Loop.prototype, 'state', {
+	        get: function () {
+	            return this._event.state;
+	        }
+	    });
+	    /**
+		 *  The progress of the loop as a value between 0-1. 0, when
+		 *  the loop is stopped or done iterating. 
+		 *  @memberOf Tone.Loop#
+		 *  @type {NormalRange}
+		 *  @name progress
+		 *  @readOnly
+		 */
+	    Object.defineProperty(Tone.Loop.prototype, 'progress', {
+	        get: function () {
+	            return this._event.progress;
+	        }
+	    });
+	    /**
+		 *  The time between successive callbacks. 
+		 *  @example
+		 * loop.interval = "8n"; //loop every 8n
+		 *  @memberOf Tone.Loop#
+		 *  @type {Time}
+		 *  @name interval
+		 */
+	    Object.defineProperty(Tone.Loop.prototype, 'interval', {
+	        get: function () {
+	            return this._event.loopEnd;
+	        },
+	        set: function (interval) {
+	            this._event.loopEnd = interval;
+	        }
+	    });
+	    /**
+		 *  The playback rate of the loop. The normal playback rate is 1 (no change). 
+		 *  A `playbackRate` of 2 would be twice as fast. 
+		 *  @memberOf Tone.Loop#
+		 *  @type {Time}
+		 *  @name playbackRate
+		 */
+	    Object.defineProperty(Tone.Loop.prototype, 'playbackRate', {
+	        get: function () {
+	            return this._event.playbackRate;
+	        },
+	        set: function (rate) {
+	            this._event.playbackRate = rate;
+	        }
+	    });
+	    /**
+		 *  Random variation +/-0.01s to the scheduled time. 
+		 *  Or give it a time value which it will randomize by.
+		 *  @type {Boolean|Time}
+		 *  @memberOf Tone.Loop#
+		 *  @name humanize
+		 */
+	    Object.defineProperty(Tone.Loop.prototype, 'humanize', {
+	        get: function () {
+	            return this._event.humanize;
+	        },
+	        set: function (variation) {
+	            this._event.humanize = variation;
+	        }
+	    });
+	    /**
+		 *  The probably of the callback being invoked.
+		 *  @memberOf Tone.Loop#
+		 *  @type {NormalRange}
+		 *  @name probability
+		 */
+	    Object.defineProperty(Tone.Loop.prototype, 'probability', {
+	        get: function () {
+	            return this._event.probability;
+	        },
+	        set: function (prob) {
+	            this._event.probability = prob;
+	        }
+	    });
+	    /**
+		 *  Muting the Loop means that no callbacks are invoked.
+		 *  @memberOf Tone.Loop#
+		 *  @type {Boolean}
+		 *  @name mute
+		 */
+	    Object.defineProperty(Tone.Loop.prototype, 'mute', {
+	        get: function () {
+	            return this._event.mute;
+	        },
+	        set: function (mute) {
+	            this._event.mute = mute;
+	        }
+	    });
+	    /**
+		 *  The number of iterations of the loop. The default
+		 *  value is Infinity (loop forever).
+		 *  @memberOf Tone.Loop#
+		 *  @type {Positive}
+		 *  @name iterations
+		 */
+	    Object.defineProperty(Tone.Loop.prototype, 'iterations', {
+	        get: function () {
+	            if (this._event.loop === true) {
+	                return Infinity;
+	            } else {
+	                return this._event.loop;
+	            }
+	        },
+	        set: function (iters) {
+	            if (iters === Infinity) {
+	                this._event.loop = true;
+	            } else {
+	                this._event.loop = iters;
+	            }
+	        }
+	    });
+	    /**
+		 *  Clean up
+		 *  @return  {Tone.Loop}  this
+		 */
+	    Tone.Loop.prototype.dispose = function () {
+	        this._event.dispose();
+	        this._event = null;
+	        this.callback = null;
+	    };
+	    return Tone.Loop;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.Part is a collection Tone.Events which can be
+		 *         started/stopped and looped as a single unit.
+		 *
+		 *  @extends {Tone.Event}
+		 *  @param {Function} callback The callback to invoke on each event
+		 *  @param {Array} events the array of events
+		 *  @example
+		 * var part = new Tone.Part(function(time, note){
+		 * 	//the notes given as the second element in the array
+		 * 	//will be passed in as the second argument
+		 * 	synth.triggerAttackRelease(note, "8n", time);
+		 * }, [[0, "C2"], ["0:2", "C3"], ["0:3:2", "G2"]]);
+		 *  @example
+		 * //use an array of objects as long as the object has a "time" attribute
+		 * var part = new Tone.Part(function(time, value){
+		 * 	//the value is an object which contains both the note and the velocity
+		 * 	synth.triggerAttackRelease(value.note, "8n", time, value.velocity);
+		 * }, [{"time" : 0, "note" : "C3", "velocity": 0.9},
+		 * 	   {"time" : "0:2", "note" : "C4", "velocity": 0.5}
+		 * ]).start(0);
+		 */
+	    Tone.Part = function () {
+	        var options = Tone.defaults(arguments, [
+	            'callback',
+	            'events'
+	        ], Tone.Part);
+	        Tone.Event.call(this, options);
+	        /**
+			 *  An array of Objects.
+			 *  @type  {Array}
+			 *  @private
+			 */
+	        this._events = [];
+	        //add the events
+	        for (var i = 0; i < options.events.length; i++) {
+	            if (Array.isArray(options.events[i])) {
+	                this.add(options.events[i][0], options.events[i][1]);
+	            } else {
+	                this.add(options.events[i]);
+	            }
+	        }
+	    };
+	    Tone.extend(Tone.Part, Tone.Event);
+	    /**
+		 *  The default values
+		 *  @type  {Object}
+		 *  @const
+		 */
+	    Tone.Part.defaults = {
+	        'callback': Tone.noOp,
+	        'loop': false,
+	        'loopEnd': '1m',
+	        'loopStart': 0,
+	        'playbackRate': 1,
+	        'probability': 1,
+	        'humanize': false,
+	        'mute': false,
+	        'events': []
+	    };
+	    /**
+		 *  Start the part at the given time.
+		 *  @param  {TransportTime}  time    When to start the part.
+		 *  @param  {Time=}  offset  The offset from the start of the part
+		 *                           to begin playing at.
+		 *  @return  {Tone.Part}  this
+		 */
+	    Tone.Part.prototype.start = function (time, offset) {
+	        var ticks = this.toTicks(time);
+	        if (this._state.getValueAtTime(ticks) !== Tone.State.Started) {
+	            if (this._loop) {
+	                offset = Tone.defaultArg(offset, this._loopStart);
+	            } else {
+	                offset = Tone.defaultArg(offset, 0);
+	            }
+	            offset = this.toTicks(offset);
+	            this._state.add({
+	                'state': Tone.State.Started,
+	                'time': ticks,
+	                'offset': offset
+	            });
+	            this._forEach(function (event) {
+	                this._startNote(event, ticks, offset);
+	            });
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Start the event in the given event at the correct time given
+		 *  the ticks and offset and looping.
+		 *  @param  {Tone.Event}  event
+		 *  @param  {Ticks}  ticks
+		 *  @param  {Ticks}  offset
+		 *  @private
+		 */
+	    Tone.Part.prototype._startNote = function (event, ticks, offset) {
+	        ticks -= offset;
+	        if (this._loop) {
+	            if (event.startOffset >= this._loopStart && event.startOffset < this._loopEnd) {
+	                if (event.startOffset < offset) {
+	                    //start it on the next loop
+	                    ticks += this._getLoopDuration();
+	                }
+	                event.start(Tone.Ticks(ticks));
+	            } else if (event.startOffset < this._loopStart && event.startOffset >= offset) {
+	                event.loop = false;
+	                event.start(Tone.Ticks(ticks));
+	            }
+	        } else if (event.startOffset >= offset) {
+	            event.start(Tone.Ticks(ticks));
+	        }
+	    };
+	    /**
+		 *  The start from the scheduled start time
+		 *  @type {Ticks}
+		 *  @memberOf Tone.Part#
+		 *  @name startOffset
+		 *  @private
+		 */
+	    Object.defineProperty(Tone.Part.prototype, 'startOffset', {
+	        get: function () {
+	            return this._startOffset;
+	        },
+	        set: function (offset) {
+	            this._startOffset = offset;
+	            this._forEach(function (event) {
+	                event.startOffset += this._startOffset;
+	            });
+	        }
+	    });
+	    /**
+		 *  Stop the part at the given time.
+		 *  @param  {TimelinePosition}  time  When to stop the part.
+		 *  @return  {Tone.Part}  this
+		 */
+	    Tone.Part.prototype.stop = function (time) {
+	        var ticks = this.toTicks(time);
+	        this._state.cancel(ticks);
+	        this._state.setStateAtTime(Tone.State.Stopped, ticks);
+	        this._forEach(function (event) {
+	            event.stop(time);
+	        });
+	        return this;
+	    };
+	    /**
+		 *  Get/Set an Event's value at the given time.
+		 *  If a value is passed in and no event exists at
+		 *  the given time, one will be created with that value.
+		 *  If two events are at the same time, the first one will
+		 *  be returned.
+		 *  @example
+		 * part.at("1m"); //returns the part at the first measure
+		 *
+		 * part.at("2m", "C2"); //set the value at "2m" to C2.
+		 * //if an event didn't exist at that time, it will be created.
+		 *  @param {TransportTime} time The time of the event to get or set.
+		 *  @param {*=} value If a value is passed in, the value of the
+		 *                    event at the given time will be set to it.
+		 *  @return {Tone.Event} the event at the time
+		 */
+	    Tone.Part.prototype.at = function (time, value) {
+	        time = Tone.TransportTime(time);
+	        var tickTime = Tone.Ticks(1).toSeconds();
+	        for (var i = 0; i < this._events.length; i++) {
+	            var event = this._events[i];
+	            if (Math.abs(time.toTicks() - event.startOffset) < tickTime) {
+	                if (Tone.isDefined(value)) {
+	                    event.value = value;
+	                }
+	                return event;
+	            }
+	        }
+	        //if there was no event at that time, create one
+	        if (Tone.isDefined(value)) {
+	            this.add(time, value);
+	            //return the new event
+	            return this._events[this._events.length - 1];
+	        } else {
+	            return null;
+	        }
+	    };
+	    /**
+		 *  Add a an event to the part.
+		 *  @param {Time} time The time the note should start.
+		 *                            If an object is passed in, it should
+		 *                            have a 'time' attribute and the rest
+		 *                            of the object will be used as the 'value'.
+		 *  @param  {Tone.Event|*}  value
+		 *  @returns {Tone.Part} this
+		 *  @example
+		 * part.add("1m", "C#+11");
+		 */
+	    Tone.Part.prototype.add = function (time, value) {
+	        //extract the parameters
+	        if (time.hasOwnProperty('time')) {
+	            value = time;
+	            time = value.time;
+	        }
+	        time = this.toTicks(time);
+	        var event;
+	        if (value instanceof Tone.Event) {
+	            event = value;
+	            event.callback = this._tick.bind(this);
+	        } else {
+	            event = new Tone.Event({
+	                'callback': this._tick.bind(this),
+	                'value': value
+	            });
+	        }
+	        //the start offset
+	        event.startOffset = time;
+	        //initialize the values
+	        event.set({
+	            'loopEnd': this.loopEnd,
+	            'loopStart': this.loopStart,
+	            'loop': this.loop,
+	            'humanize': this.humanize,
+	            'playbackRate': this.playbackRate,
+	            'probability': this.probability
+	        });
+	        this._events.push(event);
+	        //start the note if it should be played right now
+	        this._restartEvent(event);
+	        return this;
+	    };
+	    /**
+		 *  Restart the given event
+		 *  @param  {Tone.Event}  event
+		 *  @private
+		 */
+	    Tone.Part.prototype._restartEvent = function (event) {
+	        this._state.forEach(function (stateEvent) {
+	            if (stateEvent.state === Tone.State.Started) {
+	                this._startNote(event, stateEvent.time, stateEvent.offset);
+	            } else {
+	                //stop the note
+	                event.stop(Tone.Ticks(stateEvent.time));
+	            }
+	        }.bind(this));
+	    };
+	    /**
+		 *  Remove an event from the part. Will recursively iterate
+		 *  into nested parts to find the event.
+		 *  @param {Time} time The time of the event
+		 *  @param {*} value Optionally select only a specific event value
+		 *  @return  {Tone.Part}  this
+		 */
+	    Tone.Part.prototype.remove = function (time, value) {
+	        //extract the parameters
+	        if (time.hasOwnProperty('time')) {
+	            value = time;
+	            time = value.time;
+	        }
+	        time = this.toTicks(time);
+	        for (var i = this._events.length - 1; i >= 0; i--) {
+	            var event = this._events[i];
+	            if (event instanceof Tone.Part) {
+	                event.remove(time, value);
+	            } else if (event.startOffset === time) {
+	                if (Tone.isUndef(value) || Tone.isDefined(value) && event.value === value) {
+	                    this._events.splice(i, 1);
+	                    event.dispose();
+	                }
+	            }
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Remove all of the notes from the group.
+		 *  @return  {Tone.Part}  this
+		 */
+	    Tone.Part.prototype.removeAll = function () {
+	        this._forEach(function (event) {
+	            event.dispose();
+	        });
+	        this._events = [];
+	        return this;
+	    };
+	    /**
+		 *  Cancel scheduled state change events: i.e. "start" and "stop".
+		 *  @param {TimelinePosition} after The time after which to cancel the scheduled events.
+		 *  @return  {Tone.Part}  this
+		 */
+	    Tone.Part.prototype.cancel = function (after) {
+	        this._forEach(function (event) {
+	            event.cancel(after);
+	        });
+	        this._state.cancel(this.toTicks(after));
+	        return this;
+	    };
+	    /**
+		 *  Iterate over all of the events
+		 *  @param {Function} callback
+		 *  @param {Object} ctx The context
+		 *  @private
+		 */
+	    Tone.Part.prototype._forEach = function (callback, ctx) {
+	        if (this._events) {
+	            ctx = Tone.defaultArg(ctx, this);
+	            for (var i = this._events.length - 1; i >= 0; i--) {
+	                var e = this._events[i];
+	                if (e instanceof Tone.Part) {
+	                    e._forEach(callback, ctx);
+	                } else {
+	                    callback.call(ctx, e);
+	                }
+	            }
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Set the attribute of all of the events
+		 *  @param  {String}  attr  the attribute to set
+		 *  @param  {*}  value      The value to set it to
+		 *  @private
+		 */
+	    Tone.Part.prototype._setAll = function (attr, value) {
+	        this._forEach(function (event) {
+	            event[attr] = value;
+	        });
+	    };
+	    /**
+		 *  Internal tick method
+		 *  @param  {Number}  time  The time of the event in seconds
+		 *  @private
+		 */
+	    Tone.Part.prototype._tick = function (time, value) {
+	        if (!this.mute) {
+	            this.callback(time, value);
+	        }
+	    };
+	    /**
+		 *  Determine if the event should be currently looping
+		 *  given the loop boundries of this Part.
+		 *  @param  {Tone.Event}  event  The event to test
+		 *  @private
+		 */
+	    Tone.Part.prototype._testLoopBoundries = function (event) {
+	        if (event.startOffset < this._loopStart || event.startOffset >= this._loopEnd) {
+	            event.cancel(0);
+	        } else if (event.state === Tone.State.Stopped) {
+	            //reschedule it if it's stopped
+	            this._restartEvent(event);
+	        }
+	    };
+	    /**
+		 *  The probability of the notes being triggered.
+		 *  @memberOf Tone.Part#
+		 *  @type {NormalRange}
+		 *  @name probability
+		 */
+	    Object.defineProperty(Tone.Part.prototype, 'probability', {
+	        get: function () {
+	            return this._probability;
+	        },
+	        set: function (prob) {
+	            this._probability = prob;
+	            this._setAll('probability', prob);
+	        }
+	    });
+	    /**
+		 *  If set to true, will apply small random variation
+		 *  to the callback time. If the value is given as a time, it will randomize
+		 *  by that amount.
+		 *  @example
+		 * event.humanize = true;
+		 *  @type {Boolean|Time}
+		 *  @name humanize
+		 */
+	    Object.defineProperty(Tone.Part.prototype, 'humanize', {
+	        get: function () {
+	            return this._humanize;
+	        },
+	        set: function (variation) {
+	            this._humanize = variation;
+	            this._setAll('humanize', variation);
+	        }
+	    });
+	    /**
+		 *  If the part should loop or not
+		 *  between Tone.Part.loopStart and
+		 *  Tone.Part.loopEnd. An integer
+		 *  value corresponds to the number of
+		 *  loops the Part does after it starts.
+		 *  @memberOf Tone.Part#
+		 *  @type {Boolean|Positive}
+		 *  @name loop
+		 *  @example
+		 * //loop the part 8 times
+		 * part.loop = 8;
+		 */
+	    Object.defineProperty(Tone.Part.prototype, 'loop', {
+	        get: function () {
+	            return this._loop;
+	        },
+	        set: function (loop) {
+	            this._loop = loop;
+	            this._forEach(function (event) {
+	                event._loopStart = this._loopStart;
+	                event._loopEnd = this._loopEnd;
+	                event.loop = loop;
+	                this._testLoopBoundries(event);
+	            });
+	        }
+	    });
+	    /**
+		 *  The loopEnd point determines when it will
+		 *  loop if Tone.Part.loop is true.
+		 *  @memberOf Tone.Part#
+		 *  @type {Time}
+		 *  @name loopEnd
+		 */
+	    Object.defineProperty(Tone.Part.prototype, 'loopEnd', {
+	        get: function () {
+	            return Tone.Ticks(this._loopEnd).toSeconds();
+	        },
+	        set: function (loopEnd) {
+	            this._loopEnd = this.toTicks(loopEnd);
+	            if (this._loop) {
+	                this._forEach(function (event) {
+	                    event.loopEnd = loopEnd;
+	                    this._testLoopBoundries(event);
+	                });
+	            }
+	        }
+	    });
+	    /**
+		 *  The loopStart point determines when it will
+		 *  loop if Tone.Part.loop is true.
+		 *  @memberOf Tone.Part#
+		 *  @type {Time}
+		 *  @name loopStart
+		 */
+	    Object.defineProperty(Tone.Part.prototype, 'loopStart', {
+	        get: function () {
+	            return Tone.Ticks(this._loopStart).toSeconds();
+	        },
+	        set: function (loopStart) {
+	            this._loopStart = this.toTicks(loopStart);
+	            if (this._loop) {
+	                this._forEach(function (event) {
+	                    event.loopStart = this.loopStart;
+	                    this._testLoopBoundries(event);
+	                });
+	            }
+	        }
+	    });
+	    /**
+		 * 	The playback rate of the part
+		 *  @memberOf Tone.Part#
+		 *  @type {Positive}
+		 *  @name playbackRate
+		 */
+	    Object.defineProperty(Tone.Part.prototype, 'playbackRate', {
+	        get: function () {
+	            return this._playbackRate;
+	        },
+	        set: function (rate) {
+	            this._playbackRate = rate;
+	            this._setAll('playbackRate', rate);
+	        }
+	    });
+	    /**
+		 * 	The number of scheduled notes in the part.
+		 *  @memberOf Tone.Part#
+		 *  @type {Positive}
+		 *  @name length
+		 *  @readOnly
+		 */
+	    Object.defineProperty(Tone.Part.prototype, 'length', {
+	        get: function () {
+	            return this._events.length;
+	        }
+	    });
+	    /**
+		 *  Clean up
+		 *  @return  {Tone.Part}  this
+		 */
+	    Tone.Part.prototype.dispose = function () {
+	        this.removeAll();
+	        this._state.dispose();
+	        this._state = null;
+	        this.callback = null;
+	        this._events = null;
+	        return this;
+	    };
+	    return Tone.Part;
+	});
+	Module(function (Tone) {
+	    /**
+		 *  @class Tone.Pattern arpeggiates between the given notes
+		 *         in a number of patterns. See Tone.CtrlPattern for
+		 *         a full list of patterns.
+		 *  @example
+		 * var pattern = new Tone.Pattern(function(time, note){
+		 *   //the order of the notes passed in depends on the pattern
+		 * }, ["C2", "D4", "E5", "A6"], "upDown");
+		 *  @extends {Tone.Loop}
+		 *  @param {Function} callback The callback to invoke with the
+		 *                             event.
+		 *  @param {Array} values The values to arpeggiate over.
+		 */
+	    Tone.Pattern = function () {
+	        var options = Tone.defaults(arguments, [
+	            'callback',
+	            'values',
+	            'pattern'
+	        ], Tone.Pattern);
+	        Tone.Loop.call(this, options);
+	        /**
+			 *  The pattern manager
+			 *  @type {Tone.CtrlPattern}
+			 *  @private
+			 */
+	        this._pattern = new Tone.CtrlPattern({
+	            'values': options.values,
+	            'type': options.pattern,
+	            'index': options.index
+	        });
+	    };
+	    Tone.extend(Tone.Pattern, Tone.Loop);
+	    /**
+		 *  The defaults
+		 *  @const
+		 *  @type  {Object}
+		 */
+	    Tone.Pattern.defaults = {
+	        'pattern': Tone.CtrlPattern.Type.Up,
+	        'callback': Tone.noOp,
+	        'values': []
+	    };
+	    /**
+		 *  Internal function called when the notes should be called
+		 *  @param  {Number}  time  The time the event occurs
+		 *  @private
+		 */
+	    Tone.Pattern.prototype._tick = function (time) {
+	        this.callback(time, this._pattern.value);
+	        this._pattern.next();
+	    };
+	    /**
+		 *  The current index in the values array.
+		 *  @memberOf Tone.Pattern#
+		 *  @type {Positive}
+		 *  @name index
+		 */
+	    Object.defineProperty(Tone.Pattern.prototype, 'index', {
+	        get: function () {
+	            return this._pattern.index;
+	        },
+	        set: function (i) {
+	            this._pattern.index = i;
+	        }
+	    });
+	    /**
+		 *  The array of events.
+		 *  @memberOf Tone.Pattern#
+		 *  @type {Array}
+		 *  @name values
+		 */
+	    Object.defineProperty(Tone.Pattern.prototype, 'values', {
+	        get: function () {
+	            return this._pattern.values;
+	        },
+	        set: function (vals) {
+	            this._pattern.values = vals;
+	        }
+	    });
+	    /**
+		 *  The current value of the pattern.
+		 *  @memberOf Tone.Pattern#
+		 *  @type {*}
+		 *  @name value
+		 *  @readOnly
+		 */
+	    Object.defineProperty(Tone.Pattern.prototype, 'value', {
+	        get: function () {
+	            return this._pattern.value;
+	        }
+	    });
+	    /**
+		 *  The pattern type. See Tone.CtrlPattern for the full list of patterns.
+		 *  @memberOf Tone.Pattern#
+		 *  @type {String}
+		 *  @name pattern
+		 */
+	    Object.defineProperty(Tone.Pattern.prototype, 'pattern', {
+	        get: function () {
+	            return this._pattern.type;
+	        },
+	        set: function (pattern) {
+	            this._pattern.type = pattern;
+	        }
+	    });
+	    /**
+		 *  Clean up
+		 *  @return  {Tone.Pattern}  this
+		 */
+	    Tone.Pattern.prototype.dispose = function () {
+	        Tone.Loop.prototype.dispose.call(this);
+	        this._pattern.dispose();
+	        this._pattern = null;
+	    };
+	    return Tone.Pattern;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class A sequence is an alternate notation of a part. Instead
+		 *         of passing in an array of [time, event] pairs, pass
+		 *         in an array of events which will be spaced at the
+		 *         given subdivision. Sub-arrays will subdivide that beat
+		 *         by the number of items are in the array.
+		 *         Sequence notation inspiration from [Tidal](http://yaxu.org/tidal/)
+		 *  @param  {Function}  callback  The callback to invoke with every note
+		 *  @param  {Array}    events  The sequence
+		 *  @param  {Time} subdivision  The subdivision between which events are placed.
+		 *  @extends {Tone.Part}
+		 *  @example
+		 * var seq = new Tone.Sequence(function(time, note){
+		 * 	console.log(note);
+		 * //straight quater notes
+		 * }, ["C4", "E4", "G4", "A4"], "4n");
+		 *  @example
+		 * var seq = new Tone.Sequence(function(time, note){
+		 * 	console.log(note);
+		 * //subdivisions are given as subarrays
+		 * }, ["C4", ["E4", "D4", "E4"], "G4", ["A4", "G4"]]);
+		 */
+	    Tone.Sequence = function () {
+	        var options = Tone.defaults(arguments, [
+	            'callback',
+	            'events',
+	            'subdivision'
+	        ], Tone.Sequence);
+	        //remove the events
+	        var events = options.events;
+	        delete options.events;
+	        Tone.Part.call(this, options);
+	        /**
+			 *  The subdivison of each note
+			 *  @type  {Ticks}
+			 *  @private
+			 */
+	        this._subdivision = this.toTicks(options.subdivision);
+	        //if no time was passed in, the loop end is the end of the cycle
+	        if (Tone.isUndef(options.loopEnd) && Tone.isDefined(events)) {
+	            this._loopEnd = events.length * this._subdivision;
+	        }
+	        //defaults to looping
+	        this._loop = true;
+	        //add all of the events
+	        if (Tone.isDefined(events)) {
+	            for (var i = 0; i < events.length; i++) {
+	                this.add(i, events[i]);
+	            }
+	        }
+	    };
+	    Tone.extend(Tone.Sequence, Tone.Part);
+	    /**
+		 *  The default values.
+		 *  @type  {Object}
+		 */
+	    Tone.Sequence.defaults = { 'subdivision': '4n' };
+	    /**
+		 *  The subdivision of the sequence. This can only be
+		 *  set in the constructor. The subdivision is the
+		 *  interval between successive steps.
+		 *  @type {Time}
+		 *  @memberOf Tone.Sequence#
+		 *  @name subdivision
+		 *  @readOnly
+		 */
+	    Object.defineProperty(Tone.Sequence.prototype, 'subdivision', {
+	        get: function () {
+	            return Tone.Ticks(this._subdivision).toSeconds();
+	        }
+	    });
+	    /**
+		 *  Get/Set an index of the sequence. If the index contains a subarray,
+		 *  a Tone.Sequence representing that sub-array will be returned.
+		 *  @example
+		 * var sequence = new Tone.Sequence(playNote, ["E4", "C4", "F#4", ["A4", "Bb3"]])
+		 * sequence.at(0)// => returns "E4"
+		 * //set a value
+		 * sequence.at(0, "G3");
+		 * //get a nested sequence
+		 * sequence.at(3).at(1)// => returns "Bb3"
+		 * @param {Positive} index The index to get or set
+		 * @param {*} value Optionally pass in the value to set at the given index.
+		 */
+	    Tone.Sequence.prototype.at = function (index, value) {
+	        //if the value is an array,
+	        if (Tone.isArray(value)) {
+	            //remove the current event at that index
+	            this.remove(index);
+	        }
+	        //call the parent's method
+	        return Tone.Part.prototype.at.call(this, this._indexTime(index), value);
+	    };
+	    /**
+		 *  Add an event at an index, if there's already something
+		 *  at that index, overwrite it. If `value` is an array,
+		 *  it will be parsed as a subsequence.
+		 *  @param {Number} index The index to add the event to
+		 *  @param {*} value The value to add at that index
+		 *  @returns {Tone.Sequence} this
+		 */
+	    Tone.Sequence.prototype.add = function (index, value) {
+	        if (value === null) {
+	            return this;
+	        }
+	        if (Tone.isArray(value)) {
+	            //make a subsequence and add that to the sequence
+	            var subSubdivision = Math.round(this._subdivision / value.length);
+	            value = new Tone.Sequence(this._tick.bind(this), value, Tone.Ticks(subSubdivision));
+	        }
+	        Tone.Part.prototype.add.call(this, this._indexTime(index), value);
+	        return this;
+	    };
+	    /**
+		 *  Remove a value from the sequence by index
+		 *  @param {Number} index The index of the event to remove
+		 *  @returns {Tone.Sequence} this
+		 */
+	    Tone.Sequence.prototype.remove = function (index, value) {
+	        Tone.Part.prototype.remove.call(this, this._indexTime(index), value);
+	        return this;
+	    };
+	    /**
+		 *  Get the time of the index given the Sequence's subdivision
+		 *  @param  {Number}  index
+		 *  @return  {Time}  The time of that index
+		 *  @private
+		 */
+	    Tone.Sequence.prototype._indexTime = function (index) {
+	        if (index instanceof Tone.TransportTime) {
+	            return index;
+	        } else {
+	            return Tone.Ticks(index * this._subdivision + this.startOffset).toSeconds();
+	        }
+	    };
+	    /**
+		 *  Clean up.
+		 *  @return {Tone.Sequence} this
+		 */
+	    Tone.Sequence.prototype.dispose = function () {
+	        Tone.Part.prototype.dispose.call(this);
+	        return this;
+	    };
+	    return Tone.Sequence;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.PulseOscillator is a pulse oscillator with control over pulse width,
+		 *         also known as the duty cycle. At 50% duty cycle (width = 0.5) the wave is
+		 *         a square and only odd-numbered harmonics are present. At all other widths
+		 *         even-numbered harmonics are present. Read more
+		 *         [here](https://wigglewave.wordpress.com/2014/08/16/pulse-waveforms-and-harmonics/).
+		 *
+		 *  @constructor
+		 *  @extends {Tone.Source}
+		 *  @param {Frequency} [frequency] The frequency of the oscillator
+		 *  @param {NormalRange} [width] The width of the pulse
+		 *  @example
+		 * var pulse = new Tone.PulseOscillator("E5", 0.4).toMaster().start();
+		 */
+	    Tone.PulseOscillator = function () {
+	        var options = Tone.defaults(arguments, [
+	            'frequency',
+	            'width'
+	        ], Tone.Oscillator);
+	        Tone.Source.call(this, options);
+	        /**
+			 *  The width of the pulse.
+			 *  @type {NormalRange}
+			 *  @signal
+			 */
+	        this.width = new Tone.Signal(options.width, Tone.Type.NormalRange);
+	        /**
+			 *  gate the width amount
+			 *  @type {Tone.Gain}
+			 *  @private
+			 */
+	        this._widthGate = new Tone.Gain();
+	        /**
+			 *  the sawtooth oscillator
+			 *  @type {Tone.Oscillator}
+			 *  @private
+			 */
+	        this._sawtooth = new Tone.Oscillator({
+	            frequency: options.frequency,
+	            detune: options.detune,
+	            type: 'sawtooth',
+	            phase: options.phase
+	        });
+	        /**
+			 *  The frequency control.
+			 *  @type {Frequency}
+			 *  @signal
+			 */
+	        this.frequency = this._sawtooth.frequency;
+	        /**
+			 *  The detune in cents.
+			 *  @type {Cents}
+			 *  @signal
+			 */
+	        this.detune = this._sawtooth.detune;
+	        /**
+			 *  Threshold the signal to turn it into a square
+			 *  @type {Tone.WaveShaper}
+			 *  @private
+			 */
+	        this._thresh = new Tone.WaveShaper(function (val) {
+	            if (val < 0) {
+	                return -1;
+	            } else {
+	                return 1;
+	            }
+	        });
+	        //connections
+	        this._sawtooth.chain(this._thresh, this.output);
+	        this.width.chain(this._widthGate, this._thresh);
+	        this._readOnly([
+	            'width',
+	            'frequency',
+	            'detune'
+	        ]);
+	    };
+	    Tone.extend(Tone.PulseOscillator, Tone.Source);
+	    /**
+		 *  The default parameters.
+		 *  @static
+		 *  @const
+		 *  @type {Object}
+		 */
+	    Tone.PulseOscillator.defaults = {
+	        'frequency': 440,
+	        'detune': 0,
+	        'phase': 0,
+	        'width': 0.2
+	    };
+	    /**
+		 *  start the oscillator
+		 *  @param  {Time} time
+		 *  @private
+		 */
+	    Tone.PulseOscillator.prototype._start = function (time) {
+	        time = this.toSeconds(time);
+	        this._sawtooth.start(time);
+	        this._widthGate.gain.setValueAtTime(1, time);
+	    };
+	    /**
+		 *  stop the oscillator
+		 *  @param  {Time} time
+		 *  @private
+		 */
+	    Tone.PulseOscillator.prototype._stop = function (time) {
+	        time = this.toSeconds(time);
+	        this._sawtooth.stop(time);
+	        //the width is still connected to the output.
+	        //that needs to be stopped also
+	        this._widthGate.gain.setValueAtTime(0, time);
+	    };
+	    /**
+		 *  restart the oscillator
+		 *  @param  {Time} time (optional) timing parameter
+		 *  @private
+		 */
+	    Tone.PulseOscillator.prototype.restart = function (time) {
+	        this._sawtooth.restart(time);
+	    };
+	    /**
+		 * The phase of the oscillator in degrees.
+		 * @memberOf Tone.PulseOscillator#
+		 * @type {Degrees}
+		 * @name phase
+		 */
+	    Object.defineProperty(Tone.PulseOscillator.prototype, 'phase', {
+	        get: function () {
+	            return this._sawtooth.phase;
+	        },
+	        set: function (phase) {
+	            this._sawtooth.phase = phase;
+	        }
+	    });
+	    /**
+		 * The type of the oscillator. Always returns "pulse".
+		 * @readOnly
+		 * @memberOf Tone.PulseOscillator#
+		 * @type {string}
+		 * @name type
+		 */
+	    Object.defineProperty(Tone.PulseOscillator.prototype, 'type', {
+	        get: function () {
+	            return 'pulse';
+	        }
+	    });
+	    /**
+		 * The partials of the waveform. Cannot set partials for this waveform type
+		 * @memberOf Tone.PulseOscillator#
+		 * @type {Array}
+		 * @name partials
+		 * @private
+		 */
+	    Object.defineProperty(Tone.PulseOscillator.prototype, 'partials', {
+	        get: function () {
+	            return [];
+	        }
+	    });
+	    /**
+		 *  Clean up method.
+		 *  @return {Tone.PulseOscillator} this
+		 */
+	    Tone.PulseOscillator.prototype.dispose = function () {
+	        Tone.Source.prototype.dispose.call(this);
+	        this._sawtooth.dispose();
+	        this._sawtooth = null;
+	        this._writable([
+	            'width',
+	            'frequency',
+	            'detune'
+	        ]);
+	        this.width.dispose();
+	        this.width = null;
+	        this._widthGate.dispose();
+	        this._widthGate = null;
+	        this._thresh.dispose();
+	        this._thresh = null;
+	        this.frequency = null;
+	        this.detune = null;
+	        return this;
+	    };
+	    return Tone.PulseOscillator;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.PWMOscillator modulates the width of a Tone.PulseOscillator
+		 *         at the modulationFrequency. This has the effect of continuously
+		 *         changing the timbre of the oscillator by altering the harmonics
+		 *         generated.
+		 *
+		 *  @extends {Tone.Source}
+		 *  @constructor
+		 *  @param {Frequency} frequency The starting frequency of the oscillator.
+		 *  @param {Frequency} modulationFrequency The modulation frequency of the width of the pulse.
+		 *  @example
+		 *  var pwm = new Tone.PWMOscillator("Ab3", 0.3).toMaster().start();
+		 */
+	    Tone.PWMOscillator = function () {
+	        var options = Tone.defaults(arguments, [
+	            'frequency',
+	            'modulationFrequency'
+	        ], Tone.PWMOscillator);
+	        Tone.Source.call(this, options);
+	        /**
+			 *  the pulse oscillator
+			 *  @type {Tone.PulseOscillator}
+			 *  @private
+			 */
+	        this._pulse = new Tone.PulseOscillator(options.modulationFrequency);
+	        //change the pulse oscillator type
+	        this._pulse._sawtooth.type = 'sine';
+	        /**
+			 *  the modulator
+			 *  @type {Tone.Oscillator}
+			 *  @private
+			 */
+	        this._modulator = new Tone.Oscillator({
+	            'frequency': options.frequency,
+	            'detune': options.detune,
+	            'phase': options.phase
+	        });
+	        /**
+			 *  Scale the oscillator so it doesn't go silent
+			 *  at the extreme values.
+			 *  @type {Tone.Multiply}
+			 *  @private
+			 */
+	        this._scale = new Tone.Multiply(2);
+	        /**
+			 *  The frequency control.
+			 *  @type {Frequency}
+			 *  @signal
+			 */
+	        this.frequency = this._modulator.frequency;
+	        /**
+			 *  The detune of the oscillator.
+			 *  @type {Cents}
+			 *  @signal
+			 */
+	        this.detune = this._modulator.detune;
+	        /**
+			 *  The modulation rate of the oscillator.
+			 *  @type {Frequency}
+			 *  @signal
+			 */
+	        this.modulationFrequency = this._pulse.frequency;
+	        //connections
+	        this._modulator.chain(this._scale, this._pulse.width);
+	        this._pulse.connect(this.output);
+	        this._readOnly([
+	            'modulationFrequency',
+	            'frequency',
+	            'detune'
+	        ]);
+	    };
+	    Tone.extend(Tone.PWMOscillator, Tone.Source);
+	    /**
+		 *  default values
+		 *  @static
+		 *  @type {Object}
+		 *  @const
+		 */
+	    Tone.PWMOscillator.defaults = {
+	        'frequency': 440,
+	        'detune': 0,
+	        'phase': 0,
+	        'modulationFrequency': 0.4
+	    };
+	    /**
+		 *  start the oscillator
+		 *  @param  {Time} [time=now]
+		 *  @private
+		 */
+	    Tone.PWMOscillator.prototype._start = function (time) {
+	        time = this.toSeconds(time);
+	        this._modulator.start(time);
+	        this._pulse.start(time);
+	    };
+	    /**
+		 *  stop the oscillator
+		 *  @param  {Time} time (optional) timing parameter
+		 *  @private
+		 */
+	    Tone.PWMOscillator.prototype._stop = function (time) {
+	        time = this.toSeconds(time);
+	        this._modulator.stop(time);
+	        this._pulse.stop(time);
+	    };
+	    /**
+		 *  restart the oscillator
+		 *  @param  {Time} time (optional) timing parameter
+		 *  @private
+		 */
+	    Tone.PWMOscillator.prototype.restart = function (time) {
+	        this._modulator.restart(time);
+	        this._pulse.restart(time);
+	    };
+	    /**
+		 * The type of the oscillator. Always returns "pwm".
+		 * @readOnly
+		 * @memberOf Tone.PWMOscillator#
+		 * @type {string}
+		 * @name type
+		 */
+	    Object.defineProperty(Tone.PWMOscillator.prototype, 'type', {
+	        get: function () {
+	            return 'pwm';
+	        }
+	    });
+	    /**
+		 * The partials of the waveform. Cannot set partials for this waveform type
+		 * @memberOf Tone.PWMOscillator#
+		 * @type {Array}
+		 * @name partials
+		 * @private
+		 */
+	    Object.defineProperty(Tone.PWMOscillator.prototype, 'partials', {
+	        get: function () {
+	            return [];
+	        }
+	    });
+	    /**
+		 * The phase of the oscillator in degrees.
+		 * @memberOf Tone.PWMOscillator#
+		 * @type {number}
+		 * @name phase
+		 */
+	    Object.defineProperty(Tone.PWMOscillator.prototype, 'phase', {
+	        get: function () {
+	            return this._modulator.phase;
+	        },
+	        set: function (phase) {
+	            this._modulator.phase = phase;
+	        }
+	    });
+	    /**
+		 *  Clean up.
+		 *  @return {Tone.PWMOscillator} this
+		 */
+	    Tone.PWMOscillator.prototype.dispose = function () {
+	        Tone.Source.prototype.dispose.call(this);
+	        this._pulse.dispose();
+	        this._pulse = null;
+	        this._scale.dispose();
+	        this._scale = null;
+	        this._modulator.dispose();
+	        this._modulator = null;
+	        this._writable([
+	            'modulationFrequency',
+	            'frequency',
+	            'detune'
+	        ]);
+	        this.frequency = null;
+	        this.detune = null;
+	        this.modulationFrequency = null;
+	        return this;
+	    };
+	    return Tone.PWMOscillator;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.FMOscillator
+		 *
+		 *  @extends {Tone.Source}
+		 *  @constructor
+		 *  @param {Frequency} frequency The starting frequency of the oscillator.
+		 *  @param {String} type The type of the carrier oscillator.
+		 *  @param {String} modulationType The type of the modulator oscillator.
+		 *  @example
+		 * //a sine oscillator frequency-modulated by a square wave
+		 * var fmOsc = new Tone.FMOscillator("Ab3", "sine", "square").toMaster().start();
+		 */
+	    Tone.FMOscillator = function () {
+	        var options = Tone.defaults(arguments, [
+	            'frequency',
+	            'type',
+	            'modulationType'
+	        ], Tone.FMOscillator);
+	        Tone.Source.call(this, options);
+	        /**
+			 *  The carrier oscillator
+			 *  @type {Tone.Oscillator}
+			 *  @private
+			 */
+	        this._carrier = new Tone.Oscillator(options.frequency, options.type);
+	        /**
+			 *  The oscillator's frequency
+			 *  @type {Frequency}
+			 *  @signal
+			 */
+	        this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);
+	        /**
+			 *  The detune control signal.
+			 *  @type {Cents}
+			 *  @signal
+			 */
+	        this.detune = this._carrier.detune;
+	        this.detune.value = options.detune;
+	        /**
+			 *  The modulation index which is in essence the depth or amount of the modulation. In other terms it is the
+			 *  ratio of the frequency of the modulating signal (mf) to the amplitude of the
+			 *  modulating signal (ma) -- as in ma/mf.
+			 *	@type {Positive}
+			 *	@signal
+			 */
+	        this.modulationIndex = new Tone.Multiply(options.modulationIndex);
+	        this.modulationIndex.units = Tone.Type.Positive;
+	        /**
+			 *  The modulating oscillator
+			 *  @type  {Tone.Oscillator}
+			 *  @private
+			 */
+	        this._modulator = new Tone.Oscillator(options.frequency, options.modulationType);
+	        /**
+			 *  Harmonicity is the frequency ratio between the carrier and the modulator oscillators.
+			 *  A harmonicity of 1 gives both oscillators the same frequency.
+			 *  Harmonicity = 2 means a change of an octave.
+			 *  @type {Positive}
+			 *  @signal
+			 *  @example
+			 * //pitch the modulator an octave below carrier
+			 * synth.harmonicity.value = 0.5;
+			 */
+	        this.harmonicity = new Tone.Multiply(options.harmonicity);
+	        this.harmonicity.units = Tone.Type.Positive;
+	        /**
+			 *  the node where the modulation happens
+			 *  @type {Tone.Gain}
+			 *  @private
+			 */
+	        this._modulationNode = new Tone.Gain(0);
+	        //connections
+	        this.frequency.connect(this._carrier.frequency);
+	        this.frequency.chain(this.harmonicity, this._modulator.frequency);
+	        this.frequency.chain(this.modulationIndex, this._modulationNode);
+	        this._modulator.connect(this._modulationNode.gain);
+	        this._modulationNode.connect(this._carrier.frequency);
+	        this._carrier.connect(this.output);
+	        this.detune.connect(this._modulator.detune);
+	        this.phase = options.phase;
+	        this._readOnly([
+	            'modulationIndex',
+	            'frequency',
+	            'detune',
+	            'harmonicity'
+	        ]);
+	    };
+	    Tone.extend(Tone.FMOscillator, Tone.Source);
+	    /**
+		 *  default values
+		 *  @static
+		 *  @type {Object}
+		 *  @const
+		 */
+	    Tone.FMOscillator.defaults = {
+	        'frequency': 440,
+	        'detune': 0,
+	        'phase': 0,
+	        'modulationIndex': 2,
+	        'modulationType': 'square',
+	        'harmonicity': 1
+	    };
+	    /**
+		 *  start the oscillator
+		 *  @param  {Time} [time=now]
+		 *  @private
+		 */
+	    Tone.FMOscillator.prototype._start = function (time) {
+	        this._modulator.start(time);
+	        this._carrier.start(time);
+	    };
+	    /**
+		 *  stop the oscillator
+		 *  @param  {Time} time (optional) timing parameter
+		 *  @private
+		 */
+	    Tone.FMOscillator.prototype._stop = function (time) {
+	        this._modulator.stop(time);
+	        this._carrier.stop(time);
+	    };
+	    /**
+		 *  stop the oscillator
+		 *  @param  {Time} time (optional) timing parameter
+		 *  @private
+		 */
+	    Tone.FMOscillator.prototype.restart = function (time) {
+	        this._modulator.restart(time);
+	        this._carrier.restart(time);
+	    };
+	    /**
+		 * The type of the carrier oscillator
+		 * @memberOf Tone.FMOscillator#
+		 * @type {string}
+		 * @name type
+		 */
+	    Object.defineProperty(Tone.FMOscillator.prototype, 'type', {
+	        get: function () {
+	            return this._carrier.type;
+	        },
+	        set: function (type) {
+	            this._carrier.type = type;
+	        }
+	    });
+	    /**
+		 * The type of the modulator oscillator
+		 * @memberOf Tone.FMOscillator#
+		 * @type {String}
+		 * @name modulationType
+		 */
+	    Object.defineProperty(Tone.FMOscillator.prototype, 'modulationType', {
+	        get: function () {
+	            return this._modulator.type;
+	        },
+	        set: function (type) {
+	            this._modulator.type = type;
+	        }
+	    });
+	    /**
+		 * The phase of the oscillator in degrees.
+		 * @memberOf Tone.FMOscillator#
+		 * @type {number}
+		 * @name phase
+		 */
+	    Object.defineProperty(Tone.FMOscillator.prototype, 'phase', {
+	        get: function () {
+	            return this._carrier.phase;
+	        },
+	        set: function (phase) {
+	            this._carrier.phase = phase;
+	            this._modulator.phase = phase;
+	        }
+	    });
+	    /**
+		 * The partials of the carrier waveform. A partial represents
+		 * the amplitude at a harmonic. The first harmonic is the
+		 * fundamental frequency, the second is the octave and so on
+		 * following the harmonic series.
+		 * Setting this value will automatically set the type to "custom".
+		 * The value is an empty array when the type is not "custom".
+		 * @memberOf Tone.FMOscillator#
+		 * @type {Array}
+		 * @name partials
+		 * @example
+		 * osc.partials = [1, 0.2, 0.01];
+		 */
+	    Object.defineProperty(Tone.FMOscillator.prototype, 'partials', {
+	        get: function () {
+	            return this._carrier.partials;
+	        },
+	        set: function (partials) {
+	            this._carrier.partials = partials;
+	        }
+	    });
+	    /**
+		 *  Clean up.
+		 *  @return {Tone.FMOscillator} this
+		 */
+	    Tone.FMOscillator.prototype.dispose = function () {
+	        Tone.Source.prototype.dispose.call(this);
+	        this._writable([
+	            'modulationIndex',
+	            'frequency',
+	            'detune',
+	            'harmonicity'
+	        ]);
+	        this.frequency.dispose();
+	        this.frequency = null;
+	        this.detune = null;
+	        this.harmonicity.dispose();
+	        this.harmonicity = null;
+	        this._carrier.dispose();
+	        this._carrier = null;
+	        this._modulator.dispose();
+	        this._modulator = null;
+	        this._modulationNode.dispose();
+	        this._modulationNode = null;
+	        this.modulationIndex.dispose();
+	        this.modulationIndex = null;
+	        return this;
+	    };
+	    return Tone.FMOscillator;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.AMOscillator
+		 *
+		 *  @extends {Tone.Oscillator}
+		 *  @constructor
+		 *  @param {Frequency} frequency The starting frequency of the oscillator.
+		 *  @param {String} type The type of the carrier oscillator.
+		 *  @param {String} modulationType The type of the modulator oscillator.
+		 *  @example
+		 * //a sine oscillator frequency-modulated by a square wave
+		 * var fmOsc = new Tone.AMOscillator("Ab3", "sine", "square").toMaster().start();
+		 */
+	    Tone.AMOscillator = function () {
+	        var options = Tone.defaults(arguments, [
+	            'frequency',
+	            'type',
+	            'modulationType'
+	        ], Tone.AMOscillator);
+	        Tone.Source.call(this, options);
+	        /**
+			 *  The carrier oscillator
+			 *  @type {Tone.Oscillator}
+			 *  @private
+			 */
+	        this._carrier = new Tone.Oscillator(options.frequency, options.type);
+	        /**
+			 *  The oscillator's frequency
+			 *  @type {Frequency}
+			 *  @signal
+			 */
+	        this.frequency = this._carrier.frequency;
+	        /**
+			 *  The detune control signal.
+			 *  @type {Cents}
+			 *  @signal
+			 */
+	        this.detune = this._carrier.detune;
+	        this.detune.value = options.detune;
+	        /**
+			 *  The modulating oscillator
+			 *  @type  {Tone.Oscillator}
+			 *  @private
+			 */
+	        this._modulator = new Tone.Oscillator(options.frequency, options.modulationType);
+	        /**
+			 *  convert the -1,1 output to 0,1
+			 *  @type {Tone.AudioToGain}
+			 *  @private
+			 */
+	        this._modulationScale = new Tone.AudioToGain();
+	        /**
+			 *  Harmonicity is the frequency ratio between the carrier and the modulator oscillators.
+			 *  A harmonicity of 1 gives both oscillators the same frequency.
+			 *  Harmonicity = 2 means a change of an octave.
+			 *  @type {Positive}
+			 *  @signal
+			 *  @example
+			 * //pitch the modulator an octave below carrier
+			 * synth.harmonicity.value = 0.5;
+			 */
+	        this.harmonicity = new Tone.Multiply(options.harmonicity);
+	        this.harmonicity.units = Tone.Type.Positive;
+	        /**
+			 *  the node where the modulation happens
+			 *  @type {Tone.Gain}
+			 *  @private
+			 */
+	        this._modulationNode = new Tone.Gain(0);
+	        //connections
+	        this.frequency.chain(this.harmonicity, this._modulator.frequency);
+	        this.detune.connect(this._modulator.detune);
+	        this._modulator.chain(this._modulationScale, this._modulationNode.gain);
+	        this._carrier.chain(this._modulationNode, this.output);
+	        this.phase = options.phase;
+	        this._readOnly([
+	            'frequency',
+	            'detune',
+	            'harmonicity'
+	        ]);
+	    };
+	    Tone.extend(Tone.AMOscillator, Tone.Oscillator);
+	    /**
+		 *  default values
+		 *  @static
+		 *  @type {Object}
+		 *  @const
+		 */
+	    Tone.AMOscillator.defaults = {
+	        'frequency': 440,
+	        'detune': 0,
+	        'phase': 0,
+	        'modulationType': 'square',
+	        'harmonicity': 1
+	    };
+	    /**
+		 *  start the oscillator
+		 *  @param  {Time} [time=now]
+		 *  @private
+		 */
+	    Tone.AMOscillator.prototype._start = function (time) {
+	        this._modulator.start(time);
+	        this._carrier.start(time);
+	    };
+	    /**
+		 *  stop the oscillator
+		 *  @param  {Time} time (optional) timing parameter
+		 *  @private
+		 */
+	    Tone.AMOscillator.prototype._stop = function (time) {
+	        this._modulator.stop(time);
+	        this._carrier.stop(time);
+	    };
+	    /**
+		 *  restart the oscillator
+		 *  @param  {Time} time (optional) timing parameter
+		 *  @private
+		 */
+	    Tone.AMOscillator.prototype.restart = function (time) {
+	        this._modulator.restart(time);
+	        this._carrier.restart(time);
+	    };
+	    /**
+		 * The type of the carrier oscillator
+		 * @memberOf Tone.AMOscillator#
+		 * @type {string}
+		 * @name type
+		 */
+	    Object.defineProperty(Tone.AMOscillator.prototype, 'type', {
+	        get: function () {
+	            return this._carrier.type;
+	        },
+	        set: function (type) {
+	            this._carrier.type = type;
+	        }
+	    });
+	    /**
+		 * The type of the modulator oscillator
+		 * @memberOf Tone.AMOscillator#
+		 * @type {string}
+		 * @name modulationType
+		 */
+	    Object.defineProperty(Tone.AMOscillator.prototype, 'modulationType', {
+	        get: function () {
+	            return this._modulator.type;
+	        },
+	        set: function (type) {
+	            this._modulator.type = type;
+	        }
+	    });
+	    /**
+		 * The phase of the oscillator in degrees.
+		 * @memberOf Tone.AMOscillator#
+		 * @type {number}
+		 * @name phase
+		 */
+	    Object.defineProperty(Tone.AMOscillator.prototype, 'phase', {
+	        get: function () {
+	            return this._carrier.phase;
+	        },
+	        set: function (phase) {
+	            this._carrier.phase = phase;
+	            this._modulator.phase = phase;
+	        }
+	    });
+	    /**
+		 * The partials of the carrier waveform. A partial represents
+		 * the amplitude at a harmonic. The first harmonic is the
+		 * fundamental frequency, the second is the octave and so on
+		 * following the harmonic series.
+		 * Setting this value will automatically set the type to "custom".
+		 * The value is an empty array when the type is not "custom".
+		 * @memberOf Tone.AMOscillator#
+		 * @type {Array}
+		 * @name partials
+		 * @example
+		 * osc.partials = [1, 0.2, 0.01];
+		 */
+	    Object.defineProperty(Tone.AMOscillator.prototype, 'partials', {
+	        get: function () {
+	            return this._carrier.partials;
+	        },
+	        set: function (partials) {
+	            this._carrier.partials = partials;
+	        }
+	    });
+	    /**
+		 *  Clean up.
+		 *  @return {Tone.AMOscillator} this
+		 */
+	    Tone.AMOscillator.prototype.dispose = function () {
+	        Tone.Source.prototype.dispose.call(this);
+	        this._writable([
+	            'frequency',
+	            'detune',
+	            'harmonicity'
+	        ]);
+	        this.frequency = null;
+	        this.detune = null;
+	        this.harmonicity.dispose();
+	        this.harmonicity = null;
+	        this._carrier.dispose();
+	        this._carrier = null;
+	        this._modulator.dispose();
+	        this._modulator = null;
+	        this._modulationNode.dispose();
+	        this._modulationNode = null;
+	        this._modulationScale.dispose();
+	        this._modulationScale = null;
+	        return this;
+	    };
+	    return Tone.AMOscillator;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.FatOscillator
+		 *
+		 *  @extends {Tone.Source}
+		 *  @constructor
+		 *  @param {Frequency} frequency The starting frequency of the oscillator.
+		 *  @param {String} type The type of the carrier oscillator.
+		 *  @param {String} modulationType The type of the modulator oscillator.
+		 *  @example
+		 * //a sine oscillator frequency-modulated by a square wave
+		 * var fmOsc = new Tone.FatOscillator("Ab3", "sine", "square").toMaster().start();
+		 */
+	    Tone.FatOscillator = function () {
+	        var options = Tone.defaults(arguments, [
+	            'frequency',
+	            'type',
+	            'spread'
+	        ], Tone.FatOscillator);
+	        Tone.Source.call(this, options);
+	        /**
+			 *  The oscillator's frequency
+			 *  @type {Frequency}
+			 *  @signal
+			 */
+	        this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);
+	        /**
+			 *  The detune control signal.
+			 *  @type {Cents}
+			 *  @signal
+			 */
+	        this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);
+	        /**
+			 *  The array of oscillators
+			 *  @type {Array}
+			 *  @private
+			 */
+	        this._oscillators = [];
+	        /**
+			 *  The total spread of the oscillators
+			 *  @type  {Cents}
+			 *  @private
+			 */
+	        this._spread = options.spread;
+	        /**
+			 *  The type of the oscillator
+			 *  @type {String}
+			 *  @private
+			 */
+	        this._type = options.type;
+	        /**
+			 *  The phase of the oscillators
+			 *  @type {Degrees}
+			 *  @private
+			 */
+	        this._phase = options.phase;
+	        /**
+			 *  The partials array
+			 *  @type {Array}
+			 *  @private
+			 */
+	        this._partials = Tone.defaultArg(options.partials, []);
+	        //set the count initially
+	        this.count = options.count;
+	        this._readOnly([
+	            'frequency',
+	            'detune'
+	        ]);
+	    };
+	    Tone.extend(Tone.FatOscillator, Tone.Source);
+	    /**
+		 *  default values
+		 *  @static
+		 *  @type {Object}
+		 *  @const
+		 */
+	    Tone.FatOscillator.defaults = {
+	        'frequency': 440,
+	        'detune': 0,
+	        'phase': 0,
+	        'spread': 20,
+	        'count': 3,
+	        'type': 'sawtooth'
+	    };
+	    /**
+		 *  start the oscillator
+		 *  @param  {Time} [time=now]
+		 *  @private
+		 */
+	    Tone.FatOscillator.prototype._start = function (time) {
+	        time = this.toSeconds(time);
+	        this._forEach(function (osc) {
+	            osc.start(time);
+	        });
+	    };
+	    /**
+		 *  stop the oscillator
+		 *  @param  {Time} [time=now]
+		 *  @private
+		 */
+	    Tone.FatOscillator.prototype._stop = function (time) {
+	        time = this.toSeconds(time);
+	        this._forEach(function (osc) {
+	            osc.stop(time);
+	        });
+	    };
+	    /**
+		 *  restart the oscillator
+		 *  @param  {Time} time (optional) timing parameter
+		 *  @private
+		 */
+	    Tone.FatOscillator.prototype.restart = function (time) {
+	        time = this.toSeconds(time);
+	        this._forEach(function (osc) {
+	            osc.restart(time);
+	        });
+	    };
+	    /**
+		 *  Iterate over all of the oscillators
+		 *  @param  {Function}  iterator  The iterator function
+		 *  @private
+		 */
+	    Tone.FatOscillator.prototype._forEach = function (iterator) {
+	        for (var i = 0; i < this._oscillators.length; i++) {
+	            iterator.call(this, this._oscillators[i], i);
+	        }
+	    };
+	    /**
+		 * The type of the carrier oscillator
+		 * @memberOf Tone.FatOscillator#
+		 * @type {string}
+		 * @name type
+		 */
+	    Object.defineProperty(Tone.FatOscillator.prototype, 'type', {
+	        get: function () {
+	            return this._type;
+	        },
+	        set: function (type) {
+	            this._type = type;
+	            this._forEach(function (osc) {
+	                osc.type = type;
+	            });
+	        }
+	    });
+	    /**
+		 * The detune spread between the oscillators. If "count" is
+		 * set to 3 oscillators and the "spread" is set to 40,
+		 * the three oscillators would be detuned like this: [-20, 0, 20]
+		 * for a total detune spread of 40 cents.
+		 * @memberOf Tone.FatOscillator#
+		 * @type {Cents}
+		 * @name spread
+		 */
+	    Object.defineProperty(Tone.FatOscillator.prototype, 'spread', {
+	        get: function () {
+	            return this._spread;
+	        },
+	        set: function (spread) {
+	            this._spread = spread;
+	            if (this._oscillators.length > 1) {
+	                var start = -spread / 2;
+	                var step = spread / (this._oscillators.length - 1);
+	                this._forEach(function (osc, i) {
+	                    osc.detune.value = start + step * i;
+	                });
+	            }
+	        }
+	    });
+	    /**
+		 * The number of detuned oscillators
+		 * @memberOf Tone.FatOscillator#
+		 * @type {Number}
+		 * @name count
+		 */
+	    Object.defineProperty(Tone.FatOscillator.prototype, 'count', {
+	        get: function () {
+	            return this._oscillators.length;
+	        },
+	        set: function (count) {
+	            count = Math.max(count, 1);
+	            if (this._oscillators.length !== count) {
+	                // var partials = this.partials;
+	                // var type = this.type;
+	                //dispose the previous oscillators
+	                this._forEach(function (osc) {
+	                    osc.dispose();
+	                });
+	                this._oscillators = [];
+	                for (var i = 0; i < count; i++) {
+	                    var osc = new Tone.Oscillator();
+	                    if (this.type === Tone.Oscillator.Type.Custom) {
+	                        osc.partials = this._partials;
+	                    } else {
+	                        osc.type = this._type;
+	                    }
+	                    osc.phase = this._phase;
+	                    osc.volume.value = -6 - count * 1.1;
+	                    this.frequency.connect(osc.frequency);
+	                    this.detune.connect(osc.detune);
+	                    osc.connect(this.output);
+	                    this._oscillators[i] = osc;
+	                }
+	                //set the spread
+	                this.spread = this._spread;
+	                if (this.state === Tone.State.Started) {
+	                    this._forEach(function (osc) {
+	                        osc.start();
+	                    });
+	                }
+	            }
+	        }
+	    });
+	    /**
+		 * The phase of the oscillator in degrees.
+		 * @memberOf Tone.FatOscillator#
+		 * @type {Number}
+		 * @name phase
+		 */
+	    Object.defineProperty(Tone.FatOscillator.prototype, 'phase', {
+	        get: function () {
+	            return this._phase;
+	        },
+	        set: function (phase) {
+	            this._phase = phase;
+	            this._forEach(function (osc) {
+	                osc.phase = phase;
+	            });
+	        }
+	    });
+	    /**
+		 * The partials of the carrier waveform. A partial represents
+		 * the amplitude at a harmonic. The first harmonic is the
+		 * fundamental frequency, the second is the octave and so on
+		 * following the harmonic series.
+		 * Setting this value will automatically set the type to "custom".
+		 * The value is an empty array when the type is not "custom".
+		 * @memberOf Tone.FatOscillator#
+		 * @type {Array}
+		 * @name partials
+		 * @example
+		 * osc.partials = [1, 0.2, 0.01];
+		 */
+	    Object.defineProperty(Tone.FatOscillator.prototype, 'partials', {
+	        get: function () {
+	            return this._partials;
+	        },
+	        set: function (partials) {
+	            this._partials = partials;
+	            this._type = Tone.Oscillator.Type.Custom;
+	            this._forEach(function (osc) {
+	                osc.partials = partials;
+	            });
+	        }
+	    });
+	    /**
+		 *  Clean up.
+		 *  @return {Tone.FatOscillator} this
+		 */
+	    Tone.FatOscillator.prototype.dispose = function () {
+	        Tone.Source.prototype.dispose.call(this);
+	        this._writable([
+	            'frequency',
+	            'detune'
+	        ]);
+	        this.frequency.dispose();
+	        this.frequency = null;
+	        this.detune.dispose();
+	        this.detune = null;
+	        this._forEach(function (osc) {
+	            osc.dispose();
+	        });
+	        this._oscillators = null;
+	        this._partials = null;
+	        return this;
+	    };
+	    return Tone.FatOscillator;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Tone.OmniOscillator aggregates Tone.Oscillator, Tone.PulseOscillator,
+		 *         Tone.PWMOscillator, Tone.FMOscillator, Tone.AMOscillator, and Tone.FatOscillator
+		 *         into one class. The oscillator class can be changed by setting the `type`.
+		 *         `omniOsc.type = "pwm"` will set it to the Tone.PWMOscillator. Prefixing
+		 *         any of the basic types ("sine", "square4", etc.) with "fm", "am", or "fat"
+		 *         will use the FMOscillator, AMOscillator or FatOscillator respectively.
+		 *         For example: `omniOsc.type = "fatsawtooth"` will create set the oscillator
+		 *         to a FatOscillator of type "sawtooth".
+		 *
+		 *  @extends {Tone.Source}
+		 *  @constructor
+		 *  @param {Frequency} frequency The initial frequency of the oscillator.
+		 *  @param {String} type The type of the oscillator.
+		 *  @example
+		 *  var omniOsc = new Tone.OmniOscillator("C#4", "pwm");
+		 */
+	    Tone.OmniOscillator = function () {
+	        var options = Tone.defaults(arguments, [
+	            'frequency',
+	            'type'
+	        ], Tone.OmniOscillator);
+	        Tone.Source.call(this, options);
+	        /**
+			 *  The frequency control.
+			 *  @type {Frequency}
+			 *  @signal
+			 */
+	        this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);
+	        /**
+			 *  The detune control
+			 *  @type {Cents}
+			 *  @signal
+			 */
+	        this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);
+	        /**
+			 *  the type of the oscillator source
+			 *  @type {String}
+			 *  @private
+			 */
+	        this._sourceType = undefined;
+	        /**
+			 *  the oscillator
+			 *  @type {Tone.Oscillator}
+			 *  @private
+			 */
+	        this._oscillator = null;
+	        //set the oscillator
+	        this.type = options.type;
+	        this._readOnly([
+	            'frequency',
+	            'detune'
+	        ]);
+	        //set the options
+	        this.set(options);
+	    };
+	    Tone.extend(Tone.OmniOscillator, Tone.Source);
+	    /**
+		 *  default values
+		 *  @static
+		 *  @type {Object}
+		 *  @const
+		 */
+	    Tone.OmniOscillator.defaults = {
+	        'frequency': 440,
+	        'detune': 0,
+	        'type': 'sine',
+	        'phase': 0
+	    };
+	    /**
+		 *  @enum {String}
+		 *  @private
+		 */
+	    var OmniOscType = {
+	        Pulse: 'PulseOscillator',
+	        PWM: 'PWMOscillator',
+	        Osc: 'Oscillator',
+	        FM: 'FMOscillator',
+	        AM: 'AMOscillator',
+	        Fat: 'FatOscillator'
+	    };
+	    /**
+		 *  start the oscillator
+		 *  @param {Time} [time=now] the time to start the oscillator
+		 *  @private
+		 */
+	    Tone.OmniOscillator.prototype._start = function (time) {
+	        this._oscillator.start(time);
+	    };
+	    /**
+		 *  start the oscillator
+		 *  @param {Time} [time=now] the time to start the oscillator
+		 *  @private
+		 */
+	    Tone.OmniOscillator.prototype._stop = function (time) {
+	        this._oscillator.stop(time);
+	    };
+	    Tone.OmniOscillator.prototype.restart = function (time) {
+	        this._oscillator.restart(time);
+	    };
+	    /**
+		 * The type of the oscillator. Can be any of the basic types: sine, square, triangle, sawtooth. Or
+		 * prefix the basic types with "fm", "am", or "fat" to use the FMOscillator, AMOscillator or FatOscillator
+		 * types. The oscillator could also be set to "pwm" or "pulse". All of the parameters of the
+		 * oscillator's class are accessible when the oscillator is set to that type, but throws an error
+		 * when it's not.
+		 *
+		 * @memberOf Tone.OmniOscillator#
+		 * @type {String}
+		 * @name type
+		 * @example
+		 * omniOsc.type = "pwm";
+		 * //modulationFrequency is parameter which is available
+		 * //only when the type is "pwm".
+		 * omniOsc.modulationFrequency.value = 0.5;
+		 * @example
+		 * //an square wave frequency modulated by a sawtooth
+		 * omniOsc.type = "fmsquare";
+		 * omniOsc.modulationType = "sawtooth";
+		 */
+	    Object.defineProperty(Tone.OmniOscillator.prototype, 'type', {
+	        get: function () {
+	            var prefix = '';
+	            if (this._sourceType === OmniOscType.FM) {
+	                prefix = 'fm';
+	            } else if (this._sourceType === OmniOscType.AM) {
+	                prefix = 'am';
+	            } else if (this._sourceType === OmniOscType.Fat) {
+	                prefix = 'fat';
+	            }
+	            return prefix + this._oscillator.type;
+	        },
+	        set: function (type) {
+	            if (type.substr(0, 2) === 'fm') {
+	                this._createNewOscillator(OmniOscType.FM);
+	                this._oscillator.type = type.substr(2);
+	            } else if (type.substr(0, 2) === 'am') {
+	                this._createNewOscillator(OmniOscType.AM);
+	                this._oscillator.type = type.substr(2);
+	            } else if (type.substr(0, 3) === 'fat') {
+	                this._createNewOscillator(OmniOscType.Fat);
+	                this._oscillator.type = type.substr(3);
+	            } else if (type === 'pwm') {
+	                this._createNewOscillator(OmniOscType.PWM);
+	            } else if (type === 'pulse') {
+	                this._createNewOscillator(OmniOscType.Pulse);
+	            } else {
+	                this._createNewOscillator(OmniOscType.Osc);
+	                this._oscillator.type = type;
+	            }
+	        }
+	    });
+	    /**
+		 * The partials of the waveform. A partial represents
+		 * the amplitude at a harmonic. The first harmonic is the
+		 * fundamental frequency, the second is the octave and so on
+		 * following the harmonic series.
+		 * Setting this value will automatically set the type to "custom".
+		 * The value is an empty array when the type is not "custom".
+		 * This is not available on "pwm" and "pulse" oscillator types.
+		 * @memberOf Tone.OmniOscillator#
+		 * @type {Array}
+		 * @name partials
+		 * @example
+		 * osc.partials = [1, 0.2, 0.01];
+		 */
+	    Object.defineProperty(Tone.OmniOscillator.prototype, 'partials', {
+	        get: function () {
+	            return this._oscillator.partials;
+	        },
+	        set: function (partials) {
+	            this._oscillator.partials = partials;
+	        }
+	    });
+	    /**
+		 *  Set a member/attribute of the oscillator.
+		 *  @param {Object|String} params
+		 *  @param {number=} value
+		 *  @param {Time=} rampTime
+		 *  @returns {Tone.OmniOscillator} this
+		 */
+	    Tone.OmniOscillator.prototype.set = function (params, value) {
+	        //make sure the type is set first
+	        if (params === 'type') {
+	            this.type = value;
+	        } else if (Tone.isObject(params) && params.hasOwnProperty('type')) {
+	            this.type = params.type;
+	        }
+	        //then set the rest
+	        Tone.prototype.set.apply(this, arguments);
+	        return this;
+	    };
+	    /**
+		 *  connect the oscillator to the frequency and detune signals
+		 *  @private
+		 */
+	    Tone.OmniOscillator.prototype._createNewOscillator = function (oscType) {
+	        if (oscType !== this._sourceType) {
+	            this._sourceType = oscType;
+	            var OscillatorConstructor = Tone[oscType];
+	            //short delay to avoid clicks on the change
+	            var now = this.now();
+	            if (this._oscillator !== null) {
+	                var oldOsc = this._oscillator;
+	                oldOsc.stop(now);
+	                //dispose the old one
+	                this.context.setTimeout(function () {
+	                    oldOsc.dispose();
+	                    oldOsc = null;
+	                }, this.blockTime);
+	            }
+	            this._oscillator = new OscillatorConstructor();
+	            this.frequency.connect(this._oscillator.frequency);
+	            this.detune.connect(this._oscillator.detune);
+	            this._oscillator.connect(this.output);
+	            if (this.state === Tone.State.Started) {
+	                this._oscillator.start(now);
+	            }
+	        }
+	    };
+	    /**
+		 * The phase of the oscillator in degrees.
+		 * @memberOf Tone.OmniOscillator#
+		 * @type {Degrees}
+		 * @name phase
+		 */
+	    Object.defineProperty(Tone.OmniOscillator.prototype, 'phase', {
+	        get: function () {
+	            return this._oscillator.phase;
+	        },
+	        set: function (phase) {
+	            this._oscillator.phase = phase;
+	        }
+	    });
+	    /**
+		 * The width of the oscillator (only if the oscillator is set to "pulse")
+		 * @memberOf Tone.OmniOscillator#
+		 * @type {NormalRange}
+		 * @signal
+		 * @name width
+		 * @example
+		 * var omniOsc = new Tone.OmniOscillator(440, "pulse");
+		 * //can access the width attribute only if type === "pulse"
+		 * omniOsc.width.value = 0.2;
+		 */
+	    Object.defineProperty(Tone.OmniOscillator.prototype, 'width', {
+	        get: function () {
+	            if (this._sourceType === OmniOscType.Pulse) {
+	                return this._oscillator.width;
+	            }
+	        }
+	    });
+	    /**
+		 * The number of detuned oscillators
+		 * @memberOf Tone.OmniOscillator#
+		 * @type {Number}
+		 * @name count
+		 */
+	    Object.defineProperty(Tone.OmniOscillator.prototype, 'count', {
+	        get: function () {
+	            if (this._sourceType === OmniOscType.Fat) {
+	                return this._oscillator.count;
+	            }
+	        },
+	        set: function (count) {
+	            if (this._sourceType === OmniOscType.Fat) {
+	                this._oscillator.count = count;
+	            }
+	        }
+	    });
+	    /**
+		 * The detune spread between the oscillators. If "count" is
+		 * set to 3 oscillators and the "spread" is set to 40,
+		 * the three oscillators would be detuned like this: [-20, 0, 20]
+		 * for a total detune spread of 40 cents. See Tone.FatOscillator
+		 * for more info.
+		 * @memberOf Tone.OmniOscillator#
+		 * @type {Cents}
+		 * @name spread
+		 */
+	    Object.defineProperty(Tone.OmniOscillator.prototype, 'spread', {
+	        get: function () {
+	            if (this._sourceType === OmniOscType.Fat) {
+	                return this._oscillator.spread;
+	            }
+	        },
+	        set: function (spread) {
+	            if (this._sourceType === OmniOscType.Fat) {
+	                this._oscillator.spread = spread;
+	            }
+	        }
+	    });
+	    /**
+		 * The type of the modulator oscillator. Only if the oscillator
+		 * is set to "am" or "fm" types. see. Tone.AMOscillator or Tone.FMOscillator
+		 * for more info.
+		 * @memberOf Tone.OmniOscillator#
+		 * @type {String}
+		 * @name modulationType
+		 */
+	    Object.defineProperty(Tone.OmniOscillator.prototype, 'modulationType', {
+	        get: function () {
+	            if (this._sourceType === OmniOscType.FM || this._sourceType === OmniOscType.AM) {
+	                return this._oscillator.modulationType;
+	            }
+	        },
+	        set: function (mType) {
+	            if (this._sourceType === OmniOscType.FM || this._sourceType === OmniOscType.AM) {
+	                this._oscillator.modulationType = mType;
+	            }
+	        }
+	    });
+	    /**
+		 * The modulation index which is in essence the depth or amount of the modulation. In other terms it is the
+		 * ratio of the frequency of the modulating signal (mf) to the amplitude of the
+		 * modulating signal (ma) -- as in ma/mf.
+		 * See Tone.FMOscillator for more info.
+		 * @type {Positive}
+		 * @signal
+		 * @name modulationIndex
+		 */
+	    Object.defineProperty(Tone.OmniOscillator.prototype, 'modulationIndex', {
+	        get: function () {
+	            if (this._sourceType === OmniOscType.FM) {
+	                return this._oscillator.modulationIndex;
+	            }
+	        }
+	    });
+	    /**
+		 *  Harmonicity is the frequency ratio between the carrier and the modulator oscillators.
+		 *  A harmonicity of 1 gives both oscillators the same frequency.
+		 *  Harmonicity = 2 means a change of an octave. See Tone.AMOscillator or Tone.FMOscillator
+		 *  for more info.
+		 *  @memberOf Tone.OmniOscillator#
+		 *  @signal
+		 *  @type {Positive}
+		 *  @name harmonicity
+		 */
+	    Object.defineProperty(Tone.OmniOscillator.prototype, 'harmonicity', {
+	        get: function () {
+	            if (this._sourceType === OmniOscType.FM || this._sourceType === OmniOscType.AM) {
+	                return this._oscillator.harmonicity;
+	            }
+	        }
+	    });
+	    /**
+		 * The modulationFrequency Signal of the oscillator
+		 * (only if the oscillator type is set to pwm). See
+		 * Tone.PWMOscillator for more info.
+		 * @memberOf Tone.OmniOscillator#
+		 * @type {Frequency}
+		 * @signal
+		 * @name modulationFrequency
+		 * @example
+		 * var omniOsc = new Tone.OmniOscillator(440, "pwm");
+		 * //can access the modulationFrequency attribute only if type === "pwm"
+		 * omniOsc.modulationFrequency.value = 0.2;
+		 */
+	    Object.defineProperty(Tone.OmniOscillator.prototype, 'modulationFrequency', {
+	        get: function () {
+	            if (this._sourceType === OmniOscType.PWM) {
+	                return this._oscillator.modulationFrequency;
+	            }
+	        }
+	    });
+	    /**
+		 *  Clean up.
+		 *  @return {Tone.OmniOscillator} this
+		 */
+	    Tone.OmniOscillator.prototype.dispose = function () {
+	        Tone.Source.prototype.dispose.call(this);
+	        this._writable([
+	            'frequency',
+	            'detune'
+	        ]);
+	        this.detune.dispose();
+	        this.detune = null;
+	        this.frequency.dispose();
+	        this.frequency = null;
+	        this._oscillator.dispose();
+	        this._oscillator = null;
+	        this._sourceType = null;
+	        return this;
+	    };
+	    return Tone.OmniOscillator;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Base-class for all instruments
+		 *
+		 *  @constructor
+		 *  @extends {Tone.AudioNode}
+		 */
+	    Tone.Instrument = function (options) {
+	        //get the defaults
+	        options = Tone.defaultArg(options, Tone.Instrument.defaults);
+	        Tone.AudioNode.call(this);
+	        /**
+			 *  The output and volume triming node
+			 *  @type  {Tone.Volume}
+			 *  @private
+			 */
+	        this._volume = this.output = new Tone.Volume(options.volume);
+	        /**
+			 * The volume of the output in decibels.
+			 * @type {Decibels}
+			 * @signal
+			 * @example
+			 * source.volume.value = -6;
+			 */
+	        this.volume = this._volume.volume;
+	        this._readOnly('volume');
+	        /**
+			 * Keep track of all events scheduled to the transport
+			 * when the instrument is 'synced'
+			 * @type {Array<Number>}
+			 * @private
+			 */
+	        this._scheduledEvents = [];
+	    };
+	    Tone.extend(Tone.Instrument, Tone.AudioNode);
+	    /**
+		 *  the default attributes
+		 *  @type {object}
+		 */
+	    Tone.Instrument.defaults = {
+	        /** the volume of the output in decibels */
+	        'volume': 0
+	    };
+	    /**
+		 *  @abstract
+		 *  @param {string|number} note the note to trigger
+		 *  @param {Time} [time=now] the time to trigger the ntoe
+		 *  @param {number} [velocity=1] the velocity to trigger the note
+		 */
+	    Tone.Instrument.prototype.triggerAttack = Tone.noOp;
+	    /**
+		 *  @abstract
+		 *  @param {Time} [time=now] when to trigger the release
+		 */
+	    Tone.Instrument.prototype.triggerRelease = Tone.noOp;
+	    /**
+		 * Sync the instrument to the Transport. All subsequent calls of
+		 * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)
+		 * will be scheduled along the transport.
+		 * @example
+		 * instrument.sync()
+		 * //schedule 3 notes when the transport first starts
+		 * instrument.triggerAttackRelease('C4', '8n', 0)
+		 * instrument.triggerAttackRelease('E4', '8n', '8n')
+		 * instrument.triggerAttackRelease('G4', '8n', '4n')
+		 * //start the transport to hear the notes
+		 * Transport.start()
+		 * @returns {Tone.Instrument} this
+		 */
+	    Tone.Instrument.prototype.sync = function () {
+	        this._syncMethod('triggerAttack', 1);
+	        this._syncMethod('triggerRelease', 0);
+	        return this;
+	    };
+	    /**
+		 * Wrap the given method so that it can be synchronized
+		 * @param {String} method Which method to wrap and sync
+		 * @param  {Number} timePosition What position the time argument appears in
+		 * @private
+		 */
+	    Tone.Instrument.prototype._syncMethod = function (method, timePosition) {
+	        var originalMethod = this['_original_' + method] = this[method];
+	        this[method] = function () {
+	            var args = Array.prototype.slice.call(arguments);
+	            var time = args[timePosition];
+	            var id = Tone.Transport.schedule(function (t) {
+	                args[timePosition] = t;
+	                originalMethod.apply(this, args);
+	            }.bind(this), time);
+	            this._scheduledEvents.push(id);
+	        }.bind(this);
+	    };
+	    /**
+		 * Unsync the instrument from the Transport
+		 * @returns {Tone.Instrument} this
+		 */
+	    Tone.Instrument.prototype.unsync = function () {
+	        this._scheduledEvents.forEach(function (id) {
+	            Tone.Transport.clear(id);
+	        });
+	        this._scheduledEvents = [];
+	        if (this._original_triggerAttack) {
+	            this.triggerAttack = this._original_triggerAttack;
+	            this.triggerRelease = this._original_triggerRelease;
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Trigger the attack and then the release after the duration.
+		 *  @param  {Frequency} note     The note to trigger.
+		 *  @param  {Time} duration How long the note should be held for before
+		 *                          triggering the release. This value must be greater than 0.
+		 *  @param {Time} [time=now]  When the note should be triggered.
+		 *  @param  {NormalRange} [velocity=1] The velocity the note should be triggered at.
+		 *  @returns {Tone.Instrument} this
+		 *  @example
+		 * //trigger "C4" for the duration of an 8th note
+		 * synth.triggerAttackRelease("C4", "8n");
+		 */
+	    Tone.Instrument.prototype.triggerAttackRelease = function (note, duration, time, velocity) {
+	        time = this.toSeconds(time);
+	        duration = this.toSeconds(duration);
+	        this.triggerAttack(note, time, velocity);
+	        this.triggerRelease(time + duration);
+	        return this;
+	    };
+	    /**
+		 *  clean up
+		 *  @returns {Tone.Instrument} this
+		 */
+	    Tone.Instrument.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._volume.dispose();
+	        this._volume = null;
+	        this._writable(['volume']);
+	        this.volume = null;
+	        this.unsync();
+	        this._scheduledEvents = null;
+	        return this;
+	    };
+	    return Tone.Instrument;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  This is an abstract base class for other monophonic instruments to 
+		 *          extend. IMPORTANT: It does not make any sound on its own and
+		 *          shouldn't be directly instantiated.
+		 *
+		 *  @constructor
+		 *  @abstract
+		 *  @extends {Tone.Instrument}
+		 */
+	    Tone.Monophonic = function (options) {
+	        //get the defaults
+	        options = Tone.defaultArg(options, Tone.Monophonic.defaults);
+	        Tone.Instrument.call(this, options);
+	        /**
+			 *  The glide time between notes. 
+			 *  @type {Time}
+			 */
+	        this.portamento = options.portamento;
+	    };
+	    Tone.extend(Tone.Monophonic, Tone.Instrument);
+	    /**
+		 *  @static
+		 *  @const
+		 *  @type {Object}
+		 */
+	    Tone.Monophonic.defaults = { 'portamento': 0 };
+	    /**
+		 *  Trigger the attack of the note optionally with a given velocity. 
+		 *  
+		 *  
+		 *  @param  {Frequency} note     The note to trigger.
+		 *  @param  {Time} [time=now]     When the note should start.
+		 *  @param  {number} [velocity=1] velocity The velocity scaler 
+		 *                                determines how "loud" the note 
+		 *                                will be triggered.
+		 *  @returns {Tone.Monophonic} this
+		 *  @example
+		 * synth.triggerAttack("C4");
+		 *  @example
+		 * //trigger the note a half second from now at half velocity
+		 * synth.triggerAttack("C4", "+0.5", 0.5);
+		 */
+	    Tone.Monophonic.prototype.triggerAttack = function (note, time, velocity) {
+	        time = this.toSeconds(time);
+	        this._triggerEnvelopeAttack(time, velocity);
+	        this.setNote(note, time);
+	        return this;
+	    };
+	    /**
+		 *  Trigger the release portion of the envelope
+		 *  @param  {Time} [time=now] If no time is given, the release happens immediatly
+		 *  @returns {Tone.Monophonic} this
+		 *  @example
+		 * synth.triggerRelease();
+		 */
+	    Tone.Monophonic.prototype.triggerRelease = function (time) {
+	        time = this.toSeconds(time);
+	        this._triggerEnvelopeRelease(time);
+	        return this;
+	    };
+	    /**
+		 *  override this method with the actual method
+		 *  @abstract
+		 *  @private
+		 */
+	    Tone.Monophonic.prototype._triggerEnvelopeAttack = function () {
+	    };
+	    /**
+		 *  override this method with the actual method
+		 *  @abstract
+		 *  @private
+		 */
+	    Tone.Monophonic.prototype._triggerEnvelopeRelease = function () {
+	    };
+	    /**
+		 *  Get the level of the output at the given time. Measures
+		 *  the envelope(s) value at the time. 
+		 *  @param {Time} time The time to query the envelope value
+		 *  @return {NormalRange} The output level between 0-1
+		 */
+	    Tone.Monophonic.prototype.getLevelAtTime = function (time) {
+	        time = this.toSeconds(time);
+	        return this.envelope.getValueAtTime(time);
+	    };
+	    /**
+		 *  Set the note at the given time. If no time is given, the note
+		 *  will set immediately. 
+		 *  @param {Frequency} note The note to change to.
+		 *  @param  {Time} [time=now] The time when the note should be set. 
+		 *  @returns {Tone.Monophonic} this
+		 * @example
+		 * //change to F#6 in one quarter note from now.
+		 * synth.setNote("F#6", "+4n");
+		 * @example
+		 * //change to Bb4 right now
+		 * synth.setNote("Bb4");
+		 */
+	    Tone.Monophonic.prototype.setNote = function (note, time) {
+	        time = this.toSeconds(time);
+	        if (this.portamento > 0 && this.getLevelAtTime(time) > 0.05) {
+	            var portTime = this.toSeconds(this.portamento);
+	            this.frequency.exponentialRampTo(note, portTime, time);
+	        } else {
+	            this.frequency.setValueAtTime(note, time);
+	        }
+	        return this;
+	    };
+	    return Tone.Monophonic;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Tone.Synth is composed simply of a Tone.OmniOscillator
+		 *          routed through a Tone.AmplitudeEnvelope.
+		 *          <img src="https://docs.google.com/drawings/d/1-1_0YW2Z1J2EPI36P8fNCMcZG7N1w1GZluPs4og4evo/pub?w=1163&h=231">
+		 *
+		 *  @constructor
+		 *  @extends {Tone.Monophonic}
+		 *  @param {Object} [options] the options available for the synth
+		 *                          see defaults below
+		 *  @example
+		 * var synth = new Tone.Synth().toMaster();
+		 * synth.triggerAttackRelease("C4", "8n");
+		 */
+	    Tone.Synth = function (options) {
+	        //get the defaults
+	        options = Tone.defaultArg(options, Tone.Synth.defaults);
+	        Tone.Monophonic.call(this, options);
+	        /**
+			 *  The oscillator.
+			 *  @type {Tone.OmniOscillator}
+			 */
+	        this.oscillator = new Tone.OmniOscillator(options.oscillator);
+	        /**
+			 *  The frequency control.
+			 *  @type {Frequency}
+			 *  @signal
+			 */
+	        this.frequency = this.oscillator.frequency;
+	        /**
+			 *  The detune control.
+			 *  @type {Cents}
+			 *  @signal
+			 */
+	        this.detune = this.oscillator.detune;
+	        /**
+			 *  The amplitude envelope.
+			 *  @type {Tone.AmplitudeEnvelope}
+			 */
+	        this.envelope = new Tone.AmplitudeEnvelope(options.envelope);
+	        //connect the oscillators to the output
+	        this.oscillator.chain(this.envelope, this.output);
+	        this._readOnly([
+	            'oscillator',
+	            'frequency',
+	            'detune',
+	            'envelope'
+	        ]);
+	    };
+	    Tone.extend(Tone.Synth, Tone.Monophonic);
+	    /**
+		 *  @const
+		 *  @static
+		 *  @type {Object}
+		 */
+	    Tone.Synth.defaults = {
+	        'oscillator': { 'type': 'triangle' },
+	        'envelope': {
+	            'attack': 0.005,
+	            'decay': 0.1,
+	            'sustain': 0.3,
+	            'release': 1
+	        }
+	    };
+	    /**
+		 *  start the attack portion of the envelope
+		 *  @param {Time} [time=now] the time the attack should start
+		 *  @param {number} [velocity=1] the velocity of the note (0-1)
+		 *  @returns {Tone.Synth} this
+		 *  @private
+		 */
+	    Tone.Synth.prototype._triggerEnvelopeAttack = function (time, velocity) {
+	        //the envelopes
+	        this.envelope.triggerAttack(time, velocity);
+	        this.oscillator.start(time);
+	        //if there is no release portion, stop the oscillator
+	        if (this.envelope.sustain === 0) {
+	            this.oscillator.stop(time + this.envelope.attack + this.envelope.decay);
+	        }
+	        return this;
+	    };
+	    /**
+		 *  start the release portion of the envelope
+		 *  @param {Time} [time=now] the time the release should start
+		 *  @returns {Tone.Synth} this
+		 *  @private
+		 */
+	    Tone.Synth.prototype._triggerEnvelopeRelease = function (time) {
+	        time = this.toSeconds(time);
+	        this.envelope.triggerRelease(time);
+	        this.oscillator.stop(time + this.envelope.release);
+	        return this;
+	    };
+	    /**
+		 *  clean up
+		 *  @returns {Tone.Synth} this
+		 */
+	    Tone.Synth.prototype.dispose = function () {
+	        Tone.Monophonic.prototype.dispose.call(this);
+	        this._writable([
+	            'oscillator',
+	            'frequency',
+	            'detune',
+	            'envelope'
+	        ]);
+	        this.oscillator.dispose();
+	        this.oscillator = null;
+	        this.envelope.dispose();
+	        this.envelope = null;
+	        this.frequency = null;
+	        this.detune = null;
+	        return this;
+	    };
+	    return Tone.Synth;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  AMSynth uses the output of one Tone.Synth to modulate the
+		 *          amplitude of another Tone.Synth. The harmonicity (the ratio between
+		 *          the two signals) affects the timbre of the output signal greatly.
+		 *          Read more about Amplitude Modulation Synthesis on
+		 *          [SoundOnSound](https://web.archive.org/web/20160404103653/http://www.soundonsound.com:80/sos/mar00/articles/synthsecrets.htm).
+		 *          <img src="https://docs.google.com/drawings/d/1TQu8Ed4iFr1YTLKpB3U1_hur-UwBrh5gdBXc8BxfGKw/pub?w=1009&h=457">
+		 *
+		 *  @constructor
+		 *  @extends {Tone.Monophonic}
+		 *  @param {Object} [options] the options available for the synth
+		 *                            see defaults below
+		 *  @example
+		 * var synth = new Tone.AMSynth().toMaster();
+		 * synth.triggerAttackRelease("C4", "4n");
+		 */
+	    Tone.AMSynth = function (options) {
+	        options = Tone.defaultArg(options, Tone.AMSynth.defaults);
+	        Tone.Monophonic.call(this, options);
+	        /**
+			 *  The carrier voice.
+			 *  @type {Tone.Synth}
+			 *  @private
+			 */
+	        this._carrier = new Tone.Synth();
+	        this._carrier.volume.value = -10;
+	        /**
+			 *  The carrier's oscillator
+			 *  @type {Tone.Oscillator}
+			 */
+	        this.oscillator = this._carrier.oscillator;
+	        /**
+			 *  The carrier's envelope
+			 *  @type {Tone.AmplitudeEnvelope}
+			 */
+	        this.envelope = this._carrier.envelope.set(options.envelope);
+	        /**
+			 *  The modulator voice.
+			 *  @type {Tone.Synth}
+			 *  @private
+			 */
+	        this._modulator = new Tone.Synth();
+	        this._modulator.volume.value = -10;
+	        /**
+			 *  The modulator's oscillator which is applied
+			 *  to the amplitude of the oscillator
+			 *  @type {Tone.Oscillator}
+			 */
+	        this.modulation = this._modulator.oscillator.set(options.modulation);
+	        /**
+			 *  The modulator's envelope
+			 *  @type {Tone.AmplitudeEnvelope}
+			 */
+	        this.modulationEnvelope = this._modulator.envelope.set(options.modulationEnvelope);
+	        /**
+			 *  The frequency.
+			 *  @type {Frequency}
+			 *  @signal
+			 */
+	        this.frequency = new Tone.Signal(440, Tone.Type.Frequency);
+	        /**
+			 *  The detune in cents
+			 *  @type {Cents}
+			 *  @signal
+			 */
+	        this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);
+	        /**
+			 *  Harmonicity is the ratio between the two voices. A harmonicity of
+			 *  1 is no change. Harmonicity = 2 means a change of an octave.
+			 *  @type {Positive}
+			 *  @signal
+			 *  @example
+			 * //pitch voice1 an octave below voice0
+			 * synth.harmonicity.value = 0.5;
+			 */
+	        this.harmonicity = new Tone.Multiply(options.harmonicity);
+	        this.harmonicity.units = Tone.Type.Positive;
+	        /**
+			 *  convert the -1,1 output to 0,1
+			 *  @type {Tone.AudioToGain}
+			 *  @private
+			 */
+	        this._modulationScale = new Tone.AudioToGain();
+	        /**
+			 *  the node where the modulation happens
+			 *  @type {Tone.Gain}
+			 *  @private
+			 */
+	        this._modulationNode = new Tone.Gain();
+	        //control the two voices frequency
+	        this.frequency.connect(this._carrier.frequency);
+	        this.frequency.chain(this.harmonicity, this._modulator.frequency);
+	        this.detune.fan(this._carrier.detune, this._modulator.detune);
+	        this._modulator.chain(this._modulationScale, this._modulationNode.gain);
+	        this._carrier.chain(this._modulationNode, this.output);
+	        this._readOnly([
+	            'frequency',
+	            'harmonicity',
+	            'oscillator',
+	            'envelope',
+	            'modulation',
+	            'modulationEnvelope',
+	            'detune'
+	        ]);
+	    };
+	    Tone.extend(Tone.AMSynth, Tone.Monophonic);
+	    /**
+		 *  @static
+		 *  @type {Object}
+		 */
+	    Tone.AMSynth.defaults = {
+	        'harmonicity': 3,
+	        'detune': 0,
+	        'oscillator': { 'type': 'sine' },
+	        'envelope': {
+	            'attack': 0.01,
+	            'decay': 0.01,
+	            'sustain': 1,
+	            'release': 0.5
+	        },
+	        'modulation': { 'type': 'square' },
+	        'modulationEnvelope': {
+	            'attack': 0.5,
+	            'decay': 0,
+	            'sustain': 1,
+	            'release': 0.5
+	        }
+	    };
+	    /**
+		 *  trigger the attack portion of the note
+		 *
+		 *  @param  {Time} [time=now] the time the note will occur
+		 *  @param {NormalRange} [velocity=1] the velocity of the note
+		 *  @private
+		 *  @returns {Tone.AMSynth} this
+		 */
+	    Tone.AMSynth.prototype._triggerEnvelopeAttack = function (time, velocity) {
+	        //the port glide
+	        time = this.toSeconds(time);
+	        //the envelopes
+	        this._carrier._triggerEnvelopeAttack(time, velocity);
+	        this._modulator._triggerEnvelopeAttack(time);
+	        return this;
+	    };
+	    /**
+		 *  trigger the release portion of the note
+		 *
+		 *  @param  {Time} [time=now] the time the note will release
+		 *  @private
+		 *  @returns {Tone.AMSynth} this
+		 */
+	    Tone.AMSynth.prototype._triggerEnvelopeRelease = function (time) {
+	        this._carrier._triggerEnvelopeRelease(time);
+	        this._modulator._triggerEnvelopeRelease(time);
+	        return this;
+	    };
+	    /**
+		 *  clean up
+		 *  @returns {Tone.AMSynth} this
+		 */
+	    Tone.AMSynth.prototype.dispose = function () {
+	        Tone.Monophonic.prototype.dispose.call(this);
+	        this._writable([
+	            'frequency',
+	            'harmonicity',
+	            'oscillator',
+	            'envelope',
+	            'modulation',
+	            'modulationEnvelope',
+	            'detune'
+	        ]);
+	        this._carrier.dispose();
+	        this._carrier = null;
+	        this._modulator.dispose();
+	        this._modulator = null;
+	        this.frequency.dispose();
+	        this.frequency = null;
+	        this.detune.dispose();
+	        this.detune = null;
+	        this.harmonicity.dispose();
+	        this.harmonicity = null;
+	        this._modulationScale.dispose();
+	        this._modulationScale = null;
+	        this._modulationNode.dispose();
+	        this._modulationNode = null;
+	        this.oscillator = null;
+	        this.envelope = null;
+	        this.modulationEnvelope = null;
+	        this.modulation = null;
+	        return this;
+	    };
+	    return Tone.AMSynth;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Tone.MonoSynth is composed of one oscillator, one filter, and two envelopes.
+		 *          The amplitude of the Tone.Oscillator and the cutoff frequency of the
+		 *          Tone.Filter are controlled by Tone.Envelopes.
+		 *          <img src="https://docs.google.com/drawings/d/1gaY1DF9_Hzkodqf8JI1Cg2VZfwSElpFQfI94IQwad38/pub?w=924&h=240">
+		 *
+		 *  @constructor
+		 *  @extends {Tone.Monophonic}
+		 *  @param {Object} [options] the options available for the synth
+		 *                          see defaults below
+		 *  @example
+		 * var synth = new Tone.MonoSynth({
+		 * 	"oscillator" : {
+		 * 		"type" : "square"
+		 *  },
+		 *  "envelope" : {
+		 *  	"attack" : 0.1
+		 *  }
+		 * }).toMaster();
+		 * synth.triggerAttackRelease("C4", "8n");
+		 */
+	    Tone.MonoSynth = function (options) {
+	        //get the defaults
+	        options = Tone.defaultArg(options, Tone.MonoSynth.defaults);
+	        Tone.Monophonic.call(this, options);
+	        /**
+			 *  The oscillator.
+			 *  @type {Tone.OmniOscillator}
+			 */
+	        this.oscillator = new Tone.OmniOscillator(options.oscillator);
+	        /**
+			 *  The frequency control.
+			 *  @type {Frequency}
+			 *  @signal
+			 */
+	        this.frequency = this.oscillator.frequency;
+	        /**
+			 *  The detune control.
+			 *  @type {Cents}
+			 *  @signal
+			 */
+	        this.detune = this.oscillator.detune;
+	        /**
+			 *  The filter.
+			 *  @type {Tone.Filter}
+			 */
+	        this.filter = new Tone.Filter(options.filter);
+	        /**
+			 *  The filter envelope.
+			 *  @type {Tone.FrequencyEnvelope}
+			 */
+	        this.filterEnvelope = new Tone.FrequencyEnvelope(options.filterEnvelope);
+	        /**
+			 *  The amplitude envelope.
+			 *  @type {Tone.AmplitudeEnvelope}
+			 */
+	        this.envelope = new Tone.AmplitudeEnvelope(options.envelope);
+	        //connect the oscillators to the output
+	        this.oscillator.chain(this.filter, this.envelope, this.output);
+	        //connect the filter envelope
+	        this.filterEnvelope.connect(this.filter.frequency);
+	        this._readOnly([
+	            'oscillator',
+	            'frequency',
+	            'detune',
+	            'filter',
+	            'filterEnvelope',
+	            'envelope'
+	        ]);
+	    };
+	    Tone.extend(Tone.MonoSynth, Tone.Monophonic);
+	    /**
+		 *  @const
+		 *  @static
+		 *  @type {Object}
+		 */
+	    Tone.MonoSynth.defaults = {
+	        'frequency': 'C4',
+	        'detune': 0,
+	        'oscillator': { 'type': 'square' },
+	        'filter': {
+	            'Q': 6,
+	            'type': 'lowpass',
+	            'rolloff': -24
+	        },
+	        'envelope': {
+	            'attack': 0.005,
+	            'decay': 0.1,
+	            'sustain': 0.9,
+	            'release': 1
+	        },
+	        'filterEnvelope': {
+	            'attack': 0.06,
+	            'decay': 0.2,
+	            'sustain': 0.5,
+	            'release': 2,
+	            'baseFrequency': 200,
+	            'octaves': 7,
+	            'exponent': 2
+	        }
+	    };
+	    /**
+		 *  start the attack portion of the envelope
+		 *  @param {Time} [time=now] the time the attack should start
+		 *  @param {NormalRange} [velocity=1] the velocity of the note (0-1)
+		 *  @returns {Tone.MonoSynth} this
+		 *  @private
+		 */
+	    Tone.MonoSynth.prototype._triggerEnvelopeAttack = function (time, velocity) {
+	        time = this.toSeconds(time);
+	        //the envelopes
+	        this.envelope.triggerAttack(time, velocity);
+	        this.filterEnvelope.triggerAttack(time);
+	        this.oscillator.start(time);
+	        if (this.envelope.sustain === 0) {
+	            this.oscillator.stop(time + this.envelope.attack + this.envelope.decay);
+	        }
+	        return this;
+	    };
+	    /**
+		 *  start the release portion of the envelope
+		 *  @param {Time} [time=now] the time the release should start
+		 *  @returns {Tone.MonoSynth} this
+		 *  @private
+		 */
+	    Tone.MonoSynth.prototype._triggerEnvelopeRelease = function (time) {
+	        this.envelope.triggerRelease(time);
+	        this.filterEnvelope.triggerRelease(time);
+	        this.oscillator.stop(time + this.envelope.release);
+	        return this;
+	    };
+	    /**
+		 *  clean up
+		 *  @returns {Tone.MonoSynth} this
+		 */
+	    Tone.MonoSynth.prototype.dispose = function () {
+	        Tone.Monophonic.prototype.dispose.call(this);
+	        this._writable([
+	            'oscillator',
+	            'frequency',
+	            'detune',
+	            'filter',
+	            'filterEnvelope',
+	            'envelope'
+	        ]);
+	        this.oscillator.dispose();
+	        this.oscillator = null;
+	        this.envelope.dispose();
+	        this.envelope = null;
+	        this.filterEnvelope.dispose();
+	        this.filterEnvelope = null;
+	        this.filter.dispose();
+	        this.filter = null;
+	        this.frequency = null;
+	        this.detune = null;
+	        return this;
+	    };
+	    return Tone.MonoSynth;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Tone.DuoSynth is a monophonic synth composed of two
+		 *          MonoSynths run in parallel with control over the
+		 *          frequency ratio between the two voices and vibrato effect.
+		 *          <img src="https://docs.google.com/drawings/d/1bL4GXvfRMMlqS7XyBm9CjL9KJPSUKbcdBNpqOlkFLxk/pub?w=1012&h=448">
+		 *
+		 *  @constructor
+		 *  @extends {Tone.Monophonic}
+		 *  @param {Object} [options] the options available for the synth
+		 *                          see defaults below
+		 *  @example
+		 * var duoSynth = new Tone.DuoSynth().toMaster();
+		 * duoSynth.triggerAttackRelease("C4", "2n");
+		 */
+	    Tone.DuoSynth = function (options) {
+	        options = Tone.defaultArg(options, Tone.DuoSynth.defaults);
+	        Tone.Monophonic.call(this, options);
+	        /**
+			 *  the first voice
+			 *  @type {Tone.MonoSynth}
+			 */
+	        this.voice0 = new Tone.MonoSynth(options.voice0);
+	        this.voice0.volume.value = -10;
+	        /**
+			 *  the second voice
+			 *  @type {Tone.MonoSynth}
+			 */
+	        this.voice1 = new Tone.MonoSynth(options.voice1);
+	        this.voice1.volume.value = -10;
+	        /**
+			 *  The vibrato LFO.
+			 *  @type {Tone.LFO}
+			 *  @private
+			 */
+	        this._vibrato = new Tone.LFO(options.vibratoRate, -50, 50);
+	        this._vibrato.start();
+	        /**
+			 * the vibrato frequency
+			 * @type {Frequency}
+			 * @signal
+			 */
+	        this.vibratoRate = this._vibrato.frequency;
+	        /**
+			 *  the vibrato gain
+			 *  @type {Tone.Gain}
+			 *  @private
+			 */
+	        this._vibratoGain = new Tone.Gain(options.vibratoAmount, Tone.Type.Positive);
+	        /**
+			 * The amount of vibrato
+			 * @type {Positive}
+			 * @signal
+			 */
+	        this.vibratoAmount = this._vibratoGain.gain;
+	        /**
+			 *  the frequency control
+			 *  @type {Frequency}
+			 *  @signal
+			 */
+	        this.frequency = new Tone.Signal(440, Tone.Type.Frequency);
+	        /**
+			 *  Harmonicity is the ratio between the two voices. A harmonicity of
+			 *  1 is no change. Harmonicity = 2 means a change of an octave.
+			 *  @type {Positive}
+			 *  @signal
+			 *  @example
+			 * //pitch voice1 an octave below voice0
+			 * duoSynth.harmonicity.value = 0.5;
+			 */
+	        this.harmonicity = new Tone.Multiply(options.harmonicity);
+	        this.harmonicity.units = Tone.Type.Positive;
+	        //control the two voices frequency
+	        this.frequency.connect(this.voice0.frequency);
+	        this.frequency.chain(this.harmonicity, this.voice1.frequency);
+	        this._vibrato.connect(this._vibratoGain);
+	        this._vibratoGain.fan(this.voice0.detune, this.voice1.detune);
+	        this.voice0.connect(this.output);
+	        this.voice1.connect(this.output);
+	        this._readOnly([
+	            'voice0',
+	            'voice1',
+	            'frequency',
+	            'vibratoAmount',
+	            'vibratoRate'
+	        ]);
+	    };
+	    Tone.extend(Tone.DuoSynth, Tone.Monophonic);
+	    /**
+		 *  @static
+		 *  @type {Object}
+		 */
+	    Tone.DuoSynth.defaults = {
+	        'vibratoAmount': 0.5,
+	        'vibratoRate': 5,
+	        'harmonicity': 1.5,
+	        'voice0': {
+	            'volume': -10,
+	            'portamento': 0,
+	            'oscillator': { 'type': 'sine' },
+	            'filterEnvelope': {
+	                'attack': 0.01,
+	                'decay': 0,
+	                'sustain': 1,
+	                'release': 0.5
+	            },
+	            'envelope': {
+	                'attack': 0.01,
+	                'decay': 0,
+	                'sustain': 1,
+	                'release': 0.5
+	            }
+	        },
+	        'voice1': {
+	            'volume': -10,
+	            'portamento': 0,
+	            'oscillator': { 'type': 'sine' },
+	            'filterEnvelope': {
+	                'attack': 0.01,
+	                'decay': 0,
+	                'sustain': 1,
+	                'release': 0.5
+	            },
+	            'envelope': {
+	                'attack': 0.01,
+	                'decay': 0,
+	                'sustain': 1,
+	                'release': 0.5
+	            }
+	        }
+	    };
+	    /**
+		 *  start the attack portion of the envelopes
+		 *
+		 *  @param {Time} [time=now] the time the attack should start
+		 *  @param {NormalRange} [velocity=1] the velocity of the note (0-1)
+		 *  @returns {Tone.DuoSynth} this
+		 *  @private
+		 */
+	    Tone.DuoSynth.prototype._triggerEnvelopeAttack = function (time, velocity) {
+	        time = this.toSeconds(time);
+	        this.voice0._triggerEnvelopeAttack(time, velocity);
+	        this.voice1._triggerEnvelopeAttack(time, velocity);
+	        return this;
+	    };
+	    /**
+		 *  start the release portion of the envelopes
+		 *
+		 *  @param {Time} [time=now] the time the release should start
+		 *  @returns {Tone.DuoSynth} this
+		 *  @private
+		 */
+	    Tone.DuoSynth.prototype._triggerEnvelopeRelease = function (time) {
+	        this.voice0._triggerEnvelopeRelease(time);
+	        this.voice1._triggerEnvelopeRelease(time);
+	        return this;
+	    };
+	    /**
+		 *  Get the level of the output at the given time. Measures
+		 *  the envelope(s) value at the time. 
+		 *  @param {Time} time The time to query the envelope value
+		 *  @return {NormalRange} The output level between 0-1
+		 */
+	    Tone.DuoSynth.prototype.getLevelAtTime = function (time) {
+	        return (this.voice0.getLevelAtTime(time) + this.voice1.getLevelAtTime(time)) / 2;
+	    };
+	    /**
+		 *  clean up
+		 *  @returns {Tone.DuoSynth} this
+		 */
+	    Tone.DuoSynth.prototype.dispose = function () {
+	        Tone.Monophonic.prototype.dispose.call(this);
+	        this._writable([
+	            'voice0',
+	            'voice1',
+	            'frequency',
+	            'vibratoAmount',
+	            'vibratoRate'
+	        ]);
+	        this.voice0.dispose();
+	        this.voice0 = null;
+	        this.voice1.dispose();
+	        this.voice1 = null;
+	        this.frequency.dispose();
+	        this.frequency = null;
+	        this._vibratoGain.dispose();
+	        this._vibratoGain = null;
+	        this._vibrato = null;
+	        this.harmonicity.dispose();
+	        this.harmonicity = null;
+	        this.vibratoAmount.dispose();
+	        this.vibratoAmount = null;
+	        this.vibratoRate = null;
+	        return this;
+	    };
+	    return Tone.DuoSynth;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  FMSynth is composed of two Tone.Synths where one Tone.Synth modulates
+		 *          the frequency of a second Tone.Synth. A lot of spectral content
+		 *          can be explored using the modulationIndex parameter. Read more about
+		 *          frequency modulation synthesis on Sound On Sound: [Part 1](https://web.archive.org/web/20160403123704/http://www.soundonsound.com/sos/apr00/articles/synthsecrets.htm), [Part 2](https://web.archive.org/web/20160403115835/http://www.soundonsound.com/sos/may00/articles/synth.htm).
+		 *          <img src="https://docs.google.com/drawings/d/1h0PUDZXPgi4Ikx6bVT6oncrYPLluFKy7lj53puxj-DM/pub?w=902&h=462">
+		 *
+		 *  @constructor
+		 *  @extends {Tone.Monophonic}
+		 *  @param {Object} [options] the options available for the synth
+		 *                          see defaults below
+		 *  @example
+		 * var fmSynth = new Tone.FMSynth().toMaster();
+		 * fmSynth.triggerAttackRelease("C5", "4n");
+		 */
+	    Tone.FMSynth = function (options) {
+	        options = Tone.defaultArg(options, Tone.FMSynth.defaults);
+	        Tone.Monophonic.call(this, options);
+	        /**
+			 *  The carrier voice.
+			 *  @type {Tone.Synth}
+			 *  @private
+			 */
+	        this._carrier = new Tone.Synth(options.carrier);
+	        this._carrier.volume.value = -10;
+	        /**
+			 *  The carrier's oscillator
+			 *  @type {Tone.Oscillator}
+			 */
+	        this.oscillator = this._carrier.oscillator;
+	        /**
+			 *  The carrier's envelope
+			 *  @type {Tone.Oscillator}
+			 */
+	        this.envelope = this._carrier.envelope.set(options.envelope);
+	        /**
+			 *  The modulator voice.
+			 *  @type {Tone.Synth}
+			 *  @private
+			 */
+	        this._modulator = new Tone.Synth(options.modulator);
+	        this._modulator.volume.value = -10;
+	        /**
+			 *  The modulator's oscillator which is applied
+			 *  to the amplitude of the oscillator
+			 *  @type {Tone.Oscillator}
+			 */
+	        this.modulation = this._modulator.oscillator.set(options.modulation);
+	        /**
+			 *  The modulator's envelope
+			 *  @type {Tone.Oscillator}
+			 */
+	        this.modulationEnvelope = this._modulator.envelope.set(options.modulationEnvelope);
+	        /**
+			 *  The frequency control.
+			 *  @type {Frequency}
+			 *  @signal
+			 */
+	        this.frequency = new Tone.Signal(440, Tone.Type.Frequency);
+	        /**
+			 *  The detune in cents
+			 *  @type {Cents}
+			 *  @signal
+			 */
+	        this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);
+	        /**
+			 *  Harmonicity is the ratio between the two voices. A harmonicity of
+			 *  1 is no change. Harmonicity = 2 means a change of an octave.
+			 *  @type {Positive}
+			 *  @signal
+			 *  @example
+			 * //pitch voice1 an octave below voice0
+			 * synth.harmonicity.value = 0.5;
+			 */
+	        this.harmonicity = new Tone.Multiply(options.harmonicity);
+	        this.harmonicity.units = Tone.Type.Positive;
+	        /**
+			 *  The modulation index which essentially the depth or amount of the modulation. It is the
+			 *  ratio of the frequency of the modulating signal (mf) to the amplitude of the
+			 *  modulating signal (ma) -- as in ma/mf.
+			 *	@type {Positive}
+			 *	@signal
+			 */
+	        this.modulationIndex = new Tone.Multiply(options.modulationIndex);
+	        this.modulationIndex.units = Tone.Type.Positive;
+	        /**
+			 *  the node where the modulation happens
+			 *  @type {GainNode}
+			 *  @private
+			 */
+	        this._modulationNode = new Tone.Gain(0);
+	        //control the two voices frequency
+	        this.frequency.connect(this._carrier.frequency);
+	        this.frequency.chain(this.harmonicity, this._modulator.frequency);
+	        this.frequency.chain(this.modulationIndex, this._modulationNode);
+	        this.detune.fan(this._carrier.detune, this._modulator.detune);
+	        this._modulator.connect(this._modulationNode.gain);
+	        this._modulationNode.connect(this._carrier.frequency);
+	        this._carrier.connect(this.output);
+	        this._readOnly([
+	            'frequency',
+	            'harmonicity',
+	            'modulationIndex',
+	            'oscillator',
+	            'envelope',
+	            'modulation',
+	            'modulationEnvelope',
+	            'detune'
+	        ]);
+	    };
+	    Tone.extend(Tone.FMSynth, Tone.Monophonic);
+	    /**
+		 *  @static
+		 *  @type {Object}
+		 */
+	    Tone.FMSynth.defaults = {
+	        'harmonicity': 3,
+	        'modulationIndex': 10,
+	        'detune': 0,
+	        'oscillator': { 'type': 'sine' },
+	        'envelope': {
+	            'attack': 0.01,
+	            'decay': 0.01,
+	            'sustain': 1,
+	            'release': 0.5
+	        },
+	        'modulation': { 'type': 'square' },
+	        'modulationEnvelope': {
+	            'attack': 0.5,
+	            'decay': 0,
+	            'sustain': 1,
+	            'release': 0.5
+	        }
+	    };
+	    /**
+		 * 	trigger the attack portion of the note
+		 *
+		 *  @param  {Time} [time=now] the time the note will occur
+		 *  @param {number} [velocity=1] the velocity of the note
+		 *  @returns {Tone.FMSynth} this
+		 *  @private
+		 */
+	    Tone.FMSynth.prototype._triggerEnvelopeAttack = function (time, velocity) {
+	        time = this.toSeconds(time);
+	        //the envelopes
+	        this._carrier._triggerEnvelopeAttack(time, velocity);
+	        this._modulator._triggerEnvelopeAttack(time);
+	        return this;
+	    };
+	    /**
+		 *  trigger the release portion of the note
+		 *
+		 *  @param  {Time} [time=now] the time the note will release
+		 *  @returns {Tone.FMSynth} this
+		 *  @private
+		 */
+	    Tone.FMSynth.prototype._triggerEnvelopeRelease = function (time) {
+	        time = this.toSeconds(time);
+	        this._carrier._triggerEnvelopeRelease(time);
+	        this._modulator._triggerEnvelopeRelease(time);
+	        return this;
+	    };
+	    /**
+		 *  clean up
+		 *  @returns {Tone.FMSynth} this
+		 */
+	    Tone.FMSynth.prototype.dispose = function () {
+	        Tone.Monophonic.prototype.dispose.call(this);
+	        this._writable([
+	            'frequency',
+	            'harmonicity',
+	            'modulationIndex',
+	            'oscillator',
+	            'envelope',
+	            'modulation',
+	            'modulationEnvelope',
+	            'detune'
+	        ]);
+	        this._carrier.dispose();
+	        this._carrier = null;
+	        this._modulator.dispose();
+	        this._modulator = null;
+	        this.frequency.dispose();
+	        this.frequency = null;
+	        this.detune.dispose();
+	        this.detune = null;
+	        this.modulationIndex.dispose();
+	        this.modulationIndex = null;
+	        this.harmonicity.dispose();
+	        this.harmonicity = null;
+	        this._modulationNode.dispose();
+	        this._modulationNode = null;
+	        this.oscillator = null;
+	        this.envelope = null;
+	        this.modulationEnvelope = null;
+	        this.modulation = null;
+	        return this;
+	    };
+	    return Tone.FMSynth;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Tone.MembraneSynth makes kick and tom sounds using a single oscillator
+		 *          with an amplitude envelope and frequency ramp. A Tone.OmniOscillator
+		 *          is routed through a Tone.AmplitudeEnvelope to the output. The drum
+		 *          quality of the sound comes from the frequency envelope applied
+		 *          during Tone.MembraneSynth.triggerAttack(note). The frequency envelope
+		 *          starts at <code>note * .octaves</code> and ramps to <code>note</code>
+		 *          over the duration of <code>.pitchDecay</code>.
+		 *
+		 *  @constructor
+		 *  @extends {Tone.Instrument}
+		 *  @param {Object} [options] the options available for the synth
+		 *                          see defaults below
+		 *  @example
+		 * var synth = new Tone.MembraneSynth().toMaster();
+		 * synth.triggerAttackRelease("C2", "8n");
+		 */
+	    Tone.MembraneSynth = function (options) {
+	        options = Tone.defaultArg(options, Tone.MembraneSynth.defaults);
+	        Tone.Instrument.call(this, options);
+	        /**
+			 *  The oscillator.
+			 *  @type {Tone.OmniOscillator}
+			 */
+	        this.oscillator = new Tone.OmniOscillator(options.oscillator);
+	        /**
+			 *  The amplitude envelope.
+			 *  @type {Tone.AmplitudeEnvelope}
+			 */
+	        this.envelope = new Tone.AmplitudeEnvelope(options.envelope);
+	        /**
+			 *  The number of octaves the pitch envelope ramps.
+			 *  @type {Positive}
+			 */
+	        this.octaves = options.octaves;
+	        /**
+			 *  The amount of time the frequency envelope takes.
+			 *  @type {Time}
+			 */
+	        this.pitchDecay = options.pitchDecay;
+	        this.oscillator.chain(this.envelope, this.output);
+	        this._readOnly([
+	            'oscillator',
+	            'envelope'
+	        ]);
+	    };
+	    Tone.extend(Tone.MembraneSynth, Tone.Instrument);
+	    /**
+		 *  @static
+		 *  @type {Object}
+		 */
+	    Tone.MembraneSynth.defaults = {
+	        'pitchDecay': 0.05,
+	        'octaves': 10,
+	        'oscillator': { 'type': 'sine' },
+	        'envelope': {
+	            'attack': 0.001,
+	            'decay': 0.4,
+	            'sustain': 0.01,
+	            'release': 1.4,
+	            'attackCurve': 'exponential'
+	        }
+	    };
+	    /**
+		 *  Trigger the note at the given time with the given velocity.
+		 *
+		 *  @param  {Frequency} note     the note
+		 *  @param  {Time} [time=now]     the time, if not given is now
+		 *  @param  {number} [velocity=1] velocity defaults to 1
+		 *  @returns {Tone.MembraneSynth} this
+		 *  @example
+		 *  kick.triggerAttack(60);
+		 */
+	    Tone.MembraneSynth.prototype.triggerAttack = function (note, time, velocity) {
+	        time = this.toSeconds(time);
+	        note = this.toFrequency(note);
+	        var maxNote = note * this.octaves;
+	        this.oscillator.frequency.setValueAtTime(maxNote, time);
+	        this.oscillator.frequency.exponentialRampToValueAtTime(note, time + this.toSeconds(this.pitchDecay));
+	        this.envelope.triggerAttack(time, velocity);
+	        this.oscillator.start(time);
+	        return this;
+	    };
+	    /**
+		 *  Trigger the release portion of the note.
+		 *
+		 *  @param  {Time} [time=now] the time the note will release
+		 *  @returns {Tone.MembraneSynth} this
+		 */
+	    Tone.MembraneSynth.prototype.triggerRelease = function (time) {
+	        time = this.toSeconds(time);
+	        this.envelope.triggerRelease(time);
+	        this.oscillator.stop(time + this.envelope.release);
+	        return this;
+	    };
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.MembraneSynth} this
+		 */
+	    Tone.MembraneSynth.prototype.dispose = function () {
+	        Tone.Instrument.prototype.dispose.call(this);
+	        this._writable([
+	            'oscillator',
+	            'envelope'
+	        ]);
+	        this.oscillator.dispose();
+	        this.oscillator = null;
+	        this.envelope.dispose();
+	        this.envelope = null;
+	        return this;
+	    };
+	    return Tone.MembraneSynth;
+	});
+	Module(function (Tone) {
+	    /**
+		 *  Inharmonic ratio of frequencies based on the Roland TR-808
+		 *  Taken from https://ccrma.stanford.edu/papers/tr-808-cymbal-physically-informed-circuit-bendable-digital-model
+		 *  @private
+		 *  @static
+		 *  @type {Array}
+		 */
+	    var inharmRatios = [
+	        1,
+	        1.483,
+	        1.932,
+	        2.546,
+	        2.63,
+	        3.897
+	    ];
+	    /**
+		 *  @class  A highly inharmonic and spectrally complex source with a highpass filter
+		 *          and amplitude envelope which is good for making metalophone sounds. Based
+		 *          on CymbalSynth by [@polyrhythmatic](https://github.com/polyrhythmatic).
+		 *          Inspiration from [Sound on Sound](https://web.archive.org/web/20160610143924/https://www.soundonsound.com/sos/jul02/articles/synthsecrets0702.asp).
+		 *
+		 *  @constructor
+		 *  @extends {Tone.Instrument}
+		 *  @param {Object} [options] The options availble for the synth
+		 *                             see defaults below
+		 */
+	    Tone.MetalSynth = function (options) {
+	        options = Tone.defaultArg(options, Tone.MetalSynth.defaults);
+	        Tone.Instrument.call(this, options);
+	        /**
+			 *  The frequency of the cymbal
+			 *  @type  {Frequency}
+			 *  @signal
+			 */
+	        this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);
+	        /**
+			 *  The array of FMOscillators
+			 *  @type  {Array}
+			 *  @private
+			 */
+	        this._oscillators = [];
+	        /**
+			 *  The frequency multipliers
+			 *  @type {Array}
+			 *  @private
+			 */
+	        this._freqMultipliers = [];
+	        /**
+			 *  The amplitude for the body
+			 *  @type {Tone.Gain}
+			 *  @private
+			 */
+	        this._amplitue = new Tone.Gain(0).connect(this.output);
+	        /**
+			 *  highpass the output
+			 *  @type {Tone.Filter}
+			 *  @private
+			 */
+	        this._highpass = new Tone.Filter({
+	            'type': 'highpass',
+	            'Q': -3.0102999566398125
+	        }).connect(this._amplitue);
+	        /**
+			 *  The number of octaves the highpass
+			 *  filter frequency ramps
+			 *  @type {Number}
+			 *  @private
+			 */
+	        this._octaves = options.octaves;
+	        /**
+			 *  Scale the body envelope
+			 *  for the bandpass
+			 *  @type {Tone.Scale}
+			 *  @private
+			 */
+	        this._filterFreqScaler = new Tone.Scale(options.resonance, 7000);
+	        /**
+			 *  The envelope which is connected both to the
+			 *  amplitude and highpass filter's cutoff frequency
+			 *  @type  {Tone.Envelope}
+			 */
+	        this.envelope = new Tone.Envelope({
+	            'attack': options.envelope.attack,
+	            'attackCurve': 'linear',
+	            'decay': options.envelope.decay,
+	            'sustain': 0,
+	            'release': options.envelope.release
+	        }).chain(this._filterFreqScaler, this._highpass.frequency);
+	        this.envelope.connect(this._amplitue.gain);
+	        for (var i = 0; i < inharmRatios.length; i++) {
+	            var osc = new Tone.FMOscillator({
+	                'type': 'square',
+	                'modulationType': 'square',
+	                'harmonicity': options.harmonicity,
+	                'modulationIndex': options.modulationIndex
+	            });
+	            osc.connect(this._highpass);
+	            this._oscillators[i] = osc;
+	            var mult = new Tone.Multiply(inharmRatios[i]);
+	            this._freqMultipliers[i] = mult;
+	            this.frequency.chain(mult, osc.frequency);
+	        }
+	        //set the octaves
+	        this.octaves = options.octaves;
+	    };
+	    Tone.extend(Tone.MetalSynth, Tone.Instrument);
+	    /**
+		 *  default values
+		 *  @static
+		 *  @const
+		 *  @type {Object}
+		 */
+	    Tone.MetalSynth.defaults = {
+	        'frequency': 200,
+	        'envelope': {
+	            'attack': 0.001,
+	            'decay': 1.4,
+	            'release': 0.2
+	        },
+	        'harmonicity': 5.1,
+	        'modulationIndex': 32,
+	        'resonance': 4000,
+	        'octaves': 1.5
+	    };
+	    /**
+		 *  Trigger the attack.
+		 *  @param  {Time}  time      When the attack should be triggered.
+		 *  @param  {NormalRange}  [velocity=1]  The velocity that the envelope should be triggered at.
+		 *  @return  {Tone.MetalSynth}  this
+		 */
+	    Tone.MetalSynth.prototype.triggerAttack = function (time, vel) {
+	        time = this.toSeconds(time);
+	        vel = Tone.defaultArg(vel, 1);
+	        this.envelope.triggerAttack(time, vel);
+	        this._oscillators.forEach(function (osc) {
+	            osc.start(time);
+	        });
+	        //if the sustain is 0, stop the oscillator as well
+	        if (this.envelope.sustain === 0) {
+	            this._oscillators.forEach(function (osc) {
+	                osc.stop(time + this.envelope.attack + this.envelope.decay);
+	            }.bind(this));
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Trigger the release of the envelope.
+		 *  @param  {Time}  time      When the release should be triggered.
+		 *  @return  {Tone.MetalSynth}  this
+		 */
+	    Tone.MetalSynth.prototype.triggerRelease = function (time) {
+	        time = this.toSeconds(time);
+	        this.envelope.triggerRelease(time);
+	        this._oscillators.forEach(function (osc) {
+	            osc.stop(time + this.envelope.release);
+	        }.bind(this));
+	        return this;
+	    };
+	    /**
+		 * Sync the instrument to the Transport. All subsequent calls of
+		 * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)
+		 * will be scheduled along the transport.
+		 * @example
+		 * synth.sync()
+		 * //schedule 3 notes when the transport first starts
+		 * synth.triggerAttackRelease('8n', 0)
+		 * synth.triggerAttackRelease('8n', '8n')
+		 * synth.triggerAttackRelease('8n', '4n')
+		 * //start the transport to hear the notes
+		 * Transport.start()
+		 * @returns {Tone.Instrument} this
+		 */
+	    Tone.MetalSynth.prototype.sync = function () {
+	        this._syncMethod('triggerAttack', 0);
+	        this._syncMethod('triggerRelease', 0);
+	        return this;
+	    };
+	    /**
+		 *  Trigger the attack and release of the envelope after the given
+		 *  duration.
+		 *  @param  {Time}  duration  The duration before triggering the release
+		 *  @param  {Time}  time      When the attack should be triggered.
+		 *  @param  {NormalRange}  [velocity=1]  The velocity that the envelope should be triggered at.
+		 *  @return  {Tone.MetalSynth}  this
+		 */
+	    Tone.MetalSynth.prototype.triggerAttackRelease = function (duration, time, velocity) {
+	        time = this.toSeconds(time);
+	        duration = this.toSeconds(duration);
+	        this.triggerAttack(time, velocity);
+	        this.triggerRelease(time + duration);
+	        return this;
+	    };
+	    /**
+		 *  The modulationIndex of the oscillators which make up the source.
+		 *  see Tone.FMOscillator.modulationIndex
+		 *  @memberOf Tone.MetalSynth#
+		 *  @type {Positive}
+		 *  @name  modulationIndex
+		 */
+	    Object.defineProperty(Tone.MetalSynth.prototype, 'modulationIndex', {
+	        get: function () {
+	            return this._oscillators[0].modulationIndex.value;
+	        },
+	        set: function (val) {
+	            for (var i = 0; i < this._oscillators.length; i++) {
+	                this._oscillators[i].modulationIndex.value = val;
+	            }
+	        }
+	    });
+	    /**
+		 *  The harmonicity of the oscillators which make up the source.
+		 *  see Tone.FMOscillator.harmonicity
+		 *  @memberOf Tone.MetalSynth#
+		 *  @type {Positive}
+		 *  @name  harmonicity
+		 */
+	    Object.defineProperty(Tone.MetalSynth.prototype, 'harmonicity', {
+	        get: function () {
+	            return this._oscillators[0].harmonicity.value;
+	        },
+	        set: function (val) {
+	            for (var i = 0; i < this._oscillators.length; i++) {
+	                this._oscillators[i].harmonicity.value = val;
+	            }
+	        }
+	    });
+	    /**
+		 *  The frequency of the highpass filter attached to the envelope
+		 *  @memberOf Tone.MetalSynth#
+		 *  @type {Frequency}
+		 *  @name  resonance
+		 */
+	    Object.defineProperty(Tone.MetalSynth.prototype, 'resonance', {
+	        get: function () {
+	            return this._filterFreqScaler.min;
+	        },
+	        set: function (val) {
+	            this._filterFreqScaler.min = val;
+	            this.octaves = this._octaves;
+	        }
+	    });
+	    /**
+		 *  The number of octaves above the "resonance" frequency
+		 *  that the filter ramps during the attack/decay envelope
+		 *  @memberOf Tone.MetalSynth#
+		 *  @type {Number}
+		 *  @name  octaves
+		 */
+	    Object.defineProperty(Tone.MetalSynth.prototype, 'octaves', {
+	        get: function () {
+	            return this._octaves;
+	        },
+	        set: function (octs) {
+	            this._octaves = octs;
+	            this._filterFreqScaler.max = this._filterFreqScaler.min * Math.pow(2, octs);
+	        }
+	    });
+	    /**
+		 *  Clean up
+		 *  @returns {Tone.MetalSynth} this
+		 */
+	    Tone.MetalSynth.prototype.dispose = function () {
+	        Tone.Instrument.prototype.dispose.call(this);
+	        for (var i = 0; i < this._oscillators.length; i++) {
+	            this._oscillators[i].dispose();
+	            this._freqMultipliers[i].dispose();
+	        }
+	        this._oscillators = null;
+	        this._freqMultipliers = null;
+	        this.frequency.dispose();
+	        this.frequency = null;
+	        this._filterFreqScaler.dispose();
+	        this._filterFreqScaler = null;
+	        this._amplitue.dispose();
+	        this._amplitue = null;
+	        this.envelope.dispose();
+	        this.envelope = null;
+	        this._highpass.dispose();
+	        this._highpass = null;
+	    };
+	    return Tone.MetalSynth;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Tone.NoiseSynth is composed of a noise generator (Tone.Noise), one filter (Tone.Filter),
+		 *          and two envelopes (Tone.Envelop). One envelope controls the amplitude
+		 *          of the noise and the other is controls the cutoff frequency of the filter.
+		 *          <img src="https://docs.google.com/drawings/d/1rqzuX9rBlhT50MRvD2TKml9bnZhcZmzXF1rf_o7vdnE/pub?w=918&h=242">
+		 *
+		 *  @constructor
+		 *  @extends {Tone.Instrument}
+		 *  @param {Object} [options] the options available for the synth
+		 *                          see defaults below
+		 * @example
+		 * var noiseSynth = new Tone.NoiseSynth().toMaster();
+		 * noiseSynth.triggerAttackRelease("8n");
+		 */
+	    Tone.NoiseSynth = function (options) {
+	        //get the defaults
+	        options = Tone.defaultArg(options, Tone.NoiseSynth.defaults);
+	        Tone.Instrument.call(this, options);
+	        /**
+			 *  The noise source.
+			 *  @type {Tone.Noise}
+			 *  @example
+			 * noiseSynth.set("noise.type", "brown");
+			 */
+	        this.noise = new Tone.Noise();
+	        /**
+			 *  The amplitude envelope.
+			 *  @type {Tone.AmplitudeEnvelope}
+			 */
+	        this.envelope = new Tone.AmplitudeEnvelope(options.envelope);
+	        //connect the noise to the output
+	        this.noise.chain(this.envelope, this.output);
+	        this._readOnly([
+	            'noise',
+	            'envelope'
+	        ]);
+	    };
+	    Tone.extend(Tone.NoiseSynth, Tone.Instrument);
+	    /**
+		 *  @const
+		 *  @static
+		 *  @type {Object}
+		 */
+	    Tone.NoiseSynth.defaults = {
+	        'noise': { 'type': 'white' },
+	        'envelope': {
+	            'attack': 0.005,
+	            'decay': 0.1,
+	            'sustain': 0
+	        }
+	    };
+	    /**
+		 *  Start the attack portion of the envelopes. Unlike other
+		 *  instruments, Tone.NoiseSynth doesn't have a note.
+		 *  @param {Time} [time=now] the time the attack should start
+		 *  @param {number} [velocity=1] the velocity of the note (0-1)
+		 *  @returns {Tone.NoiseSynth} this
+		 *  @example
+		 * noiseSynth.triggerAttack();
+		 */
+	    Tone.NoiseSynth.prototype.triggerAttack = function (time, velocity) {
+	        //the envelopes
+	        this.envelope.triggerAttack(time, velocity);
+	        //start the noise
+	        this.noise.start(time);
+	        if (this.envelope.sustain === 0) {
+	            this.noise.stop(time = this.envelope.attack + this.envelope.decay);
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Start the release portion of the envelopes.
+		 *  @param {Time} [time=now] the time the release should start
+		 *  @returns {Tone.NoiseSynth} this
+		 */
+	    Tone.NoiseSynth.prototype.triggerRelease = function (time) {
+	        this.envelope.triggerRelease(time);
+	        this.noise.stop(time + this.envelope.release);
+	        return this;
+	    };
+	    /**
+		 * Sync the instrument to the Transport. All subsequent calls of
+		 * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)
+		 * will be scheduled along the transport.
+		 * @example
+		 * synth.sync()
+		 * //schedule 3 notes when the transport first starts
+		 * synth.triggerAttackRelease('8n', 0)
+		 * synth.triggerAttackRelease('8n', '8n')
+		 * synth.triggerAttackRelease('8n', '4n')
+		 * //start the transport to hear the notes
+		 * Transport.start()
+		 * @returns {Tone.Instrument} this
+		 */
+	    Tone.NoiseSynth.prototype.sync = function () {
+	        this._syncMethod('triggerAttack', 0);
+	        this._syncMethod('triggerRelease', 0);
+	        return this;
+	    };
+	    /**
+		 *  Trigger the attack and then the release.
+		 *  @param  {Time} duration the duration of the note
+		 *  @param  {Time} [time=now]     the time of the attack
+		 *  @param  {number} [velocity=1] the velocity
+		 *  @returns {Tone.NoiseSynth} this
+		 */
+	    Tone.NoiseSynth.prototype.triggerAttackRelease = function (duration, time, velocity) {
+	        time = this.toSeconds(time);
+	        duration = this.toSeconds(duration);
+	        this.triggerAttack(time, velocity);
+	        this.triggerRelease(time + duration);
+	        return this;
+	    };
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.NoiseSynth} this
+		 */
+	    Tone.NoiseSynth.prototype.dispose = function () {
+	        Tone.Instrument.prototype.dispose.call(this);
+	        this._writable([
+	            'noise',
+	            'envelope'
+	        ]);
+	        this.noise.dispose();
+	        this.noise = null;
+	        this.envelope.dispose();
+	        this.envelope = null;
+	        return this;
+	    };
+	    return Tone.NoiseSynth;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Karplus-String string synthesis. Often out of tune.
+		 *         Will change when the AudioWorkerNode is available across
+		 *         browsers.
+		 *
+		 *  @constructor
+		 *  @extends {Tone.Instrument}
+		 *  @param {Object} [options] see the defaults
+		 *  @example
+		 * var plucky = new Tone.PluckSynth().toMaster();
+		 * plucky.triggerAttack("C4");
+		 */
+	    Tone.PluckSynth = function (options) {
+	        options = Tone.defaultArg(options, Tone.PluckSynth.defaults);
+	        Tone.Instrument.call(this, options);
+	        /**
+			 *  @type {Tone.Noise}
+			 *  @private
+			 */
+	        this._noise = new Tone.Noise('pink');
+	        /**
+			 *  The amount of noise at the attack.
+			 *  Nominal range of [0.1, 20]
+			 *  @type {number}
+			 */
+	        this.attackNoise = options.attackNoise;
+	        /**
+			 *  the LFCF
+			 *  @type {Tone.LowpassCombFilter}
+			 *  @private
+			 */
+	        this._lfcf = new Tone.LowpassCombFilter({
+	            'resonance': options.resonance,
+	            'dampening': options.dampening
+	        });
+	        /**
+			 *  The resonance control.
+			 *  @type {NormalRange}
+			 *  @signal
+			 */
+	        this.resonance = this._lfcf.resonance;
+	        /**
+			 *  The dampening control. i.e. the lowpass filter frequency of the comb filter
+			 *  @type {Frequency}
+			 *  @signal
+			 */
+	        this.dampening = this._lfcf.dampening;
+	        //connections
+	        this._noise.connect(this._lfcf);
+	        this._lfcf.connect(this.output);
+	        this._readOnly([
+	            'resonance',
+	            'dampening'
+	        ]);
+	    };
+	    Tone.extend(Tone.PluckSynth, Tone.Instrument);
+	    /**
+		 *  @static
+		 *  @const
+		 *  @type {Object}
+		 */
+	    Tone.PluckSynth.defaults = {
+	        'attackNoise': 1,
+	        'dampening': 4000,
+	        'resonance': 0.7
+	    };
+	    /**
+		 *  Trigger the note.
+		 *  @param {Frequency} note The note to trigger.
+		 *  @param {Time} [time=now] When the note should be triggered.
+		 *  @returns {Tone.PluckSynth} this
+		 */
+	    Tone.PluckSynth.prototype.triggerAttack = function (note, time) {
+	        note = this.toFrequency(note);
+	        time = this.toSeconds(time);
+	        var delayAmount = 1 / note;
+	        this._lfcf.delayTime.setValueAtTime(delayAmount, time);
+	        this._noise.start(time);
+	        this._noise.stop(time + delayAmount * this.attackNoise);
+	        return this;
+	    };
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.PluckSynth} this
+		 */
+	    Tone.PluckSynth.prototype.dispose = function () {
+	        Tone.Instrument.prototype.dispose.call(this);
+	        this._noise.dispose();
+	        this._lfcf.dispose();
+	        this._noise = null;
+	        this._lfcf = null;
+	        this._writable([
+	            'resonance',
+	            'dampening'
+	        ]);
+	        this.dampening = null;
+	        this.resonance = null;
+	        return this;
+	    };
+	    return Tone.PluckSynth;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Tone.PolySynth handles voice creation and allocation for any
+		 *          instruments passed in as the second paramter. PolySynth is
+		 *          not a synthesizer by itself, it merely manages voices of
+		 *          one of the other types of synths, allowing any of the
+		 *          monophonic synthesizers to be polyphonic.
+		 *
+		 *  @constructor
+		 *  @extends {Tone.Instrument}
+		 *  @param {number|Object} [polyphony=4] The number of voices to create
+		 *  @param {function} [voice=Tone.Synth] The constructor of the voices
+		 *                                            uses Tone.Synth by default.
+		 *  @example
+		 * //a polysynth composed of 6 Voices of Synth
+		 * var synth = new Tone.PolySynth(6, Tone.Synth).toMaster();
+		 * //set the attributes using the set interface
+		 * synth.set("detune", -1200);
+		 * //play a chord
+		 * synth.triggerAttackRelease(["C4", "E4", "A4"], "4n");
+		 */
+	    Tone.PolySynth = function () {
+	        var options = Tone.defaults(arguments, [
+	            'polyphony',
+	            'voice'
+	        ], Tone.PolySynth);
+	        Tone.Instrument.call(this, options);
+	        options = Tone.defaultArg(options, Tone.Instrument.defaults);
+	        //max polyphony
+	        options.polyphony = Math.min(Tone.PolySynth.MAX_POLYPHONY, options.polyphony);
+	        /**
+			 *  the array of voices
+			 *  @type {Array}
+			 */
+	        this.voices = new Array(options.polyphony);
+	        /**
+			 *  The queue of voices with data about last trigger
+			 *  and the triggered note
+			 *  @private
+			 *  @type {Array}
+			 */
+	        this._triggers = new Array(options.polyphony);
+	        /**
+			 *  The detune in cents
+			 *  @type {Cents}
+			 *  @signal
+			 */
+	        this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);
+	        this._readOnly('detune');
+	        //create the voices
+	        for (var i = 0; i < options.polyphony; i++) {
+	            var v = new options.voice(arguments[2], arguments[3]);
+	            if (!(v instanceof Tone.Monophonic)) {
+	                throw new Error('Synth constructor must be instance of Tone.Monophonic');
+	            }
+	            this.voices[i] = v;
+	            v.connect(this.output);
+	            if (v.hasOwnProperty('detune')) {
+	                this.detune.connect(v.detune);
+	            }
+	            this._triggers[i] = {
+	                release: -1,
+	                note: null,
+	                voice: v
+	            };
+	        }
+	    };
+	    Tone.extend(Tone.PolySynth, Tone.Instrument);
+	    /**
+		 *  the defaults
+		 *  @const
+		 *  @static
+		 *  @type {Object}
+		 */
+	    Tone.PolySynth.defaults = {
+	        'polyphony': 4,
+	        'volume': 0,
+	        'detune': 0,
+	        'voice': Tone.Synth
+	    };
+	    /**
+		 *  Trigger the attack portion of the note
+		 *  @param  {Frequency|Array} notes The notes to play. Accepts a single
+		 *                                  Frequency or an array of frequencies.
+		 *  @param  {Time} [time=now]  The start time of the note.
+		 *  @param {number} [velocity=1] The velocity of the note.
+		 *  @returns {Tone.PolySynth} this
+		 *  @example
+		 * //trigger a chord immediately with a velocity of 0.2
+		 * poly.triggerAttack(["Ab3", "C4", "F5"], undefined, 0.2);
+		 */
+	    Tone.PolySynth.prototype.triggerAttack = function (notes, time, velocity) {
+	        if (!Array.isArray(notes)) {
+	            notes = [notes];
+	        }
+	        time = this.toSeconds(time);
+	        for (var i = 0; i < notes.length; i++) {
+	            var val = notes[i];
+	            //trigger the oldest voice
+	            var oldest = this._triggers[0];
+	            for (var j = 1; j < this._triggers.length; j++) {
+	                if (this._triggers[j].release < oldest.release) {
+	                    oldest = this._triggers[j];
+	                }
+	            }
+	            oldest.release = Infinity;
+	            oldest.note = JSON.stringify(val);
+	            oldest.voice.triggerAttack(val, time, velocity);
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Trigger the attack and release after the specified duration
+		 *
+		 *  @param  {Frequency|Array} notes The notes to play. Accepts a single
+		 *                                  Frequency or an array of frequencies.
+		 *  @param  {Time} duration the duration of the note
+		 *  @param  {Time} [time=now]     if no time is given, defaults to now
+		 *  @param  {number} [velocity=1] the velocity of the attack (0-1)
+		 *  @returns {Tone.PolySynth} this
+		 *  @example
+		 * //trigger a chord for a duration of a half note
+		 * poly.triggerAttackRelease(["Eb3", "G4", "C5"], "2n");
+		 *  @example
+		 * //can pass in an array of durations as well
+		 * poly.triggerAttackRelease(["Eb3", "G4", "C5"], ["2n", "4n", "4n"]);
+		 */
+	    Tone.PolySynth.prototype.triggerAttackRelease = function (notes, duration, time, velocity) {
+	        time = this.toSeconds(time);
+	        this.triggerAttack(notes, time, velocity);
+	        if (Tone.isArray(duration) && Tone.isArray(notes)) {
+	            for (var i = 0; i < notes.length; i++) {
+	                var d = duration[Math.min(i, duration.length - 1)];
+	                this.triggerRelease(notes[i], time + this.toSeconds(d));
+	            }
+	        } else {
+	            this.triggerRelease(notes, time + this.toSeconds(duration));
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Trigger the release of the note. Unlike monophonic instruments,
+		 *  a note (or array of notes) needs to be passed in as the first argument.
+		 *  @param  {Frequency|Array} notes The notes to play. Accepts a single
+		 *                                  Frequency or an array of frequencies.
+		 *  @param  {Time} [time=now]  When the release will be triggered.
+		 *  @returns {Tone.PolySynth} this
+		 *  @example
+		 * poly.triggerRelease(["Ab3", "C4", "F5"], "+2n");
+		 */
+	    Tone.PolySynth.prototype.triggerRelease = function (notes, time) {
+	        if (!Array.isArray(notes)) {
+	            notes = [notes];
+	        }
+	        time = this.toSeconds(time);
+	        for (var i = 0; i < notes.length; i++) {
+	            //get the voice
+	            var stringified = JSON.stringify(notes[i]);
+	            for (var v = 0; v < this._triggers.length; v++) {
+	                var desc = this._triggers[v];
+	                if (desc.note === stringified && desc.release > time) {
+	                    desc.voice.triggerRelease(time);
+	                    desc.release = time;
+	                }
+	            }
+	        }
+	        return this;
+	    };
+	    /**
+		 * Sync the instrument to the Transport. All subsequent calls of
+		 * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)
+		 * will be scheduled along the transport.
+		 * @example
+		 * synth.sync()
+		 * //schedule 3 notes when the transport first starts
+		 * synth.triggerAttackRelease('8n', 0)
+		 * synth.triggerAttackRelease('8n', '8n')
+		 * synth.triggerAttackRelease('8n', '4n')
+		 * //start the transport to hear the notes
+		 * Transport.start()
+		 * @returns {Tone.Instrument} this
+		 */
+	    Tone.PolySynth.prototype.sync = function () {
+	        this._syncMethod('triggerAttack', 1);
+	        this._syncMethod('triggerRelease', 1);
+	        return this;
+	    };
+	    /**
+		 *  Set a member/attribute of the voices.
+		 *  @param {Object|string} params
+		 *  @param {number=} value
+		 *  @param {Time=} rampTime
+		 *  @returns {Tone.PolySynth} this
+		 *  @example
+		 * poly.set({
+		 * 	"filter" : {
+		 * 		"type" : "highpass"
+		 * 	},
+		 * 	"envelope" : {
+		 * 		"attack" : 0.25
+		 * 	}
+		 * });
+		 */
+	    Tone.PolySynth.prototype.set = function (params, value, rampTime) {
+	        for (var i = 0; i < this.voices.length; i++) {
+	            this.voices[i].set(params, value, rampTime);
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Get the synth's attributes. Given no arguments get
+		 *  will return all available object properties and their corresponding
+		 *  values. Pass in a single attribute to retrieve or an array
+		 *  of attributes. The attribute strings can also include a "."
+		 *  to access deeper properties.
+		 *  @param {Array=} params the parameters to get, otherwise will return
+		 *  					   all available.
+		 */
+	    Tone.PolySynth.prototype.get = function (params) {
+	        return this.voices[0].get(params);
+	    };
+	    /**
+		 *  Trigger the release portion of all the currently active voices.
+		 *  @param {Time} [time=now] When the notes should be released.
+		 *  @return {Tone.PolySynth} this
+		 */
+	    Tone.PolySynth.prototype.releaseAll = function (time) {
+	        time = this.toSeconds(time);
+	        for (var i = 0; i < this._triggers.length; i++) {
+	            var desc = this._triggers[i];
+	            if (desc.release > time) {
+	                desc.release = time;
+	                desc.voice.triggerRelease(time);
+	            }
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Clean up.
+		 *  @returns {Tone.PolySynth} this
+		 */
+	    Tone.PolySynth.prototype.dispose = function () {
+	        Tone.Instrument.prototype.dispose.call(this);
+	        for (var i = 0; i < this.voices.length; i++) {
+	            this.voices[i].dispose();
+	            this.voices[i] = null;
+	        }
+	        this._writable('detune');
+	        this.detune.dispose();
+	        this.detune = null;
+	        this.voices = null;
+	        this._triggers = null;
+	        return this;
+	    };
+	    /**
+		 *  The maximum number of notes that can be allocated
+		 *  to a polysynth.
+		 *  @type  {Number}
+		 *  @static
+		 */
+	    Tone.PolySynth.MAX_POLYPHONY = 20;
+	    return Tone.PolySynth;
+	});
+	Module(function (Tone) {
+	    /**
+		 * @class Automatically interpolates between a set of pitched samples. Pass in an object which maps the note's pitch or midi value to the url, then you can trigger the attack and release of that note like other instruments. By automatically repitching the samples, it is possible to play pitches which were not explicitly included which can save loading time.
+		 *        For sample or buffer playback where repitching is not necessary, use [Tone.Player](https://tonejs.github.io/docs/Player).
+		 * @param {Object} samples An object of samples mapping either Midi
+		 *                         Note Numbers or Scientific Pitch Notation
+		 *                         to the url of that sample.
+		 * @param {Function=} onload The callback to invoke when all of the samples are loaded.
+		 * @param {String=} baseUrl The root URL of all of the samples, which is prepended to all the URLs.
+		 * @example
+		 * var sampler = new Tone.Sampler({
+		 * 	"C3" : "path/to/C3.mp3",
+		 * 	"D#3" : "path/to/Dsharp3.mp3",
+		 * 	"F#3" : "path/to/Fsharp3.mp3",
+		 * 	"A3" : "path/to/A3.mp3",
+		 * }, function(){
+		 * 	//sampler will repitch the closest sample
+		 * 	sampler.triggerAttack("D3")
+		 * })
+		 * @extends {Tone.Instrument}
+		 */
+	    Tone.Sampler = function (urls) {
+	        // shift arguments over one. Those are the remainder of the options
+	        var args = Array.prototype.slice.call(arguments);
+	        args.shift();
+	        var options = Tone.defaults(args, [
+	            'onload',
+	            'baseUrl'
+	        ], Tone.Sampler);
+	        Tone.Instrument.call(this, options);
+	        var urlMap = {};
+	        for (var note in urls) {
+	            if (Tone.isNote(note)) {
+	                //convert the note name to MIDI
+	                var mid = Tone.Frequency(note).toMidi();
+	                urlMap[mid] = urls[note];
+	            } else if (!isNaN(parseFloat(note))) {
+	                //otherwise if it's numbers assume it's midi
+	                urlMap[note] = urls[note];
+	            } else {
+	                throw new Error('Tone.Sampler: url keys must be the note\'s pitch');
+	            }
+	        }
+	        /**
+			 * The stored and loaded buffers
+			 * @type {Tone.Buffers}
+			 * @private
+			 */
+	        this._buffers = new Tone.Buffers(urlMap, options.onload, options.baseUrl);
+	        /**
+			 * The object of all currently playing BufferSources
+			 * @type {Object}
+			 * @private
+			 */
+	        this._activeSources = {};
+	        /**
+			 * The envelope applied to the beginning of the sample.
+			 * @type {Time}
+			 */
+	        this.attack = options.attack;
+	        /**
+			 * The envelope applied to the end of the envelope.
+			 * @type {Time}
+			 */
+	        this.release = options.release;
+	    };
+	    Tone.extend(Tone.Sampler, Tone.Instrument);
+	    /**
+		 * The defaults
+		 * @const
+		 * @type {Object}
+		 */
+	    Tone.Sampler.defaults = {
+	        attack: 0,
+	        release: 0.1,
+	        onload: Tone.noOp,
+	        baseUrl: ''
+	    };
+	    /**
+		 * Returns the difference in steps between the given midi note at the closets sample.
+		 * @param  {Midi} midi
+		 * @return {Interval}
+		 * @private
+		 */
+	    Tone.Sampler.prototype._findClosest = function (midi) {
+	        //searches within 8 octaves of the given midi note
+	        var MAX_INTERVAL = 96;
+	        var interval = 0;
+	        while (interval < MAX_INTERVAL) {
+	            // check above and below
+	            if (this._buffers.has(midi + interval)) {
+	                return -interval;
+	            } else if (this._buffers.has(midi - interval)) {
+	                return interval;
+	            }
+	            interval++;
+	        }
+	        return null;
+	    };
+	    /**
+		 * @param  {Frequency} note     The note to play
+		 * @param  {Time=} time     When to play the note
+		 * @param  {NormalRange=} velocity The velocity to play the sample back.
+		 * @return {Tone.Sampler}          this
+		 */
+	    Tone.Sampler.prototype.triggerAttack = function (note, time, velocity) {
+	        var midi = Tone.Frequency(note).toMidi();
+	        // find the closest note pitch
+	        var difference = this._findClosest(midi);
+	        if (difference !== null) {
+	            var closestNote = midi - difference;
+	            var buffer = this._buffers.get(closestNote);
+	            // play that note
+	            var source = new Tone.BufferSource({
+	                'buffer': buffer,
+	                'playbackRate': Tone.intervalToFrequencyRatio(difference),
+	                'fadeIn': this.attack,
+	                'fadeOut': this.release,
+	                'curve': 'exponential'
+	            }).connect(this.output);
+	            source.start(time, 0, buffer.duration, velocity);
+	            // add it to the active sources
+	            if (!Tone.isArray(this._activeSources[midi])) {
+	                this._activeSources[midi] = [];
+	            }
+	            this._activeSources[midi].push({
+	                note: midi,
+	                source: source
+	            });
+	        }
+	        return this;
+	    };
+	    /**
+		 * @param  {Frequency} note     The note to release.
+		 * @param  {Time=} time     	When to release the note.
+		 * @return {Tone.Sampler}	this
+		 */
+	    Tone.Sampler.prototype.triggerRelease = function (note, time) {
+	        var midi = Tone.Frequency(note).toMidi();
+	        // find the note
+	        if (this._activeSources[midi] && this._activeSources[midi].length) {
+	            var source = this._activeSources[midi].shift().source;
+	            time = this.toSeconds(time);
+	            source.stop(time + this.release, this.release);
+	        }
+	        return this;
+	    };
+	    /**
+		 * Release all currently active notes.
+		 * @param  {Time=} time     	When to release the notes.
+		 * @return {Tone.Sampler}	this
+		 */
+	    Tone.Sampler.prototype.releaseAll = function (time) {
+	        time = this.toSeconds(time);
+	        for (var note in this._activeSources) {
+	            var sources = this._activeSources[note];
+	            while (sources.length) {
+	                var source = sources.shift().source;
+	                source.stop(time + this.release, this.release);
+	            }
+	        }
+	        return this;
+	    };
+	    /**
+		 * Sync the instrument to the Transport. All subsequent calls of
+		 * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)
+		 * will be scheduled along the transport.
+		 * @example
+		 * synth.sync()
+		 * //schedule 3 notes when the transport first starts
+		 * synth.triggerAttackRelease('8n', 0)
+		 * synth.triggerAttackRelease('8n', '8n')
+		 * synth.triggerAttackRelease('8n', '4n')
+		 * //start the transport to hear the notes
+		 * Transport.start()
+		 * @returns {Tone.Instrument} this
+		 */
+	    Tone.Sampler.prototype.sync = function () {
+	        this._syncMethod('triggerAttack', 1);
+	        this._syncMethod('triggerRelease', 1);
+	        return this;
+	    };
+	    /**
+		 * Invoke the attack phase, then after the duration, invoke the release.
+		 * @param  {Frequency} note     The note to play
+		 * @param  {Time} duration The time the note should be held
+		 * @param  {Time=} time     When to start the attack
+		 * @param  {NormalRange} [velocity=1] The velocity of the attack
+		 * @return {Tone.Sampler}          this
+		 */
+	    Tone.Sampler.prototype.triggerAttackRelease = function (note, duration, time, velocity) {
+	        time = this.toSeconds(time);
+	        duration = this.toSeconds(duration);
+	        this.triggerAttack(note, time, velocity);
+	        this.triggerRelease(note, time + duration);
+	        return this;
+	    };
+	    /**
+		 *  Add a note to the sampler.
+		 *  @param  {Note|Midi}   note      The buffer's pitch.
+		 *  @param  {String|Tone.Buffer|Audiobuffer}  url  Either the url of the bufer,
+		 *                                                 or a buffer which will be added
+		 *                                                 with the given name.
+		 *  @param  {Function=}  callback  The callback to invoke
+		 *                                 when the url is loaded.
+		 */
+	    Tone.Sampler.prototype.add = function (note, url, callback) {
+	        if (Tone.isNote(note)) {
+	            //convert the note name to MIDI
+	            var mid = Tone.Frequency(note).toMidi();
+	            this._buffers.add(mid, url, callback);
+	        } else if (!isNaN(parseFloat(note))) {
+	            //otherwise if it's numbers assume it's midi
+	            this._buffers.add(note, url, callback);
+	        } else {
+	            throw new Error('Tone.Sampler: note must be the note\'s pitch. Instead got ' + note);
+	        }
+	    };
+	    /**
+		 * If the buffers are loaded or not
+		 * @memberOf Tone.Sampler#
+		 * @type {Boolean}
+		 * @name loaded
+		 * @readOnly
+		 */
+	    Object.defineProperty(Tone.Sampler.prototype, 'loaded', {
+	        get: function () {
+	            return this._buffers.loaded;
+	        }
+	    });
+	    /**
+		 * Clean up
+		 * @return {Tone.Sampler} this
+		 */
+	    Tone.Sampler.prototype.dispose = function () {
+	        Tone.Instrument.prototype.dispose.call(this);
+	        this._buffers.dispose();
+	        this._buffers = null;
+	        for (var midi in this._activeSources) {
+	            this._activeSources[midi].forEach(function (event) {
+	                event.source.dispose();
+	            });
+	        }
+	        this._activeSources = null;
+	        return this;
+	    };
+	    return Tone.Sampler;
+	});
+	Module(function (Tone) {
+	    if (Tone.supported) {
+	        if (!OscillatorNode.prototype.setPeriodicWave) {
+	            OscillatorNode.prototype.setPeriodicWave = OscillatorNode.prototype.setWaveTable;
+	        }
+	        if (!AudioContext.prototype.createPeriodicWave) {
+	            AudioContext.prototype.createPeriodicWave = AudioContext.prototype.createWaveTable;
+	        }
+	    }
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Maps a NormalRange [0, 1] to an AudioRange [-1, 1]. 
+		 *         See also Tone.AudioToGain. 
+		 *
+		 *  @extends {Tone.SignalBase}
+		 *  @constructor
+		 *  @example
+		 * var g2a = new Tone.GainToAudio();
+		 */
+	    Tone.GainToAudio = function () {
+	        Tone.SignalBase.call(this);
+	        /**
+			 *  @type {WaveShaperNode}
+			 *  @private
+			 */
+	        this._norm = this.input = this.output = new Tone.WaveShaper(function (x) {
+	            return Math.abs(x) * 2 - 1;
+	        });
+	    };
+	    Tone.extend(Tone.GainToAudio, Tone.SignalBase);
+	    /**
+		 *  clean up
+		 *  @returns {Tone.GainToAudio} this
+		 */
+	    Tone.GainToAudio.prototype.dispose = function () {
+	        Tone.SignalBase.prototype.dispose.call(this);
+	        this._norm.dispose();
+	        this._norm = null;
+	        return this;
+	    };
+	    return Tone.GainToAudio;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class Normalize takes an input min and max and maps it linearly to NormalRange [0,1]
+		 *
+		 *  @extends {Tone.SignalBase}
+		 *  @constructor
+		 *  @param {number} inputMin the min input value
+		 *  @param {number} inputMax the max input value
+		 *  @example
+		 * var norm = new Tone.Normalize(2, 4);
+		 * var sig = new Tone.Signal(3).connect(norm);
+		 * //output of norm is 0.5. 
+		 */
+	    Tone.Normalize = function (inputMin, inputMax) {
+	        Tone.SignalBase.call(this);
+	        /**
+			 *  the min input value
+			 *  @type {number}
+			 *  @private
+			 */
+	        this._inputMin = Tone.defaultArg(inputMin, 0);
+	        /**
+			 *  the max input value
+			 *  @type {number}
+			 *  @private
+			 */
+	        this._inputMax = Tone.defaultArg(inputMax, 1);
+	        /**
+			 *  subtract the min from the input
+			 *  @type {Tone.Add}
+			 *  @private
+			 */
+	        this._sub = this.input = new Tone.Add(0);
+	        /**
+			 *  divide by the difference between the input and output
+			 *  @type {Tone.Multiply}
+			 *  @private
+			 */
+	        this._div = this.output = new Tone.Multiply(1);
+	        this._sub.connect(this._div);
+	        this._setRange();
+	    };
+	    Tone.extend(Tone.Normalize, Tone.SignalBase);
+	    /**
+		 * The minimum value the input signal will reach.
+		 * @memberOf Tone.Normalize#
+		 * @type {number}
+		 * @name min
+		 */
+	    Object.defineProperty(Tone.Normalize.prototype, 'min', {
+	        get: function () {
+	            return this._inputMin;
+	        },
+	        set: function (min) {
+	            this._inputMin = min;
+	            this._setRange();
+	        }
+	    });
+	    /**
+		 * The maximum value the input signal will reach.
+		 * @memberOf Tone.Normalize#
+		 * @type {number}
+		 * @name max
+		 */
+	    Object.defineProperty(Tone.Normalize.prototype, 'max', {
+	        get: function () {
+	            return this._inputMax;
+	        },
+	        set: function (max) {
+	            this._inputMax = max;
+	            this._setRange();
+	        }
+	    });
+	    /**
+		 *  set the values
+		 *  @private
+		 */
+	    Tone.Normalize.prototype._setRange = function () {
+	        this._sub.value = -this._inputMin;
+	        this._div.value = 1 / (this._inputMax - this._inputMin);
+	    };
+	    /**
+		 *  clean up
+		 *  @returns {Tone.Normalize} this
+		 */
+	    Tone.Normalize.prototype.dispose = function () {
+	        Tone.SignalBase.prototype.dispose.call(this);
+	        this._sub.dispose();
+	        this._sub = null;
+	        this._div.dispose();
+	        this._div = null;
+	        return this;
+	    };
+	    return Tone.Normalize;
+	});
+	Module(function (Tone) {
+	    /**
+		 * @class Tone.TransportTimelineSignal extends Tone.Signal, but adds the ability to synchronize the signal to the signal to the Tone.Transport
+		 * @extends {Tone.Signal}
+		 */
+	    Tone.TransportTimelineSignal = function () {
+	        Tone.Signal.apply(this, arguments);
+	        /**
+			 * The real signal output
+			 * @type {Tone.Signal}
+			 * @private
+			 */
+	        this.output = this._outputSig = new Tone.Signal(this._initialValue);
+	        /**
+			 * Keep track of the last value. (small optimization)
+			 * @private
+			 * @type {Number}
+			 */
+	        this._lastVal = this.value;
+	        /**
+			 * The event id of the tick update loop
+			 * @private
+			 * @type {Number}
+			 */
+	        this._synced = Tone.Transport.scheduleRepeat(this._onTick.bind(this), '1i');
+	        /**
+			 * A bound version of the anchor value methods
+			 * @type {Function}
+			 * @private
+			 */
+	        this._bindAnchorValue = this._anchorValue.bind(this);
+	        Tone.Transport.on('start stop pause', this._bindAnchorValue);
+	        this._events.memory = Infinity;
+	    };
+	    Tone.extend(Tone.TransportTimelineSignal, Tone.Signal);
+	    /**
+		 * Callback which is invoked every tick.
+		 * @private
+		 * @param  {Number} time
+		 * @return {Tone.TransportTimelineSignal}      this
+		 */
+	    Tone.TransportTimelineSignal.prototype._onTick = function (time) {
+	        var val = this.getValueAtTime(Tone.Transport.seconds);
+	        if (this._lastVal !== val) {
+	            this._lastVal = val;
+	            //approximate ramp curves with linear ramps
+	            this._outputSig.linearRampToValueAtTime(val, time);
+	        }
+	    };
+	    /**
+		 * Anchor the value at the start and stop of the Transport
+		 * @param  {Number} time The time of the event
+		 * @return {Tone.TransportTimelineSignal}      this
+		 * @private
+		 */
+	    Tone.TransportTimelineSignal.prototype._anchorValue = function (time) {
+	        var val = this.getValueAtTime(Tone.Transport.seconds);
+	        this._lastVal = val;
+	        this._outputSig.cancelScheduledValues(time);
+	        this._outputSig.setValueAtTime(val, time);
+	        return this;
+	    };
+	    /**
+		 *  Get the scheduled value at the given time. This will
+		 *  return the unconverted (raw) value.
+		 *  @param  {TransportTime}  time  The time in seconds.
+		 *  @return  {Number}  The scheduled value at the given time.
+		 */
+	    Tone.TransportTimelineSignal.prototype.getValueAtTime = function (time) {
+	        time = Tone.TransportTime(time);
+	        return Tone.Signal.prototype.getValueAtTime.call(this, time);
+	    };
+	    /**
+		 * Set the output of the signal at the given time
+		 * @param  {Number} value The value to change to at the given time
+		 * @param  {TransportTime} time  The time to change the signal
+		 * @return {Tone.TransportTimelineSignal}       this
+		 */
+	    Tone.TransportTimelineSignal.prototype.setValueAtTime = function (value, time) {
+	        time = Tone.TransportTime(time);
+	        Tone.Signal.prototype.setValueAtTime.call(this, value, time);
+	        return this;
+	    };
+	    /**
+		 * Linear ramp to the given value from the previous scheduled point to the given value
+		 * @param  {Number} value The value to change to at the given time
+		 * @param  {TransportTime} time  The time to change the signal
+		 * @return {Tone.TransportTimelineSignal}       this
+		 */
+	    Tone.TransportTimelineSignal.prototype.linearRampToValueAtTime = function (value, time) {
+	        time = Tone.TransportTime(time);
+	        Tone.Signal.prototype.linearRampToValueAtTime.call(this, value, time);
+	        return this;
+	    };
+	    /**
+		 * Exponential ramp to the given value from the previous scheduled point to the given value
+		 * @param  {Number} value The value to change to at the given time
+		 * @param  {TransportTime} time  The time to change the signal
+		 * @return {Tone.TransportTimelineSignal}       this
+		 */
+	    Tone.TransportTimelineSignal.prototype.exponentialRampToValueAtTime = function (value, time) {
+	        time = Tone.TransportTime(time);
+	        Tone.Signal.prototype.exponentialRampToValueAtTime.call(this, value, time);
+	        return this;
+	    };
+	    /**
+		 *  Start exponentially approaching the target value at the given time with
+		 *  a rate having the given time constant.
+		 *  @param {number} value
+		 *  @param {TransportTime} startTime
+		 *  @param {number} timeConstant
+		 * @return {Tone.TransportTimelineSignal}       this
+		 */
+	    Tone.TransportTimelineSignal.prototype.setTargetAtTime = function (value, startTime, timeConstant) {
+	        startTime = Tone.TransportTime(startTime);
+	        Tone.Signal.prototype.setTargetAtTime.call(this, value, startTime, timeConstant);
+	        return this;
+	    };
+	    /**
+		 *  Cancels all scheduled parameter changes with times greater than or
+		 *  equal to startTime.
+		 *  @param  {TransportTime} startTime
+		 *  @returns {Tone.Param} this
+		 */
+	    Tone.TransportTimelineSignal.prototype.cancelScheduledValues = function (startTime) {
+	        startTime = Tone.TransportTime(startTime);
+	        Tone.Signal.prototype.cancelScheduledValues.call(this, startTime);
+	        return this;
+	    };
+	    /**
+		 *  Set an array of arbitrary values starting at the given time for the given duration.
+		 *  @param {Float32Array} values
+		 *  @param {Time} startTime
+		 *  @param {Time} duration
+		 *  @param {NormalRange} [scaling=1] If the values in the curve should be scaled by some value
+		 *  @returns {Tone.Signal} this
+		 */
+	    Tone.TransportTimelineSignal.prototype.setValueCurveAtTime = function (values, startTime, duration, scaling) {
+	        startTime = Tone.TransportTime(startTime);
+	        duration = Tone.TransportTime(duration);
+	        Tone.Signal.prototype.setValueCurveAtTime.call(this, values, startTime, duration, scaling);
+	        return this;
+	    };
+	    /**
+		 *  This is similar to [cancelScheduledValues](#cancelScheduledValues) except
+		 *  it holds the automated value at time until the next automated event.
+		 *  @param  {Time} time
+		 *  @returns {Tone.TransportTimelineSignal} this
+		 */
+	    Tone.TransportTimelineSignal.prototype.cancelAndHoldAtTime = function (time) {
+	        return Tone.Signal.prototype.cancelAndHoldAtTime.call(this, Tone.TransportTime(time));
+	    };
+	    /**
+		 * Dispose and disconnect
+		 * @return {Tone.TransportTimelineSignal} this
+		 */
+	    Tone.TransportTimelineSignal.prototype.dispose = function () {
+	        Tone.Transport.clear(this._synced);
+	        Tone.Transport.off('start stop pause', this._syncedCallback);
+	        this._events.cancel(0);
+	        Tone.Signal.prototype.dispose.call(this);
+	        this._outputSig.dispose();
+	        this._outputSig = null;
+	    };
+	    return Tone.TransportTimelineSignal;
+	});
+	Module(function (Tone) {
+	    /**
+		 * @class Tone.GrainPlayer implements [granular synthesis](https://en.wikipedia.org/wiki/Granular_synthesis).
+		 *        Granular Synthesis enables you to adjust pitch and playback rate independently. The grainSize is the
+		 *        amount of time each small chunk of audio is played for and the overlap is the
+		 *        amount of crossfading transition time between successive grains.
+		 * @extends {Tone.Source}
+		 * @param {String|Tone.Buffer} url	The url to load, or the Tone.Buffer to play.
+		 * @param {Function=} callback The callback to invoke after the url is loaded.
+		 */
+	    Tone.GrainPlayer = function () {
+	        var options = Tone.defaults(arguments, [
+	            'url',
+	            'onload'
+	        ], Tone.GrainPlayer);
+	        Tone.Source.call(this, options);
+	        /**
+			 *  The audio buffer belonging to the player.
+			 *  @type  {Tone.Buffer}
+			 */
+	        this.buffer = new Tone.Buffer(options.url, options.onload);
+	        /**
+			 *  Create a repeating tick to schedule
+			 *  the grains.
+			 *  @type  {Tone.Clock}
+			 *  @private
+			 */
+	        this._clock = new Tone.Clock(this._tick.bind(this), options.grainSize);
+	        /**
+			 *  @type  {Number}
+			 *  @private
+			 */
+	        this._loopStart = 0;
+	        /**
+			 *  @type  {Number}
+			 *  @private
+			 */
+	        this._loopEnd = 0;
+	        /**
+			 * All of the currently playing BufferSources
+			 * @type {Array}
+			 * @private
+			 */
+	        this._activeSources = [];
+	        /**
+			 *  @type  {Number}
+			 *  @private
+			 */
+	        this._playbackRate = options.playbackRate;
+	        /**
+			 *  @type  {Number}
+			 *  @private
+			 */
+	        this._grainSize = options.grainSize;
+	        /**
+			 *  @private
+			 *  @type {Number}
+			 */
+	        this._overlap = options.overlap;
+	        /**
+			 *  Adjust the pitch independently of the playbackRate.
+			 *  @type  {Cents}
+			 */
+	        this.detune = options.detune;
+	        //setup
+	        this.overlap = options.overlap;
+	        this.loop = options.loop;
+	        this.playbackRate = options.playbackRate;
+	        this.grainSize = options.grainSize;
+	        this.loopStart = options.loopStart;
+	        this.loopEnd = options.loopEnd;
+	        this.reverse = options.reverse;
+	        this._clock.on('stop', this._onstop.bind(this));
+	    };
+	    Tone.extend(Tone.GrainPlayer, Tone.Source);
+	    /**
+		 *  the default parameters
+		 *  @static
+		 *  @const
+		 *  @type {Object}
+		 */
+	    Tone.GrainPlayer.defaults = {
+	        'onload': Tone.noOp,
+	        'overlap': 0.1,
+	        'grainSize': 0.2,
+	        'playbackRate': 1,
+	        'detune': 0,
+	        'loop': false,
+	        'loopStart': 0,
+	        'loopEnd': 0,
+	        'reverse': false
+	    };
+	    /**
+		 *  Play the buffer at the given startTime. Optionally add an offset
+		 *  and/or duration which will play the buffer from a position
+		 *  within the buffer for the given duration.
+		 *
+		 *  @param  {Time} [startTime=now] When the player should start.
+		 *  @param  {Time} [offset=0] The offset from the beginning of the sample
+		 *                                 to start at.
+		 *  @param  {Time=} duration How long the sample should play. If no duration
+		 *                                is given, it will default to the full length
+		 *                                of the sample (minus any offset)
+		 *  @returns {Tone.GrainPlayer} this
+		 *  @memberOf Tone.GrainPlayer#
+		 *  @method start
+		 *  @name start
+		 */
+	    /**
+		 *  Internal start method
+		 *  @param {Time} time
+		 *  @param {Time} offset
+		 *  @private
+		 */
+	    Tone.GrainPlayer.prototype._start = function (time, offset, duration) {
+	        offset = Tone.defaultArg(offset, 0);
+	        offset = this.toSeconds(offset);
+	        time = this.toSeconds(time);
+	        this._offset = offset;
+	        this._clock.start(time);
+	        if (duration) {
+	            this.stop(time + this.toSeconds(duration));
+	        }
+	    };
+	    /**
+		 *  Internal start method
+		 *  @param {Time} time
+		 *  @private
+		 */
+	    Tone.GrainPlayer.prototype._stop = function (time) {
+	        this._clock.stop(time);
+	    };
+	    /**
+		 * Invoked when the clock is stopped
+		 * @param  {Number} time
+		 * @private
+		 */
+	    Tone.GrainPlayer.prototype._onstop = function (time) {
+	        //stop the players
+	        this._activeSources.forEach(function (source) {
+	            source.stop(time, 0);
+	        });
+	    };
+	    /**
+		 *  Invoked on each clock tick. scheduled a new
+		 *  grain at this time.
+		 *  @param  {Time}  time
+		 *  @private
+		 */
+	    Tone.GrainPlayer.prototype._tick = function (time) {
+	        var fadeIn = this._offset < this._overlap ? 0 : this._overlap;
+	        var source = new Tone.BufferSource({
+	            'buffer': this.buffer,
+	            'fadeIn': fadeIn,
+	            'fadeOut': this._overlap,
+	            'loop': this.loop,
+	            'loopStart': this._loopStart,
+	            'loopEnd': this._loopEnd,
+	            'playbackRate': Tone.intervalToFrequencyRatio(this.detune / 100)
+	        }).connect(this.output);
+	        source.start(time, this._offset);
+	        this._offset += this.grainSize;
+	        source.stop(time + this.grainSize);
+	        //add it to the active sources
+	        this._activeSources.push(source);
+	        //remove it when it's done
+	        source.onended = function () {
+	            var index = this._activeSources.indexOf(source);
+	            if (index !== -1) {
+	                this._activeSources.splice(index, 1);
+	            }
+	        }.bind(this);
+	    };
+	    /**
+		 *  Jump to a specific time and play it.
+		 *  @param  {Time}  offset  The offset to jump to.
+		 *  @param {Time=} time When to make the jump.
+		 *  @return  {Tone.GrainPlayer}  this
+		 */
+	    Tone.GrainPlayer.prototype.seek = function (offset, time) {
+	        this._offset = this.toSeconds(offset);
+	        this._tick(this.toSeconds(time));
+	        return this;
+	    };
+	    /**
+		 * The playback rate of the sample
+		 * @memberOf Tone.GrainPlayer#
+		 * @type {Positive}
+		 * @name playbackRate
+		 */
+	    Object.defineProperty(Tone.GrainPlayer.prototype, 'playbackRate', {
+	        get: function () {
+	            return this._playbackRate;
+	        },
+	        set: function (rate) {
+	            this._playbackRate = rate;
+	            this.grainSize = this._grainSize;
+	        }
+	    });
+	    /**
+		 * The loop start time.
+		 * @memberOf Tone.GrainPlayer#
+		 * @type {Time}
+		 * @name loopStart
+		 */
+	    Object.defineProperty(Tone.GrainPlayer.prototype, 'loopStart', {
+	        get: function () {
+	            return this._loopStart;
+	        },
+	        set: function (time) {
+	            this._loopStart = this.toSeconds(time);
+	        }
+	    });
+	    /**
+		 * The loop end time.
+		 * @memberOf Tone.GrainPlayer#
+		 * @type {Time}
+		 * @name loopEnd
+		 */
+	    Object.defineProperty(Tone.GrainPlayer.prototype, 'loopEnd', {
+	        get: function () {
+	            return this._loopEnd;
+	        },
+	        set: function (time) {
+	            this._loopEnd = this.toSeconds(time);
+	        }
+	    });
+	    /**
+		 * The direction the buffer should play in
+		 * @memberOf Tone.GrainPlayer#
+		 * @type {boolean}
+		 * @name reverse
+		 */
+	    Object.defineProperty(Tone.GrainPlayer.prototype, 'reverse', {
+	        get: function () {
+	            return this.buffer.reverse;
+	        },
+	        set: function (rev) {
+	            this.buffer.reverse = rev;
+	        }
+	    });
+	    /**
+		 * The size of each chunk of audio that the
+		 * buffer is chopped into and played back at.
+		 * @memberOf Tone.GrainPlayer#
+		 * @type {Time}
+		 * @name grainSize
+		 */
+	    Object.defineProperty(Tone.GrainPlayer.prototype, 'grainSize', {
+	        get: function () {
+	            return this._grainSize;
+	        },
+	        set: function (size) {
+	            this._grainSize = this.toSeconds(size);
+	            this._clock.frequency.value = this._playbackRate / this._grainSize;
+	        }
+	    });
+	    /**
+		 * This is the duration of the cross-fade between
+		 * sucessive grains.
+		 * @memberOf Tone.GrainPlayer#
+		 * @type {Time}
+		 * @name overlap
+		 */
+	    Object.defineProperty(Tone.GrainPlayer.prototype, 'overlap', {
+	        get: function () {
+	            return this._overlap;
+	        },
+	        set: function (time) {
+	            this._overlap = this.toSeconds(time);
+	        }
+	    });
+	    /**
+		 * Clean up
+		 * @return {Tone.GrainPlayer} this
+		 */
+	    Tone.GrainPlayer.prototype.dispose = function () {
+	        Tone.Source.prototype.dispose.call(this);
+	        this.buffer.dispose();
+	        this.buffer = null;
+	        this._clock.dispose();
+	        this._clock = null;
+	        this._activeSources.forEach(function (source) {
+	            source.dispose();
+	        });
+	        this._activeSources = null;
+	        return this;
+	    };
+	    return Tone.GrainPlayer;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Tone.Player is an audio file player with start, loop, and stop functions.
+		 *
+		 *  @constructor
+		 *  @extends {Tone.Source}
+		 *  @param {string|AudioBuffer} url Either the AudioBuffer or the url from
+		 *                                  which to load the AudioBuffer
+		 *  @param {Function=} onload The function to invoke when the buffer is loaded.
+		 *                            Recommended to use Tone.Buffer.on('load') instead.
+		 *  @example
+		 * var player = new Tone.Player("./path/to/sample.mp3").toMaster();
+		 * //play as soon as the buffer is loaded
+		 * player.autostart = true;
+		 */
+	    Tone.Player = function (url) {
+	        var options;
+	        if (url instanceof Tone.Buffer && url.loaded) {
+	            url = url.get();
+	            options = Tone.Player.defaults;
+	        } else {
+	            options = Tone.defaults(arguments, [
+	                'url',
+	                'onload'
+	            ], Tone.Player);
+	        }
+	        Tone.Source.call(this, options);
+	        /**
+			 *  If the file should play as soon
+			 *  as the buffer is loaded.
+			 *  @type {Boolean}
+			 *  @example
+			 * //will play as soon as it's loaded
+			 * var player = new Tone.Player({
+			 * 	"url" : "./path/to/sample.mp3",
+			 * 	"autostart" : true,
+			 * }).toMaster();
+			 */
+	        this.autostart = options.autostart;
+	        /**
+			 *  the buffer
+			 *  @private
+			 *  @type {Tone.Buffer}
+			 */
+	        this._buffer = new Tone.Buffer({
+	            'url': options.url,
+	            'onload': this._onload.bind(this, options.onload),
+	            'reverse': options.reverse
+	        });
+	        if (url instanceof AudioBuffer) {
+	            this._buffer.set(url);
+	        }
+	        /**
+			 *  if the buffer should loop once it's over
+			 *  @type {Boolean}
+			 *  @private
+			 */
+	        this._loop = options.loop;
+	        /**
+			 *  if 'loop' is true, the loop will start at this position
+			 *  @type {Time}
+			 *  @private
+			 */
+	        this._loopStart = options.loopStart;
+	        /**
+			 *  if 'loop' is true, the loop will end at this position
+			 *  @type {Time}
+			 *  @private
+			 */
+	        this._loopEnd = options.loopEnd;
+	        /**
+			 *  the playback rate
+			 *  @private
+			 *  @type {Number}
+			 */
+	        this._playbackRate = options.playbackRate;
+	        /**
+			 *  All of the active buffer source nodes
+			 *  @type {Array<Tone.BufferSource>}
+			 *  @private
+			 */
+	        this._activeSources = [];
+	        /**
+			 *  The elapsed time counter.
+			 *  @type {Tone.TickSource}
+			 *  @private
+			 */
+	        this._elapsedTime = new Tone.TickSource(options.playbackRate);
+	        /**
+			 *  The fadeIn time of the amplitude envelope.
+			 *  @type {Time}
+			 */
+	        this.fadeIn = options.fadeIn;
+	        /**
+			 *  The fadeOut time of the amplitude envelope.
+			 *  @type {Time}
+			 */
+	        this.fadeOut = options.fadeOut;
+	    };
+	    Tone.extend(Tone.Player, Tone.Source);
+	    /**
+		 *  the default parameters
+		 *  @static
+		 *  @const
+		 *  @type {Object}
+		 */
+	    Tone.Player.defaults = {
+	        'onload': Tone.noOp,
+	        'playbackRate': 1,
+	        'loop': false,
+	        'autostart': false,
+	        'loopStart': 0,
+	        'loopEnd': 0,
+	        'retrigger': false,
+	        'reverse': false,
+	        'fadeIn': 0,
+	        'fadeOut': 0
+	    };
+	    /**
+		 *  Load the audio file as an audio buffer.
+		 *  Decodes the audio asynchronously and invokes
+		 *  the callback once the audio buffer loads.
+		 *  Note: this does not need to be called if a url
+		 *  was passed in to the constructor. Only use this
+		 *  if you want to manually load a new url.
+		 * @param {string} url The url of the buffer to load.
+		 *                     Filetype support depends on the
+		 *                     browser.
+		 *  @param  {Function=} callback The function to invoke once
+		 *                               the sample is loaded.
+		 *  @returns {Promise}
+		 */
+	    Tone.Player.prototype.load = function (url, callback) {
+	        return this._buffer.load(url, this._onload.bind(this, callback));
+	    };
+	    /**
+		 * Internal callback when the buffer is loaded.
+		 * @private
+		 */
+	    Tone.Player.prototype._onload = function (callback) {
+	        callback = Tone.defaultArg(callback, Tone.noOp);
+	        callback(this);
+	        if (this.autostart) {
+	            this.start();
+	        }
+	    };
+	    /**
+		 * Internal callback when the buffer is done playing.
+		 * @private
+		 */
+	    Tone.Player.prototype._onSourceEnd = function (source) {
+	        var index = this._activeSources.indexOf(source);
+	        this._activeSources.splice(index, 1);
+	    };
+	    /**
+		 *  Play the buffer at the given startTime. Optionally add an offset
+		 *  and/or duration which will play the buffer from a position
+		 *  within the buffer for the given duration.
+		 *
+		 *  @param  {Time} [startTime=now] When the player should start.
+		 *  @param  {Time} [offset=0] The offset from the beginning of the sample
+		 *                                 to start at.
+		 *  @param  {Time=} duration How long the sample should play. If no duration
+		 *                                is given, it will default to the full length
+		 *                                of the sample (minus any offset)
+		 *  @returns {Tone.Player} this
+		 *  @memberOf Tone.Player#
+		 *  @method start
+		 *  @name start
+		 */
+	    /**
+		 *  Internal start method
+		 *  @private
+		 */
+	    Tone.Player.prototype._start = function (startTime, offset, duration) {
+	        //if it's a loop the default offset is the loopstart point
+	        if (this._loop) {
+	            offset = Tone.defaultArg(offset, this._loopStart);
+	        } else {
+	            //otherwise the default offset is 0
+	            offset = Tone.defaultArg(offset, 0);
+	        }
+	        //compute the values in seconds
+	        offset = this.toSeconds(offset);
+	        var computedDuration = Tone.defaultArg(duration, Math.max(this._buffer.duration - offset, 0));
+	        computedDuration = this.toSeconds(computedDuration);
+	        startTime = this.toSeconds(startTime);
+	        //start the elapsed time counter
+	        this._elapsedTime.start(startTime, offset);
+	        //make the source
+	        var source = new Tone.BufferSource({
+	            'buffer': this._buffer,
+	            'loop': this._loop,
+	            'loopStart': this._loopStart,
+	            'loopEnd': this._loopEnd,
+	            'onended': this._onSourceEnd.bind(this),
+	            'playbackRate': this._playbackRate,
+	            'fadeIn': this.fadeIn,
+	            'fadeOut': this.fadeOut
+	        }).connect(this.output);
+	        //set the looping properties
+	        if (!this._loop && !this._synced) {
+	            //if it's not looping, set the state change at the end of the sample
+	            this._state.setStateAtTime(Tone.State.Stopped, startTime + computedDuration / this._playbackRate);
+	        }
+	        //add it to the array of active sources
+	        this._activeSources.push(source);
+	        //start it
+	        if (this._loop && Tone.isUndef(duration)) {
+	            source.start(startTime, offset);
+	        } else {
+	            source.start(startTime, offset, computedDuration);
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Stop playback.
+		 *  @private
+		 *  @param  {Time} [time=now]
+		 *  @returns {Tone.Player} this
+		 */
+	    Tone.Player.prototype._stop = function (time) {
+	        time = this.toSeconds(time);
+	        this._elapsedTime.stop(time);
+	        this._activeSources.forEach(function (source) {
+	            source.stop(time);
+	        });
+	        return this;
+	    };
+	    /**
+		 * Stop and then restart the player from the beginning (or offset)
+		 *  @param  {Time} [startTime=now] When the player should start.
+		 *  @param  {Time} [offset=0] The offset from the beginning of the sample
+		 *                                 to start at.
+		 *  @param  {Time=} duration How long the sample should play. If no duration
+		 *                                is given, it will default to the full length
+		 *                                of the sample (minus any offset)
+		 *  @returns {Tone.Player} this
+		 */
+	    Tone.Player.prototype.restart = function (time, offset, duration) {
+	        this._stop(time);
+	        this._start(time, offset, duration);
+	        return this;
+	    };
+	    /**
+		 *  Seek to a specific time in the player's buffer. If the
+		 *  source is no longer playing at that time, it will stop.
+		 *  If you seek to a time that
+		 *  @param {Time} offset The time to seek to.
+		 *  @param {Time=} time The time for the seek event to occur.
+		 *  @return {Tone.Player} this
+		 *  @example
+		 * source.start(0.2);
+		 * source.stop(0.4);
+		 */
+	    Tone.Player.prototype.seek = function (offset, time) {
+	        time = this.toSeconds(time);
+	        if (this._state.getValueAtTime(time) === Tone.State.Started) {
+	            offset = this.toSeconds(offset);
+	            // if it's currently playing, stop it
+	            this._stop(time);
+	            //restart it at the given time
+	            this._start(time, offset);
+	        }
+	        return this;
+	    };
+	    /**
+		 *  Set the loop start and end. Will only loop if loop is
+		 *  set to true.
+		 *  @param {Time} loopStart The loop end time
+		 *  @param {Time} loopEnd The loop end time
+		 *  @returns {Tone.Player} this
+		 *  @example
+		 * //loop 0.1 seconds of the file.
+		 * player.setLoopPoints(0.2, 0.3);
+		 * player.loop = true;
+		 */
+	    Tone.Player.prototype.setLoopPoints = function (loopStart, loopEnd) {
+	        this.loopStart = loopStart;
+	        this.loopEnd = loopEnd;
+	        return this;
+	    };
+	    /**
+		 * If loop is true, the loop will start at this position.
+		 * @memberOf Tone.Player#
+		 * @type {Time}
+		 * @name loopStart
+		 */
+	    Object.defineProperty(Tone.Player.prototype, 'loopStart', {
+	        get: function () {
+	            return this._loopStart;
+	        },
+	        set: function (loopStart) {
+	            this._loopStart = loopStart;
+	            //get the current source
+	            this._activeSources.forEach(function (source) {
+	                source.loopStart = loopStart;
+	            });
+	        }
+	    });
+	    /**
+		 * If loop is true, the loop will end at this position.
+		 * @memberOf Tone.Player#
+		 * @type {Time}
+		 * @name loopEnd
+		 */
+	    Object.defineProperty(Tone.Player.prototype, 'loopEnd', {
+	        get: function () {
+	            return this._loopEnd;
+	        },
+	        set: function (loopEnd) {
+	            this._loopEnd = loopEnd;
+	            //get the current source
+	            this._activeSources.forEach(function (source) {
+	                source.loopEnd = loopEnd;
+	            });
+	        }
+	    });
+	    /**
+		 * The audio buffer belonging to the player.
+		 * @memberOf Tone.Player#
+		 * @type {Tone.Buffer}
+		 * @name buffer
+		 */
+	    Object.defineProperty(Tone.Player.prototype, 'buffer', {
+	        get: function () {
+	            return this._buffer;
+	        },
+	        set: function (buffer) {
+	            this._buffer.set(buffer);
+	        }
+	    });
+	    /**
+		 * If the buffer should loop once it's over.
+		 * @memberOf Tone.Player#
+		 * @type {Boolean}
+		 * @name loop
+		 */
+	    Object.defineProperty(Tone.Player.prototype, 'loop', {
+	        get: function () {
+	            return this._loop;
+	        },
+	        set: function (loop) {
+	            //if no change, do nothing
+	            if (this._loop === loop) {
+	                return;
+	            }
+	            this._loop = loop;
+	            var now = this.now();
+	            if (!loop) {
+	                //stop the playback on the next cycle
+	                this._stopAtNextIteration(now);
+	            } else {
+	                //remove the next stopEvent
+	                var stopEvent = this._state.getNextState(Tone.State.Stopped, now);
+	                if (stopEvent) {
+	                    this._activeSources.forEach(function (source) {
+	                        source.loop = loop;
+	                    });
+	                    this._state.cancel(stopEvent.time);
+	                    this._elapsedTime.cancel(stopEvent.time);
+	                }
+	            }
+	        }
+	    });
+	    /**
+		 *  Schedules a stop event at the next full iteration. Used
+		 *  for scheduling stop when the loop state or playbackRate changes
+		 *  @param  {Number}  now  The current time
+		 *  @private
+		 */
+	    Tone.Player.prototype._stopAtNextIteration = function (now) {
+	        if (this._state.getValueAtTime(now) === Tone.State.Started) {
+	            var nextStop = this._state.getNextState(Tone.State.Stopped, now);
+	            var position = this._elapsedTime.getTicksAtTime(now);
+	            var iterations = Math.max(Math.ceil(position / this.buffer.duration), 1);
+	            var stopTime = this._elapsedTime.getTimeOfTick(iterations * this.buffer.duration, nextStop ? nextStop.time - this.sampleTime : Infinity);
+	            this.stop(stopTime);
+	        }
+	    };
+	    /**
+		 * The playback speed. 1 is normal speed. This is not a signal because
+		 * Safari and iOS currently don't support playbackRate as a signal.
+		 * @memberOf Tone.Player#
+		 * @type {Number}
+		 * @name playbackRate
+		 */
+	    Object.defineProperty(Tone.Player.prototype, 'playbackRate', {
+	        get: function () {
+	            return this._playbackRate;
+	        },
+	        set: function (rate) {
+	            this._playbackRate = rate;
+	            var now = this.now();
+	            this._elapsedTime.frequency.setValueAtTime(rate, now);
+	            //if it's not looping
+	            if (!this._loop) {
+	                this._stopAtNextIteration(now);
+	            }
+	            //set all the sources
+	            this._activeSources.forEach(function (source) {
+	                source.playbackRate.setValueAtTime(rate, now);
+	            });
+	        }
+	    });
+	    /**
+		 * The current playback position of the buffer. 
+		 * @memberOf Tone.Player#
+		 * @type {Number}
+		 * @name position
+		 */
+	    Object.defineProperty(Tone.Player.prototype, 'position', {
+	        get: function () {
+	            var now = this.now();
+	            if (this._state.getValueAtTime(now) === Tone.State.Started && this.loaded) {
+	                var duration = this.buffer.duration;
+	                var position = this._elapsedTime.getTicksAtTime(now);
+	                return position % duration;
+	            } else {
+	                return 0;
+	            }
+	        }
+	    });
+	    /**
+		 * The direction the buffer should play in
+		 * @memberOf Tone.Player#
+		 * @type {Boolean}
+		 * @name reverse
+		 */
+	    Object.defineProperty(Tone.Player.prototype, 'reverse', {
+	        get: function () {
+	            return this._buffer.reverse;
+	        },
+	        set: function (rev) {
+	            this._buffer.reverse = rev;
+	        }
+	    });
+	    /**
+		 * If all the buffer is loaded
+		 * @memberOf Tone.Player#
+		 * @type {Boolean}
+		 * @name loaded
+		 * @readOnly
+		 */
+	    Object.defineProperty(Tone.Player.prototype, 'loaded', {
+	        get: function () {
+	            return this._buffer.loaded;
+	        }
+	    });
+	    /**
+		 *  Dispose and disconnect.
+		 *  @return {Tone.Player} this
+		 */
+	    Tone.Player.prototype.dispose = function () {
+	        //disconnect all of the players
+	        this._activeSources.forEach(function (source) {
+	            source.dispose();
+	        });
+	        this._activeSources = null;
+	        Tone.Source.prototype.dispose.call(this);
+	        this._buffer.dispose();
+	        this._buffer = null;
+	        this._elapsedTime.dispose();
+	        this._elapsedTime = null;
+	        return this;
+	    };
+	    return Tone.Player;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Tone.Players combines multiple [Tone.Player](Player) objects.
+		 *
+		 *  @constructor
+		 *  @extends {Tone.AudioNode}
+		 *  @param {Object} urls An object mapping a name to a url.
+		 *  @param {function=} onload The function to invoke when all buffers are loaded.
+		 */
+	    Tone.Players = function (urls) {
+	        var args = Array.prototype.slice.call(arguments);
+	        args.shift();
+	        var options = Tone.defaults(args, ['onload'], Tone.Players);
+	        Tone.call(this);
+	        /**
+			 *  The output volume node
+			 *  @type  {Tone.Volume}
+			 *  @private
+			 */
+	        this._volume = this.output = new Tone.Volume(options.volume);
+	        /**
+			 * The volume of the output in decibels.
+			 * @type {Decibels}
+			 * @signal
+			 * @example
+			 * source.volume.value = -6;
+			 */
+	        this.volume = this._volume.volume;
+	        this._readOnly('volume');
+	        //make the output explicitly stereo
+	        this._volume.output.output.channelCount = 2;
+	        this._volume.output.output.channelCountMode = 'explicit';
+	        //mute initially
+	        this.mute = options.mute;
+	        /**
+			 * The container of all of the players
+			 * @type {Object}
+			 * @private
+			 */
+	        this._players = {};
+	        /**
+			 * The loading count
+			 * @type {Number}
+			 * @private
+			 */
+	        this._loadingCount = 0;
+	        /**
+			 * private holder of the fadeIn time
+			 * @type {Time}
+			 * @private
+			 */
+	        this._fadeIn = options.fadeIn;
+	        /**
+			 * private holder of the fadeOut time
+			 * @type {Time}
+			 * @private
+			 */
+	        this._fadeOut = options.fadeOut;
+	        //add all of the players
+	        for (var name in urls) {
+	            this._loadingCount++;
+	            this.add(name, urls[name], this._bufferLoaded.bind(this, options.onload));
+	        }
+	    };
+	    Tone.extend(Tone.Players, Tone.AudioNode);
+	    /**
+		 * The default values
+		 * @type {Object}
+		 */
+	    Tone.Players.defaults = {
+	        'volume': 0,
+	        'mute': false,
+	        'onload': Tone.noOp,
+	        'fadeIn': 0,
+	        'fadeOut': 0
+	    };
+	    /**
+		 *  A buffer was loaded. decrement the counter.
+		 *  @param  {Function}  callback
+		 *  @private
+		 */
+	    Tone.Players.prototype._bufferLoaded = function (callback) {
+	        this._loadingCount--;
+	        if (this._loadingCount === 0 && callback) {
+	            callback(this);
+	        }
+	    };
+	    /**
+		 * Mute the output.
+		 * @memberOf Tone.Source#
+		 * @type {boolean}
+		 * @name mute
+		 * @example
+		 * //mute the output
+		 * source.mute = true;
+		 */
+	    Object.defineProperty(Tone.Players.prototype, 'mute', {
+	        get: function () {
+	            return this._volume.mute;
+	        },
+	        set: function (mute) {
+	            this._volume.mute = mute;
+	        }
+	    });
+	    /**
+		 * The fadeIn time of the amplitude envelope.
+		 * @memberOf Tone.Source#
+		 * @type {Time}
+		 * @name fadeIn
+		 */
+	    Object.defineProperty(Tone.Players.prototype, 'fadeIn', {
+	        get: function () {
+	            return this._fadeIn;
+	        },
+	        set: function (fadeIn) {
+	            this._fadeIn = fadeIn;
+	            this._forEach(function (player) {
+	                player.fadeIn = fadeIn;
+	            });
+	        }
+	    });
+	    /**
+		 * The fadeOut time of the amplitude envelope.
+		 * @memberOf Tone.Source#
+		 * @type {Time}
+		 * @name fadeOut
+		 */
+	    Object.defineProperty(Tone.Players.prototype, 'fadeOut', {
+	        get: function () {
+	            return this._fadeOut;
+	        },
+	        set: function (fadeOut) {
+	            this._fadeOut = fadeOut;
+	            this._forEach(function (player) {
+	                player.fadeOut = fadeOut;
+	            });
+	        }
+	    });
+	    /**
+		 * The state of the players object. Returns "started" if any of the players are playing.
+		 * @memberOf Tone.Players#
+		 * @type {String}
+		 * @name state
+		 * @readOnly
+		 */
+	    Object.defineProperty(Tone.Players.prototype, 'state', {
+	        get: function () {
+	            var playing = false;
+	            this._forEach(function (player) {
+	                playing = playing || player.state === Tone.State.Started;
+	            });
+	            return playing ? Tone.State.Started : Tone.State.Stopped;
+	        }
+	    });
+	    /**
+		 *  True if the buffers object has a buffer by that name.
+		 *  @param  {String|Number}  name  The key or index of the
+		 *                                 buffer.
+		 *  @return  {Boolean}
+		 */
+	    Tone.Players.prototype.has = function (name) {
+	        return this._players.hasOwnProperty(name);
+	    };
+	    /**
+		 *  Get a player by name.
+		 *  @param  {String}  name  The players name as defined in
+		 *                          the constructor object or `add` method.
+		 *  @return  {Tone.Player}
+		 */
+	    Tone.Players.prototype.get = function (name) {
+	        if (this.has(name)) {
+	            return this._players[name];
+	        } else {
+	            throw new Error('Tone.Players: no player named ' + name);
+	        }
+	    };
+	    /**
+		 * Iterate over all of the players
+		 * @param  {Function} callback
+		 * @return {Tone.Players}            this
+		 * @private
+		 */
+	    Tone.Players.prototype._forEach = function (callback) {
+	        for (var playerName in this._players) {
+	            callback(this._players[playerName], playerName);
+	        }
+	        return this;
+	    };
+	    /**
+		 * If all the buffers are loaded or not
+		 * @memberOf Tone.Players#
+		 * @type {Boolean}
+		 * @name loaded
+		 * @readOnly
+		 */
+	    Object.defineProperty(Tone.Players.prototype, 'loaded', {
+	        get: function () {
+	            var isLoaded = true;
+	            this._forEach(function (player) {
+	                isLoaded = isLoaded && player.loaded;
+	            });
+	            return isLoaded;
+	        }
+	    });
+	    /**
+		 *  Add a player by name and url to the Players
+		 *  @param  {String}    name      A unique name to give the player
+		 *  @param  {String|Tone.Buffer|Audiobuffer}  url  Either the url of the bufer,
+		 *                                                 or a buffer which will be added
+		 *                                                 with the given name.
+		 *  @param  {Function=}  callback  The callback to invoke
+		 *                                 when the url is loaded.
+		 */
+	    Tone.Players.prototype.add = function (name, url, callback) {
+	        this._players[name] = new Tone.Player(url, callback).connect(this.output);
+	        this._players[name].fadeIn = this._fadeIn;
+	        this._players[name].fadeOut = this._fadeOut;
+	        return this;
+	    };
+	    /**
+		 * Stop all of the players at the given time
+		 * @param {Time} time The time to stop all of the players.
+		 * @return {Tone.Players} this
+		 */
+	    Tone.Players.prototype.stopAll = function (time) {
+	        this._forEach(function (player) {
+	            player.stop(time);
+	        });
+	    };
+	    /**
+		 *  Dispose and disconnect.
+		 *  @return {Tone.Players} this
+		 */
+	    Tone.Players.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this._volume.dispose();
+	        this._volume = null;
+	        this._writable('volume');
+	        this.volume = null;
+	        this.output = null;
+	        this._forEach(function (player) {
+	            player.dispose();
+	        });
+	        this._players = null;
+	        return this;
+	    };
+	    return Tone.Players;
+	});
+	Module(function (Tone) {
+	    
+	    /**
+		 *  @class  Tone.UserMedia uses MediaDevices.getUserMedia to open up
+		 *          and external microphone or audio input. Check
+		 *          [MediaDevices API Support](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia)
+		 *          to see which browsers are supported. Access to an external input
+		 *          is limited to secure (HTTPS) connections.
+		 *
+		 *  @constructor
+		 *  @extends {Tone.AudioNode}
+		 *  @param {Decibels=} volume The level of the input
+		 *  @example
+		 * //list the inputs and open the third one
+		 * var motu = new Tone.UserMedia();
+		 *
+		 * //opening the input asks the user to activate their mic
+		 * motu.open().then(function(){
+		 * 	//promise resolves when input is available
+		 * });
+		 */
+	    Tone.UserMedia = function () {
+	        var options = Tone.defaults(arguments, ['volume'], Tone.UserMedia);
+	        Tone.AudioNode.call(this);
+	        /**
+			 *  The MediaStreamNode
+			 *  @type {MediaStreamAudioSourceNode}
+			 *  @private
+			 */
+	        this._mediaStream = null;
+	        /**
+			 *  The media stream created by getUserMedia.
+			 *  @type {LocalMediaStream}
+			 *  @private
+			 */
+	        this._stream = null;
+	        /**
+			 *  The open device
+			 *  @type  {MediaDeviceInfo}
+			 *  @private
+			 */
+	        this._device = null;
+	        /**
+			 *  The output volume node
+			 *  @type  {Tone.Volume}
+			 *  @private
+			 */
+	        this._volume = this.output = new Tone.Volume(options.volume);
+	        /**
+			 * The volume of the output in decibels.
+			 * @type {Decibels}
+			 * @signal
+			 * @example
+			 * input.volume.value = -6;
+			 */
+	        this.volume = this._volume.volume;
+	        this._readOnly('volume');
+	        this.mute = options.mute;
+	    };
+	    Tone.extend(Tone.UserMedia, Tone.AudioNode);
+	    /**
+		 * the default parameters
+		 * @type {Object}
+		 */
+	    Tone.UserMedia.defaults = {
+	        'volume': 0,
+	        'mute': false
+	    };
+	    /**
+		 *  Open the media stream. If a string is passed in, it is assumed
+		 *  to be the label or id of the stream, if a number is passed in,
+		 *  it is the input number of the stream.
+		 *  @param  {String|Number} [labelOrId="default"] The label or id of the audio input media device.
+		 *                                                With no argument, the default stream is opened.
+		 *  @return {Promise} The promise is resolved when the stream is open.
+		 */
+	    Tone.UserMedia.prototype.open = function (labelOrId) {
+	        return Tone.UserMedia.enumerateDevices().then(function (devices) {
+	            var device;
+	            if (Tone.isNumber(labelOrId)) {
+	                device = devices[labelOrId];
+	            } else {
+	                device = devices.find(function (device) {
+	                    return device.label === labelOrId || device.deviceId === labelOrId;
+	                });
+	                //didn't find a matching device
+	                if (!device && devices.length > 0) {
+	                    device = devices[0];
+	                } else if (!device && Tone.isDefined(labelOrId)) {
+	                    throw new Error('Tone.UserMedia: no matching device: ' + labelOrId);
+	                }
+	            }
+	            this._device = device;
+	            //do getUserMedia
+	            var constraints = {
+	                audio: {
+	                    'echoCancellation': false,
+	                    'sampleRate': this.context.sampleRate
+	                }
+	            };
+	            if (device) {
+	                constraints.audio.deviceId = device.deviceId;
+	            }
+	            return navigator.mediaDevices.getUserMedia(constraints).then(function (stream) {
+	                //start a new source only if the previous one is closed
+	                if (!this._stream) {
+	                    this._stream = stream;
+	                    //Wrap a MediaStreamSourceNode around the live input stream.
+	                    this._mediaStream = this.context.createMediaStreamSource(stream);
+	                    //Connect the MediaStreamSourceNode to a gate gain node
+	                    this._mediaStream.connect(this.output);
+	                }
+	                return this;
+	            }.bind(this));
+	        }.bind(this));
+	    };
+	    /**
+		 *  Close the media stream
+		 *  @return {Tone.UserMedia} this
+		 */
+	    Tone.UserMedia.prototype.close = function () {
+	        if (this._stream) {
+	            this._stream.getAudioTracks().forEach(function (track) {
+	                track.stop();
+	            });
+	            this._stream = null;
+	            //remove the old media stream
+	            this._mediaStream.disconnect();
+	            this._mediaStream = null;
+	        }
+	        this._device = null;
+	        return this;
+	    };
+	    /**
+		 *  Returns a promise which resolves with the list of audio input devices available.
+		 *  @return {Promise} The promise that is resolved with the devices
+		 *  @static
+		 *  @example
+		 * Tone.UserMedia.enumerateDevices().then(function(devices){
+		 * 	console.log(devices)
+		 * })
+		 */
+	    Tone.UserMedia.enumerateDevices = function () {
+	        return navigator.mediaDevices.enumerateDevices().then(function (devices) {
+	            return devices.filter(function (device) {
+	                return device.kind === 'audioinput';
+	            });
+	        });
+	    };
+	    /**
+		 *  Returns the playback state of the source, "started" when the microphone is open
+		 *  and "stopped" when the mic is closed.
+		 *  @type {Tone.State}
+		 *  @readOnly
+		 *  @memberOf Tone.UserMedia#
+		 *  @name state
+		 */
+	    Object.defineProperty(Tone.UserMedia.prototype, 'state', {
+	        get: function () {
+	            return this._stream && this._stream.active ? Tone.State.Started : Tone.State.Stopped;
+	        }
+	    });
+	    /**
+		 * 	Returns an identifier for the represented device that is
+		 * 	persisted across sessions. It is un-guessable by other applications and
+		 * 	unique to the origin of the calling application. It is reset when the
+		 * 	user clears cookies (for Private Browsing, a different identifier is
+		 * 	used that is not persisted across sessions). Returns undefined when the
+		 * 	device is not open.
+		 *  @type {String}
+		 *  @readOnly
+		 *  @memberOf Tone.UserMedia#
+		 *  @name deviceId
+		 */
+	    Object.defineProperty(Tone.UserMedia.prototype, 'deviceId', {
+	        get: function () {
+	            if (this._device) {
+	                return this._device.deviceId;
+	            }
+	        }
+	    });
+	    /**
+		 * 	Returns a group identifier. Two devices have the
+		 * 	same group identifier if they belong to the same physical device.
+		 * 	Returns undefined when the device is not open.
+		 *  @type {String}
+		 *  @readOnly
+		 *  @memberOf Tone.UserMedia#
+		 *  @name groupId
+		 */
+	    Object.defineProperty(Tone.UserMedia.prototype, 'groupId', {
+	        get: function () {
+	            if (this._device) {
+	                return this._device.groupId;
+	            }
+	        }
+	    });
+	    /**
+		 * 	Returns a label describing this device (for example "Built-in Microphone").
+		 * 	Returns undefined when the device is not open or label is not available
+		 * 	because of permissions.
+		 *  @type {String}
+		 *  @readOnly
+		 *  @memberOf Tone.UserMedia#
+		 *  @name groupId
+		 */
+	    Object.defineProperty(Tone.UserMedia.prototype, 'label', {
+	        get: function () {
+	            if (this._device) {
+	                return this._device.label;
+	            }
+	        }
+	    });
+	    /**
+		 * Mute the output.
+		 * @memberOf Tone.UserMedia#
+		 * @type {boolean}
+		 * @name mute
+		 * @example
+		 * //mute the output
+		 * userMedia.mute = true;
+		 */
+	    Object.defineProperty(Tone.UserMedia.prototype, 'mute', {
+	        get: function () {
+	            return this._volume.mute;
+	        },
+	        set: function (mute) {
+	            this._volume.mute = mute;
+	        }
+	    });
+	    /**
+		 * Clean up.
+		 * @return {Tone.UserMedia} this
+		 */
+	    Tone.UserMedia.prototype.dispose = function () {
+	        Tone.AudioNode.prototype.dispose.call(this);
+	        this.close();
+	        this._writable('volume');
+	        this._volume.dispose();
+	        this._volume = null;
+	        this.volume = null;
+	        return this;
+	    };
+	    /**
+		 *  If getUserMedia is supported by the browser.
+		 *  @type  {Boolean}
+		 *  @memberOf Tone.UserMedia#
+		 *  @name supported
+		 *  @static
+		 *  @readOnly
+		 */
+	    Object.defineProperty(Tone.UserMedia, 'supported', {
+	        get: function () {
+	            return Tone.isDefined(navigator.mediaDevices) && Tone.isFunction(navigator.mediaDevices.getUserMedia);
+	        }
+	    });
+	    return Tone.UserMedia;
+	});
+	Module(function (Tone) {
+	    /**
+		 *  @class Tone.Midi is a primitive type for encoding Time values.
+		 *         Tone.Midi can be constructed with or without the `new` keyword. Tone.Midi can be passed
+		 *         into the parameter of any method which takes time as an argument.
+		 *  @constructor
+		 *  @extends {Tone.Frequency}
+		 *  @param  {String|Number}  val    The time value.
+		 *  @param  {String=}  units  The units of the value.
+		 *  @example
+		 * var t = Tone.Midi("4n");//a quarter note
+		 */
+	    Tone.Midi = function (val, units) {
+	        if (this instanceof Tone.Midi) {
+	            Tone.Frequency.call(this, val, units);
+	        } else {
+	            return new Tone.Midi(val, units);
+	        }
+	    };
+	    Tone.extend(Tone.Midi, Tone.Frequency);
+	    /**
+		 *  The default units if none are given.
+		 *  @type {String}
+		 *  @private
+		 */
+	    Tone.Midi.prototype._defaultUnits = 'midi';
+	    /**
+		 *  Returns the value of a frequency in the current units
+		 *  @param {Frequency} freq
+		 *  @return  {Number}
+		 *  @private
+		 */
+	    Tone.Midi.prototype._frequencyToUnits = function (freq) {
+	        return Tone.Frequency.ftom(Tone.Frequency.prototype._frequencyToUnits.call(this, freq));
+	    };
+	    /**
+		 *  Returns the value of a tick in the current time units
+		 *  @param {Ticks} ticks
+		 *  @return  {Number}
+		 *  @private
+		 */
+	    Tone.Midi.prototype._ticksToUnits = function (ticks) {
+	        return Tone.Frequency.ftom(Tone.Frequency.prototype._ticksToUnits.call(this, ticks));
+	    };
+	    /**
+		 *  Return the value of the beats in the current units
+		 *  @param {Number} beats
+		 *  @return  {Number}
+		 *  @private
+		 */
+	    Tone.Midi.prototype._beatsToUnits = function (beats) {
+	        return Tone.Frequency.ftom(Tone.Frequency.prototype._beatsToUnits.call(this, beats));
+	    };
+	    /**
+		 *  Returns the value of a second in the current units
+		 *  @param {Seconds} seconds
+		 *  @return  {Number}
+		 *  @private
+		 */
+	    Tone.Midi.prototype._secondsToUnits = function (seconds) {
+	        return Tone.Frequency.ftom(Tone.Frequency.prototype._secondsToUnits.call(this, seconds));
+	    };
+	    /**
+		 *  Return the value of the frequency as a MIDI note
+		 *  @return  {MIDI}
+		 *  @example
+		 * Tone.Midi(60).toMidi(); //60
+		 */
+	    Tone.Midi.prototype.toMidi = function () {
+	        return this.valueOf();
+	    };
+	    /**
+		 *  Return the value of the frequency as a MIDI note
+		 *  @return  {MIDI}
+		 *  @example
+		 * Tone.Midi(60).toMidi(); //60
+		 */
+	    Tone.Midi.prototype.toFrequency = function () {
+	        return Tone.Frequency.mtof(this.toMidi());
+	    };
+	    /**
+		 *  Transposes the frequency by the given number of semitones.
+		 *  @param  {Interval}  interval
+		 *  @return  {Tone.Frequency} A new transposed frequency
+		 *  @example
+		 * Tone.Frequency("A4").transpose(3); //"C5"
+		 */
+	    Tone.Midi.prototype.transpose = function (interval) {
+	        return new this.constructor(this.toMidi() + interval);
+	    };
+	    return Tone.Midi;
+	});
+	
+	return Tone;
+}));
+
+/***/ }),
+
+/***/ "./node_modules/uuid/lib/bytesToUuid.js":
+/*!**********************************************!*\
+  !*** ./node_modules/uuid/lib/bytesToUuid.js ***!
+  \**********************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+/**
+ * Convert array of 16 byte values to UUID string format of the form:
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
+ */
+var byteToHex = [];
+for (var i = 0; i < 256; ++i) {
+  byteToHex[i] = (i + 0x100).toString(16).substr(1);
+}
+
+function bytesToUuid(buf, offset) {
+  var i = offset || 0;
+  var bth = byteToHex;
+  return bth[buf[i++]] + bth[buf[i++]] +
+          bth[buf[i++]] + bth[buf[i++]] + '-' +
+          bth[buf[i++]] + bth[buf[i++]] + '-' +
+          bth[buf[i++]] + bth[buf[i++]] + '-' +
+          bth[buf[i++]] + bth[buf[i++]] + '-' +
+          bth[buf[i++]] + bth[buf[i++]] +
+          bth[buf[i++]] + bth[buf[i++]] +
+          bth[buf[i++]] + bth[buf[i++]];
+}
+
+module.exports = bytesToUuid;
+
+
+/***/ }),
+
+/***/ "./node_modules/uuid/lib/rng-browser.js":
+/*!**********************************************!*\
+  !*** ./node_modules/uuid/lib/rng-browser.js ***!
+  \**********************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+// Unique ID creation requires a high quality random # generator.  In the
+// browser this is a little complicated due to unknown quality of Math.random()
+// and inconsistent support for the `crypto` API.  We do the best we can via
+// feature-detection
+
+// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
+var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues.bind(crypto)) ||
+                      (typeof(msCrypto) != 'undefined' && msCrypto.getRandomValues.bind(msCrypto));
+if (getRandomValues) {
+  // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto
+  var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
+
+  module.exports = function whatwgRNG() {
+    getRandomValues(rnds8);
+    return rnds8;
+  };
+} else {
+  // Math.random()-based (RNG)
+  //
+  // If all else fails, use Math.random().  It's fast, but is of unspecified
+  // quality.
+  var rnds = new Array(16);
+
+  module.exports = function mathRNG() {
+    for (var i = 0, r; i < 16; i++) {
+      if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
+      rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
+    }
+
+    return rnds;
+  };
+}
+
+
+/***/ }),
+
+/***/ "./node_modules/uuid/v1.js":
+/*!*********************************!*\
+  !*** ./node_modules/uuid/v1.js ***!
+  \*********************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+var rng = __webpack_require__(/*! ./lib/rng */ "./node_modules/uuid/lib/rng-browser.js");
+var bytesToUuid = __webpack_require__(/*! ./lib/bytesToUuid */ "./node_modules/uuid/lib/bytesToUuid.js");
+
+// **`v1()` - Generate time-based UUID**
+//
+// Inspired by https://github.com/LiosK/UUID.js
+// and http://docs.python.org/library/uuid.html
+
+var _nodeId;
+var _clockseq;
+
+// Previous uuid creation time
+var _lastMSecs = 0;
+var _lastNSecs = 0;
+
+// See https://github.com/broofa/node-uuid for API details
+function v1(options, buf, offset) {
+  var i = buf && offset || 0;
+  var b = buf || [];
+
+  options = options || {};
+  var node = options.node || _nodeId;
+  var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
+
+  // node and clockseq need to be initialized to random values if they're not
+  // specified.  We do this lazily to minimize issues related to insufficient
+  // system entropy.  See #189
+  if (node == null || clockseq == null) {
+    var seedBytes = rng();
+    if (node == null) {
+      // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
+      node = _nodeId = [
+        seedBytes[0] | 0x01,
+        seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]
+      ];
+    }
+    if (clockseq == null) {
+      // Per 4.2.2, randomize (14 bit) clockseq
+      clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
+    }
+  }
+
+  // UUID timestamps are 100 nano-second units since the Gregorian epoch,
+  // (1582-10-15 00:00).  JSNumbers aren't precise enough for this, so
+  // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
+  // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
+  var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();
+
+  // Per 4.2.1.2, use count of uuid's generated during the current clock
+  // cycle to simulate higher resolution clock
+  var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
+
+  // Time since last uuid creation (in msecs)
+  var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
+
+  // Per 4.2.1.2, Bump clockseq on clock regression
+  if (dt < 0 && options.clockseq === undefined) {
+    clockseq = clockseq + 1 & 0x3fff;
+  }
+
+  // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
+  // time interval
+  if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
+    nsecs = 0;
+  }
+
+  // Per 4.2.1.2 Throw error if too many uuids are requested
+  if (nsecs >= 10000) {
+    throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
+  }
+
+  _lastMSecs = msecs;
+  _lastNSecs = nsecs;
+  _clockseq = clockseq;
+
+  // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
+  msecs += 12219292800000;
+
+  // `time_low`
+  var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
+  b[i++] = tl >>> 24 & 0xff;
+  b[i++] = tl >>> 16 & 0xff;
+  b[i++] = tl >>> 8 & 0xff;
+  b[i++] = tl & 0xff;
+
+  // `time_mid`
+  var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
+  b[i++] = tmh >>> 8 & 0xff;
+  b[i++] = tmh & 0xff;
+
+  // `time_high_and_version`
+  b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
+  b[i++] = tmh >>> 16 & 0xff;
+
+  // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
+  b[i++] = clockseq >>> 8 | 0x80;
+
+  // `clock_seq_low`
+  b[i++] = clockseq & 0xff;
+
+  // `node`
+  for (var n = 0; n < 6; ++n) {
+    b[i + n] = node[n];
+  }
+
+  return buf ? buf : bytesToUuid(b);
+}
+
+module.exports = v1;
+
+
+/***/ }),
+
+/***/ "./node_modules/value-equal/index.js":
+/*!*******************************************!*\
+  !*** ./node_modules/value-equal/index.js ***!
+  \*******************************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+function valueEqual(a, b) {
+  if (a === b) return true;
+
+  if (a == null || b == null) return false;
+
+  if (Array.isArray(a)) {
+    return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {
+      return valueEqual(item, b[index]);
+    });
+  }
+
+  var aType = typeof a === 'undefined' ? 'undefined' : _typeof(a);
+  var bType = typeof b === 'undefined' ? 'undefined' : _typeof(b);
+
+  if (aType !== bType) return false;
+
+  if (aType === 'object') {
+    var aValue = a.valueOf();
+    var bValue = b.valueOf();
+
+    if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);
+
+    var aKeys = Object.keys(a);
+    var bKeys = Object.keys(b);
+
+    if (aKeys.length !== bKeys.length) return false;
+
+    return aKeys.every(function (key) {
+      return valueEqual(a[key], b[key]);
+    });
+  }
+
+  return false;
+}
+
+/* harmony default export */ __webpack_exports__["default"] = (valueEqual);
+
+/***/ }),
+
+/***/ "./node_modules/warning/browser.js":
+/*!*****************************************!*\
+  !*** ./node_modules/warning/browser.js ***!
+  \*****************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright 2014-2015, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ */
+
+
+
+/**
+ * Similar to invariant but only logs a warning if the condition is not met.
+ * This can be used to log issues in development environments in critical
+ * paths. Removing the logging code for production environments will keep the
+ * same logic and follow the same code paths.
+ */
+
+var warning = function() {};
+
+if (true) {
+  warning = function(condition, format, args) {
+    var len = arguments.length;
+    args = new Array(len > 2 ? len - 2 : 0);
+    for (var key = 2; key < len; key++) {
+      args[key - 2] = arguments[key];
+    }
+    if (format === undefined) {
+      throw new Error(
+        '`warning(condition, format, ...args)` requires a warning ' +
+        'message argument'
+      );
+    }
+
+    if (format.length < 10 || (/^[s\W]*$/).test(format)) {
+      throw new Error(
+        'The warning format should be able to uniquely identify this ' +
+        'warning. Please, use a more descriptive format than: ' + format
+      );
+    }
+
+    if (!condition) {
+      var argIndex = 0;
+      var message = 'Warning: ' +
+        format.replace(/%s/g, function() {
+          return args[argIndex++];
+        });
+      if (typeof console !== 'undefined') {
+        console.error(message);
+      }
+      try {
+        // This error was thrown as a convenience so that you can use this stack
+        // to find the callsite that caused this warning to fire.
+        throw new Error(message);
+      } catch(x) {}
+    }
+  };
+}
+
+module.exports = warning;
+
+
+/***/ }),
+
+/***/ "./node_modules/webpack/buildin/amd-define.js":
+/*!***************************************!*\
+  !*** (webpack)/buildin/amd-define.js ***!
+  \***************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+module.exports = function() {
+	throw new Error("define cannot be used indirect");
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/webpack/buildin/amd-options.js":
+/*!****************************************!*\
+  !*** (webpack)/buildin/amd-options.js ***!
+  \****************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+/* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */
+module.exports = __webpack_amd_options__;
+
+/* WEBPACK VAR INJECTION */}.call(this, {}))
+
+/***/ }),
+
+/***/ "./node_modules/webpack/buildin/global.js":
+/*!***********************************!*\
+  !*** (webpack)/buildin/global.js ***!
+  \***********************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+var g;
+
+// This works in non-strict mode
+g = (function() {
+	return this;
+})();
+
+try {
+	// This works if eval is allowed (see CSP)
+	g = g || Function("return this")() || (1, eval)("this");
+} catch (e) {
+	// This works if the window reference is available
+	if (typeof window === "object") g = window;
+}
+
+// g can still be undefined, but nothing to do about it...
+// We return undefined, instead of nothing here, so it's
+// easier to handle this case. if(!global) { ...}
+
+module.exports = g;
+
+
+/***/ }),
+
+/***/ "./node_modules/webpack/buildin/harmony-module.js":
+/*!*******************************************!*\
+  !*** (webpack)/buildin/harmony-module.js ***!
+  \*******************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+module.exports = function(originalModule) {
+	if (!originalModule.webpackPolyfill) {
+		var module = Object.create(originalModule);
+		// module.parent = undefined by default
+		if (!module.children) module.children = [];
+		Object.defineProperty(module, "loaded", {
+			enumerable: true,
+			get: function() {
+				return module.l;
+			}
+		});
+		Object.defineProperty(module, "id", {
+			enumerable: true,
+			get: function() {
+				return module.i;
+			}
+		});
+		Object.defineProperty(module, "exports", {
+			enumerable: true
+		});
+		module.webpackPolyfill = 1;
+	}
+	return module;
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/webpack/buildin/module.js":
+/*!***********************************!*\
+  !*** (webpack)/buildin/module.js ***!
+  \***********************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+module.exports = function(module) {
+	if (!module.webpackPolyfill) {
+		module.deprecate = function() {};
+		module.paths = [];
+		// module.parent = undefined by default
+		if (!module.children) module.children = [];
+		Object.defineProperty(module, "loaded", {
+			enumerable: true,
+			get: function() {
+				return module.l;
+			}
+		});
+		Object.defineProperty(module, "id", {
+			enumerable: true,
+			get: function() {
+				return module.i;
+			}
+		});
+		module.webpackPolyfill = 1;
+	}
+	return module;
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/webpack/node_modules/base64-js/index.js":
+/*!*************************************************!*\
+  !*** (webpack)/node_modules/base64-js/index.js ***!
+  \*************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.byteLength = byteLength
+exports.toByteArray = toByteArray
+exports.fromByteArray = fromByteArray
+
+var lookup = []
+var revLookup = []
+var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
+
+var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
+for (var i = 0, len = code.length; i < len; ++i) {
+  lookup[i] = code[i]
+  revLookup[code.charCodeAt(i)] = i
+}
+
+// Support decoding URL-safe base64 strings, as Node.js does.
+// See: https://en.wikipedia.org/wiki/Base64#URL_applications
+revLookup['-'.charCodeAt(0)] = 62
+revLookup['_'.charCodeAt(0)] = 63
+
+function getLens (b64) {
+  var len = b64.length
+
+  if (len % 4 > 0) {
+    throw new Error('Invalid string. Length must be a multiple of 4')
+  }
+
+  // Trim off extra bytes after placeholder bytes are found
+  // See: https://github.com/beatgammit/base64-js/issues/42
+  var validLen = b64.indexOf('=')
+  if (validLen === -1) validLen = len
+
+  var placeHoldersLen = validLen === len
+    ? 0
+    : 4 - (validLen % 4)
+
+  return [validLen, placeHoldersLen]
+}
+
+// base64 is 4/3 + up to two characters of the original data
+function byteLength (b64) {
+  var lens = getLens(b64)
+  var validLen = lens[0]
+  var placeHoldersLen = lens[1]
+  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
+}
+
+function _byteLength (b64, validLen, placeHoldersLen) {
+  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
+}
+
+function toByteArray (b64) {
+  var tmp
+  var lens = getLens(b64)
+  var validLen = lens[0]
+  var placeHoldersLen = lens[1]
+
+  var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
+
+  var curByte = 0
+
+  // if there are placeholders, only get up to the last complete 4 chars
+  var len = placeHoldersLen > 0
+    ? validLen - 4
+    : validLen
+
+  for (var i = 0; i < len; i += 4) {
+    tmp =
+      (revLookup[b64.charCodeAt(i)] << 18) |
+      (revLookup[b64.charCodeAt(i + 1)] << 12) |
+      (revLookup[b64.charCodeAt(i + 2)] << 6) |
+      revLookup[b64.charCodeAt(i + 3)]
+    arr[curByte++] = (tmp >> 16) & 0xFF
+    arr[curByte++] = (tmp >> 8) & 0xFF
+    arr[curByte++] = tmp & 0xFF
+  }
+
+  if (placeHoldersLen === 2) {
+    tmp =
+      (revLookup[b64.charCodeAt(i)] << 2) |
+      (revLookup[b64.charCodeAt(i + 1)] >> 4)
+    arr[curByte++] = tmp & 0xFF
+  }
+
+  if (placeHoldersLen === 1) {
+    tmp =
+      (revLookup[b64.charCodeAt(i)] << 10) |
+      (revLookup[b64.charCodeAt(i + 1)] << 4) |
+      (revLookup[b64.charCodeAt(i + 2)] >> 2)
+    arr[curByte++] = (tmp >> 8) & 0xFF
+    arr[curByte++] = tmp & 0xFF
+  }
+
+  return arr
+}
+
+function tripletToBase64 (num) {
+  return lookup[num >> 18 & 0x3F] +
+    lookup[num >> 12 & 0x3F] +
+    lookup[num >> 6 & 0x3F] +
+    lookup[num & 0x3F]
+}
+
+function encodeChunk (uint8, start, end) {
+  var tmp
+  var output = []
+  for (var i = start; i < end; i += 3) {
+    tmp =
+      ((uint8[i] << 16) & 0xFF0000) +
+      ((uint8[i + 1] << 8) & 0xFF00) +
+      (uint8[i + 2] & 0xFF)
+    output.push(tripletToBase64(tmp))
+  }
+  return output.join('')
+}
+
+function fromByteArray (uint8) {
+  var tmp
+  var len = uint8.length
+  var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
+  var parts = []
+  var maxChunkLength = 16383 // must be multiple of 3
+
+  // go through the array every three bytes, we'll deal with trailing stuff later
+  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
+    parts.push(encodeChunk(
+      uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)
+    ))
+  }
+
+  // pad the end with zeros, but make sure to not forget the extra bytes
+  if (extraBytes === 1) {
+    tmp = uint8[len - 1]
+    parts.push(
+      lookup[tmp >> 2] +
+      lookup[(tmp << 4) & 0x3F] +
+      '=='
+    )
+  } else if (extraBytes === 2) {
+    tmp = (uint8[len - 2] << 8) + uint8[len - 1]
+    parts.push(
+      lookup[tmp >> 10] +
+      lookup[(tmp >> 4) & 0x3F] +
+      lookup[(tmp << 2) & 0x3F] +
+      '='
+    )
+  }
+
+  return parts.join('')
+}
+
+
+/***/ }),
+
+/***/ "./node_modules/webpack/node_modules/buffer/index.js":
+/*!**********************************************!*\
+  !*** (webpack)/node_modules/buffer/index.js ***!
+  \**********************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(global) {/*!
+ * The buffer module from node.js, for the browser.
+ *
+ * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
+ * @license  MIT
+ */
+/* eslint-disable no-proto */
+
+
+
+var base64 = __webpack_require__(/*! base64-js */ "./node_modules/webpack/node_modules/base64-js/index.js")
+var ieee754 = __webpack_require__(/*! ieee754 */ "./node_modules/webpack/node_modules/ieee754/index.js")
+var isArray = __webpack_require__(/*! isarray */ "./node_modules/webpack/node_modules/isarray/index.js")
+
+exports.Buffer = Buffer
+exports.SlowBuffer = SlowBuffer
+exports.INSPECT_MAX_BYTES = 50
+
+/**
+ * If `Buffer.TYPED_ARRAY_SUPPORT`:
+ *   === true    Use Uint8Array implementation (fastest)
+ *   === false   Use Object implementation (most compatible, even IE6)
+ *
+ * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
+ * Opera 11.6+, iOS 4.2+.
+ *
+ * Due to various browser bugs, sometimes the Object implementation will be used even
+ * when the browser supports typed arrays.
+ *
+ * Note:
+ *
+ *   - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
+ *     See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
+ *
+ *   - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
+ *
+ *   - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
+ *     incorrect length in some situations.
+
+ * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
+ * get the Object implementation, which is slower but behaves correctly.
+ */
+Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
+  ? global.TYPED_ARRAY_SUPPORT
+  : typedArraySupport()
+
+/*
+ * Export kMaxLength after typed array support is determined.
+ */
+exports.kMaxLength = kMaxLength()
+
+function typedArraySupport () {
+  try {
+    var arr = new Uint8Array(1)
+    arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
+    return arr.foo() === 42 && // typed array instances can be augmented
+        typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
+        arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
+  } catch (e) {
+    return false
+  }
+}
+
+function kMaxLength () {
+  return Buffer.TYPED_ARRAY_SUPPORT
+    ? 0x7fffffff
+    : 0x3fffffff
+}
+
+function createBuffer (that, length) {
+  if (kMaxLength() < length) {
+    throw new RangeError('Invalid typed array length')
+  }
+  if (Buffer.TYPED_ARRAY_SUPPORT) {
+    // Return an augmented `Uint8Array` instance, for best performance
+    that = new Uint8Array(length)
+    that.__proto__ = Buffer.prototype
+  } else {
+    // Fallback: Return an object instance of the Buffer class
+    if (that === null) {
+      that = new Buffer(length)
+    }
+    that.length = length
+  }
+
+  return that
+}
+
+/**
+ * The Buffer constructor returns instances of `Uint8Array` that have their
+ * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
+ * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
+ * and the `Uint8Array` methods. Square bracket notation works as expected -- it
+ * returns a single octet.
+ *
+ * The `Uint8Array` prototype remains unmodified.
+ */
+
+function Buffer (arg, encodingOrOffset, length) {
+  if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
+    return new Buffer(arg, encodingOrOffset, length)
+  }
+
+  // Common case.
+  if (typeof arg === 'number') {
+    if (typeof encodingOrOffset === 'string') {
+      throw new Error(
+        'If encoding is specified then the first argument must be a string'
+      )
+    }
+    return allocUnsafe(this, arg)
+  }
+  return from(this, arg, encodingOrOffset, length)
+}
+
+Buffer.poolSize = 8192 // not used by this implementation
+
+// TODO: Legacy, not needed anymore. Remove in next major version.
+Buffer._augment = function (arr) {
+  arr.__proto__ = Buffer.prototype
+  return arr
+}
+
+function from (that, value, encodingOrOffset, length) {
+  if (typeof value === 'number') {
+    throw new TypeError('"value" argument must not be a number')
+  }
+
+  if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
+    return fromArrayBuffer(that, value, encodingOrOffset, length)
+  }
+
+  if (typeof value === 'string') {
+    return fromString(that, value, encodingOrOffset)
+  }
+
+  return fromObject(that, value)
+}
+
+/**
+ * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
+ * if value is a number.
+ * Buffer.from(str[, encoding])
+ * Buffer.from(array)
+ * Buffer.from(buffer)
+ * Buffer.from(arrayBuffer[, byteOffset[, length]])
+ **/
+Buffer.from = function (value, encodingOrOffset, length) {
+  return from(null, value, encodingOrOffset, length)
+}
+
+if (Buffer.TYPED_ARRAY_SUPPORT) {
+  Buffer.prototype.__proto__ = Uint8Array.prototype
+  Buffer.__proto__ = Uint8Array
+  if (typeof Symbol !== 'undefined' && Symbol.species &&
+      Buffer[Symbol.species] === Buffer) {
+    // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
+    Object.defineProperty(Buffer, Symbol.species, {
+      value: null,
+      configurable: true
+    })
+  }
+}
+
+function assertSize (size) {
+  if (typeof size !== 'number') {
+    throw new TypeError('"size" argument must be a number')
+  } else if (size < 0) {
+    throw new RangeError('"size" argument must not be negative')
+  }
+}
+
+function alloc (that, size, fill, encoding) {
+  assertSize(size)
+  if (size <= 0) {
+    return createBuffer(that, size)
+  }
+  if (fill !== undefined) {
+    // Only pay attention to encoding if it's a string. This
+    // prevents accidentally sending in a number that would
+    // be interpretted as a start offset.
+    return typeof encoding === 'string'
+      ? createBuffer(that, size).fill(fill, encoding)
+      : createBuffer(that, size).fill(fill)
+  }
+  return createBuffer(that, size)
+}
+
+/**
+ * Creates a new filled Buffer instance.
+ * alloc(size[, fill[, encoding]])
+ **/
+Buffer.alloc = function (size, fill, encoding) {
+  return alloc(null, size, fill, encoding)
+}
+
+function allocUnsafe (that, size) {
+  assertSize(size)
+  that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
+  if (!Buffer.TYPED_ARRAY_SUPPORT) {
+    for (var i = 0; i < size; ++i) {
+      that[i] = 0
+    }
+  }
+  return that
+}
+
+/**
+ * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
+ * */
+Buffer.allocUnsafe = function (size) {
+  return allocUnsafe(null, size)
+}
+/**
+ * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
+ */
+Buffer.allocUnsafeSlow = function (size) {
+  return allocUnsafe(null, size)
+}
+
+function fromString (that, string, encoding) {
+  if (typeof encoding !== 'string' || encoding === '') {
+    encoding = 'utf8'
+  }
+
+  if (!Buffer.isEncoding(encoding)) {
+    throw new TypeError('"encoding" must be a valid string encoding')
+  }
+
+  var length = byteLength(string, encoding) | 0
+  that = createBuffer(that, length)
+
+  var actual = that.write(string, encoding)
+
+  if (actual !== length) {
+    // Writing a hex string, for example, that contains invalid characters will
+    // cause everything after the first invalid character to be ignored. (e.g.
+    // 'abxxcd' will be treated as 'ab')
+    that = that.slice(0, actual)
+  }
+
+  return that
+}
+
+function fromArrayLike (that, array) {
+  var length = array.length < 0 ? 0 : checked(array.length) | 0
+  that = createBuffer(that, length)
+  for (var i = 0; i < length; i += 1) {
+    that[i] = array[i] & 255
+  }
+  return that
+}
+
+function fromArrayBuffer (that, array, byteOffset, length) {
+  array.byteLength // this throws if `array` is not a valid ArrayBuffer
+
+  if (byteOffset < 0 || array.byteLength < byteOffset) {
+    throw new RangeError('\'offset\' is out of bounds')
+  }
+
+  if (array.byteLength < byteOffset + (length || 0)) {
+    throw new RangeError('\'length\' is out of bounds')
+  }
+
+  if (byteOffset === undefined && length === undefined) {
+    array = new Uint8Array(array)
+  } else if (length === undefined) {
+    array = new Uint8Array(array, byteOffset)
+  } else {
+    array = new Uint8Array(array, byteOffset, length)
+  }
+
+  if (Buffer.TYPED_ARRAY_SUPPORT) {
+    // Return an augmented `Uint8Array` instance, for best performance
+    that = array
+    that.__proto__ = Buffer.prototype
+  } else {
+    // Fallback: Return an object instance of the Buffer class
+    that = fromArrayLike(that, array)
+  }
+  return that
+}
+
+function fromObject (that, obj) {
+  if (Buffer.isBuffer(obj)) {
+    var len = checked(obj.length) | 0
+    that = createBuffer(that, len)
+
+    if (that.length === 0) {
+      return that
+    }
+
+    obj.copy(that, 0, 0, len)
+    return that
+  }
+
+  if (obj) {
+    if ((typeof ArrayBuffer !== 'undefined' &&
+        obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
+      if (typeof obj.length !== 'number' || isnan(obj.length)) {
+        return createBuffer(that, 0)
+      }
+      return fromArrayLike(that, obj)
+    }
+
+    if (obj.type === 'Buffer' && isArray(obj.data)) {
+      return fromArrayLike(that, obj.data)
+    }
+  }
+
+  throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
+}
+
+function checked (length) {
+  // Note: cannot use `length < kMaxLength()` here because that fails when
+  // length is NaN (which is otherwise coerced to zero.)
+  if (length >= kMaxLength()) {
+    throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
+                         'size: 0x' + kMaxLength().toString(16) + ' bytes')
+  }
+  return length | 0
+}
+
+function SlowBuffer (length) {
+  if (+length != length) { // eslint-disable-line eqeqeq
+    length = 0
+  }
+  return Buffer.alloc(+length)
+}
+
+Buffer.isBuffer = function isBuffer (b) {
+  return !!(b != null && b._isBuffer)
+}
+
+Buffer.compare = function compare (a, b) {
+  if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
+    throw new TypeError('Arguments must be Buffers')
+  }
+
+  if (a === b) return 0
+
+  var x = a.length
+  var y = b.length
+
+  for (var i = 0, len = Math.min(x, y); i < len; ++i) {
+    if (a[i] !== b[i]) {
+      x = a[i]
+      y = b[i]
+      break
+    }
+  }
+
+  if (x < y) return -1
+  if (y < x) return 1
+  return 0
+}
+
+Buffer.isEncoding = function isEncoding (encoding) {
+  switch (String(encoding).toLowerCase()) {
+    case 'hex':
+    case 'utf8':
+    case 'utf-8':
+    case 'ascii':
+    case 'latin1':
+    case 'binary':
+    case 'base64':
+    case 'ucs2':
+    case 'ucs-2':
+    case 'utf16le':
+    case 'utf-16le':
+      return true
+    default:
+      return false
+  }
+}
+
+Buffer.concat = function concat (list, length) {
+  if (!isArray(list)) {
+    throw new TypeError('"list" argument must be an Array of Buffers')
+  }
+
+  if (list.length === 0) {
+    return Buffer.alloc(0)
+  }
+
+  var i
+  if (length === undefined) {
+    length = 0
+    for (i = 0; i < list.length; ++i) {
+      length += list[i].length
+    }
+  }
+
+  var buffer = Buffer.allocUnsafe(length)
+  var pos = 0
+  for (i = 0; i < list.length; ++i) {
+    var buf = list[i]
+    if (!Buffer.isBuffer(buf)) {
+      throw new TypeError('"list" argument must be an Array of Buffers')
+    }
+    buf.copy(buffer, pos)
+    pos += buf.length
+  }
+  return buffer
+}
+
+function byteLength (string, encoding) {
+  if (Buffer.isBuffer(string)) {
+    return string.length
+  }
+  if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
+      (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
+    return string.byteLength
+  }
+  if (typeof string !== 'string') {
+    string = '' + string
+  }
+
+  var len = string.length
+  if (len === 0) return 0
+
+  // Use a for loop to avoid recursion
+  var loweredCase = false
+  for (;;) {
+    switch (encoding) {
+      case 'ascii':
+      case 'latin1':
+      case 'binary':
+        return len
+      case 'utf8':
+      case 'utf-8':
+      case undefined:
+        return utf8ToBytes(string).length
+      case 'ucs2':
+      case 'ucs-2':
+      case 'utf16le':
+      case 'utf-16le':
+        return len * 2
+      case 'hex':
+        return len >>> 1
+      case 'base64':
+        return base64ToBytes(string).length
+      default:
+        if (loweredCase) return utf8ToBytes(string).length // assume utf8
+        encoding = ('' + encoding).toLowerCase()
+        loweredCase = true
+    }
+  }
+}
+Buffer.byteLength = byteLength
+
+function slowToString (encoding, start, end) {
+  var loweredCase = false
+
+  // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
+  // property of a typed array.
+
+  // This behaves neither like String nor Uint8Array in that we set start/end
+  // to their upper/lower bounds if the value passed is out of range.
+  // undefined is handled specially as per ECMA-262 6th Edition,
+  // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
+  if (start === undefined || start < 0) {
+    start = 0
+  }
+  // Return early if start > this.length. Done here to prevent potential uint32
+  // coercion fail below.
+  if (start > this.length) {
+    return ''
+  }
+
+  if (end === undefined || end > this.length) {
+    end = this.length
+  }
+
+  if (end <= 0) {
+    return ''
+  }
+
+  // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
+  end >>>= 0
+  start >>>= 0
+
+  if (end <= start) {
+    return ''
+  }
+
+  if (!encoding) encoding = 'utf8'
+
+  while (true) {
+    switch (encoding) {
+      case 'hex':
+        return hexSlice(this, start, end)
+
+      case 'utf8':
+      case 'utf-8':
+        return utf8Slice(this, start, end)
+
+      case 'ascii':
+        return asciiSlice(this, start, end)
+
+      case 'latin1':
+      case 'binary':
+        return latin1Slice(this, start, end)
+
+      case 'base64':
+        return base64Slice(this, start, end)
+
+      case 'ucs2':
+      case 'ucs-2':
+      case 'utf16le':
+      case 'utf-16le':
+        return utf16leSlice(this, start, end)
+
+      default:
+        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
+        encoding = (encoding + '').toLowerCase()
+        loweredCase = true
+    }
+  }
+}
+
+// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
+// Buffer instances.
+Buffer.prototype._isBuffer = true
+
+function swap (b, n, m) {
+  var i = b[n]
+  b[n] = b[m]
+  b[m] = i
+}
+
+Buffer.prototype.swap16 = function swap16 () {
+  var len = this.length
+  if (len % 2 !== 0) {
+    throw new RangeError('Buffer size must be a multiple of 16-bits')
+  }
+  for (var i = 0; i < len; i += 2) {
+    swap(this, i, i + 1)
+  }
+  return this
+}
+
+Buffer.prototype.swap32 = function swap32 () {
+  var len = this.length
+  if (len % 4 !== 0) {
+    throw new RangeError('Buffer size must be a multiple of 32-bits')
+  }
+  for (var i = 0; i < len; i += 4) {
+    swap(this, i, i + 3)
+    swap(this, i + 1, i + 2)
+  }
+  return this
+}
+
+Buffer.prototype.swap64 = function swap64 () {
+  var len = this.length
+  if (len % 8 !== 0) {
+    throw new RangeError('Buffer size must be a multiple of 64-bits')
+  }
+  for (var i = 0; i < len; i += 8) {
+    swap(this, i, i + 7)
+    swap(this, i + 1, i + 6)
+    swap(this, i + 2, i + 5)
+    swap(this, i + 3, i + 4)
+  }
+  return this
+}
+
+Buffer.prototype.toString = function toString () {
+  var length = this.length | 0
+  if (length === 0) return ''
+  if (arguments.length === 0) return utf8Slice(this, 0, length)
+  return slowToString.apply(this, arguments)
+}
+
+Buffer.prototype.equals = function equals (b) {
+  if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
+  if (this === b) return true
+  return Buffer.compare(this, b) === 0
+}
+
+Buffer.prototype.inspect = function inspect () {
+  var str = ''
+  var max = exports.INSPECT_MAX_BYTES
+  if (this.length > 0) {
+    str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
+    if (this.length > max) str += ' ... '
+  }
+  return '<Buffer ' + str + '>'
+}
+
+Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
+  if (!Buffer.isBuffer(target)) {
+    throw new TypeError('Argument must be a Buffer')
+  }
+
+  if (start === undefined) {
+    start = 0
+  }
+  if (end === undefined) {
+    end = target ? target.length : 0
+  }
+  if (thisStart === undefined) {
+    thisStart = 0
+  }
+  if (thisEnd === undefined) {
+    thisEnd = this.length
+  }
+
+  if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
+    throw new RangeError('out of range index')
+  }
+
+  if (thisStart >= thisEnd && start >= end) {
+    return 0
+  }
+  if (thisStart >= thisEnd) {
+    return -1
+  }
+  if (start >= end) {
+    return 1
+  }
+
+  start >>>= 0
+  end >>>= 0
+  thisStart >>>= 0
+  thisEnd >>>= 0
+
+  if (this === target) return 0
+
+  var x = thisEnd - thisStart
+  var y = end - start
+  var len = Math.min(x, y)
+
+  var thisCopy = this.slice(thisStart, thisEnd)
+  var targetCopy = target.slice(start, end)
+
+  for (var i = 0; i < len; ++i) {
+    if (thisCopy[i] !== targetCopy[i]) {
+      x = thisCopy[i]
+      y = targetCopy[i]
+      break
+    }
+  }
+
+  if (x < y) return -1
+  if (y < x) return 1
+  return 0
+}
+
+// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
+// OR the last index of `val` in `buffer` at offset <= `byteOffset`.
+//
+// Arguments:
+// - buffer - a Buffer to search
+// - val - a string, Buffer, or number
+// - byteOffset - an index into `buffer`; will be clamped to an int32
+// - encoding - an optional encoding, relevant is val is a string
+// - dir - true for indexOf, false for lastIndexOf
+function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
+  // Empty buffer means no match
+  if (buffer.length === 0) return -1
+
+  // Normalize byteOffset
+  if (typeof byteOffset === 'string') {
+    encoding = byteOffset
+    byteOffset = 0
+  } else if (byteOffset > 0x7fffffff) {
+    byteOffset = 0x7fffffff
+  } else if (byteOffset < -0x80000000) {
+    byteOffset = -0x80000000
+  }
+  byteOffset = +byteOffset  // Coerce to Number.
+  if (isNaN(byteOffset)) {
+    // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
+    byteOffset = dir ? 0 : (buffer.length - 1)
+  }
+
+  // Normalize byteOffset: negative offsets start from the end of the buffer
+  if (byteOffset < 0) byteOffset = buffer.length + byteOffset
+  if (byteOffset >= buffer.length) {
+    if (dir) return -1
+    else byteOffset = buffer.length - 1
+  } else if (byteOffset < 0) {
+    if (dir) byteOffset = 0
+    else return -1
+  }
+
+  // Normalize val
+  if (typeof val === 'string') {
+    val = Buffer.from(val, encoding)
+  }
+
+  // Finally, search either indexOf (if dir is true) or lastIndexOf
+  if (Buffer.isBuffer(val)) {
+    // Special case: looking for empty string/buffer always fails
+    if (val.length === 0) {
+      return -1
+    }
+    return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
+  } else if (typeof val === 'number') {
+    val = val & 0xFF // Search for a byte value [0-255]
+    if (Buffer.TYPED_ARRAY_SUPPORT &&
+        typeof Uint8Array.prototype.indexOf === 'function') {
+      if (dir) {
+        return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
+      } else {
+        return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
+      }
+    }
+    return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
+  }
+
+  throw new TypeError('val must be string, number or Buffer')
+}
+
+function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
+  var indexSize = 1
+  var arrLength = arr.length
+  var valLength = val.length
+
+  if (encoding !== undefined) {
+    encoding = String(encoding).toLowerCase()
+    if (encoding === 'ucs2' || encoding === 'ucs-2' ||
+        encoding === 'utf16le' || encoding === 'utf-16le') {
+      if (arr.length < 2 || val.length < 2) {
+        return -1
+      }
+      indexSize = 2
+      arrLength /= 2
+      valLength /= 2
+      byteOffset /= 2
+    }
+  }
+
+  function read (buf, i) {
+    if (indexSize === 1) {
+      return buf[i]
+    } else {
+      return buf.readUInt16BE(i * indexSize)
+    }
+  }
+
+  var i
+  if (dir) {
+    var foundIndex = -1
+    for (i = byteOffset; i < arrLength; i++) {
+      if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
+        if (foundIndex === -1) foundIndex = i
+        if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
+      } else {
+        if (foundIndex !== -1) i -= i - foundIndex
+        foundIndex = -1
+      }
+    }
+  } else {
+    if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
+    for (i = byteOffset; i >= 0; i--) {
+      var found = true
+      for (var j = 0; j < valLength; j++) {
+        if (read(arr, i + j) !== read(val, j)) {
+          found = false
+          break
+        }
+      }
+      if (found) return i
+    }
+  }
+
+  return -1
+}
+
+Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
+  return this.indexOf(val, byteOffset, encoding) !== -1
+}
+
+Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
+  return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
+}
+
+Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
+  return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
+}
+
+function hexWrite (buf, string, offset, length) {
+  offset = Number(offset) || 0
+  var remaining = buf.length - offset
+  if (!length) {
+    length = remaining
+  } else {
+    length = Number(length)
+    if (length > remaining) {
+      length = remaining
+    }
+  }
+
+  // must be an even number of digits
+  var strLen = string.length
+  if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
+
+  if (length > strLen / 2) {
+    length = strLen / 2
+  }
+  for (var i = 0; i < length; ++i) {
+    var parsed = parseInt(string.substr(i * 2, 2), 16)
+    if (isNaN(parsed)) return i
+    buf[offset + i] = parsed
+  }
+  return i
+}
+
+function utf8Write (buf, string, offset, length) {
+  return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
+}
+
+function asciiWrite (buf, string, offset, length) {
+  return blitBuffer(asciiToBytes(string), buf, offset, length)
+}
+
+function latin1Write (buf, string, offset, length) {
+  return asciiWrite(buf, string, offset, length)
+}
+
+function base64Write (buf, string, offset, length) {
+  return blitBuffer(base64ToBytes(string), buf, offset, length)
+}
+
+function ucs2Write (buf, string, offset, length) {
+  return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
+}
+
+Buffer.prototype.write = function write (string, offset, length, encoding) {
+  // Buffer#write(string)
+  if (offset === undefined) {
+    encoding = 'utf8'
+    length = this.length
+    offset = 0
+  // Buffer#write(string, encoding)
+  } else if (length === undefined && typeof offset === 'string') {
+    encoding = offset
+    length = this.length
+    offset = 0
+  // Buffer#write(string, offset[, length][, encoding])
+  } else if (isFinite(offset)) {
+    offset = offset | 0
+    if (isFinite(length)) {
+      length = length | 0
+      if (encoding === undefined) encoding = 'utf8'
+    } else {
+      encoding = length
+      length = undefined
+    }
+  // legacy write(string, encoding, offset, length) - remove in v0.13
+  } else {
+    throw new Error(
+      'Buffer.write(string, encoding, offset[, length]) is no longer supported'
+    )
+  }
+
+  var remaining = this.length - offset
+  if (length === undefined || length > remaining) length = remaining
+
+  if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
+    throw new RangeError('Attempt to write outside buffer bounds')
+  }
+
+  if (!encoding) encoding = 'utf8'
+
+  var loweredCase = false
+  for (;;) {
+    switch (encoding) {
+      case 'hex':
+        return hexWrite(this, string, offset, length)
+
+      case 'utf8':
+      case 'utf-8':
+        return utf8Write(this, string, offset, length)
+
+      case 'ascii':
+        return asciiWrite(this, string, offset, length)
+
+      case 'latin1':
+      case 'binary':
+        return latin1Write(this, string, offset, length)
+
+      case 'base64':
+        // Warning: maxLength not taken into account in base64Write
+        return base64Write(this, string, offset, length)
+
+      case 'ucs2':
+      case 'ucs-2':
+      case 'utf16le':
+      case 'utf-16le':
+        return ucs2Write(this, string, offset, length)
+
+      default:
+        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
+        encoding = ('' + encoding).toLowerCase()
+        loweredCase = true
+    }
+  }
+}
+
+Buffer.prototype.toJSON = function toJSON () {
+  return {
+    type: 'Buffer',
+    data: Array.prototype.slice.call(this._arr || this, 0)
+  }
+}
+
+function base64Slice (buf, start, end) {
+  if (start === 0 && end === buf.length) {
+    return base64.fromByteArray(buf)
+  } else {
+    return base64.fromByteArray(buf.slice(start, end))
+  }
+}
+
+function utf8Slice (buf, start, end) {
+  end = Math.min(buf.length, end)
+  var res = []
+
+  var i = start
+  while (i < end) {
+    var firstByte = buf[i]
+    var codePoint = null
+    var bytesPerSequence = (firstByte > 0xEF) ? 4
+      : (firstByte > 0xDF) ? 3
+      : (firstByte > 0xBF) ? 2
+      : 1
+
+    if (i + bytesPerSequence <= end) {
+      var secondByte, thirdByte, fourthByte, tempCodePoint
+
+      switch (bytesPerSequence) {
+        case 1:
+          if (firstByte < 0x80) {
+            codePoint = firstByte
+          }
+          break
+        case 2:
+          secondByte = buf[i + 1]
+          if ((secondByte & 0xC0) === 0x80) {
+            tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
+            if (tempCodePoint > 0x7F) {
+              codePoint = tempCodePoint
+            }
+          }
+          break
+        case 3:
+          secondByte = buf[i + 1]
+          thirdByte = buf[i + 2]
+          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
+            tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
+            if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
+              codePoint = tempCodePoint
+            }
+          }
+          break
+        case 4:
+          secondByte = buf[i + 1]
+          thirdByte = buf[i + 2]
+          fourthByte = buf[i + 3]
+          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
+            tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
+            if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
+              codePoint = tempCodePoint
+            }
+          }
+      }
+    }
+
+    if (codePoint === null) {
+      // we did not generate a valid codePoint so insert a
+      // replacement char (U+FFFD) and advance only 1 byte
+      codePoint = 0xFFFD
+      bytesPerSequence = 1
+    } else if (codePoint > 0xFFFF) {
+      // encode to utf16 (surrogate pair dance)
+      codePoint -= 0x10000
+      res.push(codePoint >>> 10 & 0x3FF | 0xD800)
+      codePoint = 0xDC00 | codePoint & 0x3FF
+    }
+
+    res.push(codePoint)
+    i += bytesPerSequence
+  }
+
+  return decodeCodePointsArray(res)
+}
+
+// Based on http://stackoverflow.com/a/22747272/680742, the browser with
+// the lowest limit is Chrome, with 0x10000 args.
+// We go 1 magnitude less, for safety
+var MAX_ARGUMENTS_LENGTH = 0x1000
+
+function decodeCodePointsArray (codePoints) {
+  var len = codePoints.length
+  if (len <= MAX_ARGUMENTS_LENGTH) {
+    return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
+  }
+
+  // Decode in chunks to avoid "call stack size exceeded".
+  var res = ''
+  var i = 0
+  while (i < len) {
+    res += String.fromCharCode.apply(
+      String,
+      codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
+    )
+  }
+  return res
+}
+
+function asciiSlice (buf, start, end) {
+  var ret = ''
+  end = Math.min(buf.length, end)
+
+  for (var i = start; i < end; ++i) {
+    ret += String.fromCharCode(buf[i] & 0x7F)
+  }
+  return ret
+}
+
+function latin1Slice (buf, start, end) {
+  var ret = ''
+  end = Math.min(buf.length, end)
+
+  for (var i = start; i < end; ++i) {
+    ret += String.fromCharCode(buf[i])
+  }
+  return ret
+}
+
+function hexSlice (buf, start, end) {
+  var len = buf.length
+
+  if (!start || start < 0) start = 0
+  if (!end || end < 0 || end > len) end = len
+
+  var out = ''
+  for (var i = start; i < end; ++i) {
+    out += toHex(buf[i])
+  }
+  return out
+}
+
+function utf16leSlice (buf, start, end) {
+  var bytes = buf.slice(start, end)
+  var res = ''
+  for (var i = 0; i < bytes.length; i += 2) {
+    res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
+  }
+  return res
+}
+
+Buffer.prototype.slice = function slice (start, end) {
+  var len = this.length
+  start = ~~start
+  end = end === undefined ? len : ~~end
+
+  if (start < 0) {
+    start += len
+    if (start < 0) start = 0
+  } else if (start > len) {
+    start = len
+  }
+
+  if (end < 0) {
+    end += len
+    if (end < 0) end = 0
+  } else if (end > len) {
+    end = len
+  }
+
+  if (end < start) end = start
+
+  var newBuf
+  if (Buffer.TYPED_ARRAY_SUPPORT) {
+    newBuf = this.subarray(start, end)
+    newBuf.__proto__ = Buffer.prototype
+  } else {
+    var sliceLen = end - start
+    newBuf = new Buffer(sliceLen, undefined)
+    for (var i = 0; i < sliceLen; ++i) {
+      newBuf[i] = this[i + start]
+    }
+  }
+
+  return newBuf
+}
+
+/*
+ * Need to make sure that buffer isn't trying to write out of bounds.
+ */
+function checkOffset (offset, ext, length) {
+  if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
+  if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
+}
+
+Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
+  offset = offset | 0
+  byteLength = byteLength | 0
+  if (!noAssert) checkOffset(offset, byteLength, this.length)
+
+  var val = this[offset]
+  var mul = 1
+  var i = 0
+  while (++i < byteLength && (mul *= 0x100)) {
+    val += this[offset + i] * mul
+  }
+
+  return val
+}
+
+Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
+  offset = offset | 0
+  byteLength = byteLength | 0
+  if (!noAssert) {
+    checkOffset(offset, byteLength, this.length)
+  }
+
+  var val = this[offset + --byteLength]
+  var mul = 1
+  while (byteLength > 0 && (mul *= 0x100)) {
+    val += this[offset + --byteLength] * mul
+  }
+
+  return val
+}
+
+Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
+  if (!noAssert) checkOffset(offset, 1, this.length)
+  return this[offset]
+}
+
+Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
+  if (!noAssert) checkOffset(offset, 2, this.length)
+  return this[offset] | (this[offset + 1] << 8)
+}
+
+Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
+  if (!noAssert) checkOffset(offset, 2, this.length)
+  return (this[offset] << 8) | this[offset + 1]
+}
+
+Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
+  if (!noAssert) checkOffset(offset, 4, this.length)
+
+  return ((this[offset]) |
+      (this[offset + 1] << 8) |
+      (this[offset + 2] << 16)) +
+      (this[offset + 3] * 0x1000000)
+}
+
+Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
+  if (!noAssert) checkOffset(offset, 4, this.length)
+
+  return (this[offset] * 0x1000000) +
+    ((this[offset + 1] << 16) |
+    (this[offset + 2] << 8) |
+    this[offset + 3])
+}
+
+Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
+  offset = offset | 0
+  byteLength = byteLength | 0
+  if (!noAssert) checkOffset(offset, byteLength, this.length)
+
+  var val = this[offset]
+  var mul = 1
+  var i = 0
+  while (++i < byteLength && (mul *= 0x100)) {
+    val += this[offset + i] * mul
+  }
+  mul *= 0x80
+
+  if (val >= mul) val -= Math.pow(2, 8 * byteLength)
+
+  return val
+}
+
+Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
+  offset = offset | 0
+  byteLength = byteLength | 0
+  if (!noAssert) checkOffset(offset, byteLength, this.length)
+
+  var i = byteLength
+  var mul = 1
+  var val = this[offset + --i]
+  while (i > 0 && (mul *= 0x100)) {
+    val += this[offset + --i] * mul
+  }
+  mul *= 0x80
+
+  if (val >= mul) val -= Math.pow(2, 8 * byteLength)
+
+  return val
+}
+
+Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
+  if (!noAssert) checkOffset(offset, 1, this.length)
+  if (!(this[offset] & 0x80)) return (this[offset])
+  return ((0xff - this[offset] + 1) * -1)
+}
+
+Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
+  if (!noAssert) checkOffset(offset, 2, this.length)
+  var val = this[offset] | (this[offset + 1] << 8)
+  return (val & 0x8000) ? val | 0xFFFF0000 : val
+}
+
+Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
+  if (!noAssert) checkOffset(offset, 2, this.length)
+  var val = this[offset + 1] | (this[offset] << 8)
+  return (val & 0x8000) ? val | 0xFFFF0000 : val
+}
+
+Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
+  if (!noAssert) checkOffset(offset, 4, this.length)
+
+  return (this[offset]) |
+    (this[offset + 1] << 8) |
+    (this[offset + 2] << 16) |
+    (this[offset + 3] << 24)
+}
+
+Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
+  if (!noAssert) checkOffset(offset, 4, this.length)
+
+  return (this[offset] << 24) |
+    (this[offset + 1] << 16) |
+    (this[offset + 2] << 8) |
+    (this[offset + 3])
+}
+
+Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
+  if (!noAssert) checkOffset(offset, 4, this.length)
+  return ieee754.read(this, offset, true, 23, 4)
+}
+
+Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
+  if (!noAssert) checkOffset(offset, 4, this.length)
+  return ieee754.read(this, offset, false, 23, 4)
+}
+
+Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
+  if (!noAssert) checkOffset(offset, 8, this.length)
+  return ieee754.read(this, offset, true, 52, 8)
+}
+
+Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
+  if (!noAssert) checkOffset(offset, 8, this.length)
+  return ieee754.read(this, offset, false, 52, 8)
+}
+
+function checkInt (buf, value, offset, ext, max, min) {
+  if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
+  if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
+  if (offset + ext > buf.length) throw new RangeError('Index out of range')
+}
+
+Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
+  value = +value
+  offset = offset | 0
+  byteLength = byteLength | 0
+  if (!noAssert) {
+    var maxBytes = Math.pow(2, 8 * byteLength) - 1
+    checkInt(this, value, offset, byteLength, maxBytes, 0)
+  }
+
+  var mul = 1
+  var i = 0
+  this[offset] = value & 0xFF
+  while (++i < byteLength && (mul *= 0x100)) {
+    this[offset + i] = (value / mul) & 0xFF
+  }
+
+  return offset + byteLength
+}
+
+Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
+  value = +value
+  offset = offset | 0
+  byteLength = byteLength | 0
+  if (!noAssert) {
+    var maxBytes = Math.pow(2, 8 * byteLength) - 1
+    checkInt(this, value, offset, byteLength, maxBytes, 0)
+  }
+
+  var i = byteLength - 1
+  var mul = 1
+  this[offset + i] = value & 0xFF
+  while (--i >= 0 && (mul *= 0x100)) {
+    this[offset + i] = (value / mul) & 0xFF
+  }
+
+  return offset + byteLength
+}
+
+Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
+  value = +value
+  offset = offset | 0
+  if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
+  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
+  this[offset] = (value & 0xff)
+  return offset + 1
+}
+
+function objectWriteUInt16 (buf, value, offset, littleEndian) {
+  if (value < 0) value = 0xffff + value + 1
+  for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
+    buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
+      (littleEndian ? i : 1 - i) * 8
+  }
+}
+
+Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
+  value = +value
+  offset = offset | 0
+  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
+  if (Buffer.TYPED_ARRAY_SUPPORT) {
+    this[offset] = (value & 0xff)
+    this[offset + 1] = (value >>> 8)
+  } else {
+    objectWriteUInt16(this, value, offset, true)
+  }
+  return offset + 2
+}
+
+Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
+  value = +value
+  offset = offset | 0
+  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
+  if (Buffer.TYPED_ARRAY_SUPPORT) {
+    this[offset] = (value >>> 8)
+    this[offset + 1] = (value & 0xff)
+  } else {
+    objectWriteUInt16(this, value, offset, false)
+  }
+  return offset + 2
+}
+
+function objectWriteUInt32 (buf, value, offset, littleEndian) {
+  if (value < 0) value = 0xffffffff + value + 1
+  for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
+    buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
+  }
+}
+
+Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
+  value = +value
+  offset = offset | 0
+  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
+  if (Buffer.TYPED_ARRAY_SUPPORT) {
+    this[offset + 3] = (value >>> 24)
+    this[offset + 2] = (value >>> 16)
+    this[offset + 1] = (value >>> 8)
+    this[offset] = (value & 0xff)
+  } else {
+    objectWriteUInt32(this, value, offset, true)
+  }
+  return offset + 4
+}
+
+Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
+  value = +value
+  offset = offset | 0
+  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
+  if (Buffer.TYPED_ARRAY_SUPPORT) {
+    this[offset] = (value >>> 24)
+    this[offset + 1] = (value >>> 16)
+    this[offset + 2] = (value >>> 8)
+    this[offset + 3] = (value & 0xff)
+  } else {
+    objectWriteUInt32(this, value, offset, false)
+  }
+  return offset + 4
+}
+
+Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
+  value = +value
+  offset = offset | 0
+  if (!noAssert) {
+    var limit = Math.pow(2, 8 * byteLength - 1)
+
+    checkInt(this, value, offset, byteLength, limit - 1, -limit)
+  }
+
+  var i = 0
+  var mul = 1
+  var sub = 0
+  this[offset] = value & 0xFF
+  while (++i < byteLength && (mul *= 0x100)) {
+    if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
+      sub = 1
+    }
+    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
+  }
+
+  return offset + byteLength
+}
+
+Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
+  value = +value
+  offset = offset | 0
+  if (!noAssert) {
+    var limit = Math.pow(2, 8 * byteLength - 1)
+
+    checkInt(this, value, offset, byteLength, limit - 1, -limit)
+  }
+
+  var i = byteLength - 1
+  var mul = 1
+  var sub = 0
+  this[offset + i] = value & 0xFF
+  while (--i >= 0 && (mul *= 0x100)) {
+    if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
+      sub = 1
+    }
+    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
+  }
+
+  return offset + byteLength
+}
+
+Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
+  value = +value
+  offset = offset | 0
+  if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
+  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
+  if (value < 0) value = 0xff + value + 1
+  this[offset] = (value & 0xff)
+  return offset + 1
+}
+
+Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
+  value = +value
+  offset = offset | 0
+  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
+  if (Buffer.TYPED_ARRAY_SUPPORT) {
+    this[offset] = (value & 0xff)
+    this[offset + 1] = (value >>> 8)
+  } else {
+    objectWriteUInt16(this, value, offset, true)
+  }
+  return offset + 2
+}
+
+Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
+  value = +value
+  offset = offset | 0
+  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
+  if (Buffer.TYPED_ARRAY_SUPPORT) {
+    this[offset] = (value >>> 8)
+    this[offset + 1] = (value & 0xff)
+  } else {
+    objectWriteUInt16(this, value, offset, false)
+  }
+  return offset + 2
+}
+
+Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
+  value = +value
+  offset = offset | 0
+  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
+  if (Buffer.TYPED_ARRAY_SUPPORT) {
+    this[offset] = (value & 0xff)
+    this[offset + 1] = (value >>> 8)
+    this[offset + 2] = (value >>> 16)
+    this[offset + 3] = (value >>> 24)
+  } else {
+    objectWriteUInt32(this, value, offset, true)
+  }
+  return offset + 4
+}
+
+Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
+  value = +value
+  offset = offset | 0
+  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
+  if (value < 0) value = 0xffffffff + value + 1
+  if (Buffer.TYPED_ARRAY_SUPPORT) {
+    this[offset] = (value >>> 24)
+    this[offset + 1] = (value >>> 16)
+    this[offset + 2] = (value >>> 8)
+    this[offset + 3] = (value & 0xff)
+  } else {
+    objectWriteUInt32(this, value, offset, false)
+  }
+  return offset + 4
+}
+
+function checkIEEE754 (buf, value, offset, ext, max, min) {
+  if (offset + ext > buf.length) throw new RangeError('Index out of range')
+  if (offset < 0) throw new RangeError('Index out of range')
+}
+
+function writeFloat (buf, value, offset, littleEndian, noAssert) {
+  if (!noAssert) {
+    checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
+  }
+  ieee754.write(buf, value, offset, littleEndian, 23, 4)
+  return offset + 4
+}
+
+Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
+  return writeFloat(this, value, offset, true, noAssert)
+}
+
+Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
+  return writeFloat(this, value, offset, false, noAssert)
+}
+
+function writeDouble (buf, value, offset, littleEndian, noAssert) {
+  if (!noAssert) {
+    checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
+  }
+  ieee754.write(buf, value, offset, littleEndian, 52, 8)
+  return offset + 8
+}
+
+Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
+  return writeDouble(this, value, offset, true, noAssert)
+}
+
+Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
+  return writeDouble(this, value, offset, false, noAssert)
+}
+
+// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
+Buffer.prototype.copy = function copy (target, targetStart, start, end) {
+  if (!start) start = 0
+  if (!end && end !== 0) end = this.length
+  if (targetStart >= target.length) targetStart = target.length
+  if (!targetStart) targetStart = 0
+  if (end > 0 && end < start) end = start
+
+  // Copy 0 bytes; we're done
+  if (end === start) return 0
+  if (target.length === 0 || this.length === 0) return 0
+
+  // Fatal error conditions
+  if (targetStart < 0) {
+    throw new RangeError('targetStart out of bounds')
+  }
+  if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
+  if (end < 0) throw new RangeError('sourceEnd out of bounds')
+
+  // Are we oob?
+  if (end > this.length) end = this.length
+  if (target.length - targetStart < end - start) {
+    end = target.length - targetStart + start
+  }
+
+  var len = end - start
+  var i
+
+  if (this === target && start < targetStart && targetStart < end) {
+    // descending copy from end
+    for (i = len - 1; i >= 0; --i) {
+      target[i + targetStart] = this[i + start]
+    }
+  } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
+    // ascending copy from start
+    for (i = 0; i < len; ++i) {
+      target[i + targetStart] = this[i + start]
+    }
+  } else {
+    Uint8Array.prototype.set.call(
+      target,
+      this.subarray(start, start + len),
+      targetStart
+    )
+  }
+
+  return len
+}
+
+// Usage:
+//    buffer.fill(number[, offset[, end]])
+//    buffer.fill(buffer[, offset[, end]])
+//    buffer.fill(string[, offset[, end]][, encoding])
+Buffer.prototype.fill = function fill (val, start, end, encoding) {
+  // Handle string cases:
+  if (typeof val === 'string') {
+    if (typeof start === 'string') {
+      encoding = start
+      start = 0
+      end = this.length
+    } else if (typeof end === 'string') {
+      encoding = end
+      end = this.length
+    }
+    if (val.length === 1) {
+      var code = val.charCodeAt(0)
+      if (code < 256) {
+        val = code
+      }
+    }
+    if (encoding !== undefined && typeof encoding !== 'string') {
+      throw new TypeError('encoding must be a string')
+    }
+    if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
+      throw new TypeError('Unknown encoding: ' + encoding)
+    }
+  } else if (typeof val === 'number') {
+    val = val & 255
+  }
+
+  // Invalid ranges are not set to a default, so can range check early.
+  if (start < 0 || this.length < start || this.length < end) {
+    throw new RangeError('Out of range index')
+  }
+
+  if (end <= start) {
+    return this
+  }
+
+  start = start >>> 0
+  end = end === undefined ? this.length : end >>> 0
+
+  if (!val) val = 0
+
+  var i
+  if (typeof val === 'number') {
+    for (i = start; i < end; ++i) {
+      this[i] = val
+    }
+  } else {
+    var bytes = Buffer.isBuffer(val)
+      ? val
+      : utf8ToBytes(new Buffer(val, encoding).toString())
+    var len = bytes.length
+    for (i = 0; i < end - start; ++i) {
+      this[i + start] = bytes[i % len]
+    }
+  }
+
+  return this
+}
+
+// HELPER FUNCTIONS
+// ================
+
+var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
+
+function base64clean (str) {
+  // Node strips out invalid characters like \n and \t from the string, base64-js does not
+  str = stringtrim(str).replace(INVALID_BASE64_RE, '')
+  // Node converts strings with length < 2 to ''
+  if (str.length < 2) return ''
+  // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
+  while (str.length % 4 !== 0) {
+    str = str + '='
+  }
+  return str
+}
+
+function stringtrim (str) {
+  if (str.trim) return str.trim()
+  return str.replace(/^\s+|\s+$/g, '')
+}
+
+function toHex (n) {
+  if (n < 16) return '0' + n.toString(16)
+  return n.toString(16)
+}
+
+function utf8ToBytes (string, units) {
+  units = units || Infinity
+  var codePoint
+  var length = string.length
+  var leadSurrogate = null
+  var bytes = []
+
+  for (var i = 0; i < length; ++i) {
+    codePoint = string.charCodeAt(i)
+
+    // is surrogate component
+    if (codePoint > 0xD7FF && codePoint < 0xE000) {
+      // last char was a lead
+      if (!leadSurrogate) {
+        // no lead yet
+        if (codePoint > 0xDBFF) {
+          // unexpected trail
+          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
+          continue
+        } else if (i + 1 === length) {
+          // unpaired lead
+          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
+          continue
+        }
+
+        // valid lead
+        leadSurrogate = codePoint
+
+        continue
+      }
+
+      // 2 leads in a row
+      if (codePoint < 0xDC00) {
+        if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
+        leadSurrogate = codePoint
+        continue
+      }
+
+      // valid surrogate pair
+      codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
+    } else if (leadSurrogate) {
+      // valid bmp char, but last char was a lead
+      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
+    }
+
+    leadSurrogate = null
+
+    // encode utf8
+    if (codePoint < 0x80) {
+      if ((units -= 1) < 0) break
+      bytes.push(codePoint)
+    } else if (codePoint < 0x800) {
+      if ((units -= 2) < 0) break
+      bytes.push(
+        codePoint >> 0x6 | 0xC0,
+        codePoint & 0x3F | 0x80
+      )
+    } else if (codePoint < 0x10000) {
+      if ((units -= 3) < 0) break
+      bytes.push(
+        codePoint >> 0xC | 0xE0,
+        codePoint >> 0x6 & 0x3F | 0x80,
+        codePoint & 0x3F | 0x80
+      )
+    } else if (codePoint < 0x110000) {
+      if ((units -= 4) < 0) break
+      bytes.push(
+        codePoint >> 0x12 | 0xF0,
+        codePoint >> 0xC & 0x3F | 0x80,
+        codePoint >> 0x6 & 0x3F | 0x80,
+        codePoint & 0x3F | 0x80
+      )
+    } else {
+      throw new Error('Invalid code point')
+    }
+  }
+
+  return bytes
+}
+
+function asciiToBytes (str) {
+  var byteArray = []
+  for (var i = 0; i < str.length; ++i) {
+    // Node's code seems to be doing this and not & 0x7F..
+    byteArray.push(str.charCodeAt(i) & 0xFF)
+  }
+  return byteArray
+}
+
+function utf16leToBytes (str, units) {
+  var c, hi, lo
+  var byteArray = []
+  for (var i = 0; i < str.length; ++i) {
+    if ((units -= 2) < 0) break
+
+    c = str.charCodeAt(i)
+    hi = c >> 8
+    lo = c % 256
+    byteArray.push(lo)
+    byteArray.push(hi)
+  }
+
+  return byteArray
+}
+
+function base64ToBytes (str) {
+  return base64.toByteArray(base64clean(str))
+}
+
+function blitBuffer (src, dst, offset, length) {
+  for (var i = 0; i < length; ++i) {
+    if ((i + offset >= dst.length) || (i >= src.length)) break
+    dst[i + offset] = src[i]
+  }
+  return i
+}
+
+function isnan (val) {
+  return val !== val // eslint-disable-line no-self-compare
+}
+
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
+
+/***/ }),
+
+/***/ "./node_modules/webpack/node_modules/core-util-is/lib/util.js":
+/*!*******************************************************!*\
+  !*** (webpack)/node_modules/core-util-is/lib/util.js ***!
+  \*******************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* WEBPACK VAR INJECTION */(function(Buffer) {// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+// NOTE: These type checking functions intentionally don't use `instanceof`
+// because it is fragile and can be easily faked with `Object.create()`.
+
+function isArray(arg) {
+  if (Array.isArray) {
+    return Array.isArray(arg);
+  }
+  return objectToString(arg) === '[object Array]';
+}
+exports.isArray = isArray;
+
+function isBoolean(arg) {
+  return typeof arg === 'boolean';
+}
+exports.isBoolean = isBoolean;
+
+function isNull(arg) {
+  return arg === null;
+}
+exports.isNull = isNull;
+
+function isNullOrUndefined(arg) {
+  return arg == null;
+}
+exports.isNullOrUndefined = isNullOrUndefined;
+
+function isNumber(arg) {
+  return typeof arg === 'number';
+}
+exports.isNumber = isNumber;
+
+function isString(arg) {
+  return typeof arg === 'string';
+}
+exports.isString = isString;
+
+function isSymbol(arg) {
+  return typeof arg === 'symbol';
+}
+exports.isSymbol = isSymbol;
+
+function isUndefined(arg) {
+  return arg === void 0;
+}
+exports.isUndefined = isUndefined;
+
+function isRegExp(re) {
+  return objectToString(re) === '[object RegExp]';
+}
+exports.isRegExp = isRegExp;
+
+function isObject(arg) {
+  return typeof arg === 'object' && arg !== null;
+}
+exports.isObject = isObject;
+
+function isDate(d) {
+  return objectToString(d) === '[object Date]';
+}
+exports.isDate = isDate;
+
+function isError(e) {
+  return (objectToString(e) === '[object Error]' || e instanceof Error);
+}
+exports.isError = isError;
+
+function isFunction(arg) {
+  return typeof arg === 'function';
+}
+exports.isFunction = isFunction;
+
+function isPrimitive(arg) {
+  return arg === null ||
+         typeof arg === 'boolean' ||
+         typeof arg === 'number' ||
+         typeof arg === 'string' ||
+         typeof arg === 'symbol' ||  // ES6 symbol
+         typeof arg === 'undefined';
+}
+exports.isPrimitive = isPrimitive;
+
+exports.isBuffer = Buffer.isBuffer;
+
+function objectToString(o) {
+  return Object.prototype.toString.call(o);
+}
+
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ "./node_modules/webpack/node_modules/buffer/index.js").Buffer))
+
+/***/ }),
+
+/***/ "./node_modules/webpack/node_modules/events/events.js":
+/*!***********************************************!*\
+  !*** (webpack)/node_modules/events/events.js ***!
+  \***********************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+function EventEmitter() {
+  this._events = this._events || {};
+  this._maxListeners = this._maxListeners || undefined;
+}
+module.exports = EventEmitter;
+
+// Backwards-compat with node 0.10.x
+EventEmitter.EventEmitter = EventEmitter;
+
+EventEmitter.prototype._events = undefined;
+EventEmitter.prototype._maxListeners = undefined;
+
+// By default EventEmitters will print a warning if more than 10 listeners are
+// added to it. This is a useful default which helps finding memory leaks.
+EventEmitter.defaultMaxListeners = 10;
+
+// Obviously not all Emitters should be limited to 10. This function allows
+// that to be increased. Set to zero for unlimited.
+EventEmitter.prototype.setMaxListeners = function(n) {
+  if (!isNumber(n) || n < 0 || isNaN(n))
+    throw TypeError('n must be a positive number');
+  this._maxListeners = n;
+  return this;
+};
+
+EventEmitter.prototype.emit = function(type) {
+  var er, handler, len, args, i, listeners;
+
+  if (!this._events)
+    this._events = {};
+
+  // If there is no 'error' event listener then throw.
+  if (type === 'error') {
+    if (!this._events.error ||
+        (isObject(this._events.error) && !this._events.error.length)) {
+      er = arguments[1];
+      if (er instanceof Error) {
+        throw er; // Unhandled 'error' event
+      } else {
+        // At least give some kind of context to the user
+        var err = new Error('Uncaught, unspecified "error" event. (' + er + ')');
+        err.context = er;
+        throw err;
+      }
+    }
+  }
+
+  handler = this._events[type];
+
+  if (isUndefined(handler))
+    return false;
+
+  if (isFunction(handler)) {
+    switch (arguments.length) {
+      // fast cases
+      case 1:
+        handler.call(this);
+        break;
+      case 2:
+        handler.call(this, arguments[1]);
+        break;
+      case 3:
+        handler.call(this, arguments[1], arguments[2]);
+        break;
+      // slower
+      default:
+        args = Array.prototype.slice.call(arguments, 1);
+        handler.apply(this, args);
+    }
+  } else if (isObject(handler)) {
+    args = Array.prototype.slice.call(arguments, 1);
+    listeners = handler.slice();
+    len = listeners.length;
+    for (i = 0; i < len; i++)
+      listeners[i].apply(this, args);
+  }
+
+  return true;
+};
+
+EventEmitter.prototype.addListener = function(type, listener) {
+  var m;
+
+  if (!isFunction(listener))
+    throw TypeError('listener must be a function');
+
+  if (!this._events)
+    this._events = {};
+
+  // To avoid recursion in the case that type === "newListener"! Before
+  // adding it to the listeners, first emit "newListener".
+  if (this._events.newListener)
+    this.emit('newListener', type,
+              isFunction(listener.listener) ?
+              listener.listener : listener);
+
+  if (!this._events[type])
+    // Optimize the case of one listener. Don't need the extra array object.
+    this._events[type] = listener;
+  else if (isObject(this._events[type]))
+    // If we've already got an array, just append.
+    this._events[type].push(listener);
+  else
+    // Adding the second element, need to change to array.
+    this._events[type] = [this._events[type], listener];
+
+  // Check for listener leak
+  if (isObject(this._events[type]) && !this._events[type].warned) {
+    if (!isUndefined(this._maxListeners)) {
+      m = this._maxListeners;
+    } else {
+      m = EventEmitter.defaultMaxListeners;
+    }
+
+    if (m && m > 0 && this._events[type].length > m) {
+      this._events[type].warned = true;
+      console.error('(node) warning: possible EventEmitter memory ' +
+                    'leak detected. %d listeners added. ' +
+                    'Use emitter.setMaxListeners() to increase limit.',
+                    this._events[type].length);
+      if (typeof console.trace === 'function') {
+        // not supported in IE 10
+        console.trace();
+      }
+    }
+  }
+
+  return this;
+};
+
+EventEmitter.prototype.on = EventEmitter.prototype.addListener;
+
+EventEmitter.prototype.once = function(type, listener) {
+  if (!isFunction(listener))
+    throw TypeError('listener must be a function');
+
+  var fired = false;
+
+  function g() {
+    this.removeListener(type, g);
+
+    if (!fired) {
+      fired = true;
+      listener.apply(this, arguments);
+    }
+  }
+
+  g.listener = listener;
+  this.on(type, g);
+
+  return this;
+};
+
+// emits a 'removeListener' event iff the listener was removed
+EventEmitter.prototype.removeListener = function(type, listener) {
+  var list, position, length, i;
+
+  if (!isFunction(listener))
+    throw TypeError('listener must be a function');
+
+  if (!this._events || !this._events[type])
+    return this;
+
+  list = this._events[type];
+  length = list.length;
+  position = -1;
+
+  if (list === listener ||
+      (isFunction(list.listener) && list.listener === listener)) {
+    delete this._events[type];
+    if (this._events.removeListener)
+      this.emit('removeListener', type, listener);
+
+  } else if (isObject(list)) {
+    for (i = length; i-- > 0;) {
+      if (list[i] === listener ||
+          (list[i].listener && list[i].listener === listener)) {
+        position = i;
+        break;
+      }
+    }
+
+    if (position < 0)
+      return this;
+
+    if (list.length === 1) {
+      list.length = 0;
+      delete this._events[type];
+    } else {
+      list.splice(position, 1);
+    }
+
+    if (this._events.removeListener)
+      this.emit('removeListener', type, listener);
+  }
+
+  return this;
+};
+
+EventEmitter.prototype.removeAllListeners = function(type) {
+  var key, listeners;
+
+  if (!this._events)
+    return this;
+
+  // not listening for removeListener, no need to emit
+  if (!this._events.removeListener) {
+    if (arguments.length === 0)
+      this._events = {};
+    else if (this._events[type])
+      delete this._events[type];
+    return this;
+  }
+
+  // emit removeListener for all listeners on all events
+  if (arguments.length === 0) {
+    for (key in this._events) {
+      if (key === 'removeListener') continue;
+      this.removeAllListeners(key);
+    }
+    this.removeAllListeners('removeListener');
+    this._events = {};
+    return this;
+  }
+
+  listeners = this._events[type];
+
+  if (isFunction(listeners)) {
+    this.removeListener(type, listeners);
+  } else if (listeners) {
+    // LIFO order
+    while (listeners.length)
+      this.removeListener(type, listeners[listeners.length - 1]);
+  }
+  delete this._events[type];
+
+  return this;
+};
+
+EventEmitter.prototype.listeners = function(type) {
+  var ret;
+  if (!this._events || !this._events[type])
+    ret = [];
+  else if (isFunction(this._events[type]))
+    ret = [this._events[type]];
+  else
+    ret = this._events[type].slice();
+  return ret;
+};
+
+EventEmitter.prototype.listenerCount = function(type) {
+  if (this._events) {
+    var evlistener = this._events[type];
+
+    if (isFunction(evlistener))
+      return 1;
+    else if (evlistener)
+      return evlistener.length;
+  }
+  return 0;
+};
+
+EventEmitter.listenerCount = function(emitter, type) {
+  return emitter.listenerCount(type);
+};
+
+function isFunction(arg) {
+  return typeof arg === 'function';
+}
+
+function isNumber(arg) {
+  return typeof arg === 'number';
+}
+
+function isObject(arg) {
+  return typeof arg === 'object' && arg !== null;
+}
+
+function isUndefined(arg) {
+  return arg === void 0;
+}
+
+
+/***/ }),
+
+/***/ "./node_modules/webpack/node_modules/ieee754/index.js":
+/*!***********************************************!*\
+  !*** (webpack)/node_modules/ieee754/index.js ***!
+  \***********************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+exports.read = function (buffer, offset, isLE, mLen, nBytes) {
+  var e, m
+  var eLen = (nBytes * 8) - mLen - 1
+  var eMax = (1 << eLen) - 1
+  var eBias = eMax >> 1
+  var nBits = -7
+  var i = isLE ? (nBytes - 1) : 0
+  var d = isLE ? -1 : 1
+  var s = buffer[offset + i]
+
+  i += d
+
+  e = s & ((1 << (-nBits)) - 1)
+  s >>= (-nBits)
+  nBits += eLen
+  for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
+
+  m = e & ((1 << (-nBits)) - 1)
+  e >>= (-nBits)
+  nBits += mLen
+  for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
+
+  if (e === 0) {
+    e = 1 - eBias
+  } else if (e === eMax) {
+    return m ? NaN : ((s ? -1 : 1) * Infinity)
+  } else {
+    m = m + Math.pow(2, mLen)
+    e = e - eBias
+  }
+  return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
+}
+
+exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
+  var e, m, c
+  var eLen = (nBytes * 8) - mLen - 1
+  var eMax = (1 << eLen) - 1
+  var eBias = eMax >> 1
+  var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
+  var i = isLE ? 0 : (nBytes - 1)
+  var d = isLE ? 1 : -1
+  var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
+
+  value = Math.abs(value)
+
+  if (isNaN(value) || value === Infinity) {
+    m = isNaN(value) ? 1 : 0
+    e = eMax
+  } else {
+    e = Math.floor(Math.log(value) / Math.LN2)
+    if (value * (c = Math.pow(2, -e)) < 1) {
+      e--
+      c *= 2
+    }
+    if (e + eBias >= 1) {
+      value += rt / c
+    } else {
+      value += rt * Math.pow(2, 1 - eBias)
+    }
+    if (value * c >= 2) {
+      e++
+      c /= 2
+    }
+
+    if (e + eBias >= eMax) {
+      m = 0
+      e = eMax
+    } else if (e + eBias >= 1) {
+      m = ((value * c) - 1) * Math.pow(2, mLen)
+      e = e + eBias
+    } else {
+      m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
+      e = 0
+    }
+  }
+
+  for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
+
+  e = (e << mLen) | m
+  eLen += mLen
+  for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
+
+  buffer[offset + i - d] |= s * 128
+}
+
+
+/***/ }),
+
+/***/ "./node_modules/webpack/node_modules/inherits/inherits_browser.js":
+/*!***********************************************************!*\
+  !*** (webpack)/node_modules/inherits/inherits_browser.js ***!
+  \***********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+if (typeof Object.create === 'function') {
+  // implementation from standard node.js 'util' module
+  module.exports = function inherits(ctor, superCtor) {
+    ctor.super_ = superCtor
+    ctor.prototype = Object.create(superCtor.prototype, {
+      constructor: {
+        value: ctor,
+        enumerable: false,
+        writable: true,
+        configurable: true
+      }
+    });
+  };
+} else {
+  // old school shim for old browsers
+  module.exports = function inherits(ctor, superCtor) {
+    ctor.super_ = superCtor
+    var TempCtor = function () {}
+    TempCtor.prototype = superCtor.prototype
+    ctor.prototype = new TempCtor()
+    ctor.prototype.constructor = ctor
+  }
+}
+
+
+/***/ }),
+
+/***/ "./node_modules/webpack/node_modules/isarray/index.js":
+/*!***********************************************!*\
+  !*** (webpack)/node_modules/isarray/index.js ***!
+  \***********************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+var toString = {}.toString;
+
+module.exports = Array.isArray || function (arr) {
+  return toString.call(arr) == '[object Array]';
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/webpack/node_modules/process-nextick-args/index.js":
+/*!************************************************************!*\
+  !*** (webpack)/node_modules/process-nextick-args/index.js ***!
+  \************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(process) {
+
+if (!process.version ||
+    process.version.indexOf('v0.') === 0 ||
+    process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {
+  module.exports = { nextTick: nextTick };
+} else {
+  module.exports = process
+}
+
+function nextTick(fn, arg1, arg2, arg3) {
+  if (typeof fn !== 'function') {
+    throw new TypeError('"callback" argument must be a function');
+  }
+  var len = arguments.length;
+  var args, i;
+  switch (len) {
+  case 0:
+  case 1:
+    return process.nextTick(fn);
+  case 2:
+    return process.nextTick(function afterTickOne() {
+      fn.call(null, arg1);
+    });
+  case 3:
+    return process.nextTick(function afterTickTwo() {
+      fn.call(null, arg1, arg2);
+    });
+  case 4:
+    return process.nextTick(function afterTickThree() {
+      fn.call(null, arg1, arg2, arg3);
+    });
+  default:
+    args = new Array(len - 1);
+    i = 0;
+    while (i < args.length) {
+      args[i++] = arguments[i];
+    }
+    return process.nextTick(function afterTick() {
+      fn.apply(null, args);
+    });
+  }
+}
+
+
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../process/browser.js */ "./node_modules/webpack/node_modules/process/browser.js")))
+
+/***/ }),
+
+/***/ "./node_modules/webpack/node_modules/process/browser.js":
+/*!*************************************************!*\
+  !*** (webpack)/node_modules/process/browser.js ***!
+  \*************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+// shim for using process in browser
+var process = module.exports = {};
+
+// cached from whatever global is present so that test runners that stub it
+// don't break things.  But we need to wrap it in a try catch in case it is
+// wrapped in strict mode code which doesn't define any globals.  It's inside a
+// function because try/catches deoptimize in certain engines.
+
+var cachedSetTimeout;
+var cachedClearTimeout;
+
+function defaultSetTimout() {
+    throw new Error('setTimeout has not been defined');
+}
+function defaultClearTimeout () {
+    throw new Error('clearTimeout has not been defined');
+}
+(function () {
+    try {
+        if (typeof setTimeout === 'function') {
+            cachedSetTimeout = setTimeout;
+        } else {
+            cachedSetTimeout = defaultSetTimout;
+        }
+    } catch (e) {
+        cachedSetTimeout = defaultSetTimout;
+    }
+    try {
+        if (typeof clearTimeout === 'function') {
+            cachedClearTimeout = clearTimeout;
+        } else {
+            cachedClearTimeout = defaultClearTimeout;
+        }
+    } catch (e) {
+        cachedClearTimeout = defaultClearTimeout;
+    }
+} ())
+function runTimeout(fun) {
+    if (cachedSetTimeout === setTimeout) {
+        //normal enviroments in sane situations
+        return setTimeout(fun, 0);
+    }
+    // if setTimeout wasn't available but was latter defined
+    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
+        cachedSetTimeout = setTimeout;
+        return setTimeout(fun, 0);
+    }
+    try {
+        // when when somebody has screwed with setTimeout but no I.E. maddness
+        return cachedSetTimeout(fun, 0);
+    } catch(e){
+        try {
+            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
+            return cachedSetTimeout.call(null, fun, 0);
+        } catch(e){
+            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
+            return cachedSetTimeout.call(this, fun, 0);
+        }
+    }
+
+
+}
+function runClearTimeout(marker) {
+    if (cachedClearTimeout === clearTimeout) {
+        //normal enviroments in sane situations
+        return clearTimeout(marker);
+    }
+    // if clearTimeout wasn't available but was latter defined
+    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
+        cachedClearTimeout = clearTimeout;
+        return clearTimeout(marker);
+    }
+    try {
+        // when when somebody has screwed with setTimeout but no I.E. maddness
+        return cachedClearTimeout(marker);
+    } catch (e){
+        try {
+            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally
+            return cachedClearTimeout.call(null, marker);
+        } catch (e){
+            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
+            // Some versions of I.E. have different rules for clearTimeout vs setTimeout
+            return cachedClearTimeout.call(this, marker);
+        }
+    }
+
+
+
+}
+var queue = [];
+var draining = false;
+var currentQueue;
+var queueIndex = -1;
+
+function cleanUpNextTick() {
+    if (!draining || !currentQueue) {
+        return;
+    }
+    draining = false;
+    if (currentQueue.length) {
+        queue = currentQueue.concat(queue);
+    } else {
+        queueIndex = -1;
+    }
+    if (queue.length) {
+        drainQueue();
+    }
+}
+
+function drainQueue() {
+    if (draining) {
+        return;
+    }
+    var timeout = runTimeout(cleanUpNextTick);
+    draining = true;
+
+    var len = queue.length;
+    while(len) {
+        currentQueue = queue;
+        queue = [];
+        while (++queueIndex < len) {
+            if (currentQueue) {
+                currentQueue[queueIndex].run();
+            }
+        }
+        queueIndex = -1;
+        len = queue.length;
+    }
+    currentQueue = null;
+    draining = false;
+    runClearTimeout(timeout);
+}
+
+process.nextTick = function (fun) {
+    var args = new Array(arguments.length - 1);
+    if (arguments.length > 1) {
+        for (var i = 1; i < arguments.length; i++) {
+            args[i - 1] = arguments[i];
+        }
+    }
+    queue.push(new Item(fun, args));
+    if (queue.length === 1 && !draining) {
+        runTimeout(drainQueue);
+    }
+};
+
+// v8 likes predictible objects
+function Item(fun, array) {
+    this.fun = fun;
+    this.array = array;
+}
+Item.prototype.run = function () {
+    this.fun.apply(null, this.array);
+};
+process.title = 'browser';
+process.browser = true;
+process.env = {};
+process.argv = [];
+process.version = ''; // empty string to avoid regexp issues
+process.versions = {};
+
+function noop() {}
+
+process.on = noop;
+process.addListener = noop;
+process.once = noop;
+process.off = noop;
+process.removeListener = noop;
+process.removeAllListeners = noop;
+process.emit = noop;
+process.prependListener = noop;
+process.prependOnceListener = noop;
+
+process.listeners = function (name) { return [] }
+
+process.binding = function (name) {
+    throw new Error('process.binding is not supported');
+};
+
+process.cwd = function () { return '/' };
+process.chdir = function (dir) {
+    throw new Error('process.chdir is not supported');
+};
+process.umask = function() { return 0; };
+
+
+/***/ }),
+
+/***/ "./node_modules/webpack/node_modules/readable-stream/duplex-browser.js":
+/*!****************************************************************!*\
+  !*** (webpack)/node_modules/readable-stream/duplex-browser.js ***!
+  \****************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = __webpack_require__(/*! ./lib/_stream_duplex.js */ "./node_modules/webpack/node_modules/readable-stream/lib/_stream_duplex.js");
+
+
+/***/ }),
+
+/***/ "./node_modules/webpack/node_modules/readable-stream/lib/_stream_duplex.js":
+/*!********************************************************************!*\
+  !*** (webpack)/node_modules/readable-stream/lib/_stream_duplex.js ***!
+  \********************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+// a duplex stream is just a stream that is both readable and writable.
+// Since JS doesn't have multiple prototypal inheritance, this class
+// prototypally inherits from Readable, and then parasitically from
+// Writable.
+
+
+
+/*<replacement>*/
+
+var pna = __webpack_require__(/*! process-nextick-args */ "./node_modules/webpack/node_modules/process-nextick-args/index.js");
+/*</replacement>*/
+
+/*<replacement>*/
+var objectKeys = Object.keys || function (obj) {
+  var keys = [];
+  for (var key in obj) {
+    keys.push(key);
+  }return keys;
+};
+/*</replacement>*/
+
+module.exports = Duplex;
+
+/*<replacement>*/
+var util = __webpack_require__(/*! core-util-is */ "./node_modules/webpack/node_modules/core-util-is/lib/util.js");
+util.inherits = __webpack_require__(/*! inherits */ "./node_modules/webpack/node_modules/inherits/inherits_browser.js");
+/*</replacement>*/
+
+var Readable = __webpack_require__(/*! ./_stream_readable */ "./node_modules/webpack/node_modules/readable-stream/lib/_stream_readable.js");
+var Writable = __webpack_require__(/*! ./_stream_writable */ "./node_modules/webpack/node_modules/readable-stream/lib/_stream_writable.js");
+
+util.inherits(Duplex, Readable);
+
+{
+  // avoid scope creep, the keys array can then be collected
+  var keys = objectKeys(Writable.prototype);
+  for (var v = 0; v < keys.length; v++) {
+    var method = keys[v];
+    if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
+  }
+}
+
+function Duplex(options) {
+  if (!(this instanceof Duplex)) return new Duplex(options);
+
+  Readable.call(this, options);
+  Writable.call(this, options);
+
+  if (options && options.readable === false) this.readable = false;
+
+  if (options && options.writable === false) this.writable = false;
+
+  this.allowHalfOpen = true;
+  if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
+
+  this.once('end', onend);
+}
+
+Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
+  // making it explicit this property is not enumerable
+  // because otherwise some prototype manipulation in
+  // userland will fail
+  enumerable: false,
+  get: function () {
+    return this._writableState.highWaterMark;
+  }
+});
+
+// the no-half-open enforcer
+function onend() {
+  // if we allow half-open state, or if the writable side ended,
+  // then we're ok.
+  if (this.allowHalfOpen || this._writableState.ended) return;
+
+  // no more data can be written.
+  // But allow more writes to happen in this tick.
+  pna.nextTick(onEndNT, this);
+}
+
+function onEndNT(self) {
+  self.end();
+}
+
+Object.defineProperty(Duplex.prototype, 'destroyed', {
+  get: function () {
+    if (this._readableState === undefined || this._writableState === undefined) {
+      return false;
+    }
+    return this._readableState.destroyed && this._writableState.destroyed;
+  },
+  set: function (value) {
+    // we ignore the value if the stream
+    // has not been initialized yet
+    if (this._readableState === undefined || this._writableState === undefined) {
+      return;
+    }
+
+    // backward compatibility, the user is explicitly
+    // managing destroyed
+    this._readableState.destroyed = value;
+    this._writableState.destroyed = value;
+  }
+});
+
+Duplex.prototype._destroy = function (err, cb) {
+  this.push(null);
+  this.end();
+
+  pna.nextTick(cb, err);
+};
+
+/***/ }),
+
+/***/ "./node_modules/webpack/node_modules/readable-stream/lib/_stream_passthrough.js":
+/*!*************************************************************************!*\
+  !*** (webpack)/node_modules/readable-stream/lib/_stream_passthrough.js ***!
+  \*************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+// a passthrough stream.
+// basically just the most minimal sort of Transform stream.
+// Every written chunk gets output as-is.
+
+
+
+module.exports = PassThrough;
+
+var Transform = __webpack_require__(/*! ./_stream_transform */ "./node_modules/webpack/node_modules/readable-stream/lib/_stream_transform.js");
+
+/*<replacement>*/
+var util = __webpack_require__(/*! core-util-is */ "./node_modules/webpack/node_modules/core-util-is/lib/util.js");
+util.inherits = __webpack_require__(/*! inherits */ "./node_modules/webpack/node_modules/inherits/inherits_browser.js");
+/*</replacement>*/
+
+util.inherits(PassThrough, Transform);
+
+function PassThrough(options) {
+  if (!(this instanceof PassThrough)) return new PassThrough(options);
+
+  Transform.call(this, options);
+}
+
+PassThrough.prototype._transform = function (chunk, encoding, cb) {
+  cb(null, chunk);
+};
+
+/***/ }),
+
+/***/ "./node_modules/webpack/node_modules/readable-stream/lib/_stream_readable.js":
+/*!**********************************************************************!*\
+  !*** (webpack)/node_modules/readable-stream/lib/_stream_readable.js ***!
+  \**********************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+
+/*<replacement>*/
+
+var pna = __webpack_require__(/*! process-nextick-args */ "./node_modules/webpack/node_modules/process-nextick-args/index.js");
+/*</replacement>*/
+
+module.exports = Readable;
+
+/*<replacement>*/
+var isArray = __webpack_require__(/*! isarray */ "./node_modules/webpack/node_modules/isarray/index.js");
+/*</replacement>*/
+
+/*<replacement>*/
+var Duplex;
+/*</replacement>*/
+
+Readable.ReadableState = ReadableState;
+
+/*<replacement>*/
+var EE = __webpack_require__(/*! events */ "./node_modules/webpack/node_modules/events/events.js").EventEmitter;
+
+var EElistenerCount = function (emitter, type) {
+  return emitter.listeners(type).length;
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream = __webpack_require__(/*! ./internal/streams/stream */ "./node_modules/webpack/node_modules/readable-stream/lib/internal/streams/stream-browser.js");
+/*</replacement>*/
+
+/*<replacement>*/
+
+var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/webpack/node_modules/safe-buffer/index.js").Buffer;
+var OurUint8Array = global.Uint8Array || function () {};
+function _uint8ArrayToBuffer(chunk) {
+  return Buffer.from(chunk);
+}
+function _isUint8Array(obj) {
+  return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+
+/*</replacement>*/
+
+/*<replacement>*/
+var util = __webpack_require__(/*! core-util-is */ "./node_modules/webpack/node_modules/core-util-is/lib/util.js");
+util.inherits = __webpack_require__(/*! inherits */ "./node_modules/webpack/node_modules/inherits/inherits_browser.js");
+/*</replacement>*/
+
+/*<replacement>*/
+var debugUtil = __webpack_require__(/*! util */ 0);
+var debug = void 0;
+if (debugUtil && debugUtil.debuglog) {
+  debug = debugUtil.debuglog('stream');
+} else {
+  debug = function () {};
+}
+/*</replacement>*/
+
+var BufferList = __webpack_require__(/*! ./internal/streams/BufferList */ "./node_modules/webpack/node_modules/readable-stream/lib/internal/streams/BufferList.js");
+var destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ "./node_modules/webpack/node_modules/readable-stream/lib/internal/streams/destroy.js");
+var StringDecoder;
+
+util.inherits(Readable, Stream);
+
+var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
+
+function prependListener(emitter, event, fn) {
+  // Sadly this is not cacheable as some libraries bundle their own
+  // event emitter implementation with them.
+  if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);
+
+  // This is a hack to make sure that our error handler is attached before any
+  // userland ones.  NEVER DO THIS. This is here only because this code needs
+  // to continue to work with older versions of Node.js that do not include
+  // the prependListener() method. The goal is to eventually remove this hack.
+  if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
+}
+
+function ReadableState(options, stream) {
+  Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ "./node_modules/webpack/node_modules/readable-stream/lib/_stream_duplex.js");
+
+  options = options || {};
+
+  // Duplex streams are both readable and writable, but share
+  // the same options object.
+  // However, some cases require setting options to different
+  // values for the readable and the writable sides of the duplex stream.
+  // These options can be provided separately as readableXXX and writableXXX.
+  var isDuplex = stream instanceof Duplex;
+
+  // object stream flag. Used to make read(n) ignore n and to
+  // make all the buffer merging and length checks go away
+  this.objectMode = !!options.objectMode;
+
+  if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
+
+  // the point at which it stops calling _read() to fill the buffer
+  // Note: 0 is a valid value, means "don't call _read preemptively ever"
+  var hwm = options.highWaterMark;
+  var readableHwm = options.readableHighWaterMark;
+  var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+
+  if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;
+
+  // cast to ints.
+  this.highWaterMark = Math.floor(this.highWaterMark);
+
+  // A linked list is used to store data chunks instead of an array because the
+  // linked list can remove elements from the beginning faster than
+  // array.shift()
+  this.buffer = new BufferList();
+  this.length = 0;
+  this.pipes = null;
+  this.pipesCount = 0;
+  this.flowing = null;
+  this.ended = false;
+  this.endEmitted = false;
+  this.reading = false;
+
+  // a flag to be able to tell if the event 'readable'/'data' is emitted
+  // immediately, or on a later tick.  We set this to true at first, because
+  // any actions that shouldn't happen until "later" should generally also
+  // not happen before the first read call.
+  this.sync = true;
+
+  // whenever we return null, then we set a flag to say
+  // that we're awaiting a 'readable' event emission.
+  this.needReadable = false;
+  this.emittedReadable = false;
+  this.readableListening = false;
+  this.resumeScheduled = false;
+
+  // has it been destroyed
+  this.destroyed = false;
+
+  // Crypto is kind of old and crusty.  Historically, its default string
+  // encoding is 'binary' so we have to make this configurable.
+  // Everything else in the universe uses 'utf8', though.
+  this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+  // the number of writers that are awaiting a drain event in .pipe()s
+  this.awaitDrain = 0;
+
+  // if true, a maybeReadMore has been scheduled
+  this.readingMore = false;
+
+  this.decoder = null;
+  this.encoding = null;
+  if (options.encoding) {
+    if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ "./node_modules/webpack/node_modules/string_decoder/lib/string_decoder.js").StringDecoder;
+    this.decoder = new StringDecoder(options.encoding);
+    this.encoding = options.encoding;
+  }
+}
+
+function Readable(options) {
+  Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ "./node_modules/webpack/node_modules/readable-stream/lib/_stream_duplex.js");
+
+  if (!(this instanceof Readable)) return new Readable(options);
+
+  this._readableState = new ReadableState(options, this);
+
+  // legacy
+  this.readable = true;
+
+  if (options) {
+    if (typeof options.read === 'function') this._read = options.read;
+
+    if (typeof options.destroy === 'function') this._destroy = options.destroy;
+  }
+
+  Stream.call(this);
+}
+
+Object.defineProperty(Readable.prototype, 'destroyed', {
+  get: function () {
+    if (this._readableState === undefined) {
+      return false;
+    }
+    return this._readableState.destroyed;
+  },
+  set: function (value) {
+    // we ignore the value if the stream
+    // has not been initialized yet
+    if (!this._readableState) {
+      return;
+    }
+
+    // backward compatibility, the user is explicitly
+    // managing destroyed
+    this._readableState.destroyed = value;
+  }
+});
+
+Readable.prototype.destroy = destroyImpl.destroy;
+Readable.prototype._undestroy = destroyImpl.undestroy;
+Readable.prototype._destroy = function (err, cb) {
+  this.push(null);
+  cb(err);
+};
+
+// Manually shove something into the read() buffer.
+// This returns true if the highWaterMark has not been hit yet,
+// similar to how Writable.write() returns true if you should
+// write() some more.
+Readable.prototype.push = function (chunk, encoding) {
+  var state = this._readableState;
+  var skipChunkCheck;
+
+  if (!state.objectMode) {
+    if (typeof chunk === 'string') {
+      encoding = encoding || state.defaultEncoding;
+      if (encoding !== state.encoding) {
+        chunk = Buffer.from(chunk, encoding);
+        encoding = '';
+      }
+      skipChunkCheck = true;
+    }
+  } else {
+    skipChunkCheck = true;
+  }
+
+  return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
+};
+
+// Unshift should *always* be something directly out of read()
+Readable.prototype.unshift = function (chunk) {
+  return readableAddChunk(this, chunk, null, true, false);
+};
+
+function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
+  var state = stream._readableState;
+  if (chunk === null) {
+    state.reading = false;
+    onEofChunk(stream, state);
+  } else {
+    var er;
+    if (!skipChunkCheck) er = chunkInvalid(state, chunk);
+    if (er) {
+      stream.emit('error', er);
+    } else if (state.objectMode || chunk && chunk.length > 0) {
+      if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
+        chunk = _uint8ArrayToBuffer(chunk);
+      }
+
+      if (addToFront) {
+        if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
+      } else if (state.ended) {
+        stream.emit('error', new Error('stream.push() after EOF'));
+      } else {
+        state.reading = false;
+        if (state.decoder && !encoding) {
+          chunk = state.decoder.write(chunk);
+          if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
+        } else {
+          addChunk(stream, state, chunk, false);
+        }
+      }
+    } else if (!addToFront) {
+      state.reading = false;
+    }
+  }
+
+  return needMoreData(state);
+}
+
+function addChunk(stream, state, chunk, addToFront) {
+  if (state.flowing && state.length === 0 && !state.sync) {
+    stream.emit('data', chunk);
+    stream.read(0);
+  } else {
+    // update the buffer info.
+    state.length += state.objectMode ? 1 : chunk.length;
+    if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
+
+    if (state.needReadable) emitReadable(stream);
+  }
+  maybeReadMore(stream, state);
+}
+
+function chunkInvalid(state, chunk) {
+  var er;
+  if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+    er = new TypeError('Invalid non-string/buffer chunk');
+  }
+  return er;
+}
+
+// if it's past the high water mark, we can push in some more.
+// Also, if we have no data yet, we can stand some
+// more bytes.  This is to work around cases where hwm=0,
+// such as the repl.  Also, if the push() triggered a
+// readable event, and the user called read(largeNumber) such that
+// needReadable was set, then we ought to push more, so that another
+// 'readable' event will be triggered.
+function needMoreData(state) {
+  return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
+}
+
+Readable.prototype.isPaused = function () {
+  return this._readableState.flowing === false;
+};
+
+// backwards compatibility.
+Readable.prototype.setEncoding = function (enc) {
+  if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ "./node_modules/webpack/node_modules/string_decoder/lib/string_decoder.js").StringDecoder;
+  this._readableState.decoder = new StringDecoder(enc);
+  this._readableState.encoding = enc;
+  return this;
+};
+
+// Don't raise the hwm > 8MB
+var MAX_HWM = 0x800000;
+function computeNewHighWaterMark(n) {
+  if (n >= MAX_HWM) {
+    n = MAX_HWM;
+  } else {
+    // Get the next highest power of 2 to prevent increasing hwm excessively in
+    // tiny amounts
+    n--;
+    n |= n >>> 1;
+    n |= n >>> 2;
+    n |= n >>> 4;
+    n |= n >>> 8;
+    n |= n >>> 16;
+    n++;
+  }
+  return n;
+}
+
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function howMuchToRead(n, state) {
+  if (n <= 0 || state.length === 0 && state.ended) return 0;
+  if (state.objectMode) return 1;
+  if (n !== n) {
+    // Only flow one buffer at a time
+    if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
+  }
+  // If we're asking for more than the current hwm, then raise the hwm.
+  if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
+  if (n <= state.length) return n;
+  // Don't have enough
+  if (!state.ended) {
+    state.needReadable = true;
+    return 0;
+  }
+  return state.length;
+}
+
+// you can override either this method, or the async _read(n) below.
+Readable.prototype.read = function (n) {
+  debug('read', n);
+  n = parseInt(n, 10);
+  var state = this._readableState;
+  var nOrig = n;
+
+  if (n !== 0) state.emittedReadable = false;
+
+  // if we're doing read(0) to trigger a readable event, but we
+  // already have a bunch of data in the buffer, then just trigger
+  // the 'readable' event and move on.
+  if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
+    debug('read: emitReadable', state.length, state.ended);
+    if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
+    return null;
+  }
+
+  n = howMuchToRead(n, state);
+
+  // if we've ended, and we're now clear, then finish it up.
+  if (n === 0 && state.ended) {
+    if (state.length === 0) endReadable(this);
+    return null;
+  }
+
+  // All the actual chunk generation logic needs to be
+  // *below* the call to _read.  The reason is that in certain
+  // synthetic stream cases, such as passthrough streams, _read
+  // may be a completely synchronous operation which may change
+  // the state of the read buffer, providing enough data when
+  // before there was *not* enough.
+  //
+  // So, the steps are:
+  // 1. Figure out what the state of things will be after we do
+  // a read from the buffer.
+  //
+  // 2. If that resulting state will trigger a _read, then call _read.
+  // Note that this may be asynchronous, or synchronous.  Yes, it is
+  // deeply ugly to write APIs this way, but that still doesn't mean
+  // that the Readable class should behave improperly, as streams are
+  // designed to be sync/async agnostic.
+  // Take note if the _read call is sync or async (ie, if the read call
+  // has returned yet), so that we know whether or not it's safe to emit
+  // 'readable' etc.
+  //
+  // 3. Actually pull the requested chunks out of the buffer and return.
+
+  // if we need a readable event, then we need to do some reading.
+  var doRead = state.needReadable;
+  debug('need readable', doRead);
+
+  // if we currently have less than the highWaterMark, then also read some
+  if (state.length === 0 || state.length - n < state.highWaterMark) {
+    doRead = true;
+    debug('length less than watermark', doRead);
+  }
+
+  // however, if we've ended, then there's no point, and if we're already
+  // reading, then it's unnecessary.
+  if (state.ended || state.reading) {
+    doRead = false;
+    debug('reading or ended', doRead);
+  } else if (doRead) {
+    debug('do read');
+    state.reading = true;
+    state.sync = true;
+    // if the length is currently zero, then we *need* a readable event.
+    if (state.length === 0) state.needReadable = true;
+    // call internal read method
+    this._read(state.highWaterMark);
+    state.sync = false;
+    // If _read pushed data synchronously, then `reading` will be false,
+    // and we need to re-evaluate how much data we can return to the user.
+    if (!state.reading) n = howMuchToRead(nOrig, state);
+  }
+
+  var ret;
+  if (n > 0) ret = fromList(n, state);else ret = null;
+
+  if (ret === null) {
+    state.needReadable = true;
+    n = 0;
+  } else {
+    state.length -= n;
+  }
+
+  if (state.length === 0) {
+    // If we have nothing in the buffer, then we want to know
+    // as soon as we *do* get something into the buffer.
+    if (!state.ended) state.needReadable = true;
+
+    // If we tried to read() past the EOF, then emit end on the next tick.
+    if (nOrig !== n && state.ended) endReadable(this);
+  }
+
+  if (ret !== null) this.emit('data', ret);
+
+  return ret;
+};
+
+function onEofChunk(stream, state) {
+  if (state.ended) return;
+  if (state.decoder) {
+    var chunk = state.decoder.end();
+    if (chunk && chunk.length) {
+      state.buffer.push(chunk);
+      state.length += state.objectMode ? 1 : chunk.length;
+    }
+  }
+  state.ended = true;
+
+  // emit 'readable' now to make sure it gets picked up.
+  emitReadable(stream);
+}
+
+// Don't emit readable right away in sync mode, because this can trigger
+// another read() call => stack overflow.  This way, it might trigger
+// a nextTick recursion warning, but that's not so bad.
+function emitReadable(stream) {
+  var state = stream._readableState;
+  state.needReadable = false;
+  if (!state.emittedReadable) {
+    debug('emitReadable', state.flowing);
+    state.emittedReadable = true;
+    if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
+  }
+}
+
+function emitReadable_(stream) {
+  debug('emit readable');
+  stream.emit('readable');
+  flow(stream);
+}
+
+// at this point, the user has presumably seen the 'readable' event,
+// and called read() to consume some data.  that may have triggered
+// in turn another _read(n) call, in which case reading = true if
+// it's in progress.
+// However, if we're not ended, or reading, and the length < hwm,
+// then go ahead and try to read some more preemptively.
+function maybeReadMore(stream, state) {
+  if (!state.readingMore) {
+    state.readingMore = true;
+    pna.nextTick(maybeReadMore_, stream, state);
+  }
+}
+
+function maybeReadMore_(stream, state) {
+  var len = state.length;
+  while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
+    debug('maybeReadMore read 0');
+    stream.read(0);
+    if (len === state.length)
+      // didn't get any data, stop spinning.
+      break;else len = state.length;
+  }
+  state.readingMore = false;
+}
+
+// abstract method.  to be overridden in specific implementation classes.
+// call cb(er, data) where data is <= n in length.
+// for virtual (non-string, non-buffer) streams, "length" is somewhat
+// arbitrary, and perhaps not very meaningful.
+Readable.prototype._read = function (n) {
+  this.emit('error', new Error('_read() is not implemented'));
+};
+
+Readable.prototype.pipe = function (dest, pipeOpts) {
+  var src = this;
+  var state = this._readableState;
+
+  switch (state.pipesCount) {
+    case 0:
+      state.pipes = dest;
+      break;
+    case 1:
+      state.pipes = [state.pipes, dest];
+      break;
+    default:
+      state.pipes.push(dest);
+      break;
+  }
+  state.pipesCount += 1;
+  debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
+
+  var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
+
+  var endFn = doEnd ? onend : unpipe;
+  if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);
+
+  dest.on('unpipe', onunpipe);
+  function onunpipe(readable, unpipeInfo) {
+    debug('onunpipe');
+    if (readable === src) {
+      if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
+        unpipeInfo.hasUnpiped = true;
+        cleanup();
+      }
+    }
+  }
+
+  function onend() {
+    debug('onend');
+    dest.end();
+  }
+
+  // when the dest drains, it reduces the awaitDrain counter
+  // on the source.  This would be more elegant with a .once()
+  // handler in flow(), but adding and removing repeatedly is
+  // too slow.
+  var ondrain = pipeOnDrain(src);
+  dest.on('drain', ondrain);
+
+  var cleanedUp = false;
+  function cleanup() {
+    debug('cleanup');
+    // cleanup event handlers once the pipe is broken
+    dest.removeListener('close', onclose);
+    dest.removeListener('finish', onfinish);
+    dest.removeListener('drain', ondrain);
+    dest.removeListener('error', onerror);
+    dest.removeListener('unpipe', onunpipe);
+    src.removeListener('end', onend);
+    src.removeListener('end', unpipe);
+    src.removeListener('data', ondata);
+
+    cleanedUp = true;
+
+    // if the reader is waiting for a drain event from this
+    // specific writer, then it would cause it to never start
+    // flowing again.
+    // So, if this is awaiting a drain, then we just call it now.
+    // If we don't know, then assume that we are waiting for one.
+    if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
+  }
+
+  // If the user pushes more data while we're writing to dest then we'll end up
+  // in ondata again. However, we only want to increase awaitDrain once because
+  // dest will only emit one 'drain' event for the multiple writes.
+  // => Introduce a guard on increasing awaitDrain.
+  var increasedAwaitDrain = false;
+  src.on('data', ondata);
+  function ondata(chunk) {
+    debug('ondata');
+    increasedAwaitDrain = false;
+    var ret = dest.write(chunk);
+    if (false === ret && !increasedAwaitDrain) {
+      // If the user unpiped during `dest.write()`, it is possible
+      // to get stuck in a permanently paused state if that write
+      // also returned false.
+      // => Check whether `dest` is still a piping destination.
+      if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
+        debug('false write response, pause', src._readableState.awaitDrain);
+        src._readableState.awaitDrain++;
+        increasedAwaitDrain = true;
+      }
+      src.pause();
+    }
+  }
+
+  // if the dest has an error, then stop piping into it.
+  // however, don't suppress the throwing behavior for this.
+  function onerror(er) {
+    debug('onerror', er);
+    unpipe();
+    dest.removeListener('error', onerror);
+    if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
+  }
+
+  // Make sure our error handler is attached before userland ones.
+  prependListener(dest, 'error', onerror);
+
+  // Both close and finish should trigger unpipe, but only once.
+  function onclose() {
+    dest.removeListener('finish', onfinish);
+    unpipe();
+  }
+  dest.once('close', onclose);
+  function onfinish() {
+    debug('onfinish');
+    dest.removeListener('close', onclose);
+    unpipe();
+  }
+  dest.once('finish', onfinish);
+
+  function unpipe() {
+    debug('unpipe');
+    src.unpipe(dest);
+  }
+
+  // tell the dest that it's being piped to
+  dest.emit('pipe', src);
+
+  // start the flow if it hasn't been started already.
+  if (!state.flowing) {
+    debug('pipe resume');
+    src.resume();
+  }
+
+  return dest;
+};
+
+function pipeOnDrain(src) {
+  return function () {
+    var state = src._readableState;
+    debug('pipeOnDrain', state.awaitDrain);
+    if (state.awaitDrain) state.awaitDrain--;
+    if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
+      state.flowing = true;
+      flow(src);
+    }
+  };
+}
+
+Readable.prototype.unpipe = function (dest) {
+  var state = this._readableState;
+  var unpipeInfo = { hasUnpiped: false };
+
+  // if we're not piping anywhere, then do nothing.
+  if (state.pipesCount === 0) return this;
+
+  // just one destination.  most common case.
+  if (state.pipesCount === 1) {
+    // passed in one, but it's not the right one.
+    if (dest && dest !== state.pipes) return this;
+
+    if (!dest) dest = state.pipes;
+
+    // got a match.
+    state.pipes = null;
+    state.pipesCount = 0;
+    state.flowing = false;
+    if (dest) dest.emit('unpipe', this, unpipeInfo);
+    return this;
+  }
+
+  // slow case. multiple pipe destinations.
+
+  if (!dest) {
+    // remove all.
+    var dests = state.pipes;
+    var len = state.pipesCount;
+    state.pipes = null;
+    state.pipesCount = 0;
+    state.flowing = false;
+
+    for (var i = 0; i < len; i++) {
+      dests[i].emit('unpipe', this, unpipeInfo);
+    }return this;
+  }
+
+  // try to find the right one.
+  var index = indexOf(state.pipes, dest);
+  if (index === -1) return this;
+
+  state.pipes.splice(index, 1);
+  state.pipesCount -= 1;
+  if (state.pipesCount === 1) state.pipes = state.pipes[0];
+
+  dest.emit('unpipe', this, unpipeInfo);
+
+  return this;
+};
+
+// set up data events if they are asked for
+// Ensure readable listeners eventually get something
+Readable.prototype.on = function (ev, fn) {
+  var res = Stream.prototype.on.call(this, ev, fn);
+
+  if (ev === 'data') {
+    // Start flowing on next tick if stream isn't explicitly paused
+    if (this._readableState.flowing !== false) this.resume();
+  } else if (ev === 'readable') {
+    var state = this._readableState;
+    if (!state.endEmitted && !state.readableListening) {
+      state.readableListening = state.needReadable = true;
+      state.emittedReadable = false;
+      if (!state.reading) {
+        pna.nextTick(nReadingNextTick, this);
+      } else if (state.length) {
+        emitReadable(this);
+      }
+    }
+  }
+
+  return res;
+};
+Readable.prototype.addListener = Readable.prototype.on;
+
+function nReadingNextTick(self) {
+  debug('readable nexttick read 0');
+  self.read(0);
+}
+
+// pause() and resume() are remnants of the legacy readable stream API
+// If the user uses them, then switch into old mode.
+Readable.prototype.resume = function () {
+  var state = this._readableState;
+  if (!state.flowing) {
+    debug('resume');
+    state.flowing = true;
+    resume(this, state);
+  }
+  return this;
+};
+
+function resume(stream, state) {
+  if (!state.resumeScheduled) {
+    state.resumeScheduled = true;
+    pna.nextTick(resume_, stream, state);
+  }
+}
+
+function resume_(stream, state) {
+  if (!state.reading) {
+    debug('resume read 0');
+    stream.read(0);
+  }
+
+  state.resumeScheduled = false;
+  state.awaitDrain = 0;
+  stream.emit('resume');
+  flow(stream);
+  if (state.flowing && !state.reading) stream.read(0);
+}
+
+Readable.prototype.pause = function () {
+  debug('call pause flowing=%j', this._readableState.flowing);
+  if (false !== this._readableState.flowing) {
+    debug('pause');
+    this._readableState.flowing = false;
+    this.emit('pause');
+  }
+  return this;
+};
+
+function flow(stream) {
+  var state = stream._readableState;
+  debug('flow', state.flowing);
+  while (state.flowing && stream.read() !== null) {}
+}
+
+// wrap an old-style stream as the async data source.
+// This is *not* part of the readable stream interface.
+// It is an ugly unfortunate mess of history.
+Readable.prototype.wrap = function (stream) {
+  var _this = this;
+
+  var state = this._readableState;
+  var paused = false;
+
+  stream.on('end', function () {
+    debug('wrapped end');
+    if (state.decoder && !state.ended) {
+      var chunk = state.decoder.end();
+      if (chunk && chunk.length) _this.push(chunk);
+    }
+
+    _this.push(null);
+  });
+
+  stream.on('data', function (chunk) {
+    debug('wrapped data');
+    if (state.decoder) chunk = state.decoder.write(chunk);
+
+    // don't skip over falsy values in objectMode
+    if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
+
+    var ret = _this.push(chunk);
+    if (!ret) {
+      paused = true;
+      stream.pause();
+    }
+  });
+
+  // proxy all the other methods.
+  // important when wrapping filters and duplexes.
+  for (var i in stream) {
+    if (this[i] === undefined && typeof stream[i] === 'function') {
+      this[i] = function (method) {
+        return function () {
+          return stream[method].apply(stream, arguments);
+        };
+      }(i);
+    }
+  }
+
+  // proxy certain important events.
+  for (var n = 0; n < kProxyEvents.length; n++) {
+    stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
+  }
+
+  // when we try to consume some more bytes, simply unpause the
+  // underlying stream.
+  this._read = function (n) {
+    debug('wrapped _read', n);
+    if (paused) {
+      paused = false;
+      stream.resume();
+    }
+  };
+
+  return this;
+};
+
+Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
+  // making it explicit this property is not enumerable
+  // because otherwise some prototype manipulation in
+  // userland will fail
+  enumerable: false,
+  get: function () {
+    return this._readableState.highWaterMark;
+  }
+});
+
+// exposed for testing purposes only.
+Readable._fromList = fromList;
+
+// Pluck off n bytes from an array of buffers.
+// Length is the combined lengths of all the buffers in the list.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromList(n, state) {
+  // nothing buffered
+  if (state.length === 0) return null;
+
+  var ret;
+  if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
+    // read it all, truncate the list
+    if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
+    state.buffer.clear();
+  } else {
+    // read part of list
+    ret = fromListPartial(n, state.buffer, state.decoder);
+  }
+
+  return ret;
+}
+
+// Extracts only enough buffered data to satisfy the amount requested.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromListPartial(n, list, hasStrings) {
+  var ret;
+  if (n < list.head.data.length) {
+    // slice is the same for buffers and strings
+    ret = list.head.data.slice(0, n);
+    list.head.data = list.head.data.slice(n);
+  } else if (n === list.head.data.length) {
+    // first chunk is a perfect match
+    ret = list.shift();
+  } else {
+    // result spans more than one buffer
+    ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
+  }
+  return ret;
+}
+
+// Copies a specified amount of characters from the list of buffered data
+// chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBufferString(n, list) {
+  var p = list.head;
+  var c = 1;
+  var ret = p.data;
+  n -= ret.length;
+  while (p = p.next) {
+    var str = p.data;
+    var nb = n > str.length ? str.length : n;
+    if (nb === str.length) ret += str;else ret += str.slice(0, n);
+    n -= nb;
+    if (n === 0) {
+      if (nb === str.length) {
+        ++c;
+        if (p.next) list.head = p.next;else list.head = list.tail = null;
+      } else {
+        list.head = p;
+        p.data = str.slice(nb);
+      }
+      break;
+    }
+    ++c;
+  }
+  list.length -= c;
+  return ret;
+}
+
+// Copies a specified amount of bytes from the list of buffered data chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBuffer(n, list) {
+  var ret = Buffer.allocUnsafe(n);
+  var p = list.head;
+  var c = 1;
+  p.data.copy(ret);
+  n -= p.data.length;
+  while (p = p.next) {
+    var buf = p.data;
+    var nb = n > buf.length ? buf.length : n;
+    buf.copy(ret, ret.length - n, 0, nb);
+    n -= nb;
+    if (n === 0) {
+      if (nb === buf.length) {
+        ++c;
+        if (p.next) list.head = p.next;else list.head = list.tail = null;
+      } else {
+        list.head = p;
+        p.data = buf.slice(nb);
+      }
+      break;
+    }
+    ++c;
+  }
+  list.length -= c;
+  return ret;
+}
+
+function endReadable(stream) {
+  var state = stream._readableState;
+
+  // If we get here before consuming all the bytes, then that is a
+  // bug in node.  Should never happen.
+  if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
+
+  if (!state.endEmitted) {
+    state.ended = true;
+    pna.nextTick(endReadableNT, state, stream);
+  }
+}
+
+function endReadableNT(state, stream) {
+  // Check that we didn't get one last unshift.
+  if (!state.endEmitted && state.length === 0) {
+    state.endEmitted = true;
+    stream.readable = false;
+    stream.emit('end');
+  }
+}
+
+function indexOf(xs, x) {
+  for (var i = 0, l = xs.length; i < l; i++) {
+    if (xs[i] === x) return i;
+  }
+  return -1;
+}
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../buildin/global.js */ "./node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../../process/browser.js */ "./node_modules/webpack/node_modules/process/browser.js")))
+
+/***/ }),
+
+/***/ "./node_modules/webpack/node_modules/readable-stream/lib/_stream_transform.js":
+/*!***********************************************************************!*\
+  !*** (webpack)/node_modules/readable-stream/lib/_stream_transform.js ***!
+  \***********************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+// a transform stream is a readable/writable stream where you do
+// something with the data.  Sometimes it's called a "filter",
+// but that's not a great name for it, since that implies a thing where
+// some bits pass through, and others are simply ignored.  (That would
+// be a valid example of a transform, of course.)
+//
+// While the output is causally related to the input, it's not a
+// necessarily symmetric or synchronous transformation.  For example,
+// a zlib stream might take multiple plain-text writes(), and then
+// emit a single compressed chunk some time in the future.
+//
+// Here's how this works:
+//
+// The Transform stream has all the aspects of the readable and writable
+// stream classes.  When you write(chunk), that calls _write(chunk,cb)
+// internally, and returns false if there's a lot of pending writes
+// buffered up.  When you call read(), that calls _read(n) until
+// there's enough pending readable data buffered up.
+//
+// In a transform stream, the written data is placed in a buffer.  When
+// _read(n) is called, it transforms the queued up data, calling the
+// buffered _write cb's as it consumes chunks.  If consuming a single
+// written chunk would result in multiple output chunks, then the first
+// outputted bit calls the readcb, and subsequent chunks just go into
+// the read buffer, and will cause it to emit 'readable' if necessary.
+//
+// This way, back-pressure is actually determined by the reading side,
+// since _read has to be called to start processing a new chunk.  However,
+// a pathological inflate type of transform can cause excessive buffering
+// here.  For example, imagine a stream where every byte of input is
+// interpreted as an integer from 0-255, and then results in that many
+// bytes of output.  Writing the 4 bytes {ff,ff,ff,ff} would result in
+// 1kb of data being output.  In this case, you could write a very small
+// amount of input, and end up with a very large amount of output.  In
+// such a pathological inflating mechanism, there'd be no way to tell
+// the system to stop doing the transform.  A single 4MB write could
+// cause the system to run out of memory.
+//
+// However, even in such a pathological case, only a single written chunk
+// would be consumed, and then the rest would wait (un-transformed) until
+// the results of the previous transformed chunk were consumed.
+
+
+
+module.exports = Transform;
+
+var Duplex = __webpack_require__(/*! ./_stream_duplex */ "./node_modules/webpack/node_modules/readable-stream/lib/_stream_duplex.js");
+
+/*<replacement>*/
+var util = __webpack_require__(/*! core-util-is */ "./node_modules/webpack/node_modules/core-util-is/lib/util.js");
+util.inherits = __webpack_require__(/*! inherits */ "./node_modules/webpack/node_modules/inherits/inherits_browser.js");
+/*</replacement>*/
+
+util.inherits(Transform, Duplex);
+
+function afterTransform(er, data) {
+  var ts = this._transformState;
+  ts.transforming = false;
+
+  var cb = ts.writecb;
+
+  if (!cb) {
+    return this.emit('error', new Error('write callback called multiple times'));
+  }
+
+  ts.writechunk = null;
+  ts.writecb = null;
+
+  if (data != null) // single equals check for both `null` and `undefined`
+    this.push(data);
+
+  cb(er);
+
+  var rs = this._readableState;
+  rs.reading = false;
+  if (rs.needReadable || rs.length < rs.highWaterMark) {
+    this._read(rs.highWaterMark);
+  }
+}
+
+function Transform(options) {
+  if (!(this instanceof Transform)) return new Transform(options);
+
+  Duplex.call(this, options);
+
+  this._transformState = {
+    afterTransform: afterTransform.bind(this),
+    needTransform: false,
+    transforming: false,
+    writecb: null,
+    writechunk: null,
+    writeencoding: null
+  };
+
+  // start out asking for a readable event once data is transformed.
+  this._readableState.needReadable = true;
+
+  // we have implemented the _read method, and done the other things
+  // that Readable wants before the first _read call, so unset the
+  // sync guard flag.
+  this._readableState.sync = false;
+
+  if (options) {
+    if (typeof options.transform === 'function') this._transform = options.transform;
+
+    if (typeof options.flush === 'function') this._flush = options.flush;
+  }
+
+  // When the writable side finishes, then flush out anything remaining.
+  this.on('prefinish', prefinish);
+}
+
+function prefinish() {
+  var _this = this;
+
+  if (typeof this._flush === 'function') {
+    this._flush(function (er, data) {
+      done(_this, er, data);
+    });
+  } else {
+    done(this, null, null);
+  }
+}
+
+Transform.prototype.push = function (chunk, encoding) {
+  this._transformState.needTransform = false;
+  return Duplex.prototype.push.call(this, chunk, encoding);
+};
+
+// This is the part where you do stuff!
+// override this function in implementation classes.
+// 'chunk' is an input chunk.
+//
+// Call `push(newChunk)` to pass along transformed output
+// to the readable side.  You may call 'push' zero or more times.
+//
+// Call `cb(err)` when you are done with this chunk.  If you pass
+// an error, then that'll put the hurt on the whole operation.  If you
+// never call cb(), then you'll never get another chunk.
+Transform.prototype._transform = function (chunk, encoding, cb) {
+  throw new Error('_transform() is not implemented');
+};
+
+Transform.prototype._write = function (chunk, encoding, cb) {
+  var ts = this._transformState;
+  ts.writecb = cb;
+  ts.writechunk = chunk;
+  ts.writeencoding = encoding;
+  if (!ts.transforming) {
+    var rs = this._readableState;
+    if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
+  }
+};
+
+// Doesn't matter what the args are here.
+// _transform does all the work.
+// That we got here means that the readable side wants more data.
+Transform.prototype._read = function (n) {
+  var ts = this._transformState;
+
+  if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
+    ts.transforming = true;
+    this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
+  } else {
+    // mark that we need a transform, so that any data that comes in
+    // will get processed, now that we've asked for it.
+    ts.needTransform = true;
+  }
+};
+
+Transform.prototype._destroy = function (err, cb) {
+  var _this2 = this;
+
+  Duplex.prototype._destroy.call(this, err, function (err2) {
+    cb(err2);
+    _this2.emit('close');
+  });
+};
+
+function done(stream, er, data) {
+  if (er) return stream.emit('error', er);
+
+  if (data != null) // single equals check for both `null` and `undefined`
+    stream.push(data);
+
+  // if there's nothing in the write buffer, then that means
+  // that nothing more will ever be provided
+  if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
+
+  if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
+
+  return stream.push(null);
+}
+
+/***/ }),
+
+/***/ "./node_modules/webpack/node_modules/readable-stream/lib/_stream_writable.js":
+/*!**********************************************************************!*\
+  !*** (webpack)/node_modules/readable-stream/lib/_stream_writable.js ***!
+  \**********************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(process, setImmediate, global) {// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+// A bit simpler than readable streams.
+// Implement an async ._write(chunk, encoding, cb), and it'll handle all
+// the drain event emission and buffering.
+
+
+
+/*<replacement>*/
+
+var pna = __webpack_require__(/*! process-nextick-args */ "./node_modules/webpack/node_modules/process-nextick-args/index.js");
+/*</replacement>*/
+
+module.exports = Writable;
+
+/* <replacement> */
+function WriteReq(chunk, encoding, cb) {
+  this.chunk = chunk;
+  this.encoding = encoding;
+  this.callback = cb;
+  this.next = null;
+}
+
+// It seems a linked list but it is not
+// there will be only 2 of these for each stream
+function CorkedRequest(state) {
+  var _this = this;
+
+  this.next = null;
+  this.entry = null;
+  this.finish = function () {
+    onCorkedFinish(_this, state);
+  };
+}
+/* </replacement> */
+
+/*<replacement>*/
+var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
+/*</replacement>*/
+
+/*<replacement>*/
+var Duplex;
+/*</replacement>*/
+
+Writable.WritableState = WritableState;
+
+/*<replacement>*/
+var util = __webpack_require__(/*! core-util-is */ "./node_modules/webpack/node_modules/core-util-is/lib/util.js");
+util.inherits = __webpack_require__(/*! inherits */ "./node_modules/webpack/node_modules/inherits/inherits_browser.js");
+/*</replacement>*/
+
+/*<replacement>*/
+var internalUtil = {
+  deprecate: __webpack_require__(/*! util-deprecate */ "./node_modules/webpack/node_modules/util-deprecate/browser.js")
+};
+/*</replacement>*/
+
+/*<replacement>*/
+var Stream = __webpack_require__(/*! ./internal/streams/stream */ "./node_modules/webpack/node_modules/readable-stream/lib/internal/streams/stream-browser.js");
+/*</replacement>*/
+
+/*<replacement>*/
+
+var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/webpack/node_modules/safe-buffer/index.js").Buffer;
+var OurUint8Array = global.Uint8Array || function () {};
+function _uint8ArrayToBuffer(chunk) {
+  return Buffer.from(chunk);
+}
+function _isUint8Array(obj) {
+  return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+
+/*</replacement>*/
+
+var destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ "./node_modules/webpack/node_modules/readable-stream/lib/internal/streams/destroy.js");
+
+util.inherits(Writable, Stream);
+
+function nop() {}
+
+function WritableState(options, stream) {
+  Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ "./node_modules/webpack/node_modules/readable-stream/lib/_stream_duplex.js");
+
+  options = options || {};
+
+  // Duplex streams are both readable and writable, but share
+  // the same options object.
+  // However, some cases require setting options to different
+  // values for the readable and the writable sides of the duplex stream.
+  // These options can be provided separately as readableXXX and writableXXX.
+  var isDuplex = stream instanceof Duplex;
+
+  // object stream flag to indicate whether or not this stream
+  // contains buffers or objects.
+  this.objectMode = !!options.objectMode;
+
+  if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
+
+  // the point at which write() starts returning false
+  // Note: 0 is a valid value, means that we always return false if
+  // the entire buffer is not flushed immediately on write()
+  var hwm = options.highWaterMark;
+  var writableHwm = options.writableHighWaterMark;
+  var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+
+  if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;
+
+  // cast to ints.
+  this.highWaterMark = Math.floor(this.highWaterMark);
+
+  // if _final has been called
+  this.finalCalled = false;
+
+  // drain event flag.
+  this.needDrain = false;
+  // at the start of calling end()
+  this.ending = false;
+  // when end() has been called, and returned
+  this.ended = false;
+  // when 'finish' is emitted
+  this.finished = false;
+
+  // has it been destroyed
+  this.destroyed = false;
+
+  // should we decode strings into buffers before passing to _write?
+  // this is here so that some node-core streams can optimize string
+  // handling at a lower level.
+  var noDecode = options.decodeStrings === false;
+  this.decodeStrings = !noDecode;
+
+  // Crypto is kind of old and crusty.  Historically, its default string
+  // encoding is 'binary' so we have to make this configurable.
+  // Everything else in the universe uses 'utf8', though.
+  this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+  // not an actual buffer we keep track of, but a measurement
+  // of how much we're waiting to get pushed to some underlying
+  // socket or file.
+  this.length = 0;
+
+  // a flag to see when we're in the middle of a write.
+  this.writing = false;
+
+  // when true all writes will be buffered until .uncork() call
+  this.corked = 0;
+
+  // a flag to be able to tell if the onwrite cb is called immediately,
+  // or on a later tick.  We set this to true at first, because any
+  // actions that shouldn't happen until "later" should generally also
+  // not happen before the first write call.
+  this.sync = true;
+
+  // a flag to know if we're processing previously buffered items, which
+  // may call the _write() callback in the same tick, so that we don't
+  // end up in an overlapped onwrite situation.
+  this.bufferProcessing = false;
+
+  // the callback that's passed to _write(chunk,cb)
+  this.onwrite = function (er) {
+    onwrite(stream, er);
+  };
+
+  // the callback that the user supplies to write(chunk,encoding,cb)
+  this.writecb = null;
+
+  // the amount that is being written when _write is called.
+  this.writelen = 0;
+
+  this.bufferedRequest = null;
+  this.lastBufferedRequest = null;
+
+  // number of pending user-supplied write callbacks
+  // this must be 0 before 'finish' can be emitted
+  this.pendingcb = 0;
+
+  // emit prefinish if the only thing we're waiting for is _write cbs
+  // This is relevant for synchronous Transform streams
+  this.prefinished = false;
+
+  // True if the error was already emitted and should not be thrown again
+  this.errorEmitted = false;
+
+  // count buffered requests
+  this.bufferedRequestCount = 0;
+
+  // allocate the first CorkedRequest, there is always
+  // one allocated and free to use, and we maintain at most two
+  this.corkedRequestsFree = new CorkedRequest(this);
+}
+
+WritableState.prototype.getBuffer = function getBuffer() {
+  var current = this.bufferedRequest;
+  var out = [];
+  while (current) {
+    out.push(current);
+    current = current.next;
+  }
+  return out;
+};
+
+(function () {
+  try {
+    Object.defineProperty(WritableState.prototype, 'buffer', {
+      get: internalUtil.deprecate(function () {
+        return this.getBuffer();
+      }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
+    });
+  } catch (_) {}
+})();
+
+// Test _writableState for inheritance to account for Duplex streams,
+// whose prototype chain only points to Readable.
+var realHasInstance;
+if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
+  realHasInstance = Function.prototype[Symbol.hasInstance];
+  Object.defineProperty(Writable, Symbol.hasInstance, {
+    value: function (object) {
+      if (realHasInstance.call(this, object)) return true;
+      if (this !== Writable) return false;
+
+      return object && object._writableState instanceof WritableState;
+    }
+  });
+} else {
+  realHasInstance = function (object) {
+    return object instanceof this;
+  };
+}
+
+function Writable(options) {
+  Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ "./node_modules/webpack/node_modules/readable-stream/lib/_stream_duplex.js");
+
+  // Writable ctor is applied to Duplexes, too.
+  // `realHasInstance` is necessary because using plain `instanceof`
+  // would return false, as no `_writableState` property is attached.
+
+  // Trying to use the custom `instanceof` for Writable here will also break the
+  // Node.js LazyTransform implementation, which has a non-trivial getter for
+  // `_writableState` that would lead to infinite recursion.
+  if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
+    return new Writable(options);
+  }
+
+  this._writableState = new WritableState(options, this);
+
+  // legacy.
+  this.writable = true;
+
+  if (options) {
+    if (typeof options.write === 'function') this._write = options.write;
+
+    if (typeof options.writev === 'function') this._writev = options.writev;
+
+    if (typeof options.destroy === 'function') this._destroy = options.destroy;
+
+    if (typeof options.final === 'function') this._final = options.final;
+  }
+
+  Stream.call(this);
+}
+
+// Otherwise people can pipe Writable streams, which is just wrong.
+Writable.prototype.pipe = function () {
+  this.emit('error', new Error('Cannot pipe, not readable'));
+};
+
+function writeAfterEnd(stream, cb) {
+  var er = new Error('write after end');
+  // TODO: defer error events consistently everywhere, not just the cb
+  stream.emit('error', er);
+  pna.nextTick(cb, er);
+}
+
+// Checks that a user-supplied chunk is valid, especially for the particular
+// mode the stream is in. Currently this means that `null` is never accepted
+// and undefined/non-string values are only allowed in object mode.
+function validChunk(stream, state, chunk, cb) {
+  var valid = true;
+  var er = false;
+
+  if (chunk === null) {
+    er = new TypeError('May not write null values to stream');
+  } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+    er = new TypeError('Invalid non-string/buffer chunk');
+  }
+  if (er) {
+    stream.emit('error', er);
+    pna.nextTick(cb, er);
+    valid = false;
+  }
+  return valid;
+}
+
+Writable.prototype.write = function (chunk, encoding, cb) {
+  var state = this._writableState;
+  var ret = false;
+  var isBuf = !state.objectMode && _isUint8Array(chunk);
+
+  if (isBuf && !Buffer.isBuffer(chunk)) {
+    chunk = _uint8ArrayToBuffer(chunk);
+  }
+
+  if (typeof encoding === 'function') {
+    cb = encoding;
+    encoding = null;
+  }
+
+  if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
+
+  if (typeof cb !== 'function') cb = nop;
+
+  if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
+    state.pendingcb++;
+    ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
+  }
+
+  return ret;
+};
+
+Writable.prototype.cork = function () {
+  var state = this._writableState;
+
+  state.corked++;
+};
+
+Writable.prototype.uncork = function () {
+  var state = this._writableState;
+
+  if (state.corked) {
+    state.corked--;
+
+    if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
+  }
+};
+
+Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
+  // node::ParseEncoding() requires lower case.
+  if (typeof encoding === 'string') encoding = encoding.toLowerCase();
+  if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
+  this._writableState.defaultEncoding = encoding;
+  return this;
+};
+
+function decodeChunk(state, chunk, encoding) {
+  if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
+    chunk = Buffer.from(chunk, encoding);
+  }
+  return chunk;
+}
+
+Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
+  // making it explicit this property is not enumerable
+  // because otherwise some prototype manipulation in
+  // userland will fail
+  enumerable: false,
+  get: function () {
+    return this._writableState.highWaterMark;
+  }
+});
+
+// if we're already writing something, then just put this
+// in the queue, and wait our turn.  Otherwise, call _write
+// If we return false, then we need a drain event, so set that flag.
+function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
+  if (!isBuf) {
+    var newChunk = decodeChunk(state, chunk, encoding);
+    if (chunk !== newChunk) {
+      isBuf = true;
+      encoding = 'buffer';
+      chunk = newChunk;
+    }
+  }
+  var len = state.objectMode ? 1 : chunk.length;
+
+  state.length += len;
+
+  var ret = state.length < state.highWaterMark;
+  // we must ensure that previous needDrain will not be reset to false.
+  if (!ret) state.needDrain = true;
+
+  if (state.writing || state.corked) {
+    var last = state.lastBufferedRequest;
+    state.lastBufferedRequest = {
+      chunk: chunk,
+      encoding: encoding,
+      isBuf: isBuf,
+      callback: cb,
+      next: null
+    };
+    if (last) {
+      last.next = state.lastBufferedRequest;
+    } else {
+      state.bufferedRequest = state.lastBufferedRequest;
+    }
+    state.bufferedRequestCount += 1;
+  } else {
+    doWrite(stream, state, false, len, chunk, encoding, cb);
+  }
+
+  return ret;
+}
+
+function doWrite(stream, state, writev, len, chunk, encoding, cb) {
+  state.writelen = len;
+  state.writecb = cb;
+  state.writing = true;
+  state.sync = true;
+  if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
+  state.sync = false;
+}
+
+function onwriteError(stream, state, sync, er, cb) {
+  --state.pendingcb;
+
+  if (sync) {
+    // defer the callback if we are being called synchronously
+    // to avoid piling up things on the stack
+    pna.nextTick(cb, er);
+    // this can emit finish, and it will always happen
+    // after error
+    pna.nextTick(finishMaybe, stream, state);
+    stream._writableState.errorEmitted = true;
+    stream.emit('error', er);
+  } else {
+    // the caller expect this to happen before if
+    // it is async
+    cb(er);
+    stream._writableState.errorEmitted = true;
+    stream.emit('error', er);
+    // this can emit finish, but finish must
+    // always follow error
+    finishMaybe(stream, state);
+  }
+}
+
+function onwriteStateUpdate(state) {
+  state.writing = false;
+  state.writecb = null;
+  state.length -= state.writelen;
+  state.writelen = 0;
+}
+
+function onwrite(stream, er) {
+  var state = stream._writableState;
+  var sync = state.sync;
+  var cb = state.writecb;
+
+  onwriteStateUpdate(state);
+
+  if (er) onwriteError(stream, state, sync, er, cb);else {
+    // Check if we're actually ready to finish, but don't emit yet
+    var finished = needFinish(state);
+
+    if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
+      clearBuffer(stream, state);
+    }
+
+    if (sync) {
+      /*<replacement>*/
+      asyncWrite(afterWrite, stream, state, finished, cb);
+      /*</replacement>*/
+    } else {
+      afterWrite(stream, state, finished, cb);
+    }
+  }
+}
+
+function afterWrite(stream, state, finished, cb) {
+  if (!finished) onwriteDrain(stream, state);
+  state.pendingcb--;
+  cb();
+  finishMaybe(stream, state);
+}
+
+// Must force callback to be called on nextTick, so that we don't
+// emit 'drain' before the write() consumer gets the 'false' return
+// value, and has a chance to attach a 'drain' listener.
+function onwriteDrain(stream, state) {
+  if (state.length === 0 && state.needDrain) {
+    state.needDrain = false;
+    stream.emit('drain');
+  }
+}
+
+// if there's something in the buffer waiting, then process it
+function clearBuffer(stream, state) {
+  state.bufferProcessing = true;
+  var entry = state.bufferedRequest;
+
+  if (stream._writev && entry && entry.next) {
+    // Fast case, write everything using _writev()
+    var l = state.bufferedRequestCount;
+    var buffer = new Array(l);
+    var holder = state.corkedRequestsFree;
+    holder.entry = entry;
+
+    var count = 0;
+    var allBuffers = true;
+    while (entry) {
+      buffer[count] = entry;
+      if (!entry.isBuf) allBuffers = false;
+      entry = entry.next;
+      count += 1;
+    }
+    buffer.allBuffers = allBuffers;
+
+    doWrite(stream, state, true, state.length, buffer, '', holder.finish);
+
+    // doWrite is almost always async, defer these to save a bit of time
+    // as the hot path ends with doWrite
+    state.pendingcb++;
+    state.lastBufferedRequest = null;
+    if (holder.next) {
+      state.corkedRequestsFree = holder.next;
+      holder.next = null;
+    } else {
+      state.corkedRequestsFree = new CorkedRequest(state);
+    }
+    state.bufferedRequestCount = 0;
+  } else {
+    // Slow case, write chunks one-by-one
+    while (entry) {
+      var chunk = entry.chunk;
+      var encoding = entry.encoding;
+      var cb = entry.callback;
+      var len = state.objectMode ? 1 : chunk.length;
+
+      doWrite(stream, state, false, len, chunk, encoding, cb);
+      entry = entry.next;
+      state.bufferedRequestCount--;
+      // if we didn't call the onwrite immediately, then
+      // it means that we need to wait until it does.
+      // also, that means that the chunk and cb are currently
+      // being processed, so move the buffer counter past them.
+      if (state.writing) {
+        break;
+      }
+    }
+
+    if (entry === null) state.lastBufferedRequest = null;
+  }
+
+  state.bufferedRequest = entry;
+  state.bufferProcessing = false;
+}
+
+Writable.prototype._write = function (chunk, encoding, cb) {
+  cb(new Error('_write() is not implemented'));
+};
+
+Writable.prototype._writev = null;
+
+Writable.prototype.end = function (chunk, encoding, cb) {
+  var state = this._writableState;
+
+  if (typeof chunk === 'function') {
+    cb = chunk;
+    chunk = null;
+    encoding = null;
+  } else if (typeof encoding === 'function') {
+    cb = encoding;
+    encoding = null;
+  }
+
+  if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
+
+  // .end() fully uncorks
+  if (state.corked) {
+    state.corked = 1;
+    this.uncork();
+  }
+
+  // ignore unnecessary end() calls.
+  if (!state.ending && !state.finished) endWritable(this, state, cb);
+};
+
+function needFinish(state) {
+  return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
+}
+function callFinal(stream, state) {
+  stream._final(function (err) {
+    state.pendingcb--;
+    if (err) {
+      stream.emit('error', err);
+    }
+    state.prefinished = true;
+    stream.emit('prefinish');
+    finishMaybe(stream, state);
+  });
+}
+function prefinish(stream, state) {
+  if (!state.prefinished && !state.finalCalled) {
+    if (typeof stream._final === 'function') {
+      state.pendingcb++;
+      state.finalCalled = true;
+      pna.nextTick(callFinal, stream, state);
+    } else {
+      state.prefinished = true;
+      stream.emit('prefinish');
+    }
+  }
+}
+
+function finishMaybe(stream, state) {
+  var need = needFinish(state);
+  if (need) {
+    prefinish(stream, state);
+    if (state.pendingcb === 0) {
+      state.finished = true;
+      stream.emit('finish');
+    }
+  }
+  return need;
+}
+
+function endWritable(stream, state, cb) {
+  state.ending = true;
+  finishMaybe(stream, state);
+  if (cb) {
+    if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);
+  }
+  state.ended = true;
+  stream.writable = false;
+}
+
+function onCorkedFinish(corkReq, state, err) {
+  var entry = corkReq.entry;
+  corkReq.entry = null;
+  while (entry) {
+    var cb = entry.callback;
+    state.pendingcb--;
+    cb(err);
+    entry = entry.next;
+  }
+  if (state.corkedRequestsFree) {
+    state.corkedRequestsFree.next = corkReq;
+  } else {
+    state.corkedRequestsFree = corkReq;
+  }
+}
+
+Object.defineProperty(Writable.prototype, 'destroyed', {
+  get: function () {
+    if (this._writableState === undefined) {
+      return false;
+    }
+    return this._writableState.destroyed;
+  },
+  set: function (value) {
+    // we ignore the value if the stream
+    // has not been initialized yet
+    if (!this._writableState) {
+      return;
+    }
+
+    // backward compatibility, the user is explicitly
+    // managing destroyed
+    this._writableState.destroyed = value;
+  }
+});
+
+Writable.prototype.destroy = destroyImpl.destroy;
+Writable.prototype._undestroy = destroyImpl.undestroy;
+Writable.prototype._destroy = function (err, cb) {
+  this.end();
+  cb(err);
+};
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ "./node_modules/webpack/node_modules/process/browser.js"), __webpack_require__(/*! ./../../timers-browserify/main.js */ "./node_modules/webpack/node_modules/timers-browserify/main.js").setImmediate, __webpack_require__(/*! ./../../../buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
+
+/***/ }),
+
+/***/ "./node_modules/webpack/node_modules/readable-stream/lib/internal/streams/BufferList.js":
+/*!*********************************************************************************!*\
+  !*** (webpack)/node_modules/readable-stream/lib/internal/streams/BufferList.js ***!
+  \*********************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/webpack/node_modules/safe-buffer/index.js").Buffer;
+var util = __webpack_require__(/*! util */ 1);
+
+function copyBuffer(src, target, offset) {
+  src.copy(target, offset);
+}
+
+module.exports = function () {
+  function BufferList() {
+    _classCallCheck(this, BufferList);
+
+    this.head = null;
+    this.tail = null;
+    this.length = 0;
+  }
+
+  BufferList.prototype.push = function push(v) {
+    var entry = { data: v, next: null };
+    if (this.length > 0) this.tail.next = entry;else this.head = entry;
+    this.tail = entry;
+    ++this.length;
+  };
+
+  BufferList.prototype.unshift = function unshift(v) {
+    var entry = { data: v, next: this.head };
+    if (this.length === 0) this.tail = entry;
+    this.head = entry;
+    ++this.length;
+  };
+
+  BufferList.prototype.shift = function shift() {
+    if (this.length === 0) return;
+    var ret = this.head.data;
+    if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
+    --this.length;
+    return ret;
+  };
+
+  BufferList.prototype.clear = function clear() {
+    this.head = this.tail = null;
+    this.length = 0;
+  };
+
+  BufferList.prototype.join = function join(s) {
+    if (this.length === 0) return '';
+    var p = this.head;
+    var ret = '' + p.data;
+    while (p = p.next) {
+      ret += s + p.data;
+    }return ret;
+  };
+
+  BufferList.prototype.concat = function concat(n) {
+    if (this.length === 0) return Buffer.alloc(0);
+    if (this.length === 1) return this.head.data;
+    var ret = Buffer.allocUnsafe(n >>> 0);
+    var p = this.head;
+    var i = 0;
+    while (p) {
+      copyBuffer(p.data, ret, i);
+      i += p.data.length;
+      p = p.next;
+    }
+    return ret;
+  };
+
+  return BufferList;
+}();
+
+if (util && util.inspect && util.inspect.custom) {
+  module.exports.prototype[util.inspect.custom] = function () {
+    var obj = util.inspect({ length: this.length });
+    return this.constructor.name + ' ' + obj;
+  };
+}
+
+/***/ }),
+
+/***/ "./node_modules/webpack/node_modules/readable-stream/lib/internal/streams/destroy.js":
+/*!******************************************************************************!*\
+  !*** (webpack)/node_modules/readable-stream/lib/internal/streams/destroy.js ***!
+  \******************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+/*<replacement>*/
+
+var pna = __webpack_require__(/*! process-nextick-args */ "./node_modules/webpack/node_modules/process-nextick-args/index.js");
+/*</replacement>*/
+
+// undocumented cb() API, needed for core, not for public API
+function destroy(err, cb) {
+  var _this = this;
+
+  var readableDestroyed = this._readableState && this._readableState.destroyed;
+  var writableDestroyed = this._writableState && this._writableState.destroyed;
+
+  if (readableDestroyed || writableDestroyed) {
+    if (cb) {
+      cb(err);
+    } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
+      pna.nextTick(emitErrorNT, this, err);
+    }
+    return this;
+  }
+
+  // we set destroyed to true before firing error callbacks in order
+  // to make it re-entrance safe in case destroy() is called within callbacks
+
+  if (this._readableState) {
+    this._readableState.destroyed = true;
+  }
+
+  // if this is a duplex stream mark the writable part as destroyed as well
+  if (this._writableState) {
+    this._writableState.destroyed = true;
+  }
+
+  this._destroy(err || null, function (err) {
+    if (!cb && err) {
+      pna.nextTick(emitErrorNT, _this, err);
+      if (_this._writableState) {
+        _this._writableState.errorEmitted = true;
+      }
+    } else if (cb) {
+      cb(err);
+    }
+  });
+
+  return this;
+}
+
+function undestroy() {
+  if (this._readableState) {
+    this._readableState.destroyed = false;
+    this._readableState.reading = false;
+    this._readableState.ended = false;
+    this._readableState.endEmitted = false;
+  }
+
+  if (this._writableState) {
+    this._writableState.destroyed = false;
+    this._writableState.ended = false;
+    this._writableState.ending = false;
+    this._writableState.finished = false;
+    this._writableState.errorEmitted = false;
+  }
+}
+
+function emitErrorNT(self, err) {
+  self.emit('error', err);
+}
+
+module.exports = {
+  destroy: destroy,
+  undestroy: undestroy
+};
+
+/***/ }),
+
+/***/ "./node_modules/webpack/node_modules/readable-stream/lib/internal/streams/stream-browser.js":
+/*!*************************************************************************************!*\
+  !*** (webpack)/node_modules/readable-stream/lib/internal/streams/stream-browser.js ***!
+  \*************************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = __webpack_require__(/*! events */ "./node_modules/webpack/node_modules/events/events.js").EventEmitter;
+
+
+/***/ }),
+
+/***/ "./node_modules/webpack/node_modules/readable-stream/passthrough.js":
+/*!*************************************************************!*\
+  !*** (webpack)/node_modules/readable-stream/passthrough.js ***!
+  \*************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = __webpack_require__(/*! ./readable */ "./node_modules/webpack/node_modules/readable-stream/readable-browser.js").PassThrough
+
+
+/***/ }),
+
+/***/ "./node_modules/webpack/node_modules/readable-stream/readable-browser.js":
+/*!******************************************************************!*\
+  !*** (webpack)/node_modules/readable-stream/readable-browser.js ***!
+  \******************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+exports = module.exports = __webpack_require__(/*! ./lib/_stream_readable.js */ "./node_modules/webpack/node_modules/readable-stream/lib/_stream_readable.js");
+exports.Stream = exports;
+exports.Readable = exports;
+exports.Writable = __webpack_require__(/*! ./lib/_stream_writable.js */ "./node_modules/webpack/node_modules/readable-stream/lib/_stream_writable.js");
+exports.Duplex = __webpack_require__(/*! ./lib/_stream_duplex.js */ "./node_modules/webpack/node_modules/readable-stream/lib/_stream_duplex.js");
+exports.Transform = __webpack_require__(/*! ./lib/_stream_transform.js */ "./node_modules/webpack/node_modules/readable-stream/lib/_stream_transform.js");
+exports.PassThrough = __webpack_require__(/*! ./lib/_stream_passthrough.js */ "./node_modules/webpack/node_modules/readable-stream/lib/_stream_passthrough.js");
+
+
+/***/ }),
+
+/***/ "./node_modules/webpack/node_modules/readable-stream/transform.js":
+/*!***********************************************************!*\
+  !*** (webpack)/node_modules/readable-stream/transform.js ***!
+  \***********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = __webpack_require__(/*! ./readable */ "./node_modules/webpack/node_modules/readable-stream/readable-browser.js").Transform
+
+
+/***/ }),
+
+/***/ "./node_modules/webpack/node_modules/readable-stream/writable-browser.js":
+/*!******************************************************************!*\
+  !*** (webpack)/node_modules/readable-stream/writable-browser.js ***!
+  \******************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = __webpack_require__(/*! ./lib/_stream_writable.js */ "./node_modules/webpack/node_modules/readable-stream/lib/_stream_writable.js");
+
+
+/***/ }),
+
+/***/ "./node_modules/webpack/node_modules/safe-buffer/index.js":
+/*!***************************************************!*\
+  !*** (webpack)/node_modules/safe-buffer/index.js ***!
+  \***************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* eslint-disable node/no-deprecated-api */
+var buffer = __webpack_require__(/*! buffer */ "./node_modules/webpack/node_modules/buffer/index.js")
+var Buffer = buffer.Buffer
+
+// alternative to using Object.keys for old browsers
+function copyProps (src, dst) {
+  for (var key in src) {
+    dst[key] = src[key]
+  }
+}
+if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
+  module.exports = buffer
+} else {
+  // Copy properties from require('buffer')
+  copyProps(buffer, exports)
+  exports.Buffer = SafeBuffer
+}
+
+function SafeBuffer (arg, encodingOrOffset, length) {
+  return Buffer(arg, encodingOrOffset, length)
+}
+
+// Copy static methods from Buffer
+copyProps(Buffer, SafeBuffer)
+
+SafeBuffer.from = function (arg, encodingOrOffset, length) {
+  if (typeof arg === 'number') {
+    throw new TypeError('Argument must not be a number')
+  }
+  return Buffer(arg, encodingOrOffset, length)
+}
+
+SafeBuffer.alloc = function (size, fill, encoding) {
+  if (typeof size !== 'number') {
+    throw new TypeError('Argument must be a number')
+  }
+  var buf = Buffer(size)
+  if (fill !== undefined) {
+    if (typeof encoding === 'string') {
+      buf.fill(fill, encoding)
+    } else {
+      buf.fill(fill)
+    }
+  } else {
+    buf.fill(0)
+  }
+  return buf
+}
+
+SafeBuffer.allocUnsafe = function (size) {
+  if (typeof size !== 'number') {
+    throw new TypeError('Argument must be a number')
+  }
+  return Buffer(size)
+}
+
+SafeBuffer.allocUnsafeSlow = function (size) {
+  if (typeof size !== 'number') {
+    throw new TypeError('Argument must be a number')
+  }
+  return buffer.SlowBuffer(size)
+}
+
+
+/***/ }),
+
+/***/ "./node_modules/webpack/node_modules/setimmediate/setImmediate.js":
+/*!***********************************************************!*\
+  !*** (webpack)/node_modules/setimmediate/setImmediate.js ***!
+  \***********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {
+    "use strict";
+
+    if (global.setImmediate) {
+        return;
+    }
+
+    var nextHandle = 1; // Spec says greater than zero
+    var tasksByHandle = {};
+    var currentlyRunningATask = false;
+    var doc = global.document;
+    var registerImmediate;
+
+    function setImmediate(callback) {
+      // Callback can either be a function or a string
+      if (typeof callback !== "function") {
+        callback = new Function("" + callback);
+      }
+      // Copy function arguments
+      var args = new Array(arguments.length - 1);
+      for (var i = 0; i < args.length; i++) {
+          args[i] = arguments[i + 1];
+      }
+      // Store and register the task
+      var task = { callback: callback, args: args };
+      tasksByHandle[nextHandle] = task;
+      registerImmediate(nextHandle);
+      return nextHandle++;
+    }
+
+    function clearImmediate(handle) {
+        delete tasksByHandle[handle];
+    }
+
+    function run(task) {
+        var callback = task.callback;
+        var args = task.args;
+        switch (args.length) {
+        case 0:
+            callback();
+            break;
+        case 1:
+            callback(args[0]);
+            break;
+        case 2:
+            callback(args[0], args[1]);
+            break;
+        case 3:
+            callback(args[0], args[1], args[2]);
+            break;
+        default:
+            callback.apply(undefined, args);
+            break;
+        }
+    }
+
+    function runIfPresent(handle) {
+        // From the spec: "Wait until any invocations of this algorithm started before this one have completed."
+        // So if we're currently running a task, we'll need to delay this invocation.
+        if (currentlyRunningATask) {
+            // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a
+            // "too much recursion" error.
+            setTimeout(runIfPresent, 0, handle);
+        } else {
+            var task = tasksByHandle[handle];
+            if (task) {
+                currentlyRunningATask = true;
+                try {
+                    run(task);
+                } finally {
+                    clearImmediate(handle);
+                    currentlyRunningATask = false;
+                }
+            }
+        }
+    }
+
+    function installNextTickImplementation() {
+        registerImmediate = function(handle) {
+            process.nextTick(function () { runIfPresent(handle); });
+        };
+    }
+
+    function canUsePostMessage() {
+        // The test against `importScripts` prevents this implementation from being installed inside a web worker,
+        // where `global.postMessage` means something completely different and can't be used for this purpose.
+        if (global.postMessage && !global.importScripts) {
+            var postMessageIsAsynchronous = true;
+            var oldOnMessage = global.onmessage;
+            global.onmessage = function() {
+                postMessageIsAsynchronous = false;
+            };
+            global.postMessage("", "*");
+            global.onmessage = oldOnMessage;
+            return postMessageIsAsynchronous;
+        }
+    }
+
+    function installPostMessageImplementation() {
+        // Installs an event handler on `global` for the `message` event: see
+        // * https://developer.mozilla.org/en/DOM/window.postMessage
+        // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages
+
+        var messagePrefix = "setImmediate$" + Math.random() + "$";
+        var onGlobalMessage = function(event) {
+            if (event.source === global &&
+                typeof event.data === "string" &&
+                event.data.indexOf(messagePrefix) === 0) {
+                runIfPresent(+event.data.slice(messagePrefix.length));
+            }
+        };
+
+        if (global.addEventListener) {
+            global.addEventListener("message", onGlobalMessage, false);
+        } else {
+            global.attachEvent("onmessage", onGlobalMessage);
+        }
+
+        registerImmediate = function(handle) {
+            global.postMessage(messagePrefix + handle, "*");
+        };
+    }
+
+    function installMessageChannelImplementation() {
+        var channel = new MessageChannel();
+        channel.port1.onmessage = function(event) {
+            var handle = event.data;
+            runIfPresent(handle);
+        };
+
+        registerImmediate = function(handle) {
+            channel.port2.postMessage(handle);
+        };
+    }
+
+    function installReadyStateChangeImplementation() {
+        var html = doc.documentElement;
+        registerImmediate = function(handle) {
+            // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted
+            // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.
+            var script = doc.createElement("script");
+            script.onreadystatechange = function () {
+                runIfPresent(handle);
+                script.onreadystatechange = null;
+                html.removeChild(script);
+                script = null;
+            };
+            html.appendChild(script);
+        };
+    }
+
+    function installSetTimeoutImplementation() {
+        registerImmediate = function(handle) {
+            setTimeout(runIfPresent, 0, handle);
+        };
+    }
+
+    // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.
+    var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);
+    attachTo = attachTo && attachTo.setTimeout ? attachTo : global;
+
+    // Don't get fooled by e.g. browserify environments.
+    if ({}.toString.call(global.process) === "[object process]") {
+        // For Node.js before 0.9
+        installNextTickImplementation();
+
+    } else if (canUsePostMessage()) {
+        // For non-IE10 modern browsers
+        installPostMessageImplementation();
+
+    } else if (global.MessageChannel) {
+        // For web workers, where supported
+        installMessageChannelImplementation();
+
+    } else if (doc && "onreadystatechange" in doc.createElement("script")) {
+        // For IE 6–8
+        installReadyStateChangeImplementation();
+
+    } else {
+        // For older browsers
+        installSetTimeoutImplementation();
+    }
+
+    attachTo.setImmediate = setImmediate;
+    attachTo.clearImmediate = clearImmediate;
+}(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self));
+
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buildin/global.js */ "./node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../process/browser.js */ "./node_modules/webpack/node_modules/process/browser.js")))
+
+/***/ }),
+
+/***/ "./node_modules/webpack/node_modules/stream-browserify/index.js":
+/*!*********************************************************!*\
+  !*** (webpack)/node_modules/stream-browserify/index.js ***!
+  \*********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+module.exports = Stream;
+
+var EE = __webpack_require__(/*! events */ "./node_modules/webpack/node_modules/events/events.js").EventEmitter;
+var inherits = __webpack_require__(/*! inherits */ "./node_modules/webpack/node_modules/inherits/inherits_browser.js");
+
+inherits(Stream, EE);
+Stream.Readable = __webpack_require__(/*! readable-stream/readable.js */ "./node_modules/webpack/node_modules/readable-stream/readable-browser.js");
+Stream.Writable = __webpack_require__(/*! readable-stream/writable.js */ "./node_modules/webpack/node_modules/readable-stream/writable-browser.js");
+Stream.Duplex = __webpack_require__(/*! readable-stream/duplex.js */ "./node_modules/webpack/node_modules/readable-stream/duplex-browser.js");
+Stream.Transform = __webpack_require__(/*! readable-stream/transform.js */ "./node_modules/webpack/node_modules/readable-stream/transform.js");
+Stream.PassThrough = __webpack_require__(/*! readable-stream/passthrough.js */ "./node_modules/webpack/node_modules/readable-stream/passthrough.js");
+
+// Backwards-compat with node 0.4.x
+Stream.Stream = Stream;
+
+
+
+// old-style streams.  Note that the pipe method (the only relevant
+// part of this class) is overridden in the Readable class.
+
+function Stream() {
+  EE.call(this);
+}
+
+Stream.prototype.pipe = function(dest, options) {
+  var source = this;
+
+  function ondata(chunk) {
+    if (dest.writable) {
+      if (false === dest.write(chunk) && source.pause) {
+        source.pause();
+      }
+    }
+  }
+
+  source.on('data', ondata);
+
+  function ondrain() {
+    if (source.readable && source.resume) {
+      source.resume();
+    }
+  }
+
+  dest.on('drain', ondrain);
+
+  // If the 'end' option is not supplied, dest.end() will be called when
+  // source gets the 'end' or 'close' events.  Only dest.end() once.
+  if (!dest._isStdio && (!options || options.end !== false)) {
+    source.on('end', onend);
+    source.on('close', onclose);
+  }
+
+  var didOnEnd = false;
+  function onend() {
+    if (didOnEnd) return;
+    didOnEnd = true;
+
+    dest.end();
+  }
+
+
+  function onclose() {
+    if (didOnEnd) return;
+    didOnEnd = true;
+
+    if (typeof dest.destroy === 'function') dest.destroy();
+  }
+
+  // don't leave dangling pipes when there are errors.
+  function onerror(er) {
+    cleanup();
+    if (EE.listenerCount(this, 'error') === 0) {
+      throw er; // Unhandled stream error in pipe.
+    }
+  }
+
+  source.on('error', onerror);
+  dest.on('error', onerror);
+
+  // remove all the event listeners that were added.
+  function cleanup() {
+    source.removeListener('data', ondata);
+    dest.removeListener('drain', ondrain);
+
+    source.removeListener('end', onend);
+    source.removeListener('close', onclose);
+
+    source.removeListener('error', onerror);
+    dest.removeListener('error', onerror);
+
+    source.removeListener('end', cleanup);
+    source.removeListener('close', cleanup);
+
+    dest.removeListener('close', cleanup);
+  }
+
+  source.on('end', cleanup);
+  source.on('close', cleanup);
+
+  dest.on('close', cleanup);
+
+  dest.emit('pipe', source);
+
+  // Allow for unix-like usage: A.pipe(B).pipe(C)
+  return dest;
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/webpack/node_modules/string_decoder/lib/string_decoder.js":
+/*!*******************************************************************!*\
+  !*** (webpack)/node_modules/string_decoder/lib/string_decoder.js ***!
+  \*******************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+
+/*<replacement>*/
+
+var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/webpack/node_modules/safe-buffer/index.js").Buffer;
+/*</replacement>*/
+
+var isEncoding = Buffer.isEncoding || function (encoding) {
+  encoding = '' + encoding;
+  switch (encoding && encoding.toLowerCase()) {
+    case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
+      return true;
+    default:
+      return false;
+  }
+};
+
+function _normalizeEncoding(enc) {
+  if (!enc) return 'utf8';
+  var retried;
+  while (true) {
+    switch (enc) {
+      case 'utf8':
+      case 'utf-8':
+        return 'utf8';
+      case 'ucs2':
+      case 'ucs-2':
+      case 'utf16le':
+      case 'utf-16le':
+        return 'utf16le';
+      case 'latin1':
+      case 'binary':
+        return 'latin1';
+      case 'base64':
+      case 'ascii':
+      case 'hex':
+        return enc;
+      default:
+        if (retried) return; // undefined
+        enc = ('' + enc).toLowerCase();
+        retried = true;
+    }
+  }
+};
+
+// Do not cache `Buffer.isEncoding` when checking encoding names as some
+// modules monkey-patch it to support additional encodings
+function normalizeEncoding(enc) {
+  var nenc = _normalizeEncoding(enc);
+  if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
+  return nenc || enc;
+}
+
+// StringDecoder provides an interface for efficiently splitting a series of
+// buffers into a series of JS strings without breaking apart multi-byte
+// characters.
+exports.StringDecoder = StringDecoder;
+function StringDecoder(encoding) {
+  this.encoding = normalizeEncoding(encoding);
+  var nb;
+  switch (this.encoding) {
+    case 'utf16le':
+      this.text = utf16Text;
+      this.end = utf16End;
+      nb = 4;
+      break;
+    case 'utf8':
+      this.fillLast = utf8FillLast;
+      nb = 4;
+      break;
+    case 'base64':
+      this.text = base64Text;
+      this.end = base64End;
+      nb = 3;
+      break;
+    default:
+      this.write = simpleWrite;
+      this.end = simpleEnd;
+      return;
+  }
+  this.lastNeed = 0;
+  this.lastTotal = 0;
+  this.lastChar = Buffer.allocUnsafe(nb);
+}
+
+StringDecoder.prototype.write = function (buf) {
+  if (buf.length === 0) return '';
+  var r;
+  var i;
+  if (this.lastNeed) {
+    r = this.fillLast(buf);
+    if (r === undefined) return '';
+    i = this.lastNeed;
+    this.lastNeed = 0;
+  } else {
+    i = 0;
+  }
+  if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
+  return r || '';
+};
+
+StringDecoder.prototype.end = utf8End;
+
+// Returns only complete characters in a Buffer
+StringDecoder.prototype.text = utf8Text;
+
+// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
+StringDecoder.prototype.fillLast = function (buf) {
+  if (this.lastNeed <= buf.length) {
+    buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
+    return this.lastChar.toString(this.encoding, 0, this.lastTotal);
+  }
+  buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
+  this.lastNeed -= buf.length;
+};
+
+// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
+// continuation byte. If an invalid byte is detected, -2 is returned.
+function utf8CheckByte(byte) {
+  if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
+  return byte >> 6 === 0x02 ? -1 : -2;
+}
+
+// Checks at most 3 bytes at the end of a Buffer in order to detect an
+// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
+// needed to complete the UTF-8 character (if applicable) are returned.
+function utf8CheckIncomplete(self, buf, i) {
+  var j = buf.length - 1;
+  if (j < i) return 0;
+  var nb = utf8CheckByte(buf[j]);
+  if (nb >= 0) {
+    if (nb > 0) self.lastNeed = nb - 1;
+    return nb;
+  }
+  if (--j < i || nb === -2) return 0;
+  nb = utf8CheckByte(buf[j]);
+  if (nb >= 0) {
+    if (nb > 0) self.lastNeed = nb - 2;
+    return nb;
+  }
+  if (--j < i || nb === -2) return 0;
+  nb = utf8CheckByte(buf[j]);
+  if (nb >= 0) {
+    if (nb > 0) {
+      if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
+    }
+    return nb;
+  }
+  return 0;
+}
+
+// Validates as many continuation bytes for a multi-byte UTF-8 character as
+// needed or are available. If we see a non-continuation byte where we expect
+// one, we "replace" the validated continuation bytes we've seen so far with
+// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
+// behavior. The continuation byte check is included three times in the case
+// where all of the continuation bytes for a character exist in the same buffer.
+// It is also done this way as a slight performance increase instead of using a
+// loop.
+function utf8CheckExtraBytes(self, buf, p) {
+  if ((buf[0] & 0xC0) !== 0x80) {
+    self.lastNeed = 0;
+    return '\ufffd';
+  }
+  if (self.lastNeed > 1 && buf.length > 1) {
+    if ((buf[1] & 0xC0) !== 0x80) {
+      self.lastNeed = 1;
+      return '\ufffd';
+    }
+    if (self.lastNeed > 2 && buf.length > 2) {
+      if ((buf[2] & 0xC0) !== 0x80) {
+        self.lastNeed = 2;
+        return '\ufffd';
+      }
+    }
+  }
+}
+
+// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
+function utf8FillLast(buf) {
+  var p = this.lastTotal - this.lastNeed;
+  var r = utf8CheckExtraBytes(this, buf, p);
+  if (r !== undefined) return r;
+  if (this.lastNeed <= buf.length) {
+    buf.copy(this.lastChar, p, 0, this.lastNeed);
+    return this.lastChar.toString(this.encoding, 0, this.lastTotal);
+  }
+  buf.copy(this.lastChar, p, 0, buf.length);
+  this.lastNeed -= buf.length;
+}
+
+// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
+// partial character, the character's bytes are buffered until the required
+// number of bytes are available.
+function utf8Text(buf, i) {
+  var total = utf8CheckIncomplete(this, buf, i);
+  if (!this.lastNeed) return buf.toString('utf8', i);
+  this.lastTotal = total;
+  var end = buf.length - (total - this.lastNeed);
+  buf.copy(this.lastChar, 0, end);
+  return buf.toString('utf8', i, end);
+}
+
+// For UTF-8, a replacement character is added when ending on a partial
+// character.
+function utf8End(buf) {
+  var r = buf && buf.length ? this.write(buf) : '';
+  if (this.lastNeed) return r + '\ufffd';
+  return r;
+}
+
+// UTF-16LE typically needs two bytes per character, but even if we have an even
+// number of bytes available, we need to check if we end on a leading/high
+// surrogate. In that case, we need to wait for the next two bytes in order to
+// decode the last character properly.
+function utf16Text(buf, i) {
+  if ((buf.length - i) % 2 === 0) {
+    var r = buf.toString('utf16le', i);
+    if (r) {
+      var c = r.charCodeAt(r.length - 1);
+      if (c >= 0xD800 && c <= 0xDBFF) {
+        this.lastNeed = 2;
+        this.lastTotal = 4;
+        this.lastChar[0] = buf[buf.length - 2];
+        this.lastChar[1] = buf[buf.length - 1];
+        return r.slice(0, -1);
+      }
+    }
+    return r;
+  }
+  this.lastNeed = 1;
+  this.lastTotal = 2;
+  this.lastChar[0] = buf[buf.length - 1];
+  return buf.toString('utf16le', i, buf.length - 1);
+}
+
+// For UTF-16LE we do not explicitly append special replacement characters if we
+// end on a partial character, we simply let v8 handle that.
+function utf16End(buf) {
+  var r = buf && buf.length ? this.write(buf) : '';
+  if (this.lastNeed) {
+    var end = this.lastTotal - this.lastNeed;
+    return r + this.lastChar.toString('utf16le', 0, end);
+  }
+  return r;
+}
+
+function base64Text(buf, i) {
+  var n = (buf.length - i) % 3;
+  if (n === 0) return buf.toString('base64', i);
+  this.lastNeed = 3 - n;
+  this.lastTotal = 3;
+  if (n === 1) {
+    this.lastChar[0] = buf[buf.length - 1];
+  } else {
+    this.lastChar[0] = buf[buf.length - 2];
+    this.lastChar[1] = buf[buf.length - 1];
+  }
+  return buf.toString('base64', i, buf.length - n);
+}
+
+function base64End(buf) {
+  var r = buf && buf.length ? this.write(buf) : '';
+  if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
+  return r;
+}
+
+// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
+function simpleWrite(buf) {
+  return buf.toString(this.encoding);
+}
+
+function simpleEnd(buf) {
+  return buf && buf.length ? this.write(buf) : '';
+}
+
+/***/ }),
+
+/***/ "./node_modules/webpack/node_modules/timers-browserify/main.js":
+/*!********************************************************!*\
+  !*** (webpack)/node_modules/timers-browserify/main.js ***!
+  \********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* WEBPACK VAR INJECTION */(function(global) {var scope = (typeof global !== "undefined" && global) ||
+            (typeof self !== "undefined" && self) ||
+            window;
+var apply = Function.prototype.apply;
+
+// DOM APIs, for completeness
+
+exports.setTimeout = function() {
+  return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);
+};
+exports.setInterval = function() {
+  return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);
+};
+exports.clearTimeout =
+exports.clearInterval = function(timeout) {
+  if (timeout) {
+    timeout.close();
+  }
+};
+
+function Timeout(id, clearFn) {
+  this._id = id;
+  this._clearFn = clearFn;
+}
+Timeout.prototype.unref = Timeout.prototype.ref = function() {};
+Timeout.prototype.close = function() {
+  this._clearFn.call(scope, this._id);
+};
+
+// Does not start the time, just sets up the members needed.
+exports.enroll = function(item, msecs) {
+  clearTimeout(item._idleTimeoutId);
+  item._idleTimeout = msecs;
+};
+
+exports.unenroll = function(item) {
+  clearTimeout(item._idleTimeoutId);
+  item._idleTimeout = -1;
+};
+
+exports._unrefActive = exports.active = function(item) {
+  clearTimeout(item._idleTimeoutId);
+
+  var msecs = item._idleTimeout;
+  if (msecs >= 0) {
+    item._idleTimeoutId = setTimeout(function onTimeout() {
+      if (item._onTimeout)
+        item._onTimeout();
+    }, msecs);
+  }
+};
+
+// setimmediate attaches itself to the global object
+__webpack_require__(/*! setimmediate */ "./node_modules/webpack/node_modules/setimmediate/setImmediate.js");
+// On some exotic environments, it's not clear which object `setimmediate` was
+// able to install onto.  Search each possibility in the same order as the
+// `setimmediate` library.
+exports.setImmediate = (typeof self !== "undefined" && self.setImmediate) ||
+                       (typeof global !== "undefined" && global.setImmediate) ||
+                       (this && this.setImmediate);
+exports.clearImmediate = (typeof self !== "undefined" && self.clearImmediate) ||
+                         (typeof global !== "undefined" && global.clearImmediate) ||
+                         (this && this.clearImmediate);
+
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
+
+/***/ }),
+
+/***/ "./node_modules/webpack/node_modules/util-deprecate/browser.js":
+/*!********************************************************!*\
+  !*** (webpack)/node_modules/util-deprecate/browser.js ***!
+  \********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* WEBPACK VAR INJECTION */(function(global) {
+/**
+ * Module exports.
+ */
+
+module.exports = deprecate;
+
+/**
+ * Mark that a method should not be used.
+ * Returns a modified function which warns once by default.
+ *
+ * If `localStorage.noDeprecation = true` is set, then it is a no-op.
+ *
+ * If `localStorage.throwDeprecation = true` is set, then deprecated functions
+ * will throw an Error when invoked.
+ *
+ * If `localStorage.traceDeprecation = true` is set, then deprecated functions
+ * will invoke `console.trace()` instead of `console.error()`.
+ *
+ * @param {Function} fn - the function to deprecate
+ * @param {String} msg - the string to print to the console when `fn` is invoked
+ * @returns {Function} a new "deprecated" version of `fn`
+ * @api public
+ */
+
+function deprecate (fn, msg) {
+  if (config('noDeprecation')) {
+    return fn;
+  }
+
+  var warned = false;
+  function deprecated() {
+    if (!warned) {
+      if (config('throwDeprecation')) {
+        throw new Error(msg);
+      } else if (config('traceDeprecation')) {
+        console.trace(msg);
+      } else {
+        console.warn(msg);
+      }
+      warned = true;
+    }
+    return fn.apply(this, arguments);
+  }
+
+  return deprecated;
+}
+
+/**
+ * Checks `localStorage` for boolean values for the given `name`.
+ *
+ * @param {String} name
+ * @returns {Boolean}
+ * @api private
+ */
+
+function config (name) {
+  // accessing global.localStorage can trigger a DOMException in sandboxed iframes
+  try {
+    if (!global.localStorage) return false;
+  } catch (_) {
+    return false;
+  }
+  var val = global.localStorage[name];
+  if (null == val) return false;
+  return String(val).toLowerCase() === 'true';
+}
+
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
+
+/***/ }),
+
+/***/ 0:
+/*!**********************!*\
+  !*** util (ignored) ***!
+  \**********************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+/* (ignored) */
+
+/***/ }),
+
+/***/ 1:
+/*!**********************!*\
+  !*** util (ignored) ***!
+  \**********************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+/* (ignored) */
+
+/***/ })
+
+/******/ });
 //# sourceMappingURL=bundle.js.map
\ No newline at end of file
diff --git a/public/bundle.js.map b/public/bundle.js.map
index 31f4149..57452ee 100644
--- a/public/bundle.js.map
+++ b/public/bundle.js.map
@@ -1 +1 @@
-{"version":3,"file":"bundle.js","sources":["webpack:///bundle.js"],"sourcesContent":["!function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.r=function(t){Object.defineProperty(t,\"__esModule\",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,\"a\",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p=\"\",n(n.s=304)}([function(t,e,n){t.exports=n(294)()},function(t,e,n){\"use strict\";n.r(e),n.d(e,\"h\",function(){return s}),n.d(e,\"createElement\",function(){return s}),n.d(e,\"cloneElement\",function(){return l}),n.d(e,\"Component\",function(){return F}),n.d(e,\"render\",function(){return N}),n.d(e,\"rerender\",function(){return f}),n.d(e,\"options\",function(){return i});var i={},r=[],o=[];function s(t,e){var n,s,a,u,l=o;for(u=arguments.length;u-- >2;)r.push(arguments[u]);for(e&&null!=e.children&&(r.length||r.push(e.children),delete e.children);r.length;)if((s=r.pop())&&void 0!==s.pop)for(u=s.length;u--;)r.push(s[u]);else\"boolean\"==typeof s&&(s=null),(a=\"function\"!=typeof t)&&(null==s?s=\"\":\"number\"==typeof s?s=String(s):\"string\"!=typeof s&&(a=!1)),a&&n?l[l.length-1]+=s:l===o?l=[s]:l.push(s),n=a;var c=new function(){};return c.nodeName=t,c.children=l,c.attributes=null==e?void 0:e,c.key=null==e?void 0:e.key,void 0!==i.vnode&&i.vnode(c),c}function a(t,e){for(var n in e)t[n]=e[n];return t}var u=\"function\"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout;function l(t,e){return s(t.nodeName,a(a({},t.attributes),e),arguments.length>2?[].slice.call(arguments,2):t.children)}var c=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,h=[];function p(t){!t._dirty&&(t._dirty=!0)&&1==h.push(t)&&(i.debounceRendering||u)(f)}function f(){var t,e=h;for(h=[];t=e.pop();)t._dirty&&R(t)}function d(t,e){return t.normalizedNodeName===e||t.nodeName.toLowerCase()===e.toLowerCase()}function y(t){var e=a({},t.attributes);e.children=t.children;var n=t.nodeName.defaultProps;if(void 0!==n)for(var i in n)void 0===e[i]&&(e[i]=n[i]);return e}function m(t){var e=t.parentNode;e&&e.removeChild(t)}function _(t,e,n,i,r){if(\"className\"===e&&(e=\"class\"),\"key\"===e);else if(\"ref\"===e)n&&n(null),i&&i(t);else if(\"class\"!==e||r)if(\"style\"===e){if(i&&\"string\"!=typeof i&&\"string\"!=typeof n||(t.style.cssText=i||\"\"),i&&\"object\"==typeof i){if(\"string\"!=typeof n)for(var o in n)o in i||(t.style[o]=\"\");for(var o in i)t.style[o]=\"number\"==typeof i[o]&&!1===c.test(o)?i[o]+\"px\":i[o]}}else if(\"dangerouslySetInnerHTML\"===e)i&&(t.innerHTML=i.__html||\"\");else if(\"o\"==e[0]&&\"n\"==e[1]){var s=e!==(e=e.replace(/Capture$/,\"\"));e=e.toLowerCase().substring(2),i?n||t.addEventListener(e,v,s):t.removeEventListener(e,v,s),(t._listeners||(t._listeners={}))[e]=i}else if(\"list\"!==e&&\"type\"!==e&&!r&&e in t)!function(t,e,n){try{t[e]=n}catch(t){}}(t,e,null==i?\"\":i),null!=i&&!1!==i||t.removeAttribute(e);else{var a=r&&e!==(e=e.replace(/^xlink:?/,\"\"));null==i||!1===i?a?t.removeAttributeNS(\"http://www.w3.org/1999/xlink\",e.toLowerCase()):t.removeAttribute(e):\"function\"!=typeof i&&(a?t.setAttributeNS(\"http://www.w3.org/1999/xlink\",e.toLowerCase(),i):t.setAttribute(e,i))}else t.className=i||\"\"}function v(t){return this._listeners[t.type](i.event&&i.event(t)||t)}var g=[],b=0,w=!1,k=!1;function S(){for(var t;t=g.pop();)i.afterMount&&i.afterMount(t),t.componentDidMount&&t.componentDidMount()}function T(t,e,n,i,r,o){b++||(w=null!=r&&void 0!==r.ownerSVGElement,k=null!=t&&!(\"__preactattr_\"in t));var s=x(t,e,n,i,o);return r&&s.parentNode!==r&&r.appendChild(s),--b||(k=!1,o||S()),s}function x(t,e,n,i,r){var o=t,s=w;if(null!=e&&\"boolean\"!=typeof e||(e=\"\"),\"string\"==typeof e||\"number\"==typeof e)return t&&void 0!==t.splitText&&t.parentNode&&(!t._component||r)?t.nodeValue!=e&&(t.nodeValue=e):(o=document.createTextNode(e),t&&(t.parentNode&&t.parentNode.replaceChild(o,t),O(t,!0))),o.__preactattr_=!0,o;var a,u,l=e.nodeName;if(\"function\"==typeof l)return function(t,e,n,i){var r=t&&t._component,o=r,s=t,a=r&&t._componentConstructor===e.nodeName,u=a,l=y(e);for(;r&&!u&&(r=r._parentComponent);)u=r.constructor===e.nodeName;r&&u&&(!i||r._component)?(M(r,l,3,n,i),t=r.base):(o&&!a&&(j(o),t=s=null),r=E(e.nodeName,l,n),t&&!r.nextBase&&(r.nextBase=t,s=null),M(r,l,1,n,i),t=r.base,s&&t!==s&&(s._component=null,O(s,!1)));return t}(t,e,n,i);if(w=\"svg\"===l||\"foreignObject\"!==l&&w,l=String(l),(!t||!d(t,l))&&(a=l,(u=w?document.createElementNS(\"http://www.w3.org/2000/svg\",a):document.createElement(a)).normalizedNodeName=a,o=u,t)){for(;t.firstChild;)o.appendChild(t.firstChild);t.parentNode&&t.parentNode.replaceChild(o,t),O(t,!0)}var c=o.firstChild,h=o.__preactattr_,p=e.children;if(null==h){h=o.__preactattr_={};for(var f=o.attributes,v=f.length;v--;)h[f[v].name]=f[v].value}return!k&&p&&1===p.length&&\"string\"==typeof p[0]&&null!=c&&void 0!==c.splitText&&null==c.nextSibling?c.nodeValue!=p[0]&&(c.nodeValue=p[0]):(p&&p.length||null!=c)&&function(t,e,n,i,r){var o,s,a,u,l,c=t.childNodes,h=[],p={},f=0,y=0,_=c.length,v=0,g=e?e.length:0;if(0!==_)for(var b=0;b<_;b++){var w=c[b],k=w.__preactattr_,S=g&&k?w._component?w._component.__key:k.key:null;null!=S?(f++,p[S]=w):(k||(void 0!==w.splitText?!r||w.nodeValue.trim():r))&&(h[v++]=w)}if(0!==g)for(var b=0;b<g;b++){u=e[b],l=null;var S=u.key;if(null!=S)f&&void 0!==p[S]&&(l=p[S],p[S]=void 0,f--);else if(!l&&y<v)for(o=y;o<v;o++)if(void 0!==h[o]&&(T=s=h[o],A=r,\"string\"==typeof(P=u)||\"number\"==typeof P?void 0!==T.splitText:\"string\"==typeof P.nodeName?!T._componentConstructor&&d(T,P.nodeName):A||T._componentConstructor===P.nodeName)){l=s,h[o]=void 0,o===v-1&&v--,o===y&&y++;break}l=x(l,u,n,i),a=c[b],l&&l!==t&&l!==a&&(null==a?t.appendChild(l):l===a.nextSibling?m(a):t.insertBefore(l,a))}var T,P,A;if(f)for(var b in p)void 0!==p[b]&&O(p[b],!1);for(;y<=v;)void 0!==(l=h[v--])&&O(l,!1)}(o,p,n,i,k||null!=h.dangerouslySetInnerHTML),function(t,e,n){var i;for(i in n)e&&null!=e[i]||null==n[i]||_(t,i,n[i],n[i]=void 0,w);for(i in e)\"children\"===i||\"innerHTML\"===i||i in n&&e[i]===(\"value\"===i||\"checked\"===i?t[i]:n[i])||_(t,i,n[i],n[i]=e[i],w)}(o,e.attributes,h),w=s,o}function O(t,e){var n=t._component;n?j(n):(null!=t.__preactattr_&&t.__preactattr_.ref&&t.__preactattr_.ref(null),!1!==e&&null!=t.__preactattr_||m(t),P(t))}function P(t){for(t=t.lastChild;t;){var e=t.previousSibling;O(t,!0),t=e}}var A={};function E(t,e,n){var i,r=A[t.name];if(t.prototype&&t.prototype.render?(i=new t(e,n),F.call(i,e,n)):((i=new F(e,n)).constructor=t,i.render=C),r)for(var o=r.length;o--;)if(r[o].constructor===t){i.nextBase=r[o].nextBase,r.splice(o,1);break}return i}function C(t,e,n){return this.constructor(t,n)}function M(t,e,n,r,o){t._disable||(t._disable=!0,(t.__ref=e.ref)&&delete e.ref,(t.__key=e.key)&&delete e.key,!t.base||o?t.componentWillMount&&t.componentWillMount():t.componentWillReceiveProps&&t.componentWillReceiveProps(e,r),r&&r!==t.context&&(t.prevContext||(t.prevContext=t.context),t.context=r),t.prevProps||(t.prevProps=t.props),t.props=e,t._disable=!1,0!==n&&(1!==n&&!1===i.syncComponentUpdates&&t.base?p(t):R(t,1,o)),t.__ref&&t.__ref(t))}function R(t,e,n,r){if(!t._disable){var o,s,u,l=t.props,c=t.state,h=t.context,p=t.prevProps||l,f=t.prevState||c,d=t.prevContext||h,m=t.base,_=t.nextBase,v=m||_,w=t._component,k=!1;if(m&&(t.props=p,t.state=f,t.context=d,2!==e&&t.shouldComponentUpdate&&!1===t.shouldComponentUpdate(l,c,h)?k=!0:t.componentWillUpdate&&t.componentWillUpdate(l,c,h),t.props=l,t.state=c,t.context=h),t.prevProps=t.prevState=t.prevContext=t.nextBase=null,t._dirty=!1,!k){o=t.render(l,c,h),t.getChildContext&&(h=a(a({},h),t.getChildContext()));var x,P,A=o&&o.nodeName;if(\"function\"==typeof A){var C=y(o);(s=w)&&s.constructor===A&&C.key==s.__key?M(s,C,1,h,!1):(x=s,t._component=s=E(A,C,h),s.nextBase=s.nextBase||_,s._parentComponent=t,M(s,C,0,h,!1),R(s,1,n,!0)),P=s.base}else u=v,(x=w)&&(u=t._component=null),(v||1===e)&&(u&&(u._component=null),P=T(u,o,h,n||!m,v&&v.parentNode,!0));if(v&&P!==v&&s!==w){var F=v.parentNode;F&&P!==F&&(F.replaceChild(P,v),x||(v._component=null,O(v,!1)))}if(x&&j(x),t.base=P,P&&!r){for(var N=t,L=t;L=L._parentComponent;)(N=L).base=P;P._component=N,P._componentConstructor=N.constructor}}if(!m||n?g.unshift(t):k||(t.componentDidUpdate&&t.componentDidUpdate(p,f,d),i.afterUpdate&&i.afterUpdate(t)),null!=t._renderCallbacks)for(;t._renderCallbacks.length;)t._renderCallbacks.pop().call(t);b||r||S()}}function j(t){i.beforeUnmount&&i.beforeUnmount(t);var e=t.base;t._disable=!0,t.componentWillUnmount&&t.componentWillUnmount(),t.base=null;var n=t._component;n?j(n):e&&(e.__preactattr_&&e.__preactattr_.ref&&e.__preactattr_.ref(null),t.nextBase=e,m(e),function(t){var e=t.constructor.name;(A[e]||(A[e]=[])).push(t)}(t),P(e)),t.__ref&&t.__ref(null)}function F(t,e){this._dirty=!0,this.context=e,this.props=t,this.state=this.state||{}}function N(t,e,n){return T(n,t,{},!1,e,!1)}a(F.prototype,{setState:function(t,e){var n=this.state;this.prevState||(this.prevState=a({},n)),a(n,\"function\"==typeof t?t(n,this.props):t),e&&(this._renderCallbacks=this._renderCallbacks||[]).push(e),p(this)},forceUpdate:function(t){t&&(this._renderCallbacks=this._renderCallbacks||[]).push(t),R(this,2)},render:function(){}});var L={h:s,createElement:s,cloneElement:l,Component:F,render:N,rerender:f,options:i};e.default=L},function(t,e,n){\"use strict\";n.r(e),n.d(e,\"createStore\",function(){return u}),n.d(e,\"combineReducers\",function(){return c}),n.d(e,\"bindActionCreators\",function(){return p}),n.d(e,\"applyMiddleware\",function(){return d}),n.d(e,\"compose\",function(){return f}),n.d(e,\"__DO_NOT_USE__ActionTypes\",function(){return r});var i=n(84),r={INIT:\"@@redux/INIT\"+Math.random().toString(36).substring(7).split(\"\").join(\".\"),REPLACE:\"@@redux/REPLACE\"+Math.random().toString(36).substring(7).split(\"\").join(\".\")},o=\"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},s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};function a(t){if(\"object\"!==(void 0===t?\"undefined\":o(t))||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function u(t,e,n){var s;if(\"function\"==typeof e&&void 0===n&&(n=e,e=void 0),void 0!==n){if(\"function\"!=typeof n)throw new Error(\"Expected the enhancer to be a function.\");return n(u)(t,e)}if(\"function\"!=typeof t)throw new Error(\"Expected the reducer to be a function.\");var l=t,c=e,h=[],p=h,f=!1;function d(){p===h&&(p=h.slice())}function y(){if(f)throw new Error(\"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.\");return c}function m(t){if(\"function\"!=typeof t)throw new Error(\"Expected the listener to be a function.\");if(f)throw new Error(\"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.\");var e=!0;return d(),p.push(t),function(){if(e){if(f)throw new Error(\"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.\");e=!1,d();var n=p.indexOf(t);p.splice(n,1)}}}function _(t){if(!a(t))throw new Error(\"Actions must be plain objects. Use custom middleware for async actions.\");if(void 0===t.type)throw new Error('Actions may not have an undefined \"type\" property. Have you misspelled a constant?');if(f)throw new Error(\"Reducers may not dispatch actions.\");try{f=!0,c=l(c,t)}finally{f=!1}for(var e=h=p,n=0;n<e.length;n++){(0,e[n])()}return t}return _({type:r.INIT}),(s={dispatch:_,subscribe:m,getState:y,replaceReducer:function(t){if(\"function\"!=typeof t)throw new Error(\"Expected the nextReducer to be a function.\");l=t,_({type:r.REPLACE})}})[i.a]=function(){var t,e=m;return(t={subscribe:function(t){if(\"object\"!==(void 0===t?\"undefined\":o(t))||null===t)throw new TypeError(\"Expected the observer to be an object.\");function n(){t.next&&t.next(y())}return n(),{unsubscribe:e(n)}}})[i.a]=function(){return this},t},s}function l(t,e){var n=e&&e.type;return\"Given \"+(n&&'action \"'+String(n)+'\"'||\"an action\")+', reducer \"'+t+'\" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function c(t){for(var e=Object.keys(t),n={},i=0;i<e.length;i++){var o=e[i];0,\"function\"==typeof t[o]&&(n[o]=t[o])}var s=Object.keys(n);var a=void 0;try{!function(t){Object.keys(t).forEach(function(e){var n=t[e];if(void 0===n(void 0,{type:r.INIT}))throw new Error('Reducer \"'+e+\"\\\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.\");if(void 0===n(void 0,{type:\"@@redux/PROBE_UNKNOWN_ACTION_\"+Math.random().toString(36).substring(7).split(\"\").join(\".\")}))throw new Error('Reducer \"'+e+\"\\\" returned undefined when probed with a random type. Don't try to handle \"+r.INIT+' or other actions in \"redux/*\" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')})}(n)}catch(t){a=t}return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];if(a)throw a;for(var i=!1,r={},o=0;o<s.length;o++){var u=s[o],c=n[u],h=t[u],p=c(h,e);if(void 0===p){var f=l(u,e);throw new Error(f)}r[u]=p,i=i||p!==h}return i?r:t}}function h(t,e){return function(){return e(t.apply(this,arguments))}}function p(t,e){if(\"function\"==typeof t)return h(t,e);if(\"object\"!==(void 0===t?\"undefined\":o(t))||null===t)throw new Error(\"bindActionCreators expected an object or a function, instead received \"+(null===t?\"null\":void 0===t?\"undefined\":o(t))+'. Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?');for(var n=Object.keys(t),i={},r=0;r<n.length;r++){var s=n[r],a=t[s];\"function\"==typeof a&&(i[s]=h(a,e))}return i}function f(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce(function(t,e){return function(){return t(e.apply(void 0,arguments))}})}function d(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return function(){for(var n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];var o=t.apply(void 0,i),a=function(){throw new Error(\"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.\")},u={getState:o.getState,dispatch:function(){return a.apply(void 0,arguments)}},l=e.map(function(t){return t(u)});return a=f.apply(void 0,l)(o.dispatch),s({},o,{dispatch:a})}}}},function(t,e,n){\"use strict\";n.r(e);var i=n(4),r=n(16),o=n.n(r),s=o.a.shape({trySubscribe:o.a.func.isRequired,tryUnsubscribe:o.a.func.isRequired,notifyNestedSubs:o.a.func.isRequired,isSubscribed:o.a.func.isRequired}),a=o.a.shape({subscribe:o.a.func.isRequired,dispatch:o.a.func.isRequired,getState:o.a.func.isRequired});function u(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"store\",n=arguments[1]||e+\"Subscription\",r=function(t){function r(n,i){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,r);var o=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,t.call(this,n,i));return o[e]=n.store,o}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),r.prototype.getChildContext=function(){var t;return(t={})[e]=this[e],t[n]=null,t},r.prototype.render=function(){return i.a.only(this.props.children)},r}(i.b);return r.propTypes={store:a.isRequired,children:o.a.element.isRequired},r.childContextTypes=((t={})[e]=a.isRequired,t[n]=s,t),r}var l=u(),c=n(143),h=n.n(c),p=n(62),f=n.n(p);var d=null,y={notify:function(){}};var m=function(){function t(e,n,i){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this.store=e,this.parentSub=n,this.onStateChange=i,this.unsubscribe=null,this.listeners=y}return t.prototype.addNestedSub=function(t){return this.trySubscribe(),this.listeners.subscribe(t)},t.prototype.notifyNestedSubs=function(){this.listeners.notify()},t.prototype.isSubscribed=function(){return Boolean(this.unsubscribe)},t.prototype.trySubscribe=function(){var t,e;this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.onStateChange):this.store.subscribe(this.onStateChange),this.listeners=(t=[],e=[],{clear:function(){e=d,t=d},notify:function(){for(var n=t=e,i=0;i<n.length;i++)n[i]()},get:function(){return e},subscribe:function(n){var i=!0;return e===t&&(e=t.slice()),e.push(n),function(){i&&t!==d&&(i=!1,e===t&&(e=t.slice()),e.splice(e.indexOf(n),1))}}}))},t.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=y)},t}(),_=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};var v=0,g={};function b(){}function w(t){var e,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.getDisplayName,u=void 0===o?function(t){return\"ConnectAdvanced(\"+t+\")\"}:o,l=r.methodName,c=void 0===l?\"connectAdvanced\":l,p=r.renderCountProp,d=void 0===p?void 0:p,y=r.shouldHandleStateChanges,w=void 0===y||y,k=r.storeKey,S=void 0===k?\"store\":k,T=r.withRef,x=void 0!==T&&T,O=function(t,e){var n={};for(var i in t)e.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(r,[\"getDisplayName\",\"methodName\",\"renderCountProp\",\"shouldHandleStateChanges\",\"storeKey\",\"withRef\"]),P=S+\"Subscription\",A=v++,E=((e={})[S]=a,e[P]=s,e),C=((n={})[P]=s,n);return function(e){f()(\"function\"==typeof e,\"You must pass a component to the function returned by \"+c+\". Instead received \"+JSON.stringify(e));var n=e.displayName||e.name||\"Component\",r=u(n),o=_({},O,{getDisplayName:u,methodName:c,renderCountProp:d,shouldHandleStateChanges:w,storeKey:S,withRef:x,displayName:r,wrappedComponentName:n,WrappedComponent:e}),s=function(n){function s(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,s);var i=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,n.call(this,t,e));return i.version=A,i.state={},i.renderCount=0,i.store=t[S]||e[S],i.propsMode=Boolean(t[S]),i.setWrappedInstance=i.setWrappedInstance.bind(i),f()(i.store,'Could not find \"'+S+'\" in either the context or props of \"'+r+'\". Either wrap the root component in a <Provider>, or explicitly pass \"'+S+'\" as a prop to \"'+r+'\".'),i.initSelector(),i.initSubscription(),i}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(s,n),s.prototype.getChildContext=function(){var t,e=this.propsMode?null:this.subscription;return(t={})[P]=e||this.context[P],t},s.prototype.componentDidMount=function(){w&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},s.prototype.componentWillReceiveProps=function(t){this.selector.run(t)},s.prototype.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},s.prototype.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=b,this.store=null,this.selector.run=b,this.selector.shouldComponentUpdate=!1},s.prototype.getWrappedInstance=function(){return f()(x,\"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the \"+c+\"() call.\"),this.wrappedInstance},s.prototype.setWrappedInstance=function(t){this.wrappedInstance=t},s.prototype.initSelector=function(){var e=t(this.store.dispatch,o);this.selector=function(t,e){var n={run:function(i){try{var r=t(e.getState(),i);(r!==n.props||n.error)&&(n.shouldComponentUpdate=!0,n.props=r,n.error=null)}catch(t){n.shouldComponentUpdate=!0,n.error=t}}};return n}(e,this.store),this.selector.run(this.props)},s.prototype.initSubscription=function(){if(w){var t=(this.propsMode?this.props:this.context)[P];this.subscription=new m(this.store,t,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},s.prototype.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(g)):this.notifyNestedSubs()},s.prototype.notifyNestedSubsOnComponentDidUpdate=function(){this.componentDidUpdate=void 0,this.notifyNestedSubs()},s.prototype.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},s.prototype.addExtraProps=function(t){if(!(x||d||this.propsMode&&this.subscription))return t;var e=_({},t);return x&&(e.ref=this.setWrappedInstance),d&&(e[d]=this.renderCount++),this.propsMode&&this.subscription&&(e[P]=this.subscription),e},s.prototype.render=function(){var t=this.selector;if(t.shouldComponentUpdate=!1,t.error)throw t.error;return Object(i.c)(e,this.addExtraProps(t.props))},s}(i.b);return s.WrappedComponent=e,s.displayName=r,s.childContextTypes=C,s.contextTypes=E,s.propTypes=E,h()(s,e)}}var k=Object.prototype.hasOwnProperty;function S(t,e){return t===e?0!==t||0!==e||1/t==1/e:t!=t&&e!=e}function T(t,e){if(S(t,e))return!0;if(\"object\"!=typeof t||null===t||\"object\"!=typeof e||null===e)return!1;var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var r=0;r<n.length;r++)if(!k.call(e,n[r])||!S(t[n[r]],e[n[r]]))return!1;return!0}var x=n(2),O=n(305),P=\"object\"==typeof self&&self&&self.Object===Object&&self,A=(O.a||P||Function(\"return this\")()).Symbol,E=Object.prototype;E.hasOwnProperty,E.toString,A&&A.toStringTag;Object.prototype.toString;A&&A.toStringTag;Object.getPrototypeOf,Object;var C=Function.prototype,M=Object.prototype,R=C.toString;M.hasOwnProperty,R.call(Object);function j(t){return function(e,n){var i=t(e,n);function r(){return i}return r.dependsOnOwnProps=!1,r}}function F(t){return null!==t.dependsOnOwnProps&&void 0!==t.dependsOnOwnProps?Boolean(t.dependsOnOwnProps):1!==t.length}function N(t,e){return function(e,n){n.displayName;var i=function(t,e){return i.dependsOnOwnProps?i.mapToProps(t,e):i.mapToProps(t)};return i.dependsOnOwnProps=!0,i.mapToProps=function(e,n){i.mapToProps=t,i.dependsOnOwnProps=F(t);var r=i(e,n);return\"function\"==typeof r&&(i.mapToProps=r,i.dependsOnOwnProps=F(r),r=i(e,n)),r},i}}var L=[function(t){return\"function\"==typeof t?N(t):void 0},function(t){return t?void 0:j(function(t){return{dispatch:t}})},function(t){return t&&\"object\"==typeof t?j(function(e){return Object(x.bindActionCreators)(t,e)}):void 0}];var D=[function(t){return\"function\"==typeof t?N(t):void 0},function(t){return t?void 0:j(function(){return{}})}],q=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};function I(t,e,n){return q({},n,t,e)}var B=[function(t){return\"function\"==typeof t?function(t){return function(e,n){n.displayName;var i=n.pure,r=n.areMergedPropsEqual,o=!1,s=void 0;return function(e,n,a){var u=t(e,n,a);return o?i&&r(u,s)||(s=u):(o=!0,s=u),s}}}(t):void 0},function(t){return t?void 0:function(){return I}}];function U(t,e,n,i){return function(r,o){return n(t(r,o),e(i,o),o)}}function z(t,e,n,i,r){var o=r.areStatesEqual,s=r.areOwnPropsEqual,a=r.areStatePropsEqual,u=!1,l=void 0,c=void 0,h=void 0,p=void 0,f=void 0;function d(r,u){var d,y,m=!s(u,c),_=!o(r,l);return l=r,c=u,m&&_?(h=t(l,c),e.dependsOnOwnProps&&(p=e(i,c)),f=n(h,p,c)):m?(t.dependsOnOwnProps&&(h=t(l,c)),e.dependsOnOwnProps&&(p=e(i,c)),f=n(h,p,c)):_?(d=t(l,c),y=!a(d,h),h=d,y&&(f=n(h,p,c)),f):f}return function(r,o){return u?d(r,o):(h=t(l=r,c=o),p=e(i,c),f=n(h,p,c),u=!0,f)}}function Y(t,e){var n=e.initMapStateToProps,i=e.initMapDispatchToProps,r=e.initMergeProps,o=function(t,e){var n={};for(var i in t)e.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(e,[\"initMapStateToProps\",\"initMapDispatchToProps\",\"initMergeProps\"]),s=n(t,o),a=i(t,o),u=r(t,o);return(o.pure?z:U)(s,a,u,t,o)}var W=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};function G(t,e,n){for(var i=e.length-1;i>=0;i--){var r=e[i](t);if(r)return r}return function(e,i){throw new Error(\"Invalid value of type \"+typeof t+\" for \"+n+\" argument when connecting component \"+i.wrappedComponentName+\".\")}}function V(t,e){return t===e}var H=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.connectHOC,n=void 0===e?w:e,i=t.mapStateToPropsFactories,r=void 0===i?D:i,o=t.mapDispatchToPropsFactories,s=void 0===o?L:o,a=t.mergePropsFactories,u=void 0===a?B:a,l=t.selectorFactory,c=void 0===l?Y:l;return function(t,e,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=o.pure,l=void 0===a||a,h=o.areStatesEqual,p=void 0===h?V:h,f=o.areOwnPropsEqual,d=void 0===f?T:f,y=o.areStatePropsEqual,m=void 0===y?T:y,_=o.areMergedPropsEqual,v=void 0===_?T:_,g=function(t,e){var n={};for(var i in t)e.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(o,[\"pure\",\"areStatesEqual\",\"areOwnPropsEqual\",\"areStatePropsEqual\",\"areMergedPropsEqual\"]),b=G(t,r,\"mapStateToProps\"),w=G(e,s,\"mapDispatchToProps\"),k=G(i,u,\"mergeProps\");return n(c,W({methodName:\"connect\",getDisplayName:function(t){return\"Connect(\"+t+\")\"},shouldHandleStateChanges:Boolean(t),initMapStateToProps:b,initMapDispatchToProps:w,initMergeProps:k,pure:l,areStatesEqual:p,areOwnPropsEqual:d,areStatePropsEqual:m,areMergedPropsEqual:v},g))}}();n.d(e,\"Provider\",function(){return l}),n.d(e,\"createProvider\",function(){return u}),n.d(e,\"connectAdvanced\",function(){return w}),n.d(e,\"connect\",function(){return H})},function(t,e,n){\"use strict\";(function(t){n.d(e,\"a\",function(){return w}),n.d(e,\"c\",function(){return O}),n.d(e,\"b\",function(){return B});var i=n(61),r=n.n(i),o=n(1),s=\"a abbr address area article aside audio b base bdi bdo big blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins kbd keygen label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script section select small source span strong style sub summary sup table tbody td textarea tfoot th thead time title tr track u ul var video wbr circle clipPath defs ellipse g image line linearGradient mask path pattern polygon polyline radialGradient rect stop svg text tspan\".split(\" \"),a=\"undefined\"!=typeof Symbol&&Symbol.for&&Symbol.for(\"react.element\")||60103,u=\"undefined\"!=typeof Symbol&&Symbol.for?Symbol.for(\"__preactCompatWrapper\"):\"__preactCompatWrapper\",l={constructor:1,render:1,shouldComponentUpdate:1,componentWillReceiveProps:1,componentWillUpdate:1,componentDidUpdate:1,componentWillMount:1,componentDidMount:1,componentWillUnmount:1,componentDidUnmount:1},c=/^(?:accent|alignment|arabic|baseline|cap|clip|color|fill|flood|font|glyph|horiz|marker|overline|paint|stop|strikethrough|stroke|text|underline|unicode|units|v|vector|vert|word|writing|x)[A-Z]/,h={},p=void 0===t||!t.env||!1;function f(){return null}var d=Object(o.h)(\"a\",null).constructor;d.prototype.$$typeof=a,d.prototype.preactCompatUpgraded=!1,d.prototype.preactCompatNormalized=!1,Object.defineProperty(d.prototype,\"type\",{get:function(){return this.nodeName},set:function(t){this.nodeName=t},configurable:!0}),Object.defineProperty(d.prototype,\"props\",{get:function(){return this.attributes},set:function(t){this.attributes=t},configurable:!0});var y=o.options.event;o.options.event=function(t){return y&&(t=y(t)),t.persist=Object,t.nativeEvent=t,t};var m=o.options.vnode;function _(t,e,n){var i=e&&e._preactCompatRendered&&e._preactCompatRendered.base;i&&i.parentNode!==e&&(i=null),!i&&e&&(i=e.firstElementChild);for(var r=e.childNodes.length;r--;)e.childNodes[r]!==i&&e.removeChild(e.childNodes[r]);var s=Object(o.render)(t,e,i);return e&&(e._preactCompatRendered=s&&(s._component||{base:s})),\"function\"==typeof n&&n(),s&&s._component||s}o.options.vnode=function(t){if(!t.preactCompatUpgraded){t.preactCompatUpgraded=!0;var e=t.nodeName,n=t.attributes=C({},t.attributes);\"function\"==typeof e?(!0===e[u]||e.prototype&&\"isReactComponent\"in e.prototype)&&(t.children&&\"\"===String(t.children)&&(t.children=void 0),t.children&&(n.children=t.children),t.preactCompatNormalized||P(t),function(t){var e=t.nodeName,n=t.attributes;t.attributes={},e.defaultProps&&C(t.attributes,e.defaultProps);n&&C(t.attributes,n)}(t)):(t.children&&\"\"===String(t.children)&&(t.children=void 0),t.children&&(n.children=t.children),n.defaultValue&&(n.value||0===n.value||(n.value=n.defaultValue),delete n.defaultValue),function(t,e){var n,i,r;if(e){for(r in e)if(n=c.test(r))break;if(n)for(r in i=t.attributes={},e)e.hasOwnProperty(r)&&(i[c.test(r)?r.replace(/([A-Z0-9])/,\"-$1\").toLowerCase():r]=e[r])}}(t,n))}m&&m(t)};var v=function(){};v.prototype.getChildContext=function(){return this.props.context},v.prototype.render=function(t){return t.children[0]};var g,b=[],w={map:function(t,e,n){return null==t?null:(t=w.toArray(t),n&&n!==t&&(e=e.bind(n)),t.map(e))},forEach:function(t,e,n){if(null==t)return null;t=w.toArray(t),n&&n!==t&&(e=e.bind(n)),t.forEach(e)},count:function(t){return t&&t.length||0},only:function(t){if(1!==(t=w.toArray(t)).length)throw new Error(\"Children.only() expects only one child.\");return t[0]},toArray:function(t){return null==t?[]:b.concat(t)}};function k(t){return O.bind(null,t)}for(var S={},T=s.length;T--;)S[s[T]]=k(s[T]);function x(t){var e,n=t[u];return n?!0===n?t:n:(n=j({displayName:(e=t).displayName||e.name,render:function(){return e(this.props,this.context)}}),Object.defineProperty(n,u,{configurable:!0,value:!0}),n.displayName=t.displayName,n.propTypes=t.propTypes,n.defaultProps=t.defaultProps,Object.defineProperty(t,u,{configurable:!0,value:n}),n)}function O(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return function t(e,n){for(var i=n||0;i<e.length;i++){var r=e[i];Array.isArray(r)?t(r):r&&\"object\"==typeof r&&!A(r)&&(r.props&&r.type||r.attributes&&r.nodeName||r.children)&&(e[i]=O(r.type||r.nodeName,r.props||r.attributes,r.children))}}(t,2),P(o.h.apply(void 0,t))}function P(t){var e;t.preactCompatNormalized=!0,function(t){var e=t.attributes||(t.attributes={});E.enumerable=\"className\"in e,e.className&&(e.class=e.className);Object.defineProperty(e,\"className\",E)}(t),\"function\"!=typeof(e=t.nodeName)||e.prototype&&e.prototype.render||(t.nodeName=x(t.nodeName));var n,i,r=t.attributes.ref,o=r&&typeof r;return!g||\"string\"!==o&&\"number\"!==o||(t.attributes.ref=(n=r,(i=g)._refProxies[n]||(i._refProxies[n]=function(t){i&&i.refs&&(i.refs[n]=t,null===t&&(delete i._refProxies[n],i=null))}))),function(t){var e=t.nodeName,n=t.attributes;if(!n||\"string\"!=typeof e)return;var i={};for(var r in n)i[r.toLowerCase()]=r;i.ondoubleclick&&(n.ondblclick=n[i.ondoubleclick],delete n[i.ondoubleclick]);if(i.onchange&&(\"textarea\"===e||\"input\"===e.toLowerCase()&&!/^fil|che|rad/i.test(n.type))){var o=i.oninput||\"oninput\";n[o]||(n[o]=N([n[o],n[i.onchange]]),delete n[i.onchange])}}(t),t}function A(t){return t&&(t instanceof d||t.$$typeof===a)}var E={configurable:!0,get:function(){return this.class},set:function(t){this.class=t}};function C(t,e){for(var n=arguments,i=1,r=void 0;i<arguments.length;i++)if(r=n[i])for(var o in r)r.hasOwnProperty(o)&&(t[o]=r[o]);return t}function M(t,e){for(var n in t)if(!(n in e))return!0;for(var i in e)if(t[i]!==e[i])return!0;return!1}function R(){}function j(t){function e(t,e){!function(t){for(var e in t){var n=t[e];\"function\"!=typeof n||n.__bound||l.hasOwnProperty(e)||((t[e]=n.bind(t)).__bound=!0)}}(this),B.call(this,t,e,h),L.call(this,t,e)}return(t=C({constructor:e},t)).mixins&&function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=N(e[n].concat(t[n]||b),\"getDefaultProps\"===n||\"getInitialState\"===n||\"getChildContext\"===n))}(t,function(t){for(var e={},n=0;n<t.length;n++){var i=t[n];for(var r in i)i.hasOwnProperty(r)&&\"function\"==typeof i[r]&&(e[r]||(e[r]=[])).push(i[r])}return e}(t.mixins)),t.statics&&C(e,t.statics),t.propTypes&&(e.propTypes=t.propTypes),t.defaultProps&&(e.defaultProps=t.defaultProps),t.getDefaultProps&&(e.defaultProps=t.getDefaultProps.call(e)),R.prototype=B.prototype,e.prototype=C(new R,t),e.displayName=t.displayName||\"Component\",e}function F(t,e,n){if(\"string\"==typeof e&&(e=t.constructor.prototype[e]),\"function\"==typeof e)return e.apply(t,n)}function N(t,e){return function(){for(var n,i=arguments,r=0;r<t.length;r++){var o=F(this,t[r],i);if(e&&null!=o)for(var s in n||(n={}),o)o.hasOwnProperty(s)&&(n[s]=o[s]);else void 0!==o&&(n=o)}return n}}function L(t,e){D.call(this,t,e),this.componentWillReceiveProps=N([D,this.componentWillReceiveProps||\"componentWillReceiveProps\"]),this.render=N([D,q,this.render||\"render\",I])}function D(t,e){if(t){var n=t.children;if(n&&Array.isArray(n)&&1===n.length&&(\"string\"==typeof n[0]||\"function\"==typeof n[0]||n[0]instanceof d)&&(t.children=n[0],t.children&&\"object\"==typeof t.children&&(t.children.length=1,t.children[0]=t.children)),p){var i=\"function\"==typeof this?this:this.constructor,o=this.propTypes||i.propTypes,s=this.displayName||i.name;o&&r.a.checkPropTypes(o,t,\"prop\",s)}}}function q(t){g=this}function I(){g===this&&(g=null)}function B(t,e,n){o.Component.call(this,t,e),this.state=this.getInitialState?this.getInitialState():{},this.refs={},this._refProxies={},n!==h&&L.call(this,t,e)}function U(t,e){B.call(this,t,e)}C(B.prototype=new o.Component,{constructor:B,isReactComponent:{},replaceState:function(t,e){for(var n in this.setState(t,e),this.state)n in t||delete this.state[n]},getDOMNode:function(){return this.base},isMounted:function(){return!!this.base}}),R.prototype=B.prototype,U.prototype=new R,U.prototype.isPureReactComponent=!0,U.prototype.shouldComponentUpdate=function(t,e){return M(this.props,t)||M(this.state,e)};var z={version:\"15.1.0\",DOM:S,PropTypes:r.a,Children:w,render:_,createClass:j,createFactory:k,createElement:O,cloneElement:function(t,e){for(var n=[],i=arguments.length-2;i-- >0;)n[i]=arguments[i+2];if(!A(t))return t;var r=t.attributes||t.props,s=[Object(o.h)(t.nodeName||t.type,C({},r),t.children||r&&r.children),e];return n&&n.length?s.push(n):e&&e.children&&s.push(e.children),P(o.cloneElement.apply(void 0,s))},isValidElement:A,findDOMNode:function(t){return t&&t.base||t},unmountComponentAtNode:function(t){var e=t._preactCompatRendered&&t._preactCompatRendered.base;return!(!e||e.parentNode!==t||(Object(o.render)(Object(o.h)(f),t,e),0))},Component:B,PureComponent:U,unstable_renderSubtreeIntoContainer:function(t,e,n,i){var r=_(Object(o.h)(v,{context:t.context},e),n),s=r._component||r.base;return i&&i.call(s,r),s},__spread:C};e.d=z}).call(this,n(51))},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=a(n(269)),o=a(n(268)),s=a(n(131));function a(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}n(267);var u=!(!navigator.userAgent.match(/iPhone/i)&&!navigator.userAgent.match(/iPod/i)),l=!!navigator.userAgent.match(/iPad/i),c=!!navigator.userAgent.match(/Android/i),h=u||l||c,p=!h,f=document.body.parentNode.classList;f.add(p?\"desktop\":\"mobile\"),f.remove(\"loading\");document.body.style.backgroundImage=\"linear-gradient(\"+(s.randint(40)+40)+\"deg, #fde, #ffe)\";e.default=i({},s,o,{sort:r,allProgress:function(t,e){var n=0;return e(0,0,t.length),t.forEach(function(i){i.then(function(i){return n+=1,e(Math.floor(100*n/t.length),n,t.length),i})}),Promise.all(t)},fieldSet:function(t){return function(e){return e?e instanceof Set?e:new Set(e.split(\" \")):t}},is_iphone:u,is_ipad:l,is_android:c,is_mobile:h,is_desktop:p})},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=n(80);e.default={system:{load_site:\"SYSTEM_LOAD_SITE\",running_command:\"SYSTEM_RUNNING_COMMAND\",command_output:\"SYSTEM_COMMAND_OUTPUT\",relay_connected:\"SYSTEM_RELAY_CONNECTED\",relay_disconnected:\"SYSTEM_RELAY_DISCONNECTED\",rpc_connected:\"SYSTEM_RPC_CONNECTED\",rpc_disconnected:\"SYSTEM_RPC_DISCONNECTED\",list_directory:\"SYSTEM_LIST_DIRECTORY\",listing_directory:\"SYSTEM_LISTING_DIRECTORY\",count_directory:\"SYSTEM_COUNT_DIRECTORY\",counting_directory:\"SYSTEM_COUNTING_DIRECTORY\",stdout:\"SYSTEM_STDOUT\",stderr:\"SYSTEM_STDERR\"},app:{change_tool:\"APP_CHANGE_TOOL\",load_progress:\"APP_LOAD_PROGRESS\"},folder:(0,i.crud_type)(\"folder\",[]),file:(0,i.crud_type)(\"file\",[]),task:(0,i.crud_type)(\"task\",[\"starting_task\",\"stopping_task\",\"task_begin\",\"task_finish\",\"start_queue\",\"stop_queue\",\"starting_queue\",\"stopping_queue\",\"progress\",\"epoch\"]),auth:(0,i.crud_type)(\"auth\",[\"set_token\",\"set_error\",\"set_current_user\",\"logout_user\",\"loading\",\"initialized\",\"set_return_to\"]),socket:{connect:\"SOCKET_CONNECT\",connect_error:\"SOCKET_CONNECT_ERROR\",reconnect:\"SOCKET_RECONNECT\",reconnecting:\"SOCKET_RECONNECTING\",reconnect_error:\"SOCKET_RECONNECT_ERROR\",reconnect_failed:\"SOCKET_RECONNECT_FAILED\",disconnect:\"SOCKET_DISCONNECT\",error:\"SOCKET_ERROR\",status:\"SOCKET_STATUS\",load_params:\"SOCKET_LOAD_PARAMS\",list_checkpoints:\"SOCKET_LIST_CHECKPOINTS\",list_sequences:\"SOCKET_LIST_SEQUENCES\",list_epochs:\"SOCKET_LIST_EPOCHS\"},player:{get_params:\"GET_PARAMS\",set_param:\"SET_PARAM\",loading_checkpoints:\"LOADING_CHECKPOINTS\",loading_checkpoint:\"LOADING_CHECKPOINT\",list_checkpoints:\"LIST_CHECKPOINTS\",loading_sequences:\"LOADING_SEQUENCES\",loading_sequence:\"LOADING_SEQUENCE\",load_sequence:\"LOAD_SEQUENCE\",loading_epochs:\"LOADING_EPOCHS\",load_epoch:\"LOAD_EPOCH\",set_fps:\"SET_FPS\",seeking:\"SEEKING\",pausing:\"PAUSING\",playing:\"PLAYING\",current_frame:\"CURRENT_FRAME\",start_recording:\"START_RECORDING\",add_record_frame:\"ADD_RECORD_FRAME\",save_frame:\"SAVE_FRAME\",saving_video:\"SAVING_VIDEO\",save_video:\"SAVE_VIDEO\",set_fullscreen:\"SET_FULLSCREEN\"},audioPlayer:{play:\"AUDIO_PLAY\",pause:\"AUDIO_PAUSE\",resume:\"AUDIO_RESUME\",enqueue:\"AUDIO_ENQUEUE\"},dataset:{load:\"DATASET_LOAD\",set_folder:\"DATASET_SET_FOLDER\",upload_files:\"DATASET_UPLOAD_FILES\",file_progress:\"DATASET_FILE_PROGRESS\",file_uploaded:\"DATASET_FILE_UPLOADED\",fetch_url:\"DATASET_FETCH_URL\",fetch_progress:\"DATASET_FETCH_PROGRESS\",list_epochs:\"DATASET_LIST_EPOCHS\"},samplernn:{init:\"SAMPLERNN_INIT\",set_folder:\"SAMPLERNN_SET_FOLDER\",load_loss:\"SAMPLERNN_LOAD_LOSS\",load_graph:\"SAMPLERNN_LOAD_GRAPH\"},pix2pix:(0,i.with_type)(\"pix2pix\",[\"init\",\"set_folder\"]),pix2pixhd:(0,i.with_type)(\"pix2pixhd\",[\"init\",\"set_folder\",\"load_results\",\"load_dataset_count\"]),pix2wav:(0,i.with_type)(\"pix2wav\",[\"init\",\"set_folder\"]),wav2pix:(0,i.with_type)(\"wav2pix\",[\"load\",\"progress\",\"finish\",\"zip\",\"uploading\"]),dashboard:(0,i.with_type)(\"dashboard\",[\"load\"]),morph:(0,i.with_type)(\"morph\",[\"load\"])}},function(t,e,n){\"use strict\";t.exports=function(){}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=n(2),r=n(118),o=p(n(20)),s=p(n(44)),a=p(n(78)),u=p(n(130)),l=p(n(59)),c=p(n(46)),h=n(19);function p(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}e.default=Object.keys(r.actions).map(function(t){return[t,r.actions[t]]}).concat([[\"live\",o],[\"queue\",s],[\"system\",a],[\"dataset\",l],[\"audioPlayer\",c]]).map(function(t){return[t[0],(0,i.bindActionCreators)(t[1],h.store.dispatch)]}).concat([[\"socket\",u]]).reduce(function(t,e){return(t[e[0]]=e[1])&&t},{})},function(t,e,n){\"use strict\";var i=n(23),r=n(108),o=n(54),s=n(201),a=n(35);function u(t){return t}function l(t,e){for(var n=0;n<t.length;++n)e[n]=255&t.charCodeAt(n);return e}e.newBlob=function(t,n){e.checkSupport(\"blob\");try{return new Blob([t],{type:n})}catch(e){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return i.append(t),i.getBlob(n)}catch(t){throw new Error(\"Bug : can't construct the Blob.\")}}};var c={stringifyByChunk:function(t,e,n){var i=[],r=0,o=t.length;if(o<=n)return String.fromCharCode.apply(null,t);for(;r<o;)\"array\"===e||\"nodebuffer\"===e?i.push(String.fromCharCode.apply(null,t.slice(r,Math.min(r+n,o)))):i.push(String.fromCharCode.apply(null,t.subarray(r,Math.min(r+n,o)))),r+=n;return i.join(\"\")},stringifyByChar:function(t){for(var e=\"\",n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return e},applyCanBeUsed:{uint8array:function(){try{return i.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(t){return!1}}(),nodebuffer:function(){try{return i.nodebuffer&&1===String.fromCharCode.apply(null,o.allocBuffer(1)).length}catch(t){return!1}}()}};function h(t){var n=65536,i=e.getTypeOf(t),r=!0;if(\"uint8array\"===i?r=c.applyCanBeUsed.uint8array:\"nodebuffer\"===i&&(r=c.applyCanBeUsed.nodebuffer),r)for(;n>1;)try{return c.stringifyByChunk(t,i,n)}catch(t){n=Math.floor(n/2)}return c.stringifyByChar(t)}function p(t,e){for(var n=0;n<t.length;n++)e[n]=t[n];return e}e.applyFromCharCode=h;var f={};f.string={string:u,array:function(t){return l(t,new Array(t.length))},arraybuffer:function(t){return f.string.uint8array(t).buffer},uint8array:function(t){return l(t,new Uint8Array(t.length))},nodebuffer:function(t){return l(t,o.allocBuffer(t.length))}},f.array={string:h,array:u,arraybuffer:function(t){return new Uint8Array(t).buffer},uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return o.newBufferFrom(t)}},f.arraybuffer={string:function(t){return h(new Uint8Array(t))},array:function(t){return p(new Uint8Array(t),new Array(t.byteLength))},arraybuffer:u,uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return o.newBufferFrom(new Uint8Array(t))}},f.uint8array={string:h,array:function(t){return p(t,new Array(t.length))},arraybuffer:function(t){return t.buffer},uint8array:u,nodebuffer:function(t){return o.newBufferFrom(t)}},f.nodebuffer={string:h,array:function(t){return p(t,new Array(t.length))},arraybuffer:function(t){return f.nodebuffer.uint8array(t).buffer},uint8array:function(t){return p(t,new Uint8Array(t.length))},nodebuffer:u},e.transformTo=function(t,n){if(n||(n=\"\"),!t)return n;e.checkSupport(t);var i=e.getTypeOf(n);return f[i][t](n)},e.getTypeOf=function(t){return\"string\"==typeof t?\"string\":\"[object Array]\"===Object.prototype.toString.call(t)?\"array\":i.nodebuffer&&o.isBuffer(t)?\"nodebuffer\":i.uint8array&&t instanceof Uint8Array?\"uint8array\":i.arraybuffer&&t instanceof ArrayBuffer?\"arraybuffer\":void 0},e.checkSupport=function(t){if(!i[t.toLowerCase()])throw new Error(t+\" is not supported by this platform\")},e.MAX_VALUE_16BITS=65535,e.MAX_VALUE_32BITS=-1,e.pretty=function(t){var e,n,i=\"\";for(n=0;n<(t||\"\").length;n++)i+=\"\\\\x\"+((e=t.charCodeAt(n))<16?\"0\":\"\")+e.toString(16).toUpperCase();return i},e.delay=function(t,e,n){s(function(){t.apply(n||null,e||[])})},e.inherits=function(t,e){var n=function(){};n.prototype=e.prototype,t.prototype=new n},e.extend=function(){var t,e,n={};for(t=0;t<arguments.length;t++)for(e in arguments[t])arguments[t].hasOwnProperty(e)&&void 0===n[e]&&(n[e]=arguments[t][e]);return n},e.prepareContent=function(t,n,o,s,u){return a.Promise.resolve(n).then(function(t){return i.blob&&(t instanceof Blob||-1!==[\"[object File]\",\"[object Blob]\"].indexOf(Object.prototype.toString.call(t)))&&\"undefined\"!=typeof FileReader?new a.Promise(function(e,n){var i=new FileReader;i.onload=function(t){e(t.target.result)},i.onerror=function(t){n(t.target.error)},i.readAsArrayBuffer(t)}):t}).then(function(n){var c,h=e.getTypeOf(n);return h?(\"arraybuffer\"===h?n=e.transformTo(\"uint8array\",n):\"string\"===h&&(u?n=r.decode(n):o&&!0!==s&&(n=l(c=n,i.uint8array?new Uint8Array(c.length):new Array(c.length)))),n):a.Promise.reject(new Error(\"Can't read the data of '\"+t+\"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?\"))})}},function(t,e,n){\"use strict\";n.r(e);var i=n(7),r=n.n(i),o=n(4),s=n(0),a=n.n(s),u=n(141),l=n.n(u),c=n(12),h=n.n(c),p=n(11),f=n.n(p),d=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};function y(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}var m=function(t){function e(){var n,i;!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);for(var r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];return n=i=y(this,t.call.apply(t,[this].concat(o))),i.state={match:i.computeMatch(i.props.history.location.pathname)},y(i,n)}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getChildContext=function(){return{router:d({},this.context.router,{history:this.props.history,route:{location:this.props.history.location,match:this.state.match}})}},e.prototype.computeMatch=function(t){return{path:\"/\",url:\"/\",params:{},isExact:\"/\"===t}},e.prototype.componentWillMount=function(){var t=this,e=this.props,n=e.children,i=e.history;f()(null==n||1===o.d.Children.count(n),\"A <Router> may have only one child element\"),this.unlisten=i.listen(function(){t.setState({match:t.computeMatch(i.location.pathname)})})},e.prototype.componentWillReceiveProps=function(t){h()(this.props.history===t.history,\"You cannot change <Router history>\")},e.prototype.componentWillUnmount=function(){this.unlisten()},e.prototype.render=function(){var t=this.props.children;return t?o.d.Children.only(t):null},e}(o.d.Component);m.propTypes={history:a.a.object.isRequired,children:a.a.node},m.contextTypes={router:a.a.object},m.childContextTypes={router:a.a.object.isRequired};var _=m,v=_;function g(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}var b=function(t){function e(){var n,i;!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);for(var r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];return n=i=g(this,t.call.apply(t,[this].concat(o))),i.history=l()(i.props),g(i,n)}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentWillMount=function(){r()(!this.props.history,\"<BrowserRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { BrowserRouter as Router }`.\")},e.prototype.render=function(){return o.d.createElement(v,{history:this.history,children:this.props.children})},e}(o.d.Component);b.propTypes={basename:a.a.string,forceRefresh:a.a.bool,getUserConfirmation:a.a.func,keyLength:a.a.number,children:a.a.node};var w=b,k=n(140),S=n.n(k);function T(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}var x=function(t){function e(){var n,i;!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);for(var r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];return n=i=T(this,t.call.apply(t,[this].concat(o))),i.history=S()(i.props),T(i,n)}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentWillMount=function(){r()(!this.props.history,\"<HashRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { HashRouter as Router }`.\")},e.prototype.render=function(){return o.d.createElement(v,{history:this.history,children:this.props.children})},e}(o.d.Component);x.propTypes={basename:a.a.string,getUserConfirmation:a.a.func,hashType:a.a.oneOf([\"hashbang\",\"noslash\",\"slash\"]),children:a.a.node};var O=x,P=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};function A(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}var E=function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)},C=function(t){function e(){var n,i;!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);for(var r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];return n=i=A(this,t.call.apply(t,[this].concat(o))),i.handleClick=function(t){if(i.props.onClick&&i.props.onClick(t),!t.defaultPrevented&&0===t.button&&!i.props.target&&!E(t)){t.preventDefault();var e=i.context.router.history,n=i.props,r=n.replace,o=n.to;r?e.replace(o):e.push(o)}},A(i,n)}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.render=function(){var t=this.props,e=(t.replace,t.to),n=t.innerRef,i=function(t,e){var n={};for(var i in t)e.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(t,[\"replace\",\"to\",\"innerRef\"]);f()(this.context.router,\"You should not use <Link> outside a <Router>\");var r=this.context.router.history.createHref(\"string\"==typeof e?{pathname:e}:e);return o.d.createElement(\"a\",P({},i,{onClick:this.handleClick,href:r,ref:n}))},e}(o.d.Component);C.propTypes={onClick:a.a.func,target:a.a.string,replace:a.a.bool,to:a.a.oneOfType([a.a.string,a.a.object]).isRequired,innerRef:a.a.oneOfType([a.a.string,a.a.func])},C.defaultProps={replace:!1},C.contextTypes={router:a.a.shape({history:a.a.shape({push:a.a.func.isRequired,replace:a.a.func.isRequired,createHref:a.a.func.isRequired}).isRequired}).isRequired};var M=C,R=n(83),j=n(82),F=function(t){var e=t.pathname,n=t.search,i=t.hash,r=e||\"/\";return n&&\"?\"!==n&&(r+=\"?\"===n.charAt(0)?n:\"?\"+n),i&&\"#\"!==i&&(r+=\"#\"===i.charAt(0)?i:\"#\"+i),r},N=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},L=function(t,e,n,i){var r=void 0;\"string\"==typeof t?(r=function(t){var e=t||\"/\",n=\"\",i=\"\",r=e.indexOf(\"#\");-1!==r&&(i=e.substr(r),e=e.substr(0,r));var o=e.indexOf(\"?\");return-1!==o&&(n=e.substr(o),e=e.substr(0,o)),{pathname:e,search:\"?\"===n?\"\":n,hash:\"#\"===i?\"\":i}}(t)).state=e:(void 0===(r=N({},t)).pathname&&(r.pathname=\"\"),r.search?\"?\"!==r.search.charAt(0)&&(r.search=\"?\"+r.search):r.search=\"\",r.hash?\"#\"!==r.hash.charAt(0)&&(r.hash=\"#\"+r.hash):r.hash=\"\",void 0!==e&&void 0===r.state&&(r.state=e));try{r.pathname=decodeURI(r.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname \"'+r.pathname+'\" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(r.key=n),i?r.pathname?\"/\"!==r.pathname.charAt(0)&&(r.pathname=Object(R.default)(r.pathname,i.pathname)):r.pathname=i.pathname:r.pathname||(r.pathname=\"/\"),r},D=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&Object(j.default)(t.state,e.state)},q=function(){var t=null,e=[];return{setPrompt:function(e){return r()(null==t,\"A history supports only one prompt at a time\"),t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,i,o){if(null!=t){var s=\"function\"==typeof t?t(e,n):t;\"string\"==typeof s?\"function\"==typeof i?i(s,o):(r()(!1,\"A history needs a getUserConfirmation function in order to use a prompt message\"),o(!0)):o(!1!==s)}else o(!0)},appendListener:function(t){var n=!0,i=function(){n&&t.apply(void 0,arguments)};return e.push(i),function(){n=!1,e=e.filter(function(t){return t!==i})}},notifyListeners:function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];e.forEach(function(t){return t.apply(void 0,n)})}}},I=(\"undefined\"==typeof window||!window.document||window.document.createElement,\"function\"==typeof Symbol&&Symbol.iterator,Object.assign,Object.assign,\"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}),B=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},U=function(t,e,n){return Math.min(Math.max(t,e),n)},z=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.getUserConfirmation,n=t.initialEntries,i=void 0===n?[\"/\"]:n,o=t.initialIndex,s=void 0===o?0:o,a=t.keyLength,u=void 0===a?6:a,l=q(),c=function(t){B(m,t),m.length=m.entries.length,l.notifyListeners(m.location,m.action)},h=function(){return Math.random().toString(36).substr(2,u)},p=U(s,0,i.length-1),f=i.map(function(t){return L(t,void 0,\"string\"==typeof t?h():t.key||h())}),d=F,y=function(t){var n=U(m.index+t,0,m.entries.length-1),i=m.entries[n];l.confirmTransitionTo(i,\"POP\",e,function(t){t?c({action:\"POP\",location:i,index:n}):c()})},m={length:f.length,action:\"POP\",location:f[p],index:p,entries:f,createHref:d,push:function(t,n){r()(!(\"object\"===(void 0===t?\"undefined\":I(t))&&void 0!==t.state&&void 0!==n),\"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored\");var i=L(t,n,h(),m.location);l.confirmTransitionTo(i,\"PUSH\",e,function(t){if(t){var e=m.index+1,n=m.entries.slice(0);n.length>e?n.splice(e,n.length-e,i):n.push(i),c({action:\"PUSH\",location:i,index:e,entries:n})}})},replace:function(t,n){r()(!(\"object\"===(void 0===t?\"undefined\":I(t))&&void 0!==t.state&&void 0!==n),\"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored\");var i=L(t,n,h(),m.location);l.confirmTransitionTo(i,\"REPLACE\",e,function(t){t&&(m.entries[m.index]=i,c({action:\"REPLACE\",location:i}))})},go:y,goBack:function(){return y(-1)},goForward:function(){return y(1)},canGo:function(t){var e=m.index+t;return e>=0&&e<m.entries.length},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return l.setPrompt(t)},listen:function(t){return l.appendListener(t)}};return m};function Y(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}var W=function(t){function e(){var n,i;!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);for(var r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];return n=i=Y(this,t.call.apply(t,[this].concat(o))),i.history=z(i.props),Y(i,n)}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentWillMount=function(){h()(!this.props.history,\"<MemoryRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { MemoryRouter as Router }`.\")},e.prototype.render=function(){return o.d.createElement(_,{history:this.history,children:this.props.children})},e}(o.d.Component);W.propTypes={initialEntries:a.a.array,initialIndex:a.a.number,getUserConfirmation:a.a.func,keyLength:a.a.number,children:a.a.node};var G=W,V=n(60),H=n.n(V),Z={},Q=0,K=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];\"string\"==typeof e&&(e={path:e});var i=e,r=i.path,o=i.exact,s=void 0!==o&&o,a=i.strict,u=void 0!==a&&a,l=i.sensitive,c=void 0!==l&&l;if(null==r)return n;var h=function(t,e){var n=\"\"+e.end+e.strict+e.sensitive,i=Z[n]||(Z[n]={});if(i[t])return i[t];var r=[],o={re:H()(t,r,e),keys:r};return Q<1e4&&(i[t]=o,Q++),o}(r,{end:s,strict:u,sensitive:c}),p=h.re,f=h.keys,d=p.exec(t);if(!d)return null;var y=d[0],m=d.slice(1),_=t===y;return s&&!_?null:{path:r,url:\"/\"===r&&\"\"===y?\"/\":y,isExact:_,params:f.reduce(function(t,e,n){return t[e.name]=m[n],t},{})}},X=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};function $(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}var J=function(t){return 0===o.d.Children.count(t)},tt=function(t){function e(){var n,i;!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);for(var r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];return n=i=$(this,t.call.apply(t,[this].concat(o))),i.state={match:i.computeMatch(i.props,i.context.router)},$(i,n)}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getChildContext=function(){return{router:X({},this.context.router,{route:{location:this.props.location||this.context.router.route.location,match:this.state.match}})}},e.prototype.computeMatch=function(t,e){var n=t.computedMatch,i=t.location,r=t.path,o=t.strict,s=t.exact,a=t.sensitive;if(n)return n;f()(e,\"You should not use <Route> or withRouter() outside a <Router>\");var u=e.route,l=(i||u.location).pathname;return K(l,{path:r,strict:o,exact:s,sensitive:a},u.match)},e.prototype.componentWillMount=function(){h()(!(this.props.component&&this.props.render),\"You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored\"),h()(!(this.props.component&&this.props.children&&!J(this.props.children)),\"You should not use <Route component> and <Route children> in the same route; <Route children> will be ignored\"),h()(!(this.props.render&&this.props.children&&!J(this.props.children)),\"You should not use <Route render> and <Route children> in the same route; <Route children> will be ignored\")},e.prototype.componentWillReceiveProps=function(t,e){h()(!(t.location&&!this.props.location),'<Route> elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.'),h()(!(!t.location&&this.props.location),'<Route> elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.'),this.setState({match:this.computeMatch(t,e.router)})},e.prototype.render=function(){var t=this.state.match,e=this.props,n=e.children,i=e.component,r=e.render,s=this.context.router,a=s.history,u=s.route,l=s.staticContext,c={match:t,location:this.props.location||u.location,history:a,staticContext:l};return i?t?o.d.createElement(i,c):null:r?t?r(c):null:\"function\"==typeof n?n(c):n&&!J(n)?o.d.Children.only(n):null},e}(o.d.Component);tt.propTypes={computedMatch:a.a.object,path:a.a.string,exact:a.a.bool,strict:a.a.bool,sensitive:a.a.bool,component:a.a.func,render:a.a.func,children:a.a.oneOfType([a.a.func,a.a.node]),location:a.a.object},tt.contextTypes={router:a.a.shape({history:a.a.object.isRequired,route:a.a.object.isRequired,staticContext:a.a.object})},tt.childContextTypes={router:a.a.object.isRequired};var et=tt,nt=et,it=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},rt=\"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};var ot=function(t){var e=t.to,n=t.exact,i=t.strict,r=t.location,s=t.activeClassName,a=t.className,u=t.activeStyle,l=t.style,c=t.isActive,h=t.ariaCurrent,p=function(t,e){var n={};for(var i in t)e.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(t,[\"to\",\"exact\",\"strict\",\"location\",\"activeClassName\",\"className\",\"activeStyle\",\"style\",\"isActive\",\"ariaCurrent\"]);return o.d.createElement(nt,{path:\"object\"===(void 0===e?\"undefined\":rt(e))?e.pathname:e,exact:n,strict:i,location:r,children:function(t){var n=t.location,i=t.match,r=!!(c?c(i,n):i);return o.d.createElement(M,it({to:e,className:r?[a,s].filter(function(t){return t}).join(\" \"):a,style:r?it({},l,u):l,\"aria-current\":r&&h},p))}})};ot.propTypes={to:M.propTypes.to,exact:a.a.bool,strict:a.a.bool,location:a.a.object,activeClassName:a.a.string,className:a.a.string,activeStyle:a.a.object,style:a.a.object,isActive:a.a.func,ariaCurrent:a.a.oneOf([\"page\",\"step\",\"location\",\"true\"])},ot.defaultProps={activeClassName:\"active\",ariaCurrent:\"true\"};var st=ot;var at=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e),function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.enable=function(t){this.unblock&&this.unblock(),this.unblock=this.context.router.history.block(t)},e.prototype.disable=function(){this.unblock&&(this.unblock(),this.unblock=null)},e.prototype.componentWillMount=function(){f()(this.context.router,\"You should not use <Prompt> outside a <Router>\"),this.props.when&&this.enable(this.props.message)},e.prototype.componentWillReceiveProps=function(t){t.when?this.props.when&&this.props.message===t.message||this.enable(t.message):this.disable()},e.prototype.componentWillUnmount=function(){this.disable()},e.prototype.render=function(){return null},e}(o.d.Component);at.propTypes={when:a.a.bool,message:a.a.oneOfType([a.a.func,a.a.string]).isRequired},at.defaultProps={when:!0},at.contextTypes={router:a.a.shape({history:a.a.shape({block:a.a.func.isRequired}).isRequired}).isRequired};var ut=at,lt={},ct=0,ht=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"/\",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return\"/\"===t?t:function(t){var e=t,n=lt[e]||(lt[e]={});if(n[t])return n[t];var i=H.a.compile(t);return ct<1e4&&(n[t]=i,ct++),i}(t)(e,{pretty:!0})},pt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};var ft=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e),function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.isStatic=function(){return this.context.router&&this.context.router.staticContext},e.prototype.componentWillMount=function(){f()(this.context.router,\"You should not use <Redirect> outside a <Router>\"),this.isStatic()&&this.perform()},e.prototype.componentDidMount=function(){this.isStatic()||this.perform()},e.prototype.componentDidUpdate=function(t){var e=L(t.to),n=L(this.props.to);D(e,n)?h()(!1,\"You tried to redirect to the same route you're currently on: \\\"\"+n.pathname+n.search+'\"'):this.perform()},e.prototype.computeTo=function(t){var e=t.computedMatch,n=t.to;return e?\"string\"==typeof n?ht(n,e.params):pt({},n,{pathname:ht(n.pathname,e.params)}):n},e.prototype.perform=function(){var t=this.context.router.history,e=this.props.push,n=this.computeTo(this.props);e?t.push(n):t.replace(n)},e.prototype.render=function(){return null},e}(o.d.Component);ft.propTypes={computedMatch:a.a.object,push:a.a.bool,from:a.a.string,to:a.a.oneOfType([a.a.string,a.a.object]).isRequired},ft.defaultProps={push:!1},ft.contextTypes={router:a.a.shape({history:a.a.shape({push:a.a.func.isRequired,replace:a.a.func.isRequired}).isRequired,staticContext:a.a.object}).isRequired};var dt=ft,yt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};function mt(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}var _t=function(t){return\"/\"===t.charAt(0)?t:\"/\"+t},vt=function(t,e){return t?yt({},e,{pathname:_t(t)+e.pathname}):e},gt=function(t){return\"string\"==typeof t?t:F(t)},bt=function(t){return function(){f()(!1,\"You cannot %s with <StaticRouter>\",t)}},wt=function(){},kt=function(t){function e(){var n,i;!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);for(var r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];return n=i=mt(this,t.call.apply(t,[this].concat(o))),i.createHref=function(t){return _t(i.props.basename+gt(t))},i.handlePush=function(t){var e=i.props,n=e.basename,r=e.context;r.action=\"PUSH\",r.location=vt(n,L(t)),r.url=gt(r.location)},i.handleReplace=function(t){var e=i.props,n=e.basename,r=e.context;r.action=\"REPLACE\",r.location=vt(n,L(t)),r.url=gt(r.location)},i.handleListen=function(){return wt},i.handleBlock=function(){return wt},mt(i,n)}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getChildContext=function(){return{router:{staticContext:this.props.context}}},e.prototype.componentWillMount=function(){h()(!this.props.history,\"<StaticRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { StaticRouter as Router }`.\")},e.prototype.render=function(){var t=this.props,e=t.basename,n=(t.context,t.location),i=function(t,e){var n={};for(var i in t)e.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(t,[\"basename\",\"context\",\"location\"]),r={createHref:this.createHref,action:\"POP\",location:function(t,e){if(!t)return e;var n=_t(t);return 0!==e.pathname.indexOf(n)?e:yt({},e,{pathname:e.pathname.substr(n.length)})}(e,L(n)),push:this.handlePush,replace:this.handleReplace,go:bt(\"go\"),goBack:bt(\"goBack\"),goForward:bt(\"goForward\"),listen:this.handleListen,block:this.handleBlock};return o.d.createElement(_,yt({},i,{history:r}))},e}(o.d.Component);kt.propTypes={basename:a.a.string,context:a.a.object.isRequired,location:a.a.oneOfType([a.a.string,a.a.object])},kt.defaultProps={basename:\"\",location:\"/\"},kt.childContextTypes={router:a.a.object.isRequired};var St=kt;var Tt=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e),function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentWillMount=function(){f()(this.context.router,\"You should not use <Switch> outside a <Router>\")},e.prototype.componentWillReceiveProps=function(t){h()(!(t.location&&!this.props.location),'<Switch> elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.'),h()(!(!t.location&&this.props.location),'<Switch> elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.')},e.prototype.render=function(){var t=this.context.router.route,e=this.props.children,n=this.props.location||t.location,i=void 0,r=void 0;return o.d.Children.forEach(e,function(e){if(null==i&&o.d.isValidElement(e)){var s=e.props,a=s.path,u=s.exact,l=s.strict,c=s.sensitive,h=s.from,p=a||h;r=e,i=K(n.pathname,{path:p,exact:u,strict:l,sensitive:c},t.match)}}),i?o.d.cloneElement(r,{location:n,computedMatch:i}):null},e}(o.d.Component);Tt.contextTypes={router:a.a.shape({route:a.a.object.isRequired}).isRequired},Tt.propTypes={children:a.a.node,location:a.a.object};var xt=Tt,Ot=K,Pt=n(139),At=n.n(Pt),Et=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};var Ct=function(t){var e=function(e){var n=e.wrappedComponentRef,i=function(t,e){var n={};for(var i in t)e.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(e,[\"wrappedComponentRef\"]);return o.d.createElement(et,{children:function(e){return o.d.createElement(t,Et({},i,e,{ref:n}))}})};return e.displayName=\"withRouter(\"+(t.displayName||t.name)+\")\",e.WrappedComponent=t,e.propTypes={wrappedComponentRef:a.a.func},At()(e,t)};n.d(e,\"BrowserRouter\",function(){return w}),n.d(e,\"HashRouter\",function(){return O}),n.d(e,\"Link\",function(){return M}),n.d(e,\"MemoryRouter\",function(){return G}),n.d(e,\"NavLink\",function(){return st}),n.d(e,\"Prompt\",function(){return ut}),n.d(e,\"Redirect\",function(){return dt}),n.d(e,\"Route\",function(){return nt}),n.d(e,\"Router\",function(){return v}),n.d(e,\"StaticRouter\",function(){return St}),n.d(e,\"Switch\",function(){return xt}),n.d(e,\"matchPath\",function(){return Ot}),n.d(e,\"withRouter\",function(){return Ct})},function(t,e,n){\"use strict\";t.exports=function(t,e,n,i,r,o,s,a){if(!t){var u;if(void 0===e)u=new Error(\"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.\");else{var l=[n,i,r,o,s,a],c=0;(u=new Error(e.replace(/%s/g,function(){return l[c++]}))).name=\"Invariant Violation\"}throw u.framesToPop=1,u}}},function(t,e,n){\"use strict\";var i=function(){};t.exports=i},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.AugmentationGrid=e.ButtonGrid=e.TaskList=e.CurrentTask=e.Checkbox=e.Button=e.SelectGroup=e.Select=e.Slider=e.NumberInput=e.TextInput=e.Param=e.ParamGroup=e.Group=e.Player=e.Gallery=e.FileUpload=e.FileRow=e.FileList=e.FolderList=e.AudioPlayer=e.Header=e.Progress=e.Loading=e.Views=void 0;var i=P(n(246)),r=P(n(245)),o=P(n(45)),s=P(n(122)),a=P(n(244)),u=P(n(243)),l=n(26),c=P(n(121)),h=P(n(120)),p=P(n(242)),f=P(n(24)),d=P(n(241)),y=P(n(18)),m=P(n(153)),_=P(n(31)),v=P(n(152)),g=P(n(87)),b=P(n(119)),w=P(n(52)),k=P(n(151)),S=P(n(63)),T=P(n(41)),x=P(n(150)),O=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(149));function P(t){return t&&t.__esModule?t:{default:t}}e.Views=O,e.Loading=y.default,e.Progress=b.default,e.Header=d.default,e.AudioPlayer=i.default,e.FolderList=h.default,e.FileList=l.FileList,e.FileRow=l.FileRow,e.FileUpload=c.default,e.Gallery=p.default,e.Player=g.default,e.Group=f.default,e.ParamGroup=v.default,e.Param=_.default,e.TextInput=T.default,e.NumberInput=m.default,e.Slider=S.default,e.Select=w.default,e.SelectGroup=k.default,e.Button=o.default,e.Checkbox=a.default,e.CurrentTask=u.default,e.TaskList=x.default,e.ButtonGrid=s.default,e.AugmentationGrid=r.default},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i,r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},o=n(19),s=n(6),a=(i=s)&&i.__esModule?i:{default:i},u=n(32),l=d(n(130)),c=d(n(257)),h=d(n(256)),p=d(n(250)),f=d(n(249));function d(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}e.default={socket:u.socket,actions:l,system:c,live:h,task:p,api:f},u.socket.on(\"status\",function(t){switch(console.log(\"got status\",t.key,t.value),o.store.dispatch(r({type:a.default.socket.status},t)),t.key){case\"processing\":o.store.dispatch(r({type:\"SET_PARAM\"},t))}})},function(t,e,n){\"use strict\";function i(t){this.name=t||\"default\",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(t){this.emit(\"data\",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit(\"end\"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit(\"error\",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit(\"error\",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var n=0;n<this._listeners[t].length;n++)this._listeners[t][n].call(this,e)},pipe:function(t){return t.registerPrevious(this)},registerPrevious:function(t){if(this.isLocked)throw new Error(\"The stream '\"+this+\"' has already been used.\");this.streamInfo=t.streamInfo,this.mergeStreamInfo(),this.previous=t;var e=this;return t.on(\"data\",function(t){e.processChunk(t)}),t.on(\"end\",function(){e.end()}),t.on(\"error\",function(t){e.error(t)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var t=!1;return this.generatedError&&(this.error(this.generatedError),t=!0),this.previous&&this.previous.resume(),!t},flush:function(){},processChunk:function(t){this.push(t)},withStreamInfo:function(t,e){return this.extraStreamInfo[t]=e,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var t in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(t)&&(this.streamInfo[t]=this.extraStreamInfo[t])},lock:function(){if(this.isLocked)throw new Error(\"The stream '\"+this+\"' has already been used.\");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var t=\"Worker \"+this.name;return this.previous?this.previous+\" -> \"+t:t}},t.exports=i},function(t,e,n){t.exports=n(299)()},function(t,e,n){var i,r,o=n(259),s=n(258),a=0,u=0;t.exports=function(t,e,n){var l=e&&n||0,c=e||[],h=(t=t||{}).node||i,p=void 0!==t.clockseq?t.clockseq:r;if(null==h||null==p){var f=o();null==h&&(h=i=[1|f[0],f[1],f[2],f[3],f[4],f[5]]),null==p&&(p=r=16383&(f[6]<<8|f[7]))}var d=void 0!==t.msecs?t.msecs:(new Date).getTime(),y=void 0!==t.nsecs?t.nsecs:u+1,m=d-a+(y-u)/1e4;if(m<0&&void 0===t.clockseq&&(p=p+1&16383),(m<0||d>a)&&void 0===t.nsecs&&(y=0),y>=1e4)throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");a=d,u=y,r=p;var _=(1e4*(268435455&(d+=122192928e5))+y)%4294967296;c[l++]=_>>>24&255,c[l++]=_>>>16&255,c[l++]=_>>>8&255,c[l++]=255&_;var v=d/4294967296*1e4&268435455;c[l++]=v>>>8&255,c[l++]=255&v,c[l++]=v>>>24&15|16,c[l++]=v>>>16&255,c[l++]=p>>>8|128,c[l++]=255&p;for(var g=0;g<6;++g)c[l+g]=h[g];return e||s(c)}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.default=function(t){var e=t.progress;return(0,r.h)(\"div\",{className:\"loading\"},\"Loading\",(0,r.h)(\"br\",null),e&&(0,r.h)(s.default,{progress:e}))};var i,r=n(1),o=n(119),s=(i=o)&&i.__esModule?i:{default:i}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.dispatch=e.store=e.history=void 0;var i=n(2),r=n(289),o=y(n(286)),s=y(n(285)),a=y(n(278)),u=y(n(277)),l=y(n(273)),c=y(n(272)),h=y(n(271)),p=y(n(270)),f=y(n(266)),d=n(265);function y(t){return t&&t.__esModule?t:{default:t}}var m=(0,i.combineReducers)({auth:a.default,system:u.default,dashboard:l.default,live:c.default,upload:h.default,queue:p.default,router:r.routerReducer,module:d.moduleReducer,audioPlayer:f.default}),_=e.history=(0,s.default)(),v=e.store=(0,i.createStore)(m,(0,i.compose)((0,i.applyMiddleware)(o.default,(0,r.routerMiddleware)(_))));e.dispatch=v.dispatch},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.play=e.pause=e.seek=e.load_epoch=e.load_sequence=e.list_sequences=e.list_epochs=e.list_checkpoints=e.set_fullscreen=e.set_param=e.get_params=void 0;var i=s(n(14)),r=s(n(6)),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(49));function s(t){return t&&t.__esModule?t:{default:t}}e.get_params=function(){return i.default.live.get_params(),{type:r.default.player.get_params}},e.set_param=function(t,e){return console.log(\"set param\",t,e),i.default.live.set_param(t,e),{type:r.default.player.set_param,key:t,value:e}},e.set_fullscreen=function(t){return{type:r.default.player.set_fullscreen,value:t}},e.list_checkpoints=function(t){return i.default.live.list_checkpoints(t),{type:r.default.player.loading_checkpoints}},e.list_epochs=function(t,e){return i.default.live.list_epochs(t,e),{type:r.default.player.loading_epochs}},e.list_sequences=function(t){return i.default.live.list_sequences(t),{type:r.default.player.loading_sequences}},e.load_sequence=function(t){return i.default.live.load_sequence(t),{type:r.default.player.loading_sequence,sequence_name:t}},e.load_epoch=function(t,e){return i.default.live.load_epoch(t,e),{type:r.default.player.loading_checkpoint,checkpoint_name:t,epoch:e}},e.seek=function(t){return i.default.live.seek(t),{type:r.default.player.seeking}},e.pause=function t(e){return i.default.live.pause(t),o.toggleFPS(!1),{type:r.default.player.pausing}},e.play=function(t){return i.default.live.play(),o.toggleFPS(!0),{type:r.default.player.playing}}},function(t,e){var n;n=function(){return this}();try{n=n||Function(\"return this\")()||(0,eval)(\"this\")}catch(t){\"object\"==typeof window&&(n=window)}t.exports=n},function(t,e,n){\"use strict\";var i=\"undefined\"!=typeof Uint8Array&&\"undefined\"!=typeof Uint16Array&&\"undefined\"!=typeof Int32Array;function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var n=e.shift();if(n){if(\"object\"!=typeof n)throw new TypeError(n+\"must be non-object\");for(var i in n)r(n,i)&&(t[i]=n[i])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var o={arraySet:function(t,e,n,i,r){if(e.subarray&&t.subarray)t.set(e.subarray(n,n+i),r);else for(var o=0;o<i;o++)t[r+o]=e[n+o]},flattenChunks:function(t){var e,n,i,r,o,s;for(i=0,e=0,n=t.length;e<n;e++)i+=t[e].length;for(s=new Uint8Array(i),r=0,e=0,n=t.length;e<n;e++)o=t[e],s.set(o,r),r+=o.length;return s}},s={arraySet:function(t,e,n,i,r){for(var o=0;o<i;o++)t[r+o]=e[n+o]},flattenChunks:function(t){return[].concat.apply([],t)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,o)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,s))},e.setTyped(i)},function(t,e,n){\"use strict\";(function(t){if(e.base64=!0,e.array=!0,e.string=!0,e.arraybuffer=\"undefined\"!=typeof ArrayBuffer&&\"undefined\"!=typeof Uint8Array,e.nodebuffer=void 0!==t,e.uint8array=\"undefined\"!=typeof Uint8Array,\"undefined\"==typeof ArrayBuffer)e.blob=!1;else{var i=new ArrayBuffer(0);try{e.blob=0===new Blob([i],{type:\"application/zip\"}).size}catch(t){try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);r.append(i),e.blob=0===r.getBlob(\"application/zip\").size}catch(t){e.blob=!1}}}try{e.nodestream=!!n(114).Readable}catch(t){e.nodestream=!1}}).call(this,n(37).Buffer)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.default=function(t){return(0,i.h)(\"div\",{className:\"group\"},this.props.title&&(0,i.h)(\"h3\",null,this.props.title),this.props.children)};var i=n(1)},function(t,e,n){\"use strict\";var i=n(56),r=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=h;var o=n(36);o.inherits=n(27);var s=n(113),a=n(70);o.inherits(h,s);for(var u=r(a.prototype),l=0;l<u.length;l++){var c=u[l];h.prototype[c]||(h.prototype[c]=a.prototype[c])}function h(t){if(!(this instanceof h))return new h(t);s.call(this,t),a.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once(\"end\",p)}function p(){this.allowHalfOpen||this._writableState.ended||i.nextTick(f,this)}function f(t){t.end()}Object.defineProperty(h.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,\"destroyed\",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),h.prototype._destroy=function(t,e){this.push(null),this.end(),i.nextTick(e,t)}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.FileRow=e.FileList=void 0;var i=n(1),r=(n(2),n(3),n(10),s(n(33))),o=s(n(5));function s(t){return t&&t.__esModule?t:{default:t}}var a=o.default.fieldSet(new Set([\"name\",\"date\",\"size\"])),u=(e.FileList=function(t){var e=t.files,n=t.fields,r=(t.sort,t.title),s=t.linkFiles,l=t.onClick,c=t.onDelete,h=t.orderBy,p=void 0===h?\"name asc\":h,f=t.className,d=void 0===f?\"\":f,y=t.fileListClassName,m=void 0===y?\"filelist\":y,_=t.rowClassName,v=void 0===_?\"row file\":_,g=o.default.sort.orderByFn(p),b=g.mapFn,w=g.sortFn,k=(e||[]).filter(function(t){return!!t}).map(b).sort(w).map(function(t){return(0,i.h)(u,{file:t[1],fields:a(n),className:v,linkFiles:s,onDelete:c,onClick:l})});return k&&k.length?(0,i.h)(\"div\",{className:\"rows \"+d},r&&(0,i.h)(\"div\",{class:\"row heading\"},(0,i.h)(\"h3\",null,r),\"}\"),(0,i.h)(\"div\",{className:\"rows \"+m},k)):(0,i.h)(\"div\",{className:\"rows \"+d},(0,i.h)(\"div\",{class:\"row heading\"},(0,i.h)(\"h4\",{class:\"noFiles\"},\"No files\")))},e.FileRow=function(t){var e=t.file,n=t.linkFiles,s=t.onDelete,u=t.onClick,l=t.className,c=void 0===l?\"row file\":l,h=t.username,p=void 0===h?\"\":h,f=a(t.fields),d=o.default.hush_size(e.size),y=e.date||e.created_at,m=e.epoch||e.epochs||0,_=e.count||0,v=void 0,g=void 0;return e.name?g=v=e.name:e.url&&(e.opt&&e.opt.type?(v=e.opt.type+\": \"+e.opt.title,g=e.opt.token):g=v=e.url.replace(/^https?:\\/\\//,\"\")),(0,i.h)(\"div\",{class:c,key:g},f.has(\"name\")&&(0,i.h)(\"div\",{className:\"filename\",title:e.name||e.url},!1===e.persisted?(0,i.h)(\"span\",{className:\"unpersisted\"},v):n&&e.url?(0,i.h)(\"a\",{target:\"_blank\",onClick:function(t){t.metaKey||t.ctrlKey||t.altKey||!u||(t.preventDefault(),u&&u(e,t))},href:e.url},v):(0,i.h)(\"span\",{class:\"link\",onClick:function(t){return u&&u(e,t)}},v)),f.has(\"age\")&&(0,i.h)(\"div\",{className:\"age \"+o.default.carbon_date(y)},o.default.get_age(y)),f.has(\"username\")&&(0,i.h)(\"div\",{className:\"username\"},p),f.has(\"epoch\")&&(0,i.h)(\"div\",{className:\"epoch \"+o.default.hush_null(m)[0]},m>0?\"ep. \"+m:\"\"),f.has(\"date\")&&(0,i.h)(\"div\",{className:\"date \"+o.default.carbon_date(y)},(0,r.default)(y).format(\"YYYY-MM-DD\")),f.has(\"datetime\")&&(0,i.h)(\"div\",{className:\"datetime \"+o.default.carbon_date(y)},(0,r.default)(y).format(\"YYYY-MM-DD h:mm a\")),f.has(\"size\")&&(0,i.h)(\"div\",{className:\"size \"+d[0]},d[1]),f.has(\"count\")&&(0,i.h)(\"div\",{className:\"count \"+o.default.hush_null(_)[0]},_>0?_+\" files\":\"\"),(f.has(\"activity\")||f.has(\"module\"))&&(0,i.h)(\"div\",{className:\"activity\"},f.has(\"activity\")&&e.activity,f.has(\"module\")&&e.module),f.has(\"delete\")&&s&&e.id&&(0,i.h)(\"div\",{className:\"destroy\",onClick:function(t){return s(e)}},\"x\"),t.options&&t.options(e))})},function(t,e){\"function\"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e,n){\"use strict\";for(var i=n(9),r=n(23),o=n(54),s=n(15),a=new Array(256),u=0;u<256;u++)a[u]=u>=252?6:u>=248?5:u>=240?4:u>=224?3:u>=192?2:1;a[254]=a[254]=1;function l(){s.call(this,\"utf-8 decode\"),this.leftOver=null}function c(){s.call(this,\"utf-8 encode\")}e.utf8encode=function(t){return r.nodebuffer?o.newBufferFrom(t,\"utf-8\"):function(t){var e,n,i,o,s,a=t.length,u=0;for(o=0;o<a;o++)55296==(64512&(n=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(i=t.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(i-56320),o++),u+=n<128?1:n<2048?2:n<65536?3:4;for(e=r.uint8array?new Uint8Array(u):new Array(u),s=0,o=0;s<u;o++)55296==(64512&(n=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(i=t.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(i-56320),o++),n<128?e[s++]=n:n<2048?(e[s++]=192|n>>>6,e[s++]=128|63&n):n<65536?(e[s++]=224|n>>>12,e[s++]=128|n>>>6&63,e[s++]=128|63&n):(e[s++]=240|n>>>18,e[s++]=128|n>>>12&63,e[s++]=128|n>>>6&63,e[s++]=128|63&n);return e}(t)},e.utf8decode=function(t){return r.nodebuffer?i.transformTo(\"nodebuffer\",t).toString(\"utf-8\"):function(t){var e,n,r,o,s=t.length,u=new Array(2*s);for(n=0,e=0;e<s;)if((r=t[e++])<128)u[n++]=r;else if((o=a[r])>4)u[n++]=65533,e+=o-1;else{for(r&=2===o?31:3===o?15:7;o>1&&e<s;)r=r<<6|63&t[e++],o--;o>1?u[n++]=65533:r<65536?u[n++]=r:(r-=65536,u[n++]=55296|r>>10&1023,u[n++]=56320|1023&r)}return u.length!==n&&(u.subarray?u=u.subarray(0,n):u.length=n),i.applyFromCharCode(u)}(t=i.transformTo(r.uint8array?\"uint8array\":\"array\",t))},i.inherits(l,s),l.prototype.processChunk=function(t){var n=i.transformTo(r.uint8array?\"uint8array\":\"array\",t.data);if(this.leftOver&&this.leftOver.length){if(r.uint8array){var o=n;(n=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),n.set(o,this.leftOver.length)}else n=this.leftOver.concat(n);this.leftOver=null}var s=function(t,e){var n;for((e=e||t.length)>t.length&&(e=t.length),n=e-1;n>=0&&128==(192&t[n]);)n--;return n<0?e:0===n?e:n+a[t[n]]>e?n:e}(n),u=n;s!==n.length&&(r.uint8array?(u=n.subarray(0,s),this.leftOver=n.subarray(s,n.length)):(u=n.slice(0,s),this.leftOver=n.slice(s,n.length))),this.push({data:e.utf8decode(u),meta:t.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:e.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},e.Utf8DecodeWorker=l,i.inherits(c,s),c.prototype.processChunk=function(t){this.push({data:e.utf8encode(t.data),meta:t.meta})},e.Utf8EncodeWorker=c},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=(n(2),n(3)),s=c(n(5)),a=c(n(8)),u=n(26),l=c(n(18));function c(t){return t&&t.__esModule?t:{default:t}}var h=s.default.fieldSet(new Set([\"input\",\"status\",\"checkpoint\",\"output\"])),p=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e),function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"render\",value:function(){var t=this.props,e=t.loading,n=t.progress,i=t.fields,o=t.module,s=t.data,a=t.folder,u=(t.match,t.history);return e?(0,r.h)(l.default,{progress:n}):s.folders.length?a&&a.name?(i=h(i),(0,r.h)(\"div\",{class:\"rows params datasets\"},(0,r.h)(\"div\",{class:\"row row-heading dataset\"},i.has(\"input\")&&(0,r.h)(\"div\",{class:\"col\"},\"input\"),i.has(\"status\")&&(0,r.h)(\"div\",{class:\"col\"},\"status\"),i.has(\"checkpoint\")&&(0,r.h)(\"div\",{class:\"col\"},\"checkpoint\"),i.has(\"output\")&&(0,r.h)(\"div\",{class:\"col\"},\"output\")),this.renderGroups())):void 0:(console.log(\"no folders, redirect to /new\"),u.push(\"/\"+o.name+\"/new/\"))}},{key:\"renderGroups\",value:function(){var t=this,e=this.props,n=e.module,i=e.data,o=e.folder,a=e.fields,l=e.runner,c=e.onPickDataset,p=e.onPickFile;e.datasetActions;a=h(a);var f=i.datasetLookup,d=i.fileLookup;if(!f)return(0,r.h)(\"div\",null);var y=s.default.sort.orderByFn(\"date desc\"),m=y.mapFn,_=y.sortFn,v=l&&l.cpu.task&&l.cpu.task.module===n.name,g=l&&l.gpu.task&&l.gpu.task.module===n.name;return o.datasets.map(function(t){return f[t]}).map(m).sort(_).map(function(e){var n=e[1],i=\"\",o=!1,h=!1;return g&&l.gpu.task.dataset===n?(i=s.default.gerund(l.gpu.task.activity),o=!0):v&&\"fetch\"===l.cpu.task.activity&&l.cpu.task.opt.file_id===n.input[0]&&(o=!0,h=!0),(0,r.h)(\"div\",{key:n.name,className:\"row dataset\",onClick:function(){return c&&c(n)}},t.props.beforeRow&&t.props.beforeRow(n),a.has(\"input\")&&(0,r.h)(\"div\",{className:\"col\"},!!n.input.length&&(0,r.h)(u.FileList,{files:n.input.map(function(t){return d[t]}),className:\"input_files\",fileListClassName:\"\",rowClassName:\"input_file\",fields:\"name date size delete\",linkFiles:!0,onClick:p,onDelete:function(e){return t.onDeleteFile(e)}})),a.has(\"status\")&&(0,r.h)(\"div\",{className:[\"col\",\"quiet\",n.isBuilt?\"built\":\"not_built\",o?\"processing\":\"not_processing\"].join(\" \")},t.props.datasetActions&&t.props.datasetActions(n,h,o),i),a.has(\"checkpoint\")&&(0,r.h)(\"div\",{className:\"col checkpoint\"},!!n.checkpoints.length&&(0,r.h)(u.FileRow,{file:n.checkpoints[0],fields:\"name date epoch\",className:\"row checkpoint\"})),a.has(\"output\")&&(0,r.h)(\"div\",{className:\"col\"},!!n.output.length&&(0,r.h)(u.FileList,{files:n.output.map(function(t){return d[t]}),orderBy:\"epoch desc\",fields:\"name date epoch size\",linkFiles:!0,onClick:p,onDelete:function(e){return t.onDeleteFile(e)}})),t.props.afterRow&&t.props.afterRow(n))})}},{key:\"onDeleteFile\",value:function(t){confirm(\"Are you sure you want to delete this file?\")&&(console.log(\"delete: confirmed\"),this.props.onDeleteFile?(console.log(\"calling custom deletefile function\"),this.props.onDeleteFile(t)):a.default.file.destroy(t))}}]),e}();e.default=(0,o.connect)(function(t){return{runner:t.system.runner}},function(t,e){return{}})(p)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=n(1),r=n(2),o=n(3),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(59)),a=l(n(18)),u=l(n(41));function l(t){return t&&t.__esModule?t:{default:t}}e.default=(0,o.connect)(function(t){return{}},function(t,e){return{actions:(0,r.bindActionCreators)(s,t)}})(function(t){var e=t.loading,n=(t.status,t.error,t.history,t.actions),r=t.module;return e?(0,i.h)(a.default,null):(console.log(t),(0,i.h)(\"div\",{class:\"opaque\"},(0,i.h)(\"div\",{class:\"heading\"},(0,i.h)(\"h2\",null,\"Create a new \",r.displayName,\" project\")),(0,i.h)(\"div\",{class:\"params\"},(0,i.h)(u.default,{autofocus:!0,title:\"Name your project\",onSave:function(t){n.createFolder(r,t).then(function(t){window.location.href=\"/\"+r.name+\"/datasets/\"+t.id+\"/\"})}}))))})},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1);n(3);var o=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e),function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"render\",value:function(){return(0,r.h)(\"div\",{className:\"button param\"},(0,r.h)(\"span\",null,this.props.title),(0,r.h)(\"span\",null,this.props.children))}}]),e}();e.default=o},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.socket=void 0;var i,r=n(19),o=n(6),s=(i=o)&&i.__esModule?i:{default:i};var a=e.socket=io.connect(\"/client\");a.on(\"connect\",function(){return r.store.dispatch({type:s.default.socket.connect})}),a.on(\"connect_error\",function(t){return r.store.dispatch({type:s.default.socket.connect_error,error:t})}),a.on(\"reconnect\",function(t){return r.store.dispatch({type:s.default.socket.reconnect,attempt:t})}),a.on(\"reconnecting\",function(){return r.store.dispatch({type:s.default.socket.reconnecting})}),a.on(\"reconnect_error\",function(t){return r.store.dispatch({type:s.default.socket.reconnect_error,error:t})}),a.on(\"reconnect_failed\",function(t){return r.store.dispatch({type:s.default.socket.reconnect_failed,error:t})}),a.on(\"disconnect\",function(){return r.store.dispatch({type:s.default.socket.disconnect})}),a.on(\"error\",function(t){return r.store.dispatch({type:s.default.socket.error,error:t})})},function(t,e,n){(function(t){t.exports=function(){\"use strict\";var e,n;function i(){return e.apply(null,arguments)}function r(t){return t instanceof Array||\"[object Array]\"===Object.prototype.toString.call(t)}function o(t){return null!=t&&\"[object Object]\"===Object.prototype.toString.call(t)}function s(t){return void 0===t}function a(t){return\"number\"==typeof t||\"[object Number]\"===Object.prototype.toString.call(t)}function u(t){return t instanceof Date||\"[object Date]\"===Object.prototype.toString.call(t)}function l(t,e){var n,i=[];for(n=0;n<t.length;++n)i.push(e(t[n],n));return i}function c(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function h(t,e){for(var n in e)c(e,n)&&(t[n]=e[n]);return c(e,\"toString\")&&(t.toString=e.toString),c(e,\"valueOf\")&&(t.valueOf=e.valueOf),t}function p(t,e,n,i){return Oe(t,e,n,i,!0).utc()}function f(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function d(t){if(null==t._isValid){var e=f(t),i=n.call(e.parsedDateParts,function(t){return null!=t}),r=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&i);if(t._strict&&(r=r&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return r;t._isValid=r}return t._isValid}function y(t){var e=p(NaN);return null!=t?h(f(e),t):f(e).userInvalidated=!0,e}n=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),n=e.length>>>0,i=0;i<n;i++)if(i in e&&t.call(this,e[i],i,e))return!0;return!1};var m=i.momentProperties=[];function _(t,e){var n,i,r;if(s(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),s(e._i)||(t._i=e._i),s(e._f)||(t._f=e._f),s(e._l)||(t._l=e._l),s(e._strict)||(t._strict=e._strict),s(e._tzm)||(t._tzm=e._tzm),s(e._isUTC)||(t._isUTC=e._isUTC),s(e._offset)||(t._offset=e._offset),s(e._pf)||(t._pf=f(e)),s(e._locale)||(t._locale=e._locale),0<m.length)for(n=0;n<m.length;n++)s(r=e[i=m[n]])||(t[i]=r);return t}var v=!1;function g(t){_(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===v&&(v=!0,i.updateOffset(this),v=!1)}function b(t){return t instanceof g||null!=t&&null!=t._isAMomentObject}function w(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function k(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=w(e)),n}function S(t,e,n){var i,r=Math.min(t.length,e.length),o=Math.abs(t.length-e.length),s=0;for(i=0;i<r;i++)(n&&t[i]!==e[i]||!n&&k(t[i])!==k(e[i]))&&s++;return s+o}function T(t){!1===i.suppressDeprecationWarnings&&\"undefined\"!=typeof console&&console.warn&&console.warn(\"Deprecation warning: \"+t)}function x(t,e){var n=!0;return h(function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,t),n){for(var r,o=[],s=0;s<arguments.length;s++){if(r=\"\",\"object\"==typeof arguments[s]){for(var a in r+=\"\\n[\"+s+\"] \",arguments[0])r+=a+\": \"+arguments[0][a]+\", \";r=r.slice(0,-2)}else r=arguments[s];o.push(r)}T(t+\"\\nArguments: \"+Array.prototype.slice.call(o).join(\"\")+\"\\n\"+(new Error).stack),n=!1}return e.apply(this,arguments)},e)}var O,P={};function A(t,e){null!=i.deprecationHandler&&i.deprecationHandler(t,e),P[t]||(T(e),P[t]=!0)}function E(t){return t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}function C(t,e){var n,i=h({},t);for(n in e)c(e,n)&&(o(t[n])&&o(e[n])?(i[n]={},h(i[n],t[n]),h(i[n],e[n])):null!=e[n]?i[n]=e[n]:delete i[n]);for(n in t)c(t,n)&&!c(e,n)&&o(t[n])&&(i[n]=h({},i[n]));return i}function M(t){null!=t&&this.set(t)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,O=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)c(t,e)&&n.push(e);return n};var R={};function j(t,e){var n=t.toLowerCase();R[n]=R[n+\"s\"]=R[e]=t}function F(t){return\"string\"==typeof t?R[t]||R[t.toLowerCase()]:void 0}function N(t){var e,n,i={};for(n in t)c(t,n)&&(e=F(n))&&(i[e]=t[n]);return i}var L={};function D(t,e){L[t]=e}function q(t,e,n){var i=\"\"+Math.abs(t),r=e-i.length;return(0<=t?n?\"+\":\"\":\"-\")+Math.pow(10,Math.max(0,r)).toString().substr(1)+i}var I=/(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,B=/(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,U={},z={};function Y(t,e,n,i){var r=i;\"string\"==typeof i&&(r=function(){return this[i]()}),t&&(z[t]=r),e&&(z[e[0]]=function(){return q(r.apply(this,arguments),e[1],e[2])}),n&&(z[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),t)})}function W(t,e){return t.isValid()?(e=G(e,t.localeData()),U[e]=U[e]||function(t){var e,n,i,r=t.match(I);for(e=0,n=r.length;e<n;e++)z[r[e]]?r[e]=z[r[e]]:r[e]=(i=r[e]).match(/\\[[\\s\\S]/)?i.replace(/^\\[|\\]$/g,\"\"):i.replace(/\\\\/g,\"\");return function(e){var i,o=\"\";for(i=0;i<n;i++)o+=E(r[i])?r[i].call(e,t):r[i];return o}}(e),U[e](t)):t.localeData().invalidDate()}function G(t,e){var n=5;function i(t){return e.longDateFormat(t)||t}for(B.lastIndex=0;0<=n&&B.test(t);)t=t.replace(B,i),B.lastIndex=0,n-=1;return t}var V=/\\d/,H=/\\d\\d/,Z=/\\d{3}/,Q=/\\d{4}/,K=/[+-]?\\d{6}/,X=/\\d\\d?/,$=/\\d\\d\\d\\d?/,J=/\\d\\d\\d\\d\\d\\d?/,tt=/\\d{1,3}/,et=/\\d{1,4}/,nt=/[+-]?\\d{1,6}/,it=/\\d+/,rt=/[+-]?\\d+/,ot=/Z|[+-]\\d\\d:?\\d\\d/gi,st=/Z|[+-]\\d\\d(?::?\\d\\d)?/gi,at=/[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,ut={};function lt(t,e,n){ut[t]=E(e)?e:function(t,i){return t&&n?n:e}}function ct(t,e){return c(ut,t)?ut[t](e._strict,e._locale):new RegExp(ht(t.replace(\"\\\\\",\"\").replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,function(t,e,n,i,r){return e||n||i||r})))}function ht(t){return t.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g,\"\\\\$&\")}var pt={};function ft(t,e){var n,i=e;for(\"string\"==typeof t&&(t=[t]),a(e)&&(i=function(t,n){n[e]=k(t)}),n=0;n<t.length;n++)pt[t[n]]=i}function dt(t,e){ft(t,function(t,n,i,r){i._w=i._w||{},e(t,i._w,i,r)})}var yt=0,mt=1,_t=2,vt=3,gt=4,bt=5,wt=6,kt=7,St=8;function Tt(t){return xt(t)?366:365}function xt(t){return t%4==0&&t%100!=0||t%400==0}Y(\"Y\",0,0,function(){var t=this.year();return t<=9999?\"\"+t:\"+\"+t}),Y(0,[\"YY\",2],0,function(){return this.year()%100}),Y(0,[\"YYYY\",4],0,\"year\"),Y(0,[\"YYYYY\",5],0,\"year\"),Y(0,[\"YYYYYY\",6,!0],0,\"year\"),j(\"year\",\"y\"),D(\"year\",1),lt(\"Y\",rt),lt(\"YY\",X,H),lt(\"YYYY\",et,Q),lt(\"YYYYY\",nt,K),lt(\"YYYYYY\",nt,K),ft([\"YYYYY\",\"YYYYYY\"],yt),ft(\"YYYY\",function(t,e){e[yt]=2===t.length?i.parseTwoDigitYear(t):k(t)}),ft(\"YY\",function(t,e){e[yt]=i.parseTwoDigitYear(t)}),ft(\"Y\",function(t,e){e[yt]=parseInt(t,10)}),i.parseTwoDigitYear=function(t){return k(t)+(68<k(t)?1900:2e3)};var Ot,Pt=At(\"FullYear\",!0);function At(t,e){return function(n){return null!=n?(Ct(this,t,n),i.updateOffset(this,e),this):Et(this,t)}}function Et(t,e){return t.isValid()?t._d[\"get\"+(t._isUTC?\"UTC\":\"\")+e]():NaN}function Ct(t,e,n){t.isValid()&&!isNaN(n)&&(\"FullYear\"===e&&xt(t.year())&&1===t.month()&&29===t.date()?t._d[\"set\"+(t._isUTC?\"UTC\":\"\")+e](n,t.month(),Mt(n,t.month())):t._d[\"set\"+(t._isUTC?\"UTC\":\"\")+e](n))}function Mt(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=(e%12+12)%12;return t+=(e-n)/12,1===n?xt(t)?29:28:31-n%7%2}Ot=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},Y(\"M\",[\"MM\",2],\"Mo\",function(){return this.month()+1}),Y(\"MMM\",0,0,function(t){return this.localeData().monthsShort(this,t)}),Y(\"MMMM\",0,0,function(t){return this.localeData().months(this,t)}),j(\"month\",\"M\"),D(\"month\",8),lt(\"M\",X),lt(\"MM\",X,H),lt(\"MMM\",function(t,e){return e.monthsShortRegex(t)}),lt(\"MMMM\",function(t,e){return e.monthsRegex(t)}),ft([\"M\",\"MM\"],function(t,e){e[mt]=k(t)-1}),ft([\"MMM\",\"MMMM\"],function(t,e,n,i){var r=n._locale.monthsParse(t,i,n._strict);null!=r?e[mt]=r:f(n).invalidMonth=t});var Rt=/D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,jt=\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),Ft=\"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec\".split(\"_\");function Nt(t,e){var n;if(!t.isValid())return t;if(\"string\"==typeof e)if(/^\\d+$/.test(e))e=k(e);else if(!a(e=t.localeData().monthsParse(e)))return t;return n=Math.min(t.date(),Mt(t.year(),e)),t._d[\"set\"+(t._isUTC?\"UTC\":\"\")+\"Month\"](e,n),t}function Lt(t){return null!=t?(Nt(this,t),i.updateOffset(this,!0),this):Et(this,\"Month\")}var Dt=at,qt=at;function It(){function t(t,e){return e.length-t.length}var e,n,i=[],r=[],o=[];for(e=0;e<12;e++)n=p([2e3,e]),i.push(this.monthsShort(n,\"\")),r.push(this.months(n,\"\")),o.push(this.months(n,\"\")),o.push(this.monthsShort(n,\"\"));for(i.sort(t),r.sort(t),o.sort(t),e=0;e<12;e++)i[e]=ht(i[e]),r[e]=ht(r[e]);for(e=0;e<24;e++)o[e]=ht(o[e]);this._monthsRegex=new RegExp(\"^(\"+o.join(\"|\")+\")\",\"i\"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp(\"^(\"+r.join(\"|\")+\")\",\"i\"),this._monthsShortStrictRegex=new RegExp(\"^(\"+i.join(\"|\")+\")\",\"i\")}function Bt(t){var e=new Date(Date.UTC.apply(null,arguments));return t<100&&0<=t&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function Ut(t,e,n){var i=7+e-n;return-(7+Bt(t,0,i).getUTCDay()-e)%7+i-1}function zt(t,e,n,i,r){var o,s,a=1+7*(e-1)+(7+n-i)%7+Ut(t,i,r);return a<=0?s=Tt(o=t-1)+a:a>Tt(t)?(o=t+1,s=a-Tt(t)):(o=t,s=a),{year:o,dayOfYear:s}}function Yt(t,e,n){var i,r,o=Ut(t.year(),e,n),s=Math.floor((t.dayOfYear()-o-1)/7)+1;return s<1?i=s+Wt(r=t.year()-1,e,n):s>Wt(t.year(),e,n)?(i=s-Wt(t.year(),e,n),r=t.year()+1):(r=t.year(),i=s),{week:i,year:r}}function Wt(t,e,n){var i=Ut(t,e,n),r=Ut(t+1,e,n);return(Tt(t)-i+r)/7}Y(\"w\",[\"ww\",2],\"wo\",\"week\"),Y(\"W\",[\"WW\",2],\"Wo\",\"isoWeek\"),j(\"week\",\"w\"),j(\"isoWeek\",\"W\"),D(\"week\",5),D(\"isoWeek\",5),lt(\"w\",X),lt(\"ww\",X,H),lt(\"W\",X),lt(\"WW\",X,H),dt([\"w\",\"ww\",\"W\",\"WW\"],function(t,e,n,i){e[i.substr(0,1)]=k(t)}),Y(\"d\",0,\"do\",\"day\"),Y(\"dd\",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),Y(\"ddd\",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),Y(\"dddd\",0,0,function(t){return this.localeData().weekdays(this,t)}),Y(\"e\",0,0,\"weekday\"),Y(\"E\",0,0,\"isoWeekday\"),j(\"day\",\"d\"),j(\"weekday\",\"e\"),j(\"isoWeekday\",\"E\"),D(\"day\",11),D(\"weekday\",11),D(\"isoWeekday\",11),lt(\"d\",X),lt(\"e\",X),lt(\"E\",X),lt(\"dd\",function(t,e){return e.weekdaysMinRegex(t)}),lt(\"ddd\",function(t,e){return e.weekdaysShortRegex(t)}),lt(\"dddd\",function(t,e){return e.weekdaysRegex(t)}),dt([\"dd\",\"ddd\",\"dddd\"],function(t,e,n,i){var r=n._locale.weekdaysParse(t,i,n._strict);null!=r?e.d=r:f(n).invalidWeekday=t}),dt([\"d\",\"e\",\"E\"],function(t,e,n,i){e[i]=k(t)});var Gt=\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),Vt=\"Sun_Mon_Tue_Wed_Thu_Fri_Sat\".split(\"_\"),Ht=\"Su_Mo_Tu_We_Th_Fr_Sa\".split(\"_\"),Zt=at,Qt=at,Kt=at;function Xt(){function t(t,e){return e.length-t.length}var e,n,i,r,o,s=[],a=[],u=[],l=[];for(e=0;e<7;e++)n=p([2e3,1]).day(e),i=this.weekdaysMin(n,\"\"),r=this.weekdaysShort(n,\"\"),o=this.weekdays(n,\"\"),s.push(i),a.push(r),u.push(o),l.push(i),l.push(r),l.push(o);for(s.sort(t),a.sort(t),u.sort(t),l.sort(t),e=0;e<7;e++)a[e]=ht(a[e]),u[e]=ht(u[e]),l[e]=ht(l[e]);this._weekdaysRegex=new RegExp(\"^(\"+l.join(\"|\")+\")\",\"i\"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp(\"^(\"+u.join(\"|\")+\")\",\"i\"),this._weekdaysShortStrictRegex=new RegExp(\"^(\"+a.join(\"|\")+\")\",\"i\"),this._weekdaysMinStrictRegex=new RegExp(\"^(\"+s.join(\"|\")+\")\",\"i\")}function $t(){return this.hours()%12||12}function Jt(t,e){Y(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function te(t,e){return e._meridiemParse}Y(\"H\",[\"HH\",2],0,\"hour\"),Y(\"h\",[\"hh\",2],0,$t),Y(\"k\",[\"kk\",2],0,function(){return this.hours()||24}),Y(\"hmm\",0,0,function(){return\"\"+$t.apply(this)+q(this.minutes(),2)}),Y(\"hmmss\",0,0,function(){return\"\"+$t.apply(this)+q(this.minutes(),2)+q(this.seconds(),2)}),Y(\"Hmm\",0,0,function(){return\"\"+this.hours()+q(this.minutes(),2)}),Y(\"Hmmss\",0,0,function(){return\"\"+this.hours()+q(this.minutes(),2)+q(this.seconds(),2)}),Jt(\"a\",!0),Jt(\"A\",!1),j(\"hour\",\"h\"),D(\"hour\",13),lt(\"a\",te),lt(\"A\",te),lt(\"H\",X),lt(\"h\",X),lt(\"k\",X),lt(\"HH\",X,H),lt(\"hh\",X,H),lt(\"kk\",X,H),lt(\"hmm\",$),lt(\"hmmss\",J),lt(\"Hmm\",$),lt(\"Hmmss\",J),ft([\"H\",\"HH\"],vt),ft([\"k\",\"kk\"],function(t,e,n){var i=k(t);e[vt]=24===i?0:i}),ft([\"a\",\"A\"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),ft([\"h\",\"hh\"],function(t,e,n){e[vt]=k(t),f(n).bigHour=!0}),ft(\"hmm\",function(t,e,n){var i=t.length-2;e[vt]=k(t.substr(0,i)),e[gt]=k(t.substr(i)),f(n).bigHour=!0}),ft(\"hmmss\",function(t,e,n){var i=t.length-4,r=t.length-2;e[vt]=k(t.substr(0,i)),e[gt]=k(t.substr(i,2)),e[bt]=k(t.substr(r)),f(n).bigHour=!0}),ft(\"Hmm\",function(t,e,n){var i=t.length-2;e[vt]=k(t.substr(0,i)),e[gt]=k(t.substr(i))}),ft(\"Hmmss\",function(t,e,n){var i=t.length-4,r=t.length-2;e[vt]=k(t.substr(0,i)),e[gt]=k(t.substr(i,2)),e[bt]=k(t.substr(r))});var ee,ne=At(\"Hours\",!0),ie={calendar:{sameDay:\"[Today at] LT\",nextDay:\"[Tomorrow at] LT\",nextWeek:\"dddd [at] LT\",lastDay:\"[Yesterday at] LT\",lastWeek:\"[Last] dddd [at] LT\",sameElse:\"L\"},longDateFormat:{LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"},invalidDate:\"Invalid date\",ordinal:\"%d\",dayOfMonthOrdinalParse:/\\d{1,2}/,relativeTime:{future:\"in %s\",past:\"%s ago\",s:\"a few seconds\",ss:\"%d seconds\",m:\"a minute\",mm:\"%d minutes\",h:\"an hour\",hh:\"%d hours\",d:\"a day\",dd:\"%d days\",M:\"a month\",MM:\"%d months\",y:\"a year\",yy:\"%d years\"},months:jt,monthsShort:Ft,week:{dow:0,doy:6},weekdays:Gt,weekdaysMin:Ht,weekdaysShort:Vt,meridiemParse:/[ap]\\.?m?\\.?/i},re={},oe={};function se(t){return t?t.toLowerCase().replace(\"_\",\"-\"):t}function ae(e){var n=null;if(!re[e]&&void 0!==t&&t&&t.exports)try{n=ee._abbr,function(){var t=new Error('Cannot find module \"undefined\"');throw t.code=\"MODULE_NOT_FOUND\",t}(),ue(n)}catch(e){}return re[e]}function ue(t,e){var n;return t&&((n=s(e)?ce(t):le(t,e))?ee=n:\"undefined\"!=typeof console&&console.warn&&console.warn(\"Locale \"+t+\" not found. Did you forget to load it?\")),ee._abbr}function le(t,e){if(null!==e){var n,i=ie;if(e.abbr=t,null!=re[t])A(\"defineLocaleOverride\",\"use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.\"),i=re[t]._config;else if(null!=e.parentLocale)if(null!=re[e.parentLocale])i=re[e.parentLocale]._config;else{if(null==(n=ae(e.parentLocale)))return oe[e.parentLocale]||(oe[e.parentLocale]=[]),oe[e.parentLocale].push({name:t,config:e}),null;i=n._config}return re[t]=new M(C(i,e)),oe[t]&&oe[t].forEach(function(t){le(t.name,t.config)}),ue(t),re[t]}return delete re[t],null}function ce(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return ee;if(!r(t)){if(e=ae(t))return e;t=[t]}return function(t){for(var e,n,i,r,o=0;o<t.length;){for(e=(r=se(t[o]).split(\"-\")).length,n=(n=se(t[o+1]))?n.split(\"-\"):null;0<e;){if(i=ae(r.slice(0,e).join(\"-\")))return i;if(n&&n.length>=e&&S(r,n,!0)>=e-1)break;e--}o++}return ee}(t)}function he(t){var e,n=t._a;return n&&-2===f(t).overflow&&(e=n[mt]<0||11<n[mt]?mt:n[_t]<1||n[_t]>Mt(n[yt],n[mt])?_t:n[vt]<0||24<n[vt]||24===n[vt]&&(0!==n[gt]||0!==n[bt]||0!==n[wt])?vt:n[gt]<0||59<n[gt]?gt:n[bt]<0||59<n[bt]?bt:n[wt]<0||999<n[wt]?wt:-1,f(t)._overflowDayOfYear&&(e<yt||_t<e)&&(e=_t),f(t)._overflowWeeks&&-1===e&&(e=kt),f(t)._overflowWeekday&&-1===e&&(e=St),f(t).overflow=e),t}function pe(t,e,n){return null!=t?t:null!=e?e:n}function fe(t){var e,n,r,o,s,a=[];if(!t._d){var u,l;for(u=t,l=new Date(i.now()),r=u._useUTC?[l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()]:[l.getFullYear(),l.getMonth(),l.getDate()],t._w&&null==t._a[_t]&&null==t._a[mt]&&function(t){var e,n,i,r,o,s,a,u;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)o=1,s=4,n=pe(e.GG,t._a[yt],Yt(Pe(),1,4).year),i=pe(e.W,1),((r=pe(e.E,1))<1||7<r)&&(u=!0);else{o=t._locale._week.dow,s=t._locale._week.doy;var l=Yt(Pe(),o,s);n=pe(e.gg,t._a[yt],l.year),i=pe(e.w,l.week),null!=e.d?((r=e.d)<0||6<r)&&(u=!0):null!=e.e?(r=e.e+o,(e.e<0||6<e.e)&&(u=!0)):r=o}i<1||i>Wt(n,o,s)?f(t)._overflowWeeks=!0:null!=u?f(t)._overflowWeekday=!0:(a=zt(n,i,r,o,s),t._a[yt]=a.year,t._dayOfYear=a.dayOfYear)}(t),null!=t._dayOfYear&&(s=pe(t._a[yt],r[yt]),(t._dayOfYear>Tt(s)||0===t._dayOfYear)&&(f(t)._overflowDayOfYear=!0),n=Bt(s,0,t._dayOfYear),t._a[mt]=n.getUTCMonth(),t._a[_t]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=a[e]=r[e];for(;e<7;e++)t._a[e]=a[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[vt]&&0===t._a[gt]&&0===t._a[bt]&&0===t._a[wt]&&(t._nextDay=!0,t._a[vt]=0),t._d=(t._useUTC?Bt:function(t,e,n,i,r,o,s){var a=new Date(t,e,n,i,r,o,s);return t<100&&0<=t&&isFinite(a.getFullYear())&&a.setFullYear(t),a}).apply(null,a),o=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[vt]=24),t._w&&void 0!==t._w.d&&t._w.d!==o&&(f(t).weekdayMismatch=!0)}}var de=/^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,ye=/^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,me=/Z|[+-]\\d\\d(?::?\\d\\d)?/,_e=[[\"YYYYYY-MM-DD\",/[+-]\\d{6}-\\d\\d-\\d\\d/],[\"YYYY-MM-DD\",/\\d{4}-\\d\\d-\\d\\d/],[\"GGGG-[W]WW-E\",/\\d{4}-W\\d\\d-\\d/],[\"GGGG-[W]WW\",/\\d{4}-W\\d\\d/,!1],[\"YYYY-DDD\",/\\d{4}-\\d{3}/],[\"YYYY-MM\",/\\d{4}-\\d\\d/,!1],[\"YYYYYYMMDD\",/[+-]\\d{10}/],[\"YYYYMMDD\",/\\d{8}/],[\"GGGG[W]WWE\",/\\d{4}W\\d{3}/],[\"GGGG[W]WW\",/\\d{4}W\\d{2}/,!1],[\"YYYYDDD\",/\\d{7}/]],ve=[[\"HH:mm:ss.SSSS\",/\\d\\d:\\d\\d:\\d\\d\\.\\d+/],[\"HH:mm:ss,SSSS\",/\\d\\d:\\d\\d:\\d\\d,\\d+/],[\"HH:mm:ss\",/\\d\\d:\\d\\d:\\d\\d/],[\"HH:mm\",/\\d\\d:\\d\\d/],[\"HHmmss.SSSS\",/\\d\\d\\d\\d\\d\\d\\.\\d+/],[\"HHmmss,SSSS\",/\\d\\d\\d\\d\\d\\d,\\d+/],[\"HHmmss\",/\\d\\d\\d\\d\\d\\d/],[\"HHmm\",/\\d\\d\\d\\d/],[\"HH\",/\\d\\d/]],ge=/^\\/?Date\\((\\-?\\d+)/i;function be(t){var e,n,i,r,o,s,a=t._i,u=de.exec(a)||ye.exec(a);if(u){for(f(t).iso=!0,e=0,n=_e.length;e<n;e++)if(_e[e][1].exec(u[1])){r=_e[e][0],i=!1!==_e[e][2];break}if(null==r)return void(t._isValid=!1);if(u[3]){for(e=0,n=ve.length;e<n;e++)if(ve[e][1].exec(u[3])){o=(u[2]||\" \")+ve[e][0];break}if(null==o)return void(t._isValid=!1)}if(!i&&null!=o)return void(t._isValid=!1);if(u[4]){if(!me.exec(u[4]))return void(t._isValid=!1);s=\"Z\"}t._f=r+(o||\"\")+(s||\"\"),Te(t)}else t._isValid=!1}var we=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,ke={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Se(t){var e,n,i,r=we.exec(t._i.replace(/\\([^)]*\\)|[\\n\\t]/g,\" \").replace(/(\\s\\s+)/g,\" \").trim());if(r){var o=function(t,e,n,i,r,o){var s=[function(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}(t),Ft.indexOf(e),parseInt(n,10),parseInt(i,10),parseInt(r,10)];return o&&s.push(parseInt(o,10)),s}(r[4],r[3],r[2],r[5],r[6],r[7]);if(e=r[1],n=o,i=t,e&&Vt.indexOf(e)!==new Date(n[0],n[1],n[2]).getDay()&&(f(i).weekdayMismatch=!0,!(i._isValid=!1)))return;t._a=o,t._tzm=function(t,e,n){if(t)return ke[t];if(e)return 0;var i=parseInt(n,10),r=i%100;return(i-r)/100*60+r}(r[8],r[9],r[10]),t._d=Bt.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),f(t).rfc2822=!0}else t._isValid=!1}function Te(t){if(t._f!==i.ISO_8601)if(t._f!==i.RFC_2822){t._a=[],f(t).empty=!0;var e,n,r,o,s,a,u,l,h=\"\"+t._i,p=h.length,d=0;for(r=G(t._f,t._locale).match(I)||[],e=0;e<r.length;e++)o=r[e],(n=(h.match(ct(o,t))||[])[0])&&(0<(s=h.substr(0,h.indexOf(n))).length&&f(t).unusedInput.push(s),h=h.slice(h.indexOf(n)+n.length),d+=n.length),z[o]?(n?f(t).empty=!1:f(t).unusedTokens.push(o),a=o,l=t,null!=(u=n)&&c(pt,a)&&pt[a](u,l._a,l,a)):t._strict&&!n&&f(t).unusedTokens.push(o);f(t).charsLeftOver=p-d,0<h.length&&f(t).unusedInput.push(h),t._a[vt]<=12&&!0===f(t).bigHour&&0<t._a[vt]&&(f(t).bigHour=void 0),f(t).parsedDateParts=t._a.slice(0),f(t).meridiem=t._meridiem,t._a[vt]=function(t,e,n){var i;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):(null!=t.isPM&&((i=t.isPM(n))&&e<12&&(e+=12),i||12!==e||(e=0)),e)}(t._locale,t._a[vt],t._meridiem),fe(t),he(t)}else Se(t);else be(t)}function xe(t){var e,n,c,p,m=t._i,v=t._f;return t._locale=t._locale||ce(t._l),null===m||void 0===v&&\"\"===m?y({nullInput:!0}):(\"string\"==typeof m&&(t._i=m=t._locale.preparse(m)),b(m)?new g(he(m)):(u(m)?t._d=m:r(v)?function(t){var e,n,i,r,o;if(0===t._f.length)return f(t).invalidFormat=!0,t._d=new Date(NaN);for(r=0;r<t._f.length;r++)o=0,e=_({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[r],Te(e),d(e)&&(o+=f(e).charsLeftOver,o+=10*f(e).unusedTokens.length,f(e).score=o,(null==i||o<i)&&(i=o,n=e));h(t,n||e)}(t):v?Te(t):s(n=(e=t)._i)?e._d=new Date(i.now()):u(n)?e._d=new Date(n.valueOf()):\"string\"==typeof n?(c=e,null===(p=ge.exec(c._i))?(be(c),!1===c._isValid&&(delete c._isValid,Se(c),!1===c._isValid&&(delete c._isValid,i.createFromInputFallback(c)))):c._d=new Date(+p[1])):r(n)?(e._a=l(n.slice(0),function(t){return parseInt(t,10)}),fe(e)):o(n)?function(t){if(!t._d){var e=N(t._i);t._a=l([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),fe(t)}}(e):a(n)?e._d=new Date(n):i.createFromInputFallback(e),d(t)||(t._d=null),t))}function Oe(t,e,n,i,s){var a,u={};return!0!==n&&!1!==n||(i=n,n=void 0),(o(t)&&function(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}(t)||r(t)&&0===t.length)&&(t=void 0),u._isAMomentObject=!0,u._useUTC=u._isUTC=s,u._l=n,u._i=t,u._f=e,u._strict=i,(a=new g(he(xe(u))))._nextDay&&(a.add(1,\"d\"),a._nextDay=void 0),a}function Pe(t,e,n,i){return Oe(t,e,n,i,!1)}i.createFromInputFallback=x(\"value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.\",function(t){t._d=new Date(t._i+(t._useUTC?\" UTC\":\"\"))}),i.ISO_8601=function(){},i.RFC_2822=function(){};var Ae=x(\"moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/\",function(){var t=Pe.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:y()}),Ee=x(\"moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/\",function(){var t=Pe.apply(null,arguments);return this.isValid()&&t.isValid()?this<t?this:t:y()});function Ce(t,e){var n,i;if(1===e.length&&r(e[0])&&(e=e[0]),!e.length)return Pe();for(n=e[0],i=1;i<e.length;++i)e[i].isValid()&&!e[i][t](n)||(n=e[i]);return n}var Me=[\"year\",\"quarter\",\"month\",\"week\",\"day\",\"hour\",\"minute\",\"second\",\"millisecond\"];function Re(t){var e=N(t),n=e.year||0,i=e.quarter||0,r=e.month||0,o=e.week||0,s=e.day||0,a=e.hour||0,u=e.minute||0,l=e.second||0,c=e.millisecond||0;this._isValid=function(t){for(var e in t)if(-1===Ot.call(Me,e)||null!=t[e]&&isNaN(t[e]))return!1;for(var n=!1,i=0;i<Me.length;++i)if(t[Me[i]]){if(n)return!1;parseFloat(t[Me[i]])!==k(t[Me[i]])&&(n=!0)}return!0}(e),this._milliseconds=+c+1e3*l+6e4*u+1e3*a*60*60,this._days=+s+7*o,this._months=+r+3*i+12*n,this._data={},this._locale=ce(),this._bubble()}function je(t){return t instanceof Re}function Fe(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Ne(t,e){Y(t,0,0,function(){var t=this.utcOffset(),n=\"+\";return t<0&&(t=-t,n=\"-\"),n+q(~~(t/60),2)+e+q(~~t%60,2)})}Ne(\"Z\",\":\"),Ne(\"ZZ\",\"\"),lt(\"Z\",st),lt(\"ZZ\",st),ft([\"Z\",\"ZZ\"],function(t,e,n){n._useUTC=!0,n._tzm=De(st,t)});var Le=/([\\+\\-]|\\d\\d)/gi;function De(t,e){var n=(e||\"\").match(t);if(null===n)return null;var i=((n[n.length-1]||[])+\"\").match(Le)||[\"-\",0,0],r=60*i[1]+k(i[2]);return 0===r?0:\"+\"===i[0]?r:-r}function qe(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(b(t)||u(t)?t.valueOf():Pe(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),i.updateOffset(n,!1),n):Pe(t).local()}function Ie(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Be(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Ue=/^(\\-|\\+)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/,ze=/^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ye(t,e){var n,i,r,o=t,s=null;return je(t)?o={ms:t._milliseconds,d:t._days,M:t._months}:a(t)?(o={},e?o[e]=t:o.milliseconds=t):(s=Ue.exec(t))?(n=\"-\"===s[1]?-1:1,o={y:0,d:k(s[_t])*n,h:k(s[vt])*n,m:k(s[gt])*n,s:k(s[bt])*n,ms:k(Fe(1e3*s[wt]))*n}):(s=ze.exec(t))?(n=\"-\"===s[1]?-1:(s[1],1),o={y:We(s[2],n),M:We(s[3],n),w:We(s[4],n),d:We(s[5],n),h:We(s[6],n),m:We(s[7],n),s:We(s[8],n)}):null==o?o={}:\"object\"==typeof o&&(\"from\"in o||\"to\"in o)&&(r=function(t,e){var n;return t.isValid()&&e.isValid()?(e=qe(e,t),t.isBefore(e)?n=Ge(t,e):((n=Ge(e,t)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}(Pe(o.from),Pe(o.to)),(o={}).ms=r.milliseconds,o.M=r.months),i=new Re(o),je(t)&&c(t,\"_locale\")&&(i._locale=t._locale),i}function We(t,e){var n=t&&parseFloat(t.replace(\",\",\".\"));return(isNaN(n)?0:n)*e}function Ge(t,e){var n={milliseconds:0,months:0};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,\"M\").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,\"M\"),n}function Ve(t,e){return function(n,i){var r;return null===i||isNaN(+i)||(A(e,\"moment().\"+e+\"(period, number) is deprecated. Please use moment().\"+e+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),r=n,n=i,i=r),He(this,Ye(n=\"string\"==typeof n?+n:n,i),t),this}}function He(t,e,n,r){var o=e._milliseconds,s=Fe(e._days),a=Fe(e._months);t.isValid()&&(r=null==r||r,a&&Nt(t,Et(t,\"Month\")+a*n),s&&Ct(t,\"Date\",Et(t,\"Date\")+s*n),o&&t._d.setTime(t._d.valueOf()+o*n),r&&i.updateOffset(t,s||a))}Ye.fn=Re.prototype,Ye.invalid=function(){return Ye(NaN)};var Ze=Ve(1,\"add\"),Qe=Ve(-1,\"subtract\");function Ke(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),i=t.clone().add(n,\"months\");return-(n+(e-i<0?(e-i)/(i-t.clone().add(n-1,\"months\")):(e-i)/(t.clone().add(n+1,\"months\")-i)))||0}function Xe(t){var e;return void 0===t?this._locale._abbr:(null!=(e=ce(t))&&(this._locale=e),this)}i.defaultFormat=\"YYYY-MM-DDTHH:mm:ssZ\",i.defaultFormatUtc=\"YYYY-MM-DDTHH:mm:ss[Z]\";var $e=x(\"moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.\",function(t){return void 0===t?this.localeData():this.locale(t)});function Je(){return this._locale}function tn(t,e){Y(0,[t,t.length],0,e)}function en(t,e,n,i,r){var o;return null==t?Yt(this,i,r).year:((o=Wt(t,i,r))<e&&(e=o),function(t,e,n,i,r){var o=zt(t,e,n,i,r),s=Bt(o.year,0,o.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}.call(this,t,e,n,i,r))}Y(0,[\"gg\",2],0,function(){return this.weekYear()%100}),Y(0,[\"GG\",2],0,function(){return this.isoWeekYear()%100}),tn(\"gggg\",\"weekYear\"),tn(\"ggggg\",\"weekYear\"),tn(\"GGGG\",\"isoWeekYear\"),tn(\"GGGGG\",\"isoWeekYear\"),j(\"weekYear\",\"gg\"),j(\"isoWeekYear\",\"GG\"),D(\"weekYear\",1),D(\"isoWeekYear\",1),lt(\"G\",rt),lt(\"g\",rt),lt(\"GG\",X,H),lt(\"gg\",X,H),lt(\"GGGG\",et,Q),lt(\"gggg\",et,Q),lt(\"GGGGG\",nt,K),lt(\"ggggg\",nt,K),dt([\"gggg\",\"ggggg\",\"GGGG\",\"GGGGG\"],function(t,e,n,i){e[i.substr(0,2)]=k(t)}),dt([\"gg\",\"GG\"],function(t,e,n,r){e[r]=i.parseTwoDigitYear(t)}),Y(\"Q\",0,\"Qo\",\"quarter\"),j(\"quarter\",\"Q\"),D(\"quarter\",7),lt(\"Q\",V),ft(\"Q\",function(t,e){e[mt]=3*(k(t)-1)}),Y(\"D\",[\"DD\",2],\"Do\",\"date\"),j(\"date\",\"D\"),D(\"date\",9),lt(\"D\",X),lt(\"DD\",X,H),lt(\"Do\",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),ft([\"D\",\"DD\"],_t),ft(\"Do\",function(t,e){e[_t]=k(t.match(X)[0])});var nn=At(\"Date\",!0);Y(\"DDD\",[\"DDDD\",3],\"DDDo\",\"dayOfYear\"),j(\"dayOfYear\",\"DDD\"),D(\"dayOfYear\",4),lt(\"DDD\",tt),lt(\"DDDD\",Z),ft([\"DDD\",\"DDDD\"],function(t,e,n){n._dayOfYear=k(t)}),Y(\"m\",[\"mm\",2],0,\"minute\"),j(\"minute\",\"m\"),D(\"minute\",14),lt(\"m\",X),lt(\"mm\",X,H),ft([\"m\",\"mm\"],gt);var rn=At(\"Minutes\",!1);Y(\"s\",[\"ss\",2],0,\"second\"),j(\"second\",\"s\"),D(\"second\",15),lt(\"s\",X),lt(\"ss\",X,H),ft([\"s\",\"ss\"],bt);var on,sn=At(\"Seconds\",!1);for(Y(\"S\",0,0,function(){return~~(this.millisecond()/100)}),Y(0,[\"SS\",2],0,function(){return~~(this.millisecond()/10)}),Y(0,[\"SSS\",3],0,\"millisecond\"),Y(0,[\"SSSS\",4],0,function(){return 10*this.millisecond()}),Y(0,[\"SSSSS\",5],0,function(){return 100*this.millisecond()}),Y(0,[\"SSSSSS\",6],0,function(){return 1e3*this.millisecond()}),Y(0,[\"SSSSSSS\",7],0,function(){return 1e4*this.millisecond()}),Y(0,[\"SSSSSSSS\",8],0,function(){return 1e5*this.millisecond()}),Y(0,[\"SSSSSSSSS\",9],0,function(){return 1e6*this.millisecond()}),j(\"millisecond\",\"ms\"),D(\"millisecond\",16),lt(\"S\",tt,V),lt(\"SS\",tt,H),lt(\"SSS\",tt,Z),on=\"SSSS\";on.length<=9;on+=\"S\")lt(on,it);function an(t,e){e[wt]=k(1e3*(\"0.\"+t))}for(on=\"S\";on.length<=9;on+=\"S\")ft(on,an);var un=At(\"Milliseconds\",!1);Y(\"z\",0,0,\"zoneAbbr\"),Y(\"zz\",0,0,\"zoneName\");var ln=g.prototype;function cn(t){return t}ln.add=Ze,ln.calendar=function(t,e){var n=t||Pe(),r=qe(n,this).startOf(\"day\"),o=i.calendarFormat(this,r)||\"sameElse\",s=e&&(E(e[o])?e[o].call(this,n):e[o]);return this.format(s||this.localeData().calendar(o,this,Pe(n)))},ln.clone=function(){return new g(this)},ln.diff=function(t,e,n){var i,r,o;if(!this.isValid())return NaN;if(!(i=qe(t,this)).isValid())return NaN;switch(r=6e4*(i.utcOffset()-this.utcOffset()),e=F(e)){case\"year\":o=Ke(this,i)/12;break;case\"month\":o=Ke(this,i);break;case\"quarter\":o=Ke(this,i)/3;break;case\"second\":o=(this-i)/1e3;break;case\"minute\":o=(this-i)/6e4;break;case\"hour\":o=(this-i)/36e5;break;case\"day\":o=(this-i-r)/864e5;break;case\"week\":o=(this-i-r)/6048e5;break;default:o=this-i}return n?o:w(o)},ln.endOf=function(t){return void 0===(t=F(t))||\"millisecond\"===t?this:(\"date\"===t&&(t=\"day\"),this.startOf(t).add(1,\"isoWeek\"===t?\"week\":t).subtract(1,\"ms\"))},ln.format=function(t){t||(t=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var e=W(this,t);return this.localeData().postformat(e)},ln.from=function(t,e){return this.isValid()&&(b(t)&&t.isValid()||Pe(t).isValid())?Ye({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},ln.fromNow=function(t){return this.from(Pe(),t)},ln.to=function(t,e){return this.isValid()&&(b(t)&&t.isValid()||Pe(t).isValid())?Ye({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},ln.toNow=function(t){return this.to(Pe(),t)},ln.get=function(t){return E(this[t=F(t)])?this[t]():this},ln.invalidAt=function(){return f(this).overflow},ln.isAfter=function(t,e){var n=b(t)?t:Pe(t);return!(!this.isValid()||!n.isValid())&&(\"millisecond\"===(e=F(s(e)?\"millisecond\":e))?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())},ln.isBefore=function(t,e){var n=b(t)?t:Pe(t);return!(!this.isValid()||!n.isValid())&&(\"millisecond\"===(e=F(s(e)?\"millisecond\":e))?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())},ln.isBetween=function(t,e,n,i){return(\"(\"===(i=i||\"()\")[0]?this.isAfter(t,n):!this.isBefore(t,n))&&(\")\"===i[1]?this.isBefore(e,n):!this.isAfter(e,n))},ln.isSame=function(t,e){var n,i=b(t)?t:Pe(t);return!(!this.isValid()||!i.isValid())&&(\"millisecond\"===(e=F(e||\"millisecond\"))?this.valueOf()===i.valueOf():(n=i.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))},ln.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},ln.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},ln.isValid=function(){return d(this)},ln.lang=$e,ln.locale=Xe,ln.localeData=Je,ln.max=Ee,ln.min=Ae,ln.parsingFlags=function(){return h({},f(this))},ln.set=function(t,e){if(\"object\"==typeof t)for(var n=function(t){var e=[];for(var n in t)e.push({unit:n,priority:L[n]});return e.sort(function(t,e){return t.priority-e.priority}),e}(t=N(t)),i=0;i<n.length;i++)this[n[i].unit](t[n[i].unit]);else if(E(this[t=F(t)]))return this[t](e);return this},ln.startOf=function(t){switch(t=F(t)){case\"year\":this.month(0);case\"quarter\":case\"month\":this.date(1);case\"week\":case\"isoWeek\":case\"day\":case\"date\":this.hours(0);case\"hour\":this.minutes(0);case\"minute\":this.seconds(0);case\"second\":this.milliseconds(0)}return\"week\"===t&&this.weekday(0),\"isoWeek\"===t&&this.isoWeekday(1),\"quarter\"===t&&this.month(3*Math.floor(this.month()/3)),this},ln.subtract=Qe,ln.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},ln.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},ln.toDate=function(){return new Date(this.valueOf())},ln.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,n=e?this.clone().utc():this;return n.year()<0||9999<n.year()?W(n,e?\"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]\":\"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ\"):E(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace(\"Z\",W(n,\"Z\")):W(n,e?\"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]\":\"YYYY-MM-DD[T]HH:mm:ss.SSSZ\")},ln.inspect=function(){if(!this.isValid())return\"moment.invalid(/* \"+this._i+\" */)\";var t=\"moment\",e=\"\";this.isLocal()||(t=0===this.utcOffset()?\"moment.utc\":\"moment.parseZone\",e=\"Z\");var n=\"[\"+t+'(\"]',i=0<=this.year()&&this.year()<=9999?\"YYYY\":\"YYYYYY\",r=e+'[\")]';return this.format(n+i+\"-MM-DD[T]HH:mm:ss.SSS\"+r)},ln.toJSON=function(){return this.isValid()?this.toISOString():null},ln.toString=function(){return this.clone().locale(\"en\").format(\"ddd MMM DD YYYY HH:mm:ss [GMT]ZZ\")},ln.unix=function(){return Math.floor(this.valueOf()/1e3)},ln.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},ln.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},ln.year=Pt,ln.isLeapYear=function(){return xt(this.year())},ln.weekYear=function(t){return en.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},ln.isoWeekYear=function(t){return en.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},ln.quarter=ln.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},ln.month=Lt,ln.daysInMonth=function(){return Mt(this.year(),this.month())},ln.week=ln.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),\"d\")},ln.isoWeek=ln.isoWeeks=function(t){var e=Yt(this,1,4).week;return null==t?e:this.add(7*(t-e),\"d\")},ln.weeksInYear=function(){var t=this.localeData()._week;return Wt(this.year(),t.dow,t.doy)},ln.isoWeeksInYear=function(){return Wt(this.year(),1,4)},ln.date=nn,ln.day=ln.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e,n,i=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(e=t,n=this.localeData(),t=\"string\"!=typeof e?e:isNaN(e)?\"number\"==typeof(e=n.weekdaysParse(e))?e:null:parseInt(e,10),this.add(t-i,\"d\")):i},ln.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,\"d\")},ln.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=(n=t,i=this.localeData(),\"string\"==typeof n?i.weekdaysParse(n)%7||7:isNaN(n)?null:n);return this.day(this.day()%7?e:e-7)}return this.day()||7;var n,i},ln.dayOfYear=function(t){var e=Math.round((this.clone().startOf(\"day\")-this.clone().startOf(\"year\"))/864e5)+1;return null==t?e:this.add(t-e,\"d\")},ln.hour=ln.hours=ne,ln.minute=ln.minutes=rn,ln.second=ln.seconds=sn,ln.millisecond=ln.milliseconds=un,ln.utcOffset=function(t,e,n){var r,o=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if(\"string\"==typeof t){if(null===(t=De(st,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(r=Ie(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,\"m\"),o!==t&&(!e||this._changeInProgress?He(this,Ye(t-o,\"m\"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:Ie(this)},ln.utc=function(t){return this.utcOffset(0,t)},ln.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Ie(this),\"m\")),this},ln.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if(\"string\"==typeof this._i){var t=De(ot,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},ln.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?Pe(t).utcOffset():0,(this.utcOffset()-t)%60==0)},ln.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},ln.isLocal=function(){return!!this.isValid()&&!this._isUTC},ln.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},ln.isUtc=Be,ln.isUTC=Be,ln.zoneAbbr=function(){return this._isUTC?\"UTC\":\"\"},ln.zoneName=function(){return this._isUTC?\"Coordinated Universal Time\":\"\"},ln.dates=x(\"dates accessor is deprecated. Use date instead.\",nn),ln.months=x(\"months accessor is deprecated. Use month instead\",Lt),ln.years=x(\"years accessor is deprecated. Use year instead\",Pt),ln.zone=x(\"moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/\",function(t,e){return null!=t?(\"string\"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}),ln.isDSTShifted=x(\"isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information\",function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var t={};if(_(t,this),(t=xe(t))._a){var e=t._isUTC?p(t._a):Pe(t._a);this._isDSTShifted=this.isValid()&&0<S(t._a,e.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted});var hn=M.prototype;function pn(t,e,n,i){var r=ce(),o=p().set(i,e);return r[n](o,t)}function fn(t,e,n){if(a(t)&&(e=t,t=void 0),t=t||\"\",null!=e)return pn(t,e,n,\"month\");var i,r=[];for(i=0;i<12;i++)r[i]=pn(t,i,n,\"month\");return r}function dn(t,e,n,i){\"boolean\"==typeof t?a(e)&&(n=e,e=void 0):(e=t,t=!1,a(n=e)&&(n=e,e=void 0)),e=e||\"\";var r,o=ce(),s=t?o._week.dow:0;if(null!=n)return pn(e,(n+s)%7,i,\"day\");var u=[];for(r=0;r<7;r++)u[r]=pn(e,(r+s)%7,i,\"day\");return u}hn.calendar=function(t,e,n){var i=this._calendar[t]||this._calendar.sameElse;return E(i)?i.call(e,n):i},hn.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])},hn.invalidDate=function(){return this._invalidDate},hn.ordinal=function(t){return this._ordinal.replace(\"%d\",t)},hn.preparse=cn,hn.postformat=cn,hn.relativeTime=function(t,e,n,i){var r=this._relativeTime[n];return E(r)?r(t,e,n,i):r.replace(/%d/i,t)},hn.pastFuture=function(t,e){var n=this._relativeTime[0<t?\"future\":\"past\"];return E(n)?n(e):n.replace(/%s/i,e)},hn.set=function(t){var e,n;for(n in t)E(e=t[n])?this[n]=e:this[\"_\"+n]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+\"|\"+/\\d{1,2}/.source)},hn.months=function(t,e){return t?r(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Rt).test(e)?\"format\":\"standalone\"][t.month()]:r(this._months)?this._months:this._months.standalone},hn.monthsShort=function(t,e){return t?r(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Rt.test(e)?\"format\":\"standalone\"][t.month()]:r(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},hn.monthsParse=function(t,e,n){var i,r,o;if(this._monthsParseExact)return function(t,e,n){var i,r,o,s=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)o=p([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(o,\"\").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(o,\"\").toLocaleLowerCase();return n?\"MMM\"===e?-1!==(r=Ot.call(this._shortMonthsParse,s))?r:null:-1!==(r=Ot.call(this._longMonthsParse,s))?r:null:\"MMM\"===e?-1!==(r=Ot.call(this._shortMonthsParse,s))?r:-1!==(r=Ot.call(this._longMonthsParse,s))?r:null:-1!==(r=Ot.call(this._longMonthsParse,s))?r:-1!==(r=Ot.call(this._shortMonthsParse,s))?r:null}.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(r=p([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp(\"^\"+this.months(r,\"\").replace(\".\",\"\")+\"$\",\"i\"),this._shortMonthsParse[i]=new RegExp(\"^\"+this.monthsShort(r,\"\").replace(\".\",\"\")+\"$\",\"i\")),n||this._monthsParse[i]||(o=\"^\"+this.months(r,\"\")+\"|^\"+this.monthsShort(r,\"\"),this._monthsParse[i]=new RegExp(o.replace(\".\",\"\"),\"i\")),n&&\"MMMM\"===e&&this._longMonthsParse[i].test(t))return i;if(n&&\"MMM\"===e&&this._shortMonthsParse[i].test(t))return i;if(!n&&this._monthsParse[i].test(t))return i}},hn.monthsRegex=function(t){return this._monthsParseExact?(c(this,\"_monthsRegex\")||It.call(this),t?this._monthsStrictRegex:this._monthsRegex):(c(this,\"_monthsRegex\")||(this._monthsRegex=qt),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},hn.monthsShortRegex=function(t){return this._monthsParseExact?(c(this,\"_monthsRegex\")||It.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,\"_monthsShortRegex\")||(this._monthsShortRegex=Dt),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},hn.week=function(t){return Yt(t,this._week.dow,this._week.doy).week},hn.firstDayOfYear=function(){return this._week.doy},hn.firstDayOfWeek=function(){return this._week.dow},hn.weekdays=function(t,e){return t?r(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?\"format\":\"standalone\"][t.day()]:r(this._weekdays)?this._weekdays:this._weekdays.standalone},hn.weekdaysMin=function(t){return t?this._weekdaysMin[t.day()]:this._weekdaysMin},hn.weekdaysShort=function(t){return t?this._weekdaysShort[t.day()]:this._weekdaysShort},hn.weekdaysParse=function(t,e,n){var i,r,o;if(this._weekdaysParseExact)return function(t,e,n){var i,r,o,s=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)o=p([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(o,\"\").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(o,\"\").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(o,\"\").toLocaleLowerCase();return n?\"dddd\"===e?-1!==(r=Ot.call(this._weekdaysParse,s))?r:null:\"ddd\"===e?-1!==(r=Ot.call(this._shortWeekdaysParse,s))?r:null:-1!==(r=Ot.call(this._minWeekdaysParse,s))?r:null:\"dddd\"===e?-1!==(r=Ot.call(this._weekdaysParse,s))?r:-1!==(r=Ot.call(this._shortWeekdaysParse,s))?r:-1!==(r=Ot.call(this._minWeekdaysParse,s))?r:null:\"ddd\"===e?-1!==(r=Ot.call(this._shortWeekdaysParse,s))?r:-1!==(r=Ot.call(this._weekdaysParse,s))?r:-1!==(r=Ot.call(this._minWeekdaysParse,s))?r:null:-1!==(r=Ot.call(this._minWeekdaysParse,s))?r:-1!==(r=Ot.call(this._weekdaysParse,s))?r:-1!==(r=Ot.call(this._shortWeekdaysParse,s))?r:null}.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(r=p([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp(\"^\"+this.weekdays(r,\"\").replace(\".\",\".?\")+\"$\",\"i\"),this._shortWeekdaysParse[i]=new RegExp(\"^\"+this.weekdaysShort(r,\"\").replace(\".\",\".?\")+\"$\",\"i\"),this._minWeekdaysParse[i]=new RegExp(\"^\"+this.weekdaysMin(r,\"\").replace(\".\",\".?\")+\"$\",\"i\")),this._weekdaysParse[i]||(o=\"^\"+this.weekdays(r,\"\")+\"|^\"+this.weekdaysShort(r,\"\")+\"|^\"+this.weekdaysMin(r,\"\"),this._weekdaysParse[i]=new RegExp(o.replace(\".\",\"\"),\"i\")),n&&\"dddd\"===e&&this._fullWeekdaysParse[i].test(t))return i;if(n&&\"ddd\"===e&&this._shortWeekdaysParse[i].test(t))return i;if(n&&\"dd\"===e&&this._minWeekdaysParse[i].test(t))return i;if(!n&&this._weekdaysParse[i].test(t))return i}},hn.weekdaysRegex=function(t){return this._weekdaysParseExact?(c(this,\"_weekdaysRegex\")||Xt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,\"_weekdaysRegex\")||(this._weekdaysRegex=Zt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},hn.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(c(this,\"_weekdaysRegex\")||Xt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,\"_weekdaysShortRegex\")||(this._weekdaysShortRegex=Qt),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},hn.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(c(this,\"_weekdaysRegex\")||Xt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,\"_weekdaysMinRegex\")||(this._weekdaysMinRegex=Kt),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},hn.isPM=function(t){return\"p\"===(t+\"\").toLowerCase().charAt(0)},hn.meridiem=function(t,e,n){return 11<t?n?\"pm\":\"PM\":n?\"am\":\"AM\"},ue(\"en\",{dayOfMonthOrdinalParse:/\\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===k(t%100/10)?\"th\":1===e?\"st\":2===e?\"nd\":3===e?\"rd\":\"th\")}}),i.lang=x(\"moment.lang is deprecated. Use moment.locale instead.\",ue),i.langData=x(\"moment.langData is deprecated. Use moment.localeData instead.\",ce);var yn=Math.abs;function mn(t,e,n,i){var r=Ye(e,n);return t._milliseconds+=i*r._milliseconds,t._days+=i*r._days,t._months+=i*r._months,t._bubble()}function _n(t){return t<0?Math.floor(t):Math.ceil(t)}function vn(t){return 4800*t/146097}function gn(t){return 146097*t/4800}function bn(t){return function(){return this.as(t)}}var wn=bn(\"ms\"),kn=bn(\"s\"),Sn=bn(\"m\"),Tn=bn(\"h\"),xn=bn(\"d\"),On=bn(\"w\"),Pn=bn(\"M\"),An=bn(\"y\");function En(t){return function(){return this.isValid()?this._data[t]:NaN}}var Cn=En(\"milliseconds\"),Mn=En(\"seconds\"),Rn=En(\"minutes\"),jn=En(\"hours\"),Fn=En(\"days\"),Nn=En(\"months\"),Ln=En(\"years\"),Dn=Math.round,qn={ss:44,s:45,m:45,h:22,d:26,M:11},In=Math.abs;function Bn(t){return(0<t)-(t<0)||+t}function Un(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n=In(this._milliseconds)/1e3,i=In(this._days),r=In(this._months);e=w((t=w(n/60))/60),n%=60,t%=60;var o=w(r/12),s=r%=12,a=i,u=e,l=t,c=n?n.toFixed(3).replace(/\\.?0+$/,\"\"):\"\",h=this.asSeconds();if(!h)return\"P0D\";var p=h<0?\"-\":\"\",f=Bn(this._months)!==Bn(h)?\"-\":\"\",d=Bn(this._days)!==Bn(h)?\"-\":\"\",y=Bn(this._milliseconds)!==Bn(h)?\"-\":\"\";return p+\"P\"+(o?f+o+\"Y\":\"\")+(s?f+s+\"M\":\"\")+(a?d+a+\"D\":\"\")+(u||l||c?\"T\":\"\")+(u?y+u+\"H\":\"\")+(l?y+l+\"M\":\"\")+(c?y+c+\"S\":\"\")}var zn=Re.prototype;return zn.isValid=function(){return this._isValid},zn.abs=function(){var t=this._data;return this._milliseconds=yn(this._milliseconds),this._days=yn(this._days),this._months=yn(this._months),t.milliseconds=yn(t.milliseconds),t.seconds=yn(t.seconds),t.minutes=yn(t.minutes),t.hours=yn(t.hours),t.months=yn(t.months),t.years=yn(t.years),this},zn.add=function(t,e){return mn(this,t,e,1)},zn.subtract=function(t,e){return mn(this,t,e,-1)},zn.as=function(t){if(!this.isValid())return NaN;var e,n,i=this._milliseconds;if(\"month\"===(t=F(t))||\"year\"===t)return e=this._days+i/864e5,n=this._months+vn(e),\"month\"===t?n:n/12;switch(e=this._days+Math.round(gn(this._months)),t){case\"week\":return e/7+i/6048e5;case\"day\":return e+i/864e5;case\"hour\":return 24*e+i/36e5;case\"minute\":return 1440*e+i/6e4;case\"second\":return 86400*e+i/1e3;case\"millisecond\":return Math.floor(864e5*e)+i;default:throw new Error(\"Unknown unit \"+t)}},zn.asMilliseconds=wn,zn.asSeconds=kn,zn.asMinutes=Sn,zn.asHours=Tn,zn.asDays=xn,zn.asWeeks=On,zn.asMonths=Pn,zn.asYears=An,zn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},zn._bubble=function(){var t,e,n,i,r,o=this._milliseconds,s=this._days,a=this._months,u=this._data;return 0<=o&&0<=s&&0<=a||o<=0&&s<=0&&a<=0||(o+=864e5*_n(gn(a)+s),a=s=0),u.milliseconds=o%1e3,t=w(o/1e3),u.seconds=t%60,e=w(t/60),u.minutes=e%60,n=w(e/60),u.hours=n%24,a+=r=w(vn(s+=w(n/24))),s-=_n(gn(r)),i=w(a/12),a%=12,u.days=s,u.months=a,u.years=i,this},zn.clone=function(){return Ye(this)},zn.get=function(t){return t=F(t),this.isValid()?this[t+\"s\"]():NaN},zn.milliseconds=Cn,zn.seconds=Mn,zn.minutes=Rn,zn.hours=jn,zn.days=Fn,zn.weeks=function(){return w(this.days()/7)},zn.months=Nn,zn.years=Ln,zn.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e,n,i,r,o,s,a,u,l,c,h=this.localeData(),p=(e=!t,n=h,i=Ye(this).abs(),r=Dn(i.as(\"s\")),o=Dn(i.as(\"m\")),s=Dn(i.as(\"h\")),a=Dn(i.as(\"d\")),u=Dn(i.as(\"M\")),l=Dn(i.as(\"y\")),(c=r<=qn.ss&&[\"s\",r]||r<qn.s&&[\"ss\",r]||o<=1&&[\"m\"]||o<qn.m&&[\"mm\",o]||s<=1&&[\"h\"]||s<qn.h&&[\"hh\",s]||a<=1&&[\"d\"]||a<qn.d&&[\"dd\",a]||u<=1&&[\"M\"]||u<qn.M&&[\"MM\",u]||l<=1&&[\"y\"]||[\"yy\",l])[2]=e,c[3]=0<+this,c[4]=n,function(t,e,n,i,r){return r.relativeTime(e||1,!!n,t,i)}.apply(null,c));return t&&(p=h.pastFuture(+this,p)),h.postformat(p)},zn.toISOString=Un,zn.toString=Un,zn.toJSON=Un,zn.locale=Xe,zn.localeData=Je,zn.toIsoString=x(\"toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)\",Un),zn.lang=$e,Y(\"X\",0,0,\"unix\"),Y(\"x\",0,0,\"valueOf\"),lt(\"x\",rt),lt(\"X\",/[+-]?\\d+(\\.\\d{1,3})?/),ft(\"X\",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),ft(\"x\",function(t,e,n){n._d=new Date(k(t))}),i.version=\"2.22.1\",e=Pe,i.fn=ln,i.min=function(){return Ce(\"isBefore\",[].slice.call(arguments,0))},i.max=function(){return Ce(\"isAfter\",[].slice.call(arguments,0))},i.now=function(){return Date.now?Date.now():+new Date},i.utc=p,i.unix=function(t){return Pe(1e3*t)},i.months=function(t,e){return fn(t,e,\"months\")},i.isDate=u,i.locale=ue,i.invalid=y,i.duration=Ye,i.isMoment=b,i.weekdays=function(t,e,n){return dn(t,e,n,\"weekdays\")},i.parseZone=function(){return Pe.apply(null,arguments).parseZone()},i.localeData=ce,i.isDuration=je,i.monthsShort=function(t,e){return fn(t,e,\"monthsShort\")},i.weekdaysMin=function(t,e,n){return dn(t,e,n,\"weekdaysMin\")},i.defineLocale=le,i.updateLocale=function(t,e){if(null!=e){var n,i,r=ie;null!=(i=ae(t))&&(r=i._config),(n=new M(e=C(r,e))).parentLocale=re[t],re[t]=n,ue(t)}else null!=re[t]&&(null!=re[t].parentLocale?re[t]=re[t].parentLocale:null!=re[t]&&delete re[t]);return re[t]},i.locales=function(){return O(re)},i.weekdaysShort=function(t,e,n){return dn(t,e,n,\"weekdaysShort\")},i.normalizeUnits=F,i.relativeTimeRounding=function(t){return void 0===t?Dn:\"function\"==typeof t&&(Dn=t,!0)},i.relativeTimeThreshold=function(t,e){return void 0!==qn[t]&&(void 0===e?qn[t]:(qn[t]=e,\"s\"===t&&(qn.ss=e-1),!0))},i.calendarFormat=function(t,e){var n=t.diff(e,\"days\",!0);return n<-6?\"sameElse\":n<-1?\"lastWeek\":n<0?\"lastDay\":n<1?\"sameDay\":n<2?\"nextDay\":n<7?\"nextWeek\":\"sameElse\"},i.prototype=ln,i.HTML5_FMT={DATETIME_LOCAL:\"YYYY-MM-DDTHH:mm\",DATETIME_LOCAL_SECONDS:\"YYYY-MM-DDTHH:mm:ss\",DATETIME_LOCAL_MS:\"YYYY-MM-DDTHH:mm:ss.SSS\",DATE:\"YYYY-MM-DD\",TIME:\"HH:mm\",TIME_SECONDS:\"HH:mm:ss\",TIME_MS:\"HH:mm:ss.SSS\",WEEK:\"YYYY-[W]WW\",MONTH:\"YYYY-MM\"},i}()}).call(this,n(276)(t))},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.import_files=e.load_loss=e.load_graph=e.load_directories=void 0;var i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}}(),r=c(n(17)),o=(c(n(14)),c(n(6))),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(43)),a=c(n(8)),u=c(n(5)),l=c(n(64));function c(t){return t&&t.__esModule?t:{default:t}}e.load_directories=function(t){return function(e){var n=l.default.name;u.default.allProgress([s.load(n),a.default.socket.list_directory({module:n,dir:\"datasets\"}),a.default.socket.list_directory({module:n,dir:\"results\"}),a.default.socket.list_directory({module:n,dir:\"output\"}),a.default.socket.disk_usage({module:n,dir:\"datasets\"}),h()(e)],function(t,n,i){e({type:o.default.app.load_progress,progress:{i:n,n:i},data:{module:\"samplernn\"}})}).then(function(t){var a=i(t,6),u=a[0],l=a[1],c=a[2],h=a[3],p=a[4],f=a[5],d=u.folderLookup,y=u.fileLookup,m=u.datasetLookup,_=u.folders,v=u.files,g=u.unsortedFolder;console.log(p);var b=l.filter(function(t){return t.name.match(/(wav|aiff?|flac|mp3)$/)&&!t.dir});l.filter(function(t){return t.dir}).forEach(function(t){s.getDataset(n,m,t.name,g,t.date).isBuilt=!0}),b.forEach(function(t){t.uuid=(0,r.default)(),y[t.uuid]=t;var e=t.name.split(\".\")[0],i=s.getDataset(n,m,e,g,t.date);t.persisted=!1,i.input.push(t.uuid)});var w=c.filter(function(t){return t.dir}).map(function(t){var e=t.name.split(\"-\").map(function(t){return t.split(\":\")}).filter(function(t){return t.length&&t[1]}).reduce(function(t,e){return(t[e[0]]=e[1])&&t},{});e.name=e.name||e.dataset||e.exp,e.date=t.date,e.dir=t,e.persisted=!1;var i=s.getDataset(n,m,e.name,g,e.date),r=f[e.name];return r&&(i.epoch=e.epoch=r.length,e.training_loss=r),i.checkpoints.push(e),e});h.map(function(t){t.uuid=(0,r.default)(),y[t.uuid]=t;var e=t.name.split(\".\")[0].split(\"-\"),i=s.getDataset(n,m,e[0],g,t.date);t.persisted=!1,t.epoch=parseInt(t.epoch||e[1].replace(/^\\D+/,\"\"))||0,i.epoch=Math.max(t.epoch,i.epoch||0),i.output.some(function(e){return y[e].name===t.name&&(y[e].persisted=!0,!0)})||i.output.push(t.uuid)}),e({type:o.default.dataset.load,data:{module:n,folderLookup:d,fileLookup:y,datasetLookup:m,folders:_,files:v,checkpoints:w,output:h}})}).catch(function(t){console.error(t)}),t&&e({type:o.default.dataset.set_folder,data:{folder_id:t,module:n}})}},e.load_graph=function(){return function(t){var e=l.default.name;u.default.allProgress([h()(t),a.default.socket.list_directory({module:e,dir:\"results\"})],function(e,n,i){t({type:o.default.app.load_progress,progress:{i:n,n:i},data:{module:\"samplernn\"}})}).then(function(e){var n=i(e,2),r=n[0],s=n[1];t({type:o.default.samplernn.load_graph,lossReport:r,results:s})})}};var h=e.load_loss=function(){return function(t){return a.default.socket.run_script({module:\"samplernn\",activity:\"report\"}).then(function(e){var n={};return e.stdout.split(\"\\n\\n\").filter(function(t){return!!t}).forEach(function(t){var e,i=t.split(\"\\n\"),r=(e=i,Array.isArray(e)?e:Array.from(e)),o=r[0],s=r.slice(1);n[o]=s.map(function(t){return t.split(\"\\t\").reduce(function(t,e){var n=e.split(\": \");return t[n[0]]=n[1],t},{})})}),t({type:o.default.samplernn.load_loss,lossReport:n}),n})}};e.import_files=function(t,e,n){return function(i){var r=t.selected,o=t.folder_id,s=t.url_base,u=t.import_action,l=Object.keys(r).filter(function(t){return r[t]}),c=void 0;switch(u){case\"Hotlink\":c=l.reduce(function(t,i){return e[i].output.map(function(t){return n[t]}).map(function(t){var e=t.name.split(\".\").pop();return a.default.file.create({folder_id:o,name:t.name,url:s+t.name,mime:\"audio/\"+e,epoch:t.epoch,size:t.size,module:\"samplernn\",dataset:i,activity:\"train\",datatype:\"audio\",generated:!0,created_at:new Date(t.date),updated_at:new Date(t.date)})}).concat(t)},[]);break;case\"Upload\":c=l.reduce(function(t,i){return e[i].input.map(function(t){return n[t]}).map(function(t){if(t.persisted)return null;var e=t.name.split(\".\").pop();return\"wav\"!==e&&\"flac\"!==e?(console.log(t),a.default.socket.upload_file({folder_id:o,module:\"samplernn\",activity:\"train\",path:\"datasets\",filename:t.name,generated:!1,processed:!1,datatype:\"audio\",ttl:6e4})):void 0}).concat(t)},[]).filter(function(t){return!!t})}return console.log(c),Promise.all(c).then(function(t){console.log(t),window.location.href=\"/samplernn/datasets/\"+o+\"/\"}).catch(function(t){console.error(t)})}}},function(t,e,n){\"use strict\";var i=null;i=\"undefined\"!=typeof Promise?Promise:n(187),t.exports={Promise:i}},function(t,e,n){(function(t){function n(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):\"[object Array]\"===n(t)},e.isBoolean=function(t){return\"boolean\"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return\"number\"==typeof t},e.isString=function(t){return\"string\"==typeof t},e.isSymbol=function(t){return\"symbol\"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return\"[object RegExp]\"===n(t)},e.isObject=function(t){return\"object\"==typeof t&&null!==t},e.isDate=function(t){return\"[object Date]\"===n(t)},e.isError=function(t){return\"[object Error]\"===n(t)||t instanceof Error},e.isFunction=function(t){return\"function\"==typeof t},e.isPrimitive=function(t){return null===t||\"boolean\"==typeof t||\"number\"==typeof t||\"string\"==typeof t||\"symbol\"==typeof t||void 0===t},e.isBuffer=t.isBuffer}).call(this,n(37).Buffer)},function(t,e,n){\"use strict\";(function(t){\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>\n * @license  MIT\n */\nvar i=n(215),r=n(214),o=n(115);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError(\"Invalid typed array length\");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,n);if(\"number\"==typeof t){if(\"string\"==typeof e)throw new Error(\"If encoding is specified then the first argument must be a string\");return h(this,t)}return l(this,t,e,n)}function l(t,e,n,i){if(\"number\"==typeof e)throw new TypeError('\"value\" argument must not be a number');return\"undefined\"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,i){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError(\"'offset' is out of bounds\");if(e.byteLength<n+(i||0))throw new RangeError(\"'length' is out of bounds\");e=void 0===n&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,n):new Uint8Array(e,n,i);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=p(t,e);return t}(t,e,n,i):\"string\"==typeof e?function(t,e,n){\"string\"==typeof n&&\"\"!==n||(n=\"utf8\");if(!u.isEncoding(n))throw new TypeError('\"encoding\" must be a valid string encoding');var i=0|d(e,n),r=(t=a(t,i)).write(e,n);r!==i&&(t=t.slice(0,r));return t}(t,e,n):function(t,e){if(u.isBuffer(e)){var n=0|f(e.length);return 0===(t=a(t,n)).length?t:(e.copy(t,0,0,n),t)}if(e){if(\"undefined\"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||\"length\"in e)return\"number\"!=typeof e.length||(i=e.length)!=i?a(t,0):p(t,e);if(\"Buffer\"===e.type&&o(e.data))return p(t,e.data)}var i;throw new TypeError(\"First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.\")}(t,e)}function c(t){if(\"number\"!=typeof t)throw new TypeError('\"size\" argument must be a number');if(t<0)throw new RangeError('\"size\" argument must not be negative')}function h(t,e){if(c(e),t=a(t,e<0?0:0|f(e)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function p(t,e){var n=e.length<0?0:0|f(e.length);t=a(t,n);for(var i=0;i<n;i+=1)t[i]=255&e[i];return t}function f(t){if(t>=s())throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+s().toString(16)+\" bytes\");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if(\"undefined\"!=typeof ArrayBuffer&&\"function\"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;\"string\"!=typeof t&&(t=\"\"+t);var n=t.length;if(0===n)return 0;for(var i=!1;;)switch(e){case\"ascii\":case\"latin1\":case\"binary\":return n;case\"utf8\":case\"utf-8\":case void 0:return B(t).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*n;case\"hex\":return n>>>1;case\"base64\":return U(t).length;default:if(i)return B(t).length;e=(\"\"+e).toLowerCase(),i=!0}}function y(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function m(t,e,n,i,r){if(0===t.length)return-1;if(\"string\"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(r)return-1;n=t.length-1}else if(n<0){if(!r)return-1;n=0}if(\"string\"==typeof e&&(e=u.from(e,i)),u.isBuffer(e))return 0===e.length?-1:_(t,e,n,i,r);if(\"number\"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&\"function\"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):_(t,[e],n,i,r);throw new TypeError(\"val must be string, number or Buffer\")}function _(t,e,n,i,r){var o,s=1,a=t.length,u=e.length;if(void 0!==i&&(\"ucs2\"===(i=String(i).toLowerCase())||\"ucs-2\"===i||\"utf16le\"===i||\"utf-16le\"===i)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,n/=2}function l(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(r){var c=-1;for(o=n;o<a;o++)if(l(t,o)===l(e,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*s}else-1!==c&&(o-=o-c),c=-1}else for(n+u>a&&(n=a-u),o=n;o>=0;o--){for(var h=!0,p=0;p<u;p++)if(l(t,o+p)!==l(e,p)){h=!1;break}if(h)return o}return-1}function v(t,e,n,i){n=Number(n)||0;var r=t.length-n;i?(i=Number(i))>r&&(i=r):i=r;var o=e.length;if(o%2!=0)throw new TypeError(\"Invalid hex string\");i>o/2&&(i=o/2);for(var s=0;s<i;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[n+s]=a}return s}function g(t,e,n,i){return z(B(e,t.length-n),t,n,i)}function b(t,e,n,i){return z(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,i)}function w(t,e,n,i){return b(t,e,n,i)}function k(t,e,n,i){return z(U(e),t,n,i)}function S(t,e,n,i){return z(function(t,e){for(var n,i,r,o=[],s=0;s<t.length&&!((e-=2)<0);++s)n=t.charCodeAt(s),i=n>>8,r=n%256,o.push(r),o.push(i);return o}(e,t.length-n),t,n,i)}function T(t,e,n){return 0===e&&n===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,n))}function x(t,e,n){n=Math.min(t.length,n);for(var i=[],r=e;r<n;){var o,s,a,u,l=t[r],c=null,h=l>239?4:l>223?3:l>191?2:1;if(r+h<=n)switch(h){case 1:l<128&&(c=l);break;case 2:128==(192&(o=t[r+1]))&&(u=(31&l)<<6|63&o)>127&&(c=u);break;case 3:o=t[r+1],s=t[r+2],128==(192&o)&&128==(192&s)&&(u=(15&l)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=t[r+1],s=t[r+2],a=t[r+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(c=u)}null===c?(c=65533,h=1):c>65535&&(c-=65536,i.push(c>>>10&1023|55296),c=56320|1023&c),i.push(c),r+=h}return function(t){var e=t.length;if(e<=O)return String.fromCharCode.apply(String,t);var n=\"\",i=0;for(;i<e;)n+=String.fromCharCode.apply(String,t.slice(i,i+=O));return n}(i)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&\"function\"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,n){return l(null,t,e,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,\"undefined\"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,n){return function(t,e,n,i){return c(e),e<=0?a(t,e):void 0!==n?\"string\"==typeof i?a(t,e).fill(n,i):a(t,e).fill(n):a(t,e)}(null,t,e,n)},u.allocUnsafe=function(t){return h(null,t)},u.allocUnsafeSlow=function(t){return h(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError(\"Arguments must be Buffers\");if(t===e)return 0;for(var n=t.length,i=e.length,r=0,o=Math.min(n,i);r<o;++r)if(t[r]!==e[r]){n=t[r],i=e[r];break}return n<i?-1:i<n?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"latin1\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return!0;default:return!1}},u.concat=function(t,e){if(!o(t))throw new TypeError('\"list\" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var i=u.allocUnsafe(e),r=0;for(n=0;n<t.length;++n){var s=t[n];if(!u.isBuffer(s))throw new TypeError('\"list\" argument must be an Array of Buffers');s.copy(i,r),r+=s.length}return i},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError(\"Buffer size must be a multiple of 64-bits\");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?\"\":0===arguments.length?x(this,0,t):function(t,e,n){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return\"\";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return\"\";if((n>>>=0)<=(e>>>=0))return\"\";for(t||(t=\"utf8\");;)switch(t){case\"hex\":return E(this,e,n);case\"utf8\":case\"utf-8\":return x(this,e,n);case\"ascii\":return P(this,e,n);case\"latin1\":case\"binary\":return A(this,e,n);case\"base64\":return T(this,e,n);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return C(this,e,n);default:if(i)throw new TypeError(\"Unknown encoding: \"+t);t=(t+\"\").toLowerCase(),i=!0}}.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError(\"Argument must be a Buffer\");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t=\"\",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString(\"hex\",0,n).match(/.{2}/g).join(\" \"),this.length>n&&(t+=\" ... \")),\"<Buffer \"+t+\">\"},u.prototype.compare=function(t,e,n,i,r){if(!u.isBuffer(t))throw new TypeError(\"Argument must be a Buffer\");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),e<0||n>t.length||i<0||r>this.length)throw new RangeError(\"out of range index\");if(i>=r&&e>=n)return 0;if(i>=r)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,r>>>=0,this===t)return 0;for(var o=r-i,s=n-e,a=Math.min(o,s),l=this.slice(i,r),c=t.slice(e,n),h=0;h<a;++h)if(l[h]!==c[h]){o=l[h],s=c[h];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},u.prototype.indexOf=function(t,e,n){return m(this,t,e,n,!0)},u.prototype.lastIndexOf=function(t,e,n){return m(this,t,e,n,!1)},u.prototype.write=function(t,e,n,i){if(void 0===e)i=\"utf8\",n=this.length,e=0;else if(void 0===n&&\"string\"==typeof e)i=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");e|=0,isFinite(n)?(n|=0,void 0===i&&(i=\"utf8\")):(i=n,n=void 0)}var r=this.length-e;if((void 0===n||n>r)&&(n=r),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");i||(i=\"utf8\");for(var o=!1;;)switch(i){case\"hex\":return v(this,t,e,n);case\"utf8\":case\"utf-8\":return g(this,t,e,n);case\"ascii\":return b(this,t,e,n);case\"latin1\":case\"binary\":return w(this,t,e,n);case\"base64\":return k(this,t,e,n);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return S(this,t,e,n);default:if(o)throw new TypeError(\"Unknown encoding: \"+i);i=(\"\"+i).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function P(t,e,n){var i=\"\";n=Math.min(t.length,n);for(var r=e;r<n;++r)i+=String.fromCharCode(127&t[r]);return i}function A(t,e,n){var i=\"\";n=Math.min(t.length,n);for(var r=e;r<n;++r)i+=String.fromCharCode(t[r]);return i}function E(t,e,n){var i=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>i)&&(n=i);for(var r=\"\",o=e;o<n;++o)r+=I(t[o]);return r}function C(t,e,n){for(var i=t.slice(e,n),r=\"\",o=0;o<i.length;o+=2)r+=String.fromCharCode(i[o]+256*i[o+1]);return r}function M(t,e,n){if(t%1!=0||t<0)throw new RangeError(\"offset is not uint\");if(t+e>n)throw new RangeError(\"Trying to access beyond buffer length\")}function R(t,e,n,i,r,o){if(!u.isBuffer(t))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(e>r||e<o)throw new RangeError('\"value\" argument is out of bounds');if(n+i>t.length)throw new RangeError(\"Index out of range\")}function j(t,e,n,i){e<0&&(e=65535+e+1);for(var r=0,o=Math.min(t.length-n,2);r<o;++r)t[n+r]=(e&255<<8*(i?r:1-r))>>>8*(i?r:1-r)}function F(t,e,n,i){e<0&&(e=4294967295+e+1);for(var r=0,o=Math.min(t.length-n,4);r<o;++r)t[n+r]=e>>>8*(i?r:3-r)&255}function N(t,e,n,i,r,o){if(n+i>t.length)throw new RangeError(\"Index out of range\");if(n<0)throw new RangeError(\"Index out of range\")}function L(t,e,n,i,o){return o||N(t,0,n,4),r.write(t,e,n,i,23,4),n+4}function D(t,e,n,i,o){return o||N(t,0,n,8),r.write(t,e,n,i,52,8),n+8}u.prototype.slice=function(t,e){var n,i=this.length;if(t=~~t,e=void 0===e?i:~~e,t<0?(t+=i)<0&&(t=0):t>i&&(t=i),e<0?(e+=i)<0&&(e=0):e>i&&(e=i),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=u.prototype;else{var r=e-t;n=new u(r,void 0);for(var o=0;o<r;++o)n[o]=this[o+t]}return n},u.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||M(t,e,this.length);for(var i=this[t],r=1,o=0;++o<e&&(r*=256);)i+=this[t+o]*r;return i},u.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||M(t,e,this.length);for(var i=this[t+--e],r=1;e>0&&(r*=256);)i+=this[t+--e]*r;return i},u.prototype.readUInt8=function(t,e){return e||M(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||M(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||M(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||M(t,e,this.length);for(var i=this[t],r=1,o=0;++o<e&&(r*=256);)i+=this[t+o]*r;return i>=(r*=128)&&(i-=Math.pow(2,8*e)),i},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||M(t,e,this.length);for(var i=e,r=1,o=this[t+--i];i>0&&(r*=256);)o+=this[t+--i]*r;return o>=(r*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||M(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){e||M(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return e||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||M(t,4,this.length),r.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||M(t,4,this.length),r.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||M(t,8,this.length),r.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||M(t,8,this.length),r.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,i){(t=+t,e|=0,n|=0,i)||R(this,t,e,n,Math.pow(2,8*n)-1,0);var r=1,o=0;for(this[e]=255&t;++o<n&&(r*=256);)this[e+o]=t/r&255;return e+n},u.prototype.writeUIntBE=function(t,e,n,i){(t=+t,e|=0,n|=0,i)||R(this,t,e,n,Math.pow(2,8*n)-1,0);var r=n-1,o=1;for(this[e+r]=255&t;--r>=0&&(o*=256);)this[e+r]=t/o&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):F(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):F(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e|=0,!i){var r=Math.pow(2,8*n-1);R(this,t,e,n,r-1,-r)}var o=0,s=1,a=0;for(this[e]=255&t;++o<n&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},u.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e|=0,!i){var r=Math.pow(2,8*n-1);R(this,t,e,n,r-1,-r)}var o=n-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):F(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):F(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,n){return L(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return L(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return D(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return D(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,i){if(n||(n=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError(\"targetStart out of bounds\");if(n<0||n>=this.length)throw new RangeError(\"sourceStart out of bounds\");if(i<0)throw new RangeError(\"sourceEnd out of bounds\");i>this.length&&(i=this.length),t.length-e<i-n&&(i=t.length-e+n);var r,o=i-n;if(this===t&&n<e&&e<i)for(r=o-1;r>=0;--r)t[r+e]=this[r+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(r=0;r<o;++r)t[r+e]=this[r+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},u.prototype.fill=function(t,e,n,i){if(\"string\"==typeof t){if(\"string\"==typeof e?(i=e,e=0,n=this.length):\"string\"==typeof n&&(i=n,n=this.length),1===t.length){var r=t.charCodeAt(0);r<256&&(t=r)}if(void 0!==i&&\"string\"!=typeof i)throw new TypeError(\"encoding must be a string\");if(\"string\"==typeof i&&!u.isEncoding(i))throw new TypeError(\"Unknown encoding: \"+i)}else\"number\"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError(\"Out of range index\");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),\"number\"==typeof t)for(o=e;o<n;++o)this[o]=t;else{var s=u.isBuffer(t)?t:B(new u(t,i).toString()),a=s.length;for(o=0;o<n-e;++o)this[o+e]=s[o%a]}return this};var q=/[^+\\/0-9A-Za-z-_]/g;function I(t){return t<16?\"0\"+t.toString(16):t.toString(16)}function B(t,e){var n;e=e||1/0;for(var i=t.length,r=null,o=[],s=0;s<i;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!r){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(e-=3)>-1&&o.push(239,191,189);continue}r=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(e-=3)>-1&&o.push(239,191,189);if(r=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error(\"Invalid code point\");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function U(t){return i.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\\s+|\\s+$/g,\"\")}(t).replace(q,\"\")).length<2)return\"\";for(;t.length%4!=0;)t+=\"=\";return t}(t))}function z(t,e,n,i){for(var r=0;r<i&&!(r+n>=e.length||r>=t.length);++r)e[r+n]=t[r];return r}}).call(this,n(21))},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});e.default={name:\"pix2pixhd\",displayName:\"Pix2PixHD\",datatype:\"video\"}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.count_dataset=e.list_epochs=e.load_results=e.load_directories=void 0;var i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}}(),r=(l(n(17)),l(n(14)),l(n(6))),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(43)),s=l(n(8)),a=l(n(5)),u=l(n(38));function l(t){return t&&t.__esModule?t:{default:t}}e.load_directories=function(t){return function(e){var n=u.default.name;a.default.allProgress([o.load(n),s.default.socket.list_directory({module:n,dir:\"sequences\"}),s.default.socket.list_directory({module:n,dir:\"datasets\"}),s.default.socket.list_directory({module:n,dir:\"checkpoints\"})],function(t,n,i){console.log(\"pix2pixhd load progress\",n,i),e({type:r.default.app.load_progress,progress:{i:n,n:i},data:{module:\"pix2pixhd\"}})}).then(function(s){var a=i(s,4),u=a[0],l=a[1],c=a[2],h=a[3],p=u.folderLookup,f=u.fileLookup,d=u.datasetLookup,y=u.folders,m=u.files,_=(u.unsortedFolder,u.resultsFolder),v=l.filter(function(t){return t.dir});v.forEach(function(t){o.getDataset(n,d,t.name).isBuilt=!0}),c.filter(function(t){return t.dir}).forEach(function(t){o.getDataset(n,d,t.name).hasDataset=!0});var g=h.filter(function(t){return t.dir});g.forEach(function(t){var e=o.getDataset(n,d,t.name);e.hasCheckpoints=!0,e.checkpoints=[t]}),e({type:r.default.dataset.load,data:{module:n,folderLookup:p,fileLookup:f,datasetLookup:d,folders:y,files:m,sequences:v,datasets:c,checkpoints:g,resultsFolder:_}}),t&&(console.log(\"folder id\",t),e({type:r.default.dataset.set_folder,data:{folder_id:t,module:n}}))}).catch(function(t){console.error(t)}),t&&(console.log(\"folder id\",t),e({type:r.default.dataset.set_folder,data:{folder_id:t,module:n}}))}},e.load_results=function(t){return function(t){var e=u.default.name;a.default.allProgress([s.default.folder.index({name:\"results\"}),s.default.file.index({module:e,generated:1}),s.default.socket.list_sequences({module:e,dir:\"results\"}),s.default.socket.list_directory({module:e,dir:\"renders\"})],function(e,n,i){console.log(\"pix2pixhd load progress\",n,i),t({type:r.default.app.load_progress,progress:{i:n,n:i},data:{module:\"pix2pixhd\"}})}).then(function(e){var n=i(e,4),o=n[0],s=n[1],a=n[2],u=n[3];console.log(s,a,u),t({type:r.default.pix2pixhd.load_results,results:{resultsFolder:o[0],files:s,results:a,renders:u}})})}};var c=new RegExp(\"_net_G.pth$\");e.list_epochs=function(t){return function(e){var n=u.default.name;s.default.socket.list_directory({module:n,dir:\"checkpoints/\"+t}).then(function(t){var i=t.map(function(t){return t.name.match(c)?t.name.replace(c,\"\"):null}).filter(function(t){return!!t});e({type:r.default.dataset.list_epochs,data:{epochs:i,module:n}})})}},e.count_dataset=function(t){return function(e){var n=u.default.name;a.default.allProgress([s.default.socket.count_directory({module:n,dir:\"sequences/\"+t+\"/\"}),s.default.socket.count_directory({module:n,dir:\"datasets/\"+t+\"/train_A/\"})],function(t,n,i){console.log(\"pix2pixhd load progress\",n,i),e({type:r.default.app.load_progress,progress:{i:n,n:i},data:{module:\"pix2pixhd\"}})}).then(function(n){var o=i(n,2),s=o[0],a=o[1];console.log(s,a),e({type:r.default.pix2pixhd.load_dataset_count,data:{name:t,sequenceCount:s,datasetCount:a}})})}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i,r=n(1),o=(n(2),n(3)),s=n(18);(i=s)&&i.__esModule;e.default=(0,o.connect)(function(t){return t.upload},function(t,e){return{}})(function(t){return(0,r.h)(\"div\",{class:\"status\"},t.status)})},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1);function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var s=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={value:null,changed:!1},n.handleInput=n.handleInput.bind(n),n.handleKeydown=n.handleKeydown.bind(n),n}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"handleInput\",value:function(t){this.setState({value:t.target.value,changed:!0}),this.props.onInput&&this.props.onInput(t.target.value,t.target.name)}},{key:\"handleKeydown\",value:function(t){13===t.keyCode&&(this.setState({value:t.target.value,changed:!1}),this.props.onSave&&this.props.onSave(t.target.value,t.target.name))}},{key:\"render\",value:function(){var t;return(0,r.h)(\"div\",{className:\"textInput param\"},(0,r.h)(\"label\",null,(0,r.h)(\"span\",null,this.props.title),(0,r.h)(\"input\",(o(t={type:this.props.type||\"text\",name:this.props.name||\"text\",value:this.state.changed?this.state.value:this.props.value,onInput:this.handleInput,onKeydown:this.handleKeydown,autofocus:this.props.autofocus,autoComplete:this.props.autocomplete,autoCapitalize:this.props.autocapitalize||\"off\",placeholder:this.props.placeholder},\"autofocus\",this.props.autofocus),o(t,\"className\",this.props.className||\"\"),t))))}}]),e}();e.default=s},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),s=n(3),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(59)),u=h(n(24)),l=(h(n(31)),n(26),h(n(121))),c=h(n(41));function h(t){return t&&t.__esModule?t:{default:t}}var p=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e),function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"render\",value:function(){var t=this.props,e=(t.loading,t.status,t.error,t.module,t.folder),n=(t.title,t.canRename),i=t.canUpload,o=t.canAddURL;return e.id?(0,r.h)(\"div\",{className:\"form params row\"},(0,r.h)(\"div\",{className:\"col\"},(0,r.h)(u.default,null,n&&this.renderFolderNameInput(e.name),i&&this.renderUploadInput(),o&&this.renderURLInput()))):(0,r.h)(\"div\",{className:\"params row\"},(0,r.h)(\"div\",{className:\"column\"},this.renderFolderNameInput(e.name)))}},{key:\"curry\",value:function(t){var e=this.props,n=e.module,i=e.folder;return function(e){return t(n,i,e)}}},{key:\"renderFolderNameInput\",value:function(t){return(0,r.h)(c.default,{title:\"Dataset name\",value:t,onSave:this.curry(this.props.actions.dataset.updateFolder)})}},{key:\"renderUploadInput\",value:function(){return(0,r.h)(l.default,{title:\"Upload a file\",mime:\"image.*\",onUpload:this.curry(this.props.actions.dataset.uploadFile)})}},{key:\"renderURLInput\",value:function(){return(0,r.h)(c.default,{title:\"Fetch a URL\",placeholder:\"http://\",onSave:this.curry(this.props.actions.dataset.fetchURL)})}}]),e}();e.default=(0,s.connect)(function(t){return t.upload},function(t,e){return{actions:{dataset:(0,o.bindActionCreators)(a,t)}}})(p)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.load=e.getDataset=e.emptyDataset=e.unsortedFolder=void 0;var i,r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}}(),o=n(8),s=(i=o)&&i.__esModule?i:{default:i};var a={},u=e.unsortedFolder=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!a[t]||e){var n={id:0,module:t,name:\"unsorted\",files:[],datasets:[]};a[t]=n}return a[t]},l=e.emptyDataset=function(t,e,n,i){var r={name:n,input:[],checkpoints:[],output:[]};return e[n]=r,(i=i||u(t)).datasets.push(n),r},c=e.getDataset=function(t,e,n,i,r){var o=e[n=n.toLowerCase()]||l(t,e,n,i);return r&&(o.date=o.date&&!isNaN(o.date)?Math.max(+new Date(r),o.date):+new Date(r)),o};e.load=function(t){return console.log(t),Promise.all([s.default.folder.index({module:t,limit:0}),s.default.file.index({module:t,limit:0}),s.default.task.index({module:t})]).then(function(e){var n=r(e,3),i=n[0],o=n[1],a=(n[2],{}),l={},h={},p=void 0;l=i.reduce(function(t,e){return t[e.id]={id:e.id,name:e.name,folder:e,files:[],datasets:[]},\"results\"===e.name&&(p=e),t},{unsorted:u(t,!0)}),p?console.log(\"got results folder\",p):(console.log(\"creating results folder...\"),s.default.folder.create({module:t,name:\"results\",activity:\"results\"}).then(function(t){console.log(\"created folder\",t),l.results=t}));var f=o.filter(function(t){return t.generated});return o.filter(function(t){return!t.generated}).reduce(function(e,n){h[n.id]=n,n.name||(n.opt&&n.opt.media&&n.opt.media.token?n.name=n.opt.media.token:n.name=n.url.replace(/^https?:\\/\\/(www.)?/,\"\").replace(/[^a-zA-Z0-9_]/g,\"_\").replace(/_+/g,\"_\")||\"unknown_\"+Math.floor(1e3*Math.random()));var i=(n.name||\"unsorted\").split(\".\")[0],r=l[n.folder_id]||u(t),o=c(t,e,n.dataset||i,r,n.date||n.created_at);return n.url.match(n.name)&&(n.persisted=!0),o.input.push(n.id),r.files.push(n.id),e},a),f.map(function(e){h[e.id]=e;var n=e.name.split(\".\")[0].split(\"-\"),i=l[e.folder_id]||u(t);c(t,a,e.dataset||n[0],i,e.date||e.created_at).output.push(e.id),i.files.push(e.id),e.epoch=e.epoch||n[1]}),{folderLookup:l,fileLookup:h,datasetLookup:a,folders:i,files:o,unsortedFolder:l.unsorted,resultsFolder:p}}).catch(function(t){console.error(t)})}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.stop_queue=e.start_queue=e.add_task=e.stop_task=e.start_task=void 0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=a(n(14)),o=a(n(6)),s=a(n(8));function a(t){return t&&t.__esModule?t:{default:t}}e.start_task=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.task.start_task(t,e),i({type:o.default.task.starting_task,task:t},e)},e.stop_task=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.task.stop_task(t,e),i({type:o.default.task.stopping_task,task:t},e)},e.add_task=function(t){return function(e){s.default.task.create(t).then(function(t){r.default.task.add_task(t)})}},e.start_queue=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.task.start_queue(t,e),i({type:o.default.task.starting_queue,task:t},e)},e.stop_queue=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.task.stop_queue(t,e),i({type:o.default.task.stopping_queue,task:t},e)}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(3);n(2),function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);e.default=t}(n(20));var s=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.handleClick=n.handleClick.bind(n),n}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"handleClick\",value:function(t){this.props.onClick&&this.props.onClick()}},{key:\"render\",value:function(){return(0,r.h)(\"div\",{className:\"button param\"},(0,r.h)(\"label\",null,(0,r.h)(\"span\",null,this.props.title),(0,r.h)(\"button\",{onClick:this.handleClick},this.props.value||this.props.children)))}}]),e}();e.default=(0,o.connect)(function(t){return{}},function(t,e){return{}})(s)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.enqueue=e.resume=e.pause=e.play=void 0;var i,r=n(6),o=(i=r)&&i.__esModule?i:{default:i};e.play=function(t){return{type:o.default.audioPlayer.play,file:t}},e.pause=function(){return{type:o.default.audioPlayer.pause}},e.resume=function(){return{type:o.default.audioPlayer.resume}},e.enqueue=function(t){return{type:o.default.audioPlayer.enqueue,file:t}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.clearCurrentUser=e.setCurrentUser=e.setError=e.setReturnTo=e.setToken=void 0,e.initialized=c,e.loading=h,e.InvalidCredentialsException=function(t){this.message=t,this.name=\"InvalidCredentialsException\"},e.login=function(t,e){return function(n){n(h()),fetch(p.login,(0,s.put)({username:t,password:e})).then(function(t){return t.json()}).then(function(t){console.log(t),console.log(\"logged in\",t.user.username),n(u(t.user))}).catch(function(t){console.error(\"login error\",t),n(a(!0))})}},e.signup=function(t){return function(e){e(h()),fetch(p.signup,(0,s.put)(t)).then(function(t){return t.json()}).then(function(t){console.log(t),console.log(\"signed up\",t.user.username),e(u(t.user))}).catch(function(t){console.error(\"signup error\",t),e(c())})}},e.checkin=function(){return function(t){t(h()),fetch(p.checkin,(0,s.put)({})).then(function(t){return t.json()}).then(function(e){console.log(\"checked in\",e.user.username),t(u(e.user))}).catch(function(e){console.error(\"checkin error\",e),t(c())})}},e.logout=function(){return function(t){t(h()),fetch(p.logout,(0,s._get_headers)({})).then(function(t){return t.json()}).then(function(e){console.log(\"logged out\",e),t(l()),t(c())}).catch(function(e){console.error(\"logout error\",e),t(l()),t(c())})}};var i,r=n(6),o=(i=r)&&i.__esModule?i:{default:i},s=n(125);e.setToken=function(t){return{type:o.default.auth.set_token,data:t}},e.setReturnTo=function(t){return{type:o.default.auth.set_return_to,data:t}};var a=e.setError=function(t){return{type:o.default.auth.set_error,data:t}},u=e.setCurrentUser=function(t){return{type:o.default.auth.set_current_user,data:t}},l=e.clearCurrentUser=function(){return{type:o.default.auth.logout_user}};function c(){return{type:o.default.auth.initialized}}function h(){return{type:o.default.auth.loading}}var p={login:\"/api/login\",logout:\"/api/logout\",signup:\"/api/signup\",checkin:\"/api/checkin\"}},function(t,e,n){var i;void 0===(i=function(){return function(){\"use strict\";var t,e;function n(e){e(t)}\n/**\n\t *  Tone.js\n\t *  @author Yotam Mann\n\t *  @license http://opensource.org/licenses/MIT MIT License\n\t *  @copyright 2014-2018 Yotam Mann\n\t */return e=function(){var t=function(){if(!(this instanceof t))throw new Error(\"constructor needs to be called with the 'new' keyword\")};t.prototype.toString=function(){for(var e in t){var n=e[0].match(/^[A-Z]$/),i=t[e]===this.constructor;if(t.isFunction(t[e])&&n&&i)return e}return\"Tone\"},t.prototype.dispose=function(){return this},t.prototype.set=function(e,n,i){if(t.isObject(e))i=n;else if(t.isString(e)){var r={};r[e]=n,e=r}t:for(var o in e){n=e[o];var s=this;if(-1!==o.indexOf(\".\")){for(var a=o.split(\".\"),u=0;u<a.length-1;u++)if((s=s[a[u]])instanceof t){a.splice(0,u+1);var l=a.join(\".\");s.set(l,n);continue t}o=a[a.length-1]}var c=s[o];t.isUndef(c)||(t.Signal&&c instanceof t.Signal||t.Param&&c instanceof t.Param?c.value!==n&&(t.isUndef(i)?c.value=n:c.rampTo(n,i)):c instanceof AudioParam?c.value!==n&&(c.value=n):t.TimeBase&&c instanceof t.TimeBase?s[o]=n:c instanceof t?c.set(n):c!==n&&(s[o]=n))}return this},t.prototype.get=function(e){t.isUndef(e)?e=this._collectDefaults(this.constructor):t.isString(e)&&(e=[e]);for(var n={},i=0;i<e.length;i++){var r=e[i],o=this,s=n;if(-1!==r.indexOf(\".\")){for(var a=r.split(\".\"),u=0;u<a.length-1;u++){var l=a[u];s[l]=s[l]||{},s=s[l],o=o[l]}r=a[a.length-1]}var c=o[r];t.isObject(e[r])?s[r]=c.get():t.Signal&&c instanceof t.Signal?s[r]=c.value:t.Param&&c instanceof t.Param?s[r]=c.value:c instanceof AudioParam?s[r]=c.value:c instanceof t?s[r]=c.get():!t.isFunction(c)&&t.isDefined(c)&&(s[r]=c)}return n},t.prototype._collectDefaults=function(e){var n=[];if(t.isDefined(e.defaults)&&(n=Object.keys(e.defaults)),t.isDefined(e._super))for(var i=this._collectDefaults(e._super),r=0;r<i.length;r++)-1===n.indexOf(i[r])&&n.push(i[r]);return n},t.defaults=function(e,n,i){var r={};if(1===e.length&&t.isObject(e[0]))r=e[0];else for(var o=0;o<n.length;o++)r[n[o]]=e[o];return t.isDefined(i.defaults)?t.defaultArg(r,i.defaults):t.isObject(i)?t.defaultArg(r,i):r},t.defaultArg=function(e,n){if(t.isObject(e)&&t.isObject(n)){var i={};for(var r in e)i[r]=t.defaultArg(n[r],e[r]);for(var o in n)i[o]=t.defaultArg(e[o],n[o]);return i}return t.isUndef(e)?n:e},t.connectSeries=function(){for(var e=arguments[0],n=1;n<arguments.length;n++){var i=arguments[n];e.connect(i),e=i}return t},t.isUndef=function(t){return void 0===t},t.isDefined=function(e){return!t.isUndef(e)},t.isFunction=function(t){return\"function\"==typeof t},t.isNumber=function(t){return\"number\"==typeof t},t.isObject=function(t){return\"[object Object]\"===Object.prototype.toString.call(t)&&t.constructor===Object},t.isBoolean=function(t){return\"boolean\"==typeof t},t.isArray=function(t){return Array.isArray(t)},t.isString=function(t){return\"string\"==typeof t},t.isNote=function(e){return t.isString(e)&&/^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i.test(e)},t.noOp=function(){},t.prototype._readOnly=function(t){if(Array.isArray(t))for(var e=0;e<t.length;e++)this._readOnly(t[e]);else Object.defineProperty(this,t,{writable:!1,enumerable:!0})},t.prototype._writable=function(t){if(Array.isArray(t))for(var e=0;e<t.length;e++)this._writable(t[e]);else Object.defineProperty(this,t,{writable:!0})},t.State={Started:\"started\",Stopped:\"stopped\",Paused:\"paused\"},t.equalPowerScale=function(t){var e=.5*Math.PI;return Math.sin(t*e)},t.dbToGain=function(t){return Math.pow(10,t/20)},t.gainToDb=function(t){return Math.log(t)/Math.LN10*20},t.intervalToFrequencyRatio=function(t){return Math.pow(2,t/12)},t.prototype.now=function(){return t.context.now()},t.now=function(){return t.context.now()},t.extend=function(e,n){function i(){}t.isUndef(n)&&(n=t),i.prototype=n.prototype,e.prototype=new i,e.prototype.constructor=e,e._super=n};var e=null;return Object.defineProperty(t,\"context\",{get:function(){return e},set:function(n){e=t.Context&&n instanceof t.Context?n:new t.Context(n),t.Context.emit(\"init\",e)}}),Object.defineProperty(t.prototype,\"context\",{get:function(){return t.context}}),t.setContext=function(e){t.context=e},Object.defineProperty(t.prototype,\"blockTime\",{get:function(){return 128/this.context.sampleRate}}),Object.defineProperty(t.prototype,\"sampleTime\",{get:function(){return 1/this.context.sampleRate}}),Object.defineProperty(t,\"supported\",{get:function(){var t=window.hasOwnProperty(\"AudioContext\")||window.hasOwnProperty(\"webkitAudioContext\"),e=window.hasOwnProperty(\"Promise\"),n=window.hasOwnProperty(\"Worker\");return t&&e&&n}}),Object.defineProperty(t,\"initialized\",{get:function(){return null!==e}}),t.getContext=function(e){if(t.initialized)e(t.context);else{var n=function(){e(t.context),t.Context.off(\"init\",n)};t.Context.on(\"init\",n)}return t},t.version=\"r12\",t},t=e(),n(function(t){return t.Emitter=function(){t.call(this),this._events={}},t.extend(t.Emitter),t.Emitter.prototype.on=function(t,e){for(var n=t.split(/\\W+/),i=0;i<n.length;i++){var r=n[i];this._events.hasOwnProperty(r)||(this._events[r]=[]),this._events[r].push(e)}return this},t.Emitter.prototype.once=function(t,e){var n=function(){e.apply(this,arguments),this.off(t,n)}.bind(this);return this.on(t,n),this},t.Emitter.prototype.off=function(e,n){for(var i=e.split(/\\W+/),r=0;r<i.length;r++)if(e=i[r],this._events.hasOwnProperty(e))if(t.isUndef(n))this._events[e]=[];else for(var o=this._events[e],s=0;s<o.length;s++)o[s]===n&&o.splice(s,1);return this},t.Emitter.prototype.emit=function(t){if(this._events){var e=Array.apply(null,arguments).slice(1);if(this._events.hasOwnProperty(t))for(var n=this._events[t].slice(0),i=0,r=n.length;i<r;i++)n[i].apply(this,e)}return this},t.Emitter.mixin=function(e){var n=[\"on\",\"once\",\"off\",\"emit\"];e._events={};for(var i=0;i<n.length;i++){var r=n[i],o=t.Emitter.prototype[r];e[r]=o}return t.Emitter},t.Emitter.prototype.dispose=function(){return t.prototype.dispose.call(this),this._events=null,this},t.Emitter}),n(function(t){return t.Timeline=function(){var e=t.defaults(arguments,[\"memory\"],t.Timeline);t.call(this),this._timeline=[],this.memory=e.memory},t.extend(t.Timeline),t.Timeline.defaults={memory:1/0},Object.defineProperty(t.Timeline.prototype,\"length\",{get:function(){return this._timeline.length}}),t.Timeline.prototype.add=function(e){if(t.isUndef(e.time))throw new Error(\"Tone.Timeline: events must have a time attribute\");e.time=e.time.valueOf();var n=this._search(e.time);if(this._timeline.splice(n+1,0,e),this.length>this.memory){var i=this.length-this.memory;this._timeline.splice(0,i)}return this},t.Timeline.prototype.remove=function(t){var e=this._timeline.indexOf(t);return-1!==e&&this._timeline.splice(e,1),this},t.Timeline.prototype.get=function(e,n){n=t.defaultArg(n,\"time\");var i=this._search(e,n);return-1!==i?this._timeline[i]:null},t.Timeline.prototype.peek=function(){return this._timeline[0]},t.Timeline.prototype.shift=function(){return this._timeline.shift()},t.Timeline.prototype.getAfter=function(e,n){n=t.defaultArg(n,\"time\");var i=this._search(e,n);return i+1<this._timeline.length?this._timeline[i+1]:null},t.Timeline.prototype.getBefore=function(e,n){n=t.defaultArg(n,\"time\");var i=this._timeline.length;if(i>0&&this._timeline[i-1][n]<e)return this._timeline[i-1];var r=this._search(e,n);return r-1>=0?this._timeline[r-1]:null},t.Timeline.prototype.cancel=function(t){if(this._timeline.length>1){var e=this._search(t);if(e>=0)if(this._timeline[e].time===t){for(var n=e;n>=0&&this._timeline[n].time===t;n--)e=n;this._timeline=this._timeline.slice(0,e)}else this._timeline=this._timeline.slice(0,e+1);else this._timeline=[]}else 1===this._timeline.length&&this._timeline[0].time>=t&&(this._timeline=[]);return this},t.Timeline.prototype.cancelBefore=function(t){var e=this._search(t);return e>=0&&(this._timeline=this._timeline.slice(e+1)),this},t.Timeline.prototype.previousEvent=function(t){var e=this._timeline.indexOf(t);return e>0?this._timeline[e-1]:null},t.Timeline.prototype._search=function(e,n){if(0===this._timeline.length)return-1;n=t.defaultArg(n,\"time\");var i=0,r=this._timeline.length,o=r;if(r>0&&this._timeline[r-1][n]<=e)return r-1;for(;i<o;){var s=Math.floor(i+(o-i)/2),a=this._timeline[s],u=this._timeline[s+1];if(a[n]===e){for(var l=s;l<this._timeline.length;l++)this._timeline[l][n]===e&&(s=l);return s}if(a[n]<e&&u[n]>e)return s;a[n]>e?o=s:i=s+1}return-1},t.Timeline.prototype._iterate=function(e,n,i){n=t.defaultArg(n,0),i=t.defaultArg(i,this._timeline.length-1),this._timeline.slice(n,i+1).forEach(function(t){e.call(this,t)}.bind(this))},t.Timeline.prototype.forEach=function(t){return this._iterate(t),this},t.Timeline.prototype.forEachBefore=function(t,e){var n=this._search(t);return-1!==n&&this._iterate(e,0,n),this},t.Timeline.prototype.forEachAfter=function(t,e){var n=this._search(t);return this._iterate(e,n+1),this},t.Timeline.prototype.forEachBetween=function(t,e,n){var i=this._search(t),r=this._search(e);return-1!==i&&-1!==r?(this._timeline[i].time!==t&&(i+=1),this._timeline[r].time===e&&(r-=1),this._iterate(n,i,r)):-1===i&&this._iterate(n,0,r),this},t.Timeline.prototype.forEachFrom=function(t,e){for(var n=this._search(t);n>=0&&this._timeline[n].time>=t;)n--;return this._iterate(e,n+1),this},t.Timeline.prototype.forEachAtTime=function(t,e){var n=this._search(t);return-1!==n&&this._iterate(function(n){n.time===t&&e.call(this,n)},0,n),this},t.Timeline.prototype.dispose=function(){return t.prototype.dispose.call(this),this._timeline=null,this},t.Timeline}),n(function(t){t.supported&&(!window.hasOwnProperty(\"OfflineAudioContext\")&&window.hasOwnProperty(\"webkitOfflineAudioContext\")&&(window.OfflineAudioContext=window.webkitOfflineAudioContext),new OfflineAudioContext(1,1,44100).startRendering()instanceof Promise||(OfflineAudioContext.prototype._native_startRendering=OfflineAudioContext.prototype.startRendering,OfflineAudioContext.prototype.startRendering=function(){return new Promise(function(t){this.oncomplete=function(e){t(e.renderedBuffer)},this._native_startRendering()}.bind(this))}))}),n(function(t){if(t.supported){!window.hasOwnProperty(\"AudioContext\")&&window.hasOwnProperty(\"webkitAudioContext\")&&(window.AudioContext=window.webkitAudioContext),AudioContext.prototype.close||(AudioContext.prototype.close=function(){return t.isFunction(this.suspend)&&this.suspend(),Promise.resolve()}),AudioContext.prototype.resume||(AudioContext.prototype.resume=function(){return Promise.resolve()}),!AudioContext.prototype.createGain&&AudioContext.prototype.createGainNode&&(AudioContext.prototype.createGain=AudioContext.prototype.createGainNode),!AudioContext.prototype.createDelay&&AudioContext.prototype.createDelayNode&&(AudioContext.prototype.createDelay=AudioContext.prototype.createDelayNode);var e=!1,n=new OfflineAudioContext(1,1,44100),i=new Uint32Array([1179011410,48,1163280727,544501094,16,131073,44100,176400,1048580,1635017060,8,0,0,0,0]).buffer;try{n.decodeAudioData(i)instanceof Promise&&(e=!0)}catch(t){e=!1}e||(AudioContext.prototype._native_decodeAudioData=AudioContext.prototype.decodeAudioData,AudioContext.prototype.decodeAudioData=function(t){return new Promise(function(e,n){this._native_decodeAudioData(t,e,n)}.bind(this))})}}),n(function(t){t.Context=function(){t.Emitter.call(this);var n=t.defaults(arguments,[\"context\"],t.Context);if(!n.context&&(n.context=new window.AudioContext,!n.context))throw new Error(\"could not create AudioContext. Possibly too many AudioContexts running already.\");for(var i in this._context=n.context,this._context)this._defineProperty(this._context,i);this._latencyHint=n.latencyHint,this._constants={},this.lookAhead=n.lookAhead,this._computedUpdateInterval=0,this._ticker=new e(this.emit.bind(this,\"tick\"),n.clockSource,n.updateInterval),this._timeouts=new t.Timeline,this._timeoutIds=0,this.on(\"tick\",this._timeoutLoop.bind(this))},t.extend(t.Context,t.Emitter),t.Emitter.mixin(t.Context),t.Context.defaults={clockSource:\"worker\",latencyHint:\"interactive\",lookAhead:.1,updateInterval:.03},t.Context.prototype._defineProperty=function(e,n){t.isUndef(this[n])&&Object.defineProperty(this,n,{get:function(){return\"function\"==typeof e[n]?e[n].bind(e):e[n]},set:function(t){e[n]=t}})},t.Context.prototype.now=function(){return this._context.currentTime+this.lookAhead},t.Context.prototype.ready=function(){return new Promise(function(t){\"running\"===this._context.state?t():this._context.resume().then(function(){t()})}.bind(this))},t.Context.prototype.close=function(){return this._context.close().then(function(){t.Context.emit(\"close\",this)}.bind(this))},t.Context.prototype.getConstant=function(t){if(this._constants[t])return this._constants[t];for(var e=this._context.createBuffer(1,128,this._context.sampleRate),n=e.getChannelData(0),i=0;i<n.length;i++)n[i]=t;var r=this._context.createBufferSource();return r.channelCount=1,r.channelCountMode=\"explicit\",r.buffer=e,r.loop=!0,r.start(0),this._constants[t]=r,r},t.Context.prototype._timeoutLoop=function(){for(var t=this.now();this._timeouts&&this._timeouts.length&&this._timeouts.peek().time<=t;)this._timeouts.shift().callback()},t.Context.prototype.setTimeout=function(t,e){this._timeoutIds++;var n=this.now();return this._timeouts.add({callback:t,time:n+e,id:this._timeoutIds}),this._timeoutIds},t.Context.prototype.clearTimeout=function(t){return this._timeouts.forEach(function(e){e.id===t&&this.remove(e)}),this},Object.defineProperty(t.Context.prototype,\"updateInterval\",{get:function(){return this._ticker.updateInterval},set:function(t){this._ticker.updateInterval=t}}),Object.defineProperty(t.Context.prototype,\"clockSource\",{get:function(){return this._ticker.type},set:function(t){this._ticker.type=t}}),Object.defineProperty(t.Context.prototype,\"latencyHint\",{get:function(){return this._latencyHint},set:function(e){var n=e;if(this._latencyHint=e,t.isString(e))switch(e){case\"interactive\":n=.1,this._context.latencyHint=e;break;case\"playback\":n=.8,this._context.latencyHint=e;break;case\"balanced\":n=.25,this._context.latencyHint=e;break;case\"fastest\":this._context.latencyHint=\"interactive\",n=.01}this.lookAhead=n,this.updateInterval=n/3}}),t.Context.prototype.dispose=function(){return this.close().then(function(){for(var e in t.Emitter.prototype.dispose.call(this),this._ticker.dispose(),this._ticker=null,this._timeouts.dispose(),this._timeouts=null,this._constants)this._constants[e].disconnect();this._constants=null}.bind(this))};var e=function(e,n,i){this._type=n,this._updateInterval=i,this._callback=t.defaultArg(e,t.noOp),this._createClock()};return e.Type={Worker:\"worker\",Timeout:\"timeout\",Offline:\"offline\"},e.prototype._createWorker=function(){window.URL=window.URL||window.webkitURL;var t=new Blob([\"var timeoutTime = \"+(1e3*this._updateInterval).toFixed(1)+\";self.onmessage = function(msg){\\ttimeoutTime = parseInt(msg.data);};function tick(){\\tsetTimeout(tick, timeoutTime);\\tself.postMessage('tick');}tick();\"]),e=URL.createObjectURL(t),n=new Worker(e);n.onmessage=this._callback.bind(this),this._worker=n},e.prototype._createTimeout=function(){this._timeout=setTimeout(function(){this._createTimeout(),this._callback()}.bind(this),1e3*this._updateInterval)},e.prototype._createClock=function(){if(this._type===e.Type.Worker)try{this._createWorker()}catch(t){this._type=e.Type.Timeout,this._createClock()}else this._type===e.Type.Timeout&&this._createTimeout()},Object.defineProperty(e.prototype,\"updateInterval\",{get:function(){return this._updateInterval},set:function(t){this._updateInterval=Math.max(t,128/44100),this._type===e.Type.Worker&&this._worker.postMessage(Math.max(1e3*t,1))}}),Object.defineProperty(e.prototype,\"type\",{get:function(){return this._type},set:function(t){this._disposeClock(),this._type=t,this._createClock()}}),e.prototype._disposeClock=function(){this._timeout&&(clearTimeout(this._timeout),this._timeout=null),this._worker&&(this._worker.terminate(),this._worker.onmessage=null,this._worker=null)},e.prototype.dispose=function(){this._disposeClock(),this._callback=null},t.getContext(function(){var e=AudioNode.prototype.connect,n=AudioNode.prototype.disconnect;function i(n,i,r){if(n.input)return r=t.defaultArg(r,0),t.isArray(n.input)?this.connect(n.input[r]):this.connect(n.input,i,r);try{return n instanceof AudioNode?(e.call(this,n,i,r),n):(e.call(this,n,i),n)}catch(t){throw new Error(\"error connecting to node: \"+n+\"\\n\"+t)}}AudioNode.prototype.connect!==i&&(AudioNode.prototype.connect=i,AudioNode.prototype.disconnect=function(e,i,r){if(e&&e.input&&t.isArray(e.input))r=t.defaultArg(r,0),this.disconnect(e.input[r],i,0);else if(e&&e.input)this.disconnect(e.input,i,r);else try{n.apply(this,arguments)}catch(t){throw new Error(\"error disconnecting node: \"+e+\"\\n\"+t)}})}),t.supported&&!t.initialized?(t.context=new t.Context,window.TONE_SILENCE_VERSION_LOGGING||console.log(\"%c * Tone.js \"+t.version+\" * \",\"background: #000; color: #fff\")):t.supported||console.warn(\"This browser does not support Tone.js\"),t.Context}),n(function(t){return t.AudioNode=function(){t.call(this);var e=t.defaults(arguments,[\"context\"],{context:t.context});this._context=e.context},t.extend(t.AudioNode),Object.defineProperty(t.AudioNode.prototype,\"context\",{get:function(){return this._context}}),t.AudioNode.prototype.createInsOuts=function(t,e){1===t?this.input=this.context.createGain():t>1&&(this.input=new Array(t)),1===e?this.output=this.context.createGain():e>1&&(this.output=new Array(e))},Object.defineProperty(t.AudioNode.prototype,\"channelCount\",{get:function(){return this.output.channelCount},set:function(t){return this.output.channelCount=t}}),Object.defineProperty(t.AudioNode.prototype,\"channelCountMode\",{get:function(){return this.output.channelCountMode},set:function(t){return this.output.channelCountMode=t}}),Object.defineProperty(t.AudioNode.prototype,\"channelInterpretation\",{get:function(){return this.output.channelInterpretation},set:function(t){return this.output.channelInterpretation=t}}),Object.defineProperty(t.AudioNode.prototype,\"numberOfInputs\",{get:function(){return this.input?t.isArray(this.input)?this.input.length:1:0}}),Object.defineProperty(t.AudioNode.prototype,\"numberOfOutputs\",{get:function(){return this.output?t.isArray(this.output)?this.output.length:1:0}}),t.AudioNode.prototype._onConnect=function(){},t.AudioNode.prototype.connect=function(e,n,i){return e._onConnect&&e._onConnect(this),t.isArray(this.output)?(n=t.defaultArg(n,0),this.output[n].connect(e,0,i)):this.output.connect(e,n,i),this},t.AudioNode.prototype.disconnect=function(e,n,i){t.isArray(this.output)?t.isNumber(e)?this.output[e].disconnect():(n=t.defaultArg(n,0),this.output[n].disconnect(e,0,i)):this.output.disconnect.apply(this.output,arguments)},t.AudioNode.prototype.chain=function(){for(var t=this,e=0;e<arguments.length;e++){var n=arguments[e];t.connect(n),t=n}return this},t.AudioNode.prototype.fan=function(){for(var t=0;t<arguments.length;t++)this.connect(arguments[t]);return this},window.AudioNode&&(AudioNode.prototype.chain=t.AudioNode.prototype.chain,AudioNode.prototype.fan=t.AudioNode.prototype.fan),t.AudioNode.prototype.dispose=function(){return t.isDefined(this.input)&&(this.input instanceof AudioNode&&this.input.disconnect(),this.input=null),t.isDefined(this.output)&&(this.output instanceof AudioNode&&this.output.disconnect(),this.output=null),this._context=null,this},t.AudioNode}),n(function(t){return t.SignalBase=function(){t.AudioNode.call(this)},t.extend(t.SignalBase,t.AudioNode),t.SignalBase.prototype.connect=function(e,n,i){return t.Signal&&t.Signal===e.constructor||t.Param&&t.Param===e.constructor?(e._param.cancelScheduledValues(0),e._param.value=0,e.overridden=!0):e instanceof AudioParam&&(e.cancelScheduledValues(0),e.value=0),t.AudioNode.prototype.connect.call(this,e,n,i),this},t.SignalBase}),n(function(t){if(t.supported){var e=navigator.userAgent.toLowerCase();if(e.includes(\"safari\")&&!e.includes(\"chrome\")){var n=function(t){for(var e in this._internalNode=this.input=this.output=t._native_createWaveShaper(),this._curve=null,this._internalNode)this._defineProperty(this._internalNode,e)};Object.defineProperty(n.prototype,\"curve\",{get:function(){return this._curve},set:function(t){this._curve=t;var e=new Float32Array(t.length+1);e.set(t,1),e[0]=t[0],this._internalNode.curve=e}}),n.prototype._defineProperty=function(e,n){t.isUndef(this[n])&&Object.defineProperty(this,n,{get:function(){return\"function\"==typeof e[n]?e[n].bind(e):e[n]},set:function(t){e[n]=t}})},AudioContext.prototype._native_createWaveShaper=AudioContext.prototype.createWaveShaper,AudioContext.prototype.createWaveShaper=function(){return new n(this)}}}}),n(function(t){return t.WaveShaper=function(e,n){t.SignalBase.call(this),this._shaper=this.input=this.output=this.context.createWaveShaper(),this._curve=null,Array.isArray(e)?this.curve=e:isFinite(e)||t.isUndef(e)?this._curve=new Float32Array(t.defaultArg(e,1024)):t.isFunction(e)&&(this._curve=new Float32Array(t.defaultArg(n,1024)),this.setMap(e))},t.extend(t.WaveShaper,t.SignalBase),t.WaveShaper.prototype.setMap=function(t){for(var e=new Array(this._curve.length),n=0,i=this._curve.length;n<i;n++){var r=n/(i-1)*2-1;e[n]=t(r,n)}return this.curve=e,this},Object.defineProperty(t.WaveShaper.prototype,\"curve\",{get:function(){return this._shaper.curve},set:function(t){this._curve=new Float32Array(t),this._shaper.curve=this._curve}}),Object.defineProperty(t.WaveShaper.prototype,\"oversample\",{get:function(){return this._shaper.oversample},set:function(t){if(![\"none\",\"2x\",\"4x\"].includes(t))throw new RangeError(\"Tone.WaveShaper: oversampling must be either 'none', '2x', or '4x'\");this._shaper.oversample=t}}),t.WaveShaper.prototype.dispose=function(){return t.SignalBase.prototype.dispose.call(this),this._shaper.disconnect(),this._shaper=null,this._curve=null,this},t.WaveShaper}),n(function(t){return t.TimeBase=function(e,n){if(!(this instanceof t.TimeBase))return new t.TimeBase(e,n);if(this._val=e,this._units=n,t.isUndef(this._units)&&t.isString(this._val)&&parseFloat(this._val)==this._val&&\"+\"!==this._val.charAt(0))this._val=parseFloat(this._val),this._units=this._defaultUnits;else if(e&&e.constructor===this.constructor)this._val=e._val,this._units=e._units;else if(e instanceof t.TimeBase)switch(this._defaultUnits){case\"s\":this._val=e.toSeconds();break;case\"i\":this._val=e.toTicks();break;case\"hz\":this._val=e.toFrequency();break;case\"midi\":this._val=e.toMidi();break;default:throw new Error(\"Unrecognized default units \"+this._defaultUnits)}},t.extend(t.TimeBase),t.TimeBase.prototype._expressions={n:{regexp:/^(\\d+)n(\\.?)$/i,method:function(t,e){t=parseInt(t);var n=\".\"===e?1.5:1;return 1===t?this._beatsToUnits(this._getTimeSignature())*n:this._beatsToUnits(4/t)*n}},t:{regexp:/^(\\d+)t$/i,method:function(t){return t=parseInt(t),this._beatsToUnits(8/(3*parseInt(t)))}},m:{regexp:/^(\\d+)m$/i,method:function(t){return this._beatsToUnits(parseInt(t)*this._getTimeSignature())}},i:{regexp:/^(\\d+)i$/i,method:function(t){return this._ticksToUnits(parseInt(t))}},hz:{regexp:/^(\\d+(?:\\.\\d+)?)hz$/i,method:function(t){return this._frequencyToUnits(parseFloat(t))}},tr:{regexp:/^(\\d+(?:\\.\\d+)?):(\\d+(?:\\.\\d+)?):?(\\d+(?:\\.\\d+)?)?$/,method:function(t,e,n){var i=0;return t&&\"0\"!==t&&(i+=this._beatsToUnits(this._getTimeSignature()*parseFloat(t))),e&&\"0\"!==e&&(i+=this._beatsToUnits(parseFloat(e))),n&&\"0\"!==n&&(i+=this._beatsToUnits(parseFloat(n)/4)),i}},s:{regexp:/^(\\d+(?:\\.\\d+)?)s$/,method:function(t){return this._secondsToUnits(parseFloat(t))}},samples:{regexp:/^(\\d+)samples$/,method:function(t){return parseInt(t)/this.context.sampleRate}},default:{regexp:/^(\\d+(?:\\.\\d+)?)$/,method:function(t){return this._expressions[this._defaultUnits].method.call(this,t)}}},t.TimeBase.prototype._defaultUnits=\"s\",t.TimeBase.prototype._getBpm=function(){return t.Transport?t.Transport.bpm.value:120},t.TimeBase.prototype._getTimeSignature=function(){return t.Transport?t.Transport.timeSignature:4},t.TimeBase.prototype._getPPQ=function(){return t.Transport?t.Transport.PPQ:192},t.TimeBase.prototype._now=function(){return this.now()},t.TimeBase.prototype._frequencyToUnits=function(t){return 1/t},t.TimeBase.prototype._beatsToUnits=function(t){return 60/this._getBpm()*t},t.TimeBase.prototype._secondsToUnits=function(t){return t},t.TimeBase.prototype._ticksToUnits=function(t){return t*(this._beatsToUnits(1)/this._getPPQ())},t.TimeBase.prototype._noArg=function(){return this._now()},t.TimeBase.prototype.valueOf=function(){if(t.isUndef(this._val))return this._noArg();if(t.isString(this._val)&&t.isUndef(this._units))for(var e in this._expressions)if(this._expressions[e].regexp.test(this._val.trim())){this._units=e;break}if(t.isDefined(this._units)){var n=this._expressions[this._units],i=this._val.toString().trim().match(n.regexp);return i?n.method.apply(this,i.slice(1)):n.method.call(this,parseFloat(this._val))}return this._val},t.TimeBase.prototype.toSeconds=function(){return this.valueOf()},t.TimeBase.prototype.toFrequency=function(){return 1/this.toSeconds()},t.TimeBase.prototype.toSamples=function(){return this.toSeconds()*this.context.sampleRate},t.TimeBase.prototype.toMilliseconds=function(){return 1e3*this.toSeconds()},t.TimeBase.prototype.dispose=function(){this._val=null,this._units=null},t.TimeBase}),n(function(t){t.Frequency=function(e,n){if(!(this instanceof t.Frequency))return new t.Frequency(e,n);t.TimeBase.call(this,e,n)},t.extend(t.Frequency,t.TimeBase),t.Frequency.prototype._expressions=Object.assign({},t.TimeBase.prototype._expressions,{midi:{regexp:/^(\\d+(?:\\.\\d+)?midi)/,method:function(e){return\"midi\"===this._defaultUnits?e:t.Frequency.mtof(e)}},note:{regexp:/^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i,method:function(n,i){var r=e[n.toLowerCase()]+12*(parseInt(i)+1);return\"midi\"===this._defaultUnits?r:t.Frequency.mtof(r)}},tr:{regexp:/^(\\d+(?:\\.\\d+)?):(\\d+(?:\\.\\d+)?):?(\\d+(?:\\.\\d+)?)?/,method:function(t,e,n){var i=1;return t&&\"0\"!==t&&(i*=this._beatsToUnits(this._getTimeSignature()*parseFloat(t))),e&&\"0\"!==e&&(i*=this._beatsToUnits(parseFloat(e))),n&&\"0\"!==n&&(i*=this._beatsToUnits(parseFloat(n)/4)),i}}}),t.Frequency.prototype.transpose=function(e){return new this.constructor(this.valueOf()*t.intervalToFrequencyRatio(e))},t.Frequency.prototype.harmonize=function(t){return t.map(function(t){return this.transpose(t)}.bind(this))},t.Frequency.prototype.toMidi=function(){return t.Frequency.ftom(this.valueOf())},t.Frequency.prototype.toNote=function(){var e=this.toFrequency(),i=Math.log2(e/t.Frequency.A4),r=Math.round(12*i)+57,o=Math.floor(r/12);return o<0&&(r+=-12*o),n[r%12]+o.toString()},t.Frequency.prototype.toSeconds=function(){return 1/t.TimeBase.prototype.toSeconds.call(this)},t.Frequency.prototype.toFrequency=function(){return t.TimeBase.prototype.toFrequency.call(this)},t.Frequency.prototype.toTicks=function(){var e=this._beatsToUnits(1),n=this.valueOf()/e;return Math.floor(n*t.Transport.PPQ)},t.Frequency.prototype._noArg=function(){return 0},t.Frequency.prototype._frequencyToUnits=function(t){return t},t.Frequency.prototype._ticksToUnits=function(e){return 1/(60*e/(t.Transport.bpm.value*t.Transport.PPQ))},t.Frequency.prototype._beatsToUnits=function(e){return 1/t.TimeBase.prototype._beatsToUnits.call(this,e)},t.Frequency.prototype._secondsToUnits=function(t){return 1/t},t.Frequency.prototype._defaultUnits=\"hz\";var e={cbb:-2,cb:-1,c:0,\"c#\":1,cx:2,dbb:0,db:1,d:2,\"d#\":3,dx:4,ebb:2,eb:3,e:4,\"e#\":5,ex:6,fbb:3,fb:4,f:5,\"f#\":6,fx:7,gbb:5,gb:6,g:7,\"g#\":8,gx:9,abb:7,ab:8,a:9,\"a#\":10,ax:11,bbb:9,bb:10,b:11,\"b#\":12,bx:13},n=[\"C\",\"C#\",\"D\",\"D#\",\"E\",\"F\",\"F#\",\"G\",\"G#\",\"A\",\"A#\",\"B\"];return t.Frequency.A4=440,t.Frequency.mtof=function(e){return t.Frequency.A4*Math.pow(2,(e-69)/12)},t.Frequency.ftom=function(e){return 69+Math.round(12*Math.log2(e/t.Frequency.A4))},t.Frequency}),n(function(t){return t.Time=function(e,n){if(!(this instanceof t.Time))return new t.Time(e,n);t.TimeBase.call(this,e,n)},t.extend(t.Time,t.TimeBase),t.Time.prototype._expressions=Object.assign({},t.TimeBase.prototype._expressions,{quantize:{regexp:/^@(.+)/,method:function(e){if(t.Transport){var n=new this.constructor(e);return t.Transport.nextSubdivision(n)}return 0}},now:{regexp:/^\\+(.+)/,method:function(t){return this._now()+new this.constructor(t)}}}),t.Time.prototype.quantize=function(e,n){n=t.defaultArg(n,1);var i=new this.constructor(e),r=this.valueOf();return r+(Math.round(r/i)*i-r)*n},t.Time.prototype.toNotation=function(){for(var e=this.toSeconds(),n=[\"1m\"],i=1;i<8;i++){var r=Math.pow(2,i);n.push(r+\"n.\"),n.push(r+\"n\"),n.push(r+\"t\")}n.push(\"0\");var o=n[0],s=t.Time(n[0]).toSeconds();return n.forEach(function(n){var i=t.Time(n).toSeconds();Math.abs(i-e)<Math.abs(s-e)&&(o=n,s=i)}),o},t.Time.prototype.toBarsBeatsSixteenths=function(){var t=this._beatsToUnits(1),e=this.valueOf()/t,n=Math.floor(e/this._getTimeSignature()),i=e%1*4;return e=Math.floor(e)%this._getTimeSignature(),(i=i.toString()).length>3&&(i=parseFloat(parseFloat(i).toFixed(3))),[n,e,i].join(\":\")},t.Time.prototype.toTicks=function(){var t=this._beatsToUnits(1),e=this.valueOf()/t;return Math.round(e*this._getPPQ())},t.Time.prototype.toSeconds=function(){return this.valueOf()},t.Time.prototype.toMidi=function(){return t.Frequency.ftom(this.toFrequency())},t.Time}),n(function(t){return t.TransportTime=function(e,n){if(!(this instanceof t.TransportTime))return new t.TransportTime(e,n);t.Time.call(this,e,n)},t.extend(t.TransportTime,t.Time),t.TransportTime.prototype._now=function(){return t.Transport.seconds},t.TransportTime}),n(function(t){return t.Type={Default:\"number\",Time:\"time\",Frequency:\"frequency\",TransportTime:\"transportTime\",Ticks:\"ticks\",NormalRange:\"normalRange\",AudioRange:\"audioRange\",Decibels:\"db\",Interval:\"interval\",BPM:\"bpm\",Positive:\"positive\",Gain:\"gain\",Cents:\"cents\",Degrees:\"degrees\",MIDI:\"midi\",BarsBeatsSixteenths:\"barsBeatsSixteenths\",Samples:\"samples\",Hertz:\"hertz\",Note:\"note\",Milliseconds:\"milliseconds\",Seconds:\"seconds\",Notation:\"notation\"},t.prototype.toSeconds=function(e){return t.isNumber(e)?e:t.isUndef(e)?this.now():t.isString(e)?new t.Time(e).toSeconds():e instanceof t.TimeBase?e.toSeconds():void 0},t.prototype.toFrequency=function(e){return t.isNumber(e)?e:t.isString(e)||t.isUndef(e)?new t.Frequency(e).valueOf():e instanceof t.TimeBase?e.toFrequency():void 0},t.prototype.toTicks=function(e){return t.isNumber(e)||t.isString(e)?new t.TransportTime(e).toTicks():t.isUndef(e)?t.Transport.ticks:e instanceof t.TimeBase?e.toTicks():void 0},t}),n(function(t){return t.Param=function(){var e=t.defaults(arguments,[\"param\",\"units\",\"convert\"],t.Param);t.AudioNode.call(this),this._param=this.input=e.param,this.units=e.units,this.convert=e.convert,this.overridden=!1,this._events=new t.Timeline(1e3),t.isDefined(e.value)&&this._param&&(this.value=e.value)},t.extend(t.Param,t.AudioNode),t.Param.defaults={units:t.Type.Default,convert:!0,param:void 0},Object.defineProperty(t.Param.prototype,\"value\",{get:function(){var t=this.now();return this._toUnits(this.getValueAtTime(t))},set:function(t){this._initialValue=this._fromUnits(t),this.cancelScheduledValues(this.context.currentTime),this.setValueAtTime(t,this.context.currentTime)}}),Object.defineProperty(t.Param.prototype,\"minValue\",{get:function(){return this.units===t.Type.Time||this.units===t.Type.Frequency||this.units===t.Type.NormalRange||this.units===t.Type.Positive||this.units===t.Type.BPM?0:this.units===t.Type.AudioRange?-1:this.units===t.Type.Decibels?-1/0:this._param.minValue}}),Object.defineProperty(t.Param.prototype,\"maxValue\",{get:function(){return this.units===t.Type.NormalRange||this.units===t.Type.AudioRange?1:this._param.maxValue}}),t.Param.prototype._fromUnits=function(e){if(!this.convert&&!t.isUndef(this.convert)||this.overridden)return e;switch(this.units){case t.Type.Time:return this.toSeconds(e);case t.Type.Frequency:return this.toFrequency(e);case t.Type.Decibels:return t.dbToGain(e);case t.Type.NormalRange:return Math.min(Math.max(e,0),1);case t.Type.AudioRange:return Math.min(Math.max(e,-1),1);case t.Type.Positive:return Math.max(e,0);default:return e}},t.Param.prototype._toUnits=function(e){if(!this.convert&&!t.isUndef(this.convert))return e;switch(this.units){case t.Type.Decibels:return t.gainToDb(e);default:return e}},t.Param.prototype._minOutput=1e-5,t.Param.AutomationType={Linear:\"linearRampToValueAtTime\",Exponential:\"exponentialRampToValueAtTime\",Target:\"setTargetAtTime\",SetValue:\"setValueAtTime\"},t.Param.prototype.setValueAtTime=function(e,n){return n=this.toSeconds(n),e=this._fromUnits(e),this._events.add({type:t.Param.AutomationType.SetValue,value:e,time:n}),this._param.setValueAtTime(e,n),this},t.Param.prototype.getValueAtTime=function(e){e=this.toSeconds(e);var n=this._events.getAfter(e),i=this._events.get(e),r=t.defaultArg(this._initialValue,this._param.defaultValue),o=r;if(null===i)o=r;else if(i.type===t.Param.AutomationType.Target){var s,a=this._events.getBefore(i.time);s=null===a?r:a.value,o=this._exponentialApproach(i.time,s,i.value,i.constant,e)}else o=null===n?i.value:n.type===t.Param.AutomationType.Linear?this._linearInterpolate(i.time,i.value,n.time,n.value,e):n.type===t.Param.AutomationType.Exponential?this._exponentialInterpolate(i.time,i.value,n.time,n.value,e):i.value;return o},t.Param.prototype.setRampPoint=function(t){t=this.toSeconds(t);var e=this.getValueAtTime(t);return this.cancelAndHoldAtTime(t),0===e&&(e=this._minOutput),this.setValueAtTime(this._toUnits(e),t),this},t.Param.prototype.linearRampToValueAtTime=function(e,n){return e=this._fromUnits(e),n=this.toSeconds(n),this._events.add({type:t.Param.AutomationType.Linear,value:e,time:n}),this._param.linearRampToValueAtTime(e,n),this},t.Param.prototype.exponentialRampToValueAtTime=function(e,n){return e=this._fromUnits(e),e=Math.max(this._minOutput,e),n=this.toSeconds(n),this._events.add({type:t.Param.AutomationType.Exponential,time:n,value:e}),this._param.exponentialRampToValueAtTime(e,n),this},t.Param.prototype.exponentialRampTo=function(t,e,n){return n=this.toSeconds(n),this.setRampPoint(n),this.exponentialRampToValueAtTime(t,n+this.toSeconds(e)),this},t.Param.prototype.linearRampTo=function(t,e,n){return n=this.toSeconds(n),this.setRampPoint(n),this.linearRampToValueAtTime(t,n+this.toSeconds(e)),this},t.Param.prototype.targetRampTo=function(t,e,n){return n=this.toSeconds(n),this.setRampPoint(n),this.exponentialApproachValueAtTime(t,n,e),this},t.Param.prototype.exponentialApproachValueAtTime=function(t,e,n){var i=Math.log(this.toSeconds(n)+1)/Math.log(200);return e=this.toSeconds(e),this.setTargetAtTime(t,e,i)},t.Param.prototype.setTargetAtTime=function(e,n,i){if(e=this._fromUnits(e),i<=0)throw new Error(\"timeConstant must be greater than 0\");return n=this.toSeconds(n),this._events.add({type:t.Param.AutomationType.Target,value:e,time:n,constant:i}),this._param.setTargetAtTime(e,n,i),this},t.Param.prototype.setValueCurveAtTime=function(e,n,i,r){r=t.defaultArg(r,1),i=this.toSeconds(i),n=this.toSeconds(n),this.setValueAtTime(e[0]*r,n);for(var o=i/(e.length-1),s=1;s<e.length;s++)this.linearRampToValueAtTime(e[s]*r,n+s*o);return this},t.Param.prototype.cancelScheduledValues=function(t){return t=this.toSeconds(t),this._events.cancel(t),this._param.cancelScheduledValues(t),this},t.Param.prototype.cancelAndHoldAtTime=function(e){var n=this.getValueAtTime(e),i=this._events.get(e),r=this._events.getAfter(e);return i&&i.time===e?r?this._events.cancel(r.time):this._events.cancel(e+1e-6):r&&(this._events.cancel(r.time),this._param.cancelAndHoldAtTime||this._param.cancelScheduledValues(e),r.type===t.Param.AutomationType.Linear?this._param.cancelAndHoldAtTime?this._events.add({type:t.Param.AutomationType.Linear,value:n,time:e}):this.linearRampToValueAtTime(n,e):r.type===t.Param.AutomationType.Exponential&&(this._param.cancelAndHoldAtTime?this._events.add({type:t.Param.AutomationType.Exponential,value:n,time:e}):this.exponentialRampToValueAtTime(n,e))),this._events.add({type:t.Param.AutomationType.SetValue,value:n,time:e}),this._param.cancelAndHoldAtTime?this._param.cancelAndHoldAtTime(e):this._param.setValueAtTime(n,e),this},t.Param.prototype.rampTo=function(e,n,i){return n=t.defaultArg(n,.1),this.units===t.Type.Frequency||this.units===t.Type.BPM||this.units===t.Type.Decibels?this.exponentialRampTo(e,n,i):this.linearRampTo(e,n,i),this},t.Param.prototype._exponentialApproach=function(t,e,n,i,r){return n+(e-n)*Math.exp(-(r-t)/i)},t.Param.prototype._linearInterpolate=function(t,e,n,i,r){return e+(r-t)/(n-t)*(i-e)},t.Param.prototype._exponentialInterpolate=function(t,e,n,i,r){return e*Math.pow(i/e,(r-t)/(n-t))},t.Param.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._param=null,this._events=null,this},t.Param}),n(function(t){return t.OfflineContext=function(e,n,i){var r=new OfflineAudioContext(e,n*i,i);t.Context.call(this,{context:r,clockSource:\"offline\",lookAhead:0,updateInterval:128/i}),this._duration=n,this._currentTime=0},t.extend(t.OfflineContext,t.Context),t.OfflineContext.prototype.now=function(){return this._currentTime},t.OfflineContext.prototype.render=function(){for(;this._duration-this._currentTime>=0;)this.emit(\"tick\"),this._currentTime+=this.blockTime;return this._context.startRendering()},t.OfflineContext.prototype.close=function(){return this._context=null,Promise.resolve()},t.OfflineContext}),n(function(t){if(t.supported){var e=navigator.userAgent.toLowerCase();e.includes(\"safari\")&&!e.includes(\"chrome\")&&e.includes(\"mobile\")&&(t.OfflineContext.prototype.createBufferSource=function(){var t=this._context.createBufferSource(),e=t.start;return t.start=function(n){this.setTimeout(function(){e.call(t,n)}.bind(this),0)}.bind(this),t})}}),n(function(t){return t.Gain=function(){var e=t.defaults(arguments,[\"gain\",\"units\"],t.Gain);t.AudioNode.call(this),this.input=this.output=this._gainNode=this.context.createGain(),this.gain=new t.Param({param:this._gainNode.gain,units:e.units,value:e.gain,convert:e.convert}),this._readOnly(\"gain\")},t.extend(t.Gain,t.AudioNode),t.Gain.defaults={gain:1,convert:!0},t.Gain.prototype.dispose=function(){t.AudioNode.prototype.dispose.call(this),this._gainNode.disconnect(),this._gainNode=null,this._writable(\"gain\"),this.gain.dispose(),this.gain=null},t.Gain}),n(function(t){if(t.supported&&!AudioContext.prototype.createConstantSource){var e=function(t){this.context=t;for(var e=t.createBuffer(1,128,t.sampleRate),n=e.getChannelData(0),i=0;i<n.length;i++)n[i]=1;this._bufferSource=t.createBufferSource(),this._bufferSource.channelCount=1,this._bufferSource.channelCountMode=\"explicit\",this._bufferSource.buffer=e,this._bufferSource.loop=!0;var r=this._output=t.createGain();this.offset=r.gain,this._bufferSource.connect(r)};e.prototype.start=function(t){return this._bufferSource.start(t),this},e.prototype.stop=function(t){return this._bufferSource.stop(t),this},e.prototype.connect=function(){return this._output.connect.apply(this._output,arguments),this},e.prototype.disconnect=function(){return this._output.disconnect.apply(this._output,arguments),this},AudioContext.prototype.createConstantSource=function(){return new e(this)},t.Context.prototype.createConstantSource=function(){return new e(this)}}}),n(function(t){return t.Signal=function(){var e=t.defaults(arguments,[\"value\",\"units\"],t.Signal);t.Param.call(this,e),this._proxies=[],this._sourceStarted=!1,this._constantSource=this.context.createConstantSource(),this._param=this._constantSource.offset,this.value=e.value,this.output=this._constantSource,this.input=this._param=this.output.offset},t.extend(t.Signal,t.Param),t.Signal.defaults={value:0,units:t.Type.Default,convert:!0},t.Signal.prototype.connect=function(e){return this._isParam(e)&&!this._sourceStarted?(this._proxies.push(e),e.overridden=!0,this._applyAutomations(e)):(t.SignalBase.prototype.connect.apply(this,arguments),this._sourceStarted||(this._sourceStarted=!0,this._constantSource.start(0))),this},t.Signal.prototype._isParam=function(e){return t.Param&&t.Param===e.constructor||e instanceof AudioParam},t.Signal.prototype._connectProxies=function(){this._sourceStarted||(this._sourceStarted=!0,this._constantSource.start(0)),this._proxies.forEach(function(e){t.SignalBase.prototype.connect.call(this,e),e._proxies&&e._connectProxies()}.bind(this))},t.Signal.prototype._onConnect=function(t){this._isParam(t)||this._connectProxies()},t.Signal.prototype._applyAutomations=function(t){var e=this.context.currentTime;t.cancelScheduledValues(e);var n=this.getValueAtTime(e);t.setValueAtTime(n,e),this._events.forEachFrom(e,function(e){t[e.type](e.value,e.time,e.constant)})},t.Signal.prototype.disconnect=function(e){if(this._proxies.includes(e)){var n=this._proxies.indexOf(e);this._proxies.splice(n,1)}else e||(this._proxies=[]);return t.SignalBase.prototype.disconnect.apply(this,arguments)},t.Signal.prototype.getValueAtTime=function(e){return this._param.getValueAtTime?this._param.getValueAtTime(e):t.Param.prototype.getValueAtTime.call(this,e)},[\"setValueAtTime\",\"linearRampToValueAtTime\",\"exponentialRampToValueAtTime\",\"setTargetAtTime\"].forEach(function(e){var n=t.Signal.prototype[e];t.Signal.prototype[e]=function(){var t=arguments;n.apply(this,arguments),t[0]=this._fromUnits(t[0]),t[1]=this.toSeconds(t[1]),this._proxies.forEach(function(n){n[e].apply(n,t)})}}),[\"cancelScheduledValues\",\"cancelAndHoldAtTime\"].forEach(function(e){var n=t.Signal.prototype[e];t.Signal.prototype[e]=function(){var t=arguments;n.apply(this,arguments),t[0]=this.toSeconds(t[0]),this._proxies.forEach(function(n){n[e].apply(n,t)})}}),t.Signal.prototype.dispose=function(){return t.Param.prototype.dispose.call(this),this._constantSource.disconnect(),this._constantSource=null,this._proxies=null,this},t.Signal}),n(function(t){return t.Pow=function(e){t.SignalBase.call(this),this._exp=t.defaultArg(e,1),this._expScaler=this.input=this.output=new t.WaveShaper(this._expFunc(this._exp),8192)},t.extend(t.Pow,t.SignalBase),Object.defineProperty(t.Pow.prototype,\"value\",{get:function(){return this._exp},set:function(t){this._exp=t,this._expScaler.setMap(this._expFunc(this._exp))}}),t.Pow.prototype._expFunc=function(t){return function(e){return Math.pow(Math.abs(e),t)}},t.Pow.prototype.dispose=function(){return t.SignalBase.prototype.dispose.call(this),this._expScaler.dispose(),this._expScaler=null,this},t.Pow}),n(function(t){return t.Envelope=function(){var e=t.defaults(arguments,[\"attack\",\"decay\",\"sustain\",\"release\"],t.Envelope);t.AudioNode.call(this),this.attack=e.attack,this.decay=e.decay,this.sustain=e.sustain,this.release=e.release,this._attackCurve=\"linear\",this._releaseCurve=\"exponential\",this._sig=this.output=new t.Signal(0),this.attackCurve=e.attackCurve,this.releaseCurve=e.releaseCurve},t.extend(t.Envelope,t.AudioNode),t.Envelope.defaults={attack:.01,decay:.1,sustain:.5,release:1,attackCurve:\"linear\",releaseCurve:\"exponential\"},Object.defineProperty(t.Envelope.prototype,\"value\",{get:function(){return this.getValueAtTime(this.now())}}),Object.defineProperty(t.Envelope.prototype,\"attackCurve\",{get:function(){if(t.isString(this._attackCurve))return this._attackCurve;if(t.isArray(this._attackCurve)){for(var e in t.Envelope.Type)if(t.Envelope.Type[e].In===this._attackCurve)return e;return this._attackCurve}},set:function(e){if(t.Envelope.Type.hasOwnProperty(e)){var n=t.Envelope.Type[e];t.isObject(n)?this._attackCurve=n.In:this._attackCurve=n}else{if(!t.isArray(e))throw new Error(\"Tone.Envelope: invalid curve: \"+e);this._attackCurve=e}}}),Object.defineProperty(t.Envelope.prototype,\"releaseCurve\",{get:function(){if(t.isString(this._releaseCurve))return this._releaseCurve;if(t.isArray(this._releaseCurve)){for(var e in t.Envelope.Type)if(t.Envelope.Type[e].Out===this._releaseCurve)return e;return this._releaseCurve}},set:function(e){if(t.Envelope.Type.hasOwnProperty(e)){var n=t.Envelope.Type[e];t.isObject(n)?this._releaseCurve=n.Out:this._releaseCurve=n}else{if(!t.isArray(e))throw new Error(\"Tone.Envelope: invalid curve: \"+e);this._releaseCurve=e}}}),t.Envelope.prototype.triggerAttack=function(e,n){e=this.toSeconds(e);var i=this.toSeconds(this.attack),r=i,o=this.toSeconds(this.decay);n=t.defaultArg(n,1);var s=this.getValueAtTime(e);if(s>0&&(r=(1-s)/(1/r)),\"linear\"===this._attackCurve)this._sig.linearRampTo(n,r,e);else if(\"exponential\"===this._attackCurve)this._sig.targetRampTo(n,r,e);else if(r>0){this._sig.cancelAndHoldAtTime(e);var a=this._attackCurve;if(r<i){var u=1-r/i,l=Math.floor(u*this._attackCurve.length);(a=this._attackCurve.slice(l))[0]=s}this._sig.setValueCurveAtTime(a,e,r,n)}return o&&this._sig.targetRampTo(n*this.sustain,o,r+e),this},t.Envelope.prototype.triggerRelease=function(e){e=this.toSeconds(e);var n=this.getValueAtTime(e);if(n>0){var i=this.toSeconds(this.release);if(\"linear\"===this._releaseCurve)this._sig.linearRampTo(0,i,e);else if(\"exponential\"===this._releaseCurve)this._sig.targetRampTo(0,i,e);else{var r=this._releaseCurve;t.isArray(r)&&(this._sig.cancelAndHoldAtTime(e),this._sig.setValueCurveAtTime(r,e,i,n))}}return this},t.Envelope.prototype.getValueAtTime=function(t){return this._sig.getValueAtTime(t)},t.Envelope.prototype.triggerAttackRelease=function(t,e,n){return e=this.toSeconds(e),this.triggerAttack(e,n),this.triggerRelease(e+this.toSeconds(t)),this},t.Envelope.prototype.cancel=function(t){return this._sig.cancelScheduledValues(t),this},t.Envelope.prototype.connect=t.SignalBase.prototype.connect,function(){var e,n,i=[];for(e=0;e<128;e++)i[e]=Math.sin(e/127*(Math.PI/2));var r=[];for(e=0;e<127;e++){n=e/127;var o=Math.sin(n*(2*Math.PI)*6.4-Math.PI/2)+1;r[e]=o/10+.83*n}r[127]=1;var s=[];for(e=0;e<128;e++)s[e]=Math.ceil(e/127*5)/5;var a=[];for(e=0;e<128;e++)n=e/127,a[e]=.5*(1-Math.cos(Math.PI*n));var u,l=[];for(e=0;e<128;e++){n=e/127;var c=4*Math.pow(n,3)+.2,h=Math.cos(c*Math.PI*2*n);l[e]=Math.abs(h*(1-n))}function p(t){for(var e=new Array(t.length),n=0;n<t.length;n++)e[n]=1-t[n];return e}t.Envelope.Type={linear:\"linear\",exponential:\"exponential\",bounce:{In:p(l),Out:l},cosine:{In:i,Out:(u=i,u.slice(0).reverse())},step:{In:s,Out:p(s)},ripple:{In:r,Out:p(r)},sine:{In:a,Out:p(a)}}}(),t.Envelope.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._sig.dispose(),this._sig=null,this._attackCurve=null,this._releaseCurve=null,this},t.Envelope}),n(function(t){return t.AmplitudeEnvelope=function(){t.Envelope.apply(this,arguments),this.input=this.output=new t.Gain,this._sig.connect(this.output.gain)},t.extend(t.AmplitudeEnvelope,t.Envelope),t.AmplitudeEnvelope.prototype.dispose=function(){return t.Envelope.prototype.dispose.call(this),this},t.AmplitudeEnvelope}),n(function(t){t.supported&&(AnalyserNode.prototype.getFloatTimeDomainData||(AnalyserNode.prototype.getFloatTimeDomainData=function(t){var e=new Uint8Array(t.length);this.getByteTimeDomainData(e);for(var n=0;n<e.length;n++)t[n]=(e[n]-128)/128}))}),n(function(t){return t.Analyser=function(){var e=t.defaults(arguments,[\"type\",\"size\"],t.Analyser);t.AudioNode.call(this),this._analyser=this.input=this.output=this.context.createAnalyser(),this._type=e.type,this._buffer=null,this.size=e.size,this.type=e.type},t.extend(t.Analyser,t.AudioNode),t.Analyser.defaults={size:1024,type:\"fft\",smoothing:.8},t.Analyser.Type={Waveform:\"waveform\",FFT:\"fft\"},t.Analyser.prototype.getValue=function(){return this._type===t.Analyser.Type.FFT?this._analyser.getFloatFrequencyData(this._buffer):this._type===t.Analyser.Type.Waveform&&this._analyser.getFloatTimeDomainData(this._buffer),this._buffer},Object.defineProperty(t.Analyser.prototype,\"size\",{get:function(){return this._analyser.frequencyBinCount},set:function(t){this._analyser.fftSize=2*t,this._buffer=new Float32Array(t)}}),Object.defineProperty(t.Analyser.prototype,\"type\",{get:function(){return this._type},set:function(e){if(e!==t.Analyser.Type.Waveform&&e!==t.Analyser.Type.FFT)throw new TypeError(\"Tone.Analyser: invalid type: \"+e);this._type=e}}),Object.defineProperty(t.Analyser.prototype,\"smoothing\",{get:function(){return this._analyser.smoothingTimeConstant},set:function(t){this._analyser.smoothingTimeConstant=t}}),t.Analyser.prototype.dispose=function(){t.AudioNode.prototype.dispose.call(this),this._analyser.disconnect(),this._analyser=null,this._buffer=null},t.Analyser}),n(function(t){return t.Compressor=function(){var e=t.defaults(arguments,[\"threshold\",\"ratio\"],t.Compressor);t.AudioNode.call(this),this._compressor=this.input=this.output=this.context.createDynamicsCompressor(),this.threshold=new t.Param({param:this._compressor.threshold,units:t.Type.Decibels,convert:!1}),this.attack=new t.Param(this._compressor.attack,t.Type.Time),this.release=new t.Param(this._compressor.release,t.Type.Time),this.knee=new t.Param({param:this._compressor.knee,units:t.Type.Decibels,convert:!1}),this.ratio=new t.Param({param:this._compressor.ratio,convert:!1}),this._readOnly([\"knee\",\"release\",\"attack\",\"ratio\",\"threshold\"]),this.set(e)},t.extend(t.Compressor,t.AudioNode),t.Compressor.defaults={ratio:12,threshold:-24,release:.25,attack:.003,knee:30},t.Compressor.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._writable([\"knee\",\"release\",\"attack\",\"ratio\",\"threshold\"]),this._compressor.disconnect(),this._compressor=null,this.attack.dispose(),this.attack=null,this.release.dispose(),this.release=null,this.threshold.dispose(),this.threshold=null,this.ratio.dispose(),this.ratio=null,this.knee.dispose(),this.knee=null,this},t.Compressor}),n(function(t){return t.Add=function(e){t.Signal.call(this),this.createInsOuts(2,0),this._sum=this.input[0]=this.input[1]=this.output=new t.Gain,this._param=this.input[1]=new t.Signal(e),this._param.connect(this._sum)},t.extend(t.Add,t.Signal),t.Add.prototype.dispose=function(){return t.Signal.prototype.dispose.call(this),this._sum.dispose(),this._sum=null,this},t.Add}),n(function(t){return t.Multiply=function(e){t.Signal.call(this),this.createInsOuts(2,0),this._mult=this.input[0]=this.output=new t.Gain,this._param=this.input[1]=this.output.gain,this.value=t.defaultArg(e,0)},t.extend(t.Multiply,t.Signal),t.Multiply.prototype.dispose=function(){return t.Signal.prototype.dispose.call(this),this._mult.dispose(),this._mult=null,this._param=null,this},t.Multiply}),n(function(t){return t.Negate=function(){t.SignalBase.call(this),this._multiply=this.input=this.output=new t.Multiply(-1)},t.extend(t.Negate,t.SignalBase),t.Negate.prototype.dispose=function(){return t.SignalBase.prototype.dispose.call(this),this._multiply.dispose(),this._multiply=null,this},t.Negate}),n(function(t){return t.Subtract=function(e){t.Signal.call(this),this.createInsOuts(2,0),this._sum=this.input[0]=this.output=new t.Gain,this._neg=new t.Negate,this._param=this.input[1]=new t.Signal(e),this._param.chain(this._neg,this._sum)},t.extend(t.Subtract,t.Signal),t.Subtract.prototype.dispose=function(){return t.Signal.prototype.dispose.call(this),this._neg.dispose(),this._neg=null,this._sum.disconnect(),this._sum=null,this},t.Subtract}),n(function(t){return t.EqualPowerGain=function(){t.SignalBase.call(this),this._eqPower=this.input=this.output=new t.WaveShaper(function(e){return Math.abs(e)<.001?0:t.equalPowerScale(e)}.bind(this),4096)},t.extend(t.EqualPowerGain,t.SignalBase),t.EqualPowerGain.prototype.dispose=function(){return t.SignalBase.prototype.dispose.call(this),this._eqPower.dispose(),this._eqPower=null,this},t.EqualPowerGain}),n(function(t){return t.CrossFade=function(e){t.AudioNode.call(this),this.createInsOuts(2,1),this.a=this.input[0]=new t.Gain,this.b=this.input[1]=new t.Gain,this.fade=new t.Signal(t.defaultArg(e,.5),t.Type.NormalRange),this._equalPowerA=new t.EqualPowerGain,this._equalPowerB=new t.EqualPowerGain,this._one=this.context.getConstant(1),this._invert=new t.Subtract,this.a.connect(this.output),this.b.connect(this.output),this.fade.chain(this._equalPowerB,this.b.gain),this._one.connect(this._invert,0,0),this.fade.connect(this._invert,0,1),this._invert.chain(this._equalPowerA,this.a.gain),this._readOnly(\"fade\")},t.extend(t.CrossFade,t.AudioNode),t.CrossFade.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._writable(\"fade\"),this._equalPowerA.dispose(),this._equalPowerA=null,this._equalPowerB.dispose(),this._equalPowerB=null,this.fade.dispose(),this.fade=null,this._invert.dispose(),this._invert=null,this._one=null,this.a.dispose(),this.a=null,this.b.dispose(),this.b=null,this},t.CrossFade}),n(function(t){return t.Filter=function(){var e=t.defaults(arguments,[\"frequency\",\"type\",\"rolloff\"],t.Filter);t.AudioNode.call(this),this.createInsOuts(1,1),this._filters=[],this.frequency=new t.Signal(e.frequency,t.Type.Frequency),this.detune=new t.Signal(0,t.Type.Cents),this.gain=new t.Signal({value:e.gain,convert:!1}),this.Q=new t.Signal(e.Q),this._type=e.type,this._rolloff=e.rolloff,this.rolloff=e.rolloff,this._readOnly([\"detune\",\"frequency\",\"gain\",\"Q\"])},t.extend(t.Filter,t.AudioNode),t.Filter.defaults={type:\"lowpass\",frequency:350,rolloff:-12,Q:1,gain:0},Object.defineProperty(t.Filter.prototype,\"type\",{get:function(){return this._type},set:function(t){if(-1===[\"lowpass\",\"highpass\",\"bandpass\",\"lowshelf\",\"highshelf\",\"notch\",\"allpass\",\"peaking\"].indexOf(t))throw new TypeError(\"Tone.Filter: invalid type \"+t);this._type=t;for(var e=0;e<this._filters.length;e++)this._filters[e].type=t}}),Object.defineProperty(t.Filter.prototype,\"rolloff\",{get:function(){return this._rolloff},set:function(e){e=parseInt(e,10);var n=[-12,-24,-48,-96].indexOf(e);if(-1===n)throw new RangeError(\"Tone.Filter: rolloff can only be -12, -24, -48 or -96\");n+=1,this._rolloff=e,this.input.disconnect();for(var i=0;i<this._filters.length;i++)this._filters[i].disconnect(),this._filters[i]=null;this._filters=new Array(n);for(var r=0;r<n;r++){var o=this.context.createBiquadFilter();o.type=this._type,this.frequency.connect(o.frequency),this.detune.connect(o.detune),this.Q.connect(o.Q),this.gain.connect(o.gain),this._filters[r]=o}var s=[this.input].concat(this._filters).concat([this.output]);t.connectSeries.apply(t,s)}}),t.Filter.prototype.dispose=function(){t.AudioNode.prototype.dispose.call(this);for(var e=0;e<this._filters.length;e++)this._filters[e].disconnect(),this._filters[e]=null;return this._filters=null,this._writable([\"detune\",\"frequency\",\"gain\",\"Q\"]),this.frequency.dispose(),this.Q.dispose(),this.frequency=null,this.Q=null,this.detune.dispose(),this.detune=null,this.gain.dispose(),this.gain=null,this},t.Filter}),n(function(t){return t.MultibandSplit=function(){var e=t.defaults(arguments,[\"lowFrequency\",\"highFrequency\"],t.MultibandSplit);t.AudioNode.call(this),this.input=new t.Gain,this.output=new Array(3),this.low=this.output[0]=new t.Filter(0,\"lowpass\"),this._lowMidFilter=new t.Filter(0,\"highpass\"),this.mid=this.output[1]=new t.Filter(0,\"lowpass\"),this.high=this.output[2]=new t.Filter(0,\"highpass\"),this.lowFrequency=new t.Signal(e.lowFrequency,t.Type.Frequency),this.highFrequency=new t.Signal(e.highFrequency,t.Type.Frequency),this.Q=new t.Signal(e.Q),this.input.fan(this.low,this.high),this.input.chain(this._lowMidFilter,this.mid),this.lowFrequency.connect(this.low.frequency),this.lowFrequency.connect(this._lowMidFilter.frequency),this.highFrequency.connect(this.mid.frequency),this.highFrequency.connect(this.high.frequency),this.Q.connect(this.low.Q),this.Q.connect(this._lowMidFilter.Q),this.Q.connect(this.mid.Q),this.Q.connect(this.high.Q),this._readOnly([\"high\",\"mid\",\"low\",\"highFrequency\",\"lowFrequency\"])},t.extend(t.MultibandSplit,t.AudioNode),t.MultibandSplit.defaults={lowFrequency:400,highFrequency:2500,Q:1},t.MultibandSplit.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._writable([\"high\",\"mid\",\"low\",\"highFrequency\",\"lowFrequency\"]),this.low.dispose(),this.low=null,this._lowMidFilter.dispose(),this._lowMidFilter=null,this.mid.dispose(),this.mid=null,this.high.dispose(),this.high=null,this.lowFrequency.dispose(),this.lowFrequency=null,this.highFrequency.dispose(),this.highFrequency=null,this.Q.dispose(),this.Q=null,this},t.MultibandSplit}),n(function(t){return t.EQ3=function(){var e=t.defaults(arguments,[\"low\",\"mid\",\"high\"],t.EQ3);t.AudioNode.call(this),this.output=new t.Gain,this._multibandSplit=this.input=new t.MultibandSplit({lowFrequency:e.lowFrequency,highFrequency:e.highFrequency}),this._lowGain=new t.Gain(e.low,t.Type.Decibels),this._midGain=new t.Gain(e.mid,t.Type.Decibels),this._highGain=new t.Gain(e.high,t.Type.Decibels),this.low=this._lowGain.gain,this.mid=this._midGain.gain,this.high=this._highGain.gain,this.Q=this._multibandSplit.Q,this.lowFrequency=this._multibandSplit.lowFrequency,this.highFrequency=this._multibandSplit.highFrequency,this._multibandSplit.low.chain(this._lowGain,this.output),this._multibandSplit.mid.chain(this._midGain,this.output),this._multibandSplit.high.chain(this._highGain,this.output),this._readOnly([\"low\",\"mid\",\"high\",\"lowFrequency\",\"highFrequency\"])},t.extend(t.EQ3,t.AudioNode),t.EQ3.defaults={low:0,mid:0,high:0,lowFrequency:400,highFrequency:2500},t.EQ3.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._writable([\"low\",\"mid\",\"high\",\"lowFrequency\",\"highFrequency\"]),this._multibandSplit.dispose(),this._multibandSplit=null,this.lowFrequency=null,this.highFrequency=null,this._lowGain.dispose(),this._lowGain=null,this._midGain.dispose(),this._midGain=null,this._highGain.dispose(),this._highGain=null,this.low=null,this.mid=null,this.high=null,this.Q=null,this},t.EQ3}),n(function(t){return t.Scale=function(e,n){t.SignalBase.call(this),this._outputMin=t.defaultArg(e,0),this._outputMax=t.defaultArg(n,1),this._scale=this.input=new t.Multiply(1),this._add=this.output=new t.Add(0),this._scale.connect(this._add),this._setRange()},t.extend(t.Scale,t.SignalBase),Object.defineProperty(t.Scale.prototype,\"min\",{get:function(){return this._outputMin},set:function(t){this._outputMin=t,this._setRange()}}),Object.defineProperty(t.Scale.prototype,\"max\",{get:function(){return this._outputMax},set:function(t){this._outputMax=t,this._setRange()}}),t.Scale.prototype._setRange=function(){this._add.value=this._outputMin,this._scale.value=this._outputMax-this._outputMin},t.Scale.prototype.dispose=function(){return t.SignalBase.prototype.dispose.call(this),this._add.dispose(),this._add=null,this._scale.dispose(),this._scale=null,this},t.Scale}),n(function(t){return t.ScaleExp=function(e,n,i){t.SignalBase.call(this),this._scale=this.output=new t.Scale(e,n),this._exp=this.input=new t.Pow(t.defaultArg(i,2)),this._exp.connect(this._scale)},t.extend(t.ScaleExp,t.SignalBase),Object.defineProperty(t.ScaleExp.prototype,\"exponent\",{get:function(){return this._exp.value},set:function(t){this._exp.value=t}}),Object.defineProperty(t.ScaleExp.prototype,\"min\",{get:function(){return this._scale.min},set:function(t){this._scale.min=t}}),Object.defineProperty(t.ScaleExp.prototype,\"max\",{get:function(){return this._scale.max},set:function(t){this._scale.max=t}}),t.ScaleExp.prototype.dispose=function(){return t.SignalBase.prototype.dispose.call(this),this._scale.dispose(),this._scale=null,this._exp.dispose(),this._exp=null,this},t.ScaleExp}),n(function(t){return t.Delay=function(){var e=t.defaults(arguments,[\"delayTime\",\"maxDelay\"],t.Delay);t.AudioNode.call(this),this._maxDelay=Math.max(this.toSeconds(e.maxDelay),this.toSeconds(e.delayTime)),this._delayNode=this.input=this.output=this.context.createDelay(this._maxDelay),this.delayTime=new t.Param({param:this._delayNode.delayTime,units:t.Type.Time,value:e.delayTime}),this._readOnly(\"delayTime\")},t.extend(t.Delay,t.AudioNode),t.Delay.defaults={maxDelay:1,delayTime:0},Object.defineProperty(t.Delay.prototype,\"maxDelay\",{get:function(){return this._maxDelay}}),t.Delay.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._delayNode.disconnect(),this._delayNode=null,this._writable(\"delayTime\"),this.delayTime=null,this},t.Delay}),n(function(t){return t.FeedbackCombFilter=function(){var e=t.defaults(arguments,[\"delayTime\",\"resonance\"],t.FeedbackCombFilter);t.AudioNode.call(this),this._delay=this.input=this.output=new t.Delay(e.delayTime),this.delayTime=this._delay.delayTime,this._feedback=new t.Gain(e.resonance,t.Type.NormalRange),this.resonance=this._feedback.gain,this._delay.chain(this._feedback,this._delay),this._readOnly([\"resonance\",\"delayTime\"])},t.extend(t.FeedbackCombFilter,t.AudioNode),t.FeedbackCombFilter.defaults={delayTime:.1,resonance:.5},t.FeedbackCombFilter.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._writable([\"resonance\",\"delayTime\"]),this._delay.dispose(),this._delay=null,this.delayTime=null,this._feedback.dispose(),this._feedback=null,this.resonance=null,this},t.FeedbackCombFilter}),n(function(t){return t.FFT=function(){var e=t.defaults(arguments,[\"size\"],t.FFT);e.type=t.Analyser.Type.FFT,t.AudioNode.call(this),this._analyser=this.input=this.output=new t.Analyser(e)},t.extend(t.FFT,t.AudioNode),t.FFT.defaults={size:1024},t.FFT.prototype.getValue=function(){return this._analyser.getValue()},Object.defineProperty(t.FFT.prototype,\"size\",{get:function(){return this._analyser.size},set:function(t){this._analyser.size=t}}),t.FFT.prototype.dispose=function(){t.AudioNode.prototype.dispose.call(this),this._analyser.dispose(),this._analyser=null},t.FFT}),n(function(t){return t.Abs=function(){t.SignalBase.call(this),this._abs=this.input=this.output=new t.WaveShaper(function(t){return Math.abs(t)<.001?0:Math.abs(t)},1024)},t.extend(t.Abs,t.SignalBase),t.Abs.prototype.dispose=function(){return t.SignalBase.prototype.dispose.call(this),this._abs.dispose(),this._abs=null,this},t.Abs}),n(function(t){return t.Follower=function(){var e=t.defaults(arguments,[\"attack\",\"release\"],t.Follower);t.AudioNode.call(this),this.createInsOuts(1,1),this._abs=new t.Abs,this._filter=this.context.createBiquadFilter(),this._filter.type=\"lowpass\",this._filter.frequency.value=0,this._filter.Q.value=-100,this._frequencyValues=new t.WaveShaper,this._sub=new t.Subtract,this._delay=new t.Delay(this.blockTime),this._mult=new t.Multiply(1e4),this._attack=e.attack,this._release=e.release,this.input.chain(this._abs,this._filter,this.output),this._abs.connect(this._sub,0,1),this._filter.chain(this._delay,this._sub),this._sub.chain(this._mult,this._frequencyValues,this._filter.frequency),this._setAttackRelease(this._attack,this._release)},t.extend(t.Follower,t.AudioNode),t.Follower.defaults={attack:.05,release:.5},t.Follower.prototype._setAttackRelease=function(e,n){var i=this.blockTime;e=t.Time(e).toFrequency(),n=t.Time(n).toFrequency(),e=Math.max(e,i),n=Math.max(n,i),this._frequencyValues.setMap(function(t){return t<=0?e:n})},Object.defineProperty(t.Follower.prototype,\"attack\",{get:function(){return this._attack},set:function(t){this._attack=t,this._setAttackRelease(this._attack,this._release)}}),Object.defineProperty(t.Follower.prototype,\"release\",{get:function(){return this._release},set:function(t){this._release=t,this._setAttackRelease(this._attack,this._release)}}),t.Follower.prototype.connect=t.SignalBase.prototype.connect,t.Follower.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._filter.disconnect(),this._filter=null,this._frequencyValues.disconnect(),this._frequencyValues=null,this._delay.dispose(),this._delay=null,this._sub.disconnect(),this._sub=null,this._abs.dispose(),this._abs=null,this._mult.dispose(),this._mult=null,this._curve=null,this},t.Follower}),n(function(t){return t.ScaledEnvelope=function(){var e=t.defaults(arguments,[\"attack\",\"decay\",\"sustain\",\"release\"],t.Envelope);t.Envelope.call(this,e),e=t.defaultArg(e,t.ScaledEnvelope.defaults),this._exp=this.output=new t.Pow(e.exponent),this._scale=this.output=new t.Scale(e.min,e.max),this._sig.chain(this._exp,this._scale)},t.extend(t.ScaledEnvelope,t.Envelope),t.ScaledEnvelope.defaults={min:0,max:1,exponent:1},Object.defineProperty(t.ScaledEnvelope.prototype,\"min\",{get:function(){return this._scale.min},set:function(t){this._scale.min=t}}),Object.defineProperty(t.ScaledEnvelope.prototype,\"max\",{get:function(){return this._scale.max},set:function(t){this._scale.max=t}}),Object.defineProperty(t.ScaledEnvelope.prototype,\"exponent\",{get:function(){return this._exp.value},set:function(t){this._exp.value=t}}),t.ScaledEnvelope.prototype.dispose=function(){return t.Envelope.prototype.dispose.call(this),this._scale.dispose(),this._scale=null,this._exp.dispose(),this._exp=null,this},t.ScaledEnvelope}),n(function(t){return t.FrequencyEnvelope=function(){var e=t.defaults(arguments,[\"attack\",\"decay\",\"sustain\",\"release\"],t.Envelope);t.ScaledEnvelope.call(this,e),e=t.defaultArg(e,t.FrequencyEnvelope.defaults),this._octaves=e.octaves,this.baseFrequency=e.baseFrequency,this.octaves=e.octaves},t.extend(t.FrequencyEnvelope,t.Envelope),t.FrequencyEnvelope.defaults={baseFrequency:200,octaves:4,exponent:2},Object.defineProperty(t.FrequencyEnvelope.prototype,\"baseFrequency\",{get:function(){return this._scale.min},set:function(t){this._scale.min=this.toFrequency(t),this.octaves=this._octaves}}),Object.defineProperty(t.FrequencyEnvelope.prototype,\"octaves\",{get:function(){return this._octaves},set:function(t){this._octaves=t,this._scale.max=this.baseFrequency*Math.pow(2,t)}}),Object.defineProperty(t.FrequencyEnvelope.prototype,\"exponent\",{get:function(){return this._exp.value},set:function(t){this._exp.value=t}}),t.FrequencyEnvelope.prototype.dispose=function(){return t.ScaledEnvelope.prototype.dispose.call(this),this},t.FrequencyEnvelope}),n(function(t){return t.GreaterThanZero=function(){t.SignalBase.call(this),this._thresh=this.output=new t.WaveShaper(function(t){return t<=0?0:1},127),this._scale=this.input=new t.Multiply(1e4),this._scale.connect(this._thresh)},t.extend(t.GreaterThanZero,t.SignalBase),t.GreaterThanZero.prototype.dispose=function(){return t.SignalBase.prototype.dispose.call(this),this._scale.dispose(),this._scale=null,this._thresh.dispose(),this._thresh=null,this},t.GreaterThanZero}),n(function(t){return t.GreaterThan=function(e){t.Signal.call(this),this.createInsOuts(2,0),this._param=this.input[0]=new t.Subtract(e),this.input[1]=this._param.input[1],this._gtz=this.output=new t.GreaterThanZero,this._param.connect(this._gtz)},t.extend(t.GreaterThan,t.Signal),t.GreaterThan.prototype.dispose=function(){return t.Signal.prototype.dispose.call(this),this._gtz.dispose(),this._gtz=null,this},t.GreaterThan}),n(function(t){return t.Gate=function(){var e=t.defaults(arguments,[\"threshold\",\"attack\",\"release\"],t.Gate);t.AudioNode.call(this),this.createInsOuts(1,1),this._follower=new t.Follower(e.attack,e.release),this._gt=new t.GreaterThan(t.dbToGain(e.threshold)),this.input.connect(this.output),this.input.chain(this._gt,this._follower,this.output.gain)},t.extend(t.Gate,t.AudioNode),t.Gate.defaults={attack:.1,release:.1,threshold:-40},Object.defineProperty(t.Gate.prototype,\"threshold\",{get:function(){return t.gainToDb(this._gt.value)},set:function(e){this._gt.value=t.dbToGain(e)}}),Object.defineProperty(t.Gate.prototype,\"attack\",{get:function(){return this._follower.attack},set:function(t){this._follower.attack=t}}),Object.defineProperty(t.Gate.prototype,\"release\",{get:function(){return this._follower.release},set:function(t){this._follower.release=t}}),t.Gate.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._follower.dispose(),this._gt.dispose(),this._follower=null,this._gt=null,this},t.Gate}),n(function(t){function e(t){return function(e,n){n=this.toSeconds(n),t.apply(this,arguments);var i=this._events.get(n),r=this._events.previousEvent(i),o=this._getTicksUntilEvent(r,n);return i.ticks=Math.max(o,0),this}}return t.TickSignal=function(e){e=t.defaultArg(e,1),t.Signal.call(this,{units:t.Type.Ticks,value:e}),this._events.memory=1/0,this.cancelScheduledValues(0),this._events.add({type:t.Param.AutomationType.SetValue,time:0,value:e})},t.extend(t.TickSignal,t.Signal),t.TickSignal.prototype.setValueAtTime=e(t.Signal.prototype.setValueAtTime),t.TickSignal.prototype.linearRampToValueAtTime=e(t.Signal.prototype.linearRampToValueAtTime),t.TickSignal.prototype.setTargetAtTime=function(t,e,n){e=this.toSeconds(e),this.setRampPoint(e),t=this._fromUnits(t);for(var i=this._events.get(e),r=Math.round(Math.max(1/n,1)),o=0;o<=r;o++){var s=n*o+e,a=this._exponentialApproach(i.time,i.value,t,n,s);this.linearRampToValueAtTime(this._toUnits(a),s)}return this},t.TickSignal.prototype.exponentialRampToValueAtTime=function(t,e){e=this.toSeconds(e),t=this._fromUnits(t);var n=this._events.get(e);null===n&&(n={value:this._initialValue,time:0});for(var i=Math.round(Math.max(10*(e-n.time),1)),r=(e-n.time)/i,o=0;o<=i;o++){var s=r*o+n.time,a=this._exponentialInterpolate(n.time,n.value,e,t,s);this.linearRampToValueAtTime(this._toUnits(a),s)}return this},t.TickSignal.prototype._getTicksUntilEvent=function(e,n){if(null===e)e={ticks:0,time:0};else if(t.isUndef(e.ticks)){var i=this._events.previousEvent(e);e.ticks=this._getTicksUntilEvent(i,e.time)}var r=this.getValueAtTime(e.time),o=this.getValueAtTime(n);return this._events.get(n).time===n&&this._events.get(n).type===t.Param.AutomationType.SetValue&&(o=this.getValueAtTime(n-this.sampleTime)),.5*(n-e.time)*(r+o)+e.ticks},t.TickSignal.prototype.getTicksAtTime=function(t){t=this.toSeconds(t);var e=this._events.get(t);return Math.max(this._getTicksUntilEvent(e,t),0)},t.TickSignal.prototype.getDurationOfTicks=function(t,e){e=this.toSeconds(e);var n=this.getTicksAtTime(e);return this.getTimeOfTick(n+t)-e},t.TickSignal.prototype.getTimeOfTick=function(e){var n=this._events.get(e,\"ticks\"),i=this._events.getAfter(e,\"ticks\");if(n&&n.ticks===e)return n.time;if(n&&i&&i.type===t.Param.AutomationType.Linear&&n.value!==i.value){var r=this.getValueAtTime(n.time),o=(this.getValueAtTime(i.time)-r)/(i.time-n.time),s=Math.sqrt(Math.pow(r,2)-2*o*(n.ticks-e)),a=(-r+s)/o;return(a>0?a:(-r-s)/o)+n.time}return n?0===n.value?1/0:n.time+(e-n.ticks)/n.value:e/this._initialValue},t.TickSignal.prototype.ticksToTime=function(e,n){return n=this.toSeconds(n),new t.Time(this.getDurationOfTicks(e,n))},t.TickSignal.prototype.timeToTicks=function(e,n){n=this.toSeconds(n),e=this.toSeconds(e);var i=this.getTicksAtTime(n),r=this.getTicksAtTime(n+e);return new t.Ticks(r-i)},t.TickSignal}),n(function(t){return t.TimelineState=function(e){t.Timeline.call(this),this._initial=e},t.extend(t.TimelineState,t.Timeline),t.TimelineState.prototype.getValueAtTime=function(t){var e=this.get(t);return null!==e?e.state:this._initial},t.TimelineState.prototype.setStateAtTime=function(t,e){return this.add({state:t,time:e}),this},t.TimelineState.prototype.getLastState=function(t,e){e=this.toSeconds(e);for(var n=this._search(e);n>=0;n--){var i=this._timeline[n];if(i.state===t)return i}},t.TimelineState.prototype.getNextState=function(t,e){e=this.toSeconds(e);var n=this._search(e);if(-1!==n)for(var i=n;i<this._timeline.length;i++){var r=this._timeline[i];if(r.state===t)return r}},t.TimelineState}),n(function(t){return t.TickSource=function(){var e=t.defaults(arguments,[\"frequency\"],t.TickSource);this.frequency=new t.TickSignal(e.frequency,t.Type.Frequency),this._readOnly(\"frequency\"),this._state=new t.TimelineState(t.State.Stopped),this._state.setStateAtTime(t.State.Stopped,0),this._tickOffset=new t.Timeline,this.setTicksAtTime(0,0)},t.extend(t.TickSource),t.TickSource.defaults={frequency:1},Object.defineProperty(t.TickSource.prototype,\"state\",{get:function(){return this._state.getValueAtTime(this.now())}}),t.TickSource.prototype.start=function(e,n){return e=this.toSeconds(e),this._state.getValueAtTime(e)!==t.State.Started&&(this._state.setStateAtTime(t.State.Started,e),t.isDefined(n)&&this.setTicksAtTime(n,e)),this},t.TickSource.prototype.stop=function(e){if(e=this.toSeconds(e),this._state.getValueAtTime(e)===t.State.Stopped){var n=this._state.get(e);n.time>0&&(this._tickOffset.cancel(n.time),this._state.cancel(n.time))}return this._state.cancel(e),this._state.setStateAtTime(t.State.Stopped,e),this.setTicksAtTime(0,e),this},t.TickSource.prototype.pause=function(e){return e=this.toSeconds(e),this._state.getValueAtTime(e)===t.State.Started&&this._state.setStateAtTime(t.State.Paused,e),this},t.TickSource.prototype.cancel=function(t){return t=this.toSeconds(t),this._state.cancel(t),this._tickOffset.cancel(t),this},t.TickSource.prototype.getTicksAtTime=function(e){e=this.toSeconds(e);var n=this._state.getLastState(t.State.Stopped,e),i={state:t.State.Paused,time:e};this._state.add(i);var r=n,o=0;return this._state.forEachBetween(n.time,e+this.sampleTime,function(e){var n=r.time,i=this._tickOffset.get(e.time);i.time>=r.time&&(o=i.ticks,n=i.time),r.state===t.State.Started&&e.state!==t.State.Started&&(o+=this.frequency.getTicksAtTime(e.time)-this.frequency.getTicksAtTime(n)),r=e}.bind(this)),this._state.remove(i),o},Object.defineProperty(t.TickSource.prototype,\"ticks\",{get:function(){return this.getTicksAtTime(this.now())},set:function(t){this.setTicksAtTime(t,this.now())}}),Object.defineProperty(t.TickSource.prototype,\"seconds\",{get:function(){return this.getSecondsAtTime(this.now())},set:function(t){var e=this.now(),n=this.frequency.timeToTicks(t,e);this.setTicksAtTime(n,e)}}),t.TickSource.prototype.getSecondsAtTime=function(e){e=this.toSeconds(e);var n=this._state.getLastState(t.State.Stopped,e),i={state:t.State.Paused,time:e};this._state.add(i);var r=n,o=0;return this._state.forEachBetween(n.time,e+this.sampleTime,function(e){var n=r.time,i=this._tickOffset.get(e.time);i.time>=r.time&&(o=i.seconds,n=i.time),r.state===t.State.Started&&e.state!==t.State.Started&&(o+=e.time-n),r=e}.bind(this)),this._state.remove(i),o},t.TickSource.prototype.setTicksAtTime=function(t,e){return e=this.toSeconds(e),this._tickOffset.cancel(e),this._tickOffset.add({time:e,ticks:t,seconds:this.frequency.getDurationOfTicks(t,e)}),this},t.TickSource.prototype.getStateAtTime=function(t){return t=this.toSeconds(t),this._state.getValueAtTime(t)},t.TickSource.prototype.getTimeOfTick=function(e,n){n=t.defaultArg(n,this.now());var i=this._tickOffset.get(n),r=this._state.get(n),o=Math.max(i.time,r.time),s=this.frequency.getTicksAtTime(o)+e-i.ticks;return this.frequency.getTimeOfTick(s)},t.TickSource.prototype.forEachTickBetween=function(e,n,i){var r=this._state.get(e);if(this._state.forEachBetween(e,n,function(n){r.state===t.State.Started&&n.state!==t.State.Started&&this.forEachTickBetween(Math.max(r.time,e),n.time-this.sampleTime,i),r=n}.bind(this)),e=Math.max(r.time,e),r.state===t.State.Started&&this._state){var o=this.frequency.getTicksAtTime(e),s=(o-this.frequency.getTicksAtTime(r.time))%1;0!==s&&(s=1-s);for(var a=this.frequency.getTimeOfTick(o+s),u=null;a<n&&this._state;){try{i(a,Math.round(this.getTicksAtTime(a)))}catch(t){u=t;break}this._state&&(a+=this.frequency.getDurationOfTicks(1,a))}}if(u)throw u;return this},t.TickSource.prototype.dispose=function(){return t.Param.prototype.dispose.call(this),this._state.dispose(),this._state=null,this._tickOffset.dispose(),this._tickOffset=null,this._writable(\"frequency\"),this.frequency.dispose(),this.frequency=null,this},t.TickSource}),n(function(t){return t.Clock=function(){var e=t.defaults(arguments,[\"callback\",\"frequency\"],t.Clock);t.Emitter.call(this),this.callback=e.callback,this._nextTick=0,this._tickSource=new t.TickSource(e.frequency),this._lastUpdate=0,this.frequency=this._tickSource.frequency,this._readOnly(\"frequency\"),this._state=new t.TimelineState(t.State.Stopped),this._state.setStateAtTime(t.State.Stopped,0),this._boundLoop=this._loop.bind(this),this.context.on(\"tick\",this._boundLoop)},t.extend(t.Clock,t.Emitter),t.Clock.defaults={callback:t.noOp,frequency:1},Object.defineProperty(t.Clock.prototype,\"state\",{get:function(){return this._state.getValueAtTime(this.now())}}),t.Clock.prototype.start=function(e,n){return e=this.toSeconds(e),this._state.getValueAtTime(e)!==t.State.Started&&(this._state.setStateAtTime(t.State.Started,e),this._tickSource.start(e,n),e<this._lastUpdate&&this.emit(\"start\",e,n)),this},t.Clock.prototype.stop=function(e){return e=this.toSeconds(e),this._state.cancel(e),this._state.setStateAtTime(t.State.Stopped,e),this._tickSource.stop(e),e<this._lastUpdate&&this.emit(\"stop\",e),this},t.Clock.prototype.pause=function(e){return e=this.toSeconds(e),this._state.getValueAtTime(e)===t.State.Started&&(this._state.setStateAtTime(t.State.Paused,e),this._tickSource.pause(e),e<this._lastUpdate&&this.emit(\"pause\",e)),this},Object.defineProperty(t.Clock.prototype,\"ticks\",{get:function(){return Math.ceil(this.getTicksAtTime(this.now()))},set:function(t){this._tickSource.ticks=t}}),Object.defineProperty(t.Clock.prototype,\"seconds\",{get:function(){return this._tickSource.seconds},set:function(t){this._tickSource.seconds=t}}),t.Clock.prototype.getSecondsAtTime=function(t){return this._tickSource.getSecondsAtTime(t)},t.Clock.prototype.setTicksAtTime=function(t,e){return this._tickSource.setTicksAtTime(t,e),this},t.Clock.prototype.getTicksAtTime=function(t){return this._tickSource.getTicksAtTime(t)},t.Clock.prototype.nextTickTime=function(t,e){e=this.toSeconds(e);var n=this.getTicksAtTime(e);return this._tickSource.getTimeOfTick(n+t,e)},t.Clock.prototype._loop=function(){var e=this._lastUpdate,n=this.now();this._lastUpdate=n,e!==n&&(this._state.forEachBetween(e,n,function(e){switch(e.state){case t.State.Started:var n=this._tickSource.getTicksAtTime(e.time);this.emit(\"start\",e.time,n);break;case t.State.Stopped:0!==e.time&&this.emit(\"stop\",e.time);break;case t.State.Paused:this.emit(\"pause\",e.time)}}.bind(this)),this._tickSource.forEachTickBetween(e,n,function(t,e){this.callback(t,e)}.bind(this)))},t.Clock.prototype.getStateAtTime=function(t){return t=this.toSeconds(t),this._state.getValueAtTime(t)},t.Clock.prototype.dispose=function(){t.Emitter.prototype.dispose.call(this),this.context.off(\"tick\",this._boundLoop),this._writable(\"frequency\"),this._tickSource.dispose(),this._tickSource=null,this.frequency=null,this._boundLoop=null,this._nextTick=1/0,this.callback=null,this._state.dispose(),this._state=null},t.Clock}),n(function(t){t.IntervalTimeline=function(){t.call(this),this._root=null,this._length=0},t.extend(t.IntervalTimeline),t.IntervalTimeline.prototype.add=function(n){if(t.isUndef(n.time)||t.isUndef(n.duration))throw new Error(\"Tone.IntervalTimeline: events must have time and duration parameters\");n.time=n.time.valueOf();var i=new e(n.time,n.time+n.duration,n);for(null===this._root?this._root=i:this._root.insert(i),this._length++;null!==i;)i.updateHeight(),i.updateMax(),this._rebalance(i),i=i.parent;return this},t.IntervalTimeline.prototype.remove=function(t){if(null!==this._root){var e=[];this._root.search(t.time,e);for(var n=0;n<e.length;n++){var i=e[n];if(i.event===t){this._removeNode(i),this._length--;break}}}return this},Object.defineProperty(t.IntervalTimeline.prototype,\"length\",{get:function(){return this._length}}),t.IntervalTimeline.prototype.cancel=function(t){return this.forEachFrom(t,function(t){this.remove(t)}.bind(this)),this},t.IntervalTimeline.prototype._setRoot=function(t){this._root=t,null!==this._root&&(this._root.parent=null)},t.IntervalTimeline.prototype._replaceNodeInParent=function(t,e){null!==t.parent?(t.isLeftChild()?t.parent.left=e:t.parent.right=e,this._rebalance(t.parent)):this._setRoot(e)},t.IntervalTimeline.prototype._removeNode=function(t){if(null===t.left&&null===t.right)this._replaceNodeInParent(t,null);else if(null===t.right)this._replaceNodeInParent(t,t.left);else if(null===t.left)this._replaceNodeInParent(t,t.right);else{var e,n;if(t.getBalance()>0)if(null===t.left.right)(e=t.left).right=t.right,n=e;else{for(e=t.left.right;null!==e.right;)e=e.right;e.parent.right=e.left,n=e.parent,e.left=t.left,e.right=t.right}else if(null===t.right.left)(e=t.right).left=t.left,n=e;else{for(e=t.right.left;null!==e.left;)e=e.left;e.parent=e.parent,e.parent.left=e.right,n=e.parent,e.left=t.left,e.right=t.right}null!==t.parent?t.isLeftChild()?t.parent.left=e:t.parent.right=e:this._setRoot(e),this._rebalance(n)}t.dispose()},t.IntervalTimeline.prototype._rotateLeft=function(t){var e=t.parent,n=t.isLeftChild(),i=t.right;t.right=i.left,i.left=t,null!==e?n?e.left=i:e.right=i:this._setRoot(i)},t.IntervalTimeline.prototype._rotateRight=function(t){var e=t.parent,n=t.isLeftChild(),i=t.left;t.left=i.right,i.right=t,null!==e?n?e.left=i:e.right=i:this._setRoot(i)},t.IntervalTimeline.prototype._rebalance=function(t){var e=t.getBalance();e>1?t.left.getBalance()<0?this._rotateLeft(t.left):this._rotateRight(t):e<-1&&(t.right.getBalance()>0?this._rotateRight(t.right):this._rotateLeft(t))},t.IntervalTimeline.prototype.get=function(t){if(null!==this._root){var e=[];if(this._root.search(t,e),e.length>0){for(var n=e[0],i=1;i<e.length;i++)e[i].low>n.low&&(n=e[i]);return n.event}}return null},t.IntervalTimeline.prototype.forEach=function(t){if(null!==this._root){var e=[];this._root.traverse(function(t){e.push(t)});for(var n=0;n<e.length;n++){var i=e[n].event;i&&t(i)}}return this},t.IntervalTimeline.prototype.forEachAtTime=function(t,e){if(null!==this._root){var n=[];this._root.search(t,n);for(var i=n.length-1;i>=0;i--){var r=n[i].event;r&&e(r)}}return this},t.IntervalTimeline.prototype.forEachFrom=function(t,e){if(null!==this._root){var n=[];this._root.searchAfter(t,n);for(var i=n.length-1;i>=0;i--)e(n[i].event)}return this},t.IntervalTimeline.prototype.dispose=function(){var t=[];null!==this._root&&this._root.traverse(function(e){t.push(e)});for(var e=0;e<t.length;e++)t[e].dispose();return t=null,this._root=null,this};var e=function(t,e,n){this.event=n,this.low=t,this.high=e,this.max=this.high,this._left=null,this._right=null,this.parent=null,this.height=0};return e.prototype.insert=function(t){t.low<=this.low?null===this.left?this.left=t:this.left.insert(t):null===this.right?this.right=t:this.right.insert(t)},e.prototype.search=function(t,e){t>this.max||(null!==this.left&&this.left.search(t,e),this.low<=t&&this.high>t&&e.push(this),this.low>t||null!==this.right&&this.right.search(t,e))},e.prototype.searchAfter=function(t,e){this.low>=t&&(e.push(this),null!==this.left&&this.left.searchAfter(t,e)),null!==this.right&&this.right.searchAfter(t,e)},e.prototype.traverse=function(t){t(this),null!==this.left&&this.left.traverse(t),null!==this.right&&this.right.traverse(t)},e.prototype.updateHeight=function(){null!==this.left&&null!==this.right?this.height=Math.max(this.left.height,this.right.height)+1:null!==this.right?this.height=this.right.height+1:null!==this.left?this.height=this.left.height+1:this.height=0},e.prototype.updateMax=function(){this.max=this.high,null!==this.left&&(this.max=Math.max(this.max,this.left.max)),null!==this.right&&(this.max=Math.max(this.max,this.right.max))},e.prototype.getBalance=function(){var t=0;return null!==this.left&&null!==this.right?t=this.left.height-this.right.height:null!==this.left?t=this.left.height+1:null!==this.right&&(t=-(this.right.height+1)),t},e.prototype.isLeftChild=function(){return null!==this.parent&&this.parent.left===this},Object.defineProperty(e.prototype,\"left\",{get:function(){return this._left},set:function(t){this._left=t,null!==t&&(t.parent=this),this.updateHeight(),this.updateMax()}}),Object.defineProperty(e.prototype,\"right\",{get:function(){return this._right},set:function(t){this._right=t,null!==t&&(t.parent=this),this.updateHeight(),this.updateMax()}}),e.prototype.dispose=function(){this.parent=null,this._left=null,this._right=null,this.event=null},t.IntervalTimeline}),n(function(t){return t.Ticks=function(e,n){if(!(this instanceof t.Ticks))return new t.Ticks(e,n);t.TransportTime.call(this,e,n)},t.extend(t.Ticks,t.TransportTime),t.Ticks.prototype._defaultUnits=\"i\",t.Ticks.prototype._now=function(){return t.Transport.ticks},t.Ticks.prototype._beatsToUnits=function(t){return this._getPPQ()*t},t.Ticks.prototype._secondsToUnits=function(t){return t/(60/this._getBpm())*this._getPPQ()},t.Ticks.prototype._ticksToUnits=function(t){return t},t.Ticks.prototype.toTicks=function(){return this.valueOf()},t.Ticks.prototype.toSeconds=function(){return this.valueOf()/this._getPPQ()*(60/this._getBpm())},t.Ticks}),n(function(t){return t.TransportEvent=function(e,n){n=t.defaultArg(n,t.TransportEvent.defaults),t.call(this),this.Transport=e,this.id=t.TransportEvent._eventId++,this.time=t.Ticks(n.time),this.callback=n.callback,this._once=n.once},t.extend(t.TransportEvent),t.TransportEvent.defaults={once:!1,callback:t.noOp},t.TransportEvent._eventId=0,t.TransportEvent.prototype.invoke=function(t){this.callback&&(this.callback(t),this._once&&this.Transport&&this.Transport.clear(this.id))},t.TransportEvent.prototype.dispose=function(){return t.prototype.dispose.call(this),this.Transport=null,this.callback=null,this.time=null,this},t.TransportEvent}),n(function(t){return t.TransportRepeatEvent=function(e,n){t.TransportEvent.call(this,e,n),n=t.defaultArg(n,t.TransportRepeatEvent.defaults),this.duration=t.Ticks(n.duration),this._interval=t.Ticks(n.interval),this._currentId=-1,this._nextId=-1,this._nextTick=this.time,this._boundRestart=this._restart.bind(this),this.Transport.on(\"start loopStart\",this._boundRestart),this._restart()},t.extend(t.TransportRepeatEvent,t.TransportEvent),t.TransportRepeatEvent.defaults={duration:1/0,interval:1},t.TransportRepeatEvent.prototype.invoke=function(e){this._createEvents(e),t.TransportEvent.prototype.invoke.call(this,e)},t.TransportRepeatEvent.prototype._createEvents=function(e){var n=this.Transport.getTicksAtTime(e);n>=this.time&&n>=this._nextTick&&this._nextTick+this._interval<this.time+this.duration&&(this._nextTick+=this._interval,this._currentId=this._nextId,this._nextId=this.Transport.scheduleOnce(this.invoke.bind(this),t.Ticks(this._nextTick)))},t.TransportRepeatEvent.prototype._restart=function(e){this.Transport.clear(this._currentId),this.Transport.clear(this._nextId),this._nextTick=this.time;var n=this.Transport.getTicksAtTime(e);n>this.time&&(this._nextTick=this.time+Math.ceil((n-this.time)/this._interval)*this._interval),this._currentId=this.Transport.scheduleOnce(this.invoke.bind(this),t.Ticks(this._nextTick)),this._nextTick+=this._interval,this._nextId=this.Transport.scheduleOnce(this.invoke.bind(this),t.Ticks(this._nextTick))},t.TransportRepeatEvent.prototype.dispose=function(){return this.Transport.clear(this._currentId),this.Transport.clear(this._nextId),this.Transport.off(\"start loopStart\",this._boundRestart),this._boundCreateEvents=null,t.TransportEvent.prototype.dispose.call(this),this.duration=null,this._interval=null,this},t.TransportRepeatEvent}),n(function(t){t.Transport=function(){t.Emitter.call(this),t.getContext(function(){this.loop=!1,this._loopStart=0,this._loopEnd=0,this._ppq=e.defaults.PPQ,this._clock=new t.Clock({callback:this._processTick.bind(this),frequency:0}),this._bindClockEvents(),this.bpm=this._clock.frequency,this.bpm._toUnits=this._toUnits.bind(this),this.bpm._fromUnits=this._fromUnits.bind(this),this.bpm.units=t.Type.BPM,this.bpm.value=e.defaults.bpm,this._readOnly(\"bpm\"),this._timeSignature=e.defaults.timeSignature,this._scheduledEvents={},this._timeline=new t.Timeline,this._repeatedEvents=new t.IntervalTimeline,this._syncedSignals=[],this._swingTicks=e.defaults.PPQ/2,this._swingAmount=0}.bind(this))},t.extend(t.Transport,t.Emitter),t.Transport.defaults={bpm:120,swing:0,swingSubdivision:\"8n\",timeSignature:4,loopStart:0,loopEnd:\"4m\",PPQ:192},t.Transport.prototype._processTick=function(e,n){if(this._swingAmount>0&&n%this._ppq!=0&&n%(2*this._swingTicks)!=0){var i=n%(2*this._swingTicks)/(2*this._swingTicks),r=Math.sin(i*Math.PI)*this._swingAmount;e+=t.Ticks(2*this._swingTicks/3).toSeconds()*r}this.loop&&n>=this._loopEnd&&(this.emit(\"loopEnd\",e),this._clock.setTicksAtTime(this._loopStart,e),n=this._loopStart,this.emit(\"loopStart\",e,this._clock.getSecondsAtTime(e)),this.emit(\"loop\",e)),this._timeline.forEachAtTime(n,function(t){t.invoke(e)})},t.Transport.prototype.schedule=function(e,n){var i=new t.TransportEvent(this,{time:t.TransportTime(n),callback:e});return this._addEvent(i,this._timeline)},t.Transport.prototype.scheduleRepeat=function(e,n,i,r){var o=new t.TransportRepeatEvent(this,{callback:e,interval:t.Time(n),time:t.TransportTime(i),duration:t.Time(t.defaultArg(r,1/0))});return this._addEvent(o,this._repeatedEvents)},t.Transport.prototype.scheduleOnce=function(e,n){var i=new t.TransportEvent(this,{time:t.TransportTime(n),callback:e,once:!0});return this._addEvent(i,this._timeline)},t.Transport.prototype.clear=function(t){if(this._scheduledEvents.hasOwnProperty(t)){var e=this._scheduledEvents[t.toString()];e.timeline.remove(e.event),e.event.dispose(),delete this._scheduledEvents[t.toString()]}return this},t.Transport.prototype._addEvent=function(t,e){return this._scheduledEvents[t.id.toString()]={event:t,timeline:e},e.add(t),t.id},t.Transport.prototype.cancel=function(e){return e=t.defaultArg(e,0),e=this.toTicks(e),this._timeline.forEachFrom(e,function(t){this.clear(t.id)}.bind(this)),this._repeatedEvents.forEachFrom(e,function(t){this.clear(t.id)}.bind(this)),this},t.Transport.prototype._bindClockEvents=function(){this._clock.on(\"start\",function(e,n){n=t.Ticks(n).toSeconds(),this.emit(\"start\",e,n)}.bind(this)),this._clock.on(\"stop\",function(t){this.emit(\"stop\",t)}.bind(this)),this._clock.on(\"pause\",function(t){this.emit(\"pause\",t)}.bind(this))},Object.defineProperty(t.Transport.prototype,\"state\",{get:function(){return this._clock.getStateAtTime(this.now())}}),t.Transport.prototype.start=function(e,n){return t.isDefined(n)&&(n=this.toTicks(n)),this._clock.start(e,n),this},t.Transport.prototype.stop=function(t){return this._clock.stop(t),this},t.Transport.prototype.pause=function(t){return this._clock.pause(t),this},t.Transport.prototype.toggle=function(e){return e=this.toSeconds(e),this._clock.getStateAtTime(e)!==t.State.Started?this.start(e):this.stop(e),this},Object.defineProperty(t.Transport.prototype,\"timeSignature\",{get:function(){return this._timeSignature},set:function(e){t.isArray(e)&&(e=e[0]/e[1]*4),this._timeSignature=e}}),Object.defineProperty(t.Transport.prototype,\"loopStart\",{get:function(){return t.Ticks(this._loopStart).toSeconds()},set:function(t){this._loopStart=this.toTicks(t)}}),Object.defineProperty(t.Transport.prototype,\"loopEnd\",{get:function(){return t.Ticks(this._loopEnd).toSeconds()},set:function(t){this._loopEnd=this.toTicks(t)}}),t.Transport.prototype.setLoopPoints=function(t,e){return this.loopStart=t,this.loopEnd=e,this},Object.defineProperty(t.Transport.prototype,\"swing\",{get:function(){return this._swingAmount},set:function(t){this._swingAmount=t}}),Object.defineProperty(t.Transport.prototype,\"swingSubdivision\",{get:function(){return t.Ticks(this._swingTicks).toNotation()},set:function(t){this._swingTicks=this.toTicks(t)}}),Object.defineProperty(t.Transport.prototype,\"position\",{get:function(){var e=this.now(),n=this._clock.getTicksAtTime(e);return t.Ticks(n).toBarsBeatsSixteenths()},set:function(t){var e=this.toTicks(t);this.ticks=e}}),Object.defineProperty(t.Transport.prototype,\"seconds\",{get:function(){return this._clock.seconds},set:function(t){var e=this.now(),n=this.bpm.timeToTicks(t,e);this.ticks=n}}),Object.defineProperty(t.Transport.prototype,\"progress\",{get:function(){if(this.loop){var t=this.now();return(this._clock.getTicksAtTime(t)-this._loopStart)/(this._loopEnd-this._loopStart)}return 0}}),Object.defineProperty(t.Transport.prototype,\"ticks\",{get:function(){return this._clock.ticks},set:function(e){if(this._clock.ticks!==e){var n=this.now();this.state===t.State.Started?(this.emit(\"stop\",n),this._clock.setTicksAtTime(e,n),this.emit(\"start\",n,this.seconds)):this._clock.setTicksAtTime(e,n)}}}),t.Transport.prototype.getTicksAtTime=function(t){return Math.round(this._clock.getTicksAtTime(t))},t.Transport.prototype.getSecondsAtTime=function(t){return this._clock.getSecondsAtTime(t)},Object.defineProperty(t.Transport.prototype,\"PPQ\",{get:function(){return this._ppq},set:function(t){var e=this.bpm.value;this._ppq=t,this.bpm.value=e}}),t.Transport.prototype._fromUnits=function(t){return 1/(60/t/this.PPQ)},t.Transport.prototype._toUnits=function(t){return t/this.PPQ*60},t.Transport.prototype.nextSubdivision=function(e){if(e=this.toTicks(e),this.state!==t.State.Started)return 0;var n=this.now(),i=e-this.getTicksAtTime(n)%e;return this._clock.nextTickTime(i,n)},t.Transport.prototype.syncSignal=function(e,n){if(!n){var i=this.now();n=0!==e.getValueAtTime(i)?e.getValueAtTime(i)/this.bpm.getValueAtTime(i):0}var r=new t.Gain(n);return this.bpm.chain(r,e._param),this._syncedSignals.push({ratio:r,signal:e,initial:e.value}),e.value=0,this},t.Transport.prototype.unsyncSignal=function(t){for(var e=this._syncedSignals.length-1;e>=0;e--){var n=this._syncedSignals[e];n.signal===t&&(n.ratio.dispose(),n.signal.value=n.initial,this._syncedSignals.splice(e,1))}return this},t.Transport.prototype.dispose=function(){return t.Emitter.prototype.dispose.call(this),this._clock.dispose(),this._clock=null,this._writable(\"bpm\"),this.bpm=null,this._timeline.dispose(),this._timeline=null,this._repeatedEvents.dispose(),this._repeatedEvents=null,this};var e=t.Transport;return t.Transport=new e,t.Context.on(\"init\",function(n){n.Transport instanceof e?t.Transport=n.Transport:t.Transport=new e,n.Transport=t.Transport}),t.Context.on(\"close\",function(t){t.Transport instanceof e&&t.Transport.dispose()}),t.Transport}),n(function(t){return t.Volume=function(){var e=t.defaults(arguments,[\"volume\"],t.Volume);t.AudioNode.call(this),this.output=this.input=new t.Gain(e.volume,t.Type.Decibels),this._unmutedVolume=e.volume,this.volume=this.output.gain,this._readOnly(\"volume\"),this.mute=e.mute},t.extend(t.Volume,t.AudioNode),t.Volume.defaults={volume:0,mute:!1},Object.defineProperty(t.Volume.prototype,\"mute\",{get:function(){return this.volume.value===-1/0},set:function(t){!this.mute&&t?(this._unmutedVolume=this.volume.value,this.volume.value=-1/0):this.mute&&!t&&(this.volume.value=this._unmutedVolume)}}),t.Volume.prototype.dispose=function(){return this.input.dispose(),t.AudioNode.prototype.dispose.call(this),this._writable(\"volume\"),this.volume.dispose(),this.volume=null,this},t.Volume}),n(function(t){t.Master=function(){t.AudioNode.call(this),t.getContext(function(){this.createInsOuts(1,0),this._volume=this.output=new t.Volume,this.volume=this._volume.volume,this._readOnly(\"volume\"),this.input.chain(this.output,this.context.destination)}.bind(this))},t.extend(t.Master,t.AudioNode),t.Master.defaults={volume:0,mute:!1},Object.defineProperty(t.Master.prototype,\"mute\",{get:function(){return this._volume.mute},set:function(t){this._volume.mute=t}}),t.Master.prototype.chain=function(){this.input.disconnect(),this.input.chain.apply(this.input,arguments),arguments[arguments.length-1].connect(this.output)},t.Master.prototype.dispose=function(){t.AudioNode.prototype.dispose.call(this),this._writable(\"volume\"),this._volume.dispose(),this._volume=null,this.volume=null},t.AudioNode.prototype.toMaster=function(){return this.connect(t.Master),this},window.AudioNode&&(AudioNode.prototype.toMaster=function(){return this.connect(t.Master),this});var e=t.Master;return t.Master=new e,t.Context.on(\"init\",function(n){n.Master instanceof e?t.Master=n.Master:t.Master=new e,n.Master=t.Master}),t.Context.on(\"close\",function(t){t.Master instanceof e&&t.Master.dispose()}),t.Master}),n(function(t){return t.Source=function(e){e=t.defaultArg(e,t.Source.defaults),t.AudioNode.call(this),this._volume=this.output=new t.Volume(e.volume),this.volume=this._volume.volume,this._readOnly(\"volume\"),this._state=new t.TimelineState(t.State.Stopped),this._state.memory=100,this._synced=!1,this._scheduled=[],this._volume.output.output.channelCount=2,this._volume.output.output.channelCountMode=\"explicit\",this.mute=e.mute},t.extend(t.Source,t.AudioNode),t.Source.defaults={volume:0,mute:!1},Object.defineProperty(t.Source.prototype,\"state\",{get:function(){return this._synced?t.Transport.state===t.State.Started?this._state.getValueAtTime(t.Transport.seconds):t.State.Stopped:this._state.getValueAtTime(this.now())}}),Object.defineProperty(t.Source.prototype,\"mute\",{get:function(){return this._volume.mute},set:function(t){this._volume.mute=t}}),t.Source.prototype._start=t.noOp,t.Source.prototype.restart=t.noOp,t.Source.prototype._stop=t.noOp,t.Source.prototype.start=function(e,n,i){if(e=t.isUndef(e)&&this._synced?t.Transport.seconds:this.toSeconds(e),this._state.getValueAtTime(e)===t.State.Started)this._state.cancel(e),this._state.setStateAtTime(t.State.Started,e),this.restart(e,n,i);else if(this._state.setStateAtTime(t.State.Started,e),this._synced){var r=this._state.get(e);r.offset=t.defaultArg(n,0),r.duration=i;var o=t.Transport.schedule(function(t){this._start(t,n,i)}.bind(this),e);this._scheduled.push(o),t.Transport.state===t.State.Started&&this._syncedStart(this.now(),t.Transport.seconds)}else this._start.apply(this,arguments);return this},t.Source.prototype.stop=function(e){if(e=t.isUndef(e)&&this._synced?t.Transport.seconds:this.toSeconds(e),this._synced){var n=t.Transport.schedule(this._stop.bind(this),e);this._scheduled.push(n)}else this._stop.apply(this,arguments);return this._state.cancel(e),this._state.setStateAtTime(t.State.Stopped,e),this},t.Source.prototype.sync=function(){return this._synced=!0,this._syncedStart=function(e,n){if(n>0){var i=this._state.get(n);if(i&&i.state===t.State.Started&&i.time!==n){var r,o=n-this.toSeconds(i.time);i.duration&&(r=this.toSeconds(i.duration)-o),this._start(e,this.toSeconds(i.offset)+o,r)}}}.bind(this),this._syncedStop=function(e){var n=t.Transport.getSecondsAtTime(Math.max(e-this.sampleTime,0));this._state.getValueAtTime(n)===t.State.Started&&this._stop(e)}.bind(this),t.Transport.on(\"start loopStart\",this._syncedStart),t.Transport.on(\"stop pause loopEnd\",this._syncedStop),this},t.Source.prototype.unsync=function(){this._synced&&(t.Transport.off(\"stop pause loopEnd\",this._syncedStop),t.Transport.off(\"start loopStart\",this._syncedStart)),this._synced=!1;for(var e=0;e<this._scheduled.length;e++){var n=this._scheduled[e];t.Transport.clear(n)}return this._scheduled=[],this._state.cancel(0),this},t.Source.prototype.dispose=function(){t.AudioNode.prototype.dispose.call(this),this.unsync(),this._scheduled=null,this._writable(\"volume\"),this._volume.dispose(),this._volume=null,this.volume=null,this._state.dispose(),this._state=null},t.Source}),n(function(t){t.supported&&(AudioBuffer.prototype.copyToChannel||(AudioBuffer.prototype.copyToChannel=function(t,e,n){var i=this.getChannelData(e);n=n||0;for(var r=0;r<i.length;r++)i[r+n]=t[r]},AudioBuffer.prototype.copyFromChannel=function(t,e,n){var i=this.getChannelData(e);n=n||0;for(var r=0;r<t.length;r++)t[r]=i[r+n]}))}),n(function(t){return t.Buffer=function(){var e=t.defaults(arguments,[\"url\",\"onload\",\"onerror\"],t.Buffer);t.call(this),this._buffer=null,this._reversed=e.reverse,this._xhr=null,this._onload=t.noOp,e.url instanceof AudioBuffer||e.url instanceof t.Buffer?(this.set(e.url),e.onload&&(this.loaded?e.onload(this):this._onload=e.onload)):t.isString(e.url)&&this.load(e.url).then(e.onload).catch(e.onerror)},t.extend(t.Buffer),t.Buffer.defaults={url:void 0,reverse:!1,onload:t.noOp,onerror:t.noOp},t.Buffer.prototype.set=function(e){return e instanceof t.Buffer?e.loaded?this._buffer=e.get():e._onload=function(){this.set(e),this._onload(this)}.bind(this):this._buffer=e,this},t.Buffer.prototype.get=function(){return this._buffer},t.Buffer.prototype.load=function(e,n,i){return new Promise(function(r,o){this._xhr=t.Buffer.load(e,function(t){this._xhr=null,this.set(t),r(this),this._onload(this),n&&n(this)}.bind(this),function(t){this._xhr=null,o(t),i&&i(t)}.bind(this))}.bind(this))},t.Buffer.prototype.dispose=function(){return t.prototype.dispose.call(this),this._buffer=null,this._xhr&&(t.Buffer._removeFromDownloadQueue(this._xhr),this._xhr.abort(),this._xhr=null),this},Object.defineProperty(t.Buffer.prototype,\"loaded\",{get:function(){return this.length>0}}),Object.defineProperty(t.Buffer.prototype,\"duration\",{get:function(){return this._buffer?this._buffer.duration:0}}),Object.defineProperty(t.Buffer.prototype,\"length\",{get:function(){return this._buffer?this._buffer.length:0}}),Object.defineProperty(t.Buffer.prototype,\"numberOfChannels\",{get:function(){return this._buffer?this._buffer.numberOfChannels:0}}),t.Buffer.prototype.fromArray=function(t){var e=t[0].length>0,n=e?t.length:1,i=e?t[0].length:t.length,r=this.context.createBuffer(n,i,this.context.sampleRate);e||1!==n||(t=[t]);for(var o=0;o<n;o++)r.copyToChannel(t[o],o);return this._buffer=r,this},t.Buffer.prototype.toMono=function(e){if(t.isNumber(e))this.fromArray(this.toArray(e));else{for(var n=new Float32Array(this.length),i=this.numberOfChannels,r=0;r<i;r++)for(var o=this.toArray(r),s=0;s<o.length;s++)n[s]+=o[s];n=n.map(function(t){return t/i}),this.fromArray(n)}return this},t.Buffer.prototype.toArray=function(e){if(t.isNumber(e))return this.getChannelData(e);if(1===this.numberOfChannels)return this.toArray(0);for(var n=[],i=0;i<this.numberOfChannels;i++)n[i]=this.getChannelData(i);return n},t.Buffer.prototype.getChannelData=function(t){return this._buffer.getChannelData(t)},t.Buffer.prototype.slice=function(e,n){n=t.defaultArg(n,this.duration);for(var i=Math.floor(this.context.sampleRate*this.toSeconds(e)),r=Math.floor(this.context.sampleRate*this.toSeconds(n)),o=[],s=0;s<this.numberOfChannels;s++)o[s]=this.toArray(s).slice(i,r);return(new t.Buffer).fromArray(o)},t.Buffer.prototype._reverse=function(){if(this.loaded)for(var t=0;t<this.numberOfChannels;t++)Array.prototype.reverse.call(this.getChannelData(t));return this},Object.defineProperty(t.Buffer.prototype,\"reverse\",{get:function(){return this._reversed},set:function(t){this._reversed!==t&&(this._reversed=t,this._reverse())}}),t.Emitter.mixin(t.Buffer),t.Buffer._downloadQueue=[],t.Buffer.baseUrl=\"\",t.Buffer.fromArray=function(e){return(new t.Buffer).fromArray(e)},t.Buffer.fromUrl=function(e){var n=new t.Buffer;return n.load(e).then(function(){return n})},t.Buffer._removeFromDownloadQueue=function(e){var n=t.Buffer._downloadQueue.indexOf(e);-1!==n&&t.Buffer._downloadQueue.splice(n,1)},t.Buffer.load=function(e,n,i){n=t.defaultArg(n,t.noOp);var r=e.match(/\\[(.+\\|?)+\\]$/);if(r){for(var o=r[1].split(\"|\"),s=o[0],a=0;a<o.length;a++)if(t.Buffer.supportsType(o[a])){s=o[a];break}e=e.replace(r[0],s)}function u(e){if(t.Buffer._removeFromDownloadQueue(c),t.Buffer.emit(\"error\",e),!i)throw e;i(e)}function l(){for(var e=0,n=0;n<t.Buffer._downloadQueue.length;n++)e+=t.Buffer._downloadQueue[n].progress;t.Buffer.emit(\"progress\",e/t.Buffer._downloadQueue.length)}var c=new XMLHttpRequest;return c.open(\"GET\",t.Buffer.baseUrl+e,!0),c.responseType=\"arraybuffer\",c.progress=0,t.Buffer._downloadQueue.push(c),c.addEventListener(\"load\",function(){200===c.status?t.context.decodeAudioData(c.response).then(function(e){c.progress=1,l(),n(e),t.Buffer._removeFromDownloadQueue(c),0===t.Buffer._downloadQueue.length&&t.Buffer.emit(\"load\")}).catch(function(){t.Buffer._removeFromDownloadQueue(c),u(\"Tone.Buffer: could not decode audio data: \"+e)}):u(\"Tone.Buffer: could not locate file: \"+e)}),c.addEventListener(\"error\",u),c.addEventListener(\"progress\",function(t){t.lengthComputable&&(c.progress=t.loaded/t.total*.95,l())}),c.send(),c},t.Buffer.cancelDownloads=function(){return t.Buffer._downloadQueue.slice().forEach(function(e){t.Buffer._removeFromDownloadQueue(e),e.abort()}),t.Buffer},t.Buffer.supportsType=function(t){var e=t.split(\".\");return e=e[e.length-1],\"\"!==document.createElement(\"audio\").canPlayType(\"audio/\"+e)},t.loaded=function(){var e,n;function i(){t.Buffer.off(\"load\",e),t.Buffer.off(\"error\",n)}return new Promise(function(i,r){e=function(){i()},n=function(){r()},t.Buffer.on(\"load\",e),t.Buffer.on(\"error\",n)}).then(i).catch(function(t){throw i(),new Error(t)})},t.Buffer}),n(function(t){return t.OscillatorNode=function(){var e=t.defaults(arguments,[\"frequency\",\"type\"],t.OscillatorNode);t.AudioNode.call(this,e),this.onended=e.onended,this._startTime=-1,this._stopTime=-1,this._gainNode=this.output=new t.Gain,this._gainNode.gain.setValueAtTime(0,this.context.currentTime),this._oscillator=this.context.createOscillator(),this._oscillator.connect(this._gainNode),this.type=e.type,this.frequency=new t.Param(this._oscillator.frequency,t.Type.Frequency),this.frequency.value=e.frequency,this.detune=new t.Param(this._oscillator.detune,t.Type.Cents),this.detune.value=e.detune,this._gain=1},t.extend(t.OscillatorNode,t.AudioNode),t.OscillatorNode.defaults={frequency:440,detune:0,type:\"sine\",onended:t.noOp},Object.defineProperty(t.OscillatorNode.prototype,\"state\",{get:function(){return this.getStateAtTime(this.now())}}),t.OscillatorNode.prototype.getStateAtTime=function(e){return e=this.toSeconds(e),-1!==this._startTime&&e>=this._startTime&&(-1===this._stopTime||e<=this._stopTime)?t.State.Started:t.State.Stopped},t.OscillatorNode.prototype.start=function(t){if(-1!==this._startTime)throw new Error(\"cannot call OscillatorNode.start more than once\");this._startTime=this.toSeconds(t),this._oscillator.start(this._startTime);var e=this.context.currentTime;return this._gainNode.gain.cancelScheduledValues(e),this._gainNode.gain.setValueAtTime(0,e),this._gainNode.gain.setValueAtTime(1,this._startTime),this},t.OscillatorNode.prototype.setPeriodicWave=function(t){return this._oscillator.setPeriodicWave(t),this},t.OscillatorNode.prototype.stop=function(t){return this.cancelStop(),this._stopTime=this.toSeconds(t),this._gainNode.gain.setValueAtTime(0,this._stopTime),this.context.clearTimeout(this._timeout),this._timeout=this.context.setTimeout(function(){this._oscillator.stop(this.now()),this.onended()}.bind(this),this._stopTime-this.now()),this},t.OscillatorNode.prototype.cancelStop=function(){return-1!==this._startTime&&(this._gainNode.gain.cancelScheduledValues(this._startTime+this.sampleTime),this._gainNode.gain.setValueAtTime(1,Math.max(this.now(),this._startTime)),this.context.clearTimeout(this._timeout),this._stopTime=-1),this},Object.defineProperty(t.OscillatorNode.prototype,\"type\",{get:function(){return this._oscillator.type},set:function(t){this._oscillator.type=t}}),t.OscillatorNode.prototype.dispose=function(){return this.context.clearTimeout(this._timeout),t.AudioNode.prototype.dispose.call(this),this.onended=null,this._oscillator.disconnect(),this._oscillator=null,this._gainNode.dispose(),this._gainNode=null,this.frequency.dispose(),this.frequency=null,this.detune.dispose(),this.detune=null,this},t.OscillatorNode}),n(function(t){return t.Oscillator=function(){var e=t.defaults(arguments,[\"frequency\",\"type\"],t.Oscillator);t.Source.call(this,e),this._oscillator=null,this.frequency=new t.Signal(e.frequency,t.Type.Frequency),this.detune=new t.Signal(e.detune,t.Type.Cents),this._wave=null,this._partials=t.defaultArg(e.partials,[1]),this._phase=e.phase,this._type=null,this.type=e.type,this.phase=this._phase,this._readOnly([\"frequency\",\"detune\"])},t.extend(t.Oscillator,t.Source),t.Oscillator.defaults={type:\"sine\",frequency:440,detune:0,phase:0,partials:[]},t.Oscillator.Type={Sine:\"sine\",Triangle:\"triangle\",Sawtooth:\"sawtooth\",Square:\"square\",Custom:\"custom\"},t.Oscillator.prototype._start=function(e){this._oscillator=new t.OscillatorNode,this._wave?this._oscillator.setPeriodicWave(this._wave):this._oscillator.type=this._type,this._oscillator.connect(this.output),this.frequency.connect(this._oscillator.frequency),this.detune.connect(this._oscillator.detune),e=this.toSeconds(e),this._oscillator.start(e)},t.Oscillator.prototype._stop=function(t){return this._oscillator&&(t=this.toSeconds(t),this._oscillator.stop(t)),this},t.Oscillator.prototype.restart=function(t){return this._oscillator.cancelStop(),this._state.cancel(this.toSeconds(t)),this},t.Oscillator.prototype.syncFrequency=function(){return t.Transport.syncSignal(this.frequency),this},t.Oscillator.prototype.unsyncFrequency=function(){return t.Transport.unsyncSignal(this.frequency),this},Object.defineProperty(t.Oscillator.prototype,\"type\",{get:function(){return this._type},set:function(e){var n=[t.Oscillator.Type.Sine,t.Oscillator.Type.Square,t.Oscillator.Type.Triangle,t.Oscillator.Type.Sawtooth].includes(e);if(0===this._phase&&n)this._wave=null,null!==this._oscillator&&this._oscillator.type;else{var i=this._getRealImaginary(e,this._phase),r=this.context.createPeriodicWave(i[0],i[1]);this._wave=r,null!==this._oscillator&&this._oscillator.setPeriodicWave(this._wave)}this._type=e}}),t.Oscillator.prototype._getRealImaginary=function(e,n){var i=2048,r=new Float32Array(i),o=new Float32Array(i),s=1;if(e===t.Oscillator.Type.Custom)i=s=this._partials.length+1;else{var a=/^(sine|triangle|square|sawtooth)(\\d+)$/.exec(e);a&&(s=parseInt(a[2])+1,e=a[1],i=s=Math.max(s,2))}for(var u=1;u<i;++u){var l,c=2/(u*Math.PI);switch(e){case t.Oscillator.Type.Sine:l=u<=s?1:0;break;case t.Oscillator.Type.Square:l=1&u?2*c:0;break;case t.Oscillator.Type.Sawtooth:l=c*(1&u?1:-1);break;case t.Oscillator.Type.Triangle:l=1&u?c*c*2*(u-1>>1&1?-1:1):0;break;case t.Oscillator.Type.Custom:l=this._partials[u-1];break;default:throw new TypeError(\"Tone.Oscillator: invalid type: \"+e)}0!==l?(r[u]=-l*Math.sin(n*u),o[u]=l*Math.cos(n*u)):(r[u]=0,o[u]=0)}return[r,o]},t.Oscillator.prototype._inverseFFT=function(t,e,n){for(var i=0,r=t.length,o=0;o<r;o++)i+=t[o]*Math.cos(o*n)+e[o]*Math.sin(o*n);return i},t.Oscillator.prototype._getInitialValue=function(){for(var t=this._getRealImaginary(this._type,0),e=t[0],n=t[1],i=0,r=2*Math.PI,o=0;o<8;o++)i=Math.max(this._inverseFFT(e,n,o/8*r),i);return-this._inverseFFT(e,n,this._phase)/i},Object.defineProperty(t.Oscillator.prototype,\"partials\",{get:function(){return this._type!==t.Oscillator.Type.Custom?[]:this._partials},set:function(e){this._partials=e,this.type=t.Oscillator.Type.Custom}}),Object.defineProperty(t.Oscillator.prototype,\"phase\",{get:function(){return this._phase*(180/Math.PI)},set:function(t){this._phase=t*Math.PI/180,this.type=this._type}}),t.Oscillator.prototype.dispose=function(){return t.Source.prototype.dispose.call(this),null!==this._oscillator&&(this._oscillator.dispose(),this._oscillator=null),this._wave=null,this._writable([\"frequency\",\"detune\"]),this.frequency.dispose(),this.frequency=null,this.detune.dispose(),this.detune=null,this._partials=null,this},t.Oscillator}),n(function(t){return t.AudioToGain=function(){t.SignalBase.call(this),this._norm=this.input=this.output=new t.WaveShaper(function(t){return(t+1)/2})},t.extend(t.AudioToGain,t.SignalBase),t.AudioToGain.prototype.dispose=function(){return t.SignalBase.prototype.dispose.call(this),this._norm.dispose(),this._norm=null,this},t.AudioToGain}),n(function(t){return t.Zero=function(){t.SignalBase.call(this),this._gain=this.input=this.output=new t.Gain,this.context.getConstant(0).connect(this._gain)},t.extend(t.Zero,t.SignalBase),t.Zero.prototype.dispose=function(){return t.SignalBase.prototype.dispose.call(this),this._gain.dispose(),this._gain=null,this},t.Zero}),n(function(t){return t.LFO=function(){var e=t.defaults(arguments,[\"frequency\",\"min\",\"max\"],t.LFO);t.AudioNode.call(this),this._oscillator=new t.Oscillator({frequency:e.frequency,type:e.type}),this.frequency=this._oscillator.frequency,this.amplitude=this._oscillator.volume,this.amplitude.units=t.Type.NormalRange,this.amplitude.value=e.amplitude,this._stoppedSignal=new t.Signal(0,t.Type.AudioRange),this._zeros=new t.Zero,this._stoppedValue=0,this._a2g=new t.AudioToGain,this._scaler=this.output=new t.Scale(e.min,e.max),this._units=t.Type.Default,this.units=e.units,this._oscillator.chain(this._a2g,this._scaler),this._zeros.connect(this._a2g),this._stoppedSignal.connect(this._a2g),this._readOnly([\"amplitude\",\"frequency\"]),this.phase=e.phase},t.extend(t.LFO,t.AudioNode),t.LFO.defaults={type:\"sine\",min:0,max:1,phase:0,frequency:\"4n\",amplitude:1,units:t.Type.Default},t.LFO.prototype.start=function(t){return t=this.toSeconds(t),this._stoppedSignal.setValueAtTime(0,t),this._oscillator.start(t),this},t.LFO.prototype.stop=function(t){return t=this.toSeconds(t),this._stoppedSignal.setValueAtTime(this._stoppedValue,t),this._oscillator.stop(t),this},t.LFO.prototype.sync=function(){return this._oscillator.sync(),this._oscillator.syncFrequency(),this},t.LFO.prototype.unsync=function(){return this._oscillator.unsync(),this._oscillator.unsyncFrequency(),this},Object.defineProperty(t.LFO.prototype,\"min\",{get:function(){return this._toUnits(this._scaler.min)},set:function(t){t=this._fromUnits(t),this._scaler.min=t}}),Object.defineProperty(t.LFO.prototype,\"max\",{get:function(){return this._toUnits(this._scaler.max)},set:function(t){t=this._fromUnits(t),this._scaler.max=t}}),Object.defineProperty(t.LFO.prototype,\"type\",{get:function(){return this._oscillator.type},set:function(t){this._oscillator.type=t,this._stoppedValue=this._oscillator._getInitialValue(),this._stoppedSignal.value=this._stoppedValue}}),Object.defineProperty(t.LFO.prototype,\"phase\",{get:function(){return this._oscillator.phase},set:function(t){this._oscillator.phase=t,this._stoppedValue=this._oscillator._getInitialValue(),this._stoppedSignal.value=this._stoppedValue}}),Object.defineProperty(t.LFO.prototype,\"units\",{get:function(){return this._units},set:function(t){var e=this.min,n=this.max;this._units=t,this.min=e,this.max=n}}),Object.defineProperty(t.LFO.prototype,\"mute\",{get:function(){return this._oscillator.mute},set:function(t){this._oscillator.mute=t}}),Object.defineProperty(t.LFO.prototype,\"state\",{get:function(){return this._oscillator.state}}),t.LFO.prototype.connect=function(e){return e.constructor!==t.Signal&&e.constructor!==t.Param||(this.convert=e.convert,this.units=e.units),t.SignalBase.prototype.connect.apply(this,arguments),this},t.LFO.prototype._fromUnits=t.Param.prototype._fromUnits,t.LFO.prototype._toUnits=t.Param.prototype._toUnits,t.LFO.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._writable([\"amplitude\",\"frequency\"]),this._oscillator.dispose(),this._oscillator=null,this._stoppedSignal.dispose(),this._stoppedSignal=null,this._zeros.dispose(),this._zeros=null,this._scaler.dispose(),this._scaler=null,this._a2g.dispose(),this._a2g=null,this.frequency=null,this.amplitude=null,this},t.LFO}),n(function(t){return t.Limiter=function(){var e=t.defaults(arguments,[\"threshold\"],t.Limiter);t.AudioNode.call(this),this._compressor=this.input=this.output=new t.Compressor({attack:.001,decay:.001,threshold:e.threshold}),this.threshold=this._compressor.threshold,this._readOnly(\"threshold\")},t.extend(t.Limiter,t.AudioNode),t.Limiter.defaults={threshold:-12},t.Limiter.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._compressor.dispose(),this._compressor=null,this._writable(\"threshold\"),this.threshold=null,this},t.Limiter}),n(function(t){return t.LowpassCombFilter=function(){var e=t.defaults(arguments,[\"delayTime\",\"resonance\",\"dampening\"],t.LowpassCombFilter);t.AudioNode.call(this),this.createInsOuts(1,1),this._delay=this.input=new t.Delay(e.delayTime),this.delayTime=this._delay.delayTime,this._lowpass=this.output=this.context.createBiquadFilter(),this._lowpass.Q.value=-3.0102999566398125,this._lowpass.type=\"lowpass\",this.dampening=new t.Param({param:this._lowpass.frequency,units:t.Type.Frequency,value:e.dampening}),this._feedback=new t.Gain(e.resonance,t.Type.NormalRange),this.resonance=this._feedback.gain,this._delay.chain(this._lowpass,this._feedback,this._delay),this._readOnly([\"dampening\",\"resonance\",\"delayTime\"])},t.extend(t.LowpassCombFilter,t.AudioNode),t.LowpassCombFilter.defaults={delayTime:.1,resonance:.5,dampening:3e3},t.LowpassCombFilter.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._writable([\"dampening\",\"resonance\",\"delayTime\"]),this.dampening.dispose(),this.dampening=null,this.resonance.dispose(),this.resonance=null,this._delay.dispose(),this._delay=null,this.delayTime=null,this._lowpass.disconnect(),this._lowpass=null,this._feedback.disconnect(),this._feedback=null,this},t.LowpassCombFilter}),n(function(t){return t.Merge=function(){t.AudioNode.call(this),this.createInsOuts(2,0),this.left=this.input[0]=new t.Gain,this.right=this.input[1]=new t.Gain,this._merger=this.output=this.context.createChannelMerger(2),this.left.connect(this._merger,0,0),this.right.connect(this._merger,0,1),this.left.channelCount=1,this.right.channelCount=1,this.left.channelCountMode=\"explicit\",this.right.channelCountMode=\"explicit\"},t.extend(t.Merge,t.AudioNode),t.Merge.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this.left.dispose(),this.left=null,this.right.dispose(),this.right=null,this._merger.disconnect(),this._merger=null,this},t.Merge}),n(function(t){return t.Meter=function(){var e=t.defaults(arguments,[\"smoothing\"],t.Meter);t.AudioNode.call(this),this.input=this.output=this._analyser=new t.Analyser(\"waveform\",1024),this.smoothing=e.smoothing},t.extend(t.Meter,t.AudioNode),t.Meter.defaults={smoothing:.8},t.Meter.prototype.getLevel=function(){this._analyser.type=\"fft\";var t=this._analyser.getValue();return Math.max.apply(this,t)+28},t.Meter.prototype.getValue=function(){return this._analyser.type=\"waveform\",this._analyser.getValue()[0]},Object.defineProperty(t.Meter.prototype,\"smoothing\",{get:function(){return this._analyser.smoothing},set:function(t){this._analyser.smoothing=t}}),t.Meter.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._analyser.dispose(),this._analyser=null,this},t.Meter}),n(function(t){return t.Split=function(){t.AudioNode.call(this),this.createInsOuts(0,2),this._splitter=this.input=this.context.createChannelSplitter(2),this._splitter.channelCount=2,this._splitter.channelCountMode=\"explicit\",this.left=this.output[0]=new t.Gain,this.right=this.output[1]=new t.Gain,this._splitter.connect(this.left,0,0),this._splitter.connect(this.right,1,0)},t.extend(t.Split,t.AudioNode),t.Split.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._splitter.disconnect(),this.left.dispose(),this.left=null,this.right.dispose(),this.right=null,this._splitter=null,this},t.Split}),n(function(t){return t.MidSideSplit=function(){t.AudioNode.call(this),this.createInsOuts(0,2),this._split=this.input=new t.Split,this._midAdd=new t.Add,this.mid=this.output[0]=new t.Multiply(Math.SQRT1_2),this._sideSubtract=new t.Subtract,this.side=this.output[1]=new t.Multiply(Math.SQRT1_2),this._split.connect(this._midAdd,0,0),this._split.connect(this._midAdd,1,1),this._split.connect(this._sideSubtract,0,0),this._split.connect(this._sideSubtract,1,1),this._midAdd.connect(this.mid),this._sideSubtract.connect(this.side)},t.extend(t.MidSideSplit,t.AudioNode),t.MidSideSplit.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this.mid.dispose(),this.mid=null,this.side.dispose(),this.side=null,this._midAdd.dispose(),this._midAdd=null,this._sideSubtract.dispose(),this._sideSubtract=null,this._split.dispose(),this._split=null,this},t.MidSideSplit}),n(function(t){return t.MidSideMerge=function(){t.AudioNode.call(this),this.createInsOuts(2,0),this.mid=this.input[0]=new t.Gain,this._left=new t.Add,this._timesTwoLeft=new t.Multiply(Math.SQRT1_2),this.side=this.input[1]=new t.Gain,this._right=new t.Subtract,this._timesTwoRight=new t.Multiply(Math.SQRT1_2),this._merge=this.output=new t.Merge,this.mid.connect(this._left,0,0),this.side.connect(this._left,0,1),this.mid.connect(this._right,0,0),this.side.connect(this._right,0,1),this._left.connect(this._timesTwoLeft),this._right.connect(this._timesTwoRight),this._timesTwoLeft.connect(this._merge,0,0),this._timesTwoRight.connect(this._merge,0,1)},t.extend(t.MidSideMerge,t.AudioNode),t.MidSideMerge.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this.mid.dispose(),this.mid=null,this.side.dispose(),this.side=null,this._left.dispose(),this._left=null,this._timesTwoLeft.dispose(),this._timesTwoLeft=null,this._right.dispose(),this._right=null,this._timesTwoRight.dispose(),this._timesTwoRight=null,this._merge.dispose(),this._merge=null,this},t.MidSideMerge}),n(function(t){return t.MidSideCompressor=function(e){t.AudioNode.call(this),e=t.defaultArg(e,t.MidSideCompressor.defaults),this._midSideSplit=this.input=new t.MidSideSplit,this._midSideMerge=this.output=new t.MidSideMerge,this.mid=new t.Compressor(e.mid),this.side=new t.Compressor(e.side),this._midSideSplit.mid.chain(this.mid,this._midSideMerge.mid),this._midSideSplit.side.chain(this.side,this._midSideMerge.side),this._readOnly([\"mid\",\"side\"])},t.extend(t.MidSideCompressor,t.AudioNode),t.MidSideCompressor.defaults={mid:{ratio:3,threshold:-24,release:.03,attack:.02,knee:16},side:{ratio:6,threshold:-30,release:.25,attack:.03,knee:10}},t.MidSideCompressor.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._writable([\"mid\",\"side\"]),this.mid.dispose(),this.mid=null,this.side.dispose(),this.side=null,this._midSideSplit.dispose(),this._midSideSplit=null,this._midSideMerge.dispose(),this._midSideMerge=null,this},t.MidSideCompressor}),n(function(t){return t.Mono=function(){t.AudioNode.call(this),this.createInsOuts(1,0),this._merge=this.output=new t.Merge,this.input.connect(this._merge,0,0),this.input.connect(this._merge,0,1)},t.extend(t.Mono,t.AudioNode),t.Mono.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._merge.dispose(),this._merge=null,this},t.Mono}),n(function(t){return t.MultibandCompressor=function(e){t.AudioNode.call(this),e=t.defaultArg(arguments,t.MultibandCompressor.defaults),this._splitter=this.input=new t.MultibandSplit({lowFrequency:e.lowFrequency,highFrequency:e.highFrequency}),this.lowFrequency=this._splitter.lowFrequency,this.highFrequency=this._splitter.highFrequency,this.output=new t.Gain,this.low=new t.Compressor(e.low),this.mid=new t.Compressor(e.mid),this.high=new t.Compressor(e.high),this._splitter.low.chain(this.low,this.output),this._splitter.mid.chain(this.mid,this.output),this._splitter.high.chain(this.high,this.output),this._readOnly([\"high\",\"mid\",\"low\",\"highFrequency\",\"lowFrequency\"])},t.extend(t.MultibandCompressor,t.AudioNode),t.MultibandCompressor.defaults={low:t.Compressor.defaults,mid:t.Compressor.defaults,high:t.Compressor.defaults,lowFrequency:250,highFrequency:2e3},t.MultibandCompressor.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._splitter.dispose(),this._writable([\"high\",\"mid\",\"low\",\"highFrequency\",\"lowFrequency\"]),this.low.dispose(),this.mid.dispose(),this.high.dispose(),this._splitter=null,this.low=null,this.mid=null,this.high=null,this.lowFrequency=null,this.highFrequency=null,this},t.MultibandCompressor}),n(function(t){if(t.supported&&!window.StereoPannerNode){var e=function(e){this.context=e,this.pan=new t.Signal(0,t.Type.AudioRange);var n=new t.WaveShaper(function(e){return t.equalPowerScale((e+1)/2)},4096),i=new t.WaveShaper(function(e){return t.equalPowerScale(1-(e+1)/2)},4096),r=new t.Gain,o=new t.Gain,s=this.input=new t.Split;(new t.Zero).fan(n,i);var a=this.output=new t.Merge;s.left.chain(r,a.left),s.right.chain(o,a.right),this.pan.chain(i,r.gain),this.pan.chain(n,o.gain)};e.prototype.disconnect=function(){this.output.disconnect.apply(this.output,arguments)},e.prototype.connect=function(){this.output.connect.apply(this.output,arguments)},AudioContext.prototype.createStereoPanner=function(){return new e(this)},t.Context.prototype.createStereoPanner=function(){return new e(this)}}}),n(function(t){return t.Panner=function(e){t.AudioNode.call(this),this._panner=this.input=this.output=this.context.createStereoPanner(),this.pan=this._panner.pan,this.pan.value=t.defaultArg(e,0),this._readOnly(\"pan\")},t.extend(t.Panner,t.AudioNode),t.Panner.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._writable(\"pan\"),this._panner.disconnect(),this._panner=null,this.pan=null,this},t.Panner}),n(function(t){return t.Panner3D=function(){var e=t.defaults(arguments,[\"positionX\",\"positionY\",\"positionZ\"],t.Panner3D);t.AudioNode.call(this),this._panner=this.input=this.output=this.context.createPanner(),this._panner.panningModel=e.panningModel,this._panner.maxDistance=e.maxDistance,this._panner.distanceModel=e.distanceModel,this._panner.coneOuterGain=e.coneOuterGain,this._panner.coneOuterAngle=e.coneOuterAngle,this._panner.coneInnerAngle=e.coneInnerAngle,this._panner.refDistance=e.refDistance,this._panner.rolloffFactor=e.rolloffFactor,this._orientation=[e.orientationX,e.orientationY,e.orientationZ],this._position=[e.positionX,e.positionY,e.positionZ],this.orientationX=e.orientationX,this.orientationY=e.orientationY,this.orientationZ=e.orientationZ,this.positionX=e.positionX,this.positionY=e.positionY,this.positionZ=e.positionZ},t.extend(t.Panner3D,t.AudioNode),t.Panner3D.defaults={positionX:0,positionY:0,positionZ:0,orientationX:0,orientationY:0,orientationZ:0,panningModel:\"equalpower\",maxDistance:1e4,distanceModel:\"inverse\",coneOuterGain:0,coneOuterAngle:360,coneInnerAngle:360,refDistance:1,rolloffFactor:1},t.Panner3D.prototype._rampTimeConstant=.01,t.Panner3D.prototype.setPosition=function(t,e,n){if(this._panner.positionX){var i=this.now();this._panner.positionX.setTargetAtTime(t,i,this._rampTimeConstant),this._panner.positionY.setTargetAtTime(e,i,this._rampTimeConstant),this._panner.positionZ.setTargetAtTime(n,i,this._rampTimeConstant)}else this._panner.setPosition(t,e,n);return this._position=Array.prototype.slice.call(arguments),this},t.Panner3D.prototype.setOrientation=function(t,e,n){if(this._panner.orientationX){var i=this.now();this._panner.orientationX.setTargetAtTime(t,i,this._rampTimeConstant),this._panner.orientationY.setTargetAtTime(e,i,this._rampTimeConstant),this._panner.orientationZ.setTargetAtTime(n,i,this._rampTimeConstant)}else this._panner.setOrientation(t,e,n);return this._orientation=Array.prototype.slice.call(arguments),this},Object.defineProperty(t.Panner3D.prototype,\"positionX\",{set:function(t){this._position[0]=t,this.setPosition.apply(this,this._position)},get:function(){return this._position[0]}}),Object.defineProperty(t.Panner3D.prototype,\"positionY\",{set:function(t){this._position[1]=t,this.setPosition.apply(this,this._position)},get:function(){return this._position[1]}}),Object.defineProperty(t.Panner3D.prototype,\"positionZ\",{set:function(t){this._position[2]=t,this.setPosition.apply(this,this._position)},get:function(){return this._position[2]}}),Object.defineProperty(t.Panner3D.prototype,\"orientationX\",{set:function(t){this._orientation[0]=t,this.setOrientation.apply(this,this._orientation)},get:function(){return this._orientation[0]}}),Object.defineProperty(t.Panner3D.prototype,\"orientationY\",{set:function(t){this._orientation[1]=t,this.setOrientation.apply(this,this._orientation)},get:function(){return this._orientation[1]}}),Object.defineProperty(t.Panner3D.prototype,\"orientationZ\",{set:function(t){this._orientation[2]=t,this.setOrientation.apply(this,this._orientation)},get:function(){return this._orientation[2]}}),t.Panner3D._aliasProperty=function(e){Object.defineProperty(t.Panner3D.prototype,e,{set:function(t){this._panner[e]=t},get:function(){return this._panner[e]}})},t.Panner3D._aliasProperty(\"panningModel\"),t.Panner3D._aliasProperty(\"refDistance\"),t.Panner3D._aliasProperty(\"rolloffFactor\"),t.Panner3D._aliasProperty(\"distanceModel\"),t.Panner3D._aliasProperty(\"coneInnerAngle\"),t.Panner3D._aliasProperty(\"coneOuterAngle\"),t.Panner3D._aliasProperty(\"coneOuterGain\"),t.Panner3D._aliasProperty(\"maxDistance\"),t.Panner3D.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._panner.disconnect(),this._panner=null,this._orientation=null,this._position=null,this},t.Panner3D}),n(function(t){return t.PanVol=function(){var e=t.defaults(arguments,[\"pan\",\"volume\"],t.PanVol);t.AudioNode.call(this),this._panner=this.input=new t.Panner(e.pan),this.pan=this._panner.pan,this._volume=this.output=new t.Volume(e.volume),this.volume=this._volume.volume,this._panner.connect(this._volume),this.mute=e.mute,this._readOnly([\"pan\",\"volume\"])},t.extend(t.PanVol,t.AudioNode),t.PanVol.defaults={pan:0,volume:0,mute:!1},Object.defineProperty(t.PanVol.prototype,\"mute\",{get:function(){return this._volume.mute},set:function(t){this._volume.mute=t}}),t.PanVol.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._writable([\"pan\",\"volume\"]),this._panner.dispose(),this._panner=null,this.pan=null,this._volume.dispose(),this._volume=null,this.volume=null,this},t.PanVol}),n(function(t){return t.Solo=function(){var e=t.defaults(arguments,[\"solo\"],t.Solo);t.AudioNode.call(this),this.input=this.output=new t.Gain,this._soloBind=this._soloed.bind(this),this.context.on(\"solo\",this._soloBind),this.solo=e.solo},t.extend(t.Solo,t.AudioNode),t.Solo.defaults={solo:!1},Object.defineProperty(t.Solo.prototype,\"solo\",{get:function(){return this._isSoloed()},set:function(t){t?this._addSolo():this._removeSolo(),this.context.emit(\"solo\",this)}}),Object.defineProperty(t.Solo.prototype,\"muted\",{get:function(){return 0===this.input.gain.value}}),t.Solo.prototype._addSolo=function(){t.isArray(this.context._currentSolo)||(this.context._currentSolo=[]),this._isSoloed()||this.context._currentSolo.push(this)},t.Solo.prototype._removeSolo=function(){if(this._isSoloed()){var t=this.context._currentSolo.indexOf(this);this.context._currentSolo.splice(t,1)}},t.Solo.prototype._isSoloed=function(){return!!t.isArray(this.context._currentSolo)&&0!==this.context._currentSolo.length&&-1!==this.context._currentSolo.indexOf(this)},t.Solo.prototype._noSolos=function(){return!t.isArray(this.context._currentSolo)||0===this.context._currentSolo.length},t.Solo.prototype._soloed=function(){this._isSoloed()?this.input.gain.value=1:this._noSolos()?this.input.gain.value=1:this.input.gain.value=0},t.Solo.prototype.dispose=function(){return this.context.off(\"solo\",this._soloBind),this._removeSolo(),this._soloBind=null,t.AudioNode.prototype.dispose.call(this),this},t.Solo}),n(function(t){return t.Waveform=function(){var e=t.defaults(arguments,[\"size\"],t.Waveform);e.type=t.Analyser.Type.Waveform,t.AudioNode.call(this),this._analyser=this.input=this.output=new t.Analyser(e)},t.extend(t.Waveform,t.AudioNode),t.Waveform.defaults={size:1024},t.Waveform.prototype.getValue=function(){return this._analyser.getValue()},Object.defineProperty(t.Waveform.prototype,\"size\",{get:function(){return this._analyser.size},set:function(t){this._analyser.size=t}}),t.Waveform.prototype.dispose=function(){t.AudioNode.prototype.dispose.call(this),this._analyser.dispose(),this._analyser=null},t.Waveform}),n(function(t){return t.CtrlInterpolate=function(){var e=t.defaults(arguments,[\"values\",\"index\"],t.CtrlInterpolate);t.call(this),this.values=e.values,this.index=e.index},t.extend(t.CtrlInterpolate),t.CtrlInterpolate.defaults={index:0,values:[]},Object.defineProperty(t.CtrlInterpolate.prototype,\"value\",{get:function(){var t=this.index;t=Math.min(t,this.values.length-1);var e=Math.floor(t),n=this.values[e],i=this.values[Math.ceil(t)];return this._interpolate(t-e,n,i)}}),t.CtrlInterpolate.prototype._interpolate=function(e,n,i){if(t.isArray(n)){for(var r=[],o=0;o<n.length;o++)r[o]=this._interpolate(e,n[o],i[o]);return r}if(t.isObject(n)){var s={};for(var a in n)s[a]=this._interpolate(e,n[a],i[a]);return s}return(1-e)*(n=this._toNumber(n))+e*(i=this._toNumber(i))},t.CtrlInterpolate.prototype._toNumber=function(e){return t.isNumber(e)?e:this.toSeconds(e)},t.CtrlInterpolate.prototype.dispose=function(){this.values=null},t.CtrlInterpolate}),n(function(t){return t.CtrlMarkov=function(e,n){t.call(this),this.values=t.defaultArg(e,{}),this.value=t.defaultArg(n,Object.keys(this.values)[0])},t.extend(t.CtrlMarkov),t.CtrlMarkov.prototype.next=function(){if(this.values.hasOwnProperty(this.value)){var e=this.values[this.value];if(t.isArray(e))for(var n=this._getProbDistribution(e),i=Math.random(),r=0,o=0;o<n.length;o++){var s=n[o];if(i>r&&i<r+s){var a=e[o];t.isObject(a)?this.value=a.value:this.value=a}r+=s}else this.value=e}return this.value},t.CtrlMarkov.prototype._getProbDistribution=function(e){for(var n=[],i=0,r=!1,o=0;o<e.length;o++){var s=e[o];t.isObject(s)?(r=!0,n[o]=s.probability):n[o]=1/e.length,i+=n[o]}if(r)for(var a=0;a<n.length;a++)n[a]=n[a]/i;return n},t.CtrlMarkov.prototype.dispose=function(){this.values=null},t.CtrlMarkov}),n(function(t){return t.CtrlPattern=function(){var e=t.defaults(arguments,[\"values\",\"type\"],t.CtrlPattern);t.call(this),this.values=e.values,this.index=0,this._type=null,this._shuffled=null,this._direction=null,this.type=e.type},t.extend(t.CtrlPattern),t.CtrlPattern.Type={Up:\"up\",Down:\"down\",UpDown:\"upDown\",DownUp:\"downUp\",AlternateUp:\"alternateUp\",AlternateDown:\"alternateDown\",Random:\"random\",RandomWalk:\"randomWalk\",RandomOnce:\"randomOnce\"},t.CtrlPattern.defaults={type:t.CtrlPattern.Type.Up,values:[]},Object.defineProperty(t.CtrlPattern.prototype,\"value\",{get:function(){if(0!==this.values.length){if(1===this.values.length)return this.values[0];this.index=Math.min(this.index,this.values.length-1);var e=this.values[this.index];return this.type===t.CtrlPattern.Type.RandomOnce&&(this.values.length!==this._shuffled.length&&this._shuffleValues(),e=this.values[this._shuffled[this.index]]),e}}}),Object.defineProperty(t.CtrlPattern.prototype,\"type\",{get:function(){return this._type},set:function(e){this._type=e,this._shuffled=null,this._type===t.CtrlPattern.Type.Up||this._type===t.CtrlPattern.Type.UpDown||this._type===t.CtrlPattern.Type.RandomOnce||this._type===t.CtrlPattern.Type.AlternateUp?this.index=0:this._type!==t.CtrlPattern.Type.Down&&this._type!==t.CtrlPattern.Type.DownUp&&this._type!==t.CtrlPattern.Type.AlternateDown||(this.index=this.values.length-1),this._type===t.CtrlPattern.Type.UpDown||this._type===t.CtrlPattern.Type.AlternateUp?this._direction=t.CtrlPattern.Type.Up:this._type!==t.CtrlPattern.Type.DownUp&&this._type!==t.CtrlPattern.Type.AlternateDown||(this._direction=t.CtrlPattern.Type.Down),this._type===t.CtrlPattern.Type.RandomOnce?this._shuffleValues():this._type===t.CtrlPattern.Random&&(this.index=Math.floor(Math.random()*this.values.length))}}),t.CtrlPattern.prototype.next=function(){var e=this.type;return e===t.CtrlPattern.Type.Up?(this.index++,this.index>=this.values.length&&(this.index=0)):e===t.CtrlPattern.Type.Down?(this.index--,this.index<0&&(this.index=this.values.length-1)):e===t.CtrlPattern.Type.UpDown||e===t.CtrlPattern.Type.DownUp?(this._direction===t.CtrlPattern.Type.Up?this.index++:this.index--,this.index<0?(this.index=1,this._direction=t.CtrlPattern.Type.Up):this.index>=this.values.length&&(this.index=this.values.length-2,this._direction=t.CtrlPattern.Type.Down)):e===t.CtrlPattern.Type.Random?this.index=Math.floor(Math.random()*this.values.length):e===t.CtrlPattern.Type.RandomWalk?Math.random()<.5?(this.index--,this.index=Math.max(this.index,0)):(this.index++,this.index=Math.min(this.index,this.values.length-1)):e===t.CtrlPattern.Type.RandomOnce?(this.index++,this.index>=this.values.length&&(this.index=0,this._shuffleValues())):e===t.CtrlPattern.Type.AlternateUp?(this._direction===t.CtrlPattern.Type.Up?(this.index+=2,this._direction=t.CtrlPattern.Type.Down):(this.index-=1,this._direction=t.CtrlPattern.Type.Up),this.index>=this.values.length&&(this.index=0,this._direction=t.CtrlPattern.Type.Up)):e===t.CtrlPattern.Type.AlternateDown&&(this._direction===t.CtrlPattern.Type.Up?(this.index+=1,this._direction=t.CtrlPattern.Type.Down):(this.index-=2,this._direction=t.CtrlPattern.Type.Up),this.index<0&&(this.index=this.values.length-1,this._direction=t.CtrlPattern.Type.Down)),this.value},t.CtrlPattern.prototype._shuffleValues=function(){var t=[];this._shuffled=[];for(var e=0;e<this.values.length;e++)t[e]=e;for(;t.length>0;){var n=t.splice(Math.floor(t.length*Math.random()),1);this._shuffled.push(n[0])}},t.CtrlPattern.prototype.dispose=function(){this._shuffled=null,this.values=null},t.CtrlPattern}),n(function(t){return t.CtrlRandom=function(){var e=t.defaults(arguments,[\"min\",\"max\"],t.CtrlRandom);t.call(this),this.min=e.min,this.max=e.max,this.integer=e.integer},t.extend(t.CtrlRandom),t.CtrlRandom.defaults={min:0,max:1,integer:!1},Object.defineProperty(t.CtrlRandom.prototype,\"value\",{get:function(){var t=this.toSeconds(this.min),e=this.toSeconds(this.max),n=Math.random(),i=n*t+(1-n)*e;return this.integer&&(i=Math.floor(i)),i}}),t.CtrlRandom}),n(function(t){return t.Buffers=function(e){var n=Array.prototype.slice.call(arguments);n.shift();var i=t.defaults(n,[\"onload\",\"baseUrl\"],t.Buffers);for(var r in t.call(this),this._buffers={},this.baseUrl=i.baseUrl,this._loadingCount=0,e)this._loadingCount++,this.add(r,e[r],this._bufferLoaded.bind(this,i.onload))},t.extend(t.Buffers),t.Buffers.defaults={onload:t.noOp,baseUrl:\"\"},t.Buffers.prototype.has=function(t){return this._buffers.hasOwnProperty(t)},t.Buffers.prototype.get=function(t){if(this.has(t))return this._buffers[t];throw new Error(\"Tone.Buffers: no buffer named \"+t)},t.Buffers.prototype._bufferLoaded=function(t){this._loadingCount--,0===this._loadingCount&&t&&t(this)},Object.defineProperty(t.Buffers.prototype,\"loaded\",{get:function(){var t=!0;for(var e in this._buffers){var n=this.get(e);t=t&&n.loaded}return t}}),t.Buffers.prototype.add=function(e,n,i){return i=t.defaultArg(i,t.noOp),n instanceof t.Buffer?(this._buffers[e]=n,i(this)):n instanceof AudioBuffer?(this._buffers[e]=new t.Buffer(n),i(this)):t.isString(n)&&(this._buffers[e]=new t.Buffer(this.baseUrl+n,i)),this},t.Buffers.prototype.dispose=function(){for(var e in t.prototype.dispose.call(this),this._buffers)this._buffers[e].dispose();return this._buffers=null,this},t.Buffers}),n(function(t){var e={};return t.prototype.send=function(n,i){e.hasOwnProperty(n)||(e[n]=this.context.createGain()),i=t.defaultArg(i,0);var r=new t.Gain(i,t.Type.Decibels);return this.connect(r),r.connect(e[n]),r},t.prototype.receive=function(t,n){return e.hasOwnProperty(t)||(e[t]=this.context.createGain()),e[t].connect(this,0,n),this},t.Context.on(\"init\",function(t){t.Buses?e=t.Buses:(e={},t.Buses=e)}),t}),n(function(t){return t.Draw=function(){t.call(this),this._events=new t.Timeline,this.expiration=.25,this.anticipation=.008,this._boundDrawLoop=this._drawLoop.bind(this)},t.extend(t.Draw),t.Draw.prototype.schedule=function(t,e){return this._events.add({callback:t,time:this.toSeconds(e)}),1===this._events.length&&requestAnimationFrame(this._boundDrawLoop),this},t.Draw.prototype.cancel=function(t){return this._events.cancel(this.toSeconds(t)),this},t.Draw.prototype._drawLoop=function(){for(var e=t.now();this._events.length&&this._events.peek().time-this.anticipation<=e;){var n=this._events.shift();e-n.time<=this.expiration&&n.callback()}this._events.length>0&&requestAnimationFrame(this._boundDrawLoop)},t.Draw=new t.Draw,t.Draw}),n(function(t){t.Listener=function(){t.call(this),this._orientation=[0,0,0,0,0,0],this._position=[0,0,0],t.getContext(function(){this.set(e.defaults)}.bind(this))},t.extend(t.Listener),t.Listener.defaults={positionX:0,positionY:0,positionZ:0,forwardX:0,forwardY:0,forwardZ:1,upX:0,upY:1,upZ:0},t.Listener.prototype._rampTimeConstant=.01,t.Listener.prototype.setPosition=function(t,e,n){if(this.context.listener.positionX){var i=this.now();this.context.listener.positionX.setTargetAtTime(t,i,this._rampTimeConstant),this.context.listener.positionY.setTargetAtTime(e,i,this._rampTimeConstant),this.context.listener.positionZ.setTargetAtTime(n,i,this._rampTimeConstant)}else this.context.listener.setPosition(t,e,n);return this._position=Array.prototype.slice.call(arguments),this},t.Listener.prototype.setOrientation=function(t,e,n,i,r,o){if(this.context.listener.forwardX){var s=this.now();this.context.listener.forwardX.setTargetAtTime(t,s,this._rampTimeConstant),this.context.listener.forwardY.setTargetAtTime(e,s,this._rampTimeConstant),this.context.listener.forwardZ.setTargetAtTime(n,s,this._rampTimeConstant),this.context.listener.upX.setTargetAtTime(i,s,this._rampTimeConstant),this.context.listener.upY.setTargetAtTime(r,s,this._rampTimeConstant),this.context.listener.upZ.setTargetAtTime(o,s,this._rampTimeConstant)}else this.context.listener.setOrientation(t,e,n,i,r,o);return this._orientation=Array.prototype.slice.call(arguments),this},Object.defineProperty(t.Listener.prototype,\"positionX\",{set:function(t){this._position[0]=t,this.setPosition.apply(this,this._position)},get:function(){return this._position[0]}}),Object.defineProperty(t.Listener.prototype,\"positionY\",{set:function(t){this._position[1]=t,this.setPosition.apply(this,this._position)},get:function(){return this._position[1]}}),Object.defineProperty(t.Listener.prototype,\"positionZ\",{set:function(t){this._position[2]=t,this.setPosition.apply(this,this._position)},get:function(){return this._position[2]}}),Object.defineProperty(t.Listener.prototype,\"forwardX\",{set:function(t){this._orientation[0]=t,this.setOrientation.apply(this,this._orientation)},get:function(){return this._orientation[0]}}),Object.defineProperty(t.Listener.prototype,\"forwardY\",{set:function(t){this._orientation[1]=t,this.setOrientation.apply(this,this._orientation)},get:function(){return this._orientation[1]}}),Object.defineProperty(t.Listener.prototype,\"forwardZ\",{set:function(t){this._orientation[2]=t,this.setOrientation.apply(this,this._orientation)},get:function(){return this._orientation[2]}}),Object.defineProperty(t.Listener.prototype,\"upX\",{set:function(t){this._orientation[3]=t,this.setOrientation.apply(this,this._orientation)},get:function(){return this._orientation[3]}}),Object.defineProperty(t.Listener.prototype,\"upY\",{set:function(t){this._orientation[4]=t,this.setOrientation.apply(this,this._orientation)},get:function(){return this._orientation[4]}}),Object.defineProperty(t.Listener.prototype,\"upZ\",{set:function(t){this._orientation[5]=t,this.setOrientation.apply(this,this._orientation)},get:function(){return this._orientation[5]}}),t.Listener.prototype.dispose=function(){return this._orientation=null,this._position=null,this};var e=t.Listener;return t.Listener=new e,t.Context.on(\"init\",function(n){n.Listener instanceof e?t.Listener=n.Listener:t.Listener=new e,n.Listener=t.Listener}),t.Listener}),n(function(t){return t.Offline=function(e,n){var i,r=t.context.sampleRate,o=t.context,s=function e(n,i,r,o){o=t.defaultArg(o,0);var s=new t.OfflineContext(2,i,r);t.context=s;var a=n(t.Transport);return s.currentTime>0&&o<1e3?e(n,i,r,++o):{response:a,context:s}}(e,n,r),a=s.response,u=s.context;return i=a instanceof Promise?a.then(function(){return u.render()}):u.render(),t.context=o,i.then(function(e){return new t.Buffer(e)})},t.Offline}),n(function(t){return t.Effect=function(){var e=t.defaults(arguments,[\"wet\"],t.Effect);t.AudioNode.call(this),this.createInsOuts(1,1),this._dryWet=new t.CrossFade(e.wet),this.wet=this._dryWet.fade,this.effectSend=new t.Gain,this.effectReturn=new t.Gain,this.input.connect(this._dryWet.a),this.input.connect(this.effectSend),this.effectReturn.connect(this._dryWet.b),this._dryWet.connect(this.output),this._readOnly([\"wet\"])},t.extend(t.Effect,t.AudioNode),t.Effect.defaults={wet:1},t.Effect.prototype.connectEffect=function(t){return this.effectSend.chain(t,this.effectReturn),this},t.Effect.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._dryWet.dispose(),this._dryWet=null,this.effectSend.dispose(),this.effectSend=null,this.effectReturn.dispose(),this.effectReturn=null,this._writable([\"wet\"]),this.wet=null,this},t.Effect}),n(function(t){return t.AutoFilter=function(){var e=t.defaults(arguments,[\"frequency\",\"baseFrequency\",\"octaves\"],t.AutoFilter);t.Effect.call(this,e),this._lfo=new t.LFO({frequency:e.frequency,amplitude:e.depth}),this.depth=this._lfo.amplitude,this.frequency=this._lfo.frequency,this.filter=new t.Filter(e.filter),this._octaves=0,this.connectEffect(this.filter),this._lfo.connect(this.filter.frequency),this.type=e.type,this._readOnly([\"frequency\",\"depth\"]),this.octaves=e.octaves,this.baseFrequency=e.baseFrequency},t.extend(t.AutoFilter,t.Effect),t.AutoFilter.defaults={frequency:1,type:\"sine\",depth:1,baseFrequency:200,octaves:2.6,filter:{type:\"lowpass\",rolloff:-12,Q:1}},t.AutoFilter.prototype.start=function(t){return this._lfo.start(t),this},t.AutoFilter.prototype.stop=function(t){return this._lfo.stop(t),this},t.AutoFilter.prototype.sync=function(t){return this._lfo.sync(t),this},t.AutoFilter.prototype.unsync=function(){return this._lfo.unsync(),this},Object.defineProperty(t.AutoFilter.prototype,\"type\",{get:function(){return this._lfo.type},set:function(t){this._lfo.type=t}}),Object.defineProperty(t.AutoFilter.prototype,\"baseFrequency\",{get:function(){return this._lfo.min},set:function(t){this._lfo.min=this.toFrequency(t),this.octaves=this._octaves}}),Object.defineProperty(t.AutoFilter.prototype,\"octaves\",{get:function(){return this._octaves},set:function(t){this._octaves=t,this._lfo.max=this.baseFrequency*Math.pow(2,t)}}),t.AutoFilter.prototype.dispose=function(){return t.Effect.prototype.dispose.call(this),this._lfo.dispose(),this._lfo=null,this.filter.dispose(),this.filter=null,this._writable([\"frequency\",\"depth\"]),this.frequency=null,this.depth=null,this},t.AutoFilter}),n(function(t){return t.AutoPanner=function(){var e=t.defaults(arguments,[\"frequency\"],t.AutoPanner);t.Effect.call(this,e),this._lfo=new t.LFO({frequency:e.frequency,amplitude:e.depth,min:-1,max:1}),this.depth=this._lfo.amplitude,this._panner=new t.Panner,this.frequency=this._lfo.frequency,this.connectEffect(this._panner),this._lfo.connect(this._panner.pan),this.type=e.type,this._readOnly([\"depth\",\"frequency\"])},t.extend(t.AutoPanner,t.Effect),t.AutoPanner.defaults={frequency:1,type:\"sine\",depth:1},t.AutoPanner.prototype.start=function(t){return this._lfo.start(t),this},t.AutoPanner.prototype.stop=function(t){return this._lfo.stop(t),this},t.AutoPanner.prototype.sync=function(t){return this._lfo.sync(t),this},t.AutoPanner.prototype.unsync=function(){return this._lfo.unsync(),this},Object.defineProperty(t.AutoPanner.prototype,\"type\",{get:function(){return this._lfo.type},set:function(t){this._lfo.type=t}}),t.AutoPanner.prototype.dispose=function(){return t.Effect.prototype.dispose.call(this),this._lfo.dispose(),this._lfo=null,this._panner.dispose(),this._panner=null,this._writable([\"depth\",\"frequency\"]),this.frequency=null,this.depth=null,this},t.AutoPanner}),n(function(t){return t.AutoWah=function(){var e=t.defaults(arguments,[\"baseFrequency\",\"octaves\",\"sensitivity\"],t.AutoWah);t.Effect.call(this,e),this.follower=new t.Follower(e.follower),this._sweepRange=new t.ScaleExp(0,1,.5),this._baseFrequency=e.baseFrequency,this._octaves=e.octaves,this._inputBoost=new t.Gain,this._bandpass=new t.Filter({rolloff:-48,frequency:0,Q:e.Q}),this._peaking=new t.Filter(0,\"peaking\"),this._peaking.gain.value=e.gain,this.gain=this._peaking.gain,this.Q=this._bandpass.Q,this.effectSend.chain(this._inputBoost,this.follower,this._sweepRange),this._sweepRange.connect(this._bandpass.frequency),this._sweepRange.connect(this._peaking.frequency),this.effectSend.chain(this._bandpass,this._peaking,this.effectReturn),this._setSweepRange(),this.sensitivity=e.sensitivity,this._readOnly([\"gain\",\"Q\"])},t.extend(t.AutoWah,t.Effect),t.AutoWah.defaults={baseFrequency:100,octaves:6,sensitivity:0,Q:2,gain:2,follower:{attack:.3,release:.5}},Object.defineProperty(t.AutoWah.prototype,\"octaves\",{get:function(){return this._octaves},set:function(t){this._octaves=t,this._setSweepRange()}}),Object.defineProperty(t.AutoWah.prototype,\"baseFrequency\",{get:function(){return this._baseFrequency},set:function(t){this._baseFrequency=t,this._setSweepRange()}}),Object.defineProperty(t.AutoWah.prototype,\"sensitivity\",{get:function(){return t.gainToDb(1/this._inputBoost.gain.value)},set:function(e){this._inputBoost.gain.value=1/t.dbToGain(e)}}),t.AutoWah.prototype._setSweepRange=function(){this._sweepRange.min=this._baseFrequency,this._sweepRange.max=Math.min(this._baseFrequency*Math.pow(2,this._octaves),this.context.sampleRate/2)},t.AutoWah.prototype.dispose=function(){return t.Effect.prototype.dispose.call(this),this.follower.dispose(),this.follower=null,this._sweepRange.dispose(),this._sweepRange=null,this._bandpass.dispose(),this._bandpass=null,this._peaking.dispose(),this._peaking=null,this._inputBoost.dispose(),this._inputBoost=null,this._writable([\"gain\",\"Q\"]),this.gain=null,this.Q=null,this},t.AutoWah}),n(function(t){return t.Modulo=function(e){t.SignalBase.call(this),this.createInsOuts(1,0),this._shaper=new t.WaveShaper(Math.pow(2,16)),this._multiply=new t.Multiply,this._subtract=this.output=new t.Subtract,this._modSignal=new t.Signal(e),this.input.fan(this._shaper,this._subtract),this._modSignal.connect(this._multiply,0,0),this._shaper.connect(this._multiply,0,1),this._multiply.connect(this._subtract,0,1),this._setWaveShaper(e)},t.extend(t.Modulo,t.SignalBase),t.Modulo.prototype._setWaveShaper=function(t){this._shaper.setMap(function(e){return Math.floor((e+1e-4)/t)})},Object.defineProperty(t.Modulo.prototype,\"value\",{get:function(){return this._modSignal.value},set:function(t){this._modSignal.value=t,this._setWaveShaper(t)}}),t.Modulo.prototype.dispose=function(){return t.SignalBase.prototype.dispose.call(this),this._shaper.dispose(),this._shaper=null,this._multiply.dispose(),this._multiply=null,this._subtract.dispose(),this._subtract=null,this._modSignal.dispose(),this._modSignal=null,this},t.Modulo}),n(function(t){return t.BitCrusher=function(){var e=t.defaults(arguments,[\"bits\"],t.BitCrusher);t.Effect.call(this,e);var n=1/Math.pow(2,e.bits-1);this._subtract=new t.Subtract,this._modulo=new t.Modulo(n),this._bits=e.bits,this.effectSend.fan(this._subtract,this._modulo),this._modulo.connect(this._subtract,0,1),this._subtract.connect(this.effectReturn)},t.extend(t.BitCrusher,t.Effect),t.BitCrusher.defaults={bits:4},Object.defineProperty(t.BitCrusher.prototype,\"bits\",{get:function(){return this._bits},set:function(t){this._bits=t;var e=1/Math.pow(2,t-1);this._modulo.value=e}}),t.BitCrusher.prototype.dispose=function(){return t.Effect.prototype.dispose.call(this),this._subtract.dispose(),this._subtract=null,this._modulo.dispose(),this._modulo=null,this},t.BitCrusher}),n(function(t){return t.Chebyshev=function(){var e=t.defaults(arguments,[\"order\"],t.Chebyshev);t.Effect.call(this,e),this._shaper=new t.WaveShaper(4096),this._order=e.order,this.connectEffect(this._shaper),this.order=e.order,this.oversample=e.oversample},t.extend(t.Chebyshev,t.Effect),t.Chebyshev.defaults={order:1,oversample:\"none\"},t.Chebyshev.prototype._getCoefficient=function(t,e,n){return n.hasOwnProperty(e)?n[e]:(n[e]=0===e?0:1===e?t:2*t*this._getCoefficient(t,e-1,n)-this._getCoefficient(t,e-2,n),n[e])},Object.defineProperty(t.Chebyshev.prototype,\"order\",{get:function(){return this._order},set:function(t){this._order=t;for(var e=new Array(4096),n=e.length,i=0;i<n;++i){var r=2*i/n-1;e[i]=0===r?0:this._getCoefficient(r,t,{})}this._shaper.curve=e}}),Object.defineProperty(t.Chebyshev.prototype,\"oversample\",{get:function(){return this._shaper.oversample},set:function(t){this._shaper.oversample=t}}),t.Chebyshev.prototype.dispose=function(){return t.Effect.prototype.dispose.call(this),this._shaper.dispose(),this._shaper=null,this},t.Chebyshev}),n(function(t){return t.StereoEffect=function(){t.AudioNode.call(this);var e=t.defaults(arguments,[\"wet\"],t.Effect);this.createInsOuts(1,1),this._dryWet=new t.CrossFade(e.wet),this.wet=this._dryWet.fade,this._split=new t.Split,this.effectSendL=this._split.left,this.effectSendR=this._split.right,this._merge=new t.Merge,this.effectReturnL=this._merge.left,this.effectReturnR=this._merge.right,this.input.connect(this._split),this.input.connect(this._dryWet,0,0),this._merge.connect(this._dryWet,0,1),this._dryWet.connect(this.output),this._readOnly([\"wet\"])},t.extend(t.StereoEffect,t.Effect),t.StereoEffect.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._dryWet.dispose(),this._dryWet=null,this._split.dispose(),this._split=null,this._merge.dispose(),this._merge=null,this.effectSendL=null,this.effectSendR=null,this.effectReturnL=null,this.effectReturnR=null,this._writable([\"wet\"]),this.wet=null,this},t.StereoEffect}),n(function(t){return t.Chorus=function(){var e=t.defaults(arguments,[\"frequency\",\"delayTime\",\"depth\"],t.Chorus);t.StereoEffect.call(this,e),this._depth=e.depth,this._delayTime=e.delayTime/1e3,this._lfoL=new t.LFO({frequency:e.frequency,min:0,max:1}),this._lfoR=new t.LFO({frequency:e.frequency,min:0,max:1,phase:180}),this._delayNodeL=new t.Delay,this._delayNodeR=new t.Delay,this.frequency=this._lfoL.frequency,this.effectSendL.chain(this._delayNodeL,this.effectReturnL),this.effectSendR.chain(this._delayNodeR,this.effectReturnR),this.effectSendL.connect(this.effectReturnL),this.effectSendR.connect(this.effectReturnR),this._lfoL.connect(this._delayNodeL.delayTime),this._lfoR.connect(this._delayNodeR.delayTime),this._lfoL.start(),this._lfoR.start(),this._lfoL.frequency.connect(this._lfoR.frequency),this.depth=this._depth,this.frequency.value=e.frequency,this.type=e.type,this._readOnly([\"frequency\"]),this.spread=e.spread},t.extend(t.Chorus,t.StereoEffect),t.Chorus.defaults={frequency:1.5,delayTime:3.5,depth:.7,type:\"sine\",spread:180},Object.defineProperty(t.Chorus.prototype,\"depth\",{get:function(){return this._depth},set:function(t){this._depth=t;var e=this._delayTime*t;this._lfoL.min=Math.max(this._delayTime-e,0),this._lfoL.max=this._delayTime+e,this._lfoR.min=Math.max(this._delayTime-e,0),this._lfoR.max=this._delayTime+e}}),Object.defineProperty(t.Chorus.prototype,\"delayTime\",{get:function(){return 1e3*this._delayTime},set:function(t){this._delayTime=t/1e3,this.depth=this._depth}}),Object.defineProperty(t.Chorus.prototype,\"type\",{get:function(){return this._lfoL.type},set:function(t){this._lfoL.type=t,this._lfoR.type=t}}),Object.defineProperty(t.Chorus.prototype,\"spread\",{get:function(){return this._lfoR.phase-this._lfoL.phase},set:function(t){this._lfoL.phase=90-t/2,this._lfoR.phase=t/2+90}}),t.Chorus.prototype.dispose=function(){return t.StereoEffect.prototype.dispose.call(this),this._lfoL.dispose(),this._lfoL=null,this._lfoR.dispose(),this._lfoR=null,this._delayNodeL.dispose(),this._delayNodeL=null,this._delayNodeR.dispose(),this._delayNodeR=null,this._writable(\"frequency\"),this.frequency=null,this},t.Chorus}),n(function(t){return t.Convolver=function(){var e=t.defaults(arguments,[\"url\",\"onload\"],t.Convolver);t.Effect.call(this,e),this._convolver=this.context.createConvolver(),this._buffer=new t.Buffer(e.url,function(t){this._convolver.buffer=t.get(),e.onload()}.bind(this)),this.connectEffect(this._convolver)},t.extend(t.Convolver,t.Effect),t.Convolver.defaults={onload:t.noOp},Object.defineProperty(t.Convolver.prototype,\"buffer\",{get:function(){return this._buffer.get()},set:function(t){this._buffer.set(t),this._convolver.buffer=this._buffer.get()}}),t.Convolver.prototype.load=function(t,e){return this._buffer.load(t,function(t){this.buffer=t,e&&e()}.bind(this))},t.Convolver.prototype.dispose=function(){return t.Effect.prototype.dispose.call(this),this._convolver.disconnect(),this._convolver=null,this._buffer.dispose(),this._buffer=null,this},t.Convolver}),n(function(t){return t.Distortion=function(){var e=t.defaults(arguments,[\"distortion\"],t.Distortion);t.Effect.call(this,e),this._shaper=new t.WaveShaper(4096),this._distortion=e.distortion,this.connectEffect(this._shaper),this.distortion=e.distortion,this.oversample=e.oversample},t.extend(t.Distortion,t.Effect),t.Distortion.defaults={distortion:.4,oversample:\"none\"},Object.defineProperty(t.Distortion.prototype,\"distortion\",{get:function(){return this._distortion},set:function(t){this._distortion=t;var e=100*t,n=Math.PI/180;this._shaper.setMap(function(t){return Math.abs(t)<.001?0:(3+e)*t*20*n/(Math.PI+e*Math.abs(t))})}}),Object.defineProperty(t.Distortion.prototype,\"oversample\",{get:function(){return this._shaper.oversample},set:function(t){this._shaper.oversample=t}}),t.Distortion.prototype.dispose=function(){return t.Effect.prototype.dispose.call(this),this._shaper.dispose(),this._shaper=null,this},t.Distortion}),n(function(t){return t.FeedbackEffect=function(){var e=t.defaults(arguments,[\"feedback\"],t.FeedbackEffect);t.Effect.call(this,e),this._feedbackGain=new t.Gain(e.feedback,t.Type.NormalRange),this.feedback=this._feedbackGain.gain,this.effectReturn.chain(this._feedbackGain,this.effectSend),this._readOnly([\"feedback\"])},t.extend(t.FeedbackEffect,t.Effect),t.FeedbackEffect.defaults={feedback:.125},t.FeedbackEffect.prototype.dispose=function(){return t.Effect.prototype.dispose.call(this),this._writable([\"feedback\"]),this._feedbackGain.dispose(),this._feedbackGain=null,this.feedback=null,this},t.FeedbackEffect}),n(function(t){return t.FeedbackDelay=function(){var e=t.defaults(arguments,[\"delayTime\",\"feedback\"],t.FeedbackDelay);t.FeedbackEffect.call(this,e),this._delayNode=new t.Delay(e.delayTime,e.maxDelay),this.delayTime=this._delayNode.delayTime,this.connectEffect(this._delayNode),this._readOnly([\"delayTime\"])},t.extend(t.FeedbackDelay,t.FeedbackEffect),t.FeedbackDelay.defaults={delayTime:.25,maxDelay:1},t.FeedbackDelay.prototype.dispose=function(){return t.FeedbackEffect.prototype.dispose.call(this),this._delayNode.dispose(),this._delayNode=null,this._writable([\"delayTime\"]),this.delayTime=null,this},t.FeedbackDelay}),n(function(t){var e=[1557/44100,1617/44100,1491/44100,1422/44100,1277/44100,1356/44100,1188/44100,1116/44100],n=[225,556,441,341];return t.Freeverb=function(){var i=t.defaults(arguments,[\"roomSize\",\"dampening\"],t.Freeverb);t.StereoEffect.call(this,i),this.roomSize=new t.Signal(i.roomSize,t.Type.NormalRange),this.dampening=new t.Signal(i.dampening,t.Type.Frequency),this._combFilters=[],this._allpassFiltersL=[],this._allpassFiltersR=[];for(var r=0;r<n.length;r++){var o=this.context.createBiquadFilter();o.type=\"allpass\",o.frequency.value=n[r],this._allpassFiltersL.push(o)}for(var s=0;s<n.length;s++){var a=this.context.createBiquadFilter();a.type=\"allpass\",a.frequency.value=n[s],this._allpassFiltersR.push(a)}for(var u=0;u<e.length;u++){var l=new t.LowpassCombFilter(e[u]);u<e.length/2?this.effectSendL.chain(l,this._allpassFiltersL[0]):this.effectSendR.chain(l,this._allpassFiltersR[0]),this.roomSize.connect(l.resonance),this.dampening.connect(l.dampening),this._combFilters.push(l)}t.connectSeries.apply(t,this._allpassFiltersL),t.connectSeries.apply(t,this._allpassFiltersR),this._allpassFiltersL[this._allpassFiltersL.length-1].connect(this.effectReturnL),this._allpassFiltersR[this._allpassFiltersR.length-1].connect(this.effectReturnR),this._readOnly([\"roomSize\",\"dampening\"])},t.extend(t.Freeverb,t.StereoEffect),t.Freeverb.defaults={roomSize:.7,dampening:3e3},t.Freeverb.prototype.dispose=function(){t.StereoEffect.prototype.dispose.call(this);for(var e=0;e<this._allpassFiltersL.length;e++)this._allpassFiltersL[e].disconnect(),this._allpassFiltersL[e]=null;this._allpassFiltersL=null;for(var n=0;n<this._allpassFiltersR.length;n++)this._allpassFiltersR[n].disconnect(),this._allpassFiltersR[n]=null;this._allpassFiltersR=null;for(var i=0;i<this._combFilters.length;i++)this._combFilters[i].dispose(),this._combFilters[i]=null;return this._combFilters=null,this._writable([\"roomSize\",\"dampening\"]),this.roomSize.dispose(),this.roomSize=null,this.dampening.dispose(),this.dampening=null,this},t.Freeverb}),n(function(t){var e=[.06748,.06404,.08212,.09004],n=[.773,.802,.753,.733],i=[347,113,37];return t.JCReverb=function(){var r=t.defaults(arguments,[\"roomSize\"],t.JCReverb);t.StereoEffect.call(this,r),this.roomSize=new t.Signal(r.roomSize,t.Type.NormalRange),this._scaleRoomSize=new t.Scale(-.733,.197),this._allpassFilters=[],this._feedbackCombFilters=[];for(var o=0;o<i.length;o++){var s=this.context.createBiquadFilter();s.type=\"allpass\",s.frequency.value=i[o],this._allpassFilters.push(s)}for(var a=0;a<e.length;a++){var u=new t.FeedbackCombFilter(e[a],.1);this._scaleRoomSize.connect(u.resonance),u.resonance.value=n[a],this._allpassFilters[this._allpassFilters.length-1].connect(u),a<e.length/2?u.connect(this.effectReturnL):u.connect(this.effectReturnR),this._feedbackCombFilters.push(u)}this.roomSize.connect(this._scaleRoomSize),t.connectSeries.apply(t,this._allpassFilters),this.effectSendL.connect(this._allpassFilters[0]),this.effectSendR.connect(this._allpassFilters[0]),this._readOnly([\"roomSize\"])},t.extend(t.JCReverb,t.StereoEffect),t.JCReverb.defaults={roomSize:.5},t.JCReverb.prototype.dispose=function(){t.StereoEffect.prototype.dispose.call(this);for(var e=0;e<this._allpassFilters.length;e++)this._allpassFilters[e].disconnect(),this._allpassFilters[e]=null;this._allpassFilters=null;for(var n=0;n<this._feedbackCombFilters.length;n++)this._feedbackCombFilters[n].dispose(),this._feedbackCombFilters[n]=null;return this._feedbackCombFilters=null,this._writable([\"roomSize\"]),this.roomSize.dispose(),this.roomSize=null,this._scaleRoomSize.dispose(),this._scaleRoomSize=null,this},t.JCReverb}),n(function(t){return t.MidSideEffect=function(){t.Effect.apply(this,arguments),this._midSideSplit=new t.MidSideSplit,this._midSideMerge=new t.MidSideMerge,this.midSend=this._midSideSplit.mid,this.sideSend=this._midSideSplit.side,this.midReturn=this._midSideMerge.mid,this.sideReturn=this._midSideMerge.side,this.effectSend.connect(this._midSideSplit),this._midSideMerge.connect(this.effectReturn)},t.extend(t.MidSideEffect,t.Effect),t.MidSideEffect.prototype.dispose=function(){return t.Effect.prototype.dispose.call(this),this._midSideSplit.dispose(),this._midSideSplit=null,this._midSideMerge.dispose(),this._midSideMerge=null,this.midSend=null,this.sideSend=null,this.midReturn=null,this.sideReturn=null,this},t.MidSideEffect}),n(function(t){return t.Phaser=function(){var e=t.defaults(arguments,[\"frequency\",\"octaves\",\"baseFrequency\"],t.Phaser);t.StereoEffect.call(this,e),this._lfoL=new t.LFO(e.frequency,0,1),this._lfoR=new t.LFO(e.frequency,0,1),this._lfoR.phase=180,this._baseFrequency=e.baseFrequency,this._octaves=e.octaves,this.Q=new t.Signal(e.Q,t.Type.Positive),this._filtersL=this._makeFilters(e.stages,this._lfoL,this.Q),this._filtersR=this._makeFilters(e.stages,this._lfoR,this.Q),this.frequency=this._lfoL.frequency,this.frequency.value=e.frequency,this.effectSendL.connect(this._filtersL[0]),this.effectSendR.connect(this._filtersR[0]),this._filtersL[e.stages-1].connect(this.effectReturnL),this._filtersR[e.stages-1].connect(this.effectReturnR),this._lfoL.frequency.connect(this._lfoR.frequency),this.baseFrequency=e.baseFrequency,this.octaves=e.octaves,this._lfoL.start(),this._lfoR.start(),this._readOnly([\"frequency\",\"Q\"])},t.extend(t.Phaser,t.StereoEffect),t.Phaser.defaults={frequency:.5,octaves:3,stages:10,Q:10,baseFrequency:350},t.Phaser.prototype._makeFilters=function(e,n,i){for(var r=new Array(e),o=0;o<e;o++){var s=this.context.createBiquadFilter();s.type=\"allpass\",i.connect(s.Q),n.connect(s.frequency),r[o]=s}return t.connectSeries.apply(t,r),r},Object.defineProperty(t.Phaser.prototype,\"octaves\",{get:function(){return this._octaves},set:function(t){this._octaves=t;var e=this._baseFrequency*Math.pow(2,t);this._lfoL.max=e,this._lfoR.max=e}}),Object.defineProperty(t.Phaser.prototype,\"baseFrequency\",{get:function(){return this._baseFrequency},set:function(t){this._baseFrequency=t,this._lfoL.min=t,this._lfoR.min=t,this.octaves=this._octaves}}),t.Phaser.prototype.dispose=function(){t.StereoEffect.prototype.dispose.call(this),this._writable([\"frequency\",\"Q\"]),this.Q.dispose(),this.Q=null,this._lfoL.dispose(),this._lfoL=null,this._lfoR.dispose(),this._lfoR=null;for(var e=0;e<this._filtersL.length;e++)this._filtersL[e].disconnect(),this._filtersL[e]=null;this._filtersL=null;for(var n=0;n<this._filtersR.length;n++)this._filtersR[n].disconnect(),this._filtersR[n]=null;return this._filtersR=null,this.frequency=null,this},t.Phaser}),n(function(t){return t.StereoXFeedbackEffect=function(){var e=t.defaults(arguments,[\"feedback\"],t.FeedbackEffect);t.StereoEffect.call(this,e),this.feedback=new t.Signal(e.feedback,t.Type.NormalRange),this._feedbackLR=new t.Gain,this._feedbackRL=new t.Gain,this.effectReturnL.chain(this._feedbackLR,this.effectSendR),this.effectReturnR.chain(this._feedbackRL,this.effectSendL),this.feedback.fan(this._feedbackLR.gain,this._feedbackRL.gain),this._readOnly([\"feedback\"])},t.extend(t.StereoXFeedbackEffect,t.StereoEffect),t.StereoXFeedbackEffect.prototype.dispose=function(){return t.StereoEffect.prototype.dispose.call(this),this._writable([\"feedback\"]),this.feedback.dispose(),this.feedback=null,this._feedbackLR.dispose(),this._feedbackLR=null,this._feedbackRL.dispose(),this._feedbackRL=null,this},t.StereoXFeedbackEffect}),n(function(t){return t.PingPongDelay=function(){var e=t.defaults(arguments,[\"delayTime\",\"feedback\"],t.PingPongDelay);t.StereoXFeedbackEffect.call(this,e),this._leftDelay=new t.Delay(0,e.maxDelayTime),this._rightDelay=new t.Delay(0,e.maxDelayTime),this._rightPreDelay=new t.Delay(0,e.maxDelayTime),this.delayTime=new t.Signal(e.delayTime,t.Type.Time),this.effectSendL.chain(this._leftDelay,this.effectReturnL),this.effectSendR.chain(this._rightPreDelay,this._rightDelay,this.effectReturnR),this.delayTime.fan(this._leftDelay.delayTime,this._rightDelay.delayTime,this._rightPreDelay.delayTime),this._feedbackLR.disconnect(),this._feedbackLR.connect(this._rightDelay),this._readOnly([\"delayTime\"])},t.extend(t.PingPongDelay,t.StereoXFeedbackEffect),t.PingPongDelay.defaults={delayTime:.25,maxDelayTime:1},t.PingPongDelay.prototype.dispose=function(){return t.StereoXFeedbackEffect.prototype.dispose.call(this),this._leftDelay.dispose(),this._leftDelay=null,this._rightDelay.dispose(),this._rightDelay=null,this._rightPreDelay.dispose(),this._rightPreDelay=null,this._writable([\"delayTime\"]),this.delayTime.dispose(),this.delayTime=null,this},t.PingPongDelay}),n(function(t){return t.PitchShift=function(){var e=t.defaults(arguments,[\"pitch\"],t.PitchShift);t.FeedbackEffect.call(this,e),this._frequency=new t.Signal(0),this._delayA=new t.Delay(0,1),this._lfoA=new t.LFO({min:0,max:.1,type:\"sawtooth\"}).connect(this._delayA.delayTime),this._delayB=new t.Delay(0,1),this._lfoB=new t.LFO({min:0,max:.1,type:\"sawtooth\",phase:180}).connect(this._delayB.delayTime),this._crossFade=new t.CrossFade,this._crossFadeLFO=new t.LFO({min:0,max:1,type:\"triangle\",phase:90}).connect(this._crossFade.fade),this._feedbackDelay=new t.Delay(e.delayTime),this.delayTime=this._feedbackDelay.delayTime,this._readOnly(\"delayTime\"),this._pitch=e.pitch,this._windowSize=e.windowSize,this._delayA.connect(this._crossFade.a),this._delayB.connect(this._crossFade.b),this._frequency.fan(this._lfoA.frequency,this._lfoB.frequency,this._crossFadeLFO.frequency),this.effectSend.fan(this._delayA,this._delayB),this._crossFade.chain(this._feedbackDelay,this.effectReturn);var n=this.now();this._lfoA.start(n),this._lfoB.start(n),this._crossFadeLFO.start(n),this.windowSize=this._windowSize},t.extend(t.PitchShift,t.FeedbackEffect),t.PitchShift.defaults={pitch:0,windowSize:.1,delayTime:0,feedback:0},Object.defineProperty(t.PitchShift.prototype,\"pitch\",{get:function(){return this._pitch},set:function(e){this._pitch=e;var n=0;e<0?(this._lfoA.min=0,this._lfoA.max=this._windowSize,this._lfoB.min=0,this._lfoB.max=this._windowSize,n=t.intervalToFrequencyRatio(e-1)+1):(this._lfoA.min=this._windowSize,this._lfoA.max=0,this._lfoB.min=this._windowSize,this._lfoB.max=0,n=t.intervalToFrequencyRatio(e)-1),this._frequency.value=n*(1.2/this._windowSize)}}),Object.defineProperty(t.PitchShift.prototype,\"windowSize\",{get:function(){return this._windowSize},set:function(t){this._windowSize=this.toSeconds(t),this.pitch=this._pitch}}),t.PitchShift.prototype.dispose=function(){return t.FeedbackEffect.prototype.dispose.call(this),this._frequency.dispose(),this._frequency=null,this._delayA.disconnect(),this._delayA=null,this._delayB.disconnect(),this._delayB=null,this._lfoA.dispose(),this._lfoA=null,this._lfoB.dispose(),this._lfoB=null,this._crossFade.dispose(),this._crossFade=null,this._crossFadeLFO.dispose(),this._crossFadeLFO=null,this._writable(\"delayTime\"),this._feedbackDelay.dispose(),this._feedbackDelay=null,this.delayTime=null,this},t.PitchShift}),n(function(t){return t.BufferSource=function(){var e=t.defaults(arguments,[\"buffer\",\"onload\"],t.BufferSource);t.AudioNode.call(this,e),this.onended=e.onended,this._startTime=-1,this._sourceStarted=!1,this._sourceStopped=!1,this._stopTime=-1,this._gainNode=this.output=new t.Gain,this._source=this.context.createBufferSource(),this._source.connect(this._gainNode),this._source.onended=this._onended.bind(this),this._buffer=new t.Buffer(e.buffer,e.onload),this.playbackRate=new t.Param(this._source.playbackRate,t.Type.Positive),this.fadeIn=e.fadeIn,this.fadeOut=e.fadeOut,this.curve=e.curve,this._gain=1,this._onendedTimeout=-1,this.loop=e.loop,this.loopStart=e.loopStart,this.loopEnd=e.loopEnd,this.playbackRate.value=e.playbackRate},t.extend(t.BufferSource,t.AudioNode),t.BufferSource.defaults={onended:t.noOp,onload:t.noOp,loop:!1,loopStart:0,loopEnd:0,fadeIn:0,fadeOut:0,curve:\"linear\",playbackRate:1},Object.defineProperty(t.BufferSource.prototype,\"state\",{get:function(){return this.getStateAtTime(this.now())}}),t.BufferSource.prototype.getStateAtTime=function(e){return e=this.toSeconds(e),-1!==this._startTime&&e>=this._startTime&&!this._sourceStopped?t.State.Started:t.State.Stopped},t.BufferSource.prototype.start=function(e,n,i,r,o){if(-1!==this._startTime)throw new Error(\"Tone.BufferSource can only be started once.\");if(!this.buffer.loaded)throw new Error(\"Tone.BufferSource: buffer is either not set or not loaded.\");e=this.toSeconds(e),n=this.loop?t.defaultArg(n,this.loopStart):t.defaultArg(n,0),n=this.toSeconds(n),r=t.defaultArg(r,1),this._gain=r,o=this.toSeconds(t.defaultArg(o,this.fadeIn)),this.fadeIn=o,o>0?(this._gainNode.gain.setValueAtTime(0,e),\"linear\"===this.curve?this._gainNode.gain.linearRampToValueAtTime(this._gain,e+o):this._gainNode.gain.exponentialApproachValueAtTime(this._gain,e,o)):this._gainNode.gain.setValueAtTime(r,e),this._startTime=e;var s=this.toSeconds(t.defaultArg(i,this.buffer.duration-n%this.buffer.duration));if(s=Math.max(s,0),t.isDefined(i)&&(this.loop||(s=Math.min(s,this.buffer.duration-n%this.buffer.duration)),this.stop(e+s,this.fadeOut)),this.loop){var a=this.loopEnd||this.buffer.duration,u=this.loopStart;n>=a&&(n=(n-u)%(a-u)+u)}return this._source.buffer=this.buffer.get(),this._source.loopEnd=this.loopEnd||this.buffer.duration,n<this.buffer.duration&&(this._sourceStarted=!0,this._source.start(e,n)),this},t.BufferSource.prototype.stop=function(e,n){if(!this.buffer.loaded)throw new Error(\"Tone.BufferSource: buffer is either not set or not loaded.\");if(!this._sourceStopped){if(e=this.toSeconds(e),-1!==this._stopTime&&this.cancelStop(),e<=this._startTime)return this._gainNode.gain.cancelScheduledValues(e),this._gainNode.gain.value=0,this;e=Math.max(this._startTime+this.fadeIn+this.sampleTime,e),this._gainNode.gain.cancelScheduledValues(e),this._stopTime=e,n=this.toSeconds(t.defaultArg(n,this.fadeOut));var i=e-this._startTime-this.fadeIn-this.sampleTime;this.loop||(i=Math.min(i,this.buffer.duration));var r=e-(n=Math.min(i,n));return n>this.sampleTime?(this._gainNode.gain.setValueAtTime(this._gain,r),\"linear\"===this.curve?this._gainNode.gain.linearRampToValueAtTime(0,e):this._gainNode.gain.exponentialApproachValueAtTime(0,r,n)):this._gainNode.gain.setValueAtTime(0,e),t.context.clearTimeout(this._onendedTimeout),this._onendedTimeout=t.context.setTimeout(this._onended.bind(this),this._stopTime-this.now()),this}},t.BufferSource.prototype.cancelStop=function(){if(-1!==this._startTime&&!this._sourceStopped){var t=this.toSeconds(this.fadeIn);this._gainNode.gain.cancelScheduledValues(this._startTime+t+this.sampleTime),this._gainNode.gain.setValueAtTime(1,Math.max(this.now(),this._startTime+t+this.sampleTime)),this.context.clearTimeout(this._onendedTimeout),this._stopTime=-1}return this},t.BufferSource.prototype._onended=function(){if(!this._sourceStopped){this._sourceStopped=!0;var t=\"exponential\"===this.curve?2*this.fadeOut:0;this._sourceStarted&&-1!==this._stopTime&&this._source.stop(this._stopTime+t),this.onended(this)}},Object.defineProperty(t.BufferSource.prototype,\"loopStart\",{get:function(){return this._source.loopStart},set:function(t){this._source.loopStart=this.toSeconds(t)}}),Object.defineProperty(t.BufferSource.prototype,\"loopEnd\",{get:function(){return this._source.loopEnd},set:function(t){this._source.loopEnd=this.toSeconds(t)}}),Object.defineProperty(t.BufferSource.prototype,\"buffer\",{get:function(){return this._buffer},set:function(t){this._buffer.set(t)}}),Object.defineProperty(t.BufferSource.prototype,\"loop\",{get:function(){return this._source.loop},set:function(t){this._source.loop=t,this.cancelStop()}}),t.BufferSource.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this.onended=null,this._source.onended=null,this._source.disconnect(),this._source=null,this._gainNode.dispose(),this._gainNode=null,this._buffer.dispose(),this._buffer=null,this._startTime=-1,this.playbackRate=null,t.context.clearTimeout(this._onendedTimeout),this},t.BufferSource}),n(function(t){t.Noise=function(){var e=t.defaults(arguments,[\"type\"],t.Noise);t.Source.call(this,e),this._source=null,this._type=e.type,this._playbackRate=e.playbackRate},t.extend(t.Noise,t.Source),t.Noise.defaults={type:\"white\",playbackRate:1},Object.defineProperty(t.Noise.prototype,\"type\",{get:function(){return this._type},set:function(e){if(this._type!==e){if(!(e in n))throw new TypeError(\"Tone.Noise: invalid type: \"+e);if(this._type=e,this.state===t.State.Started){var i=this.now();this._stop(i),this._start(i)}}}}),Object.defineProperty(t.Noise.prototype,\"playbackRate\",{get:function(){return this._playbackRate},set:function(t){this._playbackRate=t,this._source&&(this._source.playbackRate.value=t)}}),t.Noise.prototype._start=function(e){var i=n[this._type];this._source=new t.BufferSource(i).connect(this.output),this._source.loop=!0,this._source.playbackRate.value=this._playbackRate,this._source.start(this.toSeconds(e),Math.random()*(i.duration-.001))},t.Noise.prototype._stop=function(t){this._source&&(this._source.stop(this.toSeconds(t)),this._source=null)},t.Noise.prototype.restart=function(t){this._stop(t),this._start(t)},t.Noise.prototype.dispose=function(){return t.Source.prototype.dispose.call(this),null!==this._source&&(this._source.disconnect(),this._source=null),this._buffer=null,this};var e={pink:function(){for(var t=[],e=0;e<2;e++){var n,i,r,o,s,a,u,l=new Float32Array(220500);t[e]=l,n=i=r=o=s=a=u=0;for(var c=0;c<220500;c++){var h=2*Math.random()-1;n=.99886*n+.0555179*h,i=.99332*i+.0750759*h,r=.969*r+.153852*h,o=.8665*o+.3104856*h,s=.55*s+.5329522*h,a=-.7616*a-.016898*h,l[c]=n+i+r+o+s+a+u+.5362*h,l[c]*=.11,u=.115926*h}}return t}(),brown:function(){for(var t=[],e=0;e<2;e++){var n=new Float32Array(220500);t[e]=n;for(var i=0,r=0;r<220500;r++){var o=2*Math.random()-1;n[r]=(i+.02*o)/1.02,i=n[r],n[r]*=3.5}}return t}(),white:function(){for(var t=[],e=0;e<2;e++){var n=new Float32Array(220500);t[e]=n;for(var i=0;i<220500;i++)n[i]=2*Math.random()-1}return t}()},n={};function i(){for(var i in e)n[i]=(new t.Buffer).fromArray(e[i])}return t.getContext(i),t.Context.on(\"init\",i),t.Noise}),n(function(t){return t.Reverb=function(){var e=t.defaults(arguments,[\"decay\"],t.Reverb);t.Effect.call(this,e),this._convolver=this.context.createConvolver(),this.decay=e.decay,this.preDelay=e.preDelay,this.connectEffect(this._convolver)},t.extend(t.Reverb,t.Effect),t.Reverb.defaults={decay:1.5,preDelay:.01},t.Reverb.prototype.generate=function(){return t.Offline(function(){var e=new t.Noise,n=new t.Noise,i=new t.Merge;e.connect(i.left),n.connect(i.right);var r=(new t.Gain).toMaster();i.connect(r),e.start(0),n.start(0),r.gain.setValueAtTime(0,0),r.gain.linearRampToValueAtTime(1,this.preDelay),r.gain.exponentialApproachValueAtTime(0,this.preDelay,this.decay-this.preDelay)}.bind(this),this.decay).then(function(t){return this._convolver.buffer=t.get(),this}.bind(this))},t.Reverb.prototype.dispose=function(){return t.Effect.prototype.dispose.call(this),this._convolver.disconnect(),this._convolver=null,this},t.Reverb}),n(function(t){return t.StereoFeedbackEffect=function(){var e=t.defaults(arguments,[\"feedback\"],t.FeedbackEffect);t.StereoEffect.call(this,e),this.feedback=new t.Signal(e.feedback,t.Type.NormalRange),this._feedbackL=new t.Gain,this._feedbackR=new t.Gain,this.effectReturnL.chain(this._feedbackL,this.effectSendL),this.effectReturnR.chain(this._feedbackR,this.effectSendR),this.feedback.fan(this._feedbackL.gain,this._feedbackR.gain),this._readOnly([\"feedback\"])},t.extend(t.StereoFeedbackEffect,t.StereoEffect),t.StereoFeedbackEffect.prototype.dispose=function(){return t.StereoEffect.prototype.dispose.call(this),this._writable([\"feedback\"]),this.feedback.dispose(),this.feedback=null,this._feedbackL.dispose(),this._feedbackL=null,this._feedbackR.dispose(),this._feedbackR=null,this},t.StereoFeedbackEffect}),n(function(t){return t.StereoWidener=function(){var e=t.defaults(arguments,[\"width\"],t.StereoWidener);t.MidSideEffect.call(this,e),this.width=new t.Signal(e.width,t.Type.NormalRange),this._readOnly([\"width\"]),this._twoTimesWidthMid=new t.Multiply(2),this._twoTimesWidthSide=new t.Multiply(2),this._midMult=new t.Multiply,this._twoTimesWidthMid.connect(this._midMult,0,1),this.midSend.chain(this._midMult,this.midReturn),this._oneMinusWidth=new t.Subtract,this._oneMinusWidth.connect(this._twoTimesWidthMid),this.context.getConstant(1).connect(this._oneMinusWidth,0,0),this.width.connect(this._oneMinusWidth,0,1),this._sideMult=new t.Multiply,this.width.connect(this._twoTimesWidthSide),this._twoTimesWidthSide.connect(this._sideMult,0,1),this.sideSend.chain(this._sideMult,this.sideReturn)},t.extend(t.StereoWidener,t.MidSideEffect),t.StereoWidener.defaults={width:.5},t.StereoWidener.prototype.dispose=function(){return t.MidSideEffect.prototype.dispose.call(this),this._writable([\"width\"]),this.width.dispose(),this.width=null,this._midMult.dispose(),this._midMult=null,this._sideMult.dispose(),this._sideMult=null,this._twoTimesWidthMid.dispose(),this._twoTimesWidthMid=null,this._twoTimesWidthSide.dispose(),this._twoTimesWidthSide=null,this._oneMinusWidth.dispose(),this._oneMinusWidth=null,this},t.StereoWidener}),n(function(t){return t.Tremolo=function(){var e=t.defaults(arguments,[\"frequency\",\"depth\"],t.Tremolo);t.StereoEffect.call(this,e),this._lfoL=new t.LFO({phase:e.spread,min:1,max:0}),this._lfoR=new t.LFO({phase:e.spread,min:1,max:0}),this._amplitudeL=new t.Gain,this._amplitudeR=new t.Gain,this.frequency=new t.Signal(e.frequency,t.Type.Frequency),this.depth=new t.Signal(e.depth,t.Type.NormalRange),this._readOnly([\"frequency\",\"depth\"]),this.effectSendL.chain(this._amplitudeL,this.effectReturnL),this.effectSendR.chain(this._amplitudeR,this.effectReturnR),this._lfoL.connect(this._amplitudeL.gain),this._lfoR.connect(this._amplitudeR.gain),this.frequency.fan(this._lfoL.frequency,this._lfoR.frequency),this.depth.fan(this._lfoR.amplitude,this._lfoL.amplitude),this.type=e.type,this.spread=e.spread},t.extend(t.Tremolo,t.StereoEffect),t.Tremolo.defaults={frequency:10,type:\"sine\",depth:.5,spread:180},t.Tremolo.prototype.start=function(t){return this._lfoL.start(t),this._lfoR.start(t),this},t.Tremolo.prototype.stop=function(t){return this._lfoL.stop(t),this._lfoR.stop(t),this},t.Tremolo.prototype.sync=function(e){return this._lfoL.sync(e),this._lfoR.sync(e),t.Transport.syncSignal(this.frequency),this},t.Tremolo.prototype.unsync=function(){return this._lfoL.unsync(),this._lfoR.unsync(),t.Transport.unsyncSignal(this.frequency),this},Object.defineProperty(t.Tremolo.prototype,\"type\",{get:function(){return this._lfoL.type},set:function(t){this._lfoL.type=t,this._lfoR.type=t}}),Object.defineProperty(t.Tremolo.prototype,\"spread\",{get:function(){return this._lfoR.phase-this._lfoL.phase},set:function(t){this._lfoL.phase=90-t/2,this._lfoR.phase=t/2+90}}),t.Tremolo.prototype.dispose=function(){return t.StereoEffect.prototype.dispose.call(this),this._writable([\"frequency\",\"depth\"]),this._lfoL.dispose(),this._lfoL=null,this._lfoR.dispose(),this._lfoR=null,this._amplitudeL.dispose(),this._amplitudeL=null,this._amplitudeR.dispose(),this._amplitudeR=null,this.frequency=null,this.depth=null,this},t.Tremolo}),n(function(t){return t.Vibrato=function(){var e=t.defaults(arguments,[\"frequency\",\"depth\"],t.Vibrato);t.Effect.call(this,e),this._delayNode=new t.Delay(0,e.maxDelay),this._lfo=new t.LFO({type:e.type,min:0,max:e.maxDelay,frequency:e.frequency,phase:-90}).start().connect(this._delayNode.delayTime),this.frequency=this._lfo.frequency,this.depth=this._lfo.amplitude,this.depth.value=e.depth,this._readOnly([\"frequency\",\"depth\"]),this.effectSend.chain(this._delayNode,this.effectReturn)},t.extend(t.Vibrato,t.Effect),t.Vibrato.defaults={maxDelay:.005,frequency:5,depth:.1,type:\"sine\"},Object.defineProperty(t.Vibrato.prototype,\"type\",{get:function(){return this._lfo.type},set:function(t){this._lfo.type=t}}),t.Vibrato.prototype.dispose=function(){t.Effect.prototype.dispose.call(this),this._delayNode.dispose(),this._delayNode=null,this._lfo.dispose(),this._lfo=null,this._writable([\"frequency\",\"depth\"]),this.frequency=null,this.depth=null},t.Vibrato}),n(function(t){return t.Event=function(){var e=t.defaults(arguments,[\"callback\",\"value\"],t.Event);t.call(this),this._loop=e.loop,this.callback=e.callback,this.value=e.value,this._loopStart=this.toTicks(e.loopStart),this._loopEnd=this.toTicks(e.loopEnd),this._state=new t.TimelineState(t.State.Stopped),this._playbackRate=1,this._startOffset=0,this._probability=e.probability,this._humanize=e.humanize,this.mute=e.mute,this.playbackRate=e.playbackRate},t.extend(t.Event),t.Event.defaults={callback:t.noOp,loop:!1,loopEnd:\"1m\",loopStart:0,playbackRate:1,value:null,probability:1,mute:!1,humanize:!1},t.Event.prototype._rescheduleEvents=function(e){return e=t.defaultArg(e,-1),this._state.forEachFrom(e,function(e){var n;if(e.state===t.State.Started){t.isDefined(e.id)&&t.Transport.clear(e.id);var i=e.time+Math.round(this.startOffset/this._playbackRate);if(this._loop){n=1/0,t.isNumber(this._loop)&&(n=this._loop*this._getLoopDuration());var r=this._state.getAfter(i);null!==r&&(n=Math.min(n,r.time-i)),n!==1/0&&(this._state.setStateAtTime(t.State.Stopped,i+n+1),n=t.Ticks(n));var o=t.Ticks(this._getLoopDuration());e.id=t.Transport.scheduleRepeat(this._tick.bind(this),o,t.Ticks(i),n)}else e.id=t.Transport.schedule(this._tick.bind(this),t.Ticks(i))}}.bind(this)),this},Object.defineProperty(t.Event.prototype,\"state\",{get:function(){return this._state.getValueAtTime(t.Transport.ticks)}}),Object.defineProperty(t.Event.prototype,\"startOffset\",{get:function(){return this._startOffset},set:function(t){this._startOffset=t}}),Object.defineProperty(t.Event.prototype,\"probability\",{get:function(){return this._probability},set:function(t){this._probability=t}}),Object.defineProperty(t.Event.prototype,\"humanize\",{get:function(){return this._humanize},set:function(t){this._humanize=t}}),t.Event.prototype.start=function(e){return e=this.toTicks(e),this._state.getValueAtTime(e)===t.State.Stopped&&(this._state.add({state:t.State.Started,time:e,id:void 0}),this._rescheduleEvents(e)),this},t.Event.prototype.stop=function(e){if(this.cancel(e),e=this.toTicks(e),this._state.getValueAtTime(e)===t.State.Started){this._state.setStateAtTime(t.State.Stopped,e);var n=this._state.getBefore(e),i=e;null!==n&&(i=n.time),this._rescheduleEvents(i)}return this},t.Event.prototype.cancel=function(e){return e=t.defaultArg(e,-1/0),e=this.toTicks(e),this._state.forEachFrom(e,function(e){t.Transport.clear(e.id)}),this._state.cancel(e),this},t.Event.prototype._tick=function(e){var n=t.Transport.getTicksAtTime(e);if(!this.mute&&this._state.getValueAtTime(n)===t.State.Started){if(this.probability<1&&Math.random()>this.probability)return;if(this.humanize){var i=.02;t.isBoolean(this.humanize)||(i=this.toSeconds(this.humanize)),e+=(2*Math.random()-1)*i}this.callback(e,this.value)}},t.Event.prototype._getLoopDuration=function(){return Math.round((this._loopEnd-this._loopStart)/this._playbackRate)},Object.defineProperty(t.Event.prototype,\"loop\",{get:function(){return this._loop},set:function(t){this._loop=t,this._rescheduleEvents()}}),Object.defineProperty(t.Event.prototype,\"playbackRate\",{get:function(){return this._playbackRate},set:function(t){this._playbackRate=t,this._rescheduleEvents()}}),Object.defineProperty(t.Event.prototype,\"loopEnd\",{get:function(){return t.Ticks(this._loopEnd).toSeconds()},set:function(t){this._loopEnd=this.toTicks(t),this._loop&&this._rescheduleEvents()}}),Object.defineProperty(t.Event.prototype,\"loopStart\",{get:function(){return t.Ticks(this._loopStart).toSeconds()},set:function(t){this._loopStart=this.toTicks(t),this._loop&&this._rescheduleEvents()}}),Object.defineProperty(t.Event.prototype,\"progress\",{get:function(){if(this._loop){var e=t.Transport.ticks,n=this._state.get(e);if(null!==n&&n.state===t.State.Started){var i=this._getLoopDuration();return(e-n.time)%i/i}return 0}return 0}}),t.Event.prototype.dispose=function(){this.cancel(),this._state.dispose(),this._state=null,this.callback=null,this.value=null},t.Event}),n(function(t){return t.Loop=function(){var e=t.defaults(arguments,[\"callback\",\"interval\"],t.Loop);t.call(this),this._event=new t.Event({callback:this._tick.bind(this),loop:!0,loopEnd:e.interval,playbackRate:e.playbackRate,probability:e.probability}),this.callback=e.callback,this.iterations=e.iterations},t.extend(t.Loop),t.Loop.defaults={interval:\"4n\",callback:t.noOp,playbackRate:1,iterations:1/0,probability:!0,mute:!1},t.Loop.prototype.start=function(t){return this._event.start(t),this},t.Loop.prototype.stop=function(t){return this._event.stop(t),this},t.Loop.prototype.cancel=function(t){return this._event.cancel(t),this},t.Loop.prototype._tick=function(t){this.callback(t)},Object.defineProperty(t.Loop.prototype,\"state\",{get:function(){return this._event.state}}),Object.defineProperty(t.Loop.prototype,\"progress\",{get:function(){return this._event.progress}}),Object.defineProperty(t.Loop.prototype,\"interval\",{get:function(){return this._event.loopEnd},set:function(t){this._event.loopEnd=t}}),Object.defineProperty(t.Loop.prototype,\"playbackRate\",{get:function(){return this._event.playbackRate},set:function(t){this._event.playbackRate=t}}),Object.defineProperty(t.Loop.prototype,\"humanize\",{get:function(){return this._event.humanize},set:function(t){this._event.humanize=t}}),Object.defineProperty(t.Loop.prototype,\"probability\",{get:function(){return this._event.probability},set:function(t){this._event.probability=t}}),Object.defineProperty(t.Loop.prototype,\"mute\",{get:function(){return this._event.mute},set:function(t){this._event.mute=t}}),Object.defineProperty(t.Loop.prototype,\"iterations\",{get:function(){return!0===this._event.loop?1/0:this._event.loop},set:function(t){this._event.loop=t===1/0||t}}),t.Loop.prototype.dispose=function(){this._event.dispose(),this._event=null,this.callback=null},t.Loop}),n(function(t){return t.Part=function(){var e=t.defaults(arguments,[\"callback\",\"events\"],t.Part);t.Event.call(this,e),this._events=[];for(var n=0;n<e.events.length;n++)Array.isArray(e.events[n])?this.add(e.events[n][0],e.events[n][1]):this.add(e.events[n])},t.extend(t.Part,t.Event),t.Part.defaults={callback:t.noOp,loop:!1,loopEnd:\"1m\",loopStart:0,playbackRate:1,probability:1,humanize:!1,mute:!1,events:[]},t.Part.prototype.start=function(e,n){var i=this.toTicks(e);return this._state.getValueAtTime(i)!==t.State.Started&&(n=this._loop?t.defaultArg(n,this._loopStart):t.defaultArg(n,0),n=this.toTicks(n),this._state.add({state:t.State.Started,time:i,offset:n}),this._forEach(function(t){this._startNote(t,i,n)})),this},t.Part.prototype._startNote=function(e,n,i){n-=i,this._loop?e.startOffset>=this._loopStart&&e.startOffset<this._loopEnd?(e.startOffset<i&&(n+=this._getLoopDuration()),e.start(t.Ticks(n))):e.startOffset<this._loopStart&&e.startOffset>=i&&(e.loop=!1,e.start(t.Ticks(n))):e.startOffset>=i&&e.start(t.Ticks(n))},Object.defineProperty(t.Part.prototype,\"startOffset\",{get:function(){return this._startOffset},set:function(t){this._startOffset=t,this._forEach(function(t){t.startOffset+=this._startOffset})}}),t.Part.prototype.stop=function(e){var n=this.toTicks(e);return this._state.cancel(n),this._state.setStateAtTime(t.State.Stopped,n),this._forEach(function(t){t.stop(e)}),this},t.Part.prototype.at=function(e,n){e=t.TransportTime(e);for(var i=t.Ticks(1).toSeconds(),r=0;r<this._events.length;r++){var o=this._events[r];if(Math.abs(e.toTicks()-o.startOffset)<i)return t.isDefined(n)&&(o.value=n),o}return t.isDefined(n)?(this.add(e,n),this._events[this._events.length-1]):null},t.Part.prototype.add=function(e,n){var i;return e.hasOwnProperty(\"time\")&&(e=(n=e).time),e=this.toTicks(e),n instanceof t.Event?(i=n).callback=this._tick.bind(this):i=new t.Event({callback:this._tick.bind(this),value:n}),i.startOffset=e,i.set({loopEnd:this.loopEnd,loopStart:this.loopStart,loop:this.loop,humanize:this.humanize,playbackRate:this.playbackRate,probability:this.probability}),this._events.push(i),this._restartEvent(i),this},t.Part.prototype._restartEvent=function(e){this._state.forEach(function(n){n.state===t.State.Started?this._startNote(e,n.time,n.offset):e.stop(t.Ticks(n.time))}.bind(this))},t.Part.prototype.remove=function(e,n){e.hasOwnProperty(\"time\")&&(e=(n=e).time),e=this.toTicks(e);for(var i=this._events.length-1;i>=0;i--){var r=this._events[i];r instanceof t.Part?r.remove(e,n):r.startOffset===e&&(t.isUndef(n)||t.isDefined(n)&&r.value===n)&&(this._events.splice(i,1),r.dispose())}return this},t.Part.prototype.removeAll=function(){return this._forEach(function(t){t.dispose()}),this._events=[],this},t.Part.prototype.cancel=function(t){return this._forEach(function(e){e.cancel(t)}),this._state.cancel(this.toTicks(t)),this},t.Part.prototype._forEach=function(e,n){if(this._events){n=t.defaultArg(n,this);for(var i=this._events.length-1;i>=0;i--){var r=this._events[i];r instanceof t.Part?r._forEach(e,n):e.call(n,r)}}return this},t.Part.prototype._setAll=function(t,e){this._forEach(function(n){n[t]=e})},t.Part.prototype._tick=function(t,e){this.mute||this.callback(t,e)},t.Part.prototype._testLoopBoundries=function(e){e.startOffset<this._loopStart||e.startOffset>=this._loopEnd?e.cancel(0):e.state===t.State.Stopped&&this._restartEvent(e)},Object.defineProperty(t.Part.prototype,\"probability\",{get:function(){return this._probability},set:function(t){this._probability=t,this._setAll(\"probability\",t)}}),Object.defineProperty(t.Part.prototype,\"humanize\",{get:function(){return this._humanize},set:function(t){this._humanize=t,this._setAll(\"humanize\",t)}}),Object.defineProperty(t.Part.prototype,\"loop\",{get:function(){return this._loop},set:function(t){this._loop=t,this._forEach(function(e){e._loopStart=this._loopStart,e._loopEnd=this._loopEnd,e.loop=t,this._testLoopBoundries(e)})}}),Object.defineProperty(t.Part.prototype,\"loopEnd\",{get:function(){return t.Ticks(this._loopEnd).toSeconds()},set:function(t){this._loopEnd=this.toTicks(t),this._loop&&this._forEach(function(e){e.loopEnd=t,this._testLoopBoundries(e)})}}),Object.defineProperty(t.Part.prototype,\"loopStart\",{get:function(){return t.Ticks(this._loopStart).toSeconds()},set:function(t){this._loopStart=this.toTicks(t),this._loop&&this._forEach(function(t){t.loopStart=this.loopStart,this._testLoopBoundries(t)})}}),Object.defineProperty(t.Part.prototype,\"playbackRate\",{get:function(){return this._playbackRate},set:function(t){this._playbackRate=t,this._setAll(\"playbackRate\",t)}}),Object.defineProperty(t.Part.prototype,\"length\",{get:function(){return this._events.length}}),t.Part.prototype.dispose=function(){return this.removeAll(),this._state.dispose(),this._state=null,this.callback=null,this._events=null,this},t.Part}),n(function(t){return t.Pattern=function(){var e=t.defaults(arguments,[\"callback\",\"values\",\"pattern\"],t.Pattern);t.Loop.call(this,e),this._pattern=new t.CtrlPattern({values:e.values,type:e.pattern,index:e.index})},t.extend(t.Pattern,t.Loop),t.Pattern.defaults={pattern:t.CtrlPattern.Type.Up,callback:t.noOp,values:[]},t.Pattern.prototype._tick=function(t){this.callback(t,this._pattern.value),this._pattern.next()},Object.defineProperty(t.Pattern.prototype,\"index\",{get:function(){return this._pattern.index},set:function(t){this._pattern.index=t}}),Object.defineProperty(t.Pattern.prototype,\"values\",{get:function(){return this._pattern.values},set:function(t){this._pattern.values=t}}),Object.defineProperty(t.Pattern.prototype,\"value\",{get:function(){return this._pattern.value}}),Object.defineProperty(t.Pattern.prototype,\"pattern\",{get:function(){return this._pattern.type},set:function(t){this._pattern.type=t}}),t.Pattern.prototype.dispose=function(){t.Loop.prototype.dispose.call(this),this._pattern.dispose(),this._pattern=null},t.Pattern}),n(function(t){return t.Sequence=function(){var e=t.defaults(arguments,[\"callback\",\"events\",\"subdivision\"],t.Sequence),n=e.events;if(delete e.events,t.Part.call(this,e),this._subdivision=this.toTicks(e.subdivision),t.isUndef(e.loopEnd)&&t.isDefined(n)&&(this._loopEnd=n.length*this._subdivision),this._loop=!0,t.isDefined(n))for(var i=0;i<n.length;i++)this.add(i,n[i])},t.extend(t.Sequence,t.Part),t.Sequence.defaults={subdivision:\"4n\"},Object.defineProperty(t.Sequence.prototype,\"subdivision\",{get:function(){return t.Ticks(this._subdivision).toSeconds()}}),t.Sequence.prototype.at=function(e,n){return t.isArray(n)&&this.remove(e),t.Part.prototype.at.call(this,this._indexTime(e),n)},t.Sequence.prototype.add=function(e,n){if(null===n)return this;if(t.isArray(n)){var i=Math.round(this._subdivision/n.length);n=new t.Sequence(this._tick.bind(this),n,t.Ticks(i))}return t.Part.prototype.add.call(this,this._indexTime(e),n),this},t.Sequence.prototype.remove=function(e,n){return t.Part.prototype.remove.call(this,this._indexTime(e),n),this},t.Sequence.prototype._indexTime=function(e){return e instanceof t.TransportTime?e:t.Ticks(e*this._subdivision+this.startOffset).toSeconds()},t.Sequence.prototype.dispose=function(){return t.Part.prototype.dispose.call(this),this},t.Sequence}),n(function(t){return t.PulseOscillator=function(){var e=t.defaults(arguments,[\"frequency\",\"width\"],t.Oscillator);t.Source.call(this,e),this.width=new t.Signal(e.width,t.Type.NormalRange),this._widthGate=new t.Gain,this._sawtooth=new t.Oscillator({frequency:e.frequency,detune:e.detune,type:\"sawtooth\",phase:e.phase}),this.frequency=this._sawtooth.frequency,this.detune=this._sawtooth.detune,this._thresh=new t.WaveShaper(function(t){return t<0?-1:1}),this._sawtooth.chain(this._thresh,this.output),this.width.chain(this._widthGate,this._thresh),this._readOnly([\"width\",\"frequency\",\"detune\"])},t.extend(t.PulseOscillator,t.Source),t.PulseOscillator.defaults={frequency:440,detune:0,phase:0,width:.2},t.PulseOscillator.prototype._start=function(t){t=this.toSeconds(t),this._sawtooth.start(t),this._widthGate.gain.setValueAtTime(1,t)},t.PulseOscillator.prototype._stop=function(t){t=this.toSeconds(t),this._sawtooth.stop(t),this._widthGate.gain.setValueAtTime(0,t)},t.PulseOscillator.prototype.restart=function(t){this._sawtooth.restart(t)},Object.defineProperty(t.PulseOscillator.prototype,\"phase\",{get:function(){return this._sawtooth.phase},set:function(t){this._sawtooth.phase=t}}),Object.defineProperty(t.PulseOscillator.prototype,\"type\",{get:function(){return\"pulse\"}}),Object.defineProperty(t.PulseOscillator.prototype,\"partials\",{get:function(){return[]}}),t.PulseOscillator.prototype.dispose=function(){return t.Source.prototype.dispose.call(this),this._sawtooth.dispose(),this._sawtooth=null,this._writable([\"width\",\"frequency\",\"detune\"]),this.width.dispose(),this.width=null,this._widthGate.dispose(),this._widthGate=null,this._thresh.dispose(),this._thresh=null,this.frequency=null,this.detune=null,this},t.PulseOscillator}),n(function(t){return t.PWMOscillator=function(){var e=t.defaults(arguments,[\"frequency\",\"modulationFrequency\"],t.PWMOscillator);t.Source.call(this,e),this._pulse=new t.PulseOscillator(e.modulationFrequency),this._pulse._sawtooth.type=\"sine\",this._modulator=new t.Oscillator({frequency:e.frequency,detune:e.detune,phase:e.phase}),this._scale=new t.Multiply(2),this.frequency=this._modulator.frequency,this.detune=this._modulator.detune,this.modulationFrequency=this._pulse.frequency,this._modulator.chain(this._scale,this._pulse.width),this._pulse.connect(this.output),this._readOnly([\"modulationFrequency\",\"frequency\",\"detune\"])},t.extend(t.PWMOscillator,t.Source),t.PWMOscillator.defaults={frequency:440,detune:0,phase:0,modulationFrequency:.4},t.PWMOscillator.prototype._start=function(t){t=this.toSeconds(t),this._modulator.start(t),this._pulse.start(t)},t.PWMOscillator.prototype._stop=function(t){t=this.toSeconds(t),this._modulator.stop(t),this._pulse.stop(t)},t.PWMOscillator.prototype.restart=function(t){this._modulator.restart(t),this._pulse.restart(t)},Object.defineProperty(t.PWMOscillator.prototype,\"type\",{get:function(){return\"pwm\"}}),Object.defineProperty(t.PWMOscillator.prototype,\"partials\",{get:function(){return[]}}),Object.defineProperty(t.PWMOscillator.prototype,\"phase\",{get:function(){return this._modulator.phase},set:function(t){this._modulator.phase=t}}),t.PWMOscillator.prototype.dispose=function(){return t.Source.prototype.dispose.call(this),this._pulse.dispose(),this._pulse=null,this._scale.dispose(),this._scale=null,this._modulator.dispose(),this._modulator=null,this._writable([\"modulationFrequency\",\"frequency\",\"detune\"]),this.frequency=null,this.detune=null,this.modulationFrequency=null,this},t.PWMOscillator}),n(function(t){return t.FMOscillator=function(){var e=t.defaults(arguments,[\"frequency\",\"type\",\"modulationType\"],t.FMOscillator);t.Source.call(this,e),this._carrier=new t.Oscillator(e.frequency,e.type),this.frequency=new t.Signal(e.frequency,t.Type.Frequency),this.detune=this._carrier.detune,this.detune.value=e.detune,this.modulationIndex=new t.Multiply(e.modulationIndex),this.modulationIndex.units=t.Type.Positive,this._modulator=new t.Oscillator(e.frequency,e.modulationType),this.harmonicity=new t.Multiply(e.harmonicity),this.harmonicity.units=t.Type.Positive,this._modulationNode=new t.Gain(0),this.frequency.connect(this._carrier.frequency),this.frequency.chain(this.harmonicity,this._modulator.frequency),this.frequency.chain(this.modulationIndex,this._modulationNode),this._modulator.connect(this._modulationNode.gain),this._modulationNode.connect(this._carrier.frequency),this._carrier.connect(this.output),this.detune.connect(this._modulator.detune),this.phase=e.phase,this._readOnly([\"modulationIndex\",\"frequency\",\"detune\",\"harmonicity\"])},t.extend(t.FMOscillator,t.Source),t.FMOscillator.defaults={frequency:440,detune:0,phase:0,modulationIndex:2,modulationType:\"square\",harmonicity:1},t.FMOscillator.prototype._start=function(t){this._modulator.start(t),this._carrier.start(t)},t.FMOscillator.prototype._stop=function(t){this._modulator.stop(t),this._carrier.stop(t)},t.FMOscillator.prototype.restart=function(t){this._modulator.restart(t),this._carrier.restart(t)},Object.defineProperty(t.FMOscillator.prototype,\"type\",{get:function(){return this._carrier.type},set:function(t){this._carrier.type=t}}),Object.defineProperty(t.FMOscillator.prototype,\"modulationType\",{get:function(){return this._modulator.type},set:function(t){this._modulator.type=t}}),Object.defineProperty(t.FMOscillator.prototype,\"phase\",{get:function(){return this._carrier.phase},set:function(t){this._carrier.phase=t,this._modulator.phase=t}}),Object.defineProperty(t.FMOscillator.prototype,\"partials\",{get:function(){return this._carrier.partials},set:function(t){this._carrier.partials=t}}),t.FMOscillator.prototype.dispose=function(){return t.Source.prototype.dispose.call(this),this._writable([\"modulationIndex\",\"frequency\",\"detune\",\"harmonicity\"]),this.frequency.dispose(),this.frequency=null,this.detune=null,this.harmonicity.dispose(),this.harmonicity=null,this._carrier.dispose(),this._carrier=null,this._modulator.dispose(),this._modulator=null,this._modulationNode.dispose(),this._modulationNode=null,this.modulationIndex.dispose(),this.modulationIndex=null,this},t.FMOscillator}),n(function(t){return t.AMOscillator=function(){var e=t.defaults(arguments,[\"frequency\",\"type\",\"modulationType\"],t.AMOscillator);t.Source.call(this,e),this._carrier=new t.Oscillator(e.frequency,e.type),this.frequency=this._carrier.frequency,this.detune=this._carrier.detune,this.detune.value=e.detune,this._modulator=new t.Oscillator(e.frequency,e.modulationType),this._modulationScale=new t.AudioToGain,this.harmonicity=new t.Multiply(e.harmonicity),this.harmonicity.units=t.Type.Positive,this._modulationNode=new t.Gain(0),this.frequency.chain(this.harmonicity,this._modulator.frequency),this.detune.connect(this._modulator.detune),this._modulator.chain(this._modulationScale,this._modulationNode.gain),this._carrier.chain(this._modulationNode,this.output),this.phase=e.phase,this._readOnly([\"frequency\",\"detune\",\"harmonicity\"])},t.extend(t.AMOscillator,t.Oscillator),t.AMOscillator.defaults={frequency:440,detune:0,phase:0,modulationType:\"square\",harmonicity:1},t.AMOscillator.prototype._start=function(t){this._modulator.start(t),this._carrier.start(t)},t.AMOscillator.prototype._stop=function(t){this._modulator.stop(t),this._carrier.stop(t)},t.AMOscillator.prototype.restart=function(t){this._modulator.restart(t),this._carrier.restart(t)},Object.defineProperty(t.AMOscillator.prototype,\"type\",{get:function(){return this._carrier.type},set:function(t){this._carrier.type=t}}),Object.defineProperty(t.AMOscillator.prototype,\"modulationType\",{get:function(){return this._modulator.type},set:function(t){this._modulator.type=t}}),Object.defineProperty(t.AMOscillator.prototype,\"phase\",{get:function(){return this._carrier.phase},set:function(t){this._carrier.phase=t,this._modulator.phase=t}}),Object.defineProperty(t.AMOscillator.prototype,\"partials\",{get:function(){return this._carrier.partials},set:function(t){this._carrier.partials=t}}),t.AMOscillator.prototype.dispose=function(){return t.Source.prototype.dispose.call(this),this._writable([\"frequency\",\"detune\",\"harmonicity\"]),this.frequency=null,this.detune=null,this.harmonicity.dispose(),this.harmonicity=null,this._carrier.dispose(),this._carrier=null,this._modulator.dispose(),this._modulator=null,this._modulationNode.dispose(),this._modulationNode=null,this._modulationScale.dispose(),this._modulationScale=null,this},t.AMOscillator}),n(function(t){return t.FatOscillator=function(){var e=t.defaults(arguments,[\"frequency\",\"type\",\"spread\"],t.FatOscillator);t.Source.call(this,e),this.frequency=new t.Signal(e.frequency,t.Type.Frequency),this.detune=new t.Signal(e.detune,t.Type.Cents),this._oscillators=[],this._spread=e.spread,this._type=e.type,this._phase=e.phase,this._partials=t.defaultArg(e.partials,[]),this.count=e.count,this._readOnly([\"frequency\",\"detune\"])},t.extend(t.FatOscillator,t.Source),t.FatOscillator.defaults={frequency:440,detune:0,phase:0,spread:20,count:3,type:\"sawtooth\"},t.FatOscillator.prototype._start=function(t){t=this.toSeconds(t),this._forEach(function(e){e.start(t)})},t.FatOscillator.prototype._stop=function(t){t=this.toSeconds(t),this._forEach(function(e){e.stop(t)})},t.FatOscillator.prototype.restart=function(t){t=this.toSeconds(t),this._forEach(function(e){e.restart(t)})},t.FatOscillator.prototype._forEach=function(t){for(var e=0;e<this._oscillators.length;e++)t.call(this,this._oscillators[e],e)},Object.defineProperty(t.FatOscillator.prototype,\"type\",{get:function(){return this._type},set:function(t){this._type=t,this._forEach(function(e){e.type=t})}}),Object.defineProperty(t.FatOscillator.prototype,\"spread\",{get:function(){return this._spread},set:function(t){if(this._spread=t,this._oscillators.length>1){var e=-t/2,n=t/(this._oscillators.length-1);this._forEach(function(t,i){t.detune.value=e+n*i})}}}),Object.defineProperty(t.FatOscillator.prototype,\"count\",{get:function(){return this._oscillators.length},set:function(e){if(e=Math.max(e,1),this._oscillators.length!==e){this._forEach(function(t){t.dispose()}),this._oscillators=[];for(var n=0;n<e;n++){var i=new t.Oscillator;this.type===t.Oscillator.Type.Custom?i.partials=this._partials:i.type=this._type,i.phase=this._phase,i.volume.value=-6-1.1*e,this.frequency.connect(i.frequency),this.detune.connect(i.detune),i.connect(this.output),this._oscillators[n]=i}this.spread=this._spread,this.state===t.State.Started&&this._forEach(function(t){t.start()})}}}),Object.defineProperty(t.FatOscillator.prototype,\"phase\",{get:function(){return this._phase},set:function(t){this._phase=t,this._forEach(function(e){e.phase=t})}}),Object.defineProperty(t.FatOscillator.prototype,\"partials\",{get:function(){return this._partials},set:function(e){this._partials=e,this._type=t.Oscillator.Type.Custom,this._forEach(function(t){t.partials=e})}}),t.FatOscillator.prototype.dispose=function(){return t.Source.prototype.dispose.call(this),this._writable([\"frequency\",\"detune\"]),this.frequency.dispose(),this.frequency=null,this.detune.dispose(),this.detune=null,this._forEach(function(t){t.dispose()}),this._oscillators=null,this._partials=null,this},t.FatOscillator}),n(function(t){t.OmniOscillator=function(){var e=t.defaults(arguments,[\"frequency\",\"type\"],t.OmniOscillator);t.Source.call(this,e),this.frequency=new t.Signal(e.frequency,t.Type.Frequency),this.detune=new t.Signal(e.detune,t.Type.Cents),this._sourceType=void 0,this._oscillator=null,this.type=e.type,this._readOnly([\"frequency\",\"detune\"]),this.set(e)},t.extend(t.OmniOscillator,t.Source),t.OmniOscillator.defaults={frequency:440,detune:0,type:\"sine\",phase:0};var e=\"PulseOscillator\",n=\"PWMOscillator\",i=\"Oscillator\",r=\"FMOscillator\",o=\"AMOscillator\",s=\"FatOscillator\";return t.OmniOscillator.prototype._start=function(t){this._oscillator.start(t)},t.OmniOscillator.prototype._stop=function(t){this._oscillator.stop(t)},t.OmniOscillator.prototype.restart=function(t){this._oscillator.restart(t)},Object.defineProperty(t.OmniOscillator.prototype,\"type\",{get:function(){var t=\"\";return this._sourceType===r?t=\"fm\":this._sourceType===o?t=\"am\":this._sourceType===s&&(t=\"fat\"),t+this._oscillator.type},set:function(t){\"fm\"===t.substr(0,2)?(this._createNewOscillator(r),this._oscillator.type=t.substr(2)):\"am\"===t.substr(0,2)?(this._createNewOscillator(o),this._oscillator.type=t.substr(2)):\"fat\"===t.substr(0,3)?(this._createNewOscillator(s),this._oscillator.type=t.substr(3)):\"pwm\"===t?this._createNewOscillator(n):\"pulse\"===t?this._createNewOscillator(e):(this._createNewOscillator(i),this._oscillator.type=t)}}),Object.defineProperty(t.OmniOscillator.prototype,\"partials\",{get:function(){return this._oscillator.partials},set:function(t){this._oscillator.partials=t}}),t.OmniOscillator.prototype.set=function(e,n){return\"type\"===e?this.type=n:t.isObject(e)&&e.hasOwnProperty(\"type\")&&(this.type=e.type),t.prototype.set.apply(this,arguments),this},t.OmniOscillator.prototype._createNewOscillator=function(e){if(e!==this._sourceType){this._sourceType=e;var n=t[e],i=this.now();if(null!==this._oscillator){var r=this._oscillator;r.stop(i),this.context.setTimeout(function(){r.dispose(),r=null},this.blockTime)}this._oscillator=new n,this.frequency.connect(this._oscillator.frequency),this.detune.connect(this._oscillator.detune),this._oscillator.connect(this.output),this.state===t.State.Started&&this._oscillator.start(i)}},Object.defineProperty(t.OmniOscillator.prototype,\"phase\",{get:function(){return this._oscillator.phase},set:function(t){this._oscillator.phase=t}}),Object.defineProperty(t.OmniOscillator.prototype,\"width\",{get:function(){if(this._sourceType===e)return this._oscillator.width}}),Object.defineProperty(t.OmniOscillator.prototype,\"count\",{get:function(){if(this._sourceType===s)return this._oscillator.count},set:function(t){this._sourceType===s&&(this._oscillator.count=t)}}),Object.defineProperty(t.OmniOscillator.prototype,\"spread\",{get:function(){if(this._sourceType===s)return this._oscillator.spread},set:function(t){this._sourceType===s&&(this._oscillator.spread=t)}}),Object.defineProperty(t.OmniOscillator.prototype,\"modulationType\",{get:function(){if(this._sourceType===r||this._sourceType===o)return this._oscillator.modulationType},set:function(t){this._sourceType!==r&&this._sourceType!==o||(this._oscillator.modulationType=t)}}),Object.defineProperty(t.OmniOscillator.prototype,\"modulationIndex\",{get:function(){if(this._sourceType===r)return this._oscillator.modulationIndex}}),Object.defineProperty(t.OmniOscillator.prototype,\"harmonicity\",{get:function(){if(this._sourceType===r||this._sourceType===o)return this._oscillator.harmonicity}}),Object.defineProperty(t.OmniOscillator.prototype,\"modulationFrequency\",{get:function(){if(this._sourceType===n)return this._oscillator.modulationFrequency}}),t.OmniOscillator.prototype.dispose=function(){return t.Source.prototype.dispose.call(this),this._writable([\"frequency\",\"detune\"]),this.detune.dispose(),this.detune=null,this.frequency.dispose(),this.frequency=null,this._oscillator.dispose(),this._oscillator=null,this._sourceType=null,this},t.OmniOscillator}),n(function(t){return t.Instrument=function(e){e=t.defaultArg(e,t.Instrument.defaults),t.AudioNode.call(this),this._volume=this.output=new t.Volume(e.volume),this.volume=this._volume.volume,this._readOnly(\"volume\"),this._scheduledEvents=[]},t.extend(t.Instrument,t.AudioNode),t.Instrument.defaults={volume:0},t.Instrument.prototype.triggerAttack=t.noOp,t.Instrument.prototype.triggerRelease=t.noOp,t.Instrument.prototype.sync=function(){return this._syncMethod(\"triggerAttack\",1),this._syncMethod(\"triggerRelease\",0),this},t.Instrument.prototype._syncMethod=function(e,n){var i=this[\"_original_\"+e]=this[e];this[e]=function(){var e=Array.prototype.slice.call(arguments),r=e[n],o=t.Transport.schedule(function(t){e[n]=t,i.apply(this,e)}.bind(this),r);this._scheduledEvents.push(o)}.bind(this)},t.Instrument.prototype.unsync=function(){return this._scheduledEvents.forEach(function(e){t.Transport.clear(e)}),this._scheduledEvents=[],this._original_triggerAttack&&(this.triggerAttack=this._original_triggerAttack,this.triggerRelease=this._original_triggerRelease),this},t.Instrument.prototype.triggerAttackRelease=function(t,e,n,i){return n=this.toSeconds(n),e=this.toSeconds(e),this.triggerAttack(t,n,i),this.triggerRelease(n+e),this},t.Instrument.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._volume.dispose(),this._volume=null,this._writable([\"volume\"]),this.volume=null,this.unsync(),this._scheduledEvents=null,this},t.Instrument}),n(function(t){return t.Monophonic=function(e){e=t.defaultArg(e,t.Monophonic.defaults),t.Instrument.call(this,e),this.portamento=e.portamento},t.extend(t.Monophonic,t.Instrument),t.Monophonic.defaults={portamento:0},t.Monophonic.prototype.triggerAttack=function(t,e,n){return e=this.toSeconds(e),this._triggerEnvelopeAttack(e,n),this.setNote(t,e),this},t.Monophonic.prototype.triggerRelease=function(t){return t=this.toSeconds(t),this._triggerEnvelopeRelease(t),this},t.Monophonic.prototype._triggerEnvelopeAttack=function(){},t.Monophonic.prototype._triggerEnvelopeRelease=function(){},t.Monophonic.prototype.getLevelAtTime=function(t){return t=this.toSeconds(t),this.envelope.getValueAtTime(t)},t.Monophonic.prototype.setNote=function(t,e){if(e=this.toSeconds(e),this.portamento>0&&this.getLevelAtTime(e)>.05){var n=this.toSeconds(this.portamento);this.frequency.exponentialRampTo(t,n,e)}else this.frequency.setValueAtTime(t,e);return this},t.Monophonic}),n(function(t){return t.Synth=function(e){e=t.defaultArg(e,t.Synth.defaults),t.Monophonic.call(this,e),this.oscillator=new t.OmniOscillator(e.oscillator),this.frequency=this.oscillator.frequency,this.detune=this.oscillator.detune,this.envelope=new t.AmplitudeEnvelope(e.envelope),this.oscillator.chain(this.envelope,this.output),this._readOnly([\"oscillator\",\"frequency\",\"detune\",\"envelope\"])},t.extend(t.Synth,t.Monophonic),t.Synth.defaults={oscillator:{type:\"triangle\"},envelope:{attack:.005,decay:.1,sustain:.3,release:1}},t.Synth.prototype._triggerEnvelopeAttack=function(t,e){return this.envelope.triggerAttack(t,e),this.oscillator.start(t),0===this.envelope.sustain&&this.oscillator.stop(t+this.envelope.attack+this.envelope.decay),this},t.Synth.prototype._triggerEnvelopeRelease=function(t){return t=this.toSeconds(t),this.envelope.triggerRelease(t),this.oscillator.stop(t+this.envelope.release),this},t.Synth.prototype.dispose=function(){return t.Monophonic.prototype.dispose.call(this),this._writable([\"oscillator\",\"frequency\",\"detune\",\"envelope\"]),this.oscillator.dispose(),this.oscillator=null,this.envelope.dispose(),this.envelope=null,this.frequency=null,this.detune=null,this},t.Synth}),n(function(t){return t.AMSynth=function(e){e=t.defaultArg(e,t.AMSynth.defaults),t.Monophonic.call(this,e),this._carrier=new t.Synth,this._carrier.volume.value=-10,this.oscillator=this._carrier.oscillator,this.envelope=this._carrier.envelope.set(e.envelope),this._modulator=new t.Synth,this._modulator.volume.value=-10,this.modulation=this._modulator.oscillator.set(e.modulation),this.modulationEnvelope=this._modulator.envelope.set(e.modulationEnvelope),this.frequency=new t.Signal(440,t.Type.Frequency),this.detune=new t.Signal(e.detune,t.Type.Cents),this.harmonicity=new t.Multiply(e.harmonicity),this.harmonicity.units=t.Type.Positive,this._modulationScale=new t.AudioToGain,this._modulationNode=new t.Gain,this.frequency.connect(this._carrier.frequency),this.frequency.chain(this.harmonicity,this._modulator.frequency),this.detune.fan(this._carrier.detune,this._modulator.detune),this._modulator.chain(this._modulationScale,this._modulationNode.gain),this._carrier.chain(this._modulationNode,this.output),this._readOnly([\"frequency\",\"harmonicity\",\"oscillator\",\"envelope\",\"modulation\",\"modulationEnvelope\",\"detune\"])},t.extend(t.AMSynth,t.Monophonic),t.AMSynth.defaults={harmonicity:3,detune:0,oscillator:{type:\"sine\"},envelope:{attack:.01,decay:.01,sustain:1,release:.5},modulation:{type:\"square\"},modulationEnvelope:{attack:.5,decay:0,sustain:1,release:.5}},t.AMSynth.prototype._triggerEnvelopeAttack=function(t,e){return t=this.toSeconds(t),this._carrier._triggerEnvelopeAttack(t,e),this._modulator._triggerEnvelopeAttack(t),this},t.AMSynth.prototype._triggerEnvelopeRelease=function(t){return this._carrier._triggerEnvelopeRelease(t),this._modulator._triggerEnvelopeRelease(t),this},t.AMSynth.prototype.dispose=function(){return t.Monophonic.prototype.dispose.call(this),this._writable([\"frequency\",\"harmonicity\",\"oscillator\",\"envelope\",\"modulation\",\"modulationEnvelope\",\"detune\"]),this._carrier.dispose(),this._carrier=null,this._modulator.dispose(),this._modulator=null,this.frequency.dispose(),this.frequency=null,this.detune.dispose(),this.detune=null,this.harmonicity.dispose(),this.harmonicity=null,this._modulationScale.dispose(),this._modulationScale=null,this._modulationNode.dispose(),this._modulationNode=null,this.oscillator=null,this.envelope=null,this.modulationEnvelope=null,this.modulation=null,this},t.AMSynth}),n(function(t){return t.MonoSynth=function(e){e=t.defaultArg(e,t.MonoSynth.defaults),t.Monophonic.call(this,e),this.oscillator=new t.OmniOscillator(e.oscillator),this.frequency=this.oscillator.frequency,this.detune=this.oscillator.detune,this.filter=new t.Filter(e.filter),this.filterEnvelope=new t.FrequencyEnvelope(e.filterEnvelope),this.envelope=new t.AmplitudeEnvelope(e.envelope),this.oscillator.chain(this.filter,this.envelope,this.output),this.filterEnvelope.connect(this.filter.frequency),this._readOnly([\"oscillator\",\"frequency\",\"detune\",\"filter\",\"filterEnvelope\",\"envelope\"])},t.extend(t.MonoSynth,t.Monophonic),t.MonoSynth.defaults={frequency:\"C4\",detune:0,oscillator:{type:\"square\"},filter:{Q:6,type:\"lowpass\",rolloff:-24},envelope:{attack:.005,decay:.1,sustain:.9,release:1},filterEnvelope:{attack:.06,decay:.2,sustain:.5,release:2,baseFrequency:200,octaves:7,exponent:2}},t.MonoSynth.prototype._triggerEnvelopeAttack=function(t,e){return t=this.toSeconds(t),this.envelope.triggerAttack(t,e),this.filterEnvelope.triggerAttack(t),this.oscillator.start(t),0===this.envelope.sustain&&this.oscillator.stop(t+this.envelope.attack+this.envelope.decay),this},t.MonoSynth.prototype._triggerEnvelopeRelease=function(t){return this.envelope.triggerRelease(t),this.filterEnvelope.triggerRelease(t),this.oscillator.stop(t+this.envelope.release),this},t.MonoSynth.prototype.dispose=function(){return t.Monophonic.prototype.dispose.call(this),this._writable([\"oscillator\",\"frequency\",\"detune\",\"filter\",\"filterEnvelope\",\"envelope\"]),this.oscillator.dispose(),this.oscillator=null,this.envelope.dispose(),this.envelope=null,this.filterEnvelope.dispose(),this.filterEnvelope=null,this.filter.dispose(),this.filter=null,this.frequency=null,this.detune=null,this},t.MonoSynth}),n(function(t){return t.DuoSynth=function(e){e=t.defaultArg(e,t.DuoSynth.defaults),t.Monophonic.call(this,e),this.voice0=new t.MonoSynth(e.voice0),this.voice0.volume.value=-10,this.voice1=new t.MonoSynth(e.voice1),this.voice1.volume.value=-10,this._vibrato=new t.LFO(e.vibratoRate,-50,50),this._vibrato.start(),this.vibratoRate=this._vibrato.frequency,this._vibratoGain=new t.Gain(e.vibratoAmount,t.Type.Positive),this.vibratoAmount=this._vibratoGain.gain,this.frequency=new t.Signal(440,t.Type.Frequency),this.harmonicity=new t.Multiply(e.harmonicity),this.harmonicity.units=t.Type.Positive,this.frequency.connect(this.voice0.frequency),this.frequency.chain(this.harmonicity,this.voice1.frequency),this._vibrato.connect(this._vibratoGain),this._vibratoGain.fan(this.voice0.detune,this.voice1.detune),this.voice0.connect(this.output),this.voice1.connect(this.output),this._readOnly([\"voice0\",\"voice1\",\"frequency\",\"vibratoAmount\",\"vibratoRate\"])},t.extend(t.DuoSynth,t.Monophonic),t.DuoSynth.defaults={vibratoAmount:.5,vibratoRate:5,harmonicity:1.5,voice0:{volume:-10,portamento:0,oscillator:{type:\"sine\"},filterEnvelope:{attack:.01,decay:0,sustain:1,release:.5},envelope:{attack:.01,decay:0,sustain:1,release:.5}},voice1:{volume:-10,portamento:0,oscillator:{type:\"sine\"},filterEnvelope:{attack:.01,decay:0,sustain:1,release:.5},envelope:{attack:.01,decay:0,sustain:1,release:.5}}},t.DuoSynth.prototype._triggerEnvelopeAttack=function(t,e){return t=this.toSeconds(t),this.voice0._triggerEnvelopeAttack(t,e),this.voice1._triggerEnvelopeAttack(t,e),this},t.DuoSynth.prototype._triggerEnvelopeRelease=function(t){return this.voice0._triggerEnvelopeRelease(t),this.voice1._triggerEnvelopeRelease(t),this},t.DuoSynth.prototype.getLevelAtTime=function(t){return(this.voice0.getLevelAtTime(t)+this.voice1.getLevelAtTime(t))/2},t.DuoSynth.prototype.dispose=function(){return t.Monophonic.prototype.dispose.call(this),this._writable([\"voice0\",\"voice1\",\"frequency\",\"vibratoAmount\",\"vibratoRate\"]),this.voice0.dispose(),this.voice0=null,this.voice1.dispose(),this.voice1=null,this.frequency.dispose(),this.frequency=null,this._vibratoGain.dispose(),this._vibratoGain=null,this._vibrato=null,this.harmonicity.dispose(),this.harmonicity=null,this.vibratoAmount.dispose(),this.vibratoAmount=null,this.vibratoRate=null,this},t.DuoSynth}),n(function(t){return t.FMSynth=function(e){e=t.defaultArg(e,t.FMSynth.defaults),t.Monophonic.call(this,e),this._carrier=new t.Synth(e.carrier),this._carrier.volume.value=-10,this.oscillator=this._carrier.oscillator,this.envelope=this._carrier.envelope.set(e.envelope),this._modulator=new t.Synth(e.modulator),this._modulator.volume.value=-10,this.modulation=this._modulator.oscillator.set(e.modulation),this.modulationEnvelope=this._modulator.envelope.set(e.modulationEnvelope),this.frequency=new t.Signal(440,t.Type.Frequency),this.detune=new t.Signal(e.detune,t.Type.Cents),this.harmonicity=new t.Multiply(e.harmonicity),this.harmonicity.units=t.Type.Positive,this.modulationIndex=new t.Multiply(e.modulationIndex),this.modulationIndex.units=t.Type.Positive,this._modulationNode=new t.Gain(0),this.frequency.connect(this._carrier.frequency),this.frequency.chain(this.harmonicity,this._modulator.frequency),this.frequency.chain(this.modulationIndex,this._modulationNode),this.detune.fan(this._carrier.detune,this._modulator.detune),this._modulator.connect(this._modulationNode.gain),this._modulationNode.connect(this._carrier.frequency),this._carrier.connect(this.output),this._readOnly([\"frequency\",\"harmonicity\",\"modulationIndex\",\"oscillator\",\"envelope\",\"modulation\",\"modulationEnvelope\",\"detune\"])},t.extend(t.FMSynth,t.Monophonic),t.FMSynth.defaults={harmonicity:3,modulationIndex:10,detune:0,oscillator:{type:\"sine\"},envelope:{attack:.01,decay:.01,sustain:1,release:.5},modulation:{type:\"square\"},modulationEnvelope:{attack:.5,decay:0,sustain:1,release:.5}},t.FMSynth.prototype._triggerEnvelopeAttack=function(t,e){return t=this.toSeconds(t),this._carrier._triggerEnvelopeAttack(t,e),this._modulator._triggerEnvelopeAttack(t),this},t.FMSynth.prototype._triggerEnvelopeRelease=function(t){return t=this.toSeconds(t),this._carrier._triggerEnvelopeRelease(t),this._modulator._triggerEnvelopeRelease(t),this},t.FMSynth.prototype.dispose=function(){return t.Monophonic.prototype.dispose.call(this),this._writable([\"frequency\",\"harmonicity\",\"modulationIndex\",\"oscillator\",\"envelope\",\"modulation\",\"modulationEnvelope\",\"detune\"]),this._carrier.dispose(),this._carrier=null,this._modulator.dispose(),this._modulator=null,this.frequency.dispose(),this.frequency=null,this.detune.dispose(),this.detune=null,this.modulationIndex.dispose(),this.modulationIndex=null,this.harmonicity.dispose(),this.harmonicity=null,this._modulationNode.dispose(),this._modulationNode=null,this.oscillator=null,this.envelope=null,this.modulationEnvelope=null,this.modulation=null,this},t.FMSynth}),n(function(t){return t.MembraneSynth=function(e){e=t.defaultArg(e,t.MembraneSynth.defaults),t.Instrument.call(this,e),this.oscillator=new t.OmniOscillator(e.oscillator),this.envelope=new t.AmplitudeEnvelope(e.envelope),this.octaves=e.octaves,this.pitchDecay=e.pitchDecay,this.oscillator.chain(this.envelope,this.output),this._readOnly([\"oscillator\",\"envelope\"])},t.extend(t.MembraneSynth,t.Instrument),t.MembraneSynth.defaults={pitchDecay:.05,octaves:10,oscillator:{type:\"sine\"},envelope:{attack:.001,decay:.4,sustain:.01,release:1.4,attackCurve:\"exponential\"}},t.MembraneSynth.prototype.triggerAttack=function(t,e,n){e=this.toSeconds(e);var i=(t=this.toFrequency(t))*this.octaves;return this.oscillator.frequency.setValueAtTime(i,e),this.oscillator.frequency.exponentialRampToValueAtTime(t,e+this.toSeconds(this.pitchDecay)),this.envelope.triggerAttack(e,n),this.oscillator.start(e),this},t.MembraneSynth.prototype.triggerRelease=function(t){return t=this.toSeconds(t),this.envelope.triggerRelease(t),this.oscillator.stop(t+this.envelope.release),this},t.MembraneSynth.prototype.dispose=function(){return t.Instrument.prototype.dispose.call(this),this._writable([\"oscillator\",\"envelope\"]),this.oscillator.dispose(),this.oscillator=null,this.envelope.dispose(),this.envelope=null,this},t.MembraneSynth}),n(function(t){var e=[1,1.483,1.932,2.546,2.63,3.897];return t.MetalSynth=function(n){n=t.defaultArg(n,t.MetalSynth.defaults),t.Instrument.call(this,n),this.frequency=new t.Signal(n.frequency,t.Type.Frequency),this._oscillators=[],this._freqMultipliers=[],this._amplitue=new t.Gain(0).connect(this.output),this._highpass=new t.Filter({type:\"highpass\",Q:-3.0102999566398125}).connect(this._amplitue),this._octaves=n.octaves,this._filterFreqScaler=new t.Scale(n.resonance,7e3),this.envelope=new t.Envelope({attack:n.envelope.attack,attackCurve:\"linear\",decay:n.envelope.decay,sustain:0,release:n.envelope.release}).chain(this._filterFreqScaler,this._highpass.frequency),this.envelope.connect(this._amplitue.gain);for(var i=0;i<e.length;i++){var r=new t.FMOscillator({type:\"square\",modulationType:\"square\",harmonicity:n.harmonicity,modulationIndex:n.modulationIndex});r.connect(this._highpass),this._oscillators[i]=r;var o=new t.Multiply(e[i]);this._freqMultipliers[i]=o,this.frequency.chain(o,r.frequency)}this.octaves=n.octaves},t.extend(t.MetalSynth,t.Instrument),t.MetalSynth.defaults={frequency:200,envelope:{attack:.001,decay:1.4,release:.2},harmonicity:5.1,modulationIndex:32,resonance:4e3,octaves:1.5},t.MetalSynth.prototype.triggerAttack=function(e,n){return e=this.toSeconds(e),n=t.defaultArg(n,1),this.envelope.triggerAttack(e,n),this._oscillators.forEach(function(t){t.start(e)}),0===this.envelope.sustain&&this._oscillators.forEach(function(t){t.stop(e+this.envelope.attack+this.envelope.decay)}.bind(this)),this},t.MetalSynth.prototype.triggerRelease=function(t){return t=this.toSeconds(t),this.envelope.triggerRelease(t),this._oscillators.forEach(function(e){e.stop(t+this.envelope.release)}.bind(this)),this},t.MetalSynth.prototype.sync=function(){return this._syncMethod(\"triggerAttack\",0),this._syncMethod(\"triggerRelease\",0),this},t.MetalSynth.prototype.triggerAttackRelease=function(t,e,n){return e=this.toSeconds(e),t=this.toSeconds(t),this.triggerAttack(e,n),this.triggerRelease(e+t),this},Object.defineProperty(t.MetalSynth.prototype,\"modulationIndex\",{get:function(){return this._oscillators[0].modulationIndex.value},set:function(t){for(var e=0;e<this._oscillators.length;e++)this._oscillators[e].modulationIndex.value=t}}),Object.defineProperty(t.MetalSynth.prototype,\"harmonicity\",{get:function(){return this._oscillators[0].harmonicity.value},set:function(t){for(var e=0;e<this._oscillators.length;e++)this._oscillators[e].harmonicity.value=t}}),Object.defineProperty(t.MetalSynth.prototype,\"resonance\",{get:function(){return this._filterFreqScaler.min},set:function(t){this._filterFreqScaler.min=t,this.octaves=this._octaves}}),Object.defineProperty(t.MetalSynth.prototype,\"octaves\",{get:function(){return this._octaves},set:function(t){this._octaves=t,this._filterFreqScaler.max=this._filterFreqScaler.min*Math.pow(2,t)}}),t.MetalSynth.prototype.dispose=function(){t.Instrument.prototype.dispose.call(this);for(var e=0;e<this._oscillators.length;e++)this._oscillators[e].dispose(),this._freqMultipliers[e].dispose();this._oscillators=null,this._freqMultipliers=null,this.frequency.dispose(),this.frequency=null,this._filterFreqScaler.dispose(),this._filterFreqScaler=null,this._amplitue.dispose(),this._amplitue=null,this.envelope.dispose(),this.envelope=null,this._highpass.dispose(),this._highpass=null},t.MetalSynth}),n(function(t){return t.NoiseSynth=function(e){e=t.defaultArg(e,t.NoiseSynth.defaults),t.Instrument.call(this,e),this.noise=new t.Noise,this.envelope=new t.AmplitudeEnvelope(e.envelope),this.noise.chain(this.envelope,this.output),this._readOnly([\"noise\",\"envelope\"])},t.extend(t.NoiseSynth,t.Instrument),t.NoiseSynth.defaults={noise:{type:\"white\"},envelope:{attack:.005,decay:.1,sustain:0}},t.NoiseSynth.prototype.triggerAttack=function(t,e){return this.envelope.triggerAttack(t,e),this.noise.start(t),0===this.envelope.sustain&&this.noise.stop(t=this.envelope.attack+this.envelope.decay),this},t.NoiseSynth.prototype.triggerRelease=function(t){return this.envelope.triggerRelease(t),this.noise.stop(t+this.envelope.release),this},t.NoiseSynth.prototype.sync=function(){return this._syncMethod(\"triggerAttack\",0),this._syncMethod(\"triggerRelease\",0),this},t.NoiseSynth.prototype.triggerAttackRelease=function(t,e,n){return e=this.toSeconds(e),t=this.toSeconds(t),this.triggerAttack(e,n),this.triggerRelease(e+t),this},t.NoiseSynth.prototype.dispose=function(){return t.Instrument.prototype.dispose.call(this),this._writable([\"noise\",\"envelope\"]),this.noise.dispose(),this.noise=null,this.envelope.dispose(),this.envelope=null,this},t.NoiseSynth}),n(function(t){return t.PluckSynth=function(e){e=t.defaultArg(e,t.PluckSynth.defaults),t.Instrument.call(this,e),this._noise=new t.Noise(\"pink\"),this.attackNoise=e.attackNoise,this._lfcf=new t.LowpassCombFilter({resonance:e.resonance,dampening:e.dampening}),this.resonance=this._lfcf.resonance,this.dampening=this._lfcf.dampening,this._noise.connect(this._lfcf),this._lfcf.connect(this.output),this._readOnly([\"resonance\",\"dampening\"])},t.extend(t.PluckSynth,t.Instrument),t.PluckSynth.defaults={attackNoise:1,dampening:4e3,resonance:.7},t.PluckSynth.prototype.triggerAttack=function(t,e){t=this.toFrequency(t),e=this.toSeconds(e);var n=1/t;return this._lfcf.delayTime.setValueAtTime(n,e),this._noise.start(e),this._noise.stop(e+n*this.attackNoise),this},t.PluckSynth.prototype.dispose=function(){return t.Instrument.prototype.dispose.call(this),this._noise.dispose(),this._lfcf.dispose(),this._noise=null,this._lfcf=null,this._writable([\"resonance\",\"dampening\"]),this.dampening=null,this.resonance=null,this},t.PluckSynth}),n(function(t){return t.PolySynth=function(){var e=t.defaults(arguments,[\"polyphony\",\"voice\"],t.PolySynth);t.Instrument.call(this,e),(e=t.defaultArg(e,t.Instrument.defaults)).polyphony=Math.min(t.PolySynth.MAX_POLYPHONY,e.polyphony),this.voices=new Array(e.polyphony),this._triggers=new Array(e.polyphony),this.detune=new t.Signal(e.detune,t.Type.Cents),this._readOnly(\"detune\");for(var n=0;n<e.polyphony;n++){var i=new e.voice(arguments[2],arguments[3]);if(!(i instanceof t.Monophonic))throw new Error(\"Synth constructor must be instance of Tone.Monophonic\");this.voices[n]=i,i.connect(this.output),i.hasOwnProperty(\"detune\")&&this.detune.connect(i.detune),this._triggers[n]={release:-1,note:null,voice:i}}},t.extend(t.PolySynth,t.Instrument),t.PolySynth.defaults={polyphony:4,volume:0,detune:0,voice:t.Synth},t.PolySynth.prototype.triggerAttack=function(t,e,n){Array.isArray(t)||(t=[t]),e=this.toSeconds(e);for(var i=0;i<t.length;i++){for(var r=t[i],o=this._triggers[0],s=1;s<this._triggers.length;s++)this._triggers[s].release<o.release&&(o=this._triggers[s]);o.release=1/0,o.note=JSON.stringify(r),o.voice.triggerAttack(r,e,n)}return this},t.PolySynth.prototype.triggerAttackRelease=function(e,n,i,r){if(i=this.toSeconds(i),this.triggerAttack(e,i,r),t.isArray(n)&&t.isArray(e))for(var o=0;o<e.length;o++){var s=n[Math.min(o,n.length-1)];this.triggerRelease(e[o],i+this.toSeconds(s))}else this.triggerRelease(e,i+this.toSeconds(n));return this},t.PolySynth.prototype.triggerRelease=function(t,e){Array.isArray(t)||(t=[t]),e=this.toSeconds(e);for(var n=0;n<t.length;n++)for(var i=JSON.stringify(t[n]),r=0;r<this._triggers.length;r++){var o=this._triggers[r];o.note===i&&o.release>e&&(o.voice.triggerRelease(e),o.release=e)}return this},t.PolySynth.prototype.sync=function(){return this._syncMethod(\"triggerAttack\",1),this._syncMethod(\"triggerRelease\",1),this},t.PolySynth.prototype.set=function(t,e,n){for(var i=0;i<this.voices.length;i++)this.voices[i].set(t,e,n);return this},t.PolySynth.prototype.get=function(t){return this.voices[0].get(t)},t.PolySynth.prototype.releaseAll=function(t){t=this.toSeconds(t);for(var e=0;e<this._triggers.length;e++){var n=this._triggers[e];n.release>t&&(n.release=t,n.voice.triggerRelease(t))}return this},t.PolySynth.prototype.dispose=function(){t.Instrument.prototype.dispose.call(this);for(var e=0;e<this.voices.length;e++)this.voices[e].dispose(),this.voices[e]=null;return this._writable(\"detune\"),this.detune.dispose(),this.detune=null,this.voices=null,this._triggers=null,this},t.PolySynth.MAX_POLYPHONY=20,t.PolySynth}),n(function(t){return t.Sampler=function(e){var n=Array.prototype.slice.call(arguments);n.shift();var i=t.defaults(n,[\"onload\",\"baseUrl\"],t.Sampler);t.Instrument.call(this,i);var r={};for(var o in e)if(t.isNote(o))r[t.Frequency(o).toMidi()]=e[o];else{if(isNaN(parseFloat(o)))throw new Error(\"Tone.Sampler: url keys must be the note's pitch\");r[o]=e[o]}this._buffers=new t.Buffers(r,i.onload,i.baseUrl),this._activeSources={},this.attack=i.attack,this.release=i.release},t.extend(t.Sampler,t.Instrument),t.Sampler.defaults={attack:0,release:.1,onload:t.noOp,baseUrl:\"\"},t.Sampler.prototype._findClosest=function(t){for(var e=0;e<96;){if(this._buffers.has(t+e))return-e;if(this._buffers.has(t-e))return e;e++}return null},t.Sampler.prototype.triggerAttack=function(e,n,i){var r=t.Frequency(e).toMidi(),o=this._findClosest(r);if(null!==o){var s=r-o,a=this._buffers.get(s),u=new t.BufferSource({buffer:a,playbackRate:t.intervalToFrequencyRatio(o),fadeIn:this.attack,fadeOut:this.release,curve:\"exponential\"}).connect(this.output);u.start(n,0,a.duration,i),t.isArray(this._activeSources[r])||(this._activeSources[r]=[]),this._activeSources[r].push({note:r,source:u})}return this},t.Sampler.prototype.triggerRelease=function(e,n){var i=t.Frequency(e).toMidi();if(this._activeSources[i]&&this._activeSources[i].length){var r=this._activeSources[i].shift().source;n=this.toSeconds(n),r.stop(n+this.release,this.release)}return this},t.Sampler.prototype.releaseAll=function(t){for(var e in t=this.toSeconds(t),this._activeSources)for(var n=this._activeSources[e];n.length;)n.shift().source.stop(t+this.release,this.release);return this},t.Sampler.prototype.sync=function(){return this._syncMethod(\"triggerAttack\",1),this._syncMethod(\"triggerRelease\",1),this},t.Sampler.prototype.triggerAttackRelease=function(t,e,n,i){return n=this.toSeconds(n),e=this.toSeconds(e),this.triggerAttack(t,n,i),this.triggerRelease(t,n+e),this},t.Sampler.prototype.add=function(e,n,i){if(t.isNote(e)){var r=t.Frequency(e).toMidi();this._buffers.add(r,n,i)}else{if(isNaN(parseFloat(e)))throw new Error(\"Tone.Sampler: note must be the note's pitch. Instead got \"+e);this._buffers.add(e,n,i)}},Object.defineProperty(t.Sampler.prototype,\"loaded\",{get:function(){return this._buffers.loaded}}),t.Sampler.prototype.dispose=function(){for(var e in t.Instrument.prototype.dispose.call(this),this._buffers.dispose(),this._buffers=null,this._activeSources)this._activeSources[e].forEach(function(t){t.source.dispose()});return this._activeSources=null,this},t.Sampler}),n(function(t){t.supported&&(OscillatorNode.prototype.setPeriodicWave||(OscillatorNode.prototype.setPeriodicWave=OscillatorNode.prototype.setWaveTable),AudioContext.prototype.createPeriodicWave||(AudioContext.prototype.createPeriodicWave=AudioContext.prototype.createWaveTable))}),n(function(t){return t.GainToAudio=function(){t.SignalBase.call(this),this._norm=this.input=this.output=new t.WaveShaper(function(t){return 2*Math.abs(t)-1})},t.extend(t.GainToAudio,t.SignalBase),t.GainToAudio.prototype.dispose=function(){return t.SignalBase.prototype.dispose.call(this),this._norm.dispose(),this._norm=null,this},t.GainToAudio}),n(function(t){return t.Normalize=function(e,n){t.SignalBase.call(this),this._inputMin=t.defaultArg(e,0),this._inputMax=t.defaultArg(n,1),this._sub=this.input=new t.Add(0),this._div=this.output=new t.Multiply(1),this._sub.connect(this._div),this._setRange()},t.extend(t.Normalize,t.SignalBase),Object.defineProperty(t.Normalize.prototype,\"min\",{get:function(){return this._inputMin},set:function(t){this._inputMin=t,this._setRange()}}),Object.defineProperty(t.Normalize.prototype,\"max\",{get:function(){return this._inputMax},set:function(t){this._inputMax=t,this._setRange()}}),t.Normalize.prototype._setRange=function(){this._sub.value=-this._inputMin,this._div.value=1/(this._inputMax-this._inputMin)},t.Normalize.prototype.dispose=function(){return t.SignalBase.prototype.dispose.call(this),this._sub.dispose(),this._sub=null,this._div.dispose(),this._div=null,this},t.Normalize}),n(function(t){return t.TransportTimelineSignal=function(){t.Signal.apply(this,arguments),this.output=this._outputSig=new t.Signal(this._initialValue),this._lastVal=this.value,this._synced=t.Transport.scheduleRepeat(this._onTick.bind(this),\"1i\"),this._bindAnchorValue=this._anchorValue.bind(this),t.Transport.on(\"start stop pause\",this._bindAnchorValue),this._events.memory=1/0},t.extend(t.TransportTimelineSignal,t.Signal),t.TransportTimelineSignal.prototype._onTick=function(e){var n=this.getValueAtTime(t.Transport.seconds);this._lastVal!==n&&(this._lastVal=n,this._outputSig.linearRampToValueAtTime(n,e))},t.TransportTimelineSignal.prototype._anchorValue=function(e){var n=this.getValueAtTime(t.Transport.seconds);return this._lastVal=n,this._outputSig.cancelScheduledValues(e),this._outputSig.setValueAtTime(n,e),this},t.TransportTimelineSignal.prototype.getValueAtTime=function(e){return e=t.TransportTime(e),t.Signal.prototype.getValueAtTime.call(this,e)},t.TransportTimelineSignal.prototype.setValueAtTime=function(e,n){return n=t.TransportTime(n),t.Signal.prototype.setValueAtTime.call(this,e,n),this},t.TransportTimelineSignal.prototype.linearRampToValueAtTime=function(e,n){return n=t.TransportTime(n),t.Signal.prototype.linearRampToValueAtTime.call(this,e,n),this},t.TransportTimelineSignal.prototype.exponentialRampToValueAtTime=function(e,n){return n=t.TransportTime(n),t.Signal.prototype.exponentialRampToValueAtTime.call(this,e,n),this},t.TransportTimelineSignal.prototype.setTargetAtTime=function(e,n,i){return n=t.TransportTime(n),t.Signal.prototype.setTargetAtTime.call(this,e,n,i),this},t.TransportTimelineSignal.prototype.cancelScheduledValues=function(e){return e=t.TransportTime(e),t.Signal.prototype.cancelScheduledValues.call(this,e),this},t.TransportTimelineSignal.prototype.setValueCurveAtTime=function(e,n,i,r){return n=t.TransportTime(n),i=t.TransportTime(i),t.Signal.prototype.setValueCurveAtTime.call(this,e,n,i,r),this},t.TransportTimelineSignal.prototype.cancelAndHoldAtTime=function(e){return t.Signal.prototype.cancelAndHoldAtTime.call(this,t.TransportTime(e))},t.TransportTimelineSignal.prototype.dispose=function(){t.Transport.clear(this._synced),t.Transport.off(\"start stop pause\",this._syncedCallback),this._events.cancel(0),t.Signal.prototype.dispose.call(this),this._outputSig.dispose(),this._outputSig=null},t.TransportTimelineSignal}),n(function(t){return t.GrainPlayer=function(){var e=t.defaults(arguments,[\"url\",\"onload\"],t.GrainPlayer);t.Source.call(this,e),this.buffer=new t.Buffer(e.url,e.onload),this._clock=new t.Clock(this._tick.bind(this),e.grainSize),this._loopStart=0,this._loopEnd=0,this._activeSources=[],this._playbackRate=e.playbackRate,this._grainSize=e.grainSize,this._overlap=e.overlap,this.detune=e.detune,this.overlap=e.overlap,this.loop=e.loop,this.playbackRate=e.playbackRate,this.grainSize=e.grainSize,this.loopStart=e.loopStart,this.loopEnd=e.loopEnd,this.reverse=e.reverse,this._clock.on(\"stop\",this._onstop.bind(this))},t.extend(t.GrainPlayer,t.Source),t.GrainPlayer.defaults={onload:t.noOp,overlap:.1,grainSize:.2,playbackRate:1,detune:0,loop:!1,loopStart:0,loopEnd:0,reverse:!1},t.GrainPlayer.prototype._start=function(e,n,i){n=t.defaultArg(n,0),n=this.toSeconds(n),e=this.toSeconds(e),this._offset=n,this._clock.start(e),i&&this.stop(e+this.toSeconds(i))},t.GrainPlayer.prototype._stop=function(t){this._clock.stop(t)},t.GrainPlayer.prototype._onstop=function(t){this._activeSources.forEach(function(e){e.stop(t,0)})},t.GrainPlayer.prototype._tick=function(e){var n=this._offset<this._overlap?0:this._overlap,i=new t.BufferSource({buffer:this.buffer,fadeIn:n,fadeOut:this._overlap,loop:this.loop,loopStart:this._loopStart,loopEnd:this._loopEnd,playbackRate:t.intervalToFrequencyRatio(this.detune/100)}).connect(this.output);i.start(e,this._offset),this._offset+=this.grainSize,i.stop(e+this.grainSize),this._activeSources.push(i),i.onended=function(){var t=this._activeSources.indexOf(i);-1!==t&&this._activeSources.splice(t,1)}.bind(this)},t.GrainPlayer.prototype.seek=function(t,e){return this._offset=this.toSeconds(t),this._tick(this.toSeconds(e)),this},Object.defineProperty(t.GrainPlayer.prototype,\"playbackRate\",{get:function(){return this._playbackRate},set:function(t){this._playbackRate=t,this.grainSize=this._grainSize}}),Object.defineProperty(t.GrainPlayer.prototype,\"loopStart\",{get:function(){return this._loopStart},set:function(t){this._loopStart=this.toSeconds(t)}}),Object.defineProperty(t.GrainPlayer.prototype,\"loopEnd\",{get:function(){return this._loopEnd},set:function(t){this._loopEnd=this.toSeconds(t)}}),Object.defineProperty(t.GrainPlayer.prototype,\"reverse\",{get:function(){return this.buffer.reverse},set:function(t){this.buffer.reverse=t}}),Object.defineProperty(t.GrainPlayer.prototype,\"grainSize\",{get:function(){return this._grainSize},set:function(t){this._grainSize=this.toSeconds(t),this._clock.frequency.value=this._playbackRate/this._grainSize}}),Object.defineProperty(t.GrainPlayer.prototype,\"overlap\",{get:function(){return this._overlap},set:function(t){this._overlap=this.toSeconds(t)}}),t.GrainPlayer.prototype.dispose=function(){return t.Source.prototype.dispose.call(this),this.buffer.dispose(),this.buffer=null,this._clock.dispose(),this._clock=null,this._activeSources.forEach(function(t){t.dispose()}),this._activeSources=null,this},t.GrainPlayer}),n(function(t){return t.Player=function(e){var n;e instanceof t.Buffer&&e.loaded?(e=e.get(),n=t.Player.defaults):n=t.defaults(arguments,[\"url\",\"onload\"],t.Player),t.Source.call(this,n),this.autostart=n.autostart,this._buffer=new t.Buffer({url:n.url,onload:this._onload.bind(this,n.onload),reverse:n.reverse}),e instanceof AudioBuffer&&this._buffer.set(e),this._loop=n.loop,this._loopStart=n.loopStart,this._loopEnd=n.loopEnd,this._playbackRate=n.playbackRate,this._activeSources=[],this._elapsedTime=new t.TickSource(n.playbackRate),this.fadeIn=n.fadeIn,this.fadeOut=n.fadeOut},t.extend(t.Player,t.Source),t.Player.defaults={onload:t.noOp,playbackRate:1,loop:!1,autostart:!1,loopStart:0,loopEnd:0,retrigger:!1,reverse:!1,fadeIn:0,fadeOut:0},t.Player.prototype.load=function(t,e){return this._buffer.load(t,this._onload.bind(this,e))},t.Player.prototype._onload=function(e){(e=t.defaultArg(e,t.noOp))(this),this.autostart&&this.start()},t.Player.prototype._onSourceEnd=function(t){var e=this._activeSources.indexOf(t);this._activeSources.splice(e,1)},t.Player.prototype._start=function(e,n,i){n=this._loop?t.defaultArg(n,this._loopStart):t.defaultArg(n,0),n=this.toSeconds(n);var r=t.defaultArg(i,Math.max(this._buffer.duration-n,0));r=this.toSeconds(r),e=this.toSeconds(e),this._elapsedTime.start(e,n);var o=new t.BufferSource({buffer:this._buffer,loop:this._loop,loopStart:this._loopStart,loopEnd:this._loopEnd,onended:this._onSourceEnd.bind(this),playbackRate:this._playbackRate,fadeIn:this.fadeIn,fadeOut:this.fadeOut}).connect(this.output);return this._loop||this._synced||this._state.setStateAtTime(t.State.Stopped,e+r/this._playbackRate),this._activeSources.push(o),this._loop&&t.isUndef(i)?o.start(e,n):o.start(e,n,r),this},t.Player.prototype._stop=function(t){return t=this.toSeconds(t),this._elapsedTime.stop(t),this._activeSources.forEach(function(e){e.stop(t)}),this},t.Player.prototype.restart=function(t,e,n){return this._stop(t),this._start(t,e,n),this},t.Player.prototype.seek=function(e,n){return n=this.toSeconds(n),this._state.getValueAtTime(n)===t.State.Started&&(e=this.toSeconds(e),this._stop(n),this._start(n,e)),this},t.Player.prototype.setLoopPoints=function(t,e){return this.loopStart=t,this.loopEnd=e,this},Object.defineProperty(t.Player.prototype,\"loopStart\",{get:function(){return this._loopStart},set:function(t){this._loopStart=t,this._activeSources.forEach(function(e){e.loopStart=t})}}),Object.defineProperty(t.Player.prototype,\"loopEnd\",{get:function(){return this._loopEnd},set:function(t){this._loopEnd=t,this._activeSources.forEach(function(e){e.loopEnd=t})}}),Object.defineProperty(t.Player.prototype,\"buffer\",{get:function(){return this._buffer},set:function(t){this._buffer.set(t)}}),Object.defineProperty(t.Player.prototype,\"loop\",{get:function(){return this._loop},set:function(e){if(this._loop!==e){this._loop=e;var n=this.now();if(e){var i=this._state.getNextState(t.State.Stopped,n);i&&(this._activeSources.forEach(function(t){t.loop=e}),this._state.cancel(i.time),this._elapsedTime.cancel(i.time))}else this._stopAtNextIteration(n)}}}),t.Player.prototype._stopAtNextIteration=function(e){if(this._state.getValueAtTime(e)===t.State.Started){var n=this._state.getNextState(t.State.Stopped,e),i=this._elapsedTime.getTicksAtTime(e),r=Math.max(Math.ceil(i/this.buffer.duration),1),o=this._elapsedTime.getTimeOfTick(r*this.buffer.duration,n?n.time-this.sampleTime:1/0);this.stop(o)}},Object.defineProperty(t.Player.prototype,\"playbackRate\",{get:function(){return this._playbackRate},set:function(t){this._playbackRate=t;var e=this.now();this._elapsedTime.frequency.setValueAtTime(t,e),this._loop||this._stopAtNextIteration(e),this._activeSources.forEach(function(n){n.playbackRate.setValueAtTime(t,e)})}}),Object.defineProperty(t.Player.prototype,\"position\",{get:function(){var e=this.now();if(this._state.getValueAtTime(e)===t.State.Started&&this.loaded){var n=this.buffer.duration;return this._elapsedTime.getTicksAtTime(e)%n}return 0}}),Object.defineProperty(t.Player.prototype,\"reverse\",{get:function(){return this._buffer.reverse},set:function(t){this._buffer.reverse=t}}),Object.defineProperty(t.Player.prototype,\"loaded\",{get:function(){return this._buffer.loaded}}),t.Player.prototype.dispose=function(){return this._activeSources.forEach(function(t){t.dispose()}),this._activeSources=null,t.Source.prototype.dispose.call(this),this._buffer.dispose(),this._buffer=null,this._elapsedTime.dispose(),this._elapsedTime=null,this},t.Player}),n(function(t){return t.Players=function(e){var n=Array.prototype.slice.call(arguments);n.shift();var i=t.defaults(n,[\"onload\"],t.Players);for(var r in t.call(this),this._volume=this.output=new t.Volume(i.volume),this.volume=this._volume.volume,this._readOnly(\"volume\"),this._volume.output.output.channelCount=2,this._volume.output.output.channelCountMode=\"explicit\",this.mute=i.mute,this._players={},this._loadingCount=0,this._fadeIn=i.fadeIn,this._fadeOut=i.fadeOut,e)this._loadingCount++,this.add(r,e[r],this._bufferLoaded.bind(this,i.onload))},t.extend(t.Players,t.AudioNode),t.Players.defaults={volume:0,mute:!1,onload:t.noOp,fadeIn:0,fadeOut:0},t.Players.prototype._bufferLoaded=function(t){this._loadingCount--,0===this._loadingCount&&t&&t(this)},Object.defineProperty(t.Players.prototype,\"mute\",{get:function(){return this._volume.mute},set:function(t){this._volume.mute=t}}),Object.defineProperty(t.Players.prototype,\"fadeIn\",{get:function(){return this._fadeIn},set:function(t){this._fadeIn=t,this._forEach(function(e){e.fadeIn=t})}}),Object.defineProperty(t.Players.prototype,\"fadeOut\",{get:function(){return this._fadeOut},set:function(t){this._fadeOut=t,this._forEach(function(e){e.fadeOut=t})}}),Object.defineProperty(t.Players.prototype,\"state\",{get:function(){var e=!1;return this._forEach(function(n){e=e||n.state===t.State.Started}),e?t.State.Started:t.State.Stopped}}),t.Players.prototype.has=function(t){return this._players.hasOwnProperty(t)},t.Players.prototype.get=function(t){if(this.has(t))return this._players[t];throw new Error(\"Tone.Players: no player named \"+t)},t.Players.prototype._forEach=function(t){for(var e in this._players)t(this._players[e],e);return this},Object.defineProperty(t.Players.prototype,\"loaded\",{get:function(){var t=!0;return this._forEach(function(e){t=t&&e.loaded}),t}}),t.Players.prototype.add=function(e,n,i){return this._players[e]=new t.Player(n,i).connect(this.output),this._players[e].fadeIn=this._fadeIn,this._players[e].fadeOut=this._fadeOut,this},t.Players.prototype.stopAll=function(t){this._forEach(function(e){e.stop(t)})},t.Players.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this._volume.dispose(),this._volume=null,this._writable(\"volume\"),this.volume=null,this.output=null,this._forEach(function(t){t.dispose()}),this._players=null,this},t.Players}),n(function(t){return t.UserMedia=function(){var e=t.defaults(arguments,[\"volume\"],t.UserMedia);t.AudioNode.call(this),this._mediaStream=null,this._stream=null,this._device=null,this._volume=this.output=new t.Volume(e.volume),this.volume=this._volume.volume,this._readOnly(\"volume\"),this.mute=e.mute},t.extend(t.UserMedia,t.AudioNode),t.UserMedia.defaults={volume:0,mute:!1},t.UserMedia.prototype.open=function(e){return t.UserMedia.enumerateDevices().then(function(n){var i;if(t.isNumber(e))i=n[e];else if(!(i=n.find(function(t){return t.label===e||t.deviceId===e}))&&n.length>0)i=n[0];else if(!i&&t.isDefined(e))throw new Error(\"Tone.UserMedia: no matching device: \"+e);this._device=i;var r={audio:{echoCancellation:!1,sampleRate:this.context.sampleRate}};return i&&(r.audio.deviceId=i.deviceId),navigator.mediaDevices.getUserMedia(r).then(function(t){return this._stream||(this._stream=t,this._mediaStream=this.context.createMediaStreamSource(t),this._mediaStream.connect(this.output)),this}.bind(this))}.bind(this))},t.UserMedia.prototype.close=function(){return this._stream&&(this._stream.getAudioTracks().forEach(function(t){t.stop()}),this._stream=null,this._mediaStream.disconnect(),this._mediaStream=null),this._device=null,this},t.UserMedia.enumerateDevices=function(){return navigator.mediaDevices.enumerateDevices().then(function(t){return t.filter(function(t){return\"audioinput\"===t.kind})})},Object.defineProperty(t.UserMedia.prototype,\"state\",{get:function(){return this._stream&&this._stream.active?t.State.Started:t.State.Stopped}}),Object.defineProperty(t.UserMedia.prototype,\"deviceId\",{get:function(){if(this._device)return this._device.deviceId}}),Object.defineProperty(t.UserMedia.prototype,\"groupId\",{get:function(){if(this._device)return this._device.groupId}}),Object.defineProperty(t.UserMedia.prototype,\"label\",{get:function(){if(this._device)return this._device.label}}),Object.defineProperty(t.UserMedia.prototype,\"mute\",{get:function(){return this._volume.mute},set:function(t){this._volume.mute=t}}),t.UserMedia.prototype.dispose=function(){return t.AudioNode.prototype.dispose.call(this),this.close(),this._writable(\"volume\"),this._volume.dispose(),this._volume=null,this.volume=null,this},Object.defineProperty(t.UserMedia,\"supported\",{get:function(){return t.isDefined(navigator.mediaDevices)&&t.isFunction(navigator.mediaDevices.getUserMedia)}}),t.UserMedia}),n(function(t){return t.Midi=function(e,n){if(!(this instanceof t.Midi))return new t.Midi(e,n);t.Frequency.call(this,e,n)},t.extend(t.Midi,t.Frequency),t.Midi.prototype._defaultUnits=\"midi\",t.Midi.prototype._frequencyToUnits=function(e){return t.Frequency.ftom(t.Frequency.prototype._frequencyToUnits.call(this,e))},t.Midi.prototype._ticksToUnits=function(e){return t.Frequency.ftom(t.Frequency.prototype._ticksToUnits.call(this,e))},t.Midi.prototype._beatsToUnits=function(e){return t.Frequency.ftom(t.Frequency.prototype._beatsToUnits.call(this,e))},t.Midi.prototype._secondsToUnits=function(e){return t.Frequency.ftom(t.Frequency.prototype._secondsToUnits.call(this,e))},t.Midi.prototype.toMidi=function(){return this.valueOf()},t.Midi.prototype.toFrequency=function(){return t.Frequency.mtof(this.toMidi())},t.Midi.prototype.transpose=function(t){return new this.constructor(this.toMidi()+t)},t.Midi}),t}()}.call(e,n,e,t))||(t.exports=i)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.startSynthesizing=function(){p=!0},e.stopSynthesizing=function(){p=!1},e.startRecording=function(){f=new r.default.Video(25,.95),c=!0,i.store.dispatch({type:o.default.player.start_recording})},e.stopRecording=function(){if(!c)return;c=!1,i.store.dispatch({type:o.default.player.saving_video}),f.compile(!1,function(t){i.store.dispatch({type:o.default.player.save_video,blob:t})})},e.saveFrame=function(){h=!0},e.onFrame=function(t){var e=new Blob([t.frame],{type:\"image/jpg\"}),n=URL.createObjectURL(e),r=new Image,a=document.querySelector(\".player canvas\");if(!a)return console.error(\"no canvas for frame\");r.onload=function(){r.onload=null,l=t.meta,URL.revokeObjectURL(n);var e=a.getContext(\"2d-lodpi\");if(e.drawImage(r,0,0,a.width,a.height),p){var d=e.getImageData(0,0,a.width,a.height);s.play({imageData:d})}c&&(console.log(\"record frame\"),f.add(a),i.store.dispatch({type:o.default.player.add_record_frame})),h&&(h=!1,a.toBlob(function(t){i.store.dispatch({type:o.default.player.save_frame,blob:t})})),u+=1},r.src=n},e.toggleFPS=function(t){y=void 0!==t?t:i.store.getState().live.playing,d!==y&&(y?_():v());d=y},e.startWatchingFPS=_,e.stopWatchingFPS=v;var i=n(19),r=a(n(255)),o=a(n(6)),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(129));function a(t){return t&&t.__esModule?t:{default:t}}var u=0,l=void 0,c=!1,h=!1,p=!1,f=void 0;var d=void 0,y=void 0;var m=void 0;function _(){clearInterval(m),m=setInterval(function(){i.store.dispatch({type:o.default.player.set_fps,fps:u}),i.store.dispatch({type:o.default.player.current_frame,meta:l}),u=0},1e3)}function v(){clearInterval(m)}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i,r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},o=n(6),s=(i=o)&&i.__esModule?i:{default:i};function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{loading:!0,progress:null,error:null,data:null,folder_id:0},e=arguments[1];switch(e.type){case s.default.app.load_progress:return r({},t,{progress:e.progress});case s.default.dataset.load:return r({},t,{loading:!1,data:e.data});case s.default.dataset.set_folder:return r({},t,{folder_id:e.data.folder_id});case s.default.folder.create:return r({},t,{loading:!1,data:{folders:t.data.folders.concat([e.data.id]),folderLookup:r({},t.data.folderLookup,a({},e.data.id,e.data))}});case s.default.file.create:return function(t,e){if(console.log(e.data),!t.data||!t.data.datasetLookup)return t;var n=void 0,i=void 0,o=void 0,s=void 0,u=void 0;return(u=e.data.dataset?e.data.dataset:e.data.name?e.data.name.split(\".\")[0]:e.data.url?e.data.url:null)in t.data.datasetLookup?(i=t.data.datasetLookup[u],n=r({},i,{input:e.data.generated?i.input:[e.data.id].concat(i.input),output:e.data.generated?[e.data.id].concat(i.output):i.output})):(console.log(e.data.created_at,e.data.date),n={name:u,date:e.data.created_at||e.data.date,input:e.data.generated?[]:[e.data.id],checkpoints:[],output:e.data.generated?[e.data.id]:[]}),s=t.data.folderLookup[e.data.folder_id],o=r({},s,{datasets:s.datasets.concat([u]),files:s.files.concat([e.data.id])}),r({},t,{loading:!1,data:r({},t.data,{files:t.data.files.concat([e.data.id]),folderLookup:r({},t.data.folderLookup,a({},e.data.folder_id,o)),fileLookup:r({},t.data.fileLookup,a({},e.data.id,e.data)),datasetLookup:r({},t.data.datasetLookup,a({},u,n))})})}(t,e);case s.default.file.update:return function(t,e){var n,i=void 0,o=t.data.datasetLookup[e.data.dataset],s=t.data.fileLookup[e.data.id],u=void 0;return s&&e.data.dataset!==s.dataset&&(t.data.datasetLookup[s.dataset]&&(i=t.data.datasetLookup[s.dataset],old_dataset_update=r({},i,{input:i.input.filter(function(t){return t!==e.data.id}),output:i.output.filter(function(t){return t!==e.data.id})})),u=r({},o,{input:e.data.generated?[]:[e.data.id],output:e.data.generated?[e.data.id]:[]})),console.log(\"old_dataset\",old_dataset_update.name),console.log(\"new_dataset\",u.name),r({},t,{loading:!1,data:r({},t.data,{datasetLookup:i?r({},t.data.datasetLookup,(n={},a(n,i.name,old_dataset_update),a(n,o.name,u),n)):u?r({},t.data.datasetLookup,a({},o.name,u)):t.data.datasetLookup,fileLookup:r({},t.data.fileLookup,a({},e.data.id,e.data))})})}(t,e);case s.default.file.destroy:return function(t,e){if(!t.data)return t;var n=r({},t.data.fileLookup),i=r({},t.data.datasetLookup),o=r({},t.data.folderLookup),s=n[e.data.id];if(!s)return t;var a=t.data.datasetLookup[s.dataset],u=void 0;if(a)if((u=r({},a,{input:a.input.filter(function(t){return t!==s.id}),output:a.output.filter(function(t){return t!==s.id})})).input.length||u.checkpoints.length||u.output.length)console.log(\"dataset just needs sweeping\"),i[s.dataset]=u;else{delete i[s.dataset];var l=o[s.folder_id];o[s.folder_id]=r({},l,{datasets:l.datasets.filter(function(t){return t!==s.dataset})})}return delete n[s.id],r({},t,{loading:!1,data:r({},t.data,{folderLookup:o,fileLookup:n,datasetLookup:i})})}(t,e);case s.default.dataset.list_epochs:return r({},t,{data:r({},t.data,{epochs:e.data.epochs})});default:return t}}},function(t,e){var n,i,r=t.exports={};function o(){throw new Error(\"setTimeout has not been defined\")}function s(){throw new Error(\"clearTimeout has not been defined\")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n=\"function\"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i=\"function\"==typeof clearTimeout?clearTimeout:s}catch(t){i=s}}();var u,l=[],c=!1,h=-1;function p(){c&&u&&(c=!1,u.length?l=u.concat(l):h=-1,l.length&&f())}function f(){if(!c){var t=a(p);c=!0;for(var e=l.length;e;){for(u=l,l=[];++h<e;)u&&u[h].run();h=-1,e=l.length}u=null,c=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function y(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];l.push(new d(t,e)),1!==l.length||c||a(f)},d.prototype.run=function(){this.fun.apply(null,this.array)},r.title=\"browser\",r.browser=!0,r.env={},r.argv=[],r.version=\"\",r.versions={},r.on=y,r.addListener=y,r.once=y,r.off=y,r.removeListener=y,r.removeAllListeners=y,r.emit=y,r.prependListener=y,r.prependOnceListener=y,r.listeners=function(t){return[]},r.binding=function(t){throw new Error(\"process.binding is not supported\")},r.cwd=function(){return\"/\"},r.chdir=function(t){throw new Error(\"process.chdir is not supported\")},r.umask=function(){return 0}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}}(),r=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),s=n(1),a=n(3);n(2);var u=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.handleChange=n.handleChange.bind(n),n}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,s.Component),o(e,[{key:\"handleChange\",value:function(t){clearTimeout(this.timeout);var e=t.target.value;\"PLACEHOLDER\"!==e&&this.props.onChange&&this.props.onChange(this.props.name,e)}},{key:\"render\",value:function(){var t=this.props.live?this.props.opt[this.props.name]:this.props.value,e=void 0,n=(this.props.options||[]).map(function(t,n){var o=void 0,a=void 0;if(\"string\"==typeof t)o=t.length<2?t.toUpperCase():t,a=t;else if(\"object\"===(void 0===t?\"undefined\":r(t)))if(t.length){var u=i(t,2);o=u[0],a=u[1]}else if(t.count){var l=Math.round(t.count/30)+\" s.\";o=t.name.replace(/_/g,\" \")+\" (\"+l+\")\",a=t.name}else o=t.name,a=t.value||t.name;return e=a,(0,s.h)(\"option\",{value:a,key:n},o)});return(0,s.h)(\"div\",{className:\"select param\"},(0,s.h)(\"label\",null,(0,s.h)(\"span\",null,this.props.title),(0,s.h)(\"select\",{onChange:this.handleChange,value:t||e},this.props.placeholder&&(0,s.h)(\"option\",{value:\"PLACEHOLDER\"},this.props.placeholder),n)),this.props.children)}}]),e}();e.default=(0,a.connect)(function(t,e){return{opt:e.opt||t.live.opt}},function(t,e){return{}})(u)},function(t,e){var n=t.exports=\"undefined\"!=typeof window&&window.Math==Math?window:\"undefined\"!=typeof self&&self.Math==Math?self:Function(\"return this\")();\"number\"==typeof __g&&(__g=n)},function(t,e,n){\"use strict\";(function(e){t.exports={isNode:void 0!==e,newBufferFrom:function(t,n){return new e(t,n)},allocBuffer:function(t){return e.alloc?e.alloc(t):new e(t)},isBuffer:function(t){return e.isBuffer(t)},isStream:function(t){return t&&\"function\"==typeof t.on&&\"function\"==typeof t.pause&&\"function\"==typeof t.resume}}}).call(this,n(37).Buffer)},function(t,e,n){var i=n(37),r=i.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function s(t,e,n){return r(t,e,n)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=i:(o(i,e),e.Buffer=s),o(r,s),s.from=function(t,e,n){if(\"number\"==typeof t)throw new TypeError(\"Argument must not be a number\");return r(t,e,n)},s.alloc=function(t,e,n){if(\"number\"!=typeof t)throw new TypeError(\"Argument must be a number\");var i=r(t);return void 0!==e?\"string\"==typeof n?i.fill(e,n):i.fill(e):i.fill(0),i},s.allocUnsafe=function(t){if(\"number\"!=typeof t)throw new TypeError(\"Argument must be a number\");return r(t)},s.allocUnsafeSlow=function(t){if(\"number\"!=typeof t)throw new TypeError(\"Argument must be a number\");return i.SlowBuffer(t)}},function(t,e,n){\"use strict\";(function(e){!e.version||0===e.version.indexOf(\"v0.\")||0===e.version.indexOf(\"v1.\")&&0!==e.version.indexOf(\"v1.8.\")?t.exports={nextTick:function(t,n,i,r){if(\"function\"!=typeof t)throw new TypeError('\"callback\" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,n)});case 3:return e.nextTick(function(){t.call(null,n,i)});case 4:return e.nextTick(function(){t.call(null,n,i,r)});default:for(o=new Array(a-1),s=0;s<o.length;)o[s++]=arguments[s];return e.nextTick(function(){t.apply(null,o)})}}}:t.exports=e}).call(this,n(51))},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});e.default={name:\"pix2wav\",displayName:\"Pix2Wav\",datatype:\"spectrogram\"}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.clear_recursive_task=e.augment_task=e.live_task=e.train_task=e.fetch_task=void 0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=(s(n(17)),s(n(14)),s(n(6)),s(n(8))),o=s(n(38));function s(t){return t&&t.__esModule?t:{default:t}}e.fetch_task=function(t,e,n){return function(i){if(!t)return console.log(\"input file inaccessible (no url)\");var s={module:o.default.name,activity:\"fetch\",dataset:n,opt:{url:t,file_id:e,dataset:n}};return r.default.queue.add_task(s)}},e.train_task=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(i){var s={module:o.default.name,activity:\"train\",dataset:t.name||t,epoch:0,epochs:n,opt:{folder_id:e}};if(s.dataset)return console.log(s),r.default.queue.add_task(s);console.error(\"train task: no dataset specified\")}},e.live_task=function(t,e,n){return function(s){var a={module:o.default.name,activity:\"live\",dataset:t,checkpoint:e,opt:i({},n,{poll_delay:.01})};return console.log(a),console.log(\"add live task\"),r.default.queue.add_task(a)}},e.augment_task=function(t,e){return function(n){var s={module:o.default.name,activity:\"augment\",dataset:t,folder_id:e.folder_id,opt:i({},e)};return console.log(s),console.log(\"add augment task\"),r.default.queue.add_task(s)}},e.clear_recursive_task=function(t){return function(e){var n={module:o.default.name,activity:\"clear_recursive\",dataset:t};return console.log(n),console.log(\"add clear recursive task\"),r.default.queue.add_task(n)}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.uploadFiles=e.fetchURL=e.uploadFile=e.updateFolder=e.createFolder=void 0;var i=s(n(6)),r=s(n(8)),o=n(118);function s(t){return t&&t.__esModule?t:{default:t}}e.createFolder=function(t,e){return function(n){return r.default.folder.create({module:t.name,datatype:t.datatype,activity:\"dataset\",name:e})}},e.updateFolder=function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return function(o){return e&&e.id?r.default.folder.update({id:e.id,module:t.name,datatype:t.datatype,activity:\"dataset\",name:n,opt:i}):null}},e.uploadFile=function(t,e,n,i,o){return function(s){var a=new FormData;a.append(\"file\",n,i),r.default.folder.upload(a,{id:e.id,module:t.name,activity:\"file\",epoch:0,processed:!1,generated:!1,opt:o})}},e.fetchURL=function(t,e,n){return function(i){console.log(t,e,n);var s=e.files.some(function(t){return t.url===n});console.log(s),s?console.log(\"already seen this url\"):o.parser.parse(n,function(i){i&&(console.log(\"media\",i),r.default.file.create({folder_id:e.id,name:(i.title||\"\").replace(/\\.[^.]+$/g,\"\").replace(/[^a-zA-Z0-9_]/g,\"_\").replace(/\\s+/g,\"_\").replace(/_+/g,\"_\"),module:t.name,dataset:i.token,activity:\"url\",duration:parseInt(i.duration)||0,epoch:0,processed:!1,generated:!1,opt:i,url:n}))})}},e.uploadFiles=function(t){return{type:i.default.dataset.upload_files}}},function(t,e,n){var i=n(290);t.exports=f,t.exports.parse=o,t.exports.compile=function(t,e){return a(o(t,e))},t.exports.tokensToFunction=a,t.exports.tokensToRegExp=p;var r=new RegExp([\"(\\\\\\\\.)\",\"([\\\\/.])?(?:(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?|(\\\\*))\"].join(\"|\"),\"g\");function o(t,e){for(var n,i=[],o=0,s=0,a=\"\",c=e&&e.delimiter||\"/\";null!=(n=r.exec(t));){var h=n[0],p=n[1],f=n.index;if(a+=t.slice(s,f),s=f+h.length,p)a+=p[1];else{var d=t[s],y=n[2],m=n[3],_=n[4],v=n[5],g=n[6],b=n[7];a&&(i.push(a),a=\"\");var w=null!=y&&null!=d&&d!==y,k=\"+\"===g||\"*\"===g,S=\"?\"===g||\"*\"===g,T=n[2]||c,x=_||v;i.push({name:m||o++,prefix:y||\"\",delimiter:T,optional:S,repeat:k,partial:w,asterisk:!!b,pattern:x?l(x):b?\".*\":\"[^\"+u(T)+\"]+?\"})}}return s<t.length&&(a+=t.substr(s)),a&&i.push(a),i}function s(t){return encodeURI(t).replace(/[\\/?#]/g,function(t){return\"%\"+t.charCodeAt(0).toString(16).toUpperCase()})}function a(t){for(var e=new Array(t.length),n=0;n<t.length;n++)\"object\"==typeof t[n]&&(e[n]=new RegExp(\"^(?:\"+t[n].pattern+\")$\"));return function(n,r){for(var o=\"\",a=n||{},u=(r||{}).pretty?s:encodeURIComponent,l=0;l<t.length;l++){var c=t[l];if(\"string\"!=typeof c){var h,p=a[c.name];if(null==p){if(c.optional){c.partial&&(o+=c.prefix);continue}throw new TypeError('Expected \"'+c.name+'\" to be defined')}if(i(p)){if(!c.repeat)throw new TypeError('Expected \"'+c.name+'\" to not repeat, but received `'+JSON.stringify(p)+\"`\");if(0===p.length){if(c.optional)continue;throw new TypeError('Expected \"'+c.name+'\" to not be empty')}for(var f=0;f<p.length;f++){if(h=u(p[f]),!e[l].test(h))throw new TypeError('Expected all \"'+c.name+'\" to match \"'+c.pattern+'\", but received `'+JSON.stringify(h)+\"`\");o+=(0===f?c.prefix:c.delimiter)+h}}else{if(h=c.asterisk?encodeURI(p).replace(/[?#]/g,function(t){return\"%\"+t.charCodeAt(0).toString(16).toUpperCase()}):u(p),!e[l].test(h))throw new TypeError('Expected \"'+c.name+'\" to match \"'+c.pattern+'\", but received \"'+h+'\"');o+=c.prefix+h}}else o+=c}return o}}function u(t){return t.replace(/([.+*?=^!:${}()[\\]|\\/\\\\])/g,\"\\\\$1\")}function l(t){return t.replace(/([=!:$\\/()])/g,\"\\\\$1\")}function c(t,e){return t.keys=e,t}function h(t){return t.sensitive?\"\":\"i\"}function p(t,e,n){i(e)||(n=e||n,e=[]);for(var r=(n=n||{}).strict,o=!1!==n.end,s=\"\",a=0;a<t.length;a++){var l=t[a];if(\"string\"==typeof l)s+=u(l);else{var p=u(l.prefix),f=\"(?:\"+l.pattern+\")\";e.push(l),l.repeat&&(f+=\"(?:\"+p+f+\")*\"),s+=f=l.optional?l.partial?p+\"(\"+f+\")?\":\"(?:\"+p+\"(\"+f+\"))?\":p+\"(\"+f+\")\"}}var d=u(n.delimiter||\"/\"),y=s.slice(-d.length)===d;return r||(s=(y?s.slice(0,-d.length):s)+\"(?:\"+d+\"(?=$))?\"),s+=o?\"$\":r&&y?\"\":\"(?=\"+d+\"|$)\",c(new RegExp(\"^\"+s,h(n)),e)}function f(t,e,n){return i(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?function(t,e){var n=t.source.match(/\\((?!\\?)/g);if(n)for(var i=0;i<n.length;i++)e.push({name:i,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return c(t,e)}(t,e):i(t)?function(t,e,n){for(var i=[],r=0;r<t.length;r++)i.push(f(t[r],e,n).source);return c(new RegExp(\"(?:\"+i.join(\"|\")+\")\",h(n)),e)}(t,e,n):function(t,e,n){return p(o(t,n),e,n)}(t,e,n)}},function(t,e,n){t.exports=n(303)()},function(t,e,n){\"use strict\";t.exports=function(t,e,n,i,r,o,s,a){if(!t){var u;if(void 0===e)u=new Error(\"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.\");else{var l=[n,i,r,o,s,a],c=0;(u=new Error(e.replace(/%s/g,function(){return l[c++]}))).name=\"Invariant Violation\"}throw u.framesToPop=1,u}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(3),s=n(2),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(20));var u=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.timeout=0,n.state={value:t.live?t.opt[t.name]:t.value},n.handleInput=n.handleInput.bind(n),n.handleRange=n.handleRange.bind(n),n}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"componentWillReceiveProps\",value:function(t){var e=t.value||t.opt[t.name];e!==this.state.value&&this.setState({value:e})}},{key:\"handleInput\",value:function(t){var e=this.props,n=e.name,i=e.opt[n],r=t.target.value;\"\"===r?r=this.props.defaultValue||(this.props.max-this.props.min)/2:\"int\"===this.props.type?r=parseInt(r):\"odd\"===this.props.type&&(r=parseInt(2*Math.floor(r/2)+1)),i!==r&&(this.setState({value:r}),this.props.live&&this.props.actions.set_param(this.props.name,r),this.props.onChange&&this.props.onChange(r)),clearTimeout(this.timeout)}},{key:\"handleRange\",value:function(t){var e=this;clearTimeout(this.timeout);var n=t.target.value;\"int\"===this.props.type&&(n=parseInt(n)),\"odd\"===this.props.type&&(n=parseInt(2*Math.floor(n/2)+1)),\"list\"===this.props.type&&(n=this.props.options[n]||this.props.options[0]),this.setState({value:n}),this.timeout=setTimeout(function(){e.props.live&&e.props.actions.set_param(e.props.name,n),e.props.onChange&&e.props.onChange(n)},100)}},{key:\"render\",value:function(){var t=this.props,e=t.name,n=t.title,i=this.state.value;void 0===i&&(i=this.props.min);var o=i,s=void 0,a=this.props.min||0,u=this.props.max||0;return\"int\"===this.props.type?s=1:\"list\"===this.props.type?(a=0,u=this.props.options.length-1,s=1,i=this.props.options.indexOf(i)):(s=(this.props.max-this.props.min)/100,o=parseFloat(i).toFixed(2)),(0,r.h)(\"div\",{class:\"slider param\"},(0,r.h)(\"label\",null,(0,r.h)(\"span\",null,n||e.replace(/_/g,\" \")),(0,r.h)(\"input\",{type:\"text\",value:o,onBlur:this.handleInput})),(0,r.h)(\"input\",{type:\"range\",min:a,max:u,step:s,value:i,onInput:this.handleRange}))}}]),e}();e.default=(0,o.connect)(function(t){return{opt:t.live.opt}},function(t,e){return{actions:(0,s.bindActionCreators)(a,t)}})(u)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});e.default={name:\"samplernn\",displayName:\"SampleRNN\",datatype:\"audio\"}},function(t,e,n){\"use strict\";t.exports={2:\"need dictionary\",1:\"stream end\",0:\"\",\"-1\":\"file error\",\"-2\":\"stream error\",\"-3\":\"data error\",\"-4\":\"insufficient memory\",\"-5\":\"buffer error\",\"-6\":\"incompatible version\"}},function(t,e,n){\"use strict\";var i=n(9);var r=function(){for(var t,e=[],n=0;n<256;n++){t=n;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[n]=t}return e}();t.exports=function(t,e){return void 0!==t&&t.length?\"string\"!==i.getTypeOf(t)?function(t,e,n,i){var o=r,s=i+n;t^=-1;for(var a=i;a<s;a++)t=t>>>8^o[255&(t^e[a])];return-1^t}(0|e,t,t.length,0):function(t,e,n,i){var o=r,s=i+n;t^=-1;for(var a=i;a<s;a++)t=t>>>8^o[255&(t^e.charCodeAt(a))];return-1^t}(0|e,t,t.length,0):0}},function(t,e,n){\"use strict\";var i=n(35),r=n(101),o=n(100),s=n(99);o=n(100);function a(t,e,n,i,r){this.compressedSize=t,this.uncompressedSize=e,this.crc32=n,this.compression=i,this.compressedContent=r}a.prototype={getContentWorker:function(){var t=new r(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o(\"data_length\")),e=this;return t.on(\"end\",function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error(\"Bug : uncompressed data size mismatch\")}),t},getCompressedWorker:function(){return new r(i.Promise.resolve(this.compressedContent)).withStreamInfo(\"compressedSize\",this.compressedSize).withStreamInfo(\"uncompressedSize\",this.uncompressedSize).withStreamInfo(\"crc32\",this.crc32).withStreamInfo(\"compression\",this.compression)}},a.createWorkerFrom=function(t,e,n){return t.pipe(new s).pipe(new o(\"uncompressedSize\")).pipe(e.compressWorker(n)).pipe(new o(\"compressedSize\")).withStreamInfo(\"compression\",e)},t.exports=a},function(t,e,n){t.exports=!n(105)(function(){return 7!=Object.defineProperty({},\"a\",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){return\"object\"==typeof t?null!==t:\"function\"==typeof t}},function(t,e,n){\"use strict\";(function(e,i,r){var o=n(56);function s(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var i=t.entry;t.entry=null;for(;i;){var r=i.callback;e.pendingcb--,r(n),i=i.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=v;var a,u=!e.browser&&[\"v0.10\",\"v0.9.\"].indexOf(e.version.slice(0,5))>-1?i:o.nextTick;v.WritableState=_;var l=n(36);l.inherits=n(27);var c={deprecate:n(207)},h=n(112),p=n(55).Buffer,f=r.Uint8Array||function(){};var d,y=n(111);function m(){}function _(t,e){a=a||n(25),t=t||{};var i=e instanceof a;this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var r=t.highWaterMark,l=t.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i&&(l||0===l)?l:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===t.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=t.defaultEncoding||\"utf8\",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,i=n.sync,r=n.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,i,r){--e.pendingcb,n?(o.nextTick(r,i),o.nextTick(T,t,e),t._writableState.errorEmitted=!0,t.emit(\"error\",i)):(r(i),t._writableState.errorEmitted=!0,t.emit(\"error\",i),T(t,e))}(t,n,i,e,r);else{var s=k(n);s||n.corked||n.bufferProcessing||!n.bufferedRequest||w(t,n),i?u(b,t,n,s,r):b(t,n,s,r)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function v(t){if(a=a||n(25),!(d.call(v,this)||this instanceof a))return new v(t);this._writableState=new _(t,this),this.writable=!0,t&&(\"function\"==typeof t.write&&(this._write=t.write),\"function\"==typeof t.writev&&(this._writev=t.writev),\"function\"==typeof t.destroy&&(this._destroy=t.destroy),\"function\"==typeof t.final&&(this._final=t.final)),h.call(this)}function g(t,e,n,i,r,o,s){e.writelen=i,e.writecb=s,e.writing=!0,e.sync=!0,n?t._writev(r,e.onwrite):t._write(r,o,e.onwrite),e.sync=!1}function b(t,e,n,i){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit(\"drain\"))}(t,e),e.pendingcb--,i(),T(t,e)}function w(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var i=e.bufferedRequestCount,r=new Array(i),o=e.corkedRequestsFree;o.entry=n;for(var a=0,u=!0;n;)r[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;r.allBuffers=u,g(t,e,!0,e.length,r,\"\",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new s(e),e.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,h=n.callback;if(g(t,e,!1,e.objectMode?1:l.length,l,c,h),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function k(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function S(t,e){t._final(function(n){e.pendingcb--,n&&t.emit(\"error\",n),e.prefinished=!0,t.emit(\"prefinish\"),T(t,e)})}function T(t,e){var n=k(e);return n&&(!function(t,e){e.prefinished||e.finalCalled||(\"function\"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(S,t,e)):(e.prefinished=!0,t.emit(\"prefinish\")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit(\"finish\"))),n}l.inherits(v,h),_.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(_.prototype,\"buffer\",{get:c.deprecate(function(){return this.getBuffer()},\"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.\",\"DEP0003\")})}catch(t){}}(),\"function\"==typeof Symbol&&Symbol.hasInstance&&\"function\"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(t){return!!d.call(this,t)||this===v&&(t&&t._writableState instanceof _)}})):d=function(t){return t instanceof this},v.prototype.pipe=function(){this.emit(\"error\",new Error(\"Cannot pipe, not readable\"))},v.prototype.write=function(t,e,n){var i,r=this._writableState,s=!1,a=!r.objectMode&&(i=t,p.isBuffer(i)||i instanceof f);return a&&!p.isBuffer(t)&&(t=function(t){return p.from(t)}(t)),\"function\"==typeof e&&(n=e,e=null),a?e=\"buffer\":e||(e=r.defaultEncoding),\"function\"!=typeof n&&(n=m),r.ended?function(t,e){var n=new Error(\"write after end\");t.emit(\"error\",n),o.nextTick(e,n)}(this,n):(a||function(t,e,n,i){var r=!0,s=!1;return null===n?s=new TypeError(\"May not write null values to stream\"):\"string\"==typeof n||void 0===n||e.objectMode||(s=new TypeError(\"Invalid non-string/buffer chunk\")),s&&(t.emit(\"error\",s),o.nextTick(i,s),r=!1),r}(this,r,t,n))&&(r.pendingcb++,s=function(t,e,n,i,r,o){if(!n){var s=function(t,e,n){t.objectMode||!1===t.decodeStrings||\"string\"!=typeof e||(e=p.from(e,n));return e}(e,i,r);i!==s&&(n=!0,r=\"buffer\",i=s)}var a=e.objectMode?1:i.length;e.length+=a;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:r,isBuf:n,callback:o,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else g(t,e,!1,a,i,r,o);return u}(this,r,a,t,e,n)),s},v.prototype.cork=function(){this._writableState.corked++},v.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||w(this,t))},v.prototype.setDefaultEncoding=function(t){if(\"string\"==typeof t&&(t=t.toLowerCase()),!([\"hex\",\"utf8\",\"utf-8\",\"ascii\",\"binary\",\"base64\",\"ucs2\",\"ucs-2\",\"utf16le\",\"utf-16le\",\"raw\"].indexOf((t+\"\").toLowerCase())>-1))throw new TypeError(\"Unknown encoding: \"+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(v.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(t,e,n){n(new Error(\"_write() is not implemented\"))},v.prototype._writev=null,v.prototype.end=function(t,e,n){var i=this._writableState;\"function\"==typeof t?(n=t,t=null,e=null):\"function\"==typeof e&&(n=e,e=null),null!==t&&void 0!==t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||function(t,e,n){e.ending=!0,T(t,e),n&&(e.finished?o.nextTick(n):t.once(\"finish\",n));e.ended=!0,t.writable=!1}(this,i,n)},Object.defineProperty(v.prototype,\"destroyed\",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),v.prototype.destroy=y.destroy,v.prototype._undestroy=y.undestroy,v.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,n(51),n(209).setImmediate,n(21))},function(t,e,n){(e=t.exports=n(113)).Stream=e,e.Readable=e,e.Writable=n(70),e.Duplex=n(25),e.Transform=n(109),e.PassThrough=n(206)},function(t,e){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(t){return\"function\"==typeof t}function r(t){return\"object\"==typeof t&&null!==t}function o(t){return void 0===t}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if(\"number\"!=typeof t||t<0||isNaN(t))throw TypeError(\"n must be a positive number\");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,n,s,a,u,l;if(this._events||(this._events={}),\"error\"===t&&(!this._events.error||r(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var c=new Error('Uncaught, unspecified \"error\" event. ('+e+\")\");throw c.context=e,c}if(o(n=this._events[t]))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(r(n))for(a=Array.prototype.slice.call(arguments,1),s=(l=n.slice()).length,u=0;u<s;u++)l[u].apply(this,a);return!0},n.prototype.addListener=function(t,e){var s;if(!i(e))throw TypeError(\"listener must be a function\");return this._events||(this._events={}),this._events.newListener&&this.emit(\"newListener\",t,i(e.listener)?e.listener:e),this._events[t]?r(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,r(this._events[t])&&!this._events[t].warned&&(s=o(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&s>0&&this._events[t].length>s&&(this._events[t].warned=!0,console.error(\"(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.\",this._events[t].length),\"function\"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){if(!i(e))throw TypeError(\"listener must be a function\");var n=!1;function r(){this.removeListener(t,r),n||(n=!0,e.apply(this,arguments))}return r.listener=e,this.on(t,r),this},n.prototype.removeListener=function(t,e){var n,o,s,a;if(!i(e))throw TypeError(\"listener must be a function\");if(!this._events||!this._events[t])return this;if(s=(n=this._events[t]).length,o=-1,n===e||i(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit(\"removeListener\",t,e);else if(r(n)){for(a=s;a-- >0;)if(n[a]===e||n[a].listener&&n[a].listener===e){o=a;break}if(o<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(o,1),this._events.removeListener&&this.emit(\"removeListener\",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)\"removeListener\"!==e&&this.removeAllListeners(e);return this.removeAllListeners(\"removeListener\"),this._events={},this}if(i(n=this._events[t]))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){return this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(i(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.live_task=void 0;r(n(17)),r(n(14)),r(n(6));var i=r(n(8));function r(t){return t&&t.__esModule?t:{default:t}}e.live_task=function(t,e){return function(n){var r={module:\"pix2wav\",activity:\"live\",dataset:t,checkpoint:e,opt:{poll_delay:.2}};return console.log(r),console.log(\"add live task\"),i.default.queue.add_task(r)}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.load_directories=void 0;var i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}}(),r=(l(n(17)),l(n(14)),l(n(6))),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(43)),s=l(n(8)),a=l(n(5)),u=l(n(57));function l(t){return t&&t.__esModule?t:{default:t}}e.load_directories=function(t){return function(e){var n=u.default.name;a.default.allProgress([o.load(n),s.default.socket.list_directory({module:\"pix2pix\",dir:\"sequences/pix2wav/\"}),s.default.socket.list_directory({module:\"pix2pix\",dir:\"datasets/pix2wav/\"}),s.default.socket.list_directory({module:\"pix2pix\",dir:\"checkpoints/pix2wav/\"}),s.default.socket.list_directory({module:\"pix2pix\",dir:\"checkpoints/pix2pix/\"})],function(t,n,i){console.log(\"progress\",n,i),e({type:r.default.app.load_progress,progress:{i:n,n:i}})}).then(function(t){var s=i(t,5),a=s[0],u=s[1],l=s[2],c=s[3],h=s[4],p=a.folderLookup,f=a.fileLookup,d=a.datasetLookup,y=a.folders,m=a.files,_=(a.unsortedFolder,u.filter(function(t){return t.dir}));_.forEach(function(t){o.getDataset(n,d,t.name).isBuilt=!0}),l.filter(function(t){return t.dir}).forEach(function(t){o.getDataset(n,d,t.name).hasDataset=!0});var v=c.filter(function(t){return t.dir});v.forEach(function(t){o.getDataset(n,d,t.name).hasCheckpoints=!0,t.module=\"pix2wav\"});var g=h.filter(function(t){return t.dir});g.forEach(function(t){o.getDataset(n,d,t.name).hasCheckpoints=!0,t.module=\"pix2pix\"}),console.log(t),console.log(v),console.log(g),e({type:r.default.dataset.load,data:{module:n,folderLookup:p,fileLookup:f,datasetLookup:d,folders:y,files:m,sequences:_,datasets:l,checkpoints:v.concat(g)}})}).catch(function(t){console.error(t)}),t&&(console.log(\"folder id\",t),e({type:r.default.dataset.set_folder,data:{folder_id:t,module:n}}))}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});e.default={name:\"pix2pix\",displayName:\"Pix2Pix\",datatype:\"video\"}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.load_directories=void 0;var i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}}(),r=(l(n(17)),l(n(14)),l(n(6))),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(43)),s=l(n(8)),a=l(n(5)),u=l(n(75));function l(t){return t&&t.__esModule?t:{default:t}}e.load_directories=function(t){return function(e){var n=u.default.name;a.default.allProgress([o.load(n),s.default.socket.list_directory({module:n,dir:\"sequences/pix2pix/\"}),s.default.socket.list_directory({module:n,dir:\"datasets/pix2pix/\"}),s.default.socket.list_directory({module:n,dir:\"checkpoints/pix2pix/\"})],function(t,n,i){console.log(\"pix2pix load progress\",n,i),e({type:r.default.app.load_progress,progress:{i:n,n:i}})}).then(function(t){var s=i(t,4),a=s[0],u=s[1],l=s[2],c=s[3],h=a.folderLookup,p=a.fileLookup,f=a.datasetLookup,d=a.folders,y=a.files,m=(a.unsortedFolder,u.filter(function(t){return t.dir}));m.forEach(function(t){o.getDataset(n,f,t.name).isBuilt=!0}),l.filter(function(t){return t.dir}).forEach(function(t){o.getDataset(n,f,t.name).hasDataset=!0});var _=c.filter(function(t){return t.dir});_.forEach(function(t){var e=o.getDataset(n,f,t.name);e.hasCheckpoints=!0,e.checkpoints=[t]}),e({type:r.default.dataset.load,data:{module:n,folderLookup:h,fileLookup:p,datasetLookup:f,folders:d,files:y,sequences:m,datasets:l,checkpoints:_}})}).catch(function(t){console.error(t)}),t&&(console.log(\"folder id\",t),e({type:r.default.dataset.set_folder,data:{folder_id:t,module:n}}))}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=u(n(240)),r=u(n(232)),o=u(n(228)),s=u(n(222)),a=u(n(160));function u(t){return t&&t.__esModule?t:{default:t}}e.default={morph:i.default,pix2pix:r.default,pix2pixhd:o.default,pix2wav:s.default,samplernn:a.default}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.enqueue_test_task=e.changeTool=e.countDirectory=e.listDirectory=e.run=void 0;var i=o(n(14)),r=o(n(6));function o(t){return t&&t.__esModule?t:{default:t}}e.run=function(t){return function(e){e({type:r.default.system.running_command,cmd:t}),i.default.actions.run_system_command({cmd:t}).then(function(t){e({type:r.default.system.command_output,data:t})})}},e.listDirectory=function(t){return function(e){e({type:r.default.system.listing_directory,opt:t}),i.default.actions.list_directory(t).then(function(t){e({type:r.default.system.list_directory,data:t})})}},e.countDirectory=function(t){return function(e){e({type:r.default.system.counting_directory,opt:t}),i.default.actions.count_directory(t).then(function(t){e({type:r.default.system.count_directory,data:t})})}},e.changeTool=function(t){return localStorage.setItem(\"system.last_tool\",t),{type:r.default.app.change_tool,tool:t}},e.enqueue_test_task=function(t){return function(t){}};window.addEventListener(\"keyDown\",function(t){t.altKey&&t.keyCode})},function(t,e,n){var i,r=r||function(t){\"use strict\";if(!(void 0===t||\"undefined\"!=typeof navigator&&/MSIE [1-9]\\./.test(navigator.userAgent))){var e=function(){return t.URL||t.webkitURL||t},n=t.document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"a\"),i=\"download\"in n,r=/constructor/i.test(t.HTMLElement)||t.safari,o=/CriOS\\/[\\d]+/.test(navigator.userAgent),s=function(e){(t.setImmediate||t.setTimeout)(function(){throw e},0)},a=function(t){setTimeout(function(){\"string\"==typeof t?e().revokeObjectURL(t):t.remove()},4e4)},u=function(t){return/^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t},l=function(l,c,h){h||(l=u(l));var p,f=this,d=\"application/octet-stream\"===l.type,y=function(){!function(t,e,n){for(var i=(e=[].concat(e)).length;i--;){var r=t[\"on\"+e[i]];if(\"function\"==typeof r)try{r.call(t,n||t)}catch(t){s(t)}}}(f,\"writestart progress write writeend\".split(\" \"))};if(f.readyState=f.INIT,i)return p=e().createObjectURL(l),void setTimeout(function(){var t,e;n.href=p,n.download=c,t=n,e=new MouseEvent(\"click\"),t.dispatchEvent(e),y(),a(p),f.readyState=f.DONE});!function(){if((o||d&&r)&&t.FileReader){var n=new FileReader;return n.onloadend=function(){var e=o?n.result:n.result.replace(/^data:[^;]*;/,\"data:attachment/file;\");t.open(e,\"_blank\")||(t.location.href=e),e=void 0,f.readyState=f.DONE,y()},n.readAsDataURL(l),void(f.readyState=f.INIT)}p||(p=e().createObjectURL(l)),d?t.location.href=p:t.open(p,\"_blank\")||(t.location.href=p);f.readyState=f.DONE,y(),a(p)}()},c=l.prototype;return\"undefined\"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(t,e,n){return e=e||t.name||\"download\",n||(t=u(t)),navigator.msSaveOrOpenBlob(t,e)}:(c.abort=function(){},c.readyState=c.INIT=0,c.WRITING=1,c.DONE=2,c.error=c.onwritestart=c.onprogress=c.onwrite=c.onabort=c.onerror=c.onwriteend=null,function(t,e,n){return new l(t,e||t.name||\"download\",n)})}}(\"undefined\"!=typeof self&&self||\"undefined\"!=typeof window&&window||this.content);\n/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */void 0!==t&&t.exports?t.exports.saveAs=r:null!==n(275)&&null!==n(274)&&(void 0===(i=function(){return r}.call(e,n,e,t))||(t.exports=i))},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=e.as_type=function(t,e){return[t,e].join(\"_\").toUpperCase()},r=e.with_type=function(t,e){return e.reduce(function(e,n){return(e[n]=i(t,n))&&e},{})};e.crud_type=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return r(t,e.concat([\"index_loading\",\"index\",\"index_error\",\"show_loading\",\"show\",\"show_error\",\"create_loading\",\"create\",\"create_error\",\"update_loading\",\"update\",\"update_error\",\"destroy_loading\",\"destroy\",\"destroy_error\",\"upload_loading\",\"upload_progress\",\"upload_waiting\",\"upload_complete\",\"upload_error\",\"sort\"]))}},function(t,e,n){\"use strict\";e.__esModule=!0;e.addLeadingSlash=function(t){return\"/\"===t.charAt(0)?t:\"/\"+t},e.stripLeadingSlash=function(t){return\"/\"===t.charAt(0)?t.substr(1):t};var i=e.hasBasename=function(t,e){return new RegExp(\"^\"+e+\"(\\\\/|\\\\?|#|$)\",\"i\").test(t)};e.stripBasename=function(t,e){return i(t,e)?t.substr(e.length):t},e.stripTrailingSlash=function(t){return\"/\"===t.charAt(t.length-1)?t.slice(0,-1):t},e.parsePath=function(t){var e=t||\"/\",n=\"\",i=\"\",r=e.indexOf(\"#\");-1!==r&&(i=e.substr(r),e=e.substr(0,r));var o=e.indexOf(\"?\");return-1!==o&&(n=e.substr(o),e=e.substr(0,o)),{pathname:e,search:\"?\"===n?\"\":n,hash:\"#\"===i?\"\":i}},e.createPath=function(t){var e=t.pathname,n=t.search,i=t.hash,r=e||\"/\";return n&&\"?\"!==n&&(r+=\"?\"===n.charAt(0)?n:\"?\"+n),i&&\"#\"!==i&&(r+=\"#\"===i.charAt(0)?i:\"#\"+i),r}},function(t,e,n){\"use strict\";n.r(e);var i=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t};e.default=function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(Array.isArray(e))return Array.isArray(n)&&e.length===n.length&&e.every(function(e,i){return t(e,n[i])});var r=void 0===e?\"undefined\":i(e);if(r!==(void 0===n?\"undefined\":i(n)))return!1;if(\"object\"===r){var o=e.valueOf(),s=n.valueOf();if(o!==e||s!==n)return t(o,s);var a=Object.keys(e),u=Object.keys(n);return a.length===u.length&&a.every(function(i){return t(e[i],n[i])})}return!1}},function(t,e,n){\"use strict\";function i(t){return\"/\"===t.charAt(0)}function r(t,e){for(var n=e,i=n+1,r=t.length;i<r;n+=1,i+=1)t[n]=t[i];t.pop()}n.r(e),e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"\",n=t&&t.split(\"/\")||[],o=e&&e.split(\"/\")||[],s=t&&i(t),a=e&&i(e),u=s||a;if(t&&i(t)?o=n:n.length&&(o.pop(),o=o.concat(n)),!o.length)return\"/\";var l=void 0;if(o.length){var c=o[o.length-1];l=\".\"===c||\"..\"===c||\"\"===c}else l=!1;for(var h=0,p=o.length;p>=0;p--){var f=o[p];\".\"===f?r(o,p):\"..\"===f?(r(o,p),h++):h&&(r(o,p),h--)}if(!u)for(;h--;h)o.unshift(\"..\");!u||\"\"===o[0]||o[0]&&i(o[0])||o.unshift(\"\");var d=o.join(\"/\");return l&&\"/\"!==d.substr(-1)&&(d+=\"/\"),d}},function(t,e,n){\"use strict\";(function(t,i){var r,o=n(142);r=\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:void 0!==t?t:i;var s=Object(o.a)(r);e.a=s}).call(this,n(21),n(295)(t))},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(1),s=n(2),a=n(3),u=n(10),l=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(47)),c=n(13);var h=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var t=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.state={username:\"\",password:\"\",password2:\"\"},t.handleChange=t.handleChange.bind(t),t.handleSubmit=t.handleSubmit.bind(t),t}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.Component),r(e,[{key:\"handleChange\",value:function(t,e){this.setState(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},e,t))}},{key:\"validate\",value:function(){return!(!this.state.password||this.state.password!==this.state.password2)}},{key:\"handleSubmit\",value:function(t){if(t.preventDefault(),!this.props.auth.loading){if(!this.validate())return this.props.actions.setError(\"bad password\");var e=function(t,e){var n={};for(var i in t)e.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(this.state,[]);this.props.actions.signup(e)}}},{key:\"render\",value:function(){if(this.props.auth.isAuthenticated){var t=this.props.auth.returnTo;return t&&!t.match(/(api|login|logout|signup)/i)||(t=\"/\"),(0,o.h)(u.Redirect,{to:t})}return(0,o.h)(\"form\",{onSubmit:this.handleSubmit},(0,o.h)(\"h1\",null,\"New account\"),(0,o.h)(\"br\",null),(0,o.h)(c.Group,null,(0,o.h)(c.TextInput,{autofocus:!0,autocapitalize:\"off\",autocomplete:\"off\",title:\"Username\",name:\"username\",type:\"text\",value:this.state.username,onInput:this.handleChange}),(0,o.h)(c.TextInput,{title:\"Password\",name:\"password\",type:\"password\",value:this.state.password,onInput:this.handleChange}),(0,o.h)(c.TextInput,{title:\"Password again :)\",name:\"password2\",type:\"password\",value:this.state.password2,onInput:this.handleChange}),(0,o.h)(c.Button,{loading:this.props.auth.loading},\"Sign up\"),this.renderAuthError()))}},{key:\"renderAuthError\",value:function(){return this.props.auth.error?(0,o.h)(\"div\",{className:\"form-input-hint\"},\"Please doublecheck the form (o=_o~~)\"):(0,o.h)(\"div\",{className:\"form-input-hint\"})}}]),e}();e.default=(0,a.connect)(function(t){return{auth:t.auth}},function(t){return{actions:(0,s.bindActionCreators)(i({},l),t)}})(h)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),s=n(3),a=n(10),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(47));var l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e),function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"componentWillMount\",value:function(t){this.props.actions.logout()}},{key:\"render\",value:function(){return(0,r.h)(a.Redirect,{to:\"/\"})}}]),e}();e.default=(0,s.connect)(function(t){return{}},function(t){return{actions:(0,o.bindActionCreators)(u,t)}})(l)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=n(1),r=n(3);e.default=(0,r.connect)(function(t){return{}},function(t,e){return{}})(function(t){var e=t.fullscreen?\"player fullscreen\":\"player\";return(0,i.h)(\"div\",{className:e},(0,i.h)(\"canvas\",{width:t.width,height:t.height}))})},function(t,e,n){\"use strict\";var i=n(90);function r(t){i.call(this,t)}n(9).inherits(r,i),r.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},t.exports=r},function(t,e,n){\"use strict\";var i=n(9);function r(t){this.data=t,this.length=t.length,this.index=0,this.zero=0}r.prototype={checkOffset:function(t){this.checkIndex(this.index+t)},checkIndex:function(t){if(this.length<this.zero+t||t<0)throw new Error(\"End of data reached (data length = \"+this.length+\", asked index = \"+t+\"). Corrupted zip ?\")},setIndex:function(t){this.checkIndex(t),this.index=t},skip:function(t){this.setIndex(this.index+t)},byteAt:function(t){},readInt:function(t){var e,n=0;for(this.checkOffset(t),e=this.index+t-1;e>=this.index;e--)n=(n<<8)+this.byteAt(e);return this.index+=t,n},readString:function(t){return i.transformTo(\"string\",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},t.exports=r},function(t,e,n){\"use strict\";var i=n(89);function r(t){i.call(this,t);for(var e=0;e<this.data.length;e++)t[e]=255&t[e]}n(9).inherits(r,i),r.prototype.byteAt=function(t){return this.data[this.zero+t]},r.prototype.lastIndexOfSignature=function(t){for(var e=t.charCodeAt(0),n=t.charCodeAt(1),i=t.charCodeAt(2),r=t.charCodeAt(3),o=this.length-4;o>=0;--o)if(this.data[o]===e&&this.data[o+1]===n&&this.data[o+2]===i&&this.data[o+3]===r)return o-this.zero;return-1},r.prototype.readAndCheckSignature=function(t){var e=t.charCodeAt(0),n=t.charCodeAt(1),i=t.charCodeAt(2),r=t.charCodeAt(3),o=this.readData(4);return e===o[0]&&n===o[1]&&i===o[2]&&r===o[3]},r.prototype.readData=function(t){if(this.checkOffset(t),0===t)return[];var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},t.exports=r},function(t,e,n){\"use strict\";var i=n(9),r=n(23),o=n(90),s=n(167),a=n(166),u=n(88);t.exports=function(t){var e=i.getTypeOf(t);return i.checkSupport(e),\"string\"!==e||r.uint8array?\"nodebuffer\"===e?new a(t):r.uint8array?new u(i.transformTo(\"uint8array\",t)):new o(i.transformTo(\"array\",t)):new s(t)}},function(t,e,n){\"use strict\";e.LOCAL_FILE_HEADER=\"PK\u0003\u0004\",e.CENTRAL_FILE_HEADER=\"PK\u0001\u0002\",e.CENTRAL_DIRECTORY_END=\"PK\u0005\u0006\",e.ZIP64_CENTRAL_DIRECTORY_LOCATOR=\"PK\u0006\u0007\",e.ZIP64_CENTRAL_DIRECTORY_END=\"PK\u0006\u0006\",e.DATA_DESCRIPTOR=\"PK\u0007\\b\"},function(t,e,n){\"use strict\";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(t,e,n){\"use strict\";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=\"\",this.state=null,this.data_type=2,this.adler=0}},function(t,e,n){\"use strict\";var i=n(22),r=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(t){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){o=!1}for(var s=new i.Buf8(256),a=0;a<256;a++)s[a]=a>=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;function u(t,e){if(e<65537&&(t.subarray&&o||!t.subarray&&r))return String.fromCharCode.apply(null,i.shrinkBuf(t,e));for(var n=\"\",s=0;s<e;s++)n+=String.fromCharCode(t[s]);return n}s[254]=s[254]=1,e.string2buf=function(t){var e,n,r,o,s,a=t.length,u=0;for(o=0;o<a;o++)55296==(64512&(n=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(r=t.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),u+=n<128?1:n<2048?2:n<65536?3:4;for(e=new i.Buf8(u),s=0,o=0;s<u;o++)55296==(64512&(n=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(r=t.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),n<128?e[s++]=n:n<2048?(e[s++]=192|n>>>6,e[s++]=128|63&n):n<65536?(e[s++]=224|n>>>12,e[s++]=128|n>>>6&63,e[s++]=128|63&n):(e[s++]=240|n>>>18,e[s++]=128|n>>>12&63,e[s++]=128|n>>>6&63,e[s++]=128|63&n);return e},e.buf2binstring=function(t){return u(t,t.length)},e.binstring2buf=function(t){for(var e=new i.Buf8(t.length),n=0,r=e.length;n<r;n++)e[n]=t.charCodeAt(n);return e},e.buf2string=function(t,e){var n,i,r,o,a=e||t.length,l=new Array(2*a);for(i=0,n=0;n<a;)if((r=t[n++])<128)l[i++]=r;else if((o=s[r])>4)l[i++]=65533,n+=o-1;else{for(r&=2===o?31:3===o?15:7;o>1&&n<a;)r=r<<6|63&t[n++],o--;o>1?l[i++]=65533:r<65536?l[i++]=r:(r-=65536,l[i++]=55296|r>>10&1023,l[i++]=56320|1023&r)}return u(l,i)},e.utf8border=function(t,e){var n;for((e=e||t.length)>t.length&&(e=t.length),n=e-1;n>=0&&128==(192&t[n]);)n--;return n<0?e:0===n?e:n+s[t[n]]>e?n:e}},function(t,e,n){\"use strict\";var i=function(){for(var t,e=[],n=0;n<256;n++){t=n;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[n]=t}return e}();t.exports=function(t,e,n,r){var o=i,s=r+n;t^=-1;for(var a=r;a<s;a++)t=t>>>8^o[255&(t^e[a])];return-1^t}},function(t,e,n){\"use strict\";t.exports=function(t,e,n,i){for(var r=65535&t|0,o=t>>>16&65535|0,s=0;0!==n;){n-=s=n>2e3?2e3:n;do{o=o+(r=r+e[i++]|0)|0}while(--s);r%=65521,o%=65521}return r|o<<16|0}},function(t,e,n){\"use strict\";var i=n(15);e.STORE={magic:\"\\0\\0\",compressWorker:function(t){return new i(\"STORE compression\")},uncompressWorker:function(){return new i(\"STORE decompression\")}},e.DEFLATE=n(181)},function(t,e,n){\"use strict\";var i=n(15),r=n(66);function o(){i.call(this,\"Crc32Probe\"),this.withStreamInfo(\"crc32\",0)}n(9).inherits(o,i),o.prototype.processChunk=function(t){this.streamInfo.crc32=r(t.data,this.streamInfo.crc32||0),this.push(t)},t.exports=o},function(t,e,n){\"use strict\";var i=n(9),r=n(15);function o(t){r.call(this,\"DataLengthProbe for \"+t),this.propName=t,this.withStreamInfo(t,0)}i.inherits(o,r),o.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}r.prototype.processChunk.call(this,t)},t.exports=o},function(t,e,n){\"use strict\";var i=n(9),r=n(15);function o(t){r.call(this,\"DataWorker\");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type=\"\",this._tickScheduled=!1,t.then(function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=i.getTypeOf(t),e.isPaused||e._tickAndRepeat()},function(t){e.error(t)})}i.inherits(o,r),o.prototype.cleanUp=function(){r.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case\"string\":t=this.data.substring(this.index,e);break;case\"uint8array\":t=this.data.subarray(this.index,e);break;case\"array\":case\"nodebuffer\":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=o},function(t,e,n){\"use strict\";e.base64=!1,e.binary=!1,e.dir=!1,e.createFolders=!0,e.date=null,e.compression=null,e.compressionOptions=null,e.comment=null,e.unixPermissions=null,e.dosPermissions=null},function(t,e,n){\"use strict\";(function(e){var i=n(9),r=n(185),o=n(15),s=n(108),a=n(23),u=n(35),l=null;if(a.nodestream)try{l=n(184)}catch(t){}function c(t,n){return new u.Promise(function(r,o){var a=[],u=t._internalType,l=t._outputType,c=t._mimeType;t.on(\"data\",function(t,e){a.push(t),n&&n(e)}).on(\"error\",function(t){a=[],o(t)}).on(\"end\",function(){try{var t=function(t,e,n){switch(t){case\"blob\":return i.newBlob(i.transformTo(\"arraybuffer\",e),n);case\"base64\":return s.encode(e);default:return i.transformTo(t,e)}}(l,function(t,n){var i,r=0,o=null,s=0;for(i=0;i<n.length;i++)s+=n[i].length;switch(t){case\"string\":return n.join(\"\");case\"array\":return Array.prototype.concat.apply([],n);case\"uint8array\":for(o=new Uint8Array(s),i=0;i<n.length;i++)o.set(n[i],r),r+=n[i].length;return o;case\"nodebuffer\":return e.concat(n);default:throw new Error(\"concat : unsupported type '\"+t+\"'\")}}(u,a),c);r(t)}catch(t){o(t)}a=[]}).resume()})}function h(t,e,n){var s=e;switch(e){case\"blob\":case\"arraybuffer\":s=\"uint8array\";break;case\"base64\":s=\"string\"}try{this._internalType=s,this._outputType=e,this._mimeType=n,i.checkSupport(s),this._worker=t.pipe(new r(s)),t.lock()}catch(t){this._worker=new o(\"error\"),this._worker.error(t)}}h.prototype={accumulate:function(t){return c(this,t)},on:function(t,e){var n=this;return\"data\"===t?this._worker.on(t,function(t){e.call(n,t.data,t.meta)}):this._worker.on(t,function(){i.delay(e,arguments,n)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(t){if(i.checkSupport(\"nodestream\"),\"nodebuffer\"!==this._outputType)throw new Error(this._outputType+\" is not supported by this method\");return new l(this,{objectMode:\"nodebuffer\"!==this._outputType},t)}},t.exports=h}).call(this,n(37).Buffer)},function(t,e,n){var i=n(69),r=n(53).document,o=i(r)&&i(r.createElement);t.exports=function(t){return o?r.createElement(t):{}}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var i=n(198);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},function(t,e){var n=t.exports={version:\"2.3.0\"};\"number\"==typeof __e&&(__e=n)},function(t,e,n){\"use strict\";var i=n(9),r=n(23),o=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";e.encode=function(t){for(var e,n,r,s,a,u,l,c=[],h=0,p=t.length,f=p,d=\"string\"!==i.getTypeOf(t);h<t.length;)f=p-h,d?(e=t[h++],n=h<p?t[h++]:0,r=h<p?t[h++]:0):(e=t.charCodeAt(h++),n=h<p?t.charCodeAt(h++):0,r=h<p?t.charCodeAt(h++):0),s=e>>2,a=(3&e)<<4|n>>4,u=f>1?(15&n)<<2|r>>6:64,l=f>2?63&r:64,c.push(o.charAt(s)+o.charAt(a)+o.charAt(u)+o.charAt(l));return c.join(\"\")},e.decode=function(t){var e,n,i,s,a,u,l=0,c=0;if(\"data:\"===t.substr(0,\"data:\".length))throw new Error(\"Invalid base64 input, it looks like a data url.\");var h,p=3*(t=t.replace(/[^A-Za-z0-9\\+\\/\\=]/g,\"\")).length/4;if(t.charAt(t.length-1)===o.charAt(64)&&p--,t.charAt(t.length-2)===o.charAt(64)&&p--,p%1!=0)throw new Error(\"Invalid base64 input, bad content length.\");for(h=r.uint8array?new Uint8Array(0|p):new Array(0|p);l<t.length;)e=o.indexOf(t.charAt(l++))<<2|(s=o.indexOf(t.charAt(l++)))>>4,n=(15&s)<<4|(a=o.indexOf(t.charAt(l++)))>>2,i=(3&a)<<6|(u=o.indexOf(t.charAt(l++))),h[c++]=e,64!==a&&(h[c++]=n),64!==u&&(h[c++]=i);return h}},function(t,e,n){\"use strict\";t.exports=o;var i=n(25),r=n(36);function o(t){if(!(this instanceof o))return new o(t);i.call(this,t),this._transformState={afterTransform:function(t,e){var n=this._transformState;n.transforming=!1;var i=n.writecb;if(!i)return this.emit(\"error\",new Error(\"write callback called multiple times\"));n.writechunk=null,n.writecb=null,null!=e&&this.push(e),i(t);var r=this._readableState;r.reading=!1,(r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(\"function\"==typeof t.transform&&(this._transform=t.transform),\"function\"==typeof t.flush&&(this._flush=t.flush)),this.on(\"prefinish\",s)}function s(){var t=this;\"function\"==typeof this._flush?this._flush(function(e,n){a(t,e,n)}):a(this,null,null)}function a(t,e,n){if(e)return t.emit(\"error\",e);if(null!=n&&t.push(n),t._writableState.length)throw new Error(\"Calling transform done when ws.length != 0\");if(t._transformState.transforming)throw new Error(\"Calling transform done when still transforming\");return t.push(null)}r.inherits=n(27),r.inherits(o,i),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,i.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,n){throw new Error(\"_transform() is not implemented\")},o.prototype._write=function(t,e,n){var i=this._transformState;if(i.writecb=n,i.writechunk=t,i.writeencoding=e,!i.transforming){var r=this._readableState;(i.needTransform||r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},o.prototype._destroy=function(t,e){var n=this;i.prototype._destroy.call(this,t,function(t){e(t),n.emit(\"close\")})}},function(t,e,n){\"use strict\";var i=n(55).Buffer,r=i.isEncoding||function(t){switch((t=\"\"+t)&&t.toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":case\"raw\":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return\"utf8\";for(var e;;)switch(t){case\"utf8\":case\"utf-8\":return\"utf8\";case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return\"utf16le\";case\"latin1\":case\"binary\":return\"latin1\";case\"base64\":case\"ascii\":case\"hex\":return t;default:if(e)return;t=(\"\"+t).toLowerCase(),e=!0}}(t);if(\"string\"!=typeof e&&(i.isEncoding===r||!r(t)))throw new Error(\"Unknown encoding: \"+t);return e||t}(t),this.encoding){case\"utf16le\":this.text=u,this.end=l,e=4;break;case\"utf8\":this.fillLast=a,e=4;break;case\"base64\":this.text=c,this.end=h,e=3;break;default:return this.write=p,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,\"�\";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,\"�\";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,\"�\"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var n=t.toString(\"utf16le\",e);if(n){var i=n.charCodeAt(n.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString(\"utf16le\",e,t.length-1)}function l(t){var e=t&&t.length?this.write(t):\"\";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString(\"utf16le\",0,n)}return e}function c(t,e){var n=(t.length-e)%3;return 0===n?t.toString(\"base64\",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString(\"base64\",e,t.length-n))}function h(t){var e=t&&t.length?this.write(t):\"\";return this.lastNeed?e+this.lastChar.toString(\"base64\",0,3-this.lastNeed):e}function p(t){return t.toString(this.encoding)}function f(t){return t&&t.length?this.write(t):\"\"}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return\"\";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return\"\";n=this.lastNeed,this.lastNeed=0}else n=0;return n<t.length?e?e+this.text(t,n):this.text(t,n):e||\"\"},o.prototype.end=function(t){var e=t&&t.length?this.write(t):\"\";return this.lastNeed?e+\"�\":e},o.prototype.text=function(t,e){var n=function(t,e,n){var i=e.length-1;if(i<n)return 0;var r=s(e[i]);if(r>=0)return r>0&&(t.lastNeed=r-1),r;if(--i<n||-2===r)return 0;if((r=s(e[i]))>=0)return r>0&&(t.lastNeed=r-2),r;if(--i<n||-2===r)return 0;if((r=s(e[i]))>=0)return r>0&&(2===r?r=0:t.lastNeed=r-3),r;return 0}(this,t,e);if(!this.lastNeed)return t.toString(\"utf8\",e);this.lastTotal=n;var i=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString(\"utf8\",e,i)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,n){\"use strict\";var i=n(56);function r(t,e){t.emit(\"error\",e)}t.exports={destroy:function(t,e){var n=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||i.nextTick(r,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?(i.nextTick(r,n,t),n._writableState&&(n._writableState.errorEmitted=!0)):e&&e(t)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,n){t.exports=n(72).EventEmitter},function(t,e,n){\"use strict\";(function(e,i){var r=n(56);t.exports=g;var o,s=n(115);g.ReadableState=v;n(72).EventEmitter;var a=function(t,e){return t.listeners(e).length},u=n(112),l=n(55).Buffer,c=e.Uint8Array||function(){};var h=n(36);h.inherits=n(27);var p=n(212),f=void 0;f=p&&p.debuglog?p.debuglog(\"stream\"):function(){};var d,y=n(211),m=n(111);h.inherits(g,u);var _=[\"error\",\"close\",\"destroy\",\"pause\",\"resume\"];function v(t,e){o=o||n(25),t=t||{};var i=e instanceof o;this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var r=t.highWaterMark,s=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||\"utf8\",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(d||(d=n(110).StringDecoder),this.decoder=new d(t.encoding),this.encoding=t.encoding)}function g(t){if(o=o||n(25),!(this instanceof g))return new g(t);this._readableState=new v(t,this),this.readable=!0,t&&(\"function\"==typeof t.read&&(this._read=t.read),\"function\"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function b(t,e,n,i,r){var o,s=t._readableState;null===e?(s.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,T(t)}(t,s)):(r||(o=function(t,e){var n;i=e,l.isBuffer(i)||i instanceof c||\"string\"==typeof e||void 0===e||t.objectMode||(n=new TypeError(\"Invalid non-string/buffer chunk\"));var i;return n}(s,e)),o?t.emit(\"error\",o):s.objectMode||e&&e.length>0?(\"string\"==typeof e||s.objectMode||Object.getPrototypeOf(e)===l.prototype||(e=function(t){return l.from(t)}(e)),i?s.endEmitted?t.emit(\"error\",new Error(\"stream.unshift() after end event\")):w(t,s,e,!0):s.ended?t.emit(\"error\",new Error(\"stream.push() after EOF\")):(s.reading=!1,s.decoder&&!n?(e=s.decoder.write(e),s.objectMode||0!==e.length?w(t,s,e,!1):O(t,s)):w(t,s,e,!1))):i||(s.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(s)}function w(t,e,n,i){e.flowing&&0===e.length&&!e.sync?(t.emit(\"data\",n),t.read(0)):(e.length+=e.objectMode?1:n.length,i?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&T(t)),O(t,e)}Object.defineProperty(g.prototype,\"destroyed\",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),g.prototype.destroy=m.destroy,g.prototype._undestroy=m.undestroy,g.prototype._destroy=function(t,e){this.push(null),e(t)},g.prototype.push=function(t,e){var n,i=this._readableState;return i.objectMode?n=!0:\"string\"==typeof t&&((e=e||i.defaultEncoding)!==i.encoding&&(t=l.from(t,e),e=\"\"),n=!0),b(this,t,e,!1,n)},g.prototype.unshift=function(t){return b(this,t,null,!0,!1)},g.prototype.isPaused=function(){return!1===this._readableState.flowing},g.prototype.setEncoding=function(t){return d||(d=n(110).StringDecoder),this._readableState.decoder=new d(t),this._readableState.encoding=t,this};var k=8388608;function S(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=k?t=k:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function T(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(f(\"emitReadable\",e.flowing),e.emittedReadable=!0,e.sync?r.nextTick(x,t):x(t))}function x(t){f(\"emit readable\"),t.emit(\"readable\"),C(t)}function O(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(P,t,e))}function P(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(f(\"maybeReadMore read 0\"),t.read(0),n!==e.length);)n=e.length;e.readingMore=!1}function A(t){f(\"readable nexttick read 0\"),t.read(0)}function E(t,e){e.reading||(f(\"resume read 0\"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit(\"resume\"),C(t),e.flowing&&!e.reading&&t.read(0)}function C(t){var e=t._readableState;for(f(\"flow\",e.flowing);e.flowing&&null!==t.read(););}function M(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(\"\"):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=function(t,e,n){var i;t<e.head.data.length?(i=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):i=t===e.head.data.length?e.shift():n?function(t,e){var n=e.head,i=1,r=n.data;t-=r.length;for(;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(s===o.length?r+=o:r+=o.slice(0,t),0===(t-=s)){s===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++i}return e.length-=i,r}(t,e):function(t,e){var n=l.allocUnsafe(t),i=e.head,r=1;i.data.copy(n),t-=i.data.length;for(;i=i.next;){var o=i.data,s=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,s),0===(t-=s)){s===o.length?(++r,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=o.slice(s));break}++r}return e.length-=r,n}(t,e);return i}(t,e.buffer,e.decoder),n);var n}function R(t){var e=t._readableState;if(e.length>0)throw new Error('\"endReadable()\" called on non-empty stream');e.endEmitted||(e.ended=!0,r.nextTick(j,e,t))}function j(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit(\"end\"))}function F(t,e){for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1}g.prototype.read=function(t){f(\"read\",t),t=parseInt(t,10);var e=this._readableState,n=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return f(\"read: emitReadable\",e.length,e.ended),0===e.length&&e.ended?R(this):T(this),null;if(0===(t=S(t,e))&&e.ended)return 0===e.length&&R(this),null;var i,r=e.needReadable;return f(\"need readable\",r),(0===e.length||e.length-t<e.highWaterMark)&&f(\"length less than watermark\",r=!0),e.ended||e.reading?f(\"reading or ended\",r=!1):r&&(f(\"do read\"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=S(n,e))),null===(i=t>0?M(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&R(this)),null!==i&&this.emit(\"data\",i),i},g.prototype._read=function(t){this.emit(\"error\",new Error(\"_read() is not implemented\"))},g.prototype.pipe=function(t,e){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,f(\"pipe count=%d opts=%j\",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==i.stdout&&t!==i.stderr?c:g;function l(e,i){f(\"onunpipe\"),e===n&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,f(\"cleanup\"),t.removeListener(\"close\",_),t.removeListener(\"finish\",v),t.removeListener(\"drain\",h),t.removeListener(\"error\",m),t.removeListener(\"unpipe\",l),n.removeListener(\"end\",c),n.removeListener(\"end\",g),n.removeListener(\"data\",y),p=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||h())}function c(){f(\"onend\"),t.end()}o.endEmitted?r.nextTick(u):n.once(\"end\",u),t.on(\"unpipe\",l);var h=function(t){return function(){var e=t._readableState;f(\"pipeOnDrain\",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,\"data\")&&(e.flowing=!0,C(t))}}(n);t.on(\"drain\",h);var p=!1;var d=!1;function y(e){f(\"ondata\"),d=!1,!1!==t.write(e)||d||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==F(o.pipes,t))&&!p&&(f(\"false write response, pause\",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function m(e){f(\"onerror\",e),g(),t.removeListener(\"error\",m),0===a(t,\"error\")&&t.emit(\"error\",e)}function _(){t.removeListener(\"finish\",v),g()}function v(){f(\"onfinish\"),t.removeListener(\"close\",_),g()}function g(){f(\"unpipe\"),n.unpipe(t)}return n.on(\"data\",y),function(t,e,n){if(\"function\"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,\"error\",m),t.once(\"close\",_),t.once(\"finish\",v),t.emit(\"pipe\",n),o.flowing||(f(\"pipe resume\"),n.resume()),t},g.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit(\"unpipe\",this,n),this);if(!t){var i=e.pipes,r=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<r;o++)i[o].emit(\"unpipe\",this,n);return this}var s=F(e.pipes,t);return-1===s?this:(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit(\"unpipe\",this,n),this)},g.prototype.on=function(t,e){var n=u.prototype.on.call(this,t,e);if(\"data\"===t)!1!==this._readableState.flowing&&this.resume();else if(\"readable\"===t){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&T(this):r.nextTick(A,this))}return n},g.prototype.addListener=g.prototype.on,g.prototype.resume=function(){var t=this._readableState;return t.flowing||(f(\"resume\"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(E,t,e))}(this,t)),this},g.prototype.pause=function(){return f(\"call pause flowing=%j\",this._readableState.flowing),!1!==this._readableState.flowing&&(f(\"pause\"),this._readableState.flowing=!1,this.emit(\"pause\")),this},g.prototype.wrap=function(t){var e=this,n=this._readableState,i=!1;for(var r in t.on(\"end\",function(){if(f(\"wrapped end\"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)}),t.on(\"data\",function(r){(f(\"wrapped data\"),n.decoder&&(r=n.decoder.write(r)),!n.objectMode||null!==r&&void 0!==r)&&((n.objectMode||r&&r.length)&&(e.push(r)||(i=!0,t.pause())))}),t)void 0===this[r]&&\"function\"==typeof t[r]&&(this[r]=function(e){return function(){return t[e].apply(t,arguments)}}(r));for(var o=0;o<_.length;o++)t.on(_[o],this.emit.bind(this,_[o]));return this._read=function(e){f(\"wrapped _read\",e),i&&(i=!1,t.resume())},this},Object.defineProperty(g.prototype,\"readableHighWaterMark\",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),g._fromList=M}).call(this,n(21),n(51))},function(t,e,n){t.exports=n(213)},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return\"[object Array]\"==n.call(t)}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.train_task=e.live_task=e.fetch_task=void 0;r(n(17)),r(n(14)),r(n(6));var i=r(n(8));function r(t){return t&&t.__esModule?t:{default:t}}e.fetch_task=function(t,e,n){return function(r){if(!t)return console.log(\"input file inaccessible (no url)\");var o={module:\"pix2pix\",activity:\"fetch\",dataset:n,opt:{url:t,file_id:e,dataset:n}};return i.default.queue.add_task(o)}},e.live_task=function(t,e){return function(n){var r={module:\"pix2pix\",activity:\"live\",dataset:t,checkpoint:e,opt:{poll_delay:.09}};return console.log(r),console.log(\"add live task\"),i.default.queue.add_task(r)}},e.train_task=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(r){var o={module:\"pix2pix\",activity:\"train\",dataset:t.name,epoch:0,epochs:n,opt:{folder_id:e,load_size:264}};return console.log(o),i.default.queue.add_task(o)}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});e.default={name:\"morph\",displayName:\"Morph\",datatype:\"video\"}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.actions=e.parser=e.util=void 0;var i,r=n(239),o=n(5),s=(i=o)&&i.__esModule?i:{default:i},a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(237));e.util=s.default,e.parser=a;e.actions=[\"folder\",\"file\",\"dataset\",\"task\",\"user\"].reduce(function(t,e){return(t[e]=(0,r.crud_actions)(e))&&t},{})},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.default=function(t){var e=t.progress;if(!e)return;for(var n=e.i,r=e.n,o=[],s=0;s<r;s++)o.push((0,i.h)(\"div\",{key:s,className:s<n?\"x\":\"o\"}));return(0,i.h)(\"div\",{className:\"progress\"},o)};var i=n(1)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}}();e.default=function(t){var e=t.db,n=t.path,c=t.emptyText,h=t.activity;if(!e)return null;if(e.loading||!e.data)return(0,r.h)(\"div\",{class:\"col folderList\"},(0,r.h)(l.default,{progress:e.progress}));var p=e.data.folders;h&&(p=p.filter(function(t){return t.activity===h}));if(!p.length&&c)return(0,r.h)(\"div\",{class:\"col folderList\"},c);console.log(f);var f=p.map(function(t){var a=e.data.folderLookup[t.id],l=a.files?a.files.length:0,c=s.default.hush_null(l),h=i(c,2),p=h[0];h[1];return(0,r.h)(u.default,{title:(0,r.h)(o.Link,{to:n+a.id+\"/\"},a.name)},(0,r.h)(\"span\",{className:p},l,\" file\",s.default.courtesy_s(l)))});return(0,r.h)(\"div\",{class:\"col folderList\"},(0,r.h)(a.default,{title:\"Projects\"},f))};var r=n(1),o=(n(2),n(3),n(10)),s=c(n(5)),a=c(n(24)),u=c(n(31)),l=c(n(18));function c(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1);var o=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.handleChange=n.handleChange.bind(n),n}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"handleChange\",value:function(t){this.props.onChange&&this.props.onChange(),t.stopPropagation(),t.preventDefault(),this.setState({thumbnails:[],images:[]});var e=t.dataTransfer?t.dataTransfer.files:t.target.files,n=void 0,i=void 0;for(n=0;n<e.length&&!(i=e[n]);n++);this.props.onUpload&&this.props.onUpload(i)}},{key:\"render\",value:function(){return(0,r.h)(\"div\",{className:\"fileUpload param\"},(0,r.h)(\"label\",null,(0,r.h)(\"span\",null,this.props.title),(0,r.h)(\"input\",{type:\"file\",accept:this.props.accept||\"*/*\",multiple:this.props.multiple,onChange:this.handleChange}),(0,r.h)(\"button\",null,this.props.label||\"Choose file...\")))}}]),e}();e.default=o},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1);function o(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}var s=function(t){function e(){var t,n,i;!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);for(var r=arguments.length,s=Array(r),a=0;a<r;a++)s[a]=arguments[a];return n=i=o(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(s))),i.state={x:0,y:0},o(i,n)}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"render\",value:function(){var t=this,e=this.state,n=e.x,i=e.y,o=this.props,s=o.x,a=o.y,u=o.max,l=void 0===u?1/0:u,c=o.onClick,h=o.onHover;return(0,r.h)(\"table\",{className:\"buttonGrid\"},(0,r.h)(\"tr\",{className:\"row\"},(0,r.h)(\"th\",null,\" \"),s.map(function(t){return(0,r.h)(\"th\",{className:t===n&&\"bold\"},t)})),a.map(function(e){return(0,r.h)(\"tr\",{className:\"row\"},(0,r.h)(\"th\",{className:e===i&&\"bold\"},e),s.map(function(n){return(0,r.h)(\"td\",null,n*e>l?\" \":(0,r.h)(\"button\",{onClick:function(){return c(n,e)},onMouseEnter:function(){t.setState({x:n,y:e}),h(n,e)}},\" \"))}))}))}}]),e}();e.default=s},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),s=n(3),a=(n(10),function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(47))),u=n(13);function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var c=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var t=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.state={username:\"\",password:\"\"},t.handleChange=t.handleChange.bind(t),t.handleSubmit=t.handleSubmit.bind(t),t}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"handleChange\",value:function(t,e){var n;this.setState((l(n={},e,t),l(n,\"error\",null),n))}},{key:\"handleSubmit\",value:function(t){t.preventDefault(),this.props.auth.loading||this.props.actions.login(this.state.username,this.state.password)}},{key:\"render\",value:function(){return(0,r.h)(\"form\",{onSubmit:this.handleSubmit},(0,r.h)(\"h1\",null,\"Log in\"),(0,r.h)(\"br\",null),(0,r.h)(u.Group,null,(0,r.h)(u.TextInput,{autofocus:!0,autocapitalize:\"off\",autocomplete:\"off\",title:\"Username\",name:\"username\",type:\"text\",value:this.state.username,onInput:this.handleChange}),(0,r.h)(u.TextInput,{title:\"Password\",name:\"password\",type:\"password\",value:this.state.password,onInput:this.handleChange}),(0,r.h)(u.Button,{loading:this.props.auth.loading},\"Login\"),this.renderAuthError()))}},{key:\"renderAuthError\",value:function(){return this.props.auth.error?(0,r.h)(\"div\",{className:\"form-input-hint\"},\"There was an error logging you in (bad password?)\"):null}}]),e}();e.default=(0,s.connect)(function(t){return{auth:t.auth}},function(t){return{actions:(0,o.bindActionCreators)(a,t)}})(c)},function(t,e){t.exports=e=window.fetch,e.default=window.fetch.bind(window),e.Headers=window.Headers,e.Request=window.Request,e.Response=window.Response},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.destroy=void 0,e.crud_fetch=function(t,e){var n=\"/api/\"+t+\"/\"+(e||\"\");return{index:function(t){return(0,o.default)(function(t,e){var n=new URL(window.location.origin+t);e&&Object.keys(e).forEach(function(t){return n.searchParams.append(t,e[t])});return n}(n,t),{method:\"GET\",credentials:\"same-origin\",headers:{Accept:\"application/json\"}}).then(function(t){return t.json()}).catch(c)},show:function(t){return(0,o.default)(n+t,{method:\"GET\",credentials:\"same-origin\",headers:{Accept:\"application/json\"}},{method:\"GET\",credentials:\"same-origin\",headers:{Accept:\"application/json\"}}).then(function(t){return t.json()}).catch(c)},create:function(t){return(0,o.default)(n,a(t)).then(function(t){return t.json()}).catch(c)},update:function(t){return(0,o.default)(n+t.id,u(t)).then(function(t){return t.json()}).catch(c)},destroy:function(t){return(0,o.default)(n+t.id,l(t)).then(function(t){return t.json()}).catch(c)}}},e._get_headers=s,e.post=a,e.postBody=function(t){return{method:\"POST\",body:t,credentials:\"same-origin\",headers:{Accept:\"application/json\"}}},e.put=u;var i,r=n(124),o=(i=r)&&i.__esModule?i:{default:i};function s(){return{method:\"GET\",credentials:\"same-origin\",headers:{Accept:\"application/json\"}}}function a(t){return{method:\"POST\",body:JSON.stringify(t),credentials:\"same-origin\",headers:{Accept:\"application/json\",\"Content-Type\":\"application/json\"}}}function u(t){return{method:\"PUT\",body:JSON.stringify(t),credentials:\"same-origin\",headers:{Accept:\"application/json\",\"Content-Type\":\"application/json\"}}}function l(t){return{method:\"DELETE\",body:JSON.stringify(t),credentials:\"same-origin\",headers:{Accept:\"application/json\",\"Content-Type\":\"application/json\"}}}function c(t){console.warn(t)}e.destroy=l},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=a(n(48)),r=n(5),o=n(254),s=a(n(251));function a(t){return t&&t.__esModule?t:{default:t}}var u=512,l=u/4,c=new s.default(u);function h(t,e){var n=t.length,i=0,r=void 0;for(r=0;r<e;r++)i=r/e,i*=i,t[r]*=i,t[n-r]*=i}function p(t){var e=t.data,n=t.fft_size,i=t.sr,r=t.fft_overlap,o=e.length,s=new Array(o),a=void 0;for(a=0;a<o;a++)s[a]=e[a].concat(),s[a][2]=0;return{data:s,fft_size:n,sr:i,fft_overlap:r}}function f(t,e){var n=p(t),i=t.data,r=t.sr,o=t.fft_size,s=t.fft_overlap,a=i.length,u=n.data,l=void 0,c=void 0,h=void 0,f=void 0;for(c=e.length;c<o;c++)e[c]=c;for(l=0;l<a;l++){for(h=i[l],f=u[l]=i[l].concat(),h[0]=0,h[2]=0,h[4]=0,c=0;c<o/2;c++)f[2*c]=h[2*e[c]],f[2*c+1]=h[2*e[c]+1];for(;c<o;c++)f[2*c]=0,f[2*c+1]=0}return{data:u,sr:r,fft_size:o,fft_overlap:s}}e.default={fft_size:u,fft_overlap:l,toSpectrum:function(t,e){e=e||44100;var n=o.windows.construct(\"ham\",u),i=new Array(u),r=t.length,s=Math.ceil(r/u)*u,a=void 0,h=void 0,p=void 0,f=[];for(a=-u;a<s;a+=l){for(h=0;h<u;h++)i[h]=t[a+h]*n[h]||0;p=c.createComplexArray(),c.realTransform(p,i),c.completeSpectrum(p),f.push(p)}return{data:f,sr:e,fft_size:u,fft_overlap:l}},fromSpectrum:function(t){var e=t.data,n=t.sr,r=t.fft_size,s=t.fft_overlap,a=e.length,u=o.windows.construct(\"ham\",r),l=c.createComplexArray(),p=s*a,f=i.default.context.createBuffer(1,p,n),d=f.getChannelData(0),y=void 0,m=void 0,_=void 0,v=void 0;for(y=0;y<a;y++)for(v=e[y],c.inverseTransform(l,v),_=y*s,m=0;m<r;m++)d[_+m]+=l[2*m]*u[m]||0;return h(d,r),f},fromImageData:function(t,e,n,i){var r=t.data,o=t.width,s=t.height,a=new Array(o),c=void 0,h=void 0,p=void 0,f=void 0,d=void 0;for(h=0;h<s;h++){var y=a[h]=new Float32Array(4*s);for(c=0;c<o;c++)p=4*(c*o+h),y[f=2*c]=(r[p]/255-.5)*n,y[f+1]=(r[p+1]/255-.5)*i,y[d=2*(s-h+s)]=y[f],y[d+1]=0;y[2*s]=y[2*s+1]=y[2*s-1]=y[2*s-2]=0}return{data:a,sr:e,fft_size:u,fft_overlap:l}},binToHz:function(t,e){return e/t.fft_size*t.sr},fadeInOut:h,cloneSpectrum:p,reverseSpectrum:function(t){var e=p(t);return e.data=e.data.reverse(),e},shuffleSpectrum:function(t){var e=t.fft_size,n=new Array(e),i=void 0;for(i=0;i<e;i++)n[i]=i;return(0,r.shuffle)(n),f(t,n)},invertSpectrum:function(t){var e=t.fft_size,n=new Array(e),i=void 0;for(i=0;i<e;i++)n[i]=e-i-1;return f(t,n)},rotateSpectrum:function(t,e){var n=t.fft_size;e&&e<1&&(e-=.5,e*=n),e=Math.floor(e);var i=new Array(n),o=void 0;for(o=0;o<n;o++)i[o]=(0,r.mod)(o+e,n/2);return f(t,i)},reorderBins:f,linearBins:function(t,e){e=e||1;var n=[],i=void 0,o=void 0;for(o=0;o<e;o++)n[o]=[];var s=Math.floor(t.fft_size/e),a=(0,r.quantize)(t.fft_size,e);for(i=0;i<a;i++)n[o=Math.floor(i/s)]=n[o]||[],n[o].push(i);for(;i<t.fft_size;i++)n[o].push(i);return n},logarithmicBins:function(t){var e=[],n=void 0,i=void 0,r=void 0,o=Math.log2(t.fft_size)-1;for(n=0,r=0,i=0;n<o;n++)for(i+=1<<n,e[n]=[];r<i;r++)e[n].push(r);return e},concatBins:function(t){return t.reduce(function(t,e){return t.concat(e)},[])},reverseBins:function(t){return t.map(function(t){return t.reverse()})},minBins:function(t){return t.map(function(t){var e=t[0];return t.map(function(){return e})})},maxBins:function(t){return t.map(function(t){var e=t[t.length-1];return t.map(function(){return e})})},rotatePhase:function(t,e){var n=t.data,i=t.fft_size,r=void 0,o=void 0,s=void 0,a=n.length;for(r=0;r<a;r++)for(s=n[r],o=0;o<i;o++)s[2*o+1]+=e;return t}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i,r=n(48),o=(i=r)&&i.__esModule?i:{default:i};var s=new o.default.Compressor(-30,3).toMaster(),a=new o.default.Gain(1).connect(s);e.default=a},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.spectrum=function(t,e,n,i,r){var o=t.data,c=(t.fft_size,t.fft_size/2),h=o.length;s.width=o.length,s.height=c;var p=ctx.createImageData(s.width,s.height),f=p.data,d=void 0,y=void 0,m=void 0,_=void 0,v=void 0,g=void 0,b=void 0,w=void 0;for(d=0;d<h;d++)for(b=o[d],y=0;y<c;y++)m=4*((c-y)*h+d),v=b[_=2*y],g=mod(b[_+1],2*Math.PI)/(2*Math.PI),w=color.hsl2rgb((g+1)/2,1,1-Math.abs(v/10)),f[m]=w[0],f[m+1]=w[1],f[m+2]=w[2],f[m+3]=255;a.putImageData(p,0,0);var k=t.fft_overlap*h;e=e*devicePixelRatio||0,n=n*devicePixelRatio||Math.floor(l/4),i=i*devicePixelRatio||u,r=r*devicePixelRatio||l/4;var S=Math.round(k/t.sr*pixels_per_second),T=Math.floor(r);ctx.save(),clear(1,e,n,u,T),ctx.drawImage(s,e,n,S,T),ctx.restore()},e.raw_spectrum=function(t,e,n,i,r,s,a){var u=t.data,l=(t.fft_size,t.fft_size/2),c=u.length,h=document.createElement(\"canvas\"),p=h.getContext(\"2d-lodpi\");h.width=u.length,h.height=l;var f=p.createImageData(h.width,h.height),d=f.data,y=void 0,m=void 0,_=void 0,v=void 0,g=void 0,b=void 0,w=void 0,k=-s,S=-a,T=s-k,x=a-S,O=0,P=0,A=void 0,E=void 0;for(y=0;y<c;y++){for(w=u[y],O=0,P=0,m=0;m<l;m++)_=4*(m*c+y),A=w[v=2*m],E=w[v+1],O+=A,P+=E,g=o.default.clamp((A-k)/T*255,0,255),b=o.default.clamp((E-S)/x*255,0,255),d[_+0]=g,d[_+1]=b,d[_+2]=127,d[_+3]=255;O/=l,P/=l}return c,c,p.putImageData(f,0,0),{canvas:h,imageData:f}};var i,r=n(5),o=(i=r)&&i.__esModule?i:{default:i};var s=document.createElement(\"canvas\"),a=s.getContext(\"2d-lodpi\"),u=256,l=256},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.play=function(t){var e=o.default.fromImageData(t.imageData,44100,a,u),n=o.default.fromSpectrum(e),s=new i.default.Player(n);s.connect(r.default),s.start(i.default.now())};s(n(6));var i=s(n(48)),r=(function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);e.default=t}(n(128)),s(n(127))),o=s(n(126));function s(t){return t&&t.__esModule?t:{default:t}}var a=8,u=8},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.syscall_async=e.upload_file=e.run_script=e.list_sequences=e.count_directory=e.list_directory=e.disk_usage=e.run_system_command=void 0;var i,r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},o=n(17),s=(i=o)&&i.__esModule?i:{default:i},a=n(32);e.run_system_command=function(t){return u(\"run_system_command\",t)},e.disk_usage=function(t){return u(\"run_system_command\",r({cmd:\"du\"},t))},e.list_directory=function(t){return u(\"list_directory\",t).then(function(t){return t.files})},e.count_directory=function(t){return u(\"count_directory\",t).then(function(t){return t.count})},e.list_sequences=function(t){return u(\"list_sequences\",t).then(function(t){return t.sequences})},e.run_script=function(t){return u(\"run_script\",t)},e.upload_file=function(t){return u(\"upload_file\",t)};var u=e.syscall_async=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e4;return n=e.ttl||n,new Promise(function(i,r){var o=(0,s.default)(),u=setTimeout(function(){a.socket.off(\"system_res\",l),r(\"timeout\")},n),l=function t(e){e.uuid&&e.uuid===o&&(clearTimeout(u),a.socket.off(\"system_res\",t),i(e))};a.socket.emit(\"system\",{cmd:t,payload:e,uuid:o}),a.socket.on(\"system_res\",l)})}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.randrange=function(t,e){return Math.random()*(e-t)+t},e.randsign=function(){return Math.random()>=.5?-1:1},e.choice=function(t){return t[Math.floor(Math.random()*t.length)]},e.angle=function(t,e,n,i){return Math.atan2(i-e,n-t)},e.dist=function(t,e,n,i){return Math.sqrt(Math.pow(n-t,2)+Math.pow(i-e,2))},e.xor=function(t,e){return e=!!e,((t=!!t)||e)&&!(t&&e)},e.quantize=function(t,e){return Math.floor(t/e)*e},e.shuffle=function(t){for(var e=t.length;e>0;e--){var n=i(e),r=t[e-1];t[e-1]=t[n],t[n]=r}return t},e.gaussian=function(t,e){var n=void 0,i=!1;return function(){var r=void 0;if(i)r=n,i=!1;else{var o=void 0,s=void 0,a=void 0;do{o=2*Math.random()-1,s=2*Math.random()-1,a=o*o+s*s}while(a>=1);a=Math.sqrt(-2*Math.log(a)/a),r=o*a,n=s*a,i=!0}var u=t+e*r;return u>0?u:-u}};e.mod=function(t,e){return t-e*Math.floor(t/e)},e.clamp=function(t,e,n){return t<e?e:t<n?t:n},e.norm=function(t,e,n){return(t-e)/(n-e)},e.lerp=function(t,e,n){return(n-e)*t+e},e.mix=function(t,e,n){return e*(1-t)+n*t};var i=e.randint=function(t){return Math.floor(Math.random()*t)}},function(t,e,n){\"use strict\";e.__esModule=!0;e.addLeadingSlash=function(t){return\"/\"===t.charAt(0)?t:\"/\"+t},e.stripLeadingSlash=function(t){return\"/\"===t.charAt(0)?t.substr(1):t};var i=e.hasBasename=function(t,e){return new RegExp(\"^\"+e+\"(\\\\/|\\\\?|#|$)\",\"i\").test(t)};e.stripBasename=function(t,e){return i(t,e)?t.substr(e.length):t},e.stripTrailingSlash=function(t){return\"/\"===t.charAt(t.length-1)?t.slice(0,-1):t},e.parsePath=function(t){var e=t||\"/\",n=\"\",i=\"\",r=e.indexOf(\"#\");-1!==r&&(i=e.substr(r),e=e.substr(0,r));var o=e.indexOf(\"?\");return-1!==o&&(n=e.substr(o),e=e.substr(0,o)),{pathname:e,search:\"?\"===n?\"\":n,hash:\"#\"===i?\"\":i}},e.createPath=function(t){var e=t.pathname,n=t.search,i=t.hash,r=e||\"/\";return n&&\"?\"!==n&&(r+=\"?\"===n.charAt(0)?n:\"?\"+n),i&&\"#\"!==i&&(r+=\"#\"===i.charAt(0)?i:\"#\"+i),r}},function(t,e,n){\"use strict\";t.exports=function(){}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=e.CALL_HISTORY_METHOD=\"@@router/CALL_HISTORY_METHOD\";function r(t){return function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return{type:i,payload:{method:t,args:n}}}}var o=e.push=r(\"push\"),s=e.replace=r(\"replace\"),a=e.go=r(\"go\"),u=e.goBack=r(\"goBack\"),l=e.goForward=r(\"goForward\");e.routerActions={push:o,replace:s,go:a,goBack:u,goForward:l}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};e.routerReducer=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.type,s=e.payload;if(n===r)return i({},t,{locationBeforeTransitions:s});return t};var r=e.LOCATION_CHANGE=\"@@router/LOCATION_CHANGE\",o={locationBeforeTransitions:null}},function(t,e,n){\"use strict\";e.__esModule=!0;e.canUseDOM=!(\"undefined\"==typeof window||!window.document||!window.document.createElement),e.addEventListener=function(t,e,n){return t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent(\"on\"+e,n)},e.removeEventListener=function(t,e,n){return t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent(\"on\"+e,n)},e.getConfirmation=function(t,e){return e(window.confirm(t))},e.supportsHistory=function(){var t=window.navigator.userAgent;return(-1===t.indexOf(\"Android 2.\")&&-1===t.indexOf(\"Android 4.0\")||-1===t.indexOf(\"Mobile Safari\")||-1!==t.indexOf(\"Chrome\")||-1!==t.indexOf(\"Windows Phone\"))&&(window.history&&\"pushState\"in window.history)},e.supportsPopStateOnHashChange=function(){return-1===window.navigator.userAgent.indexOf(\"Trident\")},e.supportsGoWithoutReloadUsingHash=function(){return-1===window.navigator.userAgent.indexOf(\"Firefox\")},e.isExtraneousPopstateEvent=function(t){return void 0===t.state&&-1===navigator.userAgent.indexOf(\"CriOS\")}},function(t,e,n){\"use strict\";e.__esModule=!0;var i,r=n(7),o=(i=r)&&i.__esModule?i:{default:i};e.default=function(){var t=null,e=[];return{setPrompt:function(e){return(0,o.default)(null==t,\"A history supports only one prompt at a time\"),t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,i,r){if(null!=t){var s=\"function\"==typeof t?t(e,n):t;\"string\"==typeof s?\"function\"==typeof i?i(s,r):((0,o.default)(!1,\"A history needs a getUserConfirmation function in order to use a prompt message\"),r(!0)):r(!1!==s)}else r(!0)},appendListener:function(t){var n=!0,i=function(){n&&t.apply(void 0,arguments)};return e.push(i),function(){n=!1,e=e.filter(function(t){return t!==i})}},notifyListeners:function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];e.forEach(function(t){return t.apply(void 0,n)})}}}},function(t,e,n){\"use strict\";e.__esModule=!0,e.locationsAreEqual=e.createLocation=void 0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=a(n(83)),o=a(n(82)),s=n(81);function a(t){return t&&t.__esModule?t:{default:t}}e.createLocation=function(t,e,n,o){var a=void 0;\"string\"==typeof t?(a=(0,s.parsePath)(t)).state=e:(void 0===(a=i({},t)).pathname&&(a.pathname=\"\"),a.search?\"?\"!==a.search.charAt(0)&&(a.search=\"?\"+a.search):a.search=\"\",a.hash?\"#\"!==a.hash.charAt(0)&&(a.hash=\"#\"+a.hash):a.hash=\"\",void 0!==e&&void 0===a.state&&(a.state=e));try{a.pathname=decodeURI(a.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname \"'+a.pathname+'\" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(a.key=n),o?a.pathname?\"/\"!==a.pathname.charAt(0)&&(a.pathname=(0,r.default)(a.pathname,o.pathname)):a.pathname=o.pathname:a.pathname||(a.pathname=\"/\"),a},e.locationsAreEqual=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&(0,o.default)(t.state,e.state)}},function(t,e,n){t.exports=function(){\"use strict\";var t={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},e={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n=Object.defineProperty,i=Object.getOwnPropertyNames,r=Object.getOwnPropertySymbols,o=Object.getOwnPropertyDescriptor,s=Object.getPrototypeOf,a=s&&s(Object);return function u(l,c,h){if(\"string\"!=typeof c){if(a){var p=s(c);p&&p!==a&&u(l,p,h)}var f=i(c);r&&(f=f.concat(r(c)));for(var d=0;d<f.length;++d){var y=f[d];if(!(t[y]||e[y]||h&&h[y])){var m=o(c,y);try{n(l,y,m)}catch(t){}}}return l}return l}}()},function(t,e,n){\"use strict\";e.__esModule=!0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=c(n(7)),o=c(n(11)),s=n(138),a=n(81),u=c(n(137)),l=n(136);function c(t){return t&&t.__esModule?t:{default:t}}var h={hashbang:{encodePath:function(t){return\"!\"===t.charAt(0)?t:\"!/\"+(0,a.stripLeadingSlash)(t)},decodePath:function(t){return\"!\"===t.charAt(0)?t.substr(1):t}},noslash:{encodePath:a.stripLeadingSlash,decodePath:a.addLeadingSlash},slash:{encodePath:a.addLeadingSlash,decodePath:a.addLeadingSlash}},p=function(){var t=window.location.href,e=t.indexOf(\"#\");return-1===e?\"\":t.substring(e+1)},f=function(t){var e=window.location.href.indexOf(\"#\");window.location.replace(window.location.href.slice(0,e>=0?e:0)+\"#\"+t)};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,o.default)(l.canUseDOM,\"Hash history needs a DOM\");var e=window.history,n=(0,l.supportsGoWithoutReloadUsingHash)(),c=t.getUserConfirmation,d=void 0===c?l.getConfirmation:c,y=t.hashType,m=void 0===y?\"slash\":y,_=t.basename?(0,a.stripTrailingSlash)((0,a.addLeadingSlash)(t.basename)):\"\",v=h[m],g=v.encodePath,b=v.decodePath,w=function(){var t=b(p());return(0,r.default)(!_||(0,a.hasBasename)(t,_),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path \"'+t+'\" to begin with \"'+_+'\".'),_&&(t=(0,a.stripBasename)(t,_)),(0,s.createLocation)(t)},k=(0,u.default)(),S=function(t){i(D,t),D.length=e.length,k.notifyListeners(D.location,D.action)},T=!1,x=null,O=function(){var t=p(),e=g(t);if(t!==e)f(e);else{var n=w(),i=D.location;if(!T&&(0,s.locationsAreEqual)(i,n))return;if(x===(0,a.createPath)(n))return;x=null,P(n)}},P=function(t){T?(T=!1,S()):k.confirmTransitionTo(t,\"POP\",d,function(e){e?S({action:\"POP\",location:t}):A(t)})},A=function(t){var e=D.location,n=R.lastIndexOf((0,a.createPath)(e));-1===n&&(n=0);var i=R.lastIndexOf((0,a.createPath)(t));-1===i&&(i=0);var r=n-i;r&&(T=!0,j(r))},E=p(),C=g(E);E!==C&&f(C);var M=w(),R=[(0,a.createPath)(M)],j=function(t){(0,r.default)(n,\"Hash history go(n) causes a full page reload in this browser\"),e.go(t)},F=0,N=function(t){1===(F+=t)?(0,l.addEventListener)(window,\"hashchange\",O):0===F&&(0,l.removeEventListener)(window,\"hashchange\",O)},L=!1,D={length:e.length,action:\"POP\",location:M,createHref:function(t){return\"#\"+g(_+(0,a.createPath)(t))},push:function(t,e){(0,r.default)(void 0===e,\"Hash history cannot push state; it is ignored\");var n=(0,s.createLocation)(t,void 0,void 0,D.location);k.confirmTransitionTo(n,\"PUSH\",d,function(t){if(t){var e=(0,a.createPath)(n),i=g(_+e);if(p()!==i){x=e,function(t){window.location.hash=t}(i);var o=R.lastIndexOf((0,a.createPath)(D.location)),s=R.slice(0,-1===o?0:o+1);s.push(e),R=s,S({action:\"PUSH\",location:n})}else(0,r.default)(!1,\"Hash history cannot PUSH the same path; a new entry will not be added to the history stack\"),S()}})},replace:function(t,e){(0,r.default)(void 0===e,\"Hash history cannot replace state; it is ignored\");var n=(0,s.createLocation)(t,void 0,void 0,D.location);k.confirmTransitionTo(n,\"REPLACE\",d,function(t){if(t){var e=(0,a.createPath)(n),i=g(_+e);p()!==i&&(x=e,f(i));var r=R.indexOf((0,a.createPath)(D.location));-1!==r&&(R[r]=e),S({action:\"REPLACE\",location:n})}})},go:j,goBack:function(){return j(-1)},goForward:function(){return j(1)},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=k.setPrompt(t);return L||(N(1),L=!0),function(){return L&&(L=!1,N(-1)),e()}},listen:function(t){var e=k.appendListener(t);return N(1),function(){N(-1),e()}}};return D}},function(t,e,n){\"use strict\";e.__esModule=!0;var i=\"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},r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},o=h(n(7)),s=h(n(11)),a=n(138),u=n(81),l=h(n(137)),c=n(136);function h(t){return t&&t.__esModule?t:{default:t}}var p=function(){try{return window.history.state||{}}catch(t){return{}}};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.default)(c.canUseDOM,\"Browser history needs a DOM\");var e=window.history,n=(0,c.supportsHistory)(),h=!(0,c.supportsPopStateOnHashChange)(),f=t.forceRefresh,d=void 0!==f&&f,y=t.getUserConfirmation,m=void 0===y?c.getConfirmation:y,_=t.keyLength,v=void 0===_?6:_,g=t.basename?(0,u.stripTrailingSlash)((0,u.addLeadingSlash)(t.basename)):\"\",b=function(t){var e=t||{},n=e.key,i=e.state,r=window.location,s=r.pathname+r.search+r.hash;return(0,o.default)(!g||(0,u.hasBasename)(s,g),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path \"'+s+'\" to begin with \"'+g+'\".'),g&&(s=(0,u.stripBasename)(s,g)),(0,a.createLocation)(s,i,n)},w=function(){return Math.random().toString(36).substr(2,v)},k=(0,l.default)(),S=function(t){r(L,t),L.length=e.length,k.notifyListeners(L.location,L.action)},T=function(t){(0,c.isExtraneousPopstateEvent)(t)||P(b(t.state))},x=function(){P(b(p()))},O=!1,P=function(t){O?(O=!1,S()):k.confirmTransitionTo(t,\"POP\",m,function(e){e?S({action:\"POP\",location:t}):A(t)})},A=function(t){var e=L.location,n=C.indexOf(e.key);-1===n&&(n=0);var i=C.indexOf(t.key);-1===i&&(i=0);var r=n-i;r&&(O=!0,R(r))},E=b(p()),C=[E.key],M=function(t){return g+(0,u.createPath)(t)},R=function(t){e.go(t)},j=0,F=function(t){1===(j+=t)?((0,c.addEventListener)(window,\"popstate\",T),h&&(0,c.addEventListener)(window,\"hashchange\",x)):0===j&&((0,c.removeEventListener)(window,\"popstate\",T),h&&(0,c.removeEventListener)(window,\"hashchange\",x))},N=!1,L={length:e.length,action:\"POP\",location:E,createHref:M,push:function(t,r){(0,o.default)(!(\"object\"===(void 0===t?\"undefined\":i(t))&&void 0!==t.state&&void 0!==r),\"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored\");var s=(0,a.createLocation)(t,r,w(),L.location);k.confirmTransitionTo(s,\"PUSH\",m,function(t){if(t){var i=M(s),r=s.key,a=s.state;if(n)if(e.pushState({key:r,state:a},null,i),d)window.location.href=i;else{var u=C.indexOf(L.location.key),l=C.slice(0,-1===u?0:u+1);l.push(s.key),C=l,S({action:\"PUSH\",location:s})}else(0,o.default)(void 0===a,\"Browser history cannot push state in browsers that do not support HTML5 history\"),window.location.href=i}})},replace:function(t,r){(0,o.default)(!(\"object\"===(void 0===t?\"undefined\":i(t))&&void 0!==t.state&&void 0!==r),\"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored\");var s=(0,a.createLocation)(t,r,w(),L.location);k.confirmTransitionTo(s,\"REPLACE\",m,function(t){if(t){var i=M(s),r=s.key,a=s.state;if(n)if(e.replaceState({key:r,state:a},null,i),d)window.location.replace(i);else{var u=C.indexOf(L.location.key);-1!==u&&(C[u]=s.key),S({action:\"REPLACE\",location:s})}else(0,o.default)(void 0===a,\"Browser history cannot replace state in browsers that do not support HTML5 history\"),window.location.replace(i)}})},go:R,goBack:function(){return R(-1)},goForward:function(){return R(1)},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=k.setPrompt(t);return N||(F(1),N=!0),function(){return N&&(N=!1,F(-1)),e()}},listen:function(t){var e=k.appendListener(t);return F(1),function(){F(-1),e()}}};return L}},function(t,e,n){\"use strict\";function i(t){var e,n=t.Symbol;return\"function\"==typeof n?n.observable?e=n.observable:(e=n(\"observable\"),n.observable=e):e=\"@@observable\",e}n.d(e,\"a\",function(){return i})},function(t,e,n){t.exports=function(){\"use strict\";var t={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},e={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n=Object.defineProperty,i=Object.getOwnPropertyNames,r=Object.getOwnPropertySymbols,o=Object.getOwnPropertyDescriptor,s=Object.getPrototypeOf,a=s&&s(Object);return function u(l,c,h){if(\"string\"!=typeof c){if(a){var p=s(c);p&&p!==a&&u(l,p,h)}var f=i(c);r&&(f=f.concat(r(c)));for(var d=0;d<f.length;++d){var y=f[d];if(!(t[y]||e[y]||h&&h[y])){var m=o(c,y);try{n(l,y,m)}catch(t){}}}return l}return l}}()},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.load=void 0;var i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}}(),r=a(n(6)),o=a(n(8)),s=a(n(5));function a(t){return t&&t.__esModule?t:{default:t}}e.load=function(){return function(t){s.default.allProgress([o.default.task.index({limit:40,orderBy:\"created_at desc\"}),o.default.folder.index({activity:\"dataset\"}),o.default.file.index({module:\"samplernn\",generated:1,limit:15,orderBy:\"created_at desc\"}),o.default.file.index({module:\"pix2pixhd\",generated:1,limit:15,orderBy:\"created_at desc\"}),o.default.file.index({module:\"morph\",generated:1,limit:15,orderBy:\"created_at desc\"})],function(e,n,i){t({type:r.default.app.load_progress,progress:{i:n,n:i},data:{module:\"dashboard\"}})}).then(function(e){var n=i(e,5),o=n[0],a=n[1],u=n[2],l=n[3],c=n[4],h=s.default.sort.orderByFn(\"date desc\"),p=h.mapFn,f=h.sortFn,d=a.map(p).sort(f).reduce(function(t,e){var n=e[1].module;return t[n]=t[n]||[],t[n].push(e[1]),t},{});t({type:r.default.dashboard.load,data:{tasks:o,folders:a,foldersByModule:d,renders:{samplernn:u,pix2pixhd:l,morph:c}}})})}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(1),s=n(3),a=(n(2),n(5)),u=(i=a)&&i.__esModule?i:{default:i};var l=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.handleClick=n.handleClick.bind(n),n}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.Component),r(e,[{key:\"handleClick\",value:function(t){this.props.onClick&&this.props.onClick()}},{key:\"render\",value:function(){var t=this.props,e=t.site,n=t.runner;return(0,o.h)(\"div\",{class:\"dashboardHeader heading\"},(0,o.h)(\"h1\",null,e.name,\" cortex\"),this.renderStatus(\"GPU\",n.gpu),this.renderStatus(\"CPU\",n.cpu))}},{key:\"renderStatus\",value:function(t,e){if(\"IDLE\"===e.status)return(0,o.h)(\"div\",null,t,\" idle\");var n=e.task;return\"live\"===n.activity?(0,o.h)(\"div\",null,t,\" running \",(0,o.h)(\"b\",null,n.module),' live on \"',n.dataset,'\"'):(0,o.h)(\"div\",null,t,\" \",u.default.gerund(n.activity),\" \",(0,o.h)(\"b\",null,n.module),\" on \",(0,o.h)(\"b\",null,n.dataset),!!n.epoch&&(0,o.h)(\"span\",null,\"Epoch: \",n.epoch,\" / \",n.epochs,(0,o.h)(\"br\",null)))}}]),e}();e.default=(0,s.connect)(function(t){return{runner:t.system.runner,site:t.system.site}},function(t,e){return{}})(l)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),s=n(10),a=n(3),u=(y(n(87)),y(n(24))),l=(y(n(63)),y(n(52)),y(n(45)),y(n(145))),c=n(13),h=d(n(144)),p=d(n(46)),f=y(n(77));y(n(8));function d(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function y(t){return t&&t.__esModule?t:{default:t}}var m=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.actions.load(),n}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"componentWillUpdate\",value:function(t){}},{key:\"render\",value:function(){var t=this,e=this.props,n=e.loading,i=e.progress,o=(e.site,e.foldersByModule),a=e.renders,h=e.queue;e.images;if(n)return(0,r.h)(c.Loading,{progress:i});var p=h.tasks,d=o&&Object.keys(f.default).sort().map(function(e){var n=\"samplernn\"===e?\"/samplernn/datasets/\":\"/\"+e+\"/sequences/\",i=(o[e]||[]).map(function(t){return(0,r.h)(\"div\",{key:t.id},(0,r.h)(s.Link,{to:n+t.id+\"/\"},t.name))}),u=a[e]&&(0,r.h)(c.FileList,{linkFiles:!0,files:a[e],orderBy:\"date desc\",fields:\"name date epoch size\",onClick:\"samplernn\"===e?function(e,n){n.preventDefault(),n.stopPropagation(),console.log(\"picked a file\",e),t.handlePick(e)}:null});return(0,r.h)(\"div\",{className:\"dashboardModule\",key:e},(0,r.h)(\"div\",{className:\"row moduleHeading\"},(0,r.h)(\"h3\",null,e),(0,r.h)(\"div\",null,(0,r.h)(s.Link,{to:\"/\"+e+\"/new/\"},\"new\")),i),u)}).filter(function(t){return!!t});return(0,r.h)(\"div\",{className:\"app dashboard\"},(0,r.h)(l.default,null),(0,r.h)(\"div\",{className:\"params row\"},(0,r.h)(\"div\",{className:\"column\"},!!h.queue.length&&(0,r.h)(u.default,{title:\"Upcoming Tasks\"},(0,r.h)(c.TaskList,{tasks:h.queue.map(function(t){return p[t]})})),!!h.completed.length&&(0,r.h)(u.default,{title:\"Completed Tasks\"},(0,r.h)(c.TaskList,{tasks:h.completed.map(function(t){return p[t]})}))),(0,r.h)(\"div\",{className:\"column\"},d)))}},{key:\"handlePick\",value:function(t){this.props.audioPlayer.play(t)}}]),e}();e.default=(0,a.connect)(function(t){return{loading:t.dashboard.loading,progress:t.dashboard.progress,site:t.system.site,foldersByModule:t.dashboard.data.foldersByModule,renders:t.dashboard.data.renders,images:t.dashboard.images,files:t.dashboard.files,queue:t.queue}},function(t,e){return{actions:(0,o.bindActionCreators)(h,t),audioPlayer:(0,o.bindActionCreators)(p,t)}})(m)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(1),s=n(2),a=n(3),u=y(n(24)),l=y(n(31)),c=d(n(78)),h=d(n(20)),p=d(n(44)),f=d(n(47));function d(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function y(t){return t&&t.__esModule?t:{default:t}}var m={activity:\"cpu\",module:\"test\",dataset:\"test\",epochs:1,opt:{}},_={activity:\"gpu\",module:\"test\",dataset:\"test\",epochs:1,opt:{}},v={activity:\"live\",module:\"test\",dataset:\"test\",epochs:1,opt:{}},g={activity:\"wait\",module:\"test\",dataset:\"test\",epochs:1,opt:{}},b=[\"apple\",\"pear\",\"orange\",\"strawberry\"];function w(t){return t[Math.floor(Math.random()*t.length)]}var k=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e),function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this))}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.Component),r(e,[{key:\"componentDidUpdate\",value:function(){this._screen.scrollHeight>this._screen.scrollTop-this._screen.offsetHeight+100&&(this._screen.scrollTop=this._screen.scrollHeight)}},{key:\"render\",value:function(){var t=this.props,e=t.site,n=t.server,i=t.relay,r=t.runner,s=t.rpc,a=t.actions,c=t.user;return(0,o.h)(\"div\",{className:\"app system\"},(0,o.h)(\"div\",{className:\"heading\"},(0,o.h)(\"h1\",null,e.name,\" system\")),(0,o.h)(\"div\",{className:\"row params\"},(0,o.h)(\"div\",{className:\"column\"},(0,o.h)(u.default,{title:\"Status\"},(0,o.h)(l.default,{title:\"Server\"},n.status),n.error&&(0,o.h)(l.default,{title:\"Server error\"},n.error.message),(0,o.h)(l.default,{title:\"Relay\"},i.status),(0,o.h)(l.default,{title:\"RPC\"},s.status),(0,o.h)(l.default,{title:\"CPU\"},this.renderStatus(r.cpu)),(0,o.h)(l.default,{title:\"GPU\"},this.renderStatus(r.gpu))),(0,o.h)(u.default,{title:\"Diagnostics\"},(0,o.h)(l.default,{title:\"Check GPU\"},(0,o.h)(\"button\",{onClick:function(){return a.system.run(\"nvidia-smi\")}},\"nvidia-smi\")),(0,o.h)(l.default,{title:\"List processes\"},(0,o.h)(\"button\",{onClick:function(){return a.system.run(\"ps\")}},\"ps\")),(0,o.h)(l.default,{title:\"List users\"},(0,o.h)(\"button\",{onClick:function(){return a.system.run(\"w\")}},\"w\")),(0,o.h)(l.default,{title:\"Disk free space\"},(0,o.h)(\"button\",{onClick:function(){return a.system.run(\"df\")}},\"df\"))),(0,o.h)(u.default,{title:\"Tasks\"},(0,o.h)(l.default,{title:\"Kill task\"},(0,o.h)(\"button\",{onClick:function(){return a.queue.stop_task(\"cpu\")}},\"CPU\"),(0,o.h)(\"button\",{onClick:function(){return a.queue.stop_task(\"gpu\")}},\"GPU\")),(0,o.h)(l.default,{title:\"Queue\"},(0,o.h)(\"button\",{onClick:function(){return a.queue.start_queue()}},\"Start\"),(0,o.h)(\"button\",{onClick:function(){return a.queue.stop_queue()}},\"Stop\"))),(0,o.h)(u.default,{title:\"Auth\"},(0,o.h)(l.default,{title:\"Logged in as \"+c.username},(0,o.h)(\"button\",{onClick:function(){return a.auth.logout()}},\"Logout\"))),(0,o.h)(u.default,{title:\"Test\"},(0,o.h)(l.default,{title:\"CPU Test Task\"},(0,o.h)(\"button\",{onClick:function(){return a.queue.start_task(m,{preempt:!0,watch:!0})}},\"Start\"),(0,o.h)(\"button\",{onClick:function(){return a.queue.stop_task(r.cpu.task)}},\"Stop\")),(0,o.h)(l.default,{title:\"GPU Test Task\"},(0,o.h)(\"button\",{onClick:function(){return a.queue.start_task(_,{preempt:!0,watch:!0})}},\"Start\"),(0,o.h)(\"button\",{onClick:function(){return a.queue.stop_task(r.gpu.task)}},\"Stop\")),(0,o.h)(l.default,{title:\"Live Test Task\"},(0,o.h)(\"button\",{onClick:function(){return a.queue.start_task(v,{preempt:!0,watch:!0})}},\"Start\"),(0,o.h)(\"button\",{onClick:function(){return a.queue.stop_task(r.cpu.task)}},\"Stop\")),(0,o.h)(l.default,{title:\"Test Live RPC\"},(0,o.h)(\"button\",{onClick:function(){return a.live.get_params()}},\"Get\"),(0,o.h)(\"button\",{onClick:function(){return a.live.set_param(\"fruit\",w(b))}},\"Set\")),(0,o.h)(l.default,{title:\"Queue Tests\"},(0,o.h)(\"button\",{onClick:function(){return a.system.enqueue_test_task(w(b))}},\"+Add test task\")),(0,o.h)(l.default,{title:\"\"},(0,o.h)(\"button\",{onClick:function(){return a.queue.start_task(g,{preempt:!0,watch:!0})}},\"Wait and Buzz\")))),this.renderCommandOutput()))}},{key:\"renderStatus\",value:function(t){if(!t)return\"unknown\";if(\"IDLE\"===t.status)return\"idle\";var e=t.task;return e.activity+\" \"+e.module}},{key:\"renderCommandOutput\",value:function(){var t=this,e=this.props,n=e.cmd,i=e.stdout,r=e.stderr,s=void 0;return n.loading?s=\"Loading: \"+n.name:n.loaded?n.error?s=\"Error: \"+n.name+\"\\n\\n\"+JSON.stringify(n.error,null,2):(s=n.stdout,n.stderr&&(s+=\"\\n\\n_________________________________\\n\\n\",s+=n.stderr)):(s=i,r.length&&(s+=\"\\n\\n_________________________________\\n\\n\",s+=r)),(0,o.h)(\"div\",null,(0,o.h)(\"div\",{ref:function(e){return t._screen=e},className:\"screen\"},s))}}]),e}();e.default=(0,a.connect)(function(t){return i({user:t.auth.user},t.system,t.live)},function(t,e){return{actions:{auth:(0,s.bindActionCreators)(f,t),system:(0,s.bindActionCreators)(c,t),queue:(0,s.bindActionCreators)(p,t),live:(0,s.bindActionCreators)(h,t)}}})(k)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=(n(2),n(3),n(10),a(n(5)),a(n(24)),a(n(31)),a(n(18)),a(n(120))),s=a(n(30));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return console.log(t),t.db.data||t.actions.load_directories(),n}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"render\",value:function(){var t=this.props,e=t.module,n=t.history,i=t.db,a=t.path;return(0,r.h)(\"div\",{class:\"app new-view \"+e.name},(0,r.h)(\"div\",{class:\"heading\"},(0,r.h)(\"h1\",null,e.displayName||e.name)),(0,r.h)(\"div\",{class:\"col narrow\"},(0,r.h)(s.default,{module:e,history:n}),(0,r.h)(o.default,{db:i,path:a,activity:\"dataset\",emptyText:(0,r.h)(\"i\",null,\"No projects yet. Please create one~\")})))}}]),e}();e.default=u},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.New=void 0;var i,r=n(148),o=(i=r)&&i.__esModule?i:{default:i};e.New=o.default},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=(n(2),n(3)),s=n(10),a=l(n(5)),u=l(n(8));function l(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e),function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this))}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"shouldComponentUpdate\",value:function(t){return t.tasks.length!==this.props.tasks.length||t.tasks[0]!==this.props.tasks[0]}},{key:\"render\",value:function(){var t=this,e=this.props,n=(e.title,e.tasks),i=a.default.sort.orderByFn(this.props.sort||\"date desc\"),o=i.mapFn,u=i.sortFn,l=n.map(o).sort(u).map(function(e){var n=e[1],i=void 0,o=n.dataset;switch(n.activity){case\"train\":0===n.epoch?o+=\", latest\":o+=\", \"+n.epoch,o+=\" + \"+n.epochs;break;case\"augment\":try{var u=JSON.parse(n.opt);o+=\", \"+u.augment_take+\" x \"+u.augment_make}catch(t){}}if(n.folder_id){var l=\"/\"+n.module+\"/\"+(\"samplernn\"===n.module?\"datasets\":\"sequences\")+\"/\"+n.folder_id+\"/\";i=(0,r.h)(s.Link,{to:l},o)}else i=o;return(0,r.h)(\"div\",{class:\"row\"},(0,r.h)(\"div\",{class:\"activity\"},n.activity,\" \",n.module),(0,r.h)(\"div\",{class:\"dataset\"},i),(0,r.h)(\"div\",{className:\"age \"+a.default.carbon_date(n.updated_at)},a.default.get_age(n.updated_at)),(0,r.h)(\"div\",{class:\"options\"},(0,r.h)(\"span\",{class:\"destroy\",onClick:function(){return t.handleDestroy(n)}},\"x\")))});return(0,r.h)(\"div\",{class:\"tasklist rows\"},l)}},{key:\"handleDestroy\",value:function(t){confirm(\"Are you sure you want to delete this task?\")&&u.default.task.destroy(t)}}]),e}();e.default=(0,o.connect)(function(t){return{}},function(t,e){return{}})(c)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(3);n(2);var s=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.handleChange=n.handleChange.bind(n),n}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"handleChange\",value:function(t){clearTimeout(this.timeout);var e=t.target.value;\"PLACEHOLDER\"!==e&&this.props.onChange&&this.props.onChange(this.props.name,e)}},{key:\"render\",value:function(){var t=this.props.live?this.props.opt[this.props.name]:this.props.value,e=void 0,n=(this.props.options||[]).map(function(t,n){var i=t.name,o=t.options.map(function(t){var n=t.length<2?t.toUpperCase():t;n=n.replace(/_/g,\" \");var i=t;return e=i,(0,r.h)(\"option\",{value:i,key:i},n)});return(0,r.h)(\"optgroup\",{label:i,key:i},o)});return(0,r.h)(\"div\",{className:\"select param\"},(0,r.h)(\"label\",null,(0,r.h)(\"span\",null,this.props.title),(0,r.h)(\"select\",{onChange:this.handleChange,value:t||e},this.props.placeholder&&(0,r.h)(\"option\",{value:\"PLACEHOLDER\"},this.props.placeholder),n)),this.props.children)}}]),e}();e.default=(0,o.connect)(function(t,e){return{opt:e.opt||t.live.opt}},function(t,e){return{}})(s)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(3),s=n(2),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(20));var u=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.handleClick=n.handleClick.bind(n),n}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"handleClick\",value:function(t){clearTimeout(this.timeout);var e=t.target.checked;this.props.actions.set_param(this.props.name,e),this.props.onToggle&&this.props.onToggle(e)}},{key:\"render\",value:function(){var t=this.props.opt[this.props.name],e=!this.props.noToggle,n=!this.props.noDim&&e&&!t?\"paramGroup inactive\":\"paramGroup active\";return(0,r.h)(\"div\",{className:n},(0,r.h)(\"label\",null,(0,r.h)(\"h3\",null,this.props.title),e?(0,r.h)(\"input\",{type:\"checkbox\",onClick:this.handleClick,checked:t}):null),this.props.children)}}]),e}();e.default=(0,o.connect)(function(t){return{opt:t.live.opt}},function(t,e){return{actions:(0,s.bindActionCreators)(a,t)}})(u)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1);var o=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={value:null,changed:!1},n.handleInput=n.handleInput.bind(n),n.handleKeydown=n.handleKeydown.bind(n),n}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"handleInput\",value:function(t){this.setState({value:t.target.value,changed:!0}),this.props.onInput&&this.props.onInput(t.target.value,t.target.name),this.props.onChange&&this.props.onChange(t.target.name,t.target.value)}},{key:\"handleKeydown\",value:function(t){13===t.keyCode&&(this.setState({value:t.target.value,changed:!1}),this.props.onSave&&this.props.onSave(t.target.value,t.target.name))}},{key:\"render\",value:function(){return(0,r.h)(\"div\",{className:\"numberInput param\"},(0,r.h)(\"label\",null,(0,r.h)(\"span\",null,this.props.title),(0,r.h)(\"input\",{type:\"number\",name:this.props.name||\"number\",value:this.state.changed?this.state.value:this.props.value,onInput:this.handleInput,onKeydown:this.handleKeydown,placeholder:this.props.placeholder,autofocus:this.props.autofocus,min:this.props.min,max:this.props.max,step:this.props.step||\"int\"===this.props.type?1:.01})))}}]),e}();e.default=o},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),s=n(3),a=l(n(5)),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(34));l(n(24)),l(n(63)),l(n(52)),l(n(45)),n(26),l(n(41));function l(t){return t&&t.__esModule?t:{default:t}}var c=a.default.lerp,h=a.default.norm,p=(a.default.randint,a.default.randrange),f=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.actions.load_graph(),n}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"render\",value:function(){var t=this;return this.refs={},(0,r.h)(\"div\",{className:\"app lossGraph\"},(0,r.h)(\"div\",{className:\"heading\"},(0,r.h)(\"h3\",null,\"SampleRNN Loss Graph\"),(0,r.h)(\"canvas\",{ref:function(e){return t.refs.canvas=e}})))}},{key:\"componentDidUpdate\",value:function(){var t=this.props.samplernn,e=t.lossReport,n=t.results;if(e&&n){var i=this.refs.canvas;i.width=window.innerWidth,i.height=window.innerHeight,i.style.width=i.width+\"px\",i.style.height=i.height+\"px\";var r=i.getContext(\"2d\"),o=i.width,s=i.height;r.clearRect(0,0,o,s);var a=n.map(function(t){if(!t.name.match(/^exp:/))return null;var e=t.name.split(\"-\")[3].split(\":\")[1];return[+new Date(t.date),e]}).filter(function(t){return!!t}).sort(function(t,e){return t[0]-t[1]}),u=0,l=1/0,f=0;Object.keys(e).filter(function(t){return!!e[t].length}).forEach(function(t){var n=e[t];f=Math.max(n.length,f),n.forEach(function(t){var e=parseFloat(t.training_loss);e&&(u=Math.max(e,u),l=Math.min(e,l))})}),u=3,l=0;var d=o/2,y=s/2;r.save();for(var m=void 0,_=void 0,v=0;v<f;v++)if(m=c(v/(f/1)*1,0,d),r.strokeStyle=\"rgba(0,0,0,0.3)\",r.beginPath(0,0),r.moveTo(m,0),r.lineTo(m,s),r.lineWidth=.5,(v+1)%6==0){r.lineWidth=.5,r.stroke();r.font='italic 12px \"Georgia\"',r.fillStyle=\"rgba(0,12,28,0.6)\",r.fillText(v/5*6,m+8,s-16)}for(v=l;v<u;v+=1){_=c(v/u,0,y),r.beginPath(0,0),r.moveTo(0,s-_),r.lineTo(o,s-_),r.lineWidth=1,r.lineWidth=2,r.setLineDash([4,4]),r.stroke(),r.stroke(),r.stroke(),r.setLineDash([1,1]);r.font='italic 12px \"Georgia\"',r.fillStyle=\"rgba(0,12,28,0.6)\",r.fillText(v.toFixed(1),o-50,s-_+12+10)}r.lineWidth=1,r.restore();a[0][0],a[a.length-1][0];a.forEach(function(t){t[0];var n=t[1],i=e[n];if(n&&i&&i.length){var o=parseFloat(i[i.length-1].training_loss)||0;parseFloat(i[0].training_loss),h(o,l,u/2);r.lineWidth=4*(1-h(o,l,u)),r.strokeStyle=\"rgba(\"+[p(30,190),p(30,150),p(60,120)].join(\",\")+\",0.8)\";var s=!1;i.forEach(function(t,e){var n=parseFloat(t.training_loss);if(n){var i=c(e/(f/1)*1,0,d),o=c(h(n,l,u),y,0);s?r.lineTo(i,o):(s=!0,r.beginPath(0,0),r.moveTo(i,o))}}),r.stroke();var a=i.length-1,m=parseFloat(i[a].training_loss),_=c(a/(f/1)*1,0,d),v=c(h(m,l,u),y,0);r.font='italic 9px \"Georgia\"',r.fillStyle=\"rgba(0,12,28,0.6)\",r.fillText(n,_+4,v+4.5)}})}}}]),e}();e.default=(0,s.connect)(function(t){return{samplernn:t.module.samplernn}},function(t,e){return{actions:(0,o.bindActionCreators)(u,t)}})(f)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),s=n(10),a=n(3),u=d(n(5)),l=f(n(34)),c=f(n(46)),h=d(n(18)),p=n(26);function f(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function d(t){return t&&t.__esModule?t:{default:t}}var y=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.samplernn.data||t.actions.load_directories(),n}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"render\",value:function(){var t=this;if(this.props.samplernn.loading)return(0,r.h)(h.default,{progress:this.props.samplernn.progress});var e=this.props.samplernn.data,n=e.folderLookup,i=e.fileLookup,o=e.datasetLookup,a=Object.keys(n).sort(u.default.sort.stringSort.asc).map(function(e){var a=n[e],l=u.default.sort.orderByFn(\"epoch desc\"),c=l.mapFn,h=l.sortFn,f=a.datasets.map(function(t){return o[t]}).map(c).sort(h).map(function(t){return t[1]}).filter(function(t){return t.output.length}).map(function(t){return t.output.map(function(t){return i[t]}).map(c).sort(h)[0][1]}),d=\"unsorted\"===a.name?\"/samplernn/import/\":\"/samplernn/datasets/\"+a.id+\"/\";return(0,r.h)(\"div\",{className:\"col bestRenders\"},(0,r.h)(\"h3\",null,(0,r.h)(s.Link,{to:d},a.name)),(0,r.h)(p.FileList,{linkFiles:!0,files:f,orderBy:\"date desc\",fields:\"name date epoch size\",onClick:function(e,n){n.preventDefault(),n.stopPropagation(),console.log(\"picked a file\",e),t.handlePick(e)}}))});return(0,r.h)(\"div\",{className:\"app samplernn\"},(0,r.h)(\"div\",{className:\"heading row middle\"},(0,r.h)(\"h1\",null,\"SampleRNN Results\")),(0,r.h)(\"div\",{class:\"rows params renders\"},a))}},{key:\"handlePick\",value:function(t){this.props.audioPlayer.play(t)}}]),e}();e.default=(0,a.connect)(function(t){return{samplernn:t.module.samplernn}},function(t,e){return{actions:(0,o.bindActionCreators)(l,t),audioPlayer:(0,o.bindActionCreators)(c,t)}})(y)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(1),s=n(2),a=n(3),u=(f(n(5)),function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(34))),l=f(n(52)),c=f(n(41)),h=f(n(45)),p=f(n(29));function f(t){return t&&t.__esModule?t:{default:t}}var d={name:\"samplernn\",datatype:\"audio\"},y=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var t=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.state={folder_id:1,import_action:\"Hotlink\",url_base:\"https://s3.amazonaws.com/i.asdf.us/bucky/data/4279/\",selected:{}},t}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.Component),r(e,[{key:\"componentWillMount\",value:function(){var t=this.props.match.params.id||localStorage.getItem(\"samplernn.last_id\");console.log(\"load dataset:\",t);var e=this.props,n=(e.match,e.samplernn);e.samplernnActions;\"new\"!==t&&t&&(parseInt(t)&&localStorage.setItem(\"samplernn.last_id\",t),n.folder&&n.folder.id===t||this.props.actions.load_directories(t))}},{key:\"render\",value:function(){var t=this,e=this.props.samplernn,n=[],i=void 0;return this.props.samplernn.data&&(n=(this.props.samplernn.data.folders||[]).map(function(t){return[t.name,t.id]}),i=this.props.samplernn.data.folderLookup.unsorted),(0,o.h)(\"div\",{className:\"app top\"},(0,o.h)(\"div\",{class:\"heading\"},(0,o.h)(\"h1\",null,\"Import\")),(0,o.h)(\"div\",{class:\"params form row datasets\"},(0,o.h)(\"div\",{class:\"row dataset\"},(0,o.h)(\"div\",{class:\"col\"}),(0,o.h)(\"div\",{class:\"col\"}),(0,o.h)(\"div\",{class:\"col\"}),(0,o.h)(\"div\",{class:\"col\"},(0,o.h)(\"h2\",null,\"Import to dataset\"),(0,o.h)(l.default,{title:\"Destination dataset\",options:n,name:\"folder_id\",opt:this.state,onChange:function(e,n){return t.setState({folder_id:n})}}),(0,o.h)(l.default,{title:\"Import action\",options:[\"Hotlink\",\"Upload\"],name:\"import_action\",opt:this.state,onChange:function(e,n){return t.setState({import_action:n})}}),(0,o.h)(c.default,{title:\"Remote URL base\",value:this.state.url_base,placeholder:\"http://\",onSave:function(e){return t.setState({url_base:e})}}),(0,o.h)(h.default,{title:\"\",onClick:function(){return t.doImport()}},\"Import\")))),(0,o.h)(p.default,{loading:e.loading,progress:e.progress,module:d,data:e.data,id:\"unsorted\",folder:i,history:this.props.history,onPickDataset:function(e){return t.toggle(e.name,t.state.selected[name])},beforeRow:function(e){return t.beforeRow(e)},afterRow:function(e){return t.afterRow(e)}}))}},{key:\"toggle\",value:function(t){var e,n,r;this.setState(i({},this.state,{selected:i({},this.state.selected,(e={},n=t,r=!this.state.selected[t],n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e))}))}},{key:\"beforeRow\",value:function(t){}},{key:\"afterRow\",value:function(t){var e=t.name;return(0,o.h)(\"div\",null,(0,o.h)(\"input\",{type:\"checkbox\",value:e,checked:!!this.state.selected[e]}))}},{key:\"doImport\",value:function(){var t=this.props.samplernn;console.log(this.state),this.props.actions.import_files(this.state,t.data.datasetLookup,t.data.fileLookup)}}]),e}();e.default=(0,a.connect)(function(t){return{samplernn:t.module.samplernn,runner:t.system.runner,task:t.task}},function(t,e){return{actions:(0,s.bindActionCreators)(u,t)}})(y)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.clear_cache_task=e.log_task=e.fetch_task=e.train_task=void 0;r(n(17)),r(n(14)),r(n(6));var i=r(n(8));function r(t){return t&&t.__esModule?t:{default:t}}e.train_task=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(r){var o={module:\"samplernn\",activity:\"train\",dataset:t.name,epoch:t.checkpoints.length&&t.checkpoints[0].epoch||0,epochs:n,folder_id:e,opt:{sample_length:220500,n_samples:6,keep_old_checkpoints:!1}};return console.log(o),i.default.queue.add_task(o)}},e.fetch_task=function(t,e,n,r){return function(o){if(!t)return console.log(\"input file inaccessible (no url)\");var s={module:\"samplernn\",activity:\"fetch\",dataset:r,folder_id:e,opt:{url:t,file_id:n,dataset:r}};return i.default.queue.add_task(s)}},e.log_task=function(t){return function(e){var n={module:\"samplernn\",activity:\"log\",dataset:t.name};return i.default.queue.add_task(n)}},e.clear_cache_task=function(t){return function(e){var n={module:\"samplernn\",activity:\"clear_cache\",dataset:t.name};return i.default.queue.add_task(n)}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),s=n(3),a=(m(n(5)),y(n(34))),u=y(n(157)),l=y(n(46)),c=n(13),h=m(n(42)),p=m(n(40)),f=m(n(29)),d=m(n(64));function y(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function m(t){return t&&t.__esModule?t:{default:t}}var _=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.datasetActions=n.datasetActions.bind(n),n}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"componentWillMount\",value:function(){var t=this.props.match.params.id||localStorage.getItem(\"samplernn.last_id\");console.log(\"load dataset:\",t);var e=this.props,n=(e.match,e.samplernn),i=e.actions;\"new\"!==t&&(t?(parseInt(t)&&localStorage.setItem(\"samplernn.last_id\",t),n.folder&&n.folder.id===t||i.load_directories(t)):this.props.history.push(\"/samplernn/new/\"))}},{key:\"render\",value:function(){var t=this,e=this.props,n=e.samplernn,i=(e.runner,e.match,e.history),o=((n.data||{}).folderLookup||{})[n.folder_id]||{};return(0,r.h)(\"div\",{className:\"app samplernn\"},(0,r.h)(\"div\",{className:\"heading\"},(0,r.h)(\"h1\",null,o?o.name:(0,r.h)(c.Loading,null))),(0,r.h)(\"div\",{className:\"row\"},o&&o.name&&\"unsorted\"!==o.name&&(0,r.h)(h.default,{title:\"Add Files\",module:d.default,folder:o,canUpload:!0,canAddURL:!0}),(0,r.h)(\"div\",null,(0,r.h)(p.default,null),(0,r.h)(c.CurrentTask,{processor:\"gpu\"}))),(0,r.h)(f.default,{loading:n.loading,progress:n.progress,id:n.folder_id,module:d.default,data:n.data,folder:o,history:i,onPickFile:function(e,n){n.preventDefault(),n.stopPropagation(),t.handlePick(e)},datasetActions:this.datasetActions}))}},{key:\"datasetActions\",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(arguments.length>2&&void 0!==arguments[2]&&arguments[2],this.props),i=n.samplernn,o=n.remote,s=i.data.fileLookup[t.input[0]];return s?s.name&&s.name.match(/(gif|jpe?g|png)$/i)?null:(0,r.h)(\"div\",null,(0,r.h)(\"div\",{class:\"actions\"},(0,r.h)(\"span\",{class:\"link\",onClick:function(){return o.train_task(t,i.folder_id,1)}},\"train\"),(0,r.h)(\"span\",{class:\"link\",onClick:function(){return o.train_task(t,i.folder_id,2)}},\"2x\"),(0,r.h)(\"span\",{class:\"link\",onClick:function(){return o.train_task(t,i.folder_id,4)}},\"4x\"),(0,r.h)(\"span\",{class:\"link\",onClick:function(){return o.train_task(t,i.folder_id,6)}},\"6x\"),(0,r.h)(\"span\",{class:\"link\",onClick:function(){return o.train_task(t,i.folder_id,18)}},\"18x\")),t.isBuilt?(0,r.h)(\"div\",{class:\"subtext\"},\"fetched \",(0,r.h)(\"span\",{class:\"link\",onClick:function(){return o.clear_cache_task(t)}},\"x\")):e?(0,r.h)(\"div\",{class:\"subtext\"},\"fetching\"):(0,r.h)(\"div\",{class:\"subtext\"},(0,r.h)(\"span\",{class:\"link\",onClick:function(){return o.fetch_task(s.url,i.folder_id,s.id,t.name)}},\"fetch\"))):null}},{key:\"handlePick\",value:function(t){this.props.audioPlayer.play(t)}}]),e}();e.default=(0,s.connect)(function(t){return{samplernn:t.module.samplernn,runner:t.system.runner}},function(t,e){return{actions:(0,o.bindActionCreators)(a,t),remote:(0,o.bindActionCreators)(u,t),audioPlayer:(0,o.bindActionCreators)(l,t)}})(_)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=n(1),r=n(2),o=n(3),s=(n(10),l(n(5)),n(13)),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(34)),u=l(n(64));function l(t){return t&&t.__esModule?t:{default:t}}e.default=(0,o.connect)(function(t){return{samplernn:t.module.samplernn}},function(t,e){return{actions:(0,r.bindActionCreators)(a,t)}})(function(t){return(0,i.h)(s.Views.New,{db:t.samplernn,path:\"/samplernn/datasets/\",actions:t.actions,module:u.default,history:t.history})})},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(10),s=f(n(8)),a=f(n(5)),u=f(n(159)),l=f(n(158)),c=f(n(156)),h=f(n(155)),p=f(n(154));function f(t){return t&&t.__esModule?t:{default:t}}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t)}return i(t,[{key:\"componentWillMount\",value:function(){s.default.system.changeTool(\"samplernn\"),document.body.style.backgroundImage=\"linear-gradient(\"+(a.default.randint(40)+40)+\"deg, #eef, #fef)\"}},{key:\"componentWillReceiveProps\",value:function(){s.default.system.changeTool(\"samplernn\"),document.body.style.backgroundImage=\"linear-gradient(\"+(a.default.randint(40)+40)+\"deg, #eef, #fef)\"}},{key:\"render\",value:function(){return(0,r.h)(\"section\",null,(0,r.h)(o.Route,{exact:!0,path:\"/samplernn/new\",component:u.default}),(0,r.h)(o.Route,{exact:!0,path:\"/samplernn/datasets\",component:l.default}),(0,r.h)(o.Route,{exact:!0,path:\"/samplernn/datasets/:id\",component:l.default}),(0,r.h)(o.Route,{exact:!0,path:\"/samplernn/import\",component:c.default}),(0,r.h)(o.Route,{exact:!0,path:\"/samplernn/results\",component:h.default}),(0,r.h)(o.Route,{exact:!0,path:\"/samplernn/graph\",component:p.default}))}}]),t}();e.default={name:\"samplernn\",router:d,links:function(){return[{url:\"/samplernn/new/\",name:\"new\"},{url:\"/samplernn/datasets/\",name:\"datasets\"},{url:\"/samplernn/graph/\",name:\"graph\"},{url:\"/samplernn/results/\",name:\"results\"}]}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),a=n(3),u=n(13),l=n(49),c=y(l),h=y(n(20)),p=y(n(44)),f=y(n(73)),d=y(n(74));function y(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var m=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.actions.pix2wav.load_directories(),t.actions.live.get_params(),n.changeCheckpoint=n.changeCheckpoint.bind(n),n.changeEpoch=n.changeEpoch.bind(n),n.changeSequence=n.changeSequence.bind(n),n.seek=n.seek.bind(n),n.togglePlaying=n.togglePlaying.bind(n),n.toggleRecording=n.toggleRecording.bind(n),n}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"componentWillUpdate\",value:function(t){t.opt.checkpoint_name&&t.opt.checkpoint_name!==this.props.opt.checkpoint_name&&(console.log(\"fetch checkpoint\",t.opt.checkpoint_name),this.props.actions.live.list_epochs(\"pix2wav\",t.opt.checkpoint_name))}},{key:\"changeCheckpoint\",value:function(t,e){this.props.actions.live.load_epoch(e,\"latest\")}},{key:\"changeEpoch\",value:function(t,e){this.props.actions.live.load_epoch(this.props.opt.checkpoint_name,e)}},{key:\"changeSequence\",value:function(t,e){console.log(\"got sequence\",e),this.props.actions.live.load_sequence(e)}},{key:\"seek\",value:function(t){var e=Math.floor(t*(parseInt(this.props.frame.sequence_len)||1)+1);this.props.actions.live.seek(e)}},{key:\"start\",value:function(){console.log(this.props.pix2wav.data);var t=this.props.pix2wav.data.sequences[0].name||\"\",e=this.props.pix2wav.data.checkpoints[0].name||\"\";console.log(\"starting up!\",t,e),this.props.actions.tasks.live_task(t,e)}},{key:\"interrupt\",value:function(){this.props.actions.queue.stop_task(\"gpu\")}},{key:\"exit\",value:function(){this.props.actions.queue.stop_task(\"gpu\",{sigkill:!0})}},{key:\"togglePlaying\",value:function(){this.props.opt.processing?this.props.actions.live.pause():this.props.actions.live.play()}},{key:\"toggleRecording\",value:function(){this.props.opt.recording?((0,l.stopRecording)(),this.props.actions.live.pause()):(0,l.startRecording)()}},{key:\"render\",value:function(){return this.props.pix2wav.loading?(0,r.h)(u.Loading,null):(0,r.h)(\"div\",{className:\"app pix2wav centered\"},(0,r.h)(\"div\",{className:\"row\"},(0,r.h)(\"div\",{className:\"column\"},(0,r.h)(u.Player,{width:256,height:256})),(0,r.h)(\"div\",{className:\"params column audioParams\"},(0,r.h)(u.Group,{title:\"Audio playback\"},(0,r.h)(u.Button,{title:\"Start playback\",onClick:function(){return c.startSynthesizing()}},\"Start\"),(0,r.h)(u.Button,{title:\"Stop playback\",onClick:function(){return c.stopSynthesizing()}},\"Stop\")))),(0,r.h)(\"div\",{className:\"params row\"},(0,r.h)(\"div\",{className:\"column\"},(0,r.h)(u.ParamGroup,{title:\"Playback\",noToggle:!0},(0,r.h)(u.Select,{name:\"send_image\",title:\"view mode\",options:[\"a\",\"b\",\"sequence\",\"recursive\"],onChange:this.props.actions.live.set_param}),(0,r.h)(u.Select,{name:\"sequence_name\",title:\"sequence\",options:this.props.pix2wav.data.sequences,onChange:this.changeSequence}),(0,r.h)(u.Select,{name:\"output_format\",title:\"format\",options:[\"JPEG\",\"PNG\"]}),(0,r.h)(u.Select,{name:\"checkpoint_name\",title:\"checkpoint\",options:this.props.pix2wav.data.checkpoints,onChange:this.changeCheckpoint}),(0,r.h)(u.Select,{name:\"epoch\",title:\"epoch\",options:this.props.epochs,onChange:this.changeEpoch}),(0,r.h)(u.Slider,{live:!0,name:\"position\",min:0,max:1,type:\"float\",value:(this.props.frame.sequence_i||0)/(this.props.frame.sequence_len||1),onChange:this.seek}),this.renderRestartButton(),(0,r.h)(u.Button,{title:this.props.opt.savingVideo?\"Saving video...\":this.props.opt.recording?\"Recording (\"+(t=this.props.opt.recordFrames,(t/10).toFixed(1)+\" s.\")+\")\":\"Record video\",onClick:this.toggleRecording},this.props.opt.savingVideo?\"Saving\":this.props.opt.recording?\"Recording\":\"Record\"),(0,r.h)(u.Button,{title:\"Save frame\",onClick:l.saveFrame},\"Save\"),(0,r.h)(\"p\",{class:\"last_message\"},this.props.last_message))),(0,r.h)(\"div\",{className:\"column\"},(0,r.h)(u.ParamGroup,{title:\"Transition\",name:\"transition\"},(0,r.h)(u.Slider,{live:!0,name:\"transition_period\",min:10,max:5e3,type:\"int\"}),(0,r.h)(u.Slider,{live:!0,name:\"transition_min\",min:.001,max:.2,type:\"float\"}),(0,r.h)(u.Slider,{live:!0,name:\"transition_max\",min:.1,max:1,type:\"float\"})),(0,r.h)(u.ParamGroup,{title:\"Recursion\",name:\"recursive\"},(0,r.h)(u.Slider,{live:!0,name:\"recursive_frac\",min:0,max:.5,type:\"float\"}),(0,r.h)(u.Slider,{live:!0,name:\"recurse_roll\",min:-64,max:64,type:\"int\"}),(0,r.h)(u.Slider,{live:!0,name:\"recurse_roll_axis\",min:0,max:1,type:\"int\"})),(0,r.h)(u.ParamGroup,{title:\"Sequence\",name:\"sequence\"},(0,r.h)(u.Slider,{live:!0,name:\"sequence_frac\",min:0,max:1,type:\"float\"}),(0,r.h)(u.Slider,{live:!0,name:\"process_frac\",min:0,max:1,type:\"float\"}))),(0,r.h)(\"div\",{className:\"column\"},(0,r.h)(u.ParamGroup,{title:\"Clahe\",name:\"clahe\"},(0,r.h)(u.Slider,{live:!0,name:\"clip_limit\",min:1,max:4,type:\"float\"})),(0,r.h)(u.ParamGroup,{title:\"Posterize\",name:\"posterize\"},(0,r.h)(u.Slider,{live:!0,name:\"spatial_window\",min:2,max:128,type:\"int\"}),(0,r.h)(u.Slider,{live:!0,name:\"color_window\",min:2,max:128,type:\"int\"})),(0,r.h)(u.ParamGroup,{title:\"Blur\",name:\"blur\"},(0,r.h)(u.Slider,{live:!0,name:\"blur_radius\",min:3,max:7,type:\"odd\"}),(0,r.h)(u.Slider,{live:!0,name:\"blur_sigma\",min:0,max:2,type:\"float\"})),(0,r.h)(u.ParamGroup,{title:\"Canny Edge Detection\",name:\"canny\"},(0,r.h)(u.Slider,{live:!0,name:\"canny_lo\",min:10,max:200,type:\"int\"}),(0,r.h)(u.Slider,{live:!0,name:\"canny_hi\",min:10,max:200,type:\"int\"})))));var t}},{key:\"renderRestartButton\",value:function(){var t=this;return\"IDLE\"===this.props.runner.gpu.status?(0,r.h)(u.Button,{title:\"GPU Idle\",onClick:function(){return t.start()}},\"Start\"):\"pix2pix\"!==this.props.runner.gpu.task.module&&\"pix2wav\"!==this.props.runner.gpu.task.module?(0,r.h)(u.Button,{title:\"GPU Busy\",onClick:function(){return t.interrupt()}},\"Interrupt\"):this.props.opt.processing?(0,r.h)(\"div\",null,(0,r.h)(u.Button,{title:\"Processing\",onClick:this.togglePlaying},\"Pause\"),(0,r.h)(u.Button,{title:\"GPU Busy\",onClick:function(){return t.interrupt()}},\"Interrupt\"),(0,r.h)(u.Button,{title:\"Last resort\",onClick:function(){return t.exit()}},\"Exit\")):(0,r.h)(\"div\",null,(0,r.h)(u.Button,{title:\"Not processing\",onClick:this.togglePlaying},\"Restart\"),(0,r.h)(u.Button,{title:\"GPU Busy\",onClick:function(){return t.interrupt()}},\"Interrupt\"),(0,r.h)(u.Button,{title:\"Last resort\",onClick:function(){return t.exit()}},\"Exit\"))}}]),e}();e.default=(0,a.connect)(function(t){return{last_message:t.live.last_message,opt:t.live.opt,frame:t.live.frame,checkpoints:t.live.checkpoints,epochs:t.live.epochs,sequences:t.live.sequences,runner:t.system.runner,pix2wav:t.module.pix2wav}},function(t,e){return{actions:{live:(0,o.bindActionCreators)(h,t),queue:(0,o.bindActionCreators)(p,t),pix2wav:(0,o.bindActionCreators)(d,t),tasks:(0,o.bindActionCreators)(f,t),s:s}}})(m)},function(t,e,n){\"use strict\";var i,r,o;\"function\"==typeof Symbol&&Symbol.iterator;r=[],void 0===(o=\"function\"==typeof(i=function(){var t={context:null,_tapListeners:[],_onStarted:[],setContext:function(e){return t.context=e,t},on:function(i){if(Array.isArray(i)||NodeList&&i instanceof NodeList)for(var r=0;r<i.length;r++)t.on(i[r]);else if(\"string\"==typeof i)t.on(document.querySelectorAll(i));else if(i.jquery&&\"function\"==typeof i.toArray)t.on(i.toArray());else if(Element&&i instanceof Element){var o=new e(i,n);t._tapListeners.push(o)}return t},onStarted:function(e){return t.isStarted()?e():t._onStarted.push(e),t},isStarted:function(){return null!==t.context&&\"running\"===t.context.state}},e=function(t){this._dragged=!1,this._element=t,this._bindedMove=this._moved.bind(this),this._bindedEnd=this._ended.bind(this),t.addEventListener(\"touchmove\",this._bindedMove),t.addEventListener(\"touchend\",this._bindedEnd),t.addEventListener(\"mouseup\",this._bindedEnd)};function n(){if(t.context&&!t.isStarted()){var e=t.context.createOscillator(),n=t.context.createGain();n.gain.value=0,e.connect(n),n.connect(t.context.destination);var i=t.context.currentTime;e.start(i),e.stop(i+.5)}if(t._tapListeners){for(var r=0;r<t._tapListeners.length;r++)t._tapListeners[r].dispose();t._tapListeners=null}if(t._onStarted){for(var o=0;o<t._onStarted.length;o++)t._onStarted[o]();t._onStarted=null}}return e.prototype._moved=function(t){this._dragged=!0},e.prototype._ended=function(t){this._dragged||n(),this._dragged=!1},e.prototype.dispose=function(){this._element.removeEventListener(\"touchmove\",this._bindedMove),this._element.removeEventListener(\"touchend\",this._bindedEnd),this._element.removeEventListener(\"mouseup\",this._bindedEnd),this._bindedMove=null,this._bindedEnd=null,this._element=null},t})?i.apply(e,r):i)||(t.exports=o)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.requestAudioContext=function(t){if(o.is_mobile){var e=document.createElement(\"div\"),n=document.createElement(\"div\");n.innerHTML=\"Tap to start - please unmute your phone\",Object.assign(e.style,{display:\"block\",position:\"absolute\",width:\"100%\",height:\"100%\",zIndex:\"10000\",top:\"0px\",left:\"0px\",backgroundColor:\"rgba(0, 0, 0, 0.8)\"}),Object.assign(n.style,{display:\"block\",position:\"absolute\",left:\"50%\",top:\"50%\",padding:\"20px\",backgroundColor:\"#7F33ED\",color:\"white\",fontFamily:\"monospace\",borderRadius:\"3px\",transform:\"translate3D(-50%,-50%,0)\",textAlign:\"center\",lineHeight:\"1.5\",width:\"150px\"}),e.appendChild(n),document.body.appendChild(e),r.default.setContext(i.default.context),r.default.on(n),r.default.onStarted(function(n){e.remove(),t()})}else t()};var i=s(n(48)),r=s(n(162)),o=n(5);function s(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){var i;!function(){\"use strict\";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\\x25]+/,modulo:/^\\x25{2}/,placeholder:/^\\x25(?:([1-9]\\d*)\\$|\\(([^\\)]+)\\))?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\\d]*)/i,key_access:/^\\.([a-z_][a-z_\\d]*)/i,index_access:/^\\[(\\d+)\\]/,sign:/^[\\+\\-]/};function o(t){return function(t,e){var n,i,s,a,u,l,c,h,p,f=1,d=t.length,y=\"\";for(i=0;i<d;i++)if(\"string\"==typeof t[i])y+=t[i];else if(Array.isArray(t[i])){if((a=t[i])[2])for(n=e[f],s=0;s<a[2].length;s++){if(!n.hasOwnProperty(a[2][s]))throw new Error(o('[sprintf] property \"%s\" does not exist',a[2][s]));n=n[a[2][s]]}else n=a[1]?e[a[1]]:e[f++];if(r.not_type.test(a[8])&&r.not_primitive.test(a[8])&&n instanceof Function&&(n=n()),r.numeric_arg.test(a[8])&&\"number\"!=typeof n&&isNaN(n))throw new TypeError(o(\"[sprintf] expecting number but found %T\",n));switch(r.number.test(a[8])&&(h=n>=0),a[8]){case\"b\":n=parseInt(n,10).toString(2);break;case\"c\":n=String.fromCharCode(parseInt(n,10));break;case\"d\":case\"i\":n=parseInt(n,10);break;case\"j\":n=JSON.stringify(n,null,a[6]?parseInt(a[6]):0);break;case\"e\":n=a[7]?parseFloat(n).toExponential(a[7]):parseFloat(n).toExponential();break;case\"f\":n=a[7]?parseFloat(n).toFixed(a[7]):parseFloat(n);break;case\"g\":n=a[7]?String(Number(n.toPrecision(a[7]))):parseFloat(n);break;case\"o\":n=(parseInt(n,10)>>>0).toString(8);break;case\"s\":n=String(n),n=a[7]?n.substring(0,a[7]):n;break;case\"t\":n=String(!!n),n=a[7]?n.substring(0,a[7]):n;break;case\"T\":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=a[7]?n.substring(0,a[7]):n;break;case\"u\":n=parseInt(n,10)>>>0;break;case\"v\":n=n.valueOf(),n=a[7]?n.substring(0,a[7]):n;break;case\"x\":n=(parseInt(n,10)>>>0).toString(16);break;case\"X\":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}r.json.test(a[8])?y+=n:(!r.number.test(a[8])||h&&!a[3]?p=\"\":(p=h?\"+\":\"-\",n=n.toString().replace(r.sign,\"\")),l=a[4]?\"0\"===a[4]?\"0\":a[4].charAt(1):\" \",c=a[6]-(p+n).length,u=a[6]&&c>0?l.repeat(c):\"\",y+=a[5]?p+n+u:\"0\"===l?p+u+n:u+p+n)}return y}(function(t){if(a[t])return a[t];var e,n=t,i=[],o=0;for(;n;){if(null!==(e=r.text.exec(n)))i.push(e[0]);else if(null!==(e=r.modulo.exec(n)))i.push(\"%\");else{if(null===(e=r.placeholder.exec(n)))throw new SyntaxError(\"[sprintf] unexpected placeholder\");if(e[2]){o|=1;var s=[],u=e[2],l=[];if(null===(l=r.key.exec(u)))throw new SyntaxError(\"[sprintf] failed to parse named argument key\");for(s.push(l[1]);\"\"!==(u=u.substring(l[0].length));)if(null!==(l=r.key_access.exec(u)))s.push(l[1]);else{if(null===(l=r.index_access.exec(u)))throw new SyntaxError(\"[sprintf] failed to parse named argument key\");s.push(l[1])}e[2]=s}else o|=2;if(3===o)throw new Error(\"[sprintf] mixing positional and named placeholders is not (yet) supported\");i.push(e)}n=n.substring(e[0].length)}return a[t]=i}(t),arguments)}function s(t,e){return o.apply(null,[t].concat(e||[]))}var a=Object.create(null);e.sprintf=o,e.vsprintf=s,\"undefined\"!=typeof window&&(window.sprintf=o,window.vsprintf=s,void 0===(i=function(){return{sprintf:o,vsprintf:s}}.call(e,n,e,t))||(t.exports=i))}()},function(t,e,n){\"use strict\";var i=n(91),r=n(9),o=n(67),s=n(66),a=n(28),u=n(98),l=n(23);function c(t,e){this.options=t,this.loadOptions=e}c.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(t){var e,n;if(t.skip(22),this.fileNameLength=t.readInt(2),n=t.readInt(2),this.fileName=t.readData(this.fileNameLength),t.skip(n),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error(\"Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)\");if(null===(e=function(t){for(var e in u)if(u.hasOwnProperty(e)&&u[e].magic===t)return u[e];return null}(this.compressionMethod)))throw new Error(\"Corrupted zip : compression \"+r.pretty(this.compressionMethod)+\" unknown (inner file : \"+r.transformTo(\"string\",this.fileName)+\")\");this.decompressed=new o(this.compressedSize,this.uncompressedSize,this.crc32,e,t.readData(this.compressedSize))},readCentralPart:function(t){this.versionMadeBy=t.readInt(2),t.skip(2),this.bitFlag=t.readInt(2),this.compressionMethod=t.readString(2),this.date=t.readDate(),this.crc32=t.readInt(4),this.compressedSize=t.readInt(4),this.uncompressedSize=t.readInt(4);var e=t.readInt(2);if(this.extraFieldsLength=t.readInt(2),this.fileCommentLength=t.readInt(2),this.diskNumberStart=t.readInt(2),this.internalFileAttributes=t.readInt(2),this.externalFileAttributes=t.readInt(4),this.localHeaderOffset=t.readInt(4),this.isEncrypted())throw new Error(\"Encrypted zip are not supported\");t.skip(e),this.readExtraFields(t),this.parseZIP64ExtraField(t),this.fileComment=t.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var t=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0===t&&(this.dosPermissions=63&this.externalFileAttributes),3===t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||\"/\"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=i(this.extraFields[1].value);this.uncompressedSize===r.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===r.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===r.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===r.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(t){var e,n,i,r=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index<r;)e=t.readInt(2),n=t.readInt(2),i=t.readData(n),this.extraFields[e]={id:e,length:n,value:i}},handleUTF8:function(){var t=l.uint8array?\"uint8array\":\"array\";if(this.useUTF8())this.fileNameStr=a.utf8decode(this.fileName),this.fileCommentStr=a.utf8decode(this.fileComment);else{var e=this.findExtraFieldUnicodePath();if(null!==e)this.fileNameStr=e;else{var n=r.transformTo(t,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(n)}var i=this.findExtraFieldUnicodeComment();if(null!==i)this.fileCommentStr=i;else{var o=r.transformTo(t,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(o)}}},findExtraFieldUnicodePath:function(){var t=this.extraFields[28789];if(t){var e=i(t.value);return 1!==e.readInt(1)?null:s(this.fileName)!==e.readInt(4)?null:a.utf8decode(e.readData(t.length-5))}return null},findExtraFieldUnicodeComment:function(){var t=this.extraFields[25461];if(t){var e=i(t.value);return 1!==e.readInt(1)?null:s(this.fileComment)!==e.readInt(4)?null:a.utf8decode(e.readData(t.length-5))}return null}},t.exports=c},function(t,e,n){\"use strict\";var i=n(88);function r(t){i.call(this,t)}n(9).inherits(r,i),r.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},t.exports=r},function(t,e,n){\"use strict\";var i=n(89);function r(t){i.call(this,t)}n(9).inherits(r,i),r.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},r.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},r.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},r.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},t.exports=r},function(t,e,n){\"use strict\";var i=n(91),r=n(9),o=n(92),s=n(165),a=(n(28),n(23));function u(t){this.files=[],this.loadOptions=t}u.prototype={checkSignature:function(t){if(!this.reader.readAndCheckSignature(t)){this.reader.index-=4;var e=this.reader.readString(4);throw new Error(\"Corrupted zip or bug: unexpected signature (\"+r.pretty(e)+\", expected \"+r.pretty(t)+\")\")}},isSignature:function(t,e){var n=this.reader.index;this.reader.setIndex(t);var i=this.reader.readString(4)===e;return this.reader.setIndex(n),i},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var t=this.reader.readData(this.zipCommentLength),e=a.uint8array?\"uint8array\":\"array\",n=r.transformTo(e,t);this.zipComment=this.loadOptions.decodeFileName(n)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var t,e,n,i=this.zip64EndOfCentralSize-44;0<i;)t=this.reader.readInt(2),e=this.reader.readInt(4),n=this.reader.readData(e),this.zip64ExtensibleData[t]={id:t,length:e,value:n}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error(\"Multi-volumes zip are not supported\")},readLocalFiles:function(){var t,e;for(t=0;t<this.files.length;t++)e=this.files[t],this.reader.setIndex(e.localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),e.readLocalPart(this.reader),e.handleUTF8(),e.processAttributes()},readCentralDir:function(){var t;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(t=new s({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(t);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error(\"Corrupted zip or bug: expected \"+this.centralDirRecords+\" records in central dir, got \"+this.files.length)},readEndOfCentral:function(){var t=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(t<0)throw!this.isSignature(0,o.LOCAL_FILE_HEADER)?new Error(\"Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html\"):new Error(\"Corrupted zip: can't find end of central directory\");this.reader.setIndex(t);var e=t;if(this.checkSignature(o.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===r.MAX_VALUE_16BITS||this.diskWithCentralDirStart===r.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===r.MAX_VALUE_16BITS||this.centralDirRecords===r.MAX_VALUE_16BITS||this.centralDirSize===r.MAX_VALUE_32BITS||this.centralDirOffset===r.MAX_VALUE_32BITS){if(this.zip64=!0,(t=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error(\"Corrupted zip: can't find the ZIP64 end of central directory locator\");if(this.reader.setIndex(t),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,o.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error(\"Corrupted zip: can't find the ZIP64 end of central directory\");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var i=e-n;if(i>0)this.isSignature(e,o.CENTRAL_FILE_HEADER)||(this.reader.zero=i);else if(i<0)throw new Error(\"Corrupted zip: missing \"+Math.abs(i)+\" bytes.\")},prepareReader:function(t){this.reader=i(t)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=u},function(t,e,n){\"use strict\";var i=n(9),r=n(35),o=n(28),s=(i=n(9),n(168)),a=n(99),u=n(54);function l(t){return new r.Promise(function(e,n){var i=t.decompressed.getContentWorker().pipe(new a);i.on(\"error\",function(t){n(t)}).on(\"end\",function(){i.streamInfo.crc32!==t.decompressed.crc32?n(new Error(\"Corrupted zip : CRC32 mismatch\")):e()}).resume()})}t.exports=function(t,e){var n=this;return e=i.extend(e||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),u.isNode&&u.isStream(t)?r.Promise.reject(new Error(\"JSZip can't accept a stream when loading a zip file.\")):i.prepareContent(\"the loaded zip file\",t,!0,e.optimizedBinaryString,e.base64).then(function(t){var n=new s(e);return n.load(t),n}).then(function(t){var n=[r.Promise.resolve(t)],i=t.files;if(e.checkCRC32)for(var o=0;o<i.length;o++)n.push(l(i[o]));return r.Promise.all(n)}).then(function(t){for(var i=t.shift(),r=i.files,o=0;o<r.length;o++){var s=r[o];n.file(s.fileNameStr,s.decompressed,{binary:!0,optimizedBinaryString:!0,date:s.date,dir:s.dir,comment:s.fileCommentStr.length?s.fileCommentStr:null,unixPermissions:s.unixPermissions,dosPermissions:s.dosPermissions,createFolders:e.createFolders})}return i.zipComment.length&&(n.comment=i.zipComment),n})}},function(t,e,n){\"use strict\";var i=n(9),r=n(15);function o(t,e){r.call(this,\"Nodejs stream input adapter for \"+t),this._upstreamEnded=!1,this._bindStream(e)}i.inherits(o,r),o.prototype._bindStream=function(t){var e=this;this._stream=t,t.pause(),t.on(\"data\",function(t){e.push({data:t,meta:{percent:0}})}).on(\"error\",function(t){e.isPaused?this.generatedError=t:e.error(t)}).on(\"end\",function(){e.isPaused?e._upstreamEnded=!0:e.end()})},o.prototype.pause=function(){return!!r.prototype.pause.call(this)&&(this._stream.pause(),!0)},o.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=o},function(t,e,n){\"use strict\";var i=n(9),r=n(15),o=n(28),s=n(66),a=n(92),u=function(t,e){var n,i=\"\";for(n=0;n<e;n++)i+=String.fromCharCode(255&t),t>>>=8;return i},l=function(t,e,n,r,l,c){var h,p,f=t.file,d=t.compression,y=c!==o.utf8encode,m=i.transformTo(\"string\",c(f.name)),_=i.transformTo(\"string\",o.utf8encode(f.name)),v=f.comment,g=i.transformTo(\"string\",c(v)),b=i.transformTo(\"string\",o.utf8encode(v)),w=_.length!==f.name.length,k=b.length!==v.length,S=\"\",T=\"\",x=\"\",O=f.dir,P=f.date,A={crc32:0,compressedSize:0,uncompressedSize:0};e&&!n||(A.crc32=t.crc32,A.compressedSize=t.compressedSize,A.uncompressedSize=t.uncompressedSize);var E=0;e&&(E|=8),y||!w&&!k||(E|=2048);var C,M,R=0,j=0;O&&(R|=16),\"UNIX\"===l?(j=798,R|=(C=f.unixPermissions,M=C,C||(M=O?16893:33204),(65535&M)<<16)):(j=20,R|=63&(f.dosPermissions||0)),h=P.getUTCHours(),h<<=6,h|=P.getUTCMinutes(),h<<=5,h|=P.getUTCSeconds()/2,p=P.getUTCFullYear()-1980,p<<=4,p|=P.getUTCMonth()+1,p<<=5,p|=P.getUTCDate(),w&&(T=u(1,1)+u(s(m),4)+_,S+=\"up\"+u(T.length,2)+T),k&&(x=u(1,1)+u(s(g),4)+b,S+=\"uc\"+u(x.length,2)+x);var F=\"\";return F+=\"\\n\\0\",F+=u(E,2),F+=d.magic,F+=u(h,2),F+=u(p,2),F+=u(A.crc32,4),F+=u(A.compressedSize,4),F+=u(A.uncompressedSize,4),F+=u(m.length,2),F+=u(S.length,2),{fileRecord:a.LOCAL_FILE_HEADER+F+m+S,dirRecord:a.CENTRAL_FILE_HEADER+u(j,2)+F+u(g.length,2)+\"\\0\\0\\0\\0\"+u(R,4)+u(r,4)+m+S+g}};function c(t,e,n,i){r.call(this,\"ZipFileWorker\"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=n,this.encodeFileName=i,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}i.inherits(c,r),c.prototype.push=function(t){var e=t.meta.percent||0,n=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,r.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:n?(e+100*(n-i-1))/n:100}}))},c.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var n=l(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},c.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,n=l(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),e)this.push({data:function(t){return a.DATA_DESCRIPTOR+u(t.crc32,4)+u(t.compressedSize,4)+u(t.uncompressedSize,4)}(t),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},c.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e<this.dirRecords.length;e++)this.push({data:this.dirRecords[e],meta:{percent:100}});var n=this.bytesWritten-t,r=function(t,e,n,r,o){var s=i.transformTo(\"string\",o(r));return a.CENTRAL_DIRECTORY_END+\"\\0\\0\\0\\0\"+u(t,2)+u(t,2)+u(e,4)+u(n,4)+u(s.length,2)+s}(this.dirRecords.length,n,t,this.zipComment,this.encodeFileName);this.push({data:r,meta:{percent:100}})},c.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},c.prototype.registerPrevious=function(t){this._sources.push(t);var e=this;return t.on(\"data\",function(t){e.processChunk(t)}),t.on(\"end\",function(){e.closedSource(e.previous.streamInfo),e._sources.length?e.prepareNextSource():e.end()}),t.on(\"error\",function(t){e.error(t)}),this},c.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},c.prototype.error=function(t){var e=this._sources;if(!r.prototype.error.call(this,t))return!1;for(var n=0;n<e.length;n++)try{e[n].error(t)}catch(t){}return!0},c.prototype.lock=function(){r.prototype.lock.call(this);for(var t=this._sources,e=0;e<t.length;e++)t[e].lock()},t.exports=c},function(t,e,n){\"use strict\";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name=\"\",this.comment=\"\",this.hcrc=0,this.done=!1}},function(t,e,n){\"use strict\";var i=n(22),r=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(t,e,n,u,l,c,h,p){var f,d,y,m,_,v,g,b,w,k=p.bits,S=0,T=0,x=0,O=0,P=0,A=0,E=0,C=0,M=0,R=0,j=null,F=0,N=new i.Buf16(16),L=new i.Buf16(16),D=null,q=0;for(S=0;S<=15;S++)N[S]=0;for(T=0;T<u;T++)N[e[n+T]]++;for(P=k,O=15;O>=1&&0===N[O];O--);if(P>O&&(P=O),0===O)return l[c++]=20971520,l[c++]=20971520,p.bits=1,0;for(x=1;x<O&&0===N[x];x++);for(P<x&&(P=x),C=1,S=1;S<=15;S++)if(C<<=1,(C-=N[S])<0)return-1;if(C>0&&(0===t||1!==O))return-1;for(L[1]=0,S=1;S<15;S++)L[S+1]=L[S]+N[S];for(T=0;T<u;T++)0!==e[n+T]&&(h[L[e[n+T]]++]=T);if(0===t?(j=D=h,v=19):1===t?(j=r,F-=257,D=o,q-=257,v=256):(j=s,D=a,v=-1),R=0,T=0,S=x,_=c,A=P,E=0,y=-1,m=(M=1<<P)-1,1===t&&M>852||2===t&&M>592)return 1;for(;;){g=S-E,h[T]<v?(b=0,w=h[T]):h[T]>v?(b=D[q+h[T]],w=j[F+h[T]]):(b=96,w=0),f=1<<S-E,x=d=1<<A;do{l[_+(R>>E)+(d-=f)]=g<<24|b<<16|w|0}while(0!==d);for(f=1<<S-1;R&f;)f>>=1;if(0!==f?(R&=f-1,R+=f):R=0,T++,0==--N[S]){if(S===O)break;S=e[n+h[T]]}if(S>P&&(R&m)!==y){for(0===E&&(E=P),_+=x,C=1<<(A=S-E);A+E<O&&!((C-=N[A+E])<=0);)A++,C<<=1;if(M+=1<<A,1===t&&M>852||2===t&&M>592)return 1;l[y=R&m]=P<<24|A<<16|_-c|0}}return 0!==R&&(l[_+R]=S-E<<24|64<<16|0),p.bits=P,0}},function(t,e,n){\"use strict\";t.exports=function(t,e){var n,i,r,o,s,a,u,l,c,h,p,f,d,y,m,_,v,g,b,w,k,S,T,x,O;n=t.state,i=t.next_in,x=t.input,r=i+(t.avail_in-5),o=t.next_out,O=t.output,s=o-(e-t.avail_out),a=o+(t.avail_out-257),u=n.dmax,l=n.wsize,c=n.whave,h=n.wnext,p=n.window,f=n.hold,d=n.bits,y=n.lencode,m=n.distcode,_=(1<<n.lenbits)-1,v=(1<<n.distbits)-1;t:do{d<15&&(f+=x[i++]<<d,d+=8,f+=x[i++]<<d,d+=8),g=y[f&_];e:for(;;){if(f>>>=b=g>>>24,d-=b,0===(b=g>>>16&255))O[o++]=65535&g;else{if(!(16&b)){if(0==(64&b)){g=y[(65535&g)+(f&(1<<b)-1)];continue e}if(32&b){n.mode=12;break t}t.msg=\"invalid literal/length code\",n.mode=30;break t}w=65535&g,(b&=15)&&(d<b&&(f+=x[i++]<<d,d+=8),w+=f&(1<<b)-1,f>>>=b,d-=b),d<15&&(f+=x[i++]<<d,d+=8,f+=x[i++]<<d,d+=8),g=m[f&v];n:for(;;){if(f>>>=b=g>>>24,d-=b,!(16&(b=g>>>16&255))){if(0==(64&b)){g=m[(65535&g)+(f&(1<<b)-1)];continue n}t.msg=\"invalid distance code\",n.mode=30;break t}if(k=65535&g,d<(b&=15)&&(f+=x[i++]<<d,(d+=8)<b&&(f+=x[i++]<<d,d+=8)),(k+=f&(1<<b)-1)>u){t.msg=\"invalid distance too far back\",n.mode=30;break t}if(f>>>=b,d-=b,k>(b=o-s)){if((b=k-b)>c&&n.sane){t.msg=\"invalid distance too far back\",n.mode=30;break t}if(S=0,T=p,0===h){if(S+=l-b,b<w){w-=b;do{O[o++]=p[S++]}while(--b);S=o-k,T=O}}else if(h<b){if(S+=l+h-b,(b-=h)<w){w-=b;do{O[o++]=p[S++]}while(--b);if(S=0,h<w){w-=b=h;do{O[o++]=p[S++]}while(--b);S=o-k,T=O}}}else if(S+=h-b,b<w){w-=b;do{O[o++]=p[S++]}while(--b);S=o-k,T=O}for(;w>2;)O[o++]=T[S++],O[o++]=T[S++],O[o++]=T[S++],w-=3;w&&(O[o++]=T[S++],w>1&&(O[o++]=T[S++]))}else{S=o-k;do{O[o++]=O[S++],O[o++]=O[S++],O[o++]=O[S++],w-=3}while(w>2);w&&(O[o++]=O[S++],w>1&&(O[o++]=O[S++]))}break}}break}}while(i<r&&o<a);i-=w=d>>3,f&=(1<<(d-=w<<3))-1,t.next_in=i,t.next_out=o,t.avail_in=i<r?r-i+5:5-(i-r),t.avail_out=o<a?a-o+257:257-(o-a),n.hold=f,n.bits=d}},function(t,e,n){\"use strict\";var i=n(22),r=n(97),o=n(96),s=n(174),a=n(173),u=0,l=1,c=2,h=4,p=5,f=6,d=0,y=1,m=2,_=-2,v=-3,g=-4,b=-5,w=8,k=1,S=2,T=3,x=4,O=5,P=6,A=7,E=8,C=9,M=10,R=11,j=12,F=13,N=14,L=15,D=16,q=17,I=18,B=19,U=20,z=21,Y=22,W=23,G=24,V=25,H=26,Z=27,Q=28,K=29,X=30,$=31,J=32,tt=852,et=592,nt=15;function it(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function rt(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg=\"\",e.wrap&&(t.adler=1&e.wrap),e.mode=k,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new i.Buf32(tt),e.distcode=e.distdyn=new i.Buf32(et),e.sane=1,e.back=-1,d):_}function ot(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,rt(t)):_}function st(t,e){var n,i;return t&&t.state?(i=t.state,e<0?(n=0,e=-e):(n=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?_:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=n,i.wbits=e,ot(t))):_}function at(t,e){var n,r;return t?(r=new function(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0},t.state=r,r.window=null,(n=st(t,e))!==d&&(t.state=null),n):_}var ut,lt,ct=!0;function ht(t){if(ct){var e;for(ut=new i.Buf32(512),lt=new i.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(a(l,t.lens,0,288,ut,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;a(c,t.lens,0,32,lt,0,t.work,{bits:5}),ct=!1}t.lencode=ut,t.lenbits=9,t.distcode=lt,t.distbits=5}function pt(t,e,n,r){var o,s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new i.Buf8(s.wsize)),r>=s.wsize?(i.arraySet(s.window,e,n-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((o=s.wsize-s.wnext)>r&&(o=r),i.arraySet(s.window,e,n-r,o,s.wnext),(r-=o)?(i.arraySet(s.window,e,n-r,r,0),s.wnext=r,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=o))),0}e.inflateReset=ot,e.inflateReset2=st,e.inflateResetKeep=rt,e.inflateInit=function(t){return at(t,nt)},e.inflateInit2=at,e.inflate=function(t,e){var n,tt,et,nt,rt,ot,st,at,ut,lt,ct,ft,dt,yt,mt,_t,vt,gt,bt,wt,kt,St,Tt,xt,Ot=0,Pt=new i.Buf8(4),At=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return _;(n=t.state).mode===j&&(n.mode=F),rt=t.next_out,et=t.output,st=t.avail_out,nt=t.next_in,tt=t.input,ot=t.avail_in,at=n.hold,ut=n.bits,lt=ot,ct=st,St=d;t:for(;;)switch(n.mode){case k:if(0===n.wrap){n.mode=F;break}for(;ut<16;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}if(2&n.wrap&&35615===at){n.check=0,Pt[0]=255&at,Pt[1]=at>>>8&255,n.check=o(n.check,Pt,2,0),at=0,ut=0,n.mode=S;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&at)<<8)+(at>>8))%31){t.msg=\"incorrect header check\",n.mode=X;break}if((15&at)!==w){t.msg=\"unknown compression method\",n.mode=X;break}if(ut-=4,kt=8+(15&(at>>>=4)),0===n.wbits)n.wbits=kt;else if(kt>n.wbits){t.msg=\"invalid window size\",n.mode=X;break}n.dmax=1<<kt,t.adler=n.check=1,n.mode=512&at?M:j,at=0,ut=0;break;case S:for(;ut<16;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}if(n.flags=at,(255&n.flags)!==w){t.msg=\"unknown compression method\",n.mode=X;break}if(57344&n.flags){t.msg=\"unknown header flags set\",n.mode=X;break}n.head&&(n.head.text=at>>8&1),512&n.flags&&(Pt[0]=255&at,Pt[1]=at>>>8&255,n.check=o(n.check,Pt,2,0)),at=0,ut=0,n.mode=T;case T:for(;ut<32;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}n.head&&(n.head.time=at),512&n.flags&&(Pt[0]=255&at,Pt[1]=at>>>8&255,Pt[2]=at>>>16&255,Pt[3]=at>>>24&255,n.check=o(n.check,Pt,4,0)),at=0,ut=0,n.mode=x;case x:for(;ut<16;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}n.head&&(n.head.xflags=255&at,n.head.os=at>>8),512&n.flags&&(Pt[0]=255&at,Pt[1]=at>>>8&255,n.check=o(n.check,Pt,2,0)),at=0,ut=0,n.mode=O;case O:if(1024&n.flags){for(;ut<16;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}n.length=at,n.head&&(n.head.extra_len=at),512&n.flags&&(Pt[0]=255&at,Pt[1]=at>>>8&255,n.check=o(n.check,Pt,2,0)),at=0,ut=0}else n.head&&(n.head.extra=null);n.mode=P;case P:if(1024&n.flags&&((ft=n.length)>ot&&(ft=ot),ft&&(n.head&&(kt=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),i.arraySet(n.head.extra,tt,nt,ft,kt)),512&n.flags&&(n.check=o(n.check,tt,ft,nt)),ot-=ft,nt+=ft,n.length-=ft),n.length))break t;n.length=0,n.mode=A;case A:if(2048&n.flags){if(0===ot)break t;ft=0;do{kt=tt[nt+ft++],n.head&&kt&&n.length<65536&&(n.head.name+=String.fromCharCode(kt))}while(kt&&ft<ot);if(512&n.flags&&(n.check=o(n.check,tt,ft,nt)),ot-=ft,nt+=ft,kt)break t}else n.head&&(n.head.name=null);n.length=0,n.mode=E;case E:if(4096&n.flags){if(0===ot)break t;ft=0;do{kt=tt[nt+ft++],n.head&&kt&&n.length<65536&&(n.head.comment+=String.fromCharCode(kt))}while(kt&&ft<ot);if(512&n.flags&&(n.check=o(n.check,tt,ft,nt)),ot-=ft,nt+=ft,kt)break t}else n.head&&(n.head.comment=null);n.mode=C;case C:if(512&n.flags){for(;ut<16;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}if(at!==(65535&n.check)){t.msg=\"header crc mismatch\",n.mode=X;break}at=0,ut=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=j;break;case M:for(;ut<32;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}t.adler=n.check=it(at),at=0,ut=0,n.mode=R;case R:if(0===n.havedict)return t.next_out=rt,t.avail_out=st,t.next_in=nt,t.avail_in=ot,n.hold=at,n.bits=ut,m;t.adler=n.check=1,n.mode=j;case j:if(e===p||e===f)break t;case F:if(n.last){at>>>=7&ut,ut-=7&ut,n.mode=Z;break}for(;ut<3;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}switch(n.last=1&at,ut-=1,3&(at>>>=1)){case 0:n.mode=N;break;case 1:if(ht(n),n.mode=U,e===f){at>>>=2,ut-=2;break t}break;case 2:n.mode=q;break;case 3:t.msg=\"invalid block type\",n.mode=X}at>>>=2,ut-=2;break;case N:for(at>>>=7&ut,ut-=7&ut;ut<32;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}if((65535&at)!=(at>>>16^65535)){t.msg=\"invalid stored block lengths\",n.mode=X;break}if(n.length=65535&at,at=0,ut=0,n.mode=L,e===f)break t;case L:n.mode=D;case D:if(ft=n.length){if(ft>ot&&(ft=ot),ft>st&&(ft=st),0===ft)break t;i.arraySet(et,tt,nt,ft,rt),ot-=ft,nt+=ft,st-=ft,rt+=ft,n.length-=ft;break}n.mode=j;break;case q:for(;ut<14;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}if(n.nlen=257+(31&at),at>>>=5,ut-=5,n.ndist=1+(31&at),at>>>=5,ut-=5,n.ncode=4+(15&at),at>>>=4,ut-=4,n.nlen>286||n.ndist>30){t.msg=\"too many length or distance symbols\",n.mode=X;break}n.have=0,n.mode=I;case I:for(;n.have<n.ncode;){for(;ut<3;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}n.lens[At[n.have++]]=7&at,at>>>=3,ut-=3}for(;n.have<19;)n.lens[At[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,Tt={bits:n.lenbits},St=a(u,n.lens,0,19,n.lencode,0,n.work,Tt),n.lenbits=Tt.bits,St){t.msg=\"invalid code lengths set\",n.mode=X;break}n.have=0,n.mode=B;case B:for(;n.have<n.nlen+n.ndist;){for(;_t=(Ot=n.lencode[at&(1<<n.lenbits)-1])>>>16&255,vt=65535&Ot,!((mt=Ot>>>24)<=ut);){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}if(vt<16)at>>>=mt,ut-=mt,n.lens[n.have++]=vt;else{if(16===vt){for(xt=mt+2;ut<xt;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}if(at>>>=mt,ut-=mt,0===n.have){t.msg=\"invalid bit length repeat\",n.mode=X;break}kt=n.lens[n.have-1],ft=3+(3&at),at>>>=2,ut-=2}else if(17===vt){for(xt=mt+3;ut<xt;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}ut-=mt,kt=0,ft=3+(7&(at>>>=mt)),at>>>=3,ut-=3}else{for(xt=mt+7;ut<xt;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}ut-=mt,kt=0,ft=11+(127&(at>>>=mt)),at>>>=7,ut-=7}if(n.have+ft>n.nlen+n.ndist){t.msg=\"invalid bit length repeat\",n.mode=X;break}for(;ft--;)n.lens[n.have++]=kt}}if(n.mode===X)break;if(0===n.lens[256]){t.msg=\"invalid code -- missing end-of-block\",n.mode=X;break}if(n.lenbits=9,Tt={bits:n.lenbits},St=a(l,n.lens,0,n.nlen,n.lencode,0,n.work,Tt),n.lenbits=Tt.bits,St){t.msg=\"invalid literal/lengths set\",n.mode=X;break}if(n.distbits=6,n.distcode=n.distdyn,Tt={bits:n.distbits},St=a(c,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,Tt),n.distbits=Tt.bits,St){t.msg=\"invalid distances set\",n.mode=X;break}if(n.mode=U,e===f)break t;case U:n.mode=z;case z:if(ot>=6&&st>=258){t.next_out=rt,t.avail_out=st,t.next_in=nt,t.avail_in=ot,n.hold=at,n.bits=ut,s(t,ct),rt=t.next_out,et=t.output,st=t.avail_out,nt=t.next_in,tt=t.input,ot=t.avail_in,at=n.hold,ut=n.bits,n.mode===j&&(n.back=-1);break}for(n.back=0;_t=(Ot=n.lencode[at&(1<<n.lenbits)-1])>>>16&255,vt=65535&Ot,!((mt=Ot>>>24)<=ut);){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}if(_t&&0==(240&_t)){for(gt=mt,bt=_t,wt=vt;_t=(Ot=n.lencode[wt+((at&(1<<gt+bt)-1)>>gt)])>>>16&255,vt=65535&Ot,!(gt+(mt=Ot>>>24)<=ut);){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}at>>>=gt,ut-=gt,n.back+=gt}if(at>>>=mt,ut-=mt,n.back+=mt,n.length=vt,0===_t){n.mode=H;break}if(32&_t){n.back=-1,n.mode=j;break}if(64&_t){t.msg=\"invalid literal/length code\",n.mode=X;break}n.extra=15&_t,n.mode=Y;case Y:if(n.extra){for(xt=n.extra;ut<xt;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}n.length+=at&(1<<n.extra)-1,at>>>=n.extra,ut-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=W;case W:for(;_t=(Ot=n.distcode[at&(1<<n.distbits)-1])>>>16&255,vt=65535&Ot,!((mt=Ot>>>24)<=ut);){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}if(0==(240&_t)){for(gt=mt,bt=_t,wt=vt;_t=(Ot=n.distcode[wt+((at&(1<<gt+bt)-1)>>gt)])>>>16&255,vt=65535&Ot,!(gt+(mt=Ot>>>24)<=ut);){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}at>>>=gt,ut-=gt,n.back+=gt}if(at>>>=mt,ut-=mt,n.back+=mt,64&_t){t.msg=\"invalid distance code\",n.mode=X;break}n.offset=vt,n.extra=15&_t,n.mode=G;case G:if(n.extra){for(xt=n.extra;ut<xt;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}n.offset+=at&(1<<n.extra)-1,at>>>=n.extra,ut-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg=\"invalid distance too far back\",n.mode=X;break}n.mode=V;case V:if(0===st)break t;if(ft=ct-st,n.offset>ft){if((ft=n.offset-ft)>n.whave&&n.sane){t.msg=\"invalid distance too far back\",n.mode=X;break}ft>n.wnext?(ft-=n.wnext,dt=n.wsize-ft):dt=n.wnext-ft,ft>n.length&&(ft=n.length),yt=n.window}else yt=et,dt=rt-n.offset,ft=n.length;ft>st&&(ft=st),st-=ft,n.length-=ft;do{et[rt++]=yt[dt++]}while(--ft);0===n.length&&(n.mode=z);break;case H:if(0===st)break t;et[rt++]=n.length,st--,n.mode=z;break;case Z:if(n.wrap){for(;ut<32;){if(0===ot)break t;ot--,at|=tt[nt++]<<ut,ut+=8}if(ct-=st,t.total_out+=ct,n.total+=ct,ct&&(t.adler=n.check=n.flags?o(n.check,et,ct,rt-ct):r(n.check,et,ct,rt-ct)),ct=st,(n.flags?at:it(at))!==n.check){t.msg=\"incorrect data check\",n.mode=X;break}at=0,ut=0}n.mode=Q;case Q:if(n.wrap&&n.flags){for(;ut<32;){if(0===ot)break t;ot--,at+=tt[nt++]<<ut,ut+=8}if(at!==(4294967295&n.total)){t.msg=\"incorrect length check\",n.mode=X;break}at=0,ut=0}n.mode=K;case K:St=y;break t;case X:St=v;break t;case $:return g;case J:default:return _}return t.next_out=rt,t.avail_out=st,t.next_in=nt,t.avail_in=ot,n.hold=at,n.bits=ut,(n.wsize||ct!==t.avail_out&&n.mode<X&&(n.mode<Z||e!==h))&&pt(t,t.output,t.next_out,ct-t.avail_out)?(n.mode=$,g):(lt-=t.avail_in,ct-=t.avail_out,t.total_in+=lt,t.total_out+=ct,n.total+=ct,n.wrap&&ct&&(t.adler=n.check=n.flags?o(n.check,et,ct,t.next_out-ct):r(n.check,et,ct,t.next_out-ct)),t.data_type=n.bits+(n.last?64:0)+(n.mode===j?128:0)+(n.mode===U||n.mode===L?256:0),(0===lt&&0===ct||e===h)&&St===d&&(St=b),St)},e.inflateEnd=function(t){if(!t||!t.state)return _;var e=t.state;return e.window&&(e.window=null),t.state=null,d},e.inflateGetHeader=function(t,e){var n;return t&&t.state?0==(2&(n=t.state).wrap)?_:(n.head=e,e.done=!1,d):_},e.inflateSetDictionary=function(t,e){var n,i=e.length;return t&&t.state?0!==(n=t.state).wrap&&n.mode!==R?_:n.mode===R&&r(1,e,i,0)!==n.check?v:pt(t,e,i,i)?(n.mode=$,g):(n.havedict=1,d):_},e.inflateInfo=\"pako inflate (from Nodeca project)\"},function(t,e,n){\"use strict\";var i=n(175),r=n(22),o=n(95),s=n(93),a=n(65),u=n(94),l=n(172),c=Object.prototype.toString;function h(t){if(!(this instanceof h))return new h(t);this.options=r.assign({chunkSize:16384,windowBits:0,to:\"\"},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg=\"\",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var n=i.inflateInit2(this.strm,e.windowBits);if(n!==s.Z_OK)throw new Error(a[n]);this.header=new l,i.inflateGetHeader(this.strm,this.header)}function p(t,e){var n=new h(e);if(n.push(t,!0),n.err)throw n.msg||a[n.err];return n.result}h.prototype.push=function(t,e){var n,a,u,l,h,p,f=this.strm,d=this.options.chunkSize,y=this.options.dictionary,m=!1;if(this.ended)return!1;a=e===~~e?e:!0===e?s.Z_FINISH:s.Z_NO_FLUSH,\"string\"==typeof t?f.input=o.binstring2buf(t):\"[object ArrayBuffer]\"===c.call(t)?f.input=new Uint8Array(t):f.input=t,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new r.Buf8(d),f.next_out=0,f.avail_out=d),(n=i.inflate(f,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&y&&(p=\"string\"==typeof y?o.string2buf(y):\"[object ArrayBuffer]\"===c.call(y)?new Uint8Array(y):y,n=i.inflateSetDictionary(this.strm,p)),n===s.Z_BUF_ERROR&&!0===m&&(n=s.Z_OK,m=!1),n!==s.Z_STREAM_END&&n!==s.Z_OK)return this.onEnd(n),this.ended=!0,!1;f.next_out&&(0!==f.avail_out&&n!==s.Z_STREAM_END&&(0!==f.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||(\"string\"===this.options.to?(u=o.utf8border(f.output,f.next_out),l=f.next_out-u,h=o.buf2string(f.output,u),f.next_out=l,f.avail_out=d-l,l&&r.arraySet(f.output,f.output,u,l,0),this.onData(h)):this.onData(r.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(m=!0)}while((f.avail_in>0||0===f.avail_out)&&n!==s.Z_STREAM_END);return n===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(n=i.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),f.avail_out=0,!0)},h.prototype.onData=function(t){this.chunks.push(t)},h.prototype.onEnd=function(t){t===s.Z_OK&&(\"string\"===this.options.to?this.result=this.chunks.join(\"\"):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Inflate=h,e.inflate=p,e.inflateRaw=function(t,e){return(e=e||{}).raw=!0,p(t,e)},e.ungzip=p},function(t,e,n){\"use strict\";var i=n(22),r=4,o=0,s=1,a=2;function u(t){for(var e=t.length;--e>=0;)t[e]=0}var l=0,c=1,h=2,p=29,f=256,d=f+1+p,y=30,m=19,_=2*d+1,v=15,g=16,b=7,w=256,k=16,S=17,T=18,x=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],O=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],P=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],E=new Array(2*(d+2));u(E);var C=new Array(2*y);u(C);var M=new Array(512);u(M);var R=new Array(256);u(R);var j=new Array(p);u(j);var F,N,L,D=new Array(y);function q(t,e,n,i,r){this.static_tree=t,this.extra_bits=e,this.extra_base=n,this.elems=i,this.max_length=r,this.has_stree=t&&t.length}function I(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function B(t){return t<256?M[t]:M[256+(t>>>7)]}function U(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function z(t,e,n){t.bi_valid>g-n?(t.bi_buf|=e<<t.bi_valid&65535,U(t,t.bi_buf),t.bi_buf=e>>g-t.bi_valid,t.bi_valid+=n-g):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=n)}function Y(t,e,n){z(t,n[2*e],n[2*e+1])}function W(t,e){var n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}function G(t,e,n){var i,r,o=new Array(v+1),s=0;for(i=1;i<=v;i++)o[i]=s=s+n[i-1]<<1;for(r=0;r<=e;r++){var a=t[2*r+1];0!==a&&(t[2*r]=W(o[a]++,a))}}function V(t){var e;for(e=0;e<d;e++)t.dyn_ltree[2*e]=0;for(e=0;e<y;e++)t.dyn_dtree[2*e]=0;for(e=0;e<m;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*w]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function H(t){t.bi_valid>8?U(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function Z(t,e,n,i){var r=2*e,o=2*n;return t[r]<t[o]||t[r]===t[o]&&i[e]<=i[n]}function Q(t,e,n){for(var i=t.heap[n],r=n<<1;r<=t.heap_len&&(r<t.heap_len&&Z(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!Z(e,i,t.heap[r],t.depth));)t.heap[n]=t.heap[r],n=r,r<<=1;t.heap[n]=i}function K(t,e,n){var i,r,o,s,a=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*a]<<8|t.pending_buf[t.d_buf+2*a+1],r=t.pending_buf[t.l_buf+a],a++,0===i?Y(t,r,e):(Y(t,(o=R[r])+f+1,e),0!==(s=x[o])&&z(t,r-=j[o],s),Y(t,o=B(--i),n),0!==(s=O[o])&&z(t,i-=D[o],s))}while(a<t.last_lit);Y(t,w,e)}function X(t,e){var n,i,r,o=e.dyn_tree,s=e.stat_desc.static_tree,a=e.stat_desc.has_stree,u=e.stat_desc.elems,l=-1;for(t.heap_len=0,t.heap_max=_,n=0;n<u;n++)0!==o[2*n]?(t.heap[++t.heap_len]=l=n,t.depth[n]=0):o[2*n+1]=0;for(;t.heap_len<2;)o[2*(r=t.heap[++t.heap_len]=l<2?++l:0)]=1,t.depth[r]=0,t.opt_len--,a&&(t.static_len-=s[2*r+1]);for(e.max_code=l,n=t.heap_len>>1;n>=1;n--)Q(t,o,n);r=u;do{n=t.heap[1],t.heap[1]=t.heap[t.heap_len--],Q(t,o,1),i=t.heap[1],t.heap[--t.heap_max]=n,t.heap[--t.heap_max]=i,o[2*r]=o[2*n]+o[2*i],t.depth[r]=(t.depth[n]>=t.depth[i]?t.depth[n]:t.depth[i])+1,o[2*n+1]=o[2*i+1]=r,t.heap[1]=r++,Q(t,o,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var n,i,r,o,s,a,u=e.dyn_tree,l=e.max_code,c=e.stat_desc.static_tree,h=e.stat_desc.has_stree,p=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,d=e.stat_desc.max_length,y=0;for(o=0;o<=v;o++)t.bl_count[o]=0;for(u[2*t.heap[t.heap_max]+1]=0,n=t.heap_max+1;n<_;n++)(o=u[2*u[2*(i=t.heap[n])+1]+1]+1)>d&&(o=d,y++),u[2*i+1]=o,i>l||(t.bl_count[o]++,s=0,i>=f&&(s=p[i-f]),a=u[2*i],t.opt_len+=a*(o+s),h&&(t.static_len+=a*(c[2*i+1]+s)));if(0!==y){do{for(o=d-1;0===t.bl_count[o];)o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[d]--,y-=2}while(y>0);for(o=d;0!==o;o--)for(i=t.bl_count[o];0!==i;)(r=t.heap[--n])>l||(u[2*r+1]!==o&&(t.opt_len+=(o-u[2*r+1])*u[2*r],u[2*r+1]=o),i--)}}(t,e),G(o,l,t.bl_count)}function $(t,e,n){var i,r,o=-1,s=e[1],a=0,u=7,l=4;for(0===s&&(u=138,l=3),e[2*(n+1)+1]=65535,i=0;i<=n;i++)r=s,s=e[2*(i+1)+1],++a<u&&r===s||(a<l?t.bl_tree[2*r]+=a:0!==r?(r!==o&&t.bl_tree[2*r]++,t.bl_tree[2*k]++):a<=10?t.bl_tree[2*S]++:t.bl_tree[2*T]++,a=0,o=r,0===s?(u=138,l=3):r===s?(u=6,l=3):(u=7,l=4))}function J(t,e,n){var i,r,o=-1,s=e[1],a=0,u=7,l=4;for(0===s&&(u=138,l=3),i=0;i<=n;i++)if(r=s,s=e[2*(i+1)+1],!(++a<u&&r===s)){if(a<l)do{Y(t,r,t.bl_tree)}while(0!=--a);else 0!==r?(r!==o&&(Y(t,r,t.bl_tree),a--),Y(t,k,t.bl_tree),z(t,a-3,2)):a<=10?(Y(t,S,t.bl_tree),z(t,a-3,3)):(Y(t,T,t.bl_tree),z(t,a-11,7));a=0,o=r,0===s?(u=138,l=3):r===s?(u=6,l=3):(u=7,l=4)}}u(D);var tt=!1;function et(t,e,n,r){z(t,(l<<1)+(r?1:0),3),function(t,e,n,r){H(t),r&&(U(t,n),U(t,~n)),i.arraySet(t.pending_buf,t.window,e,n,t.pending),t.pending+=n}(t,e,n,!0)}e._tr_init=function(t){tt||(function(){var t,e,n,i,r,o=new Array(v+1);for(n=0,i=0;i<p-1;i++)for(j[i]=n,t=0;t<1<<x[i];t++)R[n++]=i;for(R[n-1]=i,r=0,i=0;i<16;i++)for(D[i]=r,t=0;t<1<<O[i];t++)M[r++]=i;for(r>>=7;i<y;i++)for(D[i]=r<<7,t=0;t<1<<O[i]-7;t++)M[256+r++]=i;for(e=0;e<=v;e++)o[e]=0;for(t=0;t<=143;)E[2*t+1]=8,t++,o[8]++;for(;t<=255;)E[2*t+1]=9,t++,o[9]++;for(;t<=279;)E[2*t+1]=7,t++,o[7]++;for(;t<=287;)E[2*t+1]=8,t++,o[8]++;for(G(E,d+1,o),t=0;t<y;t++)C[2*t+1]=5,C[2*t]=W(t,5);F=new q(E,x,f+1,d,v),N=new q(C,O,0,y,v),L=new q(new Array(0),P,0,m,b)}(),tt=!0),t.l_desc=new I(t.dyn_ltree,F),t.d_desc=new I(t.dyn_dtree,N),t.bl_desc=new I(t.bl_tree,L),t.bi_buf=0,t.bi_valid=0,V(t)},e._tr_stored_block=et,e._tr_flush_block=function(t,e,n,i){var u,l,p=0;t.level>0?(t.strm.data_type===a&&(t.strm.data_type=function(t){var e,n=4093624447;for(e=0;e<=31;e++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return o;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return s;for(e=32;e<f;e++)if(0!==t.dyn_ltree[2*e])return s;return o}(t)),X(t,t.l_desc),X(t,t.d_desc),p=function(t){var e;for($(t,t.dyn_ltree,t.l_desc.max_code),$(t,t.dyn_dtree,t.d_desc.max_code),X(t,t.bl_desc),e=m-1;e>=3&&0===t.bl_tree[2*A[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),u=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=u&&(u=l)):u=l=n+5,n+4<=u&&-1!==e?et(t,e,n,i):t.strategy===r||l===u?(z(t,(c<<1)+(i?1:0),3),K(t,E,C)):(z(t,(h<<1)+(i?1:0),3),function(t,e,n,i){var r;for(z(t,e-257,5),z(t,n-1,5),z(t,i-4,4),r=0;r<i;r++)z(t,t.bl_tree[2*A[r]+1],3);J(t,t.dyn_ltree,e-1),J(t,t.dyn_dtree,n-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,p+1),K(t,t.dyn_ltree,t.dyn_dtree)),V(t),i&&H(t)},e._tr_tally=function(t,e,n){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(R[n]+f+1)]++,t.dyn_dtree[2*B(e)]++),t.last_lit===t.lit_bufsize-1},e._tr_align=function(t){z(t,c<<1,3),Y(t,w,E),function(t){16===t.bi_valid?(U(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},function(t,e,n){\"use strict\";var i,r=n(22),o=n(177),s=n(97),a=n(96),u=n(65),l=0,c=1,h=3,p=4,f=5,d=0,y=1,m=-2,_=-3,v=-5,g=-1,b=1,w=2,k=3,S=4,T=0,x=2,O=8,P=9,A=15,E=8,C=286,M=30,R=19,j=2*C+1,F=15,N=3,L=258,D=L+N+1,q=32,I=42,B=69,U=73,z=91,Y=103,W=113,G=666,V=1,H=2,Z=3,Q=4,K=3;function X(t,e){return t.msg=u[e],e}function $(t){return(t<<1)-(t>4?9:0)}function J(t){for(var e=t.length;--e>=0;)t[e]=0}function tt(t){var e=t.state,n=e.pending;n>t.avail_out&&(n=t.avail_out),0!==n&&(r.arraySet(t.output,e.pending_buf,e.pending_out,n,t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,0===e.pending&&(e.pending_out=0))}function et(t,e){o._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,tt(t.strm)}function nt(t,e){t.pending_buf[t.pending++]=e}function it(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function rt(t,e){var n,i,r=t.max_chain_length,o=t.strstart,s=t.prev_length,a=t.nice_match,u=t.strstart>t.w_size-D?t.strstart-(t.w_size-D):0,l=t.window,c=t.w_mask,h=t.prev,p=t.strstart+L,f=l[o+s-1],d=l[o+s];t.prev_length>=t.good_match&&(r>>=2),a>t.lookahead&&(a=t.lookahead);do{if(l[(n=e)+s]===d&&l[n+s-1]===f&&l[n]===l[o]&&l[++n]===l[o+1]){o+=2,n++;do{}while(l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&o<p);if(i=L-(p-o),o=p-L,i>s){if(t.match_start=e,s=i,i>=a)break;f=l[o+s-1],d=l[o+s]}}}while((e=h[e&c])>u&&0!=--r);return s<=t.lookahead?s:t.lookahead}function ot(t){var e,n,i,o,u,l,c,h,p,f,d=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=d+(d-D)){r.arraySet(t.window,t.window,d,d,0),t.match_start-=d,t.strstart-=d,t.block_start-=d,e=n=t.hash_size;do{i=t.head[--e],t.head[e]=i>=d?i-d:0}while(--n);e=n=d;do{i=t.prev[--e],t.prev[e]=i>=d?i-d:0}while(--n);o+=d}if(0===t.strm.avail_in)break;if(l=t.strm,c=t.window,h=t.strstart+t.lookahead,p=o,f=void 0,(f=l.avail_in)>p&&(f=p),n=0===f?0:(l.avail_in-=f,r.arraySet(c,l.input,l.next_in,f,h),1===l.state.wrap?l.adler=s(l.adler,c,f,h):2===l.state.wrap&&(l.adler=a(l.adler,c,f,h)),l.next_in+=f,l.total_in+=f,f),t.lookahead+=n,t.lookahead+t.insert>=N)for(u=t.strstart-t.insert,t.ins_h=t.window[u],t.ins_h=(t.ins_h<<t.hash_shift^t.window[u+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[u+N-1])&t.hash_mask,t.prev[u&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=u,u++,t.insert--,!(t.lookahead+t.insert<N)););}while(t.lookahead<D&&0!==t.strm.avail_in)}function st(t,e){for(var n,i;;){if(t.lookahead<D){if(ot(t),t.lookahead<D&&e===l)return V;if(0===t.lookahead)break}if(n=0,t.lookahead>=N&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+N-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==n&&t.strstart-n<=t.w_size-D&&(t.match_length=rt(t,n)),t.match_length>=N)if(i=o._tr_tally(t,t.strstart-t.match_start,t.match_length-N),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=N){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+N-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else i=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(et(t,!1),0===t.strm.avail_out))return V}return t.insert=t.strstart<N-1?t.strstart:N-1,e===p?(et(t,!0),0===t.strm.avail_out?Z:Q):t.last_lit&&(et(t,!1),0===t.strm.avail_out)?V:H}function at(t,e){for(var n,i,r;;){if(t.lookahead<D){if(ot(t),t.lookahead<D&&e===l)return V;if(0===t.lookahead)break}if(n=0,t.lookahead>=N&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+N-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=N-1,0!==n&&t.prev_length<t.max_lazy_match&&t.strstart-n<=t.w_size-D&&(t.match_length=rt(t,n),t.match_length<=5&&(t.strategy===b||t.match_length===N&&t.strstart-t.match_start>4096)&&(t.match_length=N-1)),t.prev_length>=N&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-N,i=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-N),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+N-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=N-1,t.strstart++,i&&(et(t,!1),0===t.strm.avail_out))return V}else if(t.match_available){if((i=o._tr_tally(t,0,t.window[t.strstart-1]))&&et(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return V}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=o._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<N-1?t.strstart:N-1,e===p?(et(t,!0),0===t.strm.avail_out?Z:Q):t.last_lit&&(et(t,!1),0===t.strm.avail_out)?V:H}function ut(t,e,n,i,r){this.good_length=t,this.max_lazy=e,this.nice_length=n,this.max_chain=i,this.func=r}function lt(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=x,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?I:W,t.adler=2===e.wrap?0:1,e.last_flush=l,o._tr_init(e),d):X(t,m)}function ct(t){var e,n=lt(t);return n===d&&((e=t.state).window_size=2*e.w_size,J(e.head),e.max_lazy_match=i[e.level].max_lazy,e.good_match=i[e.level].good_length,e.nice_match=i[e.level].nice_length,e.max_chain_length=i[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=N-1,e.match_available=0,e.ins_h=0),n}function ht(t,e,n,i,o,s){if(!t)return m;var a=1;if(e===g&&(e=6),i<0?(a=0,i=-i):i>15&&(a=2,i-=16),o<1||o>P||n!==O||i<8||i>15||e<0||e>9||s<0||s>S)return X(t,m);8===i&&(i=9);var u=new function(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=O,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new r.Buf16(2*j),this.dyn_dtree=new r.Buf16(2*(2*M+1)),this.bl_tree=new r.Buf16(2*(2*R+1)),J(this.dyn_ltree),J(this.dyn_dtree),J(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new r.Buf16(F+1),this.heap=new r.Buf16(2*C+1),J(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new r.Buf16(2*C+1),J(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0};return t.state=u,u.strm=t,u.wrap=a,u.gzhead=null,u.w_bits=i,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=o+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+N-1)/N),u.window=new r.Buf8(2*u.w_size),u.head=new r.Buf16(u.hash_size),u.prev=new r.Buf16(u.w_size),u.lit_bufsize=1<<o+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new r.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=e,u.strategy=s,u.method=n,ct(t)}i=[new ut(0,0,0,0,function(t,e){var n=65535;for(n>t.pending_buf_size-5&&(n=t.pending_buf_size-5);;){if(t.lookahead<=1){if(ot(t),0===t.lookahead&&e===l)return V;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+n;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,et(t,!1),0===t.strm.avail_out))return V;if(t.strstart-t.block_start>=t.w_size-D&&(et(t,!1),0===t.strm.avail_out))return V}return t.insert=0,e===p?(et(t,!0),0===t.strm.avail_out?Z:Q):(t.strstart>t.block_start&&(et(t,!1),t.strm.avail_out),V)}),new ut(4,4,8,4,st),new ut(4,5,16,8,st),new ut(4,6,32,32,st),new ut(4,4,16,16,at),new ut(8,16,32,32,at),new ut(8,16,128,128,at),new ut(8,32,128,256,at),new ut(32,128,258,1024,at),new ut(32,258,258,4096,at)],e.deflateInit=function(t,e){return ht(t,e,O,A,E,T)},e.deflateInit2=ht,e.deflateReset=ct,e.deflateResetKeep=lt,e.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?m:(t.state.gzhead=e,d):m},e.deflate=function(t,e){var n,r,s,u;if(!t||!t.state||e>f||e<0)return t?X(t,m):m;if(r=t.state,!t.output||!t.input&&0!==t.avail_in||r.status===G&&e!==p)return X(t,0===t.avail_out?v:m);if(r.strm=t,n=r.last_flush,r.last_flush=e,r.status===I)if(2===r.wrap)t.adler=0,nt(r,31),nt(r,139),nt(r,8),r.gzhead?(nt(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),nt(r,255&r.gzhead.time),nt(r,r.gzhead.time>>8&255),nt(r,r.gzhead.time>>16&255),nt(r,r.gzhead.time>>24&255),nt(r,9===r.level?2:r.strategy>=w||r.level<2?4:0),nt(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(nt(r,255&r.gzhead.extra.length),nt(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=a(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=B):(nt(r,0),nt(r,0),nt(r,0),nt(r,0),nt(r,0),nt(r,9===r.level?2:r.strategy>=w||r.level<2?4:0),nt(r,K),r.status=W);else{var _=O+(r.w_bits-8<<4)<<8;_|=(r.strategy>=w||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(_|=q),_+=31-_%31,r.status=W,it(r,_),0!==r.strstart&&(it(r,t.adler>>>16),it(r,65535&t.adler)),t.adler=1}if(r.status===B)if(r.gzhead.extra){for(s=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>s&&(t.adler=a(t.adler,r.pending_buf,r.pending-s,s)),tt(t),s=r.pending,r.pending!==r.pending_buf_size));)nt(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>s&&(t.adler=a(t.adler,r.pending_buf,r.pending-s,s)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=U)}else r.status=U;if(r.status===U)if(r.gzhead.name){s=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>s&&(t.adler=a(t.adler,r.pending_buf,r.pending-s,s)),tt(t),s=r.pending,r.pending===r.pending_buf_size)){u=1;break}u=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,nt(r,u)}while(0!==u);r.gzhead.hcrc&&r.pending>s&&(t.adler=a(t.adler,r.pending_buf,r.pending-s,s)),0===u&&(r.gzindex=0,r.status=z)}else r.status=z;if(r.status===z)if(r.gzhead.comment){s=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>s&&(t.adler=a(t.adler,r.pending_buf,r.pending-s,s)),tt(t),s=r.pending,r.pending===r.pending_buf_size)){u=1;break}u=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,nt(r,u)}while(0!==u);r.gzhead.hcrc&&r.pending>s&&(t.adler=a(t.adler,r.pending_buf,r.pending-s,s)),0===u&&(r.status=Y)}else r.status=Y;if(r.status===Y&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&tt(t),r.pending+2<=r.pending_buf_size&&(nt(r,255&t.adler),nt(r,t.adler>>8&255),t.adler=0,r.status=W)):r.status=W),0!==r.pending){if(tt(t),0===t.avail_out)return r.last_flush=-1,d}else if(0===t.avail_in&&$(e)<=$(n)&&e!==p)return X(t,v);if(r.status===G&&0!==t.avail_in)return X(t,v);if(0!==t.avail_in||0!==r.lookahead||e!==l&&r.status!==G){var g=r.strategy===w?function(t,e){for(var n;;){if(0===t.lookahead&&(ot(t),0===t.lookahead)){if(e===l)return V;break}if(t.match_length=0,n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(et(t,!1),0===t.strm.avail_out))return V}return t.insert=0,e===p?(et(t,!0),0===t.strm.avail_out?Z:Q):t.last_lit&&(et(t,!1),0===t.strm.avail_out)?V:H}(r,e):r.strategy===k?function(t,e){for(var n,i,r,s,a=t.window;;){if(t.lookahead<=L){if(ot(t),t.lookahead<=L&&e===l)return V;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=N&&t.strstart>0&&(i=a[r=t.strstart-1])===a[++r]&&i===a[++r]&&i===a[++r]){s=t.strstart+L;do{}while(i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&r<s);t.match_length=L-(s-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=N?(n=o._tr_tally(t,1,t.match_length-N),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(et(t,!1),0===t.strm.avail_out))return V}return t.insert=0,e===p?(et(t,!0),0===t.strm.avail_out?Z:Q):t.last_lit&&(et(t,!1),0===t.strm.avail_out)?V:H}(r,e):i[r.level].func(r,e);if(g!==Z&&g!==Q||(r.status=G),g===V||g===Z)return 0===t.avail_out&&(r.last_flush=-1),d;if(g===H&&(e===c?o._tr_align(r):e!==f&&(o._tr_stored_block(r,0,0,!1),e===h&&(J(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),tt(t),0===t.avail_out))return r.last_flush=-1,d}return e!==p?d:r.wrap<=0?y:(2===r.wrap?(nt(r,255&t.adler),nt(r,t.adler>>8&255),nt(r,t.adler>>16&255),nt(r,t.adler>>24&255),nt(r,255&t.total_in),nt(r,t.total_in>>8&255),nt(r,t.total_in>>16&255),nt(r,t.total_in>>24&255)):(it(r,t.adler>>>16),it(r,65535&t.adler)),tt(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?d:y)},e.deflateEnd=function(t){var e;return t&&t.state?(e=t.state.status)!==I&&e!==B&&e!==U&&e!==z&&e!==Y&&e!==W&&e!==G?X(t,m):(t.state=null,e===W?X(t,_):d):m},e.deflateSetDictionary=function(t,e){var n,i,o,a,u,l,c,h,p=e.length;if(!t||!t.state)return m;if(2===(a=(n=t.state).wrap)||1===a&&n.status!==I||n.lookahead)return m;for(1===a&&(t.adler=s(t.adler,e,p,0)),n.wrap=0,p>=n.w_size&&(0===a&&(J(n.head),n.strstart=0,n.block_start=0,n.insert=0),h=new r.Buf8(n.w_size),r.arraySet(h,e,p-n.w_size,n.w_size,0),e=h,p=n.w_size),u=t.avail_in,l=t.next_in,c=t.input,t.avail_in=p,t.next_in=0,t.input=e,ot(n);n.lookahead>=N;){i=n.strstart,o=n.lookahead-(N-1);do{n.ins_h=(n.ins_h<<n.hash_shift^n.window[i+N-1])&n.hash_mask,n.prev[i&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=i,i++}while(--o);n.strstart=i,n.lookahead=N-1,ot(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=N-1,n.match_available=0,t.next_in=l,t.input=c,t.avail_in=u,n.wrap=a,d},e.deflateInfo=\"pako deflate (from Nodeca project)\"},function(t,e,n){\"use strict\";var i=n(178),r=n(22),o=n(95),s=n(65),a=n(94),u=Object.prototype.toString,l=0,c=-1,h=0,p=8;function f(t){if(!(this instanceof f))return new f(t);this.options=r.assign({level:c,method:p,chunkSize:16384,windowBits:15,memLevel:8,strategy:h,to:\"\"},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg=\"\",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var n=i.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(n!==l)throw new Error(s[n]);if(e.header&&i.deflateSetHeader(this.strm,e.header),e.dictionary){var d;if(d=\"string\"==typeof e.dictionary?o.string2buf(e.dictionary):\"[object ArrayBuffer]\"===u.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,(n=i.deflateSetDictionary(this.strm,d))!==l)throw new Error(s[n]);this._dict_set=!0}}function d(t,e){var n=new f(e);if(n.push(t,!0),n.err)throw n.msg||s[n.err];return n.result}f.prototype.push=function(t,e){var n,s,a=this.strm,c=this.options.chunkSize;if(this.ended)return!1;s=e===~~e?e:!0===e?4:0,\"string\"==typeof t?a.input=o.string2buf(t):\"[object ArrayBuffer]\"===u.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new r.Buf8(c),a.next_out=0,a.avail_out=c),1!==(n=i.deflate(a,s))&&n!==l)return this.onEnd(n),this.ended=!0,!1;0!==a.avail_out&&(0!==a.avail_in||4!==s&&2!==s)||(\"string\"===this.options.to?this.onData(o.buf2binstring(r.shrinkBuf(a.output,a.next_out))):this.onData(r.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||0===a.avail_out)&&1!==n);return 4===s?(n=i.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===l):2!==s||(this.onEnd(l),a.avail_out=0,!0)},f.prototype.onData=function(t){this.chunks.push(t)},f.prototype.onEnd=function(t){t===l&&(\"string\"===this.options.to?this.result=this.chunks.join(\"\"):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Deflate=f,e.deflate=d,e.deflateRaw=function(t,e){return(e=e||{}).raw=!0,d(t,e)},e.gzip=function(t,e){return(e=e||{}).gzip=!0,d(t,e)}},function(t,e,n){\"use strict\";var i={};(0,n(22).assign)(i,n(179),n(176),n(93)),t.exports=i},function(t,e,n){\"use strict\";var i=\"undefined\"!=typeof Uint8Array&&\"undefined\"!=typeof Uint16Array&&\"undefined\"!=typeof Uint32Array,r=n(180),o=n(9),s=n(15),a=i?\"uint8array\":\"array\";function u(t,e){s.call(this,\"FlateWorker/\"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}e.magic=\"\\b\\0\",o.inherits(u,s),u.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(a,t.data),!1)},u.prototype.flush=function(){s.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new r[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},e.compressWorker=function(t){return new u(\"Deflate\",t)},e.uncompressWorker=function(){return new u(\"Inflate\",{})}},function(t,e,n){\"use strict\";var i=n(98),r=n(171);e.generateWorker=function(t,e,n){var o=new r(e.streamFiles,n,e.platform,e.encodeFileName),s=0;try{t.forEach(function(t,n){s++;var r=function(t,e){var n=t||e,r=i[n];if(!r)throw new Error(n+\" is not a valid compression method !\");return r}(n.options.compression,e.compression),a=n.options.compressionOptions||e.compressionOptions||{},u=n.dir,l=n.date;n._compressWorker(r,a).withStreamInfo(\"file\",{name:t,dir:u,date:l,comment:n.comment||\"\",unixPermissions:n.unixPermissions,dosPermissions:n.dosPermissions}).pipe(o)}),o.entriesCount=s}catch(t){o.error(t)}return o}},function(t,e,n){\"use strict\";var i=n(103),r=n(101),o=n(28),s=n(67),a=n(15),u=function(t,e,n){this.name=t,this.dir=n.dir,this.date=n.date,this.comment=n.comment,this.unixPermissions=n.unixPermissions,this.dosPermissions=n.dosPermissions,this._data=e,this._dataBinary=n.binary,this.options={compression:n.compression,compressionOptions:n.compressionOptions}};u.prototype={internalStream:function(t){var e=null,n=\"string\";try{if(!t)throw new Error(\"No output type specified.\");var r=\"string\"===(n=t.toLowerCase())||\"text\"===n;\"binarystring\"!==n&&\"text\"!==n||(n=\"string\"),e=this._decompressWorker();var s=!this._dataBinary;s&&!r&&(e=e.pipe(new o.Utf8EncodeWorker)),!s&&r&&(e=e.pipe(new o.Utf8DecodeWorker))}catch(t){(e=new a(\"error\")).error(t)}return new i(e,n,\"\")},async:function(t,e){return this.internalStream(t).accumulate(e)},nodeStream:function(t,e){return this.internalStream(t||\"nodebuffer\").toNodejsStream(e)},_compressWorker:function(t,e){if(this._data instanceof s&&this._data.compression.magic===t.magic)return this._data.getCompressedWorker();var n=this._decompressWorker();return this._dataBinary||(n=n.pipe(new o.Utf8EncodeWorker)),s.createWorkerFrom(n,t,e)},_decompressWorker:function(){return this._data instanceof s?this._data.getContentWorker():this._data instanceof a?this._data:new r(this._data)}};for(var l=[\"asText\",\"asBinary\",\"asNodeBuffer\",\"asUint8Array\",\"asArrayBuffer\"],c=function(){throw new Error(\"This method has been removed in JSZip 3.0, please check the upgrade guide.\")},h=0;h<l.length;h++)u.prototype[l[h]]=c;t.exports=u},function(t,e,n){\"use strict\";var i=n(114).Readable;function r(t,e,n){i.call(this,e),this._helper=t;var r=this;t.on(\"data\",function(t,e){r.push(t)||r._helper.pause(),n&&n(e)}).on(\"error\",function(t){r.emit(\"error\",t)}).on(\"end\",function(){r.push(null)})}n(9).inherits(r,i),r.prototype._read=function(){this._helper.resume()},t.exports=r},function(t,e,n){\"use strict\";var i=n(15),r=n(9);function o(t){i.call(this,\"ConvertWorker to \"+t),this.destType=t}r.inherits(o,i),o.prototype.processChunk=function(t){this.push({data:r.transformTo(this.destType,t.data),meta:t.meta})},t.exports=o},function(t,e,n){\"use strict\";(function(e){var n,i,r=e.MutationObserver||e.WebKitMutationObserver;if(r){var o=0,s=new r(c),a=e.document.createTextNode(\"\");s.observe(a,{characterData:!0}),n=function(){a.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)n=\"document\"in e&&\"onreadystatechange\"in e.document.createElement(\"script\")?function(){var t=e.document.createElement(\"script\");t.onreadystatechange=function(){c(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(c,0)};else{var u=new e.MessageChannel;u.port1.onmessage=c,n=function(){u.port2.postMessage(0)}}var l=[];function c(){var t,e;i=!0;for(var n=l.length;n;){for(e=l,l=[],t=-1;++t<n;)e[t]();n=l.length}i=!1}t.exports=function(t){1!==l.push(t)||i||n()}}).call(this,n(21))},function(t,e,n){\"use strict\";var i=n(186);function r(){}var o={},s=[\"REJECTED\"],a=[\"FULFILLED\"],u=[\"PENDING\"];function l(t){if(\"function\"!=typeof t)throw new TypeError(\"resolver must be a function\");this.state=u,this.queue=[],this.outcome=void 0,t!==r&&f(this,t)}function c(t,e,n){this.promise=t,\"function\"==typeof e&&(this.onFulfilled=e,this.callFulfilled=this.otherCallFulfilled),\"function\"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function h(t,e,n){i(function(){var i;try{i=e(n)}catch(e){return o.reject(t,e)}i===t?o.reject(t,new TypeError(\"Cannot resolve promise with itself\")):o.resolve(t,i)})}function p(t){var e=t&&t.then;if(t&&(\"object\"==typeof t||\"function\"==typeof t)&&\"function\"==typeof e)return function(){e.apply(t,arguments)}}function f(t,e){var n=!1;function i(e){n||(n=!0,o.reject(t,e))}function r(e){n||(n=!0,o.resolve(t,e))}var s=d(function(){e(r,i)});\"error\"===s.status&&i(s.value)}function d(t,e){var n={};try{n.value=t(e),n.status=\"success\"}catch(t){n.status=\"error\",n.value=t}return n}t.exports=l,l.prototype.catch=function(t){return this.then(null,t)},l.prototype.then=function(t,e){if(\"function\"!=typeof t&&this.state===a||\"function\"!=typeof e&&this.state===s)return this;var n=new this.constructor(r);this.state!==u?h(n,this.state===a?t:e,this.outcome):this.queue.push(new c(n,t,e));return n},c.prototype.callFulfilled=function(t){o.resolve(this.promise,t)},c.prototype.otherCallFulfilled=function(t){h(this.promise,this.onFulfilled,t)},c.prototype.callRejected=function(t){o.reject(this.promise,t)},c.prototype.otherCallRejected=function(t){h(this.promise,this.onRejected,t)},o.resolve=function(t,e){var n=d(p,e);if(\"error\"===n.status)return o.reject(t,n.value);var i=n.value;if(i)f(t,i);else{t.state=a,t.outcome=e;for(var r=-1,s=t.queue.length;++r<s;)t.queue[r].callFulfilled(e)}return t},o.reject=function(t,e){t.state=s,t.outcome=e;for(var n=-1,i=t.queue.length;++n<i;)t.queue[n].callRejected(e);return t},l.resolve=function(t){if(t instanceof this)return t;return o.resolve(new this(r),t)},l.reject=function(t){var e=new this(r);return o.reject(e,t)},l.all=function(t){var e=this;if(\"[object Array]\"!==Object.prototype.toString.call(t))return this.reject(new TypeError(\"must be an array\"));var n=t.length,i=!1;if(!n)return this.resolve([]);var s=new Array(n),a=0,u=-1,l=new this(r);for(;++u<n;)c(t[u],u);return l;function c(t,r){e.resolve(t).then(function(t){s[r]=t,++a!==n||i||(i=!0,o.resolve(l,s))},function(t){i||(i=!0,o.reject(l,t))})}},l.race=function(t){var e=this;if(\"[object Array]\"!==Object.prototype.toString.call(t))return this.reject(new TypeError(\"must be an array\"));var n=t.length,i=!1;if(!n)return this.resolve([]);var s=-1,a=new this(r);for(;++s<n;)u=t[s],e.resolve(u).then(function(t){i||(i=!0,o.resolve(a,t))},function(t){i||(i=!0,o.reject(a,t))});var u;return a}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){t.exports=n(53).document&&document.documentElement},function(t,e){t.exports=function(t,e,n){var i=void 0===n;switch(e.length){case 0:return i?t():t.call(n);case 1:return i?t(e[0]):t.call(n,e[0]);case 2:return i?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return i?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return i?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var i,r,o,s=n(106),a=n(190),u=n(189),l=n(104),c=n(53),h=c.process,p=c.setImmediate,f=c.clearImmediate,d=c.MessageChannel,y=0,m={},_=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},v=function(t){_.call(t.data)};p&&f||(p=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return m[++y]=function(){a(\"function\"==typeof t?t:Function(t),e)},i(y),y},f=function(t){delete m[t]},\"process\"==n(188)(h)?i=function(t){h.nextTick(s(_,t,1))}:d?(o=(r=new d).port2,r.port1.onmessage=v,i=s(o.postMessage,o,1)):c.addEventListener&&\"function\"==typeof postMessage&&!c.importScripts?(i=function(t){c.postMessage(t+\"\",\"*\")},c.addEventListener(\"message\",v,!1)):i=\"onreadystatechange\"in l(\"script\")?function(t){u.appendChild(l(\"script\")).onreadystatechange=function(){u.removeChild(this),_.call(t)}}:function(t){setTimeout(s(_,t,1),0)}),t.exports={set:p,clear:f}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var i=n(69);t.exports=function(t,e){if(!i(t))return t;var n,r;if(e&&\"function\"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if(\"function\"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&\"function\"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError(\"Can't convert object to primitive value\")}},function(t,e,n){t.exports=!n(68)&&!n(105)(function(){return 7!=Object.defineProperty(n(104)(\"div\"),\"a\",{get:function(){return 7}}).a})},function(t,e,n){var i=n(69);t.exports=function(t){if(!i(t))throw TypeError(t+\" is not an object!\");return t}},function(t,e,n){var i=n(195),r=n(194),o=n(193),s=Object.defineProperty;e.f=n(68)?Object.defineProperty:function(t,e,n){if(i(t),e=o(e,!0),i(n),r)try{return s(t,e,n)}catch(t){}if(\"get\"in n||\"set\"in n)throw TypeError(\"Accessors not supported!\");return\"value\"in n&&(t[e]=n.value),t}},function(t,e,n){var i=n(196),r=n(192);t.exports=n(68)?function(t,e,n){return i.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){t.exports=function(t){if(\"function\"!=typeof t)throw TypeError(t+\" is not a function!\");return t}},function(t,e,n){var i=n(53),r=n(107),o=n(106),s=n(197),a=function(t,e,n){var u,l,c,h=t&a.F,p=t&a.G,f=t&a.S,d=t&a.P,y=t&a.B,m=t&a.W,_=p?r:r[e]||(r[e]={}),v=_.prototype,g=p?i:f?i[e]:(i[e]||{}).prototype;for(u in p&&(n=e),n)(l=!h&&g&&void 0!==g[u])&&u in _||(c=l?g[u]:n[u],_[u]=p&&\"function\"!=typeof g[u]?n[u]:y&&l?o(c,i):m&&g[u]==c?function(t){var e=function(e,n,i){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(c):d&&\"function\"==typeof c?o(Function.call,c):c,d&&((_.virtual||(_.virtual={}))[u]=c,t&a.R&&v&&!v[u]&&s(v,u,c)))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,e,n){var i=n(199),r=n(191);i(i.G+i.B,{setImmediate:r.set,clearImmediate:r.clear})},function(t,e,n){n(200),t.exports=n(107).setImmediate},function(t,e,n){t.exports=n(71).PassThrough},function(t,e,n){t.exports=n(71).Transform},function(t,e,n){t.exports=n(25)},function(t,e,n){t.exports=n(70)},function(t,e,n){\"use strict\";t.exports=o;var i=n(109),r=n(36);function o(t){if(!(this instanceof o))return new o(t);i.call(this,t)}r.inherits=n(27),r.inherits(o,i),o.prototype._transform=function(t,e,n){n(null,t)}},function(t,e,n){(function(e){function n(t){try{if(!e.localStorage)return!1}catch(t){return!1}var n=e.localStorage[t];return null!=n&&\"true\"===String(n).toLowerCase()}t.exports=function(t,e){if(n(\"noDeprecation\"))return t;var i=!1;return function(){if(!i){if(n(\"throwDeprecation\"))throw new Error(e);n(\"traceDeprecation\")?console.trace(e):console.warn(e),i=!0}return t.apply(this,arguments)}}}).call(this,n(21))},function(t,e,n){(function(t,e){!function(t,n){\"use strict\";if(!t.setImmediate){var i,r,o,s,a,u=1,l={},c=!1,h=t.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(t);p=p&&p.setTimeout?p:t,\"[object process]\"==={}.toString.call(t.process)?i=function(t){e.nextTick(function(){d(t)})}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage(\"\",\"*\"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){d(t.data)},i=function(t){o.port2.postMessage(t)}):h&&\"onreadystatechange\"in h.createElement(\"script\")?(r=h.documentElement,i=function(t){var e=h.createElement(\"script\");e.onreadystatechange=function(){d(t),e.onreadystatechange=null,r.removeChild(e),e=null},r.appendChild(e)}):i=function(t){setTimeout(d,0,t)}:(s=\"setImmediate$\"+Math.random()+\"$\",a=function(e){e.source===t&&\"string\"==typeof e.data&&0===e.data.indexOf(s)&&d(+e.data.slice(s.length))},t.addEventListener?t.addEventListener(\"message\",a,!1):t.attachEvent(\"onmessage\",a),i=function(e){t.postMessage(s+e,\"*\")}),p.setImmediate=function(t){\"function\"!=typeof t&&(t=new Function(\"\"+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var r={callback:t,args:e};return l[u]=r,i(u),u++},p.clearImmediate=f}function f(t){delete l[t]}function d(t){if(c)setTimeout(d,0,t);else{var e=l[t];if(e){c=!0;try{!function(t){var e=t.callback,i=t.args;switch(i.length){case 0:e();break;case 1:e(i[0]);break;case 2:e(i[0],i[1]);break;case 3:e(i[0],i[1],i[2]);break;default:e.apply(n,i)}}(e)}finally{f(t),c=!1}}}}}(\"undefined\"==typeof self?void 0===t?this:t:self)}).call(this,n(21),n(51))},function(t,e,n){(function(t){var i=void 0!==t&&t||\"undefined\"!=typeof self&&self||window,r=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(r.call(setTimeout,i,arguments),clearTimeout)},e.setInterval=function(){return new o(r.call(setInterval,i,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(i,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(208),e.setImmediate=\"undefined\"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate=\"undefined\"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(21))},function(t,e){},function(t,e,n){\"use strict\";var i=n(55).Buffer,r=n(210);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return\"\";for(var e=this.head,n=\"\"+e.data;e=e.next;)n+=t+e.data;return n},t.prototype.concat=function(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var e,n,r,o=i.allocUnsafe(t>>>0),s=this.head,a=0;s;)e=s.data,n=o,r=a,e.copy(n,r),a+=s.data.length,s=s.next;return o},t}(),r&&r.inspect&&r.inspect.custom&&(t.exports.prototype[r.inspect.custom]=function(){var t=r.inspect({length:this.length});return this.constructor.name+\" \"+t})},function(t,e){},function(t,e,n){t.exports=r;var i=n(72).EventEmitter;function r(){i.call(this)}n(27)(r,i),r.Readable=n(71),r.Writable=n(205),r.Duplex=n(204),r.Transform=n(203),r.PassThrough=n(202),r.Stream=r,r.prototype.pipe=function(t,e){var n=this;function r(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on(\"data\",r),t.on(\"drain\",o),t._isStdio||e&&!1===e.end||(n.on(\"end\",a),n.on(\"close\",u));var s=!1;function a(){s||(s=!0,t.end())}function u(){s||(s=!0,\"function\"==typeof t.destroy&&t.destroy())}function l(t){if(c(),0===i.listenerCount(this,\"error\"))throw t}function c(){n.removeListener(\"data\",r),t.removeListener(\"drain\",o),n.removeListener(\"end\",a),n.removeListener(\"close\",u),n.removeListener(\"error\",l),t.removeListener(\"error\",l),n.removeListener(\"end\",c),n.removeListener(\"close\",c),t.removeListener(\"close\",c)}return n.on(\"error\",l),t.on(\"error\",l),n.on(\"end\",c),n.on(\"close\",c),t.on(\"close\",c),t.emit(\"pipe\",n),t}},function(t,e){e.read=function(t,e,n,i,r){var o,s,a=8*r-i-1,u=(1<<a)-1,l=u>>1,c=-7,h=n?r-1:0,p=n?-1:1,f=t[e+h];for(h+=p,o=f&(1<<-c)-1,f>>=-c,c+=a;c>0;o=256*o+t[e+h],h+=p,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=i;c>0;s=256*s+t[e+h],h+=p,c-=8);if(0===o)o=1-l;else{if(o===u)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,i),o-=l}return(f?-1:1)*s*Math.pow(2,o-i)},e.write=function(t,e,n,i,r,o){var s,a,u,l=8*o-r-1,c=(1<<l)-1,h=c>>1,p=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,d=i?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?p/u:p*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(e*u-1)*Math.pow(2,r),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,r),s=0));r>=8;t[n+f]=255&a,f+=d,a/=256,r-=8);for(s=s<<r|a,l+=r;l>0;t[n+f]=255&s,f+=d,s/=256,l-=8);t[n+f-d]|=128*y}},function(t,e,n){\"use strict\";e.byteLength=function(t){var e=l(t),n=e[0],i=e[1];return 3*(n+i)/4-i},e.toByteArray=function(t){for(var e,n=l(t),i=n[0],s=n[1],a=new o(function(t,e,n){return 3*(e+n)/4-n}(0,i,s)),u=0,c=s>0?i-4:i,h=0;h<c;h+=4)e=r[t.charCodeAt(h)]<<18|r[t.charCodeAt(h+1)]<<12|r[t.charCodeAt(h+2)]<<6|r[t.charCodeAt(h+3)],a[u++]=e>>16&255,a[u++]=e>>8&255,a[u++]=255&e;2===s&&(e=r[t.charCodeAt(h)]<<2|r[t.charCodeAt(h+1)]>>4,a[u++]=255&e);1===s&&(e=r[t.charCodeAt(h)]<<10|r[t.charCodeAt(h+1)]<<4|r[t.charCodeAt(h+2)]>>2,a[u++]=e>>8&255,a[u++]=255&e);return a},e.fromByteArray=function(t){for(var e,n=t.length,r=n%3,o=[],s=0,a=n-r;s<a;s+=16383)o.push(c(t,s,s+16383>a?a:s+16383));1===r?(e=t[n-1],o.push(i[e>>2]+i[e<<4&63]+\"==\")):2===r&&(e=(t[n-2]<<8)+t[n-1],o.push(i[e>>10]+i[e>>4&63]+i[e<<2&63]+\"=\"));return o.join(\"\")};for(var i=[],r=[],o=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,s=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",a=0,u=s.length;a<u;++a)i[a]=s[a],r[s.charCodeAt(a)]=a;function l(t){var e=t.length;if(e%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var n=t.indexOf(\"=\");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function c(t,e,n){for(var r,o,s=[],a=e;a<n;a+=3)r=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(i[(o=r)>>18&63]+i[o>>12&63]+i[o>>6&63]+i[63&o]);return s.join(\"\")}r[\"-\".charCodeAt(0)]=62,r[\"_\".charCodeAt(0)]=63},function(t,e,n){\"use strict\";var i=n(28),r=n(9),o=n(15),s=n(103),a=n(102),u=n(67),l=n(183),c=n(182),h=n(54),p=n(170),f=function(t,e,n){var i,s=r.getTypeOf(e),c=r.extend(n||{},a);c.date=c.date||new Date,null!==c.compression&&(c.compression=c.compression.toUpperCase()),\"string\"==typeof c.unixPermissions&&(c.unixPermissions=parseInt(c.unixPermissions,8)),c.unixPermissions&&16384&c.unixPermissions&&(c.dir=!0),c.dosPermissions&&16&c.dosPermissions&&(c.dir=!0),c.dir&&(t=y(t)),c.createFolders&&(i=d(t))&&m.call(this,i,!0);var f=\"string\"===s&&!1===c.binary&&!1===c.base64;n&&void 0!==n.binary||(c.binary=!f),(e instanceof u&&0===e.uncompressedSize||c.dir||!e||0===e.length)&&(c.base64=!1,c.binary=!0,e=\"\",c.compression=\"STORE\",s=\"string\");var _=null;_=e instanceof u||e instanceof o?e:h.isNode&&h.isStream(e)?new p(t,e):r.prepareContent(t,e,c.binary,c.optimizedBinaryString,c.base64);var v=new l(t,_,c);this.files[t]=v},d=function(t){\"/\"===t.slice(-1)&&(t=t.substring(0,t.length-1));var e=t.lastIndexOf(\"/\");return e>0?t.substring(0,e):\"\"},y=function(t){return\"/\"!==t.slice(-1)&&(t+=\"/\"),t},m=function(t,e){return e=void 0!==e?e:a.createFolders,t=y(t),this.files[t]||f.call(this,t,null,{dir:!0,createFolders:e}),this.files[t]};function _(t){return\"[object RegExp]\"===Object.prototype.toString.call(t)}var v={load:function(){throw new Error(\"This method has been removed in JSZip 3.0, please check the upgrade guide.\")},forEach:function(t){var e,n,i;for(e in this.files)this.files.hasOwnProperty(e)&&(i=this.files[e],(n=e.slice(this.root.length,e.length))&&e.slice(0,this.root.length)===this.root&&t(n,i))},filter:function(t){var e=[];return this.forEach(function(n,i){t(n,i)&&e.push(i)}),e},file:function(t,e,n){if(1===arguments.length){if(_(t)){var i=t;return this.filter(function(t,e){return!e.dir&&i.test(t)})}var r=this.files[this.root+t];return r&&!r.dir?r:null}return t=this.root+t,f.call(this,t,e,n),this},folder:function(t){if(!t)return this;if(_(t))return this.filter(function(e,n){return n.dir&&t.test(e)});var e=this.root+t,n=m.call(this,e),i=this.clone();return i.root=n.name,i},remove:function(t){t=this.root+t;var e=this.files[t];if(e||(\"/\"!==t.slice(-1)&&(t+=\"/\"),e=this.files[t]),e&&!e.dir)delete this.files[t];else for(var n=this.filter(function(e,n){return n.name.slice(0,t.length)===t}),i=0;i<n.length;i++)delete this.files[n[i].name];return this},generate:function(t){throw new Error(\"This method has been removed in JSZip 3.0, please check the upgrade guide.\")},generateInternalStream:function(t){var e,n={};try{if((n=r.extend(t||{},{streamFiles:!1,compression:\"STORE\",compressionOptions:null,type:\"\",platform:\"DOS\",comment:null,mimeType:\"application/zip\",encodeFileName:i.utf8encode})).type=n.type.toLowerCase(),n.compression=n.compression.toUpperCase(),\"binarystring\"===n.type&&(n.type=\"string\"),!n.type)throw new Error(\"No output type specified.\");r.checkSupport(n.type),\"darwin\"!==n.platform&&\"freebsd\"!==n.platform&&\"linux\"!==n.platform&&\"sunos\"!==n.platform||(n.platform=\"UNIX\"),\"win32\"===n.platform&&(n.platform=\"DOS\");var a=n.comment||this.comment||\"\";e=c.generateWorker(this,n,a)}catch(t){(e=new o(\"error\")).error(t)}return new s(e,n.type||\"string\",n.mimeType)},generateAsync:function(t,e){return this.generateInternalStream(t).accumulate(e)},generateNodeStream:function(t,e){return(t=t||{}).type||(t.type=\"nodebuffer\"),this.generateInternalStream(t).toNodejsStream(e)}};t.exports=v},function(t,e,n){\"use strict\";function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error(\"The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.\");this.files={},this.comment=null,this.root=\"\",this.clone=function(){var t=new i;for(var e in this)\"function\"!=typeof this[e]&&(t[e]=this[e]);return t}}i.prototype=n(216),i.prototype.loadAsync=n(169),i.support=n(23),i.defaults=n(102),i.version=\"3.1.5\",i.loadAsync=function(t,e){return(new i).loadAsync(t,e)},i.external=n(35),t.exports=i},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.buildZip=e.renderFrames=e.loadPCM=e.loadBuffer=e.spectrum=e.FRAME_STEP=e.FRAME_LENGTH=void 0;var i=l(n(6)),r=l(n(48)),o=l(n(217)),s=n(164),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(128)),u=(l(n(127)),l(n(126)));n(163);function l(t){return t&&t.__esModule?t:{default:t}}var c=e.FRAME_LENGTH=32130,h=e.FRAME_STEP=Math.round(c/4),p=8,f=8;e.spectrum=u.default;var d=e.loadBuffer=function(t){return new Promise(function(e,n){var i=URL.createObjectURL(t),o=new r.default.Buffer(i,function(){URL.revokeObjectURL(i),e(o)},function(t){console.error(\"err\",t),n(t)})})},y=e.loadPCM=function(t){return new Promise(function(e,n){if(t.pcm)return e(t);d(t).then(function(i){var r=i._buffer.getChannelData(0),o=i._buffer.sampleRate;if(!r)return n();console.log(r.length,o),e({file:t,buffer:i,pcm:r,sr:o})})})};e.renderFrames=function(t,e){var n=e.frame_step,r=void 0===n?h:n,o=e.frame_start,s=void 0===o?0:o,a=e.max,u=void 0===a?12:a;return function(e){return new Promise(function(n,o){y(t).then(function(t){t.file,t.buffer;var o=t.pcm,a=t.sr;e({type:i.default.wav2pix.load});for(var l=[],h=0,p=o.length-c,f=Math.round(p*s);f<p&&h<u;f+=r,h+=1)l.push(m(o.slice(f,f+c),a,h));e({type:i.default.wav2pix.finish,message:\"Rendered \"+h+\" images\"}),n({pcm:t,frames:l})})})}},e.buildZip=function(t,e,n){var r=n.frame_step,s=void 0===r?h:r,a=n.frame_start,u=void 0===a?0:a,l=n.max,p=void 0===l?1e4:l;return function(n){return new Promise(function(r,a){y(e).then(function(e){e.buffer;var a=e.pcm,l=e.sr;n({type:i.default.wav2pix.load});var h=new o.default,f=h.folder(\"wav2pix_\"+t),d=(a.length-c)/s;console.log(d);for(var y=0,_=a.length-c,v=Math.round(_*u);v<_&&y<p;v+=s,y+=1)y%10==0&&n({type:i.default.wav2pix.progress,progress:{i:y/p*6,n:6}}),m(a.slice(v,v+c),l,y,f);n({type:i.default.wav2pix.finish,message:\"Rendered \"+y+\" images\"}),h.generateAsync({type:\"blob\"}).then(function(e){n({type:i.default.wav2pix.zip,size:e.size}),r({zip:e,filename:\"wav2pix_\"+t+\".zip\",count:y})})})})}};function m(t,e,n,i){var r=u.default.toSpectrum(t,e),o=a.raw_spectrum(r,0,256,0,256,p,f),l=o.canvas,c=o.imageData;if(i){var h=(0,s.sprintf)(\"frame_%05d.png\",n),d=l.toDataURL(\"image/png\");i.file(h,d.split(\",\")[1],{base64:!0})}return{fft:r,canvas:l,imageData:c}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(1),s=n(2),a=n(3),u=_(n(33)),l=_(n(5)),c=m(n(74)),h=m(n(73)),p=n(13),f=m(n(59)),d=m(n(218)),y=m(n(129));_(n(57));function m(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function _(t){return t&&t.__esModule?t:{default:t}}var v=function(){return(0,u.default)().format(\"_YYYYMMDD_HHmm\")},g=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));n.state={file:null,pcm:null,name:\"\",datasetName:\"\",frames:[],frame_start:0,max:1e3,preview_count:32,frame_step:d.FRAME_STEP};var i=document.createElement(\"audio\");return i.addEventListener(\"loadedmetadata\",function(){var t=i.duration,e=Math.floor((44100*t-d.FRAME_LENGTH)/n.state.frame_step);n.setState({duration:t,max:Math.min(n.state.max,e,1e3)})}),n.audioElement=i,n}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.Component),r(e,[{key:\"pickFile\",value:function(t){var e=this,n=t.name.split(\".\")[0].replace(/\\s+/g,\"_\").replace(/-/g,\"_\").replace(/_+/g,\"_\");this.setState({file:t,name:n+v(),datasetName:n,pcm:\"\"},function(){e.rebuildFrames()}),this.audioElement.src=URL.createObjectURL(t)}},{key:\"rebuildFrames\",value:function(){var t=this,e=this.state,n=e.file,r=e.pcm,o=e.frame_step,s=e.frame_start,a=e.preview_count;this.props.wav2pix.renderFrames(r||n,{frame_start:s,frame_step:o,max:a}).then(function(e){console.log(\"got frames\",e.frames.length),t.setState(i({},t.state,{frames:e.frames,pcm:e.pcm}))})}},{key:\"buildZip\",value:function(){var t=this,e=this.state,n=e.pcm,i=e.file,r=e.max,o=e.frame_step,s=e.frame_start;this.props.wav2pix.buildZip(this.state.name,n||i,{frame_start:s,frame_step:o,max:r}).then(function(e){var n=e.zip,i=e.filename,s=e.count;t.props.datasetActions.uploadFile(t.props.module,t.props.folder,n,i,{count:s,max:r,frame_step:o,frame_size:d.FRAME_LENGTH/44100})})}},{key:\"playFrame\",value:function(t){var e=this;return function(){var n=e.state.frames[t];y.play(n)}}},{key:\"render\",value:function(){for(var t=this,e=this.state,n=e.file,i=(e.frames,[]),r=0,s=e.preview_count;r<s;r++)i.push((0,o.h)(\"canvas\",{key:r,onClick:this.playFrame(r)}));return(0,o.h)(\"div\",{className:\"row\"},(0,o.h)(\"div\",{className:\"col spectrogramBuilder\"},(0,o.h)(p.Group,{title:\"Spectrogram Builder\"},(0,o.h)(\"p\",null,\"Convert your sounds into spectrograms. \",\"Sound files can be WAV, MP3, AIFF, or FLAC. \"),(0,o.h)(p.FileUpload,{title:\"Choose a sound file\",accept:\"audio/*\",onUpload:function(e){return t.pickFile(e)}}),n&&this.renderMetadata(n))),(0,o.h)(\"div\",{ref:function(e){t.canvases=e},className:\"thumbs\",id:\"pix2wav_canvases\"},i))}},{key:\"renderMetadata\",value:function(t){var e=this,n=this.state,i=n.duration,r=(n.preview_count,l.default.hush_size(t.size)),s=Math.floor((44100*i-d.FRAME_LENGTH)/this.state.frame_step),a=Math.round(d.FRAME_LENGTH/44100*1e3)+\" ms.\",c=Math.round(this.state.frame_step/44100*1e3)+\" ms.\";return(0,o.h)(\"div\",{className:\"fileMetadata\"},(0,o.h)(p.Group,{title:\"Metadata\"},(0,o.h)(p.Param,{title:\"Name\"},t.name),(0,o.h)(p.Param,{title:\"Type\"},t.type),(0,o.h)(p.Param,{title:\"Size\"},(0,o.h)(\"span\",{className:r[0]},r[1])),(0,o.h)(p.Param,{title:\"Date\"},(0,u.default)(t.lastModifiedDate).format(\"YYYY-MM-DD h:mm a\")),(0,o.h)(p.Param,{title:\"Duration\"},Math.floor(i)+\" s.\"),(0,o.h)(\"br\",null),(0,o.h)(p.Param,{title:\"Frames\"},s),(0,o.h)(p.Param,{title:\"Frame Size\"},a),(0,o.h)(p.Param,{title:\"Frame Step\"},c),(0,o.h)(p.Param,{title:\"FFT Size\"},d.spectrum.fft_size),(0,o.h)(\"br\",null),(0,o.h)(p.Param,{title:\"Status\"},this.props.pix2wav.status),(0,o.h)(\"br\",null)),(0,o.h)(p.Group,{title:\"Data settings\"},(0,o.h)(p.TextInput,{title:\"Dataset name\",onChange:function(t){return e.setState({name:t.target.value})},value:this.state.name}),(0,o.h)(p.Slider,{name:\"Starting Frame\",min:0,max:1,type:\"float\",value:this.state.frame_start,defaultValue:0,onChange:function(t){e.setState({frame_start:t},function(){e.rebuildFrames()})}}),(0,o.h)(p.Slider,{name:\"No. Frames\",min:10,max:Math.min(s,1e3),type:\"int\",value:this.state.max,defaultValue:Math.min(s,300),onChange:function(t){return e.setState({max:t})}}),(0,o.h)(p.Slider,{name:\"Frame step\",min:10,max:2e4,type:\"int\",value:this.state.frame_step,defaultValue:d.FRAME_STEP,onChange:function(t){var n=Math.floor((44100*i-d.FRAME_LENGTH)/t);e.setState({name:e.state.datasetName+\"_step_\"+t+v(),frame_step:t,max:Math.min(e.state.max,n)},function(){e.rebuildFrames()})}}),(0,o.h)(p.Button,{onClick:function(){return e.buildZip()}},\"Upload Frames\")),(0,o.h)(p.Progress,null))}},{key:\"componentDidUpdate\",value:function(){var t=this;(this.state.frames||[]).map(function(e,n){var i=t.canvases.children[n],r=i.getContext(\"2d-lodpi\");i.width=e.canvas.width,i.height=e.canvas.height,r.drawImage(e.canvas,0,0)})}}]),e}();e.default=(0,a.connect)(function(t){return{pix2wav:t.module.pix2wav,upload:t.upload}},function(t,e){return{datasetActions:(0,s.bindActionCreators)(f,t),actions:(0,s.bindActionCreators)(c,t),remote:(0,s.bindActionCreators)(h,t),wav2pix:(0,s.bindActionCreators)(d,t)}})(g)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),s=n(3),a=(y(n(5)),d(n(74))),u=d(n(73)),l=y(n(18)),c=(y(n(42)),y(n(30)),y(n(40))),h=(n(26),y(n(219))),p=y(n(29)),f=y(n(57));function d(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function y(t){return t&&t.__esModule?t:{default:t}}var m=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.datasetActions=n.datasetActions.bind(n),n}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"componentWillMount\",value:function(){var t=this.props.match.params.id||localStorage.getItem(\"pix2wav.last_id\");console.log(\"load dataset:\",t);var e=this.props,n=(e.match,e.pix2wav),i=e.actions;\"new\"!==t&&(t?(parseInt(t)&&localStorage.setItem(\"pix2wav.last_id\",t),n.folder&&n.folder.id===t||i.load_directories(t)):this.props.history.push(\"/pix2wav/new/\"))}},{key:\"render\",value:function(){var t=this.props,e=t.pix2wav,n=(t.match,t.history),i=((e.data||{}).folderLookup||{})[e.folder_id]||{};return(0,r.h)(\"div\",{className:\"app pix2wav\"},(0,r.h)(\"div\",{class:\"heading\"},(0,r.h)(\"div\",{class:\"spaced\"},(0,r.h)(\"h1\",null,i?i.name:(0,r.h)(l.default,null)),(0,r.h)(c.default,null))),(0,r.h)(h.default,{loading:e.loading,progress:e.progress,id:e.folder_id,module:f.default,data:e.data,folder:i}),(0,r.h)(p.default,{loading:e.loading,progress:e.progress,id:e.folder_id,module:f.default,data:e.data,folder:i,history:n,onPickFile:function(t,e){e.preventDefault(),e.stopPropagation(),console.log(\"picked a file\",t)},datasetActions:this.datasetActions}))}},{key:\"datasetActions\",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(arguments.length>2&&void 0!==arguments[2]&&arguments[2],this.props),i=n.pix2wav,o=n.remote,s=i.data.fileLookup[t.input[0]];return s?s.name&&s.name.match(/(gif|jpe?g|png)$/i)?null:(0,r.h)(\"div\",null,(0,r.h)(\"div\",{class:\"actions\"},(0,r.h)(\"span\",{class:\"link\",onClick:function(){return o.train_task(t,i.folder_id,1)}},\"train\"),(0,r.h)(\"span\",{class:\"link\",onClick:function(){return o.train_task(t,i.folder_id,2)}},\"2x\"),(0,r.h)(\"span\",{class:\"link\",onClick:function(){return o.train_task(t,i.folder_id,4)}},\"4x\"),(0,r.h)(\"span\",{class:\"link\",onClick:function(){return o.train_task(t,i.folder_id,6)}},\"6x\"),(0,r.h)(\"span\",{class:\"link\",onClick:function(){return o.train_task(t,i.folder_id,18)}},\"18x\")),t.isBuilt?(0,r.h)(\"div\",{class:\"subtext\"},\"fetched \",(0,r.h)(\"span\",{class:\"link\",onClick:function(){return o.clear_cache_task(t)}},\"rm\")):e?(0,r.h)(\"div\",{class:\"subtext\"},\"fetching\"):(0,r.h)(\"div\",{class:\"subtext\"},(0,r.h)(\"span\",{class:\"link\",onClick:function(){return o.fetch_task(s.url,s.id,t.name)}},\"fetch\"))):null}}]),e}();e.default=(0,s.connect)(function(t){return{pix2wav:t.module.pix2wav}},function(t,e){return{actions:(0,o.bindActionCreators)(a,t),remote:(0,o.bindActionCreators)(u,t)}})(m)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.default=function(t){var e=t.history;return(0,i.h)(\"div\",{class:\"app pix2wav\"},(0,i.h)(r.default,{module:o.default,history:e}))};var i=n(1),r=s(n(30)),o=s(n(57));function s(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(10),s=h(n(8)),a=h(n(5)),u=h(n(221)),l=h(n(220)),c=h(n(161));function h(t){return t&&t.__esModule?t:{default:t}}var p=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t)}return i(t,[{key:\"componentWillMount\",value:function(){s.default.system.changeTool(\"pix2wav\"),document.body.style.backgroundImage=\"linear-gradient(\"+(a.default.randint(40)+40)+\"deg, #bdf, #def)\"}},{key:\"componentWillReceiveProps\",value:function(){s.default.system.changeTool(\"pix2wav\"),document.body.style.backgroundImage=\"linear-gradient(\"+(a.default.randint(40)+40)+\"deg, #bdf, #def)\"}},{key:\"render\",value:function(){return(0,r.h)(\"section\",null,(0,r.h)(o.Route,{exact:!0,path:\"/pix2wav/new/\",component:u.default}),(0,r.h)(o.Route,{exact:!0,path:\"/pix2wav/datasets/\",component:l.default}),(0,r.h)(o.Route,{exact:!0,path:\"/pix2wav/datasets/:id/\",component:l.default}),(0,r.h)(o.Route,{exact:!0,path:\"/pix2wav/live/\",component:c.default}))}}]),t}();e.default={name:\"pix2wav\",router:p,links:function(){return[{url:\"/pix2wav/new/\",name:\"new\"},{url:\"/pix2wav/datasets/\",name:\"datasets\"},{url:\"/pix2wav/live/\",name:\"live\"}]}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),a=n(3),u=n(13),l=n(49),c=d(n(20)),h=d(n(44)),p=d(n(58)),f=d(n(39));function d(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var y=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.actions.pix2pixhd.load_directories(),t.actions.live.get_params(),n.changeCheckpoint=n.changeCheckpoint.bind(n),n.changeEpoch=n.changeEpoch.bind(n),n.changeSequence=n.changeSequence.bind(n),n.seek=n.seek.bind(n),n.togglePlaying=n.togglePlaying.bind(n),n.toggleRecording=n.toggleRecording.bind(n),n.handleKeydown=n.handleKeydown.bind(n),n}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"componentWillMount\",value:function(){document.addEventListener(\"keydown\",this.handleKeydown)}},{key:\"componentWillUnmount\",value:function(){document.removeEventListener(\"keydown\",this.handleKeydown)}},{key:\"componentWillUpdate\",value:function(t){t.opt.checkpoint_name&&t.opt.checkpoint_name!==this.props.opt.checkpoint_name&&(console.log(\"listing epochs\"),this.props.actions.live.list_epochs(\"pix2pixhd\",t.opt.checkpoint_name))}},{key:\"handleKeydown\",value:function(t){if(console.log(t.keyCode),!(t.altKey||t.ctrlKey||t.metaKey))switch(t.keyCode){case 27:t.preventDefault(),this.props.actions.live.set_fullscreen(!this.props.fullscreen)}}},{key:\"changeCheckpoint\",value:function(t,e){this.props.actions.live.load_epoch(e,\"latest\")}},{key:\"changeEpoch\",value:function(t,e){this.props.actions.live.load_epoch(this.props.opt.checkpoint_name,e)}},{key:\"changeSequence\",value:function(t,e){console.log(\"load sequence\",e),this.props.actions.live.load_sequence(e)}},{key:\"seek\",value:function(t){var e=Math.floor(t*(parseInt(this.props.frame.sequence_len)||1)+1);console.log(\"seek to frame\",t,e),this.props.actions.live.seek(e)}},{key:\"start\",value:function(){console.log(this.props.opt);var t=this.props.opt.sequence_name||this.props.pix2pixhd.data.sequences[0].name,e=this.props.opt.checkpoint_name||this.props.pix2pixhd.data.checkpoints[0].name;console.log(\"starting up!\",t,e),this.props.actions.tasks.live_task(t,e,{folder_id:this.props.pix2pixhd.data.resultsFolder.id})}},{key:\"interrupt\",value:function(){this.props.actions.queue.stop_task(\"gpu\")}},{key:\"togglePlaying\",value:function(){this.props.opt.processing?this.props.actions.live.pause():this.props.actions.live.play()}},{key:\"toggleRecording\",value:function(){this.props.opt.recording?((0,l.stopRecording)(),this.props.actions.live.pause()):(0,l.startRecording)()}},{key:\"render\",value:function(){var t=this;if(this.props.pix2pixhd.loading)return(0,r.h)(u.Loading,{progress:this.props.pix2pixhd.progress});var e=this.props.pix2pixhd.data,n=e.folderLookup,i=e.datasetLookup,o=e.sequences.reduce(function(t,e){return t[e.name]=!0,t},{}),s=Object.keys(n).map(function(e){var n=t.props.pix2pixhd.data.folderLookup[e];if(\"results\"!==n.name){var i=n.datasets.map(function(t){return o[t]?t:null}).filter(function(t){return!!t});return{name:n.name,options:i.sort()}}}).filter(function(t){return!!t&&!!t.options.length}).sort(function(t,e){return t.name.localeCompare(e.name)}),a=Object.keys(n).map(function(e){var n=t.props.pix2pixhd.data.folderLookup[e];if(\"results\"!==n.name){var r=n.datasets.map(function(t){return i[t].checkpoints.length?t:null}).filter(function(t){return!!t});return{name:n.name,options:r.sort()}}}).filter(function(t){return!!t&&!!t.options.length}).sort(function(t,e){return t.name.localeCompare(e.name)});return(0,r.h)(\"div\",{className:\"app live centered\"},(0,r.h)(u.Player,{width:424,height:256,fullscreen:this.props.fullscreen}),(0,r.h)(\"div\",{className:\"params row\"},(0,r.h)(\"div\",{className:\"column\"},(0,r.h)(u.ParamGroup,{title:\"Network\",noToggle:!0},(0,r.h)(u.Select,{live:!0,name:\"send_image\",title:\"view mode\",options:[\"a\",\"b\",\"sequence\",\"recursive\"],onChange:this.props.actions.live.set_param}),(0,r.h)(u.SelectGroup,{live:!0,name:\"sequence_name\",title:\"sequence\",options:s,onChange:this.changeSequence}),(0,r.h)(u.SelectGroup,{live:!0,name:\"checkpoint_name\",title:\"checkpoint\",options:a,onChange:this.changeCheckpoint}),(0,r.h)(u.Select,{live:!0,name:\"epoch\",title:\"epoch\",options:this.props.epochs,onChange:this.changeEpoch})),(0,r.h)(\"div\",null,(0,r.h)(u.ParamGroup,{title:\"Playback\",name:\"sequence_playing\"},(0,r.h)(u.Slider,{name:\"position\",min:0,max:1,type:\"float\",value:(this.props.frame.sequence_i||0)/(this.props.frame.sequence_len||1),onChange:this.seek}),(0,r.h)(u.Slider,{live:!0,title:\"playback rate\",name:\"sequence_step\",min:-4,max:4,type:\"float\"}),(0,r.h)(u.Slider,{live:!0,title:\"skip frames\",name:\"sequence_skip\",min:0,max:1e3,type:\"int\"}),(0,r.h)(u.Slider,{live:!0,title:\"fade sequence\",name:\"fade_sequence\",min:0,max:4,type:\"float\"}),(0,r.h)(u.Slider,{live:!0,name:\"frame_delay\",min:0,max:2,type:\"float\"}))),(0,r.h)(u.Group,null,this.renderRestartButton(),this.renderLiveButtons(),this.renderRecordButton(),(0,r.h)(\"p\",{class:\"last_message\"},this.props.last_message))),(0,r.h)(\"div\",{className:\"column\"},(0,r.h)(u.ParamGroup,{title:\"Transition\",name:\"transition\"},(0,r.h)(u.Slider,{live:!0,name:\"transition_period\",min:10,max:5e3,type:\"int\"}),(0,r.h)(u.Slider,{live:!0,name:\"transition_min\",min:.001,max:.2,type:\"float\"}),(0,r.h)(u.Slider,{live:!0,name:\"transition_max\",min:.1,max:1,type:\"float\"})),(0,r.h)(u.ParamGroup,{title:\"Recursion\",name:\"recursive\"},(0,r.h)(u.Slider,{live:!0,name:\"recursive_frac\",min:0,max:.5,type:\"float\"}),(0,r.h)(u.Slider,{live:!0,name:\"recurse_roll\",min:-64,max:64,type:\"int\"}),(0,r.h)(u.Slider,{live:!0,name:\"recurse_roll_axis\",min:0,max:1,type:\"int\"})),(0,r.h)(u.ParamGroup,{title:\"Sequence\",name:\"sequence\"},(0,r.h)(u.Slider,{live:!0,name:\"sequence_frac\",min:0,max:1,type:\"float\"}),(0,r.h)(u.Slider,{live:!0,name:\"process_frac\",min:0,max:1,type:\"float\"})),(0,r.h)(u.ParamGroup,{title:\"Transform\",name:\"transform\"},(0,r.h)(u.Slider,{live:!0,name:\"rotate\",min:-1,max:1,type:\"float\"}),(0,r.h)(u.Slider,{live:!0,name:\"scale\",min:.9,max:1.1,type:\"float\"}))),(0,r.h)(\"div\",{className:\"column\"},(0,r.h)(u.ParamGroup,{title:\"Clahe\",name:\"clahe\"},(0,r.h)(u.Slider,{live:!0,name:\"clip_limit\",min:1,max:4,type:\"float\"})),(0,r.h)(u.ParamGroup,{title:\"Posterize\",name:\"posterize\"},(0,r.h)(u.Slider,{live:!0,name:\"spatial_window\",min:2,max:128,type:\"int\"}),(0,r.h)(u.Slider,{live:!0,name:\"color_window\",min:2,max:128,type:\"int\"})),(0,r.h)(u.ParamGroup,{title:\"Blur\",name:\"blur\"},(0,r.h)(u.Slider,{live:!0,name:\"blur_radius\",min:3,max:7,type:\"odd\"}),(0,r.h)(u.Slider,{live:!0,name:\"blur_sigma\",min:0,max:2,type:\"float\"})),(0,r.h)(u.ParamGroup,{title:\"Canny Edge Detection\",name:\"canny\"},(0,r.h)(u.Slider,{live:!0,name:\"canny_lo\",min:10,max:200,type:\"int\"}),(0,r.h)(u.Slider,{live:!0,name:\"canny_hi\",min:10,max:200,type:\"int\"})),(0,r.h)(u.ParamGroup,{title:\"Hue / Saturation\",name:\"hsl\"},(0,r.h)(u.Slider,{live:!0,name:\"hue\",min:-127,max:127,type:\"int\"}),(0,r.h)(u.Slider,{live:!0,name:\"saturation\",min:-255,max:255,type:\"int\"}),(0,r.h)(u.Slider,{live:!0,name:\"luminosity\",min:-255,max:255,type:\"int\"})))))}},{key:\"renderRestartButton\",value:function(){var t=this;return\"IDLE\"===this.props.runner.gpu.status?(0,r.h)(u.Button,{title:\"GPU Idle\",onClick:function(){return t.start()}},\"Start\"):\"pix2pixhd\"!==this.props.runner.gpu.task.module?(0,r.h)(u.Button,{title:\"GPU Busy\",onClick:function(){return t.interrupt()}},\"Interrupt\"):this.props.opt.processing?(0,r.h)(\"div\",null,(0,r.h)(u.Button,{title:\"Processing\",onClick:this.togglePlaying},\"Stop\"),(0,r.h)(u.Button,{title:\"GPU Busy\",onClick:function(){return t.interrupt()}},\"Interrupt\")):(0,r.h)(\"div\",null,(0,r.h)(u.Button,{title:\"Not processing\",onClick:this.togglePlaying},\"Restart\"),(0,r.h)(u.Button,{title:\"GPU Busy\",onClick:function(){return t.interrupt()}},\"Interrupt\"))}},{key:\"renderRecordButton\",value:function(){return null}},{key:\"renderLiveButtons\",value:function(){var t=this;return(0,r.h)(\"div\",null,(0,r.h)(u.Button,{title:\"Save frame\",onClick:l.saveFrame},\"Save\"),(0,r.h)(u.ParamGroup,{title:\"Record video\",name:\"store_b\",noDim:!0,onToggle:function(t){}},(0,r.h)(u.TextInput,{title:\"Video name\",name:\"final_tag\",value:this.props.opt.final_tag,onSave:function(e){t.props.actions.live.set_param(\"final_tag\",e)}})))}}]),e}();e.default=(0,a.connect)(function(t){return{last_message:t.live.last_message,fullscreen:t.live.fullscreen,opt:t.live.opt,frame:t.live.frame,checkpoints:t.live.checkpoints,epochs:t.live.epochs,sequences:t.live.sequences,runner:t.system.runner,pix2pixhd:t.module.pix2pixhd}},function(t,e){return{actions:{live:(0,o.bindActionCreators)(c,t),queue:(0,o.bindActionCreators)(h,t),pix2pixhd:(0,o.bindActionCreators)(f,t),tasks:(0,o.bindActionCreators)(p,t),s:s}}})(y)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(1),s=n(2),a=n(3),u=(p(n(5)),h(n(39))),l=h(n(58)),c=n(13);p(n(42)),p(n(30)),p(n(40)),p(n(29)),p(n(38));function h(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function p(t){return t&&t.__esModule?t:{default:t}}var f=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.handleChange=n.handleChange.bind(n),n.state={checkpoint_name:\"PLACEHOLDER\",epoch:\"latest\",augment_name:\"\",augment_take:100,augment_make:20},n}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.Component),r(e,[{key:\"componentWillMount\",value:function(){var t=this.props.match.params.id||localStorage.getItem(\"pix2pixhd.last_id\");console.log(\"load dataset:\",t);var e=this.props,n=(e.match,e.pix2pixhd),i=e.actions;\"new\"!==t&&(t?(parseInt(t)&&localStorage.setItem(\"pix2pixhd.last_id\",t),n.folder&&n.folder.id===t||i.load_directories(t)):this.props.history.push(\"/pix2pixhd/new/\"))}},{key:\"componentDidUpdate\",value:function(t,e){e.checkpoint_name!==this.state.checkpoint_name&&(this.setState({epoch:\"latest\"}),this.props.actions.list_epochs(this.state.checkpoint_name),this.props.actions.count_dataset(this.state.checkpoint_name))}},{key:\"handleChange\",value:function(t,e){console.log(\"name\",t,\"value\",e),this.setState(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},t,e))}},{key:\"interrupt\",value:function(){this.props.actions.queue.stop_task(\"gpu\")}},{key:\"render\",value:function(){var t=this;if(this.props.pix2pixhd.loading)return(0,o.h)(c.Loading,{progress:this.props.pix2pixhd.progress});var e=this.props,n=e.pix2pixhd,r=(e.match,e.history,e.queue),s=n.data||{},a=s.folderLookup,u=s.datasetLookup,l=((a||{})[n.folder_id],Object.keys(a).map(function(e){var n=t.props.pix2pixhd.data.folderLookup[e];if(\"results\"!==n.name){var i=n.datasets.map(function(t){return u[t].checkpoints.length?t:null}).filter(function(t){return!!t});return{name:n.name,options:i.sort()}}}).filter(function(t){return!!t&&!!t.options.length}).sort(function(t,e){return t.name.localeCompare(e.name)}));return(0,o.h)(\"div\",{className:\"app pix2pixhd\"},(0,o.h)(\"div\",{className:\"heading\"},(0,o.h)(\"h1\",null,\"pix2pixhd training\")),(0,o.h)(\"div\",{className:\"columns\"},(0,o.h)(\"div\",{className:\"column\"},(0,o.h)(c.Group,{title:\"Dataset\"},(0,o.h)(c.SelectGroup,{name:\"checkpoint_name\",title:\"Dataset\",options:l,onChange:this.handleChange,placeholder:\"Pick a dataset\",value:this.state.checkpoint_name}),(0,o.h)(c.Select,{title:\"Epoch\",name:\"epoch\",options:this.props.pix2pixhd.data.epochs,onChange:this.handleChange,value:this.state.epoch})),(0,o.h)(c.Group,{title:\"Augment\"},(0,o.h)(c.NumberInput,{name:\"augment_take\",title:\"Pick N random frames\",value:this.state.augment_take,onChange:this.handleChange,type:\"int\",min:\"1\",max:\"1000\"}),(0,o.h)(c.NumberInput,{name:\"augment_make\",title:\"Generate N recursively\",value:this.state.augment_make,onChange:this.handleChange,type:\"int\",min:\"1\",max:\"1000\"}),(0,o.h)(c.Button,{title:\"Augment dataset\",value:\"Augment\",onClick:function(){return t.props.remote.augment_task(t.state.checkpoint_name,t.state)}}),(0,o.h)(c.Button,{title:\"Make a movie without augmenting\",value:\"Generate\",onClick:function(){t.props.remote.augment_task(t.state.checkpoint_name,i({},t.state,{no_symlinks:!0,mov:!0,folder_id:t.props.pix2pixhd.data.resultsFolder.id}))}})),(0,o.h)(c.Group,{title:\"Augmentation Grid\"},(0,o.h)(c.AugmentationGrid,{checkpoint:this.props.pix2pixhd.checkpoint,take:[1,2,3,4,5,10,15,20,25,50,75,100,200,300,400,500,1e3],make:[1,2,3,4,5,10,15,20,25,50,75,100,200],onAugment:function(e,n){t.props.remote.augment_task(t.state.checkpoint_name,i({},t.state,{augment_take:e,augment_make:n}))},onTrain:function(){t.props.remote.train_task(t.state.checkpoint_name,n.folder_id,1),setTimeout(function(){t.props.remote.augment_task(t.state.checkpoint_name,i({},t.state,{augment_take:10,augment_make:150,no_symlinks:!0,mov:!0,folder_id:t.props.pix2pixhd.data.resultsFolder.id}))},250)}})),(0,o.h)(c.Group,{title:\"Status\"},(0,o.h)(c.Button,{title:\"GPU\",value:\"IDLE\"===this.props.runner.gpu.status?\"Idle\":\"Interrupt\",onClick:function(){return t.interrupt()}}),(0,o.h)(c.CurrentTask,null))),(0,o.h)(\"div\",{className:\"column\"},(0,o.h)(c.Group,{title:\"Upcoming Tasks\"},(0,o.h)(c.TaskList,{tasks:r.queue.map(function(t){return r.tasks[t]}),sort:\"date asc\"})))))}}]),e}();e.default=(0,a.connect)(function(t){return{pix2pixhd:t.module.pix2pixhd,runner:t.system.runner,queue:t.queue}},function(t,e){return{actions:(0,s.bindActionCreators)(u,t),remote:(0,s.bindActionCreators)(l,t)}})(f)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),s=(n(10),n(3)),a=(f(n(5)),f(n(8))),u=p(n(39)),l=p(n(58)),c=f(n(18)),h=n(26);function p(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function f(t){return t&&t.__esModule?t:{default:t}}var d=0,y=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.pix2pixhd.results||t.actions.load_results(),n}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"componentDidMount\",value:function(){d=0}},{key:\"render\",value:function(){var t=this;if(!this.props.pix2pixhd.results)return(0,r.h)(c.default,{progress:this.props.pix2pixhd.progress});var e=this.props.pix2pixhd.results,n=(e.resultsFolder,e.results),i=e.renders,o=e.files;return(0,r.h)(\"div\",{className:\"app pix2pixhd\"},(0,r.h)(\"div\",{className:\"heading row middle\"},(0,r.h)(\"h1\",null,\"Pix2PixHD Results\")),(0,r.h)(\"div\",{class:\"rows params renders\"},(0,r.h)(h.FileList,{linkFiles:!0,files:o,orderBy:\"date desc\",fields:\"name date size delete\",onDelete:function(t){(!(d<3)||confirm(\"Are you sure you want to delete this file?\"))&&(d+=1,console.log(\"delete: confirmed\"),a.default.file.destroy(t))}}),(0,r.h)(\"br\",null),(0,r.h)(\"h3\",null,\"renders on server\"),(0,r.h)(h.FileList,{files:i,orderBy:\"date desc\",fields:\"name date size\",onClick:function(e,n){n.preventDefault(),n.stopPropagation(),console.log(\"picked a result\",e),t.handlePick(e)}}),(0,r.h)(\"br\",null),(0,r.h)(\"h3\",null,\"folders on server\"),(0,r.h)(h.FileList,{files:n,orderBy:\"date desc\",fields:\"name date count\",onClick:function(e,n){n.preventDefault(),n.stopPropagation(),console.log(\"picked a result\",e),t.handlePick(e)}})))}},{key:\"handlePick\",value:function(t){}}]),e}();e.default=(0,s.connect)(function(t){return{pix2pixhd:t.module.pix2pixhd}},function(t,e){return{actions:(0,o.bindActionCreators)(u,t),remote:(0,o.bindActionCreators)(l,t)}})(y)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),s=n(3),a=(y(n(5)),d(n(39))),u=d(n(58)),l=n(13),c=y(n(42)),h=(y(n(30)),y(n(40))),p=y(n(29)),f=y(n(38));function d(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function y(t){return t&&t.__esModule?t:{default:t}}var m=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.datasetActions=n.datasetActions.bind(n),n}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"componentWillMount\",value:function(){var t=this.props.match.params.id||localStorage.getItem(\"pix2pixhd.last_id\");console.log(\"load dataset:\",t);var e=this.props,n=(e.match,e.pix2pixhd),i=e.actions;\"new\"!==t&&(t?(parseInt(t)&&localStorage.setItem(\"pix2pixhd.last_id\",t),n.folder&&n.folder.id===t||i.load_directories(t)):this.props.history.push(\"/pix2pixhd/new/\"))}},{key:\"render\",value:function(){var t=this.props,e=t.pix2pixhd,n=(t.match,t.history),i=((e.data||{}).folderLookup||{})[e.folder_id]||{};return(0,r.h)(\"div\",{className:\"app pix2pixhd\"},(0,r.h)(\"div\",{class:\"heading\"},(0,r.h)(\"div\",{class:\"spaced\"},(0,r.h)(\"h1\",null,i?i.name:(0,r.h)(l.Loading,null)),(0,r.h)(h.default,null))),(0,r.h)(\"div\",{className:\"row\"},i&&i.name&&\"unsorted\"!==i.name&&(0,r.h)(c.default,{title:\"Add Files\",module:f.default,folder:i,canUpload:!0,canAddURL:!0}),(0,r.h)(\"div\",null,(0,r.h)(h.default,null),(0,r.h)(l.CurrentTask,null))),(0,r.h)(p.default,{loading:e.loading,progress:e.progress,id:e.folder_id,module:f.default,data:e.data,folder:i,history:n,onPickFile:function(t,e){e.preventDefault(),e.stopPropagation(),console.log(\"picked a file\",t)},datasetActions:this.datasetActions}))}},{key:\"datasetActions\",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(arguments.length>2&&void 0!==arguments[2]&&arguments[2],this.props),i=n.pix2pixhd,o=n.remote,s=i.data.fileLookup[t.input[0]];return s?s.name&&s.name.match(/(gif|jpe?g|png)$/i)?null:(0,r.h)(\"div\",null,(0,r.h)(\"div\",{class:\"actions\"},(0,r.h)(\"span\",{class:\"link\",onClick:function(){return o.train_task(t,i.folder_id,1)}},\"train\"),(0,r.h)(\"span\",{class:\"link\",onClick:function(){return o.train_task(t,i.folder_id,5)}},\"5x\"),(0,r.h)(\"span\",{class:\"link\",onClick:function(){return o.train_task(t,i.folder_id,10)}},\"10x\"),(0,r.h)(\"span\",{class:\"link\",onClick:function(){return o.train_task(t,i.folder_id,20)}},\"20x\"),(0,r.h)(\"span\",{class:\"link\",onClick:function(){return o.train_task(t,i.folder_id,50)}},\"50x\")),t.isBuilt?(0,r.h)(\"div\",{class:\"subtext\"},\"fetched \",(0,r.h)(\"span\",{class:\"link\",onClick:function(){return o.clear_cache_task(t)}},\"rm\")):e?(0,r.h)(\"div\",{class:\"subtext\"},\"fetching\"):(0,r.h)(\"div\",{class:\"subtext\"},(0,r.h)(\"span\",{class:\"link\",onClick:function(){return o.fetch_task(s.url,s.id,t.name)}},\"fetch\"))):null}}]),e}();e.default=(0,s.connect)(function(t){return{pix2pixhd:t.module.pix2pixhd}},function(t,e){return{actions:(0,o.bindActionCreators)(a,t),remote:(0,o.bindActionCreators)(u,t)}})(m)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=n(1),r=n(2),o=n(3),s=(n(10),l(n(5)),n(13)),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(39)),u=l(n(38));function l(t){return t&&t.__esModule?t:{default:t}}e.default=(0,o.connect)(function(t){return{pix2pixhd:t.module.pix2pixhd}},function(t,e){return{actions:(0,r.bindActionCreators)(a,t)}})(function(t){return(0,i.h)(s.Views.New,{db:t.pix2pixhd,path:\"/pix2pixhd/sequences/\",actions:t.actions,module:u.default,history:t.history})})},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(10),s=f(n(8)),a=f(n(5)),u=f(n(227)),l=f(n(226)),c=f(n(225)),h=f(n(224)),p=f(n(223));function f(t){return t&&t.__esModule?t:{default:t}}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t)}return i(t,[{key:\"componentWillMount\",value:function(){s.default.system.changeTool(\"pix2pixhd\"),document.body.style.backgroundImage=\"linear-gradient(\"+(a.default.randint(40)+40)+\"deg, #def, #dfe)\"}},{key:\"componentWillReceiveProps\",value:function(){s.default.system.changeTool(\"pix2pixhd\"),document.body.style.backgroundImage=\"linear-gradient(\"+(a.default.randint(40)+40)+\"deg, #def, #dfe)\"}},{key:\"render\",value:function(){return(0,r.h)(\"section\",null,(0,r.h)(o.Route,{exact:!0,path:\"/pix2pixhd/new/\",component:u.default}),(0,r.h)(o.Route,{exact:!0,path:\"/pix2pixhd/sequences/\",component:l.default}),(0,r.h)(o.Route,{exact:!0,path:\"/pix2pixhd/sequences/:id/\",component:l.default}),(0,r.h)(o.Route,{exact:!0,path:\"/pix2pixhd/train/\",component:h.default}),(0,r.h)(o.Route,{exact:!0,path:\"/pix2pixhd/results/\",component:c.default}),(0,r.h)(o.Route,{exact:!0,path:\"/pix2pixhd/live/\",component:p.default}))}}]),t}();e.default={name:\"pix2pixhd\",router:d,links:function(){return[{url:\"/pix2pixhd/new/\",name:\"folders\"},{url:\"/pix2pixhd/sequences/\",name:\"sequences\"},{url:\"/pix2pixhd/train/\",name:\"checkpoints\"},{url:\"/pix2pixhd/results/\",name:\"results\"},{url:\"/pix2pixhd/live/\",name:\"live\"}]}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),a=n(3),u=n(13),l=n(49),c=d(n(20)),h=d(n(44)),p=d(n(116)),f=d(n(76));function d(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var y=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.actions.pix2pix.load_directories(),t.actions.live.get_params(),n.changeCheckpoint=n.changeCheckpoint.bind(n),n.changeEpoch=n.changeEpoch.bind(n),n.changeSequence=n.changeSequence.bind(n),n.seek=n.seek.bind(n),n.togglePlaying=n.togglePlaying.bind(n),n.toggleRecording=n.toggleRecording.bind(n),n}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"componentWillUpdate\",value:function(t){t.opt.checkpoint_name&&t.opt.checkpoint_name!==this.props.opt.checkpoint_name&&this.props.actions.live.list_epochs(\"pix2pix\",t.opt.checkpoint_name)}},{key:\"changeCheckpoint\",value:function(t,e){this.props.actions.live.load_epoch(e,\"latest\")}},{key:\"changeEpoch\",value:function(t,e){this.props.actions.live.load_epoch(this.props.opt.checkpoint_name,e)}},{key:\"changeSequence\",value:function(t,e){console.log(\"load sequence\",e),this.props.actions.live.load_sequence(e)}},{key:\"seek\",value:function(t){var e=Math.floor(t*(parseInt(this.props.frame.sequence_len)||1)+1);console.log(\"seek to frame\",t,e),this.props.actions.live.seek(e)}},{key:\"start\",value:function(){var t=this.props.pix2pix.data.sequences[0].name,e=this.props.pix2pix.data.checkpoints[0].name;console.log(\"starting up!\",t,e),this.props.actions.tasks.live_task(t,e)}},{key:\"interrupt\",value:function(){this.props.actions.queue.stop_task(\"gpu\")}},{key:\"togglePlaying\",value:function(){this.props.opt.processing?this.props.actions.live.pause():this.props.actions.live.play()}},{key:\"toggleRecording\",value:function(){this.props.opt.recording?((0,l.stopRecording)(),this.props.actions.live.pause()):(0,l.startRecording)()}},{key:\"render\",value:function(){return this.props.pix2pix.loading?(0,r.h)(u.Loading,null):(0,r.h)(\"div\",{className:\"app centered\"},(0,r.h)(u.Player,{width:424,height:256}),(0,r.h)(\"div\",{className:\"params row\"},(0,r.h)(\"div\",{className:\"column\"},(0,r.h)(u.ParamGroup,{title:\"Playback\",noToggle:!0},(0,r.h)(u.Select,{name:\"send_image\",title:\"view mode\",options:[\"a\",\"b\",\"sequence\",\"recursive\"],onChange:this.props.actions.live.set_param}),(0,r.h)(u.Select,{name:\"sequence_name\",title:\"sequence\",options:this.props.pix2pix.data.sequences.map(function(t){return t.name}),onChange:this.changeSequence}),(0,r.h)(u.Select,{name:\"checkpoint_name\",title:\"checkpoint\",options:this.props.pix2pix.data.checkpoints.map(function(t){return t.name}),onChange:this.changeCheckpoint}),(0,r.h)(u.Select,{name:\"epoch\",title:\"epoch\",options:this.props.epochs,onChange:this.changeEpoch}),(0,r.h)(u.Slider,{name:\"position\",min:0,max:1,type:\"float\",value:(this.props.frame.sequence_i||0)/(this.props.frame.sequence_len||1),onChange:this.seek}),(0,r.h)(u.Slider,{live:!0,name:\"frame_delay\",min:.05,max:2,type:\"float\"}),this.renderRestartButton(),(0,r.h)(u.Button,{title:this.props.opt.savingVideo?\"Saving video...\":this.props.opt.recording?\"Recording (\"+(t=this.props.opt.recordFrames/25,t.toFixed(1)+\" s.\")+\")\":\"Record video\",onClick:this.toggleRecording},this.props.opt.savingVideo?\"Saving\":this.props.opt.recording?\"Recording\":\"Record\"),(0,r.h)(u.Button,{title:\"Save frame\",onClick:l.saveFrame},\"Save\"),(0,r.h)(u.ParamGroup,{title:\"Render on server\",name:\"store_b\",onToggle:function(t){}}),(0,r.h)(\"p\",{class:\"last_message\"},this.props.last_message))),(0,r.h)(\"div\",{className:\"column\"},(0,r.h)(u.ParamGroup,{title:\"Transition\",name:\"transition\"},(0,r.h)(u.Slider,{live:!0,name:\"transition_period\",min:10,max:5e3,type:\"int\"}),(0,r.h)(u.Slider,{live:!0,name:\"transition_min\",min:.001,max:.2,type:\"float\"}),(0,r.h)(u.Slider,{live:!0,name:\"transition_max\",min:.1,max:1,type:\"float\"})),(0,r.h)(u.ParamGroup,{title:\"Recursion\",name:\"recursive\"},(0,r.h)(u.Slider,{live:!0,name:\"recursive_frac\",min:0,max:.5,type:\"float\"}),(0,r.h)(u.Slider,{live:!0,name:\"recurse_roll\",min:-64,max:64,type:\"int\"}),(0,r.h)(u.Slider,{live:!0,name:\"recurse_roll_axis\",min:0,max:1,type:\"int\"})),(0,r.h)(u.ParamGroup,{title:\"Sequence\",name:\"sequence\"},(0,r.h)(u.Slider,{live:!0,name:\"sequence_frac\",min:0,max:.5,type:\"float\"}),(0,r.h)(u.Slider,{live:!0,name:\"process_frac\",min:0,max:1,type:\"float\"}))),(0,r.h)(\"div\",{className:\"column\"},(0,r.h)(u.ParamGroup,{title:\"Clahe\",name:\"clahe\"},(0,r.h)(u.Slider,{live:!0,name:\"clip_limit\",min:1,max:4,type:\"float\"})),(0,r.h)(u.ParamGroup,{title:\"Posterize\",name:\"posterize\"},(0,r.h)(u.Slider,{live:!0,name:\"spatial_window\",min:2,max:128,type:\"int\"}),(0,r.h)(u.Slider,{live:!0,name:\"color_window\",min:2,max:128,type:\"int\"})),(0,r.h)(u.ParamGroup,{title:\"Blur\",name:\"blur\"},(0,r.h)(u.Slider,{live:!0,name:\"blur_radius\",min:3,max:7,type:\"odd\"}),(0,r.h)(u.Slider,{live:!0,name:\"blur_sigma\",min:0,max:2,type:\"float\"})),(0,r.h)(u.ParamGroup,{title:\"Canny Edge Detection\",name:\"canny\"},(0,r.h)(u.Slider,{live:!0,name:\"canny_lo\",min:10,max:200,type:\"int\"}),(0,r.h)(u.Slider,{live:!0,name:\"canny_hi\",min:10,max:200,type:\"int\"})))));var t}},{key:\"renderRestartButton\",value:function(){var t=this;return\"IDLE\"===this.props.runner.gpu.status?(0,r.h)(u.Button,{title:\"GPU Idle\",onClick:function(){return t.start()}},\"Start\"):\"pix2pix\"!==this.props.runner.gpu.task.module?(0,r.h)(u.Button,{title:\"GPU Busy\",onClick:function(){return t.interrupt()}},\"Interrupt\"):this.props.opt.processing?(0,r.h)(\"div\",null,(0,r.h)(u.Button,{title:\"Processing\",onClick:this.togglePlaying},\"Stop\"),(0,r.h)(u.Button,{title:\"GPU Busy\",onClick:function(){return t.interrupt()}},\"Interrupt\")):(0,r.h)(\"div\",null,(0,r.h)(u.Button,{title:\"Not processing\",onClick:this.togglePlaying},\"Restart\"),(0,r.h)(u.Button,{title:\"GPU Busy\",onClick:function(){return t.interrupt()}},\"Interrupt\"))}}]),e}();e.default=(0,a.connect)(function(t){return{last_message:t.live.last_message,opt:t.live.opt,frame:t.live.frame,checkpoints:t.live.checkpoints,epochs:t.live.epochs,sequences:t.live.sequences,runner:t.system.runner,pix2pix:t.module.pix2pix}},function(t,e){return{actions:{live:(0,o.bindActionCreators)(c,t),queue:(0,o.bindActionCreators)(h,t),pix2pix:(0,o.bindActionCreators)(f,t),tasks:(0,o.bindActionCreators)(p,t),s:s}}})(y)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),s=n(3),a=(y(n(5)),d(n(76))),u=d(n(116)),l=n(13),c=y(n(42)),h=(y(n(30)),y(n(40))),p=y(n(29)),f=y(n(75));function d(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function y(t){return t&&t.__esModule?t:{default:t}}var m=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.datasetActions=n.datasetActions.bind(n),n}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"componentWillMount\",value:function(){var t=this.props.match.params.id||localStorage.getItem(\"pix2pix.last_id\");console.log(\"load dataset:\",t);var e=this.props,n=(e.match,e.pix2pix),i=e.actions;\"new\"!==t&&(t?(parseInt(t)&&localStorage.setItem(\"pix2pix.last_id\",t),n.folder&&n.folder.id===t||i.load_directories(t)):this.props.history.push(\"/pix2pix/new/\"))}},{key:\"render\",value:function(){var t=this.props,e=t.pix2pix,n=(t.match,t.history),i=((e.data||{}).folderLookup||{})[e.folder_id]||{};return(0,r.h)(\"div\",{className:\"app pix2pix\"},(0,r.h)(\"div\",{class:\"heading\"},(0,r.h)(\"div\",{class:\"spaced\"},(0,r.h)(\"h1\",null,i?i.name:(0,r.h)(l.Loading,null)),(0,r.h)(h.default,null))),(0,r.h)(\"div\",{className:\"row\"},i&&i.name&&\"unsorted\"!==i.name&&(0,r.h)(c.default,{title:\"Add Files\",module:f.default,folder:i,canUpload:!0,canAddURL:!0}),(0,r.h)(\"div\",null,(0,r.h)(h.default,null),(0,r.h)(l.CurrentTask,null))),(0,r.h)(p.default,{loading:e.loading,progress:e.progress,id:e.folder_id,module:f.default,data:e.data,folder:i,history:n,onPickFile:function(t,e){e.preventDefault(),e.stopPropagation(),console.log(\"picked a file\",t)},datasetActions:this.datasetActions}))}},{key:\"datasetActions\",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(arguments.length>2&&void 0!==arguments[2]&&arguments[2],this.props),i=n.pix2pix,o=n.remote,s=i.data.fileLookup[t.input[0]];return s?s.name&&s.name.match(/(gif|jpe?g|png)$/i)?null:(console.log(t),(0,r.h)(\"div\",null,(0,r.h)(\"div\",{class:\"actions\"},(0,r.h)(\"span\",{class:\"link\",onClick:function(){return o.train_task(t,i.folder_id,1)}},\"train\"),(0,r.h)(\"span\",{class:\"link\",onClick:function(){return o.train_task(t,i.folder_id,5)}},\"5x\"),(0,r.h)(\"span\",{class:\"link\",onClick:function(){return o.train_task(t,i.folder_id,10)}},\"10x\"),(0,r.h)(\"span\",{class:\"link\",onClick:function(){return o.train_task(t,i.folder_id,20)}},\"20x\"),(0,r.h)(\"span\",{class:\"link\",onClick:function(){return o.train_task(t,i.folder_id,50)}},\"50x\")),t.isBuilt?(0,r.h)(\"div\",{class:\"subtext\"},\"fetched \",(0,r.h)(\"span\",{class:\"link\",onClick:function(){return o.clear_cache_task(t)}},\"rm\")):e?(0,r.h)(\"div\",{class:\"subtext\"},\"fetching\"):(0,r.h)(\"div\",{class:\"subtext\"},(0,r.h)(\"span\",{class:\"link\",onClick:function(){return o.fetch_task(s.url,s.id,t.name)}},\"fetch\")))):null}}]),e}();e.default=(0,s.connect)(function(t){return{pix2pix:t.module.pix2pix}},function(t,e){return{actions:(0,o.bindActionCreators)(a,t),remote:(0,o.bindActionCreators)(u,t)}})(m)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=n(1),r=n(2),o=n(3),s=(n(10),l(n(5)),n(13)),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(76)),u=l(n(75));function l(t){return t&&t.__esModule?t:{default:t}}e.default=(0,o.connect)(function(t){return{pix2pix:t.module.pix2pix}},function(t,e){return{actions:(0,r.bindActionCreators)(a,t)}})(function(t){return(0,i.h)(s.Views.New,{db:t.pix2pix,path:\"/pix2pix/sequences/\",actions:t.actions,module:u.default,history:t.history})})},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(10),s=h(n(8)),a=h(n(5)),u=h(n(231)),l=h(n(230)),c=h(n(229));function h(t){return t&&t.__esModule?t:{default:t}}var p=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t)}return i(t,[{key:\"componentWillMount\",value:function(){s.default.system.changeTool(\"pix2pix\"),document.body.style.backgroundImage=\"linear-gradient(\"+(a.default.randint(40)+40)+\"deg, #fde, #ffe)\"}},{key:\"componentWillReceiveProps\",value:function(){s.default.system.changeTool(\"pix2pix\"),document.body.style.backgroundImage=\"linear-gradient(\"+(a.default.randint(40)+40)+\"deg, #fde, #ffe)\"}},{key:\"render\",value:function(){return(0,r.h)(\"section\",null,(0,r.h)(o.Route,{exact:!0,path:\"/pix2pix/new/\",component:u.default}),(0,r.h)(o.Route,{exact:!0,path:\"/pix2pix/sequences/\",component:l.default}),(0,r.h)(o.Route,{exact:!0,path:\"/pix2pix/sequences/:id/\",component:l.default}),(0,r.h)(o.Route,{exact:!0,path:\"/pix2pix/live/\",component:c.default}))}}]),t}();e.default={name:\"pix2pix\",router:p,links:function(){return[{url:\"/pix2pix/new/\",name:\"new\"},{url:\"/pix2pix/sequences/\",name:\"sequences\"},{url:\"/pix2pix/live/\",name:\"live\"}]}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.morph_task=void 0;o(n(17)),o(n(14)),o(n(6));var i=o(n(8)),r=o(n(117));function o(t){return t&&t.__esModule?t:{default:t}}e.morph_task=function(t,e){return function(n){if(\"PLACEHOLDER\"!==t.a&&\"PLACEHOLDER\"!==t.b){var o={module:r.default.name,activity:\"morph\",dataset:t.a,folder_id:e.id,opt:t};return i.default.queue.add_task(o)}}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.load_data=void 0;var i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}}(),r=(l(n(17)),l(n(14)),l(n(6))),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(43)),s=l(n(8)),a=l(n(5)),u=l(n(117));function l(t){return t&&t.__esModule?t:{default:t}}e.load_data=function(t){return function(t){var e=u.default.name;a.default.allProgress([o.load(e),s.default.socket.list_sequences({module:\"pix2pixhd\",dir:\"sequences\"}),s.default.socket.list_directory({module:e,dir:\"renders\"})],function(e,n,i){console.log(\"morph load progress\",n,i),t({type:r.default.app.load_progress,progress:{i:n,n:i},data:{module:\"morph\"}})}).then(function(e){var n=i(e,3),o=n[0],s=n[1],a=n[2],u=(o.folderLookup,o.fileLookup,o.datasetLookup,o.folders,o.files),l=(o.unsortedFolder,o.resultsFolder);t({type:r.default.morph.load,data:o,app:{resultsFolder:l,files:u,sequences:s,renders:a}})})}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(2),s=(n(10),n(3)),a=(f(n(5)),f(n(8))),u=p(n(234)),l=p(n(233)),c=f(n(18)),h=n(13);function p(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function f(t){return t&&t.__esModule?t:{default:t}}var d=0,y=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n.state={dataset_module:\"pix2pixhd\",a:\"PLACEHOLDER\",b:\"PLACEHOLDER\",a_offset:0,a_duration:1,a_pos:0,b_offset:0,b_duration:1,b_pos:0,steps:16,dilate:2,frames:32,padding:3,smooth:!0,mode:\"mix\"},t.morph.data||t.actions.load_data(),n}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"componentDidMount\",value:function(){d=0}},{key:\"render\",value:function(){var t=this;if(!this.props.morph.app)return(0,r.h)(c.default,{progress:this.props.morph.progress});var e=this.props.morph.app,n=e.resultsFolder,i=e.sequences,o=e.renders,s=e.files,u=i.map(function(t){return[t.name.split(\"_\").slice(0,3).join(\" \")+\"~ (\"+t.count+\")\",t.name]}),l=i.reduce(function(t,e){return t[e.name]=e,t},{}),p=this.state.frames/25,f=void 0;return this.state.steps/this.state.dilate>64&&\"mix\"===this.state.mode&&(f=(0,r.h)(\"span\",null,(0,r.h)(\"br\",null),\"warning, this will take a while\")),(0,r.h)(\"div\",{className:\"app morph\"},(0,r.h)(\"div\",{className:\"heading row middle\"},(0,r.h)(\"h1\",null,\"Morph\")),(0,r.h)(\"div\",{class:\"rows params renders\"},(0,r.h)(\"div\",{class:\"column\"},(0,r.h)(h.Group,{title:\"From\"},(0,r.h)(h.Select,{title:\"Starting sequence\",placeholder:\"Please choose a video\",value:this.state.a,options:u,onChange:function(e,n){return t.setState({a:n,a_duration:l[n].count,a_pos:0,a_offset:0})}}),(0,r.h)(h.Slider,{title:\"Offset\",value:this.state.a_pos,min:0,max:1,step:.01,onChange:function(e){return t.setState({a_pos:e,a_offset:Math.floor(e*(t.state.a_duration-t.state.frames))})}})),(0,r.h)(h.Group,{title:\"To\"},(0,r.h)(h.Select,{title:\"Ending sequence\",placeholder:\"Please choose a video\",value:this.state.b,options:u,onChange:function(e,n){return t.setState({b:n,b_duration:l[n].count,b_pos:0,b_offset:0})}}),(0,r.h)(h.Slider,{title:\"Offset\",value:this.state.b_pos,min:0,max:1,step:.01,onChange:function(e){return t.setState({b_pos:e,b_offset:Math.floor(e*(t.state.b_duration-t.state.frames))})}})),(0,r.h)(h.Group,{title:\"Morph Settings\"},(0,r.h)(h.Select,{title:\"Mode\",value:this.state.mode,options:[\"mix\",\"average\",\"mix_images\"],onChange:function(e,n){return t.setState({mode:n})}}),(0,r.h)(h.Slider,{type:\"list\",title:\"Steps\",value:this.state.steps,options:[2,4,8,16,32,64,128,256,512,1024,2048,4096],onChange:function(e){return t.setState({steps:e,frames:e*t.state.dilate})}}),(0,r.h)(h.Slider,{type:\"list\",title:\"Dilate\",value:this.state.dilate,options:[1,2,4,8,16,32],onChange:function(e){return t.setState({dilate:e,frames:t.state.steps*e})}}),(0,r.h)(h.Checkbox,{title:\"Smooth\",value:this.state.smooth,onToggle:function(e){return t.setState({smooth:e})}}),(0,r.h)(h.Slider,{type:\"int\",title:\"Padding (in seconds)\",value:this.state.padding,min:0,max:30,step:1,onChange:function(e){return t.setState({padding:e})}}),(0,r.h)(h.Button,{title:\"Run task\",value:\"Morph!\",onClick:function(){return t.props.remote.morph_task(t.state,n)}}),(0,r.h)(\"br\",null),(0,r.h)(h.Param,{title:\"Total length\"},p.toFixed(1)+\" seconds\"),(0,r.h)(h.Param,{title:\"Total frames\"},this.state.frames+\" frames\"),f,(0,r.h)(\"br\",null),(0,r.h)(h.CurrentTask,null))),(0,r.h)(\"h3\",null,\"morphed videos\"),(0,r.h)(h.FileList,{linkFiles:!0,files:s,orderBy:\"date desc\",fields:\"name datetime size delete\",onDelete:function(t){(!(d<3)||confirm(\"Are you sure you want to delete this file?\"))&&(d+=1,console.log(\"delete: confirmed\"),a.default.file.destroy(t))}}),(0,r.h)(\"br\",null),(0,r.h)(\"h3\",null,\"renders on server\"),(0,r.h)(h.FileList,{files:o,orderBy:\"date desc\",fields:\"name datetime time size\",onClick:function(e,n){n.preventDefault(),n.stopPropagation(),console.log(\"picked a result\",e),t.handlePick(e)}})))}},{key:\"handlePick\",value:function(t){}}]),e}();e.default=(0,s.connect)(function(t){return{morph:t.module.morph}},function(t,e){return{actions:(0,o.bindActionCreators)(u,t),remote:(0,o.bindActionCreators)(l,t)}})(y)},function(t,e,n){var i,r,o;r=[e,t],void 0===(o=\"function\"==typeof(i=function(t,e){\"use strict\";var n={timeout:5e3,jsonpCallback:\"callback\",jsonpCallbackFunction:null};function i(t){try{delete window[t]}catch(e){window[t]=void 0}}function r(t){var e=document.getElementById(t);e&&document.getElementsByTagName(\"head\")[0].removeChild(e)}e.exports=function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],o=t,s=e.timeout||n.timeout,a=e.jsonpCallback||n.jsonpCallback,u=void 0;return new Promise(function(n,l){var c=e.jsonpCallbackFunction||\"jsonp_\"+Date.now()+\"_\"+Math.ceil(1e5*Math.random()),h=a+\"_\"+c;window[c]=function(t){n({ok:!0,json:function(){return Promise.resolve(t)}}),u&&clearTimeout(u),r(h),i(c)},o+=-1===o.indexOf(\"?\")?\"?\":\"&\";var p=document.createElement(\"script\");p.setAttribute(\"src\",\"\"+o+a+\"=\"+c),e.charset&&p.setAttribute(\"charset\",e.charset),p.id=h,document.getElementsByTagName(\"head\")[0].appendChild(p),u=setTimeout(function(){l(new Error(\"JSONP request to \"+t+\" timed out\")),i(c),r(h),window[c]=function(){i(c)}},s),p.onerror=function(){l(new Error(\"JSONP request to \"+t+\" failed\")),i(c),r(h),u&&clearTimeout(u)}})}})?i.apply(e,r):i)||(t.exports=o)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.tumblr=e.thumbnail=e.loadImage=e.tag=e.parse=e.lookup=e.integrations=void 0;var i=o(n(124)),r=o(n(236));function o(t){return t&&t.__esModule?t:{default:t}}var s=e.integrations=[{type:\"image\",regex:/\\.(jpeg|jpg|gif|png|svg)(\\?.*)?$/i,fetch:function(t,e){var n=new Image;n.onload=function(){if(n){var i=n.naturalWidth,r=n.naturalHeight;n=null,e({url:t,type:\"image\",token:\"\",thumbnail:\"\",title:\"\",width:i,height:r})}},n.src=t,n.complete&&n.onload()},tag:function(t){return'<img src=\"'+t.url+'\">'}},{type:\"video\",regex:/\\.(mp4|webm)(\\?.*)?$/i,fetch:function(t,e){var n=document.createElement(\"video\"),i=t.replace(/\\?.*$/,\"\").split(\"/\"),r=i[i.length-1];n.addEventListener(\"loadedmetadata\",function(){var i=n.videoWidth,o=n.videoHeight;n=null,e({url:t,type:\"video\",token:t,thumbnail:\"/public/assets/img/video-thumbnail.png\",title:r,width:i,height:o})}),n.src=t,n.load()},tag:function(t){return'<video src=\"'+t.url+'\">'}},{type:\"audio\",regex:/\\.(wav|mp3)(\\?.*)?$/i,fetch:function(t,e){var n=document.createElement(\"audio\"),i=t.replace(/\\?.*$/,\"\").split(\"/\"),r=i[i.length-1];n.addEventListener(\"loadedmetadata\",function(){var i=n.duration;n=null,e({url:t,type:\"audio\",token:t,thumbnail:\"/public/assets/img/audio-thumbnail.png\",title:r,duration:i})}),n.src=t,n.load()},tag:function(t){return'<audio src=\"'+t.url+'\">'}},{type:\"youtube\",regex:/(?:youtube\\.com\\/(?:[^\\/]+\\/.+\\/|(?:v|e(?:mbed)?)\\/|.*[?&]v=)|youtu\\.be\\/)([^\"&?\\/ ]{11})/i,fetch:function(t,e){var n=(t.match(/v=([-_a-zA-Z0-9]{11})/i)||t.match(/youtu.be\\/([-_a-zA-Z0-9]{11})/i)||t.match(/embed\\/([-_a-zA-Z0-9]{11})/i))[1].split(\"&\")[0],i=\"https://i.ytimg.com/vi/\"+n+\"/hqdefault.jpg\",o=new URL(\"https://www.googleapis.com/youtube/v3/videos\"),s={id:n,key:\"AIzaSyCaLRGY-hxs92045X-Jew7w1FgQPkStHgc\",part:\"id,contentDetails,snippet,status\"};Object.keys(s).forEach(function(t){return o.searchParams.append(t,s[t])}),(0,r.default)(o.toString()).then(function(t){return t.json()}).then(function(r){if(!r||!r.items.length)return alert(\"Sorry, this video URL is invalid.\");var o=r.items[0],s=o.contentDetails.duration.match(/\\d+/g).map(function(t){return parseInt(t)}),a=0;a=3==s.length?60*s[0]+60*s[1]+s[2]:2==s.length?60*s[0]+s[1]:s[0],[\"maxres\",\"high\",\"medium\",\"standard\",\"default\"].some(function(t){return!!o.snippet.thumbnails[t]&&(i=o.snippet.thumbnails[t].url,!0)}),e({url:t,type:\"youtube\",token:n,thumbnail:i,title:o.snippet.title,duration:a,width:640,height:360})})},tag:function(t){return'<div class=\"video\" style=\"width: '+t.width+\"px; height: \"+t.height+'px; overflow: hidden; position: relative;\"><iframe frameborder=\"0\" scrolling=\"no\" seamless=\"seamless\" webkitallowfullscreen=\"webkitAllowFullScreen\" mozallowfullscreen=\"mozallowfullscreen\" allowfullscreen=\"allowfullscreen\" id=\"okplayer\" width=\"'+t.width+'\" height=\"'+t.height+'\" src=\"https://youtube.com/embed/'+t.token+'?showinfo=0\" style=\"position: absolute; top: 0px; left: 0px; width: '+t.width+\"px; height: \"+t.height+'px;\"></iframe></div>'}},{type:\"vimeo\",regex:/vimeo.com\\/\\d+$/i,fetch:function(t,e){var n=t.match(/\\d+$/i)[0];(0,i.default)(\"https://vimeo.com/api/v2/video/\"+n+\".json\").then(function(t){return t.json()}).then(function(i){if(0==i.length)return e(n,\"\",640,360);var r=i[0];\"anywhere\"==r.embed_privacy?e({url:t,type:\"vimeo\",token:n,thumbnail:r.thumbnail_large,duration:r.duration,title:r.title,width:r.width,height:r.height}):alert(\"Sorry, the author of this video has marked it private, preventing it from being embedded.\",function(){})})},tag:function(t){return'<div class=\"video\" style=\"width: '+t.width+\"px; height: \"+t.height+'px; overflow: hidden; position: relative;\"><iframe frameborder=\"0\" scrolling=\"no\" seamless=\"seamless\" webkitallowfullscreen=\"webkitAllowFullScreen\" mozallowfullscreen=\"mozallowfullscreen\" allowfullscreen=\"allowfullscreen\" id=\"okplayer\" src=\"https://player.vimeo.com/video/'+t.token+'?api=1&title=0&byline=0&portrait=0&playbar=0&player_id=okplayer&loop=0&autoplay=0\" width=\"'+t.width+'\" height=\"'+t.height+'\" style=\"position: absolute; top: 0px; left: 0px; width: '+t.width+\"px; height: \"+t.height+'px;\"></iframe></div>'}},{type:\"link\",regex:/^http.+/i,fetch:function(t,e){e({url:t,type:\"link\",token:\"\",thumbnail:\"\",title:\"\",width:100,height:100})},tag:function(t){return'<a href=\"'+t.url+'\" target=\"_blank\">'+t.url+\"</a>\"}}],a=e.lookup=s.reduce(function(t,e){return(t[e.type]=e)&&t},{});e.parse=function(t,e){s.some(function(n){return!!n.regex.test(t)&&(n.fetch(t,function(t){e(t)}),!0)})||e(null)},e.tag=function(t){return t.type in a?a[t.type].tag(t):\"\"},e.loadImage=function(t,e,n){a.image.regex.test(t)?a.image.fetch(t,function(t){e(t)}):n&&n()},e.thumbnail=function(t){return'<img src=\"'+(t.thumbnail||t.url)+'\" class=\"thumb\">'},e.tumblr=function(t,e){var n=t.replace(/^https?:\\/\\//,\"\").split(\"/\")[0];-1==n.indexOf(\".\")&&(n+=\".tumblr.com\"),(0,r.default)(\"http://\"+n+\"/api/read\").then(function(t){var n=t.posts.reduce(u,[]);e(n)})};function u(t,e){var n=void 0,i=void 0,r=void 0;switch(e.type){case\"photo\":i=stripHTML(e[\"photo-caption\"]),e.photos.length?e.photos.forEach(function(e){n={url:e[\"photo-url-1280\"],type:\"image\",token:\"\",thumbnail:e[\"photo-url-500\"],description:i,width:parseInt(e.width),height:parseInt(e.height)},t.push(n)}):(n={url:e[\"photo-url-1280\"],type:\"image\",token:\"\",thumbnail:e[\"photo-url-500\"],description:i,width:parseInt(e.width),height:parseInt(e.height)},t.push(n));break;case\"video\":if(0!==(r=e[\"video-source\"]).indexOf(\"http\"))break;if(a.youtube.regex.test(r)){var o=(r.match(/v=([-_a-zA-Z0-9]{11})/i)||r.match(/youtu.be\\/([-_a-zA-Z0-9]{11})/i)||r.match(/embed\\/([-_a-zA-Z0-9]{11})/i))[1].split(\"&\")[0],s=\"https://i.ytimg.com/vi/\"+o+\"/hqdefault.jpg\";n={url:e[\"video-source\"],type:\"youtube\",token:o,thumbnail:s,title:stripHTML(e[\"video-caption\"]),width:640,height:360},t.push(n)}}return t}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.upload_action=void 0,e.crud_upload=o;var i=n(80);function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e,n,o){return new Promise(function(s,a){var u=n.id;Object.keys(n).forEach(function(t){\"id\"!==t&&e.append(t,n[t])}),console.log(\"/api/\"+t+\"/\"+u+\"/upload/\");var l=new XMLHttpRequest;l.upload.addEventListener(\"progress\",function(e){if(e.lengthComputable){var n=Math.round(100*e.loaded/e.total)||0;n>99?o&&o(r({type:(0,i.as_type)(t,\"upload_waiting\"),percent:n},t,u)):o&&o(r({type:(0,i.as_type)(t,\"upload_progress\"),percent:n},t,u))}else o&&o(r({type:(0,i.as_type)(t,\"upload_error\"),error:\"unable to compute upload progress\"},t,u))},!1),l.addEventListener(\"load\",function(e){var n=void 0;try{n=JSON.parse(e.target.responseText)}catch(e){return o&&o(r({type:(0,i.as_type)(t,\"upload_error\"),error:\"upload failed\"},t,u)),void a(e)}o&&o(r({type:(0,i.as_type)(t,\"upload_complete\"),data:n},t,u)),n.files&&n.files.length&&n.files.forEach(function(t){console.log(t),o&&o({type:(0,i.as_type)(\"file\",\"create\"),data:t})});s(n)},!1),l.addEventListener(\"error\",function(e){o&&o(r({type:(0,i.as_type)(t,\"upload_error\"),error:\"upload failed\"},t,u)),a(e)},!1),l.addEventListener(\"abort\",function(e){o&&o(r({type:(0,i.as_type)(t,\"upload_error\"),error:\"upload cancelled\"},t,u)),a(e)},!1),l.open(\"POST\",\"/api/\"+t+\"/\"+u+\"/upload/\"),l.send(e),o&&o({type:(0,i.as_type)(t,\"upload_loading\")})})}e.upload_action=function(t,e,n){return function(i){return o(t,e,n,i)}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.crud_action=void 0,e.crud_actions=function(t){var e=(0,i.crud_fetch)(t);return[\"index\",\"show\",\"create\",\"update\",\"destroy\"].reduce(function(n,i){return n[i]=s(t,i,function(t){return e[i](t)}),n},{action:function(e,n){return s(t,e,n)},upload:function(e,n){return(0,o.upload_action)(t,e,n)}})};var i=n(125),r=n(80),o=n(238);var s=e.crud_action=function(t,e,n){return function(i){return function(o){return new Promise(function(s,a){o({type:(0,r.as_type)(t,e+\"_loading\")}),n(i).then(function(n){o({type:(0,r.as_type)(t,e),data:n}),s(n)}).catch(function(n){o({type:(0,r.as_type)(t,e+\"_error\")}),a(n)})})}}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(10),s=l(n(8)),a=l(n(5)),u=l(n(235));function l(t){return t&&t.__esModule?t:{default:t}}var c=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t)}return i(t,[{key:\"componentWillMount\",value:function(){s.default.system.changeTool(\"morph\"),document.body.style.backgroundImage=\"linear-gradient(\"+(a.default.randint(40)+40)+\"deg, #def, #dfe)\"}},{key:\"componentWillReceiveProps\",value:function(){s.default.system.changeTool(\"morph\"),document.body.style.backgroundImage=\"linear-gradient(\"+(a.default.randint(40)+40)+\"deg, #def, #dfe)\"}},{key:\"render\",value:function(){return(0,r.h)(\"section\",null,(0,r.h)(o.Route,{exact:!0,path:\"/morph/app/\",component:u.default}))}}]),t}();e.default={name:\"morph\",router:c,links:function(){return[{url:\"/morph/app/\",name:\"morph\"}]}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i,r=n(1),o=n(2),s=n(10),a=n(3),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(78)),l=n(77),c=(i=l)&&i.__esModule?i:{default:i};function h(t){if(!t.to)return(0,r.h)(\"span\",null,t.children);var e=t.to===t.location.pathname?(0,r.h)(\"b\",null,t.children):t.children;return(0,r.h)(\"span\",null,(0,r.h)(s.Link,{to:t.to},e))}e.default=(0,a.connect)(function(t){return{site:t.system.site,app:t.system.app,fps:t.live.fps,playing:t.live.playing}},function(t,e){return{actions:(0,o.bindActionCreators)(u,t)}})(function(t){var e=t.site,n=t.app,i=t.fps,o=t.playing,s=t.actions,a=t.location,u=t.history,l=Object.keys(c.default).map(function(t,e){var n=t.replace(/_/,\" \");return(0,r.h)(\"option\",{value:t,key:e},n)}),p=c.default[n.tool].links().map(function(t,e){return(0,r.h)(h,{key:e,location:a,to:t.url},t.name)});return(0,r.h)(\"header\",null,(0,r.h)(\"span\",null,(0,r.h)(\"b\",null,e.name,\" cortex\")),(0,r.h)(\"span\",null,(0,r.h)(\"select\",{onChange:function(t){var e=window.location.pathname.split(\"/\");e.shift(),console.log(e),e[0]in c.default&&e[1]&&u.push(\"/\"+t.target.value+\"/\"+e[1]+\"/\"),s.changeTool(t.target.value,!0)},value:n.tool},l)),(0,r.h)(h,{location:a,to:\"/system\"},\"system\"),(0,r.h)(h,{location:a,to:\"/dashboard\"},\"dashboard\"),(0,r.h)(\"span\",null,p),o&&(0,r.h)(\"span\",null,i,\" fps\"))})},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=(n(2),n(3));var s=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e),function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this))}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"render\",value:function(){var t=this.props,e=(t.title,t.images.map(function(t){return(0,r.h)(\"div\",null,(0,r.h)(\"img\",{src:t.url}))}));return(0,r.h)(\"div\",{class:\"gallery\"},e)}}]),e}();e.default=(0,o.connect)(function(t){return{}},function(t,e){return{}})(s)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i,r=n(1),o=(n(2),n(3)),s=n(5),a=(i=s)&&i.__esModule?i:{default:i};e.default=(0,o.connect)(function(t){return t.system.runner},function(t,e){return{}})(function(t){var e=t.cpu,n=t.gpu,i=t.processor,o=void 0;i?o=\"cpu\"===i?\"cpu\":\"gpu\":\"IDLE\"!==n.status?o=\"gpu\":\"IDLE\"!==e.status&&(o=\"cpu\");var s=\"cpu\"===o?e:n;if(!s)return(0,r.h)(\"div\",null);if(\"IDLE\"===s.status)return(0,r.h)(\"div\",null,o,\" idle\");var u=s.last_message,l=s.pid,c=s.task,h=c.activity,p=c.epoch,f=c.epochs,d=c.dataset,y=c.module;return(0,r.h)(\"div\",{className:\"currentTask\"},\"#\",l,\": \",(0,r.h)(\"b\",null,y,\" \",h),\" \",(0,r.h)(\"i\",null,d),f?(0,r.h)(\"span\",null,f,\" epoch\",a.default.courtesy_s(f)):\"\",p?(0,r.h)(\"span\",null,\"(currently #\",p,\")\"):\"\",(0,r.h)(\"br\",null),(0,r.h)(\"br\",null),(0,r.h)(\"div\",{class:\"quiet\"},u))})},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(3);n(2),function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);e.default=t}(n(20));var s=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.handleClick=n.handleClick.bind(n),n}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"handleClick\",value:function(t){clearTimeout(this.timeout);var e=t.target.checked;this.props.onToggle&&this.props.onToggle(e)}},{key:\"render\",value:function(){var t=this.props.value;this.props.noDim;return(0,r.h)(\"div\",{className:\"checkbox param\"},(0,r.h)(\"label\",null,(0,r.h)(\"span\",null,this.props.title),(0,r.h)(\"input\",{type:\"checkbox\",onClick:this.handleClick,checked:t})))}}]),e}();e.default=(0,o.connect)(function(t){return{}},function(t,e){return{}})(s)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=l(n(24)),s=l(n(31)),a=l(n(45)),u=l(n(122));function l(t){return t&&t.__esModule?t:{default:t}}function c(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}var h=function(t){function e(){var t,n,i;!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);for(var r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];return n=i=c(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(o))),i.state={x:0,y:0,sum:0},c(i,n)}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"render\",value:function(){var t=this,e=this.props,n=e.make,i=e.take,l=e.checkpoint,c=e.onTrain,h=e.onAugment,p=this.state,f=p.x,d=p.y,y=p.sum;return(0,r.h)(o.default,{className:\"augmentationGrid\"},(0,r.h)(u.default,{x:n,y:i,max:5e3,onHover:function(e,n){return t.setState({x:e,y:n})},onClick:function(e,n){t.setState({sum:y+e*n}),h(n,e)}}),(0,r.h)(s.default,{title:\"Name\"},l.name),(0,r.h)(s.default,{title:\"Take\"},d),(0,r.h)(s.default,{title:\"Make\"},f),(0,r.h)(s.default,{title:\"Will add to dataset\"},f*d),(0,r.h)(s.default,{title:\"Total added this epoch\"},y),(0,r.h)(s.default,{title:\"Sequence length\"},l.sequenceCount),(0,r.h)(s.default,{title:\"Dataset size\"},l.datasetCount),(0,r.h)(a.default,{onClick:function(){t.setState({sum:0}),c()}},\"Train\"))}}]),e}();e.default=h},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(3),s=n(2),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(46));var u=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.handleClick=n.handleClick.bind(n),n}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:\"handleClick\",value:function(t){var e=this.props,n=e.audioPlayer,i=e.actions;n.playing?i.pause():i.resume()}},{key:\"render\",value:function(){var t=this.props.audioPlayer;return(0,r.h)(\"div\",{className:\"audioPlayer\"},(0,r.h)(\"span\",null,this.props.title),(0,r.h)(\"button\",{onClick:this.handleClick},t.playing?\"▶\":\"~\"))}}]),e}();e.default=(0,o.connect)(function(t){return{audioPlayer:t.audioPlayer}},function(t,e){return{actions:(0,s.bindActionCreators)(a,t)}})(u)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(1),o=n(10),s=n(2),a=n(3),u=n(19),l=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(47)),c=d(n(123)),h=d(n(86)),p=d(n(85)),f=n(131);function d(t){return t&&t.__esModule?t:{default:t}}function y(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function m(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}function _(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var v=function(t){function e(){return y(this,e),m(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return _(e,r.Component),i(e,[{key:\"render\",value:function(){var t=this;return(0,r.h)(o.BrowserRouter,null,(0,r.h)(\"div\",null,(0,r.h)(\"div\",{className:\"diamond\"}),(0,r.h)(o.Route,{exact:!0,path:\"/\",component:c.default}),(0,r.h)(o.Route,{exact:!0,path:\"/login\",component:c.default}),(0,r.h)(o.Route,{exact:!0,path:\"/logout\",component:h.default}),(0,r.h)(o.Route,{exact:!0,path:\"/signup\",component:p.default}),(0,r.h)(o.Route,{path:\"/:module\",component:function(e){switch(e.location.pathname){case\"/login\":case\"/logout\":case\"/signup\":return null}return t.props.actions.setReturnTo(e.location.pathname),(0,r.h)(o.Redirect,{to:\"/login\"})}})))}},{key:\"componentDidMount\",value:function(){document.querySelector(\".diamond\").style.backgroundImage=\"linear-gradient(\"+((0,f.randint)(40)-5)+\"deg, #fde, #ffe)\"}}]),e}(),g=function(t){function e(){return y(this,e),m(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return _(e,r.Component),i(e,[{key:\"render\",value:function(){if(!this.props.auth.initialized)return console.log(\"loading auth\"),(0,r.h)(\"div\",{className:\"loading\"},\"Loading\");if(this.props.auth.isAuthenticated){if(console.log(\"authenticated...\"),this.props.auth.returnTo){var t=this.props.auth.returnTo;return t&&!t.match(/(login|logout|signup)/i)||(t=\"/\"),console.log(\"history.push\",t),this.props.actions.setReturnTo(null),u.history.push(t),(0,r.h)(\"div\",null,\"Launching app\")}return console.log(\"rendering as normal\"),(0,r.h)(\"div\",null,this.props.children)}return(0,r.h)(v,this.props)}},{key:\"componentDidMount\",value:function(){this.props.actions.checkin()}}]),e}();e.default=(0,a.connect)(function(t){return{auth:t.auth}},function(t){return{actions:(0,s.bindActionCreators)(l,t)}})(g)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=a(n(247)),r=a(n(123)),o=a(n(86)),s=a(n(85));function a(t){return t&&t.__esModule?t:{default:t}}e.default={Gate:i.default,Login:r.default,Logout:o.default,Signup:s.default}},function(t,e,n){\"use strict\";var i,r=n(19),o=n(6),s=(i=o)&&i.__esModule?i:{default:i};n(32).socket.on(\"api_res\",function(t){t=function(t){if(\"string\"==typeof t)try{var e=JSON.parse(t);return e}catch(e){return console.error(\"not valid json\"),t}return t}(t);var e=s.default[t.datatype];if(console.log(\"api_res\",t.type,t.datatype),!e)return console.error(\"socket:api_res bad datatype\",t.datatype);switch(t.type){case\"create\":return(0,r.dispatch)({type:e.create,source:\"socket\",data:t.data});case\"update\":return(0,r.dispatch)({type:e.update,source:\"socket\",data:t.data});case\"destroy\":return(0,r.dispatch)({type:e.destroy,source:\"socket\",data:t.data})}})},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.stop_queue=e.start_queue=e.stop_task=e.start_task=e.remove_task=e.add_task=void 0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};e.emit=l;var r,o=n(19),s=n(6),a=(r=s)&&r.__esModule?r:{default:r},u=n(32);function l(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};u.socket.emit(\"task\",i({type:t,task:e},n))}u.socket.on(\"task_res\",function(t){var e=void 0;try{\"string\"==typeof t?\"string\"==typeof(e=JSON.parse(t))&&(e=JSON.parse(e)):e=t}catch(t){return void console.warn(\"problem with json\",t)}switch(e.task&&(0,o.dispatch)({type:a.default.task.update,data:e.task}),e.type){case\"start\":case\"stop\":break;case\"task_begin\":(0,o.dispatch)({type:a.default.task.task_begin,task:e.task});break;case\"task_finish\":(0,o.dispatch)({type:a.default.task.task_finish,task:e.task});break;case\"kill\":break;case\"stdout\":return(0,o.dispatch)({type:a.default.system.stdout,data:e});case\"stderr\":return(0,o.dispatch)({type:a.default.system.stderr,data:e});case\"add\":case\"remove\":case\"start_queue\":case\"stop_queue\":case\"list\":case\"set_priority\":break;case\"progress\":(0,o.dispatch)({type:a.default.task.progress,task:e.task});break;case\"epoch\":(0,o.dispatch)({type:a.default.task.epoch,task:e.task});break;case\"task_error\":return console.log(\"task error\",e);default:return console.log(e),console.log(\"no such task command\",e.type)}});e.add_task=function(t){return l(\"add\",t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})},e.remove_task=function(t){return l(\"remove\",t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})},e.start_task=function(t){return l(\"start\",t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})},e.stop_task=function(t){return l(\"stop\",t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})},e.start_queue=function(){return l(\"start_queue\",{},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},e.stop_queue=function(){return l(\"stop_queue\",{},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}},function(t,e,n){\"use strict\";function i(t){if(this.size=0|t,this.size<=1||0!=(this.size&this.size-1))throw new Error(\"FFT size must be a power of two and bigger than 1\");this._csize=t<<1;for(var e=new Array(2*this.size),n=0;n<e.length;n+=2){const t=Math.PI*n/this.size;e[n]=Math.cos(t),e[n+1]=-Math.sin(t)}this.table=e;for(var i=0,r=1;this.size>r;r<<=1)i++;this._width=i%2==0?i-1:i,this._bitrev=new Array(1<<this._width);for(var o=0;o<this._bitrev.length;o++){this._bitrev[o]=0;for(var s=0;s<this._width;s+=2){var a=this._width-s-2;this._bitrev[o]|=(o>>>s&3)<<a}}this._out=null,this._data=null,this._inv=0}t.exports=i,i.prototype.fromComplexArray=function(t,e){for(var n=e||new Array(t.length>>>1),i=0;i<t.length;i+=2)n[i>>>1]=t[i];return n},i.prototype.createComplexArray=function(){const t=new Array(this._csize);for(var e=0;e<t.length;e++)t[e]=0;return t},i.prototype.toComplexArray=function(t,e){for(var n=e||this.createComplexArray(),i=0;i<n.length;i+=2)n[i]=t[i>>>1],n[i+1]=0;return n},i.prototype.completeSpectrum=function(t){for(var e=this._csize,n=e>>>1,i=2;i<n;i+=2)t[e-i]=t[i],t[e-i+1]=-t[i+1]},i.prototype.transform=function(t,e){if(t===e)throw new Error(\"Input and output buffers must be different\");this._out=t,this._data=e,this._inv=0,this._transform4(),this._out=null,this._data=null},i.prototype.realTransform=function(t,e){if(t===e)throw new Error(\"Input and output buffers must be different\");this._out=t,this._data=e,this._inv=0,this._realTransform4(),this._out=null,this._data=null},i.prototype.inverseTransform=function(t,e){if(t===e)throw new Error(\"Input and output buffers must be different\");this._out=t,this._data=e,this._inv=1,this._transform4();for(var n=0;n<t.length;n++)t[n]/=this.size;this._out=null,this._data=null},i.prototype._transform4=function(){var t,e,n=this._out,i=this._csize,r=1<<this._width,o=i/r<<1,s=this._bitrev;if(4===o)for(t=0,e=0;t<i;t+=o,e++){const n=s[e];this._singleTransform2(t,n,r)}else for(t=0,e=0;t<i;t+=o,e++){const n=s[e];this._singleTransform4(t,n,r)}var a=this._inv?-1:1,u=this.table;for(r>>=2;r>=2;r>>=2){var l=(o=i/r<<1)>>>2;for(t=0;t<i;t+=o)for(var c=t+l,h=t,p=0;h<c;h+=2,p+=r){const t=h,e=t+l,i=e+l,r=i+l,o=n[t],s=n[t+1],c=n[e],f=n[e+1],d=n[i],y=n[i+1],m=n[r],_=n[r+1],v=o,g=s,b=u[p],w=a*u[p+1],k=c*b-f*w,S=c*w+f*b,T=u[2*p],x=a*u[2*p+1],O=d*T-y*x,P=d*x+y*T,A=u[3*p],E=a*u[3*p+1],C=m*A-_*E,M=m*E+_*A,R=v+O,j=g+P,F=v-O,N=g-P,L=k+C,D=S+M,q=a*(k-C),I=a*(S-M),B=R+L,U=j+D,z=R-L,Y=j-D,W=F+I,G=N-q,V=F-I,H=N+q;n[t]=B,n[t+1]=U,n[e]=W,n[e+1]=G,n[i]=z,n[i+1]=Y,n[r]=V,n[r+1]=H}}},i.prototype._singleTransform2=function(t,e,n){const i=this._out,r=this._data,o=r[e],s=r[e+1],a=r[e+n],u=r[e+n+1],l=o+a,c=s+u,h=o-a,p=s-u;i[t]=l,i[t+1]=c,i[t+2]=h,i[t+3]=p},i.prototype._singleTransform4=function(t,e,n){const i=this._out,r=this._data,o=this._inv?-1:1,s=2*n,a=3*n,u=r[e],l=r[e+1],c=r[e+n],h=r[e+n+1],p=r[e+s],f=r[e+s+1],d=r[e+a],y=r[e+a+1],m=u+p,_=l+f,v=u-p,g=l-f,b=c+d,w=h+y,k=o*(c-d),S=o*(h-y),T=m+b,x=_+w,O=v+S,P=g-k,A=m-b,E=_-w,C=v-S,M=g+k;i[t]=T,i[t+1]=x,i[t+2]=O,i[t+3]=P,i[t+4]=A,i[t+5]=E,i[t+6]=C,i[t+7]=M},i.prototype._realTransform4=function(){var t,e,n=this._out,i=this._csize,r=1<<this._width,o=i/r<<1,s=this._bitrev;if(4===o)for(t=0,e=0;t<i;t+=o,e++){const n=s[e];this._singleRealTransform2(t,n>>>1,r>>>1)}else for(t=0,e=0;t<i;t+=o,e++){const n=s[e];this._singleRealTransform4(t,n>>>1,r>>>1)}var a=this._inv?-1:1,u=this.table;for(r>>=2;r>=2;r>>=2){var l=(o=i/r<<1)>>>1,c=l>>>1,h=c>>>1;for(t=0;t<i;t+=o)for(var p=0,f=0;p<=h;p+=2,f+=r){var d=t+p,y=d+c,m=y+c,_=m+c,v=n[d],g=n[d+1],b=n[y],w=n[y+1],k=n[m],S=n[m+1],T=n[_],x=n[_+1],O=v,P=g,A=u[f],E=a*u[f+1],C=b*A-w*E,M=b*E+w*A,R=u[2*f],j=a*u[2*f+1],F=k*R-S*j,N=k*j+S*R,L=u[3*f],D=a*u[3*f+1],q=T*L-x*D,I=T*D+x*L,B=O+F,U=P+N,z=O-F,Y=P-N,W=C+q,G=M+I,V=a*(C-q),H=a*(M-I),Z=B+W,Q=U+G,K=z+H,X=Y-V;if(n[d]=Z,n[d+1]=Q,n[y]=K,n[y+1]=X,0!==p){if(p!==h){var $=z+-a*H,J=-Y+-a*V,tt=B+-a*W,et=-U- -a*G,nt=t+c-p,it=t+l-p;n[nt]=$,n[nt+1]=J,n[it]=tt,n[it+1]=et}}else{var rt=B-W,ot=U-G;n[m]=rt,n[m+1]=ot}}}},i.prototype._singleRealTransform2=function(t,e,n){const i=this._out,r=this._data,o=r[e],s=r[e+n],a=o+s,u=o-s;i[t]=a,i[t+1]=0,i[t+2]=u,i[t+3]=0},i.prototype._singleRealTransform4=function(t,e,n){const i=this._out,r=this._data,o=this._inv?-1:1,s=2*n,a=3*n,u=r[e],l=r[e+n],c=r[e+s],h=r[e+a],p=u+c,f=u-c,d=l+h,y=o*(l-h),m=p+d,_=f,v=-y,g=p-d,b=f,w=y;i[t]=m,i[t+1]=0,i[t+2]=_,i[t+3]=v,i[t+4]=g,i[t+5]=0,i[t+6]=b,i[t+7]=w}},function(t,e){t.exports={construct:function(t,e,n){var i=[];switch(t){case\"ham\":for(var r=0;r<e;r++)i[r]=.54-.46*Math.cos(2*Math.PI*r/(e-1));break;case\"tukey\":var o=e-1,s=n*o;for(r=0;r<e;r++)i[r]=r<s/2?.5*(1+Math.cos(Math.PI*(2*e/s-1))):r>o*(1-n/2)?.5*(1+Math.cos(Math.PI*(2*e/s-2/n+1))):1;break;case\"rectangular\":for(r=0;r<e;r++)i[r]=1}return i}}},function(t,e){var n=function(t){t=t||{},this.frameIx=0,this.frameSize=t.frameSize||64,this.frameStep=t.frameStep||this.frameSize,this.map=t.map||void 0,this.scale=t.scale||void 0,this.offset=t.offset?t.offset:0,this.sampleType=t.sampleType||\"UInt8\",this.wordSize=t.wordSize||1};n.prototype={frame:function(t,e){var n=this,i=this.offset,r=[],o=\"[object Array]\"===Object.prototype.toString.call(t);for(n.frameIx=0;i<t.length;){var s=o?t[i]:t[\"read\"+n.sampleType](i);r.push(this.map?this.map[s]:s),r.length!=this.frameSize&&i+n.wordSize!=t.length||a(r),i+=n.wordSize}function a(r){this.scale&&(r=r.map(function(t,e){return t*n.scale[e]})),e(r,n.frameIx),i!=t.length-n.wordSize&&(i-=(n.frameSize-n.frameStep)*n.wordSize,n.frameIx++,r.length=0)}0==this.frameIx&&e(void 0)}},t.exports=n},function(t,e,n){t.exports={framer:n(253),windows:n(252)}},function(t,e,n){\"use strict\";var i=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t};t.exports=function(){function t(t,e){for(var n,i=function(t){for(var e=t[0].width,n=t[0].height,i=t[0].duration,r=1;r<t.length;r++){if(t[r].width!=e)throw\"Frame \"+(r+1)+\" has a different width\";if(t[r].height!=n)throw\"Frame \"+(r+1)+\" has a different height\";if(t[r].duration<0||t[r].duration>32767)throw\"Frame \"+(r+1)+\" has a weird duration (must be between 0 and 32767)\";i+=t[r].duration}return{duration:i,width:e,height:n}}(t),r=[{id:440786851,data:[{data:1,id:17030},{data:1,id:17143},{data:4,id:17138},{data:8,id:17139},{data:\"webm\",id:17026},{data:2,id:17031},{data:2,id:17029}]},{id:408125543,data:[{id:357149030,data:[{data:1e6,id:2807729},{data:\"whammy\",id:19840},{data:\"whammy\",id:22337},{data:(n=i.duration,[].slice.call(new Uint8Array(new Float64Array([n]).buffer),0).map(function(t){return String.fromCharCode(t)}).reverse().join(\"\")),id:17545}]},{id:374648427,data:[{id:174,data:[{data:1,id:215},{data:1,id:29637},{data:0,id:156},{data:\"und\",id:2274716},{data:\"V_VP8\",id:134},{data:\"VP8\",id:2459272},{data:1,id:131},{id:224,data:[{data:i.width,id:176},{data:i.height,id:186}]}]}]},{id:475249515,data:[]}]}],o=r[1],u=o.data[2],l=0,c=0;l<t.length;){var h={id:187,data:[{data:Math.round(c),id:179},{id:183,data:[{data:1,id:247},{data:0,size:8,id:241}]}]};u.data.push(h);var p=[],f=0;do{p.push(t[l]),f+=t[l].duration,l++}while(l<t.length&&f<3e4);var d=0,y={id:524531317,data:[{data:Math.round(c),id:231}].concat(p.map(function(t){var e=a({discardable:0,frame:t.data.slice(4),invisible:0,keyframe:1,lacing:0,trackNum:1,timecode:Math.round(d)});return d+=t.duration,{data:e,id:163}}))};o.data.push(y),c+=f}for(var m=0,_=0;_<o.data.length;_++){_>=3&&(u.data[_-3].data[1].data[1].data=m);var v=s([o.data[_]],e);m+=v.size||v.byteLength||v.length,2!=_&&(o.data[_]=v)}return s(r,e)}function e(t){for(var e=[];t>0;)e.push(255&t),t>>=8;return new Uint8Array(e.reverse())}function n(t,e){for(var n=new Uint8Array(e),i=e-1;i>=0;i--)n[i]=255&t,t>>=8;return n}function r(t){for(var e=new Uint8Array(t.length),n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}function o(t){var e=[];t=(t.length%8?new Array(9-t.length%8).join(\"0\"):\"\")+t;for(var n=0;n<t.length;n+=8)e.push(parseInt(t.substr(n,8),2));return new Uint8Array(e)}function s(t,a){for(var u=[],l=0;l<t.length;l++)if(\"id\"in t[l]){var c=t[l].data;if(\"object\"==(void 0===c?\"undefined\":i(c))&&(c=s(c,a)),\"number\"==typeof c&&(c=\"size\"in t[l]?n(c,t[l].size):o(c.toString(2))),\"string\"==typeof c&&(c=r(c)),c.length);var h=c.size||c.byteLength||c.length,p=Math.ceil(Math.ceil(Math.log(h)/Math.log(2))/8),f=h.toString(2),d=new Array(7*p+7+1-f.length).join(\"0\")+f,y=new Array(p).join(\"0\")+\"1\"+d;u.push(e(t[l].id)),u.push(o(y)),u.push(c)}else u.push(t[l]);if(a){var m=function t(e,n){null==n&&(n=[]);for(var r=0;r<e.length;r++)\"object\"==i(e[r])?t(e[r],n):n.push(e[r]);return n}(u);return new Uint8Array(m)}return new Blob(u,{type:\"video/webm\"})}function a(t){var e=0;if(t.keyframe&&(e|=128),t.invisible&&(e|=8),t.lacing&&(e|=t.lacing<<1),t.discardable&&(e|=1),t.trackNum>127)throw\"TrackNumber > 127 not supported\";return[128|t.trackNum,t.timecode>>8,255&t.timecode,e].map(function(t){return String.fromCharCode(t)}).join(\"\")+t.frame}function u(t){for(var e,n,i=t.RIFF[0].WEBP[0],r=i.indexOf(\"\u0001*\"),o=0,s=[];o<4;o++)s[o]=i.charCodeAt(r+3+o);return e=16383&(n=s[1]<<8|s[0]),n>>14,(n=s[3]<<8|s[2])>>14,{width:e,height:16383&n,data:i,riff:t}}function l(t){for(var e=0,n={};e<t.length;){var i=t.substr(e,4);if(n[i]=n[i]||[],\"RIFF\"==i||\"LIST\"==i){var r=parseInt(t.substr(e+4,4).split(\"\").map(function(t){var e=t.charCodeAt(0).toString(2);return new Array(8-e.length+1).join(\"0\")+e}).join(\"\"),2),o=t.substr(e+4+4,r);e+=8+r,n[i].push(l(o))}else\"WEBP\"==i?(n[i].push(t.substr(e+8)),e=t.length):(n[i].push(t.substr(e+4)),e=t.length)}return n}function c(t,e){this.frames=[],this.duration=1e3/t,this.quality=e||.8}return c.prototype.add=function(t,e){if(void 0!==e&&this.duration)throw\"you can't pass a duration if the fps is set\";if(void 0===e&&!this.duration)throw\"if you don't have the fps set, you need to have durations here.\";if(t.canvas&&(t=t.canvas),t.toDataURL)t=t.getContext(\"2d-lodpi\").getImageData(0,0,t.width,t.height);else if(\"string\"!=typeof t)throw\"frame must be a a HTMLCanvasElement, a CanvasRenderingContext2D or a DataURI formatted string\";if(\"string\"==typeof t&&!/^data:image\\/webp;base64,/gi.test(t))throw\"Input must be formatted properly as a base64 encoded DataURI of type image/webp\";this.frames.push({image:t,duration:e||this.duration})},c.prototype.encodeFrames=function(t){if(this.frames[0].image instanceof ImageData){var e=this.frames,n=document.createElement(\"canvas\"),i=n.getContext(\"2d-lodpi\");n.width=this.frames[0].image.width,n.height=this.frames[0].image.height;var r=function(o){console.log(\"encodeFrame\",o);var s=e[o];i.putImageData(s.image,0,0),s.image=n.toDataURL(\"image/webp\",this.quality),o<e.length-1?setTimeout(function(){r(o+1)},1):t()}.bind(this);r(0)}else t()},c.prototype.compile=function(e,n){this.encodeFrames(function(){var i=0,r=0,o=new t(this.frames.map(function(t){var e=u(l(atob(t.image.slice(23))));if(e.duration=t.duration,!e||!e.width||!e.height)return null;if(i){if(i!==e.width)return null}else i=e.width;if(r){if(r!==e.height)return null}else r=e.height;return e}).filter(function(t){return!!t}),e);n(o)}.bind(this))},{Video:c,fromImageArray:function(e,n,i){return t(e.map(function(t){var e=u(l(atob(t.slice(23))));return e.duration=1e3/n,e}),i)},toWebM:t}}()},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.list_checkpoints=function(t){u.socket.emit(\"cmd\",{cmd:\"list_checkpoints\",payload:t})},e.list_all_checkpoints=function(t){u.socket.emit(\"cmd\",{cmd:\"list_all_checkpoints\",payload:t})},e.list_epochs=function(t,e){u.socket.emit(\"cmd\",{cmd:\"list_epochs\",payload:\"pix2pix\"===t||\"pix2wav\"===t?t+\"/\"+e:e})},e.list_sequences=function(t){u.socket.emit(\"cmd\",{cmd:\"list_sequences\",payload:t})},e.load_epoch=function(t,e){console.log(\">> SWITCH CHECKPOINT\",t,e),u.socket.emit(\"cmd\",{cmd:\"load_epoch\",payload:t+\":\"+e})},e.load_sequence=function(t){u.socket.emit(\"cmd\",{cmd:\"load_sequence\",payload:t})},e.seek=function(t){u.socket.emit(\"cmd\",{cmd:\"seek\",payload:t})},e.pause=function(t){u.socket.emit(\"cmd\",{cmd:\"pause\"})},e.play=function(t){u.socket.emit(\"cmd\",{cmd:\"play\"})},e.get_params=function(){u.socket.emit(\"cmd\",{cmd:\"get_params\"})},e.set_param=function(t,e){u.socket.emit(\"cmd\",{cmd:\"set_param\",payload:{key:t,value:e}})};var i,r=n(19),o=n(6),s=(i=o)&&i.__esModule?i:{default:i},a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(49)),u=n(32);u.socket.on(\"res\",function(t){switch(t.cmd){case\"get_last_frame\":\"working\"!==t.res&&u.socket.emit(\"cmd\",{cmd:\"get_last_frame\"});break;case\"get_params\":t.res&&(0,r.dispatch)({type:s.default.socket.load_params,opt:t.res}),t.res&&a.toggleFPS(t.res.processing);break;case\"list_checkpoints\":(0,r.dispatch)({type:s.default.socket.list_checkpoints,checkpoints:t.res});break;case\"list_all_checkpoints\":(0,r.dispatch)({type:s.default.socket.list_all_checkpoints,checkpoints:t.res});break;case\"list_epochs\":(0,r.dispatch)({type:s.default.socket.list_epochs,epochs:t.res});break;case\"list_sequences\":(0,r.dispatch)({type:s.default.socket.list_sequences,sequences:t.res})}}),u.socket.on(\"frame\",a.onFrame)},function(t,e,n){\"use strict\";var i,r=n(19),o=n(6),s=(i=o)&&i.__esModule?i:{default:i};n(32).socket.on(\"system_res\",function(t){switch(t.type){case\"relay_connected\":return(0,r.dispatch)({type:s.default.system.relay_connected});case\"relay_disconnected\":return(0,r.dispatch)({type:s.default.system.relay_disconnected});case\"rpc_connected\":return(0,r.dispatch)({type:s.default.system.rpc_connected,runner:t.runner});case\"rpc_disconnected\":return(0,r.dispatch)({type:s.default.system.rpc_disconnected});case\"relay_status\":return(0,r.dispatch)({type:t.rpc_connected?s.default.system.rpc_connected:s.default.system.rpc_disconnected,runner:t.runner});case\"site\":return(0,r.dispatch)({type:s.default.system.load_site,site:t.site})}})},function(t,e){for(var n=[],i=0;i<256;++i)n[i]=(i+256).toString(16).substr(1);t.exports=function(t,e){var i=e||0,r=n;return r[t[i++]]+r[t[i++]]+r[t[i++]]+r[t[i++]]+\"-\"+r[t[i++]]+r[t[i++]]+\"-\"+r[t[i++]]+r[t[i++]]+\"-\"+r[t[i++]]+r[t[i++]]+\"-\"+r[t[i++]]+r[t[i++]]+r[t[i++]]+r[t[i++]]+r[t[i++]]+r[t[i++]]}},function(t,e){var n=\"undefined\"!=typeof crypto&&crypto.getRandomValues.bind(crypto)||\"undefined\"!=typeof msCrypto&&msCrypto.getRandomValues.bind(msCrypto);if(n){var i=new Uint8Array(16);t.exports=function(){return n(i),i}}else{var r=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),r[e]=t>>>((3&e)<<3)&255;return r}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=s(n(6)),o=s(n(50));function s(t){return t&&t.__esModule?t:{default:t}}var a={loading:!0,progress:{i:0,n:0},error:null,folders:[],folder_id:0,data:null,lossReport:null,results:null};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,e=arguments[1];if(e.data&&\"samplernn\"===e.data.module)return(0,o.default)(t,e);switch(e.type){case r.default.samplernn.load_loss:return i({},t,{lossReport:e.lossReport});case r.default.samplernn.load_graph:return i({},t,{lossReport:e.lossReport,results:e.results});default:return t}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=a(n(6)),o=a(n(50)),s=a(n(5));function a(t){return t&&t.__esModule?t:{default:t}}var u={loading:!0,progress:{i:0,n:0},status:\"\",error:null,folder_id:0,data:null};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,e=arguments[1];switch(e.data&&\"pix2wav\"===e.data.module&&(t=(0,o.default)(t,e)),e.type){case r.default.wav2pix.load:return i({},t,{status:\"Loaded buffer\"});case r.default.wav2pix.progress:return i({},t,{status:\"Rendering frame \"+e.count});case r.default.wav2pix.finish:return i({},t,{status:e.message||\"Render complete\"});case r.default.wav2pix.zip:return i({},t,{status:\"Built zip file \"+s.default.hush_size(t.size)[1]});case r.default.wav2pix.uploading:return i({},t,{status:\"Uploading zip file\"});default:return t}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=s(n(6)),o=s(n(50));function s(t){return t&&t.__esModule?t:{default:t}}var a={loading:!0,progress:{i:0,n:0},error:null,folder_id:0,data:null,results:null,checkpoint:{name:\"\",sequenceCount:0,datasetCount:0}};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,e=arguments[1];switch(e.data&&\"pix2pixhd\"===e.data.module&&(t=(0,o.default)(t,e)),e.type){case r.default.pix2pixhd.load_results:return i({},t,{results:e.results});case r.default.pix2pixhd.load_dataset_count:return i({},t,{checkpoint:e.data});case r.default.file.destroy:return console.log(\"file destroy\",t.results),i({},t,{results:i({},t.results,{files:t.results.files.filter(function(t){return t.id!==e.data.id})})});default:return t}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});r(n(6));var i=r(n(50));function r(t){return t&&t.__esModule?t:{default:t}}var o={loading:!0,progress:{i:0,n:0},error:null,folder_id:0,data:null};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o,e=arguments[1];return e.data&&\"pix2pix\"===e.data.module&&(t=(0,i.default)(t,e)),e.type,t}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=s(n(6)),o=s(n(50));function s(t){return t&&t.__esModule?t:{default:t}}var a={loading:!0,progress:{i:0,n:0},error:null,folder_id:0,data:null,app:null};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,e=arguments[1];switch(e.data&&\"morph\"===e.data.module&&(t=(0,o.default)(t,e)),e.type){case r.default.morph.load:return console.log(\"morph load\",e.app),i({},t,{app:e.app,loading:!1,data:e.data});case r.default.file.create:return console.log(e),\"morph\"!==e.data.module?t:i({},t,{app:t.app&&i({},t.app,{files:[e.data].concat(t.app.files)})});default:return t}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.moduleReducer=void 0;var i=n(2),r=l(n(264)),o=l(n(263)),s=l(n(262)),a=l(n(261)),u=l(n(260));function l(t){return t&&t.__esModule?t:{default:t}}e.moduleReducer=(0,i.combineReducers)({morph:r.default,pix2pix:o.default,pix2pixhd:s.default,pix2wav:a.default,samplernn:u.default})},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i,r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},o=n(6),s=(i=o)&&i.__esModule?i:{default:i};var a={loading:!1,error:null,status:\"\",current:null,index:-1,playlist:[]},u=document.createElement(\"audio\");e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,e=arguments[1];switch(e.type){case s.default.audioPlayer.play:return e.file.url?(u.src=e.file.url,u.play(),r({},t,{playing:!0,current:e.file})):t;case s.default.audioPlayer.pause:return u.pause(),r({},t,{playing:!1});case s.default.audioPlayer.resume:return u.play(),r({},t,{playing:!0});default:return t}}},function(t,e,n){\"use strict\";var i,r,o,s,a;i=window.CanvasRenderingContext2D.prototype,r=window.document.createElement(\"canvas\").getContext(\"2d\"),o=r.backingStorePixelRatio||r.webkitBackingStorePixelRatio||r.mozBackingStorePixelRatio||r.msBackingStorePixelRatio||r.oBackingStorePixelRatio||r.backingStorePixelRatio||1,1!==(a=(window.devicePixelRatio||1)/o)&&(function(t,e){for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)}({fillRect:\"all\",clearRect:\"all\",strokeRect:\"all\",moveTo:\"all\",lineTo:\"all\",arc:[0,1,2],arcTo:\"all\",bezierCurveTo:\"all\",isPointinPath:\"all\",isPointinStroke:\"all\",quadraticCurveTo:\"all\",rect:\"all\",translate:\"all\",createRadialGradient:\"all\",createLinearGradient:\"all\"},function(t,e){var n;i[e]=(n=i[e],function(){var e,i,r=Array.prototype.slice.call(arguments);if(\"all\"===t)r=r.map(function(t){return t*a});else if(Array.isArray(t))for(e=0,i=t.length;e<i;e++)r[t[e]]*=a;return n.apply(this,r)})}),i.stroke=(s=i.stroke,function(){this.lineWidth*=a,s.apply(this,arguments),this.lineWidth/=a}),i.fillText=function(t){return function(){var e=Array.prototype.slice.call(arguments);e[1]*=a,e[2]*=a,this.font=this.font.replace(/(\\d+)(px|em|rem|pt)/g,function(t,e,n){return e*a+n}),t.apply(this,e),this.font=this.font.replace(/(\\d+)(px|em|rem|pt)/g,function(t,e,n){return e/a+n})}}(i.fillText),i.strokeText=function(t){return function(){var e=Array.prototype.slice.call(arguments);e[1]*=a,e[2]*=a,this.font=this.font.replace(/(\\d+)(px|em|rem|pt)/g,function(t,e,n){return e*a+n}),t.apply(this,e),this.font=this.font.replace(/(\\d+)(px|em|rem|pt)/g,function(t,e,n){return e/a+n})}}(i.strokeText)),function(t){var e;t.getContext=(e=t.getContext,function(t){var n,i,r;return\"2d-lodpi\"==t?r=e.call(this,\"2d\"):\"2d\"===t?(n=(r=e.call(this,\"2d\")).backingStorePixelRatio||r.webkitBackingStorePixelRatio||r.mozBackingStorePixelRatio||r.msBackingStorePixelRatio||r.oBackingStorePixelRatio||r.backingStorePixelRatio||1,(i=(window.devicePixelRatio||1)/n)>1&&(this.style.height=this.height+\"px\",this.style.width=this.width+\"px\",this.width*=i,this.height*=i)):r=e.call(this,t),r})}(window.HTMLCanvasElement.prototype)},function(t,e,n){\"use strict\";function i(t,e){e=e||1024;var n,i=[],r=0,o=Math.floor;t>e&&(t/=e,i.unshift(o(10*t%10)),i.unshift(\".\"));do{n=t%10,!(t=o(t/10))||++r%3||(n=\" \"+o(n)),i.unshift(o(n))}while(t);return i.join(\"\")}Object.defineProperty(e,\"__esModule\",{value:!0}),e.timeInSeconds=function(t){return(t/10).toFixed(1)+\" s.\"},e.gerund=function(t){return t.replace(/e?$/,\"ing\")},e.commatize=i,e.carbon_date=function(t,e){var n,i=(+new Date-new Date(t))/1e3;n=!e&&i<86400?\"new\":i<604800?\"recent\":i<1209600?\"med\":i<3024e3?\"old\":i<12315200?\"older\":\"quiet\";return n},e.hush_views=function(t,e,n){var r=i(t,1e3);if(e=e||1,(t=t||0)<30)return[\"quiet\",t+\" v.\"];return t<200?[\"quiet\",r+\" v.\"]:t<500?[\"quiet\",r+\" v.\"]:t<1e3?[\"old\",r+\" v.\"]:t<5e3?[\"med\",r+\" kv.\"]:n||t<1e4?[\"recent\",r+\" kv.\"]:[\"new\",r+\" kv.\"]},e.hush_threads=function(t,e,n){var r=i(t,1e3);return e=e||1,(t=t||0)<10?[\"quiet\",t+\" t.\"]:t<25?[\"old\",r+\" t.\"]:t<50?[\"med\",r+\" t.\"]:n||t<100?[\"recent\",r+\" t.\"]:[\"new\",r+\" t.\"]},e.hush_size=function(t,e,n){var r=i(Math.round(t/1024));if(e=1,!(t=t||0))return[\"\",\"\"];if(t<1e3)return[\"quiet\",t+\" b.\"];return t<1e6?[\"quiet\",r+\" kb.\"]:t<2e7/e?[\"quiet\",r+\" mb.\"]:t<5e7/e?[\"old\",r+\" mb.\"]:t<8e7/e?[\"med\",r+\" mb.\"]:n||t<17e7/e?[\"recent\",r+\" mb.\"]:[\"new\",r+\" mb.\"]},e.hush_null=function(t,e,n){var i=e?t+\" \"+e+\".\":t;return t<3?[\"quiet\",i]:t<6?[\"older\",i]:t<10?[\"old\",i]:t<16?[\"med\",i]:n||t<21?[\"recent\",i]:[\"new\",i]},e.get_age=function(t){var e,n=Math.abs(+Date.now()-new Date(t))/1e3,i=Math.floor;if(n<5)return\"now\";if(n<60)return i(n)+\"s\";if((n/=60)<60)return i(n)+\"m\";if(e=i(n%60),n/=60,e>0&&n<2)return i(n)+\"h\"+e+\"m\";if(n<24)return i(n)+\"h\";if((n/=24)<7)return i(n)+\"d\";if((n/=7)<12)return i(n)+\"w\";if((n/=4)<12)return i(n)+\"m\";return i(n/=12)+\"y\"},e.courtesy_s=function(t,e){return 1==t?\"\":e||\"s\"}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}}(),r=e.numericSort={asc:function(t,e){return t[0]-e[0]},desc:function(t,e){return e[0]-t[0]}},o=e.stringSort={asc:function(t,e){return t[0].localeCompare(e[0])},desc:function(t,e){return e[0].localeCompare(t[0])}};e.orderByFn=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"name asc\").split(\" \"),e=i(t,2),n=e[0],s=void 0===n?\"name\":n,a=e[1],u=void 0===a?\"asc\":a,l=void 0,c=void 0;switch(s){case\"epoch\":l=function(t){return[parseInt(t.epoch||t.epochs)||0,t]},c=r[u];break;case\"size\":l=function(t){return[parseInt(t.size)||0,t]},c=r[u];break;case\"date\":l=function(t){return[+new Date(t.date||t.created_at),t]},c=r[u];break;case\"updated_at\":l=function(t){return[+new Date(t.updated_at),t]},c=r[u];break;case\"priority\":l=function(t){return[parseInt(t.priority)||parseInt(t.id)||1e3,t]},c=r[u];case\"name\":default:l=function(t){return[t.name||\"\",t]},c=o[u]}return{mapFn:l,sortFn:c}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=s(n(6)),o=s(n(5));s(n(33));function s(t){return t&&t.__esModule?t:{default:t}}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var u={loading:!1,error:null,tasks:{},queue:[],completed:[]},l=o.default.sort.orderByFn(\"updated_at desc\"),c=o.default.sort.orderByFn(\"priority asc\");e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,e=arguments[1];switch(e.type){case r.default.task.index:return i({},t,{tasks:e.data.reduce(function(t,e){return t[e.id]=e,t},{}),queue:e.data.filter(function(t){return!t.completed}).map(l.mapFn).sort(l.sortFn).map(function(t){return t[1].id}),completed:e.data.filter(function(t){return t.completed}).map(c.mapFn).sort(c.sortFn).map(function(t){return t[1].id})});case r.default.task.create:return console.log(e.data),i({},t,{tasks:i({},t.tasks,a({},e.data.id,e.data)),queue:t.queue.concat([e.data.id])});case r.default.task.update:return i({},t,{tasks:i({},t.tasks,a({},e.data.id,e.data))});case r.default.task.destroy:var n=t.tasks,o=n[e.data.id],s=function(t,e){var n={};for(var i in t)e.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(n,[e.data.id]);return i({},t,{queue:t.queue.filter(function(t){return t!==o.id}),completed:t.completed.filter(function(t){return t!==o.id}),tasks:s});case r.default.task.task_finish:return i({},t,{queue:t.queue.filter(function(t){return t!==e.task.id}),completed:[e.task.id].concat(t.completed)});default:return t}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i,r=n(6),o=(i=r)&&i.__esModule?i:{default:i};var s={loading:!1,error:null,status:\"\"};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,e=arguments[1];switch(e.type){case o.default.folder.upload_loading:return{error:null,loading:!0,status:\"Loading...\"};case o.default.folder.upload_error:return{error:null,loading:!1,status:\"Error uploading :(\"};case o.default.folder.upload_progress:return{error:null,loading:!0,status:\"Upload progress \"+e.percent+\"%\"};case o.default.folder.upload_waiting:return{error:null,loading:!0,status:\"Waiting for server to finish processing...\"};case o.default.folder.upload_complete:return{error:null,loading:!1,status:\"Upload complete\"};case o.default.file.create_loading:return{error:null,loading:!0,status:\"Creating file...\"};default:return t}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=a(n(33)),o=a(n(79)),s=a(n(6));function a(t){return t&&t.__esModule?t:{default:t}}var u={loading:!1,error:null,opt:{hue:0,saturation:0,luminosity:0,sequence_playing:!0,sequence_step:1,recurse_roll:0,rotate:0,scale:0,process_frac:.5,view_mode:\"b\"},all_checkpoints:[],checkpoints:[],epochs:[\"latest\"],sequences:[],fps:0,playing:!1,last_message:\"\",fullscreen:!1,frame:{i:0,sequence_i:0,sequence_len:\"1\"}};e.default=function(){var t,e,n,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,l=arguments[1];switch(l.type){case s.default.socket.load_params:return l.opt&&Object.keys(l.opt).length?i({},a,{loading:!1,error:null,opt:l.opt}):a;case s.default.player.set_param:return i({},a,{opt:i({},a.opt,(t={},e=l.key,n=l.value,e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t))});case s.default.player.set_fullscreen:return i({},a,{fullscreen:l.value});case s.default.socket.list_checkpoints:return i({},a,{checkpoints:l.checkpoints,epochs:[]});case s.default.socket.list_all_checkpoints:return i({},a,{all_checkpoints:l.all_checkpoints,epochs:[]});case s.default.socket.list_epochs:return console.log(l),\"not found\"===l.epochs?i({},a,{epochs:[]}):i({},a,{epochs:(l.epochs||[]).map(function(t){return[\"latest\"==t?1/0:t,t]}).sort(function(t,e){return t[0]-e[0]}).map(function(t){return t[1]})});case s.default.socket.list_sequences:return i({},a,{sequences:l.sequences});case s.default.player.loading_sequence:return i({},a,{opt:i({},a.opt,{sequence_name:l.sequence_name})});case s.default.player.loading_checkpoint:return i({},a,{opt:i({},a.opt,{checkpoint_name:l.checkpoint_name,epoch:l.epoch})});case s.default.player.set_fps:return i({},a,{fps:l.fps});case s.default.system.stdout:return\"gpu\"===l.data.processor?i({},a,{last_message:l.data.data}):a;case s.default.player.current_frame:return l.meta?i({},a,{frame:l.meta}):a;case s.default.player.pausing:return i({},a,{playing:!1});case s.default.player.playing:return i({},a,{playing:!0});case s.default.player.start_recording:return i({},a,{opt:i({},a.opt,{recording:!0})});case s.default.player.add_record_frame:return i({},a,{opt:i({},a.opt,{recordFrames:(a.opt.recordFrames||0)+1})});case s.default.player.save_frame:return o.default.saveAs(l.blob,a.opt.checkpoint_name+\"_\"+a.opt.sequence+\"_\"+(0,r.default)().format(\"YYYYMMDD_HHmm\")+\".png\"),a;case s.default.player.saving_video:return i({},a,{opt:i({},a.opt,{savingVideo:!0})});case s.default.player.save_video:return o.default.saveAs(l.blob,a.opt.checkpoint_name+\"_\"+a.opt.sequence+\"_\"+(0,r.default)().format(\"YYYYMMDD_HHmm\")+\".webm\"),i({},a,{opt:i({},a.opt,{recording:!1,savingVideo:!1,recordFrames:0})});default:return a}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=o(n(6));o(n(33));function o(t){return t&&t.__esModule?t:{default:t}}n(79);var s={loading:!1,progress:null,error:null,data:{},images:[],files:[]};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,e=arguments[1];switch(e.type){case r.default.app.load_progress:return e.data&&\"dashboard\"===e.data.module?i({},t,{loading:!0,progress:e.progress}):t;case r.default.dashboard.load:return i({},t,{loading:!1,error:null,data:e.data});default:return t}}},function(t,e){(function(e){t.exports=e}).call(this,{})},function(t,e){t.exports=function(){throw new Error(\"define cannot be used indirect\")}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,\"loaded\",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,\"id\",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=o(n(6));o(n(33));function o(t){return t&&t.__esModule?t:{default:t}}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n(79);var a={loading:!1,error:null,site:{name:\"loading\"},app:{tool:localStorage.getItem(\"system.last_tool\")||\"pix2pix\"},server:{connected:!1,status:\"disconnected\",error:null},relay:{connected:!1,status:\"unknown\",error:null},rpc:{connected:!1,status:\"disconnected\",error:null},cmd:{loading:!1,loaded:!1,name:null,error:null,stdout:\"\",stderr:\"\"},runner:{cpu:{status:\"IDLE\",task:{}},gpu:{status:\"IDLE\",task:{}}},stdout:\"\",stderr:\"\"},u=[\"pix2pix\",\"samplernn\",\"pix2wav\"].reduce(function(t,e){return t[e]=e,t},{});e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,e=arguments[1],n=null;switch(e.type){case r.default.socket.connect:case r.default.socket.reconnecting:return i({},t,{server:{status:\"connected\",connected:!0,error:null}});case r.default.socket.reconnect:return i({},t,{server:{status:\"reconnecting (attempt \"+e.attempt+\")\",connected:!1,error:null}});case r.default.socket.connect_error:case r.default.socket.reconnect_error:case r.default.socket.disconnect:case r.default.socket.reconnect_failed:return i({},t,{server:{status:\"disconnected\",connected:!1,error:e.error||null}});case r.default.socket.error:return i({},t,{server:i({},t.socket,{error:e.error})});case r.default.system.relay_connected:return i({},t,{relay:{status:\"connected\",connected:!0,error:null}});case r.default.system.relay_disconnected:return i({},t,{relay:{status:\"disconnected\",connected:!1,error:null},rpc:{status:\"disconnected\",connected:!1,error:null}});case r.default.system.rpc_connected:return i({},t,{rpc:{status:\"connected\",connected:!0,error:null},runner:e.runner});case r.default.system.rpc_disconnected:return i({},t,{rpc:{status:\"disconnected\",connected:!1,error:null},runner:e.runner||t.runner});case r.default.system.load_site:document.querySelector(\"title\").innerHTML=e.site.name+\".cortex\";var o=t.app.tool,l=window.location.pathname.split(\"/\")[1];return l in u&&(o=l),i({},t,{site:e.site,app:i({},t.app,{tool:o})});case r.default.system.running_command:return i({},t,{cmd:{loading:!0,loaded:!1,name:e.cmd,error:null,stdout:null,stderr:null}});case r.default.system.command_output:return i({},t,{cmd:{loading:!1,loaded:!0,name:e.data.cmd,error:e.data.error,stdout:e.data.stdout,stderr:e.data.stderr}});case r.default.task.task_begin:return console.log(\"task begin\",e.task,e.task.processor),i({},t,{runner:i({},t.runner,s({},e.task.processor,{status:\"RUNNING\",task:e.task})),cmd:i({},t.cmd,{loaded:!1,stdout:\"\",stderr:\"\"}),stdout:\"\",stderr:\"\"});case r.default.task.task_finish:return n=\"cpu\"===e.task.processor||t.runner.cpu.task&&t.runner.cpu.task.uuid===e.task.uuid?\"cpu\":\"gpu\"===e.task.processor||t.runner.gpu.task&&t.runner.gpu.task.uuid===e.task.uuid?\"gpu\":null,console.log(\"task finish\",e),i({},t,{rpc:{connected:!1,status:\"disconnected\",error:null},runner:n?i({},t.runner,s({},n,{status:\"IDLE\",task:{}})):t.runner});case r.default.app.change_tool:return i({},t,{app:i({},t.app,{tool:e.tool})});case r.default.system.stdout:return e.data.processor&&t.runner[e.data.processor]?i({},t,{runner:i({},t.runner,s({},e.data.processor,i({},t.runner[e.data.processor],{last_message:e.data.data}))),stdout:t.stdout+e.data.data}):i({},t,{stdout:t.stdout+e.data.data});case r.default.system.stderr:return i({},t,{last_message:e.data.data,stderr:t.stderr+e.data.data});default:return t}}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i,r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},o=n(6),s=(i=o)&&i.__esModule?i:{default:i};var a={token:null,user:{},groups:{},initialized:!1,loading:!1,isAuthenticated:!1,returnTo:null};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,e=arguments[1];switch(console.log(e),e.type){case s.default.auth.set_token:return r({},t,{token:e.data,isAuthenticated:!!e.data,loading:!1,error:null});case s.default.auth.initialized:return r({},t,{loading:!1,initialized:!0,error:null});case s.default.auth.loading:return r({},t,{loading:!0,error:null});case s.default.auth.set_current_user:return r({},t,{loading:!1,initialized:!0,isAuthenticated:!0,user:e.data,error:null});case s.default.auth.set_return_to:return r({},t,{returnTo:e.data});case s.default.auth.logout_user:return r({},a);case s.default.auth.set_error:return r({},t,{loading:!1,error:e.data});case s.default.auth.loading:default:return t}}},function(t,e,n){\"use strict\";e.__esModule=!0;e.canUseDOM=!(\"undefined\"==typeof window||!window.document||!window.document.createElement),e.addEventListener=function(t,e,n){return t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent(\"on\"+e,n)},e.removeEventListener=function(t,e,n){return t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent(\"on\"+e,n)},e.getConfirmation=function(t,e){return e(window.confirm(t))},e.supportsHistory=function(){var t=window.navigator.userAgent;return(-1===t.indexOf(\"Android 2.\")&&-1===t.indexOf(\"Android 4.0\")||-1===t.indexOf(\"Mobile Safari\")||-1!==t.indexOf(\"Chrome\")||-1!==t.indexOf(\"Windows Phone\"))&&(window.history&&\"pushState\"in window.history)},e.supportsPopStateOnHashChange=function(){return-1===window.navigator.userAgent.indexOf(\"Trident\")},e.supportsGoWithoutReloadUsingHash=function(){return-1===window.navigator.userAgent.indexOf(\"Firefox\")},e.isExtraneousPopstateEvent=function(t){return void 0===t.state&&-1===navigator.userAgent.indexOf(\"CriOS\")}},function(t,e,n){\"use strict\";e.__esModule=!0;var i,r=n(133),o=(i=r)&&i.__esModule?i:{default:i};e.default=function(){var t=null,e=[];return{setPrompt:function(e){return(0,o.default)(null==t,\"A history supports only one prompt at a time\"),t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,i,r){if(null!=t){var s=\"function\"==typeof t?t(e,n):t;\"string\"==typeof s?\"function\"==typeof i?i(s,r):((0,o.default)(!1,\"A history needs a getUserConfirmation function in order to use a prompt message\"),r(!0)):r(!1!==s)}else r(!0)},appendListener:function(t){var n=!0,i=function(){n&&t.apply(void 0,arguments)};return e.push(i),function(){n=!1,e=e.filter(function(t){return t!==i})}},notifyListeners:function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];e.forEach(function(t){return t.apply(void 0,n)})}}}},function(t,e,n){\"use strict\";n.r(e);var i=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t};e.default=function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(Array.isArray(e))return Array.isArray(n)&&e.length===n.length&&e.every(function(e,i){return t(e,n[i])});var r=void 0===e?\"undefined\":i(e);if(r!==(void 0===n?\"undefined\":i(n)))return!1;if(\"object\"===r){var o=e.valueOf(),s=n.valueOf();if(o!==e||s!==n)return t(o,s);var a=Object.keys(e),u=Object.keys(n);return a.length===u.length&&a.every(function(i){return t(e[i],n[i])})}return!1}},function(t,e,n){\"use strict\";function i(t){return\"/\"===t.charAt(0)}function r(t,e){for(var n=e,i=n+1,r=t.length;i<r;n+=1,i+=1)t[n]=t[i];t.pop()}n.r(e),e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"\",n=t&&t.split(\"/\")||[],o=e&&e.split(\"/\")||[],s=t&&i(t),a=e&&i(e),u=s||a;if(t&&i(t)?o=n:n.length&&(o.pop(),o=o.concat(n)),!o.length)return\"/\";var l=void 0;if(o.length){var c=o[o.length-1];l=\".\"===c||\"..\"===c||\"\"===c}else l=!1;for(var h=0,p=o.length;p>=0;p--){var f=o[p];\".\"===f?r(o,p):\"..\"===f?(r(o,p),h++):h&&(r(o,p),h--)}if(!u)for(;h--;h)o.unshift(\"..\");!u||\"\"===o[0]||o[0]&&i(o[0])||o.unshift(\"\");var d=o.join(\"/\");return l&&\"/\"!==d.substr(-1)&&(d+=\"/\"),d}},function(t,e,n){\"use strict\";e.__esModule=!0,e.locationsAreEqual=e.createLocation=void 0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r=a(n(282)),o=a(n(281)),s=n(132);function a(t){return t&&t.__esModule?t:{default:t}}e.createLocation=function(t,e,n,o){var a=void 0;\"string\"==typeof t?(a=(0,s.parsePath)(t)).state=e:(void 0===(a=i({},t)).pathname&&(a.pathname=\"\"),a.search?\"?\"!==a.search.charAt(0)&&(a.search=\"?\"+a.search):a.search=\"\",a.hash?\"#\"!==a.hash.charAt(0)&&(a.hash=\"#\"+a.hash):a.hash=\"\",void 0!==e&&void 0===a.state&&(a.state=e));try{a.pathname=decodeURI(a.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname \"'+a.pathname+'\" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(a.key=n),o?a.pathname?\"/\"!==a.pathname.charAt(0)&&(a.pathname=(0,r.default)(a.pathname,o.pathname)):a.pathname=o.pathname:a.pathname||(a.pathname=\"/\"),a},e.locationsAreEqual=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&(0,o.default)(t.state,e.state)}},function(t,e,n){\"use strict\";t.exports=function(t,e,n,i,r,o,s,a){if(!t){var u;if(void 0===e)u=new Error(\"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.\");else{var l=[n,i,r,o,s,a],c=0;(u=new Error(e.replace(/%s/g,function(){return l[c++]}))).name=\"Invariant Violation\"}throw u.framesToPop=1,u}}},function(t,e,n){\"use strict\";e.__esModule=!0;var i=\"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},r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},o=h(n(133)),s=h(n(284)),a=n(283),u=n(132),l=h(n(280)),c=n(279);function h(t){return t&&t.__esModule?t:{default:t}}var p=function(){try{return window.history.state||{}}catch(t){return{}}};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.default)(c.canUseDOM,\"Browser history needs a DOM\");var e=window.history,n=(0,c.supportsHistory)(),h=!(0,c.supportsPopStateOnHashChange)(),f=t.forceRefresh,d=void 0!==f&&f,y=t.getUserConfirmation,m=void 0===y?c.getConfirmation:y,_=t.keyLength,v=void 0===_?6:_,g=t.basename?(0,u.stripTrailingSlash)((0,u.addLeadingSlash)(t.basename)):\"\",b=function(t){var e=t||{},n=e.key,i=e.state,r=window.location,s=r.pathname+r.search+r.hash;return(0,o.default)(!g||(0,u.hasBasename)(s,g),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path \"'+s+'\" to begin with \"'+g+'\".'),g&&(s=(0,u.stripBasename)(s,g)),(0,a.createLocation)(s,i,n)},w=function(){return Math.random().toString(36).substr(2,v)},k=(0,l.default)(),S=function(t){r(L,t),L.length=e.length,k.notifyListeners(L.location,L.action)},T=function(t){(0,c.isExtraneousPopstateEvent)(t)||P(b(t.state))},x=function(){P(b(p()))},O=!1,P=function(t){O?(O=!1,S()):k.confirmTransitionTo(t,\"POP\",m,function(e){e?S({action:\"POP\",location:t}):A(t)})},A=function(t){var e=L.location,n=C.indexOf(e.key);-1===n&&(n=0);var i=C.indexOf(t.key);-1===i&&(i=0);var r=n-i;r&&(O=!0,R(r))},E=b(p()),C=[E.key],M=function(t){return g+(0,u.createPath)(t)},R=function(t){e.go(t)},j=0,F=function(t){1===(j+=t)?((0,c.addEventListener)(window,\"popstate\",T),h&&(0,c.addEventListener)(window,\"hashchange\",x)):0===j&&((0,c.removeEventListener)(window,\"popstate\",T),h&&(0,c.removeEventListener)(window,\"hashchange\",x))},N=!1,L={length:e.length,action:\"POP\",location:E,createHref:M,push:function(t,r){(0,o.default)(!(\"object\"===(void 0===t?\"undefined\":i(t))&&void 0!==t.state&&void 0!==r),\"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored\");var s=(0,a.createLocation)(t,r,w(),L.location);k.confirmTransitionTo(s,\"PUSH\",m,function(t){if(t){var i=M(s),r=s.key,a=s.state;if(n)if(e.pushState({key:r,state:a},null,i),d)window.location.href=i;else{var u=C.indexOf(L.location.key),l=C.slice(0,-1===u?0:u+1);l.push(s.key),C=l,S({action:\"PUSH\",location:s})}else(0,o.default)(void 0===a,\"Browser history cannot push state in browsers that do not support HTML5 history\"),window.location.href=i}})},replace:function(t,r){(0,o.default)(!(\"object\"===(void 0===t?\"undefined\":i(t))&&void 0!==t.state&&void 0!==r),\"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored\");var s=(0,a.createLocation)(t,r,w(),L.location);k.confirmTransitionTo(s,\"REPLACE\",m,function(t){if(t){var i=M(s),r=s.key,a=s.state;if(n)if(e.replaceState({key:r,state:a},null,i),d)window.location.replace(i);else{var u=C.indexOf(L.location.key);-1!==u&&(C[u]=s.key),S({action:\"REPLACE\",location:s})}else(0,o.default)(void 0===a,\"Browser history cannot replace state in browsers that do not support HTML5 history\"),window.location.replace(i)}})},go:R,goBack:function(){return R(-1)},goForward:function(){return R(1)},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=k.setPrompt(t);return N||(F(1),N=!0),function(){return N&&(N=!1,F(-1)),e()}},listen:function(t){var e=k.appendListener(t);return F(1),function(){F(-1),e()}}};return L}},function(t,e,n){\"use strict\";function i(t){return function(e){var n=e.dispatch,i=e.getState;return function(e){return function(r){return\"function\"==typeof r?r(n,i,t):e(r)}}}}e.__esModule=!0;var r=i();r.withExtraArgument=i,e.default=r},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.default=function(t){return function(){return function(e){return function(n){if(n.type!==i.CALL_HISTORY_METHOD)return e(n);var r=n.payload,o=r.method,s=r.args;t[o].apply(t,function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(s))}}}};var i=n(134)},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};e.default=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=n.selectLocationState,a=void 0===s?o:s,u=n.adjustUrlOnReplay,l=void 0===u||u;if(void 0===a(e.getState()))throw new Error(\"Expected the routing state to be available either as `state.routing` or as the custom expression you can specify as `selectLocationState` in the `syncHistoryWithStore()` options. Ensure you have added the `routerReducer` to your store's reducers via `combineReducers` or whatever method you use to isolate your reducers.\");var c=void 0,h=void 0,p=void 0,f=void 0,d=void 0,y=function(t){var n=a(e.getState());return n.locationBeforeTransitions||(t?c:void 0)};if(c=y(),l){var m=function(){var e=y(!0);d!==e&&c!==e&&(h=!0,d=e,t.transitionTo(i({},e,{action:\"PUSH\"})),h=!1)};p=e.subscribe(m),m()}var _=function(t){h||(d=t,!c&&(c=t,y())||e.dispatch({type:r.LOCATION_CHANGE,payload:t}))};f=t.listen(_),t.getCurrentLocation&&_(t.getCurrentLocation());return i({},t,{listen:function(n){var i=y(!0),r=!1,o=e.subscribe(function(){var t=y(!0);t!==i&&(i=t,r||n(i))});return t.getCurrentLocation||n(i),function(){r=!0,o()}},unsubscribe:function(){l&&p(),f()}})};var r=n(135),o=function(t){return t.routing}},function(t,e,n){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.routerMiddleware=e.routerActions=e.goForward=e.goBack=e.go=e.replace=e.push=e.CALL_HISTORY_METHOD=e.routerReducer=e.LOCATION_CHANGE=e.syncHistoryWithStore=void 0;var i=n(135);Object.defineProperty(e,\"LOCATION_CHANGE\",{enumerable:!0,get:function(){return i.LOCATION_CHANGE}}),Object.defineProperty(e,\"routerReducer\",{enumerable:!0,get:function(){return i.routerReducer}});var r=n(134);Object.defineProperty(e,\"CALL_HISTORY_METHOD\",{enumerable:!0,get:function(){return r.CALL_HISTORY_METHOD}}),Object.defineProperty(e,\"push\",{enumerable:!0,get:function(){return r.push}}),Object.defineProperty(e,\"replace\",{enumerable:!0,get:function(){return r.replace}}),Object.defineProperty(e,\"go\",{enumerable:!0,get:function(){return r.go}}),Object.defineProperty(e,\"goBack\",{enumerable:!0,get:function(){return r.goBack}}),Object.defineProperty(e,\"goForward\",{enumerable:!0,get:function(){return r.goForward}}),Object.defineProperty(e,\"routerActions\",{enumerable:!0,get:function(){return r.routerActions}});var o=a(n(288)),s=a(n(287));function a(t){return t&&t.__esModule?t:{default:t}}e.syncHistoryWithStore=o.default,e.routerMiddleware=s.default},function(t,e){t.exports=Array.isArray||function(t){return\"[object Array]\"==Object.prototype.toString.call(t)}},function(t,e,n){\"use strict\";t.exports=\"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED\"},function(t,e,n){\"use strict\";var i=function(t){};t.exports=function(t,e,n,r,o,s,a,u){if(i(e),!t){var l;if(void 0===e)l=new Error(\"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.\");else{var c=[n,r,o,s,a,u],h=0;(l=new Error(e.replace(/%s/g,function(){return c[h++]}))).name=\"Invariant Violation\"}throw l.framesToPop=1,l}}},function(t,e,n){\"use strict\";function i(t){return function(){return t}}var r=function(){};r.thatReturns=i,r.thatReturnsFalse=i(!1),r.thatReturnsTrue=i(!0),r.thatReturnsNull=i(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(t){return t},t.exports=r},function(t,e,n){\"use strict\";var i=n(293),r=n(292),o=n(291);t.exports=function(){function t(t,e,n,i,s,a){a!==o&&r(!1,\"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types\")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=i,n.PropTypes=n,n}},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,\"loaded\",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,\"id\",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,\"exports\",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e,n){\"use strict\";t.exports=\"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED\"},function(t,e,n){\"use strict\";var i=function(t){};t.exports=function(t,e,n,r,o,s,a,u){if(i(e),!t){var l;if(void 0===e)l=new Error(\"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.\");else{var c=[n,r,o,s,a,u],h=0;(l=new Error(e.replace(/%s/g,function(){return c[h++]}))).name=\"Invariant Violation\"}throw l.framesToPop=1,l}}},function(t,e,n){\"use strict\";function i(t){return function(){return t}}var r=function(){};r.thatReturns=i,r.thatReturnsFalse=i(!1),r.thatReturnsTrue=i(!0),r.thatReturnsNull=i(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(t){return t},t.exports=r},function(t,e,n){\"use strict\";var i=n(298),r=n(297),o=n(296);t.exports=function(){function t(t,e,n,i,s,a){a!==o&&r(!1,\"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types\")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=i,n.PropTypes=n,n}},function(t,e,n){\"use strict\";t.exports=\"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED\"},function(t,e,n){\"use strict\";var i=function(t){};t.exports=function(t,e,n,r,o,s,a,u){if(i(e),!t){var l;if(void 0===e)l=new Error(\"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.\");else{var c=[n,r,o,s,a,u],h=0;(l=new Error(e.replace(/%s/g,function(){return c[h++]}))).name=\"Invariant Violation\"}throw l.framesToPop=1,l}}},function(t,e,n){\"use strict\";function i(t){return function(){return t}}var r=function(){};r.thatReturns=i,r.thatReturnsFalse=i(!1),r.thatReturnsTrue=i(!0),r.thatReturnsNull=i(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(t){return t},t.exports=r},function(t,e,n){\"use strict\";var i=n(302),r=n(301),o=n(300);t.exports=function(){function t(t,e,n,i,s,a){a!==o&&r(!1,\"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types\")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=i,n.PropTypes=n,n}},function(t,e,n){\"use strict\";var i=n(1),r=n(3),o=n(10),s=n(19),a=(function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);e.default=t}(n(14)),p(n(5)),p(n(248))),u=n(13),l=p(n(147)),c=p(n(146)),h=p(n(77));function p(t){return t&&t.__esModule?t:{default:t}}var f=Object.keys(h.default).map(function(t){var e=h.default[t];return(0,i.h)(o.Route,{path:\"/\"+e.name,component:e.router})}),d=(0,i.h)(r.Provider,{store:s.store},(0,i.h)(a.default.Gate,null,(0,i.h)(o.BrowserRouter,null,(0,i.h)(\"div\",{className:\"everybody\"},(0,i.h)(o.Route,{path:\"/\",children:function(t){return(0,i.h)(\"div\",null,console.log(t.location.pathname))}}),(0,i.h)(o.Route,{exact:!0,path:\"/system\",component:l.default}),(0,i.h)(o.Route,{exact:!0,path:\"/dashboard\",component:c.default}),(0,i.h)(o.Route,{exact:!0,path:\"/logout\",component:a.default.Logout}),(0,i.h)(o.Route,{exact:!0,path:\"/login\",component:function(){console.log(\"pziss\"),(0,i.h)(o.Redirect,{to:\"/\"})}}),(0,i.h)(o.Route,{exact:!0,path:\"/signup\",component:function(){console.log(\"pziss\"),(0,i.h)(o.Redirect,{to:\"/\"})}}),f,(0,i.h)(o.Route,{exact:!0,path:\"/\",component:c.default}),(0,i.h)(o.Route,{path:\"/\",component:u.Header}))),(0,i.h)(u.AudioPlayer,null)));(0,i.render)(d,document.getElementById(\"container\"))},function(t,e,n){\"use strict\";(function(t){var n=\"object\"==typeof t&&t&&t.Object===Object&&t;e.a=n}).call(this,n(21))}]);"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"bundle.js","sources":["webpack:///webpack/bootstrap","webpack:///./app/client/actions.js","webpack:///./app/client/api/crud.actions.js","webpack:///./app/client/api/crud.fetch.js","webpack:///./app/client/api/crud.types.js","webpack:///./app/client/api/crud.upload.js","webpack:///./app/client/api/index.js","webpack:///./app/client/api/parser.js","webpack:///./app/client/audio/lib/draw.js","webpack:///./app/client/audio/lib/index.js","webpack:///./app/client/audio/lib/output.js","webpack:///./app/client/audio/lib/spectrum.js","webpack:///./app/client/audio/lib/startAudioContext.js","webpack:///./app/client/audio/pix2wav.js","webpack:///./app/client/audio/wav2pix.js","webpack:///./app/client/auth/auth.actions.js","webpack:///./app/client/auth/auth.gate.js","webpack:///./app/client/auth/auth.reducer.js","webpack:///./app/client/auth/index.js","webpack:///./app/client/auth/login.component.js","webpack:///./app/client/auth/logout.component.js","webpack:///./app/client/auth/signup.component.js","webpack:///./app/client/browser/browser.component.js","webpack:///./app/client/browser/browser.reducer.js","webpack:///./app/client/common/audioPlayer/audioPlayer.actions.js","webpack:///./app/client/common/audioPlayer/audioPlayer.component.js","webpack:///./app/client/common/audioPlayer/audioPlayer.reducer.js","webpack:///./app/client/common/augmentationGrid.component.js","webpack:///./app/client/common/button.component.js","webpack:///./app/client/common/buttonGrid.component.js","webpack:///./app/client/common/checkbox.component.js","webpack:///./app/client/common/currentTask.component.js","webpack:///./app/client/common/fileList.component.js","webpack:///./app/client/common/fileUpload.component.js","webpack:///./app/client/common/folderList.component.js","webpack:///./app/client/common/gallery.component.js","webpack:///./app/client/common/group.component.js","webpack:///./app/client/common/header.component.js","webpack:///./app/client/common/index.js","webpack:///./app/client/common/loading.component.js","webpack:///./app/client/common/numberInput.component.js","webpack:///./app/client/common/param.component.js","webpack:///./app/client/common/paramGroup.component.js","webpack:///./app/client/common/player.component.js","webpack:///./app/client/common/progress.component.js","webpack:///./app/client/common/select.component.js","webpack:///./app/client/common/selectGroup.component.js","webpack:///./app/client/common/slider.component.js","webpack:///./app/client/common/taskList.component.js","webpack:///./app/client/common/textInput.component.js","webpack:///./app/client/common/views/index.js","webpack:///./app/client/common/views/new.view.js","webpack:///./app/client/dashboard/dashboard.actions.js","webpack:///./app/client/dashboard/dashboard.component.js","webpack:///./app/client/dashboard/dashboard.reducer.js","webpack:///./app/client/dashboard/dashboardheader.component.js","webpack:///./app/client/dataset/dataset.actions.js","webpack:///./app/client/dataset/dataset.component.js","webpack:///./app/client/dataset/dataset.form.js","webpack:///./app/client/dataset/dataset.loader.js","webpack:///./app/client/dataset/dataset.new.js","webpack:///./app/client/dataset/dataset.reducer.js","webpack:///./app/client/dataset/upload.reducer.js","webpack:///./app/client/dataset/upload.status.js","webpack:///./app/client/index.jsx","webpack:///./app/client/live/live.actions.js","webpack:///./app/client/live/live.reducer.js","webpack:///./app/client/live/player.js","webpack:///./app/client/live/whammy.js","webpack:///./app/client/modules/index.js","webpack:///./app/client/modules/module.reducer.js","webpack:///./app/client/modules/morph/index.js","webpack:///./app/client/modules/morph/morph.actions.js","webpack:///./app/client/modules/morph/morph.module.js","webpack:///./app/client/modules/morph/morph.reducer.js","webpack:///./app/client/modules/morph/morph.tasks.js","webpack:///./app/client/modules/morph/views/morph.app.js","webpack:///./app/client/modules/pix2pix/index.js","webpack:///./app/client/modules/pix2pix/pix2pix.actions.js","webpack:///./app/client/modules/pix2pix/pix2pix.module.js","webpack:///./app/client/modules/pix2pix/pix2pix.reducer.js","webpack:///./app/client/modules/pix2pix/pix2pix.tasks.js","webpack:///./app/client/modules/pix2pix/views/pix2pix.live.js","webpack:///./app/client/modules/pix2pix/views/pix2pix.new.js","webpack:///./app/client/modules/pix2pix/views/pix2pix.show.js","webpack:///./app/client/modules/pix2pixhd/index.js","webpack:///./app/client/modules/pix2pixhd/pix2pixhd.actions.js","webpack:///./app/client/modules/pix2pixhd/pix2pixhd.module.js","webpack:///./app/client/modules/pix2pixhd/pix2pixhd.reducer.js","webpack:///./app/client/modules/pix2pixhd/pix2pixhd.tasks.js","webpack:///./app/client/modules/pix2pixhd/views/pix2pixhd.live.js","webpack:///./app/client/modules/pix2pixhd/views/pix2pixhd.new.js","webpack:///./app/client/modules/pix2pixhd/views/pix2pixhd.results.js","webpack:///./app/client/modules/pix2pixhd/views/pix2pixhd.show.js","webpack:///./app/client/modules/pix2pixhd/views/pix2pixhd.train.js","webpack:///./app/client/modules/pix2wav/index.js","webpack:///./app/client/modules/pix2wav/pix2wav.actions.js","webpack:///./app/client/modules/pix2wav/pix2wav.module.js","webpack:///./app/client/modules/pix2wav/pix2wav.reducer.js","webpack:///./app/client/modules/pix2wav/pix2wav.tasks.js","webpack:///./app/client/modules/pix2wav/views/pix2wav.live.js","webpack:///./app/client/modules/pix2wav/views/pix2wav.new.js","webpack:///./app/client/modules/pix2wav/views/pix2wav.show.js","webpack:///./app/client/modules/pix2wav/views/spectrogram.upload.js","webpack:///./app/client/modules/samplernn/index.js","webpack:///./app/client/modules/samplernn/samplernn.actions.js","webpack:///./app/client/modules/samplernn/samplernn.module.js","webpack:///./app/client/modules/samplernn/samplernn.reducer.js","webpack:///./app/client/modules/samplernn/samplernn.tasks.js","webpack:///./app/client/modules/samplernn/views/samplernn.graph.js","webpack:///./app/client/modules/samplernn/views/samplernn.import.js","webpack:///./app/client/modules/samplernn/views/samplernn.new.js","webpack:///./app/client/modules/samplernn/views/samplernn.results.js","webpack:///./app/client/modules/samplernn/views/samplernn.show.js","webpack:///./app/client/queue/queue.actions.js","webpack:///./app/client/queue/queue.reducer.js","webpack:///./app/client/socket/index.js","webpack:///./app/client/socket/socket.actions.js","webpack:///./app/client/socket/socket.api.js","webpack:///./app/client/socket/socket.connection.js","webpack:///./app/client/socket/socket.live.js","webpack:///./app/client/socket/socket.system.js","webpack:///./app/client/socket/socket.task.js","webpack:///./app/client/store.js","webpack:///./app/client/system/system.actions.js","webpack:///./app/client/system/system.component.js","webpack:///./app/client/system/system.reducer.js","webpack:///./app/client/types.js","webpack:///./app/client/util/format.js","webpack:///./app/client/util/hidpi-canvas.js","webpack:///./app/client/util/index.js","webpack:///./app/client/util/math.js","webpack:///./app/client/util/sort.js","webpack:///./node_modules/fetch-jsonp/build/fetch-jsonp.js","webpack:///./node_modules/fft.js/lib/fft.js","webpack:///./node_modules/file-saver/FileSaver.js","webpack:///./node_modules/history/DOMUtils.js","webpack:///./node_modules/history/LocationUtils.js","webpack:///./node_modules/history/PathUtils.js","webpack:///./node_modules/history/createBrowserHistory.js","webpack:///./node_modules/history/createTransitionManager.js","webpack:///./node_modules/invariant/browser.js","webpack:///./node_modules/jszip/lib/base64.js","webpack:///./node_modules/jszip/lib/compressedObject.js","webpack:///./node_modules/jszip/lib/compressions.js","webpack:///./node_modules/jszip/lib/crc32.js","webpack:///./node_modules/jszip/lib/defaults.js","webpack:///./node_modules/jszip/lib/external.js","webpack:///./node_modules/jszip/lib/flate.js","webpack:///./node_modules/jszip/lib/generate/ZipFileWorker.js","webpack:///./node_modules/jszip/lib/generate/index.js","webpack:///./node_modules/jszip/lib/index.js","webpack:///./node_modules/jszip/lib/load.js","webpack:///./node_modules/jszip/lib/nodejs/NodejsStreamInputAdapter.js","webpack:///./node_modules/jszip/lib/nodejs/NodejsStreamOutputAdapter.js","webpack:///./node_modules/jszip/lib/nodejsUtils.js","webpack:///./node_modules/jszip/lib/object.js","webpack:///./node_modules/jszip/lib/readable-stream-browser.js","webpack:///./node_modules/jszip/lib/reader/ArrayReader.js","webpack:///./node_modules/jszip/lib/reader/DataReader.js","webpack:///./node_modules/jszip/lib/reader/NodeBufferReader.js","webpack:///./node_modules/jszip/lib/reader/StringReader.js","webpack:///./node_modules/jszip/lib/reader/Uint8ArrayReader.js","webpack:///./node_modules/jszip/lib/reader/readerFor.js","webpack:///./node_modules/jszip/lib/signature.js","webpack:///./node_modules/jszip/lib/stream/ConvertWorker.js","webpack:///./node_modules/jszip/lib/stream/Crc32Probe.js","webpack:///./node_modules/jszip/lib/stream/DataLengthProbe.js","webpack:///./node_modules/jszip/lib/stream/DataWorker.js","webpack:///./node_modules/jszip/lib/stream/GenericWorker.js","webpack:///./node_modules/jszip/lib/stream/StreamHelper.js","webpack:///./node_modules/jszip/lib/support.js","webpack:///./node_modules/jszip/lib/utf8.js","webpack:///./node_modules/jszip/lib/utils.js","webpack:///./node_modules/jszip/lib/zipEntries.js","webpack:///./node_modules/jszip/lib/zipEntry.js","webpack:///./node_modules/jszip/lib/zipObject.js","webpack:///./node_modules/jszip/node_modules/core-js/library/fn/set-immediate.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_a-function.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_an-object.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_cof.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_core.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_ctx.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_descriptors.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_dom-create.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_export.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_fails.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_global.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_hide.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_html.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_ie8-dom-define.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_invoke.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_is-object.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_object-dp.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_property-desc.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_task.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_to-primitive.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/web.immediate.js","webpack:///./node_modules/jszip/node_modules/immediate/lib/browser.js","webpack:///./node_modules/jszip/node_modules/lie/lib/browser.js","webpack:///./node_modules/jszip/node_modules/pako/index.js","webpack:///./node_modules/jszip/node_modules/pako/lib/deflate.js","webpack:///./node_modules/jszip/node_modules/pako/lib/inflate.js","webpack:///./node_modules/jszip/node_modules/pako/lib/utils/common.js","webpack:///./node_modules/jszip/node_modules/pako/lib/utils/strings.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/adler32.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/constants.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/crc32.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/deflate.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/gzheader.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/inffast.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/inflate.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/inftrees.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/messages.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/trees.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/zstream.js","webpack:///./node_modules/moment/min/moment.min.js","webpack:///./node_modules/node-fetch/browser.js","webpack:///./node_modules/preact-compat/dist/preact-compat.es.js","webpack:///./node_modules/preact-compat/node_modules/fbjs/lib/emptyFunction.js","webpack:///./node_modules/preact-compat/node_modules/fbjs/lib/invariant.js","webpack:///./node_modules/preact-compat/node_modules/fbjs/lib/warning.js","webpack:///./node_modules/preact-compat/node_modules/object-assign/index.js","webpack:///./node_modules/preact-compat/node_modules/prop-types/checkPropTypes.js","webpack:///./node_modules/preact-compat/node_modules/prop-types/factoryWithTypeCheckers.js","webpack:///./node_modules/preact-compat/node_modules/prop-types/index.js","webpack:///./node_modules/preact-compat/node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack:///./node_modules/preact/dist/preact.esm.js","webpack:///./node_modules/react-redux/es/components/Provider.js","webpack:///./node_modules/react-redux/es/components/connectAdvanced.js","webpack:///./node_modules/react-redux/es/connect/connect.js","webpack:///./node_modules/react-redux/es/connect/mapDispatchToProps.js","webpack:///./node_modules/react-redux/es/connect/mapStateToProps.js","webpack:///./node_modules/react-redux/es/connect/mergeProps.js","webpack:///./node_modules/react-redux/es/connect/selectorFactory.js","webpack:///./node_modules/react-redux/es/connect/verifySubselectors.js","webpack:///./node_modules/react-redux/es/connect/wrapMapToProps.js","webpack:///./node_modules/react-redux/es/index.js","webpack:///./node_modules/react-redux/es/utils/PropTypes.js","webpack:///./node_modules/react-redux/es/utils/Subscription.js","webpack:///./node_modules/react-redux/es/utils/shallowEqual.js","webpack:///./node_modules/react-redux/es/utils/verifyPlainObject.js","webpack:///./node_modules/react-redux/es/utils/warning.js","webpack:///./node_modules/react-redux/node_modules/fbjs/lib/emptyFunction.js","webpack:///./node_modules/react-redux/node_modules/fbjs/lib/invariant.js","webpack:///./node_modules/react-redux/node_modules/fbjs/lib/warning.js","webpack:///./node_modules/react-redux/node_modules/hoist-non-react-statics/index.js","webpack:///./node_modules/react-redux/node_modules/invariant/browser.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/_Symbol.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/_baseGetTag.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/_freeGlobal.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/_getPrototype.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/_getRawTag.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/_objectToString.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/_overArg.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/_root.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/isObjectLike.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/isPlainObject.js","webpack:///./node_modules/react-redux/node_modules/object-assign/index.js","webpack:///./node_modules/react-redux/node_modules/prop-types/checkPropTypes.js","webpack:///./node_modules/react-redux/node_modules/prop-types/factoryWithTypeCheckers.js","webpack:///./node_modules/react-redux/node_modules/prop-types/index.js","webpack:///./node_modules/react-redux/node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack:///./node_modules/react-router-dom/es/BrowserRouter.js","webpack:///./node_modules/react-router-dom/es/HashRouter.js","webpack:///./node_modules/react-router-dom/es/Link.js","webpack:///./node_modules/react-router-dom/es/MemoryRouter.js","webpack:///./node_modules/react-router-dom/es/NavLink.js","webpack:///./node_modules/react-router-dom/es/Prompt.js","webpack:///./node_modules/react-router-dom/es/Redirect.js","webpack:///./node_modules/react-router-dom/es/Route.js","webpack:///./node_modules/react-router-dom/es/Router.js","webpack:///./node_modules/react-router-dom/es/StaticRouter.js","webpack:///./node_modules/react-router-dom/es/Switch.js","webpack:///./node_modules/react-router-dom/es/index.js","webpack:///./node_modules/react-router-dom/es/matchPath.js","webpack:///./node_modules/react-router-dom/es/withRouter.js","webpack:///./node_modules/react-router-dom/node_modules/fbjs/lib/emptyFunction.js","webpack:///./node_modules/react-router-dom/node_modules/fbjs/lib/invariant.js","webpack:///./node_modules/react-router-dom/node_modules/fbjs/lib/warning.js","webpack:///./node_modules/react-router-dom/node_modules/history/DOMUtils.js","webpack:///./node_modules/react-router-dom/node_modules/history/LocationUtils.js","webpack:///./node_modules/react-router-dom/node_modules/history/PathUtils.js","webpack:///./node_modules/react-router-dom/node_modules/history/createBrowserHistory.js","webpack:///./node_modules/react-router-dom/node_modules/history/createHashHistory.js","webpack:///./node_modules/react-router-dom/node_modules/history/createTransitionManager.js","webpack:///./node_modules/react-router-dom/node_modules/history/es/DOMUtils.js","webpack:///./node_modules/react-router-dom/node_modules/history/es/LocationUtils.js","webpack:///./node_modules/react-router-dom/node_modules/history/es/PathUtils.js","webpack:///./node_modules/react-router-dom/node_modules/history/es/createBrowserHistory.js","webpack:///./node_modules/react-router-dom/node_modules/history/es/createHashHistory.js","webpack:///./node_modules/react-router-dom/node_modules/history/es/createMemoryHistory.js","webpack:///./node_modules/react-router-dom/node_modules/history/es/createTransitionManager.js","webpack:///./node_modules/react-router-dom/node_modules/history/es/index.js","webpack:///./node_modules/react-router-dom/node_modules/hoist-non-react-statics/index.js","webpack:///./node_modules/react-router-dom/node_modules/invariant/browser.js","webpack:///./node_modules/react-router-dom/node_modules/isarray/index.js","webpack:///./node_modules/react-router-dom/node_modules/object-assign/index.js","webpack:///./node_modules/react-router-dom/node_modules/path-to-regexp/index.js","webpack:///./node_modules/react-router-dom/node_modules/prop-types/checkPropTypes.js","webpack:///./node_modules/react-router-dom/node_modules/prop-types/factoryWithTypeCheckers.js","webpack:///./node_modules/react-router-dom/node_modules/prop-types/index.js","webpack:///./node_modules/react-router-dom/node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/MemoryRouter.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/Prompt.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/Redirect.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/Route.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/Router.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/StaticRouter.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/Switch.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/generatePath.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/matchPath.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/withRouter.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/node_modules/warning/warning.js","webpack:///./node_modules/react-router-dom/node_modules/resolve-pathname/index.js","webpack:///./node_modules/react-router-dom/node_modules/value-equal/index.js","webpack:///./node_modules/react-router-dom/node_modules/warning/browser.js","webpack:///./node_modules/react-router-redux/lib/actions.js","webpack:///./node_modules/react-router-redux/lib/index.js","webpack:///./node_modules/react-router-redux/lib/middleware.js","webpack:///./node_modules/react-router-redux/lib/reducer.js","webpack:///./node_modules/react-router-redux/lib/sync.js","webpack:///./node_modules/redux-thunk/lib/index.js","webpack:///./node_modules/redux/es/redux.js","webpack:///./node_modules/redux/node_modules/symbol-observable/es/index.js","webpack:///./node_modules/redux/node_modules/symbol-observable/es/ponyfill.js","webpack:///./node_modules/resolve-pathname/index.js","webpack:///./node_modules/signal-windows/index.js","webpack:///./node_modules/signal-windows/src/framer.js","webpack:///./node_modules/signal-windows/src/windows.js","webpack:///./node_modules/sprintf-js/src/sprintf.js","webpack:///./node_modules/tone/build/Tone.js","webpack:///./node_modules/uuid/lib/bytesToUuid.js","webpack:///./node_modules/uuid/lib/rng-browser.js","webpack:///./node_modules/uuid/v1.js","webpack:///./node_modules/value-equal/index.js","webpack:///./node_modules/warning/browser.js","webpack:///(webpack)/buildin/amd-define.js","webpack:///(webpack)/buildin/amd-options.js","webpack:///(webpack)/buildin/global.js","webpack:///(webpack)/buildin/harmony-module.js","webpack:///(webpack)/buildin/module.js","webpack:///(webpack)/node_modules/base64-js/index.js","webpack:///(webpack)/node_modules/buffer/index.js","webpack:///(webpack)/node_modules/core-util-is/lib/util.js","webpack:///(webpack)/node_modules/events/events.js","webpack:///(webpack)/node_modules/ieee754/index.js","webpack:///(webpack)/node_modules/inherits/inherits_browser.js","webpack:///(webpack)/node_modules/isarray/index.js","webpack:///(webpack)/node_modules/process-nextick-args/index.js","webpack:///(webpack)/node_modules/process/browser.js","webpack:///(webpack)/node_modules/readable-stream/duplex-browser.js","webpack:///(webpack)/node_modules/readable-stream/lib/_stream_duplex.js","webpack:///(webpack)/node_modules/readable-stream/lib/_stream_passthrough.js","webpack:///(webpack)/node_modules/readable-stream/lib/_stream_readable.js","webpack:///(webpack)/node_modules/readable-stream/lib/_stream_transform.js","webpack:///(webpack)/node_modules/readable-stream/lib/_stream_writable.js","webpack:///(webpack)/node_modules/readable-stream/lib/internal/streams/BufferList.js","webpack:///(webpack)/node_modules/readable-stream/lib/internal/streams/destroy.js","webpack:///(webpack)/node_modules/readable-stream/lib/internal/streams/stream-browser.js","webpack:///(webpack)/node_modules/readable-stream/passthrough.js","webpack:///(webpack)/node_modules/readable-stream/readable-browser.js","webpack:///(webpack)/node_modules/readable-stream/transform.js","webpack:///(webpack)/node_modules/readable-stream/writable-browser.js","webpack:///(webpack)/node_modules/safe-buffer/index.js","webpack:///(webpack)/node_modules/setimmediate/setImmediate.js","webpack:///(webpack)/node_modules/stream-browserify/index.js","webpack:///(webpack)/node_modules/string_decoder/lib/string_decoder.js","webpack:///(webpack)/node_modules/timers-browserify/main.js","webpack:///(webpack)/node_modules/util-deprecate/browser.js"],"sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./app/client/index.jsx\");\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _redux = require('redux');\n\nvar _api = require('./api');\n\nvar _live = require('./live/live.actions');\n\nvar liveActions = _interopRequireWildcard(_live);\n\nvar _queue = require('./queue/queue.actions');\n\nvar queueActions = _interopRequireWildcard(_queue);\n\nvar _system = require('./system/system.actions');\n\nvar systemActions = _interopRequireWildcard(_system);\n\nvar _socket = require('./socket/socket.actions');\n\nvar socketActions = _interopRequireWildcard(_socket);\n\nvar _dataset = require('./dataset/dataset.actions');\n\nvar datasetActions = _interopRequireWildcard(_dataset);\n\nvar _audioPlayer = require('./common/audioPlayer/audioPlayer.actions');\n\nvar audioPlayerActions = _interopRequireWildcard(_audioPlayer);\n\nvar _store = require('./store');\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nexports.default = Object.keys(_api.actions).map(function (a) {\n  return [a, _api.actions[a]];\n}).concat([['live', liveActions], ['queue', queueActions], ['system', systemActions], ['dataset', datasetActions], ['audioPlayer', audioPlayerActions]]).map(function (p) {\n  return [p[0], (0, _redux.bindActionCreators)(p[1], _store.store.dispatch)];\n}).concat([['socket', socketActions]]).reduce(function (a, b) {\n  return (a[b[0]] = b[1]) && a;\n}, {});","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.crud_action = undefined;\nexports.crud_actions = crud_actions;\n\nvar _crud = require('./crud.fetch');\n\nvar _crud2 = require('./crud.types');\n\nvar _crud3 = require('./crud.upload');\n\nfunction crud_actions(type) {\n  var fetch_type = (0, _crud.crud_fetch)(type);\n  return ['index', 'show', 'create', 'update', 'destroy'].reduce(function (lookup, param) {\n    lookup[param] = crud_action(type, param, function (q) {\n      return fetch_type[param](q);\n    });\n    return lookup;\n  }, {\n    action: function action(method, fn) {\n      return crud_action(type, method, fn);\n    },\n    upload: function upload(id, fd) {\n      return (0, _crud3.upload_action)(type, id, fd);\n    }\n  });\n}\n\nvar crud_action = exports.crud_action = function crud_action(type, method, fn) {\n  return function (q) {\n    return function (dispatch) {\n      return new Promise(function (resolve, reject) {\n        dispatch({ type: (0, _crud2.as_type)(type, method + '_loading') });\n        fn(q).then(function (data) {\n          dispatch({ type: (0, _crud2.as_type)(type, method), data: data });\n          resolve(data);\n        }).catch(function (e) {\n          dispatch({ type: (0, _crud2.as_type)(type, method + '_error') });\n          reject(e);\n        });\n      });\n    };\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.destroy = undefined;\nexports.crud_fetch = crud_fetch;\nexports._get_headers = _get_headers;\nexports.post = post;\nexports.postBody = postBody;\nexports.put = put;\n\nvar _nodeFetch = require('node-fetch');\n\nvar _nodeFetch2 = _interopRequireDefault(_nodeFetch);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction crud_fetch(type, tag) {\n  var uri = '/api/' + type + '/' + (tag || '');\n  return {\n    index: function index(q) {\n      return (0, _nodeFetch2.default)(_get_url(uri, q), _get_headers()).then(function (req) {\n        return req.json();\n      }).catch(error);\n    },\n\n    show: function show(id) {\n      return (0, _nodeFetch2.default)(uri + id, _get_headers(), _get_headers()).then(function (req) {\n        return req.json();\n      }).catch(error);\n    },\n\n    create: function create(data) {\n      return (0, _nodeFetch2.default)(uri, post(data)).then(function (req) {\n        return req.json();\n      }).catch(error);\n    },\n\n    update: function update(data) {\n      return (0, _nodeFetch2.default)(uri + data.id, put(data)).then(function (req) {\n        return req.json();\n      }).catch(error);\n    },\n\n    destroy: function destroy(data) {\n      return (0, _nodeFetch2.default)(uri + data.id, _destroy(data)).then(function (req) {\n        return req.json();\n      }).catch(error);\n    }\n  };\n}\n\nfunction _get_url(_url, data) {\n  var url = new URL(window.location.origin + _url);\n  if (data) {\n    Object.keys(data).forEach(function (key) {\n      return url.searchParams.append(key, data[key]);\n    });\n  }\n  return url;\n}\nfunction _get_headers() {\n  return {\n    method: 'GET',\n    credentials: 'same-origin',\n    headers: {\n      'Accept': 'application/json'\n    }\n  };\n}\nfunction post(data) {\n  return {\n    method: 'POST',\n    body: JSON.stringify(data),\n    credentials: 'same-origin',\n    headers: {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json'\n    }\n  };\n}\nfunction postBody(data) {\n  return {\n    method: 'POST',\n    body: data,\n    credentials: 'same-origin',\n    headers: {\n      'Accept': 'application/json'\n    }\n  };\n}\nfunction put(data) {\n  return {\n    method: 'PUT',\n    body: JSON.stringify(data),\n    credentials: 'same-origin',\n    headers: {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json'\n    }\n  };\n}\nfunction _destroy(data) {\n  return {\n    method: 'DELETE',\n    body: JSON.stringify(data),\n    credentials: 'same-origin',\n    headers: {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json'\n    }\n  };\n}\nexports.destroy = _destroy;\nfunction error(err) {\n  console.warn(err);\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nvar as_type = exports.as_type = function as_type(a, b) {\n  return [a, b].join('_').toUpperCase();\n};\n\nvar with_type = exports.with_type = function with_type(type, actions) {\n  return actions.reduce(function (a, b) {\n    return (a[b] = as_type(type, b)) && a;\n  }, {});\n};\n\nvar crud_type = exports.crud_type = function crud_type(type) {\n  var actions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n  return with_type(type, actions.concat(['index_loading', 'index', 'index_error', 'show_loading', 'show', 'show_error', 'create_loading', 'create', 'create_error', 'update_loading', 'update', 'update_error', 'destroy_loading', 'destroy', 'destroy_error', 'upload_loading', 'upload_progress', 'upload_waiting', 'upload_complete', 'upload_error', 'sort']));\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.upload_action = undefined;\nexports.crud_upload = crud_upload;\n\nvar _crud = require('./crud.types');\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction crud_upload(type, fd, data, dispatch) {\n  return new Promise(function (resolve, reject) {\n    var id = data.id;\n\n    Object.keys(data).forEach(function (key) {\n      if (key !== 'id') {\n        fd.append(key, data[key]);\n      }\n    });\n\n    console.log('/api/' + type + '/' + id + '/upload/');\n\n    var xhr = new XMLHttpRequest();\n    xhr.upload.addEventListener(\"progress\", uploadProgress, false);\n    xhr.addEventListener(\"load\", uploadComplete, false);\n    xhr.addEventListener(\"error\", uploadFailed, false);\n    xhr.addEventListener(\"abort\", uploadCancelled, false);\n    xhr.open(\"POST\", '/api/' + type + '/' + id + '/upload/');\n    xhr.send(fd);\n\n    dispatch && dispatch({ type: (0, _crud.as_type)(type, 'upload_loading') });\n\n    var complete = false;\n\n    function uploadProgress(e) {\n      if (e.lengthComputable) {\n        var percent = Math.round(e.loaded * 100 / e.total) || 0;\n        if (percent > 99) {\n          dispatch && dispatch(_defineProperty({\n            type: (0, _crud.as_type)(type, 'upload_waiting'),\n            percent: percent\n          }, type, id));\n        } else {\n          dispatch && dispatch(_defineProperty({\n            type: (0, _crud.as_type)(type, 'upload_progress'),\n            percent: percent\n          }, type, id));\n        }\n      } else {\n        dispatch && dispatch(_defineProperty({\n          type: (0, _crud.as_type)(type, 'upload_error'),\n          error: 'unable to compute upload progress'\n        }, type, id));\n      }\n    }\n\n    function uploadComplete(e) {\n      var parsed = void 0;\n      try {\n        parsed = JSON.parse(e.target.responseText);\n      } catch (e) {\n        dispatch && dispatch(_defineProperty({\n          type: (0, _crud.as_type)(type, 'upload_error'),\n          error: 'upload failed'\n        }, type, id));\n        reject(e);\n        return;\n      }\n      dispatch && dispatch(_defineProperty({\n        type: (0, _crud.as_type)(type, 'upload_complete'),\n        data: parsed\n      }, type, id));\n      if (parsed.files && parsed.files.length) {\n        parsed.files.forEach(function (file) {\n          console.log(file);\n          dispatch && dispatch({\n            type: (0, _crud.as_type)('file', 'create'),\n            data: file\n          });\n        });\n      }\n      resolve(parsed);\n    }\n\n    function uploadFailed(evt) {\n      dispatch && dispatch(_defineProperty({\n        type: (0, _crud.as_type)(type, 'upload_error'),\n        error: 'upload failed'\n      }, type, id));\n      reject(evt);\n    }\n\n    function uploadCancelled(evt) {\n      dispatch && dispatch(_defineProperty({\n        type: (0, _crud.as_type)(type, 'upload_error'),\n        error: 'upload cancelled'\n      }, type, id));\n      reject(evt);\n    }\n  });\n}\n\nvar upload_action = exports.upload_action = function upload_action(type, id, fd) {\n  return function (dispatch) {\n    return crud_upload(type, id, fd, dispatch);\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.actions = exports.parser = exports.util = undefined;\n\nvar _crud = require('./crud.actions');\n\nvar _util = require('../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _parser = require('./parser');\n\nvar parser = _interopRequireWildcard(_parser);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/*\nfor our crud events, create corresponding actions\nthe actions fire a 'loading' event, call the underlying api method, and then resolve.\nso you can do ... \n  import { folderActions } from '../../api'\n  folderActions.index({ module: 'samplernn' })\n  folderActions.show(12)\n  folderActions.create({ module: 'samplernn', name: 'foo' })\n  folderActions.update(12, { module: 'pix2pix' })\n  folderActions.destroy(12, { confirm: true })\n  folderActions.upload(12, form_data)\n*/\n\nexports.util = _util2.default;\nexports.parser = parser;\nvar actions = exports.actions = ['folder', 'file', 'dataset', 'task', 'user'].reduce(function (a, b) {\n  return (a[b] = (0, _crud.crud_actions)(b)) && a;\n}, {});","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.tumblr = exports.thumbnail = exports.loadImage = exports.tag = exports.parse = exports.lookup = exports.integrations = undefined;\n\nvar _nodeFetch = require('node-fetch');\n\nvar _nodeFetch2 = _interopRequireDefault(_nodeFetch);\n\nvar _fetchJsonp = require('fetch-jsonp');\n\nvar _fetchJsonp2 = _interopRequireDefault(_fetchJsonp);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar integrations = exports.integrations = [{\n  type: 'image',\n  regex: /\\.(jpeg|jpg|gif|png|svg)(\\?.*)?$/i,\n  fetch: function fetch(url, done) {\n    var img = new Image();\n    img.onload = function () {\n      if (!img) return;\n      var width = img.naturalWidth,\n          height = img.naturalHeight;\n      img = null;\n      done({\n        url: url,\n        type: \"image\",\n        token: \"\",\n        thumbnail: \"\",\n        title: \"\",\n        width: width,\n        height: height\n      });\n    };\n    img.src = url;\n    if (img.complete) {\n      img.onload();\n    }\n  },\n  tag: function tag(media) {\n    return '<img src=\"' + media.url + '\">';\n  }\n}, {\n  type: 'video',\n  regex: /\\.(mp4|webm)(\\?.*)?$/i,\n  fetch: function fetch(url, done) {\n    var video = document.createElement(\"video\");\n    var url_parts = url.replace(/\\?.*$/, \"\").split(\"/\");\n    var filename = url_parts[url_parts.length - 1];\n    video.addEventListener(\"loadedmetadata\", function () {\n      var width = video.videoWidth,\n          height = video.videoHeight;\n      video = null;\n      done({\n        url: url,\n        type: \"video\",\n        token: url,\n        thumbnail: \"/public/assets/img/video-thumbnail.png\",\n        title: filename,\n        width: width,\n        height: height\n      });\n    });\n    video.src = url;\n    video.load();\n  },\n  tag: function tag(media) {\n    return '<video src=\"' + media.url + '\">';\n  }\n}, {\n  type: 'audio',\n  regex: /\\.(wav|mp3)(\\?.*)?$/i,\n  fetch: function fetch(url, done) {\n    var audio = document.createElement(\"audio\");\n    var url_parts = url.replace(/\\?.*$/, \"\").split(\"/\");\n    var filename = url_parts[url_parts.length - 1];\n    audio.addEventListener(\"loadedmetadata\", function () {\n      var duration = audio.duration;\n      audio = null;\n      done({\n        url: url,\n        type: \"audio\",\n        token: url,\n        thumbnail: \"/public/assets/img/audio-thumbnail.png\",\n        title: filename,\n        duration: duration\n      });\n    });\n    audio.src = url;\n    audio.load();\n  },\n  tag: function tag(media) {\n    return '<audio src=\"' + media.url + '\">';\n  }\n}, {\n  type: 'youtube',\n  regex: /(?:youtube\\.com\\/(?:[^\\/]+\\/.+\\/|(?:v|e(?:mbed)?)\\/|.*[?&]v=)|youtu\\.be\\/)([^\"&?\\/ ]{11})/i,\n  fetch: function fetch(url, done) {\n    var id = (url.match(/v=([-_a-zA-Z0-9]{11})/i) || url.match(/youtu.be\\/([-_a-zA-Z0-9]{11})/i) || url.match(/embed\\/([-_a-zA-Z0-9]{11})/i))[1].split('&')[0];\n    var thumb = \"https://i.ytimg.com/vi/\" + id + \"/hqdefault.jpg\";\n\n    var jsonp_url = new URL('https://www.googleapis.com/youtube/v3/videos');\n    var data = {\n      id: id,\n      key: \"AIzaSyCaLRGY-hxs92045X-Jew7w1FgQPkStHgc\",\n      part: \"id,contentDetails,snippet,status\"\n    };\n    Object.keys(data).forEach(function (key) {\n      return jsonp_url.searchParams.append(key, data[key]);\n    });\n\n    (0, _fetchJsonp2.default)(jsonp_url.toString()).then(function (result) {\n      return result.json();\n    }).then(function (result) {\n      if (!result || !result.items.length) {\n        return alert(\"Sorry, this video URL is invalid.\");\n      }\n      var res = result.items[0];\n      // console.log(res)\n\n      var dd = res.contentDetails.duration.match(/\\d+/g).map(function (i) {\n        return parseInt(i);\n      });\n      var duration = 0;\n      if (dd.length == 3) {\n        duration = dd[0] * 60 + dd[1] * 60 + dd[2];\n      } else if (dd.length == 2) {\n        duration = dd[0] * 60 + dd[1];\n      } else {\n        duration = dd[0];\n      }\n\n      [\"maxres\", \"high\", \"medium\", \"standard\", \"default\"].some(function (t) {\n        if (res.snippet.thumbnails[t]) {\n          thumb = res.snippet.thumbnails[t].url;\n          return true;\n        }\n        return false;\n      });\n\n      done({\n        url: url,\n        type: \"youtube\",\n        token: id,\n        thumbnail: thumb,\n        title: res.snippet.title,\n        duration: duration,\n        width: 640,\n        height: 360\n      });\n    });\n  },\n  tag: function tag(media) {\n    // return '<img class=\"video\" type=\"youtube\" vid=\"'+media.token+'\" src=\"'+media.thumbnail+'\"><span class=\"playvid\">&#9654;</span>';\n    return '<div class=\"video\" style=\"width: ' + media.width + 'px; height: ' + media.height + 'px; overflow: hidden; position: relative;\"><iframe frameborder=\"0\" scrolling=\"no\" seamless=\"seamless\" webkitallowfullscreen=\"webkitAllowFullScreen\" mozallowfullscreen=\"mozallowfullscreen\" allowfullscreen=\"allowfullscreen\" id=\"okplayer\" width=\"' + media.width + '\" height=\"' + media.height + '\" src=\"https://youtube.com/embed/' + media.token + '?showinfo=0\" style=\"position: absolute; top: 0px; left: 0px; width: ' + media.width + 'px; height: ' + media.height + 'px;\"></iframe></div>';\n  }\n}, {\n  type: 'vimeo',\n  regex: /vimeo.com\\/\\d+$/i,\n  fetch: function fetch(url, done) {\n    var id = url.match(/\\d+$/i)[0];\n    (0, _nodeFetch2.default)('https://vimeo.com/api/v2/video/' + id + '.json').then(function (result) {\n      return result.json();\n    }).then(function (result) {\n      if (result.length == 0) {\n        return done(id, \"\", 640, 360);\n      }\n      var res = result[0];\n      if (res.embed_privacy != \"anywhere\") {\n        alert(\"Sorry, the author of this video has marked it private, preventing it from being embedded.\", function () {});\n        return;\n      }\n      done({\n        url: url,\n        type: \"vimeo\",\n        token: id,\n        thumbnail: res.thumbnail_large,\n        duration: res.duration,\n        title: res.title,\n        width: res.width,\n        height: res.height\n      });\n    });\n  },\n  tag: function tag(media) {\n    // return '<img class=\"video\" type=\"vimeo\" vid=\"'+media.token+'\" src=\"'+media.thumbnail+'\"><span class=\"playvid\">&#9654;</span>';\n    return '<div class=\"video\" style=\"width: ' + media.width + 'px; height: ' + media.height + 'px; overflow: hidden; position: relative;\"><iframe frameborder=\"0\" scrolling=\"no\" seamless=\"seamless\" webkitallowfullscreen=\"webkitAllowFullScreen\" mozallowfullscreen=\"mozallowfullscreen\" allowfullscreen=\"allowfullscreen\" id=\"okplayer\" src=\"https://player.vimeo.com/video/' + media.token + '?api=1&title=0&byline=0&portrait=0&playbar=0&player_id=okplayer&loop=0&autoplay=0\" width=\"' + media.width + '\" height=\"' + media.height + '\" style=\"position: absolute; top: 0px; left: 0px; width: ' + media.width + 'px; height: ' + media.height + 'px;\"></iframe></div>';\n  }\n},\n// {\n//   type: 'soundcloud',\n//   regex: /soundcloud.com\\/[-a-zA-Z0-9]+\\/[-a-zA-Z0-9]+\\/?$/i,\n//   fetch: function (url, done) {\n//     fetch('https://api.soundcloud.com/resolve.json?url=' \n//         + url\n//         + '&client_id=' \n//         + '0673fbe6fc794a7750f680747e863b10')\n//     .then(result => result.json())\n//     .then(result => {\n//         console.log(result)\n//         done({\n//           url: url,\n//           type: \"soundcloud\",\n//           token: result.id,\n//           thumbnail: result.artwork_url || result.user.avatar_url,\n//           title: result.user.username + \" - \" + result.title,\n//           duration: result.duration,\n//           width: 166,\n//           height: 166,\n//         })\n//     })\n//   },\n//   tag: function (media) {\n//     return '<iframe width=\"166\" height=\"166\" scrolling=\"no\" frameborder=\"no\"' +\n//         'src=\"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/' + media.token +\n//         '&amp;color=ff6600&amp;auto_play=false&amp;show_artwork=true\"></iframe>'\n//   }\n// },\n{\n  type: 'link',\n  regex: /^http.+/i,\n  fetch: function fetch(url, done) {\n    done({\n      url: url,\n      type: \"link\",\n      token: \"\",\n      thumbnail: \"\",\n      title: \"\",\n      width: 100,\n      height: 100\n    });\n  },\n  tag: function tag(media) {\n    return '<a href=\"' + media.url + '\" target=\"_blank\">' + media.url + '</a>';\n  }\n}];\n\nvar lookup = exports.lookup = integrations.reduce(function (a, b) {\n  return (a[b.type] = b) && a;\n}, {});\n\nvar parse = exports.parse = function parse(url, cb) {\n  var matched = integrations.some(function (integration) {\n    if (integration.regex.test(url)) {\n      integration.fetch(url, function (res) {\n        cb(res);\n      });\n      return true;\n    }\n    return false;\n  });\n  if (!matched) {\n    cb(null);\n  }\n};\n\nvar tag = exports.tag = function tag(media) {\n  if (media.type in lookup) {\n    return lookup[media.type].tag(media);\n  }\n  return \"\";\n};\n\nvar loadImage = exports.loadImage = function loadImage(url, cb, error) {\n  if (lookup.image.regex.test(url)) {\n    lookup.image.fetch(url, function (media) {\n      cb(media);\n    });\n  } else error && error();\n};\n\nvar thumbnail = exports.thumbnail = function thumbnail(media) {\n  return '<img src=\"' + (media.thumbnail || media.url) + '\" class=\"thumb\">';\n};\n\nvar tumblr = exports.tumblr = function tumblr(url, cb) {\n  var domain = url.replace(/^https?:\\/\\//, \"\").split(\"/\")[0];\n  if (domain.indexOf(\".\") == -1) {\n    domain += \".tumblr.com\";\n  }\n  (0, _fetchJsonp2.default)(\"http://\" + domain + \"/api/read\").then(function (data) {\n    // const blog = data.tumblelog\n    var media_list = data.posts.reduce(parseTumblrPost, []);\n    cb(media_list);\n  });\n};\n\nfunction parseTumblrPost(media_list, post) {\n  var media = void 0,\n      caption = void 0,\n      url = void 0;\n  switch (post.type) {\n    case 'photo':\n      caption = stripHTML(post['photo-caption']);\n      if (post.photos.length) {\n        post.photos.forEach(function (photo) {\n          media = {\n            url: photo['photo-url-1280'],\n            type: \"image\",\n            token: \"\",\n            thumbnail: photo['photo-url-500'],\n            description: caption,\n            width: parseInt(photo.width),\n            height: parseInt(photo.height)\n          };\n          media_list.push(media);\n        });\n      } else {\n        media = {\n          url: post['photo-url-1280'],\n          type: \"image\",\n          token: \"\",\n          thumbnail: post['photo-url-500'],\n          description: caption,\n          width: parseInt(post.width),\n          height: parseInt(post.height)\n        };\n        media_list.push(media);\n      }\n      break;\n    case 'video':\n      url = post['video-source'];\n      if (url.indexOf(\"http\") !== 0) {\n        break;\n      }\n      if (lookup.youtube.regex.test(url)) {\n        var id = (url.match(/v=([-_a-zA-Z0-9]{11})/i) || url.match(/youtu.be\\/([-_a-zA-Z0-9]{11})/i) || url.match(/embed\\/([-_a-zA-Z0-9]{11})/i))[1].split('&')[0];\n        var thumb = \"https://i.ytimg.com/vi/\" + id + \"/hqdefault.jpg\";\n        media = {\n          url: post['video-source'],\n          type: \"youtube\",\n          token: id,\n          thumbnail: thumb,\n          title: stripHTML(post['video-caption']),\n          width: 640,\n          height: 360\n        };\n        media_list.push(media);\n      }\n      break;\n    default:\n      break;\n  }\n  return media_list;\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.spectrum = spectrum;\nexports.raw_spectrum = raw_spectrum;\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar scratch = document.createElement('canvas');\nvar scratchCtx = scratch.getContext('2d-lodpi');\n\nvar w = 256;\nvar h = 256;\n\nfunction spectrum(spec, x0, y0, ww, hh) {\n  var data = spec.data;\n  var fft_size = spec.fft_size;\n  var half_fft_size = spec.fft_size / 2;\n  var spec_len = data.length;\n\n  scratch.width = data.length;\n  scratch.height = half_fft_size;\n\n  var imageData = ctx.createImageData(scratch.width, scratch.height);\n  var pixels = imageData.data;\n\n  var i = void 0,\n      j = void 0,\n      u = void 0,\n      v = void 0,\n      _r = void 0,\n      _i = void 0,\n      col = void 0,\n      hsl = void 0;\n\n  for (i = 0; i < spec_len; i++) {\n    col = data[i];\n\n    for (j = 0; j < half_fft_size; j++) {\n      u = ((half_fft_size - j) * spec_len + i) * 4;\n      v = j * 2;\n      _r = col[v];\n      _i = mod(col[v + 1], Math.PI * 2) / (Math.PI * 2);\n      hsl = color.hsl2rgb((_i + 1) / 2, 1.0, 1 - Math.abs(_r / 10));\n      // red - real part\n      // pixels[u] = _r * 127 + 127\n      // // green - imag part\n      // pixels[u+1] = _i * 127 + 127\n      // // blue - magnitude\n      // pixels[u+2] = Math.sqrt(Math.pow(_r, 2) + Math.pow(_i, 2)) * 128 + 127\n      // pixels[u+3] = 255\n      pixels[u] = hsl[0];\n      pixels[u + 1] = hsl[1];\n      pixels[u + 2] = hsl[2];\n      pixels[u + 3] = 255;\n    }\n  }\n\n  scratchCtx.putImageData(imageData, 0, 0);\n\n  var pcm_length = spec.fft_overlap * spec_len;\n\n  x0 = x0 * devicePixelRatio || 0;\n  y0 = y0 * devicePixelRatio || Math.floor(h / 4);\n  ww = ww * devicePixelRatio || w;\n  hh = hh * devicePixelRatio || h / 4;\n\n  var width = Math.round(pcm_length / spec.sr * pixels_per_second);\n  var height = Math.floor(hh);\n\n  ctx.save();\n  clear(1, x0, y0, w, height);\n  ctx.drawImage(scratch, x0, y0, width, height);\n  ctx.restore();\n}\n\nfunction raw_spectrum(spec, x0, y0, ww, hh, def_min_r, def_min_i) {\n  var data = spec.data;\n  var fft_size = spec.fft_size;\n  var half_fft_size = spec.fft_size / 2;\n  var spec_len = data.length;\n\n  var _scratch = document.createElement('canvas');\n  var _scratchCtx = _scratch.getContext('2d-lodpi');\n  _scratch.width = data.length;\n  _scratch.height = half_fft_size;\n  // console.log(\"spectrum w/h:\", _scratch.width, _scratch.height)\n\n  var imageData = _scratchCtx.createImageData(_scratch.width, _scratch.height);\n  var pixels = imageData.data;\n\n  var i = void 0,\n      j = void 0,\n      u = void 0,\n      v = void 0,\n      _r = void 0,\n      _i = void 0,\n      col = void 0,\n      hsl = void 0;\n  // let min_r = Infinity, max_r = -Infinity\n  // let min_i = Infinity, max_i = -Infinity\n\n  // determined empirically..\n  // let min_r = -60.4894057005308\n  // let max_r = 107.23800966675353\n  // let min_i = -59.4894057005308\n  // let max_i = 108.23800966675353\n  var min_r = -def_min_r;\n  var max_r = def_min_r;\n  var min_i = -def_min_i;\n  var max_i = def_min_i;\n  var delta_r = max_r - min_r;\n  var delta_i = max_i - min_i;\n  var mean_r = 0;\n  var mean_i = 0;\n  var sum_mean_r = 0,\n      sum_mean_i = 0;\n  var real = void 0,\n      imag = void 0;\n\n  for (i = 0; i < spec_len; i++) {\n    col = data[i];\n    mean_r = 0;\n    mean_i = 0;\n\n    for (j = 0; j < half_fft_size; j++) {\n      u = (j * spec_len + i) * 4;\n      v = j * 2;\n      real = col[v];\n      imag = col[v + 1];\n      mean_r += real;\n      mean_i += imag;\n      _r = _util2.default.clamp((real - min_r) / delta_r * 255, 0, 255);\n      _i = _util2.default.clamp((imag - min_i) / delta_i * 255, 0, 255);\n\n      // hsl = color.hsl2rgb((_i + 1) / 2, 1.0, 1 - Math.abs(_r / 10))\n      pixels[u + 0] = _r;\n      pixels[u + 1] = _i;\n      pixels[u + 2] = 127; // hsl[2]\n      pixels[u + 3] = 255;\n\n      // min_r = Math.min(min_r, col[v])\n      // max_r = Math.max(max_r, col[v])\n      // min_i = Math.min(min_i, col[v]+1)\n      // max_i = Math.max(max_i, col[v]+1)\n    }\n    mean_r /= half_fft_size;\n    mean_i /= half_fft_size;\n    sum_mean_r += mean_r;\n    sum_mean_i += mean_i;\n  }\n\n  sum_mean_r /= spec_len;\n  sum_mean_i /= spec_len;\n  // console.log(sum_mean_r, sum_mean_i)\n  // console.log(\"r:\", min_r, max_r)\n  // console.log(\"i:\", min_i, max_i)\n  _scratchCtx.putImageData(imageData, 0, 0);\n\n  return { canvas: _scratch, imageData: imageData };\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.requestAudioContext = requestAudioContext;\n\nvar _tone = require('tone');\n\nvar _tone2 = _interopRequireDefault(_tone);\n\nvar _startAudioContext = require('./startAudioContext');\n\nvar _startAudioContext2 = _interopRequireDefault(_startAudioContext);\n\nvar _util = require('../../util');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction requestAudioContext(fn) {\n  if (_util.is_mobile) {\n    var container = document.createElement('div');\n    var button = document.createElement('div');\n    button.innerHTML = 'Tap to start - please unmute your phone';\n    Object.assign(container.style, {\n      display: 'block',\n      position: 'absolute',\n      width: '100%',\n      height: '100%',\n      zIndex: '10000',\n      top: '0px',\n      left: '0px',\n      backgroundColor: 'rgba(0, 0, 0, 0.8)'\n    });\n    Object.assign(button.style, {\n      display: 'block',\n      position: 'absolute',\n      left: '50%',\n      top: '50%',\n      padding: '20px',\n      backgroundColor: '#7F33ED',\n      color: 'white',\n      fontFamily: 'monospace',\n      borderRadius: '3px',\n      transform: 'translate3D(-50%,-50%,0)',\n      textAlign: 'center',\n      lineHeight: '1.5',\n      width: '150px'\n    });\n    container.appendChild(button);\n    document.body.appendChild(container);\n    _startAudioContext2.default.setContext(_tone2.default.context);\n    _startAudioContext2.default.on(button);\n    _startAudioContext2.default.onStarted(function (_) {\n      container.remove();\n      fn();\n    });\n  } else {\n    fn();\n  }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _tone = require('tone');\n\nvar _tone2 = _interopRequireDefault(_tone);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// const compressor = new Tone.Compressor(-30, 3).toMaster()\n\nvar compressor = new _tone2.default.Compressor(-30, 3).toMaster();\nvar gain = new _tone2.default.Gain(1).connect(compressor);\n\nexports.default = gain;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _tone = require('tone');\n\nvar _tone2 = _interopRequireDefault(_tone);\n\nvar _util = require('../../util');\n\nvar _signalWindows = require('signal-windows');\n\nvar _fft = require('fft.js');\n\nvar _fft2 = _interopRequireDefault(_fft);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar fft_size = 512;\nvar fft_overlap = fft_size / 4;\n\nvar fft = new _fft2.default(fft_size);\n\nfunction toSpectrum(pcm, sr) {\n  sr = sr || 44100;\n  var ham = _signalWindows.windows.construct('ham', fft_size);\n  var pcm_in = new Array(fft_size);\n  var pcm_length = pcm.length;\n  var pcm_q_length = Math.ceil(pcm_length / fft_size) * fft_size;\n  var i = void 0,\n      j = void 0,\n      fft_out = void 0,\n      data = [];\n  for (i = -fft_size; i < pcm_q_length; i += fft_overlap) {\n    for (j = 0; j < fft_size; j++) {\n      pcm_in[j] = pcm[i + j] * ham[j] || 0;\n    }\n    fft_out = fft.createComplexArray();\n    fft.realTransform(fft_out, pcm_in);\n    fft.completeSpectrum(fft_out);\n    data.push(fft_out);\n  }\n  return {\n    data: data,\n    sr: sr,\n    fft_size: fft_size,\n    fft_overlap: fft_overlap\n  };\n}\n\nfunction fromSpectrum(spec) {\n  var data = spec.data;\n  var sr = spec.sr;\n  var fft_size = spec.fft_size;\n  var fft_overlap = spec.fft_overlap;\n  var spec_len = data.length;\n\n  var ham = _signalWindows.windows.construct('ham', fft_size);\n  var out = fft.createComplexArray();\n  var pcm_length = fft_overlap * spec_len;\n\n  var audioBuffer = _tone2.default.context.createBuffer(1, pcm_length, sr);\n  var pcm = audioBuffer.getChannelData(0);\n\n  var i = void 0,\n      j = void 0,\n      u = void 0,\n      col = void 0;\n\n  for (i = 0; i < spec_len; i++) {\n    col = data[i];\n    // for (j = fft_size; j < fft_size << 1; j++) {\n    //   col[j] = 0\n    // }\n    // if (i == 0) console.log(col)\n    fft.inverseTransform(out, col);\n    u = i * fft_overlap;\n    for (j = 0; j < fft_size; j++) {\n      pcm[u + j] += out[j * 2] * ham[j] || 0;\n    }\n  }\n\n  fadeInOut(pcm, fft_size);\n  // console.log(pcm)\n  return audioBuffer;\n}\n\nfunction fromImageData(imageData, sr, _r, _i) {\n  var pixels = imageData.data;\n  var w = imageData.width;\n  var h = imageData.height;\n  var data = new Array(w);\n  var x = void 0,\n      y = void 0,\n      u = void 0,\n      v = void 0,\n      v2 = void 0;\n  for (y = 0; y < h; y++) {\n    var col = data[y] = new Float32Array(h * 4);\n    for (x = 0; x < w; x++) {\n      u = (x * w + y) * 4;\n      v = x * 2;\n      col[v] = (pixels[u] / 255 - 0.5) * _r;\n      col[v + 1] = (pixels[u + 1] / 255 - 0.5) * _i;\n      v2 = (h - y + h) * 2;\n      col[v2] = col[v];\n      col[v2 + 1] = 0; // col[v+1]\n    }\n    col[h * 2] = col[h * 2 + 1] = col[h * 2 - 1] = col[h * 2 - 2] = 0;\n  }\n  var spec = {\n    data: data,\n    sr: sr,\n    fft_size: fft_size, fft_overlap: fft_overlap\n  };\n  return spec;\n}\n\nfunction binToHz(spec, i) {\n  return i / spec.fft_size * spec.sr;\n}\n\nfunction fadeInOut(pcm, fade_size) {\n  var pcm_length = pcm.length;\n  var fade = 0,\n      i = void 0;\n  for (i = 0; i < fade_size; i++) {\n    fade = i / fade_size;\n    fade *= fade;\n    pcm[i] *= fade;\n    pcm[pcm_length - i] *= fade;\n  }\n}\nfunction rotatePhase(spec, theta) {\n  var data = spec.data,\n      fft_size = spec.fft_size;\n\n  var i = void 0,\n      j = void 0,\n      col = void 0,\n      len = data.length;\n  for (i = 0; i < len; i++) {\n    col = data[i];\n    for (j = 0; j < fft_size; j++) {\n      col[j * 2 + 1] += theta;\n    }\n  }\n  return spec;\n}\n\nfunction linearBins(spec, n) {\n  n = n || 1;\n\n  var bins = [],\n      i = void 0,\n      q_i = void 0;\n  for (q_i = 0; q_i < n; q_i++) {\n    bins[q_i] = [];\n  }\n  var step = Math.floor(spec.fft_size / n);\n  var len_quantize_n = (0, _util.quantize)(spec.fft_size, n);\n  for (i = 0; i < len_quantize_n; i++) {\n    q_i = Math.floor(i / step);\n    bins[q_i] = bins[q_i] || [];\n    bins[q_i].push(i);\n  }\n  // leftover bins get put at end\n  for (; i < spec.fft_size; i++) {\n    bins[q_i].push(i);\n  }\n  return bins;\n}\nfunction logarithmicBins(spec) {\n  var bins = [],\n      i = void 0,\n      j = void 0,\n      q_i = void 0;\n  var binCount = Math.log2(spec.fft_size) - 1;\n  for (i = 0, q_i = 0, j = 0; i < binCount; i++) {\n    j += 1 << i;\n    bins[i] = [];\n    for (; q_i < j; q_i++) {\n      bins[i].push(q_i);\n    }\n  }\n  return bins;\n}\nfunction concatBins(bins) {\n  return bins.reduce(function (acc, cv) {\n    return acc.concat(cv);\n  }, []);\n}\nfunction reverseBins(bins) {\n  return bins.map(function (bin) {\n    return bin.reverse();\n  });\n}\nfunction minBins(bins) {\n  return bins.map(function (bin) {\n    var b = bin[0];\n    return bin.map(function () {\n      return b;\n    });\n  });\n}\nfunction maxBins(bins) {\n  return bins.map(function (bin) {\n    var b = bin[bin.length - 1];\n    return bin.map(function () {\n      return b;\n    });\n  });\n}\nfunction rotateSpectrum(spec, n) {\n  var fft_size = spec.fft_size;\n\n  if (n && n < 1) {\n    n -= 0.5;\n    n *= fft_size;\n  }\n  n = Math.floor(n);\n  var order = new Array(fft_size),\n      i = void 0;\n  for (i = 0; i < fft_size; i++) {\n    order[i] = (0, _util.mod)(i + n, fft_size / 2);\n  }\n  return reorderBins(spec, order);\n}\nfunction cloneSpectrum(spec) {\n  var data = spec.data,\n      fft_size = spec.fft_size,\n      sr = spec.sr,\n      fft_overlap = spec.fft_overlap;\n\n  var spec_len = data.length;\n\n  var new_data = new Array(spec_len);\n  var i = void 0;\n  for (i = 0; i < spec_len; i++) {\n    new_data[i] = data[i].concat();\n    new_data[i][2] = 0;\n  }\n\n  return {\n    data: new_data,\n    fft_size: fft_size,\n    sr: sr, fft_overlap: fft_overlap\n  };\n}\nfunction reverseSpectrum(spec) {\n  var new_spec = cloneSpectrum(spec);\n  new_spec.data = new_spec.data.reverse();\n  return new_spec;\n}\nfunction shuffleSpectrum(spec) {\n  var fft_size = spec.fft_size;\n\n  var order = new Array(fft_size),\n      i = void 0;\n  for (i = 0; i < fft_size; i++) {\n    order[i] = i;\n  }\n  (0, _util.shuffle)(order);\n  return reorderBins(spec, order);\n}\nfunction invertSpectrum(spec) {\n  var fft_size = spec.fft_size;\n\n  var order = new Array(fft_size),\n      i = void 0;\n  for (i = 0; i < fft_size; i++) {\n    order[i] = fft_size - i - 1;\n  }\n  return reorderBins(spec, order);\n}\nfunction reorderBins(spec, order) {\n  var new_spec = cloneSpectrum(spec);\n  var data = spec.data,\n      sr = spec.sr,\n      fft_size = spec.fft_size,\n      fft_overlap = spec.fft_overlap;\n\n  var spec_len = data.length;\n  var new_data = new_spec.data;\n\n\n  var i = void 0,\n      j = void 0,\n      col = void 0,\n      new_col = void 0;\n  for (j = order.length; j < fft_size; j++) {\n    order[j] = j;\n  }\n\n  for (i = 0; i < spec_len; i++) {\n    col = data[i];\n    new_col = new_data[i] = data[i].concat();\n    col[0] = 0;\n    col[2] = 0;\n    col[4] = 0;\n    for (j = 0; j < fft_size / 2; j++) {\n      new_col[j * 2] = col[order[j] * 2];\n      new_col[j * 2 + 1] = col[order[j] * 2 + 1];\n    }\n    for (; j < fft_size; j++) {\n      new_col[j * 2] = 0;\n      new_col[j * 2 + 1] = 0;\n    }\n  }\n\n  return {\n    data: new_data,\n    sr: sr, fft_size: fft_size, fft_overlap: fft_overlap\n  };\n}\n\nexports.default = {\n  fft_size: fft_size, fft_overlap: fft_overlap,\n  toSpectrum: toSpectrum, fromSpectrum: fromSpectrum, fromImageData: fromImageData, binToHz: binToHz,\n  fadeInOut: fadeInOut,\n  cloneSpectrum: cloneSpectrum,\n  reverseSpectrum: reverseSpectrum, shuffleSpectrum: shuffleSpectrum, invertSpectrum: invertSpectrum, rotateSpectrum: rotateSpectrum,\n  reorderBins: reorderBins,\n  linearBins: linearBins, logarithmicBins: logarithmicBins,\n  concatBins: concatBins,\n  reverseBins: reverseBins, minBins: minBins, maxBins: maxBins,\n  rotatePhase: rotatePhase\n};","\"use strict\";\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/**\n *  StartAudioContext.js\n *  @author Yotam Mann\n *  @license http://opensource.org/licenses/MIT MIT License\n *  @copyright 2016 Yotam Mann\n */\n(function (root, factory) {\n  if (typeof define === \"function\" && define.amd) {\n    define([], factory);\n  } else if ((typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) === 'object' && module.exports) {\n    module.exports = factory();\n  } else {\n    root.StartAudioContext = factory();\n  }\n})(undefined, function () {\n\n  /**\n   * The StartAudioContext object\n   */\n  var StartAudioContext = {\n    /**\n     * The audio context passed in by the user\n     * @type {AudioContext}\n     */\n    context: null,\n    /**\n     * The TapListeners bound to the elements\n     * @type {Array}\n     * @private\n     */\n    _tapListeners: [],\n    /**\n     * Callbacks to invoke when the audio context is started\n     * @type {Array}\n     * @private\n     */\n    _onStarted: []\n  };\n\n  /**\n   * Set the context\n   * @param {AudioContext} ctx\n   * @returns {StartAudioContext}\n   */\n  StartAudioContext.setContext = function (ctx) {\n    StartAudioContext.context = ctx;\n    return StartAudioContext;\n  };\n\n  /**\n   * Add a tap listener to the audio context\n   * @param  {Array|Element|String|jQuery} element\n   * @returns {StartAudioContext}\n   */\n  StartAudioContext.on = function (element) {\n    if (Array.isArray(element) || NodeList && element instanceof NodeList) {\n      for (var i = 0; i < element.length; i++) {\n        StartAudioContext.on(element[i]);\n      }\n    } else if (typeof element === \"string\") {\n      StartAudioContext.on(document.querySelectorAll(element));\n    } else if (element.jquery && typeof element.toArray === \"function\") {\n      StartAudioContext.on(element.toArray());\n    } else if (Element && element instanceof Element) {\n      //if it's an element, create a TapListener\n      var tap = new TapListener(element, onTap);\n      StartAudioContext._tapListeners.push(tap);\n    }\n    return StartAudioContext;\n  };\n\n  /**\n   * Bind a callback to when the audio context is started. \n   * @param {Function} cb\n   * @return {StartAudioContext}\n   */\n  StartAudioContext.onStarted = function (cb) {\n    //if it's already started, invoke the callback\n    if (StartAudioContext.isStarted()) {\n      cb();\n    } else {\n      StartAudioContext._onStarted.push(cb);\n    }\n    return StartAudioContext;\n  };\n\n  /**\n   * returns true if the context is started\n   * @return {Boolean}\n   */\n  StartAudioContext.isStarted = function () {\n    return StartAudioContext.context !== null && StartAudioContext.context.state === \"running\";\n  };\n\n  /**\n   * @class  Listens for non-dragging tap ends on the given element\n   * @param {Element} element\n   * @internal\n   */\n  var TapListener = function TapListener(element) {\n\n    this._dragged = false;\n\n    this._element = element;\n\n    this._bindedMove = this._moved.bind(this);\n    this._bindedEnd = this._ended.bind(this);\n\n    element.addEventListener(\"touchmove\", this._bindedMove);\n    element.addEventListener(\"touchend\", this._bindedEnd);\n    element.addEventListener(\"mouseup\", this._bindedEnd);\n  };\n\n  /**\n   * drag move event\n   */\n  TapListener.prototype._moved = function (e) {\n    this._dragged = true;\n  };\n\n  /**\n   * tap ended listener\n   */\n  TapListener.prototype._ended = function (e) {\n    if (!this._dragged) {\n      onTap();\n    }\n    this._dragged = false;\n  };\n\n  /**\n   * remove all the bound events\n   */\n  TapListener.prototype.dispose = function () {\n    this._element.removeEventListener(\"touchmove\", this._bindedMove);\n    this._element.removeEventListener(\"touchend\", this._bindedEnd);\n    this._element.removeEventListener(\"mouseup\", this._bindedEnd);\n    this._bindedMove = null;\n    this._bindedEnd = null;\n    this._element = null;\n  };\n\n  /**\n   * Invoked the first time of the elements is tapped.\n   * Creates a silent oscillator when a non-dragging touchend \n   * event has been triggered.\n   */\n  function onTap() {\n    //start the audio context with a silent oscillator\n    if (StartAudioContext.context && !StartAudioContext.isStarted()) {\n      var osc = StartAudioContext.context.createOscillator();\n      var silent = StartAudioContext.context.createGain();\n      silent.gain.value = 0;\n      osc.connect(silent);\n      silent.connect(StartAudioContext.context.destination);\n      var now = StartAudioContext.context.currentTime;\n      osc.start(now);\n      osc.stop(now + 0.5);\n    }\n\n    //dispose all the tap listeners\n    if (StartAudioContext._tapListeners) {\n      for (var i = 0; i < StartAudioContext._tapListeners.length; i++) {\n        StartAudioContext._tapListeners[i].dispose();\n      }\n      StartAudioContext._tapListeners = null;\n    }\n    //the onstarted callbacks\n    if (StartAudioContext._onStarted) {\n      for (var j = 0; j < StartAudioContext._onStarted.length; j++) {\n        StartAudioContext._onStarted[j]();\n      }\n      StartAudioContext._onStarted = null;\n    }\n  }\n\n  return StartAudioContext;\n});","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.play = play;\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _tone = require('tone');\n\nvar _tone2 = _interopRequireDefault(_tone);\n\nvar _draw = require('./lib/draw');\n\nvar draw = _interopRequireWildcard(_draw);\n\nvar _output = require('./lib/output');\n\nvar _output2 = _interopRequireDefault(_output);\n\nvar _spectrum = require('./lib/spectrum');\n\nvar _spectrum2 = _interopRequireDefault(_spectrum);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _r = 8;\nvar _i = 8;\n\nfunction play(frame) {\n  // const { canvas, imageData } = draw.raw_spectrum(fft, 0, 256, 0, 256, 1, 1)\n  // console.log(_r, _i)\n  // const { canvas, imageData } = draw.raw_spectrum(player.fft, 0, 256, 0, 256, _r, _i)\n  var new_fft = _spectrum2.default.fromImageData(frame.imageData, 44100, _r, _i);\n  // gallery.innerHTML = ''\n\n  // console.log(player.fft.data, new_fft.data)\n  var buf = _spectrum2.default.fromSpectrum(new_fft);\n  var _p = new _tone2.default.Player(buf);\n  _p.connect(_output2.default);\n  _p.start(_tone2.default.now());\n  // redraw(new_fft)\n}\n// function redraw(new_fft){\n//   const { canvas, imageData } = draw.raw_spectrum(new_fft, 0, 256, 0, 256, _r, _i)\n// }","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.buildZip = exports.renderFrames = exports.loadPCM = exports.loadBuffer = exports.spectrum = exports.FRAME_STEP = exports.FRAME_LENGTH = undefined;\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _tone = require('tone');\n\nvar _tone2 = _interopRequireDefault(_tone);\n\nvar _jszip = require('jszip');\n\nvar _jszip2 = _interopRequireDefault(_jszip);\n\nvar _sprintfJs = require('sprintf-js');\n\nvar _draw = require('./lib/draw');\n\nvar draw = _interopRequireWildcard(_draw);\n\nvar _output = require('./lib/output');\n\nvar _output2 = _interopRequireDefault(_output);\n\nvar _spectrum = require('./lib/spectrum');\n\nvar _spectrum2 = _interopRequireDefault(_spectrum);\n\nvar _lib = require('./lib');\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar FRAME_LENGTH = exports.FRAME_LENGTH = 126 * 255;\nvar FRAME_STEP = exports.FRAME_STEP = Math.round(FRAME_LENGTH / 4);\n\nvar _r = 8;\nvar _i = 8;\n\nexports.spectrum = _spectrum2.default;\n// requestAudioContext(() => {})\n\nvar loadBuffer = exports.loadBuffer = function loadBuffer(file) {\n  return new Promise(function (resolve, reject) {\n    var url = URL.createObjectURL(file);\n    var buffer = new _tone2.default.Buffer(url, loadBuffer, function (err) {\n      console.error('err', err);\n      reject(err);\n    });\n    function loadBuffer() {\n      URL.revokeObjectURL(url);\n      resolve(buffer);\n    }\n  });\n};\n\nvar loadPCM = exports.loadPCM = function loadPCM(file) {\n  return new Promise(function (resolve, reject) {\n    // if we've already fetched this file...\n    if (file.pcm) {\n      return resolve(file);\n    }\n    loadBuffer(file).then(function (buffer) {\n      var pcm = buffer._buffer.getChannelData(0);\n      var sr = buffer._buffer.sampleRate;\n      if (!pcm) return reject();\n      console.log(pcm.length, sr);\n      resolve({ file: file, buffer: buffer, pcm: pcm, sr: sr });\n    });\n  });\n};\n\nvar renderFrames = exports.renderFrames = function renderFrames(file, _ref) {\n  var _ref$frame_step = _ref.frame_step,\n      frame_step = _ref$frame_step === undefined ? FRAME_STEP : _ref$frame_step,\n      _ref$frame_start = _ref.frame_start,\n      frame_start = _ref$frame_start === undefined ? 0 : _ref$frame_start,\n      _ref$max = _ref.max,\n      max = _ref$max === undefined ? 12 : _ref$max;\n  return function (dispatch) {\n    return new Promise(function (resolve, reject) {\n      loadPCM(file).then(function (pcmProps) {\n        var file = pcmProps.file,\n            buffer = pcmProps.buffer,\n            pcm = pcmProps.pcm,\n            sr = pcmProps.sr;\n\n        dispatch({ type: _types2.default.wav2pix.load });\n        var frames = [];\n        var count = 0;\n        var _len = pcm.length - FRAME_LENGTH;\n        var offset = Math.round(_len * frame_start);\n        for (; offset < _len && count < max; offset += frame_step, count += 1) {\n          frames.push(render(pcm.slice(offset, offset + FRAME_LENGTH), sr, count));\n        }\n        dispatch({ type: _types2.default.wav2pix.finish, message: 'Rendered ' + count + ' images' });\n        resolve({ pcm: pcmProps, frames: frames });\n      });\n    });\n  };\n};\n\nvar buildZip = exports.buildZip = function buildZip(name, file, _ref2) {\n  var _ref2$frame_step = _ref2.frame_step,\n      frame_step = _ref2$frame_step === undefined ? FRAME_STEP : _ref2$frame_step,\n      _ref2$frame_start = _ref2.frame_start,\n      frame_start = _ref2$frame_start === undefined ? 0 : _ref2$frame_start,\n      _ref2$max = _ref2.max,\n      max = _ref2$max === undefined ? 10000 : _ref2$max;\n  return function (dispatch) {\n    return new Promise(function (resolve, reject) {\n      loadPCM(file).then(function (_ref3) {\n        var buffer = _ref3.buffer,\n            pcm = _ref3.pcm,\n            sr = _ref3.sr;\n\n        dispatch({ type: _types2.default.wav2pix.load });\n\n        var zip = new _jszip2.default();\n        var zip_folder = zip.folder(\"wav2pix_\" + name);\n\n        var steps = (pcm.length - FRAME_LENGTH) / frame_step;\n        console.log(steps);\n\n        var count = 0;\n        var _len = pcm.length - FRAME_LENGTH;\n        var offset = Math.round(_len * frame_start);\n        for (; offset < _len && count < max; offset += frame_step, count += 1) {\n          if (count % 10 === 0) {\n            dispatch({ type: _types2.default.wav2pix.progress, progress: { i: count / max * 6, n: 6 } });\n          }\n          render(pcm.slice(offset, offset + FRAME_LENGTH), sr, count, zip_folder);\n        }\n\n        // dispatch event\n        dispatch({ type: _types2.default.wav2pix.finish, message: 'Rendered ' + count + ' images' });\n        zip.generateAsync({ type: \"blob\" }).then(function (content) {\n          dispatch({ type: _types2.default.wav2pix.zip, size: content.size });\n          // FileSaver.saveAs(content, \"wav2pix_\" + name + \".zip\")\n          resolve({\n            zip: content,\n            filename: \"wav2pix_\" + name + \".zip\",\n            count: count\n          });\n        });\n      });\n    });\n  };\n};\n\nfunction render(pcm, sr, count, zip) {\n  var fft = _spectrum2.default.toSpectrum(pcm, sr);\n  // console.log('render', fft)\n  // const pcm_rev = pcm.slice().reverse()\n  // const spec_rev = spectrum.toSpectrum(pcm_rev, spec.sr)\n\n  var _draw$raw_spectrum = draw.raw_spectrum(fft, 0, 256, 0, 256, _r, _i),\n      canvas = _draw$raw_spectrum.canvas,\n      imageData = _draw$raw_spectrum.imageData;\n\n  if (zip) {\n    var name = (0, _sprintfJs.sprintf)('frame_%05d.png', count);\n    var dataURL = canvas.toDataURL(\"image/png\");\n    zip.file(name, dataURL.split(',')[1], { base64: true });\n  }\n  return { fft: fft, canvas: canvas, imageData: imageData };\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.clearCurrentUser = exports.setCurrentUser = exports.setError = exports.setReturnTo = exports.setToken = undefined;\nexports.initialized = initialized;\nexports.loading = loading;\nexports.InvalidCredentialsException = InvalidCredentialsException;\nexports.login = login;\nexports.signup = signup;\nexports.checkin = checkin;\nexports.logout = logout;\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _crud = require('../api/crud.fetch');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar setToken = exports.setToken = function setToken(data) {\n  return { type: _types2.default.auth.set_token, data: data };\n};\nvar setReturnTo = exports.setReturnTo = function setReturnTo(data) {\n  return { type: _types2.default.auth.set_return_to, data: data };\n};\nvar setError = exports.setError = function setError(data) {\n  return { type: _types2.default.auth.set_error, data: data };\n};\nvar setCurrentUser = exports.setCurrentUser = function setCurrentUser(data) {\n  return { type: _types2.default.auth.set_current_user, data: data };\n};\nvar clearCurrentUser = exports.clearCurrentUser = function clearCurrentUser() {\n  return { type: _types2.default.auth.logout_user };\n};\nfunction initialized() {\n  return { type: _types2.default.auth.initialized };\n}\nfunction loading() {\n  return { type: _types2.default.auth.loading };\n}\n\nfunction InvalidCredentialsException(message) {\n  this.message = message;\n  this.name = 'InvalidCredentialsException';\n}\n\nvar api = {\n  login: '/api/login',\n  logout: '/api/logout',\n  signup: '/api/signup',\n  checkin: '/api/checkin'\n};\n\nfunction login(username, password) {\n  return function (dispatch) {\n    dispatch(loading());\n    fetch(api.login, (0, _crud.put)({\n      username: username,\n      password: password\n    })).then(function (req) {\n      return req.json();\n    }).then(function (data) {\n      console.log(data);\n      console.log('logged in', data.user.username);\n      dispatch(setCurrentUser(data.user));\n    }).catch(function (error) {\n      console.error('login error', error);\n      dispatch(setError(true));\n    });\n  };\n}\n\nfunction signup(data) {\n  return function (dispatch) {\n    dispatch(loading());\n    fetch(api.signup, (0, _crud.put)(data)).then(function (req) {\n      return req.json();\n    }).then(function (data) {\n      console.log(data);\n      console.log('signed up', data.user.username);\n      dispatch(setCurrentUser(data.user));\n    }).catch(function (error) {\n      console.error('signup error', error);\n      dispatch(initialized());\n    });\n  };\n}\n\nfunction checkin() {\n  return function (dispatch) {\n    dispatch(loading());\n    fetch(api.checkin, (0, _crud.put)({})).then(function (req) {\n      return req.json();\n    }).then(function (data) {\n      // console.log(data)\n      console.log('checked in', data.user.username);\n      dispatch(setCurrentUser(data.user));\n    }).catch(function (error) {\n      console.error('checkin error', error);\n      dispatch(initialized());\n    });\n  };\n}\n\nfunction logout() {\n  return function (dispatch) {\n    dispatch(loading());\n    fetch(api.logout, (0, _crud._get_headers)({})).then(function (req) {\n      return req.json();\n    }).then(function (data) {\n      console.log('logged out', data);\n      dispatch(clearCurrentUser());\n      dispatch(initialized());\n    }).catch(function (error) {\n      console.error('logout error', error);\n      dispatch(clearCurrentUser());\n      dispatch(initialized());\n    });\n  };\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _store = require('../store');\n\nvar _auth = require('./auth.actions');\n\nvar authActions = _interopRequireWildcard(_auth);\n\nvar _login = require('./login.component');\n\nvar _login2 = _interopRequireDefault(_login);\n\nvar _logout = require('./logout.component');\n\nvar _logout2 = _interopRequireDefault(_logout);\n\nvar _signup = require('./signup.component');\n\nvar _signup2 = _interopRequireDefault(_signup);\n\nvar _math = require('../util/math');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n// import PropTypes from 'prop-types';\n\n\nvar AuthRouter = function (_Component) {\n  _inherits(AuthRouter, _Component);\n\n  function AuthRouter() {\n    _classCallCheck(this, AuthRouter);\n\n    return _possibleConstructorReturn(this, (AuthRouter.__proto__ || Object.getPrototypeOf(AuthRouter)).apply(this, arguments));\n  }\n\n  _createClass(AuthRouter, [{\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      return (0, _preact.h)(\n        _reactRouterDom.BrowserRouter,\n        null,\n        (0, _preact.h)(\n          'div',\n          null,\n          (0, _preact.h)('div', { className: 'diamond' }),\n          (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/', component: _login2.default }),\n          (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/login', component: _login2.default }),\n          (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/logout', component: _logout2.default }),\n          (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/signup', component: _signup2.default }),\n          (0, _preact.h)(_reactRouterDom.Route, { path: '/:module', component: function component(props) {\n              switch (props.location.pathname) {\n                case '/login':\n                case '/logout':\n                case '/signup':\n                  return null;\n              }\n              _this2.props.actions.setReturnTo(props.location.pathname);\n              return (0, _preact.h)(_reactRouterDom.Redirect, { to: '/login' });\n            } })\n        )\n      );\n    }\n  }, {\n    key: 'componentDidMount',\n    value: function componentDidMount() {\n      document.querySelector('.diamond').style.backgroundImage = 'linear-gradient(' + ((0, _math.randint)(40) - 5) + 'deg, #fde, #ffe)';\n    }\n  }]);\n\n  return AuthRouter;\n}(_preact.Component);\n\nvar AuthGate = function (_Component2) {\n  _inherits(AuthGate, _Component2);\n\n  function AuthGate() {\n    _classCallCheck(this, AuthGate);\n\n    return _possibleConstructorReturn(this, (AuthGate.__proto__ || Object.getPrototypeOf(AuthGate)).apply(this, arguments));\n  }\n\n  _createClass(AuthGate, [{\n    key: 'render',\n    value: function render() {\n      if (true && !this.props.auth.initialized) {\n        console.log('loading auth');\n        return (0, _preact.h)(\n          'div',\n          { className: 'loading' },\n          'Loading'\n        );\n      }\n      if (true || this.props.auth.isAuthenticated) {\n        console.log('authenticated...');\n        if (this.props.auth.returnTo) {\n          var returnTo = this.props.auth.returnTo;\n\n          if (!returnTo || returnTo.match(/(login|logout|signup)/i)) {\n            returnTo = '/';\n          }\n          console.log('history.push', returnTo);\n          this.props.actions.setReturnTo(null);\n          _store.history.push(returnTo);\n          return (0, _preact.h)(\n            'div',\n            null,\n            'Launching app'\n          );\n        }\n        console.log('rendering as normal');\n        return (0, _preact.h)(\n          'div',\n          null,\n          this.props.children\n        );\n      }\n      return (0, _preact.h)(AuthRouter, this.props);\n    }\n  }, {\n    key: 'componentDidMount',\n    value: function componentDidMount() {\n      this.props.actions.checkin();\n    }\n  }]);\n\n  return AuthGate;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    auth: state.auth\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n  return {\n    actions: (0, _redux.bindActionCreators)(authActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(AuthGate);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar authInitialState = {\n  token: null,\n  user: {},\n  groups: {},\n  initialized: false,\n  loading: false,\n  isAuthenticated: false,\n  returnTo: null\n};\n\nvar auth = function auth() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : authInitialState;\n  var action = arguments[1];\n\n  console.log(action);\n  switch (action.type) {\n    case _types2.default.auth.set_token:\n      return _extends({}, state, {\n        token: action.data,\n        isAuthenticated: !!action.data,\n        loading: false,\n        error: null\n      });\n\n    case _types2.default.auth.initialized:\n      return _extends({}, state, {\n        loading: false,\n        initialized: true,\n        error: null\n      });\n\n    case _types2.default.auth.loading:\n      return _extends({}, state, {\n        loading: true,\n        error: null\n      });\n\n    case _types2.default.auth.set_current_user:\n      return _extends({}, state, {\n        loading: false,\n        initialized: true,\n        isAuthenticated: true,\n        user: action.data,\n        error: null\n      });\n\n    case _types2.default.auth.set_return_to:\n      return _extends({}, state, {\n        returnTo: action.data\n      });\n\n    case _types2.default.auth.logout_user:\n      return _extends({}, authInitialState);\n\n    case _types2.default.auth.set_error:\n      return _extends({}, state, {\n        loading: false,\n        error: action.data\n      });\n\n    case _types2.default.auth.loading:\n      // const initial_state_el = document.querySelector('#initial_state')\n      // if (initial_state_el) {\n      //   try {\n      //     const initial_state = JSON.parse(initial_state_el.innerHTML)\n      //     if (initial_state && initial_state.auth && initial_state.auth.user) {\n      //       console.log(initial_state.auth.user)\n      //       return {\n      //         ...state,\n      //         user: {\n      //           ...initial_state.auth.user,\n      //         }\n      //       }\n      //     }\n      //   } catch (e) {\n      //     console.error(\"error loading initial state\")\n      //   }\n      // }\n      return state;\n\n    default:\n      return state;\n  }\n};\n\nexports.default = auth;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _auth = require('./auth.gate');\n\nvar _auth2 = _interopRequireDefault(_auth);\n\nvar _login = require('./login.component');\n\nvar _login2 = _interopRequireDefault(_login);\n\nvar _logout = require('./logout.component');\n\nvar _logout2 = _interopRequireDefault(_logout);\n\nvar _signup = require('./signup.component');\n\nvar _signup2 = _interopRequireDefault(_signup);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = {\n  Gate: _auth2.default,\n  Login: _login2.default,\n  Logout: _logout2.default,\n  Signup: _signup2.default\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _auth = require('./auth.actions');\n\nvar authActions = _interopRequireWildcard(_auth);\n\nvar _common = require('../common');\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n// import PropTypes from 'prop-types';\n\n// import { Link } from 'react-router-dom';\n\n\nvar Login = function (_Component) {\n  _inherits(Login, _Component);\n\n  function Login() {\n    _classCallCheck(this, Login);\n\n    var _this = _possibleConstructorReturn(this, (Login.__proto__ || Object.getPrototypeOf(Login)).call(this));\n\n    _this.state = {\n      username: '',\n      password: ''\n    };\n\n    _this.handleChange = _this.handleChange.bind(_this);\n    _this.handleSubmit = _this.handleSubmit.bind(_this);\n    return _this;\n  }\n\n  _createClass(Login, [{\n    key: 'handleChange',\n    value: function handleChange(value, name) {\n      var _setState;\n\n      this.setState((_setState = {}, _defineProperty(_setState, name, value), _defineProperty(_setState, 'error', null), _setState));\n    }\n  }, {\n    key: 'handleSubmit',\n    value: function handleSubmit(e) {\n      e.preventDefault();\n      if (this.props.auth.loading) return;\n      this.props.actions.login(this.state.username, this.state.password);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'form',\n        { onSubmit: this.handleSubmit },\n        (0, _preact.h)(\n          'h1',\n          null,\n          'Log in'\n        ),\n        (0, _preact.h)('br', null),\n        (0, _preact.h)(\n          _common.Group,\n          null,\n          (0, _preact.h)(_common.TextInput, {\n            autofocus: true,\n            autocapitalize: 'off',\n            autocomplete: 'off',\n            title: 'Username',\n            name: 'username',\n            type: 'text',\n            value: this.state.username,\n            onInput: this.handleChange\n          }),\n          (0, _preact.h)(_common.TextInput, {\n            title: 'Password',\n            name: 'password',\n            type: 'password',\n            value: this.state.password,\n            onInput: this.handleChange\n          }),\n          (0, _preact.h)(\n            _common.Button,\n            {\n              loading: this.props.auth.loading\n            },\n            'Login'\n          ),\n          this.renderAuthError()\n        )\n      );\n    }\n  }, {\n    key: 'renderAuthError',\n    value: function renderAuthError() {\n      if (this.props.auth.error) {\n        return (0, _preact.h)(\n          'div',\n          { className: 'form-input-hint' },\n          \"There was an error logging you in (bad password?)\"\n        );\n      }\n      return null;\n    }\n  }]);\n\n  return Login;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    auth: state.auth\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n  return {\n    actions: (0, _redux.bindActionCreators)(authActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Login);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _auth = require('./auth.actions');\n\nvar authActions = _interopRequireWildcard(_auth);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n// import PropTypes from 'prop-types';\n\n\nvar Logout = function (_Component) {\n  _inherits(Logout, _Component);\n\n  function Logout() {\n    _classCallCheck(this, Logout);\n\n    return _possibleConstructorReturn(this, (Logout.__proto__ || Object.getPrototypeOf(Logout)).apply(this, arguments));\n  }\n\n  _createClass(Logout, [{\n    key: 'componentWillMount',\n    value: function componentWillMount(props) {\n      this.props.actions.logout();\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(_reactRouterDom.Redirect, { to: '/' });\n    }\n  }]);\n\n  return Logout;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {};\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n  return {\n    actions: (0, _redux.bindActionCreators)(authActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Logout);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _auth = require('./auth.actions');\n\nvar actions = _interopRequireWildcard(_auth);\n\nvar _common = require('../common');\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Signup = function (_Component) {\n  _inherits(Signup, _Component);\n\n  function Signup() {\n    _classCallCheck(this, Signup);\n\n    var _this = _possibleConstructorReturn(this, (Signup.__proto__ || Object.getPrototypeOf(Signup)).call(this));\n\n    _this.state = {\n      username: '',\n      password: '',\n      password2: ''\n    };\n\n    _this.handleChange = _this.handleChange.bind(_this);\n    _this.handleSubmit = _this.handleSubmit.bind(_this);\n    return _this;\n  }\n\n  _createClass(Signup, [{\n    key: 'handleChange',\n    value: function handleChange(value, name) {\n      this.setState(_defineProperty({}, name, value));\n    }\n  }, {\n    key: 'validate',\n    value: function validate() {\n      if (!this.state.password || this.state.password !== this.state.password2) {\n        return false;\n      }\n      return true;\n    }\n  }, {\n    key: 'handleSubmit',\n    value: function handleSubmit(e) {\n      e.preventDefault();\n      if (this.props.auth.loading) return;\n      if (!this.validate()) {\n        return this.props.actions.setError('bad password');\n      }\n\n      var user = _objectWithoutProperties(this.state, []);\n\n      this.props.actions.signup(user);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      if (this.props.auth.isAuthenticated) {\n        var returnTo = this.props.auth.returnTo;\n\n        if (!returnTo || returnTo.match(/(api|login|logout|signup)/i)) {\n          returnTo = '/';\n        }\n        return (0, _preact.h)(_reactRouterDom.Redirect, { to: returnTo });\n      }\n      return (0, _preact.h)(\n        'form',\n        { onSubmit: this.handleSubmit },\n        (0, _preact.h)(\n          'h1',\n          null,\n          'New account'\n        ),\n        (0, _preact.h)('br', null),\n        (0, _preact.h)(\n          _common.Group,\n          null,\n          (0, _preact.h)(_common.TextInput, {\n            autofocus: true,\n            autocapitalize: 'off',\n            autocomplete: 'off',\n            title: 'Username',\n            name: 'username',\n            type: 'text',\n            value: this.state.username,\n            onInput: this.handleChange\n          }),\n          (0, _preact.h)(_common.TextInput, {\n            title: 'Password',\n            name: 'password',\n            type: 'password',\n            value: this.state.password,\n            onInput: this.handleChange\n          }),\n          (0, _preact.h)(_common.TextInput, {\n            title: 'Password again :)',\n            name: 'password2',\n            type: 'password',\n            value: this.state.password2,\n            onInput: this.handleChange\n          }),\n          (0, _preact.h)(\n            _common.Button,\n            {\n              loading: this.props.auth.loading\n            },\n            'Sign up'\n          ),\n          this.renderAuthError()\n        )\n      );\n    }\n  }, {\n    key: 'renderAuthError',\n    value: function renderAuthError() {\n      if (this.props.auth.error) {\n        return (0, _preact.h)(\n          'div',\n          { className: 'form-input-hint' },\n          \"Please doublecheck the form (o=_o~~)\"\n        );\n      }\n      return (0, _preact.h)('div', { className: 'form-input-hint' });\n    }\n  }]);\n\n  return Signup;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    auth: state.auth\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n  return {\n    actions: (0, _redux.bindActionCreators)(_extends({}, actions), dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Signup);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _common = require('../common');\n\nvar _actions = require('../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/*\n at this point we can list files\n - filelist should support parentdirectory\n - filelist should list directories first\n - handle fetching a file from the server\n   - maybe don't let it fetch if it's larger than 2 megs?\n*/\n\nvar Browser = function (_Component) {\n  _inherits(Browser, _Component);\n\n  function Browser() {\n    var _ref;\n\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, Browser);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Browser.__proto__ || Object.getPrototypeOf(Browser)).call.apply(_ref, [this].concat(args))), _this), _this.state = {\n      dir: '/',\n      module: 'pix2pixhd',\n      files: [],\n      loading: true\n    }, _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  _createClass(Browser, [{\n    key: 'componentDidMount',\n    value: function componentDidMount() {\n      this.fetch(this.state.dir);\n    }\n  }, {\n    key: 'handlePick',\n    value: function handlePick(file) {\n      console.log(file);\n      this.fetch([this.state.dir, file.name].join('/').replace('//', '/'));\n    }\n  }, {\n    key: 'fetch',\n    value: function fetch(dir) {\n      var _this2 = this;\n\n      console.log('fetch', dir);\n      var module = this.state.module;\n\n      this.setState({ dir: dir, loading: true });\n      _actions2.default.socket.list_directory({ module: module, dir: dir }).then(function (files) {\n        console.log(files);\n        _this2.setState({ dir: dir, files: files, loading: false });\n      });\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this3 = this;\n\n      var app = this.props.app;\n      var _state = this.state,\n          loading = _state.loading,\n          dir = _state.dir,\n          module = _state.module,\n          files = _state.files;\n\n      console.log(this.props, this.state);\n      return (0, _preact.h)(\n        'div',\n        { className: 'app browser' },\n        (0, _preact.h)(\n          'h1',\n          null,\n          dir\n        ),\n        app.tool,\n        (0, _preact.h)('br', null),\n        loading && (0, _preact.h)(_common.Loading, null),\n        (0, _preact.h)(_common.FileList, {\n          files: files,\n          groupDirectories: true,\n          parentDirectory: dir !== '/',\n          orderBy: 'name asc',\n          fields: 'name datetime size',\n          onClick: function onClick(file, e) {\n            e.preventDefault();\n            e.stopPropagation();\n            console.log('picked a result', file);\n            _this3.handlePick(file);\n          },\n          onClickParent: function onClickParent(e) {\n            console.log('navigate up');\n            _this3.fetch(_this3.state.dir.split('/').slice(0, -1).join('') || '/');\n          }\n        })\n      );\n    }\n  }]);\n\n  return Browser;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    app: state.system.app\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)({}, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Browser);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _moment = require('moment/min/moment.min');\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar FileSaver = require('file-saver');\n\nvar browserInitialState = {\n  loading: false,\n  progress: null,\n  error: null,\n  data: {},\n  images: [],\n  files: []\n};\n\nvar browserReducer = function browserReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : browserInitialState;\n  var action = arguments[1];\n\n  switch (action.type) {\n    case _types2.default.app.load_progress:\n      if (!action.data || action.data.module !== 'browser') {\n        return state;\n      }\n      return _extends({}, state, {\n        loading: true,\n        progress: action.progress\n      });\n    case _types2.default.app.load:\n      return _extends({}, state, {\n        loading: false,\n        error: null,\n        data: action.data\n      });\n    default:\n      return state;\n  }\n};\n\nexports.default = browserReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.enqueue = exports.resume = exports.pause = exports.play = undefined;\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar play = exports.play = function play(file) {\n  return { type: _types2.default.audioPlayer.play, file: file };\n};\nvar pause = exports.pause = function pause() {\n  return { type: _types2.default.audioPlayer.pause };\n};\nvar resume = exports.resume = function resume() {\n  return { type: _types2.default.audioPlayer.resume };\n};\nvar enqueue = exports.enqueue = function enqueue(file) {\n  return { type: _types2.default.audioPlayer.enqueue, file: file };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nvar _redux = require('redux');\n\nvar _audioPlayer = require('./audioPlayer.actions');\n\nvar audioPlayerActions = _interopRequireWildcard(_audioPlayer);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar AudioPlayer = function (_Component) {\n  _inherits(AudioPlayer, _Component);\n\n  function AudioPlayer(props) {\n    _classCallCheck(this, AudioPlayer);\n\n    var _this = _possibleConstructorReturn(this, (AudioPlayer.__proto__ || Object.getPrototypeOf(AudioPlayer)).call(this, props));\n\n    _this.handleClick = _this.handleClick.bind(_this);\n    return _this;\n  }\n\n  _createClass(AudioPlayer, [{\n    key: 'handleClick',\n    value: function handleClick(e) {\n      var _props = this.props,\n          audioPlayer = _props.audioPlayer,\n          actions = _props.actions;\n\n      if (audioPlayer.playing) {\n        actions.pause();\n      } else {\n        actions.resume();\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var audioPlayer = this.props.audioPlayer;\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'audioPlayer' },\n        (0, _preact.h)(\n          'span',\n          null,\n          this.props.title\n        ),\n        (0, _preact.h)(\n          'button',\n          {\n            onClick: this.handleClick\n          },\n          audioPlayer.playing ? '▶' : '~'\n        )\n      );\n    }\n  }]);\n\n  return AudioPlayer;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    audioPlayer: state.audioPlayer\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(audioPlayerActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(AudioPlayer);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar audioPlayerInitialState = {\n  loading: false,\n  error: null,\n  status: '',\n  current: null,\n  index: -1,\n  playlist: []\n};\n\nvar audio = document.createElement('audio');\n\nvar audioPlayerReducer = function audioPlayerReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : audioPlayerInitialState;\n  var action = arguments[1];\n\n  switch (action.type) {\n    case _types2.default.audioPlayer.play:\n      if (!action.file.url) {\n        return state;\n      }\n      audio.src = action.file.url;\n      audio.play();\n      return _extends({}, state, {\n        playing: true,\n        current: action.file\n      });\n    case _types2.default.audioPlayer.pause:\n      audio.pause();\n      return _extends({}, state, {\n        playing: false\n      });\n    case _types2.default.audioPlayer.resume:\n      audio.play();\n      return _extends({}, state, {\n        playing: true\n      });\n    default:\n      return state;\n  }\n};\n\nexports.default = audioPlayerReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _group = require('./group.component');\n\nvar _group2 = _interopRequireDefault(_group);\n\nvar _param = require('./param.component');\n\nvar _param2 = _interopRequireDefault(_param);\n\nvar _button = require('./button.component');\n\nvar _button2 = _interopRequireDefault(_button);\n\nvar _buttonGrid = require('./buttonGrid.component');\n\nvar _buttonGrid2 = _interopRequireDefault(_buttonGrid);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar AugmentationGrid = function (_Component) {\n  _inherits(AugmentationGrid, _Component);\n\n  function AugmentationGrid() {\n    var _ref;\n\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, AugmentationGrid);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = AugmentationGrid.__proto__ || Object.getPrototypeOf(AugmentationGrid)).call.apply(_ref, [this].concat(args))), _this), _this.state = {\n      x: 0, y: 0, sum: 0\n    }, _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  _createClass(AugmentationGrid, [{\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      var _props = this.props,\n          make = _props.make,\n          take = _props.take,\n          checkpoint = _props.checkpoint,\n          onTrain = _props.onTrain,\n          onAugment = _props.onAugment;\n      var _state = this.state,\n          x = _state.x,\n          y = _state.y,\n          sum = _state.sum;\n\n      var rows = [];\n      return (0, _preact.h)(\n        _group2.default,\n        { className: 'augmentationGrid' },\n        (0, _preact.h)(_buttonGrid2.default, {\n          x: make,\n          y: take,\n          max: 5000,\n          onHover: function onHover(x, y) {\n            return _this2.setState({ x: x, y: y });\n          },\n          onClick: function onClick(x, y) {\n            _this2.setState({ sum: sum + x * y });\n            onAugment(y, x);\n          }\n        }),\n        (0, _preact.h)(\n          _param2.default,\n          { title: 'Name' },\n          checkpoint.name\n        ),\n        (0, _preact.h)(\n          _param2.default,\n          { title: 'Take' },\n          y\n        ),\n        (0, _preact.h)(\n          _param2.default,\n          { title: 'Make' },\n          x\n        ),\n        (0, _preact.h)(\n          _param2.default,\n          { title: 'Will add to dataset' },\n          x * y\n        ),\n        (0, _preact.h)(\n          _param2.default,\n          { title: 'Total added this epoch' },\n          sum\n        ),\n        (0, _preact.h)(\n          _param2.default,\n          { title: 'Sequence length' },\n          checkpoint.sequenceCount\n        ),\n        (0, _preact.h)(\n          _param2.default,\n          { title: 'Dataset size' },\n          checkpoint.datasetCount\n        ),\n        (0, _preact.h)(\n          _button2.default,\n          { onClick: function onClick() {\n              _this2.setState({ sum: 0 });\n              onTrain();\n            } },\n          'Train'\n        )\n      );\n    }\n  }]);\n\n  return AugmentationGrid;\n}(_preact.Component);\n\nexports.default = AugmentationGrid;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nvar _redux = require('redux');\n\nvar _live = require('../live/live.actions');\n\nvar liveActions = _interopRequireWildcard(_live);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Button = function (_Component) {\n  _inherits(Button, _Component);\n\n  function Button(props) {\n    _classCallCheck(this, Button);\n\n    var _this = _possibleConstructorReturn(this, (Button.__proto__ || Object.getPrototypeOf(Button)).call(this, props));\n\n    _this.handleClick = _this.handleClick.bind(_this);\n    return _this;\n  }\n\n  _createClass(Button, [{\n    key: 'handleClick',\n    value: function handleClick(e) {\n      this.props.onClick && this.props.onClick();\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'div',\n        { className: 'button param' },\n        (0, _preact.h)(\n          'label',\n          null,\n          (0, _preact.h)(\n            'span',\n            null,\n            this.props.title\n          ),\n          (0, _preact.h)(\n            'button',\n            {\n              onClick: this.handleClick\n            },\n            this.props.value || this.props.children\n          )\n        )\n      );\n    }\n  }]);\n\n  return Button;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {};\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {};\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Button);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ButtonGrid = function (_Component) {\n  _inherits(ButtonGrid, _Component);\n\n  function ButtonGrid() {\n    var _ref;\n\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, ButtonGrid);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = ButtonGrid.__proto__ || Object.getPrototypeOf(ButtonGrid)).call.apply(_ref, [this].concat(args))), _this), _this.state = {\n      x: 0, y: 0\n    }, _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  _createClass(ButtonGrid, [{\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      var _state = this.state,\n          _x = _state.x,\n          _y = _state.y;\n      var _props = this.props,\n          X = _props.x,\n          Y = _props.y,\n          _props$max = _props.max,\n          max = _props$max === undefined ? Infinity : _props$max,\n          _onClick = _props.onClick,\n          onHover = _props.onHover;\n\n      return (0, _preact.h)(\n        'table',\n        { className: 'buttonGrid' },\n        (0, _preact.h)(\n          'tr',\n          { className: 'row' },\n          (0, _preact.h)(\n            'th',\n            null,\n            \" \"\n          ),\n          X.map(function (x) {\n            return (0, _preact.h)(\n              'th',\n              { className: x === _x && 'bold' },\n              x\n            );\n          })\n        ),\n        Y.map(function (y) {\n          return (0, _preact.h)(\n            'tr',\n            { className: 'row' },\n            (0, _preact.h)(\n              'th',\n              { className: y === _y && 'bold' },\n              y\n            ),\n            X.map(function (x) {\n              return (0, _preact.h)(\n                'td',\n                null,\n                x * y > max ? \" \" : (0, _preact.h)(\n                  'button',\n                  {\n                    onClick: function onClick() {\n                      return _onClick(x, y);\n                    },\n                    onMouseEnter: function onMouseEnter() {\n                      _this2.setState({ x: x, y: y });\n                      onHover(x, y);\n                    }\n                  },\n                  \" \"\n                )\n              );\n            })\n          );\n        })\n      );\n    }\n  }]);\n\n  return ButtonGrid;\n}(_preact.Component);\n\nexports.default = ButtonGrid;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nvar _redux = require('redux');\n\nvar _live = require('../live/live.actions');\n\nvar liveActions = _interopRequireWildcard(_live);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Checkbox = function (_Component) {\n  _inherits(Checkbox, _Component);\n\n  function Checkbox(props) {\n    _classCallCheck(this, Checkbox);\n\n    var _this = _possibleConstructorReturn(this, (Checkbox.__proto__ || Object.getPrototypeOf(Checkbox)).call(this, props));\n\n    _this.handleClick = _this.handleClick.bind(_this);\n    return _this;\n  }\n\n  _createClass(Checkbox, [{\n    key: 'handleClick',\n    value: function handleClick(e) {\n      clearTimeout(this.timeout);\n      var new_value = e.target.checked;\n      this.props.onToggle && this.props.onToggle(new_value);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var checked = this.props.value;\n      var dim = !this.props.noDim;\n      return (0, _preact.h)(\n        'div',\n        { className: 'checkbox param' },\n        (0, _preact.h)(\n          'label',\n          null,\n          (0, _preact.h)(\n            'span',\n            null,\n            this.props.title\n          ),\n          (0, _preact.h)('input', {\n            type: 'checkbox',\n            onClick: this.handleClick,\n            checked: checked\n          })\n        )\n      );\n    }\n  }]);\n\n  return Checkbox;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {};\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    // actions: bindActionCreators(liveActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Checkbox);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// import { Loading, CurrentTask, FileList, FileRow } from '../../../common'\n\nfunction CurrentTask(_ref) {\n  var cpu = _ref.cpu,\n      gpu = _ref.gpu,\n      processor = _ref.processor;\n\n  var processor_name = void 0;\n  if (processor) {\n    processor_name = processor === 'cpu' ? 'cpu' : 'gpu';\n  } else if (gpu.status !== 'IDLE') {\n    processor_name = 'gpu';\n  } else if (cpu.status !== 'IDLE') {\n    processor_name = 'cpu';\n  }\n  var p = processor_name === 'cpu' ? cpu : gpu;\n  if (!p) return (0, _preact.h)('div', null);\n  if (p.status === 'IDLE') {\n    return (0, _preact.h)(\n      'div',\n      null,\n      processor_name,\n      ' idle'\n    );\n  }\n  var last_message = p.last_message,\n      pid = p.pid,\n      task = p.task;\n  var activity = task.activity,\n      epoch = task.epoch,\n      epochs = task.epochs,\n      dataset = task.dataset,\n      module = task.module;\n\n  return (0, _preact.h)(\n    'div',\n    { className: 'currentTask' },\n    '#',\n    pid,\n    ': ',\n    (0, _preact.h)(\n      'b',\n      null,\n      module,\n      ' ',\n      activity\n    ),\n    ' ',\n    (0, _preact.h)(\n      'i',\n      null,\n      dataset\n    ),\n    !!epochs ? (0, _preact.h)(\n      'span',\n      null,\n      epochs,\n      ' epoch',\n      _util2.default.courtesy_s(epochs)\n    ) : \"\",\n    epoch ? (0, _preact.h)(\n      'span',\n      null,\n      '(currently #',\n      epoch,\n      ')'\n    ) : \"\",\n    (0, _preact.h)('br', null),\n    (0, _preact.h)('br', null),\n    (0, _preact.h)(\n      'div',\n      { 'class': 'quiet' },\n      last_message\n    )\n  );\n}\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return state.system.runner;\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    // actions: bindActionCreators(samplernnActions, dispatch),\n    // remote: bindActionCreators(samplernnTasks, dispatch),\n    // audioPlayer: bindActionCreators(audioPlayerActions, dispatch),\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(CurrentTask);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.FileRow = exports.FileList = undefined;\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _moment = require('moment/min/moment.min');\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nvar _util = require('../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar fieldSet = _util2.default.fieldSet(new Set(['name', 'date', 'size']));\n\nvar FileList = exports.FileList = function FileList(props) {\n  var files = props.files,\n      fields = props.fields,\n      sort = props.sort,\n      title = props.title,\n      linkFiles = props.linkFiles,\n      onClick = props.onClick,\n      onClickParent = props.onClickParent,\n      onDelete = props.onDelete,\n      groupDirectories = props.groupDirectories,\n      parentDirectory = props.parentDirectory,\n      _props$orderBy = props.orderBy,\n      orderBy = _props$orderBy === undefined ? 'name asc' : _props$orderBy,\n      _props$className = props.className,\n      className = _props$className === undefined ? '' : _props$className,\n      _props$fileListClassN = props.fileListClassName,\n      fileListClassName = _props$fileListClassN === undefined ? 'filelist' : _props$fileListClassN,\n      _props$rowClassName = props.rowClassName,\n      rowClassName = _props$rowClassName === undefined ? 'row file' : _props$rowClassName;\n\n  var _util$sort$orderByFn = _util2.default.sort.orderByFn(orderBy),\n      mapFn = _util$sort$orderByFn.mapFn,\n      sortFn = _util$sort$orderByFn.sortFn;\n\n  var sortedFiles = (files || []).filter(function (f) {\n    return !!f;\n  }).map(mapFn).sort(sortFn);\n  if (groupDirectories) {\n    var groupedFiles = sortedFiles.reduce(function (a, b) {\n      a[b[1].dir].push(b);return a;\n    }, { true: [], false: [] });\n    sortedFiles = groupedFiles.true.concat(groupedFiles.false);\n  }\n  var fileList = sortedFiles.map(function (pair) {\n    return (0, _preact.h)(FileRow, {\n      file: pair[1],\n      fields: fieldSet(fields),\n      className: rowClassName,\n      linkFiles: linkFiles,\n      onDelete: onDelete,\n      onClick: onClick\n    });\n  });\n  if (!fileList || !fileList.length) {\n    return (0, _preact.h)(\n      'div',\n      { className: 'rows ' + className },\n      (0, _preact.h)(\n        'div',\n        { 'class': 'row heading' },\n        (0, _preact.h)(\n          'h4',\n          { 'class': 'noFiles' },\n          'No files'\n        )\n      )\n    );\n  }\n  // console.log(files)\n  return (0, _preact.h)(\n    'div',\n    { className: 'rows ' + className },\n    title && (0, _preact.h)(\n      'div',\n      { 'class': 'row heading' },\n      (0, _preact.h)(\n        'h3',\n        null,\n        title\n      ),\n      '}'\n    ),\n    (0, _preact.h)(\n      'div',\n      { className: 'rows ' + fileListClassName },\n      parentDirectory && (0, _preact.h)(\n        'div',\n        { className: rowClassName + ' parent' },\n        (0, _preact.h)(\n          'div',\n          { className: 'filename', title: 'Parent Directory' },\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick(e) {\n                return onClickParent && onClickParent(e);\n              } },\n            (0, _preact.h)(\n              'i',\n              null,\n              'Parent Directory'\n            )\n          )\n        )\n      ),\n      fileList\n    )\n  );\n};\n\nvar FileRow = exports.FileRow = function FileRow(props) {\n  var file = props.file,\n      linkFiles = props.linkFiles,\n      onDelete = props.onDelete,\n      _onClick = props.onClick,\n      _props$className2 = props.className,\n      className = _props$className2 === undefined ? 'row file' : _props$className2,\n      _props$username = props.username,\n      username = _props$username === undefined ? '' : _props$username;\n\n  var fields = fieldSet(props.fields);\n\n  var size = _util2.default.hush_size(file.size);\n  var date = file.date || file.created_at;\n  var epoch = file.epoch || file.epochs || 0;\n  var count = file.count || 0;\n\n  var name = void 0;\n  var key = void 0;\n  if (file.name) {\n    name = file.name;\n    key = name;\n  } else if (file.url) {\n    if (file.opt && file.opt.type) {\n      name = file.opt.type + ': ' + file.opt.title;\n      key = file.opt.token;\n    } else {\n      name = file.url.replace(/^https?:\\/\\//, '');\n      key = name;\n    }\n  }\n\n  return (0, _preact.h)(\n    'div',\n    { 'class': className, key: key },\n    fields.has('name') && (0, _preact.h)(\n      'div',\n      { className: 'filename', title: file.name || file.url },\n      file.persisted === false ? (0, _preact.h)(\n        'span',\n        { className: 'unpersisted' },\n        name\n      ) : linkFiles && file.url ? (0, _preact.h)(\n        'a',\n        { target: '_blank', onClick: function onClick(e) {\n            if (!(e.metaKey || e.ctrlKey || e.altKey) && _onClick) {\n              e.preventDefault();_onClick && _onClick(file, e);\n            }\n          }, href: file.url },\n        name\n      ) : (0, _preact.h)(\n        'span',\n        { 'class': 'link', onClick: function onClick(e) {\n            return _onClick && _onClick(file, e);\n          } },\n        name\n      )\n    ),\n    fields.has('age') && (0, _preact.h)(\n      'div',\n      { className: \"age \" + _util2.default.carbon_date(date) },\n      _util2.default.get_age(date)\n    ),\n    fields.has('username') && (0, _preact.h)(\n      'div',\n      { className: \"username\" },\n      username\n    ),\n    fields.has('epoch') && (0, _preact.h)(\n      'div',\n      { className: \"epoch \" + _util2.default.hush_null(epoch)[0] },\n      epoch > 0 ? 'ep. ' + epoch : ''\n    ),\n    fields.has('date') && (0, _preact.h)(\n      'div',\n      { className: \"date \" + _util2.default.carbon_date(date) },\n      (0, _moment2.default)(date).format(\"YYYY-MM-DD\")\n    ),\n    fields.has('datetime') && (0, _preact.h)(\n      'div',\n      { className: \"datetime \" + _util2.default.carbon_date(date) },\n      (0, _moment2.default)(date).format(\"YYYY-MM-DD h:mm a\")\n    ),\n    fields.has('size') && (0, _preact.h)(\n      'div',\n      { className: \"size \" + size[0] },\n      size[1]\n    ),\n    fields.has('count') && (0, _preact.h)(\n      'div',\n      { className: \"count \" + _util2.default.hush_null(count)[0] },\n      count > 0 ? count + ' files' : ''\n    ),\n    (fields.has('activity') || fields.has('module')) && (0, _preact.h)(\n      'div',\n      { className: 'activity' },\n      fields.has('activity') && file.activity,\n      fields.has('module') && file.module\n    ),\n    fields.has('delete') && onDelete && file.id && (0, _preact.h)(\n      'div',\n      { className: 'destroy', onClick: function onClick(e) {\n          return onDelete(file);\n        } },\n      'x'\n    ),\n    props.options && props.options(file)\n  );\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar FileUpload = function (_Component) {\n  _inherits(FileUpload, _Component);\n\n  function FileUpload(props) {\n    _classCallCheck(this, FileUpload);\n\n    var _this = _possibleConstructorReturn(this, (FileUpload.__proto__ || Object.getPrototypeOf(FileUpload)).call(this, props));\n\n    _this.handleChange = _this.handleChange.bind(_this);\n    return _this;\n  }\n\n  _createClass(FileUpload, [{\n    key: 'handleChange',\n    value: function handleChange(e) {\n      this.props.onChange && this.props.onChange();\n      e.stopPropagation();\n      e.preventDefault();\n      this.setState({ thumbnails: [], images: [] });\n      var files = e.dataTransfer ? e.dataTransfer.files : e.target.files;\n      var i = void 0,\n          f = void 0;\n      for (i = 0, f; i < files.length; i++) {\n        f = files[i];\n        if (!f) continue;\n        break;\n        // if (!f.type.match(this.props.mime)) continue\n      }\n      this.props.onUpload && this.props.onUpload(f);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'div',\n        { className: 'fileUpload param' },\n        (0, _preact.h)(\n          'label',\n          null,\n          (0, _preact.h)(\n            'span',\n            null,\n            this.props.title\n          ),\n          (0, _preact.h)('input', {\n            type: 'file',\n            accept: this.props.accept || '*/*',\n            multiple: this.props.multiple,\n            onChange: this.handleChange\n          }),\n          (0, _preact.h)(\n            'button',\n            null,\n            this.props.label || 'Choose file...'\n          )\n        )\n      );\n    }\n  }]);\n\n  return FileUpload;\n}(_preact.Component);\n\nexports.default = FileUpload;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nexports.default = FolderList;\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _util = require('../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _group = require('./group.component');\n\nvar _group2 = _interopRequireDefault(_group);\n\nvar _param = require('./param.component');\n\nvar _param2 = _interopRequireDefault(_param);\n\nvar _loading = require('./loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction FolderList(_ref) {\n  var db = _ref.db,\n      path = _ref.path,\n      emptyText = _ref.emptyText,\n      activity = _ref.activity;\n\n  if (!db) return null;\n  if (db.loading || !db.data) {\n    return (0, _preact.h)(\n      'div',\n      { 'class': 'col folderList' },\n      (0, _preact.h)(_loading2.default, { progress: db.progress })\n    );\n  }\n  var folderList = db.data.folders;\n  if (activity) {\n    folderList = folderList.filter(function (f) {\n      return f.activity === activity;\n    });\n  }\n  if (!folderList.length && emptyText) {\n    return (0, _preact.h)(\n      'div',\n      { 'class': 'col folderList' },\n      emptyText\n    );\n  }\n  console.log(folders);\n  var folders = folderList.map(function (raw_folder) {\n    var folder = db.data.folderLookup[raw_folder.id];\n    var fileCount = folder.files ? folder.files.length : 0;\n\n    var _util$hush_null = _util2.default.hush_null(fileCount),\n        _util$hush_null2 = _slicedToArray(_util$hush_null, 2),\n        className = _util$hush_null2[0],\n        size = _util$hush_null2[1];\n\n    return (0, _preact.h)(\n      _param2.default,\n      { title: (0, _preact.h)(\n          _reactRouterDom.Link,\n          { to: path + folder.id + '/' },\n          folder.name\n        ) },\n      (0, _preact.h)(\n        'span',\n        { className: className },\n        fileCount,\n        ' file',\n        _util2.default.courtesy_s(fileCount)\n      )\n    );\n  });\n\n  return (0, _preact.h)(\n    'div',\n    { 'class': 'col folderList' },\n    (0, _preact.h)(\n      _group2.default,\n      { title: 'Projects' },\n      folders\n    )\n  );\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\t\tvalue: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Gallery = function (_Component) {\n\t\t_inherits(Gallery, _Component);\n\n\t\tfunction Gallery(props) {\n\t\t\t\t_classCallCheck(this, Gallery);\n\n\t\t\t\treturn _possibleConstructorReturn(this, (Gallery.__proto__ || Object.getPrototypeOf(Gallery)).call(this));\n\t\t}\n\n\t\t_createClass(Gallery, [{\n\t\t\t\tkey: 'render',\n\t\t\t\tvalue: function render() {\n\t\t\t\t\t\tvar _props = this.props,\n\t\t\t\t\t\t    title = _props.title,\n\t\t\t\t\t\t    images = _props.images;\n\n\t\t\t\t\t\tvar imageList = images.map(function (image) {\n\t\t\t\t\t\t\t\treturn (0, _preact.h)(\n\t\t\t\t\t\t\t\t\t\t'div',\n\t\t\t\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\t\t\t(0, _preact.h)('img', { src: image.url })\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t});\n\t\t\t\t\t\treturn (0, _preact.h)(\n\t\t\t\t\t\t\t\t'div',\n\t\t\t\t\t\t\t\t{ 'class': 'gallery' },\n\t\t\t\t\t\t\t\timageList\n\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t}]);\n\n\t\treturn Gallery;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n\t\treturn {};\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n\t\treturn {\n\t\t\t\t// actions: bindActionCreators(liveActions, dispatch)\n\t\t};\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Gallery);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = Group;\n\nvar _preact = require('preact');\n\nfunction Group(props) {\n  return (0, _preact.h)(\n    'div',\n    { className: 'group' },\n    this.props.title && (0, _preact.h)(\n      'h3',\n      null,\n      this.props.title\n    ),\n    this.props.children\n  );\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _reactRedux = require('react-redux');\n\nvar _system = require('../system/system.actions');\n\nvar systemActions = _interopRequireWildcard(_system);\n\nvar _modules = require('../modules');\n\nvar _modules2 = _interopRequireDefault(_modules);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction NavLink(props) {\n  if (!props.to) {\n    return (0, _preact.h)(\n      'span',\n      null,\n      props.children\n    );\n  }\n  var children = props.to === props.location.pathname ? (0, _preact.h)(\n    'b',\n    null,\n    props.children\n  ) : props.children;\n  return (0, _preact.h)(\n    'span',\n    null,\n    (0, _preact.h)(\n      _reactRouterDom.Link,\n      { to: props.to },\n      children\n    )\n  );\n}\n\nfunction Header(props) {\n  var site = props.site,\n      app = props.app,\n      fps = props.fps,\n      playing = props.playing,\n      actions = props.actions,\n      location = props.location,\n      history = props.history;\n\n  var tool_list = Object.keys(_modules2.default).map(function (name, i) {\n    var label = name.replace(/_/, \" \");\n    return (0, _preact.h)(\n      'option',\n      { value: name, key: i },\n      label\n    );\n  });\n  var tool = _modules2.default[app.tool];\n  var links = tool.links().map(function (link, i) {\n    return (0, _preact.h)(\n      NavLink,\n      { key: i, location: location, to: link.url },\n      link.name\n    );\n  });\n  return (0, _preact.h)(\n    'header',\n    null,\n    (0, _preact.h)(\n      'span',\n      null,\n      (0, _preact.h)(\n        'b',\n        null,\n        site.name,\n        ' cortex'\n      )\n    ),\n    (0, _preact.h)(\n      'span',\n      null,\n      (0, _preact.h)(\n        'select',\n        { onChange: function onChange(e) {\n            var path = window.location.pathname.split(\"/\");\n            path.shift();\n            console.log(path);\n            if (path[0] in _modules2.default && path[1]) {\n              history.push('/' + e.target.value + '/' + path[1] + '/');\n            }\n            actions.changeTool(e.target.value, true);\n          }, value: app.tool },\n        tool_list\n      )\n    ),\n    (0, _preact.h)(\n      NavLink,\n      { location: location, to: '/system' },\n      'system'\n    ),\n    (0, _preact.h)(\n      NavLink,\n      { location: location, to: '/dashboard' },\n      'dashboard'\n    ),\n    (0, _preact.h)(\n      'span',\n      null,\n      links\n    ),\n    playing && (0, _preact.h)(\n      'span',\n      null,\n      fps,\n      ' fps'\n    )\n  );\n}\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    site: state.system.site,\n    app: state.system.app,\n    fps: state.live.fps,\n    playing: state.live.playing\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(systemActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Header);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.AugmentationGrid = exports.ButtonGrid = exports.TaskList = exports.CurrentTask = exports.Checkbox = exports.Button = exports.SelectGroup = exports.Select = exports.Slider = exports.NumberInput = exports.TextInput = exports.Param = exports.ParamGroup = exports.Group = exports.Player = exports.Gallery = exports.FileUpload = exports.FileRow = exports.FileList = exports.FolderList = exports.AudioPlayer = exports.Header = exports.Progress = exports.Loading = exports.Views = undefined;\n\nvar _audioPlayer = require('./audioPlayer/audioPlayer.component');\n\nvar _audioPlayer2 = _interopRequireDefault(_audioPlayer);\n\nvar _augmentationGrid = require('./augmentationGrid.component');\n\nvar _augmentationGrid2 = _interopRequireDefault(_augmentationGrid);\n\nvar _button = require('./button.component');\n\nvar _button2 = _interopRequireDefault(_button);\n\nvar _buttonGrid = require('./buttonGrid.component');\n\nvar _buttonGrid2 = _interopRequireDefault(_buttonGrid);\n\nvar _checkbox = require('./checkbox.component');\n\nvar _checkbox2 = _interopRequireDefault(_checkbox);\n\nvar _currentTask = require('./currentTask.component');\n\nvar _currentTask2 = _interopRequireDefault(_currentTask);\n\nvar _fileList = require('./fileList.component');\n\nvar _fileUpload = require('./fileUpload.component');\n\nvar _fileUpload2 = _interopRequireDefault(_fileUpload);\n\nvar _folderList = require('./folderList.component');\n\nvar _folderList2 = _interopRequireDefault(_folderList);\n\nvar _gallery = require('./gallery.component');\n\nvar _gallery2 = _interopRequireDefault(_gallery);\n\nvar _group = require('./group.component');\n\nvar _group2 = _interopRequireDefault(_group);\n\nvar _header = require('./header.component');\n\nvar _header2 = _interopRequireDefault(_header);\n\nvar _loading = require('./loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nvar _numberInput = require('./numberInput.component');\n\nvar _numberInput2 = _interopRequireDefault(_numberInput);\n\nvar _param = require('./param.component');\n\nvar _param2 = _interopRequireDefault(_param);\n\nvar _paramGroup = require('./paramGroup.component');\n\nvar _paramGroup2 = _interopRequireDefault(_paramGroup);\n\nvar _player = require('./player.component');\n\nvar _player2 = _interopRequireDefault(_player);\n\nvar _progress = require('./progress.component');\n\nvar _progress2 = _interopRequireDefault(_progress);\n\nvar _select = require('./select.component');\n\nvar _select2 = _interopRequireDefault(_select);\n\nvar _selectGroup = require('./selectGroup.component');\n\nvar _selectGroup2 = _interopRequireDefault(_selectGroup);\n\nvar _slider = require('./slider.component');\n\nvar _slider2 = _interopRequireDefault(_slider);\n\nvar _textInput = require('./textInput.component');\n\nvar _textInput2 = _interopRequireDefault(_textInput);\n\nvar _taskList = require('./taskList.component');\n\nvar _taskList2 = _interopRequireDefault(_taskList);\n\nvar _views = require('./views');\n\nvar Views = _interopRequireWildcard(_views);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.Views = Views;\nexports.Loading = _loading2.default;\nexports.Progress = _progress2.default;\nexports.Header = _header2.default;\nexports.AudioPlayer = _audioPlayer2.default;\nexports.FolderList = _folderList2.default;\nexports.FileList = _fileList.FileList;\nexports.FileRow = _fileList.FileRow;\nexports.FileUpload = _fileUpload2.default;\nexports.Gallery = _gallery2.default;\nexports.Player = _player2.default;\nexports.Group = _group2.default;\nexports.ParamGroup = _paramGroup2.default;\nexports.Param = _param2.default;\nexports.TextInput = _textInput2.default;\nexports.NumberInput = _numberInput2.default;\nexports.Slider = _slider2.default;\nexports.Select = _select2.default;\nexports.SelectGroup = _selectGroup2.default;\nexports.Button = _button2.default;\nexports.Checkbox = _checkbox2.default;\nexports.CurrentTask = _currentTask2.default;\nexports.TaskList = _taskList2.default;\nexports.ButtonGrid = _buttonGrid2.default;\nexports.AugmentationGrid = _augmentationGrid2.default;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = Loading;\n\nvar _preact = require('preact');\n\nvar _progress = require('./progress.component');\n\nvar _progress2 = _interopRequireDefault(_progress);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction Loading(_ref) {\n  var progress = _ref.progress;\n\n  return (0, _preact.h)(\n    'div',\n    { className: 'loading' },\n    'Loading',\n    (0, _preact.h)('br', null),\n    progress && (0, _preact.h)(_progress2.default, { progress: progress })\n  );\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar NumberInput = function (_Component) {\n  _inherits(NumberInput, _Component);\n\n  function NumberInput(props) {\n    _classCallCheck(this, NumberInput);\n\n    var _this = _possibleConstructorReturn(this, (NumberInput.__proto__ || Object.getPrototypeOf(NumberInput)).call(this, props));\n\n    _this.state = { value: null, changed: false };\n    _this.handleInput = _this.handleInput.bind(_this);\n    _this.handleKeydown = _this.handleKeydown.bind(_this);\n    return _this;\n  }\n\n  _createClass(NumberInput, [{\n    key: 'handleInput',\n    value: function handleInput(e) {\n      this.setState({\n        value: e.target.value,\n        changed: true\n      });\n      this.props.onInput && this.props.onInput(e.target.value, e.target.name);\n      this.props.onChange && this.props.onChange(e.target.name, e.target.value);\n    }\n  }, {\n    key: 'handleKeydown',\n    value: function handleKeydown(e) {\n      if (e.keyCode === 13) {\n        this.setState({\n          value: e.target.value,\n          changed: false\n        });\n        this.props.onSave && this.props.onSave(e.target.value, e.target.name);\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'div',\n        { className: 'numberInput param' },\n        (0, _preact.h)(\n          'label',\n          null,\n          (0, _preact.h)(\n            'span',\n            null,\n            this.props.title\n          ),\n          (0, _preact.h)('input', {\n            type: 'number',\n            name: this.props.name || 'number',\n            value: this.state.changed ? this.state.value : this.props.value,\n            onInput: this.handleInput,\n            onKeydown: this.handleKeydown,\n            placeholder: this.props.placeholder,\n            autofocus: this.props.autofocus,\n            min: this.props.min,\n            max: this.props.max,\n            step: this.props.step || this.props.type === 'int' ? 1 : 0.01\n          })\n        )\n      );\n    }\n  }]);\n\n  return NumberInput;\n}(_preact.Component);\n\nexports.default = NumberInput;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Param = function (_Component) {\n  _inherits(Param, _Component);\n\n  function Param(props) {\n    _classCallCheck(this, Param);\n\n    return _possibleConstructorReturn(this, (Param.__proto__ || Object.getPrototypeOf(Param)).call(this, props));\n  }\n\n  _createClass(Param, [{\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'div',\n        { className: 'button param' },\n        (0, _preact.h)(\n          'span',\n          null,\n          this.props.title\n        ),\n        (0, _preact.h)(\n          'span',\n          null,\n          this.props.children\n        )\n      );\n    }\n  }]);\n\n  return Param;\n}(_preact.Component);\n\nexports.default = Param;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nvar _redux = require('redux');\n\nvar _live = require('../live/live.actions');\n\nvar liveActions = _interopRequireWildcard(_live);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ParamGroup = function (_Component) {\n  _inherits(ParamGroup, _Component);\n\n  function ParamGroup(props) {\n    _classCallCheck(this, ParamGroup);\n\n    var _this = _possibleConstructorReturn(this, (ParamGroup.__proto__ || Object.getPrototypeOf(ParamGroup)).call(this, props));\n\n    _this.handleClick = _this.handleClick.bind(_this);\n    return _this;\n  }\n\n  _createClass(ParamGroup, [{\n    key: 'handleClick',\n    value: function handleClick(e) {\n      clearTimeout(this.timeout);\n      var new_value = e.target.checked;\n      this.props.actions.set_param(this.props.name, new_value);\n      this.props.onToggle && this.props.onToggle(new_value);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var checked = this.props.opt[this.props.name];\n      var toggle = !this.props.noToggle;\n      var dim = !this.props.noDim;\n      var className = !dim || !toggle || checked ? 'paramGroup active' : 'paramGroup inactive';\n      return (0, _preact.h)(\n        'div',\n        { className: className },\n        (0, _preact.h)(\n          'label',\n          null,\n          (0, _preact.h)(\n            'h3',\n            null,\n            this.props.title\n          ),\n          toggle ? (0, _preact.h)('input', {\n            type: 'checkbox',\n            onClick: this.handleClick,\n            checked: checked\n          }) : null\n        ),\n        this.props.children\n      );\n    }\n  }]);\n\n  return ParamGroup;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    opt: state.live.opt\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(liveActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(ParamGroup);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nfunction Player(props) {\n  var className = props.fullscreen ? 'player fullscreen' : 'player';\n  return (0, _preact.h)(\n    'div',\n    { className: className },\n    (0, _preact.h)('canvas', { width: props.width, height: props.height })\n  );\n}\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {};\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {};\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Player);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = Progress;\n\nvar _preact = require('preact');\n\nfunction Progress(_ref) {\n  var progress = _ref.progress;\n\n  if (!progress) return;\n  var i = progress.i,\n      n = progress.n;\n\n  var a = [];\n  for (var j = 0; j < n; j++) {\n    a.push((0, _preact.h)('div', { key: j, className: j < i ? 'x' : 'o' }));\n  }\n  return (0, _preact.h)(\n    'div',\n    { className: 'progress' },\n    a\n  );\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nvar _redux = require('redux');\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Select = function (_Component) {\n  _inherits(Select, _Component);\n\n  function Select(props) {\n    _classCallCheck(this, Select);\n\n    var _this = _possibleConstructorReturn(this, (Select.__proto__ || Object.getPrototypeOf(Select)).call(this, props));\n\n    _this.handleChange = _this.handleChange.bind(_this);\n    return _this;\n  }\n\n  _createClass(Select, [{\n    key: 'handleChange',\n    value: function handleChange(e) {\n      clearTimeout(this.timeout);\n      var new_value = e.target.value;\n      if (new_value === 'PLACEHOLDER') return;\n      this.props.onChange && this.props.onChange(this.props.name, new_value);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var currentValue = this.props.live ? this.props.opt[this.props.name] : this.props.value;\n      var lastValue = void 0;\n      var options = (this.props.options || []).map(function (key, i) {\n        var name = void 0,\n            value = void 0;\n        if (typeof key === 'string') {\n          name = key.length < 2 ? key.toUpperCase() : key;\n          value = key;\n        } else if ((typeof key === 'undefined' ? 'undefined' : _typeof(key)) === 'object') {\n          if (key.length) {\n            var _key = _slicedToArray(key, 2);\n\n            name = _key[0];\n            value = _key[1];\n          } else if (key.count) {\n            var frames = Math.round(key.count / 30) + ' s.';\n            name = key.name.replace(/_/g, ' ') + ' (' + frames + ')';\n            value = key.name;\n          } else {\n            name = key.name;\n            value = key.value || key.name;\n          }\n        }\n        lastValue = value;\n        return (0, _preact.h)(\n          'option',\n          { value: value, key: i },\n          name\n        );\n      });\n      return (0, _preact.h)(\n        'div',\n        { className: 'select param' },\n        (0, _preact.h)(\n          'label',\n          null,\n          (0, _preact.h)(\n            'span',\n            null,\n            this.props.title\n          ),\n          (0, _preact.h)(\n            'select',\n            {\n              onChange: this.handleChange,\n              value: currentValue || lastValue\n            },\n            this.props.placeholder && (0, _preact.h)(\n              'option',\n              { value: 'PLACEHOLDER' },\n              this.props.placeholder\n            ),\n            options\n          )\n        ),\n        this.props.children\n      );\n    }\n  }]);\n\n  return Select;\n}(_preact.Component);\n\nfunction capitalize(s) {\n  return (s || \"\").replace(/(?:^|\\s)\\S/g, function (a) {\n    return a.toUpperCase();\n  });\n}\n\nvar mapStateToProps = function mapStateToProps(state, props) {\n  return {\n    opt: props.opt || state.live.opt\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {};\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Select);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nvar _redux = require('redux');\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SelectGroup = function (_Component) {\n  _inherits(SelectGroup, _Component);\n\n  function SelectGroup(props) {\n    _classCallCheck(this, SelectGroup);\n\n    var _this = _possibleConstructorReturn(this, (SelectGroup.__proto__ || Object.getPrototypeOf(SelectGroup)).call(this, props));\n\n    _this.handleChange = _this.handleChange.bind(_this);\n    return _this;\n  }\n\n  _createClass(SelectGroup, [{\n    key: 'handleChange',\n    value: function handleChange(e) {\n      clearTimeout(this.timeout);\n      var new_value = e.target.value;\n      if (new_value === 'PLACEHOLDER') return;\n      this.props.onChange && this.props.onChange(this.props.name, new_value);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var currentValue = this.props.live ? this.props.opt[this.props.name] : this.props.value;\n      var lastValue = void 0;\n      var options = (this.props.options || []).map(function (group, i) {\n        var groupName = group.name;\n        var children = group.options.map(function (key) {\n          var name = key.length < 2 ? key.toUpperCase() : key;\n          name = name.replace(/_/g, ' ');\n          var value = key;\n          lastValue = value;\n          return (0, _preact.h)(\n            'option',\n            { value: value, key: value },\n            name\n          );\n        });\n        return (0, _preact.h)(\n          'optgroup',\n          { label: groupName, key: groupName },\n          children\n        );\n      });\n      return (0, _preact.h)(\n        'div',\n        { className: 'select param' },\n        (0, _preact.h)(\n          'label',\n          null,\n          (0, _preact.h)(\n            'span',\n            null,\n            this.props.title\n          ),\n          (0, _preact.h)(\n            'select',\n            {\n              onChange: this.handleChange,\n              value: currentValue || lastValue\n            },\n            this.props.placeholder && (0, _preact.h)(\n              'option',\n              { value: 'PLACEHOLDER' },\n              this.props.placeholder\n            ),\n            options\n          )\n        ),\n        this.props.children\n      );\n    }\n  }]);\n\n  return SelectGroup;\n}(_preact.Component);\n\nfunction capitalize(s) {\n  return (s || \"\").replace(/(?:^|\\s)\\S/g, function (a) {\n    return a.toUpperCase();\n  });\n}\n\nvar mapStateToProps = function mapStateToProps(state, props) {\n  return {\n    opt: props.opt || state.live.opt\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {};\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SelectGroup);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nvar _redux = require('redux');\n\nvar _live = require('../live/live.actions');\n\nvar liveActions = _interopRequireWildcard(_live);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SLIDER_THROTTLE_TIME = 100;\n\nvar Slider = function (_Component) {\n  _inherits(Slider, _Component);\n\n  function Slider(props) {\n    _classCallCheck(this, Slider);\n\n    var _this = _possibleConstructorReturn(this, (Slider.__proto__ || Object.getPrototypeOf(Slider)).call(this, props));\n\n    _this.timeout = 0;\n    _this.state = {\n      value: props.live ? props.opt[props.name] : props.value\n    };\n    _this.handleInput = _this.handleInput.bind(_this);\n    _this.handleRange = _this.handleRange.bind(_this);\n    return _this;\n  }\n\n  _createClass(Slider, [{\n    key: 'componentWillReceiveProps',\n    value: function componentWillReceiveProps(nextProps) {\n      var next_value = nextProps.value || nextProps.opt[nextProps.name];\n      if (next_value !== this.state.value) {\n        this.setState({ value: next_value });\n      }\n    }\n  }, {\n    key: 'handleInput',\n    value: function handleInput(e) {\n      var _props = this.props,\n          name = _props.name,\n          opt = _props.opt;\n\n      var old_value = opt[name];\n      var new_value = e.target.value;\n      if (new_value === '') {\n        new_value = this.props.defaultValue || (this.props.max - this.props.min) / 2;\n      } else if (this.props.type === 'int') {\n        new_value = parseInt(new_value);\n      } else if (this.props.type === 'odd') {\n        new_value = parseInt(Math.floor(new_value / 2) * 2 + 1);\n      }\n      if (old_value !== new_value) {\n        this.setState({ value: new_value });\n        this.props.live && this.props.actions.set_param(this.props.name, new_value);\n        this.props.onChange && this.props.onChange(new_value);\n      }\n      clearTimeout(this.timeout);\n    }\n  }, {\n    key: 'handleRange',\n    value: function handleRange(e) {\n      var _this2 = this;\n\n      clearTimeout(this.timeout);\n      var new_value = e.target.value;\n      if (this.props.type === 'int') {\n        new_value = parseInt(new_value);\n      }\n      if (this.props.type === 'odd') {\n        new_value = parseInt(Math.floor(new_value / 2) * 2 + 1);\n      }\n      if (this.props.type === 'list') {\n        new_value = this.props.options[new_value] || this.props.options[0];\n      }\n      this.setState({ value: new_value });\n      this.timeout = setTimeout(function () {\n        _this2.props.live && _this2.props.actions.set_param(_this2.props.name, new_value);\n        _this2.props.onChange && _this2.props.onChange(new_value);\n      }, SLIDER_THROTTLE_TIME);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props2 = this.props,\n          name = _props2.name,\n          title = _props2.title;\n\n      var value = this.state.value;\n      if (typeof value === 'undefined') {\n        value = this.props.min;\n      }\n      var text_value = value;\n      var step = void 0;\n      var min = this.props.min || 0;\n      var max = this.props.max || 0;\n      if (this.props.type === 'int') {\n        step = 1;\n      } else if (this.props.type === 'list') {\n        min = 0;\n        max = this.props.options.length - 1;\n        step = 1;\n        value = this.props.options.indexOf(value);\n      } else {\n        step = (this.props.max - this.props.min) / 100;\n        text_value = parseFloat(value).toFixed(2);\n      }\n      return (0, _preact.h)(\n        'div',\n        { 'class': 'slider param' },\n        (0, _preact.h)(\n          'label',\n          null,\n          (0, _preact.h)(\n            'span',\n            null,\n            title || name.replace(/_/g, ' ')\n          ),\n          (0, _preact.h)('input', { type: 'text', value: text_value, onBlur: this.handleInput })\n        ),\n        (0, _preact.h)('input', {\n          type: 'range',\n          min: min,\n          max: max,\n          step: step,\n          value: value,\n          onInput: this.handleRange\n        })\n      );\n    }\n  }]);\n\n  return Slider;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    opt: state.live.opt\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(liveActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Slider);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _util = require('../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _actions = require('../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar TaskList = function (_Component) {\n  _inherits(TaskList, _Component);\n\n  function TaskList(props) {\n    _classCallCheck(this, TaskList);\n\n    return _possibleConstructorReturn(this, (TaskList.__proto__ || Object.getPrototypeOf(TaskList)).call(this));\n  }\n\n  _createClass(TaskList, [{\n    key: 'shouldComponentUpdate',\n    value: function shouldComponentUpdate(nextProps) {\n      if (nextProps.tasks.length !== this.props.tasks.length) {\n        return true;\n      }\n      if (nextProps.tasks[0] !== this.props.tasks[0]) {\n        return true;\n      }\n      return false;\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      var _props = this.props,\n          title = _props.title,\n          tasks = _props.tasks;\n\n      var time = 0;\n\n      var _util$sort$orderByFn = _util2.default.sort.orderByFn(this.props.sort || 'date desc'),\n          mapFn = _util$sort$orderByFn.mapFn,\n          sortFn = _util$sort$orderByFn.sortFn;\n\n      var taskList = tasks.map(mapFn).sort(sortFn).map(function (pair) {\n        var task = pair[1];\n        var dataset = task.dataset;\n\n        var dataset_link = void 0,\n            label = dataset;\n        // console.log(task)\n        switch (task.activity) {\n          case 'train':\n            if (task.epoch === 0) {\n              label += ', latest';\n            } else {\n              label += ', ' + task.epoch;\n            }\n            label += ' + ' + task.epochs;\n            break;\n          case 'augment':\n            try {\n              var opt = JSON.parse(task.opt);\n              label += ', ' + opt.augment_take + ' x ' + opt.augment_make;\n            } catch (e) {\n              //\n            }\n          default:\n            break;\n        }\n        if (task.folder_id) {\n          var href = '/' + task.module + '/' + (task.module === 'samplernn' ? 'datasets' : 'sequences') + '/' + task.folder_id + '/';\n          dataset_link = (0, _preact.h)(\n            _reactRouterDom.Link,\n            { to: href },\n            label\n          );\n        } else {\n          dataset_link = label;\n        }\n        return (0, _preact.h)(\n          'div',\n          { 'class': 'row' },\n          (0, _preact.h)(\n            'div',\n            { 'class': 'activity' },\n            task.activity,\n            ' ',\n            task.module\n          ),\n          (0, _preact.h)(\n            'div',\n            { 'class': 'dataset' },\n            dataset_link\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: \"age \" + _util2.default.carbon_date(task.updated_at) },\n            _util2.default.get_age(task.updated_at)\n          ),\n          (0, _preact.h)(\n            'div',\n            { 'class': 'options' },\n            (0, _preact.h)(\n              'span',\n              { 'class': 'destroy', onClick: function onClick() {\n                  return _this2.handleDestroy(task);\n                } },\n              'x'\n            )\n          )\n        );\n      });\n      return (0, _preact.h)(\n        'div',\n        { 'class': 'tasklist rows' },\n        taskList\n      );\n    }\n  }, {\n    key: 'handleDestroy',\n    value: function handleDestroy(task) {\n      var yes = confirm('Are you sure you want to delete this task?');\n      if (yes) {\n        _actions2.default.task.destroy(task);\n      }\n    }\n  }]);\n\n  return TaskList;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {};\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    // actions: bindActionCreators(liveActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(TaskList);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar TextInput = function (_Component) {\n  _inherits(TextInput, _Component);\n\n  function TextInput(props) {\n    _classCallCheck(this, TextInput);\n\n    var _this = _possibleConstructorReturn(this, (TextInput.__proto__ || Object.getPrototypeOf(TextInput)).call(this, props));\n\n    _this.state = { value: null, changed: false };\n    _this.handleInput = _this.handleInput.bind(_this);\n    _this.handleKeydown = _this.handleKeydown.bind(_this);\n    return _this;\n  }\n\n  _createClass(TextInput, [{\n    key: 'handleInput',\n    value: function handleInput(e) {\n      this.setState({\n        value: e.target.value,\n        changed: true\n      });\n      this.props.onInput && this.props.onInput(e.target.value, e.target.name);\n    }\n  }, {\n    key: 'handleKeydown',\n    value: function handleKeydown(e) {\n      if (e.keyCode === 13) {\n        this.setState({\n          value: e.target.value,\n          changed: false\n        });\n        this.props.onSave && this.props.onSave(e.target.value, e.target.name);\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _h;\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'textInput param' },\n        (0, _preact.h)(\n          'label',\n          null,\n          (0, _preact.h)(\n            'span',\n            null,\n            this.props.title\n          ),\n          (0, _preact.h)('input', (_h = {\n            type: this.props.type || 'text',\n            name: this.props.name || 'text',\n            value: this.state.changed ? this.state.value : this.props.value,\n            onInput: this.handleInput,\n            onKeydown: this.handleKeydown,\n            autofocus: this.props.autofocus,\n            autoComplete: this.props.autocomplete,\n            autoCapitalize: this.props.autocapitalize || 'off',\n            placeholder: this.props.placeholder\n          }, _defineProperty(_h, 'autofocus', this.props.autofocus), _defineProperty(_h, 'className', this.props.className || ''), _h))\n        )\n      );\n    }\n  }]);\n\n  return TextInput;\n}(_preact.Component);\n\nexports.default = TextInput;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.New = undefined;\n\nvar _newView = require('./new.view.js');\n\nvar _newView2 = _interopRequireDefault(_newView);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar New = exports.New = _newView2.default;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _group = require('../group.component');\n\nvar _group2 = _interopRequireDefault(_group);\n\nvar _param = require('../param.component');\n\nvar _param2 = _interopRequireDefault(_param);\n\nvar _loading = require('../loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nvar _folderList = require('../folderList.component');\n\nvar _folderList2 = _interopRequireDefault(_folderList);\n\nvar _dataset = require('../../dataset/dataset.new');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar NewView = function (_Component) {\n  _inherits(NewView, _Component);\n\n  function NewView(props) {\n    _classCallCheck(this, NewView);\n\n    var _this = _possibleConstructorReturn(this, (NewView.__proto__ || Object.getPrototypeOf(NewView)).call(this, props));\n\n    console.log(props);\n    if (!props.db.data) {\n      props.actions.load_directories();\n    }\n    return _this;\n  }\n\n  _createClass(NewView, [{\n    key: 'render',\n    value: function render() {\n      var _props = this.props,\n          module = _props.module,\n          history = _props.history,\n          db = _props.db,\n          path = _props.path;\n\n      return (0, _preact.h)(\n        'div',\n        { 'class': 'app new-view ' + module.name },\n        (0, _preact.h)(\n          'div',\n          { 'class': 'heading' },\n          (0, _preact.h)(\n            'h1',\n            null,\n            module.displayName || module.name\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { 'class': 'col narrow' },\n          (0, _preact.h)(_dataset2.default, {\n            module: module,\n            history: history\n          }),\n          (0, _preact.h)(_folderList2.default, {\n            db: db,\n            path: path,\n            activity: 'dataset',\n            emptyText: (0, _preact.h)(\n              'i',\n              null,\n              'No projects yet. Please create one~'\n            )\n          })\n        )\n      );\n    }\n  }]);\n\n  return NewView;\n}(_preact.Component);\n\nexports.default = NewView;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.load = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _actions = require('../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar load = exports.load = function load() {\n  return function (dispatch) {\n    _util2.default.allProgress([_actions2.default.task.index({ limit: 40, orderBy: 'created_at desc' }), _actions2.default.folder.index({ activity: 'dataset' }), _actions2.default.file.index({ module: 'samplernn', generated: 1, limit: 15, orderBy: 'created_at desc' }), _actions2.default.file.index({ module: 'pix2pixhd', generated: 1, limit: 15, orderBy: 'created_at desc' }), _actions2.default.file.index({ module: 'morph', generated: 1, limit: 15, orderBy: 'created_at desc' })], function (percent, i, n) {\n      // console.log('dashboard load progress', i, n)\n      dispatch({\n        type: _types2.default.app.load_progress,\n        progress: { i: i, n: n },\n        data: { module: 'dashboard' }\n      });\n    }).then(function (res) {\n      var _res = _slicedToArray(res, 5),\n          tasks = _res[0],\n          folders = _res[1],\n          samplernn = _res[2],\n          pix2pixhd = _res[3],\n          morph = _res[4];\n\n      var _util$sort$orderByFn = _util2.default.sort.orderByFn('date desc'),\n          mapFn = _util$sort$orderByFn.mapFn,\n          sortFn = _util$sort$orderByFn.sortFn;\n\n      var foldersByModule = folders.map(mapFn).sort(sortFn).reduce(function (a, b) {\n        var module = b[1].module;\n        a[module] = a[module] || [];\n        a[module].push(b[1]);\n        return a;\n      }, {});\n      dispatch({\n        type: _types2.default.dashboard.load,\n        data: {\n          tasks: tasks,\n          folders: folders,\n          foldersByModule: foldersByModule,\n          renders: {\n            samplernn: samplernn,\n            pix2pixhd: pix2pixhd,\n            morph: morph\n          }\n        }\n      });\n    });\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _reactRedux = require('react-redux');\n\nvar _player = require('../common/player.component');\n\nvar _player2 = _interopRequireDefault(_player);\n\nvar _group = require('../common/group.component');\n\nvar _group2 = _interopRequireDefault(_group);\n\nvar _slider = require('../common/slider.component');\n\nvar _slider2 = _interopRequireDefault(_slider);\n\nvar _select = require('../common/select.component');\n\nvar _select2 = _interopRequireDefault(_select);\n\nvar _button = require('../common/button.component');\n\nvar _button2 = _interopRequireDefault(_button);\n\nvar _dashboardheader = require('./dashboardheader.component');\n\nvar _dashboardheader2 = _interopRequireDefault(_dashboardheader);\n\nvar _common = require('../common');\n\nvar _dashboard = require('./dashboard.actions');\n\nvar dashboardActions = _interopRequireWildcard(_dashboard);\n\nvar _audioPlayer = require('../common/audioPlayer/audioPlayer.actions');\n\nvar audioPlayerActions = _interopRequireWildcard(_audioPlayer);\n\nvar _modules = require('../modules');\n\nvar _modules2 = _interopRequireDefault(_modules);\n\nvar _actions = require('../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Dashboard = function (_Component) {\n  _inherits(Dashboard, _Component);\n\n  function Dashboard(props) {\n    _classCallCheck(this, Dashboard);\n\n    // console.log(props)\n    var _this = _possibleConstructorReturn(this, (Dashboard.__proto__ || Object.getPrototypeOf(Dashboard)).call(this));\n\n    props.actions.load();\n    return _this;\n  }\n\n  _createClass(Dashboard, [{\n    key: 'componentWillUpdate',\n    value: function componentWillUpdate(nextProps) {\n      // if (nextProps.opt.checkpoint_name && nextProps.opt.checkpoint_name !== this.props.opt.checkpoint_name) {\n      //   this.props.actions.list_epochs(nextProps.opt.checkpoint_name)\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      var _props = this.props,\n          loading = _props.loading,\n          progress = _props.progress,\n          site = _props.site,\n          foldersByModule = _props.foldersByModule,\n          renders = _props.renders,\n          queue = _props.queue,\n          images = _props.images;\n\n      if (loading) {\n        return (0, _preact.h)(_common.Loading, { progress: progress });\n      }\n      var tasks = queue.tasks;\n\n      var folders = foldersByModule && Object.keys(_modules2.default).sort().map(function (key) {\n        var path = key === 'samplernn' ? '/samplernn/datasets/' : '/' + key + '/sequences/';\n        var folder_list = (foldersByModule[key] || []).map(function (folder) {\n          return (0, _preact.h)(\n            'div',\n            { key: folder.id },\n            (0, _preact.h)(\n              _reactRouterDom.Link,\n              { to: path + folder.id + '/' },\n              folder.name\n            )\n          );\n        });\n\n        var files = renders[key] && (0, _preact.h)(_common.FileList, {\n          linkFiles: true,\n          files: renders[key],\n          orderBy: 'date desc',\n          fields: 'name date epoch size',\n          onClick: key === 'samplernn' ? function (file, e) {\n            e.preventDefault();\n            e.stopPropagation();\n            console.log('picked a file', file);\n            _this2.handlePick(file);\n          } : null\n        });\n\n        return (0, _preact.h)(\n          'div',\n          { className: 'dashboardModule', key: key },\n          (0, _preact.h)(\n            'div',\n            { className: 'row moduleHeading' },\n            (0, _preact.h)(\n              'h3',\n              null,\n              key\n            ),\n            (0, _preact.h)(\n              'div',\n              null,\n              (0, _preact.h)(\n                _reactRouterDom.Link,\n                { to: '/' + key + '/new/' },\n                'new'\n              )\n            ),\n            folder_list\n          ),\n          files\n        );\n      }).filter(function (a) {\n        return !!a;\n      });\n      return (0, _preact.h)(\n        'div',\n        { className: 'app dashboard' },\n        (0, _preact.h)(_dashboardheader2.default, null),\n        (0, _preact.h)(\n          'div',\n          { className: 'params row' },\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            !!queue.queue.length && (0, _preact.h)(\n              _group2.default,\n              { title: 'Upcoming Tasks' },\n              (0, _preact.h)(_common.TaskList, { tasks: queue.queue.map(function (id) {\n                  return tasks[id];\n                }) })\n            ),\n            !!queue.completed.length && (0, _preact.h)(\n              _group2.default,\n              { title: 'Completed Tasks' },\n              (0, _preact.h)(_common.TaskList, { tasks: queue.completed.map(function (id) {\n                  return tasks[id];\n                }) })\n            )\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            folders\n          )\n        )\n      );\n    }\n  }, {\n    key: 'handlePick',\n    value: function handlePick(file) {\n      this.props.audioPlayer.play(file);\n    }\n  }]);\n\n  return Dashboard;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    loading: state.dashboard.loading,\n    progress: state.dashboard.progress,\n    site: state.system.site,\n    foldersByModule: state.dashboard.data.foldersByModule,\n    renders: state.dashboard.data.renders,\n    images: state.dashboard.images,\n    files: state.dashboard.files,\n    queue: state.queue\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(dashboardActions, dispatch),\n    audioPlayer: (0, _redux.bindActionCreators)(audioPlayerActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Dashboard);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _moment = require('moment/min/moment.min');\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar FileSaver = require('file-saver');\n\nvar dashboardInitialState = {\n  loading: false,\n  progress: null,\n  error: null,\n  data: {},\n  images: [],\n  files: []\n};\n\nvar dashboardReducer = function dashboardReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : dashboardInitialState;\n  var action = arguments[1];\n\n  switch (action.type) {\n    case _types2.default.app.load_progress:\n      if (!action.data || action.data.module !== 'dashboard') {\n        return state;\n      }\n      return _extends({}, state, {\n        loading: true,\n        progress: action.progress\n      });\n    case _types2.default.dashboard.load:\n      return _extends({}, state, {\n        loading: false,\n        error: null,\n        data: action.data\n      });\n    default:\n      return state;\n  }\n};\n\nexports.default = dashboardReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nvar _redux = require('redux');\n\nvar _util = require('../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar DashboardHeader = function (_Component) {\n  _inherits(DashboardHeader, _Component);\n\n  function DashboardHeader(props) {\n    _classCallCheck(this, DashboardHeader);\n\n    var _this = _possibleConstructorReturn(this, (DashboardHeader.__proto__ || Object.getPrototypeOf(DashboardHeader)).call(this, props));\n\n    _this.handleClick = _this.handleClick.bind(_this);\n    return _this;\n  }\n\n  _createClass(DashboardHeader, [{\n    key: 'handleClick',\n    value: function handleClick(e) {\n      this.props.onClick && this.props.onClick();\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props = this.props,\n          site = _props.site,\n          runner = _props.runner;\n\n      return (0, _preact.h)(\n        'div',\n        { 'class': 'dashboardHeader heading' },\n        (0, _preact.h)(\n          'h1',\n          null,\n          site.name,\n          ' cortex'\n        ),\n        this.renderStatus(\"GPU\", runner.gpu),\n        this.renderStatus(\"CPU\", runner.cpu)\n      );\n    }\n  }, {\n    key: 'renderStatus',\n    value: function renderStatus(name, gpu) {\n      if (gpu.status === 'IDLE') {\n        return (0, _preact.h)(\n          'div',\n          null,\n          name,\n          ' idle'\n        );\n      }\n      var task = gpu.task;\n      var activityPhrase = void 0,\n          liveMessage = void 0;\n      if (task.activity === 'live') {\n        return (0, _preact.h)(\n          'div',\n          null,\n          name,\n          ' running ',\n          (0, _preact.h)(\n            'b',\n            null,\n            task.module\n          ),\n          ' live on \"',\n          task.dataset,\n          '\"'\n        );\n      } else {\n        return (0, _preact.h)(\n          'div',\n          null,\n          name,\n          ' ',\n          _util2.default.gerund(task.activity),\n          ' ',\n          (0, _preact.h)(\n            'b',\n            null,\n            task.module\n          ),\n          ' on ',\n          (0, _preact.h)(\n            'b',\n            null,\n            task.dataset\n          ),\n          !!task.epoch && (0, _preact.h)(\n            'span',\n            null,\n            'Epoch: ',\n            task.epoch,\n            ' / ',\n            task.epochs,\n            (0, _preact.h)('br', null)\n          )\n        );\n      }\n    }\n  }]);\n\n  return DashboardHeader;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    runner: state.system.runner,\n    site: state.system.site\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {};\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(DashboardHeader);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.uploadFiles = exports.fetchURL = exports.uploadFile = exports.updateFolder = exports.createFolder = undefined;\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _actions = require('../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _api = require('../api');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar createFolder = exports.createFolder = function createFolder(module, name) {\n  return function (dispatch) {\n    return _actions2.default.folder.create({\n      // username... should get added inside the API\n      module: module.name,\n      datatype: module.datatype,\n      activity: 'dataset',\n      name: name\n    });\n  };\n}; // import socket from '../socket'\nvar updateFolder = exports.updateFolder = function updateFolder(module, folder, name) {\n  var opt = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n  return function (dispatch) {\n    if (!folder || !folder.id) {\n      return null;\n    }\n    return _actions2.default.folder.update({\n      id: folder.id,\n      module: module.name,\n      datatype: module.datatype,\n      activity: 'dataset',\n      name: name,\n      opt: opt\n    });\n  };\n};\n\nvar uploadFile = exports.uploadFile = function uploadFile(module, folder, file, filename, opt) {\n  return function (dispatch) {\n    var fd = new FormData();\n    fd.append('file', file, filename);\n    _actions2.default.folder.upload(fd, {\n      id: folder.id,\n      module: module.name,\n      activity: 'file',\n      epoch: 0,\n      processed: false,\n      generated: false,\n      opt: opt\n    });\n  };\n};\n\nvar fetchURL = exports.fetchURL = function fetchURL(module, folder, url) {\n  return function (dispatch) {\n    // name url\n    // mime datatype\n    // duration analysis\n    // size activity\n    // opt created_at updated_at\n    console.log(module, folder, url);\n    var seenURL = folder.files.some(function (file) {\n      return file.url === url;\n    });\n    console.log(seenURL);\n    if (seenURL) {\n      console.log('already seen this url');\n      return;\n    }\n    _api.parser.parse(url, function (media) {\n      if (!media) return;\n      console.log('media', media);\n      _actions2.default.file.create({\n        folder_id: folder.id,\n        name: (media.title || \"\").replace(/\\.[^.]+$/g, '').replace(/[^a-zA-Z0-9_]/g, '_').replace(/\\s+/g, '_').replace(/_+/g, '_'),\n        module: module.name,\n        dataset: media.token,\n        activity: 'url',\n        duration: parseInt(media.duration) || 0,\n        epoch: 0,\n        processed: false,\n        generated: false,\n        opt: media,\n        url: url\n      });\n    });\n  };\n};\n\nvar uploadFiles = exports.uploadFiles = function uploadFiles(files) {\n  return { type: _types2.default.dataset.upload_files };\n};\n\n// export const uploadFiles = (files) => {\n//   return dispatch => {\n//     // return { type: types.dataset.upload_files }\n//   }\n// }\n\n// export const fetchURL = (url) => { type: types.dataset.fetch_url }","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _actions = require('../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _fileList = require('../common/fileList.component');\n\nvar _loading = require('../common/loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar fieldSet = _util2.default.fieldSet(new Set(['input', 'status', 'checkpoint', 'output']));\n\nvar DatasetComponent = function (_Component) {\n  _inherits(DatasetComponent, _Component);\n\n  function DatasetComponent() {\n    _classCallCheck(this, DatasetComponent);\n\n    return _possibleConstructorReturn(this, (DatasetComponent.__proto__ || Object.getPrototypeOf(DatasetComponent)).apply(this, arguments));\n  }\n\n  _createClass(DatasetComponent, [{\n    key: 'render',\n    value: function render() {\n      var _props = this.props,\n          loading = _props.loading,\n          progress = _props.progress,\n          fields = _props.fields,\n          module = _props.module,\n          data = _props.data,\n          folder = _props.folder,\n          match = _props.match,\n          history = _props.history;\n\n      if (loading) {\n        return (0, _preact.h)(_loading2.default, { progress: progress });\n      }\n      if (!data.folders.length) {\n        console.log('no folders, redirect to /new');\n        return history.push('/' + module.name + '/new/');\n      }\n      if (!folder || !folder.name) return;\n      fields = fieldSet(fields);\n      return (0, _preact.h)(\n        'div',\n        { 'class': 'rows params datasets' },\n        (0, _preact.h)(\n          'div',\n          { 'class': 'row row-heading dataset' },\n          fields.has('input') && (0, _preact.h)(\n            'div',\n            { 'class': 'col' },\n            'input'\n          ),\n          fields.has('status') && (0, _preact.h)(\n            'div',\n            { 'class': 'col' },\n            'status'\n          ),\n          fields.has('checkpoint') && (0, _preact.h)(\n            'div',\n            { 'class': 'col' },\n            'checkpoint'\n          ),\n          fields.has('output') && (0, _preact.h)(\n            'div',\n            { 'class': 'col' },\n            'output'\n          )\n        ),\n        this.renderGroups()\n      );\n    }\n  }, {\n    key: 'renderGroups',\n    value: function renderGroups() {\n      var _this2 = this;\n\n      var _props2 = this.props,\n          module = _props2.module,\n          data = _props2.data,\n          folder = _props2.folder,\n          fields = _props2.fields,\n          runner = _props2.runner,\n          onPickDataset = _props2.onPickDataset,\n          onPickFile = _props2.onPickFile,\n          datasetActions = _props2.datasetActions;\n\n      fields = fieldSet(fields);\n      var datasetLookup = data.datasetLookup,\n          fileLookup = data.fileLookup;\n\n      if (!datasetLookup) {\n        return (0, _preact.h)('div', null);\n      }\n\n      var _util$sort$orderByFn = _util2.default.sort.orderByFn('date desc'),\n          mapFn = _util$sort$orderByFn.mapFn,\n          sortFn = _util$sort$orderByFn.sortFn;\n\n      var moduleOnCPU = runner && runner.cpu.task && runner.cpu.task.module === module.name;\n      var moduleOnGPU = runner && runner.gpu.task && runner.gpu.task.module === module.name;\n      var datasets = folder.datasets.map(function (name) {\n        return datasetLookup[name];\n      }).map(mapFn).sort(sortFn).map(function (pair) {\n        var dataset = pair[1];\n        var status = '';\n        var isProcessing = false,\n            isFetching = false;\n        if (moduleOnGPU && runner.gpu.task.dataset === dataset) {\n          status = _util2.default.gerund(runner.gpu.task.activity);\n          isProcessing = true;\n        } else if (moduleOnCPU && runner.cpu.task.activity === 'fetch' && runner.cpu.task.opt.file_id === dataset.input[0]) {\n          isProcessing = true;\n          isFetching = true;\n        }\n        return (0, _preact.h)(\n          'div',\n          { key: dataset.name, className: 'row dataset', onClick: function onClick() {\n              return onPickDataset && onPickDataset(dataset);\n            } },\n          _this2.props.beforeRow && _this2.props.beforeRow(dataset),\n          fields.has('input') && (0, _preact.h)(\n            'div',\n            { className: 'col' },\n            !!dataset.input.length && (0, _preact.h)(_fileList.FileList, {\n              files: dataset.input.map(function (id) {\n                return fileLookup[id];\n              }),\n              className: 'input_files',\n              fileListClassName: '',\n              rowClassName: 'input_file',\n              fields: 'name date size delete',\n              linkFiles: true,\n              onClick: onPickFile,\n              onDelete: function onDelete(file) {\n                return _this2.onDeleteFile(file);\n              }\n            })\n          ),\n          fields.has('status') && (0, _preact.h)(\n            'div',\n            { className: ['col', 'quiet', dataset.isBuilt ? 'built' : 'not_built', isProcessing ? 'processing' : 'not_processing'].join(' ') },\n            _this2.props.datasetActions && _this2.props.datasetActions(dataset, isFetching, isProcessing),\n            status\n          ),\n          fields.has('checkpoint') && (0, _preact.h)(\n            'div',\n            { className: 'col checkpoint' },\n            !!dataset.checkpoints.length && (0, _preact.h)(_fileList.FileRow, {\n              file: dataset.checkpoints[0],\n              fields: 'name date epoch',\n              className: 'row checkpoint'\n            })\n          ),\n          fields.has('output') && (0, _preact.h)(\n            'div',\n            { className: 'col' },\n            !!dataset.output.length && (0, _preact.h)(_fileList.FileList, {\n              files: dataset.output.map(function (id) {\n                return fileLookup[id];\n              }),\n              orderBy: 'epoch desc',\n              fields: 'name date epoch size',\n              linkFiles: true,\n              onClick: onPickFile,\n              onDelete: function onDelete(file) {\n                return _this2.onDeleteFile(file);\n              }\n            })\n          ),\n          _this2.props.afterRow && _this2.props.afterRow(dataset)\n        );\n      });\n      return datasets;\n    }\n  }, {\n    key: 'onDeleteFile',\n    value: function onDeleteFile(file) {\n      var yes = confirm('Are you sure you want to delete this file?');\n      if (yes) {\n        console.log('delete: confirmed');\n        if (this.props.onDeleteFile) {\n          console.log('calling custom deletefile function');\n          this.props.onDeleteFile(file);\n        } else {\n          _actions2.default.file.destroy(file);\n        }\n      }\n    }\n  }]);\n\n  return DatasetComponent;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    runner: state.system.runner\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {};\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(DatasetComponent);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _dataset = require('./dataset.actions');\n\nvar datasetActions = _interopRequireWildcard(_dataset);\n\nvar _group = require('../common/group.component');\n\nvar _group2 = _interopRequireDefault(_group);\n\nvar _param = require('../common/param.component');\n\nvar _param2 = _interopRequireDefault(_param);\n\nvar _fileList = require('../common/fileList.component');\n\nvar _fileUpload = require('../common/fileUpload.component');\n\nvar _fileUpload2 = _interopRequireDefault(_fileUpload);\n\nvar _textInput = require('../common/textInput.component');\n\nvar _textInput2 = _interopRequireDefault(_textInput);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar DatasetForm = function (_Component) {\n  _inherits(DatasetForm, _Component);\n\n  function DatasetForm() {\n    _classCallCheck(this, DatasetForm);\n\n    return _possibleConstructorReturn(this, (DatasetForm.__proto__ || Object.getPrototypeOf(DatasetForm)).apply(this, arguments));\n  }\n\n  _createClass(DatasetForm, [{\n    key: 'render',\n    value: function render() {\n      var _props = this.props,\n          loading = _props.loading,\n          status = _props.status,\n          error = _props.error,\n          module = _props.module,\n          folder = _props.folder,\n          _props$title = _props.title,\n          title = _props$title === undefined ? 'Dataset' : _props$title,\n          canRename = _props.canRename,\n          canUpload = _props.canUpload,\n          canAddURL = _props.canAddURL;\n      // sort files??\n\n      if (!folder.id) {\n        return (0, _preact.h)(\n          'div',\n          { className: 'params row' },\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            this.renderFolderNameInput(folder.name)\n          )\n        );\n      }\n      return (0, _preact.h)(\n        'div',\n        { className: 'form params row' },\n        (0, _preact.h)(\n          'div',\n          { className: 'col' },\n          (0, _preact.h)(\n            _group2.default,\n            null,\n            canRename && this.renderFolderNameInput(folder.name),\n            canUpload && this.renderUploadInput(),\n            canAddURL && this.renderURLInput()\n          )\n        )\n      );\n    }\n  }, {\n    key: 'curry',\n    value: function curry(action) {\n      var _props2 = this.props,\n          module = _props2.module,\n          folder = _props2.folder;\n\n      return function (param) {\n        return action(module, folder, param);\n      };\n    }\n  }, {\n    key: 'renderFolderNameInput',\n    value: function renderFolderNameInput(name) {\n      return (0, _preact.h)(_textInput2.default, {\n        title: 'Dataset name',\n        value: name,\n        onSave: this.curry(this.props.actions.dataset.updateFolder)\n      });\n    }\n  }, {\n    key: 'renderUploadInput',\n    value: function renderUploadInput() {\n      return (0, _preact.h)(_fileUpload2.default, {\n        title: 'Upload a file',\n        mime: 'image.*',\n        onUpload: this.curry(this.props.actions.dataset.uploadFile)\n      });\n    }\n  }, {\n    key: 'renderURLInput',\n    value: function renderURLInput() {\n      return (0, _preact.h)(_textInput2.default, {\n        title: 'Fetch a URL',\n        placeholder: 'http://',\n        onSave: this.curry(this.props.actions.dataset.fetchURL)\n      });\n    }\n  }]);\n\n  return DatasetForm;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return state.upload;\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: {\n      dataset: (0, _redux.bindActionCreators)(datasetActions, dispatch)\n    }\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(DatasetForm);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.load = exports.getDataset = exports.emptyDataset = exports.unsortedFolder = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _actions = require('../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar unsortedFolders = {};\n\nvar unsortedFolder = exports.unsortedFolder = function unsortedFolder(module) {\n  var instantiate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n  if (!unsortedFolders[module] || instantiate) {\n    var folder = {\n      id: 0,\n      module: module,\n      name: 'unsorted',\n      files: [],\n      datasets: []\n    };\n    unsortedFolders[module] = folder;\n  }\n  return unsortedFolders[module];\n};\n\nvar emptyDataset = exports.emptyDataset = function emptyDataset(module, datasetLookup, name, folder) {\n  var dataset = {\n    name: name,\n    input: [],\n    checkpoints: [],\n    output: []\n  };\n  datasetLookup[name] = dataset;\n  folder = folder || unsortedFolder(module);\n  folder.datasets.push(name);\n  return dataset;\n};\n\nvar getDataset = exports.getDataset = function getDataset(module, datasetLookup, name, folder, date) {\n  name = name.toLowerCase();\n  var dataset = datasetLookup[name] || emptyDataset(module, datasetLookup, name, folder);\n  // folder = folder || unsortedFolder(module)\n  if (date) {\n    dataset.date = dataset.date && !isNaN(dataset.date) ? Math.max(+new Date(date), dataset.date) : +new Date(date);\n  }\n  return dataset;\n};\n\nvar load = exports.load = function load(module) {\n  console.log(module);\n  return Promise.all([_actions2.default.folder.index({ module: module, limit: 0 }), _actions2.default.file.index({ module: module, limit: 0 }), _actions2.default.task.index({ module: module })]).then(function (res) {\n    var _res = _slicedToArray(res, 3),\n        folders = _res[0],\n        files = _res[1],\n        tasks = _res[2];\n\n    var datasetLookup = {};\n    var folderLookup = {};\n    var fileLookup = {};\n\n    var resultsFolder = void 0;\n\n    // take all of the folders and put them in a lookup\n    folderLookup = folders.reduce(function (folderLookup, folder) {\n      folderLookup[folder.id] = {\n        id: folder.id,\n        name: folder.name,\n        folder: folder,\n        files: [],\n        datasets: []\n      };\n      if (folder.name === 'results') {\n        resultsFolder = folder;\n      }\n      return folderLookup;\n    }, {\n      unsorted: unsortedFolder(module, true)\n    });\n\n    if (!resultsFolder) {\n      console.log('creating results folder...');\n      _actions2.default.folder.create({\n        module: module,\n        name: 'results',\n        activity: 'results'\n      }).then(function (folder) {\n        console.log('created folder', folder);\n        folderLookup.results = folder;\n      });\n    } else {\n      console.log('got results folder', resultsFolder);\n    }\n\n    // prepare the files by splitting into two groups\n    var generatedFiles = files.filter(function (file) {\n      return file.generated;\n    });\n    var ungeneratedFiles = files.filter(function (file) {\n      return !file.generated;\n    });\n\n    // build the initial dataset lookup table using the ungenerated files\n    ungeneratedFiles.reduce(function (datasetLookup, file) {\n      fileLookup[file.id] = file;\n      if (!file.name) {\n        if (file.opt && file.opt.media && file.opt.media.token) {\n          file.name = file.opt.media.token;\n        } else {\n          file.name = file.url.replace(/^https?:\\/\\/(www.)?/, '').replace(/[^a-zA-Z0-9_]/g, '_').replace(/_+/g, '_') || 'unknown_' + Math.floor(1000 * Math.random());\n        }\n      }\n      var name = (file.name || 'unsorted').split('.')[0];\n      var folder = folderLookup[file.folder_id] || unsortedFolder(module);\n      var dataset = getDataset(module, datasetLookup, file.dataset || name, folder, file.date || file.created_at);\n      if (file.url.match(file.name)) file.persisted = true;\n      dataset.input.push(file.id);\n      folder.files.push(file.id);\n      return datasetLookup;\n    }, datasetLookup);\n\n    // go over the generated files and add addl datasets (if the files were deleted)\n    generatedFiles.map(function (file) {\n      fileLookup[file.id] = file;\n      var pair = file.name.split('.')[0].split('-');\n      var folder = folderLookup[file.folder_id] || unsortedFolder(module);\n      var dataset = getDataset(module, datasetLookup, file.dataset || pair[0], folder, file.date || file.created_at);\n      dataset.output.push(file.id);\n      folder.files.push(file.id);\n      file.epoch = file.epoch || pair[1];\n    });\n\n    return {\n      folderLookup: folderLookup,\n      fileLookup: fileLookup,\n      datasetLookup: datasetLookup,\n      folders: folders,\n      files: files,\n      unsortedFolder: folderLookup.unsorted,\n      resultsFolder: resultsFolder\n    };\n  }).catch(function (e) {\n    console.error(e);\n  });\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _dataset = require('./dataset.actions');\n\nvar datasetActions = _interopRequireWildcard(_dataset);\n\nvar _loading = require('../common/loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nvar _textInput = require('../common/textInput.component');\n\nvar _textInput2 = _interopRequireDefault(_textInput);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction NewDatasetForm(props) {\n  var loading = props.loading,\n      status = props.status,\n      error = props.error,\n      history = props.history,\n      actions = props.actions,\n      module = props.module;\n\n  if (loading) return (0, _preact.h)(_loading2.default, null);\n  console.log(props);\n  return (0, _preact.h)(\n    'div',\n    { 'class': 'opaque' },\n    (0, _preact.h)(\n      'div',\n      { 'class': 'heading' },\n      (0, _preact.h)(\n        'h2',\n        null,\n        'Create a new ',\n        module.displayName,\n        ' project'\n      )\n    ),\n    (0, _preact.h)(\n      'div',\n      { 'class': 'params' },\n      (0, _preact.h)(_textInput2.default, {\n        autofocus: true,\n        title: 'Name your project',\n        onSave: function onSave(name) {\n          actions.createFolder(module, name).then(function (folder) {\n            window.location.href = '/' + module.name + '/datasets/' + folder.id + '/';\n          });\n        }\n      })\n    )\n  );\n}\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {};\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(datasetActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(NewDatasetForm);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/*\n  Note:\n  This is a sub-reducer intended to process the folder-file API output from the DB.\n  Please run this from inside your module reducers :) \n*/\n\nvar datasetInitialState = function datasetInitialState() {\n  return {\n    loading: true,\n    progress: null,\n    error: null,\n    data: null,\n    folder_id: 0\n  };\n};\n\nvar datasetReducer = function datasetReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : datasetInitialState();\n  var action = arguments[1];\n\n  switch (action.type) {\n    case _types2.default.app.load_progress:\n      return _extends({}, state, {\n        progress: action.progress\n      });\n\n    case _types2.default.dataset.load:\n      return _extends({}, state, {\n        loading: false,\n        data: action.data\n      });\n\n    case _types2.default.dataset.set_folder:\n      return _extends({}, state, {\n        folder_id: action.data.folder_id\n      });\n\n    case _types2.default.folder.create:\n      return _extends({}, state, {\n        loading: false,\n        data: {\n          folders: state.data.folders.concat([action.data.id]),\n          folderLookup: _extends({}, state.data.folderLookup, _defineProperty({}, action.data.id, action.data))\n        }\n      });\n      return state;\n\n    case _types2.default.file.create:\n      return handleFileCreate(state, action);\n\n    case _types2.default.file.update:\n      return handleFileUpdate(state, action);\n\n    case _types2.default.file.destroy:\n      return handleFileDestroy(state, action);\n\n    case _types2.default.dataset.list_epochs:\n      return _extends({}, state, {\n        data: _extends({}, state.data, {\n          epochs: action.data.epochs\n        })\n      });\n\n    default:\n      return state;\n  }\n};\n\nfunction handleFileCreate(state, action) {\n  console.log(action.data);\n  if (!state.data || !state.data.datasetLookup) return state;\n  var dataset = void 0,\n      old_dataset = void 0,\n      folder = void 0,\n      old_folder = void 0;\n  var dataset_name = void 0;\n  if (action.data.dataset) {\n    dataset_name = action.data.dataset;\n  } else if (action.data.name) {\n    dataset_name = action.data.name.split('.')[0];\n  } else if (action.data.url) {\n    dataset_name = action.data.url;\n  } else {\n    dataset_name = null;\n  }\n  if (dataset_name in state.data.datasetLookup) {\n    old_dataset = state.data.datasetLookup[dataset_name];\n    dataset = _extends({}, old_dataset, {\n      input: action.data.generated ? old_dataset.input : [action.data.id].concat(old_dataset.input),\n      output: !action.data.generated ? old_dataset.output : [action.data.id].concat(old_dataset.output)\n    });\n  } else {\n    console.log(action.data.created_at, action.data.date);\n    dataset = {\n      name: dataset_name,\n      date: action.data.created_at || action.data.date,\n      input: action.data.generated ? [] : [action.data.id],\n      checkpoints: [],\n      output: !action.data.generated ? [] : [action.data.id]\n    };\n  }\n  old_folder = state.data.folderLookup[action.data.folder_id];\n  folder = _extends({}, old_folder, {\n    datasets: old_folder.datasets.concat([dataset_name]),\n    files: old_folder.files.concat([action.data.id])\n  });\n  return _extends({}, state, {\n    loading: false,\n    data: _extends({}, state.data, {\n      files: state.data.files.concat([action.data.id]),\n      folderLookup: _extends({}, state.data.folderLookup, _defineProperty({}, action.data.folder_id, folder)),\n      fileLookup: _extends({}, state.data.fileLookup, _defineProperty({}, action.data.id, action.data)),\n      datasetLookup: _extends({}, state.data.datasetLookup, _defineProperty({}, dataset_name, dataset))\n    })\n  });\n}\n\nfunction handleFileUpdate(state, action) {\n  var _extends6;\n\n  var old_dataset = void 0;\n  var new_dataset = state.data.datasetLookup[action.data.dataset];\n  var old_file = state.data.fileLookup[action.data.id];\n  var new_dataset_update = void 0;\n  if (old_file && action.data.dataset !== old_file.dataset) {\n    if (state.data.datasetLookup[old_file.dataset]) {\n      old_dataset = state.data.datasetLookup[old_file.dataset];\n      old_dataset_update = _extends({}, old_dataset, {\n        input: old_dataset.input.filter(function (id) {\n          return id !== action.data.id;\n        }),\n        output: old_dataset.output.filter(function (id) {\n          return id !== action.data.id;\n        })\n      });\n    }\n    new_dataset_update = _extends({}, new_dataset, {\n      input: action.data.generated ? [] : [action.data.id],\n      output: !action.data.generated ? [] : [action.data.id]\n    });\n  }\n  console.log('old_dataset', old_dataset_update.name);\n  console.log('new_dataset', new_dataset_update.name);\n  return _extends({}, state, {\n    loading: false,\n    data: _extends({}, state.data, {\n      datasetLookup: old_dataset ? _extends({}, state.data.datasetLookup, (_extends6 = {}, _defineProperty(_extends6, old_dataset.name, old_dataset_update), _defineProperty(_extends6, new_dataset.name, new_dataset_update), _extends6)) : new_dataset_update ? _extends({}, state.data.datasetLookup, _defineProperty({}, new_dataset.name, new_dataset_update)) : state.data.datasetLookup,\n      fileLookup: _extends({}, state.data.fileLookup, _defineProperty({}, action.data.id, action.data))\n    })\n  });\n  return state;\n}\n\nfunction handleFileDestroy(state, action) {\n  if (!state.data) return state;\n  // delete the key from fileLookup\n  var fileLookup = _extends({}, state.data.fileLookup);\n  var datasetLookup = _extends({}, state.data.datasetLookup);\n  var folderLookup = _extends({}, state.data.folderLookup);\n  var old_file = fileLookup[action.data.id];\n  if (!old_file) return state;\n  var old_dataset = state.data.datasetLookup[old_file.dataset];\n  var dataset = void 0;\n  if (old_dataset) {\n    dataset = _extends({}, old_dataset, {\n      input: old_dataset.input.filter(function (id) {\n        return id !== old_file.id;\n      }),\n      output: old_dataset.output.filter(function (id) {\n        return id !== old_file.id;\n      })\n    });\n    if (!dataset.input.length && !dataset.checkpoints.length && !dataset.output.length) {\n      delete datasetLookup[old_file.dataset];\n      var old_folder = folderLookup[old_file.folder_id];\n      folderLookup[old_file.folder_id] = _extends({}, old_folder, {\n        datasets: old_folder.datasets.filter(function (name) {\n          return name !== old_file.dataset;\n        })\n      });\n    } else {\n      console.log('dataset just needs sweeping');\n      datasetLookup[old_file.dataset] = dataset;\n    }\n  }\n  delete fileLookup[old_file.id];\n\n  return _extends({}, state, {\n    loading: false,\n    data: _extends({}, state.data, {\n      folderLookup: folderLookup,\n      fileLookup: fileLookup,\n      datasetLookup: datasetLookup\n    })\n  });\n}\n\nexports.default = datasetReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar uploadInitialState = {\n  loading: false,\n  error: null,\n  status: ''\n};\n\nvar uploadReducer = function uploadReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : uploadInitialState;\n  var action = arguments[1];\n\n  switch (action.type) {\n    case _types2.default.folder.upload_loading:\n      return {\n        error: null,\n        loading: true,\n        status: 'Loading...'\n      };\n    case _types2.default.folder.upload_error:\n      return {\n        error: null,\n        loading: false,\n        status: 'Error uploading :('\n      };\n    case _types2.default.folder.upload_progress:\n      return {\n        error: null,\n        loading: true,\n        status: 'Upload progress ' + action.percent + '%'\n      };\n    case _types2.default.folder.upload_waiting:\n      return {\n        error: null,\n        loading: true,\n        status: 'Waiting for server to finish processing...'\n      };\n    case _types2.default.folder.upload_complete:\n      return {\n        error: null,\n        loading: false,\n        status: 'Upload complete'\n      };\n    case _types2.default.file.create_loading:\n      return {\n        error: null,\n        loading: true,\n        status: 'Creating file...'\n      };\n    default:\n      return state;\n  }\n};\n\nexports.default = uploadReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _loading = require('../common/loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction UploadStatus(props) {\n  return (0, _preact.h)(\n    'div',\n    { 'class': 'status' },\n    props.status\n  );\n}\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return state.upload;\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {};\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(UploadStatus);","'use strict';\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _store = require('./store');\n\nvar _socket = require('./socket');\n\nvar socket = _interopRequireWildcard(_socket);\n\nvar _util = require('./util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _auth = require('./auth');\n\nvar _auth2 = _interopRequireDefault(_auth);\n\nvar _common = require('./common');\n\nvar _system = require('./system/system.component');\n\nvar _system2 = _interopRequireDefault(_system);\n\nvar _dashboard = require('./dashboard/dashboard.component');\n\nvar _dashboard2 = _interopRequireDefault(_dashboard);\n\nvar _browser = require('./browser/browser.component');\n\nvar _browser2 = _interopRequireDefault(_browser);\n\nvar _modules = require('./modules');\n\nvar _modules2 = _interopRequireDefault(_modules);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nvar module_list = Object.keys(_modules2.default).map(function (name) {\n  var module = _modules2.default[name];\n  return (0, _preact.h)(_reactRouterDom.Route, { path: '/' + module.name, component: module.router });\n});\n\nvar ModuleRouter = function ModuleRouter() {\n  return (0, _preact.h)(_reactRouterDom.Switch, null);\n};\n\nvar app = (0, _preact.h)(\n  _reactRedux.Provider,\n  { store: _store.store },\n  (0, _preact.h)(\n    _auth2.default.Gate,\n    null,\n    (0, _preact.h)(\n      _reactRouterDom.BrowserRouter,\n      null,\n      (0, _preact.h)(\n        'div',\n        { className: 'everybody' },\n        (0, _preact.h)(_reactRouterDom.Route, { path: '/', children: function children(props) {\n            return (0, _preact.h)(\n              'div',\n              null,\n              console.log(props.location.pathname)\n            );\n          } }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/system', component: _system2.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/dashboard', component: _dashboard2.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/browse', component: _browser2.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/logout', component: _auth2.default.Logout }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/login', component: function component() {\n            (0, _preact.h)(_reactRouterDom.Redirect, { to: '/' });\n          } }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/signup', component: function component() {\n            (0, _preact.h)(_reactRouterDom.Redirect, { to: '/' });\n          } }),\n        module_list,\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/', component: _dashboard2.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { path: '/', component: _common.Header })\n      )\n    ),\n    (0, _preact.h)(_common.AudioPlayer, null)\n  )\n);\n\n(0, _preact.render)(app, document.getElementById('container'));","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.play = exports.pause = exports.seek = exports.load_epoch = exports.load_sequence = exports.list_sequences = exports.list_epochs = exports.list_checkpoints = exports.set_fullscreen = exports.set_param = exports.get_params = undefined;\n\nvar _socket = require('../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _player = require('./player');\n\nvar player = _interopRequireWildcard(_player);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar get_params = exports.get_params = function get_params() {\n  _socket2.default.live.get_params();\n  return { type: _types2.default.player.get_params };\n};\n\nvar set_param = exports.set_param = function set_param(key, value) {\n  console.log('set param', key, value);\n  _socket2.default.live.set_param(key, value);\n  return { type: _types2.default.player.set_param, key: key, value: value };\n};\n\nvar set_fullscreen = exports.set_fullscreen = function set_fullscreen(value) {\n  return { type: _types2.default.player.set_fullscreen, value: value };\n};\n\nvar list_checkpoints = exports.list_checkpoints = function list_checkpoints(module) {\n  _socket2.default.live.list_checkpoints(module);\n  return { type: _types2.default.player.loading_checkpoints };\n};\n\nvar list_epochs = exports.list_epochs = function list_epochs(module, checkpoint) {\n  _socket2.default.live.list_epochs(module, checkpoint);\n  return { type: _types2.default.player.loading_epochs };\n};\n\nvar list_sequences = exports.list_sequences = function list_sequences(module) {\n  _socket2.default.live.list_sequences(module);\n  return { type: _types2.default.player.loading_sequences };\n};\n\nvar load_sequence = exports.load_sequence = function load_sequence(sequence_name) {\n  _socket2.default.live.load_sequence(sequence_name);\n  return { type: _types2.default.player.loading_sequence, sequence_name: sequence_name };\n};\n\nvar load_epoch = exports.load_epoch = function load_epoch(checkpoint_name, epoch) {\n  _socket2.default.live.load_epoch(checkpoint_name, epoch);\n  return { type: _types2.default.player.loading_checkpoint, checkpoint_name: checkpoint_name, epoch: epoch };\n};\n\nvar seek = exports.seek = function seek(frame) {\n  _socket2.default.live.seek(frame);\n  return { type: _types2.default.player.seeking };\n};\n\nvar pause = exports.pause = function pause(frame) {\n  _socket2.default.live.pause(pause);\n  player.toggleFPS(false);\n  return { type: _types2.default.player.pausing };\n};\n\nvar play = exports.play = function play(frame) {\n  _socket2.default.live.play();\n  player.toggleFPS(true);\n  return { type: _types2.default.player.playing };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _moment = require('moment/min/moment.min');\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nvar _fileSaver = require('file-saver');\n\nvar _fileSaver2 = _interopRequireDefault(_fileSaver);\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar liveInitialState = {\n  loading: false,\n  error: null,\n  opt: {\n    hue: 0, saturation: 0, luminosity: 0,\n    sequence_playing: true, sequence_step: 1,\n    recurse_roll: 0, rotate: 0, scale: 0, process_frac: 0.5,\n    view_mode: 'b'\n  },\n  all_checkpoints: [],\n  checkpoints: [],\n  epochs: ['latest'],\n  sequences: [],\n  fps: 0,\n  playing: false,\n  last_message: '',\n  fullscreen: false,\n  frame: { i: 0, sequence_i: 0, sequence_len: '1' }\n};\n\nvar liveReducer = function liveReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : liveInitialState;\n  var action = arguments[1];\n\n  var results = void 0;\n  switch (action.type) {\n    case _types2.default.socket.load_params:\n      if (!action.opt || !Object.keys(action.opt).length) {\n        return state;\n      }\n      return _extends({}, state, {\n        loading: false,\n        error: null,\n        opt: action.opt\n      });\n\n    case _types2.default.player.set_param:\n      return _extends({}, state, {\n        opt: _extends({}, state.opt, _defineProperty({}, action.key, action.value))\n      });\n\n    case _types2.default.player.set_fullscreen:\n      return _extends({}, state, {\n        fullscreen: action.value\n      });\n\n    case _types2.default.socket.list_checkpoints:\n      return _extends({}, state, {\n        checkpoints: action.checkpoints,\n        epochs: []\n      });\n\n    case _types2.default.socket.list_all_checkpoints:\n      return _extends({}, state, {\n        all_checkpoints: action.all_checkpoints,\n        epochs: []\n      });\n\n    case _types2.default.socket.list_epochs:\n      console.log(action);\n      if (action.epochs === \"not found\") return _extends({}, state, { epochs: [] });\n      return _extends({}, state, {\n        epochs: (action.epochs || []).map(function (a) {\n          return [a == 'latest' ? Infinity : a, a];\n        }).sort(function (a, b) {\n          return a[0] - b[0];\n        }).map(function (a) {\n          return a[1];\n        })\n      });\n\n    case _types2.default.socket.list_sequences:\n      return _extends({}, state, {\n        sequences: action.sequences\n      });\n\n    case _types2.default.player.loading_sequence:\n      return _extends({}, state, {\n        opt: _extends({}, state.opt, {\n          sequence_name: action.sequence_name\n        })\n      });\n\n    case _types2.default.player.loading_checkpoint:\n      return _extends({}, state, {\n        opt: _extends({}, state.opt, {\n          checkpoint_name: action.checkpoint_name,\n          epoch: action.epoch\n        })\n      });\n\n    case _types2.default.player.set_fps:\n      return _extends({}, state, {\n        fps: action.fps\n      });\n\n    case _types2.default.system.stdout:\n      if (action.data.processor === 'gpu') {\n        return _extends({}, state, {\n          last_message: action.data.data\n        });\n      }\n      return state;\n\n    case _types2.default.player.current_frame:\n      return action.meta ? _extends({}, state, {\n        frame: action.meta\n      }) : state;\n\n    case _types2.default.player.pausing:\n      return _extends({}, state, {\n        playing: false\n      });\n\n    case _types2.default.player.playing:\n      return _extends({}, state, {\n        playing: true\n      });\n\n    case _types2.default.player.start_recording:\n      return _extends({}, state, {\n        opt: _extends({}, state.opt, {\n          recording: true\n        })\n      });\n    case _types2.default.player.add_record_frame:\n      return _extends({}, state, {\n        opt: _extends({}, state.opt, {\n          recordFrames: (state.opt.recordFrames || 0) + 1\n        })\n      });\n    case _types2.default.player.save_frame:\n      _fileSaver2.default.saveAs(action.blob, state.opt.checkpoint_name + \"_\" + state.opt.sequence + \"_\" + (0, _moment2.default)().format(\"YYYYMMDD_HHmm\") + \".png\");\n      return state;\n\n    case _types2.default.player.saving_video:\n      return _extends({}, state, {\n        opt: _extends({}, state.opt, {\n          savingVideo: true\n        })\n      });\n    case _types2.default.player.save_video:\n      _fileSaver2.default.saveAs(action.blob, state.opt.checkpoint_name + \"_\" + state.opt.sequence + \"_\" + (0, _moment2.default)().format(\"YYYYMMDD_HHmm\") + \".webm\");\n      return _extends({}, state, {\n        opt: _extends({}, state.opt, {\n          recording: false,\n          savingVideo: false,\n          recordFrames: 0\n        })\n      });\n\n    default:\n      return state;\n  }\n};\n\nexports.default = liveReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.startSynthesizing = startSynthesizing;\nexports.stopSynthesizing = stopSynthesizing;\nexports.startRecording = startRecording;\nexports.stopRecording = stopRecording;\nexports.saveFrame = saveFrame;\nexports.onFrame = onFrame;\nexports.toggleFPS = toggleFPS;\nexports.startWatchingFPS = startWatchingFPS;\nexports.stopWatchingFPS = stopWatchingFPS;\n\nvar _store = require('../store');\n\nvar _whammy = require('./whammy');\n\nvar _whammy2 = _interopRequireDefault(_whammy);\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _pix2wav = require('../audio/pix2wav');\n\nvar pix2wav = _interopRequireWildcard(_pix2wav);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar fps = 0,\n    last_frame = void 0;\nvar recording = false,\n    saving = false,\n    synthesizing = false;\nvar videoWriter = void 0;\n\nfunction startSynthesizing() {\n  synthesizing = true;\n}\nfunction stopSynthesizing() {\n  synthesizing = false;\n}\n\nfunction startRecording() {\n  videoWriter = new _whammy2.default.Video(25, 0.95);\n  recording = true;\n  _store.store.dispatch({\n    type: _types2.default.player.start_recording\n  });\n}\n\nfunction stopRecording() {\n  if (!recording) return;\n  recording = false;\n  _store.store.dispatch({\n    type: _types2.default.player.saving_video\n  });\n  videoWriter.compile(false, function (blob) {\n    // console.log(blob)\n    _store.store.dispatch({\n      type: _types2.default.player.save_video,\n      blob: blob\n    });\n  });\n}\n\nfunction saveFrame() {\n  saving = true;\n}\n\nfunction onFrame(data) {\n  var blob = new Blob([data.frame], { type: 'image/jpg' });\n  var url = URL.createObjectURL(blob);\n  var img = new Image();\n  var canvas = document.querySelector('.player canvas');\n  if (!canvas) return console.error('no canvas for frame');\n  img.onload = function () {\n    img.onload = null;\n    last_frame = data.meta;\n    URL.revokeObjectURL(url);\n    var ctx = canvas.getContext('2d-lodpi');\n    ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n    if (synthesizing) {\n      var imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);\n      pix2wav.play({ imageData: imageData });\n    }\n    if (recording) {\n      console.log('record frame');\n      videoWriter.add(canvas);\n      _store.store.dispatch({\n        type: _types2.default.player.add_record_frame\n      });\n    }\n    if (saving) {\n      saving = false;\n      canvas.toBlob(function (blob) {\n        _store.store.dispatch({\n          type: _types2.default.player.save_frame,\n          blob: blob\n        });\n      });\n    }\n    fps += 1;\n  };\n  img.src = url;\n}\n\nvar previousValue = void 0,\n    currentValue = void 0;\nfunction toggleFPS(state) {\n  currentValue = typeof state !== 'undefined' ? state : _store.store.getState().live.playing;\n  if (previousValue !== currentValue) {\n    if (currentValue) {\n      startWatchingFPS();\n    } else {\n      stopWatchingFPS();\n    }\n  }\n  previousValue = currentValue;\n}\n\nvar fpsInterval = void 0;\n\nfunction startWatchingFPS() {\n  clearInterval(fpsInterval);\n  fpsInterval = setInterval(function () {\n    _store.store.dispatch({\n      type: _types2.default.player.set_fps,\n      fps: fps\n    });\n    _store.store.dispatch({\n      type: _types2.default.player.current_frame,\n      meta: last_frame\n    });\n    fps = 0;\n  }, 1000);\n}\nfunction stopWatchingFPS() {\n  clearInterval(fpsInterval);\n}","\"use strict\";\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nmodule.exports = function () {\n  // in this case, frames has a very specific meaning, which will be\n  // detailed once i finish writing the code\n\n  function toWebM(frames, outputAsArray) {\n    var info = checkFrames(frames);\n\n    //max duration by cluster in milliseconds\n    var CLUSTER_MAX_DURATION = 30000;\n\n    var EBML = [{\n      \"id\": 0x1a45dfa3, // EBML\n      \"data\": [{\n        \"data\": 1,\n        \"id\": 0x4286 // EBMLVersion\n      }, {\n        \"data\": 1,\n        \"id\": 0x42f7 // EBMLReadVersion\n      }, {\n        \"data\": 4,\n        \"id\": 0x42f2 // EBMLMaxIDLength\n      }, {\n        \"data\": 8,\n        \"id\": 0x42f3 // EBMLMaxSizeLength\n      }, {\n        \"data\": \"webm\",\n        \"id\": 0x4282 // DocType\n      }, {\n        \"data\": 2,\n        \"id\": 0x4287 // DocTypeVersion\n      }, {\n        \"data\": 2,\n        \"id\": 0x4285 // DocTypeReadVersion\n      }]\n    }, {\n      \"id\": 0x18538067, // Segment\n      \"data\": [{\n        \"id\": 0x1549a966, // Info\n        \"data\": [{\n          \"data\": 1e6, //do things in millisecs (num of nanosecs for duration scale)\n          \"id\": 0x2ad7b1 // TimecodeScale\n        }, {\n          \"data\": \"whammy\",\n          \"id\": 0x4d80 // MuxingApp\n        }, {\n          \"data\": \"whammy\",\n          \"id\": 0x5741 // WritingApp\n        }, {\n          \"data\": doubleToString(info.duration),\n          \"id\": 0x4489 // Duration\n        }]\n      }, {\n        \"id\": 0x1654ae6b, // Tracks\n        \"data\": [{\n          \"id\": 0xae, // TrackEntry\n          \"data\": [{\n            \"data\": 1,\n            \"id\": 0xd7 // TrackNumber\n          }, {\n            \"data\": 1,\n            \"id\": 0x73c5 // TrackUID\n          }, {\n            \"data\": 0,\n            \"id\": 0x9c // FlagLacing\n          }, {\n            \"data\": \"und\",\n            \"id\": 0x22b59c // Language\n          }, {\n            \"data\": \"V_VP8\",\n            \"id\": 0x86 // CodecID\n          }, {\n            \"data\": \"VP8\",\n            \"id\": 0x258688 // CodecName\n          }, {\n            \"data\": 1,\n            \"id\": 0x83 // TrackType\n          }, {\n            \"id\": 0xe0, // Video\n            \"data\": [{\n              \"data\": info.width,\n              \"id\": 0xb0 // PixelWidth\n            }, {\n              \"data\": info.height,\n              \"id\": 0xba // PixelHeight\n            }]\n          }]\n        }]\n      }, {\n        \"id\": 0x1c53bb6b, // Cues\n        \"data\": [\n          //cue insertion point\n        ]\n\n        //cluster insertion point\n      }]\n    }];\n\n    var segment = EBML[1];\n    var cues = segment.data[2];\n\n    //Generate clusters (max duration)\n    var frameNumber = 0;\n    var clusterTimecode = 0;\n    while (frameNumber < frames.length) {\n\n      var cuePoint = {\n        \"id\": 0xbb, // CuePoint\n        \"data\": [{\n          \"data\": Math.round(clusterTimecode),\n          \"id\": 0xb3 // CueTime\n        }, {\n          \"id\": 0xb7, // CueTrackPositions\n          \"data\": [{\n            \"data\": 1,\n            \"id\": 0xf7 // CueTrack\n          }, {\n            \"data\": 0, // to be filled in when we know it\n            \"size\": 8,\n            \"id\": 0xf1 // CueClusterPosition\n          }]\n        }]\n      };\n\n      cues.data.push(cuePoint);\n\n      var clusterFrames = [];\n      var clusterDuration = 0;\n      do {\n        clusterFrames.push(frames[frameNumber]);\n        clusterDuration += frames[frameNumber].duration;\n        frameNumber++;\n      } while (frameNumber < frames.length && clusterDuration < CLUSTER_MAX_DURATION);\n\n      var clusterCounter = 0;\n      var cluster = {\n        \"id\": 0x1f43b675, // Cluster\n        \"data\": [{\n          \"data\": Math.round(clusterTimecode),\n          \"id\": 0xe7 // Timecode\n        }].concat(clusterFrames.map(function (webp) {\n          var block = makeSimpleBlock({\n            discardable: 0,\n            frame: webp.data.slice(4),\n            invisible: 0,\n            keyframe: 1,\n            lacing: 0,\n            trackNum: 1,\n            timecode: Math.round(clusterCounter)\n          });\n          clusterCounter += webp.duration;\n          return {\n            data: block,\n            id: 0xa3\n          };\n        }))\n\n        //Add cluster to segment\n      };segment.data.push(cluster);\n      clusterTimecode += clusterDuration;\n    }\n\n    //First pass to compute cluster positions\n    var position = 0;\n    for (var i = 0; i < segment.data.length; i++) {\n      if (i >= 3) {\n        cues.data[i - 3].data[1].data[1].data = position;\n      }\n      var data = generateEBML([segment.data[i]], outputAsArray);\n      position += data.size || data.byteLength || data.length;\n      if (i != 2) {\n        // not cues\n        //Save results to avoid having to encode everything twice\n        segment.data[i] = data;\n      }\n    }\n\n    return generateEBML(EBML, outputAsArray);\n  }\n\n  // sums the lengths of all the frames and gets the duration, woo\n\n  function checkFrames(frames) {\n    var width = frames[0].width,\n        height = frames[0].height,\n        duration = frames[0].duration;\n    for (var i = 1; i < frames.length; i++) {\n      if (frames[i].width != width) throw \"Frame \" + (i + 1) + \" has a different width\";\n      if (frames[i].height != height) throw \"Frame \" + (i + 1) + \" has a different height\";\n      if (frames[i].duration < 0 || frames[i].duration > 0x7fff) throw \"Frame \" + (i + 1) + \" has a weird duration (must be between 0 and 32767)\";\n      duration += frames[i].duration;\n    }\n    return {\n      duration: duration,\n      width: width,\n      height: height\n    };\n  }\n\n  function numToBuffer(num) {\n    var parts = [];\n    while (num > 0) {\n      parts.push(num & 0xff);\n      num = num >> 8;\n    }\n    return new Uint8Array(parts.reverse());\n  }\n\n  function numToFixedBuffer(num, size) {\n    var parts = new Uint8Array(size);\n    for (var i = size - 1; i >= 0; i--) {\n      parts[i] = num & 0xff;\n      num = num >> 8;\n    }\n    return parts;\n  }\n\n  function strToBuffer(str) {\n    // return new Blob([str]);\n\n    var arr = new Uint8Array(str.length);\n    for (var i = 0; i < str.length; i++) {\n      arr[i] = str.charCodeAt(i);\n    }\n    return arr;\n    // this is slower\n    // return new Uint8Array(str.split('').map(function(e){\n    //  return e.charCodeAt(0)\n    // }))\n  }\n\n  //sorry this is ugly, and sort of hard to understand exactly why this was done\n  // at all really, but the reason is that there's some code below that i dont really\n  // feel like understanding, and this is easier than using my brain.\n\n  function bitsToBuffer(bits) {\n    var data = [];\n    var pad = bits.length % 8 ? new Array(1 + 8 - bits.length % 8).join('0') : '';\n    bits = pad + bits;\n    for (var i = 0; i < bits.length; i += 8) {\n      data.push(parseInt(bits.substr(i, 8), 2));\n    }\n    return new Uint8Array(data);\n  }\n\n  function generateEBML(json, outputAsArray) {\n    var ebml = [];\n    for (var i = 0; i < json.length; i++) {\n      if (!('id' in json[i])) {\n        //already encoded blob or byteArray\n        ebml.push(json[i]);\n        continue;\n      }\n\n      var data = json[i].data;\n      if ((typeof data === \"undefined\" ? \"undefined\" : _typeof(data)) == 'object') data = generateEBML(data, outputAsArray);\n      if (typeof data == 'number') data = 'size' in json[i] ? numToFixedBuffer(data, json[i].size) : bitsToBuffer(data.toString(2));\n      if (typeof data == 'string') data = strToBuffer(data);\n\n      if (data.length) {\n        var z = z;\n      }\n\n      var len = data.size || data.byteLength || data.length;\n      var zeroes = Math.ceil(Math.ceil(Math.log(len) / Math.log(2)) / 8);\n      var size_str = len.toString(2);\n      var padded = new Array(zeroes * 7 + 7 + 1 - size_str.length).join('0') + size_str;\n      var size = new Array(zeroes).join('0') + '1' + padded;\n\n      //i actually dont quite understand what went on up there, so I'm not really\n      //going to fix this, i'm probably just going to write some hacky thing which\n      //converts that string into a buffer-esque thing\n\n      ebml.push(numToBuffer(json[i].id));\n      ebml.push(bitsToBuffer(size));\n      ebml.push(data);\n    }\n\n    //output as blob or byteArray\n    if (outputAsArray) {\n      //convert ebml to an array\n      var buffer = toFlatArray(ebml);\n      return new Uint8Array(buffer);\n    } else {\n      return new Blob(ebml, { type: \"video/webm\" });\n    }\n  }\n\n  function toFlatArray(arr, outBuffer) {\n    if (outBuffer == null) {\n      outBuffer = [];\n    }\n    for (var i = 0; i < arr.length; i++) {\n      if (_typeof(arr[i]) == 'object') {\n        //an array\n        toFlatArray(arr[i], outBuffer);\n      } else {\n        //a simple element\n        outBuffer.push(arr[i]);\n      }\n    }\n    return outBuffer;\n  }\n\n  //OKAY, so the following two functions are the string-based old stuff, the reason they're\n  //still sort of in here, is that they're actually faster than the new blob stuff because\n  //getAsFile isn't widely implemented, or at least, it doesn't work in chrome, which is the\n  // only browser which supports get as webp\n\n  //Converting between a string of 0010101001's and binary back and forth is probably inefficient\n  //TODO: get rid of this function\n  function toBinStr_old(bits) {\n    var data = '';\n    var pad = bits.length % 8 ? new Array(1 + 8 - bits.length % 8).join('0') : '';\n    bits = pad + bits;\n    for (var i = 0; i < bits.length; i += 8) {\n      data += String.fromCharCode(parseInt(bits.substr(i, 8), 2));\n    }\n    return data;\n  }\n\n  function generateEBML_old(json) {\n    var ebml = '';\n    for (var i = 0; i < json.length; i++) {\n      var data = json[i].data;\n      if ((typeof data === \"undefined\" ? \"undefined\" : _typeof(data)) == 'object') data = generateEBML_old(data);\n      if (typeof data == 'number') data = toBinStr_old(data.toString(2));\n\n      var len = data.length;\n      var zeroes = Math.ceil(Math.ceil(Math.log(len) / Math.log(2)) / 8);\n      var size_str = len.toString(2);\n      var padded = new Array(zeroes * 7 + 7 + 1 - size_str.length).join('0') + size_str;\n      var size = new Array(zeroes).join('0') + '1' + padded;\n\n      ebml += toBinStr_old(json[i].id.toString(2)) + toBinStr_old(size) + data;\n    }\n    return ebml;\n  }\n\n  //woot, a function that's actually written for this project!\n  //this parses some json markup and makes it into that binary magic\n  //which can then get shoved into the matroska comtainer (peaceably)\n\n  function makeSimpleBlock(data) {\n    var flags = 0;\n    if (data.keyframe) flags |= 128;\n    if (data.invisible) flags |= 8;\n    if (data.lacing) flags |= data.lacing << 1;\n    if (data.discardable) flags |= 1;\n    if (data.trackNum > 127) {\n      throw \"TrackNumber > 127 not supported\";\n    }\n    var out = [data.trackNum | 0x80, data.timecode >> 8, data.timecode & 0xff, flags].map(function (e) {\n      return String.fromCharCode(e);\n    }).join('') + data.frame;\n\n    return out;\n  }\n\n  // here's something else taken verbatim from weppy, awesome rite?\n\n  function parseWebP(riff) {\n    var VP8 = riff.RIFF[0].WEBP[0];\n\n    var frame_start = VP8.indexOf('\\x9d\\x01\\x2a'); //A VP8 keyframe starts with the 0x9d012a header\n    for (var i = 0, c = []; i < 4; i++) {\n      c[i] = VP8.charCodeAt(frame_start + 3 + i);\n    }var width, horizontal_scale, height, vertical_scale, tmp;\n\n    //the code below is literally copied verbatim from the bitstream spec\n    tmp = c[1] << 8 | c[0];\n    width = tmp & 0x3FFF;\n    horizontal_scale = tmp >> 14;\n    tmp = c[3] << 8 | c[2];\n    height = tmp & 0x3FFF;\n    vertical_scale = tmp >> 14;\n    return {\n      width: width,\n      height: height,\n      data: VP8,\n      riff: riff\n    };\n  }\n\n  // i think i'm going off on a riff by pretending this is some known\n  // idiom which i'm making a casual and brilliant pun about, but since\n  // i can't find anything on google which conforms to this idiomatic\n  // usage, I'm assuming this is just a consequence of some psychotic\n  // break which makes me make up puns. well, enough riff-raff (aha a\n  // rescue of sorts), this function was ripped wholesale from weppy\n\n  function parseRIFF(string) {\n    var offset = 0;\n    var chunks = {};\n\n    while (offset < string.length) {\n      var id = string.substr(offset, 4);\n      chunks[id] = chunks[id] || [];\n      if (id == 'RIFF' || id == 'LIST') {\n        var len = parseInt(string.substr(offset + 4, 4).split('').map(function (i) {\n          var unpadded = i.charCodeAt(0).toString(2);\n          return new Array(8 - unpadded.length + 1).join('0') + unpadded;\n        }).join(''), 2);\n        var data = string.substr(offset + 4 + 4, len);\n        offset += 4 + 4 + len;\n        chunks[id].push(parseRIFF(data));\n      } else if (id == 'WEBP') {\n        // Use (offset + 8) to skip past \"VP8 \"/\"VP8L\"/\"VP8X\" field after \"WEBP\"\n        chunks[id].push(string.substr(offset + 8));\n        offset = string.length;\n      } else {\n        // Unknown chunk type; push entire payload\n        chunks[id].push(string.substr(offset + 4));\n        offset = string.length;\n      }\n    }\n    return chunks;\n  }\n\n  // here's a little utility function that acts as a utility for other functions\n  // basically, the only purpose is for encoding \"Duration\", which is encoded as\n  // a double (considerably more difficult to encode than an integer)\n  function doubleToString(num) {\n    return [].slice.call(new Uint8Array(new Float64Array([num]) //create a float64 array\n    .buffer) //extract the array buffer\n    , 0) // convert the Uint8Array into a regular array\n    .map(function (e) {\n      //since it's a regular array, we can now use map\n      return String.fromCharCode(e); // encode all the bytes individually\n    }).reverse() //correct the byte endianness (assume it's little endian for now)\n    .join(''); // join the bytes in holy matrimony as a string\n  }\n\n  function WhammyVideo(speed, quality) {\n    // a more abstract-ish API\n    this.frames = [];\n    this.duration = 1000 / speed;\n    this.quality = quality || 0.8;\n  }\n\n  WhammyVideo.prototype.add = function (frame, duration) {\n    if (typeof duration != 'undefined' && this.duration) throw \"you can't pass a duration if the fps is set\";\n    if (typeof duration == 'undefined' && !this.duration) throw \"if you don't have the fps set, you need to have durations here.\";\n    if (frame.canvas) {\n      //CanvasRenderingContext2D\n      frame = frame.canvas;\n    }\n    if (frame.toDataURL) {\n      // frame = frame.toDataURL('image/webp', this.quality);\n      // quickly store image data so we don't block cpu. encode in compile method.\n      frame = frame.getContext('2d-lodpi').getImageData(0, 0, frame.width, frame.height);\n    } else if (typeof frame != \"string\") {\n      throw \"frame must be a a HTMLCanvasElement, a CanvasRenderingContext2D or a DataURI formatted string\";\n    }\n    if (typeof frame === \"string\" && !/^data:image\\/webp;base64,/ig.test(frame)) {\n      throw \"Input must be formatted properly as a base64 encoded DataURI of type image/webp\";\n    }\n    this.frames.push({\n      image: frame,\n      duration: duration || this.duration\n    });\n  };\n\n  // deferred webp encoding. Draws image data to canvas, then encodes as dataUrl\n  WhammyVideo.prototype.encodeFrames = function (callback) {\n\n    if (this.frames[0].image instanceof ImageData) {\n\n      var frames = this.frames;\n      var tmpCanvas = document.createElement('canvas');\n      var tmpContext = tmpCanvas.getContext('2d-lodpi');\n      tmpCanvas.width = this.frames[0].image.width;\n      tmpCanvas.height = this.frames[0].image.height;\n\n      var encodeFrame = function (index) {\n        console.log('encodeFrame', index);\n        var frame = frames[index];\n        tmpContext.putImageData(frame.image, 0, 0);\n        frame.image = tmpCanvas.toDataURL('image/webp', this.quality);\n        if (index < frames.length - 1) {\n          setTimeout(function () {\n            encodeFrame(index + 1);\n          }, 1);\n        } else {\n          callback();\n        }\n      }.bind(this);\n\n      encodeFrame(0);\n    } else {\n      callback();\n    }\n  };\n\n  WhammyVideo.prototype.compile = function (outputAsArray, callback) {\n\n    this.encodeFrames(function () {\n      var width = 0;\n      var height = 0;\n      var webm = new toWebM(this.frames.map(function (frame) {\n        var webp = parseWebP(parseRIFF(atob(frame.image.slice(23))));\n        webp.duration = frame.duration;\n        if (!webp || !webp.width || !webp.height) return null;\n        if (!width) width = webp.width;else if (width !== webp.width) return null;\n        if (!height) height = webp.height;else if (height !== webp.height) return null;\n        return webp;\n      }).filter(function (frame) {\n        return !!frame;\n      }), outputAsArray);\n      callback(webm);\n    }.bind(this));\n  };\n\n  return {\n    Video: WhammyVideo,\n    fromImageArray: function fromImageArray(images, fps, outputAsArray) {\n      return toWebM(images.map(function (image) {\n        var webp = parseWebP(parseRIFF(atob(image.slice(23))));\n        webp.duration = 1000 / fps;\n        return webp;\n      }), outputAsArray);\n    },\n    toWebM: toWebM\n    // expose methods of madness\n  };\n}();","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _morph = require('./morph');\n\nvar _morph2 = _interopRequireDefault(_morph);\n\nvar _pix2pix = require('./pix2pix');\n\nvar _pix2pix2 = _interopRequireDefault(_pix2pix);\n\nvar _pix2pixhd = require('./pix2pixhd');\n\nvar _pix2pixhd2 = _interopRequireDefault(_pix2pixhd);\n\nvar _pix2wav = require('./pix2wav');\n\nvar _pix2wav2 = _interopRequireDefault(_pix2wav);\n\nvar _samplernn = require('./samplernn');\n\nvar _samplernn2 = _interopRequireDefault(_samplernn);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = {\n  morph: _morph2.default, pix2pix: _pix2pix2.default, pix2pixhd: _pix2pixhd2.default, pix2wav: _pix2wav2.default, samplernn: _samplernn2.default\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.moduleReducer = undefined;\n\nvar _redux = require('redux');\n\nvar _morph = require('./morph/morph.reducer');\n\nvar _morph2 = _interopRequireDefault(_morph);\n\nvar _pix2pix = require('./pix2pix/pix2pix.reducer');\n\nvar _pix2pix2 = _interopRequireDefault(_pix2pix);\n\nvar _pix2pixhd = require('./pix2pixhd/pix2pixhd.reducer');\n\nvar _pix2pixhd2 = _interopRequireDefault(_pix2pixhd);\n\nvar _pix2wav = require('./pix2wav/pix2wav.reducer');\n\nvar _pix2wav2 = _interopRequireDefault(_pix2wav);\n\nvar _samplernn = require('./samplernn/samplernn.reducer');\n\nvar _samplernn2 = _interopRequireDefault(_samplernn);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar moduleReducer = exports.moduleReducer = (0, _redux.combineReducers)({\n  morph: _morph2.default,\n  pix2pix: _pix2pix2.default,\n  pix2pixhd: _pix2pixhd2.default,\n  pix2wav: _pix2wav2.default,\n  samplernn: _samplernn2.default\n});","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _morph = require('./views/morph.app');\n\nvar _morph2 = _interopRequireDefault(_morph);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar router = function () {\n  function router() {\n    _classCallCheck(this, router);\n  }\n\n  _createClass(router, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      _actions2.default.system.changeTool('morph');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #def, #dfe)';\n    }\n  }, {\n    key: 'componentWillReceiveProps',\n    value: function componentWillReceiveProps() {\n      _actions2.default.system.changeTool('morph');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #def, #dfe)';\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'section',\n        null,\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/morph/app/', component: _morph2.default })\n      );\n    }\n  }]);\n\n  return router;\n}();\n\nfunction links() {\n  return [{ url: '/morph/app/', name: 'morph' }];\n}\n\nexports.default = {\n  name: 'morph',\n  router: router, links: links\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.load_data = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.loader');\n\nvar datasetLoader = _interopRequireWildcard(_dataset);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _morph = require('./morph.module');\n\nvar _morph2 = _interopRequireDefault(_morph);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar load_data = exports.load_data = function load_data(id) {\n  return function (dispatch) {\n    var module = _morph2.default.name;\n    _util2.default.allProgress([datasetLoader.load(module), _actions2.default.socket.list_sequences({ module: 'pix2pixhd', dir: 'sequences' }), _actions2.default.socket.list_directory({ module: module, dir: 'renders' })], function (percent, i, n) {\n      console.log('morph load progress', i, n);\n      dispatch({\n        type: _types2.default.app.load_progress,\n        progress: { i: i, n: n },\n        data: { module: 'morph' }\n      });\n    }).then(function (res) {\n      var _res = _slicedToArray(res, 3),\n          datasetApiReport = _res[0],\n          sequences = _res[1],\n          renders = _res[2];\n\n      var folderLookup = datasetApiReport.folderLookup,\n          fileLookup = datasetApiReport.fileLookup,\n          datasetLookup = datasetApiReport.datasetLookup,\n          folders = datasetApiReport.folders,\n          files = datasetApiReport.files,\n          unsortedFolder = datasetApiReport.unsortedFolder,\n          resultsFolder = datasetApiReport.resultsFolder;\n\n\n      dispatch({\n        type: _types2.default.morph.load,\n        data: datasetApiReport,\n        app: {\n          resultsFolder: resultsFolder,\n          files: files,\n          sequences: sequences,\n          renders: renders\n        }\n      });\n    });\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nvar morphModule = {\n  name: 'morph',\n  displayName: 'Morph',\n  datatype: 'video'\n};\n\nexports.default = morphModule;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.reducer');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar morphInitialState = {\n  loading: true,\n  progress: { i: 0, n: 0 },\n  error: null,\n  folder_id: 0,\n  data: null,\n  app: null\n};\n\nvar morphReducer = function morphReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : morphInitialState;\n  var action = arguments[1];\n\n  if (action.data && action.data.module === 'morph') {\n    state = (0, _dataset2.default)(state, action);\n  }\n\n  switch (action.type) {\n    case _types2.default.morph.load:\n      console.log('morph load', action.app);\n      return _extends({}, state, {\n        app: action.app,\n        loading: false,\n        data: action.data\n      });\n    case _types2.default.file.create:\n      console.log(action);\n      if (action.data.module !== 'morph') return state;\n      return _extends({}, state, {\n        app: state.app && _extends({}, state.app, {\n          files: [action.data].concat(state.app.files)\n        })\n      });\n    default:\n      return state;\n  }\n};\n\nexports.default = morphReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.morph_task = undefined;\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _morph = require('./morph.module');\n\nvar _morph2 = _interopRequireDefault(_morph);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar morph_task = exports.morph_task = function morph_task(state, folder) {\n  return function (dispatch) {\n    if (state.a === 'PLACEHOLDER' || state.b === 'PLACEHOLDER') return;\n    var task = {\n      module: _morph2.default.name,\n      activity: 'morph',\n      dataset: state.a,\n      folder_id: folder.id,\n      opt: state\n    };\n    return _actions2.default.queue.add_task(task);\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _actions = require('../../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _morph = require('../morph.actions');\n\nvar morphActions = _interopRequireWildcard(_morph);\n\nvar _morph2 = require('../morph.tasks');\n\nvar morphTasks = _interopRequireWildcard(_morph2);\n\nvar _loading = require('../../../common/loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nvar _common = require('../../../common');\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar yes_count = 0;\n\nvar MorphResults = function (_Component) {\n  _inherits(MorphResults, _Component);\n\n  function MorphResults(props) {\n    _classCallCheck(this, MorphResults);\n\n    var _this = _possibleConstructorReturn(this, (MorphResults.__proto__ || Object.getPrototypeOf(MorphResults)).call(this));\n\n    _this.state = {\n      dataset_module: 'pix2pixhd',\n      a: \"PLACEHOLDER\",\n      b: \"PLACEHOLDER\",\n      a_offset: 0,\n      a_duration: 1,\n      a_pos: 0,\n      b_offset: 0,\n      b_duration: 1,\n      b_pos: 0,\n      steps: 16,\n      dilate: 2,\n      frames: 32,\n      padding: 3,\n      smooth: true,\n      mode: 'mix'\n    };\n    if (!props.morph.data) props.actions.load_data();\n    return _this;\n  }\n\n  _createClass(MorphResults, [{\n    key: 'componentDidMount',\n    value: function componentDidMount() {\n      yes_count = 0;\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      if (!this.props.morph.app) return (0, _preact.h)(_loading2.default, { progress: this.props.morph.progress });\n\n      var _props$morph$app = this.props.morph.app,\n          resultsFolder = _props$morph$app.resultsFolder,\n          sequences = _props$morph$app.sequences,\n          renders = _props$morph$app.renders,\n          files = _props$morph$app.files;\n\n      var sequence_options = sequences.map(function (sequence) {\n        return [sequence.name.split(\"_\").slice(0, 3).join(\" \") + \"~ (\" + sequence.count + \")\", sequence.name];\n      });\n      var sequenceLookup = sequences.reduce(function (a, b) {\n        return a[b.name] = b, a;\n      }, {});\n\n      var totalLength = this.state.frames / 25;\n      var lengthWarning = void 0;\n      if (this.state.steps / this.state.dilate > 64 && this.state.mode === 'mix') {\n        lengthWarning = (0, _preact.h)(\n          'span',\n          null,\n          (0, _preact.h)('br', null),\n          'warning, this will take a while'\n        );\n      }\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'app morph' },\n        (0, _preact.h)(\n          'div',\n          { className: 'heading row middle' },\n          (0, _preact.h)(\n            'h1',\n            null,\n            'Morph'\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { 'class': 'rows params renders' },\n          (0, _preact.h)(\n            'div',\n            { 'class': 'column' },\n            (0, _preact.h)(\n              _common.Group,\n              { title: 'From' },\n              (0, _preact.h)(_common.Select, {\n                title: 'Starting sequence',\n                placeholder: 'Please choose a video',\n                value: this.state.a,\n                options: sequence_options,\n                onChange: function onChange(name, key) {\n                  return _this2.setState({ a: key, a_duration: sequenceLookup[key].count, a_pos: 0, a_offset: 0 });\n                }\n              }),\n              (0, _preact.h)(_common.Slider, {\n                title: 'Offset',\n                value: this.state.a_pos,\n                min: 0, max: 1, step: 0.01,\n                onChange: function onChange(key) {\n                  return _this2.setState({ a_pos: key, a_offset: Math.floor(key * (_this2.state.a_duration - _this2.state.frames)) });\n                }\n              })\n            ),\n            (0, _preact.h)(\n              _common.Group,\n              { title: 'To' },\n              (0, _preact.h)(_common.Select, {\n                title: 'Ending sequence',\n                placeholder: 'Please choose a video',\n                value: this.state.b,\n                options: sequence_options,\n                onChange: function onChange(name, key) {\n                  return _this2.setState({ b: key, b_duration: sequenceLookup[key].count, b_pos: 0, b_offset: 0 });\n                }\n              }),\n              (0, _preact.h)(_common.Slider, {\n                title: 'Offset',\n                value: this.state.b_pos,\n                min: 0, max: 1, step: 0.01,\n                onChange: function onChange(key) {\n                  return _this2.setState({ b_pos: key, b_offset: Math.floor(key * (_this2.state.b_duration - _this2.state.frames)) });\n                }\n              })\n            ),\n            (0, _preact.h)(\n              _common.Group,\n              { title: 'Morph Settings' },\n              (0, _preact.h)(_common.Select, {\n                title: \"Mode\",\n                value: this.state.mode,\n                options: ['mix', 'average', 'mix_images'],\n                onChange: function onChange(name, key) {\n                  return _this2.setState({ mode: key });\n                }\n              }),\n              (0, _preact.h)(_common.Slider, {\n                type: 'list',\n                title: 'Steps',\n                value: this.state.steps,\n                options: [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096],\n                onChange: function onChange(key) {\n                  return _this2.setState({ steps: key, frames: key * _this2.state.dilate });\n                }\n              }),\n              (0, _preact.h)(_common.Slider, {\n                type: 'list',\n                title: 'Dilate',\n                value: this.state.dilate,\n                options: [1, 2, 4, 8, 16, 32],\n                onChange: function onChange(key) {\n                  return _this2.setState({ dilate: key, frames: _this2.state.steps * key });\n                }\n              }),\n              (0, _preact.h)(_common.Checkbox, {\n                title: 'Smooth',\n                value: this.state.smooth,\n                onToggle: function onToggle(key) {\n                  return _this2.setState({ smooth: key });\n                }\n              }),\n              (0, _preact.h)(_common.Slider, {\n                type: 'int',\n                title: 'Padding (in seconds)',\n                value: this.state.padding,\n                min: 0, max: 30, step: 1,\n                onChange: function onChange(key) {\n                  return _this2.setState({ padding: key });\n                }\n              }),\n              (0, _preact.h)(_common.Button, {\n                title: 'Run task',\n                value: 'Morph!',\n                onClick: function onClick() {\n                  return _this2.props.remote.morph_task(_this2.state, resultsFolder);\n                }\n              }),\n              (0, _preact.h)('br', null),\n              (0, _preact.h)(\n                _common.Param,\n                { title: 'Total length' },\n                totalLength.toFixed(1) + \" seconds\"\n              ),\n              (0, _preact.h)(\n                _common.Param,\n                { title: 'Total frames' },\n                this.state.frames + \" frames\"\n              ),\n              lengthWarning,\n              (0, _preact.h)('br', null),\n              (0, _preact.h)(_common.CurrentTask, null)\n            )\n          ),\n          (0, _preact.h)(\n            'h3',\n            null,\n            'morphed videos'\n          ),\n          (0, _preact.h)(_common.FileList, {\n            linkFiles: true,\n            files: files,\n            orderBy: 'date desc',\n            fields: 'name datetime size delete',\n            onDelete: function onDelete(file) {\n              var yes = void 0;\n              if (yes_count < 3) {\n                yes = confirm('Are you sure you want to delete this file?');\n              } else {\n                yes = true;\n              }\n              if (yes) {\n                yes_count += 1;\n                console.log('delete: confirmed');\n                _actions2.default.file.destroy(file);\n              }\n            }\n          }),\n          (0, _preact.h)('br', null),\n          (0, _preact.h)(\n            'h3',\n            null,\n            'renders on server'\n          ),\n          (0, _preact.h)(_common.FileList, {\n            files: renders,\n            orderBy: 'date desc',\n            fields: 'name datetime time size',\n            onClick: function onClick(file, e) {\n              e.preventDefault();\n              e.stopPropagation();\n              console.log('picked a result', file);\n              _this2.handlePick(file);\n            }\n          })\n        )\n      );\n    }\n  }, {\n    key: 'handlePick',\n    value: function handlePick(file) {\n      // this.props.audioPlayer.play(file)\n    }\n  }]);\n\n  return MorphResults;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    morph: state.module.morph\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(morphActions, dispatch),\n    remote: (0, _redux.bindActionCreators)(morphTasks, dispatch)\n    // audioPlayer: bindActionCreators(audioPlayerActions, dispatch),\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(MorphResults);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2pix = require('./views/pix2pix.new');\n\nvar _pix2pix2 = _interopRequireDefault(_pix2pix);\n\nvar _pix2pix3 = require('./views/pix2pix.show');\n\nvar _pix2pix4 = _interopRequireDefault(_pix2pix3);\n\nvar _pix2pix5 = require('./views/pix2pix.live');\n\nvar _pix2pix6 = _interopRequireDefault(_pix2pix5);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar router = function () {\n  function router() {\n    _classCallCheck(this, router);\n  }\n\n  _createClass(router, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      _actions2.default.system.changeTool('pix2pix');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #fde, #ffe)';\n    }\n  }, {\n    key: 'componentWillReceiveProps',\n    value: function componentWillReceiveProps() {\n      _actions2.default.system.changeTool('pix2pix');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #fde, #ffe)';\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'section',\n        null,\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pix/new/', component: _pix2pix2.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pix/sequences/', component: _pix2pix4.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pix/sequences/:id/', component: _pix2pix4.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pix/live/', component: _pix2pix6.default })\n      );\n    }\n  }]);\n\n  return router;\n}();\n\nfunction links() {\n  return [{ url: '/pix2pix/new/', name: 'new' }, { url: '/pix2pix/sequences/', name: 'sequences' }, { url: '/pix2pix/live/', name: 'live' }];\n}\n\nexports.default = {\n  name: 'pix2pix',\n  router: router, links: links\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.load_directories = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.loader');\n\nvar datasetLoader = _interopRequireWildcard(_dataset);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2pix = require('./pix2pix.module');\n\nvar _pix2pix2 = _interopRequireDefault(_pix2pix);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar load_directories = exports.load_directories = function load_directories(id) {\n  return function (dispatch) {\n    var module = _pix2pix2.default.name;\n    _util2.default.allProgress([datasetLoader.load(module), _actions2.default.socket.list_directory({ module: module, dir: 'sequences/pix2pix/' }), _actions2.default.socket.list_directory({ module: module, dir: 'datasets/pix2pix/' }), _actions2.default.socket.list_directory({ module: module, dir: 'checkpoints/pix2pix/' })], function (percent, i, n) {\n      console.log('pix2pix load progress', i, n);\n      dispatch({ type: _types2.default.app.load_progress, progress: { i: i, n: n } });\n    }).then(function (res) {\n      var _res = _slicedToArray(res, 4),\n          datasetApiReport = _res[0],\n          sequences = _res[1],\n          datasets = _res[2],\n          checkpoints = _res[3]; //, datasets, results, output, datasetUsage, lossReport] = res\n\n\n      var folderLookup = datasetApiReport.folderLookup,\n          fileLookup = datasetApiReport.fileLookup,\n          datasetLookup = datasetApiReport.datasetLookup,\n          folders = datasetApiReport.folders,\n          files = datasetApiReport.files,\n          unsortedFolder = datasetApiReport.unsortedFolder;\n      // console.log(datasetUsage)\n\n      var sequenceDirectories = sequences.filter(function (s) {\n        return s.dir;\n      });\n      // console.log(sequenceDirectories)\n      sequenceDirectories.forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.isBuilt = true;\n        // console.log(dir.name, dataset)\n      });\n\n      datasets.filter(function (s) {\n        return s.dir;\n      }).forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.hasDataset = true;\n      });\n\n      var checkpointDirectories = checkpoints.filter(function (s) {\n        return s.dir;\n      });\n      checkpointDirectories.forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.hasCheckpoints = true;\n        dataset.checkpoints = [dir];\n      });\n\n      // console.log(res)\n\n      // flatDatasets.forEach(file => {\n      //   file.uuid = uuidv1()\n      //   fileLookup[file.uuid] = file\n      //   const name = file.name.split('.')[0]\n      //   const dataset = datasetLoader.getDataset(module, datasetLookup, name, unsortedFolder, file.date)\n      //   file.persisted = false\n      //   dataset.input.push(file.uuid)\n      // })\n\n      // // exp:coccokit_3-frame_sizes:8,2-n_rnn:2-dataset:coccokit_3\n      // const checkpoints = results.filter(s => s.dir).map(s => {\n      //   const checkpoint = s.name\n      //     .split('-')\n      //     .map(s => s.split(':'))\n      //     .filter(b => b.length && b[1])\n      //     .reduce((a,b) => (a[b[0]] = b[1]) && a, {})\n      //   checkpoint.name = checkpoint.name || checkpoint.dataset || checkpoint.exp\n      //   checkpoint.date = s.date\n      //   checkpoint.dir = s\n      //   checkpoint.persisted = false\n      //   const dataset = datasetLoader.getDataset(module, datasetLookup, checkpoint.name, unsortedFolder, checkpoint.date)\n      //   const loss = lossReport[checkpoint.name]\n      //   if (loss) {\n      //     dataset.epoch = checkpoint.epoch = loss.length\n      //     checkpoint.training_loss = loss\n      //   }\n      //   dataset.checkpoints.push(checkpoint)\n      //   return checkpoint\n      // })\n\n      // output.map(file => {\n      //   file.uuid = uuidv1()\n      //   fileLookup[file.uuid] = file\n      //   const pair = file.name.split('.')[0].split('-')\n      //   const dataset = datasetLoader.getDataset(module, datasetLookup, pair[0], unsortedFolder, file.date)\n      //   file.persisted = false\n      //   file.epoch = parseInt(file.epoch || pair[1].replace(/^\\D+/, '')) || 0\n      //   dataset.epoch = Math.max(file.epoch, dataset.epoch || 0)\n      //   // here check if the file exists in dataset, if so just check that it's persisted\n      //   const found = dataset.output.some(file_id => {\n      //     // if (f.name === \n      //     if (fileLookup[file_id].name === file.name) {\n      //       fileLookup[file_id].persisted = true\n      //       return true\n      //     }\n      //     return false\n      //   })\n      //   if (! found) {\n      //     dataset.output.push(file.uuid)\n      //   }\n      // })\n\n      dispatch({\n        type: _types2.default.dataset.load,\n        data: {\n          module: module,\n          folderLookup: folderLookup,\n          fileLookup: fileLookup,\n          datasetLookup: datasetLookup,\n          folders: folders, files: files,\n          sequences: sequenceDirectories,\n          datasets: datasets,\n          checkpoints: checkpointDirectories\n        }\n      });\n    }).catch(function (e) {\n      console.error(e);\n    });\n    if (id) {\n      console.log('folder id', id);\n      dispatch({\n        type: _types2.default.dataset.set_folder,\n        data: {\n          folder_id: id,\n          module: module\n        }\n      });\n    }\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nvar pix2pixModule = {\n  name: 'pix2pix',\n  displayName: 'Pix2Pix',\n  datatype: 'video'\n};\n\nexports.default = pix2pixModule;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.reducer');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar pix2pixInitialState = {\n  loading: true,\n  progress: { i: 0, n: 0 },\n  error: null,\n  folder_id: 0,\n  data: null\n};\n\nvar pix2pixReducer = function pix2pixReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : pix2pixInitialState;\n  var action = arguments[1];\n\n  if (action.data && action.data.module === 'pix2pix') {\n    state = (0, _dataset2.default)(state, action);\n  }\n\n  switch (action.type) {\n    default:\n      return state;\n  }\n};\n\nexports.default = pix2pixReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.train_task = exports.live_task = exports.fetch_task = undefined;\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar fetch_task = exports.fetch_task = function fetch_task(url, file_id, dataset) {\n  return function (dispatch) {\n    if (!url) return console.log('input file inaccessible (no url)');\n    var task = {\n      module: 'pix2pix',\n      activity: 'fetch',\n      dataset: dataset,\n      opt: {\n        url: url,\n        file_id: file_id,\n        dataset: dataset\n      }\n    };\n    return _actions2.default.queue.add_task(task);\n  };\n};\n\nvar live_task = exports.live_task = function live_task(sequence, checkpoint) {\n  return function (dispatch) {\n    var task = {\n      module: 'pix2pix',\n      activity: 'live',\n      dataset: sequence,\n      checkpoint: checkpoint,\n      opt: {\n        poll_delay: 0.09\n      }\n    };\n    console.log(task);\n    console.log('add live task');\n    return _actions2.default.queue.add_task(task);\n  };\n};\n\nvar train_task = exports.train_task = function train_task(dataset, folder_id) {\n  var epochs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n  return function (dispatch) {\n    var task = {\n      module: 'pix2pix',\n      activity: 'train',\n      dataset: dataset.name,\n      epoch: 0,\n      epochs: epochs,\n      opt: {\n        folder_id: folder_id,\n        load_size: 264 // switch to 256 for pix2wav\n      }\n    };\n    console.log(task);\n    return _actions2.default.queue.add_task(task);\n  };\n};\n// export const log_task = (dataset) => dispatch => {\n//   const task = {\n//     module: 'samplernn',\n//     activity: 'log',\n//     dataset: dataset.name,\n//   }\n//   return actions.queue.add_task(task)\n// }\n// export const clear_cache_task = (dataset) => dispatch => {\n//   const task = {\n//     module: 'samplernn',\n//     activity: 'clear_cache',\n//     dataset: dataset.name,\n//   }\n//   return actions.queue.add_task(task)\n// }","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _common = require('../../../common/');\n\nvar _player = require('../../../live/player');\n\nvar _live = require('../../../live/live.actions');\n\nvar liveActions = _interopRequireWildcard(_live);\n\nvar _queue = require('../../../queue/queue.actions');\n\nvar queueActions = _interopRequireWildcard(_queue);\n\nvar _pix2pix = require('../pix2pix.tasks');\n\nvar pix2pixTasks = _interopRequireWildcard(_pix2pix);\n\nvar _pix2pix2 = require('../pix2pix.actions');\n\nvar pix2pixActions = _interopRequireWildcard(_pix2pix2);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Pix2PixLive = function (_Component) {\n  _inherits(Pix2PixLive, _Component);\n\n  function Pix2PixLive(props) {\n    _classCallCheck(this, Pix2PixLive);\n\n    // if (! props.pix2pix || ! props.pix2pix.data) {\n    var _this = _possibleConstructorReturn(this, (Pix2PixLive.__proto__ || Object.getPrototypeOf(Pix2PixLive)).call(this));\n\n    props.actions.pix2pix.load_directories();\n    // }\n    props.actions.live.get_params();\n    // props.actions.live.list_checkpoints('pix2pix')\n    // props.actions.live.list_sequences('pix2pix')\n    _this.changeCheckpoint = _this.changeCheckpoint.bind(_this);\n    _this.changeEpoch = _this.changeEpoch.bind(_this);\n    _this.changeSequence = _this.changeSequence.bind(_this);\n    _this.seek = _this.seek.bind(_this);\n    _this.togglePlaying = _this.togglePlaying.bind(_this);\n    _this.toggleRecording = _this.toggleRecording.bind(_this);\n    return _this;\n  }\n\n  _createClass(Pix2PixLive, [{\n    key: 'componentWillUpdate',\n    value: function componentWillUpdate(nextProps) {\n      if (nextProps.opt.checkpoint_name && nextProps.opt.checkpoint_name !== this.props.opt.checkpoint_name) {\n        this.props.actions.live.list_epochs('pix2pix', nextProps.opt.checkpoint_name);\n      }\n    }\n  }, {\n    key: 'changeCheckpoint',\n    value: function changeCheckpoint(field, checkpoint_name) {\n      this.props.actions.live.load_epoch(checkpoint_name, 'latest');\n    }\n  }, {\n    key: 'changeEpoch',\n    value: function changeEpoch(field, epoch_name) {\n      this.props.actions.live.load_epoch(this.props.opt.checkpoint_name, epoch_name);\n    }\n  }, {\n    key: 'changeSequence',\n    value: function changeSequence(field, sequence) {\n      console.log('load sequence', sequence);\n      this.props.actions.live.load_sequence(sequence);\n    }\n  }, {\n    key: 'seek',\n    value: function seek(percentage) {\n      var frame = Math.floor(percentage * (parseInt(this.props.frame.sequence_len) || 1) + 1);\n      console.log(\"seek to frame\", percentage, frame);\n      this.props.actions.live.seek(frame);\n    }\n  }, {\n    key: 'start',\n    value: function start() {\n      // console.log(this.props)\n      var sequence = this.props.pix2pix.data.sequences[0].name;\n      var checkpoint = this.props.pix2pix.data.checkpoints[0].name;\n      console.log('starting up!', sequence, checkpoint);\n      this.props.actions.tasks.live_task(sequence, checkpoint);\n    }\n  }, {\n    key: 'interrupt',\n    value: function interrupt() {\n      this.props.actions.queue.stop_task('gpu');\n    }\n  }, {\n    key: 'togglePlaying',\n    value: function togglePlaying() {\n      if (this.props.opt.processing) {\n        this.props.actions.live.pause();\n      } else {\n        this.props.actions.live.play();\n      }\n    }\n  }, {\n    key: 'toggleRecording',\n    value: function toggleRecording() {\n      if (this.props.opt.recording) {\n        (0, _player.stopRecording)();\n        this.props.actions.live.pause();\n      } else {\n        (0, _player.startRecording)();\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      // console.log(this.props)\n      if (this.props.pix2pix.loading) {\n        return (0, _preact.h)(_common.Loading, null);\n      }\n      return (0, _preact.h)(\n        'div',\n        { className: 'app centered' },\n        (0, _preact.h)(_common.Player, { width: 424, height: 256 }),\n        (0, _preact.h)(\n          'div',\n          { className: 'params row' },\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Playback',\n                noToggle: true\n              },\n              (0, _preact.h)(_common.Select, {\n                name: 'send_image',\n                title: 'view mode',\n                options: ['a', 'b', 'sequence', 'recursive'],\n                onChange: this.props.actions.live.set_param\n              }),\n              (0, _preact.h)(_common.Select, {\n                name: 'sequence_name',\n                title: 'sequence',\n                options: this.props.pix2pix.data.sequences.map(function (file) {\n                  return file.name;\n                }),\n                onChange: this.changeSequence\n              }),\n              (0, _preact.h)(_common.Select, {\n                name: 'checkpoint_name',\n                title: 'checkpoint',\n                options: this.props.pix2pix.data.checkpoints.map(function (file) {\n                  return file.name;\n                }),\n                onChange: this.changeCheckpoint\n              }),\n              (0, _preact.h)(_common.Select, {\n                name: 'epoch',\n                title: 'epoch',\n                options: this.props.epochs,\n                onChange: this.changeEpoch\n              }),\n              (0, _preact.h)(_common.Slider, {\n                name: 'position',\n                min: 0.0, max: 1.0, type: 'float',\n                value: (this.props.frame.sequence_i || 0) / (this.props.frame.sequence_len || 1),\n                onChange: this.seek\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'frame_delay',\n                min: 0.05, max: 2.0, type: 'float'\n              }),\n              this.renderRestartButton(),\n              (0, _preact.h)(\n                _common.Button,\n                {\n                  title: this.props.opt.savingVideo ? 'Saving video...' : this.props.opt.recording ? 'Recording (' + timeInSeconds(this.props.opt.recordFrames / 25) + ')' : 'Record video',\n                  onClick: this.toggleRecording\n                },\n                this.props.opt.savingVideo ? 'Saving' : this.props.opt.recording ? 'Recording' : 'Record'\n              ),\n              (0, _preact.h)(\n                _common.Button,\n                {\n                  title: 'Save frame',\n                  onClick: _player.saveFrame\n                },\n                'Save'\n              ),\n              (0, _preact.h)(_common.ParamGroup, {\n                title: 'Render on server',\n                name: 'store_b',\n                onToggle: function onToggle(value) {\n                  // now storing frames on server...\n                }\n              }),\n              (0, _preact.h)(\n                'p',\n                { 'class': 'last_message' },\n                this.props.last_message\n              )\n            )\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Transition',\n                name: 'transition'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'transition_period',\n                min: 10, max: 5000, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'transition_min',\n                min: 0.001, max: 0.2, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'transition_max',\n                min: 0.1, max: 1.0, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Recursion',\n                name: 'recursive'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'recursive_frac',\n                min: 0.0, max: 0.5, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'recurse_roll',\n                min: -64, max: 64, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'recurse_roll_axis',\n                min: 0, max: 1, type: 'int'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Sequence',\n                name: 'sequence'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'sequence_frac',\n                min: 0.0, max: 0.5, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'process_frac',\n                min: 0, max: 1, type: 'float'\n              })\n            )\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Clahe',\n                name: 'clahe'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'clip_limit',\n                min: 1.0, max: 4.0, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Posterize',\n                name: 'posterize'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'spatial_window',\n                min: 2, max: 128, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'color_window',\n                min: 2, max: 128, type: 'int'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Blur',\n                name: 'blur'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'blur_radius',\n                min: 3, max: 7, type: 'odd'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'blur_sigma',\n                min: 0, max: 2, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Canny Edge Detection',\n                name: 'canny'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'canny_lo',\n                min: 10, max: 200, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'canny_hi',\n                min: 10, max: 200, type: 'int'\n              })\n            )\n          )\n        )\n      );\n    }\n  }, {\n    key: 'renderRestartButton',\n    value: function renderRestartButton() {\n      var _this2 = this;\n\n      if (this.props.runner.gpu.status === 'IDLE') {\n        return (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'GPU Idle',\n            onClick: function onClick() {\n              return _this2.start();\n            }\n          },\n          'Start'\n        );\n      }\n      if (this.props.runner.gpu.task.module !== 'pix2pix') {\n        return (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'GPU Busy',\n            onClick: function onClick() {\n              return _this2.interrupt();\n            }\n          },\n          'Interrupt'\n        );\n      }\n      if (!this.props.opt.processing) {\n        return (0, _preact.h)(\n          'div',\n          null,\n          (0, _preact.h)(\n            _common.Button,\n            {\n              title: 'Not processing',\n              onClick: this.togglePlaying\n            },\n            'Restart'\n          ),\n          (0, _preact.h)(\n            _common.Button,\n            {\n              title: 'GPU Busy',\n              onClick: function onClick() {\n                return _this2.interrupt();\n              }\n            },\n            'Interrupt'\n          )\n        );\n      }\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'Processing',\n            onClick: this.togglePlaying\n          },\n          'Stop'\n        ),\n        (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'GPU Busy',\n            onClick: function onClick() {\n              return _this2.interrupt();\n            }\n          },\n          'Interrupt'\n        )\n      );\n    }\n  }]);\n\n  return Pix2PixLive;\n}(_preact.Component);\n\nfunction timeInSeconds(n) {\n  return n.toFixed(1) + ' s.';\n}\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    last_message: state.live.last_message,\n    opt: state.live.opt,\n    frame: state.live.frame,\n    checkpoints: state.live.checkpoints,\n    epochs: state.live.epochs,\n    sequences: state.live.sequences,\n    runner: state.system.runner,\n    pix2pix: state.module.pix2pix\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: {\n      live: (0, _redux.bindActionCreators)(liveActions, dispatch),\n      queue: (0, _redux.bindActionCreators)(queueActions, dispatch),\n      pix2pix: (0, _redux.bindActionCreators)(pix2pixActions, dispatch),\n      tasks: (0, _redux.bindActionCreators)(pix2pixTasks, dispatch), s: s\n    }\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2PixLive);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _common = require('../../../common');\n\nvar _pix2pix = require('../pix2pix.actions');\n\nvar pix2pixActions = _interopRequireWildcard(_pix2pix);\n\nvar _pix2pix2 = require('../pix2pix.module');\n\nvar _pix2pix3 = _interopRequireDefault(_pix2pix2);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction Pix2PixNew(props) {\n  return (0, _preact.h)(_common.Views.New, {\n    db: props.pix2pix,\n    path: '/pix2pix/sequences/',\n    actions: props.actions,\n    module: _pix2pix3.default,\n    history: props.history\n  });\n}\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    pix2pix: state.module.pix2pix\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(pix2pixActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2PixNew);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2pix = require('../pix2pix.actions');\n\nvar pix2pixActions = _interopRequireWildcard(_pix2pix);\n\nvar _pix2pix2 = require('../pix2pix.tasks');\n\nvar pix2pixTasks = _interopRequireWildcard(_pix2pix2);\n\nvar _common = require('../../../common');\n\nvar _dataset = require('../../../dataset/dataset.form');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nvar _dataset3 = require('../../../dataset/dataset.new');\n\nvar _dataset4 = _interopRequireDefault(_dataset3);\n\nvar _upload = require('../../../dataset/upload.status');\n\nvar _upload2 = _interopRequireDefault(_upload);\n\nvar _dataset5 = require('../../../dataset/dataset.component');\n\nvar _dataset6 = _interopRequireDefault(_dataset5);\n\nvar _pix2pix3 = require('../pix2pix.module');\n\nvar _pix2pix4 = _interopRequireDefault(_pix2pix3);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Pix2pixShow = function (_Component) {\n  _inherits(Pix2pixShow, _Component);\n\n  function Pix2pixShow(props) {\n    _classCallCheck(this, Pix2pixShow);\n\n    var _this = _possibleConstructorReturn(this, (Pix2pixShow.__proto__ || Object.getPrototypeOf(Pix2pixShow)).call(this, props));\n\n    _this.datasetActions = _this.datasetActions.bind(_this);\n    return _this;\n  }\n\n  _createClass(Pix2pixShow, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      var id = this.props.match.params.id || localStorage.getItem('pix2pix.last_id');\n      console.log('load dataset:', id);\n      var _props = this.props,\n          match = _props.match,\n          pix2pix = _props.pix2pix,\n          actions = _props.actions;\n\n      if (id === 'new') return;\n      if (id) {\n        if (parseInt(id)) localStorage.setItem('pix2pix.last_id', id);\n        if (!pix2pix.folder || pix2pix.folder.id !== id) {\n          actions.load_directories(id);\n        }\n      } else {\n        this.props.history.push('/pix2pix/new/');\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props2 = this.props,\n          pix2pix = _props2.pix2pix,\n          match = _props2.match,\n          history = _props2.history;\n\n      var _ref = pix2pix.data || {},\n          folderLookup = _ref.folderLookup;\n\n      var folder = (folderLookup || {})[pix2pix.folder_id] || {};\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'app pix2pix' },\n        (0, _preact.h)(\n          'div',\n          { 'class': 'heading' },\n          (0, _preact.h)(\n            'div',\n            { 'class': 'spaced' },\n            (0, _preact.h)(\n              'h1',\n              null,\n              folder ? folder.name : (0, _preact.h)(_common.Loading, null)\n            ),\n            (0, _preact.h)(_upload2.default, null)\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { className: 'row' },\n          folder && folder.name && folder.name !== 'unsorted' && (0, _preact.h)(_dataset2.default, {\n            title: 'Add Files',\n            module: _pix2pix4.default,\n            folder: folder,\n            canUpload: true, canAddURL: true\n          }),\n          (0, _preact.h)(\n            'div',\n            null,\n            (0, _preact.h)(_upload2.default, null),\n            (0, _preact.h)(_common.CurrentTask, null)\n          )\n        ),\n        (0, _preact.h)(_dataset6.default, {\n          loading: pix2pix.loading,\n          progress: pix2pix.progress,\n          id: pix2pix.folder_id,\n          module: _pix2pix4.default,\n          data: pix2pix.data,\n          folder: folder,\n          history: history,\n          onPickFile: function onPickFile(file, e) {\n            e.preventDefault();\n            e.stopPropagation();\n            console.log('picked a file', file);\n          },\n          datasetActions: this.datasetActions\n        })\n      );\n    }\n  }, {\n    key: 'datasetActions',\n    value: function datasetActions(dataset) {\n      var isFetching = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      var isProcessing = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n      var _props3 = this.props,\n          pix2pix = _props3.pix2pix,\n          remote = _props3.remote;\n\n      var input = pix2pix.data.fileLookup[dataset.input[0]];\n      if (!input) return null;\n      if (input.name && input.name.match(/(gif|jpe?g|png)$/i)) return null;\n      console.log(dataset);\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)(\n          'div',\n          { 'class': 'actions' },\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pix.folder_id, 1);\n              } },\n            'train'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pix.folder_id, 5);\n              } },\n            '5x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pix.folder_id, 10);\n              } },\n            '10x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pix.folder_id, 20);\n              } },\n            '20x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pix.folder_id, 50);\n              } },\n            '50x'\n          )\n        ),\n        dataset.isBuilt ? (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          'fetched ',\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.clear_cache_task(dataset);\n              } },\n            'rm'\n          )\n        ) : isFetching ? (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          'fetching'\n        ) : (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.fetch_task(input.url, input.id, dataset.name);\n              } },\n            'fetch'\n          )\n        )\n      );\n    }\n  }]);\n\n  return Pix2pixShow;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    pix2pix: state.module.pix2pix\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(pix2pixActions, dispatch),\n    remote: (0, _redux.bindActionCreators)(pix2pixTasks, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2pixShow);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2pixhd = require('./views/pix2pixhd.new');\n\nvar _pix2pixhd2 = _interopRequireDefault(_pix2pixhd);\n\nvar _pix2pixhd3 = require('./views/pix2pixhd.show');\n\nvar _pix2pixhd4 = _interopRequireDefault(_pix2pixhd3);\n\nvar _pix2pixhd5 = require('./views/pix2pixhd.results');\n\nvar _pix2pixhd6 = _interopRequireDefault(_pix2pixhd5);\n\nvar _pix2pixhd7 = require('./views/pix2pixhd.train');\n\nvar _pix2pixhd8 = _interopRequireDefault(_pix2pixhd7);\n\nvar _pix2pixhd9 = require('./views/pix2pixhd.live');\n\nvar _pix2pixhd10 = _interopRequireDefault(_pix2pixhd9);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar router = function () {\n  function router() {\n    _classCallCheck(this, router);\n  }\n\n  _createClass(router, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      _actions2.default.system.changeTool('pix2pixhd');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #def, #dfe)';\n    }\n  }, {\n    key: 'componentWillReceiveProps',\n    value: function componentWillReceiveProps() {\n      _actions2.default.system.changeTool('pix2pixhd');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #def, #dfe)';\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'section',\n        null,\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pixhd/new/', component: _pix2pixhd2.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pixhd/sequences/', component: _pix2pixhd4.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pixhd/sequences/:id/', component: _pix2pixhd4.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pixhd/train/', component: _pix2pixhd8.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pixhd/results/', component: _pix2pixhd6.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pixhd/live/', component: _pix2pixhd10.default })\n      );\n    }\n  }]);\n\n  return router;\n}();\n\nfunction links() {\n  return [{ url: '/pix2pixhd/new/', name: 'folders' }, { url: '/pix2pixhd/sequences/', name: 'sequences' }, { url: '/pix2pixhd/train/', name: 'checkpoints' }, { url: '/pix2pixhd/results/', name: 'results' }, { url: '/pix2pixhd/live/', name: 'live' }];\n}\n\nexports.default = {\n  name: 'pix2pixhd',\n  router: router, links: links\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.count_dataset = exports.list_epochs = exports.load_results = exports.load_directories = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.loader');\n\nvar datasetLoader = _interopRequireWildcard(_dataset);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2pixhd = require('./pix2pixhd.module');\n\nvar _pix2pixhd2 = _interopRequireDefault(_pix2pixhd);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar load_directories = exports.load_directories = function load_directories(id) {\n  return function (dispatch) {\n    var module = _pix2pixhd2.default.name;\n    _util2.default.allProgress([datasetLoader.load(module), _actions2.default.socket.list_directory({ module: module, dir: 'sequences' }), _actions2.default.socket.list_directory({ module: module, dir: 'datasets' }), _actions2.default.socket.list_directory({ module: module, dir: 'checkpoints' })], function (percent, i, n) {\n      console.log('pix2pixhd load progress', i, n);\n      dispatch({\n        type: _types2.default.app.load_progress,\n        progress: { i: i, n: n },\n        data: { module: 'pix2pixhd' }\n      });\n    }).then(function (res) {\n      var _res = _slicedToArray(res, 4),\n          datasetApiReport = _res[0],\n          sequences = _res[1],\n          datasets = _res[2],\n          checkpoints = _res[3]; //, datasets, results, output, datasetUsage, lossReport] = res\n\n\n      var folderLookup = datasetApiReport.folderLookup,\n          fileLookup = datasetApiReport.fileLookup,\n          datasetLookup = datasetApiReport.datasetLookup,\n          folders = datasetApiReport.folders,\n          files = datasetApiReport.files,\n          unsortedFolder = datasetApiReport.unsortedFolder,\n          resultsFolder = datasetApiReport.resultsFolder;\n      // console.log(datasetUsage)\n\n      var sequenceDirectories = sequences.filter(function (s) {\n        return s.dir;\n      });\n      // console.log(sequenceDirectories)\n      sequenceDirectories.forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.isBuilt = true;\n        // console.log(dir.name, dataset)\n      });\n\n      datasets.filter(function (s) {\n        return s.dir;\n      }).forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.hasDataset = true;\n      });\n\n      var checkpointDirectories = checkpoints.filter(function (s) {\n        return s.dir;\n      });\n      checkpointDirectories.forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.hasCheckpoints = true;\n        dataset.checkpoints = [dir];\n      });\n\n      // console.log(res)\n\n      // flatDatasets.forEach(file => {\n      //   file.uuid = uuidv1()\n      //   fileLookup[file.uuid] = file\n      //   const name = file.name.split('.')[0]\n      //   const dataset = datasetLoader.getDataset(module, datasetLookup, name, unsortedFolder, file.date)\n      //   file.persisted = false\n      //   dataset.input.push(file.uuid)\n      // })\n\n      // // exp:coccokit_3-frame_sizes:8,2-n_rnn:2-dataset:coccokit_3\n      // const checkpoints = results.filter(s => s.dir).map(s => {\n      //   const checkpoint = s.name\n      //     .split('-')\n      //     .map(s => s.split(':'))\n      //     .filter(b => b.length && b[1])\n      //     .reduce((a,b) => (a[b[0]] = b[1]) && a, {})\n      //   checkpoint.name = checkpoint.name || checkpoint.dataset || checkpoint.exp\n      //   checkpoint.date = s.date\n      //   checkpoint.dir = s\n      //   checkpoint.persisted = false\n      //   const dataset = datasetLoader.getDataset(module, datasetLookup, checkpoint.name, unsortedFolder, checkpoint.date)\n      //   const loss = lossReport[checkpoint.name]\n      //   if (loss) {\n      //     dataset.epoch = checkpoint.epoch = loss.length\n      //     checkpoint.training_loss = loss\n      //   }\n      //   dataset.checkpoints.push(checkpoint)\n      //   return checkpoint\n      // })\n\n      // output.map(file => {\n      //   file.uuid = uuidv1()\n      //   fileLookup[file.uuid] = file\n      //   const pair = file.name.split('.')[0].split('-')\n      //   const dataset = datasetLoader.getDataset(module, datasetLookup, pair[0], unsortedFolder, file.date)\n      //   file.persisted = false\n      //   file.epoch = parseInt(file.epoch || pair[1].replace(/^\\D+/, '')) || 0\n      //   dataset.epoch = Math.max(file.epoch, dataset.epoch || 0)\n      //   // here check if the file exists in dataset, if so just check that it's persisted\n      //   const found = dataset.output.some(file_id => {\n      //     // if (f.name === \n      //     if (fileLookup[file_id].name === file.name) {\n      //       fileLookup[file_id].persisted = true\n      //       return true\n      //     }\n      //     return false\n      //   })\n      //   if (! found) {\n      //     dataset.output.push(file.uuid)\n      //   }\n      // })\n\n      dispatch({\n        type: _types2.default.dataset.load,\n        data: {\n          module: module,\n          folderLookup: folderLookup,\n          fileLookup: fileLookup,\n          datasetLookup: datasetLookup,\n          folders: folders, files: files,\n          sequences: sequenceDirectories,\n          datasets: datasets,\n          checkpoints: checkpointDirectories,\n          resultsFolder: resultsFolder\n        }\n      });\n      if (id) {\n        console.log('folder id', id);\n        dispatch({\n          type: _types2.default.dataset.set_folder,\n          data: {\n            folder_id: id,\n            module: module\n          }\n        });\n      }\n    }).catch(function (e) {\n      console.error(e);\n    });\n    if (id) {\n      console.log('folder id', id);\n      dispatch({\n        type: _types2.default.dataset.set_folder,\n        data: {\n          folder_id: id,\n          module: module\n        }\n      });\n    }\n  };\n};\n\nvar load_results = exports.load_results = function load_results(id) {\n  return function (dispatch) {\n    var module = _pix2pixhd2.default.name;\n    _util2.default.allProgress([_actions2.default.folder.index({ name: 'results' }), _actions2.default.file.index({ module: module, generated: 1 }), _actions2.default.socket.list_sequences({ module: module, dir: 'results' }), _actions2.default.socket.list_directory({ module: module, dir: 'renders' })], function (percent, i, n) {\n      console.log('pix2pixhd load progress', i, n);\n      dispatch({\n        type: _types2.default.app.load_progress,\n        progress: { i: i, n: n },\n        data: { module: 'pix2pixhd' }\n      });\n    }).then(function (res) {\n      var _res2 = _slicedToArray(res, 4),\n          folders = _res2[0],\n          files = _res2[1],\n          results = _res2[2],\n          renders = _res2[3]; //, datasets, results, output, datasetUsage, lossReport] = res\n\n\n      console.log(files, results, renders);\n      dispatch({\n        type: _types2.default.pix2pixhd.load_results,\n        results: {\n          resultsFolder: folders[0],\n          files: files,\n          results: results,\n          renders: renders\n        }\n      });\n    });\n  };\n};\n\nvar G_NET_REGEXP = new RegExp('_net_G.pth$');\n\nvar list_epochs = exports.list_epochs = function list_epochs(checkpoint_name) {\n  return function (dispatch) {\n    var module = _pix2pixhd2.default.name;\n    _actions2.default.socket.list_directory({ module: module, dir: 'checkpoints/' + checkpoint_name }).then(function (files) {\n      // console.log(files)\n      var epochs = files.map(function (f) {\n        if (!f.name.match(G_NET_REGEXP)) return null;\n        return f.name.replace(G_NET_REGEXP, '');\n      }).filter(function (f) {\n        return !!f;\n      });\n      // console.log(epochs)\n      dispatch({\n        type: _types2.default.dataset.list_epochs,\n        data: {\n          epochs: epochs,\n          module: module\n        }\n      });\n    });\n  };\n};\n\nvar count_dataset = exports.count_dataset = function count_dataset(checkpoint_name) {\n  return function (dispatch) {\n    var module = _pix2pixhd2.default.name;\n    _util2.default.allProgress([_actions2.default.socket.count_directory({ module: module, dir: 'sequences/' + checkpoint_name + '/' }), _actions2.default.socket.count_directory({ module: module, dir: 'datasets/' + checkpoint_name + '/train_A/' })], function (percent, i, n) {\n      console.log('pix2pixhd load progress', i, n);\n      dispatch({\n        type: _types2.default.app.load_progress,\n        progress: { i: i, n: n },\n        data: { module: 'pix2pixhd' }\n      });\n    }).then(function (res) {\n      var _res3 = _slicedToArray(res, 2),\n          sequenceCount = _res3[0],\n          datasetCount = _res3[1]; //, datasets, results, output, datasetUsage, lossReport] = res\n\n\n      console.log(sequenceCount, datasetCount);\n      dispatch({\n        type: _types2.default.pix2pixhd.load_dataset_count,\n        data: {\n          name: checkpoint_name,\n          sequenceCount: sequenceCount,\n          datasetCount: datasetCount\n        }\n      });\n    });\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nvar pix2pixhdModule = {\n  name: 'pix2pixhd',\n  displayName: 'Pix2PixHD',\n  datatype: 'video'\n};\n\nexports.default = pix2pixhdModule;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.reducer');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar pix2pixhdInitialState = {\n  loading: true,\n  progress: { i: 0, n: 0 },\n  error: null,\n  folder_id: 0,\n  data: null,\n  results: null,\n  checkpoint: {\n    name: '',\n    sequenceCount: 0,\n    datasetCount: 0\n  }\n};\n\nvar pix2pixhdReducer = function pix2pixhdReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : pix2pixhdInitialState;\n  var action = arguments[1];\n\n  if (action.data && action.data.module === 'pix2pixhd') {\n    state = (0, _dataset2.default)(state, action);\n  }\n\n  switch (action.type) {\n    case _types2.default.pix2pixhd.load_results:\n      return _extends({}, state, {\n        results: action.results\n      });\n    case _types2.default.pix2pixhd.load_dataset_count:\n      return _extends({}, state, {\n        checkpoint: action.data\n      });\n    case _types2.default.file.destroy:\n      console.log('file destroy', state.results);\n      return _extends({}, state, {\n        results: _extends({}, state.results, {\n          files: state.results.files.filter(function (f) {\n            return f.id !== action.data.id;\n          })\n        })\n      });\n    default:\n      return state;\n  }\n};\n\nexports.default = pix2pixhdReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.clear_recursive_task = exports.augment_task = exports.live_task = exports.train_task = exports.fetch_task = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _pix2pixhd = require('./pix2pixhd.module');\n\nvar _pix2pixhd2 = _interopRequireDefault(_pix2pixhd);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar fetch_task = exports.fetch_task = function fetch_task(url, file_id, dataset) {\n  return function (dispatch) {\n    if (!url) return console.log('input file inaccessible (no url)');\n    var task = {\n      module: _pix2pixhd2.default.name,\n      activity: 'fetch',\n      dataset: dataset,\n      opt: {\n        url: url,\n        file_id: file_id,\n        dataset: dataset\n      }\n    };\n    return _actions2.default.queue.add_task(task);\n  };\n};\n\nvar train_task = exports.train_task = function train_task(dataset, folder_id) {\n  var epochs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n  return function (dispatch) {\n    var task = {\n      module: _pix2pixhd2.default.name,\n      activity: 'train',\n      dataset: dataset.name || dataset,\n      epoch: 0,\n      epochs: epochs,\n      opt: {\n        folder_id: folder_id\n      }\n    };\n    if (!task.dataset) {\n      console.error(\"train task: no dataset specified\");\n      return;\n    }\n    console.log(task);\n    return _actions2.default.queue.add_task(task);\n  };\n};\n\nvar live_task = exports.live_task = function live_task(sequence, checkpoint, opt) {\n  return function (dispatch) {\n    var task = {\n      module: _pix2pixhd2.default.name,\n      activity: 'live',\n      dataset: sequence,\n      checkpoint: checkpoint,\n      opt: _extends({}, opt, {\n        poll_delay: 0.01\n      })\n    };\n    console.log(task);\n    console.log('add live task');\n    return _actions2.default.queue.add_task(task);\n  };\n};\n\nvar augment_task = exports.augment_task = function augment_task(dataset, opt) {\n  return function (dispatch) {\n    var task = {\n      module: _pix2pixhd2.default.name,\n      activity: 'augment',\n      dataset: dataset,\n      folder_id: opt.folder_id,\n      opt: _extends({}, opt)\n    };\n    console.log(task);\n    console.log('add augment task');\n    return _actions2.default.queue.add_task(task);\n  };\n};\n\nvar clear_recursive_task = exports.clear_recursive_task = function clear_recursive_task(dataset) {\n  return function (dispatch) {\n    var task = {\n      module: _pix2pixhd2.default.name,\n      activity: 'clear_recursive',\n      dataset: dataset\n    };\n    console.log(task);\n    console.log('add clear recursive task');\n    return _actions2.default.queue.add_task(task);\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _common = require('../../../common/');\n\nvar _player = require('../../../live/player');\n\nvar _live = require('../../../live/live.actions');\n\nvar liveActions = _interopRequireWildcard(_live);\n\nvar _queue = require('../../../queue/queue.actions');\n\nvar queueActions = _interopRequireWildcard(_queue);\n\nvar _pix2pixhd = require('../pix2pixhd.tasks');\n\nvar pix2pixhdTasks = _interopRequireWildcard(_pix2pixhd);\n\nvar _pix2pixhd2 = require('../pix2pixhd.actions');\n\nvar pix2pixhdActions = _interopRequireWildcard(_pix2pixhd2);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Pix2PixHDLive = function (_Component) {\n  _inherits(Pix2PixHDLive, _Component);\n\n  function Pix2PixHDLive(props) {\n    _classCallCheck(this, Pix2PixHDLive);\n\n    // if (! props.pix2pixhd || ! props.pix2pixhd.data) {\n    var _this = _possibleConstructorReturn(this, (Pix2PixHDLive.__proto__ || Object.getPrototypeOf(Pix2PixHDLive)).call(this));\n\n    props.actions.pix2pixhd.load_directories();\n    // }\n    props.actions.live.get_params();\n    // props.actions.live.list_checkpoints('pix2pixhd')\n    // props.actions.live.list_sequences('pix2pixhd')\n    _this.changeCheckpoint = _this.changeCheckpoint.bind(_this);\n    _this.changeEpoch = _this.changeEpoch.bind(_this);\n    _this.changeSequence = _this.changeSequence.bind(_this);\n    _this.seek = _this.seek.bind(_this);\n    _this.togglePlaying = _this.togglePlaying.bind(_this);\n    _this.toggleRecording = _this.toggleRecording.bind(_this);\n    _this.handleKeydown = _this.handleKeydown.bind(_this);\n    return _this;\n  }\n\n  _createClass(Pix2PixHDLive, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      document.addEventListener('keydown', this.handleKeydown);\n    }\n  }, {\n    key: 'componentWillUnmount',\n    value: function componentWillUnmount() {\n      document.removeEventListener('keydown', this.handleKeydown);\n    }\n  }, {\n    key: 'componentWillUpdate',\n    value: function componentWillUpdate(nextProps) {\n      if (nextProps.opt.checkpoint_name && nextProps.opt.checkpoint_name !== this.props.opt.checkpoint_name) {\n        console.log('listing epochs');\n        this.props.actions.live.list_epochs('pix2pixhd', nextProps.opt.checkpoint_name);\n      }\n    }\n  }, {\n    key: 'handleKeydown',\n    value: function handleKeydown(e) {\n      console.log(e.keyCode);\n      if (e.altKey || e.ctrlKey || e.metaKey) return;\n      switch (e.keyCode) {\n        case 27:\n          // esc\n          e.preventDefault();\n          this.props.actions.live.set_fullscreen(!this.props.fullscreen);\n          break;\n        default:\n          break;\n      }\n    }\n  }, {\n    key: 'changeCheckpoint',\n    value: function changeCheckpoint(field, checkpoint_name) {\n      this.props.actions.live.load_epoch(checkpoint_name, 'latest');\n    }\n  }, {\n    key: 'changeEpoch',\n    value: function changeEpoch(field, epoch_name) {\n      this.props.actions.live.load_epoch(this.props.opt.checkpoint_name, epoch_name);\n    }\n  }, {\n    key: 'changeSequence',\n    value: function changeSequence(field, sequence) {\n      console.log('load sequence', sequence);\n      this.props.actions.live.load_sequence(sequence);\n    }\n  }, {\n    key: 'seek',\n    value: function seek(percentage) {\n      var frame = Math.floor(percentage * (parseInt(this.props.frame.sequence_len) || 1) + 1);\n      console.log(\"seek to frame\", percentage, frame);\n      this.props.actions.live.seek(frame);\n    }\n  }, {\n    key: 'start',\n    value: function start() {\n      console.log(this.props.opt);\n      var sequence = this.props.opt.sequence_name || this.props.pix2pixhd.data.sequences[0].name;\n      var checkpoint = this.props.opt.checkpoint_name || this.props.pix2pixhd.data.checkpoints[0].name;\n      console.log('starting up!', sequence, checkpoint);\n      this.props.actions.tasks.live_task(sequence, checkpoint, {\n        folder_id: this.props.pix2pixhd.data.resultsFolder.id\n      });\n    }\n  }, {\n    key: 'interrupt',\n    value: function interrupt() {\n      this.props.actions.queue.stop_task('gpu');\n    }\n  }, {\n    key: 'togglePlaying',\n    value: function togglePlaying() {\n      if (this.props.opt.processing) {\n        this.props.actions.live.pause();\n      } else {\n        this.props.actions.live.play();\n      }\n    }\n  }, {\n    key: 'toggleRecording',\n    value: function toggleRecording() {\n      if (this.props.opt.recording) {\n        (0, _player.stopRecording)();\n        this.props.actions.live.pause();\n      } else {\n        (0, _player.startRecording)();\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      // console.log(this.props)\n      if (this.props.pix2pixhd.loading) {\n        return (0, _preact.h)(_common.Loading, { progress: this.props.pix2pixhd.progress });\n      }\n      var _props$pix2pixhd$data = this.props.pix2pixhd.data,\n          folderLookup = _props$pix2pixhd$data.folderLookup,\n          datasetLookup = _props$pix2pixhd$data.datasetLookup,\n          sequences = _props$pix2pixhd$data.sequences;\n\n\n      var sequenceLookup = sequences.reduce(function (a, b) {\n        a[b.name] = true;\n        return a;\n      }, {});\n\n      var sequenceGroups = Object.keys(folderLookup).map(function (id) {\n        var folder = _this2.props.pix2pixhd.data.folderLookup[id];\n        if (folder.name === 'results') return;\n        var datasets = folder.datasets.map(function (name) {\n          var sequence = sequenceLookup[name];\n          if (sequence) {\n            return name;\n          }\n          return null;\n        }).filter(function (n) {\n          return !!n;\n        });\n        return {\n          name: folder.name,\n          options: datasets.sort()\n        };\n      }).filter(function (n) {\n        return !!n && !!n.options.length;\n      }).sort(function (a, b) {\n        return a.name.localeCompare(b.name);\n      });\n\n      var checkpointGroups = Object.keys(folderLookup).map(function (id) {\n        var folder = _this2.props.pix2pixhd.data.folderLookup[id];\n        if (folder.name === 'results') return;\n        var datasets = folder.datasets.map(function (name) {\n          var dataset = datasetLookup[name];\n          if (dataset.checkpoints.length) {\n            return name;\n          }\n          return null;\n        }).filter(function (n) {\n          return !!n;\n        });\n        return {\n          name: folder.name,\n          options: datasets.sort()\n        };\n      }).filter(function (n) {\n        return !!n && !!n.options.length;\n      }).sort(function (a, b) {\n        return a.name.localeCompare(b.name);\n      });\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'app live centered' },\n        (0, _preact.h)(_common.Player, { width: 424, height: 256, fullscreen: this.props.fullscreen }),\n        (0, _preact.h)(\n          'div',\n          { className: 'params row' },\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Network',\n                noToggle: true\n              },\n              (0, _preact.h)(_common.Select, { live: true,\n                name: 'send_image',\n                title: 'view mode',\n                options: ['a', 'b', 'sequence', 'recursive'],\n                onChange: this.props.actions.live.set_param\n              }),\n              (0, _preact.h)(_common.SelectGroup, { live: true,\n                name: 'sequence_name',\n                title: 'sequence',\n                options: sequenceGroups,\n                onChange: this.changeSequence\n              }),\n              (0, _preact.h)(_common.SelectGroup, { live: true,\n                name: 'checkpoint_name',\n                title: 'checkpoint',\n                options: checkpointGroups,\n                onChange: this.changeCheckpoint\n              }),\n              (0, _preact.h)(_common.Select, { live: true,\n                name: 'epoch',\n                title: 'epoch',\n                options: this.props.epochs,\n                onChange: this.changeEpoch\n              })\n            ),\n            (0, _preact.h)(\n              'div',\n              null,\n              (0, _preact.h)(\n                _common.ParamGroup,\n                {\n                  title: 'Playback',\n                  name: 'sequence_playing'\n                },\n                (0, _preact.h)(_common.Slider, {\n                  name: 'position',\n                  min: 0.0, max: 1.0, type: 'float',\n                  value: (this.props.frame.sequence_i || 0) / (this.props.frame.sequence_len || 1),\n                  onChange: this.seek\n                }),\n                (0, _preact.h)(_common.Slider, { live: true,\n                  title: 'playback rate',\n                  name: 'sequence_step',\n                  min: -4.0, max: 4.0, type: 'float'\n                }),\n                (0, _preact.h)(_common.Slider, { live: true,\n                  title: 'skip frames',\n                  name: 'sequence_skip',\n                  min: 0, max: 1000, type: 'int'\n                }),\n                (0, _preact.h)(_common.Slider, { live: true,\n                  title: 'fade sequence',\n                  name: 'fade_sequence',\n                  min: 0, max: 4.0, type: 'float'\n                }),\n                (0, _preact.h)(_common.Slider, { live: true,\n                  name: 'frame_delay',\n                  min: 0.0, max: 2.0, type: 'float'\n                })\n              )\n            ),\n            (0, _preact.h)(\n              _common.Group,\n              null,\n              this.renderRestartButton(),\n              this.renderLiveButtons(),\n              this.renderRecordButton(),\n              (0, _preact.h)(\n                'p',\n                { 'class': 'last_message' },\n                this.props.last_message\n              )\n            )\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Transition',\n                name: 'transition'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'transition_period',\n                min: 10, max: 5000, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'transition_min',\n                min: 0.001, max: 0.2, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'transition_max',\n                min: 0.1, max: 1.0, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Recursion',\n                name: 'recursive'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'recursive_frac',\n                min: 0.0, max: 0.5, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'recurse_roll',\n                min: -64, max: 64, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'recurse_roll_axis',\n                min: 0, max: 1, type: 'int'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Sequence',\n                name: 'sequence'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'sequence_frac',\n                min: 0.0, max: 1.0, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'process_frac',\n                min: 0, max: 1, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Transform',\n                name: 'transform'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'rotate',\n                min: -1, max: 1, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'scale',\n                min: 0.9, max: 1.1, type: 'float'\n              })\n            )\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Clahe',\n                name: 'clahe'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'clip_limit',\n                min: 1.0, max: 4.0, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Posterize',\n                name: 'posterize'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'spatial_window',\n                min: 2, max: 128, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'color_window',\n                min: 2, max: 128, type: 'int'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Blur',\n                name: 'blur'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'blur_radius',\n                min: 3, max: 7, type: 'odd'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'blur_sigma',\n                min: 0, max: 2, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Canny Edge Detection',\n                name: 'canny'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'canny_lo',\n                min: 10, max: 200, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'canny_hi',\n                min: 10, max: 200, type: 'int'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Hue / Saturation',\n                name: 'hsl'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'hue',\n                min: -127, max: 127, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'saturation',\n                min: -255, max: 255, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'luminosity',\n                min: -255, max: 255, type: 'int'\n              })\n            )\n          )\n        )\n      );\n    }\n  }, {\n    key: 'renderRestartButton',\n    value: function renderRestartButton() {\n      var _this3 = this;\n\n      // console.log(this.props.runner.gpu)\n      if (this.props.runner.gpu.status === 'IDLE') {\n        return (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'GPU Idle',\n            onClick: function onClick() {\n              return _this3.start();\n            }\n          },\n          'Start'\n        );\n      }\n      if (this.props.runner.gpu.task.module !== 'pix2pixhd') {\n        return (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'GPU Busy',\n            onClick: function onClick() {\n              return _this3.interrupt();\n            }\n          },\n          'Interrupt'\n        );\n      }\n      if (!this.props.opt.processing) {\n        return (0, _preact.h)(\n          'div',\n          null,\n          (0, _preact.h)(\n            _common.Button,\n            {\n              title: 'Not processing',\n              onClick: this.togglePlaying\n            },\n            'Restart'\n          ),\n          (0, _preact.h)(\n            _common.Button,\n            {\n              title: 'GPU Busy',\n              onClick: function onClick() {\n                return _this3.interrupt();\n              }\n            },\n            'Interrupt'\n          )\n        );\n      }\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'Processing',\n            onClick: this.togglePlaying\n          },\n          'Stop'\n        ),\n        (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'GPU Busy',\n            onClick: function onClick() {\n              return _this3.interrupt();\n            }\n          },\n          'Interrupt'\n        )\n      );\n    }\n  }, {\n    key: 'renderRecordButton',\n    value: function renderRecordButton() {\n      return null;\n      // return (\n      //   <Button\n      //     title={\n      //       this.props.opt.savingVideo\n      //       ? 'Saving video...'\n      //       : this.props.opt.recording\n      //       ? 'Recording (' + timeInSeconds(this.props.opt.recordFrames/25) +')'\n      //       : 'Record video'\n      //     }\n      //     onClick={this.toggleRecording}\n      //   >\n      //     {this.props.opt.savingVideo ? 'Saving' : this.props.opt.recording ? 'Recording' : 'Record'}\n      //   </Button>\n      // )\n    }\n  }, {\n    key: 'renderLiveButtons',\n    value: function renderLiveButtons() {\n      var _this4 = this;\n\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'Save frame',\n            onClick: _player.saveFrame\n          },\n          'Save'\n        ),\n        (0, _preact.h)(\n          _common.ParamGroup,\n          {\n            title: 'Record video',\n            name: 'store_b',\n            noDim: true,\n            onToggle: function onToggle(value) {\n              // now storing frames on server...\n            }\n          },\n          (0, _preact.h)(_common.TextInput, {\n            title: 'Video name',\n            name: 'final_tag',\n            value: this.props.opt.final_tag,\n            onSave: function onSave(value) {\n              _this4.props.actions.live.set_param('final_tag', value);\n            }\n          })\n        )\n      );\n    }\n  }]);\n\n  return Pix2PixHDLive;\n}(_preact.Component);\n\nfunction timeInSeconds(n) {\n  return n.toFixed(1) + ' s.';\n}\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    last_message: state.live.last_message,\n    fullscreen: state.live.fullscreen,\n    opt: state.live.opt,\n    frame: state.live.frame,\n    checkpoints: state.live.checkpoints,\n    epochs: state.live.epochs,\n    sequences: state.live.sequences,\n    runner: state.system.runner,\n    pix2pixhd: state.module.pix2pixhd\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: {\n      live: (0, _redux.bindActionCreators)(liveActions, dispatch),\n      queue: (0, _redux.bindActionCreators)(queueActions, dispatch),\n      pix2pixhd: (0, _redux.bindActionCreators)(pix2pixhdActions, dispatch),\n      tasks: (0, _redux.bindActionCreators)(pix2pixhdTasks, dispatch), s: s\n    }\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2PixHDLive);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _common = require('../../../common');\n\nvar _pix2pixhd = require('../pix2pixhd.actions');\n\nvar pix2pixhdActions = _interopRequireWildcard(_pix2pixhd);\n\nvar _pix2pixhd2 = require('../pix2pixhd.module');\n\nvar _pix2pixhd3 = _interopRequireDefault(_pix2pixhd2);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction Pix2PixHDNew(props) {\n  return (0, _preact.h)(_common.Views.New, {\n    db: props.pix2pixhd,\n    path: '/pix2pixhd/sequences/',\n    actions: props.actions,\n    module: _pix2pixhd3.default,\n    history: props.history\n  });\n}\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    pix2pixhd: state.module.pix2pixhd\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(pix2pixhdActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2PixHDNew);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _actions = require('../../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _pix2pixhd = require('../pix2pixhd.actions');\n\nvar pix2pixhdActions = _interopRequireWildcard(_pix2pixhd);\n\nvar _pix2pixhd2 = require('../pix2pixhd.tasks');\n\nvar pix2pixhdTasks = _interopRequireWildcard(_pix2pixhd2);\n\nvar _loading = require('../../../common/loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nvar _fileList = require('../../../common/fileList.component');\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar yes_count = 0;\n\nvar Pix2pixHDResults = function (_Component) {\n  _inherits(Pix2pixHDResults, _Component);\n\n  function Pix2pixHDResults(props) {\n    _classCallCheck(this, Pix2pixHDResults);\n\n    var _this = _possibleConstructorReturn(this, (Pix2pixHDResults.__proto__ || Object.getPrototypeOf(Pix2pixHDResults)).call(this));\n\n    if (!props.pix2pixhd.results) props.actions.load_results();\n    return _this;\n  }\n\n  _createClass(Pix2pixHDResults, [{\n    key: 'componentDidMount',\n    value: function componentDidMount() {\n      yes_count = 0;\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      if (!this.props.pix2pixhd.results) return (0, _preact.h)(_loading2.default, { progress: this.props.pix2pixhd.progress });\n\n      var _props$pix2pixhd$resu = this.props.pix2pixhd.results,\n          resultsFolder = _props$pix2pixhd$resu.resultsFolder,\n          results = _props$pix2pixhd$resu.results,\n          renders = _props$pix2pixhd$resu.renders,\n          files = _props$pix2pixhd$resu.files;\n      // console.log(resultsFolder, results)\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'app pix2pixhd' },\n        (0, _preact.h)(\n          'div',\n          { className: 'heading row middle' },\n          (0, _preact.h)(\n            'h1',\n            null,\n            'Pix2PixHD Results'\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { 'class': 'rows params renders' },\n          (0, _preact.h)(_fileList.FileList, {\n            linkFiles: true,\n            files: files,\n            orderBy: 'date desc',\n            fields: 'name date size delete',\n            onDelete: function onDelete(file) {\n              var yes = void 0;\n              if (yes_count < 3) {\n                yes = confirm('Are you sure you want to delete this file?');\n              } else {\n                yes = true;\n              }\n              if (yes) {\n                yes_count += 1;\n                console.log('delete: confirmed');\n                _actions2.default.file.destroy(file);\n              }\n            }\n          }),\n          (0, _preact.h)('br', null),\n          (0, _preact.h)(\n            'h3',\n            null,\n            'renders on server'\n          ),\n          (0, _preact.h)(_fileList.FileList, {\n            files: renders,\n            orderBy: 'date desc',\n            fields: 'name date size',\n            onClick: function onClick(file, e) {\n              e.preventDefault();\n              e.stopPropagation();\n              console.log('picked a result', file);\n              _this2.handlePick(file);\n            }\n          }),\n          (0, _preact.h)('br', null),\n          (0, _preact.h)(\n            'h3',\n            null,\n            'folders on server'\n          ),\n          (0, _preact.h)(_fileList.FileList, {\n            files: results,\n            orderBy: 'date desc',\n            fields: 'name date count',\n            onClick: function onClick(file, e) {\n              e.preventDefault();\n              e.stopPropagation();\n              console.log('picked a result', file);\n              _this2.handlePick(file);\n            }\n          })\n        )\n      );\n    }\n  }, {\n    key: 'handlePick',\n    value: function handlePick(file) {\n      // this.props.audioPlayer.play(file)\n    }\n  }]);\n\n  return Pix2pixHDResults;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    pix2pixhd: state.module.pix2pixhd\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(pix2pixhdActions, dispatch),\n    remote: (0, _redux.bindActionCreators)(pix2pixhdTasks, dispatch)\n    // audioPlayer: bindActionCreators(audioPlayerActions, dispatch),\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2pixHDResults);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2pixhd = require('../pix2pixhd.actions');\n\nvar pix2pixhdActions = _interopRequireWildcard(_pix2pixhd);\n\nvar _pix2pixhd2 = require('../pix2pixhd.tasks');\n\nvar pix2pixhdTasks = _interopRequireWildcard(_pix2pixhd2);\n\nvar _common = require('../../../common');\n\nvar _dataset = require('../../../dataset/dataset.form');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nvar _dataset3 = require('../../../dataset/dataset.new');\n\nvar _dataset4 = _interopRequireDefault(_dataset3);\n\nvar _upload = require('../../../dataset/upload.status');\n\nvar _upload2 = _interopRequireDefault(_upload);\n\nvar _dataset5 = require('../../../dataset/dataset.component');\n\nvar _dataset6 = _interopRequireDefault(_dataset5);\n\nvar _pix2pixhd3 = require('../pix2pixhd.module');\n\nvar _pix2pixhd4 = _interopRequireDefault(_pix2pixhd3);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Pix2PixHDShow = function (_Component) {\n  _inherits(Pix2PixHDShow, _Component);\n\n  function Pix2PixHDShow(props) {\n    _classCallCheck(this, Pix2PixHDShow);\n\n    var _this = _possibleConstructorReturn(this, (Pix2PixHDShow.__proto__ || Object.getPrototypeOf(Pix2PixHDShow)).call(this, props));\n\n    _this.datasetActions = _this.datasetActions.bind(_this);\n    return _this;\n  }\n\n  _createClass(Pix2PixHDShow, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      var id = this.props.match.params.id || localStorage.getItem('pix2pixhd.last_id');\n      console.log('load dataset:', id);\n      var _props = this.props,\n          match = _props.match,\n          pix2pixhd = _props.pix2pixhd,\n          actions = _props.actions;\n\n      if (id === 'new') return;\n      if (id) {\n        if (parseInt(id)) localStorage.setItem('pix2pixhd.last_id', id);\n        if (!pix2pixhd.folder || pix2pixhd.folder.id !== id) {\n          actions.load_directories(id);\n        }\n      } else {\n        this.props.history.push('/pix2pixhd/new/');\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props2 = this.props,\n          pix2pixhd = _props2.pix2pixhd,\n          match = _props2.match,\n          history = _props2.history;\n\n      var _ref = pix2pixhd.data || {},\n          folderLookup = _ref.folderLookup;\n\n      var folder = (folderLookup || {})[pix2pixhd.folder_id] || {};\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'app pix2pixhd' },\n        (0, _preact.h)(\n          'div',\n          { 'class': 'heading' },\n          (0, _preact.h)(\n            'div',\n            { 'class': 'spaced' },\n            (0, _preact.h)(\n              'h1',\n              null,\n              folder ? folder.name : (0, _preact.h)(_common.Loading, null)\n            ),\n            (0, _preact.h)(_upload2.default, null)\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { className: 'row' },\n          folder && folder.name && folder.name !== 'unsorted' && (0, _preact.h)(_dataset2.default, {\n            title: 'Add Files',\n            module: _pix2pixhd4.default,\n            folder: folder,\n            canUpload: true, canAddURL: true\n          }),\n          (0, _preact.h)(\n            'div',\n            null,\n            (0, _preact.h)(_upload2.default, null),\n            (0, _preact.h)(_common.CurrentTask, null)\n          )\n        ),\n        (0, _preact.h)(_dataset6.default, {\n          loading: pix2pixhd.loading,\n          progress: pix2pixhd.progress,\n          id: pix2pixhd.folder_id,\n          module: _pix2pixhd4.default,\n          data: pix2pixhd.data,\n          folder: folder,\n          history: history,\n          onPickFile: function onPickFile(file, e) {\n            e.preventDefault();\n            e.stopPropagation();\n            console.log('picked a file', file);\n          },\n          datasetActions: this.datasetActions\n        })\n      );\n    }\n  }, {\n    key: 'datasetActions',\n    value: function datasetActions(dataset) {\n      var isFetching = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      var isProcessing = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n      var _props3 = this.props,\n          pix2pixhd = _props3.pix2pixhd,\n          remote = _props3.remote;\n\n      var input = pix2pixhd.data.fileLookup[dataset.input[0]];\n      if (!input) return null;\n      if (input.name && input.name.match(/(gif|jpe?g|png)$/i)) return null;\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)(\n          'div',\n          { 'class': 'actions' },\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pixhd.folder_id, 1);\n              } },\n            'train'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pixhd.folder_id, 5);\n              } },\n            '5x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pixhd.folder_id, 10);\n              } },\n            '10x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pixhd.folder_id, 20);\n              } },\n            '20x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pixhd.folder_id, 50);\n              } },\n            '50x'\n          )\n        ),\n        dataset.isBuilt ? (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          'fetched ',\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.clear_cache_task(dataset);\n              } },\n            'rm'\n          )\n        ) : isFetching ? (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          'fetching'\n        ) : (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.fetch_task(input.url, input.id, dataset.name);\n              } },\n            'fetch'\n          )\n        )\n      );\n    }\n  }]);\n\n  return Pix2PixHDShow;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    pix2pixhd: state.module.pix2pixhd\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(pix2pixhdActions, dispatch),\n    remote: (0, _redux.bindActionCreators)(pix2pixhdTasks, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2PixHDShow);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2pixhd = require('../pix2pixhd.actions');\n\nvar pix2pixhdActions = _interopRequireWildcard(_pix2pixhd);\n\nvar _pix2pixhd2 = require('../pix2pixhd.tasks');\n\nvar pix2pixhdTasks = _interopRequireWildcard(_pix2pixhd2);\n\nvar _common = require('../../../common');\n\nvar _dataset = require('../../../dataset/dataset.form');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nvar _dataset3 = require('../../../dataset/dataset.new');\n\nvar _dataset4 = _interopRequireDefault(_dataset3);\n\nvar _upload = require('../../../dataset/upload.status');\n\nvar _upload2 = _interopRequireDefault(_upload);\n\nvar _dataset5 = require('../../../dataset/dataset.component');\n\nvar _dataset6 = _interopRequireDefault(_dataset5);\n\nvar _pix2pixhd3 = require('../pix2pixhd.module');\n\nvar _pix2pixhd4 = _interopRequireDefault(_pix2pixhd3);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Pix2PixHDTrain = function (_Component) {\n  _inherits(Pix2PixHDTrain, _Component);\n\n  function Pix2PixHDTrain(props) {\n    _classCallCheck(this, Pix2PixHDTrain);\n\n    var _this = _possibleConstructorReturn(this, (Pix2PixHDTrain.__proto__ || Object.getPrototypeOf(Pix2PixHDTrain)).call(this, props));\n\n    _this.handleChange = _this.handleChange.bind(_this);\n    _this.state = {\n      checkpoint_name: 'PLACEHOLDER',\n      epoch: 'latest',\n      augment_name: '',\n      augment_take: 100,\n      augment_make: 20\n    };\n    return _this;\n  }\n\n  _createClass(Pix2PixHDTrain, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      var id = this.props.match.params.id || localStorage.getItem('pix2pixhd.last_id');\n      console.log('load dataset:', id);\n      var _props = this.props,\n          match = _props.match,\n          pix2pixhd = _props.pix2pixhd,\n          actions = _props.actions;\n\n      if (id === 'new') return;\n      if (id) {\n        if (parseInt(id)) localStorage.setItem('pix2pixhd.last_id', id);\n        if (!pix2pixhd.folder || pix2pixhd.folder.id !== id) {\n          actions.load_directories(id);\n        }\n      } else {\n        this.props.history.push('/pix2pixhd/new/');\n      }\n    }\n  }, {\n    key: 'componentDidUpdate',\n    value: function componentDidUpdate(prevProps, prevState) {\n      if (prevState.checkpoint_name !== this.state.checkpoint_name) {\n        this.setState({ epoch: 'latest' });\n        this.props.actions.list_epochs(this.state.checkpoint_name);\n        this.props.actions.count_dataset(this.state.checkpoint_name);\n      }\n    }\n  }, {\n    key: 'handleChange',\n    value: function handleChange(name, value) {\n      console.log('name', name, 'value', value);\n      this.setState(_defineProperty({}, name, value));\n    }\n  }, {\n    key: 'interrupt',\n    value: function interrupt() {\n      this.props.actions.queue.stop_task('gpu');\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      if (this.props.pix2pixhd.loading) {\n        return (0, _preact.h)(_common.Loading, { progress: this.props.pix2pixhd.progress });\n      }\n      var _props2 = this.props,\n          pix2pixhd = _props2.pix2pixhd,\n          match = _props2.match,\n          history = _props2.history,\n          queue = _props2.queue;\n\n      var _ref = pix2pixhd.data || {},\n          folderLookup = _ref.folderLookup,\n          datasetLookup = _ref.datasetLookup;\n\n      var folder = (folderLookup || {})[pix2pixhd.folder_id] || {};\n      // console.log(pix2pixhd)\n\n      var checkpointGroups = Object.keys(folderLookup).map(function (id) {\n        var folder = _this2.props.pix2pixhd.data.folderLookup[id];\n        if (folder.name === 'results') return;\n        var datasets = folder.datasets.map(function (name) {\n          var dataset = datasetLookup[name];\n          if (dataset.checkpoints.length) {\n            return name;\n          }\n          return null;\n        }).filter(function (n) {\n          return !!n;\n        });\n        return {\n          name: folder.name,\n          options: datasets.sort()\n        };\n      }).filter(function (n) {\n        return !!n && !!n.options.length;\n      }).sort(function (a, b) {\n        return a.name.localeCompare(b.name);\n      });\n\n      // console.log('state', this.props.pix2pixhd.data.epochs)\n      // console.log(this.state.checkpoint_name, this.state.epoch)\n      // console.log(queue)\n      return (0, _preact.h)(\n        'div',\n        { className: 'app pix2pixhd' },\n        (0, _preact.h)(\n          'div',\n          { className: 'heading' },\n          (0, _preact.h)(\n            'h1',\n            null,\n            'pix2pixhd training'\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { className: 'columns' },\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.Group,\n              { title: 'Dataset' },\n              (0, _preact.h)(_common.SelectGroup, {\n                name: 'checkpoint_name',\n                title: 'Dataset',\n                options: checkpointGroups,\n                onChange: this.handleChange,\n                placeholder: 'Pick a dataset',\n                value: this.state.checkpoint_name\n              }),\n              (0, _preact.h)(_common.Select, {\n                title: 'Epoch',\n                name: 'epoch',\n                options: this.props.pix2pixhd.data.epochs,\n                onChange: this.handleChange,\n                value: this.state.epoch\n              })\n            ),\n            (0, _preact.h)(\n              _common.Group,\n              { title: 'Augment' },\n              (0, _preact.h)(_common.NumberInput, {\n                name: 'augment_take',\n                title: 'Pick N random frames',\n                value: this.state.augment_take,\n                onChange: this.handleChange,\n                type: 'int',\n                min: '1',\n                max: '1000'\n              }),\n              (0, _preact.h)(_common.NumberInput, {\n                name: 'augment_make',\n                title: 'Generate N recursively',\n                value: this.state.augment_make,\n                onChange: this.handleChange,\n                type: 'int',\n                min: '1',\n                max: '1000'\n              }),\n              (0, _preact.h)(_common.Button, {\n                title: 'Augment dataset',\n                value: 'Augment',\n                onClick: function onClick() {\n                  return _this2.props.remote.augment_task(_this2.state.checkpoint_name, _this2.state);\n                }\n              }),\n              (0, _preact.h)(_common.Button, {\n                title: 'Make a movie without augmenting',\n                value: 'Generate',\n                onClick: function onClick() {\n                  _this2.props.remote.augment_task(_this2.state.checkpoint_name, _extends({}, _this2.state, {\n                    no_symlinks: true,\n                    mov: true,\n                    folder_id: _this2.props.pix2pixhd.data.resultsFolder.id\n                  }));\n                }\n              })\n            ),\n            (0, _preact.h)(\n              _common.Group,\n              { title: 'Augmentation Grid' },\n              (0, _preact.h)(_common.AugmentationGrid, {\n                checkpoint: this.props.pix2pixhd.checkpoint,\n                take: [1, 2, 3, 4, 5, 10, 15, 20, 25, 50, 75, 100, 200, 300, 400, 500, 1000],\n                make: [1, 2, 3, 4, 5, 10, 15, 20, 25, 50, 75, 100, 200],\n                onAugment: function onAugment(augment_take, augment_make) {\n                  _this2.props.remote.augment_task(_this2.state.checkpoint_name, _extends({}, _this2.state, {\n                    augment_take: augment_take,\n                    augment_make: augment_make\n                  }));\n                },\n                onTrain: function onTrain() {\n                  _this2.props.remote.train_task(_this2.state.checkpoint_name, pix2pixhd.folder_id, 1);\n                  setTimeout(function () {\n                    // auto-generate epoch demo\n                    _this2.props.remote.augment_task(_this2.state.checkpoint_name, _extends({}, _this2.state, {\n                      augment_take: 10,\n                      augment_make: 150,\n                      no_symlinks: true,\n                      mov: true,\n                      folder_id: _this2.props.pix2pixhd.data.resultsFolder.id\n                    }));\n                  }, 250);\n                }\n              })\n            ),\n            (0, _preact.h)(\n              _common.Group,\n              { title: 'Status' },\n              (0, _preact.h)(_common.Button, {\n                title: 'GPU',\n                value: this.props.runner.gpu.status === 'IDLE' ? \"Idle\" : \"Interrupt\",\n                onClick: function onClick() {\n                  return _this2.interrupt();\n                }\n              }),\n              (0, _preact.h)(_common.CurrentTask, null)\n            )\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.Group,\n              { title: 'Upcoming Tasks' },\n              (0, _preact.h)(_common.TaskList, { tasks: queue.queue.map(function (id) {\n                  return queue.tasks[id];\n                }), sort: 'date asc' })\n            )\n          )\n        )\n      );\n    }\n  }]);\n\n  return Pix2PixHDTrain;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    pix2pixhd: state.module.pix2pixhd,\n    runner: state.system.runner,\n    queue: state.queue\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(pix2pixhdActions, dispatch),\n    remote: (0, _redux.bindActionCreators)(pix2pixhdTasks, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2PixHDTrain);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2wav = require('./views/pix2wav.new');\n\nvar _pix2wav2 = _interopRequireDefault(_pix2wav);\n\nvar _pix2wav3 = require('./views/pix2wav.show');\n\nvar _pix2wav4 = _interopRequireDefault(_pix2wav3);\n\nvar _pix2wav5 = require('./views/pix2wav.live');\n\nvar _pix2wav6 = _interopRequireDefault(_pix2wav5);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar router = function () {\n  function router() {\n    _classCallCheck(this, router);\n  }\n\n  _createClass(router, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      _actions2.default.system.changeTool('pix2wav');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #bdf, #def)';\n    }\n  }, {\n    key: 'componentWillReceiveProps',\n    value: function componentWillReceiveProps() {\n      _actions2.default.system.changeTool('pix2wav');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #bdf, #def)';\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'section',\n        null,\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2wav/new/', component: _pix2wav2.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2wav/datasets/', component: _pix2wav4.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2wav/datasets/:id/', component: _pix2wav4.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2wav/live/', component: _pix2wav6.default })\n      );\n    }\n  }]);\n\n  return router;\n}();\n\nfunction links() {\n  return [{ url: '/pix2wav/new/', name: 'new' }, { url: '/pix2wav/datasets/', name: 'datasets' }, { url: '/pix2wav/live/', name: 'live' }];\n}\n\nexports.default = {\n  name: 'pix2wav',\n  router: router, links: links\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.load_directories = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.loader');\n\nvar datasetLoader = _interopRequireWildcard(_dataset);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2wav = require('./pix2wav.module');\n\nvar _pix2wav2 = _interopRequireDefault(_pix2wav);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar load_directories = exports.load_directories = function load_directories(id) {\n  return function (dispatch) {\n    var module = _pix2wav2.default.name;\n    _util2.default.allProgress([datasetLoader.load(module), _actions2.default.socket.list_directory({ module: 'pix2pix', dir: 'sequences/pix2wav/' }), _actions2.default.socket.list_directory({ module: 'pix2pix', dir: 'datasets/pix2wav/' }), _actions2.default.socket.list_directory({ module: 'pix2pix', dir: 'checkpoints/pix2wav/' }), _actions2.default.socket.list_directory({ module: 'pix2pix', dir: 'checkpoints/pix2pix/' })], function (percent, i, n) {\n      console.log('progress', i, n);\n      dispatch({ type: _types2.default.app.load_progress, progress: { i: i, n: n } });\n    }).then(function (res) {\n      var _res = _slicedToArray(res, 5),\n          datasetApiReport = _res[0],\n          sequences = _res[1],\n          datasets = _res[2],\n          checkpoints = _res[3],\n          pix2pixCheckpoints = _res[4];\n\n      var folderLookup = datasetApiReport.folderLookup,\n          fileLookup = datasetApiReport.fileLookup,\n          datasetLookup = datasetApiReport.datasetLookup,\n          folders = datasetApiReport.folders,\n          files = datasetApiReport.files,\n          unsortedFolder = datasetApiReport.unsortedFolder;\n\n\n      var sequenceDirectories = sequences.filter(function (s) {\n        return s.dir;\n      });\n      sequenceDirectories.forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.isBuilt = true;\n      });\n\n      datasets.filter(function (s) {\n        return s.dir;\n      }).forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.hasDataset = true;\n      });\n\n      var checkpointDirectories = checkpoints.filter(function (s) {\n        return s.dir;\n      });\n      checkpointDirectories.forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.hasCheckpoints = true;\n        dir.module = 'pix2wav';\n      });\n\n      var pix2pixCheckpointDirectories = pix2pixCheckpoints.filter(function (s) {\n        return s.dir;\n      });\n      pix2pixCheckpointDirectories.forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.hasCheckpoints = true;\n        dir.module = 'pix2pix';\n      });\n\n      console.log(res);\n      console.log(checkpointDirectories);\n      console.log(pix2pixCheckpointDirectories);\n\n      dispatch({\n        type: _types2.default.dataset.load,\n        data: {\n          module: module,\n          folderLookup: folderLookup,\n          fileLookup: fileLookup,\n          datasetLookup: datasetLookup,\n          folders: folders, files: files,\n          sequences: sequenceDirectories,\n          datasets: datasets,\n          checkpoints: checkpointDirectories.concat(pix2pixCheckpointDirectories)\n        }\n      });\n    }).catch(function (e) {\n      console.error(e);\n    });\n    if (id) {\n      console.log('folder id', id);\n      dispatch({\n        type: _types2.default.dataset.set_folder,\n        data: {\n          folder_id: id,\n          module: module\n        }\n      });\n    }\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nvar pix2wavModule = {\n  name: 'pix2wav',\n  displayName: 'Pix2Wav',\n  datatype: 'spectrogram'\n};\n\nexports.default = pix2wavModule;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.reducer');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar pix2wavInitialState = {\n  loading: true,\n  progress: { i: 0, n: 0 },\n  status: '',\n  error: null,\n  folder_id: 0,\n  data: null\n};\n\nvar pix2wavReducer = function pix2wavReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : pix2wavInitialState;\n  var action = arguments[1];\n\n  if (action.data && action.data.module === 'pix2wav') {\n    state = (0, _dataset2.default)(state, action);\n  }\n\n  switch (action.type) {\n    case _types2.default.wav2pix.load:\n      return _extends({}, state, {\n        status: 'Loaded buffer'\n      });\n    case _types2.default.wav2pix.progress:\n      return _extends({}, state, {\n        status: 'Rendering frame ' + action.count\n      });\n    case _types2.default.wav2pix.finish:\n      return _extends({}, state, {\n        status: action.message || 'Render complete'\n      });\n    case _types2.default.wav2pix.zip:\n      return _extends({}, state, {\n        status: 'Built zip file ' + _util2.default.hush_size(state.size)[1]\n      });\n    case _types2.default.wav2pix.uploading:\n      return _extends({}, state, {\n        status: 'Uploading zip file'\n      });\n    default:\n      return state;\n  }\n};\n\nexports.default = pix2wavReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.live_task = undefined;\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar live_task = exports.live_task = function live_task(sequence, checkpoint) {\n  return function (dispatch) {\n    var task = {\n      module: 'pix2wav',\n      activity: 'live',\n      dataset: sequence,\n      checkpoint: checkpoint,\n      opt: {\n        poll_delay: 0.2\n      }\n    };\n    console.log(task);\n    console.log('add live task');\n    return _actions2.default.queue.add_task(task);\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _common = require('../../../common/');\n\nvar _player = require('../../../live/player');\n\nvar playerActions = _interopRequireWildcard(_player);\n\nvar _live = require('../../../live/live.actions');\n\nvar liveActions = _interopRequireWildcard(_live);\n\nvar _queue = require('../../../queue/queue.actions');\n\nvar queueActions = _interopRequireWildcard(_queue);\n\nvar _pix2wav = require('../pix2wav.tasks');\n\nvar pix2wavTasks = _interopRequireWildcard(_pix2wav);\n\nvar _pix2wav2 = require('../pix2wav.actions');\n\nvar pix2wavActions = _interopRequireWildcard(_pix2wav2);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Pix2WavLive = function (_Component) {\n  _inherits(Pix2WavLive, _Component);\n\n  function Pix2WavLive(props) {\n    _classCallCheck(this, Pix2WavLive);\n\n    var _this = _possibleConstructorReturn(this, (Pix2WavLive.__proto__ || Object.getPrototypeOf(Pix2WavLive)).call(this));\n\n    props.actions.pix2wav.load_directories();\n    props.actions.live.get_params();\n    _this.changeCheckpoint = _this.changeCheckpoint.bind(_this);\n    _this.changeEpoch = _this.changeEpoch.bind(_this);\n    _this.changeSequence = _this.changeSequence.bind(_this);\n    _this.seek = _this.seek.bind(_this);\n    _this.togglePlaying = _this.togglePlaying.bind(_this);\n    _this.toggleRecording = _this.toggleRecording.bind(_this);\n    return _this;\n  }\n\n  _createClass(Pix2WavLive, [{\n    key: 'componentWillUpdate',\n    value: function componentWillUpdate(nextProps) {\n      if (nextProps.opt.checkpoint_name && nextProps.opt.checkpoint_name !== this.props.opt.checkpoint_name) {\n        console.log('fetch checkpoint', nextProps.opt.checkpoint_name);\n        this.props.actions.live.list_epochs('pix2wav', nextProps.opt.checkpoint_name);\n      }\n    }\n  }, {\n    key: 'changeCheckpoint',\n    value: function changeCheckpoint(field, checkpoint_name) {\n      this.props.actions.live.load_epoch(checkpoint_name, 'latest');\n    }\n  }, {\n    key: 'changeEpoch',\n    value: function changeEpoch(field, epoch_name) {\n      this.props.actions.live.load_epoch(this.props.opt.checkpoint_name, epoch_name);\n    }\n  }, {\n    key: 'changeSequence',\n    value: function changeSequence(field, sequence) {\n      console.log('got sequence', sequence);\n      this.props.actions.live.load_sequence(sequence);\n    }\n  }, {\n    key: 'seek',\n    value: function seek(percentage) {\n      var frame = Math.floor(percentage * (parseInt(this.props.frame.sequence_len) || 1) + 1);\n      this.props.actions.live.seek(frame);\n    }\n  }, {\n    key: 'start',\n    value: function start() {\n      // console.log(this.props)\n      console.log(this.props.pix2wav.data);\n      var sequence = this.props.pix2wav.data.sequences[0].name || '';\n      var checkpoint = this.props.pix2wav.data.checkpoints[0].name || '';\n      console.log('starting up!', sequence, checkpoint);\n      this.props.actions.tasks.live_task(sequence, checkpoint);\n    }\n  }, {\n    key: 'interrupt',\n    value: function interrupt() {\n      this.props.actions.queue.stop_task('gpu');\n    }\n  }, {\n    key: 'exit',\n    value: function exit() {\n      this.props.actions.queue.stop_task('gpu', { sigkill: true });\n    }\n  }, {\n    key: 'togglePlaying',\n    value: function togglePlaying() {\n      if (this.props.opt.processing) {\n        this.props.actions.live.pause();\n      } else {\n        this.props.actions.live.play();\n      }\n    }\n  }, {\n    key: 'toggleRecording',\n    value: function toggleRecording() {\n      if (this.props.opt.recording) {\n        (0, _player.stopRecording)();\n        this.props.actions.live.pause();\n      } else {\n        (0, _player.startRecording)();\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      // console.log(this.props)\n      if (this.props.pix2wav.loading) {\n        return (0, _preact.h)(_common.Loading, null);\n      }\n      // console.log('sequence', this.props.opt)\n      return (0, _preact.h)(\n        'div',\n        { className: 'app pix2wav centered' },\n        (0, _preact.h)(\n          'div',\n          { className: 'row' },\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(_common.Player, { width: 256, height: 256 })\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'params column audioParams' },\n            (0, _preact.h)(\n              _common.Group,\n              { title: 'Audio playback' },\n              (0, _preact.h)(\n                _common.Button,\n                { title: 'Start playback',\n                  onClick: function onClick() {\n                    return playerActions.startSynthesizing();\n                  }\n                },\n                'Start'\n              ),\n              (0, _preact.h)(\n                _common.Button,\n                { title: 'Stop playback',\n                  onClick: function onClick() {\n                    return playerActions.stopSynthesizing();\n                  }\n                },\n                'Stop'\n              )\n            )\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { className: 'params row' },\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Playback',\n                noToggle: true\n              },\n              (0, _preact.h)(_common.Select, {\n                name: 'send_image',\n                title: 'view mode',\n                options: ['a', 'b', 'sequence', 'recursive'],\n                onChange: this.props.actions.live.set_param\n              }),\n              (0, _preact.h)(_common.Select, {\n                name: 'sequence_name',\n                title: 'sequence',\n                options: this.props.pix2wav.data.sequences,\n                onChange: this.changeSequence\n              }),\n              (0, _preact.h)(_common.Select, {\n                name: 'output_format',\n                title: 'format',\n                options: ['JPEG', 'PNG']\n              }),\n              (0, _preact.h)(_common.Select, {\n                name: 'checkpoint_name',\n                title: 'checkpoint',\n                options: this.props.pix2wav.data.checkpoints,\n                onChange: this.changeCheckpoint\n              }),\n              (0, _preact.h)(_common.Select, {\n                name: 'epoch',\n                title: 'epoch',\n                options: this.props.epochs,\n                onChange: this.changeEpoch\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'position',\n                min: 0.0, max: 1.0, type: 'float',\n                value: (this.props.frame.sequence_i || 0) / (this.props.frame.sequence_len || 1),\n                onChange: this.seek\n              }),\n              this.renderRestartButton(),\n              (0, _preact.h)(\n                _common.Button,\n                {\n                  title: this.props.opt.savingVideo ? 'Saving video...' : this.props.opt.recording ? 'Recording (' + timeInSeconds(this.props.opt.recordFrames) + ')' : 'Record video',\n                  onClick: this.toggleRecording\n                },\n                this.props.opt.savingVideo ? 'Saving' : this.props.opt.recording ? 'Recording' : 'Record'\n              ),\n              (0, _preact.h)(\n                _common.Button,\n                {\n                  title: 'Save frame',\n                  onClick: _player.saveFrame\n                },\n                'Save'\n              ),\n              (0, _preact.h)(\n                'p',\n                { 'class': 'last_message' },\n                this.props.last_message\n              )\n            )\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Transition',\n                name: 'transition'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'transition_period',\n                min: 10, max: 5000, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'transition_min',\n                min: 0.001, max: 0.2, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'transition_max',\n                min: 0.1, max: 1.0, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Recursion',\n                name: 'recursive'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'recursive_frac',\n                min: 0.0, max: 0.5, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'recurse_roll',\n                min: -64, max: 64, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'recurse_roll_axis',\n                min: 0, max: 1, type: 'int'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Sequence',\n                name: 'sequence'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'sequence_frac',\n                min: 0.0, max: 1, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'process_frac',\n                min: 0, max: 1, type: 'float'\n              })\n            )\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Clahe',\n                name: 'clahe'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'clip_limit',\n                min: 1.0, max: 4.0, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Posterize',\n                name: 'posterize'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'spatial_window',\n                min: 2, max: 128, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'color_window',\n                min: 2, max: 128, type: 'int'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Blur',\n                name: 'blur'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'blur_radius',\n                min: 3, max: 7, type: 'odd'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'blur_sigma',\n                min: 0, max: 2, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Canny Edge Detection',\n                name: 'canny'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'canny_lo',\n                min: 10, max: 200, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'canny_hi',\n                min: 10, max: 200, type: 'int'\n              })\n            )\n          )\n        )\n      );\n    }\n  }, {\n    key: 'renderRestartButton',\n    value: function renderRestartButton() {\n      var _this2 = this;\n\n      if (this.props.runner.gpu.status === 'IDLE') {\n        return (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'GPU Idle',\n            onClick: function onClick() {\n              return _this2.start();\n            }\n          },\n          'Start'\n        );\n      }\n      if (this.props.runner.gpu.task.module !== 'pix2pix' && this.props.runner.gpu.task.module !== 'pix2wav') {\n        return (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'GPU Busy',\n            onClick: function onClick() {\n              return _this2.interrupt();\n            }\n          },\n          'Interrupt'\n        );\n      }\n      if (!this.props.opt.processing) {\n        return (0, _preact.h)(\n          'div',\n          null,\n          (0, _preact.h)(\n            _common.Button,\n            {\n              title: 'Not processing',\n              onClick: this.togglePlaying\n            },\n            'Restart'\n          ),\n          (0, _preact.h)(\n            _common.Button,\n            {\n              title: 'GPU Busy',\n              onClick: function onClick() {\n                return _this2.interrupt();\n              }\n            },\n            'Interrupt'\n          ),\n          (0, _preact.h)(\n            _common.Button,\n            {\n              title: 'Last resort',\n              onClick: function onClick() {\n                return _this2.exit();\n              }\n            },\n            'Exit'\n          )\n        );\n      }\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'Processing',\n            onClick: this.togglePlaying\n          },\n          'Pause'\n        ),\n        (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'GPU Busy',\n            onClick: function onClick() {\n              return _this2.interrupt();\n            }\n          },\n          'Interrupt'\n        ),\n        (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'Last resort',\n            onClick: function onClick() {\n              return _this2.exit();\n            }\n          },\n          'Exit'\n        )\n      );\n    }\n  }]);\n\n  return Pix2WavLive;\n}(_preact.Component);\n\nfunction timeInSeconds(n) {\n  return (n / 10).toFixed(1) + ' s.';\n}\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    last_message: state.live.last_message,\n    opt: state.live.opt,\n    frame: state.live.frame,\n    checkpoints: state.live.checkpoints,\n    epochs: state.live.epochs,\n    sequences: state.live.sequences,\n    runner: state.system.runner,\n    pix2wav: state.module.pix2wav\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: {\n      live: (0, _redux.bindActionCreators)(liveActions, dispatch),\n      queue: (0, _redux.bindActionCreators)(queueActions, dispatch),\n      pix2wav: (0, _redux.bindActionCreators)(pix2wavActions, dispatch),\n      tasks: (0, _redux.bindActionCreators)(pix2wavTasks, dispatch), s: s\n    }\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2WavLive);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = Pix2WavNew;\n\nvar _preact = require('preact');\n\nvar _dataset = require('../../../dataset/dataset.new');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nvar _pix2wav = require('../pix2wav.module');\n\nvar _pix2wav2 = _interopRequireDefault(_pix2wav);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction Pix2WavNew(_ref) {\n  var history = _ref.history;\n\n  return (0, _preact.h)(\n    'div',\n    { 'class': 'app pix2wav' },\n    (0, _preact.h)(_dataset2.default, { module: _pix2wav2.default, history: history })\n  );\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2wav = require('../pix2wav.actions');\n\nvar pix2wavActions = _interopRequireWildcard(_pix2wav);\n\nvar _pix2wav2 = require('../pix2wav.tasks');\n\nvar pix2wavTasks = _interopRequireWildcard(_pix2wav2);\n\nvar _loading = require('../../../common/loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nvar _dataset = require('../../../dataset/dataset.form');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nvar _dataset3 = require('../../../dataset/dataset.new');\n\nvar _dataset4 = _interopRequireDefault(_dataset3);\n\nvar _upload = require('../../../dataset/upload.status');\n\nvar _upload2 = _interopRequireDefault(_upload);\n\nvar _fileList = require('../../../common/fileList.component');\n\nvar _spectrogram = require('./spectrogram.upload');\n\nvar _spectrogram2 = _interopRequireDefault(_spectrogram);\n\nvar _dataset5 = require('../../../dataset/dataset.component');\n\nvar _dataset6 = _interopRequireDefault(_dataset5);\n\nvar _pix2wav3 = require('../pix2wav.module');\n\nvar _pix2wav4 = _interopRequireDefault(_pix2wav3);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Pix2wavShow = function (_Component) {\n  _inherits(Pix2wavShow, _Component);\n\n  function Pix2wavShow(props) {\n    _classCallCheck(this, Pix2wavShow);\n\n    var _this = _possibleConstructorReturn(this, (Pix2wavShow.__proto__ || Object.getPrototypeOf(Pix2wavShow)).call(this, props));\n\n    _this.datasetActions = _this.datasetActions.bind(_this);\n    return _this;\n  }\n\n  _createClass(Pix2wavShow, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      var id = this.props.match.params.id || localStorage.getItem('pix2wav.last_id');\n      console.log('load dataset:', id);\n      var _props = this.props,\n          match = _props.match,\n          pix2wav = _props.pix2wav,\n          actions = _props.actions;\n\n      if (id === 'new') return;\n      if (id) {\n        if (parseInt(id)) localStorage.setItem('pix2wav.last_id', id);\n        if (!pix2wav.folder || pix2wav.folder.id !== id) {\n          actions.load_directories(id);\n        }\n      } else {\n        this.props.history.push('/pix2wav/new/');\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props2 = this.props,\n          pix2wav = _props2.pix2wav,\n          match = _props2.match,\n          history = _props2.history;\n\n      var _ref = pix2wav.data || {},\n          folderLookup = _ref.folderLookup;\n\n      var folder = (folderLookup || {})[pix2wav.folder_id] || {};\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'app pix2wav' },\n        (0, _preact.h)(\n          'div',\n          { 'class': 'heading' },\n          (0, _preact.h)(\n            'div',\n            { 'class': 'spaced' },\n            (0, _preact.h)(\n              'h1',\n              null,\n              folder ? folder.name : (0, _preact.h)(_loading2.default, null)\n            ),\n            (0, _preact.h)(_upload2.default, null)\n          )\n        ),\n        (0, _preact.h)(_spectrogram2.default, {\n          loading: pix2wav.loading,\n          progress: pix2wav.progress,\n          id: pix2wav.folder_id,\n          module: _pix2wav4.default,\n          data: pix2wav.data,\n          folder: folder\n        }),\n        (0, _preact.h)(_dataset6.default, {\n          loading: pix2wav.loading,\n          progress: pix2wav.progress,\n          id: pix2wav.folder_id,\n          module: _pix2wav4.default,\n          data: pix2wav.data,\n          folder: folder,\n          history: history,\n          onPickFile: function onPickFile(file, e) {\n            e.preventDefault();\n            e.stopPropagation();\n            console.log('picked a file', file);\n          },\n          datasetActions: this.datasetActions\n        })\n      );\n    }\n  }, {\n    key: 'datasetActions',\n    value: function datasetActions(dataset) {\n      var isFetching = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      var isProcessing = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n      var _props3 = this.props,\n          pix2wav = _props3.pix2wav,\n          remote = _props3.remote;\n\n      var input = pix2wav.data.fileLookup[dataset.input[0]];\n      if (!input) return null;\n      if (input.name && input.name.match(/(gif|jpe?g|png)$/i)) return null;\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)(\n          'div',\n          { 'class': 'actions' },\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2wav.folder_id, 1);\n              } },\n            'train'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2wav.folder_id, 2);\n              } },\n            '2x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2wav.folder_id, 4);\n              } },\n            '4x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2wav.folder_id, 6);\n              } },\n            '6x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2wav.folder_id, 18);\n              } },\n            '18x'\n          )\n        ),\n        dataset.isBuilt ? (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          'fetched ',\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.clear_cache_task(dataset);\n              } },\n            'rm'\n          )\n        ) : isFetching ? (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          'fetching'\n        ) : (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.fetch_task(input.url, input.id, dataset.name);\n              } },\n            'fetch'\n          )\n        )\n      );\n    }\n  }]);\n\n  return Pix2wavShow;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    pix2wav: state.module.pix2wav\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(pix2wavActions, dispatch),\n    remote: (0, _redux.bindActionCreators)(pix2wavTasks, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2wavShow);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _moment = require('moment/min/moment.min');\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2wav = require('../pix2wav.actions');\n\nvar pix2wavActions = _interopRequireWildcard(_pix2wav);\n\nvar _pix2wav2 = require('../pix2wav.tasks');\n\nvar pix2wavTasks = _interopRequireWildcard(_pix2wav2);\n\nvar _common = require('../../../common');\n\nvar _dataset = require('../../../dataset/dataset.actions');\n\nvar datasetActions = _interopRequireWildcard(_dataset);\n\nvar _wav2pix = require('../../../audio/wav2pix');\n\nvar wav2pixActions = _interopRequireWildcard(_wav2pix);\n\nvar _pix2wav3 = require('../../../audio/pix2wav');\n\nvar pix2wavPlayer = _interopRequireWildcard(_pix2wav3);\n\nvar _pix2wav4 = require('../pix2wav.module');\n\nvar _pix2wav5 = _interopRequireDefault(_pix2wav4);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar date_stamp = function date_stamp() {\n  return (0, _moment2.default)().format(\"_YYYYMMDD_HHmm\");\n};\n\nvar SpectrogramUpload = function (_Component) {\n  _inherits(SpectrogramUpload, _Component);\n\n  function SpectrogramUpload(props) {\n    _classCallCheck(this, SpectrogramUpload);\n\n    var _this = _possibleConstructorReturn(this, (SpectrogramUpload.__proto__ || Object.getPrototypeOf(SpectrogramUpload)).call(this, props));\n\n    _this.state = {\n      file: null,\n      pcm: null,\n      name: \"\",\n      datasetName: \"\",\n      frames: [],\n      frame_start: 0,\n      max: 1000,\n      preview_count: 8 * 4,\n      frame_step: wav2pixActions.FRAME_STEP\n    };\n    var audioElement = document.createElement('audio');\n    audioElement.addEventListener('loadedmetadata', function () {\n      var duration = audioElement.duration;\n      var total_frame_count = Math.floor((duration * 44100 - wav2pixActions.FRAME_LENGTH) / _this.state.frame_step);\n      _this.setState({\n        duration: duration,\n        max: Math.min(_this.state.max, total_frame_count, 1000)\n      });\n    });\n    _this.audioElement = audioElement;\n    return _this;\n  }\n\n  _createClass(SpectrogramUpload, [{\n    key: 'pickFile',\n    value: function pickFile(file) {\n      var _this2 = this;\n\n      var name = file.name.split('.')[0].replace(/\\s+/g, '_').replace(/-/g, '_').replace(/_+/g, '_');\n      this.setState({\n        file: file,\n        name: name + date_stamp(),\n        datasetName: name,\n        pcm: ''\n      }, function () {\n        _this2.rebuildFrames();\n      });\n      this.audioElement.src = URL.createObjectURL(file);\n    }\n  }, {\n    key: 'rebuildFrames',\n    value: function rebuildFrames() {\n      var _this3 = this;\n\n      var _state = this.state,\n          file = _state.file,\n          pcm = _state.pcm,\n          frame_step = _state.frame_step,\n          frame_start = _state.frame_start,\n          preview_count = _state.preview_count;\n\n      this.props.wav2pix.renderFrames(pcm || file, { frame_start: frame_start, frame_step: frame_step, max: preview_count }).then(function (data) {\n        console.log('got frames', data.frames.length);\n        _this3.setState(_extends({}, _this3.state, {\n          frames: data.frames,\n          pcm: data.pcm\n        }));\n      });\n    }\n  }, {\n    key: 'buildZip',\n    value: function buildZip() {\n      var _this4 = this;\n\n      var _state2 = this.state,\n          pcm = _state2.pcm,\n          file = _state2.file,\n          max = _state2.max,\n          frame_step = _state2.frame_step,\n          frame_start = _state2.frame_start;\n\n      this.props.wav2pix.buildZip(this.state.name, pcm || file, { frame_start: frame_start, frame_step: frame_step, max: max }).then(function (_ref) {\n        var zip = _ref.zip,\n            filename = _ref.filename,\n            count = _ref.count;\n\n        _this4.props.datasetActions.uploadFile(_this4.props.module, _this4.props.folder, zip, filename, { count: count, max: max, frame_step: frame_step, frame_size: wav2pixActions.FRAME_LENGTH / 44100 });\n      });\n    }\n  }, {\n    key: 'playFrame',\n    value: function playFrame(i) {\n      var _this5 = this;\n\n      return function () {\n        var frame = _this5.state.frames[i];\n        pix2wavPlayer.play(frame);\n      };\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this6 = this;\n\n      // loading={pix2wav.loading}\n      // progress={pix2wav.progress}\n      // id={pix2wav.folder_id}\n      // module={pix2wavModule}\n      // data={pix2wav.data}\n      // folder={folder}\n      var _state3 = this.state,\n          file = _state3.file,\n          frames = _state3.frames,\n          preview_count = _state3.preview_count;\n\n      var canvases = [];\n      for (var i = 0, _len = preview_count; i < _len; i++) {\n        canvases.push((0, _preact.h)('canvas', { key: i, onClick: this.playFrame(i) }));\n      }\n      return (0, _preact.h)(\n        'div',\n        { className: 'row' },\n        (0, _preact.h)(\n          'div',\n          { className: 'col spectrogramBuilder' },\n          (0, _preact.h)(\n            _common.Group,\n            { title: 'Spectrogram Builder' },\n            (0, _preact.h)(\n              'p',\n              null,\n              \"Convert your sounds into spectrograms. \",\n              \"Sound files can be WAV, MP3, AIFF, or FLAC. \"\n            ),\n            (0, _preact.h)(_common.FileUpload, {\n              title: 'Choose a sound file',\n              accept: 'audio/*',\n              onUpload: function onUpload(file) {\n                return _this6.pickFile(file);\n              }\n            }),\n            file && this.renderMetadata(file)\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { ref: function ref(c) {\n              _this6.canvases = c;\n            }, className: 'thumbs', id: 'pix2wav_canvases' },\n          canvases\n        )\n      );\n    }\n  }, {\n    key: 'renderMetadata',\n    value: function renderMetadata(file) {\n      var _this7 = this;\n\n      var _state4 = this.state,\n          duration = _state4.duration,\n          preview_count = _state4.preview_count;\n\n      var size = _util2.default.hush_size(file.size);\n      var total_frame_count = Math.floor((duration * 44100 - wav2pixActions.FRAME_LENGTH) / this.state.frame_step);\n      var frame_size = Math.round(wav2pixActions.FRAME_LENGTH / 44100 * 1000) + ' ms.';\n      var frame_step = Math.round(this.state.frame_step / 44100 * 1000) + ' ms.';\n      return (0, _preact.h)(\n        'div',\n        { className: 'fileMetadata' },\n        (0, _preact.h)(\n          _common.Group,\n          { title: 'Metadata' },\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'Name' },\n            file.name\n          ),\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'Type' },\n            file.type\n          ),\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'Size' },\n            (0, _preact.h)(\n              'span',\n              { className: size[0] },\n              size[1]\n            )\n          ),\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'Date' },\n            (0, _moment2.default)(file.lastModifiedDate).format(\"YYYY-MM-DD h:mm a\")\n          ),\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'Duration' },\n            Math.floor(duration) + ' s.'\n          ),\n          (0, _preact.h)('br', null),\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'Frames' },\n            total_frame_count\n          ),\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'Frame Size' },\n            frame_size\n          ),\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'Frame Step' },\n            frame_step\n          ),\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'FFT Size' },\n            wav2pixActions.spectrum.fft_size\n          ),\n          (0, _preact.h)('br', null),\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'Status' },\n            this.props.pix2wav.status\n          ),\n          (0, _preact.h)('br', null)\n        ),\n        (0, _preact.h)(\n          _common.Group,\n          { title: 'Data settings' },\n          (0, _preact.h)(_common.TextInput, {\n            title: 'Dataset name',\n            onChange: function onChange(e) {\n              return _this7.setState({ name: e.target.value });\n            },\n            value: this.state.name\n          }),\n          (0, _preact.h)(_common.Slider, {\n            name: 'Starting Frame',\n            min: 0, max: 1, type: 'float',\n            value: this.state.frame_start,\n            defaultValue: 0,\n            onChange: function onChange(frame_start) {\n              _this7.setState({\n                frame_start: frame_start\n              }, function () {\n                _this7.rebuildFrames();\n              });\n            }\n          }),\n          (0, _preact.h)(_common.Slider, {\n            name: 'No. Frames',\n            min: 10, max: Math.min(total_frame_count, 1000), type: 'int',\n            value: this.state.max,\n            defaultValue: Math.min(total_frame_count, 300),\n            onChange: function onChange(max) {\n              return _this7.setState({ max: max });\n            }\n          }),\n          (0, _preact.h)(_common.Slider, {\n            name: 'Frame step',\n            min: 10, max: 20000, type: 'int',\n            value: this.state.frame_step,\n            defaultValue: wav2pixActions.FRAME_STEP,\n            onChange: function onChange(frame_step) {\n              var total_frame_count = Math.floor((duration * 44100 - wav2pixActions.FRAME_LENGTH) / frame_step);\n              _this7.setState({\n                name: _this7.state.datasetName + '_step_' + frame_step + date_stamp(),\n                frame_step: frame_step,\n                max: Math.min(_this7.state.max, total_frame_count)\n              }, function () {\n                _this7.rebuildFrames();\n              });\n            }\n          }),\n          (0, _preact.h)(\n            _common.Button,\n            {\n              onClick: function onClick() {\n                return _this7.buildZip();\n              }\n            },\n            'Upload Frames'\n          )\n        ),\n        (0, _preact.h)(_common.Progress, null)\n      );\n    }\n  }, {\n    key: 'componentDidUpdate',\n    value: function componentDidUpdate() {\n      var _this8 = this;\n\n      (this.state.frames || []).map(function (frame, i) {\n        var canvas = _this8.canvases.children[i];\n        var ctx = canvas.getContext('2d-lodpi');\n        canvas.width = frame.canvas.width;\n        canvas.height = frame.canvas.height;\n        ctx.drawImage(frame.canvas, 0, 0);\n      });\n    }\n  }]);\n\n  return SpectrogramUpload;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    pix2wav: state.module.pix2wav,\n    upload: state.upload\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    datasetActions: (0, _redux.bindActionCreators)(datasetActions, dispatch),\n    actions: (0, _redux.bindActionCreators)(pix2wavActions, dispatch),\n    remote: (0, _redux.bindActionCreators)(pix2wavTasks, dispatch),\n    wav2pix: (0, _redux.bindActionCreators)(wav2pixActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SpectrogramUpload);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _samplernn = require('./views/samplernn.new');\n\nvar _samplernn2 = _interopRequireDefault(_samplernn);\n\nvar _samplernn3 = require('./views/samplernn.show');\n\nvar _samplernn4 = _interopRequireDefault(_samplernn3);\n\nvar _samplernn5 = require('./views/samplernn.import');\n\nvar _samplernn6 = _interopRequireDefault(_samplernn5);\n\nvar _samplernn7 = require('./views/samplernn.results');\n\nvar _samplernn8 = _interopRequireDefault(_samplernn7);\n\nvar _samplernn9 = require('./views/samplernn.graph');\n\nvar _samplernn10 = _interopRequireDefault(_samplernn9);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar router = function () {\n  function router() {\n    _classCallCheck(this, router);\n  }\n\n  _createClass(router, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      _actions2.default.system.changeTool('samplernn');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #eef, #fef)';\n    }\n  }, {\n    key: 'componentWillReceiveProps',\n    value: function componentWillReceiveProps() {\n      _actions2.default.system.changeTool('samplernn');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #eef, #fef)';\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'section',\n        null,\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/samplernn/new', component: _samplernn2.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/samplernn/datasets', component: _samplernn4.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/samplernn/datasets/:id', component: _samplernn4.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/samplernn/import', component: _samplernn6.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/samplernn/results', component: _samplernn8.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/samplernn/graph', component: _samplernn10.default })\n      );\n    }\n  }]);\n\n  return router;\n}();\n\nfunction links() {\n  return [{ url: '/samplernn/new/', name: 'new' }, { url: '/samplernn/datasets/', name: 'datasets' }, { url: '/samplernn/graph/', name: 'graph' }, { url: '/samplernn/results/', name: 'results' }];\n}\n\nexports.default = {\n  name: 'samplernn',\n  router: router, links: links\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.import_files = exports.load_loss = exports.load_graph = exports.load_directories = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.loader');\n\nvar datasetLoader = _interopRequireWildcard(_dataset);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _samplernn = require('./samplernn.module');\n\nvar _samplernn2 = _interopRequireDefault(_samplernn);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toArray(arr) { return Array.isArray(arr) ? arr : Array.from(arr); }\n\nvar load_directories = exports.load_directories = function load_directories(id) {\n  return function (dispatch) {\n    var module = _samplernn2.default.name;\n    _util2.default.allProgress([datasetLoader.load(module), _actions2.default.socket.list_directory({ module: module, dir: 'datasets' }), _actions2.default.socket.list_directory({ module: module, dir: 'results' }), _actions2.default.socket.list_directory({ module: module, dir: 'output' }), _actions2.default.socket.disk_usage({ module: module, dir: 'datasets' }), load_loss()(dispatch)], function (percent, i, n) {\n      dispatch({\n        type: _types2.default.app.load_progress,\n        progress: { i: i, n: n },\n        data: { module: 'samplernn' }\n      });\n    }).then(function (res) {\n      // console.log(res)\n      var _res = _slicedToArray(res, 6),\n          datasetApiReport = _res[0],\n          datasets = _res[1],\n          results = _res[2],\n          output = _res[3],\n          datasetUsage = _res[4],\n          lossReport = _res[5];\n\n      var folderLookup = datasetApiReport.folderLookup,\n          fileLookup = datasetApiReport.fileLookup,\n          datasetLookup = datasetApiReport.datasetLookup,\n          folders = datasetApiReport.folders,\n          files = datasetApiReport.files,\n          unsortedFolder = datasetApiReport.unsortedFolder;\n\n      console.log(datasetUsage);\n\n      // also show the various flat audio files we have, in the input area..\n      var flatDatasets = datasets.filter(function (s) {\n        return s.name.match(/(wav|aiff?|flac|mp3)$/) && !s.dir;\n      });\n      var builtDatasets = datasets.filter(function (s) {\n        return s.dir;\n      });\n      builtDatasets.forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name, unsortedFolder, dir.date);\n        dataset.isBuilt = true;\n      });\n\n      flatDatasets.forEach(function (file) {\n        file.uuid = (0, _v2.default)();\n        fileLookup[file.uuid] = file;\n        var name = file.name.split('.')[0];\n        var dataset = datasetLoader.getDataset(module, datasetLookup, name, unsortedFolder, file.date);\n        file.persisted = false;\n        dataset.input.push(file.uuid);\n      });\n\n      // exp:coccokit_3-frame_sizes:8,2-n_rnn:2-dataset:coccokit_3\n      var checkpoints = results.filter(function (s) {\n        return s.dir;\n      }).map(function (s) {\n        var checkpoint = s.name.split('-').map(function (s) {\n          return s.split(':');\n        }).filter(function (b) {\n          return b.length && b[1];\n        }).reduce(function (a, b) {\n          return (a[b[0]] = b[1]) && a;\n        }, {});\n        checkpoint.name = checkpoint.name || checkpoint.dataset || checkpoint.exp;\n        checkpoint.date = s.date;\n        checkpoint.dir = s;\n        checkpoint.persisted = false;\n        var dataset = datasetLoader.getDataset(module, datasetLookup, checkpoint.name, unsortedFolder, checkpoint.date);\n        var loss = lossReport[checkpoint.name];\n        if (loss) {\n          dataset.epoch = checkpoint.epoch = loss.length;\n          checkpoint.training_loss = loss;\n        }\n        dataset.checkpoints.push(checkpoint);\n        return checkpoint;\n      });\n\n      output.map(function (file) {\n        file.uuid = (0, _v2.default)();\n        fileLookup[file.uuid] = file;\n        var pair = file.name.split('.')[0].split('-');\n        var dataset = datasetLoader.getDataset(module, datasetLookup, pair[0], unsortedFolder, file.date);\n        file.persisted = false;\n        file.epoch = parseInt(file.epoch || pair[1].replace(/^\\D+/, '')) || 0;\n        dataset.epoch = Math.max(file.epoch, dataset.epoch || 0);\n        // here check if the file exists in dataset, if so just check that it's persisted\n        var found = dataset.output.some(function (file_id) {\n          // if (f.name === \n          if (fileLookup[file_id].name === file.name) {\n            fileLookup[file_id].persisted = true;\n            return true;\n          }\n          return false;\n        });\n        if (!found) {\n          dataset.output.push(file.uuid);\n        }\n      });\n\n      dispatch({\n        type: _types2.default.dataset.load,\n        data: {\n          module: module,\n          folderLookup: folderLookup,\n          fileLookup: fileLookup,\n          datasetLookup: datasetLookup,\n          folders: folders, files: files,\n          checkpoints: checkpoints,\n          output: output\n        }\n      });\n    }).catch(function (e) {\n      console.error(e);\n    });\n    if (id) {\n      dispatch({\n        type: _types2.default.dataset.set_folder,\n        data: {\n          folder_id: id,\n          module: module\n        }\n      });\n    }\n  };\n};\n\nvar load_graph = exports.load_graph = function load_graph() {\n  return function (dispatch) {\n    var module = _samplernn2.default.name;\n    _util2.default.allProgress([load_loss()(dispatch), _actions2.default.socket.list_directory({ module: module, dir: 'results' })], function (percent, i, n) {\n      dispatch({\n        type: _types2.default.app.load_progress,\n        progress: { i: i, n: n },\n        data: { module: 'samplernn' }\n      });\n    }).then(function (res) {\n      var _res2 = _slicedToArray(res, 2),\n          lossReport = _res2[0],\n          results = _res2[1];\n\n      dispatch({\n        type: _types2.default.samplernn.load_graph,\n        lossReport: lossReport,\n        results: results\n      });\n    });\n  };\n};\n\nvar load_loss = exports.load_loss = function load_loss() {\n  return function (dispatch) {\n    return _actions2.default.socket.run_script({ module: 'samplernn', activity: 'report' }).then(function (report) {\n      var lossReport = {};\n      report.stdout.split('\\n\\n').filter(function (a) {\n        return !!a;\n      }).forEach(function (data) {\n        var _data$split = data.split('\\n'),\n            _data$split2 = _toArray(_data$split),\n            name = _data$split2[0],\n            lines = _data$split2.slice(1);\n\n        lossReport[name] = lines.map(function (s) {\n          return s.split('\\t').reduce(function (a, s) {\n            var b = s.split(': ');\n            a[b[0]] = b[1];\n            return a;\n          }, {});\n        });\n        // console.log(data, name, lossReport[name])\n      });\n      dispatch({\n        type: _types2.default.samplernn.load_loss,\n        lossReport: lossReport\n      });\n      return lossReport;\n    });\n  };\n};\n\nvar import_files = exports.import_files = function import_files(state, datasetLookup, fileLookup) {\n  return function (dispatch) {\n    var selected = state.selected,\n        folder_id = state.folder_id,\n        url_base = state.url_base,\n        import_action = state.import_action;\n\n    var names = Object.keys(selected).filter(function (k) {\n      return selected[k];\n    });\n    var promises = void 0;\n    switch (import_action) {\n      case 'Hotlink':\n        // in this case, create a new file for each file we see.\n        promises = names.reduce(function (a, name) {\n          return datasetLookup[name].output.map(function (id) {\n            return fileLookup[id];\n          }).map(function (file) {\n            var partz = file.name.split('.');\n            var ext = partz.pop();\n            return _actions2.default.file.create({\n              folder_id: folder_id,\n              name: file.name,\n              url: url_base + file.name,\n              mime: 'audio/' + ext,\n              epoch: file.epoch,\n              size: file.size,\n              module: 'samplernn',\n              dataset: name,\n              activity: 'train',\n              datatype: 'audio',\n              generated: true,\n              created_at: new Date(file.date),\n              updated_at: new Date(file.date)\n            });\n          }).concat(a);\n        }, []);\n        break;\n      case 'Upload':\n        promises = names.reduce(function (a, name) {\n          return datasetLookup[name].input.map(function (id) {\n            return fileLookup[id];\n          }).map(function (file) {\n            if (file.persisted) return null;\n            var partz = file.name.split('.');\n            var ext = partz.pop();\n            if (ext === 'wav' || ext === 'flac') return;\n            console.log(file);\n            return _actions2.default.socket.upload_file({\n              folder_id: folder_id,\n              module: 'samplernn',\n              activity: 'train',\n              path: 'datasets',\n              filename: file.name,\n              generated: false,\n              processed: false,\n              datatype: 'audio',\n              ttl: 60000\n            });\n          }).concat(a);\n        }, []).filter(function (a) {\n          return !!a;\n        });\n        break;\n      default:\n        break;\n    }\n    console.log(promises);\n    return Promise.all(promises).then(function (data) {\n      console.log(data);\n      window.location.href = '/samplernn/datasets/' + folder_id + '/';\n    }).catch(function (e) {\n      console.error(e);\n    });\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nvar samplernnModule = {\n  name: 'samplernn',\n  displayName: 'SampleRNN',\n  datatype: 'audio'\n};\n\nexports.default = samplernnModule;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.reducer');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar samplernnInitialState = {\n  loading: true,\n  progress: { i: 0, n: 0 },\n  error: null,\n  folders: [],\n  folder_id: 0,\n  data: null,\n  lossReport: null,\n  results: null\n};\n\nvar samplernnReducer = function samplernnReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : samplernnInitialState;\n  var action = arguments[1];\n\n  if (action.data && action.data.module === 'samplernn') {\n    return (0, _dataset2.default)(state, action);\n  }\n\n  switch (action.type) {\n    case _types2.default.samplernn.load_loss:\n      return _extends({}, state, {\n        lossReport: action.lossReport\n      });\n    case _types2.default.samplernn.load_graph:\n      return _extends({}, state, {\n        lossReport: action.lossReport,\n        results: action.results\n      });\n    default:\n      return state;\n  }\n};\n\nexports.default = samplernnReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.clear_cache_task = exports.log_task = exports.fetch_task = exports.train_task = undefined;\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar train_task = exports.train_task = function train_task(dataset, folder_id) {\n  var epochs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n  return function (dispatch) {\n    var task = {\n      module: 'samplernn',\n      activity: 'train',\n      dataset: dataset.name,\n      epoch: dataset.checkpoints.length ? dataset.checkpoints[0].epoch || 0 : 0,\n      epochs: epochs,\n      folder_id: folder_id,\n      opt: {\n        sample_length: 44100 * 5,\n        n_samples: 6,\n        keep_old_checkpoints: false\n      }\n    };\n    console.log(task);\n    return _actions2.default.queue.add_task(task);\n  };\n};\nvar fetch_task = exports.fetch_task = function fetch_task(url, folder_id, file_id, dataset) {\n  return function (dispatch) {\n    if (!url) return console.log('input file inaccessible (no url)');\n    var task = {\n      module: 'samplernn',\n      activity: 'fetch',\n      dataset: dataset,\n      folder_id: folder_id,\n      opt: {\n        url: url,\n        file_id: file_id,\n        dataset: dataset\n      }\n    };\n    return _actions2.default.queue.add_task(task);\n  };\n};\nvar log_task = exports.log_task = function log_task(dataset) {\n  return function (dispatch) {\n    var task = {\n      module: 'samplernn',\n      activity: 'log',\n      dataset: dataset.name\n    };\n    return _actions2.default.queue.add_task(task);\n  };\n};\nvar clear_cache_task = exports.clear_cache_task = function clear_cache_task(dataset) {\n  return function (dispatch) {\n    var task = {\n      module: 'samplernn',\n      activity: 'clear_cache',\n      dataset: dataset.name\n    };\n    return _actions2.default.queue.add_task(task);\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _samplernn = require('../samplernn.actions');\n\nvar samplernnActions = _interopRequireWildcard(_samplernn);\n\nvar _group = require('../../../common/group.component');\n\nvar _group2 = _interopRequireDefault(_group);\n\nvar _slider = require('../../../common/slider.component');\n\nvar _slider2 = _interopRequireDefault(_slider);\n\nvar _select = require('../../../common/select.component');\n\nvar _select2 = _interopRequireDefault(_select);\n\nvar _button = require('../../../common/button.component');\n\nvar _button2 = _interopRequireDefault(_button);\n\nvar _fileList = require('../../../common/fileList.component');\n\nvar _textInput = require('../../../common/textInput.component');\n\nvar _textInput2 = _interopRequireDefault(_textInput);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar lerp = _util2.default.lerp,\n    norm = _util2.default.norm,\n    randint = _util2.default.randint,\n    randrange = _util2.default.randrange;\n\nvar SampleRNNGraph = function (_Component) {\n  _inherits(SampleRNNGraph, _Component);\n\n  function SampleRNNGraph(props) {\n    _classCallCheck(this, SampleRNNGraph);\n\n    var _this = _possibleConstructorReturn(this, (SampleRNNGraph.__proto__ || Object.getPrototypeOf(SampleRNNGraph)).call(this));\n\n    props.actions.load_graph();\n    return _this;\n  }\n\n  _createClass(SampleRNNGraph, [{\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      this.refs = {};\n      return (0, _preact.h)(\n        'div',\n        { className: 'app lossGraph' },\n        (0, _preact.h)(\n          'div',\n          { className: 'heading' },\n          (0, _preact.h)(\n            'h3',\n            null,\n            'SampleRNN Loss Graph'\n          ),\n          (0, _preact.h)('canvas', { ref: function ref(_ref) {\n              return _this2.refs['canvas'] = _ref;\n            } })\n        )\n      );\n    }\n  }, {\n    key: 'componentDidUpdate',\n    value: function componentDidUpdate() {\n      var _props$samplernn = this.props.samplernn,\n          lossReport = _props$samplernn.lossReport,\n          results = _props$samplernn.results;\n\n      if (!lossReport || !results) return;\n      var canvas = this.refs.canvas;\n      canvas.width = window.innerWidth;\n      canvas.height = window.innerHeight;\n      canvas.style.width = canvas.width + 'px';\n      canvas.style.height = canvas.height + 'px';\n\n      var ctx = canvas.getContext('2d');\n      var w = canvas.width;\n      var h = canvas.height;\n      ctx.clearRect(0, 0, w, h);\n\n      var resultsByDate = results.map(function (file) {\n        if (!file.name.match(/^exp:/)) return null;\n        var dataset = file.name.split(\"-\")[3].split(\":\")[1];\n        return [+new Date(file.date), dataset];\n      }).filter(function (a) {\n        return !!a;\n      }).sort(function (a, b) {\n        return a[0] - a[1];\n      });\n\n      var keys = Object.keys(lossReport).filter(function (k) {\n        return !!lossReport[k].length;\n      });\n      var scaleMax = 0;\n      var scaleMin = Infinity;\n      var epochsMax = 0;\n      keys.forEach(function (key) {\n        var loss = lossReport[key];\n        epochsMax = Math.max(loss.length, epochsMax);\n        loss.forEach(function (a) {\n          var v = parseFloat(a.training_loss);\n          if (!v) return;\n          scaleMax = Math.max(v, scaleMax);\n          scaleMin = Math.min(v, scaleMin);\n        });\n      });\n      // scaleMax *= 10\n      // console.log(scaleMax, scaleMin, epochsMax)\n\n      scaleMax = 3;\n      scaleMin = 0;\n      var margin = 0;\n      var wmin = 0;\n      var wmax = w / 2;\n      var hmin = 0;\n      var hmax = h / 2;\n      var epochsScaleFactor = 1; // 3/2\n\n      ctx.save();\n      var X = void 0,\n          Y = void 0;\n      for (var ii = 0; ii < epochsMax; ii++) {\n        X = lerp(ii / (epochsMax / epochsScaleFactor) * epochsScaleFactor, wmin, wmax);\n        ctx.strokeStyle = 'rgba(0,0,0,0.3)';\n        ctx.beginPath(0, 0);\n        ctx.moveTo(X, 0);\n        ctx.lineTo(X, h);\n        ctx.lineWidth = 0.5;\n        // ctx.stroke()\n        if ((ii + 1) % 6 === 0) {\n          ctx.lineWidth = 0.5;\n          ctx.stroke();\n          var fontSize = 12;\n          ctx.font = 'italic ' + fontSize + 'px \"Georgia\"';\n          ctx.fillStyle = 'rgba(0,12,28,0.6)';\n          ctx.fillText(ii / 5 * 6, X + 8, h - (fontSize + 4));\n        }\n      }\n      for (var ii = scaleMin; ii < scaleMax; ii += 1) {\n        Y = lerp(ii / scaleMax, hmin, hmax);\n        // ctx.strokeStyle = 'rgba(255,255,255,1.0)'\n        ctx.beginPath(0, 0);\n        ctx.moveTo(0, h - Y);\n        ctx.lineTo(w, h - Y);\n        ctx.lineWidth = 1;\n        // ctx.stroke()        \n        // if ( (ii % 1) < 0.1) {\n        // ctx.strokeStyle = 'rgba(255,255,255,1.0)'\n        ctx.lineWidth = 2;\n        ctx.setLineDash([4, 4]);\n        ctx.stroke();\n        ctx.stroke();\n        ctx.stroke();\n        ctx.setLineDash([1, 1]);\n        var _fontSize = 12;\n        ctx.font = 'italic ' + _fontSize + 'px \"Georgia\"';\n        ctx.fillStyle = 'rgba(0,12,28,0.6)';\n        ctx.fillText(ii.toFixed(1), w - 50, h - Y + _fontSize + 10);\n        // }\n      }\n      ctx.lineWidth = 1;\n      ctx.restore();\n\n      var min_date = resultsByDate[0][0];\n      var max_date = resultsByDate[resultsByDate.length - 1][0];\n      resultsByDate.forEach(function (pair) {\n        var date = pair[0];\n        var key = pair[1];\n        var loss = lossReport[key];\n        if (!key || !loss || !loss.length) return;\n        var vf = parseFloat(loss[loss.length - 1].training_loss) || 0;\n        var vg = parseFloat(loss[0].training_loss) || 5;\n        // console.log(vf)\n        var vv = 1 - norm(vf, scaleMin, scaleMax / 2);\n        ctx.lineWidth = (1 - norm(vf, scaleMin, scaleMax)) * 4;\n        // ctx.lineWidth = norm(date, min_date, max_date) * 3\n        // console.log(date, min_date, max_date)\n        ctx.strokeStyle = 'rgba(' + [randrange(30, 190), randrange(30, 150), randrange(60, 120)].join(',') + ',' + 0.8 + ')';\n        var begun = false;\n        loss.forEach(function (a, i) {\n          var v = parseFloat(a.training_loss);\n          if (!v) return;\n          var x = lerp(i / (epochsMax / epochsScaleFactor) * epochsScaleFactor, wmin, wmax);\n          var y = lerp(norm(v, scaleMin, scaleMax), hmax, hmin);\n          if (!begun) {\n            begun = true;\n            ctx.beginPath(0, 0);\n            ctx.moveTo(x, y);\n          } else {\n            ctx.lineTo(x, y);\n            // ctx.stroke()\n          }\n        });\n        ctx.stroke();\n        var i = loss.length - 1;\n        var v = parseFloat(loss[i].training_loss);\n        var x = lerp(i / (epochsMax / epochsScaleFactor) * epochsScaleFactor, wmin, wmax);\n        var y = lerp(norm(v, scaleMin, scaleMax), hmax, hmin);\n        var fontSize = 9;\n        ctx.font = 'italic ' + fontSize + 'px \"Georgia\"';\n        ctx.fillStyle = 'rgba(0,12,28,0.6)';\n        ctx.fillText(key, x + 4, y + fontSize / 2);\n      });\n    }\n  }]);\n\n  return SampleRNNGraph;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    samplernn: state.module.samplernn\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(samplernnActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SampleRNNGraph);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _samplernn = require('../samplernn.actions');\n\nvar samplernnActions = _interopRequireWildcard(_samplernn);\n\nvar _select = require('../../../common/select.component');\n\nvar _select2 = _interopRequireDefault(_select);\n\nvar _textInput = require('../../../common/textInput.component');\n\nvar _textInput2 = _interopRequireDefault(_textInput);\n\nvar _button = require('../../../common/button.component');\n\nvar _button2 = _interopRequireDefault(_button);\n\nvar _dataset = require('../../../dataset/dataset.component');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar samplernnModule = {\n  name: 'samplernn',\n  datatype: 'audio'\n};\n\nvar SampleRNNImport = function (_Component) {\n  _inherits(SampleRNNImport, _Component);\n\n  function SampleRNNImport() {\n    _classCallCheck(this, SampleRNNImport);\n\n    var _this = _possibleConstructorReturn(this, (SampleRNNImport.__proto__ || Object.getPrototypeOf(SampleRNNImport)).call(this));\n\n    _this.state = {\n      folder_id: 1,\n      import_action: 'Hotlink',\n      url_base: 'https://s3.amazonaws.com/i.asdf.us/bucky/data/4279/',\n      selected: {}\n    };\n    return _this;\n  }\n\n  _createClass(SampleRNNImport, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      var id = this.props.match.params.id || localStorage.getItem('samplernn.last_id');\n      console.log('load dataset:', id);\n      var _props = this.props,\n          match = _props.match,\n          samplernn = _props.samplernn,\n          samplernnActions = _props.samplernnActions;\n\n      if (id === 'new') return;\n      if (id) {\n        if (parseInt(id)) localStorage.setItem('samplernn.last_id', id);\n        if (!samplernn.folder || samplernn.folder.id !== id) {\n          this.props.actions.load_directories(id);\n        }\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      var samplernn = this.props.samplernn;\n\n      var datasets = [],\n          folder = void 0;\n      if (this.props.samplernn.data) {\n        datasets = (this.props.samplernn.data.folders || []).map(function (folder) {\n          return [folder.name, folder.id];\n        });\n        folder = this.props.samplernn.data.folderLookup.unsorted;\n      }\n      return (0, _preact.h)(\n        'div',\n        { className: 'app top' },\n        (0, _preact.h)(\n          'div',\n          { 'class': 'heading' },\n          (0, _preact.h)(\n            'h1',\n            null,\n            'Import'\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { 'class': 'params form row datasets' },\n          (0, _preact.h)(\n            'div',\n            { 'class': 'row dataset' },\n            (0, _preact.h)('div', { 'class': 'col' }),\n            (0, _preact.h)('div', { 'class': 'col' }),\n            (0, _preact.h)('div', { 'class': 'col' }),\n            (0, _preact.h)(\n              'div',\n              { 'class': 'col' },\n              (0, _preact.h)(\n                'h2',\n                null,\n                'Import to dataset'\n              ),\n              (0, _preact.h)(_select2.default, {\n                title: 'Destination dataset',\n                options: datasets,\n                name: 'folder_id',\n                opt: this.state,\n                onChange: function onChange(name, value) {\n                  return _this2.setState({ folder_id: value });\n                }\n              }),\n              (0, _preact.h)(_select2.default, {\n                title: 'Import action',\n                options: ['Hotlink', 'Upload'],\n                name: 'import_action',\n                opt: this.state,\n                onChange: function onChange(name, value) {\n                  return _this2.setState({ import_action: value });\n                }\n              }),\n              (0, _preact.h)(_textInput2.default, {\n                title: 'Remote URL base',\n                value: this.state.url_base,\n                placeholder: 'http://',\n                onSave: function onSave(value) {\n                  return _this2.setState({ url_base: value });\n                }\n              }),\n              (0, _preact.h)(\n                _button2.default,\n                {\n                  title: '',\n                  onClick: function onClick() {\n                    return _this2.doImport();\n                  }\n                },\n                'Import'\n              )\n            )\n          )\n        ),\n        (0, _preact.h)(_dataset2.default, {\n          loading: samplernn.loading,\n          progress: samplernn.progress,\n          module: samplernnModule,\n          data: samplernn.data,\n          id: 'unsorted',\n          folder: folder,\n          history: this.props.history,\n          onPickDataset: function onPickDataset(dataset) {\n            return _this2.toggle(dataset.name, _this2.state.selected[name]);\n          },\n          beforeRow: function beforeRow(dataset) {\n            return _this2.beforeRow(dataset);\n          },\n          afterRow: function afterRow(dataset) {\n            return _this2.afterRow(dataset);\n          }\n        })\n      );\n    }\n  }, {\n    key: 'toggle',\n    value: function toggle(name) {\n      this.setState(_extends({}, this.state, {\n        selected: _extends({}, this.state.selected, _defineProperty({}, name, !this.state.selected[name]))\n      }));\n    }\n  }, {\n    key: 'beforeRow',\n    value: function beforeRow(dataset) {\n      // console.log(dataset)\n    }\n  }, {\n    key: 'afterRow',\n    value: function afterRow(dataset) {\n      var name = dataset.name;\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)('input', {\n          type: 'checkbox',\n          value: name,\n          checked: !!this.state.selected[name]\n        })\n      );\n    }\n  }, {\n    key: 'doImport',\n    value: function doImport() {\n      var samplernn = this.props.samplernn;\n\n      console.log(this.state);\n      this.props.actions.import_files(this.state, samplernn.data.datasetLookup, samplernn.data.fileLookup);\n    }\n  }]);\n\n  return SampleRNNImport;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    samplernn: state.module.samplernn,\n    runner: state.system.runner,\n    task: state.task\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(samplernnActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SampleRNNImport);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _common = require('../../../common');\n\nvar _samplernn = require('../samplernn.actions');\n\nvar samplernnActions = _interopRequireWildcard(_samplernn);\n\nvar _samplernn2 = require('../samplernn.module');\n\nvar _samplernn3 = _interopRequireDefault(_samplernn2);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction SampleRNNNew(props) {\n  return (0, _preact.h)(_common.Views.New, {\n    db: props.samplernn,\n    path: '/samplernn/datasets/',\n    actions: props.actions,\n    module: _samplernn3.default,\n    history: props.history\n  });\n}\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    samplernn: state.module.samplernn\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(samplernnActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SampleRNNNew);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _samplernn = require('../samplernn.actions');\n\nvar samplernnActions = _interopRequireWildcard(_samplernn);\n\nvar _audioPlayer = require('../../../common/audioPlayer/audioPlayer.actions');\n\nvar audioPlayerActions = _interopRequireWildcard(_audioPlayer);\n\nvar _loading = require('../../../common/loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nvar _fileList = require('../../../common/fileList.component');\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SampleRNNResults = function (_Component) {\n  _inherits(SampleRNNResults, _Component);\n\n  function SampleRNNResults(props) {\n    _classCallCheck(this, SampleRNNResults);\n\n    var _this = _possibleConstructorReturn(this, (SampleRNNResults.__proto__ || Object.getPrototypeOf(SampleRNNResults)).call(this));\n\n    if (!props.samplernn.data) props.actions.load_directories();\n    return _this;\n  }\n\n  _createClass(SampleRNNResults, [{\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      if (this.props.samplernn.loading) return (0, _preact.h)(_loading2.default, { progress: this.props.samplernn.progress });\n      var _props$samplernn$data = this.props.samplernn.data,\n          folderLookup = _props$samplernn$data.folderLookup,\n          fileLookup = _props$samplernn$data.fileLookup,\n          datasetLookup = _props$samplernn$data.datasetLookup;\n      // const { folderLookup } = samplernn\n\n      var renders = Object.keys(folderLookup).sort(_util2.default.sort.stringSort.asc).map(function (key) {\n        var folder = folderLookup[key];\n\n        var _util$sort$orderByFn = _util2.default.sort.orderByFn('epoch desc'),\n            mapFn = _util$sort$orderByFn.mapFn,\n            sortFn = _util$sort$orderByFn.sortFn;\n\n        var datasetPairs = folder.datasets.map(function (name) {\n          return datasetLookup[name];\n        }).map(mapFn).sort(sortFn);\n        var bestRenders = datasetPairs.map(function (pair) {\n          return pair[1];\n        }).filter(function (dataset) {\n          return dataset.output.length;\n        }).map(function (dataset) {\n          var output = dataset.output;\n\n          return output.map(function (id) {\n            return fileLookup[id];\n          }).map(mapFn).sort(sortFn)[0][1];\n        });\n        // console.log(bestRenders.map(r => r.epoch))\n        var path = folder.name === 'unsorted' ? \"/samplernn/import/\" : \"/samplernn/datasets/\" + folder.id + \"/\";\n        return (0, _preact.h)(\n          'div',\n          { className: 'col bestRenders' },\n          (0, _preact.h)(\n            'h3',\n            null,\n            (0, _preact.h)(\n              _reactRouterDom.Link,\n              { to: path },\n              folder.name\n            )\n          ),\n          (0, _preact.h)(_fileList.FileList, {\n            linkFiles: true,\n            files: bestRenders,\n            orderBy: 'date desc',\n            fields: 'name date epoch size',\n            onClick: function onClick(file, e) {\n              e.preventDefault();\n              e.stopPropagation();\n              console.log('picked a file', file);\n              _this2.handlePick(file);\n            }\n          })\n        );\n      });\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'app samplernn' },\n        (0, _preact.h)(\n          'div',\n          { className: 'heading row middle' },\n          (0, _preact.h)(\n            'h1',\n            null,\n            'SampleRNN Results'\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { 'class': 'rows params renders' },\n          renders\n        )\n      );\n    }\n  }, {\n    key: 'handlePick',\n    value: function handlePick(file) {\n      this.props.audioPlayer.play(file);\n    }\n  }]);\n\n  return SampleRNNResults;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    samplernn: state.module.samplernn\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(samplernnActions, dispatch),\n    audioPlayer: (0, _redux.bindActionCreators)(audioPlayerActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SampleRNNResults);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _samplernn = require('../samplernn.actions');\n\nvar samplernnActions = _interopRequireWildcard(_samplernn);\n\nvar _samplernn2 = require('../samplernn.tasks');\n\nvar samplernnTasks = _interopRequireWildcard(_samplernn2);\n\nvar _audioPlayer = require('../../../common/audioPlayer/audioPlayer.actions');\n\nvar audioPlayerActions = _interopRequireWildcard(_audioPlayer);\n\nvar _common = require('../../../common');\n\nvar _dataset = require('../../../dataset/dataset.form');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nvar _upload = require('../../../dataset/upload.status');\n\nvar _upload2 = _interopRequireDefault(_upload);\n\nvar _dataset3 = require('../../../dataset/dataset.component');\n\nvar _dataset4 = _interopRequireDefault(_dataset3);\n\nvar _samplernn3 = require('../samplernn.module');\n\nvar _samplernn4 = _interopRequireDefault(_samplernn3);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SampleRNNShow = function (_Component) {\n  _inherits(SampleRNNShow, _Component);\n\n  function SampleRNNShow(props) {\n    _classCallCheck(this, SampleRNNShow);\n\n    var _this = _possibleConstructorReturn(this, (SampleRNNShow.__proto__ || Object.getPrototypeOf(SampleRNNShow)).call(this, props));\n\n    _this.datasetActions = _this.datasetActions.bind(_this);\n    return _this;\n  }\n\n  _createClass(SampleRNNShow, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      var id = this.props.match.params.id || localStorage.getItem('samplernn.last_id');\n      console.log('load dataset:', id);\n      var _props = this.props,\n          match = _props.match,\n          samplernn = _props.samplernn,\n          actions = _props.actions;\n\n      if (id === 'new') return;\n      if (id) {\n        if (parseInt(id)) localStorage.setItem('samplernn.last_id', id);\n        if (!samplernn.folder || samplernn.folder.id !== id) {\n          // console.log('looooooooooad', id)\n          actions.load_directories(id);\n        }\n      } else {\n        this.props.history.push('/samplernn/new/');\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      var _props2 = this.props,\n          samplernn = _props2.samplernn,\n          runner = _props2.runner,\n          match = _props2.match,\n          history = _props2.history;\n\n      var _ref = samplernn.data || {},\n          folderLookup = _ref.folderLookup;\n      // console.log(runner)\n\n\n      var folder = (folderLookup || {})[samplernn.folder_id] || {};\n      return (0, _preact.h)(\n        'div',\n        { className: 'app samplernn' },\n        (0, _preact.h)(\n          'div',\n          { className: 'heading' },\n          (0, _preact.h)(\n            'h1',\n            null,\n            folder ? folder.name : (0, _preact.h)(_common.Loading, null)\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { className: 'row' },\n          folder && folder.name && folder.name !== 'unsorted' && (0, _preact.h)(_dataset2.default, {\n            title: 'Add Files',\n            module: _samplernn4.default,\n            folder: folder,\n            canUpload: true, canAddURL: true\n          }),\n          (0, _preact.h)(\n            'div',\n            null,\n            (0, _preact.h)(_upload2.default, null),\n            (0, _preact.h)(_common.CurrentTask, { processor: 'gpu' })\n          )\n        ),\n        (0, _preact.h)(_dataset4.default, {\n          loading: samplernn.loading,\n          progress: samplernn.progress,\n          id: samplernn.folder_id,\n          module: _samplernn4.default,\n          data: samplernn.data,\n          folder: folder,\n          history: history,\n          onPickFile: function onPickFile(file, e) {\n            e.preventDefault();\n            e.stopPropagation();\n            // console.log('picked a file', file)\n            _this2.handlePick(file);\n          },\n          datasetActions: this.datasetActions\n        })\n      );\n    }\n  }, {\n    key: 'datasetActions',\n    value: function datasetActions(dataset) {\n      var isFetching = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      var isProcessing = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n      var _props3 = this.props,\n          samplernn = _props3.samplernn,\n          remote = _props3.remote;\n\n      var input = samplernn.data.fileLookup[dataset.input[0]];\n      if (!input) return null;\n      if (input.name && input.name.match(/(gif|jpe?g|png)$/i)) return null;\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)(\n          'div',\n          { 'class': 'actions' },\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, samplernn.folder_id, 1);\n              } },\n            'train'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, samplernn.folder_id, 2);\n              } },\n            '2x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, samplernn.folder_id, 4);\n              } },\n            '4x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, samplernn.folder_id, 6);\n              } },\n            '6x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, samplernn.folder_id, 18);\n              } },\n            '18x'\n          )\n        ),\n        dataset.isBuilt ? (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          'fetched ',\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.clear_cache_task(dataset);\n              } },\n            'x'\n          )\n        ) : isFetching ? (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          'fetching'\n        ) : (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.fetch_task(input.url, samplernn.folder_id, input.id, dataset.name);\n              } },\n            'fetch'\n          )\n        )\n      );\n    }\n  }, {\n    key: 'handlePick',\n    value: function handlePick(file) {\n      // console.log(file)\n      this.props.audioPlayer.play(file);\n    }\n  }]);\n\n  return SampleRNNShow;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    samplernn: state.module.samplernn,\n    runner: state.system.runner\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(samplernnActions, dispatch),\n    remote: (0, _redux.bindActionCreators)(samplernnTasks, dispatch),\n    audioPlayer: (0, _redux.bindActionCreators)(audioPlayerActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SampleRNNShow);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.stop_queue = exports.start_queue = exports.add_task = exports.stop_task = exports.start_task = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _socket = require('../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _actions = require('../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar start_task = exports.start_task = function start_task(task) {\n  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n  _socket2.default.task.start_task(task, opt);\n  return _extends({ type: _types2.default.task.starting_task, task: task }, opt);\n};\n\nvar stop_task = exports.stop_task = function stop_task(task) {\n  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n  _socket2.default.task.stop_task(task, opt);\n  return _extends({ type: _types2.default.task.stopping_task, task: task }, opt);\n};\n\nvar add_task = exports.add_task = function add_task(new_task) {\n  return function (dispatch) {\n    _actions2.default.task.create(new_task).then(function (task) {\n      _socket2.default.task.add_task(task);\n    });\n  };\n};\n\nvar start_queue = exports.start_queue = function start_queue(task) {\n  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n  _socket2.default.task.start_queue(task, opt);\n  return _extends({ type: _types2.default.task.starting_queue, task: task }, opt);\n};\n\nvar stop_queue = exports.stop_queue = function stop_queue(task) {\n  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n  _socket2.default.task.stop_queue(task, opt);\n  return _extends({ type: _types2.default.task.stopping_queue, task: task }, opt);\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _util = require('../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _moment = require('moment/min/moment.min');\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar queueInitialState = {\n  loading: false,\n  error: null,\n  tasks: {},\n  queue: [],\n  completed: []\n};\n\nvar dateSort = _util2.default.sort.orderByFn('updated_at desc');\nvar prioritySort = _util2.default.sort.orderByFn('priority asc');\n\nvar queueReducer = function queueReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : queueInitialState;\n  var action = arguments[1];\n\n  switch (action.type) {\n    case _types2.default.task.index:\n      return _extends({}, state, {\n        tasks: action.data.reduce(function (a, b) {\n          return a[b.id] = b, a;\n        }, {}),\n        queue: action.data.filter(function (a) {\n          return !a.completed;\n        }).map(dateSort.mapFn).sort(dateSort.sortFn).map(function (pair) {\n          return pair[1].id;\n        }),\n        completed: action.data.filter(function (a) {\n          return a.completed;\n        }).map(prioritySort.mapFn).sort(prioritySort.sortFn).map(function (pair) {\n          return pair[1].id;\n        })\n      });\n    case _types2.default.task.create:\n      console.log(action.data);\n      return _extends({}, state, {\n        tasks: _extends({}, state.tasks, _defineProperty({}, action.data.id, action.data)),\n        queue: state.queue.concat([action.data.id])\n      });\n    case _types2.default.task.update:\n      return _extends({}, state, {\n        tasks: _extends({}, state.tasks, _defineProperty({}, action.data.id, action.data))\n      });\n    case _types2.default.task.destroy:\n      var _state$tasks = state.tasks,\n          deletedTask = _state$tasks[action.data.id],\n          taskLookup = _objectWithoutProperties(_state$tasks, [action.data.id]);\n\n      return _extends({}, state, {\n        queue: state.queue.filter(function (id) {\n          return id !== deletedTask.id;\n        }),\n        completed: state.completed.filter(function (id) {\n          return id !== deletedTask.id;\n        }),\n        tasks: taskLookup\n      });\n    case _types2.default.task.task_finish:\n      return _extends({}, state, {\n        queue: state.queue.filter(function (a) {\n          return a !== action.task.id;\n        }),\n        completed: [action.task.id].concat(state.completed)\n      });\n    default:\n      return state;\n  }\n};\n\nexports.default = queueReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _store = require('../store');\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _socket = require('./socket.connection');\n\nvar _socket2 = require('./socket.actions');\n\nvar actions = _interopRequireWildcard(_socket2);\n\nvar _socket3 = require('./socket.system');\n\nvar system = _interopRequireWildcard(_socket3);\n\nvar _socket4 = require('./socket.live');\n\nvar live = _interopRequireWildcard(_socket4);\n\nvar _socket5 = require('./socket.task');\n\nvar task = _interopRequireWildcard(_socket5);\n\nvar _socket6 = require('./socket.api');\n\nvar api = _interopRequireWildcard(_socket6);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = {\n  socket: _socket.socket,\n  actions: actions,\n  system: system,\n  live: live,\n  task: task,\n  api: api\n};\n\n\n_socket.socket.on('status', function (data) {\n  console.log('got status', data.key, data.value);\n  _store.store.dispatch(_extends({ type: _types2.default.socket.status }, data));\n  switch (data.key) {\n    case 'processing':\n      _store.store.dispatch(_extends({\n        type: 'SET_PARAM'\n      }, data));\n      break;\n    default:\n      break;\n  }\n});","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.syscall_async = exports.upload_file = exports.run_script = exports.list_sequences = exports.count_directory = exports.list_directory = exports.disk_usage = exports.run_system_command = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('./socket.connection');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar run_system_command = exports.run_system_command = function run_system_command(opt) {\n  return syscall_async('run_system_command', opt);\n};\nvar disk_usage = exports.disk_usage = function disk_usage(opt) {\n  return syscall_async('run_system_command', _extends({ cmd: 'du' }, opt));\n};\nvar list_directory = exports.list_directory = function list_directory(opt) {\n  return syscall_async('list_directory', opt).then(function (res) {\n    return res.files;\n  });\n};\nvar count_directory = exports.count_directory = function count_directory(opt) {\n  return syscall_async('count_directory', opt).then(function (res) {\n    return res.count;\n  });\n};\nvar list_sequences = exports.list_sequences = function list_sequences(opt) {\n  return syscall_async('list_sequences', opt).then(function (res) {\n    return res.sequences;\n  });\n};\nvar run_script = exports.run_script = function run_script(opt) {\n  return syscall_async('run_script', opt);\n};\nvar upload_file = exports.upload_file = function upload_file(opt) {\n  return syscall_async('upload_file', opt);\n};\n\nvar syscall_async = exports.syscall_async = function syscall_async(tag, payload) {\n  var ttl = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10000;\n\n  ttl = payload.ttl || ttl;\n  return new Promise(function (resolve, reject) {\n    var uuid = (0, _v2.default)();\n    var timeout = setTimeout(function () {\n      _socket.socket.off('system_res', cb);\n      reject('timeout');\n    }, ttl);\n    var cb = function cb(data) {\n      if (!data.uuid) return;\n      if (data.uuid === uuid) {\n        clearTimeout(timeout);\n        _socket.socket.off('system_res', cb);\n        resolve(data);\n      }\n    };\n    _socket.socket.emit('system', { cmd: tag, payload: payload, uuid: uuid });\n    _socket.socket.on('system_res', cb);\n  });\n};","'use strict';\n\nvar _store = require('../store');\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _socket = require('./socket.connection');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n_socket.socket.on('api_res', function (data) {\n  // console.log('system response', data)\n  data = parse(data);\n  var type = _types2.default[data.datatype];\n  console.log('api_res', data.type, data.datatype);\n  if (!type) return console.error('socket:api_res bad datatype', data.datatype);\n  switch (data.type) {\n    case 'create':\n      return (0, _store.dispatch)({\n        type: type.create,\n        source: 'socket',\n        data: data.data\n      });\n    case 'update':\n      return (0, _store.dispatch)({\n        type: type.update,\n        source: 'socket',\n        data: data.data\n      });\n    case 'destroy':\n      return (0, _store.dispatch)({\n        type: type.destroy,\n        source: 'socket',\n        data: data.data\n      });\n    default:\n      break;\n  }\n});\n\nfunction parse(s) {\n  if (typeof s === 'string') {\n    try {\n      var d = JSON.parse(s);\n      return d;\n    } catch (e) {\n      console.error('not valid json');\n      return s;\n    }\n  }\n  return s;\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.socket = undefined;\n\nvar _store = require('../store');\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar socket = exports.socket = io.connect('/client');\n\n// SOCKET ACTIONS\n\nsocket.on('connect', function () {\n  return _store.store.dispatch({ type: _types2.default.socket.connect });\n});\nsocket.on('connect_error', function (error) {\n  return _store.store.dispatch({ type: _types2.default.socket.connect_error, error: error });\n});\nsocket.on('reconnect', function (attempt) {\n  return _store.store.dispatch({ type: _types2.default.socket.reconnect, attempt: attempt });\n});\nsocket.on('reconnecting', function () {\n  return _store.store.dispatch({ type: _types2.default.socket.reconnecting });\n});\nsocket.on('reconnect_error', function (error) {\n  return _store.store.dispatch({ type: _types2.default.socket.reconnect_error, error: error });\n});\nsocket.on('reconnect_failed', function (error) {\n  return _store.store.dispatch({ type: _types2.default.socket.reconnect_failed, error: error });\n});\nsocket.on('disconnect', function () {\n  return _store.store.dispatch({ type: _types2.default.socket.disconnect });\n});\nsocket.on('error', function (error) {\n  return _store.store.dispatch({ type: _types2.default.socket.error, error: error });\n});","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.list_checkpoints = list_checkpoints;\nexports.list_all_checkpoints = list_all_checkpoints;\nexports.list_epochs = list_epochs;\nexports.list_sequences = list_sequences;\nexports.load_epoch = load_epoch;\nexports.load_sequence = load_sequence;\nexports.seek = seek;\nexports.pause = pause;\nexports.play = play;\nexports.get_params = get_params;\nexports.set_param = set_param;\n\nvar _store = require('../store');\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _player = require('../live/player');\n\nvar player = _interopRequireWildcard(_player);\n\nvar _socket = require('./socket.connection');\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n_socket.socket.on('res', function (data) {\n  // console.log('socket:', data.cmd)\n  switch (data.cmd) {\n    case 'get_last_frame':\n      if (data.res !== 'working') {\n        _socket.socket.emit('cmd', {\n          cmd: 'get_last_frame'\n        });\n      }\n      break;\n    case 'get_params':\n      data.res && (0, _store.dispatch)({\n        type: _types2.default.socket.load_params,\n        opt: data.res\n      });\n      data.res && player.toggleFPS(data.res.processing);\n      break;\n    case 'list_checkpoints':\n      (0, _store.dispatch)({\n        type: _types2.default.socket.list_checkpoints,\n        checkpoints: data.res\n      });\n      break;\n    case 'list_all_checkpoints':\n      (0, _store.dispatch)({\n        type: _types2.default.socket.list_all_checkpoints,\n        checkpoints: data.res\n      });\n      break;\n    case 'list_epochs':\n      (0, _store.dispatch)({\n        type: _types2.default.socket.list_epochs,\n        epochs: data.res\n      });\n      break;\n    case 'list_sequences':\n      (0, _store.dispatch)({\n        type: _types2.default.socket.list_sequences,\n        sequences: data.res\n      });\n      break;\n    default:\n      break;\n  }\n  // console.log(data)\n});\n\n_socket.socket.on('frame', player.onFrame);\n\nfunction list_checkpoints(module) {\n  _socket.socket.emit('cmd', {\n    cmd: 'list_checkpoints',\n    payload: module\n  });\n}\nfunction list_all_checkpoints(module) {\n  _socket.socket.emit('cmd', {\n    cmd: 'list_all_checkpoints',\n    payload: module\n  });\n}\nfunction list_epochs(module, checkpoint_name) {\n  _socket.socket.emit('cmd', {\n    cmd: 'list_epochs',\n    payload: module === 'pix2pix' || module === 'pix2wav' ? module + '/' + checkpoint_name : checkpoint_name\n  });\n}\nfunction list_sequences(module) {\n  _socket.socket.emit('cmd', {\n    cmd: 'list_sequences',\n    payload: module\n  });\n}\nfunction load_epoch(checkpoint_name, epoch) {\n  console.log(\">> SWITCH CHECKPOINT\", checkpoint_name, epoch);\n  _socket.socket.emit('cmd', {\n    cmd: 'load_epoch',\n    payload: checkpoint_name + ':' + epoch\n  });\n}\nfunction load_sequence(sequence) {\n  _socket.socket.emit('cmd', {\n    cmd: 'load_sequence',\n    payload: sequence\n  });\n}\nfunction seek(frame) {\n  _socket.socket.emit('cmd', {\n    cmd: 'seek',\n    payload: frame\n  });\n}\nfunction pause(frame) {\n  _socket.socket.emit('cmd', {\n    cmd: 'pause'\n  });\n}\nfunction play(frame) {\n  _socket.socket.emit('cmd', {\n    cmd: 'play'\n  });\n}\nfunction get_params() {\n  _socket.socket.emit('cmd', {\n    cmd: 'get_params'\n  });\n}\nfunction set_param(key, value) {\n  _socket.socket.emit('cmd', {\n    cmd: 'set_param',\n    payload: {\n      'key': key,\n      'value': value\n    }\n  });\n}","'use strict';\n\nvar _store = require('../store');\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _socket = require('./socket.connection');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n_socket.socket.on('system_res', function (data) {\n  // console.log('system response', data)\n  switch (data.type) {\n    case 'relay_connected':\n      return (0, _store.dispatch)({\n        type: _types2.default.system.relay_connected\n      });\n    case 'relay_disconnected':\n      return (0, _store.dispatch)({\n        type: _types2.default.system.relay_disconnected\n      });\n    case 'rpc_connected':\n      return (0, _store.dispatch)({\n        type: _types2.default.system.rpc_connected,\n        runner: data.runner\n      });\n    case 'rpc_disconnected':\n      return (0, _store.dispatch)({\n        type: _types2.default.system.rpc_disconnected\n      });\n    case 'relay_status':\n      return (0, _store.dispatch)({\n        type: data.rpc_connected ? _types2.default.system.rpc_connected : _types2.default.system.rpc_disconnected,\n        runner: data.runner\n      });\n    case 'site':\n      return (0, _store.dispatch)({\n        type: _types2.default.system.load_site,\n        site: data.site\n      });\n    default:\n      break;\n  }\n});","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.stop_queue = exports.start_queue = exports.stop_task = exports.start_task = exports.remove_task = exports.add_task = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nexports.emit = emit;\n\nvar _store = require('../store');\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _socket = require('./socket.connection');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar finishTimeout = void 0;\n\n_socket.socket.on('task_res', function (raw_data) {\n  // does not like the nested task object for some reason..\n  var data = void 0;\n  try {\n    if (typeof raw_data === 'string') {\n      data = JSON.parse(raw_data);\n      if (typeof data === 'string') {\n        data = JSON.parse(data);\n      }\n    } else {\n      data = raw_data;\n    }\n  } catch (e) {\n    console.warn('problem with json', e);\n    return;\n  }\n  if (data.task) {\n    (0, _store.dispatch)({ type: _types2.default.task.update, data: data.task });\n  }\n  // console.log('task', data.type)\n  switch (data.type) {\n    case 'start':\n      // return dispatch({ type: types.system.rpc_connected, runner: data.runner })\n      break;\n    case 'stop':\n      break;\n    // begin and finish calls often arrive out of order, if the old task was preempted\n    case 'task_begin':\n      (0, _store.dispatch)({ type: _types2.default.task.task_begin, task: data.task });\n      break;\n    case 'task_finish':\n      (0, _store.dispatch)({ type: _types2.default.task.task_finish, task: data.task });\n      break;\n    case 'kill':\n      break;\n    case 'stdout':\n      return (0, _store.dispatch)({ type: _types2.default.system.stdout, data: data });\n      break;\n    case 'stderr':\n      return (0, _store.dispatch)({ type: _types2.default.system.stderr, data: data });\n      break;\n    case 'add':\n      break;\n    case 'remove':\n      break;\n    case 'start_queue':\n      break;\n    case 'stop_queue':\n      break;\n    case 'list':\n      break;\n    case 'set_priority':\n      break;\n    case 'progress':\n      (0, _store.dispatch)({ type: _types2.default.task.progress, task: data.task });\n      break;\n    case 'epoch':\n      (0, _store.dispatch)({ type: _types2.default.task.epoch, task: data.task });\n      break;\n    case 'task_error':\n      return console.log('task error', data);\n    default:\n      console.log(data);\n      return console.log('no such task command', data.type);\n  }\n});\n\nfunction emit(type) {\n  var task = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  var opt = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n  _socket.socket.emit('task', _extends({ type: type, task: task }, opt));\n}\n\nvar add_task = exports.add_task = function add_task(task) {\n  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  return emit('add', task, opt);\n};\nvar remove_task = exports.remove_task = function remove_task(task) {\n  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  return emit('remove', task, opt);\n};\nvar start_task = exports.start_task = function start_task(task) {\n  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  return emit('start', task, opt);\n};\nvar stop_task = exports.stop_task = function stop_task(task) {\n  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  return emit('stop', task, opt);\n};\nvar start_queue = exports.start_queue = function start_queue() {\n  var opt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  return emit('start_queue', {}, opt);\n};\nvar stop_queue = exports.stop_queue = function stop_queue() {\n  var opt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  return emit('stop_queue', {}, opt);\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.dispatch = exports.store = exports.history = undefined;\n\nvar _redux = require('redux');\n\nvar _reactRouterRedux = require('react-router-redux');\n\nvar _reduxThunk = require('redux-thunk');\n\nvar _reduxThunk2 = _interopRequireDefault(_reduxThunk);\n\nvar _createBrowserHistory = require('history/createBrowserHistory');\n\nvar _createBrowserHistory2 = _interopRequireDefault(_createBrowserHistory);\n\nvar _auth = require('./auth/auth.reducer');\n\nvar _auth2 = _interopRequireDefault(_auth);\n\nvar _live = require('./live/live.reducer');\n\nvar _live2 = _interopRequireDefault(_live);\n\nvar _queue = require('./queue/queue.reducer');\n\nvar _queue2 = _interopRequireDefault(_queue);\n\nvar _system = require('./system/system.reducer');\n\nvar _system2 = _interopRequireDefault(_system);\n\nvar _upload = require('./dataset/upload.reducer');\n\nvar _upload2 = _interopRequireDefault(_upload);\n\nvar _browser = require('./browser/browser.reducer');\n\nvar _browser2 = _interopRequireDefault(_browser);\n\nvar _dashboard = require('./dashboard/dashboard.reducer');\n\nvar _dashboard2 = _interopRequireDefault(_dashboard);\n\nvar _audioPlayer = require('./common/audioPlayer/audioPlayer.reducer');\n\nvar _audioPlayer2 = _interopRequireDefault(_audioPlayer);\n\nvar _module = require('./modules/module.reducer');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar appReducer = (0, _redux.combineReducers)({\n  router: _reactRouterRedux.routerReducer,\n  auth: _auth2.default,\n  live: _live2.default,\n  queue: _queue2.default,\n  system: _system2.default,\n  upload: _upload2.default,\n  browser: _browser2.default,\n  dashboard: _dashboard2.default,\n  audioPlayer: _audioPlayer2.default,\n  module: _module.moduleReducer\n});\n\n// import navReducer from './nav.reducer'\nvar history = exports.history = (0, _createBrowserHistory2.default)();\nvar store = exports.store = (0, _redux.createStore)(appReducer, (0, _redux.compose)((0, _redux.applyMiddleware)(\n// createLogger(),\n_reduxThunk2.default, (0, _reactRouterRedux.routerMiddleware)(history))));\n\nvar dispatch = exports.dispatch = store.dispatch;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.enqueue_test_task = exports.changeTool = exports.countDirectory = exports.listDirectory = exports.run = undefined;\n\nvar _socket = require('../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// import actions from '../actions'\n\nvar run = exports.run = function run(cmd) {\n  return function (dispatch) {\n    dispatch({ type: _types2.default.system.running_command, cmd: cmd });\n    _socket2.default.actions.run_system_command({ cmd: cmd }).then(function (data) {\n      dispatch({\n        type: _types2.default.system.command_output,\n        data: data\n      });\n    });\n  };\n};\n\nvar listDirectory = exports.listDirectory = function listDirectory(opt) {\n  return function (dispatch) {\n    dispatch({ type: _types2.default.system.listing_directory, opt: opt });\n    _socket2.default.actions.list_directory(opt).then(function (data) {\n      dispatch({\n        type: _types2.default.system.list_directory,\n        data: data\n      });\n    });\n  };\n};\n\nvar countDirectory = exports.countDirectory = function countDirectory(opt) {\n  return function (dispatch) {\n    dispatch({ type: _types2.default.system.counting_directory, opt: opt });\n    _socket2.default.actions.count_directory(opt).then(function (data) {\n      dispatch({\n        type: _types2.default.system.count_directory,\n        data: data\n      });\n    });\n  };\n};\n\nvar changeTool = exports.changeTool = function changeTool(tool) {\n  localStorage.setItem('system.last_tool', tool);\n  return { type: _types2.default.app.change_tool, tool: tool };\n};\n\nvar enqueue_test_task = exports.enqueue_test_task = function enqueue_test_task(dataset) {\n  return function (dispatch) {\n    var task = {\n      module: 'test',\n      activity: 'cpu',\n      dataset: dataset\n      // return actions.queue.add_task(task)\n    };\n  };\n};\n\nwindow.addEventListener('keyDown', function (e) {\n  if (e.altKey) {\n    switch (e.keyCode) {\n      case 192:\n        // tilde - switch tool\n        break;\n      case 49:\n        // 1\n        break;\n      case 50:\n        // 2\n        break;\n      case 51:\n        // 3\n        break;\n      case 52:\n        // 4\n        break;\n      case 53:\n        // 5\n        break;\n      case 54:\n        // 6\n        break;\n      case 55:\n        // 7\n        break;\n      case 56:\n        // 8\n        break;\n      case 57:\n        // 9\n        break;\n      case 48:\n        // 0\n        break;\n    }\n  }\n});","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _group = require('../common/group.component');\n\nvar _group2 = _interopRequireDefault(_group);\n\nvar _param = require('../common/param.component');\n\nvar _param2 = _interopRequireDefault(_param);\n\nvar _system = require('./system.actions');\n\nvar systemActions = _interopRequireWildcard(_system);\n\nvar _live = require('../live/live.actions');\n\nvar liveActions = _interopRequireWildcard(_live);\n\nvar _queue = require('../queue/queue.actions');\n\nvar queueActions = _interopRequireWildcard(_queue);\n\nvar _auth = require('../auth/auth.actions');\n\nvar authActions = _interopRequireWildcard(_auth);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar cpu_test_task = {\n  activity: 'cpu',\n  module: 'test',\n  dataset: 'test',\n  epochs: 1,\n  opt: {}\n};\nvar gpu_test_task = {\n  activity: 'gpu',\n  module: 'test',\n  dataset: 'test',\n  epochs: 1,\n  opt: {}\n};\nvar live_test_task = {\n  activity: 'live',\n  module: 'test',\n  dataset: 'test',\n  epochs: 1,\n  opt: {}\n};\nvar wait_test_task = {\n  activity: 'wait',\n  module: 'test',\n  dataset: 'test',\n  epochs: 1,\n  opt: {}\n};\nvar fruits = [\"apple\", \"pear\", \"orange\", \"strawberry\"];\nfunction choice(a) {\n  return a[Math.floor(Math.random() * a.length)];\n}\n\nvar System = function (_Component) {\n  _inherits(System, _Component);\n\n  function System(props) {\n    _classCallCheck(this, System);\n\n    return _possibleConstructorReturn(this, (System.__proto__ || Object.getPrototypeOf(System)).call(this));\n  }\n\n  _createClass(System, [{\n    key: 'componentDidUpdate',\n    value: function componentDidUpdate() {\n      if (this._screen.scrollHeight > this._screen.scrollTop - this._screen.offsetHeight + 100) {\n        this._screen.scrollTop = this._screen.scrollHeight;\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props = this.props,\n          site = _props.site,\n          server = _props.server,\n          relay = _props.relay,\n          runner = _props.runner,\n          rpc = _props.rpc,\n          actions = _props.actions,\n          user = _props.user;\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'app system' },\n        (0, _preact.h)(\n          'div',\n          { className: 'heading' },\n          (0, _preact.h)(\n            'h1',\n            null,\n            site.name,\n            ' system'\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { className: 'row params' },\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _group2.default,\n              { title: 'Status' },\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Server' },\n                server.status\n              ),\n              server.error && (0, _preact.h)(\n                _param2.default,\n                { title: 'Server error' },\n                server.error.message\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Relay' },\n                relay.status\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'RPC' },\n                rpc.status\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'CPU' },\n                this.renderStatus(runner.cpu)\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'GPU' },\n                this.renderStatus(runner.gpu)\n              )\n            ),\n            (0, _preact.h)(\n              _group2.default,\n              { title: 'Diagnostics' },\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Check GPU' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.system.run('nvidia-smi');\n                    } },\n                  'nvidia-smi'\n                )\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'List processes' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.system.run('ps');\n                    } },\n                  'ps'\n                )\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'List users' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.system.run('w');\n                    } },\n                  'w'\n                )\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Disk free space' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.system.run('df');\n                    } },\n                  'df'\n                )\n              )\n            ),\n            (0, _preact.h)(\n              _group2.default,\n              { title: 'Tasks' },\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Kill task' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.stop_task('cpu');\n                    } },\n                  'CPU'\n                ),\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.stop_task('gpu');\n                    } },\n                  'GPU'\n                )\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Queue' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.start_queue();\n                    } },\n                  'Start'\n                ),\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.stop_queue();\n                    } },\n                  'Stop'\n                )\n              )\n            ),\n            (0, _preact.h)(\n              _group2.default,\n              { title: 'Auth' },\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Logged in as ' + user.username },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.auth.logout();\n                    } },\n                  'Logout'\n                )\n              )\n            ),\n            (0, _preact.h)(\n              _group2.default,\n              { title: 'Test' },\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'CPU Test Task' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.start_task(cpu_test_task, { preempt: true, watch: true });\n                    } },\n                  'Start'\n                ),\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.stop_task(runner.cpu.task);\n                    } },\n                  'Stop'\n                )\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'GPU Test Task' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.start_task(gpu_test_task, { preempt: true, watch: true });\n                    } },\n                  'Start'\n                ),\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.stop_task(runner.gpu.task);\n                    } },\n                  'Stop'\n                )\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Live Test Task' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.start_task(live_test_task, { preempt: true, watch: true });\n                    } },\n                  'Start'\n                ),\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.stop_task(runner.cpu.task);\n                    } },\n                  'Stop'\n                )\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Test Live RPC' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.live.get_params();\n                    } },\n                  'Get'\n                ),\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.live.set_param('fruit', choice(fruits));\n                    } },\n                  'Set'\n                )\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Queue Tests' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.system.enqueue_test_task(choice(fruits));\n                    } },\n                  '+Add test task'\n                )\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: '' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.start_task(wait_test_task, { preempt: true, watch: true });\n                    } },\n                  'Wait and Buzz'\n                )\n              )\n            )\n          ),\n          this.renderCommandOutput()\n        )\n      );\n    }\n  }, {\n    key: 'renderStatus',\n    value: function renderStatus(processor) {\n      if (!processor) {\n        return 'unknown';\n      }\n      if (processor.status === 'IDLE') {\n        return 'idle';\n      }\n      var task = processor.task;\n      return task.activity + ' ' + task.module;\n    }\n  }, {\n    key: 'renderCommandOutput',\n    value: function renderCommandOutput() {\n      var _this2 = this;\n\n      var _props2 = this.props,\n          cmd = _props2.cmd,\n          stdout = _props2.stdout,\n          stderr = _props2.stderr;\n\n      var output = void 0;\n      if (cmd.loading) {\n        output = 'Loading: ' + cmd.name;\n      } else if (cmd.loaded) {\n        if (cmd.error) {\n          output = 'Error: ' + cmd.name + '\\n\\n' + JSON.stringify(cmd.error, null, 2);\n        } else {\n          output = cmd.stdout;\n          if (cmd.stderr) {\n            output += '\\n\\n_________________________________\\n\\n';\n            output += cmd.stderr;\n          }\n        }\n      } else {\n        output = stdout;\n        if (stderr.length) {\n          output += '\\n\\n_________________________________\\n\\n';\n          output += stderr;\n        }\n      }\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)(\n          'div',\n          { ref: function ref(_ref) {\n              return _this2._screen = _ref;\n            }, className: 'screen' },\n          output\n        )\n      );\n    }\n  }]);\n\n  return System;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return _extends({\n    user: state.auth.user\n  }, state.system, state.live);\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: {\n      auth: (0, _redux.bindActionCreators)(authActions, dispatch),\n      system: (0, _redux.bindActionCreators)(systemActions, dispatch),\n      queue: (0, _redux.bindActionCreators)(queueActions, dispatch),\n      live: (0, _redux.bindActionCreators)(liveActions, dispatch)\n    }\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(System);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _moment = require('moment/min/moment.min');\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar FileSaver = require('file-saver');\n\nvar systemInitialState = {\n  loading: false,\n  error: null,\n\n  site: {\n    name: 'loading'\n  },\n  app: {\n    tool: localStorage.getItem('system.last_tool') || 'pix2pix'\n  },\n  server: {\n    connected: false,\n    status: \"disconnected\",\n    error: null\n  },\n  relay: {\n    connected: false,\n    status: \"unknown\",\n    error: null\n  },\n  rpc: {\n    connected: false,\n    status: \"disconnected\",\n    error: null\n  },\n  cmd: {\n    loading: false,\n    loaded: false,\n    name: null,\n    error: null,\n    stdout: \"\",\n    stderr: \"\"\n  },\n  runner: {\n    cpu: { status: 'IDLE', task: {} },\n    gpu: { status: 'IDLE', task: {} }\n  },\n  stdout: \"\",\n  stderr: \"\"\n};\n\nvar modules = ['pix2pix', 'samplernn', 'pix2wav'].reduce(function (a, b) {\n  return a[b] = b, a;\n}, {});\n\nvar systemReducer = function systemReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : systemInitialState;\n  var action = arguments[1];\n\n  // console.log(action.type)\n  var processor = null;\n  switch (action.type) {\n    case _types2.default.socket.connect:\n    case _types2.default.socket.reconnecting:\n      return _extends({}, state, {\n        server: {\n          status: 'connected',\n          connected: true,\n          error: null\n        }\n      });\n    case _types2.default.socket.reconnect:\n      return _extends({}, state, {\n        server: {\n          status: 'reconnecting (attempt ' + action.attempt + ')',\n          connected: false,\n          error: null\n        }\n      });\n    case _types2.default.socket.connect_error:\n    case _types2.default.socket.reconnect_error:\n    case _types2.default.socket.disconnect:\n    case _types2.default.socket.reconnect_failed:\n      return _extends({}, state, {\n        server: {\n          status: 'disconnected',\n          connected: false,\n          error: action.error || null\n        }\n      });\n    case _types2.default.socket.error:\n      return _extends({}, state, {\n        server: _extends({}, state.socket, {\n          error: action.error\n        })\n      });\n    case _types2.default.system.relay_connected:\n      return _extends({}, state, {\n        relay: {\n          status: 'connected',\n          connected: true,\n          error: null\n        }\n      });\n    case _types2.default.system.relay_disconnected:\n      return _extends({}, state, {\n        relay: {\n          status: 'disconnected',\n          connected: false,\n          error: null\n        },\n        rpc: {\n          status: 'disconnected',\n          connected: false,\n          error: null\n        }\n      });\n    case _types2.default.system.rpc_connected:\n      return _extends({}, state, {\n        rpc: {\n          status: 'connected',\n          connected: true,\n          error: null\n        },\n        runner: action.runner\n      });\n    case _types2.default.system.rpc_disconnected:\n      return _extends({}, state, {\n        rpc: {\n          status: 'disconnected',\n          connected: false,\n          error: null\n        },\n        runner: action.runner || state.runner\n      });\n    case _types2.default.system.load_site:\n      document.querySelector('title').innerHTML = action.site.name + '.cortex';\n      var tool = state.app.tool;\n      var path = window.location.pathname.split('/')[1];\n      if (path in modules) {\n        tool = path;\n      }\n      return _extends({}, state, {\n        site: action.site,\n        app: _extends({}, state.app, {\n          tool: tool\n        })\n      });\n    case _types2.default.system.running_command:\n      return _extends({}, state, {\n        cmd: {\n          loading: true,\n          loaded: false,\n          name: action.cmd,\n          error: null,\n          stdout: null,\n          stderr: null\n        }\n      });\n    case _types2.default.system.command_output:\n      return _extends({}, state, {\n        cmd: {\n          loading: false,\n          loaded: true,\n          name: action.data.cmd,\n          error: action.data.error,\n          stdout: action.data.stdout,\n          stderr: action.data.stderr\n        }\n      });\n    case _types2.default.task.task_begin:\n      console.log('task begin', action.task, action.task.processor);\n      return _extends({}, state, {\n        runner: _extends({}, state.runner, _defineProperty({}, action.task.processor, { status: 'RUNNING', task: action.task })),\n        cmd: _extends({}, state.cmd, {\n          loaded: false,\n          stdout: \"\",\n          stderr: \"\"\n        }),\n        stdout: \"\",\n        stderr: \"\"\n      });\n    case _types2.default.task.task_finish:\n      if (action.task.processor === 'cpu' || state.runner.cpu.task && state.runner.cpu.task.uuid === action.task.uuid) {\n        processor = 'cpu';\n      } else if (action.task.processor === 'gpu' || state.runner.gpu.task && state.runner.gpu.task.uuid === action.task.uuid) {\n        processor = 'gpu';\n      } else {\n        processor = null;\n      }\n      console.log('task finish', action);\n      return _extends({}, state, {\n        rpc: {\n          connected: false,\n          status: \"disconnected\",\n          error: null\n        },\n        runner: processor ? _extends({}, state.runner, _defineProperty({}, processor, { status: 'IDLE', task: {} })) : state.runner\n      });\n    case _types2.default.app.change_tool:\n      return _extends({}, state, {\n        app: _extends({}, state.app, {\n          tool: action.tool\n        })\n      });\n    case _types2.default.system.stdout:\n      if (action.data.processor && state.runner[action.data.processor]) {\n        return _extends({}, state, {\n          runner: _extends({}, state.runner, _defineProperty({}, action.data.processor, _extends({}, state.runner[action.data.processor], {\n            last_message: action.data.data\n          }))),\n          stdout: state.stdout + action.data.data\n        });\n      }\n      return _extends({}, state, {\n        stdout: state.stdout + action.data.data\n      });\n    case _types2.default.system.stderr:\n      return _extends({}, state, {\n        last_message: action.data.data,\n        stderr: state.stderr + action.data.data\n      });\n    default:\n      return state;\n  }\n};\n\nexports.default = systemReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _crud = require('./api/crud.types');\n\nexports.default = {\n\tsystem: {\n\t\tload_site: 'SYSTEM_LOAD_SITE',\n\t\trunning_command: 'SYSTEM_RUNNING_COMMAND',\n\t\tcommand_output: 'SYSTEM_COMMAND_OUTPUT',\n\t\trelay_connected: 'SYSTEM_RELAY_CONNECTED',\n\t\trelay_disconnected: 'SYSTEM_RELAY_DISCONNECTED',\n\t\trpc_connected: 'SYSTEM_RPC_CONNECTED',\n\t\trpc_disconnected: 'SYSTEM_RPC_DISCONNECTED',\n\t\tlist_directory: 'SYSTEM_LIST_DIRECTORY',\n\t\tlisting_directory: 'SYSTEM_LISTING_DIRECTORY',\n\t\tcount_directory: 'SYSTEM_COUNT_DIRECTORY',\n\t\tcounting_directory: 'SYSTEM_COUNTING_DIRECTORY',\n\t\tstdout: 'SYSTEM_STDOUT',\n\t\tstderr: 'SYSTEM_STDERR'\n\t},\n\tapp: {\n\t\tchange_tool: \"APP_CHANGE_TOOL\",\n\t\tload_progress: \"APP_LOAD_PROGRESS\"\n\t},\n\tfolder: (0, _crud.crud_type)('folder', []),\n\tfile: (0, _crud.crud_type)('file', []),\n\ttask: (0, _crud.crud_type)('task', ['starting_task', 'stopping_task', 'task_begin', 'task_finish', 'start_queue', 'stop_queue', 'starting_queue', 'stopping_queue', 'progress', 'epoch']),\n\tauth: (0, _crud.crud_type)('auth', ['set_token', 'set_error', 'set_current_user', 'logout_user', 'loading', 'initialized', 'set_return_to']),\n\tsocket: {\n\t\tconnect: 'SOCKET_CONNECT',\n\t\tconnect_error: 'SOCKET_CONNECT_ERROR',\n\t\treconnect: 'SOCKET_RECONNECT',\n\t\treconnecting: 'SOCKET_RECONNECTING',\n\t\treconnect_error: 'SOCKET_RECONNECT_ERROR',\n\t\treconnect_failed: 'SOCKET_RECONNECT_FAILED',\n\t\tdisconnect: 'SOCKET_DISCONNECT',\n\t\terror: 'SOCKET_ERROR',\n\t\tstatus: 'SOCKET_STATUS',\n\n\t\tload_params: 'SOCKET_LOAD_PARAMS',\n\t\tlist_checkpoints: 'SOCKET_LIST_CHECKPOINTS',\n\t\tlist_sequences: 'SOCKET_LIST_SEQUENCES',\n\t\tlist_epochs: 'SOCKET_LIST_EPOCHS'\n\t},\n\tplayer: {\n\t\tget_params: 'GET_PARAMS',\n\t\tset_param: 'SET_PARAM',\n\n\t\tloading_checkpoints: 'LOADING_CHECKPOINTS',\n\t\tloading_checkpoint: 'LOADING_CHECKPOINT',\n\t\tlist_checkpoints: 'LIST_CHECKPOINTS',\n\n\t\tloading_sequences: 'LOADING_SEQUENCES',\n\t\tloading_sequence: 'LOADING_SEQUENCE',\n\t\tload_sequence: 'LOAD_SEQUENCE',\n\n\t\tloading_epochs: 'LOADING_EPOCHS',\n\t\tload_epoch: 'LOAD_EPOCH',\n\n\t\tset_fps: 'SET_FPS',\n\t\tseeking: 'SEEKING',\n\t\tpausing: 'PAUSING',\n\t\tplaying: 'PLAYING',\n\t\tcurrent_frame: 'CURRENT_FRAME',\n\t\tstart_recording: 'START_RECORDING',\n\t\tadd_record_frame: 'ADD_RECORD_FRAME',\n\t\tsave_frame: 'SAVE_FRAME',\n\t\tsaving_video: 'SAVING_VIDEO',\n\t\tsave_video: 'SAVE_VIDEO',\n\n\t\tset_fullscreen: 'SET_FULLSCREEN'\n\t},\n\taudioPlayer: {\n\t\tplay: 'AUDIO_PLAY',\n\t\tpause: 'AUDIO_PAUSE',\n\t\tresume: 'AUDIO_RESUME',\n\t\tenqueue: 'AUDIO_ENQUEUE'\n\t},\n\tdataset: {\n\t\tload: 'DATASET_LOAD',\n\t\tset_folder: 'DATASET_SET_FOLDER',\n\t\tupload_files: 'DATASET_UPLOAD_FILES',\n\t\tfile_progress: 'DATASET_FILE_PROGRESS',\n\t\tfile_uploaded: 'DATASET_FILE_UPLOADED',\n\t\tfetch_url: 'DATASET_FETCH_URL',\n\t\tfetch_progress: 'DATASET_FETCH_PROGRESS',\n\t\tlist_epochs: 'DATASET_LIST_EPOCHS'\n\t},\n\tsamplernn: {\n\t\tinit: 'SAMPLERNN_INIT',\n\t\tset_folder: 'SAMPLERNN_SET_FOLDER',\n\t\tload_loss: 'SAMPLERNN_LOAD_LOSS',\n\t\tload_graph: 'SAMPLERNN_LOAD_GRAPH'\n\t\t// queue and train\n\t\t// update checkpoint settings\n\t\t// reset checkpoint settings\n\t\t// queue new checkpoint\n\t},\n\tpix2pix: (0, _crud.with_type)('pix2pix', ['init', 'set_folder']),\n\tpix2pixhd: (0, _crud.with_type)('pix2pixhd', ['init', 'set_folder', 'load_results', 'load_dataset_count']),\n\tpix2wav: (0, _crud.with_type)('pix2wav', ['init', 'set_folder']),\n\twav2pix: (0, _crud.with_type)('wav2pix', ['load', 'progress', 'finish', 'zip', 'uploading']),\n\tdashboard: (0, _crud.with_type)('dashboard', ['load']),\n\tmorph: (0, _crud.with_type)('morph', ['load'])\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.timeInSeconds = timeInSeconds;\nexports.gerund = gerund;\nexports.commatize = commatize;\nexports.carbon_date = carbon_date;\nexports.hush_views = hush_views;\nexports.hush_threads = hush_threads;\nexports.hush_size = hush_size;\nexports.hush_null = hush_null;\nexports.get_age = get_age;\nexports.courtesy_s = courtesy_s;\nfunction timeInSeconds(n) {\n  return (n / 10).toFixed(1) + ' s.';\n}\nfunction gerund(s) {\n  return s.replace(/e?$/, 'ing');\n}\nfunction commatize(n, radix) {\n  radix = radix || 1024;\n  var nums = [],\n      i,\n      counter = 0,\n      r = Math.floor;\n  if (n > radix) {\n    n /= radix;\n    nums.unshift(r(n * 10 % 10));\n    nums.unshift(\".\");\n  }\n  do {\n    i = n % 10;\n    n = r(n / 10);\n    if (n && !(++counter % 3)) {\n      i = ' ' + r(i);\n    }\n    nums.unshift(r(i));\n  } while (n);\n  return nums.join(\"\");\n}\nfunction carbon_date(date, no_bold) {\n  var span = (+new Date() - new Date(date)) / 1000,\n      color;\n  if (!no_bold && span < 86400) // modified today\n    {\n      color = \"new\";\n    } else if (span < 604800) // modifed this week\n    {\n      color = \"recent\";\n    } else if (span < 1209600) // modifed 2 weeks ago\n    {\n      color = \"med\";\n    } else if (span < 3024000) // modifed 5 weeks ago\n    {\n      color = \"old\";\n    } else if (span < 12315200) // modifed 6 months ago\n    {\n      color = \"older\";\n    } else {\n    color = \"quiet\";\n  }\n  return color;\n}\nfunction hush_views(n, bias, no_bold) {\n  var txt = commatize(n, 1000);\n  bias = bias || 1;\n  n = n || 0;\n  if (n < 30) {\n    return [\"quiet\", n + \" v.\"];\n  }\n  if (n < 200) {\n    return [\"quiet\", txt + \" v.\"];\n  } else if (n < 500) {\n    return [\"quiet\", txt + \" v.\"];\n  } else if (n < 1000) {\n    return [\"old\", txt + \" v.\"];\n  } else if (n < 5000) {\n    return [\"med\", txt + \" kv.\"];\n  } else if (no_bold || n < 10000) {\n    return [\"recent\", txt + \" kv.\"];\n  } else {\n    return [\"new\", txt + \" kv.\"];\n  }\n}\nfunction hush_threads(n, bias, no_bold) {\n  var txt = commatize(n, 1000);\n  bias = bias || 1;\n  n = n || 0;\n  if (n < 10) {\n    return [\"quiet\", n + \" t.\"];\n  } else if (n < 25) {\n    return [\"old\", txt + \" t.\"];\n  } else if (n < 50) {\n    return [\"med\", txt + \" t.\"];\n  } else if (no_bold || n < 100) {\n    return [\"recent\", txt + \" t.\"];\n  } else {\n    return [\"new\", txt + \" t.\"];\n  }\n}\nfunction hush_size(n, bias, no_bold) {\n  var txt = commatize(Math.round(n / 1024));\n  bias = 1 || bias;\n  n = n || 0;\n  if (!n) {\n    return ['', ''];\n  }\n  if (n < 1000) {\n    return [\"quiet\", n + \" b.\"];\n  }\n  if (n < 1000000) {\n    return [\"quiet\", txt + \" kb.\"];\n  } else if (n < 20000000 / bias) {\n    return [\"quiet\", txt + \" mb.\"];\n  } else if (n < 50000000 / bias) {\n    return [\"old\", txt + \" mb.\"];\n  } else if (n < 80000000 / bias) {\n    return [\"med\", txt + \" mb.\"];\n  } else if (no_bold || n < 170000000 / bias) {\n    return [\"recent\", txt + \" mb.\"];\n  } else {\n    return [\"new\", txt + \" mb.\"];\n  }\n}\nfunction hush_null(n, unit, no_bold) {\n  var s = unit ? n + \" \" + unit + \".\" : n;\n  if (n < 3) {\n    return [\"quiet\", s];\n  } else if (n < 6) {\n    return [\"older\", s];\n  } else if (n < 10) {\n    return [\"old\", s];\n  } else if (n < 16) {\n    return [\"med\", s];\n  } else if (no_bold || n < 21) {\n    return [\"recent\", s];\n  } else {\n    return [\"new\", s];\n  }\n}\nfunction get_age(t) {\n  var age = Math.abs(+Date.now() - new Date(t)) / 1000;\n  var r = Math.floor;\n  var m;\n  if (age < 5) {\n    return \"now\";\n  }\n  if (age < 60) {\n    return r(age) + \"s\";\n  }\n  age /= 60;\n  if (age < 60) {\n    return r(age) + \"m\";\n  }\n  m = r(age % 60);\n  age /= 60;\n  if (m > 0 && age < 2) {\n    return r(age) + \"h\" + m + \"m\";\n  }\n  if (age < 24) {\n    return r(age) + \"h\";\n  }\n  age /= 24;\n  if (age < 7) {\n    return r(age) + \"d\";\n  }\n  age /= 7;\n  if (age < 12) {\n    return r(age) + \"w\";\n  }\n  age /= 4;\n  if (age < 12) {\n    return r(age) + \"m\";\n  }\n  age /= 12;\n  return r(age) + \"y\";\n}\nfunction courtesy_s(n, s) {\n  return n == 1 ? \"\" : s || \"s\";\n}","'use strict';\n\n/**\n * HiDPI Canvas Polyfill (1.0.10)\n *\n * Author: Jonathan D. Johnson (http://jondavidjohn.com)\n * Homepage: https://github.com/jondavidjohn/hidpi-canvas-polyfill\n * Issue Tracker: https://github.com/jondavidjohn/hidpi-canvas-polyfill/issues\n * License: Apache-2.0\n*/\n(function (prototype) {\n\n  var pixelRatio = function () {\n    var canvas = window.document.createElement('canvas'),\n        context = canvas.getContext('2d'),\n        backingStore = context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1;\n\n    return (window.devicePixelRatio || 1) / backingStore;\n  }(),\n      forEach = function forEach(obj, func) {\n    for (var p in obj) {\n      if (obj.hasOwnProperty(p)) {\n        func(obj[p], p);\n      }\n    }\n  },\n      ratioArgs = {\n    'fillRect': 'all',\n    'clearRect': 'all',\n    'strokeRect': 'all',\n    'moveTo': 'all',\n    'lineTo': 'all',\n    'arc': [0, 1, 2],\n    'arcTo': 'all',\n    'bezierCurveTo': 'all',\n    'isPointinPath': 'all',\n    'isPointinStroke': 'all',\n    'quadraticCurveTo': 'all',\n    'rect': 'all',\n    'translate': 'all',\n    'createRadialGradient': 'all',\n    'createLinearGradient': 'all'\n  };\n\n  if (pixelRatio === 1) return;\n\n  forEach(ratioArgs, function (value, key) {\n    prototype[key] = function (_super) {\n      return function () {\n        var i,\n            len,\n            args = Array.prototype.slice.call(arguments);\n\n        if (value === 'all') {\n          args = args.map(function (a) {\n            return a * pixelRatio;\n          });\n        } else if (Array.isArray(value)) {\n          for (i = 0, len = value.length; i < len; i++) {\n            args[value[i]] *= pixelRatio;\n          }\n        }\n\n        return _super.apply(this, args);\n      };\n    }(prototype[key]);\n  });\n\n  // Stroke lineWidth adjustment\n  prototype.stroke = function (_super) {\n    return function () {\n      this.lineWidth *= pixelRatio;\n      _super.apply(this, arguments);\n      this.lineWidth /= pixelRatio;\n    };\n  }(prototype.stroke);\n\n  // Text\n  //\n  prototype.fillText = function (_super) {\n    return function () {\n      var args = Array.prototype.slice.call(arguments);\n\n      args[1] *= pixelRatio; // x\n      args[2] *= pixelRatio; // y\n\n      this.font = this.font.replace(/(\\d+)(px|em|rem|pt)/g, function (w, m, u) {\n        return m * pixelRatio + u;\n      });\n\n      _super.apply(this, args);\n\n      this.font = this.font.replace(/(\\d+)(px|em|rem|pt)/g, function (w, m, u) {\n        return m / pixelRatio + u;\n      });\n    };\n  }(prototype.fillText);\n\n  prototype.strokeText = function (_super) {\n    return function () {\n      var args = Array.prototype.slice.call(arguments);\n\n      args[1] *= pixelRatio; // x\n      args[2] *= pixelRatio; // y\n\n      this.font = this.font.replace(/(\\d+)(px|em|rem|pt)/g, function (w, m, u) {\n        return m * pixelRatio + u;\n      });\n\n      _super.apply(this, args);\n\n      this.font = this.font.replace(/(\\d+)(px|em|rem|pt)/g, function (w, m, u) {\n        return m / pixelRatio + u;\n      });\n    };\n  }(prototype.strokeText);\n})(window.CanvasRenderingContext2D.prototype);\n;(function (prototype) {\n  prototype.getContext = function (_super) {\n    return function (type) {\n      var backingStore, ratio, context;\n\n      if (type == '2d-lodpi') {\n        context = _super.call(this, '2d');\n      } else if (type === '2d') {\n        context = _super.call(this, '2d');\n\n        backingStore = context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1;\n\n        ratio = (window.devicePixelRatio || 1) / backingStore;\n\n        if (ratio > 1) {\n          this.style.height = this.height + 'px';\n          this.style.width = this.width + 'px';\n          this.width *= ratio;\n          this.height *= ratio;\n        }\n      } else {\n        context = _super.call(this, type);\n      }\n\n      return context;\n    };\n  }(prototype.getContext);\n})(window.HTMLCanvasElement.prototype);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _sort = require('./sort');\n\nvar sort = _interopRequireWildcard(_sort);\n\nvar _format = require('./format');\n\nvar format = _interopRequireWildcard(_format);\n\nvar _math = require('./math');\n\nvar maths = _interopRequireWildcard(_math);\n\nrequire('./hidpi-canvas');\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nvar is_iphone = !!(navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i));\nvar is_ipad = !!navigator.userAgent.match(/iPad/i);\nvar is_android = !!navigator.userAgent.match(/Android/i);\nvar is_mobile = is_iphone || is_ipad || is_android;\nvar is_desktop = !is_mobile;\n\nvar htmlClassList = document.body.parentNode.classList;\nhtmlClassList.add(is_desktop ? 'desktop' : 'mobile');\nhtmlClassList.remove('loading');\n\n// window.debug = false\n\nvar allProgress = function allProgress(promises, progress_cb) {\n  var d = 0;\n  progress_cb(0, 0, promises.length);\n  promises.forEach(function (p) {\n    p.then(function (s) {\n      d += 1;\n      progress_cb(Math.floor(d * 100 / promises.length), d, promises.length);\n      return s;\n    });\n  });\n  return Promise.all(promises);\n};\n\ndocument.body.style.backgroundImage = 'linear-gradient(' + (maths.randint(40) + 40) + 'deg, #fde, #ffe)';\n\nvar fieldSet = function fieldSet(defaultFields) {\n  return function (fields) {\n    if (fields) {\n      if (fields instanceof Set) {\n        return fields;\n      }\n      return new Set(fields.split(' '));\n    }\n    return defaultFields;\n  };\n};\n\nexports.default = _extends({}, maths, format, {\n  sort: sort,\n  allProgress: allProgress, fieldSet: fieldSet,\n  is_iphone: is_iphone, is_ipad: is_ipad, is_android: is_android, is_mobile: is_mobile, is_desktop: is_desktop\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.randrange = randrange;\nexports.randsign = randsign;\nexports.choice = choice;\nexports.angle = angle;\nexports.dist = dist;\nexports.xor = xor;\nexports.quantize = quantize;\nexports.shuffle = shuffle;\nexports.gaussian = gaussian;\nvar mod = exports.mod = function mod(n, m) {\n  return n - m * Math.floor(n / m);\n};\nvar clamp = exports.clamp = function clamp(n, a, b) {\n  return n < a ? a : n < b ? n : b;\n};\nvar norm = exports.norm = function norm(n, a, b) {\n  return (n - a) / (b - a);\n};\nvar lerp = exports.lerp = function lerp(n, a, b) {\n  return (b - a) * n + a;\n};\nvar mix = exports.mix = function mix(n, a, b) {\n  return a * (1 - n) + b * n;\n};\nvar randint = exports.randint = function randint(n) {\n  return Math.floor(Math.random() * n);\n};\nfunction randrange(a, b) {\n  return Math.random() * (b - a) + a;\n}\nfunction randsign() {\n  return Math.random() >= 0.5 ? -1 : 1;\n}\nfunction choice(a) {\n  return a[Math.floor(Math.random() * a.length)];\n}\nfunction angle(x0, y0, x1, y1) {\n  return Math.atan2(y1 - y0, x1 - x0);\n}\nfunction dist(x0, y0, x1, y1) {\n  return Math.sqrt(Math.pow(x1 - x0, 2) + Math.pow(y1 - y0, 2));\n}\nfunction xor(a, b) {\n  a = !!a;b = !!b;return (a || b) && !(a && b);\n}\nfunction quantize(a, b) {\n  return Math.floor(a / b) * b;\n}\nfunction shuffle(a) {\n  for (var i = a.length; i > 0; i--) {\n    var r = randint(i);\n    var swap = a[i - 1];\n    a[i - 1] = a[r];\n    a[r] = swap;\n  }\n  return a;\n}\n// returns a gaussian random function with the given mean and stdev.\nfunction gaussian(mean, stdev) {\n  var y2 = void 0;\n  var use_last = false;\n  return function () {\n    var y1 = void 0;\n    if (use_last) {\n      y1 = y2;\n      use_last = false;\n    } else {\n      var x1 = void 0,\n          x2 = void 0,\n          w = void 0;\n      do {\n        x1 = 2.0 * Math.random() - 1.0;\n        x2 = 2.0 * Math.random() - 1.0;\n        w = x1 * x1 + x2 * x2;\n      } while (w >= 1.0);\n      w = Math.sqrt(-2.0 * Math.log(w) / w);\n      y1 = x1 * w;\n      y2 = x2 * w;\n      use_last = true;\n    }\n\n    var retval = mean + stdev * y1;\n    if (retval > 0) return retval;\n    return -retval;\n  };\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar numericSort = exports.numericSort = {\n  asc: function asc(a, b) {\n    return a[0] - b[0];\n  },\n  desc: function desc(a, b) {\n    return b[0] - a[0];\n  }\n};\nvar stringSort = exports.stringSort = {\n  asc: function asc(a, b) {\n    return a[0].localeCompare(b[0]);\n  },\n  desc: function desc(a, b) {\n    return b[0].localeCompare(a[0]);\n  }\n};\nvar orderByFn = exports.orderByFn = function orderByFn() {\n  var s = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'name asc';\n\n  var _s$split = s.split(' '),\n      _s$split2 = _slicedToArray(_s$split, 2),\n      _s$split2$ = _s$split2[0],\n      field = _s$split2$ === undefined ? 'name' : _s$split2$,\n      _s$split2$2 = _s$split2[1],\n      direction = _s$split2$2 === undefined ? 'asc' : _s$split2$2;\n\n  var mapFn = void 0,\n      sortFn = void 0;\n  switch (field) {\n    case 'epoch':\n      mapFn = function mapFn(a) {\n        return [parseInt(a.epoch || a.epochs) || 0, a];\n      };\n      sortFn = numericSort[direction];\n      break;\n    case 'size':\n      mapFn = function mapFn(a) {\n        return [parseInt(a.size) || 0, a];\n      };\n      sortFn = numericSort[direction];\n      break;\n    case 'date':\n      mapFn = function mapFn(a) {\n        return [+new Date(a.date || a.created_at), a];\n      };\n      sortFn = numericSort[direction];\n      break;\n    case 'updated_at':\n      mapFn = function mapFn(a) {\n        return [+new Date(a.updated_at), a];\n      };\n      sortFn = numericSort[direction];\n      break;\n    case 'priority':\n      mapFn = function mapFn(a) {\n        return [parseInt(a.priority) || parseInt(a.id) || 1000, a];\n      };\n      sortFn = numericSort[direction];\n    case 'name':\n    default:\n      mapFn = function mapFn(a) {\n        return [a.name || \"\", a];\n      };\n      sortFn = stringSort[direction];\n      break;\n  }\n  return { mapFn: mapFn, sortFn: sortFn };\n};","(function (global, factory) {\n  if (typeof define === 'function' && define.amd) {\n    define(['exports', 'module'], factory);\n  } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {\n    factory(exports, module);\n  } else {\n    var mod = {\n      exports: {}\n    };\n    factory(mod.exports, mod);\n    global.fetchJsonp = mod.exports;\n  }\n})(this, function (exports, module) {\n  'use strict';\n\n  var defaultOptions = {\n    timeout: 5000,\n    jsonpCallback: 'callback',\n    jsonpCallbackFunction: null\n  };\n\n  function generateCallbackFunction() {\n    return 'jsonp_' + Date.now() + '_' + Math.ceil(Math.random() * 100000);\n  }\n\n  function clearFunction(functionName) {\n    // IE8 throws an exception when you try to delete a property on window\n    // http://stackoverflow.com/a/1824228/751089\n    try {\n      delete window[functionName];\n    } catch (e) {\n      window[functionName] = undefined;\n    }\n  }\n\n  function removeScript(scriptId) {\n    var script = document.getElementById(scriptId);\n    if (script) {\n      document.getElementsByTagName('head')[0].removeChild(script);\n    }\n  }\n\n  function fetchJsonp(_url) {\n    var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\n    // to avoid param reassign\n    var url = _url;\n    var timeout = options.timeout || defaultOptions.timeout;\n    var jsonpCallback = options.jsonpCallback || defaultOptions.jsonpCallback;\n\n    var timeoutId = undefined;\n\n    return new Promise(function (resolve, reject) {\n      var callbackFunction = options.jsonpCallbackFunction || generateCallbackFunction();\n      var scriptId = jsonpCallback + '_' + callbackFunction;\n\n      window[callbackFunction] = function (response) {\n        resolve({\n          ok: true,\n          // keep consistent with fetch API\n          json: function json() {\n            return Promise.resolve(response);\n          }\n        });\n\n        if (timeoutId) clearTimeout(timeoutId);\n\n        removeScript(scriptId);\n\n        clearFunction(callbackFunction);\n      };\n\n      // Check if the user set their own params, and if not add a ? to start a list of params\n      url += url.indexOf('?') === -1 ? '?' : '&';\n\n      var jsonpScript = document.createElement('script');\n      jsonpScript.setAttribute('src', '' + url + jsonpCallback + '=' + callbackFunction);\n      if (options.charset) {\n        jsonpScript.setAttribute('charset', options.charset);\n      }\n      jsonpScript.id = scriptId;\n      document.getElementsByTagName('head')[0].appendChild(jsonpScript);\n\n      timeoutId = setTimeout(function () {\n        reject(new Error('JSONP request to ' + _url + ' timed out'));\n\n        clearFunction(callbackFunction);\n        removeScript(scriptId);\n        window[callbackFunction] = function () {\n          clearFunction(callbackFunction);\n        };\n      }, timeout);\n\n      // Caught if got 404/500\n      jsonpScript.onerror = function () {\n        reject(new Error('JSONP request to ' + _url + ' failed'));\n\n        clearFunction(callbackFunction);\n        removeScript(scriptId);\n        if (timeoutId) clearTimeout(timeoutId);\n      };\n    });\n  }\n\n  // export as global function\n  /*\n  let local;\n  if (typeof global !== 'undefined') {\n    local = global;\n  } else if (typeof self !== 'undefined') {\n    local = self;\n  } else {\n    try {\n      local = Function('return this')();\n    } catch (e) {\n      throw new Error('polyfill failed because global object is unavailable in this environment');\n    }\n  }\n  local.fetchJsonp = fetchJsonp;\n  */\n\n  module.exports = fetchJsonp;\n});","'use strict';\n\nfunction FFT(size) {\n  this.size = size | 0;\n  if (this.size <= 1 || (this.size & (this.size - 1)) !== 0)\n    throw new Error('FFT size must be a power of two and bigger than 1');\n\n  this._csize = size << 1;\n\n  // NOTE: Use of `var` is intentional for old V8 versions\n  var table = new Array(this.size * 2);\n  for (var i = 0; i < table.length; i += 2) {\n    const angle = Math.PI * i / this.size;\n    table[i] = Math.cos(angle);\n    table[i + 1] = -Math.sin(angle);\n  }\n  this.table = table;\n\n  // Find size's power of two\n  var power = 0;\n  for (var t = 1; this.size > t; t <<= 1)\n    power++;\n\n  // Calculate initial step's width:\n  //   * If we are full radix-4 - it is 2x smaller to give inital len=8\n  //   * Otherwise it is the same as `power` to give len=4\n  this._width = power % 2 === 0 ? power - 1 : power;\n\n  // Pre-compute bit-reversal patterns\n  this._bitrev = new Array(1 << this._width);\n  for (var j = 0; j < this._bitrev.length; j++) {\n    this._bitrev[j] = 0;\n    for (var shift = 0; shift < this._width; shift += 2) {\n      var revShift = this._width - shift - 2;\n      this._bitrev[j] |= ((j >>> shift) & 3) << revShift;\n    }\n  }\n\n  this._out = null;\n  this._data = null;\n  this._inv = 0;\n}\nmodule.exports = FFT;\n\nFFT.prototype.fromComplexArray = function fromComplexArray(complex, storage) {\n  var res = storage || new Array(complex.length >>> 1);\n  for (var i = 0; i < complex.length; i += 2)\n    res[i >>> 1] = complex[i];\n  return res;\n};\n\nFFT.prototype.createComplexArray = function createComplexArray() {\n  const res = new Array(this._csize);\n  for (var i = 0; i < res.length; i++)\n    res[i] = 0;\n  return res;\n};\n\nFFT.prototype.toComplexArray = function toComplexArray(input, storage) {\n  var res = storage || this.createComplexArray();\n  for (var i = 0; i < res.length; i += 2) {\n    res[i] = input[i >>> 1];\n    res[i + 1] = 0;\n  }\n  return res;\n};\n\nFFT.prototype.completeSpectrum = function completeSpectrum(spectrum) {\n  var size = this._csize;\n  var half = size >>> 1;\n  for (var i = 2; i < half; i += 2) {\n    spectrum[size - i] = spectrum[i];\n    spectrum[size - i + 1] = -spectrum[i + 1];\n  }\n};\n\nFFT.prototype.transform = function transform(out, data) {\n  if (out === data)\n    throw new Error('Input and output buffers must be different');\n\n  this._out = out;\n  this._data = data;\n  this._inv = 0;\n  this._transform4();\n  this._out = null;\n  this._data = null;\n};\n\nFFT.prototype.realTransform = function realTransform(out, data) {\n  if (out === data)\n    throw new Error('Input and output buffers must be different');\n\n  this._out = out;\n  this._data = data;\n  this._inv = 0;\n  this._realTransform4();\n  this._out = null;\n  this._data = null;\n};\n\nFFT.prototype.inverseTransform = function inverseTransform(out, data) {\n  if (out === data)\n    throw new Error('Input and output buffers must be different');\n\n  this._out = out;\n  this._data = data;\n  this._inv = 1;\n  this._transform4();\n  for (var i = 0; i < out.length; i++)\n    out[i] /= this.size;\n  this._out = null;\n  this._data = null;\n};\n\n// radix-4 implementation\n//\n// NOTE: Uses of `var` are intentional for older V8 version that do not\n// support both `let compound assignments` and `const phi`\nFFT.prototype._transform4 = function _transform4() {\n  var out = this._out;\n  var size = this._csize;\n\n  // Initial step (permute and transform)\n  var width = this._width;\n  var step = 1 << width;\n  var len = (size / step) << 1;\n\n  var outOff;\n  var t;\n  var bitrev = this._bitrev;\n  if (len === 4) {\n    for (outOff = 0, t = 0; outOff < size; outOff += len, t++) {\n      const off = bitrev[t];\n      this._singleTransform2(outOff, off, step);\n    }\n  } else {\n    // len === 8\n    for (outOff = 0, t = 0; outOff < size; outOff += len, t++) {\n      const off = bitrev[t];\n      this._singleTransform4(outOff, off, step);\n    }\n  }\n\n  // Loop through steps in decreasing order\n  var inv = this._inv ? -1 : 1;\n  var table = this.table;\n  for (step >>= 2; step >= 2; step >>= 2) {\n    len = (size / step) << 1;\n    var quarterLen = len >>> 2;\n\n    // Loop through offsets in the data\n    for (outOff = 0; outOff < size; outOff += len) {\n      // Full case\n      var limit = outOff + quarterLen;\n      for (var i = outOff, k = 0; i < limit; i += 2, k += step) {\n        const A = i;\n        const B = A + quarterLen;\n        const C = B + quarterLen;\n        const D = C + quarterLen;\n\n        // Original values\n        const Ar = out[A];\n        const Ai = out[A + 1];\n        const Br = out[B];\n        const Bi = out[B + 1];\n        const Cr = out[C];\n        const Ci = out[C + 1];\n        const Dr = out[D];\n        const Di = out[D + 1];\n\n        // Middle values\n        const MAr = Ar;\n        const MAi = Ai;\n\n        const tableBr = table[k];\n        const tableBi = inv * table[k + 1];\n        const MBr = Br * tableBr - Bi * tableBi;\n        const MBi = Br * tableBi + Bi * tableBr;\n\n        const tableCr = table[2 * k];\n        const tableCi = inv * table[2 * k + 1];\n        const MCr = Cr * tableCr - Ci * tableCi;\n        const MCi = Cr * tableCi + Ci * tableCr;\n\n        const tableDr = table[3 * k];\n        const tableDi = inv * table[3 * k + 1];\n        const MDr = Dr * tableDr - Di * tableDi;\n        const MDi = Dr * tableDi + Di * tableDr;\n\n        // Pre-Final values\n        const T0r = MAr + MCr;\n        const T0i = MAi + MCi;\n        const T1r = MAr - MCr;\n        const T1i = MAi - MCi;\n        const T2r = MBr + MDr;\n        const T2i = MBi + MDi;\n        const T3r = inv * (MBr - MDr);\n        const T3i = inv * (MBi - MDi);\n\n        // Final values\n        const FAr = T0r + T2r;\n        const FAi = T0i + T2i;\n\n        const FCr = T0r - T2r;\n        const FCi = T0i - T2i;\n\n        const FBr = T1r + T3i;\n        const FBi = T1i - T3r;\n\n        const FDr = T1r - T3i;\n        const FDi = T1i + T3r;\n\n        out[A] = FAr;\n        out[A + 1] = FAi;\n        out[B] = FBr;\n        out[B + 1] = FBi;\n        out[C] = FCr;\n        out[C + 1] = FCi;\n        out[D] = FDr;\n        out[D + 1] = FDi;\n      }\n    }\n  }\n};\n\n// radix-2 implementation\n//\n// NOTE: Only called for len=4\nFFT.prototype._singleTransform2 = function _singleTransform2(outOff, off,\n                                                             step) {\n  const out = this._out;\n  const data = this._data;\n\n  const evenR = data[off];\n  const evenI = data[off + 1];\n  const oddR = data[off + step];\n  const oddI = data[off + step + 1];\n\n  const leftR = evenR + oddR;\n  const leftI = evenI + oddI;\n  const rightR = evenR - oddR;\n  const rightI = evenI - oddI;\n\n  out[outOff] = leftR;\n  out[outOff + 1] = leftI;\n  out[outOff + 2] = rightR;\n  out[outOff + 3] = rightI;\n};\n\n// radix-4\n//\n// NOTE: Only called for len=8\nFFT.prototype._singleTransform4 = function _singleTransform4(outOff, off,\n                                                             step) {\n  const out = this._out;\n  const data = this._data;\n  const inv = this._inv ? -1 : 1;\n  const step2 = step * 2;\n  const step3 = step * 3;\n\n  // Original values\n  const Ar = data[off];\n  const Ai = data[off + 1];\n  const Br = data[off + step];\n  const Bi = data[off + step + 1];\n  const Cr = data[off + step2];\n  const Ci = data[off + step2 + 1];\n  const Dr = data[off + step3];\n  const Di = data[off + step3 + 1];\n\n  // Pre-Final values\n  const T0r = Ar + Cr;\n  const T0i = Ai + Ci;\n  const T1r = Ar - Cr;\n  const T1i = Ai - Ci;\n  const T2r = Br + Dr;\n  const T2i = Bi + Di;\n  const T3r = inv * (Br - Dr);\n  const T3i = inv * (Bi - Di);\n\n  // Final values\n  const FAr = T0r + T2r;\n  const FAi = T0i + T2i;\n\n  const FBr = T1r + T3i;\n  const FBi = T1i - T3r;\n\n  const FCr = T0r - T2r;\n  const FCi = T0i - T2i;\n\n  const FDr = T1r - T3i;\n  const FDi = T1i + T3r;\n\n  out[outOff] = FAr;\n  out[outOff + 1] = FAi;\n  out[outOff + 2] = FBr;\n  out[outOff + 3] = FBi;\n  out[outOff + 4] = FCr;\n  out[outOff + 5] = FCi;\n  out[outOff + 6] = FDr;\n  out[outOff + 7] = FDi;\n};\n\n// Real input radix-4 implementation\nFFT.prototype._realTransform4 = function _realTransform4() {\n  var out = this._out;\n  var size = this._csize;\n\n  // Initial step (permute and transform)\n  var width = this._width;\n  var step = 1 << width;\n  var len = (size / step) << 1;\n\n  var outOff;\n  var t;\n  var bitrev = this._bitrev;\n  if (len === 4) {\n    for (outOff = 0, t = 0; outOff < size; outOff += len, t++) {\n      const off = bitrev[t];\n      this._singleRealTransform2(outOff, off >>> 1, step >>> 1);\n    }\n  } else {\n    // len === 8\n    for (outOff = 0, t = 0; outOff < size; outOff += len, t++) {\n      const off = bitrev[t];\n      this._singleRealTransform4(outOff, off >>> 1, step >>> 1);\n    }\n  }\n\n  // Loop through steps in decreasing order\n  var inv = this._inv ? -1 : 1;\n  var table = this.table;\n  for (step >>= 2; step >= 2; step >>= 2) {\n    len = (size / step) << 1;\n    var halfLen = len >>> 1;\n    var quarterLen = halfLen >>> 1;\n    var hquarterLen = quarterLen >>> 1;\n\n    // Loop through offsets in the data\n    for (outOff = 0; outOff < size; outOff += len) {\n      for (var i = 0, k = 0; i <= hquarterLen; i += 2, k += step) {\n        var A = outOff + i;\n        var B = A + quarterLen;\n        var C = B + quarterLen;\n        var D = C + quarterLen;\n\n        // Original values\n        var Ar = out[A];\n        var Ai = out[A + 1];\n        var Br = out[B];\n        var Bi = out[B + 1];\n        var Cr = out[C];\n        var Ci = out[C + 1];\n        var Dr = out[D];\n        var Di = out[D + 1];\n\n        // Middle values\n        var MAr = Ar;\n        var MAi = Ai;\n\n        var tableBr = table[k];\n        var tableBi = inv * table[k + 1];\n        var MBr = Br * tableBr - Bi * tableBi;\n        var MBi = Br * tableBi + Bi * tableBr;\n\n        var tableCr = table[2 * k];\n        var tableCi = inv * table[2 * k + 1];\n        var MCr = Cr * tableCr - Ci * tableCi;\n        var MCi = Cr * tableCi + Ci * tableCr;\n\n        var tableDr = table[3 * k];\n        var tableDi = inv * table[3 * k + 1];\n        var MDr = Dr * tableDr - Di * tableDi;\n        var MDi = Dr * tableDi + Di * tableDr;\n\n        // Pre-Final values\n        var T0r = MAr + MCr;\n        var T0i = MAi + MCi;\n        var T1r = MAr - MCr;\n        var T1i = MAi - MCi;\n        var T2r = MBr + MDr;\n        var T2i = MBi + MDi;\n        var T3r = inv * (MBr - MDr);\n        var T3i = inv * (MBi - MDi);\n\n        // Final values\n        var FAr = T0r + T2r;\n        var FAi = T0i + T2i;\n\n        var FBr = T1r + T3i;\n        var FBi = T1i - T3r;\n\n        out[A] = FAr;\n        out[A + 1] = FAi;\n        out[B] = FBr;\n        out[B + 1] = FBi;\n\n        // Output final middle point\n        if (i === 0) {\n          var FCr = T0r - T2r;\n          var FCi = T0i - T2i;\n          out[C] = FCr;\n          out[C + 1] = FCi;\n          continue;\n        }\n\n        // Do not overwrite ourselves\n        if (i === hquarterLen)\n          continue;\n\n        // In the flipped case:\n        // MAi = -MAi\n        // MBr=-MBi, MBi=-MBr\n        // MCr=-MCr\n        // MDr=MDi, MDi=MDr\n        var ST0r = T1r;\n        var ST0i = -T1i;\n        var ST1r = T0r;\n        var ST1i = -T0i;\n        var ST2r = -inv * T3i;\n        var ST2i = -inv * T3r;\n        var ST3r = -inv * T2i;\n        var ST3i = -inv * T2r;\n\n        var SFAr = ST0r + ST2r;\n        var SFAi = ST0i + ST2i;\n\n        var SFBr = ST1r + ST3i;\n        var SFBi = ST1i - ST3r;\n\n        var SA = outOff + quarterLen - i;\n        var SB = outOff + halfLen - i;\n\n        out[SA] = SFAr;\n        out[SA + 1] = SFAi;\n        out[SB] = SFBr;\n        out[SB + 1] = SFBi;\n      }\n    }\n  }\n};\n\n// radix-2 implementation\n//\n// NOTE: Only called for len=4\nFFT.prototype._singleRealTransform2 = function _singleRealTransform2(outOff,\n                                                                     off,\n                                                                     step) {\n  const out = this._out;\n  const data = this._data;\n\n  const evenR = data[off];\n  const oddR = data[off + step];\n\n  const leftR = evenR + oddR;\n  const rightR = evenR - oddR;\n\n  out[outOff] = leftR;\n  out[outOff + 1] = 0;\n  out[outOff + 2] = rightR;\n  out[outOff + 3] = 0;\n};\n\n// radix-4\n//\n// NOTE: Only called for len=8\nFFT.prototype._singleRealTransform4 = function _singleRealTransform4(outOff,\n                                                                     off,\n                                                                     step) {\n  const out = this._out;\n  const data = this._data;\n  const inv = this._inv ? -1 : 1;\n  const step2 = step * 2;\n  const step3 = step * 3;\n\n  // Original values\n  const Ar = data[off];\n  const Br = data[off + step];\n  const Cr = data[off + step2];\n  const Dr = data[off + step3];\n\n  // Pre-Final values\n  const T0r = Ar + Cr;\n  const T1r = Ar - Cr;\n  const T2r = Br + Dr;\n  const T3r = inv * (Br - Dr);\n\n  // Final values\n  const FAr = T0r + T2r;\n\n  const FBr = T1r;\n  const FBi = -T3r;\n\n  const FCr = T0r - T2r;\n\n  const FDr = T1r;\n  const FDi = T3r;\n\n  out[outOff] = FAr;\n  out[outOff + 1] = 0;\n  out[outOff + 2] = FBr;\n  out[outOff + 3] = FBi;\n  out[outOff + 4] = FCr;\n  out[outOff + 5] = 0;\n  out[outOff + 6] = FDr;\n  out[outOff + 7] = FDi;\n};\n","/* FileSaver.js\n * A saveAs() FileSaver implementation.\n * 1.3.2\n * 2016-06-16 18:25:19\n *\n * By Eli Grey, http://eligrey.com\n * License: MIT\n *   See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md\n */\n\n/*global self */\n/*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */\n\n/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */\n\nvar saveAs = saveAs || (function(view) {\n\t\"use strict\";\n\t// IE <10 is explicitly unsupported\n\tif (typeof view === \"undefined\" || typeof navigator !== \"undefined\" && /MSIE [1-9]\\./.test(navigator.userAgent)) {\n\t\treturn;\n\t}\n\tvar\n\t\t  doc = view.document\n\t\t  // only get URL when necessary in case Blob.js hasn't overridden it yet\n\t\t, get_URL = function() {\n\t\t\treturn view.URL || view.webkitURL || view;\n\t\t}\n\t\t, save_link = doc.createElementNS(\"http://www.w3.org/1999/xhtml\", \"a\")\n\t\t, can_use_save_link = \"download\" in save_link\n\t\t, click = function(node) {\n\t\t\tvar event = new MouseEvent(\"click\");\n\t\t\tnode.dispatchEvent(event);\n\t\t}\n\t\t, is_safari = /constructor/i.test(view.HTMLElement) || view.safari\n\t\t, is_chrome_ios =/CriOS\\/[\\d]+/.test(navigator.userAgent)\n\t\t, throw_outside = function(ex) {\n\t\t\t(view.setImmediate || view.setTimeout)(function() {\n\t\t\t\tthrow ex;\n\t\t\t}, 0);\n\t\t}\n\t\t, force_saveable_type = \"application/octet-stream\"\n\t\t// the Blob API is fundamentally broken as there is no \"downloadfinished\" event to subscribe to\n\t\t, arbitrary_revoke_timeout = 1000 * 40 // in ms\n\t\t, revoke = function(file) {\n\t\t\tvar revoker = function() {\n\t\t\t\tif (typeof file === \"string\") { // file is an object URL\n\t\t\t\t\tget_URL().revokeObjectURL(file);\n\t\t\t\t} else { // file is a File\n\t\t\t\t\tfile.remove();\n\t\t\t\t}\n\t\t\t};\n\t\t\tsetTimeout(revoker, arbitrary_revoke_timeout);\n\t\t}\n\t\t, dispatch = function(filesaver, event_types, event) {\n\t\t\tevent_types = [].concat(event_types);\n\t\t\tvar i = event_types.length;\n\t\t\twhile (i--) {\n\t\t\t\tvar listener = filesaver[\"on\" + event_types[i]];\n\t\t\t\tif (typeof listener === \"function\") {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlistener.call(filesaver, event || filesaver);\n\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\tthrow_outside(ex);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t, auto_bom = function(blob) {\n\t\t\t// prepend BOM for UTF-8 XML and text/* types (including HTML)\n\t\t\t// note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF\n\t\t\tif (/^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n\t\t\t\treturn new Blob([String.fromCharCode(0xFEFF), blob], {type: blob.type});\n\t\t\t}\n\t\t\treturn blob;\n\t\t}\n\t\t, FileSaver = function(blob, name, no_auto_bom) {\n\t\t\tif (!no_auto_bom) {\n\t\t\t\tblob = auto_bom(blob);\n\t\t\t}\n\t\t\t// First try a.download, then web filesystem, then object URLs\n\t\t\tvar\n\t\t\t\t  filesaver = this\n\t\t\t\t, type = blob.type\n\t\t\t\t, force = type === force_saveable_type\n\t\t\t\t, object_url\n\t\t\t\t, dispatch_all = function() {\n\t\t\t\t\tdispatch(filesaver, \"writestart progress write writeend\".split(\" \"));\n\t\t\t\t}\n\t\t\t\t// on any filesys errors revert to saving with object URLs\n\t\t\t\t, fs_error = function() {\n\t\t\t\t\tif ((is_chrome_ios || (force && is_safari)) && view.FileReader) {\n\t\t\t\t\t\t// Safari doesn't allow downloading of blob urls\n\t\t\t\t\t\tvar reader = new FileReader();\n\t\t\t\t\t\treader.onloadend = function() {\n\t\t\t\t\t\t\tvar url = is_chrome_ios ? reader.result : reader.result.replace(/^data:[^;]*;/, 'data:attachment/file;');\n\t\t\t\t\t\t\tvar popup = view.open(url, '_blank');\n\t\t\t\t\t\t\tif(!popup) view.location.href = url;\n\t\t\t\t\t\t\turl=undefined; // release reference before dispatching\n\t\t\t\t\t\t\tfilesaver.readyState = filesaver.DONE;\n\t\t\t\t\t\t\tdispatch_all();\n\t\t\t\t\t\t};\n\t\t\t\t\t\treader.readAsDataURL(blob);\n\t\t\t\t\t\tfilesaver.readyState = filesaver.INIT;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// don't create more object URLs than needed\n\t\t\t\t\tif (!object_url) {\n\t\t\t\t\t\tobject_url = get_URL().createObjectURL(blob);\n\t\t\t\t\t}\n\t\t\t\t\tif (force) {\n\t\t\t\t\t\tview.location.href = object_url;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar opened = view.open(object_url, \"_blank\");\n\t\t\t\t\t\tif (!opened) {\n\t\t\t\t\t\t\t// Apple does not allow window.open, see https://developer.apple.com/library/safari/documentation/Tools/Conceptual/SafariExtensionGuide/WorkingwithWindowsandTabs/WorkingwithWindowsandTabs.html\n\t\t\t\t\t\t\tview.location.href = object_url;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfilesaver.readyState = filesaver.DONE;\n\t\t\t\t\tdispatch_all();\n\t\t\t\t\trevoke(object_url);\n\t\t\t\t}\n\t\t\t;\n\t\t\tfilesaver.readyState = filesaver.INIT;\n\n\t\t\tif (can_use_save_link) {\n\t\t\t\tobject_url = get_URL().createObjectURL(blob);\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\tsave_link.href = object_url;\n\t\t\t\t\tsave_link.download = name;\n\t\t\t\t\tclick(save_link);\n\t\t\t\t\tdispatch_all();\n\t\t\t\t\trevoke(object_url);\n\t\t\t\t\tfilesaver.readyState = filesaver.DONE;\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfs_error();\n\t\t}\n\t\t, FS_proto = FileSaver.prototype\n\t\t, saveAs = function(blob, name, no_auto_bom) {\n\t\t\treturn new FileSaver(blob, name || blob.name || \"download\", no_auto_bom);\n\t\t}\n\t;\n\t// IE 10+ (native saveAs)\n\tif (typeof navigator !== \"undefined\" && navigator.msSaveOrOpenBlob) {\n\t\treturn function(blob, name, no_auto_bom) {\n\t\t\tname = name || blob.name || \"download\";\n\n\t\t\tif (!no_auto_bom) {\n\t\t\t\tblob = auto_bom(blob);\n\t\t\t}\n\t\t\treturn navigator.msSaveOrOpenBlob(blob, name);\n\t\t};\n\t}\n\n\tFS_proto.abort = function(){};\n\tFS_proto.readyState = FS_proto.INIT = 0;\n\tFS_proto.WRITING = 1;\n\tFS_proto.DONE = 2;\n\n\tFS_proto.error =\n\tFS_proto.onwritestart =\n\tFS_proto.onprogress =\n\tFS_proto.onwrite =\n\tFS_proto.onabort =\n\tFS_proto.onerror =\n\tFS_proto.onwriteend =\n\t\tnull;\n\n\treturn saveAs;\n}(\n\t   typeof self !== \"undefined\" && self\n\t|| typeof window !== \"undefined\" && window\n\t|| this.content\n));\n// `self` is undefined in Firefox for Android content script context\n// while `this` is nsIContentFrameMessageManager\n// with an attribute `content` that corresponds to the window\n\nif (typeof module !== \"undefined\" && module.exports) {\n  module.exports.saveAs = saveAs;\n} else if ((typeof define !== \"undefined\" && define !== null) && (define.amd !== null)) {\n  define(\"FileSaver.js\", function() {\n    return saveAs;\n  });\n}\n","'use strict';\n\nexports.__esModule = true;\nvar canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nvar addEventListener = exports.addEventListener = function addEventListener(node, event, listener) {\n  return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener);\n};\n\nvar removeEventListener = exports.removeEventListener = function removeEventListener(node, event, listener) {\n  return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener);\n};\n\nvar getConfirmation = exports.getConfirmation = function getConfirmation(message, callback) {\n  return callback(window.confirm(message));\n}; // eslint-disable-line no-alert\n\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\nvar supportsHistory = exports.supportsHistory = function supportsHistory() {\n  var ua = window.navigator.userAgent;\n\n  if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n\n  return window.history && 'pushState' in window.history;\n};\n\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\nvar supportsPopStateOnHashChange = exports.supportsPopStateOnHashChange = function supportsPopStateOnHashChange() {\n  return window.navigator.userAgent.indexOf('Trident') === -1;\n};\n\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\nvar supportsGoWithoutReloadUsingHash = exports.supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() {\n  return window.navigator.userAgent.indexOf('Firefox') === -1;\n};\n\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\nvar isExtraneousPopstateEvent = exports.isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) {\n  return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n};","'use strict';\n\nexports.__esModule = true;\nexports.locationsAreEqual = exports.createLocation = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _resolvePathname = require('resolve-pathname');\n\nvar _resolvePathname2 = _interopRequireDefault(_resolvePathname);\n\nvar _valueEqual = require('value-equal');\n\nvar _valueEqual2 = _interopRequireDefault(_valueEqual);\n\nvar _PathUtils = require('./PathUtils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar createLocation = exports.createLocation = function createLocation(path, state, key, currentLocation) {\n  var location = void 0;\n  if (typeof path === 'string') {\n    // Two-arg form: push(path, state)\n    location = (0, _PathUtils.parsePath)(path);\n    location.state = state;\n  } else {\n    // One-arg form: push(location)\n    location = _extends({}, path);\n\n    if (location.pathname === undefined) location.pathname = '';\n\n    if (location.search) {\n      if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n    } else {\n      location.search = '';\n    }\n\n    if (location.hash) {\n      if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n    } else {\n      location.hash = '';\n    }\n\n    if (state !== undefined && location.state === undefined) location.state = state;\n  }\n\n  try {\n    location.pathname = decodeURI(location.pathname);\n  } catch (e) {\n    if (e instanceof URIError) {\n      throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n    } else {\n      throw e;\n    }\n  }\n\n  if (key) location.key = key;\n\n  if (currentLocation) {\n    // Resolve incomplete/relative pathname relative to current location.\n    if (!location.pathname) {\n      location.pathname = currentLocation.pathname;\n    } else if (location.pathname.charAt(0) !== '/') {\n      location.pathname = (0, _resolvePathname2.default)(location.pathname, currentLocation.pathname);\n    }\n  } else {\n    // When there is no prior location and pathname is empty, set it to /\n    if (!location.pathname) {\n      location.pathname = '/';\n    }\n  }\n\n  return location;\n};\n\nvar locationsAreEqual = exports.locationsAreEqual = function locationsAreEqual(a, b) {\n  return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && (0, _valueEqual2.default)(a.state, b.state);\n};","'use strict';\n\nexports.__esModule = true;\nvar addLeadingSlash = exports.addLeadingSlash = function addLeadingSlash(path) {\n  return path.charAt(0) === '/' ? path : '/' + path;\n};\n\nvar stripLeadingSlash = exports.stripLeadingSlash = function stripLeadingSlash(path) {\n  return path.charAt(0) === '/' ? path.substr(1) : path;\n};\n\nvar hasBasename = exports.hasBasename = function hasBasename(path, prefix) {\n  return new RegExp('^' + prefix + '(\\\\/|\\\\?|#|$)', 'i').test(path);\n};\n\nvar stripBasename = exports.stripBasename = function stripBasename(path, prefix) {\n  return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n};\n\nvar stripTrailingSlash = exports.stripTrailingSlash = function stripTrailingSlash(path) {\n  return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n};\n\nvar parsePath = exports.parsePath = function parsePath(path) {\n  var pathname = path || '/';\n  var search = '';\n  var hash = '';\n\n  var hashIndex = pathname.indexOf('#');\n  if (hashIndex !== -1) {\n    hash = pathname.substr(hashIndex);\n    pathname = pathname.substr(0, hashIndex);\n  }\n\n  var searchIndex = pathname.indexOf('?');\n  if (searchIndex !== -1) {\n    search = pathname.substr(searchIndex);\n    pathname = pathname.substr(0, searchIndex);\n  }\n\n  return {\n    pathname: pathname,\n    search: search === '?' ? '' : search,\n    hash: hash === '#' ? '' : hash\n  };\n};\n\nvar createPath = exports.createPath = function createPath(location) {\n  var pathname = location.pathname,\n      search = location.search,\n      hash = location.hash;\n\n\n  var path = pathname || '/';\n\n  if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search;\n\n  if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash;\n\n  return path;\n};","'use strict';\n\nexports.__esModule = true;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _LocationUtils = require('./LocationUtils');\n\nvar _PathUtils = require('./PathUtils');\n\nvar _createTransitionManager = require('./createTransitionManager');\n\nvar _createTransitionManager2 = _interopRequireDefault(_createTransitionManager);\n\nvar _DOMUtils = require('./DOMUtils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nvar getHistoryState = function getHistoryState() {\n  try {\n    return window.history.state || {};\n  } catch (e) {\n    // IE 11 sometimes throws when accessing window.history.state\n    // See https://github.com/ReactTraining/history/pull/289\n    return {};\n  }\n};\n\n/**\n * Creates a history object that uses the HTML5 history API including\n * pushState, replaceState, and the popstate event.\n */\nvar createBrowserHistory = function createBrowserHistory() {\n  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n  (0, _invariant2.default)(_DOMUtils.canUseDOM, 'Browser history needs a DOM');\n\n  var globalHistory = window.history;\n  var canUseHistory = (0, _DOMUtils.supportsHistory)();\n  var needsHashChangeListener = !(0, _DOMUtils.supportsPopStateOnHashChange)();\n\n  var _props$forceRefresh = props.forceRefresh,\n      forceRefresh = _props$forceRefresh === undefined ? false : _props$forceRefresh,\n      _props$getUserConfirm = props.getUserConfirmation,\n      getUserConfirmation = _props$getUserConfirm === undefined ? _DOMUtils.getConfirmation : _props$getUserConfirm,\n      _props$keyLength = props.keyLength,\n      keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;\n\n  var basename = props.basename ? (0, _PathUtils.stripTrailingSlash)((0, _PathUtils.addLeadingSlash)(props.basename)) : '';\n\n  var getDOMLocation = function getDOMLocation(historyState) {\n    var _ref = historyState || {},\n        key = _ref.key,\n        state = _ref.state;\n\n    var _window$location = window.location,\n        pathname = _window$location.pathname,\n        search = _window$location.search,\n        hash = _window$location.hash;\n\n\n    var path = pathname + search + hash;\n\n    (0, _warning2.default)(!basename || (0, _PathUtils.hasBasename)(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n    if (basename) path = (0, _PathUtils.stripBasename)(path, basename);\n\n    return (0, _LocationUtils.createLocation)(path, state, key);\n  };\n\n  var createKey = function createKey() {\n    return Math.random().toString(36).substr(2, keyLength);\n  };\n\n  var transitionManager = (0, _createTransitionManager2.default)();\n\n  var setState = function setState(nextState) {\n    _extends(history, nextState);\n\n    history.length = globalHistory.length;\n\n    transitionManager.notifyListeners(history.location, history.action);\n  };\n\n  var handlePopState = function handlePopState(event) {\n    // Ignore extraneous popstate events in WebKit.\n    if ((0, _DOMUtils.isExtraneousPopstateEvent)(event)) return;\n\n    handlePop(getDOMLocation(event.state));\n  };\n\n  var handleHashChange = function handleHashChange() {\n    handlePop(getDOMLocation(getHistoryState()));\n  };\n\n  var forceNextPop = false;\n\n  var handlePop = function handlePop(location) {\n    if (forceNextPop) {\n      forceNextPop = false;\n      setState();\n    } else {\n      var action = 'POP';\n\n      transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n        if (ok) {\n          setState({ action: action, location: location });\n        } else {\n          revertPop(location);\n        }\n      });\n    }\n  };\n\n  var revertPop = function revertPop(fromLocation) {\n    var toLocation = history.location;\n\n    // TODO: We could probably make this more reliable by\n    // keeping a list of keys we've seen in sessionStorage.\n    // Instead, we just default to 0 for keys we don't know.\n\n    var toIndex = allKeys.indexOf(toLocation.key);\n\n    if (toIndex === -1) toIndex = 0;\n\n    var fromIndex = allKeys.indexOf(fromLocation.key);\n\n    if (fromIndex === -1) fromIndex = 0;\n\n    var delta = toIndex - fromIndex;\n\n    if (delta) {\n      forceNextPop = true;\n      go(delta);\n    }\n  };\n\n  var initialLocation = getDOMLocation(getHistoryState());\n  var allKeys = [initialLocation.key];\n\n  // Public interface\n\n  var createHref = function createHref(location) {\n    return basename + (0, _PathUtils.createPath)(location);\n  };\n\n  var push = function push(path, state) {\n    (0, _warning2.default)(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n    var action = 'PUSH';\n    var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var href = createHref(location);\n      var key = location.key,\n          state = location.state;\n\n\n      if (canUseHistory) {\n        globalHistory.pushState({ key: key, state: state }, null, href);\n\n        if (forceRefresh) {\n          window.location.href = href;\n        } else {\n          var prevIndex = allKeys.indexOf(history.location.key);\n          var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n          nextKeys.push(location.key);\n          allKeys = nextKeys;\n\n          setState({ action: action, location: location });\n        }\n      } else {\n        (0, _warning2.default)(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history');\n\n        window.location.href = href;\n      }\n    });\n  };\n\n  var replace = function replace(path, state) {\n    (0, _warning2.default)(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n    var action = 'REPLACE';\n    var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var href = createHref(location);\n      var key = location.key,\n          state = location.state;\n\n\n      if (canUseHistory) {\n        globalHistory.replaceState({ key: key, state: state }, null, href);\n\n        if (forceRefresh) {\n          window.location.replace(href);\n        } else {\n          var prevIndex = allKeys.indexOf(history.location.key);\n\n          if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n\n          setState({ action: action, location: location });\n        }\n      } else {\n        (0, _warning2.default)(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history');\n\n        window.location.replace(href);\n      }\n    });\n  };\n\n  var go = function go(n) {\n    globalHistory.go(n);\n  };\n\n  var goBack = function goBack() {\n    return go(-1);\n  };\n\n  var goForward = function goForward() {\n    return go(1);\n  };\n\n  var listenerCount = 0;\n\n  var checkDOMListeners = function checkDOMListeners(delta) {\n    listenerCount += delta;\n\n    if (listenerCount === 1) {\n      (0, _DOMUtils.addEventListener)(window, PopStateEvent, handlePopState);\n\n      if (needsHashChangeListener) (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleHashChange);\n    } else if (listenerCount === 0) {\n      (0, _DOMUtils.removeEventListener)(window, PopStateEvent, handlePopState);\n\n      if (needsHashChangeListener) (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleHashChange);\n    }\n  };\n\n  var isBlocked = false;\n\n  var block = function block() {\n    var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n    var unblock = transitionManager.setPrompt(prompt);\n\n    if (!isBlocked) {\n      checkDOMListeners(1);\n      isBlocked = true;\n    }\n\n    return function () {\n      if (isBlocked) {\n        isBlocked = false;\n        checkDOMListeners(-1);\n      }\n\n      return unblock();\n    };\n  };\n\n  var listen = function listen(listener) {\n    var unlisten = transitionManager.appendListener(listener);\n    checkDOMListeners(1);\n\n    return function () {\n      checkDOMListeners(-1);\n      unlisten();\n    };\n  };\n\n  var history = {\n    length: globalHistory.length,\n    action: 'POP',\n    location: initialLocation,\n    createHref: createHref,\n    push: push,\n    replace: replace,\n    go: go,\n    goBack: goBack,\n    goForward: goForward,\n    block: block,\n    listen: listen\n  };\n\n  return history;\n};\n\nexports.default = createBrowserHistory;","'use strict';\n\nexports.__esModule = true;\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar createTransitionManager = function createTransitionManager() {\n  var prompt = null;\n\n  var setPrompt = function setPrompt(nextPrompt) {\n    (0, _warning2.default)(prompt == null, 'A history supports only one prompt at a time');\n\n    prompt = nextPrompt;\n\n    return function () {\n      if (prompt === nextPrompt) prompt = null;\n    };\n  };\n\n  var confirmTransitionTo = function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n    // TODO: If another transition starts while we're still confirming\n    // the previous one, we may end up in a weird state. Figure out the\n    // best way to handle this.\n    if (prompt != null) {\n      var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n\n      if (typeof result === 'string') {\n        if (typeof getUserConfirmation === 'function') {\n          getUserConfirmation(result, callback);\n        } else {\n          (0, _warning2.default)(false, 'A history needs a getUserConfirmation function in order to use a prompt message');\n\n          callback(true);\n        }\n      } else {\n        // Return false from a transition hook to cancel the transition.\n        callback(result !== false);\n      }\n    } else {\n      callback(true);\n    }\n  };\n\n  var listeners = [];\n\n  var appendListener = function appendListener(fn) {\n    var isActive = true;\n\n    var listener = function listener() {\n      if (isActive) fn.apply(undefined, arguments);\n    };\n\n    listeners.push(listener);\n\n    return function () {\n      isActive = false;\n      listeners = listeners.filter(function (item) {\n        return item !== listener;\n      });\n    };\n  };\n\n  var notifyListeners = function notifyListeners() {\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    listeners.forEach(function (listener) {\n      return listener.apply(undefined, args);\n    });\n  };\n\n  return {\n    setPrompt: setPrompt,\n    confirmTransitionTo: confirmTransitionTo,\n    appendListener: appendListener,\n    notifyListeners: notifyListeners\n  };\n};\n\nexports.default = createTransitionManager;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n  if (process.env.NODE_ENV !== 'production') {\n    if (format === undefined) {\n      throw new Error('invariant requires an error message argument');\n    }\n  }\n\n  if (!condition) {\n    var error;\n    if (format === undefined) {\n      error = new Error(\n        'Minified exception occurred; use the non-minified dev environment ' +\n        'for the full error message and additional helpful warnings.'\n      );\n    } else {\n      var args = [a, b, c, d, e, f];\n      var argIndex = 0;\n      error = new Error(\n        format.replace(/%s/g, function() { return args[argIndex++]; })\n      );\n      error.name = 'Invariant Violation';\n    }\n\n    error.framesToPop = 1; // we don't care about invariant's own frame\n    throw error;\n  }\n};\n\nmodule.exports = invariant;\n","'use strict';\nvar utils = require('./utils');\nvar support = require('./support');\n// private property\nvar _keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\n\n// public method for encoding\nexports.encode = function(input) {\n    var output = [];\n    var chr1, chr2, chr3, enc1, enc2, enc3, enc4;\n    var i = 0, len = input.length, remainingBytes = len;\n\n    var isArray = utils.getTypeOf(input) !== \"string\";\n    while (i < input.length) {\n        remainingBytes = len - i;\n\n        if (!isArray) {\n            chr1 = input.charCodeAt(i++);\n            chr2 = i < len ? input.charCodeAt(i++) : 0;\n            chr3 = i < len ? input.charCodeAt(i++) : 0;\n        } else {\n            chr1 = input[i++];\n            chr2 = i < len ? input[i++] : 0;\n            chr3 = i < len ? input[i++] : 0;\n        }\n\n        enc1 = chr1 >> 2;\n        enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n        enc3 = remainingBytes > 1 ? (((chr2 & 15) << 2) | (chr3 >> 6)) : 64;\n        enc4 = remainingBytes > 2 ? (chr3 & 63) : 64;\n\n        output.push(_keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4));\n\n    }\n\n    return output.join(\"\");\n};\n\n// public method for decoding\nexports.decode = function(input) {\n    var chr1, chr2, chr3;\n    var enc1, enc2, enc3, enc4;\n    var i = 0, resultIndex = 0;\n\n    var dataUrlPrefix = \"data:\";\n\n    if (input.substr(0, dataUrlPrefix.length) === dataUrlPrefix) {\n        // This is a common error: people give a data url\n        // (data:image/png;base64,iVBOR...) with a {base64: true} and\n        // wonders why things don't work.\n        // We can detect that the string input looks like a data url but we\n        // *can't* be sure it is one: removing everything up to the comma would\n        // be too dangerous.\n        throw new Error(\"Invalid base64 input, it looks like a data url.\");\n    }\n\n    input = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, \"\");\n\n    var totalLength = input.length * 3 / 4;\n    if(input.charAt(input.length - 1) === _keyStr.charAt(64)) {\n        totalLength--;\n    }\n    if(input.charAt(input.length - 2) === _keyStr.charAt(64)) {\n        totalLength--;\n    }\n    if (totalLength % 1 !== 0) {\n        // totalLength is not an integer, the length does not match a valid\n        // base64 content. That can happen if:\n        // - the input is not a base64 content\n        // - the input is *almost* a base64 content, with a extra chars at the\n        //   beginning or at the end\n        // - the input uses a base64 variant (base64url for example)\n        throw new Error(\"Invalid base64 input, bad content length.\");\n    }\n    var output;\n    if (support.uint8array) {\n        output = new Uint8Array(totalLength|0);\n    } else {\n        output = new Array(totalLength|0);\n    }\n\n    while (i < input.length) {\n\n        enc1 = _keyStr.indexOf(input.charAt(i++));\n        enc2 = _keyStr.indexOf(input.charAt(i++));\n        enc3 = _keyStr.indexOf(input.charAt(i++));\n        enc4 = _keyStr.indexOf(input.charAt(i++));\n\n        chr1 = (enc1 << 2) | (enc2 >> 4);\n        chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);\n        chr3 = ((enc3 & 3) << 6) | enc4;\n\n        output[resultIndex++] = chr1;\n\n        if (enc3 !== 64) {\n            output[resultIndex++] = chr2;\n        }\n        if (enc4 !== 64) {\n            output[resultIndex++] = chr3;\n        }\n\n    }\n\n    return output;\n};\n","'use strict';\n\nvar external = require(\"./external\");\nvar DataWorker = require('./stream/DataWorker');\nvar DataLengthProbe = require('./stream/DataLengthProbe');\nvar Crc32Probe = require('./stream/Crc32Probe');\nvar DataLengthProbe = require('./stream/DataLengthProbe');\n\n/**\n * Represent a compressed object, with everything needed to decompress it.\n * @constructor\n * @param {number} compressedSize the size of the data compressed.\n * @param {number} uncompressedSize the size of the data after decompression.\n * @param {number} crc32 the crc32 of the decompressed file.\n * @param {object} compression the type of compression, see lib/compressions.js.\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the compressed data.\n */\nfunction CompressedObject(compressedSize, uncompressedSize, crc32, compression, data) {\n    this.compressedSize = compressedSize;\n    this.uncompressedSize = uncompressedSize;\n    this.crc32 = crc32;\n    this.compression = compression;\n    this.compressedContent = data;\n}\n\nCompressedObject.prototype = {\n    /**\n     * Create a worker to get the uncompressed content.\n     * @return {GenericWorker} the worker.\n     */\n    getContentWorker : function () {\n        var worker = new DataWorker(external.Promise.resolve(this.compressedContent))\n        .pipe(this.compression.uncompressWorker())\n        .pipe(new DataLengthProbe(\"data_length\"));\n\n        var that = this;\n        worker.on(\"end\", function () {\n            if(this.streamInfo['data_length'] !== that.uncompressedSize) {\n                throw new Error(\"Bug : uncompressed data size mismatch\");\n            }\n        });\n        return worker;\n    },\n    /**\n     * Create a worker to get the compressed content.\n     * @return {GenericWorker} the worker.\n     */\n    getCompressedWorker : function () {\n        return new DataWorker(external.Promise.resolve(this.compressedContent))\n        .withStreamInfo(\"compressedSize\", this.compressedSize)\n        .withStreamInfo(\"uncompressedSize\", this.uncompressedSize)\n        .withStreamInfo(\"crc32\", this.crc32)\n        .withStreamInfo(\"compression\", this.compression)\n        ;\n    }\n};\n\n/**\n * Chain the given worker with other workers to compress the content with the\n * given compresion.\n * @param {GenericWorker} uncompressedWorker the worker to pipe.\n * @param {Object} compression the compression object.\n * @param {Object} compressionOptions the options to use when compressing.\n * @return {GenericWorker} the new worker compressing the content.\n */\nCompressedObject.createWorkerFrom = function (uncompressedWorker, compression, compressionOptions) {\n    return uncompressedWorker\n    .pipe(new Crc32Probe())\n    .pipe(new DataLengthProbe(\"uncompressedSize\"))\n    .pipe(compression.compressWorker(compressionOptions))\n    .pipe(new DataLengthProbe(\"compressedSize\"))\n    .withStreamInfo(\"compression\", compression);\n};\n\nmodule.exports = CompressedObject;\n","'use strict';\n\nvar GenericWorker = require(\"./stream/GenericWorker\");\n\nexports.STORE = {\n    magic: \"\\x00\\x00\",\n    compressWorker : function (compressionOptions) {\n        return new GenericWorker(\"STORE compression\");\n    },\n    uncompressWorker : function () {\n        return new GenericWorker(\"STORE decompression\");\n    }\n};\nexports.DEFLATE = require('./flate');\n","'use strict';\n\nvar utils = require('./utils');\n\n/**\n * The following functions come from pako, from pako/lib/zlib/crc32.js\n * released under the MIT license, see pako https://github.com/nodeca/pako/\n */\n\n// Use ordinary array, since untyped makes no boost here\nfunction makeTable() {\n    var c, table = [];\n\n    for(var n =0; n < 256; n++){\n        c = n;\n        for(var k =0; k < 8; k++){\n            c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n        }\n        table[n] = c;\n    }\n\n    return table;\n}\n\n// Create table on load. Just 255 signed longs. Not a problem.\nvar crcTable = makeTable();\n\n\nfunction crc32(crc, buf, len, pos) {\n    var t = crcTable, end = pos + len;\n\n    crc = crc ^ (-1);\n\n    for (var i = pos; i < end; i++ ) {\n        crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n    }\n\n    return (crc ^ (-1)); // >>> 0;\n}\n\n// That's all for the pako functions.\n\n/**\n * Compute the crc32 of a string.\n * This is almost the same as the function crc32, but for strings. Using the\n * same function for the two use cases leads to horrible performances.\n * @param {Number} crc the starting value of the crc.\n * @param {String} str the string to use.\n * @param {Number} len the length of the string.\n * @param {Number} pos the starting position for the crc32 computation.\n * @return {Number} the computed crc32.\n */\nfunction crc32str(crc, str, len, pos) {\n    var t = crcTable, end = pos + len;\n\n    crc = crc ^ (-1);\n\n    for (var i = pos; i < end; i++ ) {\n        crc = (crc >>> 8) ^ t[(crc ^ str.charCodeAt(i)) & 0xFF];\n    }\n\n    return (crc ^ (-1)); // >>> 0;\n}\n\nmodule.exports = function crc32wrapper(input, crc) {\n    if (typeof input === \"undefined\" || !input.length) {\n        return 0;\n    }\n\n    var isArray = utils.getTypeOf(input) !== \"string\";\n\n    if(isArray) {\n        return crc32(crc|0, input, input.length, 0);\n    } else {\n        return crc32str(crc|0, input, input.length, 0);\n    }\n};\n","'use strict';\nexports.base64 = false;\nexports.binary = false;\nexports.dir = false;\nexports.createFolders = true;\nexports.date = null;\nexports.compression = null;\nexports.compressionOptions = null;\nexports.comment = null;\nexports.unixPermissions = null;\nexports.dosPermissions = null;\n","/* global Promise */\n'use strict';\n\n// load the global object first:\n// - it should be better integrated in the system (unhandledRejection in node)\n// - the environment may have a custom Promise implementation (see zone.js)\nvar ES6Promise = null;\nif (typeof Promise !== \"undefined\") {\n    ES6Promise = Promise;\n} else {\n    ES6Promise = require(\"lie\");\n}\n\n/**\n * Let the user use/change some implementations.\n */\nmodule.exports = {\n    Promise: ES6Promise\n};\n","'use strict';\nvar USE_TYPEDARRAY = (typeof Uint8Array !== 'undefined') && (typeof Uint16Array !== 'undefined') && (typeof Uint32Array !== 'undefined');\n\nvar pako = require(\"pako\");\nvar utils = require(\"./utils\");\nvar GenericWorker = require(\"./stream/GenericWorker\");\n\nvar ARRAY_TYPE = USE_TYPEDARRAY ? \"uint8array\" : \"array\";\n\nexports.magic = \"\\x08\\x00\";\n\n/**\n * Create a worker that uses pako to inflate/deflate.\n * @constructor\n * @param {String} action the name of the pako function to call : either \"Deflate\" or \"Inflate\".\n * @param {Object} options the options to use when (de)compressing.\n */\nfunction FlateWorker(action, options) {\n    GenericWorker.call(this, \"FlateWorker/\" + action);\n\n    this._pako = null;\n    this._pakoAction = action;\n    this._pakoOptions = options;\n    // the `meta` object from the last chunk received\n    // this allow this worker to pass around metadata\n    this.meta = {};\n}\n\nutils.inherits(FlateWorker, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nFlateWorker.prototype.processChunk = function (chunk) {\n    this.meta = chunk.meta;\n    if (this._pako === null) {\n        this._createPako();\n    }\n    this._pako.push(utils.transformTo(ARRAY_TYPE, chunk.data), false);\n};\n\n/**\n * @see GenericWorker.flush\n */\nFlateWorker.prototype.flush = function () {\n    GenericWorker.prototype.flush.call(this);\n    if (this._pako === null) {\n        this._createPako();\n    }\n    this._pako.push([], true);\n};\n/**\n * @see GenericWorker.cleanUp\n */\nFlateWorker.prototype.cleanUp = function () {\n    GenericWorker.prototype.cleanUp.call(this);\n    this._pako = null;\n};\n\n/**\n * Create the _pako object.\n * TODO: lazy-loading this object isn't the best solution but it's the\n * quickest. The best solution is to lazy-load the worker list. See also the\n * issue #446.\n */\nFlateWorker.prototype._createPako = function () {\n    this._pako = new pako[this._pakoAction]({\n        raw: true,\n        level: this._pakoOptions.level || -1 // default compression\n    });\n    var self = this;\n    this._pako.onData = function(data) {\n        self.push({\n            data : data,\n            meta : self.meta\n        });\n    };\n};\n\nexports.compressWorker = function (compressionOptions) {\n    return new FlateWorker(\"Deflate\", compressionOptions);\n};\nexports.uncompressWorker = function () {\n    return new FlateWorker(\"Inflate\", {});\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar GenericWorker = require('../stream/GenericWorker');\nvar utf8 = require('../utf8');\nvar crc32 = require('../crc32');\nvar signature = require('../signature');\n\n/**\n * Transform an integer into a string in hexadecimal.\n * @private\n * @param {number} dec the number to convert.\n * @param {number} bytes the number of bytes to generate.\n * @returns {string} the result.\n */\nvar decToHex = function(dec, bytes) {\n    var hex = \"\", i;\n    for (i = 0; i < bytes; i++) {\n        hex += String.fromCharCode(dec & 0xff);\n        dec = dec >>> 8;\n    }\n    return hex;\n};\n\n/**\n * Generate the UNIX part of the external file attributes.\n * @param {Object} unixPermissions the unix permissions or null.\n * @param {Boolean} isDir true if the entry is a directory, false otherwise.\n * @return {Number} a 32 bit integer.\n *\n * adapted from http://unix.stackexchange.com/questions/14705/the-zip-formats-external-file-attribute :\n *\n * TTTTsstrwxrwxrwx0000000000ADVSHR\n * ^^^^____________________________ file type, see zipinfo.c (UNX_*)\n *     ^^^_________________________ setuid, setgid, sticky\n *        ^^^^^^^^^________________ permissions\n *                 ^^^^^^^^^^______ not used ?\n *                           ^^^^^^ DOS attribute bits : Archive, Directory, Volume label, System file, Hidden, Read only\n */\nvar generateUnixExternalFileAttr = function (unixPermissions, isDir) {\n\n    var result = unixPermissions;\n    if (!unixPermissions) {\n        // I can't use octal values in strict mode, hence the hexa.\n        //  040775 => 0x41fd\n        // 0100664 => 0x81b4\n        result = isDir ? 0x41fd : 0x81b4;\n    }\n    return (result & 0xFFFF) << 16;\n};\n\n/**\n * Generate the DOS part of the external file attributes.\n * @param {Object} dosPermissions the dos permissions or null.\n * @param {Boolean} isDir true if the entry is a directory, false otherwise.\n * @return {Number} a 32 bit integer.\n *\n * Bit 0     Read-Only\n * Bit 1     Hidden\n * Bit 2     System\n * Bit 3     Volume Label\n * Bit 4     Directory\n * Bit 5     Archive\n */\nvar generateDosExternalFileAttr = function (dosPermissions, isDir) {\n\n    // the dir flag is already set for compatibility\n    return (dosPermissions || 0)  & 0x3F;\n};\n\n/**\n * Generate the various parts used in the construction of the final zip file.\n * @param {Object} streamInfo the hash with informations about the compressed file.\n * @param {Boolean} streamedContent is the content streamed ?\n * @param {Boolean} streamingEnded is the stream finished ?\n * @param {number} offset the current offset from the start of the zip file.\n * @param {String} platform let's pretend we are this platform (change platform dependents fields)\n * @param {Function} encodeFileName the function to encode the file name / comment.\n * @return {Object} the zip parts.\n */\nvar generateZipParts = function(streamInfo, streamedContent, streamingEnded, offset, platform, encodeFileName) {\n    var file = streamInfo['file'],\n    compression = streamInfo['compression'],\n    useCustomEncoding = encodeFileName !== utf8.utf8encode,\n    encodedFileName = utils.transformTo(\"string\", encodeFileName(file.name)),\n    utfEncodedFileName = utils.transformTo(\"string\", utf8.utf8encode(file.name)),\n    comment = file.comment,\n    encodedComment = utils.transformTo(\"string\", encodeFileName(comment)),\n    utfEncodedComment = utils.transformTo(\"string\", utf8.utf8encode(comment)),\n    useUTF8ForFileName = utfEncodedFileName.length !== file.name.length,\n    useUTF8ForComment = utfEncodedComment.length !== comment.length,\n    dosTime,\n    dosDate,\n    extraFields = \"\",\n    unicodePathExtraField = \"\",\n    unicodeCommentExtraField = \"\",\n    dir = file.dir,\n    date = file.date;\n\n\n    var dataInfo = {\n        crc32 : 0,\n        compressedSize : 0,\n        uncompressedSize : 0\n    };\n\n    // if the content is streamed, the sizes/crc32 are only available AFTER\n    // the end of the stream.\n    if (!streamedContent || streamingEnded) {\n        dataInfo.crc32 = streamInfo['crc32'];\n        dataInfo.compressedSize = streamInfo['compressedSize'];\n        dataInfo.uncompressedSize = streamInfo['uncompressedSize'];\n    }\n\n    var bitflag = 0;\n    if (streamedContent) {\n        // Bit 3: the sizes/crc32 are set to zero in the local header.\n        // The correct values are put in the data descriptor immediately\n        // following the compressed data.\n        bitflag |= 0x0008;\n    }\n    if (!useCustomEncoding && (useUTF8ForFileName || useUTF8ForComment)) {\n        // Bit 11: Language encoding flag (EFS).\n        bitflag |= 0x0800;\n    }\n\n\n    var extFileAttr = 0;\n    var versionMadeBy = 0;\n    if (dir) {\n        // dos or unix, we set the dos dir flag\n        extFileAttr |= 0x00010;\n    }\n    if(platform === \"UNIX\") {\n        versionMadeBy = 0x031E; // UNIX, version 3.0\n        extFileAttr |= generateUnixExternalFileAttr(file.unixPermissions, dir);\n    } else { // DOS or other, fallback to DOS\n        versionMadeBy = 0x0014; // DOS, version 2.0\n        extFileAttr |= generateDosExternalFileAttr(file.dosPermissions, dir);\n    }\n\n    // date\n    // @see http://www.delorie.com/djgpp/doc/rbinter/it/52/13.html\n    // @see http://www.delorie.com/djgpp/doc/rbinter/it/65/16.html\n    // @see http://www.delorie.com/djgpp/doc/rbinter/it/66/16.html\n\n    dosTime = date.getUTCHours();\n    dosTime = dosTime << 6;\n    dosTime = dosTime | date.getUTCMinutes();\n    dosTime = dosTime << 5;\n    dosTime = dosTime | date.getUTCSeconds() / 2;\n\n    dosDate = date.getUTCFullYear() - 1980;\n    dosDate = dosDate << 4;\n    dosDate = dosDate | (date.getUTCMonth() + 1);\n    dosDate = dosDate << 5;\n    dosDate = dosDate | date.getUTCDate();\n\n    if (useUTF8ForFileName) {\n        // set the unicode path extra field. unzip needs at least one extra\n        // field to correctly handle unicode path, so using the path is as good\n        // as any other information. This could improve the situation with\n        // other archive managers too.\n        // This field is usually used without the utf8 flag, with a non\n        // unicode path in the header (winrar, winzip). This helps (a bit)\n        // with the messy Windows' default compressed folders feature but\n        // breaks on p7zip which doesn't seek the unicode path extra field.\n        // So for now, UTF-8 everywhere !\n        unicodePathExtraField =\n            // Version\n            decToHex(1, 1) +\n            // NameCRC32\n            decToHex(crc32(encodedFileName), 4) +\n            // UnicodeName\n            utfEncodedFileName;\n\n        extraFields +=\n            // Info-ZIP Unicode Path Extra Field\n            \"\\x75\\x70\" +\n            // size\n            decToHex(unicodePathExtraField.length, 2) +\n            // content\n            unicodePathExtraField;\n    }\n\n    if(useUTF8ForComment) {\n\n        unicodeCommentExtraField =\n            // Version\n            decToHex(1, 1) +\n            // CommentCRC32\n            decToHex(crc32(encodedComment), 4) +\n            // UnicodeName\n            utfEncodedComment;\n\n        extraFields +=\n            // Info-ZIP Unicode Path Extra Field\n            \"\\x75\\x63\" +\n            // size\n            decToHex(unicodeCommentExtraField.length, 2) +\n            // content\n            unicodeCommentExtraField;\n    }\n\n    var header = \"\";\n\n    // version needed to extract\n    header += \"\\x0A\\x00\";\n    // general purpose bit flag\n    header += decToHex(bitflag, 2);\n    // compression method\n    header += compression.magic;\n    // last mod file time\n    header += decToHex(dosTime, 2);\n    // last mod file date\n    header += decToHex(dosDate, 2);\n    // crc-32\n    header += decToHex(dataInfo.crc32, 4);\n    // compressed size\n    header += decToHex(dataInfo.compressedSize, 4);\n    // uncompressed size\n    header += decToHex(dataInfo.uncompressedSize, 4);\n    // file name length\n    header += decToHex(encodedFileName.length, 2);\n    // extra field length\n    header += decToHex(extraFields.length, 2);\n\n\n    var fileRecord = signature.LOCAL_FILE_HEADER + header + encodedFileName + extraFields;\n\n    var dirRecord = signature.CENTRAL_FILE_HEADER +\n        // version made by (00: DOS)\n        decToHex(versionMadeBy, 2) +\n        // file header (common to file and central directory)\n        header +\n        // file comment length\n        decToHex(encodedComment.length, 2) +\n        // disk number start\n        \"\\x00\\x00\" +\n        // internal file attributes TODO\n        \"\\x00\\x00\" +\n        // external file attributes\n        decToHex(extFileAttr, 4) +\n        // relative offset of local header\n        decToHex(offset, 4) +\n        // file name\n        encodedFileName +\n        // extra field\n        extraFields +\n        // file comment\n        encodedComment;\n\n    return {\n        fileRecord: fileRecord,\n        dirRecord: dirRecord\n    };\n};\n\n/**\n * Generate the EOCD record.\n * @param {Number} entriesCount the number of entries in the zip file.\n * @param {Number} centralDirLength the length (in bytes) of the central dir.\n * @param {Number} localDirLength the length (in bytes) of the local dir.\n * @param {String} comment the zip file comment as a binary string.\n * @param {Function} encodeFileName the function to encode the comment.\n * @return {String} the EOCD record.\n */\nvar generateCentralDirectoryEnd = function (entriesCount, centralDirLength, localDirLength, comment, encodeFileName) {\n    var dirEnd = \"\";\n    var encodedComment = utils.transformTo(\"string\", encodeFileName(comment));\n\n    // end of central dir signature\n    dirEnd = signature.CENTRAL_DIRECTORY_END +\n        // number of this disk\n        \"\\x00\\x00\" +\n        // number of the disk with the start of the central directory\n        \"\\x00\\x00\" +\n        // total number of entries in the central directory on this disk\n        decToHex(entriesCount, 2) +\n        // total number of entries in the central directory\n        decToHex(entriesCount, 2) +\n        // size of the central directory   4 bytes\n        decToHex(centralDirLength, 4) +\n        // offset of start of central directory with respect to the starting disk number\n        decToHex(localDirLength, 4) +\n        // .ZIP file comment length\n        decToHex(encodedComment.length, 2) +\n        // .ZIP file comment\n        encodedComment;\n\n    return dirEnd;\n};\n\n/**\n * Generate data descriptors for a file entry.\n * @param {Object} streamInfo the hash generated by a worker, containing informations\n * on the file entry.\n * @return {String} the data descriptors.\n */\nvar generateDataDescriptors = function (streamInfo) {\n    var descriptor = \"\";\n    descriptor = signature.DATA_DESCRIPTOR +\n        // crc-32                          4 bytes\n        decToHex(streamInfo['crc32'], 4) +\n        // compressed size                 4 bytes\n        decToHex(streamInfo['compressedSize'], 4) +\n        // uncompressed size               4 bytes\n        decToHex(streamInfo['uncompressedSize'], 4);\n\n    return descriptor;\n};\n\n\n/**\n * A worker to concatenate other workers to create a zip file.\n * @param {Boolean} streamFiles `true` to stream the content of the files,\n * `false` to accumulate it.\n * @param {String} comment the comment to use.\n * @param {String} platform the platform to use, \"UNIX\" or \"DOS\".\n * @param {Function} encodeFileName the function to encode file names and comments.\n */\nfunction ZipFileWorker(streamFiles, comment, platform, encodeFileName) {\n    GenericWorker.call(this, \"ZipFileWorker\");\n    // The number of bytes written so far. This doesn't count accumulated chunks.\n    this.bytesWritten = 0;\n    // The comment of the zip file\n    this.zipComment = comment;\n    // The platform \"generating\" the zip file.\n    this.zipPlatform = platform;\n    // the function to encode file names and comments.\n    this.encodeFileName = encodeFileName;\n    // Should we stream the content of the files ?\n    this.streamFiles = streamFiles;\n    // If `streamFiles` is false, we will need to accumulate the content of the\n    // files to calculate sizes / crc32 (and write them *before* the content).\n    // This boolean indicates if we are accumulating chunks (it will change a lot\n    // during the lifetime of this worker).\n    this.accumulate = false;\n    // The buffer receiving chunks when accumulating content.\n    this.contentBuffer = [];\n    // The list of generated directory records.\n    this.dirRecords = [];\n    // The offset (in bytes) from the beginning of the zip file for the current source.\n    this.currentSourceOffset = 0;\n    // The total number of entries in this zip file.\n    this.entriesCount = 0;\n    // the name of the file currently being added, null when handling the end of the zip file.\n    // Used for the emited metadata.\n    this.currentFile = null;\n\n\n\n    this._sources = [];\n}\nutils.inherits(ZipFileWorker, GenericWorker);\n\n/**\n * @see GenericWorker.push\n */\nZipFileWorker.prototype.push = function (chunk) {\n\n    var currentFilePercent = chunk.meta.percent || 0;\n    var entriesCount = this.entriesCount;\n    var remainingFiles = this._sources.length;\n\n    if(this.accumulate) {\n        this.contentBuffer.push(chunk);\n    } else {\n        this.bytesWritten += chunk.data.length;\n\n        GenericWorker.prototype.push.call(this, {\n            data : chunk.data,\n            meta : {\n                currentFile : this.currentFile,\n                percent : entriesCount ? (currentFilePercent + 100 * (entriesCount - remainingFiles - 1)) / entriesCount : 100\n            }\n        });\n    }\n};\n\n/**\n * The worker started a new source (an other worker).\n * @param {Object} streamInfo the streamInfo object from the new source.\n */\nZipFileWorker.prototype.openedSource = function (streamInfo) {\n    this.currentSourceOffset = this.bytesWritten;\n    this.currentFile = streamInfo['file'].name;\n\n    var streamedContent = this.streamFiles && !streamInfo['file'].dir;\n\n    // don't stream folders (because they don't have any content)\n    if(streamedContent) {\n        var record = generateZipParts(streamInfo, streamedContent, false, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);\n        this.push({\n            data : record.fileRecord,\n            meta : {percent:0}\n        });\n    } else {\n        // we need to wait for the whole file before pushing anything\n        this.accumulate = true;\n    }\n};\n\n/**\n * The worker finished a source (an other worker).\n * @param {Object} streamInfo the streamInfo object from the finished source.\n */\nZipFileWorker.prototype.closedSource = function (streamInfo) {\n    this.accumulate = false;\n    var streamedContent = this.streamFiles && !streamInfo['file'].dir;\n    var record = generateZipParts(streamInfo, streamedContent, true, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);\n\n    this.dirRecords.push(record.dirRecord);\n    if(streamedContent) {\n        // after the streamed file, we put data descriptors\n        this.push({\n            data : generateDataDescriptors(streamInfo),\n            meta : {percent:100}\n        });\n    } else {\n        // the content wasn't streamed, we need to push everything now\n        // first the file record, then the content\n        this.push({\n            data : record.fileRecord,\n            meta : {percent:0}\n        });\n        while(this.contentBuffer.length) {\n            this.push(this.contentBuffer.shift());\n        }\n    }\n    this.currentFile = null;\n};\n\n/**\n * @see GenericWorker.flush\n */\nZipFileWorker.prototype.flush = function () {\n\n    var localDirLength = this.bytesWritten;\n    for(var i = 0; i < this.dirRecords.length; i++) {\n        this.push({\n            data : this.dirRecords[i],\n            meta : {percent:100}\n        });\n    }\n    var centralDirLength = this.bytesWritten - localDirLength;\n\n    var dirEnd = generateCentralDirectoryEnd(this.dirRecords.length, centralDirLength, localDirLength, this.zipComment, this.encodeFileName);\n\n    this.push({\n        data : dirEnd,\n        meta : {percent:100}\n    });\n};\n\n/**\n * Prepare the next source to be read.\n */\nZipFileWorker.prototype.prepareNextSource = function () {\n    this.previous = this._sources.shift();\n    this.openedSource(this.previous.streamInfo);\n    if (this.isPaused) {\n        this.previous.pause();\n    } else {\n        this.previous.resume();\n    }\n};\n\n/**\n * @see GenericWorker.registerPrevious\n */\nZipFileWorker.prototype.registerPrevious = function (previous) {\n    this._sources.push(previous);\n    var self = this;\n\n    previous.on('data', function (chunk) {\n        self.processChunk(chunk);\n    });\n    previous.on('end', function () {\n        self.closedSource(self.previous.streamInfo);\n        if(self._sources.length) {\n            self.prepareNextSource();\n        } else {\n            self.end();\n        }\n    });\n    previous.on('error', function (e) {\n        self.error(e);\n    });\n    return this;\n};\n\n/**\n * @see GenericWorker.resume\n */\nZipFileWorker.prototype.resume = function () {\n    if(!GenericWorker.prototype.resume.call(this)) {\n        return false;\n    }\n\n    if (!this.previous && this._sources.length) {\n        this.prepareNextSource();\n        return true;\n    }\n    if (!this.previous && !this._sources.length && !this.generatedError) {\n        this.end();\n        return true;\n    }\n};\n\n/**\n * @see GenericWorker.error\n */\nZipFileWorker.prototype.error = function (e) {\n    var sources = this._sources;\n    if(!GenericWorker.prototype.error.call(this, e)) {\n        return false;\n    }\n    for(var i = 0; i < sources.length; i++) {\n        try {\n            sources[i].error(e);\n        } catch(e) {\n            // the `error` exploded, nothing to do\n        }\n    }\n    return true;\n};\n\n/**\n * @see GenericWorker.lock\n */\nZipFileWorker.prototype.lock = function () {\n    GenericWorker.prototype.lock.call(this);\n    var sources = this._sources;\n    for(var i = 0; i < sources.length; i++) {\n        sources[i].lock();\n    }\n};\n\nmodule.exports = ZipFileWorker;\n","'use strict';\n\nvar compressions = require('../compressions');\nvar ZipFileWorker = require('./ZipFileWorker');\n\n/**\n * Find the compression to use.\n * @param {String} fileCompression the compression defined at the file level, if any.\n * @param {String} zipCompression the compression defined at the load() level.\n * @return {Object} the compression object to use.\n */\nvar getCompression = function (fileCompression, zipCompression) {\n\n    var compressionName = fileCompression || zipCompression;\n    var compression = compressions[compressionName];\n    if (!compression) {\n        throw new Error(compressionName + \" is not a valid compression method !\");\n    }\n    return compression;\n};\n\n/**\n * Create a worker to generate a zip file.\n * @param {JSZip} zip the JSZip instance at the right root level.\n * @param {Object} options to generate the zip file.\n * @param {String} comment the comment to use.\n */\nexports.generateWorker = function (zip, options, comment) {\n\n    var zipFileWorker = new ZipFileWorker(options.streamFiles, comment, options.platform, options.encodeFileName);\n    var entriesCount = 0;\n    try {\n\n        zip.forEach(function (relativePath, file) {\n            entriesCount++;\n            var compression = getCompression(file.options.compression, options.compression);\n            var compressionOptions = file.options.compressionOptions || options.compressionOptions || {};\n            var dir = file.dir, date = file.date;\n\n            file._compressWorker(compression, compressionOptions)\n            .withStreamInfo(\"file\", {\n                name : relativePath,\n                dir : dir,\n                date : date,\n                comment : file.comment || \"\",\n                unixPermissions : file.unixPermissions,\n                dosPermissions : file.dosPermissions\n            })\n            .pipe(zipFileWorker);\n        });\n        zipFileWorker.entriesCount = entriesCount;\n    } catch (e) {\n        zipFileWorker.error(e);\n    }\n\n    return zipFileWorker;\n};\n","'use strict';\n\n/**\n * Representation a of zip file in js\n * @constructor\n */\nfunction JSZip() {\n    // if this constructor is used without `new`, it adds `new` before itself:\n    if(!(this instanceof JSZip)) {\n        return new JSZip();\n    }\n\n    if(arguments.length) {\n        throw new Error(\"The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.\");\n    }\n\n    // object containing the files :\n    // {\n    //   \"folder/\" : {...},\n    //   \"folder/data.txt\" : {...}\n    // }\n    this.files = {};\n\n    this.comment = null;\n\n    // Where we are in the hierarchy\n    this.root = \"\";\n    this.clone = function() {\n        var newObj = new JSZip();\n        for (var i in this) {\n            if (typeof this[i] !== \"function\") {\n                newObj[i] = this[i];\n            }\n        }\n        return newObj;\n    };\n}\nJSZip.prototype = require('./object');\nJSZip.prototype.loadAsync = require('./load');\nJSZip.support = require('./support');\nJSZip.defaults = require('./defaults');\n\n// TODO find a better way to handle this version,\n// a require('package.json').version doesn't work with webpack, see #327\nJSZip.version = \"3.1.5\";\n\nJSZip.loadAsync = function (content, options) {\n    return new JSZip().loadAsync(content, options);\n};\n\nJSZip.external = require(\"./external\");\nmodule.exports = JSZip;\n","'use strict';\nvar utils = require('./utils');\nvar external = require(\"./external\");\nvar utf8 = require('./utf8');\nvar utils = require('./utils');\nvar ZipEntries = require('./zipEntries');\nvar Crc32Probe = require('./stream/Crc32Probe');\nvar nodejsUtils = require(\"./nodejsUtils\");\n\n/**\n * Check the CRC32 of an entry.\n * @param {ZipEntry} zipEntry the zip entry to check.\n * @return {Promise} the result.\n */\nfunction checkEntryCRC32(zipEntry) {\n    return new external.Promise(function (resolve, reject) {\n        var worker = zipEntry.decompressed.getContentWorker().pipe(new Crc32Probe());\n        worker.on(\"error\", function (e) {\n            reject(e);\n        })\n        .on(\"end\", function () {\n            if (worker.streamInfo.crc32 !== zipEntry.decompressed.crc32) {\n                reject(new Error(\"Corrupted zip : CRC32 mismatch\"));\n            } else {\n                resolve();\n            }\n        })\n        .resume();\n    });\n}\n\nmodule.exports = function(data, options) {\n    var zip = this;\n    options = utils.extend(options || {}, {\n        base64: false,\n        checkCRC32: false,\n        optimizedBinaryString: false,\n        createFolders: false,\n        decodeFileName: utf8.utf8decode\n    });\n\n    if (nodejsUtils.isNode && nodejsUtils.isStream(data)) {\n        return external.Promise.reject(new Error(\"JSZip can't accept a stream when loading a zip file.\"));\n    }\n\n    return utils.prepareContent(\"the loaded zip file\", data, true, options.optimizedBinaryString, options.base64)\n    .then(function(data) {\n        var zipEntries = new ZipEntries(options);\n        zipEntries.load(data);\n        return zipEntries;\n    }).then(function checkCRC32(zipEntries) {\n        var promises = [external.Promise.resolve(zipEntries)];\n        var files = zipEntries.files;\n        if (options.checkCRC32) {\n            for (var i = 0; i < files.length; i++) {\n                promises.push(checkEntryCRC32(files[i]));\n            }\n        }\n        return external.Promise.all(promises);\n    }).then(function addFiles(results) {\n        var zipEntries = results.shift();\n        var files = zipEntries.files;\n        for (var i = 0; i < files.length; i++) {\n            var input = files[i];\n            zip.file(input.fileNameStr, input.decompressed, {\n                binary: true,\n                optimizedBinaryString: true,\n                date: input.date,\n                dir: input.dir,\n                comment : input.fileCommentStr.length ? input.fileCommentStr : null,\n                unixPermissions : input.unixPermissions,\n                dosPermissions : input.dosPermissions,\n                createFolders: options.createFolders\n            });\n        }\n        if (zipEntries.zipComment.length) {\n            zip.comment = zipEntries.zipComment;\n        }\n\n        return zip;\n    });\n};\n","\"use strict\";\n\nvar utils = require('../utils');\nvar GenericWorker = require('../stream/GenericWorker');\n\n/**\n * A worker that use a nodejs stream as source.\n * @constructor\n * @param {String} filename the name of the file entry for this stream.\n * @param {Readable} stream the nodejs stream.\n */\nfunction NodejsStreamInputAdapter(filename, stream) {\n    GenericWorker.call(this, \"Nodejs stream input adapter for \" + filename);\n    this._upstreamEnded = false;\n    this._bindStream(stream);\n}\n\nutils.inherits(NodejsStreamInputAdapter, GenericWorker);\n\n/**\n * Prepare the stream and bind the callbacks on it.\n * Do this ASAP on node 0.10 ! A lazy binding doesn't always work.\n * @param {Stream} stream the nodejs stream to use.\n */\nNodejsStreamInputAdapter.prototype._bindStream = function (stream) {\n    var self = this;\n    this._stream = stream;\n    stream.pause();\n    stream\n    .on(\"data\", function (chunk) {\n        self.push({\n            data: chunk,\n            meta : {\n                percent : 0\n            }\n        });\n    })\n    .on(\"error\", function (e) {\n        if(self.isPaused) {\n            this.generatedError = e;\n        } else {\n            self.error(e);\n        }\n    })\n    .on(\"end\", function () {\n        if(self.isPaused) {\n            self._upstreamEnded = true;\n        } else {\n            self.end();\n        }\n    });\n};\nNodejsStreamInputAdapter.prototype.pause = function () {\n    if(!GenericWorker.prototype.pause.call(this)) {\n        return false;\n    }\n    this._stream.pause();\n    return true;\n};\nNodejsStreamInputAdapter.prototype.resume = function () {\n    if(!GenericWorker.prototype.resume.call(this)) {\n        return false;\n    }\n\n    if(this._upstreamEnded) {\n        this.end();\n    } else {\n        this._stream.resume();\n    }\n\n    return true;\n};\n\nmodule.exports = NodejsStreamInputAdapter;\n","'use strict';\n\nvar Readable = require('readable-stream').Readable;\n\nvar utils = require('../utils');\nutils.inherits(NodejsStreamOutputAdapter, Readable);\n\n/**\n* A nodejs stream using a worker as source.\n* @see the SourceWrapper in http://nodejs.org/api/stream.html\n* @constructor\n* @param {StreamHelper} helper the helper wrapping the worker\n* @param {Object} options the nodejs stream options\n* @param {Function} updateCb the update callback.\n*/\nfunction NodejsStreamOutputAdapter(helper, options, updateCb) {\n    Readable.call(this, options);\n    this._helper = helper;\n\n    var self = this;\n    helper.on(\"data\", function (data, meta) {\n        if (!self.push(data)) {\n            self._helper.pause();\n        }\n        if(updateCb) {\n            updateCb(meta);\n        }\n    })\n    .on(\"error\", function(e) {\n        self.emit('error', e);\n    })\n    .on(\"end\", function () {\n        self.push(null);\n    });\n}\n\n\nNodejsStreamOutputAdapter.prototype._read = function() {\n    this._helper.resume();\n};\n\nmodule.exports = NodejsStreamOutputAdapter;\n","'use strict';\n\nmodule.exports = {\n    /**\n     * True if this is running in Nodejs, will be undefined in a browser.\n     * In a browser, browserify won't include this file and the whole module\n     * will be resolved an empty object.\n     */\n    isNode : typeof Buffer !== \"undefined\",\n    /**\n     * Create a new nodejs Buffer from an existing content.\n     * @param {Object} data the data to pass to the constructor.\n     * @param {String} encoding the encoding to use.\n     * @return {Buffer} a new Buffer.\n     */\n    newBufferFrom: function(data, encoding) {\n        // XXX We can't use `Buffer.from` which comes from `Uint8Array.from`\n        // in nodejs v4 (< v.4.5). It's not the expected implementation (and\n        // has a different signature).\n        // see https://github.com/nodejs/node/issues/8053\n        // A condition on nodejs' version won't solve the issue as we don't\n        // control the Buffer polyfills that may or may not be used.\n        return new Buffer(data, encoding);\n    },\n    /**\n     * Create a new nodejs Buffer with the specified size.\n     * @param {Integer} size the size of the buffer.\n     * @return {Buffer} a new Buffer.\n     */\n    allocBuffer: function (size) {\n        if (Buffer.alloc) {\n            return Buffer.alloc(size);\n        } else {\n            return new Buffer(size);\n        }\n    },\n    /**\n     * Find out if an object is a Buffer.\n     * @param {Object} b the object to test.\n     * @return {Boolean} true if the object is a Buffer, false otherwise.\n     */\n    isBuffer : function(b){\n        return Buffer.isBuffer(b);\n    },\n\n    isStream : function (obj) {\n        return obj &&\n            typeof obj.on === \"function\" &&\n            typeof obj.pause === \"function\" &&\n            typeof obj.resume === \"function\";\n    }\n};\n","'use strict';\nvar utf8 = require('./utf8');\nvar utils = require('./utils');\nvar GenericWorker = require('./stream/GenericWorker');\nvar StreamHelper = require('./stream/StreamHelper');\nvar defaults = require('./defaults');\nvar CompressedObject = require('./compressedObject');\nvar ZipObject = require('./zipObject');\nvar generate = require(\"./generate\");\nvar nodejsUtils = require(\"./nodejsUtils\");\nvar NodejsStreamInputAdapter = require(\"./nodejs/NodejsStreamInputAdapter\");\n\n\n/**\n * Add a file in the current folder.\n * @private\n * @param {string} name the name of the file\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data of the file\n * @param {Object} originalOptions the options of the file\n * @return {Object} the new file.\n */\nvar fileAdd = function(name, data, originalOptions) {\n    // be sure sub folders exist\n    var dataType = utils.getTypeOf(data),\n        parent;\n\n\n    /*\n     * Correct options.\n     */\n\n    var o = utils.extend(originalOptions || {}, defaults);\n    o.date = o.date || new Date();\n    if (o.compression !== null) {\n        o.compression = o.compression.toUpperCase();\n    }\n\n    if (typeof o.unixPermissions === \"string\") {\n        o.unixPermissions = parseInt(o.unixPermissions, 8);\n    }\n\n    // UNX_IFDIR  0040000 see zipinfo.c\n    if (o.unixPermissions && (o.unixPermissions & 0x4000)) {\n        o.dir = true;\n    }\n    // Bit 4    Directory\n    if (o.dosPermissions && (o.dosPermissions & 0x0010)) {\n        o.dir = true;\n    }\n\n    if (o.dir) {\n        name = forceTrailingSlash(name);\n    }\n    if (o.createFolders && (parent = parentFolder(name))) {\n        folderAdd.call(this, parent, true);\n    }\n\n    var isUnicodeString = dataType === \"string\" && o.binary === false && o.base64 === false;\n    if (!originalOptions || typeof originalOptions.binary === \"undefined\") {\n        o.binary = !isUnicodeString;\n    }\n\n\n    var isCompressedEmpty = (data instanceof CompressedObject) && data.uncompressedSize === 0;\n\n    if (isCompressedEmpty || o.dir || !data || data.length === 0) {\n        o.base64 = false;\n        o.binary = true;\n        data = \"\";\n        o.compression = \"STORE\";\n        dataType = \"string\";\n    }\n\n    /*\n     * Convert content to fit.\n     */\n\n    var zipObjectContent = null;\n    if (data instanceof CompressedObject || data instanceof GenericWorker) {\n        zipObjectContent = data;\n    } else if (nodejsUtils.isNode && nodejsUtils.isStream(data)) {\n        zipObjectContent = new NodejsStreamInputAdapter(name, data);\n    } else {\n        zipObjectContent = utils.prepareContent(name, data, o.binary, o.optimizedBinaryString, o.base64);\n    }\n\n    var object = new ZipObject(name, zipObjectContent, o);\n    this.files[name] = object;\n    /*\n    TODO: we can't throw an exception because we have async promises\n    (we can have a promise of a Date() for example) but returning a\n    promise is useless because file(name, data) returns the JSZip\n    object for chaining. Should we break that to allow the user\n    to catch the error ?\n\n    return external.Promise.resolve(zipObjectContent)\n    .then(function () {\n        return object;\n    });\n    */\n};\n\n/**\n * Find the parent folder of the path.\n * @private\n * @param {string} path the path to use\n * @return {string} the parent folder, or \"\"\n */\nvar parentFolder = function (path) {\n    if (path.slice(-1) === '/') {\n        path = path.substring(0, path.length - 1);\n    }\n    var lastSlash = path.lastIndexOf('/');\n    return (lastSlash > 0) ? path.substring(0, lastSlash) : \"\";\n};\n\n/**\n * Returns the path with a slash at the end.\n * @private\n * @param {String} path the path to check.\n * @return {String} the path with a trailing slash.\n */\nvar forceTrailingSlash = function(path) {\n    // Check the name ends with a /\n    if (path.slice(-1) !== \"/\") {\n        path += \"/\"; // IE doesn't like substr(-1)\n    }\n    return path;\n};\n\n/**\n * Add a (sub) folder in the current folder.\n * @private\n * @param {string} name the folder's name\n * @param {boolean=} [createFolders] If true, automatically create sub\n *  folders. Defaults to false.\n * @return {Object} the new folder.\n */\nvar folderAdd = function(name, createFolders) {\n    createFolders = (typeof createFolders !== 'undefined') ? createFolders : defaults.createFolders;\n\n    name = forceTrailingSlash(name);\n\n    // Does this folder already exist?\n    if (!this.files[name]) {\n        fileAdd.call(this, name, null, {\n            dir: true,\n            createFolders: createFolders\n        });\n    }\n    return this.files[name];\n};\n\n/**\n* Cross-window, cross-Node-context regular expression detection\n* @param  {Object}  object Anything\n* @return {Boolean}        true if the object is a regular expression,\n* false otherwise\n*/\nfunction isRegExp(object) {\n    return Object.prototype.toString.call(object) === \"[object RegExp]\";\n}\n\n// return the actual prototype of JSZip\nvar out = {\n    /**\n     * @see loadAsync\n     */\n    load: function() {\n        throw new Error(\"This method has been removed in JSZip 3.0, please check the upgrade guide.\");\n    },\n\n\n    /**\n     * Call a callback function for each entry at this folder level.\n     * @param {Function} cb the callback function:\n     * function (relativePath, file) {...}\n     * It takes 2 arguments : the relative path and the file.\n     */\n    forEach: function(cb) {\n        var filename, relativePath, file;\n        for (filename in this.files) {\n            if (!this.files.hasOwnProperty(filename)) {\n                continue;\n            }\n            file = this.files[filename];\n            relativePath = filename.slice(this.root.length, filename.length);\n            if (relativePath && filename.slice(0, this.root.length) === this.root) { // the file is in the current root\n                cb(relativePath, file); // TODO reverse the parameters ? need to be clean AND consistent with the filter search fn...\n            }\n        }\n    },\n\n    /**\n     * Filter nested files/folders with the specified function.\n     * @param {Function} search the predicate to use :\n     * function (relativePath, file) {...}\n     * It takes 2 arguments : the relative path and the file.\n     * @return {Array} An array of matching elements.\n     */\n    filter: function(search) {\n        var result = [];\n        this.forEach(function (relativePath, entry) {\n            if (search(relativePath, entry)) { // the file matches the function\n                result.push(entry);\n            }\n\n        });\n        return result;\n    },\n\n    /**\n     * Add a file to the zip file, or search a file.\n     * @param   {string|RegExp} name The name of the file to add (if data is defined),\n     * the name of the file to find (if no data) or a regex to match files.\n     * @param   {String|ArrayBuffer|Uint8Array|Buffer} data  The file data, either raw or base64 encoded\n     * @param   {Object} o     File options\n     * @return  {JSZip|Object|Array} this JSZip object (when adding a file),\n     * a file (when searching by string) or an array of files (when searching by regex).\n     */\n    file: function(name, data, o) {\n        if (arguments.length === 1) {\n            if (isRegExp(name)) {\n                var regexp = name;\n                return this.filter(function(relativePath, file) {\n                    return !file.dir && regexp.test(relativePath);\n                });\n            }\n            else { // text\n                var obj = this.files[this.root + name];\n                if (obj && !obj.dir) {\n                    return obj;\n                } else {\n                    return null;\n                }\n            }\n        }\n        else { // more than one argument : we have data !\n            name = this.root + name;\n            fileAdd.call(this, name, data, o);\n        }\n        return this;\n    },\n\n    /**\n     * Add a directory to the zip file, or search.\n     * @param   {String|RegExp} arg The name of the directory to add, or a regex to search folders.\n     * @return  {JSZip} an object with the new directory as the root, or an array containing matching folders.\n     */\n    folder: function(arg) {\n        if (!arg) {\n            return this;\n        }\n\n        if (isRegExp(arg)) {\n            return this.filter(function(relativePath, file) {\n                return file.dir && arg.test(relativePath);\n            });\n        }\n\n        // else, name is a new folder\n        var name = this.root + arg;\n        var newFolder = folderAdd.call(this, name);\n\n        // Allow chaining by returning a new object with this folder as the root\n        var ret = this.clone();\n        ret.root = newFolder.name;\n        return ret;\n    },\n\n    /**\n     * Delete a file, or a directory and all sub-files, from the zip\n     * @param {string} name the name of the file to delete\n     * @return {JSZip} this JSZip object\n     */\n    remove: function(name) {\n        name = this.root + name;\n        var file = this.files[name];\n        if (!file) {\n            // Look for any folders\n            if (name.slice(-1) !== \"/\") {\n                name += \"/\";\n            }\n            file = this.files[name];\n        }\n\n        if (file && !file.dir) {\n            // file\n            delete this.files[name];\n        } else {\n            // maybe a folder, delete recursively\n            var kids = this.filter(function(relativePath, file) {\n                return file.name.slice(0, name.length) === name;\n            });\n            for (var i = 0; i < kids.length; i++) {\n                delete this.files[kids[i].name];\n            }\n        }\n\n        return this;\n    },\n\n    /**\n     * Generate the complete zip file\n     * @param {Object} options the options to generate the zip file :\n     * - compression, \"STORE\" by default.\n     * - type, \"base64\" by default. Values are : string, base64, uint8array, arraybuffer, blob.\n     * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the zip file\n     */\n    generate: function(options) {\n        throw new Error(\"This method has been removed in JSZip 3.0, please check the upgrade guide.\");\n    },\n\n    /**\n     * Generate the complete zip file as an internal stream.\n     * @param {Object} options the options to generate the zip file :\n     * - compression, \"STORE\" by default.\n     * - type, \"base64\" by default. Values are : string, base64, uint8array, arraybuffer, blob.\n     * @return {StreamHelper} the streamed zip file.\n     */\n    generateInternalStream: function(options) {\n      var worker, opts = {};\n      try {\n          opts = utils.extend(options || {}, {\n              streamFiles: false,\n              compression: \"STORE\",\n              compressionOptions : null,\n              type: \"\",\n              platform: \"DOS\",\n              comment: null,\n              mimeType: 'application/zip',\n              encodeFileName: utf8.utf8encode\n          });\n\n          opts.type = opts.type.toLowerCase();\n          opts.compression = opts.compression.toUpperCase();\n\n          // \"binarystring\" is prefered but the internals use \"string\".\n          if(opts.type === \"binarystring\") {\n            opts.type = \"string\";\n          }\n\n          if (!opts.type) {\n            throw new Error(\"No output type specified.\");\n          }\n\n          utils.checkSupport(opts.type);\n\n          // accept nodejs `process.platform`\n          if(\n              opts.platform === 'darwin' ||\n              opts.platform === 'freebsd' ||\n              opts.platform === 'linux' ||\n              opts.platform === 'sunos'\n          ) {\n              opts.platform = \"UNIX\";\n          }\n          if (opts.platform === 'win32') {\n              opts.platform = \"DOS\";\n          }\n\n          var comment = opts.comment || this.comment || \"\";\n          worker = generate.generateWorker(this, opts, comment);\n      } catch (e) {\n        worker = new GenericWorker(\"error\");\n        worker.error(e);\n      }\n      return new StreamHelper(worker, opts.type || \"string\", opts.mimeType);\n    },\n    /**\n     * Generate the complete zip file asynchronously.\n     * @see generateInternalStream\n     */\n    generateAsync: function(options, onUpdate) {\n        return this.generateInternalStream(options).accumulate(onUpdate);\n    },\n    /**\n     * Generate the complete zip file asynchronously.\n     * @see generateInternalStream\n     */\n    generateNodeStream: function(options, onUpdate) {\n        options = options || {};\n        if (!options.type) {\n            options.type = \"nodebuffer\";\n        }\n        return this.generateInternalStream(options).toNodejsStream(onUpdate);\n    }\n};\nmodule.exports = out;\n","/*\n * This file is used by module bundlers (browserify/webpack/etc) when\n * including a stream implementation. We use \"readable-stream\" to get a\n * consistent behavior between nodejs versions but bundlers often have a shim\n * for \"stream\". Using this shim greatly improve the compatibility and greatly\n * reduce the final size of the bundle (only one stream implementation, not\n * two).\n */\nmodule.exports = require(\"stream\");\n","'use strict';\nvar DataReader = require('./DataReader');\nvar utils = require('../utils');\n\nfunction ArrayReader(data) {\n    DataReader.call(this, data);\n\tfor(var i = 0; i < this.data.length; i++) {\n\t\tdata[i] = data[i] & 0xFF;\n\t}\n}\nutils.inherits(ArrayReader, DataReader);\n/**\n * @see DataReader.byteAt\n */\nArrayReader.prototype.byteAt = function(i) {\n    return this.data[this.zero + i];\n};\n/**\n * @see DataReader.lastIndexOfSignature\n */\nArrayReader.prototype.lastIndexOfSignature = function(sig) {\n    var sig0 = sig.charCodeAt(0),\n        sig1 = sig.charCodeAt(1),\n        sig2 = sig.charCodeAt(2),\n        sig3 = sig.charCodeAt(3);\n    for (var i = this.length - 4; i >= 0; --i) {\n        if (this.data[i] === sig0 && this.data[i + 1] === sig1 && this.data[i + 2] === sig2 && this.data[i + 3] === sig3) {\n            return i - this.zero;\n        }\n    }\n\n    return -1;\n};\n/**\n * @see DataReader.readAndCheckSignature\n */\nArrayReader.prototype.readAndCheckSignature = function (sig) {\n    var sig0 = sig.charCodeAt(0),\n        sig1 = sig.charCodeAt(1),\n        sig2 = sig.charCodeAt(2),\n        sig3 = sig.charCodeAt(3),\n        data = this.readData(4);\n    return sig0 === data[0] && sig1 === data[1] && sig2 === data[2] && sig3 === data[3];\n};\n/**\n * @see DataReader.readData\n */\nArrayReader.prototype.readData = function(size) {\n    this.checkOffset(size);\n    if(size === 0) {\n        return [];\n    }\n    var result = this.data.slice(this.zero + this.index, this.zero + this.index + size);\n    this.index += size;\n    return result;\n};\nmodule.exports = ArrayReader;\n","'use strict';\nvar utils = require('../utils');\n\nfunction DataReader(data) {\n    this.data = data; // type : see implementation\n    this.length = data.length;\n    this.index = 0;\n    this.zero = 0;\n}\nDataReader.prototype = {\n    /**\n     * Check that the offset will not go too far.\n     * @param {string} offset the additional offset to check.\n     * @throws {Error} an Error if the offset is out of bounds.\n     */\n    checkOffset: function(offset) {\n        this.checkIndex(this.index + offset);\n    },\n    /**\n     * Check that the specified index will not be too far.\n     * @param {string} newIndex the index to check.\n     * @throws {Error} an Error if the index is out of bounds.\n     */\n    checkIndex: function(newIndex) {\n        if (this.length < this.zero + newIndex || newIndex < 0) {\n            throw new Error(\"End of data reached (data length = \" + this.length + \", asked index = \" + (newIndex) + \"). Corrupted zip ?\");\n        }\n    },\n    /**\n     * Change the index.\n     * @param {number} newIndex The new index.\n     * @throws {Error} if the new index is out of the data.\n     */\n    setIndex: function(newIndex) {\n        this.checkIndex(newIndex);\n        this.index = newIndex;\n    },\n    /**\n     * Skip the next n bytes.\n     * @param {number} n the number of bytes to skip.\n     * @throws {Error} if the new index is out of the data.\n     */\n    skip: function(n) {\n        this.setIndex(this.index + n);\n    },\n    /**\n     * Get the byte at the specified index.\n     * @param {number} i the index to use.\n     * @return {number} a byte.\n     */\n    byteAt: function(i) {\n        // see implementations\n    },\n    /**\n     * Get the next number with a given byte size.\n     * @param {number} size the number of bytes to read.\n     * @return {number} the corresponding number.\n     */\n    readInt: function(size) {\n        var result = 0,\n            i;\n        this.checkOffset(size);\n        for (i = this.index + size - 1; i >= this.index; i--) {\n            result = (result << 8) + this.byteAt(i);\n        }\n        this.index += size;\n        return result;\n    },\n    /**\n     * Get the next string with a given byte size.\n     * @param {number} size the number of bytes to read.\n     * @return {string} the corresponding string.\n     */\n    readString: function(size) {\n        return utils.transformTo(\"string\", this.readData(size));\n    },\n    /**\n     * Get raw data without conversion, <size> bytes.\n     * @param {number} size the number of bytes to read.\n     * @return {Object} the raw data, implementation specific.\n     */\n    readData: function(size) {\n        // see implementations\n    },\n    /**\n     * Find the last occurence of a zip signature (4 bytes).\n     * @param {string} sig the signature to find.\n     * @return {number} the index of the last occurence, -1 if not found.\n     */\n    lastIndexOfSignature: function(sig) {\n        // see implementations\n    },\n    /**\n     * Read the signature (4 bytes) at the current position and compare it with sig.\n     * @param {string} sig the expected signature\n     * @return {boolean} true if the signature matches, false otherwise.\n     */\n    readAndCheckSignature: function(sig) {\n        // see implementations\n    },\n    /**\n     * Get the next date.\n     * @return {Date} the date.\n     */\n    readDate: function() {\n        var dostime = this.readInt(4);\n        return new Date(Date.UTC(\n        ((dostime >> 25) & 0x7f) + 1980, // year\n        ((dostime >> 21) & 0x0f) - 1, // month\n        (dostime >> 16) & 0x1f, // day\n        (dostime >> 11) & 0x1f, // hour\n        (dostime >> 5) & 0x3f, // minute\n        (dostime & 0x1f) << 1)); // second\n    }\n};\nmodule.exports = DataReader;\n","'use strict';\nvar Uint8ArrayReader = require('./Uint8ArrayReader');\nvar utils = require('../utils');\n\nfunction NodeBufferReader(data) {\n    Uint8ArrayReader.call(this, data);\n}\nutils.inherits(NodeBufferReader, Uint8ArrayReader);\n\n/**\n * @see DataReader.readData\n */\nNodeBufferReader.prototype.readData = function(size) {\n    this.checkOffset(size);\n    var result = this.data.slice(this.zero + this.index, this.zero + this.index + size);\n    this.index += size;\n    return result;\n};\nmodule.exports = NodeBufferReader;\n","'use strict';\nvar DataReader = require('./DataReader');\nvar utils = require('../utils');\n\nfunction StringReader(data) {\n    DataReader.call(this, data);\n}\nutils.inherits(StringReader, DataReader);\n/**\n * @see DataReader.byteAt\n */\nStringReader.prototype.byteAt = function(i) {\n    return this.data.charCodeAt(this.zero + i);\n};\n/**\n * @see DataReader.lastIndexOfSignature\n */\nStringReader.prototype.lastIndexOfSignature = function(sig) {\n    return this.data.lastIndexOf(sig) - this.zero;\n};\n/**\n * @see DataReader.readAndCheckSignature\n */\nStringReader.prototype.readAndCheckSignature = function (sig) {\n    var data = this.readData(4);\n    return sig === data;\n};\n/**\n * @see DataReader.readData\n */\nStringReader.prototype.readData = function(size) {\n    this.checkOffset(size);\n    // this will work because the constructor applied the \"& 0xff\" mask.\n    var result = this.data.slice(this.zero + this.index, this.zero + this.index + size);\n    this.index += size;\n    return result;\n};\nmodule.exports = StringReader;\n","'use strict';\nvar ArrayReader = require('./ArrayReader');\nvar utils = require('../utils');\n\nfunction Uint8ArrayReader(data) {\n    ArrayReader.call(this, data);\n}\nutils.inherits(Uint8ArrayReader, ArrayReader);\n/**\n * @see DataReader.readData\n */\nUint8ArrayReader.prototype.readData = function(size) {\n    this.checkOffset(size);\n    if(size === 0) {\n        // in IE10, when using subarray(idx, idx), we get the array [0x00] instead of [].\n        return new Uint8Array(0);\n    }\n    var result = this.data.subarray(this.zero + this.index, this.zero + this.index + size);\n    this.index += size;\n    return result;\n};\nmodule.exports = Uint8ArrayReader;\n","'use strict';\n\nvar utils = require('../utils');\nvar support = require('../support');\nvar ArrayReader = require('./ArrayReader');\nvar StringReader = require('./StringReader');\nvar NodeBufferReader = require('./NodeBufferReader');\nvar Uint8ArrayReader = require('./Uint8ArrayReader');\n\n/**\n * Create a reader adapted to the data.\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data to read.\n * @return {DataReader} the data reader.\n */\nmodule.exports = function (data) {\n    var type = utils.getTypeOf(data);\n    utils.checkSupport(type);\n    if (type === \"string\" && !support.uint8array) {\n        return new StringReader(data);\n    }\n    if (type === \"nodebuffer\") {\n        return new NodeBufferReader(data);\n    }\n    if (support.uint8array) {\n        return new Uint8ArrayReader(utils.transformTo(\"uint8array\", data));\n    }\n    return new ArrayReader(utils.transformTo(\"array\", data));\n};\n","'use strict';\nexports.LOCAL_FILE_HEADER = \"PK\\x03\\x04\";\nexports.CENTRAL_FILE_HEADER = \"PK\\x01\\x02\";\nexports.CENTRAL_DIRECTORY_END = \"PK\\x05\\x06\";\nexports.ZIP64_CENTRAL_DIRECTORY_LOCATOR = \"PK\\x06\\x07\";\nexports.ZIP64_CENTRAL_DIRECTORY_END = \"PK\\x06\\x06\";\nexports.DATA_DESCRIPTOR = \"PK\\x07\\x08\";\n","'use strict';\n\nvar GenericWorker = require('./GenericWorker');\nvar utils = require('../utils');\n\n/**\n * A worker which convert chunks to a specified type.\n * @constructor\n * @param {String} destType the destination type.\n */\nfunction ConvertWorker(destType) {\n    GenericWorker.call(this, \"ConvertWorker to \" + destType);\n    this.destType = destType;\n}\nutils.inherits(ConvertWorker, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nConvertWorker.prototype.processChunk = function (chunk) {\n    this.push({\n        data : utils.transformTo(this.destType, chunk.data),\n        meta : chunk.meta\n    });\n};\nmodule.exports = ConvertWorker;\n","'use strict';\n\nvar GenericWorker = require('./GenericWorker');\nvar crc32 = require('../crc32');\nvar utils = require('../utils');\n\n/**\n * A worker which calculate the crc32 of the data flowing through.\n * @constructor\n */\nfunction Crc32Probe() {\n    GenericWorker.call(this, \"Crc32Probe\");\n    this.withStreamInfo(\"crc32\", 0);\n}\nutils.inherits(Crc32Probe, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nCrc32Probe.prototype.processChunk = function (chunk) {\n    this.streamInfo.crc32 = crc32(chunk.data, this.streamInfo.crc32 || 0);\n    this.push(chunk);\n};\nmodule.exports = Crc32Probe;\n","'use strict';\n\nvar utils = require('../utils');\nvar GenericWorker = require('./GenericWorker');\n\n/**\n * A worker which calculate the total length of the data flowing through.\n * @constructor\n * @param {String} propName the name used to expose the length\n */\nfunction DataLengthProbe(propName) {\n    GenericWorker.call(this, \"DataLengthProbe for \" + propName);\n    this.propName = propName;\n    this.withStreamInfo(propName, 0);\n}\nutils.inherits(DataLengthProbe, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nDataLengthProbe.prototype.processChunk = function (chunk) {\n    if(chunk) {\n        var length = this.streamInfo[this.propName] || 0;\n        this.streamInfo[this.propName] = length + chunk.data.length;\n    }\n    GenericWorker.prototype.processChunk.call(this, chunk);\n};\nmodule.exports = DataLengthProbe;\n\n","'use strict';\n\nvar utils = require('../utils');\nvar GenericWorker = require('./GenericWorker');\n\n// the size of the generated chunks\n// TODO expose this as a public variable\nvar DEFAULT_BLOCK_SIZE = 16 * 1024;\n\n/**\n * A worker that reads a content and emits chunks.\n * @constructor\n * @param {Promise} dataP the promise of the data to split\n */\nfunction DataWorker(dataP) {\n    GenericWorker.call(this, \"DataWorker\");\n    var self = this;\n    this.dataIsReady = false;\n    this.index = 0;\n    this.max = 0;\n    this.data = null;\n    this.type = \"\";\n\n    this._tickScheduled = false;\n\n    dataP.then(function (data) {\n        self.dataIsReady = true;\n        self.data = data;\n        self.max = data && data.length || 0;\n        self.type = utils.getTypeOf(data);\n        if(!self.isPaused) {\n            self._tickAndRepeat();\n        }\n    }, function (e) {\n        self.error(e);\n    });\n}\n\nutils.inherits(DataWorker, GenericWorker);\n\n/**\n * @see GenericWorker.cleanUp\n */\nDataWorker.prototype.cleanUp = function () {\n    GenericWorker.prototype.cleanUp.call(this);\n    this.data = null;\n};\n\n/**\n * @see GenericWorker.resume\n */\nDataWorker.prototype.resume = function () {\n    if(!GenericWorker.prototype.resume.call(this)) {\n        return false;\n    }\n\n    if (!this._tickScheduled && this.dataIsReady) {\n        this._tickScheduled = true;\n        utils.delay(this._tickAndRepeat, [], this);\n    }\n    return true;\n};\n\n/**\n * Trigger a tick a schedule an other call to this function.\n */\nDataWorker.prototype._tickAndRepeat = function() {\n    this._tickScheduled = false;\n    if(this.isPaused || this.isFinished) {\n        return;\n    }\n    this._tick();\n    if(!this.isFinished) {\n        utils.delay(this._tickAndRepeat, [], this);\n        this._tickScheduled = true;\n    }\n};\n\n/**\n * Read and push a chunk.\n */\nDataWorker.prototype._tick = function() {\n\n    if(this.isPaused || this.isFinished) {\n        return false;\n    }\n\n    var size = DEFAULT_BLOCK_SIZE;\n    var data = null, nextIndex = Math.min(this.max, this.index + size);\n    if (this.index >= this.max) {\n        // EOF\n        return this.end();\n    } else {\n        switch(this.type) {\n            case \"string\":\n                data = this.data.substring(this.index, nextIndex);\n            break;\n            case \"uint8array\":\n                data = this.data.subarray(this.index, nextIndex);\n            break;\n            case \"array\":\n            case \"nodebuffer\":\n                data = this.data.slice(this.index, nextIndex);\n            break;\n        }\n        this.index = nextIndex;\n        return this.push({\n            data : data,\n            meta : {\n                percent : this.max ? this.index / this.max * 100 : 0\n            }\n        });\n    }\n};\n\nmodule.exports = DataWorker;\n","'use strict';\n\n/**\n * A worker that does nothing but passing chunks to the next one. This is like\n * a nodejs stream but with some differences. On the good side :\n * - it works on IE 6-9 without any issue / polyfill\n * - it weights less than the full dependencies bundled with browserify\n * - it forwards errors (no need to declare an error handler EVERYWHERE)\n *\n * A chunk is an object with 2 attributes : `meta` and `data`. The former is an\n * object containing anything (`percent` for example), see each worker for more\n * details. The latter is the real data (String, Uint8Array, etc).\n *\n * @constructor\n * @param {String} name the name of the stream (mainly used for debugging purposes)\n */\nfunction GenericWorker(name) {\n    // the name of the worker\n    this.name = name || \"default\";\n    // an object containing metadata about the workers chain\n    this.streamInfo = {};\n    // an error which happened when the worker was paused\n    this.generatedError = null;\n    // an object containing metadata to be merged by this worker into the general metadata\n    this.extraStreamInfo = {};\n    // true if the stream is paused (and should not do anything), false otherwise\n    this.isPaused = true;\n    // true if the stream is finished (and should not do anything), false otherwise\n    this.isFinished = false;\n    // true if the stream is locked to prevent further structure updates (pipe), false otherwise\n    this.isLocked = false;\n    // the event listeners\n    this._listeners = {\n        'data':[],\n        'end':[],\n        'error':[]\n    };\n    // the previous worker, if any\n    this.previous = null;\n}\n\nGenericWorker.prototype = {\n    /**\n     * Push a chunk to the next workers.\n     * @param {Object} chunk the chunk to push\n     */\n    push : function (chunk) {\n        this.emit(\"data\", chunk);\n    },\n    /**\n     * End the stream.\n     * @return {Boolean} true if this call ended the worker, false otherwise.\n     */\n    end : function () {\n        if (this.isFinished) {\n            return false;\n        }\n\n        this.flush();\n        try {\n            this.emit(\"end\");\n            this.cleanUp();\n            this.isFinished = true;\n        } catch (e) {\n            this.emit(\"error\", e);\n        }\n        return true;\n    },\n    /**\n     * End the stream with an error.\n     * @param {Error} e the error which caused the premature end.\n     * @return {Boolean} true if this call ended the worker with an error, false otherwise.\n     */\n    error : function (e) {\n        if (this.isFinished) {\n            return false;\n        }\n\n        if(this.isPaused) {\n            this.generatedError = e;\n        } else {\n            this.isFinished = true;\n\n            this.emit(\"error\", e);\n\n            // in the workers chain exploded in the middle of the chain,\n            // the error event will go downward but we also need to notify\n            // workers upward that there has been an error.\n            if(this.previous) {\n                this.previous.error(e);\n            }\n\n            this.cleanUp();\n        }\n        return true;\n    },\n    /**\n     * Add a callback on an event.\n     * @param {String} name the name of the event (data, end, error)\n     * @param {Function} listener the function to call when the event is triggered\n     * @return {GenericWorker} the current object for chainability\n     */\n    on : function (name, listener) {\n        this._listeners[name].push(listener);\n        return this;\n    },\n    /**\n     * Clean any references when a worker is ending.\n     */\n    cleanUp : function () {\n        this.streamInfo = this.generatedError = this.extraStreamInfo = null;\n        this._listeners = [];\n    },\n    /**\n     * Trigger an event. This will call registered callback with the provided arg.\n     * @param {String} name the name of the event (data, end, error)\n     * @param {Object} arg the argument to call the callback with.\n     */\n    emit : function (name, arg) {\n        if (this._listeners[name]) {\n            for(var i = 0; i < this._listeners[name].length; i++) {\n                this._listeners[name][i].call(this, arg);\n            }\n        }\n    },\n    /**\n     * Chain a worker with an other.\n     * @param {Worker} next the worker receiving events from the current one.\n     * @return {worker} the next worker for chainability\n     */\n    pipe : function (next) {\n        return next.registerPrevious(this);\n    },\n    /**\n     * Same as `pipe` in the other direction.\n     * Using an API with `pipe(next)` is very easy.\n     * Implementing the API with the point of view of the next one registering\n     * a source is easier, see the ZipFileWorker.\n     * @param {Worker} previous the previous worker, sending events to this one\n     * @return {Worker} the current worker for chainability\n     */\n    registerPrevious : function (previous) {\n        if (this.isLocked) {\n            throw new Error(\"The stream '\" + this + \"' has already been used.\");\n        }\n\n        // sharing the streamInfo...\n        this.streamInfo = previous.streamInfo;\n        // ... and adding our own bits\n        this.mergeStreamInfo();\n        this.previous =  previous;\n        var self = this;\n        previous.on('data', function (chunk) {\n            self.processChunk(chunk);\n        });\n        previous.on('end', function () {\n            self.end();\n        });\n        previous.on('error', function (e) {\n            self.error(e);\n        });\n        return this;\n    },\n    /**\n     * Pause the stream so it doesn't send events anymore.\n     * @return {Boolean} true if this call paused the worker, false otherwise.\n     */\n    pause : function () {\n        if(this.isPaused || this.isFinished) {\n            return false;\n        }\n        this.isPaused = true;\n\n        if(this.previous) {\n            this.previous.pause();\n        }\n        return true;\n    },\n    /**\n     * Resume a paused stream.\n     * @return {Boolean} true if this call resumed the worker, false otherwise.\n     */\n    resume : function () {\n        if(!this.isPaused || this.isFinished) {\n            return false;\n        }\n        this.isPaused = false;\n\n        // if true, the worker tried to resume but failed\n        var withError = false;\n        if(this.generatedError) {\n            this.error(this.generatedError);\n            withError = true;\n        }\n        if(this.previous) {\n            this.previous.resume();\n        }\n\n        return !withError;\n    },\n    /**\n     * Flush any remaining bytes as the stream is ending.\n     */\n    flush : function () {},\n    /**\n     * Process a chunk. This is usually the method overridden.\n     * @param {Object} chunk the chunk to process.\n     */\n    processChunk : function(chunk) {\n        this.push(chunk);\n    },\n    /**\n     * Add a key/value to be added in the workers chain streamInfo once activated.\n     * @param {String} key the key to use\n     * @param {Object} value the associated value\n     * @return {Worker} the current worker for chainability\n     */\n    withStreamInfo : function (key, value) {\n        this.extraStreamInfo[key] = value;\n        this.mergeStreamInfo();\n        return this;\n    },\n    /**\n     * Merge this worker's streamInfo into the chain's streamInfo.\n     */\n    mergeStreamInfo : function () {\n        for(var key in this.extraStreamInfo) {\n            if (!this.extraStreamInfo.hasOwnProperty(key)) {\n                continue;\n            }\n            this.streamInfo[key] = this.extraStreamInfo[key];\n        }\n    },\n\n    /**\n     * Lock the stream to prevent further updates on the workers chain.\n     * After calling this method, all calls to pipe will fail.\n     */\n    lock: function () {\n        if (this.isLocked) {\n            throw new Error(\"The stream '\" + this + \"' has already been used.\");\n        }\n        this.isLocked = true;\n        if (this.previous) {\n            this.previous.lock();\n        }\n    },\n\n    /**\n     *\n     * Pretty print the workers chain.\n     */\n    toString : function () {\n        var me = \"Worker \" + this.name;\n        if (this.previous) {\n            return this.previous + \" -> \" + me;\n        } else {\n            return me;\n        }\n    }\n};\n\nmodule.exports = GenericWorker;\n","'use strict';\n\nvar utils = require('../utils');\nvar ConvertWorker = require('./ConvertWorker');\nvar GenericWorker = require('./GenericWorker');\nvar base64 = require('../base64');\nvar support = require(\"../support\");\nvar external = require(\"../external\");\n\nvar NodejsStreamOutputAdapter = null;\nif (support.nodestream) {\n    try {\n        NodejsStreamOutputAdapter = require('../nodejs/NodejsStreamOutputAdapter');\n    } catch(e) {}\n}\n\n/**\n * Apply the final transformation of the data. If the user wants a Blob for\n * example, it's easier to work with an U8intArray and finally do the\n * ArrayBuffer/Blob conversion.\n * @param {String} type the name of the final type\n * @param {String|Uint8Array|Buffer} content the content to transform\n * @param {String} mimeType the mime type of the content, if applicable.\n * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the content in the right format.\n */\nfunction transformZipOutput(type, content, mimeType) {\n    switch(type) {\n        case \"blob\" :\n            return utils.newBlob(utils.transformTo(\"arraybuffer\", content), mimeType);\n        case \"base64\" :\n            return base64.encode(content);\n        default :\n            return utils.transformTo(type, content);\n    }\n}\n\n/**\n * Concatenate an array of data of the given type.\n * @param {String} type the type of the data in the given array.\n * @param {Array} dataArray the array containing the data chunks to concatenate\n * @return {String|Uint8Array|Buffer} the concatenated data\n * @throws Error if the asked type is unsupported\n */\nfunction concat (type, dataArray) {\n    var i, index = 0, res = null, totalLength = 0;\n    for(i = 0; i < dataArray.length; i++) {\n        totalLength += dataArray[i].length;\n    }\n    switch(type) {\n        case \"string\":\n            return dataArray.join(\"\");\n          case \"array\":\n            return Array.prototype.concat.apply([], dataArray);\n        case \"uint8array\":\n            res = new Uint8Array(totalLength);\n            for(i = 0; i < dataArray.length; i++) {\n                res.set(dataArray[i], index);\n                index += dataArray[i].length;\n            }\n            return res;\n        case \"nodebuffer\":\n            return Buffer.concat(dataArray);\n        default:\n            throw new Error(\"concat : unsupported type '\"  + type + \"'\");\n    }\n}\n\n/**\n * Listen a StreamHelper, accumulate its content and concatenate it into a\n * complete block.\n * @param {StreamHelper} helper the helper to use.\n * @param {Function} updateCallback a callback called on each update. Called\n * with one arg :\n * - the metadata linked to the update received.\n * @return Promise the promise for the accumulation.\n */\nfunction accumulate(helper, updateCallback) {\n    return new external.Promise(function (resolve, reject){\n        var dataArray = [];\n        var chunkType = helper._internalType,\n            resultType = helper._outputType,\n            mimeType = helper._mimeType;\n        helper\n        .on('data', function (data, meta) {\n            dataArray.push(data);\n            if(updateCallback) {\n                updateCallback(meta);\n            }\n        })\n        .on('error', function(err) {\n            dataArray = [];\n            reject(err);\n        })\n        .on('end', function (){\n            try {\n                var result = transformZipOutput(resultType, concat(chunkType, dataArray), mimeType);\n                resolve(result);\n            } catch (e) {\n                reject(e);\n            }\n            dataArray = [];\n        })\n        .resume();\n    });\n}\n\n/**\n * An helper to easily use workers outside of JSZip.\n * @constructor\n * @param {Worker} worker the worker to wrap\n * @param {String} outputType the type of data expected by the use\n * @param {String} mimeType the mime type of the content, if applicable.\n */\nfunction StreamHelper(worker, outputType, mimeType) {\n    var internalType = outputType;\n    switch(outputType) {\n        case \"blob\":\n        case \"arraybuffer\":\n            internalType = \"uint8array\";\n        break;\n        case \"base64\":\n            internalType = \"string\";\n        break;\n    }\n\n    try {\n        // the type used internally\n        this._internalType = internalType;\n        // the type used to output results\n        this._outputType = outputType;\n        // the mime type\n        this._mimeType = mimeType;\n        utils.checkSupport(internalType);\n        this._worker = worker.pipe(new ConvertWorker(internalType));\n        // the last workers can be rewired without issues but we need to\n        // prevent any updates on previous workers.\n        worker.lock();\n    } catch(e) {\n        this._worker = new GenericWorker(\"error\");\n        this._worker.error(e);\n    }\n}\n\nStreamHelper.prototype = {\n    /**\n     * Listen a StreamHelper, accumulate its content and concatenate it into a\n     * complete block.\n     * @param {Function} updateCb the update callback.\n     * @return Promise the promise for the accumulation.\n     */\n    accumulate : function (updateCb) {\n        return accumulate(this, updateCb);\n    },\n    /**\n     * Add a listener on an event triggered on a stream.\n     * @param {String} evt the name of the event\n     * @param {Function} fn the listener\n     * @return {StreamHelper} the current helper.\n     */\n    on : function (evt, fn) {\n        var self = this;\n\n        if(evt === \"data\") {\n            this._worker.on(evt, function (chunk) {\n                fn.call(self, chunk.data, chunk.meta);\n            });\n        } else {\n            this._worker.on(evt, function () {\n                utils.delay(fn, arguments, self);\n            });\n        }\n        return this;\n    },\n    /**\n     * Resume the flow of chunks.\n     * @return {StreamHelper} the current helper.\n     */\n    resume : function () {\n        utils.delay(this._worker.resume, [], this._worker);\n        return this;\n    },\n    /**\n     * Pause the flow of chunks.\n     * @return {StreamHelper} the current helper.\n     */\n    pause : function () {\n        this._worker.pause();\n        return this;\n    },\n    /**\n     * Return a nodejs stream for this helper.\n     * @param {Function} updateCb the update callback.\n     * @return {NodejsStreamOutputAdapter} the nodejs stream.\n     */\n    toNodejsStream : function (updateCb) {\n        utils.checkSupport(\"nodestream\");\n        if (this._outputType !== \"nodebuffer\") {\n            // an object stream containing blob/arraybuffer/uint8array/string\n            // is strange and I don't know if it would be useful.\n            // I you find this comment and have a good usecase, please open a\n            // bug report !\n            throw new Error(this._outputType + \" is not supported by this method\");\n        }\n\n        return new NodejsStreamOutputAdapter(this, {\n            objectMode : this._outputType !== \"nodebuffer\"\n        }, updateCb);\n    }\n};\n\n\nmodule.exports = StreamHelper;\n","'use strict';\n\nexports.base64 = true;\nexports.array = true;\nexports.string = true;\nexports.arraybuffer = typeof ArrayBuffer !== \"undefined\" && typeof Uint8Array !== \"undefined\";\nexports.nodebuffer = typeof Buffer !== \"undefined\";\n// contains true if JSZip can read/generate Uint8Array, false otherwise.\nexports.uint8array = typeof Uint8Array !== \"undefined\";\n\nif (typeof ArrayBuffer === \"undefined\") {\n    exports.blob = false;\n}\nelse {\n    var buffer = new ArrayBuffer(0);\n    try {\n        exports.blob = new Blob([buffer], {\n            type: \"application/zip\"\n        }).size === 0;\n    }\n    catch (e) {\n        try {\n            var Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder;\n            var builder = new Builder();\n            builder.append(buffer);\n            exports.blob = builder.getBlob('application/zip').size === 0;\n        }\n        catch (e) {\n            exports.blob = false;\n        }\n    }\n}\n\ntry {\n    exports.nodestream = !!require('readable-stream').Readable;\n} catch(e) {\n    exports.nodestream = false;\n}\n","'use strict';\n\nvar utils = require('./utils');\nvar support = require('./support');\nvar nodejsUtils = require('./nodejsUtils');\nvar GenericWorker = require('./stream/GenericWorker');\n\n/**\n * The following functions come from pako, from pako/lib/utils/strings\n * released under the MIT license, see pako https://github.com/nodeca/pako/\n */\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nvar _utf8len = new Array(256);\nfor (var i=0; i<256; i++) {\n  _utf8len[i] = (i >= 252 ? 6 : i >= 248 ? 5 : i >= 240 ? 4 : i >= 224 ? 3 : i >= 192 ? 2 : 1);\n}\n_utf8len[254]=_utf8len[254]=1; // Invalid sequence start\n\n// convert string to array (typed, when possible)\nvar string2buf = function (str) {\n    var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n    // count binary size\n    for (m_pos = 0; m_pos < str_len; m_pos++) {\n        c = str.charCodeAt(m_pos);\n        if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {\n            c2 = str.charCodeAt(m_pos+1);\n            if ((c2 & 0xfc00) === 0xdc00) {\n                c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n                m_pos++;\n            }\n        }\n        buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n    }\n\n    // allocate buffer\n    if (support.uint8array) {\n        buf = new Uint8Array(buf_len);\n    } else {\n        buf = new Array(buf_len);\n    }\n\n    // convert\n    for (i=0, m_pos = 0; i < buf_len; m_pos++) {\n        c = str.charCodeAt(m_pos);\n        if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {\n            c2 = str.charCodeAt(m_pos+1);\n            if ((c2 & 0xfc00) === 0xdc00) {\n                c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n                m_pos++;\n            }\n        }\n        if (c < 0x80) {\n            /* one byte */\n            buf[i++] = c;\n        } else if (c < 0x800) {\n            /* two bytes */\n            buf[i++] = 0xC0 | (c >>> 6);\n            buf[i++] = 0x80 | (c & 0x3f);\n        } else if (c < 0x10000) {\n            /* three bytes */\n            buf[i++] = 0xE0 | (c >>> 12);\n            buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n            buf[i++] = 0x80 | (c & 0x3f);\n        } else {\n            /* four bytes */\n            buf[i++] = 0xf0 | (c >>> 18);\n            buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n            buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n            buf[i++] = 0x80 | (c & 0x3f);\n        }\n    }\n\n    return buf;\n};\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max   - length limit (mandatory);\nvar utf8border = function(buf, max) {\n    var pos;\n\n    max = max || buf.length;\n    if (max > buf.length) { max = buf.length; }\n\n    // go back from last position, until start of sequence found\n    pos = max-1;\n    while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n    // Fuckup - very small and broken sequence,\n    // return max, because we should return something anyway.\n    if (pos < 0) { return max; }\n\n    // If we came to start of buffer - that means vuffer is too small,\n    // return max too.\n    if (pos === 0) { return max; }\n\n    return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n\n// convert array to string\nvar buf2string = function (buf) {\n    var str, i, out, c, c_len;\n    var len = buf.length;\n\n    // Reserve max possible length (2 words per char)\n    // NB: by unknown reasons, Array is significantly faster for\n    //     String.fromCharCode.apply than Uint16Array.\n    var utf16buf = new Array(len*2);\n\n    for (out=0, i=0; i<len;) {\n        c = buf[i++];\n        // quick process ascii\n        if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n        c_len = _utf8len[c];\n        // skip 5 & 6 byte codes\n        if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len-1; continue; }\n\n        // apply mask on first byte\n        c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n        // join the rest\n        while (c_len > 1 && i < len) {\n            c = (c << 6) | (buf[i++] & 0x3f);\n            c_len--;\n        }\n\n        // terminated by end of string?\n        if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n        if (c < 0x10000) {\n            utf16buf[out++] = c;\n        } else {\n            c -= 0x10000;\n            utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n            utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n        }\n    }\n\n    // shrinkBuf(utf16buf, out)\n    if (utf16buf.length !== out) {\n        if(utf16buf.subarray) {\n            utf16buf = utf16buf.subarray(0, out);\n        } else {\n            utf16buf.length = out;\n        }\n    }\n\n    // return String.fromCharCode.apply(null, utf16buf);\n    return utils.applyFromCharCode(utf16buf);\n};\n\n\n// That's all for the pako functions.\n\n\n/**\n * Transform a javascript string into an array (typed if possible) of bytes,\n * UTF-8 encoded.\n * @param {String} str the string to encode\n * @return {Array|Uint8Array|Buffer} the UTF-8 encoded string.\n */\nexports.utf8encode = function utf8encode(str) {\n    if (support.nodebuffer) {\n        return nodejsUtils.newBufferFrom(str, \"utf-8\");\n    }\n\n    return string2buf(str);\n};\n\n\n/**\n * Transform a bytes array (or a representation) representing an UTF-8 encoded\n * string into a javascript string.\n * @param {Array|Uint8Array|Buffer} buf the data de decode\n * @return {String} the decoded string.\n */\nexports.utf8decode = function utf8decode(buf) {\n    if (support.nodebuffer) {\n        return utils.transformTo(\"nodebuffer\", buf).toString(\"utf-8\");\n    }\n\n    buf = utils.transformTo(support.uint8array ? \"uint8array\" : \"array\", buf);\n\n    return buf2string(buf);\n};\n\n/**\n * A worker to decode utf8 encoded binary chunks into string chunks.\n * @constructor\n */\nfunction Utf8DecodeWorker() {\n    GenericWorker.call(this, \"utf-8 decode\");\n    // the last bytes if a chunk didn't end with a complete codepoint.\n    this.leftOver = null;\n}\nutils.inherits(Utf8DecodeWorker, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nUtf8DecodeWorker.prototype.processChunk = function (chunk) {\n\n    var data = utils.transformTo(support.uint8array ? \"uint8array\" : \"array\", chunk.data);\n\n    // 1st step, re-use what's left of the previous chunk\n    if (this.leftOver && this.leftOver.length) {\n        if(support.uint8array) {\n            var previousData = data;\n            data = new Uint8Array(previousData.length + this.leftOver.length);\n            data.set(this.leftOver, 0);\n            data.set(previousData, this.leftOver.length);\n        } else {\n            data = this.leftOver.concat(data);\n        }\n        this.leftOver = null;\n    }\n\n    var nextBoundary = utf8border(data);\n    var usableData = data;\n    if (nextBoundary !== data.length) {\n        if (support.uint8array) {\n            usableData = data.subarray(0, nextBoundary);\n            this.leftOver = data.subarray(nextBoundary, data.length);\n        } else {\n            usableData = data.slice(0, nextBoundary);\n            this.leftOver = data.slice(nextBoundary, data.length);\n        }\n    }\n\n    this.push({\n        data : exports.utf8decode(usableData),\n        meta : chunk.meta\n    });\n};\n\n/**\n * @see GenericWorker.flush\n */\nUtf8DecodeWorker.prototype.flush = function () {\n    if(this.leftOver && this.leftOver.length) {\n        this.push({\n            data : exports.utf8decode(this.leftOver),\n            meta : {}\n        });\n        this.leftOver = null;\n    }\n};\nexports.Utf8DecodeWorker = Utf8DecodeWorker;\n\n/**\n * A worker to endcode string chunks into utf8 encoded binary chunks.\n * @constructor\n */\nfunction Utf8EncodeWorker() {\n    GenericWorker.call(this, \"utf-8 encode\");\n}\nutils.inherits(Utf8EncodeWorker, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nUtf8EncodeWorker.prototype.processChunk = function (chunk) {\n    this.push({\n        data : exports.utf8encode(chunk.data),\n        meta : chunk.meta\n    });\n};\nexports.Utf8EncodeWorker = Utf8EncodeWorker;\n","'use strict';\n\nvar support = require('./support');\nvar base64 = require('./base64');\nvar nodejsUtils = require('./nodejsUtils');\nvar setImmediate = require('core-js/library/fn/set-immediate');\nvar external = require(\"./external\");\n\n\n/**\n * Convert a string that pass as a \"binary string\": it should represent a byte\n * array but may have > 255 char codes. Be sure to take only the first byte\n * and returns the byte array.\n * @param {String} str the string to transform.\n * @return {Array|Uint8Array} the string in a binary format.\n */\nfunction string2binary(str) {\n    var result = null;\n    if (support.uint8array) {\n      result = new Uint8Array(str.length);\n    } else {\n      result = new Array(str.length);\n    }\n    return stringToArrayLike(str, result);\n}\n\n/**\n * Create a new blob with the given content and the given type.\n * @param {String|ArrayBuffer} part the content to put in the blob. DO NOT use\n * an Uint8Array because the stock browser of android 4 won't accept it (it\n * will be silently converted to a string, \"[object Uint8Array]\").\n *\n * Use only ONE part to build the blob to avoid a memory leak in IE11 / Edge:\n * when a large amount of Array is used to create the Blob, the amount of\n * memory consumed is nearly 100 times the original data amount.\n *\n * @param {String} type the mime type of the blob.\n * @return {Blob} the created blob.\n */\nexports.newBlob = function(part, type) {\n    exports.checkSupport(\"blob\");\n\n    try {\n        // Blob constructor\n        return new Blob([part], {\n            type: type\n        });\n    }\n    catch (e) {\n\n        try {\n            // deprecated, browser only, old way\n            var Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder;\n            var builder = new Builder();\n            builder.append(part);\n            return builder.getBlob(type);\n        }\n        catch (e) {\n\n            // well, fuck ?!\n            throw new Error(\"Bug : can't construct the Blob.\");\n        }\n    }\n\n\n};\n/**\n * The identity function.\n * @param {Object} input the input.\n * @return {Object} the same input.\n */\nfunction identity(input) {\n    return input;\n}\n\n/**\n * Fill in an array with a string.\n * @param {String} str the string to use.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to fill in (will be mutated).\n * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated array.\n */\nfunction stringToArrayLike(str, array) {\n    for (var i = 0; i < str.length; ++i) {\n        array[i] = str.charCodeAt(i) & 0xFF;\n    }\n    return array;\n}\n\n/**\n * An helper for the function arrayLikeToString.\n * This contains static informations and functions that\n * can be optimized by the browser JIT compiler.\n */\nvar arrayToStringHelper = {\n    /**\n     * Transform an array of int into a string, chunk by chunk.\n     * See the performances notes on arrayLikeToString.\n     * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.\n     * @param {String} type the type of the array.\n     * @param {Integer} chunk the chunk size.\n     * @return {String} the resulting string.\n     * @throws Error if the chunk is too big for the stack.\n     */\n    stringifyByChunk: function(array, type, chunk) {\n        var result = [], k = 0, len = array.length;\n        // shortcut\n        if (len <= chunk) {\n            return String.fromCharCode.apply(null, array);\n        }\n        while (k < len) {\n            if (type === \"array\" || type === \"nodebuffer\") {\n                result.push(String.fromCharCode.apply(null, array.slice(k, Math.min(k + chunk, len))));\n            }\n            else {\n                result.push(String.fromCharCode.apply(null, array.subarray(k, Math.min(k + chunk, len))));\n            }\n            k += chunk;\n        }\n        return result.join(\"\");\n    },\n    /**\n     * Call String.fromCharCode on every item in the array.\n     * This is the naive implementation, which generate A LOT of intermediate string.\n     * This should be used when everything else fail.\n     * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.\n     * @return {String} the result.\n     */\n    stringifyByChar: function(array){\n        var resultStr = \"\";\n        for(var i = 0; i < array.length; i++) {\n            resultStr += String.fromCharCode(array[i]);\n        }\n        return resultStr;\n    },\n    applyCanBeUsed : {\n        /**\n         * true if the browser accepts to use String.fromCharCode on Uint8Array\n         */\n        uint8array : (function () {\n            try {\n                return support.uint8array && String.fromCharCode.apply(null, new Uint8Array(1)).length === 1;\n            } catch (e) {\n                return false;\n            }\n        })(),\n        /**\n         * true if the browser accepts to use String.fromCharCode on nodejs Buffer.\n         */\n        nodebuffer : (function () {\n            try {\n                return support.nodebuffer && String.fromCharCode.apply(null, nodejsUtils.allocBuffer(1)).length === 1;\n            } catch (e) {\n                return false;\n            }\n        })()\n    }\n};\n\n/**\n * Transform an array-like object to a string.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.\n * @return {String} the result.\n */\nfunction arrayLikeToString(array) {\n    // Performances notes :\n    // --------------------\n    // String.fromCharCode.apply(null, array) is the fastest, see\n    // see http://jsperf.com/converting-a-uint8array-to-a-string/2\n    // but the stack is limited (and we can get huge arrays !).\n    //\n    // result += String.fromCharCode(array[i]); generate too many strings !\n    //\n    // This code is inspired by http://jsperf.com/arraybuffer-to-string-apply-performance/2\n    // TODO : we now have workers that split the work. Do we still need that ?\n    var chunk = 65536,\n        type = exports.getTypeOf(array),\n        canUseApply = true;\n    if (type === \"uint8array\") {\n        canUseApply = arrayToStringHelper.applyCanBeUsed.uint8array;\n    } else if (type === \"nodebuffer\") {\n        canUseApply = arrayToStringHelper.applyCanBeUsed.nodebuffer;\n    }\n\n    if (canUseApply) {\n        while (chunk > 1) {\n            try {\n                return arrayToStringHelper.stringifyByChunk(array, type, chunk);\n            } catch (e) {\n                chunk = Math.floor(chunk / 2);\n            }\n        }\n    }\n\n    // no apply or chunk error : slow and painful algorithm\n    // default browser on android 4.*\n    return arrayToStringHelper.stringifyByChar(array);\n}\n\nexports.applyFromCharCode = arrayLikeToString;\n\n\n/**\n * Copy the data from an array-like to an other array-like.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayFrom the origin array.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayTo the destination array which will be mutated.\n * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated destination array.\n */\nfunction arrayLikeToArrayLike(arrayFrom, arrayTo) {\n    for (var i = 0; i < arrayFrom.length; i++) {\n        arrayTo[i] = arrayFrom[i];\n    }\n    return arrayTo;\n}\n\n// a matrix containing functions to transform everything into everything.\nvar transform = {};\n\n// string to ?\ntransform[\"string\"] = {\n    \"string\": identity,\n    \"array\": function(input) {\n        return stringToArrayLike(input, new Array(input.length));\n    },\n    \"arraybuffer\": function(input) {\n        return transform[\"string\"][\"uint8array\"](input).buffer;\n    },\n    \"uint8array\": function(input) {\n        return stringToArrayLike(input, new Uint8Array(input.length));\n    },\n    \"nodebuffer\": function(input) {\n        return stringToArrayLike(input, nodejsUtils.allocBuffer(input.length));\n    }\n};\n\n// array to ?\ntransform[\"array\"] = {\n    \"string\": arrayLikeToString,\n    \"array\": identity,\n    \"arraybuffer\": function(input) {\n        return (new Uint8Array(input)).buffer;\n    },\n    \"uint8array\": function(input) {\n        return new Uint8Array(input);\n    },\n    \"nodebuffer\": function(input) {\n        return nodejsUtils.newBufferFrom(input);\n    }\n};\n\n// arraybuffer to ?\ntransform[\"arraybuffer\"] = {\n    \"string\": function(input) {\n        return arrayLikeToString(new Uint8Array(input));\n    },\n    \"array\": function(input) {\n        return arrayLikeToArrayLike(new Uint8Array(input), new Array(input.byteLength));\n    },\n    \"arraybuffer\": identity,\n    \"uint8array\": function(input) {\n        return new Uint8Array(input);\n    },\n    \"nodebuffer\": function(input) {\n        return nodejsUtils.newBufferFrom(new Uint8Array(input));\n    }\n};\n\n// uint8array to ?\ntransform[\"uint8array\"] = {\n    \"string\": arrayLikeToString,\n    \"array\": function(input) {\n        return arrayLikeToArrayLike(input, new Array(input.length));\n    },\n    \"arraybuffer\": function(input) {\n        return input.buffer;\n    },\n    \"uint8array\": identity,\n    \"nodebuffer\": function(input) {\n        return nodejsUtils.newBufferFrom(input);\n    }\n};\n\n// nodebuffer to ?\ntransform[\"nodebuffer\"] = {\n    \"string\": arrayLikeToString,\n    \"array\": function(input) {\n        return arrayLikeToArrayLike(input, new Array(input.length));\n    },\n    \"arraybuffer\": function(input) {\n        return transform[\"nodebuffer\"][\"uint8array\"](input).buffer;\n    },\n    \"uint8array\": function(input) {\n        return arrayLikeToArrayLike(input, new Uint8Array(input.length));\n    },\n    \"nodebuffer\": identity\n};\n\n/**\n * Transform an input into any type.\n * The supported output type are : string, array, uint8array, arraybuffer, nodebuffer.\n * If no output type is specified, the unmodified input will be returned.\n * @param {String} outputType the output type.\n * @param {String|Array|ArrayBuffer|Uint8Array|Buffer} input the input to convert.\n * @throws {Error} an Error if the browser doesn't support the requested output type.\n */\nexports.transformTo = function(outputType, input) {\n    if (!input) {\n        // undefined, null, etc\n        // an empty string won't harm.\n        input = \"\";\n    }\n    if (!outputType) {\n        return input;\n    }\n    exports.checkSupport(outputType);\n    var inputType = exports.getTypeOf(input);\n    var result = transform[inputType][outputType](input);\n    return result;\n};\n\n/**\n * Return the type of the input.\n * The type will be in a format valid for JSZip.utils.transformTo : string, array, uint8array, arraybuffer.\n * @param {Object} input the input to identify.\n * @return {String} the (lowercase) type of the input.\n */\nexports.getTypeOf = function(input) {\n    if (typeof input === \"string\") {\n        return \"string\";\n    }\n    if (Object.prototype.toString.call(input) === \"[object Array]\") {\n        return \"array\";\n    }\n    if (support.nodebuffer && nodejsUtils.isBuffer(input)) {\n        return \"nodebuffer\";\n    }\n    if (support.uint8array && input instanceof Uint8Array) {\n        return \"uint8array\";\n    }\n    if (support.arraybuffer && input instanceof ArrayBuffer) {\n        return \"arraybuffer\";\n    }\n};\n\n/**\n * Throw an exception if the type is not supported.\n * @param {String} type the type to check.\n * @throws {Error} an Error if the browser doesn't support the requested type.\n */\nexports.checkSupport = function(type) {\n    var supported = support[type.toLowerCase()];\n    if (!supported) {\n        throw new Error(type + \" is not supported by this platform\");\n    }\n};\n\nexports.MAX_VALUE_16BITS = 65535;\nexports.MAX_VALUE_32BITS = -1; // well, \"\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\" is parsed as -1\n\n/**\n * Prettify a string read as binary.\n * @param {string} str the string to prettify.\n * @return {string} a pretty string.\n */\nexports.pretty = function(str) {\n    var res = '',\n        code, i;\n    for (i = 0; i < (str || \"\").length; i++) {\n        code = str.charCodeAt(i);\n        res += '\\\\x' + (code < 16 ? \"0\" : \"\") + code.toString(16).toUpperCase();\n    }\n    return res;\n};\n\n/**\n * Defer the call of a function.\n * @param {Function} callback the function to call asynchronously.\n * @param {Array} args the arguments to give to the callback.\n */\nexports.delay = function(callback, args, self) {\n    setImmediate(function () {\n        callback.apply(self || null, args || []);\n    });\n};\n\n/**\n * Extends a prototype with an other, without calling a constructor with\n * side effects. Inspired by nodejs' `utils.inherits`\n * @param {Function} ctor the constructor to augment\n * @param {Function} superCtor the parent constructor to use\n */\nexports.inherits = function (ctor, superCtor) {\n    var Obj = function() {};\n    Obj.prototype = superCtor.prototype;\n    ctor.prototype = new Obj();\n};\n\n/**\n * Merge the objects passed as parameters into a new one.\n * @private\n * @param {...Object} var_args All objects to merge.\n * @return {Object} a new object with the data of the others.\n */\nexports.extend = function() {\n    var result = {}, i, attr;\n    for (i = 0; i < arguments.length; i++) { // arguments is not enumerable in some browsers\n        for (attr in arguments[i]) {\n            if (arguments[i].hasOwnProperty(attr) && typeof result[attr] === \"undefined\") {\n                result[attr] = arguments[i][attr];\n            }\n        }\n    }\n    return result;\n};\n\n/**\n * Transform arbitrary content into a Promise.\n * @param {String} name a name for the content being processed.\n * @param {Object} inputData the content to process.\n * @param {Boolean} isBinary true if the content is not an unicode string\n * @param {Boolean} isOptimizedBinaryString true if the string content only has one byte per character.\n * @param {Boolean} isBase64 true if the string content is encoded with base64.\n * @return {Promise} a promise in a format usable by JSZip.\n */\nexports.prepareContent = function(name, inputData, isBinary, isOptimizedBinaryString, isBase64) {\n\n    // if inputData is already a promise, this flatten it.\n    var promise = external.Promise.resolve(inputData).then(function(data) {\n        \n        \n        var isBlob = support.blob && (data instanceof Blob || ['[object File]', '[object Blob]'].indexOf(Object.prototype.toString.call(data)) !== -1);\n\n        if (isBlob && typeof FileReader !== \"undefined\") {\n            return new external.Promise(function (resolve, reject) {\n                var reader = new FileReader();\n\n                reader.onload = function(e) {\n                    resolve(e.target.result);\n                };\n                reader.onerror = function(e) {\n                    reject(e.target.error);\n                };\n                reader.readAsArrayBuffer(data);\n            });\n        } else {\n            return data;\n        }\n    });\n\n    return promise.then(function(data) {\n        var dataType = exports.getTypeOf(data);\n\n        if (!dataType) {\n            return external.Promise.reject(\n                new Error(\"Can't read the data of '\" + name + \"'. Is it \" +\n                          \"in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?\")\n            );\n        }\n        // special case : it's way easier to work with Uint8Array than with ArrayBuffer\n        if (dataType === \"arraybuffer\") {\n            data = exports.transformTo(\"uint8array\", data);\n        } else if (dataType === \"string\") {\n            if (isBase64) {\n                data = base64.decode(data);\n            }\n            else if (isBinary) {\n                // optimizedBinaryString === true means that the file has already been filtered with a 0xFF mask\n                if (isOptimizedBinaryString !== true) {\n                    // this is a string, not in a base64 format.\n                    // Be sure that this is a correct \"binary string\"\n                    data = string2binary(data);\n                }\n            }\n        }\n        return data;\n    });\n};\n","'use strict';\nvar readerFor = require('./reader/readerFor');\nvar utils = require('./utils');\nvar sig = require('./signature');\nvar ZipEntry = require('./zipEntry');\nvar utf8 = require('./utf8');\nvar support = require('./support');\n//  class ZipEntries {{{\n/**\n * All the entries in the zip file.\n * @constructor\n * @param {Object} loadOptions Options for loading the stream.\n */\nfunction ZipEntries(loadOptions) {\n    this.files = [];\n    this.loadOptions = loadOptions;\n}\nZipEntries.prototype = {\n    /**\n     * Check that the reader is on the specified signature.\n     * @param {string} expectedSignature the expected signature.\n     * @throws {Error} if it is an other signature.\n     */\n    checkSignature: function(expectedSignature) {\n        if (!this.reader.readAndCheckSignature(expectedSignature)) {\n            this.reader.index -= 4;\n            var signature = this.reader.readString(4);\n            throw new Error(\"Corrupted zip or bug: unexpected signature \" + \"(\" + utils.pretty(signature) + \", expected \" + utils.pretty(expectedSignature) + \")\");\n        }\n    },\n    /**\n     * Check if the given signature is at the given index.\n     * @param {number} askedIndex the index to check.\n     * @param {string} expectedSignature the signature to expect.\n     * @return {boolean} true if the signature is here, false otherwise.\n     */\n    isSignature: function(askedIndex, expectedSignature) {\n        var currentIndex = this.reader.index;\n        this.reader.setIndex(askedIndex);\n        var signature = this.reader.readString(4);\n        var result = signature === expectedSignature;\n        this.reader.setIndex(currentIndex);\n        return result;\n    },\n    /**\n     * Read the end of the central directory.\n     */\n    readBlockEndOfCentral: function() {\n        this.diskNumber = this.reader.readInt(2);\n        this.diskWithCentralDirStart = this.reader.readInt(2);\n        this.centralDirRecordsOnThisDisk = this.reader.readInt(2);\n        this.centralDirRecords = this.reader.readInt(2);\n        this.centralDirSize = this.reader.readInt(4);\n        this.centralDirOffset = this.reader.readInt(4);\n\n        this.zipCommentLength = this.reader.readInt(2);\n        // warning : the encoding depends of the system locale\n        // On a linux machine with LANG=en_US.utf8, this field is utf8 encoded.\n        // On a windows machine, this field is encoded with the localized windows code page.\n        var zipComment = this.reader.readData(this.zipCommentLength);\n        var decodeParamType = support.uint8array ? \"uint8array\" : \"array\";\n        // To get consistent behavior with the generation part, we will assume that\n        // this is utf8 encoded unless specified otherwise.\n        var decodeContent = utils.transformTo(decodeParamType, zipComment);\n        this.zipComment = this.loadOptions.decodeFileName(decodeContent);\n    },\n    /**\n     * Read the end of the Zip 64 central directory.\n     * Not merged with the method readEndOfCentral :\n     * The end of central can coexist with its Zip64 brother,\n     * I don't want to read the wrong number of bytes !\n     */\n    readBlockZip64EndOfCentral: function() {\n        this.zip64EndOfCentralSize = this.reader.readInt(8);\n        this.reader.skip(4);\n        // this.versionMadeBy = this.reader.readString(2);\n        // this.versionNeeded = this.reader.readInt(2);\n        this.diskNumber = this.reader.readInt(4);\n        this.diskWithCentralDirStart = this.reader.readInt(4);\n        this.centralDirRecordsOnThisDisk = this.reader.readInt(8);\n        this.centralDirRecords = this.reader.readInt(8);\n        this.centralDirSize = this.reader.readInt(8);\n        this.centralDirOffset = this.reader.readInt(8);\n\n        this.zip64ExtensibleData = {};\n        var extraDataSize = this.zip64EndOfCentralSize - 44,\n            index = 0,\n            extraFieldId,\n            extraFieldLength,\n            extraFieldValue;\n        while (index < extraDataSize) {\n            extraFieldId = this.reader.readInt(2);\n            extraFieldLength = this.reader.readInt(4);\n            extraFieldValue = this.reader.readData(extraFieldLength);\n            this.zip64ExtensibleData[extraFieldId] = {\n                id: extraFieldId,\n                length: extraFieldLength,\n                value: extraFieldValue\n            };\n        }\n    },\n    /**\n     * Read the end of the Zip 64 central directory locator.\n     */\n    readBlockZip64EndOfCentralLocator: function() {\n        this.diskWithZip64CentralDirStart = this.reader.readInt(4);\n        this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8);\n        this.disksCount = this.reader.readInt(4);\n        if (this.disksCount > 1) {\n            throw new Error(\"Multi-volumes zip are not supported\");\n        }\n    },\n    /**\n     * Read the local files, based on the offset read in the central part.\n     */\n    readLocalFiles: function() {\n        var i, file;\n        for (i = 0; i < this.files.length; i++) {\n            file = this.files[i];\n            this.reader.setIndex(file.localHeaderOffset);\n            this.checkSignature(sig.LOCAL_FILE_HEADER);\n            file.readLocalPart(this.reader);\n            file.handleUTF8();\n            file.processAttributes();\n        }\n    },\n    /**\n     * Read the central directory.\n     */\n    readCentralDir: function() {\n        var file;\n\n        this.reader.setIndex(this.centralDirOffset);\n        while (this.reader.readAndCheckSignature(sig.CENTRAL_FILE_HEADER)) {\n            file = new ZipEntry({\n                zip64: this.zip64\n            }, this.loadOptions);\n            file.readCentralPart(this.reader);\n            this.files.push(file);\n        }\n\n        if (this.centralDirRecords !== this.files.length) {\n            if (this.centralDirRecords !== 0 && this.files.length === 0) {\n                // We expected some records but couldn't find ANY.\n                // This is really suspicious, as if something went wrong.\n                throw new Error(\"Corrupted zip or bug: expected \" + this.centralDirRecords + \" records in central dir, got \" + this.files.length);\n            } else {\n                // We found some records but not all.\n                // Something is wrong but we got something for the user: no error here.\n                // console.warn(\"expected\", this.centralDirRecords, \"records in central dir, got\", this.files.length);\n            }\n        }\n    },\n    /**\n     * Read the end of central directory.\n     */\n    readEndOfCentral: function() {\n        var offset = this.reader.lastIndexOfSignature(sig.CENTRAL_DIRECTORY_END);\n        if (offset < 0) {\n            // Check if the content is a truncated zip or complete garbage.\n            // A \"LOCAL_FILE_HEADER\" is not required at the beginning (auto\n            // extractible zip for example) but it can give a good hint.\n            // If an ajax request was used without responseType, we will also\n            // get unreadable data.\n            var isGarbage = !this.isSignature(0, sig.LOCAL_FILE_HEADER);\n\n            if (isGarbage) {\n                throw new Error(\"Can't find end of central directory : is this a zip file ? \" +\n                                \"If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html\");\n            } else {\n                throw new Error(\"Corrupted zip: can't find end of central directory\");\n            }\n\n        }\n        this.reader.setIndex(offset);\n        var endOfCentralDirOffset = offset;\n        this.checkSignature(sig.CENTRAL_DIRECTORY_END);\n        this.readBlockEndOfCentral();\n\n\n        /* extract from the zip spec :\n            4)  If one of the fields in the end of central directory\n                record is too small to hold required data, the field\n                should be set to -1 (0xFFFF or 0xFFFFFFFF) and the\n                ZIP64 format record should be created.\n            5)  The end of central directory record and the\n                Zip64 end of central directory locator record must\n                reside on the same disk when splitting or spanning\n                an archive.\n         */\n        if (this.diskNumber === utils.MAX_VALUE_16BITS || this.diskWithCentralDirStart === utils.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === utils.MAX_VALUE_16BITS || this.centralDirRecords === utils.MAX_VALUE_16BITS || this.centralDirSize === utils.MAX_VALUE_32BITS || this.centralDirOffset === utils.MAX_VALUE_32BITS) {\n            this.zip64 = true;\n\n            /*\n            Warning : the zip64 extension is supported, but ONLY if the 64bits integer read from\n            the zip file can fit into a 32bits integer. This cannot be solved : JavaScript represents\n            all numbers as 64-bit double precision IEEE 754 floating point numbers.\n            So, we have 53bits for integers and bitwise operations treat everything as 32bits.\n            see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/Bitwise_Operators\n            and http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf section 8.5\n            */\n\n            // should look for a zip64 EOCD locator\n            offset = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR);\n            if (offset < 0) {\n                throw new Error(\"Corrupted zip: can't find the ZIP64 end of central directory locator\");\n            }\n            this.reader.setIndex(offset);\n            this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR);\n            this.readBlockZip64EndOfCentralLocator();\n\n            // now the zip64 EOCD record\n            if (!this.isSignature(this.relativeOffsetEndOfZip64CentralDir, sig.ZIP64_CENTRAL_DIRECTORY_END)) {\n                // console.warn(\"ZIP64 end of central directory not where expected.\");\n                this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_END);\n                if (this.relativeOffsetEndOfZip64CentralDir < 0) {\n                    throw new Error(\"Corrupted zip: can't find the ZIP64 end of central directory\");\n                }\n            }\n            this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir);\n            this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_END);\n            this.readBlockZip64EndOfCentral();\n        }\n\n        var expectedEndOfCentralDirOffset = this.centralDirOffset + this.centralDirSize;\n        if (this.zip64) {\n            expectedEndOfCentralDirOffset += 20; // end of central dir 64 locator\n            expectedEndOfCentralDirOffset += 12 /* should not include the leading 12 bytes */ + this.zip64EndOfCentralSize;\n        }\n\n        var extraBytes = endOfCentralDirOffset - expectedEndOfCentralDirOffset;\n\n        if (extraBytes > 0) {\n            // console.warn(extraBytes, \"extra bytes at beginning or within zipfile\");\n            if (this.isSignature(endOfCentralDirOffset, sig.CENTRAL_FILE_HEADER)) {\n                // The offsets seem wrong, but we have something at the specified offset.\n                // So… we keep it.\n            } else {\n                // the offset is wrong, update the \"zero\" of the reader\n                // this happens if data has been prepended (crx files for example)\n                this.reader.zero = extraBytes;\n            }\n        } else if (extraBytes < 0) {\n            throw new Error(\"Corrupted zip: missing \" + Math.abs(extraBytes) + \" bytes.\");\n        }\n    },\n    prepareReader: function(data) {\n        this.reader = readerFor(data);\n    },\n    /**\n     * Read a zip file and create ZipEntries.\n     * @param {String|ArrayBuffer|Uint8Array|Buffer} data the binary string representing a zip file.\n     */\n    load: function(data) {\n        this.prepareReader(data);\n        this.readEndOfCentral();\n        this.readCentralDir();\n        this.readLocalFiles();\n    }\n};\n// }}} end of ZipEntries\nmodule.exports = ZipEntries;\n","'use strict';\nvar readerFor = require('./reader/readerFor');\nvar utils = require('./utils');\nvar CompressedObject = require('./compressedObject');\nvar crc32fn = require('./crc32');\nvar utf8 = require('./utf8');\nvar compressions = require('./compressions');\nvar support = require('./support');\n\nvar MADE_BY_DOS = 0x00;\nvar MADE_BY_UNIX = 0x03;\n\n/**\n * Find a compression registered in JSZip.\n * @param {string} compressionMethod the method magic to find.\n * @return {Object|null} the JSZip compression object, null if none found.\n */\nvar findCompression = function(compressionMethod) {\n    for (var method in compressions) {\n        if (!compressions.hasOwnProperty(method)) {\n            continue;\n        }\n        if (compressions[method].magic === compressionMethod) {\n            return compressions[method];\n        }\n    }\n    return null;\n};\n\n// class ZipEntry {{{\n/**\n * An entry in the zip file.\n * @constructor\n * @param {Object} options Options of the current file.\n * @param {Object} loadOptions Options for loading the stream.\n */\nfunction ZipEntry(options, loadOptions) {\n    this.options = options;\n    this.loadOptions = loadOptions;\n}\nZipEntry.prototype = {\n    /**\n     * say if the file is encrypted.\n     * @return {boolean} true if the file is encrypted, false otherwise.\n     */\n    isEncrypted: function() {\n        // bit 1 is set\n        return (this.bitFlag & 0x0001) === 0x0001;\n    },\n    /**\n     * say if the file has utf-8 filename/comment.\n     * @return {boolean} true if the filename/comment is in utf-8, false otherwise.\n     */\n    useUTF8: function() {\n        // bit 11 is set\n        return (this.bitFlag & 0x0800) === 0x0800;\n    },\n    /**\n     * Read the local part of a zip file and add the info in this object.\n     * @param {DataReader} reader the reader to use.\n     */\n    readLocalPart: function(reader) {\n        var compression, localExtraFieldsLength;\n\n        // we already know everything from the central dir !\n        // If the central dir data are false, we are doomed.\n        // On the bright side, the local part is scary  : zip64, data descriptors, both, etc.\n        // The less data we get here, the more reliable this should be.\n        // Let's skip the whole header and dash to the data !\n        reader.skip(22);\n        // in some zip created on windows, the filename stored in the central dir contains \\ instead of /.\n        // Strangely, the filename here is OK.\n        // I would love to treat these zip files as corrupted (see http://www.info-zip.org/FAQ.html#backslashes\n        // or APPNOTE#4.4.17.1, \"All slashes MUST be forward slashes '/'\") but there are a lot of bad zip generators...\n        // Search \"unzip mismatching \"local\" filename continuing with \"central\" filename version\" on\n        // the internet.\n        //\n        // I think I see the logic here : the central directory is used to display\n        // content and the local directory is used to extract the files. Mixing / and \\\n        // may be used to display \\ to windows users and use / when extracting the files.\n        // Unfortunately, this lead also to some issues : http://seclists.org/fulldisclosure/2009/Sep/394\n        this.fileNameLength = reader.readInt(2);\n        localExtraFieldsLength = reader.readInt(2); // can't be sure this will be the same as the central dir\n        // the fileName is stored as binary data, the handleUTF8 method will take care of the encoding.\n        this.fileName = reader.readData(this.fileNameLength);\n        reader.skip(localExtraFieldsLength);\n\n        if (this.compressedSize === -1 || this.uncompressedSize === -1) {\n            throw new Error(\"Bug or corrupted zip : didn't get enough informations from the central directory \" + \"(compressedSize === -1 || uncompressedSize === -1)\");\n        }\n\n        compression = findCompression(this.compressionMethod);\n        if (compression === null) { // no compression found\n            throw new Error(\"Corrupted zip : compression \" + utils.pretty(this.compressionMethod) + \" unknown (inner file : \" + utils.transformTo(\"string\", this.fileName) + \")\");\n        }\n        this.decompressed = new CompressedObject(this.compressedSize, this.uncompressedSize, this.crc32, compression, reader.readData(this.compressedSize));\n    },\n\n    /**\n     * Read the central part of a zip file and add the info in this object.\n     * @param {DataReader} reader the reader to use.\n     */\n    readCentralPart: function(reader) {\n        this.versionMadeBy = reader.readInt(2);\n        reader.skip(2);\n        // this.versionNeeded = reader.readInt(2);\n        this.bitFlag = reader.readInt(2);\n        this.compressionMethod = reader.readString(2);\n        this.date = reader.readDate();\n        this.crc32 = reader.readInt(4);\n        this.compressedSize = reader.readInt(4);\n        this.uncompressedSize = reader.readInt(4);\n        var fileNameLength = reader.readInt(2);\n        this.extraFieldsLength = reader.readInt(2);\n        this.fileCommentLength = reader.readInt(2);\n        this.diskNumberStart = reader.readInt(2);\n        this.internalFileAttributes = reader.readInt(2);\n        this.externalFileAttributes = reader.readInt(4);\n        this.localHeaderOffset = reader.readInt(4);\n\n        if (this.isEncrypted()) {\n            throw new Error(\"Encrypted zip are not supported\");\n        }\n\n        // will be read in the local part, see the comments there\n        reader.skip(fileNameLength);\n        this.readExtraFields(reader);\n        this.parseZIP64ExtraField(reader);\n        this.fileComment = reader.readData(this.fileCommentLength);\n    },\n\n    /**\n     * Parse the external file attributes and get the unix/dos permissions.\n     */\n    processAttributes: function () {\n        this.unixPermissions = null;\n        this.dosPermissions = null;\n        var madeBy = this.versionMadeBy >> 8;\n\n        // Check if we have the DOS directory flag set.\n        // We look for it in the DOS and UNIX permissions\n        // but some unknown platform could set it as a compatibility flag.\n        this.dir = this.externalFileAttributes & 0x0010 ? true : false;\n\n        if(madeBy === MADE_BY_DOS) {\n            // first 6 bits (0 to 5)\n            this.dosPermissions = this.externalFileAttributes & 0x3F;\n        }\n\n        if(madeBy === MADE_BY_UNIX) {\n            this.unixPermissions = (this.externalFileAttributes >> 16) & 0xFFFF;\n            // the octal permissions are in (this.unixPermissions & 0x01FF).toString(8);\n        }\n\n        // fail safe : if the name ends with a / it probably means a folder\n        if (!this.dir && this.fileNameStr.slice(-1) === '/') {\n            this.dir = true;\n        }\n    },\n\n    /**\n     * Parse the ZIP64 extra field and merge the info in the current ZipEntry.\n     * @param {DataReader} reader the reader to use.\n     */\n    parseZIP64ExtraField: function(reader) {\n\n        if (!this.extraFields[0x0001]) {\n            return;\n        }\n\n        // should be something, preparing the extra reader\n        var extraReader = readerFor(this.extraFields[0x0001].value);\n\n        // I really hope that these 64bits integer can fit in 32 bits integer, because js\n        // won't let us have more.\n        if (this.uncompressedSize === utils.MAX_VALUE_32BITS) {\n            this.uncompressedSize = extraReader.readInt(8);\n        }\n        if (this.compressedSize === utils.MAX_VALUE_32BITS) {\n            this.compressedSize = extraReader.readInt(8);\n        }\n        if (this.localHeaderOffset === utils.MAX_VALUE_32BITS) {\n            this.localHeaderOffset = extraReader.readInt(8);\n        }\n        if (this.diskNumberStart === utils.MAX_VALUE_32BITS) {\n            this.diskNumberStart = extraReader.readInt(4);\n        }\n    },\n    /**\n     * Read the central part of a zip file and add the info in this object.\n     * @param {DataReader} reader the reader to use.\n     */\n    readExtraFields: function(reader) {\n        var end = reader.index + this.extraFieldsLength,\n            extraFieldId,\n            extraFieldLength,\n            extraFieldValue;\n\n        if (!this.extraFields) {\n            this.extraFields = {};\n        }\n\n        while (reader.index < end) {\n            extraFieldId = reader.readInt(2);\n            extraFieldLength = reader.readInt(2);\n            extraFieldValue = reader.readData(extraFieldLength);\n\n            this.extraFields[extraFieldId] = {\n                id: extraFieldId,\n                length: extraFieldLength,\n                value: extraFieldValue\n            };\n        }\n    },\n    /**\n     * Apply an UTF8 transformation if needed.\n     */\n    handleUTF8: function() {\n        var decodeParamType = support.uint8array ? \"uint8array\" : \"array\";\n        if (this.useUTF8()) {\n            this.fileNameStr = utf8.utf8decode(this.fileName);\n            this.fileCommentStr = utf8.utf8decode(this.fileComment);\n        } else {\n            var upath = this.findExtraFieldUnicodePath();\n            if (upath !== null) {\n                this.fileNameStr = upath;\n            } else {\n                // ASCII text or unsupported code page\n                var fileNameByteArray =  utils.transformTo(decodeParamType, this.fileName);\n                this.fileNameStr = this.loadOptions.decodeFileName(fileNameByteArray);\n            }\n\n            var ucomment = this.findExtraFieldUnicodeComment();\n            if (ucomment !== null) {\n                this.fileCommentStr = ucomment;\n            } else {\n                // ASCII text or unsupported code page\n                var commentByteArray =  utils.transformTo(decodeParamType, this.fileComment);\n                this.fileCommentStr = this.loadOptions.decodeFileName(commentByteArray);\n            }\n        }\n    },\n\n    /**\n     * Find the unicode path declared in the extra field, if any.\n     * @return {String} the unicode path, null otherwise.\n     */\n    findExtraFieldUnicodePath: function() {\n        var upathField = this.extraFields[0x7075];\n        if (upathField) {\n            var extraReader = readerFor(upathField.value);\n\n            // wrong version\n            if (extraReader.readInt(1) !== 1) {\n                return null;\n            }\n\n            // the crc of the filename changed, this field is out of date.\n            if (crc32fn(this.fileName) !== extraReader.readInt(4)) {\n                return null;\n            }\n\n            return utf8.utf8decode(extraReader.readData(upathField.length - 5));\n        }\n        return null;\n    },\n\n    /**\n     * Find the unicode comment declared in the extra field, if any.\n     * @return {String} the unicode comment, null otherwise.\n     */\n    findExtraFieldUnicodeComment: function() {\n        var ucommentField = this.extraFields[0x6375];\n        if (ucommentField) {\n            var extraReader = readerFor(ucommentField.value);\n\n            // wrong version\n            if (extraReader.readInt(1) !== 1) {\n                return null;\n            }\n\n            // the crc of the comment changed, this field is out of date.\n            if (crc32fn(this.fileComment) !== extraReader.readInt(4)) {\n                return null;\n            }\n\n            return utf8.utf8decode(extraReader.readData(ucommentField.length - 5));\n        }\n        return null;\n    }\n};\nmodule.exports = ZipEntry;\n","'use strict';\n\nvar StreamHelper = require('./stream/StreamHelper');\nvar DataWorker = require('./stream/DataWorker');\nvar utf8 = require('./utf8');\nvar CompressedObject = require('./compressedObject');\nvar GenericWorker = require('./stream/GenericWorker');\n\n/**\n * A simple object representing a file in the zip file.\n * @constructor\n * @param {string} name the name of the file\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data\n * @param {Object} options the options of the file\n */\nvar ZipObject = function(name, data, options) {\n    this.name = name;\n    this.dir = options.dir;\n    this.date = options.date;\n    this.comment = options.comment;\n    this.unixPermissions = options.unixPermissions;\n    this.dosPermissions = options.dosPermissions;\n\n    this._data = data;\n    this._dataBinary = options.binary;\n    // keep only the compression\n    this.options = {\n        compression : options.compression,\n        compressionOptions : options.compressionOptions\n    };\n};\n\nZipObject.prototype = {\n    /**\n     * Create an internal stream for the content of this object.\n     * @param {String} type the type of each chunk.\n     * @return StreamHelper the stream.\n     */\n    internalStream: function (type) {\n        var result = null, outputType = \"string\";\n        try {\n            if (!type) {\n                throw new Error(\"No output type specified.\");\n            }\n            outputType = type.toLowerCase();\n            var askUnicodeString = outputType === \"string\" || outputType === \"text\";\n            if (outputType === \"binarystring\" || outputType === \"text\") {\n                outputType = \"string\";\n            }\n            result = this._decompressWorker();\n\n            var isUnicodeString = !this._dataBinary;\n\n            if (isUnicodeString && !askUnicodeString) {\n                result = result.pipe(new utf8.Utf8EncodeWorker());\n            }\n            if (!isUnicodeString && askUnicodeString) {\n                result = result.pipe(new utf8.Utf8DecodeWorker());\n            }\n        } catch (e) {\n            result = new GenericWorker(\"error\");\n            result.error(e);\n        }\n\n        return new StreamHelper(result, outputType, \"\");\n    },\n\n    /**\n     * Prepare the content in the asked type.\n     * @param {String} type the type of the result.\n     * @param {Function} onUpdate a function to call on each internal update.\n     * @return Promise the promise of the result.\n     */\n    async: function (type, onUpdate) {\n        return this.internalStream(type).accumulate(onUpdate);\n    },\n\n    /**\n     * Prepare the content as a nodejs stream.\n     * @param {String} type the type of each chunk.\n     * @param {Function} onUpdate a function to call on each internal update.\n     * @return Stream the stream.\n     */\n    nodeStream: function (type, onUpdate) {\n        return this.internalStream(type || \"nodebuffer\").toNodejsStream(onUpdate);\n    },\n\n    /**\n     * Return a worker for the compressed content.\n     * @private\n     * @param {Object} compression the compression object to use.\n     * @param {Object} compressionOptions the options to use when compressing.\n     * @return Worker the worker.\n     */\n    _compressWorker: function (compression, compressionOptions) {\n        if (\n            this._data instanceof CompressedObject &&\n            this._data.compression.magic === compression.magic\n        ) {\n            return this._data.getCompressedWorker();\n        } else {\n            var result = this._decompressWorker();\n            if(!this._dataBinary) {\n                result = result.pipe(new utf8.Utf8EncodeWorker());\n            }\n            return CompressedObject.createWorkerFrom(result, compression, compressionOptions);\n        }\n    },\n    /**\n     * Return a worker for the decompressed content.\n     * @private\n     * @return Worker the worker.\n     */\n    _decompressWorker : function () {\n        if (this._data instanceof CompressedObject) {\n            return this._data.getContentWorker();\n        } else if (this._data instanceof GenericWorker) {\n            return this._data;\n        } else {\n            return new DataWorker(this._data);\n        }\n    }\n};\n\nvar removedMethods = [\"asText\", \"asBinary\", \"asNodeBuffer\", \"asUint8Array\", \"asArrayBuffer\"];\nvar removedFn = function () {\n    throw new Error(\"This method has been removed in JSZip 3.0, please check the upgrade guide.\");\n};\n\nfor(var i = 0; i < removedMethods.length; i++) {\n    ZipObject.prototype[removedMethods[i]] = removedFn;\n}\nmodule.exports = ZipObject;\n","require('../modules/web.immediate');\nmodule.exports = require('../modules/_core').setImmediate;","module.exports = function(it){\n  if(typeof it != 'function')throw TypeError(it + ' is not a function!');\n  return it;\n};","var isObject = require('./_is-object');\nmodule.exports = function(it){\n  if(!isObject(it))throw TypeError(it + ' is not an object!');\n  return it;\n};","var toString = {}.toString;\n\nmodule.exports = function(it){\n  return toString.call(it).slice(8, -1);\n};","var core = module.exports = {version: '2.3.0'};\nif(typeof __e == 'number')__e = core; // eslint-disable-line no-undef","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function(fn, that, length){\n  aFunction(fn);\n  if(that === undefined)return fn;\n  switch(length){\n    case 1: return function(a){\n      return fn.call(that, a);\n    };\n    case 2: return function(a, b){\n      return fn.call(that, a, b);\n    };\n    case 3: return function(a, b, c){\n      return fn.call(that, a, b, c);\n    };\n  }\n  return function(/* ...args */){\n    return fn.apply(that, arguments);\n  };\n};","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function(){\n  return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;\n});","var isObject = require('./_is-object')\n  , document = require('./_global').document\n  // in old IE typeof document.createElement is 'object'\n  , is = isObject(document) && isObject(document.createElement);\nmodule.exports = function(it){\n  return is ? document.createElement(it) : {};\n};","var global    = require('./_global')\n  , core      = require('./_core')\n  , ctx       = require('./_ctx')\n  , hide      = require('./_hide')\n  , PROTOTYPE = 'prototype';\n\nvar $export = function(type, name, source){\n  var IS_FORCED = type & $export.F\n    , IS_GLOBAL = type & $export.G\n    , IS_STATIC = type & $export.S\n    , IS_PROTO  = type & $export.P\n    , IS_BIND   = type & $export.B\n    , IS_WRAP   = type & $export.W\n    , exports   = IS_GLOBAL ? core : core[name] || (core[name] = {})\n    , expProto  = exports[PROTOTYPE]\n    , target    = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]\n    , key, own, out;\n  if(IS_GLOBAL)source = name;\n  for(key in source){\n    // contains in native\n    own = !IS_FORCED && target && target[key] !== undefined;\n    if(own && key in exports)continue;\n    // export native or passed\n    out = own ? target[key] : source[key];\n    // prevent global pollution for namespaces\n    exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n    // bind timers to global for call from export context\n    : IS_BIND && own ? ctx(out, global)\n    // wrap global constructors for prevent change them in library\n    : IS_WRAP && target[key] == out ? (function(C){\n      var F = function(a, b, c){\n        if(this instanceof C){\n          switch(arguments.length){\n            case 0: return new C;\n            case 1: return new C(a);\n            case 2: return new C(a, b);\n          } return new C(a, b, c);\n        } return C.apply(this, arguments);\n      };\n      F[PROTOTYPE] = C[PROTOTYPE];\n      return F;\n    // make static versions for prototype methods\n    })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n    // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n    if(IS_PROTO){\n      (exports.virtual || (exports.virtual = {}))[key] = out;\n      // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n      if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);\n    }\n  }\n};\n// type bitmap\n$export.F = 1;   // forced\n$export.G = 2;   // global\n$export.S = 4;   // static\n$export.P = 8;   // proto\n$export.B = 16;  // bind\n$export.W = 32;  // wrap\n$export.U = 64;  // safe\n$export.R = 128; // real proto method for `library` \nmodule.exports = $export;","module.exports = function(exec){\n  try {\n    return !!exec();\n  } catch(e){\n    return true;\n  }\n};","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n  ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();\nif(typeof __g == 'number')__g = global; // eslint-disable-line no-undef","var dP         = require('./_object-dp')\n  , createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function(object, key, value){\n  return dP.f(object, key, createDesc(1, value));\n} : function(object, key, value){\n  object[key] = value;\n  return object;\n};","module.exports = require('./_global').document && document.documentElement;","module.exports = !require('./_descriptors') && !require('./_fails')(function(){\r\n  return Object.defineProperty(require('./_dom-create')('div'), 'a', {get: function(){ return 7; }}).a != 7;\r\n});","// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function(fn, args, that){\n  var un = that === undefined;\n  switch(args.length){\n    case 0: return un ? fn()\n                      : fn.call(that);\n    case 1: return un ? fn(args[0])\n                      : fn.call(that, args[0]);\n    case 2: return un ? fn(args[0], args[1])\n                      : fn.call(that, args[0], args[1]);\n    case 3: return un ? fn(args[0], args[1], args[2])\n                      : fn.call(that, args[0], args[1], args[2]);\n    case 4: return un ? fn(args[0], args[1], args[2], args[3])\n                      : fn.call(that, args[0], args[1], args[2], args[3]);\n  } return              fn.apply(that, args);\n};","module.exports = function(it){\n  return typeof it === 'object' ? it !== null : typeof it === 'function';\n};","var anObject       = require('./_an-object')\n  , IE8_DOM_DEFINE = require('./_ie8-dom-define')\n  , toPrimitive    = require('./_to-primitive')\n  , dP             = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes){\n  anObject(O);\n  P = toPrimitive(P, true);\n  anObject(Attributes);\n  if(IE8_DOM_DEFINE)try {\n    return dP(O, P, Attributes);\n  } catch(e){ /* empty */ }\n  if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');\n  if('value' in Attributes)O[P] = Attributes.value;\n  return O;\n};","module.exports = function(bitmap, value){\n  return {\n    enumerable  : !(bitmap & 1),\n    configurable: !(bitmap & 2),\n    writable    : !(bitmap & 4),\n    value       : value\n  };\n};","var ctx                = require('./_ctx')\n  , invoke             = require('./_invoke')\n  , html               = require('./_html')\n  , cel                = require('./_dom-create')\n  , global             = require('./_global')\n  , process            = global.process\n  , setTask            = global.setImmediate\n  , clearTask          = global.clearImmediate\n  , MessageChannel     = global.MessageChannel\n  , counter            = 0\n  , queue              = {}\n  , ONREADYSTATECHANGE = 'onreadystatechange'\n  , defer, channel, port;\nvar run = function(){\n  var id = +this;\n  if(queue.hasOwnProperty(id)){\n    var fn = queue[id];\n    delete queue[id];\n    fn();\n  }\n};\nvar listener = function(event){\n  run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif(!setTask || !clearTask){\n  setTask = function setImmediate(fn){\n    var args = [], i = 1;\n    while(arguments.length > i)args.push(arguments[i++]);\n    queue[++counter] = function(){\n      invoke(typeof fn == 'function' ? fn : Function(fn), args);\n    };\n    defer(counter);\n    return counter;\n  };\n  clearTask = function clearImmediate(id){\n    delete queue[id];\n  };\n  // Node.js 0.8-\n  if(require('./_cof')(process) == 'process'){\n    defer = function(id){\n      process.nextTick(ctx(run, id, 1));\n    };\n  // Browsers with MessageChannel, includes WebWorkers\n  } else if(MessageChannel){\n    channel = new MessageChannel;\n    port    = channel.port2;\n    channel.port1.onmessage = listener;\n    defer = ctx(port.postMessage, port, 1);\n  // Browsers with postMessage, skip WebWorkers\n  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n  } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){\n    defer = function(id){\n      global.postMessage(id + '', '*');\n    };\n    global.addEventListener('message', listener, false);\n  // IE8-\n  } else if(ONREADYSTATECHANGE in cel('script')){\n    defer = function(id){\n      html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){\n        html.removeChild(this);\n        run.call(id);\n      };\n    };\n  // Rest old browsers\n  } else {\n    defer = function(id){\n      setTimeout(ctx(run, id, 1), 0);\n    };\n  }\n}\nmodule.exports = {\n  set:   setTask,\n  clear: clearTask\n};","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function(it, S){\n  if(!isObject(it))return it;\n  var fn, val;\n  if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;\n  if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;\n  if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;\n  throw TypeError(\"Can't convert object to primitive value\");\n};","var $export = require('./_export')\n  , $task   = require('./_task');\n$export($export.G + $export.B, {\n  setImmediate:   $task.set,\n  clearImmediate: $task.clear\n});","'use strict';\nvar Mutation = global.MutationObserver || global.WebKitMutationObserver;\n\nvar scheduleDrain;\n\n{\n  if (Mutation) {\n    var called = 0;\n    var observer = new Mutation(nextTick);\n    var element = global.document.createTextNode('');\n    observer.observe(element, {\n      characterData: true\n    });\n    scheduleDrain = function () {\n      element.data = (called = ++called % 2);\n    };\n  } else if (!global.setImmediate && typeof global.MessageChannel !== 'undefined') {\n    var channel = new global.MessageChannel();\n    channel.port1.onmessage = nextTick;\n    scheduleDrain = function () {\n      channel.port2.postMessage(0);\n    };\n  } else if ('document' in global && 'onreadystatechange' in global.document.createElement('script')) {\n    scheduleDrain = function () {\n\n      // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n      // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n      var scriptEl = global.document.createElement('script');\n      scriptEl.onreadystatechange = function () {\n        nextTick();\n\n        scriptEl.onreadystatechange = null;\n        scriptEl.parentNode.removeChild(scriptEl);\n        scriptEl = null;\n      };\n      global.document.documentElement.appendChild(scriptEl);\n    };\n  } else {\n    scheduleDrain = function () {\n      setTimeout(nextTick, 0);\n    };\n  }\n}\n\nvar draining;\nvar queue = [];\n//named nextTick for less confusing stack traces\nfunction nextTick() {\n  draining = true;\n  var i, oldQueue;\n  var len = queue.length;\n  while (len) {\n    oldQueue = queue;\n    queue = [];\n    i = -1;\n    while (++i < len) {\n      oldQueue[i]();\n    }\n    len = queue.length;\n  }\n  draining = false;\n}\n\nmodule.exports = immediate;\nfunction immediate(task) {\n  if (queue.push(task) === 1 && !draining) {\n    scheduleDrain();\n  }\n}\n","'use strict';\nvar immediate = require('immediate');\n\n/* istanbul ignore next */\nfunction INTERNAL() {}\n\nvar handlers = {};\n\nvar REJECTED = ['REJECTED'];\nvar FULFILLED = ['FULFILLED'];\nvar PENDING = ['PENDING'];\n\nmodule.exports = Promise;\n\nfunction Promise(resolver) {\n  if (typeof resolver !== 'function') {\n    throw new TypeError('resolver must be a function');\n  }\n  this.state = PENDING;\n  this.queue = [];\n  this.outcome = void 0;\n  if (resolver !== INTERNAL) {\n    safelyResolveThenable(this, resolver);\n  }\n}\n\nPromise.prototype[\"catch\"] = function (onRejected) {\n  return this.then(null, onRejected);\n};\nPromise.prototype.then = function (onFulfilled, onRejected) {\n  if (typeof onFulfilled !== 'function' && this.state === FULFILLED ||\n    typeof onRejected !== 'function' && this.state === REJECTED) {\n    return this;\n  }\n  var promise = new this.constructor(INTERNAL);\n  if (this.state !== PENDING) {\n    var resolver = this.state === FULFILLED ? onFulfilled : onRejected;\n    unwrap(promise, resolver, this.outcome);\n  } else {\n    this.queue.push(new QueueItem(promise, onFulfilled, onRejected));\n  }\n\n  return promise;\n};\nfunction QueueItem(promise, onFulfilled, onRejected) {\n  this.promise = promise;\n  if (typeof onFulfilled === 'function') {\n    this.onFulfilled = onFulfilled;\n    this.callFulfilled = this.otherCallFulfilled;\n  }\n  if (typeof onRejected === 'function') {\n    this.onRejected = onRejected;\n    this.callRejected = this.otherCallRejected;\n  }\n}\nQueueItem.prototype.callFulfilled = function (value) {\n  handlers.resolve(this.promise, value);\n};\nQueueItem.prototype.otherCallFulfilled = function (value) {\n  unwrap(this.promise, this.onFulfilled, value);\n};\nQueueItem.prototype.callRejected = function (value) {\n  handlers.reject(this.promise, value);\n};\nQueueItem.prototype.otherCallRejected = function (value) {\n  unwrap(this.promise, this.onRejected, value);\n};\n\nfunction unwrap(promise, func, value) {\n  immediate(function () {\n    var returnValue;\n    try {\n      returnValue = func(value);\n    } catch (e) {\n      return handlers.reject(promise, e);\n    }\n    if (returnValue === promise) {\n      handlers.reject(promise, new TypeError('Cannot resolve promise with itself'));\n    } else {\n      handlers.resolve(promise, returnValue);\n    }\n  });\n}\n\nhandlers.resolve = function (self, value) {\n  var result = tryCatch(getThen, value);\n  if (result.status === 'error') {\n    return handlers.reject(self, result.value);\n  }\n  var thenable = result.value;\n\n  if (thenable) {\n    safelyResolveThenable(self, thenable);\n  } else {\n    self.state = FULFILLED;\n    self.outcome = value;\n    var i = -1;\n    var len = self.queue.length;\n    while (++i < len) {\n      self.queue[i].callFulfilled(value);\n    }\n  }\n  return self;\n};\nhandlers.reject = function (self, error) {\n  self.state = REJECTED;\n  self.outcome = error;\n  var i = -1;\n  var len = self.queue.length;\n  while (++i < len) {\n    self.queue[i].callRejected(error);\n  }\n  return self;\n};\n\nfunction getThen(obj) {\n  // Make sure we only access the accessor once as required by the spec\n  var then = obj && obj.then;\n  if (obj && (typeof obj === 'object' || typeof obj === 'function') && typeof then === 'function') {\n    return function appyThen() {\n      then.apply(obj, arguments);\n    };\n  }\n}\n\nfunction safelyResolveThenable(self, thenable) {\n  // Either fulfill, reject or reject with error\n  var called = false;\n  function onError(value) {\n    if (called) {\n      return;\n    }\n    called = true;\n    handlers.reject(self, value);\n  }\n\n  function onSuccess(value) {\n    if (called) {\n      return;\n    }\n    called = true;\n    handlers.resolve(self, value);\n  }\n\n  function tryToUnwrap() {\n    thenable(onSuccess, onError);\n  }\n\n  var result = tryCatch(tryToUnwrap);\n  if (result.status === 'error') {\n    onError(result.value);\n  }\n}\n\nfunction tryCatch(func, value) {\n  var out = {};\n  try {\n    out.value = func(value);\n    out.status = 'success';\n  } catch (e) {\n    out.status = 'error';\n    out.value = e;\n  }\n  return out;\n}\n\nPromise.resolve = resolve;\nfunction resolve(value) {\n  if (value instanceof this) {\n    return value;\n  }\n  return handlers.resolve(new this(INTERNAL), value);\n}\n\nPromise.reject = reject;\nfunction reject(reason) {\n  var promise = new this(INTERNAL);\n  return handlers.reject(promise, reason);\n}\n\nPromise.all = all;\nfunction all(iterable) {\n  var self = this;\n  if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n    return this.reject(new TypeError('must be an array'));\n  }\n\n  var len = iterable.length;\n  var called = false;\n  if (!len) {\n    return this.resolve([]);\n  }\n\n  var values = new Array(len);\n  var resolved = 0;\n  var i = -1;\n  var promise = new this(INTERNAL);\n\n  while (++i < len) {\n    allResolver(iterable[i], i);\n  }\n  return promise;\n  function allResolver(value, i) {\n    self.resolve(value).then(resolveFromAll, function (error) {\n      if (!called) {\n        called = true;\n        handlers.reject(promise, error);\n      }\n    });\n    function resolveFromAll(outValue) {\n      values[i] = outValue;\n      if (++resolved === len && !called) {\n        called = true;\n        handlers.resolve(promise, values);\n      }\n    }\n  }\n}\n\nPromise.race = race;\nfunction race(iterable) {\n  var self = this;\n  if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n    return this.reject(new TypeError('must be an array'));\n  }\n\n  var len = iterable.length;\n  var called = false;\n  if (!len) {\n    return this.resolve([]);\n  }\n\n  var i = -1;\n  var promise = new this(INTERNAL);\n\n  while (++i < len) {\n    resolver(iterable[i]);\n  }\n  return promise;\n  function resolver(value) {\n    self.resolve(value).then(function (response) {\n      if (!called) {\n        called = true;\n        handlers.resolve(promise, response);\n      }\n    }, function (error) {\n      if (!called) {\n        called = true;\n        handlers.reject(promise, error);\n      }\n    });\n  }\n}\n","// Top level file is just a mixin of submodules & constants\n'use strict';\n\nvar assign    = require('./lib/utils/common').assign;\n\nvar deflate   = require('./lib/deflate');\nvar inflate   = require('./lib/inflate');\nvar constants = require('./lib/zlib/constants');\n\nvar pako = {};\n\nassign(pako, deflate, inflate, constants);\n\nmodule.exports = pako;\n","'use strict';\n\n\nvar zlib_deflate = require('./zlib/deflate');\nvar utils        = require('./utils/common');\nvar strings      = require('./utils/strings');\nvar msg          = require('./zlib/messages');\nvar ZStream      = require('./zlib/zstream');\n\nvar toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nvar Z_NO_FLUSH      = 0;\nvar Z_FINISH        = 4;\n\nvar Z_OK            = 0;\nvar Z_STREAM_END    = 1;\nvar Z_SYNC_FLUSH    = 2;\n\nvar Z_DEFAULT_COMPRESSION = -1;\n\nvar Z_DEFAULT_STRATEGY    = 0;\n\nvar Z_DEFLATED  = 8;\n\n/* ===========================================================================*/\n\n\n/**\n * class Deflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[deflate]],\n * [[deflateRaw]] and [[gzip]].\n **/\n\n/* internal\n * Deflate.chunks -> Array\n *\n * Chunks of output data, if [[Deflate#onData]] not overridden.\n **/\n\n/**\n * Deflate.result -> Uint8Array|Array\n *\n * Compressed result, generated by default [[Deflate#onData]]\n * and [[Deflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Deflate#push]] with `Z_FINISH` / `true` param)  or if you\n * push a chunk with explicit flush (call [[Deflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Deflate.err -> Number\n *\n * Error code after deflate finished. 0 (Z_OK) on success.\n * You will not need it in real life, because deflate errors\n * are possible only on wrong options or bad `onData` / `onEnd`\n * custom handlers.\n **/\n\n/**\n * Deflate.msg -> String\n *\n * Error message, if [[Deflate.err]] != 0\n **/\n\n\n/**\n * new Deflate(options)\n * - options (Object): zlib deflate options.\n *\n * Creates new deflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `level`\n * - `windowBits`\n * - `memLevel`\n * - `strategy`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw deflate\n * - `gzip` (Boolean) - create gzip wrapper\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n *    (each char code [0..255])\n * - `header` (Object) - custom header for gzip\n *   - `text` (Boolean) - true if compressed data believed to be text\n *   - `time` (Number) - modification time, unix timestamp\n *   - `os` (Number) - operation system code\n *   - `extra` (Array) - array of bytes with extra data (max 65536)\n *   - `name` (String) - file name (binary string)\n *   - `comment` (String) - comment (binary string)\n *   - `hcrc` (Boolean) - true if header crc should be added\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n *   , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n *   , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var deflate = new pako.Deflate({ level: 3});\n *\n * deflate.push(chunk1, false);\n * deflate.push(chunk2, true);  // true -> last chunk\n *\n * if (deflate.err) { throw new Error(deflate.err); }\n *\n * console.log(deflate.result);\n * ```\n **/\nfunction Deflate(options) {\n  if (!(this instanceof Deflate)) return new Deflate(options);\n\n  this.options = utils.assign({\n    level: Z_DEFAULT_COMPRESSION,\n    method: Z_DEFLATED,\n    chunkSize: 16384,\n    windowBits: 15,\n    memLevel: 8,\n    strategy: Z_DEFAULT_STRATEGY,\n    to: ''\n  }, options || {});\n\n  var opt = this.options;\n\n  if (opt.raw && (opt.windowBits > 0)) {\n    opt.windowBits = -opt.windowBits;\n  }\n\n  else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {\n    opt.windowBits += 16;\n  }\n\n  this.err    = 0;      // error code, if happens (0 = Z_OK)\n  this.msg    = '';     // error message\n  this.ended  = false;  // used to avoid multiple onEnd() calls\n  this.chunks = [];     // chunks of compressed data\n\n  this.strm = new ZStream();\n  this.strm.avail_out = 0;\n\n  var status = zlib_deflate.deflateInit2(\n    this.strm,\n    opt.level,\n    opt.method,\n    opt.windowBits,\n    opt.memLevel,\n    opt.strategy\n  );\n\n  if (status !== Z_OK) {\n    throw new Error(msg[status]);\n  }\n\n  if (opt.header) {\n    zlib_deflate.deflateSetHeader(this.strm, opt.header);\n  }\n\n  if (opt.dictionary) {\n    var dict;\n    // Convert data if needed\n    if (typeof opt.dictionary === 'string') {\n      // If we need to compress text, change encoding to utf8.\n      dict = strings.string2buf(opt.dictionary);\n    } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n      dict = new Uint8Array(opt.dictionary);\n    } else {\n      dict = opt.dictionary;\n    }\n\n    status = zlib_deflate.deflateSetDictionary(this.strm, dict);\n\n    if (status !== Z_OK) {\n      throw new Error(msg[status]);\n    }\n\n    this._dict_set = true;\n  }\n}\n\n/**\n * Deflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be\n *   converted to utf8 byte sequence.\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n *   See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with\n * new compressed chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the compression context.\n *\n * On fail call [[Deflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * array format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true);  // push last chunk\n * ```\n **/\nDeflate.prototype.push = function (data, mode) {\n  var strm = this.strm;\n  var chunkSize = this.options.chunkSize;\n  var status, _mode;\n\n  if (this.ended) { return false; }\n\n  _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH);\n\n  // Convert data if needed\n  if (typeof data === 'string') {\n    // If we need to compress text, change encoding to utf8.\n    strm.input = strings.string2buf(data);\n  } else if (toString.call(data) === '[object ArrayBuffer]') {\n    strm.input = new Uint8Array(data);\n  } else {\n    strm.input = data;\n  }\n\n  strm.next_in = 0;\n  strm.avail_in = strm.input.length;\n\n  do {\n    if (strm.avail_out === 0) {\n      strm.output = new utils.Buf8(chunkSize);\n      strm.next_out = 0;\n      strm.avail_out = chunkSize;\n    }\n    status = zlib_deflate.deflate(strm, _mode);    /* no bad return value */\n\n    if (status !== Z_STREAM_END && status !== Z_OK) {\n      this.onEnd(status);\n      this.ended = true;\n      return false;\n    }\n    if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) {\n      if (this.options.to === 'string') {\n        this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out)));\n      } else {\n        this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n      }\n    }\n  } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END);\n\n  // Finalize on the last chunk.\n  if (_mode === Z_FINISH) {\n    status = zlib_deflate.deflateEnd(this.strm);\n    this.onEnd(status);\n    this.ended = true;\n    return status === Z_OK;\n  }\n\n  // callback interim results if Z_SYNC_FLUSH.\n  if (_mode === Z_SYNC_FLUSH) {\n    this.onEnd(Z_OK);\n    strm.avail_out = 0;\n    return true;\n  }\n\n  return true;\n};\n\n\n/**\n * Deflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n *   on js engine support. When string output requested, each chunk\n *   will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nDeflate.prototype.onData = function (chunk) {\n  this.chunks.push(chunk);\n};\n\n\n/**\n * Deflate#onEnd(status) -> Void\n * - status (Number): deflate status. 0 (Z_OK) on success,\n *   other if not.\n *\n * Called once after you tell deflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nDeflate.prototype.onEnd = function (status) {\n  // On success - join\n  if (status === Z_OK) {\n    if (this.options.to === 'string') {\n      this.result = this.chunks.join('');\n    } else {\n      this.result = utils.flattenChunks(this.chunks);\n    }\n  }\n  this.chunks = [];\n  this.err = status;\n  this.msg = this.strm.msg;\n};\n\n\n/**\n * deflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * Compress `data` with deflate algorithm and `options`.\n *\n * Supported options are:\n *\n * - level\n * - windowBits\n * - memLevel\n * - strategy\n * - dictionary\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n *   negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n *    (each char code [0..255])\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n *   , data = Uint8Array([1,2,3,4,5,6,7,8,9]);\n *\n * console.log(pako.deflate(data));\n * ```\n **/\nfunction deflate(input, options) {\n  var deflator = new Deflate(options);\n\n  deflator.push(input, true);\n\n  // That will never happens, if you don't cheat with options :)\n  if (deflator.err) { throw deflator.msg || msg[deflator.err]; }\n\n  return deflator.result;\n}\n\n\n/**\n * deflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction deflateRaw(input, options) {\n  options = options || {};\n  options.raw = true;\n  return deflate(input, options);\n}\n\n\n/**\n * gzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but create gzip wrapper instead of\n * deflate one.\n **/\nfunction gzip(input, options) {\n  options = options || {};\n  options.gzip = true;\n  return deflate(input, options);\n}\n\n\nexports.Deflate = Deflate;\nexports.deflate = deflate;\nexports.deflateRaw = deflateRaw;\nexports.gzip = gzip;\n","'use strict';\n\n\nvar zlib_inflate = require('./zlib/inflate');\nvar utils        = require('./utils/common');\nvar strings      = require('./utils/strings');\nvar c            = require('./zlib/constants');\nvar msg          = require('./zlib/messages');\nvar ZStream      = require('./zlib/zstream');\nvar GZheader     = require('./zlib/gzheader');\n\nvar toString = Object.prototype.toString;\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Inflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n *   from utf8 to utf16 (javascript) string. When string output requested,\n *   chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n *   , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n *   , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true);  // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nfunction Inflate(options) {\n  if (!(this instanceof Inflate)) return new Inflate(options);\n\n  this.options = utils.assign({\n    chunkSize: 16384,\n    windowBits: 0,\n    to: ''\n  }, options || {});\n\n  var opt = this.options;\n\n  // Force window size for `raw` data, if not set directly,\n  // because we have no header for autodetect.\n  if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n    opt.windowBits = -opt.windowBits;\n    if (opt.windowBits === 0) { opt.windowBits = -15; }\n  }\n\n  // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n  if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n      !(options && options.windowBits)) {\n    opt.windowBits += 32;\n  }\n\n  // Gzip header has no info about windows size, we can do autodetect only\n  // for deflate. So, if window size not set, force it to max when gzip possible\n  if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n    // bit 3 (16) -> gzipped data\n    // bit 4 (32) -> autodetect gzip/deflate\n    if ((opt.windowBits & 15) === 0) {\n      opt.windowBits |= 15;\n    }\n  }\n\n  this.err    = 0;      // error code, if happens (0 = Z_OK)\n  this.msg    = '';     // error message\n  this.ended  = false;  // used to avoid multiple onEnd() calls\n  this.chunks = [];     // chunks of compressed data\n\n  this.strm   = new ZStream();\n  this.strm.avail_out = 0;\n\n  var status  = zlib_inflate.inflateInit2(\n    this.strm,\n    opt.windowBits\n  );\n\n  if (status !== c.Z_OK) {\n    throw new Error(msg[status]);\n  }\n\n  this.header = new GZheader();\n\n  zlib_inflate.inflateGetHeader(this.strm, this.header);\n}\n\n/**\n * Inflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n *   See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the decompression context.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true);  // push last chunk\n * ```\n **/\nInflate.prototype.push = function (data, mode) {\n  var strm = this.strm;\n  var chunkSize = this.options.chunkSize;\n  var dictionary = this.options.dictionary;\n  var status, _mode;\n  var next_out_utf8, tail, utf8str;\n  var dict;\n\n  // Flag to properly process Z_BUF_ERROR on testing inflate call\n  // when we check that all output data was flushed.\n  var allowBufError = false;\n\n  if (this.ended) { return false; }\n  _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH);\n\n  // Convert data if needed\n  if (typeof data === 'string') {\n    // Only binary strings can be decompressed on practice\n    strm.input = strings.binstring2buf(data);\n  } else if (toString.call(data) === '[object ArrayBuffer]') {\n    strm.input = new Uint8Array(data);\n  } else {\n    strm.input = data;\n  }\n\n  strm.next_in = 0;\n  strm.avail_in = strm.input.length;\n\n  do {\n    if (strm.avail_out === 0) {\n      strm.output = new utils.Buf8(chunkSize);\n      strm.next_out = 0;\n      strm.avail_out = chunkSize;\n    }\n\n    status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH);    /* no bad return value */\n\n    if (status === c.Z_NEED_DICT && dictionary) {\n      // Convert data if needed\n      if (typeof dictionary === 'string') {\n        dict = strings.string2buf(dictionary);\n      } else if (toString.call(dictionary) === '[object ArrayBuffer]') {\n        dict = new Uint8Array(dictionary);\n      } else {\n        dict = dictionary;\n      }\n\n      status = zlib_inflate.inflateSetDictionary(this.strm, dict);\n\n    }\n\n    if (status === c.Z_BUF_ERROR && allowBufError === true) {\n      status = c.Z_OK;\n      allowBufError = false;\n    }\n\n    if (status !== c.Z_STREAM_END && status !== c.Z_OK) {\n      this.onEnd(status);\n      this.ended = true;\n      return false;\n    }\n\n    if (strm.next_out) {\n      if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) {\n\n        if (this.options.to === 'string') {\n\n          next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n          tail = strm.next_out - next_out_utf8;\n          utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n          // move tail\n          strm.next_out = tail;\n          strm.avail_out = chunkSize - tail;\n          if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); }\n\n          this.onData(utf8str);\n\n        } else {\n          this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n        }\n      }\n    }\n\n    // When no more input data, we should check that internal inflate buffers\n    // are flushed. The only way to do it when avail_out = 0 - run one more\n    // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR.\n    // Here we set flag to process this error properly.\n    //\n    // NOTE. Deflate does not return error in this case and does not needs such\n    // logic.\n    if (strm.avail_in === 0 && strm.avail_out === 0) {\n      allowBufError = true;\n    }\n\n  } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END);\n\n  if (status === c.Z_STREAM_END) {\n    _mode = c.Z_FINISH;\n  }\n\n  // Finalize on the last chunk.\n  if (_mode === c.Z_FINISH) {\n    status = zlib_inflate.inflateEnd(this.strm);\n    this.onEnd(status);\n    this.ended = true;\n    return status === c.Z_OK;\n  }\n\n  // callback interim results if Z_SYNC_FLUSH.\n  if (_mode === c.Z_SYNC_FLUSH) {\n    this.onEnd(c.Z_OK);\n    strm.avail_out = 0;\n    return true;\n  }\n\n  return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n *   on js engine support. When string output requested, each chunk\n *   will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate.prototype.onData = function (chunk) {\n  this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n *   other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate.prototype.onEnd = function (status) {\n  // On success - join\n  if (status === c.Z_OK) {\n    if (this.options.to === 'string') {\n      // Glue & convert here, until we teach pako to send\n      // utf8 aligned strings to onData\n      this.result = this.chunks.join('');\n    } else {\n      this.result = utils.flattenChunks(this.chunks);\n    }\n  }\n  this.chunks = [];\n  this.err = status;\n  this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n *   negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n *   from utf8 to utf16 (javascript) string. When string output requested,\n *   chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n *   , input = pako.deflate([1,2,3,4,5,6,7,8,9])\n *   , output;\n *\n * try {\n *   output = pako.inflate(input);\n * } catch (err)\n *   console.log(err);\n * }\n * ```\n **/\nfunction inflate(input, options) {\n  var inflator = new Inflate(options);\n\n  inflator.push(input, true);\n\n  // That will never happens, if you don't cheat with options :)\n  if (inflator.err) { throw inflator.msg || msg[inflator.err]; }\n\n  return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw(input, options) {\n  options = options || {};\n  options.raw = true;\n  return inflate(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nexports.Inflate = Inflate;\nexports.inflate = inflate;\nexports.inflateRaw = inflateRaw;\nexports.ungzip  = inflate;\n","'use strict';\n\n\nvar TYPED_OK =  (typeof Uint8Array !== 'undefined') &&\n                (typeof Uint16Array !== 'undefined') &&\n                (typeof Int32Array !== 'undefined');\n\nfunction _has(obj, key) {\n  return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexports.assign = function (obj /*from1, from2, from3, ...*/) {\n  var sources = Array.prototype.slice.call(arguments, 1);\n  while (sources.length) {\n    var source = sources.shift();\n    if (!source) { continue; }\n\n    if (typeof source !== 'object') {\n      throw new TypeError(source + 'must be non-object');\n    }\n\n    for (var p in source) {\n      if (_has(source, p)) {\n        obj[p] = source[p];\n      }\n    }\n  }\n\n  return obj;\n};\n\n\n// reduce buffer size, avoiding mem copy\nexports.shrinkBuf = function (buf, size) {\n  if (buf.length === size) { return buf; }\n  if (buf.subarray) { return buf.subarray(0, size); }\n  buf.length = size;\n  return buf;\n};\n\n\nvar fnTyped = {\n  arraySet: function (dest, src, src_offs, len, dest_offs) {\n    if (src.subarray && dest.subarray) {\n      dest.set(src.subarray(src_offs, src_offs + len), dest_offs);\n      return;\n    }\n    // Fallback to ordinary array\n    for (var i = 0; i < len; i++) {\n      dest[dest_offs + i] = src[src_offs + i];\n    }\n  },\n  // Join array of chunks to single array.\n  flattenChunks: function (chunks) {\n    var i, l, len, pos, chunk, result;\n\n    // calculate data length\n    len = 0;\n    for (i = 0, l = chunks.length; i < l; i++) {\n      len += chunks[i].length;\n    }\n\n    // join chunks\n    result = new Uint8Array(len);\n    pos = 0;\n    for (i = 0, l = chunks.length; i < l; i++) {\n      chunk = chunks[i];\n      result.set(chunk, pos);\n      pos += chunk.length;\n    }\n\n    return result;\n  }\n};\n\nvar fnUntyped = {\n  arraySet: function (dest, src, src_offs, len, dest_offs) {\n    for (var i = 0; i < len; i++) {\n      dest[dest_offs + i] = src[src_offs + i];\n    }\n  },\n  // Join array of chunks to single array.\n  flattenChunks: function (chunks) {\n    return [].concat.apply([], chunks);\n  }\n};\n\n\n// Enable/Disable typed arrays use, for testing\n//\nexports.setTyped = function (on) {\n  if (on) {\n    exports.Buf8  = Uint8Array;\n    exports.Buf16 = Uint16Array;\n    exports.Buf32 = Int32Array;\n    exports.assign(exports, fnTyped);\n  } else {\n    exports.Buf8  = Array;\n    exports.Buf16 = Array;\n    exports.Buf32 = Array;\n    exports.assign(exports, fnUntyped);\n  }\n};\n\nexports.setTyped(TYPED_OK);\n","// String encode/decode helpers\n'use strict';\n\n\nvar utils = require('./common');\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safari\n//\nvar STR_APPLY_OK = true;\nvar STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; }\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nvar _utf8len = new utils.Buf8(256);\nfor (var q = 0; q < 256; q++) {\n  _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nexports.string2buf = function (str) {\n  var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n  // count binary size\n  for (m_pos = 0; m_pos < str_len; m_pos++) {\n    c = str.charCodeAt(m_pos);\n    if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n      c2 = str.charCodeAt(m_pos + 1);\n      if ((c2 & 0xfc00) === 0xdc00) {\n        c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n        m_pos++;\n      }\n    }\n    buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n  }\n\n  // allocate buffer\n  buf = new utils.Buf8(buf_len);\n\n  // convert\n  for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n    c = str.charCodeAt(m_pos);\n    if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n      c2 = str.charCodeAt(m_pos + 1);\n      if ((c2 & 0xfc00) === 0xdc00) {\n        c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n        m_pos++;\n      }\n    }\n    if (c < 0x80) {\n      /* one byte */\n      buf[i++] = c;\n    } else if (c < 0x800) {\n      /* two bytes */\n      buf[i++] = 0xC0 | (c >>> 6);\n      buf[i++] = 0x80 | (c & 0x3f);\n    } else if (c < 0x10000) {\n      /* three bytes */\n      buf[i++] = 0xE0 | (c >>> 12);\n      buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n      buf[i++] = 0x80 | (c & 0x3f);\n    } else {\n      /* four bytes */\n      buf[i++] = 0xf0 | (c >>> 18);\n      buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n      buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n      buf[i++] = 0x80 | (c & 0x3f);\n    }\n  }\n\n  return buf;\n};\n\n// Helper (used in 2 places)\nfunction buf2binstring(buf, len) {\n  // use fallback for big arrays to avoid stack overflow\n  if (len < 65537) {\n    if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {\n      return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));\n    }\n  }\n\n  var result = '';\n  for (var i = 0; i < len; i++) {\n    result += String.fromCharCode(buf[i]);\n  }\n  return result;\n}\n\n\n// Convert byte array to binary string\nexports.buf2binstring = function (buf) {\n  return buf2binstring(buf, buf.length);\n};\n\n\n// Convert binary string (typed, when possible)\nexports.binstring2buf = function (str) {\n  var buf = new utils.Buf8(str.length);\n  for (var i = 0, len = buf.length; i < len; i++) {\n    buf[i] = str.charCodeAt(i);\n  }\n  return buf;\n};\n\n\n// convert array to string\nexports.buf2string = function (buf, max) {\n  var i, out, c, c_len;\n  var len = max || buf.length;\n\n  // Reserve max possible length (2 words per char)\n  // NB: by unknown reasons, Array is significantly faster for\n  //     String.fromCharCode.apply than Uint16Array.\n  var utf16buf = new Array(len * 2);\n\n  for (out = 0, i = 0; i < len;) {\n    c = buf[i++];\n    // quick process ascii\n    if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n    c_len = _utf8len[c];\n    // skip 5 & 6 byte codes\n    if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n    // apply mask on first byte\n    c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n    // join the rest\n    while (c_len > 1 && i < len) {\n      c = (c << 6) | (buf[i++] & 0x3f);\n      c_len--;\n    }\n\n    // terminated by end of string?\n    if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n    if (c < 0x10000) {\n      utf16buf[out++] = c;\n    } else {\n      c -= 0x10000;\n      utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n      utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n    }\n  }\n\n  return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max   - length limit (mandatory);\nexports.utf8border = function (buf, max) {\n  var pos;\n\n  max = max || buf.length;\n  if (max > buf.length) { max = buf.length; }\n\n  // go back from last position, until start of sequence found\n  pos = max - 1;\n  while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n  // Very small and broken sequence,\n  // return max, because we should return something anyway.\n  if (pos < 0) { return max; }\n\n  // If we came to start of buffer - that means buffer is too small,\n  // return max too.\n  if (pos === 0) { return max; }\n\n  return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n","'use strict';\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It isn't worth it to make additional optimizations as in original.\n// Small size is preferable.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction adler32(adler, buf, len, pos) {\n  var s1 = (adler & 0xffff) |0,\n      s2 = ((adler >>> 16) & 0xffff) |0,\n      n = 0;\n\n  while (len !== 0) {\n    // Set limit ~ twice less than 5552, to keep\n    // s2 in 31-bits, because we force signed ints.\n    // in other case %= will fail.\n    n = len > 2000 ? 2000 : len;\n    len -= n;\n\n    do {\n      s1 = (s1 + buf[pos++]) |0;\n      s2 = (s2 + s1) |0;\n    } while (--n);\n\n    s1 %= 65521;\n    s2 %= 65521;\n  }\n\n  return (s1 | (s2 << 16)) |0;\n}\n\n\nmodule.exports = adler32;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n\n  /* Allowed flush values; see deflate() and inflate() below for details */\n  Z_NO_FLUSH:         0,\n  Z_PARTIAL_FLUSH:    1,\n  Z_SYNC_FLUSH:       2,\n  Z_FULL_FLUSH:       3,\n  Z_FINISH:           4,\n  Z_BLOCK:            5,\n  Z_TREES:            6,\n\n  /* Return codes for the compression/decompression functions. Negative values\n  * are errors, positive values are used for special but normal events.\n  */\n  Z_OK:               0,\n  Z_STREAM_END:       1,\n  Z_NEED_DICT:        2,\n  Z_ERRNO:           -1,\n  Z_STREAM_ERROR:    -2,\n  Z_DATA_ERROR:      -3,\n  //Z_MEM_ERROR:     -4,\n  Z_BUF_ERROR:       -5,\n  //Z_VERSION_ERROR: -6,\n\n  /* compression levels */\n  Z_NO_COMPRESSION:         0,\n  Z_BEST_SPEED:             1,\n  Z_BEST_COMPRESSION:       9,\n  Z_DEFAULT_COMPRESSION:   -1,\n\n\n  Z_FILTERED:               1,\n  Z_HUFFMAN_ONLY:           2,\n  Z_RLE:                    3,\n  Z_FIXED:                  4,\n  Z_DEFAULT_STRATEGY:       0,\n\n  /* Possible values of the data_type field (though see inflate()) */\n  Z_BINARY:                 0,\n  Z_TEXT:                   1,\n  //Z_ASCII:                1, // = Z_TEXT (deprecated)\n  Z_UNKNOWN:                2,\n\n  /* The deflate compression method */\n  Z_DEFLATED:               8\n  //Z_NULL:                 null // Use -1 or null inline, depending on var type\n};\n","'use strict';\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// Use ordinary array, since untyped makes no boost here\nfunction makeTable() {\n  var c, table = [];\n\n  for (var n = 0; n < 256; n++) {\n    c = n;\n    for (var k = 0; k < 8; k++) {\n      c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n    }\n    table[n] = c;\n  }\n\n  return table;\n}\n\n// Create table on load. Just 255 signed longs. Not a problem.\nvar crcTable = makeTable();\n\n\nfunction crc32(crc, buf, len, pos) {\n  var t = crcTable,\n      end = pos + len;\n\n  crc ^= -1;\n\n  for (var i = pos; i < end; i++) {\n    crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n  }\n\n  return (crc ^ (-1)); // >>> 0;\n}\n\n\nmodule.exports = crc32;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils   = require('../utils/common');\nvar trees   = require('./trees');\nvar adler32 = require('./adler32');\nvar crc32   = require('./crc32');\nvar msg     = require('./messages');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\nvar Z_NO_FLUSH      = 0;\nvar Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH    = 2;\nvar Z_FULL_FLUSH    = 3;\nvar Z_FINISH        = 4;\nvar Z_BLOCK         = 5;\n//var Z_TREES         = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK            = 0;\nvar Z_STREAM_END    = 1;\n//var Z_NEED_DICT     = 2;\n//var Z_ERRNO         = -1;\nvar Z_STREAM_ERROR  = -2;\nvar Z_DATA_ERROR    = -3;\n//var Z_MEM_ERROR     = -4;\nvar Z_BUF_ERROR     = -5;\n//var Z_VERSION_ERROR = -6;\n\n\n/* compression levels */\n//var Z_NO_COMPRESSION      = 0;\n//var Z_BEST_SPEED          = 1;\n//var Z_BEST_COMPRESSION    = 9;\nvar Z_DEFAULT_COMPRESSION = -1;\n\n\nvar Z_FILTERED            = 1;\nvar Z_HUFFMAN_ONLY        = 2;\nvar Z_RLE                 = 3;\nvar Z_FIXED               = 4;\nvar Z_DEFAULT_STRATEGY    = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\n//var Z_BINARY              = 0;\n//var Z_TEXT                = 1;\n//var Z_ASCII               = 1; // = Z_TEXT\nvar Z_UNKNOWN             = 2;\n\n\n/* The deflate compression method */\nvar Z_DEFLATED  = 8;\n\n/*============================================================================*/\n\n\nvar MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_MEM_LEVEL = 8;\n\n\nvar LENGTH_CODES  = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nvar LITERALS      = 256;\n/* number of literal bytes 0..255 */\nvar L_CODES       = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\nvar D_CODES       = 30;\n/* number of distance codes */\nvar BL_CODES      = 19;\n/* number of codes used to transfer the bit lengths */\nvar HEAP_SIZE     = 2 * L_CODES + 1;\n/* maximum heap size */\nvar MAX_BITS  = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\nvar MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nvar PRESET_DICT = 0x20;\n\nvar INIT_STATE = 42;\nvar EXTRA_STATE = 69;\nvar NAME_STATE = 73;\nvar COMMENT_STATE = 91;\nvar HCRC_STATE = 103;\nvar BUSY_STATE = 113;\nvar FINISH_STATE = 666;\n\nvar BS_NEED_MORE      = 1; /* block not completed, need more input or more output */\nvar BS_BLOCK_DONE     = 2; /* block flush performed */\nvar BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nvar BS_FINISH_DONE    = 4; /* finish done, accept no more input or output */\n\nvar OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nfunction err(strm, errorCode) {\n  strm.msg = msg[errorCode];\n  return errorCode;\n}\n\nfunction rank(f) {\n  return ((f) << 1) - ((f) > 4 ? 9 : 0);\n}\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output goes\n * through this function so some applications may wish to modify it\n * to avoid allocating a large strm->output buffer and copying into it.\n * (See also read_buf()).\n */\nfunction flush_pending(strm) {\n  var s = strm.state;\n\n  //_tr_flush_bits(s);\n  var len = s.pending;\n  if (len > strm.avail_out) {\n    len = strm.avail_out;\n  }\n  if (len === 0) { return; }\n\n  utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);\n  strm.next_out += len;\n  s.pending_out += len;\n  strm.total_out += len;\n  strm.avail_out -= len;\n  s.pending -= len;\n  if (s.pending === 0) {\n    s.pending_out = 0;\n  }\n}\n\n\nfunction flush_block_only(s, last) {\n  trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n  s.block_start = s.strstart;\n  flush_pending(s.strm);\n}\n\n\nfunction put_byte(s, b) {\n  s.pending_buf[s.pending++] = b;\n}\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nfunction putShortMSB(s, b) {\n//  put_byte(s, (Byte)(b >> 8));\n//  put_byte(s, (Byte)(b & 0xff));\n  s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n  s.pending_buf[s.pending++] = b & 0xff;\n}\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read.  All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nfunction read_buf(strm, buf, start, size) {\n  var len = strm.avail_in;\n\n  if (len > size) { len = size; }\n  if (len === 0) { return 0; }\n\n  strm.avail_in -= len;\n\n  // zmemcpy(buf, strm->next_in, len);\n  utils.arraySet(buf, strm.input, strm.next_in, len, start);\n  if (strm.state.wrap === 1) {\n    strm.adler = adler32(strm.adler, buf, len, start);\n  }\n\n  else if (strm.state.wrap === 2) {\n    strm.adler = crc32(strm.adler, buf, len, start);\n  }\n\n  strm.next_in += len;\n  strm.total_in += len;\n\n  return len;\n}\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n *   string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nfunction longest_match(s, cur_match) {\n  var chain_length = s.max_chain_length;      /* max hash chain length */\n  var scan = s.strstart; /* current string */\n  var match;                       /* matched string */\n  var len;                           /* length of current match */\n  var best_len = s.prev_length;              /* best match length so far */\n  var nice_match = s.nice_match;             /* stop if match long enough */\n  var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n      s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;\n\n  var _win = s.window; // shortcut\n\n  var wmask = s.w_mask;\n  var prev  = s.prev;\n\n  /* Stop when cur_match becomes <= limit. To simplify the code,\n   * we prevent matches with the string of window index 0.\n   */\n\n  var strend = s.strstart + MAX_MATCH;\n  var scan_end1  = _win[scan + best_len - 1];\n  var scan_end   = _win[scan + best_len];\n\n  /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n   * It is easy to get rid of this optimization if necessary.\n   */\n  // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n  /* Do not waste too much time if we already have a good match: */\n  if (s.prev_length >= s.good_match) {\n    chain_length >>= 2;\n  }\n  /* Do not look for matches beyond the end of the input. This is necessary\n   * to make deflate deterministic.\n   */\n  if (nice_match > s.lookahead) { nice_match = s.lookahead; }\n\n  // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n  do {\n    // Assert(cur_match < s->strstart, \"no future\");\n    match = cur_match;\n\n    /* Skip to next match if the match length cannot increase\n     * or if the match length is less than 2.  Note that the checks below\n     * for insufficient lookahead only occur occasionally for performance\n     * reasons.  Therefore uninitialized memory will be accessed, and\n     * conditional jumps will be made that depend on those values.\n     * However the length of the match is limited to the lookahead, so\n     * the output of deflate is not affected by the uninitialized values.\n     */\n\n    if (_win[match + best_len]     !== scan_end  ||\n        _win[match + best_len - 1] !== scan_end1 ||\n        _win[match]                !== _win[scan] ||\n        _win[++match]              !== _win[scan + 1]) {\n      continue;\n    }\n\n    /* The check at best_len-1 can be removed because it will be made\n     * again later. (This heuristic is not always a win.)\n     * It is not necessary to compare scan[2] and match[2] since they\n     * are always equal when the other bytes match, given that\n     * the hash keys are equal and that HASH_BITS >= 8.\n     */\n    scan += 2;\n    match++;\n    // Assert(*scan == *match, \"match[2]?\");\n\n    /* We check for insufficient lookahead only every 8th comparison;\n     * the 256th check will be made at strstart+258.\n     */\n    do {\n      /*jshint noempty:false*/\n    } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n             scan < strend);\n\n    // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n    len = MAX_MATCH - (strend - scan);\n    scan = strend - MAX_MATCH;\n\n    if (len > best_len) {\n      s.match_start = cur_match;\n      best_len = len;\n      if (len >= nice_match) {\n        break;\n      }\n      scan_end1  = _win[scan + best_len - 1];\n      scan_end   = _win[scan + best_len];\n    }\n  } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n  if (best_len <= s.lookahead) {\n    return best_len;\n  }\n  return s.lookahead;\n}\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n *    At least one byte has been read, or avail_in == 0; reads are\n *    performed for at least two bytes (required for the zip translate_eol\n *    option -- not supported here).\n */\nfunction fill_window(s) {\n  var _w_size = s.w_size;\n  var p, n, m, more, str;\n\n  //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n  do {\n    more = s.window_size - s.lookahead - s.strstart;\n\n    // JS ints have 32 bit, block below not needed\n    /* Deal with !@#$% 64K limit: */\n    //if (sizeof(int) <= 2) {\n    //    if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n    //        more = wsize;\n    //\n    //  } else if (more == (unsigned)(-1)) {\n    //        /* Very unlikely, but possible on 16 bit machine if\n    //         * strstart == 0 && lookahead == 1 (input done a byte at time)\n    //         */\n    //        more--;\n    //    }\n    //}\n\n\n    /* If the window is almost full and there is insufficient lookahead,\n     * move the upper half to the lower one to make room in the upper half.\n     */\n    if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n      utils.arraySet(s.window, s.window, _w_size, _w_size, 0);\n      s.match_start -= _w_size;\n      s.strstart -= _w_size;\n      /* we now have strstart >= MAX_DIST */\n      s.block_start -= _w_size;\n\n      /* Slide the hash table (could be avoided with 32 bit values\n       at the expense of memory usage). We slide even when level == 0\n       to keep the hash table consistent if we switch back to level > 0\n       later. (Using level 0 permanently is not an optimal usage of\n       zlib, so we don't care about this pathological case.)\n       */\n\n      n = s.hash_size;\n      p = n;\n      do {\n        m = s.head[--p];\n        s.head[p] = (m >= _w_size ? m - _w_size : 0);\n      } while (--n);\n\n      n = _w_size;\n      p = n;\n      do {\n        m = s.prev[--p];\n        s.prev[p] = (m >= _w_size ? m - _w_size : 0);\n        /* If n is not on any hash chain, prev[n] is garbage but\n         * its value will never be used.\n         */\n      } while (--n);\n\n      more += _w_size;\n    }\n    if (s.strm.avail_in === 0) {\n      break;\n    }\n\n    /* If there was no sliding:\n     *    strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n     *    more == window_size - lookahead - strstart\n     * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n     * => more >= window_size - 2*WSIZE + 2\n     * In the BIG_MEM or MMAP case (not yet supported),\n     *   window_size == input_size + MIN_LOOKAHEAD  &&\n     *   strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n     * Otherwise, window_size == 2*WSIZE so more >= 2.\n     * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n     */\n    //Assert(more >= 2, \"more < 2\");\n    n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n    s.lookahead += n;\n\n    /* Initialize the hash value now that we have some input: */\n    if (s.lookahead + s.insert >= MIN_MATCH) {\n      str = s.strstart - s.insert;\n      s.ins_h = s.window[str];\n\n      /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask;\n//#if MIN_MATCH != 3\n//        Call update_hash() MIN_MATCH-3 more times\n//#endif\n      while (s.insert) {\n        /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n        s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n        s.prev[str & s.w_mask] = s.head[s.ins_h];\n        s.head[s.ins_h] = str;\n        str++;\n        s.insert--;\n        if (s.lookahead + s.insert < MIN_MATCH) {\n          break;\n        }\n      }\n    }\n    /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n     * but this is not important since only literal bytes will be emitted.\n     */\n\n  } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n  /* If the WIN_INIT bytes after the end of the current data have never been\n   * written, then zero those bytes in order to avoid memory check reports of\n   * the use of uninitialized (or uninitialised as Julian writes) bytes by\n   * the longest match routines.  Update the high water mark for the next\n   * time through here.  WIN_INIT is set to MAX_MATCH since the longest match\n   * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n   */\n//  if (s.high_water < s.window_size) {\n//    var curr = s.strstart + s.lookahead;\n//    var init = 0;\n//\n//    if (s.high_water < curr) {\n//      /* Previous high water mark below current data -- zero WIN_INIT\n//       * bytes or up to end of window, whichever is less.\n//       */\n//      init = s.window_size - curr;\n//      if (init > WIN_INIT)\n//        init = WIN_INIT;\n//      zmemzero(s->window + curr, (unsigned)init);\n//      s->high_water = curr + init;\n//    }\n//    else if (s->high_water < (ulg)curr + WIN_INIT) {\n//      /* High water mark at or above current data, but below current data\n//       * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n//       * to end of window, whichever is less.\n//       */\n//      init = (ulg)curr + WIN_INIT - s->high_water;\n//      if (init > s->window_size - s->high_water)\n//        init = s->window_size - s->high_water;\n//      zmemzero(s->window + s->high_water, (unsigned)init);\n//      s->high_water += init;\n//    }\n//  }\n//\n//  Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n//    \"not enough room for search\");\n}\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n * This function does not insert new strings in the dictionary since\n * uncompressible data is probably not useful. This function is used\n * only for the level=0 compression option.\n * NOTE: this function should be optimized to avoid extra copying from\n * window to pending_buf.\n */\nfunction deflate_stored(s, flush) {\n  /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n   * to pending_buf_size, and each stored block has a 5 byte header:\n   */\n  var max_block_size = 0xffff;\n\n  if (max_block_size > s.pending_buf_size - 5) {\n    max_block_size = s.pending_buf_size - 5;\n  }\n\n  /* Copy as much as possible from input to output: */\n  for (;;) {\n    /* Fill the window as much as possible: */\n    if (s.lookahead <= 1) {\n\n      //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n      //  s->block_start >= (long)s->w_size, \"slide too late\");\n//      if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n//        s.block_start >= s.w_size)) {\n//        throw  new Error(\"slide too late\");\n//      }\n\n      fill_window(s);\n      if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n        return BS_NEED_MORE;\n      }\n\n      if (s.lookahead === 0) {\n        break;\n      }\n      /* flush the current block */\n    }\n    //Assert(s->block_start >= 0L, \"block gone\");\n//    if (s.block_start < 0) throw new Error(\"block gone\");\n\n    s.strstart += s.lookahead;\n    s.lookahead = 0;\n\n    /* Emit a stored block if pending_buf will be full: */\n    var max_start = s.block_start + max_block_size;\n\n    if (s.strstart === 0 || s.strstart >= max_start) {\n      /* strstart == 0 is possible when wraparound on 16-bit machine */\n      s.lookahead = s.strstart - max_start;\n      s.strstart = max_start;\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n\n\n    }\n    /* Flush if we may have to slide, otherwise block_start may become\n     * negative and the data will be gone:\n     */\n    if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n    }\n  }\n\n  s.insert = 0;\n\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n\n  if (s.strstart > s.block_start) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n\n  return BS_NEED_MORE;\n}\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nfunction deflate_fast(s, flush) {\n  var hash_head;        /* head of the hash chain */\n  var bflush;           /* set if current block must be flushed */\n\n  for (;;) {\n    /* Make sure that we always have enough lookahead, except\n     * at the end of the input file. We need MAX_MATCH bytes\n     * for the next match, plus MIN_MATCH bytes to insert the\n     * string following the next match.\n     */\n    if (s.lookahead < MIN_LOOKAHEAD) {\n      fill_window(s);\n      if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n        return BS_NEED_MORE;\n      }\n      if (s.lookahead === 0) {\n        break; /* flush the current block */\n      }\n    }\n\n    /* Insert the string window[strstart .. strstart+2] in the\n     * dictionary, and set hash_head to the head of the hash chain:\n     */\n    hash_head = 0/*NIL*/;\n    if (s.lookahead >= MIN_MATCH) {\n      /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n      hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n      s.head[s.ins_h] = s.strstart;\n      /***/\n    }\n\n    /* Find the longest match, discarding those <= prev_length.\n     * At this point we have always match_length < MIN_MATCH\n     */\n    if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n      /* To simplify the code, we prevent matches with the string\n       * of window index 0 (in particular we have to avoid a match\n       * of the string with itself at the start of the input file).\n       */\n      s.match_length = longest_match(s, hash_head);\n      /* longest_match() sets match_start */\n    }\n    if (s.match_length >= MIN_MATCH) {\n      // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n      /*** _tr_tally_dist(s, s.strstart - s.match_start,\n                     s.match_length - MIN_MATCH, bflush); ***/\n      bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n\n      s.lookahead -= s.match_length;\n\n      /* Insert new strings in the hash table only if the match length\n       * is not too large. This saves time but degrades compression.\n       */\n      if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n        s.match_length--; /* string at strstart already in table */\n        do {\n          s.strstart++;\n          /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n          s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n          hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n          s.head[s.ins_h] = s.strstart;\n          /***/\n          /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n           * always MIN_MATCH bytes ahead.\n           */\n        } while (--s.match_length !== 0);\n        s.strstart++;\n      } else\n      {\n        s.strstart += s.match_length;\n        s.match_length = 0;\n        s.ins_h = s.window[s.strstart];\n        /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n        s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;\n\n//#if MIN_MATCH != 3\n//                Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n        /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n         * matter since it will be recomputed at next deflate call.\n         */\n      }\n    } else {\n      /* No match, output a literal byte */\n      //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n      /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n      bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n      s.lookahead--;\n      s.strstart++;\n    }\n    if (bflush) {\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n    }\n  }\n  s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n  if (s.last_lit) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n  return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nfunction deflate_slow(s, flush) {\n  var hash_head;          /* head of hash chain */\n  var bflush;              /* set if current block must be flushed */\n\n  var max_insert;\n\n  /* Process the input block. */\n  for (;;) {\n    /* Make sure that we always have enough lookahead, except\n     * at the end of the input file. We need MAX_MATCH bytes\n     * for the next match, plus MIN_MATCH bytes to insert the\n     * string following the next match.\n     */\n    if (s.lookahead < MIN_LOOKAHEAD) {\n      fill_window(s);\n      if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n        return BS_NEED_MORE;\n      }\n      if (s.lookahead === 0) { break; } /* flush the current block */\n    }\n\n    /* Insert the string window[strstart .. strstart+2] in the\n     * dictionary, and set hash_head to the head of the hash chain:\n     */\n    hash_head = 0/*NIL*/;\n    if (s.lookahead >= MIN_MATCH) {\n      /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n      hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n      s.head[s.ins_h] = s.strstart;\n      /***/\n    }\n\n    /* Find the longest match, discarding those <= prev_length.\n     */\n    s.prev_length = s.match_length;\n    s.prev_match = s.match_start;\n    s.match_length = MIN_MATCH - 1;\n\n    if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n        s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n      /* To simplify the code, we prevent matches with the string\n       * of window index 0 (in particular we have to avoid a match\n       * of the string with itself at the start of the input file).\n       */\n      s.match_length = longest_match(s, hash_head);\n      /* longest_match() sets match_start */\n\n      if (s.match_length <= 5 &&\n         (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n        /* If prev_match is also MIN_MATCH, match_start is garbage\n         * but we will ignore the current match anyway.\n         */\n        s.match_length = MIN_MATCH - 1;\n      }\n    }\n    /* If there was a match at the previous step and the current\n     * match is not better, output the previous match:\n     */\n    if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n      max_insert = s.strstart + s.lookahead - MIN_MATCH;\n      /* Do not insert strings in hash table beyond this. */\n\n      //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n      /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n                     s.prev_length - MIN_MATCH, bflush);***/\n      bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);\n      /* Insert in hash table all strings up to the end of the match.\n       * strstart-1 and strstart are already inserted. If there is not\n       * enough lookahead, the last two strings are not inserted in\n       * the hash table.\n       */\n      s.lookahead -= s.prev_length - 1;\n      s.prev_length -= 2;\n      do {\n        if (++s.strstart <= max_insert) {\n          /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n          s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n          hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n          s.head[s.ins_h] = s.strstart;\n          /***/\n        }\n      } while (--s.prev_length !== 0);\n      s.match_available = 0;\n      s.match_length = MIN_MATCH - 1;\n      s.strstart++;\n\n      if (bflush) {\n        /*** FLUSH_BLOCK(s, 0); ***/\n        flush_block_only(s, false);\n        if (s.strm.avail_out === 0) {\n          return BS_NEED_MORE;\n        }\n        /***/\n      }\n\n    } else if (s.match_available) {\n      /* If there was no match at the previous position, output a\n       * single literal. If there was a match but the current match\n       * is longer, truncate the previous match to a single literal.\n       */\n      //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n      /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n      bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n      if (bflush) {\n        /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n        flush_block_only(s, false);\n        /***/\n      }\n      s.strstart++;\n      s.lookahead--;\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n    } else {\n      /* There is no previous match to compare with, wait for\n       * the next step to decide.\n       */\n      s.match_available = 1;\n      s.strstart++;\n      s.lookahead--;\n    }\n  }\n  //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n  if (s.match_available) {\n    //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n    /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n    bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n    s.match_available = 0;\n  }\n  s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n  if (s.last_lit) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n\n  return BS_BLOCK_DONE;\n}\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one.  Do not maintain a hash table.  (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nfunction deflate_rle(s, flush) {\n  var bflush;            /* set if current block must be flushed */\n  var prev;              /* byte at distance one to match */\n  var scan, strend;      /* scan goes up to strend for length of run */\n\n  var _win = s.window;\n\n  for (;;) {\n    /* Make sure that we always have enough lookahead, except\n     * at the end of the input file. We need MAX_MATCH bytes\n     * for the longest run, plus one for the unrolled loop.\n     */\n    if (s.lookahead <= MAX_MATCH) {\n      fill_window(s);\n      if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {\n        return BS_NEED_MORE;\n      }\n      if (s.lookahead === 0) { break; } /* flush the current block */\n    }\n\n    /* See how many times the previous byte repeats */\n    s.match_length = 0;\n    if (s.lookahead >= MIN_MATCH && s.strstart > 0) {\n      scan = s.strstart - 1;\n      prev = _win[scan];\n      if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n        strend = s.strstart + MAX_MATCH;\n        do {\n          /*jshint noempty:false*/\n        } while (prev === _win[++scan] && prev === _win[++scan] &&\n                 prev === _win[++scan] && prev === _win[++scan] &&\n                 prev === _win[++scan] && prev === _win[++scan] &&\n                 prev === _win[++scan] && prev === _win[++scan] &&\n                 scan < strend);\n        s.match_length = MAX_MATCH - (strend - scan);\n        if (s.match_length > s.lookahead) {\n          s.match_length = s.lookahead;\n        }\n      }\n      //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n    }\n\n    /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n    if (s.match_length >= MIN_MATCH) {\n      //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n      /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n      bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH);\n\n      s.lookahead -= s.match_length;\n      s.strstart += s.match_length;\n      s.match_length = 0;\n    } else {\n      /* No match, output a literal byte */\n      //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n      /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n      bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n      s.lookahead--;\n      s.strstart++;\n    }\n    if (bflush) {\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n    }\n  }\n  s.insert = 0;\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n  if (s.last_lit) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n  return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches.  Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nfunction deflate_huff(s, flush) {\n  var bflush;             /* set if current block must be flushed */\n\n  for (;;) {\n    /* Make sure that we have a literal to write. */\n    if (s.lookahead === 0) {\n      fill_window(s);\n      if (s.lookahead === 0) {\n        if (flush === Z_NO_FLUSH) {\n          return BS_NEED_MORE;\n        }\n        break;      /* flush the current block */\n      }\n    }\n\n    /* Output a literal byte */\n    s.match_length = 0;\n    //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n    /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n    bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n    s.lookahead--;\n    s.strstart++;\n    if (bflush) {\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n    }\n  }\n  s.insert = 0;\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n  if (s.last_lit) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n  return BS_BLOCK_DONE;\n}\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n  this.good_length = good_length;\n  this.max_lazy = max_lazy;\n  this.nice_length = nice_length;\n  this.max_chain = max_chain;\n  this.func = func;\n}\n\nvar configuration_table;\n\nconfiguration_table = [\n  /*      good lazy nice chain */\n  new Config(0, 0, 0, 0, deflate_stored),          /* 0 store only */\n  new Config(4, 4, 8, 4, deflate_fast),            /* 1 max speed, no lazy matches */\n  new Config(4, 5, 16, 8, deflate_fast),           /* 2 */\n  new Config(4, 6, 32, 32, deflate_fast),          /* 3 */\n\n  new Config(4, 4, 16, 16, deflate_slow),          /* 4 lazy matches */\n  new Config(8, 16, 32, 32, deflate_slow),         /* 5 */\n  new Config(8, 16, 128, 128, deflate_slow),       /* 6 */\n  new Config(8, 32, 128, 256, deflate_slow),       /* 7 */\n  new Config(32, 128, 258, 1024, deflate_slow),    /* 8 */\n  new Config(32, 258, 258, 4096, deflate_slow)     /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nfunction lm_init(s) {\n  s.window_size = 2 * s.w_size;\n\n  /*** CLEAR_HASH(s); ***/\n  zero(s.head); // Fill with NIL (= 0);\n\n  /* Set the default configuration parameters:\n   */\n  s.max_lazy_match = configuration_table[s.level].max_lazy;\n  s.good_match = configuration_table[s.level].good_length;\n  s.nice_match = configuration_table[s.level].nice_length;\n  s.max_chain_length = configuration_table[s.level].max_chain;\n\n  s.strstart = 0;\n  s.block_start = 0;\n  s.lookahead = 0;\n  s.insert = 0;\n  s.match_length = s.prev_length = MIN_MATCH - 1;\n  s.match_available = 0;\n  s.ins_h = 0;\n}\n\n\nfunction DeflateState() {\n  this.strm = null;            /* pointer back to this zlib stream */\n  this.status = 0;            /* as the name implies */\n  this.pending_buf = null;      /* output still pending */\n  this.pending_buf_size = 0;  /* size of pending_buf */\n  this.pending_out = 0;       /* next pending byte to output to the stream */\n  this.pending = 0;           /* nb of bytes in the pending buffer */\n  this.wrap = 0;              /* bit 0 true for zlib, bit 1 true for gzip */\n  this.gzhead = null;         /* gzip header information to write */\n  this.gzindex = 0;           /* where in extra, name, or comment */\n  this.method = Z_DEFLATED; /* can only be DEFLATED */\n  this.last_flush = -1;   /* value of flush param for previous deflate call */\n\n  this.w_size = 0;  /* LZ77 window size (32K by default) */\n  this.w_bits = 0;  /* log2(w_size)  (8..16) */\n  this.w_mask = 0;  /* w_size - 1 */\n\n  this.window = null;\n  /* Sliding window. Input bytes are read into the second half of the window,\n   * and move to the first half later to keep a dictionary of at least wSize\n   * bytes. With this organization, matches are limited to a distance of\n   * wSize-MAX_MATCH bytes, but this ensures that IO is always\n   * performed with a length multiple of the block size.\n   */\n\n  this.window_size = 0;\n  /* Actual size of window: 2*wSize, except when the user input buffer\n   * is directly used as sliding window.\n   */\n\n  this.prev = null;\n  /* Link to older string with same hash index. To limit the size of this\n   * array to 64K, this link is maintained only for the last 32K strings.\n   * An index in this array is thus a window index modulo 32K.\n   */\n\n  this.head = null;   /* Heads of the hash chains or NIL. */\n\n  this.ins_h = 0;       /* hash index of string to be inserted */\n  this.hash_size = 0;   /* number of elements in hash table */\n  this.hash_bits = 0;   /* log2(hash_size) */\n  this.hash_mask = 0;   /* hash_size-1 */\n\n  this.hash_shift = 0;\n  /* Number of bits by which ins_h must be shifted at each input\n   * step. It must be such that after MIN_MATCH steps, the oldest\n   * byte no longer takes part in the hash key, that is:\n   *   hash_shift * MIN_MATCH >= hash_bits\n   */\n\n  this.block_start = 0;\n  /* Window position at the beginning of the current output block. Gets\n   * negative when the window is moved backwards.\n   */\n\n  this.match_length = 0;      /* length of best match */\n  this.prev_match = 0;        /* previous match */\n  this.match_available = 0;   /* set if previous match exists */\n  this.strstart = 0;          /* start of string to insert */\n  this.match_start = 0;       /* start of matching string */\n  this.lookahead = 0;         /* number of valid bytes ahead in window */\n\n  this.prev_length = 0;\n  /* Length of the best match at previous step. Matches not greater than this\n   * are discarded. This is used in the lazy match evaluation.\n   */\n\n  this.max_chain_length = 0;\n  /* To speed up deflation, hash chains are never searched beyond this\n   * length.  A higher limit improves compression ratio but degrades the\n   * speed.\n   */\n\n  this.max_lazy_match = 0;\n  /* Attempt to find a better match only when the current match is strictly\n   * smaller than this value. This mechanism is used only for compression\n   * levels >= 4.\n   */\n  // That's alias to max_lazy_match, don't use directly\n  //this.max_insert_length = 0;\n  /* Insert new strings in the hash table only if the match length is not\n   * greater than this length. This saves time but degrades compression.\n   * max_insert_length is used only for compression levels <= 3.\n   */\n\n  this.level = 0;     /* compression level (1..9) */\n  this.strategy = 0;  /* favor or force Huffman coding*/\n\n  this.good_match = 0;\n  /* Use a faster search when the previous match is longer than this */\n\n  this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n              /* used by trees.c: */\n\n  /* Didn't use ct_data typedef below to suppress compiler warning */\n\n  // struct ct_data_s dyn_ltree[HEAP_SIZE];   /* literal and length tree */\n  // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n  // struct ct_data_s bl_tree[2*BL_CODES+1];  /* Huffman tree for bit lengths */\n\n  // Use flat array of DOUBLE size, with interleaved fata,\n  // because JS does not support effective\n  this.dyn_ltree  = new utils.Buf16(HEAP_SIZE * 2);\n  this.dyn_dtree  = new utils.Buf16((2 * D_CODES + 1) * 2);\n  this.bl_tree    = new utils.Buf16((2 * BL_CODES + 1) * 2);\n  zero(this.dyn_ltree);\n  zero(this.dyn_dtree);\n  zero(this.bl_tree);\n\n  this.l_desc   = null;         /* desc. for literal tree */\n  this.d_desc   = null;         /* desc. for distance tree */\n  this.bl_desc  = null;         /* desc. for bit length tree */\n\n  //ush bl_count[MAX_BITS+1];\n  this.bl_count = new utils.Buf16(MAX_BITS + 1);\n  /* number of codes at each bit length for an optimal tree */\n\n  //int heap[2*L_CODES+1];      /* heap used to build the Huffman trees */\n  this.heap = new utils.Buf16(2 * L_CODES + 1);  /* heap used to build the Huffman trees */\n  zero(this.heap);\n\n  this.heap_len = 0;               /* number of elements in the heap */\n  this.heap_max = 0;               /* element of largest frequency */\n  /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n   * The same heap array is used to build all trees.\n   */\n\n  this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1];\n  zero(this.depth);\n  /* Depth of each subtree used as tie breaker for trees of equal frequency\n   */\n\n  this.l_buf = 0;          /* buffer index for literals or lengths */\n\n  this.lit_bufsize = 0;\n  /* Size of match buffer for literals/lengths.  There are 4 reasons for\n   * limiting lit_bufsize to 64K:\n   *   - frequencies can be kept in 16 bit counters\n   *   - if compression is not successful for the first block, all input\n   *     data is still in the window so we can still emit a stored block even\n   *     when input comes from standard input.  (This can also be done for\n   *     all blocks if lit_bufsize is not greater than 32K.)\n   *   - if compression is not successful for a file smaller than 64K, we can\n   *     even emit a stored file instead of a stored block (saving 5 bytes).\n   *     This is applicable only for zip (not gzip or zlib).\n   *   - creating new Huffman trees less frequently may not provide fast\n   *     adaptation to changes in the input data statistics. (Take for\n   *     example a binary file with poorly compressible code followed by\n   *     a highly compressible string table.) Smaller buffer sizes give\n   *     fast adaptation but have of course the overhead of transmitting\n   *     trees more frequently.\n   *   - I can't count above 4\n   */\n\n  this.last_lit = 0;      /* running index in l_buf */\n\n  this.d_buf = 0;\n  /* Buffer index for distances. To simplify the code, d_buf and l_buf have\n   * the same number of elements. To use different lengths, an extra flag\n   * array would be necessary.\n   */\n\n  this.opt_len = 0;       /* bit length of current block with optimal trees */\n  this.static_len = 0;    /* bit length of current block with static trees */\n  this.matches = 0;       /* number of string matches in current block */\n  this.insert = 0;        /* bytes at end of window left to insert */\n\n\n  this.bi_buf = 0;\n  /* Output buffer. bits are inserted starting at the bottom (least\n   * significant bits).\n   */\n  this.bi_valid = 0;\n  /* Number of valid bits in bi_buf.  All bits above the last valid bit\n   * are always zero.\n   */\n\n  // Used for window memory init. We safely ignore it for JS. That makes\n  // sense only for pointers and memory check tools.\n  //this.high_water = 0;\n  /* High water mark offset in window for initialized bytes -- bytes above\n   * this are set to zero in order to avoid memory check warnings when\n   * longest match routines access bytes past the input.  This is then\n   * updated to the new high water mark.\n   */\n}\n\n\nfunction deflateResetKeep(strm) {\n  var s;\n\n  if (!strm || !strm.state) {\n    return err(strm, Z_STREAM_ERROR);\n  }\n\n  strm.total_in = strm.total_out = 0;\n  strm.data_type = Z_UNKNOWN;\n\n  s = strm.state;\n  s.pending = 0;\n  s.pending_out = 0;\n\n  if (s.wrap < 0) {\n    s.wrap = -s.wrap;\n    /* was made negative by deflate(..., Z_FINISH); */\n  }\n  s.status = (s.wrap ? INIT_STATE : BUSY_STATE);\n  strm.adler = (s.wrap === 2) ?\n    0  // crc32(0, Z_NULL, 0)\n  :\n    1; // adler32(0, Z_NULL, 0)\n  s.last_flush = Z_NO_FLUSH;\n  trees._tr_init(s);\n  return Z_OK;\n}\n\n\nfunction deflateReset(strm) {\n  var ret = deflateResetKeep(strm);\n  if (ret === Z_OK) {\n    lm_init(strm.state);\n  }\n  return ret;\n}\n\n\nfunction deflateSetHeader(strm, head) {\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }\n  strm.state.gzhead = head;\n  return Z_OK;\n}\n\n\nfunction deflateInit2(strm, level, method, windowBits, memLevel, strategy) {\n  if (!strm) { // === Z_NULL\n    return Z_STREAM_ERROR;\n  }\n  var wrap = 1;\n\n  if (level === Z_DEFAULT_COMPRESSION) {\n    level = 6;\n  }\n\n  if (windowBits < 0) { /* suppress zlib wrapper */\n    wrap = 0;\n    windowBits = -windowBits;\n  }\n\n  else if (windowBits > 15) {\n    wrap = 2;           /* write gzip wrapper instead */\n    windowBits -= 16;\n  }\n\n\n  if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||\n    windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n    strategy < 0 || strategy > Z_FIXED) {\n    return err(strm, Z_STREAM_ERROR);\n  }\n\n\n  if (windowBits === 8) {\n    windowBits = 9;\n  }\n  /* until 256-byte window bug fixed */\n\n  var s = new DeflateState();\n\n  strm.state = s;\n  s.strm = strm;\n\n  s.wrap = wrap;\n  s.gzhead = null;\n  s.w_bits = windowBits;\n  s.w_size = 1 << s.w_bits;\n  s.w_mask = s.w_size - 1;\n\n  s.hash_bits = memLevel + 7;\n  s.hash_size = 1 << s.hash_bits;\n  s.hash_mask = s.hash_size - 1;\n  s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n  s.window = new utils.Buf8(s.w_size * 2);\n  s.head = new utils.Buf16(s.hash_size);\n  s.prev = new utils.Buf16(s.w_size);\n\n  // Don't need mem init magic for JS.\n  //s.high_water = 0;  /* nothing written to s->window yet */\n\n  s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n  s.pending_buf_size = s.lit_bufsize * 4;\n\n  //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);\n  //s->pending_buf = (uchf *) overlay;\n  s.pending_buf = new utils.Buf8(s.pending_buf_size);\n\n  // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)\n  //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);\n  s.d_buf = 1 * s.lit_bufsize;\n\n  //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;\n  s.l_buf = (1 + 2) * s.lit_bufsize;\n\n  s.level = level;\n  s.strategy = strategy;\n  s.method = method;\n\n  return deflateReset(strm);\n}\n\nfunction deflateInit(strm, level) {\n  return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n}\n\n\nfunction deflate(strm, flush) {\n  var old_flush, s;\n  var beg, val; // for gzip header write only\n\n  if (!strm || !strm.state ||\n    flush > Z_BLOCK || flush < 0) {\n    return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n  }\n\n  s = strm.state;\n\n  if (!strm.output ||\n      (!strm.input && strm.avail_in !== 0) ||\n      (s.status === FINISH_STATE && flush !== Z_FINISH)) {\n    return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);\n  }\n\n  s.strm = strm; /* just in case */\n  old_flush = s.last_flush;\n  s.last_flush = flush;\n\n  /* Write the header */\n  if (s.status === INIT_STATE) {\n\n    if (s.wrap === 2) { // GZIP header\n      strm.adler = 0;  //crc32(0L, Z_NULL, 0);\n      put_byte(s, 31);\n      put_byte(s, 139);\n      put_byte(s, 8);\n      if (!s.gzhead) { // s->gzhead == Z_NULL\n        put_byte(s, 0);\n        put_byte(s, 0);\n        put_byte(s, 0);\n        put_byte(s, 0);\n        put_byte(s, 0);\n        put_byte(s, s.level === 9 ? 2 :\n                    (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n                     4 : 0));\n        put_byte(s, OS_CODE);\n        s.status = BUSY_STATE;\n      }\n      else {\n        put_byte(s, (s.gzhead.text ? 1 : 0) +\n                    (s.gzhead.hcrc ? 2 : 0) +\n                    (!s.gzhead.extra ? 0 : 4) +\n                    (!s.gzhead.name ? 0 : 8) +\n                    (!s.gzhead.comment ? 0 : 16)\n                );\n        put_byte(s, s.gzhead.time & 0xff);\n        put_byte(s, (s.gzhead.time >> 8) & 0xff);\n        put_byte(s, (s.gzhead.time >> 16) & 0xff);\n        put_byte(s, (s.gzhead.time >> 24) & 0xff);\n        put_byte(s, s.level === 9 ? 2 :\n                    (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n                     4 : 0));\n        put_byte(s, s.gzhead.os & 0xff);\n        if (s.gzhead.extra && s.gzhead.extra.length) {\n          put_byte(s, s.gzhead.extra.length & 0xff);\n          put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n        }\n        if (s.gzhead.hcrc) {\n          strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);\n        }\n        s.gzindex = 0;\n        s.status = EXTRA_STATE;\n      }\n    }\n    else // DEFLATE header\n    {\n      var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;\n      var level_flags = -1;\n\n      if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n        level_flags = 0;\n      } else if (s.level < 6) {\n        level_flags = 1;\n      } else if (s.level === 6) {\n        level_flags = 2;\n      } else {\n        level_flags = 3;\n      }\n      header |= (level_flags << 6);\n      if (s.strstart !== 0) { header |= PRESET_DICT; }\n      header += 31 - (header % 31);\n\n      s.status = BUSY_STATE;\n      putShortMSB(s, header);\n\n      /* Save the adler32 of the preset dictionary: */\n      if (s.strstart !== 0) {\n        putShortMSB(s, strm.adler >>> 16);\n        putShortMSB(s, strm.adler & 0xffff);\n      }\n      strm.adler = 1; // adler32(0L, Z_NULL, 0);\n    }\n  }\n\n//#ifdef GZIP\n  if (s.status === EXTRA_STATE) {\n    if (s.gzhead.extra/* != Z_NULL*/) {\n      beg = s.pending;  /* start of bytes to update crc */\n\n      while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {\n        if (s.pending === s.pending_buf_size) {\n          if (s.gzhead.hcrc && s.pending > beg) {\n            strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n          }\n          flush_pending(strm);\n          beg = s.pending;\n          if (s.pending === s.pending_buf_size) {\n            break;\n          }\n        }\n        put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);\n        s.gzindex++;\n      }\n      if (s.gzhead.hcrc && s.pending > beg) {\n        strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n      }\n      if (s.gzindex === s.gzhead.extra.length) {\n        s.gzindex = 0;\n        s.status = NAME_STATE;\n      }\n    }\n    else {\n      s.status = NAME_STATE;\n    }\n  }\n  if (s.status === NAME_STATE) {\n    if (s.gzhead.name/* != Z_NULL*/) {\n      beg = s.pending;  /* start of bytes to update crc */\n      //int val;\n\n      do {\n        if (s.pending === s.pending_buf_size) {\n          if (s.gzhead.hcrc && s.pending > beg) {\n            strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n          }\n          flush_pending(strm);\n          beg = s.pending;\n          if (s.pending === s.pending_buf_size) {\n            val = 1;\n            break;\n          }\n        }\n        // JS specific: little magic to add zero terminator to end of string\n        if (s.gzindex < s.gzhead.name.length) {\n          val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n        } else {\n          val = 0;\n        }\n        put_byte(s, val);\n      } while (val !== 0);\n\n      if (s.gzhead.hcrc && s.pending > beg) {\n        strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n      }\n      if (val === 0) {\n        s.gzindex = 0;\n        s.status = COMMENT_STATE;\n      }\n    }\n    else {\n      s.status = COMMENT_STATE;\n    }\n  }\n  if (s.status === COMMENT_STATE) {\n    if (s.gzhead.comment/* != Z_NULL*/) {\n      beg = s.pending;  /* start of bytes to update crc */\n      //int val;\n\n      do {\n        if (s.pending === s.pending_buf_size) {\n          if (s.gzhead.hcrc && s.pending > beg) {\n            strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n          }\n          flush_pending(strm);\n          beg = s.pending;\n          if (s.pending === s.pending_buf_size) {\n            val = 1;\n            break;\n          }\n        }\n        // JS specific: little magic to add zero terminator to end of string\n        if (s.gzindex < s.gzhead.comment.length) {\n          val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n        } else {\n          val = 0;\n        }\n        put_byte(s, val);\n      } while (val !== 0);\n\n      if (s.gzhead.hcrc && s.pending > beg) {\n        strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n      }\n      if (val === 0) {\n        s.status = HCRC_STATE;\n      }\n    }\n    else {\n      s.status = HCRC_STATE;\n    }\n  }\n  if (s.status === HCRC_STATE) {\n    if (s.gzhead.hcrc) {\n      if (s.pending + 2 > s.pending_buf_size) {\n        flush_pending(strm);\n      }\n      if (s.pending + 2 <= s.pending_buf_size) {\n        put_byte(s, strm.adler & 0xff);\n        put_byte(s, (strm.adler >> 8) & 0xff);\n        strm.adler = 0; //crc32(0L, Z_NULL, 0);\n        s.status = BUSY_STATE;\n      }\n    }\n    else {\n      s.status = BUSY_STATE;\n    }\n  }\n//#endif\n\n  /* Flush as much pending output as possible */\n  if (s.pending !== 0) {\n    flush_pending(strm);\n    if (strm.avail_out === 0) {\n      /* Since avail_out is 0, deflate will be called again with\n       * more output space, but possibly with both pending and\n       * avail_in equal to zero. There won't be anything to do,\n       * but this is not an error situation so make sure we\n       * return OK instead of BUF_ERROR at next call of deflate:\n       */\n      s.last_flush = -1;\n      return Z_OK;\n    }\n\n    /* Make sure there is something to do and avoid duplicate consecutive\n     * flushes. For repeated and useless calls with Z_FINISH, we keep\n     * returning Z_STREAM_END instead of Z_BUF_ERROR.\n     */\n  } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n    flush !== Z_FINISH) {\n    return err(strm, Z_BUF_ERROR);\n  }\n\n  /* User must not provide more input after the first FINISH: */\n  if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n    return err(strm, Z_BUF_ERROR);\n  }\n\n  /* Start a new block or continue the current one.\n   */\n  if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n    (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {\n    var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :\n      (s.strategy === Z_RLE ? deflate_rle(s, flush) :\n        configuration_table[s.level].func(s, flush));\n\n    if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n      s.status = FINISH_STATE;\n    }\n    if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n      if (strm.avail_out === 0) {\n        s.last_flush = -1;\n        /* avoid BUF_ERROR next call, see above */\n      }\n      return Z_OK;\n      /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n       * of deflate should use the same flush parameter to make sure\n       * that the flush is complete. So we don't have to output an\n       * empty block here, this will be done at next call. This also\n       * ensures that for a very small output buffer, we emit at most\n       * one empty block.\n       */\n    }\n    if (bstate === BS_BLOCK_DONE) {\n      if (flush === Z_PARTIAL_FLUSH) {\n        trees._tr_align(s);\n      }\n      else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */\n\n        trees._tr_stored_block(s, 0, 0, false);\n        /* For a full flush, this empty block will be recognized\n         * as a special marker by inflate_sync().\n         */\n        if (flush === Z_FULL_FLUSH) {\n          /*** CLEAR_HASH(s); ***/             /* forget history */\n          zero(s.head); // Fill with NIL (= 0);\n\n          if (s.lookahead === 0) {\n            s.strstart = 0;\n            s.block_start = 0;\n            s.insert = 0;\n          }\n        }\n      }\n      flush_pending(strm);\n      if (strm.avail_out === 0) {\n        s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n        return Z_OK;\n      }\n    }\n  }\n  //Assert(strm->avail_out > 0, \"bug2\");\n  //if (strm.avail_out <= 0) { throw new Error(\"bug2\");}\n\n  if (flush !== Z_FINISH) { return Z_OK; }\n  if (s.wrap <= 0) { return Z_STREAM_END; }\n\n  /* Write the trailer */\n  if (s.wrap === 2) {\n    put_byte(s, strm.adler & 0xff);\n    put_byte(s, (strm.adler >> 8) & 0xff);\n    put_byte(s, (strm.adler >> 16) & 0xff);\n    put_byte(s, (strm.adler >> 24) & 0xff);\n    put_byte(s, strm.total_in & 0xff);\n    put_byte(s, (strm.total_in >> 8) & 0xff);\n    put_byte(s, (strm.total_in >> 16) & 0xff);\n    put_byte(s, (strm.total_in >> 24) & 0xff);\n  }\n  else\n  {\n    putShortMSB(s, strm.adler >>> 16);\n    putShortMSB(s, strm.adler & 0xffff);\n  }\n\n  flush_pending(strm);\n  /* If avail_out is zero, the application will call deflate again\n   * to flush the rest.\n   */\n  if (s.wrap > 0) { s.wrap = -s.wrap; }\n  /* write the trailer only once! */\n  return s.pending !== 0 ? Z_OK : Z_STREAM_END;\n}\n\nfunction deflateEnd(strm) {\n  var status;\n\n  if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n    return Z_STREAM_ERROR;\n  }\n\n  status = strm.state.status;\n  if (status !== INIT_STATE &&\n    status !== EXTRA_STATE &&\n    status !== NAME_STATE &&\n    status !== COMMENT_STATE &&\n    status !== HCRC_STATE &&\n    status !== BUSY_STATE &&\n    status !== FINISH_STATE\n  ) {\n    return err(strm, Z_STREAM_ERROR);\n  }\n\n  strm.state = null;\n\n  return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;\n}\n\n\n/* =========================================================================\n * Initializes the compression dictionary from the given byte\n * sequence without producing any compressed output.\n */\nfunction deflateSetDictionary(strm, dictionary) {\n  var dictLength = dictionary.length;\n\n  var s;\n  var str, n;\n  var wrap;\n  var avail;\n  var next;\n  var input;\n  var tmpDict;\n\n  if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n    return Z_STREAM_ERROR;\n  }\n\n  s = strm.state;\n  wrap = s.wrap;\n\n  if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {\n    return Z_STREAM_ERROR;\n  }\n\n  /* when using zlib wrappers, compute Adler-32 for provided dictionary */\n  if (wrap === 1) {\n    /* adler32(strm->adler, dictionary, dictLength); */\n    strm.adler = adler32(strm.adler, dictionary, dictLength, 0);\n  }\n\n  s.wrap = 0;   /* avoid computing Adler-32 in read_buf */\n\n  /* if dictionary would fill window, just replace the history */\n  if (dictLength >= s.w_size) {\n    if (wrap === 0) {            /* already empty otherwise */\n      /*** CLEAR_HASH(s); ***/\n      zero(s.head); // Fill with NIL (= 0);\n      s.strstart = 0;\n      s.block_start = 0;\n      s.insert = 0;\n    }\n    /* use the tail */\n    // dictionary = dictionary.slice(dictLength - s.w_size);\n    tmpDict = new utils.Buf8(s.w_size);\n    utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0);\n    dictionary = tmpDict;\n    dictLength = s.w_size;\n  }\n  /* insert dictionary into window and hash */\n  avail = strm.avail_in;\n  next = strm.next_in;\n  input = strm.input;\n  strm.avail_in = dictLength;\n  strm.next_in = 0;\n  strm.input = dictionary;\n  fill_window(s);\n  while (s.lookahead >= MIN_MATCH) {\n    str = s.strstart;\n    n = s.lookahead - (MIN_MATCH - 1);\n    do {\n      /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n      s.prev[str & s.w_mask] = s.head[s.ins_h];\n\n      s.head[s.ins_h] = str;\n      str++;\n    } while (--n);\n    s.strstart = str;\n    s.lookahead = MIN_MATCH - 1;\n    fill_window(s);\n  }\n  s.strstart += s.lookahead;\n  s.block_start = s.strstart;\n  s.insert = s.lookahead;\n  s.lookahead = 0;\n  s.match_length = s.prev_length = MIN_MATCH - 1;\n  s.match_available = 0;\n  strm.next_in = next;\n  strm.input = input;\n  strm.avail_in = avail;\n  s.wrap = wrap;\n  return Z_OK;\n}\n\n\nexports.deflateInit = deflateInit;\nexports.deflateInit2 = deflateInit2;\nexports.deflateReset = deflateReset;\nexports.deflateResetKeep = deflateResetKeep;\nexports.deflateSetHeader = deflateSetHeader;\nexports.deflate = deflate;\nexports.deflateEnd = deflateEnd;\nexports.deflateSetDictionary = deflateSetDictionary;\nexports.deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nexports.deflateBound = deflateBound;\nexports.deflateCopy = deflateCopy;\nexports.deflateParams = deflateParams;\nexports.deflatePending = deflatePending;\nexports.deflatePrime = deflatePrime;\nexports.deflateTune = deflateTune;\n*/\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction GZheader() {\n  /* true if compressed data believed to be text */\n  this.text       = 0;\n  /* modification time */\n  this.time       = 0;\n  /* extra flags (not used when writing a gzip file) */\n  this.xflags     = 0;\n  /* operating system */\n  this.os         = 0;\n  /* pointer to extra field or Z_NULL if none */\n  this.extra      = null;\n  /* extra field length (valid if extra != Z_NULL) */\n  this.extra_len  = 0; // Actually, we don't need it in JS,\n                       // but leave for few code modifications\n\n  //\n  // Setup limits is not necessary because in js we should not preallocate memory\n  // for inflate use constant limit in 65536 bytes\n  //\n\n  /* space at extra (only when reading header) */\n  // this.extra_max  = 0;\n  /* pointer to zero-terminated file name or Z_NULL */\n  this.name       = '';\n  /* space at name (only when reading header) */\n  // this.name_max   = 0;\n  /* pointer to zero-terminated comment or Z_NULL */\n  this.comment    = '';\n  /* space at comment (only when reading header) */\n  // this.comm_max   = 0;\n  /* true if there was or will be a header crc */\n  this.hcrc       = 0;\n  /* true when done reading gzip header (not used when writing a gzip file) */\n  this.done       = false;\n}\n\nmodule.exports = GZheader;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// See state defs from inflate.js\nvar BAD = 30;       /* got a data error -- remain here until reset */\nvar TYPE = 12;      /* i: waiting for type bits, including last-flag bit */\n\n/*\n   Decode literal, length, and distance codes and write out the resulting\n   literal and match bytes until either not enough input or output is\n   available, an end-of-block is encountered, or a data error is encountered.\n   When large enough input and output buffers are supplied to inflate(), for\n   example, a 16K input buffer and a 64K output buffer, more than 95% of the\n   inflate execution time is spent in this routine.\n\n   Entry assumptions:\n\n        state.mode === LEN\n        strm.avail_in >= 6\n        strm.avail_out >= 258\n        start >= strm.avail_out\n        state.bits < 8\n\n   On return, state.mode is one of:\n\n        LEN -- ran out of enough output space or enough available input\n        TYPE -- reached end of block code, inflate() to interpret next block\n        BAD -- error in block data\n\n   Notes:\n\n    - The maximum input bits used by a length/distance pair is 15 bits for the\n      length code, 5 bits for the length extra, 15 bits for the distance code,\n      and 13 bits for the distance extra.  This totals 48 bits, or six bytes.\n      Therefore if strm.avail_in >= 6, then there is enough input to avoid\n      checking for available input while decoding.\n\n    - The maximum bytes that a single length/distance pair can output is 258\n      bytes, which is the maximum length that can be coded.  inflate_fast()\n      requires strm.avail_out >= 258 for each loop to avoid checking for\n      output space.\n */\nmodule.exports = function inflate_fast(strm, start) {\n  var state;\n  var _in;                    /* local strm.input */\n  var last;                   /* have enough input while in < last */\n  var _out;                   /* local strm.output */\n  var beg;                    /* inflate()'s initial strm.output */\n  var end;                    /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n  var dmax;                   /* maximum distance from zlib header */\n//#endif\n  var wsize;                  /* window size or zero if not using window */\n  var whave;                  /* valid bytes in the window */\n  var wnext;                  /* window write index */\n  // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n  var s_window;               /* allocated sliding window, if wsize != 0 */\n  var hold;                   /* local strm.hold */\n  var bits;                   /* local strm.bits */\n  var lcode;                  /* local strm.lencode */\n  var dcode;                  /* local strm.distcode */\n  var lmask;                  /* mask for first level of length codes */\n  var dmask;                  /* mask for first level of distance codes */\n  var here;                   /* retrieved table entry */\n  var op;                     /* code bits, operation, extra bits, or */\n                              /*  window position, window bytes to copy */\n  var len;                    /* match length, unused bytes */\n  var dist;                   /* match distance */\n  var from;                   /* where to copy match from */\n  var from_source;\n\n\n  var input, output; // JS specific, because we have no pointers\n\n  /* copy state to local variables */\n  state = strm.state;\n  //here = state.here;\n  _in = strm.next_in;\n  input = strm.input;\n  last = _in + (strm.avail_in - 5);\n  _out = strm.next_out;\n  output = strm.output;\n  beg = _out - (start - strm.avail_out);\n  end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n  dmax = state.dmax;\n//#endif\n  wsize = state.wsize;\n  whave = state.whave;\n  wnext = state.wnext;\n  s_window = state.window;\n  hold = state.hold;\n  bits = state.bits;\n  lcode = state.lencode;\n  dcode = state.distcode;\n  lmask = (1 << state.lenbits) - 1;\n  dmask = (1 << state.distbits) - 1;\n\n\n  /* decode literals and length/distances until end-of-block or not enough\n     input data or output space */\n\n  top:\n  do {\n    if (bits < 15) {\n      hold += input[_in++] << bits;\n      bits += 8;\n      hold += input[_in++] << bits;\n      bits += 8;\n    }\n\n    here = lcode[hold & lmask];\n\n    dolen:\n    for (;;) { // Goto emulation\n      op = here >>> 24/*here.bits*/;\n      hold >>>= op;\n      bits -= op;\n      op = (here >>> 16) & 0xff/*here.op*/;\n      if (op === 0) {                          /* literal */\n        //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n        //        \"inflate:         literal '%c'\\n\" :\n        //        \"inflate:         literal 0x%02x\\n\", here.val));\n        output[_out++] = here & 0xffff/*here.val*/;\n      }\n      else if (op & 16) {                     /* length base */\n        len = here & 0xffff/*here.val*/;\n        op &= 15;                           /* number of extra bits */\n        if (op) {\n          if (bits < op) {\n            hold += input[_in++] << bits;\n            bits += 8;\n          }\n          len += hold & ((1 << op) - 1);\n          hold >>>= op;\n          bits -= op;\n        }\n        //Tracevv((stderr, \"inflate:         length %u\\n\", len));\n        if (bits < 15) {\n          hold += input[_in++] << bits;\n          bits += 8;\n          hold += input[_in++] << bits;\n          bits += 8;\n        }\n        here = dcode[hold & dmask];\n\n        dodist:\n        for (;;) { // goto emulation\n          op = here >>> 24/*here.bits*/;\n          hold >>>= op;\n          bits -= op;\n          op = (here >>> 16) & 0xff/*here.op*/;\n\n          if (op & 16) {                      /* distance base */\n            dist = here & 0xffff/*here.val*/;\n            op &= 15;                       /* number of extra bits */\n            if (bits < op) {\n              hold += input[_in++] << bits;\n              bits += 8;\n              if (bits < op) {\n                hold += input[_in++] << bits;\n                bits += 8;\n              }\n            }\n            dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n            if (dist > dmax) {\n              strm.msg = 'invalid distance too far back';\n              state.mode = BAD;\n              break top;\n            }\n//#endif\n            hold >>>= op;\n            bits -= op;\n            //Tracevv((stderr, \"inflate:         distance %u\\n\", dist));\n            op = _out - beg;                /* max distance in output */\n            if (dist > op) {                /* see if copy from window */\n              op = dist - op;               /* distance back in window */\n              if (op > whave) {\n                if (state.sane) {\n                  strm.msg = 'invalid distance too far back';\n                  state.mode = BAD;\n                  break top;\n                }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n//                if (len <= op - whave) {\n//                  do {\n//                    output[_out++] = 0;\n//                  } while (--len);\n//                  continue top;\n//                }\n//                len -= op - whave;\n//                do {\n//                  output[_out++] = 0;\n//                } while (--op > whave);\n//                if (op === 0) {\n//                  from = _out - dist;\n//                  do {\n//                    output[_out++] = output[from++];\n//                  } while (--len);\n//                  continue top;\n//                }\n//#endif\n              }\n              from = 0; // window index\n              from_source = s_window;\n              if (wnext === 0) {           /* very common case */\n                from += wsize - op;\n                if (op < len) {         /* some from window */\n                  len -= op;\n                  do {\n                    output[_out++] = s_window[from++];\n                  } while (--op);\n                  from = _out - dist;  /* rest from output */\n                  from_source = output;\n                }\n              }\n              else if (wnext < op) {      /* wrap around window */\n                from += wsize + wnext - op;\n                op -= wnext;\n                if (op < len) {         /* some from end of window */\n                  len -= op;\n                  do {\n                    output[_out++] = s_window[from++];\n                  } while (--op);\n                  from = 0;\n                  if (wnext < len) {  /* some from start of window */\n                    op = wnext;\n                    len -= op;\n                    do {\n                      output[_out++] = s_window[from++];\n                    } while (--op);\n                    from = _out - dist;      /* rest from output */\n                    from_source = output;\n                  }\n                }\n              }\n              else {                      /* contiguous in window */\n                from += wnext - op;\n                if (op < len) {         /* some from window */\n                  len -= op;\n                  do {\n                    output[_out++] = s_window[from++];\n                  } while (--op);\n                  from = _out - dist;  /* rest from output */\n                  from_source = output;\n                }\n              }\n              while (len > 2) {\n                output[_out++] = from_source[from++];\n                output[_out++] = from_source[from++];\n                output[_out++] = from_source[from++];\n                len -= 3;\n              }\n              if (len) {\n                output[_out++] = from_source[from++];\n                if (len > 1) {\n                  output[_out++] = from_source[from++];\n                }\n              }\n            }\n            else {\n              from = _out - dist;          /* copy direct from output */\n              do {                        /* minimum length is three */\n                output[_out++] = output[from++];\n                output[_out++] = output[from++];\n                output[_out++] = output[from++];\n                len -= 3;\n              } while (len > 2);\n              if (len) {\n                output[_out++] = output[from++];\n                if (len > 1) {\n                  output[_out++] = output[from++];\n                }\n              }\n            }\n          }\n          else if ((op & 64) === 0) {          /* 2nd level distance code */\n            here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n            continue dodist;\n          }\n          else {\n            strm.msg = 'invalid distance code';\n            state.mode = BAD;\n            break top;\n          }\n\n          break; // need to emulate goto via \"continue\"\n        }\n      }\n      else if ((op & 64) === 0) {              /* 2nd level length code */\n        here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n        continue dolen;\n      }\n      else if (op & 32) {                     /* end-of-block */\n        //Tracevv((stderr, \"inflate:         end of block\\n\"));\n        state.mode = TYPE;\n        break top;\n      }\n      else {\n        strm.msg = 'invalid literal/length code';\n        state.mode = BAD;\n        break top;\n      }\n\n      break; // need to emulate goto via \"continue\"\n    }\n  } while (_in < last && _out < end);\n\n  /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n  len = bits >> 3;\n  _in -= len;\n  bits -= len << 3;\n  hold &= (1 << bits) - 1;\n\n  /* update state and return */\n  strm.next_in = _in;\n  strm.next_out = _out;\n  strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n  strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n  state.hold = hold;\n  state.bits = bits;\n  return;\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils         = require('../utils/common');\nvar adler32       = require('./adler32');\nvar crc32         = require('./crc32');\nvar inflate_fast  = require('./inffast');\nvar inflate_table = require('./inftrees');\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\n//var Z_NO_FLUSH      = 0;\n//var Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH    = 2;\n//var Z_FULL_FLUSH    = 3;\nvar Z_FINISH        = 4;\nvar Z_BLOCK         = 5;\nvar Z_TREES         = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK            = 0;\nvar Z_STREAM_END    = 1;\nvar Z_NEED_DICT     = 2;\n//var Z_ERRNO         = -1;\nvar Z_STREAM_ERROR  = -2;\nvar Z_DATA_ERROR    = -3;\nvar Z_MEM_ERROR     = -4;\nvar Z_BUF_ERROR     = -5;\n//var Z_VERSION_ERROR = -6;\n\n/* The deflate compression method */\nvar Z_DEFLATED  = 8;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nvar    HEAD = 1;       /* i: waiting for magic header */\nvar    FLAGS = 2;      /* i: waiting for method and flags (gzip) */\nvar    TIME = 3;       /* i: waiting for modification time (gzip) */\nvar    OS = 4;         /* i: waiting for extra flags and operating system (gzip) */\nvar    EXLEN = 5;      /* i: waiting for extra length (gzip) */\nvar    EXTRA = 6;      /* i: waiting for extra bytes (gzip) */\nvar    NAME = 7;       /* i: waiting for end of file name (gzip) */\nvar    COMMENT = 8;    /* i: waiting for end of comment (gzip) */\nvar    HCRC = 9;       /* i: waiting for header crc (gzip) */\nvar    DICTID = 10;    /* i: waiting for dictionary check value */\nvar    DICT = 11;      /* waiting for inflateSetDictionary() call */\nvar        TYPE = 12;      /* i: waiting for type bits, including last-flag bit */\nvar        TYPEDO = 13;    /* i: same, but skip check to exit inflate on new block */\nvar        STORED = 14;    /* i: waiting for stored size (length and complement) */\nvar        COPY_ = 15;     /* i/o: same as COPY below, but only first time in */\nvar        COPY = 16;      /* i/o: waiting for input or output to copy stored block */\nvar        TABLE = 17;     /* i: waiting for dynamic block table lengths */\nvar        LENLENS = 18;   /* i: waiting for code length code lengths */\nvar        CODELENS = 19;  /* i: waiting for length/lit and distance code lengths */\nvar            LEN_ = 20;      /* i: same as LEN below, but only first time in */\nvar            LEN = 21;       /* i: waiting for length/lit/eob code */\nvar            LENEXT = 22;    /* i: waiting for length extra bits */\nvar            DIST = 23;      /* i: waiting for distance code */\nvar            DISTEXT = 24;   /* i: waiting for distance extra bits */\nvar            MATCH = 25;     /* o: waiting for output space to copy string */\nvar            LIT = 26;       /* o: waiting for output space to write literal */\nvar    CHECK = 27;     /* i: waiting for 32-bit check value */\nvar    LENGTH = 28;    /* i: waiting for 32-bit length (gzip) */\nvar    DONE = 29;      /* finished check, done -- remain here until reset */\nvar    BAD = 30;       /* got a data error -- remain here until reset */\nvar    MEM = 31;       /* got an inflate() memory error -- remain here until reset */\nvar    SYNC = 32;      /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH =  (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_WBITS = MAX_WBITS;\n\n\nfunction zswap32(q) {\n  return  (((q >>> 24) & 0xff) +\n          ((q >>> 8) & 0xff00) +\n          ((q & 0xff00) << 8) +\n          ((q & 0xff) << 24));\n}\n\n\nfunction InflateState() {\n  this.mode = 0;             /* current inflate mode */\n  this.last = false;          /* true if processing last block */\n  this.wrap = 0;              /* bit 0 true for zlib, bit 1 true for gzip */\n  this.havedict = false;      /* true if dictionary provided */\n  this.flags = 0;             /* gzip header method and flags (0 if zlib) */\n  this.dmax = 0;              /* zlib header max distance (INFLATE_STRICT) */\n  this.check = 0;             /* protected copy of check value */\n  this.total = 0;             /* protected copy of output count */\n  // TODO: may be {}\n  this.head = null;           /* where to save gzip header information */\n\n  /* sliding window */\n  this.wbits = 0;             /* log base 2 of requested window size */\n  this.wsize = 0;             /* window size or zero if not using window */\n  this.whave = 0;             /* valid bytes in the window */\n  this.wnext = 0;             /* window write index */\n  this.window = null;         /* allocated sliding window, if needed */\n\n  /* bit accumulator */\n  this.hold = 0;              /* input bit accumulator */\n  this.bits = 0;              /* number of bits in \"in\" */\n\n  /* for string and stored block copying */\n  this.length = 0;            /* literal or length of data to copy */\n  this.offset = 0;            /* distance back to copy string from */\n\n  /* for table and code decoding */\n  this.extra = 0;             /* extra bits needed */\n\n  /* fixed and dynamic code tables */\n  this.lencode = null;          /* starting table for length/literal codes */\n  this.distcode = null;         /* starting table for distance codes */\n  this.lenbits = 0;           /* index bits for lencode */\n  this.distbits = 0;          /* index bits for distcode */\n\n  /* dynamic table building */\n  this.ncode = 0;             /* number of code length code lengths */\n  this.nlen = 0;              /* number of length code lengths */\n  this.ndist = 0;             /* number of distance code lengths */\n  this.have = 0;              /* number of code lengths in lens[] */\n  this.next = null;              /* next available space in codes[] */\n\n  this.lens = new utils.Buf16(320); /* temporary storage for code lengths */\n  this.work = new utils.Buf16(288); /* work area for code table building */\n\n  /*\n   because we don't have pointers in js, we use lencode and distcode directly\n   as buffers so we don't need codes\n  */\n  //this.codes = new utils.Buf32(ENOUGH);       /* space for code tables */\n  this.lendyn = null;              /* dynamic table for length/literal codes (JS specific) */\n  this.distdyn = null;             /* dynamic table for distance codes (JS specific) */\n  this.sane = 0;                   /* if false, allow invalid distance too far */\n  this.back = 0;                   /* bits back of last unprocessed length/lit */\n  this.was = 0;                    /* initial length of match */\n}\n\nfunction inflateResetKeep(strm) {\n  var state;\n\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  state = strm.state;\n  strm.total_in = strm.total_out = state.total = 0;\n  strm.msg = ''; /*Z_NULL*/\n  if (state.wrap) {       /* to support ill-conceived Java test suite */\n    strm.adler = state.wrap & 1;\n  }\n  state.mode = HEAD;\n  state.last = 0;\n  state.havedict = 0;\n  state.dmax = 32768;\n  state.head = null/*Z_NULL*/;\n  state.hold = 0;\n  state.bits = 0;\n  //state.lencode = state.distcode = state.next = state.codes;\n  state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);\n  state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);\n\n  state.sane = 1;\n  state.back = -1;\n  //Tracev((stderr, \"inflate: reset\\n\"));\n  return Z_OK;\n}\n\nfunction inflateReset(strm) {\n  var state;\n\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  state = strm.state;\n  state.wsize = 0;\n  state.whave = 0;\n  state.wnext = 0;\n  return inflateResetKeep(strm);\n\n}\n\nfunction inflateReset2(strm, windowBits) {\n  var wrap;\n  var state;\n\n  /* get the state */\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  state = strm.state;\n\n  /* extract wrap request from windowBits parameter */\n  if (windowBits < 0) {\n    wrap = 0;\n    windowBits = -windowBits;\n  }\n  else {\n    wrap = (windowBits >> 4) + 1;\n    if (windowBits < 48) {\n      windowBits &= 15;\n    }\n  }\n\n  /* set number of window bits, free window if different */\n  if (windowBits && (windowBits < 8 || windowBits > 15)) {\n    return Z_STREAM_ERROR;\n  }\n  if (state.window !== null && state.wbits !== windowBits) {\n    state.window = null;\n  }\n\n  /* update state and reset the rest of it */\n  state.wrap = wrap;\n  state.wbits = windowBits;\n  return inflateReset(strm);\n}\n\nfunction inflateInit2(strm, windowBits) {\n  var ret;\n  var state;\n\n  if (!strm) { return Z_STREAM_ERROR; }\n  //strm.msg = Z_NULL;                 /* in case we return an error */\n\n  state = new InflateState();\n\n  //if (state === Z_NULL) return Z_MEM_ERROR;\n  //Tracev((stderr, \"inflate: allocated\\n\"));\n  strm.state = state;\n  state.window = null/*Z_NULL*/;\n  ret = inflateReset2(strm, windowBits);\n  if (ret !== Z_OK) {\n    strm.state = null/*Z_NULL*/;\n  }\n  return ret;\n}\n\nfunction inflateInit(strm) {\n  return inflateInit2(strm, DEF_WBITS);\n}\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding.  Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter.  This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time.  However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nvar virgin = true;\n\nvar lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\nfunction fixedtables(state) {\n  /* build fixed huffman tables if first call (may not be thread safe) */\n  if (virgin) {\n    var sym;\n\n    lenfix = new utils.Buf32(512);\n    distfix = new utils.Buf32(32);\n\n    /* literal/length table */\n    sym = 0;\n    while (sym < 144) { state.lens[sym++] = 8; }\n    while (sym < 256) { state.lens[sym++] = 9; }\n    while (sym < 280) { state.lens[sym++] = 7; }\n    while (sym < 288) { state.lens[sym++] = 8; }\n\n    inflate_table(LENS,  state.lens, 0, 288, lenfix,   0, state.work, { bits: 9 });\n\n    /* distance table */\n    sym = 0;\n    while (sym < 32) { state.lens[sym++] = 5; }\n\n    inflate_table(DISTS, state.lens, 0, 32,   distfix, 0, state.work, { bits: 5 });\n\n    /* do this just once */\n    virgin = false;\n  }\n\n  state.lencode = lenfix;\n  state.lenbits = 9;\n  state.distcode = distfix;\n  state.distbits = 5;\n}\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning.  If window does not exist yet, create it.  This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nfunction updatewindow(strm, src, end, copy) {\n  var dist;\n  var state = strm.state;\n\n  /* if it hasn't been done already, allocate space for the window */\n  if (state.window === null) {\n    state.wsize = 1 << state.wbits;\n    state.wnext = 0;\n    state.whave = 0;\n\n    state.window = new utils.Buf8(state.wsize);\n  }\n\n  /* copy state->wsize or less output bytes into the circular window */\n  if (copy >= state.wsize) {\n    utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n    state.wnext = 0;\n    state.whave = state.wsize;\n  }\n  else {\n    dist = state.wsize - state.wnext;\n    if (dist > copy) {\n      dist = copy;\n    }\n    //zmemcpy(state->window + state->wnext, end - copy, dist);\n    utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n    copy -= dist;\n    if (copy) {\n      //zmemcpy(state->window, end - copy, copy);\n      utils.arraySet(state.window, src, end - copy, copy, 0);\n      state.wnext = copy;\n      state.whave = state.wsize;\n    }\n    else {\n      state.wnext += dist;\n      if (state.wnext === state.wsize) { state.wnext = 0; }\n      if (state.whave < state.wsize) { state.whave += dist; }\n    }\n  }\n  return 0;\n}\n\nfunction inflate(strm, flush) {\n  var state;\n  var input, output;          // input/output buffers\n  var next;                   /* next input INDEX */\n  var put;                    /* next output INDEX */\n  var have, left;             /* available input and output */\n  var hold;                   /* bit buffer */\n  var bits;                   /* bits in bit buffer */\n  var _in, _out;              /* save starting available input and output */\n  var copy;                   /* number of stored or match bytes to copy */\n  var from;                   /* where to copy match bytes from */\n  var from_source;\n  var here = 0;               /* current decoding table entry */\n  var here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n  //var last;                   /* parent table entry */\n  var last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n  var len;                    /* length to copy for repeats, bits to drop */\n  var ret;                    /* return code */\n  var hbuf = new utils.Buf8(4);    /* buffer for gzip header crc calculation */\n  var opts;\n\n  var n; // temporary var for NEED_BITS\n\n  var order = /* permutation of code lengths */\n    [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];\n\n\n  if (!strm || !strm.state || !strm.output ||\n      (!strm.input && strm.avail_in !== 0)) {\n    return Z_STREAM_ERROR;\n  }\n\n  state = strm.state;\n  if (state.mode === TYPE) { state.mode = TYPEDO; }    /* skip check */\n\n\n  //--- LOAD() ---\n  put = strm.next_out;\n  output = strm.output;\n  left = strm.avail_out;\n  next = strm.next_in;\n  input = strm.input;\n  have = strm.avail_in;\n  hold = state.hold;\n  bits = state.bits;\n  //---\n\n  _in = have;\n  _out = left;\n  ret = Z_OK;\n\n  inf_leave: // goto emulation\n  for (;;) {\n    switch (state.mode) {\n      case HEAD:\n        if (state.wrap === 0) {\n          state.mode = TYPEDO;\n          break;\n        }\n        //=== NEEDBITS(16);\n        while (bits < 16) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        if ((state.wrap & 2) && hold === 0x8b1f) {  /* gzip header */\n          state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n          //=== CRC2(state.check, hold);\n          hbuf[0] = hold & 0xff;\n          hbuf[1] = (hold >>> 8) & 0xff;\n          state.check = crc32(state.check, hbuf, 2, 0);\n          //===//\n\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n          state.mode = FLAGS;\n          break;\n        }\n        state.flags = 0;           /* expect zlib header */\n        if (state.head) {\n          state.head.done = false;\n        }\n        if (!(state.wrap & 1) ||   /* check if zlib header allowed */\n          (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n          strm.msg = 'incorrect header check';\n          state.mode = BAD;\n          break;\n        }\n        if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n          strm.msg = 'unknown compression method';\n          state.mode = BAD;\n          break;\n        }\n        //--- DROPBITS(4) ---//\n        hold >>>= 4;\n        bits -= 4;\n        //---//\n        len = (hold & 0x0f)/*BITS(4)*/ + 8;\n        if (state.wbits === 0) {\n          state.wbits = len;\n        }\n        else if (len > state.wbits) {\n          strm.msg = 'invalid window size';\n          state.mode = BAD;\n          break;\n        }\n        state.dmax = 1 << len;\n        //Tracev((stderr, \"inflate:   zlib header ok\\n\"));\n        strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n        state.mode = hold & 0x200 ? DICTID : TYPE;\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        break;\n      case FLAGS:\n        //=== NEEDBITS(16); */\n        while (bits < 16) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        state.flags = hold;\n        if ((state.flags & 0xff) !== Z_DEFLATED) {\n          strm.msg = 'unknown compression method';\n          state.mode = BAD;\n          break;\n        }\n        if (state.flags & 0xe000) {\n          strm.msg = 'unknown header flags set';\n          state.mode = BAD;\n          break;\n        }\n        if (state.head) {\n          state.head.text = ((hold >> 8) & 1);\n        }\n        if (state.flags & 0x0200) {\n          //=== CRC2(state.check, hold);\n          hbuf[0] = hold & 0xff;\n          hbuf[1] = (hold >>> 8) & 0xff;\n          state.check = crc32(state.check, hbuf, 2, 0);\n          //===//\n        }\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = TIME;\n        /* falls through */\n      case TIME:\n        //=== NEEDBITS(32); */\n        while (bits < 32) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        if (state.head) {\n          state.head.time = hold;\n        }\n        if (state.flags & 0x0200) {\n          //=== CRC4(state.check, hold)\n          hbuf[0] = hold & 0xff;\n          hbuf[1] = (hold >>> 8) & 0xff;\n          hbuf[2] = (hold >>> 16) & 0xff;\n          hbuf[3] = (hold >>> 24) & 0xff;\n          state.check = crc32(state.check, hbuf, 4, 0);\n          //===\n        }\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = OS;\n        /* falls through */\n      case OS:\n        //=== NEEDBITS(16); */\n        while (bits < 16) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        if (state.head) {\n          state.head.xflags = (hold & 0xff);\n          state.head.os = (hold >> 8);\n        }\n        if (state.flags & 0x0200) {\n          //=== CRC2(state.check, hold);\n          hbuf[0] = hold & 0xff;\n          hbuf[1] = (hold >>> 8) & 0xff;\n          state.check = crc32(state.check, hbuf, 2, 0);\n          //===//\n        }\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = EXLEN;\n        /* falls through */\n      case EXLEN:\n        if (state.flags & 0x0400) {\n          //=== NEEDBITS(16); */\n          while (bits < 16) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          state.length = hold;\n          if (state.head) {\n            state.head.extra_len = hold;\n          }\n          if (state.flags & 0x0200) {\n            //=== CRC2(state.check, hold);\n            hbuf[0] = hold & 0xff;\n            hbuf[1] = (hold >>> 8) & 0xff;\n            state.check = crc32(state.check, hbuf, 2, 0);\n            //===//\n          }\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n        }\n        else if (state.head) {\n          state.head.extra = null/*Z_NULL*/;\n        }\n        state.mode = EXTRA;\n        /* falls through */\n      case EXTRA:\n        if (state.flags & 0x0400) {\n          copy = state.length;\n          if (copy > have) { copy = have; }\n          if (copy) {\n            if (state.head) {\n              len = state.head.extra_len - state.length;\n              if (!state.head.extra) {\n                // Use untyped array for more convenient processing later\n                state.head.extra = new Array(state.head.extra_len);\n              }\n              utils.arraySet(\n                state.head.extra,\n                input,\n                next,\n                // extra field is limited to 65536 bytes\n                // - no need for additional size check\n                copy,\n                /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n                len\n              );\n              //zmemcpy(state.head.extra + len, next,\n              //        len + copy > state.head.extra_max ?\n              //        state.head.extra_max - len : copy);\n            }\n            if (state.flags & 0x0200) {\n              state.check = crc32(state.check, input, copy, next);\n            }\n            have -= copy;\n            next += copy;\n            state.length -= copy;\n          }\n          if (state.length) { break inf_leave; }\n        }\n        state.length = 0;\n        state.mode = NAME;\n        /* falls through */\n      case NAME:\n        if (state.flags & 0x0800) {\n          if (have === 0) { break inf_leave; }\n          copy = 0;\n          do {\n            // TODO: 2 or 1 bytes?\n            len = input[next + copy++];\n            /* use constant limit because in js we should not preallocate memory */\n            if (state.head && len &&\n                (state.length < 65536 /*state.head.name_max*/)) {\n              state.head.name += String.fromCharCode(len);\n            }\n          } while (len && copy < have);\n\n          if (state.flags & 0x0200) {\n            state.check = crc32(state.check, input, copy, next);\n          }\n          have -= copy;\n          next += copy;\n          if (len) { break inf_leave; }\n        }\n        else if (state.head) {\n          state.head.name = null;\n        }\n        state.length = 0;\n        state.mode = COMMENT;\n        /* falls through */\n      case COMMENT:\n        if (state.flags & 0x1000) {\n          if (have === 0) { break inf_leave; }\n          copy = 0;\n          do {\n            len = input[next + copy++];\n            /* use constant limit because in js we should not preallocate memory */\n            if (state.head && len &&\n                (state.length < 65536 /*state.head.comm_max*/)) {\n              state.head.comment += String.fromCharCode(len);\n            }\n          } while (len && copy < have);\n          if (state.flags & 0x0200) {\n            state.check = crc32(state.check, input, copy, next);\n          }\n          have -= copy;\n          next += copy;\n          if (len) { break inf_leave; }\n        }\n        else if (state.head) {\n          state.head.comment = null;\n        }\n        state.mode = HCRC;\n        /* falls through */\n      case HCRC:\n        if (state.flags & 0x0200) {\n          //=== NEEDBITS(16); */\n          while (bits < 16) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          if (hold !== (state.check & 0xffff)) {\n            strm.msg = 'header crc mismatch';\n            state.mode = BAD;\n            break;\n          }\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n        }\n        if (state.head) {\n          state.head.hcrc = ((state.flags >> 9) & 1);\n          state.head.done = true;\n        }\n        strm.adler = state.check = 0;\n        state.mode = TYPE;\n        break;\n      case DICTID:\n        //=== NEEDBITS(32); */\n        while (bits < 32) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        strm.adler = state.check = zswap32(hold);\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = DICT;\n        /* falls through */\n      case DICT:\n        if (state.havedict === 0) {\n          //--- RESTORE() ---\n          strm.next_out = put;\n          strm.avail_out = left;\n          strm.next_in = next;\n          strm.avail_in = have;\n          state.hold = hold;\n          state.bits = bits;\n          //---\n          return Z_NEED_DICT;\n        }\n        strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n        state.mode = TYPE;\n        /* falls through */\n      case TYPE:\n        if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n        /* falls through */\n      case TYPEDO:\n        if (state.last) {\n          //--- BYTEBITS() ---//\n          hold >>>= bits & 7;\n          bits -= bits & 7;\n          //---//\n          state.mode = CHECK;\n          break;\n        }\n        //=== NEEDBITS(3); */\n        while (bits < 3) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        state.last = (hold & 0x01)/*BITS(1)*/;\n        //--- DROPBITS(1) ---//\n        hold >>>= 1;\n        bits -= 1;\n        //---//\n\n        switch ((hold & 0x03)/*BITS(2)*/) {\n          case 0:                             /* stored block */\n            //Tracev((stderr, \"inflate:     stored block%s\\n\",\n            //        state.last ? \" (last)\" : \"\"));\n            state.mode = STORED;\n            break;\n          case 1:                             /* fixed block */\n            fixedtables(state);\n            //Tracev((stderr, \"inflate:     fixed codes block%s\\n\",\n            //        state.last ? \" (last)\" : \"\"));\n            state.mode = LEN_;             /* decode codes */\n            if (flush === Z_TREES) {\n              //--- DROPBITS(2) ---//\n              hold >>>= 2;\n              bits -= 2;\n              //---//\n              break inf_leave;\n            }\n            break;\n          case 2:                             /* dynamic block */\n            //Tracev((stderr, \"inflate:     dynamic codes block%s\\n\",\n            //        state.last ? \" (last)\" : \"\"));\n            state.mode = TABLE;\n            break;\n          case 3:\n            strm.msg = 'invalid block type';\n            state.mode = BAD;\n        }\n        //--- DROPBITS(2) ---//\n        hold >>>= 2;\n        bits -= 2;\n        //---//\n        break;\n      case STORED:\n        //--- BYTEBITS() ---// /* go to byte boundary */\n        hold >>>= bits & 7;\n        bits -= bits & 7;\n        //---//\n        //=== NEEDBITS(32); */\n        while (bits < 32) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n          strm.msg = 'invalid stored block lengths';\n          state.mode = BAD;\n          break;\n        }\n        state.length = hold & 0xffff;\n        //Tracev((stderr, \"inflate:       stored length %u\\n\",\n        //        state.length));\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = COPY_;\n        if (flush === Z_TREES) { break inf_leave; }\n        /* falls through */\n      case COPY_:\n        state.mode = COPY;\n        /* falls through */\n      case COPY:\n        copy = state.length;\n        if (copy) {\n          if (copy > have) { copy = have; }\n          if (copy > left) { copy = left; }\n          if (copy === 0) { break inf_leave; }\n          //--- zmemcpy(put, next, copy); ---\n          utils.arraySet(output, input, next, copy, put);\n          //---//\n          have -= copy;\n          next += copy;\n          left -= copy;\n          put += copy;\n          state.length -= copy;\n          break;\n        }\n        //Tracev((stderr, \"inflate:       stored end\\n\"));\n        state.mode = TYPE;\n        break;\n      case TABLE:\n        //=== NEEDBITS(14); */\n        while (bits < 14) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n        //--- DROPBITS(5) ---//\n        hold >>>= 5;\n        bits -= 5;\n        //---//\n        state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n        //--- DROPBITS(5) ---//\n        hold >>>= 5;\n        bits -= 5;\n        //---//\n        state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n        //--- DROPBITS(4) ---//\n        hold >>>= 4;\n        bits -= 4;\n        //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n        if (state.nlen > 286 || state.ndist > 30) {\n          strm.msg = 'too many length or distance symbols';\n          state.mode = BAD;\n          break;\n        }\n//#endif\n        //Tracev((stderr, \"inflate:       table sizes ok\\n\"));\n        state.have = 0;\n        state.mode = LENLENS;\n        /* falls through */\n      case LENLENS:\n        while (state.have < state.ncode) {\n          //=== NEEDBITS(3);\n          while (bits < 3) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n          //--- DROPBITS(3) ---//\n          hold >>>= 3;\n          bits -= 3;\n          //---//\n        }\n        while (state.have < 19) {\n          state.lens[order[state.have++]] = 0;\n        }\n        // We have separate tables & no pointers. 2 commented lines below not needed.\n        //state.next = state.codes;\n        //state.lencode = state.next;\n        // Switch to use dynamic table\n        state.lencode = state.lendyn;\n        state.lenbits = 7;\n\n        opts = { bits: state.lenbits };\n        ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n        state.lenbits = opts.bits;\n\n        if (ret) {\n          strm.msg = 'invalid code lengths set';\n          state.mode = BAD;\n          break;\n        }\n        //Tracev((stderr, \"inflate:       code lengths ok\\n\"));\n        state.have = 0;\n        state.mode = CODELENS;\n        /* falls through */\n      case CODELENS:\n        while (state.have < state.nlen + state.ndist) {\n          for (;;) {\n            here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n            here_bits = here >>> 24;\n            here_op = (here >>> 16) & 0xff;\n            here_val = here & 0xffff;\n\n            if ((here_bits) <= bits) { break; }\n            //--- PULLBYTE() ---//\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n            //---//\n          }\n          if (here_val < 16) {\n            //--- DROPBITS(here.bits) ---//\n            hold >>>= here_bits;\n            bits -= here_bits;\n            //---//\n            state.lens[state.have++] = here_val;\n          }\n          else {\n            if (here_val === 16) {\n              //=== NEEDBITS(here.bits + 2);\n              n = here_bits + 2;\n              while (bits < n) {\n                if (have === 0) { break inf_leave; }\n                have--;\n                hold += input[next++] << bits;\n                bits += 8;\n              }\n              //===//\n              //--- DROPBITS(here.bits) ---//\n              hold >>>= here_bits;\n              bits -= here_bits;\n              //---//\n              if (state.have === 0) {\n                strm.msg = 'invalid bit length repeat';\n                state.mode = BAD;\n                break;\n              }\n              len = state.lens[state.have - 1];\n              copy = 3 + (hold & 0x03);//BITS(2);\n              //--- DROPBITS(2) ---//\n              hold >>>= 2;\n              bits -= 2;\n              //---//\n            }\n            else if (here_val === 17) {\n              //=== NEEDBITS(here.bits + 3);\n              n = here_bits + 3;\n              while (bits < n) {\n                if (have === 0) { break inf_leave; }\n                have--;\n                hold += input[next++] << bits;\n                bits += 8;\n              }\n              //===//\n              //--- DROPBITS(here.bits) ---//\n              hold >>>= here_bits;\n              bits -= here_bits;\n              //---//\n              len = 0;\n              copy = 3 + (hold & 0x07);//BITS(3);\n              //--- DROPBITS(3) ---//\n              hold >>>= 3;\n              bits -= 3;\n              //---//\n            }\n            else {\n              //=== NEEDBITS(here.bits + 7);\n              n = here_bits + 7;\n              while (bits < n) {\n                if (have === 0) { break inf_leave; }\n                have--;\n                hold += input[next++] << bits;\n                bits += 8;\n              }\n              //===//\n              //--- DROPBITS(here.bits) ---//\n              hold >>>= here_bits;\n              bits -= here_bits;\n              //---//\n              len = 0;\n              copy = 11 + (hold & 0x7f);//BITS(7);\n              //--- DROPBITS(7) ---//\n              hold >>>= 7;\n              bits -= 7;\n              //---//\n            }\n            if (state.have + copy > state.nlen + state.ndist) {\n              strm.msg = 'invalid bit length repeat';\n              state.mode = BAD;\n              break;\n            }\n            while (copy--) {\n              state.lens[state.have++] = len;\n            }\n          }\n        }\n\n        /* handle error breaks in while */\n        if (state.mode === BAD) { break; }\n\n        /* check for end-of-block code (better have one) */\n        if (state.lens[256] === 0) {\n          strm.msg = 'invalid code -- missing end-of-block';\n          state.mode = BAD;\n          break;\n        }\n\n        /* build code tables -- note: do not change the lenbits or distbits\n           values here (9 and 6) without reading the comments in inftrees.h\n           concerning the ENOUGH constants, which depend on those values */\n        state.lenbits = 9;\n\n        opts = { bits: state.lenbits };\n        ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n        // We have separate tables & no pointers. 2 commented lines below not needed.\n        // state.next_index = opts.table_index;\n        state.lenbits = opts.bits;\n        // state.lencode = state.next;\n\n        if (ret) {\n          strm.msg = 'invalid literal/lengths set';\n          state.mode = BAD;\n          break;\n        }\n\n        state.distbits = 6;\n        //state.distcode.copy(state.codes);\n        // Switch to use dynamic table\n        state.distcode = state.distdyn;\n        opts = { bits: state.distbits };\n        ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n        // We have separate tables & no pointers. 2 commented lines below not needed.\n        // state.next_index = opts.table_index;\n        state.distbits = opts.bits;\n        // state.distcode = state.next;\n\n        if (ret) {\n          strm.msg = 'invalid distances set';\n          state.mode = BAD;\n          break;\n        }\n        //Tracev((stderr, 'inflate:       codes ok\\n'));\n        state.mode = LEN_;\n        if (flush === Z_TREES) { break inf_leave; }\n        /* falls through */\n      case LEN_:\n        state.mode = LEN;\n        /* falls through */\n      case LEN:\n        if (have >= 6 && left >= 258) {\n          //--- RESTORE() ---\n          strm.next_out = put;\n          strm.avail_out = left;\n          strm.next_in = next;\n          strm.avail_in = have;\n          state.hold = hold;\n          state.bits = bits;\n          //---\n          inflate_fast(strm, _out);\n          //--- LOAD() ---\n          put = strm.next_out;\n          output = strm.output;\n          left = strm.avail_out;\n          next = strm.next_in;\n          input = strm.input;\n          have = strm.avail_in;\n          hold = state.hold;\n          bits = state.bits;\n          //---\n\n          if (state.mode === TYPE) {\n            state.back = -1;\n          }\n          break;\n        }\n        state.back = 0;\n        for (;;) {\n          here = state.lencode[hold & ((1 << state.lenbits) - 1)];  /*BITS(state.lenbits)*/\n          here_bits = here >>> 24;\n          here_op = (here >>> 16) & 0xff;\n          here_val = here & 0xffff;\n\n          if (here_bits <= bits) { break; }\n          //--- PULLBYTE() ---//\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n          //---//\n        }\n        if (here_op && (here_op & 0xf0) === 0) {\n          last_bits = here_bits;\n          last_op = here_op;\n          last_val = here_val;\n          for (;;) {\n            here = state.lencode[last_val +\n                    ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n            here_bits = here >>> 24;\n            here_op = (here >>> 16) & 0xff;\n            here_val = here & 0xffff;\n\n            if ((last_bits + here_bits) <= bits) { break; }\n            //--- PULLBYTE() ---//\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n            //---//\n          }\n          //--- DROPBITS(last.bits) ---//\n          hold >>>= last_bits;\n          bits -= last_bits;\n          //---//\n          state.back += last_bits;\n        }\n        //--- DROPBITS(here.bits) ---//\n        hold >>>= here_bits;\n        bits -= here_bits;\n        //---//\n        state.back += here_bits;\n        state.length = here_val;\n        if (here_op === 0) {\n          //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n          //        \"inflate:         literal '%c'\\n\" :\n          //        \"inflate:         literal 0x%02x\\n\", here.val));\n          state.mode = LIT;\n          break;\n        }\n        if (here_op & 32) {\n          //Tracevv((stderr, \"inflate:         end of block\\n\"));\n          state.back = -1;\n          state.mode = TYPE;\n          break;\n        }\n        if (here_op & 64) {\n          strm.msg = 'invalid literal/length code';\n          state.mode = BAD;\n          break;\n        }\n        state.extra = here_op & 15;\n        state.mode = LENEXT;\n        /* falls through */\n      case LENEXT:\n        if (state.extra) {\n          //=== NEEDBITS(state.extra);\n          n = state.extra;\n          while (bits < n) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n          //--- DROPBITS(state.extra) ---//\n          hold >>>= state.extra;\n          bits -= state.extra;\n          //---//\n          state.back += state.extra;\n        }\n        //Tracevv((stderr, \"inflate:         length %u\\n\", state.length));\n        state.was = state.length;\n        state.mode = DIST;\n        /* falls through */\n      case DIST:\n        for (;;) {\n          here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n          here_bits = here >>> 24;\n          here_op = (here >>> 16) & 0xff;\n          here_val = here & 0xffff;\n\n          if ((here_bits) <= bits) { break; }\n          //--- PULLBYTE() ---//\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n          //---//\n        }\n        if ((here_op & 0xf0) === 0) {\n          last_bits = here_bits;\n          last_op = here_op;\n          last_val = here_val;\n          for (;;) {\n            here = state.distcode[last_val +\n                    ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n            here_bits = here >>> 24;\n            here_op = (here >>> 16) & 0xff;\n            here_val = here & 0xffff;\n\n            if ((last_bits + here_bits) <= bits) { break; }\n            //--- PULLBYTE() ---//\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n            //---//\n          }\n          //--- DROPBITS(last.bits) ---//\n          hold >>>= last_bits;\n          bits -= last_bits;\n          //---//\n          state.back += last_bits;\n        }\n        //--- DROPBITS(here.bits) ---//\n        hold >>>= here_bits;\n        bits -= here_bits;\n        //---//\n        state.back += here_bits;\n        if (here_op & 64) {\n          strm.msg = 'invalid distance code';\n          state.mode = BAD;\n          break;\n        }\n        state.offset = here_val;\n        state.extra = (here_op) & 15;\n        state.mode = DISTEXT;\n        /* falls through */\n      case DISTEXT:\n        if (state.extra) {\n          //=== NEEDBITS(state.extra);\n          n = state.extra;\n          while (bits < n) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n          //--- DROPBITS(state.extra) ---//\n          hold >>>= state.extra;\n          bits -= state.extra;\n          //---//\n          state.back += state.extra;\n        }\n//#ifdef INFLATE_STRICT\n        if (state.offset > state.dmax) {\n          strm.msg = 'invalid distance too far back';\n          state.mode = BAD;\n          break;\n        }\n//#endif\n        //Tracevv((stderr, \"inflate:         distance %u\\n\", state.offset));\n        state.mode = MATCH;\n        /* falls through */\n      case MATCH:\n        if (left === 0) { break inf_leave; }\n        copy = _out - left;\n        if (state.offset > copy) {         /* copy from window */\n          copy = state.offset - copy;\n          if (copy > state.whave) {\n            if (state.sane) {\n              strm.msg = 'invalid distance too far back';\n              state.mode = BAD;\n              break;\n            }\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n//          Trace((stderr, \"inflate.c too far\\n\"));\n//          copy -= state.whave;\n//          if (copy > state.length) { copy = state.length; }\n//          if (copy > left) { copy = left; }\n//          left -= copy;\n//          state.length -= copy;\n//          do {\n//            output[put++] = 0;\n//          } while (--copy);\n//          if (state.length === 0) { state.mode = LEN; }\n//          break;\n//#endif\n          }\n          if (copy > state.wnext) {\n            copy -= state.wnext;\n            from = state.wsize - copy;\n          }\n          else {\n            from = state.wnext - copy;\n          }\n          if (copy > state.length) { copy = state.length; }\n          from_source = state.window;\n        }\n        else {                              /* copy from output */\n          from_source = output;\n          from = put - state.offset;\n          copy = state.length;\n        }\n        if (copy > left) { copy = left; }\n        left -= copy;\n        state.length -= copy;\n        do {\n          output[put++] = from_source[from++];\n        } while (--copy);\n        if (state.length === 0) { state.mode = LEN; }\n        break;\n      case LIT:\n        if (left === 0) { break inf_leave; }\n        output[put++] = state.length;\n        left--;\n        state.mode = LEN;\n        break;\n      case CHECK:\n        if (state.wrap) {\n          //=== NEEDBITS(32);\n          while (bits < 32) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            // Use '|' instead of '+' to make sure that result is signed\n            hold |= input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          _out -= left;\n          strm.total_out += _out;\n          state.total += _out;\n          if (_out) {\n            strm.adler = state.check =\n                /*UPDATE(state.check, put - _out, _out);*/\n                (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));\n\n          }\n          _out = left;\n          // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n          if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n            strm.msg = 'incorrect data check';\n            state.mode = BAD;\n            break;\n          }\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n          //Tracev((stderr, \"inflate:   check matches trailer\\n\"));\n        }\n        state.mode = LENGTH;\n        /* falls through */\n      case LENGTH:\n        if (state.wrap && state.flags) {\n          //=== NEEDBITS(32);\n          while (bits < 32) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          if (hold !== (state.total & 0xffffffff)) {\n            strm.msg = 'incorrect length check';\n            state.mode = BAD;\n            break;\n          }\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n          //Tracev((stderr, \"inflate:   length matches trailer\\n\"));\n        }\n        state.mode = DONE;\n        /* falls through */\n      case DONE:\n        ret = Z_STREAM_END;\n        break inf_leave;\n      case BAD:\n        ret = Z_DATA_ERROR;\n        break inf_leave;\n      case MEM:\n        return Z_MEM_ERROR;\n      case SYNC:\n        /* falls through */\n      default:\n        return Z_STREAM_ERROR;\n    }\n  }\n\n  // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n  /*\n     Return from inflate(), updating the total counts and the check value.\n     If there was no progress during the inflate() call, return a buffer\n     error.  Call updatewindow() to create and/or update the window state.\n     Note: a memory error from inflate() is non-recoverable.\n   */\n\n  //--- RESTORE() ---\n  strm.next_out = put;\n  strm.avail_out = left;\n  strm.next_in = next;\n  strm.avail_in = have;\n  state.hold = hold;\n  state.bits = bits;\n  //---\n\n  if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n                      (state.mode < CHECK || flush !== Z_FINISH))) {\n    if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {\n      state.mode = MEM;\n      return Z_MEM_ERROR;\n    }\n  }\n  _in -= strm.avail_in;\n  _out -= strm.avail_out;\n  strm.total_in += _in;\n  strm.total_out += _out;\n  state.total += _out;\n  if (state.wrap && _out) {\n    strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n      (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));\n  }\n  strm.data_type = state.bits + (state.last ? 64 : 0) +\n                    (state.mode === TYPE ? 128 : 0) +\n                    (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n  if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {\n    ret = Z_BUF_ERROR;\n  }\n  return ret;\n}\n\nfunction inflateEnd(strm) {\n\n  if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n    return Z_STREAM_ERROR;\n  }\n\n  var state = strm.state;\n  if (state.window) {\n    state.window = null;\n  }\n  strm.state = null;\n  return Z_OK;\n}\n\nfunction inflateGetHeader(strm, head) {\n  var state;\n\n  /* check state */\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  state = strm.state;\n  if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }\n\n  /* save header structure */\n  state.head = head;\n  head.done = false;\n  return Z_OK;\n}\n\nfunction inflateSetDictionary(strm, dictionary) {\n  var dictLength = dictionary.length;\n\n  var state;\n  var dictid;\n  var ret;\n\n  /* check state */\n  if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; }\n  state = strm.state;\n\n  if (state.wrap !== 0 && state.mode !== DICT) {\n    return Z_STREAM_ERROR;\n  }\n\n  /* check for correct dictionary identifier */\n  if (state.mode === DICT) {\n    dictid = 1; /* adler32(0, null, 0)*/\n    /* dictid = adler32(dictid, dictionary, dictLength); */\n    dictid = adler32(dictid, dictionary, dictLength, 0);\n    if (dictid !== state.check) {\n      return Z_DATA_ERROR;\n    }\n  }\n  /* copy dictionary to window using updatewindow(), which will amend the\n   existing dictionary if appropriate */\n  ret = updatewindow(strm, dictionary, dictLength, dictLength);\n  if (ret) {\n    state.mode = MEM;\n    return Z_MEM_ERROR;\n  }\n  state.havedict = 1;\n  // Tracev((stderr, \"inflate:   dictionary set\\n\"));\n  return Z_OK;\n}\n\nexports.inflateReset = inflateReset;\nexports.inflateReset2 = inflateReset2;\nexports.inflateResetKeep = inflateResetKeep;\nexports.inflateInit = inflateInit;\nexports.inflateInit2 = inflateInit2;\nexports.inflate = inflate;\nexports.inflateEnd = inflateEnd;\nexports.inflateGetHeader = inflateGetHeader;\nexports.inflateSetDictionary = inflateSetDictionary;\nexports.inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nexports.inflateCopy = inflateCopy;\nexports.inflateGetDictionary = inflateGetDictionary;\nexports.inflateMark = inflateMark;\nexports.inflatePrime = inflatePrime;\nexports.inflateSync = inflateSync;\nexports.inflateSyncPoint = inflateSyncPoint;\nexports.inflateUndermine = inflateUndermine;\n*/\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\n\nvar MAXBITS = 15;\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\nvar lbase = [ /* Length codes 257..285 base */\n  3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n  35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n];\n\nvar lext = [ /* Length codes 257..285 extra */\n  16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n  19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n];\n\nvar dbase = [ /* Distance codes 0..29 base */\n  1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n  257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n  8193, 12289, 16385, 24577, 0, 0\n];\n\nvar dext = [ /* Distance codes 0..29 extra */\n  16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n  23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n  28, 28, 29, 29, 64, 64\n];\n\nmodule.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts)\n{\n  var bits = opts.bits;\n      //here = opts.here; /* table entry for duplication */\n\n  var len = 0;               /* a code's length in bits */\n  var sym = 0;               /* index of code symbols */\n  var min = 0, max = 0;          /* minimum and maximum code lengths */\n  var root = 0;              /* number of index bits for root table */\n  var curr = 0;              /* number of index bits for current table */\n  var drop = 0;              /* code bits to drop for sub-table */\n  var left = 0;                   /* number of prefix codes available */\n  var used = 0;              /* code entries in table used */\n  var huff = 0;              /* Huffman code */\n  var incr;              /* for incrementing code, index */\n  var fill;              /* index for replicating entries */\n  var low;               /* low bits for current root entry */\n  var mask;              /* mask for low root bits */\n  var next;             /* next available space in table */\n  var base = null;     /* base value table to use */\n  var base_index = 0;\n//  var shoextra;    /* extra bits table to use */\n  var end;                    /* use base and extra for symbol > end */\n  var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1];    /* number of codes of each length */\n  var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1];     /* offsets in table for each length */\n  var extra = null;\n  var extra_index = 0;\n\n  var here_bits, here_op, here_val;\n\n  /*\n   Process a set of code lengths to create a canonical Huffman code.  The\n   code lengths are lens[0..codes-1].  Each length corresponds to the\n   symbols 0..codes-1.  The Huffman code is generated by first sorting the\n   symbols by length from short to long, and retaining the symbol order\n   for codes with equal lengths.  Then the code starts with all zero bits\n   for the first code of the shortest length, and the codes are integer\n   increments for the same length, and zeros are appended as the length\n   increases.  For the deflate format, these bits are stored backwards\n   from their more natural integer increment ordering, and so when the\n   decoding tables are built in the large loop below, the integer codes\n   are incremented backwards.\n\n   This routine assumes, but does not check, that all of the entries in\n   lens[] are in the range 0..MAXBITS.  The caller must assure this.\n   1..MAXBITS is interpreted as that code length.  zero means that that\n   symbol does not occur in this code.\n\n   The codes are sorted by computing a count of codes for each length,\n   creating from that a table of starting indices for each length in the\n   sorted table, and then entering the symbols in order in the sorted\n   table.  The sorted table is work[], with that space being provided by\n   the caller.\n\n   The length counts are used for other purposes as well, i.e. finding\n   the minimum and maximum length codes, determining if there are any\n   codes at all, checking for a valid set of lengths, and looking ahead\n   at length counts to determine sub-table sizes when building the\n   decoding tables.\n   */\n\n  /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n  for (len = 0; len <= MAXBITS; len++) {\n    count[len] = 0;\n  }\n  for (sym = 0; sym < codes; sym++) {\n    count[lens[lens_index + sym]]++;\n  }\n\n  /* bound code lengths, force root to be within code lengths */\n  root = bits;\n  for (max = MAXBITS; max >= 1; max--) {\n    if (count[max] !== 0) { break; }\n  }\n  if (root > max) {\n    root = max;\n  }\n  if (max === 0) {                     /* no symbols to code at all */\n    //table.op[opts.table_index] = 64;  //here.op = (var char)64;    /* invalid code marker */\n    //table.bits[opts.table_index] = 1;   //here.bits = (var char)1;\n    //table.val[opts.table_index++] = 0;   //here.val = (var short)0;\n    table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n    //table.op[opts.table_index] = 64;\n    //table.bits[opts.table_index] = 1;\n    //table.val[opts.table_index++] = 0;\n    table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n    opts.bits = 1;\n    return 0;     /* no symbols, but wait for decoding to report error */\n  }\n  for (min = 1; min < max; min++) {\n    if (count[min] !== 0) { break; }\n  }\n  if (root < min) {\n    root = min;\n  }\n\n  /* check for an over-subscribed or incomplete set of lengths */\n  left = 1;\n  for (len = 1; len <= MAXBITS; len++) {\n    left <<= 1;\n    left -= count[len];\n    if (left < 0) {\n      return -1;\n    }        /* over-subscribed */\n  }\n  if (left > 0 && (type === CODES || max !== 1)) {\n    return -1;                      /* incomplete set */\n  }\n\n  /* generate offsets into symbol table for each length for sorting */\n  offs[1] = 0;\n  for (len = 1; len < MAXBITS; len++) {\n    offs[len + 1] = offs[len] + count[len];\n  }\n\n  /* sort symbols by length, by symbol order within each length */\n  for (sym = 0; sym < codes; sym++) {\n    if (lens[lens_index + sym] !== 0) {\n      work[offs[lens[lens_index + sym]]++] = sym;\n    }\n  }\n\n  /*\n   Create and fill in decoding tables.  In this loop, the table being\n   filled is at next and has curr index bits.  The code being used is huff\n   with length len.  That code is converted to an index by dropping drop\n   bits off of the bottom.  For codes where len is less than drop + curr,\n   those top drop + curr - len bits are incremented through all values to\n   fill the table with replicated entries.\n\n   root is the number of index bits for the root table.  When len exceeds\n   root, sub-tables are created pointed to by the root entry with an index\n   of the low root bits of huff.  This is saved in low to check for when a\n   new sub-table should be started.  drop is zero when the root table is\n   being filled, and drop is root when sub-tables are being filled.\n\n   When a new sub-table is needed, it is necessary to look ahead in the\n   code lengths to determine what size sub-table is needed.  The length\n   counts are used for this, and so count[] is decremented as codes are\n   entered in the tables.\n\n   used keeps track of how many table entries have been allocated from the\n   provided *table space.  It is checked for LENS and DIST tables against\n   the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n   the initial root table size constants.  See the comments in inftrees.h\n   for more information.\n\n   sym increments through all symbols, and the loop terminates when\n   all codes of length max, i.e. all codes, have been processed.  This\n   routine permits incomplete codes, so another loop after this one fills\n   in the rest of the decoding tables with invalid code markers.\n   */\n\n  /* set up for code type */\n  // poor man optimization - use if-else instead of switch,\n  // to avoid deopts in old v8\n  if (type === CODES) {\n    base = extra = work;    /* dummy value--not used */\n    end = 19;\n\n  } else if (type === LENS) {\n    base = lbase;\n    base_index -= 257;\n    extra = lext;\n    extra_index -= 257;\n    end = 256;\n\n  } else {                    /* DISTS */\n    base = dbase;\n    extra = dext;\n    end = -1;\n  }\n\n  /* initialize opts for loop */\n  huff = 0;                   /* starting code */\n  sym = 0;                    /* starting code symbol */\n  len = min;                  /* starting code length */\n  next = table_index;              /* current table to fill in */\n  curr = root;                /* current table index bits */\n  drop = 0;                   /* current bits to drop from code for index */\n  low = -1;                   /* trigger new sub-table when len > root */\n  used = 1 << root;          /* use root table entries */\n  mask = used - 1;            /* mask for comparing low */\n\n  /* check available table space */\n  if ((type === LENS && used > ENOUGH_LENS) ||\n    (type === DISTS && used > ENOUGH_DISTS)) {\n    return 1;\n  }\n\n  /* process all codes and make table entries */\n  for (;;) {\n    /* create table entry */\n    here_bits = len - drop;\n    if (work[sym] < end) {\n      here_op = 0;\n      here_val = work[sym];\n    }\n    else if (work[sym] > end) {\n      here_op = extra[extra_index + work[sym]];\n      here_val = base[base_index + work[sym]];\n    }\n    else {\n      here_op = 32 + 64;         /* end of block */\n      here_val = 0;\n    }\n\n    /* replicate for those indices with low len bits equal to huff */\n    incr = 1 << (len - drop);\n    fill = 1 << curr;\n    min = fill;                 /* save offset to next table */\n    do {\n      fill -= incr;\n      table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n    } while (fill !== 0);\n\n    /* backwards increment the len-bit code huff */\n    incr = 1 << (len - 1);\n    while (huff & incr) {\n      incr >>= 1;\n    }\n    if (incr !== 0) {\n      huff &= incr - 1;\n      huff += incr;\n    } else {\n      huff = 0;\n    }\n\n    /* go to next symbol, update count, len */\n    sym++;\n    if (--count[len] === 0) {\n      if (len === max) { break; }\n      len = lens[lens_index + work[sym]];\n    }\n\n    /* create new sub-table if needed */\n    if (len > root && (huff & mask) !== low) {\n      /* if first time, transition to sub-tables */\n      if (drop === 0) {\n        drop = root;\n      }\n\n      /* increment past last table */\n      next += min;            /* here min is 1 << curr */\n\n      /* determine length of next table */\n      curr = len - drop;\n      left = 1 << curr;\n      while (curr + drop < max) {\n        left -= count[curr + drop];\n        if (left <= 0) { break; }\n        curr++;\n        left <<= 1;\n      }\n\n      /* check for enough space */\n      used += 1 << curr;\n      if ((type === LENS && used > ENOUGH_LENS) ||\n        (type === DISTS && used > ENOUGH_DISTS)) {\n        return 1;\n      }\n\n      /* point entry in root table to sub-table */\n      low = huff & mask;\n      /*table.op[low] = curr;\n      table.bits[low] = root;\n      table.val[low] = next - opts.table_index;*/\n      table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n    }\n  }\n\n  /* fill in remaining table entry if code is incomplete (guaranteed to have\n   at most one remaining entry, since if the code is incomplete, the\n   maximum code length that was allowed to get this far is one bit) */\n  if (huff !== 0) {\n    //table.op[next + huff] = 64;            /* invalid code marker */\n    //table.bits[next + huff] = len - drop;\n    //table.val[next + huff] = 0;\n    table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n  }\n\n  /* set return parameters */\n  //opts.table_index += used;\n  opts.bits = root;\n  return 0;\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n  2:      'need dictionary',     /* Z_NEED_DICT       2  */\n  1:      'stream end',          /* Z_STREAM_END      1  */\n  0:      '',                    /* Z_OK              0  */\n  '-1':   'file error',          /* Z_ERRNO         (-1) */\n  '-2':   'stream error',        /* Z_STREAM_ERROR  (-2) */\n  '-3':   'data error',          /* Z_DATA_ERROR    (-3) */\n  '-4':   'insufficient memory', /* Z_MEM_ERROR     (-4) */\n  '-5':   'buffer error',        /* Z_BUF_ERROR     (-5) */\n  '-6':   'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//var Z_FILTERED          = 1;\n//var Z_HUFFMAN_ONLY      = 2;\n//var Z_RLE               = 3;\nvar Z_FIXED               = 4;\n//var Z_DEFAULT_STRATEGY  = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nvar Z_BINARY              = 0;\nvar Z_TEXT                = 1;\n//var Z_ASCII             = 1; // = Z_TEXT\nvar Z_UNKNOWN             = 2;\n\n/*============================================================================*/\n\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n// From zutil.h\n\nvar STORED_BLOCK = 0;\nvar STATIC_TREES = 1;\nvar DYN_TREES    = 2;\n/* The three kinds of block type */\n\nvar MIN_MATCH    = 3;\nvar MAX_MATCH    = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nvar LENGTH_CODES  = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nvar LITERALS      = 256;\n/* number of literal bytes 0..255 */\n\nvar L_CODES       = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nvar D_CODES       = 30;\n/* number of distance codes */\n\nvar BL_CODES      = 19;\n/* number of codes used to transfer the bit lengths */\n\nvar HEAP_SIZE     = 2 * L_CODES + 1;\n/* maximum heap size */\n\nvar MAX_BITS      = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar Buf_size      = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nvar MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nvar END_BLOCK   = 256;\n/* end of block literal code */\n\nvar REP_3_6     = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nvar REPZ_3_10   = 17;\n/* repeat a zero length 3-10 times  (3 bits of repeat count) */\n\nvar REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times  (7 bits of repeat count) */\n\n/* eslint-disable comma-spacing,array-bracket-spacing */\nvar extra_lbits =   /* extra bits for each length code */\n  [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];\n\nvar extra_dbits =   /* extra bits for each distance code */\n  [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];\n\nvar extra_blbits =  /* extra bits for each bit length code */\n  [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];\n\nvar bl_order =\n  [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];\n/* eslint-enable comma-spacing,array-bracket-spacing */\n\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nvar DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1\nvar static_ltree  = new Array((L_CODES + 2) * 2);\nzero(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nvar static_dtree  = new Array(D_CODES * 2);\nzero(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nvar _dist_code    = new Array(DIST_CODE_LEN);\nzero(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nvar _length_code  = new Array(MAX_MATCH - MIN_MATCH + 1);\nzero(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nvar base_length   = new Array(LENGTH_CODES);\nzero(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nvar base_dist     = new Array(D_CODES);\nzero(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nfunction StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n\n  this.static_tree  = static_tree;  /* static tree or NULL */\n  this.extra_bits   = extra_bits;   /* extra bits for each code or NULL */\n  this.extra_base   = extra_base;   /* base index for extra_bits */\n  this.elems        = elems;        /* max number of elements in the tree */\n  this.max_length   = max_length;   /* max bit length for the codes */\n\n  // show if `static_tree` has data or dummy - needed for monomorphic objects\n  this.has_stree    = static_tree && static_tree.length;\n}\n\n\nvar static_l_desc;\nvar static_d_desc;\nvar static_bl_desc;\n\n\nfunction TreeDesc(dyn_tree, stat_desc) {\n  this.dyn_tree = dyn_tree;     /* the dynamic tree */\n  this.max_code = 0;            /* largest code with non zero frequency */\n  this.stat_desc = stat_desc;   /* the corresponding static tree */\n}\n\n\n\nfunction d_code(dist) {\n  return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n}\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nfunction put_short(s, w) {\n//    put_byte(s, (uch)((w) & 0xff));\n//    put_byte(s, (uch)((ush)(w) >> 8));\n  s.pending_buf[s.pending++] = (w) & 0xff;\n  s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n}\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nfunction send_bits(s, value, length) {\n  if (s.bi_valid > (Buf_size - length)) {\n    s.bi_buf |= (value << s.bi_valid) & 0xffff;\n    put_short(s, s.bi_buf);\n    s.bi_buf = value >> (Buf_size - s.bi_valid);\n    s.bi_valid += length - Buf_size;\n  } else {\n    s.bi_buf |= (value << s.bi_valid) & 0xffff;\n    s.bi_valid += length;\n  }\n}\n\n\nfunction send_code(s, c, tree) {\n  send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);\n}\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nfunction bi_reverse(code, len) {\n  var res = 0;\n  do {\n    res |= code & 1;\n    code >>>= 1;\n    res <<= 1;\n  } while (--len > 0);\n  return res >>> 1;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nfunction bi_flush(s) {\n  if (s.bi_valid === 16) {\n    put_short(s, s.bi_buf);\n    s.bi_buf = 0;\n    s.bi_valid = 0;\n\n  } else if (s.bi_valid >= 8) {\n    s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n    s.bi_buf >>= 8;\n    s.bi_valid -= 8;\n  }\n}\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n *    above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n *     array bl_count contains the frequencies for each bit length.\n *     The length opt_len is updated; static_len is also updated if stree is\n *     not null.\n */\nfunction gen_bitlen(s, desc)\n//    deflate_state *s;\n//    tree_desc *desc;    /* the tree descriptor */\n{\n  var tree            = desc.dyn_tree;\n  var max_code        = desc.max_code;\n  var stree           = desc.stat_desc.static_tree;\n  var has_stree       = desc.stat_desc.has_stree;\n  var extra           = desc.stat_desc.extra_bits;\n  var base            = desc.stat_desc.extra_base;\n  var max_length      = desc.stat_desc.max_length;\n  var h;              /* heap index */\n  var n, m;           /* iterate over the tree elements */\n  var bits;           /* bit length */\n  var xbits;          /* extra bits */\n  var f;              /* frequency */\n  var overflow = 0;   /* number of elements with bit length too large */\n\n  for (bits = 0; bits <= MAX_BITS; bits++) {\n    s.bl_count[bits] = 0;\n  }\n\n  /* In a first pass, compute the optimal bit lengths (which may\n   * overflow in the case of the bit length tree).\n   */\n  tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */\n\n  for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n    n = s.heap[h];\n    bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;\n    if (bits > max_length) {\n      bits = max_length;\n      overflow++;\n    }\n    tree[n * 2 + 1]/*.Len*/ = bits;\n    /* We overwrite tree[n].Dad which is no longer needed */\n\n    if (n > max_code) { continue; } /* not a leaf node */\n\n    s.bl_count[bits]++;\n    xbits = 0;\n    if (n >= base) {\n      xbits = extra[n - base];\n    }\n    f = tree[n * 2]/*.Freq*/;\n    s.opt_len += f * (bits + xbits);\n    if (has_stree) {\n      s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);\n    }\n  }\n  if (overflow === 0) { return; }\n\n  // Trace((stderr,\"\\nbit length overflow\\n\"));\n  /* This happens for example on obj2 and pic of the Calgary corpus */\n\n  /* Find the first bit length which could increase: */\n  do {\n    bits = max_length - 1;\n    while (s.bl_count[bits] === 0) { bits--; }\n    s.bl_count[bits]--;      /* move one leaf down the tree */\n    s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */\n    s.bl_count[max_length]--;\n    /* The brother of the overflow item also moves one step up,\n     * but this does not affect bl_count[max_length]\n     */\n    overflow -= 2;\n  } while (overflow > 0);\n\n  /* Now recompute all bit lengths, scanning in increasing frequency.\n   * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n   * lengths instead of fixing only the wrong ones. This idea is taken\n   * from 'ar' written by Haruhiko Okumura.)\n   */\n  for (bits = max_length; bits !== 0; bits--) {\n    n = s.bl_count[bits];\n    while (n !== 0) {\n      m = s.heap[--h];\n      if (m > max_code) { continue; }\n      if (tree[m * 2 + 1]/*.Len*/ !== bits) {\n        // Trace((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n        s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;\n        tree[m * 2 + 1]/*.Len*/ = bits;\n      }\n      n--;\n    }\n  }\n}\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n *     zero code length.\n */\nfunction gen_codes(tree, max_code, bl_count)\n//    ct_data *tree;             /* the tree to decorate */\n//    int max_code;              /* largest code with non zero frequency */\n//    ushf *bl_count;            /* number of codes at each bit length */\n{\n  var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */\n  var code = 0;              /* running code value */\n  var bits;                  /* bit index */\n  var n;                     /* code index */\n\n  /* The distribution counts are first used to generate the code values\n   * without bit reversal.\n   */\n  for (bits = 1; bits <= MAX_BITS; bits++) {\n    next_code[bits] = code = (code + bl_count[bits - 1]) << 1;\n  }\n  /* Check that the bit counts in bl_count are consistent. The last code\n   * must be all ones.\n   */\n  //Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,\n  //        \"inconsistent bit counts\");\n  //Tracev((stderr,\"\\ngen_codes: max_code %d \", max_code));\n\n  for (n = 0;  n <= max_code; n++) {\n    var len = tree[n * 2 + 1]/*.Len*/;\n    if (len === 0) { continue; }\n    /* Now reverse the bits */\n    tree[n * 2]/*.Code*/ = bi_reverse(next_code[len]++, len);\n\n    //Tracecv(tree != static_ltree, (stderr,\"\\nn %3d %c l %2d c %4x (%x) \",\n    //     n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));\n  }\n}\n\n\n/* ===========================================================================\n * Initialize the various 'constant' tables.\n */\nfunction tr_static_init() {\n  var n;        /* iterates over tree elements */\n  var bits;     /* bit counter */\n  var length;   /* length value */\n  var code;     /* code value */\n  var dist;     /* distance index */\n  var bl_count = new Array(MAX_BITS + 1);\n  /* number of codes at each bit length for an optimal tree */\n\n  // do check in _tr_init()\n  //if (static_init_done) return;\n\n  /* For some embedded targets, global variables are not initialized: */\n/*#ifdef NO_INIT_GLOBAL_POINTERS\n  static_l_desc.static_tree = static_ltree;\n  static_l_desc.extra_bits = extra_lbits;\n  static_d_desc.static_tree = static_dtree;\n  static_d_desc.extra_bits = extra_dbits;\n  static_bl_desc.extra_bits = extra_blbits;\n#endif*/\n\n  /* Initialize the mapping length (0..255) -> length code (0..28) */\n  length = 0;\n  for (code = 0; code < LENGTH_CODES - 1; code++) {\n    base_length[code] = length;\n    for (n = 0; n < (1 << extra_lbits[code]); n++) {\n      _length_code[length++] = code;\n    }\n  }\n  //Assert (length == 256, \"tr_static_init: length != 256\");\n  /* Note that the length 255 (match length 258) can be represented\n   * in two different ways: code 284 + 5 bits or code 285, so we\n   * overwrite length_code[255] to use the best encoding:\n   */\n  _length_code[length - 1] = code;\n\n  /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n  dist = 0;\n  for (code = 0; code < 16; code++) {\n    base_dist[code] = dist;\n    for (n = 0; n < (1 << extra_dbits[code]); n++) {\n      _dist_code[dist++] = code;\n    }\n  }\n  //Assert (dist == 256, \"tr_static_init: dist != 256\");\n  dist >>= 7; /* from now on, all distances are divided by 128 */\n  for (; code < D_CODES; code++) {\n    base_dist[code] = dist << 7;\n    for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {\n      _dist_code[256 + dist++] = code;\n    }\n  }\n  //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n  /* Construct the codes of the static literal tree */\n  for (bits = 0; bits <= MAX_BITS; bits++) {\n    bl_count[bits] = 0;\n  }\n\n  n = 0;\n  while (n <= 143) {\n    static_ltree[n * 2 + 1]/*.Len*/ = 8;\n    n++;\n    bl_count[8]++;\n  }\n  while (n <= 255) {\n    static_ltree[n * 2 + 1]/*.Len*/ = 9;\n    n++;\n    bl_count[9]++;\n  }\n  while (n <= 279) {\n    static_ltree[n * 2 + 1]/*.Len*/ = 7;\n    n++;\n    bl_count[7]++;\n  }\n  while (n <= 287) {\n    static_ltree[n * 2 + 1]/*.Len*/ = 8;\n    n++;\n    bl_count[8]++;\n  }\n  /* Codes 286 and 287 do not exist, but we must include them in the\n   * tree construction to get a canonical Huffman tree (longest code\n   * all ones)\n   */\n  gen_codes(static_ltree, L_CODES + 1, bl_count);\n\n  /* The static distance tree is trivial: */\n  for (n = 0; n < D_CODES; n++) {\n    static_dtree[n * 2 + 1]/*.Len*/ = 5;\n    static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);\n  }\n\n  // Now data ready and we can init static trees\n  static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n  static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0,          D_CODES, MAX_BITS);\n  static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0,         BL_CODES, MAX_BL_BITS);\n\n  //static_init_done = true;\n}\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nfunction init_block(s) {\n  var n; /* iterates over tree elements */\n\n  /* Initialize the trees. */\n  for (n = 0; n < L_CODES;  n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }\n  for (n = 0; n < D_CODES;  n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }\n  for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }\n\n  s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;\n  s.opt_len = s.static_len = 0;\n  s.last_lit = s.matches = 0;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nfunction bi_windup(s)\n{\n  if (s.bi_valid > 8) {\n    put_short(s, s.bi_buf);\n  } else if (s.bi_valid > 0) {\n    //put_byte(s, (Byte)s->bi_buf);\n    s.pending_buf[s.pending++] = s.bi_buf;\n  }\n  s.bi_buf = 0;\n  s.bi_valid = 0;\n}\n\n/* ===========================================================================\n * Copy a stored block, storing first the length and its\n * one's complement if requested.\n */\nfunction copy_block(s, buf, len, header)\n//DeflateState *s;\n//charf    *buf;    /* the input data */\n//unsigned len;     /* its length */\n//int      header;  /* true if block header must be written */\n{\n  bi_windup(s);        /* align on byte boundary */\n\n  if (header) {\n    put_short(s, len);\n    put_short(s, ~len);\n  }\n//  while (len--) {\n//    put_byte(s, *buf++);\n//  }\n  utils.arraySet(s.pending_buf, s.window, buf, len, s.pending);\n  s.pending += len;\n}\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nfunction smaller(tree, n, m, depth) {\n  var _n2 = n * 2;\n  var _m2 = m * 2;\n  return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n         (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));\n}\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nfunction pqdownheap(s, tree, k)\n//    deflate_state *s;\n//    ct_data *tree;  /* the tree to restore */\n//    int k;               /* node to move down */\n{\n  var v = s.heap[k];\n  var j = k << 1;  /* left son of k */\n  while (j <= s.heap_len) {\n    /* Set j to the smallest of the two sons: */\n    if (j < s.heap_len &&\n      smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n      j++;\n    }\n    /* Exit if v is smaller than both sons */\n    if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n    /* Exchange v with the smallest son */\n    s.heap[k] = s.heap[j];\n    k = j;\n\n    /* And continue down the tree, setting j to the left son of k */\n    j <<= 1;\n  }\n  s.heap[k] = v;\n}\n\n\n// inlined manually\n// var SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nfunction compress_block(s, ltree, dtree)\n//    deflate_state *s;\n//    const ct_data *ltree; /* literal tree */\n//    const ct_data *dtree; /* distance tree */\n{\n  var dist;           /* distance of matched string */\n  var lc;             /* match length or unmatched char (if dist == 0) */\n  var lx = 0;         /* running index in l_buf */\n  var code;           /* the code to send */\n  var extra;          /* number of extra bits to send */\n\n  if (s.last_lit !== 0) {\n    do {\n      dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);\n      lc = s.pending_buf[s.l_buf + lx];\n      lx++;\n\n      if (dist === 0) {\n        send_code(s, lc, ltree); /* send a literal byte */\n        //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n      } else {\n        /* Here, lc is the match length - MIN_MATCH */\n        code = _length_code[lc];\n        send_code(s, code + LITERALS + 1, ltree); /* send the length code */\n        extra = extra_lbits[code];\n        if (extra !== 0) {\n          lc -= base_length[code];\n          send_bits(s, lc, extra);       /* send the extra length bits */\n        }\n        dist--; /* dist is now the match distance - 1 */\n        code = d_code(dist);\n        //Assert (code < D_CODES, \"bad d_code\");\n\n        send_code(s, code, dtree);       /* send the distance code */\n        extra = extra_dbits[code];\n        if (extra !== 0) {\n          dist -= base_dist[code];\n          send_bits(s, dist, extra);   /* send the extra distance bits */\n        }\n      } /* literal or match pair ? */\n\n      /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */\n      //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,\n      //       \"pendingBuf overflow\");\n\n    } while (lx < s.last_lit);\n  }\n\n  send_code(s, END_BLOCK, ltree);\n}\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n *     and corresponding code. The length opt_len is updated; static_len is\n *     also updated if stree is not null. The field max_code is set.\n */\nfunction build_tree(s, desc)\n//    deflate_state *s;\n//    tree_desc *desc; /* the tree descriptor */\n{\n  var tree     = desc.dyn_tree;\n  var stree    = desc.stat_desc.static_tree;\n  var has_stree = desc.stat_desc.has_stree;\n  var elems    = desc.stat_desc.elems;\n  var n, m;          /* iterate over heap elements */\n  var max_code = -1; /* largest code with non zero frequency */\n  var node;          /* new node being created */\n\n  /* Construct the initial heap, with least frequent element in\n   * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n   * heap[0] is not used.\n   */\n  s.heap_len = 0;\n  s.heap_max = HEAP_SIZE;\n\n  for (n = 0; n < elems; n++) {\n    if (tree[n * 2]/*.Freq*/ !== 0) {\n      s.heap[++s.heap_len] = max_code = n;\n      s.depth[n] = 0;\n\n    } else {\n      tree[n * 2 + 1]/*.Len*/ = 0;\n    }\n  }\n\n  /* The pkzip format requires that at least one distance code exists,\n   * and that at least one bit should be sent even if there is only one\n   * possible code. So to avoid special checks later on we force at least\n   * two codes of non zero frequency.\n   */\n  while (s.heap_len < 2) {\n    node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n    tree[node * 2]/*.Freq*/ = 1;\n    s.depth[node] = 0;\n    s.opt_len--;\n\n    if (has_stree) {\n      s.static_len -= stree[node * 2 + 1]/*.Len*/;\n    }\n    /* node is 0 or 1 so it does not have extra bits */\n  }\n  desc.max_code = max_code;\n\n  /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n   * establish sub-heaps of increasing lengths:\n   */\n  for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }\n\n  /* Construct the Huffman tree by repeatedly combining the least two\n   * frequent nodes.\n   */\n  node = elems;              /* next internal node of the tree */\n  do {\n    //pqremove(s, tree, n);  /* n = node of least frequency */\n    /*** pqremove ***/\n    n = s.heap[1/*SMALLEST*/];\n    s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];\n    pqdownheap(s, tree, 1/*SMALLEST*/);\n    /***/\n\n    m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */\n\n    s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n    s.heap[--s.heap_max] = m;\n\n    /* Create a new node father of n and m */\n    tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;\n    s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n    tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;\n\n    /* and insert the new node in the heap */\n    s.heap[1/*SMALLEST*/] = node++;\n    pqdownheap(s, tree, 1/*SMALLEST*/);\n\n  } while (s.heap_len >= 2);\n\n  s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];\n\n  /* At this point, the fields freq and dad are set. We can now\n   * generate the bit lengths.\n   */\n  gen_bitlen(s, desc);\n\n  /* The field len is now set, we can generate the bit codes */\n  gen_codes(tree, max_code, s.bl_count);\n}\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nfunction scan_tree(s, tree, max_code)\n//    deflate_state *s;\n//    ct_data *tree;   /* the tree to be scanned */\n//    int max_code;    /* and its largest code of non zero frequency */\n{\n  var n;                     /* iterates over all tree elements */\n  var prevlen = -1;          /* last emitted length */\n  var curlen;                /* length of current code */\n\n  var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n  var count = 0;             /* repeat count of the current code */\n  var max_count = 7;         /* max repeat count */\n  var min_count = 4;         /* min repeat count */\n\n  if (nextlen === 0) {\n    max_count = 138;\n    min_count = 3;\n  }\n  tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */\n\n  for (n = 0; n <= max_code; n++) {\n    curlen = nextlen;\n    nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n    if (++count < max_count && curlen === nextlen) {\n      continue;\n\n    } else if (count < min_count) {\n      s.bl_tree[curlen * 2]/*.Freq*/ += count;\n\n    } else if (curlen !== 0) {\n\n      if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }\n      s.bl_tree[REP_3_6 * 2]/*.Freq*/++;\n\n    } else if (count <= 10) {\n      s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;\n\n    } else {\n      s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;\n    }\n\n    count = 0;\n    prevlen = curlen;\n\n    if (nextlen === 0) {\n      max_count = 138;\n      min_count = 3;\n\n    } else if (curlen === nextlen) {\n      max_count = 6;\n      min_count = 3;\n\n    } else {\n      max_count = 7;\n      min_count = 4;\n    }\n  }\n}\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nfunction send_tree(s, tree, max_code)\n//    deflate_state *s;\n//    ct_data *tree; /* the tree to be scanned */\n//    int max_code;       /* and its largest code of non zero frequency */\n{\n  var n;                     /* iterates over all tree elements */\n  var prevlen = -1;          /* last emitted length */\n  var curlen;                /* length of current code */\n\n  var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n  var count = 0;             /* repeat count of the current code */\n  var max_count = 7;         /* max repeat count */\n  var min_count = 4;         /* min repeat count */\n\n  /* tree[max_code+1].Len = -1; */  /* guard already set */\n  if (nextlen === 0) {\n    max_count = 138;\n    min_count = 3;\n  }\n\n  for (n = 0; n <= max_code; n++) {\n    curlen = nextlen;\n    nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n    if (++count < max_count && curlen === nextlen) {\n      continue;\n\n    } else if (count < min_count) {\n      do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);\n\n    } else if (curlen !== 0) {\n      if (curlen !== prevlen) {\n        send_code(s, curlen, s.bl_tree);\n        count--;\n      }\n      //Assert(count >= 3 && count <= 6, \" 3_6?\");\n      send_code(s, REP_3_6, s.bl_tree);\n      send_bits(s, count - 3, 2);\n\n    } else if (count <= 10) {\n      send_code(s, REPZ_3_10, s.bl_tree);\n      send_bits(s, count - 3, 3);\n\n    } else {\n      send_code(s, REPZ_11_138, s.bl_tree);\n      send_bits(s, count - 11, 7);\n    }\n\n    count = 0;\n    prevlen = curlen;\n    if (nextlen === 0) {\n      max_count = 138;\n      min_count = 3;\n\n    } else if (curlen === nextlen) {\n      max_count = 6;\n      min_count = 3;\n\n    } else {\n      max_count = 7;\n      min_count = 4;\n    }\n  }\n}\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nfunction build_bl_tree(s) {\n  var max_blindex;  /* index of last bit length code of non zero freq */\n\n  /* Determine the bit length frequencies for literal and distance trees */\n  scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n  scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n  /* Build the bit length tree: */\n  build_tree(s, s.bl_desc);\n  /* opt_len now includes the length of the tree representations, except\n   * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n   */\n\n  /* Determine the number of bit length codes to send. The pkzip format\n   * requires that at least 4 bit length codes be sent. (appnote.txt says\n   * 3 but the actual value used is 4.)\n   */\n  for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n    if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {\n      break;\n    }\n  }\n  /* Update opt_len to include the bit length tree and counts */\n  s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n  //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n  //        s->opt_len, s->static_len));\n\n  return max_blindex;\n}\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nfunction send_all_trees(s, lcodes, dcodes, blcodes)\n//    deflate_state *s;\n//    int lcodes, dcodes, blcodes; /* number of codes for each tree */\n{\n  var rank;                    /* index in bl_order */\n\n  //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n  //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n  //        \"too many codes\");\n  //Tracev((stderr, \"\\nbl counts: \"));\n  send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */\n  send_bits(s, dcodes - 1,   5);\n  send_bits(s, blcodes - 4,  4); /* not -3 as stated in appnote.txt */\n  for (rank = 0; rank < blcodes; rank++) {\n    //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n    send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);\n  }\n  //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n  send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */\n  //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n  send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */\n  //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n}\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n *    a) There are no non-portable control characters belonging to the\n *       \"black list\" (0..6, 14..25, 28..31).\n *    b) There is at least one printable character belonging to the\n *       \"white list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n *   \"gray list\" that is ignored in this detection algorithm:\n *   (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nfunction detect_data_type(s) {\n  /* black_mask is the bit mask of black-listed bytes\n   * set bits 0..6, 14..25, and 28..31\n   * 0xf3ffc07f = binary 11110011111111111100000001111111\n   */\n  var black_mask = 0xf3ffc07f;\n  var n;\n\n  /* Check for non-textual (\"black-listed\") bytes. */\n  for (n = 0; n <= 31; n++, black_mask >>>= 1) {\n    if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {\n      return Z_BINARY;\n    }\n  }\n\n  /* Check for textual (\"white-listed\") bytes. */\n  if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||\n      s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {\n    return Z_TEXT;\n  }\n  for (n = 32; n < LITERALS; n++) {\n    if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {\n      return Z_TEXT;\n    }\n  }\n\n  /* There are no \"black-listed\" or \"white-listed\" bytes:\n   * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n   */\n  return Z_BINARY;\n}\n\n\nvar static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nfunction _tr_init(s)\n{\n\n  if (!static_init_done) {\n    tr_static_init();\n    static_init_done = true;\n  }\n\n  s.l_desc  = new TreeDesc(s.dyn_ltree, static_l_desc);\n  s.d_desc  = new TreeDesc(s.dyn_dtree, static_d_desc);\n  s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n  s.bi_buf = 0;\n  s.bi_valid = 0;\n\n  /* Initialize the first block of the first file: */\n  init_block(s);\n}\n\n\n/* ===========================================================================\n * Send a stored block\n */\nfunction _tr_stored_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf;       /* input block */\n//ulg stored_len;   /* length of input block */\n//int last;         /* one if this is the last block for a file */\n{\n  send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3);    /* send block type */\n  copy_block(s, buf, stored_len, true); /* with header */\n}\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nfunction _tr_align(s) {\n  send_bits(s, STATIC_TREES << 1, 3);\n  send_code(s, END_BLOCK, static_ltree);\n  bi_flush(s);\n}\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and output the encoded block to the zip file.\n */\nfunction _tr_flush_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf;       /* input block, or NULL if too old */\n//ulg stored_len;   /* length of input block */\n//int last;         /* one if this is the last block for a file */\n{\n  var opt_lenb, static_lenb;  /* opt_len and static_len in bytes */\n  var max_blindex = 0;        /* index of last bit length code of non zero freq */\n\n  /* Build the Huffman trees unless a stored block is forced */\n  if (s.level > 0) {\n\n    /* Check if the file is binary or text */\n    if (s.strm.data_type === Z_UNKNOWN) {\n      s.strm.data_type = detect_data_type(s);\n    }\n\n    /* Construct the literal and distance trees */\n    build_tree(s, s.l_desc);\n    // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n    //        s->static_len));\n\n    build_tree(s, s.d_desc);\n    // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n    //        s->static_len));\n    /* At this point, opt_len and static_len are the total bit lengths of\n     * the compressed block data, excluding the tree representations.\n     */\n\n    /* Build the bit length tree for the above two trees, and get the index\n     * in bl_order of the last bit length code to send.\n     */\n    max_blindex = build_bl_tree(s);\n\n    /* Determine the best encoding. Compute the block lengths in bytes. */\n    opt_lenb = (s.opt_len + 3 + 7) >>> 3;\n    static_lenb = (s.static_len + 3 + 7) >>> 3;\n\n    // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n    //        opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n    //        s->last_lit));\n\n    if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }\n\n  } else {\n    // Assert(buf != (char*)0, \"lost buf\");\n    opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n  }\n\n  if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {\n    /* 4: two words for the lengths */\n\n    /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n     * Otherwise we can't have processed more than WSIZE input bytes since\n     * the last block flush, because compression would have been\n     * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n     * transform a block into a stored block.\n     */\n    _tr_stored_block(s, buf, stored_len, last);\n\n  } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {\n\n    send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);\n    compress_block(s, static_ltree, static_dtree);\n\n  } else {\n    send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);\n    send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);\n    compress_block(s, s.dyn_ltree, s.dyn_dtree);\n  }\n  // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n  /* The above check is made mod 2^32, for files larger than 512 MB\n   * and uLong implemented on 32 bits.\n   */\n  init_block(s);\n\n  if (last) {\n    bi_windup(s);\n  }\n  // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n  //       s->compressed_len-7*last));\n}\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nfunction _tr_tally(s, dist, lc)\n//    deflate_state *s;\n//    unsigned dist;  /* distance of matched string */\n//    unsigned lc;    /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n  //var out_length, in_length, dcode;\n\n  s.pending_buf[s.d_buf + s.last_lit * 2]     = (dist >>> 8) & 0xff;\n  s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n  s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n  s.last_lit++;\n\n  if (dist === 0) {\n    /* lc is the unmatched char */\n    s.dyn_ltree[lc * 2]/*.Freq*/++;\n  } else {\n    s.matches++;\n    /* Here, lc is the match length - MIN_MATCH */\n    dist--;             /* dist = match distance - 1 */\n    //Assert((ush)dist < (ush)MAX_DIST(s) &&\n    //       (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n    //       (ush)d_code(dist) < (ush)D_CODES,  \"_tr_tally: bad match\");\n\n    s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n    s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n  }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n//  /* Try to guess if it is profitable to stop the current block here */\n//  if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n//    /* Compute an upper bound for the compressed length */\n//    out_length = s.last_lit*8;\n//    in_length = s.strstart - s.block_start;\n//\n//    for (dcode = 0; dcode < D_CODES; dcode++) {\n//      out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n//    }\n//    out_length >>>= 3;\n//    //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n//    //       s->last_lit, in_length, out_length,\n//    //       100L - out_length*100L/in_length));\n//    if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n//      return true;\n//    }\n//  }\n//#endif\n\n  return (s.last_lit === s.lit_bufsize - 1);\n  /* We avoid equality with lit_bufsize because of wraparound at 64K\n   * on 16 bit machines and because stored blocks are restricted to\n   * 64K-1 bytes.\n   */\n}\n\nexports._tr_init  = _tr_init;\nexports._tr_stored_block = _tr_stored_block;\nexports._tr_flush_block  = _tr_flush_block;\nexports._tr_tally = _tr_tally;\nexports._tr_align = _tr_align;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction ZStream() {\n  /* next input byte */\n  this.input = null; // JS specific, because we have no pointers\n  this.next_in = 0;\n  /* number of bytes available at input */\n  this.avail_in = 0;\n  /* total number of input bytes read so far */\n  this.total_in = 0;\n  /* next output byte should be put there */\n  this.output = null; // JS specific, because we have no pointers\n  this.next_out = 0;\n  /* remaining free space at output */\n  this.avail_out = 0;\n  /* total number of bytes output so far */\n  this.total_out = 0;\n  /* last error message, NULL if no error */\n  this.msg = ''/*Z_NULL*/;\n  /* not visible by applications */\n  this.state = null;\n  /* best guess about the data type: binary or text */\n  this.data_type = 2/*Z_UNKNOWN*/;\n  /* adler32 value of the uncompressed data */\n  this.adler = 0;\n}\n\nmodule.exports = ZStream;\n","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){\"use strict\";var e,i;function c(){return e.apply(null,arguments)}function o(e){return e instanceof Array||\"[object Array]\"===Object.prototype.toString.call(e)}function u(e){return null!=e&&\"[object Object]\"===Object.prototype.toString.call(e)}function l(e){return void 0===e}function d(e){return\"number\"==typeof e||\"[object Number]\"===Object.prototype.toString.call(e)}function h(e){return e instanceof Date||\"[object Date]\"===Object.prototype.toString.call(e)}function f(e,t){var n,s=[];for(n=0;n<e.length;++n)s.push(t(e[n],n));return s}function m(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function _(e,t){for(var n in t)m(t,n)&&(e[n]=t[n]);return m(t,\"toString\")&&(e.toString=t.toString),m(t,\"valueOf\")&&(e.valueOf=t.valueOf),e}function y(e,t,n,s){return Ot(e,t,n,s,!0).utc()}function g(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function p(e){if(null==e._isValid){var t=g(e),n=i.call(t.parsedDateParts,function(e){return null!=e}),s=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(s=s&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return s;e._isValid=s}return e._isValid}function v(e){var t=y(NaN);return null!=e?_(g(t),e):g(t).userInvalidated=!0,t}i=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,s=0;s<n;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1};var r=c.momentProperties=[];function w(e,t){var n,s,i;if(l(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),l(t._i)||(e._i=t._i),l(t._f)||(e._f=t._f),l(t._l)||(e._l=t._l),l(t._strict)||(e._strict=t._strict),l(t._tzm)||(e._tzm=t._tzm),l(t._isUTC)||(e._isUTC=t._isUTC),l(t._offset)||(e._offset=t._offset),l(t._pf)||(e._pf=g(t)),l(t._locale)||(e._locale=t._locale),0<r.length)for(n=0;n<r.length;n++)l(i=t[s=r[n]])||(e[s]=i);return e}var t=!1;function M(e){w(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===t&&(t=!0,c.updateOffset(this),t=!1)}function S(e){return e instanceof M||null!=e&&null!=e._isAMomentObject}function D(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function k(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=D(t)),n}function a(e,t,n){var s,i=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),a=0;for(s=0;s<i;s++)(n&&e[s]!==t[s]||!n&&k(e[s])!==k(t[s]))&&a++;return a+r}function Y(e){!1===c.suppressDeprecationWarnings&&\"undefined\"!=typeof console&&console.warn&&console.warn(\"Deprecation warning: \"+e)}function n(i,r){var a=!0;return _(function(){if(null!=c.deprecationHandler&&c.deprecationHandler(null,i),a){for(var e,t=[],n=0;n<arguments.length;n++){if(e=\"\",\"object\"==typeof arguments[n]){for(var s in e+=\"\\n[\"+n+\"] \",arguments[0])e+=s+\": \"+arguments[0][s]+\", \";e=e.slice(0,-2)}else e=arguments[n];t.push(e)}Y(i+\"\\nArguments: \"+Array.prototype.slice.call(t).join(\"\")+\"\\n\"+(new Error).stack),a=!1}return r.apply(this,arguments)},r)}var s,O={};function T(e,t){null!=c.deprecationHandler&&c.deprecationHandler(e,t),O[e]||(Y(t),O[e]=!0)}function x(e){return e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}function b(e,t){var n,s=_({},e);for(n in t)m(t,n)&&(u(e[n])&&u(t[n])?(s[n]={},_(s[n],e[n]),_(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)m(e,n)&&!m(t,n)&&u(e[n])&&(s[n]=_({},s[n]));return s}function P(e){null!=e&&this.set(e)}c.suppressDeprecationWarnings=!1,c.deprecationHandler=null,s=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)m(e,t)&&n.push(t);return n};var W={};function H(e,t){var n=e.toLowerCase();W[n]=W[n+\"s\"]=W[t]=e}function R(e){return\"string\"==typeof e?W[e]||W[e.toLowerCase()]:void 0}function C(e){var t,n,s={};for(n in e)m(e,n)&&(t=R(n))&&(s[t]=e[n]);return s}var F={};function L(e,t){F[e]=t}function U(e,t,n){var s=\"\"+Math.abs(e),i=t-s.length;return(0<=e?n?\"+\":\"\":\"-\")+Math.pow(10,Math.max(0,i)).toString().substr(1)+s}var N=/(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,G=/(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,V={},E={};function I(e,t,n,s){var i=s;\"string\"==typeof s&&(i=function(){return this[s]()}),e&&(E[e]=i),t&&(E[t[0]]=function(){return U(i.apply(this,arguments),t[1],t[2])}),n&&(E[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function A(e,t){return e.isValid()?(t=j(t,e.localeData()),V[t]=V[t]||function(s){var e,i,t,r=s.match(N);for(e=0,i=r.length;e<i;e++)E[r[e]]?r[e]=E[r[e]]:r[e]=(t=r[e]).match(/\\[[\\s\\S]/)?t.replace(/^\\[|\\]$/g,\"\"):t.replace(/\\\\/g,\"\");return function(e){var t,n=\"\";for(t=0;t<i;t++)n+=x(r[t])?r[t].call(e,s):r[t];return n}}(t),V[t](e)):e.localeData().invalidDate()}function j(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(G.lastIndex=0;0<=n&&G.test(e);)e=e.replace(G,s),G.lastIndex=0,n-=1;return e}var Z=/\\d/,z=/\\d\\d/,$=/\\d{3}/,q=/\\d{4}/,J=/[+-]?\\d{6}/,B=/\\d\\d?/,Q=/\\d\\d\\d\\d?/,X=/\\d\\d\\d\\d\\d\\d?/,K=/\\d{1,3}/,ee=/\\d{1,4}/,te=/[+-]?\\d{1,6}/,ne=/\\d+/,se=/[+-]?\\d+/,ie=/Z|[+-]\\d\\d:?\\d\\d/gi,re=/Z|[+-]\\d\\d(?::?\\d\\d)?/gi,ae=/[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,oe={};function ue(e,n,s){oe[e]=x(n)?n:function(e,t){return e&&s?s:n}}function le(e,t){return m(oe,e)?oe[e](t._strict,t._locale):new RegExp(de(e.replace(\"\\\\\",\"\").replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,function(e,t,n,s,i){return t||n||s||i})))}function de(e){return e.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g,\"\\\\$&\")}var he={};function ce(e,n){var t,s=n;for(\"string\"==typeof e&&(e=[e]),d(n)&&(s=function(e,t){t[n]=k(e)}),t=0;t<e.length;t++)he[e[t]]=s}function fe(e,i){ce(e,function(e,t,n,s){n._w=n._w||{},i(e,n._w,n,s)})}var me=0,_e=1,ye=2,ge=3,pe=4,ve=5,we=6,Me=7,Se=8;function De(e){return ke(e)?366:365}function ke(e){return e%4==0&&e%100!=0||e%400==0}I(\"Y\",0,0,function(){var e=this.year();return e<=9999?\"\"+e:\"+\"+e}),I(0,[\"YY\",2],0,function(){return this.year()%100}),I(0,[\"YYYY\",4],0,\"year\"),I(0,[\"YYYYY\",5],0,\"year\"),I(0,[\"YYYYYY\",6,!0],0,\"year\"),H(\"year\",\"y\"),L(\"year\",1),ue(\"Y\",se),ue(\"YY\",B,z),ue(\"YYYY\",ee,q),ue(\"YYYYY\",te,J),ue(\"YYYYYY\",te,J),ce([\"YYYYY\",\"YYYYYY\"],me),ce(\"YYYY\",function(e,t){t[me]=2===e.length?c.parseTwoDigitYear(e):k(e)}),ce(\"YY\",function(e,t){t[me]=c.parseTwoDigitYear(e)}),ce(\"Y\",function(e,t){t[me]=parseInt(e,10)}),c.parseTwoDigitYear=function(e){return k(e)+(68<k(e)?1900:2e3)};var Ye,Oe=Te(\"FullYear\",!0);function Te(t,n){return function(e){return null!=e?(be(this,t,e),c.updateOffset(this,n),this):xe(this,t)}}function xe(e,t){return e.isValid()?e._d[\"get\"+(e._isUTC?\"UTC\":\"\")+t]():NaN}function be(e,t,n){e.isValid()&&!isNaN(n)&&(\"FullYear\"===t&&ke(e.year())&&1===e.month()&&29===e.date()?e._d[\"set\"+(e._isUTC?\"UTC\":\"\")+t](n,e.month(),Pe(n,e.month())):e._d[\"set\"+(e._isUTC?\"UTC\":\"\")+t](n))}function Pe(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,s=(t%(n=12)+n)%n;return e+=(t-s)/12,1===s?ke(e)?29:28:31-s%7%2}Ye=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},I(\"M\",[\"MM\",2],\"Mo\",function(){return this.month()+1}),I(\"MMM\",0,0,function(e){return this.localeData().monthsShort(this,e)}),I(\"MMMM\",0,0,function(e){return this.localeData().months(this,e)}),H(\"month\",\"M\"),L(\"month\",8),ue(\"M\",B),ue(\"MM\",B,z),ue(\"MMM\",function(e,t){return t.monthsShortRegex(e)}),ue(\"MMMM\",function(e,t){return t.monthsRegex(e)}),ce([\"M\",\"MM\"],function(e,t){t[_e]=k(e)-1}),ce([\"MMM\",\"MMMM\"],function(e,t,n,s){var i=n._locale.monthsParse(e,s,n._strict);null!=i?t[_e]=i:g(n).invalidMonth=e});var We=/D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,He=\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\");var Re=\"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec\".split(\"_\");function Ce(e,t){var n;if(!e.isValid())return e;if(\"string\"==typeof t)if(/^\\d+$/.test(t))t=k(t);else if(!d(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Pe(e.year(),t)),e._d[\"set\"+(e._isUTC?\"UTC\":\"\")+\"Month\"](t,n),e}function Fe(e){return null!=e?(Ce(this,e),c.updateOffset(this,!0),this):xe(this,\"Month\")}var Le=ae;var Ue=ae;function Ne(){function e(e,t){return t.length-e.length}var t,n,s=[],i=[],r=[];for(t=0;t<12;t++)n=y([2e3,t]),s.push(this.monthsShort(n,\"\")),i.push(this.months(n,\"\")),r.push(this.months(n,\"\")),r.push(this.monthsShort(n,\"\"));for(s.sort(e),i.sort(e),r.sort(e),t=0;t<12;t++)s[t]=de(s[t]),i[t]=de(i[t]);for(t=0;t<24;t++)r[t]=de(r[t]);this._monthsRegex=new RegExp(\"^(\"+r.join(\"|\")+\")\",\"i\"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp(\"^(\"+i.join(\"|\")+\")\",\"i\"),this._monthsShortStrictRegex=new RegExp(\"^(\"+s.join(\"|\")+\")\",\"i\")}function Ge(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&0<=e&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function Ve(e,t,n){var s=7+t-n;return-((7+Ge(e,0,s).getUTCDay()-t)%7)+s-1}function Ee(e,t,n,s,i){var r,a,o=1+7*(t-1)+(7+n-s)%7+Ve(e,s,i);return o<=0?a=De(r=e-1)+o:o>De(e)?(r=e+1,a=o-De(e)):(r=e,a=o),{year:r,dayOfYear:a}}function Ie(e,t,n){var s,i,r=Ve(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+Ae(i=e.year()-1,t,n):a>Ae(e.year(),t,n)?(s=a-Ae(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function Ae(e,t,n){var s=Ve(e,t,n),i=Ve(e+1,t,n);return(De(e)-s+i)/7}I(\"w\",[\"ww\",2],\"wo\",\"week\"),I(\"W\",[\"WW\",2],\"Wo\",\"isoWeek\"),H(\"week\",\"w\"),H(\"isoWeek\",\"W\"),L(\"week\",5),L(\"isoWeek\",5),ue(\"w\",B),ue(\"ww\",B,z),ue(\"W\",B),ue(\"WW\",B,z),fe([\"w\",\"ww\",\"W\",\"WW\"],function(e,t,n,s){t[s.substr(0,1)]=k(e)});I(\"d\",0,\"do\",\"day\"),I(\"dd\",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),I(\"ddd\",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),I(\"dddd\",0,0,function(e){return this.localeData().weekdays(this,e)}),I(\"e\",0,0,\"weekday\"),I(\"E\",0,0,\"isoWeekday\"),H(\"day\",\"d\"),H(\"weekday\",\"e\"),H(\"isoWeekday\",\"E\"),L(\"day\",11),L(\"weekday\",11),L(\"isoWeekday\",11),ue(\"d\",B),ue(\"e\",B),ue(\"E\",B),ue(\"dd\",function(e,t){return t.weekdaysMinRegex(e)}),ue(\"ddd\",function(e,t){return t.weekdaysShortRegex(e)}),ue(\"dddd\",function(e,t){return t.weekdaysRegex(e)}),fe([\"dd\",\"ddd\",\"dddd\"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e}),fe([\"d\",\"e\",\"E\"],function(e,t,n,s){t[s]=k(e)});var je=\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\");var Ze=\"Sun_Mon_Tue_Wed_Thu_Fri_Sat\".split(\"_\");var ze=\"Su_Mo_Tu_We_Th_Fr_Sa\".split(\"_\");var $e=ae;var qe=ae;var Je=ae;function Be(){function e(e,t){return t.length-e.length}var t,n,s,i,r,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=y([2e3,1]).day(t),s=this.weekdaysMin(n,\"\"),i=this.weekdaysShort(n,\"\"),r=this.weekdays(n,\"\"),a.push(s),o.push(i),u.push(r),l.push(s),l.push(i),l.push(r);for(a.sort(e),o.sort(e),u.sort(e),l.sort(e),t=0;t<7;t++)o[t]=de(o[t]),u[t]=de(u[t]),l[t]=de(l[t]);this._weekdaysRegex=new RegExp(\"^(\"+l.join(\"|\")+\")\",\"i\"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp(\"^(\"+u.join(\"|\")+\")\",\"i\"),this._weekdaysShortStrictRegex=new RegExp(\"^(\"+o.join(\"|\")+\")\",\"i\"),this._weekdaysMinStrictRegex=new RegExp(\"^(\"+a.join(\"|\")+\")\",\"i\")}function Qe(){return this.hours()%12||12}function Xe(e,t){I(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Ke(e,t){return t._meridiemParse}I(\"H\",[\"HH\",2],0,\"hour\"),I(\"h\",[\"hh\",2],0,Qe),I(\"k\",[\"kk\",2],0,function(){return this.hours()||24}),I(\"hmm\",0,0,function(){return\"\"+Qe.apply(this)+U(this.minutes(),2)}),I(\"hmmss\",0,0,function(){return\"\"+Qe.apply(this)+U(this.minutes(),2)+U(this.seconds(),2)}),I(\"Hmm\",0,0,function(){return\"\"+this.hours()+U(this.minutes(),2)}),I(\"Hmmss\",0,0,function(){return\"\"+this.hours()+U(this.minutes(),2)+U(this.seconds(),2)}),Xe(\"a\",!0),Xe(\"A\",!1),H(\"hour\",\"h\"),L(\"hour\",13),ue(\"a\",Ke),ue(\"A\",Ke),ue(\"H\",B),ue(\"h\",B),ue(\"k\",B),ue(\"HH\",B,z),ue(\"hh\",B,z),ue(\"kk\",B,z),ue(\"hmm\",Q),ue(\"hmmss\",X),ue(\"Hmm\",Q),ue(\"Hmmss\",X),ce([\"H\",\"HH\"],ge),ce([\"k\",\"kk\"],function(e,t,n){var s=k(e);t[ge]=24===s?0:s}),ce([\"a\",\"A\"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ce([\"h\",\"hh\"],function(e,t,n){t[ge]=k(e),g(n).bigHour=!0}),ce(\"hmm\",function(e,t,n){var s=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s)),g(n).bigHour=!0}),ce(\"hmmss\",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s,2)),t[ve]=k(e.substr(i)),g(n).bigHour=!0}),ce(\"Hmm\",function(e,t,n){var s=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s))}),ce(\"Hmmss\",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s,2)),t[ve]=k(e.substr(i))});var et,tt=Te(\"Hours\",!0),nt={calendar:{sameDay:\"[Today at] LT\",nextDay:\"[Tomorrow at] LT\",nextWeek:\"dddd [at] LT\",lastDay:\"[Yesterday at] LT\",lastWeek:\"[Last] dddd [at] LT\",sameElse:\"L\"},longDateFormat:{LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"},invalidDate:\"Invalid date\",ordinal:\"%d\",dayOfMonthOrdinalParse:/\\d{1,2}/,relativeTime:{future:\"in %s\",past:\"%s ago\",s:\"a few seconds\",ss:\"%d seconds\",m:\"a minute\",mm:\"%d minutes\",h:\"an hour\",hh:\"%d hours\",d:\"a day\",dd:\"%d days\",M:\"a month\",MM:\"%d months\",y:\"a year\",yy:\"%d years\"},months:He,monthsShort:Re,week:{dow:0,doy:6},weekdays:je,weekdaysMin:ze,weekdaysShort:Ze,meridiemParse:/[ap]\\.?m?\\.?/i},st={},it={};function rt(e){return e?e.toLowerCase().replace(\"_\",\"-\"):e}function at(e){var t=null;if(!st[e]&&\"undefined\"!=typeof module&&module&&module.exports)try{t=et._abbr,require(\"./locale/\"+e),ot(t)}catch(e){}return st[e]}function ot(e,t){var n;return e&&((n=l(t)?lt(e):ut(e,t))?et=n:\"undefined\"!=typeof console&&console.warn&&console.warn(\"Locale \"+e+\" not found. Did you forget to load it?\")),et._abbr}function ut(e,t){if(null!==t){var n,s=nt;if(t.abbr=e,null!=st[e])T(\"defineLocaleOverride\",\"use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.\"),s=st[e]._config;else if(null!=t.parentLocale)if(null!=st[t.parentLocale])s=st[t.parentLocale]._config;else{if(null==(n=at(t.parentLocale)))return it[t.parentLocale]||(it[t.parentLocale]=[]),it[t.parentLocale].push({name:e,config:t}),null;s=n._config}return st[e]=new P(b(s,t)),it[e]&&it[e].forEach(function(e){ut(e.name,e.config)}),ot(e),st[e]}return delete st[e],null}function lt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return et;if(!o(e)){if(t=at(e))return t;e=[e]}return function(e){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=rt(e[r]).split(\"-\")).length,n=(n=rt(e[r+1]))?n.split(\"-\"):null;0<t;){if(s=at(i.slice(0,t).join(\"-\")))return s;if(n&&n.length>=t&&a(i,n,!0)>=t-1)break;t--}r++}return et}(e)}function dt(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[_e]<0||11<n[_e]?_e:n[ye]<1||n[ye]>Pe(n[me],n[_e])?ye:n[ge]<0||24<n[ge]||24===n[ge]&&(0!==n[pe]||0!==n[ve]||0!==n[we])?ge:n[pe]<0||59<n[pe]?pe:n[ve]<0||59<n[ve]?ve:n[we]<0||999<n[we]?we:-1,g(e)._overflowDayOfYear&&(t<me||ye<t)&&(t=ye),g(e)._overflowWeeks&&-1===t&&(t=Me),g(e)._overflowWeekday&&-1===t&&(t=Se),g(e).overflow=t),e}function ht(e,t,n){return null!=e?e:null!=t?t:n}function ct(e){var t,n,s,i,r,a=[];if(!e._d){var o,u;for(o=e,u=new Date(c.now()),s=o._useUTC?[u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()]:[u.getFullYear(),u.getMonth(),u.getDate()],e._w&&null==e._a[ye]&&null==e._a[_e]&&function(e){var t,n,s,i,r,a,o,u;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)r=1,a=4,n=ht(t.GG,e._a[me],Ie(Tt(),1,4).year),s=ht(t.W,1),((i=ht(t.E,1))<1||7<i)&&(u=!0);else{r=e._locale._week.dow,a=e._locale._week.doy;var l=Ie(Tt(),r,a);n=ht(t.gg,e._a[me],l.year),s=ht(t.w,l.week),null!=t.d?((i=t.d)<0||6<i)&&(u=!0):null!=t.e?(i=t.e+r,(t.e<0||6<t.e)&&(u=!0)):i=r}s<1||s>Ae(n,r,a)?g(e)._overflowWeeks=!0:null!=u?g(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[me]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=ht(e._a[me],s[me]),(e._dayOfYear>De(r)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=Ge(r,0,e._dayOfYear),e._a[_e]=n.getUTCMonth(),e._a[ye]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=s[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ge]&&0===e._a[pe]&&0===e._a[ve]&&0===e._a[we]&&(e._nextDay=!0,e._a[ge]=0),e._d=(e._useUTC?Ge:function(e,t,n,s,i,r,a){var o=new Date(e,t,n,s,i,r,a);return e<100&&0<=e&&isFinite(o.getFullYear())&&o.setFullYear(e),o}).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ge]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}var ft=/^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,mt=/^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,_t=/Z|[+-]\\d\\d(?::?\\d\\d)?/,yt=[[\"YYYYYY-MM-DD\",/[+-]\\d{6}-\\d\\d-\\d\\d/],[\"YYYY-MM-DD\",/\\d{4}-\\d\\d-\\d\\d/],[\"GGGG-[W]WW-E\",/\\d{4}-W\\d\\d-\\d/],[\"GGGG-[W]WW\",/\\d{4}-W\\d\\d/,!1],[\"YYYY-DDD\",/\\d{4}-\\d{3}/],[\"YYYY-MM\",/\\d{4}-\\d\\d/,!1],[\"YYYYYYMMDD\",/[+-]\\d{10}/],[\"YYYYMMDD\",/\\d{8}/],[\"GGGG[W]WWE\",/\\d{4}W\\d{3}/],[\"GGGG[W]WW\",/\\d{4}W\\d{2}/,!1],[\"YYYYDDD\",/\\d{7}/]],gt=[[\"HH:mm:ss.SSSS\",/\\d\\d:\\d\\d:\\d\\d\\.\\d+/],[\"HH:mm:ss,SSSS\",/\\d\\d:\\d\\d:\\d\\d,\\d+/],[\"HH:mm:ss\",/\\d\\d:\\d\\d:\\d\\d/],[\"HH:mm\",/\\d\\d:\\d\\d/],[\"HHmmss.SSSS\",/\\d\\d\\d\\d\\d\\d\\.\\d+/],[\"HHmmss,SSSS\",/\\d\\d\\d\\d\\d\\d,\\d+/],[\"HHmmss\",/\\d\\d\\d\\d\\d\\d/],[\"HHmm\",/\\d\\d\\d\\d/],[\"HH\",/\\d\\d/]],pt=/^\\/?Date\\((\\-?\\d+)/i;function vt(e){var t,n,s,i,r,a,o=e._i,u=ft.exec(o)||mt.exec(o);if(u){for(g(e).iso=!0,t=0,n=yt.length;t<n;t++)if(yt[t][1].exec(u[1])){i=yt[t][0],s=!1!==yt[t][2];break}if(null==i)return void(e._isValid=!1);if(u[3]){for(t=0,n=gt.length;t<n;t++)if(gt[t][1].exec(u[3])){r=(u[2]||\" \")+gt[t][0];break}if(null==r)return void(e._isValid=!1)}if(!s&&null!=r)return void(e._isValid=!1);if(u[4]){if(!_t.exec(u[4]))return void(e._isValid=!1);a=\"Z\"}e._f=i+(r||\"\")+(a||\"\"),kt(e)}else e._isValid=!1}var wt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/;function Mt(e,t,n,s,i,r){var a=[function(e){var t=parseInt(e,10);{if(t<=49)return 2e3+t;if(t<=999)return 1900+t}return t}(e),Re.indexOf(t),parseInt(n,10),parseInt(s,10),parseInt(i,10)];return r&&a.push(parseInt(r,10)),a}var St={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Dt(e){var t,n,s,i=wt.exec(e._i.replace(/\\([^)]*\\)|[\\n\\t]/g,\" \").replace(/(\\s\\s+)/g,\" \").trim());if(i){var r=Mt(i[4],i[3],i[2],i[5],i[6],i[7]);if(t=i[1],n=r,s=e,t&&Ze.indexOf(t)!==new Date(n[0],n[1],n[2]).getDay()&&(g(s).weekdayMismatch=!0,!(s._isValid=!1)))return;e._a=r,e._tzm=function(e,t,n){if(e)return St[e];if(t)return 0;var s=parseInt(n,10),i=s%100;return(s-i)/100*60+i}(i[8],i[9],i[10]),e._d=Ge.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function kt(e){if(e._f!==c.ISO_8601)if(e._f!==c.RFC_2822){e._a=[],g(e).empty=!0;var t,n,s,i,r,a,o,u,l=\"\"+e._i,d=l.length,h=0;for(s=j(e._f,e._locale).match(N)||[],t=0;t<s.length;t++)i=s[t],(n=(l.match(le(i,e))||[])[0])&&(0<(r=l.substr(0,l.indexOf(n))).length&&g(e).unusedInput.push(r),l=l.slice(l.indexOf(n)+n.length),h+=n.length),E[i]?(n?g(e).empty=!1:g(e).unusedTokens.push(i),a=i,u=e,null!=(o=n)&&m(he,a)&&he[a](o,u._a,u,a)):e._strict&&!n&&g(e).unusedTokens.push(i);g(e).charsLeftOver=d-h,0<l.length&&g(e).unusedInput.push(l),e._a[ge]<=12&&!0===g(e).bigHour&&0<e._a[ge]&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[ge]=function(e,t,n){var s;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):(null!=e.isPM&&((s=e.isPM(n))&&t<12&&(t+=12),s||12!==t||(t=0)),t)}(e._locale,e._a[ge],e._meridiem),ct(e),dt(e)}else Dt(e);else vt(e)}function Yt(e){var t,n,s,i,r=e._i,a=e._f;return e._locale=e._locale||lt(e._l),null===r||void 0===a&&\"\"===r?v({nullInput:!0}):(\"string\"==typeof r&&(e._i=r=e._locale.preparse(r)),S(r)?new M(dt(r)):(h(r)?e._d=r:o(a)?function(e){var t,n,s,i,r;if(0===e._f.length)return g(e).invalidFormat=!0,e._d=new Date(NaN);for(i=0;i<e._f.length;i++)r=0,t=w({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],kt(t),p(t)&&(r+=g(t).charsLeftOver,r+=10*g(t).unusedTokens.length,g(t).score=r,(null==s||r<s)&&(s=r,n=t));_(e,n||t)}(e):a?kt(e):l(n=(t=e)._i)?t._d=new Date(c.now()):h(n)?t._d=new Date(n.valueOf()):\"string\"==typeof n?(s=t,null===(i=pt.exec(s._i))?(vt(s),!1===s._isValid&&(delete s._isValid,Dt(s),!1===s._isValid&&(delete s._isValid,c.createFromInputFallback(s)))):s._d=new Date(+i[1])):o(n)?(t._a=f(n.slice(0),function(e){return parseInt(e,10)}),ct(t)):u(n)?function(e){if(!e._d){var t=C(e._i);e._a=f([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),ct(e)}}(t):d(n)?t._d=new Date(n):c.createFromInputFallback(t),p(e)||(e._d=null),e))}function Ot(e,t,n,s,i){var r,a={};return!0!==n&&!1!==n||(s=n,n=void 0),(u(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||o(e)&&0===e.length)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=e,a._f=t,a._strict=s,(r=new M(dt(Yt(a))))._nextDay&&(r.add(1,\"d\"),r._nextDay=void 0),r}function Tt(e,t,n,s){return Ot(e,t,n,s,!1)}c.createFromInputFallback=n(\"value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.\",function(e){e._d=new Date(e._i+(e._useUTC?\" UTC\":\"\"))}),c.ISO_8601=function(){},c.RFC_2822=function(){};var xt=n(\"moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/\",function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:v()}),bt=n(\"moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/\",function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:v()});function Pt(e,t){var n,s;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Tt();for(n=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](n)||(n=t[s]);return n}var Wt=[\"year\",\"quarter\",\"month\",\"week\",\"day\",\"hour\",\"minute\",\"second\",\"millisecond\"];function Ht(e){var t=C(e),n=t.year||0,s=t.quarter||0,i=t.month||0,r=t.week||0,a=t.day||0,o=t.hour||0,u=t.minute||0,l=t.second||0,d=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===Ye.call(Wt,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,s=0;s<Wt.length;++s)if(e[Wt[s]]){if(n)return!1;parseFloat(e[Wt[s]])!==k(e[Wt[s]])&&(n=!0)}return!0}(t),this._milliseconds=+d+1e3*l+6e4*u+1e3*o*60*60,this._days=+a+7*r,this._months=+i+3*s+12*n,this._data={},this._locale=lt(),this._bubble()}function Rt(e){return e instanceof Ht}function Ct(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ft(e,n){I(e,0,0,function(){var e=this.utcOffset(),t=\"+\";return e<0&&(e=-e,t=\"-\"),t+U(~~(e/60),2)+n+U(~~e%60,2)})}Ft(\"Z\",\":\"),Ft(\"ZZ\",\"\"),ue(\"Z\",re),ue(\"ZZ\",re),ce([\"Z\",\"ZZ\"],function(e,t,n){n._useUTC=!0,n._tzm=Ut(re,e)});var Lt=/([\\+\\-]|\\d\\d)/gi;function Ut(e,t){var n=(t||\"\").match(e);if(null===n)return null;var s=((n[n.length-1]||[])+\"\").match(Lt)||[\"-\",0,0],i=60*s[1]+k(s[2]);return 0===i?0:\"+\"===s[0]?i:-i}function Nt(e,t){var n,s;return t._isUTC?(n=t.clone(),s=(S(e)||h(e)?e.valueOf():Tt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+s),c.updateOffset(n,!1),n):Tt(e).local()}function Gt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Vt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}c.updateOffset=function(){};var Et=/^(\\-|\\+)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/,It=/^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function At(e,t){var n,s,i,r=e,a=null;return Rt(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:d(e)?(r={},t?r[t]=e:r.milliseconds=e):(a=Et.exec(e))?(n=\"-\"===a[1]?-1:1,r={y:0,d:k(a[ye])*n,h:k(a[ge])*n,m:k(a[pe])*n,s:k(a[ve])*n,ms:k(Ct(1e3*a[we]))*n}):(a=It.exec(e))?(n=\"-\"===a[1]?-1:(a[1],1),r={y:jt(a[2],n),M:jt(a[3],n),w:jt(a[4],n),d:jt(a[5],n),h:jt(a[6],n),m:jt(a[7],n),s:jt(a[8],n)}):null==r?r={}:\"object\"==typeof r&&(\"from\"in r||\"to\"in r)&&(i=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Nt(t,e),e.isBefore(t)?n=Zt(e,t):((n=Zt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(Tt(r.from),Tt(r.to)),(r={}).ms=i.milliseconds,r.M=i.months),s=new Ht(r),Rt(e)&&m(e,\"_locale\")&&(s._locale=e._locale),s}function jt(e,t){var n=e&&parseFloat(e.replace(\",\",\".\"));return(isNaN(n)?0:n)*t}function Zt(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,\"M\").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,\"M\"),n}function zt(s,i){return function(e,t){var n;return null===t||isNaN(+t)||(T(i,\"moment().\"+i+\"(period, number) is deprecated. Please use moment().\"+i+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),n=e,e=t,t=n),$t(this,At(e=\"string\"==typeof e?+e:e,t),s),this}}function $t(e,t,n,s){var i=t._milliseconds,r=Ct(t._days),a=Ct(t._months);e.isValid()&&(s=null==s||s,a&&Ce(e,xe(e,\"Month\")+a*n),r&&be(e,\"Date\",xe(e,\"Date\")+r*n),i&&e._d.setTime(e._d.valueOf()+i*n),s&&c.updateOffset(e,r||a))}At.fn=Ht.prototype,At.invalid=function(){return At(NaN)};var qt=zt(1,\"add\"),Jt=zt(-1,\"subtract\");function Bt(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),s=e.clone().add(n,\"months\");return-(n+(t-s<0?(t-s)/(s-e.clone().add(n-1,\"months\")):(t-s)/(e.clone().add(n+1,\"months\")-s)))||0}function Qt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=lt(e))&&(this._locale=t),this)}c.defaultFormat=\"YYYY-MM-DDTHH:mm:ssZ\",c.defaultFormatUtc=\"YYYY-MM-DDTHH:mm:ss[Z]\";var Xt=n(\"moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.\",function(e){return void 0===e?this.localeData():this.locale(e)});function Kt(){return this._locale}function en(e,t){I(0,[e,e.length],0,t)}function tn(e,t,n,s,i){var r;return null==e?Ie(this,s,i).year:((r=Ae(e,s,i))<t&&(t=r),function(e,t,n,s,i){var r=Ee(e,t,n,s,i),a=Ge(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,n,s,i))}I(0,[\"gg\",2],0,function(){return this.weekYear()%100}),I(0,[\"GG\",2],0,function(){return this.isoWeekYear()%100}),en(\"gggg\",\"weekYear\"),en(\"ggggg\",\"weekYear\"),en(\"GGGG\",\"isoWeekYear\"),en(\"GGGGG\",\"isoWeekYear\"),H(\"weekYear\",\"gg\"),H(\"isoWeekYear\",\"GG\"),L(\"weekYear\",1),L(\"isoWeekYear\",1),ue(\"G\",se),ue(\"g\",se),ue(\"GG\",B,z),ue(\"gg\",B,z),ue(\"GGGG\",ee,q),ue(\"gggg\",ee,q),ue(\"GGGGG\",te,J),ue(\"ggggg\",te,J),fe([\"gggg\",\"ggggg\",\"GGGG\",\"GGGGG\"],function(e,t,n,s){t[s.substr(0,2)]=k(e)}),fe([\"gg\",\"GG\"],function(e,t,n,s){t[s]=c.parseTwoDigitYear(e)}),I(\"Q\",0,\"Qo\",\"quarter\"),H(\"quarter\",\"Q\"),L(\"quarter\",7),ue(\"Q\",Z),ce(\"Q\",function(e,t){t[_e]=3*(k(e)-1)}),I(\"D\",[\"DD\",2],\"Do\",\"date\"),H(\"date\",\"D\"),L(\"date\",9),ue(\"D\",B),ue(\"DD\",B,z),ue(\"Do\",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),ce([\"D\",\"DD\"],ye),ce(\"Do\",function(e,t){t[ye]=k(e.match(B)[0])});var nn=Te(\"Date\",!0);I(\"DDD\",[\"DDDD\",3],\"DDDo\",\"dayOfYear\"),H(\"dayOfYear\",\"DDD\"),L(\"dayOfYear\",4),ue(\"DDD\",K),ue(\"DDDD\",$),ce([\"DDD\",\"DDDD\"],function(e,t,n){n._dayOfYear=k(e)}),I(\"m\",[\"mm\",2],0,\"minute\"),H(\"minute\",\"m\"),L(\"minute\",14),ue(\"m\",B),ue(\"mm\",B,z),ce([\"m\",\"mm\"],pe);var sn=Te(\"Minutes\",!1);I(\"s\",[\"ss\",2],0,\"second\"),H(\"second\",\"s\"),L(\"second\",15),ue(\"s\",B),ue(\"ss\",B,z),ce([\"s\",\"ss\"],ve);var rn,an=Te(\"Seconds\",!1);for(I(\"S\",0,0,function(){return~~(this.millisecond()/100)}),I(0,[\"SS\",2],0,function(){return~~(this.millisecond()/10)}),I(0,[\"SSS\",3],0,\"millisecond\"),I(0,[\"SSSS\",4],0,function(){return 10*this.millisecond()}),I(0,[\"SSSSS\",5],0,function(){return 100*this.millisecond()}),I(0,[\"SSSSSS\",6],0,function(){return 1e3*this.millisecond()}),I(0,[\"SSSSSSS\",7],0,function(){return 1e4*this.millisecond()}),I(0,[\"SSSSSSSS\",8],0,function(){return 1e5*this.millisecond()}),I(0,[\"SSSSSSSSS\",9],0,function(){return 1e6*this.millisecond()}),H(\"millisecond\",\"ms\"),L(\"millisecond\",16),ue(\"S\",K,Z),ue(\"SS\",K,z),ue(\"SSS\",K,$),rn=\"SSSS\";rn.length<=9;rn+=\"S\")ue(rn,ne);function on(e,t){t[we]=k(1e3*(\"0.\"+e))}for(rn=\"S\";rn.length<=9;rn+=\"S\")ce(rn,on);var un=Te(\"Milliseconds\",!1);I(\"z\",0,0,\"zoneAbbr\"),I(\"zz\",0,0,\"zoneName\");var ln=M.prototype;function dn(e){return e}ln.add=qt,ln.calendar=function(e,t){var n=e||Tt(),s=Nt(n,this).startOf(\"day\"),i=c.calendarFormat(this,s)||\"sameElse\",r=t&&(x(t[i])?t[i].call(this,n):t[i]);return this.format(r||this.localeData().calendar(i,this,Tt(n)))},ln.clone=function(){return new M(this)},ln.diff=function(e,t,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=Nt(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=R(t)){case\"year\":r=Bt(this,s)/12;break;case\"month\":r=Bt(this,s);break;case\"quarter\":r=Bt(this,s)/3;break;case\"second\":r=(this-s)/1e3;break;case\"minute\":r=(this-s)/6e4;break;case\"hour\":r=(this-s)/36e5;break;case\"day\":r=(this-s-i)/864e5;break;case\"week\":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:D(r)},ln.endOf=function(e){return void 0===(e=R(e))||\"millisecond\"===e?this:(\"date\"===e&&(e=\"day\"),this.startOf(e).add(1,\"isoWeek\"===e?\"week\":e).subtract(1,\"ms\"))},ln.format=function(e){e||(e=this.isUtc()?c.defaultFormatUtc:c.defaultFormat);var t=A(this,e);return this.localeData().postformat(t)},ln.from=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Tt(e).isValid())?At({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},ln.fromNow=function(e){return this.from(Tt(),e)},ln.to=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Tt(e).isValid())?At({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},ln.toNow=function(e){return this.to(Tt(),e)},ln.get=function(e){return x(this[e=R(e)])?this[e]():this},ln.invalidAt=function(){return g(this).overflow},ln.isAfter=function(e,t){var n=S(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&(\"millisecond\"===(t=R(l(t)?\"millisecond\":t))?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},ln.isBefore=function(e,t){var n=S(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&(\"millisecond\"===(t=R(l(t)?\"millisecond\":t))?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},ln.isBetween=function(e,t,n,s){return(\"(\"===(s=s||\"()\")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(\")\"===s[1]?this.isBefore(t,n):!this.isAfter(t,n))},ln.isSame=function(e,t){var n,s=S(e)?e:Tt(e);return!(!this.isValid()||!s.isValid())&&(\"millisecond\"===(t=R(t||\"millisecond\"))?this.valueOf()===s.valueOf():(n=s.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},ln.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},ln.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},ln.isValid=function(){return p(this)},ln.lang=Xt,ln.locale=Qt,ln.localeData=Kt,ln.max=bt,ln.min=xt,ln.parsingFlags=function(){return _({},g(this))},ln.set=function(e,t){if(\"object\"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:F[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}(e=C(e)),s=0;s<n.length;s++)this[n[s].unit](e[n[s].unit]);else if(x(this[e=R(e)]))return this[e](t);return this},ln.startOf=function(e){switch(e=R(e)){case\"year\":this.month(0);case\"quarter\":case\"month\":this.date(1);case\"week\":case\"isoWeek\":case\"day\":case\"date\":this.hours(0);case\"hour\":this.minutes(0);case\"minute\":this.seconds(0);case\"second\":this.milliseconds(0)}return\"week\"===e&&this.weekday(0),\"isoWeek\"===e&&this.isoWeekday(1),\"quarter\"===e&&this.month(3*Math.floor(this.month()/3)),this},ln.subtract=Jt,ln.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},ln.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},ln.toDate=function(){return new Date(this.valueOf())},ln.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||9999<n.year()?A(n,t?\"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]\":\"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ\"):x(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace(\"Z\",A(n,\"Z\")):A(n,t?\"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]\":\"YYYY-MM-DD[T]HH:mm:ss.SSSZ\")},ln.inspect=function(){if(!this.isValid())return\"moment.invalid(/* \"+this._i+\" */)\";var e=\"moment\",t=\"\";this.isLocal()||(e=0===this.utcOffset()?\"moment.utc\":\"moment.parseZone\",t=\"Z\");var n=\"[\"+e+'(\"]',s=0<=this.year()&&this.year()<=9999?\"YYYY\":\"YYYYYY\",i=t+'[\")]';return this.format(n+s+\"-MM-DD[T]HH:mm:ss.SSS\"+i)},ln.toJSON=function(){return this.isValid()?this.toISOString():null},ln.toString=function(){return this.clone().locale(\"en\").format(\"ddd MMM DD YYYY HH:mm:ss [GMT]ZZ\")},ln.unix=function(){return Math.floor(this.valueOf()/1e3)},ln.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},ln.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},ln.year=Oe,ln.isLeapYear=function(){return ke(this.year())},ln.weekYear=function(e){return tn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},ln.isoWeekYear=function(e){return tn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},ln.quarter=ln.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},ln.month=Fe,ln.daysInMonth=function(){return Pe(this.year(),this.month())},ln.week=ln.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),\"d\")},ln.isoWeek=ln.isoWeeks=function(e){var t=Ie(this,1,4).week;return null==e?t:this.add(7*(e-t),\"d\")},ln.weeksInYear=function(){var e=this.localeData()._week;return Ae(this.year(),e.dow,e.doy)},ln.isoWeeksInYear=function(){return Ae(this.year(),1,4)},ln.date=nn,ln.day=ln.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t,n,s=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(t=e,n=this.localeData(),e=\"string\"!=typeof t?t:isNaN(t)?\"number\"==typeof(t=n.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-s,\"d\")):s},ln.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,\"d\")},ln.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=(n=e,s=this.localeData(),\"string\"==typeof n?s.weekdaysParse(n)%7||7:isNaN(n)?null:n);return this.day(this.day()%7?t:t-7)}return this.day()||7;var n,s},ln.dayOfYear=function(e){var t=Math.round((this.clone().startOf(\"day\")-this.clone().startOf(\"year\"))/864e5)+1;return null==e?t:this.add(e-t,\"d\")},ln.hour=ln.hours=tt,ln.minute=ln.minutes=sn,ln.second=ln.seconds=an,ln.millisecond=ln.milliseconds=un,ln.utcOffset=function(e,t,n){var s,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if(\"string\"==typeof e){if(null===(e=Ut(re,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(s=Gt(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,\"m\"),i!==e&&(!t||this._changeInProgress?$t(this,At(e-i,\"m\"),1,!1):this._changeInProgress||(this._changeInProgress=!0,c.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Gt(this)},ln.utc=function(e){return this.utcOffset(0,e)},ln.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Gt(this),\"m\")),this},ln.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if(\"string\"==typeof this._i){var e=Ut(ie,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},ln.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Tt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},ln.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},ln.isLocal=function(){return!!this.isValid()&&!this._isUTC},ln.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},ln.isUtc=Vt,ln.isUTC=Vt,ln.zoneAbbr=function(){return this._isUTC?\"UTC\":\"\"},ln.zoneName=function(){return this._isUTC?\"Coordinated Universal Time\":\"\"},ln.dates=n(\"dates accessor is deprecated. Use date instead.\",nn),ln.months=n(\"months accessor is deprecated. Use month instead\",Fe),ln.years=n(\"years accessor is deprecated. Use year instead\",Oe),ln.zone=n(\"moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/\",function(e,t){return null!=e?(\"string\"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),ln.isDSTShifted=n(\"isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information\",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e={};if(w(e,this),(e=Yt(e))._a){var t=e._isUTC?y(e._a):Tt(e._a);this._isDSTShifted=this.isValid()&&0<a(e._a,t.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted});var hn=P.prototype;function cn(e,t,n,s){var i=lt(),r=y().set(s,t);return i[n](r,e)}function fn(e,t,n){if(d(e)&&(t=e,e=void 0),e=e||\"\",null!=t)return cn(e,t,n,\"month\");var s,i=[];for(s=0;s<12;s++)i[s]=cn(e,s,n,\"month\");return i}function mn(e,t,n,s){\"boolean\"==typeof e?d(t)&&(n=t,t=void 0):(t=e,e=!1,d(n=t)&&(n=t,t=void 0)),t=t||\"\";var i,r=lt(),a=e?r._week.dow:0;if(null!=n)return cn(t,(n+a)%7,s,\"day\");var o=[];for(i=0;i<7;i++)o[i]=cn(t,(i+a)%7,s,\"day\");return o}hn.calendar=function(e,t,n){var s=this._calendar[e]||this._calendar.sameElse;return x(s)?s.call(t,n):s},hn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},hn.invalidDate=function(){return this._invalidDate},hn.ordinal=function(e){return this._ordinal.replace(\"%d\",e)},hn.preparse=dn,hn.postformat=dn,hn.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return x(i)?i(e,t,n,s):i.replace(/%d/i,e)},hn.pastFuture=function(e,t){var n=this._relativeTime[0<e?\"future\":\"past\"];return x(n)?n(t):n.replace(/%s/i,t)},hn.set=function(e){var t,n;for(n in e)x(t=e[n])?this[n]=t:this[\"_\"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+\"|\"+/\\d{1,2}/.source)},hn.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||We).test(t)?\"format\":\"standalone\"][e.month()]:o(this._months)?this._months:this._months.standalone},hn.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[We.test(t)?\"format\":\"standalone\"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},hn.monthsParse=function(e,t,n){var s,i,r;if(this._monthsParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=y([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,\"\").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,\"\").toLocaleLowerCase();return n?\"MMM\"===t?-1!==(i=Ye.call(this._shortMonthsParse,a))?i:null:-1!==(i=Ye.call(this._longMonthsParse,a))?i:null:\"MMM\"===t?-1!==(i=Ye.call(this._shortMonthsParse,a))?i:-1!==(i=Ye.call(this._longMonthsParse,a))?i:null:-1!==(i=Ye.call(this._longMonthsParse,a))?i:-1!==(i=Ye.call(this._shortMonthsParse,a))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=y([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp(\"^\"+this.months(i,\"\").replace(\".\",\"\")+\"$\",\"i\"),this._shortMonthsParse[s]=new RegExp(\"^\"+this.monthsShort(i,\"\").replace(\".\",\"\")+\"$\",\"i\")),n||this._monthsParse[s]||(r=\"^\"+this.months(i,\"\")+\"|^\"+this.monthsShort(i,\"\"),this._monthsParse[s]=new RegExp(r.replace(\".\",\"\"),\"i\")),n&&\"MMMM\"===t&&this._longMonthsParse[s].test(e))return s;if(n&&\"MMM\"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},hn.monthsRegex=function(e){return this._monthsParseExact?(m(this,\"_monthsRegex\")||Ne.call(this),e?this._monthsStrictRegex:this._monthsRegex):(m(this,\"_monthsRegex\")||(this._monthsRegex=Ue),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},hn.monthsShortRegex=function(e){return this._monthsParseExact?(m(this,\"_monthsRegex\")||Ne.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(m(this,\"_monthsShortRegex\")||(this._monthsShortRegex=Le),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},hn.week=function(e){return Ie(e,this._week.dow,this._week.doy).week},hn.firstDayOfYear=function(){return this._week.doy},hn.firstDayOfWeek=function(){return this._week.dow},hn.weekdays=function(e,t){return e?o(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?\"format\":\"standalone\"][e.day()]:o(this._weekdays)?this._weekdays:this._weekdays.standalone},hn.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},hn.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},hn.weekdaysParse=function(e,t,n){var s,i,r;if(this._weekdaysParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=y([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,\"\").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,\"\").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,\"\").toLocaleLowerCase();return n?\"dddd\"===t?-1!==(i=Ye.call(this._weekdaysParse,a))?i:null:\"ddd\"===t?-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:\"dddd\"===t?-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:\"ddd\"===t?-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=y([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp(\"^\"+this.weekdays(i,\"\").replace(\".\",\".?\")+\"$\",\"i\"),this._shortWeekdaysParse[s]=new RegExp(\"^\"+this.weekdaysShort(i,\"\").replace(\".\",\".?\")+\"$\",\"i\"),this._minWeekdaysParse[s]=new RegExp(\"^\"+this.weekdaysMin(i,\"\").replace(\".\",\".?\")+\"$\",\"i\")),this._weekdaysParse[s]||(r=\"^\"+this.weekdays(i,\"\")+\"|^\"+this.weekdaysShort(i,\"\")+\"|^\"+this.weekdaysMin(i,\"\"),this._weekdaysParse[s]=new RegExp(r.replace(\".\",\"\"),\"i\")),n&&\"dddd\"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&\"ddd\"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&\"dd\"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},hn.weekdaysRegex=function(e){return this._weekdaysParseExact?(m(this,\"_weekdaysRegex\")||Be.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(m(this,\"_weekdaysRegex\")||(this._weekdaysRegex=$e),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},hn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(m(this,\"_weekdaysRegex\")||Be.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(m(this,\"_weekdaysShortRegex\")||(this._weekdaysShortRegex=qe),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},hn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(m(this,\"_weekdaysRegex\")||Be.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(m(this,\"_weekdaysMinRegex\")||(this._weekdaysMinRegex=Je),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},hn.isPM=function(e){return\"p\"===(e+\"\").toLowerCase().charAt(0)},hn.meridiem=function(e,t,n){return 11<e?n?\"pm\":\"PM\":n?\"am\":\"AM\"},ot(\"en\",{dayOfMonthOrdinalParse:/\\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===k(e%100/10)?\"th\":1===t?\"st\":2===t?\"nd\":3===t?\"rd\":\"th\")}}),c.lang=n(\"moment.lang is deprecated. Use moment.locale instead.\",ot),c.langData=n(\"moment.langData is deprecated. Use moment.localeData instead.\",lt);var _n=Math.abs;function yn(e,t,n,s){var i=At(t,n);return e._milliseconds+=s*i._milliseconds,e._days+=s*i._days,e._months+=s*i._months,e._bubble()}function gn(e){return e<0?Math.floor(e):Math.ceil(e)}function pn(e){return 4800*e/146097}function vn(e){return 146097*e/4800}function wn(e){return function(){return this.as(e)}}var Mn=wn(\"ms\"),Sn=wn(\"s\"),Dn=wn(\"m\"),kn=wn(\"h\"),Yn=wn(\"d\"),On=wn(\"w\"),Tn=wn(\"M\"),xn=wn(\"y\");function bn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Pn=bn(\"milliseconds\"),Wn=bn(\"seconds\"),Hn=bn(\"minutes\"),Rn=bn(\"hours\"),Cn=bn(\"days\"),Fn=bn(\"months\"),Ln=bn(\"years\");var Un=Math.round,Nn={ss:44,s:45,m:45,h:22,d:26,M:11};var Gn=Math.abs;function Vn(e){return(0<e)-(e<0)||+e}function En(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Gn(this._milliseconds)/1e3,s=Gn(this._days),i=Gn(this._months);t=D((e=D(n/60))/60),n%=60,e%=60;var r=D(i/12),a=i%=12,o=s,u=t,l=e,d=n?n.toFixed(3).replace(/\\.?0+$/,\"\"):\"\",h=this.asSeconds();if(!h)return\"P0D\";var c=h<0?\"-\":\"\",f=Vn(this._months)!==Vn(h)?\"-\":\"\",m=Vn(this._days)!==Vn(h)?\"-\":\"\",_=Vn(this._milliseconds)!==Vn(h)?\"-\":\"\";return c+\"P\"+(r?f+r+\"Y\":\"\")+(a?f+a+\"M\":\"\")+(o?m+o+\"D\":\"\")+(u||l||d?\"T\":\"\")+(u?_+u+\"H\":\"\")+(l?_+l+\"M\":\"\")+(d?_+d+\"S\":\"\")}var In=Ht.prototype;return In.isValid=function(){return this._isValid},In.abs=function(){var e=this._data;return this._milliseconds=_n(this._milliseconds),this._days=_n(this._days),this._months=_n(this._months),e.milliseconds=_n(e.milliseconds),e.seconds=_n(e.seconds),e.minutes=_n(e.minutes),e.hours=_n(e.hours),e.months=_n(e.months),e.years=_n(e.years),this},In.add=function(e,t){return yn(this,e,t,1)},In.subtract=function(e,t){return yn(this,e,t,-1)},In.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if(\"month\"===(e=R(e))||\"year\"===e)return t=this._days+s/864e5,n=this._months+pn(t),\"month\"===e?n:n/12;switch(t=this._days+Math.round(vn(this._months)),e){case\"week\":return t/7+s/6048e5;case\"day\":return t+s/864e5;case\"hour\":return 24*t+s/36e5;case\"minute\":return 1440*t+s/6e4;case\"second\":return 86400*t+s/1e3;case\"millisecond\":return Math.floor(864e5*t)+s;default:throw new Error(\"Unknown unit \"+e)}},In.asMilliseconds=Mn,In.asSeconds=Sn,In.asMinutes=Dn,In.asHours=kn,In.asDays=Yn,In.asWeeks=On,In.asMonths=Tn,In.asYears=xn,In.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},In._bubble=function(){var e,t,n,s,i,r=this._milliseconds,a=this._days,o=this._months,u=this._data;return 0<=r&&0<=a&&0<=o||r<=0&&a<=0&&o<=0||(r+=864e5*gn(vn(o)+a),o=a=0),u.milliseconds=r%1e3,e=D(r/1e3),u.seconds=e%60,t=D(e/60),u.minutes=t%60,n=D(t/60),u.hours=n%24,o+=i=D(pn(a+=D(n/24))),a-=gn(vn(i)),s=D(o/12),o%=12,u.days=a,u.months=o,u.years=s,this},In.clone=function(){return At(this)},In.get=function(e){return e=R(e),this.isValid()?this[e+\"s\"]():NaN},In.milliseconds=Pn,In.seconds=Wn,In.minutes=Hn,In.hours=Rn,In.days=Cn,In.weeks=function(){return D(this.days()/7)},In.months=Fn,In.years=Ln,In.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t,n,s,i,r,a,o,u,l,d,h,c=this.localeData(),f=(n=!e,s=c,i=At(t=this).abs(),r=Un(i.as(\"s\")),a=Un(i.as(\"m\")),o=Un(i.as(\"h\")),u=Un(i.as(\"d\")),l=Un(i.as(\"M\")),d=Un(i.as(\"y\")),(h=r<=Nn.ss&&[\"s\",r]||r<Nn.s&&[\"ss\",r]||a<=1&&[\"m\"]||a<Nn.m&&[\"mm\",a]||o<=1&&[\"h\"]||o<Nn.h&&[\"hh\",o]||u<=1&&[\"d\"]||u<Nn.d&&[\"dd\",u]||l<=1&&[\"M\"]||l<Nn.M&&[\"MM\",l]||d<=1&&[\"y\"]||[\"yy\",d])[2]=n,h[3]=0<+t,h[4]=s,function(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}.apply(null,h));return e&&(f=c.pastFuture(+this,f)),c.postformat(f)},In.toISOString=En,In.toString=En,In.toJSON=En,In.locale=Qt,In.localeData=Kt,In.toIsoString=n(\"toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)\",En),In.lang=Xt,I(\"X\",0,0,\"unix\"),I(\"x\",0,0,\"valueOf\"),ue(\"x\",se),ue(\"X\",/[+-]?\\d+(\\.\\d{1,3})?/),ce(\"X\",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),ce(\"x\",function(e,t,n){n._d=new Date(k(e))}),c.version=\"2.22.1\",e=Tt,c.fn=ln,c.min=function(){return Pt(\"isBefore\",[].slice.call(arguments,0))},c.max=function(){return Pt(\"isAfter\",[].slice.call(arguments,0))},c.now=function(){return Date.now?Date.now():+new Date},c.utc=y,c.unix=function(e){return Tt(1e3*e)},c.months=function(e,t){return fn(e,t,\"months\")},c.isDate=h,c.locale=ot,c.invalid=v,c.duration=At,c.isMoment=S,c.weekdays=function(e,t,n){return mn(e,t,n,\"weekdays\")},c.parseZone=function(){return Tt.apply(null,arguments).parseZone()},c.localeData=lt,c.isDuration=Rt,c.monthsShort=function(e,t){return fn(e,t,\"monthsShort\")},c.weekdaysMin=function(e,t,n){return mn(e,t,n,\"weekdaysMin\")},c.defineLocale=ut,c.updateLocale=function(e,t){if(null!=t){var n,s,i=nt;null!=(s=at(e))&&(i=s._config),(n=new P(t=b(i,t))).parentLocale=st[e],st[e]=n,ot(e)}else null!=st[e]&&(null!=st[e].parentLocale?st[e]=st[e].parentLocale:null!=st[e]&&delete st[e]);return st[e]},c.locales=function(){return s(st)},c.weekdaysShort=function(e,t,n){return mn(e,t,n,\"weekdaysShort\")},c.normalizeUnits=R,c.relativeTimeRounding=function(e){return void 0===e?Un:\"function\"==typeof e&&(Un=e,!0)},c.relativeTimeThreshold=function(e,t){return void 0!==Nn[e]&&(void 0===t?Nn[e]:(Nn[e]=t,\"s\"===e&&(Nn.ss=t-1),!0))},c.calendarFormat=function(e,t){var n=e.diff(t,\"days\",!0);return n<-6?\"sameElse\":n<-1?\"lastWeek\":n<0?\"lastDay\":n<1?\"sameDay\":n<2?\"nextDay\":n<7?\"nextWeek\":\"sameElse\"},c.prototype=ln,c.HTML5_FMT={DATETIME_LOCAL:\"YYYY-MM-DDTHH:mm\",DATETIME_LOCAL_SECONDS:\"YYYY-MM-DDTHH:mm:ss\",DATETIME_LOCAL_MS:\"YYYY-MM-DDTHH:mm:ss.SSS\",DATE:\"YYYY-MM-DD\",TIME:\"HH:mm\",TIME_SECONDS:\"HH:mm:ss\",TIME_MS:\"HH:mm:ss.SSS\",WEEK:\"YYYY-[W]WW\",MONTH:\"YYYY-MM\"},c});","module.exports = exports = window.fetch;\n\n// Needed for TypeScript and Webpack.\nexports.default = window.fetch.bind(window);\n\nexports.Headers = window.Headers;\nexports.Request = window.Request;\nexports.Response = window.Response;\n","import PropTypes from 'prop-types';\nimport { Component, cloneElement, h, options, render } from 'preact';\n\nvar version = '15.1.0'; // trick libraries to think we are react\n\nvar ELEMENTS = 'a abbr address area article aside audio b base bdi bdo big blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins kbd keygen label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script section select small source span strong style sub summary sup table tbody td textarea tfoot th thead time title tr track u ul var video wbr circle clipPath defs ellipse g image line linearGradient mask path pattern polygon polyline radialGradient rect stop svg text tspan'.split(' ');\n\nvar REACT_ELEMENT_TYPE = (typeof Symbol!=='undefined' && Symbol.for && Symbol.for('react.element')) || 0xeac7;\n\nvar COMPONENT_WRAPPER_KEY = (typeof Symbol!=='undefined' && Symbol.for) ? Symbol.for('__preactCompatWrapper') : '__preactCompatWrapper';\n\n// don't autobind these methods since they already have guaranteed context.\nvar AUTOBIND_BLACKLIST = {\n\tconstructor: 1,\n\trender: 1,\n\tshouldComponentUpdate: 1,\n\tcomponentWillReceiveProps: 1,\n\tcomponentWillUpdate: 1,\n\tcomponentDidUpdate: 1,\n\tcomponentWillMount: 1,\n\tcomponentDidMount: 1,\n\tcomponentWillUnmount: 1,\n\tcomponentDidUnmount: 1\n};\n\n\nvar CAMEL_PROPS = /^(?:accent|alignment|arabic|baseline|cap|clip|color|fill|flood|font|glyph|horiz|marker|overline|paint|stop|strikethrough|stroke|text|underline|unicode|units|v|vector|vert|word|writing|x)[A-Z]/;\n\n\nvar BYPASS_HOOK = {};\n\n/*global process*/\nvar DEV = typeof process==='undefined' || !process.env || process.env.NODE_ENV!=='production';\n\n// a component that renders nothing. Used to replace components for unmountComponentAtNode.\nfunction EmptyComponent() { return null; }\n\n\n\n// make react think we're react.\nvar VNode = h('a', null).constructor;\nVNode.prototype.$$typeof = REACT_ELEMENT_TYPE;\nVNode.prototype.preactCompatUpgraded = false;\nVNode.prototype.preactCompatNormalized = false;\n\nObject.defineProperty(VNode.prototype, 'type', {\n\tget: function() { return this.nodeName; },\n\tset: function(v) { this.nodeName = v; },\n\tconfigurable:true\n});\n\nObject.defineProperty(VNode.prototype, 'props', {\n\tget: function() { return this.attributes; },\n\tset: function(v) { this.attributes = v; },\n\tconfigurable:true\n});\n\n\n\nvar oldEventHook = options.event;\noptions.event = function (e) {\n\tif (oldEventHook) { e = oldEventHook(e); }\n\te.persist = Object;\n\te.nativeEvent = e;\n\treturn e;\n};\n\n\nvar oldVnodeHook = options.vnode;\noptions.vnode = function (vnode) {\n\tif (!vnode.preactCompatUpgraded) {\n\t\tvnode.preactCompatUpgraded = true;\n\n\t\tvar tag = vnode.nodeName,\n\t\t\tattrs = vnode.attributes = extend({}, vnode.attributes);\n\n\t\tif (typeof tag==='function') {\n\t\t\tif (tag[COMPONENT_WRAPPER_KEY]===true || (tag.prototype && 'isReactComponent' in tag.prototype)) {\n\t\t\t\tif (vnode.children && String(vnode.children)==='') { vnode.children = undefined; }\n\t\t\t\tif (vnode.children) { attrs.children = vnode.children; }\n\n\t\t\t\tif (!vnode.preactCompatNormalized) {\n\t\t\t\t\tnormalizeVNode(vnode);\n\t\t\t\t}\n\t\t\t\thandleComponentVNode(vnode);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (vnode.children && String(vnode.children)==='') { vnode.children = undefined; }\n\t\t\tif (vnode.children) { attrs.children = vnode.children; }\n\n\t\t\tif (attrs.defaultValue) {\n\t\t\t\tif (!attrs.value && attrs.value!==0) {\n\t\t\t\t\tattrs.value = attrs.defaultValue;\n\t\t\t\t}\n\t\t\t\tdelete attrs.defaultValue;\n\t\t\t}\n\n\t\t\thandleElementVNode(vnode, attrs);\n\t\t}\n\t}\n\n\tif (oldVnodeHook) { oldVnodeHook(vnode); }\n};\n\nfunction handleComponentVNode(vnode) {\n\tvar tag = vnode.nodeName,\n\t\ta = vnode.attributes;\n\n\tvnode.attributes = {};\n\tif (tag.defaultProps) { extend(vnode.attributes, tag.defaultProps); }\n\tif (a) { extend(vnode.attributes, a); }\n}\n\nfunction handleElementVNode(vnode, a) {\n\tvar shouldSanitize, attrs, i;\n\tif (a) {\n\t\tfor (i in a) { if ((shouldSanitize = CAMEL_PROPS.test(i))) { break; } }\n\t\tif (shouldSanitize) {\n\t\t\tattrs = vnode.attributes = {};\n\t\t\tfor (i in a) {\n\t\t\t\tif (a.hasOwnProperty(i)) {\n\t\t\t\t\tattrs[ CAMEL_PROPS.test(i) ? i.replace(/([A-Z0-9])/, '-$1').toLowerCase() : i ] = a[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n\n// proxy render() since React returns a Component reference.\nfunction render$1(vnode, parent, callback) {\n\tvar prev = parent && parent._preactCompatRendered && parent._preactCompatRendered.base;\n\n\t// ignore impossible previous renders\n\tif (prev && prev.parentNode!==parent) { prev = null; }\n\n\t// default to first Element child\n\tif (!prev && parent) { prev = parent.firstElementChild; }\n\n\t// remove unaffected siblings\n\tfor (var i=parent.childNodes.length; i--; ) {\n\t\tif (parent.childNodes[i]!==prev) {\n\t\t\tparent.removeChild(parent.childNodes[i]);\n\t\t}\n\t}\n\n\tvar out = render(vnode, parent, prev);\n\tif (parent) { parent._preactCompatRendered = out && (out._component || { base: out }); }\n\tif (typeof callback==='function') { callback(); }\n\treturn out && out._component || out;\n}\n\n\nvar ContextProvider = function () {};\n\nContextProvider.prototype.getChildContext = function () {\n\treturn this.props.context;\n};\nContextProvider.prototype.render = function (props) {\n\treturn props.children[0];\n};\n\nfunction renderSubtreeIntoContainer(parentComponent, vnode, container, callback) {\n\tvar wrap = h(ContextProvider, { context: parentComponent.context }, vnode);\n\tvar renderContainer = render$1(wrap, container);\n\tvar component = renderContainer._component || renderContainer.base;\n\tif (callback) { callback.call(component, renderContainer); }\n\treturn component;\n}\n\n\nfunction unmountComponentAtNode(container) {\n\tvar existing = container._preactCompatRendered && container._preactCompatRendered.base;\n\tif (existing && existing.parentNode===container) {\n\t\trender(h(EmptyComponent), container, existing);\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n\nvar ARR = [];\n\n// This API is completely unnecessary for Preact, so it's basically passthrough.\nvar Children = {\n\tmap: function(children, fn, ctx) {\n\t\tif (children == null) { return null; }\n\t\tchildren = Children.toArray(children);\n\t\tif (ctx && ctx!==children) { fn = fn.bind(ctx); }\n\t\treturn children.map(fn);\n\t},\n\tforEach: function(children, fn, ctx) {\n\t\tif (children == null) { return null; }\n\t\tchildren = Children.toArray(children);\n\t\tif (ctx && ctx!==children) { fn = fn.bind(ctx); }\n\t\tchildren.forEach(fn);\n\t},\n\tcount: function(children) {\n\t\treturn children && children.length || 0;\n\t},\n\tonly: function(children) {\n\t\tchildren = Children.toArray(children);\n\t\tif (children.length!==1) { throw new Error('Children.only() expects only one child.'); }\n\t\treturn children[0];\n\t},\n\ttoArray: function(children) {\n\t\tif (children == null) { return []; }\n\t\treturn ARR.concat(children);\n\t}\n};\n\n\n/** Track current render() component for ref assignment */\nvar currentComponent;\n\n\nfunction createFactory(type) {\n\treturn createElement.bind(null, type);\n}\n\n\nvar DOM = {};\nfor (var i=ELEMENTS.length; i--; ) {\n\tDOM[ELEMENTS[i]] = createFactory(ELEMENTS[i]);\n}\n\nfunction upgradeToVNodes(arr, offset) {\n\tfor (var i=offset || 0; i<arr.length; i++) {\n\t\tvar obj = arr[i];\n\t\tif (Array.isArray(obj)) {\n\t\t\tupgradeToVNodes(obj);\n\t\t}\n\t\telse if (obj && typeof obj==='object' && !isValidElement(obj) && ((obj.props && obj.type) || (obj.attributes && obj.nodeName) || obj.children)) {\n\t\t\tarr[i] = createElement(obj.type || obj.nodeName, obj.props || obj.attributes, obj.children);\n\t\t}\n\t}\n}\n\nfunction isStatelessComponent(c) {\n\treturn typeof c==='function' && !(c.prototype && c.prototype.render);\n}\n\n\n// wraps stateless functional components in a PropTypes validator\nfunction wrapStatelessComponent(WrappedComponent) {\n\treturn createClass({\n\t\tdisplayName: WrappedComponent.displayName || WrappedComponent.name,\n\t\trender: function() {\n\t\t\treturn WrappedComponent(this.props, this.context);\n\t\t}\n\t});\n}\n\n\nfunction statelessComponentHook(Ctor) {\n\tvar Wrapped = Ctor[COMPONENT_WRAPPER_KEY];\n\tif (Wrapped) { return Wrapped===true ? Ctor : Wrapped; }\n\n\tWrapped = wrapStatelessComponent(Ctor);\n\n\tObject.defineProperty(Wrapped, COMPONENT_WRAPPER_KEY, { configurable:true, value:true });\n\tWrapped.displayName = Ctor.displayName;\n\tWrapped.propTypes = Ctor.propTypes;\n\tWrapped.defaultProps = Ctor.defaultProps;\n\n\tObject.defineProperty(Ctor, COMPONENT_WRAPPER_KEY, { configurable:true, value:Wrapped });\n\n\treturn Wrapped;\n}\n\n\nfunction createElement() {\n\tvar args = [], len = arguments.length;\n\twhile ( len-- ) args[ len ] = arguments[ len ];\n\n\tupgradeToVNodes(args, 2);\n\treturn normalizeVNode(h.apply(void 0, args));\n}\n\n\nfunction normalizeVNode(vnode) {\n\tvnode.preactCompatNormalized = true;\n\n\tapplyClassName(vnode);\n\n\tif (isStatelessComponent(vnode.nodeName)) {\n\t\tvnode.nodeName = statelessComponentHook(vnode.nodeName);\n\t}\n\n\tvar ref = vnode.attributes.ref,\n\t\ttype = ref && typeof ref;\n\tif (currentComponent && (type==='string' || type==='number')) {\n\t\tvnode.attributes.ref = createStringRefProxy(ref, currentComponent);\n\t}\n\n\tapplyEventNormalization(vnode);\n\n\treturn vnode;\n}\n\n\nfunction cloneElement$1(element, props) {\n\tvar children = [], len = arguments.length - 2;\n\twhile ( len-- > 0 ) children[ len ] = arguments[ len + 2 ];\n\n\tif (!isValidElement(element)) { return element; }\n\tvar elementProps = element.attributes || element.props;\n\tvar node = h(\n\t\telement.nodeName || element.type,\n\t\textend({}, elementProps),\n\t\telement.children || elementProps && elementProps.children\n\t);\n\t// Only provide the 3rd argument if needed.\n\t// Arguments 3+ overwrite element.children in preactCloneElement\n\tvar cloneArgs = [node, props];\n\tif (children && children.length) {\n\t\tcloneArgs.push(children);\n\t}\n\telse if (props && props.children) {\n\t\tcloneArgs.push(props.children);\n\t}\n\treturn normalizeVNode(cloneElement.apply(void 0, cloneArgs));\n}\n\n\nfunction isValidElement(element) {\n\treturn element && ((element instanceof VNode) || element.$$typeof===REACT_ELEMENT_TYPE);\n}\n\n\nfunction createStringRefProxy(name, component) {\n\treturn component._refProxies[name] || (component._refProxies[name] = function (resolved) {\n\t\tif (component && component.refs) {\n\t\t\tcomponent.refs[name] = resolved;\n\t\t\tif (resolved===null) {\n\t\t\t\tdelete component._refProxies[name];\n\t\t\t\tcomponent = null;\n\t\t\t}\n\t\t}\n\t});\n}\n\n\nfunction applyEventNormalization(ref) {\n\tvar nodeName = ref.nodeName;\n\tvar attributes = ref.attributes;\n\n\tif (!attributes || typeof nodeName!=='string') { return; }\n\tvar props = {};\n\tfor (var i in attributes) {\n\t\tprops[i.toLowerCase()] = i;\n\t}\n\tif (props.ondoubleclick) {\n\t\tattributes.ondblclick = attributes[props.ondoubleclick];\n\t\tdelete attributes[props.ondoubleclick];\n\t}\n\t// for *textual inputs* (incl textarea), normalize `onChange` -> `onInput`:\n\tif (props.onchange && (nodeName==='textarea' || (nodeName.toLowerCase()==='input' && !/^fil|che|rad/i.test(attributes.type)))) {\n\t\tvar normalized = props.oninput || 'oninput';\n\t\tif (!attributes[normalized]) {\n\t\t\tattributes[normalized] = multihook([attributes[normalized], attributes[props.onchange]]);\n\t\t\tdelete attributes[props.onchange];\n\t\t}\n\t}\n}\n\n\nfunction applyClassName(vnode) {\n\tvar a = vnode.attributes || (vnode.attributes = {});\n\tclassNameDescriptor.enumerable = 'className' in a;\n\tif (a.className) { a.class = a.className; }\n\tObject.defineProperty(a, 'className', classNameDescriptor);\n}\n\n\nvar classNameDescriptor = {\n\tconfigurable: true,\n\tget: function() { return this.class; },\n\tset: function(v) { this.class = v; }\n};\n\nfunction extend(base, props) {\n\tvar arguments$1 = arguments;\n\n\tfor (var i=1, obj = (void 0); i<arguments.length; i++) {\n\t\tif ((obj = arguments$1[i])) {\n\t\t\tfor (var key in obj) {\n\t\t\t\tif (obj.hasOwnProperty(key)) {\n\t\t\t\t\tbase[key] = obj[key];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn base;\n}\n\n\nfunction shallowDiffers(a, b) {\n\tfor (var i in a) { if (!(i in b)) { return true; } }\n\tfor (var i$1 in b) { if (a[i$1]!==b[i$1]) { return true; } }\n\treturn false;\n}\n\n\nfunction findDOMNode(component) {\n\treturn component && component.base || component;\n}\n\n\nfunction F(){}\n\nfunction createClass(obj) {\n\tfunction cl(props, context) {\n\t\tbindAll(this);\n\t\tComponent$1.call(this, props, context, BYPASS_HOOK);\n\t\tnewComponentHook.call(this, props, context);\n\t}\n\n\tobj = extend({ constructor: cl }, obj);\n\n\t// We need to apply mixins here so that getDefaultProps is correctly mixed\n\tif (obj.mixins) {\n\t\tapplyMixins(obj, collateMixins(obj.mixins));\n\t}\n\tif (obj.statics) {\n\t\textend(cl, obj.statics);\n\t}\n\tif (obj.propTypes) {\n\t\tcl.propTypes = obj.propTypes;\n\t}\n\tif (obj.defaultProps) {\n\t\tcl.defaultProps = obj.defaultProps;\n\t}\n\tif (obj.getDefaultProps) {\n\t\tcl.defaultProps = obj.getDefaultProps.call(cl);\n\t}\n\n\tF.prototype = Component$1.prototype;\n\tcl.prototype = extend(new F(), obj);\n\n\tcl.displayName = obj.displayName || 'Component';\n\n\treturn cl;\n}\n\n\n// Flatten an Array of mixins to a map of method name to mixin implementations\nfunction collateMixins(mixins) {\n\tvar keyed = {};\n\tfor (var i=0; i<mixins.length; i++) {\n\t\tvar mixin = mixins[i];\n\t\tfor (var key in mixin) {\n\t\t\tif (mixin.hasOwnProperty(key) && typeof mixin[key]==='function') {\n\t\t\t\t(keyed[key] || (keyed[key]=[])).push(mixin[key]);\n\t\t\t}\n\t\t}\n\t}\n\treturn keyed;\n}\n\n\n// apply a mapping of Arrays of mixin methods to a component prototype\nfunction applyMixins(proto, mixins) {\n\tfor (var key in mixins) { if (mixins.hasOwnProperty(key)) {\n\t\tproto[key] = multihook(\n\t\t\tmixins[key].concat(proto[key] || ARR),\n\t\t\tkey==='getDefaultProps' || key==='getInitialState' || key==='getChildContext'\n\t\t);\n\t} }\n}\n\n\nfunction bindAll(ctx) {\n\tfor (var i in ctx) {\n\t\tvar v = ctx[i];\n\t\tif (typeof v==='function' && !v.__bound && !AUTOBIND_BLACKLIST.hasOwnProperty(i)) {\n\t\t\t(ctx[i] = v.bind(ctx)).__bound = true;\n\t\t}\n\t}\n}\n\n\nfunction callMethod(ctx, m, args) {\n\tif (typeof m==='string') {\n\t\tm = ctx.constructor.prototype[m];\n\t}\n\tif (typeof m==='function') {\n\t\treturn m.apply(ctx, args);\n\t}\n}\n\nfunction multihook(hooks, skipDuplicates) {\n\treturn function() {\n\t\tvar arguments$1 = arguments;\n\t\tvar this$1 = this;\n\n\t\tvar ret;\n\t\tfor (var i=0; i<hooks.length; i++) {\n\t\t\tvar r = callMethod(this$1, hooks[i], arguments$1);\n\n\t\t\tif (skipDuplicates && r!=null) {\n\t\t\t\tif (!ret) { ret = {}; }\n\t\t\t\tfor (var key in r) { if (r.hasOwnProperty(key)) {\n\t\t\t\t\tret[key] = r[key];\n\t\t\t\t} }\n\t\t\t}\n\t\t\telse if (typeof r!=='undefined') { ret = r; }\n\t\t}\n\t\treturn ret;\n\t};\n}\n\n\nfunction newComponentHook(props, context) {\n\tpropsHook.call(this, props, context);\n\tthis.componentWillReceiveProps = multihook([propsHook, this.componentWillReceiveProps || 'componentWillReceiveProps']);\n\tthis.render = multihook([propsHook, beforeRender, this.render || 'render', afterRender]);\n}\n\n\nfunction propsHook(props, context) {\n\tif (!props) { return; }\n\n\t// React annoyingly special-cases single children, and some react components are ridiculously strict about this.\n\tvar c = props.children;\n\tif (c && Array.isArray(c) && c.length===1 && (typeof c[0]==='string' || typeof c[0]==='function' || c[0] instanceof VNode)) {\n\t\tprops.children = c[0];\n\n\t\t// but its totally still going to be an Array.\n\t\tif (props.children && typeof props.children==='object') {\n\t\t\tprops.children.length = 1;\n\t\t\tprops.children[0] = props.children;\n\t\t}\n\t}\n\n\t// add proptype checking\n\tif (DEV) {\n\t\tvar ctor = typeof this==='function' ? this : this.constructor,\n\t\t\tpropTypes = this.propTypes || ctor.propTypes;\n\t\tvar displayName = this.displayName || ctor.name;\n\n\t\tif (propTypes) {\n\t\t\tPropTypes.checkPropTypes(propTypes, props, 'prop', displayName);\n\t\t}\n\t}\n}\n\n\nfunction beforeRender(props) {\n\tcurrentComponent = this;\n}\n\nfunction afterRender() {\n\tif (currentComponent===this) {\n\t\tcurrentComponent = null;\n\t}\n}\n\n\n\nfunction Component$1(props, context, opts) {\n\tComponent.call(this, props, context);\n\tthis.state = this.getInitialState ? this.getInitialState() : {};\n\tthis.refs = {};\n\tthis._refProxies = {};\n\tif (opts!==BYPASS_HOOK) {\n\t\tnewComponentHook.call(this, props, context);\n\t}\n}\nextend(Component$1.prototype = new Component(), {\n\tconstructor: Component$1,\n\n\tisReactComponent: {},\n\n\treplaceState: function(state, callback) {\n\t\tvar this$1 = this;\n\n\t\tthis.setState(state, callback);\n\t\tfor (var i in this$1.state) {\n\t\t\tif (!(i in state)) {\n\t\t\t\tdelete this$1.state[i];\n\t\t\t}\n\t\t}\n\t},\n\n\tgetDOMNode: function() {\n\t\treturn this.base;\n\t},\n\n\tisMounted: function() {\n\t\treturn !!this.base;\n\t}\n});\n\n\n\nfunction PureComponent(props, context) {\n\tComponent$1.call(this, props, context);\n}\nF.prototype = Component$1.prototype;\nPureComponent.prototype = new F();\nPureComponent.prototype.isPureReactComponent = true;\nPureComponent.prototype.shouldComponentUpdate = function(props, state) {\n\treturn shallowDiffers(this.props, props) || shallowDiffers(this.state, state);\n};\n\nvar index = {\n\tversion: version,\n\tDOM: DOM,\n\tPropTypes: PropTypes,\n\tChildren: Children,\n\trender: render$1,\n\tcreateClass: createClass,\n\tcreateFactory: createFactory,\n\tcreateElement: createElement,\n\tcloneElement: cloneElement$1,\n\tisValidElement: isValidElement,\n\tfindDOMNode: findDOMNode,\n\tunmountComponentAtNode: unmountComponentAtNode,\n\tComponent: Component$1,\n\tPureComponent: PureComponent,\n\tunstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer,\n\t__spread: extend\n};\n\nexport { version, DOM, PropTypes, Children, render$1 as render, createClass, createFactory, createElement, cloneElement$1 as cloneElement, isValidElement, findDOMNode, unmountComponentAtNode, Component$1 as Component, PureComponent, renderSubtreeIntoContainer as unstable_renderSubtreeIntoContainer, extend as __spread };export default index;\n//# sourceMappingURL=preact-compat.es.js.map\n","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n  return function () {\n    return arg;\n  };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n  return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n  return arg;\n};\n\nmodule.exports = emptyFunction;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n  validateFormat = function validateFormat(format) {\n    if (format === undefined) {\n      throw new Error('invariant requires an error message argument');\n    }\n  };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n  validateFormat(format);\n\n  if (!condition) {\n    var error;\n    if (format === undefined) {\n      error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n    } else {\n      var args = [a, b, c, d, e, f];\n      var argIndex = 0;\n      error = new Error(format.replace(/%s/g, function () {\n        return args[argIndex++];\n      }));\n      error.name = 'Invariant Violation';\n    }\n\n    error.framesToPop = 1; // we don't care about invariant's own frame\n    throw error;\n  }\n}\n\nmodule.exports = invariant;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar emptyFunction = require('./emptyFunction');\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = emptyFunction;\n\nif (process.env.NODE_ENV !== 'production') {\n  var printWarning = function printWarning(format) {\n    for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n      args[_key - 1] = arguments[_key];\n    }\n\n    var argIndex = 0;\n    var message = 'Warning: ' + format.replace(/%s/g, function () {\n      return args[argIndex++];\n    });\n    if (typeof console !== 'undefined') {\n      console.error(message);\n    }\n    try {\n      // --- Welcome to debugging React ---\n      // This error was thrown as a convenience so that you can use this stack\n      // to find the callsite that caused this warning to fire.\n      throw new Error(message);\n    } catch (x) {}\n  };\n\n  warning = function warning(condition, format) {\n    if (format === undefined) {\n      throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n    }\n\n    if (format.indexOf('Failed Composite propType: ') === 0) {\n      return; // Ignore CompositeComponent proptype check.\n    }\n\n    if (!condition) {\n      for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n        args[_key2 - 2] = arguments[_key2];\n      }\n\n      printWarning.apply(undefined, [format].concat(args));\n    }\n  };\n}\n\nmodule.exports = warning;","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc');  // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== 'production') {\n  var invariant = require('fbjs/lib/invariant');\n  var warning = require('fbjs/lib/warning');\n  var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n  var loggedTypeFailures = {};\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n  if (process.env.NODE_ENV !== 'production') {\n    for (var typeSpecName in typeSpecs) {\n      if (typeSpecs.hasOwnProperty(typeSpecName)) {\n        var error;\n        // Prop type validation may throw. In case they do, we don't want to\n        // fail the render phase where it didn't fail before. So we log it.\n        // After these have been cleaned up, we'll let them throw.\n        try {\n          // This is intentionally an invariant that gets caught. It's the same\n          // behavior as without this statement except with a better message.\n          invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);\n          error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n        } catch (ex) {\n          error = ex;\n        }\n        warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);\n        if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n          // Only monitor this failure once because there tends to be a lot of the\n          // same error.\n          loggedTypeFailures[error.message] = true;\n\n          var stack = getStack ? getStack() : '';\n\n          warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');\n        }\n      }\n    }\n  }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n  /* global Symbol */\n  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n  /**\n   * Returns the iterator method function contained on the iterable object.\n   *\n   * Be sure to invoke the function with the iterable as context:\n   *\n   *     var iteratorFn = getIteratorFn(myIterable);\n   *     if (iteratorFn) {\n   *       var iterator = iteratorFn.call(myIterable);\n   *       ...\n   *     }\n   *\n   * @param {?object} maybeIterable\n   * @return {?function}\n   */\n  function getIteratorFn(maybeIterable) {\n    var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n    if (typeof iteratorFn === 'function') {\n      return iteratorFn;\n    }\n  }\n\n  /**\n   * Collection of methods that allow declaration and validation of props that are\n   * supplied to React components. Example usage:\n   *\n   *   var Props = require('ReactPropTypes');\n   *   var MyArticle = React.createClass({\n   *     propTypes: {\n   *       // An optional string prop named \"description\".\n   *       description: Props.string,\n   *\n   *       // A required enum prop named \"category\".\n   *       category: Props.oneOf(['News','Photos']).isRequired,\n   *\n   *       // A prop named \"dialog\" that requires an instance of Dialog.\n   *       dialog: Props.instanceOf(Dialog).isRequired\n   *     },\n   *     render: function() { ... }\n   *   });\n   *\n   * A more formal specification of how these methods are used:\n   *\n   *   type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n   *   decl := ReactPropTypes.{type}(.isRequired)?\n   *\n   * Each and every declaration produces a function with the same signature. This\n   * allows the creation of custom validation functions. For example:\n   *\n   *  var MyLink = React.createClass({\n   *    propTypes: {\n   *      // An optional string or URI prop named \"href\".\n   *      href: function(props, propName, componentName) {\n   *        var propValue = props[propName];\n   *        if (propValue != null && typeof propValue !== 'string' &&\n   *            !(propValue instanceof URI)) {\n   *          return new Error(\n   *            'Expected a string or an URI for ' + propName + ' in ' +\n   *            componentName\n   *          );\n   *        }\n   *      }\n   *    },\n   *    render: function() {...}\n   *  });\n   *\n   * @internal\n   */\n\n  var ANONYMOUS = '<<anonymous>>';\n\n  // Important!\n  // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n  var ReactPropTypes = {\n    array: createPrimitiveTypeChecker('array'),\n    bool: createPrimitiveTypeChecker('boolean'),\n    func: createPrimitiveTypeChecker('function'),\n    number: createPrimitiveTypeChecker('number'),\n    object: createPrimitiveTypeChecker('object'),\n    string: createPrimitiveTypeChecker('string'),\n    symbol: createPrimitiveTypeChecker('symbol'),\n\n    any: createAnyTypeChecker(),\n    arrayOf: createArrayOfTypeChecker,\n    element: createElementTypeChecker(),\n    instanceOf: createInstanceTypeChecker,\n    node: createNodeChecker(),\n    objectOf: createObjectOfTypeChecker,\n    oneOf: createEnumTypeChecker,\n    oneOfType: createUnionTypeChecker,\n    shape: createShapeTypeChecker,\n    exact: createStrictShapeTypeChecker,\n  };\n\n  /**\n   * inlined Object.is polyfill to avoid requiring consumers ship their own\n   * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n   */\n  /*eslint-disable no-self-compare*/\n  function is(x, y) {\n    // SameValue algorithm\n    if (x === y) {\n      // Steps 1-5, 7-10\n      // Steps 6.b-6.e: +0 != -0\n      return x !== 0 || 1 / x === 1 / y;\n    } else {\n      // Step 6.a: NaN == NaN\n      return x !== x && y !== y;\n    }\n  }\n  /*eslint-enable no-self-compare*/\n\n  /**\n   * We use an Error-like object for backward compatibility as people may call\n   * PropTypes directly and inspect their output. However, we don't use real\n   * Errors anymore. We don't inspect their stack anyway, and creating them\n   * is prohibitively expensive if they are created too often, such as what\n   * happens in oneOfType() for any type before the one that matched.\n   */\n  function PropTypeError(message) {\n    this.message = message;\n    this.stack = '';\n  }\n  // Make `instanceof Error` still work for returned errors.\n  PropTypeError.prototype = Error.prototype;\n\n  function createChainableTypeChecker(validate) {\n    if (process.env.NODE_ENV !== 'production') {\n      var manualPropTypeCallCache = {};\n      var manualPropTypeWarningCount = 0;\n    }\n    function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n      componentName = componentName || ANONYMOUS;\n      propFullName = propFullName || propName;\n\n      if (secret !== ReactPropTypesSecret) {\n        if (throwOnDirectAccess) {\n          // New behavior only for users of `prop-types` package\n          invariant(\n            false,\n            'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n            'Use `PropTypes.checkPropTypes()` to call them. ' +\n            'Read more at http://fb.me/use-check-prop-types'\n          );\n        } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n          // Old behavior for people using React.PropTypes\n          var cacheKey = componentName + ':' + propName;\n          if (\n            !manualPropTypeCallCache[cacheKey] &&\n            // Avoid spamming the console because they are often not actionable except for lib authors\n            manualPropTypeWarningCount < 3\n          ) {\n            warning(\n              false,\n              'You are manually calling a React.PropTypes validation ' +\n              'function for the `%s` prop on `%s`. This is deprecated ' +\n              'and will throw in the standalone `prop-types` package. ' +\n              'You may be seeing this warning due to a third-party PropTypes ' +\n              'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',\n              propFullName,\n              componentName\n            );\n            manualPropTypeCallCache[cacheKey] = true;\n            manualPropTypeWarningCount++;\n          }\n        }\n      }\n      if (props[propName] == null) {\n        if (isRequired) {\n          if (props[propName] === null) {\n            return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n          }\n          return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n        }\n        return null;\n      } else {\n        return validate(props, propName, componentName, location, propFullName);\n      }\n    }\n\n    var chainedCheckType = checkType.bind(null, false);\n    chainedCheckType.isRequired = checkType.bind(null, true);\n\n    return chainedCheckType;\n  }\n\n  function createPrimitiveTypeChecker(expectedType) {\n    function validate(props, propName, componentName, location, propFullName, secret) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== expectedType) {\n        // `propValue` being instance of, say, date/regexp, pass the 'object'\n        // check, but we can offer a more precise error message here rather than\n        // 'of type `object`'.\n        var preciseType = getPreciseType(propValue);\n\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createAnyTypeChecker() {\n    return createChainableTypeChecker(emptyFunction.thatReturnsNull);\n  }\n\n  function createArrayOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n      }\n      var propValue = props[propName];\n      if (!Array.isArray(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n      }\n      for (var i = 0; i < propValue.length; i++) {\n        var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n        if (error instanceof Error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createElementTypeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      if (!isValidElement(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createInstanceTypeChecker(expectedClass) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!(props[propName] instanceof expectedClass)) {\n        var expectedClassName = expectedClass.name || ANONYMOUS;\n        var actualClassName = getClassName(props[propName]);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createEnumTypeChecker(expectedValues) {\n    if (!Array.isArray(expectedValues)) {\n      process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;\n      return emptyFunction.thatReturnsNull;\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      for (var i = 0; i < expectedValues.length; i++) {\n        if (is(propValue, expectedValues[i])) {\n          return null;\n        }\n      }\n\n      var valuesString = JSON.stringify(expectedValues);\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createObjectOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n      }\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n      }\n      for (var key in propValue) {\n        if (propValue.hasOwnProperty(key)) {\n          var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n          if (error instanceof Error) {\n            return error;\n          }\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createUnionTypeChecker(arrayOfTypeCheckers) {\n    if (!Array.isArray(arrayOfTypeCheckers)) {\n      process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n      return emptyFunction.thatReturnsNull;\n    }\n\n    for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n      var checker = arrayOfTypeCheckers[i];\n      if (typeof checker !== 'function') {\n        warning(\n          false,\n          'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n          'received %s at index %s.',\n          getPostfixForTypeWarning(checker),\n          i\n        );\n        return emptyFunction.thatReturnsNull;\n      }\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n        var checker = arrayOfTypeCheckers[i];\n        if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n          return null;\n        }\n      }\n\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createNodeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!isNode(props[propName])) {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      for (var key in shapeTypes) {\n        var checker = shapeTypes[key];\n        if (!checker) {\n          continue;\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createStrictShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      // We need to check all keys in case some are required but missing from\n      // props.\n      var allKeys = assign({}, props[propName], shapeTypes);\n      for (var key in allKeys) {\n        var checker = shapeTypes[key];\n        if (!checker) {\n          return new PropTypeError(\n            'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n            '\\nBad object: ' + JSON.stringify(props[propName], null, '  ') +\n            '\\nValid keys: ' +  JSON.stringify(Object.keys(shapeTypes), null, '  ')\n          );\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n\n    return createChainableTypeChecker(validate);\n  }\n\n  function isNode(propValue) {\n    switch (typeof propValue) {\n      case 'number':\n      case 'string':\n      case 'undefined':\n        return true;\n      case 'boolean':\n        return !propValue;\n      case 'object':\n        if (Array.isArray(propValue)) {\n          return propValue.every(isNode);\n        }\n        if (propValue === null || isValidElement(propValue)) {\n          return true;\n        }\n\n        var iteratorFn = getIteratorFn(propValue);\n        if (iteratorFn) {\n          var iterator = iteratorFn.call(propValue);\n          var step;\n          if (iteratorFn !== propValue.entries) {\n            while (!(step = iterator.next()).done) {\n              if (!isNode(step.value)) {\n                return false;\n              }\n            }\n          } else {\n            // Iterator will provide entry [k,v] tuples rather than values.\n            while (!(step = iterator.next()).done) {\n              var entry = step.value;\n              if (entry) {\n                if (!isNode(entry[1])) {\n                  return false;\n                }\n              }\n            }\n          }\n        } else {\n          return false;\n        }\n\n        return true;\n      default:\n        return false;\n    }\n  }\n\n  function isSymbol(propType, propValue) {\n    // Native Symbol.\n    if (propType === 'symbol') {\n      return true;\n    }\n\n    // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n    if (propValue['@@toStringTag'] === 'Symbol') {\n      return true;\n    }\n\n    // Fallback for non-spec compliant Symbols which are polyfilled.\n    if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n      return true;\n    }\n\n    return false;\n  }\n\n  // Equivalent of `typeof` but with special handling for array and regexp.\n  function getPropType(propValue) {\n    var propType = typeof propValue;\n    if (Array.isArray(propValue)) {\n      return 'array';\n    }\n    if (propValue instanceof RegExp) {\n      // Old webkits (at least until Android 4.0) return 'function' rather than\n      // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n      // passes PropTypes.object.\n      return 'object';\n    }\n    if (isSymbol(propType, propValue)) {\n      return 'symbol';\n    }\n    return propType;\n  }\n\n  // This handles more types than `getPropType`. Only used for error messages.\n  // See `createPrimitiveTypeChecker`.\n  function getPreciseType(propValue) {\n    if (typeof propValue === 'undefined' || propValue === null) {\n      return '' + propValue;\n    }\n    var propType = getPropType(propValue);\n    if (propType === 'object') {\n      if (propValue instanceof Date) {\n        return 'date';\n      } else if (propValue instanceof RegExp) {\n        return 'regexp';\n      }\n    }\n    return propType;\n  }\n\n  // Returns a string that is postfixed to a warning about an invalid type.\n  // For example, \"undefined\" or \"of type array\"\n  function getPostfixForTypeWarning(value) {\n    var type = getPreciseType(value);\n    switch (type) {\n      case 'array':\n      case 'object':\n        return 'an ' + type;\n      case 'boolean':\n      case 'date':\n      case 'regexp':\n        return 'a ' + type;\n      default:\n        return type;\n    }\n  }\n\n  // Returns class name of the object, if any.\n  function getClassName(propValue) {\n    if (!propValue.constructor || !propValue.constructor.name) {\n      return ANONYMOUS;\n    }\n    return propValue.constructor.name;\n  }\n\n  ReactPropTypes.checkPropTypes = checkPropTypes;\n  ReactPropTypes.PropTypes = ReactPropTypes;\n\n  return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n  var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n    Symbol.for &&\n    Symbol.for('react.element')) ||\n    0xeac7;\n\n  var isValidElement = function(object) {\n    return typeof object === 'object' &&\n      object !== null &&\n      object.$$typeof === REACT_ELEMENT_TYPE;\n  };\n\n  // By explicitly using `prop-types` you are opting into new development behavior.\n  // http://fb.me/prop-types-in-prod\n  var throwOnDirectAccess = true;\n  module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n  // By explicitly using `prop-types` you are opting into new production behavior.\n  // http://fb.me/prop-types-in-prod\n  module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/** Virtual DOM Node */\nfunction VNode() {}\n\n/** Global options\n *\t@public\n *\t@namespace options {Object}\n */\nvar options = {\n\n\t/** If `true`, `prop` changes trigger synchronous component updates.\n  *\t@name syncComponentUpdates\n  *\t@type Boolean\n  *\t@default true\n  */\n\t//syncComponentUpdates: true,\n\n\t/** Processes all created VNodes.\n  *\t@param {VNode} vnode\tA newly-created VNode to normalize/process\n  */\n\t//vnode(vnode) { }\n\n\t/** Hook invoked after a component is mounted. */\n\t// afterMount(component) { }\n\n\t/** Hook invoked after the DOM is updated with a component's latest render. */\n\t// afterUpdate(component) { }\n\n\t/** Hook invoked immediately before a component is unmounted. */\n\t// beforeUnmount(component) { }\n};\n\nvar stack = [];\n\nvar EMPTY_CHILDREN = [];\n\n/**\n * JSX/hyperscript reviver.\n * @see http://jasonformat.com/wtf-is-jsx\n * Benchmarks: https://esbench.com/bench/57ee8f8e330ab09900a1a1a0\n *\n * Note: this is exported as both `h()` and `createElement()` for compatibility reasons.\n *\n * Creates a VNode (virtual DOM element). A tree of VNodes can be used as a lightweight representation\n * of the structure of a DOM tree. This structure can be realized by recursively comparing it against\n * the current _actual_ DOM structure, and applying only the differences.\n *\n * `h()`/`createElement()` accepts an element name, a list of attributes/props,\n * and optionally children to append to the element.\n *\n * @example The following DOM tree\n *\n * `<div id=\"foo\" name=\"bar\">Hello!</div>`\n *\n * can be constructed using this function as:\n *\n * `h('div', { id: 'foo', name : 'bar' }, 'Hello!');`\n *\n * @param {string} nodeName\tAn element name. Ex: `div`, `a`, `span`, etc.\n * @param {Object} attributes\tAny attributes/props to set on the created element.\n * @param rest\t\t\tAdditional arguments are taken to be children to append. Can be infinitely nested Arrays.\n *\n * @public\n */\nfunction h(nodeName, attributes) {\n\tvar children = EMPTY_CHILDREN,\n\t    lastSimple,\n\t    child,\n\t    simple,\n\t    i;\n\tfor (i = arguments.length; i-- > 2;) {\n\t\tstack.push(arguments[i]);\n\t}\n\tif (attributes && attributes.children != null) {\n\t\tif (!stack.length) stack.push(attributes.children);\n\t\tdelete attributes.children;\n\t}\n\twhile (stack.length) {\n\t\tif ((child = stack.pop()) && child.pop !== undefined) {\n\t\t\tfor (i = child.length; i--;) {\n\t\t\t\tstack.push(child[i]);\n\t\t\t}\n\t\t} else {\n\t\t\tif (typeof child === 'boolean') child = null;\n\n\t\t\tif (simple = typeof nodeName !== 'function') {\n\t\t\t\tif (child == null) child = '';else if (typeof child === 'number') child = String(child);else if (typeof child !== 'string') simple = false;\n\t\t\t}\n\n\t\t\tif (simple && lastSimple) {\n\t\t\t\tchildren[children.length - 1] += child;\n\t\t\t} else if (children === EMPTY_CHILDREN) {\n\t\t\t\tchildren = [child];\n\t\t\t} else {\n\t\t\t\tchildren.push(child);\n\t\t\t}\n\n\t\t\tlastSimple = simple;\n\t\t}\n\t}\n\n\tvar p = new VNode();\n\tp.nodeName = nodeName;\n\tp.children = children;\n\tp.attributes = attributes == null ? undefined : attributes;\n\tp.key = attributes == null ? undefined : attributes.key;\n\n\t// if a \"vnode hook\" is defined, pass every created VNode to it\n\tif (options.vnode !== undefined) options.vnode(p);\n\n\treturn p;\n}\n\n/**\n *  Copy all properties from `props` onto `obj`.\n *  @param {Object} obj\t\tObject onto which properties should be copied.\n *  @param {Object} props\tObject from which to copy properties.\n *  @returns obj\n *  @private\n */\nfunction extend(obj, props) {\n  for (var i in props) {\n    obj[i] = props[i];\n  }return obj;\n}\n\n/**\n * Call a function asynchronously, as soon as possible. Makes\n * use of HTML Promise to schedule the callback if available,\n * otherwise falling back to `setTimeout` (mainly for IE<11).\n *\n * @param {Function} callback\n */\nvar defer = typeof Promise == 'function' ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\n * @param {VNode} vnode\t\tThe virtual DOM element to clone\n * @param {Object} props\tAttributes/props to add when cloning\n * @param {VNode} rest\t\tAny additional arguments will be used as replacement children.\n */\nfunction cloneElement(vnode, props) {\n  return h(vnode.nodeName, extend(extend({}, vnode.attributes), props), arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children);\n}\n\n// DOM properties that should NOT have \"px\" added when numeric\nvar IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;\n\n/** Managed queue of dirty components to be re-rendered */\n\nvar items = [];\n\nfunction enqueueRender(component) {\n\tif (!component._dirty && (component._dirty = true) && items.push(component) == 1) {\n\t\t(options.debounceRendering || defer)(rerender);\n\t}\n}\n\nfunction rerender() {\n\tvar p,\n\t    list = items;\n\titems = [];\n\twhile (p = list.pop()) {\n\t\tif (p._dirty) renderComponent(p);\n\t}\n}\n\n/**\n * Check if two nodes are equivalent.\n *\n * @param {Node} node\t\t\tDOM Node to compare\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\n * @private\n */\nfunction isSameNodeType(node, vnode, hydrating) {\n  if (typeof vnode === 'string' || typeof vnode === 'number') {\n    return node.splitText !== undefined;\n  }\n  if (typeof vnode.nodeName === 'string') {\n    return !node._componentConstructor && isNamedNode(node, vnode.nodeName);\n  }\n  return hydrating || node._componentConstructor === vnode.nodeName;\n}\n\n/**\n * Check if an Element has a given nodeName, case-insensitively.\n *\n * @param {Element} node\tA DOM Element to inspect the name of.\n * @param {String} nodeName\tUnnormalized name to compare against.\n */\nfunction isNamedNode(node, nodeName) {\n  return node.normalizedNodeName === nodeName || node.nodeName.toLowerCase() === nodeName.toLowerCase();\n}\n\n/**\n * Reconstruct Component-style `props` from a VNode.\n * Ensures default/fallback values from `defaultProps`:\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\n *\n * @param {VNode} vnode\n * @returns {Object} props\n */\nfunction getNodeProps(vnode) {\n  var props = extend({}, vnode.attributes);\n  props.children = vnode.children;\n\n  var defaultProps = vnode.nodeName.defaultProps;\n  if (defaultProps !== undefined) {\n    for (var i in defaultProps) {\n      if (props[i] === undefined) {\n        props[i] = defaultProps[i];\n      }\n    }\n  }\n\n  return props;\n}\n\n/** Create an element with the given nodeName.\n *\t@param {String} nodeName\n *\t@param {Boolean} [isSvg=false]\tIf `true`, creates an element within the SVG namespace.\n *\t@returns {Element} node\n */\nfunction createNode(nodeName, isSvg) {\n\tvar node = isSvg ? document.createElementNS('http://www.w3.org/2000/svg', nodeName) : document.createElement(nodeName);\n\tnode.normalizedNodeName = nodeName;\n\treturn node;\n}\n\n/** Remove a child node from its parent if attached.\n *\t@param {Element} node\t\tThe node to remove\n */\nfunction removeNode(node) {\n\tvar parentNode = node.parentNode;\n\tif (parentNode) parentNode.removeChild(node);\n}\n\n/** Set a named attribute on the given Node, with special behavior for some names and event handlers.\n *\tIf `value` is `null`, the attribute/handler will be removed.\n *\t@param {Element} node\tAn element to mutate\n *\t@param {string} name\tThe name/key to set, such as an event or attribute name\n *\t@param {any} old\tThe last value that was set for this name/node pair\n *\t@param {any} value\tAn attribute value, such as a function to be used as an event handler\n *\t@param {Boolean} isSvg\tAre we currently diffing inside an svg?\n *\t@private\n */\nfunction setAccessor(node, name, old, value, isSvg) {\n\tif (name === 'className') name = 'class';\n\n\tif (name === 'key') {\n\t\t// ignore\n\t} else if (name === 'ref') {\n\t\tif (old) old(null);\n\t\tif (value) value(node);\n\t} else if (name === 'class' && !isSvg) {\n\t\tnode.className = value || '';\n\t} else if (name === 'style') {\n\t\tif (!value || typeof value === 'string' || typeof old === 'string') {\n\t\t\tnode.style.cssText = value || '';\n\t\t}\n\t\tif (value && typeof value === 'object') {\n\t\t\tif (typeof old !== 'string') {\n\t\t\t\tfor (var i in old) {\n\t\t\t\t\tif (!(i in value)) node.style[i] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (var i in value) {\n\t\t\t\tnode.style[i] = typeof value[i] === 'number' && IS_NON_DIMENSIONAL.test(i) === false ? value[i] + 'px' : value[i];\n\t\t\t}\n\t\t}\n\t} else if (name === 'dangerouslySetInnerHTML') {\n\t\tif (value) node.innerHTML = value.__html || '';\n\t} else if (name[0] == 'o' && name[1] == 'n') {\n\t\tvar useCapture = name !== (name = name.replace(/Capture$/, ''));\n\t\tname = name.toLowerCase().substring(2);\n\t\tif (value) {\n\t\t\tif (!old) node.addEventListener(name, eventProxy, useCapture);\n\t\t} else {\n\t\t\tnode.removeEventListener(name, eventProxy, useCapture);\n\t\t}\n\t\t(node._listeners || (node._listeners = {}))[name] = value;\n\t} else if (name !== 'list' && name !== 'type' && !isSvg && name in node) {\n\t\tsetProperty(node, name, value == null ? '' : value);\n\t\tif (value == null || value === false) node.removeAttribute(name);\n\t} else {\n\t\tvar ns = isSvg && name !== (name = name.replace(/^xlink:?/, ''));\n\t\tif (value == null || value === false) {\n\t\t\tif (ns) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase());else node.removeAttribute(name);\n\t\t} else if (typeof value !== 'function') {\n\t\t\tif (ns) node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value);else node.setAttribute(name, value);\n\t\t}\n\t}\n}\n\n/** Attempt to set a DOM property to the given value.\n *\tIE & FF throw for certain property-value combinations.\n */\nfunction setProperty(node, name, value) {\n\ttry {\n\t\tnode[name] = value;\n\t} catch (e) {}\n}\n\n/** Proxy an event to hooked event handlers\n *\t@private\n */\nfunction eventProxy(e) {\n\treturn this._listeners[e.type](options.event && options.event(e) || e);\n}\n\n/** Queue of components that have been mounted and are awaiting componentDidMount */\nvar mounts = [];\n\n/** Diff recursion count, used to track the end of the diff cycle. */\nvar diffLevel = 0;\n\n/** Global flag indicating if the diff is currently within an SVG */\nvar isSvgMode = false;\n\n/** Global flag indicating if the diff is performing hydration */\nvar hydrating = false;\n\n/** Invoke queued componentDidMount lifecycle methods */\nfunction flushMounts() {\n\tvar c;\n\twhile (c = mounts.pop()) {\n\t\tif (options.afterMount) options.afterMount(c);\n\t\tif (c.componentDidMount) c.componentDidMount();\n\t}\n}\n\n/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.\n *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\n *\t@returns {Element} dom\t\t\tThe created/mutated element\n *\t@private\n */\nfunction diff(dom, vnode, context, mountAll, parent, componentRoot) {\n\t// diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\n\tif (!diffLevel++) {\n\t\t// when first starting the diff, check if we're diffing an SVG or within an SVG\n\t\tisSvgMode = parent != null && parent.ownerSVGElement !== undefined;\n\n\t\t// hydration is indicated by the existing element to be diffed not having a prop cache\n\t\thydrating = dom != null && !('__preactattr_' in dom);\n\t}\n\n\tvar ret = idiff(dom, vnode, context, mountAll, componentRoot);\n\n\t// append the element if its a new parent\n\tif (parent && ret.parentNode !== parent) parent.appendChild(ret);\n\n\t// diffLevel being reduced to 0 means we're exiting the diff\n\tif (! --diffLevel) {\n\t\thydrating = false;\n\t\t// invoke queued componentDidMount lifecycle methods\n\t\tif (!componentRoot) flushMounts();\n\t}\n\n\treturn ret;\n}\n\n/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */\nfunction idiff(dom, vnode, context, mountAll, componentRoot) {\n\tvar out = dom,\n\t    prevSvgMode = isSvgMode;\n\n\t// empty values (null, undefined, booleans) render as empty Text nodes\n\tif (vnode == null || typeof vnode === 'boolean') vnode = '';\n\n\t// Fast case: Strings & Numbers create/update Text nodes.\n\tif (typeof vnode === 'string' || typeof vnode === 'number') {\n\n\t\t// update if it's already a Text node:\n\t\tif (dom && dom.splitText !== undefined && dom.parentNode && (!dom._component || componentRoot)) {\n\t\t\t/* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\n\t\t\tif (dom.nodeValue != vnode) {\n\t\t\t\tdom.nodeValue = vnode;\n\t\t\t}\n\t\t} else {\n\t\t\t// it wasn't a Text node: replace it with one and recycle the old Element\n\t\t\tout = document.createTextNode(vnode);\n\t\t\tif (dom) {\n\t\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\t\t\t\trecollectNodeTree(dom, true);\n\t\t\t}\n\t\t}\n\n\t\tout['__preactattr_'] = true;\n\n\t\treturn out;\n\t}\n\n\t// If the VNode represents a Component, perform a component diff:\n\tvar vnodeName = vnode.nodeName;\n\tif (typeof vnodeName === 'function') {\n\t\treturn buildComponentFromVNode(dom, vnode, context, mountAll);\n\t}\n\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\n\tisSvgMode = vnodeName === 'svg' ? true : vnodeName === 'foreignObject' ? false : isSvgMode;\n\n\t// If there's no existing element or it's the wrong type, create a new one:\n\tvnodeName = String(vnodeName);\n\tif (!dom || !isNamedNode(dom, vnodeName)) {\n\t\tout = createNode(vnodeName, isSvgMode);\n\n\t\tif (dom) {\n\t\t\t// move children into the replacement node\n\t\t\twhile (dom.firstChild) {\n\t\t\t\tout.appendChild(dom.firstChild);\n\t\t\t} // if the previous Element was mounted into the DOM, replace it inline\n\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\n\t\t\t// recycle the old element (skips non-Element node types)\n\t\t\trecollectNodeTree(dom, true);\n\t\t}\n\t}\n\n\tvar fc = out.firstChild,\n\t    props = out['__preactattr_'],\n\t    vchildren = vnode.children;\n\n\tif (props == null) {\n\t\tprops = out['__preactattr_'] = {};\n\t\tfor (var a = out.attributes, i = a.length; i--;) {\n\t\t\tprops[a[i].name] = a[i].value;\n\t\t}\n\t}\n\n\t// Optimization: fast-path for elements containing a single TextNode:\n\tif (!hydrating && vchildren && vchildren.length === 1 && typeof vchildren[0] === 'string' && fc != null && fc.splitText !== undefined && fc.nextSibling == null) {\n\t\tif (fc.nodeValue != vchildren[0]) {\n\t\t\tfc.nodeValue = vchildren[0];\n\t\t}\n\t}\n\t// otherwise, if there are existing or new children, diff them:\n\telse if (vchildren && vchildren.length || fc != null) {\n\t\t\tinnerDiffNode(out, vchildren, context, mountAll, hydrating || props.dangerouslySetInnerHTML != null);\n\t\t}\n\n\t// Apply attributes/props from VNode to the DOM Element:\n\tdiffAttributes(out, vnode.attributes, props);\n\n\t// restore previous SVG mode: (in case we're exiting an SVG namespace)\n\tisSvgMode = prevSvgMode;\n\n\treturn out;\n}\n\n/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.\n *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\n *\t@param {Object} context\t\t\tImplicitly descendant context object (from most recent `getChildContext()`)\n *\t@param {Boolean} mountAll\n *\t@param {Boolean} isHydrating\tIf `true`, consumes externally created elements similar to hydration\n */\nfunction innerDiffNode(dom, vchildren, context, mountAll, isHydrating) {\n\tvar originalChildren = dom.childNodes,\n\t    children = [],\n\t    keyed = {},\n\t    keyedLen = 0,\n\t    min = 0,\n\t    len = originalChildren.length,\n\t    childrenLen = 0,\n\t    vlen = vchildren ? vchildren.length : 0,\n\t    j,\n\t    c,\n\t    f,\n\t    vchild,\n\t    child;\n\n\t// Build up a map of keyed children and an Array of unkeyed children:\n\tif (len !== 0) {\n\t\tfor (var i = 0; i < len; i++) {\n\t\t\tvar _child = originalChildren[i],\n\t\t\t    props = _child['__preactattr_'],\n\t\t\t    key = vlen && props ? _child._component ? _child._component.__key : props.key : null;\n\t\t\tif (key != null) {\n\t\t\t\tkeyedLen++;\n\t\t\t\tkeyed[key] = _child;\n\t\t\t} else if (props || (_child.splitText !== undefined ? isHydrating ? _child.nodeValue.trim() : true : isHydrating)) {\n\t\t\t\tchildren[childrenLen++] = _child;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (vlen !== 0) {\n\t\tfor (var i = 0; i < vlen; i++) {\n\t\t\tvchild = vchildren[i];\n\t\t\tchild = null;\n\n\t\t\t// attempt to find a node based on key matching\n\t\t\tvar key = vchild.key;\n\t\t\tif (key != null) {\n\t\t\t\tif (keyedLen && keyed[key] !== undefined) {\n\t\t\t\t\tchild = keyed[key];\n\t\t\t\t\tkeyed[key] = undefined;\n\t\t\t\t\tkeyedLen--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// attempt to pluck a node of the same type from the existing children\n\t\t\telse if (!child && min < childrenLen) {\n\t\t\t\t\tfor (j = min; j < childrenLen; j++) {\n\t\t\t\t\t\tif (children[j] !== undefined && isSameNodeType(c = children[j], vchild, isHydrating)) {\n\t\t\t\t\t\t\tchild = c;\n\t\t\t\t\t\t\tchildren[j] = undefined;\n\t\t\t\t\t\t\tif (j === childrenLen - 1) childrenLen--;\n\t\t\t\t\t\t\tif (j === min) min++;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// morph the matched/found/created DOM child to match vchild (deep)\n\t\t\tchild = idiff(child, vchild, context, mountAll);\n\n\t\t\tf = originalChildren[i];\n\t\t\tif (child && child !== dom && child !== f) {\n\t\t\t\tif (f == null) {\n\t\t\t\t\tdom.appendChild(child);\n\t\t\t\t} else if (child === f.nextSibling) {\n\t\t\t\t\tremoveNode(f);\n\t\t\t\t} else {\n\t\t\t\t\tdom.insertBefore(child, f);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// remove unused keyed children:\n\tif (keyedLen) {\n\t\tfor (var i in keyed) {\n\t\t\tif (keyed[i] !== undefined) recollectNodeTree(keyed[i], false);\n\t\t}\n\t}\n\n\t// remove orphaned unkeyed children:\n\twhile (min <= childrenLen) {\n\t\tif ((child = children[childrenLen--]) !== undefined) recollectNodeTree(child, false);\n\t}\n}\n\n/** Recursively recycle (or just unmount) a node and its descendants.\n *\t@param {Node} node\t\t\t\t\t\tDOM node to start unmount/removal from\n *\t@param {Boolean} [unmountOnly=false]\tIf `true`, only triggers unmount lifecycle, skips removal\n */\nfunction recollectNodeTree(node, unmountOnly) {\n\tvar component = node._component;\n\tif (component) {\n\t\t// if node is owned by a Component, unmount that component (ends up recursing back here)\n\t\tunmountComponent(component);\n\t} else {\n\t\t// If the node's VNode had a ref function, invoke it with null here.\n\t\t// (this is part of the React spec, and smart for unsetting references)\n\t\tif (node['__preactattr_'] != null && node['__preactattr_'].ref) node['__preactattr_'].ref(null);\n\n\t\tif (unmountOnly === false || node['__preactattr_'] == null) {\n\t\t\tremoveNode(node);\n\t\t}\n\n\t\tremoveChildren(node);\n\t}\n}\n\n/** Recollect/unmount all children.\n *\t- we use .lastChild here because it causes less reflow than .firstChild\n *\t- it's also cheaper than accessing the .childNodes Live NodeList\n */\nfunction removeChildren(node) {\n\tnode = node.lastChild;\n\twhile (node) {\n\t\tvar next = node.previousSibling;\n\t\trecollectNodeTree(node, true);\n\t\tnode = next;\n\t}\n}\n\n/** Apply differences in attributes from a VNode to the given DOM Element.\n *\t@param {Element} dom\t\tElement with attributes to diff `attrs` against\n *\t@param {Object} attrs\t\tThe desired end-state key-value attribute pairs\n *\t@param {Object} old\t\t\tCurrent/previous attributes (from previous VNode or element's prop cache)\n */\nfunction diffAttributes(dom, attrs, old) {\n\tvar name;\n\n\t// remove attributes no longer present on the vnode by setting them to undefined\n\tfor (name in old) {\n\t\tif (!(attrs && attrs[name] != null) && old[name] != null) {\n\t\t\tsetAccessor(dom, name, old[name], old[name] = undefined, isSvgMode);\n\t\t}\n\t}\n\n\t// add new & update changed attributes\n\tfor (name in attrs) {\n\t\tif (name !== 'children' && name !== 'innerHTML' && (!(name in old) || attrs[name] !== (name === 'value' || name === 'checked' ? dom[name] : old[name]))) {\n\t\t\tsetAccessor(dom, name, old[name], old[name] = attrs[name], isSvgMode);\n\t\t}\n\t}\n}\n\n/** Retains a pool of Components for re-use, keyed on component name.\n *\tNote: since component names are not unique or even necessarily available, these are primarily a form of sharding.\n *\t@private\n */\nvar components = {};\n\n/** Reclaim a component for later re-use by the recycler. */\nfunction collectComponent(component) {\n\tvar name = component.constructor.name;\n\t(components[name] || (components[name] = [])).push(component);\n}\n\n/** Create a component. Normalizes differences between PFC's and classful Components. */\nfunction createComponent(Ctor, props, context) {\n\tvar list = components[Ctor.name],\n\t    inst;\n\n\tif (Ctor.prototype && Ctor.prototype.render) {\n\t\tinst = new Ctor(props, context);\n\t\tComponent.call(inst, props, context);\n\t} else {\n\t\tinst = new Component(props, context);\n\t\tinst.constructor = Ctor;\n\t\tinst.render = doRender;\n\t}\n\n\tif (list) {\n\t\tfor (var i = list.length; i--;) {\n\t\t\tif (list[i].constructor === Ctor) {\n\t\t\t\tinst.nextBase = list[i].nextBase;\n\t\t\t\tlist.splice(i, 1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn inst;\n}\n\n/** The `.render()` method for a PFC backing instance. */\nfunction doRender(props, state, context) {\n\treturn this.constructor(props, context);\n}\n\n/** Set a component's `props` (generally derived from JSX attributes).\n *\t@param {Object} props\n *\t@param {Object} [opts]\n *\t@param {boolean} [opts.renderSync=false]\tIf `true` and {@link options.syncComponentUpdates} is `true`, triggers synchronous rendering.\n *\t@param {boolean} [opts.render=true]\t\t\tIf `false`, no render will be triggered.\n */\nfunction setComponentProps(component, props, opts, context, mountAll) {\n\tif (component._disable) return;\n\tcomponent._disable = true;\n\n\tif (component.__ref = props.ref) delete props.ref;\n\tif (component.__key = props.key) delete props.key;\n\n\tif (!component.base || mountAll) {\n\t\tif (component.componentWillMount) component.componentWillMount();\n\t} else if (component.componentWillReceiveProps) {\n\t\tcomponent.componentWillReceiveProps(props, context);\n\t}\n\n\tif (context && context !== component.context) {\n\t\tif (!component.prevContext) component.prevContext = component.context;\n\t\tcomponent.context = context;\n\t}\n\n\tif (!component.prevProps) component.prevProps = component.props;\n\tcomponent.props = props;\n\n\tcomponent._disable = false;\n\n\tif (opts !== 0) {\n\t\tif (opts === 1 || options.syncComponentUpdates !== false || !component.base) {\n\t\t\trenderComponent(component, 1, mountAll);\n\t\t} else {\n\t\t\tenqueueRender(component);\n\t\t}\n\t}\n\n\tif (component.__ref) component.__ref(component);\n}\n\n/** Render a Component, triggering necessary lifecycle events and taking High-Order Components into account.\n *\t@param {Component} component\n *\t@param {Object} [opts]\n *\t@param {boolean} [opts.build=false]\t\tIf `true`, component will build and store a DOM node if not already associated with one.\n *\t@private\n */\nfunction renderComponent(component, opts, mountAll, isChild) {\n\tif (component._disable) return;\n\n\tvar props = component.props,\n\t    state = component.state,\n\t    context = component.context,\n\t    previousProps = component.prevProps || props,\n\t    previousState = component.prevState || state,\n\t    previousContext = component.prevContext || context,\n\t    isUpdate = component.base,\n\t    nextBase = component.nextBase,\n\t    initialBase = isUpdate || nextBase,\n\t    initialChildComponent = component._component,\n\t    skip = false,\n\t    rendered,\n\t    inst,\n\t    cbase;\n\n\t// if updating\n\tif (isUpdate) {\n\t\tcomponent.props = previousProps;\n\t\tcomponent.state = previousState;\n\t\tcomponent.context = previousContext;\n\t\tif (opts !== 2 && component.shouldComponentUpdate && component.shouldComponentUpdate(props, state, context) === false) {\n\t\t\tskip = true;\n\t\t} else if (component.componentWillUpdate) {\n\t\t\tcomponent.componentWillUpdate(props, state, context);\n\t\t}\n\t\tcomponent.props = props;\n\t\tcomponent.state = state;\n\t\tcomponent.context = context;\n\t}\n\n\tcomponent.prevProps = component.prevState = component.prevContext = component.nextBase = null;\n\tcomponent._dirty = false;\n\n\tif (!skip) {\n\t\trendered = component.render(props, state, context);\n\n\t\t// context to pass to the child, can be updated via (grand-)parent component\n\t\tif (component.getChildContext) {\n\t\t\tcontext = extend(extend({}, context), component.getChildContext());\n\t\t}\n\n\t\tvar childComponent = rendered && rendered.nodeName,\n\t\t    toUnmount,\n\t\t    base;\n\n\t\tif (typeof childComponent === 'function') {\n\t\t\t// set up high order component link\n\n\t\t\tvar childProps = getNodeProps(rendered);\n\t\t\tinst = initialChildComponent;\n\n\t\t\tif (inst && inst.constructor === childComponent && childProps.key == inst.__key) {\n\t\t\t\tsetComponentProps(inst, childProps, 1, context, false);\n\t\t\t} else {\n\t\t\t\ttoUnmount = inst;\n\n\t\t\t\tcomponent._component = inst = createComponent(childComponent, childProps, context);\n\t\t\t\tinst.nextBase = inst.nextBase || nextBase;\n\t\t\t\tinst._parentComponent = component;\n\t\t\t\tsetComponentProps(inst, childProps, 0, context, false);\n\t\t\t\trenderComponent(inst, 1, mountAll, true);\n\t\t\t}\n\n\t\t\tbase = inst.base;\n\t\t} else {\n\t\t\tcbase = initialBase;\n\n\t\t\t// destroy high order component link\n\t\t\ttoUnmount = initialChildComponent;\n\t\t\tif (toUnmount) {\n\t\t\t\tcbase = component._component = null;\n\t\t\t}\n\n\t\t\tif (initialBase || opts === 1) {\n\t\t\t\tif (cbase) cbase._component = null;\n\t\t\t\tbase = diff(cbase, rendered, context, mountAll || !isUpdate, initialBase && initialBase.parentNode, true);\n\t\t\t}\n\t\t}\n\n\t\tif (initialBase && base !== initialBase && inst !== initialChildComponent) {\n\t\t\tvar baseParent = initialBase.parentNode;\n\t\t\tif (baseParent && base !== baseParent) {\n\t\t\t\tbaseParent.replaceChild(base, initialBase);\n\n\t\t\t\tif (!toUnmount) {\n\t\t\t\t\tinitialBase._component = null;\n\t\t\t\t\trecollectNodeTree(initialBase, false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (toUnmount) {\n\t\t\tunmountComponent(toUnmount);\n\t\t}\n\n\t\tcomponent.base = base;\n\t\tif (base && !isChild) {\n\t\t\tvar componentRef = component,\n\t\t\t    t = component;\n\t\t\twhile (t = t._parentComponent) {\n\t\t\t\t(componentRef = t).base = base;\n\t\t\t}\n\t\t\tbase._component = componentRef;\n\t\t\tbase._componentConstructor = componentRef.constructor;\n\t\t}\n\t}\n\n\tif (!isUpdate || mountAll) {\n\t\tmounts.unshift(component);\n\t} else if (!skip) {\n\t\t// Ensure that pending componentDidMount() hooks of child components\n\t\t// are called before the componentDidUpdate() hook in the parent.\n\t\t// Note: disabled as it causes duplicate hooks, see https://github.com/developit/preact/issues/750\n\t\t// flushMounts();\n\n\t\tif (component.componentDidUpdate) {\n\t\t\tcomponent.componentDidUpdate(previousProps, previousState, previousContext);\n\t\t}\n\t\tif (options.afterUpdate) options.afterUpdate(component);\n\t}\n\n\tif (component._renderCallbacks != null) {\n\t\twhile (component._renderCallbacks.length) {\n\t\t\tcomponent._renderCallbacks.pop().call(component);\n\t\t}\n\t}\n\n\tif (!diffLevel && !isChild) flushMounts();\n}\n\n/** Apply the Component referenced by a VNode to the DOM.\n *\t@param {Element} dom\tThe DOM node to mutate\n *\t@param {VNode} vnode\tA Component-referencing VNode\n *\t@returns {Element} dom\tThe created/mutated element\n *\t@private\n */\nfunction buildComponentFromVNode(dom, vnode, context, mountAll) {\n\tvar c = dom && dom._component,\n\t    originalComponent = c,\n\t    oldDom = dom,\n\t    isDirectOwner = c && dom._componentConstructor === vnode.nodeName,\n\t    isOwner = isDirectOwner,\n\t    props = getNodeProps(vnode);\n\twhile (c && !isOwner && (c = c._parentComponent)) {\n\t\tisOwner = c.constructor === vnode.nodeName;\n\t}\n\n\tif (c && isOwner && (!mountAll || c._component)) {\n\t\tsetComponentProps(c, props, 3, context, mountAll);\n\t\tdom = c.base;\n\t} else {\n\t\tif (originalComponent && !isDirectOwner) {\n\t\t\tunmountComponent(originalComponent);\n\t\t\tdom = oldDom = null;\n\t\t}\n\n\t\tc = createComponent(vnode.nodeName, props, context);\n\t\tif (dom && !c.nextBase) {\n\t\t\tc.nextBase = dom;\n\t\t\t// passing dom/oldDom as nextBase will recycle it if unused, so bypass recycling on L229:\n\t\t\toldDom = null;\n\t\t}\n\t\tsetComponentProps(c, props, 1, context, mountAll);\n\t\tdom = c.base;\n\n\t\tif (oldDom && dom !== oldDom) {\n\t\t\toldDom._component = null;\n\t\t\trecollectNodeTree(oldDom, false);\n\t\t}\n\t}\n\n\treturn dom;\n}\n\n/** Remove a component from the DOM and recycle it.\n *\t@param {Component} component\tThe Component instance to unmount\n *\t@private\n */\nfunction unmountComponent(component) {\n\tif (options.beforeUnmount) options.beforeUnmount(component);\n\n\tvar base = component.base;\n\n\tcomponent._disable = true;\n\n\tif (component.componentWillUnmount) component.componentWillUnmount();\n\n\tcomponent.base = null;\n\n\t// recursively tear down & recollect high-order component children:\n\tvar inner = component._component;\n\tif (inner) {\n\t\tunmountComponent(inner);\n\t} else if (base) {\n\t\tif (base['__preactattr_'] && base['__preactattr_'].ref) base['__preactattr_'].ref(null);\n\n\t\tcomponent.nextBase = base;\n\n\t\tremoveNode(base);\n\t\tcollectComponent(component);\n\n\t\tremoveChildren(base);\n\t}\n\n\tif (component.__ref) component.__ref(null);\n}\n\n/** Base Component class.\n *\tProvides `setState()` and `forceUpdate()`, which trigger rendering.\n *\t@public\n *\n *\t@example\n *\tclass MyFoo extends Component {\n *\t\trender(props, state) {\n *\t\t\treturn <div />;\n *\t\t}\n *\t}\n */\nfunction Component(props, context) {\n\tthis._dirty = true;\n\n\t/** @public\n  *\t@type {object}\n  */\n\tthis.context = context;\n\n\t/** @public\n  *\t@type {object}\n  */\n\tthis.props = props;\n\n\t/** @public\n  *\t@type {object}\n  */\n\tthis.state = this.state || {};\n}\n\nextend(Component.prototype, {\n\n\t/** Returns a `boolean` indicating if the component should re-render when receiving the given `props` and `state`.\n  *\t@param {object} nextProps\n  *\t@param {object} nextState\n  *\t@param {object} nextContext\n  *\t@returns {Boolean} should the component re-render\n  *\t@name shouldComponentUpdate\n  *\t@function\n  */\n\n\t/** Update component state by copying properties from `state` to `this.state`.\n  *\t@param {object} state\t\tA hash of state properties to update with new values\n  *\t@param {function} callback\tA function to be called once component state is updated\n  */\n\tsetState: function setState(state, callback) {\n\t\tvar s = this.state;\n\t\tif (!this.prevState) this.prevState = extend({}, s);\n\t\textend(s, typeof state === 'function' ? state(s, this.props) : state);\n\t\tif (callback) (this._renderCallbacks = this._renderCallbacks || []).push(callback);\n\t\tenqueueRender(this);\n\t},\n\n\n\t/** Immediately perform a synchronous re-render of the component.\n  *\t@param {function} callback\t\tA function to be called after component is re-rendered.\n  *\t@private\n  */\n\tforceUpdate: function forceUpdate(callback) {\n\t\tif (callback) (this._renderCallbacks = this._renderCallbacks || []).push(callback);\n\t\trenderComponent(this, 2);\n\t},\n\n\n\t/** Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n  *\tVirtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\n  *\t@param {object} props\t\tProps (eg: JSX attributes) received from parent element/component\n  *\t@param {object} state\t\tThe component's current state\n  *\t@param {object} context\t\tContext object (if a parent component has provided context)\n  *\t@returns VNode\n  */\n\trender: function render() {}\n});\n\n/** Render JSX into a `parent` Element.\n *\t@param {VNode} vnode\t\tA (JSX) VNode to render\n *\t@param {Element} parent\t\tDOM element to render into\n *\t@param {Element} [merge]\tAttempt to re-use an existing DOM tree rooted at `merge`\n *\t@public\n *\n *\t@example\n *\t// render a div into <body>:\n *\trender(<div id=\"hello\">hello!</div>, document.body);\n *\n *\t@example\n *\t// render a \"Thing\" component into #foo:\n *\tconst Thing = ({ name }) => <span>{ name }</span>;\n *\trender(<Thing name=\"one\" />, document.querySelector('#foo'));\n */\nfunction render(vnode, parent, merge) {\n  return diff(merge, vnode, {}, false, parent, false);\n}\n\nvar preact = {\n\th: h,\n\tcreateElement: h,\n\tcloneElement: cloneElement,\n\tComponent: Component,\n\trender: render,\n\trerender: rerender,\n\toptions: options\n};\n\nexport default preact;\nexport { h, h as createElement, cloneElement, Component, render, rerender, options };\n//# sourceMappingURL=preact.esm.js.map\n","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport { Component, Children } from 'react';\nimport PropTypes from 'prop-types';\nimport { storeShape, subscriptionShape } from '../utils/PropTypes';\nimport warning from '../utils/warning';\n\nvar didWarnAboutReceivingStore = false;\nfunction warnAboutReceivingStore() {\n  if (didWarnAboutReceivingStore) {\n    return;\n  }\n  didWarnAboutReceivingStore = true;\n\n  warning('<Provider> does not support changing `store` on the fly. ' + 'It is most likely that you see this error because you updated to ' + 'Redux 2.x and React Redux 2.x which no longer hot reload reducers ' + 'automatically. See https://github.com/reactjs/react-redux/releases/' + 'tag/v2.0.0 for the migration instructions.');\n}\n\nexport function createProvider() {\n  var _Provider$childContex;\n\n  var storeKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'store';\n  var subKey = arguments[1];\n\n  var subscriptionKey = subKey || storeKey + 'Subscription';\n\n  var Provider = function (_Component) {\n    _inherits(Provider, _Component);\n\n    Provider.prototype.getChildContext = function getChildContext() {\n      var _ref;\n\n      return _ref = {}, _ref[storeKey] = this[storeKey], _ref[subscriptionKey] = null, _ref;\n    };\n\n    function Provider(props, context) {\n      _classCallCheck(this, Provider);\n\n      var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));\n\n      _this[storeKey] = props.store;\n      return _this;\n    }\n\n    Provider.prototype.render = function render() {\n      return Children.only(this.props.children);\n    };\n\n    return Provider;\n  }(Component);\n\n  if (process.env.NODE_ENV !== 'production') {\n    Provider.prototype.componentWillReceiveProps = function (nextProps) {\n      if (this[storeKey] !== nextProps.store) {\n        warnAboutReceivingStore();\n      }\n    };\n  }\n\n  Provider.propTypes = {\n    store: storeShape.isRequired,\n    children: PropTypes.element.isRequired\n  };\n  Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[storeKey] = storeShape.isRequired, _Provider$childContex[subscriptionKey] = subscriptionShape, _Provider$childContex);\n\n  return Provider;\n}\n\nexport default createProvider();","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport hoistStatics from 'hoist-non-react-statics';\nimport invariant from 'invariant';\nimport { Component, createElement } from 'react';\n\nimport Subscription from '../utils/Subscription';\nimport { storeShape, subscriptionShape } from '../utils/PropTypes';\n\nvar hotReloadingVersion = 0;\nvar dummyState = {};\nfunction noop() {}\nfunction makeSelectorStateful(sourceSelector, store) {\n  // wrap the selector in an object that tracks its results between runs.\n  var selector = {\n    run: function runComponentSelector(props) {\n      try {\n        var nextProps = sourceSelector(store.getState(), props);\n        if (nextProps !== selector.props || selector.error) {\n          selector.shouldComponentUpdate = true;\n          selector.props = nextProps;\n          selector.error = null;\n        }\n      } catch (error) {\n        selector.shouldComponentUpdate = true;\n        selector.error = error;\n      }\n    }\n  };\n\n  return selector;\n}\n\nexport default function connectAdvanced(\n/*\n  selectorFactory is a func that is responsible for returning the selector function used to\n  compute new props from state, props, and dispatch. For example:\n     export default connectAdvanced((dispatch, options) => (state, props) => ({\n      thing: state.things[props.thingId],\n      saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)),\n    }))(YourComponent)\n   Access to dispatch is provided to the factory so selectorFactories can bind actionCreators\n  outside of their selector as an optimization. Options passed to connectAdvanced are passed to\n  the selectorFactory, along with displayName and WrappedComponent, as the second argument.\n   Note that selectorFactory is responsible for all caching/memoization of inbound and outbound\n  props. Do not use connectAdvanced directly without memoizing results between calls to your\n  selector, otherwise the Connect component will re-render on every state or props change.\n*/\nselectorFactory) {\n  var _contextTypes, _childContextTypes;\n\n  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n      _ref$getDisplayName = _ref.getDisplayName,\n      getDisplayName = _ref$getDisplayName === undefined ? function (name) {\n    return 'ConnectAdvanced(' + name + ')';\n  } : _ref$getDisplayName,\n      _ref$methodName = _ref.methodName,\n      methodName = _ref$methodName === undefined ? 'connectAdvanced' : _ref$methodName,\n      _ref$renderCountProp = _ref.renderCountProp,\n      renderCountProp = _ref$renderCountProp === undefined ? undefined : _ref$renderCountProp,\n      _ref$shouldHandleStat = _ref.shouldHandleStateChanges,\n      shouldHandleStateChanges = _ref$shouldHandleStat === undefined ? true : _ref$shouldHandleStat,\n      _ref$storeKey = _ref.storeKey,\n      storeKey = _ref$storeKey === undefined ? 'store' : _ref$storeKey,\n      _ref$withRef = _ref.withRef,\n      withRef = _ref$withRef === undefined ? false : _ref$withRef,\n      connectOptions = _objectWithoutProperties(_ref, ['getDisplayName', 'methodName', 'renderCountProp', 'shouldHandleStateChanges', 'storeKey', 'withRef']);\n\n  var subscriptionKey = storeKey + 'Subscription';\n  var version = hotReloadingVersion++;\n\n  var contextTypes = (_contextTypes = {}, _contextTypes[storeKey] = storeShape, _contextTypes[subscriptionKey] = subscriptionShape, _contextTypes);\n  var childContextTypes = (_childContextTypes = {}, _childContextTypes[subscriptionKey] = subscriptionShape, _childContextTypes);\n\n  return function wrapWithConnect(WrappedComponent) {\n    invariant(typeof WrappedComponent == 'function', 'You must pass a component to the function returned by ' + (methodName + '. Instead received ' + JSON.stringify(WrappedComponent)));\n\n    var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';\n\n    var displayName = getDisplayName(wrappedComponentName);\n\n    var selectorFactoryOptions = _extends({}, connectOptions, {\n      getDisplayName: getDisplayName,\n      methodName: methodName,\n      renderCountProp: renderCountProp,\n      shouldHandleStateChanges: shouldHandleStateChanges,\n      storeKey: storeKey,\n      withRef: withRef,\n      displayName: displayName,\n      wrappedComponentName: wrappedComponentName,\n      WrappedComponent: WrappedComponent\n    });\n\n    var Connect = function (_Component) {\n      _inherits(Connect, _Component);\n\n      function Connect(props, context) {\n        _classCallCheck(this, Connect);\n\n        var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));\n\n        _this.version = version;\n        _this.state = {};\n        _this.renderCount = 0;\n        _this.store = props[storeKey] || context[storeKey];\n        _this.propsMode = Boolean(props[storeKey]);\n        _this.setWrappedInstance = _this.setWrappedInstance.bind(_this);\n\n        invariant(_this.store, 'Could not find \"' + storeKey + '\" in either the context or props of ' + ('\"' + displayName + '\". Either wrap the root component in a <Provider>, ') + ('or explicitly pass \"' + storeKey + '\" as a prop to \"' + displayName + '\".'));\n\n        _this.initSelector();\n        _this.initSubscription();\n        return _this;\n      }\n\n      Connect.prototype.getChildContext = function getChildContext() {\n        var _ref2;\n\n        // If this component received store from props, its subscription should be transparent\n        // to any descendants receiving store+subscription from context; it passes along\n        // subscription passed to it. Otherwise, it shadows the parent subscription, which allows\n        // Connect to control ordering of notifications to flow top-down.\n        var subscription = this.propsMode ? null : this.subscription;\n        return _ref2 = {}, _ref2[subscriptionKey] = subscription || this.context[subscriptionKey], _ref2;\n      };\n\n      Connect.prototype.componentDidMount = function componentDidMount() {\n        if (!shouldHandleStateChanges) return;\n\n        // componentWillMount fires during server side rendering, but componentDidMount and\n        // componentWillUnmount do not. Because of this, trySubscribe happens during ...didMount.\n        // Otherwise, unsubscription would never take place during SSR, causing a memory leak.\n        // To handle the case where a child component may have triggered a state change by\n        // dispatching an action in its componentWillMount, we have to re-run the select and maybe\n        // re-render.\n        this.subscription.trySubscribe();\n        this.selector.run(this.props);\n        if (this.selector.shouldComponentUpdate) this.forceUpdate();\n      };\n\n      Connect.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n        this.selector.run(nextProps);\n      };\n\n      Connect.prototype.shouldComponentUpdate = function shouldComponentUpdate() {\n        return this.selector.shouldComponentUpdate;\n      };\n\n      Connect.prototype.componentWillUnmount = function componentWillUnmount() {\n        if (this.subscription) this.subscription.tryUnsubscribe();\n        this.subscription = null;\n        this.notifyNestedSubs = noop;\n        this.store = null;\n        this.selector.run = noop;\n        this.selector.shouldComponentUpdate = false;\n      };\n\n      Connect.prototype.getWrappedInstance = function getWrappedInstance() {\n        invariant(withRef, 'To access the wrapped instance, you need to specify ' + ('{ withRef: true } in the options argument of the ' + methodName + '() call.'));\n        return this.wrappedInstance;\n      };\n\n      Connect.prototype.setWrappedInstance = function setWrappedInstance(ref) {\n        this.wrappedInstance = ref;\n      };\n\n      Connect.prototype.initSelector = function initSelector() {\n        var sourceSelector = selectorFactory(this.store.dispatch, selectorFactoryOptions);\n        this.selector = makeSelectorStateful(sourceSelector, this.store);\n        this.selector.run(this.props);\n      };\n\n      Connect.prototype.initSubscription = function initSubscription() {\n        if (!shouldHandleStateChanges) return;\n\n        // parentSub's source should match where store came from: props vs. context. A component\n        // connected to the store via props shouldn't use subscription from context, or vice versa.\n        var parentSub = (this.propsMode ? this.props : this.context)[subscriptionKey];\n        this.subscription = new Subscription(this.store, parentSub, this.onStateChange.bind(this));\n\n        // `notifyNestedSubs` is duplicated to handle the case where the component is  unmounted in\n        // the middle of the notification loop, where `this.subscription` will then be null. An\n        // extra null check every change can be avoided by copying the method onto `this` and then\n        // replacing it with a no-op on unmount. This can probably be avoided if Subscription's\n        // listeners logic is changed to not call listeners that have been unsubscribed in the\n        // middle of the notification loop.\n        this.notifyNestedSubs = this.subscription.notifyNestedSubs.bind(this.subscription);\n      };\n\n      Connect.prototype.onStateChange = function onStateChange() {\n        this.selector.run(this.props);\n\n        if (!this.selector.shouldComponentUpdate) {\n          this.notifyNestedSubs();\n        } else {\n          this.componentDidUpdate = this.notifyNestedSubsOnComponentDidUpdate;\n          this.setState(dummyState);\n        }\n      };\n\n      Connect.prototype.notifyNestedSubsOnComponentDidUpdate = function notifyNestedSubsOnComponentDidUpdate() {\n        // `componentDidUpdate` is conditionally implemented when `onStateChange` determines it\n        // needs to notify nested subs. Once called, it unimplements itself until further state\n        // changes occur. Doing it this way vs having a permanent `componentDidUpdate` that does\n        // a boolean check every time avoids an extra method call most of the time, resulting\n        // in some perf boost.\n        this.componentDidUpdate = undefined;\n        this.notifyNestedSubs();\n      };\n\n      Connect.prototype.isSubscribed = function isSubscribed() {\n        return Boolean(this.subscription) && this.subscription.isSubscribed();\n      };\n\n      Connect.prototype.addExtraProps = function addExtraProps(props) {\n        if (!withRef && !renderCountProp && !(this.propsMode && this.subscription)) return props;\n        // make a shallow copy so that fields added don't leak to the original selector.\n        // this is especially important for 'ref' since that's a reference back to the component\n        // instance. a singleton memoized selector would then be holding a reference to the\n        // instance, preventing the instance from being garbage collected, and that would be bad\n        var withExtras = _extends({}, props);\n        if (withRef) withExtras.ref = this.setWrappedInstance;\n        if (renderCountProp) withExtras[renderCountProp] = this.renderCount++;\n        if (this.propsMode && this.subscription) withExtras[subscriptionKey] = this.subscription;\n        return withExtras;\n      };\n\n      Connect.prototype.render = function render() {\n        var selector = this.selector;\n        selector.shouldComponentUpdate = false;\n\n        if (selector.error) {\n          throw selector.error;\n        } else {\n          return createElement(WrappedComponent, this.addExtraProps(selector.props));\n        }\n      };\n\n      return Connect;\n    }(Component);\n\n    Connect.WrappedComponent = WrappedComponent;\n    Connect.displayName = displayName;\n    Connect.childContextTypes = childContextTypes;\n    Connect.contextTypes = contextTypes;\n    Connect.propTypes = contextTypes;\n\n    if (process.env.NODE_ENV !== 'production') {\n      Connect.prototype.componentWillUpdate = function componentWillUpdate() {\n        var _this2 = this;\n\n        // We are hot reloading!\n        if (this.version !== version) {\n          this.version = version;\n          this.initSelector();\n\n          // If any connected descendants don't hot reload (and resubscribe in the process), their\n          // listeners will be lost when we unsubscribe. Unfortunately, by copying over all\n          // listeners, this does mean that the old versions of connected descendants will still be\n          // notified of state changes; however, their onStateChange function is a no-op so this\n          // isn't a huge deal.\n          var oldListeners = [];\n\n          if (this.subscription) {\n            oldListeners = this.subscription.listeners.get();\n            this.subscription.tryUnsubscribe();\n          }\n          this.initSubscription();\n          if (shouldHandleStateChanges) {\n            this.subscription.trySubscribe();\n            oldListeners.forEach(function (listener) {\n              return _this2.subscription.listeners.subscribe(listener);\n            });\n          }\n        }\n      };\n    }\n\n    return hoistStatics(Connect, WrappedComponent);\n  };\n}","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport connectAdvanced from '../components/connectAdvanced';\nimport shallowEqual from '../utils/shallowEqual';\nimport defaultMapDispatchToPropsFactories from './mapDispatchToProps';\nimport defaultMapStateToPropsFactories from './mapStateToProps';\nimport defaultMergePropsFactories from './mergeProps';\nimport defaultSelectorFactory from './selectorFactory';\n\n/*\n  connect is a facade over connectAdvanced. It turns its args into a compatible\n  selectorFactory, which has the signature:\n\n    (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps\n  \n  connect passes its args to connectAdvanced as options, which will in turn pass them to\n  selectorFactory each time a Connect component instance is instantiated or hot reloaded.\n\n  selectorFactory returns a final props selector from its mapStateToProps,\n  mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps,\n  mergePropsFactories, and pure args.\n\n  The resulting final props selector is called by the Connect component instance whenever\n  it receives new props or store state.\n */\n\nfunction match(arg, factories, name) {\n  for (var i = factories.length - 1; i >= 0; i--) {\n    var result = factories[i](arg);\n    if (result) return result;\n  }\n\n  return function (dispatch, options) {\n    throw new Error('Invalid value of type ' + typeof arg + ' for ' + name + ' argument when connecting component ' + options.wrappedComponentName + '.');\n  };\n}\n\nfunction strictEqual(a, b) {\n  return a === b;\n}\n\n// createConnect with default args builds the 'official' connect behavior. Calling it with\n// different options opens up some testing and extensibility scenarios\nexport function createConnect() {\n  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n      _ref$connectHOC = _ref.connectHOC,\n      connectHOC = _ref$connectHOC === undefined ? connectAdvanced : _ref$connectHOC,\n      _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n      mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? defaultMapStateToPropsFactories : _ref$mapStateToPropsF,\n      _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n      mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? defaultMapDispatchToPropsFactories : _ref$mapDispatchToPro,\n      _ref$mergePropsFactor = _ref.mergePropsFactories,\n      mergePropsFactories = _ref$mergePropsFactor === undefined ? defaultMergePropsFactories : _ref$mergePropsFactor,\n      _ref$selectorFactory = _ref.selectorFactory,\n      selectorFactory = _ref$selectorFactory === undefined ? defaultSelectorFactory : _ref$selectorFactory;\n\n  return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n    var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n        _ref2$pure = _ref2.pure,\n        pure = _ref2$pure === undefined ? true : _ref2$pure,\n        _ref2$areStatesEqual = _ref2.areStatesEqual,\n        areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n        _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n        areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? shallowEqual : _ref2$areOwnPropsEqua,\n        _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n        areStatePropsEqual = _ref2$areStatePropsEq === undefined ? shallowEqual : _ref2$areStatePropsEq,\n        _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n        areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? shallowEqual : _ref2$areMergedPropsE,\n        extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n    var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n    var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n    var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n    return connectHOC(selectorFactory, _extends({\n      // used in error messages\n      methodName: 'connect',\n\n      // used to compute Connect's displayName from the wrapped component's displayName.\n      getDisplayName: function getDisplayName(name) {\n        return 'Connect(' + name + ')';\n      },\n\n      // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n      shouldHandleStateChanges: Boolean(mapStateToProps),\n\n      // passed through to selectorFactory\n      initMapStateToProps: initMapStateToProps,\n      initMapDispatchToProps: initMapDispatchToProps,\n      initMergeProps: initMergeProps,\n      pure: pure,\n      areStatesEqual: areStatesEqual,\n      areOwnPropsEqual: areOwnPropsEqual,\n      areStatePropsEqual: areStatePropsEqual,\n      areMergedPropsEqual: areMergedPropsEqual\n\n    }, extraOptions));\n  };\n}\n\nexport default createConnect();","import { bindActionCreators } from 'redux';\nimport { wrapMapToPropsConstant, wrapMapToPropsFunc } from './wrapMapToProps';\n\nexport function whenMapDispatchToPropsIsFunction(mapDispatchToProps) {\n  return typeof mapDispatchToProps === 'function' ? wrapMapToPropsFunc(mapDispatchToProps, 'mapDispatchToProps') : undefined;\n}\n\nexport function whenMapDispatchToPropsIsMissing(mapDispatchToProps) {\n  return !mapDispatchToProps ? wrapMapToPropsConstant(function (dispatch) {\n    return { dispatch: dispatch };\n  }) : undefined;\n}\n\nexport function whenMapDispatchToPropsIsObject(mapDispatchToProps) {\n  return mapDispatchToProps && typeof mapDispatchToProps === 'object' ? wrapMapToPropsConstant(function (dispatch) {\n    return bindActionCreators(mapDispatchToProps, dispatch);\n  }) : undefined;\n}\n\nexport default [whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject];","import { wrapMapToPropsConstant, wrapMapToPropsFunc } from './wrapMapToProps';\n\nexport function whenMapStateToPropsIsFunction(mapStateToProps) {\n  return typeof mapStateToProps === 'function' ? wrapMapToPropsFunc(mapStateToProps, 'mapStateToProps') : undefined;\n}\n\nexport function whenMapStateToPropsIsMissing(mapStateToProps) {\n  return !mapStateToProps ? wrapMapToPropsConstant(function () {\n    return {};\n  }) : undefined;\n}\n\nexport default [whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing];","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport verifyPlainObject from '../utils/verifyPlainObject';\n\nexport function defaultMergeProps(stateProps, dispatchProps, ownProps) {\n  return _extends({}, ownProps, stateProps, dispatchProps);\n}\n\nexport function wrapMergePropsFunc(mergeProps) {\n  return function initMergePropsProxy(dispatch, _ref) {\n    var displayName = _ref.displayName,\n        pure = _ref.pure,\n        areMergedPropsEqual = _ref.areMergedPropsEqual;\n\n    var hasRunOnce = false;\n    var mergedProps = void 0;\n\n    return function mergePropsProxy(stateProps, dispatchProps, ownProps) {\n      var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n\n      if (hasRunOnce) {\n        if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps;\n      } else {\n        hasRunOnce = true;\n        mergedProps = nextMergedProps;\n\n        if (process.env.NODE_ENV !== 'production') verifyPlainObject(mergedProps, displayName, 'mergeProps');\n      }\n\n      return mergedProps;\n    };\n  };\n}\n\nexport function whenMergePropsIsFunction(mergeProps) {\n  return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined;\n}\n\nexport function whenMergePropsIsOmitted(mergeProps) {\n  return !mergeProps ? function () {\n    return defaultMergeProps;\n  } : undefined;\n}\n\nexport default [whenMergePropsIsFunction, whenMergePropsIsOmitted];","function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport verifySubselectors from './verifySubselectors';\n\nexport function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) {\n  return function impureFinalPropsSelector(state, ownProps) {\n    return mergeProps(mapStateToProps(state, ownProps), mapDispatchToProps(dispatch, ownProps), ownProps);\n  };\n}\n\nexport function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref) {\n  var areStatesEqual = _ref.areStatesEqual,\n      areOwnPropsEqual = _ref.areOwnPropsEqual,\n      areStatePropsEqual = _ref.areStatePropsEqual;\n\n  var hasRunAtLeastOnce = false;\n  var state = void 0;\n  var ownProps = void 0;\n  var stateProps = void 0;\n  var dispatchProps = void 0;\n  var mergedProps = void 0;\n\n  function handleFirstCall(firstState, firstOwnProps) {\n    state = firstState;\n    ownProps = firstOwnProps;\n    stateProps = mapStateToProps(state, ownProps);\n    dispatchProps = mapDispatchToProps(dispatch, ownProps);\n    mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n    hasRunAtLeastOnce = true;\n    return mergedProps;\n  }\n\n  function handleNewPropsAndNewState() {\n    stateProps = mapStateToProps(state, ownProps);\n\n    if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);\n\n    mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n    return mergedProps;\n  }\n\n  function handleNewProps() {\n    if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps);\n\n    if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);\n\n    mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n    return mergedProps;\n  }\n\n  function handleNewState() {\n    var nextStateProps = mapStateToProps(state, ownProps);\n    var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps);\n    stateProps = nextStateProps;\n\n    if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n\n    return mergedProps;\n  }\n\n  function handleSubsequentCalls(nextState, nextOwnProps) {\n    var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps);\n    var stateChanged = !areStatesEqual(nextState, state);\n    state = nextState;\n    ownProps = nextOwnProps;\n\n    if (propsChanged && stateChanged) return handleNewPropsAndNewState();\n    if (propsChanged) return handleNewProps();\n    if (stateChanged) return handleNewState();\n    return mergedProps;\n  }\n\n  return function pureFinalPropsSelector(nextState, nextOwnProps) {\n    return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps);\n  };\n}\n\n// TODO: Add more comments\n\n// If pure is true, the selector returned by selectorFactory will memoize its results,\n// allowing connectAdvanced's shouldComponentUpdate to return false if final\n// props have not changed. If false, the selector will always return a new\n// object and shouldComponentUpdate will always return true.\n\nexport default function finalPropsSelectorFactory(dispatch, _ref2) {\n  var initMapStateToProps = _ref2.initMapStateToProps,\n      initMapDispatchToProps = _ref2.initMapDispatchToProps,\n      initMergeProps = _ref2.initMergeProps,\n      options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n  var mapStateToProps = initMapStateToProps(dispatch, options);\n  var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n  var mergeProps = initMergeProps(dispatch, options);\n\n  if (process.env.NODE_ENV !== 'production') {\n    verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n  }\n\n  var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n  return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}","import warning from '../utils/warning';\n\nfunction verify(selector, methodName, displayName) {\n  if (!selector) {\n    throw new Error('Unexpected value for ' + methodName + ' in ' + displayName + '.');\n  } else if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') {\n    if (!selector.hasOwnProperty('dependsOnOwnProps')) {\n      warning('The selector for ' + methodName + ' of ' + displayName + ' did not specify a value for dependsOnOwnProps.');\n    }\n  }\n}\n\nexport default function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, displayName) {\n  verify(mapStateToProps, 'mapStateToProps', displayName);\n  verify(mapDispatchToProps, 'mapDispatchToProps', displayName);\n  verify(mergeProps, 'mergeProps', displayName);\n}","import verifyPlainObject from '../utils/verifyPlainObject';\n\nexport function wrapMapToPropsConstant(getConstant) {\n  return function initConstantSelector(dispatch, options) {\n    var constant = getConstant(dispatch, options);\n\n    function constantSelector() {\n      return constant;\n    }\n    constantSelector.dependsOnOwnProps = false;\n    return constantSelector;\n  };\n}\n\n// dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args\n// to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine\n// whether mapToProps needs to be invoked when props have changed.\n// \n// A length of one signals that mapToProps does not depend on props from the parent component.\n// A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and\n// therefore not reporting its length accurately..\nexport function getDependsOnOwnProps(mapToProps) {\n  return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1;\n}\n\n// Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction,\n// this function wraps mapToProps in a proxy function which does several things:\n// \n//  * Detects whether the mapToProps function being called depends on props, which\n//    is used by selectorFactory to decide if it should reinvoke on props changes.\n//    \n//  * On first call, handles mapToProps if returns another function, and treats that\n//    new function as the true mapToProps for subsequent calls.\n//    \n//  * On first call, verifies the first result is a plain object, in order to warn\n//    the developer that their mapToProps function is not returning a valid result.\n//    \nexport function wrapMapToPropsFunc(mapToProps, methodName) {\n  return function initProxySelector(dispatch, _ref) {\n    var displayName = _ref.displayName;\n\n    var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n      return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n    };\n\n    // allow detectFactoryAndVerify to get ownProps\n    proxy.dependsOnOwnProps = true;\n\n    proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n      proxy.mapToProps = mapToProps;\n      proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n      var props = proxy(stateOrDispatch, ownProps);\n\n      if (typeof props === 'function') {\n        proxy.mapToProps = props;\n        proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n        props = proxy(stateOrDispatch, ownProps);\n      }\n\n      if (process.env.NODE_ENV !== 'production') verifyPlainObject(props, displayName, methodName);\n\n      return props;\n    };\n\n    return proxy;\n  };\n}","import Provider, { createProvider } from './components/Provider';\nimport connectAdvanced from './components/connectAdvanced';\nimport connect from './connect/connect';\n\nexport { Provider, createProvider, connectAdvanced, connect };","import PropTypes from 'prop-types';\n\nexport var subscriptionShape = PropTypes.shape({\n  trySubscribe: PropTypes.func.isRequired,\n  tryUnsubscribe: PropTypes.func.isRequired,\n  notifyNestedSubs: PropTypes.func.isRequired,\n  isSubscribed: PropTypes.func.isRequired\n});\n\nexport var storeShape = PropTypes.shape({\n  subscribe: PropTypes.func.isRequired,\n  dispatch: PropTypes.func.isRequired,\n  getState: PropTypes.func.isRequired\n});","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n// encapsulates the subscription logic for connecting a component to the redux store, as\n// well as nesting subscriptions of descendant components, so that we can ensure the\n// ancestor components re-render before descendants\n\nvar CLEARED = null;\nvar nullListeners = {\n  notify: function notify() {}\n};\n\nfunction createListenerCollection() {\n  // the current/next pattern is copied from redux's createStore code.\n  // TODO: refactor+expose that code to be reusable here?\n  var current = [];\n  var next = [];\n\n  return {\n    clear: function clear() {\n      next = CLEARED;\n      current = CLEARED;\n    },\n    notify: function notify() {\n      var listeners = current = next;\n      for (var i = 0; i < listeners.length; i++) {\n        listeners[i]();\n      }\n    },\n    get: function get() {\n      return next;\n    },\n    subscribe: function subscribe(listener) {\n      var isSubscribed = true;\n      if (next === current) next = current.slice();\n      next.push(listener);\n\n      return function unsubscribe() {\n        if (!isSubscribed || current === CLEARED) return;\n        isSubscribed = false;\n\n        if (next === current) next = current.slice();\n        next.splice(next.indexOf(listener), 1);\n      };\n    }\n  };\n}\n\nvar Subscription = function () {\n  function Subscription(store, parentSub, onStateChange) {\n    _classCallCheck(this, Subscription);\n\n    this.store = store;\n    this.parentSub = parentSub;\n    this.onStateChange = onStateChange;\n    this.unsubscribe = null;\n    this.listeners = nullListeners;\n  }\n\n  Subscription.prototype.addNestedSub = function addNestedSub(listener) {\n    this.trySubscribe();\n    return this.listeners.subscribe(listener);\n  };\n\n  Subscription.prototype.notifyNestedSubs = function notifyNestedSubs() {\n    this.listeners.notify();\n  };\n\n  Subscription.prototype.isSubscribed = function isSubscribed() {\n    return Boolean(this.unsubscribe);\n  };\n\n  Subscription.prototype.trySubscribe = function trySubscribe() {\n    if (!this.unsubscribe) {\n      this.unsubscribe = this.parentSub ? this.parentSub.addNestedSub(this.onStateChange) : this.store.subscribe(this.onStateChange);\n\n      this.listeners = createListenerCollection();\n    }\n  };\n\n  Subscription.prototype.tryUnsubscribe = function tryUnsubscribe() {\n    if (this.unsubscribe) {\n      this.unsubscribe();\n      this.unsubscribe = null;\n      this.listeners.clear();\n      this.listeners = nullListeners;\n    }\n  };\n\n  return Subscription;\n}();\n\nexport { Subscription as default };","var hasOwn = Object.prototype.hasOwnProperty;\n\nfunction is(x, y) {\n  if (x === y) {\n    return x !== 0 || y !== 0 || 1 / x === 1 / y;\n  } else {\n    return x !== x && y !== y;\n  }\n}\n\nexport default function shallowEqual(objA, objB) {\n  if (is(objA, objB)) return true;\n\n  if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n    return false;\n  }\n\n  var keysA = Object.keys(objA);\n  var keysB = Object.keys(objB);\n\n  if (keysA.length !== keysB.length) return false;\n\n  for (var i = 0; i < keysA.length; i++) {\n    if (!hasOwn.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n      return false;\n    }\n  }\n\n  return true;\n}","import isPlainObject from 'lodash-es/isPlainObject';\nimport warning from './warning';\n\nexport default function verifyPlainObject(value, displayName, methodName) {\n  if (!isPlainObject(value)) {\n    warning(methodName + '() in ' + displayName + ' must return a plain object. Instead received ' + value + '.');\n  }\n}","/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\nexport default function warning(message) {\n  /* eslint-disable no-console */\n  if (typeof console !== 'undefined' && typeof console.error === 'function') {\n    console.error(message);\n  }\n  /* eslint-enable no-console */\n  try {\n    // This error was thrown as a convenience so that if you enable\n    // \"break on all exceptions\" in your console,\n    // it would pause the execution at this line.\n    throw new Error(message);\n    /* eslint-disable no-empty */\n  } catch (e) {}\n  /* eslint-enable no-empty */\n}","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n  return function () {\n    return arg;\n  };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n  return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n  return arg;\n};\n\nmodule.exports = emptyFunction;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n  validateFormat = function validateFormat(format) {\n    if (format === undefined) {\n      throw new Error('invariant requires an error message argument');\n    }\n  };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n  validateFormat(format);\n\n  if (!condition) {\n    var error;\n    if (format === undefined) {\n      error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n    } else {\n      var args = [a, b, c, d, e, f];\n      var argIndex = 0;\n      error = new Error(format.replace(/%s/g, function () {\n        return args[argIndex++];\n      }));\n      error.name = 'Invariant Violation';\n    }\n\n    error.framesToPop = 1; // we don't care about invariant's own frame\n    throw error;\n  }\n}\n\nmodule.exports = invariant;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar emptyFunction = require('./emptyFunction');\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = emptyFunction;\n\nif (process.env.NODE_ENV !== 'production') {\n  var printWarning = function printWarning(format) {\n    for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n      args[_key - 1] = arguments[_key];\n    }\n\n    var argIndex = 0;\n    var message = 'Warning: ' + format.replace(/%s/g, function () {\n      return args[argIndex++];\n    });\n    if (typeof console !== 'undefined') {\n      console.error(message);\n    }\n    try {\n      // --- Welcome to debugging React ---\n      // This error was thrown as a convenience so that you can use this stack\n      // to find the callsite that caused this warning to fire.\n      throw new Error(message);\n    } catch (x) {}\n  };\n\n  warning = function warning(condition, format) {\n    if (format === undefined) {\n      throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n    }\n\n    if (format.indexOf('Failed Composite propType: ') === 0) {\n      return; // Ignore CompositeComponent proptype check.\n    }\n\n    if (!condition) {\n      for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n        args[_key2 - 2] = arguments[_key2];\n      }\n\n      printWarning.apply(undefined, [format].concat(args));\n    }\n  };\n}\n\nmodule.exports = warning;","/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\n(function (global, factory) {\n    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n    typeof define === 'function' && define.amd ? define(factory) :\n    (global.hoistNonReactStatics = factory());\n}(this, (function () {\n    'use strict';\n    \n    var REACT_STATICS = {\n        childContextTypes: true,\n        contextTypes: true,\n        defaultProps: true,\n        displayName: true,\n        getDefaultProps: true,\n        getDerivedStateFromProps: true,\n        mixins: true,\n        propTypes: true,\n        type: true\n    };\n    \n    var KNOWN_STATICS = {\n        name: true,\n        length: true,\n        prototype: true,\n        caller: true,\n        callee: true,\n        arguments: true,\n        arity: true\n    };\n    \n    var defineProperty = Object.defineProperty;\n    var getOwnPropertyNames = Object.getOwnPropertyNames;\n    var getOwnPropertySymbols = Object.getOwnPropertySymbols;\n    var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n    var getPrototypeOf = Object.getPrototypeOf;\n    var objectPrototype = getPrototypeOf && getPrototypeOf(Object);\n    \n    return function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n        if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components\n            \n            if (objectPrototype) {\n                var inheritedComponent = getPrototypeOf(sourceComponent);\n                if (inheritedComponent && inheritedComponent !== objectPrototype) {\n                    hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n                }\n            }\n            \n            var keys = getOwnPropertyNames(sourceComponent);\n            \n            if (getOwnPropertySymbols) {\n                keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n            }\n            \n            for (var i = 0; i < keys.length; ++i) {\n                var key = keys[i];\n                if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {\n                    var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n                    try { // Avoid failures from read-only properties\n                        defineProperty(targetComponent, key, descriptor);\n                    } catch (e) {}\n                }\n            }\n            \n            return targetComponent;\n        }\n        \n        return targetComponent;\n    };\n})));\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n  if (process.env.NODE_ENV !== 'production') {\n    if (format === undefined) {\n      throw new Error('invariant requires an error message argument');\n    }\n  }\n\n  if (!condition) {\n    var error;\n    if (format === undefined) {\n      error = new Error(\n        'Minified exception occurred; use the non-minified dev environment ' +\n        'for the full error message and additional helpful warnings.'\n      );\n    } else {\n      var args = [a, b, c, d, e, f];\n      var argIndex = 0;\n      error = new Error(\n        format.replace(/%s/g, function() { return args[argIndex++]; })\n      );\n      error.name = 'Invariant Violation';\n    }\n\n    error.framesToPop = 1; // we don't care about invariant's own frame\n    throw error;\n  }\n};\n\nmodule.exports = invariant;\n","import root from './_root.js';\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nexport default Symbol;\n","import Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n    undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n  if (value == null) {\n    return value === undefined ? undefinedTag : nullTag;\n  }\n  return (symToStringTag && symToStringTag in Object(value))\n    ? getRawTag(value)\n    : objectToString(value);\n}\n\nexport default baseGetTag;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n","import overArg from './_overArg.js';\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nexport default getPrototype;\n","import Symbol from './_Symbol.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n  var isOwn = hasOwnProperty.call(value, symToStringTag),\n      tag = value[symToStringTag];\n\n  try {\n    value[symToStringTag] = undefined;\n    var unmasked = true;\n  } catch (e) {}\n\n  var result = nativeObjectToString.call(value);\n  if (unmasked) {\n    if (isOwn) {\n      value[symToStringTag] = tag;\n    } else {\n      delete value[symToStringTag];\n    }\n  }\n  return result;\n}\n\nexport default getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n  return nativeObjectToString.call(value);\n}\n\nexport default objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n  return function(arg) {\n    return func(transform(arg));\n  };\n}\n\nexport default overArg;\n","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nexport default root;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return value != null && typeof value == 'object';\n}\n\nexport default isObjectLike;\n","import baseGetTag from './_baseGetTag.js';\nimport getPrototype from './_getPrototype.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n  if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n    return false;\n  }\n  var proto = getPrototype(value);\n  if (proto === null) {\n    return true;\n  }\n  var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n  return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n    funcToString.call(Ctor) == objectCtorString;\n}\n\nexport default isPlainObject;\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc');  // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== 'production') {\n  var invariant = require('fbjs/lib/invariant');\n  var warning = require('fbjs/lib/warning');\n  var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n  var loggedTypeFailures = {};\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n  if (process.env.NODE_ENV !== 'production') {\n    for (var typeSpecName in typeSpecs) {\n      if (typeSpecs.hasOwnProperty(typeSpecName)) {\n        var error;\n        // Prop type validation may throw. In case they do, we don't want to\n        // fail the render phase where it didn't fail before. So we log it.\n        // After these have been cleaned up, we'll let them throw.\n        try {\n          // This is intentionally an invariant that gets caught. It's the same\n          // behavior as without this statement except with a better message.\n          invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);\n          error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n        } catch (ex) {\n          error = ex;\n        }\n        warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);\n        if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n          // Only monitor this failure once because there tends to be a lot of the\n          // same error.\n          loggedTypeFailures[error.message] = true;\n\n          var stack = getStack ? getStack() : '';\n\n          warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');\n        }\n      }\n    }\n  }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n  /* global Symbol */\n  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n  /**\n   * Returns the iterator method function contained on the iterable object.\n   *\n   * Be sure to invoke the function with the iterable as context:\n   *\n   *     var iteratorFn = getIteratorFn(myIterable);\n   *     if (iteratorFn) {\n   *       var iterator = iteratorFn.call(myIterable);\n   *       ...\n   *     }\n   *\n   * @param {?object} maybeIterable\n   * @return {?function}\n   */\n  function getIteratorFn(maybeIterable) {\n    var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n    if (typeof iteratorFn === 'function') {\n      return iteratorFn;\n    }\n  }\n\n  /**\n   * Collection of methods that allow declaration and validation of props that are\n   * supplied to React components. Example usage:\n   *\n   *   var Props = require('ReactPropTypes');\n   *   var MyArticle = React.createClass({\n   *     propTypes: {\n   *       // An optional string prop named \"description\".\n   *       description: Props.string,\n   *\n   *       // A required enum prop named \"category\".\n   *       category: Props.oneOf(['News','Photos']).isRequired,\n   *\n   *       // A prop named \"dialog\" that requires an instance of Dialog.\n   *       dialog: Props.instanceOf(Dialog).isRequired\n   *     },\n   *     render: function() { ... }\n   *   });\n   *\n   * A more formal specification of how these methods are used:\n   *\n   *   type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n   *   decl := ReactPropTypes.{type}(.isRequired)?\n   *\n   * Each and every declaration produces a function with the same signature. This\n   * allows the creation of custom validation functions. For example:\n   *\n   *  var MyLink = React.createClass({\n   *    propTypes: {\n   *      // An optional string or URI prop named \"href\".\n   *      href: function(props, propName, componentName) {\n   *        var propValue = props[propName];\n   *        if (propValue != null && typeof propValue !== 'string' &&\n   *            !(propValue instanceof URI)) {\n   *          return new Error(\n   *            'Expected a string or an URI for ' + propName + ' in ' +\n   *            componentName\n   *          );\n   *        }\n   *      }\n   *    },\n   *    render: function() {...}\n   *  });\n   *\n   * @internal\n   */\n\n  var ANONYMOUS = '<<anonymous>>';\n\n  // Important!\n  // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n  var ReactPropTypes = {\n    array: createPrimitiveTypeChecker('array'),\n    bool: createPrimitiveTypeChecker('boolean'),\n    func: createPrimitiveTypeChecker('function'),\n    number: createPrimitiveTypeChecker('number'),\n    object: createPrimitiveTypeChecker('object'),\n    string: createPrimitiveTypeChecker('string'),\n    symbol: createPrimitiveTypeChecker('symbol'),\n\n    any: createAnyTypeChecker(),\n    arrayOf: createArrayOfTypeChecker,\n    element: createElementTypeChecker(),\n    instanceOf: createInstanceTypeChecker,\n    node: createNodeChecker(),\n    objectOf: createObjectOfTypeChecker,\n    oneOf: createEnumTypeChecker,\n    oneOfType: createUnionTypeChecker,\n    shape: createShapeTypeChecker,\n    exact: createStrictShapeTypeChecker,\n  };\n\n  /**\n   * inlined Object.is polyfill to avoid requiring consumers ship their own\n   * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n   */\n  /*eslint-disable no-self-compare*/\n  function is(x, y) {\n    // SameValue algorithm\n    if (x === y) {\n      // Steps 1-5, 7-10\n      // Steps 6.b-6.e: +0 != -0\n      return x !== 0 || 1 / x === 1 / y;\n    } else {\n      // Step 6.a: NaN == NaN\n      return x !== x && y !== y;\n    }\n  }\n  /*eslint-enable no-self-compare*/\n\n  /**\n   * We use an Error-like object for backward compatibility as people may call\n   * PropTypes directly and inspect their output. However, we don't use real\n   * Errors anymore. We don't inspect their stack anyway, and creating them\n   * is prohibitively expensive if they are created too often, such as what\n   * happens in oneOfType() for any type before the one that matched.\n   */\n  function PropTypeError(message) {\n    this.message = message;\n    this.stack = '';\n  }\n  // Make `instanceof Error` still work for returned errors.\n  PropTypeError.prototype = Error.prototype;\n\n  function createChainableTypeChecker(validate) {\n    if (process.env.NODE_ENV !== 'production') {\n      var manualPropTypeCallCache = {};\n      var manualPropTypeWarningCount = 0;\n    }\n    function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n      componentName = componentName || ANONYMOUS;\n      propFullName = propFullName || propName;\n\n      if (secret !== ReactPropTypesSecret) {\n        if (throwOnDirectAccess) {\n          // New behavior only for users of `prop-types` package\n          invariant(\n            false,\n            'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n            'Use `PropTypes.checkPropTypes()` to call them. ' +\n            'Read more at http://fb.me/use-check-prop-types'\n          );\n        } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n          // Old behavior for people using React.PropTypes\n          var cacheKey = componentName + ':' + propName;\n          if (\n            !manualPropTypeCallCache[cacheKey] &&\n            // Avoid spamming the console because they are often not actionable except for lib authors\n            manualPropTypeWarningCount < 3\n          ) {\n            warning(\n              false,\n              'You are manually calling a React.PropTypes validation ' +\n              'function for the `%s` prop on `%s`. This is deprecated ' +\n              'and will throw in the standalone `prop-types` package. ' +\n              'You may be seeing this warning due to a third-party PropTypes ' +\n              'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',\n              propFullName,\n              componentName\n            );\n            manualPropTypeCallCache[cacheKey] = true;\n            manualPropTypeWarningCount++;\n          }\n        }\n      }\n      if (props[propName] == null) {\n        if (isRequired) {\n          if (props[propName] === null) {\n            return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n          }\n          return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n        }\n        return null;\n      } else {\n        return validate(props, propName, componentName, location, propFullName);\n      }\n    }\n\n    var chainedCheckType = checkType.bind(null, false);\n    chainedCheckType.isRequired = checkType.bind(null, true);\n\n    return chainedCheckType;\n  }\n\n  function createPrimitiveTypeChecker(expectedType) {\n    function validate(props, propName, componentName, location, propFullName, secret) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== expectedType) {\n        // `propValue` being instance of, say, date/regexp, pass the 'object'\n        // check, but we can offer a more precise error message here rather than\n        // 'of type `object`'.\n        var preciseType = getPreciseType(propValue);\n\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createAnyTypeChecker() {\n    return createChainableTypeChecker(emptyFunction.thatReturnsNull);\n  }\n\n  function createArrayOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n      }\n      var propValue = props[propName];\n      if (!Array.isArray(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n      }\n      for (var i = 0; i < propValue.length; i++) {\n        var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n        if (error instanceof Error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createElementTypeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      if (!isValidElement(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createInstanceTypeChecker(expectedClass) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!(props[propName] instanceof expectedClass)) {\n        var expectedClassName = expectedClass.name || ANONYMOUS;\n        var actualClassName = getClassName(props[propName]);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createEnumTypeChecker(expectedValues) {\n    if (!Array.isArray(expectedValues)) {\n      process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;\n      return emptyFunction.thatReturnsNull;\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      for (var i = 0; i < expectedValues.length; i++) {\n        if (is(propValue, expectedValues[i])) {\n          return null;\n        }\n      }\n\n      var valuesString = JSON.stringify(expectedValues);\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createObjectOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n      }\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n      }\n      for (var key in propValue) {\n        if (propValue.hasOwnProperty(key)) {\n          var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n          if (error instanceof Error) {\n            return error;\n          }\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createUnionTypeChecker(arrayOfTypeCheckers) {\n    if (!Array.isArray(arrayOfTypeCheckers)) {\n      process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n      return emptyFunction.thatReturnsNull;\n    }\n\n    for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n      var checker = arrayOfTypeCheckers[i];\n      if (typeof checker !== 'function') {\n        warning(\n          false,\n          'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n          'received %s at index %s.',\n          getPostfixForTypeWarning(checker),\n          i\n        );\n        return emptyFunction.thatReturnsNull;\n      }\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n        var checker = arrayOfTypeCheckers[i];\n        if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n          return null;\n        }\n      }\n\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createNodeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!isNode(props[propName])) {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      for (var key in shapeTypes) {\n        var checker = shapeTypes[key];\n        if (!checker) {\n          continue;\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createStrictShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      // We need to check all keys in case some are required but missing from\n      // props.\n      var allKeys = assign({}, props[propName], shapeTypes);\n      for (var key in allKeys) {\n        var checker = shapeTypes[key];\n        if (!checker) {\n          return new PropTypeError(\n            'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n            '\\nBad object: ' + JSON.stringify(props[propName], null, '  ') +\n            '\\nValid keys: ' +  JSON.stringify(Object.keys(shapeTypes), null, '  ')\n          );\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n\n    return createChainableTypeChecker(validate);\n  }\n\n  function isNode(propValue) {\n    switch (typeof propValue) {\n      case 'number':\n      case 'string':\n      case 'undefined':\n        return true;\n      case 'boolean':\n        return !propValue;\n      case 'object':\n        if (Array.isArray(propValue)) {\n          return propValue.every(isNode);\n        }\n        if (propValue === null || isValidElement(propValue)) {\n          return true;\n        }\n\n        var iteratorFn = getIteratorFn(propValue);\n        if (iteratorFn) {\n          var iterator = iteratorFn.call(propValue);\n          var step;\n          if (iteratorFn !== propValue.entries) {\n            while (!(step = iterator.next()).done) {\n              if (!isNode(step.value)) {\n                return false;\n              }\n            }\n          } else {\n            // Iterator will provide entry [k,v] tuples rather than values.\n            while (!(step = iterator.next()).done) {\n              var entry = step.value;\n              if (entry) {\n                if (!isNode(entry[1])) {\n                  return false;\n                }\n              }\n            }\n          }\n        } else {\n          return false;\n        }\n\n        return true;\n      default:\n        return false;\n    }\n  }\n\n  function isSymbol(propType, propValue) {\n    // Native Symbol.\n    if (propType === 'symbol') {\n      return true;\n    }\n\n    // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n    if (propValue['@@toStringTag'] === 'Symbol') {\n      return true;\n    }\n\n    // Fallback for non-spec compliant Symbols which are polyfilled.\n    if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n      return true;\n    }\n\n    return false;\n  }\n\n  // Equivalent of `typeof` but with special handling for array and regexp.\n  function getPropType(propValue) {\n    var propType = typeof propValue;\n    if (Array.isArray(propValue)) {\n      return 'array';\n    }\n    if (propValue instanceof RegExp) {\n      // Old webkits (at least until Android 4.0) return 'function' rather than\n      // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n      // passes PropTypes.object.\n      return 'object';\n    }\n    if (isSymbol(propType, propValue)) {\n      return 'symbol';\n    }\n    return propType;\n  }\n\n  // This handles more types than `getPropType`. Only used for error messages.\n  // See `createPrimitiveTypeChecker`.\n  function getPreciseType(propValue) {\n    if (typeof propValue === 'undefined' || propValue === null) {\n      return '' + propValue;\n    }\n    var propType = getPropType(propValue);\n    if (propType === 'object') {\n      if (propValue instanceof Date) {\n        return 'date';\n      } else if (propValue instanceof RegExp) {\n        return 'regexp';\n      }\n    }\n    return propType;\n  }\n\n  // Returns a string that is postfixed to a warning about an invalid type.\n  // For example, \"undefined\" or \"of type array\"\n  function getPostfixForTypeWarning(value) {\n    var type = getPreciseType(value);\n    switch (type) {\n      case 'array':\n      case 'object':\n        return 'an ' + type;\n      case 'boolean':\n      case 'date':\n      case 'regexp':\n        return 'a ' + type;\n      default:\n        return type;\n    }\n  }\n\n  // Returns class name of the object, if any.\n  function getClassName(propValue) {\n    if (!propValue.constructor || !propValue.constructor.name) {\n      return ANONYMOUS;\n    }\n    return propValue.constructor.name;\n  }\n\n  ReactPropTypes.checkPropTypes = checkPropTypes;\n  ReactPropTypes.PropTypes = ReactPropTypes;\n\n  return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n  var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n    Symbol.for &&\n    Symbol.for('react.element')) ||\n    0xeac7;\n\n  var isValidElement = function(object) {\n    return typeof object === 'object' &&\n      object !== null &&\n      object.$$typeof === REACT_ELEMENT_TYPE;\n  };\n\n  // By explicitly using `prop-types` you are opting into new development behavior.\n  // http://fb.me/prop-types-in-prod\n  var throwOnDirectAccess = true;\n  module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n  // By explicitly using `prop-types` you are opting into new production behavior.\n  // http://fb.me/prop-types-in-prod\n  module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from 'warning';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport createHistory from 'history/createBrowserHistory';\nimport Router from './Router';\n\n/**\n * The public API for a <Router> that uses HTML5 history.\n */\n\nvar BrowserRouter = function (_React$Component) {\n  _inherits(BrowserRouter, _React$Component);\n\n  function BrowserRouter() {\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, BrowserRouter);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = createHistory(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  BrowserRouter.prototype.componentWillMount = function componentWillMount() {\n    warning(!this.props.history, '<BrowserRouter> ignores the history prop. To use a custom history, ' + 'use `import { Router }` instead of `import { BrowserRouter as Router }`.');\n  };\n\n  BrowserRouter.prototype.render = function render() {\n    return React.createElement(Router, { history: this.history, children: this.props.children });\n  };\n\n  return BrowserRouter;\n}(React.Component);\n\nBrowserRouter.propTypes = {\n  basename: PropTypes.string,\n  forceRefresh: PropTypes.bool,\n  getUserConfirmation: PropTypes.func,\n  keyLength: PropTypes.number,\n  children: PropTypes.node\n};\n\n\nexport default BrowserRouter;","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from 'warning';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport createHistory from 'history/createHashHistory';\nimport Router from './Router';\n\n/**\n * The public API for a <Router> that uses window.location.hash.\n */\n\nvar HashRouter = function (_React$Component) {\n  _inherits(HashRouter, _React$Component);\n\n  function HashRouter() {\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, HashRouter);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = createHistory(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  HashRouter.prototype.componentWillMount = function componentWillMount() {\n    warning(!this.props.history, '<HashRouter> ignores the history prop. To use a custom history, ' + 'use `import { Router }` instead of `import { HashRouter as Router }`.');\n  };\n\n  HashRouter.prototype.render = function render() {\n    return React.createElement(Router, { history: this.history, children: this.props.children });\n  };\n\n  return HashRouter;\n}(React.Component);\n\nHashRouter.propTypes = {\n  basename: PropTypes.string,\n  getUserConfirmation: PropTypes.func,\n  hashType: PropTypes.oneOf(['hashbang', 'noslash', 'slash']),\n  children: PropTypes.node\n};\n\n\nexport default HashRouter;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport invariant from 'invariant';\n\nvar isModifiedEvent = function isModifiedEvent(event) {\n  return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n};\n\n/**\n * The public API for rendering a history-aware <a>.\n */\n\nvar Link = function (_React$Component) {\n  _inherits(Link, _React$Component);\n\n  function Link() {\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, Link);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleClick = function (event) {\n      if (_this.props.onClick) _this.props.onClick(event);\n\n      if (!event.defaultPrevented && // onClick prevented default\n      event.button === 0 && // ignore right clicks\n      !_this.props.target && // let browser handle \"target=_blank\" etc.\n      !isModifiedEvent(event) // ignore clicks with modifier keys\n      ) {\n          event.preventDefault();\n\n          var history = _this.context.router.history;\n          var _this$props = _this.props,\n              replace = _this$props.replace,\n              to = _this$props.to;\n\n\n          if (replace) {\n            history.replace(to);\n          } else {\n            history.push(to);\n          }\n        }\n    }, _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  Link.prototype.render = function render() {\n    var _props = this.props,\n        replace = _props.replace,\n        to = _props.to,\n        innerRef = _props.innerRef,\n        props = _objectWithoutProperties(_props, ['replace', 'to', 'innerRef']); // eslint-disable-line no-unused-vars\n\n    invariant(this.context.router, 'You should not use <Link> outside a <Router>');\n\n    var href = this.context.router.history.createHref(typeof to === 'string' ? { pathname: to } : to);\n\n    return React.createElement('a', _extends({}, props, { onClick: this.handleClick, href: href, ref: innerRef }));\n  };\n\n  return Link;\n}(React.Component);\n\nLink.propTypes = {\n  onClick: PropTypes.func,\n  target: PropTypes.string,\n  replace: PropTypes.bool,\n  to: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,\n  innerRef: PropTypes.oneOfType([PropTypes.string, PropTypes.func])\n};\nLink.defaultProps = {\n  replace: false\n};\nLink.contextTypes = {\n  router: PropTypes.shape({\n    history: PropTypes.shape({\n      push: PropTypes.func.isRequired,\n      replace: PropTypes.func.isRequired,\n      createHref: PropTypes.func.isRequired\n    }).isRequired\n  }).isRequired\n};\n\n\nexport default Link;","// Written in this round about way for babel-transform-imports\nimport MemoryRouter from 'react-router/es/MemoryRouter';\n\nexport default MemoryRouter;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Route from './Route';\nimport Link from './Link';\n\n/**\n * A <Link> wrapper that knows if it's \"active\" or not.\n */\nvar NavLink = function NavLink(_ref) {\n  var to = _ref.to,\n      exact = _ref.exact,\n      strict = _ref.strict,\n      location = _ref.location,\n      activeClassName = _ref.activeClassName,\n      className = _ref.className,\n      activeStyle = _ref.activeStyle,\n      style = _ref.style,\n      getIsActive = _ref.isActive,\n      ariaCurrent = _ref.ariaCurrent,\n      rest = _objectWithoutProperties(_ref, ['to', 'exact', 'strict', 'location', 'activeClassName', 'className', 'activeStyle', 'style', 'isActive', 'ariaCurrent']);\n\n  return React.createElement(Route, {\n    path: (typeof to === 'undefined' ? 'undefined' : _typeof(to)) === 'object' ? to.pathname : to,\n    exact: exact,\n    strict: strict,\n    location: location,\n    children: function children(_ref2) {\n      var location = _ref2.location,\n          match = _ref2.match;\n\n      var isActive = !!(getIsActive ? getIsActive(match, location) : match);\n\n      return React.createElement(Link, _extends({\n        to: to,\n        className: isActive ? [className, activeClassName].filter(function (i) {\n          return i;\n        }).join(' ') : className,\n        style: isActive ? _extends({}, style, activeStyle) : style,\n        'aria-current': isActive && ariaCurrent\n      }, rest));\n    }\n  });\n};\n\nNavLink.propTypes = {\n  to: Link.propTypes.to,\n  exact: PropTypes.bool,\n  strict: PropTypes.bool,\n  location: PropTypes.object,\n  activeClassName: PropTypes.string,\n  className: PropTypes.string,\n  activeStyle: PropTypes.object,\n  style: PropTypes.object,\n  isActive: PropTypes.func,\n  ariaCurrent: PropTypes.oneOf(['page', 'step', 'location', 'true'])\n};\n\nNavLink.defaultProps = {\n  activeClassName: 'active',\n  ariaCurrent: 'true'\n};\n\nexport default NavLink;","// Written in this round about way for babel-transform-imports\nimport Prompt from 'react-router/es/Prompt';\n\nexport default Prompt;","// Written in this round about way for babel-transform-imports\nimport Redirect from 'react-router/es/Redirect';\n\nexport default Redirect;","// Written in this round about way for babel-transform-imports\nimport Route from 'react-router/es/Route';\n\nexport default Route;","// Written in this round about way for babel-transform-imports\nimport Router from 'react-router/es/Router';\n\nexport default Router;","// Written in this round about way for babel-transform-imports\nimport StaticRouter from 'react-router/es/StaticRouter';\n\nexport default StaticRouter;","// Written in this round about way for babel-transform-imports\nimport Switch from 'react-router/es/Switch';\n\nexport default Switch;","import _BrowserRouter from './BrowserRouter';\nexport { _BrowserRouter as BrowserRouter };\nimport _HashRouter from './HashRouter';\nexport { _HashRouter as HashRouter };\nimport _Link from './Link';\nexport { _Link as Link };\nimport _MemoryRouter from './MemoryRouter';\nexport { _MemoryRouter as MemoryRouter };\nimport _NavLink from './NavLink';\nexport { _NavLink as NavLink };\nimport _Prompt from './Prompt';\nexport { _Prompt as Prompt };\nimport _Redirect from './Redirect';\nexport { _Redirect as Redirect };\nimport _Route from './Route';\nexport { _Route as Route };\nimport _Router from './Router';\nexport { _Router as Router };\nimport _StaticRouter from './StaticRouter';\nexport { _StaticRouter as StaticRouter };\nimport _Switch from './Switch';\nexport { _Switch as Switch };\nimport _matchPath from './matchPath';\nexport { _matchPath as matchPath };\nimport _withRouter from './withRouter';\nexport { _withRouter as withRouter };","// Written in this round about way for babel-transform-imports\nimport matchPath from 'react-router/es/matchPath';\n\nexport default matchPath;","// Written in this round about way for babel-transform-imports\nimport withRouter from 'react-router/es/withRouter';\n\nexport default withRouter;","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n  return function () {\n    return arg;\n  };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n  return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n  return arg;\n};\n\nmodule.exports = emptyFunction;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n  validateFormat = function validateFormat(format) {\n    if (format === undefined) {\n      throw new Error('invariant requires an error message argument');\n    }\n  };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n  validateFormat(format);\n\n  if (!condition) {\n    var error;\n    if (format === undefined) {\n      error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n    } else {\n      var args = [a, b, c, d, e, f];\n      var argIndex = 0;\n      error = new Error(format.replace(/%s/g, function () {\n        return args[argIndex++];\n      }));\n      error.name = 'Invariant Violation';\n    }\n\n    error.framesToPop = 1; // we don't care about invariant's own frame\n    throw error;\n  }\n}\n\nmodule.exports = invariant;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar emptyFunction = require('./emptyFunction');\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = emptyFunction;\n\nif (process.env.NODE_ENV !== 'production') {\n  var printWarning = function printWarning(format) {\n    for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n      args[_key - 1] = arguments[_key];\n    }\n\n    var argIndex = 0;\n    var message = 'Warning: ' + format.replace(/%s/g, function () {\n      return args[argIndex++];\n    });\n    if (typeof console !== 'undefined') {\n      console.error(message);\n    }\n    try {\n      // --- Welcome to debugging React ---\n      // This error was thrown as a convenience so that you can use this stack\n      // to find the callsite that caused this warning to fire.\n      throw new Error(message);\n    } catch (x) {}\n  };\n\n  warning = function warning(condition, format) {\n    if (format === undefined) {\n      throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n    }\n\n    if (format.indexOf('Failed Composite propType: ') === 0) {\n      return; // Ignore CompositeComponent proptype check.\n    }\n\n    if (!condition) {\n      for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n        args[_key2 - 2] = arguments[_key2];\n      }\n\n      printWarning.apply(undefined, [format].concat(args));\n    }\n  };\n}\n\nmodule.exports = warning;","'use strict';\n\nexports.__esModule = true;\nvar canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nvar addEventListener = exports.addEventListener = function addEventListener(node, event, listener) {\n  return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener);\n};\n\nvar removeEventListener = exports.removeEventListener = function removeEventListener(node, event, listener) {\n  return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener);\n};\n\nvar getConfirmation = exports.getConfirmation = function getConfirmation(message, callback) {\n  return callback(window.confirm(message));\n}; // eslint-disable-line no-alert\n\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\nvar supportsHistory = exports.supportsHistory = function supportsHistory() {\n  var ua = window.navigator.userAgent;\n\n  if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n\n  return window.history && 'pushState' in window.history;\n};\n\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\nvar supportsPopStateOnHashChange = exports.supportsPopStateOnHashChange = function supportsPopStateOnHashChange() {\n  return window.navigator.userAgent.indexOf('Trident') === -1;\n};\n\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\nvar supportsGoWithoutReloadUsingHash = exports.supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() {\n  return window.navigator.userAgent.indexOf('Firefox') === -1;\n};\n\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\nvar isExtraneousPopstateEvent = exports.isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) {\n  return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n};","'use strict';\n\nexports.__esModule = true;\nexports.locationsAreEqual = exports.createLocation = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _resolvePathname = require('resolve-pathname');\n\nvar _resolvePathname2 = _interopRequireDefault(_resolvePathname);\n\nvar _valueEqual = require('value-equal');\n\nvar _valueEqual2 = _interopRequireDefault(_valueEqual);\n\nvar _PathUtils = require('./PathUtils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar createLocation = exports.createLocation = function createLocation(path, state, key, currentLocation) {\n  var location = void 0;\n  if (typeof path === 'string') {\n    // Two-arg form: push(path, state)\n    location = (0, _PathUtils.parsePath)(path);\n    location.state = state;\n  } else {\n    // One-arg form: push(location)\n    location = _extends({}, path);\n\n    if (location.pathname === undefined) location.pathname = '';\n\n    if (location.search) {\n      if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n    } else {\n      location.search = '';\n    }\n\n    if (location.hash) {\n      if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n    } else {\n      location.hash = '';\n    }\n\n    if (state !== undefined && location.state === undefined) location.state = state;\n  }\n\n  try {\n    location.pathname = decodeURI(location.pathname);\n  } catch (e) {\n    if (e instanceof URIError) {\n      throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n    } else {\n      throw e;\n    }\n  }\n\n  if (key) location.key = key;\n\n  if (currentLocation) {\n    // Resolve incomplete/relative pathname relative to current location.\n    if (!location.pathname) {\n      location.pathname = currentLocation.pathname;\n    } else if (location.pathname.charAt(0) !== '/') {\n      location.pathname = (0, _resolvePathname2.default)(location.pathname, currentLocation.pathname);\n    }\n  } else {\n    // When there is no prior location and pathname is empty, set it to /\n    if (!location.pathname) {\n      location.pathname = '/';\n    }\n  }\n\n  return location;\n};\n\nvar locationsAreEqual = exports.locationsAreEqual = function locationsAreEqual(a, b) {\n  return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && (0, _valueEqual2.default)(a.state, b.state);\n};","'use strict';\n\nexports.__esModule = true;\nvar addLeadingSlash = exports.addLeadingSlash = function addLeadingSlash(path) {\n  return path.charAt(0) === '/' ? path : '/' + path;\n};\n\nvar stripLeadingSlash = exports.stripLeadingSlash = function stripLeadingSlash(path) {\n  return path.charAt(0) === '/' ? path.substr(1) : path;\n};\n\nvar hasBasename = exports.hasBasename = function hasBasename(path, prefix) {\n  return new RegExp('^' + prefix + '(\\\\/|\\\\?|#|$)', 'i').test(path);\n};\n\nvar stripBasename = exports.stripBasename = function stripBasename(path, prefix) {\n  return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n};\n\nvar stripTrailingSlash = exports.stripTrailingSlash = function stripTrailingSlash(path) {\n  return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n};\n\nvar parsePath = exports.parsePath = function parsePath(path) {\n  var pathname = path || '/';\n  var search = '';\n  var hash = '';\n\n  var hashIndex = pathname.indexOf('#');\n  if (hashIndex !== -1) {\n    hash = pathname.substr(hashIndex);\n    pathname = pathname.substr(0, hashIndex);\n  }\n\n  var searchIndex = pathname.indexOf('?');\n  if (searchIndex !== -1) {\n    search = pathname.substr(searchIndex);\n    pathname = pathname.substr(0, searchIndex);\n  }\n\n  return {\n    pathname: pathname,\n    search: search === '?' ? '' : search,\n    hash: hash === '#' ? '' : hash\n  };\n};\n\nvar createPath = exports.createPath = function createPath(location) {\n  var pathname = location.pathname,\n      search = location.search,\n      hash = location.hash;\n\n\n  var path = pathname || '/';\n\n  if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search;\n\n  if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash;\n\n  return path;\n};","'use strict';\n\nexports.__esModule = true;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _LocationUtils = require('./LocationUtils');\n\nvar _PathUtils = require('./PathUtils');\n\nvar _createTransitionManager = require('./createTransitionManager');\n\nvar _createTransitionManager2 = _interopRequireDefault(_createTransitionManager);\n\nvar _DOMUtils = require('./DOMUtils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nvar getHistoryState = function getHistoryState() {\n  try {\n    return window.history.state || {};\n  } catch (e) {\n    // IE 11 sometimes throws when accessing window.history.state\n    // See https://github.com/ReactTraining/history/pull/289\n    return {};\n  }\n};\n\n/**\n * Creates a history object that uses the HTML5 history API including\n * pushState, replaceState, and the popstate event.\n */\nvar createBrowserHistory = function createBrowserHistory() {\n  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n  (0, _invariant2.default)(_DOMUtils.canUseDOM, 'Browser history needs a DOM');\n\n  var globalHistory = window.history;\n  var canUseHistory = (0, _DOMUtils.supportsHistory)();\n  var needsHashChangeListener = !(0, _DOMUtils.supportsPopStateOnHashChange)();\n\n  var _props$forceRefresh = props.forceRefresh,\n      forceRefresh = _props$forceRefresh === undefined ? false : _props$forceRefresh,\n      _props$getUserConfirm = props.getUserConfirmation,\n      getUserConfirmation = _props$getUserConfirm === undefined ? _DOMUtils.getConfirmation : _props$getUserConfirm,\n      _props$keyLength = props.keyLength,\n      keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;\n\n  var basename = props.basename ? (0, _PathUtils.stripTrailingSlash)((0, _PathUtils.addLeadingSlash)(props.basename)) : '';\n\n  var getDOMLocation = function getDOMLocation(historyState) {\n    var _ref = historyState || {},\n        key = _ref.key,\n        state = _ref.state;\n\n    var _window$location = window.location,\n        pathname = _window$location.pathname,\n        search = _window$location.search,\n        hash = _window$location.hash;\n\n\n    var path = pathname + search + hash;\n\n    (0, _warning2.default)(!basename || (0, _PathUtils.hasBasename)(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n    if (basename) path = (0, _PathUtils.stripBasename)(path, basename);\n\n    return (0, _LocationUtils.createLocation)(path, state, key);\n  };\n\n  var createKey = function createKey() {\n    return Math.random().toString(36).substr(2, keyLength);\n  };\n\n  var transitionManager = (0, _createTransitionManager2.default)();\n\n  var setState = function setState(nextState) {\n    _extends(history, nextState);\n\n    history.length = globalHistory.length;\n\n    transitionManager.notifyListeners(history.location, history.action);\n  };\n\n  var handlePopState = function handlePopState(event) {\n    // Ignore extraneous popstate events in WebKit.\n    if ((0, _DOMUtils.isExtraneousPopstateEvent)(event)) return;\n\n    handlePop(getDOMLocation(event.state));\n  };\n\n  var handleHashChange = function handleHashChange() {\n    handlePop(getDOMLocation(getHistoryState()));\n  };\n\n  var forceNextPop = false;\n\n  var handlePop = function handlePop(location) {\n    if (forceNextPop) {\n      forceNextPop = false;\n      setState();\n    } else {\n      var action = 'POP';\n\n      transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n        if (ok) {\n          setState({ action: action, location: location });\n        } else {\n          revertPop(location);\n        }\n      });\n    }\n  };\n\n  var revertPop = function revertPop(fromLocation) {\n    var toLocation = history.location;\n\n    // TODO: We could probably make this more reliable by\n    // keeping a list of keys we've seen in sessionStorage.\n    // Instead, we just default to 0 for keys we don't know.\n\n    var toIndex = allKeys.indexOf(toLocation.key);\n\n    if (toIndex === -1) toIndex = 0;\n\n    var fromIndex = allKeys.indexOf(fromLocation.key);\n\n    if (fromIndex === -1) fromIndex = 0;\n\n    var delta = toIndex - fromIndex;\n\n    if (delta) {\n      forceNextPop = true;\n      go(delta);\n    }\n  };\n\n  var initialLocation = getDOMLocation(getHistoryState());\n  var allKeys = [initialLocation.key];\n\n  // Public interface\n\n  var createHref = function createHref(location) {\n    return basename + (0, _PathUtils.createPath)(location);\n  };\n\n  var push = function push(path, state) {\n    (0, _warning2.default)(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n    var action = 'PUSH';\n    var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var href = createHref(location);\n      var key = location.key,\n          state = location.state;\n\n\n      if (canUseHistory) {\n        globalHistory.pushState({ key: key, state: state }, null, href);\n\n        if (forceRefresh) {\n          window.location.href = href;\n        } else {\n          var prevIndex = allKeys.indexOf(history.location.key);\n          var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n          nextKeys.push(location.key);\n          allKeys = nextKeys;\n\n          setState({ action: action, location: location });\n        }\n      } else {\n        (0, _warning2.default)(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history');\n\n        window.location.href = href;\n      }\n    });\n  };\n\n  var replace = function replace(path, state) {\n    (0, _warning2.default)(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n    var action = 'REPLACE';\n    var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var href = createHref(location);\n      var key = location.key,\n          state = location.state;\n\n\n      if (canUseHistory) {\n        globalHistory.replaceState({ key: key, state: state }, null, href);\n\n        if (forceRefresh) {\n          window.location.replace(href);\n        } else {\n          var prevIndex = allKeys.indexOf(history.location.key);\n\n          if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n\n          setState({ action: action, location: location });\n        }\n      } else {\n        (0, _warning2.default)(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history');\n\n        window.location.replace(href);\n      }\n    });\n  };\n\n  var go = function go(n) {\n    globalHistory.go(n);\n  };\n\n  var goBack = function goBack() {\n    return go(-1);\n  };\n\n  var goForward = function goForward() {\n    return go(1);\n  };\n\n  var listenerCount = 0;\n\n  var checkDOMListeners = function checkDOMListeners(delta) {\n    listenerCount += delta;\n\n    if (listenerCount === 1) {\n      (0, _DOMUtils.addEventListener)(window, PopStateEvent, handlePopState);\n\n      if (needsHashChangeListener) (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleHashChange);\n    } else if (listenerCount === 0) {\n      (0, _DOMUtils.removeEventListener)(window, PopStateEvent, handlePopState);\n\n      if (needsHashChangeListener) (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleHashChange);\n    }\n  };\n\n  var isBlocked = false;\n\n  var block = function block() {\n    var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n    var unblock = transitionManager.setPrompt(prompt);\n\n    if (!isBlocked) {\n      checkDOMListeners(1);\n      isBlocked = true;\n    }\n\n    return function () {\n      if (isBlocked) {\n        isBlocked = false;\n        checkDOMListeners(-1);\n      }\n\n      return unblock();\n    };\n  };\n\n  var listen = function listen(listener) {\n    var unlisten = transitionManager.appendListener(listener);\n    checkDOMListeners(1);\n\n    return function () {\n      checkDOMListeners(-1);\n      unlisten();\n    };\n  };\n\n  var history = {\n    length: globalHistory.length,\n    action: 'POP',\n    location: initialLocation,\n    createHref: createHref,\n    push: push,\n    replace: replace,\n    go: go,\n    goBack: goBack,\n    goForward: goForward,\n    block: block,\n    listen: listen\n  };\n\n  return history;\n};\n\nexports.default = createBrowserHistory;","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _LocationUtils = require('./LocationUtils');\n\nvar _PathUtils = require('./PathUtils');\n\nvar _createTransitionManager = require('./createTransitionManager');\n\nvar _createTransitionManager2 = _interopRequireDefault(_createTransitionManager);\n\nvar _DOMUtils = require('./DOMUtils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar HashChangeEvent = 'hashchange';\n\nvar HashPathCoders = {\n  hashbang: {\n    encodePath: function encodePath(path) {\n      return path.charAt(0) === '!' ? path : '!/' + (0, _PathUtils.stripLeadingSlash)(path);\n    },\n    decodePath: function decodePath(path) {\n      return path.charAt(0) === '!' ? path.substr(1) : path;\n    }\n  },\n  noslash: {\n    encodePath: _PathUtils.stripLeadingSlash,\n    decodePath: _PathUtils.addLeadingSlash\n  },\n  slash: {\n    encodePath: _PathUtils.addLeadingSlash,\n    decodePath: _PathUtils.addLeadingSlash\n  }\n};\n\nvar getHashPath = function getHashPath() {\n  // We can't use window.location.hash here because it's not\n  // consistent across browsers - Firefox will pre-decode it!\n  var href = window.location.href;\n  var hashIndex = href.indexOf('#');\n  return hashIndex === -1 ? '' : href.substring(hashIndex + 1);\n};\n\nvar pushHashPath = function pushHashPath(path) {\n  return window.location.hash = path;\n};\n\nvar replaceHashPath = function replaceHashPath(path) {\n  var hashIndex = window.location.href.indexOf('#');\n\n  window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path);\n};\n\nvar createHashHistory = function createHashHistory() {\n  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n  (0, _invariant2.default)(_DOMUtils.canUseDOM, 'Hash history needs a DOM');\n\n  var globalHistory = window.history;\n  var canGoWithoutReload = (0, _DOMUtils.supportsGoWithoutReloadUsingHash)();\n\n  var _props$getUserConfirm = props.getUserConfirmation,\n      getUserConfirmation = _props$getUserConfirm === undefined ? _DOMUtils.getConfirmation : _props$getUserConfirm,\n      _props$hashType = props.hashType,\n      hashType = _props$hashType === undefined ? 'slash' : _props$hashType;\n\n  var basename = props.basename ? (0, _PathUtils.stripTrailingSlash)((0, _PathUtils.addLeadingSlash)(props.basename)) : '';\n\n  var _HashPathCoders$hashT = HashPathCoders[hashType],\n      encodePath = _HashPathCoders$hashT.encodePath,\n      decodePath = _HashPathCoders$hashT.decodePath;\n\n\n  var getDOMLocation = function getDOMLocation() {\n    var path = decodePath(getHashPath());\n\n    (0, _warning2.default)(!basename || (0, _PathUtils.hasBasename)(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n    if (basename) path = (0, _PathUtils.stripBasename)(path, basename);\n\n    return (0, _LocationUtils.createLocation)(path);\n  };\n\n  var transitionManager = (0, _createTransitionManager2.default)();\n\n  var setState = function setState(nextState) {\n    _extends(history, nextState);\n\n    history.length = globalHistory.length;\n\n    transitionManager.notifyListeners(history.location, history.action);\n  };\n\n  var forceNextPop = false;\n  var ignorePath = null;\n\n  var handleHashChange = function handleHashChange() {\n    var path = getHashPath();\n    var encodedPath = encodePath(path);\n\n    if (path !== encodedPath) {\n      // Ensure we always have a properly-encoded hash.\n      replaceHashPath(encodedPath);\n    } else {\n      var location = getDOMLocation();\n      var prevLocation = history.location;\n\n      if (!forceNextPop && (0, _LocationUtils.locationsAreEqual)(prevLocation, location)) return; // A hashchange doesn't always == location change.\n\n      if (ignorePath === (0, _PathUtils.createPath)(location)) return; // Ignore this change; we already setState in push/replace.\n\n      ignorePath = null;\n\n      handlePop(location);\n    }\n  };\n\n  var handlePop = function handlePop(location) {\n    if (forceNextPop) {\n      forceNextPop = false;\n      setState();\n    } else {\n      var action = 'POP';\n\n      transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n        if (ok) {\n          setState({ action: action, location: location });\n        } else {\n          revertPop(location);\n        }\n      });\n    }\n  };\n\n  var revertPop = function revertPop(fromLocation) {\n    var toLocation = history.location;\n\n    // TODO: We could probably make this more reliable by\n    // keeping a list of paths we've seen in sessionStorage.\n    // Instead, we just default to 0 for paths we don't know.\n\n    var toIndex = allPaths.lastIndexOf((0, _PathUtils.createPath)(toLocation));\n\n    if (toIndex === -1) toIndex = 0;\n\n    var fromIndex = allPaths.lastIndexOf((0, _PathUtils.createPath)(fromLocation));\n\n    if (fromIndex === -1) fromIndex = 0;\n\n    var delta = toIndex - fromIndex;\n\n    if (delta) {\n      forceNextPop = true;\n      go(delta);\n    }\n  };\n\n  // Ensure the hash is encoded properly before doing anything else.\n  var path = getHashPath();\n  var encodedPath = encodePath(path);\n\n  if (path !== encodedPath) replaceHashPath(encodedPath);\n\n  var initialLocation = getDOMLocation();\n  var allPaths = [(0, _PathUtils.createPath)(initialLocation)];\n\n  // Public interface\n\n  var createHref = function createHref(location) {\n    return '#' + encodePath(basename + (0, _PathUtils.createPath)(location));\n  };\n\n  var push = function push(path, state) {\n    (0, _warning2.default)(state === undefined, 'Hash history cannot push state; it is ignored');\n\n    var action = 'PUSH';\n    var location = (0, _LocationUtils.createLocation)(path, undefined, undefined, history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var path = (0, _PathUtils.createPath)(location);\n      var encodedPath = encodePath(basename + path);\n      var hashChanged = getHashPath() !== encodedPath;\n\n      if (hashChanged) {\n        // We cannot tell if a hashchange was caused by a PUSH, so we'd\n        // rather setState here and ignore the hashchange. The caveat here\n        // is that other hash histories in the page will consider it a POP.\n        ignorePath = path;\n        pushHashPath(encodedPath);\n\n        var prevIndex = allPaths.lastIndexOf((0, _PathUtils.createPath)(history.location));\n        var nextPaths = allPaths.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n        nextPaths.push(path);\n        allPaths = nextPaths;\n\n        setState({ action: action, location: location });\n      } else {\n        (0, _warning2.default)(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack');\n\n        setState();\n      }\n    });\n  };\n\n  var replace = function replace(path, state) {\n    (0, _warning2.default)(state === undefined, 'Hash history cannot replace state; it is ignored');\n\n    var action = 'REPLACE';\n    var location = (0, _LocationUtils.createLocation)(path, undefined, undefined, history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var path = (0, _PathUtils.createPath)(location);\n      var encodedPath = encodePath(basename + path);\n      var hashChanged = getHashPath() !== encodedPath;\n\n      if (hashChanged) {\n        // We cannot tell if a hashchange was caused by a REPLACE, so we'd\n        // rather setState here and ignore the hashchange. The caveat here\n        // is that other hash histories in the page will consider it a POP.\n        ignorePath = path;\n        replaceHashPath(encodedPath);\n      }\n\n      var prevIndex = allPaths.indexOf((0, _PathUtils.createPath)(history.location));\n\n      if (prevIndex !== -1) allPaths[prevIndex] = path;\n\n      setState({ action: action, location: location });\n    });\n  };\n\n  var go = function go(n) {\n    (0, _warning2.default)(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser');\n\n    globalHistory.go(n);\n  };\n\n  var goBack = function goBack() {\n    return go(-1);\n  };\n\n  var goForward = function goForward() {\n    return go(1);\n  };\n\n  var listenerCount = 0;\n\n  var checkDOMListeners = function checkDOMListeners(delta) {\n    listenerCount += delta;\n\n    if (listenerCount === 1) {\n      (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleHashChange);\n    } else if (listenerCount === 0) {\n      (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleHashChange);\n    }\n  };\n\n  var isBlocked = false;\n\n  var block = function block() {\n    var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n    var unblock = transitionManager.setPrompt(prompt);\n\n    if (!isBlocked) {\n      checkDOMListeners(1);\n      isBlocked = true;\n    }\n\n    return function () {\n      if (isBlocked) {\n        isBlocked = false;\n        checkDOMListeners(-1);\n      }\n\n      return unblock();\n    };\n  };\n\n  var listen = function listen(listener) {\n    var unlisten = transitionManager.appendListener(listener);\n    checkDOMListeners(1);\n\n    return function () {\n      checkDOMListeners(-1);\n      unlisten();\n    };\n  };\n\n  var history = {\n    length: globalHistory.length,\n    action: 'POP',\n    location: initialLocation,\n    createHref: createHref,\n    push: push,\n    replace: replace,\n    go: go,\n    goBack: goBack,\n    goForward: goForward,\n    block: block,\n    listen: listen\n  };\n\n  return history;\n};\n\nexports.default = createHashHistory;","'use strict';\n\nexports.__esModule = true;\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar createTransitionManager = function createTransitionManager() {\n  var prompt = null;\n\n  var setPrompt = function setPrompt(nextPrompt) {\n    (0, _warning2.default)(prompt == null, 'A history supports only one prompt at a time');\n\n    prompt = nextPrompt;\n\n    return function () {\n      if (prompt === nextPrompt) prompt = null;\n    };\n  };\n\n  var confirmTransitionTo = function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n    // TODO: If another transition starts while we're still confirming\n    // the previous one, we may end up in a weird state. Figure out the\n    // best way to handle this.\n    if (prompt != null) {\n      var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n\n      if (typeof result === 'string') {\n        if (typeof getUserConfirmation === 'function') {\n          getUserConfirmation(result, callback);\n        } else {\n          (0, _warning2.default)(false, 'A history needs a getUserConfirmation function in order to use a prompt message');\n\n          callback(true);\n        }\n      } else {\n        // Return false from a transition hook to cancel the transition.\n        callback(result !== false);\n      }\n    } else {\n      callback(true);\n    }\n  };\n\n  var listeners = [];\n\n  var appendListener = function appendListener(fn) {\n    var isActive = true;\n\n    var listener = function listener() {\n      if (isActive) fn.apply(undefined, arguments);\n    };\n\n    listeners.push(listener);\n\n    return function () {\n      isActive = false;\n      listeners = listeners.filter(function (item) {\n        return item !== listener;\n      });\n    };\n  };\n\n  var notifyListeners = function notifyListeners() {\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    listeners.forEach(function (listener) {\n      return listener.apply(undefined, args);\n    });\n  };\n\n  return {\n    setPrompt: setPrompt,\n    confirmTransitionTo: confirmTransitionTo,\n    appendListener: appendListener,\n    notifyListeners: notifyListeners\n  };\n};\n\nexports.default = createTransitionManager;","export var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nexport var addEventListener = function addEventListener(node, event, listener) {\n  return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener);\n};\n\nexport var removeEventListener = function removeEventListener(node, event, listener) {\n  return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener);\n};\n\nexport var getConfirmation = function getConfirmation(message, callback) {\n  return callback(window.confirm(message));\n}; // eslint-disable-line no-alert\n\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\nexport var supportsHistory = function supportsHistory() {\n  var ua = window.navigator.userAgent;\n\n  if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n\n  return window.history && 'pushState' in window.history;\n};\n\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\nexport var supportsPopStateOnHashChange = function supportsPopStateOnHashChange() {\n  return window.navigator.userAgent.indexOf('Trident') === -1;\n};\n\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\nexport var supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() {\n  return window.navigator.userAgent.indexOf('Firefox') === -1;\n};\n\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\nexport var isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) {\n  return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n};","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport resolvePathname from 'resolve-pathname';\nimport valueEqual from 'value-equal';\nimport { parsePath } from './PathUtils';\n\nexport var createLocation = function createLocation(path, state, key, currentLocation) {\n  var location = void 0;\n  if (typeof path === 'string') {\n    // Two-arg form: push(path, state)\n    location = parsePath(path);\n    location.state = state;\n  } else {\n    // One-arg form: push(location)\n    location = _extends({}, path);\n\n    if (location.pathname === undefined) location.pathname = '';\n\n    if (location.search) {\n      if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n    } else {\n      location.search = '';\n    }\n\n    if (location.hash) {\n      if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n    } else {\n      location.hash = '';\n    }\n\n    if (state !== undefined && location.state === undefined) location.state = state;\n  }\n\n  try {\n    location.pathname = decodeURI(location.pathname);\n  } catch (e) {\n    if (e instanceof URIError) {\n      throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n    } else {\n      throw e;\n    }\n  }\n\n  if (key) location.key = key;\n\n  if (currentLocation) {\n    // Resolve incomplete/relative pathname relative to current location.\n    if (!location.pathname) {\n      location.pathname = currentLocation.pathname;\n    } else if (location.pathname.charAt(0) !== '/') {\n      location.pathname = resolvePathname(location.pathname, currentLocation.pathname);\n    }\n  } else {\n    // When there is no prior location and pathname is empty, set it to /\n    if (!location.pathname) {\n      location.pathname = '/';\n    }\n  }\n\n  return location;\n};\n\nexport var locationsAreEqual = function locationsAreEqual(a, b) {\n  return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && valueEqual(a.state, b.state);\n};","export var addLeadingSlash = function addLeadingSlash(path) {\n  return path.charAt(0) === '/' ? path : '/' + path;\n};\n\nexport var stripLeadingSlash = function stripLeadingSlash(path) {\n  return path.charAt(0) === '/' ? path.substr(1) : path;\n};\n\nexport var hasBasename = function hasBasename(path, prefix) {\n  return new RegExp('^' + prefix + '(\\\\/|\\\\?|#|$)', 'i').test(path);\n};\n\nexport var stripBasename = function stripBasename(path, prefix) {\n  return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n};\n\nexport var stripTrailingSlash = function stripTrailingSlash(path) {\n  return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n};\n\nexport var parsePath = function parsePath(path) {\n  var pathname = path || '/';\n  var search = '';\n  var hash = '';\n\n  var hashIndex = pathname.indexOf('#');\n  if (hashIndex !== -1) {\n    hash = pathname.substr(hashIndex);\n    pathname = pathname.substr(0, hashIndex);\n  }\n\n  var searchIndex = pathname.indexOf('?');\n  if (searchIndex !== -1) {\n    search = pathname.substr(searchIndex);\n    pathname = pathname.substr(0, searchIndex);\n  }\n\n  return {\n    pathname: pathname,\n    search: search === '?' ? '' : search,\n    hash: hash === '#' ? '' : hash\n  };\n};\n\nexport var createPath = function createPath(location) {\n  var pathname = location.pathname,\n      search = location.search,\n      hash = location.hash;\n\n\n  var path = pathname || '/';\n\n  if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search;\n\n  if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash;\n\n  return path;\n};","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport warning from 'warning';\nimport invariant from 'invariant';\nimport { createLocation } from './LocationUtils';\nimport { addLeadingSlash, stripTrailingSlash, hasBasename, stripBasename, createPath } from './PathUtils';\nimport createTransitionManager from './createTransitionManager';\nimport { canUseDOM, addEventListener, removeEventListener, getConfirmation, supportsHistory, supportsPopStateOnHashChange, isExtraneousPopstateEvent } from './DOMUtils';\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nvar getHistoryState = function getHistoryState() {\n  try {\n    return window.history.state || {};\n  } catch (e) {\n    // IE 11 sometimes throws when accessing window.history.state\n    // See https://github.com/ReactTraining/history/pull/289\n    return {};\n  }\n};\n\n/**\n * Creates a history object that uses the HTML5 history API including\n * pushState, replaceState, and the popstate event.\n */\nvar createBrowserHistory = function createBrowserHistory() {\n  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n  invariant(canUseDOM, 'Browser history needs a DOM');\n\n  var globalHistory = window.history;\n  var canUseHistory = supportsHistory();\n  var needsHashChangeListener = !supportsPopStateOnHashChange();\n\n  var _props$forceRefresh = props.forceRefresh,\n      forceRefresh = _props$forceRefresh === undefined ? false : _props$forceRefresh,\n      _props$getUserConfirm = props.getUserConfirmation,\n      getUserConfirmation = _props$getUserConfirm === undefined ? getConfirmation : _props$getUserConfirm,\n      _props$keyLength = props.keyLength,\n      keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;\n\n  var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n  var getDOMLocation = function getDOMLocation(historyState) {\n    var _ref = historyState || {},\n        key = _ref.key,\n        state = _ref.state;\n\n    var _window$location = window.location,\n        pathname = _window$location.pathname,\n        search = _window$location.search,\n        hash = _window$location.hash;\n\n\n    var path = pathname + search + hash;\n\n    warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n    if (basename) path = stripBasename(path, basename);\n\n    return createLocation(path, state, key);\n  };\n\n  var createKey = function createKey() {\n    return Math.random().toString(36).substr(2, keyLength);\n  };\n\n  var transitionManager = createTransitionManager();\n\n  var setState = function setState(nextState) {\n    _extends(history, nextState);\n\n    history.length = globalHistory.length;\n\n    transitionManager.notifyListeners(history.location, history.action);\n  };\n\n  var handlePopState = function handlePopState(event) {\n    // Ignore extraneous popstate events in WebKit.\n    if (isExtraneousPopstateEvent(event)) return;\n\n    handlePop(getDOMLocation(event.state));\n  };\n\n  var handleHashChange = function handleHashChange() {\n    handlePop(getDOMLocation(getHistoryState()));\n  };\n\n  var forceNextPop = false;\n\n  var handlePop = function handlePop(location) {\n    if (forceNextPop) {\n      forceNextPop = false;\n      setState();\n    } else {\n      var action = 'POP';\n\n      transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n        if (ok) {\n          setState({ action: action, location: location });\n        } else {\n          revertPop(location);\n        }\n      });\n    }\n  };\n\n  var revertPop = function revertPop(fromLocation) {\n    var toLocation = history.location;\n\n    // TODO: We could probably make this more reliable by\n    // keeping a list of keys we've seen in sessionStorage.\n    // Instead, we just default to 0 for keys we don't know.\n\n    var toIndex = allKeys.indexOf(toLocation.key);\n\n    if (toIndex === -1) toIndex = 0;\n\n    var fromIndex = allKeys.indexOf(fromLocation.key);\n\n    if (fromIndex === -1) fromIndex = 0;\n\n    var delta = toIndex - fromIndex;\n\n    if (delta) {\n      forceNextPop = true;\n      go(delta);\n    }\n  };\n\n  var initialLocation = getDOMLocation(getHistoryState());\n  var allKeys = [initialLocation.key];\n\n  // Public interface\n\n  var createHref = function createHref(location) {\n    return basename + createPath(location);\n  };\n\n  var push = function push(path, state) {\n    warning(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n    var action = 'PUSH';\n    var location = createLocation(path, state, createKey(), history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var href = createHref(location);\n      var key = location.key,\n          state = location.state;\n\n\n      if (canUseHistory) {\n        globalHistory.pushState({ key: key, state: state }, null, href);\n\n        if (forceRefresh) {\n          window.location.href = href;\n        } else {\n          var prevIndex = allKeys.indexOf(history.location.key);\n          var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n          nextKeys.push(location.key);\n          allKeys = nextKeys;\n\n          setState({ action: action, location: location });\n        }\n      } else {\n        warning(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history');\n\n        window.location.href = href;\n      }\n    });\n  };\n\n  var replace = function replace(path, state) {\n    warning(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n    var action = 'REPLACE';\n    var location = createLocation(path, state, createKey(), history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var href = createHref(location);\n      var key = location.key,\n          state = location.state;\n\n\n      if (canUseHistory) {\n        globalHistory.replaceState({ key: key, state: state }, null, href);\n\n        if (forceRefresh) {\n          window.location.replace(href);\n        } else {\n          var prevIndex = allKeys.indexOf(history.location.key);\n\n          if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n\n          setState({ action: action, location: location });\n        }\n      } else {\n        warning(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history');\n\n        window.location.replace(href);\n      }\n    });\n  };\n\n  var go = function go(n) {\n    globalHistory.go(n);\n  };\n\n  var goBack = function goBack() {\n    return go(-1);\n  };\n\n  var goForward = function goForward() {\n    return go(1);\n  };\n\n  var listenerCount = 0;\n\n  var checkDOMListeners = function checkDOMListeners(delta) {\n    listenerCount += delta;\n\n    if (listenerCount === 1) {\n      addEventListener(window, PopStateEvent, handlePopState);\n\n      if (needsHashChangeListener) addEventListener(window, HashChangeEvent, handleHashChange);\n    } else if (listenerCount === 0) {\n      removeEventListener(window, PopStateEvent, handlePopState);\n\n      if (needsHashChangeListener) removeEventListener(window, HashChangeEvent, handleHashChange);\n    }\n  };\n\n  var isBlocked = false;\n\n  var block = function block() {\n    var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n    var unblock = transitionManager.setPrompt(prompt);\n\n    if (!isBlocked) {\n      checkDOMListeners(1);\n      isBlocked = true;\n    }\n\n    return function () {\n      if (isBlocked) {\n        isBlocked = false;\n        checkDOMListeners(-1);\n      }\n\n      return unblock();\n    };\n  };\n\n  var listen = function listen(listener) {\n    var unlisten = transitionManager.appendListener(listener);\n    checkDOMListeners(1);\n\n    return function () {\n      checkDOMListeners(-1);\n      unlisten();\n    };\n  };\n\n  var history = {\n    length: globalHistory.length,\n    action: 'POP',\n    location: initialLocation,\n    createHref: createHref,\n    push: push,\n    replace: replace,\n    go: go,\n    goBack: goBack,\n    goForward: goForward,\n    block: block,\n    listen: listen\n  };\n\n  return history;\n};\n\nexport default createBrowserHistory;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport warning from 'warning';\nimport invariant from 'invariant';\nimport { createLocation, locationsAreEqual } from './LocationUtils';\nimport { addLeadingSlash, stripLeadingSlash, stripTrailingSlash, hasBasename, stripBasename, createPath } from './PathUtils';\nimport createTransitionManager from './createTransitionManager';\nimport { canUseDOM, addEventListener, removeEventListener, getConfirmation, supportsGoWithoutReloadUsingHash } from './DOMUtils';\n\nvar HashChangeEvent = 'hashchange';\n\nvar HashPathCoders = {\n  hashbang: {\n    encodePath: function encodePath(path) {\n      return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path);\n    },\n    decodePath: function decodePath(path) {\n      return path.charAt(0) === '!' ? path.substr(1) : path;\n    }\n  },\n  noslash: {\n    encodePath: stripLeadingSlash,\n    decodePath: addLeadingSlash\n  },\n  slash: {\n    encodePath: addLeadingSlash,\n    decodePath: addLeadingSlash\n  }\n};\n\nvar getHashPath = function getHashPath() {\n  // We can't use window.location.hash here because it's not\n  // consistent across browsers - Firefox will pre-decode it!\n  var href = window.location.href;\n  var hashIndex = href.indexOf('#');\n  return hashIndex === -1 ? '' : href.substring(hashIndex + 1);\n};\n\nvar pushHashPath = function pushHashPath(path) {\n  return window.location.hash = path;\n};\n\nvar replaceHashPath = function replaceHashPath(path) {\n  var hashIndex = window.location.href.indexOf('#');\n\n  window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path);\n};\n\nvar createHashHistory = function createHashHistory() {\n  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n  invariant(canUseDOM, 'Hash history needs a DOM');\n\n  var globalHistory = window.history;\n  var canGoWithoutReload = supportsGoWithoutReloadUsingHash();\n\n  var _props$getUserConfirm = props.getUserConfirmation,\n      getUserConfirmation = _props$getUserConfirm === undefined ? getConfirmation : _props$getUserConfirm,\n      _props$hashType = props.hashType,\n      hashType = _props$hashType === undefined ? 'slash' : _props$hashType;\n\n  var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n  var _HashPathCoders$hashT = HashPathCoders[hashType],\n      encodePath = _HashPathCoders$hashT.encodePath,\n      decodePath = _HashPathCoders$hashT.decodePath;\n\n\n  var getDOMLocation = function getDOMLocation() {\n    var path = decodePath(getHashPath());\n\n    warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n    if (basename) path = stripBasename(path, basename);\n\n    return createLocation(path);\n  };\n\n  var transitionManager = createTransitionManager();\n\n  var setState = function setState(nextState) {\n    _extends(history, nextState);\n\n    history.length = globalHistory.length;\n\n    transitionManager.notifyListeners(history.location, history.action);\n  };\n\n  var forceNextPop = false;\n  var ignorePath = null;\n\n  var handleHashChange = function handleHashChange() {\n    var path = getHashPath();\n    var encodedPath = encodePath(path);\n\n    if (path !== encodedPath) {\n      // Ensure we always have a properly-encoded hash.\n      replaceHashPath(encodedPath);\n    } else {\n      var location = getDOMLocation();\n      var prevLocation = history.location;\n\n      if (!forceNextPop && locationsAreEqual(prevLocation, location)) return; // A hashchange doesn't always == location change.\n\n      if (ignorePath === createPath(location)) return; // Ignore this change; we already setState in push/replace.\n\n      ignorePath = null;\n\n      handlePop(location);\n    }\n  };\n\n  var handlePop = function handlePop(location) {\n    if (forceNextPop) {\n      forceNextPop = false;\n      setState();\n    } else {\n      var action = 'POP';\n\n      transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n        if (ok) {\n          setState({ action: action, location: location });\n        } else {\n          revertPop(location);\n        }\n      });\n    }\n  };\n\n  var revertPop = function revertPop(fromLocation) {\n    var toLocation = history.location;\n\n    // TODO: We could probably make this more reliable by\n    // keeping a list of paths we've seen in sessionStorage.\n    // Instead, we just default to 0 for paths we don't know.\n\n    var toIndex = allPaths.lastIndexOf(createPath(toLocation));\n\n    if (toIndex === -1) toIndex = 0;\n\n    var fromIndex = allPaths.lastIndexOf(createPath(fromLocation));\n\n    if (fromIndex === -1) fromIndex = 0;\n\n    var delta = toIndex - fromIndex;\n\n    if (delta) {\n      forceNextPop = true;\n      go(delta);\n    }\n  };\n\n  // Ensure the hash is encoded properly before doing anything else.\n  var path = getHashPath();\n  var encodedPath = encodePath(path);\n\n  if (path !== encodedPath) replaceHashPath(encodedPath);\n\n  var initialLocation = getDOMLocation();\n  var allPaths = [createPath(initialLocation)];\n\n  // Public interface\n\n  var createHref = function createHref(location) {\n    return '#' + encodePath(basename + createPath(location));\n  };\n\n  var push = function push(path, state) {\n    warning(state === undefined, 'Hash history cannot push state; it is ignored');\n\n    var action = 'PUSH';\n    var location = createLocation(path, undefined, undefined, history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var path = createPath(location);\n      var encodedPath = encodePath(basename + path);\n      var hashChanged = getHashPath() !== encodedPath;\n\n      if (hashChanged) {\n        // We cannot tell if a hashchange was caused by a PUSH, so we'd\n        // rather setState here and ignore the hashchange. The caveat here\n        // is that other hash histories in the page will consider it a POP.\n        ignorePath = path;\n        pushHashPath(encodedPath);\n\n        var prevIndex = allPaths.lastIndexOf(createPath(history.location));\n        var nextPaths = allPaths.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n        nextPaths.push(path);\n        allPaths = nextPaths;\n\n        setState({ action: action, location: location });\n      } else {\n        warning(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack');\n\n        setState();\n      }\n    });\n  };\n\n  var replace = function replace(path, state) {\n    warning(state === undefined, 'Hash history cannot replace state; it is ignored');\n\n    var action = 'REPLACE';\n    var location = createLocation(path, undefined, undefined, history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var path = createPath(location);\n      var encodedPath = encodePath(basename + path);\n      var hashChanged = getHashPath() !== encodedPath;\n\n      if (hashChanged) {\n        // We cannot tell if a hashchange was caused by a REPLACE, so we'd\n        // rather setState here and ignore the hashchange. The caveat here\n        // is that other hash histories in the page will consider it a POP.\n        ignorePath = path;\n        replaceHashPath(encodedPath);\n      }\n\n      var prevIndex = allPaths.indexOf(createPath(history.location));\n\n      if (prevIndex !== -1) allPaths[prevIndex] = path;\n\n      setState({ action: action, location: location });\n    });\n  };\n\n  var go = function go(n) {\n    warning(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser');\n\n    globalHistory.go(n);\n  };\n\n  var goBack = function goBack() {\n    return go(-1);\n  };\n\n  var goForward = function goForward() {\n    return go(1);\n  };\n\n  var listenerCount = 0;\n\n  var checkDOMListeners = function checkDOMListeners(delta) {\n    listenerCount += delta;\n\n    if (listenerCount === 1) {\n      addEventListener(window, HashChangeEvent, handleHashChange);\n    } else if (listenerCount === 0) {\n      removeEventListener(window, HashChangeEvent, handleHashChange);\n    }\n  };\n\n  var isBlocked = false;\n\n  var block = function block() {\n    var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n    var unblock = transitionManager.setPrompt(prompt);\n\n    if (!isBlocked) {\n      checkDOMListeners(1);\n      isBlocked = true;\n    }\n\n    return function () {\n      if (isBlocked) {\n        isBlocked = false;\n        checkDOMListeners(-1);\n      }\n\n      return unblock();\n    };\n  };\n\n  var listen = function listen(listener) {\n    var unlisten = transitionManager.appendListener(listener);\n    checkDOMListeners(1);\n\n    return function () {\n      checkDOMListeners(-1);\n      unlisten();\n    };\n  };\n\n  var history = {\n    length: globalHistory.length,\n    action: 'POP',\n    location: initialLocation,\n    createHref: createHref,\n    push: push,\n    replace: replace,\n    go: go,\n    goBack: goBack,\n    goForward: goForward,\n    block: block,\n    listen: listen\n  };\n\n  return history;\n};\n\nexport default createHashHistory;","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport warning from 'warning';\nimport { createPath } from './PathUtils';\nimport { createLocation } from './LocationUtils';\nimport createTransitionManager from './createTransitionManager';\n\nvar clamp = function clamp(n, lowerBound, upperBound) {\n  return Math.min(Math.max(n, lowerBound), upperBound);\n};\n\n/**\n * Creates a history object that stores locations in memory.\n */\nvar createMemoryHistory = function createMemoryHistory() {\n  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  var getUserConfirmation = props.getUserConfirmation,\n      _props$initialEntries = props.initialEntries,\n      initialEntries = _props$initialEntries === undefined ? ['/'] : _props$initialEntries,\n      _props$initialIndex = props.initialIndex,\n      initialIndex = _props$initialIndex === undefined ? 0 : _props$initialIndex,\n      _props$keyLength = props.keyLength,\n      keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;\n\n\n  var transitionManager = createTransitionManager();\n\n  var setState = function setState(nextState) {\n    _extends(history, nextState);\n\n    history.length = history.entries.length;\n\n    transitionManager.notifyListeners(history.location, history.action);\n  };\n\n  var createKey = function createKey() {\n    return Math.random().toString(36).substr(2, keyLength);\n  };\n\n  var index = clamp(initialIndex, 0, initialEntries.length - 1);\n  var entries = initialEntries.map(function (entry) {\n    return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n  });\n\n  // Public interface\n\n  var createHref = createPath;\n\n  var push = function push(path, state) {\n    warning(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n    var action = 'PUSH';\n    var location = createLocation(path, state, createKey(), history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var prevIndex = history.index;\n      var nextIndex = prevIndex + 1;\n\n      var nextEntries = history.entries.slice(0);\n      if (nextEntries.length > nextIndex) {\n        nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n      } else {\n        nextEntries.push(location);\n      }\n\n      setState({\n        action: action,\n        location: location,\n        index: nextIndex,\n        entries: nextEntries\n      });\n    });\n  };\n\n  var replace = function replace(path, state) {\n    warning(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n    var action = 'REPLACE';\n    var location = createLocation(path, state, createKey(), history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      history.entries[history.index] = location;\n\n      setState({ action: action, location: location });\n    });\n  };\n\n  var go = function go(n) {\n    var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n\n    var action = 'POP';\n    var location = history.entries[nextIndex];\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (ok) {\n        setState({\n          action: action,\n          location: location,\n          index: nextIndex\n        });\n      } else {\n        // Mimic the behavior of DOM histories by\n        // causing a render after a cancelled POP.\n        setState();\n      }\n    });\n  };\n\n  var goBack = function goBack() {\n    return go(-1);\n  };\n\n  var goForward = function goForward() {\n    return go(1);\n  };\n\n  var canGo = function canGo(n) {\n    var nextIndex = history.index + n;\n    return nextIndex >= 0 && nextIndex < history.entries.length;\n  };\n\n  var block = function block() {\n    var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n    return transitionManager.setPrompt(prompt);\n  };\n\n  var listen = function listen(listener) {\n    return transitionManager.appendListener(listener);\n  };\n\n  var history = {\n    length: entries.length,\n    action: 'POP',\n    location: entries[index],\n    index: index,\n    entries: entries,\n    createHref: createHref,\n    push: push,\n    replace: replace,\n    go: go,\n    goBack: goBack,\n    goForward: goForward,\n    canGo: canGo,\n    block: block,\n    listen: listen\n  };\n\n  return history;\n};\n\nexport default createMemoryHistory;","import warning from 'warning';\n\nvar createTransitionManager = function createTransitionManager() {\n  var prompt = null;\n\n  var setPrompt = function setPrompt(nextPrompt) {\n    warning(prompt == null, 'A history supports only one prompt at a time');\n\n    prompt = nextPrompt;\n\n    return function () {\n      if (prompt === nextPrompt) prompt = null;\n    };\n  };\n\n  var confirmTransitionTo = function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n    // TODO: If another transition starts while we're still confirming\n    // the previous one, we may end up in a weird state. Figure out the\n    // best way to handle this.\n    if (prompt != null) {\n      var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n\n      if (typeof result === 'string') {\n        if (typeof getUserConfirmation === 'function') {\n          getUserConfirmation(result, callback);\n        } else {\n          warning(false, 'A history needs a getUserConfirmation function in order to use a prompt message');\n\n          callback(true);\n        }\n      } else {\n        // Return false from a transition hook to cancel the transition.\n        callback(result !== false);\n      }\n    } else {\n      callback(true);\n    }\n  };\n\n  var listeners = [];\n\n  var appendListener = function appendListener(fn) {\n    var isActive = true;\n\n    var listener = function listener() {\n      if (isActive) fn.apply(undefined, arguments);\n    };\n\n    listeners.push(listener);\n\n    return function () {\n      isActive = false;\n      listeners = listeners.filter(function (item) {\n        return item !== listener;\n      });\n    };\n  };\n\n  var notifyListeners = function notifyListeners() {\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    listeners.forEach(function (listener) {\n      return listener.apply(undefined, args);\n    });\n  };\n\n  return {\n    setPrompt: setPrompt,\n    confirmTransitionTo: confirmTransitionTo,\n    appendListener: appendListener,\n    notifyListeners: notifyListeners\n  };\n};\n\nexport default createTransitionManager;","import _createBrowserHistory from './createBrowserHistory';\nexport { _createBrowserHistory as createBrowserHistory };\nimport _createHashHistory from './createHashHistory';\nexport { _createHashHistory as createHashHistory };\nimport _createMemoryHistory from './createMemoryHistory';\nexport { _createMemoryHistory as createMemoryHistory };\n\nexport { createLocation, locationsAreEqual } from './LocationUtils';\nexport { parsePath, createPath } from './PathUtils';","/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\n(function (global, factory) {\n    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n    typeof define === 'function' && define.amd ? define(factory) :\n    (global.hoistNonReactStatics = factory());\n}(this, (function () {\n    'use strict';\n    \n    var REACT_STATICS = {\n        childContextTypes: true,\n        contextTypes: true,\n        defaultProps: true,\n        displayName: true,\n        getDefaultProps: true,\n        getDerivedStateFromProps: true,\n        mixins: true,\n        propTypes: true,\n        type: true\n    };\n    \n    var KNOWN_STATICS = {\n        name: true,\n        length: true,\n        prototype: true,\n        caller: true,\n        callee: true,\n        arguments: true,\n        arity: true\n    };\n    \n    var defineProperty = Object.defineProperty;\n    var getOwnPropertyNames = Object.getOwnPropertyNames;\n    var getOwnPropertySymbols = Object.getOwnPropertySymbols;\n    var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n    var getPrototypeOf = Object.getPrototypeOf;\n    var objectPrototype = getPrototypeOf && getPrototypeOf(Object);\n    \n    return function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n        if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components\n            \n            if (objectPrototype) {\n                var inheritedComponent = getPrototypeOf(sourceComponent);\n                if (inheritedComponent && inheritedComponent !== objectPrototype) {\n                    hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n                }\n            }\n            \n            var keys = getOwnPropertyNames(sourceComponent);\n            \n            if (getOwnPropertySymbols) {\n                keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n            }\n            \n            for (var i = 0; i < keys.length; ++i) {\n                var key = keys[i];\n                if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {\n                    var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n                    try { // Avoid failures from read-only properties\n                        defineProperty(targetComponent, key, descriptor);\n                    } catch (e) {}\n                }\n            }\n            \n            return targetComponent;\n        }\n        \n        return targetComponent;\n    };\n})));\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n  if (process.env.NODE_ENV !== 'production') {\n    if (format === undefined) {\n      throw new Error('invariant requires an error message argument');\n    }\n  }\n\n  if (!condition) {\n    var error;\n    if (format === undefined) {\n      error = new Error(\n        'Minified exception occurred; use the non-minified dev environment ' +\n        'for the full error message and additional helpful warnings.'\n      );\n    } else {\n      var args = [a, b, c, d, e, f];\n      var argIndex = 0;\n      error = new Error(\n        format.replace(/%s/g, function() { return args[argIndex++]; })\n      );\n      error.name = 'Invariant Violation';\n    }\n\n    error.framesToPop = 1; // we don't care about invariant's own frame\n    throw error;\n  }\n};\n\nmodule.exports = invariant;\n","module.exports = Array.isArray || function (arr) {\n  return Object.prototype.toString.call(arr) == '[object Array]';\n};\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc');  // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","var isarray = require('isarray')\n\n/**\n * Expose `pathToRegexp`.\n */\nmodule.exports = pathToRegexp\nmodule.exports.parse = parse\nmodule.exports.compile = compile\nmodule.exports.tokensToFunction = tokensToFunction\nmodule.exports.tokensToRegExp = tokensToRegExp\n\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\nvar PATH_REGEXP = new RegExp([\n  // Match escaped characters that would otherwise appear in future matches.\n  // This allows the user to escape special characters that won't transform.\n  '(\\\\\\\\.)',\n  // Match Express-style parameters and un-named parameters with a prefix\n  // and optional suffixes. Matches appear as:\n  //\n  // \"/:test(\\\\d+)?\" => [\"/\", \"test\", \"\\d+\", undefined, \"?\", undefined]\n  // \"/route(\\\\d+)\"  => [undefined, undefined, undefined, \"\\d+\", undefined, undefined]\n  // \"/*\"            => [\"/\", undefined, undefined, undefined, undefined, \"*\"]\n  '([\\\\/.])?(?:(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?|(\\\\*))'\n].join('|'), 'g')\n\n/**\n * Parse a string for the raw tokens.\n *\n * @param  {string}  str\n * @param  {Object=} options\n * @return {!Array}\n */\nfunction parse (str, options) {\n  var tokens = []\n  var key = 0\n  var index = 0\n  var path = ''\n  var defaultDelimiter = options && options.delimiter || '/'\n  var res\n\n  while ((res = PATH_REGEXP.exec(str)) != null) {\n    var m = res[0]\n    var escaped = res[1]\n    var offset = res.index\n    path += str.slice(index, offset)\n    index = offset + m.length\n\n    // Ignore already escaped sequences.\n    if (escaped) {\n      path += escaped[1]\n      continue\n    }\n\n    var next = str[index]\n    var prefix = res[2]\n    var name = res[3]\n    var capture = res[4]\n    var group = res[5]\n    var modifier = res[6]\n    var asterisk = res[7]\n\n    // Push the current path onto the tokens.\n    if (path) {\n      tokens.push(path)\n      path = ''\n    }\n\n    var partial = prefix != null && next != null && next !== prefix\n    var repeat = modifier === '+' || modifier === '*'\n    var optional = modifier === '?' || modifier === '*'\n    var delimiter = res[2] || defaultDelimiter\n    var pattern = capture || group\n\n    tokens.push({\n      name: name || key++,\n      prefix: prefix || '',\n      delimiter: delimiter,\n      optional: optional,\n      repeat: repeat,\n      partial: partial,\n      asterisk: !!asterisk,\n      pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')\n    })\n  }\n\n  // Match any characters still remaining.\n  if (index < str.length) {\n    path += str.substr(index)\n  }\n\n  // If the path exists, push it onto the end.\n  if (path) {\n    tokens.push(path)\n  }\n\n  return tokens\n}\n\n/**\n * Compile a string to a template function for the path.\n *\n * @param  {string}             str\n * @param  {Object=}            options\n * @return {!function(Object=, Object=)}\n */\nfunction compile (str, options) {\n  return tokensToFunction(parse(str, options))\n}\n\n/**\n * Prettier encoding of URI path segments.\n *\n * @param  {string}\n * @return {string}\n */\nfunction encodeURIComponentPretty (str) {\n  return encodeURI(str).replace(/[\\/?#]/g, function (c) {\n    return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n  })\n}\n\n/**\n * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.\n *\n * @param  {string}\n * @return {string}\n */\nfunction encodeAsterisk (str) {\n  return encodeURI(str).replace(/[?#]/g, function (c) {\n    return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n  })\n}\n\n/**\n * Expose a method for transforming tokens into the path function.\n */\nfunction tokensToFunction (tokens) {\n  // Compile all the tokens into regexps.\n  var matches = new Array(tokens.length)\n\n  // Compile all the patterns before compilation.\n  for (var i = 0; i < tokens.length; i++) {\n    if (typeof tokens[i] === 'object') {\n      matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n    }\n  }\n\n  return function (obj, opts) {\n    var path = ''\n    var data = obj || {}\n    var options = opts || {}\n    var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n    for (var i = 0; i < tokens.length; i++) {\n      var token = tokens[i]\n\n      if (typeof token === 'string') {\n        path += token\n\n        continue\n      }\n\n      var value = data[token.name]\n      var segment\n\n      if (value == null) {\n        if (token.optional) {\n          // Prepend partial segment prefixes.\n          if (token.partial) {\n            path += token.prefix\n          }\n\n          continue\n        } else {\n          throw new TypeError('Expected \"' + token.name + '\" to be defined')\n        }\n      }\n\n      if (isarray(value)) {\n        if (!token.repeat) {\n          throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n        }\n\n        if (value.length === 0) {\n          if (token.optional) {\n            continue\n          } else {\n            throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n          }\n        }\n\n        for (var j = 0; j < value.length; j++) {\n          segment = encode(value[j])\n\n          if (!matches[i].test(segment)) {\n            throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n          }\n\n          path += (j === 0 ? token.prefix : token.delimiter) + segment\n        }\n\n        continue\n      }\n\n      segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n      if (!matches[i].test(segment)) {\n        throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n      }\n\n      path += token.prefix + segment\n    }\n\n    return path\n  }\n}\n\n/**\n * Escape a regular expression string.\n *\n * @param  {string} str\n * @return {string}\n */\nfunction escapeString (str) {\n  return str.replace(/([.+*?=^!:${}()[\\]|\\/\\\\])/g, '\\\\$1')\n}\n\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param  {string} group\n * @return {string}\n */\nfunction escapeGroup (group) {\n  return group.replace(/([=!:$\\/()])/g, '\\\\$1')\n}\n\n/**\n * Attach the keys as a property of the regexp.\n *\n * @param  {!RegExp} re\n * @param  {Array}   keys\n * @return {!RegExp}\n */\nfunction attachKeys (re, keys) {\n  re.keys = keys\n  return re\n}\n\n/**\n * Get the flags for a regexp from the options.\n *\n * @param  {Object} options\n * @return {string}\n */\nfunction flags (options) {\n  return options.sensitive ? '' : 'i'\n}\n\n/**\n * Pull out keys from a regexp.\n *\n * @param  {!RegExp} path\n * @param  {!Array}  keys\n * @return {!RegExp}\n */\nfunction regexpToRegexp (path, keys) {\n  // Use a negative lookahead to match only capturing groups.\n  var groups = path.source.match(/\\((?!\\?)/g)\n\n  if (groups) {\n    for (var i = 0; i < groups.length; i++) {\n      keys.push({\n        name: i,\n        prefix: null,\n        delimiter: null,\n        optional: false,\n        repeat: false,\n        partial: false,\n        asterisk: false,\n        pattern: null\n      })\n    }\n  }\n\n  return attachKeys(path, keys)\n}\n\n/**\n * Transform an array into a regexp.\n *\n * @param  {!Array}  path\n * @param  {Array}   keys\n * @param  {!Object} options\n * @return {!RegExp}\n */\nfunction arrayToRegexp (path, keys, options) {\n  var parts = []\n\n  for (var i = 0; i < path.length; i++) {\n    parts.push(pathToRegexp(path[i], keys, options).source)\n  }\n\n  var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))\n\n  return attachKeys(regexp, keys)\n}\n\n/**\n * Create a path regexp from string input.\n *\n * @param  {string}  path\n * @param  {!Array}  keys\n * @param  {!Object} options\n * @return {!RegExp}\n */\nfunction stringToRegexp (path, keys, options) {\n  return tokensToRegExp(parse(path, options), keys, options)\n}\n\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param  {!Array}          tokens\n * @param  {(Array|Object)=} keys\n * @param  {Object=}         options\n * @return {!RegExp}\n */\nfunction tokensToRegExp (tokens, keys, options) {\n  if (!isarray(keys)) {\n    options = /** @type {!Object} */ (keys || options)\n    keys = []\n  }\n\n  options = options || {}\n\n  var strict = options.strict\n  var end = options.end !== false\n  var route = ''\n\n  // Iterate over the tokens and create our regexp string.\n  for (var i = 0; i < tokens.length; i++) {\n    var token = tokens[i]\n\n    if (typeof token === 'string') {\n      route += escapeString(token)\n    } else {\n      var prefix = escapeString(token.prefix)\n      var capture = '(?:' + token.pattern + ')'\n\n      keys.push(token)\n\n      if (token.repeat) {\n        capture += '(?:' + prefix + capture + ')*'\n      }\n\n      if (token.optional) {\n        if (!token.partial) {\n          capture = '(?:' + prefix + '(' + capture + '))?'\n        } else {\n          capture = prefix + '(' + capture + ')?'\n        }\n      } else {\n        capture = prefix + '(' + capture + ')'\n      }\n\n      route += capture\n    }\n  }\n\n  var delimiter = escapeString(options.delimiter || '/')\n  var endsWithDelimiter = route.slice(-delimiter.length) === delimiter\n\n  // In non-strict mode we allow a slash at the end of match. If the path to\n  // match already ends with a slash, we remove it for consistency. The slash\n  // is valid at the end of a path match, not in the middle. This is important\n  // in non-ending mode, where \"/test/\" shouldn't match \"/test//route\".\n  if (!strict) {\n    route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'\n  }\n\n  if (end) {\n    route += '$'\n  } else {\n    // In non-ending mode, we need the capturing groups to match as much as\n    // possible by using a positive lookahead to the end or next path segment.\n    route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'\n  }\n\n  return attachKeys(new RegExp('^' + route, flags(options)), keys)\n}\n\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param  {(string|RegExp|Array)} path\n * @param  {(Array|Object)=}       keys\n * @param  {Object=}               options\n * @return {!RegExp}\n */\nfunction pathToRegexp (path, keys, options) {\n  if (!isarray(keys)) {\n    options = /** @type {!Object} */ (keys || options)\n    keys = []\n  }\n\n  options = options || {}\n\n  if (path instanceof RegExp) {\n    return regexpToRegexp(path, /** @type {!Array} */ (keys))\n  }\n\n  if (isarray(path)) {\n    return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)\n  }\n\n  return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== 'production') {\n  var invariant = require('fbjs/lib/invariant');\n  var warning = require('fbjs/lib/warning');\n  var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n  var loggedTypeFailures = {};\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n  if (process.env.NODE_ENV !== 'production') {\n    for (var typeSpecName in typeSpecs) {\n      if (typeSpecs.hasOwnProperty(typeSpecName)) {\n        var error;\n        // Prop type validation may throw. In case they do, we don't want to\n        // fail the render phase where it didn't fail before. So we log it.\n        // After these have been cleaned up, we'll let them throw.\n        try {\n          // This is intentionally an invariant that gets caught. It's the same\n          // behavior as without this statement except with a better message.\n          invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);\n          error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n        } catch (ex) {\n          error = ex;\n        }\n        warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);\n        if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n          // Only monitor this failure once because there tends to be a lot of the\n          // same error.\n          loggedTypeFailures[error.message] = true;\n\n          var stack = getStack ? getStack() : '';\n\n          warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');\n        }\n      }\n    }\n  }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n  /* global Symbol */\n  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n  /**\n   * Returns the iterator method function contained on the iterable object.\n   *\n   * Be sure to invoke the function with the iterable as context:\n   *\n   *     var iteratorFn = getIteratorFn(myIterable);\n   *     if (iteratorFn) {\n   *       var iterator = iteratorFn.call(myIterable);\n   *       ...\n   *     }\n   *\n   * @param {?object} maybeIterable\n   * @return {?function}\n   */\n  function getIteratorFn(maybeIterable) {\n    var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n    if (typeof iteratorFn === 'function') {\n      return iteratorFn;\n    }\n  }\n\n  /**\n   * Collection of methods that allow declaration and validation of props that are\n   * supplied to React components. Example usage:\n   *\n   *   var Props = require('ReactPropTypes');\n   *   var MyArticle = React.createClass({\n   *     propTypes: {\n   *       // An optional string prop named \"description\".\n   *       description: Props.string,\n   *\n   *       // A required enum prop named \"category\".\n   *       category: Props.oneOf(['News','Photos']).isRequired,\n   *\n   *       // A prop named \"dialog\" that requires an instance of Dialog.\n   *       dialog: Props.instanceOf(Dialog).isRequired\n   *     },\n   *     render: function() { ... }\n   *   });\n   *\n   * A more formal specification of how these methods are used:\n   *\n   *   type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n   *   decl := ReactPropTypes.{type}(.isRequired)?\n   *\n   * Each and every declaration produces a function with the same signature. This\n   * allows the creation of custom validation functions. For example:\n   *\n   *  var MyLink = React.createClass({\n   *    propTypes: {\n   *      // An optional string or URI prop named \"href\".\n   *      href: function(props, propName, componentName) {\n   *        var propValue = props[propName];\n   *        if (propValue != null && typeof propValue !== 'string' &&\n   *            !(propValue instanceof URI)) {\n   *          return new Error(\n   *            'Expected a string or an URI for ' + propName + ' in ' +\n   *            componentName\n   *          );\n   *        }\n   *      }\n   *    },\n   *    render: function() {...}\n   *  });\n   *\n   * @internal\n   */\n\n  var ANONYMOUS = '<<anonymous>>';\n\n  // Important!\n  // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n  var ReactPropTypes = {\n    array: createPrimitiveTypeChecker('array'),\n    bool: createPrimitiveTypeChecker('boolean'),\n    func: createPrimitiveTypeChecker('function'),\n    number: createPrimitiveTypeChecker('number'),\n    object: createPrimitiveTypeChecker('object'),\n    string: createPrimitiveTypeChecker('string'),\n    symbol: createPrimitiveTypeChecker('symbol'),\n\n    any: createAnyTypeChecker(),\n    arrayOf: createArrayOfTypeChecker,\n    element: createElementTypeChecker(),\n    instanceOf: createInstanceTypeChecker,\n    node: createNodeChecker(),\n    objectOf: createObjectOfTypeChecker,\n    oneOf: createEnumTypeChecker,\n    oneOfType: createUnionTypeChecker,\n    shape: createShapeTypeChecker,\n    exact: createStrictShapeTypeChecker,\n  };\n\n  /**\n   * inlined Object.is polyfill to avoid requiring consumers ship their own\n   * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n   */\n  /*eslint-disable no-self-compare*/\n  function is(x, y) {\n    // SameValue algorithm\n    if (x === y) {\n      // Steps 1-5, 7-10\n      // Steps 6.b-6.e: +0 != -0\n      return x !== 0 || 1 / x === 1 / y;\n    } else {\n      // Step 6.a: NaN == NaN\n      return x !== x && y !== y;\n    }\n  }\n  /*eslint-enable no-self-compare*/\n\n  /**\n   * We use an Error-like object for backward compatibility as people may call\n   * PropTypes directly and inspect their output. However, we don't use real\n   * Errors anymore. We don't inspect their stack anyway, and creating them\n   * is prohibitively expensive if they are created too often, such as what\n   * happens in oneOfType() for any type before the one that matched.\n   */\n  function PropTypeError(message) {\n    this.message = message;\n    this.stack = '';\n  }\n  // Make `instanceof Error` still work for returned errors.\n  PropTypeError.prototype = Error.prototype;\n\n  function createChainableTypeChecker(validate) {\n    if (process.env.NODE_ENV !== 'production') {\n      var manualPropTypeCallCache = {};\n      var manualPropTypeWarningCount = 0;\n    }\n    function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n      componentName = componentName || ANONYMOUS;\n      propFullName = propFullName || propName;\n\n      if (secret !== ReactPropTypesSecret) {\n        if (throwOnDirectAccess) {\n          // New behavior only for users of `prop-types` package\n          invariant(\n            false,\n            'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n            'Use `PropTypes.checkPropTypes()` to call them. ' +\n            'Read more at http://fb.me/use-check-prop-types'\n          );\n        } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n          // Old behavior for people using React.PropTypes\n          var cacheKey = componentName + ':' + propName;\n          if (\n            !manualPropTypeCallCache[cacheKey] &&\n            // Avoid spamming the console because they are often not actionable except for lib authors\n            manualPropTypeWarningCount < 3\n          ) {\n            warning(\n              false,\n              'You are manually calling a React.PropTypes validation ' +\n              'function for the `%s` prop on `%s`. This is deprecated ' +\n              'and will throw in the standalone `prop-types` package. ' +\n              'You may be seeing this warning due to a third-party PropTypes ' +\n              'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',\n              propFullName,\n              componentName\n            );\n            manualPropTypeCallCache[cacheKey] = true;\n            manualPropTypeWarningCount++;\n          }\n        }\n      }\n      if (props[propName] == null) {\n        if (isRequired) {\n          if (props[propName] === null) {\n            return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n          }\n          return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n        }\n        return null;\n      } else {\n        return validate(props, propName, componentName, location, propFullName);\n      }\n    }\n\n    var chainedCheckType = checkType.bind(null, false);\n    chainedCheckType.isRequired = checkType.bind(null, true);\n\n    return chainedCheckType;\n  }\n\n  function createPrimitiveTypeChecker(expectedType) {\n    function validate(props, propName, componentName, location, propFullName, secret) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== expectedType) {\n        // `propValue` being instance of, say, date/regexp, pass the 'object'\n        // check, but we can offer a more precise error message here rather than\n        // 'of type `object`'.\n        var preciseType = getPreciseType(propValue);\n\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createAnyTypeChecker() {\n    return createChainableTypeChecker(emptyFunction.thatReturnsNull);\n  }\n\n  function createArrayOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n      }\n      var propValue = props[propName];\n      if (!Array.isArray(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n      }\n      for (var i = 0; i < propValue.length; i++) {\n        var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n        if (error instanceof Error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createElementTypeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      if (!isValidElement(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createInstanceTypeChecker(expectedClass) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!(props[propName] instanceof expectedClass)) {\n        var expectedClassName = expectedClass.name || ANONYMOUS;\n        var actualClassName = getClassName(props[propName]);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createEnumTypeChecker(expectedValues) {\n    if (!Array.isArray(expectedValues)) {\n      process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;\n      return emptyFunction.thatReturnsNull;\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      for (var i = 0; i < expectedValues.length; i++) {\n        if (is(propValue, expectedValues[i])) {\n          return null;\n        }\n      }\n\n      var valuesString = JSON.stringify(expectedValues);\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createObjectOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n      }\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n      }\n      for (var key in propValue) {\n        if (propValue.hasOwnProperty(key)) {\n          var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n          if (error instanceof Error) {\n            return error;\n          }\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createUnionTypeChecker(arrayOfTypeCheckers) {\n    if (!Array.isArray(arrayOfTypeCheckers)) {\n      process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n      return emptyFunction.thatReturnsNull;\n    }\n\n    for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n      var checker = arrayOfTypeCheckers[i];\n      if (typeof checker !== 'function') {\n        warning(\n          false,\n          'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n          'received %s at index %s.',\n          getPostfixForTypeWarning(checker),\n          i\n        );\n        return emptyFunction.thatReturnsNull;\n      }\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n        var checker = arrayOfTypeCheckers[i];\n        if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n          return null;\n        }\n      }\n\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createNodeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!isNode(props[propName])) {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      for (var key in shapeTypes) {\n        var checker = shapeTypes[key];\n        if (!checker) {\n          continue;\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createStrictShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      // We need to check all keys in case some are required but missing from\n      // props.\n      var allKeys = assign({}, props[propName], shapeTypes);\n      for (var key in allKeys) {\n        var checker = shapeTypes[key];\n        if (!checker) {\n          return new PropTypeError(\n            'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n            '\\nBad object: ' + JSON.stringify(props[propName], null, '  ') +\n            '\\nValid keys: ' +  JSON.stringify(Object.keys(shapeTypes), null, '  ')\n          );\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n\n    return createChainableTypeChecker(validate);\n  }\n\n  function isNode(propValue) {\n    switch (typeof propValue) {\n      case 'number':\n      case 'string':\n      case 'undefined':\n        return true;\n      case 'boolean':\n        return !propValue;\n      case 'object':\n        if (Array.isArray(propValue)) {\n          return propValue.every(isNode);\n        }\n        if (propValue === null || isValidElement(propValue)) {\n          return true;\n        }\n\n        var iteratorFn = getIteratorFn(propValue);\n        if (iteratorFn) {\n          var iterator = iteratorFn.call(propValue);\n          var step;\n          if (iteratorFn !== propValue.entries) {\n            while (!(step = iterator.next()).done) {\n              if (!isNode(step.value)) {\n                return false;\n              }\n            }\n          } else {\n            // Iterator will provide entry [k,v] tuples rather than values.\n            while (!(step = iterator.next()).done) {\n              var entry = step.value;\n              if (entry) {\n                if (!isNode(entry[1])) {\n                  return false;\n                }\n              }\n            }\n          }\n        } else {\n          return false;\n        }\n\n        return true;\n      default:\n        return false;\n    }\n  }\n\n  function isSymbol(propType, propValue) {\n    // Native Symbol.\n    if (propType === 'symbol') {\n      return true;\n    }\n\n    // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n    if (propValue['@@toStringTag'] === 'Symbol') {\n      return true;\n    }\n\n    // Fallback for non-spec compliant Symbols which are polyfilled.\n    if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n      return true;\n    }\n\n    return false;\n  }\n\n  // Equivalent of `typeof` but with special handling for array and regexp.\n  function getPropType(propValue) {\n    var propType = typeof propValue;\n    if (Array.isArray(propValue)) {\n      return 'array';\n    }\n    if (propValue instanceof RegExp) {\n      // Old webkits (at least until Android 4.0) return 'function' rather than\n      // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n      // passes PropTypes.object.\n      return 'object';\n    }\n    if (isSymbol(propType, propValue)) {\n      return 'symbol';\n    }\n    return propType;\n  }\n\n  // This handles more types than `getPropType`. Only used for error messages.\n  // See `createPrimitiveTypeChecker`.\n  function getPreciseType(propValue) {\n    if (typeof propValue === 'undefined' || propValue === null) {\n      return '' + propValue;\n    }\n    var propType = getPropType(propValue);\n    if (propType === 'object') {\n      if (propValue instanceof Date) {\n        return 'date';\n      } else if (propValue instanceof RegExp) {\n        return 'regexp';\n      }\n    }\n    return propType;\n  }\n\n  // Returns a string that is postfixed to a warning about an invalid type.\n  // For example, \"undefined\" or \"of type array\"\n  function getPostfixForTypeWarning(value) {\n    var type = getPreciseType(value);\n    switch (type) {\n      case 'array':\n      case 'object':\n        return 'an ' + type;\n      case 'boolean':\n      case 'date':\n      case 'regexp':\n        return 'a ' + type;\n      default:\n        return type;\n    }\n  }\n\n  // Returns class name of the object, if any.\n  function getClassName(propValue) {\n    if (!propValue.constructor || !propValue.constructor.name) {\n      return ANONYMOUS;\n    }\n    return propValue.constructor.name;\n  }\n\n  ReactPropTypes.checkPropTypes = checkPropTypes;\n  ReactPropTypes.PropTypes = ReactPropTypes;\n\n  return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n  var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n    Symbol.for &&\n    Symbol.for('react.element')) ||\n    0xeac7;\n\n  var isValidElement = function(object) {\n    return typeof object === 'object' &&\n      object !== null &&\n      object.$$typeof === REACT_ELEMENT_TYPE;\n  };\n\n  // By explicitly using `prop-types` you are opting into new development behavior.\n  // http://fb.me/prop-types-in-prod\n  var throwOnDirectAccess = true;\n  module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n  // By explicitly using `prop-types` you are opting into new production behavior.\n  // http://fb.me/prop-types-in-prod\n  module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { createMemoryHistory as createHistory } from \"history\";\nimport Router from \"./Router\";\n\n/**\n * The public API for a <Router> that stores location in memory.\n */\n\nvar MemoryRouter = function (_React$Component) {\n  _inherits(MemoryRouter, _React$Component);\n\n  function MemoryRouter() {\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, MemoryRouter);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = createHistory(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  MemoryRouter.prototype.componentWillMount = function componentWillMount() {\n    warning(!this.props.history, \"<MemoryRouter> ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { MemoryRouter as Router }`.\");\n  };\n\n  MemoryRouter.prototype.render = function render() {\n    return React.createElement(Router, { history: this.history, children: this.props.children });\n  };\n\n  return MemoryRouter;\n}(React.Component);\n\nMemoryRouter.propTypes = {\n  initialEntries: PropTypes.array,\n  initialIndex: PropTypes.number,\n  getUserConfirmation: PropTypes.func,\n  keyLength: PropTypes.number,\n  children: PropTypes.node\n};\n\n\nexport default MemoryRouter;","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport invariant from \"invariant\";\n\n/**\n * The public API for prompting the user before navigating away\n * from a screen with a component.\n */\n\nvar Prompt = function (_React$Component) {\n  _inherits(Prompt, _React$Component);\n\n  function Prompt() {\n    _classCallCheck(this, Prompt);\n\n    return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n  }\n\n  Prompt.prototype.enable = function enable(message) {\n    if (this.unblock) this.unblock();\n\n    this.unblock = this.context.router.history.block(message);\n  };\n\n  Prompt.prototype.disable = function disable() {\n    if (this.unblock) {\n      this.unblock();\n      this.unblock = null;\n    }\n  };\n\n  Prompt.prototype.componentWillMount = function componentWillMount() {\n    invariant(this.context.router, \"You should not use <Prompt> outside a <Router>\");\n\n    if (this.props.when) this.enable(this.props.message);\n  };\n\n  Prompt.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n    if (nextProps.when) {\n      if (!this.props.when || this.props.message !== nextProps.message) this.enable(nextProps.message);\n    } else {\n      this.disable();\n    }\n  };\n\n  Prompt.prototype.componentWillUnmount = function componentWillUnmount() {\n    this.disable();\n  };\n\n  Prompt.prototype.render = function render() {\n    return null;\n  };\n\n  return Prompt;\n}(React.Component);\n\nPrompt.propTypes = {\n  when: PropTypes.bool,\n  message: PropTypes.oneOfType([PropTypes.func, PropTypes.string]).isRequired\n};\nPrompt.defaultProps = {\n  when: true\n};\nPrompt.contextTypes = {\n  router: PropTypes.shape({\n    history: PropTypes.shape({\n      block: PropTypes.func.isRequired\n    }).isRequired\n  }).isRequired\n};\n\n\nexport default Prompt;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport { createLocation, locationsAreEqual } from \"history\";\nimport generatePath from \"./generatePath\";\n\n/**\n * The public API for updating the location programmatically\n * with a component.\n */\n\nvar Redirect = function (_React$Component) {\n  _inherits(Redirect, _React$Component);\n\n  function Redirect() {\n    _classCallCheck(this, Redirect);\n\n    return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n  }\n\n  Redirect.prototype.isStatic = function isStatic() {\n    return this.context.router && this.context.router.staticContext;\n  };\n\n  Redirect.prototype.componentWillMount = function componentWillMount() {\n    invariant(this.context.router, \"You should not use <Redirect> outside a <Router>\");\n\n    if (this.isStatic()) this.perform();\n  };\n\n  Redirect.prototype.componentDidMount = function componentDidMount() {\n    if (!this.isStatic()) this.perform();\n  };\n\n  Redirect.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {\n    var prevTo = createLocation(prevProps.to);\n    var nextTo = createLocation(this.props.to);\n\n    if (locationsAreEqual(prevTo, nextTo)) {\n      warning(false, \"You tried to redirect to the same route you're currently on: \" + (\"\\\"\" + nextTo.pathname + nextTo.search + \"\\\"\"));\n      return;\n    }\n\n    this.perform();\n  };\n\n  Redirect.prototype.computeTo = function computeTo(_ref) {\n    var computedMatch = _ref.computedMatch,\n        to = _ref.to;\n\n    if (computedMatch) {\n      if (typeof to === \"string\") {\n        return generatePath(to, computedMatch.params);\n      } else {\n        return _extends({}, to, {\n          pathname: generatePath(to.pathname, computedMatch.params)\n        });\n      }\n    }\n\n    return to;\n  };\n\n  Redirect.prototype.perform = function perform() {\n    var history = this.context.router.history;\n    var push = this.props.push;\n\n    var to = this.computeTo(this.props);\n\n    if (push) {\n      history.push(to);\n    } else {\n      history.replace(to);\n    }\n  };\n\n  Redirect.prototype.render = function render() {\n    return null;\n  };\n\n  return Redirect;\n}(React.Component);\n\nRedirect.propTypes = {\n  computedMatch: PropTypes.object, // private, from <Switch>\n  push: PropTypes.bool,\n  from: PropTypes.string,\n  to: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired\n};\nRedirect.defaultProps = {\n  push: false\n};\nRedirect.contextTypes = {\n  router: PropTypes.shape({\n    history: PropTypes.shape({\n      push: PropTypes.func.isRequired,\n      replace: PropTypes.func.isRequired\n    }).isRequired,\n    staticContext: PropTypes.object\n  }).isRequired\n};\n\n\nexport default Redirect;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport matchPath from \"./matchPath\";\n\nvar isEmptyChildren = function isEmptyChildren(children) {\n  return React.Children.count(children) === 0;\n};\n\n/**\n * The public API for matching a single path and rendering.\n */\n\nvar Route = function (_React$Component) {\n  _inherits(Route, _React$Component);\n\n  function Route() {\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, Route);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n      match: _this.computeMatch(_this.props, _this.context.router)\n    }, _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  Route.prototype.getChildContext = function getChildContext() {\n    return {\n      router: _extends({}, this.context.router, {\n        route: {\n          location: this.props.location || this.context.router.route.location,\n          match: this.state.match\n        }\n      })\n    };\n  };\n\n  Route.prototype.computeMatch = function computeMatch(_ref, router) {\n    var computedMatch = _ref.computedMatch,\n        location = _ref.location,\n        path = _ref.path,\n        strict = _ref.strict,\n        exact = _ref.exact,\n        sensitive = _ref.sensitive;\n\n    if (computedMatch) return computedMatch; // <Switch> already computed the match for us\n\n    invariant(router, \"You should not use <Route> or withRouter() outside a <Router>\");\n\n    var route = router.route;\n\n    var pathname = (location || route.location).pathname;\n\n    return matchPath(pathname, { path: path, strict: strict, exact: exact, sensitive: sensitive }, route.match);\n  };\n\n  Route.prototype.componentWillMount = function componentWillMount() {\n    warning(!(this.props.component && this.props.render), \"You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored\");\n\n    warning(!(this.props.component && this.props.children && !isEmptyChildren(this.props.children)), \"You should not use <Route component> and <Route children> in the same route; <Route children> will be ignored\");\n\n    warning(!(this.props.render && this.props.children && !isEmptyChildren(this.props.children)), \"You should not use <Route render> and <Route children> in the same route; <Route children> will be ignored\");\n  };\n\n  Route.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps, nextContext) {\n    warning(!(nextProps.location && !this.props.location), '<Route> elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.');\n\n    warning(!(!nextProps.location && this.props.location), '<Route> elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.');\n\n    this.setState({\n      match: this.computeMatch(nextProps, nextContext.router)\n    });\n  };\n\n  Route.prototype.render = function render() {\n    var match = this.state.match;\n    var _props = this.props,\n        children = _props.children,\n        component = _props.component,\n        render = _props.render;\n    var _context$router = this.context.router,\n        history = _context$router.history,\n        route = _context$router.route,\n        staticContext = _context$router.staticContext;\n\n    var location = this.props.location || route.location;\n    var props = { match: match, location: location, history: history, staticContext: staticContext };\n\n    if (component) return match ? React.createElement(component, props) : null;\n\n    if (render) return match ? render(props) : null;\n\n    if (typeof children === \"function\") return children(props);\n\n    if (children && !isEmptyChildren(children)) return React.Children.only(children);\n\n    return null;\n  };\n\n  return Route;\n}(React.Component);\n\nRoute.propTypes = {\n  computedMatch: PropTypes.object, // private, from <Switch>\n  path: PropTypes.string,\n  exact: PropTypes.bool,\n  strict: PropTypes.bool,\n  sensitive: PropTypes.bool,\n  component: PropTypes.func,\n  render: PropTypes.func,\n  children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),\n  location: PropTypes.object\n};\nRoute.contextTypes = {\n  router: PropTypes.shape({\n    history: PropTypes.object.isRequired,\n    route: PropTypes.object.isRequired,\n    staticContext: PropTypes.object\n  })\n};\nRoute.childContextTypes = {\n  router: PropTypes.object.isRequired\n};\n\n\nexport default Route;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\n\n/**\n * The public API for putting history on context.\n */\n\nvar Router = function (_React$Component) {\n  _inherits(Router, _React$Component);\n\n  function Router() {\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, Router);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n      match: _this.computeMatch(_this.props.history.location.pathname)\n    }, _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  Router.prototype.getChildContext = function getChildContext() {\n    return {\n      router: _extends({}, this.context.router, {\n        history: this.props.history,\n        route: {\n          location: this.props.history.location,\n          match: this.state.match\n        }\n      })\n    };\n  };\n\n  Router.prototype.computeMatch = function computeMatch(pathname) {\n    return {\n      path: \"/\",\n      url: \"/\",\n      params: {},\n      isExact: pathname === \"/\"\n    };\n  };\n\n  Router.prototype.componentWillMount = function componentWillMount() {\n    var _this2 = this;\n\n    var _props = this.props,\n        children = _props.children,\n        history = _props.history;\n\n\n    invariant(children == null || React.Children.count(children) === 1, \"A <Router> may have only one child element\");\n\n    // Do this here so we can setState when a <Redirect> changes the\n    // location in componentWillMount. This happens e.g. when doing\n    // server rendering using a <StaticRouter>.\n    this.unlisten = history.listen(function () {\n      _this2.setState({\n        match: _this2.computeMatch(history.location.pathname)\n      });\n    });\n  };\n\n  Router.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n    warning(this.props.history === nextProps.history, \"You cannot change <Router history>\");\n  };\n\n  Router.prototype.componentWillUnmount = function componentWillUnmount() {\n    this.unlisten();\n  };\n\n  Router.prototype.render = function render() {\n    var children = this.props.children;\n\n    return children ? React.Children.only(children) : null;\n  };\n\n  return Router;\n}(React.Component);\n\nRouter.propTypes = {\n  history: PropTypes.object.isRequired,\n  children: PropTypes.node\n};\nRouter.contextTypes = {\n  router: PropTypes.object\n};\nRouter.childContextTypes = {\n  router: PropTypes.object.isRequired\n};\n\n\nexport default Router;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { createLocation, createPath } from \"history\";\nimport Router from \"./Router\";\n\nvar addLeadingSlash = function addLeadingSlash(path) {\n  return path.charAt(0) === \"/\" ? path : \"/\" + path;\n};\n\nvar addBasename = function addBasename(basename, location) {\n  if (!basename) return location;\n\n  return _extends({}, location, {\n    pathname: addLeadingSlash(basename) + location.pathname\n  });\n};\n\nvar stripBasename = function stripBasename(basename, location) {\n  if (!basename) return location;\n\n  var base = addLeadingSlash(basename);\n\n  if (location.pathname.indexOf(base) !== 0) return location;\n\n  return _extends({}, location, {\n    pathname: location.pathname.substr(base.length)\n  });\n};\n\nvar createURL = function createURL(location) {\n  return typeof location === \"string\" ? location : createPath(location);\n};\n\nvar staticHandler = function staticHandler(methodName) {\n  return function () {\n    invariant(false, \"You cannot %s with <StaticRouter>\", methodName);\n  };\n};\n\nvar noop = function noop() {};\n\n/**\n * The public top-level API for a \"static\" <Router>, so-called because it\n * can't actually change the current location. Instead, it just records\n * location changes in a context object. Useful mainly in testing and\n * server-rendering scenarios.\n */\n\nvar StaticRouter = function (_React$Component) {\n  _inherits(StaticRouter, _React$Component);\n\n  function StaticRouter() {\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, StaticRouter);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.createHref = function (path) {\n      return addLeadingSlash(_this.props.basename + createURL(path));\n    }, _this.handlePush = function (location) {\n      var _this$props = _this.props,\n          basename = _this$props.basename,\n          context = _this$props.context;\n\n      context.action = \"PUSH\";\n      context.location = addBasename(basename, createLocation(location));\n      context.url = createURL(context.location);\n    }, _this.handleReplace = function (location) {\n      var _this$props2 = _this.props,\n          basename = _this$props2.basename,\n          context = _this$props2.context;\n\n      context.action = \"REPLACE\";\n      context.location = addBasename(basename, createLocation(location));\n      context.url = createURL(context.location);\n    }, _this.handleListen = function () {\n      return noop;\n    }, _this.handleBlock = function () {\n      return noop;\n    }, _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  StaticRouter.prototype.getChildContext = function getChildContext() {\n    return {\n      router: {\n        staticContext: this.props.context\n      }\n    };\n  };\n\n  StaticRouter.prototype.componentWillMount = function componentWillMount() {\n    warning(!this.props.history, \"<StaticRouter> ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { StaticRouter as Router }`.\");\n  };\n\n  StaticRouter.prototype.render = function render() {\n    var _props = this.props,\n        basename = _props.basename,\n        context = _props.context,\n        location = _props.location,\n        props = _objectWithoutProperties(_props, [\"basename\", \"context\", \"location\"]);\n\n    var history = {\n      createHref: this.createHref,\n      action: \"POP\",\n      location: stripBasename(basename, createLocation(location)),\n      push: this.handlePush,\n      replace: this.handleReplace,\n      go: staticHandler(\"go\"),\n      goBack: staticHandler(\"goBack\"),\n      goForward: staticHandler(\"goForward\"),\n      listen: this.handleListen,\n      block: this.handleBlock\n    };\n\n    return React.createElement(Router, _extends({}, props, { history: history }));\n  };\n\n  return StaticRouter;\n}(React.Component);\n\nStaticRouter.propTypes = {\n  basename: PropTypes.string,\n  context: PropTypes.object.isRequired,\n  location: PropTypes.oneOfType([PropTypes.string, PropTypes.object])\n};\nStaticRouter.defaultProps = {\n  basename: \"\",\n  location: \"/\"\n};\nStaticRouter.childContextTypes = {\n  router: PropTypes.object.isRequired\n};\n\n\nexport default StaticRouter;","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport matchPath from \"./matchPath\";\n\n/**\n * The public API for rendering the first <Route> that matches.\n */\n\nvar Switch = function (_React$Component) {\n  _inherits(Switch, _React$Component);\n\n  function Switch() {\n    _classCallCheck(this, Switch);\n\n    return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n  }\n\n  Switch.prototype.componentWillMount = function componentWillMount() {\n    invariant(this.context.router, \"You should not use <Switch> outside a <Router>\");\n  };\n\n  Switch.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n    warning(!(nextProps.location && !this.props.location), '<Switch> elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.');\n\n    warning(!(!nextProps.location && this.props.location), '<Switch> elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.');\n  };\n\n  Switch.prototype.render = function render() {\n    var route = this.context.router.route;\n    var children = this.props.children;\n\n    var location = this.props.location || route.location;\n\n    var match = void 0,\n        child = void 0;\n    React.Children.forEach(children, function (element) {\n      if (match == null && React.isValidElement(element)) {\n        var _element$props = element.props,\n            pathProp = _element$props.path,\n            exact = _element$props.exact,\n            strict = _element$props.strict,\n            sensitive = _element$props.sensitive,\n            from = _element$props.from;\n\n        var path = pathProp || from;\n\n        child = element;\n        match = matchPath(location.pathname, { path: path, exact: exact, strict: strict, sensitive: sensitive }, route.match);\n      }\n    });\n\n    return match ? React.cloneElement(child, { location: location, computedMatch: match }) : null;\n  };\n\n  return Switch;\n}(React.Component);\n\nSwitch.contextTypes = {\n  router: PropTypes.shape({\n    route: PropTypes.object.isRequired\n  }).isRequired\n};\nSwitch.propTypes = {\n  children: PropTypes.node,\n  location: PropTypes.object\n};\n\n\nexport default Switch;","import pathToRegexp from \"path-to-regexp\";\n\nvar patternCache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\n\nvar compileGenerator = function compileGenerator(pattern) {\n  var cacheKey = pattern;\n  var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});\n\n  if (cache[pattern]) return cache[pattern];\n\n  var compiledGenerator = pathToRegexp.compile(pattern);\n\n  if (cacheCount < cacheLimit) {\n    cache[pattern] = compiledGenerator;\n    cacheCount++;\n  }\n\n  return compiledGenerator;\n};\n\n/**\n * Public API for generating a URL pathname from a pattern and parameters.\n */\nvar generatePath = function generatePath() {\n  var pattern = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n  var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n  if (pattern === \"/\") {\n    return pattern;\n  }\n  var generator = compileGenerator(pattern);\n  return generator(params, { pretty: true });\n};\n\nexport default generatePath;","import pathToRegexp from \"path-to-regexp\";\n\nvar patternCache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\n\nvar compilePath = function compilePath(pattern, options) {\n  var cacheKey = \"\" + options.end + options.strict + options.sensitive;\n  var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});\n\n  if (cache[pattern]) return cache[pattern];\n\n  var keys = [];\n  var re = pathToRegexp(pattern, keys, options);\n  var compiledPattern = { re: re, keys: keys };\n\n  if (cacheCount < cacheLimit) {\n    cache[pattern] = compiledPattern;\n    cacheCount++;\n  }\n\n  return compiledPattern;\n};\n\n/**\n * Public API for matching a URL pathname to a path pattern.\n */\nvar matchPath = function matchPath(pathname) {\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  var parent = arguments[2];\n\n  if (typeof options === \"string\") options = { path: options };\n\n  var _options = options,\n      path = _options.path,\n      _options$exact = _options.exact,\n      exact = _options$exact === undefined ? false : _options$exact,\n      _options$strict = _options.strict,\n      strict = _options$strict === undefined ? false : _options$strict,\n      _options$sensitive = _options.sensitive,\n      sensitive = _options$sensitive === undefined ? false : _options$sensitive;\n\n\n  if (path == null) return parent;\n\n  var _compilePath = compilePath(path, { end: exact, strict: strict, sensitive: sensitive }),\n      re = _compilePath.re,\n      keys = _compilePath.keys;\n\n  var match = re.exec(pathname);\n\n  if (!match) return null;\n\n  var url = match[0],\n      values = match.slice(1);\n\n  var isExact = pathname === url;\n\n  if (exact && !isExact) return null;\n\n  return {\n    path: path, // the path pattern used to match\n    url: path === \"/\" && url === \"\" ? \"/\" : url, // the matched portion of the URL\n    isExact: isExact, // whether or not we matched exactly\n    params: keys.reduce(function (memo, key, index) {\n      memo[key.name] = values[index];\n      return memo;\n    }, {})\n  };\n};\n\nexport default matchPath;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport hoistStatics from \"hoist-non-react-statics\";\nimport Route from \"./Route\";\n\n/**\n * A public higher-order component to access the imperative API\n */\nvar withRouter = function withRouter(Component) {\n  var C = function C(props) {\n    var wrappedComponentRef = props.wrappedComponentRef,\n        remainingProps = _objectWithoutProperties(props, [\"wrappedComponentRef\"]);\n\n    return React.createElement(Route, {\n      children: function children(routeComponentProps) {\n        return React.createElement(Component, _extends({}, remainingProps, routeComponentProps, {\n          ref: wrappedComponentRef\n        }));\n      }\n    });\n  };\n\n  C.displayName = \"withRouter(\" + (Component.displayName || Component.name) + \")\";\n  C.WrappedComponent = Component;\n  C.propTypes = {\n    wrappedComponentRef: PropTypes.func\n  };\n\n  return hoistStatics(C, Component);\n};\n\nexport default withRouter;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @providesModule warning\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n  var printWarning = function printWarning(format, args) {\n    var len = arguments.length;\n    args = new Array(len > 2 ? len - 2 : 0);\n    for (var key = 2; key < len; key++) {\n      args[key - 2] = arguments[key];\n    }\n    var argIndex = 0;\n    var message = 'Warning: ' +\n      format.replace(/%s/g, function() {\n        return args[argIndex++];\n      });\n    if (typeof console !== 'undefined') {\n      console.error(message);\n    }\n    try {\n      // --- Welcome to debugging React ---\n      // This error was thrown as a convenience so that you can use this stack\n      // to find the callsite that caused this warning to fire.\n      throw new Error(message);\n    } catch (x) {}\n  }\n\n  warning = function(condition, format, args) {\n    var len = arguments.length;\n    args = new Array(len > 2 ? len - 2 : 0);\n    for (var key = 2; key < len; key++) {\n      args[key - 2] = arguments[key];\n    }\n    if (format === undefined) {\n      throw new Error(\n          '`warning(condition, format, ...args)` requires a warning ' +\n          'message argument'\n      );\n    }\n    if (!condition) {\n      printWarning.apply(null, [format].concat(args));\n    }\n  };\n}\n\nmodule.exports = warning;\n","function isAbsolute(pathname) {\n  return pathname.charAt(0) === '/';\n}\n\n// About 1.5x faster than the two-arg version of Array#splice()\nfunction spliceOne(list, index) {\n  for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n    list[i] = list[k];\n  }\n\n  list.pop();\n}\n\n// This implementation is based heavily on node's url.parse\nfunction resolvePathname(to) {\n  var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n  var toParts = to && to.split('/') || [];\n  var fromParts = from && from.split('/') || [];\n\n  var isToAbs = to && isAbsolute(to);\n  var isFromAbs = from && isAbsolute(from);\n  var mustEndAbs = isToAbs || isFromAbs;\n\n  if (to && isAbsolute(to)) {\n    // to is absolute\n    fromParts = toParts;\n  } else if (toParts.length) {\n    // to is relative, drop the filename\n    fromParts.pop();\n    fromParts = fromParts.concat(toParts);\n  }\n\n  if (!fromParts.length) return '/';\n\n  var hasTrailingSlash = void 0;\n  if (fromParts.length) {\n    var last = fromParts[fromParts.length - 1];\n    hasTrailingSlash = last === '.' || last === '..' || last === '';\n  } else {\n    hasTrailingSlash = false;\n  }\n\n  var up = 0;\n  for (var i = fromParts.length; i >= 0; i--) {\n    var part = fromParts[i];\n\n    if (part === '.') {\n      spliceOne(fromParts, i);\n    } else if (part === '..') {\n      spliceOne(fromParts, i);\n      up++;\n    } else if (up) {\n      spliceOne(fromParts, i);\n      up--;\n    }\n  }\n\n  if (!mustEndAbs) for (; up--; up) {\n    fromParts.unshift('..');\n  }if (mustEndAbs && fromParts[0] !== '' && (!fromParts[0] || !isAbsolute(fromParts[0]))) fromParts.unshift('');\n\n  var result = fromParts.join('/');\n\n  if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n\n  return result;\n}\n\nexport default resolvePathname;","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction valueEqual(a, b) {\n  if (a === b) return true;\n\n  if (a == null || b == null) return false;\n\n  if (Array.isArray(a)) {\n    return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {\n      return valueEqual(item, b[index]);\n    });\n  }\n\n  var aType = typeof a === 'undefined' ? 'undefined' : _typeof(a);\n  var bType = typeof b === 'undefined' ? 'undefined' : _typeof(b);\n\n  if (aType !== bType) return false;\n\n  if (aType === 'object') {\n    var aValue = a.valueOf();\n    var bValue = b.valueOf();\n\n    if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);\n\n    var aKeys = Object.keys(a);\n    var bKeys = Object.keys(b);\n\n    if (aKeys.length !== bKeys.length) return false;\n\n    return aKeys.every(function (key) {\n      return valueEqual(a[key], b[key]);\n    });\n  }\n\n  return false;\n}\n\nexport default valueEqual;","/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n  warning = function(condition, format, args) {\n    var len = arguments.length;\n    args = new Array(len > 2 ? len - 2 : 0);\n    for (var key = 2; key < len; key++) {\n      args[key - 2] = arguments[key];\n    }\n    if (format === undefined) {\n      throw new Error(\n        '`warning(condition, format, ...args)` requires a warning ' +\n        'message argument'\n      );\n    }\n\n    if (format.length < 10 || (/^[s\\W]*$/).test(format)) {\n      throw new Error(\n        'The warning format should be able to uniquely identify this ' +\n        'warning. Please, use a more descriptive format than: ' + format\n      );\n    }\n\n    if (!condition) {\n      var argIndex = 0;\n      var message = 'Warning: ' +\n        format.replace(/%s/g, function() {\n          return args[argIndex++];\n        });\n      if (typeof console !== 'undefined') {\n        console.error(message);\n      }\n      try {\n        // This error was thrown as a convenience so that you can use this stack\n        // to find the callsite that caused this warning to fire.\n        throw new Error(message);\n      } catch(x) {}\n    }\n  };\n}\n\nmodule.exports = warning;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n/**\n * This action type will be dispatched by the history actions below.\n * If you're writing a middleware to watch for navigation events, be sure to\n * look for actions of this type.\n */\nvar CALL_HISTORY_METHOD = exports.CALL_HISTORY_METHOD = '@@router/CALL_HISTORY_METHOD';\n\nfunction updateLocation(method) {\n  return function () {\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return {\n      type: CALL_HISTORY_METHOD,\n      payload: { method: method, args: args }\n    };\n  };\n}\n\n/**\n * These actions correspond to the history API.\n * The associated routerMiddleware will capture these events before they get to\n * your reducer and reissue them as the matching function on your history.\n */\nvar push = exports.push = updateLocation('push');\nvar replace = exports.replace = updateLocation('replace');\nvar go = exports.go = updateLocation('go');\nvar goBack = exports.goBack = updateLocation('goBack');\nvar goForward = exports.goForward = updateLocation('goForward');\n\nvar routerActions = exports.routerActions = { push: push, replace: replace, go: go, goBack: goBack, goForward: goForward };","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.routerMiddleware = exports.routerActions = exports.goForward = exports.goBack = exports.go = exports.replace = exports.push = exports.CALL_HISTORY_METHOD = exports.routerReducer = exports.LOCATION_CHANGE = exports.syncHistoryWithStore = undefined;\n\nvar _reducer = require('./reducer');\n\nObject.defineProperty(exports, 'LOCATION_CHANGE', {\n  enumerable: true,\n  get: function get() {\n    return _reducer.LOCATION_CHANGE;\n  }\n});\nObject.defineProperty(exports, 'routerReducer', {\n  enumerable: true,\n  get: function get() {\n    return _reducer.routerReducer;\n  }\n});\n\nvar _actions = require('./actions');\n\nObject.defineProperty(exports, 'CALL_HISTORY_METHOD', {\n  enumerable: true,\n  get: function get() {\n    return _actions.CALL_HISTORY_METHOD;\n  }\n});\nObject.defineProperty(exports, 'push', {\n  enumerable: true,\n  get: function get() {\n    return _actions.push;\n  }\n});\nObject.defineProperty(exports, 'replace', {\n  enumerable: true,\n  get: function get() {\n    return _actions.replace;\n  }\n});\nObject.defineProperty(exports, 'go', {\n  enumerable: true,\n  get: function get() {\n    return _actions.go;\n  }\n});\nObject.defineProperty(exports, 'goBack', {\n  enumerable: true,\n  get: function get() {\n    return _actions.goBack;\n  }\n});\nObject.defineProperty(exports, 'goForward', {\n  enumerable: true,\n  get: function get() {\n    return _actions.goForward;\n  }\n});\nObject.defineProperty(exports, 'routerActions', {\n  enumerable: true,\n  get: function get() {\n    return _actions.routerActions;\n  }\n});\n\nvar _sync = require('./sync');\n\nvar _sync2 = _interopRequireDefault(_sync);\n\nvar _middleware = require('./middleware');\n\nvar _middleware2 = _interopRequireDefault(_middleware);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nexports.syncHistoryWithStore = _sync2['default'];\nexports.routerMiddleware = _middleware2['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports['default'] = routerMiddleware;\n\nvar _actions = require('./actions');\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n/**\n * This middleware captures CALL_HISTORY_METHOD actions to redirect to the\n * provided history object. This will prevent these actions from reaching your\n * reducer or any middleware that comes after this one.\n */\nfunction routerMiddleware(history) {\n  return function () {\n    return function (next) {\n      return function (action) {\n        if (action.type !== _actions.CALL_HISTORY_METHOD) {\n          return next(action);\n        }\n\n        var _action$payload = action.payload,\n            method = _action$payload.method,\n            args = _action$payload.args;\n\n        history[method].apply(history, _toConsumableArray(args));\n      };\n    };\n  };\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nexports.routerReducer = routerReducer;\n/**\n * This action type will be dispatched when your history\n * receives a location change.\n */\nvar LOCATION_CHANGE = exports.LOCATION_CHANGE = '@@router/LOCATION_CHANGE';\n\nvar initialState = {\n  locationBeforeTransitions: null\n};\n\n/**\n * This reducer will update the state with the most recent location history\n * has transitioned to. This may not be in sync with the router, particularly\n * if you have asynchronously-loaded routes, so reading from and relying on\n * this state is discouraged.\n */\nfunction routerReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n\n  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n      type = _ref.type,\n      payload = _ref.payload;\n\n  if (type === LOCATION_CHANGE) {\n    return _extends({}, state, { locationBeforeTransitions: payload });\n  }\n\n  return state;\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nexports['default'] = syncHistoryWithStore;\n\nvar _reducer = require('./reducer');\n\nvar defaultSelectLocationState = function defaultSelectLocationState(state) {\n  return state.routing;\n};\n\n/**\n * This function synchronizes your history state with the Redux store.\n * Location changes flow from history to the store. An enhanced history is\n * returned with a listen method that responds to store updates for location.\n *\n * When this history is provided to the router, this means the location data\n * will flow like this:\n * history.push -> store.dispatch -> enhancedHistory.listen -> router\n * This ensures that when the store state changes due to a replay or other\n * event, the router will be updated appropriately and can transition to the\n * correct router state.\n */\nfunction syncHistoryWithStore(history, store) {\n  var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n      _ref$selectLocationSt = _ref.selectLocationState,\n      selectLocationState = _ref$selectLocationSt === undefined ? defaultSelectLocationState : _ref$selectLocationSt,\n      _ref$adjustUrlOnRepla = _ref.adjustUrlOnReplay,\n      adjustUrlOnReplay = _ref$adjustUrlOnRepla === undefined ? true : _ref$adjustUrlOnRepla;\n\n  // Ensure that the reducer is mounted on the store and functioning properly.\n  if (typeof selectLocationState(store.getState()) === 'undefined') {\n    throw new Error('Expected the routing state to be available either as `state.routing` ' + 'or as the custom expression you can specify as `selectLocationState` ' + 'in the `syncHistoryWithStore()` options. ' + 'Ensure you have added the `routerReducer` to your store\\'s ' + 'reducers via `combineReducers` or whatever method you use to isolate ' + 'your reducers.');\n  }\n\n  var initialLocation = void 0;\n  var isTimeTraveling = void 0;\n  var unsubscribeFromStore = void 0;\n  var unsubscribeFromHistory = void 0;\n  var currentLocation = void 0;\n\n  // What does the store say about current location?\n  var getLocationInStore = function getLocationInStore(useInitialIfEmpty) {\n    var locationState = selectLocationState(store.getState());\n    return locationState.locationBeforeTransitions || (useInitialIfEmpty ? initialLocation : undefined);\n  };\n\n  // Init initialLocation with potential location in store\n  initialLocation = getLocationInStore();\n\n  // If the store is replayed, update the URL in the browser to match.\n  if (adjustUrlOnReplay) {\n    var handleStoreChange = function handleStoreChange() {\n      var locationInStore = getLocationInStore(true);\n      if (currentLocation === locationInStore || initialLocation === locationInStore) {\n        return;\n      }\n\n      // Update address bar to reflect store state\n      isTimeTraveling = true;\n      currentLocation = locationInStore;\n      history.transitionTo(_extends({}, locationInStore, {\n        action: 'PUSH'\n      }));\n      isTimeTraveling = false;\n    };\n\n    unsubscribeFromStore = store.subscribe(handleStoreChange);\n    handleStoreChange();\n  }\n\n  // Whenever location changes, dispatch an action to get it in the store\n  var handleLocationChange = function handleLocationChange(location) {\n    // ... unless we just caused that location change\n    if (isTimeTraveling) {\n      return;\n    }\n\n    // Remember where we are\n    currentLocation = location;\n\n    // Are we being called for the first time?\n    if (!initialLocation) {\n      // Remember as a fallback in case state is reset\n      initialLocation = location;\n\n      // Respect persisted location, if any\n      if (getLocationInStore()) {\n        return;\n      }\n    }\n\n    // Tell the store to update by dispatching an action\n    store.dispatch({\n      type: _reducer.LOCATION_CHANGE,\n      payload: location\n    });\n  };\n  unsubscribeFromHistory = history.listen(handleLocationChange);\n\n  // History 3.x doesn't call listen synchronously, so fire the initial location change ourselves\n  if (history.getCurrentLocation) {\n    handleLocationChange(history.getCurrentLocation());\n  }\n\n  // The enhanced history uses store as source of truth\n  return _extends({}, history, {\n    // The listeners are subscribed to the store instead of history\n    listen: function listen(listener) {\n      // Copy of last location.\n      var lastPublishedLocation = getLocationInStore(true);\n\n      // Keep track of whether we unsubscribed, as Redux store\n      // only applies changes in subscriptions on next dispatch\n      var unsubscribed = false;\n      var unsubscribeFromStore = store.subscribe(function () {\n        var currentLocation = getLocationInStore(true);\n        if (currentLocation === lastPublishedLocation) {\n          return;\n        }\n        lastPublishedLocation = currentLocation;\n        if (!unsubscribed) {\n          listener(lastPublishedLocation);\n        }\n      });\n\n      // History 2.x listeners expect a synchronous call. Make the first call to the\n      // listener after subscribing to the store, in case the listener causes a\n      // location change (e.g. when it redirects)\n      if (!history.getCurrentLocation) {\n        listener(lastPublishedLocation);\n      }\n\n      // Let user unsubscribe later\n      return function () {\n        unsubscribed = true;\n        unsubscribeFromStore();\n      };\n    },\n\n\n    // It also provides a way to destroy internal listeners\n    unsubscribe: function unsubscribe() {\n      if (adjustUrlOnReplay) {\n        unsubscribeFromStore();\n      }\n      unsubscribeFromHistory();\n    }\n  });\n}","'use strict';\n\nexports.__esModule = true;\nfunction createThunkMiddleware(extraArgument) {\n  return function (_ref) {\n    var dispatch = _ref.dispatch,\n        getState = _ref.getState;\n    return function (next) {\n      return function (action) {\n        if (typeof action === 'function') {\n          return action(dispatch, getState, extraArgument);\n        }\n\n        return next(action);\n      };\n    };\n  };\n}\n\nvar thunk = createThunkMiddleware();\nthunk.withExtraArgument = createThunkMiddleware;\n\nexports['default'] = thunk;","import $$observable from 'symbol-observable';\n\n/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\nvar ActionTypes = {\n  INIT: '@@redux/INIT' + Math.random().toString(36).substring(7).split('').join('.'),\n  REPLACE: '@@redux/REPLACE' + Math.random().toString(36).substring(7).split('').join('.')\n};\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n  return typeof obj;\n} : function (obj) {\n  return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\n/**\n * @param {any} obj The object to inspect.\n * @returns {boolean} True if the argument appears to be a plain object.\n */\nfunction isPlainObject(obj) {\n  if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || obj === null) return false;\n\n  var proto = obj;\n  while (Object.getPrototypeOf(proto) !== null) {\n    proto = Object.getPrototypeOf(proto);\n  }\n\n  return Object.getPrototypeOf(obj) === proto;\n}\n\n/**\n * Creates a Redux store that holds the state tree.\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} [enhancer] The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\nfunction createStore(reducer, preloadedState, enhancer) {\n  var _ref2;\n\n  if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {\n    enhancer = preloadedState;\n    preloadedState = undefined;\n  }\n\n  if (typeof enhancer !== 'undefined') {\n    if (typeof enhancer !== 'function') {\n      throw new Error('Expected the enhancer to be a function.');\n    }\n\n    return enhancer(createStore)(reducer, preloadedState);\n  }\n\n  if (typeof reducer !== 'function') {\n    throw new Error('Expected the reducer to be a function.');\n  }\n\n  var currentReducer = reducer;\n  var currentState = preloadedState;\n  var currentListeners = [];\n  var nextListeners = currentListeners;\n  var isDispatching = false;\n\n  function ensureCanMutateNextListeners() {\n    if (nextListeners === currentListeners) {\n      nextListeners = currentListeners.slice();\n    }\n  }\n\n  /**\n   * Reads the state tree managed by the store.\n   *\n   * @returns {any} The current state tree of your application.\n   */\n  function getState() {\n    if (isDispatching) {\n      throw new Error('You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.');\n    }\n\n    return currentState;\n  }\n\n  /**\n   * Adds a change listener. It will be called any time an action is dispatched,\n   * and some part of the state tree may potentially have changed. You may then\n   * call `getState()` to read the current state tree inside the callback.\n   *\n   * You may call `dispatch()` from a change listener, with the following\n   * caveats:\n   *\n   * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n   * If you subscribe or unsubscribe while the listeners are being invoked, this\n   * will not have any effect on the `dispatch()` that is currently in progress.\n   * However, the next `dispatch()` call, whether nested or not, will use a more\n   * recent snapshot of the subscription list.\n   *\n   * 2. The listener should not expect to see all state changes, as the state\n   * might have been updated multiple times during a nested `dispatch()` before\n   * the listener is called. It is, however, guaranteed that all subscribers\n   * registered before the `dispatch()` started will be called with the latest\n   * state by the time it exits.\n   *\n   * @param {Function} listener A callback to be invoked on every dispatch.\n   * @returns {Function} A function to remove this change listener.\n   */\n  function subscribe(listener) {\n    if (typeof listener !== 'function') {\n      throw new Error('Expected the listener to be a function.');\n    }\n\n    if (isDispatching) {\n      throw new Error('You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');\n    }\n\n    var isSubscribed = true;\n\n    ensureCanMutateNextListeners();\n    nextListeners.push(listener);\n\n    return function unsubscribe() {\n      if (!isSubscribed) {\n        return;\n      }\n\n      if (isDispatching) {\n        throw new Error('You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');\n      }\n\n      isSubscribed = false;\n\n      ensureCanMutateNextListeners();\n      var index = nextListeners.indexOf(listener);\n      nextListeners.splice(index, 1);\n    };\n  }\n\n  /**\n   * Dispatches an action. It is the only way to trigger a state change.\n   *\n   * The `reducer` function, used to create the store, will be called with the\n   * current state tree and the given `action`. Its return value will\n   * be considered the **next** state of the tree, and the change listeners\n   * will be notified.\n   *\n   * The base implementation only supports plain object actions. If you want to\n   * dispatch a Promise, an Observable, a thunk, or something else, you need to\n   * wrap your store creating function into the corresponding middleware. For\n   * example, see the documentation for the `redux-thunk` package. Even the\n   * middleware will eventually dispatch plain object actions using this method.\n   *\n   * @param {Object} action A plain object representing “what changed”. It is\n   * a good idea to keep actions serializable so you can record and replay user\n   * sessions, or use the time travelling `redux-devtools`. An action must have\n   * a `type` property which may not be `undefined`. It is a good idea to use\n   * string constants for action types.\n   *\n   * @returns {Object} For convenience, the same action object you dispatched.\n   *\n   * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n   * return something else (for example, a Promise you can await).\n   */\n  function dispatch(action) {\n    if (!isPlainObject(action)) {\n      throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');\n    }\n\n    if (typeof action.type === 'undefined') {\n      throw new Error('Actions may not have an undefined \"type\" property. ' + 'Have you misspelled a constant?');\n    }\n\n    if (isDispatching) {\n      throw new Error('Reducers may not dispatch actions.');\n    }\n\n    try {\n      isDispatching = true;\n      currentState = currentReducer(currentState, action);\n    } finally {\n      isDispatching = false;\n    }\n\n    var listeners = currentListeners = nextListeners;\n    for (var i = 0; i < listeners.length; i++) {\n      var listener = listeners[i];\n      listener();\n    }\n\n    return action;\n  }\n\n  /**\n   * Replaces the reducer currently used by the store to calculate the state.\n   *\n   * You might need this if your app implements code splitting and you want to\n   * load some of the reducers dynamically. You might also need this if you\n   * implement a hot reloading mechanism for Redux.\n   *\n   * @param {Function} nextReducer The reducer for the store to use instead.\n   * @returns {void}\n   */\n  function replaceReducer(nextReducer) {\n    if (typeof nextReducer !== 'function') {\n      throw new Error('Expected the nextReducer to be a function.');\n    }\n\n    currentReducer = nextReducer;\n    dispatch({ type: ActionTypes.REPLACE });\n  }\n\n  /**\n   * Interoperability point for observable/reactive libraries.\n   * @returns {observable} A minimal observable of state changes.\n   * For more information, see the observable proposal:\n   * https://github.com/tc39/proposal-observable\n   */\n  function observable() {\n    var _ref;\n\n    var outerSubscribe = subscribe;\n    return _ref = {\n      /**\n       * The minimal observable subscription method.\n       * @param {Object} observer Any object that can be used as an observer.\n       * The observer object should have a `next` method.\n       * @returns {subscription} An object with an `unsubscribe` method that can\n       * be used to unsubscribe the observable from the store, and prevent further\n       * emission of values from the observable.\n       */\n      subscribe: function subscribe(observer) {\n        if ((typeof observer === 'undefined' ? 'undefined' : _typeof(observer)) !== 'object' || observer === null) {\n          throw new TypeError('Expected the observer to be an object.');\n        }\n\n        function observeState() {\n          if (observer.next) {\n            observer.next(getState());\n          }\n        }\n\n        observeState();\n        var unsubscribe = outerSubscribe(observeState);\n        return { unsubscribe: unsubscribe };\n      }\n    }, _ref[$$observable] = function () {\n      return this;\n    }, _ref;\n  }\n\n  // When a store is created, an \"INIT\" action is dispatched so that every\n  // reducer returns their initial state. This effectively populates\n  // the initial state tree.\n  dispatch({ type: ActionTypes.INIT });\n\n  return _ref2 = {\n    dispatch: dispatch,\n    subscribe: subscribe,\n    getState: getState,\n    replaceReducer: replaceReducer\n  }, _ref2[$$observable] = observable, _ref2;\n}\n\n/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\nfunction warning(message) {\n  /* eslint-disable no-console */\n  if (typeof console !== 'undefined' && typeof console.error === 'function') {\n    console.error(message);\n  }\n  /* eslint-enable no-console */\n  try {\n    // This error was thrown as a convenience so that if you enable\n    // \"break on all exceptions\" in your console,\n    // it would pause the execution at this line.\n    throw new Error(message);\n  } catch (e) {} // eslint-disable-line no-empty\n}\n\nfunction getUndefinedStateErrorMessage(key, action) {\n  var actionType = action && action.type;\n  var actionDescription = actionType && 'action \"' + String(actionType) + '\"' || 'an action';\n\n  return 'Given ' + actionDescription + ', reducer \"' + key + '\" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state. ' + 'If you want this reducer to hold no value, you can return null instead of undefined.';\n}\n\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n  var reducerKeys = Object.keys(reducers);\n  var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';\n\n  if (reducerKeys.length === 0) {\n    return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';\n  }\n\n  if (!isPlainObject(inputState)) {\n    return 'The ' + argumentName + ' has unexpected type of \"' + {}.toString.call(inputState).match(/\\s([a-z|A-Z]+)/)[1] + '\". Expected argument to be an object with the following ' + ('keys: \"' + reducerKeys.join('\", \"') + '\"');\n  }\n\n  var unexpectedKeys = Object.keys(inputState).filter(function (key) {\n    return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];\n  });\n\n  unexpectedKeys.forEach(function (key) {\n    unexpectedKeyCache[key] = true;\n  });\n\n  if (action && action.type === ActionTypes.REPLACE) return;\n\n  if (unexpectedKeys.length > 0) {\n    return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('\"' + unexpectedKeys.join('\", \"') + '\" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('\"' + reducerKeys.join('\", \"') + '\". Unexpected keys will be ignored.');\n  }\n}\n\nfunction assertReducerShape(reducers) {\n  Object.keys(reducers).forEach(function (key) {\n    var reducer = reducers[key];\n    var initialState = reducer(undefined, { type: ActionTypes.INIT });\n\n    if (typeof initialState === 'undefined') {\n      throw new Error('Reducer \"' + key + '\" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined. If you don\\'t want to set a value for this reducer, ' + 'you can use null instead of undefined.');\n    }\n\n    var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');\n    if (typeof reducer(undefined, { type: type }) === 'undefined') {\n      throw new Error('Reducer \"' + key + '\" returned undefined when probed with a random type. ' + ('Don\\'t try to handle ' + ActionTypes.INIT + ' or other actions in \"redux/*\" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined, but can be null.');\n    }\n  });\n}\n\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\nfunction combineReducers(reducers) {\n  var reducerKeys = Object.keys(reducers);\n  var finalReducers = {};\n  for (var i = 0; i < reducerKeys.length; i++) {\n    var key = reducerKeys[i];\n\n    if (process.env.NODE_ENV !== 'production') {\n      if (typeof reducers[key] === 'undefined') {\n        warning('No reducer provided for key \"' + key + '\"');\n      }\n    }\n\n    if (typeof reducers[key] === 'function') {\n      finalReducers[key] = reducers[key];\n    }\n  }\n  var finalReducerKeys = Object.keys(finalReducers);\n\n  var unexpectedKeyCache = void 0;\n  if (process.env.NODE_ENV !== 'production') {\n    unexpectedKeyCache = {};\n  }\n\n  var shapeAssertionError = void 0;\n  try {\n    assertReducerShape(finalReducers);\n  } catch (e) {\n    shapeAssertionError = e;\n  }\n\n  return function combination() {\n    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    var action = arguments[1];\n\n    if (shapeAssertionError) {\n      throw shapeAssertionError;\n    }\n\n    if (process.env.NODE_ENV !== 'production') {\n      var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\n      if (warningMessage) {\n        warning(warningMessage);\n      }\n    }\n\n    var hasChanged = false;\n    var nextState = {};\n    for (var _i = 0; _i < finalReducerKeys.length; _i++) {\n      var _key = finalReducerKeys[_i];\n      var reducer = finalReducers[_key];\n      var previousStateForKey = state[_key];\n      var nextStateForKey = reducer(previousStateForKey, action);\n      if (typeof nextStateForKey === 'undefined') {\n        var errorMessage = getUndefinedStateErrorMessage(_key, action);\n        throw new Error(errorMessage);\n      }\n      nextState[_key] = nextStateForKey;\n      hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n    }\n    return hasChanged ? nextState : state;\n  };\n}\n\nfunction bindActionCreator(actionCreator, dispatch) {\n  return function () {\n    return dispatch(actionCreator.apply(this, arguments));\n  };\n}\n\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass a single function as the first argument,\n * and get a function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\nfunction bindActionCreators(actionCreators, dispatch) {\n  if (typeof actionCreators === 'function') {\n    return bindActionCreator(actionCreators, dispatch);\n  }\n\n  if ((typeof actionCreators === 'undefined' ? 'undefined' : _typeof(actionCreators)) !== 'object' || actionCreators === null) {\n    throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators === 'undefined' ? 'undefined' : _typeof(actionCreators)) + '. ' + 'Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?');\n  }\n\n  var keys = Object.keys(actionCreators);\n  var boundActionCreators = {};\n  for (var i = 0; i < keys.length; i++) {\n    var key = keys[i];\n    var actionCreator = actionCreators[key];\n    if (typeof actionCreator === 'function') {\n      boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n    }\n  }\n  return boundActionCreators;\n}\n\n/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\n\nfunction compose() {\n  for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {\n    funcs[_key] = arguments[_key];\n  }\n\n  if (funcs.length === 0) {\n    return function (arg) {\n      return arg;\n    };\n  }\n\n  if (funcs.length === 1) {\n    return funcs[0];\n  }\n\n  return funcs.reduce(function (a, b) {\n    return function () {\n      return a(b.apply(undefined, arguments));\n    };\n  });\n}\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\nfunction applyMiddleware() {\n  for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {\n    middlewares[_key] = arguments[_key];\n  }\n\n  return function (createStore) {\n    return function () {\n      for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n        args[_key2] = arguments[_key2];\n      }\n\n      var store = createStore.apply(undefined, args);\n      var _dispatch = function dispatch() {\n        throw new Error('Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');\n      };\n\n      var middlewareAPI = {\n        getState: store.getState,\n        dispatch: function dispatch() {\n          return _dispatch.apply(undefined, arguments);\n        }\n      };\n      var chain = middlewares.map(function (middleware) {\n        return middleware(middlewareAPI);\n      });\n      _dispatch = compose.apply(undefined, chain)(store.dispatch);\n\n      return _extends({}, store, {\n        dispatch: _dispatch\n      });\n    };\n  };\n}\n\n/*\n * This is a dummy function to check if the function name has been altered by minification.\n * If the function has been minified and NODE_ENV !== 'production', warn the user.\n */\nfunction isCrushed() {}\n\nif (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {\n  warning(\"You are currently using minified code outside of NODE_ENV === 'production'. \" + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.');\n}\n\nexport { createStore, combineReducers, bindActionCreators, applyMiddleware, compose, ActionTypes as __DO_NOT_USE__ActionTypes };\n","/* global window */\nimport ponyfill from './ponyfill.js';\n\nvar root;\n\nif (typeof self !== 'undefined') {\n  root = self;\n} else if (typeof window !== 'undefined') {\n  root = window;\n} else if (typeof global !== 'undefined') {\n  root = global;\n} else if (typeof module !== 'undefined') {\n  root = module;\n} else {\n  root = Function('return this')();\n}\n\nvar result = ponyfill(root);\nexport default result;\n","export default function symbolObservablePonyfill(root) {\n\tvar result;\n\tvar Symbol = root.Symbol;\n\n\tif (typeof Symbol === 'function') {\n\t\tif (Symbol.observable) {\n\t\t\tresult = Symbol.observable;\n\t\t} else {\n\t\t\tresult = Symbol('observable');\n\t\t\tSymbol.observable = result;\n\t\t}\n\t} else {\n\t\tresult = '@@observable';\n\t}\n\n\treturn result;\n};\n","function isAbsolute(pathname) {\n  return pathname.charAt(0) === '/';\n}\n\n// About 1.5x faster than the two-arg version of Array#splice()\nfunction spliceOne(list, index) {\n  for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n    list[i] = list[k];\n  }\n\n  list.pop();\n}\n\n// This implementation is based heavily on node's url.parse\nfunction resolvePathname(to) {\n  var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n  var toParts = to && to.split('/') || [];\n  var fromParts = from && from.split('/') || [];\n\n  var isToAbs = to && isAbsolute(to);\n  var isFromAbs = from && isAbsolute(from);\n  var mustEndAbs = isToAbs || isFromAbs;\n\n  if (to && isAbsolute(to)) {\n    // to is absolute\n    fromParts = toParts;\n  } else if (toParts.length) {\n    // to is relative, drop the filename\n    fromParts.pop();\n    fromParts = fromParts.concat(toParts);\n  }\n\n  if (!fromParts.length) return '/';\n\n  var hasTrailingSlash = void 0;\n  if (fromParts.length) {\n    var last = fromParts[fromParts.length - 1];\n    hasTrailingSlash = last === '.' || last === '..' || last === '';\n  } else {\n    hasTrailingSlash = false;\n  }\n\n  var up = 0;\n  for (var i = fromParts.length; i >= 0; i--) {\n    var part = fromParts[i];\n\n    if (part === '.') {\n      spliceOne(fromParts, i);\n    } else if (part === '..') {\n      spliceOne(fromParts, i);\n      up++;\n    } else if (up) {\n      spliceOne(fromParts, i);\n      up--;\n    }\n  }\n\n  if (!mustEndAbs) for (; up--; up) {\n    fromParts.unshift('..');\n  }if (mustEndAbs && fromParts[0] !== '' && (!fromParts[0] || !isAbsolute(fromParts[0]))) fromParts.unshift('');\n\n  var result = fromParts.join('/');\n\n  if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n\n  return result;\n}\n\nexport default resolvePathname;","module.exports = {\n  framer: require('./src/framer.js'),\n  windows: require('./src/windows.js')\n};\n","/*===========================================================================*\\\n * Framer for breaking a U-Law ByteBuffer or Array into windows of a particular\n * size at an arbitrary step.\n *\n * (c) Vail Systems. Joshua Jung and Ben Bryan. 2015\n\\*===========================================================================*/\nvar Framer = function (options) {\n  options = options || {};\n\n  this.frameIx = 0;\n  this.frameSize = options.frameSize || 64;\n  this.frameStep = options.frameStep|| this.frameSize;\n  this.map = options.map || undefined;\n  this.scale = options.scale || undefined;\n  this.offset = options.offset ? options.offset : 0;\n  this.sampleType = options.sampleType || 'UInt8';\n  this.wordSize = options.wordSize || 1;\n};\n\nFramer.prototype = {\n  /**\n   * Frames a buffer of single-byte char values or an array of Numbers into windows of the specified size.\n   */\n  frame: function(bufferOrArray, callback) {\n    var self = this,\n        ix = this.offset,\n        frame = [],\n        isArray = Object.prototype.toString.call( bufferOrArray) === '[object Array]';\n\n    self.frameIx = 0;\n\n    while (ix < bufferOrArray.length) {\n      var value = isArray ? bufferOrArray[ix] : bufferOrArray['read' + self.sampleType](ix); \n\n      frame.push(this.map ? this.map[value] : value);\n\n      if (frame.length == this.frameSize || ix+self.wordSize == bufferOrArray.length) finishFrame(frame);\n\n      ix += self.wordSize;\n    }\n\n    // Did we not process any frames at all for some reason?\n    if (this.frameIx == 0) callback(undefined);\n\n    function finishFrame(frame) {\n      if (this.scale) frame = frame.map(function (s, ix) {return s * self.scale[ix];});\n\n      callback(frame, self.frameIx);\n\n      if (ix != bufferOrArray.length - self.wordSize)\n      {\n          ix -= (self.frameSize - self.frameStep) * self.wordSize;\n\n          self.frameIx++;\n          frame.length = 0;\n      }\n    }\n  }\n};\n\nmodule.exports = Framer;\n","/*===========================================================================*\\\n * Method for producing the coefficients for windowing functions of an\n * arbitrary length.\n *\n * (c) Vail Systems. Joshua Jung and Ben Bryan. 2015\n\\*===========================================================================*/\nmodule.exports = {\n    construct: function (type, sampleCount, alpha)  {\n       var coef = [];\n       switch (type)\n       {\n           case 'ham': \n               for (var i = 0; i < sampleCount; i++) {\n                   coef[i] = 0.54 - 0.46 * Math.cos((2 * Math.PI * i)/(sampleCount - 1));\n               }\n           break;\n           case 'tukey':\n               var sm1 = sampleCount - 1,\n                   asm1 = alpha * sm1;\n               for (var i = 0; i < sampleCount; i++) {\n                   // Left tail\n                   if (i < asm1 / 2)\n                      coef[i] = 0.5 * (1 + Math.cos(Math.PI * ((2 * sampleCount)/(asm1) - 1))); \n                   // Right tail\n                   else if (i > (sm1 * (1 - alpha / 2)))\n                      coef[i] = 0.5 * (1 + Math.cos(Math.PI * ((2 * sampleCount)/(asm1) - (2 / alpha) + 1)));\n                   // Middle (rectangular)\n                   else coef[i] = 1;\n               }\n           break;\n           case 'rectangular':\n               for (var i = 0; i < sampleCount; i++)\n                   coef[i] = 1.0;\n           break;\n       }\n       return coef;\n    }\n};\n","/* global window, exports, define */\n\n!function() {\n    'use strict'\n\n    var re = {\n        not_string: /[^s]/,\n        not_bool: /[^t]/,\n        not_type: /[^T]/,\n        not_primitive: /[^v]/,\n        number: /[diefg]/,\n        numeric_arg: /[bcdiefguxX]/,\n        json: /[j]/,\n        not_json: /[^j]/,\n        text: /^[^\\x25]+/,\n        modulo: /^\\x25{2}/,\n        placeholder: /^\\x25(?:([1-9]\\d*)\\$|\\(([^\\)]+)\\))?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-gijostTuvxX])/,\n        key: /^([a-z_][a-z_\\d]*)/i,\n        key_access: /^\\.([a-z_][a-z_\\d]*)/i,\n        index_access: /^\\[(\\d+)\\]/,\n        sign: /^[\\+\\-]/\n    }\n\n    function sprintf(key) {\n        // `arguments` is not an array, but should be fine for this call\n        return sprintf_format(sprintf_parse(key), arguments)\n    }\n\n    function vsprintf(fmt, argv) {\n        return sprintf.apply(null, [fmt].concat(argv || []))\n    }\n\n    function sprintf_format(parse_tree, argv) {\n        var cursor = 1, tree_length = parse_tree.length, arg, output = '', i, k, match, pad, pad_character, pad_length, is_positive, sign\n        for (i = 0; i < tree_length; i++) {\n            if (typeof parse_tree[i] === 'string') {\n                output += parse_tree[i]\n            }\n            else if (Array.isArray(parse_tree[i])) {\n                match = parse_tree[i] // convenience purposes only\n                if (match[2]) { // keyword argument\n                    arg = argv[cursor]\n                    for (k = 0; k < match[2].length; k++) {\n                        if (!arg.hasOwnProperty(match[2][k])) {\n                            throw new Error(sprintf('[sprintf] property \"%s\" does not exist', match[2][k]))\n                        }\n                        arg = arg[match[2][k]]\n                    }\n                }\n                else if (match[1]) { // positional argument (explicit)\n                    arg = argv[match[1]]\n                }\n                else { // positional argument (implicit)\n                    arg = argv[cursor++]\n                }\n\n                if (re.not_type.test(match[8]) && re.not_primitive.test(match[8]) && arg instanceof Function) {\n                    arg = arg()\n                }\n\n                if (re.numeric_arg.test(match[8]) && (typeof arg !== 'number' && isNaN(arg))) {\n                    throw new TypeError(sprintf('[sprintf] expecting number but found %T', arg))\n                }\n\n                if (re.number.test(match[8])) {\n                    is_positive = arg >= 0\n                }\n\n                switch (match[8]) {\n                    case 'b':\n                        arg = parseInt(arg, 10).toString(2)\n                        break\n                    case 'c':\n                        arg = String.fromCharCode(parseInt(arg, 10))\n                        break\n                    case 'd':\n                    case 'i':\n                        arg = parseInt(arg, 10)\n                        break\n                    case 'j':\n                        arg = JSON.stringify(arg, null, match[6] ? parseInt(match[6]) : 0)\n                        break\n                    case 'e':\n                        arg = match[7] ? parseFloat(arg).toExponential(match[7]) : parseFloat(arg).toExponential()\n                        break\n                    case 'f':\n                        arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg)\n                        break\n                    case 'g':\n                        arg = match[7] ? String(Number(arg.toPrecision(match[7]))) : parseFloat(arg)\n                        break\n                    case 'o':\n                        arg = (parseInt(arg, 10) >>> 0).toString(8)\n                        break\n                    case 's':\n                        arg = String(arg)\n                        arg = (match[7] ? arg.substring(0, match[7]) : arg)\n                        break\n                    case 't':\n                        arg = String(!!arg)\n                        arg = (match[7] ? arg.substring(0, match[7]) : arg)\n                        break\n                    case 'T':\n                        arg = Object.prototype.toString.call(arg).slice(8, -1).toLowerCase()\n                        arg = (match[7] ? arg.substring(0, match[7]) : arg)\n                        break\n                    case 'u':\n                        arg = parseInt(arg, 10) >>> 0\n                        break\n                    case 'v':\n                        arg = arg.valueOf()\n                        arg = (match[7] ? arg.substring(0, match[7]) : arg)\n                        break\n                    case 'x':\n                        arg = (parseInt(arg, 10) >>> 0).toString(16)\n                        break\n                    case 'X':\n                        arg = (parseInt(arg, 10) >>> 0).toString(16).toUpperCase()\n                        break\n                }\n                if (re.json.test(match[8])) {\n                    output += arg\n                }\n                else {\n                    if (re.number.test(match[8]) && (!is_positive || match[3])) {\n                        sign = is_positive ? '+' : '-'\n                        arg = arg.toString().replace(re.sign, '')\n                    }\n                    else {\n                        sign = ''\n                    }\n                    pad_character = match[4] ? match[4] === '0' ? '0' : match[4].charAt(1) : ' '\n                    pad_length = match[6] - (sign + arg).length\n                    pad = match[6] ? (pad_length > 0 ? pad_character.repeat(pad_length) : '') : ''\n                    output += match[5] ? sign + arg + pad : (pad_character === '0' ? sign + pad + arg : pad + sign + arg)\n                }\n            }\n        }\n        return output\n    }\n\n    var sprintf_cache = Object.create(null)\n\n    function sprintf_parse(fmt) {\n        if (sprintf_cache[fmt]) {\n            return sprintf_cache[fmt]\n        }\n\n        var _fmt = fmt, match, parse_tree = [], arg_names = 0\n        while (_fmt) {\n            if ((match = re.text.exec(_fmt)) !== null) {\n                parse_tree.push(match[0])\n            }\n            else if ((match = re.modulo.exec(_fmt)) !== null) {\n                parse_tree.push('%')\n            }\n            else if ((match = re.placeholder.exec(_fmt)) !== null) {\n                if (match[2]) {\n                    arg_names |= 1\n                    var field_list = [], replacement_field = match[2], field_match = []\n                    if ((field_match = re.key.exec(replacement_field)) !== null) {\n                        field_list.push(field_match[1])\n                        while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {\n                            if ((field_match = re.key_access.exec(replacement_field)) !== null) {\n                                field_list.push(field_match[1])\n                            }\n                            else if ((field_match = re.index_access.exec(replacement_field)) !== null) {\n                                field_list.push(field_match[1])\n                            }\n                            else {\n                                throw new SyntaxError('[sprintf] failed to parse named argument key')\n                            }\n                        }\n                    }\n                    else {\n                        throw new SyntaxError('[sprintf] failed to parse named argument key')\n                    }\n                    match[2] = field_list\n                }\n                else {\n                    arg_names |= 2\n                }\n                if (arg_names === 3) {\n                    throw new Error('[sprintf] mixing positional and named placeholders is not (yet) supported')\n                }\n                parse_tree.push(match)\n            }\n            else {\n                throw new SyntaxError('[sprintf] unexpected placeholder')\n            }\n            _fmt = _fmt.substring(match[0].length)\n        }\n        return sprintf_cache[fmt] = parse_tree\n    }\n\n    /**\n     * export to either browser or node.js\n     */\n    /* eslint-disable quote-props */\n    if (typeof exports !== 'undefined') {\n        exports['sprintf'] = sprintf\n        exports['vsprintf'] = vsprintf\n    }\n    if (typeof window !== 'undefined') {\n        window['sprintf'] = sprintf\n        window['vsprintf'] = vsprintf\n\n        if (typeof define === 'function' && define['amd']) {\n            define(function() {\n                return {\n                    'sprintf': sprintf,\n                    'vsprintf': vsprintf\n                }\n            })\n        }\n    }\n    /* eslint-enable quote-props */\n}()\n","(function(root, factory){\n\n\t//UMD\n\tif ( typeof define === \"function\" && define.amd ) {\n\t\tdefine(function() {\n\t\t\treturn factory();\n\t\t});\n\t} else if (typeof module === \"object\") {\n\t\tmodule.exports = factory();\n \t} else {\n\t\troot.Tone = factory();\n\t}\n\n}(this, function(){\n\n\t\"use strict\";\n\t\n\tvar Tone;\n\t//constructs the main Tone object\n\tfunction Main(func){\n\t\tTone = func();\n\t}\n\t//invokes each of the modules with the main Tone object as the argument\n\tfunction Module(func){\n\t\tfunc(Tone);\n\t}\t/**\n\t *  Tone.js\n\t *  @author Yotam Mann\n\t *  @license http://opensource.org/licenses/MIT MIT License\n\t *  @copyright 2014-2018 Yotam Mann\n\t */\n\tMain(function () {\n\t    \n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tTONE\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  @class  Tone is the base class of all other classes.\n\t\t *  @constructor\n\t\t */\n\t    var Tone = function () {\n\t        if (!(this instanceof Tone)) {\n\t            throw new Error('constructor needs to be called with the \\'new\\' keyword');\n\t        }\n\t    };\n\t    /**\n\t\t *  @memberOf Tone#\n\t\t *  @returns {String} returns the name of the class as a string\n\t\t */\n\t    Tone.prototype.toString = function () {\n\t        for (var className in Tone) {\n\t            var isLetter = className[0].match(/^[A-Z]$/);\n\t            var sameConstructor = Tone[className] === this.constructor;\n\t            if (Tone.isFunction(Tone[className]) && isLetter && sameConstructor) {\n\t                return className;\n\t            }\n\t        }\n\t        return 'Tone';\n\t    };\n\t    /**\n\t\t *  @memberOf Tone#\n\t\t *  disconnect and dispose\n\t\t *  @returns {Tone} this\n\t\t */\n\t    Tone.prototype.dispose = function () {\n\t        return this;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tGET/SET\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Set the parameters at once. Either pass in an\n\t\t *  object mapping parameters to values, or to set a\n\t\t *  single parameter, by passing in a string and value.\n\t\t *  The last argument is an optional ramp time which\n\t\t *  will ramp any signal values to their destination value\n\t\t *  over the duration of the rampTime.\n\t\t *  @param {Object|String} params\n\t\t *  @param {Number=} value\n\t\t *  @param {Time=} rampTime\n\t\t *  @returns {Tone} this\n\t\t *  @memberOf Tone#\n\t\t *  @example\n\t\t * //set values using an object\n\t\t * filter.set({\n\t\t * \t\"frequency\" : 300,\n\t\t * \t\"type\" : highpass\n\t\t * });\n\t\t *  @example\n\t\t * filter.set(\"type\", \"highpass\");\n\t\t *  @example\n\t\t * //ramp to the value 220 over 3 seconds.\n\t\t * oscillator.set({\n\t\t * \t\"frequency\" : 220\n\t\t * }, 3);\n\t\t */\n\t    Tone.prototype.set = function (params, value, rampTime) {\n\t        if (Tone.isObject(params)) {\n\t            rampTime = value;\n\t        } else if (Tone.isString(params)) {\n\t            var tmpObj = {};\n\t            tmpObj[params] = value;\n\t            params = tmpObj;\n\t        }\n\t        paramLoop:\n\t            for (var attr in params) {\n\t                value = params[attr];\n\t                var parent = this;\n\t                if (attr.indexOf('.') !== -1) {\n\t                    var attrSplit = attr.split('.');\n\t                    for (var i = 0; i < attrSplit.length - 1; i++) {\n\t                        parent = parent[attrSplit[i]];\n\t                        if (parent instanceof Tone) {\n\t                            attrSplit.splice(0, i + 1);\n\t                            var innerParam = attrSplit.join('.');\n\t                            parent.set(innerParam, value);\n\t                            continue paramLoop;\n\t                        }\n\t                    }\n\t                    attr = attrSplit[attrSplit.length - 1];\n\t                }\n\t                var param = parent[attr];\n\t                if (Tone.isUndef(param)) {\n\t                    continue;\n\t                }\n\t                if (Tone.Signal && param instanceof Tone.Signal || Tone.Param && param instanceof Tone.Param) {\n\t                    if (param.value !== value) {\n\t                        if (Tone.isUndef(rampTime)) {\n\t                            param.value = value;\n\t                        } else {\n\t                            param.rampTo(value, rampTime);\n\t                        }\n\t                    }\n\t                } else if (param instanceof AudioParam) {\n\t                    if (param.value !== value) {\n\t                        param.value = value;\n\t                    }\n\t                } else if (Tone.TimeBase && param instanceof Tone.TimeBase) {\n\t                    parent[attr] = value;\n\t                } else if (param instanceof Tone) {\n\t                    param.set(value);\n\t                } else if (param !== value) {\n\t                    parent[attr] = value;\n\t                }\n\t            }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Get the object's attributes. Given no arguments get\n\t\t *  will return all available object properties and their corresponding\n\t\t *  values. Pass in a single attribute to retrieve or an array\n\t\t *  of attributes. The attribute strings can also include a \".\"\n\t\t *  to access deeper properties.\n\t\t *  @memberOf Tone#\n\t\t *  @example\n\t\t * osc.get();\n\t\t * //returns {\"type\" : \"sine\", \"frequency\" : 440, ...etc}\n\t\t *  @example\n\t\t * osc.get(\"type\");\n\t\t * //returns { \"type\" : \"sine\"}\n\t\t * @example\n\t\t * //use dot notation to access deep properties\n\t\t * synth.get([\"envelope.attack\", \"envelope.release\"]);\n\t\t * //returns {\"envelope\" : {\"attack\" : 0.2, \"release\" : 0.4}}\n\t\t *  @param {Array=|string|undefined} params the parameters to get, otherwise will return\n\t\t *  \t\t\t\t\t                  all available.\n\t\t *  @returns {Object}\n\t\t */\n\t    Tone.prototype.get = function (params) {\n\t        if (Tone.isUndef(params)) {\n\t            params = this._collectDefaults(this.constructor);\n\t        } else if (Tone.isString(params)) {\n\t            params = [params];\n\t        }\n\t        var ret = {};\n\t        for (var i = 0; i < params.length; i++) {\n\t            var attr = params[i];\n\t            var parent = this;\n\t            var subRet = ret;\n\t            if (attr.indexOf('.') !== -1) {\n\t                var attrSplit = attr.split('.');\n\t                for (var j = 0; j < attrSplit.length - 1; j++) {\n\t                    var subAttr = attrSplit[j];\n\t                    subRet[subAttr] = subRet[subAttr] || {};\n\t                    subRet = subRet[subAttr];\n\t                    parent = parent[subAttr];\n\t                }\n\t                attr = attrSplit[attrSplit.length - 1];\n\t            }\n\t            var param = parent[attr];\n\t            if (Tone.isObject(params[attr])) {\n\t                subRet[attr] = param.get();\n\t            } else if (Tone.Signal && param instanceof Tone.Signal) {\n\t                subRet[attr] = param.value;\n\t            } else if (Tone.Param && param instanceof Tone.Param) {\n\t                subRet[attr] = param.value;\n\t            } else if (param instanceof AudioParam) {\n\t                subRet[attr] = param.value;\n\t            } else if (param instanceof Tone) {\n\t                subRet[attr] = param.get();\n\t            } else if (!Tone.isFunction(param) && Tone.isDefined(param)) {\n\t                subRet[attr] = param;\n\t            }\n\t        }\n\t        return ret;\n\t    };\n\t    /**\n\t\t *  collect all of the default attributes in one\n\t\t *  @private\n\t\t *  @param {Function} constr the constructor to find the defaults from\n\t\t *  @return {Array} all of the attributes which belong to the class\n\t\t */\n\t    Tone.prototype._collectDefaults = function (constr) {\n\t        var ret = [];\n\t        if (Tone.isDefined(constr.defaults)) {\n\t            ret = Object.keys(constr.defaults);\n\t        }\n\t        if (Tone.isDefined(constr._super)) {\n\t            var superDefs = this._collectDefaults(constr._super);\n\t            //filter out repeats\n\t            for (var i = 0; i < superDefs.length; i++) {\n\t                if (ret.indexOf(superDefs[i]) === -1) {\n\t                    ret.push(superDefs[i]);\n\t                }\n\t            }\n\t        }\n\t        return ret;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tDEFAULTS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  @memberOf Tone\n\t\t *  @param  {Array}  values  The arguments array\n\t\t *  @param  {Array}  keys    The names of the arguments\n\t\t *  @param {Function|Object} constr The class constructor\n\t\t *  @return  {Object}  An object composed of the  defaults between the class' defaults\n\t\t *                        and the passed in arguments.\n\t\t */\n\t    Tone.defaults = function (values, keys, constr) {\n\t        var options = {};\n\t        if (values.length === 1 && Tone.isObject(values[0])) {\n\t            options = values[0];\n\t        } else {\n\t            for (var i = 0; i < keys.length; i++) {\n\t                options[keys[i]] = values[i];\n\t            }\n\t        }\n\t        if (Tone.isDefined(constr.defaults)) {\n\t            return Tone.defaultArg(options, constr.defaults);\n\t        } else if (Tone.isObject(constr)) {\n\t            return Tone.defaultArg(options, constr);\n\t        } else {\n\t            return options;\n\t        }\n\t    };\n\t    /**\n\t\t *  If the `given` parameter is undefined, use the `fallback`.\n\t\t *  If both `given` and `fallback` are object literals, it will\n\t\t *  return a deep copy which includes all of the parameters from both\n\t\t *  objects. If a parameter is undefined in given, it will return\n\t\t *  the fallback property.\n\t\t *  <br><br>\n\t\t *  WARNING: if object is self referential, it will go into an an\n\t\t *  infinite recursive loop.\n\t\t *  @memberOf Tone\n\t\t *  @param  {*} given\n\t\t *  @param  {*} fallback\n\t\t *  @return {*}\n\t\t */\n\t    Tone.defaultArg = function (given, fallback) {\n\t        if (Tone.isObject(given) && Tone.isObject(fallback)) {\n\t            var ret = {};\n\t            //make a deep copy of the given object\n\t            for (var givenProp in given) {\n\t                ret[givenProp] = Tone.defaultArg(fallback[givenProp], given[givenProp]);\n\t            }\n\t            for (var fallbackProp in fallback) {\n\t                ret[fallbackProp] = Tone.defaultArg(given[fallbackProp], fallback[fallbackProp]);\n\t            }\n\t            return ret;\n\t        } else {\n\t            return Tone.isUndef(given) ? fallback : given;\n\t        }\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tCONNECTIONS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  connect together all of the arguments in series\n\t\t *  @param {...AudioParam|Tone|AudioNode} nodes\n\t\t *  @returns {Tone}\n\t\t *  @memberOf Tone\n\t\t *  @static\n\t\t */\n\t    Tone.connectSeries = function () {\n\t        var currentUnit = arguments[0];\n\t        for (var i = 1; i < arguments.length; i++) {\n\t            var toUnit = arguments[i];\n\t            currentUnit.connect(toUnit);\n\t            currentUnit = toUnit;\n\t        }\n\t        return Tone;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    // TYPE CHECKING\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Test if the arg is undefined\n\t\t *  @param {*} arg the argument to test\n\t\t *  @returns {Boolean} true if the arg is undefined\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.isUndef = function (val) {\n\t        return typeof val === 'undefined';\n\t    };\n\t    /**\n\t\t *  Test if the arg is not undefined\n\t\t *  @param {*} arg the argument to test\n\t\t *  @returns {Boolean} true if the arg is undefined\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.isDefined = function (val) {\n\t        return !Tone.isUndef(val);\n\t    };\n\t    /**\n\t\t *  Test if the arg is a function\n\t\t *  @param {*} arg the argument to test\n\t\t *  @returns {Boolean} true if the arg is a function\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.isFunction = function (val) {\n\t        return typeof val === 'function';\n\t    };\n\t    /**\n\t\t *  Test if the argument is a number.\n\t\t *  @param {*} arg the argument to test\n\t\t *  @returns {Boolean} true if the arg is a number\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.isNumber = function (arg) {\n\t        return typeof arg === 'number';\n\t    };\n\t    /**\n\t\t *  Test if the given argument is an object literal (i.e. `{}`);\n\t\t *  @param {*} arg the argument to test\n\t\t *  @returns {Boolean} true if the arg is an object literal.\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.isObject = function (arg) {\n\t        return Object.prototype.toString.call(arg) === '[object Object]' && arg.constructor === Object;\n\t    };\n\t    /**\n\t\t *  Test if the argument is a boolean.\n\t\t *  @param {*} arg the argument to test\n\t\t *  @returns {Boolean} true if the arg is a boolean\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.isBoolean = function (arg) {\n\t        return typeof arg === 'boolean';\n\t    };\n\t    /**\n\t\t *  Test if the argument is an Array\n\t\t *  @param {*} arg the argument to test\n\t\t *  @returns {Boolean} true if the arg is an array\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.isArray = function (arg) {\n\t        return Array.isArray(arg);\n\t    };\n\t    /**\n\t\t *  Test if the argument is a string.\n\t\t *  @param {*} arg the argument to test\n\t\t *  @returns {Boolean} true if the arg is a string\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.isString = function (arg) {\n\t        return typeof arg === 'string';\n\t    };\n\t    /**\n\t\t *  Test if the argument is in the form of a note in scientific pitch notation.\n\t\t *  e.g. \"C4\"\n\t\t *  @param {*} arg the argument to test\n\t\t *  @returns {Boolean} true if the arg is a string\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.isNote = function (arg) {\n\t        return Tone.isString(arg) && /^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i.test(arg);\n\t    };\n\t    /**\n\t\t *  An empty function.\n\t\t *  @static\n\t\t */\n\t    Tone.noOp = function () {\n\t    };\n\t    /**\n\t\t *  Make the property not writable. Internal use only.\n\t\t *  @private\n\t\t *  @param  {String}  property  the property to make not writable\n\t\t */\n\t    Tone.prototype._readOnly = function (property) {\n\t        if (Array.isArray(property)) {\n\t            for (var i = 0; i < property.length; i++) {\n\t                this._readOnly(property[i]);\n\t            }\n\t        } else {\n\t            Object.defineProperty(this, property, {\n\t                writable: false,\n\t                enumerable: true\n\t            });\n\t        }\n\t    };\n\t    /**\n\t\t *  Make an attribute writeable. Interal use only.\n\t\t *  @private\n\t\t *  @param  {String}  property  the property to make writable\n\t\t */\n\t    Tone.prototype._writable = function (property) {\n\t        if (Array.isArray(property)) {\n\t            for (var i = 0; i < property.length; i++) {\n\t                this._writable(property[i]);\n\t            }\n\t        } else {\n\t            Object.defineProperty(this, property, { writable: true });\n\t        }\n\t    };\n\t    /**\n\t\t * Possible play states.\n\t\t * @enum {String}\n\t\t */\n\t    Tone.State = {\n\t        Started: 'started',\n\t        Stopped: 'stopped',\n\t        Paused: 'paused'\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    // CONVERSIONS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Equal power gain scale. Good for cross-fading.\n\t\t *  @param  {NormalRange} percent (0-1)\n\t\t *  @return {Number}         output gain (0-1)\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.equalPowerScale = function (percent) {\n\t        var piFactor = 0.5 * Math.PI;\n\t        return Math.sin(percent * piFactor);\n\t    };\n\t    /**\n\t\t *  Convert decibels into gain.\n\t\t *  @param  {Decibels} db\n\t\t *  @return {Number}\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.dbToGain = function (db) {\n\t        return Math.pow(10, db / 20);\n\t    };\n\t    /**\n\t\t *  Convert gain to decibels.\n\t\t *  @param  {Number} gain (0-1)\n\t\t *  @return {Decibels}\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.gainToDb = function (gain) {\n\t        return 20 * (Math.log(gain) / Math.LN10);\n\t    };\n\t    /**\n\t\t *  Convert an interval (in semitones) to a frequency ratio.\n\t\t *  @param  {Interval} interval the number of semitones above the base note\n\t\t *  @return {Number}          the frequency ratio\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t *  @example\n\t\t * tone.intervalToFrequencyRatio(0); // 1\n\t\t * tone.intervalToFrequencyRatio(12); // 2\n\t\t * tone.intervalToFrequencyRatio(-12); // 0.5\n\t\t */\n\t    Tone.intervalToFrequencyRatio = function (interval) {\n\t        return Math.pow(2, interval / 12);\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tTIMING\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Return the current time of the AudioContext clock.\n\t\t *  @return {Number} the currentTime from the AudioContext\n\t\t *  @memberOf Tone#\n\t\t */\n\t    Tone.prototype.now = function () {\n\t        return Tone.context.now();\n\t    };\n\t    /**\n\t\t *  Return the current time of the AudioContext clock.\n\t\t *  @return {Number} the currentTime from the AudioContext\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.now = function () {\n\t        return Tone.context.now();\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tINHERITANCE\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  have a child inherit all of Tone's (or a parent's) prototype\n\t\t *  to inherit the parent's properties, make sure to call\n\t\t *  Parent.call(this) in the child's constructor\n\t\t *\n\t\t *  based on closure library's inherit function\n\t\t *\n\t\t *  @memberOf Tone\n\t\t *  @static\n\t\t *  @param  {Function} \tchild\n\t\t *  @param  {Function=} parent (optional) parent to inherit from\n\t\t *                             if no parent is supplied, the child\n\t\t *                             will inherit from Tone\n\t\t */\n\t    Tone.extend = function (child, parent) {\n\t        if (Tone.isUndef(parent)) {\n\t            parent = Tone;\n\t        }\n\t        function TempConstructor() {\n\t        }\n\t        TempConstructor.prototype = parent.prototype;\n\t        child.prototype = new TempConstructor();\n\t        /** @override */\n\t        child.prototype.constructor = child;\n\t        child._super = parent;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tCONTEXT\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Private reference to the global AudioContext\n\t\t *  @type {AudioContext}\n\t\t *  @private\n\t\t */\n\t    var audioContext = null;\n\t    /**\n\t\t *  A static pointer to the audio context accessible as Tone.context.\n\t\t *  @type {Tone.Context}\n\t\t *  @name context\n\t\t *  @memberOf Tone\n\t\t */\n\t    Object.defineProperty(Tone, 'context', {\n\t        get: function () {\n\t            return audioContext;\n\t        },\n\t        set: function (context) {\n\t            if (Tone.Context && context instanceof Tone.Context) {\n\t                audioContext = context;\n\t            } else {\n\t                audioContext = new Tone.Context(context);\n\t            }\n\t            //initialize the new audio context\n\t            Tone.Context.emit('init', audioContext);\n\t        }\n\t    });\n\t    /**\n\t\t *  The AudioContext\n\t\t *  @type {Tone.Context}\n\t\t *  @name context\n\t\t *  @memberOf Tone#\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.prototype, 'context', {\n\t        get: function () {\n\t            return Tone.context;\n\t        }\n\t    });\n\t    /**\n\t\t *  Tone automatically creates a context on init, but if you are working\n\t\t *  with other libraries which also create an AudioContext, it can be\n\t\t *  useful to set your own. If you are going to set your own context,\n\t\t *  be sure to do it at the start of your code, before creating any objects.\n\t\t *  @static\n\t\t *  @param {AudioContext} ctx The new audio context to set\n\t\t */\n\t    Tone.setContext = function (ctx) {\n\t        Tone.context = ctx;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tATTRIBUTES\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  The number of seconds of 1 processing block (128 samples)\n\t\t *  @type {Number}\n\t\t *  @name blockTime\n\t\t *  @memberOf Tone\n\t\t *  @static\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.prototype, 'blockTime', {\n\t        get: function () {\n\t            return 128 / this.context.sampleRate;\n\t        }\n\t    });\n\t    /**\n\t\t *  The duration in seconds of one sample.\n\t\t *  @type {Number}\n\t\t *  @name sampleTime\n\t\t *  @memberOf Tone\n\t\t *  @static\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.prototype, 'sampleTime', {\n\t        get: function () {\n\t            return 1 / this.context.sampleRate;\n\t        }\n\t    });\n\t    /**\n\t\t *  Whether or not all the technologies that Tone.js relies on are supported by the current browser.\n\t\t *  @type {Boolean}\n\t\t *  @name supported\n\t\t *  @memberOf Tone\n\t\t *  @readOnly\n\t\t *  @static\n\t\t */\n\t    Object.defineProperty(Tone, 'supported', {\n\t        get: function () {\n\t            var hasAudioContext = window.hasOwnProperty('AudioContext') || window.hasOwnProperty('webkitAudioContext');\n\t            var hasPromises = window.hasOwnProperty('Promise');\n\t            var hasWorkers = window.hasOwnProperty('Worker');\n\t            return hasAudioContext && hasPromises && hasWorkers;\n\t        }\n\t    });\n\t    /**\n\t\t *  Boolean value if the audio context has been initialized.\n\t\t *  @type {Boolean}\n\t\t *  @memberOf Tone\n\t\t *  @static\n\t\t *  @name initialized\n\t\t */\n\t    Object.defineProperty(Tone, 'initialized', {\n\t        get: function () {\n\t            return audioContext !== null;\n\t        }\n\t    });\n\t    /**\n\t\t *  Get the context when it becomes available\n\t\t *  @param  {Function}  resolve  Callback when the context is initialized\n\t\t *  @return  {Tone}\n\t\t */\n\t    Tone.getContext = function (resolve) {\n\t        if (Tone.initialized) {\n\t            resolve(Tone.context);\n\t        } else {\n\t            var resCallback = function () {\n\t                resolve(Tone.context);\n\t                Tone.Context.off('init', resCallback);\n\t            };\n\t            Tone.Context.on('init', resCallback);\n\t        }\n\t        return Tone;\n\t    };\n\t    /**\n\t\t * The version number\n\t\t * @type {String}\n\t\t * @static\n\t\t */\n\t    Tone.version = 'r12';\n\t    return Tone;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Emitter gives classes which extend it\n\t\t *         the ability to listen for and emit events.\n\t\t *         Inspiration and reference from Jerome Etienne's [MicroEvent](https://github.com/jeromeetienne/microevent.js).\n\t\t *         MIT (c) 2011 Jerome Etienne.\n\t\t *\n\t\t *  @extends {Tone}\n\t\t */\n\t    Tone.Emitter = function () {\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  Contains all of the events.\n\t\t\t *  @private\n\t\t\t *  @type  {Object}\n\t\t\t */\n\t        this._events = {};\n\t    };\n\t    Tone.extend(Tone.Emitter);\n\t    /**\n\t\t *  Bind a callback to a specific event.\n\t\t *  @param  {String}    event     The name of the event to listen for.\n\t\t *  @param  {Function}  callback  The callback to invoke when the\n\t\t *                                event is emitted\n\t\t *  @return  {Tone.Emitter}    this\n\t\t */\n\t    Tone.Emitter.prototype.on = function (event, callback) {\n\t        //split the event\n\t        var events = event.split(/\\W+/);\n\t        for (var i = 0; i < events.length; i++) {\n\t            var eventName = events[i];\n\t            if (!this._events.hasOwnProperty(eventName)) {\n\t                this._events[eventName] = [];\n\t            }\n\t            this._events[eventName].push(callback);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Bind a callback which is only invoked once\n\t\t *  @param  {String}    event     The name of the event to listen for.\n\t\t *  @param  {Function}  callback  The callback to invoke when the\n\t\t *                                event is emitted\n\t\t *  @return  {Tone.Emitter}    this\n\t\t */\n\t    Tone.Emitter.prototype.once = function (event, callback) {\n\t        var boundCallback = function () {\n\t            //invoke the callback\n\t            callback.apply(this, arguments);\n\t            this.off(event, boundCallback);\n\t        }.bind(this);\n\t        this.on(event, boundCallback);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Remove the event listener.\n\t\t *  @param  {String}    event     The event to stop listening to.\n\t\t *  @param  {Function=}  callback  The callback which was bound to\n\t\t *                                the event with Tone.Emitter.on.\n\t\t *                                If no callback is given, all callbacks\n\t\t *                                events are removed.\n\t\t *  @return  {Tone.Emitter}    this\n\t\t */\n\t    Tone.Emitter.prototype.off = function (event, callback) {\n\t        var events = event.split(/\\W+/);\n\t        for (var ev = 0; ev < events.length; ev++) {\n\t            event = events[ev];\n\t            if (this._events.hasOwnProperty(event)) {\n\t                if (Tone.isUndef(callback)) {\n\t                    this._events[event] = [];\n\t                } else {\n\t                    var eventList = this._events[event];\n\t                    for (var i = 0; i < eventList.length; i++) {\n\t                        if (eventList[i] === callback) {\n\t                            eventList.splice(i, 1);\n\t                        }\n\t                    }\n\t                }\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Invoke all of the callbacks bound to the event\n\t\t *  with any arguments passed in.\n\t\t *  @param  {String}  event  The name of the event.\n\t\t *  @param {*} args... The arguments to pass to the functions listening.\n\t\t *  @return  {Tone.Emitter}  this\n\t\t */\n\t    Tone.Emitter.prototype.emit = function (event) {\n\t        if (this._events) {\n\t            var args = Array.apply(null, arguments).slice(1);\n\t            if (this._events.hasOwnProperty(event)) {\n\t                var eventList = this._events[event].slice(0);\n\t                for (var i = 0, len = eventList.length; i < len; i++) {\n\t                    eventList[i].apply(this, args);\n\t                }\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Add Emitter functions (on/off/emit) to the object\n\t\t *  @param  {Object|Function}  object  The object or class to extend.\n\t\t *  @returns {Tone.Emitter}\n\t\t */\n\t    Tone.Emitter.mixin = function (object) {\n\t        var functions = [\n\t            'on',\n\t            'once',\n\t            'off',\n\t            'emit'\n\t        ];\n\t        object._events = {};\n\t        for (var i = 0; i < functions.length; i++) {\n\t            var func = functions[i];\n\t            var emitterFunc = Tone.Emitter.prototype[func];\n\t            object[func] = emitterFunc;\n\t        }\n\t        return Tone.Emitter;\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.Emitter}  this\n\t\t */\n\t    Tone.Emitter.prototype.dispose = function () {\n\t        Tone.prototype.dispose.call(this);\n\t        this._events = null;\n\t        return this;\n\t    };\n\t    return Tone.Emitter;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class A Timeline class for scheduling and maintaining state\n\t\t *         along a timeline. All events must have a \"time\" property.\n\t\t *         Internally, events are stored in time order for fast\n\t\t *         retrieval.\n\t\t *  @extends {Tone}\n\t\t *  @param {Positive} [memory=Infinity] The number of previous events that are retained.\n\t\t */\n\t    Tone.Timeline = function () {\n\t        var options = Tone.defaults(arguments, ['memory'], Tone.Timeline);\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  The array of scheduled timeline events\n\t\t\t *  @type  {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._timeline = [];\n\t        /**\n\t\t\t *  The memory of the timeline, i.e.\n\t\t\t *  how many events in the past it will retain\n\t\t\t *  @type {Positive}\n\t\t\t */\n\t        this.memory = options.memory;\n\t    };\n\t    Tone.extend(Tone.Timeline);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @static\n\t\t *  @const\n\t\t */\n\t    Tone.Timeline.defaults = { 'memory': Infinity };\n\t    /**\n\t\t *  The number of items in the timeline.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Timeline#\n\t\t *  @name length\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Timeline.prototype, 'length', {\n\t        get: function () {\n\t            return this._timeline.length;\n\t        }\n\t    });\n\t    /**\n\t\t *  Insert an event object onto the timeline. Events must have a \"time\" attribute.\n\t\t *  @param  {Object}  event  The event object to insert into the\n\t\t *                           timeline.\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.add = function (event) {\n\t        //the event needs to have a time attribute\n\t        if (Tone.isUndef(event.time)) {\n\t            throw new Error('Tone.Timeline: events must have a time attribute');\n\t        }\n\t        event.time = event.time.valueOf();\n\t        var index = this._search(event.time);\n\t        this._timeline.splice(index + 1, 0, event);\n\t        //if the length is more than the memory, remove the previous ones\n\t        if (this.length > this.memory) {\n\t            var diff = this.length - this.memory;\n\t            this._timeline.splice(0, diff);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Remove an event from the timeline.\n\t\t *  @param  {Object}  event  The event object to remove from the list.\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.remove = function (event) {\n\t        var index = this._timeline.indexOf(event);\n\t        if (index !== -1) {\n\t            this._timeline.splice(index, 1);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Get the nearest event whose time is less than or equal to the given time.\n\t\t *  @param  {Number}  time  The time to query.\n\t\t *  @param  {String}  comparator Which value in the object to compare\n\t\t *  @returns {Object} The event object set after that time.\n\t\t */\n\t    Tone.Timeline.prototype.get = function (time, comparator) {\n\t        comparator = Tone.defaultArg(comparator, 'time');\n\t        var index = this._search(time, comparator);\n\t        if (index !== -1) {\n\t            return this._timeline[index];\n\t        } else {\n\t            return null;\n\t        }\n\t    };\n\t    /**\n\t\t *  Return the first event in the timeline without removing it\n\t\t *  @returns {Object} The first event object\n\t\t */\n\t    Tone.Timeline.prototype.peek = function () {\n\t        return this._timeline[0];\n\t    };\n\t    /**\n\t\t *  Return the first event in the timeline and remove it\n\t\t *  @returns {Object} The first event object\n\t\t */\n\t    Tone.Timeline.prototype.shift = function () {\n\t        return this._timeline.shift();\n\t    };\n\t    /**\n\t\t *  Get the event which is scheduled after the given time.\n\t\t *  @param  {Number}  time  The time to query.\n\t\t *  @param  {String}  comparator Which value in the object to compare\n\t\t *  @returns {Object} The event object after the given time\n\t\t */\n\t    Tone.Timeline.prototype.getAfter = function (time, comparator) {\n\t        comparator = Tone.defaultArg(comparator, 'time');\n\t        var index = this._search(time, comparator);\n\t        if (index + 1 < this._timeline.length) {\n\t            return this._timeline[index + 1];\n\t        } else {\n\t            return null;\n\t        }\n\t    };\n\t    /**\n\t\t *  Get the event before the event at the given time.\n\t\t *  @param  {Number}  time  The time to query.\n\t\t *  @param  {String}  comparator Which value in the object to compare\n\t\t *  @returns {Object} The event object before the given time\n\t\t */\n\t    Tone.Timeline.prototype.getBefore = function (time, comparator) {\n\t        comparator = Tone.defaultArg(comparator, 'time');\n\t        var len = this._timeline.length;\n\t        //if it's after the last item, return the last item\n\t        if (len > 0 && this._timeline[len - 1][comparator] < time) {\n\t            return this._timeline[len - 1];\n\t        }\n\t        var index = this._search(time, comparator);\n\t        if (index - 1 >= 0) {\n\t            return this._timeline[index - 1];\n\t        } else {\n\t            return null;\n\t        }\n\t    };\n\t    /**\n\t\t *  Cancel events after the given time\n\t\t *  @param  {Number}  time  The time to query.\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.cancel = function (after) {\n\t        if (this._timeline.length > 1) {\n\t            var index = this._search(after);\n\t            if (index >= 0) {\n\t                if (this._timeline[index].time === after) {\n\t                    //get the first item with that time\n\t                    for (var i = index; i >= 0; i--) {\n\t                        if (this._timeline[i].time === after) {\n\t                            index = i;\n\t                        } else {\n\t                            break;\n\t                        }\n\t                    }\n\t                    this._timeline = this._timeline.slice(0, index);\n\t                } else {\n\t                    this._timeline = this._timeline.slice(0, index + 1);\n\t                }\n\t            } else {\n\t                this._timeline = [];\n\t            }\n\t        } else if (this._timeline.length === 1) {\n\t            //the first item's time\n\t            if (this._timeline[0].time >= after) {\n\t                this._timeline = [];\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancel events before or equal to the given time.\n\t\t *  @param  {Number}  time  The time to cancel before.\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.cancelBefore = function (time) {\n\t        var index = this._search(time);\n\t        if (index >= 0) {\n\t            this._timeline = this._timeline.slice(index + 1);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * Returns the previous event if there is one. null otherwise\n\t\t * @param  {Object} event The event to find the previous one of\n\t\t * @return {Object}       The event right before the given event\n\t\t */\n\t    Tone.Timeline.prototype.previousEvent = function (event) {\n\t        var index = this._timeline.indexOf(event);\n\t        if (index > 0) {\n\t            return this._timeline[index - 1];\n\t        } else {\n\t            return null;\n\t        }\n\t    };\n\t    /**\n\t\t *  Does a binary search on the timeline array and returns the\n\t\t *  nearest event index whose time is after or equal to the given time.\n\t\t *  If a time is searched before the first index in the timeline, -1 is returned.\n\t\t *  If the time is after the end, the index of the last item is returned.\n\t\t *  @param  {Number}  time\n\t\t *  @param  {String}  comparator Which value in the object to compare\n\t\t *  @return  {Number} the index in the timeline array\n\t\t *  @private\n\t\t */\n\t    Tone.Timeline.prototype._search = function (time, comparator) {\n\t        if (this._timeline.length === 0) {\n\t            return -1;\n\t        }\n\t        comparator = Tone.defaultArg(comparator, 'time');\n\t        var beginning = 0;\n\t        var len = this._timeline.length;\n\t        var end = len;\n\t        if (len > 0 && this._timeline[len - 1][comparator] <= time) {\n\t            return len - 1;\n\t        }\n\t        while (beginning < end) {\n\t            // calculate the midpoint for roughly equal partition\n\t            var midPoint = Math.floor(beginning + (end - beginning) / 2);\n\t            var event = this._timeline[midPoint];\n\t            var nextEvent = this._timeline[midPoint + 1];\n\t            if (event[comparator] === time) {\n\t                //choose the last one that has the same time\n\t                for (var i = midPoint; i < this._timeline.length; i++) {\n\t                    var testEvent = this._timeline[i];\n\t                    if (testEvent[comparator] === time) {\n\t                        midPoint = i;\n\t                    }\n\t                }\n\t                return midPoint;\n\t            } else if (event[comparator] < time && nextEvent[comparator] > time) {\n\t                return midPoint;\n\t            } else if (event[comparator] > time) {\n\t                //search lower\n\t                end = midPoint;\n\t            } else {\n\t                //search upper\n\t                beginning = midPoint + 1;\n\t            }\n\t        }\n\t        return -1;\n\t    };\n\t    /**\n\t\t *  Internal iterator. Applies extra safety checks for\n\t\t *  removing items from the array.\n\t\t *  @param  {Function}  callback\n\t\t *  @param  {Number=}    lowerBound\n\t\t *  @param  {Number=}    upperBound\n\t\t *  @private\n\t\t */\n\t    Tone.Timeline.prototype._iterate = function (callback, lowerBound, upperBound) {\n\t        lowerBound = Tone.defaultArg(lowerBound, 0);\n\t        upperBound = Tone.defaultArg(upperBound, this._timeline.length - 1);\n\t        this._timeline.slice(lowerBound, upperBound + 1).forEach(function (event) {\n\t            callback.call(this, event);\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t *  Iterate over everything in the array\n\t\t *  @param  {Function}  callback The callback to invoke with every item\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.forEach = function (callback) {\n\t        this._iterate(callback);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Iterate over everything in the array at or before the given time.\n\t\t *  @param  {Number}  time The time to check if items are before\n\t\t *  @param  {Function}  callback The callback to invoke with every item\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.forEachBefore = function (time, callback) {\n\t        //iterate over the items in reverse so that removing an item doesn't break things\n\t        var upperBound = this._search(time);\n\t        if (upperBound !== -1) {\n\t            this._iterate(callback, 0, upperBound);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Iterate over everything in the array after the given time.\n\t\t *  @param  {Number}  time The time to check if items are before\n\t\t *  @param  {Function}  callback The callback to invoke with every item\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.forEachAfter = function (time, callback) {\n\t        //iterate over the items in reverse so that removing an item doesn't break things\n\t        var lowerBound = this._search(time);\n\t        this._iterate(callback, lowerBound + 1);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Iterate over everything in the array between the startTime and endTime. \n\t\t *  The timerange is inclusive of the startTime, but exclusive of the endTime. \n\t\t *  range = [startTime, endTime). \n\t\t *  @param  {Number}  startTime The time to check if items are before\n\t\t *  @param  {Number}  endTime The end of the test interval. \n\t\t *  @param  {Function}  callback The callback to invoke with every item\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.forEachBetween = function (startTime, endTime, callback) {\n\t        var lowerBound = this._search(startTime);\n\t        var upperBound = this._search(endTime);\n\t        if (lowerBound !== -1 && upperBound !== -1) {\n\t            if (this._timeline[lowerBound].time !== startTime) {\n\t                lowerBound += 1;\n\t            }\n\t            //exclusive of the end time\n\t            if (this._timeline[upperBound].time === endTime) {\n\t                upperBound -= 1;\n\t            }\n\t            this._iterate(callback, lowerBound, upperBound);\n\t        } else if (lowerBound === -1) {\n\t            this._iterate(callback, 0, upperBound);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Iterate over everything in the array at or after the given time. Similar to\n\t\t *  forEachAfter, but includes the item(s) at the given time.\n\t\t *  @param  {Number}  time The time to check if items are before\n\t\t *  @param  {Function}  callback The callback to invoke with every item\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.forEachFrom = function (time, callback) {\n\t        //iterate over the items in reverse so that removing an item doesn't break things\n\t        var lowerBound = this._search(time);\n\t        //work backwards until the event time is less than time\n\t        while (lowerBound >= 0 && this._timeline[lowerBound].time >= time) {\n\t            lowerBound--;\n\t        }\n\t        this._iterate(callback, lowerBound + 1);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Iterate over everything in the array at the given time\n\t\t *  @param  {Number}  time The time to check if items are before\n\t\t *  @param  {Function}  callback The callback to invoke with every item\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.forEachAtTime = function (time, callback) {\n\t        //iterate over the items in reverse so that removing an item doesn't break things\n\t        var upperBound = this._search(time);\n\t        if (upperBound !== -1) {\n\t            this._iterate(function (event) {\n\t                if (event.time === time) {\n\t                    callback.call(this, event);\n\t                }\n\t            }, 0, upperBound);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.Timeline}  this\n\t\t */\n\t    Tone.Timeline.prototype.dispose = function () {\n\t        Tone.prototype.dispose.call(this);\n\t        this._timeline = null;\n\t        return this;\n\t    };\n\t    return Tone.Timeline;\n\t});\n\tModule(function (Tone) {\n\t    if (Tone.supported) {\n\t        if (!window.hasOwnProperty('OfflineAudioContext') && window.hasOwnProperty('webkitOfflineAudioContext')) {\n\t            window.OfflineAudioContext = window.webkitOfflineAudioContext;\n\t        }\n\t        //returns promise?\n\t        var context = new OfflineAudioContext(1, 1, 44100);\n\t        var ret = context.startRendering();\n\t        if (!(ret instanceof Promise)) {\n\t            OfflineAudioContext.prototype._native_startRendering = OfflineAudioContext.prototype.startRendering;\n\t            OfflineAudioContext.prototype.startRendering = function () {\n\t                return new Promise(function (done) {\n\t                    this.oncomplete = function (e) {\n\t                        done(e.renderedBuffer);\n\t                    };\n\t                    this._native_startRendering();\n\t                }.bind(this));\n\t            };\n\t        }\n\t    }\n\t});\n\tModule(function (Tone) {\n\t    if (Tone.supported) {\n\t        if (!window.hasOwnProperty('AudioContext') && window.hasOwnProperty('webkitAudioContext')) {\n\t            window.AudioContext = window.webkitAudioContext;\n\t        }\n\t        //not functionally equivalent, but only an API placeholder\n\t        if (!AudioContext.prototype.close) {\n\t            AudioContext.prototype.close = function () {\n\t                if (Tone.isFunction(this.suspend)) {\n\t                    this.suspend();\n\t                }\n\t                return Promise.resolve();\n\t            };\n\t        }\n\t        //not functionally equivalent\n\t        if (!AudioContext.prototype.resume) {\n\t            AudioContext.prototype.resume = function () {\n\t                return Promise.resolve();\n\t            };\n\t        }\n\t        //createGain\n\t        if (!AudioContext.prototype.createGain && AudioContext.prototype.createGainNode) {\n\t            AudioContext.prototype.createGain = AudioContext.prototype.createGainNode;\n\t        }\n\t        //createDelay\n\t        if (!AudioContext.prototype.createDelay && AudioContext.prototype.createDelayNode) {\n\t            AudioContext.prototype.createDelay = AudioContext.prototype.createDelayNode;\n\t        }\n\t        //test decodeAudioData returns a promise\n\t        // https://github.com/mohayonao/web-audio-api-shim/blob/master/src/AudioContext.js\n\t        // MIT License (c) 2015 @mohayonao\n\t        var decodeAudioDataPromise = false;\n\t        var offlineContext = new OfflineAudioContext(1, 1, 44100);\n\t        var audioData = new Uint32Array([\n\t            1179011410,\n\t            48,\n\t            1163280727,\n\t            544501094,\n\t            16,\n\t            131073,\n\t            44100,\n\t            176400,\n\t            1048580,\n\t            1635017060,\n\t            8,\n\t            0,\n\t            0,\n\t            0,\n\t            0\n\t        ]).buffer;\n\t        try {\n\t            var ret = offlineContext.decodeAudioData(audioData);\n\t            if (ret instanceof Promise) {\n\t                decodeAudioDataPromise = true;\n\t            }\n\t        } catch (e) {\n\t            decodeAudioDataPromise = false;\n\t        }\n\t        if (!decodeAudioDataPromise) {\n\t            AudioContext.prototype._native_decodeAudioData = AudioContext.prototype.decodeAudioData;\n\t            AudioContext.prototype.decodeAudioData = function (audioData) {\n\t                return new Promise(function (success, error) {\n\t                    this._native_decodeAudioData(audioData, success, error);\n\t                }.bind(this));\n\t            };\n\t        }\n\t    }\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Wrapper around the native AudioContext.\n\t\t *  @extends {Tone.Emitter}\n\t\t *  @param {AudioContext=} context optionally pass in a context\n\t\t */\n\t    Tone.Context = function () {\n\t        Tone.Emitter.call(this);\n\t        var options = Tone.defaults(arguments, ['context'], Tone.Context);\n\t        if (!options.context) {\n\t            options.context = new window.AudioContext();\n\t            if (!options.context) {\n\t                throw new Error('could not create AudioContext. Possibly too many AudioContexts running already.');\n\t            }\n\t        }\n\t        this._context = options.context;\n\t        // extend all of the methods\n\t        for (var prop in this._context) {\n\t            this._defineProperty(this._context, prop);\n\t        }\n\t        /**\n\t\t\t *  The default latency hint\n\t\t\t *  @type  {String}\n\t\t\t *  @private\n\t\t\t */\n\t        this._latencyHint = options.latencyHint;\n\t        /**\n\t\t\t *  An object containing all of the constants AudioBufferSourceNodes\n\t\t\t *  @type  {Object}\n\t\t\t *  @private\n\t\t\t */\n\t        this._constants = {};\n\t        ///////////////////////////////////////////////////////////////////////\n\t        // WORKER\n\t        ///////////////////////////////////////////////////////////////////////\n\t        /**\n\t\t\t *  The amount of time events are scheduled\n\t\t\t *  into the future\n\t\t\t *  @type  {Number}\n\t\t\t */\n\t        this.lookAhead = options.lookAhead;\n\t        /**\n\t\t\t *  A reference to the actual computed update interval\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._computedUpdateInterval = 0;\n\t        /**\n\t\t\t *  A reliable callback method\n\t\t\t *  @private\n\t\t\t *  @type  {Ticker}\n\t\t\t */\n\t        this._ticker = new Ticker(this.emit.bind(this, 'tick'), options.clockSource, options.updateInterval);\n\t        ///////////////////////////////////////////////////////////////////////\n\t        // TIMEOUTS\n\t        ///////////////////////////////////////////////////////////////////////\n\t        /**\n\t\t\t *  All of the setTimeout events.\n\t\t\t *  @type  {Tone.Timeline}\n\t\t\t *  @private\n\t\t\t */\n\t        this._timeouts = new Tone.Timeline();\n\t        /**\n\t\t\t *  The timeout id counter\n\t\t\t *  @private\n\t\t\t *  @type {Number}\n\t\t\t */\n\t        this._timeoutIds = 0;\n\t        this.on('tick', this._timeoutLoop.bind(this));\n\t    };\n\t    Tone.extend(Tone.Context, Tone.Emitter);\n\t    Tone.Emitter.mixin(Tone.Context);\n\t    /**\n\t\t * defaults\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t    Tone.Context.defaults = {\n\t        'clockSource': 'worker',\n\t        'latencyHint': 'interactive',\n\t        'lookAhead': 0.1,\n\t        'updateInterval': 0.03\n\t    };\n\t    /**\n\t\t *  Define a property on this Tone.Context.\n\t\t *  This is used to extend the native AudioContext\n\t\t *  @param  {AudioContext}  context\n\t\t *  @param  {String}  prop\n\t\t *  @private\n\t\t */\n\t    Tone.Context.prototype._defineProperty = function (context, prop) {\n\t        if (Tone.isUndef(this[prop])) {\n\t            Object.defineProperty(this, prop, {\n\t                get: function () {\n\t                    if (typeof context[prop] === 'function') {\n\t                        return context[prop].bind(context);\n\t                    } else {\n\t                        return context[prop];\n\t                    }\n\t                },\n\t                set: function (val) {\n\t                    context[prop] = val;\n\t                }\n\t            });\n\t        }\n\t    };\n\t    /**\n\t\t *  The current audio context time\n\t\t *  @return  {Number}\n\t\t */\n\t    Tone.Context.prototype.now = function () {\n\t        return this._context.currentTime + this.lookAhead;\n\t    };\n\t    /**\n\t\t *  Promise which is invoked when the context is running.\n\t\t *  Tries to resume the context if it's not started.\n\t\t *  @return  {Promise}\n\t\t */\n\t    Tone.Context.prototype.ready = function () {\n\t        return new Promise(function (done) {\n\t            if (this._context.state === 'running') {\n\t                done();\n\t            } else {\n\t                this._context.resume().then(function () {\n\t                    done();\n\t                });\n\t            }\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t *  Promise which is invoked when the context is running.\n\t\t *  Tries to resume the context if it's not started.\n\t\t *  @return  {Promise}\n\t\t */\n\t    Tone.Context.prototype.close = function () {\n\t        return this._context.close().then(function () {\n\t            Tone.Context.emit('close', this);\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t *  Generate a looped buffer at some constant value.\n\t\t *  @param  {Number}  val\n\t\t *  @return  {BufferSourceNode}\n\t\t */\n\t    Tone.Context.prototype.getConstant = function (val) {\n\t        if (this._constants[val]) {\n\t            return this._constants[val];\n\t        } else {\n\t            var buffer = this._context.createBuffer(1, 128, this._context.sampleRate);\n\t            var arr = buffer.getChannelData(0);\n\t            for (var i = 0; i < arr.length; i++) {\n\t                arr[i] = val;\n\t            }\n\t            var constant = this._context.createBufferSource();\n\t            constant.channelCount = 1;\n\t            constant.channelCountMode = 'explicit';\n\t            constant.buffer = buffer;\n\t            constant.loop = true;\n\t            constant.start(0);\n\t            this._constants[val] = constant;\n\t            return constant;\n\t        }\n\t    };\n\t    /**\n\t\t *  The private loop which keeps track of the context scheduled timeouts\n\t\t *  Is invoked from the clock source\n\t\t *  @private\n\t\t */\n\t    Tone.Context.prototype._timeoutLoop = function () {\n\t        var now = this.now();\n\t        while (this._timeouts && this._timeouts.length && this._timeouts.peek().time <= now) {\n\t            this._timeouts.shift().callback();\n\t        }\n\t    };\n\t    /**\n\t\t *  A setTimeout which is gaurenteed by the clock source.\n\t\t *  Also runs in the offline context.\n\t\t *  @param  {Function}  fn       The callback to invoke\n\t\t *  @param  {Seconds}    timeout  The timeout in seconds\n\t\t *  @returns {Number} ID to use when invoking Tone.Context.clearTimeout\n\t\t */\n\t    Tone.Context.prototype.setTimeout = function (fn, timeout) {\n\t        this._timeoutIds++;\n\t        var now = this.now();\n\t        this._timeouts.add({\n\t            callback: fn,\n\t            time: now + timeout,\n\t            id: this._timeoutIds\n\t        });\n\t        return this._timeoutIds;\n\t    };\n\t    /**\n\t\t *  Clears a previously scheduled timeout with Tone.context.setTimeout\n\t\t *  @param  {Number}  id  The ID returned from setTimeout\n\t\t *  @return  {Tone.Context}  this\n\t\t */\n\t    Tone.Context.prototype.clearTimeout = function (id) {\n\t        this._timeouts.forEach(function (event) {\n\t            if (event.id === id) {\n\t                this.remove(event);\n\t            }\n\t        });\n\t        return this;\n\t    };\n\t    /**\n\t\t *  How often the Web Worker callback is invoked.\n\t\t *  This number corresponds to how responsive the scheduling\n\t\t *  can be. Context.updateInterval + Context.lookAhead gives you the\n\t\t *  total latency between scheduling an event and hearing it.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Context#\n\t\t *  @name updateInterval\n\t\t */\n\t    Object.defineProperty(Tone.Context.prototype, 'updateInterval', {\n\t        get: function () {\n\t            return this._ticker.updateInterval;\n\t        },\n\t        set: function (interval) {\n\t            this._ticker.updateInterval = interval;\n\t        }\n\t    });\n\t    /**\n\t\t *  What the source of the clock is, either \"worker\" (Web Worker [default]),\n\t\t *  \"timeout\" (setTimeout), or \"offline\" (none).\n\t\t *  @type {String}\n\t\t *  @memberOf Tone.Context#\n\t\t *  @name clockSource\n\t\t */\n\t    Object.defineProperty(Tone.Context.prototype, 'clockSource', {\n\t        get: function () {\n\t            return this._ticker.type;\n\t        },\n\t        set: function (type) {\n\t            this._ticker.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t *  The type of playback, which affects tradeoffs between audio\n\t\t *  output latency and responsiveness.\n\t\t *\n\t\t *  In addition to setting the value in seconds, the latencyHint also\n\t\t *  accepts the strings \"interactive\" (prioritizes low latency),\n\t\t *  \"playback\" (prioritizes sustained playback), \"balanced\" (balances\n\t\t *  latency and performance), and \"fastest\" (lowest latency, might glitch more often).\n\t\t *  @type {String|Seconds}\n\t\t *  @memberOf Tone.Context#\n\t\t *  @name latencyHint\n\t\t *  @example\n\t\t * //set the lookAhead to 0.3 seconds\n\t\t * Tone.context.latencyHint = 0.3;\n\t\t */\n\t    Object.defineProperty(Tone.Context.prototype, 'latencyHint', {\n\t        get: function () {\n\t            return this._latencyHint;\n\t        },\n\t        set: function (hint) {\n\t            var lookAhead = hint;\n\t            this._latencyHint = hint;\n\t            if (Tone.isString(hint)) {\n\t                switch (hint) {\n\t                case 'interactive':\n\t                    lookAhead = 0.1;\n\t                    this._context.latencyHint = hint;\n\t                    break;\n\t                case 'playback':\n\t                    lookAhead = 0.8;\n\t                    this._context.latencyHint = hint;\n\t                    break;\n\t                case 'balanced':\n\t                    lookAhead = 0.25;\n\t                    this._context.latencyHint = hint;\n\t                    break;\n\t                case 'fastest':\n\t                    this._context.latencyHint = 'interactive';\n\t                    lookAhead = 0.01;\n\t                    break;\n\t                }\n\t            }\n\t            this.lookAhead = lookAhead;\n\t            this.updateInterval = lookAhead / 3;\n\t        }\n\t    });\n\t    /**\n\t\t *  Unlike other dispose methods, this returns a Promise\n\t\t *  which executes when the context is closed and disposed\n\t\t *  @returns {Promise} this\n\t\t */\n\t    Tone.Context.prototype.dispose = function () {\n\t        return this.close().then(function () {\n\t            Tone.Emitter.prototype.dispose.call(this);\n\t            this._ticker.dispose();\n\t            this._ticker = null;\n\t            this._timeouts.dispose();\n\t            this._timeouts = null;\n\t            for (var con in this._constants) {\n\t                this._constants[con].disconnect();\n\t            }\n\t            this._constants = null;\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t * @class A class which provides a reliable callback using either\n\t\t *        a Web Worker, or if that isn't supported, falls back to setTimeout.\n\t\t * @private\n\t\t */\n\t    var Ticker = function (callback, type, updateInterval) {\n\t        /**\n\t\t\t * Either \"worker\" or \"timeout\"\n\t\t\t * @type {String}\n\t\t\t * @private\n\t\t\t */\n\t        this._type = type;\n\t        /**\n\t\t\t * The update interval of the worker\n\t\t\t * @private\n\t\t\t * @type {Number}\n\t\t\t */\n\t        this._updateInterval = updateInterval;\n\t        /**\n\t\t\t * The callback to invoke at regular intervals\n\t\t\t * @type {Function}\n\t\t\t * @private\n\t\t\t */\n\t        this._callback = Tone.defaultArg(callback, Tone.noOp);\n\t        //create the clock source for the first time\n\t        this._createClock();\n\t    };\n\t    /**\n\t\t * The possible ticker types\n\t\t * @private\n\t\t * @type {Object}\n\t\t */\n\t    Ticker.Type = {\n\t        Worker: 'worker',\n\t        Timeout: 'timeout',\n\t        Offline: 'offline'\n\t    };\n\t    /**\n\t\t *  Generate a web worker\n\t\t *  @return  {WebWorker}\n\t\t *  @private\n\t\t */\n\t    Ticker.prototype._createWorker = function () {\n\t        //URL Shim\n\t        window.URL = window.URL || window.webkitURL;\n\t        var blob = new Blob([//the initial timeout time\n\t            'var timeoutTime = ' + (this._updateInterval * 1000).toFixed(1) + ';' + //onmessage callback\n\t            'self.onmessage = function(msg){' + '\\ttimeoutTime = parseInt(msg.data);' + '};' + //the tick function which posts a message\n\t            //and schedules a new tick\n\t            'function tick(){' + '\\tsetTimeout(tick, timeoutTime);' + '\\tself.postMessage(\\'tick\\');' + '}' + //call tick initially\n\t            'tick();']);\n\t        var blobUrl = URL.createObjectURL(blob);\n\t        var worker = new Worker(blobUrl);\n\t        worker.onmessage = this._callback.bind(this);\n\t        this._worker = worker;\n\t    };\n\t    /**\n\t\t * Create a timeout loop\n\t\t * @private\n\t\t */\n\t    Ticker.prototype._createTimeout = function () {\n\t        this._timeout = setTimeout(function () {\n\t            this._createTimeout();\n\t            this._callback();\n\t        }.bind(this), this._updateInterval * 1000);\n\t    };\n\t    /**\n\t\t * Create the clock source.\n\t\t * @private\n\t\t */\n\t    Ticker.prototype._createClock = function () {\n\t        if (this._type === Ticker.Type.Worker) {\n\t            try {\n\t                this._createWorker();\n\t            } catch (e) {\n\t                // workers not supported, fallback to timeout\n\t                this._type = Ticker.Type.Timeout;\n\t                this._createClock();\n\t            }\n\t        } else if (this._type === Ticker.Type.Timeout) {\n\t            this._createTimeout();\n\t        }\n\t    };\n\t    /**\n\t\t * @memberOf Ticker#\n\t\t * @type {Number}\n\t\t * @name updateInterval\n\t\t * @private\n\t\t */\n\t    Object.defineProperty(Ticker.prototype, 'updateInterval', {\n\t        get: function () {\n\t            return this._updateInterval;\n\t        },\n\t        set: function (interval) {\n\t            this._updateInterval = Math.max(interval, 128 / 44100);\n\t            if (this._type === Ticker.Type.Worker) {\n\t                this._worker.postMessage(Math.max(interval * 1000, 1));\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The type of the ticker, either a worker or a timeout\n\t\t * @memberOf Ticker#\n\t\t * @type {Number}\n\t\t * @name type\n\t\t * @private\n\t\t */\n\t    Object.defineProperty(Ticker.prototype, 'type', {\n\t        get: function () {\n\t            return this._type;\n\t        },\n\t        set: function (type) {\n\t            this._disposeClock();\n\t            this._type = type;\n\t            this._createClock();\n\t        }\n\t    });\n\t    /**\n\t\t * Clean up the current clock source\n\t\t * @private\n\t\t */\n\t    Ticker.prototype._disposeClock = function () {\n\t        if (this._timeout) {\n\t            clearTimeout(this._timeout);\n\t            this._timeout = null;\n\t        }\n\t        if (this._worker) {\n\t            this._worker.terminate();\n\t            this._worker.onmessage = null;\n\t            this._worker = null;\n\t        }\n\t    };\n\t    /**\n\t\t * Clean up\n\t\t * @private\n\t\t */\n\t    Ticker.prototype.dispose = function () {\n\t        this._disposeClock();\n\t        this._callback = null;\n\t    };\n\t    /**\n\t\t *  Shim all connect/disconnect and some deprecated methods which are still in\n\t\t *  some older implementations.\n\t\t *  @private\n\t\t */\n\t    Tone.getContext(function () {\n\t        var nativeConnect = AudioNode.prototype.connect;\n\t        var nativeDisconnect = AudioNode.prototype.disconnect;\n\t        //replace the old connect method\n\t        function toneConnect(B, outNum, inNum) {\n\t            if (B.input) {\n\t                inNum = Tone.defaultArg(inNum, 0);\n\t                if (Tone.isArray(B.input)) {\n\t                    return this.connect(B.input[inNum]);\n\t                } else {\n\t                    return this.connect(B.input, outNum, inNum);\n\t                }\n\t            } else {\n\t                try {\n\t                    if (B instanceof AudioNode) {\n\t                        nativeConnect.call(this, B, outNum, inNum);\n\t                        return B;\n\t                    } else {\n\t                        nativeConnect.call(this, B, outNum);\n\t                        return B;\n\t                    }\n\t                } catch (e) {\n\t                    throw new Error('error connecting to node: ' + B + '\\n' + e);\n\t                }\n\t            }\n\t        }\n\t        //replace the old disconnect method\n\t        function toneDisconnect(B, outNum, inNum) {\n\t            if (B && B.input && Tone.isArray(B.input)) {\n\t                inNum = Tone.defaultArg(inNum, 0);\n\t                this.disconnect(B.input[inNum], outNum, 0);\n\t            } else if (B && B.input) {\n\t                this.disconnect(B.input, outNum, inNum);\n\t            } else {\n\t                try {\n\t                    nativeDisconnect.apply(this, arguments);\n\t                } catch (e) {\n\t                    throw new Error('error disconnecting node: ' + B + '\\n' + e);\n\t                }\n\t            }\n\t        }\n\t        if (AudioNode.prototype.connect !== toneConnect) {\n\t            AudioNode.prototype.connect = toneConnect;\n\t            AudioNode.prototype.disconnect = toneDisconnect;\n\t        }\n\t    });\n\t    // set the audio context initially, and if one is not already created\n\t    if (Tone.supported && !Tone.initialized) {\n\t        Tone.context = new Tone.Context();\n\t        // log on first initialization\n\t        // allow optional silencing of this log\n\t        if (!window.TONE_SILENCE_VERSION_LOGGING) {\n\t            // eslint-disable-next-line no-console\n\t            console.log('%c * Tone.js ' + Tone.version + ' * ', 'background: #000; color: #fff');\n\t        }\n\t    } else if (!Tone.supported) {\n\t        // eslint-disable-next-line no-console\n\t        console.warn('This browser does not support Tone.js');\n\t    }\n\t    return Tone.Context;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.AudioNode is the base class for classes which process audio.\n\t\t *         AudioNodes have inputs and outputs.\n\t\t *  @param\t{AudioContext=} context\tThe audio context to use with the class\n\t\t *  @extends {Tone}\n\t\t */\n\t    Tone.AudioNode = function () {\n\t        Tone.call(this);\n\t        //use the default context if one is not passed in\n\t        var options = Tone.defaults(arguments, ['context'], { 'context': Tone.context });\n\t        /**\n\t\t\t * The AudioContext of this instance\n\t\t\t * @private\n\t\t\t * @type {AudioContext}\n\t\t\t */\n\t        this._context = options.context;\n\t    };\n\t    Tone.extend(Tone.AudioNode);\n\t    /**\n\t\t * Get the audio context belonging to this instance.\n\t\t * @type {Tone.Context}\n\t\t * @memberOf Tone.AudioNode#\n\t\t * @name context\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.AudioNode.prototype, 'context', {\n\t        get: function () {\n\t            return this._context;\n\t        }\n\t    });\n\t    /**\n\t\t *  Create input and outputs for this object.\n\t\t *  @param  {Number}  [input=0]   The number of inputs\n\t\t *  @param  {Number}  [outputs=0]  The number of outputs\n\t\t *  @return  {Tone.AudioNode}  this\n\t\t *  @private\n\t\t */\n\t    Tone.AudioNode.prototype.createInsOuts = function (inputs, outputs) {\n\t        if (inputs === 1) {\n\t            this.input = this.context.createGain();\n\t        } else if (inputs > 1) {\n\t            this.input = new Array(inputs);\n\t        }\n\t        if (outputs === 1) {\n\t            this.output = this.context.createGain();\n\t        } else if (outputs > 1) {\n\t            this.output = new Array(outputs);\n\t        }\n\t    };\n\t    /**\n\t\t *  channelCount is the number of channels used when up-mixing and down-mixing\n\t\t *  connections to any inputs to the node. The default value is 2 except for\n\t\t *  specific nodes where its value is specially determined.\n\t\t *\n\t\t *  @memberof Tone.AudioNode#\n\t\t *  @type {Number}\n\t\t *  @name channelCount\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.AudioNode.prototype, 'channelCount', {\n\t        get: function () {\n\t            return this.output.channelCount;\n\t        },\n\t        set: function (c) {\n\t            return this.output.channelCount = c;\n\t        }\n\t    });\n\t    /**\n\t\t *  channelCountMode determines how channels will be counted when up-mixing and\n\t\t *  down-mixing connections to any inputs to the node.\n\t\t *  The default value is \"max\". This attribute has no effect for nodes with no inputs.\n\t\t *  @memberof Tone.AudioNode#\n\t\t *  @type {String}\n\t\t *  @name channelCountMode\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.AudioNode.prototype, 'channelCountMode', {\n\t        get: function () {\n\t            return this.output.channelCountMode;\n\t        },\n\t        set: function (m) {\n\t            return this.output.channelCountMode = m;\n\t        }\n\t    });\n\t    /**\n\t\t *  channelInterpretation determines how individual channels will be treated\n\t\t *  when up-mixing and down-mixing connections to any inputs to the node.\n\t\t *  The default value is \"speakers\".\n\t\t *  @memberof Tone.AudioNode#\n\t\t *  @type {String}\n\t\t *  @name channelInterpretation\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.AudioNode.prototype, 'channelInterpretation', {\n\t        get: function () {\n\t            return this.output.channelInterpretation;\n\t        },\n\t        set: function (i) {\n\t            return this.output.channelInterpretation = i;\n\t        }\n\t    });\n\t    /**\n\t\t *  The number of inputs feeding into the AudioNode.\n\t\t *  For source nodes, this will be 0.\n\t\t *  @type {Number}\n\t\t *  @name numberOfInputs\n\t\t *  @memberof Tone.AudioNode#\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.AudioNode.prototype, 'numberOfInputs', {\n\t        get: function () {\n\t            if (this.input) {\n\t                if (Tone.isArray(this.input)) {\n\t                    return this.input.length;\n\t                } else {\n\t                    return 1;\n\t                }\n\t            } else {\n\t                return 0;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  The number of outputs coming out of the AudioNode.\n\t\t *  @type {Number}\n\t\t *  @name numberOfOutputs\n\t\t *  @memberof Tone.AudioNode#\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.AudioNode.prototype, 'numberOfOutputs', {\n\t        get: function () {\n\t            if (this.output) {\n\t                if (Tone.isArray(this.output)) {\n\t                    return this.output.length;\n\t                } else {\n\t                    return 1;\n\t                }\n\t            } else {\n\t                return 0;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * Called when an audio param connects to this node\n\t\t * @private\n\t\t */\n\t    Tone.AudioNode.prototype._onConnect = function () {\n\t    };\n\t    /**\n\t\t *  connect the output of a ToneNode to an AudioParam, AudioNode, or ToneNode\n\t\t *  @param  {Tone | AudioParam | AudioNode} unit\n\t\t *  @param {number} [outputNum=0] optionally which output to connect from\n\t\t *  @param {number} [inputNum=0] optionally which input to connect to\n\t\t *  @returns {Tone.AudioNode} this\n\t\t */\n\t    Tone.AudioNode.prototype.connect = function (unit, outputNum, inputNum) {\n\t        if (unit._onConnect) {\n\t            unit._onConnect(this);\n\t        }\n\t        if (Tone.isArray(this.output)) {\n\t            outputNum = Tone.defaultArg(outputNum, 0);\n\t            this.output[outputNum].connect(unit, 0, inputNum);\n\t        } else {\n\t            this.output.connect(unit, outputNum, inputNum);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  disconnect the output\n\t\t *  @param {Number|AudioNode} output Either the output index to disconnect\n\t\t *                                   if the output is an array, or the\n\t\t *                                   node to disconnect from.\n\t\t *  @returns {Tone.AudioNode} this\n\t\t */\n\t    Tone.AudioNode.prototype.disconnect = function (destination, outputNum, inputNum) {\n\t        if (Tone.isArray(this.output)) {\n\t            if (Tone.isNumber(destination)) {\n\t                this.output[destination].disconnect();\n\t            } else {\n\t                outputNum = Tone.defaultArg(outputNum, 0);\n\t                this.output[outputNum].disconnect(destination, 0, inputNum);\n\t            }\n\t        } else {\n\t            this.output.disconnect.apply(this.output, arguments);\n\t        }\n\t    };\n\t    /**\n\t\t *  Connect the output of this node to the rest of the nodes in series.\n\t\t *  @example\n\t\t *  //connect a node to an effect, panVol and then to the master output\n\t\t *  node.chain(effect, panVol, Tone.Master);\n\t\t *  @param {...AudioParam|Tone|AudioNode} nodes\n\t\t *  @returns {Tone.AudioNode} this\n\t\t *  @private\n\t\t */\n\t    Tone.AudioNode.prototype.chain = function () {\n\t        var currentUnit = this;\n\t        for (var i = 0; i < arguments.length; i++) {\n\t            var toUnit = arguments[i];\n\t            currentUnit.connect(toUnit);\n\t            currentUnit = toUnit;\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  connect the output of this node to the rest of the nodes in parallel.\n\t\t *  @param {...AudioParam|Tone|AudioNode} nodes\n\t\t *  @returns {Tone.AudioNode} this\n\t\t *  @private\n\t\t */\n\t    Tone.AudioNode.prototype.fan = function () {\n\t        for (var i = 0; i < arguments.length; i++) {\n\t            this.connect(arguments[i]);\n\t        }\n\t        return this;\n\t    };\n\t    if (window.AudioNode) {\n\t        //give native nodes chain and fan methods\n\t        AudioNode.prototype.chain = Tone.AudioNode.prototype.chain;\n\t        AudioNode.prototype.fan = Tone.AudioNode.prototype.fan;\n\t    }\n\t    /**\n\t\t * Dispose and disconnect\n\t\t * @return {Tone.AudioNode} this\n\t\t */\n\t    Tone.AudioNode.prototype.dispose = function () {\n\t        if (Tone.isDefined(this.input)) {\n\t            if (this.input instanceof AudioNode) {\n\t                this.input.disconnect();\n\t            }\n\t            this.input = null;\n\t        }\n\t        if (Tone.isDefined(this.output)) {\n\t            if (this.output instanceof AudioNode) {\n\t                this.output.disconnect();\n\t            }\n\t            this.output = null;\n\t        }\n\t        this._context = null;\n\t        return this;\n\t    };\n\t    return Tone.AudioNode;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Base class for all Signals. Used Internally.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone}\n\t\t */\n\t    Tone.SignalBase = function () {\n\t        Tone.AudioNode.call(this);\n\t    };\n\t    Tone.extend(Tone.SignalBase, Tone.AudioNode);\n\t    /**\n\t\t *  When signals connect to other signals or AudioParams,\n\t\t *  they take over the output value of that signal or AudioParam.\n\t\t *  For all other nodes, the behavior is the same as a default <code>connect</code>.\n\t\t *\n\t\t *  @override\n\t\t *  @param {AudioParam|AudioNode|Tone.Signal|Tone} node\n\t\t *  @param {number} [outputNumber=0] The output number to connect from.\n\t\t *  @param {number} [inputNumber=0] The input number to connect to.\n\t\t *  @returns {Tone.SignalBase} this\n\t\t */\n\t    Tone.SignalBase.prototype.connect = function (node, outputNumber, inputNumber) {\n\t        //zero it out so that the signal can have full control\n\t        if (Tone.Signal && Tone.Signal === node.constructor || Tone.Param && Tone.Param === node.constructor) {\n\t            //cancel changes\n\t            node._param.cancelScheduledValues(0);\n\t            //reset the value\n\t            node._param.value = 0;\n\t            //mark the value as overridden\n\t            node.overridden = true;\n\t        } else if (node instanceof AudioParam) {\n\t            node.cancelScheduledValues(0);\n\t            node.value = 0;\n\t        }\n\t        Tone.AudioNode.prototype.connect.call(this, node, outputNumber, inputNumber);\n\t        return this;\n\t    };\n\t    return Tone.SignalBase;\n\t});\n\tModule(function (Tone) {\n\t    if (Tone.supported) {\n\t        //fixes safari only bug which is still present in 11\n\t        var ua = navigator.userAgent.toLowerCase();\n\t        var isSafari = ua.includes('safari') && !ua.includes('chrome');\n\t        if (isSafari) {\n\t            var WaveShaperNode = function (context) {\n\t                this._internalNode = this.input = this.output = context._native_createWaveShaper();\n\t                this._curve = null;\n\t                for (var prop in this._internalNode) {\n\t                    this._defineProperty(this._internalNode, prop);\n\t                }\n\t            };\n\t            Object.defineProperty(WaveShaperNode.prototype, 'curve', {\n\t                get: function () {\n\t                    return this._curve;\n\t                },\n\t                set: function (curve) {\n\t                    this._curve = curve;\n\t                    var array = new Float32Array(curve.length + 1);\n\t                    array.set(curve, 1);\n\t                    array[0] = curve[0];\n\t                    this._internalNode.curve = array;\n\t                }\n\t            });\n\t            WaveShaperNode.prototype._defineProperty = function (context, prop) {\n\t                if (Tone.isUndef(this[prop])) {\n\t                    Object.defineProperty(this, prop, {\n\t                        get: function () {\n\t                            if (typeof context[prop] === 'function') {\n\t                                return context[prop].bind(context);\n\t                            } else {\n\t                                return context[prop];\n\t                            }\n\t                        },\n\t                        set: function (val) {\n\t                            context[prop] = val;\n\t                        }\n\t                    });\n\t                }\n\t            };\n\t            AudioContext.prototype._native_createWaveShaper = AudioContext.prototype.createWaveShaper;\n\t            AudioContext.prototype.createWaveShaper = function () {\n\t                return new WaveShaperNode(this);\n\t            };\n\t        }\n\t    }\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Wraps the native Web Audio API\n\t\t *         [WaveShaperNode](http://webaudio.github.io/web-audio-api/#the-waveshapernode-interface).\n\t\t *\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @constructor\n\t\t *  @param {function|Array|Number} mapping The function used to define the values.\n\t\t *                                    The mapping function should take two arguments:\n\t\t *                                    the first is the value at the current position\n\t\t *                                    and the second is the array position.\n\t\t *                                    If the argument is an array, that array will be\n\t\t *                                    set as the wave shaping function. The input\n\t\t *                                    signal is an AudioRange [-1, 1] value and the output\n\t\t *                                    signal can take on any numerical values.\n\t\t *\n\t\t *  @param {Number} [bufferLen=1024] The length of the WaveShaperNode buffer.\n\t\t *  @example\n\t\t * var timesTwo = new Tone.WaveShaper(function(val){\n\t\t * \treturn val * 2;\n\t\t * }, 2048);\n\t\t *  @example\n\t\t * //a waveshaper can also be constructed with an array of values\n\t\t * var invert = new Tone.WaveShaper([1, -1]);\n\t\t */\n\t    Tone.WaveShaper = function (mapping, bufferLen) {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  the waveshaper\n\t\t\t *  @type {WaveShaperNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._shaper = this.input = this.output = this.context.createWaveShaper();\n\t        /**\n\t\t\t *  the waveshapers curve\n\t\t\t *  @type {Float32Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._curve = null;\n\t        if (Array.isArray(mapping)) {\n\t            this.curve = mapping;\n\t        } else if (isFinite(mapping) || Tone.isUndef(mapping)) {\n\t            this._curve = new Float32Array(Tone.defaultArg(mapping, 1024));\n\t        } else if (Tone.isFunction(mapping)) {\n\t            this._curve = new Float32Array(Tone.defaultArg(bufferLen, 1024));\n\t            this.setMap(mapping);\n\t        }\n\t    };\n\t    Tone.extend(Tone.WaveShaper, Tone.SignalBase);\n\t    /**\n\t\t *  Uses a mapping function to set the value of the curve.\n\t\t *  @param {function} mapping The function used to define the values.\n\t\t *                            The mapping function take two arguments:\n\t\t *                            the first is the value at the current position\n\t\t *                            which goes from -1 to 1 over the number of elements\n\t\t *                            in the curve array. The second argument is the array position.\n\t\t *  @returns {Tone.WaveShaper} this\n\t\t *  @example\n\t\t * //map the input signal from [-1, 1] to [0, 10]\n\t\t * shaper.setMap(function(val, index){\n\t\t * \treturn (val + 1) * 5;\n\t\t * })\n\t\t */\n\t    Tone.WaveShaper.prototype.setMap = function (mapping) {\n\t        var array = new Array(this._curve.length);\n\t        for (var i = 0, len = this._curve.length; i < len; i++) {\n\t            var normalized = i / (len - 1) * 2 - 1;\n\t            array[i] = mapping(normalized, i);\n\t        }\n\t        this.curve = array;\n\t        return this;\n\t    };\n\t    /**\n\t\t * The array to set as the waveshaper curve. For linear curves\n\t\t * array length does not make much difference, but for complex curves\n\t\t * longer arrays will provide smoother interpolation.\n\t\t * @memberOf Tone.WaveShaper#\n\t\t * @type {Array}\n\t\t * @name curve\n\t\t */\n\t    Object.defineProperty(Tone.WaveShaper.prototype, 'curve', {\n\t        get: function () {\n\t            return this._shaper.curve;\n\t        },\n\t        set: function (mapping) {\n\t            this._curve = new Float32Array(mapping);\n\t            this._shaper.curve = this._curve;\n\t        }\n\t    });\n\t    /**\n\t\t * Specifies what type of oversampling (if any) should be used when\n\t\t * applying the shaping curve. Can either be \"none\", \"2x\" or \"4x\".\n\t\t * @memberOf Tone.WaveShaper#\n\t\t * @type {string}\n\t\t * @name oversample\n\t\t */\n\t    Object.defineProperty(Tone.WaveShaper.prototype, 'oversample', {\n\t        get: function () {\n\t            return this._shaper.oversample;\n\t        },\n\t        set: function (oversampling) {\n\t            if ([\n\t                    'none',\n\t                    '2x',\n\t                    '4x'\n\t                ].includes(oversampling)) {\n\t                this._shaper.oversample = oversampling;\n\t            } else {\n\t                throw new RangeError('Tone.WaveShaper: oversampling must be either \\'none\\', \\'2x\\', or \\'4x\\'');\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.WaveShaper} this\n\t\t */\n\t    Tone.WaveShaper.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._shaper.disconnect();\n\t        this._shaper = null;\n\t        this._curve = null;\n\t        return this;\n\t    };\n\t    return Tone.WaveShaper;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.TimeBase is a flexible encoding of time\n\t\t *         which can be evaluated to and from a string.\n\t\t *  @extends {Tone}\n\t\t *  @param  {Time}  val    The time value as a number or string\n\t\t *  @param  {String=}  units  Unit values\n\t\t *  @example\n\t\t * Tone.TimeBase(4, \"n\")\n\t\t * Tone.TimeBase(2, \"t\")\n\t\t * Tone.TimeBase(\"2t\")\n\t\t * Tone.TimeBase(\"2t\") + Tone.TimeBase(\"4n\");\n\t\t */\n\t    Tone.TimeBase = function (val, units) {\n\t        //allows it to be constructed with or without 'new'\n\t        if (this instanceof Tone.TimeBase) {\n\t            /**\n\t\t\t\t *  The value\n\t\t\t\t *  @type  {Number|String|Tone.TimeBase}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._val = val;\n\t            /**\n\t\t\t\t * The units\n\t\t\t\t * @type {String?}\n\t\t\t\t * @private\n\t\t\t\t */\n\t            this._units = units;\n\t            //test if the value is a string representation of a number\n\t            if (Tone.isUndef(this._units) && Tone.isString(this._val) && // eslint-disable-next-line eqeqeq\n\t                parseFloat(this._val) == this._val && this._val.charAt(0) !== '+') {\n\t                this._val = parseFloat(this._val);\n\t                this._units = this._defaultUnits;\n\t            } else if (val && val.constructor === this.constructor) {\n\t                //if they're the same type, just copy values over\n\t                this._val = val._val;\n\t                this._units = val._units;\n\t            } else if (val instanceof Tone.TimeBase) {\n\t                switch (this._defaultUnits) {\n\t                case 's':\n\t                    this._val = val.toSeconds();\n\t                    break;\n\t                case 'i':\n\t                    this._val = val.toTicks();\n\t                    break;\n\t                case 'hz':\n\t                    this._val = val.toFrequency();\n\t                    break;\n\t                case 'midi':\n\t                    this._val = val.toMidi();\n\t                    break;\n\t                default:\n\t                    throw new Error('Unrecognized default units ' + this._defaultUnits);\n\t                }\n\t            }\n\t        } else {\n\t            return new Tone.TimeBase(val, units);\n\t        }\n\t    };\n\t    Tone.extend(Tone.TimeBase);\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tABSTRACT SYNTAX TREE PARSER\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  All the primary expressions.\n\t\t *  @private\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.TimeBase.prototype._expressions = {\n\t        'n': {\n\t            regexp: /^(\\d+)n(\\.?)$/i,\n\t            method: function (value, dot) {\n\t                value = parseInt(value);\n\t                var scalar = dot === '.' ? 1.5 : 1;\n\t                if (value === 1) {\n\t                    return this._beatsToUnits(this._getTimeSignature()) * scalar;\n\t                } else {\n\t                    return this._beatsToUnits(4 / value) * scalar;\n\t                }\n\t            }\n\t        },\n\t        't': {\n\t            regexp: /^(\\d+)t$/i,\n\t            method: function (value) {\n\t                value = parseInt(value);\n\t                return this._beatsToUnits(8 / (parseInt(value) * 3));\n\t            }\n\t        },\n\t        'm': {\n\t            regexp: /^(\\d+)m$/i,\n\t            method: function (value) {\n\t                return this._beatsToUnits(parseInt(value) * this._getTimeSignature());\n\t            }\n\t        },\n\t        'i': {\n\t            regexp: /^(\\d+)i$/i,\n\t            method: function (value) {\n\t                return this._ticksToUnits(parseInt(value));\n\t            }\n\t        },\n\t        'hz': {\n\t            regexp: /^(\\d+(?:\\.\\d+)?)hz$/i,\n\t            method: function (value) {\n\t                return this._frequencyToUnits(parseFloat(value));\n\t            }\n\t        },\n\t        'tr': {\n\t            regexp: /^(\\d+(?:\\.\\d+)?):(\\d+(?:\\.\\d+)?):?(\\d+(?:\\.\\d+)?)?$/,\n\t            method: function (m, q, s) {\n\t                var total = 0;\n\t                if (m && m !== '0') {\n\t                    total += this._beatsToUnits(this._getTimeSignature() * parseFloat(m));\n\t                }\n\t                if (q && q !== '0') {\n\t                    total += this._beatsToUnits(parseFloat(q));\n\t                }\n\t                if (s && s !== '0') {\n\t                    total += this._beatsToUnits(parseFloat(s) / 4);\n\t                }\n\t                return total;\n\t            }\n\t        },\n\t        's': {\n\t            regexp: /^(\\d+(?:\\.\\d+)?)s$/,\n\t            method: function (value) {\n\t                return this._secondsToUnits(parseFloat(value));\n\t            }\n\t        },\n\t        'samples': {\n\t            regexp: /^(\\d+)samples$/,\n\t            method: function (value) {\n\t                return parseInt(value) / this.context.sampleRate;\n\t            }\n\t        },\n\t        'default': {\n\t            regexp: /^(\\d+(?:\\.\\d+)?)$/,\n\t            method: function (value) {\n\t                return this._expressions[this._defaultUnits].method.call(this, value);\n\t            }\n\t        }\n\t    };\n\t    /**\n\t\t *  The default units if none are given.\n\t\t *  @type {String}\n\t\t *  @private\n\t\t */\n\t    Tone.TimeBase.prototype._defaultUnits = 's';\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tTRANSPORT FALLBACKS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t * Return the bpm, or 120 if Transport is not available\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t    Tone.TimeBase.prototype._getBpm = function () {\n\t        if (Tone.Transport) {\n\t            return Tone.Transport.bpm.value;\n\t        } else {\n\t            return 120;\n\t        }\n\t    };\n\t    /**\n\t\t * Return the timeSignature or 4 if Transport is not available\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t    Tone.TimeBase.prototype._getTimeSignature = function () {\n\t        if (Tone.Transport) {\n\t            return Tone.Transport.timeSignature;\n\t        } else {\n\t            return 4;\n\t        }\n\t    };\n\t    /**\n\t\t * Return the PPQ or 192 if Transport is not available\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t    Tone.TimeBase.prototype._getPPQ = function () {\n\t        if (Tone.Transport) {\n\t            return Tone.Transport.PPQ;\n\t        } else {\n\t            return 192;\n\t        }\n\t    };\n\t    /**\n\t\t * Return the current time in whichever context is relevant\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t    Tone.TimeBase.prototype._now = function () {\n\t        return this.now();\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tUNIT CONVERSIONS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Returns the value of a frequency in the current units\n\t\t *  @param {Frequency} freq\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.TimeBase.prototype._frequencyToUnits = function (freq) {\n\t        return 1 / freq;\n\t    };\n\t    /**\n\t\t *  Return the value of the beats in the current units\n\t\t *  @param {Number} beats\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.TimeBase.prototype._beatsToUnits = function (beats) {\n\t        return 60 / this._getBpm() * beats;\n\t    };\n\t    /**\n\t\t *  Returns the value of a second in the current units\n\t\t *  @param {Seconds} seconds\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.TimeBase.prototype._secondsToUnits = function (seconds) {\n\t        return seconds;\n\t    };\n\t    /**\n\t\t *  Returns the value of a tick in the current time units\n\t\t *  @param {Ticks} ticks\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.TimeBase.prototype._ticksToUnits = function (ticks) {\n\t        return ticks * (this._beatsToUnits(1) / this._getPPQ());\n\t    };\n\t    /**\n\t\t * With no arguments, return 'now'\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.TimeBase.prototype._noArg = function () {\n\t        return this._now();\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tEXPRESSIONS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Evaluate the time value. Returns the time\n\t\t *  in seconds.\n\t\t *  @return  {Seconds}\n\t\t */\n\t    Tone.TimeBase.prototype.valueOf = function () {\n\t        if (Tone.isUndef(this._val)) {\n\t            return this._noArg();\n\t        } else if (Tone.isString(this._val) && Tone.isUndef(this._units)) {\n\t            for (var units in this._expressions) {\n\t                if (this._expressions[units].regexp.test(this._val.trim())) {\n\t                    this._units = units;\n\t                    break;\n\t                }\n\t            }\n\t        }\n\t        if (Tone.isDefined(this._units)) {\n\t            var expr = this._expressions[this._units];\n\t            var matching = this._val.toString().trim().match(expr.regexp);\n\t            if (matching) {\n\t                return expr.method.apply(this, matching.slice(1));\n\t            } else {\n\t                return expr.method.call(this, parseFloat(this._val));\n\t            }\n\t        } else {\n\t            return this._val;\n\t        }\n\t    };\n\t    /**\n\t\t *  Return the value in seconds\n\t\t *  @return {Seconds}\n\t\t */\n\t    Tone.TimeBase.prototype.toSeconds = function () {\n\t        return this.valueOf();\n\t    };\n\t    /**\n\t\t *  Return the value in hertz\n\t\t *  @return {Frequency}\n\t\t */\n\t    Tone.TimeBase.prototype.toFrequency = function () {\n\t        return 1 / this.toSeconds();\n\t    };\n\t    /**\n\t\t *  Return the time in samples\n\t\t *  @return  {Samples}\n\t\t */\n\t    Tone.TimeBase.prototype.toSamples = function () {\n\t        return this.toSeconds() * this.context.sampleRate;\n\t    };\n\t    /**\n\t\t *  Return the time in milliseconds.\n\t\t *  @return  {Milliseconds}\n\t\t */\n\t    Tone.TimeBase.prototype.toMilliseconds = function () {\n\t        return this.toSeconds() * 1000;\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @return {Tone.TimeBase} this\n\t\t */\n\t    Tone.TimeBase.prototype.dispose = function () {\n\t        this._val = null;\n\t        this._units = null;\n\t    };\n\t    return Tone.TimeBase;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.Frequency is a primitive type for encoding Frequency values.\n\t\t *         Eventually all time values are evaluated to hertz\n\t\t *         using the `eval` method.\n\t\t *  @constructor\n\t\t *  @extends {Tone.TimeBase}\n\t\t *  @param  {String|Number}  val    The time value.\n\t\t *  @param  {String=}  units  The units of the value.\n\t\t *  @example\n\t\t * Tone.Frequency(\"C3\") // 261\n\t\t * Tone.Frequency(38, \"midi\") //\n\t\t * Tone.Frequency(\"C3\").transpose(4);\n\t\t */\n\t    Tone.Frequency = function (val, units) {\n\t        if (this instanceof Tone.Frequency) {\n\t            Tone.TimeBase.call(this, val, units);\n\t        } else {\n\t            return new Tone.Frequency(val, units);\n\t        }\n\t    };\n\t    Tone.extend(Tone.Frequency, Tone.TimeBase);\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tAUGMENT BASE EXPRESSIONS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    Tone.Frequency.prototype._expressions = Object.assign({}, Tone.TimeBase.prototype._expressions, {\n\t        'midi': {\n\t            regexp: /^(\\d+(?:\\.\\d+)?midi)/,\n\t            method: function (value) {\n\t                if (this._defaultUnits === 'midi') {\n\t                    return value;\n\t                } else {\n\t                    return Tone.Frequency.mtof(value);\n\t                }\n\t            }\n\t        },\n\t        'note': {\n\t            regexp: /^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i,\n\t            method: function (pitch, octave) {\n\t                var index = noteToScaleIndex[pitch.toLowerCase()];\n\t                var noteNumber = index + (parseInt(octave) + 1) * 12;\n\t                if (this._defaultUnits === 'midi') {\n\t                    return noteNumber;\n\t                } else {\n\t                    return Tone.Frequency.mtof(noteNumber);\n\t                }\n\t            }\n\t        },\n\t        'tr': {\n\t            regexp: /^(\\d+(?:\\.\\d+)?):(\\d+(?:\\.\\d+)?):?(\\d+(?:\\.\\d+)?)?/,\n\t            method: function (m, q, s) {\n\t                var total = 1;\n\t                if (m && m !== '0') {\n\t                    total *= this._beatsToUnits(this._getTimeSignature() * parseFloat(m));\n\t                }\n\t                if (q && q !== '0') {\n\t                    total *= this._beatsToUnits(parseFloat(q));\n\t                }\n\t                if (s && s !== '0') {\n\t                    total *= this._beatsToUnits(parseFloat(s) / 4);\n\t                }\n\t                return total;\n\t            }\n\t        }\n\t    });\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tEXPRESSIONS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Transposes the frequency by the given number of semitones.\n\t\t *  @param  {Interval}  interval\n\t\t *  @return  {Tone.Frequency} A new transposed frequency\n\t\t *  @example\n\t\t * Tone.Frequency(\"A4\").transpose(3); //\"C5\"\n\t\t */\n\t    Tone.Frequency.prototype.transpose = function (interval) {\n\t        return new this.constructor(this.valueOf() * Tone.intervalToFrequencyRatio(interval));\n\t    };\n\t    /**\n\t\t *  Takes an array of semitone intervals and returns\n\t\t *  an array of frequencies transposed by those intervals.\n\t\t *  @param  {Array}  intervals\n\t\t *  @return  {Array<Tone.Frequency>} Returns an array of Frequencies\n\t\t *  @example\n\t\t * Tone.Frequency(\"A4\").harmonize([0, 3, 7]); //[\"A4\", \"C5\", \"E5\"]\n\t\t */\n\t    Tone.Frequency.prototype.harmonize = function (intervals) {\n\t        return intervals.map(function (interval) {\n\t            return this.transpose(interval);\n\t        }.bind(this));\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tUNIT CONVERSIONS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Return the value of the frequency as a MIDI note\n\t\t *  @return  {MIDI}\n\t\t *  @example\n\t\t * Tone.Frequency(\"C4\").toMidi(); //60\n\t\t */\n\t    Tone.Frequency.prototype.toMidi = function () {\n\t        return Tone.Frequency.ftom(this.valueOf());\n\t    };\n\t    /**\n\t\t *  Return the value of the frequency in Scientific Pitch Notation\n\t\t *  @return  {Note}\n\t\t *  @example\n\t\t * Tone.Frequency(69, \"midi\").toNote(); //\"A4\"\n\t\t */\n\t    Tone.Frequency.prototype.toNote = function () {\n\t        var freq = this.toFrequency();\n\t        var log = Math.log2(freq / Tone.Frequency.A4);\n\t        var noteNumber = Math.round(12 * log) + 57;\n\t        var octave = Math.floor(noteNumber / 12);\n\t        if (octave < 0) {\n\t            noteNumber += -12 * octave;\n\t        }\n\t        var noteName = scaleIndexToNote[noteNumber % 12];\n\t        return noteName + octave.toString();\n\t    };\n\t    /**\n\t\t *  Return the duration of one cycle in seconds.\n\t\t *  @return  {Seconds}\n\t\t */\n\t    Tone.Frequency.prototype.toSeconds = function () {\n\t        return 1 / Tone.TimeBase.prototype.toSeconds.call(this);\n\t    };\n\t    /**\n\t\t *  Return the value in Hertz\n\t\t *  @return  {Frequency}\n\t\t */\n\t    Tone.Frequency.prototype.toFrequency = function () {\n\t        return Tone.TimeBase.prototype.toFrequency.call(this);\n\t    };\n\t    /**\n\t\t *  Return the duration of one cycle in ticks\n\t\t *  @return  {Ticks}\n\t\t */\n\t    Tone.Frequency.prototype.toTicks = function () {\n\t        var quarterTime = this._beatsToUnits(1);\n\t        var quarters = this.valueOf() / quarterTime;\n\t        return Math.floor(quarters * Tone.Transport.PPQ);\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tUNIT CONVERSIONS HELPERS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  With no arguments, return 0\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Frequency.prototype._noArg = function () {\n\t        return 0;\n\t    };\n\t    /**\n\t\t *  Returns the value of a frequency in the current units\n\t\t *  @param {Frequency} freq\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Frequency.prototype._frequencyToUnits = function (freq) {\n\t        return freq;\n\t    };\n\t    /**\n\t\t *  Returns the value of a tick in the current time units\n\t\t *  @param {Ticks} ticks\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Frequency.prototype._ticksToUnits = function (ticks) {\n\t        return 1 / (ticks * 60 / (Tone.Transport.bpm.value * Tone.Transport.PPQ));\n\t    };\n\t    /**\n\t\t *  Return the value of the beats in the current units\n\t\t *  @param {Number} beats\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Frequency.prototype._beatsToUnits = function (beats) {\n\t        return 1 / Tone.TimeBase.prototype._beatsToUnits.call(this, beats);\n\t    };\n\t    /**\n\t\t *  Returns the value of a second in the current units\n\t\t *  @param {Seconds} seconds\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Frequency.prototype._secondsToUnits = function (seconds) {\n\t        return 1 / seconds;\n\t    };\n\t    /**\n\t\t *  The default units if none are given.\n\t\t *  @private\n\t\t */\n\t    Tone.Frequency.prototype._defaultUnits = 'hz';\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tFREQUENCY CONVERSIONS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Note to scale index\n\t\t *  @type  {Object}\n\t\t */\n\t    var noteToScaleIndex = {\n\t        'cbb': -2,\n\t        'cb': -1,\n\t        'c': 0,\n\t        'c#': 1,\n\t        'cx': 2,\n\t        'dbb': 0,\n\t        'db': 1,\n\t        'd': 2,\n\t        'd#': 3,\n\t        'dx': 4,\n\t        'ebb': 2,\n\t        'eb': 3,\n\t        'e': 4,\n\t        'e#': 5,\n\t        'ex': 6,\n\t        'fbb': 3,\n\t        'fb': 4,\n\t        'f': 5,\n\t        'f#': 6,\n\t        'fx': 7,\n\t        'gbb': 5,\n\t        'gb': 6,\n\t        'g': 7,\n\t        'g#': 8,\n\t        'gx': 9,\n\t        'abb': 7,\n\t        'ab': 8,\n\t        'a': 9,\n\t        'a#': 10,\n\t        'ax': 11,\n\t        'bbb': 9,\n\t        'bb': 10,\n\t        'b': 11,\n\t        'b#': 12,\n\t        'bx': 13\n\t    };\n\t    /**\n\t\t *  scale index to note (sharps)\n\t\t *  @type  {Array}\n\t\t */\n\t    var scaleIndexToNote = [\n\t        'C',\n\t        'C#',\n\t        'D',\n\t        'D#',\n\t        'E',\n\t        'F',\n\t        'F#',\n\t        'G',\n\t        'G#',\n\t        'A',\n\t        'A#',\n\t        'B'\n\t    ];\n\t    /**\n\t\t *  The [concert pitch](https://en.wikipedia.org/wiki/Concert_pitch)\n\t\t *  A4's values in Hertz.\n\t\t *  @type {Frequency}\n\t\t *  @static\n\t\t */\n\t    Tone.Frequency.A4 = 440;\n\t    /**\n\t\t *  Convert a MIDI note to frequency value.\n\t\t *  @param  {MIDI} midi The midi number to convert.\n\t\t *  @return {Frequency} the corresponding frequency value\n\t\t *  @static\n\t\t *  @example\n\t\t * Tone.Frequency.mtof(69); // returns 440\n\t\t */\n\t    Tone.Frequency.mtof = function (midi) {\n\t        return Tone.Frequency.A4 * Math.pow(2, (midi - 69) / 12);\n\t    };\n\t    /**\n\t\t *  Convert a frequency value to a MIDI note.\n\t\t *  @param {Frequency} frequency The value to frequency value to convert.\n\t\t *  @returns  {MIDI}\n\t\t *  @static\n\t\t *  @example\n\t\t * Tone.Frequency.ftom(440); // returns 69\n\t\t */\n\t    Tone.Frequency.ftom = function (frequency) {\n\t        return 69 + Math.round(12 * Math.log2(frequency / Tone.Frequency.A4));\n\t    };\n\t    return Tone.Frequency;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.Time is a primitive type for encoding Time values.\n\t\t *         Tone.Time can be constructed with or without the `new` keyword. Tone.Time can be passed\n\t\t *         into the parameter of any method which takes time as an argument.\n\t\t *  @constructor\n\t\t *  @extends {Tone.TimeBase}\n\t\t *  @param  {String|Number}  val    The time value.\n\t\t *  @param  {String=}  units  The units of the value.\n\t\t *  @example\n\t\t * var t = Tone.Time(\"4n\");//a quarter note\n\t\t */\n\t    Tone.Time = function (val, units) {\n\t        if (this instanceof Tone.Time) {\n\t            Tone.TimeBase.call(this, val, units);\n\t        } else {\n\t            return new Tone.Time(val, units);\n\t        }\n\t    };\n\t    Tone.extend(Tone.Time, Tone.TimeBase);\n\t    /**\n\t\t * Extend the base expressions\n\t\t */\n\t    Tone.Time.prototype._expressions = Object.assign({}, Tone.TimeBase.prototype._expressions, {\n\t        'quantize': {\n\t            regexp: /^@(.+)/,\n\t            method: function (capture) {\n\t                if (Tone.Transport) {\n\t                    var quantTo = new this.constructor(capture);\n\t                    return Tone.Transport.nextSubdivision(quantTo);\n\t                } else {\n\t                    return 0;\n\t                }\n\t            }\n\t        },\n\t        'now': {\n\t            regexp: /^\\+(.+)/,\n\t            method: function (capture) {\n\t                return this._now() + new this.constructor(capture);\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Quantize the time by the given subdivision. Optionally add a\n\t\t *  percentage which will move the time value towards the ideal\n\t\t *  quantized value by that percentage.\n\t\t *  @param  {Number|Time}  val    The subdivision to quantize to\n\t\t *  @param  {NormalRange}  [percent=1]  Move the time value\n\t\t *                                   towards the quantized value by\n\t\t *                                   a percentage.\n\t\t *  @return  {Number}  this\n\t\t *  @example\n\t\t * Tone.Time(21).quantize(2) //returns 22\n\t\t * Tone.Time(0.6).quantize(\"4n\", 0.5) //returns 0.55\n\t\t */\n\t    Tone.Time.prototype.quantize = function (subdiv, percent) {\n\t        percent = Tone.defaultArg(percent, 1);\n\t        var subdivision = new this.constructor(subdiv);\n\t        var value = this.valueOf();\n\t        var multiple = Math.round(value / subdivision);\n\t        var ideal = multiple * subdivision;\n\t        var diff = ideal - value;\n\t        return value + diff * percent;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    // CONVERSIONS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Convert a Time to Notation. The notation values are will be the\n\t\t *  closest representation between 1m to 128th note.\n\t\t *  @return {Notation}\n\t\t *  @example\n\t\t * //if the Transport is at 120bpm:\n\t\t * Tone.Time(2).toNotation();//returns \"1m\"\n\t\t */\n\t    Tone.Time.prototype.toNotation = function () {\n\t        var time = this.toSeconds();\n\t        var testNotations = ['1m'];\n\t        for (var power = 1; power < 8; power++) {\n\t            var subdiv = Math.pow(2, power);\n\t            testNotations.push(subdiv + 'n.');\n\t            testNotations.push(subdiv + 'n');\n\t            testNotations.push(subdiv + 't');\n\t        }\n\t        testNotations.push('0');\n\t        //find the closets notation representation\n\t        var closest = testNotations[0];\n\t        var closestSeconds = Tone.Time(testNotations[0]).toSeconds();\n\t        testNotations.forEach(function (notation) {\n\t            var notationSeconds = Tone.Time(notation).toSeconds();\n\t            if (Math.abs(notationSeconds - time) < Math.abs(closestSeconds - time)) {\n\t                closest = notation;\n\t                closestSeconds = notationSeconds;\n\t            }\n\t        });\n\t        return closest;\n\t    };\n\t    /**\n\t\t *  Return the time encoded as Bars:Beats:Sixteenths.\n\t\t *  @return  {BarsBeatsSixteenths}\n\t\t */\n\t    Tone.Time.prototype.toBarsBeatsSixteenths = function () {\n\t        var quarterTime = this._beatsToUnits(1);\n\t        var quarters = this.valueOf() / quarterTime;\n\t        var measures = Math.floor(quarters / this._getTimeSignature());\n\t        var sixteenths = quarters % 1 * 4;\n\t        quarters = Math.floor(quarters) % this._getTimeSignature();\n\t        sixteenths = sixteenths.toString();\n\t        if (sixteenths.length > 3) {\n\t            // the additional parseFloat removes insignificant trailing zeroes\n\t            sixteenths = parseFloat(parseFloat(sixteenths).toFixed(3));\n\t        }\n\t        var progress = [\n\t            measures,\n\t            quarters,\n\t            sixteenths\n\t        ];\n\t        return progress.join(':');\n\t    };\n\t    /**\n\t\t *  Return the time in ticks.\n\t\t *  @return  {Ticks}\n\t\t */\n\t    Tone.Time.prototype.toTicks = function () {\n\t        var quarterTime = this._beatsToUnits(1);\n\t        var quarters = this.valueOf() / quarterTime;\n\t        return Math.round(quarters * this._getPPQ());\n\t    };\n\t    /**\n\t\t *  Return the time in seconds.\n\t\t *  @return  {Seconds}\n\t\t */\n\t    Tone.Time.prototype.toSeconds = function () {\n\t        return this.valueOf();\n\t    };\n\t    /**\n\t\t *  Return the value as a midi note.\n\t\t *  @return  {Midi}\n\t\t */\n\t    Tone.Time.prototype.toMidi = function () {\n\t        return Tone.Frequency.ftom(this.toFrequency());\n\t    };\n\t    return Tone.Time;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.TransportTime is a the time along the Transport's\n\t\t *         timeline. It is similar to Tone.Time, but instead of evaluating\n\t\t *         against the AudioContext's clock, it is evaluated against\n\t\t *         the Transport's position. See [TransportTime wiki](https://github.com/Tonejs/Tone.js/wiki/TransportTime).\n\t\t *  @constructor\n\t\t *  @param  {Time}  val    The time value as a number or string\n\t\t *  @param  {String=}  units  Unit values\n\t\t *  @extends {Tone.Time}\n\t\t */\n\t    Tone.TransportTime = function (val, units) {\n\t        if (this instanceof Tone.TransportTime) {\n\t            Tone.Time.call(this, val, units);\n\t        } else {\n\t            return new Tone.TransportTime(val, units);\n\t        }\n\t    };\n\t    Tone.extend(Tone.TransportTime, Tone.Time);\n\t    /**\n\t\t * Return the current time in whichever context is relevant\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t    Tone.TransportTime.prototype._now = function () {\n\t        return Tone.Transport.seconds;\n\t    };\n\t    return Tone.TransportTime;\n\t});\n\tModule(function (Tone) {\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tTYPES\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t * Units which a value can take on.\n\t\t * @enum {String}\n\t\t */\n\t    Tone.Type = {\n\t        /**\n\t\t\t *  Default units\n\t\t\t *  @typedef {Default}\n\t\t\t */\n\t        Default: 'number',\n\t        /**\n\t\t\t *  Time can be described in a number of ways. Read more [Time](https://github.com/Tonejs/Tone.js/wiki/Time).\n\t\t\t *\n\t\t\t *  * Numbers, which will be taken literally as the time (in seconds).\n\t\t\t *  * Notation, (\"4n\", \"8t\") describes time in BPM and time signature relative values.\n\t\t\t *  * TransportTime, (\"4:3:2\") will also provide tempo and time signature relative times\n\t\t\t *  in the form BARS:QUARTERS:SIXTEENTHS.\n\t\t\t *  * Frequency, (\"8hz\") is converted to the length of the cycle in seconds.\n\t\t\t *  * Now-Relative, (\"+1\") prefix any of the above with \"+\" and it will be interpreted as\n\t\t\t *  \"the current time plus whatever expression follows\".\n\t\t\t *  * Expressions, (\"3:0 + 2 - (1m / 7)\") any of the above can also be combined\n\t\t\t *  into a mathematical expression which will be evaluated to compute the desired time.\n\t\t\t *  * No Argument, for methods which accept time, no argument will be interpreted as\n\t\t\t *  \"now\" (i.e. the currentTime).\n\t\t\t *\n\t\t\t *  @typedef {Time}\n\t\t\t */\n\t        Time: 'time',\n\t        /**\n\t\t\t *  Frequency can be described similar to time, except ultimately the\n\t\t\t *  values are converted to frequency instead of seconds. A number\n\t\t\t *  is taken literally as the value in hertz. Additionally any of the\n\t\t\t *  Time encodings can be used. Note names in the form\n\t\t\t *  of NOTE OCTAVE (i.e. C4) are also accepted and converted to their\n\t\t\t *  frequency value.\n\t\t\t *  @typedef {Frequency}\n\t\t\t */\n\t        Frequency: 'frequency',\n\t        /**\n\t\t\t *  TransportTime describes a position along the Transport's timeline. It is\n\t\t\t *  similar to Time in that it uses all the same encodings, but TransportTime specifically\n\t\t\t *  pertains to the Transport's timeline, which is startable, stoppable, loopable, and seekable.\n\t\t\t *  [Read more](https://github.com/Tonejs/Tone.js/wiki/TransportTime)\n\t\t\t *  @typedef {TransportTime}\n\t\t\t */\n\t        TransportTime: 'transportTime',\n\t        /**\n\t\t\t *  Ticks are the basic subunit of the Transport. They are\n\t\t\t *  the smallest unit of time that the Transport supports.\n\t\t\t *  @typedef {Ticks}\n\t\t\t */\n\t        Ticks: 'ticks',\n\t        /**\n\t\t\t *  Normal values are within the range [0, 1].\n\t\t\t *  @typedef {NormalRange}\n\t\t\t */\n\t        NormalRange: 'normalRange',\n\t        /**\n\t\t\t *  AudioRange values are between [-1, 1].\n\t\t\t *  @typedef {AudioRange}\n\t\t\t */\n\t        AudioRange: 'audioRange',\n\t        /**\n\t\t\t *  Decibels are a logarithmic unit of measurement which is useful for volume\n\t\t\t *  because of the logarithmic way that we perceive loudness. 0 decibels\n\t\t\t *  means no change in volume. -10db is approximately half as loud and 10db\n\t\t\t *  is twice is loud.\n\t\t\t *  @typedef {Decibels}\n\t\t\t */\n\t        Decibels: 'db',\n\t        /**\n\t\t\t *  Half-step note increments, i.e. 12 is an octave above the root. and 1 is a half-step up.\n\t\t\t *  @typedef {Interval}\n\t\t\t */\n\t        Interval: 'interval',\n\t        /**\n\t\t\t *  Beats per minute.\n\t\t\t *  @typedef {BPM}\n\t\t\t */\n\t        BPM: 'bpm',\n\t        /**\n\t\t\t *  The value must be greater than or equal to 0.\n\t\t\t *  @typedef {Positive}\n\t\t\t */\n\t        Positive: 'positive',\n\t        /**\n\t\t\t *  Gain is the ratio between input and output of a signal.\n\t\t\t *  A gain of 0 is the same as silencing the signal. A gain of\n\t\t\t *  1, causes no change to the incoming signal.\n\t\t\t *  @typedef {Gain}\n\t\t\t */\n\t        Gain: 'gain',\n\t        /**\n\t\t\t *  A cent is a hundredth of a semitone.\n\t\t\t *  @typedef {Cents}\n\t\t\t */\n\t        Cents: 'cents',\n\t        /**\n\t\t\t *  Angle between 0 and 360.\n\t\t\t *  @typedef {Degrees}\n\t\t\t */\n\t        Degrees: 'degrees',\n\t        /**\n\t\t\t *  A number representing a midi note.\n\t\t\t *  @typedef {MIDI}\n\t\t\t */\n\t        MIDI: 'midi',\n\t        /**\n\t\t\t *  A colon-separated representation of time in the form of\n\t\t\t *  Bars:Beats:Sixteenths.\n\t\t\t *  @typedef {BarsBeatsSixteenths}\n\t\t\t */\n\t        BarsBeatsSixteenths: 'barsBeatsSixteenths',\n\t        /**\n\t\t\t *  Sampling is the reduction of a continuous signal to a discrete signal.\n\t\t\t *  Audio is typically sampled 44100 times per second.\n\t\t\t *  @typedef {Samples}\n\t\t\t */\n\t        Samples: 'samples',\n\t        /**\n\t\t\t *  Hertz are a frequency representation defined as one cycle per second.\n\t\t\t *  @typedef {Hertz}\n\t\t\t */\n\t        Hertz: 'hertz',\n\t        /**\n\t\t\t *  A frequency represented by a letter name,\n\t\t\t *  accidental and octave. This system is known as\n\t\t\t *  [Scientific Pitch Notation](https://en.wikipedia.org/wiki/Scientific_pitch_notation).\n\t\t\t *  @typedef {Note}\n\t\t\t */\n\t        Note: 'note',\n\t        /**\n\t\t\t *  One millisecond is a thousandth of a second.\n\t\t\t *  @typedef {Milliseconds}\n\t\t\t */\n\t        Milliseconds: 'milliseconds',\n\t        /**\n\t\t\t *  Seconds are the time unit of the AudioContext. In the end,\n\t\t\t *  all values need to be evaluated to seconds.\n\t\t\t *  @typedef {Seconds}\n\t\t\t */\n\t        Seconds: 'seconds',\n\t        /**\n\t\t\t *  A string representing a duration relative to a measure.\n\t\t\t *  * \"4n\" = quarter note\n\t\t\t *  * \"2m\" = two measures\n\t\t\t *  * \"8t\" = eighth-note triplet\n\t\t\t *  @typedef {Notation}\n\t\t\t */\n\t        Notation: 'notation'\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    // AUGMENT TONE's PROTOTYPE\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Convert Time into seconds.\n\t\t *\n\t\t *  Unlike the method which it overrides, this takes into account\n\t\t *  transporttime and musical notation.\n\t\t *\n\t\t *  Time : 1.40\n\t\t *  Notation: 4n or 1m or 2t\n\t\t *  Now Relative: +3n\n\t\t *  Math: 3n+16n or even complicated expressions ((3n*2)/6 + 1)\n\t\t *\n\t\t *  @param  {Time} time\n\t\t *  @return {Seconds}\n\t\t */\n\t    Tone.prototype.toSeconds = function (time) {\n\t        if (Tone.isNumber(time)) {\n\t            return time;\n\t        } else if (Tone.isUndef(time)) {\n\t            return this.now();\n\t        } else if (Tone.isString(time)) {\n\t            return new Tone.Time(time).toSeconds();\n\t        } else if (time instanceof Tone.TimeBase) {\n\t            return time.toSeconds();\n\t        }\n\t    };\n\t    /**\n\t\t *  Convert a frequency representation into a number.\n\t\t *  @param  {Frequency} freq\n\t\t *  @return {Hertz}      the frequency in hertz\n\t\t */\n\t    Tone.prototype.toFrequency = function (freq) {\n\t        if (Tone.isNumber(freq)) {\n\t            return freq;\n\t        } else if (Tone.isString(freq) || Tone.isUndef(freq)) {\n\t            return new Tone.Frequency(freq).valueOf();\n\t        } else if (freq instanceof Tone.TimeBase) {\n\t            return freq.toFrequency();\n\t        }\n\t    };\n\t    /**\n\t\t *  Convert a time representation into ticks.\n\t\t *  @param  {Time} time\n\t\t *  @return {Ticks}  the time in ticks\n\t\t */\n\t    Tone.prototype.toTicks = function (time) {\n\t        if (Tone.isNumber(time) || Tone.isString(time)) {\n\t            return new Tone.TransportTime(time).toTicks();\n\t        } else if (Tone.isUndef(time)) {\n\t            return Tone.Transport.ticks;\n\t        } else if (time instanceof Tone.TimeBase) {\n\t            return time.toTicks();\n\t        }\n\t    };\n\t    return Tone;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Param wraps the native Web Audio's AudioParam to provide\n\t\t *         additional unit conversion functionality. It also\n\t\t *         serves as a base-class for classes which have a single,\n\t\t *         automatable parameter.\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param  {AudioParam}  param  The parameter to wrap.\n\t\t *  @param  {Tone.Type} units The units of the audio param.\n\t\t *  @param  {Boolean} convert If the param should be converted.\n\t\t */\n\t    Tone.Param = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'param',\n\t            'units',\n\t            'convert'\n\t        ], Tone.Param);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The native parameter to control\n\t\t\t *  @type  {AudioParam}\n\t\t\t *  @private\n\t\t\t */\n\t        this._param = this.input = options.param;\n\t        /**\n\t\t\t *  The units of the parameter\n\t\t\t *  @type {Tone.Type}\n\t\t\t */\n\t        this.units = options.units;\n\t        /**\n\t\t\t *  If the value should be converted or not\n\t\t\t *  @type {Boolean}\n\t\t\t */\n\t        this.convert = options.convert;\n\t        /**\n\t\t\t *  True if the signal value is being overridden by\n\t\t\t *  a connected signal.\n\t\t\t *  @readOnly\n\t\t\t *  @type  {boolean}\n\t\t\t *  @private\n\t\t\t */\n\t        this.overridden = false;\n\t        /**\n\t\t\t * The timeline which tracks all of the automations.\n\t\t\t * @type {Tone.Timeline}\n\t\t\t * @private\n\t\t\t */\n\t        this._events = new Tone.Timeline(1000);\n\t        if (Tone.isDefined(options.value) && this._param) {\n\t            this.value = options.value;\n\t        }\n\t    };\n\t    Tone.extend(Tone.Param, Tone.AudioNode);\n\t    /**\n\t\t *  Defaults\n\t\t *  @type  {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.Param.defaults = {\n\t        'units': Tone.Type.Default,\n\t        'convert': true,\n\t        'param': undefined\n\t    };\n\t    /**\n\t\t * The current value of the parameter.\n\t\t * @memberOf Tone.Param#\n\t\t * @type {Number}\n\t\t * @name value\n\t\t */\n\t    Object.defineProperty(Tone.Param.prototype, 'value', {\n\t        get: function () {\n\t            var now = this.now();\n\t            return this._toUnits(this.getValueAtTime(now));\n\t        },\n\t        set: function (value) {\n\t            this._initialValue = this._fromUnits(value);\n\t            this.cancelScheduledValues(this.context.currentTime);\n\t            this.setValueAtTime(value, this.context.currentTime);\n\t        }\n\t    });\n\t    /**\n\t\t * The minimum output value of the parameter\n\t\t * @memberOf Tone.Param#\n\t\t * @type {Number}\n\t\t * @name value\n\t\t */\n\t    Object.defineProperty(Tone.Param.prototype, 'minValue', {\n\t        get: function () {\n\t            if (this.units === Tone.Type.Time || this.units === Tone.Type.Frequency || this.units === Tone.Type.NormalRange || this.units === Tone.Type.Positive || this.units === Tone.Type.BPM) {\n\t                return 0;\n\t            } else if (this.units === Tone.Type.AudioRange) {\n\t                return -1;\n\t            } else if (this.units === Tone.Type.Decibels) {\n\t                return -Infinity;\n\t            } else {\n\t                return this._param.minValue;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The maximum output value of the parameter\n\t\t * @memberOf Tone.Param#\n\t\t * @type {Number}\n\t\t * @name value\n\t\t */\n\t    Object.defineProperty(Tone.Param.prototype, 'maxValue', {\n\t        get: function () {\n\t            if (this.units === Tone.Type.NormalRange || this.units === Tone.Type.AudioRange) {\n\t                return 1;\n\t            } else {\n\t                return this._param.maxValue;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Convert the given value from the type specified by Tone.Param.units\n\t\t *  into the destination value (such as Gain or Frequency).\n\t\t *  @private\n\t\t *  @param  {*} val the value to convert\n\t\t *  @return {number}     the number which the value should be set to\n\t\t */\n\t    Tone.Param.prototype._fromUnits = function (val) {\n\t        if ((this.convert || Tone.isUndef(this.convert)) && !this.overridden) {\n\t            switch (this.units) {\n\t            case Tone.Type.Time:\n\t                return this.toSeconds(val);\n\t            case Tone.Type.Frequency:\n\t                return this.toFrequency(val);\n\t            case Tone.Type.Decibels:\n\t                return Tone.dbToGain(val);\n\t            case Tone.Type.NormalRange:\n\t                return Math.min(Math.max(val, 0), 1);\n\t            case Tone.Type.AudioRange:\n\t                return Math.min(Math.max(val, -1), 1);\n\t            case Tone.Type.Positive:\n\t                return Math.max(val, 0);\n\t            default:\n\t                return val;\n\t            }\n\t        } else {\n\t            return val;\n\t        }\n\t    };\n\t    /**\n\t\t * Convert the parameters value into the units specified by Tone.Param.units.\n\t\t * @private\n\t\t * @param  {number} val the value to convert\n\t\t * @return {number}\n\t\t */\n\t    Tone.Param.prototype._toUnits = function (val) {\n\t        if (this.convert || Tone.isUndef(this.convert)) {\n\t            switch (this.units) {\n\t            case Tone.Type.Decibels:\n\t                return Tone.gainToDb(val);\n\t            default:\n\t                return val;\n\t            }\n\t        } else {\n\t            return val;\n\t        }\n\t    };\n\t    /**\n\t\t *  the minimum output value\n\t\t *  @type {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Param.prototype._minOutput = 0.00001;\n\t    /**\n\t\t *  The event types\n\t\t *  @enum {String}\n\t\t *  @private\n\t\t */\n\t    Tone.Param.AutomationType = {\n\t        Linear: 'linearRampToValueAtTime',\n\t        Exponential: 'exponentialRampToValueAtTime',\n\t        Target: 'setTargetAtTime',\n\t        SetValue: 'setValueAtTime'\n\t    };\n\t    /**\n\t\t *  Schedules a parameter value change at the given time.\n\t\t *  @param {*}\tvalue The value to set the signal.\n\t\t *  @param {Time}  time The time when the change should occur.\n\t\t *  @returns {Tone.Param} this\n\t\t *  @example\n\t\t * //set the frequency to \"G4\" in exactly 1 second from now.\n\t\t * freq.setValueAtTime(\"G4\", \"+1\");\n\t\t */\n\t    Tone.Param.prototype.setValueAtTime = function (value, time) {\n\t        time = this.toSeconds(time);\n\t        value = this._fromUnits(value);\n\t        this._events.add({\n\t            'type': Tone.Param.AutomationType.SetValue,\n\t            'value': value,\n\t            'time': time\n\t        });\n\t        this._param.setValueAtTime(value, time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Get the signals value at the given time. Subsequent scheduling\n\t\t *  may invalidate the returned value.\n\t\t *  @param {Time} time When to get the value\n\t\t *  @returns {Number} The value at the given time\n\t\t */\n\t    Tone.Param.prototype.getValueAtTime = function (time) {\n\t        time = this.toSeconds(time);\n\t        var after = this._events.getAfter(time);\n\t        var before = this._events.get(time);\n\t        var initialValue = Tone.defaultArg(this._initialValue, this._param.defaultValue);\n\t        var value = initialValue;\n\t        //if it was set by\n\t        if (before === null) {\n\t            value = initialValue;\n\t        } else if (before.type === Tone.Param.AutomationType.Target) {\n\t            var previous = this._events.getBefore(before.time);\n\t            var previousVal;\n\t            if (previous === null) {\n\t                previousVal = initialValue;\n\t            } else {\n\t                previousVal = previous.value;\n\t            }\n\t            value = this._exponentialApproach(before.time, previousVal, before.value, before.constant, time);\n\t        } else if (after === null) {\n\t            value = before.value;\n\t        } else if (after.type === Tone.Param.AutomationType.Linear) {\n\t            value = this._linearInterpolate(before.time, before.value, after.time, after.value, time);\n\t        } else if (after.type === Tone.Param.AutomationType.Exponential) {\n\t            value = this._exponentialInterpolate(before.time, before.value, after.time, after.value, time);\n\t        } else {\n\t            value = before.value;\n\t        }\n\t        return value;\n\t    };\n\t    /**\n\t\t *  Creates a schedule point with the current value at the current time.\n\t\t *  This is useful for creating an automation anchor point in order to\n\t\t *  schedule changes from the current value.\n\t\t *\n\t\t *  @param {number=} now (Optionally) pass the now value in.\n\t\t *  @returns {Tone.Param} this\n\t\t */\n\t    Tone.Param.prototype.setRampPoint = function (time) {\n\t        time = this.toSeconds(time);\n\t        var currentVal = this.getValueAtTime(time);\n\t        this.cancelAndHoldAtTime(time);\n\t        if (currentVal === 0) {\n\t            currentVal = this._minOutput;\n\t        }\n\t        this.setValueAtTime(this._toUnits(currentVal), time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Schedules a linear continuous change in parameter value from the\n\t\t *  previous scheduled parameter value to the given value.\n\t\t *\n\t\t *  @param  {number} value\n\t\t *  @param  {Time} endTime\n\t\t *  @returns {Tone.Param} this\n\t\t */\n\t    Tone.Param.prototype.linearRampToValueAtTime = function (value, endTime) {\n\t        value = this._fromUnits(value);\n\t        endTime = this.toSeconds(endTime);\n\t        this._events.add({\n\t            'type': Tone.Param.AutomationType.Linear,\n\t            'value': value,\n\t            'time': endTime\n\t        });\n\t        this._param.linearRampToValueAtTime(value, endTime);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Schedules an exponential continuous change in parameter value from\n\t\t *  the previous scheduled parameter value to the given value.\n\t\t *\n\t\t *  @param  {number} value\n\t\t *  @param  {Time} endTime\n\t\t *  @returns {Tone.Param} this\n\t\t */\n\t    Tone.Param.prototype.exponentialRampToValueAtTime = function (value, endTime) {\n\t        value = this._fromUnits(value);\n\t        value = Math.max(this._minOutput, value);\n\t        endTime = this.toSeconds(endTime);\n\t        //store the event\n\t        this._events.add({\n\t            'type': Tone.Param.AutomationType.Exponential,\n\t            'time': endTime,\n\t            'value': value\n\t        });\n\t        this._param.exponentialRampToValueAtTime(value, endTime);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Schedules an exponential continuous change in parameter value from\n\t\t *  the current time and current value to the given value over the\n\t\t *  duration of the rampTime.\n\t\t *\n\t\t *  @param  {number} value   The value to ramp to.\n\t\t *  @param  {Time} rampTime the time that it takes the\n\t\t *                               value to ramp from it's current value\n\t\t *  @param {Time}\t[startTime=now] \tWhen the ramp should start.\n\t\t *  @returns {Tone.Param} this\n\t\t *  @example\n\t\t * //exponentially ramp to the value 2 over 4 seconds.\n\t\t * signal.exponentialRampTo(2, 4);\n\t\t */\n\t    Tone.Param.prototype.exponentialRampTo = function (value, rampTime, startTime) {\n\t        startTime = this.toSeconds(startTime);\n\t        this.setRampPoint(startTime);\n\t        this.exponentialRampToValueAtTime(value, startTime + this.toSeconds(rampTime));\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Schedules an linear continuous change in parameter value from\n\t\t *  the current time and current value to the given value over the\n\t\t *  duration of the rampTime.\n\t\t *\n\t\t *  @param  {number} value   The value to ramp to.\n\t\t *  @param  {Time} rampTime the time that it takes the\n\t\t *                               value to ramp from it's current value\n\t\t *  @param {Time}\t[startTime=now] \tWhen the ramp should start.\n\t\t *  @returns {Tone.Param} this\n\t\t *  @example\n\t\t * //linearly ramp to the value 4 over 3 seconds.\n\t\t * signal.linearRampTo(4, 3);\n\t\t */\n\t    Tone.Param.prototype.linearRampTo = function (value, rampTime, startTime) {\n\t        startTime = this.toSeconds(startTime);\n\t        this.setRampPoint(startTime);\n\t        this.linearRampToValueAtTime(value, startTime + this.toSeconds(rampTime));\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Start exponentially approaching the target value at the given time. Since it\n\t\t *  is an exponential approach it will continue approaching after the ramp duration. The\n\t\t *  rampTime is the time that it takes to reach over 99% of the way towards the value.\n\t\t *  @param  {number} value   The value to ramp to.\n\t\t *  @param  {Time} rampTime the time that it takes the\n\t\t *                               value to ramp from it's current value\n\t\t *  @param {Time}\t[startTime=now] \tWhen the ramp should start.\n\t\t *  @returns {Tone.Param} this\n\t\t *  @example\n\t\t * //exponentially ramp to the value 2 over 4 seconds.\n\t\t * signal.exponentialRampTo(2, 4);\n\t\t */\n\t    Tone.Param.prototype.targetRampTo = function (value, rampTime, startTime) {\n\t        startTime = this.toSeconds(startTime);\n\t        this.setRampPoint(startTime);\n\t        this.exponentialApproachValueAtTime(value, startTime, rampTime);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Start exponentially approaching the target value at the given time. Since it\n\t\t *  is an exponential approach it will continue approaching after the ramp duration. The\n\t\t *  rampTime is the time that it takes to reach over 99% of the way towards the value. This methods\n\t\t *  is similar to setTargetAtTime except the third argument is a time instead of a 'timeConstant'\n\t\t *  @param  {number} value   The value to ramp to.\n\t\t *  @param {Time}\ttime \tWhen the ramp should start.\n\t\t *  @param  {Time} rampTime the time that it takes the\n\t\t *                               value to ramp from it's current value\n\t\t *  @returns {Tone.Param} this\n\t\t *  @example\n\t\t * //exponentially ramp to the value 2 over 4 seconds.\n\t\t * signal.exponentialRampTo(2, 4);\n\t\t */\n\t    Tone.Param.prototype.exponentialApproachValueAtTime = function (value, time, rampTime) {\n\t        var timeConstant = Math.log(this.toSeconds(rampTime) + 1) / Math.log(200);\n\t        time = this.toSeconds(time);\n\t        return this.setTargetAtTime(value, time, timeConstant);\n\t    };\n\t    /**\n\t\t *  Start exponentially approaching the target value at the given time with\n\t\t *  a rate having the given time constant.\n\t\t *  @param {number} value\n\t\t *  @param {Time} startTime\n\t\t *  @param {number} timeConstant\n\t\t *  @returns {Tone.Param} this\n\t\t */\n\t    Tone.Param.prototype.setTargetAtTime = function (value, startTime, timeConstant) {\n\t        value = this._fromUnits(value);\n\t        // The value will never be able to approach without timeConstant > 0.\n\t        if (timeConstant <= 0) {\n\t            throw new Error('timeConstant must be greater than 0');\n\t        }\n\t        startTime = this.toSeconds(startTime);\n\t        this._events.add({\n\t            'type': Tone.Param.AutomationType.Target,\n\t            'value': value,\n\t            'time': startTime,\n\t            'constant': timeConstant\n\t        });\n\t        this._param.setTargetAtTime(value, startTime, timeConstant);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Sets an array of arbitrary parameter values starting at the given time\n\t\t *  for the given duration.\n\t\t *\n\t\t *  @param {Array} values\n\t\t *  @param {Time} startTime\n\t\t *  @param {Time} duration\n\t\t *  @param {NormalRange} [scaling=1] If the values in the curve should be scaled by some value\n\t\t *  @returns {Tone.Param} this\n\t\t */\n\t    Tone.Param.prototype.setValueCurveAtTime = function (values, startTime, duration, scaling) {\n\t        scaling = Tone.defaultArg(scaling, 1);\n\t        duration = this.toSeconds(duration);\n\t        startTime = this.toSeconds(startTime);\n\t        this.setValueAtTime(values[0] * scaling, startTime);\n\t        var segTime = duration / (values.length - 1);\n\t        for (var i = 1; i < values.length; i++) {\n\t            this.linearRampToValueAtTime(values[i] * scaling, startTime + i * segTime);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancels all scheduled parameter changes with times greater than or\n\t\t *  equal to startTime.\n\t\t *\n\t\t *  @param  {Time} time\n\t\t *  @returns {Tone.Param} this\n\t\t */\n\t    Tone.Param.prototype.cancelScheduledValues = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._events.cancel(time);\n\t        this._param.cancelScheduledValues(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  This is similar to [cancelScheduledValues](#cancelScheduledValues) except\n\t\t *  it holds the automated value at time until the next automated event.\n\t\t *  @param  {Time} time\n\t\t *  @returns {Tone.Param} this\n\t\t */\n\t    Tone.Param.prototype.cancelAndHoldAtTime = function (time) {\n\t        var valueAtTime = this.getValueAtTime(time);\n\t        //if there is an event at the given time\n\t        //and that even is not a \"set\"\n\t        var before = this._events.get(time);\n\t        var after = this._events.getAfter(time);\n\t        if (before && before.time === time) {\n\t            //remove everything after\n\t            if (after) {\n\t                this._events.cancel(after.time);\n\t            } else {\n\t                this._events.cancel(time + 0.000001);\n\t            }\n\t        } else if (after) {\n\t            //cancel the next event(s)\n\t            this._events.cancel(after.time);\n\t            if (!this._param.cancelAndHoldAtTime) {\n\t                this._param.cancelScheduledValues(time);\n\t            }\n\t            if (after.type === Tone.Param.AutomationType.Linear) {\n\t                if (!this._param.cancelAndHoldAtTime) {\n\t                    this.linearRampToValueAtTime(valueAtTime, time);\n\t                } else {\n\t                    this._events.add({\n\t                        'type': Tone.Param.AutomationType.Linear,\n\t                        'value': valueAtTime,\n\t                        'time': time\n\t                    });\n\t                }\n\t            } else if (after.type === Tone.Param.AutomationType.Exponential) {\n\t                if (!this._param.cancelAndHoldAtTime) {\n\t                    this.exponentialRampToValueAtTime(valueAtTime, time);\n\t                } else {\n\t                    this._events.add({\n\t                        'type': Tone.Param.AutomationType.Exponential,\n\t                        'value': valueAtTime,\n\t                        'time': time\n\t                    });\n\t                }\n\t            }\n\t        }\n\t        //set the value at the given time\n\t        this._events.add({\n\t            'type': Tone.Param.AutomationType.SetValue,\n\t            'value': valueAtTime,\n\t            'time': time\n\t        });\n\t        if (this._param.cancelAndHoldAtTime) {\n\t            this._param.cancelAndHoldAtTime(time);\n\t        } else {\n\t            this._param.setValueAtTime(valueAtTime, time);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Ramps to the given value over the duration of the rampTime.\n\t\t *  Automatically selects the best ramp type (exponential or linear)\n\t\t *  depending on the `units` of the signal\n\t\t *\n\t\t *  @param  {number} value\n\t\t *  @param  {Time} rampTime \tThe time that it takes the\n\t\t *                              value to ramp from it's current value\n\t\t *  @param {Time}\t[startTime=now] \tWhen the ramp should start.\n\t\t *  @returns {Tone.Param} this\n\t\t *  @example\n\t\t * //ramp to the value either linearly or exponentially\n\t\t * //depending on the \"units\" value of the signal\n\t\t * signal.rampTo(0, 10);\n\t\t *  @example\n\t\t * //schedule it to ramp starting at a specific time\n\t\t * signal.rampTo(0, 10, 5)\n\t\t */\n\t    Tone.Param.prototype.rampTo = function (value, rampTime, startTime) {\n\t        rampTime = Tone.defaultArg(rampTime, 0.1);\n\t        if (this.units === Tone.Type.Frequency || this.units === Tone.Type.BPM || this.units === Tone.Type.Decibels) {\n\t            this.exponentialRampTo(value, rampTime, startTime);\n\t        } else {\n\t            this.linearRampTo(value, rampTime, startTime);\n\t        }\n\t        return this;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tAUTOMATION CURVE CALCULATIONS\n\t    //\tMIT License, copyright (c) 2014 Jordan Santell\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    // Calculates the the value along the curve produced by setTargetAtTime\n\t    Tone.Param.prototype._exponentialApproach = function (t0, v0, v1, timeConstant, t) {\n\t        return v1 + (v0 - v1) * Math.exp(-(t - t0) / timeConstant);\n\t    };\n\t    // Calculates the the value along the curve produced by linearRampToValueAtTime\n\t    Tone.Param.prototype._linearInterpolate = function (t0, v0, t1, v1, t) {\n\t        return v0 + (v1 - v0) * ((t - t0) / (t1 - t0));\n\t    };\n\t    // Calculates the the value along the curve produced by exponentialRampToValueAtTime\n\t    Tone.Param.prototype._exponentialInterpolate = function (t0, v0, t1, v1, t) {\n\t        return v0 * Math.pow(v1 / v0, (t - t0) / (t1 - t0));\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @returns {Tone.Param} this\n\t\t */\n\t    Tone.Param.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._param = null;\n\t        this._events = null;\n\t        return this;\n\t    };\n\t    return Tone.Param;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Wrapper around the OfflineAudioContext\n\t\t *  @extends {Tone.Context}\n\t\t *  @param  {Number}  channels  The number of channels to render\n\t\t *  @param  {Number}  duration  The duration to render in samples\n\t\t *  @param {Number} sampleRate the sample rate to render at\n\t\t */\n\t    Tone.OfflineContext = function (channels, duration, sampleRate) {\n\t        /**\n\t\t\t *  The offline context\n\t\t\t *  @private\n\t\t\t *  @type  {OfflineAudioContext}\n\t\t\t */\n\t        var offlineContext = new OfflineAudioContext(channels, duration * sampleRate, sampleRate);\n\t        //wrap the methods/members\n\t        Tone.Context.call(this, {\n\t            'context': offlineContext,\n\t            'clockSource': 'offline',\n\t            'lookAhead': 0,\n\t            'updateInterval': 128 / sampleRate\n\t        });\n\t        /**\n\t\t\t *  A private reference to the duration\n\t\t\t *  @private\n\t\t\t *  @type  {Number}\n\t\t\t */\n\t        this._duration = duration;\n\t        /**\n\t\t\t *  An artificial clock source\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._currentTime = 0;\n\t    };\n\t    Tone.extend(Tone.OfflineContext, Tone.Context);\n\t    /**\n\t\t *  Override the now method to point to the internal clock time\n\t\t *  @return  {Number}\n\t\t */\n\t    Tone.OfflineContext.prototype.now = function () {\n\t        return this._currentTime;\n\t    };\n\t    /**\n\t\t *  Render the output of the OfflineContext\n\t\t *  @return  {Promise}\n\t\t */\n\t    Tone.OfflineContext.prototype.render = function () {\n\t        while (this._duration - this._currentTime >= 0) {\n\t            //invoke all the callbacks on that time\n\t            this.emit('tick');\n\t            //increment the clock\n\t            this._currentTime += this.blockTime;\n\t        }\n\t        return this._context.startRendering();\n\t    };\n\t    /**\n\t\t *  Close the context\n\t\t *  @return  {Promise}\n\t\t */\n\t    Tone.OfflineContext.prototype.close = function () {\n\t        this._context = null;\n\t        return Promise.resolve();\n\t    };\n\t    return Tone.OfflineContext;\n\t});\n\tModule(function (Tone) {\n\t    if (Tone.supported) {\n\t        var ua = navigator.userAgent.toLowerCase();\n\t        var isMobileSafari = ua.includes('safari') && !ua.includes('chrome') && ua.includes('mobile');\n\t        if (isMobileSafari) {\n\t            //mobile safari has a bizarre bug with the offline context\n\t            //when a BufferSourceNode is started, it starts the offline context\n\t            //\n\t            //deferring all BufferSource starts till the last possible moment\n\t            //reduces the likelihood of this happening\n\t            Tone.OfflineContext.prototype.createBufferSource = function () {\n\t                var bufferSource = this._context.createBufferSource();\n\t                var _native_start = bufferSource.start;\n\t                bufferSource.start = function (time) {\n\t                    this.setTimeout(function () {\n\t                        _native_start.call(bufferSource, time);\n\t                    }.bind(this), 0);\n\t                }.bind(this);\n\t                return bufferSource;\n\t            };\n\t        }\n\t    }\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class A thin wrapper around the Native Web Audio GainNode.\n\t\t *         The GainNode is a basic building block of the Web Audio\n\t\t *         API and is useful for routing audio and adjusting gains.\n\t\t *  @extends {Tone}\n\t\t *  @param  {Number=}  gain  The initial gain of the GainNode\n\t\t *  @param {Tone.Type=} units The units of the gain parameter.\n\t\t */\n\t    Tone.Gain = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'gain',\n\t            'units'\n\t        ], Tone.Gain);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The GainNode\n\t\t\t *  @type  {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this.input = this.output = this._gainNode = this.context.createGain();\n\t        /**\n\t\t\t *  The gain parameter of the gain node.\n\t\t\t *  @type {Gain}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.gain = new Tone.Param({\n\t            'param': this._gainNode.gain,\n\t            'units': options.units,\n\t            'value': options.gain,\n\t            'convert': options.convert\n\t        });\n\t        this._readOnly('gain');\n\t    };\n\t    Tone.extend(Tone.Gain, Tone.AudioNode);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.Gain.defaults = {\n\t        'gain': 1,\n\t        'convert': true\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.Gain}  this\n\t\t */\n\t    Tone.Gain.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._gainNode.disconnect();\n\t        this._gainNode = null;\n\t        this._writable('gain');\n\t        this.gain.dispose();\n\t        this.gain = null;\n\t    };\n\t    return Tone.Gain;\n\t});\n\tModule(function (Tone) {\n\t    if (Tone.supported && !AudioContext.prototype.createConstantSource) {\n\t        var ConstantSourceNode = function (context) {\n\t            this.context = context;\n\t            var buffer = context.createBuffer(1, 128, context.sampleRate);\n\t            var arr = buffer.getChannelData(0);\n\t            for (var i = 0; i < arr.length; i++) {\n\t                arr[i] = 1;\n\t            }\n\t            this._bufferSource = context.createBufferSource();\n\t            this._bufferSource.channelCount = 1;\n\t            this._bufferSource.channelCountMode = 'explicit';\n\t            this._bufferSource.buffer = buffer;\n\t            this._bufferSource.loop = true;\n\t            var gainNode = this._output = context.createGain();\n\t            this.offset = gainNode.gain;\n\t            this._bufferSource.connect(gainNode);\n\t        };\n\t        ConstantSourceNode.prototype.start = function (time) {\n\t            this._bufferSource.start(time);\n\t            return this;\n\t        };\n\t        ConstantSourceNode.prototype.stop = function (time) {\n\t            this._bufferSource.stop(time);\n\t            return this;\n\t        };\n\t        ConstantSourceNode.prototype.connect = function () {\n\t            this._output.connect.apply(this._output, arguments);\n\t            return this;\n\t        };\n\t        ConstantSourceNode.prototype.disconnect = function () {\n\t            this._output.disconnect.apply(this._output, arguments);\n\t            return this;\n\t        };\n\t        AudioContext.prototype.createConstantSource = function () {\n\t            return new ConstantSourceNode(this);\n\t        };\n\t        Tone.Context.prototype.createConstantSource = function () {\n\t            return new ConstantSourceNode(this);\n\t        };\n\t    }\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  A signal is an audio-rate value. Tone.Signal is a core component of the library.\n\t\t *          Unlike a number, Signals can be scheduled with sample-level accuracy. Tone.Signal\n\t\t *          has all of the methods available to native Web Audio\n\t\t *          [AudioParam](http://webaudio.github.io/web-audio-api/#the-audioparam-interface)\n\t\t *          as well as additional conveniences. Read more about working with signals\n\t\t *          [here](https://github.com/Tonejs/Tone.js/wiki/Signals).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Param}\n\t\t *  @param {Number|AudioParam} [value] Initial value of the signal. If an AudioParam\n\t\t *                                     is passed in, that parameter will be wrapped\n\t\t *                                     and controlled by the Signal.\n\t\t *  @param {string} [units=Number] unit The units the signal is in.\n\t\t *  @example\n\t\t * var signal = new Tone.Signal(10);\n\t\t */\n\t    Tone.Signal = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'value',\n\t            'units'\n\t        ], Tone.Signal);\n\t        Tone.Param.call(this, options);\n\t        /**\n\t\t\t* When a signal is connected to another signal or audio param,\n\t\t\t* this signal becomes a proxy for it\n\t\t\t* @type {Array}\n\t\t\t* @private\n\t\t\t*/\n\t        this._proxies = [];\n\t        /**\n\t\t\t* Indicates if the constant source was started or not\n\t\t\t* @private\n\t\t\t* @type {Boolean}\n\t\t\t*/\n\t        this._sourceStarted = false;\n\t        /**\n\t\t\t * The constant source node which generates the signal\n\t\t\t * @type {ConstantSourceNode}\n\t\t\t * @private\n\t\t\t */\n\t        this._constantSource = this.context.createConstantSource();\n\t        this._param = this._constantSource.offset;\n\t        this.value = options.value;\n\t        /**\n\t\t\t * The node where the constant signal value is scaled.\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t        this.output = this._constantSource;\n\t        /**\n\t\t\t * The node where the value is set.\n\t\t\t * @type {Tone.Param}\n\t\t\t * @private\n\t\t\t */\n\t        this.input = this._param = this.output.offset;\n\t    };\n\t    Tone.extend(Tone.Signal, Tone.Param);\n\t    /**\n\t\t *  The default values\n\t\t *  @type  {Object}\n\t\t *  @static\n\t\t *  @const\n\t\t */\n\t    Tone.Signal.defaults = {\n\t        'value': 0,\n\t        'units': Tone.Type.Default,\n\t        'convert': true\n\t    };\n\t    /**\n\t\t *  When signals connect to other signals or AudioParams,\n\t\t *  they take over the output value of that signal or AudioParam.\n\t\t *  For all other nodes, the behavior is the same as a default <code>connect</code>.\n\t\t *\n\t\t *  @override\n\t\t *  @param {AudioParam|AudioNode|Tone.Signal|Tone} node\n\t\t *  @param {number} [outputNumber=0] The output number to connect from.\n\t\t *  @param {number} [inputNumber=0] The input number to connect to.\n\t\t *  @returns {Tone.Signal} this\n\t\t *  @method\n\t\t */\n\t    Tone.Signal.prototype.connect = function (node) {\n\t        //this is an optimization where this node will forward automations\n\t        //to connected nodes without any signal if possible.\n\t        if (this._isParam(node) && !this._sourceStarted) {\n\t            this._proxies.push(node);\n\t            node.overridden = true;\n\t            this._applyAutomations(node);\n\t        } else {\n\t            Tone.SignalBase.prototype.connect.apply(this, arguments);\n\t            if (!this._sourceStarted) {\n\t                this._sourceStarted = true;\n\t                this._constantSource.start(0);\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * Takes a node as an argument and returns if it is a Param or AudioParam\n\t\t * @param  {*} node The node to test\n\t\t * @return {Boolean}\n\t\t * @private\n\t\t */\n\t    Tone.Signal.prototype._isParam = function (node) {\n\t        return Tone.Param && Tone.Param === node.constructor || node instanceof AudioParam;\n\t    };\n\t    /**\n\t\t * Discard the optimization and connect all of the proxies\n\t\t * @private\n\t\t */\n\t    Tone.Signal.prototype._connectProxies = function () {\n\t        if (!this._sourceStarted) {\n\t            this._sourceStarted = true;\n\t            this._constantSource.start(0);\n\t        }\n\t        this._proxies.forEach(function (proxy) {\n\t            Tone.SignalBase.prototype.connect.call(this, proxy);\n\t            if (proxy._proxies) {\n\t                proxy._connectProxies();\n\t            }\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t * Invoked when a node is connected to this\n\t\t * @param  {AudioNode} from\n\t\t * @private\n\t\t */\n\t    Tone.Signal.prototype._onConnect = function (from) {\n\t        if (!this._isParam(from)) {\n\t            //connect all the proxies\n\t            this._connectProxies();\n\t        }\n\t    };\n\t    /**\n\t\t * Apply all the current automations to the given parameter\n\t\t * @param  {AudioParam} param\n\t\t * @private\n\t\t */\n\t    Tone.Signal.prototype._applyAutomations = function (param) {\n\t        var now = this.context.currentTime;\n\t        param.cancelScheduledValues(now);\n\t        var currentVal = this.getValueAtTime(now);\n\t        param.setValueAtTime(currentVal, now);\n\t        this._events.forEachFrom(now, function (event) {\n\t            param[event.type](event.value, event.time, event.constant);\n\t        });\n\t    };\n\t    /**\n\t\t * Disconnect from the given node or all nodes if no param is given.\n\t\t * @param  {AudioNode|AudioParam} node\n\t\t * @return {Tone.Signal}      this\n\t\t */\n\t    Tone.Signal.prototype.disconnect = function (node) {\n\t        if (this._proxies.includes(node)) {\n\t            var index = this._proxies.indexOf(node);\n\t            this._proxies.splice(index, 1);\n\t        } else if (!node) {\n\t            //no argument, disconnect everything\n\t            this._proxies = [];\n\t        }\n\t        return Tone.SignalBase.prototype.disconnect.apply(this, arguments);\n\t    };\n\t    /**\n\t\t * Return the current signal value at the given time.\n\t\t * @param  {Time} time When to get the signal value\n\t\t * @return {Number}\n\t\t */\n\t    Tone.Signal.prototype.getValueAtTime = function (time) {\n\t        if (this._param.getValueAtTime) {\n\t            return this._param.getValueAtTime(time);\n\t        } else {\n\t            return Tone.Param.prototype.getValueAtTime.call(this, time);\n\t        }\n\t    };\n\t    //wrap all of the automation methods\n\t    [\n\t        'setValueAtTime',\n\t        'linearRampToValueAtTime',\n\t        'exponentialRampToValueAtTime',\n\t        'setTargetAtTime'\n\t    ].forEach(function (method) {\n\t        var previousMethod = Tone.Signal.prototype[method];\n\t        Tone.Signal.prototype[method] = function () {\n\t            var args = arguments;\n\t            previousMethod.apply(this, arguments);\n\t            args[0] = this._fromUnits(args[0]);\n\t            args[1] = this.toSeconds(args[1]);\n\t            //apply it to the proxies\n\t            this._proxies.forEach(function (signal) {\n\t                signal[method].apply(signal, args);\n\t            });\n\t        };\n\t    });\n\t    [\n\t        'cancelScheduledValues',\n\t        'cancelAndHoldAtTime'\n\t    ].forEach(function (method) {\n\t        var previousMethod = Tone.Signal.prototype[method];\n\t        Tone.Signal.prototype[method] = function () {\n\t            var args = arguments;\n\t            previousMethod.apply(this, arguments);\n\t            args[0] = this.toSeconds(args[0]);\n\t            //apply it to the proxies\n\t            this._proxies.forEach(function (signal) {\n\t                signal[method].apply(signal, args);\n\t            });\n\t        };\n\t    });\n\t    /**\n\t\t *  dispose and disconnect\n\t\t *  @returns {Tone.Signal} this\n\t\t */\n\t    Tone.Signal.prototype.dispose = function () {\n\t        Tone.Param.prototype.dispose.call(this);\n\t        this._constantSource.disconnect();\n\t        this._constantSource = null;\n\t        this._proxies = null;\n\t        return this;\n\t    };\n\t    return Tone.Signal;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Pow applies an exponent to the incoming signal. The incoming signal\n\t\t *         must be AudioRange.\n\t\t *\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @constructor\n\t\t *  @param {Positive} exp The exponent to apply to the incoming signal, must be at least 2. \n\t\t *  @example\n\t\t * var pow = new Tone.Pow(2);\n\t\t * var sig = new Tone.Signal(0.5).connect(pow);\n\t\t * //output of pow is 0.25. \n\t\t */\n\t    Tone.Pow = function (exp) {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t * the exponent\n\t\t\t * @private\n\t\t\t * @type {number}\n\t\t\t */\n\t        this._exp = Tone.defaultArg(exp, 1);\n\t        /**\n\t\t\t *  @type {WaveShaperNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._expScaler = this.input = this.output = new Tone.WaveShaper(this._expFunc(this._exp), 8192);\n\t    };\n\t    Tone.extend(Tone.Pow, Tone.SignalBase);\n\t    /**\n\t\t * The value of the exponent.\n\t\t * @memberOf Tone.Pow#\n\t\t * @type {number}\n\t\t * @name value\n\t\t */\n\t    Object.defineProperty(Tone.Pow.prototype, 'value', {\n\t        get: function () {\n\t            return this._exp;\n\t        },\n\t        set: function (exp) {\n\t            this._exp = exp;\n\t            this._expScaler.setMap(this._expFunc(this._exp));\n\t        }\n\t    });\n\t    /**\n\t\t *  the function which maps the waveshaper\n\t\t *  @param   {number} exp\n\t\t *  @return {function}\n\t\t *  @private\n\t\t */\n\t    Tone.Pow.prototype._expFunc = function (exp) {\n\t        return function (val) {\n\t            return Math.pow(Math.abs(val), exp);\n\t        };\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Pow} this\n\t\t */\n\t    Tone.Pow.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._expScaler.dispose();\n\t        this._expScaler = null;\n\t        return this;\n\t    };\n\t    return Tone.Pow;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Envelope is an [ADSR](https://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope)\n\t\t *          envelope generator. Tone.Envelope outputs a signal which\n\t\t *          can be connected to an AudioParam or Tone.Signal.\n\t\t *          <img src=\"https://upload.wikimedia.org/wikipedia/commons/e/ea/ADSR_parameter.svg\">\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Time} [attack] The amount of time it takes for the envelope to go from\n\t\t *                         0 to it's maximum value.\n\t\t *  @param {Time} [decay]\tThe period of time after the attack that it takes for the envelope\n\t\t *                       \tto fall to the sustain value.\n\t\t *  @param {NormalRange} [sustain]\tThe percent of the maximum value that the envelope rests at until\n\t\t *                                \tthe release is triggered.\n\t\t *  @param {Time} [release]\tThe amount of time after the release is triggered it takes to reach 0.\n\t\t *  @example\n\t\t * //an amplitude envelope\n\t\t * var gainNode = Tone.context.createGain();\n\t\t * var env = new Tone.Envelope({\n\t\t * \t\"attack\" : 0.1,\n\t\t * \t\"decay\" : 0.2,\n\t\t * \t\"sustain\" : 1,\n\t\t * \t\"release\" : 0.8,\n\t\t * });\n\t\t * env.connect(gainNode.gain);\n\t\t */\n\t    Tone.Envelope = function () {\n\t        //get all of the defaults\n\t        var options = Tone.defaults(arguments, [\n\t            'attack',\n\t            'decay',\n\t            'sustain',\n\t            'release'\n\t        ], Tone.Envelope);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  When triggerAttack is called, the attack time is the amount of\n\t\t\t *  time it takes for the envelope to reach it's maximum value.\n\t\t\t *  @type {Time}\n\t\t\t */\n\t        this.attack = options.attack;\n\t        /**\n\t\t\t *  After the attack portion of the envelope, the value will fall\n\t\t\t *  over the duration of the decay time to it's sustain value.\n\t\t\t *  @type {Time}\n\t\t\t */\n\t        this.decay = options.decay;\n\t        /**\n\t\t\t * \tThe sustain value is the value\n\t\t\t * \twhich the envelope rests at after triggerAttack is\n\t\t\t * \tcalled, but before triggerRelease is invoked.\n\t\t\t *  @type {NormalRange}\n\t\t\t */\n\t        this.sustain = options.sustain;\n\t        /**\n\t\t\t *  After triggerRelease is called, the envelope's\n\t\t\t *  value will fall to it's miminum value over the\n\t\t\t *  duration of the release time.\n\t\t\t *  @type {Time}\n\t\t\t */\n\t        this.release = options.release;\n\t        /**\n\t\t\t *  the next time the envelope is at standby\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._attackCurve = 'linear';\n\t        /**\n\t\t\t *  the next time the envelope is at standby\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._releaseCurve = 'exponential';\n\t        /**\n\t\t\t *  the signal\n\t\t\t *  @type {Tone.Signal}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sig = this.output = new Tone.Signal(0);\n\t        //set the attackCurve initially\n\t        this.attackCurve = options.attackCurve;\n\t        this.releaseCurve = options.releaseCurve;\n\t    };\n\t    Tone.extend(Tone.Envelope, Tone.AudioNode);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @static\n\t\t *  @const\n\t\t */\n\t    Tone.Envelope.defaults = {\n\t        'attack': 0.01,\n\t        'decay': 0.1,\n\t        'sustain': 0.5,\n\t        'release': 1,\n\t        'attackCurve': 'linear',\n\t        'releaseCurve': 'exponential'\n\t    };\n\t    /**\n\t\t * Read the current value of the envelope. Useful for\n\t\t * syncronizing visual output to the envelope.\n\t\t * @memberOf Tone.Envelope#\n\t\t * @type {Number}\n\t\t * @name value\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Envelope.prototype, 'value', {\n\t        get: function () {\n\t            return this.getValueAtTime(this.now());\n\t        }\n\t    });\n\t    /**\n\t\t * The shape of the attack.\n\t\t * Can be any of these strings:\n\t\t * <ul>\n\t\t *   <li>linear</li>\n\t\t *   <li>exponential</li>\n\t\t *   <li>sine</li>\n\t\t *   <li>cosine</li>\n\t\t *   <li>bounce</li>\n\t\t *   <li>ripple</li>\n\t\t *   <li>step</li>\n\t\t * </ul>\n\t\t * Can also be an array which describes the curve. Values\n\t\t * in the array are evenly subdivided and linearly\n\t\t * interpolated over the duration of the attack.\n\t\t * @memberOf Tone.Envelope#\n\t\t * @type {String|Array}\n\t\t * @name attackCurve\n\t\t * @example\n\t\t * env.attackCurve = \"linear\";\n\t\t * @example\n\t\t * //can also be an array\n\t\t * env.attackCurve = [0, 0.2, 0.3, 0.4, 1]\n\t\t */\n\t    Object.defineProperty(Tone.Envelope.prototype, 'attackCurve', {\n\t        get: function () {\n\t            if (Tone.isString(this._attackCurve)) {\n\t                return this._attackCurve;\n\t            } else if (Tone.isArray(this._attackCurve)) {\n\t                //look up the name in the curves array\n\t                for (var type in Tone.Envelope.Type) {\n\t                    if (Tone.Envelope.Type[type].In === this._attackCurve) {\n\t                        return type;\n\t                    }\n\t                }\n\t                //otherwise just return the array\n\t                return this._attackCurve;\n\t            }\n\t        },\n\t        set: function (curve) {\n\t            //check if it's a valid type\n\t            if (Tone.Envelope.Type.hasOwnProperty(curve)) {\n\t                var curveDef = Tone.Envelope.Type[curve];\n\t                if (Tone.isObject(curveDef)) {\n\t                    this._attackCurve = curveDef.In;\n\t                } else {\n\t                    this._attackCurve = curveDef;\n\t                }\n\t            } else if (Tone.isArray(curve)) {\n\t                this._attackCurve = curve;\n\t            } else {\n\t                throw new Error('Tone.Envelope: invalid curve: ' + curve);\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The shape of the release. See the attack curve types.\n\t\t * @memberOf Tone.Envelope#\n\t\t * @type {String|Array}\n\t\t * @name releaseCurve\n\t\t * @example\n\t\t * env.releaseCurve = \"linear\";\n\t\t */\n\t    Object.defineProperty(Tone.Envelope.prototype, 'releaseCurve', {\n\t        get: function () {\n\t            if (Tone.isString(this._releaseCurve)) {\n\t                return this._releaseCurve;\n\t            } else if (Tone.isArray(this._releaseCurve)) {\n\t                //look up the name in the curves array\n\t                for (var type in Tone.Envelope.Type) {\n\t                    if (Tone.Envelope.Type[type].Out === this._releaseCurve) {\n\t                        return type;\n\t                    }\n\t                }\n\t                //otherwise just return the array\n\t                return this._releaseCurve;\n\t            }\n\t        },\n\t        set: function (curve) {\n\t            //check if it's a valid type\n\t            if (Tone.Envelope.Type.hasOwnProperty(curve)) {\n\t                var curveDef = Tone.Envelope.Type[curve];\n\t                if (Tone.isObject(curveDef)) {\n\t                    this._releaseCurve = curveDef.Out;\n\t                } else {\n\t                    this._releaseCurve = curveDef;\n\t                }\n\t            } else if (Tone.isArray(curve)) {\n\t                this._releaseCurve = curve;\n\t            } else {\n\t                throw new Error('Tone.Envelope: invalid curve: ' + curve);\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Trigger the attack/decay portion of the ADSR envelope.\n\t\t *  @param  {Time} [time=now] When the attack should start.\n\t\t *  @param {NormalRange} [velocity=1] The velocity of the envelope scales the vales.\n\t\t *                               number between 0-1\n\t\t *  @returns {Tone.Envelope} this\n\t\t *  @example\n\t\t *  //trigger the attack 0.5 seconds from now with a velocity of 0.2\n\t\t *  env.triggerAttack(\"+0.5\", 0.2);\n\t\t */\n\t    Tone.Envelope.prototype.triggerAttack = function (time, velocity) {\n\t        time = this.toSeconds(time);\n\t        var originalAttack = this.toSeconds(this.attack);\n\t        var attack = originalAttack;\n\t        var decay = this.toSeconds(this.decay);\n\t        velocity = Tone.defaultArg(velocity, 1);\n\t        //check if it's not a complete attack\n\t        var currentValue = this.getValueAtTime(time);\n\t        if (currentValue > 0) {\n\t            //subtract the current value from the attack time\n\t            var attackRate = 1 / attack;\n\t            var remainingDistance = 1 - currentValue;\n\t            //the attack is now the remaining time\n\t            attack = remainingDistance / attackRate;\n\t        }\n\t        //attack\n\t        if (this._attackCurve === 'linear') {\n\t            this._sig.linearRampTo(velocity, attack, time);\n\t        } else if (this._attackCurve === 'exponential') {\n\t            this._sig.targetRampTo(velocity, attack, time);\n\t        } else if (attack > 0) {\n\t            this._sig.cancelAndHoldAtTime(time);\n\t            var curve = this._attackCurve;\n\t            //take only a portion of the curve\n\t            if (attack < originalAttack) {\n\t                var percentComplete = 1 - attack / originalAttack;\n\t                var sliceIndex = Math.floor(percentComplete * this._attackCurve.length);\n\t                curve = this._attackCurve.slice(sliceIndex);\n\t                //the first index is the current value\n\t                curve[0] = currentValue;\n\t            }\n\t            this._sig.setValueCurveAtTime(curve, time, attack, velocity);\n\t        }\n\t        //decay\n\t        if (decay) {\n\t            this._sig.targetRampTo(velocity * this.sustain, decay, attack + time);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Triggers the release of the envelope.\n\t\t *  @param  {Time} [time=now] When the release portion of the envelope should start.\n\t\t *  @returns {Tone.Envelope} this\n\t\t *  @example\n\t\t *  //trigger release immediately\n\t\t *  env.triggerRelease();\n\t\t */\n\t    Tone.Envelope.prototype.triggerRelease = function (time) {\n\t        time = this.toSeconds(time);\n\t        var currentValue = this.getValueAtTime(time);\n\t        if (currentValue > 0) {\n\t            var release = this.toSeconds(this.release);\n\t            if (this._releaseCurve === 'linear') {\n\t                this._sig.linearRampTo(0, release, time);\n\t            } else if (this._releaseCurve === 'exponential') {\n\t                this._sig.targetRampTo(0, release, time);\n\t            } else {\n\t                var curve = this._releaseCurve;\n\t                if (Tone.isArray(curve)) {\n\t                    this._sig.cancelAndHoldAtTime(time);\n\t                    this._sig.setValueCurveAtTime(curve, time, release, currentValue);\n\t                }\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Get the scheduled value at the given time. This will\n\t\t *  return the unconverted (raw) value.\n\t\t *  @param  {Number}  time  The time in seconds.\n\t\t *  @return  {Number}  The scheduled value at the given time.\n\t\t */\n\t    Tone.Envelope.prototype.getValueAtTime = function (time) {\n\t        return this._sig.getValueAtTime(time);\n\t    };\n\t    /**\n\t\t *  triggerAttackRelease is shorthand for triggerAttack, then waiting\n\t\t *  some duration, then triggerRelease.\n\t\t *  @param {Time} duration The duration of the sustain.\n\t\t *  @param {Time} [time=now] When the attack should be triggered.\n\t\t *  @param {number} [velocity=1] The velocity of the envelope.\n\t\t *  @returns {Tone.Envelope} this\n\t\t *  @example\n\t\t * //trigger the attack and then the release after 0.6 seconds.\n\t\t * env.triggerAttackRelease(0.6);\n\t\t */\n\t    Tone.Envelope.prototype.triggerAttackRelease = function (duration, time, velocity) {\n\t        time = this.toSeconds(time);\n\t        this.triggerAttack(time, velocity);\n\t        this.triggerRelease(time + this.toSeconds(duration));\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancels all scheduled envelope changes after the given time.\n\t\t *  @param  {Time} after\n\t\t *  @returns {Tone.Envelope} this\n\t\t */\n\t    Tone.Envelope.prototype.cancel = function (after) {\n\t        this._sig.cancelScheduledValues(after);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Borrows the connect method from Tone.Signal.\n\t\t *  @function\n\t\t *  @private\n\t\t */\n\t    Tone.Envelope.prototype.connect = Tone.SignalBase.prototype.connect;\n\t    /**\n\t \t *  Generate some complex envelope curves.\n\t \t */\n\t    (function _createCurves() {\n\t        var curveLen = 128;\n\t        var i, k;\n\t        //cosine curve\n\t        var cosineCurve = [];\n\t        for (i = 0; i < curveLen; i++) {\n\t            cosineCurve[i] = Math.sin(i / (curveLen - 1) * (Math.PI / 2));\n\t        }\n\t        //ripple curve\n\t        var rippleCurve = [];\n\t        var rippleCurveFreq = 6.4;\n\t        for (i = 0; i < curveLen - 1; i++) {\n\t            k = i / (curveLen - 1);\n\t            var sineWave = Math.sin(k * (Math.PI * 2) * rippleCurveFreq - Math.PI / 2) + 1;\n\t            rippleCurve[i] = sineWave / 10 + k * 0.83;\n\t        }\n\t        rippleCurve[curveLen - 1] = 1;\n\t        //stairs curve\n\t        var stairsCurve = [];\n\t        var steps = 5;\n\t        for (i = 0; i < curveLen; i++) {\n\t            stairsCurve[i] = Math.ceil(i / (curveLen - 1) * steps) / steps;\n\t        }\n\t        //in-out easing curve\n\t        var sineCurve = [];\n\t        for (i = 0; i < curveLen; i++) {\n\t            k = i / (curveLen - 1);\n\t            sineCurve[i] = 0.5 * (1 - Math.cos(Math.PI * k));\n\t        }\n\t        //a bounce curve\n\t        var bounceCurve = [];\n\t        for (i = 0; i < curveLen; i++) {\n\t            k = i / (curveLen - 1);\n\t            var freq = Math.pow(k, 3) * 4 + 0.2;\n\t            var val = Math.cos(freq * Math.PI * 2 * k);\n\t            bounceCurve[i] = Math.abs(val * (1 - k));\n\t        }\n\t        /**\n\t\t\t *  Invert a value curve to make it work for the release\n\t\t\t *  @private\n\t\t\t */\n\t        function invertCurve(curve) {\n\t            var out = new Array(curve.length);\n\t            for (var j = 0; j < curve.length; j++) {\n\t                out[j] = 1 - curve[j];\n\t            }\n\t            return out;\n\t        }\n\t        /**\n\t\t\t *  reverse the curve\n\t\t\t *  @private\n\t\t\t */\n\t        function reverseCurve(curve) {\n\t            return curve.slice(0).reverse();\n\t        }\n\t        /**\n\t\t\t *  attack and release curve arrays\n\t\t\t *  @type  {Object}\n\t\t\t *  @private\n\t\t\t */\n\t        Tone.Envelope.Type = {\n\t            'linear': 'linear',\n\t            'exponential': 'exponential',\n\t            'bounce': {\n\t                In: invertCurve(bounceCurve),\n\t                Out: bounceCurve\n\t            },\n\t            'cosine': {\n\t                In: cosineCurve,\n\t                Out: reverseCurve(cosineCurve)\n\t            },\n\t            'step': {\n\t                In: stairsCurve,\n\t                Out: invertCurve(stairsCurve)\n\t            },\n\t            'ripple': {\n\t                In: rippleCurve,\n\t                Out: invertCurve(rippleCurve)\n\t            },\n\t            'sine': {\n\t                In: sineCurve,\n\t                Out: invertCurve(sineCurve)\n\t            }\n\t        };\n\t    }());\n\t    /**\n\t\t *  Disconnect and dispose.\n\t\t *  @returns {Tone.Envelope} this\n\t\t */\n\t    Tone.Envelope.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._sig.dispose();\n\t        this._sig = null;\n\t        this._attackCurve = null;\n\t        this._releaseCurve = null;\n\t        return this;\n\t    };\n\t    return Tone.Envelope;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.AmplitudeEnvelope is a Tone.Envelope connected to a gain node.\n\t\t *          Unlike Tone.Envelope, which outputs the envelope's value, Tone.AmplitudeEnvelope accepts\n\t\t *          an audio signal as the input and will apply the envelope to the amplitude\n\t\t *          of the signal. Read more about ADSR Envelopes on [Wikipedia](https://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Envelope}\n\t\t *  @param {Time|Object} [attack] The amount of time it takes for the envelope to go from\n\t\t *                               0 to it's maximum value.\n\t\t *  @param {Time} [decay]\tThe period of time after the attack that it takes for the envelope\n\t\t *                       \tto fall to the sustain value.\n\t\t *  @param {NormalRange} [sustain]\tThe percent of the maximum value that the envelope rests at until\n\t\t *                                \tthe release is triggered.\n\t\t *  @param {Time} [release]\tThe amount of time after the release is triggered it takes to reach 0.\n\t\t *  @example\n\t\t * var ampEnv = new Tone.AmplitudeEnvelope({\n\t\t * \t\"attack\": 0.1,\n\t\t * \t\"decay\": 0.2,\n\t\t * \t\"sustain\": 1.0,\n\t\t * \t\"release\": 0.8\n\t\t * }).toMaster();\n\t\t * //create an oscillator and connect it\n\t\t * var osc = new Tone.Oscillator().connect(ampEnv).start();\n\t\t * //trigger the envelopes attack and release \"8t\" apart\n\t\t * ampEnv.triggerAttackRelease(\"8t\");\n\t\t */\n\t    Tone.AmplitudeEnvelope = function () {\n\t        Tone.Envelope.apply(this, arguments);\n\t        /**\n\t\t\t *  the input node\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this.input = this.output = new Tone.Gain();\n\t        this._sig.connect(this.output.gain);\n\t    };\n\t    Tone.extend(Tone.AmplitudeEnvelope, Tone.Envelope);\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.AmplitudeEnvelope}  this\n\t\t */\n\t    Tone.AmplitudeEnvelope.prototype.dispose = function () {\n\t        Tone.Envelope.prototype.dispose.call(this);\n\t        return this;\n\t    };\n\t    return Tone.AmplitudeEnvelope;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  AnalyserNode.getFloatTimeDomainData polyfill\n\t\t *  @private\n\t\t */\n\t    if (Tone.supported) {\n\t        if (!AnalyserNode.prototype.getFloatTimeDomainData) {\n\t            //referenced https://github.com/mohayonao/get-float-time-domain-data\n\t            AnalyserNode.prototype.getFloatTimeDomainData = function (array) {\n\t                var uint8 = new Uint8Array(array.length);\n\t                this.getByteTimeDomainData(uint8);\n\t                for (var i = 0; i < uint8.length; i++) {\n\t                    array[i] = (uint8[i] - 128) / 128;\n\t                }\n\t            };\n\t        }\n\t    }\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Wrapper around the native Web Audio's\n\t\t *          [AnalyserNode](http://webaudio.github.io/web-audio-api/#idl-def-AnalyserNode).\n\t\t *          Extracts FFT or Waveform data from the incoming signal.\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {String=} type The return type of the analysis, either \"fft\", or \"waveform\".\n\t\t *  @param {Number=} size The size of the FFT. Value must be a power of\n\t\t *                       two in the range 32 to 32768.\n\t\t */\n\t    Tone.Analyser = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'type',\n\t            'size'\n\t        ], Tone.Analyser);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The analyser node.\n\t\t\t *  @private\n\t\t\t *  @type {AnalyserNode}\n\t\t\t */\n\t        this._analyser = this.input = this.output = this.context.createAnalyser();\n\t        /**\n\t\t\t *  The analysis type\n\t\t\t *  @type {String}\n\t\t\t *  @private\n\t\t\t */\n\t        this._type = options.type;\n\t        /**\n\t\t\t *  The buffer that the FFT data is written to\n\t\t\t *  @type {TypedArray}\n\t\t\t *  @private\n\t\t\t */\n\t        this._buffer = null;\n\t        //set the values initially\n\t        this.size = options.size;\n\t        this.type = options.type;\n\t    };\n\t    Tone.extend(Tone.Analyser, Tone.AudioNode);\n\t    /**\n\t\t *  The default values.\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.Analyser.defaults = {\n\t        'size': 1024,\n\t        'type': 'fft',\n\t        'smoothing': 0.8\n\t    };\n\t    /**\n\t\t *  Possible return types of analyser.getValue()\n\t\t *  @enum {String}\n\t\t */\n\t    Tone.Analyser.Type = {\n\t        Waveform: 'waveform',\n\t        FFT: 'fft'\n\t    };\n\t    /**\n\t\t *  Run the analysis given the current settings and return the\n\t\t *  result as a TypedArray.\n\t\t *  @returns {TypedArray}\n\t\t */\n\t    Tone.Analyser.prototype.getValue = function () {\n\t        if (this._type === Tone.Analyser.Type.FFT) {\n\t            this._analyser.getFloatFrequencyData(this._buffer);\n\t        } else if (this._type === Tone.Analyser.Type.Waveform) {\n\t            this._analyser.getFloatTimeDomainData(this._buffer);\n\t        }\n\t        return this._buffer;\n\t    };\n\t    /**\n\t\t *  The size of analysis. This must be a power of two in the range 32 to 32768.\n\t\t *  @memberOf Tone.Analyser#\n\t\t *  @type {Number}\n\t\t *  @name size\n\t\t */\n\t    Object.defineProperty(Tone.Analyser.prototype, 'size', {\n\t        get: function () {\n\t            return this._analyser.frequencyBinCount;\n\t        },\n\t        set: function (size) {\n\t            this._analyser.fftSize = size * 2;\n\t            this._buffer = new Float32Array(size);\n\t        }\n\t    });\n\t    /**\n\t\t *  The analysis function returned by analyser.getValue(), either \"fft\" or \"waveform\".\n\t\t *  @memberOf Tone.Analyser#\n\t\t *  @type {String}\n\t\t *  @name type\n\t\t */\n\t    Object.defineProperty(Tone.Analyser.prototype, 'type', {\n\t        get: function () {\n\t            return this._type;\n\t        },\n\t        set: function (type) {\n\t            if (type !== Tone.Analyser.Type.Waveform && type !== Tone.Analyser.Type.FFT) {\n\t                throw new TypeError('Tone.Analyser: invalid type: ' + type);\n\t            }\n\t            this._type = type;\n\t        }\n\t    });\n\t    /**\n\t\t *  0 represents no time averaging with the last analysis frame.\n\t\t *  @memberOf Tone.Analyser#\n\t\t *  @type {NormalRange}\n\t\t *  @name smoothing\n\t\t */\n\t    Object.defineProperty(Tone.Analyser.prototype, 'smoothing', {\n\t        get: function () {\n\t            return this._analyser.smoothingTimeConstant;\n\t        },\n\t        set: function (val) {\n\t            this._analyser.smoothingTimeConstant = val;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.Analyser}  this\n\t\t */\n\t    Tone.Analyser.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._analyser.disconnect();\n\t        this._analyser = null;\n\t        this._buffer = null;\n\t    };\n\t    return Tone.Analyser;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Compressor is a thin wrapper around the Web Audio\n\t\t *         [DynamicsCompressorNode](http://webaudio.github.io/web-audio-api/#the-dynamicscompressornode-interface).\n\t\t *         Compression reduces the volume of loud sounds or amplifies quiet sounds\n\t\t *         by narrowing or \"compressing\" an audio signal's dynamic range.\n\t\t *         Read more on [Wikipedia](https://en.wikipedia.org/wiki/Dynamic_range_compression).\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t *  @param {Decibels|Object} [threshold] The value above which the compression starts to be applied.\n\t\t *  @param {Positive} [ratio] The gain reduction ratio.\n\t\t *  @example\n\t\t * var comp = new Tone.Compressor(-30, 3);\n\t\t */\n\t    Tone.Compressor = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'threshold',\n\t            'ratio'\n\t        ], Tone.Compressor);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  the compressor node\n\t\t\t *  @type {DynamicsCompressorNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._compressor = this.input = this.output = this.context.createDynamicsCompressor();\n\t        /**\n\t\t\t *  the threshold vaue\n\t\t\t *  @type {Decibels}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.threshold = new Tone.Param({\n\t            'param': this._compressor.threshold,\n\t            'units': Tone.Type.Decibels,\n\t            'convert': false\n\t        });\n\t        /**\n\t\t\t *  The attack parameter\n\t\t\t *  @type {Time}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.attack = new Tone.Param(this._compressor.attack, Tone.Type.Time);\n\t        /**\n\t\t\t *  The release parameter\n\t\t\t *  @type {Time}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.release = new Tone.Param(this._compressor.release, Tone.Type.Time);\n\t        /**\n\t\t\t *  The knee parameter\n\t\t\t *  @type {Decibels}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.knee = new Tone.Param({\n\t            'param': this._compressor.knee,\n\t            'units': Tone.Type.Decibels,\n\t            'convert': false\n\t        });\n\t        /**\n\t\t\t *  The ratio value\n\t\t\t *  @type {Number}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.ratio = new Tone.Param({\n\t            'param': this._compressor.ratio,\n\t            'convert': false\n\t        });\n\t        //set the defaults\n\t        this._readOnly([\n\t            'knee',\n\t            'release',\n\t            'attack',\n\t            'ratio',\n\t            'threshold'\n\t        ]);\n\t        this.set(options);\n\t    };\n\t    Tone.extend(Tone.Compressor, Tone.AudioNode);\n\t    /**\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Compressor.defaults = {\n\t        'ratio': 12,\n\t        'threshold': -24,\n\t        'release': 0.25,\n\t        'attack': 0.003,\n\t        'knee': 30\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Compressor} this\n\t\t */\n\t    Tone.Compressor.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable([\n\t            'knee',\n\t            'release',\n\t            'attack',\n\t            'ratio',\n\t            'threshold'\n\t        ]);\n\t        this._compressor.disconnect();\n\t        this._compressor = null;\n\t        this.attack.dispose();\n\t        this.attack = null;\n\t        this.release.dispose();\n\t        this.release = null;\n\t        this.threshold.dispose();\n\t        this.threshold = null;\n\t        this.ratio.dispose();\n\t        this.ratio = null;\n\t        this.knee.dispose();\n\t        this.knee = null;\n\t        return this;\n\t    };\n\t    return Tone.Compressor;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Add a signal and a number or two signals. When no value is\n\t\t *         passed into the constructor, Tone.Add will sum <code>input[0]</code>\n\t\t *         and <code>input[1]</code>. If a value is passed into the constructor, \n\t\t *         the it will be added to the input.\n\t\t *  \n\t\t *  @constructor\n\t\t *  @extends {Tone.Signal}\n\t\t *  @param {number=} value If no value is provided, Tone.Add will sum the first\n\t\t *                         and second inputs. \n\t\t *  @example\n\t\t * var signal = new Tone.Signal(2);\n\t\t * var add = new Tone.Add(2);\n\t\t * signal.connect(add);\n\t\t * //the output of add equals 4\n\t\t *  @example\n\t\t * //if constructed with no arguments\n\t\t * //it will add the first and second inputs\n\t\t * var add = new Tone.Add();\n\t\t * var sig0 = new Tone.Signal(3).connect(add, 0, 0);\n\t\t * var sig1 = new Tone.Signal(4).connect(add, 0, 1);\n\t\t * //the output of add equals 7. \n\t\t */\n\t    Tone.Add = function (value) {\n\t        Tone.Signal.call(this);\n\t        this.createInsOuts(2, 0);\n\t        /**\n\t\t\t *  the summing node\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sum = this.input[0] = this.input[1] = this.output = new Tone.Gain();\n\t        /**\n\t\t\t *  @private\n\t\t\t *  @type {Tone.Signal}\n\t\t\t */\n\t        this._param = this.input[1] = new Tone.Signal(value);\n\t        this._param.connect(this._sum);\n\t    };\n\t    Tone.extend(Tone.Add, Tone.Signal);\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Add} this\n\t\t */\n\t    Tone.Add.prototype.dispose = function () {\n\t        Tone.Signal.prototype.dispose.call(this);\n\t        this._sum.dispose();\n\t        this._sum = null;\n\t        return this;\n\t    };\n\t    return Tone.Add;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Multiply two incoming signals. Or, if a number is given in the constructor,\n\t\t *          multiplies the incoming signal by that value.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Signal}\n\t\t *  @param {number=} value Constant value to multiple. If no value is provided,\n\t\t *                         it will return the product of the first and second inputs\n\t\t *  @example\n\t\t * var mult = new Tone.Multiply();\n\t\t * var sigA = new Tone.Signal(3);\n\t\t * var sigB = new Tone.Signal(4);\n\t\t * sigA.connect(mult, 0, 0);\n\t\t * sigB.connect(mult, 0, 1);\n\t\t * //output of mult is 12.\n\t\t *  @example\n\t\t * var mult = new Tone.Multiply(10);\n\t\t * var sig = new Tone.Signal(2).connect(mult);\n\t\t * //the output of mult is 20.\n\t\t */\n\t    Tone.Multiply = function (value) {\n\t        Tone.Signal.call(this);\n\t        this.createInsOuts(2, 0);\n\t        /**\n\t\t\t *  the input node is the same as the output node\n\t\t\t *  it is also the GainNode which handles the scaling of incoming signal\n\t\t\t *\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._mult = this.input[0] = this.output = new Tone.Gain();\n\t        /**\n\t\t\t *  the scaling parameter\n\t\t\t *  @type {AudioParam}\n\t\t\t *  @private\n\t\t\t */\n\t        this._param = this.input[1] = this.output.gain;\n\t        this.value = Tone.defaultArg(value, 0);\n\t    };\n\t    Tone.extend(Tone.Multiply, Tone.Signal);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Multiply} this\n\t\t */\n\t    Tone.Multiply.prototype.dispose = function () {\n\t        Tone.Signal.prototype.dispose.call(this);\n\t        this._mult.dispose();\n\t        this._mult = null;\n\t        this._param = null;\n\t        return this;\n\t    };\n\t    return Tone.Multiply;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Negate the incoming signal. i.e. an input signal of 10 will output -10\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @example\n\t\t * var neg = new Tone.Negate();\n\t\t * var sig = new Tone.Signal(-2).connect(neg);\n\t\t * //output of neg is positive 2. \n\t\t */\n\t    Tone.Negate = function () {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  negation is done by multiplying by -1\n\t\t\t *  @type {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._multiply = this.input = this.output = new Tone.Multiply(-1);\n\t    };\n\t    Tone.extend(Tone.Negate, Tone.SignalBase);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Negate} this\n\t\t */\n\t    Tone.Negate.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._multiply.dispose();\n\t        this._multiply = null;\n\t        return this;\n\t    };\n\t    return Tone.Negate;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Subtract the signal connected to <code>input[1]</code> from the signal connected \n\t\t *         to <code>input[0]</code>. If an argument is provided in the constructor, the \n\t\t *         signals <code>.value</code> will be subtracted from the incoming signal.\n\t\t *\n\t\t *  @extends {Tone.Signal}\n\t\t *  @constructor\n\t\t *  @param {number=} value The value to subtract from the incoming signal. If the value\n\t\t *                         is omitted, it will subtract the second signal from the first.\n\t\t *  @example\n\t\t * var sub = new Tone.Subtract(1);\n\t\t * var sig = new Tone.Signal(4).connect(sub);\n\t\t * //the output of sub is 3. \n\t\t *  @example\n\t\t * var sub = new Tone.Subtract();\n\t\t * var sigA = new Tone.Signal(10);\n\t\t * var sigB = new Tone.Signal(2.5);\n\t\t * sigA.connect(sub, 0, 0);\n\t\t * sigB.connect(sub, 0, 1);\n\t\t * //output of sub is 7.5\n\t\t */\n\t    Tone.Subtract = function (value) {\n\t        Tone.Signal.call(this);\n\t        this.createInsOuts(2, 0);\n\t        /**\n\t\t\t *  the summing node\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sum = this.input[0] = this.output = new Tone.Gain();\n\t        /**\n\t\t\t *  negate the input of the second input before connecting it\n\t\t\t *  to the summing node.\n\t\t\t *  @type {Tone.Negate}\n\t\t\t *  @private\n\t\t\t */\n\t        this._neg = new Tone.Negate();\n\t        /**\n\t\t\t *  the node where the value is set\n\t\t\t *  @private\n\t\t\t *  @type {Tone.Signal}\n\t\t\t */\n\t        this._param = this.input[1] = new Tone.Signal(value);\n\t        this._param.chain(this._neg, this._sum);\n\t    };\n\t    Tone.extend(Tone.Subtract, Tone.Signal);\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.SignalBase} this\n\t\t */\n\t    Tone.Subtract.prototype.dispose = function () {\n\t        Tone.Signal.prototype.dispose.call(this);\n\t        this._neg.dispose();\n\t        this._neg = null;\n\t        this._sum.disconnect();\n\t        this._sum = null;\n\t        return this;\n\t    };\n\t    return Tone.Subtract;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Convert an incoming signal between 0, 1 to an equal power gain scale.\n\t\t *\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @constructor\n\t\t *  @example\n\t\t * var eqPowGain = new Tone.EqualPowerGain();\n\t\t */\n\t    Tone.EqualPowerGain = function () {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  @type {Tone.WaveShaper}\n\t\t\t *  @private\n\t\t\t */\n\t        this._eqPower = this.input = this.output = new Tone.WaveShaper(function (val) {\n\t            if (Math.abs(val) < 0.001) {\n\t                //should output 0 when input is 0\n\t                return 0;\n\t            } else {\n\t                return Tone.equalPowerScale(val);\n\t            }\n\t        }.bind(this), 4096);\n\t    };\n\t    Tone.extend(Tone.EqualPowerGain, Tone.SignalBase);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.EqualPowerGain} this\n\t\t */\n\t    Tone.EqualPowerGain.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._eqPower.dispose();\n\t        this._eqPower = null;\n\t        return this;\n\t    };\n\t    return Tone.EqualPowerGain;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t * @class  Tone.Crossfade provides equal power fading between two inputs.\n\t\t *         More on crossfading technique [here](https://en.wikipedia.org/wiki/Fade_(audio_engineering)#Crossfading).\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {NormalRange} [initialFade=0.5]\n\t\t * @example\n\t\t * var crossFade = new Tone.CrossFade(0.5);\n\t\t * //connect effect A to crossfade from\n\t\t * //effect output 0 to crossfade input 0\n\t\t * effectA.connect(crossFade, 0, 0);\n\t\t * //connect effect B to crossfade from\n\t\t * //effect output 0 to crossfade input 1\n\t\t * effectB.connect(crossFade, 0, 1);\n\t\t * crossFade.fade.value = 0;\n\t\t * // ^ only effectA is output\n\t\t * crossFade.fade.value = 1;\n\t\t * // ^ only effectB is output\n\t\t * crossFade.fade.value = 0.5;\n\t\t * // ^ the two signals are mixed equally.\n\t\t */\n\t    Tone.CrossFade = function (initialFade) {\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(2, 1);\n\t        /**\n\t\t\t *  Alias for <code>input[0]</code>.\n\t\t\t *  @type {Tone.Gain}\n\t\t\t */\n\t        this.a = this.input[0] = new Tone.Gain();\n\t        /**\n\t\t\t *  Alias for <code>input[1]</code>.\n\t\t\t *  @type {Tone.Gain}\n\t\t\t */\n\t        this.b = this.input[1] = new Tone.Gain();\n\t        /**\n\t\t\t * \tThe mix between the two inputs. A fade value of 0\n\t\t\t * \twill output 100% <code>input[0]</code> and\n\t\t\t * \ta value of 1 will output 100% <code>input[1]</code>.\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.fade = new Tone.Signal(Tone.defaultArg(initialFade, 0.5), Tone.Type.NormalRange);\n\t        /**\n\t\t\t *  equal power gain cross fade\n\t\t\t *  @private\n\t\t\t *  @type {Tone.EqualPowerGain}\n\t\t\t */\n\t        this._equalPowerA = new Tone.EqualPowerGain();\n\t        /**\n\t\t\t *  equal power gain cross fade\n\t\t\t *  @private\n\t\t\t *  @type {Tone.EqualPowerGain}\n\t\t\t */\n\t        this._equalPowerB = new Tone.EqualPowerGain();\n\t        /**\n\t\t\t *  invert the incoming signal\n\t\t\t *  @private\n\t\t\t *  @type {Tone}\n\t\t\t */\n\t        this._one = this.context.getConstant(1);\n\t        /**\n\t\t\t *  invert the incoming signal\n\t\t\t *  @private\n\t\t\t *  @type {Tone.Subtract}\n\t\t\t */\n\t        this._invert = new Tone.Subtract();\n\t        //connections\n\t        this.a.connect(this.output);\n\t        this.b.connect(this.output);\n\t        this.fade.chain(this._equalPowerB, this.b.gain);\n\t        this._one.connect(this._invert, 0, 0);\n\t        this.fade.connect(this._invert, 0, 1);\n\t        this._invert.chain(this._equalPowerA, this.a.gain);\n\t        this._readOnly('fade');\n\t    };\n\t    Tone.extend(Tone.CrossFade, Tone.AudioNode);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.CrossFade} this\n\t\t */\n\t    Tone.CrossFade.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable('fade');\n\t        this._equalPowerA.dispose();\n\t        this._equalPowerA = null;\n\t        this._equalPowerB.dispose();\n\t        this._equalPowerB = null;\n\t        this.fade.dispose();\n\t        this.fade = null;\n\t        this._invert.dispose();\n\t        this._invert = null;\n\t        this._one = null;\n\t        this.a.dispose();\n\t        this.a = null;\n\t        this.b.dispose();\n\t        this.b = null;\n\t        return this;\n\t    };\n\t    return Tone.CrossFade;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Filter is a filter which allows for all of the same native methods\n\t\t *          as the [BiquadFilterNode](http://webaudio.github.io/web-audio-api/#the-biquadfilternode-interface).\n\t\t *          Tone.Filter has the added ability to set the filter rolloff at -12\n\t\t *          (default), -24 and -48.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Frequency|Object} [frequency] The cutoff frequency of the filter.\n\t\t *  @param {string=} type The type of filter.\n\t\t *  @param {number=} rolloff The drop in decibels per octave after the cutoff frequency.\n\t\t *                            3 choices: -12, -24, and -48\n\t\t *  @example\n\t\t *  var filter = new Tone.Filter(200, \"highpass\");\n\t\t */\n\t    Tone.Filter = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'type',\n\t            'rolloff'\n\t        ], Tone.Filter);\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(1, 1);\n\t        /**\n\t\t\t *  the filter(s)\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._filters = [];\n\t        /**\n\t\t\t *  The cutoff frequency of the filter.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The detune parameter\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = new Tone.Signal(0, Tone.Type.Cents);\n\t        /**\n\t\t\t *  The gain of the filter, only used in certain filter types\n\t\t\t *  @type {Number}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.gain = new Tone.Signal({\n\t            'value': options.gain,\n\t            'convert': false\n\t        });\n\t        /**\n\t\t\t *  The Q or Quality of the filter\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.Q = new Tone.Signal(options.Q);\n\t        /**\n\t\t\t *  the type of the filter\n\t\t\t *  @type {string}\n\t\t\t *  @private\n\t\t\t */\n\t        this._type = options.type;\n\t        /**\n\t\t\t *  the rolloff value of the filter\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._rolloff = options.rolloff;\n\t        //set the rolloff;\n\t        this.rolloff = options.rolloff;\n\t        this._readOnly([\n\t            'detune',\n\t            'frequency',\n\t            'gain',\n\t            'Q'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.Filter, Tone.AudioNode);\n\t    /**\n\t\t *  the default parameters\n\t\t *\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Filter.defaults = {\n\t        'type': 'lowpass',\n\t        'frequency': 350,\n\t        'rolloff': -12,\n\t        'Q': 1,\n\t        'gain': 0\n\t    };\n\t    /**\n\t\t * The type of the filter. Types: \"lowpass\", \"highpass\",\n\t\t * \"bandpass\", \"lowshelf\", \"highshelf\", \"notch\", \"allpass\", or \"peaking\".\n\t\t * @memberOf Tone.Filter#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.Filter.prototype, 'type', {\n\t        get: function () {\n\t            return this._type;\n\t        },\n\t        set: function (type) {\n\t            var types = [\n\t                'lowpass',\n\t                'highpass',\n\t                'bandpass',\n\t                'lowshelf',\n\t                'highshelf',\n\t                'notch',\n\t                'allpass',\n\t                'peaking'\n\t            ];\n\t            if (types.indexOf(type) === -1) {\n\t                throw new TypeError('Tone.Filter: invalid type ' + type);\n\t            }\n\t            this._type = type;\n\t            for (var i = 0; i < this._filters.length; i++) {\n\t                this._filters[i].type = type;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The rolloff of the filter which is the drop in db\n\t\t * per octave. Implemented internally by cascading filters.\n\t\t * Only accepts the values -12, -24, -48 and -96.\n\t\t * @memberOf Tone.Filter#\n\t\t * @type {number}\n\t\t * @name rolloff\n\t\t */\n\t    Object.defineProperty(Tone.Filter.prototype, 'rolloff', {\n\t        get: function () {\n\t            return this._rolloff;\n\t        },\n\t        set: function (rolloff) {\n\t            rolloff = parseInt(rolloff, 10);\n\t            var possibilities = [\n\t                -12,\n\t                -24,\n\t                -48,\n\t                -96\n\t            ];\n\t            var cascadingCount = possibilities.indexOf(rolloff);\n\t            //check the rolloff is valid\n\t            if (cascadingCount === -1) {\n\t                throw new RangeError('Tone.Filter: rolloff can only be -12, -24, -48 or -96');\n\t            }\n\t            cascadingCount += 1;\n\t            this._rolloff = rolloff;\n\t            //first disconnect the filters and throw them away\n\t            this.input.disconnect();\n\t            for (var i = 0; i < this._filters.length; i++) {\n\t                this._filters[i].disconnect();\n\t                this._filters[i] = null;\n\t            }\n\t            this._filters = new Array(cascadingCount);\n\t            for (var count = 0; count < cascadingCount; count++) {\n\t                var filter = this.context.createBiquadFilter();\n\t                filter.type = this._type;\n\t                this.frequency.connect(filter.frequency);\n\t                this.detune.connect(filter.detune);\n\t                this.Q.connect(filter.Q);\n\t                this.gain.connect(filter.gain);\n\t                this._filters[count] = filter;\n\t            }\n\t            //connect them up\n\t            var connectionChain = [this.input].concat(this._filters).concat([this.output]);\n\t            Tone.connectSeries.apply(Tone, connectionChain);\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return {Tone.Filter} this\n\t\t */\n\t    Tone.Filter.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        for (var i = 0; i < this._filters.length; i++) {\n\t            this._filters[i].disconnect();\n\t            this._filters[i] = null;\n\t        }\n\t        this._filters = null;\n\t        this._writable([\n\t            'detune',\n\t            'frequency',\n\t            'gain',\n\t            'Q'\n\t        ]);\n\t        this.frequency.dispose();\n\t        this.Q.dispose();\n\t        this.frequency = null;\n\t        this.Q = null;\n\t        this.detune.dispose();\n\t        this.detune = null;\n\t        this.gain.dispose();\n\t        this.gain = null;\n\t        return this;\n\t    };\n\t    return Tone.Filter;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Split the incoming signal into three bands (low, mid, high)\n\t\t *         with two crossover frequency controls.\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t *  @param {Frequency|Object} [lowFrequency] the low/mid crossover frequency\n\t\t *  @param {Frequency} [highFrequency] the mid/high crossover frequency\n\t\t */\n\t    Tone.MultibandSplit = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'lowFrequency',\n\t            'highFrequency'\n\t        ], Tone.MultibandSplit);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  the input\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this.input = new Tone.Gain();\n\t        /**\n\t\t\t *  the outputs\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this.output = new Array(3);\n\t        /**\n\t\t\t *  The low band. Alias for <code>output[0]</code>\n\t\t\t *  @type {Tone.Filter}\n\t\t\t */\n\t        this.low = this.output[0] = new Tone.Filter(0, 'lowpass');\n\t        /**\n\t\t\t *  the lower filter of the mid band\n\t\t\t *  @type {Tone.Filter}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lowMidFilter = new Tone.Filter(0, 'highpass');\n\t        /**\n\t\t\t *  The mid band output. Alias for <code>output[1]</code>\n\t\t\t *  @type {Tone.Filter}\n\t\t\t */\n\t        this.mid = this.output[1] = new Tone.Filter(0, 'lowpass');\n\t        /**\n\t\t\t *  The high band output. Alias for <code>output[2]</code>\n\t\t\t *  @type {Tone.Filter}\n\t\t\t */\n\t        this.high = this.output[2] = new Tone.Filter(0, 'highpass');\n\t        /**\n\t\t\t *  The low/mid crossover frequency.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.lowFrequency = new Tone.Signal(options.lowFrequency, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The mid/high crossover frequency.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.highFrequency = new Tone.Signal(options.highFrequency, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The quality of all the filters\n\t\t\t *  @type {Number}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.Q = new Tone.Signal(options.Q);\n\t        this.input.fan(this.low, this.high);\n\t        this.input.chain(this._lowMidFilter, this.mid);\n\t        //the frequency control signal\n\t        this.lowFrequency.connect(this.low.frequency);\n\t        this.lowFrequency.connect(this._lowMidFilter.frequency);\n\t        this.highFrequency.connect(this.mid.frequency);\n\t        this.highFrequency.connect(this.high.frequency);\n\t        //the Q value\n\t        this.Q.connect(this.low.Q);\n\t        this.Q.connect(this._lowMidFilter.Q);\n\t        this.Q.connect(this.mid.Q);\n\t        this.Q.connect(this.high.Q);\n\t        this._readOnly([\n\t            'high',\n\t            'mid',\n\t            'low',\n\t            'highFrequency',\n\t            'lowFrequency'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.MultibandSplit, Tone.AudioNode);\n\t    /**\n\t\t *  @private\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.MultibandSplit.defaults = {\n\t        'lowFrequency': 400,\n\t        'highFrequency': 2500,\n\t        'Q': 1\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.MultibandSplit} this\n\t\t */\n\t    Tone.MultibandSplit.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable([\n\t            'high',\n\t            'mid',\n\t            'low',\n\t            'highFrequency',\n\t            'lowFrequency'\n\t        ]);\n\t        this.low.dispose();\n\t        this.low = null;\n\t        this._lowMidFilter.dispose();\n\t        this._lowMidFilter = null;\n\t        this.mid.dispose();\n\t        this.mid = null;\n\t        this.high.dispose();\n\t        this.high = null;\n\t        this.lowFrequency.dispose();\n\t        this.lowFrequency = null;\n\t        this.highFrequency.dispose();\n\t        this.highFrequency = null;\n\t        this.Q.dispose();\n\t        this.Q = null;\n\t        return this;\n\t    };\n\t    return Tone.MultibandSplit;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.EQ3 is a three band EQ with control over low, mid, and high gain as\n\t\t *         well as the low and high crossover frequencies.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *\n\t\t *  @param {Decibels|Object} [lowLevel] The gain applied to the lows.\n\t\t *  @param {Decibels} [midLevel] The gain applied to the mid.\n\t\t *  @param {Decibels} [highLevel] The gain applied to the high.\n\t\t *  @example\n\t\t * var eq = new Tone.EQ3(-10, 3, -20);\n\t\t */\n\t    Tone.EQ3 = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'low',\n\t            'mid',\n\t            'high'\n\t        ], Tone.EQ3);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  the output node\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this.output = new Tone.Gain();\n\t        /**\n\t\t\t *  the multiband split\n\t\t\t *  @type {Tone.MultibandSplit}\n\t\t\t *  @private\n\t\t\t */\n\t        this._multibandSplit = this.input = new Tone.MultibandSplit({\n\t            'lowFrequency': options.lowFrequency,\n\t            'highFrequency': options.highFrequency\n\t        });\n\t        /**\n\t\t\t *  The gain for the lower signals\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lowGain = new Tone.Gain(options.low, Tone.Type.Decibels);\n\t        /**\n\t\t\t *  The gain for the mid signals\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._midGain = new Tone.Gain(options.mid, Tone.Type.Decibels);\n\t        /**\n\t\t\t * The gain in decibels of the high part\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t        this._highGain = new Tone.Gain(options.high, Tone.Type.Decibels);\n\t        /**\n\t\t\t * The gain in decibels of the low part\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t */\n\t        this.low = this._lowGain.gain;\n\t        /**\n\t\t\t * The gain in decibels of the mid part\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t */\n\t        this.mid = this._midGain.gain;\n\t        /**\n\t\t\t * The gain in decibels of the high part\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t */\n\t        this.high = this._highGain.gain;\n\t        /**\n\t\t\t *  The Q value for all of the filters.\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.Q = this._multibandSplit.Q;\n\t        /**\n\t\t\t *  The low/mid crossover frequency.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.lowFrequency = this._multibandSplit.lowFrequency;\n\t        /**\n\t\t\t *  The mid/high crossover frequency.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.highFrequency = this._multibandSplit.highFrequency;\n\t        //the frequency bands\n\t        this._multibandSplit.low.chain(this._lowGain, this.output);\n\t        this._multibandSplit.mid.chain(this._midGain, this.output);\n\t        this._multibandSplit.high.chain(this._highGain, this.output);\n\t        this._readOnly([\n\t            'low',\n\t            'mid',\n\t            'high',\n\t            'lowFrequency',\n\t            'highFrequency'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.EQ3, Tone.AudioNode);\n\t    /**\n\t\t *  the default values\n\t\t */\n\t    Tone.EQ3.defaults = {\n\t        'low': 0,\n\t        'mid': 0,\n\t        'high': 0,\n\t        'lowFrequency': 400,\n\t        'highFrequency': 2500\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.EQ3} this\n\t\t */\n\t    Tone.EQ3.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable([\n\t            'low',\n\t            'mid',\n\t            'high',\n\t            'lowFrequency',\n\t            'highFrequency'\n\t        ]);\n\t        this._multibandSplit.dispose();\n\t        this._multibandSplit = null;\n\t        this.lowFrequency = null;\n\t        this.highFrequency = null;\n\t        this._lowGain.dispose();\n\t        this._lowGain = null;\n\t        this._midGain.dispose();\n\t        this._midGain = null;\n\t        this._highGain.dispose();\n\t        this._highGain = null;\n\t        this.low = null;\n\t        this.mid = null;\n\t        this.high = null;\n\t        this.Q = null;\n\t        return this;\n\t    };\n\t    return Tone.EQ3;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Performs a linear scaling on an input signal.\n\t\t *          Scales a NormalRange input to between\n\t\t *          outputMin and outputMax.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @param {number} [outputMin=0] The output value when the input is 0. \n\t\t *  @param {number} [outputMax=1]\tThe output value when the input is 1. \n\t\t *  @example\n\t\t * var scale = new Tone.Scale(50, 100);\n\t\t * var signal = new Tone.Signal(0.5).connect(scale);\n\t\t * //the output of scale equals 75\n\t\t */\n\t    Tone.Scale = function (outputMin, outputMax) {\n\t        Tone.SignalBase.call(this);\n\t        /** \n\t\t\t *  @private\n\t\t\t *  @type {number}\n\t\t\t */\n\t        this._outputMin = Tone.defaultArg(outputMin, 0);\n\t        /** \n\t\t\t *  @private\n\t\t\t *  @type {number}\n\t\t\t */\n\t        this._outputMax = Tone.defaultArg(outputMax, 1);\n\t        /** \n\t\t\t *  @private\n\t\t\t *  @type {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._scale = this.input = new Tone.Multiply(1);\n\t        /** \n\t\t\t *  @private\n\t\t\t *  @type {Tone.Add}\n\t\t\t *  @private\n\t\t\t */\n\t        this._add = this.output = new Tone.Add(0);\n\t        this._scale.connect(this._add);\n\t        this._setRange();\n\t    };\n\t    Tone.extend(Tone.Scale, Tone.SignalBase);\n\t    /**\n\t\t * The minimum output value. This number is output when \n\t\t * the value input value is 0. \n\t\t * @memberOf Tone.Scale#\n\t\t * @type {number}\n\t\t * @name min\n\t\t */\n\t    Object.defineProperty(Tone.Scale.prototype, 'min', {\n\t        get: function () {\n\t            return this._outputMin;\n\t        },\n\t        set: function (min) {\n\t            this._outputMin = min;\n\t            this._setRange();\n\t        }\n\t    });\n\t    /**\n\t\t * The maximum output value. This number is output when \n\t\t * the value input value is 1. \n\t\t * @memberOf Tone.Scale#\n\t\t * @type {number}\n\t\t * @name max\n\t\t */\n\t    Object.defineProperty(Tone.Scale.prototype, 'max', {\n\t        get: function () {\n\t            return this._outputMax;\n\t        },\n\t        set: function (max) {\n\t            this._outputMax = max;\n\t            this._setRange();\n\t        }\n\t    });\n\t    /**\n\t\t *  set the values\n\t\t *  @private\n\t\t */\n\t    Tone.Scale.prototype._setRange = function () {\n\t        this._add.value = this._outputMin;\n\t        this._scale.value = this._outputMax - this._outputMin;\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Scale} this\n\t\t */\n\t    Tone.Scale.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._add.dispose();\n\t        this._add = null;\n\t        this._scale.dispose();\n\t        this._scale = null;\n\t        return this;\n\t    };\n\t    return Tone.Scale;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class  Performs an exponential scaling on an input signal.\n\t\t *          Scales a NormalRange value [0,1] exponentially\n\t\t *          to the output range of outputMin to outputMax.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @param {number} [outputMin=0] The output value when the input is 0.\n\t\t *  @param {number} [outputMax=1]\tThe output value when the input is 1.\n\t\t *  @param {number} [exponent=2] The exponent which scales the incoming signal.\n\t\t *  @example\n\t\t * var scaleExp = new Tone.ScaleExp(0, 100, 2);\n\t\t * var signal = new Tone.Signal(0.5).connect(scaleExp);\n\t\t */\n\t    Tone.ScaleExp = function (outputMin, outputMax, exponent) {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  scale the input to the output range\n\t\t\t *  @type {Tone.Scale}\n\t\t\t *  @private\n\t\t\t */\n\t        this._scale = this.output = new Tone.Scale(outputMin, outputMax);\n\t        /**\n\t\t\t *  @private\n\t\t\t *  @type {Tone.Pow}\n\t\t\t *  @private\n\t\t\t */\n\t        this._exp = this.input = new Tone.Pow(Tone.defaultArg(exponent, 2));\n\t        this._exp.connect(this._scale);\n\t    };\n\t    Tone.extend(Tone.ScaleExp, Tone.SignalBase);\n\t    /**\n\t\t * Instead of interpolating linearly between the <code>min</code> and\n\t\t * <code>max</code> values, setting the exponent will interpolate between\n\t\t * the two values with an exponential curve.\n\t\t * @memberOf Tone.ScaleExp#\n\t\t * @type {number}\n\t\t * @name exponent\n\t\t */\n\t    Object.defineProperty(Tone.ScaleExp.prototype, 'exponent', {\n\t        get: function () {\n\t            return this._exp.value;\n\t        },\n\t        set: function (exp) {\n\t            this._exp.value = exp;\n\t        }\n\t    });\n\t    /**\n\t\t * The minimum output value. This number is output when\n\t\t * the value input value is 0.\n\t\t * @memberOf Tone.ScaleExp#\n\t\t * @type {number}\n\t\t * @name min\n\t\t */\n\t    Object.defineProperty(Tone.ScaleExp.prototype, 'min', {\n\t        get: function () {\n\t            return this._scale.min;\n\t        },\n\t        set: function (min) {\n\t            this._scale.min = min;\n\t        }\n\t    });\n\t    /**\n\t\t * The maximum output value. This number is output when\n\t\t * the value input value is 1.\n\t\t * @memberOf Tone.ScaleExp#\n\t\t * @type {number}\n\t\t * @name max\n\t\t */\n\t    Object.defineProperty(Tone.ScaleExp.prototype, 'max', {\n\t        get: function () {\n\t            return this._scale.max;\n\t        },\n\t        set: function (max) {\n\t            this._scale.max = max;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.ScaleExp} this\n\t\t */\n\t    Tone.ScaleExp.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._scale.dispose();\n\t        this._scale = null;\n\t        this._exp.dispose();\n\t        this._exp = null;\n\t        return this;\n\t    };\n\t    return Tone.ScaleExp;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Wrapper around Web Audio's native [DelayNode](http://webaudio.github.io/web-audio-api/#the-delaynode-interface).\n\t\t *  @extends {Tone}\n\t\t *  @param {Time=} delayTime The delay applied to the incoming signal.\n\t\t *  @param {Time=} maxDelay The maximum delay time.\n\t\t */\n\t    Tone.Delay = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'delayTime',\n\t            'maxDelay'\n\t        ], Tone.Delay);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t * The maximum delay time initialized with the node\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t        this._maxDelay = Math.max(this.toSeconds(options.maxDelay), this.toSeconds(options.delayTime));\n\t        /**\n\t\t\t *  The native delay node\n\t\t\t *  @type {DelayNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delayNode = this.input = this.output = this.context.createDelay(this._maxDelay);\n\t        /**\n\t\t\t *  The amount of time the incoming signal is\n\t\t\t *  delayed.\n\t\t\t *  @type {Time}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.delayTime = new Tone.Param({\n\t            'param': this._delayNode.delayTime,\n\t            'units': Tone.Type.Time,\n\t            'value': options.delayTime\n\t        });\n\t        this._readOnly('delayTime');\n\t    };\n\t    Tone.extend(Tone.Delay, Tone.AudioNode);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.Delay.defaults = {\n\t        'maxDelay': 1,\n\t        'delayTime': 0\n\t    };\n\t    /**\n\t\t * The maximum delay time. This cannot be changed. The value is passed into the constructor.\n\t\t * @memberof Tone.Delay#\n\t\t * @type {Time}\n\t\t * @name maxDelay\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Delay.prototype, 'maxDelay', {\n\t        get: function () {\n\t            return this._maxDelay;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.Delay}  this\n\t\t */\n\t    Tone.Delay.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._delayNode.disconnect();\n\t        this._delayNode = null;\n\t        this._writable('delayTime');\n\t        this.delayTime = null;\n\t        return this;\n\t    };\n\t    return Tone.Delay;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Comb filters are basic building blocks for physical modeling. Read more\n\t\t *         about comb filters on [CCRMA's website](https://ccrma.stanford.edu/~jos/pasp/Feedback_Comb_Filters.html).\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t *  @param {Time|Object} [delayTime] The delay time of the filter.\n\t\t *  @param {NormalRange=} resonance The amount of feedback the filter has.\n\t\t */\n\t    Tone.FeedbackCombFilter = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'delayTime',\n\t            'resonance'\n\t        ], Tone.FeedbackCombFilter);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  the delay node\n\t\t\t *  @type {DelayNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delay = this.input = this.output = new Tone.Delay(options.delayTime);\n\t        /**\n\t\t\t *  The amount of delay of the comb filter.\n\t\t\t *  @type {Time}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.delayTime = this._delay.delayTime;\n\t        /**\n\t\t\t *  the feedback node\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._feedback = new Tone.Gain(options.resonance, Tone.Type.NormalRange);\n\t        /**\n\t\t\t *  The amount of feedback of the delayed signal.\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.resonance = this._feedback.gain;\n\t        this._delay.chain(this._feedback, this._delay);\n\t        this._readOnly([\n\t            'resonance',\n\t            'delayTime'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.FeedbackCombFilter, Tone.AudioNode);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.FeedbackCombFilter.defaults = {\n\t        'delayTime': 0.1,\n\t        'resonance': 0.5\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.FeedbackCombFilter} this\n\t\t */\n\t    Tone.FeedbackCombFilter.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable([\n\t            'resonance',\n\t            'delayTime'\n\t        ]);\n\t        this._delay.dispose();\n\t        this._delay = null;\n\t        this.delayTime = null;\n\t        this._feedback.dispose();\n\t        this._feedback = null;\n\t        this.resonance = null;\n\t        return this;\n\t    };\n\t    return Tone.FeedbackCombFilter;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class  Get the current waveform data of the connected audio source.\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Number=} size The size of the FFT. Value must be a power of\n\t\t *                       two in the range 32 to 32768.\n\t\t */\n\t    Tone.FFT = function () {\n\t        var options = Tone.defaults(arguments, ['size'], Tone.FFT);\n\t        options.type = Tone.Analyser.Type.FFT;\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The analyser node.\n\t\t\t *  @private\n\t\t\t *  @type {Tone.Analyser}\n\t\t\t */\n\t        this._analyser = this.input = this.output = new Tone.Analyser(options);\n\t    };\n\t    Tone.extend(Tone.FFT, Tone.AudioNode);\n\t    /**\n\t\t *  The default values.\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.FFT.defaults = { 'size': 1024 };\n\t    /**\n\t\t *  Gets the waveform of the audio source. Returns the waveform data\n\t\t *  of length [size](#size) as a Float32Array with values between -1 and 1.\n\t\t *  @returns {TypedArray}\n\t\t */\n\t    Tone.FFT.prototype.getValue = function () {\n\t        return this._analyser.getValue();\n\t    };\n\t    /**\n\t\t *  The size of analysis. This must be a power of two in the range 32 to 32768.\n\t\t *  @memberOf Tone.FFT#\n\t\t *  @type {Number}\n\t\t *  @name size\n\t\t */\n\t    Object.defineProperty(Tone.FFT.prototype, 'size', {\n\t        get: function () {\n\t            return this._analyser.size;\n\t        },\n\t        set: function (size) {\n\t            this._analyser.size = size;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.FFT}  this\n\t\t */\n\t    Tone.FFT.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._analyser.dispose();\n\t        this._analyser = null;\n\t    };\n\t    return Tone.FFT;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Return the absolute value of an incoming signal.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @example\n\t\t * var signal = new Tone.Signal(-1);\n\t\t * var abs = new Tone.Abs();\n\t\t * signal.connect(abs);\n\t\t * //the output of abs is 1.\n\t\t */\n\t    Tone.Abs = function () {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  @type {Tone.LessThan}\n\t\t\t *  @private\n\t\t\t */\n\t        this._abs = this.input = this.output = new Tone.WaveShaper(function (val) {\n\t            if (Math.abs(val) < 0.001) {\n\t                return 0;\n\t            } else {\n\t                return Math.abs(val);\n\t            }\n\t        }, 1024);\n\t    };\n\t    Tone.extend(Tone.Abs, Tone.SignalBase);\n\t    /**\n\t\t *  dispose method\n\t\t *  @returns {Tone.Abs} this\n\t\t */\n\t    Tone.Abs.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._abs.dispose();\n\t        this._abs = null;\n\t        return this;\n\t    };\n\t    return Tone.Abs;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Follower is a  crude envelope follower which will follow\n\t\t *          the amplitude of an incoming signal.\n\t\t *          Take care with small (< 0.02) attack or decay values\n\t\t *          as follower has some ripple which is exaggerated\n\t\t *          at these values. Read more about envelope followers (also known\n\t\t *          as envelope detectors) on [Wikipedia](https://en.wikipedia.org/wiki/Envelope_detector).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Time|Object} [attack] The rate at which the follower rises.\n\t\t *  @param {Time=} release The rate at which the folower falls.\n\t\t *  @example\n\t\t * var follower = new Tone.Follower(0.2, 0.4);\n\t\t */\n\t    Tone.Follower = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'attack',\n\t            'release'\n\t        ], Tone.Follower);\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(1, 1);\n\t        /**\n\t\t\t *  @type {Tone.Abs}\n\t\t\t *  @private\n\t\t\t */\n\t        this._abs = new Tone.Abs();\n\t        /**\n\t\t\t *  the lowpass filter which smooths the input\n\t\t\t *  @type {BiquadFilterNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._filter = this.context.createBiquadFilter();\n\t        this._filter.type = 'lowpass';\n\t        this._filter.frequency.value = 0;\n\t        this._filter.Q.value = -100;\n\t        /**\n\t\t\t *  @type {WaveShaperNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._frequencyValues = new Tone.WaveShaper();\n\t        /**\n\t\t\t *  @type {Tone.Subtract}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sub = new Tone.Subtract();\n\t        /**\n\t\t\t *  @type {Tone.Delay}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delay = new Tone.Delay(this.blockTime);\n\t        /**\n\t\t\t *  this keeps it far from 0, even for very small differences\n\t\t\t *  @type {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._mult = new Tone.Multiply(10000);\n\t        /**\n\t\t\t *  @private\n\t\t\t *  @type {number}\n\t\t\t */\n\t        this._attack = options.attack;\n\t        /**\n\t\t\t *  @private\n\t\t\t *  @type {number}\n\t\t\t */\n\t        this._release = options.release;\n\t        //the smoothed signal to get the values\n\t        this.input.chain(this._abs, this._filter, this.output);\n\t        //the difference path\n\t        this._abs.connect(this._sub, 0, 1);\n\t        this._filter.chain(this._delay, this._sub);\n\t        //threshold the difference and use the thresh to set the frequency\n\t        this._sub.chain(this._mult, this._frequencyValues, this._filter.frequency);\n\t        //set the attack and release values in the table\n\t        this._setAttackRelease(this._attack, this._release);\n\t    };\n\t    Tone.extend(Tone.Follower, Tone.AudioNode);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Follower.defaults = {\n\t        'attack': 0.05,\n\t        'release': 0.5\n\t    };\n\t    /**\n\t\t *  sets the attack and release times in the wave shaper\n\t\t *  @param   {Time} attack\n\t\t *  @param   {Time} release\n\t\t *  @private\n\t\t */\n\t    Tone.Follower.prototype._setAttackRelease = function (attack, release) {\n\t        var minTime = this.blockTime;\n\t        attack = Tone.Time(attack).toFrequency();\n\t        release = Tone.Time(release).toFrequency();\n\t        attack = Math.max(attack, minTime);\n\t        release = Math.max(release, minTime);\n\t        this._frequencyValues.setMap(function (val) {\n\t            if (val <= 0) {\n\t                return attack;\n\t            } else {\n\t                return release;\n\t            }\n\t        });\n\t    };\n\t    /**\n\t\t * The attack time.\n\t\t * @memberOf Tone.Follower#\n\t\t * @type {Time}\n\t\t * @name attack\n\t\t */\n\t    Object.defineProperty(Tone.Follower.prototype, 'attack', {\n\t        get: function () {\n\t            return this._attack;\n\t        },\n\t        set: function (attack) {\n\t            this._attack = attack;\n\t            this._setAttackRelease(this._attack, this._release);\n\t        }\n\t    });\n\t    /**\n\t\t * The release time.\n\t\t * @memberOf Tone.Follower#\n\t\t * @type {Time}\n\t\t * @name release\n\t\t */\n\t    Object.defineProperty(Tone.Follower.prototype, 'release', {\n\t        get: function () {\n\t            return this._release;\n\t        },\n\t        set: function (release) {\n\t            this._release = release;\n\t            this._setAttackRelease(this._attack, this._release);\n\t        }\n\t    });\n\t    /**\n\t\t *  Borrows the connect method from Signal so that the output can be used\n\t\t *  as a Tone.Signal control signal.\n\t\t *  @function\n\t\t */\n\t    Tone.Follower.prototype.connect = Tone.SignalBase.prototype.connect;\n\t    /**\n\t\t *  dispose\n\t\t *  @returns {Tone.Follower} this\n\t\t */\n\t    Tone.Follower.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._filter.disconnect();\n\t        this._filter = null;\n\t        this._frequencyValues.disconnect();\n\t        this._frequencyValues = null;\n\t        this._delay.dispose();\n\t        this._delay = null;\n\t        this._sub.disconnect();\n\t        this._sub = null;\n\t        this._abs.dispose();\n\t        this._abs = null;\n\t        this._mult.dispose();\n\t        this._mult = null;\n\t        this._curve = null;\n\t        return this;\n\t    };\n\t    return Tone.Follower;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.ScaledEnvelop is an envelope which can be scaled\n\t\t *         to any range. It's useful for applying an envelope\n\t\t *         to a frequency or any other non-NormalRange signal\n\t\t *         parameter.\n\t\t *\n\t\t *  @extends {Tone.Envelope}\n\t\t *  @constructor\n\t\t *  @param {Time|Object} [attack]\tthe attack time in seconds\n\t\t *  @param {Time} [decay]\tthe decay time in seconds\n\t\t *  @param {number} [sustain] \ta percentage (0-1) of the full amplitude\n\t\t *  @param {Time} [release]\tthe release time in seconds\n\t\t *  @example\n\t\t *  var scaledEnv = new Tone.ScaledEnvelope({\n\t\t *  \t\"attack\" : 0.2,\n\t\t *  \t\"min\" : 200,\n\t\t *  \t\"max\" : 2000\n\t\t *  });\n\t\t *  scaledEnv.connect(oscillator.frequency);\n\t\t */\n\t    Tone.ScaledEnvelope = function () {\n\t        //get all of the defaults\n\t        var options = Tone.defaults(arguments, [\n\t            'attack',\n\t            'decay',\n\t            'sustain',\n\t            'release'\n\t        ], Tone.Envelope);\n\t        Tone.Envelope.call(this, options);\n\t        options = Tone.defaultArg(options, Tone.ScaledEnvelope.defaults);\n\t        /**\n\t\t\t *  scale the incoming signal by an exponent\n\t\t\t *  @type {Tone.Pow}\n\t\t\t *  @private\n\t\t\t */\n\t        this._exp = this.output = new Tone.Pow(options.exponent);\n\t        /**\n\t\t\t *  scale the signal to the desired range\n\t\t\t *  @type {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._scale = this.output = new Tone.Scale(options.min, options.max);\n\t        this._sig.chain(this._exp, this._scale);\n\t    };\n\t    Tone.extend(Tone.ScaledEnvelope, Tone.Envelope);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @static\n\t\t */\n\t    Tone.ScaledEnvelope.defaults = {\n\t        'min': 0,\n\t        'max': 1,\n\t        'exponent': 1\n\t    };\n\t    /**\n\t\t * The envelope's min output value. This is the value which it\n\t\t * starts at.\n\t\t * @memberOf Tone.ScaledEnvelope#\n\t\t * @type {number}\n\t\t * @name min\n\t\t */\n\t    Object.defineProperty(Tone.ScaledEnvelope.prototype, 'min', {\n\t        get: function () {\n\t            return this._scale.min;\n\t        },\n\t        set: function (min) {\n\t            this._scale.min = min;\n\t        }\n\t    });\n\t    /**\n\t\t * The envelope's max output value. In other words, the value\n\t\t * at the peak of the attack portion of the envelope.\n\t\t * @memberOf Tone.ScaledEnvelope#\n\t\t * @type {number}\n\t\t * @name max\n\t\t */\n\t    Object.defineProperty(Tone.ScaledEnvelope.prototype, 'max', {\n\t        get: function () {\n\t            return this._scale.max;\n\t        },\n\t        set: function (max) {\n\t            this._scale.max = max;\n\t        }\n\t    });\n\t    /**\n\t\t * The envelope's exponent value.\n\t\t * @memberOf Tone.ScaledEnvelope#\n\t\t * @type {number}\n\t\t * @name exponent\n\t\t */\n\t    Object.defineProperty(Tone.ScaledEnvelope.prototype, 'exponent', {\n\t        get: function () {\n\t            return this._exp.value;\n\t        },\n\t        set: function (exp) {\n\t            this._exp.value = exp;\n\t        }\n\t    });\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.ScaledEnvelope} this\n\t\t */\n\t    Tone.ScaledEnvelope.prototype.dispose = function () {\n\t        Tone.Envelope.prototype.dispose.call(this);\n\t        this._scale.dispose();\n\t        this._scale = null;\n\t        this._exp.dispose();\n\t        this._exp = null;\n\t        return this;\n\t    };\n\t    return Tone.ScaledEnvelope;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.FrequencyEnvelope is a Tone.ScaledEnvelope, but instead of `min` and `max`\n\t\t *         it's got a `baseFrequency` and `octaves` parameter.\n\t\t *\n\t\t *  @extends {Tone.Envelope}\n\t\t *  @constructor\n\t\t *  @param {Time|Object} [attack]\tthe attack time in seconds\n\t\t *  @param {Time} [decay]\tthe decay time in seconds\n\t\t *  @param {number} [sustain] \ta percentage (0-1) of the full amplitude\n\t\t *  @param {Time} [release]\tthe release time in seconds\n\t\t *  @example\n\t\t *  var freqEnv = new Tone.FrequencyEnvelope({\n\t\t *  \t\"attack\" : 0.2,\n\t\t *  \t\"baseFrequency\" : \"C2\",\n\t\t *  \t\"octaves\" : 4\n\t\t *  });\n\t\t *  freqEnv.connect(oscillator.frequency);\n\t\t */\n\t    Tone.FrequencyEnvelope = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'attack',\n\t            'decay',\n\t            'sustain',\n\t            'release'\n\t        ], Tone.Envelope);\n\t        Tone.ScaledEnvelope.call(this, options);\n\t        //merge it with the frequency envelope defaults\n\t        options = Tone.defaultArg(options, Tone.FrequencyEnvelope.defaults);\n\t        /**\n\t\t\t *  Stores the octave value\n\t\t\t *  @type {Positive}\n\t\t\t *  @private\n\t\t\t */\n\t        this._octaves = options.octaves;\n\t        //setup\n\t        this.baseFrequency = options.baseFrequency;\n\t        this.octaves = options.octaves;\n\t    };\n\t    Tone.extend(Tone.FrequencyEnvelope, Tone.Envelope);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @static\n\t\t */\n\t    Tone.FrequencyEnvelope.defaults = {\n\t        'baseFrequency': 200,\n\t        'octaves': 4,\n\t        'exponent': 2\n\t    };\n\t    /**\n\t\t * The envelope's mininum output value. This is the value which it\n\t\t * starts at.\n\t\t * @memberOf Tone.FrequencyEnvelope#\n\t\t * @type {Frequency}\n\t\t * @name baseFrequency\n\t\t */\n\t    Object.defineProperty(Tone.FrequencyEnvelope.prototype, 'baseFrequency', {\n\t        get: function () {\n\t            return this._scale.min;\n\t        },\n\t        set: function (min) {\n\t            this._scale.min = this.toFrequency(min);\n\t            //also update the octaves\n\t            this.octaves = this._octaves;\n\t        }\n\t    });\n\t    /**\n\t\t * The number of octaves above the baseFrequency that the\n\t\t * envelope will scale to.\n\t\t * @memberOf Tone.FrequencyEnvelope#\n\t\t * @type {Positive}\n\t\t * @name octaves\n\t\t */\n\t    Object.defineProperty(Tone.FrequencyEnvelope.prototype, 'octaves', {\n\t        get: function () {\n\t            return this._octaves;\n\t        },\n\t        set: function (octaves) {\n\t            this._octaves = octaves;\n\t            this._scale.max = this.baseFrequency * Math.pow(2, octaves);\n\t        }\n\t    });\n\t    /**\n\t\t * The envelope's exponent value.\n\t\t * @memberOf Tone.FrequencyEnvelope#\n\t\t * @type {number}\n\t\t * @name exponent\n\t\t */\n\t    Object.defineProperty(Tone.FrequencyEnvelope.prototype, 'exponent', {\n\t        get: function () {\n\t            return this._exp.value;\n\t        },\n\t        set: function (exp) {\n\t            this._exp.value = exp;\n\t        }\n\t    });\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.FrequencyEnvelope} this\n\t\t */\n\t    Tone.FrequencyEnvelope.prototype.dispose = function () {\n\t        Tone.ScaledEnvelope.prototype.dispose.call(this);\n\t        return this;\n\t    };\n\t    return Tone.FrequencyEnvelope;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  GreaterThanZero outputs 1 when the input is strictly greater than zero\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @example\n\t\t * var gt0 = new Tone.GreaterThanZero();\n\t\t * var sig = new Tone.Signal(0.01).connect(gt0);\n\t\t * //the output of gt0 is 1.\n\t\t * sig.value = 0;\n\t\t * //the output of gt0 is 0.\n\t\t */\n\t    Tone.GreaterThanZero = function () {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  @type {Tone.WaveShaper}\n\t\t\t *  @private\n\t\t\t */\n\t        this._thresh = this.output = new Tone.WaveShaper(function (val) {\n\t            if (val <= 0) {\n\t                return 0;\n\t            } else {\n\t                return 1;\n\t            }\n\t        }, 127);\n\t        /**\n\t\t\t *  scale the first thresholded signal by a large value.\n\t\t\t *  this will help with values which are very close to 0\n\t\t\t *  @type {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._scale = this.input = new Tone.Multiply(10000);\n\t        //connections\n\t        this._scale.connect(this._thresh);\n\t    };\n\t    Tone.extend(Tone.GreaterThanZero, Tone.SignalBase);\n\t    /**\n\t\t *  dispose method\n\t\t *  @returns {Tone.GreaterThanZero} this\n\t\t */\n\t    Tone.GreaterThanZero.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._scale.dispose();\n\t        this._scale = null;\n\t        this._thresh.dispose();\n\t        this._thresh = null;\n\t        return this;\n\t    };\n\t    return Tone.GreaterThanZero;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Output 1 if the signal is greater than the value, otherwise outputs 0.\n\t\t *          can compare two signals or a signal and a number.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Signal}\n\t\t *  @param {number} [value=0] the value to compare to the incoming signal\n\t\t *  @example\n\t\t * var gt = new Tone.GreaterThan(2);\n\t\t * var sig = new Tone.Signal(4).connect(gt);\n\t\t * //output of gt is equal 1.\n\t\t */\n\t    Tone.GreaterThan = function (value) {\n\t        Tone.Signal.call(this);\n\t        this.createInsOuts(2, 0);\n\t        /**\n\t\t\t *  subtract the amount from the incoming signal\n\t\t\t *  @type {Tone.Subtract}\n\t\t\t *  @private\n\t\t\t */\n\t        this._param = this.input[0] = new Tone.Subtract(value);\n\t        this.input[1] = this._param.input[1];\n\t        /**\n\t\t\t *  compare that amount to zero\n\t\t\t *  @type {Tone.GreaterThanZero}\n\t\t\t *  @private\n\t\t\t */\n\t        this._gtz = this.output = new Tone.GreaterThanZero();\n\t        //connect\n\t        this._param.connect(this._gtz);\n\t    };\n\t    Tone.extend(Tone.GreaterThan, Tone.Signal);\n\t    /**\n\t\t *  dispose method\n\t\t *  @returns {Tone.GreaterThan} this\n\t\t */\n\t    Tone.GreaterThan.prototype.dispose = function () {\n\t        Tone.Signal.prototype.dispose.call(this);\n\t        this._gtz.dispose();\n\t        this._gtz = null;\n\t        return this;\n\t    };\n\t    return Tone.GreaterThan;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Gate only passes a signal through when the incoming\n\t\t *          signal exceeds a specified threshold. To do this, Gate uses\n\t\t *          a Tone.Follower to follow the amplitude of the incoming signal.\n\t\t *          A common implementation of this class is a [Noise Gate](https://en.wikipedia.org/wiki/Noise_gate).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Decibels|Object} [threshold] The threshold above which the gate will open.\n\t\t *  @param {Time=} attack The follower's attack time\n\t\t *  @param {Time=} release The follower's release time\n\t\t *  @example\n\t\t * var gate = new Tone.Gate(-30, 0.2, 0.3).toMaster();\n\t\t * var mic = new Tone.UserMedia().connect(gate);\n\t\t * //the gate will only pass through the incoming\n\t\t * //signal when it's louder than -30db\n\t\t */\n\t    Tone.Gate = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'threshold',\n\t            'attack',\n\t            'release'\n\t        ], Tone.Gate);\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(1, 1);\n\t        /**\n\t\t\t *  @type {Tone.Follower}\n\t\t\t *  @private\n\t\t\t */\n\t        this._follower = new Tone.Follower(options.attack, options.release);\n\t        /**\n\t\t\t *  @type {Tone.GreaterThan}\n\t\t\t *  @private\n\t\t\t */\n\t        this._gt = new Tone.GreaterThan(Tone.dbToGain(options.threshold));\n\t        //the connections\n\t        this.input.connect(this.output);\n\t        //the control signal\n\t        this.input.chain(this._gt, this._follower, this.output.gain);\n\t    };\n\t    Tone.extend(Tone.Gate, Tone.AudioNode);\n\t    /**\n\t\t *  @const\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Gate.defaults = {\n\t        'attack': 0.1,\n\t        'release': 0.1,\n\t        'threshold': -40\n\t    };\n\t    /**\n\t\t * The threshold of the gate in decibels\n\t\t * @memberOf Tone.Gate#\n\t\t * @type {Decibels}\n\t\t * @name threshold\n\t\t */\n\t    Object.defineProperty(Tone.Gate.prototype, 'threshold', {\n\t        get: function () {\n\t            return Tone.gainToDb(this._gt.value);\n\t        },\n\t        set: function (thresh) {\n\t            this._gt.value = Tone.dbToGain(thresh);\n\t        }\n\t    });\n\t    /**\n\t\t * The attack speed of the gate\n\t\t * @memberOf Tone.Gate#\n\t\t * @type {Time}\n\t\t * @name attack\n\t\t */\n\t    Object.defineProperty(Tone.Gate.prototype, 'attack', {\n\t        get: function () {\n\t            return this._follower.attack;\n\t        },\n\t        set: function (attackTime) {\n\t            this._follower.attack = attackTime;\n\t        }\n\t    });\n\t    /**\n\t\t * The release speed of the gate\n\t\t * @memberOf Tone.Gate#\n\t\t * @type {Time}\n\t\t * @name release\n\t\t */\n\t    Object.defineProperty(Tone.Gate.prototype, 'release', {\n\t        get: function () {\n\t            return this._follower.release;\n\t        },\n\t        set: function (releaseTime) {\n\t            this._follower.release = releaseTime;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Gate} this\n\t\t */\n\t    Tone.Gate.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._follower.dispose();\n\t        this._gt.dispose();\n\t        this._follower = null;\n\t        this._gt = null;\n\t        return this;\n\t    };\n\t    return Tone.Gate;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t * @class Tone.TickSignal extends Tone.Signal, but adds the capability\n\t\t *        to calculate the number of elapsed ticks. exponential and target curves\n\t\t *        are approximated with multiple linear ramps.\n\t\t *\n\t\t *        Thank you Bruno Dias, H. Sofia Pinto, and David M. Matos, for your [WAC paper](https://smartech.gatech.edu/bitstream/handle/1853/54588/WAC2016-49.pdf)\n\t\t *        describing integrating timing functions for tempo calculations.\n\t\t *\n\t\t * @param {Number} value The initial value of the signal\n\t\t * @extends {Tone.Signal}\n\t\t */\n\t    Tone.TickSignal = function (value) {\n\t        value = Tone.defaultArg(value, 1);\n\t        Tone.Signal.call(this, {\n\t            'units': Tone.Type.Ticks,\n\t            'value': value\n\t        });\n\t        //extend the memory\n\t        this._events.memory = Infinity;\n\t        //clear the clock from the beginning\n\t        this.cancelScheduledValues(0);\n\t        //set an initial event\n\t        this._events.add({\n\t            'type': Tone.Param.AutomationType.SetValue,\n\t            'time': 0,\n\t            'value': value\n\t        });\n\t    };\n\t    Tone.extend(Tone.TickSignal, Tone.Signal);\n\t    /**\n\t\t * Wraps Tone.Signal methods so that they also\n\t\t * record the ticks.\n\t\t * @param  {Function} method\n\t\t * @return {Function}\n\t\t * @private\n\t\t */\n\t    function _wrapScheduleMethods(method) {\n\t        return function (value, time) {\n\t            time = this.toSeconds(time);\n\t            method.apply(this, arguments);\n\t            var event = this._events.get(time);\n\t            var previousEvent = this._events.previousEvent(event);\n\t            var ticksUntilTime = this._getTicksUntilEvent(previousEvent, time);\n\t            event.ticks = Math.max(ticksUntilTime, 0);\n\t            return this;\n\t        };\n\t    }\n\t    Tone.TickSignal.prototype.setValueAtTime = _wrapScheduleMethods(Tone.Signal.prototype.setValueAtTime);\n\t    Tone.TickSignal.prototype.linearRampToValueAtTime = _wrapScheduleMethods(Tone.Signal.prototype.linearRampToValueAtTime);\n\t    /**\n\t\t *  Start exponentially approaching the target value at the given time with\n\t\t *  a rate having the given time constant.\n\t\t *  @param {number} value\n\t\t *  @param {Time} startTime\n\t\t *  @param {number} timeConstant\n\t\t *  @returns {Tone.TickSignal} this\n\t\t */\n\t    Tone.TickSignal.prototype.setTargetAtTime = function (value, time, constant) {\n\t        //aproximate it with multiple linear ramps\n\t        time = this.toSeconds(time);\n\t        this.setRampPoint(time);\n\t        value = this._fromUnits(value);\n\t        //start from previously scheduled value\n\t        var prevEvent = this._events.get(time);\n\t        var segments = Math.round(Math.max(1 / constant, 1));\n\t        for (var i = 0; i <= segments; i++) {\n\t            var segTime = constant * i + time;\n\t            var rampVal = this._exponentialApproach(prevEvent.time, prevEvent.value, value, constant, segTime);\n\t            this.linearRampToValueAtTime(this._toUnits(rampVal), segTime);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Schedules an exponential continuous change in parameter value from\n\t\t *  the previous scheduled parameter value to the given value.\n\t\t *  @param  {number} value\n\t\t *  @param  {Time} endTime\n\t\t *  @returns {Tone.TickSignal} this\n\t\t */\n\t    Tone.TickSignal.prototype.exponentialRampToValueAtTime = function (value, time) {\n\t        //aproximate it with multiple linear ramps\n\t        time = this.toSeconds(time);\n\t        value = this._fromUnits(value);\n\t        //start from previously scheduled value\n\t        var prevEvent = this._events.get(time);\n\t        if (prevEvent === null) {\n\t            prevEvent = {\n\t                'value': this._initialValue,\n\t                'time': 0\n\t            };\n\t        }\n\t        //approx 10 segments per second\n\t        var segments = Math.round(Math.max((time - prevEvent.time) * 10, 1));\n\t        var segmentDur = (time - prevEvent.time) / segments;\n\t        for (var i = 0; i <= segments; i++) {\n\t            var segTime = segmentDur * i + prevEvent.time;\n\t            var rampVal = this._exponentialInterpolate(prevEvent.time, prevEvent.value, time, value, segTime);\n\t            this.linearRampToValueAtTime(this._toUnits(rampVal), segTime);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * Returns the tick value at the time. Takes into account\n\t\t * any automation curves scheduled on the signal.\n\t\t * @private\n\t\t * @param  {Time} time The time to get the tick count at\n\t\t * @return {Ticks}      The number of ticks which have elapsed at the time\n\t\t *                          given any automations.\n\t\t */\n\t    Tone.TickSignal.prototype._getTicksUntilEvent = function (event, time) {\n\t        if (event === null) {\n\t            event = {\n\t                'ticks': 0,\n\t                'time': 0\n\t            };\n\t        } else if (Tone.isUndef(event.ticks)) {\n\t            var previousEvent = this._events.previousEvent(event);\n\t            event.ticks = this._getTicksUntilEvent(previousEvent, event.time);\n\t        }\n\t        var val0 = this.getValueAtTime(event.time);\n\t        var val1 = this.getValueAtTime(time);\n\t        //if it's right on the line, take the previous value\n\t        if (this._events.get(time).time === time && this._events.get(time).type === Tone.Param.AutomationType.SetValue) {\n\t            val1 = this.getValueAtTime(time - this.sampleTime);\n\t        }\n\t        return 0.5 * (time - event.time) * (val0 + val1) + event.ticks;\n\t    };\n\t    /**\n\t\t * Returns the tick value at the time. Takes into account\n\t\t * any automation curves scheduled on the signal.\n\t\t * @param  {Time} time The time to get the tick count at\n\t\t * @return {Ticks}      The number of ticks which have elapsed at the time\n\t\t *                          given any automations.\n\t\t */\n\t    Tone.TickSignal.prototype.getTicksAtTime = function (time) {\n\t        time = this.toSeconds(time);\n\t        var event = this._events.get(time);\n\t        return Math.max(this._getTicksUntilEvent(event, time), 0);\n\t    };\n\t    /**\n\t\t * Return the elapsed time of the number of ticks from the given time\n\t\t * @param {Ticks} ticks The number of ticks to calculate\n\t\t * @param  {Time} time The time to get the next tick from\n\t\t * @return {Seconds} The duration of the number of ticks from the given time in seconds\n\t\t */\n\t    Tone.TickSignal.prototype.getDurationOfTicks = function (ticks, time) {\n\t        time = this.toSeconds(time);\n\t        var currentTick = this.getTicksAtTime(time);\n\t        return this.getTimeOfTick(currentTick + ticks) - time;\n\t    };\n\t    /**\n\t\t * Given a tick, returns the time that tick occurs at.\n\t\t * @param  {Ticks} tick\n\t\t * @return {Time}      The time that the tick occurs.\n\t\t */\n\t    Tone.TickSignal.prototype.getTimeOfTick = function (tick) {\n\t        var before = this._events.get(tick, 'ticks');\n\t        var after = this._events.getAfter(tick, 'ticks');\n\t        if (before && before.ticks === tick) {\n\t            return before.time;\n\t        } else if (before && after && after.type === Tone.Param.AutomationType.Linear && before.value !== after.value) {\n\t            var val0 = this.getValueAtTime(before.time);\n\t            var val1 = this.getValueAtTime(after.time);\n\t            var delta = (val1 - val0) / (after.time - before.time);\n\t            var k = Math.sqrt(Math.pow(val0, 2) - 2 * delta * (before.ticks - tick));\n\t            var sol1 = (-val0 + k) / delta;\n\t            var sol2 = (-val0 - k) / delta;\n\t            return (sol1 > 0 ? sol1 : sol2) + before.time;\n\t        } else if (before) {\n\t            if (before.value === 0) {\n\t                return Infinity;\n\t            } else {\n\t                return before.time + (tick - before.ticks) / before.value;\n\t            }\n\t        } else {\n\t            return tick / this._initialValue;\n\t        }\n\t    };\n\t    /**\n\t\t * Convert some number of ticks their the duration in seconds accounting\n\t\t * for any automation curves starting at the given time.\n\t\t * @param  {Ticks} ticks The number of ticks to convert to seconds.\n\t\t * @param  {Time} [when=now]  When along the automation timeline to convert the ticks.\n\t\t * @return {Tone.Time}       The duration in seconds of the ticks.\n\t\t */\n\t    Tone.TickSignal.prototype.ticksToTime = function (ticks, when) {\n\t        when = this.toSeconds(when);\n\t        return new Tone.Time(this.getDurationOfTicks(ticks, when));\n\t    };\n\t    /**\n\t\t * The inverse of [ticksToTime](#tickstotime). Convert a duration in\n\t\t * seconds to the corresponding number of ticks accounting for any\n\t\t * automation curves starting at the given time.\n\t\t * @param  {Time} duration The time interval to convert to ticks.\n\t\t * @param  {Time} [when=now]     When along the automation timeline to convert the ticks.\n\t\t * @return {Tone.Ticks}          The duration in ticks.\n\t\t */\n\t    Tone.TickSignal.prototype.timeToTicks = function (duration, when) {\n\t        when = this.toSeconds(when);\n\t        duration = this.toSeconds(duration);\n\t        var startTicks = this.getTicksAtTime(when);\n\t        var endTicks = this.getTicksAtTime(when + duration);\n\t        return new Tone.Ticks(endTicks - startTicks);\n\t    };\n\t    return Tone.TickSignal;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  A Timeline State. Provides the methods: <code>setStateAtTime(\"state\", time)</code>\n\t\t *          and <code>getValueAtTime(time)</code>.\n\t\t *\n\t\t *  @extends {Tone.Timeline}\n\t\t *  @param {String} initial The initial state of the TimelineState. \n\t\t *                          Defaults to <code>undefined</code>\n\t\t */\n\t    Tone.TimelineState = function (initial) {\n\t        Tone.Timeline.call(this);\n\t        /**\n\t\t\t *  The initial state\n\t\t\t *  @private\n\t\t\t *  @type {String}\n\t\t\t */\n\t        this._initial = initial;\n\t    };\n\t    Tone.extend(Tone.TimelineState, Tone.Timeline);\n\t    /**\n\t\t *  Returns the scheduled state scheduled before or at\n\t\t *  the given time.\n\t\t *  @param  {Number}  time  The time to query.\n\t\t *  @return  {String}  The name of the state input in setStateAtTime.\n\t\t */\n\t    Tone.TimelineState.prototype.getValueAtTime = function (time) {\n\t        var event = this.get(time);\n\t        if (event !== null) {\n\t            return event.state;\n\t        } else {\n\t            return this._initial;\n\t        }\n\t    };\n\t    /**\n\t\t *  Add a state to the timeline.\n\t\t *  @param  {String}  state The name of the state to set.\n\t\t *  @param  {Number}  time  The time to query.\n\t\t *  @returns {Tone.TimelineState} this\n\t\t */\n\t    Tone.TimelineState.prototype.setStateAtTime = function (state, time) {\n\t        //all state changes need to be >= the previous state time\n\t        //TODO throw error if time < the previous event time\n\t        this.add({\n\t            'state': state,\n\t            'time': time\n\t        });\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Return the event before the time with the given state\n\t\t *  @param {Tone.State} state The state to look for\n\t\t *  @param  {Time}  time  When to check before\t\t\t\n\t\t *  @return  {Object}  The event with the given state before the time\n\t\t */\n\t    Tone.TimelineState.prototype.getLastState = function (state, time) {\n\t        time = this.toSeconds(time);\n\t        var index = this._search(time);\n\t        for (var i = index; i >= 0; i--) {\n\t            var event = this._timeline[i];\n\t            if (event.state === state) {\n\t                return event;\n\t            }\n\t        }\n\t    };\n\t    /**\n\t\t *  Return the event after the time with the given state\n\t\t *  @param {Tone.State} state The state to look for\n\t\t *  @param  {Time}  time  When to check from\n\t\t *  @return  {Object}  The event with the given state after the time\n\t\t */\n\t    Tone.TimelineState.prototype.getNextState = function (state, time) {\n\t        time = this.toSeconds(time);\n\t        var index = this._search(time);\n\t        if (index !== -1) {\n\t            for (var i = index; i < this._timeline.length; i++) {\n\t                var event = this._timeline[i];\n\t                if (event.state === state) {\n\t                    return event;\n\t                }\n\t            }\n\t        }\n\t    };\n\t    return Tone.TimelineState;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Uses [Tone.TickSignal](TickSignal) to track elapsed ticks with\n\t\t *  \t\tcomplex automation curves.\n\t\t *\n\t\t * \t@constructor\n\t     *  @param {Frequency} frequency The initial frequency that the signal ticks at\n\t\t *  @extends {Tone}\n\t\t */\n\t    Tone.TickSource = function () {\n\t        var options = Tone.defaults(arguments, ['frequency'], Tone.TickSource);\n\t        /**\n\t\t\t *  The frequency the callback function should be invoked.\n\t\t\t *  @type  {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.TickSignal(options.frequency, Tone.Type.Frequency);\n\t        this._readOnly('frequency');\n\t        /**\n\t\t\t *  The state timeline\n\t\t\t *  @type {Tone.TimelineState}\n\t\t\t *  @private\n\t\t\t */\n\t        this._state = new Tone.TimelineState(Tone.State.Stopped);\n\t        this._state.setStateAtTime(Tone.State.Stopped, 0);\n\t        /**\n\t\t\t * The offset values of the ticks\n\t\t\t * @type {Tone.Timeline}\n\t\t\t * @private\n\t\t\t */\n\t        this._tickOffset = new Tone.Timeline();\n\t        //add the first event\n\t        this.setTicksAtTime(0, 0);\n\t    };\n\t    Tone.extend(Tone.TickSource);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.TickSource.defaults = { 'frequency': 1 };\n\t    /**\n\t\t *  Returns the playback state of the source, either \"started\", \"stopped\" or \"paused\".\n\t\t *  @type {Tone.State}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.TickSource#\n\t\t *  @name state\n\t\t */\n\t    Object.defineProperty(Tone.TickSource.prototype, 'state', {\n\t        get: function () {\n\t            return this._state.getValueAtTime(this.now());\n\t        }\n\t    });\n\t    /**\n\t\t *  Start the clock at the given time. Optionally pass in an offset\n\t\t *  of where to start the tick counter from.\n\t\t *  @param  {Time=}  time    The time the clock should start\n\t\t *  @param {Ticks=0} offset The number of ticks to start the source at\n\t\t *  @return  {Tone.TickSource}  this\n\t\t */\n\t    Tone.TickSource.prototype.start = function (time, offset) {\n\t        time = this.toSeconds(time);\n\t        if (this._state.getValueAtTime(time) !== Tone.State.Started) {\n\t            this._state.setStateAtTime(Tone.State.Started, time);\n\t            if (Tone.isDefined(offset)) {\n\t                this.setTicksAtTime(offset, time);\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Stop the clock. Stopping the clock resets the tick counter to 0.\n\t\t *  @param {Time} [time=now] The time when the clock should stop.\n\t\t *  @returns {Tone.TickSource} this\n\t\t *  @example\n\t\t * clock.stop();\n\t\t */\n\t    Tone.TickSource.prototype.stop = function (time) {\n\t        time = this.toSeconds(time);\n\t        //cancel the previous stop\n\t        if (this._state.getValueAtTime(time) === Tone.State.Stopped) {\n\t            var event = this._state.get(time);\n\t            if (event.time > 0) {\n\t                this._tickOffset.cancel(event.time);\n\t                this._state.cancel(event.time);\n\t            }\n\t        }\n\t        this._state.cancel(time);\n\t        this._state.setStateAtTime(Tone.State.Stopped, time);\n\t        this.setTicksAtTime(0, time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Pause the clock. Pausing does not reset the tick counter.\n\t\t *  @param {Time} [time=now] The time when the clock should stop.\n\t\t *  @returns {Tone.TickSource} this\n\t\t */\n\t    Tone.TickSource.prototype.pause = function (time) {\n\t        time = this.toSeconds(time);\n\t        if (this._state.getValueAtTime(time) === Tone.State.Started) {\n\t            this._state.setStateAtTime(Tone.State.Paused, time);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancel start/stop/pause and setTickAtTime events scheduled after the given time.\n\t\t *  @param {Time} [time=now] When to clear the events after\n\t\t *  @returns {Tone.TickSource} this\n\t\t */\n\t    Tone.TickSource.prototype.cancel = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._state.cancel(time);\n\t        this._tickOffset.cancel(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Get the elapsed ticks at the given time\n\t\t * @param  {Time} time  When to get the tick value\n\t\t * @return {Ticks}     The number of ticks\n\t\t */\n\t    Tone.TickSource.prototype.getTicksAtTime = function (time) {\n\t        time = this.toSeconds(time);\n\t        var stopEvent = this._state.getLastState(Tone.State.Stopped, time);\n\t        //this event allows forEachBetween to iterate until the current time\n\t        var tmpEvent = {\n\t            state: Tone.State.Paused,\n\t            time: time\n\t        };\n\t        this._state.add(tmpEvent);\n\t        //keep track of the previous offset event\n\t        var lastState = stopEvent;\n\t        var elapsedTicks = 0;\n\t        //iterate through all the events since the last stop\n\t        this._state.forEachBetween(stopEvent.time, time + this.sampleTime, function (e) {\n\t            var periodStartTime = lastState.time;\n\t            //if there is an offset event in this period use that\n\t            var offsetEvent = this._tickOffset.get(e.time);\n\t            if (offsetEvent.time >= lastState.time) {\n\t                elapsedTicks = offsetEvent.ticks;\n\t                periodStartTime = offsetEvent.time;\n\t            }\n\t            if (lastState.state === Tone.State.Started && e.state !== Tone.State.Started) {\n\t                elapsedTicks += this.frequency.getTicksAtTime(e.time) - this.frequency.getTicksAtTime(periodStartTime);\n\t            }\n\t            lastState = e;\n\t        }.bind(this));\n\t        //remove the temporary event\n\t        this._state.remove(tmpEvent);\n\t        //return the ticks\n\t        return elapsedTicks;\n\t    };\n\t    /**\n\t\t *  The number of times the callback was invoked. Starts counting at 0\n\t\t *  and increments after the callback was invoked. Returns -1 when stopped.\n\t\t *  @memberOf Tone.TickSource#\n\t\t *  @name ticks\n\t\t *  @type {Ticks}\n\t\t */\n\t    Object.defineProperty(Tone.TickSource.prototype, 'ticks', {\n\t        get: function () {\n\t            return this.getTicksAtTime(this.now());\n\t        },\n\t        set: function (t) {\n\t            this.setTicksAtTime(t, this.now());\n\t        }\n\t    });\n\t    /**\n\t\t *  The time since ticks=0 that the TickSource has been running. Accounts\n\t\t *  for tempo curves\n\t\t *  @memberOf Tone.TickSource#\n\t\t *  @name seconds\n\t\t *  @type {Seconds}\n\t\t */\n\t    Object.defineProperty(Tone.TickSource.prototype, 'seconds', {\n\t        get: function () {\n\t            return this.getSecondsAtTime(this.now());\n\t        },\n\t        set: function (s) {\n\t            var now = this.now();\n\t            var ticks = this.frequency.timeToTicks(s, now);\n\t            this.setTicksAtTime(ticks, now);\n\t        }\n\t    });\n\t    /**\n\t\t *  Return the elapsed seconds at the given time.\n\t\t *  @param  {Time}  time  When to get the elapsed seconds\n\t\t *  @return  {Seconds}  The number of elapsed seconds\n\t\t */\n\t    Tone.TickSource.prototype.getSecondsAtTime = function (time) {\n\t        time = this.toSeconds(time);\n\t        var stopEvent = this._state.getLastState(Tone.State.Stopped, time);\n\t        //this event allows forEachBetween to iterate until the current time\n\t        var tmpEvent = {\n\t            state: Tone.State.Paused,\n\t            time: time\n\t        };\n\t        this._state.add(tmpEvent);\n\t        //keep track of the previous offset event\n\t        var lastState = stopEvent;\n\t        var elapsedSeconds = 0;\n\t        //iterate through all the events since the last stop\n\t        this._state.forEachBetween(stopEvent.time, time + this.sampleTime, function (e) {\n\t            var periodStartTime = lastState.time;\n\t            //if there is an offset event in this period use that\n\t            var offsetEvent = this._tickOffset.get(e.time);\n\t            if (offsetEvent.time >= lastState.time) {\n\t                elapsedSeconds = offsetEvent.seconds;\n\t                periodStartTime = offsetEvent.time;\n\t            }\n\t            if (lastState.state === Tone.State.Started && e.state !== Tone.State.Started) {\n\t                elapsedSeconds += e.time - periodStartTime;\n\t            }\n\t            lastState = e;\n\t        }.bind(this));\n\t        //remove the temporary event\n\t        this._state.remove(tmpEvent);\n\t        //return the ticks\n\t        return elapsedSeconds;\n\t    };\n\t    /**\n\t\t * Set the clock's ticks at the given time.\n\t\t * @param  {Ticks} ticks The tick value to set\n\t\t * @param  {Time} time  When to set the tick value\n\t\t * @return {Tone.TickSource}       this\n\t\t */\n\t    Tone.TickSource.prototype.setTicksAtTime = function (ticks, time) {\n\t        time = this.toSeconds(time);\n\t        this._tickOffset.cancel(time);\n\t        this._tickOffset.add({\n\t            'time': time,\n\t            'ticks': ticks,\n\t            'seconds': this.frequency.getDurationOfTicks(ticks, time)\n\t        });\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Returns the scheduled state at the given time.\n\t\t *  @param  {Time}  time  The time to query.\n\t\t *  @return  {String}  The name of the state input in setStateAtTime.\n\t\t *  @example\n\t\t * source.start(\"+0.1\");\n\t\t * source.getStateAtTime(\"+0.1\"); //returns \"started\"\n\t\t */\n\t    Tone.TickSource.prototype.getStateAtTime = function (time) {\n\t        time = this.toSeconds(time);\n\t        return this._state.getValueAtTime(time);\n\t    };\n\t    /**\n\t\t * Get the time of the given tick. The second argument\n\t\t * is when to test before. Since ticks can be set (with setTicksAtTime)\n\t\t * there may be multiple times for a given tick value. \n\t\t * @param  {Ticks} ticks The tick number.\n\t\t * @param  {Time=} before When to measure the tick value from. \n\t\t * @return {Time}       The time of the tick\n\t\t */\n\t    Tone.TickSource.prototype.getTimeOfTick = function (tick, before) {\n\t        before = Tone.defaultArg(before, this.now());\n\t        var offset = this._tickOffset.get(before);\n\t        var event = this._state.get(before);\n\t        var startTime = Math.max(offset.time, event.time);\n\t        var absoluteTicks = this.frequency.getTicksAtTime(startTime) + tick - offset.ticks;\n\t        return this.frequency.getTimeOfTick(absoluteTicks);\n\t    };\n\t    /**\n\t\t *  Invoke the callback event at all scheduled ticks between the \n\t\t *  start time and the end time\n\t\t *  @param  {Time}    startTime  The beginning of the search range\n\t\t *  @param  {Time}    endTime    The end of the search range\n\t\t *  @param  {Function<Time,Ticks>}  callback   The callback to invoke with each tick\n\t\t *  @return  {Tone.TickSource}    this\n\t\t */\n\t    Tone.TickSource.prototype.forEachTickBetween = function (startTime, endTime, callback) {\n\t        //only iterate through the sections where it is \"started\"\n\t        var lastStateEvent = this._state.get(startTime);\n\t        this._state.forEachBetween(startTime, endTime, function (event) {\n\t            if (lastStateEvent.state === Tone.State.Started && event.state !== Tone.State.Started) {\n\t                this.forEachTickBetween(Math.max(lastStateEvent.time, startTime), event.time - this.sampleTime, callback);\n\t            }\n\t            lastStateEvent = event;\n\t        }.bind(this));\n\t        startTime = Math.max(lastStateEvent.time, startTime);\n\t        if (lastStateEvent.state === Tone.State.Started && this._state) {\n\t            //figure out the difference between the frequency ticks and the \n\t            var startTicks = this.frequency.getTicksAtTime(startTime);\n\t            var ticksAtStart = this.frequency.getTicksAtTime(lastStateEvent.time);\n\t            var diff = startTicks - ticksAtStart;\n\t            var offset = diff % 1;\n\t            if (offset !== 0) {\n\t                offset = 1 - offset;\n\t            }\n\t            var nextTickTime = this.frequency.getTimeOfTick(startTicks + offset);\n\t            var error = null;\n\t            while (nextTickTime < endTime && this._state) {\n\t                try {\n\t                    callback(nextTickTime, Math.round(this.getTicksAtTime(nextTickTime)));\n\t                } catch (e) {\n\t                    error = e;\n\t                    break;\n\t                }\n\t                if (this._state) {\n\t                    nextTickTime += this.frequency.getDurationOfTicks(1, nextTickTime);\n\t                }\n\t            }\n\t        }\n\t        if (error) {\n\t            throw error;\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @returns {Tone.TickSource} this\n\t\t */\n\t    Tone.TickSource.prototype.dispose = function () {\n\t        Tone.Param.prototype.dispose.call(this);\n\t        this._state.dispose();\n\t        this._state = null;\n\t        this._tickOffset.dispose();\n\t        this._tickOffset = null;\n\t        this._writable('frequency');\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        return this;\n\t    };\n\t    return Tone.TickSource;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  A sample accurate clock which provides a callback at the given rate.\n\t\t *          While the callback is not sample-accurate (it is still susceptible to\n\t\t *          loose JS timing), the time passed in as the argument to the callback\n\t\t *          is precise. For most applications, it is better to use Tone.Transport\n\t\t *          instead of the Clock by itself since you can synchronize multiple callbacks.\n\t\t *\n\t\t * \t@constructor\n\t\t *  @extends {Tone.Emitter}\n\t\t * \t@param {function} callback The callback to be invoked with the time of the audio event\n\t\t * \t@param {Frequency} frequency The rate of the callback\n\t\t * \t@example\n\t\t * //the callback will be invoked approximately once a second\n\t\t * //and will print the time exactly once a second apart.\n\t\t * var clock = new Tone.Clock(function(time){\n\t\t * \tconsole.log(time);\n\t\t * }, 1);\n\t\t */\n\t    Tone.Clock = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'callback',\n\t            'frequency'\n\t        ], Tone.Clock);\n\t        Tone.Emitter.call(this);\n\t        /**\n\t\t\t *  The callback function to invoke at the scheduled tick.\n\t\t\t *  @type  {Function}\n\t\t\t */\n\t        this.callback = options.callback;\n\t        /**\n\t\t\t *  The next time the callback is scheduled.\n\t\t\t *  @type {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._nextTick = 0;\n\t        /**\n\t\t\t *  The tick counter\n\t\t\t *  @type  {Tone.TickSource}\n\t\t\t *  @private\n\t\t\t */\n\t        this._tickSource = new Tone.TickSource(options.frequency);\n\t        /**\n\t\t\t *  The last time the loop callback was invoked\n\t\t\t *  @private\n\t\t\t *  @type {Number}\n\t\t\t */\n\t        this._lastUpdate = 0;\n\t        /**\n\t\t\t *  The rate the callback function should be invoked.\n\t\t\t *  @type  {BPM}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = this._tickSource.frequency;\n\t        this._readOnly('frequency');\n\t        /**\n\t\t\t *  The state timeline\n\t\t\t *  @type {Tone.TimelineState}\n\t\t\t *  @private\n\t\t\t */\n\t        this._state = new Tone.TimelineState(Tone.State.Stopped);\n\t        //add an initial state\n\t        this._state.setStateAtTime(Tone.State.Stopped, 0);\n\t        /**\n\t\t\t *  The loop function bound to its context.\n\t\t\t *  This is necessary to remove the event in the end.\n\t\t\t *  @type {Function}\n\t\t\t *  @private\n\t\t\t */\n\t        this._boundLoop = this._loop.bind(this);\n\t        //bind a callback to the worker thread\n\t        this.context.on('tick', this._boundLoop);\n\t    };\n\t    Tone.extend(Tone.Clock, Tone.Emitter);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.Clock.defaults = {\n\t        'callback': Tone.noOp,\n\t        'frequency': 1\n\t    };\n\t    /**\n\t\t *  Returns the playback state of the source, either \"started\", \"stopped\" or \"paused\".\n\t\t *  @type {Tone.State}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.Clock#\n\t\t *  @name state\n\t\t */\n\t    Object.defineProperty(Tone.Clock.prototype, 'state', {\n\t        get: function () {\n\t            return this._state.getValueAtTime(this.now());\n\t        }\n\t    });\n\t    /**\n\t\t *  Start the clock at the given time. Optionally pass in an offset\n\t\t *  of where to start the tick counter from.\n\t\t *  @param  {Time=}  time    The time the clock should start\n\t\t *  @param  {Ticks=}  offset  Where the tick counter starts counting from.\n\t\t *  @return  {Tone.Clock}  this\n\t\t */\n\t    Tone.Clock.prototype.start = function (time, offset) {\n\t        time = this.toSeconds(time);\n\t        if (this._state.getValueAtTime(time) !== Tone.State.Started) {\n\t            this._state.setStateAtTime(Tone.State.Started, time);\n\t            this._tickSource.start(time, offset);\n\t            if (time < this._lastUpdate) {\n\t                this.emit('start', time, offset);\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Stop the clock. Stopping the clock resets the tick counter to 0.\n\t\t *  @param {Time} [time=now] The time when the clock should stop.\n\t\t *  @returns {Tone.Clock} this\n\t\t *  @example\n\t\t * clock.stop();\n\t\t */\n\t    Tone.Clock.prototype.stop = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._state.cancel(time);\n\t        this._state.setStateAtTime(Tone.State.Stopped, time);\n\t        this._tickSource.stop(time);\n\t        if (time < this._lastUpdate) {\n\t            this.emit('stop', time);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Pause the clock. Pausing does not reset the tick counter.\n\t\t *  @param {Time} [time=now] The time when the clock should stop.\n\t\t *  @returns {Tone.Clock} this\n\t\t */\n\t    Tone.Clock.prototype.pause = function (time) {\n\t        time = this.toSeconds(time);\n\t        if (this._state.getValueAtTime(time) === Tone.State.Started) {\n\t            this._state.setStateAtTime(Tone.State.Paused, time);\n\t            this._tickSource.pause(time);\n\t            if (time < this._lastUpdate) {\n\t                this.emit('pause', time);\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  The number of times the callback was invoked. Starts counting at 0\n\t\t *  and increments after the callback was invoked.\n\t\t *  @type {Ticks}\n\t\t */\n\t    Object.defineProperty(Tone.Clock.prototype, 'ticks', {\n\t        get: function () {\n\t            return Math.ceil(this.getTicksAtTime(this.now()));\n\t        },\n\t        set: function (t) {\n\t            this._tickSource.ticks = t;\n\t        }\n\t    });\n\t    /**\n\t\t *  The time since ticks=0 that the Clock has been running. Accounts\n\t\t *  for tempo curves\n\t\t *  @type {Seconds}\n\t\t */\n\t    Object.defineProperty(Tone.Clock.prototype, 'seconds', {\n\t        get: function () {\n\t            return this._tickSource.seconds;\n\t        },\n\t        set: function (s) {\n\t            this._tickSource.seconds = s;\n\t        }\n\t    });\n\t    /**\n\t\t *  Return the elapsed seconds at the given time.\n\t\t *  @param  {Time}  time  When to get the elapsed seconds\n\t\t *  @return  {Seconds}  The number of elapsed seconds\n\t\t */\n\t    Tone.Clock.prototype.getSecondsAtTime = function (time) {\n\t        return this._tickSource.getSecondsAtTime(time);\n\t    };\n\t    /**\n\t\t * Set the clock's ticks at the given time.\n\t\t * @param  {Ticks} ticks The tick value to set\n\t\t * @param  {Time} time  When to set the tick value\n\t\t * @return {Tone.Clock}       this\n\t\t */\n\t    Tone.Clock.prototype.setTicksAtTime = function (ticks, time) {\n\t        this._tickSource.setTicksAtTime(ticks, time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Get the clock's ticks at the given time.\n\t\t * @param  {Time} time  When to get the tick value\n\t\t * @return {Ticks}       The tick value at the given time.\n\t\t */\n\t    Tone.Clock.prototype.getTicksAtTime = function (time) {\n\t        return this._tickSource.getTicksAtTime(time);\n\t    };\n\t    /**\n\t\t * Get the time of the next tick\n\t\t * @param  {Ticks} ticks The tick number.\n\t\t * @param  {Time} before \n\t\t * @return {Tone.Clock}       this\n\t\t */\n\t    Tone.Clock.prototype.nextTickTime = function (offset, when) {\n\t        when = this.toSeconds(when);\n\t        var currentTick = this.getTicksAtTime(when);\n\t        return this._tickSource.getTimeOfTick(currentTick + offset, when);\n\t    };\n\t    /**\n\t\t *  The scheduling loop.\n\t\t *  @private\n\t\t */\n\t    Tone.Clock.prototype._loop = function () {\n\t        var startTime = this._lastUpdate;\n\t        var endTime = this.now();\n\t        this._lastUpdate = endTime;\n\t        if (startTime !== endTime) {\n\t            //the state change events\n\t            this._state.forEachBetween(startTime, endTime, function (e) {\n\t                switch (e.state) {\n\t                case Tone.State.Started:\n\t                    var offset = this._tickSource.getTicksAtTime(e.time);\n\t                    this.emit('start', e.time, offset);\n\t                    break;\n\t                case Tone.State.Stopped:\n\t                    if (e.time !== 0) {\n\t                        this.emit('stop', e.time);\n\t                    }\n\t                    break;\n\t                case Tone.State.Paused:\n\t                    this.emit('pause', e.time);\n\t                    break;\n\t                }\n\t            }.bind(this));\n\t            //the tick callbacks\n\t            this._tickSource.forEachTickBetween(startTime, endTime, function (time, ticks) {\n\t                this.callback(time, ticks);\n\t            }.bind(this));\n\t        }\n\t    };\n\t    /**\n\t\t *  Returns the scheduled state at the given time.\n\t\t *  @param  {Time}  time  The time to query.\n\t\t *  @return  {String}  The name of the state input in setStateAtTime.\n\t\t *  @example\n\t\t * clock.start(\"+0.1\");\n\t\t * clock.getStateAtTime(\"+0.1\"); //returns \"started\"\n\t\t */\n\t    Tone.Clock.prototype.getStateAtTime = function (time) {\n\t        time = this.toSeconds(time);\n\t        return this._state.getValueAtTime(time);\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @returns {Tone.Clock} this\n\t\t */\n\t    Tone.Clock.prototype.dispose = function () {\n\t        Tone.Emitter.prototype.dispose.call(this);\n\t        this.context.off('tick', this._boundLoop);\n\t        this._writable('frequency');\n\t        this._tickSource.dispose();\n\t        this._tickSource = null;\n\t        this.frequency = null;\n\t        this._boundLoop = null;\n\t        this._nextTick = Infinity;\n\t        this.callback = null;\n\t        this._state.dispose();\n\t        this._state = null;\n\t    };\n\t    return Tone.Clock;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Similar to Tone.Timeline, but all events represent\n\t\t *         intervals with both \"time\" and \"duration\" times. The\n\t\t *         events are placed in a tree structure optimized\n\t\t *         for querying an intersection point with the timeline\n\t\t *         events. Internally uses an [Interval Tree](https://en.wikipedia.org/wiki/Interval_tree)\n\t\t *         to represent the data.\n\t\t *  @extends {Tone}\n\t\t */\n\t    Tone.IntervalTimeline = function () {\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  The root node of the inteval tree\n\t\t\t *  @type  {IntervalNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._root = null;\n\t        /**\n\t\t\t *  Keep track of the length of the timeline.\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._length = 0;\n\t    };\n\t    Tone.extend(Tone.IntervalTimeline);\n\t    /**\n\t\t *  The event to add to the timeline. All events must\n\t\t *  have a time and duration value\n\t\t *  @param  {Object}  event  The event to add to the timeline\n\t\t *  @return  {Tone.IntervalTimeline}  this\n\t\t */\n\t    Tone.IntervalTimeline.prototype.add = function (event) {\n\t        if (Tone.isUndef(event.time) || Tone.isUndef(event.duration)) {\n\t            throw new Error('Tone.IntervalTimeline: events must have time and duration parameters');\n\t        }\n\t        event.time = event.time.valueOf();\n\t        var node = new IntervalNode(event.time, event.time + event.duration, event);\n\t        if (this._root === null) {\n\t            this._root = node;\n\t        } else {\n\t            this._root.insert(node);\n\t        }\n\t        this._length++;\n\t        // Restructure tree to be balanced\n\t        while (node !== null) {\n\t            node.updateHeight();\n\t            node.updateMax();\n\t            this._rebalance(node);\n\t            node = node.parent;\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Remove an event from the timeline.\n\t\t *  @param  {Object}  event  The event to remove from the timeline\n\t\t *  @return  {Tone.IntervalTimeline}  this\n\t\t */\n\t    Tone.IntervalTimeline.prototype.remove = function (event) {\n\t        if (this._root !== null) {\n\t            var results = [];\n\t            this._root.search(event.time, results);\n\t            for (var i = 0; i < results.length; i++) {\n\t                var node = results[i];\n\t                if (node.event === event) {\n\t                    this._removeNode(node);\n\t                    this._length--;\n\t                    break;\n\t                }\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  The number of items in the timeline.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.IntervalTimeline#\n\t\t *  @name length\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.IntervalTimeline.prototype, 'length', {\n\t        get: function () {\n\t            return this._length;\n\t        }\n\t    });\n\t    /**\n\t\t *  Remove events whose time time is after the given time\n\t\t *  @param  {Number}  time  The time to query.\n\t\t *  @returns {Tone.IntervalTimeline} this\n\t\t */\n\t    Tone.IntervalTimeline.prototype.cancel = function (after) {\n\t        this.forEachFrom(after, function (event) {\n\t            this.remove(event);\n\t        }.bind(this));\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Set the root node as the given node\n\t\t *  @param {IntervalNode} node\n\t\t *  @private\n\t\t */\n\t    Tone.IntervalTimeline.prototype._setRoot = function (node) {\n\t        this._root = node;\n\t        if (this._root !== null) {\n\t            this._root.parent = null;\n\t        }\n\t    };\n\t    /**\n\t\t *  Replace the references to the node in the node's parent\n\t\t *  with the replacement node.\n\t\t *  @param  {IntervalNode}  node\n\t\t *  @param  {IntervalNode}  replacement\n\t\t *  @private\n\t\t */\n\t    Tone.IntervalTimeline.prototype._replaceNodeInParent = function (node, replacement) {\n\t        if (node.parent !== null) {\n\t            if (node.isLeftChild()) {\n\t                node.parent.left = replacement;\n\t            } else {\n\t                node.parent.right = replacement;\n\t            }\n\t            this._rebalance(node.parent);\n\t        } else {\n\t            this._setRoot(replacement);\n\t        }\n\t    };\n\t    /**\n\t\t *  Remove the node from the tree and replace it with\n\t\t *  a successor which follows the schema.\n\t\t *  @param  {IntervalNode}  node\n\t\t *  @private\n\t\t */\n\t    Tone.IntervalTimeline.prototype._removeNode = function (node) {\n\t        if (node.left === null && node.right === null) {\n\t            this._replaceNodeInParent(node, null);\n\t        } else if (node.right === null) {\n\t            this._replaceNodeInParent(node, node.left);\n\t        } else if (node.left === null) {\n\t            this._replaceNodeInParent(node, node.right);\n\t        } else {\n\t            var balance = node.getBalance();\n\t            var replacement, temp;\n\t            if (balance > 0) {\n\t                if (node.left.right === null) {\n\t                    replacement = node.left;\n\t                    replacement.right = node.right;\n\t                    temp = replacement;\n\t                } else {\n\t                    replacement = node.left.right;\n\t                    while (replacement.right !== null) {\n\t                        replacement = replacement.right;\n\t                    }\n\t                    replacement.parent.right = replacement.left;\n\t                    temp = replacement.parent;\n\t                    replacement.left = node.left;\n\t                    replacement.right = node.right;\n\t                }\n\t            } else if (node.right.left === null) {\n\t                replacement = node.right;\n\t                replacement.left = node.left;\n\t                temp = replacement;\n\t            } else {\n\t                replacement = node.right.left;\n\t                while (replacement.left !== null) {\n\t                    replacement = replacement.left;\n\t                }\n\t                replacement.parent = replacement.parent;\n\t                replacement.parent.left = replacement.right;\n\t                temp = replacement.parent;\n\t                replacement.left = node.left;\n\t                replacement.right = node.right;\n\t            }\n\t            if (node.parent !== null) {\n\t                if (node.isLeftChild()) {\n\t                    node.parent.left = replacement;\n\t                } else {\n\t                    node.parent.right = replacement;\n\t                }\n\t            } else {\n\t                this._setRoot(replacement);\n\t            }\n\t            // this._replaceNodeInParent(node, replacement);\n\t            this._rebalance(temp);\n\t        }\n\t        node.dispose();\n\t    };\n\t    /**\n\t\t *  Rotate the tree to the left\n\t\t *  @param  {IntervalNode}  node\n\t\t *  @private\n\t\t */\n\t    Tone.IntervalTimeline.prototype._rotateLeft = function (node) {\n\t        var parent = node.parent;\n\t        var isLeftChild = node.isLeftChild();\n\t        // Make node.right the new root of this sub tree (instead of node)\n\t        var pivotNode = node.right;\n\t        node.right = pivotNode.left;\n\t        pivotNode.left = node;\n\t        if (parent !== null) {\n\t            if (isLeftChild) {\n\t                parent.left = pivotNode;\n\t            } else {\n\t                parent.right = pivotNode;\n\t            }\n\t        } else {\n\t            this._setRoot(pivotNode);\n\t        }\n\t    };\n\t    /**\n\t\t *  Rotate the tree to the right\n\t\t *  @param  {IntervalNode}  node\n\t\t *  @private\n\t\t */\n\t    Tone.IntervalTimeline.prototype._rotateRight = function (node) {\n\t        var parent = node.parent;\n\t        var isLeftChild = node.isLeftChild();\n\t        // Make node.left the new root of this sub tree (instead of node)\n\t        var pivotNode = node.left;\n\t        node.left = pivotNode.right;\n\t        pivotNode.right = node;\n\t        if (parent !== null) {\n\t            if (isLeftChild) {\n\t                parent.left = pivotNode;\n\t            } else {\n\t                parent.right = pivotNode;\n\t            }\n\t        } else {\n\t            this._setRoot(pivotNode);\n\t        }\n\t    };\n\t    /**\n\t\t *  Balance the BST\n\t\t *  @param  {IntervalNode}  node\n\t\t *  @private\n\t\t */\n\t    Tone.IntervalTimeline.prototype._rebalance = function (node) {\n\t        var balance = node.getBalance();\n\t        if (balance > 1) {\n\t            if (node.left.getBalance() < 0) {\n\t                this._rotateLeft(node.left);\n\t            } else {\n\t                this._rotateRight(node);\n\t            }\n\t        } else if (balance < -1) {\n\t            if (node.right.getBalance() > 0) {\n\t                this._rotateRight(node.right);\n\t            } else {\n\t                this._rotateLeft(node);\n\t            }\n\t        }\n\t    };\n\t    /**\n\t\t *  Get an event whose time and duration span the give time. Will\n\t\t *  return the match whose \"time\" value is closest to the given time.\n\t\t *  @param  {Object}  event  The event to add to the timeline\n\t\t *  @return  {Object}  The event which spans the desired time\n\t\t */\n\t    Tone.IntervalTimeline.prototype.get = function (time) {\n\t        if (this._root !== null) {\n\t            var results = [];\n\t            this._root.search(time, results);\n\t            if (results.length > 0) {\n\t                var max = results[0];\n\t                for (var i = 1; i < results.length; i++) {\n\t                    if (results[i].low > max.low) {\n\t                        max = results[i];\n\t                    }\n\t                }\n\t                return max.event;\n\t            }\n\t        }\n\t        return null;\n\t    };\n\t    /**\n\t\t *  Iterate over everything in the timeline.\n\t\t *  @param  {Function}  callback The callback to invoke with every item\n\t\t *  @returns {Tone.IntervalTimeline} this\n\t\t */\n\t    Tone.IntervalTimeline.prototype.forEach = function (callback) {\n\t        if (this._root !== null) {\n\t            var allNodes = [];\n\t            this._root.traverse(function (node) {\n\t                allNodes.push(node);\n\t            });\n\t            for (var i = 0; i < allNodes.length; i++) {\n\t                var ev = allNodes[i].event;\n\t                if (ev) {\n\t                    callback(ev);\n\t                }\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Iterate over everything in the array in which the given time\n\t\t *  overlaps with the time and duration time of the event.\n\t\t *  @param  {Number}  time The time to check if items are overlapping\n\t\t *  @param  {Function}  callback The callback to invoke with every item\n\t\t *  @returns {Tone.IntervalTimeline} this\n\t\t */\n\t    Tone.IntervalTimeline.prototype.forEachAtTime = function (time, callback) {\n\t        if (this._root !== null) {\n\t            var results = [];\n\t            this._root.search(time, results);\n\t            for (var i = results.length - 1; i >= 0; i--) {\n\t                var ev = results[i].event;\n\t                if (ev) {\n\t                    callback(ev);\n\t                }\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Iterate over everything in the array in which the time is greater\n\t\t *  than or equal to the given time.\n\t\t *  @param  {Number}  time The time to check if items are before\n\t\t *  @param  {Function}  callback The callback to invoke with every item\n\t\t *  @returns {Tone.IntervalTimeline} this\n\t\t */\n\t    Tone.IntervalTimeline.prototype.forEachFrom = function (time, callback) {\n\t        if (this._root !== null) {\n\t            var results = [];\n\t            this._root.searchAfter(time, results);\n\t            for (var i = results.length - 1; i >= 0; i--) {\n\t                var ev = results[i].event;\n\t                callback(ev);\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.IntervalTimeline}  this\n\t\t */\n\t    Tone.IntervalTimeline.prototype.dispose = function () {\n\t        var allNodes = [];\n\t        if (this._root !== null) {\n\t            this._root.traverse(function (node) {\n\t                allNodes.push(node);\n\t            });\n\t        }\n\t        for (var i = 0; i < allNodes.length; i++) {\n\t            allNodes[i].dispose();\n\t        }\n\t        allNodes = null;\n\t        this._root = null;\n\t        return this;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tINTERVAL NODE HELPER\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Represents a node in the binary search tree, with the addition\n\t\t *  of a \"high\" value which keeps track of the highest value of\n\t\t *  its children.\n\t\t *  References:\n\t\t *  https://brooknovak.wordpress.com/2013/12/07/augmented-interval-tree-in-c/\n\t\t *  http://www.mif.vu.lt/~valdas/ALGORITMAI/LITERATURA/Cormen/Cormen.pdf\n\t\t *  @param {Number} low\n\t\t *  @param {Number} high\n\t\t *  @private\n\t\t */\n\t    var IntervalNode = function (low, high, event) {\n\t        //the event container\n\t        this.event = event;\n\t        //the low value\n\t        this.low = low;\n\t        //the high value\n\t        this.high = high;\n\t        //the high value for this and all child nodes\n\t        this.max = this.high;\n\t        //the nodes to the left\n\t        this._left = null;\n\t        //the nodes to the right\n\t        this._right = null;\n\t        //the parent node\n\t        this.parent = null;\n\t        //the number of child nodes\n\t        this.height = 0;\n\t    };\n\t    /**\n\t\t *  Insert a node into the correct spot in the tree\n\t\t *  @param  {IntervalNode}  node\n\t\t */\n\t    IntervalNode.prototype.insert = function (node) {\n\t        if (node.low <= this.low) {\n\t            if (this.left === null) {\n\t                this.left = node;\n\t            } else {\n\t                this.left.insert(node);\n\t            }\n\t        } else if (this.right === null) {\n\t            this.right = node;\n\t        } else {\n\t            this.right.insert(node);\n\t        }\n\t    };\n\t    /**\n\t\t *  Search the tree for nodes which overlap\n\t\t *  with the given point\n\t\t *  @param  {Number}  point  The point to query\n\t\t *  @param  {Array}  results  The array to put the results\n\t\t */\n\t    IntervalNode.prototype.search = function (point, results) {\n\t        // If p is to the right of the rightmost point of any interval\n\t        // in this node and all children, there won't be any matches.\n\t        if (point > this.max) {\n\t            return;\n\t        }\n\t        // Search left children\n\t        if (this.left !== null) {\n\t            this.left.search(point, results);\n\t        }\n\t        // Check this node\n\t        if (this.low <= point && this.high > point) {\n\t            results.push(this);\n\t        }\n\t        // If p is to the left of the time of this interval,\n\t        // then it can't be in any child to the right.\n\t        if (this.low > point) {\n\t            return;\n\t        }\n\t        // Search right children\n\t        if (this.right !== null) {\n\t            this.right.search(point, results);\n\t        }\n\t    };\n\t    /**\n\t\t *  Search the tree for nodes which are less\n\t\t *  than the given point\n\t\t *  @param  {Number}  point  The point to query\n\t\t *  @param  {Array}  results  The array to put the results\n\t\t */\n\t    IntervalNode.prototype.searchAfter = function (point, results) {\n\t        // Check this node\n\t        if (this.low >= point) {\n\t            results.push(this);\n\t            if (this.left !== null) {\n\t                this.left.searchAfter(point, results);\n\t            }\n\t        }\n\t        // search the right side\n\t        if (this.right !== null) {\n\t            this.right.searchAfter(point, results);\n\t        }\n\t    };\n\t    /**\n\t\t *  Invoke the callback on this element and both it's branches\n\t\t *  @param  {Function}  callback\n\t\t */\n\t    IntervalNode.prototype.traverse = function (callback) {\n\t        callback(this);\n\t        if (this.left !== null) {\n\t            this.left.traverse(callback);\n\t        }\n\t        if (this.right !== null) {\n\t            this.right.traverse(callback);\n\t        }\n\t    };\n\t    /**\n\t\t *  Update the height of the node\n\t\t */\n\t    IntervalNode.prototype.updateHeight = function () {\n\t        if (this.left !== null && this.right !== null) {\n\t            this.height = Math.max(this.left.height, this.right.height) + 1;\n\t        } else if (this.right !== null) {\n\t            this.height = this.right.height + 1;\n\t        } else if (this.left !== null) {\n\t            this.height = this.left.height + 1;\n\t        } else {\n\t            this.height = 0;\n\t        }\n\t    };\n\t    /**\n\t\t *  Update the height of the node\n\t\t */\n\t    IntervalNode.prototype.updateMax = function () {\n\t        this.max = this.high;\n\t        if (this.left !== null) {\n\t            this.max = Math.max(this.max, this.left.max);\n\t        }\n\t        if (this.right !== null) {\n\t            this.max = Math.max(this.max, this.right.max);\n\t        }\n\t    };\n\t    /**\n\t\t *  The balance is how the leafs are distributed on the node\n\t\t *  @return  {Number}  Negative numbers are balanced to the right\n\t\t */\n\t    IntervalNode.prototype.getBalance = function () {\n\t        var balance = 0;\n\t        if (this.left !== null && this.right !== null) {\n\t            balance = this.left.height - this.right.height;\n\t        } else if (this.left !== null) {\n\t            balance = this.left.height + 1;\n\t        } else if (this.right !== null) {\n\t            balance = -(this.right.height + 1);\n\t        }\n\t        return balance;\n\t    };\n\t    /**\n\t\t *  @returns {Boolean} true if this node is the left child\n\t\t *  of its parent\n\t\t */\n\t    IntervalNode.prototype.isLeftChild = function () {\n\t        return this.parent !== null && this.parent.left === this;\n\t    };\n\t    /**\n\t\t *  get/set the left node\n\t\t *  @type {IntervalNode}\n\t\t */\n\t    Object.defineProperty(IntervalNode.prototype, 'left', {\n\t        get: function () {\n\t            return this._left;\n\t        },\n\t        set: function (node) {\n\t            this._left = node;\n\t            if (node !== null) {\n\t                node.parent = this;\n\t            }\n\t            this.updateHeight();\n\t            this.updateMax();\n\t        }\n\t    });\n\t    /**\n\t\t *  get/set the right node\n\t\t *  @type {IntervalNode}\n\t\t */\n\t    Object.defineProperty(IntervalNode.prototype, 'right', {\n\t        get: function () {\n\t            return this._right;\n\t        },\n\t        set: function (node) {\n\t            this._right = node;\n\t            if (node !== null) {\n\t                node.parent = this;\n\t            }\n\t            this.updateHeight();\n\t            this.updateMax();\n\t        }\n\t    });\n\t    /**\n\t\t *  null out references.\n\t\t */\n\t    IntervalNode.prototype.dispose = function () {\n\t        this.parent = null;\n\t        this._left = null;\n\t        this._right = null;\n\t        this.event = null;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tEND INTERVAL NODE HELPER\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    return Tone.IntervalTimeline;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.Ticks is a primitive type for encoding Time values.\n\t\t *         Tone.Ticks can be constructed with or without the `new` keyword. Tone.Ticks can be passed\n\t\t *         into the parameter of any method which takes time as an argument.\n\t\t *  @constructor\n\t\t *  @extends {Tone.TransportTime}\n\t\t *  @param  {String|Number}  val    The time value.\n\t\t *  @param  {String=}  units  The units of the value.\n\t\t *  @example\n\t\t * var t = Tone.Ticks(\"4n\");//a quarter note\n\t\t */\n\t    Tone.Ticks = function (val, units) {\n\t        if (this instanceof Tone.Ticks) {\n\t            Tone.TransportTime.call(this, val, units);\n\t        } else {\n\t            return new Tone.Ticks(val, units);\n\t        }\n\t    };\n\t    Tone.extend(Tone.Ticks, Tone.TransportTime);\n\t    /**\n\t\t *  The default units if none are given.\n\t\t *  @type {String}\n\t\t *  @private\n\t\t */\n\t    Tone.Ticks.prototype._defaultUnits = 'i';\n\t    /**\n\t\t * Get the current time in the given units\n\t\t * @return {Ticks}\n\t\t * @private\n\t\t */\n\t    Tone.Ticks.prototype._now = function () {\n\t        return Tone.Transport.ticks;\n\t    };\n\t    /**\n\t\t *  Return the value of the beats in the current units\n\t\t *  @param {Number} beats\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Ticks.prototype._beatsToUnits = function (beats) {\n\t        return this._getPPQ() * beats;\n\t    };\n\t    /**\n\t\t *  Returns the value of a second in the current units\n\t\t *  @param {Seconds} seconds\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Ticks.prototype._secondsToUnits = function (seconds) {\n\t        return seconds / (60 / this._getBpm()) * this._getPPQ();\n\t    };\n\t    /**\n\t\t *  Returns the value of a tick in the current time units\n\t\t *  @param {Ticks} ticks\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Ticks.prototype._ticksToUnits = function (ticks) {\n\t        return ticks;\n\t    };\n\t    /**\n\t\t *  Return the time in ticks\n\t\t *  @return  {Ticks}\n\t\t */\n\t    Tone.Ticks.prototype.toTicks = function () {\n\t        return this.valueOf();\n\t    };\n\t    /**\n\t\t *  Return the time in ticks\n\t\t *  @return  {Ticks}\n\t\t */\n\t    Tone.Ticks.prototype.toSeconds = function () {\n\t        return this.valueOf() / this._getPPQ() * (60 / this._getBpm());\n\t    };\n\t    return Tone.Ticks;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.TransportEvent is an internal class used by (Tone.Transport)[Transport]\n\t\t *         to schedule events. Do no invoke this class directly, it is\n\t\t *         handled from within Tone.Transport.\n\t\t *  @extends {Tone}\n\t\t *  @param {Object} options\n\t\t */\n\t    Tone.TransportEvent = function (Transport, options) {\n\t        options = Tone.defaultArg(options, Tone.TransportEvent.defaults);\n\t        Tone.call(this);\n\t        /**\n\t\t\t * Reference to the Transport that created it\n\t\t\t * @type {Tone.Transport}\n\t\t\t */\n\t        this.Transport = Transport;\n\t        /**\n\t\t\t * The unique id of the event\n\t\t\t * @type {Number}\n\t\t\t */\n\t        this.id = Tone.TransportEvent._eventId++;\n\t        /**\n\t\t\t * The time the event starts\n\t\t\t * @type {Ticks}\n\t\t\t */\n\t        this.time = Tone.Ticks(options.time);\n\t        /**\n\t\t\t * The callback to invoke\n\t\t\t * @type {Function}\n\t\t\t */\n\t        this.callback = options.callback;\n\t        /**\n\t\t\t * If the event should be removed after being created.\n\t\t\t * @type {Boolean}\n\t\t\t * @private\n\t\t\t */\n\t        this._once = options.once;\n\t    };\n\t    Tone.extend(Tone.TransportEvent);\n\t    /**\n\t\t * The defaults\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t    Tone.TransportEvent.defaults = {\n\t        'once': false,\n\t        'callback': Tone.noOp\n\t    };\n\t    /**\n\t\t * Current ID counter\n\t\t * @private\n\t\t * @static\n\t\t * @type {Number}\n\t\t */\n\t    Tone.TransportEvent._eventId = 0;\n\t    /**\n\t\t * Invoke the event callback.\n\t\t * @param  {Time} time  The AudioContext time in seconds of the event\n\t\t */\n\t    Tone.TransportEvent.prototype.invoke = function (time) {\n\t        if (this.callback) {\n\t            this.callback(time);\n\t            if (this._once && this.Transport) {\n\t                this.Transport.clear(this.id);\n\t            }\n\t        }\n\t    };\n\t    /**\n\t\t * Clean up\n\t\t * @return {Tone.TransportEvent} this\n\t\t */\n\t    Tone.TransportEvent.prototype.dispose = function () {\n\t        Tone.prototype.dispose.call(this);\n\t        this.Transport = null;\n\t        this.callback = null;\n\t        this.time = null;\n\t        return this;\n\t    };\n\t    return Tone.TransportEvent;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.TransportRepeatEvent is an internal class used by Tone.Transport\n\t\t *         to schedule repeat events. This class should not be instantiated directly.\n\t\t *  @extends {Tone.TransportEvent}\n\t\t *  @param {Object} options\n\t\t */\n\t    Tone.TransportRepeatEvent = function (Transport, options) {\n\t        Tone.TransportEvent.call(this, Transport, options);\n\t        options = Tone.defaultArg(options, Tone.TransportRepeatEvent.defaults);\n\t        /**\n\t\t\t * When the event should stop repeating\n\t\t\t * @type {Ticks}\n\t\t\t * @private\n\t\t\t */\n\t        this.duration = Tone.Ticks(options.duration);\n\t        /**\n\t\t\t * The interval of the repeated event\n\t\t\t * @type {Ticks}\n\t\t\t * @private\n\t\t\t */\n\t        this._interval = Tone.Ticks(options.interval);\n\t        /**\n\t\t\t * The ID of the current timeline event\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t        this._currentId = -1;\n\t        /**\n\t\t\t * The ID of the next timeline event\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t        this._nextId = -1;\n\t        /**\n\t\t\t  * The time of the next event\n\t\t\t  * @type {Ticks}\n\t\t\t  * @private\n\t\t\t  */\n\t        this._nextTick = this.time;\n\t        /**\n\t\t\t * a reference to the bound start method\n\t\t\t * @type {Function}\n\t\t\t * @private\n\t\t\t */\n\t        this._boundRestart = this._restart.bind(this);\n\t        this.Transport.on('start loopStart', this._boundRestart);\n\t        this._restart();\n\t    };\n\t    Tone.extend(Tone.TransportRepeatEvent, Tone.TransportEvent);\n\t    /**\n\t\t * The defaults\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t    Tone.TransportRepeatEvent.defaults = {\n\t        'duration': Infinity,\n\t        'interval': 1\n\t    };\n\t    /**\n\t\t * Invoke the callback. Returns the tick time which\n\t\t * the next event should be scheduled at.\n\t\t * @param  {Number} time  The AudioContext time in seconds of the event\n\t\t */\n\t    Tone.TransportRepeatEvent.prototype.invoke = function (time) {\n\t        //create more events if necessary\n\t        this._createEvents(time);\n\t        //call the super class\n\t        Tone.TransportEvent.prototype.invoke.call(this, time);\n\t    };\n\t    /**\n\t\t * Push more events onto the timeline to keep up with the position of the timeline\n\t\t * @private\n\t\t */\n\t    Tone.TransportRepeatEvent.prototype._createEvents = function (time) {\n\t        // schedule the next event\n\t        var ticks = this.Transport.getTicksAtTime(time);\n\t        if (ticks >= this.time && ticks >= this._nextTick && this._nextTick + this._interval < this.time + this.duration) {\n\t            this._nextTick += this._interval;\n\t            this._currentId = this._nextId;\n\t            this._nextId = this.Transport.scheduleOnce(this.invoke.bind(this), Tone.Ticks(this._nextTick));\n\t        }\n\t    };\n\t    /**\n\t\t * Push more events onto the timeline to keep up with the position of the timeline\n\t\t * @private\n\t\t */\n\t    Tone.TransportRepeatEvent.prototype._restart = function (time) {\n\t        this.Transport.clear(this._currentId);\n\t        this.Transport.clear(this._nextId);\n\t        this._nextTick = this.time;\n\t        var ticks = this.Transport.getTicksAtTime(time);\n\t        if (ticks > this.time) {\n\t            this._nextTick = this.time + Math.ceil((ticks - this.time) / this._interval) * this._interval;\n\t        }\n\t        this._currentId = this.Transport.scheduleOnce(this.invoke.bind(this), Tone.Ticks(this._nextTick));\n\t        this._nextTick += this._interval;\n\t        this._nextId = this.Transport.scheduleOnce(this.invoke.bind(this), Tone.Ticks(this._nextTick));\n\t    };\n\t    /**\n\t\t * Clean up\n\t\t * @return {Tone.TransportRepeatEvent} this\n\t\t */\n\t    Tone.TransportRepeatEvent.prototype.dispose = function () {\n\t        this.Transport.clear(this._currentId);\n\t        this.Transport.clear(this._nextId);\n\t        this.Transport.off('start loopStart', this._boundRestart);\n\t        this._boundCreateEvents = null;\n\t        Tone.TransportEvent.prototype.dispose.call(this);\n\t        this.duration = null;\n\t        this._interval = null;\n\t        return this;\n\t    };\n\t    return Tone.TransportRepeatEvent;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Transport for timing musical events.\n\t\t *          Supports tempo curves and time changes. Unlike browser-based timing (setInterval, requestAnimationFrame)\n\t\t *          Tone.Transport timing events pass in the exact time of the scheduled event\n\t\t *          in the argument of the callback function. Pass that time value to the object\n\t\t *          you're scheduling. <br><br>\n\t\t *          A single transport is created for you when the library is initialized.\n\t\t *          <br><br>\n\t\t *          The transport emits the events: \"start\", \"stop\", \"pause\", and \"loop\" which are\n\t\t *          called with the time of that event as the argument.\n\t\t *\n\t\t *  @extends {Tone.Emitter}\n\t\t *  @singleton\n\t\t *  @example\n\t\t * //repeated event every 8th note\n\t\t * Tone.Transport.scheduleRepeat(function(time){\n\t\t * \t//do something with the time\n\t\t * }, \"8n\");\n\t\t *  @example\n\t\t * //schedule an event on the 16th measure\n\t\t * Tone.Transport.schedule(function(time){\n\t\t * \t//do something with the time\n\t\t * }, \"16:0:0\");\n\t\t */\n\t    Tone.Transport = function () {\n\t        Tone.Emitter.call(this);\n\t        Tone.getContext(function () {\n\t            ///////////////////////////////////////////////////////////////////////\n\t            //\tLOOPING\n\t            //////////////////////////////////////////////////////////////////////\n\t            /**\n\t\t\t\t * \tIf the transport loops or not.\n\t\t\t\t *  @type {boolean}\n\t\t\t\t */\n\t            this.loop = false;\n\t            /**\n\t\t\t\t * \tThe loop start position in ticks\n\t\t\t\t *  @type {Ticks}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._loopStart = 0;\n\t            /**\n\t\t\t\t * \tThe loop end position in ticks\n\t\t\t\t *  @type {Ticks}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._loopEnd = 0;\n\t            ///////////////////////////////////////////////////////////////////////\n\t            //\tCLOCK/TEMPO\n\t            //////////////////////////////////////////////////////////////////////\n\t            /**\n\t\t\t\t *  Pulses per quarter is the number of ticks per quarter note.\n\t\t\t\t *  @private\n\t\t\t\t *  @type  {Number}\n\t\t\t\t */\n\t            this._ppq = TransportConstructor.defaults.PPQ;\n\t            /**\n\t\t\t\t *  watches the main oscillator for timing ticks\n\t\t\t\t *  initially starts at 120bpm\n\t\t\t\t *  @private\n\t\t\t\t *  @type {Tone.Clock}\n\t\t\t\t */\n\t            this._clock = new Tone.Clock({\n\t                'callback': this._processTick.bind(this),\n\t                'frequency': 0\n\t            });\n\t            this._bindClockEvents();\n\t            /**\n\t\t\t\t *  The Beats Per Minute of the Transport.\n\t\t\t\t *  @type {BPM}\n\t\t\t\t *  @signal\n\t\t\t\t *  @example\n\t\t\t\t * Tone.Transport.bpm.value = 80;\n\t\t\t\t * //ramp the bpm to 120 over 10 seconds\n\t\t\t\t * Tone.Transport.bpm.rampTo(120, 10);\n\t\t\t\t */\n\t            this.bpm = this._clock.frequency;\n\t            this.bpm._toUnits = this._toUnits.bind(this);\n\t            this.bpm._fromUnits = this._fromUnits.bind(this);\n\t            this.bpm.units = Tone.Type.BPM;\n\t            this.bpm.value = TransportConstructor.defaults.bpm;\n\t            this._readOnly('bpm');\n\t            /**\n\t\t\t\t *  The time signature, or more accurately the numerator\n\t\t\t\t *  of the time signature over a denominator of 4.\n\t\t\t\t *  @type {Number}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._timeSignature = TransportConstructor.defaults.timeSignature;\n\t            ///////////////////////////////////////////////////////////////////////\n\t            //\tTIMELINE EVENTS\n\t            //////////////////////////////////////////////////////////////////////\n\t            /**\n\t\t\t\t *  All the events in an object to keep track by ID\n\t\t\t\t *  @type {Object}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._scheduledEvents = {};\n\t            /**\n\t\t\t\t * \tThe scheduled events.\n\t\t\t\t *  @type {Tone.Timeline}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._timeline = new Tone.Timeline();\n\t            /**\n\t\t\t\t *  Repeated events\n\t\t\t\t *  @type {Array}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._repeatedEvents = new Tone.IntervalTimeline();\n\t            /**\n\t\t\t\t *  All of the synced Signals\n\t\t\t\t *  @private\n\t\t\t\t *  @type {Array}\n\t\t\t\t */\n\t            this._syncedSignals = [];\n\t            ///////////////////////////////////////////////////////////////////////\n\t            //\tSWING\n\t            //////////////////////////////////////////////////////////////////////\n\t            /**\n\t\t\t\t *  The subdivision of the swing\n\t\t\t\t *  @type  {Ticks}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._swingTicks = TransportConstructor.defaults.PPQ / 2;\n\t            //8n\n\t            /**\n\t\t\t\t *  The swing amount\n\t\t\t\t *  @type {NormalRange}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._swingAmount = 0;\n\t        }.bind(this));\n\t    };\n\t    Tone.extend(Tone.Transport, Tone.Emitter);\n\t    /**\n\t\t *  the defaults\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t *  @static\n\t\t */\n\t    Tone.Transport.defaults = {\n\t        'bpm': 120,\n\t        'swing': 0,\n\t        'swingSubdivision': '8n',\n\t        'timeSignature': 4,\n\t        'loopStart': 0,\n\t        'loopEnd': '4m',\n\t        'PPQ': 192\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    //\tTICKS\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  called on every tick\n\t\t *  @param   {number} tickTime clock relative tick time\n\t\t *  @private\n\t\t */\n\t    Tone.Transport.prototype._processTick = function (tickTime, ticks) {\n\t        //handle swing\n\t        if (this._swingAmount > 0 && ticks % this._ppq !== 0 && //not on a downbeat\n\t            ticks % (this._swingTicks * 2) !== 0) {\n\t            //add some swing\n\t            var progress = ticks % (this._swingTicks * 2) / (this._swingTicks * 2);\n\t            var amount = Math.sin(progress * Math.PI) * this._swingAmount;\n\t            tickTime += Tone.Ticks(this._swingTicks * 2 / 3).toSeconds() * amount;\n\t        }\n\t        //do the loop test\n\t        if (this.loop) {\n\t            if (ticks >= this._loopEnd) {\n\t                this.emit('loopEnd', tickTime);\n\t                this._clock.setTicksAtTime(this._loopStart, tickTime);\n\t                ticks = this._loopStart;\n\t                this.emit('loopStart', tickTime, this._clock.getSecondsAtTime(tickTime));\n\t                this.emit('loop', tickTime);\n\t            }\n\t        }\n\t        //invoke the timeline events scheduled on this tick\n\t        this._timeline.forEachAtTime(ticks, function (event) {\n\t            event.invoke(tickTime);\n\t        });\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    //\tSCHEDULABLE EVENTS\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Schedule an event along the timeline.\n\t\t *  @param {Function} callback The callback to be invoked at the time.\n\t\t *  @param {TransportTime}  time The time to invoke the callback at.\n\t\t *  @return {Number} The id of the event which can be used for canceling the event.\n\t\t *  @example\n\t\t * //trigger the callback when the Transport reaches the desired time\n\t\t * Tone.Transport.schedule(function(time){\n\t\t * \tenvelope.triggerAttack(time);\n\t\t * }, \"128i\");\n\t\t */\n\t    Tone.Transport.prototype.schedule = function (callback, time) {\n\t        var event = new Tone.TransportEvent(this, {\n\t            'time': Tone.TransportTime(time),\n\t            'callback': callback\n\t        });\n\t        return this._addEvent(event, this._timeline);\n\t    };\n\t    /**\n\t\t *  Schedule a repeated event along the timeline. The event will fire\n\t\t *  at the `interval` starting at the `startTime` and for the specified\n\t\t *  `duration`.\n\t\t *  @param  {Function}  callback   The callback to invoke.\n\t\t *  @param  {Time}    interval   The duration between successive\n\t\t *                               callbacks. Must be a positive number.\n\t\t *  @param  {TransportTime=}    startTime  When along the timeline the events should\n\t\t *                               start being invoked.\n\t\t *  @param {Time} [duration=Infinity] How long the event should repeat.\n\t\t *  @return  {Number}    The ID of the scheduled event. Use this to cancel\n\t\t *                           the event.\n\t\t *  @example\n\t\t * //a callback invoked every eighth note after the first measure\n\t\t * Tone.Transport.scheduleRepeat(callback, \"8n\", \"1m\");\n\t\t */\n\t    Tone.Transport.prototype.scheduleRepeat = function (callback, interval, startTime, duration) {\n\t        var event = new Tone.TransportRepeatEvent(this, {\n\t            'callback': callback,\n\t            'interval': Tone.Time(interval),\n\t            'time': Tone.TransportTime(startTime),\n\t            'duration': Tone.Time(Tone.defaultArg(duration, Infinity))\n\t        });\n\t        //kick it off if the Transport is started\n\t        return this._addEvent(event, this._repeatedEvents);\n\t    };\n\t    /**\n\t\t *  Schedule an event that will be removed after it is invoked.\n\t\t *  Note that if the given time is less than the current transport time,\n\t\t *  the event will be invoked immediately.\n\t\t *  @param {Function} callback The callback to invoke once.\n\t\t *  @param {TransportTime} time The time the callback should be invoked.\n\t\t *  @returns {Number} The ID of the scheduled event.\n\t\t */\n\t    Tone.Transport.prototype.scheduleOnce = function (callback, time) {\n\t        var event = new Tone.TransportEvent(this, {\n\t            'time': Tone.TransportTime(time),\n\t            'callback': callback,\n\t            'once': true\n\t        });\n\t        return this._addEvent(event, this._timeline);\n\t    };\n\t    /**\n\t\t *  Clear the passed in event id from the timeline\n\t\t *  @param {Number} eventId The id of the event.\n\t\t *  @returns {Tone.Transport} this\n\t\t */\n\t    Tone.Transport.prototype.clear = function (eventId) {\n\t        if (this._scheduledEvents.hasOwnProperty(eventId)) {\n\t            var item = this._scheduledEvents[eventId.toString()];\n\t            item.timeline.remove(item.event);\n\t            item.event.dispose();\n\t            delete this._scheduledEvents[eventId.toString()];\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * Add an event to the correct timeline. Keep track of the\n\t\t * timeline it was added to.\n\t\t * @param {Tone.TransportEvent}\tevent\n\t\t * @param {Tone.Timeline} timeline\n\t\t * @returns {Number} the event id which was just added\n\t\t * @private\n\t\t */\n\t    Tone.Transport.prototype._addEvent = function (event, timeline) {\n\t        this._scheduledEvents[event.id.toString()] = {\n\t            'event': event,\n\t            'timeline': timeline\n\t        };\n\t        timeline.add(event);\n\t        return event.id;\n\t    };\n\t    /**\n\t\t *  Remove scheduled events from the timeline after\n\t\t *  the given time. Repeated events will be removed\n\t\t *  if their startTime is after the given time\n\t\t *  @param {TransportTime} [after=0] Clear all events after\n\t\t *                          this time.\n\t\t *  @returns {Tone.Transport} this\n\t\t */\n\t    Tone.Transport.prototype.cancel = function (after) {\n\t        after = Tone.defaultArg(after, 0);\n\t        after = this.toTicks(after);\n\t        this._timeline.forEachFrom(after, function (event) {\n\t            this.clear(event.id);\n\t        }.bind(this));\n\t        this._repeatedEvents.forEachFrom(after, function (event) {\n\t            this.clear(event.id);\n\t        }.bind(this));\n\t        return this;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    //\tSTART/STOP/PAUSE\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Bind start/stop/pause events from the clock and emit them.\n\t\t *  @private\n\t\t */\n\t    Tone.Transport.prototype._bindClockEvents = function () {\n\t        this._clock.on('start', function (time, offset) {\n\t            offset = Tone.Ticks(offset).toSeconds();\n\t            this.emit('start', time, offset);\n\t        }.bind(this));\n\t        this._clock.on('stop', function (time) {\n\t            this.emit('stop', time);\n\t        }.bind(this));\n\t        this._clock.on('pause', function (time) {\n\t            this.emit('pause', time);\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t *  Returns the playback state of the source, either \"started\", \"stopped\", or \"paused\"\n\t\t *  @type {Tone.State}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.Transport#\n\t\t *  @name state\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'state', {\n\t        get: function () {\n\t            return this._clock.getStateAtTime(this.now());\n\t        }\n\t    });\n\t    /**\n\t\t *  Start the transport and all sources synced to the transport.\n\t\t *  @param  {Time} [time=now] The time when the transport should start.\n\t\t *  @param  {TransportTime=} offset The timeline offset to start the transport.\n\t\t *  @returns {Tone.Transport} this\n\t\t *  @example\n\t\t * //start the transport in one second starting at beginning of the 5th measure.\n\t\t * Tone.Transport.start(\"+1\", \"4:0:0\");\n\t\t */\n\t    Tone.Transport.prototype.start = function (time, offset) {\n\t        //start the clock\n\t        if (Tone.isDefined(offset)) {\n\t            offset = this.toTicks(offset);\n\t        }\n\t        this._clock.start(time, offset);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Stop the transport and all sources synced to the transport.\n\t\t *  @param  {Time} [time=now] The time when the transport should stop.\n\t\t *  @returns {Tone.Transport} this\n\t\t *  @example\n\t\t * Tone.Transport.stop();\n\t\t */\n\t    Tone.Transport.prototype.stop = function (time) {\n\t        this._clock.stop(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Pause the transport and all sources synced to the transport.\n\t\t *  @param  {Time} [time=now]\n\t\t *  @returns {Tone.Transport} this\n\t\t */\n\t    Tone.Transport.prototype.pause = function (time) {\n\t        this._clock.pause(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Toggle the current state of the transport. If it is\n\t\t * started, it will stop it, otherwise it will start the Transport.\n\t\t * @param  {Time=} time The time of the event\n\t\t * @return {Tone.Transport}      this\n\t\t */\n\t    Tone.Transport.prototype.toggle = function (time) {\n\t        time = this.toSeconds(time);\n\t        if (this._clock.getStateAtTime(time) !== Tone.State.Started) {\n\t            this.start(time);\n\t        } else {\n\t            this.stop(time);\n\t        }\n\t        return this;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    //\tSETTERS/GETTERS\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  The time signature as just the numerator over 4.\n\t\t *  For example 4/4 would be just 4 and 6/8 would be 3.\n\t\t *  @memberOf Tone.Transport#\n\t\t *  @type {Number|Array}\n\t\t *  @name timeSignature\n\t\t *  @example\n\t\t * //common time\n\t\t * Tone.Transport.timeSignature = 4;\n\t\t * // 7/8\n\t\t * Tone.Transport.timeSignature = [7, 8];\n\t\t * //this will be reduced to a single number\n\t\t * Tone.Transport.timeSignature; //returns 3.5\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'timeSignature', {\n\t        get: function () {\n\t            return this._timeSignature;\n\t        },\n\t        set: function (timeSig) {\n\t            if (Tone.isArray(timeSig)) {\n\t                timeSig = timeSig[0] / timeSig[1] * 4;\n\t            }\n\t            this._timeSignature = timeSig;\n\t        }\n\t    });\n\t    /**\n\t\t * When the Tone.Transport.loop = true, this is the starting position of the loop.\n\t\t * @memberOf Tone.Transport#\n\t\t * @type {Time}\n\t\t * @name loopStart\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'loopStart', {\n\t        get: function () {\n\t            return Tone.Ticks(this._loopStart).toSeconds();\n\t        },\n\t        set: function (startPosition) {\n\t            this._loopStart = this.toTicks(startPosition);\n\t        }\n\t    });\n\t    /**\n\t\t * When the Tone.Transport.loop = true, this is the ending position of the loop.\n\t\t * @memberOf Tone.Transport#\n\t\t * @type {Time}\n\t\t * @name loopEnd\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'loopEnd', {\n\t        get: function () {\n\t            return Tone.Ticks(this._loopEnd).toSeconds();\n\t        },\n\t        set: function (endPosition) {\n\t            this._loopEnd = this.toTicks(endPosition);\n\t        }\n\t    });\n\t    /**\n\t\t *  Set the loop start and stop at the same time.\n\t\t *  @param {TransportTime} startPosition\n\t\t *  @param {TransportTime} endPosition\n\t\t *  @returns {Tone.Transport} this\n\t\t *  @example\n\t\t * //loop over the first measure\n\t\t * Tone.Transport.setLoopPoints(0, \"1m\");\n\t\t * Tone.Transport.loop = true;\n\t\t */\n\t    Tone.Transport.prototype.setLoopPoints = function (startPosition, endPosition) {\n\t        this.loopStart = startPosition;\n\t        this.loopEnd = endPosition;\n\t        return this;\n\t    };\n\t    /**\n\t\t *  The swing value. Between 0-1 where 1 equal to\n\t\t *  the note + half the subdivision.\n\t\t *  @memberOf Tone.Transport#\n\t\t *  @type {NormalRange}\n\t\t *  @name swing\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'swing', {\n\t        get: function () {\n\t            return this._swingAmount;\n\t        },\n\t        set: function (amount) {\n\t            //scale the values to a normal range\n\t            this._swingAmount = amount;\n\t        }\n\t    });\n\t    /**\n\t\t *  Set the subdivision which the swing will be applied to.\n\t\t *  The default value is an 8th note. Value must be less\n\t\t *  than a quarter note.\n\t\t *\n\t\t *  @memberOf Tone.Transport#\n\t\t *  @type {Time}\n\t\t *  @name swingSubdivision\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'swingSubdivision', {\n\t        get: function () {\n\t            return Tone.Ticks(this._swingTicks).toNotation();\n\t        },\n\t        set: function (subdivision) {\n\t            this._swingTicks = this.toTicks(subdivision);\n\t        }\n\t    });\n\t    /**\n\t\t *  The Transport's position in Bars:Beats:Sixteenths.\n\t\t *  Setting the value will jump to that position right away.\n\t\t *  @memberOf Tone.Transport#\n\t\t *  @type {BarsBeatsSixteenths}\n\t\t *  @name position\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'position', {\n\t        get: function () {\n\t            var now = this.now();\n\t            var ticks = this._clock.getTicksAtTime(now);\n\t            return Tone.Ticks(ticks).toBarsBeatsSixteenths();\n\t        },\n\t        set: function (progress) {\n\t            var ticks = this.toTicks(progress);\n\t            this.ticks = ticks;\n\t        }\n\t    });\n\t    /**\n\t\t *  The Transport's position in seconds\n\t\t *  Setting the value will jump to that position right away.\n\t\t *  @memberOf Tone.Transport#\n\t\t *  @type {Seconds}\n\t\t *  @name seconds\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'seconds', {\n\t        get: function () {\n\t            return this._clock.seconds;\n\t        },\n\t        set: function (s) {\n\t            var now = this.now();\n\t            var ticks = this.bpm.timeToTicks(s, now);\n\t            this.ticks = ticks;\n\t        }\n\t    });\n\t    /**\n\t\t *  The Transport's loop position as a normalized value. Always\n\t\t *  returns 0 if the transport if loop is not true.\n\t\t *  @memberOf Tone.Transport#\n\t\t *  @name progress\n\t\t *  @type {NormalRange}\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'progress', {\n\t        get: function () {\n\t            if (this.loop) {\n\t                var now = this.now();\n\t                var ticks = this._clock.getTicksAtTime(now);\n\t                return (ticks - this._loopStart) / (this._loopEnd - this._loopStart);\n\t            } else {\n\t                return 0;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  The transports current tick position.\n\t\t *\n\t\t *  @memberOf Tone.Transport#\n\t\t *  @type {Ticks}\n\t\t *  @name ticks\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'ticks', {\n\t        get: function () {\n\t            return this._clock.ticks;\n\t        },\n\t        set: function (t) {\n\t            if (this._clock.ticks !== t) {\n\t                var now = this.now();\n\t                //stop everything synced to the transport\n\t                if (this.state === Tone.State.Started) {\n\t                    this.emit('stop', now);\n\t                    this._clock.setTicksAtTime(t, now);\n\t                    //restart it with the new time\n\t                    this.emit('start', now, this.seconds);\n\t                } else {\n\t                    this._clock.setTicksAtTime(t, now);\n\t                }\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * Get the clock's ticks at the given time.\n\t\t * @param  {Time} time  When to get the tick value\n\t\t * @return {Ticks}       The tick value at the given time.\n\t\t */\n\t    Tone.Transport.prototype.getTicksAtTime = function (time) {\n\t        return Math.round(this._clock.getTicksAtTime(time));\n\t    };\n\t    /**\n\t\t *  Return the elapsed seconds at the given time.\n\t\t *  @param  {Time}  time  When to get the elapsed seconds\n\t\t *  @return  {Seconds}  The number of elapsed seconds\n\t\t */\n\t    Tone.Transport.prototype.getSecondsAtTime = function (time) {\n\t        return this._clock.getSecondsAtTime(time);\n\t    };\n\t    /**\n\t\t *  Pulses Per Quarter note. This is the smallest resolution\n\t\t *  the Transport timing supports. This should be set once\n\t\t *  on initialization and not set again. Changing this value\n\t\t *  after other objects have been created can cause problems.\n\t\t *\n\t\t *  @memberOf Tone.Transport#\n\t\t *  @type {Number}\n\t\t *  @name PPQ\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'PPQ', {\n\t        get: function () {\n\t            return this._ppq;\n\t        },\n\t        set: function (ppq) {\n\t            var bpm = this.bpm.value;\n\t            this._ppq = ppq;\n\t            this.bpm.value = bpm;\n\t        }\n\t    });\n\t    /**\n\t\t *  Convert from BPM to frequency (factoring in PPQ)\n\t\t *  @param  {BPM}  bpm The BPM value to convert to frequency\n\t\t *  @return  {Frequency}  The BPM as a frequency with PPQ factored in.\n\t\t *  @private\n\t\t */\n\t    Tone.Transport.prototype._fromUnits = function (bpm) {\n\t        return 1 / (60 / bpm / this.PPQ);\n\t    };\n\t    /**\n\t\t *  Convert from frequency (with PPQ) into BPM\n\t\t *  @param  {Frequency}  freq The clocks frequency to convert to BPM\n\t\t *  @return  {BPM}  The frequency value as BPM.\n\t\t *  @private\n\t\t */\n\t    Tone.Transport.prototype._toUnits = function (freq) {\n\t        return freq / this.PPQ * 60;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    //\tSYNCING\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Returns the time aligned to the next subdivision\n\t\t *  of the Transport. If the Transport is not started,\n\t\t *  it will return 0.\n\t\t *  Note: this will not work precisely during tempo ramps.\n\t\t *  @param  {Time}  subdivision  The subdivision to quantize to\n\t\t *  @return  {Number}  The context time of the next subdivision.\n\t\t *  @example\n\t\t * Tone.Transport.start(); //the transport must be started\n\t\t * Tone.Transport.nextSubdivision(\"4n\");\n\t\t */\n\t    Tone.Transport.prototype.nextSubdivision = function (subdivision) {\n\t        subdivision = this.toTicks(subdivision);\n\t        if (this.state !== Tone.State.Started) {\n\t            //if the transport's not started, return 0\n\t            return 0;\n\t        } else {\n\t            var now = this.now();\n\t            //the remainder of the current ticks and the subdivision\n\t            var transportPos = this.getTicksAtTime(now);\n\t            var remainingTicks = subdivision - transportPos % subdivision;\n\t            return this._clock.nextTickTime(remainingTicks, now);\n\t        }\n\t    };\n\t    /**\n\t\t *  Attaches the signal to the tempo control signal so that\n\t\t *  any changes in the tempo will change the signal in the same\n\t\t *  ratio.\n\t\t *\n\t\t *  @param  {Tone.Signal} signal\n\t\t *  @param {number=} ratio Optionally pass in the ratio between\n\t\t *                         the two signals. Otherwise it will be computed\n\t\t *                         based on their current values.\n\t\t *  @returns {Tone.Transport} this\n\t\t */\n\t    Tone.Transport.prototype.syncSignal = function (signal, ratio) {\n\t        if (!ratio) {\n\t            //get the sync ratio\n\t            var now = this.now();\n\t            if (signal.getValueAtTime(now) !== 0) {\n\t                ratio = signal.getValueAtTime(now) / this.bpm.getValueAtTime(now);\n\t            } else {\n\t                ratio = 0;\n\t            }\n\t        }\n\t        var ratioSignal = new Tone.Gain(ratio);\n\t        this.bpm.chain(ratioSignal, signal._param);\n\t        this._syncedSignals.push({\n\t            'ratio': ratioSignal,\n\t            'signal': signal,\n\t            'initial': signal.value\n\t        });\n\t        signal.value = 0;\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Unsyncs a previously synced signal from the transport's control.\n\t\t *  See Tone.Transport.syncSignal.\n\t\t *  @param  {Tone.Signal} signal\n\t\t *  @returns {Tone.Transport} this\n\t\t */\n\t    Tone.Transport.prototype.unsyncSignal = function (signal) {\n\t        for (var i = this._syncedSignals.length - 1; i >= 0; i--) {\n\t            var syncedSignal = this._syncedSignals[i];\n\t            if (syncedSignal.signal === signal) {\n\t                syncedSignal.ratio.dispose();\n\t                syncedSignal.signal.value = syncedSignal.initial;\n\t                this._syncedSignals.splice(i, 1);\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Transport} this\n\t\t *  @private\n\t\t */\n\t    Tone.Transport.prototype.dispose = function () {\n\t        Tone.Emitter.prototype.dispose.call(this);\n\t        this._clock.dispose();\n\t        this._clock = null;\n\t        this._writable('bpm');\n\t        this.bpm = null;\n\t        this._timeline.dispose();\n\t        this._timeline = null;\n\t        this._repeatedEvents.dispose();\n\t        this._repeatedEvents = null;\n\t        return this;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    //\tINITIALIZATION\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    var TransportConstructor = Tone.Transport;\n\t    Tone.Transport = new TransportConstructor();\n\t    Tone.Context.on('init', function (context) {\n\t        if (context.Transport instanceof TransportConstructor) {\n\t            Tone.Transport = context.Transport;\n\t        } else {\n\t            Tone.Transport = new TransportConstructor();\n\t        }\n\t        //store the Transport on the context so it can be retrieved later\n\t        context.Transport = Tone.Transport;\n\t    });\n\t    Tone.Context.on('close', function (context) {\n\t        if (context.Transport instanceof TransportConstructor) {\n\t            context.Transport.dispose();\n\t        }\n\t    });\n\t    return Tone.Transport;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Volume is a simple volume node, useful for creating a volume fader.\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t *  @param {Decibels} [volume=0] the initial volume\n\t\t *  @example\n\t\t * var vol = new Tone.Volume(-12);\n\t\t * instrument.chain(vol, Tone.Master);\n\t\t */\n\t    Tone.Volume = function () {\n\t        var options = Tone.defaults(arguments, ['volume'], Tone.Volume);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t * the output node\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t        this.output = this.input = new Tone.Gain(options.volume, Tone.Type.Decibels);\n\t        /**\n\t\t\t * The unmuted volume\n\t\t\t * @type {Decibels}\n\t\t\t * @private\n\t\t\t */\n\t        this._unmutedVolume = options.volume;\n\t        /**\n\t\t\t *  The volume control in decibels.\n\t\t\t *  @type {Decibels}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.volume = this.output.gain;\n\t        this._readOnly('volume');\n\t        //set the mute initially\n\t        this.mute = options.mute;\n\t    };\n\t    Tone.extend(Tone.Volume, Tone.AudioNode);\n\t    /**\n\t\t *  Defaults\n\t\t *  @type  {Object}\n\t\t *  @const\n\t\t *  @static\n\t\t */\n\t    Tone.Volume.defaults = {\n\t        'volume': 0,\n\t        'mute': false\n\t    };\n\t    /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.Volume#\n\t\t * @type {boolean}\n\t\t * @name mute\n\t\t * @example\n\t\t * //mute the output\n\t\t * volume.mute = true;\n\t\t */\n\t    Object.defineProperty(Tone.Volume.prototype, 'mute', {\n\t        get: function () {\n\t            return this.volume.value === -Infinity;\n\t        },\n\t        set: function (mute) {\n\t            if (!this.mute && mute) {\n\t                this._unmutedVolume = this.volume.value;\n\t                //maybe it should ramp here?\n\t                this.volume.value = -Infinity;\n\t            } else if (this.mute && !mute) {\n\t                this.volume.value = this._unmutedVolume;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Volume} this\n\t\t */\n\t    Tone.Volume.prototype.dispose = function () {\n\t        this.input.dispose();\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable('volume');\n\t        this.volume.dispose();\n\t        this.volume = null;\n\t        return this;\n\t    };\n\t    return Tone.Volume;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  A single master output which is connected to the\n\t\t *          AudioDestinationNode (aka your speakers).\n\t\t *          It provides useful conveniences such as the ability\n\t\t *          to set the volume and mute the entire application.\n\t\t *          It also gives you the ability to apply master effects to your application.\n\t\t *          <br><br>\n\t\t *          Like Tone.Transport, A single Tone.Master is created\n\t\t *          on initialization and you do not need to explicitly construct one.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone}\n\t\t *  @singleton\n\t\t *  @example\n\t\t * //the audio will go from the oscillator to the speakers\n\t\t * oscillator.connect(Tone.Master);\n\t\t * //a convenience for connecting to the master output is also provided:\n\t\t * oscillator.toMaster();\n\t\t * //the above two examples are equivalent.\n\t\t */\n\t    Tone.Master = function () {\n\t        Tone.AudioNode.call(this);\n\t        Tone.getContext(function () {\n\t            this.createInsOuts(1, 0);\n\t            /**\n\t\t\t\t *  The private volume node\n\t\t\t\t *  @type  {Tone.Volume}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._volume = this.output = new Tone.Volume();\n\t            /**\n\t\t\t\t * The volume of the master output.\n\t\t\t\t * @type {Decibels}\n\t\t\t\t * @signal\n\t\t\t\t */\n\t            this.volume = this._volume.volume;\n\t            this._readOnly('volume');\n\t            //connections\n\t            this.input.chain(this.output, this.context.destination);\n\t        }.bind(this));\n\t    };\n\t    Tone.extend(Tone.Master, Tone.AudioNode);\n\t    /**\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.Master.defaults = {\n\t        'volume': 0,\n\t        'mute': false\n\t    };\n\t    /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.Master#\n\t\t * @type {boolean}\n\t\t * @name mute\n\t\t * @example\n\t\t * //mute the output\n\t\t * Tone.Master.mute = true;\n\t\t */\n\t    Object.defineProperty(Tone.Master.prototype, 'mute', {\n\t        get: function () {\n\t            return this._volume.mute;\n\t        },\n\t        set: function (mute) {\n\t            this._volume.mute = mute;\n\t        }\n\t    });\n\t    /**\n\t\t *  Add a master effects chain. NOTE: this will disconnect any nodes which were previously\n\t\t *  chained in the master effects chain.\n\t\t *  @param {AudioNode|Tone} args... All arguments will be connected in a row\n\t\t *                                  and the Master will be routed through it.\n\t\t *  @return  {Tone.Master}  this\n\t\t *  @example\n\t\t * //some overall compression to keep the levels in check\n\t\t * var masterCompressor = new Tone.Compressor({\n\t\t * \t\"threshold\" : -6,\n\t\t * \t\"ratio\" : 3,\n\t\t * \t\"attack\" : 0.5,\n\t\t * \t\"release\" : 0.1\n\t\t * });\n\t\t * //give a little boost to the lows\n\t\t * var lowBump = new Tone.Filter(200, \"lowshelf\");\n\t\t * //route everything through the filter\n\t\t * //and compressor before going to the speakers\n\t\t * Tone.Master.chain(lowBump, masterCompressor);\n\t\t */\n\t    Tone.Master.prototype.chain = function () {\n\t        this.input.disconnect();\n\t        this.input.chain.apply(this.input, arguments);\n\t        arguments[arguments.length - 1].connect(this.output);\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.Master}  this\n\t\t */\n\t    Tone.Master.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable('volume');\n\t        this._volume.dispose();\n\t        this._volume = null;\n\t        this.volume = null;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tAUGMENT TONE's PROTOTYPE\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Connect 'this' to the master output. Shorthand for this.connect(Tone.Master)\n\t\t *  @returns {Tone.AudioNode} this\n\t\t *  @example\n\t\t * //connect an oscillator to the master output\n\t\t * var osc = new Tone.Oscillator().toMaster();\n\t\t */\n\t    Tone.AudioNode.prototype.toMaster = function () {\n\t        this.connect(Tone.Master);\n\t        return this;\n\t    };\n\t    if (window.AudioNode) {\n\t        // Also augment AudioNode's prototype to include toMaster as a convenience\n\t        AudioNode.prototype.toMaster = function () {\n\t            this.connect(Tone.Master);\n\t            return this;\n\t        };\n\t    }\n\t    /**\n\t\t *  initialize the module and listen for new audio contexts\n\t\t */\n\t    var MasterConstructor = Tone.Master;\n\t    Tone.Master = new MasterConstructor();\n\t    Tone.Context.on('init', function (context) {\n\t        // if it already exists, just restore it\n\t        if (context.Master instanceof MasterConstructor) {\n\t            Tone.Master = context.Master;\n\t        } else {\n\t            Tone.Master = new MasterConstructor();\n\t        }\n\t        context.Master = Tone.Master;\n\t    });\n\t    Tone.Context.on('close', function (context) {\n\t        if (context.Master instanceof MasterConstructor) {\n\t            context.Master.dispose();\n\t        }\n\t    });\n\t    return Tone.Master;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Base class for sources. Sources have start/stop methods\n\t\t *          and the ability to be synced to the\n\t\t *          start/stop of Tone.Transport.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @example\n\t\t * //Multiple state change events can be chained together,\n\t\t * //but must be set in the correct order and with ascending times\n\t\t *\n\t\t * // OK\n\t\t * state.start().stop(\"+0.2\");\n\t\t * // AND\n\t\t * state.start().stop(\"+0.2\").start(\"+0.4\").stop(\"+0.7\")\n\t\t *\n\t\t * // BAD\n\t\t * state.stop(\"+0.2\").start();\n\t\t * // OR\n\t\t * state.start(\"+0.3\").stop(\"+0.2\");\n\t\t *\n\t\t */\n\t    Tone.Source = function (options) {\n\t        options = Tone.defaultArg(options, Tone.Source.defaults);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The output volume node\n\t\t\t *  @type  {Tone.Volume}\n\t\t\t *  @private\n\t\t\t */\n\t        this._volume = this.output = new Tone.Volume(options.volume);\n\t        /**\n\t\t\t * The volume of the output in decibels.\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * source.volume.value = -6;\n\t\t\t */\n\t        this.volume = this._volume.volume;\n\t        this._readOnly('volume');\n\t        /**\n\t\t\t * \tKeep track of the scheduled state.\n\t\t\t *  @type {Tone.TimelineState}\n\t\t\t *  @private\n\t\t\t */\n\t        this._state = new Tone.TimelineState(Tone.State.Stopped);\n\t        this._state.memory = 100;\n\t        /**\n\t\t\t *  The synced `start` callback function from the transport\n\t\t\t *  @type {Function}\n\t\t\t *  @private\n\t\t\t */\n\t        this._synced = false;\n\t        /**\n\t\t\t *  Keep track of all of the scheduled event ids\n\t\t\t *  @type  {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._scheduled = [];\n\t        //make the output explicitly stereo\n\t        this._volume.output.output.channelCount = 2;\n\t        this._volume.output.output.channelCountMode = 'explicit';\n\t        //mute initially\n\t        this.mute = options.mute;\n\t    };\n\t    Tone.extend(Tone.Source, Tone.AudioNode);\n\t    /**\n\t\t *  The default parameters\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Source.defaults = {\n\t        'volume': 0,\n\t        'mute': false\n\t    };\n\t    /**\n\t\t *  Returns the playback state of the source, either \"started\" or \"stopped\".\n\t\t *  @type {Tone.State}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.Source#\n\t\t *  @name state\n\t\t */\n\t    Object.defineProperty(Tone.Source.prototype, 'state', {\n\t        get: function () {\n\t            if (this._synced) {\n\t                if (Tone.Transport.state === Tone.State.Started) {\n\t                    return this._state.getValueAtTime(Tone.Transport.seconds);\n\t                } else {\n\t                    return Tone.State.Stopped;\n\t                }\n\t            } else {\n\t                return this._state.getValueAtTime(this.now());\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.Source#\n\t\t * @type {boolean}\n\t\t * @name mute\n\t\t * @example\n\t\t * //mute the output\n\t\t * source.mute = true;\n\t\t */\n\t    Object.defineProperty(Tone.Source.prototype, 'mute', {\n\t        get: function () {\n\t            return this._volume.mute;\n\t        },\n\t        set: function (mute) {\n\t            this._volume.mute = mute;\n\t        }\n\t    });\n\t    //overwrite these functions\n\t    Tone.Source.prototype._start = Tone.noOp;\n\t    Tone.Source.prototype.restart = Tone.noOp;\n\t    Tone.Source.prototype._stop = Tone.noOp;\n\t    /**\n\t\t *  Start the source at the specified time. If no time is given,\n\t\t *  start the source now.\n\t\t *  @param  {Time} [time=now] When the source should be started.\n\t\t *  @returns {Tone.Source} this\n\t\t *  @example\n\t\t * source.start(\"+0.5\"); //starts the source 0.5 seconds from now\n\t\t */\n\t    Tone.Source.prototype.start = function (time, offset, duration) {\n\t        if (Tone.isUndef(time) && this._synced) {\n\t            time = Tone.Transport.seconds;\n\t        } else {\n\t            time = this.toSeconds(time);\n\t        }\n\t        //if it's started, stop it and restart it\n\t        if (this._state.getValueAtTime(time) === Tone.State.Started) {\n\t            this._state.cancel(time);\n\t            this._state.setStateAtTime(Tone.State.Started, time);\n\t            this.restart(time, offset, duration);\n\t        } else {\n\t            this._state.setStateAtTime(Tone.State.Started, time);\n\t            if (this._synced) {\n\t                // add the offset time to the event\n\t                var event = this._state.get(time);\n\t                event.offset = Tone.defaultArg(offset, 0);\n\t                event.duration = duration;\n\t                var sched = Tone.Transport.schedule(function (t) {\n\t                    this._start(t, offset, duration);\n\t                }.bind(this), time);\n\t                this._scheduled.push(sched);\n\t                //if it's already started\n\t                if (Tone.Transport.state === Tone.State.Started) {\n\t                    this._syncedStart(this.now(), Tone.Transport.seconds);\n\t                }\n\t            } else {\n\t                this._start.apply(this, arguments);\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Stop the source at the specified time. If no time is given,\n\t\t *  stop the source now.\n\t\t *  @param  {Time} [time=now] When the source should be stopped.\n\t\t *  @returns {Tone.Source} this\n\t\t *  @example\n\t\t * source.stop(); // stops the source immediately\n\t\t */\n\t    Tone.Source.prototype.stop = function (time) {\n\t        if (Tone.isUndef(time) && this._synced) {\n\t            time = Tone.Transport.seconds;\n\t        } else {\n\t            time = this.toSeconds(time);\n\t        }\n\t        if (!this._synced) {\n\t            this._stop.apply(this, arguments);\n\t        } else {\n\t            var sched = Tone.Transport.schedule(this._stop.bind(this), time);\n\t            this._scheduled.push(sched);\n\t        }\n\t        this._state.cancel(time);\n\t        this._state.setStateAtTime(Tone.State.Stopped, time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Sync the source to the Transport so that all subsequent\n\t\t *  calls to `start` and `stop` are synced to the TransportTime\n\t\t *  instead of the AudioContext time.\n\t\t *\n\t\t *  @returns {Tone.Source} this\n\t\t *  @example\n\t\t * //sync the source so that it plays between 0 and 0.3 on the Transport's timeline\n\t\t * source.sync().start(0).stop(0.3);\n\t\t * //start the transport.\n\t\t * Tone.Transport.start();\n\t\t *\n\t\t *  @example\n\t\t * //start the transport with an offset and the sync'ed sources\n\t\t * //will start in the correct position\n\t\t * source.sync().start(0.1);\n\t\t * //the source will be invoked with an offset of 0.4\n\t\t * Tone.Transport.start(\"+0.5\", 0.5);\n\t\t */\n\t    Tone.Source.prototype.sync = function () {\n\t        this._synced = true;\n\t        this._syncedStart = function (time, offset) {\n\t            if (offset > 0) {\n\t                // get the playback state at that time\n\t                var stateEvent = this._state.get(offset);\n\t                // listen for start events which may occur in the middle of the sync'ed time\n\t                if (stateEvent && stateEvent.state === Tone.State.Started && stateEvent.time !== offset) {\n\t                    // get the offset\n\t                    var startOffset = offset - this.toSeconds(stateEvent.time);\n\t                    var duration;\n\t                    if (stateEvent.duration) {\n\t                        duration = this.toSeconds(stateEvent.duration) - startOffset;\n\t                    }\n\t                    this._start(time, this.toSeconds(stateEvent.offset) + startOffset, duration);\n\t                }\n\t            }\n\t        }.bind(this);\n\t        this._syncedStop = function (time) {\n\t            var seconds = Tone.Transport.getSecondsAtTime(Math.max(time - this.sampleTime, 0));\n\t            if (this._state.getValueAtTime(seconds) === Tone.State.Started) {\n\t                this._stop(time);\n\t            }\n\t        }.bind(this);\n\t        Tone.Transport.on('start loopStart', this._syncedStart);\n\t        Tone.Transport.on('stop pause loopEnd', this._syncedStop);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Unsync the source to the Transport. See Tone.Source.sync\n\t\t *  @returns {Tone.Source} this\n\t\t */\n\t    Tone.Source.prototype.unsync = function () {\n\t        if (this._synced) {\n\t            Tone.Transport.off('stop pause loopEnd', this._syncedStop);\n\t            Tone.Transport.off('start loopStart', this._syncedStart);\n\t        }\n\t        this._synced = false;\n\t        // clear all of the scheduled ids\n\t        for (var i = 0; i < this._scheduled.length; i++) {\n\t            var id = this._scheduled[i];\n\t            Tone.Transport.clear(id);\n\t        }\n\t        this._scheduled = [];\n\t        this._state.cancel(0);\n\t        return this;\n\t    };\n\t    /**\n\t\t *\tClean up.\n\t\t *  @return {Tone.Source} this\n\t\t */\n\t    Tone.Source.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this.unsync();\n\t        this._scheduled = null;\n\t        this._writable('volume');\n\t        this._volume.dispose();\n\t        this._volume = null;\n\t        this.volume = null;\n\t        this._state.dispose();\n\t        this._state = null;\n\t    };\n\t    return Tone.Source;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  AudioBuffer.copyTo/FromChannel polyfill\n\t\t *  @private\n\t\t */\n\t    if (Tone.supported) {\n\t        if (!AudioBuffer.prototype.copyToChannel) {\n\t            AudioBuffer.prototype.copyToChannel = function (src, chanNum, start) {\n\t                var channel = this.getChannelData(chanNum);\n\t                start = start || 0;\n\t                for (var i = 0; i < channel.length; i++) {\n\t                    channel[i + start] = src[i];\n\t                }\n\t            };\n\t            AudioBuffer.prototype.copyFromChannel = function (dest, chanNum, start) {\n\t                var channel = this.getChannelData(chanNum);\n\t                start = start || 0;\n\t                for (var i = 0; i < dest.length; i++) {\n\t                    dest[i] = channel[i + start];\n\t                }\n\t            };\n\t        }\n\t    }\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Buffer loading and storage. Tone.Buffer is used internally by all\n\t\t *          classes that make requests for audio files such as Tone.Player,\n\t\t *          Tone.Sampler and Tone.Convolver.\n\t\t *\n\t\t *          Aside from load callbacks from individual buffers, Tone.Buffer\n\t\t *  \t\tprovides events which keep track of the loading progress\n\t\t *  \t\tof _all_ of the buffers. These are Tone.Buffer.on(\"load\" / \"progress\" / \"error\")\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone}\n\t\t *  @param {AudioBuffer|String} url The url to load, or the audio buffer to set.\n\t\t *  @param {Function=} onload A callback which is invoked after the buffer is loaded.\n\t\t *                            It's recommended to use `Tone.Buffer.on('load', callback)` instead\n\t\t *                            since it will give you a callback when _all_ buffers are loaded.\n\t\t *  @param {Function=} onerror The callback to invoke if there is an error\n\t\t *  @example\n\t\t * var buffer = new Tone.Buffer(\"path/to/sound.mp3\", function(){\n\t\t * \t//the buffer is now available.\n\t\t * \tvar buff = buffer.get();\n\t\t * });\n\t\t *  @example\n\t\t * //can load provide fallback extension types if the first type is not supported.\n\t\t * var buffer = new Tone.Buffer(\"path/to/sound.[mp3|ogg|wav]\");\n\t\t */\n\t    Tone.Buffer = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'url',\n\t            'onload',\n\t            'onerror'\n\t        ], Tone.Buffer);\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  stores the loaded AudioBuffer\n\t\t\t *  @type {AudioBuffer}\n\t\t\t *  @private\n\t\t\t */\n\t        this._buffer = null;\n\t        /**\n\t\t\t *  indicates if the buffer should be reversed or not\n\t\t\t *  @type {Boolean}\n\t\t\t *  @private\n\t\t\t */\n\t        this._reversed = options.reverse;\n\t        /**\n\t\t\t *  The XHR\n\t\t\t *  @type  {XMLHttpRequest}\n\t\t\t *  @private\n\t\t\t */\n\t        this._xhr = null;\n\t        /**\n\t\t\t * Private callback when the buffer is loaded.\n\t\t\t * @type {Function}\n\t\t\t * @private\n\t\t\t */\n\t        this._onload = Tone.noOp;\n\t        if (options.url instanceof AudioBuffer || options.url instanceof Tone.Buffer) {\n\t            this.set(options.url);\n\t            // invoke the onload callback\n\t            if (options.onload) {\n\t                if (this.loaded) {\n\t                    options.onload(this);\n\t                } else {\n\t                    this._onload = options.onload;\n\t                }\n\t            }\n\t        } else if (Tone.isString(options.url)) {\n\t            this.load(options.url).then(options.onload).catch(options.onerror);\n\t        }\n\t    };\n\t    Tone.extend(Tone.Buffer);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Buffer.defaults = {\n\t        'url': undefined,\n\t        'reverse': false,\n\t        'onload': Tone.noOp,\n\t        'onerror': Tone.noOp\n\t    };\n\t    /**\n\t\t *  Pass in an AudioBuffer or Tone.Buffer to set the value\n\t\t *  of this buffer.\n\t\t *  @param {AudioBuffer|Tone.Buffer} buffer the buffer\n\t\t *  @returns {Tone.Buffer} this\n\t\t */\n\t    Tone.Buffer.prototype.set = function (buffer) {\n\t        if (buffer instanceof Tone.Buffer) {\n\t            if (buffer.loaded) {\n\t                this._buffer = buffer.get();\n\t            } else {\n\t                buffer._onload = function () {\n\t                    this.set(buffer);\n\t                    this._onload(this);\n\t                }.bind(this);\n\t            }\n\t        } else {\n\t            this._buffer = buffer;\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  @return {AudioBuffer} The audio buffer stored in the object.\n\t\t */\n\t    Tone.Buffer.prototype.get = function () {\n\t        return this._buffer;\n\t    };\n\t    /**\n\t\t *  Makes an xhr reqest for the selected url then decodes\n\t\t *  the file as an audio buffer. Invokes\n\t\t *  the callback once the audio buffer loads.\n\t\t *  @param {String} url The url of the buffer to load.\n\t\t *                      filetype support depends on the\n\t\t *                      browser.\n\t\t *  @returns {Promise} returns a Promise which resolves with the Tone.Buffer\n\t\t */\n\t    Tone.Buffer.prototype.load = function (url, onload, onerror) {\n\t        var promise = new Promise(function (load, error) {\n\t            this._xhr = Tone.Buffer.load(url, //success\n\t            function (buff) {\n\t                this._xhr = null;\n\t                this.set(buff);\n\t                load(this);\n\t                this._onload(this);\n\t                if (onload) {\n\t                    onload(this);\n\t                }\n\t            }.bind(this), //error\n\t            function (err) {\n\t                this._xhr = null;\n\t                error(err);\n\t                if (onerror) {\n\t                    onerror(err);\n\t                }\n\t            }.bind(this));\n\t        }.bind(this));\n\t        return promise;\n\t    };\n\t    /**\n\t\t *  dispose and disconnect\n\t\t *  @returns {Tone.Buffer} this\n\t\t */\n\t    Tone.Buffer.prototype.dispose = function () {\n\t        Tone.prototype.dispose.call(this);\n\t        this._buffer = null;\n\t        if (this._xhr) {\n\t            Tone.Buffer._removeFromDownloadQueue(this._xhr);\n\t            this._xhr.abort();\n\t            this._xhr = null;\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * If the buffer is loaded or not\n\t\t * @memberOf Tone.Buffer#\n\t\t * @type {Boolean}\n\t\t * @name loaded\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Buffer.prototype, 'loaded', {\n\t        get: function () {\n\t            return this.length > 0;\n\t        }\n\t    });\n\t    /**\n\t\t * The duration of the buffer.\n\t\t * @memberOf Tone.Buffer#\n\t\t * @type {Number}\n\t\t * @name duration\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Buffer.prototype, 'duration', {\n\t        get: function () {\n\t            if (this._buffer) {\n\t                return this._buffer.duration;\n\t            } else {\n\t                return 0;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The length of the buffer in samples\n\t\t * @memberOf Tone.Buffer#\n\t\t * @type {Number}\n\t\t * @name length\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Buffer.prototype, 'length', {\n\t        get: function () {\n\t            if (this._buffer) {\n\t                return this._buffer.length;\n\t            } else {\n\t                return 0;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The number of discrete audio channels. Returns 0 if no buffer\n\t\t * is loaded.\n\t\t * @memberOf Tone.Buffer#\n\t\t * @type {Number}\n\t\t * @name numberOfChannels\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Buffer.prototype, 'numberOfChannels', {\n\t        get: function () {\n\t            if (this._buffer) {\n\t                return this._buffer.numberOfChannels;\n\t            } else {\n\t                return 0;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Set the audio buffer from the array. To create a multichannel AudioBuffer,\n\t\t *  pass in a multidimensional array.\n\t\t *  @param {Float32Array} array The array to fill the audio buffer\n\t\t *  @return {Tone.Buffer} this\n\t\t */\n\t    Tone.Buffer.prototype.fromArray = function (array) {\n\t        var isMultidimensional = array[0].length > 0;\n\t        var channels = isMultidimensional ? array.length : 1;\n\t        var len = isMultidimensional ? array[0].length : array.length;\n\t        var buffer = this.context.createBuffer(channels, len, this.context.sampleRate);\n\t        if (!isMultidimensional && channels === 1) {\n\t            array = [array];\n\t        }\n\t        for (var c = 0; c < channels; c++) {\n\t            buffer.copyToChannel(array[c], c);\n\t        }\n\t        this._buffer = buffer;\n\t        return this;\n\t    };\n\t    /**\n\t\t * \tSums muliple channels into 1 channel\n\t\t *  @param {Number=} channel Optionally only copy a single channel from the array.\n\t\t *  @return {Array}\n\t\t */\n\t    Tone.Buffer.prototype.toMono = function (chanNum) {\n\t        if (Tone.isNumber(chanNum)) {\n\t            this.fromArray(this.toArray(chanNum));\n\t        } else {\n\t            var outputArray = new Float32Array(this.length);\n\t            var numChannels = this.numberOfChannels;\n\t            for (var channel = 0; channel < numChannels; channel++) {\n\t                var channelArray = this.toArray(channel);\n\t                for (var i = 0; i < channelArray.length; i++) {\n\t                    outputArray[i] += channelArray[i];\n\t                }\n\t            }\n\t            //divide by the number of channels\n\t            outputArray = outputArray.map(function (sample) {\n\t                return sample / numChannels;\n\t            });\n\t            this.fromArray(outputArray);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * \tGet the buffer as an array. Single channel buffers will return a 1-dimensional\n\t\t * \tFloat32Array, and multichannel buffers will return multidimensional arrays.\n\t\t *  @param {Number=} channel Optionally only copy a single channel from the array.\n\t\t *  @return {Array}\n\t\t */\n\t    Tone.Buffer.prototype.toArray = function (channel) {\n\t        if (Tone.isNumber(channel)) {\n\t            return this.getChannelData(channel);\n\t        } else if (this.numberOfChannels === 1) {\n\t            return this.toArray(0);\n\t        } else {\n\t            var ret = [];\n\t            for (var c = 0; c < this.numberOfChannels; c++) {\n\t                ret[c] = this.getChannelData(c);\n\t            }\n\t            return ret;\n\t        }\n\t    };\n\t    /**\n\t\t *  Returns the Float32Array representing the PCM audio data for the specific channel.\n\t\t *  @param  {Number}  channel  The channel number to return\n\t\t *  @return  {Float32Array}  The audio as a TypedArray\n\t\t */\n\t    Tone.Buffer.prototype.getChannelData = function (channel) {\n\t        return this._buffer.getChannelData(channel);\n\t    };\n\t    /**\n\t\t *  Cut a subsection of the array and return a buffer of the\n\t\t *  subsection. Does not modify the original buffer\n\t\t *  @param {Time} start The time to start the slice\n\t\t *  @param {Time=} end The end time to slice. If none is given\n\t\t *                     will default to the end of the buffer\n\t\t *  @return {Tone.Buffer} this\n\t\t */\n\t    Tone.Buffer.prototype.slice = function (start, end) {\n\t        end = Tone.defaultArg(end, this.duration);\n\t        var startSamples = Math.floor(this.context.sampleRate * this.toSeconds(start));\n\t        var endSamples = Math.floor(this.context.sampleRate * this.toSeconds(end));\n\t        var replacement = [];\n\t        for (var i = 0; i < this.numberOfChannels; i++) {\n\t            replacement[i] = this.toArray(i).slice(startSamples, endSamples);\n\t        }\n\t        var retBuffer = new Tone.Buffer().fromArray(replacement);\n\t        return retBuffer;\n\t    };\n\t    /**\n\t\t *  Reverse the buffer.\n\t\t *  @private\n\t\t *  @return {Tone.Buffer} this\n\t\t */\n\t    Tone.Buffer.prototype._reverse = function () {\n\t        if (this.loaded) {\n\t            for (var i = 0; i < this.numberOfChannels; i++) {\n\t                Array.prototype.reverse.call(this.getChannelData(i));\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * Reverse the buffer.\n\t\t * @memberOf Tone.Buffer#\n\t\t * @type {Boolean}\n\t\t * @name reverse\n\t\t */\n\t    Object.defineProperty(Tone.Buffer.prototype, 'reverse', {\n\t        get: function () {\n\t            return this._reversed;\n\t        },\n\t        set: function (rev) {\n\t            if (this._reversed !== rev) {\n\t                this._reversed = rev;\n\t                this._reverse();\n\t            }\n\t        }\n\t    });\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    // STATIC METHODS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //statically inherits Emitter methods\n\t    Tone.Emitter.mixin(Tone.Buffer);\n\t    /**\n\t\t *  the static queue for all of the xhr requests\n\t\t *  @type {Array}\n\t\t *  @private\n\t\t */\n\t    Tone.Buffer._downloadQueue = [];\n\t    /**\n\t\t *  A path which is prefixed before every url.\n\t\t *  @type  {String}\n\t\t *  @static\n\t\t */\n\t    Tone.Buffer.baseUrl = '';\n\t    /**\n\t\t *  Create a Tone.Buffer from the array. To create a multichannel AudioBuffer,\n\t\t *  pass in a multidimensional array.\n\t\t *  @param {Float32Array} array The array to fill the audio buffer\n\t\t *  @return {Tone.Buffer} A Tone.Buffer created from the array\n\t\t */\n\t    Tone.Buffer.fromArray = function (array) {\n\t        return new Tone.Buffer().fromArray(array);\n\t    };\n\t    /**\n\t\t * Creates a Tone.Buffer from a URL, returns a promise\n\t\t * which resolves to a Tone.Buffer\n\t\t * @param  {String} url The url to load.\n\t\t * @return {Promise<Tone.Buffer>}     A promise which resolves to a Tone.Buffer\n\t\t */\n\t    Tone.Buffer.fromUrl = function (url) {\n\t        var buffer = new Tone.Buffer();\n\t        return buffer.load(url).then(function () {\n\t            return buffer;\n\t        });\n\t    };\n\t    /**\n\t\t * Remove an xhr request from the download queue\n\t\t * @private\n\t\t */\n\t    Tone.Buffer._removeFromDownloadQueue = function (request) {\n\t        var index = Tone.Buffer._downloadQueue.indexOf(request);\n\t        if (index !== -1) {\n\t            Tone.Buffer._downloadQueue.splice(index, 1);\n\t        }\n\t    };\n\t    /**\n\t\t *  Loads a url using XMLHttpRequest.\n\t\t *  @param {String} url\n\t\t *  @param {Function} onload\n\t\t *  @param {Function} onerror\n\t\t *  @param {Function} onprogress\n\t\t *  @return {XMLHttpRequest}\n\t\t */\n\t    Tone.Buffer.load = function (url, onload, onerror) {\n\t        //default\n\t        onload = Tone.defaultArg(onload, Tone.noOp);\n\t        // test if the url contains multiple extensions\n\t        var matches = url.match(/\\[(.+\\|?)+\\]$/);\n\t        if (matches) {\n\t            var extensions = matches[1].split('|');\n\t            var extension = extensions[0];\n\t            for (var i = 0; i < extensions.length; i++) {\n\t                if (Tone.Buffer.supportsType(extensions[i])) {\n\t                    extension = extensions[i];\n\t                    break;\n\t                }\n\t            }\n\t            url = url.replace(matches[0], extension);\n\t        }\n\t        function onError(e) {\n\t            Tone.Buffer._removeFromDownloadQueue(request);\n\t            Tone.Buffer.emit('error', e);\n\t            if (onerror) {\n\t                onerror(e);\n\t            } else {\n\t                throw e;\n\t            }\n\t        }\n\t        function onProgress() {\n\t            //calculate the progress\n\t            var totalProgress = 0;\n\t            for (var i = 0; i < Tone.Buffer._downloadQueue.length; i++) {\n\t                totalProgress += Tone.Buffer._downloadQueue[i].progress;\n\t            }\n\t            Tone.Buffer.emit('progress', totalProgress / Tone.Buffer._downloadQueue.length);\n\t        }\n\t        var request = new XMLHttpRequest();\n\t        request.open('GET', Tone.Buffer.baseUrl + url, true);\n\t        request.responseType = 'arraybuffer';\n\t        //start out as 0\n\t        request.progress = 0;\n\t        Tone.Buffer._downloadQueue.push(request);\n\t        request.addEventListener('load', function () {\n\t            if (request.status === 200) {\n\t                Tone.context.decodeAudioData(request.response).then(function (buff) {\n\t                    request.progress = 1;\n\t                    onProgress();\n\t                    onload(buff);\n\t                    Tone.Buffer._removeFromDownloadQueue(request);\n\t                    if (Tone.Buffer._downloadQueue.length === 0) {\n\t                        //emit the event at the end\n\t                        Tone.Buffer.emit('load');\n\t                    }\n\t                }).catch(function () {\n\t                    Tone.Buffer._removeFromDownloadQueue(request);\n\t                    onError('Tone.Buffer: could not decode audio data: ' + url);\n\t                });\n\t            } else {\n\t                onError('Tone.Buffer: could not locate file: ' + url);\n\t            }\n\t        });\n\t        request.addEventListener('error', onError);\n\t        request.addEventListener('progress', function (event) {\n\t            if (event.lengthComputable) {\n\t                //only go to 95%, the last 5% is when the audio is decoded\n\t                request.progress = event.loaded / event.total * 0.95;\n\t                onProgress();\n\t            }\n\t        });\n\t        request.send();\n\t        return request;\n\t    };\n\t    /**\n\t\t *  Stop all of the downloads in progress\n\t\t *  @return {Tone.Buffer}\n\t\t *  @static\n\t\t */\n\t    Tone.Buffer.cancelDownloads = function () {\n\t        Tone.Buffer._downloadQueue.slice().forEach(function (request) {\n\t            Tone.Buffer._removeFromDownloadQueue(request);\n\t            request.abort();\n\t        });\n\t        return Tone.Buffer;\n\t    };\n\t    /**\n\t\t *  Checks a url's extension to see if the current browser can play that file type.\n\t\t *  @param {String} url The url/extension to test\n\t\t *  @return {Boolean} If the file extension can be played\n\t\t *  @static\n\t\t *  @example\n\t\t * Tone.Buffer.supportsType(\"wav\"); //returns true\n\t\t * Tone.Buffer.supportsType(\"path/to/file.wav\"); //returns true\n\t\t */\n\t    Tone.Buffer.supportsType = function (url) {\n\t        var extension = url.split('.');\n\t        extension = extension[extension.length - 1];\n\t        var response = document.createElement('audio').canPlayType('audio/' + extension);\n\t        return response !== '';\n\t    };\n\t    /**\n\t\t *  Returns a Promise which resolves when all of the buffers have loaded\n\t\t *  @return {Promise}\n\t\t */\n\t    Tone.loaded = function () {\n\t        var onload, onerror;\n\t        function removeEvents() {\n\t            //remove the events when it's resolved\n\t            Tone.Buffer.off('load', onload);\n\t            Tone.Buffer.off('error', onerror);\n\t        }\n\t        return new Promise(function (success, fail) {\n\t            onload = function () {\n\t                success();\n\t            };\n\t            onerror = function () {\n\t                fail();\n\t            };\n\t            //add the event listeners\n\t            Tone.Buffer.on('load', onload);\n\t            Tone.Buffer.on('error', onerror);\n\t        }).then(removeEvents).catch(function (e) {\n\t            removeEvents();\n\t            throw new Error(e);\n\t        });\n\t    };\n\t    return Tone.Buffer;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Wrapper around the native fire-and-forget OscillatorNode. Adds the\n\t\t *     ability to reschedule the stop method.\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param  {AudioBuffer|Tone.Buffer}  buffer   The buffer to play\n\t\t *  @param  {Function}  onload  The callback to invoke when the\n\t\t *                               buffer is done playing.\n\t\t */\n\t    Tone.OscillatorNode = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'type'\n\t        ], Tone.OscillatorNode);\n\t        Tone.AudioNode.call(this, options);\n\t        /**\n\t\t\t *  The callback to invoke after the\n\t\t\t *  buffer source is done playing.\n\t\t\t *  @type  {Function}\n\t\t\t */\n\t        this.onended = options.onended;\n\t        /**\n\t\t\t *  The oscillator start time\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._startTime = -1;\n\t        /**\n\t\t\t *  The oscillator stop time\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._stopTime = -1;\n\t        /**\n\t\t\t *  The gain node which envelopes the OscillatorNode\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._gainNode = this.output = new Tone.Gain();\n\t        this._gainNode.gain.setValueAtTime(0, this.context.currentTime);\n\t        /**\n\t\t\t *  The oscillator\n\t\t\t *  @type  {OscillatorNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._oscillator = this.context.createOscillator();\n\t        this._oscillator.connect(this._gainNode);\n\t        this.type = options.type;\n\t        /**\n\t\t\t *  The frequency of the oscillator\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Param(this._oscillator.frequency, Tone.Type.Frequency);\n\t        this.frequency.value = options.frequency;\n\t        /**\n\t\t\t *  The detune of the oscillator\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = new Tone.Param(this._oscillator.detune, Tone.Type.Cents);\n\t        this.detune.value = options.detune;\n\t        /**\n\t\t\t *  The value that the buffer ramps to\n\t\t\t *  @type {Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._gain = 1;\n\t    };\n\t    Tone.extend(Tone.OscillatorNode, Tone.AudioNode);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.OscillatorNode.defaults = {\n\t        'frequency': 440,\n\t        'detune': 0,\n\t        'type': 'sine',\n\t        'onended': Tone.noOp\n\t    };\n\t    /**\n\t\t *  Returns the playback state of the oscillator, either \"started\" or \"stopped\".\n\t\t *  @type {Tone.State}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.OscillatorNode#\n\t\t *  @name state\n\t\t */\n\t    Object.defineProperty(Tone.OscillatorNode.prototype, 'state', {\n\t        get: function () {\n\t            return this.getStateAtTime(this.now());\n\t        }\n\t    });\n\t    /**\n\t\t *  Get the playback state at the given time\n\t\t *  @param  {Time}  time  The time to test the state at\n\t\t *  @return  {Tone.State}  The playback state. \n\t\t */\n\t    Tone.OscillatorNode.prototype.getStateAtTime = function (time) {\n\t        time = this.toSeconds(time);\n\t        if (this._startTime !== -1 && time >= this._startTime && (this._stopTime === -1 || time <= this._stopTime)) {\n\t            return Tone.State.Started;\n\t        } else {\n\t            return Tone.State.Stopped;\n\t        }\n\t    };\n\t    /**\n\t     * Start the oscillator node at the given time\n\t     * @param  {Time=} time When to start the oscillator\n\t     * @return {OscillatorNode}      this\n\t     */\n\t    Tone.OscillatorNode.prototype.start = function (time) {\n\t        if (this._startTime === -1) {\n\t            this._startTime = this.toSeconds(time);\n\t            this._oscillator.start(this._startTime);\n\t            var now = this.context.currentTime;\n\t            this._gainNode.gain.cancelScheduledValues(now);\n\t            this._gainNode.gain.setValueAtTime(0, now);\n\t            this._gainNode.gain.setValueAtTime(1, this._startTime);\n\t        } else {\n\t            throw new Error('cannot call OscillatorNode.start more than once');\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t     * Sets an arbitrary custom periodic waveform given a PeriodicWave.\n\t     * @param  {PeriodicWave} periodicWave PeriodicWave should be created with context.createPeriodicWave\n\t     * @return {OscillatorNode} this\n\t     */\n\t    Tone.OscillatorNode.prototype.setPeriodicWave = function (periodicWave) {\n\t        this._oscillator.setPeriodicWave(periodicWave);\n\t        return this;\n\t    };\n\t    /**\n\t     * Stop the oscillator node at the given time\n\t     * @param  {Time=} time When to stop the oscillator\n\t     * @return {OscillatorNode}      this\n\t     */\n\t    Tone.OscillatorNode.prototype.stop = function (time) {\n\t        //cancel the previous stop\n\t        this.cancelStop();\n\t        //reschedule it\n\t        this._stopTime = this.toSeconds(time);\n\t        this._gainNode.gain.setValueAtTime(0, this._stopTime);\n\t        this.context.clearTimeout(this._timeout);\n\t        this._timeout = this.context.setTimeout(function () {\n\t            this._oscillator.stop(this.now());\n\t            this.onended();\n\t        }.bind(this), this._stopTime - this.now());\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancel a scheduled stop event\n\t\t *  @return  {Tone.OscillatorNode}  this\n\t\t */\n\t    Tone.OscillatorNode.prototype.cancelStop = function () {\n\t        if (this._startTime !== -1) {\n\t            //cancel the stop envelope\n\t            this._gainNode.gain.cancelScheduledValues(this._startTime + this.sampleTime);\n\t            this._gainNode.gain.setValueAtTime(1, Math.max(this.now(), this._startTime));\n\t            this.context.clearTimeout(this._timeout);\n\t            this._stopTime = -1;\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * The oscillator type. Either 'sine', 'sawtooth', 'square', or 'triangle'\n\t\t * @memberOf Tone.OscillatorNode#\n\t\t * @type {Time}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.OscillatorNode.prototype, 'type', {\n\t        get: function () {\n\t            return this._oscillator.type;\n\t        },\n\t        set: function (type) {\n\t            this._oscillator.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.OscillatorNode}  this\n\t\t */\n\t    Tone.OscillatorNode.prototype.dispose = function () {\n\t        this.context.clearTimeout(this._timeout);\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this.onended = null;\n\t        this._oscillator.disconnect();\n\t        this._oscillator = null;\n\t        this._gainNode.dispose();\n\t        this._gainNode = null;\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        this.detune.dispose();\n\t        this.detune = null;\n\t        return this;\n\t    };\n\t    return Tone.OscillatorNode;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Oscillator supports a number of features including\n\t\t *         phase rotation, multiple oscillator types (see Tone.Oscillator.type),\n\t\t *         and Transport syncing (see Tone.Oscillator.syncFrequency).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Source}\n\t\t *  @param {Frequency} [frequency] Starting frequency\n\t\t *  @param {string} [type] The oscillator type. Read more about type below.\n\t\t *  @example\n\t\t * //make and start a 440hz sine tone\n\t\t * var osc = new Tone.Oscillator(440, \"sine\").toMaster().start();\n\t\t */\n\t    Tone.Oscillator = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'type'\n\t        ], Tone.Oscillator);\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  the main oscillator\n\t\t\t *  @type {OscillatorNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._oscillator = null;\n\t        /**\n\t\t\t *  The frequency control.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The detune control signal.\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t        /**\n\t\t\t *  the periodic wave\n\t\t\t *  @type {PeriodicWave}\n\t\t\t *  @private\n\t\t\t */\n\t        this._wave = null;\n\t        /**\n\t\t\t *  The partials of the oscillator\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._partials = Tone.defaultArg(options.partials, [1]);\n\t        /**\n\t\t\t *  the phase of the oscillator\n\t\t\t *  between 0 - 360\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._phase = options.phase;\n\t        /**\n\t\t\t *  the type of the oscillator\n\t\t\t *  @type {string}\n\t\t\t *  @private\n\t\t\t */\n\t        this._type = null;\n\t        //setup\n\t        this.type = options.type;\n\t        this.phase = this._phase;\n\t        this._readOnly([\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.Oscillator, Tone.Source);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Oscillator.defaults = {\n\t        'type': 'sine',\n\t        'frequency': 440,\n\t        'detune': 0,\n\t        'phase': 0,\n\t        'partials': []\n\t    };\n\t    /**\n\t\t *  The Oscillator types\n\t\t *  @enum {String}\n\t\t */\n\t    Tone.Oscillator.Type = {\n\t        Sine: 'sine',\n\t        Triangle: 'triangle',\n\t        Sawtooth: 'sawtooth',\n\t        Square: 'square',\n\t        Custom: 'custom'\n\t    };\n\t    /**\n\t\t *  start the oscillator\n\t\t *  @param  {Time} [time=now]\n\t\t *  @private\n\t\t */\n\t    Tone.Oscillator.prototype._start = function (time) {\n\t        //new oscillator with previous values\n\t        this._oscillator = new Tone.OscillatorNode();\n\t        if (this._wave) {\n\t            this._oscillator.setPeriodicWave(this._wave);\n\t        } else {\n\t            this._oscillator.type = this._type;\n\t        }\n\t        //connect the control signal to the oscillator frequency & detune\n\t        this._oscillator.connect(this.output);\n\t        this.frequency.connect(this._oscillator.frequency);\n\t        this.detune.connect(this._oscillator.detune);\n\t        //start the oscillator\n\t        time = this.toSeconds(time);\n\t        this._oscillator.start(time);\n\t    };\n\t    /**\n\t\t *  stop the oscillator\n\t\t *  @private\n\t\t *  @param  {Time} [time=now] (optional) timing parameter\n\t\t *  @returns {Tone.Oscillator} this\n\t\t */\n\t    Tone.Oscillator.prototype._stop = function (time) {\n\t        if (this._oscillator) {\n\t            time = this.toSeconds(time);\n\t            this._oscillator.stop(time);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * Restart the oscillator. Does not stop the oscillator, but instead\n\t\t * just cancels any scheduled 'stop' from being invoked.\n\t\t * @param  {Time=} time\n\t\t * @return {Tone.Oscillator}      this\n\t\t */\n\t    Tone.Oscillator.prototype.restart = function (time) {\n\t        this._oscillator.cancelStop();\n\t        this._state.cancel(this.toSeconds(time));\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Sync the signal to the Transport's bpm. Any changes to the transports bpm,\n\t\t *  will also affect the oscillators frequency.\n\t\t *  @returns {Tone.Oscillator} this\n\t\t *  @example\n\t\t * Tone.Transport.bpm.value = 120;\n\t\t * osc.frequency.value = 440;\n\t\t * //the ration between the bpm and the frequency will be maintained\n\t\t * osc.syncFrequency();\n\t\t * Tone.Transport.bpm.value = 240;\n\t\t * // the frequency of the oscillator is doubled to 880\n\t\t */\n\t    Tone.Oscillator.prototype.syncFrequency = function () {\n\t        Tone.Transport.syncSignal(this.frequency);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Unsync the oscillator's frequency from the Transport.\n\t\t *  See Tone.Oscillator.syncFrequency\n\t\t *  @returns {Tone.Oscillator} this\n\t\t */\n\t    Tone.Oscillator.prototype.unsyncFrequency = function () {\n\t        Tone.Transport.unsyncSignal(this.frequency);\n\t        return this;\n\t    };\n\t    /**\n\t\t * The type of the oscillator: either sine, square, triangle, or sawtooth. Also capable of\n\t\t * setting the first x number of partials of the oscillator. For example: \"sine4\" would\n\t\t * set be the first 4 partials of the sine wave and \"triangle8\" would set the first\n\t\t * 8 partials of the triangle wave.\n\t\t * <br><br>\n\t\t * Uses PeriodicWave internally even for native types so that it can set the phase.\n\t\t * PeriodicWave equations are from the\n\t\t * [Webkit Web Audio implementation](https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/modules/webaudio/PeriodicWave.cpp&sq=package:chromium).\n\t\t *\n\t\t * @memberOf Tone.Oscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t * @example\n\t\t * //set it to a square wave\n\t\t * osc.type = \"square\";\n\t\t * @example\n\t\t * //set the first 6 partials of a sawtooth wave\n\t\t * osc.type = \"sawtooth6\";\n\t\t */\n\t    Object.defineProperty(Tone.Oscillator.prototype, 'type', {\n\t        get: function () {\n\t            return this._type;\n\t        },\n\t        set: function (type) {\n\t            var isBasicType = [\n\t                Tone.Oscillator.Type.Sine,\n\t                Tone.Oscillator.Type.Square,\n\t                Tone.Oscillator.Type.Triangle,\n\t                Tone.Oscillator.Type.Sawtooth\n\t            ].includes(type);\n\t            if (this._phase === 0 && isBasicType) {\n\t                this._wave = null;\n\t                //just go with the basic approach\n\t                if (this._oscillator !== null) {\n\t                    this._oscillator.type === type;\n\t                }\n\t            } else {\n\t                var coefs = this._getRealImaginary(type, this._phase);\n\t                var periodicWave = this.context.createPeriodicWave(coefs[0], coefs[1]);\n\t                this._wave = periodicWave;\n\t                if (this._oscillator !== null) {\n\t                    this._oscillator.setPeriodicWave(this._wave);\n\t                }\n\t            }\n\t            this._type = type;\n\t        }\n\t    });\n\t    /**\n\t\t *  Returns the real and imaginary components based\n\t\t *  on the oscillator type.\n\t\t *  @returns {Array} [real, imaginary]\n\t\t *  @private\n\t\t */\n\t    Tone.Oscillator.prototype._getRealImaginary = function (type, phase) {\n\t        var fftSize = 4096;\n\t        var periodicWaveSize = fftSize / 2;\n\t        var real = new Float32Array(periodicWaveSize);\n\t        var imag = new Float32Array(periodicWaveSize);\n\t        var partialCount = 1;\n\t        if (type === Tone.Oscillator.Type.Custom) {\n\t            partialCount = this._partials.length + 1;\n\t            periodicWaveSize = partialCount;\n\t        } else {\n\t            var partial = /^(sine|triangle|square|sawtooth)(\\d+)$/.exec(type);\n\t            if (partial) {\n\t                partialCount = parseInt(partial[2]) + 1;\n\t                type = partial[1];\n\t                partialCount = Math.max(partialCount, 2);\n\t                periodicWaveSize = partialCount;\n\t            }\n\t        }\n\t        for (var n = 1; n < periodicWaveSize; ++n) {\n\t            var piFactor = 2 / (n * Math.PI);\n\t            var b;\n\t            switch (type) {\n\t            case Tone.Oscillator.Type.Sine:\n\t                b = n <= partialCount ? 1 : 0;\n\t                break;\n\t            case Tone.Oscillator.Type.Square:\n\t                b = n & 1 ? 2 * piFactor : 0;\n\t                break;\n\t            case Tone.Oscillator.Type.Sawtooth:\n\t                b = piFactor * (n & 1 ? 1 : -1);\n\t                break;\n\t            case Tone.Oscillator.Type.Triangle:\n\t                if (n & 1) {\n\t                    b = 2 * (piFactor * piFactor) * (n - 1 >> 1 & 1 ? -1 : 1);\n\t                } else {\n\t                    b = 0;\n\t                }\n\t                break;\n\t            case Tone.Oscillator.Type.Custom:\n\t                b = this._partials[n - 1];\n\t                break;\n\t            default:\n\t                throw new TypeError('Tone.Oscillator: invalid type: ' + type);\n\t            }\n\t            if (b !== 0) {\n\t                real[n] = -b * Math.sin(phase * n);\n\t                imag[n] = b * Math.cos(phase * n);\n\t            } else {\n\t                real[n] = 0;\n\t                imag[n] = 0;\n\t            }\n\t        }\n\t        return [\n\t            real,\n\t            imag\n\t        ];\n\t    };\n\t    /**\n\t\t *  Compute the inverse FFT for a given phase.\n\t\t *  @param  {Float32Array}  real\n\t\t *  @param  {Float32Array}  imag\n\t\t *  @param  {NormalRange}  phase\n\t\t *  @return  {AudioRange}\n\t\t *  @private\n\t\t */\n\t    Tone.Oscillator.prototype._inverseFFT = function (real, imag, phase) {\n\t        var sum = 0;\n\t        var len = real.length;\n\t        for (var i = 0; i < len; i++) {\n\t            sum += real[i] * Math.cos(i * phase) + imag[i] * Math.sin(i * phase);\n\t        }\n\t        return sum;\n\t    };\n\t    /**\n\t\t *  Returns the initial value of the oscillator.\n\t\t *  @return  {AudioRange}\n\t\t *  @private\n\t\t */\n\t    Tone.Oscillator.prototype._getInitialValue = function () {\n\t        var coefs = this._getRealImaginary(this._type, 0);\n\t        var real = coefs[0];\n\t        var imag = coefs[1];\n\t        var maxValue = 0;\n\t        var twoPi = Math.PI * 2;\n\t        //check for peaks in 8 places\n\t        for (var i = 0; i < 8; i++) {\n\t            maxValue = Math.max(this._inverseFFT(real, imag, i / 8 * twoPi), maxValue);\n\t        }\n\t        return -this._inverseFFT(real, imag, this._phase) / maxValue;\n\t    };\n\t    /**\n\t\t * The partials of the waveform. A partial represents\n\t\t * the amplitude at a harmonic. The first harmonic is the\n\t\t * fundamental frequency, the second is the octave and so on\n\t\t * following the harmonic series.\n\t\t * Setting this value will automatically set the type to \"custom\".\n\t\t * The value is an empty array when the type is not \"custom\".\n\t\t * @memberOf Tone.Oscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @example\n\t\t * osc.partials = [1, 0.2, 0.01];\n\t\t */\n\t    Object.defineProperty(Tone.Oscillator.prototype, 'partials', {\n\t        get: function () {\n\t            if (this._type !== Tone.Oscillator.Type.Custom) {\n\t                return [];\n\t            } else {\n\t                return this._partials;\n\t            }\n\t        },\n\t        set: function (partials) {\n\t            this._partials = partials;\n\t            this.type = Tone.Oscillator.Type.Custom;\n\t        }\n\t    });\n\t    /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.Oscillator#\n\t\t * @type {Degrees}\n\t\t * @name phase\n\t\t * @example\n\t\t * osc.phase = 180; //flips the phase of the oscillator\n\t\t */\n\t    Object.defineProperty(Tone.Oscillator.prototype, 'phase', {\n\t        get: function () {\n\t            return this._phase * (180 / Math.PI);\n\t        },\n\t        set: function (phase) {\n\t            this._phase = phase * Math.PI / 180;\n\t            //reset the type\n\t            this.type = this._type;\n\t        }\n\t    });\n\t    /**\n\t\t *  Dispose and disconnect.\n\t\t *  @return {Tone.Oscillator} this\n\t\t */\n\t    Tone.Oscillator.prototype.dispose = function () {\n\t        Tone.Source.prototype.dispose.call(this);\n\t        if (this._oscillator !== null) {\n\t            this._oscillator.dispose();\n\t            this._oscillator = null;\n\t        }\n\t        this._wave = null;\n\t        this._writable([\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        this.detune.dispose();\n\t        this.detune = null;\n\t        this._partials = null;\n\t        return this;\n\t    };\n\t    return Tone.Oscillator;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class AudioToGain converts an input in AudioRange [-1,1] to NormalRange [0,1]. \n\t\t *         See Tone.GainToAudio.\n\t\t *\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @constructor\n\t\t *  @example\n\t\t *  var a2g = new Tone.AudioToGain();\n\t\t */\n\t    Tone.AudioToGain = function () {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  @type {WaveShaperNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._norm = this.input = this.output = new Tone.WaveShaper(function (x) {\n\t            return (x + 1) / 2;\n\t        });\n\t    };\n\t    Tone.extend(Tone.AudioToGain, Tone.SignalBase);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.AudioToGain} this\n\t\t */\n\t    Tone.AudioToGain.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._norm.dispose();\n\t        this._norm = null;\n\t        return this;\n\t    };\n\t    return Tone.AudioToGain;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.Zero outputs 0's at audio-rate. The reason this has to be\n\t\t *         it's own class is that many browsers optimize out Tone.Signal\n\t\t *         with a value of 0 and will not process nodes further down the graph.\n\t\t *  @extends {Tone.SignalBase}\n\t\t */\n\t    Tone.Zero = function () {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  The gain node\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._gain = this.input = this.output = new Tone.Gain();\n\t        this.context.getConstant(0).connect(this._gain);\n\t    };\n\t    Tone.extend(Tone.Zero, Tone.SignalBase);\n\t    /**\n\t\t *  clean up\n\t\t *  @return  {Tone.Zero}  this\n\t\t */\n\t    Tone.Zero.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._gain.dispose();\n\t        this._gain = null;\n\t        return this;\n\t    };\n\t    return Tone.Zero;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  LFO stands for low frequency oscillator. Tone.LFO produces an output signal\n\t\t *          which can be attached to an AudioParam or Tone.Signal\n\t\t *          in order to modulate that parameter with an oscillator. The LFO can\n\t\t *          also be synced to the transport to start/stop and change when the tempo changes.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Frequency|Object} [frequency] The frequency of the oscillation. Typically, LFOs will be\n\t\t *                               in the frequency range of 0.1 to 10 hertz.\n\t\t *  @param {number=} min The minimum output value of the LFO.\n\t\t *  @param {number=} max The maximum value of the LFO.\n\t\t *  @example\n\t\t * var lfo = new Tone.LFO(\"4n\", 400, 4000);\n\t\t * lfo.connect(filter.frequency);\n\t\t */\n\t    Tone.LFO = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'min',\n\t            'max'\n\t        ], Tone.LFO);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The oscillator.\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t *  @private\n\t\t\t */\n\t        this._oscillator = new Tone.Oscillator({\n\t            'frequency': options.frequency,\n\t            'type': options.type\n\t        });\n\t        /**\n\t\t\t *  the lfo's frequency\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = this._oscillator.frequency;\n\t        /**\n\t\t\t * The amplitude of the LFO, which controls the output range between\n\t\t\t * the min and max output. For example if the min is -10 and the max\n\t\t\t * is 10, setting the amplitude to 0.5 would make the LFO modulate\n\t\t\t * between -5 and 5.\n\t\t\t * @type {Number}\n\t\t\t * @signal\n\t\t\t */\n\t        this.amplitude = this._oscillator.volume;\n\t        this.amplitude.units = Tone.Type.NormalRange;\n\t        this.amplitude.value = options.amplitude;\n\t        /**\n\t\t\t *  The signal which is output when the LFO is stopped\n\t\t\t *  @type  {Tone.Signal}\n\t\t\t *  @private\n\t\t\t */\n\t        this._stoppedSignal = new Tone.Signal(0, Tone.Type.AudioRange);\n\t        /**\n\t\t\t *  Just outputs zeros.\n\t\t\t *  @type {Tone.Zero}\n\t\t\t *  @private\n\t\t\t */\n\t        this._zeros = new Tone.Zero();\n\t        /**\n\t\t\t *  The value that the LFO outputs when it's stopped\n\t\t\t *  @type {AudioRange}\n\t\t\t *  @private\n\t\t\t */\n\t        this._stoppedValue = 0;\n\t        /**\n\t\t\t *  @type {Tone.AudioToGain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._a2g = new Tone.AudioToGain();\n\t        /**\n\t\t\t *  @type {Tone.Scale}\n\t\t\t *  @private\n\t\t\t */\n\t        this._scaler = this.output = new Tone.Scale(options.min, options.max);\n\t        /**\n\t\t\t *  the units of the LFO (used for converting)\n\t\t\t *  @type {Tone.Type}\n\t\t\t *  @private\n\t\t\t */\n\t        this._units = Tone.Type.Default;\n\t        this.units = options.units;\n\t        //connect it up\n\t        this._oscillator.chain(this._a2g, this._scaler);\n\t        this._zeros.connect(this._a2g);\n\t        this._stoppedSignal.connect(this._a2g);\n\t        this._readOnly([\n\t            'amplitude',\n\t            'frequency'\n\t        ]);\n\t        this.phase = options.phase;\n\t    };\n\t    Tone.extend(Tone.LFO, Tone.AudioNode);\n\t    /**\n\t\t *  the default parameters\n\t\t *\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.LFO.defaults = {\n\t        'type': 'sine',\n\t        'min': 0,\n\t        'max': 1,\n\t        'phase': 0,\n\t        'frequency': '4n',\n\t        'amplitude': 1,\n\t        'units': Tone.Type.Default\n\t    };\n\t    /**\n\t\t *  Start the LFO.\n\t\t *  @param  {Time} [time=now] the time the LFO will start\n\t\t *  @returns {Tone.LFO} this\n\t\t */\n\t    Tone.LFO.prototype.start = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._stoppedSignal.setValueAtTime(0, time);\n\t        this._oscillator.start(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Stop the LFO.\n\t\t *  @param  {Time} [time=now] the time the LFO will stop\n\t\t *  @returns {Tone.LFO} this\n\t\t */\n\t    Tone.LFO.prototype.stop = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._stoppedSignal.setValueAtTime(this._stoppedValue, time);\n\t        this._oscillator.stop(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Sync the start/stop/pause to the transport\n\t\t *  and the frequency to the bpm of the transport\n\t\t *  @returns {Tone.LFO} this\n\t\t *  @example\n\t\t *  lfo.frequency.value = \"8n\";\n\t\t *  lfo.sync().start(0)\n\t\t *  //the rate of the LFO will always be an eighth note,\n\t\t *  //even as the tempo changes\n\t\t */\n\t    Tone.LFO.prototype.sync = function () {\n\t        this._oscillator.sync();\n\t        this._oscillator.syncFrequency();\n\t        return this;\n\t    };\n\t    /**\n\t\t *  unsync the LFO from transport control\n\t\t *  @returns {Tone.LFO} this\n\t\t */\n\t    Tone.LFO.prototype.unsync = function () {\n\t        this._oscillator.unsync();\n\t        this._oscillator.unsyncFrequency();\n\t        return this;\n\t    };\n\t    /**\n\t\t * The miniumum output of the LFO.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {number}\n\t\t * @name min\n\t\t */\n\t    Object.defineProperty(Tone.LFO.prototype, 'min', {\n\t        get: function () {\n\t            return this._toUnits(this._scaler.min);\n\t        },\n\t        set: function (min) {\n\t            min = this._fromUnits(min);\n\t            this._scaler.min = min;\n\t        }\n\t    });\n\t    /**\n\t\t * The maximum output of the LFO.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {number}\n\t\t * @name max\n\t\t */\n\t    Object.defineProperty(Tone.LFO.prototype, 'max', {\n\t        get: function () {\n\t            return this._toUnits(this._scaler.max);\n\t        },\n\t        set: function (max) {\n\t            max = this._fromUnits(max);\n\t            this._scaler.max = max;\n\t        }\n\t    });\n\t    /**\n\t\t * The type of the oscillator: sine, square, sawtooth, triangle.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.LFO.prototype, 'type', {\n\t        get: function () {\n\t            return this._oscillator.type;\n\t        },\n\t        set: function (type) {\n\t            this._oscillator.type = type;\n\t            this._stoppedValue = this._oscillator._getInitialValue();\n\t            this._stoppedSignal.value = this._stoppedValue;\n\t        }\n\t    });\n\t    /**\n\t\t * The phase of the LFO.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {number}\n\t\t * @name phase\n\t\t */\n\t    Object.defineProperty(Tone.LFO.prototype, 'phase', {\n\t        get: function () {\n\t            return this._oscillator.phase;\n\t        },\n\t        set: function (phase) {\n\t            this._oscillator.phase = phase;\n\t            this._stoppedValue = this._oscillator._getInitialValue();\n\t            this._stoppedSignal.value = this._stoppedValue;\n\t        }\n\t    });\n\t    /**\n\t\t * The output units of the LFO.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {Tone.Type}\n\t\t * @name units\n\t\t */\n\t    Object.defineProperty(Tone.LFO.prototype, 'units', {\n\t        get: function () {\n\t            return this._units;\n\t        },\n\t        set: function (val) {\n\t            var currentMin = this.min;\n\t            var currentMax = this.max;\n\t            //convert the min and the max\n\t            this._units = val;\n\t            this.min = currentMin;\n\t            this.max = currentMax;\n\t        }\n\t    });\n\t    /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {Boolean}\n\t\t * @name mute\n\t\t */\n\t    Object.defineProperty(Tone.LFO.prototype, 'mute', {\n\t        get: function () {\n\t            return this._oscillator.mute;\n\t        },\n\t        set: function (mute) {\n\t            this._oscillator.mute = mute;\n\t        }\n\t    });\n\t    /**\n\t\t *  Returns the playback state of the source, either \"started\" or \"stopped\".\n\t\t *  @type {Tone.State}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.LFO#\n\t\t *  @name state\n\t\t */\n\t    Object.defineProperty(Tone.LFO.prototype, 'state', {\n\t        get: function () {\n\t            return this._oscillator.state;\n\t        }\n\t    });\n\t    /**\n\t\t *  Connect the output of the LFO to an AudioParam, AudioNode, or Tone Node.\n\t\t *  Tone.LFO will automatically convert to the destination units of the\n\t\t *  will get the units from the connected node.\n\t\t *  @param  {Tone | AudioParam | AudioNode} node\n\t\t *  @param {number} [outputNum=0] optionally which output to connect from\n\t\t *  @param {number} [inputNum=0] optionally which input to connect to\n\t\t *  @returns {Tone.LFO} this\n\t\t *  @private\n\t\t */\n\t    Tone.LFO.prototype.connect = function (node) {\n\t        if (node.constructor === Tone.Signal || node.constructor === Tone.Param) {\n\t            this.convert = node.convert;\n\t            this.units = node.units;\n\t        }\n\t        Tone.SignalBase.prototype.connect.apply(this, arguments);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  private method borrowed from Param converts\n\t\t *  units from their destination value\n\t\t *  @function\n\t\t *  @private\n\t\t */\n\t    Tone.LFO.prototype._fromUnits = Tone.Param.prototype._fromUnits;\n\t    /**\n\t\t *  private method borrowed from Param converts\n\t\t *  units to their destination value\n\t\t *  @function\n\t\t *  @private\n\t\t */\n\t    Tone.LFO.prototype._toUnits = Tone.Param.prototype._toUnits;\n\t    /**\n\t\t *  disconnect and dispose\n\t\t *  @returns {Tone.LFO} this\n\t\t */\n\t    Tone.LFO.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable([\n\t            'amplitude',\n\t            'frequency'\n\t        ]);\n\t        this._oscillator.dispose();\n\t        this._oscillator = null;\n\t        this._stoppedSignal.dispose();\n\t        this._stoppedSignal = null;\n\t        this._zeros.dispose();\n\t        this._zeros = null;\n\t        this._scaler.dispose();\n\t        this._scaler = null;\n\t        this._a2g.dispose();\n\t        this._a2g = null;\n\t        this.frequency = null;\n\t        this.amplitude = null;\n\t        return this;\n\t    };\n\t    return Tone.LFO;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Limiter will limit the loudness of an incoming signal.\n\t\t *         It is composed of a Tone.Compressor with a fast attack\n\t\t *         and release. Limiters are commonly used to safeguard against\n\t\t *         signal clipping. Unlike a compressor, limiters do not provide\n\t\t *         smooth gain reduction and almost completely prevent\n\t\t *         additional gain above the threshold.\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t *  @param {number} threshold The theshold above which the limiting is applied.\n\t\t *  @example\n\t\t *  var limiter = new Tone.Limiter(-6);\n\t\t */\n\t    Tone.Limiter = function () {\n\t        var options = Tone.defaults(arguments, ['threshold'], Tone.Limiter);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  the compressor\n\t\t\t *  @private\n\t\t\t *  @type {Tone.Compressor}\n\t\t\t */\n\t        this._compressor = this.input = this.output = new Tone.Compressor({\n\t            'attack': 0.001,\n\t            'decay': 0.001,\n\t            'threshold': options.threshold\n\t        });\n\t        /**\n\t\t\t * The threshold of of the limiter\n\t\t\t * @type {Decibel}\n\t\t\t * @signal\n\t\t\t */\n\t        this.threshold = this._compressor.threshold;\n\t        this._readOnly('threshold');\n\t    };\n\t    Tone.extend(Tone.Limiter, Tone.AudioNode);\n\t    /**\n\t\t *  The default value\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t *  @static\n\t\t */\n\t    Tone.Limiter.defaults = { 'threshold': -12 };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Limiter} this\n\t\t */\n\t    Tone.Limiter.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._compressor.dispose();\n\t        this._compressor = null;\n\t        this._writable('threshold');\n\t        this.threshold = null;\n\t        return this;\n\t    };\n\t    return Tone.Limiter;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Lowpass is a lowpass feedback comb filter. It is similar to\n\t\t *         Tone.FeedbackCombFilter, but includes a lowpass filter.\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t *  @param {Time|Object} [delayTime] The delay time of the comb filter\n\t\t *  @param {NormalRange=} resonance The resonance (feedback) of the comb filter\n\t\t *  @param {Frequency=} dampening The cutoff of the lowpass filter dampens the\n\t\t *                                signal as it is fedback.\n\t\t */\n\t    Tone.LowpassCombFilter = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'delayTime',\n\t            'resonance',\n\t            'dampening'\n\t        ], Tone.LowpassCombFilter);\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(1, 1);\n\t        /**\n\t\t\t *  the delay node\n\t\t\t *  @type {DelayNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delay = this.input = new Tone.Delay(options.delayTime);\n\t        /**\n\t\t\t *  The delayTime of the comb filter.\n\t\t\t *  @type {Time}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.delayTime = this._delay.delayTime;\n\t        /**\n\t\t\t *  the lowpass filter\n\t\t\t *  @type  {BiquadFilterNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lowpass = this.output = this.context.createBiquadFilter();\n\t        this._lowpass.Q.value = -3.0102999566398125;\n\t        this._lowpass.type = 'lowpass';\n\t        /**\n\t\t\t *  The dampening control of the feedback\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.dampening = new Tone.Param({\n\t            'param': this._lowpass.frequency,\n\t            'units': Tone.Type.Frequency,\n\t            'value': options.dampening\n\t        });\n\t        /**\n\t\t\t *  the feedback gain\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._feedback = new Tone.Gain(options.resonance, Tone.Type.NormalRange);\n\t        /**\n\t\t\t *  The amount of feedback of the delayed signal.\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.resonance = this._feedback.gain;\n\t        //connections\n\t        this._delay.chain(this._lowpass, this._feedback, this._delay);\n\t        this._readOnly([\n\t            'dampening',\n\t            'resonance',\n\t            'delayTime'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.LowpassCombFilter, Tone.AudioNode);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.LowpassCombFilter.defaults = {\n\t        'delayTime': 0.1,\n\t        'resonance': 0.5,\n\t        'dampening': 3000\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.LowpassCombFilter} this\n\t\t */\n\t    Tone.LowpassCombFilter.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable([\n\t            'dampening',\n\t            'resonance',\n\t            'delayTime'\n\t        ]);\n\t        this.dampening.dispose();\n\t        this.dampening = null;\n\t        this.resonance.dispose();\n\t        this.resonance = null;\n\t        this._delay.dispose();\n\t        this._delay = null;\n\t        this.delayTime = null;\n\t        this._lowpass.disconnect();\n\t        this._lowpass = null;\n\t        this._feedback.disconnect();\n\t        this._feedback = null;\n\t        return this;\n\t    };\n\t    return Tone.LowpassCombFilter;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Merge brings two signals into the left and right\n\t\t *          channels of a single stereo channel.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @example\n\t\t * var merge = new Tone.Merge().toMaster();\n\t\t * //routing a sine tone in the left channel\n\t\t * //and noise in the right channel\n\t\t * var osc = new Tone.Oscillator().connect(merge.left);\n\t\t * var noise = new Tone.Noise().connect(merge.right);\n\t\t * //starting our oscillators\n\t\t * noise.start();\n\t\t * osc.start();\n\t\t */\n\t    Tone.Merge = function () {\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(2, 0);\n\t        /**\n\t\t\t *  The left input channel.\n\t\t\t *  Alias for <code>input[0]</code>\n\t\t\t *  @type {GainNode}\n\t\t\t */\n\t        this.left = this.input[0] = new Tone.Gain();\n\t        /**\n\t\t\t *  The right input channel.\n\t\t\t *  Alias for <code>input[1]</code>.\n\t\t\t *  @type {GainNode}\n\t\t\t */\n\t        this.right = this.input[1] = new Tone.Gain();\n\t        /**\n\t\t\t *  the merger node for the two channels\n\t\t\t *  @type {ChannelMergerNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._merger = this.output = this.context.createChannelMerger(2);\n\t        //connections\n\t        this.left.connect(this._merger, 0, 0);\n\t        this.right.connect(this._merger, 0, 1);\n\t        this.left.channelCount = 1;\n\t        this.right.channelCount = 1;\n\t        this.left.channelCountMode = 'explicit';\n\t        this.right.channelCountMode = 'explicit';\n\t    };\n\t    Tone.extend(Tone.Merge, Tone.AudioNode);\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Merge} this\n\t\t */\n\t    Tone.Merge.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this.left.dispose();\n\t        this.left = null;\n\t        this.right.dispose();\n\t        this.right = null;\n\t        this._merger.disconnect();\n\t        this._merger = null;\n\t        return this;\n\t    };\n\t    return Tone.Merge;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Meter gets the [RMS](https://en.wikipedia.org/wiki/Root_mean_square)\n\t\t *          of an input signal with some averaging applied. It can also get the raw\n\t\t *          value of the input signal.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Number} smoothing The amount of smoothing applied between frames.\n\t\t *  @example\n\t\t * var meter = new Tone.Meter();\n\t\t * var mic = new Tone.UserMedia().open();\n\t\t * //connect mic to the meter\n\t\t * mic.connect(meter);\n\t\t * //the current level of the mic input in decibels\n\t\t * var level = meter.getValue();\n\t\t */\n\t    Tone.Meter = function () {\n\t        var options = Tone.defaults(arguments, ['smoothing'], Tone.Meter);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The analyser node which computes the levels.\n\t\t\t *  @private\n\t\t\t *  @type  {Tone.Analyser}\n\t\t\t */\n\t        this.input = this.output = this._analyser = new Tone.Analyser('waveform', 1024);\n\t        /**\n\t\t\t *  The amount of carryover between the current and last frame.\n\t\t\t *  Only applied meter for \"level\" type.\n\t\t\t *  @type  {Number}\n\t\t\t */\n\t        this.smoothing = options.smoothing;\n\t    };\n\t    Tone.extend(Tone.Meter, Tone.AudioNode);\n\t    /**\n\t\t *  The defaults\n\t\t *  @type {Object}\n\t\t *  @static\n\t\t *  @const\n\t\t */\n\t    Tone.Meter.defaults = { 'smoothing': 0.8 };\n\t    /**\n\t\t *  Get the current decibel value of the incoming signal\n\t\t *  @returns {Decibels}\n\t\t */\n\t    Tone.Meter.prototype.getLevel = function () {\n\t        this._analyser.type = 'fft';\n\t        var values = this._analyser.getValue();\n\t        var offset = 28;\n\t        // normalizes most signal levels\n\t        // TODO: compute loudness from FFT\n\t        return Math.max.apply(this, values) + offset;\n\t    };\n\t    /**\n\t\t *  Get the signal value of the incoming signal\n\t\t *  @returns {Number}\n\t\t */\n\t    Tone.Meter.prototype.getValue = function () {\n\t        this._analyser.type = 'waveform';\n\t        var value = this._analyser.getValue();\n\t        return value[0];\n\t    };\n\t    /**\n\t\t * A value from 0 -> 1 where 0 represents no time averaging with the last analysis frame.\n\t\t * @memberOf Tone.Meter#\n\t\t * @type {Number}\n\t\t * @name smoothing\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Meter.prototype, 'smoothing', {\n\t        get: function () {\n\t            return this._analyser.smoothing;\n\t        },\n\t        set: function (val) {\n\t            this._analyser.smoothing = val;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Meter} this\n\t\t */\n\t    Tone.Meter.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._analyser.dispose();\n\t        this._analyser = null;\n\t        return this;\n\t    };\n\t    return Tone.Meter;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *\t@class  Tone.Split splits an incoming signal into left and right channels.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @example\n\t\t * var split = new Tone.Split();\n\t\t * stereoSignal.connect(split);\n\t\t */\n\t    Tone.Split = function () {\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(0, 2);\n\t        /**\n\t\t\t *  @type {ChannelSplitterNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._splitter = this.input = this.context.createChannelSplitter(2);\n\t        this._splitter.channelCount = 2;\n\t        this._splitter.channelCountMode = 'explicit';\n\t        /**\n\t\t\t *  Left channel output.\n\t\t\t *  Alias for <code>output[0]</code>\n\t\t\t *  @type {Tone.Gain}\n\t\t\t */\n\t        this.left = this.output[0] = new Tone.Gain();\n\t        /**\n\t\t\t *  Right channel output.\n\t\t\t *  Alias for <code>output[1]</code>\n\t\t\t *  @type {Tone.Gain}\n\t\t\t */\n\t        this.right = this.output[1] = new Tone.Gain();\n\t        //connections\n\t        this._splitter.connect(this.left, 0, 0);\n\t        this._splitter.connect(this.right, 1, 0);\n\t    };\n\t    Tone.extend(Tone.Split, Tone.AudioNode);\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Split} this\n\t\t */\n\t    Tone.Split.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._splitter.disconnect();\n\t        this.left.dispose();\n\t        this.left = null;\n\t        this.right.dispose();\n\t        this.right = null;\n\t        this._splitter = null;\n\t        return this;\n\t    };\n\t    return Tone.Split;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Mid/Side processing separates the the 'mid' signal\n\t\t *         (which comes out of both the left and the right channel)\n\t\t *         and the 'side' (which only comes out of the the side channels). <br><br>\n\t\t *         <code>\n\t\t *         Mid = (Left+Right)/sqrt(2);   // obtain mid-signal from left and right<br>\n\t\t *         Side = (Left-Right)/sqrt(2);   // obtain side-signal from left and righ<br>\n\t\t *         </code>\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t */\n\t    Tone.MidSideSplit = function () {\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(0, 2);\n\t        /**\n\t\t\t *  split the incoming signal into left and right channels\n\t\t\t *  @type  {Tone.Split}\n\t\t\t *  @private\n\t\t\t */\n\t        this._split = this.input = new Tone.Split();\n\t        /**\n\t\t\t *  The mid send. Connect to mid processing. Alias for\n\t\t\t *  <code>output[0]</code>\n\t\t\t *  @type {Tone.Add}\n\t\t\t */\n\t        this._midAdd = new Tone.Add();\n\t        /**\n\t\t\t * Multiply the _midAdd by sqrt(1/2)\n\t\t\t * @type {Tone.Multiply}\n\t\t\t */\n\t        this.mid = this.output[0] = new Tone.Multiply(Math.SQRT1_2);\n\t        /**\n\t\t\t *  The side output. Connect to side processing. Also Output 1\n\t\t\t *  @type {Tone.Subtract}\n\t\t\t */\n\t        this._sideSubtract = new Tone.Subtract();\n\t        /**\n\t\t\t * Multiply the _midAdd by sqrt(1/2)\n\t\t\t * @type {Tone.Multiply}\n\t\t\t */\n\t        this.side = this.output[1] = new Tone.Multiply(Math.SQRT1_2);\n\t        this._split.connect(this._midAdd, 0, 0);\n\t        this._split.connect(this._midAdd, 1, 1);\n\t        this._split.connect(this._sideSubtract, 0, 0);\n\t        this._split.connect(this._sideSubtract, 1, 1);\n\t        this._midAdd.connect(this.mid);\n\t        this._sideSubtract.connect(this.side);\n\t    };\n\t    Tone.extend(Tone.MidSideSplit, Tone.AudioNode);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.MidSideSplit} this\n\t\t */\n\t    Tone.MidSideSplit.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this.mid.dispose();\n\t        this.mid = null;\n\t        this.side.dispose();\n\t        this.side = null;\n\t        this._midAdd.dispose();\n\t        this._midAdd = null;\n\t        this._sideSubtract.dispose();\n\t        this._sideSubtract = null;\n\t        this._split.dispose();\n\t        this._split = null;\n\t        return this;\n\t    };\n\t    return Tone.MidSideSplit;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Mid/Side processing separates the the 'mid' signal\n\t\t *         (which comes out of both the left and the right channel)\n\t\t *         and the 'side' (which only comes out of the the side channels).\n\t\t *         MidSideMerge merges the mid and side signal after they've been seperated\n\t\t *         by Tone.MidSideSplit.<br><br>\n\t\t *         <code>\n\t\t *         Left = (Mid+Side)/sqrt(2);   // obtain left signal from mid and side<br>\n\t\t *         Right = (Mid-Side)/sqrt(2);   // obtain right signal from mid and side<br>\n\t\t *         </code>\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t */\n\t    Tone.MidSideMerge = function () {\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(2, 0);\n\t        /**\n\t\t\t *  The mid signal input. Alias for\n\t\t\t *  <code>input[0]</code>\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t */\n\t        this.mid = this.input[0] = new Tone.Gain();\n\t        /**\n\t\t\t *  recombine the mid/side into Left\n\t\t\t *  @type {Tone.Add}\n\t\t\t *  @private\n\t\t\t */\n\t        this._left = new Tone.Add();\n\t        /**\n\t\t\t * Multiply the left by sqrt(1/2)\n\t\t\t * @type {Tone.Multiply}\n\t\t\t */\n\t        this._timesTwoLeft = new Tone.Multiply(Math.SQRT1_2);\n\t        /**\n\t\t\t *  The side signal input. Alias for\n\t\t\t *  <code>input[1]</code>\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t */\n\t        this.side = this.input[1] = new Tone.Gain();\n\t        /**\n\t\t\t *  recombine the mid/side into Right\n\t\t\t *  @type {Tone.Subtract}\n\t\t\t *  @private\n\t\t\t */\n\t        this._right = new Tone.Subtract();\n\t        /**\n\t\t\t * Multiply the right by sqrt(1/2)\n\t\t\t * @type {Tone.Multiply}\n\t\t\t */\n\t        this._timesTwoRight = new Tone.Multiply(Math.SQRT1_2);\n\t        /**\n\t\t\t *  Merge the left/right signal back into a stereo signal.\n\t\t\t *  @type {Tone.Merge}\n\t\t\t *  @private\n\t\t\t */\n\t        this._merge = this.output = new Tone.Merge();\n\t        this.mid.connect(this._left, 0, 0);\n\t        this.side.connect(this._left, 0, 1);\n\t        this.mid.connect(this._right, 0, 0);\n\t        this.side.connect(this._right, 0, 1);\n\t        this._left.connect(this._timesTwoLeft);\n\t        this._right.connect(this._timesTwoRight);\n\t        this._timesTwoLeft.connect(this._merge, 0, 0);\n\t        this._timesTwoRight.connect(this._merge, 0, 1);\n\t    };\n\t    Tone.extend(Tone.MidSideMerge, Tone.AudioNode);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.MidSideMerge} this\n\t\t */\n\t    Tone.MidSideMerge.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this.mid.dispose();\n\t        this.mid = null;\n\t        this.side.dispose();\n\t        this.side = null;\n\t        this._left.dispose();\n\t        this._left = null;\n\t        this._timesTwoLeft.dispose();\n\t        this._timesTwoLeft = null;\n\t        this._right.dispose();\n\t        this._right = null;\n\t        this._timesTwoRight.dispose();\n\t        this._timesTwoRight = null;\n\t        this._merge.dispose();\n\t        this._merge = null;\n\t        return this;\n\t    };\n\t    return Tone.MidSideMerge;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.MidSideCompressor applies two different compressors to the mid\n\t\t *         and side signal components. See Tone.MidSideSplit.\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Object} options The options that are passed to the mid and side\n\t\t *                          compressors.\n\t\t *  @constructor\n\t\t */\n\t    Tone.MidSideCompressor = function (options) {\n\t        Tone.AudioNode.call(this);\n\t        options = Tone.defaultArg(options, Tone.MidSideCompressor.defaults);\n\t        /**\n\t\t\t *  the mid/side split\n\t\t\t *  @type  {Tone.MidSideSplit}\n\t\t\t *  @private\n\t\t\t */\n\t        this._midSideSplit = this.input = new Tone.MidSideSplit();\n\t        /**\n\t\t\t *  the mid/side recombination\n\t\t\t *  @type  {Tone.MidSideMerge}\n\t\t\t *  @private\n\t\t\t */\n\t        this._midSideMerge = this.output = new Tone.MidSideMerge();\n\t        /**\n\t\t\t *  The compressor applied to the mid signal\n\t\t\t *  @type  {Tone.Compressor}\n\t\t\t */\n\t        this.mid = new Tone.Compressor(options.mid);\n\t        /**\n\t\t\t *  The compressor applied to the side signal\n\t\t\t *  @type  {Tone.Compressor}\n\t\t\t */\n\t        this.side = new Tone.Compressor(options.side);\n\t        this._midSideSplit.mid.chain(this.mid, this._midSideMerge.mid);\n\t        this._midSideSplit.side.chain(this.side, this._midSideMerge.side);\n\t        this._readOnly([\n\t            'mid',\n\t            'side'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.MidSideCompressor, Tone.AudioNode);\n\t    /**\n\t\t *  @const\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.MidSideCompressor.defaults = {\n\t        'mid': {\n\t            'ratio': 3,\n\t            'threshold': -24,\n\t            'release': 0.03,\n\t            'attack': 0.02,\n\t            'knee': 16\n\t        },\n\t        'side': {\n\t            'ratio': 6,\n\t            'threshold': -30,\n\t            'release': 0.25,\n\t            'attack': 0.03,\n\t            'knee': 10\n\t        }\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.MidSideCompressor} this\n\t\t */\n\t    Tone.MidSideCompressor.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable([\n\t            'mid',\n\t            'side'\n\t        ]);\n\t        this.mid.dispose();\n\t        this.mid = null;\n\t        this.side.dispose();\n\t        this.side = null;\n\t        this._midSideSplit.dispose();\n\t        this._midSideSplit = null;\n\t        this._midSideMerge.dispose();\n\t        this._midSideMerge = null;\n\t        return this;\n\t    };\n\t    return Tone.MidSideCompressor;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Mono coerces the incoming mono or stereo signal into a mono signal\n\t\t *         where both left and right channels have the same value. This can be useful\n\t\t *         for [stereo imaging](https://en.wikipedia.org/wiki/Stereo_imaging).\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t */\n\t    Tone.Mono = function () {\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(1, 0);\n\t        /**\n\t\t\t *  merge the signal\n\t\t\t *  @type {Tone.Merge}\n\t\t\t *  @private\n\t\t\t */\n\t        this._merge = this.output = new Tone.Merge();\n\t        this.input.connect(this._merge, 0, 0);\n\t        this.input.connect(this._merge, 0, 1);\n\t    };\n\t    Tone.extend(Tone.Mono, Tone.AudioNode);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Mono} this\n\t\t */\n\t    Tone.Mono.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._merge.dispose();\n\t        this._merge = null;\n\t        return this;\n\t    };\n\t    return Tone.Mono;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class A compressor with seperate controls over low/mid/high dynamics\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t *  @param {Object} options The low/mid/high compressor settings.\n\t\t *  @example\n\t\t *  var multiband = new Tone.MultibandCompressor({\n\t\t *  \t\"lowFrequency\" : 200,\n\t\t *  \t\"highFrequency\" : 1300\n\t\t *  \t\"low\" : {\n\t\t *  \t\t\"threshold\" : -12\n\t\t *  \t}\n\t\t *  })\n\t\t */\n\t    Tone.MultibandCompressor = function (options) {\n\t        Tone.AudioNode.call(this);\n\t        options = Tone.defaultArg(arguments, Tone.MultibandCompressor.defaults);\n\t        /**\n\t\t\t *  split the incoming signal into high/mid/low\n\t\t\t *  @type {Tone.MultibandSplit}\n\t\t\t *  @private\n\t\t\t */\n\t        this._splitter = this.input = new Tone.MultibandSplit({\n\t            'lowFrequency': options.lowFrequency,\n\t            'highFrequency': options.highFrequency\n\t        });\n\t        /**\n\t\t\t *  low/mid crossover frequency.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.lowFrequency = this._splitter.lowFrequency;\n\t        /**\n\t\t\t *  mid/high crossover frequency.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.highFrequency = this._splitter.highFrequency;\n\t        /**\n\t\t\t *  the output\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this.output = new Tone.Gain();\n\t        /**\n\t\t\t *  The compressor applied to the low frequencies.\n\t\t\t *  @type {Tone.Compressor}\n\t\t\t */\n\t        this.low = new Tone.Compressor(options.low);\n\t        /**\n\t\t\t *  The compressor applied to the mid frequencies.\n\t\t\t *  @type {Tone.Compressor}\n\t\t\t */\n\t        this.mid = new Tone.Compressor(options.mid);\n\t        /**\n\t\t\t *  The compressor applied to the high frequencies.\n\t\t\t *  @type {Tone.Compressor}\n\t\t\t */\n\t        this.high = new Tone.Compressor(options.high);\n\t        //connect the compressor\n\t        this._splitter.low.chain(this.low, this.output);\n\t        this._splitter.mid.chain(this.mid, this.output);\n\t        this._splitter.high.chain(this.high, this.output);\n\t        this._readOnly([\n\t            'high',\n\t            'mid',\n\t            'low',\n\t            'highFrequency',\n\t            'lowFrequency'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.MultibandCompressor, Tone.AudioNode);\n\t    /**\n\t\t *  @const\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.MultibandCompressor.defaults = {\n\t        'low': Tone.Compressor.defaults,\n\t        'mid': Tone.Compressor.defaults,\n\t        'high': Tone.Compressor.defaults,\n\t        'lowFrequency': 250,\n\t        'highFrequency': 2000\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.MultibandCompressor} this\n\t\t */\n\t    Tone.MultibandCompressor.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._splitter.dispose();\n\t        this._writable([\n\t            'high',\n\t            'mid',\n\t            'low',\n\t            'highFrequency',\n\t            'lowFrequency'\n\t        ]);\n\t        this.low.dispose();\n\t        this.mid.dispose();\n\t        this.high.dispose();\n\t        this._splitter = null;\n\t        this.low = null;\n\t        this.mid = null;\n\t        this.high = null;\n\t        this.lowFrequency = null;\n\t        this.highFrequency = null;\n\t        return this;\n\t    };\n\t    return Tone.MultibandCompressor;\n\t});\n\tModule(function (Tone) {\n\t    if (Tone.supported && !window.StereoPannerNode) {\n\t        /**\n\t\t\t * @class Shimmed StereoPannerNode\n\t\t\t * @param  {AudioContext} context\n\t\t\t * @private\n\t\t\t */\n\t        var StereoPannerNode = function (context) {\n\t            /**\n\t\t\t\t * The audio context\n\t\t\t\t * @type {AudioContext}\n\t\t\t\t */\n\t            this.context = context;\n\t            /**\n\t\t\t\t * The left/right panning. [-1, 1]\n\t\t\t\t * @type {AudioRange}\n\t\t\t\t * @signal\n\t\t\t\t */\n\t            this.pan = new Tone.Signal(0, Tone.Type.AudioRange);\n\t            /**\n\t\t\t\t * Equal power scaling of the right gain\n\t\t\t\t * @type {Tone.WaveShaper}\n\t\t\t\t */\n\t            var rightWaveShaper = new Tone.WaveShaper(function (val) {\n\t                return Tone.equalPowerScale((val + 1) / 2);\n\t            }, 4096);\n\t            /**\n\t\t\t\t * Equal power scaling of the left gain\n\t\t\t\t * @type {Tone.WaveShaper}\n\t\t\t\t * @private\n\t\t\t\t */\n\t            var leftWaveShaper = new Tone.WaveShaper(function (val) {\n\t                return Tone.equalPowerScale(1 - (val + 1) / 2);\n\t            }, 4096);\n\t            /**\n\t\t\t\t * The left gain value\n\t\t\t\t * @type {Tone.Gain}\n\t\t\t\t * @private\n\t\t\t\t */\n\t            var leftGain = new Tone.Gain();\n\t            /**\n\t\t\t\t * The right gain value\n\t\t\t\t * @type {Tone.Gain}\n\t\t\t\t * @private\n\t\t\t\t */\n\t            var rightGain = new Tone.Gain();\n\t            /**\n\t\t\t\t * Split the incoming signal\n\t\t\t\t * @type {Tone.Split}\n\t\t\t\t * @private\n\t\t\t\t */\n\t            var split = this.input = new Tone.Split();\n\t            /**\n\t\t\t\t * Keeps the waveshapers from optimizing 0s\n\t\t\t\t * @type {Tone.Zero}\n\t\t\t\t * @private\n\t\t\t\t */\n\t            var zero = new Tone.Zero();\n\t            zero.fan(rightWaveShaper, leftWaveShaper);\n\t            /**\n\t\t\t\t * Merge the outgoing signal\n\t\t\t\t * @type {Tone.Merge}\n\t\t\t\t * @private\n\t\t\t\t */\n\t            var merge = this.output = new Tone.Merge();\n\t            //connections\n\t            split.left.chain(leftGain, merge.left);\n\t            split.right.chain(rightGain, merge.right);\n\t            this.pan.chain(leftWaveShaper, leftGain.gain);\n\t            this.pan.chain(rightWaveShaper, rightGain.gain);\n\t        };\n\t        StereoPannerNode.prototype.disconnect = function () {\n\t            this.output.disconnect.apply(this.output, arguments);\n\t        };\n\t        StereoPannerNode.prototype.connect = function () {\n\t            this.output.connect.apply(this.output, arguments);\n\t        };\n\t        //add it to the AudioContext\n\t        AudioContext.prototype.createStereoPanner = function () {\n\t            return new StereoPannerNode(this);\n\t        };\n\t        Tone.Context.prototype.createStereoPanner = function () {\n\t            return new StereoPannerNode(this);\n\t        };\n\t    }\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Panner is an equal power Left/Right Panner and does not\n\t\t *          support 3D. Panner uses the StereoPannerNode when available.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {NormalRange} [initialPan=0] The initail panner value (center).\n\t\t *  @example\n\t\t *  //pan the input signal hard right.\n\t\t *  var panner = new Tone.Panner(1);\n\t\t */\n\t    Tone.Panner = function (initialPan) {\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t*  the panner node\n\t\t\t*  @type {StereoPannerNode}\n\t\t\t*  @private\n\t\t\t*/\n\t        this._panner = this.input = this.output = this.context.createStereoPanner();\n\t        /**\n\t\t\t*  The pan control. -1 = hard left, 1 = hard right.\n\t\t\t*  @type {AudioRange}\n\t\t\t*  @signal\n\t\t\t*/\n\t        this.pan = this._panner.pan;\n\t        //initial value\n\t        this.pan.value = Tone.defaultArg(initialPan, 0);\n\t        this._readOnly('pan');\n\t    };\n\t    Tone.extend(Tone.Panner, Tone.AudioNode);\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Panner} this\n\t\t */\n\t    Tone.Panner.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable('pan');\n\t        this._panner.disconnect();\n\t        this._panner = null;\n\t        this.pan = null;\n\t        return this;\n\t    };\n\t    return Tone.Panner;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  A spatialized panner node which supports equalpower or HRTF panning.\n\t\t *          Tries to normalize the API across various browsers. See Tone.Listener\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Number} positionX The initial x position.\n\t\t *  @param {Number} positionY The initial y position.\n\t\t *  @param {Number} positionZ The initial z position.\n\t\t */\n\t    Tone.Panner3D = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'positionX',\n\t            'positionY',\n\t            'positionZ'\n\t        ], Tone.Panner3D);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The panner node\n\t\t\t *  @type {PannerNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._panner = this.input = this.output = this.context.createPanner();\n\t        //set some values\n\t        this._panner.panningModel = options.panningModel;\n\t        this._panner.maxDistance = options.maxDistance;\n\t        this._panner.distanceModel = options.distanceModel;\n\t        this._panner.coneOuterGain = options.coneOuterGain;\n\t        this._panner.coneOuterAngle = options.coneOuterAngle;\n\t        this._panner.coneInnerAngle = options.coneInnerAngle;\n\t        this._panner.refDistance = options.refDistance;\n\t        this._panner.rolloffFactor = options.rolloffFactor;\n\t        /**\n\t\t\t *  Holds the current orientation\n\t\t\t *  @type  {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._orientation = [\n\t            options.orientationX,\n\t            options.orientationY,\n\t            options.orientationZ\n\t        ];\n\t        /**\n\t\t\t *  Holds the current position\n\t\t\t *  @type  {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._position = [\n\t            options.positionX,\n\t            options.positionY,\n\t            options.positionZ\n\t        ];\n\t        // set the default position/orientation\n\t        this.orientationX = options.orientationX;\n\t        this.orientationY = options.orientationY;\n\t        this.orientationZ = options.orientationZ;\n\t        this.positionX = options.positionX;\n\t        this.positionY = options.positionY;\n\t        this.positionZ = options.positionZ;\n\t    };\n\t    Tone.extend(Tone.Panner3D, Tone.AudioNode);\n\t    /**\n\t\t *  Defaults according to the specification\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Panner3D.defaults = {\n\t        'positionX': 0,\n\t        'positionY': 0,\n\t        'positionZ': 0,\n\t        'orientationX': 0,\n\t        'orientationY': 0,\n\t        'orientationZ': 0,\n\t        'panningModel': 'equalpower',\n\t        'maxDistance': 10000,\n\t        'distanceModel': 'inverse',\n\t        'coneOuterGain': 0,\n\t        'coneOuterAngle': 360,\n\t        'coneInnerAngle': 360,\n\t        'refDistance': 1,\n\t        'rolloffFactor': 1\n\t    };\n\t    /**\n\t\t * The ramp time which is applied to the setTargetAtTime\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t    Tone.Panner3D.prototype._rampTimeConstant = 0.01;\n\t    /**\n\t\t *  Sets the position of the source in 3d space.\n\t\t *  @param  {Number}  x\n\t\t *  @param  {Number}  y\n\t\t *  @param  {Number}  z\n\t\t *  @return {Tone.Panner3D} this\n\t\t */\n\t    Tone.Panner3D.prototype.setPosition = function (x, y, z) {\n\t        if (this._panner.positionX) {\n\t            var now = this.now();\n\t            this._panner.positionX.setTargetAtTime(x, now, this._rampTimeConstant);\n\t            this._panner.positionY.setTargetAtTime(y, now, this._rampTimeConstant);\n\t            this._panner.positionZ.setTargetAtTime(z, now, this._rampTimeConstant);\n\t        } else {\n\t            this._panner.setPosition(x, y, z);\n\t        }\n\t        this._position = Array.prototype.slice.call(arguments);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Sets the orientation of the source in 3d space.\n\t\t *  @param  {Number}  x\n\t\t *  @param  {Number}  y\n\t\t *  @param  {Number}  z\n\t\t *  @return {Tone.Panner3D} this\n\t\t */\n\t    Tone.Panner3D.prototype.setOrientation = function (x, y, z) {\n\t        if (this._panner.orientationX) {\n\t            var now = this.now();\n\t            this._panner.orientationX.setTargetAtTime(x, now, this._rampTimeConstant);\n\t            this._panner.orientationY.setTargetAtTime(y, now, this._rampTimeConstant);\n\t            this._panner.orientationZ.setTargetAtTime(z, now, this._rampTimeConstant);\n\t        } else {\n\t            this._panner.setOrientation(x, y, z);\n\t        }\n\t        this._orientation = Array.prototype.slice.call(arguments);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  The x position of the panner object.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name positionX\n\t\t */\n\t    Object.defineProperty(Tone.Panner3D.prototype, 'positionX', {\n\t        set: function (pos) {\n\t            this._position[0] = pos;\n\t            this.setPosition.apply(this, this._position);\n\t        },\n\t        get: function () {\n\t            return this._position[0];\n\t        }\n\t    });\n\t    /**\n\t\t *  The y position of the panner object.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name positionY\n\t\t */\n\t    Object.defineProperty(Tone.Panner3D.prototype, 'positionY', {\n\t        set: function (pos) {\n\t            this._position[1] = pos;\n\t            this.setPosition.apply(this, this._position);\n\t        },\n\t        get: function () {\n\t            return this._position[1];\n\t        }\n\t    });\n\t    /**\n\t\t *  The z position of the panner object.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name positionZ\n\t\t */\n\t    Object.defineProperty(Tone.Panner3D.prototype, 'positionZ', {\n\t        set: function (pos) {\n\t            this._position[2] = pos;\n\t            this.setPosition.apply(this, this._position);\n\t        },\n\t        get: function () {\n\t            return this._position[2];\n\t        }\n\t    });\n\t    /**\n\t\t *  The x orientation of the panner object.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name orientationX\n\t\t */\n\t    Object.defineProperty(Tone.Panner3D.prototype, 'orientationX', {\n\t        set: function (pos) {\n\t            this._orientation[0] = pos;\n\t            this.setOrientation.apply(this, this._orientation);\n\t        },\n\t        get: function () {\n\t            return this._orientation[0];\n\t        }\n\t    });\n\t    /**\n\t\t *  The y orientation of the panner object.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name orientationY\n\t\t */\n\t    Object.defineProperty(Tone.Panner3D.prototype, 'orientationY', {\n\t        set: function (pos) {\n\t            this._orientation[1] = pos;\n\t            this.setOrientation.apply(this, this._orientation);\n\t        },\n\t        get: function () {\n\t            return this._orientation[1];\n\t        }\n\t    });\n\t    /**\n\t\t *  The z orientation of the panner object.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name orientationZ\n\t\t */\n\t    Object.defineProperty(Tone.Panner3D.prototype, 'orientationZ', {\n\t        set: function (pos) {\n\t            this._orientation[2] = pos;\n\t            this.setOrientation.apply(this, this._orientation);\n\t        },\n\t        get: function () {\n\t            return this._orientation[2];\n\t        }\n\t    });\n\t    /**\n\t\t *  Proxy a property on the panner to an exposed public propery\n\t\t *  @param  {String}  prop\n\t\t *  @private\n\t\t */\n\t    Tone.Panner3D._aliasProperty = function (prop) {\n\t        Object.defineProperty(Tone.Panner3D.prototype, prop, {\n\t            set: function (val) {\n\t                this._panner[prop] = val;\n\t            },\n\t            get: function () {\n\t                return this._panner[prop];\n\t            }\n\t        });\n\t    };\n\t    /**\n\t\t *  The panning model. Either \"equalpower\" or \"HRTF\".\n\t\t *  @type {String}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name panningModel\n\t\t */\n\t    Tone.Panner3D._aliasProperty('panningModel');\n\t    /**\n\t\t *  A reference distance for reducing volume as source move further from the listener\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name refDistance\n\t\t */\n\t    Tone.Panner3D._aliasProperty('refDistance');\n\t    /**\n\t\t *  Describes how quickly the volume is reduced as source moves away from listener.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name rolloffFactor\n\t\t */\n\t    Tone.Panner3D._aliasProperty('rolloffFactor');\n\t    /**\n\t\t *  The distance model used by,  \"linear\", \"inverse\", or \"exponential\".\n\t\t *  @type {String}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name distanceModel\n\t\t */\n\t    Tone.Panner3D._aliasProperty('distanceModel');\n\t    /**\n\t\t *  The angle, in degrees, inside of which there will be no volume reduction\n\t\t *  @type {Degrees}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name coneInnerAngle\n\t\t */\n\t    Tone.Panner3D._aliasProperty('coneInnerAngle');\n\t    /**\n\t\t *  The angle, in degrees, outside of which the volume will be reduced\n\t\t *  to a constant value of coneOuterGain\n\t\t *  @type {Degrees}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name coneOuterAngle\n\t\t */\n\t    Tone.Panner3D._aliasProperty('coneOuterAngle');\n\t    /**\n\t\t *  The gain outside of the coneOuterAngle\n\t\t *  @type {Gain}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name coneOuterGain\n\t\t */\n\t    Tone.Panner3D._aliasProperty('coneOuterGain');\n\t    /**\n\t\t *  The maximum distance between source and listener,\n\t\t *  after which the volume will not be reduced any further.\n\t\t *  @type {Positive}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name maxDistance\n\t\t */\n\t    Tone.Panner3D._aliasProperty('maxDistance');\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Panner3D} this\n\t\t */\n\t    Tone.Panner3D.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._panner.disconnect();\n\t        this._panner = null;\n\t        this._orientation = null;\n\t        this._position = null;\n\t        return this;\n\t    };\n\t    return Tone.Panner3D;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.PanVol is a Tone.Panner and Tone.Volume in one.\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t *  @param {AudioRange} pan the initial pan\n\t\t *  @param {number} volume The output volume.\n\t\t *  @example\n\t\t * //pan the incoming signal left and drop the volume\n\t\t * var panVol = new Tone.PanVol(-0.25, -12);\n\t\t */\n\t    Tone.PanVol = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'pan',\n\t            'volume'\n\t        ], Tone.PanVol);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The panning node\n\t\t\t *  @type {Tone.Panner}\n\t\t\t *  @private\n\t\t\t */\n\t        this._panner = this.input = new Tone.Panner(options.pan);\n\t        /**\n\t\t\t *  The L/R panning control.\n\t\t\t *  @type {AudioRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.pan = this._panner.pan;\n\t        /**\n\t\t\t *  The volume node\n\t\t\t *  @type {Tone.Volume}\n\t\t\t *  @private\n\t\t\t */\n\t        this._volume = this.output = new Tone.Volume(options.volume);\n\t        /**\n\t\t\t *  The volume control in decibels.\n\t\t\t *  @type {Decibels}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.volume = this._volume.volume;\n\t        //connections\n\t        this._panner.connect(this._volume);\n\t        this.mute = options.mute;\n\t        this._readOnly([\n\t            'pan',\n\t            'volume'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.PanVol, Tone.AudioNode);\n\t    /**\n\t\t *  The defaults\n\t\t *  @type  {Object}\n\t\t *  @const\n\t\t *  @static\n\t\t */\n\t    Tone.PanVol.defaults = {\n\t        'pan': 0,\n\t        'volume': 0,\n\t        'mute': false\n\t    };\n\t    /**\n\t\t * Mute/unmute the volume\n\t\t * @memberOf Tone.PanVol#\n\t\t * @name mute\n\t\t * @type {Boolean}\n\t\t */\n\t    Object.defineProperty(Tone.PanVol.prototype, 'mute', {\n\t        get: function () {\n\t            return this._volume.mute;\n\t        },\n\t        set: function (mute) {\n\t            this._volume.mute = mute;\n\t        }\n\t    });\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.PanVol} this\n\t\t */\n\t    Tone.PanVol.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable([\n\t            'pan',\n\t            'volume'\n\t        ]);\n\t        this._panner.dispose();\n\t        this._panner = null;\n\t        this.pan = null;\n\t        this._volume.dispose();\n\t        this._volume = null;\n\t        this.volume = null;\n\t        return this;\n\t    };\n\t    return Tone.PanVol;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.Solo lets you isolate a specific audio stream. When\n\t\t *         an instance is set to `solo=true`, it will mute all other instances.\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @example\n\t\t * var soloA = new Tone.Solo()\n\t\t * var soloB = new Tone.Solo()\n\t\t * soloA.solo = true\n\t\t * //no audio will pass through soloB\n\t\t */\n\t    Tone.Solo = function () {\n\t        var options = Tone.defaults(arguments, ['solo'], Tone.Solo);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The input and output node\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t */\n\t        this.input = this.output = new Tone.Gain();\n\t        /**\n\t\t\t *  A bound _soloed method\n\t\t\t *  @type  {Function}\n\t\t\t *  @private\n\t\t\t */\n\t        this._soloBind = this._soloed.bind(this);\n\t        //listen for solo events class-wide.\n\t        this.context.on('solo', this._soloBind);\n\t        //set initially\n\t        this.solo = options.solo;\n\t    };\n\t    Tone.extend(Tone.Solo, Tone.AudioNode);\n\t    /**\n\t\t *  The defaults\n\t\t *  @type  {Object}\n\t\t *  @static\n\t\t */\n\t    Tone.Solo.defaults = { solo: false };\n\t    /**\n\t\t *  Isolates this instance and mutes all other instances of Tone.Solo.\n\t\t *  Only one instance can be soloed at a time. A soloed\n\t\t *  instance will report `solo=false` when another instance is soloed.\n\t\t *  @memberOf Tone.Solo#\n\t\t *  @type {Boolean}\n\t\t *  @name solo\n\t\t */\n\t    Object.defineProperty(Tone.Solo.prototype, 'solo', {\n\t        get: function () {\n\t            return this._isSoloed();\n\t        },\n\t        set: function (solo) {\n\t            if (solo) {\n\t                this._addSolo();\n\t            } else {\n\t                this._removeSolo();\n\t            }\n\t            this.context.emit('solo', this);\n\t        }\n\t    });\n\t    /**\n\t\t *  If the current instance is muted, i.e. another instance is soloed\n\t\t *  @memberOf Tone.Solo#\n\t\t *  @type {Boolean}\n\t\t *  @name muted\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Solo.prototype, 'muted', {\n\t        get: function () {\n\t            return this.input.gain.value === 0;\n\t        }\n\t    });\n\t    /**\n\t\t * Add this to the soloed array\n\t\t * @private\n\t\t */\n\t    Tone.Solo.prototype._addSolo = function () {\n\t        if (!Tone.isArray(this.context._currentSolo)) {\n\t            this.context._currentSolo = [];\n\t        }\n\t        if (!this._isSoloed()) {\n\t            this.context._currentSolo.push(this);\n\t        }\n\t    };\n\t    /**\n\t\t * Remove this from the soloed array\n\t\t * @private\n\t\t */\n\t    Tone.Solo.prototype._removeSolo = function () {\n\t        if (this._isSoloed()) {\n\t            var index = this.context._currentSolo.indexOf(this);\n\t            this.context._currentSolo.splice(index, 1);\n\t        }\n\t    };\n\t    /**\n\t\t * @return {Boolean} Is this on the soloed array\n\t\t * @private\n\t\t */\n\t    Tone.Solo.prototype._isSoloed = function () {\n\t        if (Tone.isArray(this.context._currentSolo)) {\n\t            return this.context._currentSolo.length !== 0 && this.context._currentSolo.indexOf(this) !== -1;\n\t        } else {\n\t            return false;\n\t        }\n\t    };\n\t    /**\n\t\t * @return {Boolean} Returns true if no one is soloed\n\t\t * @private\n\t\t */\n\t    Tone.Solo.prototype._noSolos = function () {\n\t        return !Tone.isArray(this.context._currentSolo) || this.context._currentSolo.length === 0;\n\t    };\n\t    /**\n\t\t *  Solo the current instance and unsolo all other instances.\n\t\t *  @param  {Tone.Solo}  instance  The instance which is being soloed/unsoloed.\n\t\t *  @private\n\t\t */\n\t    Tone.Solo.prototype._soloed = function () {\n\t        if (this._isSoloed()) {\n\t            this.input.gain.value = 1;\n\t        } else if (this._noSolos()) {\n\t            //no one is soloed\n\t            this.input.gain.value = 1;\n\t        } else {\n\t            this.input.gain.value = 0;\n\t        }\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.Solo}  this\n\t\t */\n\t    Tone.Solo.prototype.dispose = function () {\n\t        this.context.off('solo', this._soloBind);\n\t        this._removeSolo();\n\t        this._soloBind = null;\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        return this;\n\t    };\n\t    return Tone.Solo;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class  Get the current waveform data of the connected audio source.\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Number=} size The size of the FFT. Value must be a power of\n\t\t *                       two in the range 32 to 32768.\n\t\t */\n\t    Tone.Waveform = function () {\n\t        var options = Tone.defaults(arguments, ['size'], Tone.Waveform);\n\t        options.type = Tone.Analyser.Type.Waveform;\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The analyser node.\n\t\t\t *  @private\n\t\t\t *  @type {Tone.Analyser}\n\t\t\t */\n\t        this._analyser = this.input = this.output = new Tone.Analyser(options);\n\t    };\n\t    Tone.extend(Tone.Waveform, Tone.AudioNode);\n\t    /**\n\t\t *  The default values.\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.Waveform.defaults = { 'size': 1024 };\n\t    /**\n\t\t *  Gets the waveform of the audio source. Returns the waveform data\n\t\t *  of length [size](#size) as a Float32Array with values between -1 and 1.\n\t\t *  @returns {TypedArray}\n\t\t */\n\t    Tone.Waveform.prototype.getValue = function () {\n\t        return this._analyser.getValue();\n\t    };\n\t    /**\n\t\t *  The size of analysis. This must be a power of two in the range 32 to 32768.\n\t\t *  @memberOf Tone.Waveform#\n\t\t *  @type {Number}\n\t\t *  @name size\n\t\t */\n\t    Object.defineProperty(Tone.Waveform.prototype, 'size', {\n\t        get: function () {\n\t            return this._analyser.size;\n\t        },\n\t        set: function (size) {\n\t            this._analyser.size = size;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.Waveform}  this\n\t\t */\n\t    Tone.Waveform.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._analyser.dispose();\n\t        this._analyser = null;\n\t    };\n\t    return Tone.Waveform;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.CtrlInterpolate will interpolate between given values based\n\t\t *         on the \"index\" property. Passing in an array or object literal\n\t\t *         will interpolate each of the parameters. Note (i.e. \"C3\")\n\t\t *         and Time (i.e. \"4n + 2\") can be interpolated. All other values are\n\t\t *         assumed to be numbers. \n\t\t *  @example\n\t\t * var interp = new Tone.CtrlInterpolate([0, 2, 9, 4]);\n\t\t * interp.index = 0.75;\n\t\t * interp.value; //returns 1.5\n\t\t *\n\t\t *  @example\n\t\t * var interp = new Tone.CtrlInterpolate([\n\t\t * \t[2, 4, 5],\n\t\t * \t[9, 3, 2],\n\t\t * ]);\n\t\t * @param {Array} values The array of values to interpolate over\n\t\t * @param {Positive} index The initial interpolation index.\n\t\t * @extends {Tone}\n\t\t */\n\t    Tone.CtrlInterpolate = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'values',\n\t            'index'\n\t        ], Tone.CtrlInterpolate);\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  The values to interpolate between\n\t\t\t *  @type  {Array}\n\t\t\t */\n\t        this.values = options.values;\n\t        /**\n\t\t\t *  The interpolated index between values. For example: a value of 1.5\n\t\t\t *  would interpolate equally between the value at index 1\n\t\t\t *  and the value at index 2. \n\t\t\t *  @example\n\t\t\t * interp.index = 0; \n\t\t\t * interp.value; //returns the value at 0\n\t\t\t * interp.index = 0.5;\n\t\t\t * interp.value; //returns the value between indices 0 and 1. \n\t\t\t *  @type  {Positive}\n\t\t\t */\n\t        this.index = options.index;\n\t    };\n\t    Tone.extend(Tone.CtrlInterpolate);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.CtrlInterpolate.defaults = {\n\t        'index': 0,\n\t        'values': []\n\t    };\n\t    /**\n\t\t *  The current interpolated value based on the index\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.CtrlInterpolate#\n\t\t *  @type {*}\n\t\t *  @name value\n\t\t */\n\t    Object.defineProperty(Tone.CtrlInterpolate.prototype, 'value', {\n\t        get: function () {\n\t            var index = this.index;\n\t            index = Math.min(index, this.values.length - 1);\n\t            var lowerPosition = Math.floor(index);\n\t            var lower = this.values[lowerPosition];\n\t            var upper = this.values[Math.ceil(index)];\n\t            return this._interpolate(index - lowerPosition, lower, upper);\n\t        }\n\t    });\n\t    /**\n\t\t *  Internal interpolation routine\n\t\t *  @param  {NormalRange}  index  The index between the lower and upper\n\t\t *  @param  {*}  lower \n\t\t *  @param  {*}  upper \n\t\t *  @return  {*}  The interpolated value\n\t\t *  @private\n\t\t */\n\t    Tone.CtrlInterpolate.prototype._interpolate = function (index, lower, upper) {\n\t        if (Tone.isArray(lower)) {\n\t            var retArray = [];\n\t            for (var i = 0; i < lower.length; i++) {\n\t                retArray[i] = this._interpolate(index, lower[i], upper[i]);\n\t            }\n\t            return retArray;\n\t        } else if (Tone.isObject(lower)) {\n\t            var retObj = {};\n\t            for (var attr in lower) {\n\t                retObj[attr] = this._interpolate(index, lower[attr], upper[attr]);\n\t            }\n\t            return retObj;\n\t        } else {\n\t            lower = this._toNumber(lower);\n\t            upper = this._toNumber(upper);\n\t            return (1 - index) * lower + index * upper;\n\t        }\n\t    };\n\t    /**\n\t\t *  Convert from the given type into a number\n\t\t *  @param  {Number|String}  value\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.CtrlInterpolate.prototype._toNumber = function (val) {\n\t        if (Tone.isNumber(val)) {\n\t            return val;\n\t        } else {\n\t            //otherwise assume that it's Time...\n\t            return this.toSeconds(val);\n\t        }\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.CtrlInterpolate}  this\n\t\t */\n\t    Tone.CtrlInterpolate.prototype.dispose = function () {\n\t        this.values = null;\n\t    };\n\t    return Tone.CtrlInterpolate;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.CtrlMarkov represents a Markov Chain where each call\n\t\t *         to Tone.CtrlMarkov.next will move to the next state. If the next\n\t\t *         state choice is an array, the next state is chosen randomly with\n\t\t *         even probability for all of the choices. For a weighted probability\n\t\t *         of the next choices, pass in an object with \"state\" and \"probability\" attributes. \n\t\t *         The probabilities will be normalized and then chosen. If no next options\n\t\t *         are given for the current state, the state will stay there. \n\t\t *  @extends {Tone}\n\t\t *  @example\n\t\t * var chain = new Tone.CtrlMarkov({\n\t\t * \t\"beginning\" : [\"end\", \"middle\"],\n\t\t * \t\"middle\" : \"end\"\n\t\t * });\n\t\t * chain.value = \"beginning\";\n\t\t * chain.next(); //returns \"end\" or \"middle\" with 50% probability\n\t\t *\n\t\t *  @example\n\t\t * var chain = new Tone.CtrlMarkov({\n\t\t * \t\"beginning\" : [{\"value\" : \"end\", \"probability\" : 0.8}, \n\t\t * \t\t\t\t\t{\"value\" : \"middle\", \"probability\" : 0.2}],\n\t\t * \t\"middle\" : \"end\"\n\t\t * });\n\t\t * chain.value = \"beginning\";\n\t\t * chain.next(); //returns \"end\" with 80% probability or \"middle\" with 20%.\n\t\t *  @param {Object} values An object with the state names as the keys\n\t\t *                         and the next state(s) as the values. \n\t\t */\n\t    Tone.CtrlMarkov = function (values, initial) {\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  The Markov values with states as the keys\n\t\t\t *  and next state(s) as the values. \n\t\t\t *  @type {Object}\n\t\t\t */\n\t        this.values = Tone.defaultArg(values, {});\n\t        /**\n\t\t\t *  The current state of the Markov values. The next\n\t\t\t *  state will be evaluated and returned when Tone.CtrlMarkov.next\n\t\t\t *  is invoked.\n\t\t\t *  @type {String}\n\t\t\t */\n\t        this.value = Tone.defaultArg(initial, Object.keys(this.values)[0]);\n\t    };\n\t    Tone.extend(Tone.CtrlMarkov);\n\t    /**\n\t\t *  Returns the next state of the Markov values. \n\t\t *  @return  {String}\n\t\t */\n\t    Tone.CtrlMarkov.prototype.next = function () {\n\t        if (this.values.hasOwnProperty(this.value)) {\n\t            var next = this.values[this.value];\n\t            if (Tone.isArray(next)) {\n\t                var distribution = this._getProbDistribution(next);\n\t                var rand = Math.random();\n\t                var total = 0;\n\t                for (var i = 0; i < distribution.length; i++) {\n\t                    var dist = distribution[i];\n\t                    if (rand > total && rand < total + dist) {\n\t                        var chosen = next[i];\n\t                        if (Tone.isObject(chosen)) {\n\t                            this.value = chosen.value;\n\t                        } else {\n\t                            this.value = chosen;\n\t                        }\n\t                    }\n\t                    total += dist;\n\t                }\n\t            } else {\n\t                this.value = next;\n\t            }\n\t        }\n\t        return this.value;\n\t    };\n\t    /**\n\t\t *  Choose randomly from an array weighted options in the form \n\t\t *  {\"state\" : string, \"probability\" : number} or an array of values\n\t\t *  @param  {Array}  options \n\t\t *  @return  {Array}  The randomly selected choice\n\t\t *  @private\n\t\t */\n\t    Tone.CtrlMarkov.prototype._getProbDistribution = function (options) {\n\t        var distribution = [];\n\t        var total = 0;\n\t        var needsNormalizing = false;\n\t        for (var i = 0; i < options.length; i++) {\n\t            var option = options[i];\n\t            if (Tone.isObject(option)) {\n\t                needsNormalizing = true;\n\t                distribution[i] = option.probability;\n\t            } else {\n\t                distribution[i] = 1 / options.length;\n\t            }\n\t            total += distribution[i];\n\t        }\n\t        if (needsNormalizing) {\n\t            //normalize the values\n\t            for (var j = 0; j < distribution.length; j++) {\n\t                distribution[j] = distribution[j] / total;\n\t            }\n\t        }\n\t        return distribution;\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.CtrlMarkov}  this\n\t\t */\n\t    Tone.CtrlMarkov.prototype.dispose = function () {\n\t        this.values = null;\n\t    };\n\t    return Tone.CtrlMarkov;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Generate patterns from an array of values.\n\t\t *         Has a number of arpeggiation and randomized\n\t\t *         selection patterns. \n\t\t *           <ul>\n\t\t *  \t        <li>\"up\" - cycles upward</li>\n\t\t *  \t\t\t<li>\"down\" - cycles downward</li>\n\t\t *  \t\t\t<li>\"upDown\" - up then and down</li>\n\t\t *  \t\t\t<li>\"downUp\" - cycles down then and up</li>\n\t\t *  \t\t\t<li>\"alternateUp\" - jump up two and down one</li>\n\t\t *  \t\t\t<li>\"alternateDown\" - jump down two and up one</li>\n\t\t *  \t\t\t<li>\"random\" - randomly select an index</li>\n\t\t *  \t\t\t<li>\"randomWalk\" - randomly moves one index away from the current position</li>\n\t\t *  \t\t\t<li>\"randomOnce\" - randomly select an index without repeating until all values have been chosen.</li>\n\t\t *     \t\t</ul>\n\t\t *  @param  {Array}  values   An array of options to choose from.\n\t\t *  @param  {Tone.CtrlPattern.Type=}  type  The name of the pattern.\n\t\t *  @extends {Tone}\n\t\t */\n\t    Tone.CtrlPattern = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'values',\n\t            'type'\n\t        ], Tone.CtrlPattern);\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  The array of values to arpeggiate over\n\t\t\t *  @type {Array}\n\t\t\t */\n\t        this.values = options.values;\n\t        /**\n\t\t\t *  The current position in the values array\n\t\t\t *  @type  {Number}\n\t\t\t */\n\t        this.index = 0;\n\t        /**\n\t\t\t *  The type placeholder\n\t\t\t *  @type {Tone.CtrlPattern.Type}\n\t\t\t *  @private\n\t\t\t */\n\t        this._type = null;\n\t        /**\n\t\t\t *  Shuffled values for the RandomOnce type\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._shuffled = null;\n\t        /**\n\t\t\t *  The direction of the movement\n\t\t\t *  @type {String}\n\t\t\t *  @private\n\t\t\t */\n\t        this._direction = null;\n\t        this.type = options.type;\n\t    };\n\t    Tone.extend(Tone.CtrlPattern);\n\t    /**\n\t\t *  The Control Patterns\n\t\t *  @type  {Object}\n\t\t *  @static\n\t\t */\n\t    Tone.CtrlPattern.Type = {\n\t        Up: 'up',\n\t        Down: 'down',\n\t        UpDown: 'upDown',\n\t        DownUp: 'downUp',\n\t        AlternateUp: 'alternateUp',\n\t        AlternateDown: 'alternateDown',\n\t        Random: 'random',\n\t        RandomWalk: 'randomWalk',\n\t        RandomOnce: 'randomOnce'\n\t    };\n\t    /**\n\t\t *  The default values. \n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.CtrlPattern.defaults = {\n\t        'type': Tone.CtrlPattern.Type.Up,\n\t        'values': []\n\t    };\n\t    /**\n\t\t *  The value at the current index of the pattern.\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.CtrlPattern#\n\t\t *  @type {*}\n\t\t *  @name value\n\t\t */\n\t    Object.defineProperty(Tone.CtrlPattern.prototype, 'value', {\n\t        get: function () {\n\t            //some safeguards\n\t            if (this.values.length === 0) {\n\t                return;\n\t            } else if (this.values.length === 1) {\n\t                return this.values[0];\n\t            }\n\t            this.index = Math.min(this.index, this.values.length - 1);\n\t            var val = this.values[this.index];\n\t            if (this.type === Tone.CtrlPattern.Type.RandomOnce) {\n\t                if (this.values.length !== this._shuffled.length) {\n\t                    this._shuffleValues();\n\t                }\n\t                val = this.values[this._shuffled[this.index]];\n\t            }\n\t            return val;\n\t        }\n\t    });\n\t    /**\n\t\t *  The pattern used to select the next\n\t\t *  item from the values array\n\t\t *  @memberOf Tone.CtrlPattern#\n\t\t *  @type {Tone.CtrlPattern.Type}\n\t\t *  @name type\n\t\t */\n\t    Object.defineProperty(Tone.CtrlPattern.prototype, 'type', {\n\t        get: function () {\n\t            return this._type;\n\t        },\n\t        set: function (type) {\n\t            this._type = type;\n\t            this._shuffled = null;\n\t            //the first index\n\t            if (this._type === Tone.CtrlPattern.Type.Up || this._type === Tone.CtrlPattern.Type.UpDown || this._type === Tone.CtrlPattern.Type.RandomOnce || this._type === Tone.CtrlPattern.Type.AlternateUp) {\n\t                this.index = 0;\n\t            } else if (this._type === Tone.CtrlPattern.Type.Down || this._type === Tone.CtrlPattern.Type.DownUp || this._type === Tone.CtrlPattern.Type.AlternateDown) {\n\t                this.index = this.values.length - 1;\n\t            }\n\t            //the direction\n\t            if (this._type === Tone.CtrlPattern.Type.UpDown || this._type === Tone.CtrlPattern.Type.AlternateUp) {\n\t                this._direction = Tone.CtrlPattern.Type.Up;\n\t            } else if (this._type === Tone.CtrlPattern.Type.DownUp || this._type === Tone.CtrlPattern.Type.AlternateDown) {\n\t                this._direction = Tone.CtrlPattern.Type.Down;\n\t            }\n\t            //randoms\n\t            if (this._type === Tone.CtrlPattern.Type.RandomOnce) {\n\t                this._shuffleValues();\n\t            } else if (this._type === Tone.CtrlPattern.Random) {\n\t                this.index = Math.floor(Math.random() * this.values.length);\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Return the next value given the current position\n\t\t *  and pattern.\n\t\t *  @return {*} The next value\n\t\t */\n\t    Tone.CtrlPattern.prototype.next = function () {\n\t        var type = this.type;\n\t        //choose the next index\n\t        if (type === Tone.CtrlPattern.Type.Up) {\n\t            this.index++;\n\t            if (this.index >= this.values.length) {\n\t                this.index = 0;\n\t            }\n\t        } else if (type === Tone.CtrlPattern.Type.Down) {\n\t            this.index--;\n\t            if (this.index < 0) {\n\t                this.index = this.values.length - 1;\n\t            }\n\t        } else if (type === Tone.CtrlPattern.Type.UpDown || type === Tone.CtrlPattern.Type.DownUp) {\n\t            if (this._direction === Tone.CtrlPattern.Type.Up) {\n\t                this.index++;\n\t            } else {\n\t                this.index--;\n\t            }\n\t            if (this.index < 0) {\n\t                this.index = 1;\n\t                this._direction = Tone.CtrlPattern.Type.Up;\n\t            } else if (this.index >= this.values.length) {\n\t                this.index = this.values.length - 2;\n\t                this._direction = Tone.CtrlPattern.Type.Down;\n\t            }\n\t        } else if (type === Tone.CtrlPattern.Type.Random) {\n\t            this.index = Math.floor(Math.random() * this.values.length);\n\t        } else if (type === Tone.CtrlPattern.Type.RandomWalk) {\n\t            if (Math.random() < 0.5) {\n\t                this.index--;\n\t                this.index = Math.max(this.index, 0);\n\t            } else {\n\t                this.index++;\n\t                this.index = Math.min(this.index, this.values.length - 1);\n\t            }\n\t        } else if (type === Tone.CtrlPattern.Type.RandomOnce) {\n\t            this.index++;\n\t            if (this.index >= this.values.length) {\n\t                this.index = 0;\n\t                //reshuffle the values for next time\n\t                this._shuffleValues();\n\t            }\n\t        } else if (type === Tone.CtrlPattern.Type.AlternateUp) {\n\t            if (this._direction === Tone.CtrlPattern.Type.Up) {\n\t                this.index += 2;\n\t                this._direction = Tone.CtrlPattern.Type.Down;\n\t            } else {\n\t                this.index -= 1;\n\t                this._direction = Tone.CtrlPattern.Type.Up;\n\t            }\n\t            if (this.index >= this.values.length) {\n\t                this.index = 0;\n\t                this._direction = Tone.CtrlPattern.Type.Up;\n\t            }\n\t        } else if (type === Tone.CtrlPattern.Type.AlternateDown) {\n\t            if (this._direction === Tone.CtrlPattern.Type.Up) {\n\t                this.index += 1;\n\t                this._direction = Tone.CtrlPattern.Type.Down;\n\t            } else {\n\t                this.index -= 2;\n\t                this._direction = Tone.CtrlPattern.Type.Up;\n\t            }\n\t            if (this.index < 0) {\n\t                this.index = this.values.length - 1;\n\t                this._direction = Tone.CtrlPattern.Type.Down;\n\t            }\n\t        }\n\t        return this.value;\n\t    };\n\t    /**\n\t\t *  Shuffles the values and places the results into the _shuffled\n\t\t *  @private\n\t\t */\n\t    Tone.CtrlPattern.prototype._shuffleValues = function () {\n\t        var copy = [];\n\t        this._shuffled = [];\n\t        for (var i = 0; i < this.values.length; i++) {\n\t            copy[i] = i;\n\t        }\n\t        while (copy.length > 0) {\n\t            var randVal = copy.splice(Math.floor(copy.length * Math.random()), 1);\n\t            this._shuffled.push(randVal[0]);\n\t        }\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @returns {Tone.CtrlPattern} this\n\t\t */\n\t    Tone.CtrlPattern.prototype.dispose = function () {\n\t        this._shuffled = null;\n\t        this.values = null;\n\t    };\n\t    return Tone.CtrlPattern;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Choose a random value.\n\t\t *  @extends {Tone}\n\t\t *  @example\n\t\t * var randomWalk = new Tone.CtrlRandom({\n\t\t * \t\"min\" : 0,\n\t\t * \t\"max\" : 10,\n\t\t * \t\"integer\" : true\n\t\t * });\n\t\t * randomWalk.eval();\n\t\t *\n\t\t *  @param {Number|Time=} min The minimum return value.\n\t\t *  @param {Number|Time=} max The maximum return value.\n\t\t */\n\t    Tone.CtrlRandom = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'min',\n\t            'max'\n\t        ], Tone.CtrlRandom);\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  The minimum return value\n\t\t\t *  @type  {Number|Time}\n\t\t\t */\n\t        this.min = options.min;\n\t        /**\n\t\t\t *  The maximum return value\n\t\t\t *  @type  {Number|Time}\n\t\t\t */\n\t        this.max = options.max;\n\t        /**\n\t\t\t *  If the return value should be an integer\n\t\t\t *  @type  {Boolean}\n\t\t\t */\n\t        this.integer = options.integer;\n\t    };\n\t    Tone.extend(Tone.CtrlRandom);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.CtrlRandom.defaults = {\n\t        'min': 0,\n\t        'max': 1,\n\t        'integer': false\n\t    };\n\t    /**\n\t\t *  Return a random value between min and max. \n\t\t *  @readOnly\n\t\t *  @memberOf Tone.CtrlRandom#\n\t\t *  @type {*}\n\t\t *  @name value\n\t\t */\n\t    Object.defineProperty(Tone.CtrlRandom.prototype, 'value', {\n\t        get: function () {\n\t            var min = this.toSeconds(this.min);\n\t            var max = this.toSeconds(this.max);\n\t            var rand = Math.random();\n\t            var val = rand * min + (1 - rand) * max;\n\t            if (this.integer) {\n\t                val = Math.floor(val);\n\t            }\n\t            return val;\n\t        }\n\t    });\n\t    return Tone.CtrlRandom;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class A data structure for holding multiple buffers.\n\t\t *  \n\t\t *  @param  {Object|Array}    urls      An object literal or array\n\t\t *                                      of urls to load.\n\t\t *  @param  {Function=}  callback  The callback to invoke when\n\t\t *                                 the buffers are loaded. \n\t\t *  @extends {Tone}\n\t\t *  @example\n\t\t * //load a whole bank of piano samples\n\t\t * var pianoSamples = new Tone.Buffers({\n\t\t * \t\"C4\" : \"path/to/C4.mp3\"\n\t\t * \t\"C#4\" : \"path/to/C#4.mp3\"\n\t\t * \t\"D4\" : \"path/to/D4.mp3\"\n\t\t * \t\"D#4\" : \"path/to/D#4.mp3\"\n\t\t * \t...\n\t\t * }, function(){\n\t\t * \t//play one of the samples when they all load\n\t\t * \tplayer.buffer = pianoSamples.get(\"C4\");\n\t\t * \tplayer.start();\n\t\t * });\n\t\t * \t@example\n\t\t * //To pass in additional parameters in the second parameter\n\t\t * var buffers = new Tone.Buffers(urls, {\n\t\t * \t\"onload\" : callback,\n\t\t * \t\"baseUrl\" : \"../path/to/audio/\"\n\t\t * })\n\t\t */\n\t    Tone.Buffers = function (urls) {\n\t        //remove the urls from the options\n\t        var args = Array.prototype.slice.call(arguments);\n\t        args.shift();\n\t        var options = Tone.defaults(args, [\n\t            'onload',\n\t            'baseUrl'\n\t        ], Tone.Buffers);\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  All of the buffers\n\t\t\t *  @type  {Object}\n\t\t\t *  @private\n\t\t\t */\n\t        this._buffers = {};\n\t        /**\n\t\t\t *  A path which is prefixed before every url.\n\t\t\t *  @type  {String}\n\t\t\t */\n\t        this.baseUrl = options.baseUrl;\n\t        this._loadingCount = 0;\n\t        //add each one\n\t        for (var key in urls) {\n\t            this._loadingCount++;\n\t            this.add(key, urls[key], this._bufferLoaded.bind(this, options.onload));\n\t        }\n\t    };\n\t    Tone.extend(Tone.Buffers);\n\t    /**\n\t\t *  Defaults\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.Buffers.defaults = {\n\t        'onload': Tone.noOp,\n\t        'baseUrl': ''\n\t    };\n\t    /**\n\t\t *  True if the buffers object has a buffer by that name.\n\t\t *  @param  {String|Number}  name  The key or index of the \n\t\t *                                 buffer.\n\t\t *  @return  {Boolean}\n\t\t */\n\t    Tone.Buffers.prototype.has = function (name) {\n\t        return this._buffers.hasOwnProperty(name);\n\t    };\n\t    /**\n\t\t *  Get a buffer by name. If an array was loaded, \n\t\t *  then use the array index.\n\t\t *  @param  {String|Number}  name  The key or index of the \n\t\t *                                 buffer.\n\t\t *  @return  {Tone.Buffer}\n\t\t */\n\t    Tone.Buffers.prototype.get = function (name) {\n\t        if (this.has(name)) {\n\t            return this._buffers[name];\n\t        } else {\n\t            throw new Error('Tone.Buffers: no buffer named ' + name);\n\t        }\n\t    };\n\t    /**\n\t\t *  A buffer was loaded. decrement the counter.\n\t\t *  @param  {Function}  callback \n\t\t *  @private\n\t\t */\n\t    Tone.Buffers.prototype._bufferLoaded = function (callback) {\n\t        this._loadingCount--;\n\t        if (this._loadingCount === 0 && callback) {\n\t            callback(this);\n\t        }\n\t    };\n\t    /**\n\t\t * If the buffers are loaded or not\n\t\t * @memberOf Tone.Buffers#\n\t\t * @type {Boolean}\n\t\t * @name loaded\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Buffers.prototype, 'loaded', {\n\t        get: function () {\n\t            var isLoaded = true;\n\t            for (var buffName in this._buffers) {\n\t                var buff = this.get(buffName);\n\t                isLoaded = isLoaded && buff.loaded;\n\t            }\n\t            return isLoaded;\n\t        }\n\t    });\n\t    /**\n\t\t *  Add a buffer by name and url to the Buffers\n\t\t *  @param  {String}    name      A unique name to give\n\t\t *                                the buffer\n\t\t *  @param  {String|Tone.Buffer|Audiobuffer}  url  Either the url of the bufer, \n\t\t *                                                 or a buffer which will be added\n\t\t *                                                 with the given name.\n\t\t *  @param  {Function=}  callback  The callback to invoke \n\t\t *                                 when the url is loaded.\n\t\t */\n\t    Tone.Buffers.prototype.add = function (name, url, callback) {\n\t        callback = Tone.defaultArg(callback, Tone.noOp);\n\t        if (url instanceof Tone.Buffer) {\n\t            this._buffers[name] = url;\n\t            callback(this);\n\t        } else if (url instanceof AudioBuffer) {\n\t            this._buffers[name] = new Tone.Buffer(url);\n\t            callback(this);\n\t        } else if (Tone.isString(url)) {\n\t            this._buffers[name] = new Tone.Buffer(this.baseUrl + url, callback);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.Buffers} this\n\t\t */\n\t    Tone.Buffers.prototype.dispose = function () {\n\t        Tone.prototype.dispose.call(this);\n\t        for (var name in this._buffers) {\n\t            this._buffers[name].dispose();\n\t        }\n\t        this._buffers = null;\n\t        return this;\n\t    };\n\t    return Tone.Buffers;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  buses are another way of routing audio\n\t\t *\n\t\t *  augments Tone.prototype to include send and recieve\n\t\t */\n\t    /**\n\t\t *  All of the routes\n\t\t *\n\t\t *  @type {Object}\n\t\t *  @static\n\t\t *  @private\n\t\t */\n\t    var Buses = {};\n\t    /**\n\t\t *  Send this signal to the channel name.\n\t\t *  @param  {String} channelName A named channel to send the signal to.\n\t\t *  @param  {Decibels} amount The amount of the source to send to the bus.\n\t\t *  @return {GainNode} The gain node which connects this node to the desired channel.\n\t\t *                     Can be used to adjust the levels of the send.\n\t\t *  @example\n\t\t * source.send(\"reverb\", -12);\n\t\t */\n\t    Tone.prototype.send = function (channelName, amount) {\n\t        if (!Buses.hasOwnProperty(channelName)) {\n\t            Buses[channelName] = this.context.createGain();\n\t        }\n\t        amount = Tone.defaultArg(amount, 0);\n\t        var sendKnob = new Tone.Gain(amount, Tone.Type.Decibels);\n\t        this.connect(sendKnob);\n\t        sendKnob.connect(Buses[channelName]);\n\t        return sendKnob;\n\t    };\n\t    /**\n\t\t *  Recieve the input from the desired channelName to the input\n\t\t *\n\t\t *  @param  {String} channelName A named channel to send the signal to.\n\t\t *  @param  {Number=} channelNumber The channel to connect to\n\t\t *  @returns {Tone} this\n\t\t *  @example\n\t\t * reverbEffect.receive(\"reverb\");\n\t\t */\n\t    Tone.prototype.receive = function (channelName, inputNum) {\n\t        if (!Buses.hasOwnProperty(channelName)) {\n\t            Buses[channelName] = this.context.createGain();\n\t        }\n\t        Buses[channelName].connect(this, 0, inputNum);\n\t        return this;\n\t    };\n\t    //remove all the send/receives when a new audio context is passed in\n\t    Tone.Context.on('init', function (context) {\n\t        if (context.Buses) {\n\t            Buses = context.Buses;\n\t        } else {\n\t            Buses = {};\n\t            context.Buses = Buses;\n\t        }\n\t    });\n\t    return Tone;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Draw is useful for synchronizing visuals and audio events.\n\t\t *         Callbacks from Tone.Transport or any of the Tone.Event classes\n\t\t *         always happen _before_ the scheduled time and are not synchronized\n\t\t *         to the animation frame so they are not good for triggering tightly\n\t\t *         synchronized visuals and sound. Tone.Draw makes it easy to schedule\n\t\t *         callbacks using the AudioContext time and uses requestAnimationFrame.\n\t\t *         \n\t\t *  @singleton\n\t\t *  @extends {Tone}\n\t\t *  @example\n\t\t * Tone.Transport.schedule(function(time){\n\t\t * \t//use the time argument to schedule a callback with Tone.Draw\n\t\t * \tTone.Draw.schedule(function(){\n\t\t * \t\t//do drawing or DOM manipulation here\n\t\t * \t}, time)\n\t\t * }, \"+0.5\")\n\t\t */\n\t    Tone.Draw = function () {\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  All of the events.\n\t\t\t *  @type  {Tone.Timeline}\n\t\t\t *  @private\n\t\t\t */\n\t        this._events = new Tone.Timeline();\n\t        /**\n\t\t\t *  The duration after which events are not invoked.\n\t\t\t *  @type  {Number}\n\t\t\t *  @default 0.25\n\t\t\t */\n\t        this.expiration = 0.25;\n\t        /**\n\t\t\t *  The amount of time before the scheduled time \n\t\t\t *  that the callback can be invoked. Default is\n\t\t\t *  half the time of an animation frame (0.008 seconds).\n\t\t\t *  @type  {Number}\n\t\t\t *  @default 0.008\n\t\t\t */\n\t        this.anticipation = 0.008;\n\t        /**\n\t\t\t *  The draw loop\n\t\t\t *  @type  {Function}\n\t\t\t *  @private\n\t\t\t */\n\t        this._boundDrawLoop = this._drawLoop.bind(this);\n\t    };\n\t    Tone.extend(Tone.Draw);\n\t    /**\n\t\t *  Schedule a function at the given time to be invoked\n\t\t *  on the nearest animation frame.\n\t\t *  @param  {Function}  callback  Callback is invoked at the given time.\n\t\t *  @param  {Time}    time      The time relative to the AudioContext time\n\t\t *                              to invoke the callback.\n\t\t *  @return  {Tone.Draw}    this\n\t\t */\n\t    Tone.Draw.prototype.schedule = function (callback, time) {\n\t        this._events.add({\n\t            callback: callback,\n\t            time: this.toSeconds(time)\n\t        });\n\t        //start the draw loop on the first event\n\t        if (this._events.length === 1) {\n\t            requestAnimationFrame(this._boundDrawLoop);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancel events scheduled after the given time\n\t\t *  @param  {Time=}  after  Time after which scheduled events will \n\t\t *                          be removed from the scheduling timeline.\n\t\t *  @return  {Tone.Draw}  this\n\t\t */\n\t    Tone.Draw.prototype.cancel = function (after) {\n\t        this._events.cancel(this.toSeconds(after));\n\t        return this;\n\t    };\n\t    /**\n\t\t *  The draw loop\n\t\t *  @private\n\t\t */\n\t    Tone.Draw.prototype._drawLoop = function () {\n\t        var now = Tone.now();\n\t        while (this._events.length && this._events.peek().time - this.anticipation <= now) {\n\t            var event = this._events.shift();\n\t            if (now - event.time <= this.expiration) {\n\t                event.callback();\n\t            }\n\t        }\n\t        if (this._events.length > 0) {\n\t            requestAnimationFrame(this._boundDrawLoop);\n\t        }\n\t    };\n\t    //make a singleton\n\t    Tone.Draw = new Tone.Draw();\n\t    return Tone.Draw;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Both Tone.Panner3D and Tone.Listener have a position in 3D space\n\t\t *          using a right-handed cartesian coordinate system.\n\t\t *          The units used in the coordinate system are not defined;\n\t\t *          these coordinates are independent/invariant of any particular\n\t\t *          units such as meters or feet. Tone.Panner3D objects have an forward\n\t\t *          vector representing the direction the sound is projecting. Additionally,\n\t\t *          they have a sound cone representing how directional the sound is.\n\t\t *          For example, the sound could be omnidirectional, in which case it would\n\t\t *          be heard anywhere regardless of its forward, or it can be more directional\n\t\t *          and heard only if it is facing the listener. Tone.Listener objects\n\t\t *          (representing a person's ears) have an forward and up vector\n\t\t *          representing in which direction the person is facing. Because both the\n\t\t *          source stream and the listener can be moving, they both have a velocity\n\t\t *          vector representing both the speed and direction of movement. Taken together,\n\t\t *          these two velocities can be used to generate a doppler shift effect which changes the pitch.\n\t\t *          <br><br>\n\t\t *          Note: the position of the Listener will have no effect on nodes not connected to a Tone.Panner3D\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone}\n\t\t *  @singleton\n\t\t */\n\t    Tone.Listener = function () {\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  Holds the current forward orientation\n\t\t\t *  @type  {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._orientation = [\n\t            0,\n\t            0,\n\t            0,\n\t            0,\n\t            0,\n\t            0\n\t        ];\n\t        /**\n\t\t\t *  Holds the current position\n\t\t\t *  @type  {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._position = [\n\t            0,\n\t            0,\n\t            0\n\t        ];\n\t        Tone.getContext(function () {\n\t            // set the default position/forward\n\t            this.set(ListenerConstructor.defaults);\n\t        }.bind(this));\n\t    };\n\t    Tone.extend(Tone.Listener);\n\t    /**\n\t\t *  Defaults according to the specification\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Listener.defaults = {\n\t        'positionX': 0,\n\t        'positionY': 0,\n\t        'positionZ': 0,\n\t        'forwardX': 0,\n\t        'forwardY': 0,\n\t        'forwardZ': 1,\n\t        'upX': 0,\n\t        'upY': 1,\n\t        'upZ': 0\n\t    };\n\t    /**\n\t\t * The ramp time which is applied to the setTargetAtTime\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t    Tone.Listener.prototype._rampTimeConstant = 0.01;\n\t    /**\n\t\t *  Sets the position of the listener in 3d space.\n\t\t *  @param  {Number}  x\n\t\t *  @param  {Number}  y\n\t\t *  @param  {Number}  z\n\t\t *  @return {Tone.Listener} this\n\t\t */\n\t    Tone.Listener.prototype.setPosition = function (x, y, z) {\n\t        if (this.context.listener.positionX) {\n\t            var now = this.now();\n\t            this.context.listener.positionX.setTargetAtTime(x, now, this._rampTimeConstant);\n\t            this.context.listener.positionY.setTargetAtTime(y, now, this._rampTimeConstant);\n\t            this.context.listener.positionZ.setTargetAtTime(z, now, this._rampTimeConstant);\n\t        } else {\n\t            this.context.listener.setPosition(x, y, z);\n\t        }\n\t        this._position = Array.prototype.slice.call(arguments);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Sets the orientation of the listener using two vectors, the forward\n\t\t *  vector (which direction the listener is facing) and the up vector\n\t\t *  (which the up direction of the listener). An up vector\n\t\t *  of 0, 0, 1 is equivalent to the listener standing up in the Z direction.\n\t\t *  @param  {Number}  x\n\t\t *  @param  {Number}  y\n\t\t *  @param  {Number}  z\n\t\t *  @param  {Number}  upX\n\t\t *  @param  {Number}  upY\n\t\t *  @param  {Number}  upZ\n\t\t *  @return {Tone.Listener} this\n\t\t */\n\t    Tone.Listener.prototype.setOrientation = function (x, y, z, upX, upY, upZ) {\n\t        if (this.context.listener.forwardX) {\n\t            var now = this.now();\n\t            this.context.listener.forwardX.setTargetAtTime(x, now, this._rampTimeConstant);\n\t            this.context.listener.forwardY.setTargetAtTime(y, now, this._rampTimeConstant);\n\t            this.context.listener.forwardZ.setTargetAtTime(z, now, this._rampTimeConstant);\n\t            this.context.listener.upX.setTargetAtTime(upX, now, this._rampTimeConstant);\n\t            this.context.listener.upY.setTargetAtTime(upY, now, this._rampTimeConstant);\n\t            this.context.listener.upZ.setTargetAtTime(upZ, now, this._rampTimeConstant);\n\t        } else {\n\t            this.context.listener.setOrientation(x, y, z, upX, upY, upZ);\n\t        }\n\t        this._orientation = Array.prototype.slice.call(arguments);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  The x position of the panner object.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Listener#\n\t\t *  @name positionX\n\t\t */\n\t    Object.defineProperty(Tone.Listener.prototype, 'positionX', {\n\t        set: function (pos) {\n\t            this._position[0] = pos;\n\t            this.setPosition.apply(this, this._position);\n\t        },\n\t        get: function () {\n\t            return this._position[0];\n\t        }\n\t    });\n\t    /**\n\t\t *  The y position of the panner object.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Listener#\n\t\t *  @name positionY\n\t\t */\n\t    Object.defineProperty(Tone.Listener.prototype, 'positionY', {\n\t        set: function (pos) {\n\t            this._position[1] = pos;\n\t            this.setPosition.apply(this, this._position);\n\t        },\n\t        get: function () {\n\t            return this._position[1];\n\t        }\n\t    });\n\t    /**\n\t\t *  The z position of the panner object.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Listener#\n\t\t *  @name positionZ\n\t\t */\n\t    Object.defineProperty(Tone.Listener.prototype, 'positionZ', {\n\t        set: function (pos) {\n\t            this._position[2] = pos;\n\t            this.setPosition.apply(this, this._position);\n\t        },\n\t        get: function () {\n\t            return this._position[2];\n\t        }\n\t    });\n\t    /**\n\t\t *  The x coordinate of the listeners front direction. i.e.\n\t\t *  which way they are facing.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Listener#\n\t\t *  @name forwardX\n\t\t */\n\t    Object.defineProperty(Tone.Listener.prototype, 'forwardX', {\n\t        set: function (pos) {\n\t            this._orientation[0] = pos;\n\t            this.setOrientation.apply(this, this._orientation);\n\t        },\n\t        get: function () {\n\t            return this._orientation[0];\n\t        }\n\t    });\n\t    /**\n\t\t *  The y coordinate of the listeners front direction. i.e.\n\t\t *  which way they are facing.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Listener#\n\t\t *  @name forwardY\n\t\t */\n\t    Object.defineProperty(Tone.Listener.prototype, 'forwardY', {\n\t        set: function (pos) {\n\t            this._orientation[1] = pos;\n\t            this.setOrientation.apply(this, this._orientation);\n\t        },\n\t        get: function () {\n\t            return this._orientation[1];\n\t        }\n\t    });\n\t    /**\n\t\t *  The z coordinate of the listeners front direction. i.e.\n\t\t *  which way they are facing.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Listener#\n\t\t *  @name forwardZ\n\t\t */\n\t    Object.defineProperty(Tone.Listener.prototype, 'forwardZ', {\n\t        set: function (pos) {\n\t            this._orientation[2] = pos;\n\t            this.setOrientation.apply(this, this._orientation);\n\t        },\n\t        get: function () {\n\t            return this._orientation[2];\n\t        }\n\t    });\n\t    /**\n\t\t *  The x coordinate of the listener's up direction. i.e.\n\t\t *  the direction the listener is standing in.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Listener#\n\t\t *  @name upX\n\t\t */\n\t    Object.defineProperty(Tone.Listener.prototype, 'upX', {\n\t        set: function (pos) {\n\t            this._orientation[3] = pos;\n\t            this.setOrientation.apply(this, this._orientation);\n\t        },\n\t        get: function () {\n\t            return this._orientation[3];\n\t        }\n\t    });\n\t    /**\n\t\t *  The y coordinate of the listener's up direction. i.e.\n\t\t *  the direction the listener is standing in.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Listener#\n\t\t *  @name upY\n\t\t */\n\t    Object.defineProperty(Tone.Listener.prototype, 'upY', {\n\t        set: function (pos) {\n\t            this._orientation[4] = pos;\n\t            this.setOrientation.apply(this, this._orientation);\n\t        },\n\t        get: function () {\n\t            return this._orientation[4];\n\t        }\n\t    });\n\t    /**\n\t\t *  The z coordinate of the listener's up direction. i.e.\n\t\t *  the direction the listener is standing in.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Listener#\n\t\t *  @name upZ\n\t\t */\n\t    Object.defineProperty(Tone.Listener.prototype, 'upZ', {\n\t        set: function (pos) {\n\t            this._orientation[5] = pos;\n\t            this.setOrientation.apply(this, this._orientation);\n\t        },\n\t        get: function () {\n\t            return this._orientation[5];\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Listener} this\n\t\t */\n\t    Tone.Listener.prototype.dispose = function () {\n\t        this._orientation = null;\n\t        this._position = null;\n\t        return this;\n\t    };\n\t    //SINGLETON SETUP\n\t    var ListenerConstructor = Tone.Listener;\n\t    Tone.Listener = new ListenerConstructor();\n\t    Tone.Context.on('init', function (context) {\n\t        if (context.Listener instanceof ListenerConstructor) {\n\t            //a single listener object\n\t            Tone.Listener = context.Listener;\n\t        } else {\n\t            //make new Listener insides\n\t            Tone.Listener = new ListenerConstructor();\n\t        }\n\t        context.Listener = Tone.Listener;\n\t    });\n\t    //END SINGLETON SETUP\n\t    return Tone.Listener;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t * Because of a bug in iOS causing the currentTime to increment\n\t\t * before the rendering is started, sometimes it takes multiple\n\t\t * attempts to render the audio correctly.\n\t\t * @private\n\t\t */\n\t    function attemptRender(callback, duration, sampleRate, tries) {\n\t        tries = Tone.defaultArg(tries, 0);\n\t        var context = new Tone.OfflineContext(2, duration, sampleRate);\n\t        Tone.context = context;\n\t        //invoke the callback/scheduling\n\t        var response = callback(Tone.Transport);\n\t        if (context.currentTime > 0 && tries < 1000) {\n\t            return attemptRender(callback, duration, sampleRate, ++tries);\n\t        } else {\n\t            return {\n\t                'response': response,\n\t                'context': context\n\t            };\n\t        }\n\t    }\n\t    /**\n\t\t *  Generate a buffer by rendering all of the Tone.js code within the callback using the OfflineAudioContext.\n\t\t *  The OfflineAudioContext is capable of rendering much faster than real time in many cases.\n\t\t *  The callback function also passes in an offline instance of Tone.Transport which can be used\n\t\t *  to schedule events along the Transport. **NOTE** OfflineAudioContext has the same restrictions\n\t\t *  as the AudioContext in that on certain platforms (like iOS) it must be invoked by an explicit\n\t\t *  user action like a click or tap. \n\t\t *  @param  {Function}  callback  All Tone.js nodes which are created and scheduled within this callback are recorded into the output Buffer.\n\t\t *  @param  {Time}  duration     the amount of time to record for.\n\t\t *  @return  {Promise}  The promise which is invoked with the Tone.Buffer of the recorded output.\n\t\t *  @example\n\t\t * //render 2 seconds of the oscillator\n\t\t * Tone.Offline(function(){\n\t\t * \t//only nodes created in this callback will be recorded\n\t\t * \tvar oscillator = new Tone.Oscillator().toMaster().start(0)\n\t\t * \t//schedule their events\n\t\t * }, 2).then(function(buffer){\n\t\t * \t//do something with the output buffer\n\t\t * })\n\t\t * @example\n\t\t * //can also schedule events along the Transport\n\t\t * //using the passed in Offline Transport\n\t\t * Tone.Offline(function(Transport){\n\t\t * \tvar osc = new Tone.Oscillator().toMaster()\n\t\t * \tTransport.schedule(function(time){\n\t\t * \t\tosc.start(time).stop(time + 0.1)\n\t\t * \t}, 1)\n\t\t * \tTransport.start(0.2)\n\t\t * }, 4).then(function(buffer){\n\t\t * \t//do something with the output buffer\n\t\t * })\n\t\t */\n\t    Tone.Offline = function (callback, duration) {\n\t        //set the OfflineAudioContext\n\t        var sampleRate = Tone.context.sampleRate;\n\t        var originalContext = Tone.context;\n\t        var renderRet = attemptRender(callback, duration, sampleRate);\n\t        var response = renderRet.response;\n\t        var context = renderRet.context;\n\t        var ret;\n\t        if (response instanceof Promise) {\n\t            //wait for the promise to resolve\n\t            ret = response.then(function () {\n\t                //then render the audio\n\t                return context.render();\n\t            });\n\t        } else {\n\t            //process the audio\n\t            ret = context.render();\n\t        }\n\t        //return the original AudioContext\n\t        Tone.context = originalContext;\n\t        //return the audio\n\t        return ret.then(function (buffer) {\n\t            //wrap it in a Tone.Buffer\n\t            return new Tone.Buffer(buffer);\n\t        });\n\t    };\n\t    return Tone.Offline;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t * \t@class  Tone.Effect is the base class for effects. Connect the effect between\n\t\t * \t        the effectSend and effectReturn GainNodes, then control the amount of\n\t\t * \t        effect which goes to the output using the wet control.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {NormalRange|Object} [wet] The starting wet value.\n\t\t */\n\t    Tone.Effect = function () {\n\t        var options = Tone.defaults(arguments, ['wet'], Tone.Effect);\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(1, 1);\n\t        /**\n\t\t\t *  the drywet knob to control the amount of effect\n\t\t\t *  @type {Tone.CrossFade}\n\t\t\t *  @private\n\t\t\t */\n\t        this._dryWet = new Tone.CrossFade(options.wet);\n\t        /**\n\t\t\t *  The wet control is how much of the effected\n\t\t\t *  will pass through to the output. 1 = 100% effected\n\t\t\t *  signal, 0 = 100% dry signal.\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.wet = this._dryWet.fade;\n\t        /**\n\t\t\t *  connect the effectSend to the input of hte effect\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this.effectSend = new Tone.Gain();\n\t        /**\n\t\t\t *  connect the output of the effect to the effectReturn\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this.effectReturn = new Tone.Gain();\n\t        //connections\n\t        this.input.connect(this._dryWet.a);\n\t        this.input.connect(this.effectSend);\n\t        this.effectReturn.connect(this._dryWet.b);\n\t        this._dryWet.connect(this.output);\n\t        this._readOnly(['wet']);\n\t    };\n\t    Tone.extend(Tone.Effect, Tone.AudioNode);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Effect.defaults = { 'wet': 1 };\n\t    /**\n\t\t *  chains the effect in between the effectSend and effectReturn\n\t\t *  @param  {Tone} effect\n\t\t *  @private\n\t\t *  @returns {Tone.Effect} this\n\t\t */\n\t    Tone.Effect.prototype.connectEffect = function (effect) {\n\t        this.effectSend.chain(effect, this.effectReturn);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Effect} this\n\t\t */\n\t    Tone.Effect.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._dryWet.dispose();\n\t        this._dryWet = null;\n\t        this.effectSend.dispose();\n\t        this.effectSend = null;\n\t        this.effectReturn.dispose();\n\t        this.effectReturn = null;\n\t        this._writable(['wet']);\n\t        this.wet = null;\n\t        return this;\n\t    };\n\t    return Tone.Effect;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.AutoFilter is a Tone.Filter with a Tone.LFO connected to the filter cutoff frequency.\n\t\t *         Setting the LFO rate and depth allows for control over the filter modulation rate \n\t\t *         and depth.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Effect}\n\t\t *  @param {Time|Object} [frequency] The rate of the LFO.\n\t\t *  @param {Frequency=} baseFrequency The lower value of the LFOs oscillation\n\t \t *  @param {Frequency=} octaves The number of octaves above the baseFrequency\n\t\t *  @example\n\t\t * //create an autofilter and start it's LFO\n\t\t * var autoFilter = new Tone.AutoFilter(\"4n\").toMaster().start();\n\t\t * //route an oscillator through the filter and start it\n\t\t * var oscillator = new Tone.Oscillator().connect(autoFilter).start();\n\t\t */\n\t    Tone.AutoFilter = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'baseFrequency',\n\t            'octaves'\n\t        ], Tone.AutoFilter);\n\t        Tone.Effect.call(this, options);\n\t        /**\n\t\t\t *  the lfo which drives the filter cutoff\n\t\t\t *  @type {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfo = new Tone.LFO({\n\t            'frequency': options.frequency,\n\t            'amplitude': options.depth\n\t        });\n\t        /**\n\t\t\t * The range of the filter modulating between the min and max frequency. \n\t\t\t * 0 = no modulation. 1 = full modulation.\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t        this.depth = this._lfo.amplitude;\n\t        /**\n\t\t\t * How fast the filter modulates between min and max. \n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t        this.frequency = this._lfo.frequency;\n\t        /**\n\t\t\t *  The filter node\n\t\t\t *  @type {Tone.Filter}\n\t\t\t */\n\t        this.filter = new Tone.Filter(options.filter);\n\t        /**\n\t\t\t *  The octaves placeholder\n\t\t\t *  @type {Positive}\n\t\t\t *  @private\n\t\t\t */\n\t        this._octaves = 0;\n\t        //connections\n\t        this.connectEffect(this.filter);\n\t        this._lfo.connect(this.filter.frequency);\n\t        this.type = options.type;\n\t        this._readOnly([\n\t            'frequency',\n\t            'depth'\n\t        ]);\n\t        this.octaves = options.octaves;\n\t        this.baseFrequency = options.baseFrequency;\n\t    };\n\t    //extend Effect\n\t    Tone.extend(Tone.AutoFilter, Tone.Effect);\n\t    /**\n\t\t *  defaults\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.AutoFilter.defaults = {\n\t        'frequency': 1,\n\t        'type': 'sine',\n\t        'depth': 1,\n\t        'baseFrequency': 200,\n\t        'octaves': 2.6,\n\t        'filter': {\n\t            'type': 'lowpass',\n\t            'rolloff': -12,\n\t            'Q': 1\n\t        }\n\t    };\n\t    /**\n\t\t * Start the effect.\n\t\t * @param {Time} [time=now] When the LFO will start. \n\t\t * @returns {Tone.AutoFilter} this\n\t\t */\n\t    Tone.AutoFilter.prototype.start = function (time) {\n\t        this._lfo.start(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Stop the effect.\n\t\t * @param {Time} [time=now] When the LFO will stop. \n\t\t * @returns {Tone.AutoFilter} this\n\t\t */\n\t    Tone.AutoFilter.prototype.stop = function (time) {\n\t        this._lfo.stop(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Sync the filter to the transport.\n\t\t * @param {Time} [delay=0] Delay time before starting the effect after the\n\t\t *                               Transport has started. \n\t\t * @returns {Tone.AutoFilter} this\n\t\t */\n\t    Tone.AutoFilter.prototype.sync = function (delay) {\n\t        this._lfo.sync(delay);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Unsync the filter from the transport.\n\t\t * @returns {Tone.AutoFilter} this\n\t\t */\n\t    Tone.AutoFilter.prototype.unsync = function () {\n\t        this._lfo.unsync();\n\t        return this;\n\t    };\n\t    /**\n\t\t * Type of oscillator attached to the AutoFilter. \n\t\t * Possible values: \"sine\", \"square\", \"triangle\", \"sawtooth\".\n\t\t * @memberOf Tone.AutoFilter#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.AutoFilter.prototype, 'type', {\n\t        get: function () {\n\t            return this._lfo.type;\n\t        },\n\t        set: function (type) {\n\t            this._lfo.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t * The minimum value of the filter's cutoff frequency.\n\t\t * @memberOf Tone.AutoFilter#\n\t\t * @type {Frequency}\n\t\t * @name min\n\t\t */\n\t    Object.defineProperty(Tone.AutoFilter.prototype, 'baseFrequency', {\n\t        get: function () {\n\t            return this._lfo.min;\n\t        },\n\t        set: function (freq) {\n\t            this._lfo.min = this.toFrequency(freq);\n\t            //and set the max\n\t            this.octaves = this._octaves;\n\t        }\n\t    });\n\t    /**\n\t\t * The maximum value of the filter's cutoff frequency. \n\t\t * @memberOf Tone.AutoFilter#\n\t\t * @type {Positive}\n\t\t * @name octaves\n\t\t */\n\t    Object.defineProperty(Tone.AutoFilter.prototype, 'octaves', {\n\t        get: function () {\n\t            return this._octaves;\n\t        },\n\t        set: function (oct) {\n\t            this._octaves = oct;\n\t            this._lfo.max = this.baseFrequency * Math.pow(2, oct);\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up. \n\t\t *  @returns {Tone.AutoFilter} this\n\t\t */\n\t    Tone.AutoFilter.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._lfo.dispose();\n\t        this._lfo = null;\n\t        this.filter.dispose();\n\t        this.filter = null;\n\t        this._writable([\n\t            'frequency',\n\t            'depth'\n\t        ]);\n\t        this.frequency = null;\n\t        this.depth = null;\n\t        return this;\n\t    };\n\t    return Tone.AutoFilter;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.AutoPanner is a Tone.Panner with an LFO connected to the pan amount. \n\t\t *         More on using autopanners [here](https://www.ableton.com/en/blog/autopan-chopper-effect-and-more-liveschool/).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Effect}\n\t\t *  @param {Frequency|Object} [frequency] Rate of left-right oscillation. \n\t\t *  @example\n\t\t * //create an autopanner and start it's LFO\n\t\t * var autoPanner = new Tone.AutoPanner(\"4n\").toMaster().start();\n\t\t * //route an oscillator through the panner and start it\n\t\t * var oscillator = new Tone.Oscillator().connect(autoPanner).start();\n\t\t */\n\t    Tone.AutoPanner = function () {\n\t        var options = Tone.defaults(arguments, ['frequency'], Tone.AutoPanner);\n\t        Tone.Effect.call(this, options);\n\t        /**\n\t\t\t *  the lfo which drives the panning\n\t\t\t *  @type {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfo = new Tone.LFO({\n\t            'frequency': options.frequency,\n\t            'amplitude': options.depth,\n\t            'min': -1,\n\t            'max': 1\n\t        });\n\t        /**\n\t\t\t * The amount of panning between left and right. \n\t\t\t * 0 = always center. 1 = full range between left and right. \n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t        this.depth = this._lfo.amplitude;\n\t        /**\n\t\t\t *  the panner node which does the panning\n\t\t\t *  @type {Tone.Panner}\n\t\t\t *  @private\n\t\t\t */\n\t        this._panner = new Tone.Panner();\n\t        /**\n\t\t\t * How fast the panner modulates between left and right. \n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t        this.frequency = this._lfo.frequency;\n\t        //connections\n\t        this.connectEffect(this._panner);\n\t        this._lfo.connect(this._panner.pan);\n\t        this.type = options.type;\n\t        this._readOnly([\n\t            'depth',\n\t            'frequency'\n\t        ]);\n\t    };\n\t    //extend Effect\n\t    Tone.extend(Tone.AutoPanner, Tone.Effect);\n\t    /**\n\t\t *  defaults\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.AutoPanner.defaults = {\n\t        'frequency': 1,\n\t        'type': 'sine',\n\t        'depth': 1\n\t    };\n\t    /**\n\t\t * Start the effect.\n\t\t * @param {Time} [time=now] When the LFO will start. \n\t\t * @returns {Tone.AutoPanner} this\n\t\t */\n\t    Tone.AutoPanner.prototype.start = function (time) {\n\t        this._lfo.start(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Stop the effect.\n\t\t * @param {Time} [time=now] When the LFO will stop. \n\t\t * @returns {Tone.AutoPanner} this\n\t\t */\n\t    Tone.AutoPanner.prototype.stop = function (time) {\n\t        this._lfo.stop(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Sync the panner to the transport.\n\t\t * @param {Time} [delay=0] Delay time before starting the effect after the\n\t\t *                               Transport has started. \n\t\t * @returns {Tone.AutoPanner} this\n\t\t */\n\t    Tone.AutoPanner.prototype.sync = function (delay) {\n\t        this._lfo.sync(delay);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Unsync the panner from the transport\n\t\t * @returns {Tone.AutoPanner} this\n\t\t */\n\t    Tone.AutoPanner.prototype.unsync = function () {\n\t        this._lfo.unsync();\n\t        return this;\n\t    };\n\t    /**\n\t\t * Type of oscillator attached to the AutoFilter. \n\t\t * Possible values: \"sine\", \"square\", \"triangle\", \"sawtooth\".\n\t\t * @memberOf Tone.AutoFilter#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.AutoPanner.prototype, 'type', {\n\t        get: function () {\n\t            return this._lfo.type;\n\t        },\n\t        set: function (type) {\n\t            this._lfo.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.AutoPanner} this\n\t\t */\n\t    Tone.AutoPanner.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._lfo.dispose();\n\t        this._lfo = null;\n\t        this._panner.dispose();\n\t        this._panner = null;\n\t        this._writable([\n\t            'depth',\n\t            'frequency'\n\t        ]);\n\t        this.frequency = null;\n\t        this.depth = null;\n\t        return this;\n\t    };\n\t    return Tone.AutoPanner;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.AutoWah connects a Tone.Follower to a bandpass filter (Tone.Filter).\n\t\t *          The frequency of the filter is adjusted proportionally to the\n\t\t *          incoming signal's amplitude. Inspiration from [Tuna.js](https://github.com/Dinahmoe/tuna).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Effect}\n\t\t *  @param {Frequency|Object} [baseFrequency] The frequency the filter is set\n\t\t *                                            to at the low point of the wah\n\t\t *  @param {Positive} [octaves] The number of octaves above the baseFrequency\n\t\t *                                the filter will sweep to when fully open\n\t\t *  @param {Decibels} [sensitivity] The decibel threshold sensitivity for\n\t\t *                                   the incoming signal. Normal range of -40 to 0.\n\t\t *  @example\n\t\t * var autoWah = new Tone.AutoWah(50, 6, -30).toMaster();\n\t\t * //initialize the synth and connect to autowah\n\t\t * var synth = new Synth.connect(autoWah);\n\t\t * //Q value influences the effect of the wah - default is 2\n\t\t * autoWah.Q.value = 6;\n\t\t * //more audible on higher notes\n\t\t * synth.triggerAttackRelease(\"C4\", \"8n\")\n\t\t */\n\t    Tone.AutoWah = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'baseFrequency',\n\t            'octaves',\n\t            'sensitivity'\n\t        ], Tone.AutoWah);\n\t        Tone.Effect.call(this, options);\n\t        /**\n\t\t\t *  The envelope follower. Set the attack/release\n\t\t\t *  timing to adjust how the envelope is followed.\n\t\t\t *  @type {Tone.Follower}\n\t\t\t *  @private\n\t\t\t */\n\t        this.follower = new Tone.Follower(options.follower);\n\t        /**\n\t\t\t *  scales the follower value to the frequency domain\n\t\t\t *  @type {Tone}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sweepRange = new Tone.ScaleExp(0, 1, 0.5);\n\t        /**\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._baseFrequency = options.baseFrequency;\n\t        /**\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._octaves = options.octaves;\n\t        /**\n\t\t\t *  the input gain to adjust the sensitivity\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._inputBoost = new Tone.Gain();\n\t        /**\n\t\t\t *  @type {BiquadFilterNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._bandpass = new Tone.Filter({\n\t            'rolloff': -48,\n\t            'frequency': 0,\n\t            'Q': options.Q\n\t        });\n\t        /**\n\t\t\t *  @type {Tone.Filter}\n\t\t\t *  @private\n\t\t\t */\n\t        this._peaking = new Tone.Filter(0, 'peaking');\n\t        this._peaking.gain.value = options.gain;\n\t        /**\n\t\t\t * The gain of the filter.\n\t\t\t * @type {Number}\n\t\t\t * @signal\n\t\t\t */\n\t        this.gain = this._peaking.gain;\n\t        /**\n\t\t\t * The quality of the filter.\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t */\n\t        this.Q = this._bandpass.Q;\n\t        //the control signal path\n\t        this.effectSend.chain(this._inputBoost, this.follower, this._sweepRange);\n\t        this._sweepRange.connect(this._bandpass.frequency);\n\t        this._sweepRange.connect(this._peaking.frequency);\n\t        //the filtered path\n\t        this.effectSend.chain(this._bandpass, this._peaking, this.effectReturn);\n\t        //set the initial value\n\t        this._setSweepRange();\n\t        this.sensitivity = options.sensitivity;\n\t        this._readOnly([\n\t            'gain',\n\t            'Q'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.AutoWah, Tone.Effect);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.AutoWah.defaults = {\n\t        'baseFrequency': 100,\n\t        'octaves': 6,\n\t        'sensitivity': 0,\n\t        'Q': 2,\n\t        'gain': 2,\n\t        'follower': {\n\t            'attack': 0.3,\n\t            'release': 0.5\n\t        }\n\t    };\n\t    /**\n\t\t * The number of octaves that the filter will sweep above the\n\t\t * baseFrequency.\n\t\t * @memberOf Tone.AutoWah#\n\t\t * @type {Number}\n\t\t * @name octaves\n\t\t */\n\t    Object.defineProperty(Tone.AutoWah.prototype, 'octaves', {\n\t        get: function () {\n\t            return this._octaves;\n\t        },\n\t        set: function (octaves) {\n\t            this._octaves = octaves;\n\t            this._setSweepRange();\n\t        }\n\t    });\n\t    /**\n\t\t * The base frequency from which the sweep will start from.\n\t\t * @memberOf Tone.AutoWah#\n\t\t * @type {Frequency}\n\t\t * @name baseFrequency\n\t\t */\n\t    Object.defineProperty(Tone.AutoWah.prototype, 'baseFrequency', {\n\t        get: function () {\n\t            return this._baseFrequency;\n\t        },\n\t        set: function (baseFreq) {\n\t            this._baseFrequency = baseFreq;\n\t            this._setSweepRange();\n\t        }\n\t    });\n\t    /**\n\t\t * The sensitivity to control how responsive to the input signal the filter is.\n\t\t * @memberOf Tone.AutoWah#\n\t\t * @type {Decibels}\n\t\t * @name sensitivity\n\t\t */\n\t    Object.defineProperty(Tone.AutoWah.prototype, 'sensitivity', {\n\t        get: function () {\n\t            return Tone.gainToDb(1 / this._inputBoost.gain.value);\n\t        },\n\t        set: function (sensitivy) {\n\t            this._inputBoost.gain.value = 1 / Tone.dbToGain(sensitivy);\n\t        }\n\t    });\n\t    /**\n\t\t *  sets the sweep range of the scaler\n\t\t *  @private\n\t\t */\n\t    Tone.AutoWah.prototype._setSweepRange = function () {\n\t        this._sweepRange.min = this._baseFrequency;\n\t        this._sweepRange.max = Math.min(this._baseFrequency * Math.pow(2, this._octaves), this.context.sampleRate / 2);\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.AutoWah} this\n\t\t */\n\t    Tone.AutoWah.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this.follower.dispose();\n\t        this.follower = null;\n\t        this._sweepRange.dispose();\n\t        this._sweepRange = null;\n\t        this._bandpass.dispose();\n\t        this._bandpass = null;\n\t        this._peaking.dispose();\n\t        this._peaking = null;\n\t        this._inputBoost.dispose();\n\t        this._inputBoost = null;\n\t        this._writable([\n\t            'gain',\n\t            'Q'\n\t        ]);\n\t        this.gain = null;\n\t        this.Q = null;\n\t        return this;\n\t    };\n\t    return Tone.AutoWah;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Signal-rate modulo operator. Only works in AudioRange [-1, 1] and for modulus\n\t\t *         values in the NormalRange.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @param {NormalRange} modulus The modulus to apply.\n\t\t *  @example\n\t\t * var mod = new Tone.Modulo(0.2)\n\t\t * var sig = new Tone.Signal(0.5).connect(mod);\n\t\t * //mod outputs 0.1\n\t\t */\n\t    Tone.Modulo = function (modulus) {\n\t        Tone.SignalBase.call(this);\n\t        this.createInsOuts(1, 0);\n\t        /**\n\t\t\t *  A waveshaper gets the integer multiple of\n\t\t\t *  the input signal and the modulus.\n\t\t\t *  @private\n\t\t\t *  @type {Tone.WaveShaper}\n\t\t\t */\n\t        this._shaper = new Tone.WaveShaper(Math.pow(2, 16));\n\t        /**\n\t\t\t *  the integer multiple is multiplied by the modulus\n\t\t\t *  @type  {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._multiply = new Tone.Multiply();\n\t        /**\n\t\t\t *  and subtracted from the input signal\n\t\t\t *  @type  {Tone.Subtract}\n\t\t\t *  @private\n\t\t\t */\n\t        this._subtract = this.output = new Tone.Subtract();\n\t        /**\n\t\t\t *  the modulus signal\n\t\t\t *  @type  {Tone.Signal}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modSignal = new Tone.Signal(modulus);\n\t        //connections\n\t        this.input.fan(this._shaper, this._subtract);\n\t        this._modSignal.connect(this._multiply, 0, 0);\n\t        this._shaper.connect(this._multiply, 0, 1);\n\t        this._multiply.connect(this._subtract, 0, 1);\n\t        this._setWaveShaper(modulus);\n\t    };\n\t    Tone.extend(Tone.Modulo, Tone.SignalBase);\n\t    /**\n\t\t *  @param  {number}  mod  the modulus to apply\n\t\t *  @private\n\t\t */\n\t    Tone.Modulo.prototype._setWaveShaper = function (mod) {\n\t        this._shaper.setMap(function (val) {\n\t            var multiple = Math.floor((val + 0.0001) / mod);\n\t            return multiple;\n\t        });\n\t    };\n\t    /**\n\t\t * The modulus value.\n\t\t * @memberOf Tone.Modulo#\n\t\t * @type {NormalRange}\n\t\t * @name value\n\t\t */\n\t    Object.defineProperty(Tone.Modulo.prototype, 'value', {\n\t        get: function () {\n\t            return this._modSignal.value;\n\t        },\n\t        set: function (mod) {\n\t            this._modSignal.value = mod;\n\t            this._setWaveShaper(mod);\n\t        }\n\t    });\n\t    /**\n\t\t * clean up\n\t\t *  @returns {Tone.Modulo} this\n\t\t */\n\t    Tone.Modulo.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._shaper.dispose();\n\t        this._shaper = null;\n\t        this._multiply.dispose();\n\t        this._multiply = null;\n\t        this._subtract.dispose();\n\t        this._subtract = null;\n\t        this._modSignal.dispose();\n\t        this._modSignal = null;\n\t        return this;\n\t    };\n\t    return Tone.Modulo;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Bitcrusher downsamples the incoming signal to a different bitdepth.\n\t\t *         Lowering the bitdepth of the signal creates distortion. Read more about Bitcrushing\n\t\t *         on [Wikipedia](https://en.wikipedia.org/wiki/Bitcrusher).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Effect}\n\t\t *  @param {Number} bits The number of bits to downsample the signal. Nominal range\n\t\t *                       of 1 to 8.\n\t\t *  @example\n\t\t * //initialize crusher and route a synth through it\n\t\t * var crusher = new Tone.BitCrusher(4).toMaster();\n\t\t * var synth = new Tone.MonoSynth().connect(crusher);\n\t\t */\n\t    Tone.BitCrusher = function () {\n\t        var options = Tone.defaults(arguments, ['bits'], Tone.BitCrusher);\n\t        Tone.Effect.call(this, options);\n\t        var invStepSize = 1 / Math.pow(2, options.bits - 1);\n\t        /**\n\t\t\t *  Subtract the input signal and the modulus of the input signal\n\t\t\t *  @type {Tone.Subtract}\n\t\t\t *  @private\n\t\t\t */\n\t        this._subtract = new Tone.Subtract();\n\t        /**\n\t\t\t *  The mod function\n\t\t\t *  @type  {Tone.Modulo}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulo = new Tone.Modulo(invStepSize);\n\t        /**\n\t\t\t *  keeps track of the bits\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._bits = options.bits;\n\t        //connect it up\n\t        this.effectSend.fan(this._subtract, this._modulo);\n\t        this._modulo.connect(this._subtract, 0, 1);\n\t        this._subtract.connect(this.effectReturn);\n\t    };\n\t    Tone.extend(Tone.BitCrusher, Tone.Effect);\n\t    /**\n\t\t *  the default values\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.BitCrusher.defaults = { 'bits': 4 };\n\t    /**\n\t\t * The bit depth of the effect. Nominal range of 1-8.\n\t\t * @memberOf Tone.BitCrusher#\n\t\t * @type {number}\n\t\t * @name bits\n\t\t */\n\t    Object.defineProperty(Tone.BitCrusher.prototype, 'bits', {\n\t        get: function () {\n\t            return this._bits;\n\t        },\n\t        set: function (bits) {\n\t            this._bits = bits;\n\t            var invStepSize = 1 / Math.pow(2, bits - 1);\n\t            this._modulo.value = invStepSize;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.BitCrusher} this\n\t\t */\n\t    Tone.BitCrusher.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._subtract.dispose();\n\t        this._subtract = null;\n\t        this._modulo.dispose();\n\t        this._modulo = null;\n\t        return this;\n\t    };\n\t    return Tone.BitCrusher;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.ChebyShev is a Chebyshev waveshaper, an effect which is good \n\t\t *         for making different types of distortion sounds.\n\t\t *         Note that odd orders sound very different from even ones, \n\t\t *         and order = 1 is no change. \n\t\t *         Read more at [music.columbia.edu](http://music.columbia.edu/cmc/musicandcomputers/chapter4/04_06.php).\n\t\t *\n\t\t *  @extends {Tone.Effect}\n\t\t *  @constructor\n\t\t *  @param {Positive|Object} [order] The order of the chebyshev polynomial. Normal range between 1-100. \n\t\t *  @example\n\t\t * //create a new cheby\n\t\t * var cheby = new Tone.Chebyshev(50);\n\t\t * //create a monosynth connected to our cheby\n\t\t * synth = new Tone.MonoSynth().connect(cheby);\n\t\t */\n\t    Tone.Chebyshev = function () {\n\t        var options = Tone.defaults(arguments, ['order'], Tone.Chebyshev);\n\t        Tone.Effect.call(this, options);\n\t        /**\n\t\t\t *  @type {WaveShaperNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._shaper = new Tone.WaveShaper(4096);\n\t        /**\n\t\t\t * holds onto the order of the filter\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t        this._order = options.order;\n\t        this.connectEffect(this._shaper);\n\t        this.order = options.order;\n\t        this.oversample = options.oversample;\n\t    };\n\t    Tone.extend(Tone.Chebyshev, Tone.Effect);\n\t    /**\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Chebyshev.defaults = {\n\t        'order': 1,\n\t        'oversample': 'none'\n\t    };\n\t    /**\n\t\t *  get the coefficient for that degree\n\t\t *  @param {number} x the x value\n\t\t *  @param   {number} degree \n\t\t *  @param {Object} memo memoize the computed value. \n\t\t *                       this speeds up computation greatly. \n\t\t *  @return  {number}       the coefficient \n\t\t *  @private\n\t\t */\n\t    Tone.Chebyshev.prototype._getCoefficient = function (x, degree, memo) {\n\t        if (memo.hasOwnProperty(degree)) {\n\t            return memo[degree];\n\t        } else if (degree === 0) {\n\t            memo[degree] = 0;\n\t        } else if (degree === 1) {\n\t            memo[degree] = x;\n\t        } else {\n\t            memo[degree] = 2 * x * this._getCoefficient(x, degree - 1, memo) - this._getCoefficient(x, degree - 2, memo);\n\t        }\n\t        return memo[degree];\n\t    };\n\t    /**\n\t\t * The order of the Chebyshev polynomial which creates\n\t\t * the equation which is applied to the incoming \n\t\t * signal through a Tone.WaveShaper. The equations\n\t\t * are in the form:<br>\n\t\t * order 2: 2x^2 + 1<br>\n\t\t * order 3: 4x^3 + 3x <br>\n\t\t * @memberOf Tone.Chebyshev#\n\t\t * @type {Positive}\n\t\t * @name order\n\t\t */\n\t    Object.defineProperty(Tone.Chebyshev.prototype, 'order', {\n\t        get: function () {\n\t            return this._order;\n\t        },\n\t        set: function (order) {\n\t            this._order = order;\n\t            var curve = new Array(4096);\n\t            var len = curve.length;\n\t            for (var i = 0; i < len; ++i) {\n\t                var x = i * 2 / len - 1;\n\t                if (x === 0) {\n\t                    //should output 0 when input is 0\n\t                    curve[i] = 0;\n\t                } else {\n\t                    curve[i] = this._getCoefficient(x, order, {});\n\t                }\n\t            }\n\t            this._shaper.curve = curve;\n\t        }\n\t    });\n\t    /**\n\t\t * The oversampling of the effect. Can either be \"none\", \"2x\" or \"4x\".\n\t\t * @memberOf Tone.Chebyshev#\n\t\t * @type {string}\n\t\t * @name oversample\n\t\t */\n\t    Object.defineProperty(Tone.Chebyshev.prototype, 'oversample', {\n\t        get: function () {\n\t            return this._shaper.oversample;\n\t        },\n\t        set: function (oversampling) {\n\t            this._shaper.oversample = oversampling;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up. \n\t\t *  @returns {Tone.Chebyshev} this\n\t\t */\n\t    Tone.Chebyshev.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._shaper.dispose();\n\t        this._shaper = null;\n\t        return this;\n\t    };\n\t    return Tone.Chebyshev;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Base class for Stereo effects. Provides effectSendL/R and effectReturnL/R.\n\t\t *\n\t\t *\t@constructor\n\t\t *\t@extends {Tone.Effect}\n\t\t */\n\t    Tone.StereoEffect = function () {\n\t        //get the defaults\n\t        Tone.AudioNode.call(this);\n\t        var options = Tone.defaults(arguments, ['wet'], Tone.Effect);\n\t        this.createInsOuts(1, 1);\n\t        /**\n\t\t\t *  the drywet knob to control the amount of effect\n\t\t\t *  @type {Tone.CrossFade}\n\t\t\t *  @private\n\t\t\t */\n\t        this._dryWet = new Tone.CrossFade(options.wet);\n\t        /**\n\t\t\t *  The wet control, i.e. how much of the effected\n\t\t\t *  will pass through to the output.\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.wet = this._dryWet.fade;\n\t        /**\n\t\t\t *  then split it\n\t\t\t *  @type {Tone.Split}\n\t\t\t *  @private\n\t\t\t */\n\t        this._split = new Tone.Split();\n\t        /**\n\t\t\t *  the effects send LEFT\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this.effectSendL = this._split.left;\n\t        /**\n\t\t\t *  the effects send RIGHT\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this.effectSendR = this._split.right;\n\t        /**\n\t\t\t *  the stereo effect merger\n\t\t\t *  @type {Tone.Merge}\n\t\t\t *  @private\n\t\t\t */\n\t        this._merge = new Tone.Merge();\n\t        /**\n\t\t\t *  the effect return LEFT\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this.effectReturnL = this._merge.left;\n\t        /**\n\t\t\t *  the effect return RIGHT\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this.effectReturnR = this._merge.right;\n\t        //connections\n\t        this.input.connect(this._split);\n\t        //dry wet connections\n\t        this.input.connect(this._dryWet, 0, 0);\n\t        this._merge.connect(this._dryWet, 0, 1);\n\t        this._dryWet.connect(this.output);\n\t        this._readOnly(['wet']);\n\t    };\n\t    Tone.extend(Tone.StereoEffect, Tone.Effect);\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.StereoEffect} this\n\t\t */\n\t    Tone.StereoEffect.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._dryWet.dispose();\n\t        this._dryWet = null;\n\t        this._split.dispose();\n\t        this._split = null;\n\t        this._merge.dispose();\n\t        this._merge = null;\n\t        this.effectSendL = null;\n\t        this.effectSendR = null;\n\t        this.effectReturnL = null;\n\t        this.effectReturnR = null;\n\t        this._writable(['wet']);\n\t        this.wet = null;\n\t        return this;\n\t    };\n\t    return Tone.StereoEffect;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Chorus is a stereo chorus effect composed of\n\t\t *         a left and right delay with a Tone.LFO applied to the delayTime of each channel.\n\t\t *         Inspiration from [Tuna.js](https://github.com/Dinahmoe/tuna/blob/master/tuna.js).\n\t\t *         Read more on the chorus effect on [SoundOnSound](http://www.soundonsound.com/sos/jun04/articles/synthsecrets.htm).\n\t\t *\n\t\t *\t@constructor\n\t\t *\t@extends {Tone.StereoEffect}\n\t\t *\t@param {Frequency|Object} [frequency] The frequency of the LFO.\n\t\t *\t@param {Milliseconds} [delayTime] The delay of the chorus effect in ms.\n\t\t *\t@param {NormalRange} [depth] The depth of the chorus.\n\t\t *\t@example\n\t\t * var chorus = new Tone.Chorus(4, 2.5, 0.5);\n\t\t * var synth = new Tone.PolySynth(4, Tone.MonoSynth).connect(chorus);\n\t\t * synth.triggerAttackRelease([\"C3\",\"E3\",\"G3\"], \"8n\");\n\t\t */\n\t    Tone.Chorus = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'delayTime',\n\t            'depth'\n\t        ], Tone.Chorus);\n\t        Tone.StereoEffect.call(this, options);\n\t        /**\n\t\t\t *  the depth of the chorus\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._depth = options.depth;\n\t        /**\n\t\t\t *  the delayTime\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delayTime = options.delayTime / 1000;\n\t        /**\n\t\t\t *  the lfo which controls the delayTime\n\t\t\t *  @type {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfoL = new Tone.LFO({\n\t            'frequency': options.frequency,\n\t            'min': 0,\n\t            'max': 1\n\t        });\n\t        /**\n\t\t\t *  another LFO for the right side with a 180 degree phase diff\n\t\t\t *  @type {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfoR = new Tone.LFO({\n\t            'frequency': options.frequency,\n\t            'min': 0,\n\t            'max': 1,\n\t            'phase': 180\n\t        });\n\t        /**\n\t\t\t *  delay for left\n\t\t\t *  @type {Tone.Delay}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delayNodeL = new Tone.Delay();\n\t        /**\n\t\t\t *  delay for right\n\t\t\t *  @type {Tone.Delay}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delayNodeR = new Tone.Delay();\n\t        /**\n\t\t\t * The frequency of the LFO which modulates the delayTime.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t        this.frequency = this._lfoL.frequency;\n\t        //connections\n\t        this.effectSendL.chain(this._delayNodeL, this.effectReturnL);\n\t        this.effectSendR.chain(this._delayNodeR, this.effectReturnR);\n\t        //and pass through to make the detune apparent\n\t        this.effectSendL.connect(this.effectReturnL);\n\t        this.effectSendR.connect(this.effectReturnR);\n\t        //lfo setup\n\t        this._lfoL.connect(this._delayNodeL.delayTime);\n\t        this._lfoR.connect(this._delayNodeR.delayTime);\n\t        //start the lfo\n\t        this._lfoL.start();\n\t        this._lfoR.start();\n\t        //have one LFO frequency control the other\n\t        this._lfoL.frequency.connect(this._lfoR.frequency);\n\t        //set the initial values\n\t        this.depth = this._depth;\n\t        this.frequency.value = options.frequency;\n\t        this.type = options.type;\n\t        this._readOnly(['frequency']);\n\t        this.spread = options.spread;\n\t    };\n\t    Tone.extend(Tone.Chorus, Tone.StereoEffect);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Chorus.defaults = {\n\t        'frequency': 1.5,\n\t        'delayTime': 3.5,\n\t        'depth': 0.7,\n\t        'type': 'sine',\n\t        'spread': 180\n\t    };\n\t    /**\n\t\t * The depth of the effect. A depth of 1 makes the delayTime\n\t\t * modulate between 0 and 2*delayTime (centered around the delayTime).\n\t\t * @memberOf Tone.Chorus#\n\t\t * @type {NormalRange}\n\t\t * @name depth\n\t\t */\n\t    Object.defineProperty(Tone.Chorus.prototype, 'depth', {\n\t        get: function () {\n\t            return this._depth;\n\t        },\n\t        set: function (depth) {\n\t            this._depth = depth;\n\t            var deviation = this._delayTime * depth;\n\t            this._lfoL.min = Math.max(this._delayTime - deviation, 0);\n\t            this._lfoL.max = this._delayTime + deviation;\n\t            this._lfoR.min = Math.max(this._delayTime - deviation, 0);\n\t            this._lfoR.max = this._delayTime + deviation;\n\t        }\n\t    });\n\t    /**\n\t\t * The delayTime in milliseconds of the chorus. A larger delayTime\n\t\t * will give a more pronounced effect. Nominal range a delayTime\n\t\t * is between 2 and 20ms.\n\t\t * @memberOf Tone.Chorus#\n\t\t * @type {Milliseconds}\n\t\t * @name delayTime\n\t\t */\n\t    Object.defineProperty(Tone.Chorus.prototype, 'delayTime', {\n\t        get: function () {\n\t            return this._delayTime * 1000;\n\t        },\n\t        set: function (delayTime) {\n\t            this._delayTime = delayTime / 1000;\n\t            this.depth = this._depth;\n\t        }\n\t    });\n\t    /**\n\t\t * The oscillator type of the LFO.\n\t\t * @memberOf Tone.Chorus#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.Chorus.prototype, 'type', {\n\t        get: function () {\n\t            return this._lfoL.type;\n\t        },\n\t        set: function (type) {\n\t            this._lfoL.type = type;\n\t            this._lfoR.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t * Amount of stereo spread. When set to 0, both LFO's will be panned centrally.\n\t\t * When set to 180, LFO's will be panned hard left and right respectively.\n\t\t * @memberOf Tone.Chorus#\n\t\t * @type {Degrees}\n\t\t * @name spread\n\t\t */\n\t    Object.defineProperty(Tone.Chorus.prototype, 'spread', {\n\t        get: function () {\n\t            return this._lfoR.phase - this._lfoL.phase;\n\t        },\n\t        set: function (spread) {\n\t            this._lfoL.phase = 90 - spread / 2;\n\t            this._lfoR.phase = spread / 2 + 90;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Chorus} this\n\t\t */\n\t    Tone.Chorus.prototype.dispose = function () {\n\t        Tone.StereoEffect.prototype.dispose.call(this);\n\t        this._lfoL.dispose();\n\t        this._lfoL = null;\n\t        this._lfoR.dispose();\n\t        this._lfoR = null;\n\t        this._delayNodeL.dispose();\n\t        this._delayNodeL = null;\n\t        this._delayNodeR.dispose();\n\t        this._delayNodeR = null;\n\t        this._writable('frequency');\n\t        this.frequency = null;\n\t        return this;\n\t    };\n\t    return Tone.Chorus;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Convolver is a wrapper around the Native Web Audio\n\t\t *          [ConvolverNode](http://webaudio.github.io/web-audio-api/#the-convolvernode-interface).\n\t\t *          Convolution is useful for reverb and filter emulation. Read more about convolution reverb on\n\t\t *          [Wikipedia](https://en.wikipedia.org/wiki/Convolution_reverb).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Effect}\n\t\t *  @param {string|Tone.Buffer|Object} [url] The URL of the impulse response or the Tone.Buffer\n\t\t *                                           contianing the impulse response.\n\t\t *  @param {Function=} onload The callback to invoke when the url is loaded.\n\t\t *  @example\n\t\t * //initializing the convolver with an impulse response\n\t\t * var convolver = new Tone.Convolver(\"./path/to/ir.wav\").toMaster();\n\t\t */\n\t    Tone.Convolver = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'url',\n\t            'onload'\n\t        ], Tone.Convolver);\n\t        Tone.Effect.call(this, options);\n\t        /**\n\t\t\t *  convolver node\n\t\t\t *  @type {ConvolverNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._convolver = this.context.createConvolver();\n\t        /**\n\t\t\t *  the convolution buffer\n\t\t\t *  @type {Tone.Buffer}\n\t\t\t *  @private\n\t\t\t */\n\t        this._buffer = new Tone.Buffer(options.url, function (buffer) {\n\t            this._convolver.buffer = buffer.get();\n\t            options.onload();\n\t        }.bind(this));\n\t        this.connectEffect(this._convolver);\n\t    };\n\t    Tone.extend(Tone.Convolver, Tone.Effect);\n\t    /**\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.Convolver.defaults = { 'onload': Tone.noOp };\n\t    /**\n\t\t *  The convolver's buffer\n\t\t *  @memberOf Tone.Convolver#\n\t\t *  @type {AudioBuffer}\n\t\t *  @name buffer\n\t\t */\n\t    Object.defineProperty(Tone.Convolver.prototype, 'buffer', {\n\t        get: function () {\n\t            return this._buffer.get();\n\t        },\n\t        set: function (buffer) {\n\t            this._buffer.set(buffer);\n\t            this._convolver.buffer = this._buffer.get();\n\t        }\n\t    });\n\t    /**\n\t\t *  Load an impulse response url as an audio buffer.\n\t\t *  Decodes the audio asynchronously and invokes\n\t\t *  the callback once the audio buffer loads.\n\t\t *  @param {string} url The url of the buffer to load.\n\t\t *                      filetype support depends on the\n\t\t *                      browser.\n\t\t *  @param  {function=} callback\n\t\t *  @returns {Promise}\n\t\t */\n\t    Tone.Convolver.prototype.load = function (url, callback) {\n\t        return this._buffer.load(url, function (buff) {\n\t            this.buffer = buff;\n\t            if (callback) {\n\t                callback();\n\t            }\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Convolver} this\n\t\t */\n\t    Tone.Convolver.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._convolver.disconnect();\n\t        this._convolver = null;\n\t        this._buffer.dispose();\n\t        this._buffer = null;\n\t        return this;\n\t    };\n\t    return Tone.Convolver;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Distortion is a simple distortion effect using Tone.WaveShaper.\n\t\t *         Algorithm from [a stackoverflow answer](http://stackoverflow.com/a/22313408).\n\t\t *\n\t\t *  @extends {Tone.Effect}\n\t\t *  @constructor\n\t\t *  @param {Number|Object} [distortion] The amount of distortion (nominal range of 0-1)\n\t\t *  @example\n\t\t * var dist = new Tone.Distortion(0.8).toMaster();\n\t\t * var fm = new Tone.SimpleFM().connect(dist);\n\t\t * //this sounds good on bass notes\n\t\t * fm.triggerAttackRelease(\"A1\", \"8n\");\n\t\t */\n\t    Tone.Distortion = function () {\n\t        var options = Tone.defaults(arguments, ['distortion'], Tone.Distortion);\n\t        Tone.Effect.call(this, options);\n\t        /**\n\t\t\t *  @type {Tone.WaveShaper}\n\t\t\t *  @private\n\t\t\t */\n\t        this._shaper = new Tone.WaveShaper(4096);\n\t        /**\n\t\t\t * holds the distortion amount\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t        this._distortion = options.distortion;\n\t        this.connectEffect(this._shaper);\n\t        this.distortion = options.distortion;\n\t        this.oversample = options.oversample;\n\t    };\n\t    Tone.extend(Tone.Distortion, Tone.Effect);\n\t    /**\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Distortion.defaults = {\n\t        'distortion': 0.4,\n\t        'oversample': 'none'\n\t    };\n\t    /**\n\t\t * The amount of distortion.\n\t\t * @memberOf Tone.Distortion#\n\t\t * @type {NormalRange}\n\t\t * @name distortion\n\t\t */\n\t    Object.defineProperty(Tone.Distortion.prototype, 'distortion', {\n\t        get: function () {\n\t            return this._distortion;\n\t        },\n\t        set: function (amount) {\n\t            this._distortion = amount;\n\t            var k = amount * 100;\n\t            var deg = Math.PI / 180;\n\t            this._shaper.setMap(function (x) {\n\t                if (Math.abs(x) < 0.001) {\n\t                    //should output 0 when input is 0\n\t                    return 0;\n\t                } else {\n\t                    return (3 + k) * x * 20 * deg / (Math.PI + k * Math.abs(x));\n\t                }\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t * The oversampling of the effect. Can either be \"none\", \"2x\" or \"4x\".\n\t\t * @memberOf Tone.Distortion#\n\t\t * @type {string}\n\t\t * @name oversample\n\t\t */\n\t    Object.defineProperty(Tone.Distortion.prototype, 'oversample', {\n\t        get: function () {\n\t            return this._shaper.oversample;\n\t        },\n\t        set: function (oversampling) {\n\t            this._shaper.oversample = oversampling;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up. \n\t\t *  @returns {Tone.Distortion} this\n\t\t */\n\t    Tone.Distortion.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._shaper.dispose();\n\t        this._shaper = null;\n\t        return this;\n\t    };\n\t    return Tone.Distortion;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t * \t@class  Tone.FeedbackEffect provides a loop between an \n\t\t * \t        audio source and its own output. This is a base-class\n\t\t * \t        for feedback effects. \n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Effect}\n\t\t *  @param {NormalRange|Object} [feedback] The initial feedback value.\n\t\t */\n\t    Tone.FeedbackEffect = function () {\n\t        var options = Tone.defaults(arguments, ['feedback'], Tone.FeedbackEffect);\n\t        Tone.Effect.call(this, options);\n\t        /**\n\t\t\t *  the gain which controls the feedback\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._feedbackGain = new Tone.Gain(options.feedback, Tone.Type.NormalRange);\n\t        /**\n\t\t\t *  The amount of signal which is fed back into the effect input. \n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.feedback = this._feedbackGain.gain;\n\t        //the feedback loop\n\t        this.effectReturn.chain(this._feedbackGain, this.effectSend);\n\t        this._readOnly(['feedback']);\n\t    };\n\t    Tone.extend(Tone.FeedbackEffect, Tone.Effect);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.FeedbackEffect.defaults = { 'feedback': 0.125 };\n\t    /**\n\t\t *  Clean up. \n\t\t *  @returns {Tone.FeedbackEffect} this\n\t\t */\n\t    Tone.FeedbackEffect.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._writable(['feedback']);\n\t        this._feedbackGain.dispose();\n\t        this._feedbackGain = null;\n\t        this.feedback = null;\n\t        return this;\n\t    };\n\t    return Tone.FeedbackEffect;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.FeedbackDelay is a DelayNode in which part of output\n\t\t *          signal is fed back into the delay.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.FeedbackEffect}\n\t\t *  @param {Time|Object} [delayTime] The delay applied to the incoming signal.\n\t\t *  @param {NormalRange=} feedback The amount of the effected signal which\n\t\t *                            is fed back through the delay.\n\t\t *  @example\n\t\t * var feedbackDelay = new Tone.FeedbackDelay(\"8n\", 0.5).toMaster();\n\t\t * var tom = new Tone.DrumSynth({\n\t\t * \t\"octaves\" : 4,\n\t\t * \t\"pitchDecay\" : 0.1\n\t\t * }).connect(feedbackDelay);\n\t\t * tom.triggerAttackRelease(\"A2\",\"32n\");\n\t\t */\n\t    Tone.FeedbackDelay = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'delayTime',\n\t            'feedback'\n\t        ], Tone.FeedbackDelay);\n\t        Tone.FeedbackEffect.call(this, options);\n\t        /**\n\t\t\t *  the delay node\n\t\t\t *  @type {Tone.Delay}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delayNode = new Tone.Delay(options.delayTime, options.maxDelay);\n\t        /**\n\t\t\t *  The delayTime of the DelayNode.\n\t\t\t *  @type {Time}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.delayTime = this._delayNode.delayTime;\n\t        // connect it up\n\t        this.connectEffect(this._delayNode);\n\t        this._readOnly(['delayTime']);\n\t    };\n\t    Tone.extend(Tone.FeedbackDelay, Tone.FeedbackEffect);\n\t    /**\n\t\t *  The default values.\n\t\t *  @const\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.FeedbackDelay.defaults = {\n\t        'delayTime': 0.25,\n\t        'maxDelay': 1\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.FeedbackDelay} this\n\t\t */\n\t    Tone.FeedbackDelay.prototype.dispose = function () {\n\t        Tone.FeedbackEffect.prototype.dispose.call(this);\n\t        this._delayNode.dispose();\n\t        this._delayNode = null;\n\t        this._writable(['delayTime']);\n\t        this.delayTime = null;\n\t        return this;\n\t    };\n\t    return Tone.FeedbackDelay;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  an array of comb filter delay values from Freeverb implementation\n\t\t *  @static\n\t\t *  @private\n\t\t *  @type {Array}\n\t\t */\n\t    var combFilterTunings = [\n\t        1557 / 44100,\n\t        1617 / 44100,\n\t        1491 / 44100,\n\t        1422 / 44100,\n\t        1277 / 44100,\n\t        1356 / 44100,\n\t        1188 / 44100,\n\t        1116 / 44100\n\t    ];\n\t    /**\n\t\t *  an array of allpass filter frequency values from Freeverb implementation\n\t\t *  @private\n\t\t *  @static\n\t\t *  @type {Array}\n\t\t */\n\t    var allpassFilterFrequencies = [\n\t        225,\n\t        556,\n\t        441,\n\t        341\n\t    ];\n\t    /**\n\t\t *  @class Tone.Freeverb is a reverb based on [Freeverb](https://ccrma.stanford.edu/~jos/pasp/Freeverb.html).\n\t\t *         Read more on reverb on [Sound On Sound](https://web.archive.org/web/20160404083902/http://www.soundonsound.com:80/sos/feb01/articles/synthsecrets.asp).\n\t\t *\n\t\t *  @extends {Tone.Effect}\n\t\t *  @constructor\n\t\t *  @param {NormalRange|Object} [roomSize] Correlated to the decay time.\n\t\t *  @param {Frequency} [dampening] The cutoff frequency of a lowpass filter as part\n\t\t *                                 of the reverb.\n\t\t *  @example\n\t\t * var freeverb = new Tone.Freeverb().toMaster();\n\t\t * freeverb.dampening.value = 1000;\n\t\t * //routing synth through the reverb\n\t\t * var synth = new Tone.AMSynth().connect(freeverb);\n\t\t */\n\t    Tone.Freeverb = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'roomSize',\n\t            'dampening'\n\t        ], Tone.Freeverb);\n\t        Tone.StereoEffect.call(this, options);\n\t        /**\n\t\t\t *  The roomSize value between. A larger roomSize\n\t\t\t *  will result in a longer decay.\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.roomSize = new Tone.Signal(options.roomSize, Tone.Type.NormalRange);\n\t        /**\n\t\t\t *  The amount of dampening of the reverberant signal.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.dampening = new Tone.Signal(options.dampening, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  the comb filters\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._combFilters = [];\n\t        /**\n\t\t\t *  the allpass filters on the left\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._allpassFiltersL = [];\n\t        /**\n\t\t\t *  the allpass filters on the right\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._allpassFiltersR = [];\n\t        //make the allpass filters on the right\n\t        for (var l = 0; l < allpassFilterFrequencies.length; l++) {\n\t            var allpassL = this.context.createBiquadFilter();\n\t            allpassL.type = 'allpass';\n\t            allpassL.frequency.value = allpassFilterFrequencies[l];\n\t            this._allpassFiltersL.push(allpassL);\n\t        }\n\t        //make the allpass filters on the left\n\t        for (var r = 0; r < allpassFilterFrequencies.length; r++) {\n\t            var allpassR = this.context.createBiquadFilter();\n\t            allpassR.type = 'allpass';\n\t            allpassR.frequency.value = allpassFilterFrequencies[r];\n\t            this._allpassFiltersR.push(allpassR);\n\t        }\n\t        //make the comb filters\n\t        for (var c = 0; c < combFilterTunings.length; c++) {\n\t            var lfpf = new Tone.LowpassCombFilter(combFilterTunings[c]);\n\t            if (c < combFilterTunings.length / 2) {\n\t                this.effectSendL.chain(lfpf, this._allpassFiltersL[0]);\n\t            } else {\n\t                this.effectSendR.chain(lfpf, this._allpassFiltersR[0]);\n\t            }\n\t            this.roomSize.connect(lfpf.resonance);\n\t            this.dampening.connect(lfpf.dampening);\n\t            this._combFilters.push(lfpf);\n\t        }\n\t        //chain the allpass filters togetehr\n\t        Tone.connectSeries.apply(Tone, this._allpassFiltersL);\n\t        Tone.connectSeries.apply(Tone, this._allpassFiltersR);\n\t        this._allpassFiltersL[this._allpassFiltersL.length - 1].connect(this.effectReturnL);\n\t        this._allpassFiltersR[this._allpassFiltersR.length - 1].connect(this.effectReturnR);\n\t        this._readOnly([\n\t            'roomSize',\n\t            'dampening'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.Freeverb, Tone.StereoEffect);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Freeverb.defaults = {\n\t        'roomSize': 0.7,\n\t        'dampening': 3000\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Freeverb} this\n\t\t */\n\t    Tone.Freeverb.prototype.dispose = function () {\n\t        Tone.StereoEffect.prototype.dispose.call(this);\n\t        for (var al = 0; al < this._allpassFiltersL.length; al++) {\n\t            this._allpassFiltersL[al].disconnect();\n\t            this._allpassFiltersL[al] = null;\n\t        }\n\t        this._allpassFiltersL = null;\n\t        for (var ar = 0; ar < this._allpassFiltersR.length; ar++) {\n\t            this._allpassFiltersR[ar].disconnect();\n\t            this._allpassFiltersR[ar] = null;\n\t        }\n\t        this._allpassFiltersR = null;\n\t        for (var cf = 0; cf < this._combFilters.length; cf++) {\n\t            this._combFilters[cf].dispose();\n\t            this._combFilters[cf] = null;\n\t        }\n\t        this._combFilters = null;\n\t        this._writable([\n\t            'roomSize',\n\t            'dampening'\n\t        ]);\n\t        this.roomSize.dispose();\n\t        this.roomSize = null;\n\t        this.dampening.dispose();\n\t        this.dampening = null;\n\t        return this;\n\t    };\n\t    return Tone.Freeverb;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  an array of the comb filter delay time values\n\t\t *  @private\n\t\t *  @static\n\t\t *  @type {Array}\n\t\t */\n\t    var combFilterDelayTimes = [\n\t        1687 / 25000,\n\t        1601 / 25000,\n\t        2053 / 25000,\n\t        2251 / 25000\n\t    ];\n\t    /**\n\t\t *  the resonances of each of the comb filters\n\t\t *  @private\n\t\t *  @static\n\t\t *  @type {Array}\n\t\t */\n\t    var combFilterResonances = [\n\t        0.773,\n\t        0.802,\n\t        0.753,\n\t        0.733\n\t    ];\n\t    /**\n\t\t *  the allpass filter frequencies\n\t\t *  @private\n\t\t *  @static\n\t\t *  @type {Array}\n\t\t */\n\t    var allpassFilterFreqs = [\n\t        347,\n\t        113,\n\t        37\n\t    ];\n\t    /**\n\t\t *  @class Tone.JCReverb is a simple [Schroeder Reverberator](https://ccrma.stanford.edu/~jos/pasp/Schroeder_Reverberators.html)\n\t\t *         tuned by John Chowning in 1970.\n\t\t *         It is made up of three allpass filters and four Tone.FeedbackCombFilter.\n\t\t *\n\t\t *\n\t\t *  @extends {Tone.Effect}\n\t\t *  @constructor\n\t\t *  @param {NormalRange|Object} [roomSize] Coorelates to the decay time.\n\t\t *  @example\n\t\t * var reverb = new Tone.JCReverb(0.4).connect(Tone.Master);\n\t\t * var delay = new Tone.FeedbackDelay(0.5);\n\t\t * //connecting the synth to reverb through delay\n\t\t * var synth = new Tone.DuoSynth().chain(delay, reverb);\n\t\t * synth.triggerAttackRelease(\"A4\",\"8n\");\n\t\t */\n\t    Tone.JCReverb = function () {\n\t        var options = Tone.defaults(arguments, ['roomSize'], Tone.JCReverb);\n\t        Tone.StereoEffect.call(this, options);\n\t        /**\n\t\t\t *  room size control values between [0,1]\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.roomSize = new Tone.Signal(options.roomSize, Tone.Type.NormalRange);\n\t        /**\n\t\t\t *  scale the room size\n\t\t\t *  @type {Tone.Scale}\n\t\t\t *  @private\n\t\t\t */\n\t        this._scaleRoomSize = new Tone.Scale(-0.733, 0.197);\n\t        /**\n\t\t\t *  a series of allpass filters\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._allpassFilters = [];\n\t        /**\n\t\t\t *  parallel feedback comb filters\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._feedbackCombFilters = [];\n\t        //make the allpass filters\n\t        for (var af = 0; af < allpassFilterFreqs.length; af++) {\n\t            var allpass = this.context.createBiquadFilter();\n\t            allpass.type = 'allpass';\n\t            allpass.frequency.value = allpassFilterFreqs[af];\n\t            this._allpassFilters.push(allpass);\n\t        }\n\t        //and the comb filters\n\t        for (var cf = 0; cf < combFilterDelayTimes.length; cf++) {\n\t            var fbcf = new Tone.FeedbackCombFilter(combFilterDelayTimes[cf], 0.1);\n\t            this._scaleRoomSize.connect(fbcf.resonance);\n\t            fbcf.resonance.value = combFilterResonances[cf];\n\t            this._allpassFilters[this._allpassFilters.length - 1].connect(fbcf);\n\t            if (cf < combFilterDelayTimes.length / 2) {\n\t                fbcf.connect(this.effectReturnL);\n\t            } else {\n\t                fbcf.connect(this.effectReturnR);\n\t            }\n\t            this._feedbackCombFilters.push(fbcf);\n\t        }\n\t        //chain the allpass filters together\n\t        this.roomSize.connect(this._scaleRoomSize);\n\t        Tone.connectSeries.apply(Tone, this._allpassFilters);\n\t        this.effectSendL.connect(this._allpassFilters[0]);\n\t        this.effectSendR.connect(this._allpassFilters[0]);\n\t        this._readOnly(['roomSize']);\n\t    };\n\t    Tone.extend(Tone.JCReverb, Tone.StereoEffect);\n\t    /**\n\t\t *  the default values\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.JCReverb.defaults = { 'roomSize': 0.5 };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.JCReverb} this\n\t\t */\n\t    Tone.JCReverb.prototype.dispose = function () {\n\t        Tone.StereoEffect.prototype.dispose.call(this);\n\t        for (var apf = 0; apf < this._allpassFilters.length; apf++) {\n\t            this._allpassFilters[apf].disconnect();\n\t            this._allpassFilters[apf] = null;\n\t        }\n\t        this._allpassFilters = null;\n\t        for (var fbcf = 0; fbcf < this._feedbackCombFilters.length; fbcf++) {\n\t            this._feedbackCombFilters[fbcf].dispose();\n\t            this._feedbackCombFilters[fbcf] = null;\n\t        }\n\t        this._feedbackCombFilters = null;\n\t        this._writable(['roomSize']);\n\t        this.roomSize.dispose();\n\t        this.roomSize = null;\n\t        this._scaleRoomSize.dispose();\n\t        this._scaleRoomSize = null;\n\t        return this;\n\t    };\n\t    return Tone.JCReverb;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Mid/Side processing separates the the 'mid' signal\n\t\t *         (which comes out of both the left and the right channel)\n\t\t *         and the 'side' (which only comes out of the the side channels)\n\t\t *         and effects them separately before being recombined.\n\t\t *         Applies a Mid/Side seperation and recombination.\n\t\t *         Algorithm found in [kvraudio forums](http://www.kvraudio.com/forum/viewtopic.php?t=212587).\n\t\t *         <br><br>\n\t\t *         This is a base-class for Mid/Side Effects.\n\t\t *\n\t\t *  @extends {Tone.Effect}\n\t\t *  @constructor\n\t\t */\n\t    Tone.MidSideEffect = function () {\n\t        Tone.Effect.apply(this, arguments);\n\t        /**\n\t\t\t *  The mid/side split\n\t\t\t *  @type  {Tone.MidSideSplit}\n\t\t\t *  @private\n\t\t\t */\n\t        this._midSideSplit = new Tone.MidSideSplit();\n\t        /**\n\t\t\t *  The mid/side merge\n\t\t\t *  @type  {Tone.MidSideMerge}\n\t\t\t *  @private\n\t\t\t */\n\t        this._midSideMerge = new Tone.MidSideMerge();\n\t        /**\n\t\t\t *  The mid send. Connect to mid processing\n\t\t\t *  @type {Tone}\n\t\t\t *  @private\n\t\t\t */\n\t        this.midSend = this._midSideSplit.mid;\n\t        /**\n\t\t\t *  The side send. Connect to side processing\n\t\t\t *  @type {Tone}\n\t\t\t *  @private\n\t\t\t */\n\t        this.sideSend = this._midSideSplit.side;\n\t        /**\n\t\t\t *  The mid return connection\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this.midReturn = this._midSideMerge.mid;\n\t        /**\n\t\t\t *  The side return connection\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this.sideReturn = this._midSideMerge.side;\n\t        //the connections\n\t        this.effectSend.connect(this._midSideSplit);\n\t        this._midSideMerge.connect(this.effectReturn);\n\t    };\n\t    Tone.extend(Tone.MidSideEffect, Tone.Effect);\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.MidSideEffect} this\n\t\t */\n\t    Tone.MidSideEffect.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._midSideSplit.dispose();\n\t        this._midSideSplit = null;\n\t        this._midSideMerge.dispose();\n\t        this._midSideMerge = null;\n\t        this.midSend = null;\n\t        this.sideSend = null;\n\t        this.midReturn = null;\n\t        this.sideReturn = null;\n\t        return this;\n\t    };\n\t    return Tone.MidSideEffect;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Phaser is a phaser effect. Phasers work by changing the phase\n\t\t *         of different frequency components of an incoming signal. Read more on\n\t\t *         [Wikipedia](https://en.wikipedia.org/wiki/Phaser_(effect)).\n\t\t *         Inspiration for this phaser comes from [Tuna.js](https://github.com/Dinahmoe/tuna/).\n\t\t *\n\t\t *\t@extends {Tone.StereoEffect}\n\t\t *\t@constructor\n\t\t *\t@param {Frequency|Object} [frequency] The speed of the phasing.\n\t\t *\t@param {number} [octaves] The octaves of the effect.\n\t\t *\t@param {Frequency} [baseFrequency] The base frequency of the filters.\n\t\t *\t@example\n\t\t * var phaser = new Tone.Phaser({\n\t\t * \t\"frequency\" : 15,\n\t\t * \t\"octaves\" : 5,\n\t\t * \t\"baseFrequency\" : 1000\n\t\t * }).toMaster();\n\t\t * var synth = new Tone.FMSynth().connect(phaser);\n\t\t * synth.triggerAttackRelease(\"E3\", \"2n\");\n\t\t */\n\t    Tone.Phaser = function () {\n\t        //set the defaults\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'octaves',\n\t            'baseFrequency'\n\t        ], Tone.Phaser);\n\t        Tone.StereoEffect.call(this, options);\n\t        /**\n\t\t\t *  the lfo which controls the frequency on the left side\n\t\t\t *  @type {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfoL = new Tone.LFO(options.frequency, 0, 1);\n\t        /**\n\t\t\t *  the lfo which controls the frequency on the right side\n\t\t\t *  @type {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfoR = new Tone.LFO(options.frequency, 0, 1);\n\t        this._lfoR.phase = 180;\n\t        /**\n\t\t\t *  the base modulation frequency\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._baseFrequency = options.baseFrequency;\n\t        /**\n\t\t\t *  the octaves of the phasing\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._octaves = options.octaves;\n\t        /**\n\t\t\t *  The quality factor of the filters\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.Q = new Tone.Signal(options.Q, Tone.Type.Positive);\n\t        /**\n\t\t\t *  the array of filters for the left side\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._filtersL = this._makeFilters(options.stages, this._lfoL, this.Q);\n\t        /**\n\t\t\t *  the array of filters for the left side\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._filtersR = this._makeFilters(options.stages, this._lfoR, this.Q);\n\t        /**\n\t\t\t * the frequency of the effect\n\t\t\t * @type {Tone.Signal}\n\t\t\t */\n\t        this.frequency = this._lfoL.frequency;\n\t        this.frequency.value = options.frequency;\n\t        //connect them up\n\t        this.effectSendL.connect(this._filtersL[0]);\n\t        this.effectSendR.connect(this._filtersR[0]);\n\t        this._filtersL[options.stages - 1].connect(this.effectReturnL);\n\t        this._filtersR[options.stages - 1].connect(this.effectReturnR);\n\t        //control the frequency with one LFO\n\t        this._lfoL.frequency.connect(this._lfoR.frequency);\n\t        //set the options\n\t        this.baseFrequency = options.baseFrequency;\n\t        this.octaves = options.octaves;\n\t        //start the lfo\n\t        this._lfoL.start();\n\t        this._lfoR.start();\n\t        this._readOnly([\n\t            'frequency',\n\t            'Q'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.Phaser, Tone.StereoEffect);\n\t    /**\n\t\t *  defaults\n\t\t *  @static\n\t\t *  @type {object}\n\t\t */\n\t    Tone.Phaser.defaults = {\n\t        'frequency': 0.5,\n\t        'octaves': 3,\n\t        'stages': 10,\n\t        'Q': 10,\n\t        'baseFrequency': 350\n\t    };\n\t    /**\n\t\t *  @param {number} stages\n\t\t *  @returns {Array} the number of filters all connected together\n\t\t *  @private\n\t\t */\n\t    Tone.Phaser.prototype._makeFilters = function (stages, connectToFreq, Q) {\n\t        var filters = new Array(stages);\n\t        //make all the filters\n\t        for (var i = 0; i < stages; i++) {\n\t            var filter = this.context.createBiquadFilter();\n\t            filter.type = 'allpass';\n\t            Q.connect(filter.Q);\n\t            connectToFreq.connect(filter.frequency);\n\t            filters[i] = filter;\n\t        }\n\t        Tone.connectSeries.apply(Tone, filters);\n\t        return filters;\n\t    };\n\t    /**\n\t\t * The number of octaves the phase goes above\n\t\t * the baseFrequency\n\t\t * @memberOf Tone.Phaser#\n\t\t * @type {Positive}\n\t\t * @name octaves\n\t\t */\n\t    Object.defineProperty(Tone.Phaser.prototype, 'octaves', {\n\t        get: function () {\n\t            return this._octaves;\n\t        },\n\t        set: function (octaves) {\n\t            this._octaves = octaves;\n\t            var max = this._baseFrequency * Math.pow(2, octaves);\n\t            this._lfoL.max = max;\n\t            this._lfoR.max = max;\n\t        }\n\t    });\n\t    /**\n\t\t * The the base frequency of the filters.\n\t\t * @memberOf Tone.Phaser#\n\t\t * @type {number}\n\t\t * @name baseFrequency\n\t\t */\n\t    Object.defineProperty(Tone.Phaser.prototype, 'baseFrequency', {\n\t        get: function () {\n\t            return this._baseFrequency;\n\t        },\n\t        set: function (freq) {\n\t            this._baseFrequency = freq;\n\t            this._lfoL.min = freq;\n\t            this._lfoR.min = freq;\n\t            this.octaves = this._octaves;\n\t        }\n\t    });\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Phaser} this\n\t\t */\n\t    Tone.Phaser.prototype.dispose = function () {\n\t        Tone.StereoEffect.prototype.dispose.call(this);\n\t        this._writable([\n\t            'frequency',\n\t            'Q'\n\t        ]);\n\t        this.Q.dispose();\n\t        this.Q = null;\n\t        this._lfoL.dispose();\n\t        this._lfoL = null;\n\t        this._lfoR.dispose();\n\t        this._lfoR = null;\n\t        for (var i = 0; i < this._filtersL.length; i++) {\n\t            this._filtersL[i].disconnect();\n\t            this._filtersL[i] = null;\n\t        }\n\t        this._filtersL = null;\n\t        for (var j = 0; j < this._filtersR.length; j++) {\n\t            this._filtersR[j].disconnect();\n\t            this._filtersR[j] = null;\n\t        }\n\t        this._filtersR = null;\n\t        this.frequency = null;\n\t        return this;\n\t    };\n\t    return Tone.Phaser;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Just like a stereo feedback effect, but the feedback is routed from left to right\n\t\t *         and right to left instead of on the same channel.\n\t\t *\n\t\t *\t@constructor\n\t\t *\t@extends {Tone.StereoEffect}\n\t\t */\n\t    Tone.StereoXFeedbackEffect = function () {\n\t        var options = Tone.defaults(arguments, ['feedback'], Tone.FeedbackEffect);\n\t        Tone.StereoEffect.call(this, options);\n\t        /**\n\t\t\t *  The amount of feedback from the output\n\t\t\t *  back into the input of the effect (routed\n\t\t\t *  across left and right channels).\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.feedback = new Tone.Signal(options.feedback, Tone.Type.NormalRange);\n\t        /**\n\t\t\t *  the left side feeback\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._feedbackLR = new Tone.Gain();\n\t        /**\n\t\t\t *  the right side feeback\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._feedbackRL = new Tone.Gain();\n\t        //connect it up\n\t        this.effectReturnL.chain(this._feedbackLR, this.effectSendR);\n\t        this.effectReturnR.chain(this._feedbackRL, this.effectSendL);\n\t        this.feedback.fan(this._feedbackLR.gain, this._feedbackRL.gain);\n\t        this._readOnly(['feedback']);\n\t    };\n\t    Tone.extend(Tone.StereoXFeedbackEffect, Tone.StereoEffect);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.StereoXFeedbackEffect} this\n\t\t */\n\t    Tone.StereoXFeedbackEffect.prototype.dispose = function () {\n\t        Tone.StereoEffect.prototype.dispose.call(this);\n\t        this._writable(['feedback']);\n\t        this.feedback.dispose();\n\t        this.feedback = null;\n\t        this._feedbackLR.dispose();\n\t        this._feedbackLR = null;\n\t        this._feedbackRL.dispose();\n\t        this._feedbackRL = null;\n\t        return this;\n\t    };\n\t    return Tone.StereoXFeedbackEffect;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.PingPongDelay is a feedback delay effect where the echo is heard\n\t\t *          first in one channel and next in the opposite channel. In a stereo\n\t\t *          system these are the right and left channels.\n\t\t *          PingPongDelay in more simplified terms is two Tone.FeedbackDelays\n\t\t *          with independent delay values. Each delay is routed to one channel\n\t\t *          (left or right), and the channel triggered second will always\n\t\t *          trigger at the same interval after the first.\n\t\t *\n\t\t * \t@constructor\n\t\t * \t@extends {Tone.StereoXFeedbackEffect}\n\t\t *  @param {Time|Object} [delayTime] The delayTime between consecutive echos.\n\t\t *  @param {NormalRange=} feedback The amount of the effected signal which\n\t\t *                                 is fed back through the delay.\n\t\t *  @example\n\t\t * var pingPong = new Tone.PingPongDelay(\"4n\", 0.2).toMaster();\n\t\t * var drum = new Tone.DrumSynth().connect(pingPong);\n\t\t * drum.triggerAttackRelease(\"C4\", \"32n\");\n\t\t */\n\t    Tone.PingPongDelay = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'delayTime',\n\t            'feedback'\n\t        ], Tone.PingPongDelay);\n\t        Tone.StereoXFeedbackEffect.call(this, options);\n\t        /**\n\t\t\t *  the delay node on the left side\n\t\t\t *  @type {Tone.Delay}\n\t\t\t *  @private\n\t\t\t */\n\t        this._leftDelay = new Tone.Delay(0, options.maxDelayTime);\n\t        /**\n\t\t\t *  the delay node on the right side\n\t\t\t *  @type {Tone.Delay}\n\t\t\t *  @private\n\t\t\t */\n\t        this._rightDelay = new Tone.Delay(0, options.maxDelayTime);\n\t        /**\n\t\t\t *  the predelay on the right side\n\t\t\t *  @type {Tone.Delay}\n\t\t\t *  @private\n\t\t\t */\n\t        this._rightPreDelay = new Tone.Delay(0, options.maxDelayTime);\n\t        /**\n\t\t\t *  the delay time signal\n\t\t\t *  @type {Time}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.delayTime = new Tone.Signal(options.delayTime, Tone.Type.Time);\n\t        //connect it up\n\t        this.effectSendL.chain(this._leftDelay, this.effectReturnL);\n\t        this.effectSendR.chain(this._rightPreDelay, this._rightDelay, this.effectReturnR);\n\t        this.delayTime.fan(this._leftDelay.delayTime, this._rightDelay.delayTime, this._rightPreDelay.delayTime);\n\t        //rearranged the feedback to be after the rightPreDelay\n\t        this._feedbackLR.disconnect();\n\t        this._feedbackLR.connect(this._rightDelay);\n\t        this._readOnly(['delayTime']);\n\t    };\n\t    Tone.extend(Tone.PingPongDelay, Tone.StereoXFeedbackEffect);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.PingPongDelay.defaults = {\n\t        'delayTime': 0.25,\n\t        'maxDelayTime': 1\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.PingPongDelay} this\n\t\t */\n\t    Tone.PingPongDelay.prototype.dispose = function () {\n\t        Tone.StereoXFeedbackEffect.prototype.dispose.call(this);\n\t        this._leftDelay.dispose();\n\t        this._leftDelay = null;\n\t        this._rightDelay.dispose();\n\t        this._rightDelay = null;\n\t        this._rightPreDelay.dispose();\n\t        this._rightPreDelay = null;\n\t        this._writable(['delayTime']);\n\t        this.delayTime.dispose();\n\t        this.delayTime = null;\n\t        return this;\n\t    };\n\t    return Tone.PingPongDelay;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.PitchShift does near-realtime pitch shifting to the incoming signal.\n\t\t *         The effect is achieved by speeding up or slowing down the delayTime\n\t\t *         of a DelayNode using a sawtooth wave.\n\t\t *         Algorithm found in [this pdf](http://dsp-book.narod.ru/soundproc.pdf).\n\t\t *         Additional reference by [Miller Pucket](http://msp.ucsd.edu/techniques/v0.11/book-html/node115.html).\n\t\t *\n\t\t *  @extends {Tone.FeedbackEffect}\n\t\t *  @param {Interval=} pitch The interval to transpose the incoming signal by.\n\t\t */\n\t    Tone.PitchShift = function () {\n\t        var options = Tone.defaults(arguments, ['pitch'], Tone.PitchShift);\n\t        Tone.FeedbackEffect.call(this, options);\n\t        /**\n\t\t\t *  The pitch signal\n\t\t\t *  @type  {Tone.Signal}\n\t\t\t *  @private\n\t\t\t */\n\t        this._frequency = new Tone.Signal(0);\n\t        /**\n\t\t\t *  Uses two DelayNodes to cover up the jump in\n\t\t\t *  the sawtooth wave.\n\t\t\t *  @type  {DelayNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delayA = new Tone.Delay(0, 1);\n\t        /**\n\t\t\t *  The first LFO.\n\t\t\t *  @type  {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfoA = new Tone.LFO({\n\t            'min': 0,\n\t            'max': 0.1,\n\t            'type': 'sawtooth'\n\t        }).connect(this._delayA.delayTime);\n\t        /**\n\t\t\t *  The second DelayNode\n\t\t\t *  @type  {DelayNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delayB = new Tone.Delay(0, 1);\n\t        /**\n\t\t\t *  The first LFO.\n\t\t\t *  @type  {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfoB = new Tone.LFO({\n\t            'min': 0,\n\t            'max': 0.1,\n\t            'type': 'sawtooth',\n\t            'phase': 180\n\t        }).connect(this._delayB.delayTime);\n\t        /**\n\t\t\t *  Crossfade quickly between the two delay lines\n\t\t\t *  to cover up the jump in the sawtooth wave\n\t\t\t *  @type  {Tone.CrossFade}\n\t\t\t *  @private\n\t\t\t */\n\t        this._crossFade = new Tone.CrossFade();\n\t        /**\n\t\t\t *  LFO which alternates between the two\n\t\t\t *  delay lines to cover up the disparity in the\n\t\t\t *  sawtooth wave.\n\t\t\t *  @type  {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._crossFadeLFO = new Tone.LFO({\n\t            'min': 0,\n\t            'max': 1,\n\t            'type': 'triangle',\n\t            'phase': 90\n\t        }).connect(this._crossFade.fade);\n\t        /**\n\t\t\t *  The delay node\n\t\t\t *  @type {Tone.Delay}\n\t\t\t *  @private\n\t\t\t */\n\t        this._feedbackDelay = new Tone.Delay(options.delayTime);\n\t        /**\n\t\t\t *  The amount of delay on the input signal\n\t\t\t *  @type {Time}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.delayTime = this._feedbackDelay.delayTime;\n\t        this._readOnly('delayTime');\n\t        /**\n\t\t\t *  Hold the current pitch\n\t\t\t *  @type {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._pitch = options.pitch;\n\t        /**\n\t\t\t *  Hold the current windowSize\n\t\t\t *  @type {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._windowSize = options.windowSize;\n\t        //connect the two delay lines up\n\t        this._delayA.connect(this._crossFade.a);\n\t        this._delayB.connect(this._crossFade.b);\n\t        //connect the frequency\n\t        this._frequency.fan(this._lfoA.frequency, this._lfoB.frequency, this._crossFadeLFO.frequency);\n\t        //route the input\n\t        this.effectSend.fan(this._delayA, this._delayB);\n\t        this._crossFade.chain(this._feedbackDelay, this.effectReturn);\n\t        //start the LFOs at the same time\n\t        var now = this.now();\n\t        this._lfoA.start(now);\n\t        this._lfoB.start(now);\n\t        this._crossFadeLFO.start(now);\n\t        //set the initial value\n\t        this.windowSize = this._windowSize;\n\t    };\n\t    Tone.extend(Tone.PitchShift, Tone.FeedbackEffect);\n\t    /**\n\t\t *  default values\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.PitchShift.defaults = {\n\t        'pitch': 0,\n\t        'windowSize': 0.1,\n\t        'delayTime': 0,\n\t        'feedback': 0\n\t    };\n\t    /**\n\t\t * Repitch the incoming signal by some interval (measured\n\t\t * in semi-tones).\n\t\t * @memberOf Tone.PitchShift#\n\t\t * @type {Interval}\n\t\t * @name pitch\n\t\t * @example\n\t\t * pitchShift.pitch = -12; //down one octave\n\t\t * pitchShift.pitch = 7; //up a fifth\n\t\t */\n\t    Object.defineProperty(Tone.PitchShift.prototype, 'pitch', {\n\t        get: function () {\n\t            return this._pitch;\n\t        },\n\t        set: function (interval) {\n\t            this._pitch = interval;\n\t            var factor = 0;\n\t            if (interval < 0) {\n\t                this._lfoA.min = 0;\n\t                this._lfoA.max = this._windowSize;\n\t                this._lfoB.min = 0;\n\t                this._lfoB.max = this._windowSize;\n\t                factor = Tone.intervalToFrequencyRatio(interval - 1) + 1;\n\t            } else {\n\t                this._lfoA.min = this._windowSize;\n\t                this._lfoA.max = 0;\n\t                this._lfoB.min = this._windowSize;\n\t                this._lfoB.max = 0;\n\t                factor = Tone.intervalToFrequencyRatio(interval) - 1;\n\t            }\n\t            this._frequency.value = factor * (1.2 / this._windowSize);\n\t        }\n\t    });\n\t    /**\n\t\t * The window size corresponds roughly to the sample length in a looping sampler.\n\t\t * Smaller values are desirable for a less noticeable delay time of the pitch shifted\n\t\t * signal, but larger values will result in smoother pitch shifting for larger intervals.\n\t\t * A nominal range of 0.03 to 0.1 is recommended.\n\t\t * @memberOf Tone.PitchShift#\n\t\t * @type {Time}\n\t\t * @name windowSize\n\t\t * @example\n\t\t * pitchShift.windowSize = 0.1;\n\t\t */\n\t    Object.defineProperty(Tone.PitchShift.prototype, 'windowSize', {\n\t        get: function () {\n\t            return this._windowSize;\n\t        },\n\t        set: function (size) {\n\t            this._windowSize = this.toSeconds(size);\n\t            this.pitch = this._pitch;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.PitchShift}  this\n\t\t */\n\t    Tone.PitchShift.prototype.dispose = function () {\n\t        Tone.FeedbackEffect.prototype.dispose.call(this);\n\t        this._frequency.dispose();\n\t        this._frequency = null;\n\t        this._delayA.disconnect();\n\t        this._delayA = null;\n\t        this._delayB.disconnect();\n\t        this._delayB = null;\n\t        this._lfoA.dispose();\n\t        this._lfoA = null;\n\t        this._lfoB.dispose();\n\t        this._lfoB = null;\n\t        this._crossFade.dispose();\n\t        this._crossFade = null;\n\t        this._crossFadeLFO.dispose();\n\t        this._crossFadeLFO = null;\n\t        this._writable('delayTime');\n\t        this._feedbackDelay.dispose();\n\t        this._feedbackDelay = null;\n\t        this.delayTime = null;\n\t        return this;\n\t    };\n\t    return Tone.PitchShift;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Wrapper around the native BufferSourceNode.\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param  {AudioBuffer|Tone.Buffer}  buffer   The buffer to play\n\t\t *  @param  {Function}  onload  The callback to invoke when the\n\t\t *                               buffer is done playing.\n\t\t */\n\t    Tone.BufferSource = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'buffer',\n\t            'onload'\n\t        ], Tone.BufferSource);\n\t        Tone.AudioNode.call(this, options);\n\t        /**\n\t\t\t *  The callback to invoke after the\n\t\t\t *  buffer source is done playing.\n\t\t\t *  @type  {Function}\n\t\t\t */\n\t        this.onended = options.onended;\n\t        /**\n\t\t\t *  The time that the buffer was started.\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._startTime = -1;\n\t        /**\n\t\t\t *  An additional flag if the actual BufferSourceNode\n\t\t\t *  has been started. b/c stopping an unstarted buffer\n\t\t\t *  will throw it into an invalid state\n\t\t\t *  @type  {Boolean}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sourceStarted = false;\n\t        /**\n\t\t\t *  Flag if the source has already been stopped\n\t\t\t *  @type  {Boolean}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sourceStopped = false;\n\t        /**\n\t\t\t *  The time that the buffer is scheduled to stop.\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._stopTime = -1;\n\t        /**\n\t\t\t *  The gain node which envelopes the BufferSource\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._gainNode = this.output = new Tone.Gain();\n\t        /**\n\t\t\t *  The buffer source\n\t\t\t *  @type  {AudioBufferSourceNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._source = this.context.createBufferSource();\n\t        this._source.connect(this._gainNode);\n\t        this._source.onended = this._onended.bind(this);\n\t        /**\n\t\t\t * The private buffer instance\n\t\t\t * @type {Tone.Buffer}\n\t\t\t * @private\n\t\t\t */\n\t        this._buffer = new Tone.Buffer(options.buffer, options.onload);\n\t        /**\n\t\t\t *  The playbackRate of the buffer\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.playbackRate = new Tone.Param(this._source.playbackRate, Tone.Type.Positive);\n\t        /**\n\t\t\t *  The fadeIn time of the amplitude envelope.\n\t\t\t *  @type {Time}\n\t\t\t */\n\t        this.fadeIn = options.fadeIn;\n\t        /**\n\t\t\t *  The fadeOut time of the amplitude envelope.\n\t\t\t *  @type {Time}\n\t\t\t */\n\t        this.fadeOut = options.fadeOut;\n\t        /**\n\t\t\t * The curve applied to the fades, either \"linear\" or \"exponential\"\n\t\t\t * @type {String}\n\t\t\t */\n\t        this.curve = options.curve;\n\t        /**\n\t\t\t *  The value that the buffer ramps to\n\t\t\t *  @type {Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._gain = 1;\n\t        /**\n\t\t\t * The onended timeout\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t        this._onendedTimeout = -1;\n\t        //set some values initially\n\t        this.loop = options.loop;\n\t        this.loopStart = options.loopStart;\n\t        this.loopEnd = options.loopEnd;\n\t        this.playbackRate.value = options.playbackRate;\n\t    };\n\t    Tone.extend(Tone.BufferSource, Tone.AudioNode);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.BufferSource.defaults = {\n\t        'onended': Tone.noOp,\n\t        'onload': Tone.noOp,\n\t        'loop': false,\n\t        'loopStart': 0,\n\t        'loopEnd': 0,\n\t        'fadeIn': 0,\n\t        'fadeOut': 0,\n\t        'curve': 'linear',\n\t        'playbackRate': 1\n\t    };\n\t    /**\n\t\t *  Returns the playback state of the source, either \"started\" or \"stopped\".\n\t\t *  @type {Tone.State}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.BufferSource#\n\t\t *  @name state\n\t\t */\n\t    Object.defineProperty(Tone.BufferSource.prototype, 'state', {\n\t        get: function () {\n\t            return this.getStateAtTime(this.now());\n\t        }\n\t    });\n\t    /**\n\t\t *  Get the playback state at the given time\n\t\t *  @param  {Time}  time  The time to test the state at\n\t\t *  @return  {Tone.State}  The playback state. \n\t\t */\n\t    Tone.BufferSource.prototype.getStateAtTime = function (time) {\n\t        time = this.toSeconds(time);\n\t        if (this._startTime !== -1 && time >= this._startTime && !this._sourceStopped) {\n\t            return Tone.State.Started;\n\t        } else {\n\t            return Tone.State.Stopped;\n\t        }\n\t    };\n\t    /**\n\t\t *  Start the buffer\n\t\t *  @param  {Time} [startTime=now] When the player should start.\n\t\t *  @param  {Time} [offset=0] The offset from the beginning of the sample\n\t\t *                                 to start at.\n\t\t *  @param  {Time=} duration How long the sample should play. If no duration\n\t\t *                                is given, it will default to the full length\n\t\t *                                of the sample (minus any offset)\n\t\t *  @param  {Gain}  [gain=1]  The gain to play the buffer back at.\n\t\t *  @param  {Time=}  fadeInTime  The optional fadeIn ramp time.\n\t\t *  @return  {Tone.BufferSource}  this\n\t\t */\n\t    Tone.BufferSource.prototype.start = function (time, offset, duration, gain, fadeInTime) {\n\t        if (this._startTime !== -1) {\n\t            throw new Error('Tone.BufferSource can only be started once.');\n\t        }\n\t        if (!this.buffer.loaded) {\n\t            throw new Error('Tone.BufferSource: buffer is either not set or not loaded.');\n\t        }\n\t        time = this.toSeconds(time);\n\t        //if it's a loop the default offset is the loopstart point\n\t        if (this.loop) {\n\t            offset = Tone.defaultArg(offset, this.loopStart);\n\t        } else {\n\t            //otherwise the default offset is 0\n\t            offset = Tone.defaultArg(offset, 0);\n\t        }\n\t        offset = this.toSeconds(offset);\n\t        gain = Tone.defaultArg(gain, 1);\n\t        this._gain = gain;\n\t        fadeInTime = this.toSeconds(Tone.defaultArg(fadeInTime, this.fadeIn));\n\t        this.fadeIn = fadeInTime;\n\t        if (fadeInTime > 0) {\n\t            this._gainNode.gain.setValueAtTime(0, time);\n\t            if (this.curve === 'linear') {\n\t                this._gainNode.gain.linearRampToValueAtTime(this._gain, time + fadeInTime);\n\t            } else {\n\t                this._gainNode.gain.exponentialApproachValueAtTime(this._gain, time, fadeInTime);\n\t            }\n\t        } else {\n\t            this._gainNode.gain.setValueAtTime(gain, time);\n\t        }\n\t        this._startTime = time;\n\t        var computedDur = this.toSeconds(Tone.defaultArg(duration, this.buffer.duration - offset % this.buffer.duration));\n\t        computedDur = Math.max(computedDur, 0);\n\t        if (Tone.isDefined(duration)) {\n\t            //clip the duration when not looping\n\t            if (!this.loop) {\n\t                computedDur = Math.min(computedDur, this.buffer.duration - offset % this.buffer.duration);\n\t            }\n\t            this.stop(time + computedDur, this.fadeOut);\n\t        }\n\t        //start the buffer source\n\t        if (this.loop) {\n\t            //modify the offset if it's greater than the loop time\n\t            var loopEnd = this.loopEnd || this.buffer.duration;\n\t            var loopStart = this.loopStart;\n\t            var loopDuration = loopEnd - loopStart;\n\t            //move the offset back\n\t            if (offset >= loopEnd) {\n\t                offset = (offset - loopStart) % loopDuration + loopStart;\n\t            }\n\t        }\n\t        this._source.buffer = this.buffer.get();\n\t        this._source.loopEnd = this.loopEnd || this.buffer.duration;\n\t        if (offset < this.buffer.duration) {\n\t            this._sourceStarted = true;\n\t            this._source.start(time, offset);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Stop the buffer. Optionally add a ramp time to fade the\n\t\t *  buffer out.\n\t\t *  @param  {Time=}  time         The time the buffer should stop.\n\t\t *  @param  {Time=}  fadeOutTime  How long the gain should fade out for\n\t\t *  @return  {Tone.BufferSource}  this\n\t\t */\n\t    Tone.BufferSource.prototype.stop = function (time, fadeOutTime) {\n\t        if (!this.buffer.loaded) {\n\t            throw new Error('Tone.BufferSource: buffer is either not set or not loaded.');\n\t        }\n\t        if (this._sourceStopped) {\n\t            return;\n\t        }\n\t        time = this.toSeconds(time);\n\t        //if the event has already been scheduled, clear it\n\t        if (this._stopTime !== -1) {\n\t            this.cancelStop();\n\t        }\n\t        //stop if it's schedule before the start time\n\t        if (time <= this._startTime) {\n\t            this._gainNode.gain.cancelScheduledValues(time);\n\t            this._gainNode.gain.value = 0;\n\t            return this;\n\t        }\n\t        time = Math.max(this._startTime + this.fadeIn + this.sampleTime, time);\n\t        //cancel the previous curve\n\t        this._gainNode.gain.cancelScheduledValues(time);\n\t        this._stopTime = time;\n\t        //the fadeOut time\n\t        fadeOutTime = this.toSeconds(Tone.defaultArg(fadeOutTime, this.fadeOut));\n\t        var heldDuration = time - this._startTime - this.fadeIn - this.sampleTime;\n\t        if (!this.loop) {\n\t            //make sure the fade does not go beyond the length of the buffer\n\t            heldDuration = Math.min(heldDuration, this.buffer.duration);\n\t        }\n\t        fadeOutTime = Math.min(heldDuration, fadeOutTime);\n\t        var startFade = time - fadeOutTime;\n\t        if (fadeOutTime > this.sampleTime) {\n\t            this._gainNode.gain.setValueAtTime(this._gain, startFade);\n\t            if (this.curve === 'linear') {\n\t                this._gainNode.gain.linearRampToValueAtTime(0, time);\n\t            } else {\n\t                this._gainNode.gain.exponentialApproachValueAtTime(0, startFade, fadeOutTime);\n\t            }\n\t        } else {\n\t            this._gainNode.gain.setValueAtTime(0, time);\n\t        }\n\t        Tone.context.clearTimeout(this._onendedTimeout);\n\t        this._onendedTimeout = Tone.context.setTimeout(this._onended.bind(this), this._stopTime - this.now());\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancel a scheduled stop event\n\t\t *  @return  {Tone.BufferSource}  this\n\t\t */\n\t    Tone.BufferSource.prototype.cancelStop = function () {\n\t        if (this._startTime !== -1 && !this._sourceStopped) {\n\t            //cancel the stop envelope\n\t            var fadeInTime = this.toSeconds(this.fadeIn);\n\t            this._gainNode.gain.cancelScheduledValues(this._startTime + fadeInTime + this.sampleTime);\n\t            this._gainNode.gain.setValueAtTime(1, Math.max(this.now(), this._startTime + fadeInTime + this.sampleTime));\n\t            this.context.clearTimeout(this._onendedTimeout);\n\t            this._stopTime = -1;\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Internal callback when the buffer is ended.\n\t\t *  Invokes `onended` and disposes the node.\n\t\t *  @private\n\t\t */\n\t    Tone.BufferSource.prototype._onended = function () {\n\t        if (!this._sourceStopped) {\n\t            this._sourceStopped = true;\n\t            //allow additional time for the exponential curve to fully decay\n\t            var additionalTail = this.curve === 'exponential' ? this.fadeOut * 2 : 0;\n\t            if (this._sourceStarted && this._stopTime !== -1) {\n\t                this._source.stop(this._stopTime + additionalTail);\n\t            }\n\t            this.onended(this);\n\t        }\n\t    };\n\t    /**\n\t\t * If loop is true, the loop will start at this position.\n\t\t * @memberOf Tone.BufferSource#\n\t\t * @type {Time}\n\t\t * @name loopStart\n\t\t */\n\t    Object.defineProperty(Tone.BufferSource.prototype, 'loopStart', {\n\t        get: function () {\n\t            return this._source.loopStart;\n\t        },\n\t        set: function (loopStart) {\n\t            this._source.loopStart = this.toSeconds(loopStart);\n\t        }\n\t    });\n\t    /**\n\t\t * If loop is true, the loop will end at this position.\n\t\t * @memberOf Tone.BufferSource#\n\t\t * @type {Time}\n\t\t * @name loopEnd\n\t\t */\n\t    Object.defineProperty(Tone.BufferSource.prototype, 'loopEnd', {\n\t        get: function () {\n\t            return this._source.loopEnd;\n\t        },\n\t        set: function (loopEnd) {\n\t            this._source.loopEnd = this.toSeconds(loopEnd);\n\t        }\n\t    });\n\t    /**\n\t\t * The audio buffer belonging to the player.\n\t\t * @memberOf Tone.BufferSource#\n\t\t * @type {Tone.Buffer}\n\t\t * @name buffer\n\t\t */\n\t    Object.defineProperty(Tone.BufferSource.prototype, 'buffer', {\n\t        get: function () {\n\t            return this._buffer;\n\t        },\n\t        set: function (buffer) {\n\t            this._buffer.set(buffer);\n\t        }\n\t    });\n\t    /**\n\t\t * If the buffer should loop once it's over.\n\t\t * @memberOf Tone.BufferSource#\n\t\t * @type {Boolean}\n\t\t * @name loop\n\t\t */\n\t    Object.defineProperty(Tone.BufferSource.prototype, 'loop', {\n\t        get: function () {\n\t            return this._source.loop;\n\t        },\n\t        set: function (loop) {\n\t            this._source.loop = loop;\n\t            this.cancelStop();\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.BufferSource}  this\n\t\t */\n\t    Tone.BufferSource.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this.onended = null;\n\t        this._source.onended = null;\n\t        this._source.disconnect();\n\t        this._source = null;\n\t        this._gainNode.dispose();\n\t        this._gainNode = null;\n\t        this._buffer.dispose();\n\t        this._buffer = null;\n\t        this._startTime = -1;\n\t        this.playbackRate = null;\n\t        Tone.context.clearTimeout(this._onendedTimeout);\n\t        return this;\n\t    };\n\t    return Tone.BufferSource;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Noise is a noise generator. It uses looped noise buffers to save on performance.\n\t\t *          Tone.Noise supports the noise types: \"pink\", \"white\", and \"brown\". Read more about\n\t\t *          colors of noise on [Wikipedia](https://en.wikipedia.org/wiki/Colors_of_noise).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Source}\n\t\t *  @param {string} type the noise type (white|pink|brown)\n\t\t *  @example\n\t\t * //initialize the noise and start\n\t\t * var noise = new Tone.Noise(\"pink\").start();\n\t\t *\n\t\t * //make an autofilter to shape the noise\n\t\t * var autoFilter = new Tone.AutoFilter({\n\t\t * \t\"frequency\" : \"8m\",\n\t\t * \t\"min\" : 800,\n\t\t * \t\"max\" : 15000\n\t\t * }).connect(Tone.Master);\n\t\t *\n\t\t * //connect the noise\n\t\t * noise.connect(autoFilter);\n\t\t * //start the autofilter LFO\n\t\t * autoFilter.start()\n\t\t */\n\t    Tone.Noise = function () {\n\t        var options = Tone.defaults(arguments, ['type'], Tone.Noise);\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  @private\n\t\t\t *  @type {AudioBufferSourceNode}\n\t\t\t */\n\t        this._source = null;\n\t        /**\n\t\t\t *  the buffer\n\t\t\t *  @private\n\t\t\t *  @type {AudioBuffer}\n\t\t\t */\n\t        this._type = options.type;\n\t        /**\n\t\t\t *  The playback rate of the noise. Affects\n\t\t\t *  the \"frequency\" of the noise.\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t */\n\t        this._playbackRate = options.playbackRate;\n\t    };\n\t    Tone.extend(Tone.Noise, Tone.Source);\n\t    /**\n\t\t *  the default parameters\n\t\t *\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Noise.defaults = {\n\t        'type': 'white',\n\t        'playbackRate': 1\n\t    };\n\t    /**\n\t\t * The type of the noise. Can be \"white\", \"brown\", or \"pink\".\n\t\t * @memberOf Tone.Noise#\n\t\t * @type {string}\n\t\t * @name type\n\t\t * @example\n\t\t * noise.type = \"white\";\n\t\t */\n\t    Object.defineProperty(Tone.Noise.prototype, 'type', {\n\t        get: function () {\n\t            return this._type;\n\t        },\n\t        set: function (type) {\n\t            if (this._type !== type) {\n\t                if (type in _noiseBuffers) {\n\t                    this._type = type;\n\t                    //if it's playing, stop and restart it\n\t                    if (this.state === Tone.State.Started) {\n\t                        var now = this.now();\n\t                        this._stop(now);\n\t                        this._start(now);\n\t                    }\n\t                } else {\n\t                    throw new TypeError('Tone.Noise: invalid type: ' + type);\n\t                }\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  The playback rate of the noise. Affects\n\t\t *  the \"frequency\" of the noise.\n\t\t *  @type {Positive}\n\t\t *  @signal\n\t\t */\n\t    Object.defineProperty(Tone.Noise.prototype, 'playbackRate', {\n\t        get: function () {\n\t            return this._playbackRate;\n\t        },\n\t        set: function (rate) {\n\t            this._playbackRate = rate;\n\t            if (this._source) {\n\t                this._source.playbackRate.value = rate;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  internal start method\n\t\t *\n\t\t *  @param {Time} time\n\t\t *  @private\n\t\t */\n\t    Tone.Noise.prototype._start = function (time) {\n\t        var buffer = _noiseBuffers[this._type];\n\t        this._source = new Tone.BufferSource(buffer).connect(this.output);\n\t        this._source.loop = true;\n\t        this._source.playbackRate.value = this._playbackRate;\n\t        this._source.start(this.toSeconds(time), Math.random() * (buffer.duration - 0.001));\n\t    };\n\t    /**\n\t\t *  internal stop method\n\t\t *\n\t\t *  @param {Time} time\n\t\t *  @private\n\t\t */\n\t    Tone.Noise.prototype._stop = function (time) {\n\t        if (this._source) {\n\t            this._source.stop(this.toSeconds(time));\n\t            this._source = null;\n\t        }\n\t    };\n\t    /**\n\t\t * Restarts the noise.\n\t\t * @param  {[type]} time [description]\n\t\t * @return {[type]}      [description]\n\t\t */\n\t    Tone.Noise.prototype.restart = function (time) {\n\t        //TODO could be optimized by cancelling the buffer source 'stop'\n\t        //stop and restart\n\t        this._stop(time);\n\t        this._start(time);\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Noise} this\n\t\t */\n\t    Tone.Noise.prototype.dispose = function () {\n\t        Tone.Source.prototype.dispose.call(this);\n\t        if (this._source !== null) {\n\t            this._source.disconnect();\n\t            this._source = null;\n\t        }\n\t        this._buffer = null;\n\t        return this;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    // THE BUFFERS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //Noise buffer stats\n\t    var bufferLength = 44100 * 5;\n\t    var channels = 2;\n\t    /**\n\t\t *\tThe noise arrays. Generated on initialization.\n\t\t *  borrowed heavily from https://github.com/zacharydenton/noise.js\n\t\t *  (c) 2013 Zach Denton (MIT)\n\t\t *  @static\n\t\t *  @private\n\t\t *  @type {Array}\n\t\t */\n\t    var _noiseArrays = {\n\t        'pink': function () {\n\t            var buffer = [];\n\t            for (var channelNum = 0; channelNum < channels; channelNum++) {\n\t                var channel = new Float32Array(bufferLength);\n\t                buffer[channelNum] = channel;\n\t                var b0, b1, b2, b3, b4, b5, b6;\n\t                b0 = b1 = b2 = b3 = b4 = b5 = b6 = 0;\n\t                for (var i = 0; i < bufferLength; i++) {\n\t                    var white = Math.random() * 2 - 1;\n\t                    b0 = 0.99886 * b0 + white * 0.0555179;\n\t                    b1 = 0.99332 * b1 + white * 0.0750759;\n\t                    b2 = 0.969 * b2 + white * 0.153852;\n\t                    b3 = 0.8665 * b3 + white * 0.3104856;\n\t                    b4 = 0.55 * b4 + white * 0.5329522;\n\t                    b5 = -0.7616 * b5 - white * 0.016898;\n\t                    channel[i] = b0 + b1 + b2 + b3 + b4 + b5 + b6 + white * 0.5362;\n\t                    channel[i] *= 0.11;\n\t                    // (roughly) compensate for gain\n\t                    b6 = white * 0.115926;\n\t                }\n\t            }\n\t            return buffer;\n\t        }(),\n\t        'brown': function () {\n\t            var buffer = [];\n\t            for (var channelNum = 0; channelNum < channels; channelNum++) {\n\t                var channel = new Float32Array(bufferLength);\n\t                buffer[channelNum] = channel;\n\t                var lastOut = 0;\n\t                for (var i = 0; i < bufferLength; i++) {\n\t                    var white = Math.random() * 2 - 1;\n\t                    channel[i] = (lastOut + 0.02 * white) / 1.02;\n\t                    lastOut = channel[i];\n\t                    channel[i] *= 3.5;    // (roughly) compensate for gain\n\t                }\n\t            }\n\t            return buffer;\n\t        }(),\n\t        'white': function () {\n\t            var buffer = [];\n\t            for (var channelNum = 0; channelNum < channels; channelNum++) {\n\t                var channel = new Float32Array(bufferLength);\n\t                buffer[channelNum] = channel;\n\t                for (var i = 0; i < bufferLength; i++) {\n\t                    channel[i] = Math.random() * 2 - 1;\n\t                }\n\t            }\n\t            return buffer;\n\t        }()\n\t    };\n\t    /**\n\t\t *\tstatic noise buffers\n\t\t *  @static\n\t\t *  @private\n\t\t *  @type {Tone.Buffer}\n\t\t */\n\t    var _noiseBuffers = {};\n\t    //create the Tone.Buffers\n\t    function createBuffers() {\n\t        for (var type in _noiseArrays) {\n\t            _noiseBuffers[type] = new Tone.Buffer().fromArray(_noiseArrays[type]);\n\t        }\n\t    }\n\t    //create the noise buffers\n\t    Tone.getContext(createBuffers);\n\t    Tone.Context.on('init', createBuffers);\n\t    return Tone.Noise;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Simple convolution created with decaying noise.\n\t\t *  \t\tGenerates an Impulse Response Buffer\n\t\t * \t\t\twith Tone.Offline then feeds the IR into ConvolverNode.\n\t\t * \t\t\tNote: the Reverb will not make any sound until [generate](#generate)\n\t\t * \t\t\thas been invoked and resolved.\n\t\t *\n\t\t * \t\t\tInspiration from [ReverbGen](https://github.com/adelespinasse/reverbGen).\n\t\t * \t\t\tCopyright (c) 2014 Alan deLespinasse Apache 2.0 License.\n\t\t *\n\t\t *  @extends {Tone.Convolver}\n\t\t *  @param {Time=} decay The amount of time it will reverberate for.\n\t\t */\n\t    Tone.Reverb = function () {\n\t        var options = Tone.defaults(arguments, ['decay'], Tone.Reverb);\n\t        Tone.Effect.call(this, options);\n\t        /**\n\t\t\t *  Convolver node\n\t\t\t *  @type {ConvolverNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._convolver = this.context.createConvolver();\n\t        /**\n\t\t\t * The duration of the reverb\n\t\t\t * @type {Time}\n\t\t\t */\n\t        this.decay = options.decay;\n\t        /**\n\t\t\t * The amount of time before the reverb is fully\n\t\t\t * ramped in.\n\t\t\t * @type {Time}\n\t\t\t */\n\t        this.preDelay = options.preDelay;\n\t        this.connectEffect(this._convolver);\n\t    };\n\t    Tone.extend(Tone.Reverb, Tone.Effect);\n\t    /**\n\t\t * The defaults\n\t\t * @type {Object}\n\t\t * @static\n\t\t */\n\t    Tone.Reverb.defaults = {\n\t        'decay': 1.5,\n\t        'preDelay': 0.01\n\t    };\n\t    /**\n\t\t * Generate the Impulse Response. Returns a promise while the IR is being\n\t\t * generated.\n\t\t * @return {Promise<Tone.Reverb>} Promise which returns this object.\n\t\t */\n\t    Tone.Reverb.prototype.generate = function () {\n\t        return Tone.Offline(function () {\n\t            //create a noise burst which decays over the duration\n\t            var noiseL = new Tone.Noise();\n\t            var noiseR = new Tone.Noise();\n\t            var merge = new Tone.Merge();\n\t            noiseL.connect(merge.left);\n\t            noiseR.connect(merge.right);\n\t            var gainNode = new Tone.Gain().toMaster();\n\t            merge.connect(gainNode);\n\t            noiseL.start(0);\n\t            noiseR.start(0);\n\t            //short fade in\n\t            gainNode.gain.setValueAtTime(0, 0);\n\t            gainNode.gain.linearRampToValueAtTime(1, this.preDelay);\n\t            //decay\n\t            gainNode.gain.exponentialApproachValueAtTime(0, this.preDelay, this.decay - this.preDelay);\n\t        }.bind(this), this.decay).then(function (buffer) {\n\t            this._convolver.buffer = buffer.get();\n\t            return this;\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.Reverb}  this\n\t\t */\n\t    Tone.Reverb.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._convolver.disconnect();\n\t        this._convolver = null;\n\t        return this;\n\t    };\n\t    return Tone.Reverb;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Base class for stereo feedback effects where the effectReturn\n\t\t *         is fed back into the same channel.\n\t\t *\n\t\t *\t@constructor\n\t\t *\t@extends {Tone.StereoEffect}\n\t\t */\n\t    Tone.StereoFeedbackEffect = function () {\n\t        var options = Tone.defaults(arguments, ['feedback'], Tone.FeedbackEffect);\n\t        Tone.StereoEffect.call(this, options);\n\t        /**\n\t\t\t *  controls the amount of feedback\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.feedback = new Tone.Signal(options.feedback, Tone.Type.NormalRange);\n\t        /**\n\t\t\t *  the left side feeback\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._feedbackL = new Tone.Gain();\n\t        /**\n\t\t\t *  the right side feeback\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._feedbackR = new Tone.Gain();\n\t        //connect it up\n\t        this.effectReturnL.chain(this._feedbackL, this.effectSendL);\n\t        this.effectReturnR.chain(this._feedbackR, this.effectSendR);\n\t        this.feedback.fan(this._feedbackL.gain, this._feedbackR.gain);\n\t        this._readOnly(['feedback']);\n\t    };\n\t    Tone.extend(Tone.StereoFeedbackEffect, Tone.StereoEffect);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.StereoFeedbackEffect} this\n\t\t */\n\t    Tone.StereoFeedbackEffect.prototype.dispose = function () {\n\t        Tone.StereoEffect.prototype.dispose.call(this);\n\t        this._writable(['feedback']);\n\t        this.feedback.dispose();\n\t        this.feedback = null;\n\t        this._feedbackL.dispose();\n\t        this._feedbackL = null;\n\t        this._feedbackR.dispose();\n\t        this._feedbackR = null;\n\t        return this;\n\t    };\n\t    return Tone.StereoFeedbackEffect;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Applies a width factor to the mid/side seperation.\n\t\t *         0 is all mid and 1 is all side.\n\t\t *         Algorithm found in [kvraudio forums](http://www.kvraudio.com/forum/viewtopic.php?t=212587).\n\t\t *         <br><br>\n\t\t *         <code>\n\t\t *         Mid *= 2*(1-width)<br>\n\t\t *         Side *= 2*width\n\t\t *         </code>\n\t\t *\n\t\t *  @extends {Tone.MidSideEffect}\n\t\t *  @constructor\n\t\t *  @param {NormalRange|Object} [width] The stereo width. A width of 0 is mono and 1 is stereo. 0.5 is no change.\n\t\t */\n\t    Tone.StereoWidener = function () {\n\t        var options = Tone.defaults(arguments, ['width'], Tone.StereoWidener);\n\t        Tone.MidSideEffect.call(this, options);\n\t        /**\n\t\t\t *  The width control. 0 = 100% mid. 1 = 100% side. 0.5 = no change.\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.width = new Tone.Signal(options.width, Tone.Type.NormalRange);\n\t        this._readOnly(['width']);\n\t        /**\n\t\t\t * Two times the (1-width) for the mid channel\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t        this._twoTimesWidthMid = new Tone.Multiply(2);\n\t        /**\n\t\t\t * Two times the width for the side channel\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t        this._twoTimesWidthSide = new Tone.Multiply(2);\n\t        /**\n\t\t\t *  Mid multiplier\n\t\t\t *  @type {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._midMult = new Tone.Multiply();\n\t        this._twoTimesWidthMid.connect(this._midMult, 0, 1);\n\t        this.midSend.chain(this._midMult, this.midReturn);\n\t        /**\n\t\t\t * 1 - width\n\t\t\t * @type {Tone}\n\t\t\t */\n\t        this._oneMinusWidth = new Tone.Subtract();\n\t        this._oneMinusWidth.connect(this._twoTimesWidthMid);\n\t        this.context.getConstant(1).connect(this._oneMinusWidth, 0, 0);\n\t        this.width.connect(this._oneMinusWidth, 0, 1);\n\t        /**\n\t\t\t *  Side multiplier\n\t\t\t *  @type {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sideMult = new Tone.Multiply();\n\t        this.width.connect(this._twoTimesWidthSide);\n\t        this._twoTimesWidthSide.connect(this._sideMult, 0, 1);\n\t        this.sideSend.chain(this._sideMult, this.sideReturn);\n\t    };\n\t    Tone.extend(Tone.StereoWidener, Tone.MidSideEffect);\n\t    /**\n\t\t *  the default values\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.StereoWidener.defaults = { 'width': 0.5 };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.StereoWidener} this\n\t\t */\n\t    Tone.StereoWidener.prototype.dispose = function () {\n\t        Tone.MidSideEffect.prototype.dispose.call(this);\n\t        this._writable(['width']);\n\t        this.width.dispose();\n\t        this.width = null;\n\t        this._midMult.dispose();\n\t        this._midMult = null;\n\t        this._sideMult.dispose();\n\t        this._sideMult = null;\n\t        this._twoTimesWidthMid.dispose();\n\t        this._twoTimesWidthMid = null;\n\t        this._twoTimesWidthSide.dispose();\n\t        this._twoTimesWidthSide = null;\n\t        this._oneMinusWidth.dispose();\n\t        this._oneMinusWidth = null;\n\t        return this;\n\t    };\n\t    return Tone.StereoWidener;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Tremolo modulates the amplitude of an incoming signal using a Tone.LFO.\n\t\t *         The type, frequency, and depth of the LFO is controllable.\n\t\t *\n\t\t *  @extends {Tone.StereoEffect}\n\t\t *  @constructor\n\t\t *  @param {Frequency} [frequency] The rate of the effect.\n\t\t *  @param {NormalRange} [depth] The depth of the effect.\n\t\t *  @example\n\t\t * //create a tremolo and start it's LFO\n\t\t * var tremolo = new Tone.Tremolo(9, 0.75).toMaster().start();\n\t\t * //route an oscillator through the tremolo and start it\n\t\t * var oscillator = new Tone.Oscillator().connect(tremolo).start();\n\t\t */\n\t    Tone.Tremolo = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'depth'\n\t        ], Tone.Tremolo);\n\t        Tone.StereoEffect.call(this, options);\n\t        /**\n\t\t\t *  The tremelo LFO in the left channel\n\t\t\t *  @type  {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfoL = new Tone.LFO({\n\t            'phase': options.spread,\n\t            'min': 1,\n\t            'max': 0\n\t        });\n\t        /**\n\t\t\t *  The tremelo LFO in the left channel\n\t\t\t *  @type  {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfoR = new Tone.LFO({\n\t            'phase': options.spread,\n\t            'min': 1,\n\t            'max': 0\n\t        });\n\t        /**\n\t\t\t *  Where the gain is multiplied\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._amplitudeL = new Tone.Gain();\n\t        /**\n\t\t\t *  Where the gain is multiplied\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._amplitudeR = new Tone.Gain();\n\t        /**\n\t\t\t *  The frequency of the tremolo.\n\t\t\t *  @type  {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The depth of the effect. A depth of 0, has no effect\n\t\t\t *  on the amplitude, and a depth of 1 makes the amplitude\n\t\t\t *  modulate fully between 0 and 1.\n\t\t\t *  @type  {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.depth = new Tone.Signal(options.depth, Tone.Type.NormalRange);\n\t        this._readOnly([\n\t            'frequency',\n\t            'depth'\n\t        ]);\n\t        this.effectSendL.chain(this._amplitudeL, this.effectReturnL);\n\t        this.effectSendR.chain(this._amplitudeR, this.effectReturnR);\n\t        this._lfoL.connect(this._amplitudeL.gain);\n\t        this._lfoR.connect(this._amplitudeR.gain);\n\t        this.frequency.fan(this._lfoL.frequency, this._lfoR.frequency);\n\t        this.depth.fan(this._lfoR.amplitude, this._lfoL.amplitude);\n\t        this.type = options.type;\n\t        this.spread = options.spread;\n\t    };\n\t    Tone.extend(Tone.Tremolo, Tone.StereoEffect);\n\t    /**\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Tremolo.defaults = {\n\t        'frequency': 10,\n\t        'type': 'sine',\n\t        'depth': 0.5,\n\t        'spread': 180\n\t    };\n\t    /**\n\t\t * Start the tremolo.\n\t\t * @param {Time} [time=now] When the tremolo begins.\n\t\t * @returns {Tone.Tremolo} this\n\t\t */\n\t    Tone.Tremolo.prototype.start = function (time) {\n\t        this._lfoL.start(time);\n\t        this._lfoR.start(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Stop the tremolo.\n\t\t * @param {Time} [time=now] When the tremolo stops.\n\t\t * @returns {Tone.Tremolo} this\n\t\t */\n\t    Tone.Tremolo.prototype.stop = function (time) {\n\t        this._lfoL.stop(time);\n\t        this._lfoR.stop(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Sync the effect to the transport.\n\t\t * @param {Time} [delay=0] Delay time before starting the effect after the\n\t\t *                              Transport has started.\n\t\t * @returns {Tone.AutoFilter} this\n\t\t */\n\t    Tone.Tremolo.prototype.sync = function (delay) {\n\t        this._lfoL.sync(delay);\n\t        this._lfoR.sync(delay);\n\t        Tone.Transport.syncSignal(this.frequency);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Unsync the filter from the transport\n\t\t * @returns {Tone.Tremolo} this\n\t\t */\n\t    Tone.Tremolo.prototype.unsync = function () {\n\t        this._lfoL.unsync();\n\t        this._lfoR.unsync();\n\t        Tone.Transport.unsyncSignal(this.frequency);\n\t        return this;\n\t    };\n\t    /**\n\t\t * The Tremolo's oscillator type.\n\t\t * @memberOf Tone.Tremolo#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.Tremolo.prototype, 'type', {\n\t        get: function () {\n\t            return this._lfoL.type;\n\t        },\n\t        set: function (type) {\n\t            this._lfoL.type = type;\n\t            this._lfoR.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t * Amount of stereo spread. When set to 0, both LFO's will be panned centrally.\n\t\t * When set to 180, LFO's will be panned hard left and right respectively.\n\t\t * @memberOf Tone.Tremolo#\n\t\t * @type {Degrees}\n\t\t * @name spread\n\t\t */\n\t    Object.defineProperty(Tone.Tremolo.prototype, 'spread', {\n\t        get: function () {\n\t            return this._lfoR.phase - this._lfoL.phase;    //180\n\t        },\n\t        set: function (spread) {\n\t            this._lfoL.phase = 90 - spread / 2;\n\t            this._lfoR.phase = spread / 2 + 90;\n\t        }\n\t    });\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Tremolo} this\n\t\t */\n\t    Tone.Tremolo.prototype.dispose = function () {\n\t        Tone.StereoEffect.prototype.dispose.call(this);\n\t        this._writable([\n\t            'frequency',\n\t            'depth'\n\t        ]);\n\t        this._lfoL.dispose();\n\t        this._lfoL = null;\n\t        this._lfoR.dispose();\n\t        this._lfoR = null;\n\t        this._amplitudeL.dispose();\n\t        this._amplitudeL = null;\n\t        this._amplitudeR.dispose();\n\t        this._amplitudeR = null;\n\t        this.frequency = null;\n\t        this.depth = null;\n\t        return this;\n\t    };\n\t    return Tone.Tremolo;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class A Vibrato effect composed of a Tone.Delay and a Tone.LFO. The LFO\n\t\t *         modulates the delayTime of the delay, causing the pitch to rise\n\t\t *         and fall. \n\t\t *  @extends {Tone.Effect}\n\t\t *  @param {Frequency} frequency The frequency of the vibrato.\n\t\t *  @param {NormalRange} depth The amount the pitch is modulated.\n\t\t */\n\t    Tone.Vibrato = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'depth'\n\t        ], Tone.Vibrato);\n\t        Tone.Effect.call(this, options);\n\t        /**\n\t\t\t *  The delay node used for the vibrato effect\n\t\t\t *  @type {Tone.Delay}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delayNode = new Tone.Delay(0, options.maxDelay);\n\t        /**\n\t\t\t *  The LFO used to control the vibrato\n\t\t\t *  @type {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfo = new Tone.LFO({\n\t            'type': options.type,\n\t            'min': 0,\n\t            'max': options.maxDelay,\n\t            'frequency': options.frequency,\n\t            'phase': -90    //offse the phase so the resting position is in the center\n\t        }).start().connect(this._delayNode.delayTime);\n\t        /**\n\t\t\t *  The frequency of the vibrato\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = this._lfo.frequency;\n\t        /**\n\t\t\t *  The depth of the vibrato. \n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.depth = this._lfo.amplitude;\n\t        this.depth.value = options.depth;\n\t        this._readOnly([\n\t            'frequency',\n\t            'depth'\n\t        ]);\n\t        this.effectSend.chain(this._delayNode, this.effectReturn);\n\t    };\n\t    Tone.extend(Tone.Vibrato, Tone.Effect);\n\t    /**\n\t\t *  The defaults\n\t\t *  @type  {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.Vibrato.defaults = {\n\t        'maxDelay': 0.005,\n\t        'frequency': 5,\n\t        'depth': 0.1,\n\t        'type': 'sine'\n\t    };\n\t    /**\n\t\t * Type of oscillator attached to the Vibrato.\n\t\t * @memberOf Tone.Vibrato#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.Vibrato.prototype, 'type', {\n\t        get: function () {\n\t            return this._lfo.type;\n\t        },\n\t        set: function (type) {\n\t            this._lfo.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Vibrato} this\n\t\t */\n\t    Tone.Vibrato.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._delayNode.dispose();\n\t        this._delayNode = null;\n\t        this._lfo.dispose();\n\t        this._lfo = null;\n\t        this._writable([\n\t            'frequency',\n\t            'depth'\n\t        ]);\n\t        this.frequency = null;\n\t        this.depth = null;\n\t    };\n\t    return Tone.Vibrato;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Event abstracts away Tone.Transport.schedule and provides a schedulable\n\t\t *          callback for a single or repeatable events along the timeline.\n\t\t *\n\t\t *  @extends {Tone}\n\t\t *  @param {function} callback The callback to invoke at the time.\n\t\t *  @param {*} value The value or values which should be passed to\n\t\t *                      the callback function on invocation.\n\t\t *  @example\n\t\t * var chord = new Tone.Event(function(time, chord){\n\t\t * \t//the chord as well as the exact time of the event\n\t\t * \t//are passed in as arguments to the callback function\n\t\t * }, [\"D4\", \"E4\", \"F4\"]);\n\t\t * //start the chord at the beginning of the transport timeline\n\t\t * chord.start();\n\t\t * //loop it every measure for 8 measures\n\t\t * chord.loop = 8;\n\t\t * chord.loopEnd = \"1m\";\n\t\t */\n\t    Tone.Event = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'callback',\n\t            'value'\n\t        ], Tone.Event);\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  Loop value\n\t\t\t *  @type  {Boolean|Positive}\n\t\t\t *  @private\n\t\t\t */\n\t        this._loop = options.loop;\n\t        /**\n\t\t\t *  The callback to invoke.\n\t\t\t *  @type  {Function}\n\t\t\t */\n\t        this.callback = options.callback;\n\t        /**\n\t\t\t *  The value which is passed to the\n\t\t\t *  callback function.\n\t\t\t *  @type  {*}\n\t\t\t *  @private\n\t\t\t */\n\t        this.value = options.value;\n\t        /**\n\t\t\t *  When the note is scheduled to start.\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._loopStart = this.toTicks(options.loopStart);\n\t        /**\n\t\t\t *  When the note is scheduled to start.\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._loopEnd = this.toTicks(options.loopEnd);\n\t        /**\n\t\t\t *  Tracks the scheduled events\n\t\t\t *  @type {Tone.TimelineState}\n\t\t\t *  @private\n\t\t\t */\n\t        this._state = new Tone.TimelineState(Tone.State.Stopped);\n\t        /**\n\t\t\t *  The playback speed of the note. A speed of 1\n\t\t\t *  is no change.\n\t\t\t *  @private\n\t\t\t *  @type {Positive}\n\t\t\t */\n\t        this._playbackRate = 1;\n\t        /**\n\t\t\t *  A delay time from when the event is scheduled to start\n\t\t\t *  @type {Ticks}\n\t\t\t *  @private\n\t\t\t */\n\t        this._startOffset = 0;\n\t        /**\n\t\t\t *  private holder of probability value\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @private\n\t\t\t */\n\t        this._probability = options.probability;\n\t        /**\n\t\t\t *  the amount of variation from the\n\t\t\t *  given time.\n\t\t\t *  @type {Boolean|Time}\n\t\t\t *  @private\n\t\t\t */\n\t        this._humanize = options.humanize;\n\t        /**\n\t\t\t *  If mute is true, the callback won't be\n\t\t\t *  invoked.\n\t\t\t *  @type {Boolean}\n\t\t\t */\n\t        this.mute = options.mute;\n\t        //set the initial values\n\t        this.playbackRate = options.playbackRate;\n\t    };\n\t    Tone.extend(Tone.Event);\n\t    /**\n\t\t *  The default values\n\t\t *  @type  {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.Event.defaults = {\n\t        'callback': Tone.noOp,\n\t        'loop': false,\n\t        'loopEnd': '1m',\n\t        'loopStart': 0,\n\t        'playbackRate': 1,\n\t        'value': null,\n\t        'probability': 1,\n\t        'mute': false,\n\t        'humanize': false\n\t    };\n\t    /**\n\t\t *  Reschedule all of the events along the timeline\n\t\t *  with the updated values.\n\t\t *  @param {Time} after Only reschedules events after the given time.\n\t\t *  @return  {Tone.Event}  this\n\t\t *  @private\n\t\t */\n\t    Tone.Event.prototype._rescheduleEvents = function (after) {\n\t        //if no argument is given, schedules all of the events\n\t        after = Tone.defaultArg(after, -1);\n\t        this._state.forEachFrom(after, function (event) {\n\t            var duration;\n\t            if (event.state === Tone.State.Started) {\n\t                if (Tone.isDefined(event.id)) {\n\t                    Tone.Transport.clear(event.id);\n\t                }\n\t                var startTick = event.time + Math.round(this.startOffset / this._playbackRate);\n\t                if (this._loop) {\n\t                    duration = Infinity;\n\t                    if (Tone.isNumber(this._loop)) {\n\t                        duration = this._loop * this._getLoopDuration();\n\t                    }\n\t                    var nextEvent = this._state.getAfter(startTick);\n\t                    if (nextEvent !== null) {\n\t                        duration = Math.min(duration, nextEvent.time - startTick);\n\t                    }\n\t                    if (duration !== Infinity) {\n\t                        //schedule a stop since it's finite duration\n\t                        this._state.setStateAtTime(Tone.State.Stopped, startTick + duration + 1);\n\t                        duration = Tone.Ticks(duration);\n\t                    }\n\t                    var interval = Tone.Ticks(this._getLoopDuration());\n\t                    event.id = Tone.Transport.scheduleRepeat(this._tick.bind(this), interval, Tone.Ticks(startTick), duration);\n\t                } else {\n\t                    event.id = Tone.Transport.schedule(this._tick.bind(this), Tone.Ticks(startTick));\n\t                }\n\t            }\n\t        }.bind(this));\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Returns the playback state of the note, either \"started\" or \"stopped\".\n\t\t *  @type {String}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.Event#\n\t\t *  @name state\n\t\t */\n\t    Object.defineProperty(Tone.Event.prototype, 'state', {\n\t        get: function () {\n\t            return this._state.getValueAtTime(Tone.Transport.ticks);\n\t        }\n\t    });\n\t    /**\n\t\t *  The start from the scheduled start time\n\t\t *  @type {Ticks}\n\t\t *  @memberOf Tone.Event#\n\t\t *  @name startOffset\n\t\t *  @private\n\t\t */\n\t    Object.defineProperty(Tone.Event.prototype, 'startOffset', {\n\t        get: function () {\n\t            return this._startOffset;\n\t        },\n\t        set: function (offset) {\n\t            this._startOffset = offset;\n\t        }\n\t    });\n\t    /**\n\t\t *  The probability of the notes being triggered.\n\t\t *  @memberOf Tone.Event#\n\t\t *  @type {NormalRange}\n\t\t *  @name probability\n\t\t */\n\t    Object.defineProperty(Tone.Event.prototype, 'probability', {\n\t        get: function () {\n\t            return this._probability;\n\t        },\n\t        set: function (prob) {\n\t            this._probability = prob;\n\t        }\n\t    });\n\t    /**\n\t\t *  If set to true, will apply small random variation\n\t\t *  to the callback time. If the value is given as a time, it will randomize\n\t\t *  by that amount.\n\t\t *  @example\n\t\t * event.humanize = true;\n\t\t *  @type {Boolean|Time}\n\t\t *  @name humanize\n\t\t */\n\t    Object.defineProperty(Tone.Event.prototype, 'humanize', {\n\t        get: function () {\n\t            return this._humanize;\n\t        },\n\t        set: function (variation) {\n\t            this._humanize = variation;\n\t        }\n\t    });\n\t    /**\n\t\t *  Start the note at the given time.\n\t\t *  @param  {TimelinePosition}  time  When the note should start.\n\t\t *  @return  {Tone.Event}  this\n\t\t */\n\t    Tone.Event.prototype.start = function (time) {\n\t        time = this.toTicks(time);\n\t        if (this._state.getValueAtTime(time) === Tone.State.Stopped) {\n\t            this._state.add({\n\t                'state': Tone.State.Started,\n\t                'time': time,\n\t                'id': undefined\n\t            });\n\t            this._rescheduleEvents(time);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Stop the Event at the given time.\n\t\t *  @param  {TimelinePosition}  time  When the note should stop.\n\t\t *  @return  {Tone.Event}  this\n\t\t */\n\t    Tone.Event.prototype.stop = function (time) {\n\t        this.cancel(time);\n\t        time = this.toTicks(time);\n\t        if (this._state.getValueAtTime(time) === Tone.State.Started) {\n\t            this._state.setStateAtTime(Tone.State.Stopped, time);\n\t            var previousEvent = this._state.getBefore(time);\n\t            var reschedulTime = time;\n\t            if (previousEvent !== null) {\n\t                reschedulTime = previousEvent.time;\n\t            }\n\t            this._rescheduleEvents(reschedulTime);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancel all scheduled events greater than or equal to the given time\n\t\t *  @param  {TimelinePosition}  [time=0]  The time after which events will be cancel.\n\t\t *  @return  {Tone.Event}  this\n\t\t */\n\t    Tone.Event.prototype.cancel = function (time) {\n\t        time = Tone.defaultArg(time, -Infinity);\n\t        time = this.toTicks(time);\n\t        this._state.forEachFrom(time, function (event) {\n\t            Tone.Transport.clear(event.id);\n\t        });\n\t        this._state.cancel(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  The callback function invoker. Also\n\t\t *  checks if the Event is done playing\n\t\t *  @param  {Number}  time  The time of the event in seconds\n\t\t *  @private\n\t\t */\n\t    Tone.Event.prototype._tick = function (time) {\n\t        var ticks = Tone.Transport.getTicksAtTime(time);\n\t        if (!this.mute && this._state.getValueAtTime(ticks) === Tone.State.Started) {\n\t            if (this.probability < 1 && Math.random() > this.probability) {\n\t                return;\n\t            }\n\t            if (this.humanize) {\n\t                var variation = 0.02;\n\t                if (!Tone.isBoolean(this.humanize)) {\n\t                    variation = this.toSeconds(this.humanize);\n\t                }\n\t                time += (Math.random() * 2 - 1) * variation;\n\t            }\n\t            this.callback(time, this.value);\n\t        }\n\t    };\n\t    /**\n\t\t *  Get the duration of the loop.\n\t\t *  @return  {Ticks}\n\t\t *  @private\n\t\t */\n\t    Tone.Event.prototype._getLoopDuration = function () {\n\t        return Math.round((this._loopEnd - this._loopStart) / this._playbackRate);\n\t    };\n\t    /**\n\t\t *  If the note should loop or not\n\t\t *  between Tone.Event.loopStart and\n\t\t *  Tone.Event.loopEnd. An integer\n\t\t *  value corresponds to the number of\n\t\t *  loops the Event does after it starts.\n\t\t *  @memberOf Tone.Event#\n\t\t *  @type {Boolean|Positive}\n\t\t *  @name loop\n\t\t */\n\t    Object.defineProperty(Tone.Event.prototype, 'loop', {\n\t        get: function () {\n\t            return this._loop;\n\t        },\n\t        set: function (loop) {\n\t            this._loop = loop;\n\t            this._rescheduleEvents();\n\t        }\n\t    });\n\t    /**\n\t\t * \tThe playback rate of the note. Defaults to 1.\n\t\t *  @memberOf Tone.Event#\n\t\t *  @type {Positive}\n\t\t *  @name playbackRate\n\t\t *  @example\n\t\t * note.loop = true;\n\t\t * //repeat the note twice as fast\n\t\t * note.playbackRate = 2;\n\t\t */\n\t    Object.defineProperty(Tone.Event.prototype, 'playbackRate', {\n\t        get: function () {\n\t            return this._playbackRate;\n\t        },\n\t        set: function (rate) {\n\t            this._playbackRate = rate;\n\t            this._rescheduleEvents();\n\t        }\n\t    });\n\t    /**\n\t\t *  The loopEnd point is the time the event will loop\n\t\t *  if Tone.Event.loop is true.\n\t\t *  @memberOf Tone.Event#\n\t\t *  @type {Time}\n\t\t *  @name loopEnd\n\t\t */\n\t    Object.defineProperty(Tone.Event.prototype, 'loopEnd', {\n\t        get: function () {\n\t            return Tone.Ticks(this._loopEnd).toSeconds();\n\t        },\n\t        set: function (loopEnd) {\n\t            this._loopEnd = this.toTicks(loopEnd);\n\t            if (this._loop) {\n\t                this._rescheduleEvents();\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  The time when the loop should start.\n\t\t *  @memberOf Tone.Event#\n\t\t *  @type {Time}\n\t\t *  @name loopStart\n\t\t */\n\t    Object.defineProperty(Tone.Event.prototype, 'loopStart', {\n\t        get: function () {\n\t            return Tone.Ticks(this._loopStart).toSeconds();\n\t        },\n\t        set: function (loopStart) {\n\t            this._loopStart = this.toTicks(loopStart);\n\t            if (this._loop) {\n\t                this._rescheduleEvents();\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  The current progress of the loop interval.\n\t\t *  Returns 0 if the event is not started yet or\n\t\t *  it is not set to loop.\n\t\t *  @memberOf Tone.Event#\n\t\t *  @type {NormalRange}\n\t\t *  @name progress\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Event.prototype, 'progress', {\n\t        get: function () {\n\t            if (this._loop) {\n\t                var ticks = Tone.Transport.ticks;\n\t                var lastEvent = this._state.get(ticks);\n\t                if (lastEvent !== null && lastEvent.state === Tone.State.Started) {\n\t                    var loopDuration = this._getLoopDuration();\n\t                    var progress = (ticks - lastEvent.time) % loopDuration;\n\t                    return progress / loopDuration;\n\t                } else {\n\t                    return 0;\n\t                }\n\t            } else {\n\t                return 0;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.Event}  this\n\t\t */\n\t    Tone.Event.prototype.dispose = function () {\n\t        this.cancel();\n\t        this._state.dispose();\n\t        this._state = null;\n\t        this.callback = null;\n\t        this.value = null;\n\t    };\n\t    return Tone.Event;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.Loop creates a looped callback at the \n\t\t *         specified interval. The callback can be \n\t\t *         started, stopped and scheduled along\n\t\t *         the Transport's timeline. \n\t\t *  @example\n\t\t * var loop = new Tone.Loop(function(time){\n\t\t * \t//triggered every eighth note. \n\t\t * \tconsole.log(time);\n\t\t * }, \"8n\").start(0);\n\t\t * Tone.Transport.start();\n\t\t *  @extends {Tone}\n\t\t *  @param {Function} callback The callback to invoke with the event.\n\t\t *  @param {Time} interval The time between successive callback calls. \n\t\t */\n\t    Tone.Loop = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'callback',\n\t            'interval'\n\t        ], Tone.Loop);\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  The event which produces the callbacks\n\t\t\t */\n\t        this._event = new Tone.Event({\n\t            'callback': this._tick.bind(this),\n\t            'loop': true,\n\t            'loopEnd': options.interval,\n\t            'playbackRate': options.playbackRate,\n\t            'probability': options.probability\n\t        });\n\t        /**\n\t\t\t *  The callback to invoke with the next event in the pattern\n\t\t\t *  @type {Function}\n\t\t\t */\n\t        this.callback = options.callback;\n\t        //set the iterations\n\t        this.iterations = options.iterations;\n\t    };\n\t    Tone.extend(Tone.Loop);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.Loop.defaults = {\n\t        'interval': '4n',\n\t        'callback': Tone.noOp,\n\t        'playbackRate': 1,\n\t        'iterations': Infinity,\n\t        'probability': true,\n\t        'mute': false\n\t    };\n\t    /**\n\t\t *  Start the loop at the specified time along the Transport's\n\t\t *  timeline.\n\t\t *  @param  {TimelinePosition=}  time  When to start the Loop.\n\t\t *  @return  {Tone.Loop}  this\n\t\t */\n\t    Tone.Loop.prototype.start = function (time) {\n\t        this._event.start(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Stop the loop at the given time.\n\t\t *  @param  {TimelinePosition=}  time  When to stop the Arpeggio\n\t\t *  @return  {Tone.Loop}  this\n\t\t */\n\t    Tone.Loop.prototype.stop = function (time) {\n\t        this._event.stop(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancel all scheduled events greater than or equal to the given time\n\t\t *  @param  {TimelinePosition}  [time=0]  The time after which events will be cancel.\n\t\t *  @return  {Tone.Loop}  this\n\t\t */\n\t    Tone.Loop.prototype.cancel = function (time) {\n\t        this._event.cancel(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Internal function called when the notes should be called\n\t\t *  @param  {Number}  time  The time the event occurs\n\t\t *  @private\n\t\t */\n\t    Tone.Loop.prototype._tick = function (time) {\n\t        this.callback(time);\n\t    };\n\t    /**\n\t\t *  The state of the Loop, either started or stopped.\n\t\t *  @memberOf Tone.Loop#\n\t\t *  @type {String}\n\t\t *  @name state\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Loop.prototype, 'state', {\n\t        get: function () {\n\t            return this._event.state;\n\t        }\n\t    });\n\t    /**\n\t\t *  The progress of the loop as a value between 0-1. 0, when\n\t\t *  the loop is stopped or done iterating. \n\t\t *  @memberOf Tone.Loop#\n\t\t *  @type {NormalRange}\n\t\t *  @name progress\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Loop.prototype, 'progress', {\n\t        get: function () {\n\t            return this._event.progress;\n\t        }\n\t    });\n\t    /**\n\t\t *  The time between successive callbacks. \n\t\t *  @example\n\t\t * loop.interval = \"8n\"; //loop every 8n\n\t\t *  @memberOf Tone.Loop#\n\t\t *  @type {Time}\n\t\t *  @name interval\n\t\t */\n\t    Object.defineProperty(Tone.Loop.prototype, 'interval', {\n\t        get: function () {\n\t            return this._event.loopEnd;\n\t        },\n\t        set: function (interval) {\n\t            this._event.loopEnd = interval;\n\t        }\n\t    });\n\t    /**\n\t\t *  The playback rate of the loop. The normal playback rate is 1 (no change). \n\t\t *  A `playbackRate` of 2 would be twice as fast. \n\t\t *  @memberOf Tone.Loop#\n\t\t *  @type {Time}\n\t\t *  @name playbackRate\n\t\t */\n\t    Object.defineProperty(Tone.Loop.prototype, 'playbackRate', {\n\t        get: function () {\n\t            return this._event.playbackRate;\n\t        },\n\t        set: function (rate) {\n\t            this._event.playbackRate = rate;\n\t        }\n\t    });\n\t    /**\n\t\t *  Random variation +/-0.01s to the scheduled time. \n\t\t *  Or give it a time value which it will randomize by.\n\t\t *  @type {Boolean|Time}\n\t\t *  @memberOf Tone.Loop#\n\t\t *  @name humanize\n\t\t */\n\t    Object.defineProperty(Tone.Loop.prototype, 'humanize', {\n\t        get: function () {\n\t            return this._event.humanize;\n\t        },\n\t        set: function (variation) {\n\t            this._event.humanize = variation;\n\t        }\n\t    });\n\t    /**\n\t\t *  The probably of the callback being invoked.\n\t\t *  @memberOf Tone.Loop#\n\t\t *  @type {NormalRange}\n\t\t *  @name probability\n\t\t */\n\t    Object.defineProperty(Tone.Loop.prototype, 'probability', {\n\t        get: function () {\n\t            return this._event.probability;\n\t        },\n\t        set: function (prob) {\n\t            this._event.probability = prob;\n\t        }\n\t    });\n\t    /**\n\t\t *  Muting the Loop means that no callbacks are invoked.\n\t\t *  @memberOf Tone.Loop#\n\t\t *  @type {Boolean}\n\t\t *  @name mute\n\t\t */\n\t    Object.defineProperty(Tone.Loop.prototype, 'mute', {\n\t        get: function () {\n\t            return this._event.mute;\n\t        },\n\t        set: function (mute) {\n\t            this._event.mute = mute;\n\t        }\n\t    });\n\t    /**\n\t\t *  The number of iterations of the loop. The default\n\t\t *  value is Infinity (loop forever).\n\t\t *  @memberOf Tone.Loop#\n\t\t *  @type {Positive}\n\t\t *  @name iterations\n\t\t */\n\t    Object.defineProperty(Tone.Loop.prototype, 'iterations', {\n\t        get: function () {\n\t            if (this._event.loop === true) {\n\t                return Infinity;\n\t            } else {\n\t                return this._event.loop;\n\t            }\n\t        },\n\t        set: function (iters) {\n\t            if (iters === Infinity) {\n\t                this._event.loop = true;\n\t            } else {\n\t                this._event.loop = iters;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.Loop}  this\n\t\t */\n\t    Tone.Loop.prototype.dispose = function () {\n\t        this._event.dispose();\n\t        this._event = null;\n\t        this.callback = null;\n\t    };\n\t    return Tone.Loop;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Part is a collection Tone.Events which can be\n\t\t *         started/stopped and looped as a single unit.\n\t\t *\n\t\t *  @extends {Tone.Event}\n\t\t *  @param {Function} callback The callback to invoke on each event\n\t\t *  @param {Array} events the array of events\n\t\t *  @example\n\t\t * var part = new Tone.Part(function(time, note){\n\t\t * \t//the notes given as the second element in the array\n\t\t * \t//will be passed in as the second argument\n\t\t * \tsynth.triggerAttackRelease(note, \"8n\", time);\n\t\t * }, [[0, \"C2\"], [\"0:2\", \"C3\"], [\"0:3:2\", \"G2\"]]);\n\t\t *  @example\n\t\t * //use an array of objects as long as the object has a \"time\" attribute\n\t\t * var part = new Tone.Part(function(time, value){\n\t\t * \t//the value is an object which contains both the note and the velocity\n\t\t * \tsynth.triggerAttackRelease(value.note, \"8n\", time, value.velocity);\n\t\t * }, [{\"time\" : 0, \"note\" : \"C3\", \"velocity\": 0.9},\n\t\t * \t   {\"time\" : \"0:2\", \"note\" : \"C4\", \"velocity\": 0.5}\n\t\t * ]).start(0);\n\t\t */\n\t    Tone.Part = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'callback',\n\t            'events'\n\t        ], Tone.Part);\n\t        Tone.Event.call(this, options);\n\t        /**\n\t\t\t *  An array of Objects.\n\t\t\t *  @type  {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._events = [];\n\t        //add the events\n\t        for (var i = 0; i < options.events.length; i++) {\n\t            if (Array.isArray(options.events[i])) {\n\t                this.add(options.events[i][0], options.events[i][1]);\n\t            } else {\n\t                this.add(options.events[i]);\n\t            }\n\t        }\n\t    };\n\t    Tone.extend(Tone.Part, Tone.Event);\n\t    /**\n\t\t *  The default values\n\t\t *  @type  {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.Part.defaults = {\n\t        'callback': Tone.noOp,\n\t        'loop': false,\n\t        'loopEnd': '1m',\n\t        'loopStart': 0,\n\t        'playbackRate': 1,\n\t        'probability': 1,\n\t        'humanize': false,\n\t        'mute': false,\n\t        'events': []\n\t    };\n\t    /**\n\t\t *  Start the part at the given time.\n\t\t *  @param  {TransportTime}  time    When to start the part.\n\t\t *  @param  {Time=}  offset  The offset from the start of the part\n\t\t *                           to begin playing at.\n\t\t *  @return  {Tone.Part}  this\n\t\t */\n\t    Tone.Part.prototype.start = function (time, offset) {\n\t        var ticks = this.toTicks(time);\n\t        if (this._state.getValueAtTime(ticks) !== Tone.State.Started) {\n\t            if (this._loop) {\n\t                offset = Tone.defaultArg(offset, this._loopStart);\n\t            } else {\n\t                offset = Tone.defaultArg(offset, 0);\n\t            }\n\t            offset = this.toTicks(offset);\n\t            this._state.add({\n\t                'state': Tone.State.Started,\n\t                'time': ticks,\n\t                'offset': offset\n\t            });\n\t            this._forEach(function (event) {\n\t                this._startNote(event, ticks, offset);\n\t            });\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Start the event in the given event at the correct time given\n\t\t *  the ticks and offset and looping.\n\t\t *  @param  {Tone.Event}  event\n\t\t *  @param  {Ticks}  ticks\n\t\t *  @param  {Ticks}  offset\n\t\t *  @private\n\t\t */\n\t    Tone.Part.prototype._startNote = function (event, ticks, offset) {\n\t        ticks -= offset;\n\t        if (this._loop) {\n\t            if (event.startOffset >= this._loopStart && event.startOffset < this._loopEnd) {\n\t                if (event.startOffset < offset) {\n\t                    //start it on the next loop\n\t                    ticks += this._getLoopDuration();\n\t                }\n\t                event.start(Tone.Ticks(ticks));\n\t            } else if (event.startOffset < this._loopStart && event.startOffset >= offset) {\n\t                event.loop = false;\n\t                event.start(Tone.Ticks(ticks));\n\t            }\n\t        } else if (event.startOffset >= offset) {\n\t            event.start(Tone.Ticks(ticks));\n\t        }\n\t    };\n\t    /**\n\t\t *  The start from the scheduled start time\n\t\t *  @type {Ticks}\n\t\t *  @memberOf Tone.Part#\n\t\t *  @name startOffset\n\t\t *  @private\n\t\t */\n\t    Object.defineProperty(Tone.Part.prototype, 'startOffset', {\n\t        get: function () {\n\t            return this._startOffset;\n\t        },\n\t        set: function (offset) {\n\t            this._startOffset = offset;\n\t            this._forEach(function (event) {\n\t                event.startOffset += this._startOffset;\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t *  Stop the part at the given time.\n\t\t *  @param  {TimelinePosition}  time  When to stop the part.\n\t\t *  @return  {Tone.Part}  this\n\t\t */\n\t    Tone.Part.prototype.stop = function (time) {\n\t        var ticks = this.toTicks(time);\n\t        this._state.cancel(ticks);\n\t        this._state.setStateAtTime(Tone.State.Stopped, ticks);\n\t        this._forEach(function (event) {\n\t            event.stop(time);\n\t        });\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Get/Set an Event's value at the given time.\n\t\t *  If a value is passed in and no event exists at\n\t\t *  the given time, one will be created with that value.\n\t\t *  If two events are at the same time, the first one will\n\t\t *  be returned.\n\t\t *  @example\n\t\t * part.at(\"1m\"); //returns the part at the first measure\n\t\t *\n\t\t * part.at(\"2m\", \"C2\"); //set the value at \"2m\" to C2.\n\t\t * //if an event didn't exist at that time, it will be created.\n\t\t *  @param {TransportTime} time The time of the event to get or set.\n\t\t *  @param {*=} value If a value is passed in, the value of the\n\t\t *                    event at the given time will be set to it.\n\t\t *  @return {Tone.Event} the event at the time\n\t\t */\n\t    Tone.Part.prototype.at = function (time, value) {\n\t        time = Tone.TransportTime(time);\n\t        var tickTime = Tone.Ticks(1).toSeconds();\n\t        for (var i = 0; i < this._events.length; i++) {\n\t            var event = this._events[i];\n\t            if (Math.abs(time.toTicks() - event.startOffset) < tickTime) {\n\t                if (Tone.isDefined(value)) {\n\t                    event.value = value;\n\t                }\n\t                return event;\n\t            }\n\t        }\n\t        //if there was no event at that time, create one\n\t        if (Tone.isDefined(value)) {\n\t            this.add(time, value);\n\t            //return the new event\n\t            return this._events[this._events.length - 1];\n\t        } else {\n\t            return null;\n\t        }\n\t    };\n\t    /**\n\t\t *  Add a an event to the part.\n\t\t *  @param {Time} time The time the note should start.\n\t\t *                            If an object is passed in, it should\n\t\t *                            have a 'time' attribute and the rest\n\t\t *                            of the object will be used as the 'value'.\n\t\t *  @param  {Tone.Event|*}  value\n\t\t *  @returns {Tone.Part} this\n\t\t *  @example\n\t\t * part.add(\"1m\", \"C#+11\");\n\t\t */\n\t    Tone.Part.prototype.add = function (time, value) {\n\t        //extract the parameters\n\t        if (time.hasOwnProperty('time')) {\n\t            value = time;\n\t            time = value.time;\n\t        }\n\t        time = this.toTicks(time);\n\t        var event;\n\t        if (value instanceof Tone.Event) {\n\t            event = value;\n\t            event.callback = this._tick.bind(this);\n\t        } else {\n\t            event = new Tone.Event({\n\t                'callback': this._tick.bind(this),\n\t                'value': value\n\t            });\n\t        }\n\t        //the start offset\n\t        event.startOffset = time;\n\t        //initialize the values\n\t        event.set({\n\t            'loopEnd': this.loopEnd,\n\t            'loopStart': this.loopStart,\n\t            'loop': this.loop,\n\t            'humanize': this.humanize,\n\t            'playbackRate': this.playbackRate,\n\t            'probability': this.probability\n\t        });\n\t        this._events.push(event);\n\t        //start the note if it should be played right now\n\t        this._restartEvent(event);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Restart the given event\n\t\t *  @param  {Tone.Event}  event\n\t\t *  @private\n\t\t */\n\t    Tone.Part.prototype._restartEvent = function (event) {\n\t        this._state.forEach(function (stateEvent) {\n\t            if (stateEvent.state === Tone.State.Started) {\n\t                this._startNote(event, stateEvent.time, stateEvent.offset);\n\t            } else {\n\t                //stop the note\n\t                event.stop(Tone.Ticks(stateEvent.time));\n\t            }\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t *  Remove an event from the part. Will recursively iterate\n\t\t *  into nested parts to find the event.\n\t\t *  @param {Time} time The time of the event\n\t\t *  @param {*} value Optionally select only a specific event value\n\t\t *  @return  {Tone.Part}  this\n\t\t */\n\t    Tone.Part.prototype.remove = function (time, value) {\n\t        //extract the parameters\n\t        if (time.hasOwnProperty('time')) {\n\t            value = time;\n\t            time = value.time;\n\t        }\n\t        time = this.toTicks(time);\n\t        for (var i = this._events.length - 1; i >= 0; i--) {\n\t            var event = this._events[i];\n\t            if (event instanceof Tone.Part) {\n\t                event.remove(time, value);\n\t            } else if (event.startOffset === time) {\n\t                if (Tone.isUndef(value) || Tone.isDefined(value) && event.value === value) {\n\t                    this._events.splice(i, 1);\n\t                    event.dispose();\n\t                }\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Remove all of the notes from the group.\n\t\t *  @return  {Tone.Part}  this\n\t\t */\n\t    Tone.Part.prototype.removeAll = function () {\n\t        this._forEach(function (event) {\n\t            event.dispose();\n\t        });\n\t        this._events = [];\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancel scheduled state change events: i.e. \"start\" and \"stop\".\n\t\t *  @param {TimelinePosition} after The time after which to cancel the scheduled events.\n\t\t *  @return  {Tone.Part}  this\n\t\t */\n\t    Tone.Part.prototype.cancel = function (after) {\n\t        this._forEach(function (event) {\n\t            event.cancel(after);\n\t        });\n\t        this._state.cancel(this.toTicks(after));\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Iterate over all of the events\n\t\t *  @param {Function} callback\n\t\t *  @param {Object} ctx The context\n\t\t *  @private\n\t\t */\n\t    Tone.Part.prototype._forEach = function (callback, ctx) {\n\t        if (this._events) {\n\t            ctx = Tone.defaultArg(ctx, this);\n\t            for (var i = this._events.length - 1; i >= 0; i--) {\n\t                var e = this._events[i];\n\t                if (e instanceof Tone.Part) {\n\t                    e._forEach(callback, ctx);\n\t                } else {\n\t                    callback.call(ctx, e);\n\t                }\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Set the attribute of all of the events\n\t\t *  @param  {String}  attr  the attribute to set\n\t\t *  @param  {*}  value      The value to set it to\n\t\t *  @private\n\t\t */\n\t    Tone.Part.prototype._setAll = function (attr, value) {\n\t        this._forEach(function (event) {\n\t            event[attr] = value;\n\t        });\n\t    };\n\t    /**\n\t\t *  Internal tick method\n\t\t *  @param  {Number}  time  The time of the event in seconds\n\t\t *  @private\n\t\t */\n\t    Tone.Part.prototype._tick = function (time, value) {\n\t        if (!this.mute) {\n\t            this.callback(time, value);\n\t        }\n\t    };\n\t    /**\n\t\t *  Determine if the event should be currently looping\n\t\t *  given the loop boundries of this Part.\n\t\t *  @param  {Tone.Event}  event  The event to test\n\t\t *  @private\n\t\t */\n\t    Tone.Part.prototype._testLoopBoundries = function (event) {\n\t        if (event.startOffset < this._loopStart || event.startOffset >= this._loopEnd) {\n\t            event.cancel(0);\n\t        } else if (event.state === Tone.State.Stopped) {\n\t            //reschedule it if it's stopped\n\t            this._restartEvent(event);\n\t        }\n\t    };\n\t    /**\n\t\t *  The probability of the notes being triggered.\n\t\t *  @memberOf Tone.Part#\n\t\t *  @type {NormalRange}\n\t\t *  @name probability\n\t\t */\n\t    Object.defineProperty(Tone.Part.prototype, 'probability', {\n\t        get: function () {\n\t            return this._probability;\n\t        },\n\t        set: function (prob) {\n\t            this._probability = prob;\n\t            this._setAll('probability', prob);\n\t        }\n\t    });\n\t    /**\n\t\t *  If set to true, will apply small random variation\n\t\t *  to the callback time. If the value is given as a time, it will randomize\n\t\t *  by that amount.\n\t\t *  @example\n\t\t * event.humanize = true;\n\t\t *  @type {Boolean|Time}\n\t\t *  @name humanize\n\t\t */\n\t    Object.defineProperty(Tone.Part.prototype, 'humanize', {\n\t        get: function () {\n\t            return this._humanize;\n\t        },\n\t        set: function (variation) {\n\t            this._humanize = variation;\n\t            this._setAll('humanize', variation);\n\t        }\n\t    });\n\t    /**\n\t\t *  If the part should loop or not\n\t\t *  between Tone.Part.loopStart and\n\t\t *  Tone.Part.loopEnd. An integer\n\t\t *  value corresponds to the number of\n\t\t *  loops the Part does after it starts.\n\t\t *  @memberOf Tone.Part#\n\t\t *  @type {Boolean|Positive}\n\t\t *  @name loop\n\t\t *  @example\n\t\t * //loop the part 8 times\n\t\t * part.loop = 8;\n\t\t */\n\t    Object.defineProperty(Tone.Part.prototype, 'loop', {\n\t        get: function () {\n\t            return this._loop;\n\t        },\n\t        set: function (loop) {\n\t            this._loop = loop;\n\t            this._forEach(function (event) {\n\t                event._loopStart = this._loopStart;\n\t                event._loopEnd = this._loopEnd;\n\t                event.loop = loop;\n\t                this._testLoopBoundries(event);\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t *  The loopEnd point determines when it will\n\t\t *  loop if Tone.Part.loop is true.\n\t\t *  @memberOf Tone.Part#\n\t\t *  @type {Time}\n\t\t *  @name loopEnd\n\t\t */\n\t    Object.defineProperty(Tone.Part.prototype, 'loopEnd', {\n\t        get: function () {\n\t            return Tone.Ticks(this._loopEnd).toSeconds();\n\t        },\n\t        set: function (loopEnd) {\n\t            this._loopEnd = this.toTicks(loopEnd);\n\t            if (this._loop) {\n\t                this._forEach(function (event) {\n\t                    event.loopEnd = loopEnd;\n\t                    this._testLoopBoundries(event);\n\t                });\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  The loopStart point determines when it will\n\t\t *  loop if Tone.Part.loop is true.\n\t\t *  @memberOf Tone.Part#\n\t\t *  @type {Time}\n\t\t *  @name loopStart\n\t\t */\n\t    Object.defineProperty(Tone.Part.prototype, 'loopStart', {\n\t        get: function () {\n\t            return Tone.Ticks(this._loopStart).toSeconds();\n\t        },\n\t        set: function (loopStart) {\n\t            this._loopStart = this.toTicks(loopStart);\n\t            if (this._loop) {\n\t                this._forEach(function (event) {\n\t                    event.loopStart = this.loopStart;\n\t                    this._testLoopBoundries(event);\n\t                });\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * \tThe playback rate of the part\n\t\t *  @memberOf Tone.Part#\n\t\t *  @type {Positive}\n\t\t *  @name playbackRate\n\t\t */\n\t    Object.defineProperty(Tone.Part.prototype, 'playbackRate', {\n\t        get: function () {\n\t            return this._playbackRate;\n\t        },\n\t        set: function (rate) {\n\t            this._playbackRate = rate;\n\t            this._setAll('playbackRate', rate);\n\t        }\n\t    });\n\t    /**\n\t\t * \tThe number of scheduled notes in the part.\n\t\t *  @memberOf Tone.Part#\n\t\t *  @type {Positive}\n\t\t *  @name length\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Part.prototype, 'length', {\n\t        get: function () {\n\t            return this._events.length;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.Part}  this\n\t\t */\n\t    Tone.Part.prototype.dispose = function () {\n\t        this.removeAll();\n\t        this._state.dispose();\n\t        this._state = null;\n\t        this.callback = null;\n\t        this._events = null;\n\t        return this;\n\t    };\n\t    return Tone.Part;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.Pattern arpeggiates between the given notes\n\t\t *         in a number of patterns. See Tone.CtrlPattern for\n\t\t *         a full list of patterns.\n\t\t *  @example\n\t\t * var pattern = new Tone.Pattern(function(time, note){\n\t\t *   //the order of the notes passed in depends on the pattern\n\t\t * }, [\"C2\", \"D4\", \"E5\", \"A6\"], \"upDown\");\n\t\t *  @extends {Tone.Loop}\n\t\t *  @param {Function} callback The callback to invoke with the\n\t\t *                             event.\n\t\t *  @param {Array} values The values to arpeggiate over.\n\t\t */\n\t    Tone.Pattern = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'callback',\n\t            'values',\n\t            'pattern'\n\t        ], Tone.Pattern);\n\t        Tone.Loop.call(this, options);\n\t        /**\n\t\t\t *  The pattern manager\n\t\t\t *  @type {Tone.CtrlPattern}\n\t\t\t *  @private\n\t\t\t */\n\t        this._pattern = new Tone.CtrlPattern({\n\t            'values': options.values,\n\t            'type': options.pattern,\n\t            'index': options.index\n\t        });\n\t    };\n\t    Tone.extend(Tone.Pattern, Tone.Loop);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.Pattern.defaults = {\n\t        'pattern': Tone.CtrlPattern.Type.Up,\n\t        'callback': Tone.noOp,\n\t        'values': []\n\t    };\n\t    /**\n\t\t *  Internal function called when the notes should be called\n\t\t *  @param  {Number}  time  The time the event occurs\n\t\t *  @private\n\t\t */\n\t    Tone.Pattern.prototype._tick = function (time) {\n\t        this.callback(time, this._pattern.value);\n\t        this._pattern.next();\n\t    };\n\t    /**\n\t\t *  The current index in the values array.\n\t\t *  @memberOf Tone.Pattern#\n\t\t *  @type {Positive}\n\t\t *  @name index\n\t\t */\n\t    Object.defineProperty(Tone.Pattern.prototype, 'index', {\n\t        get: function () {\n\t            return this._pattern.index;\n\t        },\n\t        set: function (i) {\n\t            this._pattern.index = i;\n\t        }\n\t    });\n\t    /**\n\t\t *  The array of events.\n\t\t *  @memberOf Tone.Pattern#\n\t\t *  @type {Array}\n\t\t *  @name values\n\t\t */\n\t    Object.defineProperty(Tone.Pattern.prototype, 'values', {\n\t        get: function () {\n\t            return this._pattern.values;\n\t        },\n\t        set: function (vals) {\n\t            this._pattern.values = vals;\n\t        }\n\t    });\n\t    /**\n\t\t *  The current value of the pattern.\n\t\t *  @memberOf Tone.Pattern#\n\t\t *  @type {*}\n\t\t *  @name value\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Pattern.prototype, 'value', {\n\t        get: function () {\n\t            return this._pattern.value;\n\t        }\n\t    });\n\t    /**\n\t\t *  The pattern type. See Tone.CtrlPattern for the full list of patterns.\n\t\t *  @memberOf Tone.Pattern#\n\t\t *  @type {String}\n\t\t *  @name pattern\n\t\t */\n\t    Object.defineProperty(Tone.Pattern.prototype, 'pattern', {\n\t        get: function () {\n\t            return this._pattern.type;\n\t        },\n\t        set: function (pattern) {\n\t            this._pattern.type = pattern;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.Pattern}  this\n\t\t */\n\t    Tone.Pattern.prototype.dispose = function () {\n\t        Tone.Loop.prototype.dispose.call(this);\n\t        this._pattern.dispose();\n\t        this._pattern = null;\n\t    };\n\t    return Tone.Pattern;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class A sequence is an alternate notation of a part. Instead\n\t\t *         of passing in an array of [time, event] pairs, pass\n\t\t *         in an array of events which will be spaced at the\n\t\t *         given subdivision. Sub-arrays will subdivide that beat\n\t\t *         by the number of items are in the array.\n\t\t *         Sequence notation inspiration from [Tidal](http://yaxu.org/tidal/)\n\t\t *  @param  {Function}  callback  The callback to invoke with every note\n\t\t *  @param  {Array}    events  The sequence\n\t\t *  @param  {Time} subdivision  The subdivision between which events are placed.\n\t\t *  @extends {Tone.Part}\n\t\t *  @example\n\t\t * var seq = new Tone.Sequence(function(time, note){\n\t\t * \tconsole.log(note);\n\t\t * //straight quater notes\n\t\t * }, [\"C4\", \"E4\", \"G4\", \"A4\"], \"4n\");\n\t\t *  @example\n\t\t * var seq = new Tone.Sequence(function(time, note){\n\t\t * \tconsole.log(note);\n\t\t * //subdivisions are given as subarrays\n\t\t * }, [\"C4\", [\"E4\", \"D4\", \"E4\"], \"G4\", [\"A4\", \"G4\"]]);\n\t\t */\n\t    Tone.Sequence = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'callback',\n\t            'events',\n\t            'subdivision'\n\t        ], Tone.Sequence);\n\t        //remove the events\n\t        var events = options.events;\n\t        delete options.events;\n\t        Tone.Part.call(this, options);\n\t        /**\n\t\t\t *  The subdivison of each note\n\t\t\t *  @type  {Ticks}\n\t\t\t *  @private\n\t\t\t */\n\t        this._subdivision = this.toTicks(options.subdivision);\n\t        //if no time was passed in, the loop end is the end of the cycle\n\t        if (Tone.isUndef(options.loopEnd) && Tone.isDefined(events)) {\n\t            this._loopEnd = events.length * this._subdivision;\n\t        }\n\t        //defaults to looping\n\t        this._loop = true;\n\t        //add all of the events\n\t        if (Tone.isDefined(events)) {\n\t            for (var i = 0; i < events.length; i++) {\n\t                this.add(i, events[i]);\n\t            }\n\t        }\n\t    };\n\t    Tone.extend(Tone.Sequence, Tone.Part);\n\t    /**\n\t\t *  The default values.\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.Sequence.defaults = { 'subdivision': '4n' };\n\t    /**\n\t\t *  The subdivision of the sequence. This can only be\n\t\t *  set in the constructor. The subdivision is the\n\t\t *  interval between successive steps.\n\t\t *  @type {Time}\n\t\t *  @memberOf Tone.Sequence#\n\t\t *  @name subdivision\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Sequence.prototype, 'subdivision', {\n\t        get: function () {\n\t            return Tone.Ticks(this._subdivision).toSeconds();\n\t        }\n\t    });\n\t    /**\n\t\t *  Get/Set an index of the sequence. If the index contains a subarray,\n\t\t *  a Tone.Sequence representing that sub-array will be returned.\n\t\t *  @example\n\t\t * var sequence = new Tone.Sequence(playNote, [\"E4\", \"C4\", \"F#4\", [\"A4\", \"Bb3\"]])\n\t\t * sequence.at(0)// => returns \"E4\"\n\t\t * //set a value\n\t\t * sequence.at(0, \"G3\");\n\t\t * //get a nested sequence\n\t\t * sequence.at(3).at(1)// => returns \"Bb3\"\n\t\t * @param {Positive} index The index to get or set\n\t\t * @param {*} value Optionally pass in the value to set at the given index.\n\t\t */\n\t    Tone.Sequence.prototype.at = function (index, value) {\n\t        //if the value is an array,\n\t        if (Tone.isArray(value)) {\n\t            //remove the current event at that index\n\t            this.remove(index);\n\t        }\n\t        //call the parent's method\n\t        return Tone.Part.prototype.at.call(this, this._indexTime(index), value);\n\t    };\n\t    /**\n\t\t *  Add an event at an index, if there's already something\n\t\t *  at that index, overwrite it. If `value` is an array,\n\t\t *  it will be parsed as a subsequence.\n\t\t *  @param {Number} index The index to add the event to\n\t\t *  @param {*} value The value to add at that index\n\t\t *  @returns {Tone.Sequence} this\n\t\t */\n\t    Tone.Sequence.prototype.add = function (index, value) {\n\t        if (value === null) {\n\t            return this;\n\t        }\n\t        if (Tone.isArray(value)) {\n\t            //make a subsequence and add that to the sequence\n\t            var subSubdivision = Math.round(this._subdivision / value.length);\n\t            value = new Tone.Sequence(this._tick.bind(this), value, Tone.Ticks(subSubdivision));\n\t        }\n\t        Tone.Part.prototype.add.call(this, this._indexTime(index), value);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Remove a value from the sequence by index\n\t\t *  @param {Number} index The index of the event to remove\n\t\t *  @returns {Tone.Sequence} this\n\t\t */\n\t    Tone.Sequence.prototype.remove = function (index, value) {\n\t        Tone.Part.prototype.remove.call(this, this._indexTime(index), value);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Get the time of the index given the Sequence's subdivision\n\t\t *  @param  {Number}  index\n\t\t *  @return  {Time}  The time of that index\n\t\t *  @private\n\t\t */\n\t    Tone.Sequence.prototype._indexTime = function (index) {\n\t        if (index instanceof Tone.TransportTime) {\n\t            return index;\n\t        } else {\n\t            return Tone.Ticks(index * this._subdivision + this.startOffset).toSeconds();\n\t        }\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return {Tone.Sequence} this\n\t\t */\n\t    Tone.Sequence.prototype.dispose = function () {\n\t        Tone.Part.prototype.dispose.call(this);\n\t        return this;\n\t    };\n\t    return Tone.Sequence;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.PulseOscillator is a pulse oscillator with control over pulse width,\n\t\t *         also known as the duty cycle. At 50% duty cycle (width = 0.5) the wave is\n\t\t *         a square and only odd-numbered harmonics are present. At all other widths\n\t\t *         even-numbered harmonics are present. Read more\n\t\t *         [here](https://wigglewave.wordpress.com/2014/08/16/pulse-waveforms-and-harmonics/).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Source}\n\t\t *  @param {Frequency} [frequency] The frequency of the oscillator\n\t\t *  @param {NormalRange} [width] The width of the pulse\n\t\t *  @example\n\t\t * var pulse = new Tone.PulseOscillator(\"E5\", 0.4).toMaster().start();\n\t\t */\n\t    Tone.PulseOscillator = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'width'\n\t        ], Tone.Oscillator);\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  The width of the pulse.\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.width = new Tone.Signal(options.width, Tone.Type.NormalRange);\n\t        /**\n\t\t\t *  gate the width amount\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._widthGate = new Tone.Gain();\n\t        /**\n\t\t\t *  the sawtooth oscillator\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sawtooth = new Tone.Oscillator({\n\t            frequency: options.frequency,\n\t            detune: options.detune,\n\t            type: 'sawtooth',\n\t            phase: options.phase\n\t        });\n\t        /**\n\t\t\t *  The frequency control.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = this._sawtooth.frequency;\n\t        /**\n\t\t\t *  The detune in cents.\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = this._sawtooth.detune;\n\t        /**\n\t\t\t *  Threshold the signal to turn it into a square\n\t\t\t *  @type {Tone.WaveShaper}\n\t\t\t *  @private\n\t\t\t */\n\t        this._thresh = new Tone.WaveShaper(function (val) {\n\t            if (val < 0) {\n\t                return -1;\n\t            } else {\n\t                return 1;\n\t            }\n\t        });\n\t        //connections\n\t        this._sawtooth.chain(this._thresh, this.output);\n\t        this.width.chain(this._widthGate, this._thresh);\n\t        this._readOnly([\n\t            'width',\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.PulseOscillator, Tone.Source);\n\t    /**\n\t\t *  The default parameters.\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.PulseOscillator.defaults = {\n\t        'frequency': 440,\n\t        'detune': 0,\n\t        'phase': 0,\n\t        'width': 0.2\n\t    };\n\t    /**\n\t\t *  start the oscillator\n\t\t *  @param  {Time} time\n\t\t *  @private\n\t\t */\n\t    Tone.PulseOscillator.prototype._start = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._sawtooth.start(time);\n\t        this._widthGate.gain.setValueAtTime(1, time);\n\t    };\n\t    /**\n\t\t *  stop the oscillator\n\t\t *  @param  {Time} time\n\t\t *  @private\n\t\t */\n\t    Tone.PulseOscillator.prototype._stop = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._sawtooth.stop(time);\n\t        //the width is still connected to the output.\n\t        //that needs to be stopped also\n\t        this._widthGate.gain.setValueAtTime(0, time);\n\t    };\n\t    /**\n\t\t *  restart the oscillator\n\t\t *  @param  {Time} time (optional) timing parameter\n\t\t *  @private\n\t\t */\n\t    Tone.PulseOscillator.prototype.restart = function (time) {\n\t        this._sawtooth.restart(time);\n\t    };\n\t    /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.PulseOscillator#\n\t\t * @type {Degrees}\n\t\t * @name phase\n\t\t */\n\t    Object.defineProperty(Tone.PulseOscillator.prototype, 'phase', {\n\t        get: function () {\n\t            return this._sawtooth.phase;\n\t        },\n\t        set: function (phase) {\n\t            this._sawtooth.phase = phase;\n\t        }\n\t    });\n\t    /**\n\t\t * The type of the oscillator. Always returns \"pulse\".\n\t\t * @readOnly\n\t\t * @memberOf Tone.PulseOscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.PulseOscillator.prototype, 'type', {\n\t        get: function () {\n\t            return 'pulse';\n\t        }\n\t    });\n\t    /**\n\t\t * The partials of the waveform. Cannot set partials for this waveform type\n\t\t * @memberOf Tone.PulseOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @private\n\t\t */\n\t    Object.defineProperty(Tone.PulseOscillator.prototype, 'partials', {\n\t        get: function () {\n\t            return [];\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up method.\n\t\t *  @return {Tone.PulseOscillator} this\n\t\t */\n\t    Tone.PulseOscillator.prototype.dispose = function () {\n\t        Tone.Source.prototype.dispose.call(this);\n\t        this._sawtooth.dispose();\n\t        this._sawtooth = null;\n\t        this._writable([\n\t            'width',\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t        this.width.dispose();\n\t        this.width = null;\n\t        this._widthGate.dispose();\n\t        this._widthGate = null;\n\t        this._thresh.dispose();\n\t        this._thresh = null;\n\t        this.frequency = null;\n\t        this.detune = null;\n\t        return this;\n\t    };\n\t    return Tone.PulseOscillator;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.PWMOscillator modulates the width of a Tone.PulseOscillator\n\t\t *         at the modulationFrequency. This has the effect of continuously\n\t\t *         changing the timbre of the oscillator by altering the harmonics\n\t\t *         generated.\n\t\t *\n\t\t *  @extends {Tone.Source}\n\t\t *  @constructor\n\t\t *  @param {Frequency} frequency The starting frequency of the oscillator.\n\t\t *  @param {Frequency} modulationFrequency The modulation frequency of the width of the pulse.\n\t\t *  @example\n\t\t *  var pwm = new Tone.PWMOscillator(\"Ab3\", 0.3).toMaster().start();\n\t\t */\n\t    Tone.PWMOscillator = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'modulationFrequency'\n\t        ], Tone.PWMOscillator);\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  the pulse oscillator\n\t\t\t *  @type {Tone.PulseOscillator}\n\t\t\t *  @private\n\t\t\t */\n\t        this._pulse = new Tone.PulseOscillator(options.modulationFrequency);\n\t        //change the pulse oscillator type\n\t        this._pulse._sawtooth.type = 'sine';\n\t        /**\n\t\t\t *  the modulator\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulator = new Tone.Oscillator({\n\t            'frequency': options.frequency,\n\t            'detune': options.detune,\n\t            'phase': options.phase\n\t        });\n\t        /**\n\t\t\t *  Scale the oscillator so it doesn't go silent\n\t\t\t *  at the extreme values.\n\t\t\t *  @type {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._scale = new Tone.Multiply(2);\n\t        /**\n\t\t\t *  The frequency control.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = this._modulator.frequency;\n\t        /**\n\t\t\t *  The detune of the oscillator.\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = this._modulator.detune;\n\t        /**\n\t\t\t *  The modulation rate of the oscillator.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.modulationFrequency = this._pulse.frequency;\n\t        //connections\n\t        this._modulator.chain(this._scale, this._pulse.width);\n\t        this._pulse.connect(this.output);\n\t        this._readOnly([\n\t            'modulationFrequency',\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.PWMOscillator, Tone.Source);\n\t    /**\n\t\t *  default values\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.PWMOscillator.defaults = {\n\t        'frequency': 440,\n\t        'detune': 0,\n\t        'phase': 0,\n\t        'modulationFrequency': 0.4\n\t    };\n\t    /**\n\t\t *  start the oscillator\n\t\t *  @param  {Time} [time=now]\n\t\t *  @private\n\t\t */\n\t    Tone.PWMOscillator.prototype._start = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._modulator.start(time);\n\t        this._pulse.start(time);\n\t    };\n\t    /**\n\t\t *  stop the oscillator\n\t\t *  @param  {Time} time (optional) timing parameter\n\t\t *  @private\n\t\t */\n\t    Tone.PWMOscillator.prototype._stop = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._modulator.stop(time);\n\t        this._pulse.stop(time);\n\t    };\n\t    /**\n\t\t *  restart the oscillator\n\t\t *  @param  {Time} time (optional) timing parameter\n\t\t *  @private\n\t\t */\n\t    Tone.PWMOscillator.prototype.restart = function (time) {\n\t        this._modulator.restart(time);\n\t        this._pulse.restart(time);\n\t    };\n\t    /**\n\t\t * The type of the oscillator. Always returns \"pwm\".\n\t\t * @readOnly\n\t\t * @memberOf Tone.PWMOscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.PWMOscillator.prototype, 'type', {\n\t        get: function () {\n\t            return 'pwm';\n\t        }\n\t    });\n\t    /**\n\t\t * The partials of the waveform. Cannot set partials for this waveform type\n\t\t * @memberOf Tone.PWMOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @private\n\t\t */\n\t    Object.defineProperty(Tone.PWMOscillator.prototype, 'partials', {\n\t        get: function () {\n\t            return [];\n\t        }\n\t    });\n\t    /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.PWMOscillator#\n\t\t * @type {number}\n\t\t * @name phase\n\t\t */\n\t    Object.defineProperty(Tone.PWMOscillator.prototype, 'phase', {\n\t        get: function () {\n\t            return this._modulator.phase;\n\t        },\n\t        set: function (phase) {\n\t            this._modulator.phase = phase;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return {Tone.PWMOscillator} this\n\t\t */\n\t    Tone.PWMOscillator.prototype.dispose = function () {\n\t        Tone.Source.prototype.dispose.call(this);\n\t        this._pulse.dispose();\n\t        this._pulse = null;\n\t        this._scale.dispose();\n\t        this._scale = null;\n\t        this._modulator.dispose();\n\t        this._modulator = null;\n\t        this._writable([\n\t            'modulationFrequency',\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t        this.frequency = null;\n\t        this.detune = null;\n\t        this.modulationFrequency = null;\n\t        return this;\n\t    };\n\t    return Tone.PWMOscillator;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.FMOscillator\n\t\t *\n\t\t *  @extends {Tone.Source}\n\t\t *  @constructor\n\t\t *  @param {Frequency} frequency The starting frequency of the oscillator.\n\t\t *  @param {String} type The type of the carrier oscillator.\n\t\t *  @param {String} modulationType The type of the modulator oscillator.\n\t\t *  @example\n\t\t * //a sine oscillator frequency-modulated by a square wave\n\t\t * var fmOsc = new Tone.FMOscillator(\"Ab3\", \"sine\", \"square\").toMaster().start();\n\t\t */\n\t    Tone.FMOscillator = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'type',\n\t            'modulationType'\n\t        ], Tone.FMOscillator);\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  The carrier oscillator\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t *  @private\n\t\t\t */\n\t        this._carrier = new Tone.Oscillator(options.frequency, options.type);\n\t        /**\n\t\t\t *  The oscillator's frequency\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The detune control signal.\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = this._carrier.detune;\n\t        this.detune.value = options.detune;\n\t        /**\n\t\t\t *  The modulation index which is in essence the depth or amount of the modulation. In other terms it is the\n\t\t\t *  ratio of the frequency of the modulating signal (mf) to the amplitude of the\n\t\t\t *  modulating signal (ma) -- as in ma/mf.\n\t\t\t *\t@type {Positive}\n\t\t\t *\t@signal\n\t\t\t */\n\t        this.modulationIndex = new Tone.Multiply(options.modulationIndex);\n\t        this.modulationIndex.units = Tone.Type.Positive;\n\t        /**\n\t\t\t *  The modulating oscillator\n\t\t\t *  @type  {Tone.Oscillator}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulator = new Tone.Oscillator(options.frequency, options.modulationType);\n\t        /**\n\t\t\t *  Harmonicity is the frequency ratio between the carrier and the modulator oscillators.\n\t\t\t *  A harmonicity of 1 gives both oscillators the same frequency.\n\t\t\t *  Harmonicity = 2 means a change of an octave.\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t *  @example\n\t\t\t * //pitch the modulator an octave below carrier\n\t\t\t * synth.harmonicity.value = 0.5;\n\t\t\t */\n\t        this.harmonicity = new Tone.Multiply(options.harmonicity);\n\t        this.harmonicity.units = Tone.Type.Positive;\n\t        /**\n\t\t\t *  the node where the modulation happens\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulationNode = new Tone.Gain(0);\n\t        //connections\n\t        this.frequency.connect(this._carrier.frequency);\n\t        this.frequency.chain(this.harmonicity, this._modulator.frequency);\n\t        this.frequency.chain(this.modulationIndex, this._modulationNode);\n\t        this._modulator.connect(this._modulationNode.gain);\n\t        this._modulationNode.connect(this._carrier.frequency);\n\t        this._carrier.connect(this.output);\n\t        this.detune.connect(this._modulator.detune);\n\t        this.phase = options.phase;\n\t        this._readOnly([\n\t            'modulationIndex',\n\t            'frequency',\n\t            'detune',\n\t            'harmonicity'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.FMOscillator, Tone.Source);\n\t    /**\n\t\t *  default values\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.FMOscillator.defaults = {\n\t        'frequency': 440,\n\t        'detune': 0,\n\t        'phase': 0,\n\t        'modulationIndex': 2,\n\t        'modulationType': 'square',\n\t        'harmonicity': 1\n\t    };\n\t    /**\n\t\t *  start the oscillator\n\t\t *  @param  {Time} [time=now]\n\t\t *  @private\n\t\t */\n\t    Tone.FMOscillator.prototype._start = function (time) {\n\t        this._modulator.start(time);\n\t        this._carrier.start(time);\n\t    };\n\t    /**\n\t\t *  stop the oscillator\n\t\t *  @param  {Time} time (optional) timing parameter\n\t\t *  @private\n\t\t */\n\t    Tone.FMOscillator.prototype._stop = function (time) {\n\t        this._modulator.stop(time);\n\t        this._carrier.stop(time);\n\t    };\n\t    /**\n\t\t *  stop the oscillator\n\t\t *  @param  {Time} time (optional) timing parameter\n\t\t *  @private\n\t\t */\n\t    Tone.FMOscillator.prototype.restart = function (time) {\n\t        this._modulator.restart(time);\n\t        this._carrier.restart(time);\n\t    };\n\t    /**\n\t\t * The type of the carrier oscillator\n\t\t * @memberOf Tone.FMOscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.FMOscillator.prototype, 'type', {\n\t        get: function () {\n\t            return this._carrier.type;\n\t        },\n\t        set: function (type) {\n\t            this._carrier.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t * The type of the modulator oscillator\n\t\t * @memberOf Tone.FMOscillator#\n\t\t * @type {String}\n\t\t * @name modulationType\n\t\t */\n\t    Object.defineProperty(Tone.FMOscillator.prototype, 'modulationType', {\n\t        get: function () {\n\t            return this._modulator.type;\n\t        },\n\t        set: function (type) {\n\t            this._modulator.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.FMOscillator#\n\t\t * @type {number}\n\t\t * @name phase\n\t\t */\n\t    Object.defineProperty(Tone.FMOscillator.prototype, 'phase', {\n\t        get: function () {\n\t            return this._carrier.phase;\n\t        },\n\t        set: function (phase) {\n\t            this._carrier.phase = phase;\n\t            this._modulator.phase = phase;\n\t        }\n\t    });\n\t    /**\n\t\t * The partials of the carrier waveform. A partial represents\n\t\t * the amplitude at a harmonic. The first harmonic is the\n\t\t * fundamental frequency, the second is the octave and so on\n\t\t * following the harmonic series.\n\t\t * Setting this value will automatically set the type to \"custom\".\n\t\t * The value is an empty array when the type is not \"custom\".\n\t\t * @memberOf Tone.FMOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @example\n\t\t * osc.partials = [1, 0.2, 0.01];\n\t\t */\n\t    Object.defineProperty(Tone.FMOscillator.prototype, 'partials', {\n\t        get: function () {\n\t            return this._carrier.partials;\n\t        },\n\t        set: function (partials) {\n\t            this._carrier.partials = partials;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return {Tone.FMOscillator} this\n\t\t */\n\t    Tone.FMOscillator.prototype.dispose = function () {\n\t        Tone.Source.prototype.dispose.call(this);\n\t        this._writable([\n\t            'modulationIndex',\n\t            'frequency',\n\t            'detune',\n\t            'harmonicity'\n\t        ]);\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        this.detune = null;\n\t        this.harmonicity.dispose();\n\t        this.harmonicity = null;\n\t        this._carrier.dispose();\n\t        this._carrier = null;\n\t        this._modulator.dispose();\n\t        this._modulator = null;\n\t        this._modulationNode.dispose();\n\t        this._modulationNode = null;\n\t        this.modulationIndex.dispose();\n\t        this.modulationIndex = null;\n\t        return this;\n\t    };\n\t    return Tone.FMOscillator;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.AMOscillator\n\t\t *\n\t\t *  @extends {Tone.Oscillator}\n\t\t *  @constructor\n\t\t *  @param {Frequency} frequency The starting frequency of the oscillator.\n\t\t *  @param {String} type The type of the carrier oscillator.\n\t\t *  @param {String} modulationType The type of the modulator oscillator.\n\t\t *  @example\n\t\t * //a sine oscillator frequency-modulated by a square wave\n\t\t * var fmOsc = new Tone.AMOscillator(\"Ab3\", \"sine\", \"square\").toMaster().start();\n\t\t */\n\t    Tone.AMOscillator = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'type',\n\t            'modulationType'\n\t        ], Tone.AMOscillator);\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  The carrier oscillator\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t *  @private\n\t\t\t */\n\t        this._carrier = new Tone.Oscillator(options.frequency, options.type);\n\t        /**\n\t\t\t *  The oscillator's frequency\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = this._carrier.frequency;\n\t        /**\n\t\t\t *  The detune control signal.\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = this._carrier.detune;\n\t        this.detune.value = options.detune;\n\t        /**\n\t\t\t *  The modulating oscillator\n\t\t\t *  @type  {Tone.Oscillator}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulator = new Tone.Oscillator(options.frequency, options.modulationType);\n\t        /**\n\t\t\t *  convert the -1,1 output to 0,1\n\t\t\t *  @type {Tone.AudioToGain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulationScale = new Tone.AudioToGain();\n\t        /**\n\t\t\t *  Harmonicity is the frequency ratio between the carrier and the modulator oscillators.\n\t\t\t *  A harmonicity of 1 gives both oscillators the same frequency.\n\t\t\t *  Harmonicity = 2 means a change of an octave.\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t *  @example\n\t\t\t * //pitch the modulator an octave below carrier\n\t\t\t * synth.harmonicity.value = 0.5;\n\t\t\t */\n\t        this.harmonicity = new Tone.Multiply(options.harmonicity);\n\t        this.harmonicity.units = Tone.Type.Positive;\n\t        /**\n\t\t\t *  the node where the modulation happens\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulationNode = new Tone.Gain(0);\n\t        //connections\n\t        this.frequency.chain(this.harmonicity, this._modulator.frequency);\n\t        this.detune.connect(this._modulator.detune);\n\t        this._modulator.chain(this._modulationScale, this._modulationNode.gain);\n\t        this._carrier.chain(this._modulationNode, this.output);\n\t        this.phase = options.phase;\n\t        this._readOnly([\n\t            'frequency',\n\t            'detune',\n\t            'harmonicity'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.AMOscillator, Tone.Oscillator);\n\t    /**\n\t\t *  default values\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.AMOscillator.defaults = {\n\t        'frequency': 440,\n\t        'detune': 0,\n\t        'phase': 0,\n\t        'modulationType': 'square',\n\t        'harmonicity': 1\n\t    };\n\t    /**\n\t\t *  start the oscillator\n\t\t *  @param  {Time} [time=now]\n\t\t *  @private\n\t\t */\n\t    Tone.AMOscillator.prototype._start = function (time) {\n\t        this._modulator.start(time);\n\t        this._carrier.start(time);\n\t    };\n\t    /**\n\t\t *  stop the oscillator\n\t\t *  @param  {Time} time (optional) timing parameter\n\t\t *  @private\n\t\t */\n\t    Tone.AMOscillator.prototype._stop = function (time) {\n\t        this._modulator.stop(time);\n\t        this._carrier.stop(time);\n\t    };\n\t    /**\n\t\t *  restart the oscillator\n\t\t *  @param  {Time} time (optional) timing parameter\n\t\t *  @private\n\t\t */\n\t    Tone.AMOscillator.prototype.restart = function (time) {\n\t        this._modulator.restart(time);\n\t        this._carrier.restart(time);\n\t    };\n\t    /**\n\t\t * The type of the carrier oscillator\n\t\t * @memberOf Tone.AMOscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.AMOscillator.prototype, 'type', {\n\t        get: function () {\n\t            return this._carrier.type;\n\t        },\n\t        set: function (type) {\n\t            this._carrier.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t * The type of the modulator oscillator\n\t\t * @memberOf Tone.AMOscillator#\n\t\t * @type {string}\n\t\t * @name modulationType\n\t\t */\n\t    Object.defineProperty(Tone.AMOscillator.prototype, 'modulationType', {\n\t        get: function () {\n\t            return this._modulator.type;\n\t        },\n\t        set: function (type) {\n\t            this._modulator.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.AMOscillator#\n\t\t * @type {number}\n\t\t * @name phase\n\t\t */\n\t    Object.defineProperty(Tone.AMOscillator.prototype, 'phase', {\n\t        get: function () {\n\t            return this._carrier.phase;\n\t        },\n\t        set: function (phase) {\n\t            this._carrier.phase = phase;\n\t            this._modulator.phase = phase;\n\t        }\n\t    });\n\t    /**\n\t\t * The partials of the carrier waveform. A partial represents\n\t\t * the amplitude at a harmonic. The first harmonic is the\n\t\t * fundamental frequency, the second is the octave and so on\n\t\t * following the harmonic series.\n\t\t * Setting this value will automatically set the type to \"custom\".\n\t\t * The value is an empty array when the type is not \"custom\".\n\t\t * @memberOf Tone.AMOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @example\n\t\t * osc.partials = [1, 0.2, 0.01];\n\t\t */\n\t    Object.defineProperty(Tone.AMOscillator.prototype, 'partials', {\n\t        get: function () {\n\t            return this._carrier.partials;\n\t        },\n\t        set: function (partials) {\n\t            this._carrier.partials = partials;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return {Tone.AMOscillator} this\n\t\t */\n\t    Tone.AMOscillator.prototype.dispose = function () {\n\t        Tone.Source.prototype.dispose.call(this);\n\t        this._writable([\n\t            'frequency',\n\t            'detune',\n\t            'harmonicity'\n\t        ]);\n\t        this.frequency = null;\n\t        this.detune = null;\n\t        this.harmonicity.dispose();\n\t        this.harmonicity = null;\n\t        this._carrier.dispose();\n\t        this._carrier = null;\n\t        this._modulator.dispose();\n\t        this._modulator = null;\n\t        this._modulationNode.dispose();\n\t        this._modulationNode = null;\n\t        this._modulationScale.dispose();\n\t        this._modulationScale = null;\n\t        return this;\n\t    };\n\t    return Tone.AMOscillator;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.FatOscillator\n\t\t *\n\t\t *  @extends {Tone.Source}\n\t\t *  @constructor\n\t\t *  @param {Frequency} frequency The starting frequency of the oscillator.\n\t\t *  @param {String} type The type of the carrier oscillator.\n\t\t *  @param {String} modulationType The type of the modulator oscillator.\n\t\t *  @example\n\t\t * //a sine oscillator frequency-modulated by a square wave\n\t\t * var fmOsc = new Tone.FatOscillator(\"Ab3\", \"sine\", \"square\").toMaster().start();\n\t\t */\n\t    Tone.FatOscillator = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'type',\n\t            'spread'\n\t        ], Tone.FatOscillator);\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  The oscillator's frequency\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The detune control signal.\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t        /**\n\t\t\t *  The array of oscillators\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._oscillators = [];\n\t        /**\n\t\t\t *  The total spread of the oscillators\n\t\t\t *  @type  {Cents}\n\t\t\t *  @private\n\t\t\t */\n\t        this._spread = options.spread;\n\t        /**\n\t\t\t *  The type of the oscillator\n\t\t\t *  @type {String}\n\t\t\t *  @private\n\t\t\t */\n\t        this._type = options.type;\n\t        /**\n\t\t\t *  The phase of the oscillators\n\t\t\t *  @type {Degrees}\n\t\t\t *  @private\n\t\t\t */\n\t        this._phase = options.phase;\n\t        /**\n\t\t\t *  The partials array\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._partials = Tone.defaultArg(options.partials, []);\n\t        //set the count initially\n\t        this.count = options.count;\n\t        this._readOnly([\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.FatOscillator, Tone.Source);\n\t    /**\n\t\t *  default values\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.FatOscillator.defaults = {\n\t        'frequency': 440,\n\t        'detune': 0,\n\t        'phase': 0,\n\t        'spread': 20,\n\t        'count': 3,\n\t        'type': 'sawtooth'\n\t    };\n\t    /**\n\t\t *  start the oscillator\n\t\t *  @param  {Time} [time=now]\n\t\t *  @private\n\t\t */\n\t    Tone.FatOscillator.prototype._start = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._forEach(function (osc) {\n\t            osc.start(time);\n\t        });\n\t    };\n\t    /**\n\t\t *  stop the oscillator\n\t\t *  @param  {Time} [time=now]\n\t\t *  @private\n\t\t */\n\t    Tone.FatOscillator.prototype._stop = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._forEach(function (osc) {\n\t            osc.stop(time);\n\t        });\n\t    };\n\t    /**\n\t\t *  restart the oscillator\n\t\t *  @param  {Time} time (optional) timing parameter\n\t\t *  @private\n\t\t */\n\t    Tone.FatOscillator.prototype.restart = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._forEach(function (osc) {\n\t            osc.restart(time);\n\t        });\n\t    };\n\t    /**\n\t\t *  Iterate over all of the oscillators\n\t\t *  @param  {Function}  iterator  The iterator function\n\t\t *  @private\n\t\t */\n\t    Tone.FatOscillator.prototype._forEach = function (iterator) {\n\t        for (var i = 0; i < this._oscillators.length; i++) {\n\t            iterator.call(this, this._oscillators[i], i);\n\t        }\n\t    };\n\t    /**\n\t\t * The type of the carrier oscillator\n\t\t * @memberOf Tone.FatOscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.FatOscillator.prototype, 'type', {\n\t        get: function () {\n\t            return this._type;\n\t        },\n\t        set: function (type) {\n\t            this._type = type;\n\t            this._forEach(function (osc) {\n\t                osc.type = type;\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t * The detune spread between the oscillators. If \"count\" is\n\t\t * set to 3 oscillators and the \"spread\" is set to 40,\n\t\t * the three oscillators would be detuned like this: [-20, 0, 20]\n\t\t * for a total detune spread of 40 cents.\n\t\t * @memberOf Tone.FatOscillator#\n\t\t * @type {Cents}\n\t\t * @name spread\n\t\t */\n\t    Object.defineProperty(Tone.FatOscillator.prototype, 'spread', {\n\t        get: function () {\n\t            return this._spread;\n\t        },\n\t        set: function (spread) {\n\t            this._spread = spread;\n\t            if (this._oscillators.length > 1) {\n\t                var start = -spread / 2;\n\t                var step = spread / (this._oscillators.length - 1);\n\t                this._forEach(function (osc, i) {\n\t                    osc.detune.value = start + step * i;\n\t                });\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The number of detuned oscillators\n\t\t * @memberOf Tone.FatOscillator#\n\t\t * @type {Number}\n\t\t * @name count\n\t\t */\n\t    Object.defineProperty(Tone.FatOscillator.prototype, 'count', {\n\t        get: function () {\n\t            return this._oscillators.length;\n\t        },\n\t        set: function (count) {\n\t            count = Math.max(count, 1);\n\t            if (this._oscillators.length !== count) {\n\t                // var partials = this.partials;\n\t                // var type = this.type;\n\t                //dispose the previous oscillators\n\t                this._forEach(function (osc) {\n\t                    osc.dispose();\n\t                });\n\t                this._oscillators = [];\n\t                for (var i = 0; i < count; i++) {\n\t                    var osc = new Tone.Oscillator();\n\t                    if (this.type === Tone.Oscillator.Type.Custom) {\n\t                        osc.partials = this._partials;\n\t                    } else {\n\t                        osc.type = this._type;\n\t                    }\n\t                    osc.phase = this._phase;\n\t                    osc.volume.value = -6 - count * 1.1;\n\t                    this.frequency.connect(osc.frequency);\n\t                    this.detune.connect(osc.detune);\n\t                    osc.connect(this.output);\n\t                    this._oscillators[i] = osc;\n\t                }\n\t                //set the spread\n\t                this.spread = this._spread;\n\t                if (this.state === Tone.State.Started) {\n\t                    this._forEach(function (osc) {\n\t                        osc.start();\n\t                    });\n\t                }\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.FatOscillator#\n\t\t * @type {Number}\n\t\t * @name phase\n\t\t */\n\t    Object.defineProperty(Tone.FatOscillator.prototype, 'phase', {\n\t        get: function () {\n\t            return this._phase;\n\t        },\n\t        set: function (phase) {\n\t            this._phase = phase;\n\t            this._forEach(function (osc) {\n\t                osc.phase = phase;\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t * The partials of the carrier waveform. A partial represents\n\t\t * the amplitude at a harmonic. The first harmonic is the\n\t\t * fundamental frequency, the second is the octave and so on\n\t\t * following the harmonic series.\n\t\t * Setting this value will automatically set the type to \"custom\".\n\t\t * The value is an empty array when the type is not \"custom\".\n\t\t * @memberOf Tone.FatOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @example\n\t\t * osc.partials = [1, 0.2, 0.01];\n\t\t */\n\t    Object.defineProperty(Tone.FatOscillator.prototype, 'partials', {\n\t        get: function () {\n\t            return this._partials;\n\t        },\n\t        set: function (partials) {\n\t            this._partials = partials;\n\t            this._type = Tone.Oscillator.Type.Custom;\n\t            this._forEach(function (osc) {\n\t                osc.partials = partials;\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return {Tone.FatOscillator} this\n\t\t */\n\t    Tone.FatOscillator.prototype.dispose = function () {\n\t        Tone.Source.prototype.dispose.call(this);\n\t        this._writable([\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        this.detune.dispose();\n\t        this.detune = null;\n\t        this._forEach(function (osc) {\n\t            osc.dispose();\n\t        });\n\t        this._oscillators = null;\n\t        this._partials = null;\n\t        return this;\n\t    };\n\t    return Tone.FatOscillator;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.OmniOscillator aggregates Tone.Oscillator, Tone.PulseOscillator,\n\t\t *         Tone.PWMOscillator, Tone.FMOscillator, Tone.AMOscillator, and Tone.FatOscillator\n\t\t *         into one class. The oscillator class can be changed by setting the `type`.\n\t\t *         `omniOsc.type = \"pwm\"` will set it to the Tone.PWMOscillator. Prefixing\n\t\t *         any of the basic types (\"sine\", \"square4\", etc.) with \"fm\", \"am\", or \"fat\"\n\t\t *         will use the FMOscillator, AMOscillator or FatOscillator respectively.\n\t\t *         For example: `omniOsc.type = \"fatsawtooth\"` will create set the oscillator\n\t\t *         to a FatOscillator of type \"sawtooth\".\n\t\t *\n\t\t *  @extends {Tone.Source}\n\t\t *  @constructor\n\t\t *  @param {Frequency} frequency The initial frequency of the oscillator.\n\t\t *  @param {String} type The type of the oscillator.\n\t\t *  @example\n\t\t *  var omniOsc = new Tone.OmniOscillator(\"C#4\", \"pwm\");\n\t\t */\n\t    Tone.OmniOscillator = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'type'\n\t        ], Tone.OmniOscillator);\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  The frequency control.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The detune control\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t        /**\n\t\t\t *  the type of the oscillator source\n\t\t\t *  @type {String}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sourceType = undefined;\n\t        /**\n\t\t\t *  the oscillator\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t *  @private\n\t\t\t */\n\t        this._oscillator = null;\n\t        //set the oscillator\n\t        this.type = options.type;\n\t        this._readOnly([\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t        //set the options\n\t        this.set(options);\n\t    };\n\t    Tone.extend(Tone.OmniOscillator, Tone.Source);\n\t    /**\n\t\t *  default values\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.OmniOscillator.defaults = {\n\t        'frequency': 440,\n\t        'detune': 0,\n\t        'type': 'sine',\n\t        'phase': 0\n\t    };\n\t    /**\n\t\t *  @enum {String}\n\t\t *  @private\n\t\t */\n\t    var OmniOscType = {\n\t        Pulse: 'PulseOscillator',\n\t        PWM: 'PWMOscillator',\n\t        Osc: 'Oscillator',\n\t        FM: 'FMOscillator',\n\t        AM: 'AMOscillator',\n\t        Fat: 'FatOscillator'\n\t    };\n\t    /**\n\t\t *  start the oscillator\n\t\t *  @param {Time} [time=now] the time to start the oscillator\n\t\t *  @private\n\t\t */\n\t    Tone.OmniOscillator.prototype._start = function (time) {\n\t        this._oscillator.start(time);\n\t    };\n\t    /**\n\t\t *  start the oscillator\n\t\t *  @param {Time} [time=now] the time to start the oscillator\n\t\t *  @private\n\t\t */\n\t    Tone.OmniOscillator.prototype._stop = function (time) {\n\t        this._oscillator.stop(time);\n\t    };\n\t    Tone.OmniOscillator.prototype.restart = function (time) {\n\t        this._oscillator.restart(time);\n\t    };\n\t    /**\n\t\t * The type of the oscillator. Can be any of the basic types: sine, square, triangle, sawtooth. Or\n\t\t * prefix the basic types with \"fm\", \"am\", or \"fat\" to use the FMOscillator, AMOscillator or FatOscillator\n\t\t * types. The oscillator could also be set to \"pwm\" or \"pulse\". All of the parameters of the\n\t\t * oscillator's class are accessible when the oscillator is set to that type, but throws an error\n\t\t * when it's not.\n\t\t *\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {String}\n\t\t * @name type\n\t\t * @example\n\t\t * omniOsc.type = \"pwm\";\n\t\t * //modulationFrequency is parameter which is available\n\t\t * //only when the type is \"pwm\".\n\t\t * omniOsc.modulationFrequency.value = 0.5;\n\t\t * @example\n\t\t * //an square wave frequency modulated by a sawtooth\n\t\t * omniOsc.type = \"fmsquare\";\n\t\t * omniOsc.modulationType = \"sawtooth\";\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'type', {\n\t        get: function () {\n\t            var prefix = '';\n\t            if (this._sourceType === OmniOscType.FM) {\n\t                prefix = 'fm';\n\t            } else if (this._sourceType === OmniOscType.AM) {\n\t                prefix = 'am';\n\t            } else if (this._sourceType === OmniOscType.Fat) {\n\t                prefix = 'fat';\n\t            }\n\t            return prefix + this._oscillator.type;\n\t        },\n\t        set: function (type) {\n\t            if (type.substr(0, 2) === 'fm') {\n\t                this._createNewOscillator(OmniOscType.FM);\n\t                this._oscillator.type = type.substr(2);\n\t            } else if (type.substr(0, 2) === 'am') {\n\t                this._createNewOscillator(OmniOscType.AM);\n\t                this._oscillator.type = type.substr(2);\n\t            } else if (type.substr(0, 3) === 'fat') {\n\t                this._createNewOscillator(OmniOscType.Fat);\n\t                this._oscillator.type = type.substr(3);\n\t            } else if (type === 'pwm') {\n\t                this._createNewOscillator(OmniOscType.PWM);\n\t            } else if (type === 'pulse') {\n\t                this._createNewOscillator(OmniOscType.Pulse);\n\t            } else {\n\t                this._createNewOscillator(OmniOscType.Osc);\n\t                this._oscillator.type = type;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The partials of the waveform. A partial represents\n\t\t * the amplitude at a harmonic. The first harmonic is the\n\t\t * fundamental frequency, the second is the octave and so on\n\t\t * following the harmonic series.\n\t\t * Setting this value will automatically set the type to \"custom\".\n\t\t * The value is an empty array when the type is not \"custom\".\n\t\t * This is not available on \"pwm\" and \"pulse\" oscillator types.\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @example\n\t\t * osc.partials = [1, 0.2, 0.01];\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'partials', {\n\t        get: function () {\n\t            return this._oscillator.partials;\n\t        },\n\t        set: function (partials) {\n\t            this._oscillator.partials = partials;\n\t        }\n\t    });\n\t    /**\n\t\t *  Set a member/attribute of the oscillator.\n\t\t *  @param {Object|String} params\n\t\t *  @param {number=} value\n\t\t *  @param {Time=} rampTime\n\t\t *  @returns {Tone.OmniOscillator} this\n\t\t */\n\t    Tone.OmniOscillator.prototype.set = function (params, value) {\n\t        //make sure the type is set first\n\t        if (params === 'type') {\n\t            this.type = value;\n\t        } else if (Tone.isObject(params) && params.hasOwnProperty('type')) {\n\t            this.type = params.type;\n\t        }\n\t        //then set the rest\n\t        Tone.prototype.set.apply(this, arguments);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  connect the oscillator to the frequency and detune signals\n\t\t *  @private\n\t\t */\n\t    Tone.OmniOscillator.prototype._createNewOscillator = function (oscType) {\n\t        if (oscType !== this._sourceType) {\n\t            this._sourceType = oscType;\n\t            var OscillatorConstructor = Tone[oscType];\n\t            //short delay to avoid clicks on the change\n\t            var now = this.now();\n\t            if (this._oscillator !== null) {\n\t                var oldOsc = this._oscillator;\n\t                oldOsc.stop(now);\n\t                //dispose the old one\n\t                this.context.setTimeout(function () {\n\t                    oldOsc.dispose();\n\t                    oldOsc = null;\n\t                }, this.blockTime);\n\t            }\n\t            this._oscillator = new OscillatorConstructor();\n\t            this.frequency.connect(this._oscillator.frequency);\n\t            this.detune.connect(this._oscillator.detune);\n\t            this._oscillator.connect(this.output);\n\t            if (this.state === Tone.State.Started) {\n\t                this._oscillator.start(now);\n\t            }\n\t        }\n\t    };\n\t    /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {Degrees}\n\t\t * @name phase\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'phase', {\n\t        get: function () {\n\t            return this._oscillator.phase;\n\t        },\n\t        set: function (phase) {\n\t            this._oscillator.phase = phase;\n\t        }\n\t    });\n\t    /**\n\t\t * The width of the oscillator (only if the oscillator is set to \"pulse\")\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {NormalRange}\n\t\t * @signal\n\t\t * @name width\n\t\t * @example\n\t\t * var omniOsc = new Tone.OmniOscillator(440, \"pulse\");\n\t\t * //can access the width attribute only if type === \"pulse\"\n\t\t * omniOsc.width.value = 0.2;\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'width', {\n\t        get: function () {\n\t            if (this._sourceType === OmniOscType.Pulse) {\n\t                return this._oscillator.width;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The number of detuned oscillators\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {Number}\n\t\t * @name count\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'count', {\n\t        get: function () {\n\t            if (this._sourceType === OmniOscType.Fat) {\n\t                return this._oscillator.count;\n\t            }\n\t        },\n\t        set: function (count) {\n\t            if (this._sourceType === OmniOscType.Fat) {\n\t                this._oscillator.count = count;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The detune spread between the oscillators. If \"count\" is\n\t\t * set to 3 oscillators and the \"spread\" is set to 40,\n\t\t * the three oscillators would be detuned like this: [-20, 0, 20]\n\t\t * for a total detune spread of 40 cents. See Tone.FatOscillator\n\t\t * for more info.\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {Cents}\n\t\t * @name spread\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'spread', {\n\t        get: function () {\n\t            if (this._sourceType === OmniOscType.Fat) {\n\t                return this._oscillator.spread;\n\t            }\n\t        },\n\t        set: function (spread) {\n\t            if (this._sourceType === OmniOscType.Fat) {\n\t                this._oscillator.spread = spread;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The type of the modulator oscillator. Only if the oscillator\n\t\t * is set to \"am\" or \"fm\" types. see. Tone.AMOscillator or Tone.FMOscillator\n\t\t * for more info.\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {String}\n\t\t * @name modulationType\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'modulationType', {\n\t        get: function () {\n\t            if (this._sourceType === OmniOscType.FM || this._sourceType === OmniOscType.AM) {\n\t                return this._oscillator.modulationType;\n\t            }\n\t        },\n\t        set: function (mType) {\n\t            if (this._sourceType === OmniOscType.FM || this._sourceType === OmniOscType.AM) {\n\t                this._oscillator.modulationType = mType;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The modulation index which is in essence the depth or amount of the modulation. In other terms it is the\n\t\t * ratio of the frequency of the modulating signal (mf) to the amplitude of the\n\t\t * modulating signal (ma) -- as in ma/mf.\n\t\t * See Tone.FMOscillator for more info.\n\t\t * @type {Positive}\n\t\t * @signal\n\t\t * @name modulationIndex\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'modulationIndex', {\n\t        get: function () {\n\t            if (this._sourceType === OmniOscType.FM) {\n\t                return this._oscillator.modulationIndex;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Harmonicity is the frequency ratio between the carrier and the modulator oscillators.\n\t\t *  A harmonicity of 1 gives both oscillators the same frequency.\n\t\t *  Harmonicity = 2 means a change of an octave. See Tone.AMOscillator or Tone.FMOscillator\n\t\t *  for more info.\n\t\t *  @memberOf Tone.OmniOscillator#\n\t\t *  @signal\n\t\t *  @type {Positive}\n\t\t *  @name harmonicity\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'harmonicity', {\n\t        get: function () {\n\t            if (this._sourceType === OmniOscType.FM || this._sourceType === OmniOscType.AM) {\n\t                return this._oscillator.harmonicity;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The modulationFrequency Signal of the oscillator\n\t\t * (only if the oscillator type is set to pwm). See\n\t\t * Tone.PWMOscillator for more info.\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {Frequency}\n\t\t * @signal\n\t\t * @name modulationFrequency\n\t\t * @example\n\t\t * var omniOsc = new Tone.OmniOscillator(440, \"pwm\");\n\t\t * //can access the modulationFrequency attribute only if type === \"pwm\"\n\t\t * omniOsc.modulationFrequency.value = 0.2;\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'modulationFrequency', {\n\t        get: function () {\n\t            if (this._sourceType === OmniOscType.PWM) {\n\t                return this._oscillator.modulationFrequency;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return {Tone.OmniOscillator} this\n\t\t */\n\t    Tone.OmniOscillator.prototype.dispose = function () {\n\t        Tone.Source.prototype.dispose.call(this);\n\t        this._writable([\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t        this.detune.dispose();\n\t        this.detune = null;\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        this._oscillator.dispose();\n\t        this._oscillator = null;\n\t        this._sourceType = null;\n\t        return this;\n\t    };\n\t    return Tone.OmniOscillator;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Base-class for all instruments\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t */\n\t    Tone.Instrument = function (options) {\n\t        //get the defaults\n\t        options = Tone.defaultArg(options, Tone.Instrument.defaults);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The output and volume triming node\n\t\t\t *  @type  {Tone.Volume}\n\t\t\t *  @private\n\t\t\t */\n\t        this._volume = this.output = new Tone.Volume(options.volume);\n\t        /**\n\t\t\t * The volume of the output in decibels.\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * source.volume.value = -6;\n\t\t\t */\n\t        this.volume = this._volume.volume;\n\t        this._readOnly('volume');\n\t        /**\n\t\t\t * Keep track of all events scheduled to the transport\n\t\t\t * when the instrument is 'synced'\n\t\t\t * @type {Array<Number>}\n\t\t\t * @private\n\t\t\t */\n\t        this._scheduledEvents = [];\n\t    };\n\t    Tone.extend(Tone.Instrument, Tone.AudioNode);\n\t    /**\n\t\t *  the default attributes\n\t\t *  @type {object}\n\t\t */\n\t    Tone.Instrument.defaults = {\n\t        /** the volume of the output in decibels */\n\t        'volume': 0\n\t    };\n\t    /**\n\t\t *  @abstract\n\t\t *  @param {string|number} note the note to trigger\n\t\t *  @param {Time} [time=now] the time to trigger the ntoe\n\t\t *  @param {number} [velocity=1] the velocity to trigger the note\n\t\t */\n\t    Tone.Instrument.prototype.triggerAttack = Tone.noOp;\n\t    /**\n\t\t *  @abstract\n\t\t *  @param {Time} [time=now] when to trigger the release\n\t\t */\n\t    Tone.Instrument.prototype.triggerRelease = Tone.noOp;\n\t    /**\n\t\t * Sync the instrument to the Transport. All subsequent calls of\n\t\t * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n\t\t * will be scheduled along the transport.\n\t\t * @example\n\t\t * instrument.sync()\n\t\t * //schedule 3 notes when the transport first starts\n\t\t * instrument.triggerAttackRelease('C4', '8n', 0)\n\t\t * instrument.triggerAttackRelease('E4', '8n', '8n')\n\t\t * instrument.triggerAttackRelease('G4', '8n', '4n')\n\t\t * //start the transport to hear the notes\n\t\t * Transport.start()\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t    Tone.Instrument.prototype.sync = function () {\n\t        this._syncMethod('triggerAttack', 1);\n\t        this._syncMethod('triggerRelease', 0);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Wrap the given method so that it can be synchronized\n\t\t * @param {String} method Which method to wrap and sync\n\t\t * @param  {Number} timePosition What position the time argument appears in\n\t\t * @private\n\t\t */\n\t    Tone.Instrument.prototype._syncMethod = function (method, timePosition) {\n\t        var originalMethod = this['_original_' + method] = this[method];\n\t        this[method] = function () {\n\t            var args = Array.prototype.slice.call(arguments);\n\t            var time = args[timePosition];\n\t            var id = Tone.Transport.schedule(function (t) {\n\t                args[timePosition] = t;\n\t                originalMethod.apply(this, args);\n\t            }.bind(this), time);\n\t            this._scheduledEvents.push(id);\n\t        }.bind(this);\n\t    };\n\t    /**\n\t\t * Unsync the instrument from the Transport\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t    Tone.Instrument.prototype.unsync = function () {\n\t        this._scheduledEvents.forEach(function (id) {\n\t            Tone.Transport.clear(id);\n\t        });\n\t        this._scheduledEvents = [];\n\t        if (this._original_triggerAttack) {\n\t            this.triggerAttack = this._original_triggerAttack;\n\t            this.triggerRelease = this._original_triggerRelease;\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Trigger the attack and then the release after the duration.\n\t\t *  @param  {Frequency} note     The note to trigger.\n\t\t *  @param  {Time} duration How long the note should be held for before\n\t\t *                          triggering the release. This value must be greater than 0.\n\t\t *  @param {Time} [time=now]  When the note should be triggered.\n\t\t *  @param  {NormalRange} [velocity=1] The velocity the note should be triggered at.\n\t\t *  @returns {Tone.Instrument} this\n\t\t *  @example\n\t\t * //trigger \"C4\" for the duration of an 8th note\n\t\t * synth.triggerAttackRelease(\"C4\", \"8n\");\n\t\t */\n\t    Tone.Instrument.prototype.triggerAttackRelease = function (note, duration, time, velocity) {\n\t        time = this.toSeconds(time);\n\t        duration = this.toSeconds(duration);\n\t        this.triggerAttack(note, time, velocity);\n\t        this.triggerRelease(time + duration);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Instrument} this\n\t\t */\n\t    Tone.Instrument.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._volume.dispose();\n\t        this._volume = null;\n\t        this._writable(['volume']);\n\t        this.volume = null;\n\t        this.unsync();\n\t        this._scheduledEvents = null;\n\t        return this;\n\t    };\n\t    return Tone.Instrument;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  This is an abstract base class for other monophonic instruments to \n\t\t *          extend. IMPORTANT: It does not make any sound on its own and\n\t\t *          shouldn't be directly instantiated.\n\t\t *\n\t\t *  @constructor\n\t\t *  @abstract\n\t\t *  @extends {Tone.Instrument}\n\t\t */\n\t    Tone.Monophonic = function (options) {\n\t        //get the defaults\n\t        options = Tone.defaultArg(options, Tone.Monophonic.defaults);\n\t        Tone.Instrument.call(this, options);\n\t        /**\n\t\t\t *  The glide time between notes. \n\t\t\t *  @type {Time}\n\t\t\t */\n\t        this.portamento = options.portamento;\n\t    };\n\t    Tone.extend(Tone.Monophonic, Tone.Instrument);\n\t    /**\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Monophonic.defaults = { 'portamento': 0 };\n\t    /**\n\t\t *  Trigger the attack of the note optionally with a given velocity. \n\t\t *  \n\t\t *  \n\t\t *  @param  {Frequency} note     The note to trigger.\n\t\t *  @param  {Time} [time=now]     When the note should start.\n\t\t *  @param  {number} [velocity=1] velocity The velocity scaler \n\t\t *                                determines how \"loud\" the note \n\t\t *                                will be triggered.\n\t\t *  @returns {Tone.Monophonic} this\n\t\t *  @example\n\t\t * synth.triggerAttack(\"C4\");\n\t\t *  @example\n\t\t * //trigger the note a half second from now at half velocity\n\t\t * synth.triggerAttack(\"C4\", \"+0.5\", 0.5);\n\t\t */\n\t    Tone.Monophonic.prototype.triggerAttack = function (note, time, velocity) {\n\t        time = this.toSeconds(time);\n\t        this._triggerEnvelopeAttack(time, velocity);\n\t        this.setNote(note, time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Trigger the release portion of the envelope\n\t\t *  @param  {Time} [time=now] If no time is given, the release happens immediatly\n\t\t *  @returns {Tone.Monophonic} this\n\t\t *  @example\n\t\t * synth.triggerRelease();\n\t\t */\n\t    Tone.Monophonic.prototype.triggerRelease = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._triggerEnvelopeRelease(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  override this method with the actual method\n\t\t *  @abstract\n\t\t *  @private\n\t\t */\n\t    Tone.Monophonic.prototype._triggerEnvelopeAttack = function () {\n\t    };\n\t    /**\n\t\t *  override this method with the actual method\n\t\t *  @abstract\n\t\t *  @private\n\t\t */\n\t    Tone.Monophonic.prototype._triggerEnvelopeRelease = function () {\n\t    };\n\t    /**\n\t\t *  Get the level of the output at the given time. Measures\n\t\t *  the envelope(s) value at the time. \n\t\t *  @param {Time} time The time to query the envelope value\n\t\t *  @return {NormalRange} The output level between 0-1\n\t\t */\n\t    Tone.Monophonic.prototype.getLevelAtTime = function (time) {\n\t        time = this.toSeconds(time);\n\t        return this.envelope.getValueAtTime(time);\n\t    };\n\t    /**\n\t\t *  Set the note at the given time. If no time is given, the note\n\t\t *  will set immediately. \n\t\t *  @param {Frequency} note The note to change to.\n\t\t *  @param  {Time} [time=now] The time when the note should be set. \n\t\t *  @returns {Tone.Monophonic} this\n\t\t * @example\n\t\t * //change to F#6 in one quarter note from now.\n\t\t * synth.setNote(\"F#6\", \"+4n\");\n\t\t * @example\n\t\t * //change to Bb4 right now\n\t\t * synth.setNote(\"Bb4\");\n\t\t */\n\t    Tone.Monophonic.prototype.setNote = function (note, time) {\n\t        time = this.toSeconds(time);\n\t        if (this.portamento > 0 && this.getLevelAtTime(time) > 0.05) {\n\t            var portTime = this.toSeconds(this.portamento);\n\t            this.frequency.exponentialRampTo(note, portTime, time);\n\t        } else {\n\t            this.frequency.setValueAtTime(note, time);\n\t        }\n\t        return this;\n\t    };\n\t    return Tone.Monophonic;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Synth is composed simply of a Tone.OmniOscillator\n\t\t *          routed through a Tone.AmplitudeEnvelope.\n\t\t *          <img src=\"https://docs.google.com/drawings/d/1-1_0YW2Z1J2EPI36P8fNCMcZG7N1w1GZluPs4og4evo/pub?w=1163&h=231\">\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Monophonic}\n\t\t *  @param {Object} [options] the options available for the synth\n\t\t *                          see defaults below\n\t\t *  @example\n\t\t * var synth = new Tone.Synth().toMaster();\n\t\t * synth.triggerAttackRelease(\"C4\", \"8n\");\n\t\t */\n\t    Tone.Synth = function (options) {\n\t        //get the defaults\n\t        options = Tone.defaultArg(options, Tone.Synth.defaults);\n\t        Tone.Monophonic.call(this, options);\n\t        /**\n\t\t\t *  The oscillator.\n\t\t\t *  @type {Tone.OmniOscillator}\n\t\t\t */\n\t        this.oscillator = new Tone.OmniOscillator(options.oscillator);\n\t        /**\n\t\t\t *  The frequency control.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = this.oscillator.frequency;\n\t        /**\n\t\t\t *  The detune control.\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = this.oscillator.detune;\n\t        /**\n\t\t\t *  The amplitude envelope.\n\t\t\t *  @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t        this.envelope = new Tone.AmplitudeEnvelope(options.envelope);\n\t        //connect the oscillators to the output\n\t        this.oscillator.chain(this.envelope, this.output);\n\t        this._readOnly([\n\t            'oscillator',\n\t            'frequency',\n\t            'detune',\n\t            'envelope'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.Synth, Tone.Monophonic);\n\t    /**\n\t\t *  @const\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Synth.defaults = {\n\t        'oscillator': { 'type': 'triangle' },\n\t        'envelope': {\n\t            'attack': 0.005,\n\t            'decay': 0.1,\n\t            'sustain': 0.3,\n\t            'release': 1\n\t        }\n\t    };\n\t    /**\n\t\t *  start the attack portion of the envelope\n\t\t *  @param {Time} [time=now] the time the attack should start\n\t\t *  @param {number} [velocity=1] the velocity of the note (0-1)\n\t\t *  @returns {Tone.Synth} this\n\t\t *  @private\n\t\t */\n\t    Tone.Synth.prototype._triggerEnvelopeAttack = function (time, velocity) {\n\t        //the envelopes\n\t        this.envelope.triggerAttack(time, velocity);\n\t        this.oscillator.start(time);\n\t        //if there is no release portion, stop the oscillator\n\t        if (this.envelope.sustain === 0) {\n\t            this.oscillator.stop(time + this.envelope.attack + this.envelope.decay);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  start the release portion of the envelope\n\t\t *  @param {Time} [time=now] the time the release should start\n\t\t *  @returns {Tone.Synth} this\n\t\t *  @private\n\t\t */\n\t    Tone.Synth.prototype._triggerEnvelopeRelease = function (time) {\n\t        time = this.toSeconds(time);\n\t        this.envelope.triggerRelease(time);\n\t        this.oscillator.stop(time + this.envelope.release);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Synth} this\n\t\t */\n\t    Tone.Synth.prototype.dispose = function () {\n\t        Tone.Monophonic.prototype.dispose.call(this);\n\t        this._writable([\n\t            'oscillator',\n\t            'frequency',\n\t            'detune',\n\t            'envelope'\n\t        ]);\n\t        this.oscillator.dispose();\n\t        this.oscillator = null;\n\t        this.envelope.dispose();\n\t        this.envelope = null;\n\t        this.frequency = null;\n\t        this.detune = null;\n\t        return this;\n\t    };\n\t    return Tone.Synth;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  AMSynth uses the output of one Tone.Synth to modulate the\n\t\t *          amplitude of another Tone.Synth. The harmonicity (the ratio between\n\t\t *          the two signals) affects the timbre of the output signal greatly.\n\t\t *          Read more about Amplitude Modulation Synthesis on\n\t\t *          [SoundOnSound](https://web.archive.org/web/20160404103653/http://www.soundonsound.com:80/sos/mar00/articles/synthsecrets.htm).\n\t\t *          <img src=\"https://docs.google.com/drawings/d/1TQu8Ed4iFr1YTLKpB3U1_hur-UwBrh5gdBXc8BxfGKw/pub?w=1009&h=457\">\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Monophonic}\n\t\t *  @param {Object} [options] the options available for the synth\n\t\t *                            see defaults below\n\t\t *  @example\n\t\t * var synth = new Tone.AMSynth().toMaster();\n\t\t * synth.triggerAttackRelease(\"C4\", \"4n\");\n\t\t */\n\t    Tone.AMSynth = function (options) {\n\t        options = Tone.defaultArg(options, Tone.AMSynth.defaults);\n\t        Tone.Monophonic.call(this, options);\n\t        /**\n\t\t\t *  The carrier voice.\n\t\t\t *  @type {Tone.Synth}\n\t\t\t *  @private\n\t\t\t */\n\t        this._carrier = new Tone.Synth();\n\t        this._carrier.volume.value = -10;\n\t        /**\n\t\t\t *  The carrier's oscillator\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t */\n\t        this.oscillator = this._carrier.oscillator;\n\t        /**\n\t\t\t *  The carrier's envelope\n\t\t\t *  @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t        this.envelope = this._carrier.envelope.set(options.envelope);\n\t        /**\n\t\t\t *  The modulator voice.\n\t\t\t *  @type {Tone.Synth}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulator = new Tone.Synth();\n\t        this._modulator.volume.value = -10;\n\t        /**\n\t\t\t *  The modulator's oscillator which is applied\n\t\t\t *  to the amplitude of the oscillator\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t */\n\t        this.modulation = this._modulator.oscillator.set(options.modulation);\n\t        /**\n\t\t\t *  The modulator's envelope\n\t\t\t *  @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t        this.modulationEnvelope = this._modulator.envelope.set(options.modulationEnvelope);\n\t        /**\n\t\t\t *  The frequency.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(440, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The detune in cents\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t        /**\n\t\t\t *  Harmonicity is the ratio between the two voices. A harmonicity of\n\t\t\t *  1 is no change. Harmonicity = 2 means a change of an octave.\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t *  @example\n\t\t\t * //pitch voice1 an octave below voice0\n\t\t\t * synth.harmonicity.value = 0.5;\n\t\t\t */\n\t        this.harmonicity = new Tone.Multiply(options.harmonicity);\n\t        this.harmonicity.units = Tone.Type.Positive;\n\t        /**\n\t\t\t *  convert the -1,1 output to 0,1\n\t\t\t *  @type {Tone.AudioToGain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulationScale = new Tone.AudioToGain();\n\t        /**\n\t\t\t *  the node where the modulation happens\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulationNode = new Tone.Gain();\n\t        //control the two voices frequency\n\t        this.frequency.connect(this._carrier.frequency);\n\t        this.frequency.chain(this.harmonicity, this._modulator.frequency);\n\t        this.detune.fan(this._carrier.detune, this._modulator.detune);\n\t        this._modulator.chain(this._modulationScale, this._modulationNode.gain);\n\t        this._carrier.chain(this._modulationNode, this.output);\n\t        this._readOnly([\n\t            'frequency',\n\t            'harmonicity',\n\t            'oscillator',\n\t            'envelope',\n\t            'modulation',\n\t            'modulationEnvelope',\n\t            'detune'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.AMSynth, Tone.Monophonic);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.AMSynth.defaults = {\n\t        'harmonicity': 3,\n\t        'detune': 0,\n\t        'oscillator': { 'type': 'sine' },\n\t        'envelope': {\n\t            'attack': 0.01,\n\t            'decay': 0.01,\n\t            'sustain': 1,\n\t            'release': 0.5\n\t        },\n\t        'modulation': { 'type': 'square' },\n\t        'modulationEnvelope': {\n\t            'attack': 0.5,\n\t            'decay': 0,\n\t            'sustain': 1,\n\t            'release': 0.5\n\t        }\n\t    };\n\t    /**\n\t\t *  trigger the attack portion of the note\n\t\t *\n\t\t *  @param  {Time} [time=now] the time the note will occur\n\t\t *  @param {NormalRange} [velocity=1] the velocity of the note\n\t\t *  @private\n\t\t *  @returns {Tone.AMSynth} this\n\t\t */\n\t    Tone.AMSynth.prototype._triggerEnvelopeAttack = function (time, velocity) {\n\t        //the port glide\n\t        time = this.toSeconds(time);\n\t        //the envelopes\n\t        this._carrier._triggerEnvelopeAttack(time, velocity);\n\t        this._modulator._triggerEnvelopeAttack(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  trigger the release portion of the note\n\t\t *\n\t\t *  @param  {Time} [time=now] the time the note will release\n\t\t *  @private\n\t\t *  @returns {Tone.AMSynth} this\n\t\t */\n\t    Tone.AMSynth.prototype._triggerEnvelopeRelease = function (time) {\n\t        this._carrier._triggerEnvelopeRelease(time);\n\t        this._modulator._triggerEnvelopeRelease(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.AMSynth} this\n\t\t */\n\t    Tone.AMSynth.prototype.dispose = function () {\n\t        Tone.Monophonic.prototype.dispose.call(this);\n\t        this._writable([\n\t            'frequency',\n\t            'harmonicity',\n\t            'oscillator',\n\t            'envelope',\n\t            'modulation',\n\t            'modulationEnvelope',\n\t            'detune'\n\t        ]);\n\t        this._carrier.dispose();\n\t        this._carrier = null;\n\t        this._modulator.dispose();\n\t        this._modulator = null;\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        this.detune.dispose();\n\t        this.detune = null;\n\t        this.harmonicity.dispose();\n\t        this.harmonicity = null;\n\t        this._modulationScale.dispose();\n\t        this._modulationScale = null;\n\t        this._modulationNode.dispose();\n\t        this._modulationNode = null;\n\t        this.oscillator = null;\n\t        this.envelope = null;\n\t        this.modulationEnvelope = null;\n\t        this.modulation = null;\n\t        return this;\n\t    };\n\t    return Tone.AMSynth;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.MonoSynth is composed of one oscillator, one filter, and two envelopes.\n\t\t *          The amplitude of the Tone.Oscillator and the cutoff frequency of the\n\t\t *          Tone.Filter are controlled by Tone.Envelopes.\n\t\t *          <img src=\"https://docs.google.com/drawings/d/1gaY1DF9_Hzkodqf8JI1Cg2VZfwSElpFQfI94IQwad38/pub?w=924&h=240\">\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Monophonic}\n\t\t *  @param {Object} [options] the options available for the synth\n\t\t *                          see defaults below\n\t\t *  @example\n\t\t * var synth = new Tone.MonoSynth({\n\t\t * \t\"oscillator\" : {\n\t\t * \t\t\"type\" : \"square\"\n\t\t *  },\n\t\t *  \"envelope\" : {\n\t\t *  \t\"attack\" : 0.1\n\t\t *  }\n\t\t * }).toMaster();\n\t\t * synth.triggerAttackRelease(\"C4\", \"8n\");\n\t\t */\n\t    Tone.MonoSynth = function (options) {\n\t        //get the defaults\n\t        options = Tone.defaultArg(options, Tone.MonoSynth.defaults);\n\t        Tone.Monophonic.call(this, options);\n\t        /**\n\t\t\t *  The oscillator.\n\t\t\t *  @type {Tone.OmniOscillator}\n\t\t\t */\n\t        this.oscillator = new Tone.OmniOscillator(options.oscillator);\n\t        /**\n\t\t\t *  The frequency control.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = this.oscillator.frequency;\n\t        /**\n\t\t\t *  The detune control.\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = this.oscillator.detune;\n\t        /**\n\t\t\t *  The filter.\n\t\t\t *  @type {Tone.Filter}\n\t\t\t */\n\t        this.filter = new Tone.Filter(options.filter);\n\t        /**\n\t\t\t *  The filter envelope.\n\t\t\t *  @type {Tone.FrequencyEnvelope}\n\t\t\t */\n\t        this.filterEnvelope = new Tone.FrequencyEnvelope(options.filterEnvelope);\n\t        /**\n\t\t\t *  The amplitude envelope.\n\t\t\t *  @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t        this.envelope = new Tone.AmplitudeEnvelope(options.envelope);\n\t        //connect the oscillators to the output\n\t        this.oscillator.chain(this.filter, this.envelope, this.output);\n\t        //connect the filter envelope\n\t        this.filterEnvelope.connect(this.filter.frequency);\n\t        this._readOnly([\n\t            'oscillator',\n\t            'frequency',\n\t            'detune',\n\t            'filter',\n\t            'filterEnvelope',\n\t            'envelope'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.MonoSynth, Tone.Monophonic);\n\t    /**\n\t\t *  @const\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.MonoSynth.defaults = {\n\t        'frequency': 'C4',\n\t        'detune': 0,\n\t        'oscillator': { 'type': 'square' },\n\t        'filter': {\n\t            'Q': 6,\n\t            'type': 'lowpass',\n\t            'rolloff': -24\n\t        },\n\t        'envelope': {\n\t            'attack': 0.005,\n\t            'decay': 0.1,\n\t            'sustain': 0.9,\n\t            'release': 1\n\t        },\n\t        'filterEnvelope': {\n\t            'attack': 0.06,\n\t            'decay': 0.2,\n\t            'sustain': 0.5,\n\t            'release': 2,\n\t            'baseFrequency': 200,\n\t            'octaves': 7,\n\t            'exponent': 2\n\t        }\n\t    };\n\t    /**\n\t\t *  start the attack portion of the envelope\n\t\t *  @param {Time} [time=now] the time the attack should start\n\t\t *  @param {NormalRange} [velocity=1] the velocity of the note (0-1)\n\t\t *  @returns {Tone.MonoSynth} this\n\t\t *  @private\n\t\t */\n\t    Tone.MonoSynth.prototype._triggerEnvelopeAttack = function (time, velocity) {\n\t        time = this.toSeconds(time);\n\t        //the envelopes\n\t        this.envelope.triggerAttack(time, velocity);\n\t        this.filterEnvelope.triggerAttack(time);\n\t        this.oscillator.start(time);\n\t        if (this.envelope.sustain === 0) {\n\t            this.oscillator.stop(time + this.envelope.attack + this.envelope.decay);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  start the release portion of the envelope\n\t\t *  @param {Time} [time=now] the time the release should start\n\t\t *  @returns {Tone.MonoSynth} this\n\t\t *  @private\n\t\t */\n\t    Tone.MonoSynth.prototype._triggerEnvelopeRelease = function (time) {\n\t        this.envelope.triggerRelease(time);\n\t        this.filterEnvelope.triggerRelease(time);\n\t        this.oscillator.stop(time + this.envelope.release);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.MonoSynth} this\n\t\t */\n\t    Tone.MonoSynth.prototype.dispose = function () {\n\t        Tone.Monophonic.prototype.dispose.call(this);\n\t        this._writable([\n\t            'oscillator',\n\t            'frequency',\n\t            'detune',\n\t            'filter',\n\t            'filterEnvelope',\n\t            'envelope'\n\t        ]);\n\t        this.oscillator.dispose();\n\t        this.oscillator = null;\n\t        this.envelope.dispose();\n\t        this.envelope = null;\n\t        this.filterEnvelope.dispose();\n\t        this.filterEnvelope = null;\n\t        this.filter.dispose();\n\t        this.filter = null;\n\t        this.frequency = null;\n\t        this.detune = null;\n\t        return this;\n\t    };\n\t    return Tone.MonoSynth;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.DuoSynth is a monophonic synth composed of two\n\t\t *          MonoSynths run in parallel with control over the\n\t\t *          frequency ratio between the two voices and vibrato effect.\n\t\t *          <img src=\"https://docs.google.com/drawings/d/1bL4GXvfRMMlqS7XyBm9CjL9KJPSUKbcdBNpqOlkFLxk/pub?w=1012&h=448\">\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Monophonic}\n\t\t *  @param {Object} [options] the options available for the synth\n\t\t *                          see defaults below\n\t\t *  @example\n\t\t * var duoSynth = new Tone.DuoSynth().toMaster();\n\t\t * duoSynth.triggerAttackRelease(\"C4\", \"2n\");\n\t\t */\n\t    Tone.DuoSynth = function (options) {\n\t        options = Tone.defaultArg(options, Tone.DuoSynth.defaults);\n\t        Tone.Monophonic.call(this, options);\n\t        /**\n\t\t\t *  the first voice\n\t\t\t *  @type {Tone.MonoSynth}\n\t\t\t */\n\t        this.voice0 = new Tone.MonoSynth(options.voice0);\n\t        this.voice0.volume.value = -10;\n\t        /**\n\t\t\t *  the second voice\n\t\t\t *  @type {Tone.MonoSynth}\n\t\t\t */\n\t        this.voice1 = new Tone.MonoSynth(options.voice1);\n\t        this.voice1.volume.value = -10;\n\t        /**\n\t\t\t *  The vibrato LFO.\n\t\t\t *  @type {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._vibrato = new Tone.LFO(options.vibratoRate, -50, 50);\n\t        this._vibrato.start();\n\t        /**\n\t\t\t * the vibrato frequency\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t        this.vibratoRate = this._vibrato.frequency;\n\t        /**\n\t\t\t *  the vibrato gain\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._vibratoGain = new Tone.Gain(options.vibratoAmount, Tone.Type.Positive);\n\t        /**\n\t\t\t * The amount of vibrato\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t */\n\t        this.vibratoAmount = this._vibratoGain.gain;\n\t        /**\n\t\t\t *  the frequency control\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(440, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  Harmonicity is the ratio between the two voices. A harmonicity of\n\t\t\t *  1 is no change. Harmonicity = 2 means a change of an octave.\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t *  @example\n\t\t\t * //pitch voice1 an octave below voice0\n\t\t\t * duoSynth.harmonicity.value = 0.5;\n\t\t\t */\n\t        this.harmonicity = new Tone.Multiply(options.harmonicity);\n\t        this.harmonicity.units = Tone.Type.Positive;\n\t        //control the two voices frequency\n\t        this.frequency.connect(this.voice0.frequency);\n\t        this.frequency.chain(this.harmonicity, this.voice1.frequency);\n\t        this._vibrato.connect(this._vibratoGain);\n\t        this._vibratoGain.fan(this.voice0.detune, this.voice1.detune);\n\t        this.voice0.connect(this.output);\n\t        this.voice1.connect(this.output);\n\t        this._readOnly([\n\t            'voice0',\n\t            'voice1',\n\t            'frequency',\n\t            'vibratoAmount',\n\t            'vibratoRate'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.DuoSynth, Tone.Monophonic);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.DuoSynth.defaults = {\n\t        'vibratoAmount': 0.5,\n\t        'vibratoRate': 5,\n\t        'harmonicity': 1.5,\n\t        'voice0': {\n\t            'volume': -10,\n\t            'portamento': 0,\n\t            'oscillator': { 'type': 'sine' },\n\t            'filterEnvelope': {\n\t                'attack': 0.01,\n\t                'decay': 0,\n\t                'sustain': 1,\n\t                'release': 0.5\n\t            },\n\t            'envelope': {\n\t                'attack': 0.01,\n\t                'decay': 0,\n\t                'sustain': 1,\n\t                'release': 0.5\n\t            }\n\t        },\n\t        'voice1': {\n\t            'volume': -10,\n\t            'portamento': 0,\n\t            'oscillator': { 'type': 'sine' },\n\t            'filterEnvelope': {\n\t                'attack': 0.01,\n\t                'decay': 0,\n\t                'sustain': 1,\n\t                'release': 0.5\n\t            },\n\t            'envelope': {\n\t                'attack': 0.01,\n\t                'decay': 0,\n\t                'sustain': 1,\n\t                'release': 0.5\n\t            }\n\t        }\n\t    };\n\t    /**\n\t\t *  start the attack portion of the envelopes\n\t\t *\n\t\t *  @param {Time} [time=now] the time the attack should start\n\t\t *  @param {NormalRange} [velocity=1] the velocity of the note (0-1)\n\t\t *  @returns {Tone.DuoSynth} this\n\t\t *  @private\n\t\t */\n\t    Tone.DuoSynth.prototype._triggerEnvelopeAttack = function (time, velocity) {\n\t        time = this.toSeconds(time);\n\t        this.voice0._triggerEnvelopeAttack(time, velocity);\n\t        this.voice1._triggerEnvelopeAttack(time, velocity);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  start the release portion of the envelopes\n\t\t *\n\t\t *  @param {Time} [time=now] the time the release should start\n\t\t *  @returns {Tone.DuoSynth} this\n\t\t *  @private\n\t\t */\n\t    Tone.DuoSynth.prototype._triggerEnvelopeRelease = function (time) {\n\t        this.voice0._triggerEnvelopeRelease(time);\n\t        this.voice1._triggerEnvelopeRelease(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Get the level of the output at the given time. Measures\n\t\t *  the envelope(s) value at the time. \n\t\t *  @param {Time} time The time to query the envelope value\n\t\t *  @return {NormalRange} The output level between 0-1\n\t\t */\n\t    Tone.DuoSynth.prototype.getLevelAtTime = function (time) {\n\t        return (this.voice0.getLevelAtTime(time) + this.voice1.getLevelAtTime(time)) / 2;\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.DuoSynth} this\n\t\t */\n\t    Tone.DuoSynth.prototype.dispose = function () {\n\t        Tone.Monophonic.prototype.dispose.call(this);\n\t        this._writable([\n\t            'voice0',\n\t            'voice1',\n\t            'frequency',\n\t            'vibratoAmount',\n\t            'vibratoRate'\n\t        ]);\n\t        this.voice0.dispose();\n\t        this.voice0 = null;\n\t        this.voice1.dispose();\n\t        this.voice1 = null;\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        this._vibratoGain.dispose();\n\t        this._vibratoGain = null;\n\t        this._vibrato = null;\n\t        this.harmonicity.dispose();\n\t        this.harmonicity = null;\n\t        this.vibratoAmount.dispose();\n\t        this.vibratoAmount = null;\n\t        this.vibratoRate = null;\n\t        return this;\n\t    };\n\t    return Tone.DuoSynth;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  FMSynth is composed of two Tone.Synths where one Tone.Synth modulates\n\t\t *          the frequency of a second Tone.Synth. A lot of spectral content\n\t\t *          can be explored using the modulationIndex parameter. Read more about\n\t\t *          frequency modulation synthesis on Sound On Sound: [Part 1](https://web.archive.org/web/20160403123704/http://www.soundonsound.com/sos/apr00/articles/synthsecrets.htm), [Part 2](https://web.archive.org/web/20160403115835/http://www.soundonsound.com/sos/may00/articles/synth.htm).\n\t\t *          <img src=\"https://docs.google.com/drawings/d/1h0PUDZXPgi4Ikx6bVT6oncrYPLluFKy7lj53puxj-DM/pub?w=902&h=462\">\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Monophonic}\n\t\t *  @param {Object} [options] the options available for the synth\n\t\t *                          see defaults below\n\t\t *  @example\n\t\t * var fmSynth = new Tone.FMSynth().toMaster();\n\t\t * fmSynth.triggerAttackRelease(\"C5\", \"4n\");\n\t\t */\n\t    Tone.FMSynth = function (options) {\n\t        options = Tone.defaultArg(options, Tone.FMSynth.defaults);\n\t        Tone.Monophonic.call(this, options);\n\t        /**\n\t\t\t *  The carrier voice.\n\t\t\t *  @type {Tone.Synth}\n\t\t\t *  @private\n\t\t\t */\n\t        this._carrier = new Tone.Synth(options.carrier);\n\t        this._carrier.volume.value = -10;\n\t        /**\n\t\t\t *  The carrier's oscillator\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t */\n\t        this.oscillator = this._carrier.oscillator;\n\t        /**\n\t\t\t *  The carrier's envelope\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t */\n\t        this.envelope = this._carrier.envelope.set(options.envelope);\n\t        /**\n\t\t\t *  The modulator voice.\n\t\t\t *  @type {Tone.Synth}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulator = new Tone.Synth(options.modulator);\n\t        this._modulator.volume.value = -10;\n\t        /**\n\t\t\t *  The modulator's oscillator which is applied\n\t\t\t *  to the amplitude of the oscillator\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t */\n\t        this.modulation = this._modulator.oscillator.set(options.modulation);\n\t        /**\n\t\t\t *  The modulator's envelope\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t */\n\t        this.modulationEnvelope = this._modulator.envelope.set(options.modulationEnvelope);\n\t        /**\n\t\t\t *  The frequency control.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(440, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The detune in cents\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t        /**\n\t\t\t *  Harmonicity is the ratio between the two voices. A harmonicity of\n\t\t\t *  1 is no change. Harmonicity = 2 means a change of an octave.\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t *  @example\n\t\t\t * //pitch voice1 an octave below voice0\n\t\t\t * synth.harmonicity.value = 0.5;\n\t\t\t */\n\t        this.harmonicity = new Tone.Multiply(options.harmonicity);\n\t        this.harmonicity.units = Tone.Type.Positive;\n\t        /**\n\t\t\t *  The modulation index which essentially the depth or amount of the modulation. It is the\n\t\t\t *  ratio of the frequency of the modulating signal (mf) to the amplitude of the\n\t\t\t *  modulating signal (ma) -- as in ma/mf.\n\t\t\t *\t@type {Positive}\n\t\t\t *\t@signal\n\t\t\t */\n\t        this.modulationIndex = new Tone.Multiply(options.modulationIndex);\n\t        this.modulationIndex.units = Tone.Type.Positive;\n\t        /**\n\t\t\t *  the node where the modulation happens\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulationNode = new Tone.Gain(0);\n\t        //control the two voices frequency\n\t        this.frequency.connect(this._carrier.frequency);\n\t        this.frequency.chain(this.harmonicity, this._modulator.frequency);\n\t        this.frequency.chain(this.modulationIndex, this._modulationNode);\n\t        this.detune.fan(this._carrier.detune, this._modulator.detune);\n\t        this._modulator.connect(this._modulationNode.gain);\n\t        this._modulationNode.connect(this._carrier.frequency);\n\t        this._carrier.connect(this.output);\n\t        this._readOnly([\n\t            'frequency',\n\t            'harmonicity',\n\t            'modulationIndex',\n\t            'oscillator',\n\t            'envelope',\n\t            'modulation',\n\t            'modulationEnvelope',\n\t            'detune'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.FMSynth, Tone.Monophonic);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.FMSynth.defaults = {\n\t        'harmonicity': 3,\n\t        'modulationIndex': 10,\n\t        'detune': 0,\n\t        'oscillator': { 'type': 'sine' },\n\t        'envelope': {\n\t            'attack': 0.01,\n\t            'decay': 0.01,\n\t            'sustain': 1,\n\t            'release': 0.5\n\t        },\n\t        'modulation': { 'type': 'square' },\n\t        'modulationEnvelope': {\n\t            'attack': 0.5,\n\t            'decay': 0,\n\t            'sustain': 1,\n\t            'release': 0.5\n\t        }\n\t    };\n\t    /**\n\t\t * \ttrigger the attack portion of the note\n\t\t *\n\t\t *  @param  {Time} [time=now] the time the note will occur\n\t\t *  @param {number} [velocity=1] the velocity of the note\n\t\t *  @returns {Tone.FMSynth} this\n\t\t *  @private\n\t\t */\n\t    Tone.FMSynth.prototype._triggerEnvelopeAttack = function (time, velocity) {\n\t        time = this.toSeconds(time);\n\t        //the envelopes\n\t        this._carrier._triggerEnvelopeAttack(time, velocity);\n\t        this._modulator._triggerEnvelopeAttack(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  trigger the release portion of the note\n\t\t *\n\t\t *  @param  {Time} [time=now] the time the note will release\n\t\t *  @returns {Tone.FMSynth} this\n\t\t *  @private\n\t\t */\n\t    Tone.FMSynth.prototype._triggerEnvelopeRelease = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._carrier._triggerEnvelopeRelease(time);\n\t        this._modulator._triggerEnvelopeRelease(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.FMSynth} this\n\t\t */\n\t    Tone.FMSynth.prototype.dispose = function () {\n\t        Tone.Monophonic.prototype.dispose.call(this);\n\t        this._writable([\n\t            'frequency',\n\t            'harmonicity',\n\t            'modulationIndex',\n\t            'oscillator',\n\t            'envelope',\n\t            'modulation',\n\t            'modulationEnvelope',\n\t            'detune'\n\t        ]);\n\t        this._carrier.dispose();\n\t        this._carrier = null;\n\t        this._modulator.dispose();\n\t        this._modulator = null;\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        this.detune.dispose();\n\t        this.detune = null;\n\t        this.modulationIndex.dispose();\n\t        this.modulationIndex = null;\n\t        this.harmonicity.dispose();\n\t        this.harmonicity = null;\n\t        this._modulationNode.dispose();\n\t        this._modulationNode = null;\n\t        this.oscillator = null;\n\t        this.envelope = null;\n\t        this.modulationEnvelope = null;\n\t        this.modulation = null;\n\t        return this;\n\t    };\n\t    return Tone.FMSynth;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.MembraneSynth makes kick and tom sounds using a single oscillator\n\t\t *          with an amplitude envelope and frequency ramp. A Tone.OmniOscillator\n\t\t *          is routed through a Tone.AmplitudeEnvelope to the output. The drum\n\t\t *          quality of the sound comes from the frequency envelope applied\n\t\t *          during Tone.MembraneSynth.triggerAttack(note). The frequency envelope\n\t\t *          starts at <code>note * .octaves</code> and ramps to <code>note</code>\n\t\t *          over the duration of <code>.pitchDecay</code>.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Instrument}\n\t\t *  @param {Object} [options] the options available for the synth\n\t\t *                          see defaults below\n\t\t *  @example\n\t\t * var synth = new Tone.MembraneSynth().toMaster();\n\t\t * synth.triggerAttackRelease(\"C2\", \"8n\");\n\t\t */\n\t    Tone.MembraneSynth = function (options) {\n\t        options = Tone.defaultArg(options, Tone.MembraneSynth.defaults);\n\t        Tone.Instrument.call(this, options);\n\t        /**\n\t\t\t *  The oscillator.\n\t\t\t *  @type {Tone.OmniOscillator}\n\t\t\t */\n\t        this.oscillator = new Tone.OmniOscillator(options.oscillator);\n\t        /**\n\t\t\t *  The amplitude envelope.\n\t\t\t *  @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t        this.envelope = new Tone.AmplitudeEnvelope(options.envelope);\n\t        /**\n\t\t\t *  The number of octaves the pitch envelope ramps.\n\t\t\t *  @type {Positive}\n\t\t\t */\n\t        this.octaves = options.octaves;\n\t        /**\n\t\t\t *  The amount of time the frequency envelope takes.\n\t\t\t *  @type {Time}\n\t\t\t */\n\t        this.pitchDecay = options.pitchDecay;\n\t        this.oscillator.chain(this.envelope, this.output);\n\t        this._readOnly([\n\t            'oscillator',\n\t            'envelope'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.MembraneSynth, Tone.Instrument);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.MembraneSynth.defaults = {\n\t        'pitchDecay': 0.05,\n\t        'octaves': 10,\n\t        'oscillator': { 'type': 'sine' },\n\t        'envelope': {\n\t            'attack': 0.001,\n\t            'decay': 0.4,\n\t            'sustain': 0.01,\n\t            'release': 1.4,\n\t            'attackCurve': 'exponential'\n\t        }\n\t    };\n\t    /**\n\t\t *  Trigger the note at the given time with the given velocity.\n\t\t *\n\t\t *  @param  {Frequency} note     the note\n\t\t *  @param  {Time} [time=now]     the time, if not given is now\n\t\t *  @param  {number} [velocity=1] velocity defaults to 1\n\t\t *  @returns {Tone.MembraneSynth} this\n\t\t *  @example\n\t\t *  kick.triggerAttack(60);\n\t\t */\n\t    Tone.MembraneSynth.prototype.triggerAttack = function (note, time, velocity) {\n\t        time = this.toSeconds(time);\n\t        note = this.toFrequency(note);\n\t        var maxNote = note * this.octaves;\n\t        this.oscillator.frequency.setValueAtTime(maxNote, time);\n\t        this.oscillator.frequency.exponentialRampToValueAtTime(note, time + this.toSeconds(this.pitchDecay));\n\t        this.envelope.triggerAttack(time, velocity);\n\t        this.oscillator.start(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Trigger the release portion of the note.\n\t\t *\n\t\t *  @param  {Time} [time=now] the time the note will release\n\t\t *  @returns {Tone.MembraneSynth} this\n\t\t */\n\t    Tone.MembraneSynth.prototype.triggerRelease = function (time) {\n\t        time = this.toSeconds(time);\n\t        this.envelope.triggerRelease(time);\n\t        this.oscillator.stop(time + this.envelope.release);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.MembraneSynth} this\n\t\t */\n\t    Tone.MembraneSynth.prototype.dispose = function () {\n\t        Tone.Instrument.prototype.dispose.call(this);\n\t        this._writable([\n\t            'oscillator',\n\t            'envelope'\n\t        ]);\n\t        this.oscillator.dispose();\n\t        this.oscillator = null;\n\t        this.envelope.dispose();\n\t        this.envelope = null;\n\t        return this;\n\t    };\n\t    return Tone.MembraneSynth;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  Inharmonic ratio of frequencies based on the Roland TR-808\n\t\t *  Taken from https://ccrma.stanford.edu/papers/tr-808-cymbal-physically-informed-circuit-bendable-digital-model\n\t\t *  @private\n\t\t *  @static\n\t\t *  @type {Array}\n\t\t */\n\t    var inharmRatios = [\n\t        1,\n\t        1.483,\n\t        1.932,\n\t        2.546,\n\t        2.63,\n\t        3.897\n\t    ];\n\t    /**\n\t\t *  @class  A highly inharmonic and spectrally complex source with a highpass filter\n\t\t *          and amplitude envelope which is good for making metalophone sounds. Based\n\t\t *          on CymbalSynth by [@polyrhythmatic](https://github.com/polyrhythmatic).\n\t\t *          Inspiration from [Sound on Sound](https://web.archive.org/web/20160610143924/https://www.soundonsound.com/sos/jul02/articles/synthsecrets0702.asp).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Instrument}\n\t\t *  @param {Object} [options] The options availble for the synth\n\t\t *                             see defaults below\n\t\t */\n\t    Tone.MetalSynth = function (options) {\n\t        options = Tone.defaultArg(options, Tone.MetalSynth.defaults);\n\t        Tone.Instrument.call(this, options);\n\t        /**\n\t\t\t *  The frequency of the cymbal\n\t\t\t *  @type  {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The array of FMOscillators\n\t\t\t *  @type  {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._oscillators = [];\n\t        /**\n\t\t\t *  The frequency multipliers\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._freqMultipliers = [];\n\t        /**\n\t\t\t *  The amplitude for the body\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._amplitue = new Tone.Gain(0).connect(this.output);\n\t        /**\n\t\t\t *  highpass the output\n\t\t\t *  @type {Tone.Filter}\n\t\t\t *  @private\n\t\t\t */\n\t        this._highpass = new Tone.Filter({\n\t            'type': 'highpass',\n\t            'Q': -3.0102999566398125\n\t        }).connect(this._amplitue);\n\t        /**\n\t\t\t *  The number of octaves the highpass\n\t\t\t *  filter frequency ramps\n\t\t\t *  @type {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._octaves = options.octaves;\n\t        /**\n\t\t\t *  Scale the body envelope\n\t\t\t *  for the bandpass\n\t\t\t *  @type {Tone.Scale}\n\t\t\t *  @private\n\t\t\t */\n\t        this._filterFreqScaler = new Tone.Scale(options.resonance, 7000);\n\t        /**\n\t\t\t *  The envelope which is connected both to the\n\t\t\t *  amplitude and highpass filter's cutoff frequency\n\t\t\t *  @type  {Tone.Envelope}\n\t\t\t */\n\t        this.envelope = new Tone.Envelope({\n\t            'attack': options.envelope.attack,\n\t            'attackCurve': 'linear',\n\t            'decay': options.envelope.decay,\n\t            'sustain': 0,\n\t            'release': options.envelope.release\n\t        }).chain(this._filterFreqScaler, this._highpass.frequency);\n\t        this.envelope.connect(this._amplitue.gain);\n\t        for (var i = 0; i < inharmRatios.length; i++) {\n\t            var osc = new Tone.FMOscillator({\n\t                'type': 'square',\n\t                'modulationType': 'square',\n\t                'harmonicity': options.harmonicity,\n\t                'modulationIndex': options.modulationIndex\n\t            });\n\t            osc.connect(this._highpass);\n\t            this._oscillators[i] = osc;\n\t            var mult = new Tone.Multiply(inharmRatios[i]);\n\t            this._freqMultipliers[i] = mult;\n\t            this.frequency.chain(mult, osc.frequency);\n\t        }\n\t        //set the octaves\n\t        this.octaves = options.octaves;\n\t    };\n\t    Tone.extend(Tone.MetalSynth, Tone.Instrument);\n\t    /**\n\t\t *  default values\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.MetalSynth.defaults = {\n\t        'frequency': 200,\n\t        'envelope': {\n\t            'attack': 0.001,\n\t            'decay': 1.4,\n\t            'release': 0.2\n\t        },\n\t        'harmonicity': 5.1,\n\t        'modulationIndex': 32,\n\t        'resonance': 4000,\n\t        'octaves': 1.5\n\t    };\n\t    /**\n\t\t *  Trigger the attack.\n\t\t *  @param  {Time}  time      When the attack should be triggered.\n\t\t *  @param  {NormalRange}  [velocity=1]  The velocity that the envelope should be triggered at.\n\t\t *  @return  {Tone.MetalSynth}  this\n\t\t */\n\t    Tone.MetalSynth.prototype.triggerAttack = function (time, vel) {\n\t        time = this.toSeconds(time);\n\t        vel = Tone.defaultArg(vel, 1);\n\t        this.envelope.triggerAttack(time, vel);\n\t        this._oscillators.forEach(function (osc) {\n\t            osc.start(time);\n\t        });\n\t        //if the sustain is 0, stop the oscillator as well\n\t        if (this.envelope.sustain === 0) {\n\t            this._oscillators.forEach(function (osc) {\n\t                osc.stop(time + this.envelope.attack + this.envelope.decay);\n\t            }.bind(this));\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Trigger the release of the envelope.\n\t\t *  @param  {Time}  time      When the release should be triggered.\n\t\t *  @return  {Tone.MetalSynth}  this\n\t\t */\n\t    Tone.MetalSynth.prototype.triggerRelease = function (time) {\n\t        time = this.toSeconds(time);\n\t        this.envelope.triggerRelease(time);\n\t        this._oscillators.forEach(function (osc) {\n\t            osc.stop(time + this.envelope.release);\n\t        }.bind(this));\n\t        return this;\n\t    };\n\t    /**\n\t\t * Sync the instrument to the Transport. All subsequent calls of\n\t\t * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n\t\t * will be scheduled along the transport.\n\t\t * @example\n\t\t * synth.sync()\n\t\t * //schedule 3 notes when the transport first starts\n\t\t * synth.triggerAttackRelease('8n', 0)\n\t\t * synth.triggerAttackRelease('8n', '8n')\n\t\t * synth.triggerAttackRelease('8n', '4n')\n\t\t * //start the transport to hear the notes\n\t\t * Transport.start()\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t    Tone.MetalSynth.prototype.sync = function () {\n\t        this._syncMethod('triggerAttack', 0);\n\t        this._syncMethod('triggerRelease', 0);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Trigger the attack and release of the envelope after the given\n\t\t *  duration.\n\t\t *  @param  {Time}  duration  The duration before triggering the release\n\t\t *  @param  {Time}  time      When the attack should be triggered.\n\t\t *  @param  {NormalRange}  [velocity=1]  The velocity that the envelope should be triggered at.\n\t\t *  @return  {Tone.MetalSynth}  this\n\t\t */\n\t    Tone.MetalSynth.prototype.triggerAttackRelease = function (duration, time, velocity) {\n\t        time = this.toSeconds(time);\n\t        duration = this.toSeconds(duration);\n\t        this.triggerAttack(time, velocity);\n\t        this.triggerRelease(time + duration);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  The modulationIndex of the oscillators which make up the source.\n\t\t *  see Tone.FMOscillator.modulationIndex\n\t\t *  @memberOf Tone.MetalSynth#\n\t\t *  @type {Positive}\n\t\t *  @name  modulationIndex\n\t\t */\n\t    Object.defineProperty(Tone.MetalSynth.prototype, 'modulationIndex', {\n\t        get: function () {\n\t            return this._oscillators[0].modulationIndex.value;\n\t        },\n\t        set: function (val) {\n\t            for (var i = 0; i < this._oscillators.length; i++) {\n\t                this._oscillators[i].modulationIndex.value = val;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  The harmonicity of the oscillators which make up the source.\n\t\t *  see Tone.FMOscillator.harmonicity\n\t\t *  @memberOf Tone.MetalSynth#\n\t\t *  @type {Positive}\n\t\t *  @name  harmonicity\n\t\t */\n\t    Object.defineProperty(Tone.MetalSynth.prototype, 'harmonicity', {\n\t        get: function () {\n\t            return this._oscillators[0].harmonicity.value;\n\t        },\n\t        set: function (val) {\n\t            for (var i = 0; i < this._oscillators.length; i++) {\n\t                this._oscillators[i].harmonicity.value = val;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  The frequency of the highpass filter attached to the envelope\n\t\t *  @memberOf Tone.MetalSynth#\n\t\t *  @type {Frequency}\n\t\t *  @name  resonance\n\t\t */\n\t    Object.defineProperty(Tone.MetalSynth.prototype, 'resonance', {\n\t        get: function () {\n\t            return this._filterFreqScaler.min;\n\t        },\n\t        set: function (val) {\n\t            this._filterFreqScaler.min = val;\n\t            this.octaves = this._octaves;\n\t        }\n\t    });\n\t    /**\n\t\t *  The number of octaves above the \"resonance\" frequency\n\t\t *  that the filter ramps during the attack/decay envelope\n\t\t *  @memberOf Tone.MetalSynth#\n\t\t *  @type {Number}\n\t\t *  @name  octaves\n\t\t */\n\t    Object.defineProperty(Tone.MetalSynth.prototype, 'octaves', {\n\t        get: function () {\n\t            return this._octaves;\n\t        },\n\t        set: function (octs) {\n\t            this._octaves = octs;\n\t            this._filterFreqScaler.max = this._filterFreqScaler.min * Math.pow(2, octs);\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up\n\t\t *  @returns {Tone.MetalSynth} this\n\t\t */\n\t    Tone.MetalSynth.prototype.dispose = function () {\n\t        Tone.Instrument.prototype.dispose.call(this);\n\t        for (var i = 0; i < this._oscillators.length; i++) {\n\t            this._oscillators[i].dispose();\n\t            this._freqMultipliers[i].dispose();\n\t        }\n\t        this._oscillators = null;\n\t        this._freqMultipliers = null;\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        this._filterFreqScaler.dispose();\n\t        this._filterFreqScaler = null;\n\t        this._amplitue.dispose();\n\t        this._amplitue = null;\n\t        this.envelope.dispose();\n\t        this.envelope = null;\n\t        this._highpass.dispose();\n\t        this._highpass = null;\n\t    };\n\t    return Tone.MetalSynth;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.NoiseSynth is composed of a noise generator (Tone.Noise), one filter (Tone.Filter),\n\t\t *          and two envelopes (Tone.Envelop). One envelope controls the amplitude\n\t\t *          of the noise and the other is controls the cutoff frequency of the filter.\n\t\t *          <img src=\"https://docs.google.com/drawings/d/1rqzuX9rBlhT50MRvD2TKml9bnZhcZmzXF1rf_o7vdnE/pub?w=918&h=242\">\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Instrument}\n\t\t *  @param {Object} [options] the options available for the synth\n\t\t *                          see defaults below\n\t\t * @example\n\t\t * var noiseSynth = new Tone.NoiseSynth().toMaster();\n\t\t * noiseSynth.triggerAttackRelease(\"8n\");\n\t\t */\n\t    Tone.NoiseSynth = function (options) {\n\t        //get the defaults\n\t        options = Tone.defaultArg(options, Tone.NoiseSynth.defaults);\n\t        Tone.Instrument.call(this, options);\n\t        /**\n\t\t\t *  The noise source.\n\t\t\t *  @type {Tone.Noise}\n\t\t\t *  @example\n\t\t\t * noiseSynth.set(\"noise.type\", \"brown\");\n\t\t\t */\n\t        this.noise = new Tone.Noise();\n\t        /**\n\t\t\t *  The amplitude envelope.\n\t\t\t *  @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t        this.envelope = new Tone.AmplitudeEnvelope(options.envelope);\n\t        //connect the noise to the output\n\t        this.noise.chain(this.envelope, this.output);\n\t        this._readOnly([\n\t            'noise',\n\t            'envelope'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.NoiseSynth, Tone.Instrument);\n\t    /**\n\t\t *  @const\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.NoiseSynth.defaults = {\n\t        'noise': { 'type': 'white' },\n\t        'envelope': {\n\t            'attack': 0.005,\n\t            'decay': 0.1,\n\t            'sustain': 0\n\t        }\n\t    };\n\t    /**\n\t\t *  Start the attack portion of the envelopes. Unlike other\n\t\t *  instruments, Tone.NoiseSynth doesn't have a note.\n\t\t *  @param {Time} [time=now] the time the attack should start\n\t\t *  @param {number} [velocity=1] the velocity of the note (0-1)\n\t\t *  @returns {Tone.NoiseSynth} this\n\t\t *  @example\n\t\t * noiseSynth.triggerAttack();\n\t\t */\n\t    Tone.NoiseSynth.prototype.triggerAttack = function (time, velocity) {\n\t        //the envelopes\n\t        this.envelope.triggerAttack(time, velocity);\n\t        //start the noise\n\t        this.noise.start(time);\n\t        if (this.envelope.sustain === 0) {\n\t            this.noise.stop(time = this.envelope.attack + this.envelope.decay);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Start the release portion of the envelopes.\n\t\t *  @param {Time} [time=now] the time the release should start\n\t\t *  @returns {Tone.NoiseSynth} this\n\t\t */\n\t    Tone.NoiseSynth.prototype.triggerRelease = function (time) {\n\t        this.envelope.triggerRelease(time);\n\t        this.noise.stop(time + this.envelope.release);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Sync the instrument to the Transport. All subsequent calls of\n\t\t * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n\t\t * will be scheduled along the transport.\n\t\t * @example\n\t\t * synth.sync()\n\t\t * //schedule 3 notes when the transport first starts\n\t\t * synth.triggerAttackRelease('8n', 0)\n\t\t * synth.triggerAttackRelease('8n', '8n')\n\t\t * synth.triggerAttackRelease('8n', '4n')\n\t\t * //start the transport to hear the notes\n\t\t * Transport.start()\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t    Tone.NoiseSynth.prototype.sync = function () {\n\t        this._syncMethod('triggerAttack', 0);\n\t        this._syncMethod('triggerRelease', 0);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Trigger the attack and then the release.\n\t\t *  @param  {Time} duration the duration of the note\n\t\t *  @param  {Time} [time=now]     the time of the attack\n\t\t *  @param  {number} [velocity=1] the velocity\n\t\t *  @returns {Tone.NoiseSynth} this\n\t\t */\n\t    Tone.NoiseSynth.prototype.triggerAttackRelease = function (duration, time, velocity) {\n\t        time = this.toSeconds(time);\n\t        duration = this.toSeconds(duration);\n\t        this.triggerAttack(time, velocity);\n\t        this.triggerRelease(time + duration);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.NoiseSynth} this\n\t\t */\n\t    Tone.NoiseSynth.prototype.dispose = function () {\n\t        Tone.Instrument.prototype.dispose.call(this);\n\t        this._writable([\n\t            'noise',\n\t            'envelope'\n\t        ]);\n\t        this.noise.dispose();\n\t        this.noise = null;\n\t        this.envelope.dispose();\n\t        this.envelope = null;\n\t        return this;\n\t    };\n\t    return Tone.NoiseSynth;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Karplus-String string synthesis. Often out of tune.\n\t\t *         Will change when the AudioWorkerNode is available across\n\t\t *         browsers.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Instrument}\n\t\t *  @param {Object} [options] see the defaults\n\t\t *  @example\n\t\t * var plucky = new Tone.PluckSynth().toMaster();\n\t\t * plucky.triggerAttack(\"C4\");\n\t\t */\n\t    Tone.PluckSynth = function (options) {\n\t        options = Tone.defaultArg(options, Tone.PluckSynth.defaults);\n\t        Tone.Instrument.call(this, options);\n\t        /**\n\t\t\t *  @type {Tone.Noise}\n\t\t\t *  @private\n\t\t\t */\n\t        this._noise = new Tone.Noise('pink');\n\t        /**\n\t\t\t *  The amount of noise at the attack.\n\t\t\t *  Nominal range of [0.1, 20]\n\t\t\t *  @type {number}\n\t\t\t */\n\t        this.attackNoise = options.attackNoise;\n\t        /**\n\t\t\t *  the LFCF\n\t\t\t *  @type {Tone.LowpassCombFilter}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfcf = new Tone.LowpassCombFilter({\n\t            'resonance': options.resonance,\n\t            'dampening': options.dampening\n\t        });\n\t        /**\n\t\t\t *  The resonance control.\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.resonance = this._lfcf.resonance;\n\t        /**\n\t\t\t *  The dampening control. i.e. the lowpass filter frequency of the comb filter\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.dampening = this._lfcf.dampening;\n\t        //connections\n\t        this._noise.connect(this._lfcf);\n\t        this._lfcf.connect(this.output);\n\t        this._readOnly([\n\t            'resonance',\n\t            'dampening'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.PluckSynth, Tone.Instrument);\n\t    /**\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.PluckSynth.defaults = {\n\t        'attackNoise': 1,\n\t        'dampening': 4000,\n\t        'resonance': 0.7\n\t    };\n\t    /**\n\t\t *  Trigger the note.\n\t\t *  @param {Frequency} note The note to trigger.\n\t\t *  @param {Time} [time=now] When the note should be triggered.\n\t\t *  @returns {Tone.PluckSynth} this\n\t\t */\n\t    Tone.PluckSynth.prototype.triggerAttack = function (note, time) {\n\t        note = this.toFrequency(note);\n\t        time = this.toSeconds(time);\n\t        var delayAmount = 1 / note;\n\t        this._lfcf.delayTime.setValueAtTime(delayAmount, time);\n\t        this._noise.start(time);\n\t        this._noise.stop(time + delayAmount * this.attackNoise);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.PluckSynth} this\n\t\t */\n\t    Tone.PluckSynth.prototype.dispose = function () {\n\t        Tone.Instrument.prototype.dispose.call(this);\n\t        this._noise.dispose();\n\t        this._lfcf.dispose();\n\t        this._noise = null;\n\t        this._lfcf = null;\n\t        this._writable([\n\t            'resonance',\n\t            'dampening'\n\t        ]);\n\t        this.dampening = null;\n\t        this.resonance = null;\n\t        return this;\n\t    };\n\t    return Tone.PluckSynth;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.PolySynth handles voice creation and allocation for any\n\t\t *          instruments passed in as the second paramter. PolySynth is\n\t\t *          not a synthesizer by itself, it merely manages voices of\n\t\t *          one of the other types of synths, allowing any of the\n\t\t *          monophonic synthesizers to be polyphonic.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Instrument}\n\t\t *  @param {number|Object} [polyphony=4] The number of voices to create\n\t\t *  @param {function} [voice=Tone.Synth] The constructor of the voices\n\t\t *                                            uses Tone.Synth by default.\n\t\t *  @example\n\t\t * //a polysynth composed of 6 Voices of Synth\n\t\t * var synth = new Tone.PolySynth(6, Tone.Synth).toMaster();\n\t\t * //set the attributes using the set interface\n\t\t * synth.set(\"detune\", -1200);\n\t\t * //play a chord\n\t\t * synth.triggerAttackRelease([\"C4\", \"E4\", \"A4\"], \"4n\");\n\t\t */\n\t    Tone.PolySynth = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'polyphony',\n\t            'voice'\n\t        ], Tone.PolySynth);\n\t        Tone.Instrument.call(this, options);\n\t        options = Tone.defaultArg(options, Tone.Instrument.defaults);\n\t        //max polyphony\n\t        options.polyphony = Math.min(Tone.PolySynth.MAX_POLYPHONY, options.polyphony);\n\t        /**\n\t\t\t *  the array of voices\n\t\t\t *  @type {Array}\n\t\t\t */\n\t        this.voices = new Array(options.polyphony);\n\t        /**\n\t\t\t *  The queue of voices with data about last trigger\n\t\t\t *  and the triggered note\n\t\t\t *  @private\n\t\t\t *  @type {Array}\n\t\t\t */\n\t        this._triggers = new Array(options.polyphony);\n\t        /**\n\t\t\t *  The detune in cents\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t        this._readOnly('detune');\n\t        //create the voices\n\t        for (var i = 0; i < options.polyphony; i++) {\n\t            var v = new options.voice(arguments[2], arguments[3]);\n\t            if (!(v instanceof Tone.Monophonic)) {\n\t                throw new Error('Synth constructor must be instance of Tone.Monophonic');\n\t            }\n\t            this.voices[i] = v;\n\t            v.connect(this.output);\n\t            if (v.hasOwnProperty('detune')) {\n\t                this.detune.connect(v.detune);\n\t            }\n\t            this._triggers[i] = {\n\t                release: -1,\n\t                note: null,\n\t                voice: v\n\t            };\n\t        }\n\t    };\n\t    Tone.extend(Tone.PolySynth, Tone.Instrument);\n\t    /**\n\t\t *  the defaults\n\t\t *  @const\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.PolySynth.defaults = {\n\t        'polyphony': 4,\n\t        'volume': 0,\n\t        'detune': 0,\n\t        'voice': Tone.Synth\n\t    };\n\t    /**\n\t\t *  Trigger the attack portion of the note\n\t\t *  @param  {Frequency|Array} notes The notes to play. Accepts a single\n\t\t *                                  Frequency or an array of frequencies.\n\t\t *  @param  {Time} [time=now]  The start time of the note.\n\t\t *  @param {number} [velocity=1] The velocity of the note.\n\t\t *  @returns {Tone.PolySynth} this\n\t\t *  @example\n\t\t * //trigger a chord immediately with a velocity of 0.2\n\t\t * poly.triggerAttack([\"Ab3\", \"C4\", \"F5\"], undefined, 0.2);\n\t\t */\n\t    Tone.PolySynth.prototype.triggerAttack = function (notes, time, velocity) {\n\t        if (!Array.isArray(notes)) {\n\t            notes = [notes];\n\t        }\n\t        time = this.toSeconds(time);\n\t        for (var i = 0; i < notes.length; i++) {\n\t            var val = notes[i];\n\t            //trigger the oldest voice\n\t            var oldest = this._triggers[0];\n\t            for (var j = 1; j < this._triggers.length; j++) {\n\t                if (this._triggers[j].release < oldest.release) {\n\t                    oldest = this._triggers[j];\n\t                }\n\t            }\n\t            oldest.release = Infinity;\n\t            oldest.note = JSON.stringify(val);\n\t            oldest.voice.triggerAttack(val, time, velocity);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Trigger the attack and release after the specified duration\n\t\t *\n\t\t *  @param  {Frequency|Array} notes The notes to play. Accepts a single\n\t\t *                                  Frequency or an array of frequencies.\n\t\t *  @param  {Time} duration the duration of the note\n\t\t *  @param  {Time} [time=now]     if no time is given, defaults to now\n\t\t *  @param  {number} [velocity=1] the velocity of the attack (0-1)\n\t\t *  @returns {Tone.PolySynth} this\n\t\t *  @example\n\t\t * //trigger a chord for a duration of a half note\n\t\t * poly.triggerAttackRelease([\"Eb3\", \"G4\", \"C5\"], \"2n\");\n\t\t *  @example\n\t\t * //can pass in an array of durations as well\n\t\t * poly.triggerAttackRelease([\"Eb3\", \"G4\", \"C5\"], [\"2n\", \"4n\", \"4n\"]);\n\t\t */\n\t    Tone.PolySynth.prototype.triggerAttackRelease = function (notes, duration, time, velocity) {\n\t        time = this.toSeconds(time);\n\t        this.triggerAttack(notes, time, velocity);\n\t        if (Tone.isArray(duration) && Tone.isArray(notes)) {\n\t            for (var i = 0; i < notes.length; i++) {\n\t                var d = duration[Math.min(i, duration.length - 1)];\n\t                this.triggerRelease(notes[i], time + this.toSeconds(d));\n\t            }\n\t        } else {\n\t            this.triggerRelease(notes, time + this.toSeconds(duration));\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Trigger the release of the note. Unlike monophonic instruments,\n\t\t *  a note (or array of notes) needs to be passed in as the first argument.\n\t\t *  @param  {Frequency|Array} notes The notes to play. Accepts a single\n\t\t *                                  Frequency or an array of frequencies.\n\t\t *  @param  {Time} [time=now]  When the release will be triggered.\n\t\t *  @returns {Tone.PolySynth} this\n\t\t *  @example\n\t\t * poly.triggerRelease([\"Ab3\", \"C4\", \"F5\"], \"+2n\");\n\t\t */\n\t    Tone.PolySynth.prototype.triggerRelease = function (notes, time) {\n\t        if (!Array.isArray(notes)) {\n\t            notes = [notes];\n\t        }\n\t        time = this.toSeconds(time);\n\t        for (var i = 0; i < notes.length; i++) {\n\t            //get the voice\n\t            var stringified = JSON.stringify(notes[i]);\n\t            for (var v = 0; v < this._triggers.length; v++) {\n\t                var desc = this._triggers[v];\n\t                if (desc.note === stringified && desc.release > time) {\n\t                    desc.voice.triggerRelease(time);\n\t                    desc.release = time;\n\t                }\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * Sync the instrument to the Transport. All subsequent calls of\n\t\t * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n\t\t * will be scheduled along the transport.\n\t\t * @example\n\t\t * synth.sync()\n\t\t * //schedule 3 notes when the transport first starts\n\t\t * synth.triggerAttackRelease('8n', 0)\n\t\t * synth.triggerAttackRelease('8n', '8n')\n\t\t * synth.triggerAttackRelease('8n', '4n')\n\t\t * //start the transport to hear the notes\n\t\t * Transport.start()\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t    Tone.PolySynth.prototype.sync = function () {\n\t        this._syncMethod('triggerAttack', 1);\n\t        this._syncMethod('triggerRelease', 1);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Set a member/attribute of the voices.\n\t\t *  @param {Object|string} params\n\t\t *  @param {number=} value\n\t\t *  @param {Time=} rampTime\n\t\t *  @returns {Tone.PolySynth} this\n\t\t *  @example\n\t\t * poly.set({\n\t\t * \t\"filter\" : {\n\t\t * \t\t\"type\" : \"highpass\"\n\t\t * \t},\n\t\t * \t\"envelope\" : {\n\t\t * \t\t\"attack\" : 0.25\n\t\t * \t}\n\t\t * });\n\t\t */\n\t    Tone.PolySynth.prototype.set = function (params, value, rampTime) {\n\t        for (var i = 0; i < this.voices.length; i++) {\n\t            this.voices[i].set(params, value, rampTime);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Get the synth's attributes. Given no arguments get\n\t\t *  will return all available object properties and their corresponding\n\t\t *  values. Pass in a single attribute to retrieve or an array\n\t\t *  of attributes. The attribute strings can also include a \".\"\n\t\t *  to access deeper properties.\n\t\t *  @param {Array=} params the parameters to get, otherwise will return\n\t\t *  \t\t\t\t\t   all available.\n\t\t */\n\t    Tone.PolySynth.prototype.get = function (params) {\n\t        return this.voices[0].get(params);\n\t    };\n\t    /**\n\t\t *  Trigger the release portion of all the currently active voices.\n\t\t *  @param {Time} [time=now] When the notes should be released.\n\t\t *  @return {Tone.PolySynth} this\n\t\t */\n\t    Tone.PolySynth.prototype.releaseAll = function (time) {\n\t        time = this.toSeconds(time);\n\t        for (var i = 0; i < this._triggers.length; i++) {\n\t            var desc = this._triggers[i];\n\t            if (desc.release > time) {\n\t                desc.release = time;\n\t                desc.voice.triggerRelease(time);\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.PolySynth} this\n\t\t */\n\t    Tone.PolySynth.prototype.dispose = function () {\n\t        Tone.Instrument.prototype.dispose.call(this);\n\t        for (var i = 0; i < this.voices.length; i++) {\n\t            this.voices[i].dispose();\n\t            this.voices[i] = null;\n\t        }\n\t        this._writable('detune');\n\t        this.detune.dispose();\n\t        this.detune = null;\n\t        this.voices = null;\n\t        this._triggers = null;\n\t        return this;\n\t    };\n\t    /**\n\t\t *  The maximum number of notes that can be allocated\n\t\t *  to a polysynth.\n\t\t *  @type  {Number}\n\t\t *  @static\n\t\t */\n\t    Tone.PolySynth.MAX_POLYPHONY = 20;\n\t    return Tone.PolySynth;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t * @class Automatically interpolates between a set of pitched samples. Pass in an object which maps the note's pitch or midi value to the url, then you can trigger the attack and release of that note like other instruments. By automatically repitching the samples, it is possible to play pitches which were not explicitly included which can save loading time.\n\t\t *        For sample or buffer playback where repitching is not necessary, use [Tone.Player](https://tonejs.github.io/docs/Player).\n\t\t * @param {Object} samples An object of samples mapping either Midi\n\t\t *                         Note Numbers or Scientific Pitch Notation\n\t\t *                         to the url of that sample.\n\t\t * @param {Function=} onload The callback to invoke when all of the samples are loaded.\n\t\t * @param {String=} baseUrl The root URL of all of the samples, which is prepended to all the URLs.\n\t\t * @example\n\t\t * var sampler = new Tone.Sampler({\n\t\t * \t\"C3\" : \"path/to/C3.mp3\",\n\t\t * \t\"D#3\" : \"path/to/Dsharp3.mp3\",\n\t\t * \t\"F#3\" : \"path/to/Fsharp3.mp3\",\n\t\t * \t\"A3\" : \"path/to/A3.mp3\",\n\t\t * }, function(){\n\t\t * \t//sampler will repitch the closest sample\n\t\t * \tsampler.triggerAttack(\"D3\")\n\t\t * })\n\t\t * @extends {Tone.Instrument}\n\t\t */\n\t    Tone.Sampler = function (urls) {\n\t        // shift arguments over one. Those are the remainder of the options\n\t        var args = Array.prototype.slice.call(arguments);\n\t        args.shift();\n\t        var options = Tone.defaults(args, [\n\t            'onload',\n\t            'baseUrl'\n\t        ], Tone.Sampler);\n\t        Tone.Instrument.call(this, options);\n\t        var urlMap = {};\n\t        for (var note in urls) {\n\t            if (Tone.isNote(note)) {\n\t                //convert the note name to MIDI\n\t                var mid = Tone.Frequency(note).toMidi();\n\t                urlMap[mid] = urls[note];\n\t            } else if (!isNaN(parseFloat(note))) {\n\t                //otherwise if it's numbers assume it's midi\n\t                urlMap[note] = urls[note];\n\t            } else {\n\t                throw new Error('Tone.Sampler: url keys must be the note\\'s pitch');\n\t            }\n\t        }\n\t        /**\n\t\t\t * The stored and loaded buffers\n\t\t\t * @type {Tone.Buffers}\n\t\t\t * @private\n\t\t\t */\n\t        this._buffers = new Tone.Buffers(urlMap, options.onload, options.baseUrl);\n\t        /**\n\t\t\t * The object of all currently playing BufferSources\n\t\t\t * @type {Object}\n\t\t\t * @private\n\t\t\t */\n\t        this._activeSources = {};\n\t        /**\n\t\t\t * The envelope applied to the beginning of the sample.\n\t\t\t * @type {Time}\n\t\t\t */\n\t        this.attack = options.attack;\n\t        /**\n\t\t\t * The envelope applied to the end of the envelope.\n\t\t\t * @type {Time}\n\t\t\t */\n\t        this.release = options.release;\n\t    };\n\t    Tone.extend(Tone.Sampler, Tone.Instrument);\n\t    /**\n\t\t * The defaults\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t    Tone.Sampler.defaults = {\n\t        attack: 0,\n\t        release: 0.1,\n\t        onload: Tone.noOp,\n\t        baseUrl: ''\n\t    };\n\t    /**\n\t\t * Returns the difference in steps between the given midi note at the closets sample.\n\t\t * @param  {Midi} midi\n\t\t * @return {Interval}\n\t\t * @private\n\t\t */\n\t    Tone.Sampler.prototype._findClosest = function (midi) {\n\t        //searches within 8 octaves of the given midi note\n\t        var MAX_INTERVAL = 96;\n\t        var interval = 0;\n\t        while (interval < MAX_INTERVAL) {\n\t            // check above and below\n\t            if (this._buffers.has(midi + interval)) {\n\t                return -interval;\n\t            } else if (this._buffers.has(midi - interval)) {\n\t                return interval;\n\t            }\n\t            interval++;\n\t        }\n\t        return null;\n\t    };\n\t    /**\n\t\t * @param  {Frequency} note     The note to play\n\t\t * @param  {Time=} time     When to play the note\n\t\t * @param  {NormalRange=} velocity The velocity to play the sample back.\n\t\t * @return {Tone.Sampler}          this\n\t\t */\n\t    Tone.Sampler.prototype.triggerAttack = function (note, time, velocity) {\n\t        var midi = Tone.Frequency(note).toMidi();\n\t        // find the closest note pitch\n\t        var difference = this._findClosest(midi);\n\t        if (difference !== null) {\n\t            var closestNote = midi - difference;\n\t            var buffer = this._buffers.get(closestNote);\n\t            // play that note\n\t            var source = new Tone.BufferSource({\n\t                'buffer': buffer,\n\t                'playbackRate': Tone.intervalToFrequencyRatio(difference),\n\t                'fadeIn': this.attack,\n\t                'fadeOut': this.release,\n\t                'curve': 'exponential'\n\t            }).connect(this.output);\n\t            source.start(time, 0, buffer.duration, velocity);\n\t            // add it to the active sources\n\t            if (!Tone.isArray(this._activeSources[midi])) {\n\t                this._activeSources[midi] = [];\n\t            }\n\t            this._activeSources[midi].push({\n\t                note: midi,\n\t                source: source\n\t            });\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * @param  {Frequency} note     The note to release.\n\t\t * @param  {Time=} time     \tWhen to release the note.\n\t\t * @return {Tone.Sampler}\tthis\n\t\t */\n\t    Tone.Sampler.prototype.triggerRelease = function (note, time) {\n\t        var midi = Tone.Frequency(note).toMidi();\n\t        // find the note\n\t        if (this._activeSources[midi] && this._activeSources[midi].length) {\n\t            var source = this._activeSources[midi].shift().source;\n\t            time = this.toSeconds(time);\n\t            source.stop(time + this.release, this.release);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * Release all currently active notes.\n\t\t * @param  {Time=} time     \tWhen to release the notes.\n\t\t * @return {Tone.Sampler}\tthis\n\t\t */\n\t    Tone.Sampler.prototype.releaseAll = function (time) {\n\t        time = this.toSeconds(time);\n\t        for (var note in this._activeSources) {\n\t            var sources = this._activeSources[note];\n\t            while (sources.length) {\n\t                var source = sources.shift().source;\n\t                source.stop(time + this.release, this.release);\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * Sync the instrument to the Transport. All subsequent calls of\n\t\t * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n\t\t * will be scheduled along the transport.\n\t\t * @example\n\t\t * synth.sync()\n\t\t * //schedule 3 notes when the transport first starts\n\t\t * synth.triggerAttackRelease('8n', 0)\n\t\t * synth.triggerAttackRelease('8n', '8n')\n\t\t * synth.triggerAttackRelease('8n', '4n')\n\t\t * //start the transport to hear the notes\n\t\t * Transport.start()\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t    Tone.Sampler.prototype.sync = function () {\n\t        this._syncMethod('triggerAttack', 1);\n\t        this._syncMethod('triggerRelease', 1);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Invoke the attack phase, then after the duration, invoke the release.\n\t\t * @param  {Frequency} note     The note to play\n\t\t * @param  {Time} duration The time the note should be held\n\t\t * @param  {Time=} time     When to start the attack\n\t\t * @param  {NormalRange} [velocity=1] The velocity of the attack\n\t\t * @return {Tone.Sampler}          this\n\t\t */\n\t    Tone.Sampler.prototype.triggerAttackRelease = function (note, duration, time, velocity) {\n\t        time = this.toSeconds(time);\n\t        duration = this.toSeconds(duration);\n\t        this.triggerAttack(note, time, velocity);\n\t        this.triggerRelease(note, time + duration);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Add a note to the sampler.\n\t\t *  @param  {Note|Midi}   note      The buffer's pitch.\n\t\t *  @param  {String|Tone.Buffer|Audiobuffer}  url  Either the url of the bufer,\n\t\t *                                                 or a buffer which will be added\n\t\t *                                                 with the given name.\n\t\t *  @param  {Function=}  callback  The callback to invoke\n\t\t *                                 when the url is loaded.\n\t\t */\n\t    Tone.Sampler.prototype.add = function (note, url, callback) {\n\t        if (Tone.isNote(note)) {\n\t            //convert the note name to MIDI\n\t            var mid = Tone.Frequency(note).toMidi();\n\t            this._buffers.add(mid, url, callback);\n\t        } else if (!isNaN(parseFloat(note))) {\n\t            //otherwise if it's numbers assume it's midi\n\t            this._buffers.add(note, url, callback);\n\t        } else {\n\t            throw new Error('Tone.Sampler: note must be the note\\'s pitch. Instead got ' + note);\n\t        }\n\t    };\n\t    /**\n\t\t * If the buffers are loaded or not\n\t\t * @memberOf Tone.Sampler#\n\t\t * @type {Boolean}\n\t\t * @name loaded\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Sampler.prototype, 'loaded', {\n\t        get: function () {\n\t            return this._buffers.loaded;\n\t        }\n\t    });\n\t    /**\n\t\t * Clean up\n\t\t * @return {Tone.Sampler} this\n\t\t */\n\t    Tone.Sampler.prototype.dispose = function () {\n\t        Tone.Instrument.prototype.dispose.call(this);\n\t        this._buffers.dispose();\n\t        this._buffers = null;\n\t        for (var midi in this._activeSources) {\n\t            this._activeSources[midi].forEach(function (event) {\n\t                event.source.dispose();\n\t            });\n\t        }\n\t        this._activeSources = null;\n\t        return this;\n\t    };\n\t    return Tone.Sampler;\n\t});\n\tModule(function (Tone) {\n\t    if (Tone.supported) {\n\t        if (!OscillatorNode.prototype.setPeriodicWave) {\n\t            OscillatorNode.prototype.setPeriodicWave = OscillatorNode.prototype.setWaveTable;\n\t        }\n\t        if (!AudioContext.prototype.createPeriodicWave) {\n\t            AudioContext.prototype.createPeriodicWave = AudioContext.prototype.createWaveTable;\n\t        }\n\t    }\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Maps a NormalRange [0, 1] to an AudioRange [-1, 1]. \n\t\t *         See also Tone.AudioToGain. \n\t\t *\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @constructor\n\t\t *  @example\n\t\t * var g2a = new Tone.GainToAudio();\n\t\t */\n\t    Tone.GainToAudio = function () {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  @type {WaveShaperNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._norm = this.input = this.output = new Tone.WaveShaper(function (x) {\n\t            return Math.abs(x) * 2 - 1;\n\t        });\n\t    };\n\t    Tone.extend(Tone.GainToAudio, Tone.SignalBase);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.GainToAudio} this\n\t\t */\n\t    Tone.GainToAudio.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._norm.dispose();\n\t        this._norm = null;\n\t        return this;\n\t    };\n\t    return Tone.GainToAudio;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Normalize takes an input min and max and maps it linearly to NormalRange [0,1]\n\t\t *\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @constructor\n\t\t *  @param {number} inputMin the min input value\n\t\t *  @param {number} inputMax the max input value\n\t\t *  @example\n\t\t * var norm = new Tone.Normalize(2, 4);\n\t\t * var sig = new Tone.Signal(3).connect(norm);\n\t\t * //output of norm is 0.5. \n\t\t */\n\t    Tone.Normalize = function (inputMin, inputMax) {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  the min input value\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._inputMin = Tone.defaultArg(inputMin, 0);\n\t        /**\n\t\t\t *  the max input value\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._inputMax = Tone.defaultArg(inputMax, 1);\n\t        /**\n\t\t\t *  subtract the min from the input\n\t\t\t *  @type {Tone.Add}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sub = this.input = new Tone.Add(0);\n\t        /**\n\t\t\t *  divide by the difference between the input and output\n\t\t\t *  @type {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._div = this.output = new Tone.Multiply(1);\n\t        this._sub.connect(this._div);\n\t        this._setRange();\n\t    };\n\t    Tone.extend(Tone.Normalize, Tone.SignalBase);\n\t    /**\n\t\t * The minimum value the input signal will reach.\n\t\t * @memberOf Tone.Normalize#\n\t\t * @type {number}\n\t\t * @name min\n\t\t */\n\t    Object.defineProperty(Tone.Normalize.prototype, 'min', {\n\t        get: function () {\n\t            return this._inputMin;\n\t        },\n\t        set: function (min) {\n\t            this._inputMin = min;\n\t            this._setRange();\n\t        }\n\t    });\n\t    /**\n\t\t * The maximum value the input signal will reach.\n\t\t * @memberOf Tone.Normalize#\n\t\t * @type {number}\n\t\t * @name max\n\t\t */\n\t    Object.defineProperty(Tone.Normalize.prototype, 'max', {\n\t        get: function () {\n\t            return this._inputMax;\n\t        },\n\t        set: function (max) {\n\t            this._inputMax = max;\n\t            this._setRange();\n\t        }\n\t    });\n\t    /**\n\t\t *  set the values\n\t\t *  @private\n\t\t */\n\t    Tone.Normalize.prototype._setRange = function () {\n\t        this._sub.value = -this._inputMin;\n\t        this._div.value = 1 / (this._inputMax - this._inputMin);\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Normalize} this\n\t\t */\n\t    Tone.Normalize.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._sub.dispose();\n\t        this._sub = null;\n\t        this._div.dispose();\n\t        this._div = null;\n\t        return this;\n\t    };\n\t    return Tone.Normalize;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t * @class Tone.TransportTimelineSignal extends Tone.Signal, but adds the ability to synchronize the signal to the signal to the Tone.Transport\n\t\t * @extends {Tone.Signal}\n\t\t */\n\t    Tone.TransportTimelineSignal = function () {\n\t        Tone.Signal.apply(this, arguments);\n\t        /**\n\t\t\t * The real signal output\n\t\t\t * @type {Tone.Signal}\n\t\t\t * @private\n\t\t\t */\n\t        this.output = this._outputSig = new Tone.Signal(this._initialValue);\n\t        /**\n\t\t\t * Keep track of the last value. (small optimization)\n\t\t\t * @private\n\t\t\t * @type {Number}\n\t\t\t */\n\t        this._lastVal = this.value;\n\t        /**\n\t\t\t * The event id of the tick update loop\n\t\t\t * @private\n\t\t\t * @type {Number}\n\t\t\t */\n\t        this._synced = Tone.Transport.scheduleRepeat(this._onTick.bind(this), '1i');\n\t        /**\n\t\t\t * A bound version of the anchor value methods\n\t\t\t * @type {Function}\n\t\t\t * @private\n\t\t\t */\n\t        this._bindAnchorValue = this._anchorValue.bind(this);\n\t        Tone.Transport.on('start stop pause', this._bindAnchorValue);\n\t        this._events.memory = Infinity;\n\t    };\n\t    Tone.extend(Tone.TransportTimelineSignal, Tone.Signal);\n\t    /**\n\t\t * Callback which is invoked every tick.\n\t\t * @private\n\t\t * @param  {Number} time\n\t\t * @return {Tone.TransportTimelineSignal}      this\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype._onTick = function (time) {\n\t        var val = this.getValueAtTime(Tone.Transport.seconds);\n\t        if (this._lastVal !== val) {\n\t            this._lastVal = val;\n\t            //approximate ramp curves with linear ramps\n\t            this._outputSig.linearRampToValueAtTime(val, time);\n\t        }\n\t    };\n\t    /**\n\t\t * Anchor the value at the start and stop of the Transport\n\t\t * @param  {Number} time The time of the event\n\t\t * @return {Tone.TransportTimelineSignal}      this\n\t\t * @private\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype._anchorValue = function (time) {\n\t        var val = this.getValueAtTime(Tone.Transport.seconds);\n\t        this._lastVal = val;\n\t        this._outputSig.cancelScheduledValues(time);\n\t        this._outputSig.setValueAtTime(val, time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Get the scheduled value at the given time. This will\n\t\t *  return the unconverted (raw) value.\n\t\t *  @param  {TransportTime}  time  The time in seconds.\n\t\t *  @return  {Number}  The scheduled value at the given time.\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype.getValueAtTime = function (time) {\n\t        time = Tone.TransportTime(time);\n\t        return Tone.Signal.prototype.getValueAtTime.call(this, time);\n\t    };\n\t    /**\n\t\t * Set the output of the signal at the given time\n\t\t * @param  {Number} value The value to change to at the given time\n\t\t * @param  {TransportTime} time  The time to change the signal\n\t\t * @return {Tone.TransportTimelineSignal}       this\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype.setValueAtTime = function (value, time) {\n\t        time = Tone.TransportTime(time);\n\t        Tone.Signal.prototype.setValueAtTime.call(this, value, time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Linear ramp to the given value from the previous scheduled point to the given value\n\t\t * @param  {Number} value The value to change to at the given time\n\t\t * @param  {TransportTime} time  The time to change the signal\n\t\t * @return {Tone.TransportTimelineSignal}       this\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype.linearRampToValueAtTime = function (value, time) {\n\t        time = Tone.TransportTime(time);\n\t        Tone.Signal.prototype.linearRampToValueAtTime.call(this, value, time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Exponential ramp to the given value from the previous scheduled point to the given value\n\t\t * @param  {Number} value The value to change to at the given time\n\t\t * @param  {TransportTime} time  The time to change the signal\n\t\t * @return {Tone.TransportTimelineSignal}       this\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype.exponentialRampToValueAtTime = function (value, time) {\n\t        time = Tone.TransportTime(time);\n\t        Tone.Signal.prototype.exponentialRampToValueAtTime.call(this, value, time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Start exponentially approaching the target value at the given time with\n\t\t *  a rate having the given time constant.\n\t\t *  @param {number} value\n\t\t *  @param {TransportTime} startTime\n\t\t *  @param {number} timeConstant\n\t\t * @return {Tone.TransportTimelineSignal}       this\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype.setTargetAtTime = function (value, startTime, timeConstant) {\n\t        startTime = Tone.TransportTime(startTime);\n\t        Tone.Signal.prototype.setTargetAtTime.call(this, value, startTime, timeConstant);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancels all scheduled parameter changes with times greater than or\n\t\t *  equal to startTime.\n\t\t *  @param  {TransportTime} startTime\n\t\t *  @returns {Tone.Param} this\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype.cancelScheduledValues = function (startTime) {\n\t        startTime = Tone.TransportTime(startTime);\n\t        Tone.Signal.prototype.cancelScheduledValues.call(this, startTime);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Set an array of arbitrary values starting at the given time for the given duration.\n\t\t *  @param {Float32Array} values\n\t\t *  @param {Time} startTime\n\t\t *  @param {Time} duration\n\t\t *  @param {NormalRange} [scaling=1] If the values in the curve should be scaled by some value\n\t\t *  @returns {Tone.Signal} this\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype.setValueCurveAtTime = function (values, startTime, duration, scaling) {\n\t        startTime = Tone.TransportTime(startTime);\n\t        duration = Tone.TransportTime(duration);\n\t        Tone.Signal.prototype.setValueCurveAtTime.call(this, values, startTime, duration, scaling);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  This is similar to [cancelScheduledValues](#cancelScheduledValues) except\n\t\t *  it holds the automated value at time until the next automated event.\n\t\t *  @param  {Time} time\n\t\t *  @returns {Tone.TransportTimelineSignal} this\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype.cancelAndHoldAtTime = function (time) {\n\t        return Tone.Signal.prototype.cancelAndHoldAtTime.call(this, Tone.TransportTime(time));\n\t    };\n\t    /**\n\t\t * Dispose and disconnect\n\t\t * @return {Tone.TransportTimelineSignal} this\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype.dispose = function () {\n\t        Tone.Transport.clear(this._synced);\n\t        Tone.Transport.off('start stop pause', this._syncedCallback);\n\t        this._events.cancel(0);\n\t        Tone.Signal.prototype.dispose.call(this);\n\t        this._outputSig.dispose();\n\t        this._outputSig = null;\n\t    };\n\t    return Tone.TransportTimelineSignal;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t * @class Tone.GrainPlayer implements [granular synthesis](https://en.wikipedia.org/wiki/Granular_synthesis).\n\t\t *        Granular Synthesis enables you to adjust pitch and playback rate independently. The grainSize is the\n\t\t *        amount of time each small chunk of audio is played for and the overlap is the\n\t\t *        amount of crossfading transition time between successive grains.\n\t\t * @extends {Tone.Source}\n\t\t * @param {String|Tone.Buffer} url\tThe url to load, or the Tone.Buffer to play.\n\t\t * @param {Function=} callback The callback to invoke after the url is loaded.\n\t\t */\n\t    Tone.GrainPlayer = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'url',\n\t            'onload'\n\t        ], Tone.GrainPlayer);\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  The audio buffer belonging to the player.\n\t\t\t *  @type  {Tone.Buffer}\n\t\t\t */\n\t        this.buffer = new Tone.Buffer(options.url, options.onload);\n\t        /**\n\t\t\t *  Create a repeating tick to schedule\n\t\t\t *  the grains.\n\t\t\t *  @type  {Tone.Clock}\n\t\t\t *  @private\n\t\t\t */\n\t        this._clock = new Tone.Clock(this._tick.bind(this), options.grainSize);\n\t        /**\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._loopStart = 0;\n\t        /**\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._loopEnd = 0;\n\t        /**\n\t\t\t * All of the currently playing BufferSources\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t        this._activeSources = [];\n\t        /**\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._playbackRate = options.playbackRate;\n\t        /**\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._grainSize = options.grainSize;\n\t        /**\n\t\t\t *  @private\n\t\t\t *  @type {Number}\n\t\t\t */\n\t        this._overlap = options.overlap;\n\t        /**\n\t\t\t *  Adjust the pitch independently of the playbackRate.\n\t\t\t *  @type  {Cents}\n\t\t\t */\n\t        this.detune = options.detune;\n\t        //setup\n\t        this.overlap = options.overlap;\n\t        this.loop = options.loop;\n\t        this.playbackRate = options.playbackRate;\n\t        this.grainSize = options.grainSize;\n\t        this.loopStart = options.loopStart;\n\t        this.loopEnd = options.loopEnd;\n\t        this.reverse = options.reverse;\n\t        this._clock.on('stop', this._onstop.bind(this));\n\t    };\n\t    Tone.extend(Tone.GrainPlayer, Tone.Source);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.GrainPlayer.defaults = {\n\t        'onload': Tone.noOp,\n\t        'overlap': 0.1,\n\t        'grainSize': 0.2,\n\t        'playbackRate': 1,\n\t        'detune': 0,\n\t        'loop': false,\n\t        'loopStart': 0,\n\t        'loopEnd': 0,\n\t        'reverse': false\n\t    };\n\t    /**\n\t\t *  Play the buffer at the given startTime. Optionally add an offset\n\t\t *  and/or duration which will play the buffer from a position\n\t\t *  within the buffer for the given duration.\n\t\t *\n\t\t *  @param  {Time} [startTime=now] When the player should start.\n\t\t *  @param  {Time} [offset=0] The offset from the beginning of the sample\n\t\t *                                 to start at.\n\t\t *  @param  {Time=} duration How long the sample should play. If no duration\n\t\t *                                is given, it will default to the full length\n\t\t *                                of the sample (minus any offset)\n\t\t *  @returns {Tone.GrainPlayer} this\n\t\t *  @memberOf Tone.GrainPlayer#\n\t\t *  @method start\n\t\t *  @name start\n\t\t */\n\t    /**\n\t\t *  Internal start method\n\t\t *  @param {Time} time\n\t\t *  @param {Time} offset\n\t\t *  @private\n\t\t */\n\t    Tone.GrainPlayer.prototype._start = function (time, offset, duration) {\n\t        offset = Tone.defaultArg(offset, 0);\n\t        offset = this.toSeconds(offset);\n\t        time = this.toSeconds(time);\n\t        this._offset = offset;\n\t        this._clock.start(time);\n\t        if (duration) {\n\t            this.stop(time + this.toSeconds(duration));\n\t        }\n\t    };\n\t    /**\n\t\t *  Internal start method\n\t\t *  @param {Time} time\n\t\t *  @private\n\t\t */\n\t    Tone.GrainPlayer.prototype._stop = function (time) {\n\t        this._clock.stop(time);\n\t    };\n\t    /**\n\t\t * Invoked when the clock is stopped\n\t\t * @param  {Number} time\n\t\t * @private\n\t\t */\n\t    Tone.GrainPlayer.prototype._onstop = function (time) {\n\t        //stop the players\n\t        this._activeSources.forEach(function (source) {\n\t            source.stop(time, 0);\n\t        });\n\t    };\n\t    /**\n\t\t *  Invoked on each clock tick. scheduled a new\n\t\t *  grain at this time.\n\t\t *  @param  {Time}  time\n\t\t *  @private\n\t\t */\n\t    Tone.GrainPlayer.prototype._tick = function (time) {\n\t        var fadeIn = this._offset < this._overlap ? 0 : this._overlap;\n\t        var source = new Tone.BufferSource({\n\t            'buffer': this.buffer,\n\t            'fadeIn': fadeIn,\n\t            'fadeOut': this._overlap,\n\t            'loop': this.loop,\n\t            'loopStart': this._loopStart,\n\t            'loopEnd': this._loopEnd,\n\t            'playbackRate': Tone.intervalToFrequencyRatio(this.detune / 100)\n\t        }).connect(this.output);\n\t        source.start(time, this._offset);\n\t        this._offset += this.grainSize;\n\t        source.stop(time + this.grainSize);\n\t        //add it to the active sources\n\t        this._activeSources.push(source);\n\t        //remove it when it's done\n\t        source.onended = function () {\n\t            var index = this._activeSources.indexOf(source);\n\t            if (index !== -1) {\n\t                this._activeSources.splice(index, 1);\n\t            }\n\t        }.bind(this);\n\t    };\n\t    /**\n\t\t *  Jump to a specific time and play it.\n\t\t *  @param  {Time}  offset  The offset to jump to.\n\t\t *  @param {Time=} time When to make the jump.\n\t\t *  @return  {Tone.GrainPlayer}  this\n\t\t */\n\t    Tone.GrainPlayer.prototype.seek = function (offset, time) {\n\t        this._offset = this.toSeconds(offset);\n\t        this._tick(this.toSeconds(time));\n\t        return this;\n\t    };\n\t    /**\n\t\t * The playback rate of the sample\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {Positive}\n\t\t * @name playbackRate\n\t\t */\n\t    Object.defineProperty(Tone.GrainPlayer.prototype, 'playbackRate', {\n\t        get: function () {\n\t            return this._playbackRate;\n\t        },\n\t        set: function (rate) {\n\t            this._playbackRate = rate;\n\t            this.grainSize = this._grainSize;\n\t        }\n\t    });\n\t    /**\n\t\t * The loop start time.\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {Time}\n\t\t * @name loopStart\n\t\t */\n\t    Object.defineProperty(Tone.GrainPlayer.prototype, 'loopStart', {\n\t        get: function () {\n\t            return this._loopStart;\n\t        },\n\t        set: function (time) {\n\t            this._loopStart = this.toSeconds(time);\n\t        }\n\t    });\n\t    /**\n\t\t * The loop end time.\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {Time}\n\t\t * @name loopEnd\n\t\t */\n\t    Object.defineProperty(Tone.GrainPlayer.prototype, 'loopEnd', {\n\t        get: function () {\n\t            return this._loopEnd;\n\t        },\n\t        set: function (time) {\n\t            this._loopEnd = this.toSeconds(time);\n\t        }\n\t    });\n\t    /**\n\t\t * The direction the buffer should play in\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {boolean}\n\t\t * @name reverse\n\t\t */\n\t    Object.defineProperty(Tone.GrainPlayer.prototype, 'reverse', {\n\t        get: function () {\n\t            return this.buffer.reverse;\n\t        },\n\t        set: function (rev) {\n\t            this.buffer.reverse = rev;\n\t        }\n\t    });\n\t    /**\n\t\t * The size of each chunk of audio that the\n\t\t * buffer is chopped into and played back at.\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {Time}\n\t\t * @name grainSize\n\t\t */\n\t    Object.defineProperty(Tone.GrainPlayer.prototype, 'grainSize', {\n\t        get: function () {\n\t            return this._grainSize;\n\t        },\n\t        set: function (size) {\n\t            this._grainSize = this.toSeconds(size);\n\t            this._clock.frequency.value = this._playbackRate / this._grainSize;\n\t        }\n\t    });\n\t    /**\n\t\t * This is the duration of the cross-fade between\n\t\t * sucessive grains.\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {Time}\n\t\t * @name overlap\n\t\t */\n\t    Object.defineProperty(Tone.GrainPlayer.prototype, 'overlap', {\n\t        get: function () {\n\t            return this._overlap;\n\t        },\n\t        set: function (time) {\n\t            this._overlap = this.toSeconds(time);\n\t        }\n\t    });\n\t    /**\n\t\t * Clean up\n\t\t * @return {Tone.GrainPlayer} this\n\t\t */\n\t    Tone.GrainPlayer.prototype.dispose = function () {\n\t        Tone.Source.prototype.dispose.call(this);\n\t        this.buffer.dispose();\n\t        this.buffer = null;\n\t        this._clock.dispose();\n\t        this._clock = null;\n\t        this._activeSources.forEach(function (source) {\n\t            source.dispose();\n\t        });\n\t        this._activeSources = null;\n\t        return this;\n\t    };\n\t    return Tone.GrainPlayer;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Player is an audio file player with start, loop, and stop functions.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Source}\n\t\t *  @param {string|AudioBuffer} url Either the AudioBuffer or the url from\n\t\t *                                  which to load the AudioBuffer\n\t\t *  @param {Function=} onload The function to invoke when the buffer is loaded.\n\t\t *                            Recommended to use Tone.Buffer.on('load') instead.\n\t\t *  @example\n\t\t * var player = new Tone.Player(\"./path/to/sample.mp3\").toMaster();\n\t\t * //play as soon as the buffer is loaded\n\t\t * player.autostart = true;\n\t\t */\n\t    Tone.Player = function (url) {\n\t        var options;\n\t        if (url instanceof Tone.Buffer && url.loaded) {\n\t            url = url.get();\n\t            options = Tone.Player.defaults;\n\t        } else {\n\t            options = Tone.defaults(arguments, [\n\t                'url',\n\t                'onload'\n\t            ], Tone.Player);\n\t        }\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  If the file should play as soon\n\t\t\t *  as the buffer is loaded.\n\t\t\t *  @type {Boolean}\n\t\t\t *  @example\n\t\t\t * //will play as soon as it's loaded\n\t\t\t * var player = new Tone.Player({\n\t\t\t * \t\"url\" : \"./path/to/sample.mp3\",\n\t\t\t * \t\"autostart\" : true,\n\t\t\t * }).toMaster();\n\t\t\t */\n\t        this.autostart = options.autostart;\n\t        /**\n\t\t\t *  the buffer\n\t\t\t *  @private\n\t\t\t *  @type {Tone.Buffer}\n\t\t\t */\n\t        this._buffer = new Tone.Buffer({\n\t            'url': options.url,\n\t            'onload': this._onload.bind(this, options.onload),\n\t            'reverse': options.reverse\n\t        });\n\t        if (url instanceof AudioBuffer) {\n\t            this._buffer.set(url);\n\t        }\n\t        /**\n\t\t\t *  if the buffer should loop once it's over\n\t\t\t *  @type {Boolean}\n\t\t\t *  @private\n\t\t\t */\n\t        this._loop = options.loop;\n\t        /**\n\t\t\t *  if 'loop' is true, the loop will start at this position\n\t\t\t *  @type {Time}\n\t\t\t *  @private\n\t\t\t */\n\t        this._loopStart = options.loopStart;\n\t        /**\n\t\t\t *  if 'loop' is true, the loop will end at this position\n\t\t\t *  @type {Time}\n\t\t\t *  @private\n\t\t\t */\n\t        this._loopEnd = options.loopEnd;\n\t        /**\n\t\t\t *  the playback rate\n\t\t\t *  @private\n\t\t\t *  @type {Number}\n\t\t\t */\n\t        this._playbackRate = options.playbackRate;\n\t        /**\n\t\t\t *  All of the active buffer source nodes\n\t\t\t *  @type {Array<Tone.BufferSource>}\n\t\t\t *  @private\n\t\t\t */\n\t        this._activeSources = [];\n\t        /**\n\t\t\t *  The elapsed time counter.\n\t\t\t *  @type {Tone.TickSource}\n\t\t\t *  @private\n\t\t\t */\n\t        this._elapsedTime = new Tone.TickSource(options.playbackRate);\n\t        /**\n\t\t\t *  The fadeIn time of the amplitude envelope.\n\t\t\t *  @type {Time}\n\t\t\t */\n\t        this.fadeIn = options.fadeIn;\n\t        /**\n\t\t\t *  The fadeOut time of the amplitude envelope.\n\t\t\t *  @type {Time}\n\t\t\t */\n\t        this.fadeOut = options.fadeOut;\n\t    };\n\t    Tone.extend(Tone.Player, Tone.Source);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Player.defaults = {\n\t        'onload': Tone.noOp,\n\t        'playbackRate': 1,\n\t        'loop': false,\n\t        'autostart': false,\n\t        'loopStart': 0,\n\t        'loopEnd': 0,\n\t        'retrigger': false,\n\t        'reverse': false,\n\t        'fadeIn': 0,\n\t        'fadeOut': 0\n\t    };\n\t    /**\n\t\t *  Load the audio file as an audio buffer.\n\t\t *  Decodes the audio asynchronously and invokes\n\t\t *  the callback once the audio buffer loads.\n\t\t *  Note: this does not need to be called if a url\n\t\t *  was passed in to the constructor. Only use this\n\t\t *  if you want to manually load a new url.\n\t\t * @param {string} url The url of the buffer to load.\n\t\t *                     Filetype support depends on the\n\t\t *                     browser.\n\t\t *  @param  {Function=} callback The function to invoke once\n\t\t *                               the sample is loaded.\n\t\t *  @returns {Promise}\n\t\t */\n\t    Tone.Player.prototype.load = function (url, callback) {\n\t        return this._buffer.load(url, this._onload.bind(this, callback));\n\t    };\n\t    /**\n\t\t * Internal callback when the buffer is loaded.\n\t\t * @private\n\t\t */\n\t    Tone.Player.prototype._onload = function (callback) {\n\t        callback = Tone.defaultArg(callback, Tone.noOp);\n\t        callback(this);\n\t        if (this.autostart) {\n\t            this.start();\n\t        }\n\t    };\n\t    /**\n\t\t * Internal callback when the buffer is done playing.\n\t\t * @private\n\t\t */\n\t    Tone.Player.prototype._onSourceEnd = function (source) {\n\t        var index = this._activeSources.indexOf(source);\n\t        this._activeSources.splice(index, 1);\n\t    };\n\t    /**\n\t\t *  Play the buffer at the given startTime. Optionally add an offset\n\t\t *  and/or duration which will play the buffer from a position\n\t\t *  within the buffer for the given duration.\n\t\t *\n\t\t *  @param  {Time} [startTime=now] When the player should start.\n\t\t *  @param  {Time} [offset=0] The offset from the beginning of the sample\n\t\t *                                 to start at.\n\t\t *  @param  {Time=} duration How long the sample should play. If no duration\n\t\t *                                is given, it will default to the full length\n\t\t *                                of the sample (minus any offset)\n\t\t *  @returns {Tone.Player} this\n\t\t *  @memberOf Tone.Player#\n\t\t *  @method start\n\t\t *  @name start\n\t\t */\n\t    /**\n\t\t *  Internal start method\n\t\t *  @private\n\t\t */\n\t    Tone.Player.prototype._start = function (startTime, offset, duration) {\n\t        //if it's a loop the default offset is the loopstart point\n\t        if (this._loop) {\n\t            offset = Tone.defaultArg(offset, this._loopStart);\n\t        } else {\n\t            //otherwise the default offset is 0\n\t            offset = Tone.defaultArg(offset, 0);\n\t        }\n\t        //compute the values in seconds\n\t        offset = this.toSeconds(offset);\n\t        var computedDuration = Tone.defaultArg(duration, Math.max(this._buffer.duration - offset, 0));\n\t        computedDuration = this.toSeconds(computedDuration);\n\t        startTime = this.toSeconds(startTime);\n\t        //start the elapsed time counter\n\t        this._elapsedTime.start(startTime, offset);\n\t        //make the source\n\t        var source = new Tone.BufferSource({\n\t            'buffer': this._buffer,\n\t            'loop': this._loop,\n\t            'loopStart': this._loopStart,\n\t            'loopEnd': this._loopEnd,\n\t            'onended': this._onSourceEnd.bind(this),\n\t            'playbackRate': this._playbackRate,\n\t            'fadeIn': this.fadeIn,\n\t            'fadeOut': this.fadeOut\n\t        }).connect(this.output);\n\t        //set the looping properties\n\t        if (!this._loop && !this._synced) {\n\t            //if it's not looping, set the state change at the end of the sample\n\t            this._state.setStateAtTime(Tone.State.Stopped, startTime + computedDuration / this._playbackRate);\n\t        }\n\t        //add it to the array of active sources\n\t        this._activeSources.push(source);\n\t        //start it\n\t        if (this._loop && Tone.isUndef(duration)) {\n\t            source.start(startTime, offset);\n\t        } else {\n\t            source.start(startTime, offset, computedDuration);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Stop playback.\n\t\t *  @private\n\t\t *  @param  {Time} [time=now]\n\t\t *  @returns {Tone.Player} this\n\t\t */\n\t    Tone.Player.prototype._stop = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._elapsedTime.stop(time);\n\t        this._activeSources.forEach(function (source) {\n\t            source.stop(time);\n\t        });\n\t        return this;\n\t    };\n\t    /**\n\t\t * Stop and then restart the player from the beginning (or offset)\n\t\t *  @param  {Time} [startTime=now] When the player should start.\n\t\t *  @param  {Time} [offset=0] The offset from the beginning of the sample\n\t\t *                                 to start at.\n\t\t *  @param  {Time=} duration How long the sample should play. If no duration\n\t\t *                                is given, it will default to the full length\n\t\t *                                of the sample (minus any offset)\n\t\t *  @returns {Tone.Player} this\n\t\t */\n\t    Tone.Player.prototype.restart = function (time, offset, duration) {\n\t        this._stop(time);\n\t        this._start(time, offset, duration);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Seek to a specific time in the player's buffer. If the\n\t\t *  source is no longer playing at that time, it will stop.\n\t\t *  If you seek to a time that\n\t\t *  @param {Time} offset The time to seek to.\n\t\t *  @param {Time=} time The time for the seek event to occur.\n\t\t *  @return {Tone.Player} this\n\t\t *  @example\n\t\t * source.start(0.2);\n\t\t * source.stop(0.4);\n\t\t */\n\t    Tone.Player.prototype.seek = function (offset, time) {\n\t        time = this.toSeconds(time);\n\t        if (this._state.getValueAtTime(time) === Tone.State.Started) {\n\t            offset = this.toSeconds(offset);\n\t            // if it's currently playing, stop it\n\t            this._stop(time);\n\t            //restart it at the given time\n\t            this._start(time, offset);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Set the loop start and end. Will only loop if loop is\n\t\t *  set to true.\n\t\t *  @param {Time} loopStart The loop end time\n\t\t *  @param {Time} loopEnd The loop end time\n\t\t *  @returns {Tone.Player} this\n\t\t *  @example\n\t\t * //loop 0.1 seconds of the file.\n\t\t * player.setLoopPoints(0.2, 0.3);\n\t\t * player.loop = true;\n\t\t */\n\t    Tone.Player.prototype.setLoopPoints = function (loopStart, loopEnd) {\n\t        this.loopStart = loopStart;\n\t        this.loopEnd = loopEnd;\n\t        return this;\n\t    };\n\t    /**\n\t\t * If loop is true, the loop will start at this position.\n\t\t * @memberOf Tone.Player#\n\t\t * @type {Time}\n\t\t * @name loopStart\n\t\t */\n\t    Object.defineProperty(Tone.Player.prototype, 'loopStart', {\n\t        get: function () {\n\t            return this._loopStart;\n\t        },\n\t        set: function (loopStart) {\n\t            this._loopStart = loopStart;\n\t            //get the current source\n\t            this._activeSources.forEach(function (source) {\n\t                source.loopStart = loopStart;\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t * If loop is true, the loop will end at this position.\n\t\t * @memberOf Tone.Player#\n\t\t * @type {Time}\n\t\t * @name loopEnd\n\t\t */\n\t    Object.defineProperty(Tone.Player.prototype, 'loopEnd', {\n\t        get: function () {\n\t            return this._loopEnd;\n\t        },\n\t        set: function (loopEnd) {\n\t            this._loopEnd = loopEnd;\n\t            //get the current source\n\t            this._activeSources.forEach(function (source) {\n\t                source.loopEnd = loopEnd;\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t * The audio buffer belonging to the player.\n\t\t * @memberOf Tone.Player#\n\t\t * @type {Tone.Buffer}\n\t\t * @name buffer\n\t\t */\n\t    Object.defineProperty(Tone.Player.prototype, 'buffer', {\n\t        get: function () {\n\t            return this._buffer;\n\t        },\n\t        set: function (buffer) {\n\t            this._buffer.set(buffer);\n\t        }\n\t    });\n\t    /**\n\t\t * If the buffer should loop once it's over.\n\t\t * @memberOf Tone.Player#\n\t\t * @type {Boolean}\n\t\t * @name loop\n\t\t */\n\t    Object.defineProperty(Tone.Player.prototype, 'loop', {\n\t        get: function () {\n\t            return this._loop;\n\t        },\n\t        set: function (loop) {\n\t            //if no change, do nothing\n\t            if (this._loop === loop) {\n\t                return;\n\t            }\n\t            this._loop = loop;\n\t            var now = this.now();\n\t            if (!loop) {\n\t                //stop the playback on the next cycle\n\t                this._stopAtNextIteration(now);\n\t            } else {\n\t                //remove the next stopEvent\n\t                var stopEvent = this._state.getNextState(Tone.State.Stopped, now);\n\t                if (stopEvent) {\n\t                    this._activeSources.forEach(function (source) {\n\t                        source.loop = loop;\n\t                    });\n\t                    this._state.cancel(stopEvent.time);\n\t                    this._elapsedTime.cancel(stopEvent.time);\n\t                }\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Schedules a stop event at the next full iteration. Used\n\t\t *  for scheduling stop when the loop state or playbackRate changes\n\t\t *  @param  {Number}  now  The current time\n\t\t *  @private\n\t\t */\n\t    Tone.Player.prototype._stopAtNextIteration = function (now) {\n\t        if (this._state.getValueAtTime(now) === Tone.State.Started) {\n\t            var nextStop = this._state.getNextState(Tone.State.Stopped, now);\n\t            var position = this._elapsedTime.getTicksAtTime(now);\n\t            var iterations = Math.max(Math.ceil(position / this.buffer.duration), 1);\n\t            var stopTime = this._elapsedTime.getTimeOfTick(iterations * this.buffer.duration, nextStop ? nextStop.time - this.sampleTime : Infinity);\n\t            this.stop(stopTime);\n\t        }\n\t    };\n\t    /**\n\t\t * The playback speed. 1 is normal speed. This is not a signal because\n\t\t * Safari and iOS currently don't support playbackRate as a signal.\n\t\t * @memberOf Tone.Player#\n\t\t * @type {Number}\n\t\t * @name playbackRate\n\t\t */\n\t    Object.defineProperty(Tone.Player.prototype, 'playbackRate', {\n\t        get: function () {\n\t            return this._playbackRate;\n\t        },\n\t        set: function (rate) {\n\t            this._playbackRate = rate;\n\t            var now = this.now();\n\t            this._elapsedTime.frequency.setValueAtTime(rate, now);\n\t            //if it's not looping\n\t            if (!this._loop) {\n\t                this._stopAtNextIteration(now);\n\t            }\n\t            //set all the sources\n\t            this._activeSources.forEach(function (source) {\n\t                source.playbackRate.setValueAtTime(rate, now);\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t * The current playback position of the buffer. \n\t\t * @memberOf Tone.Player#\n\t\t * @type {Number}\n\t\t * @name position\n\t\t */\n\t    Object.defineProperty(Tone.Player.prototype, 'position', {\n\t        get: function () {\n\t            var now = this.now();\n\t            if (this._state.getValueAtTime(now) === Tone.State.Started && this.loaded) {\n\t                var duration = this.buffer.duration;\n\t                var position = this._elapsedTime.getTicksAtTime(now);\n\t                return position % duration;\n\t            } else {\n\t                return 0;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The direction the buffer should play in\n\t\t * @memberOf Tone.Player#\n\t\t * @type {Boolean}\n\t\t * @name reverse\n\t\t */\n\t    Object.defineProperty(Tone.Player.prototype, 'reverse', {\n\t        get: function () {\n\t            return this._buffer.reverse;\n\t        },\n\t        set: function (rev) {\n\t            this._buffer.reverse = rev;\n\t        }\n\t    });\n\t    /**\n\t\t * If all the buffer is loaded\n\t\t * @memberOf Tone.Player#\n\t\t * @type {Boolean}\n\t\t * @name loaded\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Player.prototype, 'loaded', {\n\t        get: function () {\n\t            return this._buffer.loaded;\n\t        }\n\t    });\n\t    /**\n\t\t *  Dispose and disconnect.\n\t\t *  @return {Tone.Player} this\n\t\t */\n\t    Tone.Player.prototype.dispose = function () {\n\t        //disconnect all of the players\n\t        this._activeSources.forEach(function (source) {\n\t            source.dispose();\n\t        });\n\t        this._activeSources = null;\n\t        Tone.Source.prototype.dispose.call(this);\n\t        this._buffer.dispose();\n\t        this._buffer = null;\n\t        this._elapsedTime.dispose();\n\t        this._elapsedTime = null;\n\t        return this;\n\t    };\n\t    return Tone.Player;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Players combines multiple [Tone.Player](Player) objects.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Object} urls An object mapping a name to a url.\n\t\t *  @param {function=} onload The function to invoke when all buffers are loaded.\n\t\t */\n\t    Tone.Players = function (urls) {\n\t        var args = Array.prototype.slice.call(arguments);\n\t        args.shift();\n\t        var options = Tone.defaults(args, ['onload'], Tone.Players);\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  The output volume node\n\t\t\t *  @type  {Tone.Volume}\n\t\t\t *  @private\n\t\t\t */\n\t        this._volume = this.output = new Tone.Volume(options.volume);\n\t        /**\n\t\t\t * The volume of the output in decibels.\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * source.volume.value = -6;\n\t\t\t */\n\t        this.volume = this._volume.volume;\n\t        this._readOnly('volume');\n\t        //make the output explicitly stereo\n\t        this._volume.output.output.channelCount = 2;\n\t        this._volume.output.output.channelCountMode = 'explicit';\n\t        //mute initially\n\t        this.mute = options.mute;\n\t        /**\n\t\t\t * The container of all of the players\n\t\t\t * @type {Object}\n\t\t\t * @private\n\t\t\t */\n\t        this._players = {};\n\t        /**\n\t\t\t * The loading count\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t        this._loadingCount = 0;\n\t        /**\n\t\t\t * private holder of the fadeIn time\n\t\t\t * @type {Time}\n\t\t\t * @private\n\t\t\t */\n\t        this._fadeIn = options.fadeIn;\n\t        /**\n\t\t\t * private holder of the fadeOut time\n\t\t\t * @type {Time}\n\t\t\t * @private\n\t\t\t */\n\t        this._fadeOut = options.fadeOut;\n\t        //add all of the players\n\t        for (var name in urls) {\n\t            this._loadingCount++;\n\t            this.add(name, urls[name], this._bufferLoaded.bind(this, options.onload));\n\t        }\n\t    };\n\t    Tone.extend(Tone.Players, Tone.AudioNode);\n\t    /**\n\t\t * The default values\n\t\t * @type {Object}\n\t\t */\n\t    Tone.Players.defaults = {\n\t        'volume': 0,\n\t        'mute': false,\n\t        'onload': Tone.noOp,\n\t        'fadeIn': 0,\n\t        'fadeOut': 0\n\t    };\n\t    /**\n\t\t *  A buffer was loaded. decrement the counter.\n\t\t *  @param  {Function}  callback\n\t\t *  @private\n\t\t */\n\t    Tone.Players.prototype._bufferLoaded = function (callback) {\n\t        this._loadingCount--;\n\t        if (this._loadingCount === 0 && callback) {\n\t            callback(this);\n\t        }\n\t    };\n\t    /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.Source#\n\t\t * @type {boolean}\n\t\t * @name mute\n\t\t * @example\n\t\t * //mute the output\n\t\t * source.mute = true;\n\t\t */\n\t    Object.defineProperty(Tone.Players.prototype, 'mute', {\n\t        get: function () {\n\t            return this._volume.mute;\n\t        },\n\t        set: function (mute) {\n\t            this._volume.mute = mute;\n\t        }\n\t    });\n\t    /**\n\t\t * The fadeIn time of the amplitude envelope.\n\t\t * @memberOf Tone.Source#\n\t\t * @type {Time}\n\t\t * @name fadeIn\n\t\t */\n\t    Object.defineProperty(Tone.Players.prototype, 'fadeIn', {\n\t        get: function () {\n\t            return this._fadeIn;\n\t        },\n\t        set: function (fadeIn) {\n\t            this._fadeIn = fadeIn;\n\t            this._forEach(function (player) {\n\t                player.fadeIn = fadeIn;\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t * The fadeOut time of the amplitude envelope.\n\t\t * @memberOf Tone.Source#\n\t\t * @type {Time}\n\t\t * @name fadeOut\n\t\t */\n\t    Object.defineProperty(Tone.Players.prototype, 'fadeOut', {\n\t        get: function () {\n\t            return this._fadeOut;\n\t        },\n\t        set: function (fadeOut) {\n\t            this._fadeOut = fadeOut;\n\t            this._forEach(function (player) {\n\t                player.fadeOut = fadeOut;\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t * The state of the players object. Returns \"started\" if any of the players are playing.\n\t\t * @memberOf Tone.Players#\n\t\t * @type {String}\n\t\t * @name state\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Players.prototype, 'state', {\n\t        get: function () {\n\t            var playing = false;\n\t            this._forEach(function (player) {\n\t                playing = playing || player.state === Tone.State.Started;\n\t            });\n\t            return playing ? Tone.State.Started : Tone.State.Stopped;\n\t        }\n\t    });\n\t    /**\n\t\t *  True if the buffers object has a buffer by that name.\n\t\t *  @param  {String|Number}  name  The key or index of the\n\t\t *                                 buffer.\n\t\t *  @return  {Boolean}\n\t\t */\n\t    Tone.Players.prototype.has = function (name) {\n\t        return this._players.hasOwnProperty(name);\n\t    };\n\t    /**\n\t\t *  Get a player by name.\n\t\t *  @param  {String}  name  The players name as defined in\n\t\t *                          the constructor object or `add` method.\n\t\t *  @return  {Tone.Player}\n\t\t */\n\t    Tone.Players.prototype.get = function (name) {\n\t        if (this.has(name)) {\n\t            return this._players[name];\n\t        } else {\n\t            throw new Error('Tone.Players: no player named ' + name);\n\t        }\n\t    };\n\t    /**\n\t\t * Iterate over all of the players\n\t\t * @param  {Function} callback\n\t\t * @return {Tone.Players}            this\n\t\t * @private\n\t\t */\n\t    Tone.Players.prototype._forEach = function (callback) {\n\t        for (var playerName in this._players) {\n\t            callback(this._players[playerName], playerName);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * If all the buffers are loaded or not\n\t\t * @memberOf Tone.Players#\n\t\t * @type {Boolean}\n\t\t * @name loaded\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Players.prototype, 'loaded', {\n\t        get: function () {\n\t            var isLoaded = true;\n\t            this._forEach(function (player) {\n\t                isLoaded = isLoaded && player.loaded;\n\t            });\n\t            return isLoaded;\n\t        }\n\t    });\n\t    /**\n\t\t *  Add a player by name and url to the Players\n\t\t *  @param  {String}    name      A unique name to give the player\n\t\t *  @param  {String|Tone.Buffer|Audiobuffer}  url  Either the url of the bufer,\n\t\t *                                                 or a buffer which will be added\n\t\t *                                                 with the given name.\n\t\t *  @param  {Function=}  callback  The callback to invoke\n\t\t *                                 when the url is loaded.\n\t\t */\n\t    Tone.Players.prototype.add = function (name, url, callback) {\n\t        this._players[name] = new Tone.Player(url, callback).connect(this.output);\n\t        this._players[name].fadeIn = this._fadeIn;\n\t        this._players[name].fadeOut = this._fadeOut;\n\t        return this;\n\t    };\n\t    /**\n\t\t * Stop all of the players at the given time\n\t\t * @param {Time} time The time to stop all of the players.\n\t\t * @return {Tone.Players} this\n\t\t */\n\t    Tone.Players.prototype.stopAll = function (time) {\n\t        this._forEach(function (player) {\n\t            player.stop(time);\n\t        });\n\t    };\n\t    /**\n\t\t *  Dispose and disconnect.\n\t\t *  @return {Tone.Players} this\n\t\t */\n\t    Tone.Players.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._volume.dispose();\n\t        this._volume = null;\n\t        this._writable('volume');\n\t        this.volume = null;\n\t        this.output = null;\n\t        this._forEach(function (player) {\n\t            player.dispose();\n\t        });\n\t        this._players = null;\n\t        return this;\n\t    };\n\t    return Tone.Players;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.UserMedia uses MediaDevices.getUserMedia to open up\n\t\t *          and external microphone or audio input. Check\n\t\t *          [MediaDevices API Support](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia)\n\t\t *          to see which browsers are supported. Access to an external input\n\t\t *          is limited to secure (HTTPS) connections.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Decibels=} volume The level of the input\n\t\t *  @example\n\t\t * //list the inputs and open the third one\n\t\t * var motu = new Tone.UserMedia();\n\t\t *\n\t\t * //opening the input asks the user to activate their mic\n\t\t * motu.open().then(function(){\n\t\t * \t//promise resolves when input is available\n\t\t * });\n\t\t */\n\t    Tone.UserMedia = function () {\n\t        var options = Tone.defaults(arguments, ['volume'], Tone.UserMedia);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The MediaStreamNode\n\t\t\t *  @type {MediaStreamAudioSourceNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._mediaStream = null;\n\t        /**\n\t\t\t *  The media stream created by getUserMedia.\n\t\t\t *  @type {LocalMediaStream}\n\t\t\t *  @private\n\t\t\t */\n\t        this._stream = null;\n\t        /**\n\t\t\t *  The open device\n\t\t\t *  @type  {MediaDeviceInfo}\n\t\t\t *  @private\n\t\t\t */\n\t        this._device = null;\n\t        /**\n\t\t\t *  The output volume node\n\t\t\t *  @type  {Tone.Volume}\n\t\t\t *  @private\n\t\t\t */\n\t        this._volume = this.output = new Tone.Volume(options.volume);\n\t        /**\n\t\t\t * The volume of the output in decibels.\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * input.volume.value = -6;\n\t\t\t */\n\t        this.volume = this._volume.volume;\n\t        this._readOnly('volume');\n\t        this.mute = options.mute;\n\t    };\n\t    Tone.extend(Tone.UserMedia, Tone.AudioNode);\n\t    /**\n\t\t * the default parameters\n\t\t * @type {Object}\n\t\t */\n\t    Tone.UserMedia.defaults = {\n\t        'volume': 0,\n\t        'mute': false\n\t    };\n\t    /**\n\t\t *  Open the media stream. If a string is passed in, it is assumed\n\t\t *  to be the label or id of the stream, if a number is passed in,\n\t\t *  it is the input number of the stream.\n\t\t *  @param  {String|Number} [labelOrId=\"default\"] The label or id of the audio input media device.\n\t\t *                                                With no argument, the default stream is opened.\n\t\t *  @return {Promise} The promise is resolved when the stream is open.\n\t\t */\n\t    Tone.UserMedia.prototype.open = function (labelOrId) {\n\t        return Tone.UserMedia.enumerateDevices().then(function (devices) {\n\t            var device;\n\t            if (Tone.isNumber(labelOrId)) {\n\t                device = devices[labelOrId];\n\t            } else {\n\t                device = devices.find(function (device) {\n\t                    return device.label === labelOrId || device.deviceId === labelOrId;\n\t                });\n\t                //didn't find a matching device\n\t                if (!device && devices.length > 0) {\n\t                    device = devices[0];\n\t                } else if (!device && Tone.isDefined(labelOrId)) {\n\t                    throw new Error('Tone.UserMedia: no matching device: ' + labelOrId);\n\t                }\n\t            }\n\t            this._device = device;\n\t            //do getUserMedia\n\t            var constraints = {\n\t                audio: {\n\t                    'echoCancellation': false,\n\t                    'sampleRate': this.context.sampleRate\n\t                }\n\t            };\n\t            if (device) {\n\t                constraints.audio.deviceId = device.deviceId;\n\t            }\n\t            return navigator.mediaDevices.getUserMedia(constraints).then(function (stream) {\n\t                //start a new source only if the previous one is closed\n\t                if (!this._stream) {\n\t                    this._stream = stream;\n\t                    //Wrap a MediaStreamSourceNode around the live input stream.\n\t                    this._mediaStream = this.context.createMediaStreamSource(stream);\n\t                    //Connect the MediaStreamSourceNode to a gate gain node\n\t                    this._mediaStream.connect(this.output);\n\t                }\n\t                return this;\n\t            }.bind(this));\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t *  Close the media stream\n\t\t *  @return {Tone.UserMedia} this\n\t\t */\n\t    Tone.UserMedia.prototype.close = function () {\n\t        if (this._stream) {\n\t            this._stream.getAudioTracks().forEach(function (track) {\n\t                track.stop();\n\t            });\n\t            this._stream = null;\n\t            //remove the old media stream\n\t            this._mediaStream.disconnect();\n\t            this._mediaStream = null;\n\t        }\n\t        this._device = null;\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Returns a promise which resolves with the list of audio input devices available.\n\t\t *  @return {Promise} The promise that is resolved with the devices\n\t\t *  @static\n\t\t *  @example\n\t\t * Tone.UserMedia.enumerateDevices().then(function(devices){\n\t\t * \tconsole.log(devices)\n\t\t * })\n\t\t */\n\t    Tone.UserMedia.enumerateDevices = function () {\n\t        return navigator.mediaDevices.enumerateDevices().then(function (devices) {\n\t            return devices.filter(function (device) {\n\t                return device.kind === 'audioinput';\n\t            });\n\t        });\n\t    };\n\t    /**\n\t\t *  Returns the playback state of the source, \"started\" when the microphone is open\n\t\t *  and \"stopped\" when the mic is closed.\n\t\t *  @type {Tone.State}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.UserMedia#\n\t\t *  @name state\n\t\t */\n\t    Object.defineProperty(Tone.UserMedia.prototype, 'state', {\n\t        get: function () {\n\t            return this._stream && this._stream.active ? Tone.State.Started : Tone.State.Stopped;\n\t        }\n\t    });\n\t    /**\n\t\t * \tReturns an identifier for the represented device that is\n\t\t * \tpersisted across sessions. It is un-guessable by other applications and\n\t\t * \tunique to the origin of the calling application. It is reset when the\n\t\t * \tuser clears cookies (for Private Browsing, a different identifier is\n\t\t * \tused that is not persisted across sessions). Returns undefined when the\n\t\t * \tdevice is not open.\n\t\t *  @type {String}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.UserMedia#\n\t\t *  @name deviceId\n\t\t */\n\t    Object.defineProperty(Tone.UserMedia.prototype, 'deviceId', {\n\t        get: function () {\n\t            if (this._device) {\n\t                return this._device.deviceId;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * \tReturns a group identifier. Two devices have the\n\t\t * \tsame group identifier if they belong to the same physical device.\n\t\t * \tReturns undefined when the device is not open.\n\t\t *  @type {String}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.UserMedia#\n\t\t *  @name groupId\n\t\t */\n\t    Object.defineProperty(Tone.UserMedia.prototype, 'groupId', {\n\t        get: function () {\n\t            if (this._device) {\n\t                return this._device.groupId;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * \tReturns a label describing this device (for example \"Built-in Microphone\").\n\t\t * \tReturns undefined when the device is not open or label is not available\n\t\t * \tbecause of permissions.\n\t\t *  @type {String}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.UserMedia#\n\t\t *  @name groupId\n\t\t */\n\t    Object.defineProperty(Tone.UserMedia.prototype, 'label', {\n\t        get: function () {\n\t            if (this._device) {\n\t                return this._device.label;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.UserMedia#\n\t\t * @type {boolean}\n\t\t * @name mute\n\t\t * @example\n\t\t * //mute the output\n\t\t * userMedia.mute = true;\n\t\t */\n\t    Object.defineProperty(Tone.UserMedia.prototype, 'mute', {\n\t        get: function () {\n\t            return this._volume.mute;\n\t        },\n\t        set: function (mute) {\n\t            this._volume.mute = mute;\n\t        }\n\t    });\n\t    /**\n\t\t * Clean up.\n\t\t * @return {Tone.UserMedia} this\n\t\t */\n\t    Tone.UserMedia.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this.close();\n\t        this._writable('volume');\n\t        this._volume.dispose();\n\t        this._volume = null;\n\t        this.volume = null;\n\t        return this;\n\t    };\n\t    /**\n\t\t *  If getUserMedia is supported by the browser.\n\t\t *  @type  {Boolean}\n\t\t *  @memberOf Tone.UserMedia#\n\t\t *  @name supported\n\t\t *  @static\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.UserMedia, 'supported', {\n\t        get: function () {\n\t            return Tone.isDefined(navigator.mediaDevices) && Tone.isFunction(navigator.mediaDevices.getUserMedia);\n\t        }\n\t    });\n\t    return Tone.UserMedia;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.Midi is a primitive type for encoding Time values.\n\t\t *         Tone.Midi can be constructed with or without the `new` keyword. Tone.Midi can be passed\n\t\t *         into the parameter of any method which takes time as an argument.\n\t\t *  @constructor\n\t\t *  @extends {Tone.Frequency}\n\t\t *  @param  {String|Number}  val    The time value.\n\t\t *  @param  {String=}  units  The units of the value.\n\t\t *  @example\n\t\t * var t = Tone.Midi(\"4n\");//a quarter note\n\t\t */\n\t    Tone.Midi = function (val, units) {\n\t        if (this instanceof Tone.Midi) {\n\t            Tone.Frequency.call(this, val, units);\n\t        } else {\n\t            return new Tone.Midi(val, units);\n\t        }\n\t    };\n\t    Tone.extend(Tone.Midi, Tone.Frequency);\n\t    /**\n\t\t *  The default units if none are given.\n\t\t *  @type {String}\n\t\t *  @private\n\t\t */\n\t    Tone.Midi.prototype._defaultUnits = 'midi';\n\t    /**\n\t\t *  Returns the value of a frequency in the current units\n\t\t *  @param {Frequency} freq\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Midi.prototype._frequencyToUnits = function (freq) {\n\t        return Tone.Frequency.ftom(Tone.Frequency.prototype._frequencyToUnits.call(this, freq));\n\t    };\n\t    /**\n\t\t *  Returns the value of a tick in the current time units\n\t\t *  @param {Ticks} ticks\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Midi.prototype._ticksToUnits = function (ticks) {\n\t        return Tone.Frequency.ftom(Tone.Frequency.prototype._ticksToUnits.call(this, ticks));\n\t    };\n\t    /**\n\t\t *  Return the value of the beats in the current units\n\t\t *  @param {Number} beats\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Midi.prototype._beatsToUnits = function (beats) {\n\t        return Tone.Frequency.ftom(Tone.Frequency.prototype._beatsToUnits.call(this, beats));\n\t    };\n\t    /**\n\t\t *  Returns the value of a second in the current units\n\t\t *  @param {Seconds} seconds\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Midi.prototype._secondsToUnits = function (seconds) {\n\t        return Tone.Frequency.ftom(Tone.Frequency.prototype._secondsToUnits.call(this, seconds));\n\t    };\n\t    /**\n\t\t *  Return the value of the frequency as a MIDI note\n\t\t *  @return  {MIDI}\n\t\t *  @example\n\t\t * Tone.Midi(60).toMidi(); //60\n\t\t */\n\t    Tone.Midi.prototype.toMidi = function () {\n\t        return this.valueOf();\n\t    };\n\t    /**\n\t\t *  Return the value of the frequency as a MIDI note\n\t\t *  @return  {MIDI}\n\t\t *  @example\n\t\t * Tone.Midi(60).toMidi(); //60\n\t\t */\n\t    Tone.Midi.prototype.toFrequency = function () {\n\t        return Tone.Frequency.mtof(this.toMidi());\n\t    };\n\t    /**\n\t\t *  Transposes the frequency by the given number of semitones.\n\t\t *  @param  {Interval}  interval\n\t\t *  @return  {Tone.Frequency} A new transposed frequency\n\t\t *  @example\n\t\t * Tone.Frequency(\"A4\").transpose(3); //\"C5\"\n\t\t */\n\t    Tone.Midi.prototype.transpose = function (interval) {\n\t        return new this.constructor(this.toMidi() + interval);\n\t    };\n\t    return Tone.Midi;\n\t});\n\t\n\treturn Tone;\n}));","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n  byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n  var i = offset || 0;\n  var bth = byteToHex;\n  return bth[buf[i++]] + bth[buf[i++]] +\n          bth[buf[i++]] + bth[buf[i++]] + '-' +\n          bth[buf[i++]] + bth[buf[i++]] + '-' +\n          bth[buf[i++]] + bth[buf[i++]] + '-' +\n          bth[buf[i++]] + bth[buf[i++]] + '-' +\n          bth[buf[i++]] + bth[buf[i++]] +\n          bth[buf[i++]] + bth[buf[i++]] +\n          bth[buf[i++]] + bth[buf[i++]];\n}\n\nmodule.exports = bytesToUuid;\n","// Unique ID creation requires a high quality random # generator.  In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API.  We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues.bind(crypto)) ||\n                      (typeof(msCrypto) != 'undefined' && msCrypto.getRandomValues.bind(msCrypto));\nif (getRandomValues) {\n  // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n  var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n  module.exports = function whatwgRNG() {\n    getRandomValues(rnds8);\n    return rnds8;\n  };\n} else {\n  // Math.random()-based (RNG)\n  //\n  // If all else fails, use Math.random().  It's fast, but is of unspecified\n  // quality.\n  var rnds = new Array(16);\n\n  module.exports = function mathRNG() {\n    for (var i = 0, r; i < 16; i++) {\n      if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n      rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n    }\n\n    return rnds;\n  };\n}\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/broofa/node-uuid for API details\nfunction v1(options, buf, offset) {\n  var i = buf && offset || 0;\n  var b = buf || [];\n\n  options = options || {};\n  var node = options.node || _nodeId;\n  var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n  // node and clockseq need to be initialized to random values if they're not\n  // specified.  We do this lazily to minimize issues related to insufficient\n  // system entropy.  See #189\n  if (node == null || clockseq == null) {\n    var seedBytes = rng();\n    if (node == null) {\n      // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n      node = _nodeId = [\n        seedBytes[0] | 0x01,\n        seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]\n      ];\n    }\n    if (clockseq == null) {\n      // Per 4.2.2, randomize (14 bit) clockseq\n      clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n    }\n  }\n\n  // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n  // (1582-10-15 00:00).  JSNumbers aren't precise enough for this, so\n  // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n  // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n  var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n  // Per 4.2.1.2, use count of uuid's generated during the current clock\n  // cycle to simulate higher resolution clock\n  var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n  // Time since last uuid creation (in msecs)\n  var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n  // Per 4.2.1.2, Bump clockseq on clock regression\n  if (dt < 0 && options.clockseq === undefined) {\n    clockseq = clockseq + 1 & 0x3fff;\n  }\n\n  // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n  // time interval\n  if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n    nsecs = 0;\n  }\n\n  // Per 4.2.1.2 Throw error if too many uuids are requested\n  if (nsecs >= 10000) {\n    throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n  }\n\n  _lastMSecs = msecs;\n  _lastNSecs = nsecs;\n  _clockseq = clockseq;\n\n  // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n  msecs += 12219292800000;\n\n  // `time_low`\n  var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n  b[i++] = tl >>> 24 & 0xff;\n  b[i++] = tl >>> 16 & 0xff;\n  b[i++] = tl >>> 8 & 0xff;\n  b[i++] = tl & 0xff;\n\n  // `time_mid`\n  var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n  b[i++] = tmh >>> 8 & 0xff;\n  b[i++] = tmh & 0xff;\n\n  // `time_high_and_version`\n  b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n  b[i++] = tmh >>> 16 & 0xff;\n\n  // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n  b[i++] = clockseq >>> 8 | 0x80;\n\n  // `clock_seq_low`\n  b[i++] = clockseq & 0xff;\n\n  // `node`\n  for (var n = 0; n < 6; ++n) {\n    b[i + n] = node[n];\n  }\n\n  return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction valueEqual(a, b) {\n  if (a === b) return true;\n\n  if (a == null || b == null) return false;\n\n  if (Array.isArray(a)) {\n    return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {\n      return valueEqual(item, b[index]);\n    });\n  }\n\n  var aType = typeof a === 'undefined' ? 'undefined' : _typeof(a);\n  var bType = typeof b === 'undefined' ? 'undefined' : _typeof(b);\n\n  if (aType !== bType) return false;\n\n  if (aType === 'object') {\n    var aValue = a.valueOf();\n    var bValue = b.valueOf();\n\n    if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);\n\n    var aKeys = Object.keys(a);\n    var bKeys = Object.keys(b);\n\n    if (aKeys.length !== bKeys.length) return false;\n\n    return aKeys.every(function (key) {\n      return valueEqual(a[key], b[key]);\n    });\n  }\n\n  return false;\n}\n\nexport default valueEqual;","/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n  warning = function(condition, format, args) {\n    var len = arguments.length;\n    args = new Array(len > 2 ? len - 2 : 0);\n    for (var key = 2; key < len; key++) {\n      args[key - 2] = arguments[key];\n    }\n    if (format === undefined) {\n      throw new Error(\n        '`warning(condition, format, ...args)` requires a warning ' +\n        'message argument'\n      );\n    }\n\n    if (format.length < 10 || (/^[s\\W]*$/).test(format)) {\n      throw new Error(\n        'The warning format should be able to uniquely identify this ' +\n        'warning. Please, use a more descriptive format than: ' + format\n      );\n    }\n\n    if (!condition) {\n      var argIndex = 0;\n      var message = 'Warning: ' +\n        format.replace(/%s/g, function() {\n          return args[argIndex++];\n        });\n      if (typeof console !== 'undefined') {\n        console.error(message);\n      }\n      try {\n        // This error was thrown as a convenience so that you can use this stack\n        // to find the callsite that caused this warning to fire.\n        throw new Error(message);\n      } catch(x) {}\n    }\n  };\n}\n\nmodule.exports = warning;\n","module.exports = function() {\r\n\tthrow new Error(\"define cannot be used indirect\");\r\n};\r\n","/* globals __webpack_amd_options__ */\r\nmodule.exports = __webpack_amd_options__;\r\n","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1, eval)(\"this\");\r\n} catch (e) {\r\n\t// This works if the window reference is available\r\n\tif (typeof window === \"object\") g = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n","module.exports = function(originalModule) {\r\n\tif (!originalModule.webpackPolyfill) {\r\n\t\tvar module = Object.create(originalModule);\r\n\t\t// module.parent = undefined by default\r\n\t\tif (!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"exports\", {\r\n\t\t\tenumerable: true\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n","module.exports = function(module) {\r\n\tif (!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif (!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n  lookup[i] = code[i]\n  revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n  var len = b64.length\n\n  if (len % 4 > 0) {\n    throw new Error('Invalid string. Length must be a multiple of 4')\n  }\n\n  // Trim off extra bytes after placeholder bytes are found\n  // See: https://github.com/beatgammit/base64-js/issues/42\n  var validLen = b64.indexOf('=')\n  if (validLen === -1) validLen = len\n\n  var placeHoldersLen = validLen === len\n    ? 0\n    : 4 - (validLen % 4)\n\n  return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n  var lens = getLens(b64)\n  var validLen = lens[0]\n  var placeHoldersLen = lens[1]\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n  var tmp\n  var lens = getLens(b64)\n  var validLen = lens[0]\n  var placeHoldersLen = lens[1]\n\n  var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n  var curByte = 0\n\n  // if there are placeholders, only get up to the last complete 4 chars\n  var len = placeHoldersLen > 0\n    ? validLen - 4\n    : validLen\n\n  for (var i = 0; i < len; i += 4) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 18) |\n      (revLookup[b64.charCodeAt(i + 1)] << 12) |\n      (revLookup[b64.charCodeAt(i + 2)] << 6) |\n      revLookup[b64.charCodeAt(i + 3)]\n    arr[curByte++] = (tmp >> 16) & 0xFF\n    arr[curByte++] = (tmp >> 8) & 0xFF\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  if (placeHoldersLen === 2) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 2) |\n      (revLookup[b64.charCodeAt(i + 1)] >> 4)\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  if (placeHoldersLen === 1) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 10) |\n      (revLookup[b64.charCodeAt(i + 1)] << 4) |\n      (revLookup[b64.charCodeAt(i + 2)] >> 2)\n    arr[curByte++] = (tmp >> 8) & 0xFF\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  return arr\n}\n\nfunction tripletToBase64 (num) {\n  return lookup[num >> 18 & 0x3F] +\n    lookup[num >> 12 & 0x3F] +\n    lookup[num >> 6 & 0x3F] +\n    lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n  var tmp\n  var output = []\n  for (var i = start; i < end; i += 3) {\n    tmp =\n      ((uint8[i] << 16) & 0xFF0000) +\n      ((uint8[i + 1] << 8) & 0xFF00) +\n      (uint8[i + 2] & 0xFF)\n    output.push(tripletToBase64(tmp))\n  }\n  return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n  var tmp\n  var len = uint8.length\n  var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n  var parts = []\n  var maxChunkLength = 16383 // must be multiple of 3\n\n  // go through the array every three bytes, we'll deal with trailing stuff later\n  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n    parts.push(encodeChunk(\n      uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n    ))\n  }\n\n  // pad the end with zeros, but make sure to not forget the extra bytes\n  if (extraBytes === 1) {\n    tmp = uint8[len - 1]\n    parts.push(\n      lookup[tmp >> 2] +\n      lookup[(tmp << 4) & 0x3F] +\n      '=='\n    )\n  } else if (extraBytes === 2) {\n    tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n    parts.push(\n      lookup[tmp >> 10] +\n      lookup[(tmp >> 4) & 0x3F] +\n      lookup[(tmp << 2) & 0x3F] +\n      '='\n    )\n  }\n\n  return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>\n * @license  MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n *   === true    Use Uint8Array implementation (fastest)\n *   === false   Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n *   - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n *     See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n *   - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n *   - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n *     incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n  ? global.TYPED_ARRAY_SUPPORT\n  : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n  try {\n    var arr = new Uint8Array(1)\n    arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n    return arr.foo() === 42 && // typed array instances can be augmented\n        typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n        arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n  } catch (e) {\n    return false\n  }\n}\n\nfunction kMaxLength () {\n  return Buffer.TYPED_ARRAY_SUPPORT\n    ? 0x7fffffff\n    : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n  if (kMaxLength() < length) {\n    throw new RangeError('Invalid typed array length')\n  }\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    // Return an augmented `Uint8Array` instance, for best performance\n    that = new Uint8Array(length)\n    that.__proto__ = Buffer.prototype\n  } else {\n    // Fallback: Return an object instance of the Buffer class\n    if (that === null) {\n      that = new Buffer(length)\n    }\n    that.length = length\n  }\n\n  return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n  if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n    return new Buffer(arg, encodingOrOffset, length)\n  }\n\n  // Common case.\n  if (typeof arg === 'number') {\n    if (typeof encodingOrOffset === 'string') {\n      throw new Error(\n        'If encoding is specified then the first argument must be a string'\n      )\n    }\n    return allocUnsafe(this, arg)\n  }\n  return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n  arr.__proto__ = Buffer.prototype\n  return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n  if (typeof value === 'number') {\n    throw new TypeError('\"value\" argument must not be a number')\n  }\n\n  if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n    return fromArrayBuffer(that, value, encodingOrOffset, length)\n  }\n\n  if (typeof value === 'string') {\n    return fromString(that, value, encodingOrOffset)\n  }\n\n  return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n  return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n  Buffer.prototype.__proto__ = Uint8Array.prototype\n  Buffer.__proto__ = Uint8Array\n  if (typeof Symbol !== 'undefined' && Symbol.species &&\n      Buffer[Symbol.species] === Buffer) {\n    // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n    Object.defineProperty(Buffer, Symbol.species, {\n      value: null,\n      configurable: true\n    })\n  }\n}\n\nfunction assertSize (size) {\n  if (typeof size !== 'number') {\n    throw new TypeError('\"size\" argument must be a number')\n  } else if (size < 0) {\n    throw new RangeError('\"size\" argument must not be negative')\n  }\n}\n\nfunction alloc (that, size, fill, encoding) {\n  assertSize(size)\n  if (size <= 0) {\n    return createBuffer(that, size)\n  }\n  if (fill !== undefined) {\n    // Only pay attention to encoding if it's a string. This\n    // prevents accidentally sending in a number that would\n    // be interpretted as a start offset.\n    return typeof encoding === 'string'\n      ? createBuffer(that, size).fill(fill, encoding)\n      : createBuffer(that, size).fill(fill)\n  }\n  return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n  return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n  assertSize(size)\n  that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) {\n    for (var i = 0; i < size; ++i) {\n      that[i] = 0\n    }\n  }\n  return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n  return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n  return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n  if (typeof encoding !== 'string' || encoding === '') {\n    encoding = 'utf8'\n  }\n\n  if (!Buffer.isEncoding(encoding)) {\n    throw new TypeError('\"encoding\" must be a valid string encoding')\n  }\n\n  var length = byteLength(string, encoding) | 0\n  that = createBuffer(that, length)\n\n  var actual = that.write(string, encoding)\n\n  if (actual !== length) {\n    // Writing a hex string, for example, that contains invalid characters will\n    // cause everything after the first invalid character to be ignored. (e.g.\n    // 'abxxcd' will be treated as 'ab')\n    that = that.slice(0, actual)\n  }\n\n  return that\n}\n\nfunction fromArrayLike (that, array) {\n  var length = array.length < 0 ? 0 : checked(array.length) | 0\n  that = createBuffer(that, length)\n  for (var i = 0; i < length; i += 1) {\n    that[i] = array[i] & 255\n  }\n  return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n  array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n  if (byteOffset < 0 || array.byteLength < byteOffset) {\n    throw new RangeError('\\'offset\\' is out of bounds')\n  }\n\n  if (array.byteLength < byteOffset + (length || 0)) {\n    throw new RangeError('\\'length\\' is out of bounds')\n  }\n\n  if (byteOffset === undefined && length === undefined) {\n    array = new Uint8Array(array)\n  } else if (length === undefined) {\n    array = new Uint8Array(array, byteOffset)\n  } else {\n    array = new Uint8Array(array, byteOffset, length)\n  }\n\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    // Return an augmented `Uint8Array` instance, for best performance\n    that = array\n    that.__proto__ = Buffer.prototype\n  } else {\n    // Fallback: Return an object instance of the Buffer class\n    that = fromArrayLike(that, array)\n  }\n  return that\n}\n\nfunction fromObject (that, obj) {\n  if (Buffer.isBuffer(obj)) {\n    var len = checked(obj.length) | 0\n    that = createBuffer(that, len)\n\n    if (that.length === 0) {\n      return that\n    }\n\n    obj.copy(that, 0, 0, len)\n    return that\n  }\n\n  if (obj) {\n    if ((typeof ArrayBuffer !== 'undefined' &&\n        obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n      if (typeof obj.length !== 'number' || isnan(obj.length)) {\n        return createBuffer(that, 0)\n      }\n      return fromArrayLike(that, obj)\n    }\n\n    if (obj.type === 'Buffer' && isArray(obj.data)) {\n      return fromArrayLike(that, obj.data)\n    }\n  }\n\n  throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n  // Note: cannot use `length < kMaxLength()` here because that fails when\n  // length is NaN (which is otherwise coerced to zero.)\n  if (length >= kMaxLength()) {\n    throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n                         'size: 0x' + kMaxLength().toString(16) + ' bytes')\n  }\n  return length | 0\n}\n\nfunction SlowBuffer (length) {\n  if (+length != length) { // eslint-disable-line eqeqeq\n    length = 0\n  }\n  return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n  return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n  if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n    throw new TypeError('Arguments must be Buffers')\n  }\n\n  if (a === b) return 0\n\n  var x = a.length\n  var y = b.length\n\n  for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n    if (a[i] !== b[i]) {\n      x = a[i]\n      y = b[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n  switch (String(encoding).toLowerCase()) {\n    case 'hex':\n    case 'utf8':\n    case 'utf-8':\n    case 'ascii':\n    case 'latin1':\n    case 'binary':\n    case 'base64':\n    case 'ucs2':\n    case 'ucs-2':\n    case 'utf16le':\n    case 'utf-16le':\n      return true\n    default:\n      return false\n  }\n}\n\nBuffer.concat = function concat (list, length) {\n  if (!isArray(list)) {\n    throw new TypeError('\"list\" argument must be an Array of Buffers')\n  }\n\n  if (list.length === 0) {\n    return Buffer.alloc(0)\n  }\n\n  var i\n  if (length === undefined) {\n    length = 0\n    for (i = 0; i < list.length; ++i) {\n      length += list[i].length\n    }\n  }\n\n  var buffer = Buffer.allocUnsafe(length)\n  var pos = 0\n  for (i = 0; i < list.length; ++i) {\n    var buf = list[i]\n    if (!Buffer.isBuffer(buf)) {\n      throw new TypeError('\"list\" argument must be an Array of Buffers')\n    }\n    buf.copy(buffer, pos)\n    pos += buf.length\n  }\n  return buffer\n}\n\nfunction byteLength (string, encoding) {\n  if (Buffer.isBuffer(string)) {\n    return string.length\n  }\n  if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n      (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n    return string.byteLength\n  }\n  if (typeof string !== 'string') {\n    string = '' + string\n  }\n\n  var len = string.length\n  if (len === 0) return 0\n\n  // Use a for loop to avoid recursion\n  var loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'ascii':\n      case 'latin1':\n      case 'binary':\n        return len\n      case 'utf8':\n      case 'utf-8':\n      case undefined:\n        return utf8ToBytes(string).length\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return len * 2\n      case 'hex':\n        return len >>> 1\n      case 'base64':\n        return base64ToBytes(string).length\n      default:\n        if (loweredCase) return utf8ToBytes(string).length // assume utf8\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n  var loweredCase = false\n\n  // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n  // property of a typed array.\n\n  // This behaves neither like String nor Uint8Array in that we set start/end\n  // to their upper/lower bounds if the value passed is out of range.\n  // undefined is handled specially as per ECMA-262 6th Edition,\n  // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n  if (start === undefined || start < 0) {\n    start = 0\n  }\n  // Return early if start > this.length. Done here to prevent potential uint32\n  // coercion fail below.\n  if (start > this.length) {\n    return ''\n  }\n\n  if (end === undefined || end > this.length) {\n    end = this.length\n  }\n\n  if (end <= 0) {\n    return ''\n  }\n\n  // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n  end >>>= 0\n  start >>>= 0\n\n  if (end <= start) {\n    return ''\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  while (true) {\n    switch (encoding) {\n      case 'hex':\n        return hexSlice(this, start, end)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Slice(this, start, end)\n\n      case 'ascii':\n        return asciiSlice(this, start, end)\n\n      case 'latin1':\n      case 'binary':\n        return latin1Slice(this, start, end)\n\n      case 'base64':\n        return base64Slice(this, start, end)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return utf16leSlice(this, start, end)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = (encoding + '').toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n  var i = b[n]\n  b[n] = b[m]\n  b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n  var len = this.length\n  if (len % 2 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 16-bits')\n  }\n  for (var i = 0; i < len; i += 2) {\n    swap(this, i, i + 1)\n  }\n  return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n  var len = this.length\n  if (len % 4 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 32-bits')\n  }\n  for (var i = 0; i < len; i += 4) {\n    swap(this, i, i + 3)\n    swap(this, i + 1, i + 2)\n  }\n  return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n  var len = this.length\n  if (len % 8 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 64-bits')\n  }\n  for (var i = 0; i < len; i += 8) {\n    swap(this, i, i + 7)\n    swap(this, i + 1, i + 6)\n    swap(this, i + 2, i + 5)\n    swap(this, i + 3, i + 4)\n  }\n  return this\n}\n\nBuffer.prototype.toString = function toString () {\n  var length = this.length | 0\n  if (length === 0) return ''\n  if (arguments.length === 0) return utf8Slice(this, 0, length)\n  return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n  if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n  if (this === b) return true\n  return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n  var str = ''\n  var max = exports.INSPECT_MAX_BYTES\n  if (this.length > 0) {\n    str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n    if (this.length > max) str += ' ... '\n  }\n  return '<Buffer ' + str + '>'\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n  if (!Buffer.isBuffer(target)) {\n    throw new TypeError('Argument must be a Buffer')\n  }\n\n  if (start === undefined) {\n    start = 0\n  }\n  if (end === undefined) {\n    end = target ? target.length : 0\n  }\n  if (thisStart === undefined) {\n    thisStart = 0\n  }\n  if (thisEnd === undefined) {\n    thisEnd = this.length\n  }\n\n  if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n    throw new RangeError('out of range index')\n  }\n\n  if (thisStart >= thisEnd && start >= end) {\n    return 0\n  }\n  if (thisStart >= thisEnd) {\n    return -1\n  }\n  if (start >= end) {\n    return 1\n  }\n\n  start >>>= 0\n  end >>>= 0\n  thisStart >>>= 0\n  thisEnd >>>= 0\n\n  if (this === target) return 0\n\n  var x = thisEnd - thisStart\n  var y = end - start\n  var len = Math.min(x, y)\n\n  var thisCopy = this.slice(thisStart, thisEnd)\n  var targetCopy = target.slice(start, end)\n\n  for (var i = 0; i < len; ++i) {\n    if (thisCopy[i] !== targetCopy[i]) {\n      x = thisCopy[i]\n      y = targetCopy[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n  // Empty buffer means no match\n  if (buffer.length === 0) return -1\n\n  // Normalize byteOffset\n  if (typeof byteOffset === 'string') {\n    encoding = byteOffset\n    byteOffset = 0\n  } else if (byteOffset > 0x7fffffff) {\n    byteOffset = 0x7fffffff\n  } else if (byteOffset < -0x80000000) {\n    byteOffset = -0x80000000\n  }\n  byteOffset = +byteOffset  // Coerce to Number.\n  if (isNaN(byteOffset)) {\n    // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n    byteOffset = dir ? 0 : (buffer.length - 1)\n  }\n\n  // Normalize byteOffset: negative offsets start from the end of the buffer\n  if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n  if (byteOffset >= buffer.length) {\n    if (dir) return -1\n    else byteOffset = buffer.length - 1\n  } else if (byteOffset < 0) {\n    if (dir) byteOffset = 0\n    else return -1\n  }\n\n  // Normalize val\n  if (typeof val === 'string') {\n    val = Buffer.from(val, encoding)\n  }\n\n  // Finally, search either indexOf (if dir is true) or lastIndexOf\n  if (Buffer.isBuffer(val)) {\n    // Special case: looking for empty string/buffer always fails\n    if (val.length === 0) {\n      return -1\n    }\n    return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n  } else if (typeof val === 'number') {\n    val = val & 0xFF // Search for a byte value [0-255]\n    if (Buffer.TYPED_ARRAY_SUPPORT &&\n        typeof Uint8Array.prototype.indexOf === 'function') {\n      if (dir) {\n        return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n      } else {\n        return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n      }\n    }\n    return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n  }\n\n  throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n  var indexSize = 1\n  var arrLength = arr.length\n  var valLength = val.length\n\n  if (encoding !== undefined) {\n    encoding = String(encoding).toLowerCase()\n    if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n        encoding === 'utf16le' || encoding === 'utf-16le') {\n      if (arr.length < 2 || val.length < 2) {\n        return -1\n      }\n      indexSize = 2\n      arrLength /= 2\n      valLength /= 2\n      byteOffset /= 2\n    }\n  }\n\n  function read (buf, i) {\n    if (indexSize === 1) {\n      return buf[i]\n    } else {\n      return buf.readUInt16BE(i * indexSize)\n    }\n  }\n\n  var i\n  if (dir) {\n    var foundIndex = -1\n    for (i = byteOffset; i < arrLength; i++) {\n      if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n        if (foundIndex === -1) foundIndex = i\n        if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n      } else {\n        if (foundIndex !== -1) i -= i - foundIndex\n        foundIndex = -1\n      }\n    }\n  } else {\n    if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n    for (i = byteOffset; i >= 0; i--) {\n      var found = true\n      for (var j = 0; j < valLength; j++) {\n        if (read(arr, i + j) !== read(val, j)) {\n          found = false\n          break\n        }\n      }\n      if (found) return i\n    }\n  }\n\n  return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n  return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n  offset = Number(offset) || 0\n  var remaining = buf.length - offset\n  if (!length) {\n    length = remaining\n  } else {\n    length = Number(length)\n    if (length > remaining) {\n      length = remaining\n    }\n  }\n\n  // must be an even number of digits\n  var strLen = string.length\n  if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n  if (length > strLen / 2) {\n    length = strLen / 2\n  }\n  for (var i = 0; i < length; ++i) {\n    var parsed = parseInt(string.substr(i * 2, 2), 16)\n    if (isNaN(parsed)) return i\n    buf[offset + i] = parsed\n  }\n  return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n  return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n  return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n  return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n  return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n  return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n  // Buffer#write(string)\n  if (offset === undefined) {\n    encoding = 'utf8'\n    length = this.length\n    offset = 0\n  // Buffer#write(string, encoding)\n  } else if (length === undefined && typeof offset === 'string') {\n    encoding = offset\n    length = this.length\n    offset = 0\n  // Buffer#write(string, offset[, length][, encoding])\n  } else if (isFinite(offset)) {\n    offset = offset | 0\n    if (isFinite(length)) {\n      length = length | 0\n      if (encoding === undefined) encoding = 'utf8'\n    } else {\n      encoding = length\n      length = undefined\n    }\n  // legacy write(string, encoding, offset, length) - remove in v0.13\n  } else {\n    throw new Error(\n      'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n    )\n  }\n\n  var remaining = this.length - offset\n  if (length === undefined || length > remaining) length = remaining\n\n  if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n    throw new RangeError('Attempt to write outside buffer bounds')\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  var loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'hex':\n        return hexWrite(this, string, offset, length)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Write(this, string, offset, length)\n\n      case 'ascii':\n        return asciiWrite(this, string, offset, length)\n\n      case 'latin1':\n      case 'binary':\n        return latin1Write(this, string, offset, length)\n\n      case 'base64':\n        // Warning: maxLength not taken into account in base64Write\n        return base64Write(this, string, offset, length)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return ucs2Write(this, string, offset, length)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n  return {\n    type: 'Buffer',\n    data: Array.prototype.slice.call(this._arr || this, 0)\n  }\n}\n\nfunction base64Slice (buf, start, end) {\n  if (start === 0 && end === buf.length) {\n    return base64.fromByteArray(buf)\n  } else {\n    return base64.fromByteArray(buf.slice(start, end))\n  }\n}\n\nfunction utf8Slice (buf, start, end) {\n  end = Math.min(buf.length, end)\n  var res = []\n\n  var i = start\n  while (i < end) {\n    var firstByte = buf[i]\n    var codePoint = null\n    var bytesPerSequence = (firstByte > 0xEF) ? 4\n      : (firstByte > 0xDF) ? 3\n      : (firstByte > 0xBF) ? 2\n      : 1\n\n    if (i + bytesPerSequence <= end) {\n      var secondByte, thirdByte, fourthByte, tempCodePoint\n\n      switch (bytesPerSequence) {\n        case 1:\n          if (firstByte < 0x80) {\n            codePoint = firstByte\n          }\n          break\n        case 2:\n          secondByte = buf[i + 1]\n          if ((secondByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n            if (tempCodePoint > 0x7F) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 3:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n            if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 4:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          fourthByte = buf[i + 3]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n            if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n              codePoint = tempCodePoint\n            }\n          }\n      }\n    }\n\n    if (codePoint === null) {\n      // we did not generate a valid codePoint so insert a\n      // replacement char (U+FFFD) and advance only 1 byte\n      codePoint = 0xFFFD\n      bytesPerSequence = 1\n    } else if (codePoint > 0xFFFF) {\n      // encode to utf16 (surrogate pair dance)\n      codePoint -= 0x10000\n      res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n      codePoint = 0xDC00 | codePoint & 0x3FF\n    }\n\n    res.push(codePoint)\n    i += bytesPerSequence\n  }\n\n  return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n  var len = codePoints.length\n  if (len <= MAX_ARGUMENTS_LENGTH) {\n    return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n  }\n\n  // Decode in chunks to avoid \"call stack size exceeded\".\n  var res = ''\n  var i = 0\n  while (i < len) {\n    res += String.fromCharCode.apply(\n      String,\n      codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n    )\n  }\n  return res\n}\n\nfunction asciiSlice (buf, start, end) {\n  var ret = ''\n  end = Math.min(buf.length, end)\n\n  for (var i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i] & 0x7F)\n  }\n  return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n  var ret = ''\n  end = Math.min(buf.length, end)\n\n  for (var i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i])\n  }\n  return ret\n}\n\nfunction hexSlice (buf, start, end) {\n  var len = buf.length\n\n  if (!start || start < 0) start = 0\n  if (!end || end < 0 || end > len) end = len\n\n  var out = ''\n  for (var i = start; i < end; ++i) {\n    out += toHex(buf[i])\n  }\n  return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n  var bytes = buf.slice(start, end)\n  var res = ''\n  for (var i = 0; i < bytes.length; i += 2) {\n    res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n  }\n  return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n  var len = this.length\n  start = ~~start\n  end = end === undefined ? len : ~~end\n\n  if (start < 0) {\n    start += len\n    if (start < 0) start = 0\n  } else if (start > len) {\n    start = len\n  }\n\n  if (end < 0) {\n    end += len\n    if (end < 0) end = 0\n  } else if (end > len) {\n    end = len\n  }\n\n  if (end < start) end = start\n\n  var newBuf\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    newBuf = this.subarray(start, end)\n    newBuf.__proto__ = Buffer.prototype\n  } else {\n    var sliceLen = end - start\n    newBuf = new Buffer(sliceLen, undefined)\n    for (var i = 0; i < sliceLen; ++i) {\n      newBuf[i] = this[i + start]\n    }\n  }\n\n  return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n  if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n  if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var val = this[offset]\n  var mul = 1\n  var i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    checkOffset(offset, byteLength, this.length)\n  }\n\n  var val = this[offset + --byteLength]\n  var mul = 1\n  while (byteLength > 0 && (mul *= 0x100)) {\n    val += this[offset + --byteLength] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return ((this[offset]) |\n      (this[offset + 1] << 8) |\n      (this[offset + 2] << 16)) +\n      (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] * 0x1000000) +\n    ((this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var val = this[offset]\n  var mul = 1\n  var i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var i = byteLength\n  var mul = 1\n  var val = this[offset + --i]\n  while (i > 0 && (mul *= 0x100)) {\n    val += this[offset + --i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  if (!(this[offset] & 0x80)) return (this[offset])\n  return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  var val = this[offset] | (this[offset + 1] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  var val = this[offset + 1] | (this[offset] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset]) |\n    (this[offset + 1] << 8) |\n    (this[offset + 2] << 16) |\n    (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] << 24) |\n    (this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n  if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n  if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  var mul = 1\n  var i = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  var i = byteLength - 1\n  var mul = 1\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n  if (value < 0) value = 0xffff + value + 1\n  for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n    buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n      (littleEndian ? i : 1 - i) * 8\n  }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n  } else {\n    objectWriteUInt16(this, value, offset, true)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 8)\n    this[offset + 1] = (value & 0xff)\n  } else {\n    objectWriteUInt16(this, value, offset, false)\n  }\n  return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n  if (value < 0) value = 0xffffffff + value + 1\n  for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n    buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n  }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset + 3] = (value >>> 24)\n    this[offset + 2] = (value >>> 16)\n    this[offset + 1] = (value >>> 8)\n    this[offset] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, true)\n  }\n  return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 24)\n    this[offset + 1] = (value >>> 16)\n    this[offset + 2] = (value >>> 8)\n    this[offset + 3] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, false)\n  }\n  return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) {\n    var limit = Math.pow(2, 8 * byteLength - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  var i = 0\n  var mul = 1\n  var sub = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) {\n    var limit = Math.pow(2, 8 * byteLength - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  var i = byteLength - 1\n  var mul = 1\n  var sub = 0\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n  if (value < 0) value = 0xff + value + 1\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n  } else {\n    objectWriteUInt16(this, value, offset, true)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 8)\n    this[offset + 1] = (value & 0xff)\n  } else {\n    objectWriteUInt16(this, value, offset, false)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n    this[offset + 2] = (value >>> 16)\n    this[offset + 3] = (value >>> 24)\n  } else {\n    objectWriteUInt32(this, value, offset, true)\n  }\n  return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  if (value < 0) value = 0xffffffff + value + 1\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 24)\n    this[offset + 1] = (value >>> 16)\n    this[offset + 2] = (value >>> 8)\n    this[offset + 3] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, false)\n  }\n  return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n  if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 23, 4)\n  return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 52, 8)\n  return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n  if (!start) start = 0\n  if (!end && end !== 0) end = this.length\n  if (targetStart >= target.length) targetStart = target.length\n  if (!targetStart) targetStart = 0\n  if (end > 0 && end < start) end = start\n\n  // Copy 0 bytes; we're done\n  if (end === start) return 0\n  if (target.length === 0 || this.length === 0) return 0\n\n  // Fatal error conditions\n  if (targetStart < 0) {\n    throw new RangeError('targetStart out of bounds')\n  }\n  if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n  if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n  // Are we oob?\n  if (end > this.length) end = this.length\n  if (target.length - targetStart < end - start) {\n    end = target.length - targetStart + start\n  }\n\n  var len = end - start\n  var i\n\n  if (this === target && start < targetStart && targetStart < end) {\n    // descending copy from end\n    for (i = len - 1; i >= 0; --i) {\n      target[i + targetStart] = this[i + start]\n    }\n  } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n    // ascending copy from start\n    for (i = 0; i < len; ++i) {\n      target[i + targetStart] = this[i + start]\n    }\n  } else {\n    Uint8Array.prototype.set.call(\n      target,\n      this.subarray(start, start + len),\n      targetStart\n    )\n  }\n\n  return len\n}\n\n// Usage:\n//    buffer.fill(number[, offset[, end]])\n//    buffer.fill(buffer[, offset[, end]])\n//    buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n  // Handle string cases:\n  if (typeof val === 'string') {\n    if (typeof start === 'string') {\n      encoding = start\n      start = 0\n      end = this.length\n    } else if (typeof end === 'string') {\n      encoding = end\n      end = this.length\n    }\n    if (val.length === 1) {\n      var code = val.charCodeAt(0)\n      if (code < 256) {\n        val = code\n      }\n    }\n    if (encoding !== undefined && typeof encoding !== 'string') {\n      throw new TypeError('encoding must be a string')\n    }\n    if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n      throw new TypeError('Unknown encoding: ' + encoding)\n    }\n  } else if (typeof val === 'number') {\n    val = val & 255\n  }\n\n  // Invalid ranges are not set to a default, so can range check early.\n  if (start < 0 || this.length < start || this.length < end) {\n    throw new RangeError('Out of range index')\n  }\n\n  if (end <= start) {\n    return this\n  }\n\n  start = start >>> 0\n  end = end === undefined ? this.length : end >>> 0\n\n  if (!val) val = 0\n\n  var i\n  if (typeof val === 'number') {\n    for (i = start; i < end; ++i) {\n      this[i] = val\n    }\n  } else {\n    var bytes = Buffer.isBuffer(val)\n      ? val\n      : utf8ToBytes(new Buffer(val, encoding).toString())\n    var len = bytes.length\n    for (i = 0; i < end - start; ++i) {\n      this[i + start] = bytes[i % len]\n    }\n  }\n\n  return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n  // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n  str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n  // Node converts strings with length < 2 to ''\n  if (str.length < 2) return ''\n  // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n  while (str.length % 4 !== 0) {\n    str = str + '='\n  }\n  return str\n}\n\nfunction stringtrim (str) {\n  if (str.trim) return str.trim()\n  return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n  if (n < 16) return '0' + n.toString(16)\n  return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n  units = units || Infinity\n  var codePoint\n  var length = string.length\n  var leadSurrogate = null\n  var bytes = []\n\n  for (var i = 0; i < length; ++i) {\n    codePoint = string.charCodeAt(i)\n\n    // is surrogate component\n    if (codePoint > 0xD7FF && codePoint < 0xE000) {\n      // last char was a lead\n      if (!leadSurrogate) {\n        // no lead yet\n        if (codePoint > 0xDBFF) {\n          // unexpected trail\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        } else if (i + 1 === length) {\n          // unpaired lead\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        }\n\n        // valid lead\n        leadSurrogate = codePoint\n\n        continue\n      }\n\n      // 2 leads in a row\n      if (codePoint < 0xDC00) {\n        if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n        leadSurrogate = codePoint\n        continue\n      }\n\n      // valid surrogate pair\n      codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n    } else if (leadSurrogate) {\n      // valid bmp char, but last char was a lead\n      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n    }\n\n    leadSurrogate = null\n\n    // encode utf8\n    if (codePoint < 0x80) {\n      if ((units -= 1) < 0) break\n      bytes.push(codePoint)\n    } else if (codePoint < 0x800) {\n      if ((units -= 2) < 0) break\n      bytes.push(\n        codePoint >> 0x6 | 0xC0,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x10000) {\n      if ((units -= 3) < 0) break\n      bytes.push(\n        codePoint >> 0xC | 0xE0,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x110000) {\n      if ((units -= 4) < 0) break\n      bytes.push(\n        codePoint >> 0x12 | 0xF0,\n        codePoint >> 0xC & 0x3F | 0x80,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else {\n      throw new Error('Invalid code point')\n    }\n  }\n\n  return bytes\n}\n\nfunction asciiToBytes (str) {\n  var byteArray = []\n  for (var i = 0; i < str.length; ++i) {\n    // Node's code seems to be doing this and not & 0x7F..\n    byteArray.push(str.charCodeAt(i) & 0xFF)\n  }\n  return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n  var c, hi, lo\n  var byteArray = []\n  for (var i = 0; i < str.length; ++i) {\n    if ((units -= 2) < 0) break\n\n    c = str.charCodeAt(i)\n    hi = c >> 8\n    lo = c % 256\n    byteArray.push(lo)\n    byteArray.push(hi)\n  }\n\n  return byteArray\n}\n\nfunction base64ToBytes (str) {\n  return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n  for (var i = 0; i < length; ++i) {\n    if ((i + offset >= dst.length) || (i >= src.length)) break\n    dst[i + offset] = src[i]\n  }\n  return i\n}\n\nfunction isnan (val) {\n  return val !== val // eslint-disable-line no-self-compare\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\n\nfunction isArray(arg) {\n  if (Array.isArray) {\n    return Array.isArray(arg);\n  }\n  return objectToString(arg) === '[object Array]';\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n  return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n  return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n  return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n  return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n  return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n  return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n  return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n  return objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n  return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n  return objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n  return (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n  return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n  return arg === null ||\n         typeof arg === 'boolean' ||\n         typeof arg === 'number' ||\n         typeof arg === 'string' ||\n         typeof arg === 'symbol' ||  // ES6 symbol\n         typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = Buffer.isBuffer;\n\nfunction objectToString(o) {\n  return Object.prototype.toString.call(o);\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nfunction EventEmitter() {\n  this._events = this._events || {};\n  this._maxListeners = this._maxListeners || undefined;\n}\nmodule.exports = EventEmitter;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nEventEmitter.defaultMaxListeners = 10;\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function(n) {\n  if (!isNumber(n) || n < 0 || isNaN(n))\n    throw TypeError('n must be a positive number');\n  this._maxListeners = n;\n  return this;\n};\n\nEventEmitter.prototype.emit = function(type) {\n  var er, handler, len, args, i, listeners;\n\n  if (!this._events)\n    this._events = {};\n\n  // If there is no 'error' event listener then throw.\n  if (type === 'error') {\n    if (!this._events.error ||\n        (isObject(this._events.error) && !this._events.error.length)) {\n      er = arguments[1];\n      if (er instanceof Error) {\n        throw er; // Unhandled 'error' event\n      } else {\n        // At least give some kind of context to the user\n        var err = new Error('Uncaught, unspecified \"error\" event. (' + er + ')');\n        err.context = er;\n        throw err;\n      }\n    }\n  }\n\n  handler = this._events[type];\n\n  if (isUndefined(handler))\n    return false;\n\n  if (isFunction(handler)) {\n    switch (arguments.length) {\n      // fast cases\n      case 1:\n        handler.call(this);\n        break;\n      case 2:\n        handler.call(this, arguments[1]);\n        break;\n      case 3:\n        handler.call(this, arguments[1], arguments[2]);\n        break;\n      // slower\n      default:\n        args = Array.prototype.slice.call(arguments, 1);\n        handler.apply(this, args);\n    }\n  } else if (isObject(handler)) {\n    args = Array.prototype.slice.call(arguments, 1);\n    listeners = handler.slice();\n    len = listeners.length;\n    for (i = 0; i < len; i++)\n      listeners[i].apply(this, args);\n  }\n\n  return true;\n};\n\nEventEmitter.prototype.addListener = function(type, listener) {\n  var m;\n\n  if (!isFunction(listener))\n    throw TypeError('listener must be a function');\n\n  if (!this._events)\n    this._events = {};\n\n  // To avoid recursion in the case that type === \"newListener\"! Before\n  // adding it to the listeners, first emit \"newListener\".\n  if (this._events.newListener)\n    this.emit('newListener', type,\n              isFunction(listener.listener) ?\n              listener.listener : listener);\n\n  if (!this._events[type])\n    // Optimize the case of one listener. Don't need the extra array object.\n    this._events[type] = listener;\n  else if (isObject(this._events[type]))\n    // If we've already got an array, just append.\n    this._events[type].push(listener);\n  else\n    // Adding the second element, need to change to array.\n    this._events[type] = [this._events[type], listener];\n\n  // Check for listener leak\n  if (isObject(this._events[type]) && !this._events[type].warned) {\n    if (!isUndefined(this._maxListeners)) {\n      m = this._maxListeners;\n    } else {\n      m = EventEmitter.defaultMaxListeners;\n    }\n\n    if (m && m > 0 && this._events[type].length > m) {\n      this._events[type].warned = true;\n      console.error('(node) warning: possible EventEmitter memory ' +\n                    'leak detected. %d listeners added. ' +\n                    'Use emitter.setMaxListeners() to increase limit.',\n                    this._events[type].length);\n      if (typeof console.trace === 'function') {\n        // not supported in IE 10\n        console.trace();\n      }\n    }\n  }\n\n  return this;\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.once = function(type, listener) {\n  if (!isFunction(listener))\n    throw TypeError('listener must be a function');\n\n  var fired = false;\n\n  function g() {\n    this.removeListener(type, g);\n\n    if (!fired) {\n      fired = true;\n      listener.apply(this, arguments);\n    }\n  }\n\n  g.listener = listener;\n  this.on(type, g);\n\n  return this;\n};\n\n// emits a 'removeListener' event iff the listener was removed\nEventEmitter.prototype.removeListener = function(type, listener) {\n  var list, position, length, i;\n\n  if (!isFunction(listener))\n    throw TypeError('listener must be a function');\n\n  if (!this._events || !this._events[type])\n    return this;\n\n  list = this._events[type];\n  length = list.length;\n  position = -1;\n\n  if (list === listener ||\n      (isFunction(list.listener) && list.listener === listener)) {\n    delete this._events[type];\n    if (this._events.removeListener)\n      this.emit('removeListener', type, listener);\n\n  } else if (isObject(list)) {\n    for (i = length; i-- > 0;) {\n      if (list[i] === listener ||\n          (list[i].listener && list[i].listener === listener)) {\n        position = i;\n        break;\n      }\n    }\n\n    if (position < 0)\n      return this;\n\n    if (list.length === 1) {\n      list.length = 0;\n      delete this._events[type];\n    } else {\n      list.splice(position, 1);\n    }\n\n    if (this._events.removeListener)\n      this.emit('removeListener', type, listener);\n  }\n\n  return this;\n};\n\nEventEmitter.prototype.removeAllListeners = function(type) {\n  var key, listeners;\n\n  if (!this._events)\n    return this;\n\n  // not listening for removeListener, no need to emit\n  if (!this._events.removeListener) {\n    if (arguments.length === 0)\n      this._events = {};\n    else if (this._events[type])\n      delete this._events[type];\n    return this;\n  }\n\n  // emit removeListener for all listeners on all events\n  if (arguments.length === 0) {\n    for (key in this._events) {\n      if (key === 'removeListener') continue;\n      this.removeAllListeners(key);\n    }\n    this.removeAllListeners('removeListener');\n    this._events = {};\n    return this;\n  }\n\n  listeners = this._events[type];\n\n  if (isFunction(listeners)) {\n    this.removeListener(type, listeners);\n  } else if (listeners) {\n    // LIFO order\n    while (listeners.length)\n      this.removeListener(type, listeners[listeners.length - 1]);\n  }\n  delete this._events[type];\n\n  return this;\n};\n\nEventEmitter.prototype.listeners = function(type) {\n  var ret;\n  if (!this._events || !this._events[type])\n    ret = [];\n  else if (isFunction(this._events[type]))\n    ret = [this._events[type]];\n  else\n    ret = this._events[type].slice();\n  return ret;\n};\n\nEventEmitter.prototype.listenerCount = function(type) {\n  if (this._events) {\n    var evlistener = this._events[type];\n\n    if (isFunction(evlistener))\n      return 1;\n    else if (evlistener)\n      return evlistener.length;\n  }\n  return 0;\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n  return emitter.listenerCount(type);\n};\n\nfunction isFunction(arg) {\n  return typeof arg === 'function';\n}\n\nfunction isNumber(arg) {\n  return typeof arg === 'number';\n}\n\nfunction isObject(arg) {\n  return typeof arg === 'object' && arg !== null;\n}\n\nfunction isUndefined(arg) {\n  return arg === void 0;\n}\n","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n  var e, m\n  var eLen = (nBytes * 8) - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var nBits = -7\n  var i = isLE ? (nBytes - 1) : 0\n  var d = isLE ? -1 : 1\n  var s = buffer[offset + i]\n\n  i += d\n\n  e = s & ((1 << (-nBits)) - 1)\n  s >>= (-nBits)\n  nBits += eLen\n  for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n  m = e & ((1 << (-nBits)) - 1)\n  e >>= (-nBits)\n  nBits += mLen\n  for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n  if (e === 0) {\n    e = 1 - eBias\n  } else if (e === eMax) {\n    return m ? NaN : ((s ? -1 : 1) * Infinity)\n  } else {\n    m = m + Math.pow(2, mLen)\n    e = e - eBias\n  }\n  return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n  var e, m, c\n  var eLen = (nBytes * 8) - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n  var i = isLE ? 0 : (nBytes - 1)\n  var d = isLE ? 1 : -1\n  var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n  value = Math.abs(value)\n\n  if (isNaN(value) || value === Infinity) {\n    m = isNaN(value) ? 1 : 0\n    e = eMax\n  } else {\n    e = Math.floor(Math.log(value) / Math.LN2)\n    if (value * (c = Math.pow(2, -e)) < 1) {\n      e--\n      c *= 2\n    }\n    if (e + eBias >= 1) {\n      value += rt / c\n    } else {\n      value += rt * Math.pow(2, 1 - eBias)\n    }\n    if (value * c >= 2) {\n      e++\n      c /= 2\n    }\n\n    if (e + eBias >= eMax) {\n      m = 0\n      e = eMax\n    } else if (e + eBias >= 1) {\n      m = ((value * c) - 1) * Math.pow(2, mLen)\n      e = e + eBias\n    } else {\n      m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n      e = 0\n    }\n  }\n\n  for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n  e = (e << mLen) | m\n  eLen += mLen\n  for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n  buffer[offset + i - d] |= s * 128\n}\n","if (typeof Object.create === 'function') {\n  // implementation from standard node.js 'util' module\n  module.exports = function inherits(ctor, superCtor) {\n    ctor.super_ = superCtor\n    ctor.prototype = Object.create(superCtor.prototype, {\n      constructor: {\n        value: ctor,\n        enumerable: false,\n        writable: true,\n        configurable: true\n      }\n    });\n  };\n} else {\n  // old school shim for old browsers\n  module.exports = function inherits(ctor, superCtor) {\n    ctor.super_ = superCtor\n    var TempCtor = function () {}\n    TempCtor.prototype = superCtor.prototype\n    ctor.prototype = new TempCtor()\n    ctor.prototype.constructor = ctor\n  }\n}\n","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n  return toString.call(arr) == '[object Array]';\n};\n","'use strict';\n\nif (!process.version ||\n    process.version.indexOf('v0.') === 0 ||\n    process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {\n  module.exports = { nextTick: nextTick };\n} else {\n  module.exports = process\n}\n\nfunction nextTick(fn, arg1, arg2, arg3) {\n  if (typeof fn !== 'function') {\n    throw new TypeError('\"callback\" argument must be a function');\n  }\n  var len = arguments.length;\n  var args, i;\n  switch (len) {\n  case 0:\n  case 1:\n    return process.nextTick(fn);\n  case 2:\n    return process.nextTick(function afterTickOne() {\n      fn.call(null, arg1);\n    });\n  case 3:\n    return process.nextTick(function afterTickTwo() {\n      fn.call(null, arg1, arg2);\n    });\n  case 4:\n    return process.nextTick(function afterTickThree() {\n      fn.call(null, arg1, arg2, arg3);\n    });\n  default:\n    args = new Array(len - 1);\n    i = 0;\n    while (i < args.length) {\n      args[i++] = arguments[i];\n    }\n    return process.nextTick(function afterTick() {\n      fn.apply(null, args);\n    });\n  }\n}\n\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things.  But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals.  It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n    throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n    throw new Error('clearTimeout has not been defined');\n}\n(function () {\n    try {\n        if (typeof setTimeout === 'function') {\n            cachedSetTimeout = setTimeout;\n        } else {\n            cachedSetTimeout = defaultSetTimout;\n        }\n    } catch (e) {\n        cachedSetTimeout = defaultSetTimout;\n    }\n    try {\n        if (typeof clearTimeout === 'function') {\n            cachedClearTimeout = clearTimeout;\n        } else {\n            cachedClearTimeout = defaultClearTimeout;\n        }\n    } catch (e) {\n        cachedClearTimeout = defaultClearTimeout;\n    }\n} ())\nfunction runTimeout(fun) {\n    if (cachedSetTimeout === setTimeout) {\n        //normal enviroments in sane situations\n        return setTimeout(fun, 0);\n    }\n    // if setTimeout wasn't available but was latter defined\n    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n        cachedSetTimeout = setTimeout;\n        return setTimeout(fun, 0);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedSetTimeout(fun, 0);\n    } catch(e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n            return cachedSetTimeout.call(null, fun, 0);\n        } catch(e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n            return cachedSetTimeout.call(this, fun, 0);\n        }\n    }\n\n\n}\nfunction runClearTimeout(marker) {\n    if (cachedClearTimeout === clearTimeout) {\n        //normal enviroments in sane situations\n        return clearTimeout(marker);\n    }\n    // if clearTimeout wasn't available but was latter defined\n    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n        cachedClearTimeout = clearTimeout;\n        return clearTimeout(marker);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedClearTimeout(marker);\n    } catch (e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally\n            return cachedClearTimeout.call(null, marker);\n        } catch (e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n            // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n            return cachedClearTimeout.call(this, marker);\n        }\n    }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n    if (!draining || !currentQueue) {\n        return;\n    }\n    draining = false;\n    if (currentQueue.length) {\n        queue = currentQueue.concat(queue);\n    } else {\n        queueIndex = -1;\n    }\n    if (queue.length) {\n        drainQueue();\n    }\n}\n\nfunction drainQueue() {\n    if (draining) {\n        return;\n    }\n    var timeout = runTimeout(cleanUpNextTick);\n    draining = true;\n\n    var len = queue.length;\n    while(len) {\n        currentQueue = queue;\n        queue = [];\n        while (++queueIndex < len) {\n            if (currentQueue) {\n                currentQueue[queueIndex].run();\n            }\n        }\n        queueIndex = -1;\n        len = queue.length;\n    }\n    currentQueue = null;\n    draining = false;\n    runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n    var args = new Array(arguments.length - 1);\n    if (arguments.length > 1) {\n        for (var i = 1; i < arguments.length; i++) {\n            args[i - 1] = arguments[i];\n        }\n    }\n    queue.push(new Item(fun, args));\n    if (queue.length === 1 && !draining) {\n        runTimeout(drainQueue);\n    }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n    this.fun = fun;\n    this.array = array;\n}\nItem.prototype.run = function () {\n    this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n    throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n    throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","module.exports = require('./lib/_stream_duplex.js');\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n\n'use strict';\n\n/*<replacement>*/\n\nvar pna = require('process-nextick-args');\n/*</replacement>*/\n\n/*<replacement>*/\nvar objectKeys = Object.keys || function (obj) {\n  var keys = [];\n  for (var key in obj) {\n    keys.push(key);\n  }return keys;\n};\n/*</replacement>*/\n\nmodule.exports = Duplex;\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\nvar Readable = require('./_stream_readable');\nvar Writable = require('./_stream_writable');\n\nutil.inherits(Duplex, Readable);\n\n{\n  // avoid scope creep, the keys array can then be collected\n  var keys = objectKeys(Writable.prototype);\n  for (var v = 0; v < keys.length; v++) {\n    var method = keys[v];\n    if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n  }\n}\n\nfunction Duplex(options) {\n  if (!(this instanceof Duplex)) return new Duplex(options);\n\n  Readable.call(this, options);\n  Writable.call(this, options);\n\n  if (options && options.readable === false) this.readable = false;\n\n  if (options && options.writable === false) this.writable = false;\n\n  this.allowHalfOpen = true;\n  if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;\n\n  this.once('end', onend);\n}\n\nObject.defineProperty(Duplex.prototype, 'writableHighWaterMark', {\n  // making it explicit this property is not enumerable\n  // because otherwise some prototype manipulation in\n  // userland will fail\n  enumerable: false,\n  get: function () {\n    return this._writableState.highWaterMark;\n  }\n});\n\n// the no-half-open enforcer\nfunction onend() {\n  // if we allow half-open state, or if the writable side ended,\n  // then we're ok.\n  if (this.allowHalfOpen || this._writableState.ended) return;\n\n  // no more data can be written.\n  // But allow more writes to happen in this tick.\n  pna.nextTick(onEndNT, this);\n}\n\nfunction onEndNT(self) {\n  self.end();\n}\n\nObject.defineProperty(Duplex.prototype, 'destroyed', {\n  get: function () {\n    if (this._readableState === undefined || this._writableState === undefined) {\n      return false;\n    }\n    return this._readableState.destroyed && this._writableState.destroyed;\n  },\n  set: function (value) {\n    // we ignore the value if the stream\n    // has not been initialized yet\n    if (this._readableState === undefined || this._writableState === undefined) {\n      return;\n    }\n\n    // backward compatibility, the user is explicitly\n    // managing destroyed\n    this._readableState.destroyed = value;\n    this._writableState.destroyed = value;\n  }\n});\n\nDuplex.prototype._destroy = function (err, cb) {\n  this.push(null);\n  this.end();\n\n  pna.nextTick(cb, err);\n};","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a passthrough stream.\n// basically just the most minimal sort of Transform stream.\n// Every written chunk gets output as-is.\n\n'use strict';\n\nmodule.exports = PassThrough;\n\nvar Transform = require('./_stream_transform');\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\nutil.inherits(PassThrough, Transform);\n\nfunction PassThrough(options) {\n  if (!(this instanceof PassThrough)) return new PassThrough(options);\n\n  Transform.call(this, options);\n}\n\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n  cb(null, chunk);\n};","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n/*<replacement>*/\n\nvar pna = require('process-nextick-args');\n/*</replacement>*/\n\nmodule.exports = Readable;\n\n/*<replacement>*/\nvar isArray = require('isarray');\n/*</replacement>*/\n\n/*<replacement>*/\nvar Duplex;\n/*</replacement>*/\n\nReadable.ReadableState = ReadableState;\n\n/*<replacement>*/\nvar EE = require('events').EventEmitter;\n\nvar EElistenerCount = function (emitter, type) {\n  return emitter.listeners(type).length;\n};\n/*</replacement>*/\n\n/*<replacement>*/\nvar Stream = require('./internal/streams/stream');\n/*</replacement>*/\n\n/*<replacement>*/\n\nvar Buffer = require('safe-buffer').Buffer;\nvar OurUint8Array = global.Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n  return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n  return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/*</replacement>*/\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\n/*<replacement>*/\nvar debugUtil = require('util');\nvar debug = void 0;\nif (debugUtil && debugUtil.debuglog) {\n  debug = debugUtil.debuglog('stream');\n} else {\n  debug = function () {};\n}\n/*</replacement>*/\n\nvar BufferList = require('./internal/streams/BufferList');\nvar destroyImpl = require('./internal/streams/destroy');\nvar StringDecoder;\n\nutil.inherits(Readable, Stream);\n\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\n\nfunction prependListener(emitter, event, fn) {\n  // Sadly this is not cacheable as some libraries bundle their own\n  // event emitter implementation with them.\n  if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);\n\n  // This is a hack to make sure that our error handler is attached before any\n  // userland ones.  NEVER DO THIS. This is here only because this code needs\n  // to continue to work with older versions of Node.js that do not include\n  // the prependListener() method. The goal is to eventually remove this hack.\n  if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n}\n\nfunction ReadableState(options, stream) {\n  Duplex = Duplex || require('./_stream_duplex');\n\n  options = options || {};\n\n  // Duplex streams are both readable and writable, but share\n  // the same options object.\n  // However, some cases require setting options to different\n  // values for the readable and the writable sides of the duplex stream.\n  // These options can be provided separately as readableXXX and writableXXX.\n  var isDuplex = stream instanceof Duplex;\n\n  // object stream flag. Used to make read(n) ignore n and to\n  // make all the buffer merging and length checks go away\n  this.objectMode = !!options.objectMode;\n\n  if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n  // the point at which it stops calling _read() to fill the buffer\n  // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n  var hwm = options.highWaterMark;\n  var readableHwm = options.readableHighWaterMark;\n  var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n\n  if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;\n\n  // cast to ints.\n  this.highWaterMark = Math.floor(this.highWaterMark);\n\n  // A linked list is used to store data chunks instead of an array because the\n  // linked list can remove elements from the beginning faster than\n  // array.shift()\n  this.buffer = new BufferList();\n  this.length = 0;\n  this.pipes = null;\n  this.pipesCount = 0;\n  this.flowing = null;\n  this.ended = false;\n  this.endEmitted = false;\n  this.reading = false;\n\n  // a flag to be able to tell if the event 'readable'/'data' is emitted\n  // immediately, or on a later tick.  We set this to true at first, because\n  // any actions that shouldn't happen until \"later\" should generally also\n  // not happen before the first read call.\n  this.sync = true;\n\n  // whenever we return null, then we set a flag to say\n  // that we're awaiting a 'readable' event emission.\n  this.needReadable = false;\n  this.emittedReadable = false;\n  this.readableListening = false;\n  this.resumeScheduled = false;\n\n  // has it been destroyed\n  this.destroyed = false;\n\n  // Crypto is kind of old and crusty.  Historically, its default string\n  // encoding is 'binary' so we have to make this configurable.\n  // Everything else in the universe uses 'utf8', though.\n  this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n  // the number of writers that are awaiting a drain event in .pipe()s\n  this.awaitDrain = 0;\n\n  // if true, a maybeReadMore has been scheduled\n  this.readingMore = false;\n\n  this.decoder = null;\n  this.encoding = null;\n  if (options.encoding) {\n    if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n    this.decoder = new StringDecoder(options.encoding);\n    this.encoding = options.encoding;\n  }\n}\n\nfunction Readable(options) {\n  Duplex = Duplex || require('./_stream_duplex');\n\n  if (!(this instanceof Readable)) return new Readable(options);\n\n  this._readableState = new ReadableState(options, this);\n\n  // legacy\n  this.readable = true;\n\n  if (options) {\n    if (typeof options.read === 'function') this._read = options.read;\n\n    if (typeof options.destroy === 'function') this._destroy = options.destroy;\n  }\n\n  Stream.call(this);\n}\n\nObject.defineProperty(Readable.prototype, 'destroyed', {\n  get: function () {\n    if (this._readableState === undefined) {\n      return false;\n    }\n    return this._readableState.destroyed;\n  },\n  set: function (value) {\n    // we ignore the value if the stream\n    // has not been initialized yet\n    if (!this._readableState) {\n      return;\n    }\n\n    // backward compatibility, the user is explicitly\n    // managing destroyed\n    this._readableState.destroyed = value;\n  }\n});\n\nReadable.prototype.destroy = destroyImpl.destroy;\nReadable.prototype._undestroy = destroyImpl.undestroy;\nReadable.prototype._destroy = function (err, cb) {\n  this.push(null);\n  cb(err);\n};\n\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function (chunk, encoding) {\n  var state = this._readableState;\n  var skipChunkCheck;\n\n  if (!state.objectMode) {\n    if (typeof chunk === 'string') {\n      encoding = encoding || state.defaultEncoding;\n      if (encoding !== state.encoding) {\n        chunk = Buffer.from(chunk, encoding);\n        encoding = '';\n      }\n      skipChunkCheck = true;\n    }\n  } else {\n    skipChunkCheck = true;\n  }\n\n  return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n};\n\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function (chunk) {\n  return readableAddChunk(this, chunk, null, true, false);\n};\n\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n  var state = stream._readableState;\n  if (chunk === null) {\n    state.reading = false;\n    onEofChunk(stream, state);\n  } else {\n    var er;\n    if (!skipChunkCheck) er = chunkInvalid(state, chunk);\n    if (er) {\n      stream.emit('error', er);\n    } else if (state.objectMode || chunk && chunk.length > 0) {\n      if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\n        chunk = _uint8ArrayToBuffer(chunk);\n      }\n\n      if (addToFront) {\n        if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);\n      } else if (state.ended) {\n        stream.emit('error', new Error('stream.push() after EOF'));\n      } else {\n        state.reading = false;\n        if (state.decoder && !encoding) {\n          chunk = state.decoder.write(chunk);\n          if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\n        } else {\n          addChunk(stream, state, chunk, false);\n        }\n      }\n    } else if (!addToFront) {\n      state.reading = false;\n    }\n  }\n\n  return needMoreData(state);\n}\n\nfunction addChunk(stream, state, chunk, addToFront) {\n  if (state.flowing && state.length === 0 && !state.sync) {\n    stream.emit('data', chunk);\n    stream.read(0);\n  } else {\n    // update the buffer info.\n    state.length += state.objectMode ? 1 : chunk.length;\n    if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n\n    if (state.needReadable) emitReadable(stream);\n  }\n  maybeReadMore(stream, state);\n}\n\nfunction chunkInvalid(state, chunk) {\n  var er;\n  if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n    er = new TypeError('Invalid non-string/buffer chunk');\n  }\n  return er;\n}\n\n// if it's past the high water mark, we can push in some more.\n// Also, if we have no data yet, we can stand some\n// more bytes.  This is to work around cases where hwm=0,\n// such as the repl.  Also, if the push() triggered a\n// readable event, and the user called read(largeNumber) such that\n// needReadable was set, then we ought to push more, so that another\n// 'readable' event will be triggered.\nfunction needMoreData(state) {\n  return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}\n\nReadable.prototype.isPaused = function () {\n  return this._readableState.flowing === false;\n};\n\n// backwards compatibility.\nReadable.prototype.setEncoding = function (enc) {\n  if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n  this._readableState.decoder = new StringDecoder(enc);\n  this._readableState.encoding = enc;\n  return this;\n};\n\n// Don't raise the hwm > 8MB\nvar MAX_HWM = 0x800000;\nfunction computeNewHighWaterMark(n) {\n  if (n >= MAX_HWM) {\n    n = MAX_HWM;\n  } else {\n    // Get the next highest power of 2 to prevent increasing hwm excessively in\n    // tiny amounts\n    n--;\n    n |= n >>> 1;\n    n |= n >>> 2;\n    n |= n >>> 4;\n    n |= n >>> 8;\n    n |= n >>> 16;\n    n++;\n  }\n  return n;\n}\n\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction howMuchToRead(n, state) {\n  if (n <= 0 || state.length === 0 && state.ended) return 0;\n  if (state.objectMode) return 1;\n  if (n !== n) {\n    // Only flow one buffer at a time\n    if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n  }\n  // If we're asking for more than the current hwm, then raise the hwm.\n  if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n  if (n <= state.length) return n;\n  // Don't have enough\n  if (!state.ended) {\n    state.needReadable = true;\n    return 0;\n  }\n  return state.length;\n}\n\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function (n) {\n  debug('read', n);\n  n = parseInt(n, 10);\n  var state = this._readableState;\n  var nOrig = n;\n\n  if (n !== 0) state.emittedReadable = false;\n\n  // if we're doing read(0) to trigger a readable event, but we\n  // already have a bunch of data in the buffer, then just trigger\n  // the 'readable' event and move on.\n  if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {\n    debug('read: emitReadable', state.length, state.ended);\n    if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n    return null;\n  }\n\n  n = howMuchToRead(n, state);\n\n  // if we've ended, and we're now clear, then finish it up.\n  if (n === 0 && state.ended) {\n    if (state.length === 0) endReadable(this);\n    return null;\n  }\n\n  // All the actual chunk generation logic needs to be\n  // *below* the call to _read.  The reason is that in certain\n  // synthetic stream cases, such as passthrough streams, _read\n  // may be a completely synchronous operation which may change\n  // the state of the read buffer, providing enough data when\n  // before there was *not* enough.\n  //\n  // So, the steps are:\n  // 1. Figure out what the state of things will be after we do\n  // a read from the buffer.\n  //\n  // 2. If that resulting state will trigger a _read, then call _read.\n  // Note that this may be asynchronous, or synchronous.  Yes, it is\n  // deeply ugly to write APIs this way, but that still doesn't mean\n  // that the Readable class should behave improperly, as streams are\n  // designed to be sync/async agnostic.\n  // Take note if the _read call is sync or async (ie, if the read call\n  // has returned yet), so that we know whether or not it's safe to emit\n  // 'readable' etc.\n  //\n  // 3. Actually pull the requested chunks out of the buffer and return.\n\n  // if we need a readable event, then we need to do some reading.\n  var doRead = state.needReadable;\n  debug('need readable', doRead);\n\n  // if we currently have less than the highWaterMark, then also read some\n  if (state.length === 0 || state.length - n < state.highWaterMark) {\n    doRead = true;\n    debug('length less than watermark', doRead);\n  }\n\n  // however, if we've ended, then there's no point, and if we're already\n  // reading, then it's unnecessary.\n  if (state.ended || state.reading) {\n    doRead = false;\n    debug('reading or ended', doRead);\n  } else if (doRead) {\n    debug('do read');\n    state.reading = true;\n    state.sync = true;\n    // if the length is currently zero, then we *need* a readable event.\n    if (state.length === 0) state.needReadable = true;\n    // call internal read method\n    this._read(state.highWaterMark);\n    state.sync = false;\n    // If _read pushed data synchronously, then `reading` will be false,\n    // and we need to re-evaluate how much data we can return to the user.\n    if (!state.reading) n = howMuchToRead(nOrig, state);\n  }\n\n  var ret;\n  if (n > 0) ret = fromList(n, state);else ret = null;\n\n  if (ret === null) {\n    state.needReadable = true;\n    n = 0;\n  } else {\n    state.length -= n;\n  }\n\n  if (state.length === 0) {\n    // If we have nothing in the buffer, then we want to know\n    // as soon as we *do* get something into the buffer.\n    if (!state.ended) state.needReadable = true;\n\n    // If we tried to read() past the EOF, then emit end on the next tick.\n    if (nOrig !== n && state.ended) endReadable(this);\n  }\n\n  if (ret !== null) this.emit('data', ret);\n\n  return ret;\n};\n\nfunction onEofChunk(stream, state) {\n  if (state.ended) return;\n  if (state.decoder) {\n    var chunk = state.decoder.end();\n    if (chunk && chunk.length) {\n      state.buffer.push(chunk);\n      state.length += state.objectMode ? 1 : chunk.length;\n    }\n  }\n  state.ended = true;\n\n  // emit 'readable' now to make sure it gets picked up.\n  emitReadable(stream);\n}\n\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow.  This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n  var state = stream._readableState;\n  state.needReadable = false;\n  if (!state.emittedReadable) {\n    debug('emitReadable', state.flowing);\n    state.emittedReadable = true;\n    if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);\n  }\n}\n\nfunction emitReadable_(stream) {\n  debug('emit readable');\n  stream.emit('readable');\n  flow(stream);\n}\n\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data.  that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n  if (!state.readingMore) {\n    state.readingMore = true;\n    pna.nextTick(maybeReadMore_, stream, state);\n  }\n}\n\nfunction maybeReadMore_(stream, state) {\n  var len = state.length;\n  while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {\n    debug('maybeReadMore read 0');\n    stream.read(0);\n    if (len === state.length)\n      // didn't get any data, stop spinning.\n      break;else len = state.length;\n  }\n  state.readingMore = false;\n}\n\n// abstract method.  to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function (n) {\n  this.emit('error', new Error('_read() is not implemented'));\n};\n\nReadable.prototype.pipe = function (dest, pipeOpts) {\n  var src = this;\n  var state = this._readableState;\n\n  switch (state.pipesCount) {\n    case 0:\n      state.pipes = dest;\n      break;\n    case 1:\n      state.pipes = [state.pipes, dest];\n      break;\n    default:\n      state.pipes.push(dest);\n      break;\n  }\n  state.pipesCount += 1;\n  debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n\n  var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n\n  var endFn = doEnd ? onend : unpipe;\n  if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);\n\n  dest.on('unpipe', onunpipe);\n  function onunpipe(readable, unpipeInfo) {\n    debug('onunpipe');\n    if (readable === src) {\n      if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n        unpipeInfo.hasUnpiped = true;\n        cleanup();\n      }\n    }\n  }\n\n  function onend() {\n    debug('onend');\n    dest.end();\n  }\n\n  // when the dest drains, it reduces the awaitDrain counter\n  // on the source.  This would be more elegant with a .once()\n  // handler in flow(), but adding and removing repeatedly is\n  // too slow.\n  var ondrain = pipeOnDrain(src);\n  dest.on('drain', ondrain);\n\n  var cleanedUp = false;\n  function cleanup() {\n    debug('cleanup');\n    // cleanup event handlers once the pipe is broken\n    dest.removeListener('close', onclose);\n    dest.removeListener('finish', onfinish);\n    dest.removeListener('drain', ondrain);\n    dest.removeListener('error', onerror);\n    dest.removeListener('unpipe', onunpipe);\n    src.removeListener('end', onend);\n    src.removeListener('end', unpipe);\n    src.removeListener('data', ondata);\n\n    cleanedUp = true;\n\n    // if the reader is waiting for a drain event from this\n    // specific writer, then it would cause it to never start\n    // flowing again.\n    // So, if this is awaiting a drain, then we just call it now.\n    // If we don't know, then assume that we are waiting for one.\n    if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n  }\n\n  // If the user pushes more data while we're writing to dest then we'll end up\n  // in ondata again. However, we only want to increase awaitDrain once because\n  // dest will only emit one 'drain' event for the multiple writes.\n  // => Introduce a guard on increasing awaitDrain.\n  var increasedAwaitDrain = false;\n  src.on('data', ondata);\n  function ondata(chunk) {\n    debug('ondata');\n    increasedAwaitDrain = false;\n    var ret = dest.write(chunk);\n    if (false === ret && !increasedAwaitDrain) {\n      // If the user unpiped during `dest.write()`, it is possible\n      // to get stuck in a permanently paused state if that write\n      // also returned false.\n      // => Check whether `dest` is still a piping destination.\n      if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n        debug('false write response, pause', src._readableState.awaitDrain);\n        src._readableState.awaitDrain++;\n        increasedAwaitDrain = true;\n      }\n      src.pause();\n    }\n  }\n\n  // if the dest has an error, then stop piping into it.\n  // however, don't suppress the throwing behavior for this.\n  function onerror(er) {\n    debug('onerror', er);\n    unpipe();\n    dest.removeListener('error', onerror);\n    if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);\n  }\n\n  // Make sure our error handler is attached before userland ones.\n  prependListener(dest, 'error', onerror);\n\n  // Both close and finish should trigger unpipe, but only once.\n  function onclose() {\n    dest.removeListener('finish', onfinish);\n    unpipe();\n  }\n  dest.once('close', onclose);\n  function onfinish() {\n    debug('onfinish');\n    dest.removeListener('close', onclose);\n    unpipe();\n  }\n  dest.once('finish', onfinish);\n\n  function unpipe() {\n    debug('unpipe');\n    src.unpipe(dest);\n  }\n\n  // tell the dest that it's being piped to\n  dest.emit('pipe', src);\n\n  // start the flow if it hasn't been started already.\n  if (!state.flowing) {\n    debug('pipe resume');\n    src.resume();\n  }\n\n  return dest;\n};\n\nfunction pipeOnDrain(src) {\n  return function () {\n    var state = src._readableState;\n    debug('pipeOnDrain', state.awaitDrain);\n    if (state.awaitDrain) state.awaitDrain--;\n    if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n      state.flowing = true;\n      flow(src);\n    }\n  };\n}\n\nReadable.prototype.unpipe = function (dest) {\n  var state = this._readableState;\n  var unpipeInfo = { hasUnpiped: false };\n\n  // if we're not piping anywhere, then do nothing.\n  if (state.pipesCount === 0) return this;\n\n  // just one destination.  most common case.\n  if (state.pipesCount === 1) {\n    // passed in one, but it's not the right one.\n    if (dest && dest !== state.pipes) return this;\n\n    if (!dest) dest = state.pipes;\n\n    // got a match.\n    state.pipes = null;\n    state.pipesCount = 0;\n    state.flowing = false;\n    if (dest) dest.emit('unpipe', this, unpipeInfo);\n    return this;\n  }\n\n  // slow case. multiple pipe destinations.\n\n  if (!dest) {\n    // remove all.\n    var dests = state.pipes;\n    var len = state.pipesCount;\n    state.pipes = null;\n    state.pipesCount = 0;\n    state.flowing = false;\n\n    for (var i = 0; i < len; i++) {\n      dests[i].emit('unpipe', this, unpipeInfo);\n    }return this;\n  }\n\n  // try to find the right one.\n  var index = indexOf(state.pipes, dest);\n  if (index === -1) return this;\n\n  state.pipes.splice(index, 1);\n  state.pipesCount -= 1;\n  if (state.pipesCount === 1) state.pipes = state.pipes[0];\n\n  dest.emit('unpipe', this, unpipeInfo);\n\n  return this;\n};\n\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function (ev, fn) {\n  var res = Stream.prototype.on.call(this, ev, fn);\n\n  if (ev === 'data') {\n    // Start flowing on next tick if stream isn't explicitly paused\n    if (this._readableState.flowing !== false) this.resume();\n  } else if (ev === 'readable') {\n    var state = this._readableState;\n    if (!state.endEmitted && !state.readableListening) {\n      state.readableListening = state.needReadable = true;\n      state.emittedReadable = false;\n      if (!state.reading) {\n        pna.nextTick(nReadingNextTick, this);\n      } else if (state.length) {\n        emitReadable(this);\n      }\n    }\n  }\n\n  return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\n\nfunction nReadingNextTick(self) {\n  debug('readable nexttick read 0');\n  self.read(0);\n}\n\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function () {\n  var state = this._readableState;\n  if (!state.flowing) {\n    debug('resume');\n    state.flowing = true;\n    resume(this, state);\n  }\n  return this;\n};\n\nfunction resume(stream, state) {\n  if (!state.resumeScheduled) {\n    state.resumeScheduled = true;\n    pna.nextTick(resume_, stream, state);\n  }\n}\n\nfunction resume_(stream, state) {\n  if (!state.reading) {\n    debug('resume read 0');\n    stream.read(0);\n  }\n\n  state.resumeScheduled = false;\n  state.awaitDrain = 0;\n  stream.emit('resume');\n  flow(stream);\n  if (state.flowing && !state.reading) stream.read(0);\n}\n\nReadable.prototype.pause = function () {\n  debug('call pause flowing=%j', this._readableState.flowing);\n  if (false !== this._readableState.flowing) {\n    debug('pause');\n    this._readableState.flowing = false;\n    this.emit('pause');\n  }\n  return this;\n};\n\nfunction flow(stream) {\n  var state = stream._readableState;\n  debug('flow', state.flowing);\n  while (state.flowing && stream.read() !== null) {}\n}\n\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function (stream) {\n  var _this = this;\n\n  var state = this._readableState;\n  var paused = false;\n\n  stream.on('end', function () {\n    debug('wrapped end');\n    if (state.decoder && !state.ended) {\n      var chunk = state.decoder.end();\n      if (chunk && chunk.length) _this.push(chunk);\n    }\n\n    _this.push(null);\n  });\n\n  stream.on('data', function (chunk) {\n    debug('wrapped data');\n    if (state.decoder) chunk = state.decoder.write(chunk);\n\n    // don't skip over falsy values in objectMode\n    if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n\n    var ret = _this.push(chunk);\n    if (!ret) {\n      paused = true;\n      stream.pause();\n    }\n  });\n\n  // proxy all the other methods.\n  // important when wrapping filters and duplexes.\n  for (var i in stream) {\n    if (this[i] === undefined && typeof stream[i] === 'function') {\n      this[i] = function (method) {\n        return function () {\n          return stream[method].apply(stream, arguments);\n        };\n      }(i);\n    }\n  }\n\n  // proxy certain important events.\n  for (var n = 0; n < kProxyEvents.length; n++) {\n    stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n  }\n\n  // when we try to consume some more bytes, simply unpause the\n  // underlying stream.\n  this._read = function (n) {\n    debug('wrapped _read', n);\n    if (paused) {\n      paused = false;\n      stream.resume();\n    }\n  };\n\n  return this;\n};\n\nObject.defineProperty(Readable.prototype, 'readableHighWaterMark', {\n  // making it explicit this property is not enumerable\n  // because otherwise some prototype manipulation in\n  // userland will fail\n  enumerable: false,\n  get: function () {\n    return this._readableState.highWaterMark;\n  }\n});\n\n// exposed for testing purposes only.\nReadable._fromList = fromList;\n\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromList(n, state) {\n  // nothing buffered\n  if (state.length === 0) return null;\n\n  var ret;\n  if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n    // read it all, truncate the list\n    if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);\n    state.buffer.clear();\n  } else {\n    // read part of list\n    ret = fromListPartial(n, state.buffer, state.decoder);\n  }\n\n  return ret;\n}\n\n// Extracts only enough buffered data to satisfy the amount requested.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromListPartial(n, list, hasStrings) {\n  var ret;\n  if (n < list.head.data.length) {\n    // slice is the same for buffers and strings\n    ret = list.head.data.slice(0, n);\n    list.head.data = list.head.data.slice(n);\n  } else if (n === list.head.data.length) {\n    // first chunk is a perfect match\n    ret = list.shift();\n  } else {\n    // result spans more than one buffer\n    ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);\n  }\n  return ret;\n}\n\n// Copies a specified amount of characters from the list of buffered data\n// chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBufferString(n, list) {\n  var p = list.head;\n  var c = 1;\n  var ret = p.data;\n  n -= ret.length;\n  while (p = p.next) {\n    var str = p.data;\n    var nb = n > str.length ? str.length : n;\n    if (nb === str.length) ret += str;else ret += str.slice(0, n);\n    n -= nb;\n    if (n === 0) {\n      if (nb === str.length) {\n        ++c;\n        if (p.next) list.head = p.next;else list.head = list.tail = null;\n      } else {\n        list.head = p;\n        p.data = str.slice(nb);\n      }\n      break;\n    }\n    ++c;\n  }\n  list.length -= c;\n  return ret;\n}\n\n// Copies a specified amount of bytes from the list of buffered data chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBuffer(n, list) {\n  var ret = Buffer.allocUnsafe(n);\n  var p = list.head;\n  var c = 1;\n  p.data.copy(ret);\n  n -= p.data.length;\n  while (p = p.next) {\n    var buf = p.data;\n    var nb = n > buf.length ? buf.length : n;\n    buf.copy(ret, ret.length - n, 0, nb);\n    n -= nb;\n    if (n === 0) {\n      if (nb === buf.length) {\n        ++c;\n        if (p.next) list.head = p.next;else list.head = list.tail = null;\n      } else {\n        list.head = p;\n        p.data = buf.slice(nb);\n      }\n      break;\n    }\n    ++c;\n  }\n  list.length -= c;\n  return ret;\n}\n\nfunction endReadable(stream) {\n  var state = stream._readableState;\n\n  // If we get here before consuming all the bytes, then that is a\n  // bug in node.  Should never happen.\n  if (state.length > 0) throw new Error('\"endReadable()\" called on non-empty stream');\n\n  if (!state.endEmitted) {\n    state.ended = true;\n    pna.nextTick(endReadableNT, state, stream);\n  }\n}\n\nfunction endReadableNT(state, stream) {\n  // Check that we didn't get one last unshift.\n  if (!state.endEmitted && state.length === 0) {\n    state.endEmitted = true;\n    stream.readable = false;\n    stream.emit('end');\n  }\n}\n\nfunction indexOf(xs, x) {\n  for (var i = 0, l = xs.length; i < l; i++) {\n    if (xs[i] === x) return i;\n  }\n  return -1;\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a transform stream is a readable/writable stream where you do\n// something with the data.  Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored.  (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation.  For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes.  When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up.  When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer.  When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks.  If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk.  However,\n// a pathological inflate type of transform can cause excessive buffering\n// here.  For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output.  Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output.  In this case, you could write a very small\n// amount of input, and end up with a very large amount of output.  In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform.  A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n\n'use strict';\n\nmodule.exports = Transform;\n\nvar Duplex = require('./_stream_duplex');\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\nutil.inherits(Transform, Duplex);\n\nfunction afterTransform(er, data) {\n  var ts = this._transformState;\n  ts.transforming = false;\n\n  var cb = ts.writecb;\n\n  if (!cb) {\n    return this.emit('error', new Error('write callback called multiple times'));\n  }\n\n  ts.writechunk = null;\n  ts.writecb = null;\n\n  if (data != null) // single equals check for both `null` and `undefined`\n    this.push(data);\n\n  cb(er);\n\n  var rs = this._readableState;\n  rs.reading = false;\n  if (rs.needReadable || rs.length < rs.highWaterMark) {\n    this._read(rs.highWaterMark);\n  }\n}\n\nfunction Transform(options) {\n  if (!(this instanceof Transform)) return new Transform(options);\n\n  Duplex.call(this, options);\n\n  this._transformState = {\n    afterTransform: afterTransform.bind(this),\n    needTransform: false,\n    transforming: false,\n    writecb: null,\n    writechunk: null,\n    writeencoding: null\n  };\n\n  // start out asking for a readable event once data is transformed.\n  this._readableState.needReadable = true;\n\n  // we have implemented the _read method, and done the other things\n  // that Readable wants before the first _read call, so unset the\n  // sync guard flag.\n  this._readableState.sync = false;\n\n  if (options) {\n    if (typeof options.transform === 'function') this._transform = options.transform;\n\n    if (typeof options.flush === 'function') this._flush = options.flush;\n  }\n\n  // When the writable side finishes, then flush out anything remaining.\n  this.on('prefinish', prefinish);\n}\n\nfunction prefinish() {\n  var _this = this;\n\n  if (typeof this._flush === 'function') {\n    this._flush(function (er, data) {\n      done(_this, er, data);\n    });\n  } else {\n    done(this, null, null);\n  }\n}\n\nTransform.prototype.push = function (chunk, encoding) {\n  this._transformState.needTransform = false;\n  return Duplex.prototype.push.call(this, chunk, encoding);\n};\n\n// This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side.  You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk.  If you pass\n// an error, then that'll put the hurt on the whole operation.  If you\n// never call cb(), then you'll never get another chunk.\nTransform.prototype._transform = function (chunk, encoding, cb) {\n  throw new Error('_transform() is not implemented');\n};\n\nTransform.prototype._write = function (chunk, encoding, cb) {\n  var ts = this._transformState;\n  ts.writecb = cb;\n  ts.writechunk = chunk;\n  ts.writeencoding = encoding;\n  if (!ts.transforming) {\n    var rs = this._readableState;\n    if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n  }\n};\n\n// Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\nTransform.prototype._read = function (n) {\n  var ts = this._transformState;\n\n  if (ts.writechunk !== null && ts.writecb && !ts.transforming) {\n    ts.transforming = true;\n    this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n  } else {\n    // mark that we need a transform, so that any data that comes in\n    // will get processed, now that we've asked for it.\n    ts.needTransform = true;\n  }\n};\n\nTransform.prototype._destroy = function (err, cb) {\n  var _this2 = this;\n\n  Duplex.prototype._destroy.call(this, err, function (err2) {\n    cb(err2);\n    _this2.emit('close');\n  });\n};\n\nfunction done(stream, er, data) {\n  if (er) return stream.emit('error', er);\n\n  if (data != null) // single equals check for both `null` and `undefined`\n    stream.push(data);\n\n  // if there's nothing in the write buffer, then that means\n  // that nothing more will ever be provided\n  if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');\n\n  if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');\n\n  return stream.push(null);\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n'use strict';\n\n/*<replacement>*/\n\nvar pna = require('process-nextick-args');\n/*</replacement>*/\n\nmodule.exports = Writable;\n\n/* <replacement> */\nfunction WriteReq(chunk, encoding, cb) {\n  this.chunk = chunk;\n  this.encoding = encoding;\n  this.callback = cb;\n  this.next = null;\n}\n\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n  var _this = this;\n\n  this.next = null;\n  this.entry = null;\n  this.finish = function () {\n    onCorkedFinish(_this, state);\n  };\n}\n/* </replacement> */\n\n/*<replacement>*/\nvar asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;\n/*</replacement>*/\n\n/*<replacement>*/\nvar Duplex;\n/*</replacement>*/\n\nWritable.WritableState = WritableState;\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\n/*<replacement>*/\nvar internalUtil = {\n  deprecate: require('util-deprecate')\n};\n/*</replacement>*/\n\n/*<replacement>*/\nvar Stream = require('./internal/streams/stream');\n/*</replacement>*/\n\n/*<replacement>*/\n\nvar Buffer = require('safe-buffer').Buffer;\nvar OurUint8Array = global.Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n  return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n  return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/*</replacement>*/\n\nvar destroyImpl = require('./internal/streams/destroy');\n\nutil.inherits(Writable, Stream);\n\nfunction nop() {}\n\nfunction WritableState(options, stream) {\n  Duplex = Duplex || require('./_stream_duplex');\n\n  options = options || {};\n\n  // Duplex streams are both readable and writable, but share\n  // the same options object.\n  // However, some cases require setting options to different\n  // values for the readable and the writable sides of the duplex stream.\n  // These options can be provided separately as readableXXX and writableXXX.\n  var isDuplex = stream instanceof Duplex;\n\n  // object stream flag to indicate whether or not this stream\n  // contains buffers or objects.\n  this.objectMode = !!options.objectMode;\n\n  if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n  // the point at which write() starts returning false\n  // Note: 0 is a valid value, means that we always return false if\n  // the entire buffer is not flushed immediately on write()\n  var hwm = options.highWaterMark;\n  var writableHwm = options.writableHighWaterMark;\n  var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n\n  if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;\n\n  // cast to ints.\n  this.highWaterMark = Math.floor(this.highWaterMark);\n\n  // if _final has been called\n  this.finalCalled = false;\n\n  // drain event flag.\n  this.needDrain = false;\n  // at the start of calling end()\n  this.ending = false;\n  // when end() has been called, and returned\n  this.ended = false;\n  // when 'finish' is emitted\n  this.finished = false;\n\n  // has it been destroyed\n  this.destroyed = false;\n\n  // should we decode strings into buffers before passing to _write?\n  // this is here so that some node-core streams can optimize string\n  // handling at a lower level.\n  var noDecode = options.decodeStrings === false;\n  this.decodeStrings = !noDecode;\n\n  // Crypto is kind of old and crusty.  Historically, its default string\n  // encoding is 'binary' so we have to make this configurable.\n  // Everything else in the universe uses 'utf8', though.\n  this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n  // not an actual buffer we keep track of, but a measurement\n  // of how much we're waiting to get pushed to some underlying\n  // socket or file.\n  this.length = 0;\n\n  // a flag to see when we're in the middle of a write.\n  this.writing = false;\n\n  // when true all writes will be buffered until .uncork() call\n  this.corked = 0;\n\n  // a flag to be able to tell if the onwrite cb is called immediately,\n  // or on a later tick.  We set this to true at first, because any\n  // actions that shouldn't happen until \"later\" should generally also\n  // not happen before the first write call.\n  this.sync = true;\n\n  // a flag to know if we're processing previously buffered items, which\n  // may call the _write() callback in the same tick, so that we don't\n  // end up in an overlapped onwrite situation.\n  this.bufferProcessing = false;\n\n  // the callback that's passed to _write(chunk,cb)\n  this.onwrite = function (er) {\n    onwrite(stream, er);\n  };\n\n  // the callback that the user supplies to write(chunk,encoding,cb)\n  this.writecb = null;\n\n  // the amount that is being written when _write is called.\n  this.writelen = 0;\n\n  this.bufferedRequest = null;\n  this.lastBufferedRequest = null;\n\n  // number of pending user-supplied write callbacks\n  // this must be 0 before 'finish' can be emitted\n  this.pendingcb = 0;\n\n  // emit prefinish if the only thing we're waiting for is _write cbs\n  // This is relevant for synchronous Transform streams\n  this.prefinished = false;\n\n  // True if the error was already emitted and should not be thrown again\n  this.errorEmitted = false;\n\n  // count buffered requests\n  this.bufferedRequestCount = 0;\n\n  // allocate the first CorkedRequest, there is always\n  // one allocated and free to use, and we maintain at most two\n  this.corkedRequestsFree = new CorkedRequest(this);\n}\n\nWritableState.prototype.getBuffer = function getBuffer() {\n  var current = this.bufferedRequest;\n  var out = [];\n  while (current) {\n    out.push(current);\n    current = current.next;\n  }\n  return out;\n};\n\n(function () {\n  try {\n    Object.defineProperty(WritableState.prototype, 'buffer', {\n      get: internalUtil.deprecate(function () {\n        return this.getBuffer();\n      }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\n    });\n  } catch (_) {}\n})();\n\n// Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\nvar realHasInstance;\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\n  realHasInstance = Function.prototype[Symbol.hasInstance];\n  Object.defineProperty(Writable, Symbol.hasInstance, {\n    value: function (object) {\n      if (realHasInstance.call(this, object)) return true;\n      if (this !== Writable) return false;\n\n      return object && object._writableState instanceof WritableState;\n    }\n  });\n} else {\n  realHasInstance = function (object) {\n    return object instanceof this;\n  };\n}\n\nfunction Writable(options) {\n  Duplex = Duplex || require('./_stream_duplex');\n\n  // Writable ctor is applied to Duplexes, too.\n  // `realHasInstance` is necessary because using plain `instanceof`\n  // would return false, as no `_writableState` property is attached.\n\n  // Trying to use the custom `instanceof` for Writable here will also break the\n  // Node.js LazyTransform implementation, which has a non-trivial getter for\n  // `_writableState` that would lead to infinite recursion.\n  if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {\n    return new Writable(options);\n  }\n\n  this._writableState = new WritableState(options, this);\n\n  // legacy.\n  this.writable = true;\n\n  if (options) {\n    if (typeof options.write === 'function') this._write = options.write;\n\n    if (typeof options.writev === 'function') this._writev = options.writev;\n\n    if (typeof options.destroy === 'function') this._destroy = options.destroy;\n\n    if (typeof options.final === 'function') this._final = options.final;\n  }\n\n  Stream.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n  this.emit('error', new Error('Cannot pipe, not readable'));\n};\n\nfunction writeAfterEnd(stream, cb) {\n  var er = new Error('write after end');\n  // TODO: defer error events consistently everywhere, not just the cb\n  stream.emit('error', er);\n  pna.nextTick(cb, er);\n}\n\n// Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\nfunction validChunk(stream, state, chunk, cb) {\n  var valid = true;\n  var er = false;\n\n  if (chunk === null) {\n    er = new TypeError('May not write null values to stream');\n  } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n    er = new TypeError('Invalid non-string/buffer chunk');\n  }\n  if (er) {\n    stream.emit('error', er);\n    pna.nextTick(cb, er);\n    valid = false;\n  }\n  return valid;\n}\n\nWritable.prototype.write = function (chunk, encoding, cb) {\n  var state = this._writableState;\n  var ret = false;\n  var isBuf = !state.objectMode && _isUint8Array(chunk);\n\n  if (isBuf && !Buffer.isBuffer(chunk)) {\n    chunk = _uint8ArrayToBuffer(chunk);\n  }\n\n  if (typeof encoding === 'function') {\n    cb = encoding;\n    encoding = null;\n  }\n\n  if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n\n  if (typeof cb !== 'function') cb = nop;\n\n  if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\n    state.pendingcb++;\n    ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n  }\n\n  return ret;\n};\n\nWritable.prototype.cork = function () {\n  var state = this._writableState;\n\n  state.corked++;\n};\n\nWritable.prototype.uncork = function () {\n  var state = this._writableState;\n\n  if (state.corked) {\n    state.corked--;\n\n    if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n  }\n};\n\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n  // node::ParseEncoding() requires lower case.\n  if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n  if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);\n  this._writableState.defaultEncoding = encoding;\n  return this;\n};\n\nfunction decodeChunk(state, chunk, encoding) {\n  if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n    chunk = Buffer.from(chunk, encoding);\n  }\n  return chunk;\n}\n\nObject.defineProperty(Writable.prototype, 'writableHighWaterMark', {\n  // making it explicit this property is not enumerable\n  // because otherwise some prototype manipulation in\n  // userland will fail\n  enumerable: false,\n  get: function () {\n    return this._writableState.highWaterMark;\n  }\n});\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn.  Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n  if (!isBuf) {\n    var newChunk = decodeChunk(state, chunk, encoding);\n    if (chunk !== newChunk) {\n      isBuf = true;\n      encoding = 'buffer';\n      chunk = newChunk;\n    }\n  }\n  var len = state.objectMode ? 1 : chunk.length;\n\n  state.length += len;\n\n  var ret = state.length < state.highWaterMark;\n  // we must ensure that previous needDrain will not be reset to false.\n  if (!ret) state.needDrain = true;\n\n  if (state.writing || state.corked) {\n    var last = state.lastBufferedRequest;\n    state.lastBufferedRequest = {\n      chunk: chunk,\n      encoding: encoding,\n      isBuf: isBuf,\n      callback: cb,\n      next: null\n    };\n    if (last) {\n      last.next = state.lastBufferedRequest;\n    } else {\n      state.bufferedRequest = state.lastBufferedRequest;\n    }\n    state.bufferedRequestCount += 1;\n  } else {\n    doWrite(stream, state, false, len, chunk, encoding, cb);\n  }\n\n  return ret;\n}\n\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n  state.writelen = len;\n  state.writecb = cb;\n  state.writing = true;\n  state.sync = true;\n  if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n  state.sync = false;\n}\n\nfunction onwriteError(stream, state, sync, er, cb) {\n  --state.pendingcb;\n\n  if (sync) {\n    // defer the callback if we are being called synchronously\n    // to avoid piling up things on the stack\n    pna.nextTick(cb, er);\n    // this can emit finish, and it will always happen\n    // after error\n    pna.nextTick(finishMaybe, stream, state);\n    stream._writableState.errorEmitted = true;\n    stream.emit('error', er);\n  } else {\n    // the caller expect this to happen before if\n    // it is async\n    cb(er);\n    stream._writableState.errorEmitted = true;\n    stream.emit('error', er);\n    // this can emit finish, but finish must\n    // always follow error\n    finishMaybe(stream, state);\n  }\n}\n\nfunction onwriteStateUpdate(state) {\n  state.writing = false;\n  state.writecb = null;\n  state.length -= state.writelen;\n  state.writelen = 0;\n}\n\nfunction onwrite(stream, er) {\n  var state = stream._writableState;\n  var sync = state.sync;\n  var cb = state.writecb;\n\n  onwriteStateUpdate(state);\n\n  if (er) onwriteError(stream, state, sync, er, cb);else {\n    // Check if we're actually ready to finish, but don't emit yet\n    var finished = needFinish(state);\n\n    if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n      clearBuffer(stream, state);\n    }\n\n    if (sync) {\n      /*<replacement>*/\n      asyncWrite(afterWrite, stream, state, finished, cb);\n      /*</replacement>*/\n    } else {\n      afterWrite(stream, state, finished, cb);\n    }\n  }\n}\n\nfunction afterWrite(stream, state, finished, cb) {\n  if (!finished) onwriteDrain(stream, state);\n  state.pendingcb--;\n  cb();\n  finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n  if (state.length === 0 && state.needDrain) {\n    state.needDrain = false;\n    stream.emit('drain');\n  }\n}\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n  state.bufferProcessing = true;\n  var entry = state.bufferedRequest;\n\n  if (stream._writev && entry && entry.next) {\n    // Fast case, write everything using _writev()\n    var l = state.bufferedRequestCount;\n    var buffer = new Array(l);\n    var holder = state.corkedRequestsFree;\n    holder.entry = entry;\n\n    var count = 0;\n    var allBuffers = true;\n    while (entry) {\n      buffer[count] = entry;\n      if (!entry.isBuf) allBuffers = false;\n      entry = entry.next;\n      count += 1;\n    }\n    buffer.allBuffers = allBuffers;\n\n    doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n    // doWrite is almost always async, defer these to save a bit of time\n    // as the hot path ends with doWrite\n    state.pendingcb++;\n    state.lastBufferedRequest = null;\n    if (holder.next) {\n      state.corkedRequestsFree = holder.next;\n      holder.next = null;\n    } else {\n      state.corkedRequestsFree = new CorkedRequest(state);\n    }\n    state.bufferedRequestCount = 0;\n  } else {\n    // Slow case, write chunks one-by-one\n    while (entry) {\n      var chunk = entry.chunk;\n      var encoding = entry.encoding;\n      var cb = entry.callback;\n      var len = state.objectMode ? 1 : chunk.length;\n\n      doWrite(stream, state, false, len, chunk, encoding, cb);\n      entry = entry.next;\n      state.bufferedRequestCount--;\n      // if we didn't call the onwrite immediately, then\n      // it means that we need to wait until it does.\n      // also, that means that the chunk and cb are currently\n      // being processed, so move the buffer counter past them.\n      if (state.writing) {\n        break;\n      }\n    }\n\n    if (entry === null) state.lastBufferedRequest = null;\n  }\n\n  state.bufferedRequest = entry;\n  state.bufferProcessing = false;\n}\n\nWritable.prototype._write = function (chunk, encoding, cb) {\n  cb(new Error('_write() is not implemented'));\n};\n\nWritable.prototype._writev = null;\n\nWritable.prototype.end = function (chunk, encoding, cb) {\n  var state = this._writableState;\n\n  if (typeof chunk === 'function') {\n    cb = chunk;\n    chunk = null;\n    encoding = null;\n  } else if (typeof encoding === 'function') {\n    cb = encoding;\n    encoding = null;\n  }\n\n  if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n  // .end() fully uncorks\n  if (state.corked) {\n    state.corked = 1;\n    this.uncork();\n  }\n\n  // ignore unnecessary end() calls.\n  if (!state.ending && !state.finished) endWritable(this, state, cb);\n};\n\nfunction needFinish(state) {\n  return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\nfunction callFinal(stream, state) {\n  stream._final(function (err) {\n    state.pendingcb--;\n    if (err) {\n      stream.emit('error', err);\n    }\n    state.prefinished = true;\n    stream.emit('prefinish');\n    finishMaybe(stream, state);\n  });\n}\nfunction prefinish(stream, state) {\n  if (!state.prefinished && !state.finalCalled) {\n    if (typeof stream._final === 'function') {\n      state.pendingcb++;\n      state.finalCalled = true;\n      pna.nextTick(callFinal, stream, state);\n    } else {\n      state.prefinished = true;\n      stream.emit('prefinish');\n    }\n  }\n}\n\nfunction finishMaybe(stream, state) {\n  var need = needFinish(state);\n  if (need) {\n    prefinish(stream, state);\n    if (state.pendingcb === 0) {\n      state.finished = true;\n      stream.emit('finish');\n    }\n  }\n  return need;\n}\n\nfunction endWritable(stream, state, cb) {\n  state.ending = true;\n  finishMaybe(stream, state);\n  if (cb) {\n    if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);\n  }\n  state.ended = true;\n  stream.writable = false;\n}\n\nfunction onCorkedFinish(corkReq, state, err) {\n  var entry = corkReq.entry;\n  corkReq.entry = null;\n  while (entry) {\n    var cb = entry.callback;\n    state.pendingcb--;\n    cb(err);\n    entry = entry.next;\n  }\n  if (state.corkedRequestsFree) {\n    state.corkedRequestsFree.next = corkReq;\n  } else {\n    state.corkedRequestsFree = corkReq;\n  }\n}\n\nObject.defineProperty(Writable.prototype, 'destroyed', {\n  get: function () {\n    if (this._writableState === undefined) {\n      return false;\n    }\n    return this._writableState.destroyed;\n  },\n  set: function (value) {\n    // we ignore the value if the stream\n    // has not been initialized yet\n    if (!this._writableState) {\n      return;\n    }\n\n    // backward compatibility, the user is explicitly\n    // managing destroyed\n    this._writableState.destroyed = value;\n  }\n});\n\nWritable.prototype.destroy = destroyImpl.destroy;\nWritable.prototype._undestroy = destroyImpl.undestroy;\nWritable.prototype._destroy = function (err, cb) {\n  this.end();\n  cb(err);\n};","'use strict';\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Buffer = require('safe-buffer').Buffer;\nvar util = require('util');\n\nfunction copyBuffer(src, target, offset) {\n  src.copy(target, offset);\n}\n\nmodule.exports = function () {\n  function BufferList() {\n    _classCallCheck(this, BufferList);\n\n    this.head = null;\n    this.tail = null;\n    this.length = 0;\n  }\n\n  BufferList.prototype.push = function push(v) {\n    var entry = { data: v, next: null };\n    if (this.length > 0) this.tail.next = entry;else this.head = entry;\n    this.tail = entry;\n    ++this.length;\n  };\n\n  BufferList.prototype.unshift = function unshift(v) {\n    var entry = { data: v, next: this.head };\n    if (this.length === 0) this.tail = entry;\n    this.head = entry;\n    ++this.length;\n  };\n\n  BufferList.prototype.shift = function shift() {\n    if (this.length === 0) return;\n    var ret = this.head.data;\n    if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n    --this.length;\n    return ret;\n  };\n\n  BufferList.prototype.clear = function clear() {\n    this.head = this.tail = null;\n    this.length = 0;\n  };\n\n  BufferList.prototype.join = function join(s) {\n    if (this.length === 0) return '';\n    var p = this.head;\n    var ret = '' + p.data;\n    while (p = p.next) {\n      ret += s + p.data;\n    }return ret;\n  };\n\n  BufferList.prototype.concat = function concat(n) {\n    if (this.length === 0) return Buffer.alloc(0);\n    if (this.length === 1) return this.head.data;\n    var ret = Buffer.allocUnsafe(n >>> 0);\n    var p = this.head;\n    var i = 0;\n    while (p) {\n      copyBuffer(p.data, ret, i);\n      i += p.data.length;\n      p = p.next;\n    }\n    return ret;\n  };\n\n  return BufferList;\n}();\n\nif (util && util.inspect && util.inspect.custom) {\n  module.exports.prototype[util.inspect.custom] = function () {\n    var obj = util.inspect({ length: this.length });\n    return this.constructor.name + ' ' + obj;\n  };\n}","'use strict';\n\n/*<replacement>*/\n\nvar pna = require('process-nextick-args');\n/*</replacement>*/\n\n// undocumented cb() API, needed for core, not for public API\nfunction destroy(err, cb) {\n  var _this = this;\n\n  var readableDestroyed = this._readableState && this._readableState.destroyed;\n  var writableDestroyed = this._writableState && this._writableState.destroyed;\n\n  if (readableDestroyed || writableDestroyed) {\n    if (cb) {\n      cb(err);\n    } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {\n      pna.nextTick(emitErrorNT, this, err);\n    }\n    return this;\n  }\n\n  // we set destroyed to true before firing error callbacks in order\n  // to make it re-entrance safe in case destroy() is called within callbacks\n\n  if (this._readableState) {\n    this._readableState.destroyed = true;\n  }\n\n  // if this is a duplex stream mark the writable part as destroyed as well\n  if (this._writableState) {\n    this._writableState.destroyed = true;\n  }\n\n  this._destroy(err || null, function (err) {\n    if (!cb && err) {\n      pna.nextTick(emitErrorNT, _this, err);\n      if (_this._writableState) {\n        _this._writableState.errorEmitted = true;\n      }\n    } else if (cb) {\n      cb(err);\n    }\n  });\n\n  return this;\n}\n\nfunction undestroy() {\n  if (this._readableState) {\n    this._readableState.destroyed = false;\n    this._readableState.reading = false;\n    this._readableState.ended = false;\n    this._readableState.endEmitted = false;\n  }\n\n  if (this._writableState) {\n    this._writableState.destroyed = false;\n    this._writableState.ended = false;\n    this._writableState.ending = false;\n    this._writableState.finished = false;\n    this._writableState.errorEmitted = false;\n  }\n}\n\nfunction emitErrorNT(self, err) {\n  self.emit('error', err);\n}\n\nmodule.exports = {\n  destroy: destroy,\n  undestroy: undestroy\n};","module.exports = require('events').EventEmitter;\n","module.exports = require('./readable').PassThrough\n","exports = module.exports = require('./lib/_stream_readable.js');\nexports.Stream = exports;\nexports.Readable = exports;\nexports.Writable = require('./lib/_stream_writable.js');\nexports.Duplex = require('./lib/_stream_duplex.js');\nexports.Transform = require('./lib/_stream_transform.js');\nexports.PassThrough = require('./lib/_stream_passthrough.js');\n","module.exports = require('./readable').Transform\n","module.exports = require('./lib/_stream_writable.js');\n","/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n  for (var key in src) {\n    dst[key] = src[key]\n  }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n  module.exports = buffer\n} else {\n  // Copy properties from require('buffer')\n  copyProps(buffer, exports)\n  exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n  return Buffer(arg, encodingOrOffset, length)\n}\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n  if (typeof arg === 'number') {\n    throw new TypeError('Argument must not be a number')\n  }\n  return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n  if (typeof size !== 'number') {\n    throw new TypeError('Argument must be a number')\n  }\n  var buf = Buffer(size)\n  if (fill !== undefined) {\n    if (typeof encoding === 'string') {\n      buf.fill(fill, encoding)\n    } else {\n      buf.fill(fill)\n    }\n  } else {\n    buf.fill(0)\n  }\n  return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n  if (typeof size !== 'number') {\n    throw new TypeError('Argument must be a number')\n  }\n  return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n  if (typeof size !== 'number') {\n    throw new TypeError('Argument must be a number')\n  }\n  return buffer.SlowBuffer(size)\n}\n","(function (global, undefined) {\n    \"use strict\";\n\n    if (global.setImmediate) {\n        return;\n    }\n\n    var nextHandle = 1; // Spec says greater than zero\n    var tasksByHandle = {};\n    var currentlyRunningATask = false;\n    var doc = global.document;\n    var registerImmediate;\n\n    function setImmediate(callback) {\n      // Callback can either be a function or a string\n      if (typeof callback !== \"function\") {\n        callback = new Function(\"\" + callback);\n      }\n      // Copy function arguments\n      var args = new Array(arguments.length - 1);\n      for (var i = 0; i < args.length; i++) {\n          args[i] = arguments[i + 1];\n      }\n      // Store and register the task\n      var task = { callback: callback, args: args };\n      tasksByHandle[nextHandle] = task;\n      registerImmediate(nextHandle);\n      return nextHandle++;\n    }\n\n    function clearImmediate(handle) {\n        delete tasksByHandle[handle];\n    }\n\n    function run(task) {\n        var callback = task.callback;\n        var args = task.args;\n        switch (args.length) {\n        case 0:\n            callback();\n            break;\n        case 1:\n            callback(args[0]);\n            break;\n        case 2:\n            callback(args[0], args[1]);\n            break;\n        case 3:\n            callback(args[0], args[1], args[2]);\n            break;\n        default:\n            callback.apply(undefined, args);\n            break;\n        }\n    }\n\n    function runIfPresent(handle) {\n        // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n        // So if we're currently running a task, we'll need to delay this invocation.\n        if (currentlyRunningATask) {\n            // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n            // \"too much recursion\" error.\n            setTimeout(runIfPresent, 0, handle);\n        } else {\n            var task = tasksByHandle[handle];\n            if (task) {\n                currentlyRunningATask = true;\n                try {\n                    run(task);\n                } finally {\n                    clearImmediate(handle);\n                    currentlyRunningATask = false;\n                }\n            }\n        }\n    }\n\n    function installNextTickImplementation() {\n        registerImmediate = function(handle) {\n            process.nextTick(function () { runIfPresent(handle); });\n        };\n    }\n\n    function canUsePostMessage() {\n        // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n        // where `global.postMessage` means something completely different and can't be used for this purpose.\n        if (global.postMessage && !global.importScripts) {\n            var postMessageIsAsynchronous = true;\n            var oldOnMessage = global.onmessage;\n            global.onmessage = function() {\n                postMessageIsAsynchronous = false;\n            };\n            global.postMessage(\"\", \"*\");\n            global.onmessage = oldOnMessage;\n            return postMessageIsAsynchronous;\n        }\n    }\n\n    function installPostMessageImplementation() {\n        // Installs an event handler on `global` for the `message` event: see\n        // * https://developer.mozilla.org/en/DOM/window.postMessage\n        // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n        var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n        var onGlobalMessage = function(event) {\n            if (event.source === global &&\n                typeof event.data === \"string\" &&\n                event.data.indexOf(messagePrefix) === 0) {\n                runIfPresent(+event.data.slice(messagePrefix.length));\n            }\n        };\n\n        if (global.addEventListener) {\n            global.addEventListener(\"message\", onGlobalMessage, false);\n        } else {\n            global.attachEvent(\"onmessage\", onGlobalMessage);\n        }\n\n        registerImmediate = function(handle) {\n            global.postMessage(messagePrefix + handle, \"*\");\n        };\n    }\n\n    function installMessageChannelImplementation() {\n        var channel = new MessageChannel();\n        channel.port1.onmessage = function(event) {\n            var handle = event.data;\n            runIfPresent(handle);\n        };\n\n        registerImmediate = function(handle) {\n            channel.port2.postMessage(handle);\n        };\n    }\n\n    function installReadyStateChangeImplementation() {\n        var html = doc.documentElement;\n        registerImmediate = function(handle) {\n            // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n            // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n            var script = doc.createElement(\"script\");\n            script.onreadystatechange = function () {\n                runIfPresent(handle);\n                script.onreadystatechange = null;\n                html.removeChild(script);\n                script = null;\n            };\n            html.appendChild(script);\n        };\n    }\n\n    function installSetTimeoutImplementation() {\n        registerImmediate = function(handle) {\n            setTimeout(runIfPresent, 0, handle);\n        };\n    }\n\n    // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\n    var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n    attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n\n    // Don't get fooled by e.g. browserify environments.\n    if ({}.toString.call(global.process) === \"[object process]\") {\n        // For Node.js before 0.9\n        installNextTickImplementation();\n\n    } else if (canUsePostMessage()) {\n        // For non-IE10 modern browsers\n        installPostMessageImplementation();\n\n    } else if (global.MessageChannel) {\n        // For web workers, where supported\n        installMessageChannelImplementation();\n\n    } else if (doc && \"onreadystatechange\" in doc.createElement(\"script\")) {\n        // For IE 6–8\n        installReadyStateChangeImplementation();\n\n    } else {\n        // For older browsers\n        installSetTimeoutImplementation();\n    }\n\n    attachTo.setImmediate = setImmediate;\n    attachTo.clearImmediate = clearImmediate;\n}(typeof self === \"undefined\" ? typeof global === \"undefined\" ? this : global : self));\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nmodule.exports = Stream;\n\nvar EE = require('events').EventEmitter;\nvar inherits = require('inherits');\n\ninherits(Stream, EE);\nStream.Readable = require('readable-stream/readable.js');\nStream.Writable = require('readable-stream/writable.js');\nStream.Duplex = require('readable-stream/duplex.js');\nStream.Transform = require('readable-stream/transform.js');\nStream.PassThrough = require('readable-stream/passthrough.js');\n\n// Backwards-compat with node 0.4.x\nStream.Stream = Stream;\n\n\n\n// old-style streams.  Note that the pipe method (the only relevant\n// part of this class) is overridden in the Readable class.\n\nfunction Stream() {\n  EE.call(this);\n}\n\nStream.prototype.pipe = function(dest, options) {\n  var source = this;\n\n  function ondata(chunk) {\n    if (dest.writable) {\n      if (false === dest.write(chunk) && source.pause) {\n        source.pause();\n      }\n    }\n  }\n\n  source.on('data', ondata);\n\n  function ondrain() {\n    if (source.readable && source.resume) {\n      source.resume();\n    }\n  }\n\n  dest.on('drain', ondrain);\n\n  // If the 'end' option is not supplied, dest.end() will be called when\n  // source gets the 'end' or 'close' events.  Only dest.end() once.\n  if (!dest._isStdio && (!options || options.end !== false)) {\n    source.on('end', onend);\n    source.on('close', onclose);\n  }\n\n  var didOnEnd = false;\n  function onend() {\n    if (didOnEnd) return;\n    didOnEnd = true;\n\n    dest.end();\n  }\n\n\n  function onclose() {\n    if (didOnEnd) return;\n    didOnEnd = true;\n\n    if (typeof dest.destroy === 'function') dest.destroy();\n  }\n\n  // don't leave dangling pipes when there are errors.\n  function onerror(er) {\n    cleanup();\n    if (EE.listenerCount(this, 'error') === 0) {\n      throw er; // Unhandled stream error in pipe.\n    }\n  }\n\n  source.on('error', onerror);\n  dest.on('error', onerror);\n\n  // remove all the event listeners that were added.\n  function cleanup() {\n    source.removeListener('data', ondata);\n    dest.removeListener('drain', ondrain);\n\n    source.removeListener('end', onend);\n    source.removeListener('close', onclose);\n\n    source.removeListener('error', onerror);\n    dest.removeListener('error', onerror);\n\n    source.removeListener('end', cleanup);\n    source.removeListener('close', cleanup);\n\n    dest.removeListener('close', cleanup);\n  }\n\n  source.on('end', cleanup);\n  source.on('close', cleanup);\n\n  dest.on('close', cleanup);\n\n  dest.emit('pipe', source);\n\n  // Allow for unix-like usage: A.pipe(B).pipe(C)\n  return dest;\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n/*<replacement>*/\n\nvar Buffer = require('safe-buffer').Buffer;\n/*</replacement>*/\n\nvar isEncoding = Buffer.isEncoding || function (encoding) {\n  encoding = '' + encoding;\n  switch (encoding && encoding.toLowerCase()) {\n    case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':\n      return true;\n    default:\n      return false;\n  }\n};\n\nfunction _normalizeEncoding(enc) {\n  if (!enc) return 'utf8';\n  var retried;\n  while (true) {\n    switch (enc) {\n      case 'utf8':\n      case 'utf-8':\n        return 'utf8';\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return 'utf16le';\n      case 'latin1':\n      case 'binary':\n        return 'latin1';\n      case 'base64':\n      case 'ascii':\n      case 'hex':\n        return enc;\n      default:\n        if (retried) return; // undefined\n        enc = ('' + enc).toLowerCase();\n        retried = true;\n    }\n  }\n};\n\n// Do not cache `Buffer.isEncoding` when checking encoding names as some\n// modules monkey-patch it to support additional encodings\nfunction normalizeEncoding(enc) {\n  var nenc = _normalizeEncoding(enc);\n  if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);\n  return nenc || enc;\n}\n\n// StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters.\nexports.StringDecoder = StringDecoder;\nfunction StringDecoder(encoding) {\n  this.encoding = normalizeEncoding(encoding);\n  var nb;\n  switch (this.encoding) {\n    case 'utf16le':\n      this.text = utf16Text;\n      this.end = utf16End;\n      nb = 4;\n      break;\n    case 'utf8':\n      this.fillLast = utf8FillLast;\n      nb = 4;\n      break;\n    case 'base64':\n      this.text = base64Text;\n      this.end = base64End;\n      nb = 3;\n      break;\n    default:\n      this.write = simpleWrite;\n      this.end = simpleEnd;\n      return;\n  }\n  this.lastNeed = 0;\n  this.lastTotal = 0;\n  this.lastChar = Buffer.allocUnsafe(nb);\n}\n\nStringDecoder.prototype.write = function (buf) {\n  if (buf.length === 0) return '';\n  var r;\n  var i;\n  if (this.lastNeed) {\n    r = this.fillLast(buf);\n    if (r === undefined) return '';\n    i = this.lastNeed;\n    this.lastNeed = 0;\n  } else {\n    i = 0;\n  }\n  if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);\n  return r || '';\n};\n\nStringDecoder.prototype.end = utf8End;\n\n// Returns only complete characters in a Buffer\nStringDecoder.prototype.text = utf8Text;\n\n// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer\nStringDecoder.prototype.fillLast = function (buf) {\n  if (this.lastNeed <= buf.length) {\n    buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);\n    return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n  }\n  buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);\n  this.lastNeed -= buf.length;\n};\n\n// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a\n// continuation byte. If an invalid byte is detected, -2 is returned.\nfunction utf8CheckByte(byte) {\n  if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;\n  return byte >> 6 === 0x02 ? -1 : -2;\n}\n\n// Checks at most 3 bytes at the end of a Buffer in order to detect an\n// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)\n// needed to complete the UTF-8 character (if applicable) are returned.\nfunction utf8CheckIncomplete(self, buf, i) {\n  var j = buf.length - 1;\n  if (j < i) return 0;\n  var nb = utf8CheckByte(buf[j]);\n  if (nb >= 0) {\n    if (nb > 0) self.lastNeed = nb - 1;\n    return nb;\n  }\n  if (--j < i || nb === -2) return 0;\n  nb = utf8CheckByte(buf[j]);\n  if (nb >= 0) {\n    if (nb > 0) self.lastNeed = nb - 2;\n    return nb;\n  }\n  if (--j < i || nb === -2) return 0;\n  nb = utf8CheckByte(buf[j]);\n  if (nb >= 0) {\n    if (nb > 0) {\n      if (nb === 2) nb = 0;else self.lastNeed = nb - 3;\n    }\n    return nb;\n  }\n  return 0;\n}\n\n// Validates as many continuation bytes for a multi-byte UTF-8 character as\n// needed or are available. If we see a non-continuation byte where we expect\n// one, we \"replace\" the validated continuation bytes we've seen so far with\n// a single UTF-8 replacement character ('\\ufffd'), to match v8's UTF-8 decoding\n// behavior. The continuation byte check is included three times in the case\n// where all of the continuation bytes for a character exist in the same buffer.\n// It is also done this way as a slight performance increase instead of using a\n// loop.\nfunction utf8CheckExtraBytes(self, buf, p) {\n  if ((buf[0] & 0xC0) !== 0x80) {\n    self.lastNeed = 0;\n    return '\\ufffd';\n  }\n  if (self.lastNeed > 1 && buf.length > 1) {\n    if ((buf[1] & 0xC0) !== 0x80) {\n      self.lastNeed = 1;\n      return '\\ufffd';\n    }\n    if (self.lastNeed > 2 && buf.length > 2) {\n      if ((buf[2] & 0xC0) !== 0x80) {\n        self.lastNeed = 2;\n        return '\\ufffd';\n      }\n    }\n  }\n}\n\n// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.\nfunction utf8FillLast(buf) {\n  var p = this.lastTotal - this.lastNeed;\n  var r = utf8CheckExtraBytes(this, buf, p);\n  if (r !== undefined) return r;\n  if (this.lastNeed <= buf.length) {\n    buf.copy(this.lastChar, p, 0, this.lastNeed);\n    return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n  }\n  buf.copy(this.lastChar, p, 0, buf.length);\n  this.lastNeed -= buf.length;\n}\n\n// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a\n// partial character, the character's bytes are buffered until the required\n// number of bytes are available.\nfunction utf8Text(buf, i) {\n  var total = utf8CheckIncomplete(this, buf, i);\n  if (!this.lastNeed) return buf.toString('utf8', i);\n  this.lastTotal = total;\n  var end = buf.length - (total - this.lastNeed);\n  buf.copy(this.lastChar, 0, end);\n  return buf.toString('utf8', i, end);\n}\n\n// For UTF-8, a replacement character is added when ending on a partial\n// character.\nfunction utf8End(buf) {\n  var r = buf && buf.length ? this.write(buf) : '';\n  if (this.lastNeed) return r + '\\ufffd';\n  return r;\n}\n\n// UTF-16LE typically needs two bytes per character, but even if we have an even\n// number of bytes available, we need to check if we end on a leading/high\n// surrogate. In that case, we need to wait for the next two bytes in order to\n// decode the last character properly.\nfunction utf16Text(buf, i) {\n  if ((buf.length - i) % 2 === 0) {\n    var r = buf.toString('utf16le', i);\n    if (r) {\n      var c = r.charCodeAt(r.length - 1);\n      if (c >= 0xD800 && c <= 0xDBFF) {\n        this.lastNeed = 2;\n        this.lastTotal = 4;\n        this.lastChar[0] = buf[buf.length - 2];\n        this.lastChar[1] = buf[buf.length - 1];\n        return r.slice(0, -1);\n      }\n    }\n    return r;\n  }\n  this.lastNeed = 1;\n  this.lastTotal = 2;\n  this.lastChar[0] = buf[buf.length - 1];\n  return buf.toString('utf16le', i, buf.length - 1);\n}\n\n// For UTF-16LE we do not explicitly append special replacement characters if we\n// end on a partial character, we simply let v8 handle that.\nfunction utf16End(buf) {\n  var r = buf && buf.length ? this.write(buf) : '';\n  if (this.lastNeed) {\n    var end = this.lastTotal - this.lastNeed;\n    return r + this.lastChar.toString('utf16le', 0, end);\n  }\n  return r;\n}\n\nfunction base64Text(buf, i) {\n  var n = (buf.length - i) % 3;\n  if (n === 0) return buf.toString('base64', i);\n  this.lastNeed = 3 - n;\n  this.lastTotal = 3;\n  if (n === 1) {\n    this.lastChar[0] = buf[buf.length - 1];\n  } else {\n    this.lastChar[0] = buf[buf.length - 2];\n    this.lastChar[1] = buf[buf.length - 1];\n  }\n  return buf.toString('base64', i, buf.length - n);\n}\n\nfunction base64End(buf) {\n  var r = buf && buf.length ? this.write(buf) : '';\n  if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);\n  return r;\n}\n\n// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)\nfunction simpleWrite(buf) {\n  return buf.toString(this.encoding);\n}\n\nfunction simpleEnd(buf) {\n  return buf && buf.length ? this.write(buf) : '';\n}","var scope = (typeof global !== \"undefined\" && global) ||\n            (typeof self !== \"undefined\" && self) ||\n            window;\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n  return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n  return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n  if (timeout) {\n    timeout.close();\n  }\n};\n\nfunction Timeout(id, clearFn) {\n  this._id = id;\n  this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n  this._clearFn.call(scope, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n  clearTimeout(item._idleTimeoutId);\n  item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n  clearTimeout(item._idleTimeoutId);\n  item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n  clearTimeout(item._idleTimeoutId);\n\n  var msecs = item._idleTimeout;\n  if (msecs >= 0) {\n    item._idleTimeoutId = setTimeout(function onTimeout() {\n      if (item._onTimeout)\n        item._onTimeout();\n    }, msecs);\n  }\n};\n\n// setimmediate attaches itself to the global object\nrequire(\"setimmediate\");\n// On some exotic environments, it's not clear which object `setimmediate` was\n// able to install onto.  Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\n                       (typeof global !== \"undefined\" && global.setImmediate) ||\n                       (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\n                         (typeof global !== \"undefined\" && global.clearImmediate) ||\n                         (this && this.clearImmediate);\n","\n/**\n * Module exports.\n */\n\nmodule.exports = deprecate;\n\n/**\n * Mark that a method should not be used.\n * Returns a modified function which warns once by default.\n *\n * If `localStorage.noDeprecation = true` is set, then it is a no-op.\n *\n * If `localStorage.throwDeprecation = true` is set, then deprecated functions\n * will throw an Error when invoked.\n *\n * If `localStorage.traceDeprecation = true` is set, then deprecated functions\n * will invoke `console.trace()` instead of `console.error()`.\n *\n * @param {Function} fn - the function to deprecate\n * @param {String} msg - the string to print to the console when `fn` is invoked\n * @returns {Function} a new \"deprecated\" version of `fn`\n * @api public\n */\n\nfunction deprecate (fn, msg) {\n  if (config('noDeprecation')) {\n    return fn;\n  }\n\n  var warned = false;\n  function deprecated() {\n    if (!warned) {\n      if (config('throwDeprecation')) {\n        throw new Error(msg);\n      } else if (config('traceDeprecation')) {\n        console.trace(msg);\n      } else {\n        console.warn(msg);\n      }\n      warned = true;\n    }\n    return fn.apply(this, arguments);\n  }\n\n  return deprecated;\n}\n\n/**\n * Checks `localStorage` for boolean values for the given `name`.\n *\n * @param {String} name\n * @returns {Boolean}\n * @api private\n */\n\nfunction config (name) {\n  // accessing global.localStorage can trigger a DOMException in sandboxed iframes\n  try {\n    if (!global.localStorage) return false;\n  } catch (_) {\n    return false;\n  }\n  var val = global.localStorage[name];\n  if (null == val) return false;\n  return String(val).toLowerCase() === 'true';\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA,WAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/TA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9bA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3EA;AACA;AACA;AAAA;AAAA;AAAA;AACA,qBAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1fA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;;;;;;;;;;;;;AC3LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC3hBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACtQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACnNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AClRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC3dA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpIA;AACA;;;;;;;;;;;ACDA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACJA;AACA;;;;;;;;;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACNA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACPA;;;;;;;;;;;ACAA;AACA;AACA;;;;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACfA;AACA;AACA;;;;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC5PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC/YA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACjaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACxLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACj1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACxVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnhDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACtVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnsCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9CA;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACPA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACrnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7hBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAIA;;;;;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACXA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC7+BA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChSA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtGA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnBA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5CA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrGA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;;ACHA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACbA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1FA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7BA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACPA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA,aACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AChDA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACLA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC3BA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;;;ACHA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACLA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC7CA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrBA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACdA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACRA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC5BA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7hBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAIA;;;;;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACXA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnDA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClDA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjGA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpEA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACxBA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnDA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzDA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjSA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClTA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5JA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5EA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA,aACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChDA;AACA;AACA;;;;;;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7hBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAIA;;;;;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACXA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnDA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9EA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChHA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1IA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxGA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrJA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5EA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpCA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC/DA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC3kBA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAEA;AACA;AACA;AACA;;;;;;;;;;;;;;AClBA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AChBA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrEA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzNA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA,UAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7zvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC5GA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3DA;AACA;AACA;;;;;;;;;;;;ACFA;AACA;;;;;;;;;;;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACtJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC5vDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvLA;;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC9qBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzEA;;;;;;;;;;;;ACAA;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACNA;;;;;;;;;;;;ACAA;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;A","sourceRoot":""}
\ No newline at end of file
-- 
cgit v1.2.3-70-g09d2


From 15d5cea9d1d94a6893ef1a55a916e68a182e5394 Mon Sep 17 00:00:00 2001
From: Jules Laplace <julescarbon@gmail.com>
Date: Fri, 21 Sep 2018 22:49:55 +0200
Subject: browser is just a component

---
 app/client/browser/browser.actions.js              |   3 -
 app/client/browser/browser.component.js            |  90 ----
 app/client/browser/browser.reducer.js              |  40 --
 app/client/common/browser.component.js             |  89 ++++
 app/client/common/index.js                         |   3 +-
 app/client/index.jsx                               |   3 +-
 .../modules/pix2pixhd/views/pix2pixhd.train.js     |  54 +--
 .../modules/pix2pixhd/views/sequence.editor.js     |  89 ++++
 app/client/store.js                                |   2 -
 public/bundle.js                                   | 483 +++++++++------------
 public/bundle.js.map                               |   2 +-
 11 files changed, 415 insertions(+), 443 deletions(-)
 delete mode 100644 app/client/browser/browser.actions.js
 delete mode 100644 app/client/browser/browser.component.js
 delete mode 100644 app/client/browser/browser.reducer.js
 create mode 100644 app/client/common/browser.component.js
 create mode 100644 app/client/modules/pix2pixhd/views/sequence.editor.js

(limited to 'app/client/index.jsx')

diff --git a/app/client/browser/browser.actions.js b/app/client/browser/browser.actions.js
deleted file mode 100644
index 81b9c7c..0000000
--- a/app/client/browser/browser.actions.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import types from '../types'
-import actions from '../actions'
-import util from '../util'
diff --git a/app/client/browser/browser.component.js b/app/client/browser/browser.component.js
deleted file mode 100644
index 076b4b4..0000000
--- a/app/client/browser/browser.component.js
+++ /dev/null
@@ -1,90 +0,0 @@
-import { h, Component } from 'preact'
-import { bindActionCreators } from 'redux'
-import { connect } from 'react-redux'
-import { Route, Link } from 'react-router-dom'
-
-import { Loading, FileList, FileViewer } from '../common'
-
-import actions from '../actions'
-
-class Browser extends Component {
-  state = {
-    dir: '/',
-    module: 'pix2pixhd',
-    files: [],
-    loading: true
-  }
-  componentDidMount() {
-    this.fetch(this.state.dir)
-  }
-  handlePick(file) {
-    console.log(file)
-    if (file.dir) {
-      this.fetch([this.state.dir, file.name].join('/').replace('//','/'))
-    } else {
-      this.fetchFile([this.state.dir, file.name].join('/').replace('//','/'))
-    }
-  }
-  fetch(dir) {
-    console.log('fetch', dir)
-    const { module } = this.state
-    this.setState({ dir, file: null, loading: true })
-    actions.socket.list_directory({ module, dir }).then(files => {
-      console.log(files)
-      this.setState({ dir, files, loading: false })
-    })
-  }
-  fetchFile(fn) {
-    console.log('fetch file', fn)
-    const { module } = this.state
-    this.setState({ file: null, loadingFile: true })
-    actions.socket.read_file({ module, fn }).then(file => {
-      console.log(file)
-      this.setState({ file, loadingFile: false })
-    })
-  }
-  render() {
-    const { app } = this.props
-    const {
-      loading, dir, module, files,
-      loadingFile, file,
-    } = this.state
-    console.log(this.props, this.state)
-    return (
-      <div className='app browser'>
-        <h1>{dir}{dir[dir.length-1] !== '/' && '/'}</h1>
-        {app.tool}<br/>
-        {loading && <Loading />}
-        <FileList
-          files={files}
-          groupDirectories
-          parentDirectory={dir !== '/'}
-          orderBy='name asc'
-          fields={'name datetime size'}
-          onClick={(file, e) => {
-            e.preventDefault()
-            e.stopPropagation()
-            console.log('picked a result', file)
-            this.handlePick(file)
-          }}
-          onClickParent={e => {
-            console.log('navigate up')
-            this.fetch(this.state.dir.split('/').slice(0, -1).join('/') || '/')
-          }}
-        />
-        {loadingFile && <Loading />}
-        {file && <FileViewer file={file} />}
-      </div>
-    )
-  }
-}
-
-const mapStateToProps = state => ({
-  app: state.system.app,
-})
-
-const mapDispatchToProps = (dispatch, ownProps) => ({
-  actions: bindActionCreators({}, dispatch),
-})
-
-export default connect(mapStateToProps, mapDispatchToProps)(Browser)
diff --git a/app/client/browser/browser.reducer.js b/app/client/browser/browser.reducer.js
deleted file mode 100644
index 099176f..0000000
--- a/app/client/browser/browser.reducer.js
+++ /dev/null
@@ -1,40 +0,0 @@
-import types from '../types'
-
-import moment from 'moment/min/moment.min'
-let FileSaver = require('file-saver')
-
-const browserInitialState = {
-  loading: false,
-  progress: null,
-  error: null,
-  data: {},
-  images: [
-  ],
-  files: [
-  ]
-}
-
-const browserReducer = (state = browserInitialState, action) => {
-  switch(action.type) {
-    case types.app.load_progress:
-      if (!action.data || action.data.module !== 'browser') {
-        return state
-      }
-      return {
-        ...state,
-        loading: true,
-        progress: action.progress,
-      }
-    case types.app.load:
-      return {
-        ...state,
-        loading: false,
-        error: null,
-        data: action.data,
-      }
-    default:
-      return state
-  }
-}
-
-export default browserReducer
diff --git a/app/client/common/browser.component.js b/app/client/common/browser.component.js
new file mode 100644
index 0000000..50b31cf
--- /dev/null
+++ b/app/client/common/browser.component.js
@@ -0,0 +1,89 @@
+import { h, Component } from 'preact'
+import { bindActionCreators } from 'redux'
+import { connect } from 'react-redux'
+import { Route, Link } from 'react-router-dom'
+
+import { Loading, FileList, FileViewer } from '../common'
+
+import actions from '../actions'
+
+class Browser extends Component {
+  state = {
+    dir: '/',
+    files: [],
+    loading: true
+  }
+  componentDidMount() {
+    this.fetch(this.state.dir)
+  }
+  handlePick(file) {
+    console.log(file)
+    if (file.dir) {
+      this.fetch([this.state.dir, file.name].join('/').replace('//','/'))
+    } else {
+      this.fetchFile([this.state.dir, file.name].join('/').replace('//','/'))
+    }
+  }
+  fetch(dir) {
+    console.log('fetch', dir)
+    const { tool: module } = this.props.app
+    this.setState({ dir, file: null, loading: true })
+    actions.socket.list_directory({ module, dir }).then(files => {
+      console.log(files)
+      this.setState({ dir, files, loading: false })
+    })
+  }
+  fetchFile(fn) {
+    console.log('fetch file', fn)
+    const { tool: module } = this.props.app
+    this.setState({ file: null, loadingFile: true })
+    actions.socket.read_file({ module, fn }).then(file => {
+      console.log(file)
+      this.setState({ file, loadingFile: false })
+    })
+  }
+  render() {
+    const { app } = this.props
+    const {
+      loading, dir, files,
+      loadingFile, file,
+    } = this.state
+    console.log(this.props, this.state)
+    return (
+      <div className='app browser'>
+        <h1>{dir}{dir[dir.length-1] !== '/' && '/'}</h1>
+        {app.tool}<br/>
+        {loading && <Loading />}
+        <FileList
+          files={files}
+          groupDirectories
+          parentDirectory={dir !== '/'}
+          orderBy='name asc'
+          fields={'name datetime size'}
+          onClick={(file, e) => {
+            e.preventDefault()
+            e.stopPropagation()
+            console.log('picked a result', file)
+            this.handlePick(file)
+          }}
+          onClickParent={e => {
+            console.log('navigate up')
+            this.fetch(this.state.dir.split('/').slice(0, -1).join('/') || '/')
+          }}
+        />
+        {loadingFile && <Loading />}
+        {file && <FileViewer file={file} />}
+      </div>
+    )
+  }
+}
+
+const mapStateToProps = state => ({
+  app: state.system.app,
+})
+
+const mapDispatchToProps = (dispatch, ownProps) => ({
+  actions: bindActionCreators({}, dispatch),
+})
+
+export default connect(mapStateToProps, mapDispatchToProps)(Browser)
diff --git a/app/client/common/index.js b/app/client/common/index.js
index ffb852d..e120597 100644
--- a/app/client/common/index.js
+++ b/app/client/common/index.js
@@ -1,5 +1,6 @@
 import AudioPlayer from './audioPlayer/audioPlayer.component'
 import AugmentationGrid from './augmentationGrid.component'
+import Browser from './browser.component'
 import Button from './button.component'
 import ButtonGrid from './buttonGrid.component'
 import Checkbox from './checkbox.component'
@@ -28,7 +29,7 @@ export {
   Views,
   Loading, Progress, Header, AudioPlayer,
   FolderList, FileList, FileRow, FileUpload, FileViewer,
-  Gallery, Player,
+  Gallery, Player, Browser,
   Group, ParamGroup, Param,
   TextInput, NumberInput,
   Slider, Select, SelectGroup, Button, Checkbox,
diff --git a/app/client/index.jsx b/app/client/index.jsx
index 2b28ac1..cda528c 100644
--- a/app/client/index.jsx
+++ b/app/client/index.jsx
@@ -7,10 +7,9 @@ import * as socket from './socket'
 import util from './util'
 
 import Auth from './auth'
-import { Header, AudioPlayer } from './common'
+import { Header, Browser, AudioPlayer } from './common'
 import System from './system/system.component'
 import Dashboard from './dashboard/dashboard.component'
-import Browser from './browser/browser.component'
 import modules from './modules'
 
 const module_list = Object.keys(modules).map(name => {
diff --git a/app/client/modules/pix2pixhd/views/pix2pixhd.train.js b/app/client/modules/pix2pixhd/views/pix2pixhd.train.js
index 06caa5a..957b068 100644
--- a/app/client/modules/pix2pixhd/views/pix2pixhd.train.js
+++ b/app/client/modules/pix2pixhd/views/pix2pixhd.train.js
@@ -114,6 +114,33 @@ class Pix2PixHDTrain extends Component {
                 value={this.state.epoch}
               />
             </Group>
+            <Group title='Augmentation Grid'>
+              <AugmentationGrid
+                checkpoint={this.props.pix2pixhd.checkpoint}
+                take={[1,2,3,4,5,10,15,20,25,50,75,100,200,300,400,500,1000]}
+                make={[1,2,3,4,5,10,15,20,25,50,75,100,200,]}
+                onAugment={(augment_take, augment_make) => {
+                  this.props.remote.augment_task(this.state.checkpoint_name, {
+                    ...this.state,
+                    augment_take,
+                    augment_make,
+                  })
+                }}
+                onTrain={() => {
+                  this.props.remote.train_task(this.state.checkpoint_name, pix2pixhd.folder_id, 1)
+                  setTimeout(() => { // auto-generate epoch demo
+                    this.props.remote.augment_task(this.state.checkpoint_name, {
+                      ...this.state,
+                      augment_take: 10,
+                      augment_make: 150,
+                      no_symlinks: true,
+                      mov: true,
+                      folder_id: this.props.pix2pixhd.data.resultsFolder.id
+                    })
+                  }, 250)
+                }}
+              />
+            </Group>
             <Group title='Augment'>
               <NumberInput
                 name="augment_take"
@@ -151,33 +178,6 @@ class Pix2PixHDTrain extends Component {
                 }}
               />
             </Group>
-            <Group title='Augmentation Grid'>
-              <AugmentationGrid
-                checkpoint={this.props.pix2pixhd.checkpoint}
-                take={[1,2,3,4,5,10,15,20,25,50,75,100,200,300,400,500,1000]}
-                make={[1,2,3,4,5,10,15,20,25,50,75,100,200,]}
-                onAugment={(augment_take, augment_make) => {
-                  this.props.remote.augment_task(this.state.checkpoint_name, {
-                    ...this.state,
-                    augment_take,
-                    augment_make,
-                  })
-                }}
-                onTrain={() => {
-                  this.props.remote.train_task(this.state.checkpoint_name, pix2pixhd.folder_id, 1)
-                  setTimeout(() => { // auto-generate epoch demo
-                    this.props.remote.augment_task(this.state.checkpoint_name, {
-                      ...this.state,
-                      augment_take: 10,
-                      augment_make: 150,
-                      no_symlinks: true,
-                      mov: true,
-                      folder_id: this.props.pix2pixhd.data.resultsFolder.id
-                    })
-                  }, 250)
-                }}
-              />
-            </Group>
 
             <Group title='Status'>
               <Button
diff --git a/app/client/modules/pix2pixhd/views/sequence.editor.js b/app/client/modules/pix2pixhd/views/sequence.editor.js
new file mode 100644
index 0000000..9693805
--- /dev/null
+++ b/app/client/modules/pix2pixhd/views/sequence.editor.js
@@ -0,0 +1,89 @@
+import { h, Component } from 'preact'
+import { bindActionCreators } from 'redux'
+import { connect } from 'react-redux'
+import { Route, Link } from 'react-router-dom'
+
+import { Loading, FileList, FileViewer } from '../../common'
+
+import actions from '../actions'
+
+class SequenceEditor extends Component {
+  state = {
+    dir: '/',
+    files: [],
+    loading: true
+  }
+  componentDidMount() {
+    this.fetch(this.state.dir)
+  }
+  handlePick(file) {
+    console.log(file)
+    if (file.dir) {
+      this.fetch([this.state.dir, file.name].join('/').replace('//','/'))
+    } else {
+      this.fetchFile([this.state.dir, file.name].join('/').replace('//','/'))
+    }
+  }
+  fetch(dir) {
+    console.log('fetch', dir)
+    const { tool: module } = this.props.app
+    this.setState({ dir, file: null, loading: true })
+    actions.socket.list_directory({ module, dir }).then(files => {
+      console.log(files)
+      this.setState({ dir, files, loading: false })
+    })
+  }
+  fetchFile(fn) {
+    console.log('fetch file', fn)
+    const { tool: module } = this.props.app
+    this.setState({ file: null, loadingFile: true })
+    actions.socket.read_file({ module, fn }).then(file => {
+      console.log(file)
+      this.setState({ file, loadingFile: false })
+    })
+  }
+  render() {
+    const { app } = this.props
+    const {
+      loading, dir, files,
+      loadingFile, file,
+    } = this.state
+    console.log(this.props, this.state)
+    // return (
+    //   <div className='app browser'>
+    //     <h1>{dir}{dir[dir.length-1] !== '/' && '/'}</h1>
+    //     {app.tool}<br/>
+    //     {loading && <Loading />}
+    //     <FileList
+    //       files={files}
+    //       groupDirectories
+    //       parentDirectory={dir !== '/'}
+    //       orderBy='name asc'
+    //       fields={'name datetime size'}
+    //       onClick={(file, e) => {
+    //         e.preventDefault()
+    //         e.stopPropagation()
+    //         console.log('picked a result', file)
+    //         this.handlePick(file)
+    //       }}
+    //       onClickParent={e => {
+    //         console.log('navigate up')
+    //         this.fetch(this.state.dir.split('/').slice(0, -1).join('/') || '/')
+    //       }}
+    //     />
+    //     {loadingFile && <Loading />}
+    //     {file && <FileViewer file={file} />}
+    //   </div>
+    // )
+  }
+}
+
+const mapStateToProps = state => ({
+  app: state.system.app,
+})
+
+const mapDispatchToProps = (dispatch, ownProps) => ({
+  actions: bindActionCreators({}, dispatch),
+})
+
+export default connect(mapStateToProps, mapDispatchToProps)(SequenceEditor)
diff --git a/app/client/store.js b/app/client/store.js
index d6c632c..2b71e75 100644
--- a/app/client/store.js
+++ b/app/client/store.js
@@ -11,7 +11,6 @@ import liveReducer from './live/live.reducer'
 import queueReducer from './queue/queue.reducer'
 import systemReducer from './system/system.reducer'
 import uploadReducer from './dataset/upload.reducer'
-import browserReducer from './browser/browser.reducer'
 import dashboardReducer from './dashboard/dashboard.reducer'
 import audioPlayerReducer from './common/audioPlayer/audioPlayer.reducer'
 import { moduleReducer } from './modules/module.reducer'
@@ -23,7 +22,6 @@ const appReducer = combineReducers({
   queue: queueReducer,
   system: systemReducer,
   upload: uploadReducer,
-  browser: browserReducer,
   dashboard: dashboardReducer,
   audioPlayer: audioPlayerReducer,
   module: moduleReducer,
diff --git a/public/bundle.js b/public/bundle.js
index 512deb7..ae8d7cd 100644
--- a/public/bundle.js
+++ b/public/bundle.js
@@ -2801,243 +2801,6 @@ exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(
 
 /***/ }),
 
-/***/ "./app/client/browser/browser.component.js":
-/*!*************************************************!*\
-  !*** ./app/client/browser/browser.component.js ***!
-  \*************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
-
-var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
-
-var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
-
-var _reactRouterDom = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
-
-var _common = __webpack_require__(/*! ../common */ "./app/client/common/index.js");
-
-var _actions = __webpack_require__(/*! ../actions */ "./app/client/actions.js");
-
-var _actions2 = _interopRequireDefault(_actions);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-
-var Browser = function (_Component) {
-  _inherits(Browser, _Component);
-
-  function Browser() {
-    var _ref;
-
-    var _temp, _this, _ret;
-
-    _classCallCheck(this, Browser);
-
-    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
-      args[_key] = arguments[_key];
-    }
-
-    return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Browser.__proto__ || Object.getPrototypeOf(Browser)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
-      dir: '/',
-      module: 'pix2pixhd',
-      files: [],
-      loading: true
-    }, _temp), _possibleConstructorReturn(_this, _ret);
-  }
-
-  _createClass(Browser, [{
-    key: 'componentDidMount',
-    value: function componentDidMount() {
-      this.fetch(this.state.dir);
-    }
-  }, {
-    key: 'handlePick',
-    value: function handlePick(file) {
-      console.log(file);
-      if (file.dir) {
-        this.fetch([this.state.dir, file.name].join('/').replace('//', '/'));
-      } else {
-        this.fetchFile([this.state.dir, file.name].join('/').replace('//', '/'));
-      }
-    }
-  }, {
-    key: 'fetch',
-    value: function fetch(dir) {
-      var _this2 = this;
-
-      console.log('fetch', dir);
-      var module = this.state.module;
-
-      this.setState({ dir: dir, file: null, loading: true });
-      _actions2.default.socket.list_directory({ module: module, dir: dir }).then(function (files) {
-        console.log(files);
-        _this2.setState({ dir: dir, files: files, loading: false });
-      });
-    }
-  }, {
-    key: 'fetchFile',
-    value: function fetchFile(fn) {
-      var _this3 = this;
-
-      console.log('fetch file', fn);
-      var module = this.state.module;
-
-      this.setState({ file: null, loadingFile: true });
-      _actions2.default.socket.read_file({ module: module, fn: fn }).then(function (file) {
-        console.log(file);
-        _this3.setState({ file: file, loadingFile: false });
-      });
-    }
-  }, {
-    key: 'render',
-    value: function render() {
-      var _this4 = this;
-
-      var app = this.props.app;
-      var _state = this.state,
-          loading = _state.loading,
-          dir = _state.dir,
-          module = _state.module,
-          files = _state.files,
-          loadingFile = _state.loadingFile,
-          file = _state.file;
-
-      console.log(this.props, this.state);
-      return (0, _preact.h)(
-        'div',
-        { className: 'app browser' },
-        (0, _preact.h)(
-          'h1',
-          null,
-          dir,
-          dir[dir.length - 1] !== '/' && '/'
-        ),
-        app.tool,
-        (0, _preact.h)('br', null),
-        loading && (0, _preact.h)(_common.Loading, null),
-        (0, _preact.h)(_common.FileList, {
-          files: files,
-          groupDirectories: true,
-          parentDirectory: dir !== '/',
-          orderBy: 'name asc',
-          fields: 'name datetime size',
-          onClick: function onClick(file, e) {
-            e.preventDefault();
-            e.stopPropagation();
-            console.log('picked a result', file);
-            _this4.handlePick(file);
-          },
-          onClickParent: function onClickParent(e) {
-            console.log('navigate up');
-            _this4.fetch(_this4.state.dir.split('/').slice(0, -1).join('/') || '/');
-          }
-        }),
-        loadingFile && (0, _preact.h)(_common.Loading, null),
-        file && (0, _preact.h)(_common.FileViewer, { file: file })
-      );
-    }
-  }]);
-
-  return Browser;
-}(_preact.Component);
-
-var mapStateToProps = function mapStateToProps(state) {
-  return {
-    app: state.system.app
-  };
-};
-
-var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
-  return {
-    actions: (0, _redux.bindActionCreators)({}, dispatch)
-  };
-};
-
-exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Browser);
-
-/***/ }),
-
-/***/ "./app/client/browser/browser.reducer.js":
-/*!***********************************************!*\
-  !*** ./app/client/browser/browser.reducer.js ***!
-  \***********************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
-var _types = __webpack_require__(/*! ../types */ "./app/client/types.js");
-
-var _types2 = _interopRequireDefault(_types);
-
-var _moment = __webpack_require__(/*! moment/min/moment.min */ "./node_modules/moment/min/moment.min.js");
-
-var _moment2 = _interopRequireDefault(_moment);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-var FileSaver = __webpack_require__(/*! file-saver */ "./node_modules/file-saver/FileSaver.js");
-
-var browserInitialState = {
-  loading: false,
-  progress: null,
-  error: null,
-  data: {},
-  images: [],
-  files: []
-};
-
-var browserReducer = function browserReducer() {
-  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : browserInitialState;
-  var action = arguments[1];
-
-  switch (action.type) {
-    case _types2.default.app.load_progress:
-      if (!action.data || action.data.module !== 'browser') {
-        return state;
-      }
-      return _extends({}, state, {
-        loading: true,
-        progress: action.progress
-      });
-    case _types2.default.app.load:
-      return _extends({}, state, {
-        loading: false,
-        error: null,
-        data: action.data
-      });
-    default:
-      return state;
-  }
-};
-
-exports.default = browserReducer;
-
-/***/ }),
-
 /***/ "./app/client/common/audioPlayer/audioPlayer.actions.js":
 /*!**************************************************************!*\
   !*** ./app/client/common/audioPlayer/audioPlayer.actions.js ***!
@@ -3390,6 +3153,176 @@ exports.default = AugmentationGrid;
 
 /***/ }),
 
+/***/ "./app/client/common/browser.component.js":
+/*!************************************************!*\
+  !*** ./app/client/common/browser.component.js ***!
+  \************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _reactRouterDom = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
+
+var _common = __webpack_require__(/*! ../common */ "./app/client/common/index.js");
+
+var _actions = __webpack_require__(/*! ../actions */ "./app/client/actions.js");
+
+var _actions2 = _interopRequireDefault(_actions);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var Browser = function (_Component) {
+  _inherits(Browser, _Component);
+
+  function Browser() {
+    var _ref;
+
+    var _temp, _this, _ret;
+
+    _classCallCheck(this, Browser);
+
+    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+      args[_key] = arguments[_key];
+    }
+
+    return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Browser.__proto__ || Object.getPrototypeOf(Browser)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+      dir: '/',
+      files: [],
+      loading: true
+    }, _temp), _possibleConstructorReturn(_this, _ret);
+  }
+
+  _createClass(Browser, [{
+    key: 'componentDidMount',
+    value: function componentDidMount() {
+      this.fetch(this.state.dir);
+    }
+  }, {
+    key: 'handlePick',
+    value: function handlePick(file) {
+      console.log(file);
+      if (file.dir) {
+        this.fetch([this.state.dir, file.name].join('/').replace('//', '/'));
+      } else {
+        this.fetchFile([this.state.dir, file.name].join('/').replace('//', '/'));
+      }
+    }
+  }, {
+    key: 'fetch',
+    value: function fetch(dir) {
+      var _this2 = this;
+
+      console.log('fetch', dir);
+      var module = this.props.app.tool;
+
+      this.setState({ dir: dir, file: null, loading: true });
+      _actions2.default.socket.list_directory({ module: module, dir: dir }).then(function (files) {
+        console.log(files);
+        _this2.setState({ dir: dir, files: files, loading: false });
+      });
+    }
+  }, {
+    key: 'fetchFile',
+    value: function fetchFile(fn) {
+      var _this3 = this;
+
+      console.log('fetch file', fn);
+      var module = this.props.app.tool;
+
+      this.setState({ file: null, loadingFile: true });
+      _actions2.default.socket.read_file({ module: module, fn: fn }).then(function (file) {
+        console.log(file);
+        _this3.setState({ file: file, loadingFile: false });
+      });
+    }
+  }, {
+    key: 'render',
+    value: function render() {
+      var _this4 = this;
+
+      var app = this.props.app;
+      var _state = this.state,
+          loading = _state.loading,
+          dir = _state.dir,
+          files = _state.files,
+          loadingFile = _state.loadingFile,
+          file = _state.file;
+
+      console.log(this.props, this.state);
+      return (0, _preact.h)(
+        'div',
+        { className: 'app browser' },
+        (0, _preact.h)(
+          'h1',
+          null,
+          dir,
+          dir[dir.length - 1] !== '/' && '/'
+        ),
+        app.tool,
+        (0, _preact.h)('br', null),
+        loading && (0, _preact.h)(_common.Loading, null),
+        (0, _preact.h)(_common.FileList, {
+          files: files,
+          groupDirectories: true,
+          parentDirectory: dir !== '/',
+          orderBy: 'name asc',
+          fields: 'name datetime size',
+          onClick: function onClick(file, e) {
+            e.preventDefault();
+            e.stopPropagation();
+            console.log('picked a result', file);
+            _this4.handlePick(file);
+          },
+          onClickParent: function onClickParent(e) {
+            console.log('navigate up');
+            _this4.fetch(_this4.state.dir.split('/').slice(0, -1).join('/') || '/');
+          }
+        }),
+        loadingFile && (0, _preact.h)(_common.Loading, null),
+        file && (0, _preact.h)(_common.FileViewer, { file: file })
+      );
+    }
+  }]);
+
+  return Browser;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+  return {
+    app: state.system.app
+  };
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+  return {
+    actions: (0, _redux.bindActionCreators)({}, dispatch)
+  };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Browser);
+
+/***/ }),
+
 /***/ "./app/client/common/button.component.js":
 /*!***********************************************!*\
   !*** ./app/client/common/button.component.js ***!
@@ -4634,7 +4567,7 @@ exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(
 Object.defineProperty(exports, "__esModule", {
   value: true
 });
-exports.AugmentationGrid = exports.ButtonGrid = exports.TaskList = exports.CurrentTask = exports.Checkbox = exports.Button = exports.SelectGroup = exports.Select = exports.Slider = exports.NumberInput = exports.TextInput = exports.Param = exports.ParamGroup = exports.Group = exports.Player = exports.Gallery = exports.FileViewer = exports.FileUpload = exports.FileRow = exports.FileList = exports.FolderList = exports.AudioPlayer = exports.Header = exports.Progress = exports.Loading = exports.Views = undefined;
+exports.AugmentationGrid = exports.ButtonGrid = exports.TaskList = exports.CurrentTask = exports.Checkbox = exports.Button = exports.SelectGroup = exports.Select = exports.Slider = exports.NumberInput = exports.TextInput = exports.Param = exports.ParamGroup = exports.Group = exports.Browser = exports.Player = exports.Gallery = exports.FileViewer = exports.FileUpload = exports.FileRow = exports.FileList = exports.FolderList = exports.AudioPlayer = exports.Header = exports.Progress = exports.Loading = exports.Views = undefined;
 
 var _audioPlayer = __webpack_require__(/*! ./audioPlayer/audioPlayer.component */ "./app/client/common/audioPlayer/audioPlayer.component.js");
 
@@ -4644,6 +4577,10 @@ var _augmentationGrid = __webpack_require__(/*! ./augmentationGrid.component */
 
 var _augmentationGrid2 = _interopRequireDefault(_augmentationGrid);
 
+var _browser = __webpack_require__(/*! ./browser.component */ "./app/client/common/browser.component.js");
+
+var _browser2 = _interopRequireDefault(_browser);
+
 var _button = __webpack_require__(/*! ./button.component */ "./app/client/common/button.component.js");
 
 var _button2 = _interopRequireDefault(_button);
@@ -4750,6 +4687,7 @@ exports.FileUpload = _fileUpload2.default;
 exports.FileViewer = _fileViewer2.default;
 exports.Gallery = _gallery2.default;
 exports.Player = _player2.default;
+exports.Browser = _browser2.default;
 exports.Group = _group2.default;
 exports.ParamGroup = _paramGroup2.default;
 exports.Param = _param2.default;
@@ -7699,10 +7637,6 @@ var _dashboard = __webpack_require__(/*! ./dashboard/dashboard.component */ "./a
 
 var _dashboard2 = _interopRequireDefault(_dashboard);
 
-var _browser = __webpack_require__(/*! ./browser/browser.component */ "./app/client/browser/browser.component.js");
-
-var _browser2 = _interopRequireDefault(_browser);
-
 var _modules = __webpack_require__(/*! ./modules */ "./app/client/modules/index.js");
 
 var _modules2 = _interopRequireDefault(_modules);
@@ -7741,7 +7675,7 @@ var app = (0, _preact.h)(
           } }),
         (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/system', component: _system2.default }),
         (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/dashboard', component: _dashboard2.default }),
-        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/browse', component: _browser2.default }),
+        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/browse', component: _common.Browser }),
         (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/logout', component: _auth2.default.Logout }),
         (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/login', component: function component() {
             (0, _preact.h)(_reactRouterDom.Redirect, { to: '/' });
@@ -12685,6 +12619,34 @@ var Pix2PixHDTrain = function (_Component) {
                 value: this.state.epoch
               })
             ),
+            (0, _preact.h)(
+              _common.Group,
+              { title: 'Augmentation Grid' },
+              (0, _preact.h)(_common.AugmentationGrid, {
+                checkpoint: this.props.pix2pixhd.checkpoint,
+                take: [1, 2, 3, 4, 5, 10, 15, 20, 25, 50, 75, 100, 200, 300, 400, 500, 1000],
+                make: [1, 2, 3, 4, 5, 10, 15, 20, 25, 50, 75, 100, 200],
+                onAugment: function onAugment(augment_take, augment_make) {
+                  _this2.props.remote.augment_task(_this2.state.checkpoint_name, _extends({}, _this2.state, {
+                    augment_take: augment_take,
+                    augment_make: augment_make
+                  }));
+                },
+                onTrain: function onTrain() {
+                  _this2.props.remote.train_task(_this2.state.checkpoint_name, pix2pixhd.folder_id, 1);
+                  setTimeout(function () {
+                    // auto-generate epoch demo
+                    _this2.props.remote.augment_task(_this2.state.checkpoint_name, _extends({}, _this2.state, {
+                      augment_take: 10,
+                      augment_make: 150,
+                      no_symlinks: true,
+                      mov: true,
+                      folder_id: _this2.props.pix2pixhd.data.resultsFolder.id
+                    }));
+                  }, 250);
+                }
+              })
+            ),
             (0, _preact.h)(
               _common.Group,
               { title: 'Augment' },
@@ -12725,34 +12687,6 @@ var Pix2PixHDTrain = function (_Component) {
                 }
               })
             ),
-            (0, _preact.h)(
-              _common.Group,
-              { title: 'Augmentation Grid' },
-              (0, _preact.h)(_common.AugmentationGrid, {
-                checkpoint: this.props.pix2pixhd.checkpoint,
-                take: [1, 2, 3, 4, 5, 10, 15, 20, 25, 50, 75, 100, 200, 300, 400, 500, 1000],
-                make: [1, 2, 3, 4, 5, 10, 15, 20, 25, 50, 75, 100, 200],
-                onAugment: function onAugment(augment_take, augment_make) {
-                  _this2.props.remote.augment_task(_this2.state.checkpoint_name, _extends({}, _this2.state, {
-                    augment_take: augment_take,
-                    augment_make: augment_make
-                  }));
-                },
-                onTrain: function onTrain() {
-                  _this2.props.remote.train_task(_this2.state.checkpoint_name, pix2pixhd.folder_id, 1);
-                  setTimeout(function () {
-                    // auto-generate epoch demo
-                    _this2.props.remote.augment_task(_this2.state.checkpoint_name, _extends({}, _this2.state, {
-                      augment_take: 10,
-                      augment_make: 150,
-                      no_symlinks: true,
-                      mov: true,
-                      folder_id: _this2.props.pix2pixhd.data.resultsFolder.id
-                    }));
-                  }, 250);
-                }
-              })
-            ),
             (0, _preact.h)(
               _common.Group,
               { title: 'Status' },
@@ -16867,10 +16801,6 @@ var _upload = __webpack_require__(/*! ./dataset/upload.reducer */ "./app/client/
 
 var _upload2 = _interopRequireDefault(_upload);
 
-var _browser = __webpack_require__(/*! ./browser/browser.reducer */ "./app/client/browser/browser.reducer.js");
-
-var _browser2 = _interopRequireDefault(_browser);
-
 var _dashboard = __webpack_require__(/*! ./dashboard/dashboard.reducer */ "./app/client/dashboard/dashboard.reducer.js");
 
 var _dashboard2 = _interopRequireDefault(_dashboard);
@@ -16883,6 +16813,7 @@ var _module = __webpack_require__(/*! ./modules/module.reducer */ "./app/client/
 
 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
+// import navReducer from './nav.reducer'
 var appReducer = (0, _redux.combineReducers)({
   router: _reactRouterRedux.routerReducer,
   auth: _auth2.default,
@@ -16890,13 +16821,11 @@ var appReducer = (0, _redux.combineReducers)({
   queue: _queue2.default,
   system: _system2.default,
   upload: _upload2.default,
-  browser: _browser2.default,
   dashboard: _dashboard2.default,
   audioPlayer: _audioPlayer2.default,
   module: _module.moduleReducer
 });
 
-// import navReducer from './nav.reducer'
 var history = exports.history = (0, _createBrowserHistory2.default)();
 var store = exports.store = (0, _redux.createStore)(appReducer, (0, _redux.compose)((0, _redux.applyMiddleware)(
 // createLogger(),
diff --git a/public/bundle.js.map b/public/bundle.js.map
index 0871bd7..ac082d4 100644
--- a/public/bundle.js.map
+++ b/public/bundle.js.map
@@ -1 +1 @@
-{"version":3,"file":"bundle.js","sources":["webpack:///webpack/bootstrap","webpack:///./app/client/actions.js","webpack:///./app/client/api/crud.actions.js","webpack:///./app/client/api/crud.fetch.js","webpack:///./app/client/api/crud.types.js","webpack:///./app/client/api/crud.upload.js","webpack:///./app/client/api/index.js","webpack:///./app/client/api/parser.js","webpack:///./app/client/audio/lib/draw.js","webpack:///./app/client/audio/lib/index.js","webpack:///./app/client/audio/lib/output.js","webpack:///./app/client/audio/lib/spectrum.js","webpack:///./app/client/audio/lib/startAudioContext.js","webpack:///./app/client/audio/pix2wav.js","webpack:///./app/client/audio/wav2pix.js","webpack:///./app/client/auth/auth.actions.js","webpack:///./app/client/auth/auth.gate.js","webpack:///./app/client/auth/auth.reducer.js","webpack:///./app/client/auth/index.js","webpack:///./app/client/auth/login.component.js","webpack:///./app/client/auth/logout.component.js","webpack:///./app/client/auth/signup.component.js","webpack:///./app/client/browser/browser.component.js","webpack:///./app/client/browser/browser.reducer.js","webpack:///./app/client/common/audioPlayer/audioPlayer.actions.js","webpack:///./app/client/common/audioPlayer/audioPlayer.component.js","webpack:///./app/client/common/audioPlayer/audioPlayer.reducer.js","webpack:///./app/client/common/augmentationGrid.component.js","webpack:///./app/client/common/button.component.js","webpack:///./app/client/common/buttonGrid.component.js","webpack:///./app/client/common/checkbox.component.js","webpack:///./app/client/common/currentTask.component.js","webpack:///./app/client/common/fileList.component.js","webpack:///./app/client/common/fileUpload.component.js","webpack:///./app/client/common/fileViewer.component.js","webpack:///./app/client/common/folderList.component.js","webpack:///./app/client/common/gallery.component.js","webpack:///./app/client/common/group.component.js","webpack:///./app/client/common/header.component.js","webpack:///./app/client/common/index.js","webpack:///./app/client/common/loading.component.js","webpack:///./app/client/common/numberInput.component.js","webpack:///./app/client/common/param.component.js","webpack:///./app/client/common/paramGroup.component.js","webpack:///./app/client/common/player.component.js","webpack:///./app/client/common/progress.component.js","webpack:///./app/client/common/select.component.js","webpack:///./app/client/common/selectGroup.component.js","webpack:///./app/client/common/slider.component.js","webpack:///./app/client/common/taskList.component.js","webpack:///./app/client/common/textInput.component.js","webpack:///./app/client/common/views/index.js","webpack:///./app/client/common/views/new.view.js","webpack:///./app/client/dashboard/dashboard.actions.js","webpack:///./app/client/dashboard/dashboard.component.js","webpack:///./app/client/dashboard/dashboard.reducer.js","webpack:///./app/client/dashboard/dashboardheader.component.js","webpack:///./app/client/dataset/dataset.actions.js","webpack:///./app/client/dataset/dataset.component.js","webpack:///./app/client/dataset/dataset.form.js","webpack:///./app/client/dataset/dataset.loader.js","webpack:///./app/client/dataset/dataset.new.js","webpack:///./app/client/dataset/dataset.reducer.js","webpack:///./app/client/dataset/upload.reducer.js","webpack:///./app/client/dataset/upload.status.js","webpack:///./app/client/index.jsx","webpack:///./app/client/live/live.actions.js","webpack:///./app/client/live/live.reducer.js","webpack:///./app/client/live/player.js","webpack:///./app/client/live/whammy.js","webpack:///./app/client/modules/index.js","webpack:///./app/client/modules/module.reducer.js","webpack:///./app/client/modules/morph/index.js","webpack:///./app/client/modules/morph/morph.actions.js","webpack:///./app/client/modules/morph/morph.module.js","webpack:///./app/client/modules/morph/morph.reducer.js","webpack:///./app/client/modules/morph/morph.tasks.js","webpack:///./app/client/modules/morph/views/morph.app.js","webpack:///./app/client/modules/pix2pix/index.js","webpack:///./app/client/modules/pix2pix/pix2pix.actions.js","webpack:///./app/client/modules/pix2pix/pix2pix.module.js","webpack:///./app/client/modules/pix2pix/pix2pix.reducer.js","webpack:///./app/client/modules/pix2pix/pix2pix.tasks.js","webpack:///./app/client/modules/pix2pix/views/pix2pix.live.js","webpack:///./app/client/modules/pix2pix/views/pix2pix.new.js","webpack:///./app/client/modules/pix2pix/views/pix2pix.show.js","webpack:///./app/client/modules/pix2pixhd/index.js","webpack:///./app/client/modules/pix2pixhd/pix2pixhd.actions.js","webpack:///./app/client/modules/pix2pixhd/pix2pixhd.module.js","webpack:///./app/client/modules/pix2pixhd/pix2pixhd.reducer.js","webpack:///./app/client/modules/pix2pixhd/pix2pixhd.tasks.js","webpack:///./app/client/modules/pix2pixhd/views/pix2pixhd.live.js","webpack:///./app/client/modules/pix2pixhd/views/pix2pixhd.new.js","webpack:///./app/client/modules/pix2pixhd/views/pix2pixhd.results.js","webpack:///./app/client/modules/pix2pixhd/views/pix2pixhd.show.js","webpack:///./app/client/modules/pix2pixhd/views/pix2pixhd.train.js","webpack:///./app/client/modules/pix2wav/index.js","webpack:///./app/client/modules/pix2wav/pix2wav.actions.js","webpack:///./app/client/modules/pix2wav/pix2wav.module.js","webpack:///./app/client/modules/pix2wav/pix2wav.reducer.js","webpack:///./app/client/modules/pix2wav/pix2wav.tasks.js","webpack:///./app/client/modules/pix2wav/views/pix2wav.live.js","webpack:///./app/client/modules/pix2wav/views/pix2wav.new.js","webpack:///./app/client/modules/pix2wav/views/pix2wav.show.js","webpack:///./app/client/modules/pix2wav/views/spectrogram.upload.js","webpack:///./app/client/modules/samplernn/index.js","webpack:///./app/client/modules/samplernn/samplernn.actions.js","webpack:///./app/client/modules/samplernn/samplernn.module.js","webpack:///./app/client/modules/samplernn/samplernn.reducer.js","webpack:///./app/client/modules/samplernn/samplernn.tasks.js","webpack:///./app/client/modules/samplernn/views/samplernn.graph.js","webpack:///./app/client/modules/samplernn/views/samplernn.import.js","webpack:///./app/client/modules/samplernn/views/samplernn.new.js","webpack:///./app/client/modules/samplernn/views/samplernn.results.js","webpack:///./app/client/modules/samplernn/views/samplernn.show.js","webpack:///./app/client/queue/queue.actions.js","webpack:///./app/client/queue/queue.reducer.js","webpack:///./app/client/socket/index.js","webpack:///./app/client/socket/socket.actions.js","webpack:///./app/client/socket/socket.api.js","webpack:///./app/client/socket/socket.connection.js","webpack:///./app/client/socket/socket.live.js","webpack:///./app/client/socket/socket.system.js","webpack:///./app/client/socket/socket.task.js","webpack:///./app/client/store.js","webpack:///./app/client/system/system.actions.js","webpack:///./app/client/system/system.component.js","webpack:///./app/client/system/system.reducer.js","webpack:///./app/client/types.js","webpack:///./app/client/util/format.js","webpack:///./app/client/util/hidpi-canvas.js","webpack:///./app/client/util/index.js","webpack:///./app/client/util/math.js","webpack:///./app/client/util/sort.js","webpack:///./node_modules/fetch-jsonp/build/fetch-jsonp.js","webpack:///./node_modules/fft.js/lib/fft.js","webpack:///./node_modules/file-saver/FileSaver.js","webpack:///./node_modules/history/DOMUtils.js","webpack:///./node_modules/history/LocationUtils.js","webpack:///./node_modules/history/PathUtils.js","webpack:///./node_modules/history/createBrowserHistory.js","webpack:///./node_modules/history/createTransitionManager.js","webpack:///./node_modules/invariant/browser.js","webpack:///./node_modules/jszip/lib/base64.js","webpack:///./node_modules/jszip/lib/compressedObject.js","webpack:///./node_modules/jszip/lib/compressions.js","webpack:///./node_modules/jszip/lib/crc32.js","webpack:///./node_modules/jszip/lib/defaults.js","webpack:///./node_modules/jszip/lib/external.js","webpack:///./node_modules/jszip/lib/flate.js","webpack:///./node_modules/jszip/lib/generate/ZipFileWorker.js","webpack:///./node_modules/jszip/lib/generate/index.js","webpack:///./node_modules/jszip/lib/index.js","webpack:///./node_modules/jszip/lib/load.js","webpack:///./node_modules/jszip/lib/nodejs/NodejsStreamInputAdapter.js","webpack:///./node_modules/jszip/lib/nodejs/NodejsStreamOutputAdapter.js","webpack:///./node_modules/jszip/lib/nodejsUtils.js","webpack:///./node_modules/jszip/lib/object.js","webpack:///./node_modules/jszip/lib/readable-stream-browser.js","webpack:///./node_modules/jszip/lib/reader/ArrayReader.js","webpack:///./node_modules/jszip/lib/reader/DataReader.js","webpack:///./node_modules/jszip/lib/reader/NodeBufferReader.js","webpack:///./node_modules/jszip/lib/reader/StringReader.js","webpack:///./node_modules/jszip/lib/reader/Uint8ArrayReader.js","webpack:///./node_modules/jszip/lib/reader/readerFor.js","webpack:///./node_modules/jszip/lib/signature.js","webpack:///./node_modules/jszip/lib/stream/ConvertWorker.js","webpack:///./node_modules/jszip/lib/stream/Crc32Probe.js","webpack:///./node_modules/jszip/lib/stream/DataLengthProbe.js","webpack:///./node_modules/jszip/lib/stream/DataWorker.js","webpack:///./node_modules/jszip/lib/stream/GenericWorker.js","webpack:///./node_modules/jszip/lib/stream/StreamHelper.js","webpack:///./node_modules/jszip/lib/support.js","webpack:///./node_modules/jszip/lib/utf8.js","webpack:///./node_modules/jszip/lib/utils.js","webpack:///./node_modules/jszip/lib/zipEntries.js","webpack:///./node_modules/jszip/lib/zipEntry.js","webpack:///./node_modules/jszip/lib/zipObject.js","webpack:///./node_modules/jszip/node_modules/core-js/library/fn/set-immediate.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_a-function.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_an-object.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_cof.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_core.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_ctx.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_descriptors.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_dom-create.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_export.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_fails.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_global.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_hide.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_html.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_ie8-dom-define.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_invoke.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_is-object.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_object-dp.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_property-desc.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_task.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_to-primitive.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/web.immediate.js","webpack:///./node_modules/jszip/node_modules/immediate/lib/browser.js","webpack:///./node_modules/jszip/node_modules/lie/lib/browser.js","webpack:///./node_modules/jszip/node_modules/pako/index.js","webpack:///./node_modules/jszip/node_modules/pako/lib/deflate.js","webpack:///./node_modules/jszip/node_modules/pako/lib/inflate.js","webpack:///./node_modules/jszip/node_modules/pako/lib/utils/common.js","webpack:///./node_modules/jszip/node_modules/pako/lib/utils/strings.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/adler32.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/constants.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/crc32.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/deflate.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/gzheader.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/inffast.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/inflate.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/inftrees.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/messages.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/trees.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/zstream.js","webpack:///./node_modules/moment/min/moment.min.js","webpack:///./node_modules/node-fetch/browser.js","webpack:///./node_modules/preact-compat/dist/preact-compat.es.js","webpack:///./node_modules/preact-compat/node_modules/fbjs/lib/emptyFunction.js","webpack:///./node_modules/preact-compat/node_modules/fbjs/lib/invariant.js","webpack:///./node_modules/preact-compat/node_modules/fbjs/lib/warning.js","webpack:///./node_modules/preact-compat/node_modules/object-assign/index.js","webpack:///./node_modules/preact-compat/node_modules/prop-types/checkPropTypes.js","webpack:///./node_modules/preact-compat/node_modules/prop-types/factoryWithTypeCheckers.js","webpack:///./node_modules/preact-compat/node_modules/prop-types/index.js","webpack:///./node_modules/preact-compat/node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack:///./node_modules/preact/dist/preact.esm.js","webpack:///./node_modules/react-redux/es/components/Provider.js","webpack:///./node_modules/react-redux/es/components/connectAdvanced.js","webpack:///./node_modules/react-redux/es/connect/connect.js","webpack:///./node_modules/react-redux/es/connect/mapDispatchToProps.js","webpack:///./node_modules/react-redux/es/connect/mapStateToProps.js","webpack:///./node_modules/react-redux/es/connect/mergeProps.js","webpack:///./node_modules/react-redux/es/connect/selectorFactory.js","webpack:///./node_modules/react-redux/es/connect/verifySubselectors.js","webpack:///./node_modules/react-redux/es/connect/wrapMapToProps.js","webpack:///./node_modules/react-redux/es/index.js","webpack:///./node_modules/react-redux/es/utils/PropTypes.js","webpack:///./node_modules/react-redux/es/utils/Subscription.js","webpack:///./node_modules/react-redux/es/utils/shallowEqual.js","webpack:///./node_modules/react-redux/es/utils/verifyPlainObject.js","webpack:///./node_modules/react-redux/es/utils/warning.js","webpack:///./node_modules/react-redux/node_modules/fbjs/lib/emptyFunction.js","webpack:///./node_modules/react-redux/node_modules/fbjs/lib/invariant.js","webpack:///./node_modules/react-redux/node_modules/fbjs/lib/warning.js","webpack:///./node_modules/react-redux/node_modules/hoist-non-react-statics/index.js","webpack:///./node_modules/react-redux/node_modules/invariant/browser.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/_Symbol.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/_baseGetTag.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/_freeGlobal.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/_getPrototype.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/_getRawTag.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/_objectToString.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/_overArg.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/_root.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/isObjectLike.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/isPlainObject.js","webpack:///./node_modules/react-redux/node_modules/object-assign/index.js","webpack:///./node_modules/react-redux/node_modules/prop-types/checkPropTypes.js","webpack:///./node_modules/react-redux/node_modules/prop-types/factoryWithTypeCheckers.js","webpack:///./node_modules/react-redux/node_modules/prop-types/index.js","webpack:///./node_modules/react-redux/node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack:///./node_modules/react-router-dom/es/BrowserRouter.js","webpack:///./node_modules/react-router-dom/es/HashRouter.js","webpack:///./node_modules/react-router-dom/es/Link.js","webpack:///./node_modules/react-router-dom/es/MemoryRouter.js","webpack:///./node_modules/react-router-dom/es/NavLink.js","webpack:///./node_modules/react-router-dom/es/Prompt.js","webpack:///./node_modules/react-router-dom/es/Redirect.js","webpack:///./node_modules/react-router-dom/es/Route.js","webpack:///./node_modules/react-router-dom/es/Router.js","webpack:///./node_modules/react-router-dom/es/StaticRouter.js","webpack:///./node_modules/react-router-dom/es/Switch.js","webpack:///./node_modules/react-router-dom/es/index.js","webpack:///./node_modules/react-router-dom/es/matchPath.js","webpack:///./node_modules/react-router-dom/es/withRouter.js","webpack:///./node_modules/react-router-dom/node_modules/fbjs/lib/emptyFunction.js","webpack:///./node_modules/react-router-dom/node_modules/fbjs/lib/invariant.js","webpack:///./node_modules/react-router-dom/node_modules/fbjs/lib/warning.js","webpack:///./node_modules/react-router-dom/node_modules/history/DOMUtils.js","webpack:///./node_modules/react-router-dom/node_modules/history/LocationUtils.js","webpack:///./node_modules/react-router-dom/node_modules/history/PathUtils.js","webpack:///./node_modules/react-router-dom/node_modules/history/createBrowserHistory.js","webpack:///./node_modules/react-router-dom/node_modules/history/createHashHistory.js","webpack:///./node_modules/react-router-dom/node_modules/history/createTransitionManager.js","webpack:///./node_modules/react-router-dom/node_modules/history/es/DOMUtils.js","webpack:///./node_modules/react-router-dom/node_modules/history/es/LocationUtils.js","webpack:///./node_modules/react-router-dom/node_modules/history/es/PathUtils.js","webpack:///./node_modules/react-router-dom/node_modules/history/es/createBrowserHistory.js","webpack:///./node_modules/react-router-dom/node_modules/history/es/createHashHistory.js","webpack:///./node_modules/react-router-dom/node_modules/history/es/createMemoryHistory.js","webpack:///./node_modules/react-router-dom/node_modules/history/es/createTransitionManager.js","webpack:///./node_modules/react-router-dom/node_modules/history/es/index.js","webpack:///./node_modules/react-router-dom/node_modules/hoist-non-react-statics/index.js","webpack:///./node_modules/react-router-dom/node_modules/invariant/browser.js","webpack:///./node_modules/react-router-dom/node_modules/isarray/index.js","webpack:///./node_modules/react-router-dom/node_modules/object-assign/index.js","webpack:///./node_modules/react-router-dom/node_modules/path-to-regexp/index.js","webpack:///./node_modules/react-router-dom/node_modules/prop-types/checkPropTypes.js","webpack:///./node_modules/react-router-dom/node_modules/prop-types/factoryWithTypeCheckers.js","webpack:///./node_modules/react-router-dom/node_modules/prop-types/index.js","webpack:///./node_modules/react-router-dom/node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/MemoryRouter.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/Prompt.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/Redirect.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/Route.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/Router.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/StaticRouter.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/Switch.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/generatePath.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/matchPath.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/withRouter.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/node_modules/warning/warning.js","webpack:///./node_modules/react-router-dom/node_modules/resolve-pathname/index.js","webpack:///./node_modules/react-router-dom/node_modules/value-equal/index.js","webpack:///./node_modules/react-router-dom/node_modules/warning/browser.js","webpack:///./node_modules/react-router-redux/lib/actions.js","webpack:///./node_modules/react-router-redux/lib/index.js","webpack:///./node_modules/react-router-redux/lib/middleware.js","webpack:///./node_modules/react-router-redux/lib/reducer.js","webpack:///./node_modules/react-router-redux/lib/sync.js","webpack:///./node_modules/redux-thunk/lib/index.js","webpack:///./node_modules/redux/es/redux.js","webpack:///./node_modules/redux/node_modules/symbol-observable/es/index.js","webpack:///./node_modules/redux/node_modules/symbol-observable/es/ponyfill.js","webpack:///./node_modules/resolve-pathname/index.js","webpack:///./node_modules/signal-windows/index.js","webpack:///./node_modules/signal-windows/src/framer.js","webpack:///./node_modules/signal-windows/src/windows.js","webpack:///./node_modules/sprintf-js/src/sprintf.js","webpack:///./node_modules/tone/build/Tone.js","webpack:///./node_modules/uuid/lib/bytesToUuid.js","webpack:///./node_modules/uuid/lib/rng-browser.js","webpack:///./node_modules/uuid/v1.js","webpack:///./node_modules/value-equal/index.js","webpack:///./node_modules/warning/browser.js","webpack:///(webpack)/buildin/amd-define.js","webpack:///(webpack)/buildin/amd-options.js","webpack:///(webpack)/buildin/global.js","webpack:///(webpack)/buildin/harmony-module.js","webpack:///(webpack)/buildin/module.js","webpack:///(webpack)/node_modules/base64-js/index.js","webpack:///(webpack)/node_modules/buffer/index.js","webpack:///(webpack)/node_modules/core-util-is/lib/util.js","webpack:///(webpack)/node_modules/events/events.js","webpack:///(webpack)/node_modules/ieee754/index.js","webpack:///(webpack)/node_modules/inherits/inherits_browser.js","webpack:///(webpack)/node_modules/isarray/index.js","webpack:///(webpack)/node_modules/process-nextick-args/index.js","webpack:///(webpack)/node_modules/process/browser.js","webpack:///(webpack)/node_modules/readable-stream/duplex-browser.js","webpack:///(webpack)/node_modules/readable-stream/lib/_stream_duplex.js","webpack:///(webpack)/node_modules/readable-stream/lib/_stream_passthrough.js","webpack:///(webpack)/node_modules/readable-stream/lib/_stream_readable.js","webpack:///(webpack)/node_modules/readable-stream/lib/_stream_transform.js","webpack:///(webpack)/node_modules/readable-stream/lib/_stream_writable.js","webpack:///(webpack)/node_modules/readable-stream/lib/internal/streams/BufferList.js","webpack:///(webpack)/node_modules/readable-stream/lib/internal/streams/destroy.js","webpack:///(webpack)/node_modules/readable-stream/lib/internal/streams/stream-browser.js","webpack:///(webpack)/node_modules/readable-stream/passthrough.js","webpack:///(webpack)/node_modules/readable-stream/readable-browser.js","webpack:///(webpack)/node_modules/readable-stream/transform.js","webpack:///(webpack)/node_modules/readable-stream/writable-browser.js","webpack:///(webpack)/node_modules/safe-buffer/index.js","webpack:///(webpack)/node_modules/setimmediate/setImmediate.js","webpack:///(webpack)/node_modules/stream-browserify/index.js","webpack:///(webpack)/node_modules/string_decoder/lib/string_decoder.js","webpack:///(webpack)/node_modules/timers-browserify/main.js","webpack:///(webpack)/node_modules/util-deprecate/browser.js"],"sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./app/client/index.jsx\");\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _redux = require('redux');\n\nvar _api = require('./api');\n\nvar _live = require('./live/live.actions');\n\nvar liveActions = _interopRequireWildcard(_live);\n\nvar _queue = require('./queue/queue.actions');\n\nvar queueActions = _interopRequireWildcard(_queue);\n\nvar _system = require('./system/system.actions');\n\nvar systemActions = _interopRequireWildcard(_system);\n\nvar _socket = require('./socket/socket.actions');\n\nvar socketActions = _interopRequireWildcard(_socket);\n\nvar _dataset = require('./dataset/dataset.actions');\n\nvar datasetActions = _interopRequireWildcard(_dataset);\n\nvar _audioPlayer = require('./common/audioPlayer/audioPlayer.actions');\n\nvar audioPlayerActions = _interopRequireWildcard(_audioPlayer);\n\nvar _store = require('./store');\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nexports.default = Object.keys(_api.actions).map(function (a) {\n  return [a, _api.actions[a]];\n}).concat([['live', liveActions], ['queue', queueActions], ['system', systemActions], ['dataset', datasetActions], ['audioPlayer', audioPlayerActions]]).map(function (p) {\n  return [p[0], (0, _redux.bindActionCreators)(p[1], _store.store.dispatch)];\n}).concat([['socket', socketActions]]).reduce(function (a, b) {\n  return (a[b[0]] = b[1]) && a;\n}, {});","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.crud_action = undefined;\nexports.crud_actions = crud_actions;\n\nvar _crud = require('./crud.fetch');\n\nvar _crud2 = require('./crud.types');\n\nvar _crud3 = require('./crud.upload');\n\nfunction crud_actions(type) {\n  var fetch_type = (0, _crud.crud_fetch)(type);\n  return ['index', 'show', 'create', 'update', 'destroy'].reduce(function (lookup, param) {\n    lookup[param] = crud_action(type, param, function (q) {\n      return fetch_type[param](q);\n    });\n    return lookup;\n  }, {\n    action: function action(method, fn) {\n      return crud_action(type, method, fn);\n    },\n    upload: function upload(id, fd) {\n      return (0, _crud3.upload_action)(type, id, fd);\n    }\n  });\n}\n\nvar crud_action = exports.crud_action = function crud_action(type, method, fn) {\n  return function (q) {\n    return function (dispatch) {\n      return new Promise(function (resolve, reject) {\n        dispatch({ type: (0, _crud2.as_type)(type, method + '_loading') });\n        fn(q).then(function (data) {\n          dispatch({ type: (0, _crud2.as_type)(type, method), data: data });\n          resolve(data);\n        }).catch(function (e) {\n          dispatch({ type: (0, _crud2.as_type)(type, method + '_error') });\n          reject(e);\n        });\n      });\n    };\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.destroy = undefined;\nexports.crud_fetch = crud_fetch;\nexports._get_headers = _get_headers;\nexports.post = post;\nexports.postBody = postBody;\nexports.put = put;\n\nvar _nodeFetch = require('node-fetch');\n\nvar _nodeFetch2 = _interopRequireDefault(_nodeFetch);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction crud_fetch(type, tag) {\n  var uri = '/api/' + type + '/' + (tag || '');\n  return {\n    index: function index(q) {\n      return (0, _nodeFetch2.default)(_get_url(uri, q), _get_headers()).then(function (req) {\n        return req.json();\n      }).catch(error);\n    },\n\n    show: function show(id) {\n      return (0, _nodeFetch2.default)(uri + id, _get_headers(), _get_headers()).then(function (req) {\n        return req.json();\n      }).catch(error);\n    },\n\n    create: function create(data) {\n      return (0, _nodeFetch2.default)(uri, post(data)).then(function (req) {\n        return req.json();\n      }).catch(error);\n    },\n\n    update: function update(data) {\n      return (0, _nodeFetch2.default)(uri + data.id, put(data)).then(function (req) {\n        return req.json();\n      }).catch(error);\n    },\n\n    destroy: function destroy(data) {\n      return (0, _nodeFetch2.default)(uri + data.id, _destroy(data)).then(function (req) {\n        return req.json();\n      }).catch(error);\n    }\n  };\n}\n\nfunction _get_url(_url, data) {\n  var url = new URL(window.location.origin + _url);\n  if (data) {\n    Object.keys(data).forEach(function (key) {\n      return url.searchParams.append(key, data[key]);\n    });\n  }\n  return url;\n}\nfunction _get_headers() {\n  return {\n    method: 'GET',\n    credentials: 'same-origin',\n    headers: {\n      'Accept': 'application/json'\n    }\n  };\n}\nfunction post(data) {\n  return {\n    method: 'POST',\n    body: JSON.stringify(data),\n    credentials: 'same-origin',\n    headers: {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json'\n    }\n  };\n}\nfunction postBody(data) {\n  return {\n    method: 'POST',\n    body: data,\n    credentials: 'same-origin',\n    headers: {\n      'Accept': 'application/json'\n    }\n  };\n}\nfunction put(data) {\n  return {\n    method: 'PUT',\n    body: JSON.stringify(data),\n    credentials: 'same-origin',\n    headers: {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json'\n    }\n  };\n}\nfunction _destroy(data) {\n  return {\n    method: 'DELETE',\n    body: JSON.stringify(data),\n    credentials: 'same-origin',\n    headers: {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json'\n    }\n  };\n}\nexports.destroy = _destroy;\nfunction error(err) {\n  console.warn(err);\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nvar as_type = exports.as_type = function as_type(a, b) {\n  return [a, b].join('_').toUpperCase();\n};\n\nvar with_type = exports.with_type = function with_type(type, actions) {\n  return actions.reduce(function (a, b) {\n    return (a[b] = as_type(type, b)) && a;\n  }, {});\n};\n\nvar crud_type = exports.crud_type = function crud_type(type) {\n  var actions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n  return with_type(type, actions.concat(['index_loading', 'index', 'index_error', 'show_loading', 'show', 'show_error', 'create_loading', 'create', 'create_error', 'update_loading', 'update', 'update_error', 'destroy_loading', 'destroy', 'destroy_error', 'upload_loading', 'upload_progress', 'upload_waiting', 'upload_complete', 'upload_error', 'sort']));\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.upload_action = undefined;\nexports.crud_upload = crud_upload;\n\nvar _crud = require('./crud.types');\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction crud_upload(type, fd, data, dispatch) {\n  return new Promise(function (resolve, reject) {\n    var id = data.id;\n\n    Object.keys(data).forEach(function (key) {\n      if (key !== 'id') {\n        fd.append(key, data[key]);\n      }\n    });\n\n    console.log('/api/' + type + '/' + id + '/upload/');\n\n    var xhr = new XMLHttpRequest();\n    xhr.upload.addEventListener(\"progress\", uploadProgress, false);\n    xhr.addEventListener(\"load\", uploadComplete, false);\n    xhr.addEventListener(\"error\", uploadFailed, false);\n    xhr.addEventListener(\"abort\", uploadCancelled, false);\n    xhr.open(\"POST\", '/api/' + type + '/' + id + '/upload/');\n    xhr.send(fd);\n\n    dispatch && dispatch({ type: (0, _crud.as_type)(type, 'upload_loading') });\n\n    var complete = false;\n\n    function uploadProgress(e) {\n      if (e.lengthComputable) {\n        var percent = Math.round(e.loaded * 100 / e.total) || 0;\n        if (percent > 99) {\n          dispatch && dispatch(_defineProperty({\n            type: (0, _crud.as_type)(type, 'upload_waiting'),\n            percent: percent\n          }, type, id));\n        } else {\n          dispatch && dispatch(_defineProperty({\n            type: (0, _crud.as_type)(type, 'upload_progress'),\n            percent: percent\n          }, type, id));\n        }\n      } else {\n        dispatch && dispatch(_defineProperty({\n          type: (0, _crud.as_type)(type, 'upload_error'),\n          error: 'unable to compute upload progress'\n        }, type, id));\n      }\n    }\n\n    function uploadComplete(e) {\n      var parsed = void 0;\n      try {\n        parsed = JSON.parse(e.target.responseText);\n      } catch (e) {\n        dispatch && dispatch(_defineProperty({\n          type: (0, _crud.as_type)(type, 'upload_error'),\n          error: 'upload failed'\n        }, type, id));\n        reject(e);\n        return;\n      }\n      dispatch && dispatch(_defineProperty({\n        type: (0, _crud.as_type)(type, 'upload_complete'),\n        data: parsed\n      }, type, id));\n      if (parsed.files && parsed.files.length) {\n        parsed.files.forEach(function (file) {\n          console.log(file);\n          dispatch && dispatch({\n            type: (0, _crud.as_type)('file', 'create'),\n            data: file\n          });\n        });\n      }\n      resolve(parsed);\n    }\n\n    function uploadFailed(evt) {\n      dispatch && dispatch(_defineProperty({\n        type: (0, _crud.as_type)(type, 'upload_error'),\n        error: 'upload failed'\n      }, type, id));\n      reject(evt);\n    }\n\n    function uploadCancelled(evt) {\n      dispatch && dispatch(_defineProperty({\n        type: (0, _crud.as_type)(type, 'upload_error'),\n        error: 'upload cancelled'\n      }, type, id));\n      reject(evt);\n    }\n  });\n}\n\nvar upload_action = exports.upload_action = function upload_action(type, id, fd) {\n  return function (dispatch) {\n    return crud_upload(type, id, fd, dispatch);\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.actions = exports.parser = exports.util = undefined;\n\nvar _crud = require('./crud.actions');\n\nvar _util = require('../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _parser = require('./parser');\n\nvar parser = _interopRequireWildcard(_parser);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/*\nfor our crud events, create corresponding actions\nthe actions fire a 'loading' event, call the underlying api method, and then resolve.\nso you can do ... \n  import { folderActions } from '../../api'\n  folderActions.index({ module: 'samplernn' })\n  folderActions.show(12)\n  folderActions.create({ module: 'samplernn', name: 'foo' })\n  folderActions.update(12, { module: 'pix2pix' })\n  folderActions.destroy(12, { confirm: true })\n  folderActions.upload(12, form_data)\n*/\n\nexports.util = _util2.default;\nexports.parser = parser;\nvar actions = exports.actions = ['folder', 'file', 'dataset', 'task', 'user'].reduce(function (a, b) {\n  return (a[b] = (0, _crud.crud_actions)(b)) && a;\n}, {});","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.tumblr = exports.thumbnail = exports.loadImage = exports.tag = exports.parse = exports.lookup = exports.integrations = undefined;\n\nvar _nodeFetch = require('node-fetch');\n\nvar _nodeFetch2 = _interopRequireDefault(_nodeFetch);\n\nvar _fetchJsonp = require('fetch-jsonp');\n\nvar _fetchJsonp2 = _interopRequireDefault(_fetchJsonp);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar integrations = exports.integrations = [{\n  type: 'image',\n  regex: /\\.(jpeg|jpg|gif|png|svg)(\\?.*)?$/i,\n  fetch: function fetch(url, done) {\n    var img = new Image();\n    img.onload = function () {\n      if (!img) return;\n      var width = img.naturalWidth,\n          height = img.naturalHeight;\n      img = null;\n      done({\n        url: url,\n        type: \"image\",\n        token: \"\",\n        thumbnail: \"\",\n        title: \"\",\n        width: width,\n        height: height\n      });\n    };\n    img.src = url;\n    if (img.complete) {\n      img.onload();\n    }\n  },\n  tag: function tag(media) {\n    return '<img src=\"' + media.url + '\">';\n  }\n}, {\n  type: 'video',\n  regex: /\\.(mp4|webm)(\\?.*)?$/i,\n  fetch: function fetch(url, done) {\n    var video = document.createElement(\"video\");\n    var url_parts = url.replace(/\\?.*$/, \"\").split(\"/\");\n    var filename = url_parts[url_parts.length - 1];\n    video.addEventListener(\"loadedmetadata\", function () {\n      var width = video.videoWidth,\n          height = video.videoHeight;\n      video = null;\n      done({\n        url: url,\n        type: \"video\",\n        token: url,\n        thumbnail: \"/public/assets/img/video-thumbnail.png\",\n        title: filename,\n        width: width,\n        height: height\n      });\n    });\n    video.src = url;\n    video.load();\n  },\n  tag: function tag(media) {\n    return '<video src=\"' + media.url + '\">';\n  }\n}, {\n  type: 'audio',\n  regex: /\\.(wav|mp3)(\\?.*)?$/i,\n  fetch: function fetch(url, done) {\n    var audio = document.createElement(\"audio\");\n    var url_parts = url.replace(/\\?.*$/, \"\").split(\"/\");\n    var filename = url_parts[url_parts.length - 1];\n    audio.addEventListener(\"loadedmetadata\", function () {\n      var duration = audio.duration;\n      audio = null;\n      done({\n        url: url,\n        type: \"audio\",\n        token: url,\n        thumbnail: \"/public/assets/img/audio-thumbnail.png\",\n        title: filename,\n        duration: duration\n      });\n    });\n    audio.src = url;\n    audio.load();\n  },\n  tag: function tag(media) {\n    return '<audio src=\"' + media.url + '\">';\n  }\n}, {\n  type: 'youtube',\n  regex: /(?:youtube\\.com\\/(?:[^\\/]+\\/.+\\/|(?:v|e(?:mbed)?)\\/|.*[?&]v=)|youtu\\.be\\/)([^\"&?\\/ ]{11})/i,\n  fetch: function fetch(url, done) {\n    var id = (url.match(/v=([-_a-zA-Z0-9]{11})/i) || url.match(/youtu.be\\/([-_a-zA-Z0-9]{11})/i) || url.match(/embed\\/([-_a-zA-Z0-9]{11})/i))[1].split('&')[0];\n    var thumb = \"https://i.ytimg.com/vi/\" + id + \"/hqdefault.jpg\";\n\n    var jsonp_url = new URL('https://www.googleapis.com/youtube/v3/videos');\n    var data = {\n      id: id,\n      key: \"AIzaSyCaLRGY-hxs92045X-Jew7w1FgQPkStHgc\",\n      part: \"id,contentDetails,snippet,status\"\n    };\n    Object.keys(data).forEach(function (key) {\n      return jsonp_url.searchParams.append(key, data[key]);\n    });\n\n    (0, _fetchJsonp2.default)(jsonp_url.toString()).then(function (result) {\n      return result.json();\n    }).then(function (result) {\n      if (!result || !result.items.length) {\n        return alert(\"Sorry, this video URL is invalid.\");\n      }\n      var res = result.items[0];\n      // console.log(res)\n\n      var dd = res.contentDetails.duration.match(/\\d+/g).map(function (i) {\n        return parseInt(i);\n      });\n      var duration = 0;\n      if (dd.length == 3) {\n        duration = dd[0] * 60 + dd[1] * 60 + dd[2];\n      } else if (dd.length == 2) {\n        duration = dd[0] * 60 + dd[1];\n      } else {\n        duration = dd[0];\n      }\n\n      [\"maxres\", \"high\", \"medium\", \"standard\", \"default\"].some(function (t) {\n        if (res.snippet.thumbnails[t]) {\n          thumb = res.snippet.thumbnails[t].url;\n          return true;\n        }\n        return false;\n      });\n\n      done({\n        url: url,\n        type: \"youtube\",\n        token: id,\n        thumbnail: thumb,\n        title: res.snippet.title,\n        duration: duration,\n        width: 640,\n        height: 360\n      });\n    });\n  },\n  tag: function tag(media) {\n    // return '<img class=\"video\" type=\"youtube\" vid=\"'+media.token+'\" src=\"'+media.thumbnail+'\"><span class=\"playvid\">&#9654;</span>';\n    return '<div class=\"video\" style=\"width: ' + media.width + 'px; height: ' + media.height + 'px; overflow: hidden; position: relative;\"><iframe frameborder=\"0\" scrolling=\"no\" seamless=\"seamless\" webkitallowfullscreen=\"webkitAllowFullScreen\" mozallowfullscreen=\"mozallowfullscreen\" allowfullscreen=\"allowfullscreen\" id=\"okplayer\" width=\"' + media.width + '\" height=\"' + media.height + '\" src=\"https://youtube.com/embed/' + media.token + '?showinfo=0\" style=\"position: absolute; top: 0px; left: 0px; width: ' + media.width + 'px; height: ' + media.height + 'px;\"></iframe></div>';\n  }\n}, {\n  type: 'vimeo',\n  regex: /vimeo.com\\/\\d+$/i,\n  fetch: function fetch(url, done) {\n    var id = url.match(/\\d+$/i)[0];\n    (0, _nodeFetch2.default)('https://vimeo.com/api/v2/video/' + id + '.json').then(function (result) {\n      return result.json();\n    }).then(function (result) {\n      if (result.length == 0) {\n        return done(id, \"\", 640, 360);\n      }\n      var res = result[0];\n      if (res.embed_privacy != \"anywhere\") {\n        alert(\"Sorry, the author of this video has marked it private, preventing it from being embedded.\", function () {});\n        return;\n      }\n      done({\n        url: url,\n        type: \"vimeo\",\n        token: id,\n        thumbnail: res.thumbnail_large,\n        duration: res.duration,\n        title: res.title,\n        width: res.width,\n        height: res.height\n      });\n    });\n  },\n  tag: function tag(media) {\n    // return '<img class=\"video\" type=\"vimeo\" vid=\"'+media.token+'\" src=\"'+media.thumbnail+'\"><span class=\"playvid\">&#9654;</span>';\n    return '<div class=\"video\" style=\"width: ' + media.width + 'px; height: ' + media.height + 'px; overflow: hidden; position: relative;\"><iframe frameborder=\"0\" scrolling=\"no\" seamless=\"seamless\" webkitallowfullscreen=\"webkitAllowFullScreen\" mozallowfullscreen=\"mozallowfullscreen\" allowfullscreen=\"allowfullscreen\" id=\"okplayer\" src=\"https://player.vimeo.com/video/' + media.token + '?api=1&title=0&byline=0&portrait=0&playbar=0&player_id=okplayer&loop=0&autoplay=0\" width=\"' + media.width + '\" height=\"' + media.height + '\" style=\"position: absolute; top: 0px; left: 0px; width: ' + media.width + 'px; height: ' + media.height + 'px;\"></iframe></div>';\n  }\n},\n// {\n//   type: 'soundcloud',\n//   regex: /soundcloud.com\\/[-a-zA-Z0-9]+\\/[-a-zA-Z0-9]+\\/?$/i,\n//   fetch: function (url, done) {\n//     fetch('https://api.soundcloud.com/resolve.json?url=' \n//         + url\n//         + '&client_id=' \n//         + '0673fbe6fc794a7750f680747e863b10')\n//     .then(result => result.json())\n//     .then(result => {\n//         console.log(result)\n//         done({\n//           url: url,\n//           type: \"soundcloud\",\n//           token: result.id,\n//           thumbnail: result.artwork_url || result.user.avatar_url,\n//           title: result.user.username + \" - \" + result.title,\n//           duration: result.duration,\n//           width: 166,\n//           height: 166,\n//         })\n//     })\n//   },\n//   tag: function (media) {\n//     return '<iframe width=\"166\" height=\"166\" scrolling=\"no\" frameborder=\"no\"' +\n//         'src=\"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/' + media.token +\n//         '&amp;color=ff6600&amp;auto_play=false&amp;show_artwork=true\"></iframe>'\n//   }\n// },\n{\n  type: 'link',\n  regex: /^http.+/i,\n  fetch: function fetch(url, done) {\n    done({\n      url: url,\n      type: \"link\",\n      token: \"\",\n      thumbnail: \"\",\n      title: \"\",\n      width: 100,\n      height: 100\n    });\n  },\n  tag: function tag(media) {\n    return '<a href=\"' + media.url + '\" target=\"_blank\">' + media.url + '</a>';\n  }\n}];\n\nvar lookup = exports.lookup = integrations.reduce(function (a, b) {\n  return (a[b.type] = b) && a;\n}, {});\n\nvar parse = exports.parse = function parse(url, cb) {\n  var matched = integrations.some(function (integration) {\n    if (integration.regex.test(url)) {\n      integration.fetch(url, function (res) {\n        cb(res);\n      });\n      return true;\n    }\n    return false;\n  });\n  if (!matched) {\n    cb(null);\n  }\n};\n\nvar tag = exports.tag = function tag(media) {\n  if (media.type in lookup) {\n    return lookup[media.type].tag(media);\n  }\n  return \"\";\n};\n\nvar loadImage = exports.loadImage = function loadImage(url, cb, error) {\n  if (lookup.image.regex.test(url)) {\n    lookup.image.fetch(url, function (media) {\n      cb(media);\n    });\n  } else error && error();\n};\n\nvar thumbnail = exports.thumbnail = function thumbnail(media) {\n  return '<img src=\"' + (media.thumbnail || media.url) + '\" class=\"thumb\">';\n};\n\nvar tumblr = exports.tumblr = function tumblr(url, cb) {\n  var domain = url.replace(/^https?:\\/\\//, \"\").split(\"/\")[0];\n  if (domain.indexOf(\".\") == -1) {\n    domain += \".tumblr.com\";\n  }\n  (0, _fetchJsonp2.default)(\"http://\" + domain + \"/api/read\").then(function (data) {\n    // const blog = data.tumblelog\n    var media_list = data.posts.reduce(parseTumblrPost, []);\n    cb(media_list);\n  });\n};\n\nfunction parseTumblrPost(media_list, post) {\n  var media = void 0,\n      caption = void 0,\n      url = void 0;\n  switch (post.type) {\n    case 'photo':\n      caption = stripHTML(post['photo-caption']);\n      if (post.photos.length) {\n        post.photos.forEach(function (photo) {\n          media = {\n            url: photo['photo-url-1280'],\n            type: \"image\",\n            token: \"\",\n            thumbnail: photo['photo-url-500'],\n            description: caption,\n            width: parseInt(photo.width),\n            height: parseInt(photo.height)\n          };\n          media_list.push(media);\n        });\n      } else {\n        media = {\n          url: post['photo-url-1280'],\n          type: \"image\",\n          token: \"\",\n          thumbnail: post['photo-url-500'],\n          description: caption,\n          width: parseInt(post.width),\n          height: parseInt(post.height)\n        };\n        media_list.push(media);\n      }\n      break;\n    case 'video':\n      url = post['video-source'];\n      if (url.indexOf(\"http\") !== 0) {\n        break;\n      }\n      if (lookup.youtube.regex.test(url)) {\n        var id = (url.match(/v=([-_a-zA-Z0-9]{11})/i) || url.match(/youtu.be\\/([-_a-zA-Z0-9]{11})/i) || url.match(/embed\\/([-_a-zA-Z0-9]{11})/i))[1].split('&')[0];\n        var thumb = \"https://i.ytimg.com/vi/\" + id + \"/hqdefault.jpg\";\n        media = {\n          url: post['video-source'],\n          type: \"youtube\",\n          token: id,\n          thumbnail: thumb,\n          title: stripHTML(post['video-caption']),\n          width: 640,\n          height: 360\n        };\n        media_list.push(media);\n      }\n      break;\n    default:\n      break;\n  }\n  return media_list;\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.spectrum = spectrum;\nexports.raw_spectrum = raw_spectrum;\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar scratch = document.createElement('canvas');\nvar scratchCtx = scratch.getContext('2d-lodpi');\n\nvar w = 256;\nvar h = 256;\n\nfunction spectrum(spec, x0, y0, ww, hh) {\n  var data = spec.data;\n  var fft_size = spec.fft_size;\n  var half_fft_size = spec.fft_size / 2;\n  var spec_len = data.length;\n\n  scratch.width = data.length;\n  scratch.height = half_fft_size;\n\n  var imageData = ctx.createImageData(scratch.width, scratch.height);\n  var pixels = imageData.data;\n\n  var i = void 0,\n      j = void 0,\n      u = void 0,\n      v = void 0,\n      _r = void 0,\n      _i = void 0,\n      col = void 0,\n      hsl = void 0;\n\n  for (i = 0; i < spec_len; i++) {\n    col = data[i];\n\n    for (j = 0; j < half_fft_size; j++) {\n      u = ((half_fft_size - j) * spec_len + i) * 4;\n      v = j * 2;\n      _r = col[v];\n      _i = mod(col[v + 1], Math.PI * 2) / (Math.PI * 2);\n      hsl = color.hsl2rgb((_i + 1) / 2, 1.0, 1 - Math.abs(_r / 10));\n      // red - real part\n      // pixels[u] = _r * 127 + 127\n      // // green - imag part\n      // pixels[u+1] = _i * 127 + 127\n      // // blue - magnitude\n      // pixels[u+2] = Math.sqrt(Math.pow(_r, 2) + Math.pow(_i, 2)) * 128 + 127\n      // pixels[u+3] = 255\n      pixels[u] = hsl[0];\n      pixels[u + 1] = hsl[1];\n      pixels[u + 2] = hsl[2];\n      pixels[u + 3] = 255;\n    }\n  }\n\n  scratchCtx.putImageData(imageData, 0, 0);\n\n  var pcm_length = spec.fft_overlap * spec_len;\n\n  x0 = x0 * devicePixelRatio || 0;\n  y0 = y0 * devicePixelRatio || Math.floor(h / 4);\n  ww = ww * devicePixelRatio || w;\n  hh = hh * devicePixelRatio || h / 4;\n\n  var width = Math.round(pcm_length / spec.sr * pixels_per_second);\n  var height = Math.floor(hh);\n\n  ctx.save();\n  clear(1, x0, y0, w, height);\n  ctx.drawImage(scratch, x0, y0, width, height);\n  ctx.restore();\n}\n\nfunction raw_spectrum(spec, x0, y0, ww, hh, def_min_r, def_min_i) {\n  var data = spec.data;\n  var fft_size = spec.fft_size;\n  var half_fft_size = spec.fft_size / 2;\n  var spec_len = data.length;\n\n  var _scratch = document.createElement('canvas');\n  var _scratchCtx = _scratch.getContext('2d-lodpi');\n  _scratch.width = data.length;\n  _scratch.height = half_fft_size;\n  // console.log(\"spectrum w/h:\", _scratch.width, _scratch.height)\n\n  var imageData = _scratchCtx.createImageData(_scratch.width, _scratch.height);\n  var pixels = imageData.data;\n\n  var i = void 0,\n      j = void 0,\n      u = void 0,\n      v = void 0,\n      _r = void 0,\n      _i = void 0,\n      col = void 0,\n      hsl = void 0;\n  // let min_r = Infinity, max_r = -Infinity\n  // let min_i = Infinity, max_i = -Infinity\n\n  // determined empirically..\n  // let min_r = -60.4894057005308\n  // let max_r = 107.23800966675353\n  // let min_i = -59.4894057005308\n  // let max_i = 108.23800966675353\n  var min_r = -def_min_r;\n  var max_r = def_min_r;\n  var min_i = -def_min_i;\n  var max_i = def_min_i;\n  var delta_r = max_r - min_r;\n  var delta_i = max_i - min_i;\n  var mean_r = 0;\n  var mean_i = 0;\n  var sum_mean_r = 0,\n      sum_mean_i = 0;\n  var real = void 0,\n      imag = void 0;\n\n  for (i = 0; i < spec_len; i++) {\n    col = data[i];\n    mean_r = 0;\n    mean_i = 0;\n\n    for (j = 0; j < half_fft_size; j++) {\n      u = (j * spec_len + i) * 4;\n      v = j * 2;\n      real = col[v];\n      imag = col[v + 1];\n      mean_r += real;\n      mean_i += imag;\n      _r = _util2.default.clamp((real - min_r) / delta_r * 255, 0, 255);\n      _i = _util2.default.clamp((imag - min_i) / delta_i * 255, 0, 255);\n\n      // hsl = color.hsl2rgb((_i + 1) / 2, 1.0, 1 - Math.abs(_r / 10))\n      pixels[u + 0] = _r;\n      pixels[u + 1] = _i;\n      pixels[u + 2] = 127; // hsl[2]\n      pixels[u + 3] = 255;\n\n      // min_r = Math.min(min_r, col[v])\n      // max_r = Math.max(max_r, col[v])\n      // min_i = Math.min(min_i, col[v]+1)\n      // max_i = Math.max(max_i, col[v]+1)\n    }\n    mean_r /= half_fft_size;\n    mean_i /= half_fft_size;\n    sum_mean_r += mean_r;\n    sum_mean_i += mean_i;\n  }\n\n  sum_mean_r /= spec_len;\n  sum_mean_i /= spec_len;\n  // console.log(sum_mean_r, sum_mean_i)\n  // console.log(\"r:\", min_r, max_r)\n  // console.log(\"i:\", min_i, max_i)\n  _scratchCtx.putImageData(imageData, 0, 0);\n\n  return { canvas: _scratch, imageData: imageData };\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.requestAudioContext = requestAudioContext;\n\nvar _tone = require('tone');\n\nvar _tone2 = _interopRequireDefault(_tone);\n\nvar _startAudioContext = require('./startAudioContext');\n\nvar _startAudioContext2 = _interopRequireDefault(_startAudioContext);\n\nvar _util = require('../../util');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction requestAudioContext(fn) {\n  if (_util.is_mobile) {\n    var container = document.createElement('div');\n    var button = document.createElement('div');\n    button.innerHTML = 'Tap to start - please unmute your phone';\n    Object.assign(container.style, {\n      display: 'block',\n      position: 'absolute',\n      width: '100%',\n      height: '100%',\n      zIndex: '10000',\n      top: '0px',\n      left: '0px',\n      backgroundColor: 'rgba(0, 0, 0, 0.8)'\n    });\n    Object.assign(button.style, {\n      display: 'block',\n      position: 'absolute',\n      left: '50%',\n      top: '50%',\n      padding: '20px',\n      backgroundColor: '#7F33ED',\n      color: 'white',\n      fontFamily: 'monospace',\n      borderRadius: '3px',\n      transform: 'translate3D(-50%,-50%,0)',\n      textAlign: 'center',\n      lineHeight: '1.5',\n      width: '150px'\n    });\n    container.appendChild(button);\n    document.body.appendChild(container);\n    _startAudioContext2.default.setContext(_tone2.default.context);\n    _startAudioContext2.default.on(button);\n    _startAudioContext2.default.onStarted(function (_) {\n      container.remove();\n      fn();\n    });\n  } else {\n    fn();\n  }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _tone = require('tone');\n\nvar _tone2 = _interopRequireDefault(_tone);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// const compressor = new Tone.Compressor(-30, 3).toMaster()\n\nvar compressor = new _tone2.default.Compressor(-30, 3).toMaster();\nvar gain = new _tone2.default.Gain(1).connect(compressor);\n\nexports.default = gain;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _tone = require('tone');\n\nvar _tone2 = _interopRequireDefault(_tone);\n\nvar _util = require('../../util');\n\nvar _signalWindows = require('signal-windows');\n\nvar _fft = require('fft.js');\n\nvar _fft2 = _interopRequireDefault(_fft);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar fft_size = 512;\nvar fft_overlap = fft_size / 4;\n\nvar fft = new _fft2.default(fft_size);\n\nfunction toSpectrum(pcm, sr) {\n  sr = sr || 44100;\n  var ham = _signalWindows.windows.construct('ham', fft_size);\n  var pcm_in = new Array(fft_size);\n  var pcm_length = pcm.length;\n  var pcm_q_length = Math.ceil(pcm_length / fft_size) * fft_size;\n  var i = void 0,\n      j = void 0,\n      fft_out = void 0,\n      data = [];\n  for (i = -fft_size; i < pcm_q_length; i += fft_overlap) {\n    for (j = 0; j < fft_size; j++) {\n      pcm_in[j] = pcm[i + j] * ham[j] || 0;\n    }\n    fft_out = fft.createComplexArray();\n    fft.realTransform(fft_out, pcm_in);\n    fft.completeSpectrum(fft_out);\n    data.push(fft_out);\n  }\n  return {\n    data: data,\n    sr: sr,\n    fft_size: fft_size,\n    fft_overlap: fft_overlap\n  };\n}\n\nfunction fromSpectrum(spec) {\n  var data = spec.data;\n  var sr = spec.sr;\n  var fft_size = spec.fft_size;\n  var fft_overlap = spec.fft_overlap;\n  var spec_len = data.length;\n\n  var ham = _signalWindows.windows.construct('ham', fft_size);\n  var out = fft.createComplexArray();\n  var pcm_length = fft_overlap * spec_len;\n\n  var audioBuffer = _tone2.default.context.createBuffer(1, pcm_length, sr);\n  var pcm = audioBuffer.getChannelData(0);\n\n  var i = void 0,\n      j = void 0,\n      u = void 0,\n      col = void 0;\n\n  for (i = 0; i < spec_len; i++) {\n    col = data[i];\n    // for (j = fft_size; j < fft_size << 1; j++) {\n    //   col[j] = 0\n    // }\n    // if (i == 0) console.log(col)\n    fft.inverseTransform(out, col);\n    u = i * fft_overlap;\n    for (j = 0; j < fft_size; j++) {\n      pcm[u + j] += out[j * 2] * ham[j] || 0;\n    }\n  }\n\n  fadeInOut(pcm, fft_size);\n  // console.log(pcm)\n  return audioBuffer;\n}\n\nfunction fromImageData(imageData, sr, _r, _i) {\n  var pixels = imageData.data;\n  var w = imageData.width;\n  var h = imageData.height;\n  var data = new Array(w);\n  var x = void 0,\n      y = void 0,\n      u = void 0,\n      v = void 0,\n      v2 = void 0;\n  for (y = 0; y < h; y++) {\n    var col = data[y] = new Float32Array(h * 4);\n    for (x = 0; x < w; x++) {\n      u = (x * w + y) * 4;\n      v = x * 2;\n      col[v] = (pixels[u] / 255 - 0.5) * _r;\n      col[v + 1] = (pixels[u + 1] / 255 - 0.5) * _i;\n      v2 = (h - y + h) * 2;\n      col[v2] = col[v];\n      col[v2 + 1] = 0; // col[v+1]\n    }\n    col[h * 2] = col[h * 2 + 1] = col[h * 2 - 1] = col[h * 2 - 2] = 0;\n  }\n  var spec = {\n    data: data,\n    sr: sr,\n    fft_size: fft_size, fft_overlap: fft_overlap\n  };\n  return spec;\n}\n\nfunction binToHz(spec, i) {\n  return i / spec.fft_size * spec.sr;\n}\n\nfunction fadeInOut(pcm, fade_size) {\n  var pcm_length = pcm.length;\n  var fade = 0,\n      i = void 0;\n  for (i = 0; i < fade_size; i++) {\n    fade = i / fade_size;\n    fade *= fade;\n    pcm[i] *= fade;\n    pcm[pcm_length - i] *= fade;\n  }\n}\nfunction rotatePhase(spec, theta) {\n  var data = spec.data,\n      fft_size = spec.fft_size;\n\n  var i = void 0,\n      j = void 0,\n      col = void 0,\n      len = data.length;\n  for (i = 0; i < len; i++) {\n    col = data[i];\n    for (j = 0; j < fft_size; j++) {\n      col[j * 2 + 1] += theta;\n    }\n  }\n  return spec;\n}\n\nfunction linearBins(spec, n) {\n  n = n || 1;\n\n  var bins = [],\n      i = void 0,\n      q_i = void 0;\n  for (q_i = 0; q_i < n; q_i++) {\n    bins[q_i] = [];\n  }\n  var step = Math.floor(spec.fft_size / n);\n  var len_quantize_n = (0, _util.quantize)(spec.fft_size, n);\n  for (i = 0; i < len_quantize_n; i++) {\n    q_i = Math.floor(i / step);\n    bins[q_i] = bins[q_i] || [];\n    bins[q_i].push(i);\n  }\n  // leftover bins get put at end\n  for (; i < spec.fft_size; i++) {\n    bins[q_i].push(i);\n  }\n  return bins;\n}\nfunction logarithmicBins(spec) {\n  var bins = [],\n      i = void 0,\n      j = void 0,\n      q_i = void 0;\n  var binCount = Math.log2(spec.fft_size) - 1;\n  for (i = 0, q_i = 0, j = 0; i < binCount; i++) {\n    j += 1 << i;\n    bins[i] = [];\n    for (; q_i < j; q_i++) {\n      bins[i].push(q_i);\n    }\n  }\n  return bins;\n}\nfunction concatBins(bins) {\n  return bins.reduce(function (acc, cv) {\n    return acc.concat(cv);\n  }, []);\n}\nfunction reverseBins(bins) {\n  return bins.map(function (bin) {\n    return bin.reverse();\n  });\n}\nfunction minBins(bins) {\n  return bins.map(function (bin) {\n    var b = bin[0];\n    return bin.map(function () {\n      return b;\n    });\n  });\n}\nfunction maxBins(bins) {\n  return bins.map(function (bin) {\n    var b = bin[bin.length - 1];\n    return bin.map(function () {\n      return b;\n    });\n  });\n}\nfunction rotateSpectrum(spec, n) {\n  var fft_size = spec.fft_size;\n\n  if (n && n < 1) {\n    n -= 0.5;\n    n *= fft_size;\n  }\n  n = Math.floor(n);\n  var order = new Array(fft_size),\n      i = void 0;\n  for (i = 0; i < fft_size; i++) {\n    order[i] = (0, _util.mod)(i + n, fft_size / 2);\n  }\n  return reorderBins(spec, order);\n}\nfunction cloneSpectrum(spec) {\n  var data = spec.data,\n      fft_size = spec.fft_size,\n      sr = spec.sr,\n      fft_overlap = spec.fft_overlap;\n\n  var spec_len = data.length;\n\n  var new_data = new Array(spec_len);\n  var i = void 0;\n  for (i = 0; i < spec_len; i++) {\n    new_data[i] = data[i].concat();\n    new_data[i][2] = 0;\n  }\n\n  return {\n    data: new_data,\n    fft_size: fft_size,\n    sr: sr, fft_overlap: fft_overlap\n  };\n}\nfunction reverseSpectrum(spec) {\n  var new_spec = cloneSpectrum(spec);\n  new_spec.data = new_spec.data.reverse();\n  return new_spec;\n}\nfunction shuffleSpectrum(spec) {\n  var fft_size = spec.fft_size;\n\n  var order = new Array(fft_size),\n      i = void 0;\n  for (i = 0; i < fft_size; i++) {\n    order[i] = i;\n  }\n  (0, _util.shuffle)(order);\n  return reorderBins(spec, order);\n}\nfunction invertSpectrum(spec) {\n  var fft_size = spec.fft_size;\n\n  var order = new Array(fft_size),\n      i = void 0;\n  for (i = 0; i < fft_size; i++) {\n    order[i] = fft_size - i - 1;\n  }\n  return reorderBins(spec, order);\n}\nfunction reorderBins(spec, order) {\n  var new_spec = cloneSpectrum(spec);\n  var data = spec.data,\n      sr = spec.sr,\n      fft_size = spec.fft_size,\n      fft_overlap = spec.fft_overlap;\n\n  var spec_len = data.length;\n  var new_data = new_spec.data;\n\n\n  var i = void 0,\n      j = void 0,\n      col = void 0,\n      new_col = void 0;\n  for (j = order.length; j < fft_size; j++) {\n    order[j] = j;\n  }\n\n  for (i = 0; i < spec_len; i++) {\n    col = data[i];\n    new_col = new_data[i] = data[i].concat();\n    col[0] = 0;\n    col[2] = 0;\n    col[4] = 0;\n    for (j = 0; j < fft_size / 2; j++) {\n      new_col[j * 2] = col[order[j] * 2];\n      new_col[j * 2 + 1] = col[order[j] * 2 + 1];\n    }\n    for (; j < fft_size; j++) {\n      new_col[j * 2] = 0;\n      new_col[j * 2 + 1] = 0;\n    }\n  }\n\n  return {\n    data: new_data,\n    sr: sr, fft_size: fft_size, fft_overlap: fft_overlap\n  };\n}\n\nexports.default = {\n  fft_size: fft_size, fft_overlap: fft_overlap,\n  toSpectrum: toSpectrum, fromSpectrum: fromSpectrum, fromImageData: fromImageData, binToHz: binToHz,\n  fadeInOut: fadeInOut,\n  cloneSpectrum: cloneSpectrum,\n  reverseSpectrum: reverseSpectrum, shuffleSpectrum: shuffleSpectrum, invertSpectrum: invertSpectrum, rotateSpectrum: rotateSpectrum,\n  reorderBins: reorderBins,\n  linearBins: linearBins, logarithmicBins: logarithmicBins,\n  concatBins: concatBins,\n  reverseBins: reverseBins, minBins: minBins, maxBins: maxBins,\n  rotatePhase: rotatePhase\n};","\"use strict\";\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/**\n *  StartAudioContext.js\n *  @author Yotam Mann\n *  @license http://opensource.org/licenses/MIT MIT License\n *  @copyright 2016 Yotam Mann\n */\n(function (root, factory) {\n  if (typeof define === \"function\" && define.amd) {\n    define([], factory);\n  } else if ((typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) === 'object' && module.exports) {\n    module.exports = factory();\n  } else {\n    root.StartAudioContext = factory();\n  }\n})(undefined, function () {\n\n  /**\n   * The StartAudioContext object\n   */\n  var StartAudioContext = {\n    /**\n     * The audio context passed in by the user\n     * @type {AudioContext}\n     */\n    context: null,\n    /**\n     * The TapListeners bound to the elements\n     * @type {Array}\n     * @private\n     */\n    _tapListeners: [],\n    /**\n     * Callbacks to invoke when the audio context is started\n     * @type {Array}\n     * @private\n     */\n    _onStarted: []\n  };\n\n  /**\n   * Set the context\n   * @param {AudioContext} ctx\n   * @returns {StartAudioContext}\n   */\n  StartAudioContext.setContext = function (ctx) {\n    StartAudioContext.context = ctx;\n    return StartAudioContext;\n  };\n\n  /**\n   * Add a tap listener to the audio context\n   * @param  {Array|Element|String|jQuery} element\n   * @returns {StartAudioContext}\n   */\n  StartAudioContext.on = function (element) {\n    if (Array.isArray(element) || NodeList && element instanceof NodeList) {\n      for (var i = 0; i < element.length; i++) {\n        StartAudioContext.on(element[i]);\n      }\n    } else if (typeof element === \"string\") {\n      StartAudioContext.on(document.querySelectorAll(element));\n    } else if (element.jquery && typeof element.toArray === \"function\") {\n      StartAudioContext.on(element.toArray());\n    } else if (Element && element instanceof Element) {\n      //if it's an element, create a TapListener\n      var tap = new TapListener(element, onTap);\n      StartAudioContext._tapListeners.push(tap);\n    }\n    return StartAudioContext;\n  };\n\n  /**\n   * Bind a callback to when the audio context is started. \n   * @param {Function} cb\n   * @return {StartAudioContext}\n   */\n  StartAudioContext.onStarted = function (cb) {\n    //if it's already started, invoke the callback\n    if (StartAudioContext.isStarted()) {\n      cb();\n    } else {\n      StartAudioContext._onStarted.push(cb);\n    }\n    return StartAudioContext;\n  };\n\n  /**\n   * returns true if the context is started\n   * @return {Boolean}\n   */\n  StartAudioContext.isStarted = function () {\n    return StartAudioContext.context !== null && StartAudioContext.context.state === \"running\";\n  };\n\n  /**\n   * @class  Listens for non-dragging tap ends on the given element\n   * @param {Element} element\n   * @internal\n   */\n  var TapListener = function TapListener(element) {\n\n    this._dragged = false;\n\n    this._element = element;\n\n    this._bindedMove = this._moved.bind(this);\n    this._bindedEnd = this._ended.bind(this);\n\n    element.addEventListener(\"touchmove\", this._bindedMove);\n    element.addEventListener(\"touchend\", this._bindedEnd);\n    element.addEventListener(\"mouseup\", this._bindedEnd);\n  };\n\n  /**\n   * drag move event\n   */\n  TapListener.prototype._moved = function (e) {\n    this._dragged = true;\n  };\n\n  /**\n   * tap ended listener\n   */\n  TapListener.prototype._ended = function (e) {\n    if (!this._dragged) {\n      onTap();\n    }\n    this._dragged = false;\n  };\n\n  /**\n   * remove all the bound events\n   */\n  TapListener.prototype.dispose = function () {\n    this._element.removeEventListener(\"touchmove\", this._bindedMove);\n    this._element.removeEventListener(\"touchend\", this._bindedEnd);\n    this._element.removeEventListener(\"mouseup\", this._bindedEnd);\n    this._bindedMove = null;\n    this._bindedEnd = null;\n    this._element = null;\n  };\n\n  /**\n   * Invoked the first time of the elements is tapped.\n   * Creates a silent oscillator when a non-dragging touchend \n   * event has been triggered.\n   */\n  function onTap() {\n    //start the audio context with a silent oscillator\n    if (StartAudioContext.context && !StartAudioContext.isStarted()) {\n      var osc = StartAudioContext.context.createOscillator();\n      var silent = StartAudioContext.context.createGain();\n      silent.gain.value = 0;\n      osc.connect(silent);\n      silent.connect(StartAudioContext.context.destination);\n      var now = StartAudioContext.context.currentTime;\n      osc.start(now);\n      osc.stop(now + 0.5);\n    }\n\n    //dispose all the tap listeners\n    if (StartAudioContext._tapListeners) {\n      for (var i = 0; i < StartAudioContext._tapListeners.length; i++) {\n        StartAudioContext._tapListeners[i].dispose();\n      }\n      StartAudioContext._tapListeners = null;\n    }\n    //the onstarted callbacks\n    if (StartAudioContext._onStarted) {\n      for (var j = 0; j < StartAudioContext._onStarted.length; j++) {\n        StartAudioContext._onStarted[j]();\n      }\n      StartAudioContext._onStarted = null;\n    }\n  }\n\n  return StartAudioContext;\n});","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.play = play;\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _tone = require('tone');\n\nvar _tone2 = _interopRequireDefault(_tone);\n\nvar _draw = require('./lib/draw');\n\nvar draw = _interopRequireWildcard(_draw);\n\nvar _output = require('./lib/output');\n\nvar _output2 = _interopRequireDefault(_output);\n\nvar _spectrum = require('./lib/spectrum');\n\nvar _spectrum2 = _interopRequireDefault(_spectrum);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _r = 8;\nvar _i = 8;\n\nfunction play(frame) {\n  // const { canvas, imageData } = draw.raw_spectrum(fft, 0, 256, 0, 256, 1, 1)\n  // console.log(_r, _i)\n  // const { canvas, imageData } = draw.raw_spectrum(player.fft, 0, 256, 0, 256, _r, _i)\n  var new_fft = _spectrum2.default.fromImageData(frame.imageData, 44100, _r, _i);\n  // gallery.innerHTML = ''\n\n  // console.log(player.fft.data, new_fft.data)\n  var buf = _spectrum2.default.fromSpectrum(new_fft);\n  var _p = new _tone2.default.Player(buf);\n  _p.connect(_output2.default);\n  _p.start(_tone2.default.now());\n  // redraw(new_fft)\n}\n// function redraw(new_fft){\n//   const { canvas, imageData } = draw.raw_spectrum(new_fft, 0, 256, 0, 256, _r, _i)\n// }","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.buildZip = exports.renderFrames = exports.loadPCM = exports.loadBuffer = exports.spectrum = exports.FRAME_STEP = exports.FRAME_LENGTH = undefined;\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _tone = require('tone');\n\nvar _tone2 = _interopRequireDefault(_tone);\n\nvar _jszip = require('jszip');\n\nvar _jszip2 = _interopRequireDefault(_jszip);\n\nvar _sprintfJs = require('sprintf-js');\n\nvar _draw = require('./lib/draw');\n\nvar draw = _interopRequireWildcard(_draw);\n\nvar _output = require('./lib/output');\n\nvar _output2 = _interopRequireDefault(_output);\n\nvar _spectrum = require('./lib/spectrum');\n\nvar _spectrum2 = _interopRequireDefault(_spectrum);\n\nvar _lib = require('./lib');\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar FRAME_LENGTH = exports.FRAME_LENGTH = 126 * 255;\nvar FRAME_STEP = exports.FRAME_STEP = Math.round(FRAME_LENGTH / 4);\n\nvar _r = 8;\nvar _i = 8;\n\nexports.spectrum = _spectrum2.default;\n// requestAudioContext(() => {})\n\nvar loadBuffer = exports.loadBuffer = function loadBuffer(file) {\n  return new Promise(function (resolve, reject) {\n    var url = URL.createObjectURL(file);\n    var buffer = new _tone2.default.Buffer(url, loadBuffer, function (err) {\n      console.error('err', err);\n      reject(err);\n    });\n    function loadBuffer() {\n      URL.revokeObjectURL(url);\n      resolve(buffer);\n    }\n  });\n};\n\nvar loadPCM = exports.loadPCM = function loadPCM(file) {\n  return new Promise(function (resolve, reject) {\n    // if we've already fetched this file...\n    if (file.pcm) {\n      return resolve(file);\n    }\n    loadBuffer(file).then(function (buffer) {\n      var pcm = buffer._buffer.getChannelData(0);\n      var sr = buffer._buffer.sampleRate;\n      if (!pcm) return reject();\n      console.log(pcm.length, sr);\n      resolve({ file: file, buffer: buffer, pcm: pcm, sr: sr });\n    });\n  });\n};\n\nvar renderFrames = exports.renderFrames = function renderFrames(file, _ref) {\n  var _ref$frame_step = _ref.frame_step,\n      frame_step = _ref$frame_step === undefined ? FRAME_STEP : _ref$frame_step,\n      _ref$frame_start = _ref.frame_start,\n      frame_start = _ref$frame_start === undefined ? 0 : _ref$frame_start,\n      _ref$max = _ref.max,\n      max = _ref$max === undefined ? 12 : _ref$max;\n  return function (dispatch) {\n    return new Promise(function (resolve, reject) {\n      loadPCM(file).then(function (pcmProps) {\n        var file = pcmProps.file,\n            buffer = pcmProps.buffer,\n            pcm = pcmProps.pcm,\n            sr = pcmProps.sr;\n\n        dispatch({ type: _types2.default.wav2pix.load });\n        var frames = [];\n        var count = 0;\n        var _len = pcm.length - FRAME_LENGTH;\n        var offset = Math.round(_len * frame_start);\n        for (; offset < _len && count < max; offset += frame_step, count += 1) {\n          frames.push(render(pcm.slice(offset, offset + FRAME_LENGTH), sr, count));\n        }\n        dispatch({ type: _types2.default.wav2pix.finish, message: 'Rendered ' + count + ' images' });\n        resolve({ pcm: pcmProps, frames: frames });\n      });\n    });\n  };\n};\n\nvar buildZip = exports.buildZip = function buildZip(name, file, _ref2) {\n  var _ref2$frame_step = _ref2.frame_step,\n      frame_step = _ref2$frame_step === undefined ? FRAME_STEP : _ref2$frame_step,\n      _ref2$frame_start = _ref2.frame_start,\n      frame_start = _ref2$frame_start === undefined ? 0 : _ref2$frame_start,\n      _ref2$max = _ref2.max,\n      max = _ref2$max === undefined ? 10000 : _ref2$max;\n  return function (dispatch) {\n    return new Promise(function (resolve, reject) {\n      loadPCM(file).then(function (_ref3) {\n        var buffer = _ref3.buffer,\n            pcm = _ref3.pcm,\n            sr = _ref3.sr;\n\n        dispatch({ type: _types2.default.wav2pix.load });\n\n        var zip = new _jszip2.default();\n        var zip_folder = zip.folder(\"wav2pix_\" + name);\n\n        var steps = (pcm.length - FRAME_LENGTH) / frame_step;\n        console.log(steps);\n\n        var count = 0;\n        var _len = pcm.length - FRAME_LENGTH;\n        var offset = Math.round(_len * frame_start);\n        for (; offset < _len && count < max; offset += frame_step, count += 1) {\n          if (count % 10 === 0) {\n            dispatch({ type: _types2.default.wav2pix.progress, progress: { i: count / max * 6, n: 6 } });\n          }\n          render(pcm.slice(offset, offset + FRAME_LENGTH), sr, count, zip_folder);\n        }\n\n        // dispatch event\n        dispatch({ type: _types2.default.wav2pix.finish, message: 'Rendered ' + count + ' images' });\n        zip.generateAsync({ type: \"blob\" }).then(function (content) {\n          dispatch({ type: _types2.default.wav2pix.zip, size: content.size });\n          // FileSaver.saveAs(content, \"wav2pix_\" + name + \".zip\")\n          resolve({\n            zip: content,\n            filename: \"wav2pix_\" + name + \".zip\",\n            count: count\n          });\n        });\n      });\n    });\n  };\n};\n\nfunction render(pcm, sr, count, zip) {\n  var fft = _spectrum2.default.toSpectrum(pcm, sr);\n  // console.log('render', fft)\n  // const pcm_rev = pcm.slice().reverse()\n  // const spec_rev = spectrum.toSpectrum(pcm_rev, spec.sr)\n\n  var _draw$raw_spectrum = draw.raw_spectrum(fft, 0, 256, 0, 256, _r, _i),\n      canvas = _draw$raw_spectrum.canvas,\n      imageData = _draw$raw_spectrum.imageData;\n\n  if (zip) {\n    var name = (0, _sprintfJs.sprintf)('frame_%05d.png', count);\n    var dataURL = canvas.toDataURL(\"image/png\");\n    zip.file(name, dataURL.split(',')[1], { base64: true });\n  }\n  return { fft: fft, canvas: canvas, imageData: imageData };\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.clearCurrentUser = exports.setCurrentUser = exports.setError = exports.setReturnTo = exports.setToken = undefined;\nexports.initialized = initialized;\nexports.loading = loading;\nexports.InvalidCredentialsException = InvalidCredentialsException;\nexports.login = login;\nexports.signup = signup;\nexports.checkin = checkin;\nexports.logout = logout;\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _crud = require('../api/crud.fetch');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar setToken = exports.setToken = function setToken(data) {\n  return { type: _types2.default.auth.set_token, data: data };\n};\nvar setReturnTo = exports.setReturnTo = function setReturnTo(data) {\n  return { type: _types2.default.auth.set_return_to, data: data };\n};\nvar setError = exports.setError = function setError(data) {\n  return { type: _types2.default.auth.set_error, data: data };\n};\nvar setCurrentUser = exports.setCurrentUser = function setCurrentUser(data) {\n  return { type: _types2.default.auth.set_current_user, data: data };\n};\nvar clearCurrentUser = exports.clearCurrentUser = function clearCurrentUser() {\n  return { type: _types2.default.auth.logout_user };\n};\nfunction initialized() {\n  return { type: _types2.default.auth.initialized };\n}\nfunction loading() {\n  return { type: _types2.default.auth.loading };\n}\n\nfunction InvalidCredentialsException(message) {\n  this.message = message;\n  this.name = 'InvalidCredentialsException';\n}\n\nvar api = {\n  login: '/api/login',\n  logout: '/api/logout',\n  signup: '/api/signup',\n  checkin: '/api/checkin'\n};\n\nfunction login(username, password) {\n  return function (dispatch) {\n    dispatch(loading());\n    fetch(api.login, (0, _crud.put)({\n      username: username,\n      password: password\n    })).then(function (req) {\n      return req.json();\n    }).then(function (data) {\n      console.log(data);\n      console.log('logged in', data.user.username);\n      dispatch(setCurrentUser(data.user));\n    }).catch(function (error) {\n      console.error('login error', error);\n      dispatch(setError(true));\n    });\n  };\n}\n\nfunction signup(data) {\n  return function (dispatch) {\n    dispatch(loading());\n    fetch(api.signup, (0, _crud.put)(data)).then(function (req) {\n      return req.json();\n    }).then(function (data) {\n      console.log(data);\n      console.log('signed up', data.user.username);\n      dispatch(setCurrentUser(data.user));\n    }).catch(function (error) {\n      console.error('signup error', error);\n      dispatch(initialized());\n    });\n  };\n}\n\nfunction checkin() {\n  return function (dispatch) {\n    dispatch(loading());\n    fetch(api.checkin, (0, _crud.put)({})).then(function (req) {\n      return req.json();\n    }).then(function (data) {\n      // console.log(data)\n      console.log('checked in', data.user.username);\n      dispatch(setCurrentUser(data.user));\n    }).catch(function (error) {\n      console.error('checkin error', error);\n      dispatch(initialized());\n    });\n  };\n}\n\nfunction logout() {\n  return function (dispatch) {\n    dispatch(loading());\n    fetch(api.logout, (0, _crud._get_headers)({})).then(function (req) {\n      return req.json();\n    }).then(function (data) {\n      console.log('logged out', data);\n      dispatch(clearCurrentUser());\n      dispatch(initialized());\n    }).catch(function (error) {\n      console.error('logout error', error);\n      dispatch(clearCurrentUser());\n      dispatch(initialized());\n    });\n  };\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _store = require('../store');\n\nvar _auth = require('./auth.actions');\n\nvar authActions = _interopRequireWildcard(_auth);\n\nvar _login = require('./login.component');\n\nvar _login2 = _interopRequireDefault(_login);\n\nvar _logout = require('./logout.component');\n\nvar _logout2 = _interopRequireDefault(_logout);\n\nvar _signup = require('./signup.component');\n\nvar _signup2 = _interopRequireDefault(_signup);\n\nvar _math = require('../util/math');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n// import PropTypes from 'prop-types';\n\n\nvar AuthRouter = function (_Component) {\n  _inherits(AuthRouter, _Component);\n\n  function AuthRouter() {\n    _classCallCheck(this, AuthRouter);\n\n    return _possibleConstructorReturn(this, (AuthRouter.__proto__ || Object.getPrototypeOf(AuthRouter)).apply(this, arguments));\n  }\n\n  _createClass(AuthRouter, [{\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      return (0, _preact.h)(\n        _reactRouterDom.BrowserRouter,\n        null,\n        (0, _preact.h)(\n          'div',\n          null,\n          (0, _preact.h)('div', { className: 'diamond' }),\n          (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/', component: _login2.default }),\n          (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/login', component: _login2.default }),\n          (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/logout', component: _logout2.default }),\n          (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/signup', component: _signup2.default }),\n          (0, _preact.h)(_reactRouterDom.Route, { path: '/:module', component: function component(props) {\n              switch (props.location.pathname) {\n                case '/login':\n                case '/logout':\n                case '/signup':\n                  return null;\n              }\n              _this2.props.actions.setReturnTo(props.location.pathname);\n              return (0, _preact.h)(_reactRouterDom.Redirect, { to: '/login' });\n            } })\n        )\n      );\n    }\n  }, {\n    key: 'componentDidMount',\n    value: function componentDidMount() {\n      document.querySelector('.diamond').style.backgroundImage = 'linear-gradient(' + ((0, _math.randint)(40) - 5) + 'deg, #fde, #ffe)';\n    }\n  }]);\n\n  return AuthRouter;\n}(_preact.Component);\n\nvar AuthGate = function (_Component2) {\n  _inherits(AuthGate, _Component2);\n\n  function AuthGate() {\n    _classCallCheck(this, AuthGate);\n\n    return _possibleConstructorReturn(this, (AuthGate.__proto__ || Object.getPrototypeOf(AuthGate)).apply(this, arguments));\n  }\n\n  _createClass(AuthGate, [{\n    key: 'render',\n    value: function render() {\n      if (true && !this.props.auth.initialized) {\n        console.log('loading auth');\n        return (0, _preact.h)(\n          'div',\n          { className: 'loading' },\n          'Loading'\n        );\n      }\n      if (true || this.props.auth.isAuthenticated) {\n        console.log('authenticated...');\n        if (this.props.auth.returnTo) {\n          var returnTo = this.props.auth.returnTo;\n\n          if (!returnTo || returnTo.match(/(login|logout|signup)/i)) {\n            returnTo = '/';\n          }\n          console.log('history.push', returnTo);\n          this.props.actions.setReturnTo(null);\n          _store.history.push(returnTo);\n          return (0, _preact.h)(\n            'div',\n            null,\n            'Launching app'\n          );\n        }\n        console.log('rendering as normal');\n        return (0, _preact.h)(\n          'div',\n          null,\n          this.props.children\n        );\n      }\n      return (0, _preact.h)(AuthRouter, this.props);\n    }\n  }, {\n    key: 'componentDidMount',\n    value: function componentDidMount() {\n      this.props.actions.checkin();\n    }\n  }]);\n\n  return AuthGate;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    auth: state.auth\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n  return {\n    actions: (0, _redux.bindActionCreators)(authActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(AuthGate);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar authInitialState = {\n  token: null,\n  user: {},\n  groups: {},\n  initialized: false,\n  loading: false,\n  isAuthenticated: false,\n  returnTo: null\n};\n\nvar auth = function auth() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : authInitialState;\n  var action = arguments[1];\n\n  console.log(action);\n  switch (action.type) {\n    case _types2.default.auth.set_token:\n      return _extends({}, state, {\n        token: action.data,\n        isAuthenticated: !!action.data,\n        loading: false,\n        error: null\n      });\n\n    case _types2.default.auth.initialized:\n      return _extends({}, state, {\n        loading: false,\n        initialized: true,\n        error: null\n      });\n\n    case _types2.default.auth.loading:\n      return _extends({}, state, {\n        loading: true,\n        error: null\n      });\n\n    case _types2.default.auth.set_current_user:\n      return _extends({}, state, {\n        loading: false,\n        initialized: true,\n        isAuthenticated: true,\n        user: action.data,\n        error: null\n      });\n\n    case _types2.default.auth.set_return_to:\n      return _extends({}, state, {\n        returnTo: action.data\n      });\n\n    case _types2.default.auth.logout_user:\n      return _extends({}, authInitialState);\n\n    case _types2.default.auth.set_error:\n      return _extends({}, state, {\n        loading: false,\n        error: action.data\n      });\n\n    case _types2.default.auth.loading:\n      // const initial_state_el = document.querySelector('#initial_state')\n      // if (initial_state_el) {\n      //   try {\n      //     const initial_state = JSON.parse(initial_state_el.innerHTML)\n      //     if (initial_state && initial_state.auth && initial_state.auth.user) {\n      //       console.log(initial_state.auth.user)\n      //       return {\n      //         ...state,\n      //         user: {\n      //           ...initial_state.auth.user,\n      //         }\n      //       }\n      //     }\n      //   } catch (e) {\n      //     console.error(\"error loading initial state\")\n      //   }\n      // }\n      return state;\n\n    default:\n      return state;\n  }\n};\n\nexports.default = auth;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _auth = require('./auth.gate');\n\nvar _auth2 = _interopRequireDefault(_auth);\n\nvar _login = require('./login.component');\n\nvar _login2 = _interopRequireDefault(_login);\n\nvar _logout = require('./logout.component');\n\nvar _logout2 = _interopRequireDefault(_logout);\n\nvar _signup = require('./signup.component');\n\nvar _signup2 = _interopRequireDefault(_signup);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = {\n  Gate: _auth2.default,\n  Login: _login2.default,\n  Logout: _logout2.default,\n  Signup: _signup2.default\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _auth = require('./auth.actions');\n\nvar authActions = _interopRequireWildcard(_auth);\n\nvar _common = require('../common');\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n// import PropTypes from 'prop-types';\n\n// import { Link } from 'react-router-dom';\n\n\nvar Login = function (_Component) {\n  _inherits(Login, _Component);\n\n  function Login() {\n    _classCallCheck(this, Login);\n\n    var _this = _possibleConstructorReturn(this, (Login.__proto__ || Object.getPrototypeOf(Login)).call(this));\n\n    _this.state = {\n      username: '',\n      password: ''\n    };\n\n    _this.handleChange = _this.handleChange.bind(_this);\n    _this.handleSubmit = _this.handleSubmit.bind(_this);\n    return _this;\n  }\n\n  _createClass(Login, [{\n    key: 'handleChange',\n    value: function handleChange(value, name) {\n      var _setState;\n\n      this.setState((_setState = {}, _defineProperty(_setState, name, value), _defineProperty(_setState, 'error', null), _setState));\n    }\n  }, {\n    key: 'handleSubmit',\n    value: function handleSubmit(e) {\n      e.preventDefault();\n      if (this.props.auth.loading) return;\n      this.props.actions.login(this.state.username, this.state.password);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'form',\n        { onSubmit: this.handleSubmit },\n        (0, _preact.h)(\n          'h1',\n          null,\n          'Log in'\n        ),\n        (0, _preact.h)('br', null),\n        (0, _preact.h)(\n          _common.Group,\n          null,\n          (0, _preact.h)(_common.TextInput, {\n            autofocus: true,\n            autocapitalize: 'off',\n            autocomplete: 'off',\n            title: 'Username',\n            name: 'username',\n            type: 'text',\n            value: this.state.username,\n            onInput: this.handleChange\n          }),\n          (0, _preact.h)(_common.TextInput, {\n            title: 'Password',\n            name: 'password',\n            type: 'password',\n            value: this.state.password,\n            onInput: this.handleChange\n          }),\n          (0, _preact.h)(\n            _common.Button,\n            {\n              loading: this.props.auth.loading\n            },\n            'Login'\n          ),\n          this.renderAuthError()\n        )\n      );\n    }\n  }, {\n    key: 'renderAuthError',\n    value: function renderAuthError() {\n      if (this.props.auth.error) {\n        return (0, _preact.h)(\n          'div',\n          { className: 'form-input-hint' },\n          \"There was an error logging you in (bad password?)\"\n        );\n      }\n      return null;\n    }\n  }]);\n\n  return Login;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    auth: state.auth\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n  return {\n    actions: (0, _redux.bindActionCreators)(authActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Login);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _auth = require('./auth.actions');\n\nvar authActions = _interopRequireWildcard(_auth);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n// import PropTypes from 'prop-types';\n\n\nvar Logout = function (_Component) {\n  _inherits(Logout, _Component);\n\n  function Logout() {\n    _classCallCheck(this, Logout);\n\n    return _possibleConstructorReturn(this, (Logout.__proto__ || Object.getPrototypeOf(Logout)).apply(this, arguments));\n  }\n\n  _createClass(Logout, [{\n    key: 'componentWillMount',\n    value: function componentWillMount(props) {\n      this.props.actions.logout();\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(_reactRouterDom.Redirect, { to: '/' });\n    }\n  }]);\n\n  return Logout;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {};\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n  return {\n    actions: (0, _redux.bindActionCreators)(authActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Logout);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _auth = require('./auth.actions');\n\nvar actions = _interopRequireWildcard(_auth);\n\nvar _common = require('../common');\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Signup = function (_Component) {\n  _inherits(Signup, _Component);\n\n  function Signup() {\n    _classCallCheck(this, Signup);\n\n    var _this = _possibleConstructorReturn(this, (Signup.__proto__ || Object.getPrototypeOf(Signup)).call(this));\n\n    _this.state = {\n      username: '',\n      password: '',\n      password2: ''\n    };\n\n    _this.handleChange = _this.handleChange.bind(_this);\n    _this.handleSubmit = _this.handleSubmit.bind(_this);\n    return _this;\n  }\n\n  _createClass(Signup, [{\n    key: 'handleChange',\n    value: function handleChange(value, name) {\n      this.setState(_defineProperty({}, name, value));\n    }\n  }, {\n    key: 'validate',\n    value: function validate() {\n      if (!this.state.password || this.state.password !== this.state.password2) {\n        return false;\n      }\n      return true;\n    }\n  }, {\n    key: 'handleSubmit',\n    value: function handleSubmit(e) {\n      e.preventDefault();\n      if (this.props.auth.loading) return;\n      if (!this.validate()) {\n        return this.props.actions.setError('bad password');\n      }\n\n      var user = _objectWithoutProperties(this.state, []);\n\n      this.props.actions.signup(user);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      if (this.props.auth.isAuthenticated) {\n        var returnTo = this.props.auth.returnTo;\n\n        if (!returnTo || returnTo.match(/(api|login|logout|signup)/i)) {\n          returnTo = '/';\n        }\n        return (0, _preact.h)(_reactRouterDom.Redirect, { to: returnTo });\n      }\n      return (0, _preact.h)(\n        'form',\n        { onSubmit: this.handleSubmit },\n        (0, _preact.h)(\n          'h1',\n          null,\n          'New account'\n        ),\n        (0, _preact.h)('br', null),\n        (0, _preact.h)(\n          _common.Group,\n          null,\n          (0, _preact.h)(_common.TextInput, {\n            autofocus: true,\n            autocapitalize: 'off',\n            autocomplete: 'off',\n            title: 'Username',\n            name: 'username',\n            type: 'text',\n            value: this.state.username,\n            onInput: this.handleChange\n          }),\n          (0, _preact.h)(_common.TextInput, {\n            title: 'Password',\n            name: 'password',\n            type: 'password',\n            value: this.state.password,\n            onInput: this.handleChange\n          }),\n          (0, _preact.h)(_common.TextInput, {\n            title: 'Password again :)',\n            name: 'password2',\n            type: 'password',\n            value: this.state.password2,\n            onInput: this.handleChange\n          }),\n          (0, _preact.h)(\n            _common.Button,\n            {\n              loading: this.props.auth.loading\n            },\n            'Sign up'\n          ),\n          this.renderAuthError()\n        )\n      );\n    }\n  }, {\n    key: 'renderAuthError',\n    value: function renderAuthError() {\n      if (this.props.auth.error) {\n        return (0, _preact.h)(\n          'div',\n          { className: 'form-input-hint' },\n          \"Please doublecheck the form (o=_o~~)\"\n        );\n      }\n      return (0, _preact.h)('div', { className: 'form-input-hint' });\n    }\n  }]);\n\n  return Signup;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    auth: state.auth\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n  return {\n    actions: (0, _redux.bindActionCreators)(_extends({}, actions), dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Signup);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _common = require('../common');\n\nvar _actions = require('../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Browser = function (_Component) {\n  _inherits(Browser, _Component);\n\n  function Browser() {\n    var _ref;\n\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, Browser);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Browser.__proto__ || Object.getPrototypeOf(Browser)).call.apply(_ref, [this].concat(args))), _this), _this.state = {\n      dir: '/',\n      module: 'pix2pixhd',\n      files: [],\n      loading: true\n    }, _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  _createClass(Browser, [{\n    key: 'componentDidMount',\n    value: function componentDidMount() {\n      this.fetch(this.state.dir);\n    }\n  }, {\n    key: 'handlePick',\n    value: function handlePick(file) {\n      console.log(file);\n      if (file.dir) {\n        this.fetch([this.state.dir, file.name].join('/').replace('//', '/'));\n      } else {\n        this.fetchFile([this.state.dir, file.name].join('/').replace('//', '/'));\n      }\n    }\n  }, {\n    key: 'fetch',\n    value: function fetch(dir) {\n      var _this2 = this;\n\n      console.log('fetch', dir);\n      var module = this.state.module;\n\n      this.setState({ dir: dir, file: null, loading: true });\n      _actions2.default.socket.list_directory({ module: module, dir: dir }).then(function (files) {\n        console.log(files);\n        _this2.setState({ dir: dir, files: files, loading: false });\n      });\n    }\n  }, {\n    key: 'fetchFile',\n    value: function fetchFile(fn) {\n      var _this3 = this;\n\n      console.log('fetch file', fn);\n      var module = this.state.module;\n\n      this.setState({ file: null, loadingFile: true });\n      _actions2.default.socket.read_file({ module: module, fn: fn }).then(function (file) {\n        console.log(file);\n        _this3.setState({ file: file, loadingFile: false });\n      });\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this4 = this;\n\n      var app = this.props.app;\n      var _state = this.state,\n          loading = _state.loading,\n          dir = _state.dir,\n          module = _state.module,\n          files = _state.files,\n          loadingFile = _state.loadingFile,\n          file = _state.file;\n\n      console.log(this.props, this.state);\n      return (0, _preact.h)(\n        'div',\n        { className: 'app browser' },\n        (0, _preact.h)(\n          'h1',\n          null,\n          dir,\n          dir[dir.length - 1] !== '/' && '/'\n        ),\n        app.tool,\n        (0, _preact.h)('br', null),\n        loading && (0, _preact.h)(_common.Loading, null),\n        (0, _preact.h)(_common.FileList, {\n          files: files,\n          groupDirectories: true,\n          parentDirectory: dir !== '/',\n          orderBy: 'name asc',\n          fields: 'name datetime size',\n          onClick: function onClick(file, e) {\n            e.preventDefault();\n            e.stopPropagation();\n            console.log('picked a result', file);\n            _this4.handlePick(file);\n          },\n          onClickParent: function onClickParent(e) {\n            console.log('navigate up');\n            _this4.fetch(_this4.state.dir.split('/').slice(0, -1).join('/') || '/');\n          }\n        }),\n        loadingFile && (0, _preact.h)(_common.Loading, null),\n        file && (0, _preact.h)(_common.FileViewer, { file: file })\n      );\n    }\n  }]);\n\n  return Browser;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    app: state.system.app\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)({}, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Browser);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _moment = require('moment/min/moment.min');\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar FileSaver = require('file-saver');\n\nvar browserInitialState = {\n  loading: false,\n  progress: null,\n  error: null,\n  data: {},\n  images: [],\n  files: []\n};\n\nvar browserReducer = function browserReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : browserInitialState;\n  var action = arguments[1];\n\n  switch (action.type) {\n    case _types2.default.app.load_progress:\n      if (!action.data || action.data.module !== 'browser') {\n        return state;\n      }\n      return _extends({}, state, {\n        loading: true,\n        progress: action.progress\n      });\n    case _types2.default.app.load:\n      return _extends({}, state, {\n        loading: false,\n        error: null,\n        data: action.data\n      });\n    default:\n      return state;\n  }\n};\n\nexports.default = browserReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.enqueue = exports.resume = exports.pause = exports.play = undefined;\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar play = exports.play = function play(file) {\n  return { type: _types2.default.audioPlayer.play, file: file };\n};\nvar pause = exports.pause = function pause() {\n  return { type: _types2.default.audioPlayer.pause };\n};\nvar resume = exports.resume = function resume() {\n  return { type: _types2.default.audioPlayer.resume };\n};\nvar enqueue = exports.enqueue = function enqueue(file) {\n  return { type: _types2.default.audioPlayer.enqueue, file: file };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nvar _redux = require('redux');\n\nvar _audioPlayer = require('./audioPlayer.actions');\n\nvar audioPlayerActions = _interopRequireWildcard(_audioPlayer);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar AudioPlayer = function (_Component) {\n  _inherits(AudioPlayer, _Component);\n\n  function AudioPlayer(props) {\n    _classCallCheck(this, AudioPlayer);\n\n    var _this = _possibleConstructorReturn(this, (AudioPlayer.__proto__ || Object.getPrototypeOf(AudioPlayer)).call(this, props));\n\n    _this.handleClick = _this.handleClick.bind(_this);\n    return _this;\n  }\n\n  _createClass(AudioPlayer, [{\n    key: 'handleClick',\n    value: function handleClick(e) {\n      var _props = this.props,\n          audioPlayer = _props.audioPlayer,\n          actions = _props.actions;\n\n      if (audioPlayer.playing) {\n        actions.pause();\n      } else {\n        actions.resume();\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var audioPlayer = this.props.audioPlayer;\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'audioPlayer' },\n        (0, _preact.h)(\n          'span',\n          null,\n          this.props.title\n        ),\n        (0, _preact.h)(\n          'button',\n          {\n            onClick: this.handleClick\n          },\n          audioPlayer.playing ? '▶' : '~'\n        )\n      );\n    }\n  }]);\n\n  return AudioPlayer;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    audioPlayer: state.audioPlayer\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(audioPlayerActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(AudioPlayer);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar audioPlayerInitialState = {\n  loading: false,\n  error: null,\n  status: '',\n  current: null,\n  index: -1,\n  playlist: []\n};\n\nvar audio = document.createElement('audio');\n\nvar audioPlayerReducer = function audioPlayerReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : audioPlayerInitialState;\n  var action = arguments[1];\n\n  switch (action.type) {\n    case _types2.default.audioPlayer.play:\n      if (!action.file.url) {\n        return state;\n      }\n      audio.src = action.file.url;\n      audio.play();\n      return _extends({}, state, {\n        playing: true,\n        current: action.file\n      });\n    case _types2.default.audioPlayer.pause:\n      audio.pause();\n      return _extends({}, state, {\n        playing: false\n      });\n    case _types2.default.audioPlayer.resume:\n      audio.play();\n      return _extends({}, state, {\n        playing: true\n      });\n    default:\n      return state;\n  }\n};\n\nexports.default = audioPlayerReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _group = require('./group.component');\n\nvar _group2 = _interopRequireDefault(_group);\n\nvar _param = require('./param.component');\n\nvar _param2 = _interopRequireDefault(_param);\n\nvar _button = require('./button.component');\n\nvar _button2 = _interopRequireDefault(_button);\n\nvar _buttonGrid = require('./buttonGrid.component');\n\nvar _buttonGrid2 = _interopRequireDefault(_buttonGrid);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar AugmentationGrid = function (_Component) {\n  _inherits(AugmentationGrid, _Component);\n\n  function AugmentationGrid() {\n    var _ref;\n\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, AugmentationGrid);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = AugmentationGrid.__proto__ || Object.getPrototypeOf(AugmentationGrid)).call.apply(_ref, [this].concat(args))), _this), _this.state = {\n      x: 0, y: 0, sum: 0\n    }, _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  _createClass(AugmentationGrid, [{\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      var _props = this.props,\n          make = _props.make,\n          take = _props.take,\n          checkpoint = _props.checkpoint,\n          onTrain = _props.onTrain,\n          onAugment = _props.onAugment;\n      var _state = this.state,\n          x = _state.x,\n          y = _state.y,\n          sum = _state.sum;\n\n      var rows = [];\n      return (0, _preact.h)(\n        _group2.default,\n        { className: 'augmentationGrid' },\n        (0, _preact.h)(_buttonGrid2.default, {\n          x: make,\n          y: take,\n          max: 5000,\n          onHover: function onHover(x, y) {\n            return _this2.setState({ x: x, y: y });\n          },\n          onClick: function onClick(x, y) {\n            _this2.setState({ sum: sum + x * y });\n            onAugment(y, x);\n          }\n        }),\n        (0, _preact.h)(\n          _param2.default,\n          { title: 'Name' },\n          checkpoint.name\n        ),\n        (0, _preact.h)(\n          _param2.default,\n          { title: 'Take' },\n          y\n        ),\n        (0, _preact.h)(\n          _param2.default,\n          { title: 'Make' },\n          x\n        ),\n        (0, _preact.h)(\n          _param2.default,\n          { title: 'Will add to dataset' },\n          x * y\n        ),\n        (0, _preact.h)(\n          _param2.default,\n          { title: 'Total added this epoch' },\n          sum\n        ),\n        (0, _preact.h)(\n          _param2.default,\n          { title: 'Sequence length' },\n          checkpoint.sequenceCount\n        ),\n        (0, _preact.h)(\n          _param2.default,\n          { title: 'Dataset size' },\n          checkpoint.datasetCount\n        ),\n        (0, _preact.h)(\n          _button2.default,\n          { onClick: function onClick() {\n              _this2.setState({ sum: 0 });\n              onTrain();\n            } },\n          'Train'\n        )\n      );\n    }\n  }]);\n\n  return AugmentationGrid;\n}(_preact.Component);\n\nexports.default = AugmentationGrid;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nvar _redux = require('redux');\n\nvar _live = require('../live/live.actions');\n\nvar liveActions = _interopRequireWildcard(_live);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Button = function (_Component) {\n  _inherits(Button, _Component);\n\n  function Button(props) {\n    _classCallCheck(this, Button);\n\n    var _this = _possibleConstructorReturn(this, (Button.__proto__ || Object.getPrototypeOf(Button)).call(this, props));\n\n    _this.handleClick = _this.handleClick.bind(_this);\n    return _this;\n  }\n\n  _createClass(Button, [{\n    key: 'handleClick',\n    value: function handleClick(e) {\n      this.props.onClick && this.props.onClick();\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'div',\n        { className: 'button param' },\n        (0, _preact.h)(\n          'label',\n          null,\n          (0, _preact.h)(\n            'span',\n            null,\n            this.props.title\n          ),\n          (0, _preact.h)(\n            'button',\n            {\n              onClick: this.handleClick\n            },\n            this.props.value || this.props.children\n          )\n        )\n      );\n    }\n  }]);\n\n  return Button;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {};\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {};\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Button);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ButtonGrid = function (_Component) {\n  _inherits(ButtonGrid, _Component);\n\n  function ButtonGrid() {\n    var _ref;\n\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, ButtonGrid);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = ButtonGrid.__proto__ || Object.getPrototypeOf(ButtonGrid)).call.apply(_ref, [this].concat(args))), _this), _this.state = {\n      x: 0, y: 0\n    }, _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  _createClass(ButtonGrid, [{\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      var _state = this.state,\n          _x = _state.x,\n          _y = _state.y;\n      var _props = this.props,\n          X = _props.x,\n          Y = _props.y,\n          _props$max = _props.max,\n          max = _props$max === undefined ? Infinity : _props$max,\n          _onClick = _props.onClick,\n          onHover = _props.onHover;\n\n      return (0, _preact.h)(\n        'table',\n        { className: 'buttonGrid' },\n        (0, _preact.h)(\n          'tr',\n          { className: 'row' },\n          (0, _preact.h)(\n            'th',\n            null,\n            \" \"\n          ),\n          X.map(function (x) {\n            return (0, _preact.h)(\n              'th',\n              { className: x === _x && 'bold' },\n              x\n            );\n          })\n        ),\n        Y.map(function (y) {\n          return (0, _preact.h)(\n            'tr',\n            { className: 'row' },\n            (0, _preact.h)(\n              'th',\n              { className: y === _y && 'bold' },\n              y\n            ),\n            X.map(function (x) {\n              return (0, _preact.h)(\n                'td',\n                null,\n                x * y > max ? \" \" : (0, _preact.h)(\n                  'button',\n                  {\n                    onClick: function onClick() {\n                      return _onClick(x, y);\n                    },\n                    onMouseEnter: function onMouseEnter() {\n                      _this2.setState({ x: x, y: y });\n                      onHover(x, y);\n                    }\n                  },\n                  \" \"\n                )\n              );\n            })\n          );\n        })\n      );\n    }\n  }]);\n\n  return ButtonGrid;\n}(_preact.Component);\n\nexports.default = ButtonGrid;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nvar _redux = require('redux');\n\nvar _live = require('../live/live.actions');\n\nvar liveActions = _interopRequireWildcard(_live);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Checkbox = function (_Component) {\n  _inherits(Checkbox, _Component);\n\n  function Checkbox(props) {\n    _classCallCheck(this, Checkbox);\n\n    var _this = _possibleConstructorReturn(this, (Checkbox.__proto__ || Object.getPrototypeOf(Checkbox)).call(this, props));\n\n    _this.handleClick = _this.handleClick.bind(_this);\n    return _this;\n  }\n\n  _createClass(Checkbox, [{\n    key: 'handleClick',\n    value: function handleClick(e) {\n      clearTimeout(this.timeout);\n      var new_value = e.target.checked;\n      this.props.onToggle && this.props.onToggle(new_value);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var checked = this.props.value;\n      var dim = !this.props.noDim;\n      return (0, _preact.h)(\n        'div',\n        { className: 'checkbox param' },\n        (0, _preact.h)(\n          'label',\n          null,\n          (0, _preact.h)(\n            'span',\n            null,\n            this.props.title\n          ),\n          (0, _preact.h)('input', {\n            type: 'checkbox',\n            onClick: this.handleClick,\n            checked: checked\n          })\n        )\n      );\n    }\n  }]);\n\n  return Checkbox;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {};\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    // actions: bindActionCreators(liveActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Checkbox);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// import { Loading, CurrentTask, FileList, FileRow } from '../../../common'\n\nfunction CurrentTask(_ref) {\n  var cpu = _ref.cpu,\n      gpu = _ref.gpu,\n      processor = _ref.processor;\n\n  var processor_name = void 0;\n  if (processor) {\n    processor_name = processor === 'cpu' ? 'cpu' : 'gpu';\n  } else if (gpu.status !== 'IDLE') {\n    processor_name = 'gpu';\n  } else if (cpu.status !== 'IDLE') {\n    processor_name = 'cpu';\n  }\n  var p = processor_name === 'cpu' ? cpu : gpu;\n  if (!p) return (0, _preact.h)('div', null);\n  if (p.status === 'IDLE') {\n    return (0, _preact.h)(\n      'div',\n      null,\n      processor_name,\n      ' idle'\n    );\n  }\n  var last_message = p.last_message,\n      pid = p.pid,\n      task = p.task;\n  var activity = task.activity,\n      epoch = task.epoch,\n      epochs = task.epochs,\n      dataset = task.dataset,\n      module = task.module;\n\n  return (0, _preact.h)(\n    'div',\n    { className: 'currentTask' },\n    '#',\n    pid,\n    ': ',\n    (0, _preact.h)(\n      'b',\n      null,\n      module,\n      ' ',\n      activity\n    ),\n    ' ',\n    (0, _preact.h)(\n      'i',\n      null,\n      dataset\n    ),\n    !!epochs ? (0, _preact.h)(\n      'span',\n      null,\n      epochs,\n      ' epoch',\n      _util2.default.courtesy_s(epochs)\n    ) : \"\",\n    epoch ? (0, _preact.h)(\n      'span',\n      null,\n      '(currently #',\n      epoch,\n      ')'\n    ) : \"\",\n    (0, _preact.h)('br', null),\n    (0, _preact.h)('br', null),\n    (0, _preact.h)(\n      'div',\n      { className: 'quiet' },\n      last_message\n    )\n  );\n}\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return state.system.runner;\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    // actions: bindActionCreators(samplernnActions, dispatch),\n    // remote: bindActionCreators(samplernnTasks, dispatch),\n    // audioPlayer: bindActionCreators(audioPlayerActions, dispatch),\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(CurrentTask);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.FileRow = exports.FileList = undefined;\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _moment = require('moment/min/moment.min');\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nvar _util = require('../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar fieldSet = _util2.default.fieldSet(new Set(['name', 'date', 'size']));\n\nvar FileList = exports.FileList = function FileList(props) {\n  var files = props.files,\n      fields = props.fields,\n      sort = props.sort,\n      title = props.title,\n      linkFiles = props.linkFiles,\n      onClick = props.onClick,\n      onClickParent = props.onClickParent,\n      onDelete = props.onDelete,\n      groupDirectories = props.groupDirectories,\n      parentDirectory = props.parentDirectory,\n      _props$orderBy = props.orderBy,\n      orderBy = _props$orderBy === undefined ? 'name asc' : _props$orderBy,\n      _props$className = props.className,\n      className = _props$className === undefined ? '' : _props$className,\n      _props$fileListClassN = props.fileListClassName,\n      fileListClassName = _props$fileListClassN === undefined ? 'filelist' : _props$fileListClassN,\n      _props$rowClassName = props.rowClassName,\n      rowClassName = _props$rowClassName === undefined ? 'row file' : _props$rowClassName;\n\n  var _util$sort$orderByFn = _util2.default.sort.orderByFn(orderBy),\n      mapFn = _util$sort$orderByFn.mapFn,\n      sortFn = _util$sort$orderByFn.sortFn;\n\n  var sortedFiles = (files || []).filter(function (f) {\n    return !!f;\n  }).map(mapFn).sort(sortFn);\n  if (groupDirectories) {\n    var groupedFiles = sortedFiles.reduce(function (a, b) {\n      a[b[1].dir].push(b);return a;\n    }, { true: [], false: [] });\n    sortedFiles = groupedFiles.true.concat(groupedFiles.false);\n  }\n  var fileList = sortedFiles.map(function (pair) {\n    return (0, _preact.h)(FileRow, {\n      file: pair[1],\n      fields: fieldSet(fields),\n      className: rowClassName,\n      linkFiles: linkFiles,\n      onDelete: onDelete,\n      onClick: onClick\n    });\n  });\n  if (!fileList || !fileList.length) {\n    return (0, _preact.h)(\n      'div',\n      { className: 'rows ' + className },\n      (0, _preact.h)(\n        'div',\n        { className: 'row heading' },\n        (0, _preact.h)(\n          'h4',\n          { className: 'noFiles' },\n          'No files'\n        )\n      )\n    );\n  }\n  // console.log(files)\n  return (0, _preact.h)(\n    'div',\n    { className: 'rows ' + className },\n    title && (0, _preact.h)(\n      'div',\n      { className: 'row heading' },\n      (0, _preact.h)(\n        'h3',\n        null,\n        title\n      ),\n      '}'\n    ),\n    (0, _preact.h)(\n      'div',\n      { className: 'rows ' + fileListClassName },\n      parentDirectory && (0, _preact.h)(\n        'div',\n        { className: rowClassName + ' parent' },\n        (0, _preact.h)(\n          'div',\n          { className: 'filename', title: 'Parent Directory' },\n          (0, _preact.h)(\n            'span',\n            { className: 'link', onClick: function onClick(e) {\n                return onClickParent && onClickParent(e);\n              } },\n            (0, _preact.h)(\n              'i',\n              null,\n              'Parent Directory'\n            )\n          )\n        )\n      ),\n      fileList\n    )\n  );\n};\n\nvar FileRow = exports.FileRow = function FileRow(props) {\n  var file = props.file,\n      linkFiles = props.linkFiles,\n      onDelete = props.onDelete,\n      _onClick = props.onClick,\n      _props$className2 = props.className,\n      className = _props$className2 === undefined ? 'row file' : _props$className2,\n      _props$username = props.username,\n      username = _props$username === undefined ? '' : _props$username;\n\n  var fields = fieldSet(props.fields);\n\n  var size = _util2.default.hush_size(file.size);\n  var date = file.date || file.created_at;\n  var epoch = file.epoch || file.epochs || 0;\n  var count = file.count || 0;\n\n  var name = void 0;\n  var key = void 0;\n  if (file.name) {\n    name = file.name;\n    key = name;\n  } else if (file.url) {\n    if (file.opt && file.opt.type) {\n      name = file.opt.type + ': ' + file.opt.title;\n      key = file.opt.token;\n    } else {\n      name = file.url.replace(/^https?:\\/\\//, '');\n      key = name;\n    }\n  }\n\n  return (0, _preact.h)(\n    'div',\n    { className: className, key: key },\n    fields.has('name') && (0, _preact.h)(\n      'div',\n      { className: 'filename', title: file.name || file.url },\n      file.persisted === false ? (0, _preact.h)(\n        'span',\n        { className: 'unpersisted' },\n        name\n      ) : linkFiles && file.url ? (0, _preact.h)(\n        'a',\n        { target: '_blank', onClick: function onClick(e) {\n            if (!(e.metaKey || e.ctrlKey || e.altKey) && _onClick) {\n              e.preventDefault();_onClick && _onClick(file, e);\n            }\n          }, href: file.url },\n        name\n      ) : (0, _preact.h)(\n        'span',\n        { className: 'link', onClick: function onClick(e) {\n            return _onClick && _onClick(file, e);\n          } },\n        name\n      )\n    ),\n    fields.has('age') && (0, _preact.h)(\n      'div',\n      { className: \"age \" + _util2.default.carbon_date(date) },\n      _util2.default.get_age(date)\n    ),\n    fields.has('username') && (0, _preact.h)(\n      'div',\n      { className: \"username\" },\n      username\n    ),\n    fields.has('epoch') && (0, _preact.h)(\n      'div',\n      { className: \"epoch \" + _util2.default.hush_null(epoch)[0] },\n      epoch > 0 ? 'ep. ' + epoch : ''\n    ),\n    fields.has('date') && (0, _preact.h)(\n      'div',\n      { className: \"date \" + _util2.default.carbon_date(date) },\n      (0, _moment2.default)(date).format(\"YYYY-MM-DD\")\n    ),\n    fields.has('datetime') && (0, _preact.h)(\n      'div',\n      { className: \"datetime \" + _util2.default.carbon_date(date) },\n      (0, _moment2.default)(date).format(\"YYYY-MM-DD h:mm a\")\n    ),\n    fields.has('size') && (0, _preact.h)(\n      'div',\n      { className: \"size \" + size[0] },\n      size[1]\n    ),\n    fields.has('count') && (0, _preact.h)(\n      'div',\n      { className: \"count \" + _util2.default.hush_null(count)[0] },\n      count > 0 ? count + ' files' : ''\n    ),\n    (fields.has('activity') || fields.has('module')) && (0, _preact.h)(\n      'div',\n      { className: 'activity' },\n      fields.has('activity') && file.activity,\n      fields.has('module') && file.module\n    ),\n    fields.has('delete') && onDelete && file.id && (0, _preact.h)(\n      'div',\n      { className: 'destroy', onClick: function onClick(e) {\n          return onDelete(file);\n        } },\n      'x'\n    ),\n    props.options && props.options(file)\n  );\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar FileUpload = function (_Component) {\n  _inherits(FileUpload, _Component);\n\n  function FileUpload(props) {\n    _classCallCheck(this, FileUpload);\n\n    var _this = _possibleConstructorReturn(this, (FileUpload.__proto__ || Object.getPrototypeOf(FileUpload)).call(this, props));\n\n    _this.handleChange = _this.handleChange.bind(_this);\n    return _this;\n  }\n\n  _createClass(FileUpload, [{\n    key: 'handleChange',\n    value: function handleChange(e) {\n      this.props.onChange && this.props.onChange();\n      e.stopPropagation();\n      e.preventDefault();\n      this.setState({ thumbnails: [], images: [] });\n      var files = e.dataTransfer ? e.dataTransfer.files : e.target.files;\n      var i = void 0,\n          f = void 0;\n      for (i = 0, f; i < files.length; i++) {\n        f = files[i];\n        if (!f) continue;\n        break;\n        // if (!f.type.match(this.props.mime)) continue\n      }\n      this.props.onUpload && this.props.onUpload(f);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'div',\n        { className: 'fileUpload param' },\n        (0, _preact.h)(\n          'label',\n          null,\n          (0, _preact.h)(\n            'span',\n            null,\n            this.props.title\n          ),\n          (0, _preact.h)('input', {\n            type: 'file',\n            accept: this.props.accept || '*/*',\n            multiple: this.props.multiple,\n            onChange: this.handleChange\n          }),\n          (0, _preact.h)(\n            'button',\n            null,\n            this.props.label || 'Choose file...'\n          )\n        )\n      );\n    }\n  }]);\n\n  return FileUpload;\n}(_preact.Component);\n\nexports.default = FileUpload;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = FileViewer;\n\nvar _preact = require('preact');\n\nvar image_types = {\n  'jpg': 'image/jpeg',\n  'jpeg': 'image/jpeg',\n  'png': 'image/png',\n  'gif': 'image/gif'\n};\n\nvar audio_types = {\n  'wav': 'audio/wav',\n  'mp3': 'audio/mp3',\n  'flac': 'audio/flac',\n  'aiff': 'audio/aiff'\n};\n\nvar video_types = {\n  'mp4': 'video/mp4'\n};\n\nfunction FileViewer(_ref) {\n  var file = _ref.file;\n  var error = file.error,\n      name = file.name,\n      path = file.path,\n      date = file.date,\n      size = file.size,\n      buf = file.buf;\n\n  if (error) {\n    return (0, _preact.h)(\n      'div',\n      { className: 'fileViewer' },\n      error\n    );\n  }\n  if (!buf) {\n    return (0, _preact.h)(\n      'div',\n      { className: 'fileViewer' },\n      'File empty'\n    );\n  }\n  var ext = name.split('.').slice(-1)[0].toLowerCase();\n  var tag = void 0;\n  if (ext in image_types) {\n    tag = (0, _preact.h)('img', { src: getURLFor(buf, image_types[ext]) });\n  } else if (ext in audio_types) {\n    tag = (0, _preact.h)('audio', { src: getURLFor(buf, audio_types[ext]), controls: true, autoplay: true });\n  } else if (ext in video_types) {\n    tag = (0, _preact.h)('video', { src: getURLFor(buf, audio_types[ext]), controls: true, autoplay: true });\n  } else {\n    tag = (0, _preact.h)(\n      'div',\n      { className: 'text' },\n      ab2str(buf)\n    );\n  }\n  return (0, _preact.h)(\n    'div',\n    { className: 'fileViewer' },\n    tag\n  );\n}\n\nvar getURLFor = function getURLFor(buf, type) {\n  var arrayBufferView = new Uint8Array(buf);\n  var blob = new Blob([arrayBufferView], { type: type });\n  var urlCreator = window.URL || window.webkitURL;\n  return urlCreator.createObjectURL(blob);\n};\n\nvar ab2str = function ab2str(buf) {\n  return String.fromCharCode.apply(null, new Uint8Array(buf));\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nexports.default = FolderList;\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _util = require('../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _group = require('./group.component');\n\nvar _group2 = _interopRequireDefault(_group);\n\nvar _param = require('./param.component');\n\nvar _param2 = _interopRequireDefault(_param);\n\nvar _loading = require('./loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction FolderList(_ref) {\n  var db = _ref.db,\n      path = _ref.path,\n      emptyText = _ref.emptyText,\n      activity = _ref.activity;\n\n  if (!db) return null;\n  if (db.loading || !db.data) {\n    return (0, _preact.h)(\n      'div',\n      { className: 'col folderList' },\n      (0, _preact.h)(_loading2.default, { progress: db.progress })\n    );\n  }\n  var folderList = db.data.folders;\n  if (activity) {\n    folderList = folderList.filter(function (f) {\n      return f.activity === activity;\n    });\n  }\n  if (!folderList.length && emptyText) {\n    return (0, _preact.h)(\n      'div',\n      { className: 'col folderList' },\n      emptyText\n    );\n  }\n  console.log(folders);\n  var folders = folderList.map(function (raw_folder) {\n    var folder = db.data.folderLookup[raw_folder.id];\n    var fileCount = folder.files ? folder.files.length : 0;\n\n    var _util$hush_null = _util2.default.hush_null(fileCount),\n        _util$hush_null2 = _slicedToArray(_util$hush_null, 2),\n        className = _util$hush_null2[0],\n        size = _util$hush_null2[1];\n\n    return (0, _preact.h)(\n      _param2.default,\n      { title: (0, _preact.h)(\n          _reactRouterDom.Link,\n          { to: path + folder.id + '/' },\n          folder.name\n        ) },\n      (0, _preact.h)(\n        'span',\n        { className: className },\n        fileCount,\n        ' file',\n        _util2.default.courtesy_s(fileCount)\n      )\n    );\n  });\n\n  return (0, _preact.h)(\n    'div',\n    { className: 'col folderList' },\n    (0, _preact.h)(\n      _group2.default,\n      { title: 'Projects' },\n      folders\n    )\n  );\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\t\tvalue: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Gallery = function (_Component) {\n\t\t_inherits(Gallery, _Component);\n\n\t\tfunction Gallery(props) {\n\t\t\t\t_classCallCheck(this, Gallery);\n\n\t\t\t\treturn _possibleConstructorReturn(this, (Gallery.__proto__ || Object.getPrototypeOf(Gallery)).call(this));\n\t\t}\n\n\t\t_createClass(Gallery, [{\n\t\t\t\tkey: 'render',\n\t\t\t\tvalue: function render() {\n\t\t\t\t\t\tvar _props = this.props,\n\t\t\t\t\t\t    title = _props.title,\n\t\t\t\t\t\t    images = _props.images;\n\n\t\t\t\t\t\tvar imageList = images.map(function (image) {\n\t\t\t\t\t\t\t\treturn (0, _preact.h)(\n\t\t\t\t\t\t\t\t\t\t'div',\n\t\t\t\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\t\t\t(0, _preact.h)('img', { src: image.url })\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t});\n\t\t\t\t\t\treturn (0, _preact.h)(\n\t\t\t\t\t\t\t\t'div',\n\t\t\t\t\t\t\t\t{ 'class': 'gallery' },\n\t\t\t\t\t\t\t\timageList\n\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t}]);\n\n\t\treturn Gallery;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n\t\treturn {};\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n\t\treturn {\n\t\t\t\t// actions: bindActionCreators(liveActions, dispatch)\n\t\t};\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Gallery);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = Group;\n\nvar _preact = require('preact');\n\nfunction Group(props) {\n  return (0, _preact.h)(\n    'div',\n    { className: 'group' },\n    this.props.title && (0, _preact.h)(\n      'h3',\n      null,\n      this.props.title\n    ),\n    this.props.children\n  );\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _reactRedux = require('react-redux');\n\nvar _system = require('../system/system.actions');\n\nvar systemActions = _interopRequireWildcard(_system);\n\nvar _modules = require('../modules');\n\nvar _modules2 = _interopRequireDefault(_modules);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction NavLink(props) {\n  if (!props.to) {\n    return (0, _preact.h)(\n      'span',\n      null,\n      props.children\n    );\n  }\n  var children = props.to === props.location.pathname ? (0, _preact.h)(\n    'b',\n    null,\n    props.children\n  ) : props.children;\n  return (0, _preact.h)(\n    'span',\n    null,\n    (0, _preact.h)(\n      _reactRouterDom.Link,\n      { to: props.to },\n      children\n    )\n  );\n}\n\nfunction Header(props) {\n  var site = props.site,\n      app = props.app,\n      fps = props.fps,\n      playing = props.playing,\n      actions = props.actions,\n      location = props.location,\n      history = props.history;\n\n  var tool_list = Object.keys(_modules2.default).map(function (name, i) {\n    var label = name.replace(/_/, \" \");\n    return (0, _preact.h)(\n      'option',\n      { value: name, key: i },\n      label\n    );\n  });\n  var tool = _modules2.default[app.tool];\n  var links = tool.links().map(function (link, i) {\n    return (0, _preact.h)(\n      NavLink,\n      { key: i, location: location, to: link.url },\n      link.name\n    );\n  });\n  return (0, _preact.h)(\n    'header',\n    null,\n    (0, _preact.h)(\n      'span',\n      null,\n      (0, _preact.h)(\n        'b',\n        null,\n        site.name,\n        ' cortex'\n      )\n    ),\n    (0, _preact.h)(\n      'span',\n      null,\n      (0, _preact.h)(\n        'select',\n        { onChange: function onChange(e) {\n            var path = window.location.pathname.split(\"/\");\n            path.shift();\n            console.log(path);\n            if (path[0] in _modules2.default && path[1]) {\n              history.push('/' + e.target.value + '/' + path[1] + '/');\n            }\n            actions.changeTool(e.target.value, true);\n          }, value: app.tool },\n        tool_list\n      )\n    ),\n    (0, _preact.h)(\n      NavLink,\n      { location: location, to: '/system' },\n      'system'\n    ),\n    (0, _preact.h)(\n      NavLink,\n      { location: location, to: '/dashboard' },\n      'dashboard'\n    ),\n    (0, _preact.h)(\n      'span',\n      null,\n      links\n    ),\n    playing && (0, _preact.h)(\n      'span',\n      null,\n      fps,\n      ' fps'\n    )\n  );\n}\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    site: state.system.site,\n    app: state.system.app,\n    fps: state.live.fps,\n    playing: state.live.playing\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(systemActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Header);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.AugmentationGrid = exports.ButtonGrid = exports.TaskList = exports.CurrentTask = exports.Checkbox = exports.Button = exports.SelectGroup = exports.Select = exports.Slider = exports.NumberInput = exports.TextInput = exports.Param = exports.ParamGroup = exports.Group = exports.Player = exports.Gallery = exports.FileViewer = exports.FileUpload = exports.FileRow = exports.FileList = exports.FolderList = exports.AudioPlayer = exports.Header = exports.Progress = exports.Loading = exports.Views = undefined;\n\nvar _audioPlayer = require('./audioPlayer/audioPlayer.component');\n\nvar _audioPlayer2 = _interopRequireDefault(_audioPlayer);\n\nvar _augmentationGrid = require('./augmentationGrid.component');\n\nvar _augmentationGrid2 = _interopRequireDefault(_augmentationGrid);\n\nvar _button = require('./button.component');\n\nvar _button2 = _interopRequireDefault(_button);\n\nvar _buttonGrid = require('./buttonGrid.component');\n\nvar _buttonGrid2 = _interopRequireDefault(_buttonGrid);\n\nvar _checkbox = require('./checkbox.component');\n\nvar _checkbox2 = _interopRequireDefault(_checkbox);\n\nvar _currentTask = require('./currentTask.component');\n\nvar _currentTask2 = _interopRequireDefault(_currentTask);\n\nvar _fileList = require('./fileList.component');\n\nvar _fileUpload = require('./fileUpload.component');\n\nvar _fileUpload2 = _interopRequireDefault(_fileUpload);\n\nvar _fileViewer = require('./fileViewer.component');\n\nvar _fileViewer2 = _interopRequireDefault(_fileViewer);\n\nvar _folderList = require('./folderList.component');\n\nvar _folderList2 = _interopRequireDefault(_folderList);\n\nvar _gallery = require('./gallery.component');\n\nvar _gallery2 = _interopRequireDefault(_gallery);\n\nvar _group = require('./group.component');\n\nvar _group2 = _interopRequireDefault(_group);\n\nvar _header = require('./header.component');\n\nvar _header2 = _interopRequireDefault(_header);\n\nvar _loading = require('./loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nvar _numberInput = require('./numberInput.component');\n\nvar _numberInput2 = _interopRequireDefault(_numberInput);\n\nvar _param = require('./param.component');\n\nvar _param2 = _interopRequireDefault(_param);\n\nvar _paramGroup = require('./paramGroup.component');\n\nvar _paramGroup2 = _interopRequireDefault(_paramGroup);\n\nvar _player = require('./player.component');\n\nvar _player2 = _interopRequireDefault(_player);\n\nvar _progress = require('./progress.component');\n\nvar _progress2 = _interopRequireDefault(_progress);\n\nvar _select = require('./select.component');\n\nvar _select2 = _interopRequireDefault(_select);\n\nvar _selectGroup = require('./selectGroup.component');\n\nvar _selectGroup2 = _interopRequireDefault(_selectGroup);\n\nvar _slider = require('./slider.component');\n\nvar _slider2 = _interopRequireDefault(_slider);\n\nvar _textInput = require('./textInput.component');\n\nvar _textInput2 = _interopRequireDefault(_textInput);\n\nvar _taskList = require('./taskList.component');\n\nvar _taskList2 = _interopRequireDefault(_taskList);\n\nvar _views = require('./views');\n\nvar Views = _interopRequireWildcard(_views);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.Views = Views;\nexports.Loading = _loading2.default;\nexports.Progress = _progress2.default;\nexports.Header = _header2.default;\nexports.AudioPlayer = _audioPlayer2.default;\nexports.FolderList = _folderList2.default;\nexports.FileList = _fileList.FileList;\nexports.FileRow = _fileList.FileRow;\nexports.FileUpload = _fileUpload2.default;\nexports.FileViewer = _fileViewer2.default;\nexports.Gallery = _gallery2.default;\nexports.Player = _player2.default;\nexports.Group = _group2.default;\nexports.ParamGroup = _paramGroup2.default;\nexports.Param = _param2.default;\nexports.TextInput = _textInput2.default;\nexports.NumberInput = _numberInput2.default;\nexports.Slider = _slider2.default;\nexports.Select = _select2.default;\nexports.SelectGroup = _selectGroup2.default;\nexports.Button = _button2.default;\nexports.Checkbox = _checkbox2.default;\nexports.CurrentTask = _currentTask2.default;\nexports.TaskList = _taskList2.default;\nexports.ButtonGrid = _buttonGrid2.default;\nexports.AugmentationGrid = _augmentationGrid2.default;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = Loading;\n\nvar _preact = require('preact');\n\nvar _progress = require('./progress.component');\n\nvar _progress2 = _interopRequireDefault(_progress);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction Loading(_ref) {\n  var progress = _ref.progress;\n\n  return (0, _preact.h)(\n    'div',\n    { className: 'loading' },\n    'Loading',\n    (0, _preact.h)('br', null),\n    progress && (0, _preact.h)(_progress2.default, { progress: progress })\n  );\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar NumberInput = function (_Component) {\n  _inherits(NumberInput, _Component);\n\n  function NumberInput(props) {\n    _classCallCheck(this, NumberInput);\n\n    var _this = _possibleConstructorReturn(this, (NumberInput.__proto__ || Object.getPrototypeOf(NumberInput)).call(this, props));\n\n    _this.state = { value: null, changed: false };\n    _this.handleInput = _this.handleInput.bind(_this);\n    _this.handleKeydown = _this.handleKeydown.bind(_this);\n    return _this;\n  }\n\n  _createClass(NumberInput, [{\n    key: 'handleInput',\n    value: function handleInput(e) {\n      this.setState({\n        value: e.target.value,\n        changed: true\n      });\n      this.props.onInput && this.props.onInput(e.target.value, e.target.name);\n      this.props.onChange && this.props.onChange(e.target.name, e.target.value);\n    }\n  }, {\n    key: 'handleKeydown',\n    value: function handleKeydown(e) {\n      if (e.keyCode === 13) {\n        this.setState({\n          value: e.target.value,\n          changed: false\n        });\n        this.props.onSave && this.props.onSave(e.target.value, e.target.name);\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'div',\n        { className: 'numberInput param' },\n        (0, _preact.h)(\n          'label',\n          null,\n          (0, _preact.h)(\n            'span',\n            null,\n            this.props.title\n          ),\n          (0, _preact.h)('input', {\n            type: 'number',\n            name: this.props.name || 'number',\n            value: this.state.changed ? this.state.value : this.props.value,\n            onInput: this.handleInput,\n            onKeydown: this.handleKeydown,\n            placeholder: this.props.placeholder,\n            autofocus: this.props.autofocus,\n            min: this.props.min,\n            max: this.props.max,\n            step: this.props.step || this.props.type === 'int' ? 1 : 0.01\n          })\n        )\n      );\n    }\n  }]);\n\n  return NumberInput;\n}(_preact.Component);\n\nexports.default = NumberInput;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Param = function (_Component) {\n  _inherits(Param, _Component);\n\n  function Param(props) {\n    _classCallCheck(this, Param);\n\n    return _possibleConstructorReturn(this, (Param.__proto__ || Object.getPrototypeOf(Param)).call(this, props));\n  }\n\n  _createClass(Param, [{\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'div',\n        { className: 'button param' },\n        (0, _preact.h)(\n          'span',\n          null,\n          this.props.title\n        ),\n        (0, _preact.h)(\n          'span',\n          null,\n          this.props.children\n        )\n      );\n    }\n  }]);\n\n  return Param;\n}(_preact.Component);\n\nexports.default = Param;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nvar _redux = require('redux');\n\nvar _live = require('../live/live.actions');\n\nvar liveActions = _interopRequireWildcard(_live);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ParamGroup = function (_Component) {\n  _inherits(ParamGroup, _Component);\n\n  function ParamGroup(props) {\n    _classCallCheck(this, ParamGroup);\n\n    var _this = _possibleConstructorReturn(this, (ParamGroup.__proto__ || Object.getPrototypeOf(ParamGroup)).call(this, props));\n\n    _this.handleClick = _this.handleClick.bind(_this);\n    return _this;\n  }\n\n  _createClass(ParamGroup, [{\n    key: 'handleClick',\n    value: function handleClick(e) {\n      clearTimeout(this.timeout);\n      var new_value = e.target.checked;\n      this.props.actions.set_param(this.props.name, new_value);\n      this.props.onToggle && this.props.onToggle(new_value);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var checked = this.props.opt[this.props.name];\n      var toggle = !this.props.noToggle;\n      var dim = !this.props.noDim;\n      var className = !dim || !toggle || checked ? 'paramGroup active' : 'paramGroup inactive';\n      return (0, _preact.h)(\n        'div',\n        { className: className },\n        (0, _preact.h)(\n          'label',\n          null,\n          (0, _preact.h)(\n            'h3',\n            null,\n            this.props.title\n          ),\n          toggle ? (0, _preact.h)('input', {\n            type: 'checkbox',\n            onClick: this.handleClick,\n            checked: checked\n          }) : null\n        ),\n        this.props.children\n      );\n    }\n  }]);\n\n  return ParamGroup;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    opt: state.live.opt\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(liveActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(ParamGroup);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nfunction Player(props) {\n  var className = props.fullscreen ? 'player fullscreen' : 'player';\n  return (0, _preact.h)(\n    'div',\n    { className: className },\n    (0, _preact.h)('canvas', { width: props.width, height: props.height })\n  );\n}\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {};\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {};\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Player);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = Progress;\n\nvar _preact = require('preact');\n\nfunction Progress(_ref) {\n  var progress = _ref.progress;\n\n  if (!progress) return;\n  var i = progress.i,\n      n = progress.n;\n\n  var a = [];\n  for (var j = 0; j < n; j++) {\n    a.push((0, _preact.h)('div', { key: j, className: j < i ? 'x' : 'o' }));\n  }\n  return (0, _preact.h)(\n    'div',\n    { className: 'progress' },\n    a\n  );\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nvar _redux = require('redux');\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Select = function (_Component) {\n  _inherits(Select, _Component);\n\n  function Select(props) {\n    _classCallCheck(this, Select);\n\n    var _this = _possibleConstructorReturn(this, (Select.__proto__ || Object.getPrototypeOf(Select)).call(this, props));\n\n    _this.handleChange = _this.handleChange.bind(_this);\n    return _this;\n  }\n\n  _createClass(Select, [{\n    key: 'handleChange',\n    value: function handleChange(e) {\n      clearTimeout(this.timeout);\n      var new_value = e.target.value;\n      if (new_value === 'PLACEHOLDER') return;\n      this.props.onChange && this.props.onChange(this.props.name, new_value);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var currentValue = this.props.live ? this.props.opt[this.props.name] : this.props.value;\n      var lastValue = void 0;\n      var options = (this.props.options || []).map(function (key, i) {\n        var name = void 0,\n            value = void 0;\n        if (typeof key === 'string') {\n          name = key.length < 2 ? key.toUpperCase() : key;\n          value = key;\n        } else if ((typeof key === 'undefined' ? 'undefined' : _typeof(key)) === 'object') {\n          if (key.length) {\n            var _key = _slicedToArray(key, 2);\n\n            name = _key[0];\n            value = _key[1];\n          } else if (key.count) {\n            var frames = Math.round(key.count / 30) + ' s.';\n            name = key.name.replace(/_/g, ' ') + ' (' + frames + ')';\n            value = key.name;\n          } else {\n            name = key.name;\n            value = key.value || key.name;\n          }\n        }\n        lastValue = value;\n        return (0, _preact.h)(\n          'option',\n          { value: value, key: i },\n          name\n        );\n      });\n      return (0, _preact.h)(\n        'div',\n        { className: 'select param' },\n        (0, _preact.h)(\n          'label',\n          null,\n          (0, _preact.h)(\n            'span',\n            null,\n            this.props.title\n          ),\n          (0, _preact.h)(\n            'select',\n            {\n              onChange: this.handleChange,\n              value: currentValue || lastValue\n            },\n            this.props.placeholder && (0, _preact.h)(\n              'option',\n              { value: 'PLACEHOLDER' },\n              this.props.placeholder\n            ),\n            options\n          )\n        ),\n        this.props.children\n      );\n    }\n  }]);\n\n  return Select;\n}(_preact.Component);\n\nfunction capitalize(s) {\n  return (s || \"\").replace(/(?:^|\\s)\\S/g, function (a) {\n    return a.toUpperCase();\n  });\n}\n\nvar mapStateToProps = function mapStateToProps(state, props) {\n  return {\n    opt: props.opt || state.live.opt\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {};\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Select);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nvar _redux = require('redux');\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SelectGroup = function (_Component) {\n  _inherits(SelectGroup, _Component);\n\n  function SelectGroup(props) {\n    _classCallCheck(this, SelectGroup);\n\n    var _this = _possibleConstructorReturn(this, (SelectGroup.__proto__ || Object.getPrototypeOf(SelectGroup)).call(this, props));\n\n    _this.handleChange = _this.handleChange.bind(_this);\n    return _this;\n  }\n\n  _createClass(SelectGroup, [{\n    key: 'handleChange',\n    value: function handleChange(e) {\n      clearTimeout(this.timeout);\n      var new_value = e.target.value;\n      if (new_value === 'PLACEHOLDER') return;\n      this.props.onChange && this.props.onChange(this.props.name, new_value);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var currentValue = this.props.live ? this.props.opt[this.props.name] : this.props.value;\n      var lastValue = void 0;\n      var options = (this.props.options || []).map(function (group, i) {\n        var groupName = group.name;\n        var children = group.options.map(function (key) {\n          var name = key.length < 2 ? key.toUpperCase() : key;\n          name = name.replace(/_/g, ' ');\n          var value = key;\n          lastValue = value;\n          return (0, _preact.h)(\n            'option',\n            { value: value, key: value },\n            name\n          );\n        });\n        return (0, _preact.h)(\n          'optgroup',\n          { label: groupName, key: groupName },\n          children\n        );\n      });\n      return (0, _preact.h)(\n        'div',\n        { className: 'select param' },\n        (0, _preact.h)(\n          'label',\n          null,\n          (0, _preact.h)(\n            'span',\n            null,\n            this.props.title\n          ),\n          (0, _preact.h)(\n            'select',\n            {\n              onChange: this.handleChange,\n              value: currentValue || lastValue\n            },\n            this.props.placeholder && (0, _preact.h)(\n              'option',\n              { value: 'PLACEHOLDER' },\n              this.props.placeholder\n            ),\n            options\n          )\n        ),\n        this.props.children\n      );\n    }\n  }]);\n\n  return SelectGroup;\n}(_preact.Component);\n\nfunction capitalize(s) {\n  return (s || \"\").replace(/(?:^|\\s)\\S/g, function (a) {\n    return a.toUpperCase();\n  });\n}\n\nvar mapStateToProps = function mapStateToProps(state, props) {\n  return {\n    opt: props.opt || state.live.opt\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {};\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SelectGroup);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nvar _redux = require('redux');\n\nvar _live = require('../live/live.actions');\n\nvar liveActions = _interopRequireWildcard(_live);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SLIDER_THROTTLE_TIME = 100;\n\nvar Slider = function (_Component) {\n  _inherits(Slider, _Component);\n\n  function Slider(props) {\n    _classCallCheck(this, Slider);\n\n    var _this = _possibleConstructorReturn(this, (Slider.__proto__ || Object.getPrototypeOf(Slider)).call(this, props));\n\n    _this.timeout = 0;\n    _this.state = {\n      value: props.live ? props.opt[props.name] : props.value\n    };\n    _this.handleInput = _this.handleInput.bind(_this);\n    _this.handleRange = _this.handleRange.bind(_this);\n    return _this;\n  }\n\n  _createClass(Slider, [{\n    key: 'componentWillReceiveProps',\n    value: function componentWillReceiveProps(nextProps) {\n      var next_value = nextProps.value || nextProps.opt[nextProps.name];\n      if (next_value !== this.state.value) {\n        this.setState({ value: next_value });\n      }\n    }\n  }, {\n    key: 'handleInput',\n    value: function handleInput(e) {\n      var _props = this.props,\n          name = _props.name,\n          opt = _props.opt;\n\n      var old_value = opt[name];\n      var new_value = e.target.value;\n      if (new_value === '') {\n        new_value = this.props.defaultValue || (this.props.max - this.props.min) / 2;\n      } else if (this.props.type === 'int') {\n        new_value = parseInt(new_value);\n      } else if (this.props.type === 'odd') {\n        new_value = parseInt(Math.floor(new_value / 2) * 2 + 1);\n      }\n      if (old_value !== new_value) {\n        this.setState({ value: new_value });\n        this.props.live && this.props.actions.set_param(this.props.name, new_value);\n        this.props.onChange && this.props.onChange(new_value);\n      }\n      clearTimeout(this.timeout);\n    }\n  }, {\n    key: 'handleRange',\n    value: function handleRange(e) {\n      var _this2 = this;\n\n      clearTimeout(this.timeout);\n      var new_value = e.target.value;\n      if (this.props.type === 'int') {\n        new_value = parseInt(new_value);\n      }\n      if (this.props.type === 'odd') {\n        new_value = parseInt(Math.floor(new_value / 2) * 2 + 1);\n      }\n      if (this.props.type === 'list') {\n        new_value = this.props.options[new_value] || this.props.options[0];\n      }\n      this.setState({ value: new_value });\n      this.timeout = setTimeout(function () {\n        _this2.props.live && _this2.props.actions.set_param(_this2.props.name, new_value);\n        _this2.props.onChange && _this2.props.onChange(new_value);\n      }, SLIDER_THROTTLE_TIME);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props2 = this.props,\n          name = _props2.name,\n          title = _props2.title;\n\n      var value = this.state.value;\n      if (typeof value === 'undefined') {\n        value = this.props.min;\n      }\n      var text_value = value;\n      var step = void 0;\n      var min = this.props.min || 0;\n      var max = this.props.max || 0;\n      if (this.props.type === 'int') {\n        step = 1;\n      } else if (this.props.type === 'list') {\n        min = 0;\n        max = this.props.options.length - 1;\n        step = 1;\n        value = this.props.options.indexOf(value);\n      } else {\n        step = (this.props.max - this.props.min) / 100;\n        text_value = parseFloat(value).toFixed(2);\n      }\n      return (0, _preact.h)(\n        'div',\n        { className: 'slider param' },\n        (0, _preact.h)(\n          'label',\n          null,\n          (0, _preact.h)(\n            'span',\n            null,\n            title || name.replace(/_/g, ' ')\n          ),\n          (0, _preact.h)('input', { type: 'text', value: text_value, onBlur: this.handleInput })\n        ),\n        (0, _preact.h)('input', {\n          type: 'range',\n          min: min,\n          max: max,\n          step: step,\n          value: value,\n          onInput: this.handleRange\n        })\n      );\n    }\n  }]);\n\n  return Slider;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    opt: state.live.opt\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(liveActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Slider);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _util = require('../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _actions = require('../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar TaskList = function (_Component) {\n  _inherits(TaskList, _Component);\n\n  function TaskList(props) {\n    _classCallCheck(this, TaskList);\n\n    return _possibleConstructorReturn(this, (TaskList.__proto__ || Object.getPrototypeOf(TaskList)).call(this));\n  }\n\n  _createClass(TaskList, [{\n    key: 'shouldComponentUpdate',\n    value: function shouldComponentUpdate(nextProps) {\n      if (nextProps.tasks.length !== this.props.tasks.length) {\n        return true;\n      }\n      if (nextProps.tasks[0] !== this.props.tasks[0]) {\n        return true;\n      }\n      return false;\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      var _props = this.props,\n          title = _props.title,\n          tasks = _props.tasks;\n\n      var time = 0;\n\n      var _util$sort$orderByFn = _util2.default.sort.orderByFn(this.props.sort || 'date desc'),\n          mapFn = _util$sort$orderByFn.mapFn,\n          sortFn = _util$sort$orderByFn.sortFn;\n\n      var taskList = tasks.map(mapFn).sort(sortFn).map(function (pair) {\n        var task = pair[1];\n        var dataset = task.dataset;\n\n        var dataset_link = void 0,\n            label = dataset;\n        // console.log(task)\n        switch (task.activity) {\n          case 'train':\n            if (task.epoch === 0) {\n              label += ', latest';\n            } else {\n              label += ', ' + task.epoch;\n            }\n            label += ' + ' + task.epochs;\n            break;\n          case 'augment':\n            try {\n              var opt = JSON.parse(task.opt);\n              label += ', ' + opt.augment_take + ' x ' + opt.augment_make;\n            } catch (e) {\n              //\n            }\n          default:\n            break;\n        }\n        if (task.folder_id) {\n          var href = '/' + task.module + '/' + (task.module === 'samplernn' ? 'datasets' : 'sequences') + '/' + task.folder_id + '/';\n          dataset_link = (0, _preact.h)(\n            _reactRouterDom.Link,\n            { to: href },\n            label\n          );\n        } else {\n          dataset_link = label;\n        }\n        return (0, _preact.h)(\n          'div',\n          { className: 'row' },\n          (0, _preact.h)(\n            'div',\n            { className: 'activity' },\n            task.activity,\n            ' ',\n            task.module\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'dataset' },\n            dataset_link\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: \"age \" + _util2.default.carbon_date(task.updated_at) },\n            _util2.default.get_age(task.updated_at)\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'options' },\n            (0, _preact.h)(\n              'span',\n              { className: 'destroy', onClick: function onClick() {\n                  return _this2.handleDestroy(task);\n                } },\n              'x'\n            )\n          )\n        );\n      });\n      return (0, _preact.h)(\n        'div',\n        { className: 'tasklist rows' },\n        taskList\n      );\n    }\n  }, {\n    key: 'handleDestroy',\n    value: function handleDestroy(task) {\n      var yes = confirm('Are you sure you want to delete this task?');\n      if (yes) {\n        _actions2.default.task.destroy(task);\n      }\n    }\n  }]);\n\n  return TaskList;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {};\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    // actions: bindActionCreators(liveActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(TaskList);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar TextInput = function (_Component) {\n  _inherits(TextInput, _Component);\n\n  function TextInput(props) {\n    _classCallCheck(this, TextInput);\n\n    var _this = _possibleConstructorReturn(this, (TextInput.__proto__ || Object.getPrototypeOf(TextInput)).call(this, props));\n\n    _this.state = { value: null, changed: false };\n    _this.handleInput = _this.handleInput.bind(_this);\n    _this.handleKeydown = _this.handleKeydown.bind(_this);\n    return _this;\n  }\n\n  _createClass(TextInput, [{\n    key: 'handleInput',\n    value: function handleInput(e) {\n      this.setState({\n        value: e.target.value,\n        changed: true\n      });\n      this.props.onInput && this.props.onInput(e.target.value, e.target.name);\n    }\n  }, {\n    key: 'handleKeydown',\n    value: function handleKeydown(e) {\n      if (e.keyCode === 13) {\n        this.setState({\n          value: e.target.value,\n          changed: false\n        });\n        this.props.onSave && this.props.onSave(e.target.value, e.target.name);\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _h;\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'textInput param' },\n        (0, _preact.h)(\n          'label',\n          null,\n          (0, _preact.h)(\n            'span',\n            null,\n            this.props.title\n          ),\n          (0, _preact.h)('input', (_h = {\n            type: this.props.type || 'text',\n            name: this.props.name || 'text',\n            value: this.state.changed ? this.state.value : this.props.value,\n            onInput: this.handleInput,\n            onKeydown: this.handleKeydown,\n            autofocus: this.props.autofocus,\n            autoComplete: this.props.autocomplete,\n            autoCapitalize: this.props.autocapitalize || 'off',\n            placeholder: this.props.placeholder\n          }, _defineProperty(_h, 'autofocus', this.props.autofocus), _defineProperty(_h, 'className', this.props.className || ''), _h))\n        )\n      );\n    }\n  }]);\n\n  return TextInput;\n}(_preact.Component);\n\nexports.default = TextInput;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.New = undefined;\n\nvar _newView = require('./new.view.js');\n\nvar _newView2 = _interopRequireDefault(_newView);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar New = exports.New = _newView2.default;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _group = require('../group.component');\n\nvar _group2 = _interopRequireDefault(_group);\n\nvar _param = require('../param.component');\n\nvar _param2 = _interopRequireDefault(_param);\n\nvar _loading = require('../loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nvar _folderList = require('../folderList.component');\n\nvar _folderList2 = _interopRequireDefault(_folderList);\n\nvar _dataset = require('../../dataset/dataset.new');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar NewView = function (_Component) {\n  _inherits(NewView, _Component);\n\n  function NewView(props) {\n    _classCallCheck(this, NewView);\n\n    var _this = _possibleConstructorReturn(this, (NewView.__proto__ || Object.getPrototypeOf(NewView)).call(this, props));\n\n    console.log(props);\n    if (!props.db.data) {\n      props.actions.load_directories();\n    }\n    return _this;\n  }\n\n  _createClass(NewView, [{\n    key: 'render',\n    value: function render() {\n      var _props = this.props,\n          module = _props.module,\n          history = _props.history,\n          db = _props.db,\n          path = _props.path;\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'app new-view ' + module.name },\n        (0, _preact.h)(\n          'div',\n          { className: 'heading' },\n          (0, _preact.h)(\n            'h1',\n            null,\n            module.displayName || module.name\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { className: 'col narrow' },\n          (0, _preact.h)(_dataset2.default, {\n            module: module,\n            history: history\n          }),\n          (0, _preact.h)(_folderList2.default, {\n            db: db,\n            path: path,\n            activity: 'dataset',\n            emptyText: (0, _preact.h)(\n              'i',\n              null,\n              'No projects yet. Please create one~'\n            )\n          })\n        )\n      );\n    }\n  }]);\n\n  return NewView;\n}(_preact.Component);\n\nexports.default = NewView;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.load = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _actions = require('../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar load = exports.load = function load() {\n  return function (dispatch) {\n    _util2.default.allProgress([_actions2.default.task.index({ limit: 40, orderBy: 'created_at desc' }), _actions2.default.folder.index({ activity: 'dataset' }), _actions2.default.file.index({ module: 'samplernn', generated: 1, limit: 15, orderBy: 'created_at desc' }), _actions2.default.file.index({ module: 'pix2pixhd', generated: 1, limit: 15, orderBy: 'created_at desc' }), _actions2.default.file.index({ module: 'morph', generated: 1, limit: 15, orderBy: 'created_at desc' })], function (percent, i, n) {\n      // console.log('dashboard load progress', i, n)\n      dispatch({\n        type: _types2.default.app.load_progress,\n        progress: { i: i, n: n },\n        data: { module: 'dashboard' }\n      });\n    }).then(function (res) {\n      var _res = _slicedToArray(res, 5),\n          tasks = _res[0],\n          folders = _res[1],\n          samplernn = _res[2],\n          pix2pixhd = _res[3],\n          morph = _res[4];\n\n      var _util$sort$orderByFn = _util2.default.sort.orderByFn('date desc'),\n          mapFn = _util$sort$orderByFn.mapFn,\n          sortFn = _util$sort$orderByFn.sortFn;\n\n      var foldersByModule = folders.map(mapFn).sort(sortFn).reduce(function (a, b) {\n        var module = b[1].module;\n        a[module] = a[module] || [];\n        a[module].push(b[1]);\n        return a;\n      }, {});\n      dispatch({\n        type: _types2.default.dashboard.load,\n        data: {\n          tasks: tasks,\n          folders: folders,\n          foldersByModule: foldersByModule,\n          renders: {\n            samplernn: samplernn,\n            pix2pixhd: pix2pixhd,\n            morph: morph\n          }\n        }\n      });\n    });\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _reactRedux = require('react-redux');\n\nvar _player = require('../common/player.component');\n\nvar _player2 = _interopRequireDefault(_player);\n\nvar _group = require('../common/group.component');\n\nvar _group2 = _interopRequireDefault(_group);\n\nvar _slider = require('../common/slider.component');\n\nvar _slider2 = _interopRequireDefault(_slider);\n\nvar _select = require('../common/select.component');\n\nvar _select2 = _interopRequireDefault(_select);\n\nvar _button = require('../common/button.component');\n\nvar _button2 = _interopRequireDefault(_button);\n\nvar _dashboardheader = require('./dashboardheader.component');\n\nvar _dashboardheader2 = _interopRequireDefault(_dashboardheader);\n\nvar _common = require('../common');\n\nvar _dashboard = require('./dashboard.actions');\n\nvar dashboardActions = _interopRequireWildcard(_dashboard);\n\nvar _audioPlayer = require('../common/audioPlayer/audioPlayer.actions');\n\nvar audioPlayerActions = _interopRequireWildcard(_audioPlayer);\n\nvar _modules = require('../modules');\n\nvar _modules2 = _interopRequireDefault(_modules);\n\nvar _actions = require('../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Dashboard = function (_Component) {\n  _inherits(Dashboard, _Component);\n\n  function Dashboard(props) {\n    _classCallCheck(this, Dashboard);\n\n    // console.log(props)\n    var _this = _possibleConstructorReturn(this, (Dashboard.__proto__ || Object.getPrototypeOf(Dashboard)).call(this));\n\n    props.actions.load();\n    return _this;\n  }\n\n  _createClass(Dashboard, [{\n    key: 'componentWillUpdate',\n    value: function componentWillUpdate(nextProps) {\n      // if (nextProps.opt.checkpoint_name && nextProps.opt.checkpoint_name !== this.props.opt.checkpoint_name) {\n      //   this.props.actions.list_epochs(nextProps.opt.checkpoint_name)\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      var _props = this.props,\n          loading = _props.loading,\n          progress = _props.progress,\n          site = _props.site,\n          foldersByModule = _props.foldersByModule,\n          renders = _props.renders,\n          queue = _props.queue,\n          images = _props.images;\n\n      if (loading) {\n        return (0, _preact.h)(_common.Loading, { progress: progress });\n      }\n      var tasks = queue.tasks;\n\n      var folders = foldersByModule && Object.keys(_modules2.default).sort().map(function (key) {\n        var path = key === 'samplernn' ? '/samplernn/datasets/' : '/' + key + '/sequences/';\n        var folder_list = (foldersByModule[key] || []).map(function (folder) {\n          return (0, _preact.h)(\n            'div',\n            { key: folder.id },\n            (0, _preact.h)(\n              _reactRouterDom.Link,\n              { to: path + folder.id + '/' },\n              folder.name\n            )\n          );\n        });\n\n        var files = renders[key] && (0, _preact.h)(_common.FileList, {\n          linkFiles: true,\n          files: renders[key],\n          orderBy: 'date desc',\n          fields: 'name date epoch size',\n          onClick: key === 'samplernn' ? function (file, e) {\n            e.preventDefault();\n            e.stopPropagation();\n            console.log('picked a file', file);\n            _this2.handlePick(file);\n          } : null\n        });\n\n        return (0, _preact.h)(\n          'div',\n          { className: 'dashboardModule', key: key },\n          (0, _preact.h)(\n            'div',\n            { className: 'row moduleHeading' },\n            (0, _preact.h)(\n              'h3',\n              null,\n              key\n            ),\n            (0, _preact.h)(\n              'div',\n              null,\n              (0, _preact.h)(\n                _reactRouterDom.Link,\n                { to: '/' + key + '/new/' },\n                'new'\n              )\n            ),\n            folder_list\n          ),\n          files\n        );\n      }).filter(function (a) {\n        return !!a;\n      });\n      return (0, _preact.h)(\n        'div',\n        { className: 'app dashboard' },\n        (0, _preact.h)(_dashboardheader2.default, null),\n        (0, _preact.h)(\n          'div',\n          { className: 'params row' },\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            !!queue.queue.length && (0, _preact.h)(\n              _group2.default,\n              { title: 'Upcoming Tasks' },\n              (0, _preact.h)(_common.TaskList, { tasks: queue.queue.map(function (id) {\n                  return tasks[id];\n                }) })\n            ),\n            !!queue.completed.length && (0, _preact.h)(\n              _group2.default,\n              { title: 'Completed Tasks' },\n              (0, _preact.h)(_common.TaskList, { tasks: queue.completed.map(function (id) {\n                  return tasks[id];\n                }) })\n            )\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            folders\n          )\n        )\n      );\n    }\n  }, {\n    key: 'handlePick',\n    value: function handlePick(file) {\n      this.props.audioPlayer.play(file);\n    }\n  }]);\n\n  return Dashboard;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    loading: state.dashboard.loading,\n    progress: state.dashboard.progress,\n    site: state.system.site,\n    foldersByModule: state.dashboard.data.foldersByModule,\n    renders: state.dashboard.data.renders,\n    images: state.dashboard.images,\n    files: state.dashboard.files,\n    queue: state.queue\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(dashboardActions, dispatch),\n    audioPlayer: (0, _redux.bindActionCreators)(audioPlayerActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Dashboard);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _moment = require('moment/min/moment.min');\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar FileSaver = require('file-saver');\n\nvar dashboardInitialState = {\n  loading: false,\n  progress: null,\n  error: null,\n  data: {},\n  images: [],\n  files: []\n};\n\nvar dashboardReducer = function dashboardReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : dashboardInitialState;\n  var action = arguments[1];\n\n  switch (action.type) {\n    case _types2.default.app.load_progress:\n      if (!action.data || action.data.module !== 'dashboard') {\n        return state;\n      }\n      return _extends({}, state, {\n        loading: true,\n        progress: action.progress\n      });\n    case _types2.default.dashboard.load:\n      return _extends({}, state, {\n        loading: false,\n        error: null,\n        data: action.data\n      });\n    default:\n      return state;\n  }\n};\n\nexports.default = dashboardReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nvar _redux = require('redux');\n\nvar _util = require('../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar DashboardHeader = function (_Component) {\n  _inherits(DashboardHeader, _Component);\n\n  function DashboardHeader(props) {\n    _classCallCheck(this, DashboardHeader);\n\n    var _this = _possibleConstructorReturn(this, (DashboardHeader.__proto__ || Object.getPrototypeOf(DashboardHeader)).call(this, props));\n\n    _this.handleClick = _this.handleClick.bind(_this);\n    return _this;\n  }\n\n  _createClass(DashboardHeader, [{\n    key: 'handleClick',\n    value: function handleClick(e) {\n      this.props.onClick && this.props.onClick();\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props = this.props,\n          site = _props.site,\n          runner = _props.runner;\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'dashboardHeader heading' },\n        (0, _preact.h)(\n          'h1',\n          null,\n          site.name,\n          ' cortex'\n        ),\n        this.renderStatus(\"GPU\", runner.gpu),\n        this.renderStatus(\"CPU\", runner.cpu)\n      );\n    }\n  }, {\n    key: 'renderStatus',\n    value: function renderStatus(name, gpu) {\n      if (gpu.status === 'IDLE') {\n        return (0, _preact.h)(\n          'div',\n          null,\n          name,\n          ' idle'\n        );\n      }\n      var task = gpu.task;\n      var activityPhrase = void 0,\n          liveMessage = void 0;\n      if (task.activity === 'live') {\n        return (0, _preact.h)(\n          'div',\n          null,\n          name,\n          ' running ',\n          (0, _preact.h)(\n            'b',\n            null,\n            task.module\n          ),\n          ' live on \"',\n          task.dataset,\n          '\"'\n        );\n      } else {\n        return (0, _preact.h)(\n          'div',\n          null,\n          name,\n          ' ',\n          _util2.default.gerund(task.activity),\n          ' ',\n          (0, _preact.h)(\n            'b',\n            null,\n            task.module\n          ),\n          ' on ',\n          (0, _preact.h)(\n            'b',\n            null,\n            task.dataset\n          ),\n          !!task.epoch && (0, _preact.h)(\n            'span',\n            null,\n            'Epoch: ',\n            task.epoch,\n            ' / ',\n            task.epochs,\n            (0, _preact.h)('br', null)\n          )\n        );\n      }\n    }\n  }]);\n\n  return DashboardHeader;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    runner: state.system.runner,\n    site: state.system.site\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {};\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(DashboardHeader);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.uploadFiles = exports.fetchURL = exports.uploadFile = exports.updateFolder = exports.createFolder = undefined;\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _actions = require('../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _api = require('../api');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar createFolder = exports.createFolder = function createFolder(module, name) {\n  return function (dispatch) {\n    return _actions2.default.folder.create({\n      // username... should get added inside the API\n      module: module.name,\n      datatype: module.datatype,\n      activity: 'dataset',\n      name: name\n    });\n  };\n}; // import socket from '../socket'\nvar updateFolder = exports.updateFolder = function updateFolder(module, folder, name) {\n  var opt = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n  return function (dispatch) {\n    if (!folder || !folder.id) {\n      return null;\n    }\n    return _actions2.default.folder.update({\n      id: folder.id,\n      module: module.name,\n      datatype: module.datatype,\n      activity: 'dataset',\n      name: name,\n      opt: opt\n    });\n  };\n};\n\nvar uploadFile = exports.uploadFile = function uploadFile(module, folder, file, filename, opt) {\n  return function (dispatch) {\n    var fd = new FormData();\n    fd.append('file', file, filename);\n    _actions2.default.folder.upload(fd, {\n      id: folder.id,\n      module: module.name,\n      activity: 'file',\n      epoch: 0,\n      processed: false,\n      generated: false,\n      opt: opt\n    });\n  };\n};\n\nvar fetchURL = exports.fetchURL = function fetchURL(module, folder, url) {\n  return function (dispatch) {\n    // name url\n    // mime datatype\n    // duration analysis\n    // size activity\n    // opt created_at updated_at\n    console.log(module, folder, url);\n    var seenURL = folder.files.some(function (file) {\n      return file.url === url;\n    });\n    console.log(seenURL);\n    if (seenURL) {\n      console.log('already seen this url');\n      return;\n    }\n    _api.parser.parse(url, function (media) {\n      if (!media) return;\n      console.log('media', media);\n      _actions2.default.file.create({\n        folder_id: folder.id,\n        name: (media.title || \"\").replace(/\\.[^.]+$/g, '').replace(/[^a-zA-Z0-9_]/g, '_').replace(/\\s+/g, '_').replace(/_+/g, '_'),\n        module: module.name,\n        dataset: media.token,\n        activity: 'url',\n        duration: parseInt(media.duration) || 0,\n        epoch: 0,\n        processed: false,\n        generated: false,\n        opt: media,\n        url: url\n      });\n    });\n  };\n};\n\nvar uploadFiles = exports.uploadFiles = function uploadFiles(files) {\n  return { type: _types2.default.dataset.upload_files };\n};\n\n// export const uploadFiles = (files) => {\n//   return dispatch => {\n//     // return { type: types.dataset.upload_files }\n//   }\n// }\n\n// export const fetchURL = (url) => { type: types.dataset.fetch_url }","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _actions = require('../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _fileList = require('../common/fileList.component');\n\nvar _loading = require('../common/loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar fieldSet = _util2.default.fieldSet(new Set(['input', 'status', 'checkpoint', 'output']));\n\nvar DatasetComponent = function (_Component) {\n  _inherits(DatasetComponent, _Component);\n\n  function DatasetComponent() {\n    _classCallCheck(this, DatasetComponent);\n\n    return _possibleConstructorReturn(this, (DatasetComponent.__proto__ || Object.getPrototypeOf(DatasetComponent)).apply(this, arguments));\n  }\n\n  _createClass(DatasetComponent, [{\n    key: 'render',\n    value: function render() {\n      var _props = this.props,\n          loading = _props.loading,\n          progress = _props.progress,\n          fields = _props.fields,\n          module = _props.module,\n          data = _props.data,\n          folder = _props.folder,\n          match = _props.match,\n          history = _props.history;\n\n      if (loading) {\n        return (0, _preact.h)(_loading2.default, { progress: progress });\n      }\n      if (!data.folders.length) {\n        console.log('no folders, redirect to /new');\n        return history.push('/' + module.name + '/new/');\n      }\n      if (!folder || !folder.name) return;\n      fields = fieldSet(fields);\n      return (0, _preact.h)(\n        'div',\n        { className: 'rows params datasets' },\n        (0, _preact.h)(\n          'div',\n          { className: 'row row-heading dataset' },\n          fields.has('input') && (0, _preact.h)(\n            'div',\n            { className: 'col' },\n            'input'\n          ),\n          fields.has('status') && (0, _preact.h)(\n            'div',\n            { className: 'col' },\n            'status'\n          ),\n          fields.has('checkpoint') && (0, _preact.h)(\n            'div',\n            { className: 'col' },\n            'checkpoint'\n          ),\n          fields.has('output') && (0, _preact.h)(\n            'div',\n            { className: 'col' },\n            'output'\n          )\n        ),\n        this.renderGroups()\n      );\n    }\n  }, {\n    key: 'renderGroups',\n    value: function renderGroups() {\n      var _this2 = this;\n\n      var _props2 = this.props,\n          module = _props2.module,\n          data = _props2.data,\n          folder = _props2.folder,\n          fields = _props2.fields,\n          runner = _props2.runner,\n          onPickDataset = _props2.onPickDataset,\n          onPickFile = _props2.onPickFile,\n          datasetActions = _props2.datasetActions;\n\n      fields = fieldSet(fields);\n      var datasetLookup = data.datasetLookup,\n          fileLookup = data.fileLookup;\n\n      if (!datasetLookup) {\n        return (0, _preact.h)('div', null);\n      }\n\n      var _util$sort$orderByFn = _util2.default.sort.orderByFn('date desc'),\n          mapFn = _util$sort$orderByFn.mapFn,\n          sortFn = _util$sort$orderByFn.sortFn;\n\n      var moduleOnCPU = runner && runner.cpu.task && runner.cpu.task.module === module.name;\n      var moduleOnGPU = runner && runner.gpu.task && runner.gpu.task.module === module.name;\n      var datasets = folder.datasets.map(function (name) {\n        return datasetLookup[name];\n      }).map(mapFn).sort(sortFn).map(function (pair) {\n        var dataset = pair[1];\n        var status = '';\n        var isProcessing = false,\n            isFetching = false;\n        if (moduleOnGPU && runner.gpu.task.dataset === dataset) {\n          status = _util2.default.gerund(runner.gpu.task.activity);\n          isProcessing = true;\n        } else if (moduleOnCPU && runner.cpu.task.activity === 'fetch' && runner.cpu.task.opt.file_id === dataset.input[0]) {\n          isProcessing = true;\n          isFetching = true;\n        }\n        return (0, _preact.h)(\n          'div',\n          { key: dataset.name, className: 'row dataset', onClick: function onClick() {\n              return onPickDataset && onPickDataset(dataset);\n            } },\n          _this2.props.beforeRow && _this2.props.beforeRow(dataset),\n          fields.has('input') && (0, _preact.h)(\n            'div',\n            { className: 'col' },\n            !!dataset.input.length && (0, _preact.h)(_fileList.FileList, {\n              files: dataset.input.map(function (id) {\n                return fileLookup[id];\n              }),\n              className: 'input_files',\n              fileListClassName: '',\n              rowClassName: 'input_file',\n              fields: 'name date size delete',\n              linkFiles: true,\n              onClick: onPickFile,\n              onDelete: function onDelete(file) {\n                return _this2.onDeleteFile(file);\n              }\n            })\n          ),\n          fields.has('status') && (0, _preact.h)(\n            'div',\n            { className: ['col', 'quiet', dataset.isBuilt ? 'built' : 'not_built', isProcessing ? 'processing' : 'not_processing'].join(' ') },\n            _this2.props.datasetActions && _this2.props.datasetActions(dataset, isFetching, isProcessing),\n            status\n          ),\n          fields.has('checkpoint') && (0, _preact.h)(\n            'div',\n            { className: 'col checkpoint' },\n            !!dataset.checkpoints.length && (0, _preact.h)(_fileList.FileRow, {\n              file: dataset.checkpoints[0],\n              fields: 'name date epoch',\n              className: 'row checkpoint'\n            })\n          ),\n          fields.has('output') && (0, _preact.h)(\n            'div',\n            { className: 'col' },\n            !!dataset.output.length && (0, _preact.h)(_fileList.FileList, {\n              files: dataset.output.map(function (id) {\n                return fileLookup[id];\n              }),\n              orderBy: 'epoch desc',\n              fields: 'name date epoch size',\n              linkFiles: true,\n              onClick: onPickFile,\n              onDelete: function onDelete(file) {\n                return _this2.onDeleteFile(file);\n              }\n            })\n          ),\n          _this2.props.afterRow && _this2.props.afterRow(dataset)\n        );\n      });\n      return datasets;\n    }\n  }, {\n    key: 'onDeleteFile',\n    value: function onDeleteFile(file) {\n      var yes = confirm('Are you sure you want to delete this file?');\n      if (yes) {\n        console.log('delete: confirmed');\n        if (this.props.onDeleteFile) {\n          console.log('calling custom deletefile function');\n          this.props.onDeleteFile(file);\n        } else {\n          _actions2.default.file.destroy(file);\n        }\n      }\n    }\n  }]);\n\n  return DatasetComponent;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    runner: state.system.runner\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {};\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(DatasetComponent);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _dataset = require('./dataset.actions');\n\nvar datasetActions = _interopRequireWildcard(_dataset);\n\nvar _group = require('../common/group.component');\n\nvar _group2 = _interopRequireDefault(_group);\n\nvar _param = require('../common/param.component');\n\nvar _param2 = _interopRequireDefault(_param);\n\nvar _fileList = require('../common/fileList.component');\n\nvar _fileUpload = require('../common/fileUpload.component');\n\nvar _fileUpload2 = _interopRequireDefault(_fileUpload);\n\nvar _textInput = require('../common/textInput.component');\n\nvar _textInput2 = _interopRequireDefault(_textInput);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar DatasetForm = function (_Component) {\n  _inherits(DatasetForm, _Component);\n\n  function DatasetForm() {\n    _classCallCheck(this, DatasetForm);\n\n    return _possibleConstructorReturn(this, (DatasetForm.__proto__ || Object.getPrototypeOf(DatasetForm)).apply(this, arguments));\n  }\n\n  _createClass(DatasetForm, [{\n    key: 'render',\n    value: function render() {\n      var _props = this.props,\n          loading = _props.loading,\n          status = _props.status,\n          error = _props.error,\n          module = _props.module,\n          folder = _props.folder,\n          _props$title = _props.title,\n          title = _props$title === undefined ? 'Dataset' : _props$title,\n          canRename = _props.canRename,\n          canUpload = _props.canUpload,\n          canAddURL = _props.canAddURL;\n      // sort files??\n\n      if (!folder.id) {\n        return (0, _preact.h)(\n          'div',\n          { className: 'params row' },\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            this.renderFolderNameInput(folder.name)\n          )\n        );\n      }\n      return (0, _preact.h)(\n        'div',\n        { className: 'form params row' },\n        (0, _preact.h)(\n          'div',\n          { className: 'col' },\n          (0, _preact.h)(\n            _group2.default,\n            null,\n            canRename && this.renderFolderNameInput(folder.name),\n            canUpload && this.renderUploadInput(),\n            canAddURL && this.renderURLInput()\n          )\n        )\n      );\n    }\n  }, {\n    key: 'curry',\n    value: function curry(action) {\n      var _props2 = this.props,\n          module = _props2.module,\n          folder = _props2.folder;\n\n      return function (param) {\n        return action(module, folder, param);\n      };\n    }\n  }, {\n    key: 'renderFolderNameInput',\n    value: function renderFolderNameInput(name) {\n      return (0, _preact.h)(_textInput2.default, {\n        title: 'Dataset name',\n        value: name,\n        onSave: this.curry(this.props.actions.dataset.updateFolder)\n      });\n    }\n  }, {\n    key: 'renderUploadInput',\n    value: function renderUploadInput() {\n      return (0, _preact.h)(_fileUpload2.default, {\n        title: 'Upload a file',\n        mime: 'image.*',\n        onUpload: this.curry(this.props.actions.dataset.uploadFile)\n      });\n    }\n  }, {\n    key: 'renderURLInput',\n    value: function renderURLInput() {\n      return (0, _preact.h)(_textInput2.default, {\n        title: 'Fetch a URL',\n        placeholder: 'http://',\n        onSave: this.curry(this.props.actions.dataset.fetchURL)\n      });\n    }\n  }]);\n\n  return DatasetForm;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return state.upload;\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: {\n      dataset: (0, _redux.bindActionCreators)(datasetActions, dispatch)\n    }\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(DatasetForm);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.load = exports.getDataset = exports.emptyDataset = exports.unsortedFolder = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _actions = require('../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar unsortedFolders = {};\n\nvar unsortedFolder = exports.unsortedFolder = function unsortedFolder(module) {\n  var instantiate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n  if (!unsortedFolders[module] || instantiate) {\n    var folder = {\n      id: 0,\n      module: module,\n      name: 'unsorted',\n      files: [],\n      datasets: []\n    };\n    unsortedFolders[module] = folder;\n  }\n  return unsortedFolders[module];\n};\n\nvar emptyDataset = exports.emptyDataset = function emptyDataset(module, datasetLookup, name, folder) {\n  var dataset = {\n    name: name,\n    input: [],\n    checkpoints: [],\n    output: []\n  };\n  datasetLookup[name] = dataset;\n  folder = folder || unsortedFolder(module);\n  folder.datasets.push(name);\n  return dataset;\n};\n\nvar getDataset = exports.getDataset = function getDataset(module, datasetLookup, name, folder, date) {\n  name = name.toLowerCase();\n  var dataset = datasetLookup[name] || emptyDataset(module, datasetLookup, name, folder);\n  // folder = folder || unsortedFolder(module)\n  if (date) {\n    dataset.date = dataset.date && !isNaN(dataset.date) ? Math.max(+new Date(date), dataset.date) : +new Date(date);\n  }\n  return dataset;\n};\n\nvar load = exports.load = function load(module) {\n  console.log(module);\n  return Promise.all([_actions2.default.folder.index({ module: module, limit: 0 }), _actions2.default.file.index({ module: module, limit: 0 }), _actions2.default.task.index({ module: module })]).then(function (res) {\n    var _res = _slicedToArray(res, 3),\n        folders = _res[0],\n        files = _res[1],\n        tasks = _res[2];\n\n    var datasetLookup = {};\n    var folderLookup = {};\n    var fileLookup = {};\n\n    var resultsFolder = void 0;\n\n    // take all of the folders and put them in a lookup\n    folderLookup = folders.reduce(function (folderLookup, folder) {\n      folderLookup[folder.id] = {\n        id: folder.id,\n        name: folder.name,\n        folder: folder,\n        files: [],\n        datasets: []\n      };\n      if (folder.name === 'results') {\n        resultsFolder = folder;\n      }\n      return folderLookup;\n    }, {\n      unsorted: unsortedFolder(module, true)\n    });\n\n    if (!resultsFolder) {\n      console.log('creating results folder...');\n      _actions2.default.folder.create({\n        module: module,\n        name: 'results',\n        activity: 'results'\n      }).then(function (folder) {\n        console.log('created folder', folder);\n        folderLookup.results = folder;\n      });\n    } else {\n      console.log('got results folder', resultsFolder);\n    }\n\n    // prepare the files by splitting into two groups\n    var generatedFiles = files.filter(function (file) {\n      return file.generated;\n    });\n    var ungeneratedFiles = files.filter(function (file) {\n      return !file.generated;\n    });\n\n    // build the initial dataset lookup table using the ungenerated files\n    ungeneratedFiles.reduce(function (datasetLookup, file) {\n      fileLookup[file.id] = file;\n      if (!file.name) {\n        if (file.opt && file.opt.media && file.opt.media.token) {\n          file.name = file.opt.media.token;\n        } else {\n          file.name = file.url.replace(/^https?:\\/\\/(www.)?/, '').replace(/[^a-zA-Z0-9_]/g, '_').replace(/_+/g, '_') || 'unknown_' + Math.floor(1000 * Math.random());\n        }\n      }\n      var name = (file.name || 'unsorted').split('.')[0];\n      var folder = folderLookup[file.folder_id] || unsortedFolder(module);\n      var dataset = getDataset(module, datasetLookup, file.dataset || name, folder, file.date || file.created_at);\n      if (file.url.match(file.name)) file.persisted = true;\n      dataset.input.push(file.id);\n      folder.files.push(file.id);\n      return datasetLookup;\n    }, datasetLookup);\n\n    // go over the generated files and add addl datasets (if the files were deleted)\n    generatedFiles.map(function (file) {\n      fileLookup[file.id] = file;\n      var pair = file.name.split('.')[0].split('-');\n      var folder = folderLookup[file.folder_id] || unsortedFolder(module);\n      var dataset = getDataset(module, datasetLookup, file.dataset || pair[0], folder, file.date || file.created_at);\n      dataset.output.push(file.id);\n      folder.files.push(file.id);\n      file.epoch = file.epoch || pair[1];\n    });\n\n    return {\n      folderLookup: folderLookup,\n      fileLookup: fileLookup,\n      datasetLookup: datasetLookup,\n      folders: folders,\n      files: files,\n      unsortedFolder: folderLookup.unsorted,\n      resultsFolder: resultsFolder\n    };\n  }).catch(function (e) {\n    console.error(e);\n  });\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _dataset = require('./dataset.actions');\n\nvar datasetActions = _interopRequireWildcard(_dataset);\n\nvar _loading = require('../common/loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nvar _textInput = require('../common/textInput.component');\n\nvar _textInput2 = _interopRequireDefault(_textInput);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction NewDatasetForm(props) {\n  var loading = props.loading,\n      status = props.status,\n      error = props.error,\n      history = props.history,\n      actions = props.actions,\n      module = props.module;\n\n  if (loading) return (0, _preact.h)(_loading2.default, null);\n  console.log(props);\n  return (0, _preact.h)(\n    'div',\n    { className: 'opaque' },\n    (0, _preact.h)(\n      'div',\n      { className: 'heading' },\n      (0, _preact.h)(\n        'h2',\n        null,\n        'Create a new ',\n        module.displayName,\n        ' project'\n      )\n    ),\n    (0, _preact.h)(\n      'div',\n      { className: 'params' },\n      (0, _preact.h)(_textInput2.default, {\n        autofocus: true,\n        title: 'Name your project',\n        onSave: function onSave(name) {\n          actions.createFolder(module, name).then(function (folder) {\n            window.location.href = '/' + module.name + '/datasets/' + folder.id + '/';\n          });\n        }\n      })\n    )\n  );\n}\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {};\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(datasetActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(NewDatasetForm);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/*\n  Note:\n  This is a sub-reducer intended to process the folder-file API output from the DB.\n  Please run this from inside your module reducers :) \n*/\n\nvar datasetInitialState = function datasetInitialState() {\n  return {\n    loading: true,\n    progress: null,\n    error: null,\n    data: null,\n    folder_id: 0\n  };\n};\n\nvar datasetReducer = function datasetReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : datasetInitialState();\n  var action = arguments[1];\n\n  switch (action.type) {\n    case _types2.default.app.load_progress:\n      return _extends({}, state, {\n        progress: action.progress\n      });\n\n    case _types2.default.dataset.load:\n      return _extends({}, state, {\n        loading: false,\n        data: action.data\n      });\n\n    case _types2.default.dataset.set_folder:\n      return _extends({}, state, {\n        folder_id: action.data.folder_id\n      });\n\n    case _types2.default.folder.create:\n      return _extends({}, state, {\n        loading: false,\n        data: {\n          folders: state.data.folders.concat([action.data.id]),\n          folderLookup: _extends({}, state.data.folderLookup, _defineProperty({}, action.data.id, action.data))\n        }\n      });\n      return state;\n\n    case _types2.default.file.create:\n      return handleFileCreate(state, action);\n\n    case _types2.default.file.update:\n      return handleFileUpdate(state, action);\n\n    case _types2.default.file.destroy:\n      return handleFileDestroy(state, action);\n\n    case _types2.default.dataset.list_epochs:\n      return _extends({}, state, {\n        data: _extends({}, state.data, {\n          epochs: action.data.epochs\n        })\n      });\n\n    default:\n      return state;\n  }\n};\n\nfunction handleFileCreate(state, action) {\n  console.log(action.data);\n  if (!state.data || !state.data.datasetLookup) return state;\n  var dataset = void 0,\n      old_dataset = void 0,\n      folder = void 0,\n      old_folder = void 0;\n  var dataset_name = void 0;\n  if (action.data.dataset) {\n    dataset_name = action.data.dataset;\n  } else if (action.data.name) {\n    dataset_name = action.data.name.split('.')[0];\n  } else if (action.data.url) {\n    dataset_name = action.data.url;\n  } else {\n    dataset_name = null;\n  }\n  if (dataset_name in state.data.datasetLookup) {\n    old_dataset = state.data.datasetLookup[dataset_name];\n    dataset = _extends({}, old_dataset, {\n      input: action.data.generated ? old_dataset.input : [action.data.id].concat(old_dataset.input),\n      output: !action.data.generated ? old_dataset.output : [action.data.id].concat(old_dataset.output)\n    });\n  } else {\n    console.log(action.data.created_at, action.data.date);\n    dataset = {\n      name: dataset_name,\n      date: action.data.created_at || action.data.date,\n      input: action.data.generated ? [] : [action.data.id],\n      checkpoints: [],\n      output: !action.data.generated ? [] : [action.data.id]\n    };\n  }\n  old_folder = state.data.folderLookup[action.data.folder_id];\n  folder = _extends({}, old_folder, {\n    datasets: old_folder.datasets.concat([dataset_name]),\n    files: old_folder.files.concat([action.data.id])\n  });\n  return _extends({}, state, {\n    loading: false,\n    data: _extends({}, state.data, {\n      files: state.data.files.concat([action.data.id]),\n      folderLookup: _extends({}, state.data.folderLookup, _defineProperty({}, action.data.folder_id, folder)),\n      fileLookup: _extends({}, state.data.fileLookup, _defineProperty({}, action.data.id, action.data)),\n      datasetLookup: _extends({}, state.data.datasetLookup, _defineProperty({}, dataset_name, dataset))\n    })\n  });\n}\n\nfunction handleFileUpdate(state, action) {\n  var _extends6;\n\n  var old_dataset = void 0;\n  var new_dataset = state.data.datasetLookup[action.data.dataset];\n  var old_file = state.data.fileLookup[action.data.id];\n  var new_dataset_update = void 0;\n  if (old_file && action.data.dataset !== old_file.dataset) {\n    if (state.data.datasetLookup[old_file.dataset]) {\n      old_dataset = state.data.datasetLookup[old_file.dataset];\n      old_dataset_update = _extends({}, old_dataset, {\n        input: old_dataset.input.filter(function (id) {\n          return id !== action.data.id;\n        }),\n        output: old_dataset.output.filter(function (id) {\n          return id !== action.data.id;\n        })\n      });\n    }\n    new_dataset_update = _extends({}, new_dataset, {\n      input: action.data.generated ? [] : [action.data.id],\n      output: !action.data.generated ? [] : [action.data.id]\n    });\n  }\n  console.log('old_dataset', old_dataset_update.name);\n  console.log('new_dataset', new_dataset_update.name);\n  return _extends({}, state, {\n    loading: false,\n    data: _extends({}, state.data, {\n      datasetLookup: old_dataset ? _extends({}, state.data.datasetLookup, (_extends6 = {}, _defineProperty(_extends6, old_dataset.name, old_dataset_update), _defineProperty(_extends6, new_dataset.name, new_dataset_update), _extends6)) : new_dataset_update ? _extends({}, state.data.datasetLookup, _defineProperty({}, new_dataset.name, new_dataset_update)) : state.data.datasetLookup,\n      fileLookup: _extends({}, state.data.fileLookup, _defineProperty({}, action.data.id, action.data))\n    })\n  });\n  return state;\n}\n\nfunction handleFileDestroy(state, action) {\n  if (!state.data) return state;\n  // delete the key from fileLookup\n  var fileLookup = _extends({}, state.data.fileLookup);\n  var datasetLookup = _extends({}, state.data.datasetLookup);\n  var folderLookup = _extends({}, state.data.folderLookup);\n  var old_file = fileLookup[action.data.id];\n  if (!old_file) return state;\n  var old_dataset = state.data.datasetLookup[old_file.dataset];\n  var dataset = void 0;\n  if (old_dataset) {\n    dataset = _extends({}, old_dataset, {\n      input: old_dataset.input.filter(function (id) {\n        return id !== old_file.id;\n      }),\n      output: old_dataset.output.filter(function (id) {\n        return id !== old_file.id;\n      })\n    });\n    if (!dataset.input.length && !dataset.checkpoints.length && !dataset.output.length) {\n      delete datasetLookup[old_file.dataset];\n      var old_folder = folderLookup[old_file.folder_id];\n      folderLookup[old_file.folder_id] = _extends({}, old_folder, {\n        datasets: old_folder.datasets.filter(function (name) {\n          return name !== old_file.dataset;\n        })\n      });\n    } else {\n      console.log('dataset just needs sweeping');\n      datasetLookup[old_file.dataset] = dataset;\n    }\n  }\n  delete fileLookup[old_file.id];\n\n  return _extends({}, state, {\n    loading: false,\n    data: _extends({}, state.data, {\n      folderLookup: folderLookup,\n      fileLookup: fileLookup,\n      datasetLookup: datasetLookup\n    })\n  });\n}\n\nexports.default = datasetReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar uploadInitialState = {\n  loading: false,\n  error: null,\n  status: ''\n};\n\nvar uploadReducer = function uploadReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : uploadInitialState;\n  var action = arguments[1];\n\n  switch (action.type) {\n    case _types2.default.folder.upload_loading:\n      return {\n        error: null,\n        loading: true,\n        status: 'Loading...'\n      };\n    case _types2.default.folder.upload_error:\n      return {\n        error: null,\n        loading: false,\n        status: 'Error uploading :('\n      };\n    case _types2.default.folder.upload_progress:\n      return {\n        error: null,\n        loading: true,\n        status: 'Upload progress ' + action.percent + '%'\n      };\n    case _types2.default.folder.upload_waiting:\n      return {\n        error: null,\n        loading: true,\n        status: 'Waiting for server to finish processing...'\n      };\n    case _types2.default.folder.upload_complete:\n      return {\n        error: null,\n        loading: false,\n        status: 'Upload complete'\n      };\n    case _types2.default.file.create_loading:\n      return {\n        error: null,\n        loading: true,\n        status: 'Creating file...'\n      };\n    default:\n      return state;\n  }\n};\n\nexports.default = uploadReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _loading = require('../common/loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction UploadStatus(props) {\n  return (0, _preact.h)(\n    'div',\n    { className: 'status' },\n    props.status\n  );\n}\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return state.upload;\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {};\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(UploadStatus);","'use strict';\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _store = require('./store');\n\nvar _socket = require('./socket');\n\nvar socket = _interopRequireWildcard(_socket);\n\nvar _util = require('./util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _auth = require('./auth');\n\nvar _auth2 = _interopRequireDefault(_auth);\n\nvar _common = require('./common');\n\nvar _system = require('./system/system.component');\n\nvar _system2 = _interopRequireDefault(_system);\n\nvar _dashboard = require('./dashboard/dashboard.component');\n\nvar _dashboard2 = _interopRequireDefault(_dashboard);\n\nvar _browser = require('./browser/browser.component');\n\nvar _browser2 = _interopRequireDefault(_browser);\n\nvar _modules = require('./modules');\n\nvar _modules2 = _interopRequireDefault(_modules);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nvar module_list = Object.keys(_modules2.default).map(function (name) {\n  var module = _modules2.default[name];\n  return (0, _preact.h)(_reactRouterDom.Route, { path: '/' + module.name, component: module.router });\n});\n\nvar ModuleRouter = function ModuleRouter() {\n  return (0, _preact.h)(_reactRouterDom.Switch, null);\n};\n\nvar app = (0, _preact.h)(\n  _reactRedux.Provider,\n  { store: _store.store },\n  (0, _preact.h)(\n    _auth2.default.Gate,\n    null,\n    (0, _preact.h)(\n      _reactRouterDom.BrowserRouter,\n      null,\n      (0, _preact.h)(\n        'div',\n        { className: 'everybody' },\n        (0, _preact.h)(_reactRouterDom.Route, { path: '/', children: function children(props) {\n            return (0, _preact.h)(\n              'div',\n              null,\n              console.log(props.location.pathname)\n            );\n          } }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/system', component: _system2.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/dashboard', component: _dashboard2.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/browse', component: _browser2.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/logout', component: _auth2.default.Logout }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/login', component: function component() {\n            (0, _preact.h)(_reactRouterDom.Redirect, { to: '/' });\n          } }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/signup', component: function component() {\n            (0, _preact.h)(_reactRouterDom.Redirect, { to: '/' });\n          } }),\n        module_list,\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/', component: _dashboard2.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { path: '/', component: _common.Header })\n      )\n    ),\n    (0, _preact.h)(_common.AudioPlayer, null)\n  )\n);\n\n(0, _preact.render)(app, document.getElementById('container'));","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.play = exports.pause = exports.seek = exports.load_epoch = exports.load_sequence = exports.list_sequences = exports.list_epochs = exports.list_checkpoints = exports.set_fullscreen = exports.set_param = exports.get_params = undefined;\n\nvar _socket = require('../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _player = require('./player');\n\nvar player = _interopRequireWildcard(_player);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar get_params = exports.get_params = function get_params() {\n  _socket2.default.live.get_params();\n  return { type: _types2.default.player.get_params };\n};\n\nvar set_param = exports.set_param = function set_param(key, value) {\n  console.log('set param', key, value);\n  _socket2.default.live.set_param(key, value);\n  return { type: _types2.default.player.set_param, key: key, value: value };\n};\n\nvar set_fullscreen = exports.set_fullscreen = function set_fullscreen(value) {\n  return { type: _types2.default.player.set_fullscreen, value: value };\n};\n\nvar list_checkpoints = exports.list_checkpoints = function list_checkpoints(module) {\n  _socket2.default.live.list_checkpoints(module);\n  return { type: _types2.default.player.loading_checkpoints };\n};\n\nvar list_epochs = exports.list_epochs = function list_epochs(module, checkpoint) {\n  _socket2.default.live.list_epochs(module, checkpoint);\n  return { type: _types2.default.player.loading_epochs };\n};\n\nvar list_sequences = exports.list_sequences = function list_sequences(module) {\n  _socket2.default.live.list_sequences(module);\n  return { type: _types2.default.player.loading_sequences };\n};\n\nvar load_sequence = exports.load_sequence = function load_sequence(sequence_name) {\n  _socket2.default.live.load_sequence(sequence_name);\n  return { type: _types2.default.player.loading_sequence, sequence_name: sequence_name };\n};\n\nvar load_epoch = exports.load_epoch = function load_epoch(checkpoint_name, epoch) {\n  _socket2.default.live.load_epoch(checkpoint_name, epoch);\n  return { type: _types2.default.player.loading_checkpoint, checkpoint_name: checkpoint_name, epoch: epoch };\n};\n\nvar seek = exports.seek = function seek(frame) {\n  _socket2.default.live.seek(frame);\n  return { type: _types2.default.player.seeking };\n};\n\nvar pause = exports.pause = function pause(frame) {\n  _socket2.default.live.pause(pause);\n  player.toggleFPS(false);\n  return { type: _types2.default.player.pausing };\n};\n\nvar play = exports.play = function play(frame) {\n  _socket2.default.live.play();\n  player.toggleFPS(true);\n  return { type: _types2.default.player.playing };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _moment = require('moment/min/moment.min');\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nvar _fileSaver = require('file-saver');\n\nvar _fileSaver2 = _interopRequireDefault(_fileSaver);\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar liveInitialState = {\n  loading: false,\n  error: null,\n  opt: {\n    hue: 0, saturation: 0, luminosity: 0,\n    sequence_playing: true, sequence_step: 1,\n    recurse_roll: 0, rotate: 0, scale: 0, process_frac: 0.5,\n    view_mode: 'b'\n  },\n  all_checkpoints: [],\n  checkpoints: [],\n  epochs: ['latest'],\n  sequences: [],\n  fps: 0,\n  playing: false,\n  last_message: '',\n  fullscreen: false,\n  frame: { i: 0, sequence_i: 0, sequence_len: '1' }\n};\n\nvar liveReducer = function liveReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : liveInitialState;\n  var action = arguments[1];\n\n  var results = void 0;\n  switch (action.type) {\n    case _types2.default.socket.load_params:\n      if (!action.opt || !Object.keys(action.opt).length) {\n        return state;\n      }\n      return _extends({}, state, {\n        loading: false,\n        error: null,\n        opt: action.opt\n      });\n\n    case _types2.default.player.set_param:\n      return _extends({}, state, {\n        opt: _extends({}, state.opt, _defineProperty({}, action.key, action.value))\n      });\n\n    case _types2.default.player.set_fullscreen:\n      return _extends({}, state, {\n        fullscreen: action.value\n      });\n\n    case _types2.default.socket.list_checkpoints:\n      return _extends({}, state, {\n        checkpoints: action.checkpoints,\n        epochs: []\n      });\n\n    case _types2.default.socket.list_all_checkpoints:\n      return _extends({}, state, {\n        all_checkpoints: action.all_checkpoints,\n        epochs: []\n      });\n\n    case _types2.default.socket.list_epochs:\n      console.log(action);\n      if (action.epochs === \"not found\") return _extends({}, state, { epochs: [] });\n      return _extends({}, state, {\n        epochs: (action.epochs || []).map(function (a) {\n          return [a == 'latest' ? Infinity : a, a];\n        }).sort(function (a, b) {\n          return a[0] - b[0];\n        }).map(function (a) {\n          return a[1];\n        })\n      });\n\n    case _types2.default.socket.list_sequences:\n      return _extends({}, state, {\n        sequences: action.sequences\n      });\n\n    case _types2.default.player.loading_sequence:\n      return _extends({}, state, {\n        opt: _extends({}, state.opt, {\n          sequence_name: action.sequence_name\n        })\n      });\n\n    case _types2.default.player.loading_checkpoint:\n      return _extends({}, state, {\n        opt: _extends({}, state.opt, {\n          checkpoint_name: action.checkpoint_name,\n          epoch: action.epoch\n        })\n      });\n\n    case _types2.default.player.set_fps:\n      return _extends({}, state, {\n        fps: action.fps\n      });\n\n    case _types2.default.system.stdout:\n      if (action.data.processor === 'gpu') {\n        return _extends({}, state, {\n          last_message: action.data.data\n        });\n      }\n      return state;\n\n    case _types2.default.player.current_frame:\n      return action.meta ? _extends({}, state, {\n        frame: action.meta\n      }) : state;\n\n    case _types2.default.player.pausing:\n      return _extends({}, state, {\n        playing: false\n      });\n\n    case _types2.default.player.playing:\n      return _extends({}, state, {\n        playing: true\n      });\n\n    case _types2.default.player.start_recording:\n      return _extends({}, state, {\n        opt: _extends({}, state.opt, {\n          recording: true\n        })\n      });\n    case _types2.default.player.add_record_frame:\n      return _extends({}, state, {\n        opt: _extends({}, state.opt, {\n          recordFrames: (state.opt.recordFrames || 0) + 1\n        })\n      });\n    case _types2.default.player.save_frame:\n      _fileSaver2.default.saveAs(action.blob, state.opt.checkpoint_name + \"_\" + state.opt.sequence + \"_\" + (0, _moment2.default)().format(\"YYYYMMDD_HHmm\") + \".png\");\n      return state;\n\n    case _types2.default.player.saving_video:\n      return _extends({}, state, {\n        opt: _extends({}, state.opt, {\n          savingVideo: true\n        })\n      });\n    case _types2.default.player.save_video:\n      _fileSaver2.default.saveAs(action.blob, state.opt.checkpoint_name + \"_\" + state.opt.sequence + \"_\" + (0, _moment2.default)().format(\"YYYYMMDD_HHmm\") + \".webm\");\n      return _extends({}, state, {\n        opt: _extends({}, state.opt, {\n          recording: false,\n          savingVideo: false,\n          recordFrames: 0\n        })\n      });\n\n    default:\n      return state;\n  }\n};\n\nexports.default = liveReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.startSynthesizing = startSynthesizing;\nexports.stopSynthesizing = stopSynthesizing;\nexports.startRecording = startRecording;\nexports.stopRecording = stopRecording;\nexports.saveFrame = saveFrame;\nexports.onFrame = onFrame;\nexports.toggleFPS = toggleFPS;\nexports.startWatchingFPS = startWatchingFPS;\nexports.stopWatchingFPS = stopWatchingFPS;\n\nvar _store = require('../store');\n\nvar _whammy = require('./whammy');\n\nvar _whammy2 = _interopRequireDefault(_whammy);\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _pix2wav = require('../audio/pix2wav');\n\nvar pix2wav = _interopRequireWildcard(_pix2wav);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar fps = 0,\n    last_frame = void 0;\nvar recording = false,\n    saving = false,\n    synthesizing = false;\nvar videoWriter = void 0;\n\nfunction startSynthesizing() {\n  synthesizing = true;\n}\nfunction stopSynthesizing() {\n  synthesizing = false;\n}\n\nfunction startRecording() {\n  videoWriter = new _whammy2.default.Video(25, 0.95);\n  recording = true;\n  _store.store.dispatch({\n    type: _types2.default.player.start_recording\n  });\n}\n\nfunction stopRecording() {\n  if (!recording) return;\n  recording = false;\n  _store.store.dispatch({\n    type: _types2.default.player.saving_video\n  });\n  videoWriter.compile(false, function (blob) {\n    // console.log(blob)\n    _store.store.dispatch({\n      type: _types2.default.player.save_video,\n      blob: blob\n    });\n  });\n}\n\nfunction saveFrame() {\n  saving = true;\n}\n\nfunction onFrame(data) {\n  var blob = new Blob([data.frame], { type: 'image/jpg' });\n  var url = URL.createObjectURL(blob);\n  var img = new Image();\n  var canvas = document.querySelector('.player canvas');\n  if (!canvas) return console.error('no canvas for frame');\n  img.onload = function () {\n    img.onload = null;\n    last_frame = data.meta;\n    URL.revokeObjectURL(url);\n    var ctx = canvas.getContext('2d-lodpi');\n    ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n    if (synthesizing) {\n      var imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);\n      pix2wav.play({ imageData: imageData });\n    }\n    if (recording) {\n      console.log('record frame');\n      videoWriter.add(canvas);\n      _store.store.dispatch({\n        type: _types2.default.player.add_record_frame\n      });\n    }\n    if (saving) {\n      saving = false;\n      canvas.toBlob(function (blob) {\n        _store.store.dispatch({\n          type: _types2.default.player.save_frame,\n          blob: blob\n        });\n      });\n    }\n    fps += 1;\n  };\n  img.src = url;\n}\n\nvar previousValue = void 0,\n    currentValue = void 0;\nfunction toggleFPS(state) {\n  currentValue = typeof state !== 'undefined' ? state : _store.store.getState().live.playing;\n  if (previousValue !== currentValue) {\n    if (currentValue) {\n      startWatchingFPS();\n    } else {\n      stopWatchingFPS();\n    }\n  }\n  previousValue = currentValue;\n}\n\nvar fpsInterval = void 0;\n\nfunction startWatchingFPS() {\n  clearInterval(fpsInterval);\n  fpsInterval = setInterval(function () {\n    _store.store.dispatch({\n      type: _types2.default.player.set_fps,\n      fps: fps\n    });\n    _store.store.dispatch({\n      type: _types2.default.player.current_frame,\n      meta: last_frame\n    });\n    fps = 0;\n  }, 1000);\n}\nfunction stopWatchingFPS() {\n  clearInterval(fpsInterval);\n}","\"use strict\";\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nmodule.exports = function () {\n  // in this case, frames has a very specific meaning, which will be\n  // detailed once i finish writing the code\n\n  function toWebM(frames, outputAsArray) {\n    var info = checkFrames(frames);\n\n    //max duration by cluster in milliseconds\n    var CLUSTER_MAX_DURATION = 30000;\n\n    var EBML = [{\n      \"id\": 0x1a45dfa3, // EBML\n      \"data\": [{\n        \"data\": 1,\n        \"id\": 0x4286 // EBMLVersion\n      }, {\n        \"data\": 1,\n        \"id\": 0x42f7 // EBMLReadVersion\n      }, {\n        \"data\": 4,\n        \"id\": 0x42f2 // EBMLMaxIDLength\n      }, {\n        \"data\": 8,\n        \"id\": 0x42f3 // EBMLMaxSizeLength\n      }, {\n        \"data\": \"webm\",\n        \"id\": 0x4282 // DocType\n      }, {\n        \"data\": 2,\n        \"id\": 0x4287 // DocTypeVersion\n      }, {\n        \"data\": 2,\n        \"id\": 0x4285 // DocTypeReadVersion\n      }]\n    }, {\n      \"id\": 0x18538067, // Segment\n      \"data\": [{\n        \"id\": 0x1549a966, // Info\n        \"data\": [{\n          \"data\": 1e6, //do things in millisecs (num of nanosecs for duration scale)\n          \"id\": 0x2ad7b1 // TimecodeScale\n        }, {\n          \"data\": \"whammy\",\n          \"id\": 0x4d80 // MuxingApp\n        }, {\n          \"data\": \"whammy\",\n          \"id\": 0x5741 // WritingApp\n        }, {\n          \"data\": doubleToString(info.duration),\n          \"id\": 0x4489 // Duration\n        }]\n      }, {\n        \"id\": 0x1654ae6b, // Tracks\n        \"data\": [{\n          \"id\": 0xae, // TrackEntry\n          \"data\": [{\n            \"data\": 1,\n            \"id\": 0xd7 // TrackNumber\n          }, {\n            \"data\": 1,\n            \"id\": 0x73c5 // TrackUID\n          }, {\n            \"data\": 0,\n            \"id\": 0x9c // FlagLacing\n          }, {\n            \"data\": \"und\",\n            \"id\": 0x22b59c // Language\n          }, {\n            \"data\": \"V_VP8\",\n            \"id\": 0x86 // CodecID\n          }, {\n            \"data\": \"VP8\",\n            \"id\": 0x258688 // CodecName\n          }, {\n            \"data\": 1,\n            \"id\": 0x83 // TrackType\n          }, {\n            \"id\": 0xe0, // Video\n            \"data\": [{\n              \"data\": info.width,\n              \"id\": 0xb0 // PixelWidth\n            }, {\n              \"data\": info.height,\n              \"id\": 0xba // PixelHeight\n            }]\n          }]\n        }]\n      }, {\n        \"id\": 0x1c53bb6b, // Cues\n        \"data\": [\n          //cue insertion point\n        ]\n\n        //cluster insertion point\n      }]\n    }];\n\n    var segment = EBML[1];\n    var cues = segment.data[2];\n\n    //Generate clusters (max duration)\n    var frameNumber = 0;\n    var clusterTimecode = 0;\n    while (frameNumber < frames.length) {\n\n      var cuePoint = {\n        \"id\": 0xbb, // CuePoint\n        \"data\": [{\n          \"data\": Math.round(clusterTimecode),\n          \"id\": 0xb3 // CueTime\n        }, {\n          \"id\": 0xb7, // CueTrackPositions\n          \"data\": [{\n            \"data\": 1,\n            \"id\": 0xf7 // CueTrack\n          }, {\n            \"data\": 0, // to be filled in when we know it\n            \"size\": 8,\n            \"id\": 0xf1 // CueClusterPosition\n          }]\n        }]\n      };\n\n      cues.data.push(cuePoint);\n\n      var clusterFrames = [];\n      var clusterDuration = 0;\n      do {\n        clusterFrames.push(frames[frameNumber]);\n        clusterDuration += frames[frameNumber].duration;\n        frameNumber++;\n      } while (frameNumber < frames.length && clusterDuration < CLUSTER_MAX_DURATION);\n\n      var clusterCounter = 0;\n      var cluster = {\n        \"id\": 0x1f43b675, // Cluster\n        \"data\": [{\n          \"data\": Math.round(clusterTimecode),\n          \"id\": 0xe7 // Timecode\n        }].concat(clusterFrames.map(function (webp) {\n          var block = makeSimpleBlock({\n            discardable: 0,\n            frame: webp.data.slice(4),\n            invisible: 0,\n            keyframe: 1,\n            lacing: 0,\n            trackNum: 1,\n            timecode: Math.round(clusterCounter)\n          });\n          clusterCounter += webp.duration;\n          return {\n            data: block,\n            id: 0xa3\n          };\n        }))\n\n        //Add cluster to segment\n      };segment.data.push(cluster);\n      clusterTimecode += clusterDuration;\n    }\n\n    //First pass to compute cluster positions\n    var position = 0;\n    for (var i = 0; i < segment.data.length; i++) {\n      if (i >= 3) {\n        cues.data[i - 3].data[1].data[1].data = position;\n      }\n      var data = generateEBML([segment.data[i]], outputAsArray);\n      position += data.size || data.byteLength || data.length;\n      if (i != 2) {\n        // not cues\n        //Save results to avoid having to encode everything twice\n        segment.data[i] = data;\n      }\n    }\n\n    return generateEBML(EBML, outputAsArray);\n  }\n\n  // sums the lengths of all the frames and gets the duration, woo\n\n  function checkFrames(frames) {\n    var width = frames[0].width,\n        height = frames[0].height,\n        duration = frames[0].duration;\n    for (var i = 1; i < frames.length; i++) {\n      if (frames[i].width != width) throw \"Frame \" + (i + 1) + \" has a different width\";\n      if (frames[i].height != height) throw \"Frame \" + (i + 1) + \" has a different height\";\n      if (frames[i].duration < 0 || frames[i].duration > 0x7fff) throw \"Frame \" + (i + 1) + \" has a weird duration (must be between 0 and 32767)\";\n      duration += frames[i].duration;\n    }\n    return {\n      duration: duration,\n      width: width,\n      height: height\n    };\n  }\n\n  function numToBuffer(num) {\n    var parts = [];\n    while (num > 0) {\n      parts.push(num & 0xff);\n      num = num >> 8;\n    }\n    return new Uint8Array(parts.reverse());\n  }\n\n  function numToFixedBuffer(num, size) {\n    var parts = new Uint8Array(size);\n    for (var i = size - 1; i >= 0; i--) {\n      parts[i] = num & 0xff;\n      num = num >> 8;\n    }\n    return parts;\n  }\n\n  function strToBuffer(str) {\n    // return new Blob([str]);\n\n    var arr = new Uint8Array(str.length);\n    for (var i = 0; i < str.length; i++) {\n      arr[i] = str.charCodeAt(i);\n    }\n    return arr;\n    // this is slower\n    // return new Uint8Array(str.split('').map(function(e){\n    //  return e.charCodeAt(0)\n    // }))\n  }\n\n  //sorry this is ugly, and sort of hard to understand exactly why this was done\n  // at all really, but the reason is that there's some code below that i dont really\n  // feel like understanding, and this is easier than using my brain.\n\n  function bitsToBuffer(bits) {\n    var data = [];\n    var pad = bits.length % 8 ? new Array(1 + 8 - bits.length % 8).join('0') : '';\n    bits = pad + bits;\n    for (var i = 0; i < bits.length; i += 8) {\n      data.push(parseInt(bits.substr(i, 8), 2));\n    }\n    return new Uint8Array(data);\n  }\n\n  function generateEBML(json, outputAsArray) {\n    var ebml = [];\n    for (var i = 0; i < json.length; i++) {\n      if (!('id' in json[i])) {\n        //already encoded blob or byteArray\n        ebml.push(json[i]);\n        continue;\n      }\n\n      var data = json[i].data;\n      if ((typeof data === \"undefined\" ? \"undefined\" : _typeof(data)) == 'object') data = generateEBML(data, outputAsArray);\n      if (typeof data == 'number') data = 'size' in json[i] ? numToFixedBuffer(data, json[i].size) : bitsToBuffer(data.toString(2));\n      if (typeof data == 'string') data = strToBuffer(data);\n\n      if (data.length) {\n        var z = z;\n      }\n\n      var len = data.size || data.byteLength || data.length;\n      var zeroes = Math.ceil(Math.ceil(Math.log(len) / Math.log(2)) / 8);\n      var size_str = len.toString(2);\n      var padded = new Array(zeroes * 7 + 7 + 1 - size_str.length).join('0') + size_str;\n      var size = new Array(zeroes).join('0') + '1' + padded;\n\n      //i actually dont quite understand what went on up there, so I'm not really\n      //going to fix this, i'm probably just going to write some hacky thing which\n      //converts that string into a buffer-esque thing\n\n      ebml.push(numToBuffer(json[i].id));\n      ebml.push(bitsToBuffer(size));\n      ebml.push(data);\n    }\n\n    //output as blob or byteArray\n    if (outputAsArray) {\n      //convert ebml to an array\n      var buffer = toFlatArray(ebml);\n      return new Uint8Array(buffer);\n    } else {\n      return new Blob(ebml, { type: \"video/webm\" });\n    }\n  }\n\n  function toFlatArray(arr, outBuffer) {\n    if (outBuffer == null) {\n      outBuffer = [];\n    }\n    for (var i = 0; i < arr.length; i++) {\n      if (_typeof(arr[i]) == 'object') {\n        //an array\n        toFlatArray(arr[i], outBuffer);\n      } else {\n        //a simple element\n        outBuffer.push(arr[i]);\n      }\n    }\n    return outBuffer;\n  }\n\n  //OKAY, so the following two functions are the string-based old stuff, the reason they're\n  //still sort of in here, is that they're actually faster than the new blob stuff because\n  //getAsFile isn't widely implemented, or at least, it doesn't work in chrome, which is the\n  // only browser which supports get as webp\n\n  //Converting between a string of 0010101001's and binary back and forth is probably inefficient\n  //TODO: get rid of this function\n  function toBinStr_old(bits) {\n    var data = '';\n    var pad = bits.length % 8 ? new Array(1 + 8 - bits.length % 8).join('0') : '';\n    bits = pad + bits;\n    for (var i = 0; i < bits.length; i += 8) {\n      data += String.fromCharCode(parseInt(bits.substr(i, 8), 2));\n    }\n    return data;\n  }\n\n  function generateEBML_old(json) {\n    var ebml = '';\n    for (var i = 0; i < json.length; i++) {\n      var data = json[i].data;\n      if ((typeof data === \"undefined\" ? \"undefined\" : _typeof(data)) == 'object') data = generateEBML_old(data);\n      if (typeof data == 'number') data = toBinStr_old(data.toString(2));\n\n      var len = data.length;\n      var zeroes = Math.ceil(Math.ceil(Math.log(len) / Math.log(2)) / 8);\n      var size_str = len.toString(2);\n      var padded = new Array(zeroes * 7 + 7 + 1 - size_str.length).join('0') + size_str;\n      var size = new Array(zeroes).join('0') + '1' + padded;\n\n      ebml += toBinStr_old(json[i].id.toString(2)) + toBinStr_old(size) + data;\n    }\n    return ebml;\n  }\n\n  //woot, a function that's actually written for this project!\n  //this parses some json markup and makes it into that binary magic\n  //which can then get shoved into the matroska comtainer (peaceably)\n\n  function makeSimpleBlock(data) {\n    var flags = 0;\n    if (data.keyframe) flags |= 128;\n    if (data.invisible) flags |= 8;\n    if (data.lacing) flags |= data.lacing << 1;\n    if (data.discardable) flags |= 1;\n    if (data.trackNum > 127) {\n      throw \"TrackNumber > 127 not supported\";\n    }\n    var out = [data.trackNum | 0x80, data.timecode >> 8, data.timecode & 0xff, flags].map(function (e) {\n      return String.fromCharCode(e);\n    }).join('') + data.frame;\n\n    return out;\n  }\n\n  // here's something else taken verbatim from weppy, awesome rite?\n\n  function parseWebP(riff) {\n    var VP8 = riff.RIFF[0].WEBP[0];\n\n    var frame_start = VP8.indexOf('\\x9d\\x01\\x2a'); //A VP8 keyframe starts with the 0x9d012a header\n    for (var i = 0, c = []; i < 4; i++) {\n      c[i] = VP8.charCodeAt(frame_start + 3 + i);\n    }var width, horizontal_scale, height, vertical_scale, tmp;\n\n    //the code below is literally copied verbatim from the bitstream spec\n    tmp = c[1] << 8 | c[0];\n    width = tmp & 0x3FFF;\n    horizontal_scale = tmp >> 14;\n    tmp = c[3] << 8 | c[2];\n    height = tmp & 0x3FFF;\n    vertical_scale = tmp >> 14;\n    return {\n      width: width,\n      height: height,\n      data: VP8,\n      riff: riff\n    };\n  }\n\n  // i think i'm going off on a riff by pretending this is some known\n  // idiom which i'm making a casual and brilliant pun about, but since\n  // i can't find anything on google which conforms to this idiomatic\n  // usage, I'm assuming this is just a consequence of some psychotic\n  // break which makes me make up puns. well, enough riff-raff (aha a\n  // rescue of sorts), this function was ripped wholesale from weppy\n\n  function parseRIFF(string) {\n    var offset = 0;\n    var chunks = {};\n\n    while (offset < string.length) {\n      var id = string.substr(offset, 4);\n      chunks[id] = chunks[id] || [];\n      if (id == 'RIFF' || id == 'LIST') {\n        var len = parseInt(string.substr(offset + 4, 4).split('').map(function (i) {\n          var unpadded = i.charCodeAt(0).toString(2);\n          return new Array(8 - unpadded.length + 1).join('0') + unpadded;\n        }).join(''), 2);\n        var data = string.substr(offset + 4 + 4, len);\n        offset += 4 + 4 + len;\n        chunks[id].push(parseRIFF(data));\n      } else if (id == 'WEBP') {\n        // Use (offset + 8) to skip past \"VP8 \"/\"VP8L\"/\"VP8X\" field after \"WEBP\"\n        chunks[id].push(string.substr(offset + 8));\n        offset = string.length;\n      } else {\n        // Unknown chunk type; push entire payload\n        chunks[id].push(string.substr(offset + 4));\n        offset = string.length;\n      }\n    }\n    return chunks;\n  }\n\n  // here's a little utility function that acts as a utility for other functions\n  // basically, the only purpose is for encoding \"Duration\", which is encoded as\n  // a double (considerably more difficult to encode than an integer)\n  function doubleToString(num) {\n    return [].slice.call(new Uint8Array(new Float64Array([num]) //create a float64 array\n    .buffer) //extract the array buffer\n    , 0) // convert the Uint8Array into a regular array\n    .map(function (e) {\n      //since it's a regular array, we can now use map\n      return String.fromCharCode(e); // encode all the bytes individually\n    }).reverse() //correct the byte endianness (assume it's little endian for now)\n    .join(''); // join the bytes in holy matrimony as a string\n  }\n\n  function WhammyVideo(speed, quality) {\n    // a more abstract-ish API\n    this.frames = [];\n    this.duration = 1000 / speed;\n    this.quality = quality || 0.8;\n  }\n\n  WhammyVideo.prototype.add = function (frame, duration) {\n    if (typeof duration != 'undefined' && this.duration) throw \"you can't pass a duration if the fps is set\";\n    if (typeof duration == 'undefined' && !this.duration) throw \"if you don't have the fps set, you need to have durations here.\";\n    if (frame.canvas) {\n      //CanvasRenderingContext2D\n      frame = frame.canvas;\n    }\n    if (frame.toDataURL) {\n      // frame = frame.toDataURL('image/webp', this.quality);\n      // quickly store image data so we don't block cpu. encode in compile method.\n      frame = frame.getContext('2d-lodpi').getImageData(0, 0, frame.width, frame.height);\n    } else if (typeof frame != \"string\") {\n      throw \"frame must be a a HTMLCanvasElement, a CanvasRenderingContext2D or a DataURI formatted string\";\n    }\n    if (typeof frame === \"string\" && !/^data:image\\/webp;base64,/ig.test(frame)) {\n      throw \"Input must be formatted properly as a base64 encoded DataURI of type image/webp\";\n    }\n    this.frames.push({\n      image: frame,\n      duration: duration || this.duration\n    });\n  };\n\n  // deferred webp encoding. Draws image data to canvas, then encodes as dataUrl\n  WhammyVideo.prototype.encodeFrames = function (callback) {\n\n    if (this.frames[0].image instanceof ImageData) {\n\n      var frames = this.frames;\n      var tmpCanvas = document.createElement('canvas');\n      var tmpContext = tmpCanvas.getContext('2d-lodpi');\n      tmpCanvas.width = this.frames[0].image.width;\n      tmpCanvas.height = this.frames[0].image.height;\n\n      var encodeFrame = function (index) {\n        console.log('encodeFrame', index);\n        var frame = frames[index];\n        tmpContext.putImageData(frame.image, 0, 0);\n        frame.image = tmpCanvas.toDataURL('image/webp', this.quality);\n        if (index < frames.length - 1) {\n          setTimeout(function () {\n            encodeFrame(index + 1);\n          }, 1);\n        } else {\n          callback();\n        }\n      }.bind(this);\n\n      encodeFrame(0);\n    } else {\n      callback();\n    }\n  };\n\n  WhammyVideo.prototype.compile = function (outputAsArray, callback) {\n\n    this.encodeFrames(function () {\n      var width = 0;\n      var height = 0;\n      var webm = new toWebM(this.frames.map(function (frame) {\n        var webp = parseWebP(parseRIFF(atob(frame.image.slice(23))));\n        webp.duration = frame.duration;\n        if (!webp || !webp.width || !webp.height) return null;\n        if (!width) width = webp.width;else if (width !== webp.width) return null;\n        if (!height) height = webp.height;else if (height !== webp.height) return null;\n        return webp;\n      }).filter(function (frame) {\n        return !!frame;\n      }), outputAsArray);\n      callback(webm);\n    }.bind(this));\n  };\n\n  return {\n    Video: WhammyVideo,\n    fromImageArray: function fromImageArray(images, fps, outputAsArray) {\n      return toWebM(images.map(function (image) {\n        var webp = parseWebP(parseRIFF(atob(image.slice(23))));\n        webp.duration = 1000 / fps;\n        return webp;\n      }), outputAsArray);\n    },\n    toWebM: toWebM\n    // expose methods of madness\n  };\n}();","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _morph = require('./morph');\n\nvar _morph2 = _interopRequireDefault(_morph);\n\nvar _pix2pix = require('./pix2pix');\n\nvar _pix2pix2 = _interopRequireDefault(_pix2pix);\n\nvar _pix2pixhd = require('./pix2pixhd');\n\nvar _pix2pixhd2 = _interopRequireDefault(_pix2pixhd);\n\nvar _pix2wav = require('./pix2wav');\n\nvar _pix2wav2 = _interopRequireDefault(_pix2wav);\n\nvar _samplernn = require('./samplernn');\n\nvar _samplernn2 = _interopRequireDefault(_samplernn);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = {\n  morph: _morph2.default, pix2pix: _pix2pix2.default, pix2pixhd: _pix2pixhd2.default, pix2wav: _pix2wav2.default, samplernn: _samplernn2.default\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.moduleReducer = undefined;\n\nvar _redux = require('redux');\n\nvar _morph = require('./morph/morph.reducer');\n\nvar _morph2 = _interopRequireDefault(_morph);\n\nvar _pix2pix = require('./pix2pix/pix2pix.reducer');\n\nvar _pix2pix2 = _interopRequireDefault(_pix2pix);\n\nvar _pix2pixhd = require('./pix2pixhd/pix2pixhd.reducer');\n\nvar _pix2pixhd2 = _interopRequireDefault(_pix2pixhd);\n\nvar _pix2wav = require('./pix2wav/pix2wav.reducer');\n\nvar _pix2wav2 = _interopRequireDefault(_pix2wav);\n\nvar _samplernn = require('./samplernn/samplernn.reducer');\n\nvar _samplernn2 = _interopRequireDefault(_samplernn);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar moduleReducer = exports.moduleReducer = (0, _redux.combineReducers)({\n  morph: _morph2.default,\n  pix2pix: _pix2pix2.default,\n  pix2pixhd: _pix2pixhd2.default,\n  pix2wav: _pix2wav2.default,\n  samplernn: _samplernn2.default\n});","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _morph = require('./views/morph.app');\n\nvar _morph2 = _interopRequireDefault(_morph);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar router = function () {\n  function router() {\n    _classCallCheck(this, router);\n  }\n\n  _createClass(router, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      _actions2.default.system.changeTool('morph');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #def, #dfe)';\n    }\n  }, {\n    key: 'componentWillReceiveProps',\n    value: function componentWillReceiveProps() {\n      _actions2.default.system.changeTool('morph');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #def, #dfe)';\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'section',\n        null,\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/morph/app/', component: _morph2.default })\n      );\n    }\n  }]);\n\n  return router;\n}();\n\nfunction links() {\n  return [{ url: '/morph/app/', name: 'morph' }];\n}\n\nexports.default = {\n  name: 'morph',\n  router: router, links: links\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.load_data = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.loader');\n\nvar datasetLoader = _interopRequireWildcard(_dataset);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _morph = require('./morph.module');\n\nvar _morph2 = _interopRequireDefault(_morph);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar load_data = exports.load_data = function load_data(id) {\n  return function (dispatch) {\n    var module = _morph2.default.name;\n    _util2.default.allProgress([datasetLoader.load(module), _actions2.default.socket.list_sequences({ module: 'pix2pixhd', dir: 'sequences' }), _actions2.default.socket.list_directory({ module: module, dir: 'renders' })], function (percent, i, n) {\n      console.log('morph load progress', i, n);\n      dispatch({\n        type: _types2.default.app.load_progress,\n        progress: { i: i, n: n },\n        data: { module: 'morph' }\n      });\n    }).then(function (res) {\n      var _res = _slicedToArray(res, 3),\n          datasetApiReport = _res[0],\n          sequences = _res[1],\n          renders = _res[2];\n\n      var folderLookup = datasetApiReport.folderLookup,\n          fileLookup = datasetApiReport.fileLookup,\n          datasetLookup = datasetApiReport.datasetLookup,\n          folders = datasetApiReport.folders,\n          files = datasetApiReport.files,\n          unsortedFolder = datasetApiReport.unsortedFolder,\n          resultsFolder = datasetApiReport.resultsFolder;\n\n\n      dispatch({\n        type: _types2.default.morph.load,\n        data: datasetApiReport,\n        app: {\n          resultsFolder: resultsFolder,\n          files: files,\n          sequences: sequences,\n          renders: renders\n        }\n      });\n    });\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nvar morphModule = {\n  name: 'morph',\n  displayName: 'Morph',\n  datatype: 'video'\n};\n\nexports.default = morphModule;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.reducer');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar morphInitialState = {\n  loading: true,\n  progress: { i: 0, n: 0 },\n  error: null,\n  folder_id: 0,\n  data: null,\n  app: null\n};\n\nvar morphReducer = function morphReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : morphInitialState;\n  var action = arguments[1];\n\n  if (action.data && action.data.module === 'morph') {\n    state = (0, _dataset2.default)(state, action);\n  }\n\n  switch (action.type) {\n    case _types2.default.morph.load:\n      console.log('morph load', action.app);\n      return _extends({}, state, {\n        app: action.app,\n        loading: false,\n        data: action.data\n      });\n    case _types2.default.file.create:\n      console.log(action);\n      if (action.data.module !== 'morph') return state;\n      return _extends({}, state, {\n        app: state.app && _extends({}, state.app, {\n          files: [action.data].concat(state.app.files)\n        })\n      });\n    default:\n      return state;\n  }\n};\n\nexports.default = morphReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.morph_task = undefined;\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _morph = require('./morph.module');\n\nvar _morph2 = _interopRequireDefault(_morph);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar morph_task = exports.morph_task = function morph_task(state, folder) {\n  return function (dispatch) {\n    if (state.a === 'PLACEHOLDER' || state.b === 'PLACEHOLDER') return;\n    var task = {\n      module: _morph2.default.name,\n      activity: 'morph',\n      dataset: state.a,\n      folder_id: folder.id,\n      opt: state\n    };\n    return _actions2.default.queue.add_task(task);\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _actions = require('../../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _morph = require('../morph.actions');\n\nvar morphActions = _interopRequireWildcard(_morph);\n\nvar _morph2 = require('../morph.tasks');\n\nvar morphTasks = _interopRequireWildcard(_morph2);\n\nvar _loading = require('../../../common/loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nvar _common = require('../../../common');\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar yes_count = 0;\n\nvar MorphResults = function (_Component) {\n  _inherits(MorphResults, _Component);\n\n  function MorphResults(props) {\n    _classCallCheck(this, MorphResults);\n\n    var _this = _possibleConstructorReturn(this, (MorphResults.__proto__ || Object.getPrototypeOf(MorphResults)).call(this));\n\n    _this.state = {\n      dataset_module: 'pix2pixhd',\n      a: \"PLACEHOLDER\",\n      b: \"PLACEHOLDER\",\n      a_offset: 0,\n      a_duration: 1,\n      a_pos: 0,\n      b_offset: 0,\n      b_duration: 1,\n      b_pos: 0,\n      steps: 16,\n      dilate: 2,\n      frames: 32,\n      padding: 3,\n      smooth: true,\n      mode: 'mix'\n    };\n    if (!props.morph.data) props.actions.load_data();\n    return _this;\n  }\n\n  _createClass(MorphResults, [{\n    key: 'componentDidMount',\n    value: function componentDidMount() {\n      yes_count = 0;\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      if (!this.props.morph.app) return (0, _preact.h)(_loading2.default, { progress: this.props.morph.progress });\n\n      var _props$morph$app = this.props.morph.app,\n          resultsFolder = _props$morph$app.resultsFolder,\n          sequences = _props$morph$app.sequences,\n          renders = _props$morph$app.renders,\n          files = _props$morph$app.files;\n\n      var sequence_options = sequences.map(function (sequence) {\n        return [sequence.name.split(\"_\").slice(0, 3).join(\" \") + \"~ (\" + sequence.count + \")\", sequence.name];\n      });\n      var sequenceLookup = sequences.reduce(function (a, b) {\n        return a[b.name] = b, a;\n      }, {});\n\n      var totalLength = this.state.frames / 25;\n      var lengthWarning = void 0;\n      if (this.state.steps / this.state.dilate > 64 && this.state.mode === 'mix') {\n        lengthWarning = (0, _preact.h)(\n          'span',\n          null,\n          (0, _preact.h)('br', null),\n          'warning, this will take a while'\n        );\n      }\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'app morph' },\n        (0, _preact.h)(\n          'div',\n          { className: 'heading row middle' },\n          (0, _preact.h)(\n            'h1',\n            null,\n            'Morph'\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { className: 'rows params renders' },\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.Group,\n              { title: 'From' },\n              (0, _preact.h)(_common.Select, {\n                title: 'Starting sequence',\n                placeholder: 'Please choose a video',\n                value: this.state.a,\n                options: sequence_options,\n                onChange: function onChange(name, key) {\n                  return _this2.setState({ a: key, a_duration: sequenceLookup[key].count, a_pos: 0, a_offset: 0 });\n                }\n              }),\n              (0, _preact.h)(_common.Slider, {\n                title: 'Offset',\n                value: this.state.a_pos,\n                min: 0, max: 1, step: 0.01,\n                onChange: function onChange(key) {\n                  return _this2.setState({ a_pos: key, a_offset: Math.floor(key * (_this2.state.a_duration - _this2.state.frames)) });\n                }\n              })\n            ),\n            (0, _preact.h)(\n              _common.Group,\n              { title: 'To' },\n              (0, _preact.h)(_common.Select, {\n                title: 'Ending sequence',\n                placeholder: 'Please choose a video',\n                value: this.state.b,\n                options: sequence_options,\n                onChange: function onChange(name, key) {\n                  return _this2.setState({ b: key, b_duration: sequenceLookup[key].count, b_pos: 0, b_offset: 0 });\n                }\n              }),\n              (0, _preact.h)(_common.Slider, {\n                title: 'Offset',\n                value: this.state.b_pos,\n                min: 0, max: 1, step: 0.01,\n                onChange: function onChange(key) {\n                  return _this2.setState({ b_pos: key, b_offset: Math.floor(key * (_this2.state.b_duration - _this2.state.frames)) });\n                }\n              })\n            ),\n            (0, _preact.h)(\n              _common.Group,\n              { title: 'Morph Settings' },\n              (0, _preact.h)(_common.Select, {\n                title: \"Mode\",\n                value: this.state.mode,\n                options: ['mix', 'average', 'mix_images'],\n                onChange: function onChange(name, key) {\n                  return _this2.setState({ mode: key });\n                }\n              }),\n              (0, _preact.h)(_common.Slider, {\n                type: 'list',\n                title: 'Steps',\n                value: this.state.steps,\n                options: [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096],\n                onChange: function onChange(key) {\n                  return _this2.setState({ steps: key, frames: key * _this2.state.dilate });\n                }\n              }),\n              (0, _preact.h)(_common.Slider, {\n                type: 'list',\n                title: 'Dilate',\n                value: this.state.dilate,\n                options: [1, 2, 4, 8, 16, 32],\n                onChange: function onChange(key) {\n                  return _this2.setState({ dilate: key, frames: _this2.state.steps * key });\n                }\n              }),\n              (0, _preact.h)(_common.Checkbox, {\n                title: 'Smooth',\n                value: this.state.smooth,\n                onToggle: function onToggle(key) {\n                  return _this2.setState({ smooth: key });\n                }\n              }),\n              (0, _preact.h)(_common.Slider, {\n                type: 'int',\n                title: 'Padding (in seconds)',\n                value: this.state.padding,\n                min: 0, max: 30, step: 1,\n                onChange: function onChange(key) {\n                  return _this2.setState({ padding: key });\n                }\n              }),\n              (0, _preact.h)(_common.Button, {\n                title: 'Run task',\n                value: 'Morph!',\n                onClick: function onClick() {\n                  return _this2.props.remote.morph_task(_this2.state, resultsFolder);\n                }\n              }),\n              (0, _preact.h)('br', null),\n              (0, _preact.h)(\n                _common.Param,\n                { title: 'Total length' },\n                totalLength.toFixed(1) + \" seconds\"\n              ),\n              (0, _preact.h)(\n                _common.Param,\n                { title: 'Total frames' },\n                this.state.frames + \" frames\"\n              ),\n              lengthWarning,\n              (0, _preact.h)('br', null),\n              (0, _preact.h)(_common.CurrentTask, null)\n            )\n          ),\n          (0, _preact.h)(\n            'h3',\n            null,\n            'morphed videos'\n          ),\n          (0, _preact.h)(_common.FileList, {\n            linkFiles: true,\n            files: files,\n            orderBy: 'date desc',\n            fields: 'name datetime size delete',\n            onDelete: function onDelete(file) {\n              var yes = void 0;\n              if (yes_count < 3) {\n                yes = confirm('Are you sure you want to delete this file?');\n              } else {\n                yes = true;\n              }\n              if (yes) {\n                yes_count += 1;\n                console.log('delete: confirmed');\n                _actions2.default.file.destroy(file);\n              }\n            }\n          }),\n          (0, _preact.h)('br', null),\n          (0, _preact.h)(\n            'h3',\n            null,\n            'renders on server'\n          ),\n          (0, _preact.h)(_common.FileList, {\n            files: renders,\n            orderBy: 'date desc',\n            fields: 'name datetime time size',\n            onClick: function onClick(file, e) {\n              e.preventDefault();\n              e.stopPropagation();\n              console.log('picked a result', file);\n              _this2.handlePick(file);\n            }\n          })\n        )\n      );\n    }\n  }, {\n    key: 'handlePick',\n    value: function handlePick(file) {\n      // this.props.audioPlayer.play(file)\n    }\n  }]);\n\n  return MorphResults;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    morph: state.module.morph\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(morphActions, dispatch),\n    remote: (0, _redux.bindActionCreators)(morphTasks, dispatch)\n    // audioPlayer: bindActionCreators(audioPlayerActions, dispatch),\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(MorphResults);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2pix = require('./views/pix2pix.new');\n\nvar _pix2pix2 = _interopRequireDefault(_pix2pix);\n\nvar _pix2pix3 = require('./views/pix2pix.show');\n\nvar _pix2pix4 = _interopRequireDefault(_pix2pix3);\n\nvar _pix2pix5 = require('./views/pix2pix.live');\n\nvar _pix2pix6 = _interopRequireDefault(_pix2pix5);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar router = function () {\n  function router() {\n    _classCallCheck(this, router);\n  }\n\n  _createClass(router, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      _actions2.default.system.changeTool('pix2pix');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #fde, #ffe)';\n    }\n  }, {\n    key: 'componentWillReceiveProps',\n    value: function componentWillReceiveProps() {\n      _actions2.default.system.changeTool('pix2pix');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #fde, #ffe)';\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'section',\n        null,\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pix/new/', component: _pix2pix2.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pix/sequences/', component: _pix2pix4.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pix/sequences/:id/', component: _pix2pix4.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pix/live/', component: _pix2pix6.default })\n      );\n    }\n  }]);\n\n  return router;\n}();\n\nfunction links() {\n  return [{ url: '/pix2pix/new/', name: 'new' }, { url: '/pix2pix/sequences/', name: 'sequences' }, { url: '/pix2pix/live/', name: 'live' }];\n}\n\nexports.default = {\n  name: 'pix2pix',\n  router: router, links: links\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.load_directories = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.loader');\n\nvar datasetLoader = _interopRequireWildcard(_dataset);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2pix = require('./pix2pix.module');\n\nvar _pix2pix2 = _interopRequireDefault(_pix2pix);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar load_directories = exports.load_directories = function load_directories(id) {\n  return function (dispatch) {\n    var module = _pix2pix2.default.name;\n    _util2.default.allProgress([datasetLoader.load(module), _actions2.default.socket.list_directory({ module: module, dir: 'sequences/pix2pix/' }), _actions2.default.socket.list_directory({ module: module, dir: 'datasets/pix2pix/' }), _actions2.default.socket.list_directory({ module: module, dir: 'checkpoints/pix2pix/' })], function (percent, i, n) {\n      console.log('pix2pix load progress', i, n);\n      dispatch({ type: _types2.default.app.load_progress, progress: { i: i, n: n } });\n    }).then(function (res) {\n      var _res = _slicedToArray(res, 4),\n          datasetApiReport = _res[0],\n          sequences = _res[1],\n          datasets = _res[2],\n          checkpoints = _res[3]; //, datasets, results, output, datasetUsage, lossReport] = res\n\n\n      var folderLookup = datasetApiReport.folderLookup,\n          fileLookup = datasetApiReport.fileLookup,\n          datasetLookup = datasetApiReport.datasetLookup,\n          folders = datasetApiReport.folders,\n          files = datasetApiReport.files,\n          unsortedFolder = datasetApiReport.unsortedFolder;\n      // console.log(datasetUsage)\n\n      var sequenceDirectories = sequences.filter(function (s) {\n        return s.dir;\n      });\n      // console.log(sequenceDirectories)\n      sequenceDirectories.forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.isBuilt = true;\n        // console.log(dir.name, dataset)\n      });\n\n      datasets.filter(function (s) {\n        return s.dir;\n      }).forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.hasDataset = true;\n      });\n\n      var checkpointDirectories = checkpoints.filter(function (s) {\n        return s.dir;\n      });\n      checkpointDirectories.forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.hasCheckpoints = true;\n        dataset.checkpoints = [dir];\n      });\n\n      // console.log(res)\n\n      // flatDatasets.forEach(file => {\n      //   file.uuid = uuidv1()\n      //   fileLookup[file.uuid] = file\n      //   const name = file.name.split('.')[0]\n      //   const dataset = datasetLoader.getDataset(module, datasetLookup, name, unsortedFolder, file.date)\n      //   file.persisted = false\n      //   dataset.input.push(file.uuid)\n      // })\n\n      // // exp:coccokit_3-frame_sizes:8,2-n_rnn:2-dataset:coccokit_3\n      // const checkpoints = results.filter(s => s.dir).map(s => {\n      //   const checkpoint = s.name\n      //     .split('-')\n      //     .map(s => s.split(':'))\n      //     .filter(b => b.length && b[1])\n      //     .reduce((a,b) => (a[b[0]] = b[1]) && a, {})\n      //   checkpoint.name = checkpoint.name || checkpoint.dataset || checkpoint.exp\n      //   checkpoint.date = s.date\n      //   checkpoint.dir = s\n      //   checkpoint.persisted = false\n      //   const dataset = datasetLoader.getDataset(module, datasetLookup, checkpoint.name, unsortedFolder, checkpoint.date)\n      //   const loss = lossReport[checkpoint.name]\n      //   if (loss) {\n      //     dataset.epoch = checkpoint.epoch = loss.length\n      //     checkpoint.training_loss = loss\n      //   }\n      //   dataset.checkpoints.push(checkpoint)\n      //   return checkpoint\n      // })\n\n      // output.map(file => {\n      //   file.uuid = uuidv1()\n      //   fileLookup[file.uuid] = file\n      //   const pair = file.name.split('.')[0].split('-')\n      //   const dataset = datasetLoader.getDataset(module, datasetLookup, pair[0], unsortedFolder, file.date)\n      //   file.persisted = false\n      //   file.epoch = parseInt(file.epoch || pair[1].replace(/^\\D+/, '')) || 0\n      //   dataset.epoch = Math.max(file.epoch, dataset.epoch || 0)\n      //   // here check if the file exists in dataset, if so just check that it's persisted\n      //   const found = dataset.output.some(file_id => {\n      //     // if (f.name === \n      //     if (fileLookup[file_id].name === file.name) {\n      //       fileLookup[file_id].persisted = true\n      //       return true\n      //     }\n      //     return false\n      //   })\n      //   if (! found) {\n      //     dataset.output.push(file.uuid)\n      //   }\n      // })\n\n      dispatch({\n        type: _types2.default.dataset.load,\n        data: {\n          module: module,\n          folderLookup: folderLookup,\n          fileLookup: fileLookup,\n          datasetLookup: datasetLookup,\n          folders: folders, files: files,\n          sequences: sequenceDirectories,\n          datasets: datasets,\n          checkpoints: checkpointDirectories\n        }\n      });\n    }).catch(function (e) {\n      console.error(e);\n    });\n    if (id) {\n      console.log('folder id', id);\n      dispatch({\n        type: _types2.default.dataset.set_folder,\n        data: {\n          folder_id: id,\n          module: module\n        }\n      });\n    }\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nvar pix2pixModule = {\n  name: 'pix2pix',\n  displayName: 'Pix2Pix',\n  datatype: 'video'\n};\n\nexports.default = pix2pixModule;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.reducer');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar pix2pixInitialState = {\n  loading: true,\n  progress: { i: 0, n: 0 },\n  error: null,\n  folder_id: 0,\n  data: null\n};\n\nvar pix2pixReducer = function pix2pixReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : pix2pixInitialState;\n  var action = arguments[1];\n\n  if (action.data && action.data.module === 'pix2pix') {\n    state = (0, _dataset2.default)(state, action);\n  }\n\n  switch (action.type) {\n    default:\n      return state;\n  }\n};\n\nexports.default = pix2pixReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.train_task = exports.live_task = exports.fetch_task = undefined;\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar fetch_task = exports.fetch_task = function fetch_task(url, file_id, dataset) {\n  return function (dispatch) {\n    if (!url) return console.log('input file inaccessible (no url)');\n    var task = {\n      module: 'pix2pix',\n      activity: 'fetch',\n      dataset: dataset,\n      opt: {\n        url: url,\n        file_id: file_id,\n        dataset: dataset\n      }\n    };\n    return _actions2.default.queue.add_task(task);\n  };\n};\n\nvar live_task = exports.live_task = function live_task(sequence, checkpoint) {\n  return function (dispatch) {\n    var task = {\n      module: 'pix2pix',\n      activity: 'live',\n      dataset: sequence,\n      checkpoint: checkpoint,\n      opt: {\n        poll_delay: 0.09\n      }\n    };\n    console.log(task);\n    console.log('add live task');\n    return _actions2.default.queue.add_task(task);\n  };\n};\n\nvar train_task = exports.train_task = function train_task(dataset, folder_id) {\n  var epochs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n  return function (dispatch) {\n    var task = {\n      module: 'pix2pix',\n      activity: 'train',\n      dataset: dataset.name,\n      epoch: 0,\n      epochs: epochs,\n      opt: {\n        folder_id: folder_id,\n        load_size: 264 // switch to 256 for pix2wav\n      }\n    };\n    console.log(task);\n    return _actions2.default.queue.add_task(task);\n  };\n};\n// export const log_task = (dataset) => dispatch => {\n//   const task = {\n//     module: 'samplernn',\n//     activity: 'log',\n//     dataset: dataset.name,\n//   }\n//   return actions.queue.add_task(task)\n// }\n// export const clear_cache_task = (dataset) => dispatch => {\n//   const task = {\n//     module: 'samplernn',\n//     activity: 'clear_cache',\n//     dataset: dataset.name,\n//   }\n//   return actions.queue.add_task(task)\n// }","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _common = require('../../../common/');\n\nvar _player = require('../../../live/player');\n\nvar _live = require('../../../live/live.actions');\n\nvar liveActions = _interopRequireWildcard(_live);\n\nvar _queue = require('../../../queue/queue.actions');\n\nvar queueActions = _interopRequireWildcard(_queue);\n\nvar _pix2pix = require('../pix2pix.tasks');\n\nvar pix2pixTasks = _interopRequireWildcard(_pix2pix);\n\nvar _pix2pix2 = require('../pix2pix.actions');\n\nvar pix2pixActions = _interopRequireWildcard(_pix2pix2);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Pix2PixLive = function (_Component) {\n  _inherits(Pix2PixLive, _Component);\n\n  function Pix2PixLive(props) {\n    _classCallCheck(this, Pix2PixLive);\n\n    // if (! props.pix2pix || ! props.pix2pix.data) {\n    var _this = _possibleConstructorReturn(this, (Pix2PixLive.__proto__ || Object.getPrototypeOf(Pix2PixLive)).call(this));\n\n    props.actions.pix2pix.load_directories();\n    // }\n    props.actions.live.get_params();\n    // props.actions.live.list_checkpoints('pix2pix')\n    // props.actions.live.list_sequences('pix2pix')\n    _this.changeCheckpoint = _this.changeCheckpoint.bind(_this);\n    _this.changeEpoch = _this.changeEpoch.bind(_this);\n    _this.changeSequence = _this.changeSequence.bind(_this);\n    _this.seek = _this.seek.bind(_this);\n    _this.togglePlaying = _this.togglePlaying.bind(_this);\n    _this.toggleRecording = _this.toggleRecording.bind(_this);\n    return _this;\n  }\n\n  _createClass(Pix2PixLive, [{\n    key: 'componentWillUpdate',\n    value: function componentWillUpdate(nextProps) {\n      if (nextProps.opt.checkpoint_name && nextProps.opt.checkpoint_name !== this.props.opt.checkpoint_name) {\n        this.props.actions.live.list_epochs('pix2pix', nextProps.opt.checkpoint_name);\n      }\n    }\n  }, {\n    key: 'changeCheckpoint',\n    value: function changeCheckpoint(field, checkpoint_name) {\n      this.props.actions.live.load_epoch(checkpoint_name, 'latest');\n    }\n  }, {\n    key: 'changeEpoch',\n    value: function changeEpoch(field, epoch_name) {\n      this.props.actions.live.load_epoch(this.props.opt.checkpoint_name, epoch_name);\n    }\n  }, {\n    key: 'changeSequence',\n    value: function changeSequence(field, sequence) {\n      console.log('load sequence', sequence);\n      this.props.actions.live.load_sequence(sequence);\n    }\n  }, {\n    key: 'seek',\n    value: function seek(percentage) {\n      var frame = Math.floor(percentage * (parseInt(this.props.frame.sequence_len) || 1) + 1);\n      console.log(\"seek to frame\", percentage, frame);\n      this.props.actions.live.seek(frame);\n    }\n  }, {\n    key: 'start',\n    value: function start() {\n      // console.log(this.props)\n      var sequence = this.props.pix2pix.data.sequences[0].name;\n      var checkpoint = this.props.pix2pix.data.checkpoints[0].name;\n      console.log('starting up!', sequence, checkpoint);\n      this.props.actions.tasks.live_task(sequence, checkpoint);\n    }\n  }, {\n    key: 'interrupt',\n    value: function interrupt() {\n      this.props.actions.queue.stop_task('gpu');\n    }\n  }, {\n    key: 'togglePlaying',\n    value: function togglePlaying() {\n      if (this.props.opt.processing) {\n        this.props.actions.live.pause();\n      } else {\n        this.props.actions.live.play();\n      }\n    }\n  }, {\n    key: 'toggleRecording',\n    value: function toggleRecording() {\n      if (this.props.opt.recording) {\n        (0, _player.stopRecording)();\n        this.props.actions.live.pause();\n      } else {\n        (0, _player.startRecording)();\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      // console.log(this.props)\n      if (this.props.pix2pix.loading) {\n        return (0, _preact.h)(_common.Loading, null);\n      }\n      return (0, _preact.h)(\n        'div',\n        { className: 'app centered' },\n        (0, _preact.h)(_common.Player, { width: 424, height: 256 }),\n        (0, _preact.h)(\n          'div',\n          { className: 'params row' },\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Playback',\n                noToggle: true\n              },\n              (0, _preact.h)(_common.Select, {\n                name: 'send_image',\n                title: 'view mode',\n                options: ['a', 'b', 'sequence', 'recursive'],\n                onChange: this.props.actions.live.set_param\n              }),\n              (0, _preact.h)(_common.Select, {\n                name: 'sequence_name',\n                title: 'sequence',\n                options: this.props.pix2pix.data.sequences.map(function (file) {\n                  return file.name;\n                }),\n                onChange: this.changeSequence\n              }),\n              (0, _preact.h)(_common.Select, {\n                name: 'checkpoint_name',\n                title: 'checkpoint',\n                options: this.props.pix2pix.data.checkpoints.map(function (file) {\n                  return file.name;\n                }),\n                onChange: this.changeCheckpoint\n              }),\n              (0, _preact.h)(_common.Select, {\n                name: 'epoch',\n                title: 'epoch',\n                options: this.props.epochs,\n                onChange: this.changeEpoch\n              }),\n              (0, _preact.h)(_common.Slider, {\n                name: 'position',\n                min: 0.0, max: 1.0, type: 'float',\n                value: (this.props.frame.sequence_i || 0) / (this.props.frame.sequence_len || 1),\n                onChange: this.seek\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'frame_delay',\n                min: 0.05, max: 2.0, type: 'float'\n              }),\n              this.renderRestartButton(),\n              (0, _preact.h)(\n                _common.Button,\n                {\n                  title: this.props.opt.savingVideo ? 'Saving video...' : this.props.opt.recording ? 'Recording (' + timeInSeconds(this.props.opt.recordFrames / 25) + ')' : 'Record video',\n                  onClick: this.toggleRecording\n                },\n                this.props.opt.savingVideo ? 'Saving' : this.props.opt.recording ? 'Recording' : 'Record'\n              ),\n              (0, _preact.h)(\n                _common.Button,\n                {\n                  title: 'Save frame',\n                  onClick: _player.saveFrame\n                },\n                'Save'\n              ),\n              (0, _preact.h)(_common.ParamGroup, {\n                title: 'Render on server',\n                name: 'store_b',\n                onToggle: function onToggle(value) {\n                  // now storing frames on server...\n                }\n              }),\n              (0, _preact.h)(\n                'p',\n                { className: 'last_message' },\n                this.props.last_message\n              )\n            )\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Transition',\n                name: 'transition'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'transition_period',\n                min: 10, max: 5000, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'transition_min',\n                min: 0.001, max: 0.2, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'transition_max',\n                min: 0.1, max: 1.0, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Recursion',\n                name: 'recursive'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'recursive_frac',\n                min: 0.0, max: 0.5, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'recurse_roll',\n                min: -64, max: 64, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'recurse_roll_axis',\n                min: 0, max: 1, type: 'int'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Sequence',\n                name: 'sequence'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'sequence_frac',\n                min: 0.0, max: 0.5, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'process_frac',\n                min: 0, max: 1, type: 'float'\n              })\n            )\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Clahe',\n                name: 'clahe'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'clip_limit',\n                min: 1.0, max: 4.0, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Posterize',\n                name: 'posterize'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'spatial_window',\n                min: 2, max: 128, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'color_window',\n                min: 2, max: 128, type: 'int'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Blur',\n                name: 'blur'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'blur_radius',\n                min: 3, max: 7, type: 'odd'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'blur_sigma',\n                min: 0, max: 2, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Canny Edge Detection',\n                name: 'canny'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'canny_lo',\n                min: 10, max: 200, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'canny_hi',\n                min: 10, max: 200, type: 'int'\n              })\n            )\n          )\n        )\n      );\n    }\n  }, {\n    key: 'renderRestartButton',\n    value: function renderRestartButton() {\n      var _this2 = this;\n\n      if (this.props.runner.gpu.status === 'IDLE') {\n        return (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'GPU Idle',\n            onClick: function onClick() {\n              return _this2.start();\n            }\n          },\n          'Start'\n        );\n      }\n      if (this.props.runner.gpu.task.module !== 'pix2pix') {\n        return (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'GPU Busy',\n            onClick: function onClick() {\n              return _this2.interrupt();\n            }\n          },\n          'Interrupt'\n        );\n      }\n      if (!this.props.opt.processing) {\n        return (0, _preact.h)(\n          'div',\n          null,\n          (0, _preact.h)(\n            _common.Button,\n            {\n              title: 'Not processing',\n              onClick: this.togglePlaying\n            },\n            'Restart'\n          ),\n          (0, _preact.h)(\n            _common.Button,\n            {\n              title: 'GPU Busy',\n              onClick: function onClick() {\n                return _this2.interrupt();\n              }\n            },\n            'Interrupt'\n          )\n        );\n      }\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'Processing',\n            onClick: this.togglePlaying\n          },\n          'Stop'\n        ),\n        (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'GPU Busy',\n            onClick: function onClick() {\n              return _this2.interrupt();\n            }\n          },\n          'Interrupt'\n        )\n      );\n    }\n  }]);\n\n  return Pix2PixLive;\n}(_preact.Component);\n\nfunction timeInSeconds(n) {\n  return n.toFixed(1) + ' s.';\n}\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    last_message: state.live.last_message,\n    opt: state.live.opt,\n    frame: state.live.frame,\n    checkpoints: state.live.checkpoints,\n    epochs: state.live.epochs,\n    sequences: state.live.sequences,\n    runner: state.system.runner,\n    pix2pix: state.module.pix2pix\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: {\n      live: (0, _redux.bindActionCreators)(liveActions, dispatch),\n      queue: (0, _redux.bindActionCreators)(queueActions, dispatch),\n      pix2pix: (0, _redux.bindActionCreators)(pix2pixActions, dispatch),\n      tasks: (0, _redux.bindActionCreators)(pix2pixTasks, dispatch), s: s\n    }\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2PixLive);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _common = require('../../../common');\n\nvar _pix2pix = require('../pix2pix.actions');\n\nvar pix2pixActions = _interopRequireWildcard(_pix2pix);\n\nvar _pix2pix2 = require('../pix2pix.module');\n\nvar _pix2pix3 = _interopRequireDefault(_pix2pix2);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction Pix2PixNew(props) {\n  return (0, _preact.h)(_common.Views.New, {\n    db: props.pix2pix,\n    path: '/pix2pix/sequences/',\n    actions: props.actions,\n    module: _pix2pix3.default,\n    history: props.history\n  });\n}\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    pix2pix: state.module.pix2pix\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(pix2pixActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2PixNew);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2pix = require('../pix2pix.actions');\n\nvar pix2pixActions = _interopRequireWildcard(_pix2pix);\n\nvar _pix2pix2 = require('../pix2pix.tasks');\n\nvar pix2pixTasks = _interopRequireWildcard(_pix2pix2);\n\nvar _common = require('../../../common');\n\nvar _dataset = require('../../../dataset/dataset.form');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nvar _dataset3 = require('../../../dataset/dataset.new');\n\nvar _dataset4 = _interopRequireDefault(_dataset3);\n\nvar _upload = require('../../../dataset/upload.status');\n\nvar _upload2 = _interopRequireDefault(_upload);\n\nvar _dataset5 = require('../../../dataset/dataset.component');\n\nvar _dataset6 = _interopRequireDefault(_dataset5);\n\nvar _pix2pix3 = require('../pix2pix.module');\n\nvar _pix2pix4 = _interopRequireDefault(_pix2pix3);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Pix2pixShow = function (_Component) {\n  _inherits(Pix2pixShow, _Component);\n\n  function Pix2pixShow(props) {\n    _classCallCheck(this, Pix2pixShow);\n\n    var _this = _possibleConstructorReturn(this, (Pix2pixShow.__proto__ || Object.getPrototypeOf(Pix2pixShow)).call(this, props));\n\n    _this.datasetActions = _this.datasetActions.bind(_this);\n    return _this;\n  }\n\n  _createClass(Pix2pixShow, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      var id = this.props.match.params.id || localStorage.getItem('pix2pix.last_id');\n      console.log('load dataset:', id);\n      var _props = this.props,\n          match = _props.match,\n          pix2pix = _props.pix2pix,\n          actions = _props.actions;\n\n      if (id === 'new') return;\n      if (id) {\n        if (parseInt(id)) localStorage.setItem('pix2pix.last_id', id);\n        if (!pix2pix.folder || pix2pix.folder.id !== id) {\n          actions.load_directories(id);\n        }\n      } else {\n        this.props.history.push('/pix2pix/new/');\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props2 = this.props,\n          pix2pix = _props2.pix2pix,\n          match = _props2.match,\n          history = _props2.history;\n\n      var _ref = pix2pix.data || {},\n          folderLookup = _ref.folderLookup;\n\n      var folder = (folderLookup || {})[pix2pix.folder_id] || {};\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'app pix2pix' },\n        (0, _preact.h)(\n          'div',\n          { className: 'heading' },\n          (0, _preact.h)(\n            'div',\n            { className: 'spaced' },\n            (0, _preact.h)(\n              'h1',\n              null,\n              folder ? folder.name : (0, _preact.h)(_common.Loading, null)\n            ),\n            (0, _preact.h)(_upload2.default, null)\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { className: 'row' },\n          folder && folder.name && folder.name !== 'unsorted' && (0, _preact.h)(_dataset2.default, {\n            title: 'Add Files',\n            module: _pix2pix4.default,\n            folder: folder,\n            canUpload: true, canAddURL: true\n          }),\n          (0, _preact.h)(\n            'div',\n            null,\n            (0, _preact.h)(_upload2.default, null),\n            (0, _preact.h)(_common.CurrentTask, null)\n          )\n        ),\n        (0, _preact.h)(_dataset6.default, {\n          loading: pix2pix.loading,\n          progress: pix2pix.progress,\n          id: pix2pix.folder_id,\n          module: _pix2pix4.default,\n          data: pix2pix.data,\n          folder: folder,\n          history: history,\n          onPickFile: function onPickFile(file, e) {\n            e.preventDefault();\n            e.stopPropagation();\n            console.log('picked a file', file);\n          },\n          datasetActions: this.datasetActions\n        })\n      );\n    }\n  }, {\n    key: 'datasetActions',\n    value: function datasetActions(dataset) {\n      var isFetching = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      var isProcessing = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n      var _props3 = this.props,\n          pix2pix = _props3.pix2pix,\n          remote = _props3.remote;\n\n      var input = pix2pix.data.fileLookup[dataset.input[0]];\n      if (!input) return null;\n      if (input.name && input.name.match(/(gif|jpe?g|png)$/i)) return null;\n      console.log(dataset);\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)(\n          'div',\n          { className: 'actions' },\n          (0, _preact.h)(\n            'span',\n            { className: 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pix.folder_id, 1);\n              } },\n            'train'\n          ),\n          (0, _preact.h)(\n            'span',\n            { className: 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pix.folder_id, 5);\n              } },\n            '5x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { className: 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pix.folder_id, 10);\n              } },\n            '10x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { className: 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pix.folder_id, 20);\n              } },\n            '20x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { className: 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pix.folder_id, 50);\n              } },\n            '50x'\n          )\n        ),\n        dataset.isBuilt ? (0, _preact.h)(\n          'div',\n          { className: 'subtext' },\n          'fetched ',\n          (0, _preact.h)(\n            'span',\n            { className: 'link', onClick: function onClick() {\n                return remote.clear_cache_task(dataset);\n              } },\n            'rm'\n          )\n        ) : isFetching ? (0, _preact.h)(\n          'div',\n          { className: 'subtext' },\n          'fetching'\n        ) : (0, _preact.h)(\n          'div',\n          { className: 'subtext' },\n          (0, _preact.h)(\n            'span',\n            { className: 'link', onClick: function onClick() {\n                return remote.fetch_task(input.url, input.id, dataset.name);\n              } },\n            'fetch'\n          )\n        )\n      );\n    }\n  }]);\n\n  return Pix2pixShow;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    pix2pix: state.module.pix2pix\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(pix2pixActions, dispatch),\n    remote: (0, _redux.bindActionCreators)(pix2pixTasks, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2pixShow);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2pixhd = require('./views/pix2pixhd.new');\n\nvar _pix2pixhd2 = _interopRequireDefault(_pix2pixhd);\n\nvar _pix2pixhd3 = require('./views/pix2pixhd.show');\n\nvar _pix2pixhd4 = _interopRequireDefault(_pix2pixhd3);\n\nvar _pix2pixhd5 = require('./views/pix2pixhd.results');\n\nvar _pix2pixhd6 = _interopRequireDefault(_pix2pixhd5);\n\nvar _pix2pixhd7 = require('./views/pix2pixhd.train');\n\nvar _pix2pixhd8 = _interopRequireDefault(_pix2pixhd7);\n\nvar _pix2pixhd9 = require('./views/pix2pixhd.live');\n\nvar _pix2pixhd10 = _interopRequireDefault(_pix2pixhd9);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar router = function () {\n  function router() {\n    _classCallCheck(this, router);\n  }\n\n  _createClass(router, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      _actions2.default.system.changeTool('pix2pixhd');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #def, #dfe)';\n    }\n  }, {\n    key: 'componentWillReceiveProps',\n    value: function componentWillReceiveProps() {\n      _actions2.default.system.changeTool('pix2pixhd');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #def, #dfe)';\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'section',\n        null,\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pixhd/new/', component: _pix2pixhd2.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pixhd/sequences/', component: _pix2pixhd4.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pixhd/sequences/:id/', component: _pix2pixhd4.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pixhd/train/', component: _pix2pixhd8.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pixhd/results/', component: _pix2pixhd6.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pixhd/live/', component: _pix2pixhd10.default })\n      );\n    }\n  }]);\n\n  return router;\n}();\n\nfunction links() {\n  return [{ url: '/pix2pixhd/new/', name: 'folders' }, { url: '/pix2pixhd/sequences/', name: 'sequences' }, { url: '/pix2pixhd/train/', name: 'checkpoints' }, { url: '/pix2pixhd/results/', name: 'results' }, { url: '/pix2pixhd/live/', name: 'live' }];\n}\n\nexports.default = {\n  name: 'pix2pixhd',\n  router: router, links: links\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.count_dataset = exports.list_epochs = exports.load_results = exports.load_directories = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.loader');\n\nvar datasetLoader = _interopRequireWildcard(_dataset);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2pixhd = require('./pix2pixhd.module');\n\nvar _pix2pixhd2 = _interopRequireDefault(_pix2pixhd);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar load_directories = exports.load_directories = function load_directories(id) {\n  return function (dispatch) {\n    var module = _pix2pixhd2.default.name;\n    _util2.default.allProgress([datasetLoader.load(module), _actions2.default.socket.list_directory({ module: module, dir: 'sequences' }), _actions2.default.socket.list_directory({ module: module, dir: 'datasets' }), _actions2.default.socket.list_directory({ module: module, dir: 'checkpoints' })], function (percent, i, n) {\n      console.log('pix2pixhd load progress', i, n);\n      dispatch({\n        type: _types2.default.app.load_progress,\n        progress: { i: i, n: n },\n        data: { module: 'pix2pixhd' }\n      });\n    }).then(function (res) {\n      var _res = _slicedToArray(res, 4),\n          datasetApiReport = _res[0],\n          sequences = _res[1],\n          datasets = _res[2],\n          checkpoints = _res[3]; //, datasets, results, output, datasetUsage, lossReport] = res\n\n\n      var folderLookup = datasetApiReport.folderLookup,\n          fileLookup = datasetApiReport.fileLookup,\n          datasetLookup = datasetApiReport.datasetLookup,\n          folders = datasetApiReport.folders,\n          files = datasetApiReport.files,\n          unsortedFolder = datasetApiReport.unsortedFolder,\n          resultsFolder = datasetApiReport.resultsFolder;\n      // console.log(datasetUsage)\n\n      var sequenceDirectories = sequences.filter(function (s) {\n        return s.dir;\n      });\n      // console.log(sequenceDirectories)\n      sequenceDirectories.forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.isBuilt = true;\n        // console.log(dir.name, dataset)\n      });\n\n      datasets.filter(function (s) {\n        return s.dir;\n      }).forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.hasDataset = true;\n      });\n\n      var checkpointDirectories = checkpoints.filter(function (s) {\n        return s.dir;\n      });\n      checkpointDirectories.forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.hasCheckpoints = true;\n        dataset.checkpoints = [dir];\n      });\n\n      // console.log(res)\n\n      // flatDatasets.forEach(file => {\n      //   file.uuid = uuidv1()\n      //   fileLookup[file.uuid] = file\n      //   const name = file.name.split('.')[0]\n      //   const dataset = datasetLoader.getDataset(module, datasetLookup, name, unsortedFolder, file.date)\n      //   file.persisted = false\n      //   dataset.input.push(file.uuid)\n      // })\n\n      // // exp:coccokit_3-frame_sizes:8,2-n_rnn:2-dataset:coccokit_3\n      // const checkpoints = results.filter(s => s.dir).map(s => {\n      //   const checkpoint = s.name\n      //     .split('-')\n      //     .map(s => s.split(':'))\n      //     .filter(b => b.length && b[1])\n      //     .reduce((a,b) => (a[b[0]] = b[1]) && a, {})\n      //   checkpoint.name = checkpoint.name || checkpoint.dataset || checkpoint.exp\n      //   checkpoint.date = s.date\n      //   checkpoint.dir = s\n      //   checkpoint.persisted = false\n      //   const dataset = datasetLoader.getDataset(module, datasetLookup, checkpoint.name, unsortedFolder, checkpoint.date)\n      //   const loss = lossReport[checkpoint.name]\n      //   if (loss) {\n      //     dataset.epoch = checkpoint.epoch = loss.length\n      //     checkpoint.training_loss = loss\n      //   }\n      //   dataset.checkpoints.push(checkpoint)\n      //   return checkpoint\n      // })\n\n      // output.map(file => {\n      //   file.uuid = uuidv1()\n      //   fileLookup[file.uuid] = file\n      //   const pair = file.name.split('.')[0].split('-')\n      //   const dataset = datasetLoader.getDataset(module, datasetLookup, pair[0], unsortedFolder, file.date)\n      //   file.persisted = false\n      //   file.epoch = parseInt(file.epoch || pair[1].replace(/^\\D+/, '')) || 0\n      //   dataset.epoch = Math.max(file.epoch, dataset.epoch || 0)\n      //   // here check if the file exists in dataset, if so just check that it's persisted\n      //   const found = dataset.output.some(file_id => {\n      //     // if (f.name === \n      //     if (fileLookup[file_id].name === file.name) {\n      //       fileLookup[file_id].persisted = true\n      //       return true\n      //     }\n      //     return false\n      //   })\n      //   if (! found) {\n      //     dataset.output.push(file.uuid)\n      //   }\n      // })\n\n      dispatch({\n        type: _types2.default.dataset.load,\n        data: {\n          module: module,\n          folderLookup: folderLookup,\n          fileLookup: fileLookup,\n          datasetLookup: datasetLookup,\n          folders: folders, files: files,\n          sequences: sequenceDirectories,\n          datasets: datasets,\n          checkpoints: checkpointDirectories,\n          resultsFolder: resultsFolder\n        }\n      });\n      if (id) {\n        console.log('folder id', id);\n        dispatch({\n          type: _types2.default.dataset.set_folder,\n          data: {\n            folder_id: id,\n            module: module\n          }\n        });\n      }\n    }).catch(function (e) {\n      console.error(e);\n    });\n    if (id) {\n      console.log('folder id', id);\n      dispatch({\n        type: _types2.default.dataset.set_folder,\n        data: {\n          folder_id: id,\n          module: module\n        }\n      });\n    }\n  };\n};\n\nvar load_results = exports.load_results = function load_results(id) {\n  return function (dispatch) {\n    var module = _pix2pixhd2.default.name;\n    _util2.default.allProgress([_actions2.default.folder.index({ name: 'results' }), _actions2.default.file.index({ module: module, generated: 1 }), _actions2.default.socket.list_sequences({ module: module, dir: 'results' }), _actions2.default.socket.list_directory({ module: module, dir: 'renders' })], function (percent, i, n) {\n      console.log('pix2pixhd load progress', i, n);\n      dispatch({\n        type: _types2.default.app.load_progress,\n        progress: { i: i, n: n },\n        data: { module: 'pix2pixhd' }\n      });\n    }).then(function (res) {\n      var _res2 = _slicedToArray(res, 4),\n          folders = _res2[0],\n          files = _res2[1],\n          results = _res2[2],\n          renders = _res2[3]; //, datasets, results, output, datasetUsage, lossReport] = res\n\n\n      console.log(files, results, renders);\n      dispatch({\n        type: _types2.default.pix2pixhd.load_results,\n        results: {\n          resultsFolder: folders[0],\n          files: files,\n          results: results,\n          renders: renders\n        }\n      });\n    });\n  };\n};\n\nvar G_NET_REGEXP = new RegExp('_net_G.pth$');\n\nvar list_epochs = exports.list_epochs = function list_epochs(checkpoint_name) {\n  return function (dispatch) {\n    var module = _pix2pixhd2.default.name;\n    _actions2.default.socket.list_directory({ module: module, dir: 'checkpoints/' + checkpoint_name }).then(function (files) {\n      // console.log(files)\n      var epochs = files.map(function (f) {\n        if (!f.name.match(G_NET_REGEXP)) return null;\n        return f.name.replace(G_NET_REGEXP, '');\n      }).filter(function (f) {\n        return !!f;\n      });\n      // console.log(epochs)\n      dispatch({\n        type: _types2.default.dataset.list_epochs,\n        data: {\n          epochs: epochs,\n          module: module\n        }\n      });\n    });\n  };\n};\n\nvar count_dataset = exports.count_dataset = function count_dataset(checkpoint_name) {\n  return function (dispatch) {\n    var module = _pix2pixhd2.default.name;\n    _util2.default.allProgress([_actions2.default.socket.count_directory({ module: module, dir: 'sequences/' + checkpoint_name + '/' }), _actions2.default.socket.count_directory({ module: module, dir: 'datasets/' + checkpoint_name + '/train_A/' })], function (percent, i, n) {\n      console.log('pix2pixhd load progress', i, n);\n      dispatch({\n        type: _types2.default.app.load_progress,\n        progress: { i: i, n: n },\n        data: { module: 'pix2pixhd' }\n      });\n    }).then(function (res) {\n      var _res3 = _slicedToArray(res, 2),\n          sequenceCount = _res3[0],\n          datasetCount = _res3[1]; //, datasets, results, output, datasetUsage, lossReport] = res\n\n\n      console.log(sequenceCount, datasetCount);\n      dispatch({\n        type: _types2.default.pix2pixhd.load_dataset_count,\n        data: {\n          name: checkpoint_name,\n          sequenceCount: sequenceCount,\n          datasetCount: datasetCount\n        }\n      });\n    });\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nvar pix2pixhdModule = {\n  name: 'pix2pixhd',\n  displayName: 'Pix2PixHD',\n  datatype: 'video'\n};\n\nexports.default = pix2pixhdModule;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.reducer');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar pix2pixhdInitialState = {\n  loading: true,\n  progress: { i: 0, n: 0 },\n  error: null,\n  folder_id: 0,\n  data: null,\n  results: null,\n  checkpoint: {\n    name: '',\n    sequenceCount: 0,\n    datasetCount: 0\n  }\n};\n\nvar pix2pixhdReducer = function pix2pixhdReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : pix2pixhdInitialState;\n  var action = arguments[1];\n\n  if (action.data && action.data.module === 'pix2pixhd') {\n    state = (0, _dataset2.default)(state, action);\n  }\n\n  switch (action.type) {\n    case _types2.default.pix2pixhd.load_results:\n      return _extends({}, state, {\n        results: action.results\n      });\n    case _types2.default.pix2pixhd.load_dataset_count:\n      return _extends({}, state, {\n        checkpoint: action.data\n      });\n    case _types2.default.file.destroy:\n      console.log('file destroy', state.results);\n      return _extends({}, state, {\n        results: _extends({}, state.results, {\n          files: state.results.files.filter(function (f) {\n            return f.id !== action.data.id;\n          })\n        })\n      });\n    default:\n      return state;\n  }\n};\n\nexports.default = pix2pixhdReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.clear_recursive_task = exports.augment_task = exports.live_task = exports.train_task = exports.fetch_task = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _pix2pixhd = require('./pix2pixhd.module');\n\nvar _pix2pixhd2 = _interopRequireDefault(_pix2pixhd);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar fetch_task = exports.fetch_task = function fetch_task(url, file_id, dataset) {\n  return function (dispatch) {\n    if (!url) return console.log('input file inaccessible (no url)');\n    var task = {\n      module: _pix2pixhd2.default.name,\n      activity: 'fetch',\n      dataset: dataset,\n      opt: {\n        url: url,\n        file_id: file_id,\n        dataset: dataset\n      }\n    };\n    return _actions2.default.queue.add_task(task);\n  };\n};\n\nvar train_task = exports.train_task = function train_task(dataset, folder_id) {\n  var epochs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n  return function (dispatch) {\n    var task = {\n      module: _pix2pixhd2.default.name,\n      activity: 'train',\n      dataset: dataset.name || dataset,\n      epoch: 0,\n      epochs: epochs,\n      opt: {\n        folder_id: folder_id\n      }\n    };\n    if (!task.dataset) {\n      console.error(\"train task: no dataset specified\");\n      return;\n    }\n    console.log(task);\n    return _actions2.default.queue.add_task(task);\n  };\n};\n\nvar live_task = exports.live_task = function live_task(sequence, checkpoint, opt) {\n  return function (dispatch) {\n    var task = {\n      module: _pix2pixhd2.default.name,\n      activity: 'live',\n      dataset: sequence,\n      checkpoint: checkpoint,\n      opt: _extends({}, opt, {\n        poll_delay: 0.01\n      })\n    };\n    console.log(task);\n    console.log('add live task');\n    return _actions2.default.queue.add_task(task);\n  };\n};\n\nvar augment_task = exports.augment_task = function augment_task(dataset, opt) {\n  return function (dispatch) {\n    var task = {\n      module: _pix2pixhd2.default.name,\n      activity: 'augment',\n      dataset: dataset,\n      folder_id: opt.folder_id,\n      opt: _extends({}, opt)\n    };\n    console.log(task);\n    console.log('add augment task');\n    return _actions2.default.queue.add_task(task);\n  };\n};\n\nvar clear_recursive_task = exports.clear_recursive_task = function clear_recursive_task(dataset) {\n  return function (dispatch) {\n    var task = {\n      module: _pix2pixhd2.default.name,\n      activity: 'clear_recursive',\n      dataset: dataset\n    };\n    console.log(task);\n    console.log('add clear recursive task');\n    return _actions2.default.queue.add_task(task);\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _common = require('../../../common/');\n\nvar _player = require('../../../live/player');\n\nvar _live = require('../../../live/live.actions');\n\nvar liveActions = _interopRequireWildcard(_live);\n\nvar _queue = require('../../../queue/queue.actions');\n\nvar queueActions = _interopRequireWildcard(_queue);\n\nvar _pix2pixhd = require('../pix2pixhd.tasks');\n\nvar pix2pixhdTasks = _interopRequireWildcard(_pix2pixhd);\n\nvar _pix2pixhd2 = require('../pix2pixhd.actions');\n\nvar pix2pixhdActions = _interopRequireWildcard(_pix2pixhd2);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Pix2PixHDLive = function (_Component) {\n  _inherits(Pix2PixHDLive, _Component);\n\n  function Pix2PixHDLive(props) {\n    _classCallCheck(this, Pix2PixHDLive);\n\n    // if (! props.pix2pixhd || ! props.pix2pixhd.data) {\n    var _this = _possibleConstructorReturn(this, (Pix2PixHDLive.__proto__ || Object.getPrototypeOf(Pix2PixHDLive)).call(this));\n\n    props.actions.pix2pixhd.load_directories();\n    // }\n    props.actions.live.get_params();\n    // props.actions.live.list_checkpoints('pix2pixhd')\n    // props.actions.live.list_sequences('pix2pixhd')\n    _this.changeCheckpoint = _this.changeCheckpoint.bind(_this);\n    _this.changeEpoch = _this.changeEpoch.bind(_this);\n    _this.changeSequence = _this.changeSequence.bind(_this);\n    _this.seek = _this.seek.bind(_this);\n    _this.togglePlaying = _this.togglePlaying.bind(_this);\n    _this.toggleRecording = _this.toggleRecording.bind(_this);\n    _this.handleKeydown = _this.handleKeydown.bind(_this);\n    return _this;\n  }\n\n  _createClass(Pix2PixHDLive, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      document.addEventListener('keydown', this.handleKeydown);\n    }\n  }, {\n    key: 'componentWillUnmount',\n    value: function componentWillUnmount() {\n      document.removeEventListener('keydown', this.handleKeydown);\n    }\n  }, {\n    key: 'componentWillUpdate',\n    value: function componentWillUpdate(nextProps) {\n      if (nextProps.opt.checkpoint_name && nextProps.opt.checkpoint_name !== this.props.opt.checkpoint_name) {\n        console.log('listing epochs');\n        this.props.actions.live.list_epochs('pix2pixhd', nextProps.opt.checkpoint_name);\n      }\n    }\n  }, {\n    key: 'handleKeydown',\n    value: function handleKeydown(e) {\n      console.log(e.keyCode);\n      if (e.altKey || e.ctrlKey || e.metaKey) return;\n      switch (e.keyCode) {\n        case 27:\n          // esc\n          e.preventDefault();\n          this.props.actions.live.set_fullscreen(!this.props.fullscreen);\n          break;\n        default:\n          break;\n      }\n    }\n  }, {\n    key: 'changeCheckpoint',\n    value: function changeCheckpoint(field, checkpoint_name) {\n      this.props.actions.live.load_epoch(checkpoint_name, 'latest');\n    }\n  }, {\n    key: 'changeEpoch',\n    value: function changeEpoch(field, epoch_name) {\n      this.props.actions.live.load_epoch(this.props.opt.checkpoint_name, epoch_name);\n    }\n  }, {\n    key: 'changeSequence',\n    value: function changeSequence(field, sequence) {\n      console.log('load sequence', sequence);\n      this.props.actions.live.load_sequence(sequence);\n    }\n  }, {\n    key: 'seek',\n    value: function seek(percentage) {\n      var frame = Math.floor(percentage * (parseInt(this.props.frame.sequence_len) || 1) + 1);\n      console.log(\"seek to frame\", percentage, frame);\n      this.props.actions.live.seek(frame);\n    }\n  }, {\n    key: 'start',\n    value: function start() {\n      console.log(this.props.opt);\n      var sequence = this.props.opt.sequence_name || this.props.pix2pixhd.data.sequences[0].name;\n      var checkpoint = this.props.opt.checkpoint_name || this.props.pix2pixhd.data.checkpoints[0].name;\n      console.log('starting up!', sequence, checkpoint);\n      this.props.actions.tasks.live_task(sequence, checkpoint, {\n        folder_id: this.props.pix2pixhd.data.resultsFolder.id\n      });\n    }\n  }, {\n    key: 'interrupt',\n    value: function interrupt() {\n      this.props.actions.queue.stop_task('gpu');\n    }\n  }, {\n    key: 'togglePlaying',\n    value: function togglePlaying() {\n      if (this.props.opt.processing) {\n        this.props.actions.live.pause();\n      } else {\n        this.props.actions.live.play();\n      }\n    }\n  }, {\n    key: 'toggleRecording',\n    value: function toggleRecording() {\n      if (this.props.opt.recording) {\n        (0, _player.stopRecording)();\n        this.props.actions.live.pause();\n      } else {\n        (0, _player.startRecording)();\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      // console.log(this.props)\n      if (this.props.pix2pixhd.loading) {\n        return (0, _preact.h)(_common.Loading, { progress: this.props.pix2pixhd.progress });\n      }\n      var _props$pix2pixhd$data = this.props.pix2pixhd.data,\n          folderLookup = _props$pix2pixhd$data.folderLookup,\n          datasetLookup = _props$pix2pixhd$data.datasetLookup,\n          sequences = _props$pix2pixhd$data.sequences;\n\n\n      var sequenceLookup = sequences.reduce(function (a, b) {\n        a[b.name] = true;\n        return a;\n      }, {});\n\n      var sequenceGroups = Object.keys(folderLookup).map(function (id) {\n        var folder = _this2.props.pix2pixhd.data.folderLookup[id];\n        if (folder.name === 'results') return;\n        var datasets = folder.datasets.map(function (name) {\n          var sequence = sequenceLookup[name];\n          if (sequence) {\n            return name;\n          }\n          return null;\n        }).filter(function (n) {\n          return !!n;\n        });\n        return {\n          name: folder.name,\n          options: datasets.sort()\n        };\n      }).filter(function (n) {\n        return !!n && !!n.options.length;\n      }).sort(function (a, b) {\n        return a.name.localeCompare(b.name);\n      });\n\n      var checkpointGroups = Object.keys(folderLookup).map(function (id) {\n        var folder = _this2.props.pix2pixhd.data.folderLookup[id];\n        if (folder.name === 'results') return;\n        var datasets = folder.datasets.map(function (name) {\n          var dataset = datasetLookup[name];\n          if (dataset.checkpoints.length) {\n            return name;\n          }\n          return null;\n        }).filter(function (n) {\n          return !!n;\n        });\n        return {\n          name: folder.name,\n          options: datasets.sort()\n        };\n      }).filter(function (n) {\n        return !!n && !!n.options.length;\n      }).sort(function (a, b) {\n        return a.name.localeCompare(b.name);\n      });\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'app live centered' },\n        (0, _preact.h)(_common.Player, { width: 424, height: 256, fullscreen: this.props.fullscreen }),\n        (0, _preact.h)(\n          'div',\n          { className: 'params row' },\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Network',\n                noToggle: true\n              },\n              (0, _preact.h)(_common.Select, { live: true,\n                name: 'send_image',\n                title: 'view mode',\n                options: ['a', 'b', 'sequence', 'recursive'],\n                onChange: this.props.actions.live.set_param\n              }),\n              (0, _preact.h)(_common.SelectGroup, { live: true,\n                name: 'sequence_name',\n                title: 'sequence',\n                options: sequenceGroups,\n                onChange: this.changeSequence\n              }),\n              (0, _preact.h)(_common.SelectGroup, { live: true,\n                name: 'checkpoint_name',\n                title: 'checkpoint',\n                options: checkpointGroups,\n                onChange: this.changeCheckpoint\n              }),\n              (0, _preact.h)(_common.Select, { live: true,\n                name: 'epoch',\n                title: 'epoch',\n                options: this.props.epochs,\n                onChange: this.changeEpoch\n              })\n            ),\n            (0, _preact.h)(\n              'div',\n              null,\n              (0, _preact.h)(\n                _common.ParamGroup,\n                {\n                  title: 'Playback',\n                  name: 'sequence_playing'\n                },\n                (0, _preact.h)(_common.Slider, {\n                  name: 'position',\n                  min: 0.0, max: 1.0, type: 'float',\n                  value: (this.props.frame.sequence_i || 0) / (this.props.frame.sequence_len || 1),\n                  onChange: this.seek\n                }),\n                (0, _preact.h)(_common.Slider, { live: true,\n                  title: 'playback rate',\n                  name: 'sequence_step',\n                  min: -4.0, max: 4.0, type: 'float'\n                }),\n                (0, _preact.h)(_common.Slider, { live: true,\n                  title: 'skip frames',\n                  name: 'sequence_skip',\n                  min: 0, max: 1000, type: 'int'\n                }),\n                (0, _preact.h)(_common.Slider, { live: true,\n                  title: 'fade sequence',\n                  name: 'fade_sequence',\n                  min: 0, max: 4.0, type: 'float'\n                }),\n                (0, _preact.h)(_common.Slider, { live: true,\n                  name: 'frame_delay',\n                  min: 0.0, max: 2.0, type: 'float'\n                })\n              )\n            ),\n            (0, _preact.h)(\n              _common.Group,\n              null,\n              this.renderRestartButton(),\n              this.renderLiveButtons(),\n              this.renderRecordButton(),\n              (0, _preact.h)(\n                'p',\n                { 'class': 'last_message' },\n                this.props.last_message\n              )\n            )\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Transition',\n                name: 'transition'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'transition_period',\n                min: 10, max: 5000, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'transition_min',\n                min: 0.001, max: 0.2, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'transition_max',\n                min: 0.1, max: 1.0, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Recursion',\n                name: 'recursive'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'recursive_frac',\n                min: 0.0, max: 0.5, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'recurse_roll',\n                min: -64, max: 64, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'recurse_roll_axis',\n                min: 0, max: 1, type: 'int'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Sequence',\n                name: 'sequence'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'sequence_frac',\n                min: 0.0, max: 1.0, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'process_frac',\n                min: 0, max: 1, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Transform',\n                name: 'transform'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'rotate',\n                min: -1, max: 1, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'scale',\n                min: 0.9, max: 1.1, type: 'float'\n              })\n            )\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Clahe',\n                name: 'clahe'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'clip_limit',\n                min: 1.0, max: 4.0, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Posterize',\n                name: 'posterize'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'spatial_window',\n                min: 2, max: 128, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'color_window',\n                min: 2, max: 128, type: 'int'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Blur',\n                name: 'blur'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'blur_radius',\n                min: 3, max: 7, type: 'odd'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'blur_sigma',\n                min: 0, max: 2, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Canny Edge Detection',\n                name: 'canny'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'canny_lo',\n                min: 10, max: 200, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'canny_hi',\n                min: 10, max: 200, type: 'int'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Hue / Saturation',\n                name: 'hsl'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'hue',\n                min: -127, max: 127, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'saturation',\n                min: -255, max: 255, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'luminosity',\n                min: -255, max: 255, type: 'int'\n              })\n            )\n          )\n        )\n      );\n    }\n  }, {\n    key: 'renderRestartButton',\n    value: function renderRestartButton() {\n      var _this3 = this;\n\n      // console.log(this.props.runner.gpu)\n      if (this.props.runner.gpu.status === 'IDLE') {\n        return (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'GPU Idle',\n            onClick: function onClick() {\n              return _this3.start();\n            }\n          },\n          'Start'\n        );\n      }\n      if (this.props.runner.gpu.task.module !== 'pix2pixhd') {\n        return (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'GPU Busy',\n            onClick: function onClick() {\n              return _this3.interrupt();\n            }\n          },\n          'Interrupt'\n        );\n      }\n      if (!this.props.opt.processing) {\n        return (0, _preact.h)(\n          'div',\n          null,\n          (0, _preact.h)(\n            _common.Button,\n            {\n              title: 'Not processing',\n              onClick: this.togglePlaying\n            },\n            'Restart'\n          ),\n          (0, _preact.h)(\n            _common.Button,\n            {\n              title: 'GPU Busy',\n              onClick: function onClick() {\n                return _this3.interrupt();\n              }\n            },\n            'Interrupt'\n          )\n        );\n      }\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'Processing',\n            onClick: this.togglePlaying\n          },\n          'Stop'\n        ),\n        (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'GPU Busy',\n            onClick: function onClick() {\n              return _this3.interrupt();\n            }\n          },\n          'Interrupt'\n        )\n      );\n    }\n  }, {\n    key: 'renderRecordButton',\n    value: function renderRecordButton() {\n      return null;\n      // return (\n      //   <Button\n      //     title={\n      //       this.props.opt.savingVideo\n      //       ? 'Saving video...'\n      //       : this.props.opt.recording\n      //       ? 'Recording (' + timeInSeconds(this.props.opt.recordFrames/25) +')'\n      //       : 'Record video'\n      //     }\n      //     onClick={this.toggleRecording}\n      //   >\n      //     {this.props.opt.savingVideo ? 'Saving' : this.props.opt.recording ? 'Recording' : 'Record'}\n      //   </Button>\n      // )\n    }\n  }, {\n    key: 'renderLiveButtons',\n    value: function renderLiveButtons() {\n      var _this4 = this;\n\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'Save frame',\n            onClick: _player.saveFrame\n          },\n          'Save'\n        ),\n        (0, _preact.h)(\n          _common.ParamGroup,\n          {\n            title: 'Record video',\n            name: 'store_b',\n            noDim: true,\n            onToggle: function onToggle(value) {\n              // now storing frames on server...\n            }\n          },\n          (0, _preact.h)(_common.TextInput, {\n            title: 'Video name',\n            name: 'final_tag',\n            value: this.props.opt.final_tag,\n            onSave: function onSave(value) {\n              _this4.props.actions.live.set_param('final_tag', value);\n            }\n          })\n        )\n      );\n    }\n  }]);\n\n  return Pix2PixHDLive;\n}(_preact.Component);\n\nfunction timeInSeconds(n) {\n  return n.toFixed(1) + ' s.';\n}\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    last_message: state.live.last_message,\n    fullscreen: state.live.fullscreen,\n    opt: state.live.opt,\n    frame: state.live.frame,\n    checkpoints: state.live.checkpoints,\n    epochs: state.live.epochs,\n    sequences: state.live.sequences,\n    runner: state.system.runner,\n    pix2pixhd: state.module.pix2pixhd\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: {\n      live: (0, _redux.bindActionCreators)(liveActions, dispatch),\n      queue: (0, _redux.bindActionCreators)(queueActions, dispatch),\n      pix2pixhd: (0, _redux.bindActionCreators)(pix2pixhdActions, dispatch),\n      tasks: (0, _redux.bindActionCreators)(pix2pixhdTasks, dispatch), s: s\n    }\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2PixHDLive);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _common = require('../../../common');\n\nvar _pix2pixhd = require('../pix2pixhd.actions');\n\nvar pix2pixhdActions = _interopRequireWildcard(_pix2pixhd);\n\nvar _pix2pixhd2 = require('../pix2pixhd.module');\n\nvar _pix2pixhd3 = _interopRequireDefault(_pix2pixhd2);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction Pix2PixHDNew(props) {\n  return (0, _preact.h)(_common.Views.New, {\n    db: props.pix2pixhd,\n    path: '/pix2pixhd/sequences/',\n    actions: props.actions,\n    module: _pix2pixhd3.default,\n    history: props.history\n  });\n}\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    pix2pixhd: state.module.pix2pixhd\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(pix2pixhdActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2PixHDNew);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _actions = require('../../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _pix2pixhd = require('../pix2pixhd.actions');\n\nvar pix2pixhdActions = _interopRequireWildcard(_pix2pixhd);\n\nvar _pix2pixhd2 = require('../pix2pixhd.tasks');\n\nvar pix2pixhdTasks = _interopRequireWildcard(_pix2pixhd2);\n\nvar _loading = require('../../../common/loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nvar _fileList = require('../../../common/fileList.component');\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar yes_count = 0;\n\nvar Pix2pixHDResults = function (_Component) {\n  _inherits(Pix2pixHDResults, _Component);\n\n  function Pix2pixHDResults(props) {\n    _classCallCheck(this, Pix2pixHDResults);\n\n    var _this = _possibleConstructorReturn(this, (Pix2pixHDResults.__proto__ || Object.getPrototypeOf(Pix2pixHDResults)).call(this));\n\n    if (!props.pix2pixhd.results) props.actions.load_results();\n    return _this;\n  }\n\n  _createClass(Pix2pixHDResults, [{\n    key: 'componentDidMount',\n    value: function componentDidMount() {\n      yes_count = 0;\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      if (!this.props.pix2pixhd.results) return (0, _preact.h)(_loading2.default, { progress: this.props.pix2pixhd.progress });\n\n      var _props$pix2pixhd$resu = this.props.pix2pixhd.results,\n          resultsFolder = _props$pix2pixhd$resu.resultsFolder,\n          results = _props$pix2pixhd$resu.results,\n          renders = _props$pix2pixhd$resu.renders,\n          files = _props$pix2pixhd$resu.files;\n      // console.log(resultsFolder, results)\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'app pix2pixhd' },\n        (0, _preact.h)(\n          'div',\n          { className: 'heading row middle' },\n          (0, _preact.h)(\n            'h1',\n            null,\n            'Pix2PixHD Results'\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { 'class': 'rows params renders' },\n          (0, _preact.h)(_fileList.FileList, {\n            linkFiles: true,\n            files: files,\n            orderBy: 'date desc',\n            fields: 'name date size delete',\n            onDelete: function onDelete(file) {\n              var yes = void 0;\n              if (yes_count < 3) {\n                yes = confirm('Are you sure you want to delete this file?');\n              } else {\n                yes = true;\n              }\n              if (yes) {\n                yes_count += 1;\n                console.log('delete: confirmed');\n                _actions2.default.file.destroy(file);\n              }\n            }\n          }),\n          (0, _preact.h)('br', null),\n          (0, _preact.h)(\n            'h3',\n            null,\n            'renders on server'\n          ),\n          (0, _preact.h)(_fileList.FileList, {\n            files: renders,\n            orderBy: 'date desc',\n            fields: 'name date size',\n            onClick: function onClick(file, e) {\n              e.preventDefault();\n              e.stopPropagation();\n              console.log('picked a result', file);\n              _this2.handlePick(file);\n            }\n          }),\n          (0, _preact.h)('br', null),\n          (0, _preact.h)(\n            'h3',\n            null,\n            'folders on server'\n          ),\n          (0, _preact.h)(_fileList.FileList, {\n            files: results,\n            orderBy: 'date desc',\n            fields: 'name date count',\n            onClick: function onClick(file, e) {\n              e.preventDefault();\n              e.stopPropagation();\n              console.log('picked a result', file);\n              _this2.handlePick(file);\n            }\n          })\n        )\n      );\n    }\n  }, {\n    key: 'handlePick',\n    value: function handlePick(file) {\n      // this.props.audioPlayer.play(file)\n    }\n  }]);\n\n  return Pix2pixHDResults;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    pix2pixhd: state.module.pix2pixhd\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(pix2pixhdActions, dispatch),\n    remote: (0, _redux.bindActionCreators)(pix2pixhdTasks, dispatch)\n    // audioPlayer: bindActionCreators(audioPlayerActions, dispatch),\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2pixHDResults);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2pixhd = require('../pix2pixhd.actions');\n\nvar pix2pixhdActions = _interopRequireWildcard(_pix2pixhd);\n\nvar _pix2pixhd2 = require('../pix2pixhd.tasks');\n\nvar pix2pixhdTasks = _interopRequireWildcard(_pix2pixhd2);\n\nvar _common = require('../../../common');\n\nvar _dataset = require('../../../dataset/dataset.form');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nvar _dataset3 = require('../../../dataset/dataset.new');\n\nvar _dataset4 = _interopRequireDefault(_dataset3);\n\nvar _upload = require('../../../dataset/upload.status');\n\nvar _upload2 = _interopRequireDefault(_upload);\n\nvar _dataset5 = require('../../../dataset/dataset.component');\n\nvar _dataset6 = _interopRequireDefault(_dataset5);\n\nvar _pix2pixhd3 = require('../pix2pixhd.module');\n\nvar _pix2pixhd4 = _interopRequireDefault(_pix2pixhd3);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Pix2PixHDShow = function (_Component) {\n  _inherits(Pix2PixHDShow, _Component);\n\n  function Pix2PixHDShow(props) {\n    _classCallCheck(this, Pix2PixHDShow);\n\n    var _this = _possibleConstructorReturn(this, (Pix2PixHDShow.__proto__ || Object.getPrototypeOf(Pix2PixHDShow)).call(this, props));\n\n    _this.datasetActions = _this.datasetActions.bind(_this);\n    return _this;\n  }\n\n  _createClass(Pix2PixHDShow, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      var id = this.props.match.params.id || localStorage.getItem('pix2pixhd.last_id');\n      console.log('load dataset:', id);\n      var _props = this.props,\n          match = _props.match,\n          pix2pixhd = _props.pix2pixhd,\n          actions = _props.actions;\n\n      if (id === 'new') return;\n      if (id) {\n        if (parseInt(id)) localStorage.setItem('pix2pixhd.last_id', id);\n        if (!pix2pixhd.folder || pix2pixhd.folder.id !== id) {\n          actions.load_directories(id);\n        }\n      } else {\n        this.props.history.push('/pix2pixhd/new/');\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props2 = this.props,\n          pix2pixhd = _props2.pix2pixhd,\n          match = _props2.match,\n          history = _props2.history;\n\n      var _ref = pix2pixhd.data || {},\n          folderLookup = _ref.folderLookup;\n\n      var folder = (folderLookup || {})[pix2pixhd.folder_id] || {};\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'app pix2pixhd' },\n        (0, _preact.h)(\n          'div',\n          { 'class': 'heading' },\n          (0, _preact.h)(\n            'div',\n            { 'class': 'spaced' },\n            (0, _preact.h)(\n              'h1',\n              null,\n              folder ? folder.name : (0, _preact.h)(_common.Loading, null)\n            ),\n            (0, _preact.h)(_upload2.default, null)\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { className: 'row' },\n          folder && folder.name && folder.name !== 'unsorted' && (0, _preact.h)(_dataset2.default, {\n            title: 'Add Files',\n            module: _pix2pixhd4.default,\n            folder: folder,\n            canUpload: true, canAddURL: true\n          }),\n          (0, _preact.h)(\n            'div',\n            null,\n            (0, _preact.h)(_upload2.default, null),\n            (0, _preact.h)(_common.CurrentTask, null)\n          )\n        ),\n        (0, _preact.h)(_dataset6.default, {\n          loading: pix2pixhd.loading,\n          progress: pix2pixhd.progress,\n          id: pix2pixhd.folder_id,\n          module: _pix2pixhd4.default,\n          data: pix2pixhd.data,\n          folder: folder,\n          history: history,\n          onPickFile: function onPickFile(file, e) {\n            e.preventDefault();\n            e.stopPropagation();\n            console.log('picked a file', file);\n          },\n          datasetActions: this.datasetActions\n        })\n      );\n    }\n  }, {\n    key: 'datasetActions',\n    value: function datasetActions(dataset) {\n      var isFetching = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      var isProcessing = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n      var _props3 = this.props,\n          pix2pixhd = _props3.pix2pixhd,\n          remote = _props3.remote;\n\n      var input = pix2pixhd.data.fileLookup[dataset.input[0]];\n      if (!input) return null;\n      if (input.name && input.name.match(/(gif|jpe?g|png)$/i)) return null;\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)(\n          'div',\n          { 'class': 'actions' },\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pixhd.folder_id, 1);\n              } },\n            'train'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pixhd.folder_id, 5);\n              } },\n            '5x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pixhd.folder_id, 10);\n              } },\n            '10x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pixhd.folder_id, 20);\n              } },\n            '20x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pixhd.folder_id, 50);\n              } },\n            '50x'\n          )\n        ),\n        dataset.isBuilt ? (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          'fetched ',\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.clear_cache_task(dataset);\n              } },\n            'rm'\n          )\n        ) : isFetching ? (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          'fetching'\n        ) : (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.fetch_task(input.url, input.id, dataset.name);\n              } },\n            'fetch'\n          )\n        )\n      );\n    }\n  }]);\n\n  return Pix2PixHDShow;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    pix2pixhd: state.module.pix2pixhd\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(pix2pixhdActions, dispatch),\n    remote: (0, _redux.bindActionCreators)(pix2pixhdTasks, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2PixHDShow);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2pixhd = require('../pix2pixhd.actions');\n\nvar pix2pixhdActions = _interopRequireWildcard(_pix2pixhd);\n\nvar _pix2pixhd2 = require('../pix2pixhd.tasks');\n\nvar pix2pixhdTasks = _interopRequireWildcard(_pix2pixhd2);\n\nvar _common = require('../../../common');\n\nvar _dataset = require('../../../dataset/dataset.form');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nvar _dataset3 = require('../../../dataset/dataset.new');\n\nvar _dataset4 = _interopRequireDefault(_dataset3);\n\nvar _upload = require('../../../dataset/upload.status');\n\nvar _upload2 = _interopRequireDefault(_upload);\n\nvar _dataset5 = require('../../../dataset/dataset.component');\n\nvar _dataset6 = _interopRequireDefault(_dataset5);\n\nvar _pix2pixhd3 = require('../pix2pixhd.module');\n\nvar _pix2pixhd4 = _interopRequireDefault(_pix2pixhd3);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Pix2PixHDTrain = function (_Component) {\n  _inherits(Pix2PixHDTrain, _Component);\n\n  function Pix2PixHDTrain(props) {\n    _classCallCheck(this, Pix2PixHDTrain);\n\n    var _this = _possibleConstructorReturn(this, (Pix2PixHDTrain.__proto__ || Object.getPrototypeOf(Pix2PixHDTrain)).call(this, props));\n\n    _this.handleChange = _this.handleChange.bind(_this);\n    _this.state = {\n      checkpoint_name: 'PLACEHOLDER',\n      epoch: 'latest',\n      augment_name: '',\n      augment_take: 100,\n      augment_make: 20\n    };\n    return _this;\n  }\n\n  _createClass(Pix2PixHDTrain, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      var id = this.props.match.params.id || localStorage.getItem('pix2pixhd.last_id');\n      console.log('load dataset:', id);\n      var _props = this.props,\n          match = _props.match,\n          pix2pixhd = _props.pix2pixhd,\n          actions = _props.actions;\n\n      if (id === 'new') return;\n      if (id) {\n        if (parseInt(id)) localStorage.setItem('pix2pixhd.last_id', id);\n        if (!pix2pixhd.folder || pix2pixhd.folder.id !== id) {\n          actions.load_directories(id);\n        }\n      } else {\n        this.props.history.push('/pix2pixhd/new/');\n      }\n    }\n  }, {\n    key: 'componentDidUpdate',\n    value: function componentDidUpdate(prevProps, prevState) {\n      if (prevState.checkpoint_name !== this.state.checkpoint_name) {\n        this.setState({ epoch: 'latest' });\n        this.props.actions.list_epochs(this.state.checkpoint_name);\n        this.props.actions.count_dataset(this.state.checkpoint_name);\n      }\n    }\n  }, {\n    key: 'handleChange',\n    value: function handleChange(name, value) {\n      console.log('name', name, 'value', value);\n      this.setState(_defineProperty({}, name, value));\n    }\n  }, {\n    key: 'interrupt',\n    value: function interrupt() {\n      this.props.actions.queue.stop_task('gpu');\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      if (this.props.pix2pixhd.loading) {\n        return (0, _preact.h)(_common.Loading, { progress: this.props.pix2pixhd.progress });\n      }\n      var _props2 = this.props,\n          pix2pixhd = _props2.pix2pixhd,\n          match = _props2.match,\n          history = _props2.history,\n          queue = _props2.queue;\n\n      var _ref = pix2pixhd.data || {},\n          folderLookup = _ref.folderLookup,\n          datasetLookup = _ref.datasetLookup;\n\n      var folder = (folderLookup || {})[pix2pixhd.folder_id] || {};\n      // console.log(pix2pixhd)\n\n      var checkpointGroups = Object.keys(folderLookup).map(function (id) {\n        var folder = _this2.props.pix2pixhd.data.folderLookup[id];\n        if (folder.name === 'results') return;\n        var datasets = folder.datasets.map(function (name) {\n          var dataset = datasetLookup[name];\n          if (dataset.checkpoints.length) {\n            return name;\n          }\n          return null;\n        }).filter(function (n) {\n          return !!n;\n        });\n        return {\n          name: folder.name,\n          options: datasets.sort()\n        };\n      }).filter(function (n) {\n        return !!n && !!n.options.length;\n      }).sort(function (a, b) {\n        return a.name.localeCompare(b.name);\n      });\n\n      // console.log('state', this.props.pix2pixhd.data.epochs)\n      // console.log(this.state.checkpoint_name, this.state.epoch)\n      // console.log(queue)\n      return (0, _preact.h)(\n        'div',\n        { className: 'app pix2pixhd' },\n        (0, _preact.h)(\n          'div',\n          { className: 'heading' },\n          (0, _preact.h)(\n            'h1',\n            null,\n            'pix2pixhd training'\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { className: 'columns' },\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.Group,\n              { title: 'Dataset' },\n              (0, _preact.h)(_common.SelectGroup, {\n                name: 'checkpoint_name',\n                title: 'Dataset',\n                options: checkpointGroups,\n                onChange: this.handleChange,\n                placeholder: 'Pick a dataset',\n                value: this.state.checkpoint_name\n              }),\n              (0, _preact.h)(_common.Select, {\n                title: 'Epoch',\n                name: 'epoch',\n                options: this.props.pix2pixhd.data.epochs,\n                onChange: this.handleChange,\n                value: this.state.epoch\n              })\n            ),\n            (0, _preact.h)(\n              _common.Group,\n              { title: 'Augment' },\n              (0, _preact.h)(_common.NumberInput, {\n                name: 'augment_take',\n                title: 'Pick N random frames',\n                value: this.state.augment_take,\n                onChange: this.handleChange,\n                type: 'int',\n                min: '1',\n                max: '1000'\n              }),\n              (0, _preact.h)(_common.NumberInput, {\n                name: 'augment_make',\n                title: 'Generate N recursively',\n                value: this.state.augment_make,\n                onChange: this.handleChange,\n                type: 'int',\n                min: '1',\n                max: '1000'\n              }),\n              (0, _preact.h)(_common.Button, {\n                title: 'Augment dataset',\n                value: 'Augment',\n                onClick: function onClick() {\n                  return _this2.props.remote.augment_task(_this2.state.checkpoint_name, _this2.state);\n                }\n              }),\n              (0, _preact.h)(_common.Button, {\n                title: 'Make a movie without augmenting',\n                value: 'Generate',\n                onClick: function onClick() {\n                  _this2.props.remote.augment_task(_this2.state.checkpoint_name, _extends({}, _this2.state, {\n                    no_symlinks: true,\n                    mov: true,\n                    folder_id: _this2.props.pix2pixhd.data.resultsFolder.id\n                  }));\n                }\n              })\n            ),\n            (0, _preact.h)(\n              _common.Group,\n              { title: 'Augmentation Grid' },\n              (0, _preact.h)(_common.AugmentationGrid, {\n                checkpoint: this.props.pix2pixhd.checkpoint,\n                take: [1, 2, 3, 4, 5, 10, 15, 20, 25, 50, 75, 100, 200, 300, 400, 500, 1000],\n                make: [1, 2, 3, 4, 5, 10, 15, 20, 25, 50, 75, 100, 200],\n                onAugment: function onAugment(augment_take, augment_make) {\n                  _this2.props.remote.augment_task(_this2.state.checkpoint_name, _extends({}, _this2.state, {\n                    augment_take: augment_take,\n                    augment_make: augment_make\n                  }));\n                },\n                onTrain: function onTrain() {\n                  _this2.props.remote.train_task(_this2.state.checkpoint_name, pix2pixhd.folder_id, 1);\n                  setTimeout(function () {\n                    // auto-generate epoch demo\n                    _this2.props.remote.augment_task(_this2.state.checkpoint_name, _extends({}, _this2.state, {\n                      augment_take: 10,\n                      augment_make: 150,\n                      no_symlinks: true,\n                      mov: true,\n                      folder_id: _this2.props.pix2pixhd.data.resultsFolder.id\n                    }));\n                  }, 250);\n                }\n              })\n            ),\n            (0, _preact.h)(\n              _common.Group,\n              { title: 'Status' },\n              (0, _preact.h)(_common.Button, {\n                title: 'GPU',\n                value: this.props.runner.gpu.status === 'IDLE' ? \"Idle\" : \"Interrupt\",\n                onClick: function onClick() {\n                  return _this2.interrupt();\n                }\n              }),\n              (0, _preact.h)(_common.CurrentTask, null)\n            )\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.Group,\n              { title: 'Upcoming Tasks' },\n              (0, _preact.h)(_common.TaskList, { tasks: queue.queue.map(function (id) {\n                  return queue.tasks[id];\n                }), sort: 'date asc' })\n            )\n          )\n        )\n      );\n    }\n  }]);\n\n  return Pix2PixHDTrain;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    pix2pixhd: state.module.pix2pixhd,\n    runner: state.system.runner,\n    queue: state.queue\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(pix2pixhdActions, dispatch),\n    remote: (0, _redux.bindActionCreators)(pix2pixhdTasks, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2PixHDTrain);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2wav = require('./views/pix2wav.new');\n\nvar _pix2wav2 = _interopRequireDefault(_pix2wav);\n\nvar _pix2wav3 = require('./views/pix2wav.show');\n\nvar _pix2wav4 = _interopRequireDefault(_pix2wav3);\n\nvar _pix2wav5 = require('./views/pix2wav.live');\n\nvar _pix2wav6 = _interopRequireDefault(_pix2wav5);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar router = function () {\n  function router() {\n    _classCallCheck(this, router);\n  }\n\n  _createClass(router, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      _actions2.default.system.changeTool('pix2wav');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #bdf, #def)';\n    }\n  }, {\n    key: 'componentWillReceiveProps',\n    value: function componentWillReceiveProps() {\n      _actions2.default.system.changeTool('pix2wav');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #bdf, #def)';\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'section',\n        null,\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2wav/new/', component: _pix2wav2.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2wav/datasets/', component: _pix2wav4.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2wav/datasets/:id/', component: _pix2wav4.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2wav/live/', component: _pix2wav6.default })\n      );\n    }\n  }]);\n\n  return router;\n}();\n\nfunction links() {\n  return [{ url: '/pix2wav/new/', name: 'new' }, { url: '/pix2wav/datasets/', name: 'datasets' }, { url: '/pix2wav/live/', name: 'live' }];\n}\n\nexports.default = {\n  name: 'pix2wav',\n  router: router, links: links\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.load_directories = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.loader');\n\nvar datasetLoader = _interopRequireWildcard(_dataset);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2wav = require('./pix2wav.module');\n\nvar _pix2wav2 = _interopRequireDefault(_pix2wav);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar load_directories = exports.load_directories = function load_directories(id) {\n  return function (dispatch) {\n    var module = _pix2wav2.default.name;\n    _util2.default.allProgress([datasetLoader.load(module), _actions2.default.socket.list_directory({ module: 'pix2pix', dir: 'sequences/pix2wav/' }), _actions2.default.socket.list_directory({ module: 'pix2pix', dir: 'datasets/pix2wav/' }), _actions2.default.socket.list_directory({ module: 'pix2pix', dir: 'checkpoints/pix2wav/' }), _actions2.default.socket.list_directory({ module: 'pix2pix', dir: 'checkpoints/pix2pix/' })], function (percent, i, n) {\n      console.log('progress', i, n);\n      dispatch({ type: _types2.default.app.load_progress, progress: { i: i, n: n } });\n    }).then(function (res) {\n      var _res = _slicedToArray(res, 5),\n          datasetApiReport = _res[0],\n          sequences = _res[1],\n          datasets = _res[2],\n          checkpoints = _res[3],\n          pix2pixCheckpoints = _res[4];\n\n      var folderLookup = datasetApiReport.folderLookup,\n          fileLookup = datasetApiReport.fileLookup,\n          datasetLookup = datasetApiReport.datasetLookup,\n          folders = datasetApiReport.folders,\n          files = datasetApiReport.files,\n          unsortedFolder = datasetApiReport.unsortedFolder;\n\n\n      var sequenceDirectories = sequences.filter(function (s) {\n        return s.dir;\n      });\n      sequenceDirectories.forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.isBuilt = true;\n      });\n\n      datasets.filter(function (s) {\n        return s.dir;\n      }).forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.hasDataset = true;\n      });\n\n      var checkpointDirectories = checkpoints.filter(function (s) {\n        return s.dir;\n      });\n      checkpointDirectories.forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.hasCheckpoints = true;\n        dir.module = 'pix2wav';\n      });\n\n      var pix2pixCheckpointDirectories = pix2pixCheckpoints.filter(function (s) {\n        return s.dir;\n      });\n      pix2pixCheckpointDirectories.forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.hasCheckpoints = true;\n        dir.module = 'pix2pix';\n      });\n\n      console.log(res);\n      console.log(checkpointDirectories);\n      console.log(pix2pixCheckpointDirectories);\n\n      dispatch({\n        type: _types2.default.dataset.load,\n        data: {\n          module: module,\n          folderLookup: folderLookup,\n          fileLookup: fileLookup,\n          datasetLookup: datasetLookup,\n          folders: folders, files: files,\n          sequences: sequenceDirectories,\n          datasets: datasets,\n          checkpoints: checkpointDirectories.concat(pix2pixCheckpointDirectories)\n        }\n      });\n    }).catch(function (e) {\n      console.error(e);\n    });\n    if (id) {\n      console.log('folder id', id);\n      dispatch({\n        type: _types2.default.dataset.set_folder,\n        data: {\n          folder_id: id,\n          module: module\n        }\n      });\n    }\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nvar pix2wavModule = {\n  name: 'pix2wav',\n  displayName: 'Pix2Wav',\n  datatype: 'spectrogram'\n};\n\nexports.default = pix2wavModule;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.reducer');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar pix2wavInitialState = {\n  loading: true,\n  progress: { i: 0, n: 0 },\n  status: '',\n  error: null,\n  folder_id: 0,\n  data: null\n};\n\nvar pix2wavReducer = function pix2wavReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : pix2wavInitialState;\n  var action = arguments[1];\n\n  if (action.data && action.data.module === 'pix2wav') {\n    state = (0, _dataset2.default)(state, action);\n  }\n\n  switch (action.type) {\n    case _types2.default.wav2pix.load:\n      return _extends({}, state, {\n        status: 'Loaded buffer'\n      });\n    case _types2.default.wav2pix.progress:\n      return _extends({}, state, {\n        status: 'Rendering frame ' + action.count\n      });\n    case _types2.default.wav2pix.finish:\n      return _extends({}, state, {\n        status: action.message || 'Render complete'\n      });\n    case _types2.default.wav2pix.zip:\n      return _extends({}, state, {\n        status: 'Built zip file ' + _util2.default.hush_size(state.size)[1]\n      });\n    case _types2.default.wav2pix.uploading:\n      return _extends({}, state, {\n        status: 'Uploading zip file'\n      });\n    default:\n      return state;\n  }\n};\n\nexports.default = pix2wavReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.live_task = undefined;\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar live_task = exports.live_task = function live_task(sequence, checkpoint) {\n  return function (dispatch) {\n    var task = {\n      module: 'pix2wav',\n      activity: 'live',\n      dataset: sequence,\n      checkpoint: checkpoint,\n      opt: {\n        poll_delay: 0.2\n      }\n    };\n    console.log(task);\n    console.log('add live task');\n    return _actions2.default.queue.add_task(task);\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _common = require('../../../common/');\n\nvar _player = require('../../../live/player');\n\nvar playerActions = _interopRequireWildcard(_player);\n\nvar _live = require('../../../live/live.actions');\n\nvar liveActions = _interopRequireWildcard(_live);\n\nvar _queue = require('../../../queue/queue.actions');\n\nvar queueActions = _interopRequireWildcard(_queue);\n\nvar _pix2wav = require('../pix2wav.tasks');\n\nvar pix2wavTasks = _interopRequireWildcard(_pix2wav);\n\nvar _pix2wav2 = require('../pix2wav.actions');\n\nvar pix2wavActions = _interopRequireWildcard(_pix2wav2);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Pix2WavLive = function (_Component) {\n  _inherits(Pix2WavLive, _Component);\n\n  function Pix2WavLive(props) {\n    _classCallCheck(this, Pix2WavLive);\n\n    var _this = _possibleConstructorReturn(this, (Pix2WavLive.__proto__ || Object.getPrototypeOf(Pix2WavLive)).call(this));\n\n    props.actions.pix2wav.load_directories();\n    props.actions.live.get_params();\n    _this.changeCheckpoint = _this.changeCheckpoint.bind(_this);\n    _this.changeEpoch = _this.changeEpoch.bind(_this);\n    _this.changeSequence = _this.changeSequence.bind(_this);\n    _this.seek = _this.seek.bind(_this);\n    _this.togglePlaying = _this.togglePlaying.bind(_this);\n    _this.toggleRecording = _this.toggleRecording.bind(_this);\n    return _this;\n  }\n\n  _createClass(Pix2WavLive, [{\n    key: 'componentWillUpdate',\n    value: function componentWillUpdate(nextProps) {\n      if (nextProps.opt.checkpoint_name && nextProps.opt.checkpoint_name !== this.props.opt.checkpoint_name) {\n        console.log('fetch checkpoint', nextProps.opt.checkpoint_name);\n        this.props.actions.live.list_epochs('pix2wav', nextProps.opt.checkpoint_name);\n      }\n    }\n  }, {\n    key: 'changeCheckpoint',\n    value: function changeCheckpoint(field, checkpoint_name) {\n      this.props.actions.live.load_epoch(checkpoint_name, 'latest');\n    }\n  }, {\n    key: 'changeEpoch',\n    value: function changeEpoch(field, epoch_name) {\n      this.props.actions.live.load_epoch(this.props.opt.checkpoint_name, epoch_name);\n    }\n  }, {\n    key: 'changeSequence',\n    value: function changeSequence(field, sequence) {\n      console.log('got sequence', sequence);\n      this.props.actions.live.load_sequence(sequence);\n    }\n  }, {\n    key: 'seek',\n    value: function seek(percentage) {\n      var frame = Math.floor(percentage * (parseInt(this.props.frame.sequence_len) || 1) + 1);\n      this.props.actions.live.seek(frame);\n    }\n  }, {\n    key: 'start',\n    value: function start() {\n      // console.log(this.props)\n      console.log(this.props.pix2wav.data);\n      var sequence = this.props.pix2wav.data.sequences[0].name || '';\n      var checkpoint = this.props.pix2wav.data.checkpoints[0].name || '';\n      console.log('starting up!', sequence, checkpoint);\n      this.props.actions.tasks.live_task(sequence, checkpoint);\n    }\n  }, {\n    key: 'interrupt',\n    value: function interrupt() {\n      this.props.actions.queue.stop_task('gpu');\n    }\n  }, {\n    key: 'exit',\n    value: function exit() {\n      this.props.actions.queue.stop_task('gpu', { sigkill: true });\n    }\n  }, {\n    key: 'togglePlaying',\n    value: function togglePlaying() {\n      if (this.props.opt.processing) {\n        this.props.actions.live.pause();\n      } else {\n        this.props.actions.live.play();\n      }\n    }\n  }, {\n    key: 'toggleRecording',\n    value: function toggleRecording() {\n      if (this.props.opt.recording) {\n        (0, _player.stopRecording)();\n        this.props.actions.live.pause();\n      } else {\n        (0, _player.startRecording)();\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      // console.log(this.props)\n      if (this.props.pix2wav.loading) {\n        return (0, _preact.h)(_common.Loading, null);\n      }\n      // console.log('sequence', this.props.opt)\n      return (0, _preact.h)(\n        'div',\n        { className: 'app pix2wav centered' },\n        (0, _preact.h)(\n          'div',\n          { className: 'row' },\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(_common.Player, { width: 256, height: 256 })\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'params column audioParams' },\n            (0, _preact.h)(\n              _common.Group,\n              { title: 'Audio playback' },\n              (0, _preact.h)(\n                _common.Button,\n                { title: 'Start playback',\n                  onClick: function onClick() {\n                    return playerActions.startSynthesizing();\n                  }\n                },\n                'Start'\n              ),\n              (0, _preact.h)(\n                _common.Button,\n                { title: 'Stop playback',\n                  onClick: function onClick() {\n                    return playerActions.stopSynthesizing();\n                  }\n                },\n                'Stop'\n              )\n            )\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { className: 'params row' },\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Playback',\n                noToggle: true\n              },\n              (0, _preact.h)(_common.Select, {\n                name: 'send_image',\n                title: 'view mode',\n                options: ['a', 'b', 'sequence', 'recursive'],\n                onChange: this.props.actions.live.set_param\n              }),\n              (0, _preact.h)(_common.Select, {\n                name: 'sequence_name',\n                title: 'sequence',\n                options: this.props.pix2wav.data.sequences,\n                onChange: this.changeSequence\n              }),\n              (0, _preact.h)(_common.Select, {\n                name: 'output_format',\n                title: 'format',\n                options: ['JPEG', 'PNG']\n              }),\n              (0, _preact.h)(_common.Select, {\n                name: 'checkpoint_name',\n                title: 'checkpoint',\n                options: this.props.pix2wav.data.checkpoints,\n                onChange: this.changeCheckpoint\n              }),\n              (0, _preact.h)(_common.Select, {\n                name: 'epoch',\n                title: 'epoch',\n                options: this.props.epochs,\n                onChange: this.changeEpoch\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'position',\n                min: 0.0, max: 1.0, type: 'float',\n                value: (this.props.frame.sequence_i || 0) / (this.props.frame.sequence_len || 1),\n                onChange: this.seek\n              }),\n              this.renderRestartButton(),\n              (0, _preact.h)(\n                _common.Button,\n                {\n                  title: this.props.opt.savingVideo ? 'Saving video...' : this.props.opt.recording ? 'Recording (' + timeInSeconds(this.props.opt.recordFrames) + ')' : 'Record video',\n                  onClick: this.toggleRecording\n                },\n                this.props.opt.savingVideo ? 'Saving' : this.props.opt.recording ? 'Recording' : 'Record'\n              ),\n              (0, _preact.h)(\n                _common.Button,\n                {\n                  title: 'Save frame',\n                  onClick: _player.saveFrame\n                },\n                'Save'\n              ),\n              (0, _preact.h)(\n                'p',\n                { 'class': 'last_message' },\n                this.props.last_message\n              )\n            )\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Transition',\n                name: 'transition'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'transition_period',\n                min: 10, max: 5000, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'transition_min',\n                min: 0.001, max: 0.2, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'transition_max',\n                min: 0.1, max: 1.0, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Recursion',\n                name: 'recursive'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'recursive_frac',\n                min: 0.0, max: 0.5, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'recurse_roll',\n                min: -64, max: 64, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'recurse_roll_axis',\n                min: 0, max: 1, type: 'int'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Sequence',\n                name: 'sequence'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'sequence_frac',\n                min: 0.0, max: 1, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'process_frac',\n                min: 0, max: 1, type: 'float'\n              })\n            )\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Clahe',\n                name: 'clahe'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'clip_limit',\n                min: 1.0, max: 4.0, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Posterize',\n                name: 'posterize'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'spatial_window',\n                min: 2, max: 128, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'color_window',\n                min: 2, max: 128, type: 'int'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Blur',\n                name: 'blur'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'blur_radius',\n                min: 3, max: 7, type: 'odd'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'blur_sigma',\n                min: 0, max: 2, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Canny Edge Detection',\n                name: 'canny'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'canny_lo',\n                min: 10, max: 200, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'canny_hi',\n                min: 10, max: 200, type: 'int'\n              })\n            )\n          )\n        )\n      );\n    }\n  }, {\n    key: 'renderRestartButton',\n    value: function renderRestartButton() {\n      var _this2 = this;\n\n      if (this.props.runner.gpu.status === 'IDLE') {\n        return (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'GPU Idle',\n            onClick: function onClick() {\n              return _this2.start();\n            }\n          },\n          'Start'\n        );\n      }\n      if (this.props.runner.gpu.task.module !== 'pix2pix' && this.props.runner.gpu.task.module !== 'pix2wav') {\n        return (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'GPU Busy',\n            onClick: function onClick() {\n              return _this2.interrupt();\n            }\n          },\n          'Interrupt'\n        );\n      }\n      if (!this.props.opt.processing) {\n        return (0, _preact.h)(\n          'div',\n          null,\n          (0, _preact.h)(\n            _common.Button,\n            {\n              title: 'Not processing',\n              onClick: this.togglePlaying\n            },\n            'Restart'\n          ),\n          (0, _preact.h)(\n            _common.Button,\n            {\n              title: 'GPU Busy',\n              onClick: function onClick() {\n                return _this2.interrupt();\n              }\n            },\n            'Interrupt'\n          ),\n          (0, _preact.h)(\n            _common.Button,\n            {\n              title: 'Last resort',\n              onClick: function onClick() {\n                return _this2.exit();\n              }\n            },\n            'Exit'\n          )\n        );\n      }\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'Processing',\n            onClick: this.togglePlaying\n          },\n          'Pause'\n        ),\n        (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'GPU Busy',\n            onClick: function onClick() {\n              return _this2.interrupt();\n            }\n          },\n          'Interrupt'\n        ),\n        (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'Last resort',\n            onClick: function onClick() {\n              return _this2.exit();\n            }\n          },\n          'Exit'\n        )\n      );\n    }\n  }]);\n\n  return Pix2WavLive;\n}(_preact.Component);\n\nfunction timeInSeconds(n) {\n  return (n / 10).toFixed(1) + ' s.';\n}\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    last_message: state.live.last_message,\n    opt: state.live.opt,\n    frame: state.live.frame,\n    checkpoints: state.live.checkpoints,\n    epochs: state.live.epochs,\n    sequences: state.live.sequences,\n    runner: state.system.runner,\n    pix2wav: state.module.pix2wav\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: {\n      live: (0, _redux.bindActionCreators)(liveActions, dispatch),\n      queue: (0, _redux.bindActionCreators)(queueActions, dispatch),\n      pix2wav: (0, _redux.bindActionCreators)(pix2wavActions, dispatch),\n      tasks: (0, _redux.bindActionCreators)(pix2wavTasks, dispatch), s: s\n    }\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2WavLive);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = Pix2WavNew;\n\nvar _preact = require('preact');\n\nvar _dataset = require('../../../dataset/dataset.new');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nvar _pix2wav = require('../pix2wav.module');\n\nvar _pix2wav2 = _interopRequireDefault(_pix2wav);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction Pix2WavNew(_ref) {\n  var history = _ref.history;\n\n  return (0, _preact.h)(\n    'div',\n    { 'class': 'app pix2wav' },\n    (0, _preact.h)(_dataset2.default, { module: _pix2wav2.default, history: history })\n  );\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2wav = require('../pix2wav.actions');\n\nvar pix2wavActions = _interopRequireWildcard(_pix2wav);\n\nvar _pix2wav2 = require('../pix2wav.tasks');\n\nvar pix2wavTasks = _interopRequireWildcard(_pix2wav2);\n\nvar _loading = require('../../../common/loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nvar _dataset = require('../../../dataset/dataset.form');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nvar _dataset3 = require('../../../dataset/dataset.new');\n\nvar _dataset4 = _interopRequireDefault(_dataset3);\n\nvar _upload = require('../../../dataset/upload.status');\n\nvar _upload2 = _interopRequireDefault(_upload);\n\nvar _fileList = require('../../../common/fileList.component');\n\nvar _spectrogram = require('./spectrogram.upload');\n\nvar _spectrogram2 = _interopRequireDefault(_spectrogram);\n\nvar _dataset5 = require('../../../dataset/dataset.component');\n\nvar _dataset6 = _interopRequireDefault(_dataset5);\n\nvar _pix2wav3 = require('../pix2wav.module');\n\nvar _pix2wav4 = _interopRequireDefault(_pix2wav3);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Pix2wavShow = function (_Component) {\n  _inherits(Pix2wavShow, _Component);\n\n  function Pix2wavShow(props) {\n    _classCallCheck(this, Pix2wavShow);\n\n    var _this = _possibleConstructorReturn(this, (Pix2wavShow.__proto__ || Object.getPrototypeOf(Pix2wavShow)).call(this, props));\n\n    _this.datasetActions = _this.datasetActions.bind(_this);\n    return _this;\n  }\n\n  _createClass(Pix2wavShow, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      var id = this.props.match.params.id || localStorage.getItem('pix2wav.last_id');\n      console.log('load dataset:', id);\n      var _props = this.props,\n          match = _props.match,\n          pix2wav = _props.pix2wav,\n          actions = _props.actions;\n\n      if (id === 'new') return;\n      if (id) {\n        if (parseInt(id)) localStorage.setItem('pix2wav.last_id', id);\n        if (!pix2wav.folder || pix2wav.folder.id !== id) {\n          actions.load_directories(id);\n        }\n      } else {\n        this.props.history.push('/pix2wav/new/');\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props2 = this.props,\n          pix2wav = _props2.pix2wav,\n          match = _props2.match,\n          history = _props2.history;\n\n      var _ref = pix2wav.data || {},\n          folderLookup = _ref.folderLookup;\n\n      var folder = (folderLookup || {})[pix2wav.folder_id] || {};\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'app pix2wav' },\n        (0, _preact.h)(\n          'div',\n          { 'class': 'heading' },\n          (0, _preact.h)(\n            'div',\n            { 'class': 'spaced' },\n            (0, _preact.h)(\n              'h1',\n              null,\n              folder ? folder.name : (0, _preact.h)(_loading2.default, null)\n            ),\n            (0, _preact.h)(_upload2.default, null)\n          )\n        ),\n        (0, _preact.h)(_spectrogram2.default, {\n          loading: pix2wav.loading,\n          progress: pix2wav.progress,\n          id: pix2wav.folder_id,\n          module: _pix2wav4.default,\n          data: pix2wav.data,\n          folder: folder\n        }),\n        (0, _preact.h)(_dataset6.default, {\n          loading: pix2wav.loading,\n          progress: pix2wav.progress,\n          id: pix2wav.folder_id,\n          module: _pix2wav4.default,\n          data: pix2wav.data,\n          folder: folder,\n          history: history,\n          onPickFile: function onPickFile(file, e) {\n            e.preventDefault();\n            e.stopPropagation();\n            console.log('picked a file', file);\n          },\n          datasetActions: this.datasetActions\n        })\n      );\n    }\n  }, {\n    key: 'datasetActions',\n    value: function datasetActions(dataset) {\n      var isFetching = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      var isProcessing = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n      var _props3 = this.props,\n          pix2wav = _props3.pix2wav,\n          remote = _props3.remote;\n\n      var input = pix2wav.data.fileLookup[dataset.input[0]];\n      if (!input) return null;\n      if (input.name && input.name.match(/(gif|jpe?g|png)$/i)) return null;\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)(\n          'div',\n          { 'class': 'actions' },\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2wav.folder_id, 1);\n              } },\n            'train'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2wav.folder_id, 2);\n              } },\n            '2x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2wav.folder_id, 4);\n              } },\n            '4x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2wav.folder_id, 6);\n              } },\n            '6x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2wav.folder_id, 18);\n              } },\n            '18x'\n          )\n        ),\n        dataset.isBuilt ? (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          'fetched ',\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.clear_cache_task(dataset);\n              } },\n            'rm'\n          )\n        ) : isFetching ? (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          'fetching'\n        ) : (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.fetch_task(input.url, input.id, dataset.name);\n              } },\n            'fetch'\n          )\n        )\n      );\n    }\n  }]);\n\n  return Pix2wavShow;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    pix2wav: state.module.pix2wav\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(pix2wavActions, dispatch),\n    remote: (0, _redux.bindActionCreators)(pix2wavTasks, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2wavShow);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _moment = require('moment/min/moment.min');\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2wav = require('../pix2wav.actions');\n\nvar pix2wavActions = _interopRequireWildcard(_pix2wav);\n\nvar _pix2wav2 = require('../pix2wav.tasks');\n\nvar pix2wavTasks = _interopRequireWildcard(_pix2wav2);\n\nvar _common = require('../../../common');\n\nvar _dataset = require('../../../dataset/dataset.actions');\n\nvar datasetActions = _interopRequireWildcard(_dataset);\n\nvar _wav2pix = require('../../../audio/wav2pix');\n\nvar wav2pixActions = _interopRequireWildcard(_wav2pix);\n\nvar _pix2wav3 = require('../../../audio/pix2wav');\n\nvar pix2wavPlayer = _interopRequireWildcard(_pix2wav3);\n\nvar _pix2wav4 = require('../pix2wav.module');\n\nvar _pix2wav5 = _interopRequireDefault(_pix2wav4);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar date_stamp = function date_stamp() {\n  return (0, _moment2.default)().format(\"_YYYYMMDD_HHmm\");\n};\n\nvar SpectrogramUpload = function (_Component) {\n  _inherits(SpectrogramUpload, _Component);\n\n  function SpectrogramUpload(props) {\n    _classCallCheck(this, SpectrogramUpload);\n\n    var _this = _possibleConstructorReturn(this, (SpectrogramUpload.__proto__ || Object.getPrototypeOf(SpectrogramUpload)).call(this, props));\n\n    _this.state = {\n      file: null,\n      pcm: null,\n      name: \"\",\n      datasetName: \"\",\n      frames: [],\n      frame_start: 0,\n      max: 1000,\n      preview_count: 8 * 4,\n      frame_step: wav2pixActions.FRAME_STEP\n    };\n    var audioElement = document.createElement('audio');\n    audioElement.addEventListener('loadedmetadata', function () {\n      var duration = audioElement.duration;\n      var total_frame_count = Math.floor((duration * 44100 - wav2pixActions.FRAME_LENGTH) / _this.state.frame_step);\n      _this.setState({\n        duration: duration,\n        max: Math.min(_this.state.max, total_frame_count, 1000)\n      });\n    });\n    _this.audioElement = audioElement;\n    return _this;\n  }\n\n  _createClass(SpectrogramUpload, [{\n    key: 'pickFile',\n    value: function pickFile(file) {\n      var _this2 = this;\n\n      var name = file.name.split('.')[0].replace(/\\s+/g, '_').replace(/-/g, '_').replace(/_+/g, '_');\n      this.setState({\n        file: file,\n        name: name + date_stamp(),\n        datasetName: name,\n        pcm: ''\n      }, function () {\n        _this2.rebuildFrames();\n      });\n      this.audioElement.src = URL.createObjectURL(file);\n    }\n  }, {\n    key: 'rebuildFrames',\n    value: function rebuildFrames() {\n      var _this3 = this;\n\n      var _state = this.state,\n          file = _state.file,\n          pcm = _state.pcm,\n          frame_step = _state.frame_step,\n          frame_start = _state.frame_start,\n          preview_count = _state.preview_count;\n\n      this.props.wav2pix.renderFrames(pcm || file, { frame_start: frame_start, frame_step: frame_step, max: preview_count }).then(function (data) {\n        console.log('got frames', data.frames.length);\n        _this3.setState(_extends({}, _this3.state, {\n          frames: data.frames,\n          pcm: data.pcm\n        }));\n      });\n    }\n  }, {\n    key: 'buildZip',\n    value: function buildZip() {\n      var _this4 = this;\n\n      var _state2 = this.state,\n          pcm = _state2.pcm,\n          file = _state2.file,\n          max = _state2.max,\n          frame_step = _state2.frame_step,\n          frame_start = _state2.frame_start;\n\n      this.props.wav2pix.buildZip(this.state.name, pcm || file, { frame_start: frame_start, frame_step: frame_step, max: max }).then(function (_ref) {\n        var zip = _ref.zip,\n            filename = _ref.filename,\n            count = _ref.count;\n\n        _this4.props.datasetActions.uploadFile(_this4.props.module, _this4.props.folder, zip, filename, { count: count, max: max, frame_step: frame_step, frame_size: wav2pixActions.FRAME_LENGTH / 44100 });\n      });\n    }\n  }, {\n    key: 'playFrame',\n    value: function playFrame(i) {\n      var _this5 = this;\n\n      return function () {\n        var frame = _this5.state.frames[i];\n        pix2wavPlayer.play(frame);\n      };\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this6 = this;\n\n      // loading={pix2wav.loading}\n      // progress={pix2wav.progress}\n      // id={pix2wav.folder_id}\n      // module={pix2wavModule}\n      // data={pix2wav.data}\n      // folder={folder}\n      var _state3 = this.state,\n          file = _state3.file,\n          frames = _state3.frames,\n          preview_count = _state3.preview_count;\n\n      var canvases = [];\n      for (var i = 0, _len = preview_count; i < _len; i++) {\n        canvases.push((0, _preact.h)('canvas', { key: i, onClick: this.playFrame(i) }));\n      }\n      return (0, _preact.h)(\n        'div',\n        { className: 'row' },\n        (0, _preact.h)(\n          'div',\n          { className: 'col spectrogramBuilder' },\n          (0, _preact.h)(\n            _common.Group,\n            { title: 'Spectrogram Builder' },\n            (0, _preact.h)(\n              'p',\n              null,\n              \"Convert your sounds into spectrograms. \",\n              \"Sound files can be WAV, MP3, AIFF, or FLAC. \"\n            ),\n            (0, _preact.h)(_common.FileUpload, {\n              title: 'Choose a sound file',\n              accept: 'audio/*',\n              onUpload: function onUpload(file) {\n                return _this6.pickFile(file);\n              }\n            }),\n            file && this.renderMetadata(file)\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { ref: function ref(c) {\n              _this6.canvases = c;\n            }, className: 'thumbs', id: 'pix2wav_canvases' },\n          canvases\n        )\n      );\n    }\n  }, {\n    key: 'renderMetadata',\n    value: function renderMetadata(file) {\n      var _this7 = this;\n\n      var _state4 = this.state,\n          duration = _state4.duration,\n          preview_count = _state4.preview_count;\n\n      var size = _util2.default.hush_size(file.size);\n      var total_frame_count = Math.floor((duration * 44100 - wav2pixActions.FRAME_LENGTH) / this.state.frame_step);\n      var frame_size = Math.round(wav2pixActions.FRAME_LENGTH / 44100 * 1000) + ' ms.';\n      var frame_step = Math.round(this.state.frame_step / 44100 * 1000) + ' ms.';\n      return (0, _preact.h)(\n        'div',\n        { className: 'fileMetadata' },\n        (0, _preact.h)(\n          _common.Group,\n          { title: 'Metadata' },\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'Name' },\n            file.name\n          ),\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'Type' },\n            file.type\n          ),\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'Size' },\n            (0, _preact.h)(\n              'span',\n              { className: size[0] },\n              size[1]\n            )\n          ),\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'Date' },\n            (0, _moment2.default)(file.lastModifiedDate).format(\"YYYY-MM-DD h:mm a\")\n          ),\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'Duration' },\n            Math.floor(duration) + ' s.'\n          ),\n          (0, _preact.h)('br', null),\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'Frames' },\n            total_frame_count\n          ),\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'Frame Size' },\n            frame_size\n          ),\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'Frame Step' },\n            frame_step\n          ),\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'FFT Size' },\n            wav2pixActions.spectrum.fft_size\n          ),\n          (0, _preact.h)('br', null),\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'Status' },\n            this.props.pix2wav.status\n          ),\n          (0, _preact.h)('br', null)\n        ),\n        (0, _preact.h)(\n          _common.Group,\n          { title: 'Data settings' },\n          (0, _preact.h)(_common.TextInput, {\n            title: 'Dataset name',\n            onChange: function onChange(e) {\n              return _this7.setState({ name: e.target.value });\n            },\n            value: this.state.name\n          }),\n          (0, _preact.h)(_common.Slider, {\n            name: 'Starting Frame',\n            min: 0, max: 1, type: 'float',\n            value: this.state.frame_start,\n            defaultValue: 0,\n            onChange: function onChange(frame_start) {\n              _this7.setState({\n                frame_start: frame_start\n              }, function () {\n                _this7.rebuildFrames();\n              });\n            }\n          }),\n          (0, _preact.h)(_common.Slider, {\n            name: 'No. Frames',\n            min: 10, max: Math.min(total_frame_count, 1000), type: 'int',\n            value: this.state.max,\n            defaultValue: Math.min(total_frame_count, 300),\n            onChange: function onChange(max) {\n              return _this7.setState({ max: max });\n            }\n          }),\n          (0, _preact.h)(_common.Slider, {\n            name: 'Frame step',\n            min: 10, max: 20000, type: 'int',\n            value: this.state.frame_step,\n            defaultValue: wav2pixActions.FRAME_STEP,\n            onChange: function onChange(frame_step) {\n              var total_frame_count = Math.floor((duration * 44100 - wav2pixActions.FRAME_LENGTH) / frame_step);\n              _this7.setState({\n                name: _this7.state.datasetName + '_step_' + frame_step + date_stamp(),\n                frame_step: frame_step,\n                max: Math.min(_this7.state.max, total_frame_count)\n              }, function () {\n                _this7.rebuildFrames();\n              });\n            }\n          }),\n          (0, _preact.h)(\n            _common.Button,\n            {\n              onClick: function onClick() {\n                return _this7.buildZip();\n              }\n            },\n            'Upload Frames'\n          )\n        ),\n        (0, _preact.h)(_common.Progress, null)\n      );\n    }\n  }, {\n    key: 'componentDidUpdate',\n    value: function componentDidUpdate() {\n      var _this8 = this;\n\n      (this.state.frames || []).map(function (frame, i) {\n        var canvas = _this8.canvases.children[i];\n        var ctx = canvas.getContext('2d-lodpi');\n        canvas.width = frame.canvas.width;\n        canvas.height = frame.canvas.height;\n        ctx.drawImage(frame.canvas, 0, 0);\n      });\n    }\n  }]);\n\n  return SpectrogramUpload;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    pix2wav: state.module.pix2wav,\n    upload: state.upload\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    datasetActions: (0, _redux.bindActionCreators)(datasetActions, dispatch),\n    actions: (0, _redux.bindActionCreators)(pix2wavActions, dispatch),\n    remote: (0, _redux.bindActionCreators)(pix2wavTasks, dispatch),\n    wav2pix: (0, _redux.bindActionCreators)(wav2pixActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SpectrogramUpload);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _samplernn = require('./views/samplernn.new');\n\nvar _samplernn2 = _interopRequireDefault(_samplernn);\n\nvar _samplernn3 = require('./views/samplernn.show');\n\nvar _samplernn4 = _interopRequireDefault(_samplernn3);\n\nvar _samplernn5 = require('./views/samplernn.import');\n\nvar _samplernn6 = _interopRequireDefault(_samplernn5);\n\nvar _samplernn7 = require('./views/samplernn.results');\n\nvar _samplernn8 = _interopRequireDefault(_samplernn7);\n\nvar _samplernn9 = require('./views/samplernn.graph');\n\nvar _samplernn10 = _interopRequireDefault(_samplernn9);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar router = function () {\n  function router() {\n    _classCallCheck(this, router);\n  }\n\n  _createClass(router, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      _actions2.default.system.changeTool('samplernn');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #eef, #fef)';\n    }\n  }, {\n    key: 'componentWillReceiveProps',\n    value: function componentWillReceiveProps() {\n      _actions2.default.system.changeTool('samplernn');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #eef, #fef)';\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'section',\n        null,\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/samplernn/new', component: _samplernn2.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/samplernn/datasets', component: _samplernn4.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/samplernn/datasets/:id', component: _samplernn4.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/samplernn/import', component: _samplernn6.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/samplernn/results', component: _samplernn8.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/samplernn/graph', component: _samplernn10.default })\n      );\n    }\n  }]);\n\n  return router;\n}();\n\nfunction links() {\n  return [{ url: '/samplernn/new/', name: 'new' }, { url: '/samplernn/datasets/', name: 'datasets' }, { url: '/samplernn/graph/', name: 'graph' }, { url: '/samplernn/results/', name: 'results' }];\n}\n\nexports.default = {\n  name: 'samplernn',\n  router: router, links: links\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.import_files = exports.load_loss = exports.load_graph = exports.load_directories = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.loader');\n\nvar datasetLoader = _interopRequireWildcard(_dataset);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _samplernn = require('./samplernn.module');\n\nvar _samplernn2 = _interopRequireDefault(_samplernn);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toArray(arr) { return Array.isArray(arr) ? arr : Array.from(arr); }\n\nvar load_directories = exports.load_directories = function load_directories(id) {\n  return function (dispatch) {\n    var module = _samplernn2.default.name;\n    _util2.default.allProgress([datasetLoader.load(module), _actions2.default.socket.list_directory({ module: module, dir: 'datasets' }), _actions2.default.socket.list_directory({ module: module, dir: 'results' }), _actions2.default.socket.list_directory({ module: module, dir: 'output' }), _actions2.default.socket.disk_usage({ module: module, dir: 'datasets' }), load_loss()(dispatch)], function (percent, i, n) {\n      dispatch({\n        type: _types2.default.app.load_progress,\n        progress: { i: i, n: n },\n        data: { module: 'samplernn' }\n      });\n    }).then(function (res) {\n      // console.log(res)\n      var _res = _slicedToArray(res, 6),\n          datasetApiReport = _res[0],\n          datasets = _res[1],\n          results = _res[2],\n          output = _res[3],\n          datasetUsage = _res[4],\n          lossReport = _res[5];\n\n      var folderLookup = datasetApiReport.folderLookup,\n          fileLookup = datasetApiReport.fileLookup,\n          datasetLookup = datasetApiReport.datasetLookup,\n          folders = datasetApiReport.folders,\n          files = datasetApiReport.files,\n          unsortedFolder = datasetApiReport.unsortedFolder;\n\n      console.log(datasetUsage);\n\n      // also show the various flat audio files we have, in the input area..\n      var flatDatasets = datasets.filter(function (s) {\n        return s.name.match(/(wav|aiff?|flac|mp3)$/) && !s.dir;\n      });\n      var builtDatasets = datasets.filter(function (s) {\n        return s.dir;\n      });\n      builtDatasets.forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name, unsortedFolder, dir.date);\n        dataset.isBuilt = true;\n      });\n\n      flatDatasets.forEach(function (file) {\n        file.uuid = (0, _v2.default)();\n        fileLookup[file.uuid] = file;\n        var name = file.name.split('.')[0];\n        var dataset = datasetLoader.getDataset(module, datasetLookup, name, unsortedFolder, file.date);\n        file.persisted = false;\n        dataset.input.push(file.uuid);\n      });\n\n      // exp:coccokit_3-frame_sizes:8,2-n_rnn:2-dataset:coccokit_3\n      var checkpoints = results.filter(function (s) {\n        return s.dir;\n      }).map(function (s) {\n        var checkpoint = s.name.split('-').map(function (s) {\n          return s.split(':');\n        }).filter(function (b) {\n          return b.length && b[1];\n        }).reduce(function (a, b) {\n          return (a[b[0]] = b[1]) && a;\n        }, {});\n        checkpoint.name = checkpoint.name || checkpoint.dataset || checkpoint.exp;\n        checkpoint.date = s.date;\n        checkpoint.dir = s;\n        checkpoint.persisted = false;\n        var dataset = datasetLoader.getDataset(module, datasetLookup, checkpoint.name, unsortedFolder, checkpoint.date);\n        var loss = lossReport[checkpoint.name];\n        if (loss) {\n          dataset.epoch = checkpoint.epoch = loss.length;\n          checkpoint.training_loss = loss;\n        }\n        dataset.checkpoints.push(checkpoint);\n        return checkpoint;\n      });\n\n      output.map(function (file) {\n        file.uuid = (0, _v2.default)();\n        fileLookup[file.uuid] = file;\n        var pair = file.name.split('.')[0].split('-');\n        var dataset = datasetLoader.getDataset(module, datasetLookup, pair[0], unsortedFolder, file.date);\n        file.persisted = false;\n        file.epoch = parseInt(file.epoch || pair[1].replace(/^\\D+/, '')) || 0;\n        dataset.epoch = Math.max(file.epoch, dataset.epoch || 0);\n        // here check if the file exists in dataset, if so just check that it's persisted\n        var found = dataset.output.some(function (file_id) {\n          // if (f.name === \n          if (fileLookup[file_id].name === file.name) {\n            fileLookup[file_id].persisted = true;\n            return true;\n          }\n          return false;\n        });\n        if (!found) {\n          dataset.output.push(file.uuid);\n        }\n      });\n\n      dispatch({\n        type: _types2.default.dataset.load,\n        data: {\n          module: module,\n          folderLookup: folderLookup,\n          fileLookup: fileLookup,\n          datasetLookup: datasetLookup,\n          folders: folders, files: files,\n          checkpoints: checkpoints,\n          output: output\n        }\n      });\n    }).catch(function (e) {\n      console.error(e);\n    });\n    if (id) {\n      dispatch({\n        type: _types2.default.dataset.set_folder,\n        data: {\n          folder_id: id,\n          module: module\n        }\n      });\n    }\n  };\n};\n\nvar load_graph = exports.load_graph = function load_graph() {\n  return function (dispatch) {\n    var module = _samplernn2.default.name;\n    _util2.default.allProgress([load_loss()(dispatch), _actions2.default.socket.list_directory({ module: module, dir: 'results' })], function (percent, i, n) {\n      dispatch({\n        type: _types2.default.app.load_progress,\n        progress: { i: i, n: n },\n        data: { module: 'samplernn' }\n      });\n    }).then(function (res) {\n      var _res2 = _slicedToArray(res, 2),\n          lossReport = _res2[0],\n          results = _res2[1];\n\n      dispatch({\n        type: _types2.default.samplernn.load_graph,\n        lossReport: lossReport,\n        results: results\n      });\n    });\n  };\n};\n\nvar load_loss = exports.load_loss = function load_loss() {\n  return function (dispatch) {\n    return _actions2.default.socket.run_script({ module: 'samplernn', activity: 'report' }).then(function (report) {\n      var lossReport = {};\n      report.stdout.split('\\n\\n').filter(function (a) {\n        return !!a;\n      }).forEach(function (data) {\n        var _data$split = data.split('\\n'),\n            _data$split2 = _toArray(_data$split),\n            name = _data$split2[0],\n            lines = _data$split2.slice(1);\n\n        lossReport[name] = lines.map(function (s) {\n          return s.split('\\t').reduce(function (a, s) {\n            var b = s.split(': ');\n            a[b[0]] = b[1];\n            return a;\n          }, {});\n        });\n        // console.log(data, name, lossReport[name])\n      });\n      dispatch({\n        type: _types2.default.samplernn.load_loss,\n        lossReport: lossReport\n      });\n      return lossReport;\n    });\n  };\n};\n\nvar import_files = exports.import_files = function import_files(state, datasetLookup, fileLookup) {\n  return function (dispatch) {\n    var selected = state.selected,\n        folder_id = state.folder_id,\n        url_base = state.url_base,\n        import_action = state.import_action;\n\n    var names = Object.keys(selected).filter(function (k) {\n      return selected[k];\n    });\n    var promises = void 0;\n    switch (import_action) {\n      case 'Hotlink':\n        // in this case, create a new file for each file we see.\n        promises = names.reduce(function (a, name) {\n          return datasetLookup[name].output.map(function (id) {\n            return fileLookup[id];\n          }).map(function (file) {\n            var partz = file.name.split('.');\n            var ext = partz.pop();\n            return _actions2.default.file.create({\n              folder_id: folder_id,\n              name: file.name,\n              url: url_base + file.name,\n              mime: 'audio/' + ext,\n              epoch: file.epoch,\n              size: file.size,\n              module: 'samplernn',\n              dataset: name,\n              activity: 'train',\n              datatype: 'audio',\n              generated: true,\n              created_at: new Date(file.date),\n              updated_at: new Date(file.date)\n            });\n          }).concat(a);\n        }, []);\n        break;\n      case 'Upload':\n        promises = names.reduce(function (a, name) {\n          return datasetLookup[name].input.map(function (id) {\n            return fileLookup[id];\n          }).map(function (file) {\n            if (file.persisted) return null;\n            var partz = file.name.split('.');\n            var ext = partz.pop();\n            if (ext === 'wav' || ext === 'flac') return;\n            console.log(file);\n            return _actions2.default.socket.upload_file({\n              folder_id: folder_id,\n              module: 'samplernn',\n              activity: 'train',\n              path: 'datasets',\n              filename: file.name,\n              generated: false,\n              processed: false,\n              datatype: 'audio',\n              ttl: 60000\n            });\n          }).concat(a);\n        }, []).filter(function (a) {\n          return !!a;\n        });\n        break;\n      default:\n        break;\n    }\n    console.log(promises);\n    return Promise.all(promises).then(function (data) {\n      console.log(data);\n      window.location.href = '/samplernn/datasets/' + folder_id + '/';\n    }).catch(function (e) {\n      console.error(e);\n    });\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nvar samplernnModule = {\n  name: 'samplernn',\n  displayName: 'SampleRNN',\n  datatype: 'audio'\n};\n\nexports.default = samplernnModule;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.reducer');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar samplernnInitialState = {\n  loading: true,\n  progress: { i: 0, n: 0 },\n  error: null,\n  folders: [],\n  folder_id: 0,\n  data: null,\n  lossReport: null,\n  results: null\n};\n\nvar samplernnReducer = function samplernnReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : samplernnInitialState;\n  var action = arguments[1];\n\n  if (action.data && action.data.module === 'samplernn') {\n    return (0, _dataset2.default)(state, action);\n  }\n\n  switch (action.type) {\n    case _types2.default.samplernn.load_loss:\n      return _extends({}, state, {\n        lossReport: action.lossReport\n      });\n    case _types2.default.samplernn.load_graph:\n      return _extends({}, state, {\n        lossReport: action.lossReport,\n        results: action.results\n      });\n    default:\n      return state;\n  }\n};\n\nexports.default = samplernnReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.clear_cache_task = exports.log_task = exports.fetch_task = exports.train_task = undefined;\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar train_task = exports.train_task = function train_task(dataset, folder_id) {\n  var epochs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n  return function (dispatch) {\n    var task = {\n      module: 'samplernn',\n      activity: 'train',\n      dataset: dataset.name,\n      epoch: dataset.checkpoints.length ? dataset.checkpoints[0].epoch || 0 : 0,\n      epochs: epochs,\n      folder_id: folder_id,\n      opt: {\n        sample_length: 44100 * 5,\n        n_samples: 6,\n        keep_old_checkpoints: false\n      }\n    };\n    console.log(task);\n    return _actions2.default.queue.add_task(task);\n  };\n};\nvar fetch_task = exports.fetch_task = function fetch_task(url, folder_id, file_id, dataset) {\n  return function (dispatch) {\n    if (!url) return console.log('input file inaccessible (no url)');\n    var task = {\n      module: 'samplernn',\n      activity: 'fetch',\n      dataset: dataset,\n      folder_id: folder_id,\n      opt: {\n        url: url,\n        file_id: file_id,\n        dataset: dataset\n      }\n    };\n    return _actions2.default.queue.add_task(task);\n  };\n};\nvar log_task = exports.log_task = function log_task(dataset) {\n  return function (dispatch) {\n    var task = {\n      module: 'samplernn',\n      activity: 'log',\n      dataset: dataset.name\n    };\n    return _actions2.default.queue.add_task(task);\n  };\n};\nvar clear_cache_task = exports.clear_cache_task = function clear_cache_task(dataset) {\n  return function (dispatch) {\n    var task = {\n      module: 'samplernn',\n      activity: 'clear_cache',\n      dataset: dataset.name\n    };\n    return _actions2.default.queue.add_task(task);\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _samplernn = require('../samplernn.actions');\n\nvar samplernnActions = _interopRequireWildcard(_samplernn);\n\nvar _group = require('../../../common/group.component');\n\nvar _group2 = _interopRequireDefault(_group);\n\nvar _slider = require('../../../common/slider.component');\n\nvar _slider2 = _interopRequireDefault(_slider);\n\nvar _select = require('../../../common/select.component');\n\nvar _select2 = _interopRequireDefault(_select);\n\nvar _button = require('../../../common/button.component');\n\nvar _button2 = _interopRequireDefault(_button);\n\nvar _fileList = require('../../../common/fileList.component');\n\nvar _textInput = require('../../../common/textInput.component');\n\nvar _textInput2 = _interopRequireDefault(_textInput);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar lerp = _util2.default.lerp,\n    norm = _util2.default.norm,\n    randint = _util2.default.randint,\n    randrange = _util2.default.randrange;\n\nvar SampleRNNGraph = function (_Component) {\n  _inherits(SampleRNNGraph, _Component);\n\n  function SampleRNNGraph(props) {\n    _classCallCheck(this, SampleRNNGraph);\n\n    var _this = _possibleConstructorReturn(this, (SampleRNNGraph.__proto__ || Object.getPrototypeOf(SampleRNNGraph)).call(this));\n\n    props.actions.load_graph();\n    return _this;\n  }\n\n  _createClass(SampleRNNGraph, [{\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      this.refs = {};\n      return (0, _preact.h)(\n        'div',\n        { className: 'app lossGraph' },\n        (0, _preact.h)(\n          'div',\n          { className: 'heading' },\n          (0, _preact.h)(\n            'h3',\n            null,\n            'SampleRNN Loss Graph'\n          ),\n          (0, _preact.h)('canvas', { ref: function ref(_ref) {\n              return _this2.refs['canvas'] = _ref;\n            } })\n        )\n      );\n    }\n  }, {\n    key: 'componentDidUpdate',\n    value: function componentDidUpdate() {\n      var _props$samplernn = this.props.samplernn,\n          lossReport = _props$samplernn.lossReport,\n          results = _props$samplernn.results;\n\n      if (!lossReport || !results) return;\n      var canvas = this.refs.canvas;\n      canvas.width = window.innerWidth;\n      canvas.height = window.innerHeight;\n      canvas.style.width = canvas.width + 'px';\n      canvas.style.height = canvas.height + 'px';\n\n      var ctx = canvas.getContext('2d');\n      var w = canvas.width;\n      var h = canvas.height;\n      ctx.clearRect(0, 0, w, h);\n\n      var resultsByDate = results.map(function (file) {\n        if (!file.name.match(/^exp:/)) return null;\n        var dataset = file.name.split(\"-\")[3].split(\":\")[1];\n        return [+new Date(file.date), dataset];\n      }).filter(function (a) {\n        return !!a;\n      }).sort(function (a, b) {\n        return a[0] - a[1];\n      });\n\n      var keys = Object.keys(lossReport).filter(function (k) {\n        return !!lossReport[k].length;\n      });\n      var scaleMax = 0;\n      var scaleMin = Infinity;\n      var epochsMax = 0;\n      keys.forEach(function (key) {\n        var loss = lossReport[key];\n        epochsMax = Math.max(loss.length, epochsMax);\n        loss.forEach(function (a) {\n          var v = parseFloat(a.training_loss);\n          if (!v) return;\n          scaleMax = Math.max(v, scaleMax);\n          scaleMin = Math.min(v, scaleMin);\n        });\n      });\n      // scaleMax *= 10\n      // console.log(scaleMax, scaleMin, epochsMax)\n\n      scaleMax = 3;\n      scaleMin = 0;\n      var margin = 0;\n      var wmin = 0;\n      var wmax = w / 2;\n      var hmin = 0;\n      var hmax = h / 2;\n      var epochsScaleFactor = 1; // 3/2\n\n      ctx.save();\n      var X = void 0,\n          Y = void 0;\n      for (var ii = 0; ii < epochsMax; ii++) {\n        X = lerp(ii / (epochsMax / epochsScaleFactor) * epochsScaleFactor, wmin, wmax);\n        ctx.strokeStyle = 'rgba(0,0,0,0.3)';\n        ctx.beginPath(0, 0);\n        ctx.moveTo(X, 0);\n        ctx.lineTo(X, h);\n        ctx.lineWidth = 0.5;\n        // ctx.stroke()\n        if ((ii + 1) % 6 === 0) {\n          ctx.lineWidth = 0.5;\n          ctx.stroke();\n          var fontSize = 12;\n          ctx.font = 'italic ' + fontSize + 'px \"Georgia\"';\n          ctx.fillStyle = 'rgba(0,12,28,0.6)';\n          ctx.fillText(ii / 5 * 6, X + 8, h - (fontSize + 4));\n        }\n      }\n      for (var ii = scaleMin; ii < scaleMax; ii += 1) {\n        Y = lerp(ii / scaleMax, hmin, hmax);\n        // ctx.strokeStyle = 'rgba(255,255,255,1.0)'\n        ctx.beginPath(0, 0);\n        ctx.moveTo(0, h - Y);\n        ctx.lineTo(w, h - Y);\n        ctx.lineWidth = 1;\n        // ctx.stroke()        \n        // if ( (ii % 1) < 0.1) {\n        // ctx.strokeStyle = 'rgba(255,255,255,1.0)'\n        ctx.lineWidth = 2;\n        ctx.setLineDash([4, 4]);\n        ctx.stroke();\n        ctx.stroke();\n        ctx.stroke();\n        ctx.setLineDash([1, 1]);\n        var _fontSize = 12;\n        ctx.font = 'italic ' + _fontSize + 'px \"Georgia\"';\n        ctx.fillStyle = 'rgba(0,12,28,0.6)';\n        ctx.fillText(ii.toFixed(1), w - 50, h - Y + _fontSize + 10);\n        // }\n      }\n      ctx.lineWidth = 1;\n      ctx.restore();\n\n      var min_date = resultsByDate[0][0];\n      var max_date = resultsByDate[resultsByDate.length - 1][0];\n      resultsByDate.forEach(function (pair) {\n        var date = pair[0];\n        var key = pair[1];\n        var loss = lossReport[key];\n        if (!key || !loss || !loss.length) return;\n        var vf = parseFloat(loss[loss.length - 1].training_loss) || 0;\n        var vg = parseFloat(loss[0].training_loss) || 5;\n        // console.log(vf)\n        var vv = 1 - norm(vf, scaleMin, scaleMax / 2);\n        ctx.lineWidth = (1 - norm(vf, scaleMin, scaleMax)) * 4;\n        // ctx.lineWidth = norm(date, min_date, max_date) * 3\n        // console.log(date, min_date, max_date)\n        ctx.strokeStyle = 'rgba(' + [randrange(30, 190), randrange(30, 150), randrange(60, 120)].join(',') + ',' + 0.8 + ')';\n        var begun = false;\n        loss.forEach(function (a, i) {\n          var v = parseFloat(a.training_loss);\n          if (!v) return;\n          var x = lerp(i / (epochsMax / epochsScaleFactor) * epochsScaleFactor, wmin, wmax);\n          var y = lerp(norm(v, scaleMin, scaleMax), hmax, hmin);\n          if (!begun) {\n            begun = true;\n            ctx.beginPath(0, 0);\n            ctx.moveTo(x, y);\n          } else {\n            ctx.lineTo(x, y);\n            // ctx.stroke()\n          }\n        });\n        ctx.stroke();\n        var i = loss.length - 1;\n        var v = parseFloat(loss[i].training_loss);\n        var x = lerp(i / (epochsMax / epochsScaleFactor) * epochsScaleFactor, wmin, wmax);\n        var y = lerp(norm(v, scaleMin, scaleMax), hmax, hmin);\n        var fontSize = 9;\n        ctx.font = 'italic ' + fontSize + 'px \"Georgia\"';\n        ctx.fillStyle = 'rgba(0,12,28,0.6)';\n        ctx.fillText(key, x + 4, y + fontSize / 2);\n      });\n    }\n  }]);\n\n  return SampleRNNGraph;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    samplernn: state.module.samplernn\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(samplernnActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SampleRNNGraph);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _samplernn = require('../samplernn.actions');\n\nvar samplernnActions = _interopRequireWildcard(_samplernn);\n\nvar _select = require('../../../common/select.component');\n\nvar _select2 = _interopRequireDefault(_select);\n\nvar _textInput = require('../../../common/textInput.component');\n\nvar _textInput2 = _interopRequireDefault(_textInput);\n\nvar _button = require('../../../common/button.component');\n\nvar _button2 = _interopRequireDefault(_button);\n\nvar _dataset = require('../../../dataset/dataset.component');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar samplernnModule = {\n  name: 'samplernn',\n  datatype: 'audio'\n};\n\nvar SampleRNNImport = function (_Component) {\n  _inherits(SampleRNNImport, _Component);\n\n  function SampleRNNImport() {\n    _classCallCheck(this, SampleRNNImport);\n\n    var _this = _possibleConstructorReturn(this, (SampleRNNImport.__proto__ || Object.getPrototypeOf(SampleRNNImport)).call(this));\n\n    _this.state = {\n      folder_id: 1,\n      import_action: 'Hotlink',\n      url_base: 'https://s3.amazonaws.com/i.asdf.us/bucky/data/4279/',\n      selected: {}\n    };\n    return _this;\n  }\n\n  _createClass(SampleRNNImport, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      var id = this.props.match.params.id || localStorage.getItem('samplernn.last_id');\n      console.log('load dataset:', id);\n      var _props = this.props,\n          match = _props.match,\n          samplernn = _props.samplernn,\n          samplernnActions = _props.samplernnActions;\n\n      if (id === 'new') return;\n      if (id) {\n        if (parseInt(id)) localStorage.setItem('samplernn.last_id', id);\n        if (!samplernn.folder || samplernn.folder.id !== id) {\n          this.props.actions.load_directories(id);\n        }\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      var samplernn = this.props.samplernn;\n\n      var datasets = [],\n          folder = void 0;\n      if (this.props.samplernn.data) {\n        datasets = (this.props.samplernn.data.folders || []).map(function (folder) {\n          return [folder.name, folder.id];\n        });\n        folder = this.props.samplernn.data.folderLookup.unsorted;\n      }\n      return (0, _preact.h)(\n        'div',\n        { className: 'app top' },\n        (0, _preact.h)(\n          'div',\n          { 'class': 'heading' },\n          (0, _preact.h)(\n            'h1',\n            null,\n            'Import'\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { 'class': 'params form row datasets' },\n          (0, _preact.h)(\n            'div',\n            { 'class': 'row dataset' },\n            (0, _preact.h)('div', { 'class': 'col' }),\n            (0, _preact.h)('div', { 'class': 'col' }),\n            (0, _preact.h)('div', { 'class': 'col' }),\n            (0, _preact.h)(\n              'div',\n              { 'class': 'col' },\n              (0, _preact.h)(\n                'h2',\n                null,\n                'Import to dataset'\n              ),\n              (0, _preact.h)(_select2.default, {\n                title: 'Destination dataset',\n                options: datasets,\n                name: 'folder_id',\n                opt: this.state,\n                onChange: function onChange(name, value) {\n                  return _this2.setState({ folder_id: value });\n                }\n              }),\n              (0, _preact.h)(_select2.default, {\n                title: 'Import action',\n                options: ['Hotlink', 'Upload'],\n                name: 'import_action',\n                opt: this.state,\n                onChange: function onChange(name, value) {\n                  return _this2.setState({ import_action: value });\n                }\n              }),\n              (0, _preact.h)(_textInput2.default, {\n                title: 'Remote URL base',\n                value: this.state.url_base,\n                placeholder: 'http://',\n                onSave: function onSave(value) {\n                  return _this2.setState({ url_base: value });\n                }\n              }),\n              (0, _preact.h)(\n                _button2.default,\n                {\n                  title: '',\n                  onClick: function onClick() {\n                    return _this2.doImport();\n                  }\n                },\n                'Import'\n              )\n            )\n          )\n        ),\n        (0, _preact.h)(_dataset2.default, {\n          loading: samplernn.loading,\n          progress: samplernn.progress,\n          module: samplernnModule,\n          data: samplernn.data,\n          id: 'unsorted',\n          folder: folder,\n          history: this.props.history,\n          onPickDataset: function onPickDataset(dataset) {\n            return _this2.toggle(dataset.name, _this2.state.selected[name]);\n          },\n          beforeRow: function beforeRow(dataset) {\n            return _this2.beforeRow(dataset);\n          },\n          afterRow: function afterRow(dataset) {\n            return _this2.afterRow(dataset);\n          }\n        })\n      );\n    }\n  }, {\n    key: 'toggle',\n    value: function toggle(name) {\n      this.setState(_extends({}, this.state, {\n        selected: _extends({}, this.state.selected, _defineProperty({}, name, !this.state.selected[name]))\n      }));\n    }\n  }, {\n    key: 'beforeRow',\n    value: function beforeRow(dataset) {\n      // console.log(dataset)\n    }\n  }, {\n    key: 'afterRow',\n    value: function afterRow(dataset) {\n      var name = dataset.name;\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)('input', {\n          type: 'checkbox',\n          value: name,\n          checked: !!this.state.selected[name]\n        })\n      );\n    }\n  }, {\n    key: 'doImport',\n    value: function doImport() {\n      var samplernn = this.props.samplernn;\n\n      console.log(this.state);\n      this.props.actions.import_files(this.state, samplernn.data.datasetLookup, samplernn.data.fileLookup);\n    }\n  }]);\n\n  return SampleRNNImport;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    samplernn: state.module.samplernn,\n    runner: state.system.runner,\n    task: state.task\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(samplernnActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SampleRNNImport);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _common = require('../../../common');\n\nvar _samplernn = require('../samplernn.actions');\n\nvar samplernnActions = _interopRequireWildcard(_samplernn);\n\nvar _samplernn2 = require('../samplernn.module');\n\nvar _samplernn3 = _interopRequireDefault(_samplernn2);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction SampleRNNNew(props) {\n  return (0, _preact.h)(_common.Views.New, {\n    db: props.samplernn,\n    path: '/samplernn/datasets/',\n    actions: props.actions,\n    module: _samplernn3.default,\n    history: props.history\n  });\n}\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    samplernn: state.module.samplernn\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(samplernnActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SampleRNNNew);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _samplernn = require('../samplernn.actions');\n\nvar samplernnActions = _interopRequireWildcard(_samplernn);\n\nvar _audioPlayer = require('../../../common/audioPlayer/audioPlayer.actions');\n\nvar audioPlayerActions = _interopRequireWildcard(_audioPlayer);\n\nvar _loading = require('../../../common/loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nvar _fileList = require('../../../common/fileList.component');\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SampleRNNResults = function (_Component) {\n  _inherits(SampleRNNResults, _Component);\n\n  function SampleRNNResults(props) {\n    _classCallCheck(this, SampleRNNResults);\n\n    var _this = _possibleConstructorReturn(this, (SampleRNNResults.__proto__ || Object.getPrototypeOf(SampleRNNResults)).call(this));\n\n    if (!props.samplernn.data) props.actions.load_directories();\n    return _this;\n  }\n\n  _createClass(SampleRNNResults, [{\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      if (this.props.samplernn.loading) return (0, _preact.h)(_loading2.default, { progress: this.props.samplernn.progress });\n      var _props$samplernn$data = this.props.samplernn.data,\n          folderLookup = _props$samplernn$data.folderLookup,\n          fileLookup = _props$samplernn$data.fileLookup,\n          datasetLookup = _props$samplernn$data.datasetLookup;\n      // const { folderLookup } = samplernn\n\n      var renders = Object.keys(folderLookup).sort(_util2.default.sort.stringSort.asc).map(function (key) {\n        var folder = folderLookup[key];\n\n        var _util$sort$orderByFn = _util2.default.sort.orderByFn('epoch desc'),\n            mapFn = _util$sort$orderByFn.mapFn,\n            sortFn = _util$sort$orderByFn.sortFn;\n\n        var datasetPairs = folder.datasets.map(function (name) {\n          return datasetLookup[name];\n        }).map(mapFn).sort(sortFn);\n        var bestRenders = datasetPairs.map(function (pair) {\n          return pair[1];\n        }).filter(function (dataset) {\n          return dataset.output.length;\n        }).map(function (dataset) {\n          var output = dataset.output;\n\n          return output.map(function (id) {\n            return fileLookup[id];\n          }).map(mapFn).sort(sortFn)[0][1];\n        });\n        // console.log(bestRenders.map(r => r.epoch))\n        var path = folder.name === 'unsorted' ? \"/samplernn/import/\" : \"/samplernn/datasets/\" + folder.id + \"/\";\n        return (0, _preact.h)(\n          'div',\n          { className: 'col bestRenders' },\n          (0, _preact.h)(\n            'h3',\n            null,\n            (0, _preact.h)(\n              _reactRouterDom.Link,\n              { to: path },\n              folder.name\n            )\n          ),\n          (0, _preact.h)(_fileList.FileList, {\n            linkFiles: true,\n            files: bestRenders,\n            orderBy: 'date desc',\n            fields: 'name date epoch size',\n            onClick: function onClick(file, e) {\n              e.preventDefault();\n              e.stopPropagation();\n              console.log('picked a file', file);\n              _this2.handlePick(file);\n            }\n          })\n        );\n      });\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'app samplernn' },\n        (0, _preact.h)(\n          'div',\n          { className: 'heading row middle' },\n          (0, _preact.h)(\n            'h1',\n            null,\n            'SampleRNN Results'\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { 'class': 'rows params renders' },\n          renders\n        )\n      );\n    }\n  }, {\n    key: 'handlePick',\n    value: function handlePick(file) {\n      this.props.audioPlayer.play(file);\n    }\n  }]);\n\n  return SampleRNNResults;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    samplernn: state.module.samplernn\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(samplernnActions, dispatch),\n    audioPlayer: (0, _redux.bindActionCreators)(audioPlayerActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SampleRNNResults);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _samplernn = require('../samplernn.actions');\n\nvar samplernnActions = _interopRequireWildcard(_samplernn);\n\nvar _samplernn2 = require('../samplernn.tasks');\n\nvar samplernnTasks = _interopRequireWildcard(_samplernn2);\n\nvar _audioPlayer = require('../../../common/audioPlayer/audioPlayer.actions');\n\nvar audioPlayerActions = _interopRequireWildcard(_audioPlayer);\n\nvar _common = require('../../../common');\n\nvar _dataset = require('../../../dataset/dataset.form');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nvar _upload = require('../../../dataset/upload.status');\n\nvar _upload2 = _interopRequireDefault(_upload);\n\nvar _dataset3 = require('../../../dataset/dataset.component');\n\nvar _dataset4 = _interopRequireDefault(_dataset3);\n\nvar _samplernn3 = require('../samplernn.module');\n\nvar _samplernn4 = _interopRequireDefault(_samplernn3);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SampleRNNShow = function (_Component) {\n  _inherits(SampleRNNShow, _Component);\n\n  function SampleRNNShow(props) {\n    _classCallCheck(this, SampleRNNShow);\n\n    var _this = _possibleConstructorReturn(this, (SampleRNNShow.__proto__ || Object.getPrototypeOf(SampleRNNShow)).call(this, props));\n\n    _this.datasetActions = _this.datasetActions.bind(_this);\n    return _this;\n  }\n\n  _createClass(SampleRNNShow, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      var id = this.props.match.params.id || localStorage.getItem('samplernn.last_id');\n      console.log('load dataset:', id);\n      var _props = this.props,\n          match = _props.match,\n          samplernn = _props.samplernn,\n          actions = _props.actions;\n\n      if (id === 'new') return;\n      if (id) {\n        if (parseInt(id)) localStorage.setItem('samplernn.last_id', id);\n        if (!samplernn.folder || samplernn.folder.id !== id) {\n          // console.log('looooooooooad', id)\n          actions.load_directories(id);\n        }\n      } else {\n        this.props.history.push('/samplernn/new/');\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      var _props2 = this.props,\n          samplernn = _props2.samplernn,\n          runner = _props2.runner,\n          match = _props2.match,\n          history = _props2.history;\n\n      var _ref = samplernn.data || {},\n          folderLookup = _ref.folderLookup;\n      // console.log(runner)\n\n\n      var folder = (folderLookup || {})[samplernn.folder_id] || {};\n      return (0, _preact.h)(\n        'div',\n        { className: 'app samplernn' },\n        (0, _preact.h)(\n          'div',\n          { className: 'heading' },\n          (0, _preact.h)(\n            'h1',\n            null,\n            folder ? folder.name : (0, _preact.h)(_common.Loading, null)\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { className: 'row' },\n          folder && folder.name && folder.name !== 'unsorted' && (0, _preact.h)(_dataset2.default, {\n            title: 'Add Files',\n            module: _samplernn4.default,\n            folder: folder,\n            canUpload: true, canAddURL: true\n          }),\n          (0, _preact.h)(\n            'div',\n            null,\n            (0, _preact.h)(_upload2.default, null),\n            (0, _preact.h)(_common.CurrentTask, { processor: 'gpu' })\n          )\n        ),\n        (0, _preact.h)(_dataset4.default, {\n          loading: samplernn.loading,\n          progress: samplernn.progress,\n          id: samplernn.folder_id,\n          module: _samplernn4.default,\n          data: samplernn.data,\n          folder: folder,\n          history: history,\n          onPickFile: function onPickFile(file, e) {\n            e.preventDefault();\n            e.stopPropagation();\n            // console.log('picked a file', file)\n            _this2.handlePick(file);\n          },\n          datasetActions: this.datasetActions\n        })\n      );\n    }\n  }, {\n    key: 'datasetActions',\n    value: function datasetActions(dataset) {\n      var isFetching = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      var isProcessing = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n      var _props3 = this.props,\n          samplernn = _props3.samplernn,\n          remote = _props3.remote;\n\n      var input = samplernn.data.fileLookup[dataset.input[0]];\n      if (!input) return null;\n      if (input.name && input.name.match(/(gif|jpe?g|png)$/i)) return null;\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)(\n          'div',\n          { 'class': 'actions' },\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, samplernn.folder_id, 1);\n              } },\n            'train'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, samplernn.folder_id, 2);\n              } },\n            '2x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, samplernn.folder_id, 4);\n              } },\n            '4x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, samplernn.folder_id, 6);\n              } },\n            '6x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, samplernn.folder_id, 18);\n              } },\n            '18x'\n          )\n        ),\n        dataset.isBuilt ? (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          'fetched ',\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.clear_cache_task(dataset);\n              } },\n            'x'\n          )\n        ) : isFetching ? (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          'fetching'\n        ) : (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.fetch_task(input.url, samplernn.folder_id, input.id, dataset.name);\n              } },\n            'fetch'\n          )\n        )\n      );\n    }\n  }, {\n    key: 'handlePick',\n    value: function handlePick(file) {\n      // console.log(file)\n      this.props.audioPlayer.play(file);\n    }\n  }]);\n\n  return SampleRNNShow;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    samplernn: state.module.samplernn,\n    runner: state.system.runner\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(samplernnActions, dispatch),\n    remote: (0, _redux.bindActionCreators)(samplernnTasks, dispatch),\n    audioPlayer: (0, _redux.bindActionCreators)(audioPlayerActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SampleRNNShow);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.stop_queue = exports.start_queue = exports.add_task = exports.stop_task = exports.start_task = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _socket = require('../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _actions = require('../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar start_task = exports.start_task = function start_task(task) {\n  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n  _socket2.default.task.start_task(task, opt);\n  return _extends({ type: _types2.default.task.starting_task, task: task }, opt);\n};\n\nvar stop_task = exports.stop_task = function stop_task(task) {\n  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n  _socket2.default.task.stop_task(task, opt);\n  return _extends({ type: _types2.default.task.stopping_task, task: task }, opt);\n};\n\nvar add_task = exports.add_task = function add_task(new_task) {\n  return function (dispatch) {\n    _actions2.default.task.create(new_task).then(function (task) {\n      _socket2.default.task.add_task(task);\n    });\n  };\n};\n\nvar start_queue = exports.start_queue = function start_queue(task) {\n  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n  _socket2.default.task.start_queue(task, opt);\n  return _extends({ type: _types2.default.task.starting_queue, task: task }, opt);\n};\n\nvar stop_queue = exports.stop_queue = function stop_queue(task) {\n  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n  _socket2.default.task.stop_queue(task, opt);\n  return _extends({ type: _types2.default.task.stopping_queue, task: task }, opt);\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _util = require('../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _moment = require('moment/min/moment.min');\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar queueInitialState = {\n  loading: false,\n  error: null,\n  tasks: {},\n  queue: [],\n  completed: []\n};\n\nvar dateSort = _util2.default.sort.orderByFn('updated_at desc');\nvar prioritySort = _util2.default.sort.orderByFn('priority asc');\n\nvar queueReducer = function queueReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : queueInitialState;\n  var action = arguments[1];\n\n  switch (action.type) {\n    case _types2.default.task.index:\n      return _extends({}, state, {\n        tasks: action.data.reduce(function (a, b) {\n          return a[b.id] = b, a;\n        }, {}),\n        queue: action.data.filter(function (a) {\n          return !a.completed;\n        }).map(dateSort.mapFn).sort(dateSort.sortFn).map(function (pair) {\n          return pair[1].id;\n        }),\n        completed: action.data.filter(function (a) {\n          return a.completed;\n        }).map(prioritySort.mapFn).sort(prioritySort.sortFn).map(function (pair) {\n          return pair[1].id;\n        })\n      });\n    case _types2.default.task.create:\n      console.log(action.data);\n      return _extends({}, state, {\n        tasks: _extends({}, state.tasks, _defineProperty({}, action.data.id, action.data)),\n        queue: state.queue.concat([action.data.id])\n      });\n    case _types2.default.task.update:\n      return _extends({}, state, {\n        tasks: _extends({}, state.tasks, _defineProperty({}, action.data.id, action.data))\n      });\n    case _types2.default.task.destroy:\n      var _state$tasks = state.tasks,\n          deletedTask = _state$tasks[action.data.id],\n          taskLookup = _objectWithoutProperties(_state$tasks, [action.data.id]);\n\n      return _extends({}, state, {\n        queue: state.queue.filter(function (id) {\n          return id !== deletedTask.id;\n        }),\n        completed: state.completed.filter(function (id) {\n          return id !== deletedTask.id;\n        }),\n        tasks: taskLookup\n      });\n    case _types2.default.task.task_finish:\n      return _extends({}, state, {\n        queue: state.queue.filter(function (a) {\n          return a !== action.task.id;\n        }),\n        completed: [action.task.id].concat(state.completed)\n      });\n    default:\n      return state;\n  }\n};\n\nexports.default = queueReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _store = require('../store');\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _socket = require('./socket.connection');\n\nvar _socket2 = require('./socket.actions');\n\nvar actions = _interopRequireWildcard(_socket2);\n\nvar _socket3 = require('./socket.system');\n\nvar system = _interopRequireWildcard(_socket3);\n\nvar _socket4 = require('./socket.live');\n\nvar live = _interopRequireWildcard(_socket4);\n\nvar _socket5 = require('./socket.task');\n\nvar task = _interopRequireWildcard(_socket5);\n\nvar _socket6 = require('./socket.api');\n\nvar api = _interopRequireWildcard(_socket6);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = {\n  socket: _socket.socket,\n  actions: actions,\n  system: system,\n  live: live,\n  task: task,\n  api: api\n};\n\n\n_socket.socket.on('status', function (data) {\n  console.log('got status', data.key, data.value);\n  _store.store.dispatch(_extends({ type: _types2.default.socket.status }, data));\n  switch (data.key) {\n    case 'processing':\n      _store.store.dispatch(_extends({\n        type: 'SET_PARAM'\n      }, data));\n      break;\n    default:\n      break;\n  }\n});","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.syscall_async = exports.read_file = exports.upload_file = exports.run_script = exports.list_sequences = exports.count_directory = exports.list_directory = exports.disk_usage = exports.run_system_command = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('./socket.connection');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar run_system_command = exports.run_system_command = function run_system_command(opt) {\n  return syscall_async('run_system_command', opt);\n};\nvar disk_usage = exports.disk_usage = function disk_usage(opt) {\n  return syscall_async('run_system_command', _extends({ cmd: 'du' }, opt));\n};\nvar list_directory = exports.list_directory = function list_directory(opt) {\n  return syscall_async('list_directory', opt).then(function (res) {\n    return res.files;\n  });\n};\nvar count_directory = exports.count_directory = function count_directory(opt) {\n  return syscall_async('count_directory', opt).then(function (res) {\n    return res.count;\n  });\n};\nvar list_sequences = exports.list_sequences = function list_sequences(opt) {\n  return syscall_async('list_sequences', opt).then(function (res) {\n    return res.sequences;\n  });\n};\nvar run_script = exports.run_script = function run_script(opt) {\n  return syscall_async('run_script', opt);\n};\nvar upload_file = exports.upload_file = function upload_file(opt) {\n  return syscall_async('upload_file', opt);\n};\nvar read_file = exports.read_file = function read_file(opt) {\n  return syscall_async('read_file', opt).then(function (res) {\n    return res.file;\n  });\n};\n\nvar syscall_async = exports.syscall_async = function syscall_async(tag, payload) {\n  var ttl = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10000;\n\n  ttl = payload.ttl || ttl;\n  return new Promise(function (resolve, reject) {\n    var uuid = (0, _v2.default)();\n    var timeout = setTimeout(function () {\n      _socket.socket.off('system_res', cb);\n      reject('timeout');\n    }, ttl);\n    var cb = function cb(data) {\n      if (!data.uuid) return;\n      if (data.uuid === uuid) {\n        clearTimeout(timeout);\n        _socket.socket.off('system_res', cb);\n        resolve(data);\n      }\n    };\n    _socket.socket.emit('system', { cmd: tag, payload: payload, uuid: uuid });\n    _socket.socket.on('system_res', cb);\n  });\n};","'use strict';\n\nvar _store = require('../store');\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _socket = require('./socket.connection');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n_socket.socket.on('api_res', function (data) {\n  // console.log('system response', data)\n  data = parse(data);\n  var type = _types2.default[data.datatype];\n  console.log('api_res', data.type, data.datatype);\n  if (!type) return console.error('socket:api_res bad datatype', data.datatype);\n  switch (data.type) {\n    case 'create':\n      return (0, _store.dispatch)({\n        type: type.create,\n        source: 'socket',\n        data: data.data\n      });\n    case 'update':\n      return (0, _store.dispatch)({\n        type: type.update,\n        source: 'socket',\n        data: data.data\n      });\n    case 'destroy':\n      return (0, _store.dispatch)({\n        type: type.destroy,\n        source: 'socket',\n        data: data.data\n      });\n    default:\n      break;\n  }\n});\n\nfunction parse(s) {\n  if (typeof s === 'string') {\n    try {\n      var d = JSON.parse(s);\n      return d;\n    } catch (e) {\n      console.error('not valid json');\n      return s;\n    }\n  }\n  return s;\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.socket = undefined;\n\nvar _store = require('../store');\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar socket = exports.socket = io.connect('/client');\n\n// SOCKET ACTIONS\n\nsocket.on('connect', function () {\n  return _store.store.dispatch({ type: _types2.default.socket.connect });\n});\nsocket.on('connect_error', function (error) {\n  return _store.store.dispatch({ type: _types2.default.socket.connect_error, error: error });\n});\nsocket.on('reconnect', function (attempt) {\n  return _store.store.dispatch({ type: _types2.default.socket.reconnect, attempt: attempt });\n});\nsocket.on('reconnecting', function () {\n  return _store.store.dispatch({ type: _types2.default.socket.reconnecting });\n});\nsocket.on('reconnect_error', function (error) {\n  return _store.store.dispatch({ type: _types2.default.socket.reconnect_error, error: error });\n});\nsocket.on('reconnect_failed', function (error) {\n  return _store.store.dispatch({ type: _types2.default.socket.reconnect_failed, error: error });\n});\nsocket.on('disconnect', function () {\n  return _store.store.dispatch({ type: _types2.default.socket.disconnect });\n});\nsocket.on('error', function (error) {\n  return _store.store.dispatch({ type: _types2.default.socket.error, error: error });\n});","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.list_checkpoints = list_checkpoints;\nexports.list_all_checkpoints = list_all_checkpoints;\nexports.list_epochs = list_epochs;\nexports.list_sequences = list_sequences;\nexports.load_epoch = load_epoch;\nexports.load_sequence = load_sequence;\nexports.seek = seek;\nexports.pause = pause;\nexports.play = play;\nexports.get_params = get_params;\nexports.set_param = set_param;\n\nvar _store = require('../store');\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _player = require('../live/player');\n\nvar player = _interopRequireWildcard(_player);\n\nvar _socket = require('./socket.connection');\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n_socket.socket.on('res', function (data) {\n  // console.log('socket:', data.cmd)\n  switch (data.cmd) {\n    case 'get_last_frame':\n      if (data.res !== 'working') {\n        _socket.socket.emit('cmd', {\n          cmd: 'get_last_frame'\n        });\n      }\n      break;\n    case 'get_params':\n      data.res && (0, _store.dispatch)({\n        type: _types2.default.socket.load_params,\n        opt: data.res\n      });\n      data.res && player.toggleFPS(data.res.processing);\n      break;\n    case 'list_checkpoints':\n      (0, _store.dispatch)({\n        type: _types2.default.socket.list_checkpoints,\n        checkpoints: data.res\n      });\n      break;\n    case 'list_all_checkpoints':\n      (0, _store.dispatch)({\n        type: _types2.default.socket.list_all_checkpoints,\n        checkpoints: data.res\n      });\n      break;\n    case 'list_epochs':\n      (0, _store.dispatch)({\n        type: _types2.default.socket.list_epochs,\n        epochs: data.res\n      });\n      break;\n    case 'list_sequences':\n      (0, _store.dispatch)({\n        type: _types2.default.socket.list_sequences,\n        sequences: data.res\n      });\n      break;\n    default:\n      break;\n  }\n  // console.log(data)\n});\n\n_socket.socket.on('frame', player.onFrame);\n\nfunction list_checkpoints(module) {\n  _socket.socket.emit('cmd', {\n    cmd: 'list_checkpoints',\n    payload: module\n  });\n}\nfunction list_all_checkpoints(module) {\n  _socket.socket.emit('cmd', {\n    cmd: 'list_all_checkpoints',\n    payload: module\n  });\n}\nfunction list_epochs(module, checkpoint_name) {\n  _socket.socket.emit('cmd', {\n    cmd: 'list_epochs',\n    payload: module === 'pix2pix' || module === 'pix2wav' ? module + '/' + checkpoint_name : checkpoint_name\n  });\n}\nfunction list_sequences(module) {\n  _socket.socket.emit('cmd', {\n    cmd: 'list_sequences',\n    payload: module\n  });\n}\nfunction load_epoch(checkpoint_name, epoch) {\n  console.log(\">> SWITCH CHECKPOINT\", checkpoint_name, epoch);\n  _socket.socket.emit('cmd', {\n    cmd: 'load_epoch',\n    payload: checkpoint_name + ':' + epoch\n  });\n}\nfunction load_sequence(sequence) {\n  _socket.socket.emit('cmd', {\n    cmd: 'load_sequence',\n    payload: sequence\n  });\n}\nfunction seek(frame) {\n  _socket.socket.emit('cmd', {\n    cmd: 'seek',\n    payload: frame\n  });\n}\nfunction pause(frame) {\n  _socket.socket.emit('cmd', {\n    cmd: 'pause'\n  });\n}\nfunction play(frame) {\n  _socket.socket.emit('cmd', {\n    cmd: 'play'\n  });\n}\nfunction get_params() {\n  _socket.socket.emit('cmd', {\n    cmd: 'get_params'\n  });\n}\nfunction set_param(key, value) {\n  _socket.socket.emit('cmd', {\n    cmd: 'set_param',\n    payload: {\n      'key': key,\n      'value': value\n    }\n  });\n}","'use strict';\n\nvar _store = require('../store');\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _socket = require('./socket.connection');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n_socket.socket.on('system_res', function (data) {\n  // console.log('system response', data)\n  switch (data.type) {\n    case 'relay_connected':\n      return (0, _store.dispatch)({\n        type: _types2.default.system.relay_connected\n      });\n    case 'relay_disconnected':\n      return (0, _store.dispatch)({\n        type: _types2.default.system.relay_disconnected\n      });\n    case 'rpc_connected':\n      return (0, _store.dispatch)({\n        type: _types2.default.system.rpc_connected,\n        runner: data.runner\n      });\n    case 'rpc_disconnected':\n      return (0, _store.dispatch)({\n        type: _types2.default.system.rpc_disconnected\n      });\n    case 'relay_status':\n      return (0, _store.dispatch)({\n        type: data.rpc_connected ? _types2.default.system.rpc_connected : _types2.default.system.rpc_disconnected,\n        runner: data.runner\n      });\n    case 'site':\n      return (0, _store.dispatch)({\n        type: _types2.default.system.load_site,\n        site: data.site\n      });\n    default:\n      break;\n  }\n});","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.stop_queue = exports.start_queue = exports.stop_task = exports.start_task = exports.remove_task = exports.add_task = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nexports.emit = emit;\n\nvar _store = require('../store');\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _socket = require('./socket.connection');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar finishTimeout = void 0;\n\n_socket.socket.on('task_res', function (raw_data) {\n  // does not like the nested task object for some reason..\n  var data = void 0;\n  try {\n    if (typeof raw_data === 'string') {\n      data = JSON.parse(raw_data);\n      if (typeof data === 'string') {\n        data = JSON.parse(data);\n      }\n    } else {\n      data = raw_data;\n    }\n  } catch (e) {\n    console.warn('problem with json', e);\n    return;\n  }\n  if (data.task) {\n    (0, _store.dispatch)({ type: _types2.default.task.update, data: data.task });\n  }\n  // console.log('task', data.type)\n  switch (data.type) {\n    case 'start':\n      // return dispatch({ type: types.system.rpc_connected, runner: data.runner })\n      break;\n    case 'stop':\n      break;\n    // begin and finish calls often arrive out of order, if the old task was preempted\n    case 'task_begin':\n      (0, _store.dispatch)({ type: _types2.default.task.task_begin, task: data.task });\n      break;\n    case 'task_finish':\n      (0, _store.dispatch)({ type: _types2.default.task.task_finish, task: data.task });\n      break;\n    case 'kill':\n      break;\n    case 'stdout':\n      return (0, _store.dispatch)({ type: _types2.default.system.stdout, data: data });\n      break;\n    case 'stderr':\n      return (0, _store.dispatch)({ type: _types2.default.system.stderr, data: data });\n      break;\n    case 'add':\n      break;\n    case 'remove':\n      break;\n    case 'start_queue':\n      break;\n    case 'stop_queue':\n      break;\n    case 'list':\n      break;\n    case 'set_priority':\n      break;\n    case 'progress':\n      (0, _store.dispatch)({ type: _types2.default.task.progress, task: data.task });\n      break;\n    case 'epoch':\n      (0, _store.dispatch)({ type: _types2.default.task.epoch, task: data.task });\n      break;\n    case 'task_error':\n      return console.log('task error', data);\n    default:\n      console.log(data);\n      return console.log('no such task command', data.type);\n  }\n});\n\nfunction emit(type) {\n  var task = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  var opt = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n  _socket.socket.emit('task', _extends({ type: type, task: task }, opt));\n}\n\nvar add_task = exports.add_task = function add_task(task) {\n  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  return emit('add', task, opt);\n};\nvar remove_task = exports.remove_task = function remove_task(task) {\n  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  return emit('remove', task, opt);\n};\nvar start_task = exports.start_task = function start_task(task) {\n  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  return emit('start', task, opt);\n};\nvar stop_task = exports.stop_task = function stop_task(task) {\n  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  return emit('stop', task, opt);\n};\nvar start_queue = exports.start_queue = function start_queue() {\n  var opt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  return emit('start_queue', {}, opt);\n};\nvar stop_queue = exports.stop_queue = function stop_queue() {\n  var opt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  return emit('stop_queue', {}, opt);\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.dispatch = exports.store = exports.history = undefined;\n\nvar _redux = require('redux');\n\nvar _reactRouterRedux = require('react-router-redux');\n\nvar _reduxThunk = require('redux-thunk');\n\nvar _reduxThunk2 = _interopRequireDefault(_reduxThunk);\n\nvar _createBrowserHistory = require('history/createBrowserHistory');\n\nvar _createBrowserHistory2 = _interopRequireDefault(_createBrowserHistory);\n\nvar _auth = require('./auth/auth.reducer');\n\nvar _auth2 = _interopRequireDefault(_auth);\n\nvar _live = require('./live/live.reducer');\n\nvar _live2 = _interopRequireDefault(_live);\n\nvar _queue = require('./queue/queue.reducer');\n\nvar _queue2 = _interopRequireDefault(_queue);\n\nvar _system = require('./system/system.reducer');\n\nvar _system2 = _interopRequireDefault(_system);\n\nvar _upload = require('./dataset/upload.reducer');\n\nvar _upload2 = _interopRequireDefault(_upload);\n\nvar _browser = require('./browser/browser.reducer');\n\nvar _browser2 = _interopRequireDefault(_browser);\n\nvar _dashboard = require('./dashboard/dashboard.reducer');\n\nvar _dashboard2 = _interopRequireDefault(_dashboard);\n\nvar _audioPlayer = require('./common/audioPlayer/audioPlayer.reducer');\n\nvar _audioPlayer2 = _interopRequireDefault(_audioPlayer);\n\nvar _module = require('./modules/module.reducer');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar appReducer = (0, _redux.combineReducers)({\n  router: _reactRouterRedux.routerReducer,\n  auth: _auth2.default,\n  live: _live2.default,\n  queue: _queue2.default,\n  system: _system2.default,\n  upload: _upload2.default,\n  browser: _browser2.default,\n  dashboard: _dashboard2.default,\n  audioPlayer: _audioPlayer2.default,\n  module: _module.moduleReducer\n});\n\n// import navReducer from './nav.reducer'\nvar history = exports.history = (0, _createBrowserHistory2.default)();\nvar store = exports.store = (0, _redux.createStore)(appReducer, (0, _redux.compose)((0, _redux.applyMiddleware)(\n// createLogger(),\n_reduxThunk2.default, (0, _reactRouterRedux.routerMiddleware)(history))));\n\nvar dispatch = exports.dispatch = store.dispatch;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.enqueue_test_task = exports.changeTool = exports.countDirectory = exports.listDirectory = exports.run = undefined;\n\nvar _socket = require('../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// import actions from '../actions'\n\nvar run = exports.run = function run(cmd) {\n  return function (dispatch) {\n    dispatch({ type: _types2.default.system.running_command, cmd: cmd });\n    _socket2.default.actions.run_system_command({ cmd: cmd }).then(function (data) {\n      dispatch({\n        type: _types2.default.system.command_output,\n        data: data\n      });\n    });\n  };\n};\n\nvar listDirectory = exports.listDirectory = function listDirectory(opt) {\n  return function (dispatch) {\n    dispatch({ type: _types2.default.system.listing_directory, opt: opt });\n    _socket2.default.actions.list_directory(opt).then(function (data) {\n      dispatch({\n        type: _types2.default.system.list_directory,\n        data: data\n      });\n    });\n  };\n};\n\nvar countDirectory = exports.countDirectory = function countDirectory(opt) {\n  return function (dispatch) {\n    dispatch({ type: _types2.default.system.counting_directory, opt: opt });\n    _socket2.default.actions.count_directory(opt).then(function (data) {\n      dispatch({\n        type: _types2.default.system.count_directory,\n        data: data\n      });\n    });\n  };\n};\n\nvar changeTool = exports.changeTool = function changeTool(tool) {\n  localStorage.setItem('system.last_tool', tool);\n  return { type: _types2.default.app.change_tool, tool: tool };\n};\n\nvar enqueue_test_task = exports.enqueue_test_task = function enqueue_test_task(dataset) {\n  return function (dispatch) {\n    var task = {\n      module: 'test',\n      activity: 'cpu',\n      dataset: dataset\n      // return actions.queue.add_task(task)\n    };\n  };\n};\n\nwindow.addEventListener('keyDown', function (e) {\n  if (e.altKey) {\n    switch (e.keyCode) {\n      case 192:\n        // tilde - switch tool\n        break;\n      case 49:\n        // 1\n        break;\n      case 50:\n        // 2\n        break;\n      case 51:\n        // 3\n        break;\n      case 52:\n        // 4\n        break;\n      case 53:\n        // 5\n        break;\n      case 54:\n        // 6\n        break;\n      case 55:\n        // 7\n        break;\n      case 56:\n        // 8\n        break;\n      case 57:\n        // 9\n        break;\n      case 48:\n        // 0\n        break;\n    }\n  }\n});","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _group = require('../common/group.component');\n\nvar _group2 = _interopRequireDefault(_group);\n\nvar _param = require('../common/param.component');\n\nvar _param2 = _interopRequireDefault(_param);\n\nvar _system = require('./system.actions');\n\nvar systemActions = _interopRequireWildcard(_system);\n\nvar _live = require('../live/live.actions');\n\nvar liveActions = _interopRequireWildcard(_live);\n\nvar _queue = require('../queue/queue.actions');\n\nvar queueActions = _interopRequireWildcard(_queue);\n\nvar _auth = require('../auth/auth.actions');\n\nvar authActions = _interopRequireWildcard(_auth);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar cpu_test_task = {\n  activity: 'cpu',\n  module: 'test',\n  dataset: 'test',\n  epochs: 1,\n  opt: {}\n};\nvar gpu_test_task = {\n  activity: 'gpu',\n  module: 'test',\n  dataset: 'test',\n  epochs: 1,\n  opt: {}\n};\nvar live_test_task = {\n  activity: 'live',\n  module: 'test',\n  dataset: 'test',\n  epochs: 1,\n  opt: {}\n};\nvar wait_test_task = {\n  activity: 'wait',\n  module: 'test',\n  dataset: 'test',\n  epochs: 1,\n  opt: {}\n};\nvar fruits = [\"apple\", \"pear\", \"orange\", \"strawberry\"];\nfunction choice(a) {\n  return a[Math.floor(Math.random() * a.length)];\n}\n\nvar System = function (_Component) {\n  _inherits(System, _Component);\n\n  function System(props) {\n    _classCallCheck(this, System);\n\n    return _possibleConstructorReturn(this, (System.__proto__ || Object.getPrototypeOf(System)).call(this));\n  }\n\n  _createClass(System, [{\n    key: 'componentDidUpdate',\n    value: function componentDidUpdate() {\n      if (this._screen.scrollHeight > this._screen.scrollTop - this._screen.offsetHeight + 100) {\n        this._screen.scrollTop = this._screen.scrollHeight;\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props = this.props,\n          site = _props.site,\n          server = _props.server,\n          relay = _props.relay,\n          runner = _props.runner,\n          rpc = _props.rpc,\n          actions = _props.actions,\n          user = _props.user;\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'app system' },\n        (0, _preact.h)(\n          'div',\n          { className: 'heading' },\n          (0, _preact.h)(\n            'h1',\n            null,\n            site.name,\n            ' system'\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { className: 'row params' },\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _group2.default,\n              { title: 'Status' },\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Server' },\n                server.status\n              ),\n              server.error && (0, _preact.h)(\n                _param2.default,\n                { title: 'Server error' },\n                server.error.message\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Relay' },\n                relay.status\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'RPC' },\n                rpc.status\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'CPU' },\n                this.renderStatus(runner.cpu)\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'GPU' },\n                this.renderStatus(runner.gpu)\n              )\n            ),\n            (0, _preact.h)(\n              _group2.default,\n              { title: 'Diagnostics' },\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Check GPU' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.system.run('nvidia-smi');\n                    } },\n                  'nvidia-smi'\n                )\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'List processes' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.system.run('ps');\n                    } },\n                  'ps'\n                )\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'List users' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.system.run('w');\n                    } },\n                  'w'\n                )\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Disk free space' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.system.run('df');\n                    } },\n                  'df'\n                )\n              )\n            ),\n            (0, _preact.h)(\n              _group2.default,\n              { title: 'Tasks' },\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Kill task' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.stop_task('cpu');\n                    } },\n                  'CPU'\n                ),\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.stop_task('gpu');\n                    } },\n                  'GPU'\n                )\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Queue' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.start_queue();\n                    } },\n                  'Start'\n                ),\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.stop_queue();\n                    } },\n                  'Stop'\n                )\n              )\n            ),\n            (0, _preact.h)(\n              _group2.default,\n              { title: 'Auth' },\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Logged in as ' + user.username },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.auth.logout();\n                    } },\n                  'Logout'\n                )\n              )\n            ),\n            (0, _preact.h)(\n              _group2.default,\n              { title: 'Test' },\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'CPU Test Task' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.start_task(cpu_test_task, { preempt: true, watch: true });\n                    } },\n                  'Start'\n                ),\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.stop_task(runner.cpu.task);\n                    } },\n                  'Stop'\n                )\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'GPU Test Task' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.start_task(gpu_test_task, { preempt: true, watch: true });\n                    } },\n                  'Start'\n                ),\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.stop_task(runner.gpu.task);\n                    } },\n                  'Stop'\n                )\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Live Test Task' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.start_task(live_test_task, { preempt: true, watch: true });\n                    } },\n                  'Start'\n                ),\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.stop_task(runner.cpu.task);\n                    } },\n                  'Stop'\n                )\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Test Live RPC' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.live.get_params();\n                    } },\n                  'Get'\n                ),\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.live.set_param('fruit', choice(fruits));\n                    } },\n                  'Set'\n                )\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Queue Tests' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.system.enqueue_test_task(choice(fruits));\n                    } },\n                  '+Add test task'\n                )\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: '' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.start_task(wait_test_task, { preempt: true, watch: true });\n                    } },\n                  'Wait and Buzz'\n                )\n              )\n            )\n          ),\n          this.renderCommandOutput()\n        )\n      );\n    }\n  }, {\n    key: 'renderStatus',\n    value: function renderStatus(processor) {\n      if (!processor) {\n        return 'unknown';\n      }\n      if (processor.status === 'IDLE') {\n        return 'idle';\n      }\n      var task = processor.task;\n      return task.activity + ' ' + task.module;\n    }\n  }, {\n    key: 'renderCommandOutput',\n    value: function renderCommandOutput() {\n      var _this2 = this;\n\n      var _props2 = this.props,\n          cmd = _props2.cmd,\n          stdout = _props2.stdout,\n          stderr = _props2.stderr;\n\n      var output = void 0;\n      if (cmd.loading) {\n        output = 'Loading: ' + cmd.name;\n      } else if (cmd.loaded) {\n        if (cmd.error) {\n          output = 'Error: ' + cmd.name + '\\n\\n' + JSON.stringify(cmd.error, null, 2);\n        } else {\n          output = cmd.stdout;\n          if (cmd.stderr) {\n            output += '\\n\\n_________________________________\\n\\n';\n            output += cmd.stderr;\n          }\n        }\n      } else {\n        output = stdout;\n        if (stderr.length) {\n          output += '\\n\\n_________________________________\\n\\n';\n          output += stderr;\n        }\n      }\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)(\n          'div',\n          { ref: function ref(_ref) {\n              return _this2._screen = _ref;\n            }, className: 'screen' },\n          output\n        )\n      );\n    }\n  }]);\n\n  return System;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return _extends({\n    user: state.auth.user\n  }, state.system, state.live);\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: {\n      auth: (0, _redux.bindActionCreators)(authActions, dispatch),\n      system: (0, _redux.bindActionCreators)(systemActions, dispatch),\n      queue: (0, _redux.bindActionCreators)(queueActions, dispatch),\n      live: (0, _redux.bindActionCreators)(liveActions, dispatch)\n    }\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(System);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _moment = require('moment/min/moment.min');\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar FileSaver = require('file-saver');\n\nvar systemInitialState = {\n  loading: false,\n  error: null,\n\n  site: {\n    name: 'loading'\n  },\n  app: {\n    tool: localStorage.getItem('system.last_tool') || 'pix2pix'\n  },\n  server: {\n    connected: false,\n    status: \"disconnected\",\n    error: null\n  },\n  relay: {\n    connected: false,\n    status: \"unknown\",\n    error: null\n  },\n  rpc: {\n    connected: false,\n    status: \"disconnected\",\n    error: null\n  },\n  cmd: {\n    loading: false,\n    loaded: false,\n    name: null,\n    error: null,\n    stdout: \"\",\n    stderr: \"\"\n  },\n  runner: {\n    cpu: { status: 'IDLE', task: {} },\n    gpu: { status: 'IDLE', task: {} }\n  },\n  stdout: \"\",\n  stderr: \"\"\n};\n\nvar modules = ['pix2pix', 'samplernn', 'pix2wav'].reduce(function (a, b) {\n  return a[b] = b, a;\n}, {});\n\nvar systemReducer = function systemReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : systemInitialState;\n  var action = arguments[1];\n\n  // console.log(action.type)\n  var processor = null;\n  switch (action.type) {\n    case _types2.default.socket.connect:\n    case _types2.default.socket.reconnecting:\n      return _extends({}, state, {\n        server: {\n          status: 'connected',\n          connected: true,\n          error: null\n        }\n      });\n    case _types2.default.socket.reconnect:\n      return _extends({}, state, {\n        server: {\n          status: 'reconnecting (attempt ' + action.attempt + ')',\n          connected: false,\n          error: null\n        }\n      });\n    case _types2.default.socket.connect_error:\n    case _types2.default.socket.reconnect_error:\n    case _types2.default.socket.disconnect:\n    case _types2.default.socket.reconnect_failed:\n      return _extends({}, state, {\n        server: {\n          status: 'disconnected',\n          connected: false,\n          error: action.error || null\n        }\n      });\n    case _types2.default.socket.error:\n      return _extends({}, state, {\n        server: _extends({}, state.socket, {\n          error: action.error\n        })\n      });\n    case _types2.default.system.relay_connected:\n      return _extends({}, state, {\n        relay: {\n          status: 'connected',\n          connected: true,\n          error: null\n        }\n      });\n    case _types2.default.system.relay_disconnected:\n      return _extends({}, state, {\n        relay: {\n          status: 'disconnected',\n          connected: false,\n          error: null\n        },\n        rpc: {\n          status: 'disconnected',\n          connected: false,\n          error: null\n        }\n      });\n    case _types2.default.system.rpc_connected:\n      return _extends({}, state, {\n        rpc: {\n          status: 'connected',\n          connected: true,\n          error: null\n        },\n        runner: action.runner\n      });\n    case _types2.default.system.rpc_disconnected:\n      return _extends({}, state, {\n        rpc: {\n          status: 'disconnected',\n          connected: false,\n          error: null\n        },\n        runner: action.runner || state.runner\n      });\n    case _types2.default.system.load_site:\n      document.querySelector('title').innerHTML = action.site.name + '.cortex';\n      var tool = state.app.tool;\n      var path = window.location.pathname.split('/')[1];\n      if (path in modules) {\n        tool = path;\n      }\n      return _extends({}, state, {\n        site: action.site,\n        app: _extends({}, state.app, {\n          tool: tool\n        })\n      });\n    case _types2.default.system.running_command:\n      return _extends({}, state, {\n        cmd: {\n          loading: true,\n          loaded: false,\n          name: action.cmd,\n          error: null,\n          stdout: null,\n          stderr: null\n        }\n      });\n    case _types2.default.system.command_output:\n      return _extends({}, state, {\n        cmd: {\n          loading: false,\n          loaded: true,\n          name: action.data.cmd,\n          error: action.data.error,\n          stdout: action.data.stdout,\n          stderr: action.data.stderr\n        }\n      });\n    case _types2.default.task.task_begin:\n      console.log('task begin', action.task, action.task.processor);\n      return _extends({}, state, {\n        runner: _extends({}, state.runner, _defineProperty({}, action.task.processor, { status: 'RUNNING', task: action.task })),\n        cmd: _extends({}, state.cmd, {\n          loaded: false,\n          stdout: \"\",\n          stderr: \"\"\n        }),\n        stdout: \"\",\n        stderr: \"\"\n      });\n    case _types2.default.task.task_finish:\n      if (action.task.processor === 'cpu' || state.runner.cpu.task && state.runner.cpu.task.uuid === action.task.uuid) {\n        processor = 'cpu';\n      } else if (action.task.processor === 'gpu' || state.runner.gpu.task && state.runner.gpu.task.uuid === action.task.uuid) {\n        processor = 'gpu';\n      } else {\n        processor = null;\n      }\n      console.log('task finish', action);\n      return _extends({}, state, {\n        rpc: {\n          connected: false,\n          status: \"disconnected\",\n          error: null\n        },\n        runner: processor ? _extends({}, state.runner, _defineProperty({}, processor, { status: 'IDLE', task: {} })) : state.runner\n      });\n    case _types2.default.app.change_tool:\n      return _extends({}, state, {\n        app: _extends({}, state.app, {\n          tool: action.tool\n        })\n      });\n    case _types2.default.system.stdout:\n      if (action.data.processor && state.runner[action.data.processor]) {\n        return _extends({}, state, {\n          runner: _extends({}, state.runner, _defineProperty({}, action.data.processor, _extends({}, state.runner[action.data.processor], {\n            last_message: action.data.data\n          }))),\n          stdout: state.stdout + action.data.data\n        });\n      }\n      return _extends({}, state, {\n        stdout: state.stdout + action.data.data\n      });\n    case _types2.default.system.stderr:\n      return _extends({}, state, {\n        last_message: action.data.data,\n        stderr: state.stderr + action.data.data\n      });\n    default:\n      return state;\n  }\n};\n\nexports.default = systemReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _crud = require('./api/crud.types');\n\nexports.default = {\n\tsystem: {\n\t\tload_site: 'SYSTEM_LOAD_SITE',\n\t\trunning_command: 'SYSTEM_RUNNING_COMMAND',\n\t\tcommand_output: 'SYSTEM_COMMAND_OUTPUT',\n\t\trelay_connected: 'SYSTEM_RELAY_CONNECTED',\n\t\trelay_disconnected: 'SYSTEM_RELAY_DISCONNECTED',\n\t\trpc_connected: 'SYSTEM_RPC_CONNECTED',\n\t\trpc_disconnected: 'SYSTEM_RPC_DISCONNECTED',\n\t\tlist_directory: 'SYSTEM_LIST_DIRECTORY',\n\t\tlisting_directory: 'SYSTEM_LISTING_DIRECTORY',\n\t\tcount_directory: 'SYSTEM_COUNT_DIRECTORY',\n\t\tcounting_directory: 'SYSTEM_COUNTING_DIRECTORY',\n\t\tstdout: 'SYSTEM_STDOUT',\n\t\tstderr: 'SYSTEM_STDERR'\n\t},\n\tapp: {\n\t\tchange_tool: \"APP_CHANGE_TOOL\",\n\t\tload_progress: \"APP_LOAD_PROGRESS\"\n\t},\n\tfolder: (0, _crud.crud_type)('folder', []),\n\tfile: (0, _crud.crud_type)('file', []),\n\ttask: (0, _crud.crud_type)('task', ['starting_task', 'stopping_task', 'task_begin', 'task_finish', 'start_queue', 'stop_queue', 'starting_queue', 'stopping_queue', 'progress', 'epoch']),\n\tauth: (0, _crud.crud_type)('auth', ['set_token', 'set_error', 'set_current_user', 'logout_user', 'loading', 'initialized', 'set_return_to']),\n\tsocket: {\n\t\tconnect: 'SOCKET_CONNECT',\n\t\tconnect_error: 'SOCKET_CONNECT_ERROR',\n\t\treconnect: 'SOCKET_RECONNECT',\n\t\treconnecting: 'SOCKET_RECONNECTING',\n\t\treconnect_error: 'SOCKET_RECONNECT_ERROR',\n\t\treconnect_failed: 'SOCKET_RECONNECT_FAILED',\n\t\tdisconnect: 'SOCKET_DISCONNECT',\n\t\terror: 'SOCKET_ERROR',\n\t\tstatus: 'SOCKET_STATUS',\n\n\t\tload_params: 'SOCKET_LOAD_PARAMS',\n\t\tlist_checkpoints: 'SOCKET_LIST_CHECKPOINTS',\n\t\tlist_sequences: 'SOCKET_LIST_SEQUENCES',\n\t\tlist_epochs: 'SOCKET_LIST_EPOCHS'\n\t},\n\tplayer: {\n\t\tget_params: 'GET_PARAMS',\n\t\tset_param: 'SET_PARAM',\n\n\t\tloading_checkpoints: 'LOADING_CHECKPOINTS',\n\t\tloading_checkpoint: 'LOADING_CHECKPOINT',\n\t\tlist_checkpoints: 'LIST_CHECKPOINTS',\n\n\t\tloading_sequences: 'LOADING_SEQUENCES',\n\t\tloading_sequence: 'LOADING_SEQUENCE',\n\t\tload_sequence: 'LOAD_SEQUENCE',\n\n\t\tloading_epochs: 'LOADING_EPOCHS',\n\t\tload_epoch: 'LOAD_EPOCH',\n\n\t\tset_fps: 'SET_FPS',\n\t\tseeking: 'SEEKING',\n\t\tpausing: 'PAUSING',\n\t\tplaying: 'PLAYING',\n\t\tcurrent_frame: 'CURRENT_FRAME',\n\t\tstart_recording: 'START_RECORDING',\n\t\tadd_record_frame: 'ADD_RECORD_FRAME',\n\t\tsave_frame: 'SAVE_FRAME',\n\t\tsaving_video: 'SAVING_VIDEO',\n\t\tsave_video: 'SAVE_VIDEO',\n\n\t\tset_fullscreen: 'SET_FULLSCREEN'\n\t},\n\taudioPlayer: {\n\t\tplay: 'AUDIO_PLAY',\n\t\tpause: 'AUDIO_PAUSE',\n\t\tresume: 'AUDIO_RESUME',\n\t\tenqueue: 'AUDIO_ENQUEUE'\n\t},\n\tdataset: {\n\t\tload: 'DATASET_LOAD',\n\t\tset_folder: 'DATASET_SET_FOLDER',\n\t\tupload_files: 'DATASET_UPLOAD_FILES',\n\t\tfile_progress: 'DATASET_FILE_PROGRESS',\n\t\tfile_uploaded: 'DATASET_FILE_UPLOADED',\n\t\tfetch_url: 'DATASET_FETCH_URL',\n\t\tfetch_progress: 'DATASET_FETCH_PROGRESS',\n\t\tlist_epochs: 'DATASET_LIST_EPOCHS'\n\t},\n\tsamplernn: {\n\t\tinit: 'SAMPLERNN_INIT',\n\t\tset_folder: 'SAMPLERNN_SET_FOLDER',\n\t\tload_loss: 'SAMPLERNN_LOAD_LOSS',\n\t\tload_graph: 'SAMPLERNN_LOAD_GRAPH'\n\t\t// queue and train\n\t\t// update checkpoint settings\n\t\t// reset checkpoint settings\n\t\t// queue new checkpoint\n\t},\n\tpix2pix: (0, _crud.with_type)('pix2pix', ['init', 'set_folder']),\n\tpix2pixhd: (0, _crud.with_type)('pix2pixhd', ['init', 'set_folder', 'load_results', 'load_dataset_count']),\n\tpix2wav: (0, _crud.with_type)('pix2wav', ['init', 'set_folder']),\n\twav2pix: (0, _crud.with_type)('wav2pix', ['load', 'progress', 'finish', 'zip', 'uploading']),\n\tdashboard: (0, _crud.with_type)('dashboard', ['load']),\n\tmorph: (0, _crud.with_type)('morph', ['load'])\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.timeInSeconds = timeInSeconds;\nexports.gerund = gerund;\nexports.commatize = commatize;\nexports.carbon_date = carbon_date;\nexports.hush_views = hush_views;\nexports.hush_threads = hush_threads;\nexports.hush_size = hush_size;\nexports.hush_null = hush_null;\nexports.get_age = get_age;\nexports.courtesy_s = courtesy_s;\nfunction timeInSeconds(n) {\n  return (n / 10).toFixed(1) + ' s.';\n}\nfunction gerund(s) {\n  return s.replace(/e?$/, 'ing');\n}\nfunction commatize(n, radix) {\n  radix = radix || 1024;\n  var nums = [],\n      i,\n      counter = 0,\n      r = Math.floor;\n  if (n > radix) {\n    n /= radix;\n    nums.unshift(r(n * 10 % 10));\n    nums.unshift(\".\");\n  }\n  do {\n    i = n % 10;\n    n = r(n / 10);\n    if (n && !(++counter % 3)) {\n      i = ' ' + r(i);\n    }\n    nums.unshift(r(i));\n  } while (n);\n  return nums.join(\"\");\n}\nfunction carbon_date(date, no_bold) {\n  var span = (+new Date() - new Date(date)) / 1000,\n      color;\n  if (!no_bold && span < 86400) // modified today\n    {\n      color = \"new\";\n    } else if (span < 604800) // modifed this week\n    {\n      color = \"recent\";\n    } else if (span < 1209600) // modifed 2 weeks ago\n    {\n      color = \"med\";\n    } else if (span < 3024000) // modifed 5 weeks ago\n    {\n      color = \"old\";\n    } else if (span < 12315200) // modifed 6 months ago\n    {\n      color = \"older\";\n    } else {\n    color = \"quiet\";\n  }\n  return color;\n}\nfunction hush_views(n, bias, no_bold) {\n  var txt = commatize(n, 1000);\n  bias = bias || 1;\n  n = n || 0;\n  if (n < 30) {\n    return [\"quiet\", n + \" v.\"];\n  }\n  if (n < 200) {\n    return [\"quiet\", txt + \" v.\"];\n  } else if (n < 500) {\n    return [\"quiet\", txt + \" v.\"];\n  } else if (n < 1000) {\n    return [\"old\", txt + \" v.\"];\n  } else if (n < 5000) {\n    return [\"med\", txt + \" kv.\"];\n  } else if (no_bold || n < 10000) {\n    return [\"recent\", txt + \" kv.\"];\n  } else {\n    return [\"new\", txt + \" kv.\"];\n  }\n}\nfunction hush_threads(n, bias, no_bold) {\n  var txt = commatize(n, 1000);\n  bias = bias || 1;\n  n = n || 0;\n  if (n < 10) {\n    return [\"quiet\", n + \" t.\"];\n  } else if (n < 25) {\n    return [\"old\", txt + \" t.\"];\n  } else if (n < 50) {\n    return [\"med\", txt + \" t.\"];\n  } else if (no_bold || n < 100) {\n    return [\"recent\", txt + \" t.\"];\n  } else {\n    return [\"new\", txt + \" t.\"];\n  }\n}\nfunction hush_size(n, bias, no_bold) {\n  var txt = commatize(Math.round(n / 1024));\n  bias = 1 || bias;\n  n = n || 0;\n  if (!n) {\n    return ['', ''];\n  }\n  if (n < 1000) {\n    return [\"quiet\", n + \" b.\"];\n  }\n  if (n < 1000000) {\n    return [\"quiet\", txt + \" kb.\"];\n  } else if (n < 20000000 / bias) {\n    return [\"quiet\", txt + \" mb.\"];\n  } else if (n < 50000000 / bias) {\n    return [\"old\", txt + \" mb.\"];\n  } else if (n < 80000000 / bias) {\n    return [\"med\", txt + \" mb.\"];\n  } else if (no_bold || n < 170000000 / bias) {\n    return [\"recent\", txt + \" mb.\"];\n  } else {\n    return [\"new\", txt + \" mb.\"];\n  }\n}\nfunction hush_null(n, unit, no_bold) {\n  var s = unit ? n + \" \" + unit + \".\" : n;\n  if (n < 3) {\n    return [\"quiet\", s];\n  } else if (n < 6) {\n    return [\"older\", s];\n  } else if (n < 10) {\n    return [\"old\", s];\n  } else if (n < 16) {\n    return [\"med\", s];\n  } else if (no_bold || n < 21) {\n    return [\"recent\", s];\n  } else {\n    return [\"new\", s];\n  }\n}\nfunction get_age(t) {\n  var age = Math.abs(+Date.now() - new Date(t)) / 1000;\n  var r = Math.floor;\n  var m;\n  if (age < 5) {\n    return \"now\";\n  }\n  if (age < 60) {\n    return r(age) + \"s\";\n  }\n  age /= 60;\n  if (age < 60) {\n    return r(age) + \"m\";\n  }\n  m = r(age % 60);\n  age /= 60;\n  if (m > 0 && age < 2) {\n    return r(age) + \"h\" + m + \"m\";\n  }\n  if (age < 24) {\n    return r(age) + \"h\";\n  }\n  age /= 24;\n  if (age < 7) {\n    return r(age) + \"d\";\n  }\n  age /= 7;\n  if (age < 12) {\n    return r(age) + \"w\";\n  }\n  age /= 4;\n  if (age < 12) {\n    return r(age) + \"m\";\n  }\n  age /= 12;\n  return r(age) + \"y\";\n}\nfunction courtesy_s(n, s) {\n  return n == 1 ? \"\" : s || \"s\";\n}","'use strict';\n\n/**\n * HiDPI Canvas Polyfill (1.0.10)\n *\n * Author: Jonathan D. Johnson (http://jondavidjohn.com)\n * Homepage: https://github.com/jondavidjohn/hidpi-canvas-polyfill\n * Issue Tracker: https://github.com/jondavidjohn/hidpi-canvas-polyfill/issues\n * License: Apache-2.0\n*/\n(function (prototype) {\n\n  var pixelRatio = function () {\n    var canvas = window.document.createElement('canvas'),\n        context = canvas.getContext('2d'),\n        backingStore = context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1;\n\n    return (window.devicePixelRatio || 1) / backingStore;\n  }(),\n      forEach = function forEach(obj, func) {\n    for (var p in obj) {\n      if (obj.hasOwnProperty(p)) {\n        func(obj[p], p);\n      }\n    }\n  },\n      ratioArgs = {\n    'fillRect': 'all',\n    'clearRect': 'all',\n    'strokeRect': 'all',\n    'moveTo': 'all',\n    'lineTo': 'all',\n    'arc': [0, 1, 2],\n    'arcTo': 'all',\n    'bezierCurveTo': 'all',\n    'isPointinPath': 'all',\n    'isPointinStroke': 'all',\n    'quadraticCurveTo': 'all',\n    'rect': 'all',\n    'translate': 'all',\n    'createRadialGradient': 'all',\n    'createLinearGradient': 'all'\n  };\n\n  if (pixelRatio === 1) return;\n\n  forEach(ratioArgs, function (value, key) {\n    prototype[key] = function (_super) {\n      return function () {\n        var i,\n            len,\n            args = Array.prototype.slice.call(arguments);\n\n        if (value === 'all') {\n          args = args.map(function (a) {\n            return a * pixelRatio;\n          });\n        } else if (Array.isArray(value)) {\n          for (i = 0, len = value.length; i < len; i++) {\n            args[value[i]] *= pixelRatio;\n          }\n        }\n\n        return _super.apply(this, args);\n      };\n    }(prototype[key]);\n  });\n\n  // Stroke lineWidth adjustment\n  prototype.stroke = function (_super) {\n    return function () {\n      this.lineWidth *= pixelRatio;\n      _super.apply(this, arguments);\n      this.lineWidth /= pixelRatio;\n    };\n  }(prototype.stroke);\n\n  // Text\n  //\n  prototype.fillText = function (_super) {\n    return function () {\n      var args = Array.prototype.slice.call(arguments);\n\n      args[1] *= pixelRatio; // x\n      args[2] *= pixelRatio; // y\n\n      this.font = this.font.replace(/(\\d+)(px|em|rem|pt)/g, function (w, m, u) {\n        return m * pixelRatio + u;\n      });\n\n      _super.apply(this, args);\n\n      this.font = this.font.replace(/(\\d+)(px|em|rem|pt)/g, function (w, m, u) {\n        return m / pixelRatio + u;\n      });\n    };\n  }(prototype.fillText);\n\n  prototype.strokeText = function (_super) {\n    return function () {\n      var args = Array.prototype.slice.call(arguments);\n\n      args[1] *= pixelRatio; // x\n      args[2] *= pixelRatio; // y\n\n      this.font = this.font.replace(/(\\d+)(px|em|rem|pt)/g, function (w, m, u) {\n        return m * pixelRatio + u;\n      });\n\n      _super.apply(this, args);\n\n      this.font = this.font.replace(/(\\d+)(px|em|rem|pt)/g, function (w, m, u) {\n        return m / pixelRatio + u;\n      });\n    };\n  }(prototype.strokeText);\n})(window.CanvasRenderingContext2D.prototype);\n;(function (prototype) {\n  prototype.getContext = function (_super) {\n    return function (type) {\n      var backingStore, ratio, context;\n\n      if (type == '2d-lodpi') {\n        context = _super.call(this, '2d');\n      } else if (type === '2d') {\n        context = _super.call(this, '2d');\n\n        backingStore = context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1;\n\n        ratio = (window.devicePixelRatio || 1) / backingStore;\n\n        if (ratio > 1) {\n          this.style.height = this.height + 'px';\n          this.style.width = this.width + 'px';\n          this.width *= ratio;\n          this.height *= ratio;\n        }\n      } else {\n        context = _super.call(this, type);\n      }\n\n      return context;\n    };\n  }(prototype.getContext);\n})(window.HTMLCanvasElement.prototype);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _sort = require('./sort');\n\nvar sort = _interopRequireWildcard(_sort);\n\nvar _format = require('./format');\n\nvar format = _interopRequireWildcard(_format);\n\nvar _math = require('./math');\n\nvar maths = _interopRequireWildcard(_math);\n\nrequire('./hidpi-canvas');\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nvar is_iphone = !!(navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i));\nvar is_ipad = !!navigator.userAgent.match(/iPad/i);\nvar is_android = !!navigator.userAgent.match(/Android/i);\nvar is_mobile = is_iphone || is_ipad || is_android;\nvar is_desktop = !is_mobile;\n\nvar htmlClassList = document.body.parentNode.classList;\nhtmlClassList.add(is_desktop ? 'desktop' : 'mobile');\nhtmlClassList.remove('loading');\n\n// window.debug = false\n\nvar allProgress = function allProgress(promises, progress_cb) {\n  var d = 0;\n  progress_cb(0, 0, promises.length);\n  promises.forEach(function (p) {\n    p.then(function (s) {\n      d += 1;\n      progress_cb(Math.floor(d * 100 / promises.length), d, promises.length);\n      return s;\n    });\n  });\n  return Promise.all(promises);\n};\n\ndocument.body.style.backgroundImage = 'linear-gradient(' + (maths.randint(40) + 40) + 'deg, #fde, #ffe)';\n\nvar fieldSet = function fieldSet(defaultFields) {\n  return function (fields) {\n    if (fields) {\n      if (fields instanceof Set) {\n        return fields;\n      }\n      return new Set(fields.split(' '));\n    }\n    return defaultFields;\n  };\n};\n\nexports.default = _extends({}, maths, format, {\n  sort: sort,\n  allProgress: allProgress, fieldSet: fieldSet,\n  is_iphone: is_iphone, is_ipad: is_ipad, is_android: is_android, is_mobile: is_mobile, is_desktop: is_desktop\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.randrange = randrange;\nexports.randsign = randsign;\nexports.choice = choice;\nexports.angle = angle;\nexports.dist = dist;\nexports.xor = xor;\nexports.quantize = quantize;\nexports.shuffle = shuffle;\nexports.gaussian = gaussian;\nvar mod = exports.mod = function mod(n, m) {\n  return n - m * Math.floor(n / m);\n};\nvar clamp = exports.clamp = function clamp(n, a, b) {\n  return n < a ? a : n < b ? n : b;\n};\nvar norm = exports.norm = function norm(n, a, b) {\n  return (n - a) / (b - a);\n};\nvar lerp = exports.lerp = function lerp(n, a, b) {\n  return (b - a) * n + a;\n};\nvar mix = exports.mix = function mix(n, a, b) {\n  return a * (1 - n) + b * n;\n};\nvar randint = exports.randint = function randint(n) {\n  return Math.floor(Math.random() * n);\n};\nfunction randrange(a, b) {\n  return Math.random() * (b - a) + a;\n}\nfunction randsign() {\n  return Math.random() >= 0.5 ? -1 : 1;\n}\nfunction choice(a) {\n  return a[Math.floor(Math.random() * a.length)];\n}\nfunction angle(x0, y0, x1, y1) {\n  return Math.atan2(y1 - y0, x1 - x0);\n}\nfunction dist(x0, y0, x1, y1) {\n  return Math.sqrt(Math.pow(x1 - x0, 2) + Math.pow(y1 - y0, 2));\n}\nfunction xor(a, b) {\n  a = !!a;b = !!b;return (a || b) && !(a && b);\n}\nfunction quantize(a, b) {\n  return Math.floor(a / b) * b;\n}\nfunction shuffle(a) {\n  for (var i = a.length; i > 0; i--) {\n    var r = randint(i);\n    var swap = a[i - 1];\n    a[i - 1] = a[r];\n    a[r] = swap;\n  }\n  return a;\n}\n// returns a gaussian random function with the given mean and stdev.\nfunction gaussian(mean, stdev) {\n  var y2 = void 0;\n  var use_last = false;\n  return function () {\n    var y1 = void 0;\n    if (use_last) {\n      y1 = y2;\n      use_last = false;\n    } else {\n      var x1 = void 0,\n          x2 = void 0,\n          w = void 0;\n      do {\n        x1 = 2.0 * Math.random() - 1.0;\n        x2 = 2.0 * Math.random() - 1.0;\n        w = x1 * x1 + x2 * x2;\n      } while (w >= 1.0);\n      w = Math.sqrt(-2.0 * Math.log(w) / w);\n      y1 = x1 * w;\n      y2 = x2 * w;\n      use_last = true;\n    }\n\n    var retval = mean + stdev * y1;\n    if (retval > 0) return retval;\n    return -retval;\n  };\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar numericSort = exports.numericSort = {\n  asc: function asc(a, b) {\n    return a[0] - b[0];\n  },\n  desc: function desc(a, b) {\n    return b[0] - a[0];\n  }\n};\nvar stringSort = exports.stringSort = {\n  asc: function asc(a, b) {\n    return a[0].localeCompare(b[0]);\n  },\n  desc: function desc(a, b) {\n    return b[0].localeCompare(a[0]);\n  }\n};\nvar orderByFn = exports.orderByFn = function orderByFn() {\n  var s = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'name asc';\n\n  var _s$split = s.split(' '),\n      _s$split2 = _slicedToArray(_s$split, 2),\n      _s$split2$ = _s$split2[0],\n      field = _s$split2$ === undefined ? 'name' : _s$split2$,\n      _s$split2$2 = _s$split2[1],\n      direction = _s$split2$2 === undefined ? 'asc' : _s$split2$2;\n\n  var mapFn = void 0,\n      sortFn = void 0;\n  switch (field) {\n    case 'epoch':\n      mapFn = function mapFn(a) {\n        return [parseInt(a.epoch || a.epochs) || 0, a];\n      };\n      sortFn = numericSort[direction];\n      break;\n    case 'size':\n      mapFn = function mapFn(a) {\n        return [parseInt(a.size) || 0, a];\n      };\n      sortFn = numericSort[direction];\n      break;\n    case 'date':\n      mapFn = function mapFn(a) {\n        return [+new Date(a.date || a.created_at), a];\n      };\n      sortFn = numericSort[direction];\n      break;\n    case 'updated_at':\n      mapFn = function mapFn(a) {\n        return [+new Date(a.updated_at), a];\n      };\n      sortFn = numericSort[direction];\n      break;\n    case 'priority':\n      mapFn = function mapFn(a) {\n        return [parseInt(a.priority) || parseInt(a.id) || 1000, a];\n      };\n      sortFn = numericSort[direction];\n    case 'name':\n    default:\n      mapFn = function mapFn(a) {\n        return [a.name || \"\", a];\n      };\n      sortFn = stringSort[direction];\n      break;\n  }\n  return { mapFn: mapFn, sortFn: sortFn };\n};","(function (global, factory) {\n  if (typeof define === 'function' && define.amd) {\n    define(['exports', 'module'], factory);\n  } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {\n    factory(exports, module);\n  } else {\n    var mod = {\n      exports: {}\n    };\n    factory(mod.exports, mod);\n    global.fetchJsonp = mod.exports;\n  }\n})(this, function (exports, module) {\n  'use strict';\n\n  var defaultOptions = {\n    timeout: 5000,\n    jsonpCallback: 'callback',\n    jsonpCallbackFunction: null\n  };\n\n  function generateCallbackFunction() {\n    return 'jsonp_' + Date.now() + '_' + Math.ceil(Math.random() * 100000);\n  }\n\n  function clearFunction(functionName) {\n    // IE8 throws an exception when you try to delete a property on window\n    // http://stackoverflow.com/a/1824228/751089\n    try {\n      delete window[functionName];\n    } catch (e) {\n      window[functionName] = undefined;\n    }\n  }\n\n  function removeScript(scriptId) {\n    var script = document.getElementById(scriptId);\n    if (script) {\n      document.getElementsByTagName('head')[0].removeChild(script);\n    }\n  }\n\n  function fetchJsonp(_url) {\n    var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\n    // to avoid param reassign\n    var url = _url;\n    var timeout = options.timeout || defaultOptions.timeout;\n    var jsonpCallback = options.jsonpCallback || defaultOptions.jsonpCallback;\n\n    var timeoutId = undefined;\n\n    return new Promise(function (resolve, reject) {\n      var callbackFunction = options.jsonpCallbackFunction || generateCallbackFunction();\n      var scriptId = jsonpCallback + '_' + callbackFunction;\n\n      window[callbackFunction] = function (response) {\n        resolve({\n          ok: true,\n          // keep consistent with fetch API\n          json: function json() {\n            return Promise.resolve(response);\n          }\n        });\n\n        if (timeoutId) clearTimeout(timeoutId);\n\n        removeScript(scriptId);\n\n        clearFunction(callbackFunction);\n      };\n\n      // Check if the user set their own params, and if not add a ? to start a list of params\n      url += url.indexOf('?') === -1 ? '?' : '&';\n\n      var jsonpScript = document.createElement('script');\n      jsonpScript.setAttribute('src', '' + url + jsonpCallback + '=' + callbackFunction);\n      if (options.charset) {\n        jsonpScript.setAttribute('charset', options.charset);\n      }\n      jsonpScript.id = scriptId;\n      document.getElementsByTagName('head')[0].appendChild(jsonpScript);\n\n      timeoutId = setTimeout(function () {\n        reject(new Error('JSONP request to ' + _url + ' timed out'));\n\n        clearFunction(callbackFunction);\n        removeScript(scriptId);\n        window[callbackFunction] = function () {\n          clearFunction(callbackFunction);\n        };\n      }, timeout);\n\n      // Caught if got 404/500\n      jsonpScript.onerror = function () {\n        reject(new Error('JSONP request to ' + _url + ' failed'));\n\n        clearFunction(callbackFunction);\n        removeScript(scriptId);\n        if (timeoutId) clearTimeout(timeoutId);\n      };\n    });\n  }\n\n  // export as global function\n  /*\n  let local;\n  if (typeof global !== 'undefined') {\n    local = global;\n  } else if (typeof self !== 'undefined') {\n    local = self;\n  } else {\n    try {\n      local = Function('return this')();\n    } catch (e) {\n      throw new Error('polyfill failed because global object is unavailable in this environment');\n    }\n  }\n  local.fetchJsonp = fetchJsonp;\n  */\n\n  module.exports = fetchJsonp;\n});","'use strict';\n\nfunction FFT(size) {\n  this.size = size | 0;\n  if (this.size <= 1 || (this.size & (this.size - 1)) !== 0)\n    throw new Error('FFT size must be a power of two and bigger than 1');\n\n  this._csize = size << 1;\n\n  // NOTE: Use of `var` is intentional for old V8 versions\n  var table = new Array(this.size * 2);\n  for (var i = 0; i < table.length; i += 2) {\n    const angle = Math.PI * i / this.size;\n    table[i] = Math.cos(angle);\n    table[i + 1] = -Math.sin(angle);\n  }\n  this.table = table;\n\n  // Find size's power of two\n  var power = 0;\n  for (var t = 1; this.size > t; t <<= 1)\n    power++;\n\n  // Calculate initial step's width:\n  //   * If we are full radix-4 - it is 2x smaller to give inital len=8\n  //   * Otherwise it is the same as `power` to give len=4\n  this._width = power % 2 === 0 ? power - 1 : power;\n\n  // Pre-compute bit-reversal patterns\n  this._bitrev = new Array(1 << this._width);\n  for (var j = 0; j < this._bitrev.length; j++) {\n    this._bitrev[j] = 0;\n    for (var shift = 0; shift < this._width; shift += 2) {\n      var revShift = this._width - shift - 2;\n      this._bitrev[j] |= ((j >>> shift) & 3) << revShift;\n    }\n  }\n\n  this._out = null;\n  this._data = null;\n  this._inv = 0;\n}\nmodule.exports = FFT;\n\nFFT.prototype.fromComplexArray = function fromComplexArray(complex, storage) {\n  var res = storage || new Array(complex.length >>> 1);\n  for (var i = 0; i < complex.length; i += 2)\n    res[i >>> 1] = complex[i];\n  return res;\n};\n\nFFT.prototype.createComplexArray = function createComplexArray() {\n  const res = new Array(this._csize);\n  for (var i = 0; i < res.length; i++)\n    res[i] = 0;\n  return res;\n};\n\nFFT.prototype.toComplexArray = function toComplexArray(input, storage) {\n  var res = storage || this.createComplexArray();\n  for (var i = 0; i < res.length; i += 2) {\n    res[i] = input[i >>> 1];\n    res[i + 1] = 0;\n  }\n  return res;\n};\n\nFFT.prototype.completeSpectrum = function completeSpectrum(spectrum) {\n  var size = this._csize;\n  var half = size >>> 1;\n  for (var i = 2; i < half; i += 2) {\n    spectrum[size - i] = spectrum[i];\n    spectrum[size - i + 1] = -spectrum[i + 1];\n  }\n};\n\nFFT.prototype.transform = function transform(out, data) {\n  if (out === data)\n    throw new Error('Input and output buffers must be different');\n\n  this._out = out;\n  this._data = data;\n  this._inv = 0;\n  this._transform4();\n  this._out = null;\n  this._data = null;\n};\n\nFFT.prototype.realTransform = function realTransform(out, data) {\n  if (out === data)\n    throw new Error('Input and output buffers must be different');\n\n  this._out = out;\n  this._data = data;\n  this._inv = 0;\n  this._realTransform4();\n  this._out = null;\n  this._data = null;\n};\n\nFFT.prototype.inverseTransform = function inverseTransform(out, data) {\n  if (out === data)\n    throw new Error('Input and output buffers must be different');\n\n  this._out = out;\n  this._data = data;\n  this._inv = 1;\n  this._transform4();\n  for (var i = 0; i < out.length; i++)\n    out[i] /= this.size;\n  this._out = null;\n  this._data = null;\n};\n\n// radix-4 implementation\n//\n// NOTE: Uses of `var` are intentional for older V8 version that do not\n// support both `let compound assignments` and `const phi`\nFFT.prototype._transform4 = function _transform4() {\n  var out = this._out;\n  var size = this._csize;\n\n  // Initial step (permute and transform)\n  var width = this._width;\n  var step = 1 << width;\n  var len = (size / step) << 1;\n\n  var outOff;\n  var t;\n  var bitrev = this._bitrev;\n  if (len === 4) {\n    for (outOff = 0, t = 0; outOff < size; outOff += len, t++) {\n      const off = bitrev[t];\n      this._singleTransform2(outOff, off, step);\n    }\n  } else {\n    // len === 8\n    for (outOff = 0, t = 0; outOff < size; outOff += len, t++) {\n      const off = bitrev[t];\n      this._singleTransform4(outOff, off, step);\n    }\n  }\n\n  // Loop through steps in decreasing order\n  var inv = this._inv ? -1 : 1;\n  var table = this.table;\n  for (step >>= 2; step >= 2; step >>= 2) {\n    len = (size / step) << 1;\n    var quarterLen = len >>> 2;\n\n    // Loop through offsets in the data\n    for (outOff = 0; outOff < size; outOff += len) {\n      // Full case\n      var limit = outOff + quarterLen;\n      for (var i = outOff, k = 0; i < limit; i += 2, k += step) {\n        const A = i;\n        const B = A + quarterLen;\n        const C = B + quarterLen;\n        const D = C + quarterLen;\n\n        // Original values\n        const Ar = out[A];\n        const Ai = out[A + 1];\n        const Br = out[B];\n        const Bi = out[B + 1];\n        const Cr = out[C];\n        const Ci = out[C + 1];\n        const Dr = out[D];\n        const Di = out[D + 1];\n\n        // Middle values\n        const MAr = Ar;\n        const MAi = Ai;\n\n        const tableBr = table[k];\n        const tableBi = inv * table[k + 1];\n        const MBr = Br * tableBr - Bi * tableBi;\n        const MBi = Br * tableBi + Bi * tableBr;\n\n        const tableCr = table[2 * k];\n        const tableCi = inv * table[2 * k + 1];\n        const MCr = Cr * tableCr - Ci * tableCi;\n        const MCi = Cr * tableCi + Ci * tableCr;\n\n        const tableDr = table[3 * k];\n        const tableDi = inv * table[3 * k + 1];\n        const MDr = Dr * tableDr - Di * tableDi;\n        const MDi = Dr * tableDi + Di * tableDr;\n\n        // Pre-Final values\n        const T0r = MAr + MCr;\n        const T0i = MAi + MCi;\n        const T1r = MAr - MCr;\n        const T1i = MAi - MCi;\n        const T2r = MBr + MDr;\n        const T2i = MBi + MDi;\n        const T3r = inv * (MBr - MDr);\n        const T3i = inv * (MBi - MDi);\n\n        // Final values\n        const FAr = T0r + T2r;\n        const FAi = T0i + T2i;\n\n        const FCr = T0r - T2r;\n        const FCi = T0i - T2i;\n\n        const FBr = T1r + T3i;\n        const FBi = T1i - T3r;\n\n        const FDr = T1r - T3i;\n        const FDi = T1i + T3r;\n\n        out[A] = FAr;\n        out[A + 1] = FAi;\n        out[B] = FBr;\n        out[B + 1] = FBi;\n        out[C] = FCr;\n        out[C + 1] = FCi;\n        out[D] = FDr;\n        out[D + 1] = FDi;\n      }\n    }\n  }\n};\n\n// radix-2 implementation\n//\n// NOTE: Only called for len=4\nFFT.prototype._singleTransform2 = function _singleTransform2(outOff, off,\n                                                             step) {\n  const out = this._out;\n  const data = this._data;\n\n  const evenR = data[off];\n  const evenI = data[off + 1];\n  const oddR = data[off + step];\n  const oddI = data[off + step + 1];\n\n  const leftR = evenR + oddR;\n  const leftI = evenI + oddI;\n  const rightR = evenR - oddR;\n  const rightI = evenI - oddI;\n\n  out[outOff] = leftR;\n  out[outOff + 1] = leftI;\n  out[outOff + 2] = rightR;\n  out[outOff + 3] = rightI;\n};\n\n// radix-4\n//\n// NOTE: Only called for len=8\nFFT.prototype._singleTransform4 = function _singleTransform4(outOff, off,\n                                                             step) {\n  const out = this._out;\n  const data = this._data;\n  const inv = this._inv ? -1 : 1;\n  const step2 = step * 2;\n  const step3 = step * 3;\n\n  // Original values\n  const Ar = data[off];\n  const Ai = data[off + 1];\n  const Br = data[off + step];\n  const Bi = data[off + step + 1];\n  const Cr = data[off + step2];\n  const Ci = data[off + step2 + 1];\n  const Dr = data[off + step3];\n  const Di = data[off + step3 + 1];\n\n  // Pre-Final values\n  const T0r = Ar + Cr;\n  const T0i = Ai + Ci;\n  const T1r = Ar - Cr;\n  const T1i = Ai - Ci;\n  const T2r = Br + Dr;\n  const T2i = Bi + Di;\n  const T3r = inv * (Br - Dr);\n  const T3i = inv * (Bi - Di);\n\n  // Final values\n  const FAr = T0r + T2r;\n  const FAi = T0i + T2i;\n\n  const FBr = T1r + T3i;\n  const FBi = T1i - T3r;\n\n  const FCr = T0r - T2r;\n  const FCi = T0i - T2i;\n\n  const FDr = T1r - T3i;\n  const FDi = T1i + T3r;\n\n  out[outOff] = FAr;\n  out[outOff + 1] = FAi;\n  out[outOff + 2] = FBr;\n  out[outOff + 3] = FBi;\n  out[outOff + 4] = FCr;\n  out[outOff + 5] = FCi;\n  out[outOff + 6] = FDr;\n  out[outOff + 7] = FDi;\n};\n\n// Real input radix-4 implementation\nFFT.prototype._realTransform4 = function _realTransform4() {\n  var out = this._out;\n  var size = this._csize;\n\n  // Initial step (permute and transform)\n  var width = this._width;\n  var step = 1 << width;\n  var len = (size / step) << 1;\n\n  var outOff;\n  var t;\n  var bitrev = this._bitrev;\n  if (len === 4) {\n    for (outOff = 0, t = 0; outOff < size; outOff += len, t++) {\n      const off = bitrev[t];\n      this._singleRealTransform2(outOff, off >>> 1, step >>> 1);\n    }\n  } else {\n    // len === 8\n    for (outOff = 0, t = 0; outOff < size; outOff += len, t++) {\n      const off = bitrev[t];\n      this._singleRealTransform4(outOff, off >>> 1, step >>> 1);\n    }\n  }\n\n  // Loop through steps in decreasing order\n  var inv = this._inv ? -1 : 1;\n  var table = this.table;\n  for (step >>= 2; step >= 2; step >>= 2) {\n    len = (size / step) << 1;\n    var halfLen = len >>> 1;\n    var quarterLen = halfLen >>> 1;\n    var hquarterLen = quarterLen >>> 1;\n\n    // Loop through offsets in the data\n    for (outOff = 0; outOff < size; outOff += len) {\n      for (var i = 0, k = 0; i <= hquarterLen; i += 2, k += step) {\n        var A = outOff + i;\n        var B = A + quarterLen;\n        var C = B + quarterLen;\n        var D = C + quarterLen;\n\n        // Original values\n        var Ar = out[A];\n        var Ai = out[A + 1];\n        var Br = out[B];\n        var Bi = out[B + 1];\n        var Cr = out[C];\n        var Ci = out[C + 1];\n        var Dr = out[D];\n        var Di = out[D + 1];\n\n        // Middle values\n        var MAr = Ar;\n        var MAi = Ai;\n\n        var tableBr = table[k];\n        var tableBi = inv * table[k + 1];\n        var MBr = Br * tableBr - Bi * tableBi;\n        var MBi = Br * tableBi + Bi * tableBr;\n\n        var tableCr = table[2 * k];\n        var tableCi = inv * table[2 * k + 1];\n        var MCr = Cr * tableCr - Ci * tableCi;\n        var MCi = Cr * tableCi + Ci * tableCr;\n\n        var tableDr = table[3 * k];\n        var tableDi = inv * table[3 * k + 1];\n        var MDr = Dr * tableDr - Di * tableDi;\n        var MDi = Dr * tableDi + Di * tableDr;\n\n        // Pre-Final values\n        var T0r = MAr + MCr;\n        var T0i = MAi + MCi;\n        var T1r = MAr - MCr;\n        var T1i = MAi - MCi;\n        var T2r = MBr + MDr;\n        var T2i = MBi + MDi;\n        var T3r = inv * (MBr - MDr);\n        var T3i = inv * (MBi - MDi);\n\n        // Final values\n        var FAr = T0r + T2r;\n        var FAi = T0i + T2i;\n\n        var FBr = T1r + T3i;\n        var FBi = T1i - T3r;\n\n        out[A] = FAr;\n        out[A + 1] = FAi;\n        out[B] = FBr;\n        out[B + 1] = FBi;\n\n        // Output final middle point\n        if (i === 0) {\n          var FCr = T0r - T2r;\n          var FCi = T0i - T2i;\n          out[C] = FCr;\n          out[C + 1] = FCi;\n          continue;\n        }\n\n        // Do not overwrite ourselves\n        if (i === hquarterLen)\n          continue;\n\n        // In the flipped case:\n        // MAi = -MAi\n        // MBr=-MBi, MBi=-MBr\n        // MCr=-MCr\n        // MDr=MDi, MDi=MDr\n        var ST0r = T1r;\n        var ST0i = -T1i;\n        var ST1r = T0r;\n        var ST1i = -T0i;\n        var ST2r = -inv * T3i;\n        var ST2i = -inv * T3r;\n        var ST3r = -inv * T2i;\n        var ST3i = -inv * T2r;\n\n        var SFAr = ST0r + ST2r;\n        var SFAi = ST0i + ST2i;\n\n        var SFBr = ST1r + ST3i;\n        var SFBi = ST1i - ST3r;\n\n        var SA = outOff + quarterLen - i;\n        var SB = outOff + halfLen - i;\n\n        out[SA] = SFAr;\n        out[SA + 1] = SFAi;\n        out[SB] = SFBr;\n        out[SB + 1] = SFBi;\n      }\n    }\n  }\n};\n\n// radix-2 implementation\n//\n// NOTE: Only called for len=4\nFFT.prototype._singleRealTransform2 = function _singleRealTransform2(outOff,\n                                                                     off,\n                                                                     step) {\n  const out = this._out;\n  const data = this._data;\n\n  const evenR = data[off];\n  const oddR = data[off + step];\n\n  const leftR = evenR + oddR;\n  const rightR = evenR - oddR;\n\n  out[outOff] = leftR;\n  out[outOff + 1] = 0;\n  out[outOff + 2] = rightR;\n  out[outOff + 3] = 0;\n};\n\n// radix-4\n//\n// NOTE: Only called for len=8\nFFT.prototype._singleRealTransform4 = function _singleRealTransform4(outOff,\n                                                                     off,\n                                                                     step) {\n  const out = this._out;\n  const data = this._data;\n  const inv = this._inv ? -1 : 1;\n  const step2 = step * 2;\n  const step3 = step * 3;\n\n  // Original values\n  const Ar = data[off];\n  const Br = data[off + step];\n  const Cr = data[off + step2];\n  const Dr = data[off + step3];\n\n  // Pre-Final values\n  const T0r = Ar + Cr;\n  const T1r = Ar - Cr;\n  const T2r = Br + Dr;\n  const T3r = inv * (Br - Dr);\n\n  // Final values\n  const FAr = T0r + T2r;\n\n  const FBr = T1r;\n  const FBi = -T3r;\n\n  const FCr = T0r - T2r;\n\n  const FDr = T1r;\n  const FDi = T3r;\n\n  out[outOff] = FAr;\n  out[outOff + 1] = 0;\n  out[outOff + 2] = FBr;\n  out[outOff + 3] = FBi;\n  out[outOff + 4] = FCr;\n  out[outOff + 5] = 0;\n  out[outOff + 6] = FDr;\n  out[outOff + 7] = FDi;\n};\n","/* FileSaver.js\n * A saveAs() FileSaver implementation.\n * 1.3.2\n * 2016-06-16 18:25:19\n *\n * By Eli Grey, http://eligrey.com\n * License: MIT\n *   See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md\n */\n\n/*global self */\n/*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */\n\n/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */\n\nvar saveAs = saveAs || (function(view) {\n\t\"use strict\";\n\t// IE <10 is explicitly unsupported\n\tif (typeof view === \"undefined\" || typeof navigator !== \"undefined\" && /MSIE [1-9]\\./.test(navigator.userAgent)) {\n\t\treturn;\n\t}\n\tvar\n\t\t  doc = view.document\n\t\t  // only get URL when necessary in case Blob.js hasn't overridden it yet\n\t\t, get_URL = function() {\n\t\t\treturn view.URL || view.webkitURL || view;\n\t\t}\n\t\t, save_link = doc.createElementNS(\"http://www.w3.org/1999/xhtml\", \"a\")\n\t\t, can_use_save_link = \"download\" in save_link\n\t\t, click = function(node) {\n\t\t\tvar event = new MouseEvent(\"click\");\n\t\t\tnode.dispatchEvent(event);\n\t\t}\n\t\t, is_safari = /constructor/i.test(view.HTMLElement) || view.safari\n\t\t, is_chrome_ios =/CriOS\\/[\\d]+/.test(navigator.userAgent)\n\t\t, throw_outside = function(ex) {\n\t\t\t(view.setImmediate || view.setTimeout)(function() {\n\t\t\t\tthrow ex;\n\t\t\t}, 0);\n\t\t}\n\t\t, force_saveable_type = \"application/octet-stream\"\n\t\t// the Blob API is fundamentally broken as there is no \"downloadfinished\" event to subscribe to\n\t\t, arbitrary_revoke_timeout = 1000 * 40 // in ms\n\t\t, revoke = function(file) {\n\t\t\tvar revoker = function() {\n\t\t\t\tif (typeof file === \"string\") { // file is an object URL\n\t\t\t\t\tget_URL().revokeObjectURL(file);\n\t\t\t\t} else { // file is a File\n\t\t\t\t\tfile.remove();\n\t\t\t\t}\n\t\t\t};\n\t\t\tsetTimeout(revoker, arbitrary_revoke_timeout);\n\t\t}\n\t\t, dispatch = function(filesaver, event_types, event) {\n\t\t\tevent_types = [].concat(event_types);\n\t\t\tvar i = event_types.length;\n\t\t\twhile (i--) {\n\t\t\t\tvar listener = filesaver[\"on\" + event_types[i]];\n\t\t\t\tif (typeof listener === \"function\") {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlistener.call(filesaver, event || filesaver);\n\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\tthrow_outside(ex);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t, auto_bom = function(blob) {\n\t\t\t// prepend BOM for UTF-8 XML and text/* types (including HTML)\n\t\t\t// note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF\n\t\t\tif (/^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n\t\t\t\treturn new Blob([String.fromCharCode(0xFEFF), blob], {type: blob.type});\n\t\t\t}\n\t\t\treturn blob;\n\t\t}\n\t\t, FileSaver = function(blob, name, no_auto_bom) {\n\t\t\tif (!no_auto_bom) {\n\t\t\t\tblob = auto_bom(blob);\n\t\t\t}\n\t\t\t// First try a.download, then web filesystem, then object URLs\n\t\t\tvar\n\t\t\t\t  filesaver = this\n\t\t\t\t, type = blob.type\n\t\t\t\t, force = type === force_saveable_type\n\t\t\t\t, object_url\n\t\t\t\t, dispatch_all = function() {\n\t\t\t\t\tdispatch(filesaver, \"writestart progress write writeend\".split(\" \"));\n\t\t\t\t}\n\t\t\t\t// on any filesys errors revert to saving with object URLs\n\t\t\t\t, fs_error = function() {\n\t\t\t\t\tif ((is_chrome_ios || (force && is_safari)) && view.FileReader) {\n\t\t\t\t\t\t// Safari doesn't allow downloading of blob urls\n\t\t\t\t\t\tvar reader = new FileReader();\n\t\t\t\t\t\treader.onloadend = function() {\n\t\t\t\t\t\t\tvar url = is_chrome_ios ? reader.result : reader.result.replace(/^data:[^;]*;/, 'data:attachment/file;');\n\t\t\t\t\t\t\tvar popup = view.open(url, '_blank');\n\t\t\t\t\t\t\tif(!popup) view.location.href = url;\n\t\t\t\t\t\t\turl=undefined; // release reference before dispatching\n\t\t\t\t\t\t\tfilesaver.readyState = filesaver.DONE;\n\t\t\t\t\t\t\tdispatch_all();\n\t\t\t\t\t\t};\n\t\t\t\t\t\treader.readAsDataURL(blob);\n\t\t\t\t\t\tfilesaver.readyState = filesaver.INIT;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// don't create more object URLs than needed\n\t\t\t\t\tif (!object_url) {\n\t\t\t\t\t\tobject_url = get_URL().createObjectURL(blob);\n\t\t\t\t\t}\n\t\t\t\t\tif (force) {\n\t\t\t\t\t\tview.location.href = object_url;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar opened = view.open(object_url, \"_blank\");\n\t\t\t\t\t\tif (!opened) {\n\t\t\t\t\t\t\t// Apple does not allow window.open, see https://developer.apple.com/library/safari/documentation/Tools/Conceptual/SafariExtensionGuide/WorkingwithWindowsandTabs/WorkingwithWindowsandTabs.html\n\t\t\t\t\t\t\tview.location.href = object_url;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfilesaver.readyState = filesaver.DONE;\n\t\t\t\t\tdispatch_all();\n\t\t\t\t\trevoke(object_url);\n\t\t\t\t}\n\t\t\t;\n\t\t\tfilesaver.readyState = filesaver.INIT;\n\n\t\t\tif (can_use_save_link) {\n\t\t\t\tobject_url = get_URL().createObjectURL(blob);\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\tsave_link.href = object_url;\n\t\t\t\t\tsave_link.download = name;\n\t\t\t\t\tclick(save_link);\n\t\t\t\t\tdispatch_all();\n\t\t\t\t\trevoke(object_url);\n\t\t\t\t\tfilesaver.readyState = filesaver.DONE;\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfs_error();\n\t\t}\n\t\t, FS_proto = FileSaver.prototype\n\t\t, saveAs = function(blob, name, no_auto_bom) {\n\t\t\treturn new FileSaver(blob, name || blob.name || \"download\", no_auto_bom);\n\t\t}\n\t;\n\t// IE 10+ (native saveAs)\n\tif (typeof navigator !== \"undefined\" && navigator.msSaveOrOpenBlob) {\n\t\treturn function(blob, name, no_auto_bom) {\n\t\t\tname = name || blob.name || \"download\";\n\n\t\t\tif (!no_auto_bom) {\n\t\t\t\tblob = auto_bom(blob);\n\t\t\t}\n\t\t\treturn navigator.msSaveOrOpenBlob(blob, name);\n\t\t};\n\t}\n\n\tFS_proto.abort = function(){};\n\tFS_proto.readyState = FS_proto.INIT = 0;\n\tFS_proto.WRITING = 1;\n\tFS_proto.DONE = 2;\n\n\tFS_proto.error =\n\tFS_proto.onwritestart =\n\tFS_proto.onprogress =\n\tFS_proto.onwrite =\n\tFS_proto.onabort =\n\tFS_proto.onerror =\n\tFS_proto.onwriteend =\n\t\tnull;\n\n\treturn saveAs;\n}(\n\t   typeof self !== \"undefined\" && self\n\t|| typeof window !== \"undefined\" && window\n\t|| this.content\n));\n// `self` is undefined in Firefox for Android content script context\n// while `this` is nsIContentFrameMessageManager\n// with an attribute `content` that corresponds to the window\n\nif (typeof module !== \"undefined\" && module.exports) {\n  module.exports.saveAs = saveAs;\n} else if ((typeof define !== \"undefined\" && define !== null) && (define.amd !== null)) {\n  define(\"FileSaver.js\", function() {\n    return saveAs;\n  });\n}\n","'use strict';\n\nexports.__esModule = true;\nvar canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nvar addEventListener = exports.addEventListener = function addEventListener(node, event, listener) {\n  return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener);\n};\n\nvar removeEventListener = exports.removeEventListener = function removeEventListener(node, event, listener) {\n  return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener);\n};\n\nvar getConfirmation = exports.getConfirmation = function getConfirmation(message, callback) {\n  return callback(window.confirm(message));\n}; // eslint-disable-line no-alert\n\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\nvar supportsHistory = exports.supportsHistory = function supportsHistory() {\n  var ua = window.navigator.userAgent;\n\n  if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n\n  return window.history && 'pushState' in window.history;\n};\n\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\nvar supportsPopStateOnHashChange = exports.supportsPopStateOnHashChange = function supportsPopStateOnHashChange() {\n  return window.navigator.userAgent.indexOf('Trident') === -1;\n};\n\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\nvar supportsGoWithoutReloadUsingHash = exports.supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() {\n  return window.navigator.userAgent.indexOf('Firefox') === -1;\n};\n\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\nvar isExtraneousPopstateEvent = exports.isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) {\n  return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n};","'use strict';\n\nexports.__esModule = true;\nexports.locationsAreEqual = exports.createLocation = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _resolvePathname = require('resolve-pathname');\n\nvar _resolvePathname2 = _interopRequireDefault(_resolvePathname);\n\nvar _valueEqual = require('value-equal');\n\nvar _valueEqual2 = _interopRequireDefault(_valueEqual);\n\nvar _PathUtils = require('./PathUtils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar createLocation = exports.createLocation = function createLocation(path, state, key, currentLocation) {\n  var location = void 0;\n  if (typeof path === 'string') {\n    // Two-arg form: push(path, state)\n    location = (0, _PathUtils.parsePath)(path);\n    location.state = state;\n  } else {\n    // One-arg form: push(location)\n    location = _extends({}, path);\n\n    if (location.pathname === undefined) location.pathname = '';\n\n    if (location.search) {\n      if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n    } else {\n      location.search = '';\n    }\n\n    if (location.hash) {\n      if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n    } else {\n      location.hash = '';\n    }\n\n    if (state !== undefined && location.state === undefined) location.state = state;\n  }\n\n  try {\n    location.pathname = decodeURI(location.pathname);\n  } catch (e) {\n    if (e instanceof URIError) {\n      throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n    } else {\n      throw e;\n    }\n  }\n\n  if (key) location.key = key;\n\n  if (currentLocation) {\n    // Resolve incomplete/relative pathname relative to current location.\n    if (!location.pathname) {\n      location.pathname = currentLocation.pathname;\n    } else if (location.pathname.charAt(0) !== '/') {\n      location.pathname = (0, _resolvePathname2.default)(location.pathname, currentLocation.pathname);\n    }\n  } else {\n    // When there is no prior location and pathname is empty, set it to /\n    if (!location.pathname) {\n      location.pathname = '/';\n    }\n  }\n\n  return location;\n};\n\nvar locationsAreEqual = exports.locationsAreEqual = function locationsAreEqual(a, b) {\n  return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && (0, _valueEqual2.default)(a.state, b.state);\n};","'use strict';\n\nexports.__esModule = true;\nvar addLeadingSlash = exports.addLeadingSlash = function addLeadingSlash(path) {\n  return path.charAt(0) === '/' ? path : '/' + path;\n};\n\nvar stripLeadingSlash = exports.stripLeadingSlash = function stripLeadingSlash(path) {\n  return path.charAt(0) === '/' ? path.substr(1) : path;\n};\n\nvar hasBasename = exports.hasBasename = function hasBasename(path, prefix) {\n  return new RegExp('^' + prefix + '(\\\\/|\\\\?|#|$)', 'i').test(path);\n};\n\nvar stripBasename = exports.stripBasename = function stripBasename(path, prefix) {\n  return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n};\n\nvar stripTrailingSlash = exports.stripTrailingSlash = function stripTrailingSlash(path) {\n  return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n};\n\nvar parsePath = exports.parsePath = function parsePath(path) {\n  var pathname = path || '/';\n  var search = '';\n  var hash = '';\n\n  var hashIndex = pathname.indexOf('#');\n  if (hashIndex !== -1) {\n    hash = pathname.substr(hashIndex);\n    pathname = pathname.substr(0, hashIndex);\n  }\n\n  var searchIndex = pathname.indexOf('?');\n  if (searchIndex !== -1) {\n    search = pathname.substr(searchIndex);\n    pathname = pathname.substr(0, searchIndex);\n  }\n\n  return {\n    pathname: pathname,\n    search: search === '?' ? '' : search,\n    hash: hash === '#' ? '' : hash\n  };\n};\n\nvar createPath = exports.createPath = function createPath(location) {\n  var pathname = location.pathname,\n      search = location.search,\n      hash = location.hash;\n\n\n  var path = pathname || '/';\n\n  if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search;\n\n  if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash;\n\n  return path;\n};","'use strict';\n\nexports.__esModule = true;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _LocationUtils = require('./LocationUtils');\n\nvar _PathUtils = require('./PathUtils');\n\nvar _createTransitionManager = require('./createTransitionManager');\n\nvar _createTransitionManager2 = _interopRequireDefault(_createTransitionManager);\n\nvar _DOMUtils = require('./DOMUtils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nvar getHistoryState = function getHistoryState() {\n  try {\n    return window.history.state || {};\n  } catch (e) {\n    // IE 11 sometimes throws when accessing window.history.state\n    // See https://github.com/ReactTraining/history/pull/289\n    return {};\n  }\n};\n\n/**\n * Creates a history object that uses the HTML5 history API including\n * pushState, replaceState, and the popstate event.\n */\nvar createBrowserHistory = function createBrowserHistory() {\n  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n  (0, _invariant2.default)(_DOMUtils.canUseDOM, 'Browser history needs a DOM');\n\n  var globalHistory = window.history;\n  var canUseHistory = (0, _DOMUtils.supportsHistory)();\n  var needsHashChangeListener = !(0, _DOMUtils.supportsPopStateOnHashChange)();\n\n  var _props$forceRefresh = props.forceRefresh,\n      forceRefresh = _props$forceRefresh === undefined ? false : _props$forceRefresh,\n      _props$getUserConfirm = props.getUserConfirmation,\n      getUserConfirmation = _props$getUserConfirm === undefined ? _DOMUtils.getConfirmation : _props$getUserConfirm,\n      _props$keyLength = props.keyLength,\n      keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;\n\n  var basename = props.basename ? (0, _PathUtils.stripTrailingSlash)((0, _PathUtils.addLeadingSlash)(props.basename)) : '';\n\n  var getDOMLocation = function getDOMLocation(historyState) {\n    var _ref = historyState || {},\n        key = _ref.key,\n        state = _ref.state;\n\n    var _window$location = window.location,\n        pathname = _window$location.pathname,\n        search = _window$location.search,\n        hash = _window$location.hash;\n\n\n    var path = pathname + search + hash;\n\n    (0, _warning2.default)(!basename || (0, _PathUtils.hasBasename)(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n    if (basename) path = (0, _PathUtils.stripBasename)(path, basename);\n\n    return (0, _LocationUtils.createLocation)(path, state, key);\n  };\n\n  var createKey = function createKey() {\n    return Math.random().toString(36).substr(2, keyLength);\n  };\n\n  var transitionManager = (0, _createTransitionManager2.default)();\n\n  var setState = function setState(nextState) {\n    _extends(history, nextState);\n\n    history.length = globalHistory.length;\n\n    transitionManager.notifyListeners(history.location, history.action);\n  };\n\n  var handlePopState = function handlePopState(event) {\n    // Ignore extraneous popstate events in WebKit.\n    if ((0, _DOMUtils.isExtraneousPopstateEvent)(event)) return;\n\n    handlePop(getDOMLocation(event.state));\n  };\n\n  var handleHashChange = function handleHashChange() {\n    handlePop(getDOMLocation(getHistoryState()));\n  };\n\n  var forceNextPop = false;\n\n  var handlePop = function handlePop(location) {\n    if (forceNextPop) {\n      forceNextPop = false;\n      setState();\n    } else {\n      var action = 'POP';\n\n      transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n        if (ok) {\n          setState({ action: action, location: location });\n        } else {\n          revertPop(location);\n        }\n      });\n    }\n  };\n\n  var revertPop = function revertPop(fromLocation) {\n    var toLocation = history.location;\n\n    // TODO: We could probably make this more reliable by\n    // keeping a list of keys we've seen in sessionStorage.\n    // Instead, we just default to 0 for keys we don't know.\n\n    var toIndex = allKeys.indexOf(toLocation.key);\n\n    if (toIndex === -1) toIndex = 0;\n\n    var fromIndex = allKeys.indexOf(fromLocation.key);\n\n    if (fromIndex === -1) fromIndex = 0;\n\n    var delta = toIndex - fromIndex;\n\n    if (delta) {\n      forceNextPop = true;\n      go(delta);\n    }\n  };\n\n  var initialLocation = getDOMLocation(getHistoryState());\n  var allKeys = [initialLocation.key];\n\n  // Public interface\n\n  var createHref = function createHref(location) {\n    return basename + (0, _PathUtils.createPath)(location);\n  };\n\n  var push = function push(path, state) {\n    (0, _warning2.default)(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n    var action = 'PUSH';\n    var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var href = createHref(location);\n      var key = location.key,\n          state = location.state;\n\n\n      if (canUseHistory) {\n        globalHistory.pushState({ key: key, state: state }, null, href);\n\n        if (forceRefresh) {\n          window.location.href = href;\n        } else {\n          var prevIndex = allKeys.indexOf(history.location.key);\n          var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n          nextKeys.push(location.key);\n          allKeys = nextKeys;\n\n          setState({ action: action, location: location });\n        }\n      } else {\n        (0, _warning2.default)(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history');\n\n        window.location.href = href;\n      }\n    });\n  };\n\n  var replace = function replace(path, state) {\n    (0, _warning2.default)(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n    var action = 'REPLACE';\n    var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var href = createHref(location);\n      var key = location.key,\n          state = location.state;\n\n\n      if (canUseHistory) {\n        globalHistory.replaceState({ key: key, state: state }, null, href);\n\n        if (forceRefresh) {\n          window.location.replace(href);\n        } else {\n          var prevIndex = allKeys.indexOf(history.location.key);\n\n          if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n\n          setState({ action: action, location: location });\n        }\n      } else {\n        (0, _warning2.default)(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history');\n\n        window.location.replace(href);\n      }\n    });\n  };\n\n  var go = function go(n) {\n    globalHistory.go(n);\n  };\n\n  var goBack = function goBack() {\n    return go(-1);\n  };\n\n  var goForward = function goForward() {\n    return go(1);\n  };\n\n  var listenerCount = 0;\n\n  var checkDOMListeners = function checkDOMListeners(delta) {\n    listenerCount += delta;\n\n    if (listenerCount === 1) {\n      (0, _DOMUtils.addEventListener)(window, PopStateEvent, handlePopState);\n\n      if (needsHashChangeListener) (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleHashChange);\n    } else if (listenerCount === 0) {\n      (0, _DOMUtils.removeEventListener)(window, PopStateEvent, handlePopState);\n\n      if (needsHashChangeListener) (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleHashChange);\n    }\n  };\n\n  var isBlocked = false;\n\n  var block = function block() {\n    var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n    var unblock = transitionManager.setPrompt(prompt);\n\n    if (!isBlocked) {\n      checkDOMListeners(1);\n      isBlocked = true;\n    }\n\n    return function () {\n      if (isBlocked) {\n        isBlocked = false;\n        checkDOMListeners(-1);\n      }\n\n      return unblock();\n    };\n  };\n\n  var listen = function listen(listener) {\n    var unlisten = transitionManager.appendListener(listener);\n    checkDOMListeners(1);\n\n    return function () {\n      checkDOMListeners(-1);\n      unlisten();\n    };\n  };\n\n  var history = {\n    length: globalHistory.length,\n    action: 'POP',\n    location: initialLocation,\n    createHref: createHref,\n    push: push,\n    replace: replace,\n    go: go,\n    goBack: goBack,\n    goForward: goForward,\n    block: block,\n    listen: listen\n  };\n\n  return history;\n};\n\nexports.default = createBrowserHistory;","'use strict';\n\nexports.__esModule = true;\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar createTransitionManager = function createTransitionManager() {\n  var prompt = null;\n\n  var setPrompt = function setPrompt(nextPrompt) {\n    (0, _warning2.default)(prompt == null, 'A history supports only one prompt at a time');\n\n    prompt = nextPrompt;\n\n    return function () {\n      if (prompt === nextPrompt) prompt = null;\n    };\n  };\n\n  var confirmTransitionTo = function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n    // TODO: If another transition starts while we're still confirming\n    // the previous one, we may end up in a weird state. Figure out the\n    // best way to handle this.\n    if (prompt != null) {\n      var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n\n      if (typeof result === 'string') {\n        if (typeof getUserConfirmation === 'function') {\n          getUserConfirmation(result, callback);\n        } else {\n          (0, _warning2.default)(false, 'A history needs a getUserConfirmation function in order to use a prompt message');\n\n          callback(true);\n        }\n      } else {\n        // Return false from a transition hook to cancel the transition.\n        callback(result !== false);\n      }\n    } else {\n      callback(true);\n    }\n  };\n\n  var listeners = [];\n\n  var appendListener = function appendListener(fn) {\n    var isActive = true;\n\n    var listener = function listener() {\n      if (isActive) fn.apply(undefined, arguments);\n    };\n\n    listeners.push(listener);\n\n    return function () {\n      isActive = false;\n      listeners = listeners.filter(function (item) {\n        return item !== listener;\n      });\n    };\n  };\n\n  var notifyListeners = function notifyListeners() {\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    listeners.forEach(function (listener) {\n      return listener.apply(undefined, args);\n    });\n  };\n\n  return {\n    setPrompt: setPrompt,\n    confirmTransitionTo: confirmTransitionTo,\n    appendListener: appendListener,\n    notifyListeners: notifyListeners\n  };\n};\n\nexports.default = createTransitionManager;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n  if (process.env.NODE_ENV !== 'production') {\n    if (format === undefined) {\n      throw new Error('invariant requires an error message argument');\n    }\n  }\n\n  if (!condition) {\n    var error;\n    if (format === undefined) {\n      error = new Error(\n        'Minified exception occurred; use the non-minified dev environment ' +\n        'for the full error message and additional helpful warnings.'\n      );\n    } else {\n      var args = [a, b, c, d, e, f];\n      var argIndex = 0;\n      error = new Error(\n        format.replace(/%s/g, function() { return args[argIndex++]; })\n      );\n      error.name = 'Invariant Violation';\n    }\n\n    error.framesToPop = 1; // we don't care about invariant's own frame\n    throw error;\n  }\n};\n\nmodule.exports = invariant;\n","'use strict';\nvar utils = require('./utils');\nvar support = require('./support');\n// private property\nvar _keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\n\n// public method for encoding\nexports.encode = function(input) {\n    var output = [];\n    var chr1, chr2, chr3, enc1, enc2, enc3, enc4;\n    var i = 0, len = input.length, remainingBytes = len;\n\n    var isArray = utils.getTypeOf(input) !== \"string\";\n    while (i < input.length) {\n        remainingBytes = len - i;\n\n        if (!isArray) {\n            chr1 = input.charCodeAt(i++);\n            chr2 = i < len ? input.charCodeAt(i++) : 0;\n            chr3 = i < len ? input.charCodeAt(i++) : 0;\n        } else {\n            chr1 = input[i++];\n            chr2 = i < len ? input[i++] : 0;\n            chr3 = i < len ? input[i++] : 0;\n        }\n\n        enc1 = chr1 >> 2;\n        enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n        enc3 = remainingBytes > 1 ? (((chr2 & 15) << 2) | (chr3 >> 6)) : 64;\n        enc4 = remainingBytes > 2 ? (chr3 & 63) : 64;\n\n        output.push(_keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4));\n\n    }\n\n    return output.join(\"\");\n};\n\n// public method for decoding\nexports.decode = function(input) {\n    var chr1, chr2, chr3;\n    var enc1, enc2, enc3, enc4;\n    var i = 0, resultIndex = 0;\n\n    var dataUrlPrefix = \"data:\";\n\n    if (input.substr(0, dataUrlPrefix.length) === dataUrlPrefix) {\n        // This is a common error: people give a data url\n        // (data:image/png;base64,iVBOR...) with a {base64: true} and\n        // wonders why things don't work.\n        // We can detect that the string input looks like a data url but we\n        // *can't* be sure it is one: removing everything up to the comma would\n        // be too dangerous.\n        throw new Error(\"Invalid base64 input, it looks like a data url.\");\n    }\n\n    input = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, \"\");\n\n    var totalLength = input.length * 3 / 4;\n    if(input.charAt(input.length - 1) === _keyStr.charAt(64)) {\n        totalLength--;\n    }\n    if(input.charAt(input.length - 2) === _keyStr.charAt(64)) {\n        totalLength--;\n    }\n    if (totalLength % 1 !== 0) {\n        // totalLength is not an integer, the length does not match a valid\n        // base64 content. That can happen if:\n        // - the input is not a base64 content\n        // - the input is *almost* a base64 content, with a extra chars at the\n        //   beginning or at the end\n        // - the input uses a base64 variant (base64url for example)\n        throw new Error(\"Invalid base64 input, bad content length.\");\n    }\n    var output;\n    if (support.uint8array) {\n        output = new Uint8Array(totalLength|0);\n    } else {\n        output = new Array(totalLength|0);\n    }\n\n    while (i < input.length) {\n\n        enc1 = _keyStr.indexOf(input.charAt(i++));\n        enc2 = _keyStr.indexOf(input.charAt(i++));\n        enc3 = _keyStr.indexOf(input.charAt(i++));\n        enc4 = _keyStr.indexOf(input.charAt(i++));\n\n        chr1 = (enc1 << 2) | (enc2 >> 4);\n        chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);\n        chr3 = ((enc3 & 3) << 6) | enc4;\n\n        output[resultIndex++] = chr1;\n\n        if (enc3 !== 64) {\n            output[resultIndex++] = chr2;\n        }\n        if (enc4 !== 64) {\n            output[resultIndex++] = chr3;\n        }\n\n    }\n\n    return output;\n};\n","'use strict';\n\nvar external = require(\"./external\");\nvar DataWorker = require('./stream/DataWorker');\nvar DataLengthProbe = require('./stream/DataLengthProbe');\nvar Crc32Probe = require('./stream/Crc32Probe');\nvar DataLengthProbe = require('./stream/DataLengthProbe');\n\n/**\n * Represent a compressed object, with everything needed to decompress it.\n * @constructor\n * @param {number} compressedSize the size of the data compressed.\n * @param {number} uncompressedSize the size of the data after decompression.\n * @param {number} crc32 the crc32 of the decompressed file.\n * @param {object} compression the type of compression, see lib/compressions.js.\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the compressed data.\n */\nfunction CompressedObject(compressedSize, uncompressedSize, crc32, compression, data) {\n    this.compressedSize = compressedSize;\n    this.uncompressedSize = uncompressedSize;\n    this.crc32 = crc32;\n    this.compression = compression;\n    this.compressedContent = data;\n}\n\nCompressedObject.prototype = {\n    /**\n     * Create a worker to get the uncompressed content.\n     * @return {GenericWorker} the worker.\n     */\n    getContentWorker : function () {\n        var worker = new DataWorker(external.Promise.resolve(this.compressedContent))\n        .pipe(this.compression.uncompressWorker())\n        .pipe(new DataLengthProbe(\"data_length\"));\n\n        var that = this;\n        worker.on(\"end\", function () {\n            if(this.streamInfo['data_length'] !== that.uncompressedSize) {\n                throw new Error(\"Bug : uncompressed data size mismatch\");\n            }\n        });\n        return worker;\n    },\n    /**\n     * Create a worker to get the compressed content.\n     * @return {GenericWorker} the worker.\n     */\n    getCompressedWorker : function () {\n        return new DataWorker(external.Promise.resolve(this.compressedContent))\n        .withStreamInfo(\"compressedSize\", this.compressedSize)\n        .withStreamInfo(\"uncompressedSize\", this.uncompressedSize)\n        .withStreamInfo(\"crc32\", this.crc32)\n        .withStreamInfo(\"compression\", this.compression)\n        ;\n    }\n};\n\n/**\n * Chain the given worker with other workers to compress the content with the\n * given compresion.\n * @param {GenericWorker} uncompressedWorker the worker to pipe.\n * @param {Object} compression the compression object.\n * @param {Object} compressionOptions the options to use when compressing.\n * @return {GenericWorker} the new worker compressing the content.\n */\nCompressedObject.createWorkerFrom = function (uncompressedWorker, compression, compressionOptions) {\n    return uncompressedWorker\n    .pipe(new Crc32Probe())\n    .pipe(new DataLengthProbe(\"uncompressedSize\"))\n    .pipe(compression.compressWorker(compressionOptions))\n    .pipe(new DataLengthProbe(\"compressedSize\"))\n    .withStreamInfo(\"compression\", compression);\n};\n\nmodule.exports = CompressedObject;\n","'use strict';\n\nvar GenericWorker = require(\"./stream/GenericWorker\");\n\nexports.STORE = {\n    magic: \"\\x00\\x00\",\n    compressWorker : function (compressionOptions) {\n        return new GenericWorker(\"STORE compression\");\n    },\n    uncompressWorker : function () {\n        return new GenericWorker(\"STORE decompression\");\n    }\n};\nexports.DEFLATE = require('./flate');\n","'use strict';\n\nvar utils = require('./utils');\n\n/**\n * The following functions come from pako, from pako/lib/zlib/crc32.js\n * released under the MIT license, see pako https://github.com/nodeca/pako/\n */\n\n// Use ordinary array, since untyped makes no boost here\nfunction makeTable() {\n    var c, table = [];\n\n    for(var n =0; n < 256; n++){\n        c = n;\n        for(var k =0; k < 8; k++){\n            c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n        }\n        table[n] = c;\n    }\n\n    return table;\n}\n\n// Create table on load. Just 255 signed longs. Not a problem.\nvar crcTable = makeTable();\n\n\nfunction crc32(crc, buf, len, pos) {\n    var t = crcTable, end = pos + len;\n\n    crc = crc ^ (-1);\n\n    for (var i = pos; i < end; i++ ) {\n        crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n    }\n\n    return (crc ^ (-1)); // >>> 0;\n}\n\n// That's all for the pako functions.\n\n/**\n * Compute the crc32 of a string.\n * This is almost the same as the function crc32, but for strings. Using the\n * same function for the two use cases leads to horrible performances.\n * @param {Number} crc the starting value of the crc.\n * @param {String} str the string to use.\n * @param {Number} len the length of the string.\n * @param {Number} pos the starting position for the crc32 computation.\n * @return {Number} the computed crc32.\n */\nfunction crc32str(crc, str, len, pos) {\n    var t = crcTable, end = pos + len;\n\n    crc = crc ^ (-1);\n\n    for (var i = pos; i < end; i++ ) {\n        crc = (crc >>> 8) ^ t[(crc ^ str.charCodeAt(i)) & 0xFF];\n    }\n\n    return (crc ^ (-1)); // >>> 0;\n}\n\nmodule.exports = function crc32wrapper(input, crc) {\n    if (typeof input === \"undefined\" || !input.length) {\n        return 0;\n    }\n\n    var isArray = utils.getTypeOf(input) !== \"string\";\n\n    if(isArray) {\n        return crc32(crc|0, input, input.length, 0);\n    } else {\n        return crc32str(crc|0, input, input.length, 0);\n    }\n};\n","'use strict';\nexports.base64 = false;\nexports.binary = false;\nexports.dir = false;\nexports.createFolders = true;\nexports.date = null;\nexports.compression = null;\nexports.compressionOptions = null;\nexports.comment = null;\nexports.unixPermissions = null;\nexports.dosPermissions = null;\n","/* global Promise */\n'use strict';\n\n// load the global object first:\n// - it should be better integrated in the system (unhandledRejection in node)\n// - the environment may have a custom Promise implementation (see zone.js)\nvar ES6Promise = null;\nif (typeof Promise !== \"undefined\") {\n    ES6Promise = Promise;\n} else {\n    ES6Promise = require(\"lie\");\n}\n\n/**\n * Let the user use/change some implementations.\n */\nmodule.exports = {\n    Promise: ES6Promise\n};\n","'use strict';\nvar USE_TYPEDARRAY = (typeof Uint8Array !== 'undefined') && (typeof Uint16Array !== 'undefined') && (typeof Uint32Array !== 'undefined');\n\nvar pako = require(\"pako\");\nvar utils = require(\"./utils\");\nvar GenericWorker = require(\"./stream/GenericWorker\");\n\nvar ARRAY_TYPE = USE_TYPEDARRAY ? \"uint8array\" : \"array\";\n\nexports.magic = \"\\x08\\x00\";\n\n/**\n * Create a worker that uses pako to inflate/deflate.\n * @constructor\n * @param {String} action the name of the pako function to call : either \"Deflate\" or \"Inflate\".\n * @param {Object} options the options to use when (de)compressing.\n */\nfunction FlateWorker(action, options) {\n    GenericWorker.call(this, \"FlateWorker/\" + action);\n\n    this._pako = null;\n    this._pakoAction = action;\n    this._pakoOptions = options;\n    // the `meta` object from the last chunk received\n    // this allow this worker to pass around metadata\n    this.meta = {};\n}\n\nutils.inherits(FlateWorker, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nFlateWorker.prototype.processChunk = function (chunk) {\n    this.meta = chunk.meta;\n    if (this._pako === null) {\n        this._createPako();\n    }\n    this._pako.push(utils.transformTo(ARRAY_TYPE, chunk.data), false);\n};\n\n/**\n * @see GenericWorker.flush\n */\nFlateWorker.prototype.flush = function () {\n    GenericWorker.prototype.flush.call(this);\n    if (this._pako === null) {\n        this._createPako();\n    }\n    this._pako.push([], true);\n};\n/**\n * @see GenericWorker.cleanUp\n */\nFlateWorker.prototype.cleanUp = function () {\n    GenericWorker.prototype.cleanUp.call(this);\n    this._pako = null;\n};\n\n/**\n * Create the _pako object.\n * TODO: lazy-loading this object isn't the best solution but it's the\n * quickest. The best solution is to lazy-load the worker list. See also the\n * issue #446.\n */\nFlateWorker.prototype._createPako = function () {\n    this._pako = new pako[this._pakoAction]({\n        raw: true,\n        level: this._pakoOptions.level || -1 // default compression\n    });\n    var self = this;\n    this._pako.onData = function(data) {\n        self.push({\n            data : data,\n            meta : self.meta\n        });\n    };\n};\n\nexports.compressWorker = function (compressionOptions) {\n    return new FlateWorker(\"Deflate\", compressionOptions);\n};\nexports.uncompressWorker = function () {\n    return new FlateWorker(\"Inflate\", {});\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar GenericWorker = require('../stream/GenericWorker');\nvar utf8 = require('../utf8');\nvar crc32 = require('../crc32');\nvar signature = require('../signature');\n\n/**\n * Transform an integer into a string in hexadecimal.\n * @private\n * @param {number} dec the number to convert.\n * @param {number} bytes the number of bytes to generate.\n * @returns {string} the result.\n */\nvar decToHex = function(dec, bytes) {\n    var hex = \"\", i;\n    for (i = 0; i < bytes; i++) {\n        hex += String.fromCharCode(dec & 0xff);\n        dec = dec >>> 8;\n    }\n    return hex;\n};\n\n/**\n * Generate the UNIX part of the external file attributes.\n * @param {Object} unixPermissions the unix permissions or null.\n * @param {Boolean} isDir true if the entry is a directory, false otherwise.\n * @return {Number} a 32 bit integer.\n *\n * adapted from http://unix.stackexchange.com/questions/14705/the-zip-formats-external-file-attribute :\n *\n * TTTTsstrwxrwxrwx0000000000ADVSHR\n * ^^^^____________________________ file type, see zipinfo.c (UNX_*)\n *     ^^^_________________________ setuid, setgid, sticky\n *        ^^^^^^^^^________________ permissions\n *                 ^^^^^^^^^^______ not used ?\n *                           ^^^^^^ DOS attribute bits : Archive, Directory, Volume label, System file, Hidden, Read only\n */\nvar generateUnixExternalFileAttr = function (unixPermissions, isDir) {\n\n    var result = unixPermissions;\n    if (!unixPermissions) {\n        // I can't use octal values in strict mode, hence the hexa.\n        //  040775 => 0x41fd\n        // 0100664 => 0x81b4\n        result = isDir ? 0x41fd : 0x81b4;\n    }\n    return (result & 0xFFFF) << 16;\n};\n\n/**\n * Generate the DOS part of the external file attributes.\n * @param {Object} dosPermissions the dos permissions or null.\n * @param {Boolean} isDir true if the entry is a directory, false otherwise.\n * @return {Number} a 32 bit integer.\n *\n * Bit 0     Read-Only\n * Bit 1     Hidden\n * Bit 2     System\n * Bit 3     Volume Label\n * Bit 4     Directory\n * Bit 5     Archive\n */\nvar generateDosExternalFileAttr = function (dosPermissions, isDir) {\n\n    // the dir flag is already set for compatibility\n    return (dosPermissions || 0)  & 0x3F;\n};\n\n/**\n * Generate the various parts used in the construction of the final zip file.\n * @param {Object} streamInfo the hash with informations about the compressed file.\n * @param {Boolean} streamedContent is the content streamed ?\n * @param {Boolean} streamingEnded is the stream finished ?\n * @param {number} offset the current offset from the start of the zip file.\n * @param {String} platform let's pretend we are this platform (change platform dependents fields)\n * @param {Function} encodeFileName the function to encode the file name / comment.\n * @return {Object} the zip parts.\n */\nvar generateZipParts = function(streamInfo, streamedContent, streamingEnded, offset, platform, encodeFileName) {\n    var file = streamInfo['file'],\n    compression = streamInfo['compression'],\n    useCustomEncoding = encodeFileName !== utf8.utf8encode,\n    encodedFileName = utils.transformTo(\"string\", encodeFileName(file.name)),\n    utfEncodedFileName = utils.transformTo(\"string\", utf8.utf8encode(file.name)),\n    comment = file.comment,\n    encodedComment = utils.transformTo(\"string\", encodeFileName(comment)),\n    utfEncodedComment = utils.transformTo(\"string\", utf8.utf8encode(comment)),\n    useUTF8ForFileName = utfEncodedFileName.length !== file.name.length,\n    useUTF8ForComment = utfEncodedComment.length !== comment.length,\n    dosTime,\n    dosDate,\n    extraFields = \"\",\n    unicodePathExtraField = \"\",\n    unicodeCommentExtraField = \"\",\n    dir = file.dir,\n    date = file.date;\n\n\n    var dataInfo = {\n        crc32 : 0,\n        compressedSize : 0,\n        uncompressedSize : 0\n    };\n\n    // if the content is streamed, the sizes/crc32 are only available AFTER\n    // the end of the stream.\n    if (!streamedContent || streamingEnded) {\n        dataInfo.crc32 = streamInfo['crc32'];\n        dataInfo.compressedSize = streamInfo['compressedSize'];\n        dataInfo.uncompressedSize = streamInfo['uncompressedSize'];\n    }\n\n    var bitflag = 0;\n    if (streamedContent) {\n        // Bit 3: the sizes/crc32 are set to zero in the local header.\n        // The correct values are put in the data descriptor immediately\n        // following the compressed data.\n        bitflag |= 0x0008;\n    }\n    if (!useCustomEncoding && (useUTF8ForFileName || useUTF8ForComment)) {\n        // Bit 11: Language encoding flag (EFS).\n        bitflag |= 0x0800;\n    }\n\n\n    var extFileAttr = 0;\n    var versionMadeBy = 0;\n    if (dir) {\n        // dos or unix, we set the dos dir flag\n        extFileAttr |= 0x00010;\n    }\n    if(platform === \"UNIX\") {\n        versionMadeBy = 0x031E; // UNIX, version 3.0\n        extFileAttr |= generateUnixExternalFileAttr(file.unixPermissions, dir);\n    } else { // DOS or other, fallback to DOS\n        versionMadeBy = 0x0014; // DOS, version 2.0\n        extFileAttr |= generateDosExternalFileAttr(file.dosPermissions, dir);\n    }\n\n    // date\n    // @see http://www.delorie.com/djgpp/doc/rbinter/it/52/13.html\n    // @see http://www.delorie.com/djgpp/doc/rbinter/it/65/16.html\n    // @see http://www.delorie.com/djgpp/doc/rbinter/it/66/16.html\n\n    dosTime = date.getUTCHours();\n    dosTime = dosTime << 6;\n    dosTime = dosTime | date.getUTCMinutes();\n    dosTime = dosTime << 5;\n    dosTime = dosTime | date.getUTCSeconds() / 2;\n\n    dosDate = date.getUTCFullYear() - 1980;\n    dosDate = dosDate << 4;\n    dosDate = dosDate | (date.getUTCMonth() + 1);\n    dosDate = dosDate << 5;\n    dosDate = dosDate | date.getUTCDate();\n\n    if (useUTF8ForFileName) {\n        // set the unicode path extra field. unzip needs at least one extra\n        // field to correctly handle unicode path, so using the path is as good\n        // as any other information. This could improve the situation with\n        // other archive managers too.\n        // This field is usually used without the utf8 flag, with a non\n        // unicode path in the header (winrar, winzip). This helps (a bit)\n        // with the messy Windows' default compressed folders feature but\n        // breaks on p7zip which doesn't seek the unicode path extra field.\n        // So for now, UTF-8 everywhere !\n        unicodePathExtraField =\n            // Version\n            decToHex(1, 1) +\n            // NameCRC32\n            decToHex(crc32(encodedFileName), 4) +\n            // UnicodeName\n            utfEncodedFileName;\n\n        extraFields +=\n            // Info-ZIP Unicode Path Extra Field\n            \"\\x75\\x70\" +\n            // size\n            decToHex(unicodePathExtraField.length, 2) +\n            // content\n            unicodePathExtraField;\n    }\n\n    if(useUTF8ForComment) {\n\n        unicodeCommentExtraField =\n            // Version\n            decToHex(1, 1) +\n            // CommentCRC32\n            decToHex(crc32(encodedComment), 4) +\n            // UnicodeName\n            utfEncodedComment;\n\n        extraFields +=\n            // Info-ZIP Unicode Path Extra Field\n            \"\\x75\\x63\" +\n            // size\n            decToHex(unicodeCommentExtraField.length, 2) +\n            // content\n            unicodeCommentExtraField;\n    }\n\n    var header = \"\";\n\n    // version needed to extract\n    header += \"\\x0A\\x00\";\n    // general purpose bit flag\n    header += decToHex(bitflag, 2);\n    // compression method\n    header += compression.magic;\n    // last mod file time\n    header += decToHex(dosTime, 2);\n    // last mod file date\n    header += decToHex(dosDate, 2);\n    // crc-32\n    header += decToHex(dataInfo.crc32, 4);\n    // compressed size\n    header += decToHex(dataInfo.compressedSize, 4);\n    // uncompressed size\n    header += decToHex(dataInfo.uncompressedSize, 4);\n    // file name length\n    header += decToHex(encodedFileName.length, 2);\n    // extra field length\n    header += decToHex(extraFields.length, 2);\n\n\n    var fileRecord = signature.LOCAL_FILE_HEADER + header + encodedFileName + extraFields;\n\n    var dirRecord = signature.CENTRAL_FILE_HEADER +\n        // version made by (00: DOS)\n        decToHex(versionMadeBy, 2) +\n        // file header (common to file and central directory)\n        header +\n        // file comment length\n        decToHex(encodedComment.length, 2) +\n        // disk number start\n        \"\\x00\\x00\" +\n        // internal file attributes TODO\n        \"\\x00\\x00\" +\n        // external file attributes\n        decToHex(extFileAttr, 4) +\n        // relative offset of local header\n        decToHex(offset, 4) +\n        // file name\n        encodedFileName +\n        // extra field\n        extraFields +\n        // file comment\n        encodedComment;\n\n    return {\n        fileRecord: fileRecord,\n        dirRecord: dirRecord\n    };\n};\n\n/**\n * Generate the EOCD record.\n * @param {Number} entriesCount the number of entries in the zip file.\n * @param {Number} centralDirLength the length (in bytes) of the central dir.\n * @param {Number} localDirLength the length (in bytes) of the local dir.\n * @param {String} comment the zip file comment as a binary string.\n * @param {Function} encodeFileName the function to encode the comment.\n * @return {String} the EOCD record.\n */\nvar generateCentralDirectoryEnd = function (entriesCount, centralDirLength, localDirLength, comment, encodeFileName) {\n    var dirEnd = \"\";\n    var encodedComment = utils.transformTo(\"string\", encodeFileName(comment));\n\n    // end of central dir signature\n    dirEnd = signature.CENTRAL_DIRECTORY_END +\n        // number of this disk\n        \"\\x00\\x00\" +\n        // number of the disk with the start of the central directory\n        \"\\x00\\x00\" +\n        // total number of entries in the central directory on this disk\n        decToHex(entriesCount, 2) +\n        // total number of entries in the central directory\n        decToHex(entriesCount, 2) +\n        // size of the central directory   4 bytes\n        decToHex(centralDirLength, 4) +\n        // offset of start of central directory with respect to the starting disk number\n        decToHex(localDirLength, 4) +\n        // .ZIP file comment length\n        decToHex(encodedComment.length, 2) +\n        // .ZIP file comment\n        encodedComment;\n\n    return dirEnd;\n};\n\n/**\n * Generate data descriptors for a file entry.\n * @param {Object} streamInfo the hash generated by a worker, containing informations\n * on the file entry.\n * @return {String} the data descriptors.\n */\nvar generateDataDescriptors = function (streamInfo) {\n    var descriptor = \"\";\n    descriptor = signature.DATA_DESCRIPTOR +\n        // crc-32                          4 bytes\n        decToHex(streamInfo['crc32'], 4) +\n        // compressed size                 4 bytes\n        decToHex(streamInfo['compressedSize'], 4) +\n        // uncompressed size               4 bytes\n        decToHex(streamInfo['uncompressedSize'], 4);\n\n    return descriptor;\n};\n\n\n/**\n * A worker to concatenate other workers to create a zip file.\n * @param {Boolean} streamFiles `true` to stream the content of the files,\n * `false` to accumulate it.\n * @param {String} comment the comment to use.\n * @param {String} platform the platform to use, \"UNIX\" or \"DOS\".\n * @param {Function} encodeFileName the function to encode file names and comments.\n */\nfunction ZipFileWorker(streamFiles, comment, platform, encodeFileName) {\n    GenericWorker.call(this, \"ZipFileWorker\");\n    // The number of bytes written so far. This doesn't count accumulated chunks.\n    this.bytesWritten = 0;\n    // The comment of the zip file\n    this.zipComment = comment;\n    // The platform \"generating\" the zip file.\n    this.zipPlatform = platform;\n    // the function to encode file names and comments.\n    this.encodeFileName = encodeFileName;\n    // Should we stream the content of the files ?\n    this.streamFiles = streamFiles;\n    // If `streamFiles` is false, we will need to accumulate the content of the\n    // files to calculate sizes / crc32 (and write them *before* the content).\n    // This boolean indicates if we are accumulating chunks (it will change a lot\n    // during the lifetime of this worker).\n    this.accumulate = false;\n    // The buffer receiving chunks when accumulating content.\n    this.contentBuffer = [];\n    // The list of generated directory records.\n    this.dirRecords = [];\n    // The offset (in bytes) from the beginning of the zip file for the current source.\n    this.currentSourceOffset = 0;\n    // The total number of entries in this zip file.\n    this.entriesCount = 0;\n    // the name of the file currently being added, null when handling the end of the zip file.\n    // Used for the emited metadata.\n    this.currentFile = null;\n\n\n\n    this._sources = [];\n}\nutils.inherits(ZipFileWorker, GenericWorker);\n\n/**\n * @see GenericWorker.push\n */\nZipFileWorker.prototype.push = function (chunk) {\n\n    var currentFilePercent = chunk.meta.percent || 0;\n    var entriesCount = this.entriesCount;\n    var remainingFiles = this._sources.length;\n\n    if(this.accumulate) {\n        this.contentBuffer.push(chunk);\n    } else {\n        this.bytesWritten += chunk.data.length;\n\n        GenericWorker.prototype.push.call(this, {\n            data : chunk.data,\n            meta : {\n                currentFile : this.currentFile,\n                percent : entriesCount ? (currentFilePercent + 100 * (entriesCount - remainingFiles - 1)) / entriesCount : 100\n            }\n        });\n    }\n};\n\n/**\n * The worker started a new source (an other worker).\n * @param {Object} streamInfo the streamInfo object from the new source.\n */\nZipFileWorker.prototype.openedSource = function (streamInfo) {\n    this.currentSourceOffset = this.bytesWritten;\n    this.currentFile = streamInfo['file'].name;\n\n    var streamedContent = this.streamFiles && !streamInfo['file'].dir;\n\n    // don't stream folders (because they don't have any content)\n    if(streamedContent) {\n        var record = generateZipParts(streamInfo, streamedContent, false, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);\n        this.push({\n            data : record.fileRecord,\n            meta : {percent:0}\n        });\n    } else {\n        // we need to wait for the whole file before pushing anything\n        this.accumulate = true;\n    }\n};\n\n/**\n * The worker finished a source (an other worker).\n * @param {Object} streamInfo the streamInfo object from the finished source.\n */\nZipFileWorker.prototype.closedSource = function (streamInfo) {\n    this.accumulate = false;\n    var streamedContent = this.streamFiles && !streamInfo['file'].dir;\n    var record = generateZipParts(streamInfo, streamedContent, true, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);\n\n    this.dirRecords.push(record.dirRecord);\n    if(streamedContent) {\n        // after the streamed file, we put data descriptors\n        this.push({\n            data : generateDataDescriptors(streamInfo),\n            meta : {percent:100}\n        });\n    } else {\n        // the content wasn't streamed, we need to push everything now\n        // first the file record, then the content\n        this.push({\n            data : record.fileRecord,\n            meta : {percent:0}\n        });\n        while(this.contentBuffer.length) {\n            this.push(this.contentBuffer.shift());\n        }\n    }\n    this.currentFile = null;\n};\n\n/**\n * @see GenericWorker.flush\n */\nZipFileWorker.prototype.flush = function () {\n\n    var localDirLength = this.bytesWritten;\n    for(var i = 0; i < this.dirRecords.length; i++) {\n        this.push({\n            data : this.dirRecords[i],\n            meta : {percent:100}\n        });\n    }\n    var centralDirLength = this.bytesWritten - localDirLength;\n\n    var dirEnd = generateCentralDirectoryEnd(this.dirRecords.length, centralDirLength, localDirLength, this.zipComment, this.encodeFileName);\n\n    this.push({\n        data : dirEnd,\n        meta : {percent:100}\n    });\n};\n\n/**\n * Prepare the next source to be read.\n */\nZipFileWorker.prototype.prepareNextSource = function () {\n    this.previous = this._sources.shift();\n    this.openedSource(this.previous.streamInfo);\n    if (this.isPaused) {\n        this.previous.pause();\n    } else {\n        this.previous.resume();\n    }\n};\n\n/**\n * @see GenericWorker.registerPrevious\n */\nZipFileWorker.prototype.registerPrevious = function (previous) {\n    this._sources.push(previous);\n    var self = this;\n\n    previous.on('data', function (chunk) {\n        self.processChunk(chunk);\n    });\n    previous.on('end', function () {\n        self.closedSource(self.previous.streamInfo);\n        if(self._sources.length) {\n            self.prepareNextSource();\n        } else {\n            self.end();\n        }\n    });\n    previous.on('error', function (e) {\n        self.error(e);\n    });\n    return this;\n};\n\n/**\n * @see GenericWorker.resume\n */\nZipFileWorker.prototype.resume = function () {\n    if(!GenericWorker.prototype.resume.call(this)) {\n        return false;\n    }\n\n    if (!this.previous && this._sources.length) {\n        this.prepareNextSource();\n        return true;\n    }\n    if (!this.previous && !this._sources.length && !this.generatedError) {\n        this.end();\n        return true;\n    }\n};\n\n/**\n * @see GenericWorker.error\n */\nZipFileWorker.prototype.error = function (e) {\n    var sources = this._sources;\n    if(!GenericWorker.prototype.error.call(this, e)) {\n        return false;\n    }\n    for(var i = 0; i < sources.length; i++) {\n        try {\n            sources[i].error(e);\n        } catch(e) {\n            // the `error` exploded, nothing to do\n        }\n    }\n    return true;\n};\n\n/**\n * @see GenericWorker.lock\n */\nZipFileWorker.prototype.lock = function () {\n    GenericWorker.prototype.lock.call(this);\n    var sources = this._sources;\n    for(var i = 0; i < sources.length; i++) {\n        sources[i].lock();\n    }\n};\n\nmodule.exports = ZipFileWorker;\n","'use strict';\n\nvar compressions = require('../compressions');\nvar ZipFileWorker = require('./ZipFileWorker');\n\n/**\n * Find the compression to use.\n * @param {String} fileCompression the compression defined at the file level, if any.\n * @param {String} zipCompression the compression defined at the load() level.\n * @return {Object} the compression object to use.\n */\nvar getCompression = function (fileCompression, zipCompression) {\n\n    var compressionName = fileCompression || zipCompression;\n    var compression = compressions[compressionName];\n    if (!compression) {\n        throw new Error(compressionName + \" is not a valid compression method !\");\n    }\n    return compression;\n};\n\n/**\n * Create a worker to generate a zip file.\n * @param {JSZip} zip the JSZip instance at the right root level.\n * @param {Object} options to generate the zip file.\n * @param {String} comment the comment to use.\n */\nexports.generateWorker = function (zip, options, comment) {\n\n    var zipFileWorker = new ZipFileWorker(options.streamFiles, comment, options.platform, options.encodeFileName);\n    var entriesCount = 0;\n    try {\n\n        zip.forEach(function (relativePath, file) {\n            entriesCount++;\n            var compression = getCompression(file.options.compression, options.compression);\n            var compressionOptions = file.options.compressionOptions || options.compressionOptions || {};\n            var dir = file.dir, date = file.date;\n\n            file._compressWorker(compression, compressionOptions)\n            .withStreamInfo(\"file\", {\n                name : relativePath,\n                dir : dir,\n                date : date,\n                comment : file.comment || \"\",\n                unixPermissions : file.unixPermissions,\n                dosPermissions : file.dosPermissions\n            })\n            .pipe(zipFileWorker);\n        });\n        zipFileWorker.entriesCount = entriesCount;\n    } catch (e) {\n        zipFileWorker.error(e);\n    }\n\n    return zipFileWorker;\n};\n","'use strict';\n\n/**\n * Representation a of zip file in js\n * @constructor\n */\nfunction JSZip() {\n    // if this constructor is used without `new`, it adds `new` before itself:\n    if(!(this instanceof JSZip)) {\n        return new JSZip();\n    }\n\n    if(arguments.length) {\n        throw new Error(\"The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.\");\n    }\n\n    // object containing the files :\n    // {\n    //   \"folder/\" : {...},\n    //   \"folder/data.txt\" : {...}\n    // }\n    this.files = {};\n\n    this.comment = null;\n\n    // Where we are in the hierarchy\n    this.root = \"\";\n    this.clone = function() {\n        var newObj = new JSZip();\n        for (var i in this) {\n            if (typeof this[i] !== \"function\") {\n                newObj[i] = this[i];\n            }\n        }\n        return newObj;\n    };\n}\nJSZip.prototype = require('./object');\nJSZip.prototype.loadAsync = require('./load');\nJSZip.support = require('./support');\nJSZip.defaults = require('./defaults');\n\n// TODO find a better way to handle this version,\n// a require('package.json').version doesn't work with webpack, see #327\nJSZip.version = \"3.1.5\";\n\nJSZip.loadAsync = function (content, options) {\n    return new JSZip().loadAsync(content, options);\n};\n\nJSZip.external = require(\"./external\");\nmodule.exports = JSZip;\n","'use strict';\nvar utils = require('./utils');\nvar external = require(\"./external\");\nvar utf8 = require('./utf8');\nvar utils = require('./utils');\nvar ZipEntries = require('./zipEntries');\nvar Crc32Probe = require('./stream/Crc32Probe');\nvar nodejsUtils = require(\"./nodejsUtils\");\n\n/**\n * Check the CRC32 of an entry.\n * @param {ZipEntry} zipEntry the zip entry to check.\n * @return {Promise} the result.\n */\nfunction checkEntryCRC32(zipEntry) {\n    return new external.Promise(function (resolve, reject) {\n        var worker = zipEntry.decompressed.getContentWorker().pipe(new Crc32Probe());\n        worker.on(\"error\", function (e) {\n            reject(e);\n        })\n        .on(\"end\", function () {\n            if (worker.streamInfo.crc32 !== zipEntry.decompressed.crc32) {\n                reject(new Error(\"Corrupted zip : CRC32 mismatch\"));\n            } else {\n                resolve();\n            }\n        })\n        .resume();\n    });\n}\n\nmodule.exports = function(data, options) {\n    var zip = this;\n    options = utils.extend(options || {}, {\n        base64: false,\n        checkCRC32: false,\n        optimizedBinaryString: false,\n        createFolders: false,\n        decodeFileName: utf8.utf8decode\n    });\n\n    if (nodejsUtils.isNode && nodejsUtils.isStream(data)) {\n        return external.Promise.reject(new Error(\"JSZip can't accept a stream when loading a zip file.\"));\n    }\n\n    return utils.prepareContent(\"the loaded zip file\", data, true, options.optimizedBinaryString, options.base64)\n    .then(function(data) {\n        var zipEntries = new ZipEntries(options);\n        zipEntries.load(data);\n        return zipEntries;\n    }).then(function checkCRC32(zipEntries) {\n        var promises = [external.Promise.resolve(zipEntries)];\n        var files = zipEntries.files;\n        if (options.checkCRC32) {\n            for (var i = 0; i < files.length; i++) {\n                promises.push(checkEntryCRC32(files[i]));\n            }\n        }\n        return external.Promise.all(promises);\n    }).then(function addFiles(results) {\n        var zipEntries = results.shift();\n        var files = zipEntries.files;\n        for (var i = 0; i < files.length; i++) {\n            var input = files[i];\n            zip.file(input.fileNameStr, input.decompressed, {\n                binary: true,\n                optimizedBinaryString: true,\n                date: input.date,\n                dir: input.dir,\n                comment : input.fileCommentStr.length ? input.fileCommentStr : null,\n                unixPermissions : input.unixPermissions,\n                dosPermissions : input.dosPermissions,\n                createFolders: options.createFolders\n            });\n        }\n        if (zipEntries.zipComment.length) {\n            zip.comment = zipEntries.zipComment;\n        }\n\n        return zip;\n    });\n};\n","\"use strict\";\n\nvar utils = require('../utils');\nvar GenericWorker = require('../stream/GenericWorker');\n\n/**\n * A worker that use a nodejs stream as source.\n * @constructor\n * @param {String} filename the name of the file entry for this stream.\n * @param {Readable} stream the nodejs stream.\n */\nfunction NodejsStreamInputAdapter(filename, stream) {\n    GenericWorker.call(this, \"Nodejs stream input adapter for \" + filename);\n    this._upstreamEnded = false;\n    this._bindStream(stream);\n}\n\nutils.inherits(NodejsStreamInputAdapter, GenericWorker);\n\n/**\n * Prepare the stream and bind the callbacks on it.\n * Do this ASAP on node 0.10 ! A lazy binding doesn't always work.\n * @param {Stream} stream the nodejs stream to use.\n */\nNodejsStreamInputAdapter.prototype._bindStream = function (stream) {\n    var self = this;\n    this._stream = stream;\n    stream.pause();\n    stream\n    .on(\"data\", function (chunk) {\n        self.push({\n            data: chunk,\n            meta : {\n                percent : 0\n            }\n        });\n    })\n    .on(\"error\", function (e) {\n        if(self.isPaused) {\n            this.generatedError = e;\n        } else {\n            self.error(e);\n        }\n    })\n    .on(\"end\", function () {\n        if(self.isPaused) {\n            self._upstreamEnded = true;\n        } else {\n            self.end();\n        }\n    });\n};\nNodejsStreamInputAdapter.prototype.pause = function () {\n    if(!GenericWorker.prototype.pause.call(this)) {\n        return false;\n    }\n    this._stream.pause();\n    return true;\n};\nNodejsStreamInputAdapter.prototype.resume = function () {\n    if(!GenericWorker.prototype.resume.call(this)) {\n        return false;\n    }\n\n    if(this._upstreamEnded) {\n        this.end();\n    } else {\n        this._stream.resume();\n    }\n\n    return true;\n};\n\nmodule.exports = NodejsStreamInputAdapter;\n","'use strict';\n\nvar Readable = require('readable-stream').Readable;\n\nvar utils = require('../utils');\nutils.inherits(NodejsStreamOutputAdapter, Readable);\n\n/**\n* A nodejs stream using a worker as source.\n* @see the SourceWrapper in http://nodejs.org/api/stream.html\n* @constructor\n* @param {StreamHelper} helper the helper wrapping the worker\n* @param {Object} options the nodejs stream options\n* @param {Function} updateCb the update callback.\n*/\nfunction NodejsStreamOutputAdapter(helper, options, updateCb) {\n    Readable.call(this, options);\n    this._helper = helper;\n\n    var self = this;\n    helper.on(\"data\", function (data, meta) {\n        if (!self.push(data)) {\n            self._helper.pause();\n        }\n        if(updateCb) {\n            updateCb(meta);\n        }\n    })\n    .on(\"error\", function(e) {\n        self.emit('error', e);\n    })\n    .on(\"end\", function () {\n        self.push(null);\n    });\n}\n\n\nNodejsStreamOutputAdapter.prototype._read = function() {\n    this._helper.resume();\n};\n\nmodule.exports = NodejsStreamOutputAdapter;\n","'use strict';\n\nmodule.exports = {\n    /**\n     * True if this is running in Nodejs, will be undefined in a browser.\n     * In a browser, browserify won't include this file and the whole module\n     * will be resolved an empty object.\n     */\n    isNode : typeof Buffer !== \"undefined\",\n    /**\n     * Create a new nodejs Buffer from an existing content.\n     * @param {Object} data the data to pass to the constructor.\n     * @param {String} encoding the encoding to use.\n     * @return {Buffer} a new Buffer.\n     */\n    newBufferFrom: function(data, encoding) {\n        // XXX We can't use `Buffer.from` which comes from `Uint8Array.from`\n        // in nodejs v4 (< v.4.5). It's not the expected implementation (and\n        // has a different signature).\n        // see https://github.com/nodejs/node/issues/8053\n        // A condition on nodejs' version won't solve the issue as we don't\n        // control the Buffer polyfills that may or may not be used.\n        return new Buffer(data, encoding);\n    },\n    /**\n     * Create a new nodejs Buffer with the specified size.\n     * @param {Integer} size the size of the buffer.\n     * @return {Buffer} a new Buffer.\n     */\n    allocBuffer: function (size) {\n        if (Buffer.alloc) {\n            return Buffer.alloc(size);\n        } else {\n            return new Buffer(size);\n        }\n    },\n    /**\n     * Find out if an object is a Buffer.\n     * @param {Object} b the object to test.\n     * @return {Boolean} true if the object is a Buffer, false otherwise.\n     */\n    isBuffer : function(b){\n        return Buffer.isBuffer(b);\n    },\n\n    isStream : function (obj) {\n        return obj &&\n            typeof obj.on === \"function\" &&\n            typeof obj.pause === \"function\" &&\n            typeof obj.resume === \"function\";\n    }\n};\n","'use strict';\nvar utf8 = require('./utf8');\nvar utils = require('./utils');\nvar GenericWorker = require('./stream/GenericWorker');\nvar StreamHelper = require('./stream/StreamHelper');\nvar defaults = require('./defaults');\nvar CompressedObject = require('./compressedObject');\nvar ZipObject = require('./zipObject');\nvar generate = require(\"./generate\");\nvar nodejsUtils = require(\"./nodejsUtils\");\nvar NodejsStreamInputAdapter = require(\"./nodejs/NodejsStreamInputAdapter\");\n\n\n/**\n * Add a file in the current folder.\n * @private\n * @param {string} name the name of the file\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data of the file\n * @param {Object} originalOptions the options of the file\n * @return {Object} the new file.\n */\nvar fileAdd = function(name, data, originalOptions) {\n    // be sure sub folders exist\n    var dataType = utils.getTypeOf(data),\n        parent;\n\n\n    /*\n     * Correct options.\n     */\n\n    var o = utils.extend(originalOptions || {}, defaults);\n    o.date = o.date || new Date();\n    if (o.compression !== null) {\n        o.compression = o.compression.toUpperCase();\n    }\n\n    if (typeof o.unixPermissions === \"string\") {\n        o.unixPermissions = parseInt(o.unixPermissions, 8);\n    }\n\n    // UNX_IFDIR  0040000 see zipinfo.c\n    if (o.unixPermissions && (o.unixPermissions & 0x4000)) {\n        o.dir = true;\n    }\n    // Bit 4    Directory\n    if (o.dosPermissions && (o.dosPermissions & 0x0010)) {\n        o.dir = true;\n    }\n\n    if (o.dir) {\n        name = forceTrailingSlash(name);\n    }\n    if (o.createFolders && (parent = parentFolder(name))) {\n        folderAdd.call(this, parent, true);\n    }\n\n    var isUnicodeString = dataType === \"string\" && o.binary === false && o.base64 === false;\n    if (!originalOptions || typeof originalOptions.binary === \"undefined\") {\n        o.binary = !isUnicodeString;\n    }\n\n\n    var isCompressedEmpty = (data instanceof CompressedObject) && data.uncompressedSize === 0;\n\n    if (isCompressedEmpty || o.dir || !data || data.length === 0) {\n        o.base64 = false;\n        o.binary = true;\n        data = \"\";\n        o.compression = \"STORE\";\n        dataType = \"string\";\n    }\n\n    /*\n     * Convert content to fit.\n     */\n\n    var zipObjectContent = null;\n    if (data instanceof CompressedObject || data instanceof GenericWorker) {\n        zipObjectContent = data;\n    } else if (nodejsUtils.isNode && nodejsUtils.isStream(data)) {\n        zipObjectContent = new NodejsStreamInputAdapter(name, data);\n    } else {\n        zipObjectContent = utils.prepareContent(name, data, o.binary, o.optimizedBinaryString, o.base64);\n    }\n\n    var object = new ZipObject(name, zipObjectContent, o);\n    this.files[name] = object;\n    /*\n    TODO: we can't throw an exception because we have async promises\n    (we can have a promise of a Date() for example) but returning a\n    promise is useless because file(name, data) returns the JSZip\n    object for chaining. Should we break that to allow the user\n    to catch the error ?\n\n    return external.Promise.resolve(zipObjectContent)\n    .then(function () {\n        return object;\n    });\n    */\n};\n\n/**\n * Find the parent folder of the path.\n * @private\n * @param {string} path the path to use\n * @return {string} the parent folder, or \"\"\n */\nvar parentFolder = function (path) {\n    if (path.slice(-1) === '/') {\n        path = path.substring(0, path.length - 1);\n    }\n    var lastSlash = path.lastIndexOf('/');\n    return (lastSlash > 0) ? path.substring(0, lastSlash) : \"\";\n};\n\n/**\n * Returns the path with a slash at the end.\n * @private\n * @param {String} path the path to check.\n * @return {String} the path with a trailing slash.\n */\nvar forceTrailingSlash = function(path) {\n    // Check the name ends with a /\n    if (path.slice(-1) !== \"/\") {\n        path += \"/\"; // IE doesn't like substr(-1)\n    }\n    return path;\n};\n\n/**\n * Add a (sub) folder in the current folder.\n * @private\n * @param {string} name the folder's name\n * @param {boolean=} [createFolders] If true, automatically create sub\n *  folders. Defaults to false.\n * @return {Object} the new folder.\n */\nvar folderAdd = function(name, createFolders) {\n    createFolders = (typeof createFolders !== 'undefined') ? createFolders : defaults.createFolders;\n\n    name = forceTrailingSlash(name);\n\n    // Does this folder already exist?\n    if (!this.files[name]) {\n        fileAdd.call(this, name, null, {\n            dir: true,\n            createFolders: createFolders\n        });\n    }\n    return this.files[name];\n};\n\n/**\n* Cross-window, cross-Node-context regular expression detection\n* @param  {Object}  object Anything\n* @return {Boolean}        true if the object is a regular expression,\n* false otherwise\n*/\nfunction isRegExp(object) {\n    return Object.prototype.toString.call(object) === \"[object RegExp]\";\n}\n\n// return the actual prototype of JSZip\nvar out = {\n    /**\n     * @see loadAsync\n     */\n    load: function() {\n        throw new Error(\"This method has been removed in JSZip 3.0, please check the upgrade guide.\");\n    },\n\n\n    /**\n     * Call a callback function for each entry at this folder level.\n     * @param {Function} cb the callback function:\n     * function (relativePath, file) {...}\n     * It takes 2 arguments : the relative path and the file.\n     */\n    forEach: function(cb) {\n        var filename, relativePath, file;\n        for (filename in this.files) {\n            if (!this.files.hasOwnProperty(filename)) {\n                continue;\n            }\n            file = this.files[filename];\n            relativePath = filename.slice(this.root.length, filename.length);\n            if (relativePath && filename.slice(0, this.root.length) === this.root) { // the file is in the current root\n                cb(relativePath, file); // TODO reverse the parameters ? need to be clean AND consistent with the filter search fn...\n            }\n        }\n    },\n\n    /**\n     * Filter nested files/folders with the specified function.\n     * @param {Function} search the predicate to use :\n     * function (relativePath, file) {...}\n     * It takes 2 arguments : the relative path and the file.\n     * @return {Array} An array of matching elements.\n     */\n    filter: function(search) {\n        var result = [];\n        this.forEach(function (relativePath, entry) {\n            if (search(relativePath, entry)) { // the file matches the function\n                result.push(entry);\n            }\n\n        });\n        return result;\n    },\n\n    /**\n     * Add a file to the zip file, or search a file.\n     * @param   {string|RegExp} name The name of the file to add (if data is defined),\n     * the name of the file to find (if no data) or a regex to match files.\n     * @param   {String|ArrayBuffer|Uint8Array|Buffer} data  The file data, either raw or base64 encoded\n     * @param   {Object} o     File options\n     * @return  {JSZip|Object|Array} this JSZip object (when adding a file),\n     * a file (when searching by string) or an array of files (when searching by regex).\n     */\n    file: function(name, data, o) {\n        if (arguments.length === 1) {\n            if (isRegExp(name)) {\n                var regexp = name;\n                return this.filter(function(relativePath, file) {\n                    return !file.dir && regexp.test(relativePath);\n                });\n            }\n            else { // text\n                var obj = this.files[this.root + name];\n                if (obj && !obj.dir) {\n                    return obj;\n                } else {\n                    return null;\n                }\n            }\n        }\n        else { // more than one argument : we have data !\n            name = this.root + name;\n            fileAdd.call(this, name, data, o);\n        }\n        return this;\n    },\n\n    /**\n     * Add a directory to the zip file, or search.\n     * @param   {String|RegExp} arg The name of the directory to add, or a regex to search folders.\n     * @return  {JSZip} an object with the new directory as the root, or an array containing matching folders.\n     */\n    folder: function(arg) {\n        if (!arg) {\n            return this;\n        }\n\n        if (isRegExp(arg)) {\n            return this.filter(function(relativePath, file) {\n                return file.dir && arg.test(relativePath);\n            });\n        }\n\n        // else, name is a new folder\n        var name = this.root + arg;\n        var newFolder = folderAdd.call(this, name);\n\n        // Allow chaining by returning a new object with this folder as the root\n        var ret = this.clone();\n        ret.root = newFolder.name;\n        return ret;\n    },\n\n    /**\n     * Delete a file, or a directory and all sub-files, from the zip\n     * @param {string} name the name of the file to delete\n     * @return {JSZip} this JSZip object\n     */\n    remove: function(name) {\n        name = this.root + name;\n        var file = this.files[name];\n        if (!file) {\n            // Look for any folders\n            if (name.slice(-1) !== \"/\") {\n                name += \"/\";\n            }\n            file = this.files[name];\n        }\n\n        if (file && !file.dir) {\n            // file\n            delete this.files[name];\n        } else {\n            // maybe a folder, delete recursively\n            var kids = this.filter(function(relativePath, file) {\n                return file.name.slice(0, name.length) === name;\n            });\n            for (var i = 0; i < kids.length; i++) {\n                delete this.files[kids[i].name];\n            }\n        }\n\n        return this;\n    },\n\n    /**\n     * Generate the complete zip file\n     * @param {Object} options the options to generate the zip file :\n     * - compression, \"STORE\" by default.\n     * - type, \"base64\" by default. Values are : string, base64, uint8array, arraybuffer, blob.\n     * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the zip file\n     */\n    generate: function(options) {\n        throw new Error(\"This method has been removed in JSZip 3.0, please check the upgrade guide.\");\n    },\n\n    /**\n     * Generate the complete zip file as an internal stream.\n     * @param {Object} options the options to generate the zip file :\n     * - compression, \"STORE\" by default.\n     * - type, \"base64\" by default. Values are : string, base64, uint8array, arraybuffer, blob.\n     * @return {StreamHelper} the streamed zip file.\n     */\n    generateInternalStream: function(options) {\n      var worker, opts = {};\n      try {\n          opts = utils.extend(options || {}, {\n              streamFiles: false,\n              compression: \"STORE\",\n              compressionOptions : null,\n              type: \"\",\n              platform: \"DOS\",\n              comment: null,\n              mimeType: 'application/zip',\n              encodeFileName: utf8.utf8encode\n          });\n\n          opts.type = opts.type.toLowerCase();\n          opts.compression = opts.compression.toUpperCase();\n\n          // \"binarystring\" is prefered but the internals use \"string\".\n          if(opts.type === \"binarystring\") {\n            opts.type = \"string\";\n          }\n\n          if (!opts.type) {\n            throw new Error(\"No output type specified.\");\n          }\n\n          utils.checkSupport(opts.type);\n\n          // accept nodejs `process.platform`\n          if(\n              opts.platform === 'darwin' ||\n              opts.platform === 'freebsd' ||\n              opts.platform === 'linux' ||\n              opts.platform === 'sunos'\n          ) {\n              opts.platform = \"UNIX\";\n          }\n          if (opts.platform === 'win32') {\n              opts.platform = \"DOS\";\n          }\n\n          var comment = opts.comment || this.comment || \"\";\n          worker = generate.generateWorker(this, opts, comment);\n      } catch (e) {\n        worker = new GenericWorker(\"error\");\n        worker.error(e);\n      }\n      return new StreamHelper(worker, opts.type || \"string\", opts.mimeType);\n    },\n    /**\n     * Generate the complete zip file asynchronously.\n     * @see generateInternalStream\n     */\n    generateAsync: function(options, onUpdate) {\n        return this.generateInternalStream(options).accumulate(onUpdate);\n    },\n    /**\n     * Generate the complete zip file asynchronously.\n     * @see generateInternalStream\n     */\n    generateNodeStream: function(options, onUpdate) {\n        options = options || {};\n        if (!options.type) {\n            options.type = \"nodebuffer\";\n        }\n        return this.generateInternalStream(options).toNodejsStream(onUpdate);\n    }\n};\nmodule.exports = out;\n","/*\n * This file is used by module bundlers (browserify/webpack/etc) when\n * including a stream implementation. We use \"readable-stream\" to get a\n * consistent behavior between nodejs versions but bundlers often have a shim\n * for \"stream\". Using this shim greatly improve the compatibility and greatly\n * reduce the final size of the bundle (only one stream implementation, not\n * two).\n */\nmodule.exports = require(\"stream\");\n","'use strict';\nvar DataReader = require('./DataReader');\nvar utils = require('../utils');\n\nfunction ArrayReader(data) {\n    DataReader.call(this, data);\n\tfor(var i = 0; i < this.data.length; i++) {\n\t\tdata[i] = data[i] & 0xFF;\n\t}\n}\nutils.inherits(ArrayReader, DataReader);\n/**\n * @see DataReader.byteAt\n */\nArrayReader.prototype.byteAt = function(i) {\n    return this.data[this.zero + i];\n};\n/**\n * @see DataReader.lastIndexOfSignature\n */\nArrayReader.prototype.lastIndexOfSignature = function(sig) {\n    var sig0 = sig.charCodeAt(0),\n        sig1 = sig.charCodeAt(1),\n        sig2 = sig.charCodeAt(2),\n        sig3 = sig.charCodeAt(3);\n    for (var i = this.length - 4; i >= 0; --i) {\n        if (this.data[i] === sig0 && this.data[i + 1] === sig1 && this.data[i + 2] === sig2 && this.data[i + 3] === sig3) {\n            return i - this.zero;\n        }\n    }\n\n    return -1;\n};\n/**\n * @see DataReader.readAndCheckSignature\n */\nArrayReader.prototype.readAndCheckSignature = function (sig) {\n    var sig0 = sig.charCodeAt(0),\n        sig1 = sig.charCodeAt(1),\n        sig2 = sig.charCodeAt(2),\n        sig3 = sig.charCodeAt(3),\n        data = this.readData(4);\n    return sig0 === data[0] && sig1 === data[1] && sig2 === data[2] && sig3 === data[3];\n};\n/**\n * @see DataReader.readData\n */\nArrayReader.prototype.readData = function(size) {\n    this.checkOffset(size);\n    if(size === 0) {\n        return [];\n    }\n    var result = this.data.slice(this.zero + this.index, this.zero + this.index + size);\n    this.index += size;\n    return result;\n};\nmodule.exports = ArrayReader;\n","'use strict';\nvar utils = require('../utils');\n\nfunction DataReader(data) {\n    this.data = data; // type : see implementation\n    this.length = data.length;\n    this.index = 0;\n    this.zero = 0;\n}\nDataReader.prototype = {\n    /**\n     * Check that the offset will not go too far.\n     * @param {string} offset the additional offset to check.\n     * @throws {Error} an Error if the offset is out of bounds.\n     */\n    checkOffset: function(offset) {\n        this.checkIndex(this.index + offset);\n    },\n    /**\n     * Check that the specified index will not be too far.\n     * @param {string} newIndex the index to check.\n     * @throws {Error} an Error if the index is out of bounds.\n     */\n    checkIndex: function(newIndex) {\n        if (this.length < this.zero + newIndex || newIndex < 0) {\n            throw new Error(\"End of data reached (data length = \" + this.length + \", asked index = \" + (newIndex) + \"). Corrupted zip ?\");\n        }\n    },\n    /**\n     * Change the index.\n     * @param {number} newIndex The new index.\n     * @throws {Error} if the new index is out of the data.\n     */\n    setIndex: function(newIndex) {\n        this.checkIndex(newIndex);\n        this.index = newIndex;\n    },\n    /**\n     * Skip the next n bytes.\n     * @param {number} n the number of bytes to skip.\n     * @throws {Error} if the new index is out of the data.\n     */\n    skip: function(n) {\n        this.setIndex(this.index + n);\n    },\n    /**\n     * Get the byte at the specified index.\n     * @param {number} i the index to use.\n     * @return {number} a byte.\n     */\n    byteAt: function(i) {\n        // see implementations\n    },\n    /**\n     * Get the next number with a given byte size.\n     * @param {number} size the number of bytes to read.\n     * @return {number} the corresponding number.\n     */\n    readInt: function(size) {\n        var result = 0,\n            i;\n        this.checkOffset(size);\n        for (i = this.index + size - 1; i >= this.index; i--) {\n            result = (result << 8) + this.byteAt(i);\n        }\n        this.index += size;\n        return result;\n    },\n    /**\n     * Get the next string with a given byte size.\n     * @param {number} size the number of bytes to read.\n     * @return {string} the corresponding string.\n     */\n    readString: function(size) {\n        return utils.transformTo(\"string\", this.readData(size));\n    },\n    /**\n     * Get raw data without conversion, <size> bytes.\n     * @param {number} size the number of bytes to read.\n     * @return {Object} the raw data, implementation specific.\n     */\n    readData: function(size) {\n        // see implementations\n    },\n    /**\n     * Find the last occurence of a zip signature (4 bytes).\n     * @param {string} sig the signature to find.\n     * @return {number} the index of the last occurence, -1 if not found.\n     */\n    lastIndexOfSignature: function(sig) {\n        // see implementations\n    },\n    /**\n     * Read the signature (4 bytes) at the current position and compare it with sig.\n     * @param {string} sig the expected signature\n     * @return {boolean} true if the signature matches, false otherwise.\n     */\n    readAndCheckSignature: function(sig) {\n        // see implementations\n    },\n    /**\n     * Get the next date.\n     * @return {Date} the date.\n     */\n    readDate: function() {\n        var dostime = this.readInt(4);\n        return new Date(Date.UTC(\n        ((dostime >> 25) & 0x7f) + 1980, // year\n        ((dostime >> 21) & 0x0f) - 1, // month\n        (dostime >> 16) & 0x1f, // day\n        (dostime >> 11) & 0x1f, // hour\n        (dostime >> 5) & 0x3f, // minute\n        (dostime & 0x1f) << 1)); // second\n    }\n};\nmodule.exports = DataReader;\n","'use strict';\nvar Uint8ArrayReader = require('./Uint8ArrayReader');\nvar utils = require('../utils');\n\nfunction NodeBufferReader(data) {\n    Uint8ArrayReader.call(this, data);\n}\nutils.inherits(NodeBufferReader, Uint8ArrayReader);\n\n/**\n * @see DataReader.readData\n */\nNodeBufferReader.prototype.readData = function(size) {\n    this.checkOffset(size);\n    var result = this.data.slice(this.zero + this.index, this.zero + this.index + size);\n    this.index += size;\n    return result;\n};\nmodule.exports = NodeBufferReader;\n","'use strict';\nvar DataReader = require('./DataReader');\nvar utils = require('../utils');\n\nfunction StringReader(data) {\n    DataReader.call(this, data);\n}\nutils.inherits(StringReader, DataReader);\n/**\n * @see DataReader.byteAt\n */\nStringReader.prototype.byteAt = function(i) {\n    return this.data.charCodeAt(this.zero + i);\n};\n/**\n * @see DataReader.lastIndexOfSignature\n */\nStringReader.prototype.lastIndexOfSignature = function(sig) {\n    return this.data.lastIndexOf(sig) - this.zero;\n};\n/**\n * @see DataReader.readAndCheckSignature\n */\nStringReader.prototype.readAndCheckSignature = function (sig) {\n    var data = this.readData(4);\n    return sig === data;\n};\n/**\n * @see DataReader.readData\n */\nStringReader.prototype.readData = function(size) {\n    this.checkOffset(size);\n    // this will work because the constructor applied the \"& 0xff\" mask.\n    var result = this.data.slice(this.zero + this.index, this.zero + this.index + size);\n    this.index += size;\n    return result;\n};\nmodule.exports = StringReader;\n","'use strict';\nvar ArrayReader = require('./ArrayReader');\nvar utils = require('../utils');\n\nfunction Uint8ArrayReader(data) {\n    ArrayReader.call(this, data);\n}\nutils.inherits(Uint8ArrayReader, ArrayReader);\n/**\n * @see DataReader.readData\n */\nUint8ArrayReader.prototype.readData = function(size) {\n    this.checkOffset(size);\n    if(size === 0) {\n        // in IE10, when using subarray(idx, idx), we get the array [0x00] instead of [].\n        return new Uint8Array(0);\n    }\n    var result = this.data.subarray(this.zero + this.index, this.zero + this.index + size);\n    this.index += size;\n    return result;\n};\nmodule.exports = Uint8ArrayReader;\n","'use strict';\n\nvar utils = require('../utils');\nvar support = require('../support');\nvar ArrayReader = require('./ArrayReader');\nvar StringReader = require('./StringReader');\nvar NodeBufferReader = require('./NodeBufferReader');\nvar Uint8ArrayReader = require('./Uint8ArrayReader');\n\n/**\n * Create a reader adapted to the data.\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data to read.\n * @return {DataReader} the data reader.\n */\nmodule.exports = function (data) {\n    var type = utils.getTypeOf(data);\n    utils.checkSupport(type);\n    if (type === \"string\" && !support.uint8array) {\n        return new StringReader(data);\n    }\n    if (type === \"nodebuffer\") {\n        return new NodeBufferReader(data);\n    }\n    if (support.uint8array) {\n        return new Uint8ArrayReader(utils.transformTo(\"uint8array\", data));\n    }\n    return new ArrayReader(utils.transformTo(\"array\", data));\n};\n","'use strict';\nexports.LOCAL_FILE_HEADER = \"PK\\x03\\x04\";\nexports.CENTRAL_FILE_HEADER = \"PK\\x01\\x02\";\nexports.CENTRAL_DIRECTORY_END = \"PK\\x05\\x06\";\nexports.ZIP64_CENTRAL_DIRECTORY_LOCATOR = \"PK\\x06\\x07\";\nexports.ZIP64_CENTRAL_DIRECTORY_END = \"PK\\x06\\x06\";\nexports.DATA_DESCRIPTOR = \"PK\\x07\\x08\";\n","'use strict';\n\nvar GenericWorker = require('./GenericWorker');\nvar utils = require('../utils');\n\n/**\n * A worker which convert chunks to a specified type.\n * @constructor\n * @param {String} destType the destination type.\n */\nfunction ConvertWorker(destType) {\n    GenericWorker.call(this, \"ConvertWorker to \" + destType);\n    this.destType = destType;\n}\nutils.inherits(ConvertWorker, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nConvertWorker.prototype.processChunk = function (chunk) {\n    this.push({\n        data : utils.transformTo(this.destType, chunk.data),\n        meta : chunk.meta\n    });\n};\nmodule.exports = ConvertWorker;\n","'use strict';\n\nvar GenericWorker = require('./GenericWorker');\nvar crc32 = require('../crc32');\nvar utils = require('../utils');\n\n/**\n * A worker which calculate the crc32 of the data flowing through.\n * @constructor\n */\nfunction Crc32Probe() {\n    GenericWorker.call(this, \"Crc32Probe\");\n    this.withStreamInfo(\"crc32\", 0);\n}\nutils.inherits(Crc32Probe, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nCrc32Probe.prototype.processChunk = function (chunk) {\n    this.streamInfo.crc32 = crc32(chunk.data, this.streamInfo.crc32 || 0);\n    this.push(chunk);\n};\nmodule.exports = Crc32Probe;\n","'use strict';\n\nvar utils = require('../utils');\nvar GenericWorker = require('./GenericWorker');\n\n/**\n * A worker which calculate the total length of the data flowing through.\n * @constructor\n * @param {String} propName the name used to expose the length\n */\nfunction DataLengthProbe(propName) {\n    GenericWorker.call(this, \"DataLengthProbe for \" + propName);\n    this.propName = propName;\n    this.withStreamInfo(propName, 0);\n}\nutils.inherits(DataLengthProbe, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nDataLengthProbe.prototype.processChunk = function (chunk) {\n    if(chunk) {\n        var length = this.streamInfo[this.propName] || 0;\n        this.streamInfo[this.propName] = length + chunk.data.length;\n    }\n    GenericWorker.prototype.processChunk.call(this, chunk);\n};\nmodule.exports = DataLengthProbe;\n\n","'use strict';\n\nvar utils = require('../utils');\nvar GenericWorker = require('./GenericWorker');\n\n// the size of the generated chunks\n// TODO expose this as a public variable\nvar DEFAULT_BLOCK_SIZE = 16 * 1024;\n\n/**\n * A worker that reads a content and emits chunks.\n * @constructor\n * @param {Promise} dataP the promise of the data to split\n */\nfunction DataWorker(dataP) {\n    GenericWorker.call(this, \"DataWorker\");\n    var self = this;\n    this.dataIsReady = false;\n    this.index = 0;\n    this.max = 0;\n    this.data = null;\n    this.type = \"\";\n\n    this._tickScheduled = false;\n\n    dataP.then(function (data) {\n        self.dataIsReady = true;\n        self.data = data;\n        self.max = data && data.length || 0;\n        self.type = utils.getTypeOf(data);\n        if(!self.isPaused) {\n            self._tickAndRepeat();\n        }\n    }, function (e) {\n        self.error(e);\n    });\n}\n\nutils.inherits(DataWorker, GenericWorker);\n\n/**\n * @see GenericWorker.cleanUp\n */\nDataWorker.prototype.cleanUp = function () {\n    GenericWorker.prototype.cleanUp.call(this);\n    this.data = null;\n};\n\n/**\n * @see GenericWorker.resume\n */\nDataWorker.prototype.resume = function () {\n    if(!GenericWorker.prototype.resume.call(this)) {\n        return false;\n    }\n\n    if (!this._tickScheduled && this.dataIsReady) {\n        this._tickScheduled = true;\n        utils.delay(this._tickAndRepeat, [], this);\n    }\n    return true;\n};\n\n/**\n * Trigger a tick a schedule an other call to this function.\n */\nDataWorker.prototype._tickAndRepeat = function() {\n    this._tickScheduled = false;\n    if(this.isPaused || this.isFinished) {\n        return;\n    }\n    this._tick();\n    if(!this.isFinished) {\n        utils.delay(this._tickAndRepeat, [], this);\n        this._tickScheduled = true;\n    }\n};\n\n/**\n * Read and push a chunk.\n */\nDataWorker.prototype._tick = function() {\n\n    if(this.isPaused || this.isFinished) {\n        return false;\n    }\n\n    var size = DEFAULT_BLOCK_SIZE;\n    var data = null, nextIndex = Math.min(this.max, this.index + size);\n    if (this.index >= this.max) {\n        // EOF\n        return this.end();\n    } else {\n        switch(this.type) {\n            case \"string\":\n                data = this.data.substring(this.index, nextIndex);\n            break;\n            case \"uint8array\":\n                data = this.data.subarray(this.index, nextIndex);\n            break;\n            case \"array\":\n            case \"nodebuffer\":\n                data = this.data.slice(this.index, nextIndex);\n            break;\n        }\n        this.index = nextIndex;\n        return this.push({\n            data : data,\n            meta : {\n                percent : this.max ? this.index / this.max * 100 : 0\n            }\n        });\n    }\n};\n\nmodule.exports = DataWorker;\n","'use strict';\n\n/**\n * A worker that does nothing but passing chunks to the next one. This is like\n * a nodejs stream but with some differences. On the good side :\n * - it works on IE 6-9 without any issue / polyfill\n * - it weights less than the full dependencies bundled with browserify\n * - it forwards errors (no need to declare an error handler EVERYWHERE)\n *\n * A chunk is an object with 2 attributes : `meta` and `data`. The former is an\n * object containing anything (`percent` for example), see each worker for more\n * details. The latter is the real data (String, Uint8Array, etc).\n *\n * @constructor\n * @param {String} name the name of the stream (mainly used for debugging purposes)\n */\nfunction GenericWorker(name) {\n    // the name of the worker\n    this.name = name || \"default\";\n    // an object containing metadata about the workers chain\n    this.streamInfo = {};\n    // an error which happened when the worker was paused\n    this.generatedError = null;\n    // an object containing metadata to be merged by this worker into the general metadata\n    this.extraStreamInfo = {};\n    // true if the stream is paused (and should not do anything), false otherwise\n    this.isPaused = true;\n    // true if the stream is finished (and should not do anything), false otherwise\n    this.isFinished = false;\n    // true if the stream is locked to prevent further structure updates (pipe), false otherwise\n    this.isLocked = false;\n    // the event listeners\n    this._listeners = {\n        'data':[],\n        'end':[],\n        'error':[]\n    };\n    // the previous worker, if any\n    this.previous = null;\n}\n\nGenericWorker.prototype = {\n    /**\n     * Push a chunk to the next workers.\n     * @param {Object} chunk the chunk to push\n     */\n    push : function (chunk) {\n        this.emit(\"data\", chunk);\n    },\n    /**\n     * End the stream.\n     * @return {Boolean} true if this call ended the worker, false otherwise.\n     */\n    end : function () {\n        if (this.isFinished) {\n            return false;\n        }\n\n        this.flush();\n        try {\n            this.emit(\"end\");\n            this.cleanUp();\n            this.isFinished = true;\n        } catch (e) {\n            this.emit(\"error\", e);\n        }\n        return true;\n    },\n    /**\n     * End the stream with an error.\n     * @param {Error} e the error which caused the premature end.\n     * @return {Boolean} true if this call ended the worker with an error, false otherwise.\n     */\n    error : function (e) {\n        if (this.isFinished) {\n            return false;\n        }\n\n        if(this.isPaused) {\n            this.generatedError = e;\n        } else {\n            this.isFinished = true;\n\n            this.emit(\"error\", e);\n\n            // in the workers chain exploded in the middle of the chain,\n            // the error event will go downward but we also need to notify\n            // workers upward that there has been an error.\n            if(this.previous) {\n                this.previous.error(e);\n            }\n\n            this.cleanUp();\n        }\n        return true;\n    },\n    /**\n     * Add a callback on an event.\n     * @param {String} name the name of the event (data, end, error)\n     * @param {Function} listener the function to call when the event is triggered\n     * @return {GenericWorker} the current object for chainability\n     */\n    on : function (name, listener) {\n        this._listeners[name].push(listener);\n        return this;\n    },\n    /**\n     * Clean any references when a worker is ending.\n     */\n    cleanUp : function () {\n        this.streamInfo = this.generatedError = this.extraStreamInfo = null;\n        this._listeners = [];\n    },\n    /**\n     * Trigger an event. This will call registered callback with the provided arg.\n     * @param {String} name the name of the event (data, end, error)\n     * @param {Object} arg the argument to call the callback with.\n     */\n    emit : function (name, arg) {\n        if (this._listeners[name]) {\n            for(var i = 0; i < this._listeners[name].length; i++) {\n                this._listeners[name][i].call(this, arg);\n            }\n        }\n    },\n    /**\n     * Chain a worker with an other.\n     * @param {Worker} next the worker receiving events from the current one.\n     * @return {worker} the next worker for chainability\n     */\n    pipe : function (next) {\n        return next.registerPrevious(this);\n    },\n    /**\n     * Same as `pipe` in the other direction.\n     * Using an API with `pipe(next)` is very easy.\n     * Implementing the API with the point of view of the next one registering\n     * a source is easier, see the ZipFileWorker.\n     * @param {Worker} previous the previous worker, sending events to this one\n     * @return {Worker} the current worker for chainability\n     */\n    registerPrevious : function (previous) {\n        if (this.isLocked) {\n            throw new Error(\"The stream '\" + this + \"' has already been used.\");\n        }\n\n        // sharing the streamInfo...\n        this.streamInfo = previous.streamInfo;\n        // ... and adding our own bits\n        this.mergeStreamInfo();\n        this.previous =  previous;\n        var self = this;\n        previous.on('data', function (chunk) {\n            self.processChunk(chunk);\n        });\n        previous.on('end', function () {\n            self.end();\n        });\n        previous.on('error', function (e) {\n            self.error(e);\n        });\n        return this;\n    },\n    /**\n     * Pause the stream so it doesn't send events anymore.\n     * @return {Boolean} true if this call paused the worker, false otherwise.\n     */\n    pause : function () {\n        if(this.isPaused || this.isFinished) {\n            return false;\n        }\n        this.isPaused = true;\n\n        if(this.previous) {\n            this.previous.pause();\n        }\n        return true;\n    },\n    /**\n     * Resume a paused stream.\n     * @return {Boolean} true if this call resumed the worker, false otherwise.\n     */\n    resume : function () {\n        if(!this.isPaused || this.isFinished) {\n            return false;\n        }\n        this.isPaused = false;\n\n        // if true, the worker tried to resume but failed\n        var withError = false;\n        if(this.generatedError) {\n            this.error(this.generatedError);\n            withError = true;\n        }\n        if(this.previous) {\n            this.previous.resume();\n        }\n\n        return !withError;\n    },\n    /**\n     * Flush any remaining bytes as the stream is ending.\n     */\n    flush : function () {},\n    /**\n     * Process a chunk. This is usually the method overridden.\n     * @param {Object} chunk the chunk to process.\n     */\n    processChunk : function(chunk) {\n        this.push(chunk);\n    },\n    /**\n     * Add a key/value to be added in the workers chain streamInfo once activated.\n     * @param {String} key the key to use\n     * @param {Object} value the associated value\n     * @return {Worker} the current worker for chainability\n     */\n    withStreamInfo : function (key, value) {\n        this.extraStreamInfo[key] = value;\n        this.mergeStreamInfo();\n        return this;\n    },\n    /**\n     * Merge this worker's streamInfo into the chain's streamInfo.\n     */\n    mergeStreamInfo : function () {\n        for(var key in this.extraStreamInfo) {\n            if (!this.extraStreamInfo.hasOwnProperty(key)) {\n                continue;\n            }\n            this.streamInfo[key] = this.extraStreamInfo[key];\n        }\n    },\n\n    /**\n     * Lock the stream to prevent further updates on the workers chain.\n     * After calling this method, all calls to pipe will fail.\n     */\n    lock: function () {\n        if (this.isLocked) {\n            throw new Error(\"The stream '\" + this + \"' has already been used.\");\n        }\n        this.isLocked = true;\n        if (this.previous) {\n            this.previous.lock();\n        }\n    },\n\n    /**\n     *\n     * Pretty print the workers chain.\n     */\n    toString : function () {\n        var me = \"Worker \" + this.name;\n        if (this.previous) {\n            return this.previous + \" -> \" + me;\n        } else {\n            return me;\n        }\n    }\n};\n\nmodule.exports = GenericWorker;\n","'use strict';\n\nvar utils = require('../utils');\nvar ConvertWorker = require('./ConvertWorker');\nvar GenericWorker = require('./GenericWorker');\nvar base64 = require('../base64');\nvar support = require(\"../support\");\nvar external = require(\"../external\");\n\nvar NodejsStreamOutputAdapter = null;\nif (support.nodestream) {\n    try {\n        NodejsStreamOutputAdapter = require('../nodejs/NodejsStreamOutputAdapter');\n    } catch(e) {}\n}\n\n/**\n * Apply the final transformation of the data. If the user wants a Blob for\n * example, it's easier to work with an U8intArray and finally do the\n * ArrayBuffer/Blob conversion.\n * @param {String} type the name of the final type\n * @param {String|Uint8Array|Buffer} content the content to transform\n * @param {String} mimeType the mime type of the content, if applicable.\n * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the content in the right format.\n */\nfunction transformZipOutput(type, content, mimeType) {\n    switch(type) {\n        case \"blob\" :\n            return utils.newBlob(utils.transformTo(\"arraybuffer\", content), mimeType);\n        case \"base64\" :\n            return base64.encode(content);\n        default :\n            return utils.transformTo(type, content);\n    }\n}\n\n/**\n * Concatenate an array of data of the given type.\n * @param {String} type the type of the data in the given array.\n * @param {Array} dataArray the array containing the data chunks to concatenate\n * @return {String|Uint8Array|Buffer} the concatenated data\n * @throws Error if the asked type is unsupported\n */\nfunction concat (type, dataArray) {\n    var i, index = 0, res = null, totalLength = 0;\n    for(i = 0; i < dataArray.length; i++) {\n        totalLength += dataArray[i].length;\n    }\n    switch(type) {\n        case \"string\":\n            return dataArray.join(\"\");\n          case \"array\":\n            return Array.prototype.concat.apply([], dataArray);\n        case \"uint8array\":\n            res = new Uint8Array(totalLength);\n            for(i = 0; i < dataArray.length; i++) {\n                res.set(dataArray[i], index);\n                index += dataArray[i].length;\n            }\n            return res;\n        case \"nodebuffer\":\n            return Buffer.concat(dataArray);\n        default:\n            throw new Error(\"concat : unsupported type '\"  + type + \"'\");\n    }\n}\n\n/**\n * Listen a StreamHelper, accumulate its content and concatenate it into a\n * complete block.\n * @param {StreamHelper} helper the helper to use.\n * @param {Function} updateCallback a callback called on each update. Called\n * with one arg :\n * - the metadata linked to the update received.\n * @return Promise the promise for the accumulation.\n */\nfunction accumulate(helper, updateCallback) {\n    return new external.Promise(function (resolve, reject){\n        var dataArray = [];\n        var chunkType = helper._internalType,\n            resultType = helper._outputType,\n            mimeType = helper._mimeType;\n        helper\n        .on('data', function (data, meta) {\n            dataArray.push(data);\n            if(updateCallback) {\n                updateCallback(meta);\n            }\n        })\n        .on('error', function(err) {\n            dataArray = [];\n            reject(err);\n        })\n        .on('end', function (){\n            try {\n                var result = transformZipOutput(resultType, concat(chunkType, dataArray), mimeType);\n                resolve(result);\n            } catch (e) {\n                reject(e);\n            }\n            dataArray = [];\n        })\n        .resume();\n    });\n}\n\n/**\n * An helper to easily use workers outside of JSZip.\n * @constructor\n * @param {Worker} worker the worker to wrap\n * @param {String} outputType the type of data expected by the use\n * @param {String} mimeType the mime type of the content, if applicable.\n */\nfunction StreamHelper(worker, outputType, mimeType) {\n    var internalType = outputType;\n    switch(outputType) {\n        case \"blob\":\n        case \"arraybuffer\":\n            internalType = \"uint8array\";\n        break;\n        case \"base64\":\n            internalType = \"string\";\n        break;\n    }\n\n    try {\n        // the type used internally\n        this._internalType = internalType;\n        // the type used to output results\n        this._outputType = outputType;\n        // the mime type\n        this._mimeType = mimeType;\n        utils.checkSupport(internalType);\n        this._worker = worker.pipe(new ConvertWorker(internalType));\n        // the last workers can be rewired without issues but we need to\n        // prevent any updates on previous workers.\n        worker.lock();\n    } catch(e) {\n        this._worker = new GenericWorker(\"error\");\n        this._worker.error(e);\n    }\n}\n\nStreamHelper.prototype = {\n    /**\n     * Listen a StreamHelper, accumulate its content and concatenate it into a\n     * complete block.\n     * @param {Function} updateCb the update callback.\n     * @return Promise the promise for the accumulation.\n     */\n    accumulate : function (updateCb) {\n        return accumulate(this, updateCb);\n    },\n    /**\n     * Add a listener on an event triggered on a stream.\n     * @param {String} evt the name of the event\n     * @param {Function} fn the listener\n     * @return {StreamHelper} the current helper.\n     */\n    on : function (evt, fn) {\n        var self = this;\n\n        if(evt === \"data\") {\n            this._worker.on(evt, function (chunk) {\n                fn.call(self, chunk.data, chunk.meta);\n            });\n        } else {\n            this._worker.on(evt, function () {\n                utils.delay(fn, arguments, self);\n            });\n        }\n        return this;\n    },\n    /**\n     * Resume the flow of chunks.\n     * @return {StreamHelper} the current helper.\n     */\n    resume : function () {\n        utils.delay(this._worker.resume, [], this._worker);\n        return this;\n    },\n    /**\n     * Pause the flow of chunks.\n     * @return {StreamHelper} the current helper.\n     */\n    pause : function () {\n        this._worker.pause();\n        return this;\n    },\n    /**\n     * Return a nodejs stream for this helper.\n     * @param {Function} updateCb the update callback.\n     * @return {NodejsStreamOutputAdapter} the nodejs stream.\n     */\n    toNodejsStream : function (updateCb) {\n        utils.checkSupport(\"nodestream\");\n        if (this._outputType !== \"nodebuffer\") {\n            // an object stream containing blob/arraybuffer/uint8array/string\n            // is strange and I don't know if it would be useful.\n            // I you find this comment and have a good usecase, please open a\n            // bug report !\n            throw new Error(this._outputType + \" is not supported by this method\");\n        }\n\n        return new NodejsStreamOutputAdapter(this, {\n            objectMode : this._outputType !== \"nodebuffer\"\n        }, updateCb);\n    }\n};\n\n\nmodule.exports = StreamHelper;\n","'use strict';\n\nexports.base64 = true;\nexports.array = true;\nexports.string = true;\nexports.arraybuffer = typeof ArrayBuffer !== \"undefined\" && typeof Uint8Array !== \"undefined\";\nexports.nodebuffer = typeof Buffer !== \"undefined\";\n// contains true if JSZip can read/generate Uint8Array, false otherwise.\nexports.uint8array = typeof Uint8Array !== \"undefined\";\n\nif (typeof ArrayBuffer === \"undefined\") {\n    exports.blob = false;\n}\nelse {\n    var buffer = new ArrayBuffer(0);\n    try {\n        exports.blob = new Blob([buffer], {\n            type: \"application/zip\"\n        }).size === 0;\n    }\n    catch (e) {\n        try {\n            var Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder;\n            var builder = new Builder();\n            builder.append(buffer);\n            exports.blob = builder.getBlob('application/zip').size === 0;\n        }\n        catch (e) {\n            exports.blob = false;\n        }\n    }\n}\n\ntry {\n    exports.nodestream = !!require('readable-stream').Readable;\n} catch(e) {\n    exports.nodestream = false;\n}\n","'use strict';\n\nvar utils = require('./utils');\nvar support = require('./support');\nvar nodejsUtils = require('./nodejsUtils');\nvar GenericWorker = require('./stream/GenericWorker');\n\n/**\n * The following functions come from pako, from pako/lib/utils/strings\n * released under the MIT license, see pako https://github.com/nodeca/pako/\n */\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nvar _utf8len = new Array(256);\nfor (var i=0; i<256; i++) {\n  _utf8len[i] = (i >= 252 ? 6 : i >= 248 ? 5 : i >= 240 ? 4 : i >= 224 ? 3 : i >= 192 ? 2 : 1);\n}\n_utf8len[254]=_utf8len[254]=1; // Invalid sequence start\n\n// convert string to array (typed, when possible)\nvar string2buf = function (str) {\n    var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n    // count binary size\n    for (m_pos = 0; m_pos < str_len; m_pos++) {\n        c = str.charCodeAt(m_pos);\n        if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {\n            c2 = str.charCodeAt(m_pos+1);\n            if ((c2 & 0xfc00) === 0xdc00) {\n                c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n                m_pos++;\n            }\n        }\n        buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n    }\n\n    // allocate buffer\n    if (support.uint8array) {\n        buf = new Uint8Array(buf_len);\n    } else {\n        buf = new Array(buf_len);\n    }\n\n    // convert\n    for (i=0, m_pos = 0; i < buf_len; m_pos++) {\n        c = str.charCodeAt(m_pos);\n        if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {\n            c2 = str.charCodeAt(m_pos+1);\n            if ((c2 & 0xfc00) === 0xdc00) {\n                c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n                m_pos++;\n            }\n        }\n        if (c < 0x80) {\n            /* one byte */\n            buf[i++] = c;\n        } else if (c < 0x800) {\n            /* two bytes */\n            buf[i++] = 0xC0 | (c >>> 6);\n            buf[i++] = 0x80 | (c & 0x3f);\n        } else if (c < 0x10000) {\n            /* three bytes */\n            buf[i++] = 0xE0 | (c >>> 12);\n            buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n            buf[i++] = 0x80 | (c & 0x3f);\n        } else {\n            /* four bytes */\n            buf[i++] = 0xf0 | (c >>> 18);\n            buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n            buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n            buf[i++] = 0x80 | (c & 0x3f);\n        }\n    }\n\n    return buf;\n};\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max   - length limit (mandatory);\nvar utf8border = function(buf, max) {\n    var pos;\n\n    max = max || buf.length;\n    if (max > buf.length) { max = buf.length; }\n\n    // go back from last position, until start of sequence found\n    pos = max-1;\n    while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n    // Fuckup - very small and broken sequence,\n    // return max, because we should return something anyway.\n    if (pos < 0) { return max; }\n\n    // If we came to start of buffer - that means vuffer is too small,\n    // return max too.\n    if (pos === 0) { return max; }\n\n    return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n\n// convert array to string\nvar buf2string = function (buf) {\n    var str, i, out, c, c_len;\n    var len = buf.length;\n\n    // Reserve max possible length (2 words per char)\n    // NB: by unknown reasons, Array is significantly faster for\n    //     String.fromCharCode.apply than Uint16Array.\n    var utf16buf = new Array(len*2);\n\n    for (out=0, i=0; i<len;) {\n        c = buf[i++];\n        // quick process ascii\n        if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n        c_len = _utf8len[c];\n        // skip 5 & 6 byte codes\n        if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len-1; continue; }\n\n        // apply mask on first byte\n        c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n        // join the rest\n        while (c_len > 1 && i < len) {\n            c = (c << 6) | (buf[i++] & 0x3f);\n            c_len--;\n        }\n\n        // terminated by end of string?\n        if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n        if (c < 0x10000) {\n            utf16buf[out++] = c;\n        } else {\n            c -= 0x10000;\n            utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n            utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n        }\n    }\n\n    // shrinkBuf(utf16buf, out)\n    if (utf16buf.length !== out) {\n        if(utf16buf.subarray) {\n            utf16buf = utf16buf.subarray(0, out);\n        } else {\n            utf16buf.length = out;\n        }\n    }\n\n    // return String.fromCharCode.apply(null, utf16buf);\n    return utils.applyFromCharCode(utf16buf);\n};\n\n\n// That's all for the pako functions.\n\n\n/**\n * Transform a javascript string into an array (typed if possible) of bytes,\n * UTF-8 encoded.\n * @param {String} str the string to encode\n * @return {Array|Uint8Array|Buffer} the UTF-8 encoded string.\n */\nexports.utf8encode = function utf8encode(str) {\n    if (support.nodebuffer) {\n        return nodejsUtils.newBufferFrom(str, \"utf-8\");\n    }\n\n    return string2buf(str);\n};\n\n\n/**\n * Transform a bytes array (or a representation) representing an UTF-8 encoded\n * string into a javascript string.\n * @param {Array|Uint8Array|Buffer} buf the data de decode\n * @return {String} the decoded string.\n */\nexports.utf8decode = function utf8decode(buf) {\n    if (support.nodebuffer) {\n        return utils.transformTo(\"nodebuffer\", buf).toString(\"utf-8\");\n    }\n\n    buf = utils.transformTo(support.uint8array ? \"uint8array\" : \"array\", buf);\n\n    return buf2string(buf);\n};\n\n/**\n * A worker to decode utf8 encoded binary chunks into string chunks.\n * @constructor\n */\nfunction Utf8DecodeWorker() {\n    GenericWorker.call(this, \"utf-8 decode\");\n    // the last bytes if a chunk didn't end with a complete codepoint.\n    this.leftOver = null;\n}\nutils.inherits(Utf8DecodeWorker, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nUtf8DecodeWorker.prototype.processChunk = function (chunk) {\n\n    var data = utils.transformTo(support.uint8array ? \"uint8array\" : \"array\", chunk.data);\n\n    // 1st step, re-use what's left of the previous chunk\n    if (this.leftOver && this.leftOver.length) {\n        if(support.uint8array) {\n            var previousData = data;\n            data = new Uint8Array(previousData.length + this.leftOver.length);\n            data.set(this.leftOver, 0);\n            data.set(previousData, this.leftOver.length);\n        } else {\n            data = this.leftOver.concat(data);\n        }\n        this.leftOver = null;\n    }\n\n    var nextBoundary = utf8border(data);\n    var usableData = data;\n    if (nextBoundary !== data.length) {\n        if (support.uint8array) {\n            usableData = data.subarray(0, nextBoundary);\n            this.leftOver = data.subarray(nextBoundary, data.length);\n        } else {\n            usableData = data.slice(0, nextBoundary);\n            this.leftOver = data.slice(nextBoundary, data.length);\n        }\n    }\n\n    this.push({\n        data : exports.utf8decode(usableData),\n        meta : chunk.meta\n    });\n};\n\n/**\n * @see GenericWorker.flush\n */\nUtf8DecodeWorker.prototype.flush = function () {\n    if(this.leftOver && this.leftOver.length) {\n        this.push({\n            data : exports.utf8decode(this.leftOver),\n            meta : {}\n        });\n        this.leftOver = null;\n    }\n};\nexports.Utf8DecodeWorker = Utf8DecodeWorker;\n\n/**\n * A worker to endcode string chunks into utf8 encoded binary chunks.\n * @constructor\n */\nfunction Utf8EncodeWorker() {\n    GenericWorker.call(this, \"utf-8 encode\");\n}\nutils.inherits(Utf8EncodeWorker, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nUtf8EncodeWorker.prototype.processChunk = function (chunk) {\n    this.push({\n        data : exports.utf8encode(chunk.data),\n        meta : chunk.meta\n    });\n};\nexports.Utf8EncodeWorker = Utf8EncodeWorker;\n","'use strict';\n\nvar support = require('./support');\nvar base64 = require('./base64');\nvar nodejsUtils = require('./nodejsUtils');\nvar setImmediate = require('core-js/library/fn/set-immediate');\nvar external = require(\"./external\");\n\n\n/**\n * Convert a string that pass as a \"binary string\": it should represent a byte\n * array but may have > 255 char codes. Be sure to take only the first byte\n * and returns the byte array.\n * @param {String} str the string to transform.\n * @return {Array|Uint8Array} the string in a binary format.\n */\nfunction string2binary(str) {\n    var result = null;\n    if (support.uint8array) {\n      result = new Uint8Array(str.length);\n    } else {\n      result = new Array(str.length);\n    }\n    return stringToArrayLike(str, result);\n}\n\n/**\n * Create a new blob with the given content and the given type.\n * @param {String|ArrayBuffer} part the content to put in the blob. DO NOT use\n * an Uint8Array because the stock browser of android 4 won't accept it (it\n * will be silently converted to a string, \"[object Uint8Array]\").\n *\n * Use only ONE part to build the blob to avoid a memory leak in IE11 / Edge:\n * when a large amount of Array is used to create the Blob, the amount of\n * memory consumed is nearly 100 times the original data amount.\n *\n * @param {String} type the mime type of the blob.\n * @return {Blob} the created blob.\n */\nexports.newBlob = function(part, type) {\n    exports.checkSupport(\"blob\");\n\n    try {\n        // Blob constructor\n        return new Blob([part], {\n            type: type\n        });\n    }\n    catch (e) {\n\n        try {\n            // deprecated, browser only, old way\n            var Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder;\n            var builder = new Builder();\n            builder.append(part);\n            return builder.getBlob(type);\n        }\n        catch (e) {\n\n            // well, fuck ?!\n            throw new Error(\"Bug : can't construct the Blob.\");\n        }\n    }\n\n\n};\n/**\n * The identity function.\n * @param {Object} input the input.\n * @return {Object} the same input.\n */\nfunction identity(input) {\n    return input;\n}\n\n/**\n * Fill in an array with a string.\n * @param {String} str the string to use.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to fill in (will be mutated).\n * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated array.\n */\nfunction stringToArrayLike(str, array) {\n    for (var i = 0; i < str.length; ++i) {\n        array[i] = str.charCodeAt(i) & 0xFF;\n    }\n    return array;\n}\n\n/**\n * An helper for the function arrayLikeToString.\n * This contains static informations and functions that\n * can be optimized by the browser JIT compiler.\n */\nvar arrayToStringHelper = {\n    /**\n     * Transform an array of int into a string, chunk by chunk.\n     * See the performances notes on arrayLikeToString.\n     * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.\n     * @param {String} type the type of the array.\n     * @param {Integer} chunk the chunk size.\n     * @return {String} the resulting string.\n     * @throws Error if the chunk is too big for the stack.\n     */\n    stringifyByChunk: function(array, type, chunk) {\n        var result = [], k = 0, len = array.length;\n        // shortcut\n        if (len <= chunk) {\n            return String.fromCharCode.apply(null, array);\n        }\n        while (k < len) {\n            if (type === \"array\" || type === \"nodebuffer\") {\n                result.push(String.fromCharCode.apply(null, array.slice(k, Math.min(k + chunk, len))));\n            }\n            else {\n                result.push(String.fromCharCode.apply(null, array.subarray(k, Math.min(k + chunk, len))));\n            }\n            k += chunk;\n        }\n        return result.join(\"\");\n    },\n    /**\n     * Call String.fromCharCode on every item in the array.\n     * This is the naive implementation, which generate A LOT of intermediate string.\n     * This should be used when everything else fail.\n     * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.\n     * @return {String} the result.\n     */\n    stringifyByChar: function(array){\n        var resultStr = \"\";\n        for(var i = 0; i < array.length; i++) {\n            resultStr += String.fromCharCode(array[i]);\n        }\n        return resultStr;\n    },\n    applyCanBeUsed : {\n        /**\n         * true if the browser accepts to use String.fromCharCode on Uint8Array\n         */\n        uint8array : (function () {\n            try {\n                return support.uint8array && String.fromCharCode.apply(null, new Uint8Array(1)).length === 1;\n            } catch (e) {\n                return false;\n            }\n        })(),\n        /**\n         * true if the browser accepts to use String.fromCharCode on nodejs Buffer.\n         */\n        nodebuffer : (function () {\n            try {\n                return support.nodebuffer && String.fromCharCode.apply(null, nodejsUtils.allocBuffer(1)).length === 1;\n            } catch (e) {\n                return false;\n            }\n        })()\n    }\n};\n\n/**\n * Transform an array-like object to a string.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.\n * @return {String} the result.\n */\nfunction arrayLikeToString(array) {\n    // Performances notes :\n    // --------------------\n    // String.fromCharCode.apply(null, array) is the fastest, see\n    // see http://jsperf.com/converting-a-uint8array-to-a-string/2\n    // but the stack is limited (and we can get huge arrays !).\n    //\n    // result += String.fromCharCode(array[i]); generate too many strings !\n    //\n    // This code is inspired by http://jsperf.com/arraybuffer-to-string-apply-performance/2\n    // TODO : we now have workers that split the work. Do we still need that ?\n    var chunk = 65536,\n        type = exports.getTypeOf(array),\n        canUseApply = true;\n    if (type === \"uint8array\") {\n        canUseApply = arrayToStringHelper.applyCanBeUsed.uint8array;\n    } else if (type === \"nodebuffer\") {\n        canUseApply = arrayToStringHelper.applyCanBeUsed.nodebuffer;\n    }\n\n    if (canUseApply) {\n        while (chunk > 1) {\n            try {\n                return arrayToStringHelper.stringifyByChunk(array, type, chunk);\n            } catch (e) {\n                chunk = Math.floor(chunk / 2);\n            }\n        }\n    }\n\n    // no apply or chunk error : slow and painful algorithm\n    // default browser on android 4.*\n    return arrayToStringHelper.stringifyByChar(array);\n}\n\nexports.applyFromCharCode = arrayLikeToString;\n\n\n/**\n * Copy the data from an array-like to an other array-like.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayFrom the origin array.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayTo the destination array which will be mutated.\n * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated destination array.\n */\nfunction arrayLikeToArrayLike(arrayFrom, arrayTo) {\n    for (var i = 0; i < arrayFrom.length; i++) {\n        arrayTo[i] = arrayFrom[i];\n    }\n    return arrayTo;\n}\n\n// a matrix containing functions to transform everything into everything.\nvar transform = {};\n\n// string to ?\ntransform[\"string\"] = {\n    \"string\": identity,\n    \"array\": function(input) {\n        return stringToArrayLike(input, new Array(input.length));\n    },\n    \"arraybuffer\": function(input) {\n        return transform[\"string\"][\"uint8array\"](input).buffer;\n    },\n    \"uint8array\": function(input) {\n        return stringToArrayLike(input, new Uint8Array(input.length));\n    },\n    \"nodebuffer\": function(input) {\n        return stringToArrayLike(input, nodejsUtils.allocBuffer(input.length));\n    }\n};\n\n// array to ?\ntransform[\"array\"] = {\n    \"string\": arrayLikeToString,\n    \"array\": identity,\n    \"arraybuffer\": function(input) {\n        return (new Uint8Array(input)).buffer;\n    },\n    \"uint8array\": function(input) {\n        return new Uint8Array(input);\n    },\n    \"nodebuffer\": function(input) {\n        return nodejsUtils.newBufferFrom(input);\n    }\n};\n\n// arraybuffer to ?\ntransform[\"arraybuffer\"] = {\n    \"string\": function(input) {\n        return arrayLikeToString(new Uint8Array(input));\n    },\n    \"array\": function(input) {\n        return arrayLikeToArrayLike(new Uint8Array(input), new Array(input.byteLength));\n    },\n    \"arraybuffer\": identity,\n    \"uint8array\": function(input) {\n        return new Uint8Array(input);\n    },\n    \"nodebuffer\": function(input) {\n        return nodejsUtils.newBufferFrom(new Uint8Array(input));\n    }\n};\n\n// uint8array to ?\ntransform[\"uint8array\"] = {\n    \"string\": arrayLikeToString,\n    \"array\": function(input) {\n        return arrayLikeToArrayLike(input, new Array(input.length));\n    },\n    \"arraybuffer\": function(input) {\n        return input.buffer;\n    },\n    \"uint8array\": identity,\n    \"nodebuffer\": function(input) {\n        return nodejsUtils.newBufferFrom(input);\n    }\n};\n\n// nodebuffer to ?\ntransform[\"nodebuffer\"] = {\n    \"string\": arrayLikeToString,\n    \"array\": function(input) {\n        return arrayLikeToArrayLike(input, new Array(input.length));\n    },\n    \"arraybuffer\": function(input) {\n        return transform[\"nodebuffer\"][\"uint8array\"](input).buffer;\n    },\n    \"uint8array\": function(input) {\n        return arrayLikeToArrayLike(input, new Uint8Array(input.length));\n    },\n    \"nodebuffer\": identity\n};\n\n/**\n * Transform an input into any type.\n * The supported output type are : string, array, uint8array, arraybuffer, nodebuffer.\n * If no output type is specified, the unmodified input will be returned.\n * @param {String} outputType the output type.\n * @param {String|Array|ArrayBuffer|Uint8Array|Buffer} input the input to convert.\n * @throws {Error} an Error if the browser doesn't support the requested output type.\n */\nexports.transformTo = function(outputType, input) {\n    if (!input) {\n        // undefined, null, etc\n        // an empty string won't harm.\n        input = \"\";\n    }\n    if (!outputType) {\n        return input;\n    }\n    exports.checkSupport(outputType);\n    var inputType = exports.getTypeOf(input);\n    var result = transform[inputType][outputType](input);\n    return result;\n};\n\n/**\n * Return the type of the input.\n * The type will be in a format valid for JSZip.utils.transformTo : string, array, uint8array, arraybuffer.\n * @param {Object} input the input to identify.\n * @return {String} the (lowercase) type of the input.\n */\nexports.getTypeOf = function(input) {\n    if (typeof input === \"string\") {\n        return \"string\";\n    }\n    if (Object.prototype.toString.call(input) === \"[object Array]\") {\n        return \"array\";\n    }\n    if (support.nodebuffer && nodejsUtils.isBuffer(input)) {\n        return \"nodebuffer\";\n    }\n    if (support.uint8array && input instanceof Uint8Array) {\n        return \"uint8array\";\n    }\n    if (support.arraybuffer && input instanceof ArrayBuffer) {\n        return \"arraybuffer\";\n    }\n};\n\n/**\n * Throw an exception if the type is not supported.\n * @param {String} type the type to check.\n * @throws {Error} an Error if the browser doesn't support the requested type.\n */\nexports.checkSupport = function(type) {\n    var supported = support[type.toLowerCase()];\n    if (!supported) {\n        throw new Error(type + \" is not supported by this platform\");\n    }\n};\n\nexports.MAX_VALUE_16BITS = 65535;\nexports.MAX_VALUE_32BITS = -1; // well, \"\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\" is parsed as -1\n\n/**\n * Prettify a string read as binary.\n * @param {string} str the string to prettify.\n * @return {string} a pretty string.\n */\nexports.pretty = function(str) {\n    var res = '',\n        code, i;\n    for (i = 0; i < (str || \"\").length; i++) {\n        code = str.charCodeAt(i);\n        res += '\\\\x' + (code < 16 ? \"0\" : \"\") + code.toString(16).toUpperCase();\n    }\n    return res;\n};\n\n/**\n * Defer the call of a function.\n * @param {Function} callback the function to call asynchronously.\n * @param {Array} args the arguments to give to the callback.\n */\nexports.delay = function(callback, args, self) {\n    setImmediate(function () {\n        callback.apply(self || null, args || []);\n    });\n};\n\n/**\n * Extends a prototype with an other, without calling a constructor with\n * side effects. Inspired by nodejs' `utils.inherits`\n * @param {Function} ctor the constructor to augment\n * @param {Function} superCtor the parent constructor to use\n */\nexports.inherits = function (ctor, superCtor) {\n    var Obj = function() {};\n    Obj.prototype = superCtor.prototype;\n    ctor.prototype = new Obj();\n};\n\n/**\n * Merge the objects passed as parameters into a new one.\n * @private\n * @param {...Object} var_args All objects to merge.\n * @return {Object} a new object with the data of the others.\n */\nexports.extend = function() {\n    var result = {}, i, attr;\n    for (i = 0; i < arguments.length; i++) { // arguments is not enumerable in some browsers\n        for (attr in arguments[i]) {\n            if (arguments[i].hasOwnProperty(attr) && typeof result[attr] === \"undefined\") {\n                result[attr] = arguments[i][attr];\n            }\n        }\n    }\n    return result;\n};\n\n/**\n * Transform arbitrary content into a Promise.\n * @param {String} name a name for the content being processed.\n * @param {Object} inputData the content to process.\n * @param {Boolean} isBinary true if the content is not an unicode string\n * @param {Boolean} isOptimizedBinaryString true if the string content only has one byte per character.\n * @param {Boolean} isBase64 true if the string content is encoded with base64.\n * @return {Promise} a promise in a format usable by JSZip.\n */\nexports.prepareContent = function(name, inputData, isBinary, isOptimizedBinaryString, isBase64) {\n\n    // if inputData is already a promise, this flatten it.\n    var promise = external.Promise.resolve(inputData).then(function(data) {\n        \n        \n        var isBlob = support.blob && (data instanceof Blob || ['[object File]', '[object Blob]'].indexOf(Object.prototype.toString.call(data)) !== -1);\n\n        if (isBlob && typeof FileReader !== \"undefined\") {\n            return new external.Promise(function (resolve, reject) {\n                var reader = new FileReader();\n\n                reader.onload = function(e) {\n                    resolve(e.target.result);\n                };\n                reader.onerror = function(e) {\n                    reject(e.target.error);\n                };\n                reader.readAsArrayBuffer(data);\n            });\n        } else {\n            return data;\n        }\n    });\n\n    return promise.then(function(data) {\n        var dataType = exports.getTypeOf(data);\n\n        if (!dataType) {\n            return external.Promise.reject(\n                new Error(\"Can't read the data of '\" + name + \"'. Is it \" +\n                          \"in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?\")\n            );\n        }\n        // special case : it's way easier to work with Uint8Array than with ArrayBuffer\n        if (dataType === \"arraybuffer\") {\n            data = exports.transformTo(\"uint8array\", data);\n        } else if (dataType === \"string\") {\n            if (isBase64) {\n                data = base64.decode(data);\n            }\n            else if (isBinary) {\n                // optimizedBinaryString === true means that the file has already been filtered with a 0xFF mask\n                if (isOptimizedBinaryString !== true) {\n                    // this is a string, not in a base64 format.\n                    // Be sure that this is a correct \"binary string\"\n                    data = string2binary(data);\n                }\n            }\n        }\n        return data;\n    });\n};\n","'use strict';\nvar readerFor = require('./reader/readerFor');\nvar utils = require('./utils');\nvar sig = require('./signature');\nvar ZipEntry = require('./zipEntry');\nvar utf8 = require('./utf8');\nvar support = require('./support');\n//  class ZipEntries {{{\n/**\n * All the entries in the zip file.\n * @constructor\n * @param {Object} loadOptions Options for loading the stream.\n */\nfunction ZipEntries(loadOptions) {\n    this.files = [];\n    this.loadOptions = loadOptions;\n}\nZipEntries.prototype = {\n    /**\n     * Check that the reader is on the specified signature.\n     * @param {string} expectedSignature the expected signature.\n     * @throws {Error} if it is an other signature.\n     */\n    checkSignature: function(expectedSignature) {\n        if (!this.reader.readAndCheckSignature(expectedSignature)) {\n            this.reader.index -= 4;\n            var signature = this.reader.readString(4);\n            throw new Error(\"Corrupted zip or bug: unexpected signature \" + \"(\" + utils.pretty(signature) + \", expected \" + utils.pretty(expectedSignature) + \")\");\n        }\n    },\n    /**\n     * Check if the given signature is at the given index.\n     * @param {number} askedIndex the index to check.\n     * @param {string} expectedSignature the signature to expect.\n     * @return {boolean} true if the signature is here, false otherwise.\n     */\n    isSignature: function(askedIndex, expectedSignature) {\n        var currentIndex = this.reader.index;\n        this.reader.setIndex(askedIndex);\n        var signature = this.reader.readString(4);\n        var result = signature === expectedSignature;\n        this.reader.setIndex(currentIndex);\n        return result;\n    },\n    /**\n     * Read the end of the central directory.\n     */\n    readBlockEndOfCentral: function() {\n        this.diskNumber = this.reader.readInt(2);\n        this.diskWithCentralDirStart = this.reader.readInt(2);\n        this.centralDirRecordsOnThisDisk = this.reader.readInt(2);\n        this.centralDirRecords = this.reader.readInt(2);\n        this.centralDirSize = this.reader.readInt(4);\n        this.centralDirOffset = this.reader.readInt(4);\n\n        this.zipCommentLength = this.reader.readInt(2);\n        // warning : the encoding depends of the system locale\n        // On a linux machine with LANG=en_US.utf8, this field is utf8 encoded.\n        // On a windows machine, this field is encoded with the localized windows code page.\n        var zipComment = this.reader.readData(this.zipCommentLength);\n        var decodeParamType = support.uint8array ? \"uint8array\" : \"array\";\n        // To get consistent behavior with the generation part, we will assume that\n        // this is utf8 encoded unless specified otherwise.\n        var decodeContent = utils.transformTo(decodeParamType, zipComment);\n        this.zipComment = this.loadOptions.decodeFileName(decodeContent);\n    },\n    /**\n     * Read the end of the Zip 64 central directory.\n     * Not merged with the method readEndOfCentral :\n     * The end of central can coexist with its Zip64 brother,\n     * I don't want to read the wrong number of bytes !\n     */\n    readBlockZip64EndOfCentral: function() {\n        this.zip64EndOfCentralSize = this.reader.readInt(8);\n        this.reader.skip(4);\n        // this.versionMadeBy = this.reader.readString(2);\n        // this.versionNeeded = this.reader.readInt(2);\n        this.diskNumber = this.reader.readInt(4);\n        this.diskWithCentralDirStart = this.reader.readInt(4);\n        this.centralDirRecordsOnThisDisk = this.reader.readInt(8);\n        this.centralDirRecords = this.reader.readInt(8);\n        this.centralDirSize = this.reader.readInt(8);\n        this.centralDirOffset = this.reader.readInt(8);\n\n        this.zip64ExtensibleData = {};\n        var extraDataSize = this.zip64EndOfCentralSize - 44,\n            index = 0,\n            extraFieldId,\n            extraFieldLength,\n            extraFieldValue;\n        while (index < extraDataSize) {\n            extraFieldId = this.reader.readInt(2);\n            extraFieldLength = this.reader.readInt(4);\n            extraFieldValue = this.reader.readData(extraFieldLength);\n            this.zip64ExtensibleData[extraFieldId] = {\n                id: extraFieldId,\n                length: extraFieldLength,\n                value: extraFieldValue\n            };\n        }\n    },\n    /**\n     * Read the end of the Zip 64 central directory locator.\n     */\n    readBlockZip64EndOfCentralLocator: function() {\n        this.diskWithZip64CentralDirStart = this.reader.readInt(4);\n        this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8);\n        this.disksCount = this.reader.readInt(4);\n        if (this.disksCount > 1) {\n            throw new Error(\"Multi-volumes zip are not supported\");\n        }\n    },\n    /**\n     * Read the local files, based on the offset read in the central part.\n     */\n    readLocalFiles: function() {\n        var i, file;\n        for (i = 0; i < this.files.length; i++) {\n            file = this.files[i];\n            this.reader.setIndex(file.localHeaderOffset);\n            this.checkSignature(sig.LOCAL_FILE_HEADER);\n            file.readLocalPart(this.reader);\n            file.handleUTF8();\n            file.processAttributes();\n        }\n    },\n    /**\n     * Read the central directory.\n     */\n    readCentralDir: function() {\n        var file;\n\n        this.reader.setIndex(this.centralDirOffset);\n        while (this.reader.readAndCheckSignature(sig.CENTRAL_FILE_HEADER)) {\n            file = new ZipEntry({\n                zip64: this.zip64\n            }, this.loadOptions);\n            file.readCentralPart(this.reader);\n            this.files.push(file);\n        }\n\n        if (this.centralDirRecords !== this.files.length) {\n            if (this.centralDirRecords !== 0 && this.files.length === 0) {\n                // We expected some records but couldn't find ANY.\n                // This is really suspicious, as if something went wrong.\n                throw new Error(\"Corrupted zip or bug: expected \" + this.centralDirRecords + \" records in central dir, got \" + this.files.length);\n            } else {\n                // We found some records but not all.\n                // Something is wrong but we got something for the user: no error here.\n                // console.warn(\"expected\", this.centralDirRecords, \"records in central dir, got\", this.files.length);\n            }\n        }\n    },\n    /**\n     * Read the end of central directory.\n     */\n    readEndOfCentral: function() {\n        var offset = this.reader.lastIndexOfSignature(sig.CENTRAL_DIRECTORY_END);\n        if (offset < 0) {\n            // Check if the content is a truncated zip or complete garbage.\n            // A \"LOCAL_FILE_HEADER\" is not required at the beginning (auto\n            // extractible zip for example) but it can give a good hint.\n            // If an ajax request was used without responseType, we will also\n            // get unreadable data.\n            var isGarbage = !this.isSignature(0, sig.LOCAL_FILE_HEADER);\n\n            if (isGarbage) {\n                throw new Error(\"Can't find end of central directory : is this a zip file ? \" +\n                                \"If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html\");\n            } else {\n                throw new Error(\"Corrupted zip: can't find end of central directory\");\n            }\n\n        }\n        this.reader.setIndex(offset);\n        var endOfCentralDirOffset = offset;\n        this.checkSignature(sig.CENTRAL_DIRECTORY_END);\n        this.readBlockEndOfCentral();\n\n\n        /* extract from the zip spec :\n            4)  If one of the fields in the end of central directory\n                record is too small to hold required data, the field\n                should be set to -1 (0xFFFF or 0xFFFFFFFF) and the\n                ZIP64 format record should be created.\n            5)  The end of central directory record and the\n                Zip64 end of central directory locator record must\n                reside on the same disk when splitting or spanning\n                an archive.\n         */\n        if (this.diskNumber === utils.MAX_VALUE_16BITS || this.diskWithCentralDirStart === utils.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === utils.MAX_VALUE_16BITS || this.centralDirRecords === utils.MAX_VALUE_16BITS || this.centralDirSize === utils.MAX_VALUE_32BITS || this.centralDirOffset === utils.MAX_VALUE_32BITS) {\n            this.zip64 = true;\n\n            /*\n            Warning : the zip64 extension is supported, but ONLY if the 64bits integer read from\n            the zip file can fit into a 32bits integer. This cannot be solved : JavaScript represents\n            all numbers as 64-bit double precision IEEE 754 floating point numbers.\n            So, we have 53bits for integers and bitwise operations treat everything as 32bits.\n            see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/Bitwise_Operators\n            and http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf section 8.5\n            */\n\n            // should look for a zip64 EOCD locator\n            offset = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR);\n            if (offset < 0) {\n                throw new Error(\"Corrupted zip: can't find the ZIP64 end of central directory locator\");\n            }\n            this.reader.setIndex(offset);\n            this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR);\n            this.readBlockZip64EndOfCentralLocator();\n\n            // now the zip64 EOCD record\n            if (!this.isSignature(this.relativeOffsetEndOfZip64CentralDir, sig.ZIP64_CENTRAL_DIRECTORY_END)) {\n                // console.warn(\"ZIP64 end of central directory not where expected.\");\n                this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_END);\n                if (this.relativeOffsetEndOfZip64CentralDir < 0) {\n                    throw new Error(\"Corrupted zip: can't find the ZIP64 end of central directory\");\n                }\n            }\n            this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir);\n            this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_END);\n            this.readBlockZip64EndOfCentral();\n        }\n\n        var expectedEndOfCentralDirOffset = this.centralDirOffset + this.centralDirSize;\n        if (this.zip64) {\n            expectedEndOfCentralDirOffset += 20; // end of central dir 64 locator\n            expectedEndOfCentralDirOffset += 12 /* should not include the leading 12 bytes */ + this.zip64EndOfCentralSize;\n        }\n\n        var extraBytes = endOfCentralDirOffset - expectedEndOfCentralDirOffset;\n\n        if (extraBytes > 0) {\n            // console.warn(extraBytes, \"extra bytes at beginning or within zipfile\");\n            if (this.isSignature(endOfCentralDirOffset, sig.CENTRAL_FILE_HEADER)) {\n                // The offsets seem wrong, but we have something at the specified offset.\n                // So… we keep it.\n            } else {\n                // the offset is wrong, update the \"zero\" of the reader\n                // this happens if data has been prepended (crx files for example)\n                this.reader.zero = extraBytes;\n            }\n        } else if (extraBytes < 0) {\n            throw new Error(\"Corrupted zip: missing \" + Math.abs(extraBytes) + \" bytes.\");\n        }\n    },\n    prepareReader: function(data) {\n        this.reader = readerFor(data);\n    },\n    /**\n     * Read a zip file and create ZipEntries.\n     * @param {String|ArrayBuffer|Uint8Array|Buffer} data the binary string representing a zip file.\n     */\n    load: function(data) {\n        this.prepareReader(data);\n        this.readEndOfCentral();\n        this.readCentralDir();\n        this.readLocalFiles();\n    }\n};\n// }}} end of ZipEntries\nmodule.exports = ZipEntries;\n","'use strict';\nvar readerFor = require('./reader/readerFor');\nvar utils = require('./utils');\nvar CompressedObject = require('./compressedObject');\nvar crc32fn = require('./crc32');\nvar utf8 = require('./utf8');\nvar compressions = require('./compressions');\nvar support = require('./support');\n\nvar MADE_BY_DOS = 0x00;\nvar MADE_BY_UNIX = 0x03;\n\n/**\n * Find a compression registered in JSZip.\n * @param {string} compressionMethod the method magic to find.\n * @return {Object|null} the JSZip compression object, null if none found.\n */\nvar findCompression = function(compressionMethod) {\n    for (var method in compressions) {\n        if (!compressions.hasOwnProperty(method)) {\n            continue;\n        }\n        if (compressions[method].magic === compressionMethod) {\n            return compressions[method];\n        }\n    }\n    return null;\n};\n\n// class ZipEntry {{{\n/**\n * An entry in the zip file.\n * @constructor\n * @param {Object} options Options of the current file.\n * @param {Object} loadOptions Options for loading the stream.\n */\nfunction ZipEntry(options, loadOptions) {\n    this.options = options;\n    this.loadOptions = loadOptions;\n}\nZipEntry.prototype = {\n    /**\n     * say if the file is encrypted.\n     * @return {boolean} true if the file is encrypted, false otherwise.\n     */\n    isEncrypted: function() {\n        // bit 1 is set\n        return (this.bitFlag & 0x0001) === 0x0001;\n    },\n    /**\n     * say if the file has utf-8 filename/comment.\n     * @return {boolean} true if the filename/comment is in utf-8, false otherwise.\n     */\n    useUTF8: function() {\n        // bit 11 is set\n        return (this.bitFlag & 0x0800) === 0x0800;\n    },\n    /**\n     * Read the local part of a zip file and add the info in this object.\n     * @param {DataReader} reader the reader to use.\n     */\n    readLocalPart: function(reader) {\n        var compression, localExtraFieldsLength;\n\n        // we already know everything from the central dir !\n        // If the central dir data are false, we are doomed.\n        // On the bright side, the local part is scary  : zip64, data descriptors, both, etc.\n        // The less data we get here, the more reliable this should be.\n        // Let's skip the whole header and dash to the data !\n        reader.skip(22);\n        // in some zip created on windows, the filename stored in the central dir contains \\ instead of /.\n        // Strangely, the filename here is OK.\n        // I would love to treat these zip files as corrupted (see http://www.info-zip.org/FAQ.html#backslashes\n        // or APPNOTE#4.4.17.1, \"All slashes MUST be forward slashes '/'\") but there are a lot of bad zip generators...\n        // Search \"unzip mismatching \"local\" filename continuing with \"central\" filename version\" on\n        // the internet.\n        //\n        // I think I see the logic here : the central directory is used to display\n        // content and the local directory is used to extract the files. Mixing / and \\\n        // may be used to display \\ to windows users and use / when extracting the files.\n        // Unfortunately, this lead also to some issues : http://seclists.org/fulldisclosure/2009/Sep/394\n        this.fileNameLength = reader.readInt(2);\n        localExtraFieldsLength = reader.readInt(2); // can't be sure this will be the same as the central dir\n        // the fileName is stored as binary data, the handleUTF8 method will take care of the encoding.\n        this.fileName = reader.readData(this.fileNameLength);\n        reader.skip(localExtraFieldsLength);\n\n        if (this.compressedSize === -1 || this.uncompressedSize === -1) {\n            throw new Error(\"Bug or corrupted zip : didn't get enough informations from the central directory \" + \"(compressedSize === -1 || uncompressedSize === -1)\");\n        }\n\n        compression = findCompression(this.compressionMethod);\n        if (compression === null) { // no compression found\n            throw new Error(\"Corrupted zip : compression \" + utils.pretty(this.compressionMethod) + \" unknown (inner file : \" + utils.transformTo(\"string\", this.fileName) + \")\");\n        }\n        this.decompressed = new CompressedObject(this.compressedSize, this.uncompressedSize, this.crc32, compression, reader.readData(this.compressedSize));\n    },\n\n    /**\n     * Read the central part of a zip file and add the info in this object.\n     * @param {DataReader} reader the reader to use.\n     */\n    readCentralPart: function(reader) {\n        this.versionMadeBy = reader.readInt(2);\n        reader.skip(2);\n        // this.versionNeeded = reader.readInt(2);\n        this.bitFlag = reader.readInt(2);\n        this.compressionMethod = reader.readString(2);\n        this.date = reader.readDate();\n        this.crc32 = reader.readInt(4);\n        this.compressedSize = reader.readInt(4);\n        this.uncompressedSize = reader.readInt(4);\n        var fileNameLength = reader.readInt(2);\n        this.extraFieldsLength = reader.readInt(2);\n        this.fileCommentLength = reader.readInt(2);\n        this.diskNumberStart = reader.readInt(2);\n        this.internalFileAttributes = reader.readInt(2);\n        this.externalFileAttributes = reader.readInt(4);\n        this.localHeaderOffset = reader.readInt(4);\n\n        if (this.isEncrypted()) {\n            throw new Error(\"Encrypted zip are not supported\");\n        }\n\n        // will be read in the local part, see the comments there\n        reader.skip(fileNameLength);\n        this.readExtraFields(reader);\n        this.parseZIP64ExtraField(reader);\n        this.fileComment = reader.readData(this.fileCommentLength);\n    },\n\n    /**\n     * Parse the external file attributes and get the unix/dos permissions.\n     */\n    processAttributes: function () {\n        this.unixPermissions = null;\n        this.dosPermissions = null;\n        var madeBy = this.versionMadeBy >> 8;\n\n        // Check if we have the DOS directory flag set.\n        // We look for it in the DOS and UNIX permissions\n        // but some unknown platform could set it as a compatibility flag.\n        this.dir = this.externalFileAttributes & 0x0010 ? true : false;\n\n        if(madeBy === MADE_BY_DOS) {\n            // first 6 bits (0 to 5)\n            this.dosPermissions = this.externalFileAttributes & 0x3F;\n        }\n\n        if(madeBy === MADE_BY_UNIX) {\n            this.unixPermissions = (this.externalFileAttributes >> 16) & 0xFFFF;\n            // the octal permissions are in (this.unixPermissions & 0x01FF).toString(8);\n        }\n\n        // fail safe : if the name ends with a / it probably means a folder\n        if (!this.dir && this.fileNameStr.slice(-1) === '/') {\n            this.dir = true;\n        }\n    },\n\n    /**\n     * Parse the ZIP64 extra field and merge the info in the current ZipEntry.\n     * @param {DataReader} reader the reader to use.\n     */\n    parseZIP64ExtraField: function(reader) {\n\n        if (!this.extraFields[0x0001]) {\n            return;\n        }\n\n        // should be something, preparing the extra reader\n        var extraReader = readerFor(this.extraFields[0x0001].value);\n\n        // I really hope that these 64bits integer can fit in 32 bits integer, because js\n        // won't let us have more.\n        if (this.uncompressedSize === utils.MAX_VALUE_32BITS) {\n            this.uncompressedSize = extraReader.readInt(8);\n        }\n        if (this.compressedSize === utils.MAX_VALUE_32BITS) {\n            this.compressedSize = extraReader.readInt(8);\n        }\n        if (this.localHeaderOffset === utils.MAX_VALUE_32BITS) {\n            this.localHeaderOffset = extraReader.readInt(8);\n        }\n        if (this.diskNumberStart === utils.MAX_VALUE_32BITS) {\n            this.diskNumberStart = extraReader.readInt(4);\n        }\n    },\n    /**\n     * Read the central part of a zip file and add the info in this object.\n     * @param {DataReader} reader the reader to use.\n     */\n    readExtraFields: function(reader) {\n        var end = reader.index + this.extraFieldsLength,\n            extraFieldId,\n            extraFieldLength,\n            extraFieldValue;\n\n        if (!this.extraFields) {\n            this.extraFields = {};\n        }\n\n        while (reader.index < end) {\n            extraFieldId = reader.readInt(2);\n            extraFieldLength = reader.readInt(2);\n            extraFieldValue = reader.readData(extraFieldLength);\n\n            this.extraFields[extraFieldId] = {\n                id: extraFieldId,\n                length: extraFieldLength,\n                value: extraFieldValue\n            };\n        }\n    },\n    /**\n     * Apply an UTF8 transformation if needed.\n     */\n    handleUTF8: function() {\n        var decodeParamType = support.uint8array ? \"uint8array\" : \"array\";\n        if (this.useUTF8()) {\n            this.fileNameStr = utf8.utf8decode(this.fileName);\n            this.fileCommentStr = utf8.utf8decode(this.fileComment);\n        } else {\n            var upath = this.findExtraFieldUnicodePath();\n            if (upath !== null) {\n                this.fileNameStr = upath;\n            } else {\n                // ASCII text or unsupported code page\n                var fileNameByteArray =  utils.transformTo(decodeParamType, this.fileName);\n                this.fileNameStr = this.loadOptions.decodeFileName(fileNameByteArray);\n            }\n\n            var ucomment = this.findExtraFieldUnicodeComment();\n            if (ucomment !== null) {\n                this.fileCommentStr = ucomment;\n            } else {\n                // ASCII text or unsupported code page\n                var commentByteArray =  utils.transformTo(decodeParamType, this.fileComment);\n                this.fileCommentStr = this.loadOptions.decodeFileName(commentByteArray);\n            }\n        }\n    },\n\n    /**\n     * Find the unicode path declared in the extra field, if any.\n     * @return {String} the unicode path, null otherwise.\n     */\n    findExtraFieldUnicodePath: function() {\n        var upathField = this.extraFields[0x7075];\n        if (upathField) {\n            var extraReader = readerFor(upathField.value);\n\n            // wrong version\n            if (extraReader.readInt(1) !== 1) {\n                return null;\n            }\n\n            // the crc of the filename changed, this field is out of date.\n            if (crc32fn(this.fileName) !== extraReader.readInt(4)) {\n                return null;\n            }\n\n            return utf8.utf8decode(extraReader.readData(upathField.length - 5));\n        }\n        return null;\n    },\n\n    /**\n     * Find the unicode comment declared in the extra field, if any.\n     * @return {String} the unicode comment, null otherwise.\n     */\n    findExtraFieldUnicodeComment: function() {\n        var ucommentField = this.extraFields[0x6375];\n        if (ucommentField) {\n            var extraReader = readerFor(ucommentField.value);\n\n            // wrong version\n            if (extraReader.readInt(1) !== 1) {\n                return null;\n            }\n\n            // the crc of the comment changed, this field is out of date.\n            if (crc32fn(this.fileComment) !== extraReader.readInt(4)) {\n                return null;\n            }\n\n            return utf8.utf8decode(extraReader.readData(ucommentField.length - 5));\n        }\n        return null;\n    }\n};\nmodule.exports = ZipEntry;\n","'use strict';\n\nvar StreamHelper = require('./stream/StreamHelper');\nvar DataWorker = require('./stream/DataWorker');\nvar utf8 = require('./utf8');\nvar CompressedObject = require('./compressedObject');\nvar GenericWorker = require('./stream/GenericWorker');\n\n/**\n * A simple object representing a file in the zip file.\n * @constructor\n * @param {string} name the name of the file\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data\n * @param {Object} options the options of the file\n */\nvar ZipObject = function(name, data, options) {\n    this.name = name;\n    this.dir = options.dir;\n    this.date = options.date;\n    this.comment = options.comment;\n    this.unixPermissions = options.unixPermissions;\n    this.dosPermissions = options.dosPermissions;\n\n    this._data = data;\n    this._dataBinary = options.binary;\n    // keep only the compression\n    this.options = {\n        compression : options.compression,\n        compressionOptions : options.compressionOptions\n    };\n};\n\nZipObject.prototype = {\n    /**\n     * Create an internal stream for the content of this object.\n     * @param {String} type the type of each chunk.\n     * @return StreamHelper the stream.\n     */\n    internalStream: function (type) {\n        var result = null, outputType = \"string\";\n        try {\n            if (!type) {\n                throw new Error(\"No output type specified.\");\n            }\n            outputType = type.toLowerCase();\n            var askUnicodeString = outputType === \"string\" || outputType === \"text\";\n            if (outputType === \"binarystring\" || outputType === \"text\") {\n                outputType = \"string\";\n            }\n            result = this._decompressWorker();\n\n            var isUnicodeString = !this._dataBinary;\n\n            if (isUnicodeString && !askUnicodeString) {\n                result = result.pipe(new utf8.Utf8EncodeWorker());\n            }\n            if (!isUnicodeString && askUnicodeString) {\n                result = result.pipe(new utf8.Utf8DecodeWorker());\n            }\n        } catch (e) {\n            result = new GenericWorker(\"error\");\n            result.error(e);\n        }\n\n        return new StreamHelper(result, outputType, \"\");\n    },\n\n    /**\n     * Prepare the content in the asked type.\n     * @param {String} type the type of the result.\n     * @param {Function} onUpdate a function to call on each internal update.\n     * @return Promise the promise of the result.\n     */\n    async: function (type, onUpdate) {\n        return this.internalStream(type).accumulate(onUpdate);\n    },\n\n    /**\n     * Prepare the content as a nodejs stream.\n     * @param {String} type the type of each chunk.\n     * @param {Function} onUpdate a function to call on each internal update.\n     * @return Stream the stream.\n     */\n    nodeStream: function (type, onUpdate) {\n        return this.internalStream(type || \"nodebuffer\").toNodejsStream(onUpdate);\n    },\n\n    /**\n     * Return a worker for the compressed content.\n     * @private\n     * @param {Object} compression the compression object to use.\n     * @param {Object} compressionOptions the options to use when compressing.\n     * @return Worker the worker.\n     */\n    _compressWorker: function (compression, compressionOptions) {\n        if (\n            this._data instanceof CompressedObject &&\n            this._data.compression.magic === compression.magic\n        ) {\n            return this._data.getCompressedWorker();\n        } else {\n            var result = this._decompressWorker();\n            if(!this._dataBinary) {\n                result = result.pipe(new utf8.Utf8EncodeWorker());\n            }\n            return CompressedObject.createWorkerFrom(result, compression, compressionOptions);\n        }\n    },\n    /**\n     * Return a worker for the decompressed content.\n     * @private\n     * @return Worker the worker.\n     */\n    _decompressWorker : function () {\n        if (this._data instanceof CompressedObject) {\n            return this._data.getContentWorker();\n        } else if (this._data instanceof GenericWorker) {\n            return this._data;\n        } else {\n            return new DataWorker(this._data);\n        }\n    }\n};\n\nvar removedMethods = [\"asText\", \"asBinary\", \"asNodeBuffer\", \"asUint8Array\", \"asArrayBuffer\"];\nvar removedFn = function () {\n    throw new Error(\"This method has been removed in JSZip 3.0, please check the upgrade guide.\");\n};\n\nfor(var i = 0; i < removedMethods.length; i++) {\n    ZipObject.prototype[removedMethods[i]] = removedFn;\n}\nmodule.exports = ZipObject;\n","require('../modules/web.immediate');\nmodule.exports = require('../modules/_core').setImmediate;","module.exports = function(it){\n  if(typeof it != 'function')throw TypeError(it + ' is not a function!');\n  return it;\n};","var isObject = require('./_is-object');\nmodule.exports = function(it){\n  if(!isObject(it))throw TypeError(it + ' is not an object!');\n  return it;\n};","var toString = {}.toString;\n\nmodule.exports = function(it){\n  return toString.call(it).slice(8, -1);\n};","var core = module.exports = {version: '2.3.0'};\nif(typeof __e == 'number')__e = core; // eslint-disable-line no-undef","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function(fn, that, length){\n  aFunction(fn);\n  if(that === undefined)return fn;\n  switch(length){\n    case 1: return function(a){\n      return fn.call(that, a);\n    };\n    case 2: return function(a, b){\n      return fn.call(that, a, b);\n    };\n    case 3: return function(a, b, c){\n      return fn.call(that, a, b, c);\n    };\n  }\n  return function(/* ...args */){\n    return fn.apply(that, arguments);\n  };\n};","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function(){\n  return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;\n});","var isObject = require('./_is-object')\n  , document = require('./_global').document\n  // in old IE typeof document.createElement is 'object'\n  , is = isObject(document) && isObject(document.createElement);\nmodule.exports = function(it){\n  return is ? document.createElement(it) : {};\n};","var global    = require('./_global')\n  , core      = require('./_core')\n  , ctx       = require('./_ctx')\n  , hide      = require('./_hide')\n  , PROTOTYPE = 'prototype';\n\nvar $export = function(type, name, source){\n  var IS_FORCED = type & $export.F\n    , IS_GLOBAL = type & $export.G\n    , IS_STATIC = type & $export.S\n    , IS_PROTO  = type & $export.P\n    , IS_BIND   = type & $export.B\n    , IS_WRAP   = type & $export.W\n    , exports   = IS_GLOBAL ? core : core[name] || (core[name] = {})\n    , expProto  = exports[PROTOTYPE]\n    , target    = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]\n    , key, own, out;\n  if(IS_GLOBAL)source = name;\n  for(key in source){\n    // contains in native\n    own = !IS_FORCED && target && target[key] !== undefined;\n    if(own && key in exports)continue;\n    // export native or passed\n    out = own ? target[key] : source[key];\n    // prevent global pollution for namespaces\n    exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n    // bind timers to global for call from export context\n    : IS_BIND && own ? ctx(out, global)\n    // wrap global constructors for prevent change them in library\n    : IS_WRAP && target[key] == out ? (function(C){\n      var F = function(a, b, c){\n        if(this instanceof C){\n          switch(arguments.length){\n            case 0: return new C;\n            case 1: return new C(a);\n            case 2: return new C(a, b);\n          } return new C(a, b, c);\n        } return C.apply(this, arguments);\n      };\n      F[PROTOTYPE] = C[PROTOTYPE];\n      return F;\n    // make static versions for prototype methods\n    })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n    // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n    if(IS_PROTO){\n      (exports.virtual || (exports.virtual = {}))[key] = out;\n      // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n      if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);\n    }\n  }\n};\n// type bitmap\n$export.F = 1;   // forced\n$export.G = 2;   // global\n$export.S = 4;   // static\n$export.P = 8;   // proto\n$export.B = 16;  // bind\n$export.W = 32;  // wrap\n$export.U = 64;  // safe\n$export.R = 128; // real proto method for `library` \nmodule.exports = $export;","module.exports = function(exec){\n  try {\n    return !!exec();\n  } catch(e){\n    return true;\n  }\n};","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n  ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();\nif(typeof __g == 'number')__g = global; // eslint-disable-line no-undef","var dP         = require('./_object-dp')\n  , createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function(object, key, value){\n  return dP.f(object, key, createDesc(1, value));\n} : function(object, key, value){\n  object[key] = value;\n  return object;\n};","module.exports = require('./_global').document && document.documentElement;","module.exports = !require('./_descriptors') && !require('./_fails')(function(){\r\n  return Object.defineProperty(require('./_dom-create')('div'), 'a', {get: function(){ return 7; }}).a != 7;\r\n});","// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function(fn, args, that){\n  var un = that === undefined;\n  switch(args.length){\n    case 0: return un ? fn()\n                      : fn.call(that);\n    case 1: return un ? fn(args[0])\n                      : fn.call(that, args[0]);\n    case 2: return un ? fn(args[0], args[1])\n                      : fn.call(that, args[0], args[1]);\n    case 3: return un ? fn(args[0], args[1], args[2])\n                      : fn.call(that, args[0], args[1], args[2]);\n    case 4: return un ? fn(args[0], args[1], args[2], args[3])\n                      : fn.call(that, args[0], args[1], args[2], args[3]);\n  } return              fn.apply(that, args);\n};","module.exports = function(it){\n  return typeof it === 'object' ? it !== null : typeof it === 'function';\n};","var anObject       = require('./_an-object')\n  , IE8_DOM_DEFINE = require('./_ie8-dom-define')\n  , toPrimitive    = require('./_to-primitive')\n  , dP             = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes){\n  anObject(O);\n  P = toPrimitive(P, true);\n  anObject(Attributes);\n  if(IE8_DOM_DEFINE)try {\n    return dP(O, P, Attributes);\n  } catch(e){ /* empty */ }\n  if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');\n  if('value' in Attributes)O[P] = Attributes.value;\n  return O;\n};","module.exports = function(bitmap, value){\n  return {\n    enumerable  : !(bitmap & 1),\n    configurable: !(bitmap & 2),\n    writable    : !(bitmap & 4),\n    value       : value\n  };\n};","var ctx                = require('./_ctx')\n  , invoke             = require('./_invoke')\n  , html               = require('./_html')\n  , cel                = require('./_dom-create')\n  , global             = require('./_global')\n  , process            = global.process\n  , setTask            = global.setImmediate\n  , clearTask          = global.clearImmediate\n  , MessageChannel     = global.MessageChannel\n  , counter            = 0\n  , queue              = {}\n  , ONREADYSTATECHANGE = 'onreadystatechange'\n  , defer, channel, port;\nvar run = function(){\n  var id = +this;\n  if(queue.hasOwnProperty(id)){\n    var fn = queue[id];\n    delete queue[id];\n    fn();\n  }\n};\nvar listener = function(event){\n  run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif(!setTask || !clearTask){\n  setTask = function setImmediate(fn){\n    var args = [], i = 1;\n    while(arguments.length > i)args.push(arguments[i++]);\n    queue[++counter] = function(){\n      invoke(typeof fn == 'function' ? fn : Function(fn), args);\n    };\n    defer(counter);\n    return counter;\n  };\n  clearTask = function clearImmediate(id){\n    delete queue[id];\n  };\n  // Node.js 0.8-\n  if(require('./_cof')(process) == 'process'){\n    defer = function(id){\n      process.nextTick(ctx(run, id, 1));\n    };\n  // Browsers with MessageChannel, includes WebWorkers\n  } else if(MessageChannel){\n    channel = new MessageChannel;\n    port    = channel.port2;\n    channel.port1.onmessage = listener;\n    defer = ctx(port.postMessage, port, 1);\n  // Browsers with postMessage, skip WebWorkers\n  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n  } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){\n    defer = function(id){\n      global.postMessage(id + '', '*');\n    };\n    global.addEventListener('message', listener, false);\n  // IE8-\n  } else if(ONREADYSTATECHANGE in cel('script')){\n    defer = function(id){\n      html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){\n        html.removeChild(this);\n        run.call(id);\n      };\n    };\n  // Rest old browsers\n  } else {\n    defer = function(id){\n      setTimeout(ctx(run, id, 1), 0);\n    };\n  }\n}\nmodule.exports = {\n  set:   setTask,\n  clear: clearTask\n};","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function(it, S){\n  if(!isObject(it))return it;\n  var fn, val;\n  if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;\n  if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;\n  if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;\n  throw TypeError(\"Can't convert object to primitive value\");\n};","var $export = require('./_export')\n  , $task   = require('./_task');\n$export($export.G + $export.B, {\n  setImmediate:   $task.set,\n  clearImmediate: $task.clear\n});","'use strict';\nvar Mutation = global.MutationObserver || global.WebKitMutationObserver;\n\nvar scheduleDrain;\n\n{\n  if (Mutation) {\n    var called = 0;\n    var observer = new Mutation(nextTick);\n    var element = global.document.createTextNode('');\n    observer.observe(element, {\n      characterData: true\n    });\n    scheduleDrain = function () {\n      element.data = (called = ++called % 2);\n    };\n  } else if (!global.setImmediate && typeof global.MessageChannel !== 'undefined') {\n    var channel = new global.MessageChannel();\n    channel.port1.onmessage = nextTick;\n    scheduleDrain = function () {\n      channel.port2.postMessage(0);\n    };\n  } else if ('document' in global && 'onreadystatechange' in global.document.createElement('script')) {\n    scheduleDrain = function () {\n\n      // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n      // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n      var scriptEl = global.document.createElement('script');\n      scriptEl.onreadystatechange = function () {\n        nextTick();\n\n        scriptEl.onreadystatechange = null;\n        scriptEl.parentNode.removeChild(scriptEl);\n        scriptEl = null;\n      };\n      global.document.documentElement.appendChild(scriptEl);\n    };\n  } else {\n    scheduleDrain = function () {\n      setTimeout(nextTick, 0);\n    };\n  }\n}\n\nvar draining;\nvar queue = [];\n//named nextTick for less confusing stack traces\nfunction nextTick() {\n  draining = true;\n  var i, oldQueue;\n  var len = queue.length;\n  while (len) {\n    oldQueue = queue;\n    queue = [];\n    i = -1;\n    while (++i < len) {\n      oldQueue[i]();\n    }\n    len = queue.length;\n  }\n  draining = false;\n}\n\nmodule.exports = immediate;\nfunction immediate(task) {\n  if (queue.push(task) === 1 && !draining) {\n    scheduleDrain();\n  }\n}\n","'use strict';\nvar immediate = require('immediate');\n\n/* istanbul ignore next */\nfunction INTERNAL() {}\n\nvar handlers = {};\n\nvar REJECTED = ['REJECTED'];\nvar FULFILLED = ['FULFILLED'];\nvar PENDING = ['PENDING'];\n\nmodule.exports = Promise;\n\nfunction Promise(resolver) {\n  if (typeof resolver !== 'function') {\n    throw new TypeError('resolver must be a function');\n  }\n  this.state = PENDING;\n  this.queue = [];\n  this.outcome = void 0;\n  if (resolver !== INTERNAL) {\n    safelyResolveThenable(this, resolver);\n  }\n}\n\nPromise.prototype[\"catch\"] = function (onRejected) {\n  return this.then(null, onRejected);\n};\nPromise.prototype.then = function (onFulfilled, onRejected) {\n  if (typeof onFulfilled !== 'function' && this.state === FULFILLED ||\n    typeof onRejected !== 'function' && this.state === REJECTED) {\n    return this;\n  }\n  var promise = new this.constructor(INTERNAL);\n  if (this.state !== PENDING) {\n    var resolver = this.state === FULFILLED ? onFulfilled : onRejected;\n    unwrap(promise, resolver, this.outcome);\n  } else {\n    this.queue.push(new QueueItem(promise, onFulfilled, onRejected));\n  }\n\n  return promise;\n};\nfunction QueueItem(promise, onFulfilled, onRejected) {\n  this.promise = promise;\n  if (typeof onFulfilled === 'function') {\n    this.onFulfilled = onFulfilled;\n    this.callFulfilled = this.otherCallFulfilled;\n  }\n  if (typeof onRejected === 'function') {\n    this.onRejected = onRejected;\n    this.callRejected = this.otherCallRejected;\n  }\n}\nQueueItem.prototype.callFulfilled = function (value) {\n  handlers.resolve(this.promise, value);\n};\nQueueItem.prototype.otherCallFulfilled = function (value) {\n  unwrap(this.promise, this.onFulfilled, value);\n};\nQueueItem.prototype.callRejected = function (value) {\n  handlers.reject(this.promise, value);\n};\nQueueItem.prototype.otherCallRejected = function (value) {\n  unwrap(this.promise, this.onRejected, value);\n};\n\nfunction unwrap(promise, func, value) {\n  immediate(function () {\n    var returnValue;\n    try {\n      returnValue = func(value);\n    } catch (e) {\n      return handlers.reject(promise, e);\n    }\n    if (returnValue === promise) {\n      handlers.reject(promise, new TypeError('Cannot resolve promise with itself'));\n    } else {\n      handlers.resolve(promise, returnValue);\n    }\n  });\n}\n\nhandlers.resolve = function (self, value) {\n  var result = tryCatch(getThen, value);\n  if (result.status === 'error') {\n    return handlers.reject(self, result.value);\n  }\n  var thenable = result.value;\n\n  if (thenable) {\n    safelyResolveThenable(self, thenable);\n  } else {\n    self.state = FULFILLED;\n    self.outcome = value;\n    var i = -1;\n    var len = self.queue.length;\n    while (++i < len) {\n      self.queue[i].callFulfilled(value);\n    }\n  }\n  return self;\n};\nhandlers.reject = function (self, error) {\n  self.state = REJECTED;\n  self.outcome = error;\n  var i = -1;\n  var len = self.queue.length;\n  while (++i < len) {\n    self.queue[i].callRejected(error);\n  }\n  return self;\n};\n\nfunction getThen(obj) {\n  // Make sure we only access the accessor once as required by the spec\n  var then = obj && obj.then;\n  if (obj && (typeof obj === 'object' || typeof obj === 'function') && typeof then === 'function') {\n    return function appyThen() {\n      then.apply(obj, arguments);\n    };\n  }\n}\n\nfunction safelyResolveThenable(self, thenable) {\n  // Either fulfill, reject or reject with error\n  var called = false;\n  function onError(value) {\n    if (called) {\n      return;\n    }\n    called = true;\n    handlers.reject(self, value);\n  }\n\n  function onSuccess(value) {\n    if (called) {\n      return;\n    }\n    called = true;\n    handlers.resolve(self, value);\n  }\n\n  function tryToUnwrap() {\n    thenable(onSuccess, onError);\n  }\n\n  var result = tryCatch(tryToUnwrap);\n  if (result.status === 'error') {\n    onError(result.value);\n  }\n}\n\nfunction tryCatch(func, value) {\n  var out = {};\n  try {\n    out.value = func(value);\n    out.status = 'success';\n  } catch (e) {\n    out.status = 'error';\n    out.value = e;\n  }\n  return out;\n}\n\nPromise.resolve = resolve;\nfunction resolve(value) {\n  if (value instanceof this) {\n    return value;\n  }\n  return handlers.resolve(new this(INTERNAL), value);\n}\n\nPromise.reject = reject;\nfunction reject(reason) {\n  var promise = new this(INTERNAL);\n  return handlers.reject(promise, reason);\n}\n\nPromise.all = all;\nfunction all(iterable) {\n  var self = this;\n  if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n    return this.reject(new TypeError('must be an array'));\n  }\n\n  var len = iterable.length;\n  var called = false;\n  if (!len) {\n    return this.resolve([]);\n  }\n\n  var values = new Array(len);\n  var resolved = 0;\n  var i = -1;\n  var promise = new this(INTERNAL);\n\n  while (++i < len) {\n    allResolver(iterable[i], i);\n  }\n  return promise;\n  function allResolver(value, i) {\n    self.resolve(value).then(resolveFromAll, function (error) {\n      if (!called) {\n        called = true;\n        handlers.reject(promise, error);\n      }\n    });\n    function resolveFromAll(outValue) {\n      values[i] = outValue;\n      if (++resolved === len && !called) {\n        called = true;\n        handlers.resolve(promise, values);\n      }\n    }\n  }\n}\n\nPromise.race = race;\nfunction race(iterable) {\n  var self = this;\n  if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n    return this.reject(new TypeError('must be an array'));\n  }\n\n  var len = iterable.length;\n  var called = false;\n  if (!len) {\n    return this.resolve([]);\n  }\n\n  var i = -1;\n  var promise = new this(INTERNAL);\n\n  while (++i < len) {\n    resolver(iterable[i]);\n  }\n  return promise;\n  function resolver(value) {\n    self.resolve(value).then(function (response) {\n      if (!called) {\n        called = true;\n        handlers.resolve(promise, response);\n      }\n    }, function (error) {\n      if (!called) {\n        called = true;\n        handlers.reject(promise, error);\n      }\n    });\n  }\n}\n","// Top level file is just a mixin of submodules & constants\n'use strict';\n\nvar assign    = require('./lib/utils/common').assign;\n\nvar deflate   = require('./lib/deflate');\nvar inflate   = require('./lib/inflate');\nvar constants = require('./lib/zlib/constants');\n\nvar pako = {};\n\nassign(pako, deflate, inflate, constants);\n\nmodule.exports = pako;\n","'use strict';\n\n\nvar zlib_deflate = require('./zlib/deflate');\nvar utils        = require('./utils/common');\nvar strings      = require('./utils/strings');\nvar msg          = require('./zlib/messages');\nvar ZStream      = require('./zlib/zstream');\n\nvar toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nvar Z_NO_FLUSH      = 0;\nvar Z_FINISH        = 4;\n\nvar Z_OK            = 0;\nvar Z_STREAM_END    = 1;\nvar Z_SYNC_FLUSH    = 2;\n\nvar Z_DEFAULT_COMPRESSION = -1;\n\nvar Z_DEFAULT_STRATEGY    = 0;\n\nvar Z_DEFLATED  = 8;\n\n/* ===========================================================================*/\n\n\n/**\n * class Deflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[deflate]],\n * [[deflateRaw]] and [[gzip]].\n **/\n\n/* internal\n * Deflate.chunks -> Array\n *\n * Chunks of output data, if [[Deflate#onData]] not overridden.\n **/\n\n/**\n * Deflate.result -> Uint8Array|Array\n *\n * Compressed result, generated by default [[Deflate#onData]]\n * and [[Deflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Deflate#push]] with `Z_FINISH` / `true` param)  or if you\n * push a chunk with explicit flush (call [[Deflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Deflate.err -> Number\n *\n * Error code after deflate finished. 0 (Z_OK) on success.\n * You will not need it in real life, because deflate errors\n * are possible only on wrong options or bad `onData` / `onEnd`\n * custom handlers.\n **/\n\n/**\n * Deflate.msg -> String\n *\n * Error message, if [[Deflate.err]] != 0\n **/\n\n\n/**\n * new Deflate(options)\n * - options (Object): zlib deflate options.\n *\n * Creates new deflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `level`\n * - `windowBits`\n * - `memLevel`\n * - `strategy`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw deflate\n * - `gzip` (Boolean) - create gzip wrapper\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n *    (each char code [0..255])\n * - `header` (Object) - custom header for gzip\n *   - `text` (Boolean) - true if compressed data believed to be text\n *   - `time` (Number) - modification time, unix timestamp\n *   - `os` (Number) - operation system code\n *   - `extra` (Array) - array of bytes with extra data (max 65536)\n *   - `name` (String) - file name (binary string)\n *   - `comment` (String) - comment (binary string)\n *   - `hcrc` (Boolean) - true if header crc should be added\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n *   , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n *   , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var deflate = new pako.Deflate({ level: 3});\n *\n * deflate.push(chunk1, false);\n * deflate.push(chunk2, true);  // true -> last chunk\n *\n * if (deflate.err) { throw new Error(deflate.err); }\n *\n * console.log(deflate.result);\n * ```\n **/\nfunction Deflate(options) {\n  if (!(this instanceof Deflate)) return new Deflate(options);\n\n  this.options = utils.assign({\n    level: Z_DEFAULT_COMPRESSION,\n    method: Z_DEFLATED,\n    chunkSize: 16384,\n    windowBits: 15,\n    memLevel: 8,\n    strategy: Z_DEFAULT_STRATEGY,\n    to: ''\n  }, options || {});\n\n  var opt = this.options;\n\n  if (opt.raw && (opt.windowBits > 0)) {\n    opt.windowBits = -opt.windowBits;\n  }\n\n  else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {\n    opt.windowBits += 16;\n  }\n\n  this.err    = 0;      // error code, if happens (0 = Z_OK)\n  this.msg    = '';     // error message\n  this.ended  = false;  // used to avoid multiple onEnd() calls\n  this.chunks = [];     // chunks of compressed data\n\n  this.strm = new ZStream();\n  this.strm.avail_out = 0;\n\n  var status = zlib_deflate.deflateInit2(\n    this.strm,\n    opt.level,\n    opt.method,\n    opt.windowBits,\n    opt.memLevel,\n    opt.strategy\n  );\n\n  if (status !== Z_OK) {\n    throw new Error(msg[status]);\n  }\n\n  if (opt.header) {\n    zlib_deflate.deflateSetHeader(this.strm, opt.header);\n  }\n\n  if (opt.dictionary) {\n    var dict;\n    // Convert data if needed\n    if (typeof opt.dictionary === 'string') {\n      // If we need to compress text, change encoding to utf8.\n      dict = strings.string2buf(opt.dictionary);\n    } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n      dict = new Uint8Array(opt.dictionary);\n    } else {\n      dict = opt.dictionary;\n    }\n\n    status = zlib_deflate.deflateSetDictionary(this.strm, dict);\n\n    if (status !== Z_OK) {\n      throw new Error(msg[status]);\n    }\n\n    this._dict_set = true;\n  }\n}\n\n/**\n * Deflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be\n *   converted to utf8 byte sequence.\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n *   See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with\n * new compressed chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the compression context.\n *\n * On fail call [[Deflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * array format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true);  // push last chunk\n * ```\n **/\nDeflate.prototype.push = function (data, mode) {\n  var strm = this.strm;\n  var chunkSize = this.options.chunkSize;\n  var status, _mode;\n\n  if (this.ended) { return false; }\n\n  _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH);\n\n  // Convert data if needed\n  if (typeof data === 'string') {\n    // If we need to compress text, change encoding to utf8.\n    strm.input = strings.string2buf(data);\n  } else if (toString.call(data) === '[object ArrayBuffer]') {\n    strm.input = new Uint8Array(data);\n  } else {\n    strm.input = data;\n  }\n\n  strm.next_in = 0;\n  strm.avail_in = strm.input.length;\n\n  do {\n    if (strm.avail_out === 0) {\n      strm.output = new utils.Buf8(chunkSize);\n      strm.next_out = 0;\n      strm.avail_out = chunkSize;\n    }\n    status = zlib_deflate.deflate(strm, _mode);    /* no bad return value */\n\n    if (status !== Z_STREAM_END && status !== Z_OK) {\n      this.onEnd(status);\n      this.ended = true;\n      return false;\n    }\n    if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) {\n      if (this.options.to === 'string') {\n        this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out)));\n      } else {\n        this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n      }\n    }\n  } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END);\n\n  // Finalize on the last chunk.\n  if (_mode === Z_FINISH) {\n    status = zlib_deflate.deflateEnd(this.strm);\n    this.onEnd(status);\n    this.ended = true;\n    return status === Z_OK;\n  }\n\n  // callback interim results if Z_SYNC_FLUSH.\n  if (_mode === Z_SYNC_FLUSH) {\n    this.onEnd(Z_OK);\n    strm.avail_out = 0;\n    return true;\n  }\n\n  return true;\n};\n\n\n/**\n * Deflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n *   on js engine support. When string output requested, each chunk\n *   will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nDeflate.prototype.onData = function (chunk) {\n  this.chunks.push(chunk);\n};\n\n\n/**\n * Deflate#onEnd(status) -> Void\n * - status (Number): deflate status. 0 (Z_OK) on success,\n *   other if not.\n *\n * Called once after you tell deflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nDeflate.prototype.onEnd = function (status) {\n  // On success - join\n  if (status === Z_OK) {\n    if (this.options.to === 'string') {\n      this.result = this.chunks.join('');\n    } else {\n      this.result = utils.flattenChunks(this.chunks);\n    }\n  }\n  this.chunks = [];\n  this.err = status;\n  this.msg = this.strm.msg;\n};\n\n\n/**\n * deflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * Compress `data` with deflate algorithm and `options`.\n *\n * Supported options are:\n *\n * - level\n * - windowBits\n * - memLevel\n * - strategy\n * - dictionary\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n *   negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n *    (each char code [0..255])\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n *   , data = Uint8Array([1,2,3,4,5,6,7,8,9]);\n *\n * console.log(pako.deflate(data));\n * ```\n **/\nfunction deflate(input, options) {\n  var deflator = new Deflate(options);\n\n  deflator.push(input, true);\n\n  // That will never happens, if you don't cheat with options :)\n  if (deflator.err) { throw deflator.msg || msg[deflator.err]; }\n\n  return deflator.result;\n}\n\n\n/**\n * deflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction deflateRaw(input, options) {\n  options = options || {};\n  options.raw = true;\n  return deflate(input, options);\n}\n\n\n/**\n * gzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but create gzip wrapper instead of\n * deflate one.\n **/\nfunction gzip(input, options) {\n  options = options || {};\n  options.gzip = true;\n  return deflate(input, options);\n}\n\n\nexports.Deflate = Deflate;\nexports.deflate = deflate;\nexports.deflateRaw = deflateRaw;\nexports.gzip = gzip;\n","'use strict';\n\n\nvar zlib_inflate = require('./zlib/inflate');\nvar utils        = require('./utils/common');\nvar strings      = require('./utils/strings');\nvar c            = require('./zlib/constants');\nvar msg          = require('./zlib/messages');\nvar ZStream      = require('./zlib/zstream');\nvar GZheader     = require('./zlib/gzheader');\n\nvar toString = Object.prototype.toString;\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Inflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n *   from utf8 to utf16 (javascript) string. When string output requested,\n *   chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n *   , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n *   , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true);  // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nfunction Inflate(options) {\n  if (!(this instanceof Inflate)) return new Inflate(options);\n\n  this.options = utils.assign({\n    chunkSize: 16384,\n    windowBits: 0,\n    to: ''\n  }, options || {});\n\n  var opt = this.options;\n\n  // Force window size for `raw` data, if not set directly,\n  // because we have no header for autodetect.\n  if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n    opt.windowBits = -opt.windowBits;\n    if (opt.windowBits === 0) { opt.windowBits = -15; }\n  }\n\n  // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n  if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n      !(options && options.windowBits)) {\n    opt.windowBits += 32;\n  }\n\n  // Gzip header has no info about windows size, we can do autodetect only\n  // for deflate. So, if window size not set, force it to max when gzip possible\n  if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n    // bit 3 (16) -> gzipped data\n    // bit 4 (32) -> autodetect gzip/deflate\n    if ((opt.windowBits & 15) === 0) {\n      opt.windowBits |= 15;\n    }\n  }\n\n  this.err    = 0;      // error code, if happens (0 = Z_OK)\n  this.msg    = '';     // error message\n  this.ended  = false;  // used to avoid multiple onEnd() calls\n  this.chunks = [];     // chunks of compressed data\n\n  this.strm   = new ZStream();\n  this.strm.avail_out = 0;\n\n  var status  = zlib_inflate.inflateInit2(\n    this.strm,\n    opt.windowBits\n  );\n\n  if (status !== c.Z_OK) {\n    throw new Error(msg[status]);\n  }\n\n  this.header = new GZheader();\n\n  zlib_inflate.inflateGetHeader(this.strm, this.header);\n}\n\n/**\n * Inflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n *   See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the decompression context.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true);  // push last chunk\n * ```\n **/\nInflate.prototype.push = function (data, mode) {\n  var strm = this.strm;\n  var chunkSize = this.options.chunkSize;\n  var dictionary = this.options.dictionary;\n  var status, _mode;\n  var next_out_utf8, tail, utf8str;\n  var dict;\n\n  // Flag to properly process Z_BUF_ERROR on testing inflate call\n  // when we check that all output data was flushed.\n  var allowBufError = false;\n\n  if (this.ended) { return false; }\n  _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH);\n\n  // Convert data if needed\n  if (typeof data === 'string') {\n    // Only binary strings can be decompressed on practice\n    strm.input = strings.binstring2buf(data);\n  } else if (toString.call(data) === '[object ArrayBuffer]') {\n    strm.input = new Uint8Array(data);\n  } else {\n    strm.input = data;\n  }\n\n  strm.next_in = 0;\n  strm.avail_in = strm.input.length;\n\n  do {\n    if (strm.avail_out === 0) {\n      strm.output = new utils.Buf8(chunkSize);\n      strm.next_out = 0;\n      strm.avail_out = chunkSize;\n    }\n\n    status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH);    /* no bad return value */\n\n    if (status === c.Z_NEED_DICT && dictionary) {\n      // Convert data if needed\n      if (typeof dictionary === 'string') {\n        dict = strings.string2buf(dictionary);\n      } else if (toString.call(dictionary) === '[object ArrayBuffer]') {\n        dict = new Uint8Array(dictionary);\n      } else {\n        dict = dictionary;\n      }\n\n      status = zlib_inflate.inflateSetDictionary(this.strm, dict);\n\n    }\n\n    if (status === c.Z_BUF_ERROR && allowBufError === true) {\n      status = c.Z_OK;\n      allowBufError = false;\n    }\n\n    if (status !== c.Z_STREAM_END && status !== c.Z_OK) {\n      this.onEnd(status);\n      this.ended = true;\n      return false;\n    }\n\n    if (strm.next_out) {\n      if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) {\n\n        if (this.options.to === 'string') {\n\n          next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n          tail = strm.next_out - next_out_utf8;\n          utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n          // move tail\n          strm.next_out = tail;\n          strm.avail_out = chunkSize - tail;\n          if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); }\n\n          this.onData(utf8str);\n\n        } else {\n          this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n        }\n      }\n    }\n\n    // When no more input data, we should check that internal inflate buffers\n    // are flushed. The only way to do it when avail_out = 0 - run one more\n    // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR.\n    // Here we set flag to process this error properly.\n    //\n    // NOTE. Deflate does not return error in this case and does not needs such\n    // logic.\n    if (strm.avail_in === 0 && strm.avail_out === 0) {\n      allowBufError = true;\n    }\n\n  } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END);\n\n  if (status === c.Z_STREAM_END) {\n    _mode = c.Z_FINISH;\n  }\n\n  // Finalize on the last chunk.\n  if (_mode === c.Z_FINISH) {\n    status = zlib_inflate.inflateEnd(this.strm);\n    this.onEnd(status);\n    this.ended = true;\n    return status === c.Z_OK;\n  }\n\n  // callback interim results if Z_SYNC_FLUSH.\n  if (_mode === c.Z_SYNC_FLUSH) {\n    this.onEnd(c.Z_OK);\n    strm.avail_out = 0;\n    return true;\n  }\n\n  return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n *   on js engine support. When string output requested, each chunk\n *   will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate.prototype.onData = function (chunk) {\n  this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n *   other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate.prototype.onEnd = function (status) {\n  // On success - join\n  if (status === c.Z_OK) {\n    if (this.options.to === 'string') {\n      // Glue & convert here, until we teach pako to send\n      // utf8 aligned strings to onData\n      this.result = this.chunks.join('');\n    } else {\n      this.result = utils.flattenChunks(this.chunks);\n    }\n  }\n  this.chunks = [];\n  this.err = status;\n  this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n *   negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n *   from utf8 to utf16 (javascript) string. When string output requested,\n *   chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n *   , input = pako.deflate([1,2,3,4,5,6,7,8,9])\n *   , output;\n *\n * try {\n *   output = pako.inflate(input);\n * } catch (err)\n *   console.log(err);\n * }\n * ```\n **/\nfunction inflate(input, options) {\n  var inflator = new Inflate(options);\n\n  inflator.push(input, true);\n\n  // That will never happens, if you don't cheat with options :)\n  if (inflator.err) { throw inflator.msg || msg[inflator.err]; }\n\n  return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw(input, options) {\n  options = options || {};\n  options.raw = true;\n  return inflate(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nexports.Inflate = Inflate;\nexports.inflate = inflate;\nexports.inflateRaw = inflateRaw;\nexports.ungzip  = inflate;\n","'use strict';\n\n\nvar TYPED_OK =  (typeof Uint8Array !== 'undefined') &&\n                (typeof Uint16Array !== 'undefined') &&\n                (typeof Int32Array !== 'undefined');\n\nfunction _has(obj, key) {\n  return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexports.assign = function (obj /*from1, from2, from3, ...*/) {\n  var sources = Array.prototype.slice.call(arguments, 1);\n  while (sources.length) {\n    var source = sources.shift();\n    if (!source) { continue; }\n\n    if (typeof source !== 'object') {\n      throw new TypeError(source + 'must be non-object');\n    }\n\n    for (var p in source) {\n      if (_has(source, p)) {\n        obj[p] = source[p];\n      }\n    }\n  }\n\n  return obj;\n};\n\n\n// reduce buffer size, avoiding mem copy\nexports.shrinkBuf = function (buf, size) {\n  if (buf.length === size) { return buf; }\n  if (buf.subarray) { return buf.subarray(0, size); }\n  buf.length = size;\n  return buf;\n};\n\n\nvar fnTyped = {\n  arraySet: function (dest, src, src_offs, len, dest_offs) {\n    if (src.subarray && dest.subarray) {\n      dest.set(src.subarray(src_offs, src_offs + len), dest_offs);\n      return;\n    }\n    // Fallback to ordinary array\n    for (var i = 0; i < len; i++) {\n      dest[dest_offs + i] = src[src_offs + i];\n    }\n  },\n  // Join array of chunks to single array.\n  flattenChunks: function (chunks) {\n    var i, l, len, pos, chunk, result;\n\n    // calculate data length\n    len = 0;\n    for (i = 0, l = chunks.length; i < l; i++) {\n      len += chunks[i].length;\n    }\n\n    // join chunks\n    result = new Uint8Array(len);\n    pos = 0;\n    for (i = 0, l = chunks.length; i < l; i++) {\n      chunk = chunks[i];\n      result.set(chunk, pos);\n      pos += chunk.length;\n    }\n\n    return result;\n  }\n};\n\nvar fnUntyped = {\n  arraySet: function (dest, src, src_offs, len, dest_offs) {\n    for (var i = 0; i < len; i++) {\n      dest[dest_offs + i] = src[src_offs + i];\n    }\n  },\n  // Join array of chunks to single array.\n  flattenChunks: function (chunks) {\n    return [].concat.apply([], chunks);\n  }\n};\n\n\n// Enable/Disable typed arrays use, for testing\n//\nexports.setTyped = function (on) {\n  if (on) {\n    exports.Buf8  = Uint8Array;\n    exports.Buf16 = Uint16Array;\n    exports.Buf32 = Int32Array;\n    exports.assign(exports, fnTyped);\n  } else {\n    exports.Buf8  = Array;\n    exports.Buf16 = Array;\n    exports.Buf32 = Array;\n    exports.assign(exports, fnUntyped);\n  }\n};\n\nexports.setTyped(TYPED_OK);\n","// String encode/decode helpers\n'use strict';\n\n\nvar utils = require('./common');\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safari\n//\nvar STR_APPLY_OK = true;\nvar STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; }\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nvar _utf8len = new utils.Buf8(256);\nfor (var q = 0; q < 256; q++) {\n  _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nexports.string2buf = function (str) {\n  var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n  // count binary size\n  for (m_pos = 0; m_pos < str_len; m_pos++) {\n    c = str.charCodeAt(m_pos);\n    if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n      c2 = str.charCodeAt(m_pos + 1);\n      if ((c2 & 0xfc00) === 0xdc00) {\n        c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n        m_pos++;\n      }\n    }\n    buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n  }\n\n  // allocate buffer\n  buf = new utils.Buf8(buf_len);\n\n  // convert\n  for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n    c = str.charCodeAt(m_pos);\n    if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n      c2 = str.charCodeAt(m_pos + 1);\n      if ((c2 & 0xfc00) === 0xdc00) {\n        c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n        m_pos++;\n      }\n    }\n    if (c < 0x80) {\n      /* one byte */\n      buf[i++] = c;\n    } else if (c < 0x800) {\n      /* two bytes */\n      buf[i++] = 0xC0 | (c >>> 6);\n      buf[i++] = 0x80 | (c & 0x3f);\n    } else if (c < 0x10000) {\n      /* three bytes */\n      buf[i++] = 0xE0 | (c >>> 12);\n      buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n      buf[i++] = 0x80 | (c & 0x3f);\n    } else {\n      /* four bytes */\n      buf[i++] = 0xf0 | (c >>> 18);\n      buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n      buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n      buf[i++] = 0x80 | (c & 0x3f);\n    }\n  }\n\n  return buf;\n};\n\n// Helper (used in 2 places)\nfunction buf2binstring(buf, len) {\n  // use fallback for big arrays to avoid stack overflow\n  if (len < 65537) {\n    if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {\n      return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));\n    }\n  }\n\n  var result = '';\n  for (var i = 0; i < len; i++) {\n    result += String.fromCharCode(buf[i]);\n  }\n  return result;\n}\n\n\n// Convert byte array to binary string\nexports.buf2binstring = function (buf) {\n  return buf2binstring(buf, buf.length);\n};\n\n\n// Convert binary string (typed, when possible)\nexports.binstring2buf = function (str) {\n  var buf = new utils.Buf8(str.length);\n  for (var i = 0, len = buf.length; i < len; i++) {\n    buf[i] = str.charCodeAt(i);\n  }\n  return buf;\n};\n\n\n// convert array to string\nexports.buf2string = function (buf, max) {\n  var i, out, c, c_len;\n  var len = max || buf.length;\n\n  // Reserve max possible length (2 words per char)\n  // NB: by unknown reasons, Array is significantly faster for\n  //     String.fromCharCode.apply than Uint16Array.\n  var utf16buf = new Array(len * 2);\n\n  for (out = 0, i = 0; i < len;) {\n    c = buf[i++];\n    // quick process ascii\n    if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n    c_len = _utf8len[c];\n    // skip 5 & 6 byte codes\n    if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n    // apply mask on first byte\n    c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n    // join the rest\n    while (c_len > 1 && i < len) {\n      c = (c << 6) | (buf[i++] & 0x3f);\n      c_len--;\n    }\n\n    // terminated by end of string?\n    if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n    if (c < 0x10000) {\n      utf16buf[out++] = c;\n    } else {\n      c -= 0x10000;\n      utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n      utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n    }\n  }\n\n  return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max   - length limit (mandatory);\nexports.utf8border = function (buf, max) {\n  var pos;\n\n  max = max || buf.length;\n  if (max > buf.length) { max = buf.length; }\n\n  // go back from last position, until start of sequence found\n  pos = max - 1;\n  while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n  // Very small and broken sequence,\n  // return max, because we should return something anyway.\n  if (pos < 0) { return max; }\n\n  // If we came to start of buffer - that means buffer is too small,\n  // return max too.\n  if (pos === 0) { return max; }\n\n  return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n","'use strict';\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It isn't worth it to make additional optimizations as in original.\n// Small size is preferable.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction adler32(adler, buf, len, pos) {\n  var s1 = (adler & 0xffff) |0,\n      s2 = ((adler >>> 16) & 0xffff) |0,\n      n = 0;\n\n  while (len !== 0) {\n    // Set limit ~ twice less than 5552, to keep\n    // s2 in 31-bits, because we force signed ints.\n    // in other case %= will fail.\n    n = len > 2000 ? 2000 : len;\n    len -= n;\n\n    do {\n      s1 = (s1 + buf[pos++]) |0;\n      s2 = (s2 + s1) |0;\n    } while (--n);\n\n    s1 %= 65521;\n    s2 %= 65521;\n  }\n\n  return (s1 | (s2 << 16)) |0;\n}\n\n\nmodule.exports = adler32;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n\n  /* Allowed flush values; see deflate() and inflate() below for details */\n  Z_NO_FLUSH:         0,\n  Z_PARTIAL_FLUSH:    1,\n  Z_SYNC_FLUSH:       2,\n  Z_FULL_FLUSH:       3,\n  Z_FINISH:           4,\n  Z_BLOCK:            5,\n  Z_TREES:            6,\n\n  /* Return codes for the compression/decompression functions. Negative values\n  * are errors, positive values are used for special but normal events.\n  */\n  Z_OK:               0,\n  Z_STREAM_END:       1,\n  Z_NEED_DICT:        2,\n  Z_ERRNO:           -1,\n  Z_STREAM_ERROR:    -2,\n  Z_DATA_ERROR:      -3,\n  //Z_MEM_ERROR:     -4,\n  Z_BUF_ERROR:       -5,\n  //Z_VERSION_ERROR: -6,\n\n  /* compression levels */\n  Z_NO_COMPRESSION:         0,\n  Z_BEST_SPEED:             1,\n  Z_BEST_COMPRESSION:       9,\n  Z_DEFAULT_COMPRESSION:   -1,\n\n\n  Z_FILTERED:               1,\n  Z_HUFFMAN_ONLY:           2,\n  Z_RLE:                    3,\n  Z_FIXED:                  4,\n  Z_DEFAULT_STRATEGY:       0,\n\n  /* Possible values of the data_type field (though see inflate()) */\n  Z_BINARY:                 0,\n  Z_TEXT:                   1,\n  //Z_ASCII:                1, // = Z_TEXT (deprecated)\n  Z_UNKNOWN:                2,\n\n  /* The deflate compression method */\n  Z_DEFLATED:               8\n  //Z_NULL:                 null // Use -1 or null inline, depending on var type\n};\n","'use strict';\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// Use ordinary array, since untyped makes no boost here\nfunction makeTable() {\n  var c, table = [];\n\n  for (var n = 0; n < 256; n++) {\n    c = n;\n    for (var k = 0; k < 8; k++) {\n      c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n    }\n    table[n] = c;\n  }\n\n  return table;\n}\n\n// Create table on load. Just 255 signed longs. Not a problem.\nvar crcTable = makeTable();\n\n\nfunction crc32(crc, buf, len, pos) {\n  var t = crcTable,\n      end = pos + len;\n\n  crc ^= -1;\n\n  for (var i = pos; i < end; i++) {\n    crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n  }\n\n  return (crc ^ (-1)); // >>> 0;\n}\n\n\nmodule.exports = crc32;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils   = require('../utils/common');\nvar trees   = require('./trees');\nvar adler32 = require('./adler32');\nvar crc32   = require('./crc32');\nvar msg     = require('./messages');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\nvar Z_NO_FLUSH      = 0;\nvar Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH    = 2;\nvar Z_FULL_FLUSH    = 3;\nvar Z_FINISH        = 4;\nvar Z_BLOCK         = 5;\n//var Z_TREES         = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK            = 0;\nvar Z_STREAM_END    = 1;\n//var Z_NEED_DICT     = 2;\n//var Z_ERRNO         = -1;\nvar Z_STREAM_ERROR  = -2;\nvar Z_DATA_ERROR    = -3;\n//var Z_MEM_ERROR     = -4;\nvar Z_BUF_ERROR     = -5;\n//var Z_VERSION_ERROR = -6;\n\n\n/* compression levels */\n//var Z_NO_COMPRESSION      = 0;\n//var Z_BEST_SPEED          = 1;\n//var Z_BEST_COMPRESSION    = 9;\nvar Z_DEFAULT_COMPRESSION = -1;\n\n\nvar Z_FILTERED            = 1;\nvar Z_HUFFMAN_ONLY        = 2;\nvar Z_RLE                 = 3;\nvar Z_FIXED               = 4;\nvar Z_DEFAULT_STRATEGY    = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\n//var Z_BINARY              = 0;\n//var Z_TEXT                = 1;\n//var Z_ASCII               = 1; // = Z_TEXT\nvar Z_UNKNOWN             = 2;\n\n\n/* The deflate compression method */\nvar Z_DEFLATED  = 8;\n\n/*============================================================================*/\n\n\nvar MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_MEM_LEVEL = 8;\n\n\nvar LENGTH_CODES  = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nvar LITERALS      = 256;\n/* number of literal bytes 0..255 */\nvar L_CODES       = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\nvar D_CODES       = 30;\n/* number of distance codes */\nvar BL_CODES      = 19;\n/* number of codes used to transfer the bit lengths */\nvar HEAP_SIZE     = 2 * L_CODES + 1;\n/* maximum heap size */\nvar MAX_BITS  = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\nvar MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nvar PRESET_DICT = 0x20;\n\nvar INIT_STATE = 42;\nvar EXTRA_STATE = 69;\nvar NAME_STATE = 73;\nvar COMMENT_STATE = 91;\nvar HCRC_STATE = 103;\nvar BUSY_STATE = 113;\nvar FINISH_STATE = 666;\n\nvar BS_NEED_MORE      = 1; /* block not completed, need more input or more output */\nvar BS_BLOCK_DONE     = 2; /* block flush performed */\nvar BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nvar BS_FINISH_DONE    = 4; /* finish done, accept no more input or output */\n\nvar OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nfunction err(strm, errorCode) {\n  strm.msg = msg[errorCode];\n  return errorCode;\n}\n\nfunction rank(f) {\n  return ((f) << 1) - ((f) > 4 ? 9 : 0);\n}\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output goes\n * through this function so some applications may wish to modify it\n * to avoid allocating a large strm->output buffer and copying into it.\n * (See also read_buf()).\n */\nfunction flush_pending(strm) {\n  var s = strm.state;\n\n  //_tr_flush_bits(s);\n  var len = s.pending;\n  if (len > strm.avail_out) {\n    len = strm.avail_out;\n  }\n  if (len === 0) { return; }\n\n  utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);\n  strm.next_out += len;\n  s.pending_out += len;\n  strm.total_out += len;\n  strm.avail_out -= len;\n  s.pending -= len;\n  if (s.pending === 0) {\n    s.pending_out = 0;\n  }\n}\n\n\nfunction flush_block_only(s, last) {\n  trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n  s.block_start = s.strstart;\n  flush_pending(s.strm);\n}\n\n\nfunction put_byte(s, b) {\n  s.pending_buf[s.pending++] = b;\n}\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nfunction putShortMSB(s, b) {\n//  put_byte(s, (Byte)(b >> 8));\n//  put_byte(s, (Byte)(b & 0xff));\n  s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n  s.pending_buf[s.pending++] = b & 0xff;\n}\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read.  All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nfunction read_buf(strm, buf, start, size) {\n  var len = strm.avail_in;\n\n  if (len > size) { len = size; }\n  if (len === 0) { return 0; }\n\n  strm.avail_in -= len;\n\n  // zmemcpy(buf, strm->next_in, len);\n  utils.arraySet(buf, strm.input, strm.next_in, len, start);\n  if (strm.state.wrap === 1) {\n    strm.adler = adler32(strm.adler, buf, len, start);\n  }\n\n  else if (strm.state.wrap === 2) {\n    strm.adler = crc32(strm.adler, buf, len, start);\n  }\n\n  strm.next_in += len;\n  strm.total_in += len;\n\n  return len;\n}\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n *   string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nfunction longest_match(s, cur_match) {\n  var chain_length = s.max_chain_length;      /* max hash chain length */\n  var scan = s.strstart; /* current string */\n  var match;                       /* matched string */\n  var len;                           /* length of current match */\n  var best_len = s.prev_length;              /* best match length so far */\n  var nice_match = s.nice_match;             /* stop if match long enough */\n  var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n      s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;\n\n  var _win = s.window; // shortcut\n\n  var wmask = s.w_mask;\n  var prev  = s.prev;\n\n  /* Stop when cur_match becomes <= limit. To simplify the code,\n   * we prevent matches with the string of window index 0.\n   */\n\n  var strend = s.strstart + MAX_MATCH;\n  var scan_end1  = _win[scan + best_len - 1];\n  var scan_end   = _win[scan + best_len];\n\n  /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n   * It is easy to get rid of this optimization if necessary.\n   */\n  // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n  /* Do not waste too much time if we already have a good match: */\n  if (s.prev_length >= s.good_match) {\n    chain_length >>= 2;\n  }\n  /* Do not look for matches beyond the end of the input. This is necessary\n   * to make deflate deterministic.\n   */\n  if (nice_match > s.lookahead) { nice_match = s.lookahead; }\n\n  // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n  do {\n    // Assert(cur_match < s->strstart, \"no future\");\n    match = cur_match;\n\n    /* Skip to next match if the match length cannot increase\n     * or if the match length is less than 2.  Note that the checks below\n     * for insufficient lookahead only occur occasionally for performance\n     * reasons.  Therefore uninitialized memory will be accessed, and\n     * conditional jumps will be made that depend on those values.\n     * However the length of the match is limited to the lookahead, so\n     * the output of deflate is not affected by the uninitialized values.\n     */\n\n    if (_win[match + best_len]     !== scan_end  ||\n        _win[match + best_len - 1] !== scan_end1 ||\n        _win[match]                !== _win[scan] ||\n        _win[++match]              !== _win[scan + 1]) {\n      continue;\n    }\n\n    /* The check at best_len-1 can be removed because it will be made\n     * again later. (This heuristic is not always a win.)\n     * It is not necessary to compare scan[2] and match[2] since they\n     * are always equal when the other bytes match, given that\n     * the hash keys are equal and that HASH_BITS >= 8.\n     */\n    scan += 2;\n    match++;\n    // Assert(*scan == *match, \"match[2]?\");\n\n    /* We check for insufficient lookahead only every 8th comparison;\n     * the 256th check will be made at strstart+258.\n     */\n    do {\n      /*jshint noempty:false*/\n    } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n             scan < strend);\n\n    // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n    len = MAX_MATCH - (strend - scan);\n    scan = strend - MAX_MATCH;\n\n    if (len > best_len) {\n      s.match_start = cur_match;\n      best_len = len;\n      if (len >= nice_match) {\n        break;\n      }\n      scan_end1  = _win[scan + best_len - 1];\n      scan_end   = _win[scan + best_len];\n    }\n  } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n  if (best_len <= s.lookahead) {\n    return best_len;\n  }\n  return s.lookahead;\n}\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n *    At least one byte has been read, or avail_in == 0; reads are\n *    performed for at least two bytes (required for the zip translate_eol\n *    option -- not supported here).\n */\nfunction fill_window(s) {\n  var _w_size = s.w_size;\n  var p, n, m, more, str;\n\n  //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n  do {\n    more = s.window_size - s.lookahead - s.strstart;\n\n    // JS ints have 32 bit, block below not needed\n    /* Deal with !@#$% 64K limit: */\n    //if (sizeof(int) <= 2) {\n    //    if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n    //        more = wsize;\n    //\n    //  } else if (more == (unsigned)(-1)) {\n    //        /* Very unlikely, but possible on 16 bit machine if\n    //         * strstart == 0 && lookahead == 1 (input done a byte at time)\n    //         */\n    //        more--;\n    //    }\n    //}\n\n\n    /* If the window is almost full and there is insufficient lookahead,\n     * move the upper half to the lower one to make room in the upper half.\n     */\n    if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n      utils.arraySet(s.window, s.window, _w_size, _w_size, 0);\n      s.match_start -= _w_size;\n      s.strstart -= _w_size;\n      /* we now have strstart >= MAX_DIST */\n      s.block_start -= _w_size;\n\n      /* Slide the hash table (could be avoided with 32 bit values\n       at the expense of memory usage). We slide even when level == 0\n       to keep the hash table consistent if we switch back to level > 0\n       later. (Using level 0 permanently is not an optimal usage of\n       zlib, so we don't care about this pathological case.)\n       */\n\n      n = s.hash_size;\n      p = n;\n      do {\n        m = s.head[--p];\n        s.head[p] = (m >= _w_size ? m - _w_size : 0);\n      } while (--n);\n\n      n = _w_size;\n      p = n;\n      do {\n        m = s.prev[--p];\n        s.prev[p] = (m >= _w_size ? m - _w_size : 0);\n        /* If n is not on any hash chain, prev[n] is garbage but\n         * its value will never be used.\n         */\n      } while (--n);\n\n      more += _w_size;\n    }\n    if (s.strm.avail_in === 0) {\n      break;\n    }\n\n    /* If there was no sliding:\n     *    strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n     *    more == window_size - lookahead - strstart\n     * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n     * => more >= window_size - 2*WSIZE + 2\n     * In the BIG_MEM or MMAP case (not yet supported),\n     *   window_size == input_size + MIN_LOOKAHEAD  &&\n     *   strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n     * Otherwise, window_size == 2*WSIZE so more >= 2.\n     * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n     */\n    //Assert(more >= 2, \"more < 2\");\n    n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n    s.lookahead += n;\n\n    /* Initialize the hash value now that we have some input: */\n    if (s.lookahead + s.insert >= MIN_MATCH) {\n      str = s.strstart - s.insert;\n      s.ins_h = s.window[str];\n\n      /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask;\n//#if MIN_MATCH != 3\n//        Call update_hash() MIN_MATCH-3 more times\n//#endif\n      while (s.insert) {\n        /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n        s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n        s.prev[str & s.w_mask] = s.head[s.ins_h];\n        s.head[s.ins_h] = str;\n        str++;\n        s.insert--;\n        if (s.lookahead + s.insert < MIN_MATCH) {\n          break;\n        }\n      }\n    }\n    /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n     * but this is not important since only literal bytes will be emitted.\n     */\n\n  } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n  /* If the WIN_INIT bytes after the end of the current data have never been\n   * written, then zero those bytes in order to avoid memory check reports of\n   * the use of uninitialized (or uninitialised as Julian writes) bytes by\n   * the longest match routines.  Update the high water mark for the next\n   * time through here.  WIN_INIT is set to MAX_MATCH since the longest match\n   * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n   */\n//  if (s.high_water < s.window_size) {\n//    var curr = s.strstart + s.lookahead;\n//    var init = 0;\n//\n//    if (s.high_water < curr) {\n//      /* Previous high water mark below current data -- zero WIN_INIT\n//       * bytes or up to end of window, whichever is less.\n//       */\n//      init = s.window_size - curr;\n//      if (init > WIN_INIT)\n//        init = WIN_INIT;\n//      zmemzero(s->window + curr, (unsigned)init);\n//      s->high_water = curr + init;\n//    }\n//    else if (s->high_water < (ulg)curr + WIN_INIT) {\n//      /* High water mark at or above current data, but below current data\n//       * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n//       * to end of window, whichever is less.\n//       */\n//      init = (ulg)curr + WIN_INIT - s->high_water;\n//      if (init > s->window_size - s->high_water)\n//        init = s->window_size - s->high_water;\n//      zmemzero(s->window + s->high_water, (unsigned)init);\n//      s->high_water += init;\n//    }\n//  }\n//\n//  Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n//    \"not enough room for search\");\n}\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n * This function does not insert new strings in the dictionary since\n * uncompressible data is probably not useful. This function is used\n * only for the level=0 compression option.\n * NOTE: this function should be optimized to avoid extra copying from\n * window to pending_buf.\n */\nfunction deflate_stored(s, flush) {\n  /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n   * to pending_buf_size, and each stored block has a 5 byte header:\n   */\n  var max_block_size = 0xffff;\n\n  if (max_block_size > s.pending_buf_size - 5) {\n    max_block_size = s.pending_buf_size - 5;\n  }\n\n  /* Copy as much as possible from input to output: */\n  for (;;) {\n    /* Fill the window as much as possible: */\n    if (s.lookahead <= 1) {\n\n      //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n      //  s->block_start >= (long)s->w_size, \"slide too late\");\n//      if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n//        s.block_start >= s.w_size)) {\n//        throw  new Error(\"slide too late\");\n//      }\n\n      fill_window(s);\n      if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n        return BS_NEED_MORE;\n      }\n\n      if (s.lookahead === 0) {\n        break;\n      }\n      /* flush the current block */\n    }\n    //Assert(s->block_start >= 0L, \"block gone\");\n//    if (s.block_start < 0) throw new Error(\"block gone\");\n\n    s.strstart += s.lookahead;\n    s.lookahead = 0;\n\n    /* Emit a stored block if pending_buf will be full: */\n    var max_start = s.block_start + max_block_size;\n\n    if (s.strstart === 0 || s.strstart >= max_start) {\n      /* strstart == 0 is possible when wraparound on 16-bit machine */\n      s.lookahead = s.strstart - max_start;\n      s.strstart = max_start;\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n\n\n    }\n    /* Flush if we may have to slide, otherwise block_start may become\n     * negative and the data will be gone:\n     */\n    if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n    }\n  }\n\n  s.insert = 0;\n\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n\n  if (s.strstart > s.block_start) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n\n  return BS_NEED_MORE;\n}\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nfunction deflate_fast(s, flush) {\n  var hash_head;        /* head of the hash chain */\n  var bflush;           /* set if current block must be flushed */\n\n  for (;;) {\n    /* Make sure that we always have enough lookahead, except\n     * at the end of the input file. We need MAX_MATCH bytes\n     * for the next match, plus MIN_MATCH bytes to insert the\n     * string following the next match.\n     */\n    if (s.lookahead < MIN_LOOKAHEAD) {\n      fill_window(s);\n      if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n        return BS_NEED_MORE;\n      }\n      if (s.lookahead === 0) {\n        break; /* flush the current block */\n      }\n    }\n\n    /* Insert the string window[strstart .. strstart+2] in the\n     * dictionary, and set hash_head to the head of the hash chain:\n     */\n    hash_head = 0/*NIL*/;\n    if (s.lookahead >= MIN_MATCH) {\n      /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n      hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n      s.head[s.ins_h] = s.strstart;\n      /***/\n    }\n\n    /* Find the longest match, discarding those <= prev_length.\n     * At this point we have always match_length < MIN_MATCH\n     */\n    if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n      /* To simplify the code, we prevent matches with the string\n       * of window index 0 (in particular we have to avoid a match\n       * of the string with itself at the start of the input file).\n       */\n      s.match_length = longest_match(s, hash_head);\n      /* longest_match() sets match_start */\n    }\n    if (s.match_length >= MIN_MATCH) {\n      // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n      /*** _tr_tally_dist(s, s.strstart - s.match_start,\n                     s.match_length - MIN_MATCH, bflush); ***/\n      bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n\n      s.lookahead -= s.match_length;\n\n      /* Insert new strings in the hash table only if the match length\n       * is not too large. This saves time but degrades compression.\n       */\n      if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n        s.match_length--; /* string at strstart already in table */\n        do {\n          s.strstart++;\n          /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n          s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n          hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n          s.head[s.ins_h] = s.strstart;\n          /***/\n          /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n           * always MIN_MATCH bytes ahead.\n           */\n        } while (--s.match_length !== 0);\n        s.strstart++;\n      } else\n      {\n        s.strstart += s.match_length;\n        s.match_length = 0;\n        s.ins_h = s.window[s.strstart];\n        /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n        s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;\n\n//#if MIN_MATCH != 3\n//                Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n        /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n         * matter since it will be recomputed at next deflate call.\n         */\n      }\n    } else {\n      /* No match, output a literal byte */\n      //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n      /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n      bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n      s.lookahead--;\n      s.strstart++;\n    }\n    if (bflush) {\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n    }\n  }\n  s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n  if (s.last_lit) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n  return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nfunction deflate_slow(s, flush) {\n  var hash_head;          /* head of hash chain */\n  var bflush;              /* set if current block must be flushed */\n\n  var max_insert;\n\n  /* Process the input block. */\n  for (;;) {\n    /* Make sure that we always have enough lookahead, except\n     * at the end of the input file. We need MAX_MATCH bytes\n     * for the next match, plus MIN_MATCH bytes to insert the\n     * string following the next match.\n     */\n    if (s.lookahead < MIN_LOOKAHEAD) {\n      fill_window(s);\n      if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n        return BS_NEED_MORE;\n      }\n      if (s.lookahead === 0) { break; } /* flush the current block */\n    }\n\n    /* Insert the string window[strstart .. strstart+2] in the\n     * dictionary, and set hash_head to the head of the hash chain:\n     */\n    hash_head = 0/*NIL*/;\n    if (s.lookahead >= MIN_MATCH) {\n      /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n      hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n      s.head[s.ins_h] = s.strstart;\n      /***/\n    }\n\n    /* Find the longest match, discarding those <= prev_length.\n     */\n    s.prev_length = s.match_length;\n    s.prev_match = s.match_start;\n    s.match_length = MIN_MATCH - 1;\n\n    if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n        s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n      /* To simplify the code, we prevent matches with the string\n       * of window index 0 (in particular we have to avoid a match\n       * of the string with itself at the start of the input file).\n       */\n      s.match_length = longest_match(s, hash_head);\n      /* longest_match() sets match_start */\n\n      if (s.match_length <= 5 &&\n         (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n        /* If prev_match is also MIN_MATCH, match_start is garbage\n         * but we will ignore the current match anyway.\n         */\n        s.match_length = MIN_MATCH - 1;\n      }\n    }\n    /* If there was a match at the previous step and the current\n     * match is not better, output the previous match:\n     */\n    if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n      max_insert = s.strstart + s.lookahead - MIN_MATCH;\n      /* Do not insert strings in hash table beyond this. */\n\n      //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n      /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n                     s.prev_length - MIN_MATCH, bflush);***/\n      bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);\n      /* Insert in hash table all strings up to the end of the match.\n       * strstart-1 and strstart are already inserted. If there is not\n       * enough lookahead, the last two strings are not inserted in\n       * the hash table.\n       */\n      s.lookahead -= s.prev_length - 1;\n      s.prev_length -= 2;\n      do {\n        if (++s.strstart <= max_insert) {\n          /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n          s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n          hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n          s.head[s.ins_h] = s.strstart;\n          /***/\n        }\n      } while (--s.prev_length !== 0);\n      s.match_available = 0;\n      s.match_length = MIN_MATCH - 1;\n      s.strstart++;\n\n      if (bflush) {\n        /*** FLUSH_BLOCK(s, 0); ***/\n        flush_block_only(s, false);\n        if (s.strm.avail_out === 0) {\n          return BS_NEED_MORE;\n        }\n        /***/\n      }\n\n    } else if (s.match_available) {\n      /* If there was no match at the previous position, output a\n       * single literal. If there was a match but the current match\n       * is longer, truncate the previous match to a single literal.\n       */\n      //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n      /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n      bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n      if (bflush) {\n        /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n        flush_block_only(s, false);\n        /***/\n      }\n      s.strstart++;\n      s.lookahead--;\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n    } else {\n      /* There is no previous match to compare with, wait for\n       * the next step to decide.\n       */\n      s.match_available = 1;\n      s.strstart++;\n      s.lookahead--;\n    }\n  }\n  //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n  if (s.match_available) {\n    //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n    /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n    bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n    s.match_available = 0;\n  }\n  s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n  if (s.last_lit) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n\n  return BS_BLOCK_DONE;\n}\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one.  Do not maintain a hash table.  (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nfunction deflate_rle(s, flush) {\n  var bflush;            /* set if current block must be flushed */\n  var prev;              /* byte at distance one to match */\n  var scan, strend;      /* scan goes up to strend for length of run */\n\n  var _win = s.window;\n\n  for (;;) {\n    /* Make sure that we always have enough lookahead, except\n     * at the end of the input file. We need MAX_MATCH bytes\n     * for the longest run, plus one for the unrolled loop.\n     */\n    if (s.lookahead <= MAX_MATCH) {\n      fill_window(s);\n      if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {\n        return BS_NEED_MORE;\n      }\n      if (s.lookahead === 0) { break; } /* flush the current block */\n    }\n\n    /* See how many times the previous byte repeats */\n    s.match_length = 0;\n    if (s.lookahead >= MIN_MATCH && s.strstart > 0) {\n      scan = s.strstart - 1;\n      prev = _win[scan];\n      if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n        strend = s.strstart + MAX_MATCH;\n        do {\n          /*jshint noempty:false*/\n        } while (prev === _win[++scan] && prev === _win[++scan] &&\n                 prev === _win[++scan] && prev === _win[++scan] &&\n                 prev === _win[++scan] && prev === _win[++scan] &&\n                 prev === _win[++scan] && prev === _win[++scan] &&\n                 scan < strend);\n        s.match_length = MAX_MATCH - (strend - scan);\n        if (s.match_length > s.lookahead) {\n          s.match_length = s.lookahead;\n        }\n      }\n      //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n    }\n\n    /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n    if (s.match_length >= MIN_MATCH) {\n      //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n      /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n      bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH);\n\n      s.lookahead -= s.match_length;\n      s.strstart += s.match_length;\n      s.match_length = 0;\n    } else {\n      /* No match, output a literal byte */\n      //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n      /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n      bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n      s.lookahead--;\n      s.strstart++;\n    }\n    if (bflush) {\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n    }\n  }\n  s.insert = 0;\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n  if (s.last_lit) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n  return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches.  Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nfunction deflate_huff(s, flush) {\n  var bflush;             /* set if current block must be flushed */\n\n  for (;;) {\n    /* Make sure that we have a literal to write. */\n    if (s.lookahead === 0) {\n      fill_window(s);\n      if (s.lookahead === 0) {\n        if (flush === Z_NO_FLUSH) {\n          return BS_NEED_MORE;\n        }\n        break;      /* flush the current block */\n      }\n    }\n\n    /* Output a literal byte */\n    s.match_length = 0;\n    //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n    /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n    bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n    s.lookahead--;\n    s.strstart++;\n    if (bflush) {\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n    }\n  }\n  s.insert = 0;\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n  if (s.last_lit) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n  return BS_BLOCK_DONE;\n}\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n  this.good_length = good_length;\n  this.max_lazy = max_lazy;\n  this.nice_length = nice_length;\n  this.max_chain = max_chain;\n  this.func = func;\n}\n\nvar configuration_table;\n\nconfiguration_table = [\n  /*      good lazy nice chain */\n  new Config(0, 0, 0, 0, deflate_stored),          /* 0 store only */\n  new Config(4, 4, 8, 4, deflate_fast),            /* 1 max speed, no lazy matches */\n  new Config(4, 5, 16, 8, deflate_fast),           /* 2 */\n  new Config(4, 6, 32, 32, deflate_fast),          /* 3 */\n\n  new Config(4, 4, 16, 16, deflate_slow),          /* 4 lazy matches */\n  new Config(8, 16, 32, 32, deflate_slow),         /* 5 */\n  new Config(8, 16, 128, 128, deflate_slow),       /* 6 */\n  new Config(8, 32, 128, 256, deflate_slow),       /* 7 */\n  new Config(32, 128, 258, 1024, deflate_slow),    /* 8 */\n  new Config(32, 258, 258, 4096, deflate_slow)     /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nfunction lm_init(s) {\n  s.window_size = 2 * s.w_size;\n\n  /*** CLEAR_HASH(s); ***/\n  zero(s.head); // Fill with NIL (= 0);\n\n  /* Set the default configuration parameters:\n   */\n  s.max_lazy_match = configuration_table[s.level].max_lazy;\n  s.good_match = configuration_table[s.level].good_length;\n  s.nice_match = configuration_table[s.level].nice_length;\n  s.max_chain_length = configuration_table[s.level].max_chain;\n\n  s.strstart = 0;\n  s.block_start = 0;\n  s.lookahead = 0;\n  s.insert = 0;\n  s.match_length = s.prev_length = MIN_MATCH - 1;\n  s.match_available = 0;\n  s.ins_h = 0;\n}\n\n\nfunction DeflateState() {\n  this.strm = null;            /* pointer back to this zlib stream */\n  this.status = 0;            /* as the name implies */\n  this.pending_buf = null;      /* output still pending */\n  this.pending_buf_size = 0;  /* size of pending_buf */\n  this.pending_out = 0;       /* next pending byte to output to the stream */\n  this.pending = 0;           /* nb of bytes in the pending buffer */\n  this.wrap = 0;              /* bit 0 true for zlib, bit 1 true for gzip */\n  this.gzhead = null;         /* gzip header information to write */\n  this.gzindex = 0;           /* where in extra, name, or comment */\n  this.method = Z_DEFLATED; /* can only be DEFLATED */\n  this.last_flush = -1;   /* value of flush param for previous deflate call */\n\n  this.w_size = 0;  /* LZ77 window size (32K by default) */\n  this.w_bits = 0;  /* log2(w_size)  (8..16) */\n  this.w_mask = 0;  /* w_size - 1 */\n\n  this.window = null;\n  /* Sliding window. Input bytes are read into the second half of the window,\n   * and move to the first half later to keep a dictionary of at least wSize\n   * bytes. With this organization, matches are limited to a distance of\n   * wSize-MAX_MATCH bytes, but this ensures that IO is always\n   * performed with a length multiple of the block size.\n   */\n\n  this.window_size = 0;\n  /* Actual size of window: 2*wSize, except when the user input buffer\n   * is directly used as sliding window.\n   */\n\n  this.prev = null;\n  /* Link to older string with same hash index. To limit the size of this\n   * array to 64K, this link is maintained only for the last 32K strings.\n   * An index in this array is thus a window index modulo 32K.\n   */\n\n  this.head = null;   /* Heads of the hash chains or NIL. */\n\n  this.ins_h = 0;       /* hash index of string to be inserted */\n  this.hash_size = 0;   /* number of elements in hash table */\n  this.hash_bits = 0;   /* log2(hash_size) */\n  this.hash_mask = 0;   /* hash_size-1 */\n\n  this.hash_shift = 0;\n  /* Number of bits by which ins_h must be shifted at each input\n   * step. It must be such that after MIN_MATCH steps, the oldest\n   * byte no longer takes part in the hash key, that is:\n   *   hash_shift * MIN_MATCH >= hash_bits\n   */\n\n  this.block_start = 0;\n  /* Window position at the beginning of the current output block. Gets\n   * negative when the window is moved backwards.\n   */\n\n  this.match_length = 0;      /* length of best match */\n  this.prev_match = 0;        /* previous match */\n  this.match_available = 0;   /* set if previous match exists */\n  this.strstart = 0;          /* start of string to insert */\n  this.match_start = 0;       /* start of matching string */\n  this.lookahead = 0;         /* number of valid bytes ahead in window */\n\n  this.prev_length = 0;\n  /* Length of the best match at previous step. Matches not greater than this\n   * are discarded. This is used in the lazy match evaluation.\n   */\n\n  this.max_chain_length = 0;\n  /* To speed up deflation, hash chains are never searched beyond this\n   * length.  A higher limit improves compression ratio but degrades the\n   * speed.\n   */\n\n  this.max_lazy_match = 0;\n  /* Attempt to find a better match only when the current match is strictly\n   * smaller than this value. This mechanism is used only for compression\n   * levels >= 4.\n   */\n  // That's alias to max_lazy_match, don't use directly\n  //this.max_insert_length = 0;\n  /* Insert new strings in the hash table only if the match length is not\n   * greater than this length. This saves time but degrades compression.\n   * max_insert_length is used only for compression levels <= 3.\n   */\n\n  this.level = 0;     /* compression level (1..9) */\n  this.strategy = 0;  /* favor or force Huffman coding*/\n\n  this.good_match = 0;\n  /* Use a faster search when the previous match is longer than this */\n\n  this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n              /* used by trees.c: */\n\n  /* Didn't use ct_data typedef below to suppress compiler warning */\n\n  // struct ct_data_s dyn_ltree[HEAP_SIZE];   /* literal and length tree */\n  // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n  // struct ct_data_s bl_tree[2*BL_CODES+1];  /* Huffman tree for bit lengths */\n\n  // Use flat array of DOUBLE size, with interleaved fata,\n  // because JS does not support effective\n  this.dyn_ltree  = new utils.Buf16(HEAP_SIZE * 2);\n  this.dyn_dtree  = new utils.Buf16((2 * D_CODES + 1) * 2);\n  this.bl_tree    = new utils.Buf16((2 * BL_CODES + 1) * 2);\n  zero(this.dyn_ltree);\n  zero(this.dyn_dtree);\n  zero(this.bl_tree);\n\n  this.l_desc   = null;         /* desc. for literal tree */\n  this.d_desc   = null;         /* desc. for distance tree */\n  this.bl_desc  = null;         /* desc. for bit length tree */\n\n  //ush bl_count[MAX_BITS+1];\n  this.bl_count = new utils.Buf16(MAX_BITS + 1);\n  /* number of codes at each bit length for an optimal tree */\n\n  //int heap[2*L_CODES+1];      /* heap used to build the Huffman trees */\n  this.heap = new utils.Buf16(2 * L_CODES + 1);  /* heap used to build the Huffman trees */\n  zero(this.heap);\n\n  this.heap_len = 0;               /* number of elements in the heap */\n  this.heap_max = 0;               /* element of largest frequency */\n  /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n   * The same heap array is used to build all trees.\n   */\n\n  this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1];\n  zero(this.depth);\n  /* Depth of each subtree used as tie breaker for trees of equal frequency\n   */\n\n  this.l_buf = 0;          /* buffer index for literals or lengths */\n\n  this.lit_bufsize = 0;\n  /* Size of match buffer for literals/lengths.  There are 4 reasons for\n   * limiting lit_bufsize to 64K:\n   *   - frequencies can be kept in 16 bit counters\n   *   - if compression is not successful for the first block, all input\n   *     data is still in the window so we can still emit a stored block even\n   *     when input comes from standard input.  (This can also be done for\n   *     all blocks if lit_bufsize is not greater than 32K.)\n   *   - if compression is not successful for a file smaller than 64K, we can\n   *     even emit a stored file instead of a stored block (saving 5 bytes).\n   *     This is applicable only for zip (not gzip or zlib).\n   *   - creating new Huffman trees less frequently may not provide fast\n   *     adaptation to changes in the input data statistics. (Take for\n   *     example a binary file with poorly compressible code followed by\n   *     a highly compressible string table.) Smaller buffer sizes give\n   *     fast adaptation but have of course the overhead of transmitting\n   *     trees more frequently.\n   *   - I can't count above 4\n   */\n\n  this.last_lit = 0;      /* running index in l_buf */\n\n  this.d_buf = 0;\n  /* Buffer index for distances. To simplify the code, d_buf and l_buf have\n   * the same number of elements. To use different lengths, an extra flag\n   * array would be necessary.\n   */\n\n  this.opt_len = 0;       /* bit length of current block with optimal trees */\n  this.static_len = 0;    /* bit length of current block with static trees */\n  this.matches = 0;       /* number of string matches in current block */\n  this.insert = 0;        /* bytes at end of window left to insert */\n\n\n  this.bi_buf = 0;\n  /* Output buffer. bits are inserted starting at the bottom (least\n   * significant bits).\n   */\n  this.bi_valid = 0;\n  /* Number of valid bits in bi_buf.  All bits above the last valid bit\n   * are always zero.\n   */\n\n  // Used for window memory init. We safely ignore it for JS. That makes\n  // sense only for pointers and memory check tools.\n  //this.high_water = 0;\n  /* High water mark offset in window for initialized bytes -- bytes above\n   * this are set to zero in order to avoid memory check warnings when\n   * longest match routines access bytes past the input.  This is then\n   * updated to the new high water mark.\n   */\n}\n\n\nfunction deflateResetKeep(strm) {\n  var s;\n\n  if (!strm || !strm.state) {\n    return err(strm, Z_STREAM_ERROR);\n  }\n\n  strm.total_in = strm.total_out = 0;\n  strm.data_type = Z_UNKNOWN;\n\n  s = strm.state;\n  s.pending = 0;\n  s.pending_out = 0;\n\n  if (s.wrap < 0) {\n    s.wrap = -s.wrap;\n    /* was made negative by deflate(..., Z_FINISH); */\n  }\n  s.status = (s.wrap ? INIT_STATE : BUSY_STATE);\n  strm.adler = (s.wrap === 2) ?\n    0  // crc32(0, Z_NULL, 0)\n  :\n    1; // adler32(0, Z_NULL, 0)\n  s.last_flush = Z_NO_FLUSH;\n  trees._tr_init(s);\n  return Z_OK;\n}\n\n\nfunction deflateReset(strm) {\n  var ret = deflateResetKeep(strm);\n  if (ret === Z_OK) {\n    lm_init(strm.state);\n  }\n  return ret;\n}\n\n\nfunction deflateSetHeader(strm, head) {\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }\n  strm.state.gzhead = head;\n  return Z_OK;\n}\n\n\nfunction deflateInit2(strm, level, method, windowBits, memLevel, strategy) {\n  if (!strm) { // === Z_NULL\n    return Z_STREAM_ERROR;\n  }\n  var wrap = 1;\n\n  if (level === Z_DEFAULT_COMPRESSION) {\n    level = 6;\n  }\n\n  if (windowBits < 0) { /* suppress zlib wrapper */\n    wrap = 0;\n    windowBits = -windowBits;\n  }\n\n  else if (windowBits > 15) {\n    wrap = 2;           /* write gzip wrapper instead */\n    windowBits -= 16;\n  }\n\n\n  if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||\n    windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n    strategy < 0 || strategy > Z_FIXED) {\n    return err(strm, Z_STREAM_ERROR);\n  }\n\n\n  if (windowBits === 8) {\n    windowBits = 9;\n  }\n  /* until 256-byte window bug fixed */\n\n  var s = new DeflateState();\n\n  strm.state = s;\n  s.strm = strm;\n\n  s.wrap = wrap;\n  s.gzhead = null;\n  s.w_bits = windowBits;\n  s.w_size = 1 << s.w_bits;\n  s.w_mask = s.w_size - 1;\n\n  s.hash_bits = memLevel + 7;\n  s.hash_size = 1 << s.hash_bits;\n  s.hash_mask = s.hash_size - 1;\n  s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n  s.window = new utils.Buf8(s.w_size * 2);\n  s.head = new utils.Buf16(s.hash_size);\n  s.prev = new utils.Buf16(s.w_size);\n\n  // Don't need mem init magic for JS.\n  //s.high_water = 0;  /* nothing written to s->window yet */\n\n  s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n  s.pending_buf_size = s.lit_bufsize * 4;\n\n  //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);\n  //s->pending_buf = (uchf *) overlay;\n  s.pending_buf = new utils.Buf8(s.pending_buf_size);\n\n  // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)\n  //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);\n  s.d_buf = 1 * s.lit_bufsize;\n\n  //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;\n  s.l_buf = (1 + 2) * s.lit_bufsize;\n\n  s.level = level;\n  s.strategy = strategy;\n  s.method = method;\n\n  return deflateReset(strm);\n}\n\nfunction deflateInit(strm, level) {\n  return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n}\n\n\nfunction deflate(strm, flush) {\n  var old_flush, s;\n  var beg, val; // for gzip header write only\n\n  if (!strm || !strm.state ||\n    flush > Z_BLOCK || flush < 0) {\n    return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n  }\n\n  s = strm.state;\n\n  if (!strm.output ||\n      (!strm.input && strm.avail_in !== 0) ||\n      (s.status === FINISH_STATE && flush !== Z_FINISH)) {\n    return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);\n  }\n\n  s.strm = strm; /* just in case */\n  old_flush = s.last_flush;\n  s.last_flush = flush;\n\n  /* Write the header */\n  if (s.status === INIT_STATE) {\n\n    if (s.wrap === 2) { // GZIP header\n      strm.adler = 0;  //crc32(0L, Z_NULL, 0);\n      put_byte(s, 31);\n      put_byte(s, 139);\n      put_byte(s, 8);\n      if (!s.gzhead) { // s->gzhead == Z_NULL\n        put_byte(s, 0);\n        put_byte(s, 0);\n        put_byte(s, 0);\n        put_byte(s, 0);\n        put_byte(s, 0);\n        put_byte(s, s.level === 9 ? 2 :\n                    (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n                     4 : 0));\n        put_byte(s, OS_CODE);\n        s.status = BUSY_STATE;\n      }\n      else {\n        put_byte(s, (s.gzhead.text ? 1 : 0) +\n                    (s.gzhead.hcrc ? 2 : 0) +\n                    (!s.gzhead.extra ? 0 : 4) +\n                    (!s.gzhead.name ? 0 : 8) +\n                    (!s.gzhead.comment ? 0 : 16)\n                );\n        put_byte(s, s.gzhead.time & 0xff);\n        put_byte(s, (s.gzhead.time >> 8) & 0xff);\n        put_byte(s, (s.gzhead.time >> 16) & 0xff);\n        put_byte(s, (s.gzhead.time >> 24) & 0xff);\n        put_byte(s, s.level === 9 ? 2 :\n                    (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n                     4 : 0));\n        put_byte(s, s.gzhead.os & 0xff);\n        if (s.gzhead.extra && s.gzhead.extra.length) {\n          put_byte(s, s.gzhead.extra.length & 0xff);\n          put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n        }\n        if (s.gzhead.hcrc) {\n          strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);\n        }\n        s.gzindex = 0;\n        s.status = EXTRA_STATE;\n      }\n    }\n    else // DEFLATE header\n    {\n      var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;\n      var level_flags = -1;\n\n      if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n        level_flags = 0;\n      } else if (s.level < 6) {\n        level_flags = 1;\n      } else if (s.level === 6) {\n        level_flags = 2;\n      } else {\n        level_flags = 3;\n      }\n      header |= (level_flags << 6);\n      if (s.strstart !== 0) { header |= PRESET_DICT; }\n      header += 31 - (header % 31);\n\n      s.status = BUSY_STATE;\n      putShortMSB(s, header);\n\n      /* Save the adler32 of the preset dictionary: */\n      if (s.strstart !== 0) {\n        putShortMSB(s, strm.adler >>> 16);\n        putShortMSB(s, strm.adler & 0xffff);\n      }\n      strm.adler = 1; // adler32(0L, Z_NULL, 0);\n    }\n  }\n\n//#ifdef GZIP\n  if (s.status === EXTRA_STATE) {\n    if (s.gzhead.extra/* != Z_NULL*/) {\n      beg = s.pending;  /* start of bytes to update crc */\n\n      while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {\n        if (s.pending === s.pending_buf_size) {\n          if (s.gzhead.hcrc && s.pending > beg) {\n            strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n          }\n          flush_pending(strm);\n          beg = s.pending;\n          if (s.pending === s.pending_buf_size) {\n            break;\n          }\n        }\n        put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);\n        s.gzindex++;\n      }\n      if (s.gzhead.hcrc && s.pending > beg) {\n        strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n      }\n      if (s.gzindex === s.gzhead.extra.length) {\n        s.gzindex = 0;\n        s.status = NAME_STATE;\n      }\n    }\n    else {\n      s.status = NAME_STATE;\n    }\n  }\n  if (s.status === NAME_STATE) {\n    if (s.gzhead.name/* != Z_NULL*/) {\n      beg = s.pending;  /* start of bytes to update crc */\n      //int val;\n\n      do {\n        if (s.pending === s.pending_buf_size) {\n          if (s.gzhead.hcrc && s.pending > beg) {\n            strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n          }\n          flush_pending(strm);\n          beg = s.pending;\n          if (s.pending === s.pending_buf_size) {\n            val = 1;\n            break;\n          }\n        }\n        // JS specific: little magic to add zero terminator to end of string\n        if (s.gzindex < s.gzhead.name.length) {\n          val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n        } else {\n          val = 0;\n        }\n        put_byte(s, val);\n      } while (val !== 0);\n\n      if (s.gzhead.hcrc && s.pending > beg) {\n        strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n      }\n      if (val === 0) {\n        s.gzindex = 0;\n        s.status = COMMENT_STATE;\n      }\n    }\n    else {\n      s.status = COMMENT_STATE;\n    }\n  }\n  if (s.status === COMMENT_STATE) {\n    if (s.gzhead.comment/* != Z_NULL*/) {\n      beg = s.pending;  /* start of bytes to update crc */\n      //int val;\n\n      do {\n        if (s.pending === s.pending_buf_size) {\n          if (s.gzhead.hcrc && s.pending > beg) {\n            strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n          }\n          flush_pending(strm);\n          beg = s.pending;\n          if (s.pending === s.pending_buf_size) {\n            val = 1;\n            break;\n          }\n        }\n        // JS specific: little magic to add zero terminator to end of string\n        if (s.gzindex < s.gzhead.comment.length) {\n          val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n        } else {\n          val = 0;\n        }\n        put_byte(s, val);\n      } while (val !== 0);\n\n      if (s.gzhead.hcrc && s.pending > beg) {\n        strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n      }\n      if (val === 0) {\n        s.status = HCRC_STATE;\n      }\n    }\n    else {\n      s.status = HCRC_STATE;\n    }\n  }\n  if (s.status === HCRC_STATE) {\n    if (s.gzhead.hcrc) {\n      if (s.pending + 2 > s.pending_buf_size) {\n        flush_pending(strm);\n      }\n      if (s.pending + 2 <= s.pending_buf_size) {\n        put_byte(s, strm.adler & 0xff);\n        put_byte(s, (strm.adler >> 8) & 0xff);\n        strm.adler = 0; //crc32(0L, Z_NULL, 0);\n        s.status = BUSY_STATE;\n      }\n    }\n    else {\n      s.status = BUSY_STATE;\n    }\n  }\n//#endif\n\n  /* Flush as much pending output as possible */\n  if (s.pending !== 0) {\n    flush_pending(strm);\n    if (strm.avail_out === 0) {\n      /* Since avail_out is 0, deflate will be called again with\n       * more output space, but possibly with both pending and\n       * avail_in equal to zero. There won't be anything to do,\n       * but this is not an error situation so make sure we\n       * return OK instead of BUF_ERROR at next call of deflate:\n       */\n      s.last_flush = -1;\n      return Z_OK;\n    }\n\n    /* Make sure there is something to do and avoid duplicate consecutive\n     * flushes. For repeated and useless calls with Z_FINISH, we keep\n     * returning Z_STREAM_END instead of Z_BUF_ERROR.\n     */\n  } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n    flush !== Z_FINISH) {\n    return err(strm, Z_BUF_ERROR);\n  }\n\n  /* User must not provide more input after the first FINISH: */\n  if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n    return err(strm, Z_BUF_ERROR);\n  }\n\n  /* Start a new block or continue the current one.\n   */\n  if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n    (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {\n    var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :\n      (s.strategy === Z_RLE ? deflate_rle(s, flush) :\n        configuration_table[s.level].func(s, flush));\n\n    if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n      s.status = FINISH_STATE;\n    }\n    if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n      if (strm.avail_out === 0) {\n        s.last_flush = -1;\n        /* avoid BUF_ERROR next call, see above */\n      }\n      return Z_OK;\n      /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n       * of deflate should use the same flush parameter to make sure\n       * that the flush is complete. So we don't have to output an\n       * empty block here, this will be done at next call. This also\n       * ensures that for a very small output buffer, we emit at most\n       * one empty block.\n       */\n    }\n    if (bstate === BS_BLOCK_DONE) {\n      if (flush === Z_PARTIAL_FLUSH) {\n        trees._tr_align(s);\n      }\n      else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */\n\n        trees._tr_stored_block(s, 0, 0, false);\n        /* For a full flush, this empty block will be recognized\n         * as a special marker by inflate_sync().\n         */\n        if (flush === Z_FULL_FLUSH) {\n          /*** CLEAR_HASH(s); ***/             /* forget history */\n          zero(s.head); // Fill with NIL (= 0);\n\n          if (s.lookahead === 0) {\n            s.strstart = 0;\n            s.block_start = 0;\n            s.insert = 0;\n          }\n        }\n      }\n      flush_pending(strm);\n      if (strm.avail_out === 0) {\n        s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n        return Z_OK;\n      }\n    }\n  }\n  //Assert(strm->avail_out > 0, \"bug2\");\n  //if (strm.avail_out <= 0) { throw new Error(\"bug2\");}\n\n  if (flush !== Z_FINISH) { return Z_OK; }\n  if (s.wrap <= 0) { return Z_STREAM_END; }\n\n  /* Write the trailer */\n  if (s.wrap === 2) {\n    put_byte(s, strm.adler & 0xff);\n    put_byte(s, (strm.adler >> 8) & 0xff);\n    put_byte(s, (strm.adler >> 16) & 0xff);\n    put_byte(s, (strm.adler >> 24) & 0xff);\n    put_byte(s, strm.total_in & 0xff);\n    put_byte(s, (strm.total_in >> 8) & 0xff);\n    put_byte(s, (strm.total_in >> 16) & 0xff);\n    put_byte(s, (strm.total_in >> 24) & 0xff);\n  }\n  else\n  {\n    putShortMSB(s, strm.adler >>> 16);\n    putShortMSB(s, strm.adler & 0xffff);\n  }\n\n  flush_pending(strm);\n  /* If avail_out is zero, the application will call deflate again\n   * to flush the rest.\n   */\n  if (s.wrap > 0) { s.wrap = -s.wrap; }\n  /* write the trailer only once! */\n  return s.pending !== 0 ? Z_OK : Z_STREAM_END;\n}\n\nfunction deflateEnd(strm) {\n  var status;\n\n  if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n    return Z_STREAM_ERROR;\n  }\n\n  status = strm.state.status;\n  if (status !== INIT_STATE &&\n    status !== EXTRA_STATE &&\n    status !== NAME_STATE &&\n    status !== COMMENT_STATE &&\n    status !== HCRC_STATE &&\n    status !== BUSY_STATE &&\n    status !== FINISH_STATE\n  ) {\n    return err(strm, Z_STREAM_ERROR);\n  }\n\n  strm.state = null;\n\n  return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;\n}\n\n\n/* =========================================================================\n * Initializes the compression dictionary from the given byte\n * sequence without producing any compressed output.\n */\nfunction deflateSetDictionary(strm, dictionary) {\n  var dictLength = dictionary.length;\n\n  var s;\n  var str, n;\n  var wrap;\n  var avail;\n  var next;\n  var input;\n  var tmpDict;\n\n  if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n    return Z_STREAM_ERROR;\n  }\n\n  s = strm.state;\n  wrap = s.wrap;\n\n  if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {\n    return Z_STREAM_ERROR;\n  }\n\n  /* when using zlib wrappers, compute Adler-32 for provided dictionary */\n  if (wrap === 1) {\n    /* adler32(strm->adler, dictionary, dictLength); */\n    strm.adler = adler32(strm.adler, dictionary, dictLength, 0);\n  }\n\n  s.wrap = 0;   /* avoid computing Adler-32 in read_buf */\n\n  /* if dictionary would fill window, just replace the history */\n  if (dictLength >= s.w_size) {\n    if (wrap === 0) {            /* already empty otherwise */\n      /*** CLEAR_HASH(s); ***/\n      zero(s.head); // Fill with NIL (= 0);\n      s.strstart = 0;\n      s.block_start = 0;\n      s.insert = 0;\n    }\n    /* use the tail */\n    // dictionary = dictionary.slice(dictLength - s.w_size);\n    tmpDict = new utils.Buf8(s.w_size);\n    utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0);\n    dictionary = tmpDict;\n    dictLength = s.w_size;\n  }\n  /* insert dictionary into window and hash */\n  avail = strm.avail_in;\n  next = strm.next_in;\n  input = strm.input;\n  strm.avail_in = dictLength;\n  strm.next_in = 0;\n  strm.input = dictionary;\n  fill_window(s);\n  while (s.lookahead >= MIN_MATCH) {\n    str = s.strstart;\n    n = s.lookahead - (MIN_MATCH - 1);\n    do {\n      /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n      s.prev[str & s.w_mask] = s.head[s.ins_h];\n\n      s.head[s.ins_h] = str;\n      str++;\n    } while (--n);\n    s.strstart = str;\n    s.lookahead = MIN_MATCH - 1;\n    fill_window(s);\n  }\n  s.strstart += s.lookahead;\n  s.block_start = s.strstart;\n  s.insert = s.lookahead;\n  s.lookahead = 0;\n  s.match_length = s.prev_length = MIN_MATCH - 1;\n  s.match_available = 0;\n  strm.next_in = next;\n  strm.input = input;\n  strm.avail_in = avail;\n  s.wrap = wrap;\n  return Z_OK;\n}\n\n\nexports.deflateInit = deflateInit;\nexports.deflateInit2 = deflateInit2;\nexports.deflateReset = deflateReset;\nexports.deflateResetKeep = deflateResetKeep;\nexports.deflateSetHeader = deflateSetHeader;\nexports.deflate = deflate;\nexports.deflateEnd = deflateEnd;\nexports.deflateSetDictionary = deflateSetDictionary;\nexports.deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nexports.deflateBound = deflateBound;\nexports.deflateCopy = deflateCopy;\nexports.deflateParams = deflateParams;\nexports.deflatePending = deflatePending;\nexports.deflatePrime = deflatePrime;\nexports.deflateTune = deflateTune;\n*/\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction GZheader() {\n  /* true if compressed data believed to be text */\n  this.text       = 0;\n  /* modification time */\n  this.time       = 0;\n  /* extra flags (not used when writing a gzip file) */\n  this.xflags     = 0;\n  /* operating system */\n  this.os         = 0;\n  /* pointer to extra field or Z_NULL if none */\n  this.extra      = null;\n  /* extra field length (valid if extra != Z_NULL) */\n  this.extra_len  = 0; // Actually, we don't need it in JS,\n                       // but leave for few code modifications\n\n  //\n  // Setup limits is not necessary because in js we should not preallocate memory\n  // for inflate use constant limit in 65536 bytes\n  //\n\n  /* space at extra (only when reading header) */\n  // this.extra_max  = 0;\n  /* pointer to zero-terminated file name or Z_NULL */\n  this.name       = '';\n  /* space at name (only when reading header) */\n  // this.name_max   = 0;\n  /* pointer to zero-terminated comment or Z_NULL */\n  this.comment    = '';\n  /* space at comment (only when reading header) */\n  // this.comm_max   = 0;\n  /* true if there was or will be a header crc */\n  this.hcrc       = 0;\n  /* true when done reading gzip header (not used when writing a gzip file) */\n  this.done       = false;\n}\n\nmodule.exports = GZheader;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// See state defs from inflate.js\nvar BAD = 30;       /* got a data error -- remain here until reset */\nvar TYPE = 12;      /* i: waiting for type bits, including last-flag bit */\n\n/*\n   Decode literal, length, and distance codes and write out the resulting\n   literal and match bytes until either not enough input or output is\n   available, an end-of-block is encountered, or a data error is encountered.\n   When large enough input and output buffers are supplied to inflate(), for\n   example, a 16K input buffer and a 64K output buffer, more than 95% of the\n   inflate execution time is spent in this routine.\n\n   Entry assumptions:\n\n        state.mode === LEN\n        strm.avail_in >= 6\n        strm.avail_out >= 258\n        start >= strm.avail_out\n        state.bits < 8\n\n   On return, state.mode is one of:\n\n        LEN -- ran out of enough output space or enough available input\n        TYPE -- reached end of block code, inflate() to interpret next block\n        BAD -- error in block data\n\n   Notes:\n\n    - The maximum input bits used by a length/distance pair is 15 bits for the\n      length code, 5 bits for the length extra, 15 bits for the distance code,\n      and 13 bits for the distance extra.  This totals 48 bits, or six bytes.\n      Therefore if strm.avail_in >= 6, then there is enough input to avoid\n      checking for available input while decoding.\n\n    - The maximum bytes that a single length/distance pair can output is 258\n      bytes, which is the maximum length that can be coded.  inflate_fast()\n      requires strm.avail_out >= 258 for each loop to avoid checking for\n      output space.\n */\nmodule.exports = function inflate_fast(strm, start) {\n  var state;\n  var _in;                    /* local strm.input */\n  var last;                   /* have enough input while in < last */\n  var _out;                   /* local strm.output */\n  var beg;                    /* inflate()'s initial strm.output */\n  var end;                    /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n  var dmax;                   /* maximum distance from zlib header */\n//#endif\n  var wsize;                  /* window size or zero if not using window */\n  var whave;                  /* valid bytes in the window */\n  var wnext;                  /* window write index */\n  // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n  var s_window;               /* allocated sliding window, if wsize != 0 */\n  var hold;                   /* local strm.hold */\n  var bits;                   /* local strm.bits */\n  var lcode;                  /* local strm.lencode */\n  var dcode;                  /* local strm.distcode */\n  var lmask;                  /* mask for first level of length codes */\n  var dmask;                  /* mask for first level of distance codes */\n  var here;                   /* retrieved table entry */\n  var op;                     /* code bits, operation, extra bits, or */\n                              /*  window position, window bytes to copy */\n  var len;                    /* match length, unused bytes */\n  var dist;                   /* match distance */\n  var from;                   /* where to copy match from */\n  var from_source;\n\n\n  var input, output; // JS specific, because we have no pointers\n\n  /* copy state to local variables */\n  state = strm.state;\n  //here = state.here;\n  _in = strm.next_in;\n  input = strm.input;\n  last = _in + (strm.avail_in - 5);\n  _out = strm.next_out;\n  output = strm.output;\n  beg = _out - (start - strm.avail_out);\n  end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n  dmax = state.dmax;\n//#endif\n  wsize = state.wsize;\n  whave = state.whave;\n  wnext = state.wnext;\n  s_window = state.window;\n  hold = state.hold;\n  bits = state.bits;\n  lcode = state.lencode;\n  dcode = state.distcode;\n  lmask = (1 << state.lenbits) - 1;\n  dmask = (1 << state.distbits) - 1;\n\n\n  /* decode literals and length/distances until end-of-block or not enough\n     input data or output space */\n\n  top:\n  do {\n    if (bits < 15) {\n      hold += input[_in++] << bits;\n      bits += 8;\n      hold += input[_in++] << bits;\n      bits += 8;\n    }\n\n    here = lcode[hold & lmask];\n\n    dolen:\n    for (;;) { // Goto emulation\n      op = here >>> 24/*here.bits*/;\n      hold >>>= op;\n      bits -= op;\n      op = (here >>> 16) & 0xff/*here.op*/;\n      if (op === 0) {                          /* literal */\n        //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n        //        \"inflate:         literal '%c'\\n\" :\n        //        \"inflate:         literal 0x%02x\\n\", here.val));\n        output[_out++] = here & 0xffff/*here.val*/;\n      }\n      else if (op & 16) {                     /* length base */\n        len = here & 0xffff/*here.val*/;\n        op &= 15;                           /* number of extra bits */\n        if (op) {\n          if (bits < op) {\n            hold += input[_in++] << bits;\n            bits += 8;\n          }\n          len += hold & ((1 << op) - 1);\n          hold >>>= op;\n          bits -= op;\n        }\n        //Tracevv((stderr, \"inflate:         length %u\\n\", len));\n        if (bits < 15) {\n          hold += input[_in++] << bits;\n          bits += 8;\n          hold += input[_in++] << bits;\n          bits += 8;\n        }\n        here = dcode[hold & dmask];\n\n        dodist:\n        for (;;) { // goto emulation\n          op = here >>> 24/*here.bits*/;\n          hold >>>= op;\n          bits -= op;\n          op = (here >>> 16) & 0xff/*here.op*/;\n\n          if (op & 16) {                      /* distance base */\n            dist = here & 0xffff/*here.val*/;\n            op &= 15;                       /* number of extra bits */\n            if (bits < op) {\n              hold += input[_in++] << bits;\n              bits += 8;\n              if (bits < op) {\n                hold += input[_in++] << bits;\n                bits += 8;\n              }\n            }\n            dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n            if (dist > dmax) {\n              strm.msg = 'invalid distance too far back';\n              state.mode = BAD;\n              break top;\n            }\n//#endif\n            hold >>>= op;\n            bits -= op;\n            //Tracevv((stderr, \"inflate:         distance %u\\n\", dist));\n            op = _out - beg;                /* max distance in output */\n            if (dist > op) {                /* see if copy from window */\n              op = dist - op;               /* distance back in window */\n              if (op > whave) {\n                if (state.sane) {\n                  strm.msg = 'invalid distance too far back';\n                  state.mode = BAD;\n                  break top;\n                }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n//                if (len <= op - whave) {\n//                  do {\n//                    output[_out++] = 0;\n//                  } while (--len);\n//                  continue top;\n//                }\n//                len -= op - whave;\n//                do {\n//                  output[_out++] = 0;\n//                } while (--op > whave);\n//                if (op === 0) {\n//                  from = _out - dist;\n//                  do {\n//                    output[_out++] = output[from++];\n//                  } while (--len);\n//                  continue top;\n//                }\n//#endif\n              }\n              from = 0; // window index\n              from_source = s_window;\n              if (wnext === 0) {           /* very common case */\n                from += wsize - op;\n                if (op < len) {         /* some from window */\n                  len -= op;\n                  do {\n                    output[_out++] = s_window[from++];\n                  } while (--op);\n                  from = _out - dist;  /* rest from output */\n                  from_source = output;\n                }\n              }\n              else if (wnext < op) {      /* wrap around window */\n                from += wsize + wnext - op;\n                op -= wnext;\n                if (op < len) {         /* some from end of window */\n                  len -= op;\n                  do {\n                    output[_out++] = s_window[from++];\n                  } while (--op);\n                  from = 0;\n                  if (wnext < len) {  /* some from start of window */\n                    op = wnext;\n                    len -= op;\n                    do {\n                      output[_out++] = s_window[from++];\n                    } while (--op);\n                    from = _out - dist;      /* rest from output */\n                    from_source = output;\n                  }\n                }\n              }\n              else {                      /* contiguous in window */\n                from += wnext - op;\n                if (op < len) {         /* some from window */\n                  len -= op;\n                  do {\n                    output[_out++] = s_window[from++];\n                  } while (--op);\n                  from = _out - dist;  /* rest from output */\n                  from_source = output;\n                }\n              }\n              while (len > 2) {\n                output[_out++] = from_source[from++];\n                output[_out++] = from_source[from++];\n                output[_out++] = from_source[from++];\n                len -= 3;\n              }\n              if (len) {\n                output[_out++] = from_source[from++];\n                if (len > 1) {\n                  output[_out++] = from_source[from++];\n                }\n              }\n            }\n            else {\n              from = _out - dist;          /* copy direct from output */\n              do {                        /* minimum length is three */\n                output[_out++] = output[from++];\n                output[_out++] = output[from++];\n                output[_out++] = output[from++];\n                len -= 3;\n              } while (len > 2);\n              if (len) {\n                output[_out++] = output[from++];\n                if (len > 1) {\n                  output[_out++] = output[from++];\n                }\n              }\n            }\n          }\n          else if ((op & 64) === 0) {          /* 2nd level distance code */\n            here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n            continue dodist;\n          }\n          else {\n            strm.msg = 'invalid distance code';\n            state.mode = BAD;\n            break top;\n          }\n\n          break; // need to emulate goto via \"continue\"\n        }\n      }\n      else if ((op & 64) === 0) {              /* 2nd level length code */\n        here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n        continue dolen;\n      }\n      else if (op & 32) {                     /* end-of-block */\n        //Tracevv((stderr, \"inflate:         end of block\\n\"));\n        state.mode = TYPE;\n        break top;\n      }\n      else {\n        strm.msg = 'invalid literal/length code';\n        state.mode = BAD;\n        break top;\n      }\n\n      break; // need to emulate goto via \"continue\"\n    }\n  } while (_in < last && _out < end);\n\n  /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n  len = bits >> 3;\n  _in -= len;\n  bits -= len << 3;\n  hold &= (1 << bits) - 1;\n\n  /* update state and return */\n  strm.next_in = _in;\n  strm.next_out = _out;\n  strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n  strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n  state.hold = hold;\n  state.bits = bits;\n  return;\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils         = require('../utils/common');\nvar adler32       = require('./adler32');\nvar crc32         = require('./crc32');\nvar inflate_fast  = require('./inffast');\nvar inflate_table = require('./inftrees');\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\n//var Z_NO_FLUSH      = 0;\n//var Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH    = 2;\n//var Z_FULL_FLUSH    = 3;\nvar Z_FINISH        = 4;\nvar Z_BLOCK         = 5;\nvar Z_TREES         = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK            = 0;\nvar Z_STREAM_END    = 1;\nvar Z_NEED_DICT     = 2;\n//var Z_ERRNO         = -1;\nvar Z_STREAM_ERROR  = -2;\nvar Z_DATA_ERROR    = -3;\nvar Z_MEM_ERROR     = -4;\nvar Z_BUF_ERROR     = -5;\n//var Z_VERSION_ERROR = -6;\n\n/* The deflate compression method */\nvar Z_DEFLATED  = 8;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nvar    HEAD = 1;       /* i: waiting for magic header */\nvar    FLAGS = 2;      /* i: waiting for method and flags (gzip) */\nvar    TIME = 3;       /* i: waiting for modification time (gzip) */\nvar    OS = 4;         /* i: waiting for extra flags and operating system (gzip) */\nvar    EXLEN = 5;      /* i: waiting for extra length (gzip) */\nvar    EXTRA = 6;      /* i: waiting for extra bytes (gzip) */\nvar    NAME = 7;       /* i: waiting for end of file name (gzip) */\nvar    COMMENT = 8;    /* i: waiting for end of comment (gzip) */\nvar    HCRC = 9;       /* i: waiting for header crc (gzip) */\nvar    DICTID = 10;    /* i: waiting for dictionary check value */\nvar    DICT = 11;      /* waiting for inflateSetDictionary() call */\nvar        TYPE = 12;      /* i: waiting for type bits, including last-flag bit */\nvar        TYPEDO = 13;    /* i: same, but skip check to exit inflate on new block */\nvar        STORED = 14;    /* i: waiting for stored size (length and complement) */\nvar        COPY_ = 15;     /* i/o: same as COPY below, but only first time in */\nvar        COPY = 16;      /* i/o: waiting for input or output to copy stored block */\nvar        TABLE = 17;     /* i: waiting for dynamic block table lengths */\nvar        LENLENS = 18;   /* i: waiting for code length code lengths */\nvar        CODELENS = 19;  /* i: waiting for length/lit and distance code lengths */\nvar            LEN_ = 20;      /* i: same as LEN below, but only first time in */\nvar            LEN = 21;       /* i: waiting for length/lit/eob code */\nvar            LENEXT = 22;    /* i: waiting for length extra bits */\nvar            DIST = 23;      /* i: waiting for distance code */\nvar            DISTEXT = 24;   /* i: waiting for distance extra bits */\nvar            MATCH = 25;     /* o: waiting for output space to copy string */\nvar            LIT = 26;       /* o: waiting for output space to write literal */\nvar    CHECK = 27;     /* i: waiting for 32-bit check value */\nvar    LENGTH = 28;    /* i: waiting for 32-bit length (gzip) */\nvar    DONE = 29;      /* finished check, done -- remain here until reset */\nvar    BAD = 30;       /* got a data error -- remain here until reset */\nvar    MEM = 31;       /* got an inflate() memory error -- remain here until reset */\nvar    SYNC = 32;      /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH =  (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_WBITS = MAX_WBITS;\n\n\nfunction zswap32(q) {\n  return  (((q >>> 24) & 0xff) +\n          ((q >>> 8) & 0xff00) +\n          ((q & 0xff00) << 8) +\n          ((q & 0xff) << 24));\n}\n\n\nfunction InflateState() {\n  this.mode = 0;             /* current inflate mode */\n  this.last = false;          /* true if processing last block */\n  this.wrap = 0;              /* bit 0 true for zlib, bit 1 true for gzip */\n  this.havedict = false;      /* true if dictionary provided */\n  this.flags = 0;             /* gzip header method and flags (0 if zlib) */\n  this.dmax = 0;              /* zlib header max distance (INFLATE_STRICT) */\n  this.check = 0;             /* protected copy of check value */\n  this.total = 0;             /* protected copy of output count */\n  // TODO: may be {}\n  this.head = null;           /* where to save gzip header information */\n\n  /* sliding window */\n  this.wbits = 0;             /* log base 2 of requested window size */\n  this.wsize = 0;             /* window size or zero if not using window */\n  this.whave = 0;             /* valid bytes in the window */\n  this.wnext = 0;             /* window write index */\n  this.window = null;         /* allocated sliding window, if needed */\n\n  /* bit accumulator */\n  this.hold = 0;              /* input bit accumulator */\n  this.bits = 0;              /* number of bits in \"in\" */\n\n  /* for string and stored block copying */\n  this.length = 0;            /* literal or length of data to copy */\n  this.offset = 0;            /* distance back to copy string from */\n\n  /* for table and code decoding */\n  this.extra = 0;             /* extra bits needed */\n\n  /* fixed and dynamic code tables */\n  this.lencode = null;          /* starting table for length/literal codes */\n  this.distcode = null;         /* starting table for distance codes */\n  this.lenbits = 0;           /* index bits for lencode */\n  this.distbits = 0;          /* index bits for distcode */\n\n  /* dynamic table building */\n  this.ncode = 0;             /* number of code length code lengths */\n  this.nlen = 0;              /* number of length code lengths */\n  this.ndist = 0;             /* number of distance code lengths */\n  this.have = 0;              /* number of code lengths in lens[] */\n  this.next = null;              /* next available space in codes[] */\n\n  this.lens = new utils.Buf16(320); /* temporary storage for code lengths */\n  this.work = new utils.Buf16(288); /* work area for code table building */\n\n  /*\n   because we don't have pointers in js, we use lencode and distcode directly\n   as buffers so we don't need codes\n  */\n  //this.codes = new utils.Buf32(ENOUGH);       /* space for code tables */\n  this.lendyn = null;              /* dynamic table for length/literal codes (JS specific) */\n  this.distdyn = null;             /* dynamic table for distance codes (JS specific) */\n  this.sane = 0;                   /* if false, allow invalid distance too far */\n  this.back = 0;                   /* bits back of last unprocessed length/lit */\n  this.was = 0;                    /* initial length of match */\n}\n\nfunction inflateResetKeep(strm) {\n  var state;\n\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  state = strm.state;\n  strm.total_in = strm.total_out = state.total = 0;\n  strm.msg = ''; /*Z_NULL*/\n  if (state.wrap) {       /* to support ill-conceived Java test suite */\n    strm.adler = state.wrap & 1;\n  }\n  state.mode = HEAD;\n  state.last = 0;\n  state.havedict = 0;\n  state.dmax = 32768;\n  state.head = null/*Z_NULL*/;\n  state.hold = 0;\n  state.bits = 0;\n  //state.lencode = state.distcode = state.next = state.codes;\n  state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);\n  state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);\n\n  state.sane = 1;\n  state.back = -1;\n  //Tracev((stderr, \"inflate: reset\\n\"));\n  return Z_OK;\n}\n\nfunction inflateReset(strm) {\n  var state;\n\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  state = strm.state;\n  state.wsize = 0;\n  state.whave = 0;\n  state.wnext = 0;\n  return inflateResetKeep(strm);\n\n}\n\nfunction inflateReset2(strm, windowBits) {\n  var wrap;\n  var state;\n\n  /* get the state */\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  state = strm.state;\n\n  /* extract wrap request from windowBits parameter */\n  if (windowBits < 0) {\n    wrap = 0;\n    windowBits = -windowBits;\n  }\n  else {\n    wrap = (windowBits >> 4) + 1;\n    if (windowBits < 48) {\n      windowBits &= 15;\n    }\n  }\n\n  /* set number of window bits, free window if different */\n  if (windowBits && (windowBits < 8 || windowBits > 15)) {\n    return Z_STREAM_ERROR;\n  }\n  if (state.window !== null && state.wbits !== windowBits) {\n    state.window = null;\n  }\n\n  /* update state and reset the rest of it */\n  state.wrap = wrap;\n  state.wbits = windowBits;\n  return inflateReset(strm);\n}\n\nfunction inflateInit2(strm, windowBits) {\n  var ret;\n  var state;\n\n  if (!strm) { return Z_STREAM_ERROR; }\n  //strm.msg = Z_NULL;                 /* in case we return an error */\n\n  state = new InflateState();\n\n  //if (state === Z_NULL) return Z_MEM_ERROR;\n  //Tracev((stderr, \"inflate: allocated\\n\"));\n  strm.state = state;\n  state.window = null/*Z_NULL*/;\n  ret = inflateReset2(strm, windowBits);\n  if (ret !== Z_OK) {\n    strm.state = null/*Z_NULL*/;\n  }\n  return ret;\n}\n\nfunction inflateInit(strm) {\n  return inflateInit2(strm, DEF_WBITS);\n}\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding.  Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter.  This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time.  However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nvar virgin = true;\n\nvar lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\nfunction fixedtables(state) {\n  /* build fixed huffman tables if first call (may not be thread safe) */\n  if (virgin) {\n    var sym;\n\n    lenfix = new utils.Buf32(512);\n    distfix = new utils.Buf32(32);\n\n    /* literal/length table */\n    sym = 0;\n    while (sym < 144) { state.lens[sym++] = 8; }\n    while (sym < 256) { state.lens[sym++] = 9; }\n    while (sym < 280) { state.lens[sym++] = 7; }\n    while (sym < 288) { state.lens[sym++] = 8; }\n\n    inflate_table(LENS,  state.lens, 0, 288, lenfix,   0, state.work, { bits: 9 });\n\n    /* distance table */\n    sym = 0;\n    while (sym < 32) { state.lens[sym++] = 5; }\n\n    inflate_table(DISTS, state.lens, 0, 32,   distfix, 0, state.work, { bits: 5 });\n\n    /* do this just once */\n    virgin = false;\n  }\n\n  state.lencode = lenfix;\n  state.lenbits = 9;\n  state.distcode = distfix;\n  state.distbits = 5;\n}\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning.  If window does not exist yet, create it.  This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nfunction updatewindow(strm, src, end, copy) {\n  var dist;\n  var state = strm.state;\n\n  /* if it hasn't been done already, allocate space for the window */\n  if (state.window === null) {\n    state.wsize = 1 << state.wbits;\n    state.wnext = 0;\n    state.whave = 0;\n\n    state.window = new utils.Buf8(state.wsize);\n  }\n\n  /* copy state->wsize or less output bytes into the circular window */\n  if (copy >= state.wsize) {\n    utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n    state.wnext = 0;\n    state.whave = state.wsize;\n  }\n  else {\n    dist = state.wsize - state.wnext;\n    if (dist > copy) {\n      dist = copy;\n    }\n    //zmemcpy(state->window + state->wnext, end - copy, dist);\n    utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n    copy -= dist;\n    if (copy) {\n      //zmemcpy(state->window, end - copy, copy);\n      utils.arraySet(state.window, src, end - copy, copy, 0);\n      state.wnext = copy;\n      state.whave = state.wsize;\n    }\n    else {\n      state.wnext += dist;\n      if (state.wnext === state.wsize) { state.wnext = 0; }\n      if (state.whave < state.wsize) { state.whave += dist; }\n    }\n  }\n  return 0;\n}\n\nfunction inflate(strm, flush) {\n  var state;\n  var input, output;          // input/output buffers\n  var next;                   /* next input INDEX */\n  var put;                    /* next output INDEX */\n  var have, left;             /* available input and output */\n  var hold;                   /* bit buffer */\n  var bits;                   /* bits in bit buffer */\n  var _in, _out;              /* save starting available input and output */\n  var copy;                   /* number of stored or match bytes to copy */\n  var from;                   /* where to copy match bytes from */\n  var from_source;\n  var here = 0;               /* current decoding table entry */\n  var here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n  //var last;                   /* parent table entry */\n  var last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n  var len;                    /* length to copy for repeats, bits to drop */\n  var ret;                    /* return code */\n  var hbuf = new utils.Buf8(4);    /* buffer for gzip header crc calculation */\n  var opts;\n\n  var n; // temporary var for NEED_BITS\n\n  var order = /* permutation of code lengths */\n    [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];\n\n\n  if (!strm || !strm.state || !strm.output ||\n      (!strm.input && strm.avail_in !== 0)) {\n    return Z_STREAM_ERROR;\n  }\n\n  state = strm.state;\n  if (state.mode === TYPE) { state.mode = TYPEDO; }    /* skip check */\n\n\n  //--- LOAD() ---\n  put = strm.next_out;\n  output = strm.output;\n  left = strm.avail_out;\n  next = strm.next_in;\n  input = strm.input;\n  have = strm.avail_in;\n  hold = state.hold;\n  bits = state.bits;\n  //---\n\n  _in = have;\n  _out = left;\n  ret = Z_OK;\n\n  inf_leave: // goto emulation\n  for (;;) {\n    switch (state.mode) {\n      case HEAD:\n        if (state.wrap === 0) {\n          state.mode = TYPEDO;\n          break;\n        }\n        //=== NEEDBITS(16);\n        while (bits < 16) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        if ((state.wrap & 2) && hold === 0x8b1f) {  /* gzip header */\n          state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n          //=== CRC2(state.check, hold);\n          hbuf[0] = hold & 0xff;\n          hbuf[1] = (hold >>> 8) & 0xff;\n          state.check = crc32(state.check, hbuf, 2, 0);\n          //===//\n\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n          state.mode = FLAGS;\n          break;\n        }\n        state.flags = 0;           /* expect zlib header */\n        if (state.head) {\n          state.head.done = false;\n        }\n        if (!(state.wrap & 1) ||   /* check if zlib header allowed */\n          (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n          strm.msg = 'incorrect header check';\n          state.mode = BAD;\n          break;\n        }\n        if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n          strm.msg = 'unknown compression method';\n          state.mode = BAD;\n          break;\n        }\n        //--- DROPBITS(4) ---//\n        hold >>>= 4;\n        bits -= 4;\n        //---//\n        len = (hold & 0x0f)/*BITS(4)*/ + 8;\n        if (state.wbits === 0) {\n          state.wbits = len;\n        }\n        else if (len > state.wbits) {\n          strm.msg = 'invalid window size';\n          state.mode = BAD;\n          break;\n        }\n        state.dmax = 1 << len;\n        //Tracev((stderr, \"inflate:   zlib header ok\\n\"));\n        strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n        state.mode = hold & 0x200 ? DICTID : TYPE;\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        break;\n      case FLAGS:\n        //=== NEEDBITS(16); */\n        while (bits < 16) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        state.flags = hold;\n        if ((state.flags & 0xff) !== Z_DEFLATED) {\n          strm.msg = 'unknown compression method';\n          state.mode = BAD;\n          break;\n        }\n        if (state.flags & 0xe000) {\n          strm.msg = 'unknown header flags set';\n          state.mode = BAD;\n          break;\n        }\n        if (state.head) {\n          state.head.text = ((hold >> 8) & 1);\n        }\n        if (state.flags & 0x0200) {\n          //=== CRC2(state.check, hold);\n          hbuf[0] = hold & 0xff;\n          hbuf[1] = (hold >>> 8) & 0xff;\n          state.check = crc32(state.check, hbuf, 2, 0);\n          //===//\n        }\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = TIME;\n        /* falls through */\n      case TIME:\n        //=== NEEDBITS(32); */\n        while (bits < 32) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        if (state.head) {\n          state.head.time = hold;\n        }\n        if (state.flags & 0x0200) {\n          //=== CRC4(state.check, hold)\n          hbuf[0] = hold & 0xff;\n          hbuf[1] = (hold >>> 8) & 0xff;\n          hbuf[2] = (hold >>> 16) & 0xff;\n          hbuf[3] = (hold >>> 24) & 0xff;\n          state.check = crc32(state.check, hbuf, 4, 0);\n          //===\n        }\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = OS;\n        /* falls through */\n      case OS:\n        //=== NEEDBITS(16); */\n        while (bits < 16) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        if (state.head) {\n          state.head.xflags = (hold & 0xff);\n          state.head.os = (hold >> 8);\n        }\n        if (state.flags & 0x0200) {\n          //=== CRC2(state.check, hold);\n          hbuf[0] = hold & 0xff;\n          hbuf[1] = (hold >>> 8) & 0xff;\n          state.check = crc32(state.check, hbuf, 2, 0);\n          //===//\n        }\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = EXLEN;\n        /* falls through */\n      case EXLEN:\n        if (state.flags & 0x0400) {\n          //=== NEEDBITS(16); */\n          while (bits < 16) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          state.length = hold;\n          if (state.head) {\n            state.head.extra_len = hold;\n          }\n          if (state.flags & 0x0200) {\n            //=== CRC2(state.check, hold);\n            hbuf[0] = hold & 0xff;\n            hbuf[1] = (hold >>> 8) & 0xff;\n            state.check = crc32(state.check, hbuf, 2, 0);\n            //===//\n          }\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n        }\n        else if (state.head) {\n          state.head.extra = null/*Z_NULL*/;\n        }\n        state.mode = EXTRA;\n        /* falls through */\n      case EXTRA:\n        if (state.flags & 0x0400) {\n          copy = state.length;\n          if (copy > have) { copy = have; }\n          if (copy) {\n            if (state.head) {\n              len = state.head.extra_len - state.length;\n              if (!state.head.extra) {\n                // Use untyped array for more convenient processing later\n                state.head.extra = new Array(state.head.extra_len);\n              }\n              utils.arraySet(\n                state.head.extra,\n                input,\n                next,\n                // extra field is limited to 65536 bytes\n                // - no need for additional size check\n                copy,\n                /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n                len\n              );\n              //zmemcpy(state.head.extra + len, next,\n              //        len + copy > state.head.extra_max ?\n              //        state.head.extra_max - len : copy);\n            }\n            if (state.flags & 0x0200) {\n              state.check = crc32(state.check, input, copy, next);\n            }\n            have -= copy;\n            next += copy;\n            state.length -= copy;\n          }\n          if (state.length) { break inf_leave; }\n        }\n        state.length = 0;\n        state.mode = NAME;\n        /* falls through */\n      case NAME:\n        if (state.flags & 0x0800) {\n          if (have === 0) { break inf_leave; }\n          copy = 0;\n          do {\n            // TODO: 2 or 1 bytes?\n            len = input[next + copy++];\n            /* use constant limit because in js we should not preallocate memory */\n            if (state.head && len &&\n                (state.length < 65536 /*state.head.name_max*/)) {\n              state.head.name += String.fromCharCode(len);\n            }\n          } while (len && copy < have);\n\n          if (state.flags & 0x0200) {\n            state.check = crc32(state.check, input, copy, next);\n          }\n          have -= copy;\n          next += copy;\n          if (len) { break inf_leave; }\n        }\n        else if (state.head) {\n          state.head.name = null;\n        }\n        state.length = 0;\n        state.mode = COMMENT;\n        /* falls through */\n      case COMMENT:\n        if (state.flags & 0x1000) {\n          if (have === 0) { break inf_leave; }\n          copy = 0;\n          do {\n            len = input[next + copy++];\n            /* use constant limit because in js we should not preallocate memory */\n            if (state.head && len &&\n                (state.length < 65536 /*state.head.comm_max*/)) {\n              state.head.comment += String.fromCharCode(len);\n            }\n          } while (len && copy < have);\n          if (state.flags & 0x0200) {\n            state.check = crc32(state.check, input, copy, next);\n          }\n          have -= copy;\n          next += copy;\n          if (len) { break inf_leave; }\n        }\n        else if (state.head) {\n          state.head.comment = null;\n        }\n        state.mode = HCRC;\n        /* falls through */\n      case HCRC:\n        if (state.flags & 0x0200) {\n          //=== NEEDBITS(16); */\n          while (bits < 16) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          if (hold !== (state.check & 0xffff)) {\n            strm.msg = 'header crc mismatch';\n            state.mode = BAD;\n            break;\n          }\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n        }\n        if (state.head) {\n          state.head.hcrc = ((state.flags >> 9) & 1);\n          state.head.done = true;\n        }\n        strm.adler = state.check = 0;\n        state.mode = TYPE;\n        break;\n      case DICTID:\n        //=== NEEDBITS(32); */\n        while (bits < 32) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        strm.adler = state.check = zswap32(hold);\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = DICT;\n        /* falls through */\n      case DICT:\n        if (state.havedict === 0) {\n          //--- RESTORE() ---\n          strm.next_out = put;\n          strm.avail_out = left;\n          strm.next_in = next;\n          strm.avail_in = have;\n          state.hold = hold;\n          state.bits = bits;\n          //---\n          return Z_NEED_DICT;\n        }\n        strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n        state.mode = TYPE;\n        /* falls through */\n      case TYPE:\n        if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n        /* falls through */\n      case TYPEDO:\n        if (state.last) {\n          //--- BYTEBITS() ---//\n          hold >>>= bits & 7;\n          bits -= bits & 7;\n          //---//\n          state.mode = CHECK;\n          break;\n        }\n        //=== NEEDBITS(3); */\n        while (bits < 3) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        state.last = (hold & 0x01)/*BITS(1)*/;\n        //--- DROPBITS(1) ---//\n        hold >>>= 1;\n        bits -= 1;\n        //---//\n\n        switch ((hold & 0x03)/*BITS(2)*/) {\n          case 0:                             /* stored block */\n            //Tracev((stderr, \"inflate:     stored block%s\\n\",\n            //        state.last ? \" (last)\" : \"\"));\n            state.mode = STORED;\n            break;\n          case 1:                             /* fixed block */\n            fixedtables(state);\n            //Tracev((stderr, \"inflate:     fixed codes block%s\\n\",\n            //        state.last ? \" (last)\" : \"\"));\n            state.mode = LEN_;             /* decode codes */\n            if (flush === Z_TREES) {\n              //--- DROPBITS(2) ---//\n              hold >>>= 2;\n              bits -= 2;\n              //---//\n              break inf_leave;\n            }\n            break;\n          case 2:                             /* dynamic block */\n            //Tracev((stderr, \"inflate:     dynamic codes block%s\\n\",\n            //        state.last ? \" (last)\" : \"\"));\n            state.mode = TABLE;\n            break;\n          case 3:\n            strm.msg = 'invalid block type';\n            state.mode = BAD;\n        }\n        //--- DROPBITS(2) ---//\n        hold >>>= 2;\n        bits -= 2;\n        //---//\n        break;\n      case STORED:\n        //--- BYTEBITS() ---// /* go to byte boundary */\n        hold >>>= bits & 7;\n        bits -= bits & 7;\n        //---//\n        //=== NEEDBITS(32); */\n        while (bits < 32) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n          strm.msg = 'invalid stored block lengths';\n          state.mode = BAD;\n          break;\n        }\n        state.length = hold & 0xffff;\n        //Tracev((stderr, \"inflate:       stored length %u\\n\",\n        //        state.length));\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = COPY_;\n        if (flush === Z_TREES) { break inf_leave; }\n        /* falls through */\n      case COPY_:\n        state.mode = COPY;\n        /* falls through */\n      case COPY:\n        copy = state.length;\n        if (copy) {\n          if (copy > have) { copy = have; }\n          if (copy > left) { copy = left; }\n          if (copy === 0) { break inf_leave; }\n          //--- zmemcpy(put, next, copy); ---\n          utils.arraySet(output, input, next, copy, put);\n          //---//\n          have -= copy;\n          next += copy;\n          left -= copy;\n          put += copy;\n          state.length -= copy;\n          break;\n        }\n        //Tracev((stderr, \"inflate:       stored end\\n\"));\n        state.mode = TYPE;\n        break;\n      case TABLE:\n        //=== NEEDBITS(14); */\n        while (bits < 14) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n        //--- DROPBITS(5) ---//\n        hold >>>= 5;\n        bits -= 5;\n        //---//\n        state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n        //--- DROPBITS(5) ---//\n        hold >>>= 5;\n        bits -= 5;\n        //---//\n        state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n        //--- DROPBITS(4) ---//\n        hold >>>= 4;\n        bits -= 4;\n        //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n        if (state.nlen > 286 || state.ndist > 30) {\n          strm.msg = 'too many length or distance symbols';\n          state.mode = BAD;\n          break;\n        }\n//#endif\n        //Tracev((stderr, \"inflate:       table sizes ok\\n\"));\n        state.have = 0;\n        state.mode = LENLENS;\n        /* falls through */\n      case LENLENS:\n        while (state.have < state.ncode) {\n          //=== NEEDBITS(3);\n          while (bits < 3) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n          //--- DROPBITS(3) ---//\n          hold >>>= 3;\n          bits -= 3;\n          //---//\n        }\n        while (state.have < 19) {\n          state.lens[order[state.have++]] = 0;\n        }\n        // We have separate tables & no pointers. 2 commented lines below not needed.\n        //state.next = state.codes;\n        //state.lencode = state.next;\n        // Switch to use dynamic table\n        state.lencode = state.lendyn;\n        state.lenbits = 7;\n\n        opts = { bits: state.lenbits };\n        ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n        state.lenbits = opts.bits;\n\n        if (ret) {\n          strm.msg = 'invalid code lengths set';\n          state.mode = BAD;\n          break;\n        }\n        //Tracev((stderr, \"inflate:       code lengths ok\\n\"));\n        state.have = 0;\n        state.mode = CODELENS;\n        /* falls through */\n      case CODELENS:\n        while (state.have < state.nlen + state.ndist) {\n          for (;;) {\n            here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n            here_bits = here >>> 24;\n            here_op = (here >>> 16) & 0xff;\n            here_val = here & 0xffff;\n\n            if ((here_bits) <= bits) { break; }\n            //--- PULLBYTE() ---//\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n            //---//\n          }\n          if (here_val < 16) {\n            //--- DROPBITS(here.bits) ---//\n            hold >>>= here_bits;\n            bits -= here_bits;\n            //---//\n            state.lens[state.have++] = here_val;\n          }\n          else {\n            if (here_val === 16) {\n              //=== NEEDBITS(here.bits + 2);\n              n = here_bits + 2;\n              while (bits < n) {\n                if (have === 0) { break inf_leave; }\n                have--;\n                hold += input[next++] << bits;\n                bits += 8;\n              }\n              //===//\n              //--- DROPBITS(here.bits) ---//\n              hold >>>= here_bits;\n              bits -= here_bits;\n              //---//\n              if (state.have === 0) {\n                strm.msg = 'invalid bit length repeat';\n                state.mode = BAD;\n                break;\n              }\n              len = state.lens[state.have - 1];\n              copy = 3 + (hold & 0x03);//BITS(2);\n              //--- DROPBITS(2) ---//\n              hold >>>= 2;\n              bits -= 2;\n              //---//\n            }\n            else if (here_val === 17) {\n              //=== NEEDBITS(here.bits + 3);\n              n = here_bits + 3;\n              while (bits < n) {\n                if (have === 0) { break inf_leave; }\n                have--;\n                hold += input[next++] << bits;\n                bits += 8;\n              }\n              //===//\n              //--- DROPBITS(here.bits) ---//\n              hold >>>= here_bits;\n              bits -= here_bits;\n              //---//\n              len = 0;\n              copy = 3 + (hold & 0x07);//BITS(3);\n              //--- DROPBITS(3) ---//\n              hold >>>= 3;\n              bits -= 3;\n              //---//\n            }\n            else {\n              //=== NEEDBITS(here.bits + 7);\n              n = here_bits + 7;\n              while (bits < n) {\n                if (have === 0) { break inf_leave; }\n                have--;\n                hold += input[next++] << bits;\n                bits += 8;\n              }\n              //===//\n              //--- DROPBITS(here.bits) ---//\n              hold >>>= here_bits;\n              bits -= here_bits;\n              //---//\n              len = 0;\n              copy = 11 + (hold & 0x7f);//BITS(7);\n              //--- DROPBITS(7) ---//\n              hold >>>= 7;\n              bits -= 7;\n              //---//\n            }\n            if (state.have + copy > state.nlen + state.ndist) {\n              strm.msg = 'invalid bit length repeat';\n              state.mode = BAD;\n              break;\n            }\n            while (copy--) {\n              state.lens[state.have++] = len;\n            }\n          }\n        }\n\n        /* handle error breaks in while */\n        if (state.mode === BAD) { break; }\n\n        /* check for end-of-block code (better have one) */\n        if (state.lens[256] === 0) {\n          strm.msg = 'invalid code -- missing end-of-block';\n          state.mode = BAD;\n          break;\n        }\n\n        /* build code tables -- note: do not change the lenbits or distbits\n           values here (9 and 6) without reading the comments in inftrees.h\n           concerning the ENOUGH constants, which depend on those values */\n        state.lenbits = 9;\n\n        opts = { bits: state.lenbits };\n        ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n        // We have separate tables & no pointers. 2 commented lines below not needed.\n        // state.next_index = opts.table_index;\n        state.lenbits = opts.bits;\n        // state.lencode = state.next;\n\n        if (ret) {\n          strm.msg = 'invalid literal/lengths set';\n          state.mode = BAD;\n          break;\n        }\n\n        state.distbits = 6;\n        //state.distcode.copy(state.codes);\n        // Switch to use dynamic table\n        state.distcode = state.distdyn;\n        opts = { bits: state.distbits };\n        ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n        // We have separate tables & no pointers. 2 commented lines below not needed.\n        // state.next_index = opts.table_index;\n        state.distbits = opts.bits;\n        // state.distcode = state.next;\n\n        if (ret) {\n          strm.msg = 'invalid distances set';\n          state.mode = BAD;\n          break;\n        }\n        //Tracev((stderr, 'inflate:       codes ok\\n'));\n        state.mode = LEN_;\n        if (flush === Z_TREES) { break inf_leave; }\n        /* falls through */\n      case LEN_:\n        state.mode = LEN;\n        /* falls through */\n      case LEN:\n        if (have >= 6 && left >= 258) {\n          //--- RESTORE() ---\n          strm.next_out = put;\n          strm.avail_out = left;\n          strm.next_in = next;\n          strm.avail_in = have;\n          state.hold = hold;\n          state.bits = bits;\n          //---\n          inflate_fast(strm, _out);\n          //--- LOAD() ---\n          put = strm.next_out;\n          output = strm.output;\n          left = strm.avail_out;\n          next = strm.next_in;\n          input = strm.input;\n          have = strm.avail_in;\n          hold = state.hold;\n          bits = state.bits;\n          //---\n\n          if (state.mode === TYPE) {\n            state.back = -1;\n          }\n          break;\n        }\n        state.back = 0;\n        for (;;) {\n          here = state.lencode[hold & ((1 << state.lenbits) - 1)];  /*BITS(state.lenbits)*/\n          here_bits = here >>> 24;\n          here_op = (here >>> 16) & 0xff;\n          here_val = here & 0xffff;\n\n          if (here_bits <= bits) { break; }\n          //--- PULLBYTE() ---//\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n          //---//\n        }\n        if (here_op && (here_op & 0xf0) === 0) {\n          last_bits = here_bits;\n          last_op = here_op;\n          last_val = here_val;\n          for (;;) {\n            here = state.lencode[last_val +\n                    ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n            here_bits = here >>> 24;\n            here_op = (here >>> 16) & 0xff;\n            here_val = here & 0xffff;\n\n            if ((last_bits + here_bits) <= bits) { break; }\n            //--- PULLBYTE() ---//\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n            //---//\n          }\n          //--- DROPBITS(last.bits) ---//\n          hold >>>= last_bits;\n          bits -= last_bits;\n          //---//\n          state.back += last_bits;\n        }\n        //--- DROPBITS(here.bits) ---//\n        hold >>>= here_bits;\n        bits -= here_bits;\n        //---//\n        state.back += here_bits;\n        state.length = here_val;\n        if (here_op === 0) {\n          //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n          //        \"inflate:         literal '%c'\\n\" :\n          //        \"inflate:         literal 0x%02x\\n\", here.val));\n          state.mode = LIT;\n          break;\n        }\n        if (here_op & 32) {\n          //Tracevv((stderr, \"inflate:         end of block\\n\"));\n          state.back = -1;\n          state.mode = TYPE;\n          break;\n        }\n        if (here_op & 64) {\n          strm.msg = 'invalid literal/length code';\n          state.mode = BAD;\n          break;\n        }\n        state.extra = here_op & 15;\n        state.mode = LENEXT;\n        /* falls through */\n      case LENEXT:\n        if (state.extra) {\n          //=== NEEDBITS(state.extra);\n          n = state.extra;\n          while (bits < n) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n          //--- DROPBITS(state.extra) ---//\n          hold >>>= state.extra;\n          bits -= state.extra;\n          //---//\n          state.back += state.extra;\n        }\n        //Tracevv((stderr, \"inflate:         length %u\\n\", state.length));\n        state.was = state.length;\n        state.mode = DIST;\n        /* falls through */\n      case DIST:\n        for (;;) {\n          here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n          here_bits = here >>> 24;\n          here_op = (here >>> 16) & 0xff;\n          here_val = here & 0xffff;\n\n          if ((here_bits) <= bits) { break; }\n          //--- PULLBYTE() ---//\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n          //---//\n        }\n        if ((here_op & 0xf0) === 0) {\n          last_bits = here_bits;\n          last_op = here_op;\n          last_val = here_val;\n          for (;;) {\n            here = state.distcode[last_val +\n                    ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n            here_bits = here >>> 24;\n            here_op = (here >>> 16) & 0xff;\n            here_val = here & 0xffff;\n\n            if ((last_bits + here_bits) <= bits) { break; }\n            //--- PULLBYTE() ---//\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n            //---//\n          }\n          //--- DROPBITS(last.bits) ---//\n          hold >>>= last_bits;\n          bits -= last_bits;\n          //---//\n          state.back += last_bits;\n        }\n        //--- DROPBITS(here.bits) ---//\n        hold >>>= here_bits;\n        bits -= here_bits;\n        //---//\n        state.back += here_bits;\n        if (here_op & 64) {\n          strm.msg = 'invalid distance code';\n          state.mode = BAD;\n          break;\n        }\n        state.offset = here_val;\n        state.extra = (here_op) & 15;\n        state.mode = DISTEXT;\n        /* falls through */\n      case DISTEXT:\n        if (state.extra) {\n          //=== NEEDBITS(state.extra);\n          n = state.extra;\n          while (bits < n) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n          //--- DROPBITS(state.extra) ---//\n          hold >>>= state.extra;\n          bits -= state.extra;\n          //---//\n          state.back += state.extra;\n        }\n//#ifdef INFLATE_STRICT\n        if (state.offset > state.dmax) {\n          strm.msg = 'invalid distance too far back';\n          state.mode = BAD;\n          break;\n        }\n//#endif\n        //Tracevv((stderr, \"inflate:         distance %u\\n\", state.offset));\n        state.mode = MATCH;\n        /* falls through */\n      case MATCH:\n        if (left === 0) { break inf_leave; }\n        copy = _out - left;\n        if (state.offset > copy) {         /* copy from window */\n          copy = state.offset - copy;\n          if (copy > state.whave) {\n            if (state.sane) {\n              strm.msg = 'invalid distance too far back';\n              state.mode = BAD;\n              break;\n            }\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n//          Trace((stderr, \"inflate.c too far\\n\"));\n//          copy -= state.whave;\n//          if (copy > state.length) { copy = state.length; }\n//          if (copy > left) { copy = left; }\n//          left -= copy;\n//          state.length -= copy;\n//          do {\n//            output[put++] = 0;\n//          } while (--copy);\n//          if (state.length === 0) { state.mode = LEN; }\n//          break;\n//#endif\n          }\n          if (copy > state.wnext) {\n            copy -= state.wnext;\n            from = state.wsize - copy;\n          }\n          else {\n            from = state.wnext - copy;\n          }\n          if (copy > state.length) { copy = state.length; }\n          from_source = state.window;\n        }\n        else {                              /* copy from output */\n          from_source = output;\n          from = put - state.offset;\n          copy = state.length;\n        }\n        if (copy > left) { copy = left; }\n        left -= copy;\n        state.length -= copy;\n        do {\n          output[put++] = from_source[from++];\n        } while (--copy);\n        if (state.length === 0) { state.mode = LEN; }\n        break;\n      case LIT:\n        if (left === 0) { break inf_leave; }\n        output[put++] = state.length;\n        left--;\n        state.mode = LEN;\n        break;\n      case CHECK:\n        if (state.wrap) {\n          //=== NEEDBITS(32);\n          while (bits < 32) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            // Use '|' instead of '+' to make sure that result is signed\n            hold |= input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          _out -= left;\n          strm.total_out += _out;\n          state.total += _out;\n          if (_out) {\n            strm.adler = state.check =\n                /*UPDATE(state.check, put - _out, _out);*/\n                (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));\n\n          }\n          _out = left;\n          // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n          if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n            strm.msg = 'incorrect data check';\n            state.mode = BAD;\n            break;\n          }\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n          //Tracev((stderr, \"inflate:   check matches trailer\\n\"));\n        }\n        state.mode = LENGTH;\n        /* falls through */\n      case LENGTH:\n        if (state.wrap && state.flags) {\n          //=== NEEDBITS(32);\n          while (bits < 32) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          if (hold !== (state.total & 0xffffffff)) {\n            strm.msg = 'incorrect length check';\n            state.mode = BAD;\n            break;\n          }\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n          //Tracev((stderr, \"inflate:   length matches trailer\\n\"));\n        }\n        state.mode = DONE;\n        /* falls through */\n      case DONE:\n        ret = Z_STREAM_END;\n        break inf_leave;\n      case BAD:\n        ret = Z_DATA_ERROR;\n        break inf_leave;\n      case MEM:\n        return Z_MEM_ERROR;\n      case SYNC:\n        /* falls through */\n      default:\n        return Z_STREAM_ERROR;\n    }\n  }\n\n  // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n  /*\n     Return from inflate(), updating the total counts and the check value.\n     If there was no progress during the inflate() call, return a buffer\n     error.  Call updatewindow() to create and/or update the window state.\n     Note: a memory error from inflate() is non-recoverable.\n   */\n\n  //--- RESTORE() ---\n  strm.next_out = put;\n  strm.avail_out = left;\n  strm.next_in = next;\n  strm.avail_in = have;\n  state.hold = hold;\n  state.bits = bits;\n  //---\n\n  if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n                      (state.mode < CHECK || flush !== Z_FINISH))) {\n    if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {\n      state.mode = MEM;\n      return Z_MEM_ERROR;\n    }\n  }\n  _in -= strm.avail_in;\n  _out -= strm.avail_out;\n  strm.total_in += _in;\n  strm.total_out += _out;\n  state.total += _out;\n  if (state.wrap && _out) {\n    strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n      (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));\n  }\n  strm.data_type = state.bits + (state.last ? 64 : 0) +\n                    (state.mode === TYPE ? 128 : 0) +\n                    (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n  if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {\n    ret = Z_BUF_ERROR;\n  }\n  return ret;\n}\n\nfunction inflateEnd(strm) {\n\n  if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n    return Z_STREAM_ERROR;\n  }\n\n  var state = strm.state;\n  if (state.window) {\n    state.window = null;\n  }\n  strm.state = null;\n  return Z_OK;\n}\n\nfunction inflateGetHeader(strm, head) {\n  var state;\n\n  /* check state */\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  state = strm.state;\n  if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }\n\n  /* save header structure */\n  state.head = head;\n  head.done = false;\n  return Z_OK;\n}\n\nfunction inflateSetDictionary(strm, dictionary) {\n  var dictLength = dictionary.length;\n\n  var state;\n  var dictid;\n  var ret;\n\n  /* check state */\n  if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; }\n  state = strm.state;\n\n  if (state.wrap !== 0 && state.mode !== DICT) {\n    return Z_STREAM_ERROR;\n  }\n\n  /* check for correct dictionary identifier */\n  if (state.mode === DICT) {\n    dictid = 1; /* adler32(0, null, 0)*/\n    /* dictid = adler32(dictid, dictionary, dictLength); */\n    dictid = adler32(dictid, dictionary, dictLength, 0);\n    if (dictid !== state.check) {\n      return Z_DATA_ERROR;\n    }\n  }\n  /* copy dictionary to window using updatewindow(), which will amend the\n   existing dictionary if appropriate */\n  ret = updatewindow(strm, dictionary, dictLength, dictLength);\n  if (ret) {\n    state.mode = MEM;\n    return Z_MEM_ERROR;\n  }\n  state.havedict = 1;\n  // Tracev((stderr, \"inflate:   dictionary set\\n\"));\n  return Z_OK;\n}\n\nexports.inflateReset = inflateReset;\nexports.inflateReset2 = inflateReset2;\nexports.inflateResetKeep = inflateResetKeep;\nexports.inflateInit = inflateInit;\nexports.inflateInit2 = inflateInit2;\nexports.inflate = inflate;\nexports.inflateEnd = inflateEnd;\nexports.inflateGetHeader = inflateGetHeader;\nexports.inflateSetDictionary = inflateSetDictionary;\nexports.inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nexports.inflateCopy = inflateCopy;\nexports.inflateGetDictionary = inflateGetDictionary;\nexports.inflateMark = inflateMark;\nexports.inflatePrime = inflatePrime;\nexports.inflateSync = inflateSync;\nexports.inflateSyncPoint = inflateSyncPoint;\nexports.inflateUndermine = inflateUndermine;\n*/\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\n\nvar MAXBITS = 15;\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\nvar lbase = [ /* Length codes 257..285 base */\n  3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n  35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n];\n\nvar lext = [ /* Length codes 257..285 extra */\n  16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n  19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n];\n\nvar dbase = [ /* Distance codes 0..29 base */\n  1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n  257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n  8193, 12289, 16385, 24577, 0, 0\n];\n\nvar dext = [ /* Distance codes 0..29 extra */\n  16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n  23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n  28, 28, 29, 29, 64, 64\n];\n\nmodule.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts)\n{\n  var bits = opts.bits;\n      //here = opts.here; /* table entry for duplication */\n\n  var len = 0;               /* a code's length in bits */\n  var sym = 0;               /* index of code symbols */\n  var min = 0, max = 0;          /* minimum and maximum code lengths */\n  var root = 0;              /* number of index bits for root table */\n  var curr = 0;              /* number of index bits for current table */\n  var drop = 0;              /* code bits to drop for sub-table */\n  var left = 0;                   /* number of prefix codes available */\n  var used = 0;              /* code entries in table used */\n  var huff = 0;              /* Huffman code */\n  var incr;              /* for incrementing code, index */\n  var fill;              /* index for replicating entries */\n  var low;               /* low bits for current root entry */\n  var mask;              /* mask for low root bits */\n  var next;             /* next available space in table */\n  var base = null;     /* base value table to use */\n  var base_index = 0;\n//  var shoextra;    /* extra bits table to use */\n  var end;                    /* use base and extra for symbol > end */\n  var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1];    /* number of codes of each length */\n  var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1];     /* offsets in table for each length */\n  var extra = null;\n  var extra_index = 0;\n\n  var here_bits, here_op, here_val;\n\n  /*\n   Process a set of code lengths to create a canonical Huffman code.  The\n   code lengths are lens[0..codes-1].  Each length corresponds to the\n   symbols 0..codes-1.  The Huffman code is generated by first sorting the\n   symbols by length from short to long, and retaining the symbol order\n   for codes with equal lengths.  Then the code starts with all zero bits\n   for the first code of the shortest length, and the codes are integer\n   increments for the same length, and zeros are appended as the length\n   increases.  For the deflate format, these bits are stored backwards\n   from their more natural integer increment ordering, and so when the\n   decoding tables are built in the large loop below, the integer codes\n   are incremented backwards.\n\n   This routine assumes, but does not check, that all of the entries in\n   lens[] are in the range 0..MAXBITS.  The caller must assure this.\n   1..MAXBITS is interpreted as that code length.  zero means that that\n   symbol does not occur in this code.\n\n   The codes are sorted by computing a count of codes for each length,\n   creating from that a table of starting indices for each length in the\n   sorted table, and then entering the symbols in order in the sorted\n   table.  The sorted table is work[], with that space being provided by\n   the caller.\n\n   The length counts are used for other purposes as well, i.e. finding\n   the minimum and maximum length codes, determining if there are any\n   codes at all, checking for a valid set of lengths, and looking ahead\n   at length counts to determine sub-table sizes when building the\n   decoding tables.\n   */\n\n  /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n  for (len = 0; len <= MAXBITS; len++) {\n    count[len] = 0;\n  }\n  for (sym = 0; sym < codes; sym++) {\n    count[lens[lens_index + sym]]++;\n  }\n\n  /* bound code lengths, force root to be within code lengths */\n  root = bits;\n  for (max = MAXBITS; max >= 1; max--) {\n    if (count[max] !== 0) { break; }\n  }\n  if (root > max) {\n    root = max;\n  }\n  if (max === 0) {                     /* no symbols to code at all */\n    //table.op[opts.table_index] = 64;  //here.op = (var char)64;    /* invalid code marker */\n    //table.bits[opts.table_index] = 1;   //here.bits = (var char)1;\n    //table.val[opts.table_index++] = 0;   //here.val = (var short)0;\n    table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n    //table.op[opts.table_index] = 64;\n    //table.bits[opts.table_index] = 1;\n    //table.val[opts.table_index++] = 0;\n    table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n    opts.bits = 1;\n    return 0;     /* no symbols, but wait for decoding to report error */\n  }\n  for (min = 1; min < max; min++) {\n    if (count[min] !== 0) { break; }\n  }\n  if (root < min) {\n    root = min;\n  }\n\n  /* check for an over-subscribed or incomplete set of lengths */\n  left = 1;\n  for (len = 1; len <= MAXBITS; len++) {\n    left <<= 1;\n    left -= count[len];\n    if (left < 0) {\n      return -1;\n    }        /* over-subscribed */\n  }\n  if (left > 0 && (type === CODES || max !== 1)) {\n    return -1;                      /* incomplete set */\n  }\n\n  /* generate offsets into symbol table for each length for sorting */\n  offs[1] = 0;\n  for (len = 1; len < MAXBITS; len++) {\n    offs[len + 1] = offs[len] + count[len];\n  }\n\n  /* sort symbols by length, by symbol order within each length */\n  for (sym = 0; sym < codes; sym++) {\n    if (lens[lens_index + sym] !== 0) {\n      work[offs[lens[lens_index + sym]]++] = sym;\n    }\n  }\n\n  /*\n   Create and fill in decoding tables.  In this loop, the table being\n   filled is at next and has curr index bits.  The code being used is huff\n   with length len.  That code is converted to an index by dropping drop\n   bits off of the bottom.  For codes where len is less than drop + curr,\n   those top drop + curr - len bits are incremented through all values to\n   fill the table with replicated entries.\n\n   root is the number of index bits for the root table.  When len exceeds\n   root, sub-tables are created pointed to by the root entry with an index\n   of the low root bits of huff.  This is saved in low to check for when a\n   new sub-table should be started.  drop is zero when the root table is\n   being filled, and drop is root when sub-tables are being filled.\n\n   When a new sub-table is needed, it is necessary to look ahead in the\n   code lengths to determine what size sub-table is needed.  The length\n   counts are used for this, and so count[] is decremented as codes are\n   entered in the tables.\n\n   used keeps track of how many table entries have been allocated from the\n   provided *table space.  It is checked for LENS and DIST tables against\n   the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n   the initial root table size constants.  See the comments in inftrees.h\n   for more information.\n\n   sym increments through all symbols, and the loop terminates when\n   all codes of length max, i.e. all codes, have been processed.  This\n   routine permits incomplete codes, so another loop after this one fills\n   in the rest of the decoding tables with invalid code markers.\n   */\n\n  /* set up for code type */\n  // poor man optimization - use if-else instead of switch,\n  // to avoid deopts in old v8\n  if (type === CODES) {\n    base = extra = work;    /* dummy value--not used */\n    end = 19;\n\n  } else if (type === LENS) {\n    base = lbase;\n    base_index -= 257;\n    extra = lext;\n    extra_index -= 257;\n    end = 256;\n\n  } else {                    /* DISTS */\n    base = dbase;\n    extra = dext;\n    end = -1;\n  }\n\n  /* initialize opts for loop */\n  huff = 0;                   /* starting code */\n  sym = 0;                    /* starting code symbol */\n  len = min;                  /* starting code length */\n  next = table_index;              /* current table to fill in */\n  curr = root;                /* current table index bits */\n  drop = 0;                   /* current bits to drop from code for index */\n  low = -1;                   /* trigger new sub-table when len > root */\n  used = 1 << root;          /* use root table entries */\n  mask = used - 1;            /* mask for comparing low */\n\n  /* check available table space */\n  if ((type === LENS && used > ENOUGH_LENS) ||\n    (type === DISTS && used > ENOUGH_DISTS)) {\n    return 1;\n  }\n\n  /* process all codes and make table entries */\n  for (;;) {\n    /* create table entry */\n    here_bits = len - drop;\n    if (work[sym] < end) {\n      here_op = 0;\n      here_val = work[sym];\n    }\n    else if (work[sym] > end) {\n      here_op = extra[extra_index + work[sym]];\n      here_val = base[base_index + work[sym]];\n    }\n    else {\n      here_op = 32 + 64;         /* end of block */\n      here_val = 0;\n    }\n\n    /* replicate for those indices with low len bits equal to huff */\n    incr = 1 << (len - drop);\n    fill = 1 << curr;\n    min = fill;                 /* save offset to next table */\n    do {\n      fill -= incr;\n      table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n    } while (fill !== 0);\n\n    /* backwards increment the len-bit code huff */\n    incr = 1 << (len - 1);\n    while (huff & incr) {\n      incr >>= 1;\n    }\n    if (incr !== 0) {\n      huff &= incr - 1;\n      huff += incr;\n    } else {\n      huff = 0;\n    }\n\n    /* go to next symbol, update count, len */\n    sym++;\n    if (--count[len] === 0) {\n      if (len === max) { break; }\n      len = lens[lens_index + work[sym]];\n    }\n\n    /* create new sub-table if needed */\n    if (len > root && (huff & mask) !== low) {\n      /* if first time, transition to sub-tables */\n      if (drop === 0) {\n        drop = root;\n      }\n\n      /* increment past last table */\n      next += min;            /* here min is 1 << curr */\n\n      /* determine length of next table */\n      curr = len - drop;\n      left = 1 << curr;\n      while (curr + drop < max) {\n        left -= count[curr + drop];\n        if (left <= 0) { break; }\n        curr++;\n        left <<= 1;\n      }\n\n      /* check for enough space */\n      used += 1 << curr;\n      if ((type === LENS && used > ENOUGH_LENS) ||\n        (type === DISTS && used > ENOUGH_DISTS)) {\n        return 1;\n      }\n\n      /* point entry in root table to sub-table */\n      low = huff & mask;\n      /*table.op[low] = curr;\n      table.bits[low] = root;\n      table.val[low] = next - opts.table_index;*/\n      table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n    }\n  }\n\n  /* fill in remaining table entry if code is incomplete (guaranteed to have\n   at most one remaining entry, since if the code is incomplete, the\n   maximum code length that was allowed to get this far is one bit) */\n  if (huff !== 0) {\n    //table.op[next + huff] = 64;            /* invalid code marker */\n    //table.bits[next + huff] = len - drop;\n    //table.val[next + huff] = 0;\n    table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n  }\n\n  /* set return parameters */\n  //opts.table_index += used;\n  opts.bits = root;\n  return 0;\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n  2:      'need dictionary',     /* Z_NEED_DICT       2  */\n  1:      'stream end',          /* Z_STREAM_END      1  */\n  0:      '',                    /* Z_OK              0  */\n  '-1':   'file error',          /* Z_ERRNO         (-1) */\n  '-2':   'stream error',        /* Z_STREAM_ERROR  (-2) */\n  '-3':   'data error',          /* Z_DATA_ERROR    (-3) */\n  '-4':   'insufficient memory', /* Z_MEM_ERROR     (-4) */\n  '-5':   'buffer error',        /* Z_BUF_ERROR     (-5) */\n  '-6':   'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//var Z_FILTERED          = 1;\n//var Z_HUFFMAN_ONLY      = 2;\n//var Z_RLE               = 3;\nvar Z_FIXED               = 4;\n//var Z_DEFAULT_STRATEGY  = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nvar Z_BINARY              = 0;\nvar Z_TEXT                = 1;\n//var Z_ASCII             = 1; // = Z_TEXT\nvar Z_UNKNOWN             = 2;\n\n/*============================================================================*/\n\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n// From zutil.h\n\nvar STORED_BLOCK = 0;\nvar STATIC_TREES = 1;\nvar DYN_TREES    = 2;\n/* The three kinds of block type */\n\nvar MIN_MATCH    = 3;\nvar MAX_MATCH    = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nvar LENGTH_CODES  = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nvar LITERALS      = 256;\n/* number of literal bytes 0..255 */\n\nvar L_CODES       = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nvar D_CODES       = 30;\n/* number of distance codes */\n\nvar BL_CODES      = 19;\n/* number of codes used to transfer the bit lengths */\n\nvar HEAP_SIZE     = 2 * L_CODES + 1;\n/* maximum heap size */\n\nvar MAX_BITS      = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar Buf_size      = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nvar MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nvar END_BLOCK   = 256;\n/* end of block literal code */\n\nvar REP_3_6     = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nvar REPZ_3_10   = 17;\n/* repeat a zero length 3-10 times  (3 bits of repeat count) */\n\nvar REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times  (7 bits of repeat count) */\n\n/* eslint-disable comma-spacing,array-bracket-spacing */\nvar extra_lbits =   /* extra bits for each length code */\n  [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];\n\nvar extra_dbits =   /* extra bits for each distance code */\n  [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];\n\nvar extra_blbits =  /* extra bits for each bit length code */\n  [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];\n\nvar bl_order =\n  [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];\n/* eslint-enable comma-spacing,array-bracket-spacing */\n\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nvar DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1\nvar static_ltree  = new Array((L_CODES + 2) * 2);\nzero(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nvar static_dtree  = new Array(D_CODES * 2);\nzero(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nvar _dist_code    = new Array(DIST_CODE_LEN);\nzero(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nvar _length_code  = new Array(MAX_MATCH - MIN_MATCH + 1);\nzero(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nvar base_length   = new Array(LENGTH_CODES);\nzero(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nvar base_dist     = new Array(D_CODES);\nzero(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nfunction StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n\n  this.static_tree  = static_tree;  /* static tree or NULL */\n  this.extra_bits   = extra_bits;   /* extra bits for each code or NULL */\n  this.extra_base   = extra_base;   /* base index for extra_bits */\n  this.elems        = elems;        /* max number of elements in the tree */\n  this.max_length   = max_length;   /* max bit length for the codes */\n\n  // show if `static_tree` has data or dummy - needed for monomorphic objects\n  this.has_stree    = static_tree && static_tree.length;\n}\n\n\nvar static_l_desc;\nvar static_d_desc;\nvar static_bl_desc;\n\n\nfunction TreeDesc(dyn_tree, stat_desc) {\n  this.dyn_tree = dyn_tree;     /* the dynamic tree */\n  this.max_code = 0;            /* largest code with non zero frequency */\n  this.stat_desc = stat_desc;   /* the corresponding static tree */\n}\n\n\n\nfunction d_code(dist) {\n  return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n}\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nfunction put_short(s, w) {\n//    put_byte(s, (uch)((w) & 0xff));\n//    put_byte(s, (uch)((ush)(w) >> 8));\n  s.pending_buf[s.pending++] = (w) & 0xff;\n  s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n}\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nfunction send_bits(s, value, length) {\n  if (s.bi_valid > (Buf_size - length)) {\n    s.bi_buf |= (value << s.bi_valid) & 0xffff;\n    put_short(s, s.bi_buf);\n    s.bi_buf = value >> (Buf_size - s.bi_valid);\n    s.bi_valid += length - Buf_size;\n  } else {\n    s.bi_buf |= (value << s.bi_valid) & 0xffff;\n    s.bi_valid += length;\n  }\n}\n\n\nfunction send_code(s, c, tree) {\n  send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);\n}\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nfunction bi_reverse(code, len) {\n  var res = 0;\n  do {\n    res |= code & 1;\n    code >>>= 1;\n    res <<= 1;\n  } while (--len > 0);\n  return res >>> 1;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nfunction bi_flush(s) {\n  if (s.bi_valid === 16) {\n    put_short(s, s.bi_buf);\n    s.bi_buf = 0;\n    s.bi_valid = 0;\n\n  } else if (s.bi_valid >= 8) {\n    s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n    s.bi_buf >>= 8;\n    s.bi_valid -= 8;\n  }\n}\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n *    above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n *     array bl_count contains the frequencies for each bit length.\n *     The length opt_len is updated; static_len is also updated if stree is\n *     not null.\n */\nfunction gen_bitlen(s, desc)\n//    deflate_state *s;\n//    tree_desc *desc;    /* the tree descriptor */\n{\n  var tree            = desc.dyn_tree;\n  var max_code        = desc.max_code;\n  var stree           = desc.stat_desc.static_tree;\n  var has_stree       = desc.stat_desc.has_stree;\n  var extra           = desc.stat_desc.extra_bits;\n  var base            = desc.stat_desc.extra_base;\n  var max_length      = desc.stat_desc.max_length;\n  var h;              /* heap index */\n  var n, m;           /* iterate over the tree elements */\n  var bits;           /* bit length */\n  var xbits;          /* extra bits */\n  var f;              /* frequency */\n  var overflow = 0;   /* number of elements with bit length too large */\n\n  for (bits = 0; bits <= MAX_BITS; bits++) {\n    s.bl_count[bits] = 0;\n  }\n\n  /* In a first pass, compute the optimal bit lengths (which may\n   * overflow in the case of the bit length tree).\n   */\n  tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */\n\n  for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n    n = s.heap[h];\n    bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;\n    if (bits > max_length) {\n      bits = max_length;\n      overflow++;\n    }\n    tree[n * 2 + 1]/*.Len*/ = bits;\n    /* We overwrite tree[n].Dad which is no longer needed */\n\n    if (n > max_code) { continue; } /* not a leaf node */\n\n    s.bl_count[bits]++;\n    xbits = 0;\n    if (n >= base) {\n      xbits = extra[n - base];\n    }\n    f = tree[n * 2]/*.Freq*/;\n    s.opt_len += f * (bits + xbits);\n    if (has_stree) {\n      s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);\n    }\n  }\n  if (overflow === 0) { return; }\n\n  // Trace((stderr,\"\\nbit length overflow\\n\"));\n  /* This happens for example on obj2 and pic of the Calgary corpus */\n\n  /* Find the first bit length which could increase: */\n  do {\n    bits = max_length - 1;\n    while (s.bl_count[bits] === 0) { bits--; }\n    s.bl_count[bits]--;      /* move one leaf down the tree */\n    s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */\n    s.bl_count[max_length]--;\n    /* The brother of the overflow item also moves one step up,\n     * but this does not affect bl_count[max_length]\n     */\n    overflow -= 2;\n  } while (overflow > 0);\n\n  /* Now recompute all bit lengths, scanning in increasing frequency.\n   * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n   * lengths instead of fixing only the wrong ones. This idea is taken\n   * from 'ar' written by Haruhiko Okumura.)\n   */\n  for (bits = max_length; bits !== 0; bits--) {\n    n = s.bl_count[bits];\n    while (n !== 0) {\n      m = s.heap[--h];\n      if (m > max_code) { continue; }\n      if (tree[m * 2 + 1]/*.Len*/ !== bits) {\n        // Trace((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n        s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;\n        tree[m * 2 + 1]/*.Len*/ = bits;\n      }\n      n--;\n    }\n  }\n}\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n *     zero code length.\n */\nfunction gen_codes(tree, max_code, bl_count)\n//    ct_data *tree;             /* the tree to decorate */\n//    int max_code;              /* largest code with non zero frequency */\n//    ushf *bl_count;            /* number of codes at each bit length */\n{\n  var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */\n  var code = 0;              /* running code value */\n  var bits;                  /* bit index */\n  var n;                     /* code index */\n\n  /* The distribution counts are first used to generate the code values\n   * without bit reversal.\n   */\n  for (bits = 1; bits <= MAX_BITS; bits++) {\n    next_code[bits] = code = (code + bl_count[bits - 1]) << 1;\n  }\n  /* Check that the bit counts in bl_count are consistent. The last code\n   * must be all ones.\n   */\n  //Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,\n  //        \"inconsistent bit counts\");\n  //Tracev((stderr,\"\\ngen_codes: max_code %d \", max_code));\n\n  for (n = 0;  n <= max_code; n++) {\n    var len = tree[n * 2 + 1]/*.Len*/;\n    if (len === 0) { continue; }\n    /* Now reverse the bits */\n    tree[n * 2]/*.Code*/ = bi_reverse(next_code[len]++, len);\n\n    //Tracecv(tree != static_ltree, (stderr,\"\\nn %3d %c l %2d c %4x (%x) \",\n    //     n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));\n  }\n}\n\n\n/* ===========================================================================\n * Initialize the various 'constant' tables.\n */\nfunction tr_static_init() {\n  var n;        /* iterates over tree elements */\n  var bits;     /* bit counter */\n  var length;   /* length value */\n  var code;     /* code value */\n  var dist;     /* distance index */\n  var bl_count = new Array(MAX_BITS + 1);\n  /* number of codes at each bit length for an optimal tree */\n\n  // do check in _tr_init()\n  //if (static_init_done) return;\n\n  /* For some embedded targets, global variables are not initialized: */\n/*#ifdef NO_INIT_GLOBAL_POINTERS\n  static_l_desc.static_tree = static_ltree;\n  static_l_desc.extra_bits = extra_lbits;\n  static_d_desc.static_tree = static_dtree;\n  static_d_desc.extra_bits = extra_dbits;\n  static_bl_desc.extra_bits = extra_blbits;\n#endif*/\n\n  /* Initialize the mapping length (0..255) -> length code (0..28) */\n  length = 0;\n  for (code = 0; code < LENGTH_CODES - 1; code++) {\n    base_length[code] = length;\n    for (n = 0; n < (1 << extra_lbits[code]); n++) {\n      _length_code[length++] = code;\n    }\n  }\n  //Assert (length == 256, \"tr_static_init: length != 256\");\n  /* Note that the length 255 (match length 258) can be represented\n   * in two different ways: code 284 + 5 bits or code 285, so we\n   * overwrite length_code[255] to use the best encoding:\n   */\n  _length_code[length - 1] = code;\n\n  /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n  dist = 0;\n  for (code = 0; code < 16; code++) {\n    base_dist[code] = dist;\n    for (n = 0; n < (1 << extra_dbits[code]); n++) {\n      _dist_code[dist++] = code;\n    }\n  }\n  //Assert (dist == 256, \"tr_static_init: dist != 256\");\n  dist >>= 7; /* from now on, all distances are divided by 128 */\n  for (; code < D_CODES; code++) {\n    base_dist[code] = dist << 7;\n    for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {\n      _dist_code[256 + dist++] = code;\n    }\n  }\n  //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n  /* Construct the codes of the static literal tree */\n  for (bits = 0; bits <= MAX_BITS; bits++) {\n    bl_count[bits] = 0;\n  }\n\n  n = 0;\n  while (n <= 143) {\n    static_ltree[n * 2 + 1]/*.Len*/ = 8;\n    n++;\n    bl_count[8]++;\n  }\n  while (n <= 255) {\n    static_ltree[n * 2 + 1]/*.Len*/ = 9;\n    n++;\n    bl_count[9]++;\n  }\n  while (n <= 279) {\n    static_ltree[n * 2 + 1]/*.Len*/ = 7;\n    n++;\n    bl_count[7]++;\n  }\n  while (n <= 287) {\n    static_ltree[n * 2 + 1]/*.Len*/ = 8;\n    n++;\n    bl_count[8]++;\n  }\n  /* Codes 286 and 287 do not exist, but we must include them in the\n   * tree construction to get a canonical Huffman tree (longest code\n   * all ones)\n   */\n  gen_codes(static_ltree, L_CODES + 1, bl_count);\n\n  /* The static distance tree is trivial: */\n  for (n = 0; n < D_CODES; n++) {\n    static_dtree[n * 2 + 1]/*.Len*/ = 5;\n    static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);\n  }\n\n  // Now data ready and we can init static trees\n  static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n  static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0,          D_CODES, MAX_BITS);\n  static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0,         BL_CODES, MAX_BL_BITS);\n\n  //static_init_done = true;\n}\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nfunction init_block(s) {\n  var n; /* iterates over tree elements */\n\n  /* Initialize the trees. */\n  for (n = 0; n < L_CODES;  n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }\n  for (n = 0; n < D_CODES;  n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }\n  for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }\n\n  s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;\n  s.opt_len = s.static_len = 0;\n  s.last_lit = s.matches = 0;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nfunction bi_windup(s)\n{\n  if (s.bi_valid > 8) {\n    put_short(s, s.bi_buf);\n  } else if (s.bi_valid > 0) {\n    //put_byte(s, (Byte)s->bi_buf);\n    s.pending_buf[s.pending++] = s.bi_buf;\n  }\n  s.bi_buf = 0;\n  s.bi_valid = 0;\n}\n\n/* ===========================================================================\n * Copy a stored block, storing first the length and its\n * one's complement if requested.\n */\nfunction copy_block(s, buf, len, header)\n//DeflateState *s;\n//charf    *buf;    /* the input data */\n//unsigned len;     /* its length */\n//int      header;  /* true if block header must be written */\n{\n  bi_windup(s);        /* align on byte boundary */\n\n  if (header) {\n    put_short(s, len);\n    put_short(s, ~len);\n  }\n//  while (len--) {\n//    put_byte(s, *buf++);\n//  }\n  utils.arraySet(s.pending_buf, s.window, buf, len, s.pending);\n  s.pending += len;\n}\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nfunction smaller(tree, n, m, depth) {\n  var _n2 = n * 2;\n  var _m2 = m * 2;\n  return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n         (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));\n}\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nfunction pqdownheap(s, tree, k)\n//    deflate_state *s;\n//    ct_data *tree;  /* the tree to restore */\n//    int k;               /* node to move down */\n{\n  var v = s.heap[k];\n  var j = k << 1;  /* left son of k */\n  while (j <= s.heap_len) {\n    /* Set j to the smallest of the two sons: */\n    if (j < s.heap_len &&\n      smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n      j++;\n    }\n    /* Exit if v is smaller than both sons */\n    if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n    /* Exchange v with the smallest son */\n    s.heap[k] = s.heap[j];\n    k = j;\n\n    /* And continue down the tree, setting j to the left son of k */\n    j <<= 1;\n  }\n  s.heap[k] = v;\n}\n\n\n// inlined manually\n// var SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nfunction compress_block(s, ltree, dtree)\n//    deflate_state *s;\n//    const ct_data *ltree; /* literal tree */\n//    const ct_data *dtree; /* distance tree */\n{\n  var dist;           /* distance of matched string */\n  var lc;             /* match length or unmatched char (if dist == 0) */\n  var lx = 0;         /* running index in l_buf */\n  var code;           /* the code to send */\n  var extra;          /* number of extra bits to send */\n\n  if (s.last_lit !== 0) {\n    do {\n      dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);\n      lc = s.pending_buf[s.l_buf + lx];\n      lx++;\n\n      if (dist === 0) {\n        send_code(s, lc, ltree); /* send a literal byte */\n        //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n      } else {\n        /* Here, lc is the match length - MIN_MATCH */\n        code = _length_code[lc];\n        send_code(s, code + LITERALS + 1, ltree); /* send the length code */\n        extra = extra_lbits[code];\n        if (extra !== 0) {\n          lc -= base_length[code];\n          send_bits(s, lc, extra);       /* send the extra length bits */\n        }\n        dist--; /* dist is now the match distance - 1 */\n        code = d_code(dist);\n        //Assert (code < D_CODES, \"bad d_code\");\n\n        send_code(s, code, dtree);       /* send the distance code */\n        extra = extra_dbits[code];\n        if (extra !== 0) {\n          dist -= base_dist[code];\n          send_bits(s, dist, extra);   /* send the extra distance bits */\n        }\n      } /* literal or match pair ? */\n\n      /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */\n      //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,\n      //       \"pendingBuf overflow\");\n\n    } while (lx < s.last_lit);\n  }\n\n  send_code(s, END_BLOCK, ltree);\n}\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n *     and corresponding code. The length opt_len is updated; static_len is\n *     also updated if stree is not null. The field max_code is set.\n */\nfunction build_tree(s, desc)\n//    deflate_state *s;\n//    tree_desc *desc; /* the tree descriptor */\n{\n  var tree     = desc.dyn_tree;\n  var stree    = desc.stat_desc.static_tree;\n  var has_stree = desc.stat_desc.has_stree;\n  var elems    = desc.stat_desc.elems;\n  var n, m;          /* iterate over heap elements */\n  var max_code = -1; /* largest code with non zero frequency */\n  var node;          /* new node being created */\n\n  /* Construct the initial heap, with least frequent element in\n   * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n   * heap[0] is not used.\n   */\n  s.heap_len = 0;\n  s.heap_max = HEAP_SIZE;\n\n  for (n = 0; n < elems; n++) {\n    if (tree[n * 2]/*.Freq*/ !== 0) {\n      s.heap[++s.heap_len] = max_code = n;\n      s.depth[n] = 0;\n\n    } else {\n      tree[n * 2 + 1]/*.Len*/ = 0;\n    }\n  }\n\n  /* The pkzip format requires that at least one distance code exists,\n   * and that at least one bit should be sent even if there is only one\n   * possible code. So to avoid special checks later on we force at least\n   * two codes of non zero frequency.\n   */\n  while (s.heap_len < 2) {\n    node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n    tree[node * 2]/*.Freq*/ = 1;\n    s.depth[node] = 0;\n    s.opt_len--;\n\n    if (has_stree) {\n      s.static_len -= stree[node * 2 + 1]/*.Len*/;\n    }\n    /* node is 0 or 1 so it does not have extra bits */\n  }\n  desc.max_code = max_code;\n\n  /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n   * establish sub-heaps of increasing lengths:\n   */\n  for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }\n\n  /* Construct the Huffman tree by repeatedly combining the least two\n   * frequent nodes.\n   */\n  node = elems;              /* next internal node of the tree */\n  do {\n    //pqremove(s, tree, n);  /* n = node of least frequency */\n    /*** pqremove ***/\n    n = s.heap[1/*SMALLEST*/];\n    s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];\n    pqdownheap(s, tree, 1/*SMALLEST*/);\n    /***/\n\n    m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */\n\n    s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n    s.heap[--s.heap_max] = m;\n\n    /* Create a new node father of n and m */\n    tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;\n    s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n    tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;\n\n    /* and insert the new node in the heap */\n    s.heap[1/*SMALLEST*/] = node++;\n    pqdownheap(s, tree, 1/*SMALLEST*/);\n\n  } while (s.heap_len >= 2);\n\n  s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];\n\n  /* At this point, the fields freq and dad are set. We can now\n   * generate the bit lengths.\n   */\n  gen_bitlen(s, desc);\n\n  /* The field len is now set, we can generate the bit codes */\n  gen_codes(tree, max_code, s.bl_count);\n}\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nfunction scan_tree(s, tree, max_code)\n//    deflate_state *s;\n//    ct_data *tree;   /* the tree to be scanned */\n//    int max_code;    /* and its largest code of non zero frequency */\n{\n  var n;                     /* iterates over all tree elements */\n  var prevlen = -1;          /* last emitted length */\n  var curlen;                /* length of current code */\n\n  var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n  var count = 0;             /* repeat count of the current code */\n  var max_count = 7;         /* max repeat count */\n  var min_count = 4;         /* min repeat count */\n\n  if (nextlen === 0) {\n    max_count = 138;\n    min_count = 3;\n  }\n  tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */\n\n  for (n = 0; n <= max_code; n++) {\n    curlen = nextlen;\n    nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n    if (++count < max_count && curlen === nextlen) {\n      continue;\n\n    } else if (count < min_count) {\n      s.bl_tree[curlen * 2]/*.Freq*/ += count;\n\n    } else if (curlen !== 0) {\n\n      if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }\n      s.bl_tree[REP_3_6 * 2]/*.Freq*/++;\n\n    } else if (count <= 10) {\n      s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;\n\n    } else {\n      s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;\n    }\n\n    count = 0;\n    prevlen = curlen;\n\n    if (nextlen === 0) {\n      max_count = 138;\n      min_count = 3;\n\n    } else if (curlen === nextlen) {\n      max_count = 6;\n      min_count = 3;\n\n    } else {\n      max_count = 7;\n      min_count = 4;\n    }\n  }\n}\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nfunction send_tree(s, tree, max_code)\n//    deflate_state *s;\n//    ct_data *tree; /* the tree to be scanned */\n//    int max_code;       /* and its largest code of non zero frequency */\n{\n  var n;                     /* iterates over all tree elements */\n  var prevlen = -1;          /* last emitted length */\n  var curlen;                /* length of current code */\n\n  var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n  var count = 0;             /* repeat count of the current code */\n  var max_count = 7;         /* max repeat count */\n  var min_count = 4;         /* min repeat count */\n\n  /* tree[max_code+1].Len = -1; */  /* guard already set */\n  if (nextlen === 0) {\n    max_count = 138;\n    min_count = 3;\n  }\n\n  for (n = 0; n <= max_code; n++) {\n    curlen = nextlen;\n    nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n    if (++count < max_count && curlen === nextlen) {\n      continue;\n\n    } else if (count < min_count) {\n      do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);\n\n    } else if (curlen !== 0) {\n      if (curlen !== prevlen) {\n        send_code(s, curlen, s.bl_tree);\n        count--;\n      }\n      //Assert(count >= 3 && count <= 6, \" 3_6?\");\n      send_code(s, REP_3_6, s.bl_tree);\n      send_bits(s, count - 3, 2);\n\n    } else if (count <= 10) {\n      send_code(s, REPZ_3_10, s.bl_tree);\n      send_bits(s, count - 3, 3);\n\n    } else {\n      send_code(s, REPZ_11_138, s.bl_tree);\n      send_bits(s, count - 11, 7);\n    }\n\n    count = 0;\n    prevlen = curlen;\n    if (nextlen === 0) {\n      max_count = 138;\n      min_count = 3;\n\n    } else if (curlen === nextlen) {\n      max_count = 6;\n      min_count = 3;\n\n    } else {\n      max_count = 7;\n      min_count = 4;\n    }\n  }\n}\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nfunction build_bl_tree(s) {\n  var max_blindex;  /* index of last bit length code of non zero freq */\n\n  /* Determine the bit length frequencies for literal and distance trees */\n  scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n  scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n  /* Build the bit length tree: */\n  build_tree(s, s.bl_desc);\n  /* opt_len now includes the length of the tree representations, except\n   * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n   */\n\n  /* Determine the number of bit length codes to send. The pkzip format\n   * requires that at least 4 bit length codes be sent. (appnote.txt says\n   * 3 but the actual value used is 4.)\n   */\n  for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n    if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {\n      break;\n    }\n  }\n  /* Update opt_len to include the bit length tree and counts */\n  s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n  //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n  //        s->opt_len, s->static_len));\n\n  return max_blindex;\n}\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nfunction send_all_trees(s, lcodes, dcodes, blcodes)\n//    deflate_state *s;\n//    int lcodes, dcodes, blcodes; /* number of codes for each tree */\n{\n  var rank;                    /* index in bl_order */\n\n  //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n  //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n  //        \"too many codes\");\n  //Tracev((stderr, \"\\nbl counts: \"));\n  send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */\n  send_bits(s, dcodes - 1,   5);\n  send_bits(s, blcodes - 4,  4); /* not -3 as stated in appnote.txt */\n  for (rank = 0; rank < blcodes; rank++) {\n    //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n    send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);\n  }\n  //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n  send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */\n  //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n  send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */\n  //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n}\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n *    a) There are no non-portable control characters belonging to the\n *       \"black list\" (0..6, 14..25, 28..31).\n *    b) There is at least one printable character belonging to the\n *       \"white list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n *   \"gray list\" that is ignored in this detection algorithm:\n *   (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nfunction detect_data_type(s) {\n  /* black_mask is the bit mask of black-listed bytes\n   * set bits 0..6, 14..25, and 28..31\n   * 0xf3ffc07f = binary 11110011111111111100000001111111\n   */\n  var black_mask = 0xf3ffc07f;\n  var n;\n\n  /* Check for non-textual (\"black-listed\") bytes. */\n  for (n = 0; n <= 31; n++, black_mask >>>= 1) {\n    if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {\n      return Z_BINARY;\n    }\n  }\n\n  /* Check for textual (\"white-listed\") bytes. */\n  if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||\n      s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {\n    return Z_TEXT;\n  }\n  for (n = 32; n < LITERALS; n++) {\n    if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {\n      return Z_TEXT;\n    }\n  }\n\n  /* There are no \"black-listed\" or \"white-listed\" bytes:\n   * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n   */\n  return Z_BINARY;\n}\n\n\nvar static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nfunction _tr_init(s)\n{\n\n  if (!static_init_done) {\n    tr_static_init();\n    static_init_done = true;\n  }\n\n  s.l_desc  = new TreeDesc(s.dyn_ltree, static_l_desc);\n  s.d_desc  = new TreeDesc(s.dyn_dtree, static_d_desc);\n  s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n  s.bi_buf = 0;\n  s.bi_valid = 0;\n\n  /* Initialize the first block of the first file: */\n  init_block(s);\n}\n\n\n/* ===========================================================================\n * Send a stored block\n */\nfunction _tr_stored_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf;       /* input block */\n//ulg stored_len;   /* length of input block */\n//int last;         /* one if this is the last block for a file */\n{\n  send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3);    /* send block type */\n  copy_block(s, buf, stored_len, true); /* with header */\n}\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nfunction _tr_align(s) {\n  send_bits(s, STATIC_TREES << 1, 3);\n  send_code(s, END_BLOCK, static_ltree);\n  bi_flush(s);\n}\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and output the encoded block to the zip file.\n */\nfunction _tr_flush_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf;       /* input block, or NULL if too old */\n//ulg stored_len;   /* length of input block */\n//int last;         /* one if this is the last block for a file */\n{\n  var opt_lenb, static_lenb;  /* opt_len and static_len in bytes */\n  var max_blindex = 0;        /* index of last bit length code of non zero freq */\n\n  /* Build the Huffman trees unless a stored block is forced */\n  if (s.level > 0) {\n\n    /* Check if the file is binary or text */\n    if (s.strm.data_type === Z_UNKNOWN) {\n      s.strm.data_type = detect_data_type(s);\n    }\n\n    /* Construct the literal and distance trees */\n    build_tree(s, s.l_desc);\n    // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n    //        s->static_len));\n\n    build_tree(s, s.d_desc);\n    // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n    //        s->static_len));\n    /* At this point, opt_len and static_len are the total bit lengths of\n     * the compressed block data, excluding the tree representations.\n     */\n\n    /* Build the bit length tree for the above two trees, and get the index\n     * in bl_order of the last bit length code to send.\n     */\n    max_blindex = build_bl_tree(s);\n\n    /* Determine the best encoding. Compute the block lengths in bytes. */\n    opt_lenb = (s.opt_len + 3 + 7) >>> 3;\n    static_lenb = (s.static_len + 3 + 7) >>> 3;\n\n    // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n    //        opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n    //        s->last_lit));\n\n    if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }\n\n  } else {\n    // Assert(buf != (char*)0, \"lost buf\");\n    opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n  }\n\n  if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {\n    /* 4: two words for the lengths */\n\n    /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n     * Otherwise we can't have processed more than WSIZE input bytes since\n     * the last block flush, because compression would have been\n     * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n     * transform a block into a stored block.\n     */\n    _tr_stored_block(s, buf, stored_len, last);\n\n  } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {\n\n    send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);\n    compress_block(s, static_ltree, static_dtree);\n\n  } else {\n    send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);\n    send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);\n    compress_block(s, s.dyn_ltree, s.dyn_dtree);\n  }\n  // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n  /* The above check is made mod 2^32, for files larger than 512 MB\n   * and uLong implemented on 32 bits.\n   */\n  init_block(s);\n\n  if (last) {\n    bi_windup(s);\n  }\n  // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n  //       s->compressed_len-7*last));\n}\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nfunction _tr_tally(s, dist, lc)\n//    deflate_state *s;\n//    unsigned dist;  /* distance of matched string */\n//    unsigned lc;    /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n  //var out_length, in_length, dcode;\n\n  s.pending_buf[s.d_buf + s.last_lit * 2]     = (dist >>> 8) & 0xff;\n  s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n  s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n  s.last_lit++;\n\n  if (dist === 0) {\n    /* lc is the unmatched char */\n    s.dyn_ltree[lc * 2]/*.Freq*/++;\n  } else {\n    s.matches++;\n    /* Here, lc is the match length - MIN_MATCH */\n    dist--;             /* dist = match distance - 1 */\n    //Assert((ush)dist < (ush)MAX_DIST(s) &&\n    //       (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n    //       (ush)d_code(dist) < (ush)D_CODES,  \"_tr_tally: bad match\");\n\n    s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n    s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n  }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n//  /* Try to guess if it is profitable to stop the current block here */\n//  if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n//    /* Compute an upper bound for the compressed length */\n//    out_length = s.last_lit*8;\n//    in_length = s.strstart - s.block_start;\n//\n//    for (dcode = 0; dcode < D_CODES; dcode++) {\n//      out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n//    }\n//    out_length >>>= 3;\n//    //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n//    //       s->last_lit, in_length, out_length,\n//    //       100L - out_length*100L/in_length));\n//    if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n//      return true;\n//    }\n//  }\n//#endif\n\n  return (s.last_lit === s.lit_bufsize - 1);\n  /* We avoid equality with lit_bufsize because of wraparound at 64K\n   * on 16 bit machines and because stored blocks are restricted to\n   * 64K-1 bytes.\n   */\n}\n\nexports._tr_init  = _tr_init;\nexports._tr_stored_block = _tr_stored_block;\nexports._tr_flush_block  = _tr_flush_block;\nexports._tr_tally = _tr_tally;\nexports._tr_align = _tr_align;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction ZStream() {\n  /* next input byte */\n  this.input = null; // JS specific, because we have no pointers\n  this.next_in = 0;\n  /* number of bytes available at input */\n  this.avail_in = 0;\n  /* total number of input bytes read so far */\n  this.total_in = 0;\n  /* next output byte should be put there */\n  this.output = null; // JS specific, because we have no pointers\n  this.next_out = 0;\n  /* remaining free space at output */\n  this.avail_out = 0;\n  /* total number of bytes output so far */\n  this.total_out = 0;\n  /* last error message, NULL if no error */\n  this.msg = ''/*Z_NULL*/;\n  /* not visible by applications */\n  this.state = null;\n  /* best guess about the data type: binary or text */\n  this.data_type = 2/*Z_UNKNOWN*/;\n  /* adler32 value of the uncompressed data */\n  this.adler = 0;\n}\n\nmodule.exports = ZStream;\n","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){\"use strict\";var e,i;function c(){return e.apply(null,arguments)}function o(e){return e instanceof Array||\"[object Array]\"===Object.prototype.toString.call(e)}function u(e){return null!=e&&\"[object Object]\"===Object.prototype.toString.call(e)}function l(e){return void 0===e}function d(e){return\"number\"==typeof e||\"[object Number]\"===Object.prototype.toString.call(e)}function h(e){return e instanceof Date||\"[object Date]\"===Object.prototype.toString.call(e)}function f(e,t){var n,s=[];for(n=0;n<e.length;++n)s.push(t(e[n],n));return s}function m(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function _(e,t){for(var n in t)m(t,n)&&(e[n]=t[n]);return m(t,\"toString\")&&(e.toString=t.toString),m(t,\"valueOf\")&&(e.valueOf=t.valueOf),e}function y(e,t,n,s){return Ot(e,t,n,s,!0).utc()}function g(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function p(e){if(null==e._isValid){var t=g(e),n=i.call(t.parsedDateParts,function(e){return null!=e}),s=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(s=s&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return s;e._isValid=s}return e._isValid}function v(e){var t=y(NaN);return null!=e?_(g(t),e):g(t).userInvalidated=!0,t}i=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,s=0;s<n;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1};var r=c.momentProperties=[];function w(e,t){var n,s,i;if(l(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),l(t._i)||(e._i=t._i),l(t._f)||(e._f=t._f),l(t._l)||(e._l=t._l),l(t._strict)||(e._strict=t._strict),l(t._tzm)||(e._tzm=t._tzm),l(t._isUTC)||(e._isUTC=t._isUTC),l(t._offset)||(e._offset=t._offset),l(t._pf)||(e._pf=g(t)),l(t._locale)||(e._locale=t._locale),0<r.length)for(n=0;n<r.length;n++)l(i=t[s=r[n]])||(e[s]=i);return e}var t=!1;function M(e){w(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===t&&(t=!0,c.updateOffset(this),t=!1)}function S(e){return e instanceof M||null!=e&&null!=e._isAMomentObject}function D(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function k(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=D(t)),n}function a(e,t,n){var s,i=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),a=0;for(s=0;s<i;s++)(n&&e[s]!==t[s]||!n&&k(e[s])!==k(t[s]))&&a++;return a+r}function Y(e){!1===c.suppressDeprecationWarnings&&\"undefined\"!=typeof console&&console.warn&&console.warn(\"Deprecation warning: \"+e)}function n(i,r){var a=!0;return _(function(){if(null!=c.deprecationHandler&&c.deprecationHandler(null,i),a){for(var e,t=[],n=0;n<arguments.length;n++){if(e=\"\",\"object\"==typeof arguments[n]){for(var s in e+=\"\\n[\"+n+\"] \",arguments[0])e+=s+\": \"+arguments[0][s]+\", \";e=e.slice(0,-2)}else e=arguments[n];t.push(e)}Y(i+\"\\nArguments: \"+Array.prototype.slice.call(t).join(\"\")+\"\\n\"+(new Error).stack),a=!1}return r.apply(this,arguments)},r)}var s,O={};function T(e,t){null!=c.deprecationHandler&&c.deprecationHandler(e,t),O[e]||(Y(t),O[e]=!0)}function x(e){return e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}function b(e,t){var n,s=_({},e);for(n in t)m(t,n)&&(u(e[n])&&u(t[n])?(s[n]={},_(s[n],e[n]),_(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)m(e,n)&&!m(t,n)&&u(e[n])&&(s[n]=_({},s[n]));return s}function P(e){null!=e&&this.set(e)}c.suppressDeprecationWarnings=!1,c.deprecationHandler=null,s=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)m(e,t)&&n.push(t);return n};var W={};function H(e,t){var n=e.toLowerCase();W[n]=W[n+\"s\"]=W[t]=e}function R(e){return\"string\"==typeof e?W[e]||W[e.toLowerCase()]:void 0}function C(e){var t,n,s={};for(n in e)m(e,n)&&(t=R(n))&&(s[t]=e[n]);return s}var F={};function L(e,t){F[e]=t}function U(e,t,n){var s=\"\"+Math.abs(e),i=t-s.length;return(0<=e?n?\"+\":\"\":\"-\")+Math.pow(10,Math.max(0,i)).toString().substr(1)+s}var N=/(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,G=/(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,V={},E={};function I(e,t,n,s){var i=s;\"string\"==typeof s&&(i=function(){return this[s]()}),e&&(E[e]=i),t&&(E[t[0]]=function(){return U(i.apply(this,arguments),t[1],t[2])}),n&&(E[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function A(e,t){return e.isValid()?(t=j(t,e.localeData()),V[t]=V[t]||function(s){var e,i,t,r=s.match(N);for(e=0,i=r.length;e<i;e++)E[r[e]]?r[e]=E[r[e]]:r[e]=(t=r[e]).match(/\\[[\\s\\S]/)?t.replace(/^\\[|\\]$/g,\"\"):t.replace(/\\\\/g,\"\");return function(e){var t,n=\"\";for(t=0;t<i;t++)n+=x(r[t])?r[t].call(e,s):r[t];return n}}(t),V[t](e)):e.localeData().invalidDate()}function j(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(G.lastIndex=0;0<=n&&G.test(e);)e=e.replace(G,s),G.lastIndex=0,n-=1;return e}var Z=/\\d/,z=/\\d\\d/,$=/\\d{3}/,q=/\\d{4}/,J=/[+-]?\\d{6}/,B=/\\d\\d?/,Q=/\\d\\d\\d\\d?/,X=/\\d\\d\\d\\d\\d\\d?/,K=/\\d{1,3}/,ee=/\\d{1,4}/,te=/[+-]?\\d{1,6}/,ne=/\\d+/,se=/[+-]?\\d+/,ie=/Z|[+-]\\d\\d:?\\d\\d/gi,re=/Z|[+-]\\d\\d(?::?\\d\\d)?/gi,ae=/[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,oe={};function ue(e,n,s){oe[e]=x(n)?n:function(e,t){return e&&s?s:n}}function le(e,t){return m(oe,e)?oe[e](t._strict,t._locale):new RegExp(de(e.replace(\"\\\\\",\"\").replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,function(e,t,n,s,i){return t||n||s||i})))}function de(e){return e.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g,\"\\\\$&\")}var he={};function ce(e,n){var t,s=n;for(\"string\"==typeof e&&(e=[e]),d(n)&&(s=function(e,t){t[n]=k(e)}),t=0;t<e.length;t++)he[e[t]]=s}function fe(e,i){ce(e,function(e,t,n,s){n._w=n._w||{},i(e,n._w,n,s)})}var me=0,_e=1,ye=2,ge=3,pe=4,ve=5,we=6,Me=7,Se=8;function De(e){return ke(e)?366:365}function ke(e){return e%4==0&&e%100!=0||e%400==0}I(\"Y\",0,0,function(){var e=this.year();return e<=9999?\"\"+e:\"+\"+e}),I(0,[\"YY\",2],0,function(){return this.year()%100}),I(0,[\"YYYY\",4],0,\"year\"),I(0,[\"YYYYY\",5],0,\"year\"),I(0,[\"YYYYYY\",6,!0],0,\"year\"),H(\"year\",\"y\"),L(\"year\",1),ue(\"Y\",se),ue(\"YY\",B,z),ue(\"YYYY\",ee,q),ue(\"YYYYY\",te,J),ue(\"YYYYYY\",te,J),ce([\"YYYYY\",\"YYYYYY\"],me),ce(\"YYYY\",function(e,t){t[me]=2===e.length?c.parseTwoDigitYear(e):k(e)}),ce(\"YY\",function(e,t){t[me]=c.parseTwoDigitYear(e)}),ce(\"Y\",function(e,t){t[me]=parseInt(e,10)}),c.parseTwoDigitYear=function(e){return k(e)+(68<k(e)?1900:2e3)};var Ye,Oe=Te(\"FullYear\",!0);function Te(t,n){return function(e){return null!=e?(be(this,t,e),c.updateOffset(this,n),this):xe(this,t)}}function xe(e,t){return e.isValid()?e._d[\"get\"+(e._isUTC?\"UTC\":\"\")+t]():NaN}function be(e,t,n){e.isValid()&&!isNaN(n)&&(\"FullYear\"===t&&ke(e.year())&&1===e.month()&&29===e.date()?e._d[\"set\"+(e._isUTC?\"UTC\":\"\")+t](n,e.month(),Pe(n,e.month())):e._d[\"set\"+(e._isUTC?\"UTC\":\"\")+t](n))}function Pe(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,s=(t%(n=12)+n)%n;return e+=(t-s)/12,1===s?ke(e)?29:28:31-s%7%2}Ye=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},I(\"M\",[\"MM\",2],\"Mo\",function(){return this.month()+1}),I(\"MMM\",0,0,function(e){return this.localeData().monthsShort(this,e)}),I(\"MMMM\",0,0,function(e){return this.localeData().months(this,e)}),H(\"month\",\"M\"),L(\"month\",8),ue(\"M\",B),ue(\"MM\",B,z),ue(\"MMM\",function(e,t){return t.monthsShortRegex(e)}),ue(\"MMMM\",function(e,t){return t.monthsRegex(e)}),ce([\"M\",\"MM\"],function(e,t){t[_e]=k(e)-1}),ce([\"MMM\",\"MMMM\"],function(e,t,n,s){var i=n._locale.monthsParse(e,s,n._strict);null!=i?t[_e]=i:g(n).invalidMonth=e});var We=/D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,He=\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\");var Re=\"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec\".split(\"_\");function Ce(e,t){var n;if(!e.isValid())return e;if(\"string\"==typeof t)if(/^\\d+$/.test(t))t=k(t);else if(!d(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Pe(e.year(),t)),e._d[\"set\"+(e._isUTC?\"UTC\":\"\")+\"Month\"](t,n),e}function Fe(e){return null!=e?(Ce(this,e),c.updateOffset(this,!0),this):xe(this,\"Month\")}var Le=ae;var Ue=ae;function Ne(){function e(e,t){return t.length-e.length}var t,n,s=[],i=[],r=[];for(t=0;t<12;t++)n=y([2e3,t]),s.push(this.monthsShort(n,\"\")),i.push(this.months(n,\"\")),r.push(this.months(n,\"\")),r.push(this.monthsShort(n,\"\"));for(s.sort(e),i.sort(e),r.sort(e),t=0;t<12;t++)s[t]=de(s[t]),i[t]=de(i[t]);for(t=0;t<24;t++)r[t]=de(r[t]);this._monthsRegex=new RegExp(\"^(\"+r.join(\"|\")+\")\",\"i\"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp(\"^(\"+i.join(\"|\")+\")\",\"i\"),this._monthsShortStrictRegex=new RegExp(\"^(\"+s.join(\"|\")+\")\",\"i\")}function Ge(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&0<=e&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function Ve(e,t,n){var s=7+t-n;return-((7+Ge(e,0,s).getUTCDay()-t)%7)+s-1}function Ee(e,t,n,s,i){var r,a,o=1+7*(t-1)+(7+n-s)%7+Ve(e,s,i);return o<=0?a=De(r=e-1)+o:o>De(e)?(r=e+1,a=o-De(e)):(r=e,a=o),{year:r,dayOfYear:a}}function Ie(e,t,n){var s,i,r=Ve(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+Ae(i=e.year()-1,t,n):a>Ae(e.year(),t,n)?(s=a-Ae(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function Ae(e,t,n){var s=Ve(e,t,n),i=Ve(e+1,t,n);return(De(e)-s+i)/7}I(\"w\",[\"ww\",2],\"wo\",\"week\"),I(\"W\",[\"WW\",2],\"Wo\",\"isoWeek\"),H(\"week\",\"w\"),H(\"isoWeek\",\"W\"),L(\"week\",5),L(\"isoWeek\",5),ue(\"w\",B),ue(\"ww\",B,z),ue(\"W\",B),ue(\"WW\",B,z),fe([\"w\",\"ww\",\"W\",\"WW\"],function(e,t,n,s){t[s.substr(0,1)]=k(e)});I(\"d\",0,\"do\",\"day\"),I(\"dd\",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),I(\"ddd\",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),I(\"dddd\",0,0,function(e){return this.localeData().weekdays(this,e)}),I(\"e\",0,0,\"weekday\"),I(\"E\",0,0,\"isoWeekday\"),H(\"day\",\"d\"),H(\"weekday\",\"e\"),H(\"isoWeekday\",\"E\"),L(\"day\",11),L(\"weekday\",11),L(\"isoWeekday\",11),ue(\"d\",B),ue(\"e\",B),ue(\"E\",B),ue(\"dd\",function(e,t){return t.weekdaysMinRegex(e)}),ue(\"ddd\",function(e,t){return t.weekdaysShortRegex(e)}),ue(\"dddd\",function(e,t){return t.weekdaysRegex(e)}),fe([\"dd\",\"ddd\",\"dddd\"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e}),fe([\"d\",\"e\",\"E\"],function(e,t,n,s){t[s]=k(e)});var je=\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\");var Ze=\"Sun_Mon_Tue_Wed_Thu_Fri_Sat\".split(\"_\");var ze=\"Su_Mo_Tu_We_Th_Fr_Sa\".split(\"_\");var $e=ae;var qe=ae;var Je=ae;function Be(){function e(e,t){return t.length-e.length}var t,n,s,i,r,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=y([2e3,1]).day(t),s=this.weekdaysMin(n,\"\"),i=this.weekdaysShort(n,\"\"),r=this.weekdays(n,\"\"),a.push(s),o.push(i),u.push(r),l.push(s),l.push(i),l.push(r);for(a.sort(e),o.sort(e),u.sort(e),l.sort(e),t=0;t<7;t++)o[t]=de(o[t]),u[t]=de(u[t]),l[t]=de(l[t]);this._weekdaysRegex=new RegExp(\"^(\"+l.join(\"|\")+\")\",\"i\"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp(\"^(\"+u.join(\"|\")+\")\",\"i\"),this._weekdaysShortStrictRegex=new RegExp(\"^(\"+o.join(\"|\")+\")\",\"i\"),this._weekdaysMinStrictRegex=new RegExp(\"^(\"+a.join(\"|\")+\")\",\"i\")}function Qe(){return this.hours()%12||12}function Xe(e,t){I(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Ke(e,t){return t._meridiemParse}I(\"H\",[\"HH\",2],0,\"hour\"),I(\"h\",[\"hh\",2],0,Qe),I(\"k\",[\"kk\",2],0,function(){return this.hours()||24}),I(\"hmm\",0,0,function(){return\"\"+Qe.apply(this)+U(this.minutes(),2)}),I(\"hmmss\",0,0,function(){return\"\"+Qe.apply(this)+U(this.minutes(),2)+U(this.seconds(),2)}),I(\"Hmm\",0,0,function(){return\"\"+this.hours()+U(this.minutes(),2)}),I(\"Hmmss\",0,0,function(){return\"\"+this.hours()+U(this.minutes(),2)+U(this.seconds(),2)}),Xe(\"a\",!0),Xe(\"A\",!1),H(\"hour\",\"h\"),L(\"hour\",13),ue(\"a\",Ke),ue(\"A\",Ke),ue(\"H\",B),ue(\"h\",B),ue(\"k\",B),ue(\"HH\",B,z),ue(\"hh\",B,z),ue(\"kk\",B,z),ue(\"hmm\",Q),ue(\"hmmss\",X),ue(\"Hmm\",Q),ue(\"Hmmss\",X),ce([\"H\",\"HH\"],ge),ce([\"k\",\"kk\"],function(e,t,n){var s=k(e);t[ge]=24===s?0:s}),ce([\"a\",\"A\"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ce([\"h\",\"hh\"],function(e,t,n){t[ge]=k(e),g(n).bigHour=!0}),ce(\"hmm\",function(e,t,n){var s=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s)),g(n).bigHour=!0}),ce(\"hmmss\",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s,2)),t[ve]=k(e.substr(i)),g(n).bigHour=!0}),ce(\"Hmm\",function(e,t,n){var s=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s))}),ce(\"Hmmss\",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s,2)),t[ve]=k(e.substr(i))});var et,tt=Te(\"Hours\",!0),nt={calendar:{sameDay:\"[Today at] LT\",nextDay:\"[Tomorrow at] LT\",nextWeek:\"dddd [at] LT\",lastDay:\"[Yesterday at] LT\",lastWeek:\"[Last] dddd [at] LT\",sameElse:\"L\"},longDateFormat:{LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"},invalidDate:\"Invalid date\",ordinal:\"%d\",dayOfMonthOrdinalParse:/\\d{1,2}/,relativeTime:{future:\"in %s\",past:\"%s ago\",s:\"a few seconds\",ss:\"%d seconds\",m:\"a minute\",mm:\"%d minutes\",h:\"an hour\",hh:\"%d hours\",d:\"a day\",dd:\"%d days\",M:\"a month\",MM:\"%d months\",y:\"a year\",yy:\"%d years\"},months:He,monthsShort:Re,week:{dow:0,doy:6},weekdays:je,weekdaysMin:ze,weekdaysShort:Ze,meridiemParse:/[ap]\\.?m?\\.?/i},st={},it={};function rt(e){return e?e.toLowerCase().replace(\"_\",\"-\"):e}function at(e){var t=null;if(!st[e]&&\"undefined\"!=typeof module&&module&&module.exports)try{t=et._abbr,require(\"./locale/\"+e),ot(t)}catch(e){}return st[e]}function ot(e,t){var n;return e&&((n=l(t)?lt(e):ut(e,t))?et=n:\"undefined\"!=typeof console&&console.warn&&console.warn(\"Locale \"+e+\" not found. Did you forget to load it?\")),et._abbr}function ut(e,t){if(null!==t){var n,s=nt;if(t.abbr=e,null!=st[e])T(\"defineLocaleOverride\",\"use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.\"),s=st[e]._config;else if(null!=t.parentLocale)if(null!=st[t.parentLocale])s=st[t.parentLocale]._config;else{if(null==(n=at(t.parentLocale)))return it[t.parentLocale]||(it[t.parentLocale]=[]),it[t.parentLocale].push({name:e,config:t}),null;s=n._config}return st[e]=new P(b(s,t)),it[e]&&it[e].forEach(function(e){ut(e.name,e.config)}),ot(e),st[e]}return delete st[e],null}function lt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return et;if(!o(e)){if(t=at(e))return t;e=[e]}return function(e){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=rt(e[r]).split(\"-\")).length,n=(n=rt(e[r+1]))?n.split(\"-\"):null;0<t;){if(s=at(i.slice(0,t).join(\"-\")))return s;if(n&&n.length>=t&&a(i,n,!0)>=t-1)break;t--}r++}return et}(e)}function dt(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[_e]<0||11<n[_e]?_e:n[ye]<1||n[ye]>Pe(n[me],n[_e])?ye:n[ge]<0||24<n[ge]||24===n[ge]&&(0!==n[pe]||0!==n[ve]||0!==n[we])?ge:n[pe]<0||59<n[pe]?pe:n[ve]<0||59<n[ve]?ve:n[we]<0||999<n[we]?we:-1,g(e)._overflowDayOfYear&&(t<me||ye<t)&&(t=ye),g(e)._overflowWeeks&&-1===t&&(t=Me),g(e)._overflowWeekday&&-1===t&&(t=Se),g(e).overflow=t),e}function ht(e,t,n){return null!=e?e:null!=t?t:n}function ct(e){var t,n,s,i,r,a=[];if(!e._d){var o,u;for(o=e,u=new Date(c.now()),s=o._useUTC?[u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()]:[u.getFullYear(),u.getMonth(),u.getDate()],e._w&&null==e._a[ye]&&null==e._a[_e]&&function(e){var t,n,s,i,r,a,o,u;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)r=1,a=4,n=ht(t.GG,e._a[me],Ie(Tt(),1,4).year),s=ht(t.W,1),((i=ht(t.E,1))<1||7<i)&&(u=!0);else{r=e._locale._week.dow,a=e._locale._week.doy;var l=Ie(Tt(),r,a);n=ht(t.gg,e._a[me],l.year),s=ht(t.w,l.week),null!=t.d?((i=t.d)<0||6<i)&&(u=!0):null!=t.e?(i=t.e+r,(t.e<0||6<t.e)&&(u=!0)):i=r}s<1||s>Ae(n,r,a)?g(e)._overflowWeeks=!0:null!=u?g(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[me]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=ht(e._a[me],s[me]),(e._dayOfYear>De(r)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=Ge(r,0,e._dayOfYear),e._a[_e]=n.getUTCMonth(),e._a[ye]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=s[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ge]&&0===e._a[pe]&&0===e._a[ve]&&0===e._a[we]&&(e._nextDay=!0,e._a[ge]=0),e._d=(e._useUTC?Ge:function(e,t,n,s,i,r,a){var o=new Date(e,t,n,s,i,r,a);return e<100&&0<=e&&isFinite(o.getFullYear())&&o.setFullYear(e),o}).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ge]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}var ft=/^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,mt=/^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,_t=/Z|[+-]\\d\\d(?::?\\d\\d)?/,yt=[[\"YYYYYY-MM-DD\",/[+-]\\d{6}-\\d\\d-\\d\\d/],[\"YYYY-MM-DD\",/\\d{4}-\\d\\d-\\d\\d/],[\"GGGG-[W]WW-E\",/\\d{4}-W\\d\\d-\\d/],[\"GGGG-[W]WW\",/\\d{4}-W\\d\\d/,!1],[\"YYYY-DDD\",/\\d{4}-\\d{3}/],[\"YYYY-MM\",/\\d{4}-\\d\\d/,!1],[\"YYYYYYMMDD\",/[+-]\\d{10}/],[\"YYYYMMDD\",/\\d{8}/],[\"GGGG[W]WWE\",/\\d{4}W\\d{3}/],[\"GGGG[W]WW\",/\\d{4}W\\d{2}/,!1],[\"YYYYDDD\",/\\d{7}/]],gt=[[\"HH:mm:ss.SSSS\",/\\d\\d:\\d\\d:\\d\\d\\.\\d+/],[\"HH:mm:ss,SSSS\",/\\d\\d:\\d\\d:\\d\\d,\\d+/],[\"HH:mm:ss\",/\\d\\d:\\d\\d:\\d\\d/],[\"HH:mm\",/\\d\\d:\\d\\d/],[\"HHmmss.SSSS\",/\\d\\d\\d\\d\\d\\d\\.\\d+/],[\"HHmmss,SSSS\",/\\d\\d\\d\\d\\d\\d,\\d+/],[\"HHmmss\",/\\d\\d\\d\\d\\d\\d/],[\"HHmm\",/\\d\\d\\d\\d/],[\"HH\",/\\d\\d/]],pt=/^\\/?Date\\((\\-?\\d+)/i;function vt(e){var t,n,s,i,r,a,o=e._i,u=ft.exec(o)||mt.exec(o);if(u){for(g(e).iso=!0,t=0,n=yt.length;t<n;t++)if(yt[t][1].exec(u[1])){i=yt[t][0],s=!1!==yt[t][2];break}if(null==i)return void(e._isValid=!1);if(u[3]){for(t=0,n=gt.length;t<n;t++)if(gt[t][1].exec(u[3])){r=(u[2]||\" \")+gt[t][0];break}if(null==r)return void(e._isValid=!1)}if(!s&&null!=r)return void(e._isValid=!1);if(u[4]){if(!_t.exec(u[4]))return void(e._isValid=!1);a=\"Z\"}e._f=i+(r||\"\")+(a||\"\"),kt(e)}else e._isValid=!1}var wt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/;function Mt(e,t,n,s,i,r){var a=[function(e){var t=parseInt(e,10);{if(t<=49)return 2e3+t;if(t<=999)return 1900+t}return t}(e),Re.indexOf(t),parseInt(n,10),parseInt(s,10),parseInt(i,10)];return r&&a.push(parseInt(r,10)),a}var St={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Dt(e){var t,n,s,i=wt.exec(e._i.replace(/\\([^)]*\\)|[\\n\\t]/g,\" \").replace(/(\\s\\s+)/g,\" \").trim());if(i){var r=Mt(i[4],i[3],i[2],i[5],i[6],i[7]);if(t=i[1],n=r,s=e,t&&Ze.indexOf(t)!==new Date(n[0],n[1],n[2]).getDay()&&(g(s).weekdayMismatch=!0,!(s._isValid=!1)))return;e._a=r,e._tzm=function(e,t,n){if(e)return St[e];if(t)return 0;var s=parseInt(n,10),i=s%100;return(s-i)/100*60+i}(i[8],i[9],i[10]),e._d=Ge.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function kt(e){if(e._f!==c.ISO_8601)if(e._f!==c.RFC_2822){e._a=[],g(e).empty=!0;var t,n,s,i,r,a,o,u,l=\"\"+e._i,d=l.length,h=0;for(s=j(e._f,e._locale).match(N)||[],t=0;t<s.length;t++)i=s[t],(n=(l.match(le(i,e))||[])[0])&&(0<(r=l.substr(0,l.indexOf(n))).length&&g(e).unusedInput.push(r),l=l.slice(l.indexOf(n)+n.length),h+=n.length),E[i]?(n?g(e).empty=!1:g(e).unusedTokens.push(i),a=i,u=e,null!=(o=n)&&m(he,a)&&he[a](o,u._a,u,a)):e._strict&&!n&&g(e).unusedTokens.push(i);g(e).charsLeftOver=d-h,0<l.length&&g(e).unusedInput.push(l),e._a[ge]<=12&&!0===g(e).bigHour&&0<e._a[ge]&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[ge]=function(e,t,n){var s;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):(null!=e.isPM&&((s=e.isPM(n))&&t<12&&(t+=12),s||12!==t||(t=0)),t)}(e._locale,e._a[ge],e._meridiem),ct(e),dt(e)}else Dt(e);else vt(e)}function Yt(e){var t,n,s,i,r=e._i,a=e._f;return e._locale=e._locale||lt(e._l),null===r||void 0===a&&\"\"===r?v({nullInput:!0}):(\"string\"==typeof r&&(e._i=r=e._locale.preparse(r)),S(r)?new M(dt(r)):(h(r)?e._d=r:o(a)?function(e){var t,n,s,i,r;if(0===e._f.length)return g(e).invalidFormat=!0,e._d=new Date(NaN);for(i=0;i<e._f.length;i++)r=0,t=w({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],kt(t),p(t)&&(r+=g(t).charsLeftOver,r+=10*g(t).unusedTokens.length,g(t).score=r,(null==s||r<s)&&(s=r,n=t));_(e,n||t)}(e):a?kt(e):l(n=(t=e)._i)?t._d=new Date(c.now()):h(n)?t._d=new Date(n.valueOf()):\"string\"==typeof n?(s=t,null===(i=pt.exec(s._i))?(vt(s),!1===s._isValid&&(delete s._isValid,Dt(s),!1===s._isValid&&(delete s._isValid,c.createFromInputFallback(s)))):s._d=new Date(+i[1])):o(n)?(t._a=f(n.slice(0),function(e){return parseInt(e,10)}),ct(t)):u(n)?function(e){if(!e._d){var t=C(e._i);e._a=f([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),ct(e)}}(t):d(n)?t._d=new Date(n):c.createFromInputFallback(t),p(e)||(e._d=null),e))}function Ot(e,t,n,s,i){var r,a={};return!0!==n&&!1!==n||(s=n,n=void 0),(u(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||o(e)&&0===e.length)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=e,a._f=t,a._strict=s,(r=new M(dt(Yt(a))))._nextDay&&(r.add(1,\"d\"),r._nextDay=void 0),r}function Tt(e,t,n,s){return Ot(e,t,n,s,!1)}c.createFromInputFallback=n(\"value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.\",function(e){e._d=new Date(e._i+(e._useUTC?\" UTC\":\"\"))}),c.ISO_8601=function(){},c.RFC_2822=function(){};var xt=n(\"moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/\",function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:v()}),bt=n(\"moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/\",function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:v()});function Pt(e,t){var n,s;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Tt();for(n=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](n)||(n=t[s]);return n}var Wt=[\"year\",\"quarter\",\"month\",\"week\",\"day\",\"hour\",\"minute\",\"second\",\"millisecond\"];function Ht(e){var t=C(e),n=t.year||0,s=t.quarter||0,i=t.month||0,r=t.week||0,a=t.day||0,o=t.hour||0,u=t.minute||0,l=t.second||0,d=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===Ye.call(Wt,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,s=0;s<Wt.length;++s)if(e[Wt[s]]){if(n)return!1;parseFloat(e[Wt[s]])!==k(e[Wt[s]])&&(n=!0)}return!0}(t),this._milliseconds=+d+1e3*l+6e4*u+1e3*o*60*60,this._days=+a+7*r,this._months=+i+3*s+12*n,this._data={},this._locale=lt(),this._bubble()}function Rt(e){return e instanceof Ht}function Ct(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ft(e,n){I(e,0,0,function(){var e=this.utcOffset(),t=\"+\";return e<0&&(e=-e,t=\"-\"),t+U(~~(e/60),2)+n+U(~~e%60,2)})}Ft(\"Z\",\":\"),Ft(\"ZZ\",\"\"),ue(\"Z\",re),ue(\"ZZ\",re),ce([\"Z\",\"ZZ\"],function(e,t,n){n._useUTC=!0,n._tzm=Ut(re,e)});var Lt=/([\\+\\-]|\\d\\d)/gi;function Ut(e,t){var n=(t||\"\").match(e);if(null===n)return null;var s=((n[n.length-1]||[])+\"\").match(Lt)||[\"-\",0,0],i=60*s[1]+k(s[2]);return 0===i?0:\"+\"===s[0]?i:-i}function Nt(e,t){var n,s;return t._isUTC?(n=t.clone(),s=(S(e)||h(e)?e.valueOf():Tt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+s),c.updateOffset(n,!1),n):Tt(e).local()}function Gt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Vt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}c.updateOffset=function(){};var Et=/^(\\-|\\+)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/,It=/^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function At(e,t){var n,s,i,r=e,a=null;return Rt(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:d(e)?(r={},t?r[t]=e:r.milliseconds=e):(a=Et.exec(e))?(n=\"-\"===a[1]?-1:1,r={y:0,d:k(a[ye])*n,h:k(a[ge])*n,m:k(a[pe])*n,s:k(a[ve])*n,ms:k(Ct(1e3*a[we]))*n}):(a=It.exec(e))?(n=\"-\"===a[1]?-1:(a[1],1),r={y:jt(a[2],n),M:jt(a[3],n),w:jt(a[4],n),d:jt(a[5],n),h:jt(a[6],n),m:jt(a[7],n),s:jt(a[8],n)}):null==r?r={}:\"object\"==typeof r&&(\"from\"in r||\"to\"in r)&&(i=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Nt(t,e),e.isBefore(t)?n=Zt(e,t):((n=Zt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(Tt(r.from),Tt(r.to)),(r={}).ms=i.milliseconds,r.M=i.months),s=new Ht(r),Rt(e)&&m(e,\"_locale\")&&(s._locale=e._locale),s}function jt(e,t){var n=e&&parseFloat(e.replace(\",\",\".\"));return(isNaN(n)?0:n)*t}function Zt(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,\"M\").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,\"M\"),n}function zt(s,i){return function(e,t){var n;return null===t||isNaN(+t)||(T(i,\"moment().\"+i+\"(period, number) is deprecated. Please use moment().\"+i+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),n=e,e=t,t=n),$t(this,At(e=\"string\"==typeof e?+e:e,t),s),this}}function $t(e,t,n,s){var i=t._milliseconds,r=Ct(t._days),a=Ct(t._months);e.isValid()&&(s=null==s||s,a&&Ce(e,xe(e,\"Month\")+a*n),r&&be(e,\"Date\",xe(e,\"Date\")+r*n),i&&e._d.setTime(e._d.valueOf()+i*n),s&&c.updateOffset(e,r||a))}At.fn=Ht.prototype,At.invalid=function(){return At(NaN)};var qt=zt(1,\"add\"),Jt=zt(-1,\"subtract\");function Bt(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),s=e.clone().add(n,\"months\");return-(n+(t-s<0?(t-s)/(s-e.clone().add(n-1,\"months\")):(t-s)/(e.clone().add(n+1,\"months\")-s)))||0}function Qt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=lt(e))&&(this._locale=t),this)}c.defaultFormat=\"YYYY-MM-DDTHH:mm:ssZ\",c.defaultFormatUtc=\"YYYY-MM-DDTHH:mm:ss[Z]\";var Xt=n(\"moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.\",function(e){return void 0===e?this.localeData():this.locale(e)});function Kt(){return this._locale}function en(e,t){I(0,[e,e.length],0,t)}function tn(e,t,n,s,i){var r;return null==e?Ie(this,s,i).year:((r=Ae(e,s,i))<t&&(t=r),function(e,t,n,s,i){var r=Ee(e,t,n,s,i),a=Ge(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,n,s,i))}I(0,[\"gg\",2],0,function(){return this.weekYear()%100}),I(0,[\"GG\",2],0,function(){return this.isoWeekYear()%100}),en(\"gggg\",\"weekYear\"),en(\"ggggg\",\"weekYear\"),en(\"GGGG\",\"isoWeekYear\"),en(\"GGGGG\",\"isoWeekYear\"),H(\"weekYear\",\"gg\"),H(\"isoWeekYear\",\"GG\"),L(\"weekYear\",1),L(\"isoWeekYear\",1),ue(\"G\",se),ue(\"g\",se),ue(\"GG\",B,z),ue(\"gg\",B,z),ue(\"GGGG\",ee,q),ue(\"gggg\",ee,q),ue(\"GGGGG\",te,J),ue(\"ggggg\",te,J),fe([\"gggg\",\"ggggg\",\"GGGG\",\"GGGGG\"],function(e,t,n,s){t[s.substr(0,2)]=k(e)}),fe([\"gg\",\"GG\"],function(e,t,n,s){t[s]=c.parseTwoDigitYear(e)}),I(\"Q\",0,\"Qo\",\"quarter\"),H(\"quarter\",\"Q\"),L(\"quarter\",7),ue(\"Q\",Z),ce(\"Q\",function(e,t){t[_e]=3*(k(e)-1)}),I(\"D\",[\"DD\",2],\"Do\",\"date\"),H(\"date\",\"D\"),L(\"date\",9),ue(\"D\",B),ue(\"DD\",B,z),ue(\"Do\",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),ce([\"D\",\"DD\"],ye),ce(\"Do\",function(e,t){t[ye]=k(e.match(B)[0])});var nn=Te(\"Date\",!0);I(\"DDD\",[\"DDDD\",3],\"DDDo\",\"dayOfYear\"),H(\"dayOfYear\",\"DDD\"),L(\"dayOfYear\",4),ue(\"DDD\",K),ue(\"DDDD\",$),ce([\"DDD\",\"DDDD\"],function(e,t,n){n._dayOfYear=k(e)}),I(\"m\",[\"mm\",2],0,\"minute\"),H(\"minute\",\"m\"),L(\"minute\",14),ue(\"m\",B),ue(\"mm\",B,z),ce([\"m\",\"mm\"],pe);var sn=Te(\"Minutes\",!1);I(\"s\",[\"ss\",2],0,\"second\"),H(\"second\",\"s\"),L(\"second\",15),ue(\"s\",B),ue(\"ss\",B,z),ce([\"s\",\"ss\"],ve);var rn,an=Te(\"Seconds\",!1);for(I(\"S\",0,0,function(){return~~(this.millisecond()/100)}),I(0,[\"SS\",2],0,function(){return~~(this.millisecond()/10)}),I(0,[\"SSS\",3],0,\"millisecond\"),I(0,[\"SSSS\",4],0,function(){return 10*this.millisecond()}),I(0,[\"SSSSS\",5],0,function(){return 100*this.millisecond()}),I(0,[\"SSSSSS\",6],0,function(){return 1e3*this.millisecond()}),I(0,[\"SSSSSSS\",7],0,function(){return 1e4*this.millisecond()}),I(0,[\"SSSSSSSS\",8],0,function(){return 1e5*this.millisecond()}),I(0,[\"SSSSSSSSS\",9],0,function(){return 1e6*this.millisecond()}),H(\"millisecond\",\"ms\"),L(\"millisecond\",16),ue(\"S\",K,Z),ue(\"SS\",K,z),ue(\"SSS\",K,$),rn=\"SSSS\";rn.length<=9;rn+=\"S\")ue(rn,ne);function on(e,t){t[we]=k(1e3*(\"0.\"+e))}for(rn=\"S\";rn.length<=9;rn+=\"S\")ce(rn,on);var un=Te(\"Milliseconds\",!1);I(\"z\",0,0,\"zoneAbbr\"),I(\"zz\",0,0,\"zoneName\");var ln=M.prototype;function dn(e){return e}ln.add=qt,ln.calendar=function(e,t){var n=e||Tt(),s=Nt(n,this).startOf(\"day\"),i=c.calendarFormat(this,s)||\"sameElse\",r=t&&(x(t[i])?t[i].call(this,n):t[i]);return this.format(r||this.localeData().calendar(i,this,Tt(n)))},ln.clone=function(){return new M(this)},ln.diff=function(e,t,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=Nt(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=R(t)){case\"year\":r=Bt(this,s)/12;break;case\"month\":r=Bt(this,s);break;case\"quarter\":r=Bt(this,s)/3;break;case\"second\":r=(this-s)/1e3;break;case\"minute\":r=(this-s)/6e4;break;case\"hour\":r=(this-s)/36e5;break;case\"day\":r=(this-s-i)/864e5;break;case\"week\":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:D(r)},ln.endOf=function(e){return void 0===(e=R(e))||\"millisecond\"===e?this:(\"date\"===e&&(e=\"day\"),this.startOf(e).add(1,\"isoWeek\"===e?\"week\":e).subtract(1,\"ms\"))},ln.format=function(e){e||(e=this.isUtc()?c.defaultFormatUtc:c.defaultFormat);var t=A(this,e);return this.localeData().postformat(t)},ln.from=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Tt(e).isValid())?At({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},ln.fromNow=function(e){return this.from(Tt(),e)},ln.to=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Tt(e).isValid())?At({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},ln.toNow=function(e){return this.to(Tt(),e)},ln.get=function(e){return x(this[e=R(e)])?this[e]():this},ln.invalidAt=function(){return g(this).overflow},ln.isAfter=function(e,t){var n=S(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&(\"millisecond\"===(t=R(l(t)?\"millisecond\":t))?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},ln.isBefore=function(e,t){var n=S(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&(\"millisecond\"===(t=R(l(t)?\"millisecond\":t))?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},ln.isBetween=function(e,t,n,s){return(\"(\"===(s=s||\"()\")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(\")\"===s[1]?this.isBefore(t,n):!this.isAfter(t,n))},ln.isSame=function(e,t){var n,s=S(e)?e:Tt(e);return!(!this.isValid()||!s.isValid())&&(\"millisecond\"===(t=R(t||\"millisecond\"))?this.valueOf()===s.valueOf():(n=s.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},ln.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},ln.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},ln.isValid=function(){return p(this)},ln.lang=Xt,ln.locale=Qt,ln.localeData=Kt,ln.max=bt,ln.min=xt,ln.parsingFlags=function(){return _({},g(this))},ln.set=function(e,t){if(\"object\"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:F[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}(e=C(e)),s=0;s<n.length;s++)this[n[s].unit](e[n[s].unit]);else if(x(this[e=R(e)]))return this[e](t);return this},ln.startOf=function(e){switch(e=R(e)){case\"year\":this.month(0);case\"quarter\":case\"month\":this.date(1);case\"week\":case\"isoWeek\":case\"day\":case\"date\":this.hours(0);case\"hour\":this.minutes(0);case\"minute\":this.seconds(0);case\"second\":this.milliseconds(0)}return\"week\"===e&&this.weekday(0),\"isoWeek\"===e&&this.isoWeekday(1),\"quarter\"===e&&this.month(3*Math.floor(this.month()/3)),this},ln.subtract=Jt,ln.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},ln.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},ln.toDate=function(){return new Date(this.valueOf())},ln.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||9999<n.year()?A(n,t?\"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]\":\"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ\"):x(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace(\"Z\",A(n,\"Z\")):A(n,t?\"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]\":\"YYYY-MM-DD[T]HH:mm:ss.SSSZ\")},ln.inspect=function(){if(!this.isValid())return\"moment.invalid(/* \"+this._i+\" */)\";var e=\"moment\",t=\"\";this.isLocal()||(e=0===this.utcOffset()?\"moment.utc\":\"moment.parseZone\",t=\"Z\");var n=\"[\"+e+'(\"]',s=0<=this.year()&&this.year()<=9999?\"YYYY\":\"YYYYYY\",i=t+'[\")]';return this.format(n+s+\"-MM-DD[T]HH:mm:ss.SSS\"+i)},ln.toJSON=function(){return this.isValid()?this.toISOString():null},ln.toString=function(){return this.clone().locale(\"en\").format(\"ddd MMM DD YYYY HH:mm:ss [GMT]ZZ\")},ln.unix=function(){return Math.floor(this.valueOf()/1e3)},ln.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},ln.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},ln.year=Oe,ln.isLeapYear=function(){return ke(this.year())},ln.weekYear=function(e){return tn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},ln.isoWeekYear=function(e){return tn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},ln.quarter=ln.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},ln.month=Fe,ln.daysInMonth=function(){return Pe(this.year(),this.month())},ln.week=ln.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),\"d\")},ln.isoWeek=ln.isoWeeks=function(e){var t=Ie(this,1,4).week;return null==e?t:this.add(7*(e-t),\"d\")},ln.weeksInYear=function(){var e=this.localeData()._week;return Ae(this.year(),e.dow,e.doy)},ln.isoWeeksInYear=function(){return Ae(this.year(),1,4)},ln.date=nn,ln.day=ln.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t,n,s=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(t=e,n=this.localeData(),e=\"string\"!=typeof t?t:isNaN(t)?\"number\"==typeof(t=n.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-s,\"d\")):s},ln.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,\"d\")},ln.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=(n=e,s=this.localeData(),\"string\"==typeof n?s.weekdaysParse(n)%7||7:isNaN(n)?null:n);return this.day(this.day()%7?t:t-7)}return this.day()||7;var n,s},ln.dayOfYear=function(e){var t=Math.round((this.clone().startOf(\"day\")-this.clone().startOf(\"year\"))/864e5)+1;return null==e?t:this.add(e-t,\"d\")},ln.hour=ln.hours=tt,ln.minute=ln.minutes=sn,ln.second=ln.seconds=an,ln.millisecond=ln.milliseconds=un,ln.utcOffset=function(e,t,n){var s,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if(\"string\"==typeof e){if(null===(e=Ut(re,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(s=Gt(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,\"m\"),i!==e&&(!t||this._changeInProgress?$t(this,At(e-i,\"m\"),1,!1):this._changeInProgress||(this._changeInProgress=!0,c.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Gt(this)},ln.utc=function(e){return this.utcOffset(0,e)},ln.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Gt(this),\"m\")),this},ln.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if(\"string\"==typeof this._i){var e=Ut(ie,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},ln.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Tt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},ln.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},ln.isLocal=function(){return!!this.isValid()&&!this._isUTC},ln.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},ln.isUtc=Vt,ln.isUTC=Vt,ln.zoneAbbr=function(){return this._isUTC?\"UTC\":\"\"},ln.zoneName=function(){return this._isUTC?\"Coordinated Universal Time\":\"\"},ln.dates=n(\"dates accessor is deprecated. Use date instead.\",nn),ln.months=n(\"months accessor is deprecated. Use month instead\",Fe),ln.years=n(\"years accessor is deprecated. Use year instead\",Oe),ln.zone=n(\"moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/\",function(e,t){return null!=e?(\"string\"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),ln.isDSTShifted=n(\"isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information\",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e={};if(w(e,this),(e=Yt(e))._a){var t=e._isUTC?y(e._a):Tt(e._a);this._isDSTShifted=this.isValid()&&0<a(e._a,t.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted});var hn=P.prototype;function cn(e,t,n,s){var i=lt(),r=y().set(s,t);return i[n](r,e)}function fn(e,t,n){if(d(e)&&(t=e,e=void 0),e=e||\"\",null!=t)return cn(e,t,n,\"month\");var s,i=[];for(s=0;s<12;s++)i[s]=cn(e,s,n,\"month\");return i}function mn(e,t,n,s){\"boolean\"==typeof e?d(t)&&(n=t,t=void 0):(t=e,e=!1,d(n=t)&&(n=t,t=void 0)),t=t||\"\";var i,r=lt(),a=e?r._week.dow:0;if(null!=n)return cn(t,(n+a)%7,s,\"day\");var o=[];for(i=0;i<7;i++)o[i]=cn(t,(i+a)%7,s,\"day\");return o}hn.calendar=function(e,t,n){var s=this._calendar[e]||this._calendar.sameElse;return x(s)?s.call(t,n):s},hn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},hn.invalidDate=function(){return this._invalidDate},hn.ordinal=function(e){return this._ordinal.replace(\"%d\",e)},hn.preparse=dn,hn.postformat=dn,hn.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return x(i)?i(e,t,n,s):i.replace(/%d/i,e)},hn.pastFuture=function(e,t){var n=this._relativeTime[0<e?\"future\":\"past\"];return x(n)?n(t):n.replace(/%s/i,t)},hn.set=function(e){var t,n;for(n in e)x(t=e[n])?this[n]=t:this[\"_\"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+\"|\"+/\\d{1,2}/.source)},hn.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||We).test(t)?\"format\":\"standalone\"][e.month()]:o(this._months)?this._months:this._months.standalone},hn.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[We.test(t)?\"format\":\"standalone\"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},hn.monthsParse=function(e,t,n){var s,i,r;if(this._monthsParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=y([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,\"\").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,\"\").toLocaleLowerCase();return n?\"MMM\"===t?-1!==(i=Ye.call(this._shortMonthsParse,a))?i:null:-1!==(i=Ye.call(this._longMonthsParse,a))?i:null:\"MMM\"===t?-1!==(i=Ye.call(this._shortMonthsParse,a))?i:-1!==(i=Ye.call(this._longMonthsParse,a))?i:null:-1!==(i=Ye.call(this._longMonthsParse,a))?i:-1!==(i=Ye.call(this._shortMonthsParse,a))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=y([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp(\"^\"+this.months(i,\"\").replace(\".\",\"\")+\"$\",\"i\"),this._shortMonthsParse[s]=new RegExp(\"^\"+this.monthsShort(i,\"\").replace(\".\",\"\")+\"$\",\"i\")),n||this._monthsParse[s]||(r=\"^\"+this.months(i,\"\")+\"|^\"+this.monthsShort(i,\"\"),this._monthsParse[s]=new RegExp(r.replace(\".\",\"\"),\"i\")),n&&\"MMMM\"===t&&this._longMonthsParse[s].test(e))return s;if(n&&\"MMM\"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},hn.monthsRegex=function(e){return this._monthsParseExact?(m(this,\"_monthsRegex\")||Ne.call(this),e?this._monthsStrictRegex:this._monthsRegex):(m(this,\"_monthsRegex\")||(this._monthsRegex=Ue),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},hn.monthsShortRegex=function(e){return this._monthsParseExact?(m(this,\"_monthsRegex\")||Ne.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(m(this,\"_monthsShortRegex\")||(this._monthsShortRegex=Le),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},hn.week=function(e){return Ie(e,this._week.dow,this._week.doy).week},hn.firstDayOfYear=function(){return this._week.doy},hn.firstDayOfWeek=function(){return this._week.dow},hn.weekdays=function(e,t){return e?o(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?\"format\":\"standalone\"][e.day()]:o(this._weekdays)?this._weekdays:this._weekdays.standalone},hn.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},hn.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},hn.weekdaysParse=function(e,t,n){var s,i,r;if(this._weekdaysParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=y([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,\"\").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,\"\").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,\"\").toLocaleLowerCase();return n?\"dddd\"===t?-1!==(i=Ye.call(this._weekdaysParse,a))?i:null:\"ddd\"===t?-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:\"dddd\"===t?-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:\"ddd\"===t?-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=y([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp(\"^\"+this.weekdays(i,\"\").replace(\".\",\".?\")+\"$\",\"i\"),this._shortWeekdaysParse[s]=new RegExp(\"^\"+this.weekdaysShort(i,\"\").replace(\".\",\".?\")+\"$\",\"i\"),this._minWeekdaysParse[s]=new RegExp(\"^\"+this.weekdaysMin(i,\"\").replace(\".\",\".?\")+\"$\",\"i\")),this._weekdaysParse[s]||(r=\"^\"+this.weekdays(i,\"\")+\"|^\"+this.weekdaysShort(i,\"\")+\"|^\"+this.weekdaysMin(i,\"\"),this._weekdaysParse[s]=new RegExp(r.replace(\".\",\"\"),\"i\")),n&&\"dddd\"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&\"ddd\"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&\"dd\"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},hn.weekdaysRegex=function(e){return this._weekdaysParseExact?(m(this,\"_weekdaysRegex\")||Be.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(m(this,\"_weekdaysRegex\")||(this._weekdaysRegex=$e),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},hn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(m(this,\"_weekdaysRegex\")||Be.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(m(this,\"_weekdaysShortRegex\")||(this._weekdaysShortRegex=qe),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},hn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(m(this,\"_weekdaysRegex\")||Be.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(m(this,\"_weekdaysMinRegex\")||(this._weekdaysMinRegex=Je),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},hn.isPM=function(e){return\"p\"===(e+\"\").toLowerCase().charAt(0)},hn.meridiem=function(e,t,n){return 11<e?n?\"pm\":\"PM\":n?\"am\":\"AM\"},ot(\"en\",{dayOfMonthOrdinalParse:/\\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===k(e%100/10)?\"th\":1===t?\"st\":2===t?\"nd\":3===t?\"rd\":\"th\")}}),c.lang=n(\"moment.lang is deprecated. Use moment.locale instead.\",ot),c.langData=n(\"moment.langData is deprecated. Use moment.localeData instead.\",lt);var _n=Math.abs;function yn(e,t,n,s){var i=At(t,n);return e._milliseconds+=s*i._milliseconds,e._days+=s*i._days,e._months+=s*i._months,e._bubble()}function gn(e){return e<0?Math.floor(e):Math.ceil(e)}function pn(e){return 4800*e/146097}function vn(e){return 146097*e/4800}function wn(e){return function(){return this.as(e)}}var Mn=wn(\"ms\"),Sn=wn(\"s\"),Dn=wn(\"m\"),kn=wn(\"h\"),Yn=wn(\"d\"),On=wn(\"w\"),Tn=wn(\"M\"),xn=wn(\"y\");function bn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Pn=bn(\"milliseconds\"),Wn=bn(\"seconds\"),Hn=bn(\"minutes\"),Rn=bn(\"hours\"),Cn=bn(\"days\"),Fn=bn(\"months\"),Ln=bn(\"years\");var Un=Math.round,Nn={ss:44,s:45,m:45,h:22,d:26,M:11};var Gn=Math.abs;function Vn(e){return(0<e)-(e<0)||+e}function En(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Gn(this._milliseconds)/1e3,s=Gn(this._days),i=Gn(this._months);t=D((e=D(n/60))/60),n%=60,e%=60;var r=D(i/12),a=i%=12,o=s,u=t,l=e,d=n?n.toFixed(3).replace(/\\.?0+$/,\"\"):\"\",h=this.asSeconds();if(!h)return\"P0D\";var c=h<0?\"-\":\"\",f=Vn(this._months)!==Vn(h)?\"-\":\"\",m=Vn(this._days)!==Vn(h)?\"-\":\"\",_=Vn(this._milliseconds)!==Vn(h)?\"-\":\"\";return c+\"P\"+(r?f+r+\"Y\":\"\")+(a?f+a+\"M\":\"\")+(o?m+o+\"D\":\"\")+(u||l||d?\"T\":\"\")+(u?_+u+\"H\":\"\")+(l?_+l+\"M\":\"\")+(d?_+d+\"S\":\"\")}var In=Ht.prototype;return In.isValid=function(){return this._isValid},In.abs=function(){var e=this._data;return this._milliseconds=_n(this._milliseconds),this._days=_n(this._days),this._months=_n(this._months),e.milliseconds=_n(e.milliseconds),e.seconds=_n(e.seconds),e.minutes=_n(e.minutes),e.hours=_n(e.hours),e.months=_n(e.months),e.years=_n(e.years),this},In.add=function(e,t){return yn(this,e,t,1)},In.subtract=function(e,t){return yn(this,e,t,-1)},In.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if(\"month\"===(e=R(e))||\"year\"===e)return t=this._days+s/864e5,n=this._months+pn(t),\"month\"===e?n:n/12;switch(t=this._days+Math.round(vn(this._months)),e){case\"week\":return t/7+s/6048e5;case\"day\":return t+s/864e5;case\"hour\":return 24*t+s/36e5;case\"minute\":return 1440*t+s/6e4;case\"second\":return 86400*t+s/1e3;case\"millisecond\":return Math.floor(864e5*t)+s;default:throw new Error(\"Unknown unit \"+e)}},In.asMilliseconds=Mn,In.asSeconds=Sn,In.asMinutes=Dn,In.asHours=kn,In.asDays=Yn,In.asWeeks=On,In.asMonths=Tn,In.asYears=xn,In.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},In._bubble=function(){var e,t,n,s,i,r=this._milliseconds,a=this._days,o=this._months,u=this._data;return 0<=r&&0<=a&&0<=o||r<=0&&a<=0&&o<=0||(r+=864e5*gn(vn(o)+a),o=a=0),u.milliseconds=r%1e3,e=D(r/1e3),u.seconds=e%60,t=D(e/60),u.minutes=t%60,n=D(t/60),u.hours=n%24,o+=i=D(pn(a+=D(n/24))),a-=gn(vn(i)),s=D(o/12),o%=12,u.days=a,u.months=o,u.years=s,this},In.clone=function(){return At(this)},In.get=function(e){return e=R(e),this.isValid()?this[e+\"s\"]():NaN},In.milliseconds=Pn,In.seconds=Wn,In.minutes=Hn,In.hours=Rn,In.days=Cn,In.weeks=function(){return D(this.days()/7)},In.months=Fn,In.years=Ln,In.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t,n,s,i,r,a,o,u,l,d,h,c=this.localeData(),f=(n=!e,s=c,i=At(t=this).abs(),r=Un(i.as(\"s\")),a=Un(i.as(\"m\")),o=Un(i.as(\"h\")),u=Un(i.as(\"d\")),l=Un(i.as(\"M\")),d=Un(i.as(\"y\")),(h=r<=Nn.ss&&[\"s\",r]||r<Nn.s&&[\"ss\",r]||a<=1&&[\"m\"]||a<Nn.m&&[\"mm\",a]||o<=1&&[\"h\"]||o<Nn.h&&[\"hh\",o]||u<=1&&[\"d\"]||u<Nn.d&&[\"dd\",u]||l<=1&&[\"M\"]||l<Nn.M&&[\"MM\",l]||d<=1&&[\"y\"]||[\"yy\",d])[2]=n,h[3]=0<+t,h[4]=s,function(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}.apply(null,h));return e&&(f=c.pastFuture(+this,f)),c.postformat(f)},In.toISOString=En,In.toString=En,In.toJSON=En,In.locale=Qt,In.localeData=Kt,In.toIsoString=n(\"toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)\",En),In.lang=Xt,I(\"X\",0,0,\"unix\"),I(\"x\",0,0,\"valueOf\"),ue(\"x\",se),ue(\"X\",/[+-]?\\d+(\\.\\d{1,3})?/),ce(\"X\",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),ce(\"x\",function(e,t,n){n._d=new Date(k(e))}),c.version=\"2.22.1\",e=Tt,c.fn=ln,c.min=function(){return Pt(\"isBefore\",[].slice.call(arguments,0))},c.max=function(){return Pt(\"isAfter\",[].slice.call(arguments,0))},c.now=function(){return Date.now?Date.now():+new Date},c.utc=y,c.unix=function(e){return Tt(1e3*e)},c.months=function(e,t){return fn(e,t,\"months\")},c.isDate=h,c.locale=ot,c.invalid=v,c.duration=At,c.isMoment=S,c.weekdays=function(e,t,n){return mn(e,t,n,\"weekdays\")},c.parseZone=function(){return Tt.apply(null,arguments).parseZone()},c.localeData=lt,c.isDuration=Rt,c.monthsShort=function(e,t){return fn(e,t,\"monthsShort\")},c.weekdaysMin=function(e,t,n){return mn(e,t,n,\"weekdaysMin\")},c.defineLocale=ut,c.updateLocale=function(e,t){if(null!=t){var n,s,i=nt;null!=(s=at(e))&&(i=s._config),(n=new P(t=b(i,t))).parentLocale=st[e],st[e]=n,ot(e)}else null!=st[e]&&(null!=st[e].parentLocale?st[e]=st[e].parentLocale:null!=st[e]&&delete st[e]);return st[e]},c.locales=function(){return s(st)},c.weekdaysShort=function(e,t,n){return mn(e,t,n,\"weekdaysShort\")},c.normalizeUnits=R,c.relativeTimeRounding=function(e){return void 0===e?Un:\"function\"==typeof e&&(Un=e,!0)},c.relativeTimeThreshold=function(e,t){return void 0!==Nn[e]&&(void 0===t?Nn[e]:(Nn[e]=t,\"s\"===e&&(Nn.ss=t-1),!0))},c.calendarFormat=function(e,t){var n=e.diff(t,\"days\",!0);return n<-6?\"sameElse\":n<-1?\"lastWeek\":n<0?\"lastDay\":n<1?\"sameDay\":n<2?\"nextDay\":n<7?\"nextWeek\":\"sameElse\"},c.prototype=ln,c.HTML5_FMT={DATETIME_LOCAL:\"YYYY-MM-DDTHH:mm\",DATETIME_LOCAL_SECONDS:\"YYYY-MM-DDTHH:mm:ss\",DATETIME_LOCAL_MS:\"YYYY-MM-DDTHH:mm:ss.SSS\",DATE:\"YYYY-MM-DD\",TIME:\"HH:mm\",TIME_SECONDS:\"HH:mm:ss\",TIME_MS:\"HH:mm:ss.SSS\",WEEK:\"YYYY-[W]WW\",MONTH:\"YYYY-MM\"},c});","module.exports = exports = window.fetch;\n\n// Needed for TypeScript and Webpack.\nexports.default = window.fetch.bind(window);\n\nexports.Headers = window.Headers;\nexports.Request = window.Request;\nexports.Response = window.Response;\n","import PropTypes from 'prop-types';\nimport { Component, cloneElement, h, options, render } from 'preact';\n\nvar version = '15.1.0'; // trick libraries to think we are react\n\nvar ELEMENTS = 'a abbr address area article aside audio b base bdi bdo big blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins kbd keygen label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script section select small source span strong style sub summary sup table tbody td textarea tfoot th thead time title tr track u ul var video wbr circle clipPath defs ellipse g image line linearGradient mask path pattern polygon polyline radialGradient rect stop svg text tspan'.split(' ');\n\nvar REACT_ELEMENT_TYPE = (typeof Symbol!=='undefined' && Symbol.for && Symbol.for('react.element')) || 0xeac7;\n\nvar COMPONENT_WRAPPER_KEY = (typeof Symbol!=='undefined' && Symbol.for) ? Symbol.for('__preactCompatWrapper') : '__preactCompatWrapper';\n\n// don't autobind these methods since they already have guaranteed context.\nvar AUTOBIND_BLACKLIST = {\n\tconstructor: 1,\n\trender: 1,\n\tshouldComponentUpdate: 1,\n\tcomponentWillReceiveProps: 1,\n\tcomponentWillUpdate: 1,\n\tcomponentDidUpdate: 1,\n\tcomponentWillMount: 1,\n\tcomponentDidMount: 1,\n\tcomponentWillUnmount: 1,\n\tcomponentDidUnmount: 1\n};\n\n\nvar CAMEL_PROPS = /^(?:accent|alignment|arabic|baseline|cap|clip|color|fill|flood|font|glyph|horiz|marker|overline|paint|stop|strikethrough|stroke|text|underline|unicode|units|v|vector|vert|word|writing|x)[A-Z]/;\n\n\nvar BYPASS_HOOK = {};\n\n/*global process*/\nvar DEV = typeof process==='undefined' || !process.env || process.env.NODE_ENV!=='production';\n\n// a component that renders nothing. Used to replace components for unmountComponentAtNode.\nfunction EmptyComponent() { return null; }\n\n\n\n// make react think we're react.\nvar VNode = h('a', null).constructor;\nVNode.prototype.$$typeof = REACT_ELEMENT_TYPE;\nVNode.prototype.preactCompatUpgraded = false;\nVNode.prototype.preactCompatNormalized = false;\n\nObject.defineProperty(VNode.prototype, 'type', {\n\tget: function() { return this.nodeName; },\n\tset: function(v) { this.nodeName = v; },\n\tconfigurable:true\n});\n\nObject.defineProperty(VNode.prototype, 'props', {\n\tget: function() { return this.attributes; },\n\tset: function(v) { this.attributes = v; },\n\tconfigurable:true\n});\n\n\n\nvar oldEventHook = options.event;\noptions.event = function (e) {\n\tif (oldEventHook) { e = oldEventHook(e); }\n\te.persist = Object;\n\te.nativeEvent = e;\n\treturn e;\n};\n\n\nvar oldVnodeHook = options.vnode;\noptions.vnode = function (vnode) {\n\tif (!vnode.preactCompatUpgraded) {\n\t\tvnode.preactCompatUpgraded = true;\n\n\t\tvar tag = vnode.nodeName,\n\t\t\tattrs = vnode.attributes = extend({}, vnode.attributes);\n\n\t\tif (typeof tag==='function') {\n\t\t\tif (tag[COMPONENT_WRAPPER_KEY]===true || (tag.prototype && 'isReactComponent' in tag.prototype)) {\n\t\t\t\tif (vnode.children && String(vnode.children)==='') { vnode.children = undefined; }\n\t\t\t\tif (vnode.children) { attrs.children = vnode.children; }\n\n\t\t\t\tif (!vnode.preactCompatNormalized) {\n\t\t\t\t\tnormalizeVNode(vnode);\n\t\t\t\t}\n\t\t\t\thandleComponentVNode(vnode);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (vnode.children && String(vnode.children)==='') { vnode.children = undefined; }\n\t\t\tif (vnode.children) { attrs.children = vnode.children; }\n\n\t\t\tif (attrs.defaultValue) {\n\t\t\t\tif (!attrs.value && attrs.value!==0) {\n\t\t\t\t\tattrs.value = attrs.defaultValue;\n\t\t\t\t}\n\t\t\t\tdelete attrs.defaultValue;\n\t\t\t}\n\n\t\t\thandleElementVNode(vnode, attrs);\n\t\t}\n\t}\n\n\tif (oldVnodeHook) { oldVnodeHook(vnode); }\n};\n\nfunction handleComponentVNode(vnode) {\n\tvar tag = vnode.nodeName,\n\t\ta = vnode.attributes;\n\n\tvnode.attributes = {};\n\tif (tag.defaultProps) { extend(vnode.attributes, tag.defaultProps); }\n\tif (a) { extend(vnode.attributes, a); }\n}\n\nfunction handleElementVNode(vnode, a) {\n\tvar shouldSanitize, attrs, i;\n\tif (a) {\n\t\tfor (i in a) { if ((shouldSanitize = CAMEL_PROPS.test(i))) { break; } }\n\t\tif (shouldSanitize) {\n\t\t\tattrs = vnode.attributes = {};\n\t\t\tfor (i in a) {\n\t\t\t\tif (a.hasOwnProperty(i)) {\n\t\t\t\t\tattrs[ CAMEL_PROPS.test(i) ? i.replace(/([A-Z0-9])/, '-$1').toLowerCase() : i ] = a[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n\n// proxy render() since React returns a Component reference.\nfunction render$1(vnode, parent, callback) {\n\tvar prev = parent && parent._preactCompatRendered && parent._preactCompatRendered.base;\n\n\t// ignore impossible previous renders\n\tif (prev && prev.parentNode!==parent) { prev = null; }\n\n\t// default to first Element child\n\tif (!prev && parent) { prev = parent.firstElementChild; }\n\n\t// remove unaffected siblings\n\tfor (var i=parent.childNodes.length; i--; ) {\n\t\tif (parent.childNodes[i]!==prev) {\n\t\t\tparent.removeChild(parent.childNodes[i]);\n\t\t}\n\t}\n\n\tvar out = render(vnode, parent, prev);\n\tif (parent) { parent._preactCompatRendered = out && (out._component || { base: out }); }\n\tif (typeof callback==='function') { callback(); }\n\treturn out && out._component || out;\n}\n\n\nvar ContextProvider = function () {};\n\nContextProvider.prototype.getChildContext = function () {\n\treturn this.props.context;\n};\nContextProvider.prototype.render = function (props) {\n\treturn props.children[0];\n};\n\nfunction renderSubtreeIntoContainer(parentComponent, vnode, container, callback) {\n\tvar wrap = h(ContextProvider, { context: parentComponent.context }, vnode);\n\tvar renderContainer = render$1(wrap, container);\n\tvar component = renderContainer._component || renderContainer.base;\n\tif (callback) { callback.call(component, renderContainer); }\n\treturn component;\n}\n\n\nfunction unmountComponentAtNode(container) {\n\tvar existing = container._preactCompatRendered && container._preactCompatRendered.base;\n\tif (existing && existing.parentNode===container) {\n\t\trender(h(EmptyComponent), container, existing);\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n\nvar ARR = [];\n\n// This API is completely unnecessary for Preact, so it's basically passthrough.\nvar Children = {\n\tmap: function(children, fn, ctx) {\n\t\tif (children == null) { return null; }\n\t\tchildren = Children.toArray(children);\n\t\tif (ctx && ctx!==children) { fn = fn.bind(ctx); }\n\t\treturn children.map(fn);\n\t},\n\tforEach: function(children, fn, ctx) {\n\t\tif (children == null) { return null; }\n\t\tchildren = Children.toArray(children);\n\t\tif (ctx && ctx!==children) { fn = fn.bind(ctx); }\n\t\tchildren.forEach(fn);\n\t},\n\tcount: function(children) {\n\t\treturn children && children.length || 0;\n\t},\n\tonly: function(children) {\n\t\tchildren = Children.toArray(children);\n\t\tif (children.length!==1) { throw new Error('Children.only() expects only one child.'); }\n\t\treturn children[0];\n\t},\n\ttoArray: function(children) {\n\t\tif (children == null) { return []; }\n\t\treturn ARR.concat(children);\n\t}\n};\n\n\n/** Track current render() component for ref assignment */\nvar currentComponent;\n\n\nfunction createFactory(type) {\n\treturn createElement.bind(null, type);\n}\n\n\nvar DOM = {};\nfor (var i=ELEMENTS.length; i--; ) {\n\tDOM[ELEMENTS[i]] = createFactory(ELEMENTS[i]);\n}\n\nfunction upgradeToVNodes(arr, offset) {\n\tfor (var i=offset || 0; i<arr.length; i++) {\n\t\tvar obj = arr[i];\n\t\tif (Array.isArray(obj)) {\n\t\t\tupgradeToVNodes(obj);\n\t\t}\n\t\telse if (obj && typeof obj==='object' && !isValidElement(obj) && ((obj.props && obj.type) || (obj.attributes && obj.nodeName) || obj.children)) {\n\t\t\tarr[i] = createElement(obj.type || obj.nodeName, obj.props || obj.attributes, obj.children);\n\t\t}\n\t}\n}\n\nfunction isStatelessComponent(c) {\n\treturn typeof c==='function' && !(c.prototype && c.prototype.render);\n}\n\n\n// wraps stateless functional components in a PropTypes validator\nfunction wrapStatelessComponent(WrappedComponent) {\n\treturn createClass({\n\t\tdisplayName: WrappedComponent.displayName || WrappedComponent.name,\n\t\trender: function() {\n\t\t\treturn WrappedComponent(this.props, this.context);\n\t\t}\n\t});\n}\n\n\nfunction statelessComponentHook(Ctor) {\n\tvar Wrapped = Ctor[COMPONENT_WRAPPER_KEY];\n\tif (Wrapped) { return Wrapped===true ? Ctor : Wrapped; }\n\n\tWrapped = wrapStatelessComponent(Ctor);\n\n\tObject.defineProperty(Wrapped, COMPONENT_WRAPPER_KEY, { configurable:true, value:true });\n\tWrapped.displayName = Ctor.displayName;\n\tWrapped.propTypes = Ctor.propTypes;\n\tWrapped.defaultProps = Ctor.defaultProps;\n\n\tObject.defineProperty(Ctor, COMPONENT_WRAPPER_KEY, { configurable:true, value:Wrapped });\n\n\treturn Wrapped;\n}\n\n\nfunction createElement() {\n\tvar args = [], len = arguments.length;\n\twhile ( len-- ) args[ len ] = arguments[ len ];\n\n\tupgradeToVNodes(args, 2);\n\treturn normalizeVNode(h.apply(void 0, args));\n}\n\n\nfunction normalizeVNode(vnode) {\n\tvnode.preactCompatNormalized = true;\n\n\tapplyClassName(vnode);\n\n\tif (isStatelessComponent(vnode.nodeName)) {\n\t\tvnode.nodeName = statelessComponentHook(vnode.nodeName);\n\t}\n\n\tvar ref = vnode.attributes.ref,\n\t\ttype = ref && typeof ref;\n\tif (currentComponent && (type==='string' || type==='number')) {\n\t\tvnode.attributes.ref = createStringRefProxy(ref, currentComponent);\n\t}\n\n\tapplyEventNormalization(vnode);\n\n\treturn vnode;\n}\n\n\nfunction cloneElement$1(element, props) {\n\tvar children = [], len = arguments.length - 2;\n\twhile ( len-- > 0 ) children[ len ] = arguments[ len + 2 ];\n\n\tif (!isValidElement(element)) { return element; }\n\tvar elementProps = element.attributes || element.props;\n\tvar node = h(\n\t\telement.nodeName || element.type,\n\t\textend({}, elementProps),\n\t\telement.children || elementProps && elementProps.children\n\t);\n\t// Only provide the 3rd argument if needed.\n\t// Arguments 3+ overwrite element.children in preactCloneElement\n\tvar cloneArgs = [node, props];\n\tif (children && children.length) {\n\t\tcloneArgs.push(children);\n\t}\n\telse if (props && props.children) {\n\t\tcloneArgs.push(props.children);\n\t}\n\treturn normalizeVNode(cloneElement.apply(void 0, cloneArgs));\n}\n\n\nfunction isValidElement(element) {\n\treturn element && ((element instanceof VNode) || element.$$typeof===REACT_ELEMENT_TYPE);\n}\n\n\nfunction createStringRefProxy(name, component) {\n\treturn component._refProxies[name] || (component._refProxies[name] = function (resolved) {\n\t\tif (component && component.refs) {\n\t\t\tcomponent.refs[name] = resolved;\n\t\t\tif (resolved===null) {\n\t\t\t\tdelete component._refProxies[name];\n\t\t\t\tcomponent = null;\n\t\t\t}\n\t\t}\n\t});\n}\n\n\nfunction applyEventNormalization(ref) {\n\tvar nodeName = ref.nodeName;\n\tvar attributes = ref.attributes;\n\n\tif (!attributes || typeof nodeName!=='string') { return; }\n\tvar props = {};\n\tfor (var i in attributes) {\n\t\tprops[i.toLowerCase()] = i;\n\t}\n\tif (props.ondoubleclick) {\n\t\tattributes.ondblclick = attributes[props.ondoubleclick];\n\t\tdelete attributes[props.ondoubleclick];\n\t}\n\t// for *textual inputs* (incl textarea), normalize `onChange` -> `onInput`:\n\tif (props.onchange && (nodeName==='textarea' || (nodeName.toLowerCase()==='input' && !/^fil|che|rad/i.test(attributes.type)))) {\n\t\tvar normalized = props.oninput || 'oninput';\n\t\tif (!attributes[normalized]) {\n\t\t\tattributes[normalized] = multihook([attributes[normalized], attributes[props.onchange]]);\n\t\t\tdelete attributes[props.onchange];\n\t\t}\n\t}\n}\n\n\nfunction applyClassName(vnode) {\n\tvar a = vnode.attributes || (vnode.attributes = {});\n\tclassNameDescriptor.enumerable = 'className' in a;\n\tif (a.className) { a.class = a.className; }\n\tObject.defineProperty(a, 'className', classNameDescriptor);\n}\n\n\nvar classNameDescriptor = {\n\tconfigurable: true,\n\tget: function() { return this.class; },\n\tset: function(v) { this.class = v; }\n};\n\nfunction extend(base, props) {\n\tvar arguments$1 = arguments;\n\n\tfor (var i=1, obj = (void 0); i<arguments.length; i++) {\n\t\tif ((obj = arguments$1[i])) {\n\t\t\tfor (var key in obj) {\n\t\t\t\tif (obj.hasOwnProperty(key)) {\n\t\t\t\t\tbase[key] = obj[key];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn base;\n}\n\n\nfunction shallowDiffers(a, b) {\n\tfor (var i in a) { if (!(i in b)) { return true; } }\n\tfor (var i$1 in b) { if (a[i$1]!==b[i$1]) { return true; } }\n\treturn false;\n}\n\n\nfunction findDOMNode(component) {\n\treturn component && component.base || component;\n}\n\n\nfunction F(){}\n\nfunction createClass(obj) {\n\tfunction cl(props, context) {\n\t\tbindAll(this);\n\t\tComponent$1.call(this, props, context, BYPASS_HOOK);\n\t\tnewComponentHook.call(this, props, context);\n\t}\n\n\tobj = extend({ constructor: cl }, obj);\n\n\t// We need to apply mixins here so that getDefaultProps is correctly mixed\n\tif (obj.mixins) {\n\t\tapplyMixins(obj, collateMixins(obj.mixins));\n\t}\n\tif (obj.statics) {\n\t\textend(cl, obj.statics);\n\t}\n\tif (obj.propTypes) {\n\t\tcl.propTypes = obj.propTypes;\n\t}\n\tif (obj.defaultProps) {\n\t\tcl.defaultProps = obj.defaultProps;\n\t}\n\tif (obj.getDefaultProps) {\n\t\tcl.defaultProps = obj.getDefaultProps.call(cl);\n\t}\n\n\tF.prototype = Component$1.prototype;\n\tcl.prototype = extend(new F(), obj);\n\n\tcl.displayName = obj.displayName || 'Component';\n\n\treturn cl;\n}\n\n\n// Flatten an Array of mixins to a map of method name to mixin implementations\nfunction collateMixins(mixins) {\n\tvar keyed = {};\n\tfor (var i=0; i<mixins.length; i++) {\n\t\tvar mixin = mixins[i];\n\t\tfor (var key in mixin) {\n\t\t\tif (mixin.hasOwnProperty(key) && typeof mixin[key]==='function') {\n\t\t\t\t(keyed[key] || (keyed[key]=[])).push(mixin[key]);\n\t\t\t}\n\t\t}\n\t}\n\treturn keyed;\n}\n\n\n// apply a mapping of Arrays of mixin methods to a component prototype\nfunction applyMixins(proto, mixins) {\n\tfor (var key in mixins) { if (mixins.hasOwnProperty(key)) {\n\t\tproto[key] = multihook(\n\t\t\tmixins[key].concat(proto[key] || ARR),\n\t\t\tkey==='getDefaultProps' || key==='getInitialState' || key==='getChildContext'\n\t\t);\n\t} }\n}\n\n\nfunction bindAll(ctx) {\n\tfor (var i in ctx) {\n\t\tvar v = ctx[i];\n\t\tif (typeof v==='function' && !v.__bound && !AUTOBIND_BLACKLIST.hasOwnProperty(i)) {\n\t\t\t(ctx[i] = v.bind(ctx)).__bound = true;\n\t\t}\n\t}\n}\n\n\nfunction callMethod(ctx, m, args) {\n\tif (typeof m==='string') {\n\t\tm = ctx.constructor.prototype[m];\n\t}\n\tif (typeof m==='function') {\n\t\treturn m.apply(ctx, args);\n\t}\n}\n\nfunction multihook(hooks, skipDuplicates) {\n\treturn function() {\n\t\tvar arguments$1 = arguments;\n\t\tvar this$1 = this;\n\n\t\tvar ret;\n\t\tfor (var i=0; i<hooks.length; i++) {\n\t\t\tvar r = callMethod(this$1, hooks[i], arguments$1);\n\n\t\t\tif (skipDuplicates && r!=null) {\n\t\t\t\tif (!ret) { ret = {}; }\n\t\t\t\tfor (var key in r) { if (r.hasOwnProperty(key)) {\n\t\t\t\t\tret[key] = r[key];\n\t\t\t\t} }\n\t\t\t}\n\t\t\telse if (typeof r!=='undefined') { ret = r; }\n\t\t}\n\t\treturn ret;\n\t};\n}\n\n\nfunction newComponentHook(props, context) {\n\tpropsHook.call(this, props, context);\n\tthis.componentWillReceiveProps = multihook([propsHook, this.componentWillReceiveProps || 'componentWillReceiveProps']);\n\tthis.render = multihook([propsHook, beforeRender, this.render || 'render', afterRender]);\n}\n\n\nfunction propsHook(props, context) {\n\tif (!props) { return; }\n\n\t// React annoyingly special-cases single children, and some react components are ridiculously strict about this.\n\tvar c = props.children;\n\tif (c && Array.isArray(c) && c.length===1 && (typeof c[0]==='string' || typeof c[0]==='function' || c[0] instanceof VNode)) {\n\t\tprops.children = c[0];\n\n\t\t// but its totally still going to be an Array.\n\t\tif (props.children && typeof props.children==='object') {\n\t\t\tprops.children.length = 1;\n\t\t\tprops.children[0] = props.children;\n\t\t}\n\t}\n\n\t// add proptype checking\n\tif (DEV) {\n\t\tvar ctor = typeof this==='function' ? this : this.constructor,\n\t\t\tpropTypes = this.propTypes || ctor.propTypes;\n\t\tvar displayName = this.displayName || ctor.name;\n\n\t\tif (propTypes) {\n\t\t\tPropTypes.checkPropTypes(propTypes, props, 'prop', displayName);\n\t\t}\n\t}\n}\n\n\nfunction beforeRender(props) {\n\tcurrentComponent = this;\n}\n\nfunction afterRender() {\n\tif (currentComponent===this) {\n\t\tcurrentComponent = null;\n\t}\n}\n\n\n\nfunction Component$1(props, context, opts) {\n\tComponent.call(this, props, context);\n\tthis.state = this.getInitialState ? this.getInitialState() : {};\n\tthis.refs = {};\n\tthis._refProxies = {};\n\tif (opts!==BYPASS_HOOK) {\n\t\tnewComponentHook.call(this, props, context);\n\t}\n}\nextend(Component$1.prototype = new Component(), {\n\tconstructor: Component$1,\n\n\tisReactComponent: {},\n\n\treplaceState: function(state, callback) {\n\t\tvar this$1 = this;\n\n\t\tthis.setState(state, callback);\n\t\tfor (var i in this$1.state) {\n\t\t\tif (!(i in state)) {\n\t\t\t\tdelete this$1.state[i];\n\t\t\t}\n\t\t}\n\t},\n\n\tgetDOMNode: function() {\n\t\treturn this.base;\n\t},\n\n\tisMounted: function() {\n\t\treturn !!this.base;\n\t}\n});\n\n\n\nfunction PureComponent(props, context) {\n\tComponent$1.call(this, props, context);\n}\nF.prototype = Component$1.prototype;\nPureComponent.prototype = new F();\nPureComponent.prototype.isPureReactComponent = true;\nPureComponent.prototype.shouldComponentUpdate = function(props, state) {\n\treturn shallowDiffers(this.props, props) || shallowDiffers(this.state, state);\n};\n\nvar index = {\n\tversion: version,\n\tDOM: DOM,\n\tPropTypes: PropTypes,\n\tChildren: Children,\n\trender: render$1,\n\tcreateClass: createClass,\n\tcreateFactory: createFactory,\n\tcreateElement: createElement,\n\tcloneElement: cloneElement$1,\n\tisValidElement: isValidElement,\n\tfindDOMNode: findDOMNode,\n\tunmountComponentAtNode: unmountComponentAtNode,\n\tComponent: Component$1,\n\tPureComponent: PureComponent,\n\tunstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer,\n\t__spread: extend\n};\n\nexport { version, DOM, PropTypes, Children, render$1 as render, createClass, createFactory, createElement, cloneElement$1 as cloneElement, isValidElement, findDOMNode, unmountComponentAtNode, Component$1 as Component, PureComponent, renderSubtreeIntoContainer as unstable_renderSubtreeIntoContainer, extend as __spread };export default index;\n//# sourceMappingURL=preact-compat.es.js.map\n","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n  return function () {\n    return arg;\n  };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n  return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n  return arg;\n};\n\nmodule.exports = emptyFunction;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n  validateFormat = function validateFormat(format) {\n    if (format === undefined) {\n      throw new Error('invariant requires an error message argument');\n    }\n  };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n  validateFormat(format);\n\n  if (!condition) {\n    var error;\n    if (format === undefined) {\n      error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n    } else {\n      var args = [a, b, c, d, e, f];\n      var argIndex = 0;\n      error = new Error(format.replace(/%s/g, function () {\n        return args[argIndex++];\n      }));\n      error.name = 'Invariant Violation';\n    }\n\n    error.framesToPop = 1; // we don't care about invariant's own frame\n    throw error;\n  }\n}\n\nmodule.exports = invariant;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar emptyFunction = require('./emptyFunction');\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = emptyFunction;\n\nif (process.env.NODE_ENV !== 'production') {\n  var printWarning = function printWarning(format) {\n    for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n      args[_key - 1] = arguments[_key];\n    }\n\n    var argIndex = 0;\n    var message = 'Warning: ' + format.replace(/%s/g, function () {\n      return args[argIndex++];\n    });\n    if (typeof console !== 'undefined') {\n      console.error(message);\n    }\n    try {\n      // --- Welcome to debugging React ---\n      // This error was thrown as a convenience so that you can use this stack\n      // to find the callsite that caused this warning to fire.\n      throw new Error(message);\n    } catch (x) {}\n  };\n\n  warning = function warning(condition, format) {\n    if (format === undefined) {\n      throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n    }\n\n    if (format.indexOf('Failed Composite propType: ') === 0) {\n      return; // Ignore CompositeComponent proptype check.\n    }\n\n    if (!condition) {\n      for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n        args[_key2 - 2] = arguments[_key2];\n      }\n\n      printWarning.apply(undefined, [format].concat(args));\n    }\n  };\n}\n\nmodule.exports = warning;","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc');  // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== 'production') {\n  var invariant = require('fbjs/lib/invariant');\n  var warning = require('fbjs/lib/warning');\n  var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n  var loggedTypeFailures = {};\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n  if (process.env.NODE_ENV !== 'production') {\n    for (var typeSpecName in typeSpecs) {\n      if (typeSpecs.hasOwnProperty(typeSpecName)) {\n        var error;\n        // Prop type validation may throw. In case they do, we don't want to\n        // fail the render phase where it didn't fail before. So we log it.\n        // After these have been cleaned up, we'll let them throw.\n        try {\n          // This is intentionally an invariant that gets caught. It's the same\n          // behavior as without this statement except with a better message.\n          invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);\n          error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n        } catch (ex) {\n          error = ex;\n        }\n        warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);\n        if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n          // Only monitor this failure once because there tends to be a lot of the\n          // same error.\n          loggedTypeFailures[error.message] = true;\n\n          var stack = getStack ? getStack() : '';\n\n          warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');\n        }\n      }\n    }\n  }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n  /* global Symbol */\n  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n  /**\n   * Returns the iterator method function contained on the iterable object.\n   *\n   * Be sure to invoke the function with the iterable as context:\n   *\n   *     var iteratorFn = getIteratorFn(myIterable);\n   *     if (iteratorFn) {\n   *       var iterator = iteratorFn.call(myIterable);\n   *       ...\n   *     }\n   *\n   * @param {?object} maybeIterable\n   * @return {?function}\n   */\n  function getIteratorFn(maybeIterable) {\n    var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n    if (typeof iteratorFn === 'function') {\n      return iteratorFn;\n    }\n  }\n\n  /**\n   * Collection of methods that allow declaration and validation of props that are\n   * supplied to React components. Example usage:\n   *\n   *   var Props = require('ReactPropTypes');\n   *   var MyArticle = React.createClass({\n   *     propTypes: {\n   *       // An optional string prop named \"description\".\n   *       description: Props.string,\n   *\n   *       // A required enum prop named \"category\".\n   *       category: Props.oneOf(['News','Photos']).isRequired,\n   *\n   *       // A prop named \"dialog\" that requires an instance of Dialog.\n   *       dialog: Props.instanceOf(Dialog).isRequired\n   *     },\n   *     render: function() { ... }\n   *   });\n   *\n   * A more formal specification of how these methods are used:\n   *\n   *   type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n   *   decl := ReactPropTypes.{type}(.isRequired)?\n   *\n   * Each and every declaration produces a function with the same signature. This\n   * allows the creation of custom validation functions. For example:\n   *\n   *  var MyLink = React.createClass({\n   *    propTypes: {\n   *      // An optional string or URI prop named \"href\".\n   *      href: function(props, propName, componentName) {\n   *        var propValue = props[propName];\n   *        if (propValue != null && typeof propValue !== 'string' &&\n   *            !(propValue instanceof URI)) {\n   *          return new Error(\n   *            'Expected a string or an URI for ' + propName + ' in ' +\n   *            componentName\n   *          );\n   *        }\n   *      }\n   *    },\n   *    render: function() {...}\n   *  });\n   *\n   * @internal\n   */\n\n  var ANONYMOUS = '<<anonymous>>';\n\n  // Important!\n  // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n  var ReactPropTypes = {\n    array: createPrimitiveTypeChecker('array'),\n    bool: createPrimitiveTypeChecker('boolean'),\n    func: createPrimitiveTypeChecker('function'),\n    number: createPrimitiveTypeChecker('number'),\n    object: createPrimitiveTypeChecker('object'),\n    string: createPrimitiveTypeChecker('string'),\n    symbol: createPrimitiveTypeChecker('symbol'),\n\n    any: createAnyTypeChecker(),\n    arrayOf: createArrayOfTypeChecker,\n    element: createElementTypeChecker(),\n    instanceOf: createInstanceTypeChecker,\n    node: createNodeChecker(),\n    objectOf: createObjectOfTypeChecker,\n    oneOf: createEnumTypeChecker,\n    oneOfType: createUnionTypeChecker,\n    shape: createShapeTypeChecker,\n    exact: createStrictShapeTypeChecker,\n  };\n\n  /**\n   * inlined Object.is polyfill to avoid requiring consumers ship their own\n   * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n   */\n  /*eslint-disable no-self-compare*/\n  function is(x, y) {\n    // SameValue algorithm\n    if (x === y) {\n      // Steps 1-5, 7-10\n      // Steps 6.b-6.e: +0 != -0\n      return x !== 0 || 1 / x === 1 / y;\n    } else {\n      // Step 6.a: NaN == NaN\n      return x !== x && y !== y;\n    }\n  }\n  /*eslint-enable no-self-compare*/\n\n  /**\n   * We use an Error-like object for backward compatibility as people may call\n   * PropTypes directly and inspect their output. However, we don't use real\n   * Errors anymore. We don't inspect their stack anyway, and creating them\n   * is prohibitively expensive if they are created too often, such as what\n   * happens in oneOfType() for any type before the one that matched.\n   */\n  function PropTypeError(message) {\n    this.message = message;\n    this.stack = '';\n  }\n  // Make `instanceof Error` still work for returned errors.\n  PropTypeError.prototype = Error.prototype;\n\n  function createChainableTypeChecker(validate) {\n    if (process.env.NODE_ENV !== 'production') {\n      var manualPropTypeCallCache = {};\n      var manualPropTypeWarningCount = 0;\n    }\n    function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n      componentName = componentName || ANONYMOUS;\n      propFullName = propFullName || propName;\n\n      if (secret !== ReactPropTypesSecret) {\n        if (throwOnDirectAccess) {\n          // New behavior only for users of `prop-types` package\n          invariant(\n            false,\n            'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n            'Use `PropTypes.checkPropTypes()` to call them. ' +\n            'Read more at http://fb.me/use-check-prop-types'\n          );\n        } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n          // Old behavior for people using React.PropTypes\n          var cacheKey = componentName + ':' + propName;\n          if (\n            !manualPropTypeCallCache[cacheKey] &&\n            // Avoid spamming the console because they are often not actionable except for lib authors\n            manualPropTypeWarningCount < 3\n          ) {\n            warning(\n              false,\n              'You are manually calling a React.PropTypes validation ' +\n              'function for the `%s` prop on `%s`. This is deprecated ' +\n              'and will throw in the standalone `prop-types` package. ' +\n              'You may be seeing this warning due to a third-party PropTypes ' +\n              'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',\n              propFullName,\n              componentName\n            );\n            manualPropTypeCallCache[cacheKey] = true;\n            manualPropTypeWarningCount++;\n          }\n        }\n      }\n      if (props[propName] == null) {\n        if (isRequired) {\n          if (props[propName] === null) {\n            return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n          }\n          return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n        }\n        return null;\n      } else {\n        return validate(props, propName, componentName, location, propFullName);\n      }\n    }\n\n    var chainedCheckType = checkType.bind(null, false);\n    chainedCheckType.isRequired = checkType.bind(null, true);\n\n    return chainedCheckType;\n  }\n\n  function createPrimitiveTypeChecker(expectedType) {\n    function validate(props, propName, componentName, location, propFullName, secret) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== expectedType) {\n        // `propValue` being instance of, say, date/regexp, pass the 'object'\n        // check, but we can offer a more precise error message here rather than\n        // 'of type `object`'.\n        var preciseType = getPreciseType(propValue);\n\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createAnyTypeChecker() {\n    return createChainableTypeChecker(emptyFunction.thatReturnsNull);\n  }\n\n  function createArrayOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n      }\n      var propValue = props[propName];\n      if (!Array.isArray(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n      }\n      for (var i = 0; i < propValue.length; i++) {\n        var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n        if (error instanceof Error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createElementTypeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      if (!isValidElement(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createInstanceTypeChecker(expectedClass) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!(props[propName] instanceof expectedClass)) {\n        var expectedClassName = expectedClass.name || ANONYMOUS;\n        var actualClassName = getClassName(props[propName]);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createEnumTypeChecker(expectedValues) {\n    if (!Array.isArray(expectedValues)) {\n      process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;\n      return emptyFunction.thatReturnsNull;\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      for (var i = 0; i < expectedValues.length; i++) {\n        if (is(propValue, expectedValues[i])) {\n          return null;\n        }\n      }\n\n      var valuesString = JSON.stringify(expectedValues);\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createObjectOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n      }\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n      }\n      for (var key in propValue) {\n        if (propValue.hasOwnProperty(key)) {\n          var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n          if (error instanceof Error) {\n            return error;\n          }\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createUnionTypeChecker(arrayOfTypeCheckers) {\n    if (!Array.isArray(arrayOfTypeCheckers)) {\n      process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n      return emptyFunction.thatReturnsNull;\n    }\n\n    for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n      var checker = arrayOfTypeCheckers[i];\n      if (typeof checker !== 'function') {\n        warning(\n          false,\n          'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n          'received %s at index %s.',\n          getPostfixForTypeWarning(checker),\n          i\n        );\n        return emptyFunction.thatReturnsNull;\n      }\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n        var checker = arrayOfTypeCheckers[i];\n        if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n          return null;\n        }\n      }\n\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createNodeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!isNode(props[propName])) {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      for (var key in shapeTypes) {\n        var checker = shapeTypes[key];\n        if (!checker) {\n          continue;\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createStrictShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      // We need to check all keys in case some are required but missing from\n      // props.\n      var allKeys = assign({}, props[propName], shapeTypes);\n      for (var key in allKeys) {\n        var checker = shapeTypes[key];\n        if (!checker) {\n          return new PropTypeError(\n            'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n            '\\nBad object: ' + JSON.stringify(props[propName], null, '  ') +\n            '\\nValid keys: ' +  JSON.stringify(Object.keys(shapeTypes), null, '  ')\n          );\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n\n    return createChainableTypeChecker(validate);\n  }\n\n  function isNode(propValue) {\n    switch (typeof propValue) {\n      case 'number':\n      case 'string':\n      case 'undefined':\n        return true;\n      case 'boolean':\n        return !propValue;\n      case 'object':\n        if (Array.isArray(propValue)) {\n          return propValue.every(isNode);\n        }\n        if (propValue === null || isValidElement(propValue)) {\n          return true;\n        }\n\n        var iteratorFn = getIteratorFn(propValue);\n        if (iteratorFn) {\n          var iterator = iteratorFn.call(propValue);\n          var step;\n          if (iteratorFn !== propValue.entries) {\n            while (!(step = iterator.next()).done) {\n              if (!isNode(step.value)) {\n                return false;\n              }\n            }\n          } else {\n            // Iterator will provide entry [k,v] tuples rather than values.\n            while (!(step = iterator.next()).done) {\n              var entry = step.value;\n              if (entry) {\n                if (!isNode(entry[1])) {\n                  return false;\n                }\n              }\n            }\n          }\n        } else {\n          return false;\n        }\n\n        return true;\n      default:\n        return false;\n    }\n  }\n\n  function isSymbol(propType, propValue) {\n    // Native Symbol.\n    if (propType === 'symbol') {\n      return true;\n    }\n\n    // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n    if (propValue['@@toStringTag'] === 'Symbol') {\n      return true;\n    }\n\n    // Fallback for non-spec compliant Symbols which are polyfilled.\n    if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n      return true;\n    }\n\n    return false;\n  }\n\n  // Equivalent of `typeof` but with special handling for array and regexp.\n  function getPropType(propValue) {\n    var propType = typeof propValue;\n    if (Array.isArray(propValue)) {\n      return 'array';\n    }\n    if (propValue instanceof RegExp) {\n      // Old webkits (at least until Android 4.0) return 'function' rather than\n      // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n      // passes PropTypes.object.\n      return 'object';\n    }\n    if (isSymbol(propType, propValue)) {\n      return 'symbol';\n    }\n    return propType;\n  }\n\n  // This handles more types than `getPropType`. Only used for error messages.\n  // See `createPrimitiveTypeChecker`.\n  function getPreciseType(propValue) {\n    if (typeof propValue === 'undefined' || propValue === null) {\n      return '' + propValue;\n    }\n    var propType = getPropType(propValue);\n    if (propType === 'object') {\n      if (propValue instanceof Date) {\n        return 'date';\n      } else if (propValue instanceof RegExp) {\n        return 'regexp';\n      }\n    }\n    return propType;\n  }\n\n  // Returns a string that is postfixed to a warning about an invalid type.\n  // For example, \"undefined\" or \"of type array\"\n  function getPostfixForTypeWarning(value) {\n    var type = getPreciseType(value);\n    switch (type) {\n      case 'array':\n      case 'object':\n        return 'an ' + type;\n      case 'boolean':\n      case 'date':\n      case 'regexp':\n        return 'a ' + type;\n      default:\n        return type;\n    }\n  }\n\n  // Returns class name of the object, if any.\n  function getClassName(propValue) {\n    if (!propValue.constructor || !propValue.constructor.name) {\n      return ANONYMOUS;\n    }\n    return propValue.constructor.name;\n  }\n\n  ReactPropTypes.checkPropTypes = checkPropTypes;\n  ReactPropTypes.PropTypes = ReactPropTypes;\n\n  return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n  var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n    Symbol.for &&\n    Symbol.for('react.element')) ||\n    0xeac7;\n\n  var isValidElement = function(object) {\n    return typeof object === 'object' &&\n      object !== null &&\n      object.$$typeof === REACT_ELEMENT_TYPE;\n  };\n\n  // By explicitly using `prop-types` you are opting into new development behavior.\n  // http://fb.me/prop-types-in-prod\n  var throwOnDirectAccess = true;\n  module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n  // By explicitly using `prop-types` you are opting into new production behavior.\n  // http://fb.me/prop-types-in-prod\n  module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/** Virtual DOM Node */\nfunction VNode() {}\n\n/** Global options\n *\t@public\n *\t@namespace options {Object}\n */\nvar options = {\n\n\t/** If `true`, `prop` changes trigger synchronous component updates.\n  *\t@name syncComponentUpdates\n  *\t@type Boolean\n  *\t@default true\n  */\n\t//syncComponentUpdates: true,\n\n\t/** Processes all created VNodes.\n  *\t@param {VNode} vnode\tA newly-created VNode to normalize/process\n  */\n\t//vnode(vnode) { }\n\n\t/** Hook invoked after a component is mounted. */\n\t// afterMount(component) { }\n\n\t/** Hook invoked after the DOM is updated with a component's latest render. */\n\t// afterUpdate(component) { }\n\n\t/** Hook invoked immediately before a component is unmounted. */\n\t// beforeUnmount(component) { }\n};\n\nvar stack = [];\n\nvar EMPTY_CHILDREN = [];\n\n/**\n * JSX/hyperscript reviver.\n * @see http://jasonformat.com/wtf-is-jsx\n * Benchmarks: https://esbench.com/bench/57ee8f8e330ab09900a1a1a0\n *\n * Note: this is exported as both `h()` and `createElement()` for compatibility reasons.\n *\n * Creates a VNode (virtual DOM element). A tree of VNodes can be used as a lightweight representation\n * of the structure of a DOM tree. This structure can be realized by recursively comparing it against\n * the current _actual_ DOM structure, and applying only the differences.\n *\n * `h()`/`createElement()` accepts an element name, a list of attributes/props,\n * and optionally children to append to the element.\n *\n * @example The following DOM tree\n *\n * `<div id=\"foo\" name=\"bar\">Hello!</div>`\n *\n * can be constructed using this function as:\n *\n * `h('div', { id: 'foo', name : 'bar' }, 'Hello!');`\n *\n * @param {string} nodeName\tAn element name. Ex: `div`, `a`, `span`, etc.\n * @param {Object} attributes\tAny attributes/props to set on the created element.\n * @param rest\t\t\tAdditional arguments are taken to be children to append. Can be infinitely nested Arrays.\n *\n * @public\n */\nfunction h(nodeName, attributes) {\n\tvar children = EMPTY_CHILDREN,\n\t    lastSimple,\n\t    child,\n\t    simple,\n\t    i;\n\tfor (i = arguments.length; i-- > 2;) {\n\t\tstack.push(arguments[i]);\n\t}\n\tif (attributes && attributes.children != null) {\n\t\tif (!stack.length) stack.push(attributes.children);\n\t\tdelete attributes.children;\n\t}\n\twhile (stack.length) {\n\t\tif ((child = stack.pop()) && child.pop !== undefined) {\n\t\t\tfor (i = child.length; i--;) {\n\t\t\t\tstack.push(child[i]);\n\t\t\t}\n\t\t} else {\n\t\t\tif (typeof child === 'boolean') child = null;\n\n\t\t\tif (simple = typeof nodeName !== 'function') {\n\t\t\t\tif (child == null) child = '';else if (typeof child === 'number') child = String(child);else if (typeof child !== 'string') simple = false;\n\t\t\t}\n\n\t\t\tif (simple && lastSimple) {\n\t\t\t\tchildren[children.length - 1] += child;\n\t\t\t} else if (children === EMPTY_CHILDREN) {\n\t\t\t\tchildren = [child];\n\t\t\t} else {\n\t\t\t\tchildren.push(child);\n\t\t\t}\n\n\t\t\tlastSimple = simple;\n\t\t}\n\t}\n\n\tvar p = new VNode();\n\tp.nodeName = nodeName;\n\tp.children = children;\n\tp.attributes = attributes == null ? undefined : attributes;\n\tp.key = attributes == null ? undefined : attributes.key;\n\n\t// if a \"vnode hook\" is defined, pass every created VNode to it\n\tif (options.vnode !== undefined) options.vnode(p);\n\n\treturn p;\n}\n\n/**\n *  Copy all properties from `props` onto `obj`.\n *  @param {Object} obj\t\tObject onto which properties should be copied.\n *  @param {Object} props\tObject from which to copy properties.\n *  @returns obj\n *  @private\n */\nfunction extend(obj, props) {\n  for (var i in props) {\n    obj[i] = props[i];\n  }return obj;\n}\n\n/**\n * Call a function asynchronously, as soon as possible. Makes\n * use of HTML Promise to schedule the callback if available,\n * otherwise falling back to `setTimeout` (mainly for IE<11).\n *\n * @param {Function} callback\n */\nvar defer = typeof Promise == 'function' ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\n * @param {VNode} vnode\t\tThe virtual DOM element to clone\n * @param {Object} props\tAttributes/props to add when cloning\n * @param {VNode} rest\t\tAny additional arguments will be used as replacement children.\n */\nfunction cloneElement(vnode, props) {\n  return h(vnode.nodeName, extend(extend({}, vnode.attributes), props), arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children);\n}\n\n// DOM properties that should NOT have \"px\" added when numeric\nvar IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;\n\n/** Managed queue of dirty components to be re-rendered */\n\nvar items = [];\n\nfunction enqueueRender(component) {\n\tif (!component._dirty && (component._dirty = true) && items.push(component) == 1) {\n\t\t(options.debounceRendering || defer)(rerender);\n\t}\n}\n\nfunction rerender() {\n\tvar p,\n\t    list = items;\n\titems = [];\n\twhile (p = list.pop()) {\n\t\tif (p._dirty) renderComponent(p);\n\t}\n}\n\n/**\n * Check if two nodes are equivalent.\n *\n * @param {Node} node\t\t\tDOM Node to compare\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\n * @private\n */\nfunction isSameNodeType(node, vnode, hydrating) {\n  if (typeof vnode === 'string' || typeof vnode === 'number') {\n    return node.splitText !== undefined;\n  }\n  if (typeof vnode.nodeName === 'string') {\n    return !node._componentConstructor && isNamedNode(node, vnode.nodeName);\n  }\n  return hydrating || node._componentConstructor === vnode.nodeName;\n}\n\n/**\n * Check if an Element has a given nodeName, case-insensitively.\n *\n * @param {Element} node\tA DOM Element to inspect the name of.\n * @param {String} nodeName\tUnnormalized name to compare against.\n */\nfunction isNamedNode(node, nodeName) {\n  return node.normalizedNodeName === nodeName || node.nodeName.toLowerCase() === nodeName.toLowerCase();\n}\n\n/**\n * Reconstruct Component-style `props` from a VNode.\n * Ensures default/fallback values from `defaultProps`:\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\n *\n * @param {VNode} vnode\n * @returns {Object} props\n */\nfunction getNodeProps(vnode) {\n  var props = extend({}, vnode.attributes);\n  props.children = vnode.children;\n\n  var defaultProps = vnode.nodeName.defaultProps;\n  if (defaultProps !== undefined) {\n    for (var i in defaultProps) {\n      if (props[i] === undefined) {\n        props[i] = defaultProps[i];\n      }\n    }\n  }\n\n  return props;\n}\n\n/** Create an element with the given nodeName.\n *\t@param {String} nodeName\n *\t@param {Boolean} [isSvg=false]\tIf `true`, creates an element within the SVG namespace.\n *\t@returns {Element} node\n */\nfunction createNode(nodeName, isSvg) {\n\tvar node = isSvg ? document.createElementNS('http://www.w3.org/2000/svg', nodeName) : document.createElement(nodeName);\n\tnode.normalizedNodeName = nodeName;\n\treturn node;\n}\n\n/** Remove a child node from its parent if attached.\n *\t@param {Element} node\t\tThe node to remove\n */\nfunction removeNode(node) {\n\tvar parentNode = node.parentNode;\n\tif (parentNode) parentNode.removeChild(node);\n}\n\n/** Set a named attribute on the given Node, with special behavior for some names and event handlers.\n *\tIf `value` is `null`, the attribute/handler will be removed.\n *\t@param {Element} node\tAn element to mutate\n *\t@param {string} name\tThe name/key to set, such as an event or attribute name\n *\t@param {any} old\tThe last value that was set for this name/node pair\n *\t@param {any} value\tAn attribute value, such as a function to be used as an event handler\n *\t@param {Boolean} isSvg\tAre we currently diffing inside an svg?\n *\t@private\n */\nfunction setAccessor(node, name, old, value, isSvg) {\n\tif (name === 'className') name = 'class';\n\n\tif (name === 'key') {\n\t\t// ignore\n\t} else if (name === 'ref') {\n\t\tif (old) old(null);\n\t\tif (value) value(node);\n\t} else if (name === 'class' && !isSvg) {\n\t\tnode.className = value || '';\n\t} else if (name === 'style') {\n\t\tif (!value || typeof value === 'string' || typeof old === 'string') {\n\t\t\tnode.style.cssText = value || '';\n\t\t}\n\t\tif (value && typeof value === 'object') {\n\t\t\tif (typeof old !== 'string') {\n\t\t\t\tfor (var i in old) {\n\t\t\t\t\tif (!(i in value)) node.style[i] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (var i in value) {\n\t\t\t\tnode.style[i] = typeof value[i] === 'number' && IS_NON_DIMENSIONAL.test(i) === false ? value[i] + 'px' : value[i];\n\t\t\t}\n\t\t}\n\t} else if (name === 'dangerouslySetInnerHTML') {\n\t\tif (value) node.innerHTML = value.__html || '';\n\t} else if (name[0] == 'o' && name[1] == 'n') {\n\t\tvar useCapture = name !== (name = name.replace(/Capture$/, ''));\n\t\tname = name.toLowerCase().substring(2);\n\t\tif (value) {\n\t\t\tif (!old) node.addEventListener(name, eventProxy, useCapture);\n\t\t} else {\n\t\t\tnode.removeEventListener(name, eventProxy, useCapture);\n\t\t}\n\t\t(node._listeners || (node._listeners = {}))[name] = value;\n\t} else if (name !== 'list' && name !== 'type' && !isSvg && name in node) {\n\t\tsetProperty(node, name, value == null ? '' : value);\n\t\tif (value == null || value === false) node.removeAttribute(name);\n\t} else {\n\t\tvar ns = isSvg && name !== (name = name.replace(/^xlink:?/, ''));\n\t\tif (value == null || value === false) {\n\t\t\tif (ns) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase());else node.removeAttribute(name);\n\t\t} else if (typeof value !== 'function') {\n\t\t\tif (ns) node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value);else node.setAttribute(name, value);\n\t\t}\n\t}\n}\n\n/** Attempt to set a DOM property to the given value.\n *\tIE & FF throw for certain property-value combinations.\n */\nfunction setProperty(node, name, value) {\n\ttry {\n\t\tnode[name] = value;\n\t} catch (e) {}\n}\n\n/** Proxy an event to hooked event handlers\n *\t@private\n */\nfunction eventProxy(e) {\n\treturn this._listeners[e.type](options.event && options.event(e) || e);\n}\n\n/** Queue of components that have been mounted and are awaiting componentDidMount */\nvar mounts = [];\n\n/** Diff recursion count, used to track the end of the diff cycle. */\nvar diffLevel = 0;\n\n/** Global flag indicating if the diff is currently within an SVG */\nvar isSvgMode = false;\n\n/** Global flag indicating if the diff is performing hydration */\nvar hydrating = false;\n\n/** Invoke queued componentDidMount lifecycle methods */\nfunction flushMounts() {\n\tvar c;\n\twhile (c = mounts.pop()) {\n\t\tif (options.afterMount) options.afterMount(c);\n\t\tif (c.componentDidMount) c.componentDidMount();\n\t}\n}\n\n/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.\n *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\n *\t@returns {Element} dom\t\t\tThe created/mutated element\n *\t@private\n */\nfunction diff(dom, vnode, context, mountAll, parent, componentRoot) {\n\t// diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\n\tif (!diffLevel++) {\n\t\t// when first starting the diff, check if we're diffing an SVG or within an SVG\n\t\tisSvgMode = parent != null && parent.ownerSVGElement !== undefined;\n\n\t\t// hydration is indicated by the existing element to be diffed not having a prop cache\n\t\thydrating = dom != null && !('__preactattr_' in dom);\n\t}\n\n\tvar ret = idiff(dom, vnode, context, mountAll, componentRoot);\n\n\t// append the element if its a new parent\n\tif (parent && ret.parentNode !== parent) parent.appendChild(ret);\n\n\t// diffLevel being reduced to 0 means we're exiting the diff\n\tif (! --diffLevel) {\n\t\thydrating = false;\n\t\t// invoke queued componentDidMount lifecycle methods\n\t\tif (!componentRoot) flushMounts();\n\t}\n\n\treturn ret;\n}\n\n/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */\nfunction idiff(dom, vnode, context, mountAll, componentRoot) {\n\tvar out = dom,\n\t    prevSvgMode = isSvgMode;\n\n\t// empty values (null, undefined, booleans) render as empty Text nodes\n\tif (vnode == null || typeof vnode === 'boolean') vnode = '';\n\n\t// Fast case: Strings & Numbers create/update Text nodes.\n\tif (typeof vnode === 'string' || typeof vnode === 'number') {\n\n\t\t// update if it's already a Text node:\n\t\tif (dom && dom.splitText !== undefined && dom.parentNode && (!dom._component || componentRoot)) {\n\t\t\t/* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\n\t\t\tif (dom.nodeValue != vnode) {\n\t\t\t\tdom.nodeValue = vnode;\n\t\t\t}\n\t\t} else {\n\t\t\t// it wasn't a Text node: replace it with one and recycle the old Element\n\t\t\tout = document.createTextNode(vnode);\n\t\t\tif (dom) {\n\t\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\t\t\t\trecollectNodeTree(dom, true);\n\t\t\t}\n\t\t}\n\n\t\tout['__preactattr_'] = true;\n\n\t\treturn out;\n\t}\n\n\t// If the VNode represents a Component, perform a component diff:\n\tvar vnodeName = vnode.nodeName;\n\tif (typeof vnodeName === 'function') {\n\t\treturn buildComponentFromVNode(dom, vnode, context, mountAll);\n\t}\n\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\n\tisSvgMode = vnodeName === 'svg' ? true : vnodeName === 'foreignObject' ? false : isSvgMode;\n\n\t// If there's no existing element or it's the wrong type, create a new one:\n\tvnodeName = String(vnodeName);\n\tif (!dom || !isNamedNode(dom, vnodeName)) {\n\t\tout = createNode(vnodeName, isSvgMode);\n\n\t\tif (dom) {\n\t\t\t// move children into the replacement node\n\t\t\twhile (dom.firstChild) {\n\t\t\t\tout.appendChild(dom.firstChild);\n\t\t\t} // if the previous Element was mounted into the DOM, replace it inline\n\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\n\t\t\t// recycle the old element (skips non-Element node types)\n\t\t\trecollectNodeTree(dom, true);\n\t\t}\n\t}\n\n\tvar fc = out.firstChild,\n\t    props = out['__preactattr_'],\n\t    vchildren = vnode.children;\n\n\tif (props == null) {\n\t\tprops = out['__preactattr_'] = {};\n\t\tfor (var a = out.attributes, i = a.length; i--;) {\n\t\t\tprops[a[i].name] = a[i].value;\n\t\t}\n\t}\n\n\t// Optimization: fast-path for elements containing a single TextNode:\n\tif (!hydrating && vchildren && vchildren.length === 1 && typeof vchildren[0] === 'string' && fc != null && fc.splitText !== undefined && fc.nextSibling == null) {\n\t\tif (fc.nodeValue != vchildren[0]) {\n\t\t\tfc.nodeValue = vchildren[0];\n\t\t}\n\t}\n\t// otherwise, if there are existing or new children, diff them:\n\telse if (vchildren && vchildren.length || fc != null) {\n\t\t\tinnerDiffNode(out, vchildren, context, mountAll, hydrating || props.dangerouslySetInnerHTML != null);\n\t\t}\n\n\t// Apply attributes/props from VNode to the DOM Element:\n\tdiffAttributes(out, vnode.attributes, props);\n\n\t// restore previous SVG mode: (in case we're exiting an SVG namespace)\n\tisSvgMode = prevSvgMode;\n\n\treturn out;\n}\n\n/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.\n *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\n *\t@param {Object} context\t\t\tImplicitly descendant context object (from most recent `getChildContext()`)\n *\t@param {Boolean} mountAll\n *\t@param {Boolean} isHydrating\tIf `true`, consumes externally created elements similar to hydration\n */\nfunction innerDiffNode(dom, vchildren, context, mountAll, isHydrating) {\n\tvar originalChildren = dom.childNodes,\n\t    children = [],\n\t    keyed = {},\n\t    keyedLen = 0,\n\t    min = 0,\n\t    len = originalChildren.length,\n\t    childrenLen = 0,\n\t    vlen = vchildren ? vchildren.length : 0,\n\t    j,\n\t    c,\n\t    f,\n\t    vchild,\n\t    child;\n\n\t// Build up a map of keyed children and an Array of unkeyed children:\n\tif (len !== 0) {\n\t\tfor (var i = 0; i < len; i++) {\n\t\t\tvar _child = originalChildren[i],\n\t\t\t    props = _child['__preactattr_'],\n\t\t\t    key = vlen && props ? _child._component ? _child._component.__key : props.key : null;\n\t\t\tif (key != null) {\n\t\t\t\tkeyedLen++;\n\t\t\t\tkeyed[key] = _child;\n\t\t\t} else if (props || (_child.splitText !== undefined ? isHydrating ? _child.nodeValue.trim() : true : isHydrating)) {\n\t\t\t\tchildren[childrenLen++] = _child;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (vlen !== 0) {\n\t\tfor (var i = 0; i < vlen; i++) {\n\t\t\tvchild = vchildren[i];\n\t\t\tchild = null;\n\n\t\t\t// attempt to find a node based on key matching\n\t\t\tvar key = vchild.key;\n\t\t\tif (key != null) {\n\t\t\t\tif (keyedLen && keyed[key] !== undefined) {\n\t\t\t\t\tchild = keyed[key];\n\t\t\t\t\tkeyed[key] = undefined;\n\t\t\t\t\tkeyedLen--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// attempt to pluck a node of the same type from the existing children\n\t\t\telse if (!child && min < childrenLen) {\n\t\t\t\t\tfor (j = min; j < childrenLen; j++) {\n\t\t\t\t\t\tif (children[j] !== undefined && isSameNodeType(c = children[j], vchild, isHydrating)) {\n\t\t\t\t\t\t\tchild = c;\n\t\t\t\t\t\t\tchildren[j] = undefined;\n\t\t\t\t\t\t\tif (j === childrenLen - 1) childrenLen--;\n\t\t\t\t\t\t\tif (j === min) min++;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// morph the matched/found/created DOM child to match vchild (deep)\n\t\t\tchild = idiff(child, vchild, context, mountAll);\n\n\t\t\tf = originalChildren[i];\n\t\t\tif (child && child !== dom && child !== f) {\n\t\t\t\tif (f == null) {\n\t\t\t\t\tdom.appendChild(child);\n\t\t\t\t} else if (child === f.nextSibling) {\n\t\t\t\t\tremoveNode(f);\n\t\t\t\t} else {\n\t\t\t\t\tdom.insertBefore(child, f);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// remove unused keyed children:\n\tif (keyedLen) {\n\t\tfor (var i in keyed) {\n\t\t\tif (keyed[i] !== undefined) recollectNodeTree(keyed[i], false);\n\t\t}\n\t}\n\n\t// remove orphaned unkeyed children:\n\twhile (min <= childrenLen) {\n\t\tif ((child = children[childrenLen--]) !== undefined) recollectNodeTree(child, false);\n\t}\n}\n\n/** Recursively recycle (or just unmount) a node and its descendants.\n *\t@param {Node} node\t\t\t\t\t\tDOM node to start unmount/removal from\n *\t@param {Boolean} [unmountOnly=false]\tIf `true`, only triggers unmount lifecycle, skips removal\n */\nfunction recollectNodeTree(node, unmountOnly) {\n\tvar component = node._component;\n\tif (component) {\n\t\t// if node is owned by a Component, unmount that component (ends up recursing back here)\n\t\tunmountComponent(component);\n\t} else {\n\t\t// If the node's VNode had a ref function, invoke it with null here.\n\t\t// (this is part of the React spec, and smart for unsetting references)\n\t\tif (node['__preactattr_'] != null && node['__preactattr_'].ref) node['__preactattr_'].ref(null);\n\n\t\tif (unmountOnly === false || node['__preactattr_'] == null) {\n\t\t\tremoveNode(node);\n\t\t}\n\n\t\tremoveChildren(node);\n\t}\n}\n\n/** Recollect/unmount all children.\n *\t- we use .lastChild here because it causes less reflow than .firstChild\n *\t- it's also cheaper than accessing the .childNodes Live NodeList\n */\nfunction removeChildren(node) {\n\tnode = node.lastChild;\n\twhile (node) {\n\t\tvar next = node.previousSibling;\n\t\trecollectNodeTree(node, true);\n\t\tnode = next;\n\t}\n}\n\n/** Apply differences in attributes from a VNode to the given DOM Element.\n *\t@param {Element} dom\t\tElement with attributes to diff `attrs` against\n *\t@param {Object} attrs\t\tThe desired end-state key-value attribute pairs\n *\t@param {Object} old\t\t\tCurrent/previous attributes (from previous VNode or element's prop cache)\n */\nfunction diffAttributes(dom, attrs, old) {\n\tvar name;\n\n\t// remove attributes no longer present on the vnode by setting them to undefined\n\tfor (name in old) {\n\t\tif (!(attrs && attrs[name] != null) && old[name] != null) {\n\t\t\tsetAccessor(dom, name, old[name], old[name] = undefined, isSvgMode);\n\t\t}\n\t}\n\n\t// add new & update changed attributes\n\tfor (name in attrs) {\n\t\tif (name !== 'children' && name !== 'innerHTML' && (!(name in old) || attrs[name] !== (name === 'value' || name === 'checked' ? dom[name] : old[name]))) {\n\t\t\tsetAccessor(dom, name, old[name], old[name] = attrs[name], isSvgMode);\n\t\t}\n\t}\n}\n\n/** Retains a pool of Components for re-use, keyed on component name.\n *\tNote: since component names are not unique or even necessarily available, these are primarily a form of sharding.\n *\t@private\n */\nvar components = {};\n\n/** Reclaim a component for later re-use by the recycler. */\nfunction collectComponent(component) {\n\tvar name = component.constructor.name;\n\t(components[name] || (components[name] = [])).push(component);\n}\n\n/** Create a component. Normalizes differences between PFC's and classful Components. */\nfunction createComponent(Ctor, props, context) {\n\tvar list = components[Ctor.name],\n\t    inst;\n\n\tif (Ctor.prototype && Ctor.prototype.render) {\n\t\tinst = new Ctor(props, context);\n\t\tComponent.call(inst, props, context);\n\t} else {\n\t\tinst = new Component(props, context);\n\t\tinst.constructor = Ctor;\n\t\tinst.render = doRender;\n\t}\n\n\tif (list) {\n\t\tfor (var i = list.length; i--;) {\n\t\t\tif (list[i].constructor === Ctor) {\n\t\t\t\tinst.nextBase = list[i].nextBase;\n\t\t\t\tlist.splice(i, 1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn inst;\n}\n\n/** The `.render()` method for a PFC backing instance. */\nfunction doRender(props, state, context) {\n\treturn this.constructor(props, context);\n}\n\n/** Set a component's `props` (generally derived from JSX attributes).\n *\t@param {Object} props\n *\t@param {Object} [opts]\n *\t@param {boolean} [opts.renderSync=false]\tIf `true` and {@link options.syncComponentUpdates} is `true`, triggers synchronous rendering.\n *\t@param {boolean} [opts.render=true]\t\t\tIf `false`, no render will be triggered.\n */\nfunction setComponentProps(component, props, opts, context, mountAll) {\n\tif (component._disable) return;\n\tcomponent._disable = true;\n\n\tif (component.__ref = props.ref) delete props.ref;\n\tif (component.__key = props.key) delete props.key;\n\n\tif (!component.base || mountAll) {\n\t\tif (component.componentWillMount) component.componentWillMount();\n\t} else if (component.componentWillReceiveProps) {\n\t\tcomponent.componentWillReceiveProps(props, context);\n\t}\n\n\tif (context && context !== component.context) {\n\t\tif (!component.prevContext) component.prevContext = component.context;\n\t\tcomponent.context = context;\n\t}\n\n\tif (!component.prevProps) component.prevProps = component.props;\n\tcomponent.props = props;\n\n\tcomponent._disable = false;\n\n\tif (opts !== 0) {\n\t\tif (opts === 1 || options.syncComponentUpdates !== false || !component.base) {\n\t\t\trenderComponent(component, 1, mountAll);\n\t\t} else {\n\t\t\tenqueueRender(component);\n\t\t}\n\t}\n\n\tif (component.__ref) component.__ref(component);\n}\n\n/** Render a Component, triggering necessary lifecycle events and taking High-Order Components into account.\n *\t@param {Component} component\n *\t@param {Object} [opts]\n *\t@param {boolean} [opts.build=false]\t\tIf `true`, component will build and store a DOM node if not already associated with one.\n *\t@private\n */\nfunction renderComponent(component, opts, mountAll, isChild) {\n\tif (component._disable) return;\n\n\tvar props = component.props,\n\t    state = component.state,\n\t    context = component.context,\n\t    previousProps = component.prevProps || props,\n\t    previousState = component.prevState || state,\n\t    previousContext = component.prevContext || context,\n\t    isUpdate = component.base,\n\t    nextBase = component.nextBase,\n\t    initialBase = isUpdate || nextBase,\n\t    initialChildComponent = component._component,\n\t    skip = false,\n\t    rendered,\n\t    inst,\n\t    cbase;\n\n\t// if updating\n\tif (isUpdate) {\n\t\tcomponent.props = previousProps;\n\t\tcomponent.state = previousState;\n\t\tcomponent.context = previousContext;\n\t\tif (opts !== 2 && component.shouldComponentUpdate && component.shouldComponentUpdate(props, state, context) === false) {\n\t\t\tskip = true;\n\t\t} else if (component.componentWillUpdate) {\n\t\t\tcomponent.componentWillUpdate(props, state, context);\n\t\t}\n\t\tcomponent.props = props;\n\t\tcomponent.state = state;\n\t\tcomponent.context = context;\n\t}\n\n\tcomponent.prevProps = component.prevState = component.prevContext = component.nextBase = null;\n\tcomponent._dirty = false;\n\n\tif (!skip) {\n\t\trendered = component.render(props, state, context);\n\n\t\t// context to pass to the child, can be updated via (grand-)parent component\n\t\tif (component.getChildContext) {\n\t\t\tcontext = extend(extend({}, context), component.getChildContext());\n\t\t}\n\n\t\tvar childComponent = rendered && rendered.nodeName,\n\t\t    toUnmount,\n\t\t    base;\n\n\t\tif (typeof childComponent === 'function') {\n\t\t\t// set up high order component link\n\n\t\t\tvar childProps = getNodeProps(rendered);\n\t\t\tinst = initialChildComponent;\n\n\t\t\tif (inst && inst.constructor === childComponent && childProps.key == inst.__key) {\n\t\t\t\tsetComponentProps(inst, childProps, 1, context, false);\n\t\t\t} else {\n\t\t\t\ttoUnmount = inst;\n\n\t\t\t\tcomponent._component = inst = createComponent(childComponent, childProps, context);\n\t\t\t\tinst.nextBase = inst.nextBase || nextBase;\n\t\t\t\tinst._parentComponent = component;\n\t\t\t\tsetComponentProps(inst, childProps, 0, context, false);\n\t\t\t\trenderComponent(inst, 1, mountAll, true);\n\t\t\t}\n\n\t\t\tbase = inst.base;\n\t\t} else {\n\t\t\tcbase = initialBase;\n\n\t\t\t// destroy high order component link\n\t\t\ttoUnmount = initialChildComponent;\n\t\t\tif (toUnmount) {\n\t\t\t\tcbase = component._component = null;\n\t\t\t}\n\n\t\t\tif (initialBase || opts === 1) {\n\t\t\t\tif (cbase) cbase._component = null;\n\t\t\t\tbase = diff(cbase, rendered, context, mountAll || !isUpdate, initialBase && initialBase.parentNode, true);\n\t\t\t}\n\t\t}\n\n\t\tif (initialBase && base !== initialBase && inst !== initialChildComponent) {\n\t\t\tvar baseParent = initialBase.parentNode;\n\t\t\tif (baseParent && base !== baseParent) {\n\t\t\t\tbaseParent.replaceChild(base, initialBase);\n\n\t\t\t\tif (!toUnmount) {\n\t\t\t\t\tinitialBase._component = null;\n\t\t\t\t\trecollectNodeTree(initialBase, false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (toUnmount) {\n\t\t\tunmountComponent(toUnmount);\n\t\t}\n\n\t\tcomponent.base = base;\n\t\tif (base && !isChild) {\n\t\t\tvar componentRef = component,\n\t\t\t    t = component;\n\t\t\twhile (t = t._parentComponent) {\n\t\t\t\t(componentRef = t).base = base;\n\t\t\t}\n\t\t\tbase._component = componentRef;\n\t\t\tbase._componentConstructor = componentRef.constructor;\n\t\t}\n\t}\n\n\tif (!isUpdate || mountAll) {\n\t\tmounts.unshift(component);\n\t} else if (!skip) {\n\t\t// Ensure that pending componentDidMount() hooks of child components\n\t\t// are called before the componentDidUpdate() hook in the parent.\n\t\t// Note: disabled as it causes duplicate hooks, see https://github.com/developit/preact/issues/750\n\t\t// flushMounts();\n\n\t\tif (component.componentDidUpdate) {\n\t\t\tcomponent.componentDidUpdate(previousProps, previousState, previousContext);\n\t\t}\n\t\tif (options.afterUpdate) options.afterUpdate(component);\n\t}\n\n\tif (component._renderCallbacks != null) {\n\t\twhile (component._renderCallbacks.length) {\n\t\t\tcomponent._renderCallbacks.pop().call(component);\n\t\t}\n\t}\n\n\tif (!diffLevel && !isChild) flushMounts();\n}\n\n/** Apply the Component referenced by a VNode to the DOM.\n *\t@param {Element} dom\tThe DOM node to mutate\n *\t@param {VNode} vnode\tA Component-referencing VNode\n *\t@returns {Element} dom\tThe created/mutated element\n *\t@private\n */\nfunction buildComponentFromVNode(dom, vnode, context, mountAll) {\n\tvar c = dom && dom._component,\n\t    originalComponent = c,\n\t    oldDom = dom,\n\t    isDirectOwner = c && dom._componentConstructor === vnode.nodeName,\n\t    isOwner = isDirectOwner,\n\t    props = getNodeProps(vnode);\n\twhile (c && !isOwner && (c = c._parentComponent)) {\n\t\tisOwner = c.constructor === vnode.nodeName;\n\t}\n\n\tif (c && isOwner && (!mountAll || c._component)) {\n\t\tsetComponentProps(c, props, 3, context, mountAll);\n\t\tdom = c.base;\n\t} else {\n\t\tif (originalComponent && !isDirectOwner) {\n\t\t\tunmountComponent(originalComponent);\n\t\t\tdom = oldDom = null;\n\t\t}\n\n\t\tc = createComponent(vnode.nodeName, props, context);\n\t\tif (dom && !c.nextBase) {\n\t\t\tc.nextBase = dom;\n\t\t\t// passing dom/oldDom as nextBase will recycle it if unused, so bypass recycling on L229:\n\t\t\toldDom = null;\n\t\t}\n\t\tsetComponentProps(c, props, 1, context, mountAll);\n\t\tdom = c.base;\n\n\t\tif (oldDom && dom !== oldDom) {\n\t\t\toldDom._component = null;\n\t\t\trecollectNodeTree(oldDom, false);\n\t\t}\n\t}\n\n\treturn dom;\n}\n\n/** Remove a component from the DOM and recycle it.\n *\t@param {Component} component\tThe Component instance to unmount\n *\t@private\n */\nfunction unmountComponent(component) {\n\tif (options.beforeUnmount) options.beforeUnmount(component);\n\n\tvar base = component.base;\n\n\tcomponent._disable = true;\n\n\tif (component.componentWillUnmount) component.componentWillUnmount();\n\n\tcomponent.base = null;\n\n\t// recursively tear down & recollect high-order component children:\n\tvar inner = component._component;\n\tif (inner) {\n\t\tunmountComponent(inner);\n\t} else if (base) {\n\t\tif (base['__preactattr_'] && base['__preactattr_'].ref) base['__preactattr_'].ref(null);\n\n\t\tcomponent.nextBase = base;\n\n\t\tremoveNode(base);\n\t\tcollectComponent(component);\n\n\t\tremoveChildren(base);\n\t}\n\n\tif (component.__ref) component.__ref(null);\n}\n\n/** Base Component class.\n *\tProvides `setState()` and `forceUpdate()`, which trigger rendering.\n *\t@public\n *\n *\t@example\n *\tclass MyFoo extends Component {\n *\t\trender(props, state) {\n *\t\t\treturn <div />;\n *\t\t}\n *\t}\n */\nfunction Component(props, context) {\n\tthis._dirty = true;\n\n\t/** @public\n  *\t@type {object}\n  */\n\tthis.context = context;\n\n\t/** @public\n  *\t@type {object}\n  */\n\tthis.props = props;\n\n\t/** @public\n  *\t@type {object}\n  */\n\tthis.state = this.state || {};\n}\n\nextend(Component.prototype, {\n\n\t/** Returns a `boolean` indicating if the component should re-render when receiving the given `props` and `state`.\n  *\t@param {object} nextProps\n  *\t@param {object} nextState\n  *\t@param {object} nextContext\n  *\t@returns {Boolean} should the component re-render\n  *\t@name shouldComponentUpdate\n  *\t@function\n  */\n\n\t/** Update component state by copying properties from `state` to `this.state`.\n  *\t@param {object} state\t\tA hash of state properties to update with new values\n  *\t@param {function} callback\tA function to be called once component state is updated\n  */\n\tsetState: function setState(state, callback) {\n\t\tvar s = this.state;\n\t\tif (!this.prevState) this.prevState = extend({}, s);\n\t\textend(s, typeof state === 'function' ? state(s, this.props) : state);\n\t\tif (callback) (this._renderCallbacks = this._renderCallbacks || []).push(callback);\n\t\tenqueueRender(this);\n\t},\n\n\n\t/** Immediately perform a synchronous re-render of the component.\n  *\t@param {function} callback\t\tA function to be called after component is re-rendered.\n  *\t@private\n  */\n\tforceUpdate: function forceUpdate(callback) {\n\t\tif (callback) (this._renderCallbacks = this._renderCallbacks || []).push(callback);\n\t\trenderComponent(this, 2);\n\t},\n\n\n\t/** Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n  *\tVirtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\n  *\t@param {object} props\t\tProps (eg: JSX attributes) received from parent element/component\n  *\t@param {object} state\t\tThe component's current state\n  *\t@param {object} context\t\tContext object (if a parent component has provided context)\n  *\t@returns VNode\n  */\n\trender: function render() {}\n});\n\n/** Render JSX into a `parent` Element.\n *\t@param {VNode} vnode\t\tA (JSX) VNode to render\n *\t@param {Element} parent\t\tDOM element to render into\n *\t@param {Element} [merge]\tAttempt to re-use an existing DOM tree rooted at `merge`\n *\t@public\n *\n *\t@example\n *\t// render a div into <body>:\n *\trender(<div id=\"hello\">hello!</div>, document.body);\n *\n *\t@example\n *\t// render a \"Thing\" component into #foo:\n *\tconst Thing = ({ name }) => <span>{ name }</span>;\n *\trender(<Thing name=\"one\" />, document.querySelector('#foo'));\n */\nfunction render(vnode, parent, merge) {\n  return diff(merge, vnode, {}, false, parent, false);\n}\n\nvar preact = {\n\th: h,\n\tcreateElement: h,\n\tcloneElement: cloneElement,\n\tComponent: Component,\n\trender: render,\n\trerender: rerender,\n\toptions: options\n};\n\nexport default preact;\nexport { h, h as createElement, cloneElement, Component, render, rerender, options };\n//# sourceMappingURL=preact.esm.js.map\n","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport { Component, Children } from 'react';\nimport PropTypes from 'prop-types';\nimport { storeShape, subscriptionShape } from '../utils/PropTypes';\nimport warning from '../utils/warning';\n\nvar didWarnAboutReceivingStore = false;\nfunction warnAboutReceivingStore() {\n  if (didWarnAboutReceivingStore) {\n    return;\n  }\n  didWarnAboutReceivingStore = true;\n\n  warning('<Provider> does not support changing `store` on the fly. ' + 'It is most likely that you see this error because you updated to ' + 'Redux 2.x and React Redux 2.x which no longer hot reload reducers ' + 'automatically. See https://github.com/reactjs/react-redux/releases/' + 'tag/v2.0.0 for the migration instructions.');\n}\n\nexport function createProvider() {\n  var _Provider$childContex;\n\n  var storeKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'store';\n  var subKey = arguments[1];\n\n  var subscriptionKey = subKey || storeKey + 'Subscription';\n\n  var Provider = function (_Component) {\n    _inherits(Provider, _Component);\n\n    Provider.prototype.getChildContext = function getChildContext() {\n      var _ref;\n\n      return _ref = {}, _ref[storeKey] = this[storeKey], _ref[subscriptionKey] = null, _ref;\n    };\n\n    function Provider(props, context) {\n      _classCallCheck(this, Provider);\n\n      var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));\n\n      _this[storeKey] = props.store;\n      return _this;\n    }\n\n    Provider.prototype.render = function render() {\n      return Children.only(this.props.children);\n    };\n\n    return Provider;\n  }(Component);\n\n  if (process.env.NODE_ENV !== 'production') {\n    Provider.prototype.componentWillReceiveProps = function (nextProps) {\n      if (this[storeKey] !== nextProps.store) {\n        warnAboutReceivingStore();\n      }\n    };\n  }\n\n  Provider.propTypes = {\n    store: storeShape.isRequired,\n    children: PropTypes.element.isRequired\n  };\n  Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[storeKey] = storeShape.isRequired, _Provider$childContex[subscriptionKey] = subscriptionShape, _Provider$childContex);\n\n  return Provider;\n}\n\nexport default createProvider();","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport hoistStatics from 'hoist-non-react-statics';\nimport invariant from 'invariant';\nimport { Component, createElement } from 'react';\n\nimport Subscription from '../utils/Subscription';\nimport { storeShape, subscriptionShape } from '../utils/PropTypes';\n\nvar hotReloadingVersion = 0;\nvar dummyState = {};\nfunction noop() {}\nfunction makeSelectorStateful(sourceSelector, store) {\n  // wrap the selector in an object that tracks its results between runs.\n  var selector = {\n    run: function runComponentSelector(props) {\n      try {\n        var nextProps = sourceSelector(store.getState(), props);\n        if (nextProps !== selector.props || selector.error) {\n          selector.shouldComponentUpdate = true;\n          selector.props = nextProps;\n          selector.error = null;\n        }\n      } catch (error) {\n        selector.shouldComponentUpdate = true;\n        selector.error = error;\n      }\n    }\n  };\n\n  return selector;\n}\n\nexport default function connectAdvanced(\n/*\n  selectorFactory is a func that is responsible for returning the selector function used to\n  compute new props from state, props, and dispatch. For example:\n     export default connectAdvanced((dispatch, options) => (state, props) => ({\n      thing: state.things[props.thingId],\n      saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)),\n    }))(YourComponent)\n   Access to dispatch is provided to the factory so selectorFactories can bind actionCreators\n  outside of their selector as an optimization. Options passed to connectAdvanced are passed to\n  the selectorFactory, along with displayName and WrappedComponent, as the second argument.\n   Note that selectorFactory is responsible for all caching/memoization of inbound and outbound\n  props. Do not use connectAdvanced directly without memoizing results between calls to your\n  selector, otherwise the Connect component will re-render on every state or props change.\n*/\nselectorFactory) {\n  var _contextTypes, _childContextTypes;\n\n  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n      _ref$getDisplayName = _ref.getDisplayName,\n      getDisplayName = _ref$getDisplayName === undefined ? function (name) {\n    return 'ConnectAdvanced(' + name + ')';\n  } : _ref$getDisplayName,\n      _ref$methodName = _ref.methodName,\n      methodName = _ref$methodName === undefined ? 'connectAdvanced' : _ref$methodName,\n      _ref$renderCountProp = _ref.renderCountProp,\n      renderCountProp = _ref$renderCountProp === undefined ? undefined : _ref$renderCountProp,\n      _ref$shouldHandleStat = _ref.shouldHandleStateChanges,\n      shouldHandleStateChanges = _ref$shouldHandleStat === undefined ? true : _ref$shouldHandleStat,\n      _ref$storeKey = _ref.storeKey,\n      storeKey = _ref$storeKey === undefined ? 'store' : _ref$storeKey,\n      _ref$withRef = _ref.withRef,\n      withRef = _ref$withRef === undefined ? false : _ref$withRef,\n      connectOptions = _objectWithoutProperties(_ref, ['getDisplayName', 'methodName', 'renderCountProp', 'shouldHandleStateChanges', 'storeKey', 'withRef']);\n\n  var subscriptionKey = storeKey + 'Subscription';\n  var version = hotReloadingVersion++;\n\n  var contextTypes = (_contextTypes = {}, _contextTypes[storeKey] = storeShape, _contextTypes[subscriptionKey] = subscriptionShape, _contextTypes);\n  var childContextTypes = (_childContextTypes = {}, _childContextTypes[subscriptionKey] = subscriptionShape, _childContextTypes);\n\n  return function wrapWithConnect(WrappedComponent) {\n    invariant(typeof WrappedComponent == 'function', 'You must pass a component to the function returned by ' + (methodName + '. Instead received ' + JSON.stringify(WrappedComponent)));\n\n    var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';\n\n    var displayName = getDisplayName(wrappedComponentName);\n\n    var selectorFactoryOptions = _extends({}, connectOptions, {\n      getDisplayName: getDisplayName,\n      methodName: methodName,\n      renderCountProp: renderCountProp,\n      shouldHandleStateChanges: shouldHandleStateChanges,\n      storeKey: storeKey,\n      withRef: withRef,\n      displayName: displayName,\n      wrappedComponentName: wrappedComponentName,\n      WrappedComponent: WrappedComponent\n    });\n\n    var Connect = function (_Component) {\n      _inherits(Connect, _Component);\n\n      function Connect(props, context) {\n        _classCallCheck(this, Connect);\n\n        var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));\n\n        _this.version = version;\n        _this.state = {};\n        _this.renderCount = 0;\n        _this.store = props[storeKey] || context[storeKey];\n        _this.propsMode = Boolean(props[storeKey]);\n        _this.setWrappedInstance = _this.setWrappedInstance.bind(_this);\n\n        invariant(_this.store, 'Could not find \"' + storeKey + '\" in either the context or props of ' + ('\"' + displayName + '\". Either wrap the root component in a <Provider>, ') + ('or explicitly pass \"' + storeKey + '\" as a prop to \"' + displayName + '\".'));\n\n        _this.initSelector();\n        _this.initSubscription();\n        return _this;\n      }\n\n      Connect.prototype.getChildContext = function getChildContext() {\n        var _ref2;\n\n        // If this component received store from props, its subscription should be transparent\n        // to any descendants receiving store+subscription from context; it passes along\n        // subscription passed to it. Otherwise, it shadows the parent subscription, which allows\n        // Connect to control ordering of notifications to flow top-down.\n        var subscription = this.propsMode ? null : this.subscription;\n        return _ref2 = {}, _ref2[subscriptionKey] = subscription || this.context[subscriptionKey], _ref2;\n      };\n\n      Connect.prototype.componentDidMount = function componentDidMount() {\n        if (!shouldHandleStateChanges) return;\n\n        // componentWillMount fires during server side rendering, but componentDidMount and\n        // componentWillUnmount do not. Because of this, trySubscribe happens during ...didMount.\n        // Otherwise, unsubscription would never take place during SSR, causing a memory leak.\n        // To handle the case where a child component may have triggered a state change by\n        // dispatching an action in its componentWillMount, we have to re-run the select and maybe\n        // re-render.\n        this.subscription.trySubscribe();\n        this.selector.run(this.props);\n        if (this.selector.shouldComponentUpdate) this.forceUpdate();\n      };\n\n      Connect.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n        this.selector.run(nextProps);\n      };\n\n      Connect.prototype.shouldComponentUpdate = function shouldComponentUpdate() {\n        return this.selector.shouldComponentUpdate;\n      };\n\n      Connect.prototype.componentWillUnmount = function componentWillUnmount() {\n        if (this.subscription) this.subscription.tryUnsubscribe();\n        this.subscription = null;\n        this.notifyNestedSubs = noop;\n        this.store = null;\n        this.selector.run = noop;\n        this.selector.shouldComponentUpdate = false;\n      };\n\n      Connect.prototype.getWrappedInstance = function getWrappedInstance() {\n        invariant(withRef, 'To access the wrapped instance, you need to specify ' + ('{ withRef: true } in the options argument of the ' + methodName + '() call.'));\n        return this.wrappedInstance;\n      };\n\n      Connect.prototype.setWrappedInstance = function setWrappedInstance(ref) {\n        this.wrappedInstance = ref;\n      };\n\n      Connect.prototype.initSelector = function initSelector() {\n        var sourceSelector = selectorFactory(this.store.dispatch, selectorFactoryOptions);\n        this.selector = makeSelectorStateful(sourceSelector, this.store);\n        this.selector.run(this.props);\n      };\n\n      Connect.prototype.initSubscription = function initSubscription() {\n        if (!shouldHandleStateChanges) return;\n\n        // parentSub's source should match where store came from: props vs. context. A component\n        // connected to the store via props shouldn't use subscription from context, or vice versa.\n        var parentSub = (this.propsMode ? this.props : this.context)[subscriptionKey];\n        this.subscription = new Subscription(this.store, parentSub, this.onStateChange.bind(this));\n\n        // `notifyNestedSubs` is duplicated to handle the case where the component is  unmounted in\n        // the middle of the notification loop, where `this.subscription` will then be null. An\n        // extra null check every change can be avoided by copying the method onto `this` and then\n        // replacing it with a no-op on unmount. This can probably be avoided if Subscription's\n        // listeners logic is changed to not call listeners that have been unsubscribed in the\n        // middle of the notification loop.\n        this.notifyNestedSubs = this.subscription.notifyNestedSubs.bind(this.subscription);\n      };\n\n      Connect.prototype.onStateChange = function onStateChange() {\n        this.selector.run(this.props);\n\n        if (!this.selector.shouldComponentUpdate) {\n          this.notifyNestedSubs();\n        } else {\n          this.componentDidUpdate = this.notifyNestedSubsOnComponentDidUpdate;\n          this.setState(dummyState);\n        }\n      };\n\n      Connect.prototype.notifyNestedSubsOnComponentDidUpdate = function notifyNestedSubsOnComponentDidUpdate() {\n        // `componentDidUpdate` is conditionally implemented when `onStateChange` determines it\n        // needs to notify nested subs. Once called, it unimplements itself until further state\n        // changes occur. Doing it this way vs having a permanent `componentDidUpdate` that does\n        // a boolean check every time avoids an extra method call most of the time, resulting\n        // in some perf boost.\n        this.componentDidUpdate = undefined;\n        this.notifyNestedSubs();\n      };\n\n      Connect.prototype.isSubscribed = function isSubscribed() {\n        return Boolean(this.subscription) && this.subscription.isSubscribed();\n      };\n\n      Connect.prototype.addExtraProps = function addExtraProps(props) {\n        if (!withRef && !renderCountProp && !(this.propsMode && this.subscription)) return props;\n        // make a shallow copy so that fields added don't leak to the original selector.\n        // this is especially important for 'ref' since that's a reference back to the component\n        // instance. a singleton memoized selector would then be holding a reference to the\n        // instance, preventing the instance from being garbage collected, and that would be bad\n        var withExtras = _extends({}, props);\n        if (withRef) withExtras.ref = this.setWrappedInstance;\n        if (renderCountProp) withExtras[renderCountProp] = this.renderCount++;\n        if (this.propsMode && this.subscription) withExtras[subscriptionKey] = this.subscription;\n        return withExtras;\n      };\n\n      Connect.prototype.render = function render() {\n        var selector = this.selector;\n        selector.shouldComponentUpdate = false;\n\n        if (selector.error) {\n          throw selector.error;\n        } else {\n          return createElement(WrappedComponent, this.addExtraProps(selector.props));\n        }\n      };\n\n      return Connect;\n    }(Component);\n\n    Connect.WrappedComponent = WrappedComponent;\n    Connect.displayName = displayName;\n    Connect.childContextTypes = childContextTypes;\n    Connect.contextTypes = contextTypes;\n    Connect.propTypes = contextTypes;\n\n    if (process.env.NODE_ENV !== 'production') {\n      Connect.prototype.componentWillUpdate = function componentWillUpdate() {\n        var _this2 = this;\n\n        // We are hot reloading!\n        if (this.version !== version) {\n          this.version = version;\n          this.initSelector();\n\n          // If any connected descendants don't hot reload (and resubscribe in the process), their\n          // listeners will be lost when we unsubscribe. Unfortunately, by copying over all\n          // listeners, this does mean that the old versions of connected descendants will still be\n          // notified of state changes; however, their onStateChange function is a no-op so this\n          // isn't a huge deal.\n          var oldListeners = [];\n\n          if (this.subscription) {\n            oldListeners = this.subscription.listeners.get();\n            this.subscription.tryUnsubscribe();\n          }\n          this.initSubscription();\n          if (shouldHandleStateChanges) {\n            this.subscription.trySubscribe();\n            oldListeners.forEach(function (listener) {\n              return _this2.subscription.listeners.subscribe(listener);\n            });\n          }\n        }\n      };\n    }\n\n    return hoistStatics(Connect, WrappedComponent);\n  };\n}","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport connectAdvanced from '../components/connectAdvanced';\nimport shallowEqual from '../utils/shallowEqual';\nimport defaultMapDispatchToPropsFactories from './mapDispatchToProps';\nimport defaultMapStateToPropsFactories from './mapStateToProps';\nimport defaultMergePropsFactories from './mergeProps';\nimport defaultSelectorFactory from './selectorFactory';\n\n/*\n  connect is a facade over connectAdvanced. It turns its args into a compatible\n  selectorFactory, which has the signature:\n\n    (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps\n  \n  connect passes its args to connectAdvanced as options, which will in turn pass them to\n  selectorFactory each time a Connect component instance is instantiated or hot reloaded.\n\n  selectorFactory returns a final props selector from its mapStateToProps,\n  mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps,\n  mergePropsFactories, and pure args.\n\n  The resulting final props selector is called by the Connect component instance whenever\n  it receives new props or store state.\n */\n\nfunction match(arg, factories, name) {\n  for (var i = factories.length - 1; i >= 0; i--) {\n    var result = factories[i](arg);\n    if (result) return result;\n  }\n\n  return function (dispatch, options) {\n    throw new Error('Invalid value of type ' + typeof arg + ' for ' + name + ' argument when connecting component ' + options.wrappedComponentName + '.');\n  };\n}\n\nfunction strictEqual(a, b) {\n  return a === b;\n}\n\n// createConnect with default args builds the 'official' connect behavior. Calling it with\n// different options opens up some testing and extensibility scenarios\nexport function createConnect() {\n  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n      _ref$connectHOC = _ref.connectHOC,\n      connectHOC = _ref$connectHOC === undefined ? connectAdvanced : _ref$connectHOC,\n      _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n      mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? defaultMapStateToPropsFactories : _ref$mapStateToPropsF,\n      _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n      mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? defaultMapDispatchToPropsFactories : _ref$mapDispatchToPro,\n      _ref$mergePropsFactor = _ref.mergePropsFactories,\n      mergePropsFactories = _ref$mergePropsFactor === undefined ? defaultMergePropsFactories : _ref$mergePropsFactor,\n      _ref$selectorFactory = _ref.selectorFactory,\n      selectorFactory = _ref$selectorFactory === undefined ? defaultSelectorFactory : _ref$selectorFactory;\n\n  return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n    var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n        _ref2$pure = _ref2.pure,\n        pure = _ref2$pure === undefined ? true : _ref2$pure,\n        _ref2$areStatesEqual = _ref2.areStatesEqual,\n        areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n        _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n        areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? shallowEqual : _ref2$areOwnPropsEqua,\n        _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n        areStatePropsEqual = _ref2$areStatePropsEq === undefined ? shallowEqual : _ref2$areStatePropsEq,\n        _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n        areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? shallowEqual : _ref2$areMergedPropsE,\n        extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n    var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n    var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n    var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n    return connectHOC(selectorFactory, _extends({\n      // used in error messages\n      methodName: 'connect',\n\n      // used to compute Connect's displayName from the wrapped component's displayName.\n      getDisplayName: function getDisplayName(name) {\n        return 'Connect(' + name + ')';\n      },\n\n      // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n      shouldHandleStateChanges: Boolean(mapStateToProps),\n\n      // passed through to selectorFactory\n      initMapStateToProps: initMapStateToProps,\n      initMapDispatchToProps: initMapDispatchToProps,\n      initMergeProps: initMergeProps,\n      pure: pure,\n      areStatesEqual: areStatesEqual,\n      areOwnPropsEqual: areOwnPropsEqual,\n      areStatePropsEqual: areStatePropsEqual,\n      areMergedPropsEqual: areMergedPropsEqual\n\n    }, extraOptions));\n  };\n}\n\nexport default createConnect();","import { bindActionCreators } from 'redux';\nimport { wrapMapToPropsConstant, wrapMapToPropsFunc } from './wrapMapToProps';\n\nexport function whenMapDispatchToPropsIsFunction(mapDispatchToProps) {\n  return typeof mapDispatchToProps === 'function' ? wrapMapToPropsFunc(mapDispatchToProps, 'mapDispatchToProps') : undefined;\n}\n\nexport function whenMapDispatchToPropsIsMissing(mapDispatchToProps) {\n  return !mapDispatchToProps ? wrapMapToPropsConstant(function (dispatch) {\n    return { dispatch: dispatch };\n  }) : undefined;\n}\n\nexport function whenMapDispatchToPropsIsObject(mapDispatchToProps) {\n  return mapDispatchToProps && typeof mapDispatchToProps === 'object' ? wrapMapToPropsConstant(function (dispatch) {\n    return bindActionCreators(mapDispatchToProps, dispatch);\n  }) : undefined;\n}\n\nexport default [whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject];","import { wrapMapToPropsConstant, wrapMapToPropsFunc } from './wrapMapToProps';\n\nexport function whenMapStateToPropsIsFunction(mapStateToProps) {\n  return typeof mapStateToProps === 'function' ? wrapMapToPropsFunc(mapStateToProps, 'mapStateToProps') : undefined;\n}\n\nexport function whenMapStateToPropsIsMissing(mapStateToProps) {\n  return !mapStateToProps ? wrapMapToPropsConstant(function () {\n    return {};\n  }) : undefined;\n}\n\nexport default [whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing];","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport verifyPlainObject from '../utils/verifyPlainObject';\n\nexport function defaultMergeProps(stateProps, dispatchProps, ownProps) {\n  return _extends({}, ownProps, stateProps, dispatchProps);\n}\n\nexport function wrapMergePropsFunc(mergeProps) {\n  return function initMergePropsProxy(dispatch, _ref) {\n    var displayName = _ref.displayName,\n        pure = _ref.pure,\n        areMergedPropsEqual = _ref.areMergedPropsEqual;\n\n    var hasRunOnce = false;\n    var mergedProps = void 0;\n\n    return function mergePropsProxy(stateProps, dispatchProps, ownProps) {\n      var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n\n      if (hasRunOnce) {\n        if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps;\n      } else {\n        hasRunOnce = true;\n        mergedProps = nextMergedProps;\n\n        if (process.env.NODE_ENV !== 'production') verifyPlainObject(mergedProps, displayName, 'mergeProps');\n      }\n\n      return mergedProps;\n    };\n  };\n}\n\nexport function whenMergePropsIsFunction(mergeProps) {\n  return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined;\n}\n\nexport function whenMergePropsIsOmitted(mergeProps) {\n  return !mergeProps ? function () {\n    return defaultMergeProps;\n  } : undefined;\n}\n\nexport default [whenMergePropsIsFunction, whenMergePropsIsOmitted];","function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport verifySubselectors from './verifySubselectors';\n\nexport function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) {\n  return function impureFinalPropsSelector(state, ownProps) {\n    return mergeProps(mapStateToProps(state, ownProps), mapDispatchToProps(dispatch, ownProps), ownProps);\n  };\n}\n\nexport function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref) {\n  var areStatesEqual = _ref.areStatesEqual,\n      areOwnPropsEqual = _ref.areOwnPropsEqual,\n      areStatePropsEqual = _ref.areStatePropsEqual;\n\n  var hasRunAtLeastOnce = false;\n  var state = void 0;\n  var ownProps = void 0;\n  var stateProps = void 0;\n  var dispatchProps = void 0;\n  var mergedProps = void 0;\n\n  function handleFirstCall(firstState, firstOwnProps) {\n    state = firstState;\n    ownProps = firstOwnProps;\n    stateProps = mapStateToProps(state, ownProps);\n    dispatchProps = mapDispatchToProps(dispatch, ownProps);\n    mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n    hasRunAtLeastOnce = true;\n    return mergedProps;\n  }\n\n  function handleNewPropsAndNewState() {\n    stateProps = mapStateToProps(state, ownProps);\n\n    if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);\n\n    mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n    return mergedProps;\n  }\n\n  function handleNewProps() {\n    if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps);\n\n    if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);\n\n    mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n    return mergedProps;\n  }\n\n  function handleNewState() {\n    var nextStateProps = mapStateToProps(state, ownProps);\n    var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps);\n    stateProps = nextStateProps;\n\n    if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n\n    return mergedProps;\n  }\n\n  function handleSubsequentCalls(nextState, nextOwnProps) {\n    var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps);\n    var stateChanged = !areStatesEqual(nextState, state);\n    state = nextState;\n    ownProps = nextOwnProps;\n\n    if (propsChanged && stateChanged) return handleNewPropsAndNewState();\n    if (propsChanged) return handleNewProps();\n    if (stateChanged) return handleNewState();\n    return mergedProps;\n  }\n\n  return function pureFinalPropsSelector(nextState, nextOwnProps) {\n    return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps);\n  };\n}\n\n// TODO: Add more comments\n\n// If pure is true, the selector returned by selectorFactory will memoize its results,\n// allowing connectAdvanced's shouldComponentUpdate to return false if final\n// props have not changed. If false, the selector will always return a new\n// object and shouldComponentUpdate will always return true.\n\nexport default function finalPropsSelectorFactory(dispatch, _ref2) {\n  var initMapStateToProps = _ref2.initMapStateToProps,\n      initMapDispatchToProps = _ref2.initMapDispatchToProps,\n      initMergeProps = _ref2.initMergeProps,\n      options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n  var mapStateToProps = initMapStateToProps(dispatch, options);\n  var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n  var mergeProps = initMergeProps(dispatch, options);\n\n  if (process.env.NODE_ENV !== 'production') {\n    verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n  }\n\n  var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n  return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}","import warning from '../utils/warning';\n\nfunction verify(selector, methodName, displayName) {\n  if (!selector) {\n    throw new Error('Unexpected value for ' + methodName + ' in ' + displayName + '.');\n  } else if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') {\n    if (!selector.hasOwnProperty('dependsOnOwnProps')) {\n      warning('The selector for ' + methodName + ' of ' + displayName + ' did not specify a value for dependsOnOwnProps.');\n    }\n  }\n}\n\nexport default function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, displayName) {\n  verify(mapStateToProps, 'mapStateToProps', displayName);\n  verify(mapDispatchToProps, 'mapDispatchToProps', displayName);\n  verify(mergeProps, 'mergeProps', displayName);\n}","import verifyPlainObject from '../utils/verifyPlainObject';\n\nexport function wrapMapToPropsConstant(getConstant) {\n  return function initConstantSelector(dispatch, options) {\n    var constant = getConstant(dispatch, options);\n\n    function constantSelector() {\n      return constant;\n    }\n    constantSelector.dependsOnOwnProps = false;\n    return constantSelector;\n  };\n}\n\n// dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args\n// to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine\n// whether mapToProps needs to be invoked when props have changed.\n// \n// A length of one signals that mapToProps does not depend on props from the parent component.\n// A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and\n// therefore not reporting its length accurately..\nexport function getDependsOnOwnProps(mapToProps) {\n  return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1;\n}\n\n// Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction,\n// this function wraps mapToProps in a proxy function which does several things:\n// \n//  * Detects whether the mapToProps function being called depends on props, which\n//    is used by selectorFactory to decide if it should reinvoke on props changes.\n//    \n//  * On first call, handles mapToProps if returns another function, and treats that\n//    new function as the true mapToProps for subsequent calls.\n//    \n//  * On first call, verifies the first result is a plain object, in order to warn\n//    the developer that their mapToProps function is not returning a valid result.\n//    \nexport function wrapMapToPropsFunc(mapToProps, methodName) {\n  return function initProxySelector(dispatch, _ref) {\n    var displayName = _ref.displayName;\n\n    var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n      return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n    };\n\n    // allow detectFactoryAndVerify to get ownProps\n    proxy.dependsOnOwnProps = true;\n\n    proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n      proxy.mapToProps = mapToProps;\n      proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n      var props = proxy(stateOrDispatch, ownProps);\n\n      if (typeof props === 'function') {\n        proxy.mapToProps = props;\n        proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n        props = proxy(stateOrDispatch, ownProps);\n      }\n\n      if (process.env.NODE_ENV !== 'production') verifyPlainObject(props, displayName, methodName);\n\n      return props;\n    };\n\n    return proxy;\n  };\n}","import Provider, { createProvider } from './components/Provider';\nimport connectAdvanced from './components/connectAdvanced';\nimport connect from './connect/connect';\n\nexport { Provider, createProvider, connectAdvanced, connect };","import PropTypes from 'prop-types';\n\nexport var subscriptionShape = PropTypes.shape({\n  trySubscribe: PropTypes.func.isRequired,\n  tryUnsubscribe: PropTypes.func.isRequired,\n  notifyNestedSubs: PropTypes.func.isRequired,\n  isSubscribed: PropTypes.func.isRequired\n});\n\nexport var storeShape = PropTypes.shape({\n  subscribe: PropTypes.func.isRequired,\n  dispatch: PropTypes.func.isRequired,\n  getState: PropTypes.func.isRequired\n});","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n// encapsulates the subscription logic for connecting a component to the redux store, as\n// well as nesting subscriptions of descendant components, so that we can ensure the\n// ancestor components re-render before descendants\n\nvar CLEARED = null;\nvar nullListeners = {\n  notify: function notify() {}\n};\n\nfunction createListenerCollection() {\n  // the current/next pattern is copied from redux's createStore code.\n  // TODO: refactor+expose that code to be reusable here?\n  var current = [];\n  var next = [];\n\n  return {\n    clear: function clear() {\n      next = CLEARED;\n      current = CLEARED;\n    },\n    notify: function notify() {\n      var listeners = current = next;\n      for (var i = 0; i < listeners.length; i++) {\n        listeners[i]();\n      }\n    },\n    get: function get() {\n      return next;\n    },\n    subscribe: function subscribe(listener) {\n      var isSubscribed = true;\n      if (next === current) next = current.slice();\n      next.push(listener);\n\n      return function unsubscribe() {\n        if (!isSubscribed || current === CLEARED) return;\n        isSubscribed = false;\n\n        if (next === current) next = current.slice();\n        next.splice(next.indexOf(listener), 1);\n      };\n    }\n  };\n}\n\nvar Subscription = function () {\n  function Subscription(store, parentSub, onStateChange) {\n    _classCallCheck(this, Subscription);\n\n    this.store = store;\n    this.parentSub = parentSub;\n    this.onStateChange = onStateChange;\n    this.unsubscribe = null;\n    this.listeners = nullListeners;\n  }\n\n  Subscription.prototype.addNestedSub = function addNestedSub(listener) {\n    this.trySubscribe();\n    return this.listeners.subscribe(listener);\n  };\n\n  Subscription.prototype.notifyNestedSubs = function notifyNestedSubs() {\n    this.listeners.notify();\n  };\n\n  Subscription.prototype.isSubscribed = function isSubscribed() {\n    return Boolean(this.unsubscribe);\n  };\n\n  Subscription.prototype.trySubscribe = function trySubscribe() {\n    if (!this.unsubscribe) {\n      this.unsubscribe = this.parentSub ? this.parentSub.addNestedSub(this.onStateChange) : this.store.subscribe(this.onStateChange);\n\n      this.listeners = createListenerCollection();\n    }\n  };\n\n  Subscription.prototype.tryUnsubscribe = function tryUnsubscribe() {\n    if (this.unsubscribe) {\n      this.unsubscribe();\n      this.unsubscribe = null;\n      this.listeners.clear();\n      this.listeners = nullListeners;\n    }\n  };\n\n  return Subscription;\n}();\n\nexport { Subscription as default };","var hasOwn = Object.prototype.hasOwnProperty;\n\nfunction is(x, y) {\n  if (x === y) {\n    return x !== 0 || y !== 0 || 1 / x === 1 / y;\n  } else {\n    return x !== x && y !== y;\n  }\n}\n\nexport default function shallowEqual(objA, objB) {\n  if (is(objA, objB)) return true;\n\n  if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n    return false;\n  }\n\n  var keysA = Object.keys(objA);\n  var keysB = Object.keys(objB);\n\n  if (keysA.length !== keysB.length) return false;\n\n  for (var i = 0; i < keysA.length; i++) {\n    if (!hasOwn.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n      return false;\n    }\n  }\n\n  return true;\n}","import isPlainObject from 'lodash-es/isPlainObject';\nimport warning from './warning';\n\nexport default function verifyPlainObject(value, displayName, methodName) {\n  if (!isPlainObject(value)) {\n    warning(methodName + '() in ' + displayName + ' must return a plain object. Instead received ' + value + '.');\n  }\n}","/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\nexport default function warning(message) {\n  /* eslint-disable no-console */\n  if (typeof console !== 'undefined' && typeof console.error === 'function') {\n    console.error(message);\n  }\n  /* eslint-enable no-console */\n  try {\n    // This error was thrown as a convenience so that if you enable\n    // \"break on all exceptions\" in your console,\n    // it would pause the execution at this line.\n    throw new Error(message);\n    /* eslint-disable no-empty */\n  } catch (e) {}\n  /* eslint-enable no-empty */\n}","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n  return function () {\n    return arg;\n  };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n  return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n  return arg;\n};\n\nmodule.exports = emptyFunction;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n  validateFormat = function validateFormat(format) {\n    if (format === undefined) {\n      throw new Error('invariant requires an error message argument');\n    }\n  };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n  validateFormat(format);\n\n  if (!condition) {\n    var error;\n    if (format === undefined) {\n      error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n    } else {\n      var args = [a, b, c, d, e, f];\n      var argIndex = 0;\n      error = new Error(format.replace(/%s/g, function () {\n        return args[argIndex++];\n      }));\n      error.name = 'Invariant Violation';\n    }\n\n    error.framesToPop = 1; // we don't care about invariant's own frame\n    throw error;\n  }\n}\n\nmodule.exports = invariant;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar emptyFunction = require('./emptyFunction');\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = emptyFunction;\n\nif (process.env.NODE_ENV !== 'production') {\n  var printWarning = function printWarning(format) {\n    for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n      args[_key - 1] = arguments[_key];\n    }\n\n    var argIndex = 0;\n    var message = 'Warning: ' + format.replace(/%s/g, function () {\n      return args[argIndex++];\n    });\n    if (typeof console !== 'undefined') {\n      console.error(message);\n    }\n    try {\n      // --- Welcome to debugging React ---\n      // This error was thrown as a convenience so that you can use this stack\n      // to find the callsite that caused this warning to fire.\n      throw new Error(message);\n    } catch (x) {}\n  };\n\n  warning = function warning(condition, format) {\n    if (format === undefined) {\n      throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n    }\n\n    if (format.indexOf('Failed Composite propType: ') === 0) {\n      return; // Ignore CompositeComponent proptype check.\n    }\n\n    if (!condition) {\n      for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n        args[_key2 - 2] = arguments[_key2];\n      }\n\n      printWarning.apply(undefined, [format].concat(args));\n    }\n  };\n}\n\nmodule.exports = warning;","/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\n(function (global, factory) {\n    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n    typeof define === 'function' && define.amd ? define(factory) :\n    (global.hoistNonReactStatics = factory());\n}(this, (function () {\n    'use strict';\n    \n    var REACT_STATICS = {\n        childContextTypes: true,\n        contextTypes: true,\n        defaultProps: true,\n        displayName: true,\n        getDefaultProps: true,\n        getDerivedStateFromProps: true,\n        mixins: true,\n        propTypes: true,\n        type: true\n    };\n    \n    var KNOWN_STATICS = {\n        name: true,\n        length: true,\n        prototype: true,\n        caller: true,\n        callee: true,\n        arguments: true,\n        arity: true\n    };\n    \n    var defineProperty = Object.defineProperty;\n    var getOwnPropertyNames = Object.getOwnPropertyNames;\n    var getOwnPropertySymbols = Object.getOwnPropertySymbols;\n    var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n    var getPrototypeOf = Object.getPrototypeOf;\n    var objectPrototype = getPrototypeOf && getPrototypeOf(Object);\n    \n    return function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n        if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components\n            \n            if (objectPrototype) {\n                var inheritedComponent = getPrototypeOf(sourceComponent);\n                if (inheritedComponent && inheritedComponent !== objectPrototype) {\n                    hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n                }\n            }\n            \n            var keys = getOwnPropertyNames(sourceComponent);\n            \n            if (getOwnPropertySymbols) {\n                keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n            }\n            \n            for (var i = 0; i < keys.length; ++i) {\n                var key = keys[i];\n                if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {\n                    var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n                    try { // Avoid failures from read-only properties\n                        defineProperty(targetComponent, key, descriptor);\n                    } catch (e) {}\n                }\n            }\n            \n            return targetComponent;\n        }\n        \n        return targetComponent;\n    };\n})));\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n  if (process.env.NODE_ENV !== 'production') {\n    if (format === undefined) {\n      throw new Error('invariant requires an error message argument');\n    }\n  }\n\n  if (!condition) {\n    var error;\n    if (format === undefined) {\n      error = new Error(\n        'Minified exception occurred; use the non-minified dev environment ' +\n        'for the full error message and additional helpful warnings.'\n      );\n    } else {\n      var args = [a, b, c, d, e, f];\n      var argIndex = 0;\n      error = new Error(\n        format.replace(/%s/g, function() { return args[argIndex++]; })\n      );\n      error.name = 'Invariant Violation';\n    }\n\n    error.framesToPop = 1; // we don't care about invariant's own frame\n    throw error;\n  }\n};\n\nmodule.exports = invariant;\n","import root from './_root.js';\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nexport default Symbol;\n","import Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n    undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n  if (value == null) {\n    return value === undefined ? undefinedTag : nullTag;\n  }\n  return (symToStringTag && symToStringTag in Object(value))\n    ? getRawTag(value)\n    : objectToString(value);\n}\n\nexport default baseGetTag;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n","import overArg from './_overArg.js';\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nexport default getPrototype;\n","import Symbol from './_Symbol.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n  var isOwn = hasOwnProperty.call(value, symToStringTag),\n      tag = value[symToStringTag];\n\n  try {\n    value[symToStringTag] = undefined;\n    var unmasked = true;\n  } catch (e) {}\n\n  var result = nativeObjectToString.call(value);\n  if (unmasked) {\n    if (isOwn) {\n      value[symToStringTag] = tag;\n    } else {\n      delete value[symToStringTag];\n    }\n  }\n  return result;\n}\n\nexport default getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n  return nativeObjectToString.call(value);\n}\n\nexport default objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n  return function(arg) {\n    return func(transform(arg));\n  };\n}\n\nexport default overArg;\n","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nexport default root;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return value != null && typeof value == 'object';\n}\n\nexport default isObjectLike;\n","import baseGetTag from './_baseGetTag.js';\nimport getPrototype from './_getPrototype.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n  if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n    return false;\n  }\n  var proto = getPrototype(value);\n  if (proto === null) {\n    return true;\n  }\n  var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n  return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n    funcToString.call(Ctor) == objectCtorString;\n}\n\nexport default isPlainObject;\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc');  // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== 'production') {\n  var invariant = require('fbjs/lib/invariant');\n  var warning = require('fbjs/lib/warning');\n  var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n  var loggedTypeFailures = {};\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n  if (process.env.NODE_ENV !== 'production') {\n    for (var typeSpecName in typeSpecs) {\n      if (typeSpecs.hasOwnProperty(typeSpecName)) {\n        var error;\n        // Prop type validation may throw. In case they do, we don't want to\n        // fail the render phase where it didn't fail before. So we log it.\n        // After these have been cleaned up, we'll let them throw.\n        try {\n          // This is intentionally an invariant that gets caught. It's the same\n          // behavior as without this statement except with a better message.\n          invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);\n          error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n        } catch (ex) {\n          error = ex;\n        }\n        warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);\n        if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n          // Only monitor this failure once because there tends to be a lot of the\n          // same error.\n          loggedTypeFailures[error.message] = true;\n\n          var stack = getStack ? getStack() : '';\n\n          warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');\n        }\n      }\n    }\n  }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n  /* global Symbol */\n  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n  /**\n   * Returns the iterator method function contained on the iterable object.\n   *\n   * Be sure to invoke the function with the iterable as context:\n   *\n   *     var iteratorFn = getIteratorFn(myIterable);\n   *     if (iteratorFn) {\n   *       var iterator = iteratorFn.call(myIterable);\n   *       ...\n   *     }\n   *\n   * @param {?object} maybeIterable\n   * @return {?function}\n   */\n  function getIteratorFn(maybeIterable) {\n    var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n    if (typeof iteratorFn === 'function') {\n      return iteratorFn;\n    }\n  }\n\n  /**\n   * Collection of methods that allow declaration and validation of props that are\n   * supplied to React components. Example usage:\n   *\n   *   var Props = require('ReactPropTypes');\n   *   var MyArticle = React.createClass({\n   *     propTypes: {\n   *       // An optional string prop named \"description\".\n   *       description: Props.string,\n   *\n   *       // A required enum prop named \"category\".\n   *       category: Props.oneOf(['News','Photos']).isRequired,\n   *\n   *       // A prop named \"dialog\" that requires an instance of Dialog.\n   *       dialog: Props.instanceOf(Dialog).isRequired\n   *     },\n   *     render: function() { ... }\n   *   });\n   *\n   * A more formal specification of how these methods are used:\n   *\n   *   type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n   *   decl := ReactPropTypes.{type}(.isRequired)?\n   *\n   * Each and every declaration produces a function with the same signature. This\n   * allows the creation of custom validation functions. For example:\n   *\n   *  var MyLink = React.createClass({\n   *    propTypes: {\n   *      // An optional string or URI prop named \"href\".\n   *      href: function(props, propName, componentName) {\n   *        var propValue = props[propName];\n   *        if (propValue != null && typeof propValue !== 'string' &&\n   *            !(propValue instanceof URI)) {\n   *          return new Error(\n   *            'Expected a string or an URI for ' + propName + ' in ' +\n   *            componentName\n   *          );\n   *        }\n   *      }\n   *    },\n   *    render: function() {...}\n   *  });\n   *\n   * @internal\n   */\n\n  var ANONYMOUS = '<<anonymous>>';\n\n  // Important!\n  // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n  var ReactPropTypes = {\n    array: createPrimitiveTypeChecker('array'),\n    bool: createPrimitiveTypeChecker('boolean'),\n    func: createPrimitiveTypeChecker('function'),\n    number: createPrimitiveTypeChecker('number'),\n    object: createPrimitiveTypeChecker('object'),\n    string: createPrimitiveTypeChecker('string'),\n    symbol: createPrimitiveTypeChecker('symbol'),\n\n    any: createAnyTypeChecker(),\n    arrayOf: createArrayOfTypeChecker,\n    element: createElementTypeChecker(),\n    instanceOf: createInstanceTypeChecker,\n    node: createNodeChecker(),\n    objectOf: createObjectOfTypeChecker,\n    oneOf: createEnumTypeChecker,\n    oneOfType: createUnionTypeChecker,\n    shape: createShapeTypeChecker,\n    exact: createStrictShapeTypeChecker,\n  };\n\n  /**\n   * inlined Object.is polyfill to avoid requiring consumers ship their own\n   * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n   */\n  /*eslint-disable no-self-compare*/\n  function is(x, y) {\n    // SameValue algorithm\n    if (x === y) {\n      // Steps 1-5, 7-10\n      // Steps 6.b-6.e: +0 != -0\n      return x !== 0 || 1 / x === 1 / y;\n    } else {\n      // Step 6.a: NaN == NaN\n      return x !== x && y !== y;\n    }\n  }\n  /*eslint-enable no-self-compare*/\n\n  /**\n   * We use an Error-like object for backward compatibility as people may call\n   * PropTypes directly and inspect their output. However, we don't use real\n   * Errors anymore. We don't inspect their stack anyway, and creating them\n   * is prohibitively expensive if they are created too often, such as what\n   * happens in oneOfType() for any type before the one that matched.\n   */\n  function PropTypeError(message) {\n    this.message = message;\n    this.stack = '';\n  }\n  // Make `instanceof Error` still work for returned errors.\n  PropTypeError.prototype = Error.prototype;\n\n  function createChainableTypeChecker(validate) {\n    if (process.env.NODE_ENV !== 'production') {\n      var manualPropTypeCallCache = {};\n      var manualPropTypeWarningCount = 0;\n    }\n    function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n      componentName = componentName || ANONYMOUS;\n      propFullName = propFullName || propName;\n\n      if (secret !== ReactPropTypesSecret) {\n        if (throwOnDirectAccess) {\n          // New behavior only for users of `prop-types` package\n          invariant(\n            false,\n            'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n            'Use `PropTypes.checkPropTypes()` to call them. ' +\n            'Read more at http://fb.me/use-check-prop-types'\n          );\n        } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n          // Old behavior for people using React.PropTypes\n          var cacheKey = componentName + ':' + propName;\n          if (\n            !manualPropTypeCallCache[cacheKey] &&\n            // Avoid spamming the console because they are often not actionable except for lib authors\n            manualPropTypeWarningCount < 3\n          ) {\n            warning(\n              false,\n              'You are manually calling a React.PropTypes validation ' +\n              'function for the `%s` prop on `%s`. This is deprecated ' +\n              'and will throw in the standalone `prop-types` package. ' +\n              'You may be seeing this warning due to a third-party PropTypes ' +\n              'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',\n              propFullName,\n              componentName\n            );\n            manualPropTypeCallCache[cacheKey] = true;\n            manualPropTypeWarningCount++;\n          }\n        }\n      }\n      if (props[propName] == null) {\n        if (isRequired) {\n          if (props[propName] === null) {\n            return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n          }\n          return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n        }\n        return null;\n      } else {\n        return validate(props, propName, componentName, location, propFullName);\n      }\n    }\n\n    var chainedCheckType = checkType.bind(null, false);\n    chainedCheckType.isRequired = checkType.bind(null, true);\n\n    return chainedCheckType;\n  }\n\n  function createPrimitiveTypeChecker(expectedType) {\n    function validate(props, propName, componentName, location, propFullName, secret) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== expectedType) {\n        // `propValue` being instance of, say, date/regexp, pass the 'object'\n        // check, but we can offer a more precise error message here rather than\n        // 'of type `object`'.\n        var preciseType = getPreciseType(propValue);\n\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createAnyTypeChecker() {\n    return createChainableTypeChecker(emptyFunction.thatReturnsNull);\n  }\n\n  function createArrayOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n      }\n      var propValue = props[propName];\n      if (!Array.isArray(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n      }\n      for (var i = 0; i < propValue.length; i++) {\n        var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n        if (error instanceof Error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createElementTypeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      if (!isValidElement(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createInstanceTypeChecker(expectedClass) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!(props[propName] instanceof expectedClass)) {\n        var expectedClassName = expectedClass.name || ANONYMOUS;\n        var actualClassName = getClassName(props[propName]);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createEnumTypeChecker(expectedValues) {\n    if (!Array.isArray(expectedValues)) {\n      process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;\n      return emptyFunction.thatReturnsNull;\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      for (var i = 0; i < expectedValues.length; i++) {\n        if (is(propValue, expectedValues[i])) {\n          return null;\n        }\n      }\n\n      var valuesString = JSON.stringify(expectedValues);\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createObjectOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n      }\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n      }\n      for (var key in propValue) {\n        if (propValue.hasOwnProperty(key)) {\n          var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n          if (error instanceof Error) {\n            return error;\n          }\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createUnionTypeChecker(arrayOfTypeCheckers) {\n    if (!Array.isArray(arrayOfTypeCheckers)) {\n      process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n      return emptyFunction.thatReturnsNull;\n    }\n\n    for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n      var checker = arrayOfTypeCheckers[i];\n      if (typeof checker !== 'function') {\n        warning(\n          false,\n          'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n          'received %s at index %s.',\n          getPostfixForTypeWarning(checker),\n          i\n        );\n        return emptyFunction.thatReturnsNull;\n      }\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n        var checker = arrayOfTypeCheckers[i];\n        if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n          return null;\n        }\n      }\n\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createNodeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!isNode(props[propName])) {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      for (var key in shapeTypes) {\n        var checker = shapeTypes[key];\n        if (!checker) {\n          continue;\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createStrictShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      // We need to check all keys in case some are required but missing from\n      // props.\n      var allKeys = assign({}, props[propName], shapeTypes);\n      for (var key in allKeys) {\n        var checker = shapeTypes[key];\n        if (!checker) {\n          return new PropTypeError(\n            'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n            '\\nBad object: ' + JSON.stringify(props[propName], null, '  ') +\n            '\\nValid keys: ' +  JSON.stringify(Object.keys(shapeTypes), null, '  ')\n          );\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n\n    return createChainableTypeChecker(validate);\n  }\n\n  function isNode(propValue) {\n    switch (typeof propValue) {\n      case 'number':\n      case 'string':\n      case 'undefined':\n        return true;\n      case 'boolean':\n        return !propValue;\n      case 'object':\n        if (Array.isArray(propValue)) {\n          return propValue.every(isNode);\n        }\n        if (propValue === null || isValidElement(propValue)) {\n          return true;\n        }\n\n        var iteratorFn = getIteratorFn(propValue);\n        if (iteratorFn) {\n          var iterator = iteratorFn.call(propValue);\n          var step;\n          if (iteratorFn !== propValue.entries) {\n            while (!(step = iterator.next()).done) {\n              if (!isNode(step.value)) {\n                return false;\n              }\n            }\n          } else {\n            // Iterator will provide entry [k,v] tuples rather than values.\n            while (!(step = iterator.next()).done) {\n              var entry = step.value;\n              if (entry) {\n                if (!isNode(entry[1])) {\n                  return false;\n                }\n              }\n            }\n          }\n        } else {\n          return false;\n        }\n\n        return true;\n      default:\n        return false;\n    }\n  }\n\n  function isSymbol(propType, propValue) {\n    // Native Symbol.\n    if (propType === 'symbol') {\n      return true;\n    }\n\n    // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n    if (propValue['@@toStringTag'] === 'Symbol') {\n      return true;\n    }\n\n    // Fallback for non-spec compliant Symbols which are polyfilled.\n    if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n      return true;\n    }\n\n    return false;\n  }\n\n  // Equivalent of `typeof` but with special handling for array and regexp.\n  function getPropType(propValue) {\n    var propType = typeof propValue;\n    if (Array.isArray(propValue)) {\n      return 'array';\n    }\n    if (propValue instanceof RegExp) {\n      // Old webkits (at least until Android 4.0) return 'function' rather than\n      // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n      // passes PropTypes.object.\n      return 'object';\n    }\n    if (isSymbol(propType, propValue)) {\n      return 'symbol';\n    }\n    return propType;\n  }\n\n  // This handles more types than `getPropType`. Only used for error messages.\n  // See `createPrimitiveTypeChecker`.\n  function getPreciseType(propValue) {\n    if (typeof propValue === 'undefined' || propValue === null) {\n      return '' + propValue;\n    }\n    var propType = getPropType(propValue);\n    if (propType === 'object') {\n      if (propValue instanceof Date) {\n        return 'date';\n      } else if (propValue instanceof RegExp) {\n        return 'regexp';\n      }\n    }\n    return propType;\n  }\n\n  // Returns a string that is postfixed to a warning about an invalid type.\n  // For example, \"undefined\" or \"of type array\"\n  function getPostfixForTypeWarning(value) {\n    var type = getPreciseType(value);\n    switch (type) {\n      case 'array':\n      case 'object':\n        return 'an ' + type;\n      case 'boolean':\n      case 'date':\n      case 'regexp':\n        return 'a ' + type;\n      default:\n        return type;\n    }\n  }\n\n  // Returns class name of the object, if any.\n  function getClassName(propValue) {\n    if (!propValue.constructor || !propValue.constructor.name) {\n      return ANONYMOUS;\n    }\n    return propValue.constructor.name;\n  }\n\n  ReactPropTypes.checkPropTypes = checkPropTypes;\n  ReactPropTypes.PropTypes = ReactPropTypes;\n\n  return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n  var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n    Symbol.for &&\n    Symbol.for('react.element')) ||\n    0xeac7;\n\n  var isValidElement = function(object) {\n    return typeof object === 'object' &&\n      object !== null &&\n      object.$$typeof === REACT_ELEMENT_TYPE;\n  };\n\n  // By explicitly using `prop-types` you are opting into new development behavior.\n  // http://fb.me/prop-types-in-prod\n  var throwOnDirectAccess = true;\n  module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n  // By explicitly using `prop-types` you are opting into new production behavior.\n  // http://fb.me/prop-types-in-prod\n  module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from 'warning';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport createHistory from 'history/createBrowserHistory';\nimport Router from './Router';\n\n/**\n * The public API for a <Router> that uses HTML5 history.\n */\n\nvar BrowserRouter = function (_React$Component) {\n  _inherits(BrowserRouter, _React$Component);\n\n  function BrowserRouter() {\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, BrowserRouter);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = createHistory(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  BrowserRouter.prototype.componentWillMount = function componentWillMount() {\n    warning(!this.props.history, '<BrowserRouter> ignores the history prop. To use a custom history, ' + 'use `import { Router }` instead of `import { BrowserRouter as Router }`.');\n  };\n\n  BrowserRouter.prototype.render = function render() {\n    return React.createElement(Router, { history: this.history, children: this.props.children });\n  };\n\n  return BrowserRouter;\n}(React.Component);\n\nBrowserRouter.propTypes = {\n  basename: PropTypes.string,\n  forceRefresh: PropTypes.bool,\n  getUserConfirmation: PropTypes.func,\n  keyLength: PropTypes.number,\n  children: PropTypes.node\n};\n\n\nexport default BrowserRouter;","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from 'warning';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport createHistory from 'history/createHashHistory';\nimport Router from './Router';\n\n/**\n * The public API for a <Router> that uses window.location.hash.\n */\n\nvar HashRouter = function (_React$Component) {\n  _inherits(HashRouter, _React$Component);\n\n  function HashRouter() {\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, HashRouter);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = createHistory(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  HashRouter.prototype.componentWillMount = function componentWillMount() {\n    warning(!this.props.history, '<HashRouter> ignores the history prop. To use a custom history, ' + 'use `import { Router }` instead of `import { HashRouter as Router }`.');\n  };\n\n  HashRouter.prototype.render = function render() {\n    return React.createElement(Router, { history: this.history, children: this.props.children });\n  };\n\n  return HashRouter;\n}(React.Component);\n\nHashRouter.propTypes = {\n  basename: PropTypes.string,\n  getUserConfirmation: PropTypes.func,\n  hashType: PropTypes.oneOf(['hashbang', 'noslash', 'slash']),\n  children: PropTypes.node\n};\n\n\nexport default HashRouter;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport invariant from 'invariant';\n\nvar isModifiedEvent = function isModifiedEvent(event) {\n  return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n};\n\n/**\n * The public API for rendering a history-aware <a>.\n */\n\nvar Link = function (_React$Component) {\n  _inherits(Link, _React$Component);\n\n  function Link() {\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, Link);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleClick = function (event) {\n      if (_this.props.onClick) _this.props.onClick(event);\n\n      if (!event.defaultPrevented && // onClick prevented default\n      event.button === 0 && // ignore right clicks\n      !_this.props.target && // let browser handle \"target=_blank\" etc.\n      !isModifiedEvent(event) // ignore clicks with modifier keys\n      ) {\n          event.preventDefault();\n\n          var history = _this.context.router.history;\n          var _this$props = _this.props,\n              replace = _this$props.replace,\n              to = _this$props.to;\n\n\n          if (replace) {\n            history.replace(to);\n          } else {\n            history.push(to);\n          }\n        }\n    }, _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  Link.prototype.render = function render() {\n    var _props = this.props,\n        replace = _props.replace,\n        to = _props.to,\n        innerRef = _props.innerRef,\n        props = _objectWithoutProperties(_props, ['replace', 'to', 'innerRef']); // eslint-disable-line no-unused-vars\n\n    invariant(this.context.router, 'You should not use <Link> outside a <Router>');\n\n    var href = this.context.router.history.createHref(typeof to === 'string' ? { pathname: to } : to);\n\n    return React.createElement('a', _extends({}, props, { onClick: this.handleClick, href: href, ref: innerRef }));\n  };\n\n  return Link;\n}(React.Component);\n\nLink.propTypes = {\n  onClick: PropTypes.func,\n  target: PropTypes.string,\n  replace: PropTypes.bool,\n  to: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,\n  innerRef: PropTypes.oneOfType([PropTypes.string, PropTypes.func])\n};\nLink.defaultProps = {\n  replace: false\n};\nLink.contextTypes = {\n  router: PropTypes.shape({\n    history: PropTypes.shape({\n      push: PropTypes.func.isRequired,\n      replace: PropTypes.func.isRequired,\n      createHref: PropTypes.func.isRequired\n    }).isRequired\n  }).isRequired\n};\n\n\nexport default Link;","// Written in this round about way for babel-transform-imports\nimport MemoryRouter from 'react-router/es/MemoryRouter';\n\nexport default MemoryRouter;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Route from './Route';\nimport Link from './Link';\n\n/**\n * A <Link> wrapper that knows if it's \"active\" or not.\n */\nvar NavLink = function NavLink(_ref) {\n  var to = _ref.to,\n      exact = _ref.exact,\n      strict = _ref.strict,\n      location = _ref.location,\n      activeClassName = _ref.activeClassName,\n      className = _ref.className,\n      activeStyle = _ref.activeStyle,\n      style = _ref.style,\n      getIsActive = _ref.isActive,\n      ariaCurrent = _ref.ariaCurrent,\n      rest = _objectWithoutProperties(_ref, ['to', 'exact', 'strict', 'location', 'activeClassName', 'className', 'activeStyle', 'style', 'isActive', 'ariaCurrent']);\n\n  return React.createElement(Route, {\n    path: (typeof to === 'undefined' ? 'undefined' : _typeof(to)) === 'object' ? to.pathname : to,\n    exact: exact,\n    strict: strict,\n    location: location,\n    children: function children(_ref2) {\n      var location = _ref2.location,\n          match = _ref2.match;\n\n      var isActive = !!(getIsActive ? getIsActive(match, location) : match);\n\n      return React.createElement(Link, _extends({\n        to: to,\n        className: isActive ? [className, activeClassName].filter(function (i) {\n          return i;\n        }).join(' ') : className,\n        style: isActive ? _extends({}, style, activeStyle) : style,\n        'aria-current': isActive && ariaCurrent\n      }, rest));\n    }\n  });\n};\n\nNavLink.propTypes = {\n  to: Link.propTypes.to,\n  exact: PropTypes.bool,\n  strict: PropTypes.bool,\n  location: PropTypes.object,\n  activeClassName: PropTypes.string,\n  className: PropTypes.string,\n  activeStyle: PropTypes.object,\n  style: PropTypes.object,\n  isActive: PropTypes.func,\n  ariaCurrent: PropTypes.oneOf(['page', 'step', 'location', 'true'])\n};\n\nNavLink.defaultProps = {\n  activeClassName: 'active',\n  ariaCurrent: 'true'\n};\n\nexport default NavLink;","// Written in this round about way for babel-transform-imports\nimport Prompt from 'react-router/es/Prompt';\n\nexport default Prompt;","// Written in this round about way for babel-transform-imports\nimport Redirect from 'react-router/es/Redirect';\n\nexport default Redirect;","// Written in this round about way for babel-transform-imports\nimport Route from 'react-router/es/Route';\n\nexport default Route;","// Written in this round about way for babel-transform-imports\nimport Router from 'react-router/es/Router';\n\nexport default Router;","// Written in this round about way for babel-transform-imports\nimport StaticRouter from 'react-router/es/StaticRouter';\n\nexport default StaticRouter;","// Written in this round about way for babel-transform-imports\nimport Switch from 'react-router/es/Switch';\n\nexport default Switch;","import _BrowserRouter from './BrowserRouter';\nexport { _BrowserRouter as BrowserRouter };\nimport _HashRouter from './HashRouter';\nexport { _HashRouter as HashRouter };\nimport _Link from './Link';\nexport { _Link as Link };\nimport _MemoryRouter from './MemoryRouter';\nexport { _MemoryRouter as MemoryRouter };\nimport _NavLink from './NavLink';\nexport { _NavLink as NavLink };\nimport _Prompt from './Prompt';\nexport { _Prompt as Prompt };\nimport _Redirect from './Redirect';\nexport { _Redirect as Redirect };\nimport _Route from './Route';\nexport { _Route as Route };\nimport _Router from './Router';\nexport { _Router as Router };\nimport _StaticRouter from './StaticRouter';\nexport { _StaticRouter as StaticRouter };\nimport _Switch from './Switch';\nexport { _Switch as Switch };\nimport _matchPath from './matchPath';\nexport { _matchPath as matchPath };\nimport _withRouter from './withRouter';\nexport { _withRouter as withRouter };","// Written in this round about way for babel-transform-imports\nimport matchPath from 'react-router/es/matchPath';\n\nexport default matchPath;","// Written in this round about way for babel-transform-imports\nimport withRouter from 'react-router/es/withRouter';\n\nexport default withRouter;","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n  return function () {\n    return arg;\n  };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n  return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n  return arg;\n};\n\nmodule.exports = emptyFunction;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n  validateFormat = function validateFormat(format) {\n    if (format === undefined) {\n      throw new Error('invariant requires an error message argument');\n    }\n  };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n  validateFormat(format);\n\n  if (!condition) {\n    var error;\n    if (format === undefined) {\n      error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n    } else {\n      var args = [a, b, c, d, e, f];\n      var argIndex = 0;\n      error = new Error(format.replace(/%s/g, function () {\n        return args[argIndex++];\n      }));\n      error.name = 'Invariant Violation';\n    }\n\n    error.framesToPop = 1; // we don't care about invariant's own frame\n    throw error;\n  }\n}\n\nmodule.exports = invariant;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar emptyFunction = require('./emptyFunction');\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = emptyFunction;\n\nif (process.env.NODE_ENV !== 'production') {\n  var printWarning = function printWarning(format) {\n    for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n      args[_key - 1] = arguments[_key];\n    }\n\n    var argIndex = 0;\n    var message = 'Warning: ' + format.replace(/%s/g, function () {\n      return args[argIndex++];\n    });\n    if (typeof console !== 'undefined') {\n      console.error(message);\n    }\n    try {\n      // --- Welcome to debugging React ---\n      // This error was thrown as a convenience so that you can use this stack\n      // to find the callsite that caused this warning to fire.\n      throw new Error(message);\n    } catch (x) {}\n  };\n\n  warning = function warning(condition, format) {\n    if (format === undefined) {\n      throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n    }\n\n    if (format.indexOf('Failed Composite propType: ') === 0) {\n      return; // Ignore CompositeComponent proptype check.\n    }\n\n    if (!condition) {\n      for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n        args[_key2 - 2] = arguments[_key2];\n      }\n\n      printWarning.apply(undefined, [format].concat(args));\n    }\n  };\n}\n\nmodule.exports = warning;","'use strict';\n\nexports.__esModule = true;\nvar canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nvar addEventListener = exports.addEventListener = function addEventListener(node, event, listener) {\n  return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener);\n};\n\nvar removeEventListener = exports.removeEventListener = function removeEventListener(node, event, listener) {\n  return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener);\n};\n\nvar getConfirmation = exports.getConfirmation = function getConfirmation(message, callback) {\n  return callback(window.confirm(message));\n}; // eslint-disable-line no-alert\n\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\nvar supportsHistory = exports.supportsHistory = function supportsHistory() {\n  var ua = window.navigator.userAgent;\n\n  if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n\n  return window.history && 'pushState' in window.history;\n};\n\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\nvar supportsPopStateOnHashChange = exports.supportsPopStateOnHashChange = function supportsPopStateOnHashChange() {\n  return window.navigator.userAgent.indexOf('Trident') === -1;\n};\n\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\nvar supportsGoWithoutReloadUsingHash = exports.supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() {\n  return window.navigator.userAgent.indexOf('Firefox') === -1;\n};\n\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\nvar isExtraneousPopstateEvent = exports.isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) {\n  return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n};","'use strict';\n\nexports.__esModule = true;\nexports.locationsAreEqual = exports.createLocation = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _resolvePathname = require('resolve-pathname');\n\nvar _resolvePathname2 = _interopRequireDefault(_resolvePathname);\n\nvar _valueEqual = require('value-equal');\n\nvar _valueEqual2 = _interopRequireDefault(_valueEqual);\n\nvar _PathUtils = require('./PathUtils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar createLocation = exports.createLocation = function createLocation(path, state, key, currentLocation) {\n  var location = void 0;\n  if (typeof path === 'string') {\n    // Two-arg form: push(path, state)\n    location = (0, _PathUtils.parsePath)(path);\n    location.state = state;\n  } else {\n    // One-arg form: push(location)\n    location = _extends({}, path);\n\n    if (location.pathname === undefined) location.pathname = '';\n\n    if (location.search) {\n      if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n    } else {\n      location.search = '';\n    }\n\n    if (location.hash) {\n      if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n    } else {\n      location.hash = '';\n    }\n\n    if (state !== undefined && location.state === undefined) location.state = state;\n  }\n\n  try {\n    location.pathname = decodeURI(location.pathname);\n  } catch (e) {\n    if (e instanceof URIError) {\n      throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n    } else {\n      throw e;\n    }\n  }\n\n  if (key) location.key = key;\n\n  if (currentLocation) {\n    // Resolve incomplete/relative pathname relative to current location.\n    if (!location.pathname) {\n      location.pathname = currentLocation.pathname;\n    } else if (location.pathname.charAt(0) !== '/') {\n      location.pathname = (0, _resolvePathname2.default)(location.pathname, currentLocation.pathname);\n    }\n  } else {\n    // When there is no prior location and pathname is empty, set it to /\n    if (!location.pathname) {\n      location.pathname = '/';\n    }\n  }\n\n  return location;\n};\n\nvar locationsAreEqual = exports.locationsAreEqual = function locationsAreEqual(a, b) {\n  return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && (0, _valueEqual2.default)(a.state, b.state);\n};","'use strict';\n\nexports.__esModule = true;\nvar addLeadingSlash = exports.addLeadingSlash = function addLeadingSlash(path) {\n  return path.charAt(0) === '/' ? path : '/' + path;\n};\n\nvar stripLeadingSlash = exports.stripLeadingSlash = function stripLeadingSlash(path) {\n  return path.charAt(0) === '/' ? path.substr(1) : path;\n};\n\nvar hasBasename = exports.hasBasename = function hasBasename(path, prefix) {\n  return new RegExp('^' + prefix + '(\\\\/|\\\\?|#|$)', 'i').test(path);\n};\n\nvar stripBasename = exports.stripBasename = function stripBasename(path, prefix) {\n  return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n};\n\nvar stripTrailingSlash = exports.stripTrailingSlash = function stripTrailingSlash(path) {\n  return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n};\n\nvar parsePath = exports.parsePath = function parsePath(path) {\n  var pathname = path || '/';\n  var search = '';\n  var hash = '';\n\n  var hashIndex = pathname.indexOf('#');\n  if (hashIndex !== -1) {\n    hash = pathname.substr(hashIndex);\n    pathname = pathname.substr(0, hashIndex);\n  }\n\n  var searchIndex = pathname.indexOf('?');\n  if (searchIndex !== -1) {\n    search = pathname.substr(searchIndex);\n    pathname = pathname.substr(0, searchIndex);\n  }\n\n  return {\n    pathname: pathname,\n    search: search === '?' ? '' : search,\n    hash: hash === '#' ? '' : hash\n  };\n};\n\nvar createPath = exports.createPath = function createPath(location) {\n  var pathname = location.pathname,\n      search = location.search,\n      hash = location.hash;\n\n\n  var path = pathname || '/';\n\n  if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search;\n\n  if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash;\n\n  return path;\n};","'use strict';\n\nexports.__esModule = true;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _LocationUtils = require('./LocationUtils');\n\nvar _PathUtils = require('./PathUtils');\n\nvar _createTransitionManager = require('./createTransitionManager');\n\nvar _createTransitionManager2 = _interopRequireDefault(_createTransitionManager);\n\nvar _DOMUtils = require('./DOMUtils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nvar getHistoryState = function getHistoryState() {\n  try {\n    return window.history.state || {};\n  } catch (e) {\n    // IE 11 sometimes throws when accessing window.history.state\n    // See https://github.com/ReactTraining/history/pull/289\n    return {};\n  }\n};\n\n/**\n * Creates a history object that uses the HTML5 history API including\n * pushState, replaceState, and the popstate event.\n */\nvar createBrowserHistory = function createBrowserHistory() {\n  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n  (0, _invariant2.default)(_DOMUtils.canUseDOM, 'Browser history needs a DOM');\n\n  var globalHistory = window.history;\n  var canUseHistory = (0, _DOMUtils.supportsHistory)();\n  var needsHashChangeListener = !(0, _DOMUtils.supportsPopStateOnHashChange)();\n\n  var _props$forceRefresh = props.forceRefresh,\n      forceRefresh = _props$forceRefresh === undefined ? false : _props$forceRefresh,\n      _props$getUserConfirm = props.getUserConfirmation,\n      getUserConfirmation = _props$getUserConfirm === undefined ? _DOMUtils.getConfirmation : _props$getUserConfirm,\n      _props$keyLength = props.keyLength,\n      keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;\n\n  var basename = props.basename ? (0, _PathUtils.stripTrailingSlash)((0, _PathUtils.addLeadingSlash)(props.basename)) : '';\n\n  var getDOMLocation = function getDOMLocation(historyState) {\n    var _ref = historyState || {},\n        key = _ref.key,\n        state = _ref.state;\n\n    var _window$location = window.location,\n        pathname = _window$location.pathname,\n        search = _window$location.search,\n        hash = _window$location.hash;\n\n\n    var path = pathname + search + hash;\n\n    (0, _warning2.default)(!basename || (0, _PathUtils.hasBasename)(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n    if (basename) path = (0, _PathUtils.stripBasename)(path, basename);\n\n    return (0, _LocationUtils.createLocation)(path, state, key);\n  };\n\n  var createKey = function createKey() {\n    return Math.random().toString(36).substr(2, keyLength);\n  };\n\n  var transitionManager = (0, _createTransitionManager2.default)();\n\n  var setState = function setState(nextState) {\n    _extends(history, nextState);\n\n    history.length = globalHistory.length;\n\n    transitionManager.notifyListeners(history.location, history.action);\n  };\n\n  var handlePopState = function handlePopState(event) {\n    // Ignore extraneous popstate events in WebKit.\n    if ((0, _DOMUtils.isExtraneousPopstateEvent)(event)) return;\n\n    handlePop(getDOMLocation(event.state));\n  };\n\n  var handleHashChange = function handleHashChange() {\n    handlePop(getDOMLocation(getHistoryState()));\n  };\n\n  var forceNextPop = false;\n\n  var handlePop = function handlePop(location) {\n    if (forceNextPop) {\n      forceNextPop = false;\n      setState();\n    } else {\n      var action = 'POP';\n\n      transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n        if (ok) {\n          setState({ action: action, location: location });\n        } else {\n          revertPop(location);\n        }\n      });\n    }\n  };\n\n  var revertPop = function revertPop(fromLocation) {\n    var toLocation = history.location;\n\n    // TODO: We could probably make this more reliable by\n    // keeping a list of keys we've seen in sessionStorage.\n    // Instead, we just default to 0 for keys we don't know.\n\n    var toIndex = allKeys.indexOf(toLocation.key);\n\n    if (toIndex === -1) toIndex = 0;\n\n    var fromIndex = allKeys.indexOf(fromLocation.key);\n\n    if (fromIndex === -1) fromIndex = 0;\n\n    var delta = toIndex - fromIndex;\n\n    if (delta) {\n      forceNextPop = true;\n      go(delta);\n    }\n  };\n\n  var initialLocation = getDOMLocation(getHistoryState());\n  var allKeys = [initialLocation.key];\n\n  // Public interface\n\n  var createHref = function createHref(location) {\n    return basename + (0, _PathUtils.createPath)(location);\n  };\n\n  var push = function push(path, state) {\n    (0, _warning2.default)(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n    var action = 'PUSH';\n    var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var href = createHref(location);\n      var key = location.key,\n          state = location.state;\n\n\n      if (canUseHistory) {\n        globalHistory.pushState({ key: key, state: state }, null, href);\n\n        if (forceRefresh) {\n          window.location.href = href;\n        } else {\n          var prevIndex = allKeys.indexOf(history.location.key);\n          var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n          nextKeys.push(location.key);\n          allKeys = nextKeys;\n\n          setState({ action: action, location: location });\n        }\n      } else {\n        (0, _warning2.default)(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history');\n\n        window.location.href = href;\n      }\n    });\n  };\n\n  var replace = function replace(path, state) {\n    (0, _warning2.default)(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n    var action = 'REPLACE';\n    var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var href = createHref(location);\n      var key = location.key,\n          state = location.state;\n\n\n      if (canUseHistory) {\n        globalHistory.replaceState({ key: key, state: state }, null, href);\n\n        if (forceRefresh) {\n          window.location.replace(href);\n        } else {\n          var prevIndex = allKeys.indexOf(history.location.key);\n\n          if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n\n          setState({ action: action, location: location });\n        }\n      } else {\n        (0, _warning2.default)(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history');\n\n        window.location.replace(href);\n      }\n    });\n  };\n\n  var go = function go(n) {\n    globalHistory.go(n);\n  };\n\n  var goBack = function goBack() {\n    return go(-1);\n  };\n\n  var goForward = function goForward() {\n    return go(1);\n  };\n\n  var listenerCount = 0;\n\n  var checkDOMListeners = function checkDOMListeners(delta) {\n    listenerCount += delta;\n\n    if (listenerCount === 1) {\n      (0, _DOMUtils.addEventListener)(window, PopStateEvent, handlePopState);\n\n      if (needsHashChangeListener) (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleHashChange);\n    } else if (listenerCount === 0) {\n      (0, _DOMUtils.removeEventListener)(window, PopStateEvent, handlePopState);\n\n      if (needsHashChangeListener) (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleHashChange);\n    }\n  };\n\n  var isBlocked = false;\n\n  var block = function block() {\n    var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n    var unblock = transitionManager.setPrompt(prompt);\n\n    if (!isBlocked) {\n      checkDOMListeners(1);\n      isBlocked = true;\n    }\n\n    return function () {\n      if (isBlocked) {\n        isBlocked = false;\n        checkDOMListeners(-1);\n      }\n\n      return unblock();\n    };\n  };\n\n  var listen = function listen(listener) {\n    var unlisten = transitionManager.appendListener(listener);\n    checkDOMListeners(1);\n\n    return function () {\n      checkDOMListeners(-1);\n      unlisten();\n    };\n  };\n\n  var history = {\n    length: globalHistory.length,\n    action: 'POP',\n    location: initialLocation,\n    createHref: createHref,\n    push: push,\n    replace: replace,\n    go: go,\n    goBack: goBack,\n    goForward: goForward,\n    block: block,\n    listen: listen\n  };\n\n  return history;\n};\n\nexports.default = createBrowserHistory;","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _LocationUtils = require('./LocationUtils');\n\nvar _PathUtils = require('./PathUtils');\n\nvar _createTransitionManager = require('./createTransitionManager');\n\nvar _createTransitionManager2 = _interopRequireDefault(_createTransitionManager);\n\nvar _DOMUtils = require('./DOMUtils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar HashChangeEvent = 'hashchange';\n\nvar HashPathCoders = {\n  hashbang: {\n    encodePath: function encodePath(path) {\n      return path.charAt(0) === '!' ? path : '!/' + (0, _PathUtils.stripLeadingSlash)(path);\n    },\n    decodePath: function decodePath(path) {\n      return path.charAt(0) === '!' ? path.substr(1) : path;\n    }\n  },\n  noslash: {\n    encodePath: _PathUtils.stripLeadingSlash,\n    decodePath: _PathUtils.addLeadingSlash\n  },\n  slash: {\n    encodePath: _PathUtils.addLeadingSlash,\n    decodePath: _PathUtils.addLeadingSlash\n  }\n};\n\nvar getHashPath = function getHashPath() {\n  // We can't use window.location.hash here because it's not\n  // consistent across browsers - Firefox will pre-decode it!\n  var href = window.location.href;\n  var hashIndex = href.indexOf('#');\n  return hashIndex === -1 ? '' : href.substring(hashIndex + 1);\n};\n\nvar pushHashPath = function pushHashPath(path) {\n  return window.location.hash = path;\n};\n\nvar replaceHashPath = function replaceHashPath(path) {\n  var hashIndex = window.location.href.indexOf('#');\n\n  window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path);\n};\n\nvar createHashHistory = function createHashHistory() {\n  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n  (0, _invariant2.default)(_DOMUtils.canUseDOM, 'Hash history needs a DOM');\n\n  var globalHistory = window.history;\n  var canGoWithoutReload = (0, _DOMUtils.supportsGoWithoutReloadUsingHash)();\n\n  var _props$getUserConfirm = props.getUserConfirmation,\n      getUserConfirmation = _props$getUserConfirm === undefined ? _DOMUtils.getConfirmation : _props$getUserConfirm,\n      _props$hashType = props.hashType,\n      hashType = _props$hashType === undefined ? 'slash' : _props$hashType;\n\n  var basename = props.basename ? (0, _PathUtils.stripTrailingSlash)((0, _PathUtils.addLeadingSlash)(props.basename)) : '';\n\n  var _HashPathCoders$hashT = HashPathCoders[hashType],\n      encodePath = _HashPathCoders$hashT.encodePath,\n      decodePath = _HashPathCoders$hashT.decodePath;\n\n\n  var getDOMLocation = function getDOMLocation() {\n    var path = decodePath(getHashPath());\n\n    (0, _warning2.default)(!basename || (0, _PathUtils.hasBasename)(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n    if (basename) path = (0, _PathUtils.stripBasename)(path, basename);\n\n    return (0, _LocationUtils.createLocation)(path);\n  };\n\n  var transitionManager = (0, _createTransitionManager2.default)();\n\n  var setState = function setState(nextState) {\n    _extends(history, nextState);\n\n    history.length = globalHistory.length;\n\n    transitionManager.notifyListeners(history.location, history.action);\n  };\n\n  var forceNextPop = false;\n  var ignorePath = null;\n\n  var handleHashChange = function handleHashChange() {\n    var path = getHashPath();\n    var encodedPath = encodePath(path);\n\n    if (path !== encodedPath) {\n      // Ensure we always have a properly-encoded hash.\n      replaceHashPath(encodedPath);\n    } else {\n      var location = getDOMLocation();\n      var prevLocation = history.location;\n\n      if (!forceNextPop && (0, _LocationUtils.locationsAreEqual)(prevLocation, location)) return; // A hashchange doesn't always == location change.\n\n      if (ignorePath === (0, _PathUtils.createPath)(location)) return; // Ignore this change; we already setState in push/replace.\n\n      ignorePath = null;\n\n      handlePop(location);\n    }\n  };\n\n  var handlePop = function handlePop(location) {\n    if (forceNextPop) {\n      forceNextPop = false;\n      setState();\n    } else {\n      var action = 'POP';\n\n      transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n        if (ok) {\n          setState({ action: action, location: location });\n        } else {\n          revertPop(location);\n        }\n      });\n    }\n  };\n\n  var revertPop = function revertPop(fromLocation) {\n    var toLocation = history.location;\n\n    // TODO: We could probably make this more reliable by\n    // keeping a list of paths we've seen in sessionStorage.\n    // Instead, we just default to 0 for paths we don't know.\n\n    var toIndex = allPaths.lastIndexOf((0, _PathUtils.createPath)(toLocation));\n\n    if (toIndex === -1) toIndex = 0;\n\n    var fromIndex = allPaths.lastIndexOf((0, _PathUtils.createPath)(fromLocation));\n\n    if (fromIndex === -1) fromIndex = 0;\n\n    var delta = toIndex - fromIndex;\n\n    if (delta) {\n      forceNextPop = true;\n      go(delta);\n    }\n  };\n\n  // Ensure the hash is encoded properly before doing anything else.\n  var path = getHashPath();\n  var encodedPath = encodePath(path);\n\n  if (path !== encodedPath) replaceHashPath(encodedPath);\n\n  var initialLocation = getDOMLocation();\n  var allPaths = [(0, _PathUtils.createPath)(initialLocation)];\n\n  // Public interface\n\n  var createHref = function createHref(location) {\n    return '#' + encodePath(basename + (0, _PathUtils.createPath)(location));\n  };\n\n  var push = function push(path, state) {\n    (0, _warning2.default)(state === undefined, 'Hash history cannot push state; it is ignored');\n\n    var action = 'PUSH';\n    var location = (0, _LocationUtils.createLocation)(path, undefined, undefined, history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var path = (0, _PathUtils.createPath)(location);\n      var encodedPath = encodePath(basename + path);\n      var hashChanged = getHashPath() !== encodedPath;\n\n      if (hashChanged) {\n        // We cannot tell if a hashchange was caused by a PUSH, so we'd\n        // rather setState here and ignore the hashchange. The caveat here\n        // is that other hash histories in the page will consider it a POP.\n        ignorePath = path;\n        pushHashPath(encodedPath);\n\n        var prevIndex = allPaths.lastIndexOf((0, _PathUtils.createPath)(history.location));\n        var nextPaths = allPaths.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n        nextPaths.push(path);\n        allPaths = nextPaths;\n\n        setState({ action: action, location: location });\n      } else {\n        (0, _warning2.default)(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack');\n\n        setState();\n      }\n    });\n  };\n\n  var replace = function replace(path, state) {\n    (0, _warning2.default)(state === undefined, 'Hash history cannot replace state; it is ignored');\n\n    var action = 'REPLACE';\n    var location = (0, _LocationUtils.createLocation)(path, undefined, undefined, history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var path = (0, _PathUtils.createPath)(location);\n      var encodedPath = encodePath(basename + path);\n      var hashChanged = getHashPath() !== encodedPath;\n\n      if (hashChanged) {\n        // We cannot tell if a hashchange was caused by a REPLACE, so we'd\n        // rather setState here and ignore the hashchange. The caveat here\n        // is that other hash histories in the page will consider it a POP.\n        ignorePath = path;\n        replaceHashPath(encodedPath);\n      }\n\n      var prevIndex = allPaths.indexOf((0, _PathUtils.createPath)(history.location));\n\n      if (prevIndex !== -1) allPaths[prevIndex] = path;\n\n      setState({ action: action, location: location });\n    });\n  };\n\n  var go = function go(n) {\n    (0, _warning2.default)(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser');\n\n    globalHistory.go(n);\n  };\n\n  var goBack = function goBack() {\n    return go(-1);\n  };\n\n  var goForward = function goForward() {\n    return go(1);\n  };\n\n  var listenerCount = 0;\n\n  var checkDOMListeners = function checkDOMListeners(delta) {\n    listenerCount += delta;\n\n    if (listenerCount === 1) {\n      (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleHashChange);\n    } else if (listenerCount === 0) {\n      (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleHashChange);\n    }\n  };\n\n  var isBlocked = false;\n\n  var block = function block() {\n    var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n    var unblock = transitionManager.setPrompt(prompt);\n\n    if (!isBlocked) {\n      checkDOMListeners(1);\n      isBlocked = true;\n    }\n\n    return function () {\n      if (isBlocked) {\n        isBlocked = false;\n        checkDOMListeners(-1);\n      }\n\n      return unblock();\n    };\n  };\n\n  var listen = function listen(listener) {\n    var unlisten = transitionManager.appendListener(listener);\n    checkDOMListeners(1);\n\n    return function () {\n      checkDOMListeners(-1);\n      unlisten();\n    };\n  };\n\n  var history = {\n    length: globalHistory.length,\n    action: 'POP',\n    location: initialLocation,\n    createHref: createHref,\n    push: push,\n    replace: replace,\n    go: go,\n    goBack: goBack,\n    goForward: goForward,\n    block: block,\n    listen: listen\n  };\n\n  return history;\n};\n\nexports.default = createHashHistory;","'use strict';\n\nexports.__esModule = true;\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar createTransitionManager = function createTransitionManager() {\n  var prompt = null;\n\n  var setPrompt = function setPrompt(nextPrompt) {\n    (0, _warning2.default)(prompt == null, 'A history supports only one prompt at a time');\n\n    prompt = nextPrompt;\n\n    return function () {\n      if (prompt === nextPrompt) prompt = null;\n    };\n  };\n\n  var confirmTransitionTo = function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n    // TODO: If another transition starts while we're still confirming\n    // the previous one, we may end up in a weird state. Figure out the\n    // best way to handle this.\n    if (prompt != null) {\n      var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n\n      if (typeof result === 'string') {\n        if (typeof getUserConfirmation === 'function') {\n          getUserConfirmation(result, callback);\n        } else {\n          (0, _warning2.default)(false, 'A history needs a getUserConfirmation function in order to use a prompt message');\n\n          callback(true);\n        }\n      } else {\n        // Return false from a transition hook to cancel the transition.\n        callback(result !== false);\n      }\n    } else {\n      callback(true);\n    }\n  };\n\n  var listeners = [];\n\n  var appendListener = function appendListener(fn) {\n    var isActive = true;\n\n    var listener = function listener() {\n      if (isActive) fn.apply(undefined, arguments);\n    };\n\n    listeners.push(listener);\n\n    return function () {\n      isActive = false;\n      listeners = listeners.filter(function (item) {\n        return item !== listener;\n      });\n    };\n  };\n\n  var notifyListeners = function notifyListeners() {\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    listeners.forEach(function (listener) {\n      return listener.apply(undefined, args);\n    });\n  };\n\n  return {\n    setPrompt: setPrompt,\n    confirmTransitionTo: confirmTransitionTo,\n    appendListener: appendListener,\n    notifyListeners: notifyListeners\n  };\n};\n\nexports.default = createTransitionManager;","export var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nexport var addEventListener = function addEventListener(node, event, listener) {\n  return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener);\n};\n\nexport var removeEventListener = function removeEventListener(node, event, listener) {\n  return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener);\n};\n\nexport var getConfirmation = function getConfirmation(message, callback) {\n  return callback(window.confirm(message));\n}; // eslint-disable-line no-alert\n\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\nexport var supportsHistory = function supportsHistory() {\n  var ua = window.navigator.userAgent;\n\n  if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n\n  return window.history && 'pushState' in window.history;\n};\n\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\nexport var supportsPopStateOnHashChange = function supportsPopStateOnHashChange() {\n  return window.navigator.userAgent.indexOf('Trident') === -1;\n};\n\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\nexport var supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() {\n  return window.navigator.userAgent.indexOf('Firefox') === -1;\n};\n\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\nexport var isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) {\n  return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n};","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport resolvePathname from 'resolve-pathname';\nimport valueEqual from 'value-equal';\nimport { parsePath } from './PathUtils';\n\nexport var createLocation = function createLocation(path, state, key, currentLocation) {\n  var location = void 0;\n  if (typeof path === 'string') {\n    // Two-arg form: push(path, state)\n    location = parsePath(path);\n    location.state = state;\n  } else {\n    // One-arg form: push(location)\n    location = _extends({}, path);\n\n    if (location.pathname === undefined) location.pathname = '';\n\n    if (location.search) {\n      if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n    } else {\n      location.search = '';\n    }\n\n    if (location.hash) {\n      if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n    } else {\n      location.hash = '';\n    }\n\n    if (state !== undefined && location.state === undefined) location.state = state;\n  }\n\n  try {\n    location.pathname = decodeURI(location.pathname);\n  } catch (e) {\n    if (e instanceof URIError) {\n      throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n    } else {\n      throw e;\n    }\n  }\n\n  if (key) location.key = key;\n\n  if (currentLocation) {\n    // Resolve incomplete/relative pathname relative to current location.\n    if (!location.pathname) {\n      location.pathname = currentLocation.pathname;\n    } else if (location.pathname.charAt(0) !== '/') {\n      location.pathname = resolvePathname(location.pathname, currentLocation.pathname);\n    }\n  } else {\n    // When there is no prior location and pathname is empty, set it to /\n    if (!location.pathname) {\n      location.pathname = '/';\n    }\n  }\n\n  return location;\n};\n\nexport var locationsAreEqual = function locationsAreEqual(a, b) {\n  return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && valueEqual(a.state, b.state);\n};","export var addLeadingSlash = function addLeadingSlash(path) {\n  return path.charAt(0) === '/' ? path : '/' + path;\n};\n\nexport var stripLeadingSlash = function stripLeadingSlash(path) {\n  return path.charAt(0) === '/' ? path.substr(1) : path;\n};\n\nexport var hasBasename = function hasBasename(path, prefix) {\n  return new RegExp('^' + prefix + '(\\\\/|\\\\?|#|$)', 'i').test(path);\n};\n\nexport var stripBasename = function stripBasename(path, prefix) {\n  return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n};\n\nexport var stripTrailingSlash = function stripTrailingSlash(path) {\n  return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n};\n\nexport var parsePath = function parsePath(path) {\n  var pathname = path || '/';\n  var search = '';\n  var hash = '';\n\n  var hashIndex = pathname.indexOf('#');\n  if (hashIndex !== -1) {\n    hash = pathname.substr(hashIndex);\n    pathname = pathname.substr(0, hashIndex);\n  }\n\n  var searchIndex = pathname.indexOf('?');\n  if (searchIndex !== -1) {\n    search = pathname.substr(searchIndex);\n    pathname = pathname.substr(0, searchIndex);\n  }\n\n  return {\n    pathname: pathname,\n    search: search === '?' ? '' : search,\n    hash: hash === '#' ? '' : hash\n  };\n};\n\nexport var createPath = function createPath(location) {\n  var pathname = location.pathname,\n      search = location.search,\n      hash = location.hash;\n\n\n  var path = pathname || '/';\n\n  if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search;\n\n  if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash;\n\n  return path;\n};","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport warning from 'warning';\nimport invariant from 'invariant';\nimport { createLocation } from './LocationUtils';\nimport { addLeadingSlash, stripTrailingSlash, hasBasename, stripBasename, createPath } from './PathUtils';\nimport createTransitionManager from './createTransitionManager';\nimport { canUseDOM, addEventListener, removeEventListener, getConfirmation, supportsHistory, supportsPopStateOnHashChange, isExtraneousPopstateEvent } from './DOMUtils';\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nvar getHistoryState = function getHistoryState() {\n  try {\n    return window.history.state || {};\n  } catch (e) {\n    // IE 11 sometimes throws when accessing window.history.state\n    // See https://github.com/ReactTraining/history/pull/289\n    return {};\n  }\n};\n\n/**\n * Creates a history object that uses the HTML5 history API including\n * pushState, replaceState, and the popstate event.\n */\nvar createBrowserHistory = function createBrowserHistory() {\n  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n  invariant(canUseDOM, 'Browser history needs a DOM');\n\n  var globalHistory = window.history;\n  var canUseHistory = supportsHistory();\n  var needsHashChangeListener = !supportsPopStateOnHashChange();\n\n  var _props$forceRefresh = props.forceRefresh,\n      forceRefresh = _props$forceRefresh === undefined ? false : _props$forceRefresh,\n      _props$getUserConfirm = props.getUserConfirmation,\n      getUserConfirmation = _props$getUserConfirm === undefined ? getConfirmation : _props$getUserConfirm,\n      _props$keyLength = props.keyLength,\n      keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;\n\n  var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n  var getDOMLocation = function getDOMLocation(historyState) {\n    var _ref = historyState || {},\n        key = _ref.key,\n        state = _ref.state;\n\n    var _window$location = window.location,\n        pathname = _window$location.pathname,\n        search = _window$location.search,\n        hash = _window$location.hash;\n\n\n    var path = pathname + search + hash;\n\n    warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n    if (basename) path = stripBasename(path, basename);\n\n    return createLocation(path, state, key);\n  };\n\n  var createKey = function createKey() {\n    return Math.random().toString(36).substr(2, keyLength);\n  };\n\n  var transitionManager = createTransitionManager();\n\n  var setState = function setState(nextState) {\n    _extends(history, nextState);\n\n    history.length = globalHistory.length;\n\n    transitionManager.notifyListeners(history.location, history.action);\n  };\n\n  var handlePopState = function handlePopState(event) {\n    // Ignore extraneous popstate events in WebKit.\n    if (isExtraneousPopstateEvent(event)) return;\n\n    handlePop(getDOMLocation(event.state));\n  };\n\n  var handleHashChange = function handleHashChange() {\n    handlePop(getDOMLocation(getHistoryState()));\n  };\n\n  var forceNextPop = false;\n\n  var handlePop = function handlePop(location) {\n    if (forceNextPop) {\n      forceNextPop = false;\n      setState();\n    } else {\n      var action = 'POP';\n\n      transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n        if (ok) {\n          setState({ action: action, location: location });\n        } else {\n          revertPop(location);\n        }\n      });\n    }\n  };\n\n  var revertPop = function revertPop(fromLocation) {\n    var toLocation = history.location;\n\n    // TODO: We could probably make this more reliable by\n    // keeping a list of keys we've seen in sessionStorage.\n    // Instead, we just default to 0 for keys we don't know.\n\n    var toIndex = allKeys.indexOf(toLocation.key);\n\n    if (toIndex === -1) toIndex = 0;\n\n    var fromIndex = allKeys.indexOf(fromLocation.key);\n\n    if (fromIndex === -1) fromIndex = 0;\n\n    var delta = toIndex - fromIndex;\n\n    if (delta) {\n      forceNextPop = true;\n      go(delta);\n    }\n  };\n\n  var initialLocation = getDOMLocation(getHistoryState());\n  var allKeys = [initialLocation.key];\n\n  // Public interface\n\n  var createHref = function createHref(location) {\n    return basename + createPath(location);\n  };\n\n  var push = function push(path, state) {\n    warning(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n    var action = 'PUSH';\n    var location = createLocation(path, state, createKey(), history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var href = createHref(location);\n      var key = location.key,\n          state = location.state;\n\n\n      if (canUseHistory) {\n        globalHistory.pushState({ key: key, state: state }, null, href);\n\n        if (forceRefresh) {\n          window.location.href = href;\n        } else {\n          var prevIndex = allKeys.indexOf(history.location.key);\n          var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n          nextKeys.push(location.key);\n          allKeys = nextKeys;\n\n          setState({ action: action, location: location });\n        }\n      } else {\n        warning(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history');\n\n        window.location.href = href;\n      }\n    });\n  };\n\n  var replace = function replace(path, state) {\n    warning(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n    var action = 'REPLACE';\n    var location = createLocation(path, state, createKey(), history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var href = createHref(location);\n      var key = location.key,\n          state = location.state;\n\n\n      if (canUseHistory) {\n        globalHistory.replaceState({ key: key, state: state }, null, href);\n\n        if (forceRefresh) {\n          window.location.replace(href);\n        } else {\n          var prevIndex = allKeys.indexOf(history.location.key);\n\n          if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n\n          setState({ action: action, location: location });\n        }\n      } else {\n        warning(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history');\n\n        window.location.replace(href);\n      }\n    });\n  };\n\n  var go = function go(n) {\n    globalHistory.go(n);\n  };\n\n  var goBack = function goBack() {\n    return go(-1);\n  };\n\n  var goForward = function goForward() {\n    return go(1);\n  };\n\n  var listenerCount = 0;\n\n  var checkDOMListeners = function checkDOMListeners(delta) {\n    listenerCount += delta;\n\n    if (listenerCount === 1) {\n      addEventListener(window, PopStateEvent, handlePopState);\n\n      if (needsHashChangeListener) addEventListener(window, HashChangeEvent, handleHashChange);\n    } else if (listenerCount === 0) {\n      removeEventListener(window, PopStateEvent, handlePopState);\n\n      if (needsHashChangeListener) removeEventListener(window, HashChangeEvent, handleHashChange);\n    }\n  };\n\n  var isBlocked = false;\n\n  var block = function block() {\n    var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n    var unblock = transitionManager.setPrompt(prompt);\n\n    if (!isBlocked) {\n      checkDOMListeners(1);\n      isBlocked = true;\n    }\n\n    return function () {\n      if (isBlocked) {\n        isBlocked = false;\n        checkDOMListeners(-1);\n      }\n\n      return unblock();\n    };\n  };\n\n  var listen = function listen(listener) {\n    var unlisten = transitionManager.appendListener(listener);\n    checkDOMListeners(1);\n\n    return function () {\n      checkDOMListeners(-1);\n      unlisten();\n    };\n  };\n\n  var history = {\n    length: globalHistory.length,\n    action: 'POP',\n    location: initialLocation,\n    createHref: createHref,\n    push: push,\n    replace: replace,\n    go: go,\n    goBack: goBack,\n    goForward: goForward,\n    block: block,\n    listen: listen\n  };\n\n  return history;\n};\n\nexport default createBrowserHistory;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport warning from 'warning';\nimport invariant from 'invariant';\nimport { createLocation, locationsAreEqual } from './LocationUtils';\nimport { addLeadingSlash, stripLeadingSlash, stripTrailingSlash, hasBasename, stripBasename, createPath } from './PathUtils';\nimport createTransitionManager from './createTransitionManager';\nimport { canUseDOM, addEventListener, removeEventListener, getConfirmation, supportsGoWithoutReloadUsingHash } from './DOMUtils';\n\nvar HashChangeEvent = 'hashchange';\n\nvar HashPathCoders = {\n  hashbang: {\n    encodePath: function encodePath(path) {\n      return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path);\n    },\n    decodePath: function decodePath(path) {\n      return path.charAt(0) === '!' ? path.substr(1) : path;\n    }\n  },\n  noslash: {\n    encodePath: stripLeadingSlash,\n    decodePath: addLeadingSlash\n  },\n  slash: {\n    encodePath: addLeadingSlash,\n    decodePath: addLeadingSlash\n  }\n};\n\nvar getHashPath = function getHashPath() {\n  // We can't use window.location.hash here because it's not\n  // consistent across browsers - Firefox will pre-decode it!\n  var href = window.location.href;\n  var hashIndex = href.indexOf('#');\n  return hashIndex === -1 ? '' : href.substring(hashIndex + 1);\n};\n\nvar pushHashPath = function pushHashPath(path) {\n  return window.location.hash = path;\n};\n\nvar replaceHashPath = function replaceHashPath(path) {\n  var hashIndex = window.location.href.indexOf('#');\n\n  window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path);\n};\n\nvar createHashHistory = function createHashHistory() {\n  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n  invariant(canUseDOM, 'Hash history needs a DOM');\n\n  var globalHistory = window.history;\n  var canGoWithoutReload = supportsGoWithoutReloadUsingHash();\n\n  var _props$getUserConfirm = props.getUserConfirmation,\n      getUserConfirmation = _props$getUserConfirm === undefined ? getConfirmation : _props$getUserConfirm,\n      _props$hashType = props.hashType,\n      hashType = _props$hashType === undefined ? 'slash' : _props$hashType;\n\n  var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n  var _HashPathCoders$hashT = HashPathCoders[hashType],\n      encodePath = _HashPathCoders$hashT.encodePath,\n      decodePath = _HashPathCoders$hashT.decodePath;\n\n\n  var getDOMLocation = function getDOMLocation() {\n    var path = decodePath(getHashPath());\n\n    warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n    if (basename) path = stripBasename(path, basename);\n\n    return createLocation(path);\n  };\n\n  var transitionManager = createTransitionManager();\n\n  var setState = function setState(nextState) {\n    _extends(history, nextState);\n\n    history.length = globalHistory.length;\n\n    transitionManager.notifyListeners(history.location, history.action);\n  };\n\n  var forceNextPop = false;\n  var ignorePath = null;\n\n  var handleHashChange = function handleHashChange() {\n    var path = getHashPath();\n    var encodedPath = encodePath(path);\n\n    if (path !== encodedPath) {\n      // Ensure we always have a properly-encoded hash.\n      replaceHashPath(encodedPath);\n    } else {\n      var location = getDOMLocation();\n      var prevLocation = history.location;\n\n      if (!forceNextPop && locationsAreEqual(prevLocation, location)) return; // A hashchange doesn't always == location change.\n\n      if (ignorePath === createPath(location)) return; // Ignore this change; we already setState in push/replace.\n\n      ignorePath = null;\n\n      handlePop(location);\n    }\n  };\n\n  var handlePop = function handlePop(location) {\n    if (forceNextPop) {\n      forceNextPop = false;\n      setState();\n    } else {\n      var action = 'POP';\n\n      transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n        if (ok) {\n          setState({ action: action, location: location });\n        } else {\n          revertPop(location);\n        }\n      });\n    }\n  };\n\n  var revertPop = function revertPop(fromLocation) {\n    var toLocation = history.location;\n\n    // TODO: We could probably make this more reliable by\n    // keeping a list of paths we've seen in sessionStorage.\n    // Instead, we just default to 0 for paths we don't know.\n\n    var toIndex = allPaths.lastIndexOf(createPath(toLocation));\n\n    if (toIndex === -1) toIndex = 0;\n\n    var fromIndex = allPaths.lastIndexOf(createPath(fromLocation));\n\n    if (fromIndex === -1) fromIndex = 0;\n\n    var delta = toIndex - fromIndex;\n\n    if (delta) {\n      forceNextPop = true;\n      go(delta);\n    }\n  };\n\n  // Ensure the hash is encoded properly before doing anything else.\n  var path = getHashPath();\n  var encodedPath = encodePath(path);\n\n  if (path !== encodedPath) replaceHashPath(encodedPath);\n\n  var initialLocation = getDOMLocation();\n  var allPaths = [createPath(initialLocation)];\n\n  // Public interface\n\n  var createHref = function createHref(location) {\n    return '#' + encodePath(basename + createPath(location));\n  };\n\n  var push = function push(path, state) {\n    warning(state === undefined, 'Hash history cannot push state; it is ignored');\n\n    var action = 'PUSH';\n    var location = createLocation(path, undefined, undefined, history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var path = createPath(location);\n      var encodedPath = encodePath(basename + path);\n      var hashChanged = getHashPath() !== encodedPath;\n\n      if (hashChanged) {\n        // We cannot tell if a hashchange was caused by a PUSH, so we'd\n        // rather setState here and ignore the hashchange. The caveat here\n        // is that other hash histories in the page will consider it a POP.\n        ignorePath = path;\n        pushHashPath(encodedPath);\n\n        var prevIndex = allPaths.lastIndexOf(createPath(history.location));\n        var nextPaths = allPaths.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n        nextPaths.push(path);\n        allPaths = nextPaths;\n\n        setState({ action: action, location: location });\n      } else {\n        warning(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack');\n\n        setState();\n      }\n    });\n  };\n\n  var replace = function replace(path, state) {\n    warning(state === undefined, 'Hash history cannot replace state; it is ignored');\n\n    var action = 'REPLACE';\n    var location = createLocation(path, undefined, undefined, history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var path = createPath(location);\n      var encodedPath = encodePath(basename + path);\n      var hashChanged = getHashPath() !== encodedPath;\n\n      if (hashChanged) {\n        // We cannot tell if a hashchange was caused by a REPLACE, so we'd\n        // rather setState here and ignore the hashchange. The caveat here\n        // is that other hash histories in the page will consider it a POP.\n        ignorePath = path;\n        replaceHashPath(encodedPath);\n      }\n\n      var prevIndex = allPaths.indexOf(createPath(history.location));\n\n      if (prevIndex !== -1) allPaths[prevIndex] = path;\n\n      setState({ action: action, location: location });\n    });\n  };\n\n  var go = function go(n) {\n    warning(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser');\n\n    globalHistory.go(n);\n  };\n\n  var goBack = function goBack() {\n    return go(-1);\n  };\n\n  var goForward = function goForward() {\n    return go(1);\n  };\n\n  var listenerCount = 0;\n\n  var checkDOMListeners = function checkDOMListeners(delta) {\n    listenerCount += delta;\n\n    if (listenerCount === 1) {\n      addEventListener(window, HashChangeEvent, handleHashChange);\n    } else if (listenerCount === 0) {\n      removeEventListener(window, HashChangeEvent, handleHashChange);\n    }\n  };\n\n  var isBlocked = false;\n\n  var block = function block() {\n    var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n    var unblock = transitionManager.setPrompt(prompt);\n\n    if (!isBlocked) {\n      checkDOMListeners(1);\n      isBlocked = true;\n    }\n\n    return function () {\n      if (isBlocked) {\n        isBlocked = false;\n        checkDOMListeners(-1);\n      }\n\n      return unblock();\n    };\n  };\n\n  var listen = function listen(listener) {\n    var unlisten = transitionManager.appendListener(listener);\n    checkDOMListeners(1);\n\n    return function () {\n      checkDOMListeners(-1);\n      unlisten();\n    };\n  };\n\n  var history = {\n    length: globalHistory.length,\n    action: 'POP',\n    location: initialLocation,\n    createHref: createHref,\n    push: push,\n    replace: replace,\n    go: go,\n    goBack: goBack,\n    goForward: goForward,\n    block: block,\n    listen: listen\n  };\n\n  return history;\n};\n\nexport default createHashHistory;","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport warning from 'warning';\nimport { createPath } from './PathUtils';\nimport { createLocation } from './LocationUtils';\nimport createTransitionManager from './createTransitionManager';\n\nvar clamp = function clamp(n, lowerBound, upperBound) {\n  return Math.min(Math.max(n, lowerBound), upperBound);\n};\n\n/**\n * Creates a history object that stores locations in memory.\n */\nvar createMemoryHistory = function createMemoryHistory() {\n  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  var getUserConfirmation = props.getUserConfirmation,\n      _props$initialEntries = props.initialEntries,\n      initialEntries = _props$initialEntries === undefined ? ['/'] : _props$initialEntries,\n      _props$initialIndex = props.initialIndex,\n      initialIndex = _props$initialIndex === undefined ? 0 : _props$initialIndex,\n      _props$keyLength = props.keyLength,\n      keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;\n\n\n  var transitionManager = createTransitionManager();\n\n  var setState = function setState(nextState) {\n    _extends(history, nextState);\n\n    history.length = history.entries.length;\n\n    transitionManager.notifyListeners(history.location, history.action);\n  };\n\n  var createKey = function createKey() {\n    return Math.random().toString(36).substr(2, keyLength);\n  };\n\n  var index = clamp(initialIndex, 0, initialEntries.length - 1);\n  var entries = initialEntries.map(function (entry) {\n    return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n  });\n\n  // Public interface\n\n  var createHref = createPath;\n\n  var push = function push(path, state) {\n    warning(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n    var action = 'PUSH';\n    var location = createLocation(path, state, createKey(), history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var prevIndex = history.index;\n      var nextIndex = prevIndex + 1;\n\n      var nextEntries = history.entries.slice(0);\n      if (nextEntries.length > nextIndex) {\n        nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n      } else {\n        nextEntries.push(location);\n      }\n\n      setState({\n        action: action,\n        location: location,\n        index: nextIndex,\n        entries: nextEntries\n      });\n    });\n  };\n\n  var replace = function replace(path, state) {\n    warning(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n    var action = 'REPLACE';\n    var location = createLocation(path, state, createKey(), history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      history.entries[history.index] = location;\n\n      setState({ action: action, location: location });\n    });\n  };\n\n  var go = function go(n) {\n    var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n\n    var action = 'POP';\n    var location = history.entries[nextIndex];\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (ok) {\n        setState({\n          action: action,\n          location: location,\n          index: nextIndex\n        });\n      } else {\n        // Mimic the behavior of DOM histories by\n        // causing a render after a cancelled POP.\n        setState();\n      }\n    });\n  };\n\n  var goBack = function goBack() {\n    return go(-1);\n  };\n\n  var goForward = function goForward() {\n    return go(1);\n  };\n\n  var canGo = function canGo(n) {\n    var nextIndex = history.index + n;\n    return nextIndex >= 0 && nextIndex < history.entries.length;\n  };\n\n  var block = function block() {\n    var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n    return transitionManager.setPrompt(prompt);\n  };\n\n  var listen = function listen(listener) {\n    return transitionManager.appendListener(listener);\n  };\n\n  var history = {\n    length: entries.length,\n    action: 'POP',\n    location: entries[index],\n    index: index,\n    entries: entries,\n    createHref: createHref,\n    push: push,\n    replace: replace,\n    go: go,\n    goBack: goBack,\n    goForward: goForward,\n    canGo: canGo,\n    block: block,\n    listen: listen\n  };\n\n  return history;\n};\n\nexport default createMemoryHistory;","import warning from 'warning';\n\nvar createTransitionManager = function createTransitionManager() {\n  var prompt = null;\n\n  var setPrompt = function setPrompt(nextPrompt) {\n    warning(prompt == null, 'A history supports only one prompt at a time');\n\n    prompt = nextPrompt;\n\n    return function () {\n      if (prompt === nextPrompt) prompt = null;\n    };\n  };\n\n  var confirmTransitionTo = function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n    // TODO: If another transition starts while we're still confirming\n    // the previous one, we may end up in a weird state. Figure out the\n    // best way to handle this.\n    if (prompt != null) {\n      var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n\n      if (typeof result === 'string') {\n        if (typeof getUserConfirmation === 'function') {\n          getUserConfirmation(result, callback);\n        } else {\n          warning(false, 'A history needs a getUserConfirmation function in order to use a prompt message');\n\n          callback(true);\n        }\n      } else {\n        // Return false from a transition hook to cancel the transition.\n        callback(result !== false);\n      }\n    } else {\n      callback(true);\n    }\n  };\n\n  var listeners = [];\n\n  var appendListener = function appendListener(fn) {\n    var isActive = true;\n\n    var listener = function listener() {\n      if (isActive) fn.apply(undefined, arguments);\n    };\n\n    listeners.push(listener);\n\n    return function () {\n      isActive = false;\n      listeners = listeners.filter(function (item) {\n        return item !== listener;\n      });\n    };\n  };\n\n  var notifyListeners = function notifyListeners() {\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    listeners.forEach(function (listener) {\n      return listener.apply(undefined, args);\n    });\n  };\n\n  return {\n    setPrompt: setPrompt,\n    confirmTransitionTo: confirmTransitionTo,\n    appendListener: appendListener,\n    notifyListeners: notifyListeners\n  };\n};\n\nexport default createTransitionManager;","import _createBrowserHistory from './createBrowserHistory';\nexport { _createBrowserHistory as createBrowserHistory };\nimport _createHashHistory from './createHashHistory';\nexport { _createHashHistory as createHashHistory };\nimport _createMemoryHistory from './createMemoryHistory';\nexport { _createMemoryHistory as createMemoryHistory };\n\nexport { createLocation, locationsAreEqual } from './LocationUtils';\nexport { parsePath, createPath } from './PathUtils';","/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\n(function (global, factory) {\n    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n    typeof define === 'function' && define.amd ? define(factory) :\n    (global.hoistNonReactStatics = factory());\n}(this, (function () {\n    'use strict';\n    \n    var REACT_STATICS = {\n        childContextTypes: true,\n        contextTypes: true,\n        defaultProps: true,\n        displayName: true,\n        getDefaultProps: true,\n        getDerivedStateFromProps: true,\n        mixins: true,\n        propTypes: true,\n        type: true\n    };\n    \n    var KNOWN_STATICS = {\n        name: true,\n        length: true,\n        prototype: true,\n        caller: true,\n        callee: true,\n        arguments: true,\n        arity: true\n    };\n    \n    var defineProperty = Object.defineProperty;\n    var getOwnPropertyNames = Object.getOwnPropertyNames;\n    var getOwnPropertySymbols = Object.getOwnPropertySymbols;\n    var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n    var getPrototypeOf = Object.getPrototypeOf;\n    var objectPrototype = getPrototypeOf && getPrototypeOf(Object);\n    \n    return function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n        if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components\n            \n            if (objectPrototype) {\n                var inheritedComponent = getPrototypeOf(sourceComponent);\n                if (inheritedComponent && inheritedComponent !== objectPrototype) {\n                    hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n                }\n            }\n            \n            var keys = getOwnPropertyNames(sourceComponent);\n            \n            if (getOwnPropertySymbols) {\n                keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n            }\n            \n            for (var i = 0; i < keys.length; ++i) {\n                var key = keys[i];\n                if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {\n                    var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n                    try { // Avoid failures from read-only properties\n                        defineProperty(targetComponent, key, descriptor);\n                    } catch (e) {}\n                }\n            }\n            \n            return targetComponent;\n        }\n        \n        return targetComponent;\n    };\n})));\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n  if (process.env.NODE_ENV !== 'production') {\n    if (format === undefined) {\n      throw new Error('invariant requires an error message argument');\n    }\n  }\n\n  if (!condition) {\n    var error;\n    if (format === undefined) {\n      error = new Error(\n        'Minified exception occurred; use the non-minified dev environment ' +\n        'for the full error message and additional helpful warnings.'\n      );\n    } else {\n      var args = [a, b, c, d, e, f];\n      var argIndex = 0;\n      error = new Error(\n        format.replace(/%s/g, function() { return args[argIndex++]; })\n      );\n      error.name = 'Invariant Violation';\n    }\n\n    error.framesToPop = 1; // we don't care about invariant's own frame\n    throw error;\n  }\n};\n\nmodule.exports = invariant;\n","module.exports = Array.isArray || function (arr) {\n  return Object.prototype.toString.call(arr) == '[object Array]';\n};\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc');  // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","var isarray = require('isarray')\n\n/**\n * Expose `pathToRegexp`.\n */\nmodule.exports = pathToRegexp\nmodule.exports.parse = parse\nmodule.exports.compile = compile\nmodule.exports.tokensToFunction = tokensToFunction\nmodule.exports.tokensToRegExp = tokensToRegExp\n\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\nvar PATH_REGEXP = new RegExp([\n  // Match escaped characters that would otherwise appear in future matches.\n  // This allows the user to escape special characters that won't transform.\n  '(\\\\\\\\.)',\n  // Match Express-style parameters and un-named parameters with a prefix\n  // and optional suffixes. Matches appear as:\n  //\n  // \"/:test(\\\\d+)?\" => [\"/\", \"test\", \"\\d+\", undefined, \"?\", undefined]\n  // \"/route(\\\\d+)\"  => [undefined, undefined, undefined, \"\\d+\", undefined, undefined]\n  // \"/*\"            => [\"/\", undefined, undefined, undefined, undefined, \"*\"]\n  '([\\\\/.])?(?:(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?|(\\\\*))'\n].join('|'), 'g')\n\n/**\n * Parse a string for the raw tokens.\n *\n * @param  {string}  str\n * @param  {Object=} options\n * @return {!Array}\n */\nfunction parse (str, options) {\n  var tokens = []\n  var key = 0\n  var index = 0\n  var path = ''\n  var defaultDelimiter = options && options.delimiter || '/'\n  var res\n\n  while ((res = PATH_REGEXP.exec(str)) != null) {\n    var m = res[0]\n    var escaped = res[1]\n    var offset = res.index\n    path += str.slice(index, offset)\n    index = offset + m.length\n\n    // Ignore already escaped sequences.\n    if (escaped) {\n      path += escaped[1]\n      continue\n    }\n\n    var next = str[index]\n    var prefix = res[2]\n    var name = res[3]\n    var capture = res[4]\n    var group = res[5]\n    var modifier = res[6]\n    var asterisk = res[7]\n\n    // Push the current path onto the tokens.\n    if (path) {\n      tokens.push(path)\n      path = ''\n    }\n\n    var partial = prefix != null && next != null && next !== prefix\n    var repeat = modifier === '+' || modifier === '*'\n    var optional = modifier === '?' || modifier === '*'\n    var delimiter = res[2] || defaultDelimiter\n    var pattern = capture || group\n\n    tokens.push({\n      name: name || key++,\n      prefix: prefix || '',\n      delimiter: delimiter,\n      optional: optional,\n      repeat: repeat,\n      partial: partial,\n      asterisk: !!asterisk,\n      pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')\n    })\n  }\n\n  // Match any characters still remaining.\n  if (index < str.length) {\n    path += str.substr(index)\n  }\n\n  // If the path exists, push it onto the end.\n  if (path) {\n    tokens.push(path)\n  }\n\n  return tokens\n}\n\n/**\n * Compile a string to a template function for the path.\n *\n * @param  {string}             str\n * @param  {Object=}            options\n * @return {!function(Object=, Object=)}\n */\nfunction compile (str, options) {\n  return tokensToFunction(parse(str, options))\n}\n\n/**\n * Prettier encoding of URI path segments.\n *\n * @param  {string}\n * @return {string}\n */\nfunction encodeURIComponentPretty (str) {\n  return encodeURI(str).replace(/[\\/?#]/g, function (c) {\n    return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n  })\n}\n\n/**\n * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.\n *\n * @param  {string}\n * @return {string}\n */\nfunction encodeAsterisk (str) {\n  return encodeURI(str).replace(/[?#]/g, function (c) {\n    return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n  })\n}\n\n/**\n * Expose a method for transforming tokens into the path function.\n */\nfunction tokensToFunction (tokens) {\n  // Compile all the tokens into regexps.\n  var matches = new Array(tokens.length)\n\n  // Compile all the patterns before compilation.\n  for (var i = 0; i < tokens.length; i++) {\n    if (typeof tokens[i] === 'object') {\n      matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n    }\n  }\n\n  return function (obj, opts) {\n    var path = ''\n    var data = obj || {}\n    var options = opts || {}\n    var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n    for (var i = 0; i < tokens.length; i++) {\n      var token = tokens[i]\n\n      if (typeof token === 'string') {\n        path += token\n\n        continue\n      }\n\n      var value = data[token.name]\n      var segment\n\n      if (value == null) {\n        if (token.optional) {\n          // Prepend partial segment prefixes.\n          if (token.partial) {\n            path += token.prefix\n          }\n\n          continue\n        } else {\n          throw new TypeError('Expected \"' + token.name + '\" to be defined')\n        }\n      }\n\n      if (isarray(value)) {\n        if (!token.repeat) {\n          throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n        }\n\n        if (value.length === 0) {\n          if (token.optional) {\n            continue\n          } else {\n            throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n          }\n        }\n\n        for (var j = 0; j < value.length; j++) {\n          segment = encode(value[j])\n\n          if (!matches[i].test(segment)) {\n            throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n          }\n\n          path += (j === 0 ? token.prefix : token.delimiter) + segment\n        }\n\n        continue\n      }\n\n      segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n      if (!matches[i].test(segment)) {\n        throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n      }\n\n      path += token.prefix + segment\n    }\n\n    return path\n  }\n}\n\n/**\n * Escape a regular expression string.\n *\n * @param  {string} str\n * @return {string}\n */\nfunction escapeString (str) {\n  return str.replace(/([.+*?=^!:${}()[\\]|\\/\\\\])/g, '\\\\$1')\n}\n\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param  {string} group\n * @return {string}\n */\nfunction escapeGroup (group) {\n  return group.replace(/([=!:$\\/()])/g, '\\\\$1')\n}\n\n/**\n * Attach the keys as a property of the regexp.\n *\n * @param  {!RegExp} re\n * @param  {Array}   keys\n * @return {!RegExp}\n */\nfunction attachKeys (re, keys) {\n  re.keys = keys\n  return re\n}\n\n/**\n * Get the flags for a regexp from the options.\n *\n * @param  {Object} options\n * @return {string}\n */\nfunction flags (options) {\n  return options.sensitive ? '' : 'i'\n}\n\n/**\n * Pull out keys from a regexp.\n *\n * @param  {!RegExp} path\n * @param  {!Array}  keys\n * @return {!RegExp}\n */\nfunction regexpToRegexp (path, keys) {\n  // Use a negative lookahead to match only capturing groups.\n  var groups = path.source.match(/\\((?!\\?)/g)\n\n  if (groups) {\n    for (var i = 0; i < groups.length; i++) {\n      keys.push({\n        name: i,\n        prefix: null,\n        delimiter: null,\n        optional: false,\n        repeat: false,\n        partial: false,\n        asterisk: false,\n        pattern: null\n      })\n    }\n  }\n\n  return attachKeys(path, keys)\n}\n\n/**\n * Transform an array into a regexp.\n *\n * @param  {!Array}  path\n * @param  {Array}   keys\n * @param  {!Object} options\n * @return {!RegExp}\n */\nfunction arrayToRegexp (path, keys, options) {\n  var parts = []\n\n  for (var i = 0; i < path.length; i++) {\n    parts.push(pathToRegexp(path[i], keys, options).source)\n  }\n\n  var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))\n\n  return attachKeys(regexp, keys)\n}\n\n/**\n * Create a path regexp from string input.\n *\n * @param  {string}  path\n * @param  {!Array}  keys\n * @param  {!Object} options\n * @return {!RegExp}\n */\nfunction stringToRegexp (path, keys, options) {\n  return tokensToRegExp(parse(path, options), keys, options)\n}\n\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param  {!Array}          tokens\n * @param  {(Array|Object)=} keys\n * @param  {Object=}         options\n * @return {!RegExp}\n */\nfunction tokensToRegExp (tokens, keys, options) {\n  if (!isarray(keys)) {\n    options = /** @type {!Object} */ (keys || options)\n    keys = []\n  }\n\n  options = options || {}\n\n  var strict = options.strict\n  var end = options.end !== false\n  var route = ''\n\n  // Iterate over the tokens and create our regexp string.\n  for (var i = 0; i < tokens.length; i++) {\n    var token = tokens[i]\n\n    if (typeof token === 'string') {\n      route += escapeString(token)\n    } else {\n      var prefix = escapeString(token.prefix)\n      var capture = '(?:' + token.pattern + ')'\n\n      keys.push(token)\n\n      if (token.repeat) {\n        capture += '(?:' + prefix + capture + ')*'\n      }\n\n      if (token.optional) {\n        if (!token.partial) {\n          capture = '(?:' + prefix + '(' + capture + '))?'\n        } else {\n          capture = prefix + '(' + capture + ')?'\n        }\n      } else {\n        capture = prefix + '(' + capture + ')'\n      }\n\n      route += capture\n    }\n  }\n\n  var delimiter = escapeString(options.delimiter || '/')\n  var endsWithDelimiter = route.slice(-delimiter.length) === delimiter\n\n  // In non-strict mode we allow a slash at the end of match. If the path to\n  // match already ends with a slash, we remove it for consistency. The slash\n  // is valid at the end of a path match, not in the middle. This is important\n  // in non-ending mode, where \"/test/\" shouldn't match \"/test//route\".\n  if (!strict) {\n    route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'\n  }\n\n  if (end) {\n    route += '$'\n  } else {\n    // In non-ending mode, we need the capturing groups to match as much as\n    // possible by using a positive lookahead to the end or next path segment.\n    route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'\n  }\n\n  return attachKeys(new RegExp('^' + route, flags(options)), keys)\n}\n\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param  {(string|RegExp|Array)} path\n * @param  {(Array|Object)=}       keys\n * @param  {Object=}               options\n * @return {!RegExp}\n */\nfunction pathToRegexp (path, keys, options) {\n  if (!isarray(keys)) {\n    options = /** @type {!Object} */ (keys || options)\n    keys = []\n  }\n\n  options = options || {}\n\n  if (path instanceof RegExp) {\n    return regexpToRegexp(path, /** @type {!Array} */ (keys))\n  }\n\n  if (isarray(path)) {\n    return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)\n  }\n\n  return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== 'production') {\n  var invariant = require('fbjs/lib/invariant');\n  var warning = require('fbjs/lib/warning');\n  var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n  var loggedTypeFailures = {};\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n  if (process.env.NODE_ENV !== 'production') {\n    for (var typeSpecName in typeSpecs) {\n      if (typeSpecs.hasOwnProperty(typeSpecName)) {\n        var error;\n        // Prop type validation may throw. In case they do, we don't want to\n        // fail the render phase where it didn't fail before. So we log it.\n        // After these have been cleaned up, we'll let them throw.\n        try {\n          // This is intentionally an invariant that gets caught. It's the same\n          // behavior as without this statement except with a better message.\n          invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);\n          error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n        } catch (ex) {\n          error = ex;\n        }\n        warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);\n        if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n          // Only monitor this failure once because there tends to be a lot of the\n          // same error.\n          loggedTypeFailures[error.message] = true;\n\n          var stack = getStack ? getStack() : '';\n\n          warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');\n        }\n      }\n    }\n  }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n  /* global Symbol */\n  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n  /**\n   * Returns the iterator method function contained on the iterable object.\n   *\n   * Be sure to invoke the function with the iterable as context:\n   *\n   *     var iteratorFn = getIteratorFn(myIterable);\n   *     if (iteratorFn) {\n   *       var iterator = iteratorFn.call(myIterable);\n   *       ...\n   *     }\n   *\n   * @param {?object} maybeIterable\n   * @return {?function}\n   */\n  function getIteratorFn(maybeIterable) {\n    var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n    if (typeof iteratorFn === 'function') {\n      return iteratorFn;\n    }\n  }\n\n  /**\n   * Collection of methods that allow declaration and validation of props that are\n   * supplied to React components. Example usage:\n   *\n   *   var Props = require('ReactPropTypes');\n   *   var MyArticle = React.createClass({\n   *     propTypes: {\n   *       // An optional string prop named \"description\".\n   *       description: Props.string,\n   *\n   *       // A required enum prop named \"category\".\n   *       category: Props.oneOf(['News','Photos']).isRequired,\n   *\n   *       // A prop named \"dialog\" that requires an instance of Dialog.\n   *       dialog: Props.instanceOf(Dialog).isRequired\n   *     },\n   *     render: function() { ... }\n   *   });\n   *\n   * A more formal specification of how these methods are used:\n   *\n   *   type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n   *   decl := ReactPropTypes.{type}(.isRequired)?\n   *\n   * Each and every declaration produces a function with the same signature. This\n   * allows the creation of custom validation functions. For example:\n   *\n   *  var MyLink = React.createClass({\n   *    propTypes: {\n   *      // An optional string or URI prop named \"href\".\n   *      href: function(props, propName, componentName) {\n   *        var propValue = props[propName];\n   *        if (propValue != null && typeof propValue !== 'string' &&\n   *            !(propValue instanceof URI)) {\n   *          return new Error(\n   *            'Expected a string or an URI for ' + propName + ' in ' +\n   *            componentName\n   *          );\n   *        }\n   *      }\n   *    },\n   *    render: function() {...}\n   *  });\n   *\n   * @internal\n   */\n\n  var ANONYMOUS = '<<anonymous>>';\n\n  // Important!\n  // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n  var ReactPropTypes = {\n    array: createPrimitiveTypeChecker('array'),\n    bool: createPrimitiveTypeChecker('boolean'),\n    func: createPrimitiveTypeChecker('function'),\n    number: createPrimitiveTypeChecker('number'),\n    object: createPrimitiveTypeChecker('object'),\n    string: createPrimitiveTypeChecker('string'),\n    symbol: createPrimitiveTypeChecker('symbol'),\n\n    any: createAnyTypeChecker(),\n    arrayOf: createArrayOfTypeChecker,\n    element: createElementTypeChecker(),\n    instanceOf: createInstanceTypeChecker,\n    node: createNodeChecker(),\n    objectOf: createObjectOfTypeChecker,\n    oneOf: createEnumTypeChecker,\n    oneOfType: createUnionTypeChecker,\n    shape: createShapeTypeChecker,\n    exact: createStrictShapeTypeChecker,\n  };\n\n  /**\n   * inlined Object.is polyfill to avoid requiring consumers ship their own\n   * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n   */\n  /*eslint-disable no-self-compare*/\n  function is(x, y) {\n    // SameValue algorithm\n    if (x === y) {\n      // Steps 1-5, 7-10\n      // Steps 6.b-6.e: +0 != -0\n      return x !== 0 || 1 / x === 1 / y;\n    } else {\n      // Step 6.a: NaN == NaN\n      return x !== x && y !== y;\n    }\n  }\n  /*eslint-enable no-self-compare*/\n\n  /**\n   * We use an Error-like object for backward compatibility as people may call\n   * PropTypes directly and inspect their output. However, we don't use real\n   * Errors anymore. We don't inspect their stack anyway, and creating them\n   * is prohibitively expensive if they are created too often, such as what\n   * happens in oneOfType() for any type before the one that matched.\n   */\n  function PropTypeError(message) {\n    this.message = message;\n    this.stack = '';\n  }\n  // Make `instanceof Error` still work for returned errors.\n  PropTypeError.prototype = Error.prototype;\n\n  function createChainableTypeChecker(validate) {\n    if (process.env.NODE_ENV !== 'production') {\n      var manualPropTypeCallCache = {};\n      var manualPropTypeWarningCount = 0;\n    }\n    function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n      componentName = componentName || ANONYMOUS;\n      propFullName = propFullName || propName;\n\n      if (secret !== ReactPropTypesSecret) {\n        if (throwOnDirectAccess) {\n          // New behavior only for users of `prop-types` package\n          invariant(\n            false,\n            'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n            'Use `PropTypes.checkPropTypes()` to call them. ' +\n            'Read more at http://fb.me/use-check-prop-types'\n          );\n        } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n          // Old behavior for people using React.PropTypes\n          var cacheKey = componentName + ':' + propName;\n          if (\n            !manualPropTypeCallCache[cacheKey] &&\n            // Avoid spamming the console because they are often not actionable except for lib authors\n            manualPropTypeWarningCount < 3\n          ) {\n            warning(\n              false,\n              'You are manually calling a React.PropTypes validation ' +\n              'function for the `%s` prop on `%s`. This is deprecated ' +\n              'and will throw in the standalone `prop-types` package. ' +\n              'You may be seeing this warning due to a third-party PropTypes ' +\n              'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',\n              propFullName,\n              componentName\n            );\n            manualPropTypeCallCache[cacheKey] = true;\n            manualPropTypeWarningCount++;\n          }\n        }\n      }\n      if (props[propName] == null) {\n        if (isRequired) {\n          if (props[propName] === null) {\n            return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n          }\n          return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n        }\n        return null;\n      } else {\n        return validate(props, propName, componentName, location, propFullName);\n      }\n    }\n\n    var chainedCheckType = checkType.bind(null, false);\n    chainedCheckType.isRequired = checkType.bind(null, true);\n\n    return chainedCheckType;\n  }\n\n  function createPrimitiveTypeChecker(expectedType) {\n    function validate(props, propName, componentName, location, propFullName, secret) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== expectedType) {\n        // `propValue` being instance of, say, date/regexp, pass the 'object'\n        // check, but we can offer a more precise error message here rather than\n        // 'of type `object`'.\n        var preciseType = getPreciseType(propValue);\n\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createAnyTypeChecker() {\n    return createChainableTypeChecker(emptyFunction.thatReturnsNull);\n  }\n\n  function createArrayOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n      }\n      var propValue = props[propName];\n      if (!Array.isArray(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n      }\n      for (var i = 0; i < propValue.length; i++) {\n        var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n        if (error instanceof Error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createElementTypeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      if (!isValidElement(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createInstanceTypeChecker(expectedClass) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!(props[propName] instanceof expectedClass)) {\n        var expectedClassName = expectedClass.name || ANONYMOUS;\n        var actualClassName = getClassName(props[propName]);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createEnumTypeChecker(expectedValues) {\n    if (!Array.isArray(expectedValues)) {\n      process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;\n      return emptyFunction.thatReturnsNull;\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      for (var i = 0; i < expectedValues.length; i++) {\n        if (is(propValue, expectedValues[i])) {\n          return null;\n        }\n      }\n\n      var valuesString = JSON.stringify(expectedValues);\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createObjectOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n      }\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n      }\n      for (var key in propValue) {\n        if (propValue.hasOwnProperty(key)) {\n          var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n          if (error instanceof Error) {\n            return error;\n          }\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createUnionTypeChecker(arrayOfTypeCheckers) {\n    if (!Array.isArray(arrayOfTypeCheckers)) {\n      process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n      return emptyFunction.thatReturnsNull;\n    }\n\n    for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n      var checker = arrayOfTypeCheckers[i];\n      if (typeof checker !== 'function') {\n        warning(\n          false,\n          'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n          'received %s at index %s.',\n          getPostfixForTypeWarning(checker),\n          i\n        );\n        return emptyFunction.thatReturnsNull;\n      }\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n        var checker = arrayOfTypeCheckers[i];\n        if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n          return null;\n        }\n      }\n\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createNodeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!isNode(props[propName])) {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      for (var key in shapeTypes) {\n        var checker = shapeTypes[key];\n        if (!checker) {\n          continue;\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createStrictShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      // We need to check all keys in case some are required but missing from\n      // props.\n      var allKeys = assign({}, props[propName], shapeTypes);\n      for (var key in allKeys) {\n        var checker = shapeTypes[key];\n        if (!checker) {\n          return new PropTypeError(\n            'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n            '\\nBad object: ' + JSON.stringify(props[propName], null, '  ') +\n            '\\nValid keys: ' +  JSON.stringify(Object.keys(shapeTypes), null, '  ')\n          );\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n\n    return createChainableTypeChecker(validate);\n  }\n\n  function isNode(propValue) {\n    switch (typeof propValue) {\n      case 'number':\n      case 'string':\n      case 'undefined':\n        return true;\n      case 'boolean':\n        return !propValue;\n      case 'object':\n        if (Array.isArray(propValue)) {\n          return propValue.every(isNode);\n        }\n        if (propValue === null || isValidElement(propValue)) {\n          return true;\n        }\n\n        var iteratorFn = getIteratorFn(propValue);\n        if (iteratorFn) {\n          var iterator = iteratorFn.call(propValue);\n          var step;\n          if (iteratorFn !== propValue.entries) {\n            while (!(step = iterator.next()).done) {\n              if (!isNode(step.value)) {\n                return false;\n              }\n            }\n          } else {\n            // Iterator will provide entry [k,v] tuples rather than values.\n            while (!(step = iterator.next()).done) {\n              var entry = step.value;\n              if (entry) {\n                if (!isNode(entry[1])) {\n                  return false;\n                }\n              }\n            }\n          }\n        } else {\n          return false;\n        }\n\n        return true;\n      default:\n        return false;\n    }\n  }\n\n  function isSymbol(propType, propValue) {\n    // Native Symbol.\n    if (propType === 'symbol') {\n      return true;\n    }\n\n    // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n    if (propValue['@@toStringTag'] === 'Symbol') {\n      return true;\n    }\n\n    // Fallback for non-spec compliant Symbols which are polyfilled.\n    if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n      return true;\n    }\n\n    return false;\n  }\n\n  // Equivalent of `typeof` but with special handling for array and regexp.\n  function getPropType(propValue) {\n    var propType = typeof propValue;\n    if (Array.isArray(propValue)) {\n      return 'array';\n    }\n    if (propValue instanceof RegExp) {\n      // Old webkits (at least until Android 4.0) return 'function' rather than\n      // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n      // passes PropTypes.object.\n      return 'object';\n    }\n    if (isSymbol(propType, propValue)) {\n      return 'symbol';\n    }\n    return propType;\n  }\n\n  // This handles more types than `getPropType`. Only used for error messages.\n  // See `createPrimitiveTypeChecker`.\n  function getPreciseType(propValue) {\n    if (typeof propValue === 'undefined' || propValue === null) {\n      return '' + propValue;\n    }\n    var propType = getPropType(propValue);\n    if (propType === 'object') {\n      if (propValue instanceof Date) {\n        return 'date';\n      } else if (propValue instanceof RegExp) {\n        return 'regexp';\n      }\n    }\n    return propType;\n  }\n\n  // Returns a string that is postfixed to a warning about an invalid type.\n  // For example, \"undefined\" or \"of type array\"\n  function getPostfixForTypeWarning(value) {\n    var type = getPreciseType(value);\n    switch (type) {\n      case 'array':\n      case 'object':\n        return 'an ' + type;\n      case 'boolean':\n      case 'date':\n      case 'regexp':\n        return 'a ' + type;\n      default:\n        return type;\n    }\n  }\n\n  // Returns class name of the object, if any.\n  function getClassName(propValue) {\n    if (!propValue.constructor || !propValue.constructor.name) {\n      return ANONYMOUS;\n    }\n    return propValue.constructor.name;\n  }\n\n  ReactPropTypes.checkPropTypes = checkPropTypes;\n  ReactPropTypes.PropTypes = ReactPropTypes;\n\n  return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n  var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n    Symbol.for &&\n    Symbol.for('react.element')) ||\n    0xeac7;\n\n  var isValidElement = function(object) {\n    return typeof object === 'object' &&\n      object !== null &&\n      object.$$typeof === REACT_ELEMENT_TYPE;\n  };\n\n  // By explicitly using `prop-types` you are opting into new development behavior.\n  // http://fb.me/prop-types-in-prod\n  var throwOnDirectAccess = true;\n  module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n  // By explicitly using `prop-types` you are opting into new production behavior.\n  // http://fb.me/prop-types-in-prod\n  module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { createMemoryHistory as createHistory } from \"history\";\nimport Router from \"./Router\";\n\n/**\n * The public API for a <Router> that stores location in memory.\n */\n\nvar MemoryRouter = function (_React$Component) {\n  _inherits(MemoryRouter, _React$Component);\n\n  function MemoryRouter() {\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, MemoryRouter);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = createHistory(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  MemoryRouter.prototype.componentWillMount = function componentWillMount() {\n    warning(!this.props.history, \"<MemoryRouter> ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { MemoryRouter as Router }`.\");\n  };\n\n  MemoryRouter.prototype.render = function render() {\n    return React.createElement(Router, { history: this.history, children: this.props.children });\n  };\n\n  return MemoryRouter;\n}(React.Component);\n\nMemoryRouter.propTypes = {\n  initialEntries: PropTypes.array,\n  initialIndex: PropTypes.number,\n  getUserConfirmation: PropTypes.func,\n  keyLength: PropTypes.number,\n  children: PropTypes.node\n};\n\n\nexport default MemoryRouter;","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport invariant from \"invariant\";\n\n/**\n * The public API for prompting the user before navigating away\n * from a screen with a component.\n */\n\nvar Prompt = function (_React$Component) {\n  _inherits(Prompt, _React$Component);\n\n  function Prompt() {\n    _classCallCheck(this, Prompt);\n\n    return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n  }\n\n  Prompt.prototype.enable = function enable(message) {\n    if (this.unblock) this.unblock();\n\n    this.unblock = this.context.router.history.block(message);\n  };\n\n  Prompt.prototype.disable = function disable() {\n    if (this.unblock) {\n      this.unblock();\n      this.unblock = null;\n    }\n  };\n\n  Prompt.prototype.componentWillMount = function componentWillMount() {\n    invariant(this.context.router, \"You should not use <Prompt> outside a <Router>\");\n\n    if (this.props.when) this.enable(this.props.message);\n  };\n\n  Prompt.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n    if (nextProps.when) {\n      if (!this.props.when || this.props.message !== nextProps.message) this.enable(nextProps.message);\n    } else {\n      this.disable();\n    }\n  };\n\n  Prompt.prototype.componentWillUnmount = function componentWillUnmount() {\n    this.disable();\n  };\n\n  Prompt.prototype.render = function render() {\n    return null;\n  };\n\n  return Prompt;\n}(React.Component);\n\nPrompt.propTypes = {\n  when: PropTypes.bool,\n  message: PropTypes.oneOfType([PropTypes.func, PropTypes.string]).isRequired\n};\nPrompt.defaultProps = {\n  when: true\n};\nPrompt.contextTypes = {\n  router: PropTypes.shape({\n    history: PropTypes.shape({\n      block: PropTypes.func.isRequired\n    }).isRequired\n  }).isRequired\n};\n\n\nexport default Prompt;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport { createLocation, locationsAreEqual } from \"history\";\nimport generatePath from \"./generatePath\";\n\n/**\n * The public API for updating the location programmatically\n * with a component.\n */\n\nvar Redirect = function (_React$Component) {\n  _inherits(Redirect, _React$Component);\n\n  function Redirect() {\n    _classCallCheck(this, Redirect);\n\n    return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n  }\n\n  Redirect.prototype.isStatic = function isStatic() {\n    return this.context.router && this.context.router.staticContext;\n  };\n\n  Redirect.prototype.componentWillMount = function componentWillMount() {\n    invariant(this.context.router, \"You should not use <Redirect> outside a <Router>\");\n\n    if (this.isStatic()) this.perform();\n  };\n\n  Redirect.prototype.componentDidMount = function componentDidMount() {\n    if (!this.isStatic()) this.perform();\n  };\n\n  Redirect.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {\n    var prevTo = createLocation(prevProps.to);\n    var nextTo = createLocation(this.props.to);\n\n    if (locationsAreEqual(prevTo, nextTo)) {\n      warning(false, \"You tried to redirect to the same route you're currently on: \" + (\"\\\"\" + nextTo.pathname + nextTo.search + \"\\\"\"));\n      return;\n    }\n\n    this.perform();\n  };\n\n  Redirect.prototype.computeTo = function computeTo(_ref) {\n    var computedMatch = _ref.computedMatch,\n        to = _ref.to;\n\n    if (computedMatch) {\n      if (typeof to === \"string\") {\n        return generatePath(to, computedMatch.params);\n      } else {\n        return _extends({}, to, {\n          pathname: generatePath(to.pathname, computedMatch.params)\n        });\n      }\n    }\n\n    return to;\n  };\n\n  Redirect.prototype.perform = function perform() {\n    var history = this.context.router.history;\n    var push = this.props.push;\n\n    var to = this.computeTo(this.props);\n\n    if (push) {\n      history.push(to);\n    } else {\n      history.replace(to);\n    }\n  };\n\n  Redirect.prototype.render = function render() {\n    return null;\n  };\n\n  return Redirect;\n}(React.Component);\n\nRedirect.propTypes = {\n  computedMatch: PropTypes.object, // private, from <Switch>\n  push: PropTypes.bool,\n  from: PropTypes.string,\n  to: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired\n};\nRedirect.defaultProps = {\n  push: false\n};\nRedirect.contextTypes = {\n  router: PropTypes.shape({\n    history: PropTypes.shape({\n      push: PropTypes.func.isRequired,\n      replace: PropTypes.func.isRequired\n    }).isRequired,\n    staticContext: PropTypes.object\n  }).isRequired\n};\n\n\nexport default Redirect;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport matchPath from \"./matchPath\";\n\nvar isEmptyChildren = function isEmptyChildren(children) {\n  return React.Children.count(children) === 0;\n};\n\n/**\n * The public API for matching a single path and rendering.\n */\n\nvar Route = function (_React$Component) {\n  _inherits(Route, _React$Component);\n\n  function Route() {\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, Route);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n      match: _this.computeMatch(_this.props, _this.context.router)\n    }, _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  Route.prototype.getChildContext = function getChildContext() {\n    return {\n      router: _extends({}, this.context.router, {\n        route: {\n          location: this.props.location || this.context.router.route.location,\n          match: this.state.match\n        }\n      })\n    };\n  };\n\n  Route.prototype.computeMatch = function computeMatch(_ref, router) {\n    var computedMatch = _ref.computedMatch,\n        location = _ref.location,\n        path = _ref.path,\n        strict = _ref.strict,\n        exact = _ref.exact,\n        sensitive = _ref.sensitive;\n\n    if (computedMatch) return computedMatch; // <Switch> already computed the match for us\n\n    invariant(router, \"You should not use <Route> or withRouter() outside a <Router>\");\n\n    var route = router.route;\n\n    var pathname = (location || route.location).pathname;\n\n    return matchPath(pathname, { path: path, strict: strict, exact: exact, sensitive: sensitive }, route.match);\n  };\n\n  Route.prototype.componentWillMount = function componentWillMount() {\n    warning(!(this.props.component && this.props.render), \"You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored\");\n\n    warning(!(this.props.component && this.props.children && !isEmptyChildren(this.props.children)), \"You should not use <Route component> and <Route children> in the same route; <Route children> will be ignored\");\n\n    warning(!(this.props.render && this.props.children && !isEmptyChildren(this.props.children)), \"You should not use <Route render> and <Route children> in the same route; <Route children> will be ignored\");\n  };\n\n  Route.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps, nextContext) {\n    warning(!(nextProps.location && !this.props.location), '<Route> elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.');\n\n    warning(!(!nextProps.location && this.props.location), '<Route> elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.');\n\n    this.setState({\n      match: this.computeMatch(nextProps, nextContext.router)\n    });\n  };\n\n  Route.prototype.render = function render() {\n    var match = this.state.match;\n    var _props = this.props,\n        children = _props.children,\n        component = _props.component,\n        render = _props.render;\n    var _context$router = this.context.router,\n        history = _context$router.history,\n        route = _context$router.route,\n        staticContext = _context$router.staticContext;\n\n    var location = this.props.location || route.location;\n    var props = { match: match, location: location, history: history, staticContext: staticContext };\n\n    if (component) return match ? React.createElement(component, props) : null;\n\n    if (render) return match ? render(props) : null;\n\n    if (typeof children === \"function\") return children(props);\n\n    if (children && !isEmptyChildren(children)) return React.Children.only(children);\n\n    return null;\n  };\n\n  return Route;\n}(React.Component);\n\nRoute.propTypes = {\n  computedMatch: PropTypes.object, // private, from <Switch>\n  path: PropTypes.string,\n  exact: PropTypes.bool,\n  strict: PropTypes.bool,\n  sensitive: PropTypes.bool,\n  component: PropTypes.func,\n  render: PropTypes.func,\n  children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),\n  location: PropTypes.object\n};\nRoute.contextTypes = {\n  router: PropTypes.shape({\n    history: PropTypes.object.isRequired,\n    route: PropTypes.object.isRequired,\n    staticContext: PropTypes.object\n  })\n};\nRoute.childContextTypes = {\n  router: PropTypes.object.isRequired\n};\n\n\nexport default Route;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\n\n/**\n * The public API for putting history on context.\n */\n\nvar Router = function (_React$Component) {\n  _inherits(Router, _React$Component);\n\n  function Router() {\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, Router);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n      match: _this.computeMatch(_this.props.history.location.pathname)\n    }, _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  Router.prototype.getChildContext = function getChildContext() {\n    return {\n      router: _extends({}, this.context.router, {\n        history: this.props.history,\n        route: {\n          location: this.props.history.location,\n          match: this.state.match\n        }\n      })\n    };\n  };\n\n  Router.prototype.computeMatch = function computeMatch(pathname) {\n    return {\n      path: \"/\",\n      url: \"/\",\n      params: {},\n      isExact: pathname === \"/\"\n    };\n  };\n\n  Router.prototype.componentWillMount = function componentWillMount() {\n    var _this2 = this;\n\n    var _props = this.props,\n        children = _props.children,\n        history = _props.history;\n\n\n    invariant(children == null || React.Children.count(children) === 1, \"A <Router> may have only one child element\");\n\n    // Do this here so we can setState when a <Redirect> changes the\n    // location in componentWillMount. This happens e.g. when doing\n    // server rendering using a <StaticRouter>.\n    this.unlisten = history.listen(function () {\n      _this2.setState({\n        match: _this2.computeMatch(history.location.pathname)\n      });\n    });\n  };\n\n  Router.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n    warning(this.props.history === nextProps.history, \"You cannot change <Router history>\");\n  };\n\n  Router.prototype.componentWillUnmount = function componentWillUnmount() {\n    this.unlisten();\n  };\n\n  Router.prototype.render = function render() {\n    var children = this.props.children;\n\n    return children ? React.Children.only(children) : null;\n  };\n\n  return Router;\n}(React.Component);\n\nRouter.propTypes = {\n  history: PropTypes.object.isRequired,\n  children: PropTypes.node\n};\nRouter.contextTypes = {\n  router: PropTypes.object\n};\nRouter.childContextTypes = {\n  router: PropTypes.object.isRequired\n};\n\n\nexport default Router;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { createLocation, createPath } from \"history\";\nimport Router from \"./Router\";\n\nvar addLeadingSlash = function addLeadingSlash(path) {\n  return path.charAt(0) === \"/\" ? path : \"/\" + path;\n};\n\nvar addBasename = function addBasename(basename, location) {\n  if (!basename) return location;\n\n  return _extends({}, location, {\n    pathname: addLeadingSlash(basename) + location.pathname\n  });\n};\n\nvar stripBasename = function stripBasename(basename, location) {\n  if (!basename) return location;\n\n  var base = addLeadingSlash(basename);\n\n  if (location.pathname.indexOf(base) !== 0) return location;\n\n  return _extends({}, location, {\n    pathname: location.pathname.substr(base.length)\n  });\n};\n\nvar createURL = function createURL(location) {\n  return typeof location === \"string\" ? location : createPath(location);\n};\n\nvar staticHandler = function staticHandler(methodName) {\n  return function () {\n    invariant(false, \"You cannot %s with <StaticRouter>\", methodName);\n  };\n};\n\nvar noop = function noop() {};\n\n/**\n * The public top-level API for a \"static\" <Router>, so-called because it\n * can't actually change the current location. Instead, it just records\n * location changes in a context object. Useful mainly in testing and\n * server-rendering scenarios.\n */\n\nvar StaticRouter = function (_React$Component) {\n  _inherits(StaticRouter, _React$Component);\n\n  function StaticRouter() {\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, StaticRouter);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.createHref = function (path) {\n      return addLeadingSlash(_this.props.basename + createURL(path));\n    }, _this.handlePush = function (location) {\n      var _this$props = _this.props,\n          basename = _this$props.basename,\n          context = _this$props.context;\n\n      context.action = \"PUSH\";\n      context.location = addBasename(basename, createLocation(location));\n      context.url = createURL(context.location);\n    }, _this.handleReplace = function (location) {\n      var _this$props2 = _this.props,\n          basename = _this$props2.basename,\n          context = _this$props2.context;\n\n      context.action = \"REPLACE\";\n      context.location = addBasename(basename, createLocation(location));\n      context.url = createURL(context.location);\n    }, _this.handleListen = function () {\n      return noop;\n    }, _this.handleBlock = function () {\n      return noop;\n    }, _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  StaticRouter.prototype.getChildContext = function getChildContext() {\n    return {\n      router: {\n        staticContext: this.props.context\n      }\n    };\n  };\n\n  StaticRouter.prototype.componentWillMount = function componentWillMount() {\n    warning(!this.props.history, \"<StaticRouter> ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { StaticRouter as Router }`.\");\n  };\n\n  StaticRouter.prototype.render = function render() {\n    var _props = this.props,\n        basename = _props.basename,\n        context = _props.context,\n        location = _props.location,\n        props = _objectWithoutProperties(_props, [\"basename\", \"context\", \"location\"]);\n\n    var history = {\n      createHref: this.createHref,\n      action: \"POP\",\n      location: stripBasename(basename, createLocation(location)),\n      push: this.handlePush,\n      replace: this.handleReplace,\n      go: staticHandler(\"go\"),\n      goBack: staticHandler(\"goBack\"),\n      goForward: staticHandler(\"goForward\"),\n      listen: this.handleListen,\n      block: this.handleBlock\n    };\n\n    return React.createElement(Router, _extends({}, props, { history: history }));\n  };\n\n  return StaticRouter;\n}(React.Component);\n\nStaticRouter.propTypes = {\n  basename: PropTypes.string,\n  context: PropTypes.object.isRequired,\n  location: PropTypes.oneOfType([PropTypes.string, PropTypes.object])\n};\nStaticRouter.defaultProps = {\n  basename: \"\",\n  location: \"/\"\n};\nStaticRouter.childContextTypes = {\n  router: PropTypes.object.isRequired\n};\n\n\nexport default StaticRouter;","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport matchPath from \"./matchPath\";\n\n/**\n * The public API for rendering the first <Route> that matches.\n */\n\nvar Switch = function (_React$Component) {\n  _inherits(Switch, _React$Component);\n\n  function Switch() {\n    _classCallCheck(this, Switch);\n\n    return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n  }\n\n  Switch.prototype.componentWillMount = function componentWillMount() {\n    invariant(this.context.router, \"You should not use <Switch> outside a <Router>\");\n  };\n\n  Switch.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n    warning(!(nextProps.location && !this.props.location), '<Switch> elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.');\n\n    warning(!(!nextProps.location && this.props.location), '<Switch> elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.');\n  };\n\n  Switch.prototype.render = function render() {\n    var route = this.context.router.route;\n    var children = this.props.children;\n\n    var location = this.props.location || route.location;\n\n    var match = void 0,\n        child = void 0;\n    React.Children.forEach(children, function (element) {\n      if (match == null && React.isValidElement(element)) {\n        var _element$props = element.props,\n            pathProp = _element$props.path,\n            exact = _element$props.exact,\n            strict = _element$props.strict,\n            sensitive = _element$props.sensitive,\n            from = _element$props.from;\n\n        var path = pathProp || from;\n\n        child = element;\n        match = matchPath(location.pathname, { path: path, exact: exact, strict: strict, sensitive: sensitive }, route.match);\n      }\n    });\n\n    return match ? React.cloneElement(child, { location: location, computedMatch: match }) : null;\n  };\n\n  return Switch;\n}(React.Component);\n\nSwitch.contextTypes = {\n  router: PropTypes.shape({\n    route: PropTypes.object.isRequired\n  }).isRequired\n};\nSwitch.propTypes = {\n  children: PropTypes.node,\n  location: PropTypes.object\n};\n\n\nexport default Switch;","import pathToRegexp from \"path-to-regexp\";\n\nvar patternCache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\n\nvar compileGenerator = function compileGenerator(pattern) {\n  var cacheKey = pattern;\n  var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});\n\n  if (cache[pattern]) return cache[pattern];\n\n  var compiledGenerator = pathToRegexp.compile(pattern);\n\n  if (cacheCount < cacheLimit) {\n    cache[pattern] = compiledGenerator;\n    cacheCount++;\n  }\n\n  return compiledGenerator;\n};\n\n/**\n * Public API for generating a URL pathname from a pattern and parameters.\n */\nvar generatePath = function generatePath() {\n  var pattern = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n  var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n  if (pattern === \"/\") {\n    return pattern;\n  }\n  var generator = compileGenerator(pattern);\n  return generator(params, { pretty: true });\n};\n\nexport default generatePath;","import pathToRegexp from \"path-to-regexp\";\n\nvar patternCache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\n\nvar compilePath = function compilePath(pattern, options) {\n  var cacheKey = \"\" + options.end + options.strict + options.sensitive;\n  var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});\n\n  if (cache[pattern]) return cache[pattern];\n\n  var keys = [];\n  var re = pathToRegexp(pattern, keys, options);\n  var compiledPattern = { re: re, keys: keys };\n\n  if (cacheCount < cacheLimit) {\n    cache[pattern] = compiledPattern;\n    cacheCount++;\n  }\n\n  return compiledPattern;\n};\n\n/**\n * Public API for matching a URL pathname to a path pattern.\n */\nvar matchPath = function matchPath(pathname) {\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  var parent = arguments[2];\n\n  if (typeof options === \"string\") options = { path: options };\n\n  var _options = options,\n      path = _options.path,\n      _options$exact = _options.exact,\n      exact = _options$exact === undefined ? false : _options$exact,\n      _options$strict = _options.strict,\n      strict = _options$strict === undefined ? false : _options$strict,\n      _options$sensitive = _options.sensitive,\n      sensitive = _options$sensitive === undefined ? false : _options$sensitive;\n\n\n  if (path == null) return parent;\n\n  var _compilePath = compilePath(path, { end: exact, strict: strict, sensitive: sensitive }),\n      re = _compilePath.re,\n      keys = _compilePath.keys;\n\n  var match = re.exec(pathname);\n\n  if (!match) return null;\n\n  var url = match[0],\n      values = match.slice(1);\n\n  var isExact = pathname === url;\n\n  if (exact && !isExact) return null;\n\n  return {\n    path: path, // the path pattern used to match\n    url: path === \"/\" && url === \"\" ? \"/\" : url, // the matched portion of the URL\n    isExact: isExact, // whether or not we matched exactly\n    params: keys.reduce(function (memo, key, index) {\n      memo[key.name] = values[index];\n      return memo;\n    }, {})\n  };\n};\n\nexport default matchPath;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport hoistStatics from \"hoist-non-react-statics\";\nimport Route from \"./Route\";\n\n/**\n * A public higher-order component to access the imperative API\n */\nvar withRouter = function withRouter(Component) {\n  var C = function C(props) {\n    var wrappedComponentRef = props.wrappedComponentRef,\n        remainingProps = _objectWithoutProperties(props, [\"wrappedComponentRef\"]);\n\n    return React.createElement(Route, {\n      children: function children(routeComponentProps) {\n        return React.createElement(Component, _extends({}, remainingProps, routeComponentProps, {\n          ref: wrappedComponentRef\n        }));\n      }\n    });\n  };\n\n  C.displayName = \"withRouter(\" + (Component.displayName || Component.name) + \")\";\n  C.WrappedComponent = Component;\n  C.propTypes = {\n    wrappedComponentRef: PropTypes.func\n  };\n\n  return hoistStatics(C, Component);\n};\n\nexport default withRouter;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @providesModule warning\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n  var printWarning = function printWarning(format, args) {\n    var len = arguments.length;\n    args = new Array(len > 2 ? len - 2 : 0);\n    for (var key = 2; key < len; key++) {\n      args[key - 2] = arguments[key];\n    }\n    var argIndex = 0;\n    var message = 'Warning: ' +\n      format.replace(/%s/g, function() {\n        return args[argIndex++];\n      });\n    if (typeof console !== 'undefined') {\n      console.error(message);\n    }\n    try {\n      // --- Welcome to debugging React ---\n      // This error was thrown as a convenience so that you can use this stack\n      // to find the callsite that caused this warning to fire.\n      throw new Error(message);\n    } catch (x) {}\n  }\n\n  warning = function(condition, format, args) {\n    var len = arguments.length;\n    args = new Array(len > 2 ? len - 2 : 0);\n    for (var key = 2; key < len; key++) {\n      args[key - 2] = arguments[key];\n    }\n    if (format === undefined) {\n      throw new Error(\n          '`warning(condition, format, ...args)` requires a warning ' +\n          'message argument'\n      );\n    }\n    if (!condition) {\n      printWarning.apply(null, [format].concat(args));\n    }\n  };\n}\n\nmodule.exports = warning;\n","function isAbsolute(pathname) {\n  return pathname.charAt(0) === '/';\n}\n\n// About 1.5x faster than the two-arg version of Array#splice()\nfunction spliceOne(list, index) {\n  for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n    list[i] = list[k];\n  }\n\n  list.pop();\n}\n\n// This implementation is based heavily on node's url.parse\nfunction resolvePathname(to) {\n  var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n  var toParts = to && to.split('/') || [];\n  var fromParts = from && from.split('/') || [];\n\n  var isToAbs = to && isAbsolute(to);\n  var isFromAbs = from && isAbsolute(from);\n  var mustEndAbs = isToAbs || isFromAbs;\n\n  if (to && isAbsolute(to)) {\n    // to is absolute\n    fromParts = toParts;\n  } else if (toParts.length) {\n    // to is relative, drop the filename\n    fromParts.pop();\n    fromParts = fromParts.concat(toParts);\n  }\n\n  if (!fromParts.length) return '/';\n\n  var hasTrailingSlash = void 0;\n  if (fromParts.length) {\n    var last = fromParts[fromParts.length - 1];\n    hasTrailingSlash = last === '.' || last === '..' || last === '';\n  } else {\n    hasTrailingSlash = false;\n  }\n\n  var up = 0;\n  for (var i = fromParts.length; i >= 0; i--) {\n    var part = fromParts[i];\n\n    if (part === '.') {\n      spliceOne(fromParts, i);\n    } else if (part === '..') {\n      spliceOne(fromParts, i);\n      up++;\n    } else if (up) {\n      spliceOne(fromParts, i);\n      up--;\n    }\n  }\n\n  if (!mustEndAbs) for (; up--; up) {\n    fromParts.unshift('..');\n  }if (mustEndAbs && fromParts[0] !== '' && (!fromParts[0] || !isAbsolute(fromParts[0]))) fromParts.unshift('');\n\n  var result = fromParts.join('/');\n\n  if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n\n  return result;\n}\n\nexport default resolvePathname;","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction valueEqual(a, b) {\n  if (a === b) return true;\n\n  if (a == null || b == null) return false;\n\n  if (Array.isArray(a)) {\n    return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {\n      return valueEqual(item, b[index]);\n    });\n  }\n\n  var aType = typeof a === 'undefined' ? 'undefined' : _typeof(a);\n  var bType = typeof b === 'undefined' ? 'undefined' : _typeof(b);\n\n  if (aType !== bType) return false;\n\n  if (aType === 'object') {\n    var aValue = a.valueOf();\n    var bValue = b.valueOf();\n\n    if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);\n\n    var aKeys = Object.keys(a);\n    var bKeys = Object.keys(b);\n\n    if (aKeys.length !== bKeys.length) return false;\n\n    return aKeys.every(function (key) {\n      return valueEqual(a[key], b[key]);\n    });\n  }\n\n  return false;\n}\n\nexport default valueEqual;","/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n  warning = function(condition, format, args) {\n    var len = arguments.length;\n    args = new Array(len > 2 ? len - 2 : 0);\n    for (var key = 2; key < len; key++) {\n      args[key - 2] = arguments[key];\n    }\n    if (format === undefined) {\n      throw new Error(\n        '`warning(condition, format, ...args)` requires a warning ' +\n        'message argument'\n      );\n    }\n\n    if (format.length < 10 || (/^[s\\W]*$/).test(format)) {\n      throw new Error(\n        'The warning format should be able to uniquely identify this ' +\n        'warning. Please, use a more descriptive format than: ' + format\n      );\n    }\n\n    if (!condition) {\n      var argIndex = 0;\n      var message = 'Warning: ' +\n        format.replace(/%s/g, function() {\n          return args[argIndex++];\n        });\n      if (typeof console !== 'undefined') {\n        console.error(message);\n      }\n      try {\n        // This error was thrown as a convenience so that you can use this stack\n        // to find the callsite that caused this warning to fire.\n        throw new Error(message);\n      } catch(x) {}\n    }\n  };\n}\n\nmodule.exports = warning;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n/**\n * This action type will be dispatched by the history actions below.\n * If you're writing a middleware to watch for navigation events, be sure to\n * look for actions of this type.\n */\nvar CALL_HISTORY_METHOD = exports.CALL_HISTORY_METHOD = '@@router/CALL_HISTORY_METHOD';\n\nfunction updateLocation(method) {\n  return function () {\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return {\n      type: CALL_HISTORY_METHOD,\n      payload: { method: method, args: args }\n    };\n  };\n}\n\n/**\n * These actions correspond to the history API.\n * The associated routerMiddleware will capture these events before they get to\n * your reducer and reissue them as the matching function on your history.\n */\nvar push = exports.push = updateLocation('push');\nvar replace = exports.replace = updateLocation('replace');\nvar go = exports.go = updateLocation('go');\nvar goBack = exports.goBack = updateLocation('goBack');\nvar goForward = exports.goForward = updateLocation('goForward');\n\nvar routerActions = exports.routerActions = { push: push, replace: replace, go: go, goBack: goBack, goForward: goForward };","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.routerMiddleware = exports.routerActions = exports.goForward = exports.goBack = exports.go = exports.replace = exports.push = exports.CALL_HISTORY_METHOD = exports.routerReducer = exports.LOCATION_CHANGE = exports.syncHistoryWithStore = undefined;\n\nvar _reducer = require('./reducer');\n\nObject.defineProperty(exports, 'LOCATION_CHANGE', {\n  enumerable: true,\n  get: function get() {\n    return _reducer.LOCATION_CHANGE;\n  }\n});\nObject.defineProperty(exports, 'routerReducer', {\n  enumerable: true,\n  get: function get() {\n    return _reducer.routerReducer;\n  }\n});\n\nvar _actions = require('./actions');\n\nObject.defineProperty(exports, 'CALL_HISTORY_METHOD', {\n  enumerable: true,\n  get: function get() {\n    return _actions.CALL_HISTORY_METHOD;\n  }\n});\nObject.defineProperty(exports, 'push', {\n  enumerable: true,\n  get: function get() {\n    return _actions.push;\n  }\n});\nObject.defineProperty(exports, 'replace', {\n  enumerable: true,\n  get: function get() {\n    return _actions.replace;\n  }\n});\nObject.defineProperty(exports, 'go', {\n  enumerable: true,\n  get: function get() {\n    return _actions.go;\n  }\n});\nObject.defineProperty(exports, 'goBack', {\n  enumerable: true,\n  get: function get() {\n    return _actions.goBack;\n  }\n});\nObject.defineProperty(exports, 'goForward', {\n  enumerable: true,\n  get: function get() {\n    return _actions.goForward;\n  }\n});\nObject.defineProperty(exports, 'routerActions', {\n  enumerable: true,\n  get: function get() {\n    return _actions.routerActions;\n  }\n});\n\nvar _sync = require('./sync');\n\nvar _sync2 = _interopRequireDefault(_sync);\n\nvar _middleware = require('./middleware');\n\nvar _middleware2 = _interopRequireDefault(_middleware);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nexports.syncHistoryWithStore = _sync2['default'];\nexports.routerMiddleware = _middleware2['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports['default'] = routerMiddleware;\n\nvar _actions = require('./actions');\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n/**\n * This middleware captures CALL_HISTORY_METHOD actions to redirect to the\n * provided history object. This will prevent these actions from reaching your\n * reducer or any middleware that comes after this one.\n */\nfunction routerMiddleware(history) {\n  return function () {\n    return function (next) {\n      return function (action) {\n        if (action.type !== _actions.CALL_HISTORY_METHOD) {\n          return next(action);\n        }\n\n        var _action$payload = action.payload,\n            method = _action$payload.method,\n            args = _action$payload.args;\n\n        history[method].apply(history, _toConsumableArray(args));\n      };\n    };\n  };\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nexports.routerReducer = routerReducer;\n/**\n * This action type will be dispatched when your history\n * receives a location change.\n */\nvar LOCATION_CHANGE = exports.LOCATION_CHANGE = '@@router/LOCATION_CHANGE';\n\nvar initialState = {\n  locationBeforeTransitions: null\n};\n\n/**\n * This reducer will update the state with the most recent location history\n * has transitioned to. This may not be in sync with the router, particularly\n * if you have asynchronously-loaded routes, so reading from and relying on\n * this state is discouraged.\n */\nfunction routerReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n\n  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n      type = _ref.type,\n      payload = _ref.payload;\n\n  if (type === LOCATION_CHANGE) {\n    return _extends({}, state, { locationBeforeTransitions: payload });\n  }\n\n  return state;\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nexports['default'] = syncHistoryWithStore;\n\nvar _reducer = require('./reducer');\n\nvar defaultSelectLocationState = function defaultSelectLocationState(state) {\n  return state.routing;\n};\n\n/**\n * This function synchronizes your history state with the Redux store.\n * Location changes flow from history to the store. An enhanced history is\n * returned with a listen method that responds to store updates for location.\n *\n * When this history is provided to the router, this means the location data\n * will flow like this:\n * history.push -> store.dispatch -> enhancedHistory.listen -> router\n * This ensures that when the store state changes due to a replay or other\n * event, the router will be updated appropriately and can transition to the\n * correct router state.\n */\nfunction syncHistoryWithStore(history, store) {\n  var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n      _ref$selectLocationSt = _ref.selectLocationState,\n      selectLocationState = _ref$selectLocationSt === undefined ? defaultSelectLocationState : _ref$selectLocationSt,\n      _ref$adjustUrlOnRepla = _ref.adjustUrlOnReplay,\n      adjustUrlOnReplay = _ref$adjustUrlOnRepla === undefined ? true : _ref$adjustUrlOnRepla;\n\n  // Ensure that the reducer is mounted on the store and functioning properly.\n  if (typeof selectLocationState(store.getState()) === 'undefined') {\n    throw new Error('Expected the routing state to be available either as `state.routing` ' + 'or as the custom expression you can specify as `selectLocationState` ' + 'in the `syncHistoryWithStore()` options. ' + 'Ensure you have added the `routerReducer` to your store\\'s ' + 'reducers via `combineReducers` or whatever method you use to isolate ' + 'your reducers.');\n  }\n\n  var initialLocation = void 0;\n  var isTimeTraveling = void 0;\n  var unsubscribeFromStore = void 0;\n  var unsubscribeFromHistory = void 0;\n  var currentLocation = void 0;\n\n  // What does the store say about current location?\n  var getLocationInStore = function getLocationInStore(useInitialIfEmpty) {\n    var locationState = selectLocationState(store.getState());\n    return locationState.locationBeforeTransitions || (useInitialIfEmpty ? initialLocation : undefined);\n  };\n\n  // Init initialLocation with potential location in store\n  initialLocation = getLocationInStore();\n\n  // If the store is replayed, update the URL in the browser to match.\n  if (adjustUrlOnReplay) {\n    var handleStoreChange = function handleStoreChange() {\n      var locationInStore = getLocationInStore(true);\n      if (currentLocation === locationInStore || initialLocation === locationInStore) {\n        return;\n      }\n\n      // Update address bar to reflect store state\n      isTimeTraveling = true;\n      currentLocation = locationInStore;\n      history.transitionTo(_extends({}, locationInStore, {\n        action: 'PUSH'\n      }));\n      isTimeTraveling = false;\n    };\n\n    unsubscribeFromStore = store.subscribe(handleStoreChange);\n    handleStoreChange();\n  }\n\n  // Whenever location changes, dispatch an action to get it in the store\n  var handleLocationChange = function handleLocationChange(location) {\n    // ... unless we just caused that location change\n    if (isTimeTraveling) {\n      return;\n    }\n\n    // Remember where we are\n    currentLocation = location;\n\n    // Are we being called for the first time?\n    if (!initialLocation) {\n      // Remember as a fallback in case state is reset\n      initialLocation = location;\n\n      // Respect persisted location, if any\n      if (getLocationInStore()) {\n        return;\n      }\n    }\n\n    // Tell the store to update by dispatching an action\n    store.dispatch({\n      type: _reducer.LOCATION_CHANGE,\n      payload: location\n    });\n  };\n  unsubscribeFromHistory = history.listen(handleLocationChange);\n\n  // History 3.x doesn't call listen synchronously, so fire the initial location change ourselves\n  if (history.getCurrentLocation) {\n    handleLocationChange(history.getCurrentLocation());\n  }\n\n  // The enhanced history uses store as source of truth\n  return _extends({}, history, {\n    // The listeners are subscribed to the store instead of history\n    listen: function listen(listener) {\n      // Copy of last location.\n      var lastPublishedLocation = getLocationInStore(true);\n\n      // Keep track of whether we unsubscribed, as Redux store\n      // only applies changes in subscriptions on next dispatch\n      var unsubscribed = false;\n      var unsubscribeFromStore = store.subscribe(function () {\n        var currentLocation = getLocationInStore(true);\n        if (currentLocation === lastPublishedLocation) {\n          return;\n        }\n        lastPublishedLocation = currentLocation;\n        if (!unsubscribed) {\n          listener(lastPublishedLocation);\n        }\n      });\n\n      // History 2.x listeners expect a synchronous call. Make the first call to the\n      // listener after subscribing to the store, in case the listener causes a\n      // location change (e.g. when it redirects)\n      if (!history.getCurrentLocation) {\n        listener(lastPublishedLocation);\n      }\n\n      // Let user unsubscribe later\n      return function () {\n        unsubscribed = true;\n        unsubscribeFromStore();\n      };\n    },\n\n\n    // It also provides a way to destroy internal listeners\n    unsubscribe: function unsubscribe() {\n      if (adjustUrlOnReplay) {\n        unsubscribeFromStore();\n      }\n      unsubscribeFromHistory();\n    }\n  });\n}","'use strict';\n\nexports.__esModule = true;\nfunction createThunkMiddleware(extraArgument) {\n  return function (_ref) {\n    var dispatch = _ref.dispatch,\n        getState = _ref.getState;\n    return function (next) {\n      return function (action) {\n        if (typeof action === 'function') {\n          return action(dispatch, getState, extraArgument);\n        }\n\n        return next(action);\n      };\n    };\n  };\n}\n\nvar thunk = createThunkMiddleware();\nthunk.withExtraArgument = createThunkMiddleware;\n\nexports['default'] = thunk;","import $$observable from 'symbol-observable';\n\n/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\nvar ActionTypes = {\n  INIT: '@@redux/INIT' + Math.random().toString(36).substring(7).split('').join('.'),\n  REPLACE: '@@redux/REPLACE' + Math.random().toString(36).substring(7).split('').join('.')\n};\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n  return typeof obj;\n} : function (obj) {\n  return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\n/**\n * @param {any} obj The object to inspect.\n * @returns {boolean} True if the argument appears to be a plain object.\n */\nfunction isPlainObject(obj) {\n  if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || obj === null) return false;\n\n  var proto = obj;\n  while (Object.getPrototypeOf(proto) !== null) {\n    proto = Object.getPrototypeOf(proto);\n  }\n\n  return Object.getPrototypeOf(obj) === proto;\n}\n\n/**\n * Creates a Redux store that holds the state tree.\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} [enhancer] The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\nfunction createStore(reducer, preloadedState, enhancer) {\n  var _ref2;\n\n  if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {\n    enhancer = preloadedState;\n    preloadedState = undefined;\n  }\n\n  if (typeof enhancer !== 'undefined') {\n    if (typeof enhancer !== 'function') {\n      throw new Error('Expected the enhancer to be a function.');\n    }\n\n    return enhancer(createStore)(reducer, preloadedState);\n  }\n\n  if (typeof reducer !== 'function') {\n    throw new Error('Expected the reducer to be a function.');\n  }\n\n  var currentReducer = reducer;\n  var currentState = preloadedState;\n  var currentListeners = [];\n  var nextListeners = currentListeners;\n  var isDispatching = false;\n\n  function ensureCanMutateNextListeners() {\n    if (nextListeners === currentListeners) {\n      nextListeners = currentListeners.slice();\n    }\n  }\n\n  /**\n   * Reads the state tree managed by the store.\n   *\n   * @returns {any} The current state tree of your application.\n   */\n  function getState() {\n    if (isDispatching) {\n      throw new Error('You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.');\n    }\n\n    return currentState;\n  }\n\n  /**\n   * Adds a change listener. It will be called any time an action is dispatched,\n   * and some part of the state tree may potentially have changed. You may then\n   * call `getState()` to read the current state tree inside the callback.\n   *\n   * You may call `dispatch()` from a change listener, with the following\n   * caveats:\n   *\n   * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n   * If you subscribe or unsubscribe while the listeners are being invoked, this\n   * will not have any effect on the `dispatch()` that is currently in progress.\n   * However, the next `dispatch()` call, whether nested or not, will use a more\n   * recent snapshot of the subscription list.\n   *\n   * 2. The listener should not expect to see all state changes, as the state\n   * might have been updated multiple times during a nested `dispatch()` before\n   * the listener is called. It is, however, guaranteed that all subscribers\n   * registered before the `dispatch()` started will be called with the latest\n   * state by the time it exits.\n   *\n   * @param {Function} listener A callback to be invoked on every dispatch.\n   * @returns {Function} A function to remove this change listener.\n   */\n  function subscribe(listener) {\n    if (typeof listener !== 'function') {\n      throw new Error('Expected the listener to be a function.');\n    }\n\n    if (isDispatching) {\n      throw new Error('You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');\n    }\n\n    var isSubscribed = true;\n\n    ensureCanMutateNextListeners();\n    nextListeners.push(listener);\n\n    return function unsubscribe() {\n      if (!isSubscribed) {\n        return;\n      }\n\n      if (isDispatching) {\n        throw new Error('You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');\n      }\n\n      isSubscribed = false;\n\n      ensureCanMutateNextListeners();\n      var index = nextListeners.indexOf(listener);\n      nextListeners.splice(index, 1);\n    };\n  }\n\n  /**\n   * Dispatches an action. It is the only way to trigger a state change.\n   *\n   * The `reducer` function, used to create the store, will be called with the\n   * current state tree and the given `action`. Its return value will\n   * be considered the **next** state of the tree, and the change listeners\n   * will be notified.\n   *\n   * The base implementation only supports plain object actions. If you want to\n   * dispatch a Promise, an Observable, a thunk, or something else, you need to\n   * wrap your store creating function into the corresponding middleware. For\n   * example, see the documentation for the `redux-thunk` package. Even the\n   * middleware will eventually dispatch plain object actions using this method.\n   *\n   * @param {Object} action A plain object representing “what changed”. It is\n   * a good idea to keep actions serializable so you can record and replay user\n   * sessions, or use the time travelling `redux-devtools`. An action must have\n   * a `type` property which may not be `undefined`. It is a good idea to use\n   * string constants for action types.\n   *\n   * @returns {Object} For convenience, the same action object you dispatched.\n   *\n   * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n   * return something else (for example, a Promise you can await).\n   */\n  function dispatch(action) {\n    if (!isPlainObject(action)) {\n      throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');\n    }\n\n    if (typeof action.type === 'undefined') {\n      throw new Error('Actions may not have an undefined \"type\" property. ' + 'Have you misspelled a constant?');\n    }\n\n    if (isDispatching) {\n      throw new Error('Reducers may not dispatch actions.');\n    }\n\n    try {\n      isDispatching = true;\n      currentState = currentReducer(currentState, action);\n    } finally {\n      isDispatching = false;\n    }\n\n    var listeners = currentListeners = nextListeners;\n    for (var i = 0; i < listeners.length; i++) {\n      var listener = listeners[i];\n      listener();\n    }\n\n    return action;\n  }\n\n  /**\n   * Replaces the reducer currently used by the store to calculate the state.\n   *\n   * You might need this if your app implements code splitting and you want to\n   * load some of the reducers dynamically. You might also need this if you\n   * implement a hot reloading mechanism for Redux.\n   *\n   * @param {Function} nextReducer The reducer for the store to use instead.\n   * @returns {void}\n   */\n  function replaceReducer(nextReducer) {\n    if (typeof nextReducer !== 'function') {\n      throw new Error('Expected the nextReducer to be a function.');\n    }\n\n    currentReducer = nextReducer;\n    dispatch({ type: ActionTypes.REPLACE });\n  }\n\n  /**\n   * Interoperability point for observable/reactive libraries.\n   * @returns {observable} A minimal observable of state changes.\n   * For more information, see the observable proposal:\n   * https://github.com/tc39/proposal-observable\n   */\n  function observable() {\n    var _ref;\n\n    var outerSubscribe = subscribe;\n    return _ref = {\n      /**\n       * The minimal observable subscription method.\n       * @param {Object} observer Any object that can be used as an observer.\n       * The observer object should have a `next` method.\n       * @returns {subscription} An object with an `unsubscribe` method that can\n       * be used to unsubscribe the observable from the store, and prevent further\n       * emission of values from the observable.\n       */\n      subscribe: function subscribe(observer) {\n        if ((typeof observer === 'undefined' ? 'undefined' : _typeof(observer)) !== 'object' || observer === null) {\n          throw new TypeError('Expected the observer to be an object.');\n        }\n\n        function observeState() {\n          if (observer.next) {\n            observer.next(getState());\n          }\n        }\n\n        observeState();\n        var unsubscribe = outerSubscribe(observeState);\n        return { unsubscribe: unsubscribe };\n      }\n    }, _ref[$$observable] = function () {\n      return this;\n    }, _ref;\n  }\n\n  // When a store is created, an \"INIT\" action is dispatched so that every\n  // reducer returns their initial state. This effectively populates\n  // the initial state tree.\n  dispatch({ type: ActionTypes.INIT });\n\n  return _ref2 = {\n    dispatch: dispatch,\n    subscribe: subscribe,\n    getState: getState,\n    replaceReducer: replaceReducer\n  }, _ref2[$$observable] = observable, _ref2;\n}\n\n/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\nfunction warning(message) {\n  /* eslint-disable no-console */\n  if (typeof console !== 'undefined' && typeof console.error === 'function') {\n    console.error(message);\n  }\n  /* eslint-enable no-console */\n  try {\n    // This error was thrown as a convenience so that if you enable\n    // \"break on all exceptions\" in your console,\n    // it would pause the execution at this line.\n    throw new Error(message);\n  } catch (e) {} // eslint-disable-line no-empty\n}\n\nfunction getUndefinedStateErrorMessage(key, action) {\n  var actionType = action && action.type;\n  var actionDescription = actionType && 'action \"' + String(actionType) + '\"' || 'an action';\n\n  return 'Given ' + actionDescription + ', reducer \"' + key + '\" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state. ' + 'If you want this reducer to hold no value, you can return null instead of undefined.';\n}\n\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n  var reducerKeys = Object.keys(reducers);\n  var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';\n\n  if (reducerKeys.length === 0) {\n    return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';\n  }\n\n  if (!isPlainObject(inputState)) {\n    return 'The ' + argumentName + ' has unexpected type of \"' + {}.toString.call(inputState).match(/\\s([a-z|A-Z]+)/)[1] + '\". Expected argument to be an object with the following ' + ('keys: \"' + reducerKeys.join('\", \"') + '\"');\n  }\n\n  var unexpectedKeys = Object.keys(inputState).filter(function (key) {\n    return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];\n  });\n\n  unexpectedKeys.forEach(function (key) {\n    unexpectedKeyCache[key] = true;\n  });\n\n  if (action && action.type === ActionTypes.REPLACE) return;\n\n  if (unexpectedKeys.length > 0) {\n    return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('\"' + unexpectedKeys.join('\", \"') + '\" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('\"' + reducerKeys.join('\", \"') + '\". Unexpected keys will be ignored.');\n  }\n}\n\nfunction assertReducerShape(reducers) {\n  Object.keys(reducers).forEach(function (key) {\n    var reducer = reducers[key];\n    var initialState = reducer(undefined, { type: ActionTypes.INIT });\n\n    if (typeof initialState === 'undefined') {\n      throw new Error('Reducer \"' + key + '\" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined. If you don\\'t want to set a value for this reducer, ' + 'you can use null instead of undefined.');\n    }\n\n    var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');\n    if (typeof reducer(undefined, { type: type }) === 'undefined') {\n      throw new Error('Reducer \"' + key + '\" returned undefined when probed with a random type. ' + ('Don\\'t try to handle ' + ActionTypes.INIT + ' or other actions in \"redux/*\" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined, but can be null.');\n    }\n  });\n}\n\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\nfunction combineReducers(reducers) {\n  var reducerKeys = Object.keys(reducers);\n  var finalReducers = {};\n  for (var i = 0; i < reducerKeys.length; i++) {\n    var key = reducerKeys[i];\n\n    if (process.env.NODE_ENV !== 'production') {\n      if (typeof reducers[key] === 'undefined') {\n        warning('No reducer provided for key \"' + key + '\"');\n      }\n    }\n\n    if (typeof reducers[key] === 'function') {\n      finalReducers[key] = reducers[key];\n    }\n  }\n  var finalReducerKeys = Object.keys(finalReducers);\n\n  var unexpectedKeyCache = void 0;\n  if (process.env.NODE_ENV !== 'production') {\n    unexpectedKeyCache = {};\n  }\n\n  var shapeAssertionError = void 0;\n  try {\n    assertReducerShape(finalReducers);\n  } catch (e) {\n    shapeAssertionError = e;\n  }\n\n  return function combination() {\n    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    var action = arguments[1];\n\n    if (shapeAssertionError) {\n      throw shapeAssertionError;\n    }\n\n    if (process.env.NODE_ENV !== 'production') {\n      var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\n      if (warningMessage) {\n        warning(warningMessage);\n      }\n    }\n\n    var hasChanged = false;\n    var nextState = {};\n    for (var _i = 0; _i < finalReducerKeys.length; _i++) {\n      var _key = finalReducerKeys[_i];\n      var reducer = finalReducers[_key];\n      var previousStateForKey = state[_key];\n      var nextStateForKey = reducer(previousStateForKey, action);\n      if (typeof nextStateForKey === 'undefined') {\n        var errorMessage = getUndefinedStateErrorMessage(_key, action);\n        throw new Error(errorMessage);\n      }\n      nextState[_key] = nextStateForKey;\n      hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n    }\n    return hasChanged ? nextState : state;\n  };\n}\n\nfunction bindActionCreator(actionCreator, dispatch) {\n  return function () {\n    return dispatch(actionCreator.apply(this, arguments));\n  };\n}\n\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass a single function as the first argument,\n * and get a function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\nfunction bindActionCreators(actionCreators, dispatch) {\n  if (typeof actionCreators === 'function') {\n    return bindActionCreator(actionCreators, dispatch);\n  }\n\n  if ((typeof actionCreators === 'undefined' ? 'undefined' : _typeof(actionCreators)) !== 'object' || actionCreators === null) {\n    throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators === 'undefined' ? 'undefined' : _typeof(actionCreators)) + '. ' + 'Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?');\n  }\n\n  var keys = Object.keys(actionCreators);\n  var boundActionCreators = {};\n  for (var i = 0; i < keys.length; i++) {\n    var key = keys[i];\n    var actionCreator = actionCreators[key];\n    if (typeof actionCreator === 'function') {\n      boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n    }\n  }\n  return boundActionCreators;\n}\n\n/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\n\nfunction compose() {\n  for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {\n    funcs[_key] = arguments[_key];\n  }\n\n  if (funcs.length === 0) {\n    return function (arg) {\n      return arg;\n    };\n  }\n\n  if (funcs.length === 1) {\n    return funcs[0];\n  }\n\n  return funcs.reduce(function (a, b) {\n    return function () {\n      return a(b.apply(undefined, arguments));\n    };\n  });\n}\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\nfunction applyMiddleware() {\n  for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {\n    middlewares[_key] = arguments[_key];\n  }\n\n  return function (createStore) {\n    return function () {\n      for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n        args[_key2] = arguments[_key2];\n      }\n\n      var store = createStore.apply(undefined, args);\n      var _dispatch = function dispatch() {\n        throw new Error('Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');\n      };\n\n      var middlewareAPI = {\n        getState: store.getState,\n        dispatch: function dispatch() {\n          return _dispatch.apply(undefined, arguments);\n        }\n      };\n      var chain = middlewares.map(function (middleware) {\n        return middleware(middlewareAPI);\n      });\n      _dispatch = compose.apply(undefined, chain)(store.dispatch);\n\n      return _extends({}, store, {\n        dispatch: _dispatch\n      });\n    };\n  };\n}\n\n/*\n * This is a dummy function to check if the function name has been altered by minification.\n * If the function has been minified and NODE_ENV !== 'production', warn the user.\n */\nfunction isCrushed() {}\n\nif (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {\n  warning(\"You are currently using minified code outside of NODE_ENV === 'production'. \" + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.');\n}\n\nexport { createStore, combineReducers, bindActionCreators, applyMiddleware, compose, ActionTypes as __DO_NOT_USE__ActionTypes };\n","/* global window */\nimport ponyfill from './ponyfill.js';\n\nvar root;\n\nif (typeof self !== 'undefined') {\n  root = self;\n} else if (typeof window !== 'undefined') {\n  root = window;\n} else if (typeof global !== 'undefined') {\n  root = global;\n} else if (typeof module !== 'undefined') {\n  root = module;\n} else {\n  root = Function('return this')();\n}\n\nvar result = ponyfill(root);\nexport default result;\n","export default function symbolObservablePonyfill(root) {\n\tvar result;\n\tvar Symbol = root.Symbol;\n\n\tif (typeof Symbol === 'function') {\n\t\tif (Symbol.observable) {\n\t\t\tresult = Symbol.observable;\n\t\t} else {\n\t\t\tresult = Symbol('observable');\n\t\t\tSymbol.observable = result;\n\t\t}\n\t} else {\n\t\tresult = '@@observable';\n\t}\n\n\treturn result;\n};\n","function isAbsolute(pathname) {\n  return pathname.charAt(0) === '/';\n}\n\n// About 1.5x faster than the two-arg version of Array#splice()\nfunction spliceOne(list, index) {\n  for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n    list[i] = list[k];\n  }\n\n  list.pop();\n}\n\n// This implementation is based heavily on node's url.parse\nfunction resolvePathname(to) {\n  var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n  var toParts = to && to.split('/') || [];\n  var fromParts = from && from.split('/') || [];\n\n  var isToAbs = to && isAbsolute(to);\n  var isFromAbs = from && isAbsolute(from);\n  var mustEndAbs = isToAbs || isFromAbs;\n\n  if (to && isAbsolute(to)) {\n    // to is absolute\n    fromParts = toParts;\n  } else if (toParts.length) {\n    // to is relative, drop the filename\n    fromParts.pop();\n    fromParts = fromParts.concat(toParts);\n  }\n\n  if (!fromParts.length) return '/';\n\n  var hasTrailingSlash = void 0;\n  if (fromParts.length) {\n    var last = fromParts[fromParts.length - 1];\n    hasTrailingSlash = last === '.' || last === '..' || last === '';\n  } else {\n    hasTrailingSlash = false;\n  }\n\n  var up = 0;\n  for (var i = fromParts.length; i >= 0; i--) {\n    var part = fromParts[i];\n\n    if (part === '.') {\n      spliceOne(fromParts, i);\n    } else if (part === '..') {\n      spliceOne(fromParts, i);\n      up++;\n    } else if (up) {\n      spliceOne(fromParts, i);\n      up--;\n    }\n  }\n\n  if (!mustEndAbs) for (; up--; up) {\n    fromParts.unshift('..');\n  }if (mustEndAbs && fromParts[0] !== '' && (!fromParts[0] || !isAbsolute(fromParts[0]))) fromParts.unshift('');\n\n  var result = fromParts.join('/');\n\n  if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n\n  return result;\n}\n\nexport default resolvePathname;","module.exports = {\n  framer: require('./src/framer.js'),\n  windows: require('./src/windows.js')\n};\n","/*===========================================================================*\\\n * Framer for breaking a U-Law ByteBuffer or Array into windows of a particular\n * size at an arbitrary step.\n *\n * (c) Vail Systems. Joshua Jung and Ben Bryan. 2015\n\\*===========================================================================*/\nvar Framer = function (options) {\n  options = options || {};\n\n  this.frameIx = 0;\n  this.frameSize = options.frameSize || 64;\n  this.frameStep = options.frameStep|| this.frameSize;\n  this.map = options.map || undefined;\n  this.scale = options.scale || undefined;\n  this.offset = options.offset ? options.offset : 0;\n  this.sampleType = options.sampleType || 'UInt8';\n  this.wordSize = options.wordSize || 1;\n};\n\nFramer.prototype = {\n  /**\n   * Frames a buffer of single-byte char values or an array of Numbers into windows of the specified size.\n   */\n  frame: function(bufferOrArray, callback) {\n    var self = this,\n        ix = this.offset,\n        frame = [],\n        isArray = Object.prototype.toString.call( bufferOrArray) === '[object Array]';\n\n    self.frameIx = 0;\n\n    while (ix < bufferOrArray.length) {\n      var value = isArray ? bufferOrArray[ix] : bufferOrArray['read' + self.sampleType](ix); \n\n      frame.push(this.map ? this.map[value] : value);\n\n      if (frame.length == this.frameSize || ix+self.wordSize == bufferOrArray.length) finishFrame(frame);\n\n      ix += self.wordSize;\n    }\n\n    // Did we not process any frames at all for some reason?\n    if (this.frameIx == 0) callback(undefined);\n\n    function finishFrame(frame) {\n      if (this.scale) frame = frame.map(function (s, ix) {return s * self.scale[ix];});\n\n      callback(frame, self.frameIx);\n\n      if (ix != bufferOrArray.length - self.wordSize)\n      {\n          ix -= (self.frameSize - self.frameStep) * self.wordSize;\n\n          self.frameIx++;\n          frame.length = 0;\n      }\n    }\n  }\n};\n\nmodule.exports = Framer;\n","/*===========================================================================*\\\n * Method for producing the coefficients for windowing functions of an\n * arbitrary length.\n *\n * (c) Vail Systems. Joshua Jung and Ben Bryan. 2015\n\\*===========================================================================*/\nmodule.exports = {\n    construct: function (type, sampleCount, alpha)  {\n       var coef = [];\n       switch (type)\n       {\n           case 'ham': \n               for (var i = 0; i < sampleCount; i++) {\n                   coef[i] = 0.54 - 0.46 * Math.cos((2 * Math.PI * i)/(sampleCount - 1));\n               }\n           break;\n           case 'tukey':\n               var sm1 = sampleCount - 1,\n                   asm1 = alpha * sm1;\n               for (var i = 0; i < sampleCount; i++) {\n                   // Left tail\n                   if (i < asm1 / 2)\n                      coef[i] = 0.5 * (1 + Math.cos(Math.PI * ((2 * sampleCount)/(asm1) - 1))); \n                   // Right tail\n                   else if (i > (sm1 * (1 - alpha / 2)))\n                      coef[i] = 0.5 * (1 + Math.cos(Math.PI * ((2 * sampleCount)/(asm1) - (2 / alpha) + 1)));\n                   // Middle (rectangular)\n                   else coef[i] = 1;\n               }\n           break;\n           case 'rectangular':\n               for (var i = 0; i < sampleCount; i++)\n                   coef[i] = 1.0;\n           break;\n       }\n       return coef;\n    }\n};\n","/* global window, exports, define */\n\n!function() {\n    'use strict'\n\n    var re = {\n        not_string: /[^s]/,\n        not_bool: /[^t]/,\n        not_type: /[^T]/,\n        not_primitive: /[^v]/,\n        number: /[diefg]/,\n        numeric_arg: /[bcdiefguxX]/,\n        json: /[j]/,\n        not_json: /[^j]/,\n        text: /^[^\\x25]+/,\n        modulo: /^\\x25{2}/,\n        placeholder: /^\\x25(?:([1-9]\\d*)\\$|\\(([^\\)]+)\\))?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-gijostTuvxX])/,\n        key: /^([a-z_][a-z_\\d]*)/i,\n        key_access: /^\\.([a-z_][a-z_\\d]*)/i,\n        index_access: /^\\[(\\d+)\\]/,\n        sign: /^[\\+\\-]/\n    }\n\n    function sprintf(key) {\n        // `arguments` is not an array, but should be fine for this call\n        return sprintf_format(sprintf_parse(key), arguments)\n    }\n\n    function vsprintf(fmt, argv) {\n        return sprintf.apply(null, [fmt].concat(argv || []))\n    }\n\n    function sprintf_format(parse_tree, argv) {\n        var cursor = 1, tree_length = parse_tree.length, arg, output = '', i, k, match, pad, pad_character, pad_length, is_positive, sign\n        for (i = 0; i < tree_length; i++) {\n            if (typeof parse_tree[i] === 'string') {\n                output += parse_tree[i]\n            }\n            else if (Array.isArray(parse_tree[i])) {\n                match = parse_tree[i] // convenience purposes only\n                if (match[2]) { // keyword argument\n                    arg = argv[cursor]\n                    for (k = 0; k < match[2].length; k++) {\n                        if (!arg.hasOwnProperty(match[2][k])) {\n                            throw new Error(sprintf('[sprintf] property \"%s\" does not exist', match[2][k]))\n                        }\n                        arg = arg[match[2][k]]\n                    }\n                }\n                else if (match[1]) { // positional argument (explicit)\n                    arg = argv[match[1]]\n                }\n                else { // positional argument (implicit)\n                    arg = argv[cursor++]\n                }\n\n                if (re.not_type.test(match[8]) && re.not_primitive.test(match[8]) && arg instanceof Function) {\n                    arg = arg()\n                }\n\n                if (re.numeric_arg.test(match[8]) && (typeof arg !== 'number' && isNaN(arg))) {\n                    throw new TypeError(sprintf('[sprintf] expecting number but found %T', arg))\n                }\n\n                if (re.number.test(match[8])) {\n                    is_positive = arg >= 0\n                }\n\n                switch (match[8]) {\n                    case 'b':\n                        arg = parseInt(arg, 10).toString(2)\n                        break\n                    case 'c':\n                        arg = String.fromCharCode(parseInt(arg, 10))\n                        break\n                    case 'd':\n                    case 'i':\n                        arg = parseInt(arg, 10)\n                        break\n                    case 'j':\n                        arg = JSON.stringify(arg, null, match[6] ? parseInt(match[6]) : 0)\n                        break\n                    case 'e':\n                        arg = match[7] ? parseFloat(arg).toExponential(match[7]) : parseFloat(arg).toExponential()\n                        break\n                    case 'f':\n                        arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg)\n                        break\n                    case 'g':\n                        arg = match[7] ? String(Number(arg.toPrecision(match[7]))) : parseFloat(arg)\n                        break\n                    case 'o':\n                        arg = (parseInt(arg, 10) >>> 0).toString(8)\n                        break\n                    case 's':\n                        arg = String(arg)\n                        arg = (match[7] ? arg.substring(0, match[7]) : arg)\n                        break\n                    case 't':\n                        arg = String(!!arg)\n                        arg = (match[7] ? arg.substring(0, match[7]) : arg)\n                        break\n                    case 'T':\n                        arg = Object.prototype.toString.call(arg).slice(8, -1).toLowerCase()\n                        arg = (match[7] ? arg.substring(0, match[7]) : arg)\n                        break\n                    case 'u':\n                        arg = parseInt(arg, 10) >>> 0\n                        break\n                    case 'v':\n                        arg = arg.valueOf()\n                        arg = (match[7] ? arg.substring(0, match[7]) : arg)\n                        break\n                    case 'x':\n                        arg = (parseInt(arg, 10) >>> 0).toString(16)\n                        break\n                    case 'X':\n                        arg = (parseInt(arg, 10) >>> 0).toString(16).toUpperCase()\n                        break\n                }\n                if (re.json.test(match[8])) {\n                    output += arg\n                }\n                else {\n                    if (re.number.test(match[8]) && (!is_positive || match[3])) {\n                        sign = is_positive ? '+' : '-'\n                        arg = arg.toString().replace(re.sign, '')\n                    }\n                    else {\n                        sign = ''\n                    }\n                    pad_character = match[4] ? match[4] === '0' ? '0' : match[4].charAt(1) : ' '\n                    pad_length = match[6] - (sign + arg).length\n                    pad = match[6] ? (pad_length > 0 ? pad_character.repeat(pad_length) : '') : ''\n                    output += match[5] ? sign + arg + pad : (pad_character === '0' ? sign + pad + arg : pad + sign + arg)\n                }\n            }\n        }\n        return output\n    }\n\n    var sprintf_cache = Object.create(null)\n\n    function sprintf_parse(fmt) {\n        if (sprintf_cache[fmt]) {\n            return sprintf_cache[fmt]\n        }\n\n        var _fmt = fmt, match, parse_tree = [], arg_names = 0\n        while (_fmt) {\n            if ((match = re.text.exec(_fmt)) !== null) {\n                parse_tree.push(match[0])\n            }\n            else if ((match = re.modulo.exec(_fmt)) !== null) {\n                parse_tree.push('%')\n            }\n            else if ((match = re.placeholder.exec(_fmt)) !== null) {\n                if (match[2]) {\n                    arg_names |= 1\n                    var field_list = [], replacement_field = match[2], field_match = []\n                    if ((field_match = re.key.exec(replacement_field)) !== null) {\n                        field_list.push(field_match[1])\n                        while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {\n                            if ((field_match = re.key_access.exec(replacement_field)) !== null) {\n                                field_list.push(field_match[1])\n                            }\n                            else if ((field_match = re.index_access.exec(replacement_field)) !== null) {\n                                field_list.push(field_match[1])\n                            }\n                            else {\n                                throw new SyntaxError('[sprintf] failed to parse named argument key')\n                            }\n                        }\n                    }\n                    else {\n                        throw new SyntaxError('[sprintf] failed to parse named argument key')\n                    }\n                    match[2] = field_list\n                }\n                else {\n                    arg_names |= 2\n                }\n                if (arg_names === 3) {\n                    throw new Error('[sprintf] mixing positional and named placeholders is not (yet) supported')\n                }\n                parse_tree.push(match)\n            }\n            else {\n                throw new SyntaxError('[sprintf] unexpected placeholder')\n            }\n            _fmt = _fmt.substring(match[0].length)\n        }\n        return sprintf_cache[fmt] = parse_tree\n    }\n\n    /**\n     * export to either browser or node.js\n     */\n    /* eslint-disable quote-props */\n    if (typeof exports !== 'undefined') {\n        exports['sprintf'] = sprintf\n        exports['vsprintf'] = vsprintf\n    }\n    if (typeof window !== 'undefined') {\n        window['sprintf'] = sprintf\n        window['vsprintf'] = vsprintf\n\n        if (typeof define === 'function' && define['amd']) {\n            define(function() {\n                return {\n                    'sprintf': sprintf,\n                    'vsprintf': vsprintf\n                }\n            })\n        }\n    }\n    /* eslint-enable quote-props */\n}()\n","(function(root, factory){\n\n\t//UMD\n\tif ( typeof define === \"function\" && define.amd ) {\n\t\tdefine(function() {\n\t\t\treturn factory();\n\t\t});\n\t} else if (typeof module === \"object\") {\n\t\tmodule.exports = factory();\n \t} else {\n\t\troot.Tone = factory();\n\t}\n\n}(this, function(){\n\n\t\"use strict\";\n\t\n\tvar Tone;\n\t//constructs the main Tone object\n\tfunction Main(func){\n\t\tTone = func();\n\t}\n\t//invokes each of the modules with the main Tone object as the argument\n\tfunction Module(func){\n\t\tfunc(Tone);\n\t}\t/**\n\t *  Tone.js\n\t *  @author Yotam Mann\n\t *  @license http://opensource.org/licenses/MIT MIT License\n\t *  @copyright 2014-2018 Yotam Mann\n\t */\n\tMain(function () {\n\t    \n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tTONE\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  @class  Tone is the base class of all other classes.\n\t\t *  @constructor\n\t\t */\n\t    var Tone = function () {\n\t        if (!(this instanceof Tone)) {\n\t            throw new Error('constructor needs to be called with the \\'new\\' keyword');\n\t        }\n\t    };\n\t    /**\n\t\t *  @memberOf Tone#\n\t\t *  @returns {String} returns the name of the class as a string\n\t\t */\n\t    Tone.prototype.toString = function () {\n\t        for (var className in Tone) {\n\t            var isLetter = className[0].match(/^[A-Z]$/);\n\t            var sameConstructor = Tone[className] === this.constructor;\n\t            if (Tone.isFunction(Tone[className]) && isLetter && sameConstructor) {\n\t                return className;\n\t            }\n\t        }\n\t        return 'Tone';\n\t    };\n\t    /**\n\t\t *  @memberOf Tone#\n\t\t *  disconnect and dispose\n\t\t *  @returns {Tone} this\n\t\t */\n\t    Tone.prototype.dispose = function () {\n\t        return this;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tGET/SET\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Set the parameters at once. Either pass in an\n\t\t *  object mapping parameters to values, or to set a\n\t\t *  single parameter, by passing in a string and value.\n\t\t *  The last argument is an optional ramp time which\n\t\t *  will ramp any signal values to their destination value\n\t\t *  over the duration of the rampTime.\n\t\t *  @param {Object|String} params\n\t\t *  @param {Number=} value\n\t\t *  @param {Time=} rampTime\n\t\t *  @returns {Tone} this\n\t\t *  @memberOf Tone#\n\t\t *  @example\n\t\t * //set values using an object\n\t\t * filter.set({\n\t\t * \t\"frequency\" : 300,\n\t\t * \t\"type\" : highpass\n\t\t * });\n\t\t *  @example\n\t\t * filter.set(\"type\", \"highpass\");\n\t\t *  @example\n\t\t * //ramp to the value 220 over 3 seconds.\n\t\t * oscillator.set({\n\t\t * \t\"frequency\" : 220\n\t\t * }, 3);\n\t\t */\n\t    Tone.prototype.set = function (params, value, rampTime) {\n\t        if (Tone.isObject(params)) {\n\t            rampTime = value;\n\t        } else if (Tone.isString(params)) {\n\t            var tmpObj = {};\n\t            tmpObj[params] = value;\n\t            params = tmpObj;\n\t        }\n\t        paramLoop:\n\t            for (var attr in params) {\n\t                value = params[attr];\n\t                var parent = this;\n\t                if (attr.indexOf('.') !== -1) {\n\t                    var attrSplit = attr.split('.');\n\t                    for (var i = 0; i < attrSplit.length - 1; i++) {\n\t                        parent = parent[attrSplit[i]];\n\t                        if (parent instanceof Tone) {\n\t                            attrSplit.splice(0, i + 1);\n\t                            var innerParam = attrSplit.join('.');\n\t                            parent.set(innerParam, value);\n\t                            continue paramLoop;\n\t                        }\n\t                    }\n\t                    attr = attrSplit[attrSplit.length - 1];\n\t                }\n\t                var param = parent[attr];\n\t                if (Tone.isUndef(param)) {\n\t                    continue;\n\t                }\n\t                if (Tone.Signal && param instanceof Tone.Signal || Tone.Param && param instanceof Tone.Param) {\n\t                    if (param.value !== value) {\n\t                        if (Tone.isUndef(rampTime)) {\n\t                            param.value = value;\n\t                        } else {\n\t                            param.rampTo(value, rampTime);\n\t                        }\n\t                    }\n\t                } else if (param instanceof AudioParam) {\n\t                    if (param.value !== value) {\n\t                        param.value = value;\n\t                    }\n\t                } else if (Tone.TimeBase && param instanceof Tone.TimeBase) {\n\t                    parent[attr] = value;\n\t                } else if (param instanceof Tone) {\n\t                    param.set(value);\n\t                } else if (param !== value) {\n\t                    parent[attr] = value;\n\t                }\n\t            }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Get the object's attributes. Given no arguments get\n\t\t *  will return all available object properties and their corresponding\n\t\t *  values. Pass in a single attribute to retrieve or an array\n\t\t *  of attributes. The attribute strings can also include a \".\"\n\t\t *  to access deeper properties.\n\t\t *  @memberOf Tone#\n\t\t *  @example\n\t\t * osc.get();\n\t\t * //returns {\"type\" : \"sine\", \"frequency\" : 440, ...etc}\n\t\t *  @example\n\t\t * osc.get(\"type\");\n\t\t * //returns { \"type\" : \"sine\"}\n\t\t * @example\n\t\t * //use dot notation to access deep properties\n\t\t * synth.get([\"envelope.attack\", \"envelope.release\"]);\n\t\t * //returns {\"envelope\" : {\"attack\" : 0.2, \"release\" : 0.4}}\n\t\t *  @param {Array=|string|undefined} params the parameters to get, otherwise will return\n\t\t *  \t\t\t\t\t                  all available.\n\t\t *  @returns {Object}\n\t\t */\n\t    Tone.prototype.get = function (params) {\n\t        if (Tone.isUndef(params)) {\n\t            params = this._collectDefaults(this.constructor);\n\t        } else if (Tone.isString(params)) {\n\t            params = [params];\n\t        }\n\t        var ret = {};\n\t        for (var i = 0; i < params.length; i++) {\n\t            var attr = params[i];\n\t            var parent = this;\n\t            var subRet = ret;\n\t            if (attr.indexOf('.') !== -1) {\n\t                var attrSplit = attr.split('.');\n\t                for (var j = 0; j < attrSplit.length - 1; j++) {\n\t                    var subAttr = attrSplit[j];\n\t                    subRet[subAttr] = subRet[subAttr] || {};\n\t                    subRet = subRet[subAttr];\n\t                    parent = parent[subAttr];\n\t                }\n\t                attr = attrSplit[attrSplit.length - 1];\n\t            }\n\t            var param = parent[attr];\n\t            if (Tone.isObject(params[attr])) {\n\t                subRet[attr] = param.get();\n\t            } else if (Tone.Signal && param instanceof Tone.Signal) {\n\t                subRet[attr] = param.value;\n\t            } else if (Tone.Param && param instanceof Tone.Param) {\n\t                subRet[attr] = param.value;\n\t            } else if (param instanceof AudioParam) {\n\t                subRet[attr] = param.value;\n\t            } else if (param instanceof Tone) {\n\t                subRet[attr] = param.get();\n\t            } else if (!Tone.isFunction(param) && Tone.isDefined(param)) {\n\t                subRet[attr] = param;\n\t            }\n\t        }\n\t        return ret;\n\t    };\n\t    /**\n\t\t *  collect all of the default attributes in one\n\t\t *  @private\n\t\t *  @param {Function} constr the constructor to find the defaults from\n\t\t *  @return {Array} all of the attributes which belong to the class\n\t\t */\n\t    Tone.prototype._collectDefaults = function (constr) {\n\t        var ret = [];\n\t        if (Tone.isDefined(constr.defaults)) {\n\t            ret = Object.keys(constr.defaults);\n\t        }\n\t        if (Tone.isDefined(constr._super)) {\n\t            var superDefs = this._collectDefaults(constr._super);\n\t            //filter out repeats\n\t            for (var i = 0; i < superDefs.length; i++) {\n\t                if (ret.indexOf(superDefs[i]) === -1) {\n\t                    ret.push(superDefs[i]);\n\t                }\n\t            }\n\t        }\n\t        return ret;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tDEFAULTS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  @memberOf Tone\n\t\t *  @param  {Array}  values  The arguments array\n\t\t *  @param  {Array}  keys    The names of the arguments\n\t\t *  @param {Function|Object} constr The class constructor\n\t\t *  @return  {Object}  An object composed of the  defaults between the class' defaults\n\t\t *                        and the passed in arguments.\n\t\t */\n\t    Tone.defaults = function (values, keys, constr) {\n\t        var options = {};\n\t        if (values.length === 1 && Tone.isObject(values[0])) {\n\t            options = values[0];\n\t        } else {\n\t            for (var i = 0; i < keys.length; i++) {\n\t                options[keys[i]] = values[i];\n\t            }\n\t        }\n\t        if (Tone.isDefined(constr.defaults)) {\n\t            return Tone.defaultArg(options, constr.defaults);\n\t        } else if (Tone.isObject(constr)) {\n\t            return Tone.defaultArg(options, constr);\n\t        } else {\n\t            return options;\n\t        }\n\t    };\n\t    /**\n\t\t *  If the `given` parameter is undefined, use the `fallback`.\n\t\t *  If both `given` and `fallback` are object literals, it will\n\t\t *  return a deep copy which includes all of the parameters from both\n\t\t *  objects. If a parameter is undefined in given, it will return\n\t\t *  the fallback property.\n\t\t *  <br><br>\n\t\t *  WARNING: if object is self referential, it will go into an an\n\t\t *  infinite recursive loop.\n\t\t *  @memberOf Tone\n\t\t *  @param  {*} given\n\t\t *  @param  {*} fallback\n\t\t *  @return {*}\n\t\t */\n\t    Tone.defaultArg = function (given, fallback) {\n\t        if (Tone.isObject(given) && Tone.isObject(fallback)) {\n\t            var ret = {};\n\t            //make a deep copy of the given object\n\t            for (var givenProp in given) {\n\t                ret[givenProp] = Tone.defaultArg(fallback[givenProp], given[givenProp]);\n\t            }\n\t            for (var fallbackProp in fallback) {\n\t                ret[fallbackProp] = Tone.defaultArg(given[fallbackProp], fallback[fallbackProp]);\n\t            }\n\t            return ret;\n\t        } else {\n\t            return Tone.isUndef(given) ? fallback : given;\n\t        }\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tCONNECTIONS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  connect together all of the arguments in series\n\t\t *  @param {...AudioParam|Tone|AudioNode} nodes\n\t\t *  @returns {Tone}\n\t\t *  @memberOf Tone\n\t\t *  @static\n\t\t */\n\t    Tone.connectSeries = function () {\n\t        var currentUnit = arguments[0];\n\t        for (var i = 1; i < arguments.length; i++) {\n\t            var toUnit = arguments[i];\n\t            currentUnit.connect(toUnit);\n\t            currentUnit = toUnit;\n\t        }\n\t        return Tone;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    // TYPE CHECKING\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Test if the arg is undefined\n\t\t *  @param {*} arg the argument to test\n\t\t *  @returns {Boolean} true if the arg is undefined\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.isUndef = function (val) {\n\t        return typeof val === 'undefined';\n\t    };\n\t    /**\n\t\t *  Test if the arg is not undefined\n\t\t *  @param {*} arg the argument to test\n\t\t *  @returns {Boolean} true if the arg is undefined\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.isDefined = function (val) {\n\t        return !Tone.isUndef(val);\n\t    };\n\t    /**\n\t\t *  Test if the arg is a function\n\t\t *  @param {*} arg the argument to test\n\t\t *  @returns {Boolean} true if the arg is a function\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.isFunction = function (val) {\n\t        return typeof val === 'function';\n\t    };\n\t    /**\n\t\t *  Test if the argument is a number.\n\t\t *  @param {*} arg the argument to test\n\t\t *  @returns {Boolean} true if the arg is a number\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.isNumber = function (arg) {\n\t        return typeof arg === 'number';\n\t    };\n\t    /**\n\t\t *  Test if the given argument is an object literal (i.e. `{}`);\n\t\t *  @param {*} arg the argument to test\n\t\t *  @returns {Boolean} true if the arg is an object literal.\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.isObject = function (arg) {\n\t        return Object.prototype.toString.call(arg) === '[object Object]' && arg.constructor === Object;\n\t    };\n\t    /**\n\t\t *  Test if the argument is a boolean.\n\t\t *  @param {*} arg the argument to test\n\t\t *  @returns {Boolean} true if the arg is a boolean\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.isBoolean = function (arg) {\n\t        return typeof arg === 'boolean';\n\t    };\n\t    /**\n\t\t *  Test if the argument is an Array\n\t\t *  @param {*} arg the argument to test\n\t\t *  @returns {Boolean} true if the arg is an array\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.isArray = function (arg) {\n\t        return Array.isArray(arg);\n\t    };\n\t    /**\n\t\t *  Test if the argument is a string.\n\t\t *  @param {*} arg the argument to test\n\t\t *  @returns {Boolean} true if the arg is a string\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.isString = function (arg) {\n\t        return typeof arg === 'string';\n\t    };\n\t    /**\n\t\t *  Test if the argument is in the form of a note in scientific pitch notation.\n\t\t *  e.g. \"C4\"\n\t\t *  @param {*} arg the argument to test\n\t\t *  @returns {Boolean} true if the arg is a string\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.isNote = function (arg) {\n\t        return Tone.isString(arg) && /^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i.test(arg);\n\t    };\n\t    /**\n\t\t *  An empty function.\n\t\t *  @static\n\t\t */\n\t    Tone.noOp = function () {\n\t    };\n\t    /**\n\t\t *  Make the property not writable. Internal use only.\n\t\t *  @private\n\t\t *  @param  {String}  property  the property to make not writable\n\t\t */\n\t    Tone.prototype._readOnly = function (property) {\n\t        if (Array.isArray(property)) {\n\t            for (var i = 0; i < property.length; i++) {\n\t                this._readOnly(property[i]);\n\t            }\n\t        } else {\n\t            Object.defineProperty(this, property, {\n\t                writable: false,\n\t                enumerable: true\n\t            });\n\t        }\n\t    };\n\t    /**\n\t\t *  Make an attribute writeable. Interal use only.\n\t\t *  @private\n\t\t *  @param  {String}  property  the property to make writable\n\t\t */\n\t    Tone.prototype._writable = function (property) {\n\t        if (Array.isArray(property)) {\n\t            for (var i = 0; i < property.length; i++) {\n\t                this._writable(property[i]);\n\t            }\n\t        } else {\n\t            Object.defineProperty(this, property, { writable: true });\n\t        }\n\t    };\n\t    /**\n\t\t * Possible play states.\n\t\t * @enum {String}\n\t\t */\n\t    Tone.State = {\n\t        Started: 'started',\n\t        Stopped: 'stopped',\n\t        Paused: 'paused'\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    // CONVERSIONS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Equal power gain scale. Good for cross-fading.\n\t\t *  @param  {NormalRange} percent (0-1)\n\t\t *  @return {Number}         output gain (0-1)\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.equalPowerScale = function (percent) {\n\t        var piFactor = 0.5 * Math.PI;\n\t        return Math.sin(percent * piFactor);\n\t    };\n\t    /**\n\t\t *  Convert decibels into gain.\n\t\t *  @param  {Decibels} db\n\t\t *  @return {Number}\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.dbToGain = function (db) {\n\t        return Math.pow(10, db / 20);\n\t    };\n\t    /**\n\t\t *  Convert gain to decibels.\n\t\t *  @param  {Number} gain (0-1)\n\t\t *  @return {Decibels}\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.gainToDb = function (gain) {\n\t        return 20 * (Math.log(gain) / Math.LN10);\n\t    };\n\t    /**\n\t\t *  Convert an interval (in semitones) to a frequency ratio.\n\t\t *  @param  {Interval} interval the number of semitones above the base note\n\t\t *  @return {Number}          the frequency ratio\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t *  @example\n\t\t * tone.intervalToFrequencyRatio(0); // 1\n\t\t * tone.intervalToFrequencyRatio(12); // 2\n\t\t * tone.intervalToFrequencyRatio(-12); // 0.5\n\t\t */\n\t    Tone.intervalToFrequencyRatio = function (interval) {\n\t        return Math.pow(2, interval / 12);\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tTIMING\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Return the current time of the AudioContext clock.\n\t\t *  @return {Number} the currentTime from the AudioContext\n\t\t *  @memberOf Tone#\n\t\t */\n\t    Tone.prototype.now = function () {\n\t        return Tone.context.now();\n\t    };\n\t    /**\n\t\t *  Return the current time of the AudioContext clock.\n\t\t *  @return {Number} the currentTime from the AudioContext\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.now = function () {\n\t        return Tone.context.now();\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tINHERITANCE\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  have a child inherit all of Tone's (or a parent's) prototype\n\t\t *  to inherit the parent's properties, make sure to call\n\t\t *  Parent.call(this) in the child's constructor\n\t\t *\n\t\t *  based on closure library's inherit function\n\t\t *\n\t\t *  @memberOf Tone\n\t\t *  @static\n\t\t *  @param  {Function} \tchild\n\t\t *  @param  {Function=} parent (optional) parent to inherit from\n\t\t *                             if no parent is supplied, the child\n\t\t *                             will inherit from Tone\n\t\t */\n\t    Tone.extend = function (child, parent) {\n\t        if (Tone.isUndef(parent)) {\n\t            parent = Tone;\n\t        }\n\t        function TempConstructor() {\n\t        }\n\t        TempConstructor.prototype = parent.prototype;\n\t        child.prototype = new TempConstructor();\n\t        /** @override */\n\t        child.prototype.constructor = child;\n\t        child._super = parent;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tCONTEXT\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Private reference to the global AudioContext\n\t\t *  @type {AudioContext}\n\t\t *  @private\n\t\t */\n\t    var audioContext = null;\n\t    /**\n\t\t *  A static pointer to the audio context accessible as Tone.context.\n\t\t *  @type {Tone.Context}\n\t\t *  @name context\n\t\t *  @memberOf Tone\n\t\t */\n\t    Object.defineProperty(Tone, 'context', {\n\t        get: function () {\n\t            return audioContext;\n\t        },\n\t        set: function (context) {\n\t            if (Tone.Context && context instanceof Tone.Context) {\n\t                audioContext = context;\n\t            } else {\n\t                audioContext = new Tone.Context(context);\n\t            }\n\t            //initialize the new audio context\n\t            Tone.Context.emit('init', audioContext);\n\t        }\n\t    });\n\t    /**\n\t\t *  The AudioContext\n\t\t *  @type {Tone.Context}\n\t\t *  @name context\n\t\t *  @memberOf Tone#\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.prototype, 'context', {\n\t        get: function () {\n\t            return Tone.context;\n\t        }\n\t    });\n\t    /**\n\t\t *  Tone automatically creates a context on init, but if you are working\n\t\t *  with other libraries which also create an AudioContext, it can be\n\t\t *  useful to set your own. If you are going to set your own context,\n\t\t *  be sure to do it at the start of your code, before creating any objects.\n\t\t *  @static\n\t\t *  @param {AudioContext} ctx The new audio context to set\n\t\t */\n\t    Tone.setContext = function (ctx) {\n\t        Tone.context = ctx;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tATTRIBUTES\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  The number of seconds of 1 processing block (128 samples)\n\t\t *  @type {Number}\n\t\t *  @name blockTime\n\t\t *  @memberOf Tone\n\t\t *  @static\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.prototype, 'blockTime', {\n\t        get: function () {\n\t            return 128 / this.context.sampleRate;\n\t        }\n\t    });\n\t    /**\n\t\t *  The duration in seconds of one sample.\n\t\t *  @type {Number}\n\t\t *  @name sampleTime\n\t\t *  @memberOf Tone\n\t\t *  @static\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.prototype, 'sampleTime', {\n\t        get: function () {\n\t            return 1 / this.context.sampleRate;\n\t        }\n\t    });\n\t    /**\n\t\t *  Whether or not all the technologies that Tone.js relies on are supported by the current browser.\n\t\t *  @type {Boolean}\n\t\t *  @name supported\n\t\t *  @memberOf Tone\n\t\t *  @readOnly\n\t\t *  @static\n\t\t */\n\t    Object.defineProperty(Tone, 'supported', {\n\t        get: function () {\n\t            var hasAudioContext = window.hasOwnProperty('AudioContext') || window.hasOwnProperty('webkitAudioContext');\n\t            var hasPromises = window.hasOwnProperty('Promise');\n\t            var hasWorkers = window.hasOwnProperty('Worker');\n\t            return hasAudioContext && hasPromises && hasWorkers;\n\t        }\n\t    });\n\t    /**\n\t\t *  Boolean value if the audio context has been initialized.\n\t\t *  @type {Boolean}\n\t\t *  @memberOf Tone\n\t\t *  @static\n\t\t *  @name initialized\n\t\t */\n\t    Object.defineProperty(Tone, 'initialized', {\n\t        get: function () {\n\t            return audioContext !== null;\n\t        }\n\t    });\n\t    /**\n\t\t *  Get the context when it becomes available\n\t\t *  @param  {Function}  resolve  Callback when the context is initialized\n\t\t *  @return  {Tone}\n\t\t */\n\t    Tone.getContext = function (resolve) {\n\t        if (Tone.initialized) {\n\t            resolve(Tone.context);\n\t        } else {\n\t            var resCallback = function () {\n\t                resolve(Tone.context);\n\t                Tone.Context.off('init', resCallback);\n\t            };\n\t            Tone.Context.on('init', resCallback);\n\t        }\n\t        return Tone;\n\t    };\n\t    /**\n\t\t * The version number\n\t\t * @type {String}\n\t\t * @static\n\t\t */\n\t    Tone.version = 'r12';\n\t    return Tone;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Emitter gives classes which extend it\n\t\t *         the ability to listen for and emit events.\n\t\t *         Inspiration and reference from Jerome Etienne's [MicroEvent](https://github.com/jeromeetienne/microevent.js).\n\t\t *         MIT (c) 2011 Jerome Etienne.\n\t\t *\n\t\t *  @extends {Tone}\n\t\t */\n\t    Tone.Emitter = function () {\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  Contains all of the events.\n\t\t\t *  @private\n\t\t\t *  @type  {Object}\n\t\t\t */\n\t        this._events = {};\n\t    };\n\t    Tone.extend(Tone.Emitter);\n\t    /**\n\t\t *  Bind a callback to a specific event.\n\t\t *  @param  {String}    event     The name of the event to listen for.\n\t\t *  @param  {Function}  callback  The callback to invoke when the\n\t\t *                                event is emitted\n\t\t *  @return  {Tone.Emitter}    this\n\t\t */\n\t    Tone.Emitter.prototype.on = function (event, callback) {\n\t        //split the event\n\t        var events = event.split(/\\W+/);\n\t        for (var i = 0; i < events.length; i++) {\n\t            var eventName = events[i];\n\t            if (!this._events.hasOwnProperty(eventName)) {\n\t                this._events[eventName] = [];\n\t            }\n\t            this._events[eventName].push(callback);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Bind a callback which is only invoked once\n\t\t *  @param  {String}    event     The name of the event to listen for.\n\t\t *  @param  {Function}  callback  The callback to invoke when the\n\t\t *                                event is emitted\n\t\t *  @return  {Tone.Emitter}    this\n\t\t */\n\t    Tone.Emitter.prototype.once = function (event, callback) {\n\t        var boundCallback = function () {\n\t            //invoke the callback\n\t            callback.apply(this, arguments);\n\t            this.off(event, boundCallback);\n\t        }.bind(this);\n\t        this.on(event, boundCallback);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Remove the event listener.\n\t\t *  @param  {String}    event     The event to stop listening to.\n\t\t *  @param  {Function=}  callback  The callback which was bound to\n\t\t *                                the event with Tone.Emitter.on.\n\t\t *                                If no callback is given, all callbacks\n\t\t *                                events are removed.\n\t\t *  @return  {Tone.Emitter}    this\n\t\t */\n\t    Tone.Emitter.prototype.off = function (event, callback) {\n\t        var events = event.split(/\\W+/);\n\t        for (var ev = 0; ev < events.length; ev++) {\n\t            event = events[ev];\n\t            if (this._events.hasOwnProperty(event)) {\n\t                if (Tone.isUndef(callback)) {\n\t                    this._events[event] = [];\n\t                } else {\n\t                    var eventList = this._events[event];\n\t                    for (var i = 0; i < eventList.length; i++) {\n\t                        if (eventList[i] === callback) {\n\t                            eventList.splice(i, 1);\n\t                        }\n\t                    }\n\t                }\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Invoke all of the callbacks bound to the event\n\t\t *  with any arguments passed in.\n\t\t *  @param  {String}  event  The name of the event.\n\t\t *  @param {*} args... The arguments to pass to the functions listening.\n\t\t *  @return  {Tone.Emitter}  this\n\t\t */\n\t    Tone.Emitter.prototype.emit = function (event) {\n\t        if (this._events) {\n\t            var args = Array.apply(null, arguments).slice(1);\n\t            if (this._events.hasOwnProperty(event)) {\n\t                var eventList = this._events[event].slice(0);\n\t                for (var i = 0, len = eventList.length; i < len; i++) {\n\t                    eventList[i].apply(this, args);\n\t                }\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Add Emitter functions (on/off/emit) to the object\n\t\t *  @param  {Object|Function}  object  The object or class to extend.\n\t\t *  @returns {Tone.Emitter}\n\t\t */\n\t    Tone.Emitter.mixin = function (object) {\n\t        var functions = [\n\t            'on',\n\t            'once',\n\t            'off',\n\t            'emit'\n\t        ];\n\t        object._events = {};\n\t        for (var i = 0; i < functions.length; i++) {\n\t            var func = functions[i];\n\t            var emitterFunc = Tone.Emitter.prototype[func];\n\t            object[func] = emitterFunc;\n\t        }\n\t        return Tone.Emitter;\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.Emitter}  this\n\t\t */\n\t    Tone.Emitter.prototype.dispose = function () {\n\t        Tone.prototype.dispose.call(this);\n\t        this._events = null;\n\t        return this;\n\t    };\n\t    return Tone.Emitter;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class A Timeline class for scheduling and maintaining state\n\t\t *         along a timeline. All events must have a \"time\" property.\n\t\t *         Internally, events are stored in time order for fast\n\t\t *         retrieval.\n\t\t *  @extends {Tone}\n\t\t *  @param {Positive} [memory=Infinity] The number of previous events that are retained.\n\t\t */\n\t    Tone.Timeline = function () {\n\t        var options = Tone.defaults(arguments, ['memory'], Tone.Timeline);\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  The array of scheduled timeline events\n\t\t\t *  @type  {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._timeline = [];\n\t        /**\n\t\t\t *  The memory of the timeline, i.e.\n\t\t\t *  how many events in the past it will retain\n\t\t\t *  @type {Positive}\n\t\t\t */\n\t        this.memory = options.memory;\n\t    };\n\t    Tone.extend(Tone.Timeline);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @static\n\t\t *  @const\n\t\t */\n\t    Tone.Timeline.defaults = { 'memory': Infinity };\n\t    /**\n\t\t *  The number of items in the timeline.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Timeline#\n\t\t *  @name length\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Timeline.prototype, 'length', {\n\t        get: function () {\n\t            return this._timeline.length;\n\t        }\n\t    });\n\t    /**\n\t\t *  Insert an event object onto the timeline. Events must have a \"time\" attribute.\n\t\t *  @param  {Object}  event  The event object to insert into the\n\t\t *                           timeline.\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.add = function (event) {\n\t        //the event needs to have a time attribute\n\t        if (Tone.isUndef(event.time)) {\n\t            throw new Error('Tone.Timeline: events must have a time attribute');\n\t        }\n\t        event.time = event.time.valueOf();\n\t        var index = this._search(event.time);\n\t        this._timeline.splice(index + 1, 0, event);\n\t        //if the length is more than the memory, remove the previous ones\n\t        if (this.length > this.memory) {\n\t            var diff = this.length - this.memory;\n\t            this._timeline.splice(0, diff);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Remove an event from the timeline.\n\t\t *  @param  {Object}  event  The event object to remove from the list.\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.remove = function (event) {\n\t        var index = this._timeline.indexOf(event);\n\t        if (index !== -1) {\n\t            this._timeline.splice(index, 1);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Get the nearest event whose time is less than or equal to the given time.\n\t\t *  @param  {Number}  time  The time to query.\n\t\t *  @param  {String}  comparator Which value in the object to compare\n\t\t *  @returns {Object} The event object set after that time.\n\t\t */\n\t    Tone.Timeline.prototype.get = function (time, comparator) {\n\t        comparator = Tone.defaultArg(comparator, 'time');\n\t        var index = this._search(time, comparator);\n\t        if (index !== -1) {\n\t            return this._timeline[index];\n\t        } else {\n\t            return null;\n\t        }\n\t    };\n\t    /**\n\t\t *  Return the first event in the timeline without removing it\n\t\t *  @returns {Object} The first event object\n\t\t */\n\t    Tone.Timeline.prototype.peek = function () {\n\t        return this._timeline[0];\n\t    };\n\t    /**\n\t\t *  Return the first event in the timeline and remove it\n\t\t *  @returns {Object} The first event object\n\t\t */\n\t    Tone.Timeline.prototype.shift = function () {\n\t        return this._timeline.shift();\n\t    };\n\t    /**\n\t\t *  Get the event which is scheduled after the given time.\n\t\t *  @param  {Number}  time  The time to query.\n\t\t *  @param  {String}  comparator Which value in the object to compare\n\t\t *  @returns {Object} The event object after the given time\n\t\t */\n\t    Tone.Timeline.prototype.getAfter = function (time, comparator) {\n\t        comparator = Tone.defaultArg(comparator, 'time');\n\t        var index = this._search(time, comparator);\n\t        if (index + 1 < this._timeline.length) {\n\t            return this._timeline[index + 1];\n\t        } else {\n\t            return null;\n\t        }\n\t    };\n\t    /**\n\t\t *  Get the event before the event at the given time.\n\t\t *  @param  {Number}  time  The time to query.\n\t\t *  @param  {String}  comparator Which value in the object to compare\n\t\t *  @returns {Object} The event object before the given time\n\t\t */\n\t    Tone.Timeline.prototype.getBefore = function (time, comparator) {\n\t        comparator = Tone.defaultArg(comparator, 'time');\n\t        var len = this._timeline.length;\n\t        //if it's after the last item, return the last item\n\t        if (len > 0 && this._timeline[len - 1][comparator] < time) {\n\t            return this._timeline[len - 1];\n\t        }\n\t        var index = this._search(time, comparator);\n\t        if (index - 1 >= 0) {\n\t            return this._timeline[index - 1];\n\t        } else {\n\t            return null;\n\t        }\n\t    };\n\t    /**\n\t\t *  Cancel events after the given time\n\t\t *  @param  {Number}  time  The time to query.\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.cancel = function (after) {\n\t        if (this._timeline.length > 1) {\n\t            var index = this._search(after);\n\t            if (index >= 0) {\n\t                if (this._timeline[index].time === after) {\n\t                    //get the first item with that time\n\t                    for (var i = index; i >= 0; i--) {\n\t                        if (this._timeline[i].time === after) {\n\t                            index = i;\n\t                        } else {\n\t                            break;\n\t                        }\n\t                    }\n\t                    this._timeline = this._timeline.slice(0, index);\n\t                } else {\n\t                    this._timeline = this._timeline.slice(0, index + 1);\n\t                }\n\t            } else {\n\t                this._timeline = [];\n\t            }\n\t        } else if (this._timeline.length === 1) {\n\t            //the first item's time\n\t            if (this._timeline[0].time >= after) {\n\t                this._timeline = [];\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancel events before or equal to the given time.\n\t\t *  @param  {Number}  time  The time to cancel before.\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.cancelBefore = function (time) {\n\t        var index = this._search(time);\n\t        if (index >= 0) {\n\t            this._timeline = this._timeline.slice(index + 1);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * Returns the previous event if there is one. null otherwise\n\t\t * @param  {Object} event The event to find the previous one of\n\t\t * @return {Object}       The event right before the given event\n\t\t */\n\t    Tone.Timeline.prototype.previousEvent = function (event) {\n\t        var index = this._timeline.indexOf(event);\n\t        if (index > 0) {\n\t            return this._timeline[index - 1];\n\t        } else {\n\t            return null;\n\t        }\n\t    };\n\t    /**\n\t\t *  Does a binary search on the timeline array and returns the\n\t\t *  nearest event index whose time is after or equal to the given time.\n\t\t *  If a time is searched before the first index in the timeline, -1 is returned.\n\t\t *  If the time is after the end, the index of the last item is returned.\n\t\t *  @param  {Number}  time\n\t\t *  @param  {String}  comparator Which value in the object to compare\n\t\t *  @return  {Number} the index in the timeline array\n\t\t *  @private\n\t\t */\n\t    Tone.Timeline.prototype._search = function (time, comparator) {\n\t        if (this._timeline.length === 0) {\n\t            return -1;\n\t        }\n\t        comparator = Tone.defaultArg(comparator, 'time');\n\t        var beginning = 0;\n\t        var len = this._timeline.length;\n\t        var end = len;\n\t        if (len > 0 && this._timeline[len - 1][comparator] <= time) {\n\t            return len - 1;\n\t        }\n\t        while (beginning < end) {\n\t            // calculate the midpoint for roughly equal partition\n\t            var midPoint = Math.floor(beginning + (end - beginning) / 2);\n\t            var event = this._timeline[midPoint];\n\t            var nextEvent = this._timeline[midPoint + 1];\n\t            if (event[comparator] === time) {\n\t                //choose the last one that has the same time\n\t                for (var i = midPoint; i < this._timeline.length; i++) {\n\t                    var testEvent = this._timeline[i];\n\t                    if (testEvent[comparator] === time) {\n\t                        midPoint = i;\n\t                    }\n\t                }\n\t                return midPoint;\n\t            } else if (event[comparator] < time && nextEvent[comparator] > time) {\n\t                return midPoint;\n\t            } else if (event[comparator] > time) {\n\t                //search lower\n\t                end = midPoint;\n\t            } else {\n\t                //search upper\n\t                beginning = midPoint + 1;\n\t            }\n\t        }\n\t        return -1;\n\t    };\n\t    /**\n\t\t *  Internal iterator. Applies extra safety checks for\n\t\t *  removing items from the array.\n\t\t *  @param  {Function}  callback\n\t\t *  @param  {Number=}    lowerBound\n\t\t *  @param  {Number=}    upperBound\n\t\t *  @private\n\t\t */\n\t    Tone.Timeline.prototype._iterate = function (callback, lowerBound, upperBound) {\n\t        lowerBound = Tone.defaultArg(lowerBound, 0);\n\t        upperBound = Tone.defaultArg(upperBound, this._timeline.length - 1);\n\t        this._timeline.slice(lowerBound, upperBound + 1).forEach(function (event) {\n\t            callback.call(this, event);\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t *  Iterate over everything in the array\n\t\t *  @param  {Function}  callback The callback to invoke with every item\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.forEach = function (callback) {\n\t        this._iterate(callback);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Iterate over everything in the array at or before the given time.\n\t\t *  @param  {Number}  time The time to check if items are before\n\t\t *  @param  {Function}  callback The callback to invoke with every item\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.forEachBefore = function (time, callback) {\n\t        //iterate over the items in reverse so that removing an item doesn't break things\n\t        var upperBound = this._search(time);\n\t        if (upperBound !== -1) {\n\t            this._iterate(callback, 0, upperBound);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Iterate over everything in the array after the given time.\n\t\t *  @param  {Number}  time The time to check if items are before\n\t\t *  @param  {Function}  callback The callback to invoke with every item\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.forEachAfter = function (time, callback) {\n\t        //iterate over the items in reverse so that removing an item doesn't break things\n\t        var lowerBound = this._search(time);\n\t        this._iterate(callback, lowerBound + 1);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Iterate over everything in the array between the startTime and endTime. \n\t\t *  The timerange is inclusive of the startTime, but exclusive of the endTime. \n\t\t *  range = [startTime, endTime). \n\t\t *  @param  {Number}  startTime The time to check if items are before\n\t\t *  @param  {Number}  endTime The end of the test interval. \n\t\t *  @param  {Function}  callback The callback to invoke with every item\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.forEachBetween = function (startTime, endTime, callback) {\n\t        var lowerBound = this._search(startTime);\n\t        var upperBound = this._search(endTime);\n\t        if (lowerBound !== -1 && upperBound !== -1) {\n\t            if (this._timeline[lowerBound].time !== startTime) {\n\t                lowerBound += 1;\n\t            }\n\t            //exclusive of the end time\n\t            if (this._timeline[upperBound].time === endTime) {\n\t                upperBound -= 1;\n\t            }\n\t            this._iterate(callback, lowerBound, upperBound);\n\t        } else if (lowerBound === -1) {\n\t            this._iterate(callback, 0, upperBound);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Iterate over everything in the array at or after the given time. Similar to\n\t\t *  forEachAfter, but includes the item(s) at the given time.\n\t\t *  @param  {Number}  time The time to check if items are before\n\t\t *  @param  {Function}  callback The callback to invoke with every item\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.forEachFrom = function (time, callback) {\n\t        //iterate over the items in reverse so that removing an item doesn't break things\n\t        var lowerBound = this._search(time);\n\t        //work backwards until the event time is less than time\n\t        while (lowerBound >= 0 && this._timeline[lowerBound].time >= time) {\n\t            lowerBound--;\n\t        }\n\t        this._iterate(callback, lowerBound + 1);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Iterate over everything in the array at the given time\n\t\t *  @param  {Number}  time The time to check if items are before\n\t\t *  @param  {Function}  callback The callback to invoke with every item\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.forEachAtTime = function (time, callback) {\n\t        //iterate over the items in reverse so that removing an item doesn't break things\n\t        var upperBound = this._search(time);\n\t        if (upperBound !== -1) {\n\t            this._iterate(function (event) {\n\t                if (event.time === time) {\n\t                    callback.call(this, event);\n\t                }\n\t            }, 0, upperBound);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.Timeline}  this\n\t\t */\n\t    Tone.Timeline.prototype.dispose = function () {\n\t        Tone.prototype.dispose.call(this);\n\t        this._timeline = null;\n\t        return this;\n\t    };\n\t    return Tone.Timeline;\n\t});\n\tModule(function (Tone) {\n\t    if (Tone.supported) {\n\t        if (!window.hasOwnProperty('OfflineAudioContext') && window.hasOwnProperty('webkitOfflineAudioContext')) {\n\t            window.OfflineAudioContext = window.webkitOfflineAudioContext;\n\t        }\n\t        //returns promise?\n\t        var context = new OfflineAudioContext(1, 1, 44100);\n\t        var ret = context.startRendering();\n\t        if (!(ret instanceof Promise)) {\n\t            OfflineAudioContext.prototype._native_startRendering = OfflineAudioContext.prototype.startRendering;\n\t            OfflineAudioContext.prototype.startRendering = function () {\n\t                return new Promise(function (done) {\n\t                    this.oncomplete = function (e) {\n\t                        done(e.renderedBuffer);\n\t                    };\n\t                    this._native_startRendering();\n\t                }.bind(this));\n\t            };\n\t        }\n\t    }\n\t});\n\tModule(function (Tone) {\n\t    if (Tone.supported) {\n\t        if (!window.hasOwnProperty('AudioContext') && window.hasOwnProperty('webkitAudioContext')) {\n\t            window.AudioContext = window.webkitAudioContext;\n\t        }\n\t        //not functionally equivalent, but only an API placeholder\n\t        if (!AudioContext.prototype.close) {\n\t            AudioContext.prototype.close = function () {\n\t                if (Tone.isFunction(this.suspend)) {\n\t                    this.suspend();\n\t                }\n\t                return Promise.resolve();\n\t            };\n\t        }\n\t        //not functionally equivalent\n\t        if (!AudioContext.prototype.resume) {\n\t            AudioContext.prototype.resume = function () {\n\t                return Promise.resolve();\n\t            };\n\t        }\n\t        //createGain\n\t        if (!AudioContext.prototype.createGain && AudioContext.prototype.createGainNode) {\n\t            AudioContext.prototype.createGain = AudioContext.prototype.createGainNode;\n\t        }\n\t        //createDelay\n\t        if (!AudioContext.prototype.createDelay && AudioContext.prototype.createDelayNode) {\n\t            AudioContext.prototype.createDelay = AudioContext.prototype.createDelayNode;\n\t        }\n\t        //test decodeAudioData returns a promise\n\t        // https://github.com/mohayonao/web-audio-api-shim/blob/master/src/AudioContext.js\n\t        // MIT License (c) 2015 @mohayonao\n\t        var decodeAudioDataPromise = false;\n\t        var offlineContext = new OfflineAudioContext(1, 1, 44100);\n\t        var audioData = new Uint32Array([\n\t            1179011410,\n\t            48,\n\t            1163280727,\n\t            544501094,\n\t            16,\n\t            131073,\n\t            44100,\n\t            176400,\n\t            1048580,\n\t            1635017060,\n\t            8,\n\t            0,\n\t            0,\n\t            0,\n\t            0\n\t        ]).buffer;\n\t        try {\n\t            var ret = offlineContext.decodeAudioData(audioData);\n\t            if (ret instanceof Promise) {\n\t                decodeAudioDataPromise = true;\n\t            }\n\t        } catch (e) {\n\t            decodeAudioDataPromise = false;\n\t        }\n\t        if (!decodeAudioDataPromise) {\n\t            AudioContext.prototype._native_decodeAudioData = AudioContext.prototype.decodeAudioData;\n\t            AudioContext.prototype.decodeAudioData = function (audioData) {\n\t                return new Promise(function (success, error) {\n\t                    this._native_decodeAudioData(audioData, success, error);\n\t                }.bind(this));\n\t            };\n\t        }\n\t    }\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Wrapper around the native AudioContext.\n\t\t *  @extends {Tone.Emitter}\n\t\t *  @param {AudioContext=} context optionally pass in a context\n\t\t */\n\t    Tone.Context = function () {\n\t        Tone.Emitter.call(this);\n\t        var options = Tone.defaults(arguments, ['context'], Tone.Context);\n\t        if (!options.context) {\n\t            options.context = new window.AudioContext();\n\t            if (!options.context) {\n\t                throw new Error('could not create AudioContext. Possibly too many AudioContexts running already.');\n\t            }\n\t        }\n\t        this._context = options.context;\n\t        // extend all of the methods\n\t        for (var prop in this._context) {\n\t            this._defineProperty(this._context, prop);\n\t        }\n\t        /**\n\t\t\t *  The default latency hint\n\t\t\t *  @type  {String}\n\t\t\t *  @private\n\t\t\t */\n\t        this._latencyHint = options.latencyHint;\n\t        /**\n\t\t\t *  An object containing all of the constants AudioBufferSourceNodes\n\t\t\t *  @type  {Object}\n\t\t\t *  @private\n\t\t\t */\n\t        this._constants = {};\n\t        ///////////////////////////////////////////////////////////////////////\n\t        // WORKER\n\t        ///////////////////////////////////////////////////////////////////////\n\t        /**\n\t\t\t *  The amount of time events are scheduled\n\t\t\t *  into the future\n\t\t\t *  @type  {Number}\n\t\t\t */\n\t        this.lookAhead = options.lookAhead;\n\t        /**\n\t\t\t *  A reference to the actual computed update interval\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._computedUpdateInterval = 0;\n\t        /**\n\t\t\t *  A reliable callback method\n\t\t\t *  @private\n\t\t\t *  @type  {Ticker}\n\t\t\t */\n\t        this._ticker = new Ticker(this.emit.bind(this, 'tick'), options.clockSource, options.updateInterval);\n\t        ///////////////////////////////////////////////////////////////////////\n\t        // TIMEOUTS\n\t        ///////////////////////////////////////////////////////////////////////\n\t        /**\n\t\t\t *  All of the setTimeout events.\n\t\t\t *  @type  {Tone.Timeline}\n\t\t\t *  @private\n\t\t\t */\n\t        this._timeouts = new Tone.Timeline();\n\t        /**\n\t\t\t *  The timeout id counter\n\t\t\t *  @private\n\t\t\t *  @type {Number}\n\t\t\t */\n\t        this._timeoutIds = 0;\n\t        this.on('tick', this._timeoutLoop.bind(this));\n\t    };\n\t    Tone.extend(Tone.Context, Tone.Emitter);\n\t    Tone.Emitter.mixin(Tone.Context);\n\t    /**\n\t\t * defaults\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t    Tone.Context.defaults = {\n\t        'clockSource': 'worker',\n\t        'latencyHint': 'interactive',\n\t        'lookAhead': 0.1,\n\t        'updateInterval': 0.03\n\t    };\n\t    /**\n\t\t *  Define a property on this Tone.Context.\n\t\t *  This is used to extend the native AudioContext\n\t\t *  @param  {AudioContext}  context\n\t\t *  @param  {String}  prop\n\t\t *  @private\n\t\t */\n\t    Tone.Context.prototype._defineProperty = function (context, prop) {\n\t        if (Tone.isUndef(this[prop])) {\n\t            Object.defineProperty(this, prop, {\n\t                get: function () {\n\t                    if (typeof context[prop] === 'function') {\n\t                        return context[prop].bind(context);\n\t                    } else {\n\t                        return context[prop];\n\t                    }\n\t                },\n\t                set: function (val) {\n\t                    context[prop] = val;\n\t                }\n\t            });\n\t        }\n\t    };\n\t    /**\n\t\t *  The current audio context time\n\t\t *  @return  {Number}\n\t\t */\n\t    Tone.Context.prototype.now = function () {\n\t        return this._context.currentTime + this.lookAhead;\n\t    };\n\t    /**\n\t\t *  Promise which is invoked when the context is running.\n\t\t *  Tries to resume the context if it's not started.\n\t\t *  @return  {Promise}\n\t\t */\n\t    Tone.Context.prototype.ready = function () {\n\t        return new Promise(function (done) {\n\t            if (this._context.state === 'running') {\n\t                done();\n\t            } else {\n\t                this._context.resume().then(function () {\n\t                    done();\n\t                });\n\t            }\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t *  Promise which is invoked when the context is running.\n\t\t *  Tries to resume the context if it's not started.\n\t\t *  @return  {Promise}\n\t\t */\n\t    Tone.Context.prototype.close = function () {\n\t        return this._context.close().then(function () {\n\t            Tone.Context.emit('close', this);\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t *  Generate a looped buffer at some constant value.\n\t\t *  @param  {Number}  val\n\t\t *  @return  {BufferSourceNode}\n\t\t */\n\t    Tone.Context.prototype.getConstant = function (val) {\n\t        if (this._constants[val]) {\n\t            return this._constants[val];\n\t        } else {\n\t            var buffer = this._context.createBuffer(1, 128, this._context.sampleRate);\n\t            var arr = buffer.getChannelData(0);\n\t            for (var i = 0; i < arr.length; i++) {\n\t                arr[i] = val;\n\t            }\n\t            var constant = this._context.createBufferSource();\n\t            constant.channelCount = 1;\n\t            constant.channelCountMode = 'explicit';\n\t            constant.buffer = buffer;\n\t            constant.loop = true;\n\t            constant.start(0);\n\t            this._constants[val] = constant;\n\t            return constant;\n\t        }\n\t    };\n\t    /**\n\t\t *  The private loop which keeps track of the context scheduled timeouts\n\t\t *  Is invoked from the clock source\n\t\t *  @private\n\t\t */\n\t    Tone.Context.prototype._timeoutLoop = function () {\n\t        var now = this.now();\n\t        while (this._timeouts && this._timeouts.length && this._timeouts.peek().time <= now) {\n\t            this._timeouts.shift().callback();\n\t        }\n\t    };\n\t    /**\n\t\t *  A setTimeout which is gaurenteed by the clock source.\n\t\t *  Also runs in the offline context.\n\t\t *  @param  {Function}  fn       The callback to invoke\n\t\t *  @param  {Seconds}    timeout  The timeout in seconds\n\t\t *  @returns {Number} ID to use when invoking Tone.Context.clearTimeout\n\t\t */\n\t    Tone.Context.prototype.setTimeout = function (fn, timeout) {\n\t        this._timeoutIds++;\n\t        var now = this.now();\n\t        this._timeouts.add({\n\t            callback: fn,\n\t            time: now + timeout,\n\t            id: this._timeoutIds\n\t        });\n\t        return this._timeoutIds;\n\t    };\n\t    /**\n\t\t *  Clears a previously scheduled timeout with Tone.context.setTimeout\n\t\t *  @param  {Number}  id  The ID returned from setTimeout\n\t\t *  @return  {Tone.Context}  this\n\t\t */\n\t    Tone.Context.prototype.clearTimeout = function (id) {\n\t        this._timeouts.forEach(function (event) {\n\t            if (event.id === id) {\n\t                this.remove(event);\n\t            }\n\t        });\n\t        return this;\n\t    };\n\t    /**\n\t\t *  How often the Web Worker callback is invoked.\n\t\t *  This number corresponds to how responsive the scheduling\n\t\t *  can be. Context.updateInterval + Context.lookAhead gives you the\n\t\t *  total latency between scheduling an event and hearing it.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Context#\n\t\t *  @name updateInterval\n\t\t */\n\t    Object.defineProperty(Tone.Context.prototype, 'updateInterval', {\n\t        get: function () {\n\t            return this._ticker.updateInterval;\n\t        },\n\t        set: function (interval) {\n\t            this._ticker.updateInterval = interval;\n\t        }\n\t    });\n\t    /**\n\t\t *  What the source of the clock is, either \"worker\" (Web Worker [default]),\n\t\t *  \"timeout\" (setTimeout), or \"offline\" (none).\n\t\t *  @type {String}\n\t\t *  @memberOf Tone.Context#\n\t\t *  @name clockSource\n\t\t */\n\t    Object.defineProperty(Tone.Context.prototype, 'clockSource', {\n\t        get: function () {\n\t            return this._ticker.type;\n\t        },\n\t        set: function (type) {\n\t            this._ticker.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t *  The type of playback, which affects tradeoffs between audio\n\t\t *  output latency and responsiveness.\n\t\t *\n\t\t *  In addition to setting the value in seconds, the latencyHint also\n\t\t *  accepts the strings \"interactive\" (prioritizes low latency),\n\t\t *  \"playback\" (prioritizes sustained playback), \"balanced\" (balances\n\t\t *  latency and performance), and \"fastest\" (lowest latency, might glitch more often).\n\t\t *  @type {String|Seconds}\n\t\t *  @memberOf Tone.Context#\n\t\t *  @name latencyHint\n\t\t *  @example\n\t\t * //set the lookAhead to 0.3 seconds\n\t\t * Tone.context.latencyHint = 0.3;\n\t\t */\n\t    Object.defineProperty(Tone.Context.prototype, 'latencyHint', {\n\t        get: function () {\n\t            return this._latencyHint;\n\t        },\n\t        set: function (hint) {\n\t            var lookAhead = hint;\n\t            this._latencyHint = hint;\n\t            if (Tone.isString(hint)) {\n\t                switch (hint) {\n\t                case 'interactive':\n\t                    lookAhead = 0.1;\n\t                    this._context.latencyHint = hint;\n\t                    break;\n\t                case 'playback':\n\t                    lookAhead = 0.8;\n\t                    this._context.latencyHint = hint;\n\t                    break;\n\t                case 'balanced':\n\t                    lookAhead = 0.25;\n\t                    this._context.latencyHint = hint;\n\t                    break;\n\t                case 'fastest':\n\t                    this._context.latencyHint = 'interactive';\n\t                    lookAhead = 0.01;\n\t                    break;\n\t                }\n\t            }\n\t            this.lookAhead = lookAhead;\n\t            this.updateInterval = lookAhead / 3;\n\t        }\n\t    });\n\t    /**\n\t\t *  Unlike other dispose methods, this returns a Promise\n\t\t *  which executes when the context is closed and disposed\n\t\t *  @returns {Promise} this\n\t\t */\n\t    Tone.Context.prototype.dispose = function () {\n\t        return this.close().then(function () {\n\t            Tone.Emitter.prototype.dispose.call(this);\n\t            this._ticker.dispose();\n\t            this._ticker = null;\n\t            this._timeouts.dispose();\n\t            this._timeouts = null;\n\t            for (var con in this._constants) {\n\t                this._constants[con].disconnect();\n\t            }\n\t            this._constants = null;\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t * @class A class which provides a reliable callback using either\n\t\t *        a Web Worker, or if that isn't supported, falls back to setTimeout.\n\t\t * @private\n\t\t */\n\t    var Ticker = function (callback, type, updateInterval) {\n\t        /**\n\t\t\t * Either \"worker\" or \"timeout\"\n\t\t\t * @type {String}\n\t\t\t * @private\n\t\t\t */\n\t        this._type = type;\n\t        /**\n\t\t\t * The update interval of the worker\n\t\t\t * @private\n\t\t\t * @type {Number}\n\t\t\t */\n\t        this._updateInterval = updateInterval;\n\t        /**\n\t\t\t * The callback to invoke at regular intervals\n\t\t\t * @type {Function}\n\t\t\t * @private\n\t\t\t */\n\t        this._callback = Tone.defaultArg(callback, Tone.noOp);\n\t        //create the clock source for the first time\n\t        this._createClock();\n\t    };\n\t    /**\n\t\t * The possible ticker types\n\t\t * @private\n\t\t * @type {Object}\n\t\t */\n\t    Ticker.Type = {\n\t        Worker: 'worker',\n\t        Timeout: 'timeout',\n\t        Offline: 'offline'\n\t    };\n\t    /**\n\t\t *  Generate a web worker\n\t\t *  @return  {WebWorker}\n\t\t *  @private\n\t\t */\n\t    Ticker.prototype._createWorker = function () {\n\t        //URL Shim\n\t        window.URL = window.URL || window.webkitURL;\n\t        var blob = new Blob([//the initial timeout time\n\t            'var timeoutTime = ' + (this._updateInterval * 1000).toFixed(1) + ';' + //onmessage callback\n\t            'self.onmessage = function(msg){' + '\\ttimeoutTime = parseInt(msg.data);' + '};' + //the tick function which posts a message\n\t            //and schedules a new tick\n\t            'function tick(){' + '\\tsetTimeout(tick, timeoutTime);' + '\\tself.postMessage(\\'tick\\');' + '}' + //call tick initially\n\t            'tick();']);\n\t        var blobUrl = URL.createObjectURL(blob);\n\t        var worker = new Worker(blobUrl);\n\t        worker.onmessage = this._callback.bind(this);\n\t        this._worker = worker;\n\t    };\n\t    /**\n\t\t * Create a timeout loop\n\t\t * @private\n\t\t */\n\t    Ticker.prototype._createTimeout = function () {\n\t        this._timeout = setTimeout(function () {\n\t            this._createTimeout();\n\t            this._callback();\n\t        }.bind(this), this._updateInterval * 1000);\n\t    };\n\t    /**\n\t\t * Create the clock source.\n\t\t * @private\n\t\t */\n\t    Ticker.prototype._createClock = function () {\n\t        if (this._type === Ticker.Type.Worker) {\n\t            try {\n\t                this._createWorker();\n\t            } catch (e) {\n\t                // workers not supported, fallback to timeout\n\t                this._type = Ticker.Type.Timeout;\n\t                this._createClock();\n\t            }\n\t        } else if (this._type === Ticker.Type.Timeout) {\n\t            this._createTimeout();\n\t        }\n\t    };\n\t    /**\n\t\t * @memberOf Ticker#\n\t\t * @type {Number}\n\t\t * @name updateInterval\n\t\t * @private\n\t\t */\n\t    Object.defineProperty(Ticker.prototype, 'updateInterval', {\n\t        get: function () {\n\t            return this._updateInterval;\n\t        },\n\t        set: function (interval) {\n\t            this._updateInterval = Math.max(interval, 128 / 44100);\n\t            if (this._type === Ticker.Type.Worker) {\n\t                this._worker.postMessage(Math.max(interval * 1000, 1));\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The type of the ticker, either a worker or a timeout\n\t\t * @memberOf Ticker#\n\t\t * @type {Number}\n\t\t * @name type\n\t\t * @private\n\t\t */\n\t    Object.defineProperty(Ticker.prototype, 'type', {\n\t        get: function () {\n\t            return this._type;\n\t        },\n\t        set: function (type) {\n\t            this._disposeClock();\n\t            this._type = type;\n\t            this._createClock();\n\t        }\n\t    });\n\t    /**\n\t\t * Clean up the current clock source\n\t\t * @private\n\t\t */\n\t    Ticker.prototype._disposeClock = function () {\n\t        if (this._timeout) {\n\t            clearTimeout(this._timeout);\n\t            this._timeout = null;\n\t        }\n\t        if (this._worker) {\n\t            this._worker.terminate();\n\t            this._worker.onmessage = null;\n\t            this._worker = null;\n\t        }\n\t    };\n\t    /**\n\t\t * Clean up\n\t\t * @private\n\t\t */\n\t    Ticker.prototype.dispose = function () {\n\t        this._disposeClock();\n\t        this._callback = null;\n\t    };\n\t    /**\n\t\t *  Shim all connect/disconnect and some deprecated methods which are still in\n\t\t *  some older implementations.\n\t\t *  @private\n\t\t */\n\t    Tone.getContext(function () {\n\t        var nativeConnect = AudioNode.prototype.connect;\n\t        var nativeDisconnect = AudioNode.prototype.disconnect;\n\t        //replace the old connect method\n\t        function toneConnect(B, outNum, inNum) {\n\t            if (B.input) {\n\t                inNum = Tone.defaultArg(inNum, 0);\n\t                if (Tone.isArray(B.input)) {\n\t                    return this.connect(B.input[inNum]);\n\t                } else {\n\t                    return this.connect(B.input, outNum, inNum);\n\t                }\n\t            } else {\n\t                try {\n\t                    if (B instanceof AudioNode) {\n\t                        nativeConnect.call(this, B, outNum, inNum);\n\t                        return B;\n\t                    } else {\n\t                        nativeConnect.call(this, B, outNum);\n\t                        return B;\n\t                    }\n\t                } catch (e) {\n\t                    throw new Error('error connecting to node: ' + B + '\\n' + e);\n\t                }\n\t            }\n\t        }\n\t        //replace the old disconnect method\n\t        function toneDisconnect(B, outNum, inNum) {\n\t            if (B && B.input && Tone.isArray(B.input)) {\n\t                inNum = Tone.defaultArg(inNum, 0);\n\t                this.disconnect(B.input[inNum], outNum, 0);\n\t            } else if (B && B.input) {\n\t                this.disconnect(B.input, outNum, inNum);\n\t            } else {\n\t                try {\n\t                    nativeDisconnect.apply(this, arguments);\n\t                } catch (e) {\n\t                    throw new Error('error disconnecting node: ' + B + '\\n' + e);\n\t                }\n\t            }\n\t        }\n\t        if (AudioNode.prototype.connect !== toneConnect) {\n\t            AudioNode.prototype.connect = toneConnect;\n\t            AudioNode.prototype.disconnect = toneDisconnect;\n\t        }\n\t    });\n\t    // set the audio context initially, and if one is not already created\n\t    if (Tone.supported && !Tone.initialized) {\n\t        Tone.context = new Tone.Context();\n\t        // log on first initialization\n\t        // allow optional silencing of this log\n\t        if (!window.TONE_SILENCE_VERSION_LOGGING) {\n\t            // eslint-disable-next-line no-console\n\t            console.log('%c * Tone.js ' + Tone.version + ' * ', 'background: #000; color: #fff');\n\t        }\n\t    } else if (!Tone.supported) {\n\t        // eslint-disable-next-line no-console\n\t        console.warn('This browser does not support Tone.js');\n\t    }\n\t    return Tone.Context;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.AudioNode is the base class for classes which process audio.\n\t\t *         AudioNodes have inputs and outputs.\n\t\t *  @param\t{AudioContext=} context\tThe audio context to use with the class\n\t\t *  @extends {Tone}\n\t\t */\n\t    Tone.AudioNode = function () {\n\t        Tone.call(this);\n\t        //use the default context if one is not passed in\n\t        var options = Tone.defaults(arguments, ['context'], { 'context': Tone.context });\n\t        /**\n\t\t\t * The AudioContext of this instance\n\t\t\t * @private\n\t\t\t * @type {AudioContext}\n\t\t\t */\n\t        this._context = options.context;\n\t    };\n\t    Tone.extend(Tone.AudioNode);\n\t    /**\n\t\t * Get the audio context belonging to this instance.\n\t\t * @type {Tone.Context}\n\t\t * @memberOf Tone.AudioNode#\n\t\t * @name context\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.AudioNode.prototype, 'context', {\n\t        get: function () {\n\t            return this._context;\n\t        }\n\t    });\n\t    /**\n\t\t *  Create input and outputs for this object.\n\t\t *  @param  {Number}  [input=0]   The number of inputs\n\t\t *  @param  {Number}  [outputs=0]  The number of outputs\n\t\t *  @return  {Tone.AudioNode}  this\n\t\t *  @private\n\t\t */\n\t    Tone.AudioNode.prototype.createInsOuts = function (inputs, outputs) {\n\t        if (inputs === 1) {\n\t            this.input = this.context.createGain();\n\t        } else if (inputs > 1) {\n\t            this.input = new Array(inputs);\n\t        }\n\t        if (outputs === 1) {\n\t            this.output = this.context.createGain();\n\t        } else if (outputs > 1) {\n\t            this.output = new Array(outputs);\n\t        }\n\t    };\n\t    /**\n\t\t *  channelCount is the number of channels used when up-mixing and down-mixing\n\t\t *  connections to any inputs to the node. The default value is 2 except for\n\t\t *  specific nodes where its value is specially determined.\n\t\t *\n\t\t *  @memberof Tone.AudioNode#\n\t\t *  @type {Number}\n\t\t *  @name channelCount\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.AudioNode.prototype, 'channelCount', {\n\t        get: function () {\n\t            return this.output.channelCount;\n\t        },\n\t        set: function (c) {\n\t            return this.output.channelCount = c;\n\t        }\n\t    });\n\t    /**\n\t\t *  channelCountMode determines how channels will be counted when up-mixing and\n\t\t *  down-mixing connections to any inputs to the node.\n\t\t *  The default value is \"max\". This attribute has no effect for nodes with no inputs.\n\t\t *  @memberof Tone.AudioNode#\n\t\t *  @type {String}\n\t\t *  @name channelCountMode\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.AudioNode.prototype, 'channelCountMode', {\n\t        get: function () {\n\t            return this.output.channelCountMode;\n\t        },\n\t        set: function (m) {\n\t            return this.output.channelCountMode = m;\n\t        }\n\t    });\n\t    /**\n\t\t *  channelInterpretation determines how individual channels will be treated\n\t\t *  when up-mixing and down-mixing connections to any inputs to the node.\n\t\t *  The default value is \"speakers\".\n\t\t *  @memberof Tone.AudioNode#\n\t\t *  @type {String}\n\t\t *  @name channelInterpretation\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.AudioNode.prototype, 'channelInterpretation', {\n\t        get: function () {\n\t            return this.output.channelInterpretation;\n\t        },\n\t        set: function (i) {\n\t            return this.output.channelInterpretation = i;\n\t        }\n\t    });\n\t    /**\n\t\t *  The number of inputs feeding into the AudioNode.\n\t\t *  For source nodes, this will be 0.\n\t\t *  @type {Number}\n\t\t *  @name numberOfInputs\n\t\t *  @memberof Tone.AudioNode#\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.AudioNode.prototype, 'numberOfInputs', {\n\t        get: function () {\n\t            if (this.input) {\n\t                if (Tone.isArray(this.input)) {\n\t                    return this.input.length;\n\t                } else {\n\t                    return 1;\n\t                }\n\t            } else {\n\t                return 0;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  The number of outputs coming out of the AudioNode.\n\t\t *  @type {Number}\n\t\t *  @name numberOfOutputs\n\t\t *  @memberof Tone.AudioNode#\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.AudioNode.prototype, 'numberOfOutputs', {\n\t        get: function () {\n\t            if (this.output) {\n\t                if (Tone.isArray(this.output)) {\n\t                    return this.output.length;\n\t                } else {\n\t                    return 1;\n\t                }\n\t            } else {\n\t                return 0;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * Called when an audio param connects to this node\n\t\t * @private\n\t\t */\n\t    Tone.AudioNode.prototype._onConnect = function () {\n\t    };\n\t    /**\n\t\t *  connect the output of a ToneNode to an AudioParam, AudioNode, or ToneNode\n\t\t *  @param  {Tone | AudioParam | AudioNode} unit\n\t\t *  @param {number} [outputNum=0] optionally which output to connect from\n\t\t *  @param {number} [inputNum=0] optionally which input to connect to\n\t\t *  @returns {Tone.AudioNode} this\n\t\t */\n\t    Tone.AudioNode.prototype.connect = function (unit, outputNum, inputNum) {\n\t        if (unit._onConnect) {\n\t            unit._onConnect(this);\n\t        }\n\t        if (Tone.isArray(this.output)) {\n\t            outputNum = Tone.defaultArg(outputNum, 0);\n\t            this.output[outputNum].connect(unit, 0, inputNum);\n\t        } else {\n\t            this.output.connect(unit, outputNum, inputNum);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  disconnect the output\n\t\t *  @param {Number|AudioNode} output Either the output index to disconnect\n\t\t *                                   if the output is an array, or the\n\t\t *                                   node to disconnect from.\n\t\t *  @returns {Tone.AudioNode} this\n\t\t */\n\t    Tone.AudioNode.prototype.disconnect = function (destination, outputNum, inputNum) {\n\t        if (Tone.isArray(this.output)) {\n\t            if (Tone.isNumber(destination)) {\n\t                this.output[destination].disconnect();\n\t            } else {\n\t                outputNum = Tone.defaultArg(outputNum, 0);\n\t                this.output[outputNum].disconnect(destination, 0, inputNum);\n\t            }\n\t        } else {\n\t            this.output.disconnect.apply(this.output, arguments);\n\t        }\n\t    };\n\t    /**\n\t\t *  Connect the output of this node to the rest of the nodes in series.\n\t\t *  @example\n\t\t *  //connect a node to an effect, panVol and then to the master output\n\t\t *  node.chain(effect, panVol, Tone.Master);\n\t\t *  @param {...AudioParam|Tone|AudioNode} nodes\n\t\t *  @returns {Tone.AudioNode} this\n\t\t *  @private\n\t\t */\n\t    Tone.AudioNode.prototype.chain = function () {\n\t        var currentUnit = this;\n\t        for (var i = 0; i < arguments.length; i++) {\n\t            var toUnit = arguments[i];\n\t            currentUnit.connect(toUnit);\n\t            currentUnit = toUnit;\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  connect the output of this node to the rest of the nodes in parallel.\n\t\t *  @param {...AudioParam|Tone|AudioNode} nodes\n\t\t *  @returns {Tone.AudioNode} this\n\t\t *  @private\n\t\t */\n\t    Tone.AudioNode.prototype.fan = function () {\n\t        for (var i = 0; i < arguments.length; i++) {\n\t            this.connect(arguments[i]);\n\t        }\n\t        return this;\n\t    };\n\t    if (window.AudioNode) {\n\t        //give native nodes chain and fan methods\n\t        AudioNode.prototype.chain = Tone.AudioNode.prototype.chain;\n\t        AudioNode.prototype.fan = Tone.AudioNode.prototype.fan;\n\t    }\n\t    /**\n\t\t * Dispose and disconnect\n\t\t * @return {Tone.AudioNode} this\n\t\t */\n\t    Tone.AudioNode.prototype.dispose = function () {\n\t        if (Tone.isDefined(this.input)) {\n\t            if (this.input instanceof AudioNode) {\n\t                this.input.disconnect();\n\t            }\n\t            this.input = null;\n\t        }\n\t        if (Tone.isDefined(this.output)) {\n\t            if (this.output instanceof AudioNode) {\n\t                this.output.disconnect();\n\t            }\n\t            this.output = null;\n\t        }\n\t        this._context = null;\n\t        return this;\n\t    };\n\t    return Tone.AudioNode;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Base class for all Signals. Used Internally.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone}\n\t\t */\n\t    Tone.SignalBase = function () {\n\t        Tone.AudioNode.call(this);\n\t    };\n\t    Tone.extend(Tone.SignalBase, Tone.AudioNode);\n\t    /**\n\t\t *  When signals connect to other signals or AudioParams,\n\t\t *  they take over the output value of that signal or AudioParam.\n\t\t *  For all other nodes, the behavior is the same as a default <code>connect</code>.\n\t\t *\n\t\t *  @override\n\t\t *  @param {AudioParam|AudioNode|Tone.Signal|Tone} node\n\t\t *  @param {number} [outputNumber=0] The output number to connect from.\n\t\t *  @param {number} [inputNumber=0] The input number to connect to.\n\t\t *  @returns {Tone.SignalBase} this\n\t\t */\n\t    Tone.SignalBase.prototype.connect = function (node, outputNumber, inputNumber) {\n\t        //zero it out so that the signal can have full control\n\t        if (Tone.Signal && Tone.Signal === node.constructor || Tone.Param && Tone.Param === node.constructor) {\n\t            //cancel changes\n\t            node._param.cancelScheduledValues(0);\n\t            //reset the value\n\t            node._param.value = 0;\n\t            //mark the value as overridden\n\t            node.overridden = true;\n\t        } else if (node instanceof AudioParam) {\n\t            node.cancelScheduledValues(0);\n\t            node.value = 0;\n\t        }\n\t        Tone.AudioNode.prototype.connect.call(this, node, outputNumber, inputNumber);\n\t        return this;\n\t    };\n\t    return Tone.SignalBase;\n\t});\n\tModule(function (Tone) {\n\t    if (Tone.supported) {\n\t        //fixes safari only bug which is still present in 11\n\t        var ua = navigator.userAgent.toLowerCase();\n\t        var isSafari = ua.includes('safari') && !ua.includes('chrome');\n\t        if (isSafari) {\n\t            var WaveShaperNode = function (context) {\n\t                this._internalNode = this.input = this.output = context._native_createWaveShaper();\n\t                this._curve = null;\n\t                for (var prop in this._internalNode) {\n\t                    this._defineProperty(this._internalNode, prop);\n\t                }\n\t            };\n\t            Object.defineProperty(WaveShaperNode.prototype, 'curve', {\n\t                get: function () {\n\t                    return this._curve;\n\t                },\n\t                set: function (curve) {\n\t                    this._curve = curve;\n\t                    var array = new Float32Array(curve.length + 1);\n\t                    array.set(curve, 1);\n\t                    array[0] = curve[0];\n\t                    this._internalNode.curve = array;\n\t                }\n\t            });\n\t            WaveShaperNode.prototype._defineProperty = function (context, prop) {\n\t                if (Tone.isUndef(this[prop])) {\n\t                    Object.defineProperty(this, prop, {\n\t                        get: function () {\n\t                            if (typeof context[prop] === 'function') {\n\t                                return context[prop].bind(context);\n\t                            } else {\n\t                                return context[prop];\n\t                            }\n\t                        },\n\t                        set: function (val) {\n\t                            context[prop] = val;\n\t                        }\n\t                    });\n\t                }\n\t            };\n\t            AudioContext.prototype._native_createWaveShaper = AudioContext.prototype.createWaveShaper;\n\t            AudioContext.prototype.createWaveShaper = function () {\n\t                return new WaveShaperNode(this);\n\t            };\n\t        }\n\t    }\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Wraps the native Web Audio API\n\t\t *         [WaveShaperNode](http://webaudio.github.io/web-audio-api/#the-waveshapernode-interface).\n\t\t *\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @constructor\n\t\t *  @param {function|Array|Number} mapping The function used to define the values.\n\t\t *                                    The mapping function should take two arguments:\n\t\t *                                    the first is the value at the current position\n\t\t *                                    and the second is the array position.\n\t\t *                                    If the argument is an array, that array will be\n\t\t *                                    set as the wave shaping function. The input\n\t\t *                                    signal is an AudioRange [-1, 1] value and the output\n\t\t *                                    signal can take on any numerical values.\n\t\t *\n\t\t *  @param {Number} [bufferLen=1024] The length of the WaveShaperNode buffer.\n\t\t *  @example\n\t\t * var timesTwo = new Tone.WaveShaper(function(val){\n\t\t * \treturn val * 2;\n\t\t * }, 2048);\n\t\t *  @example\n\t\t * //a waveshaper can also be constructed with an array of values\n\t\t * var invert = new Tone.WaveShaper([1, -1]);\n\t\t */\n\t    Tone.WaveShaper = function (mapping, bufferLen) {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  the waveshaper\n\t\t\t *  @type {WaveShaperNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._shaper = this.input = this.output = this.context.createWaveShaper();\n\t        /**\n\t\t\t *  the waveshapers curve\n\t\t\t *  @type {Float32Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._curve = null;\n\t        if (Array.isArray(mapping)) {\n\t            this.curve = mapping;\n\t        } else if (isFinite(mapping) || Tone.isUndef(mapping)) {\n\t            this._curve = new Float32Array(Tone.defaultArg(mapping, 1024));\n\t        } else if (Tone.isFunction(mapping)) {\n\t            this._curve = new Float32Array(Tone.defaultArg(bufferLen, 1024));\n\t            this.setMap(mapping);\n\t        }\n\t    };\n\t    Tone.extend(Tone.WaveShaper, Tone.SignalBase);\n\t    /**\n\t\t *  Uses a mapping function to set the value of the curve.\n\t\t *  @param {function} mapping The function used to define the values.\n\t\t *                            The mapping function take two arguments:\n\t\t *                            the first is the value at the current position\n\t\t *                            which goes from -1 to 1 over the number of elements\n\t\t *                            in the curve array. The second argument is the array position.\n\t\t *  @returns {Tone.WaveShaper} this\n\t\t *  @example\n\t\t * //map the input signal from [-1, 1] to [0, 10]\n\t\t * shaper.setMap(function(val, index){\n\t\t * \treturn (val + 1) * 5;\n\t\t * })\n\t\t */\n\t    Tone.WaveShaper.prototype.setMap = function (mapping) {\n\t        var array = new Array(this._curve.length);\n\t        for (var i = 0, len = this._curve.length; i < len; i++) {\n\t            var normalized = i / (len - 1) * 2 - 1;\n\t            array[i] = mapping(normalized, i);\n\t        }\n\t        this.curve = array;\n\t        return this;\n\t    };\n\t    /**\n\t\t * The array to set as the waveshaper curve. For linear curves\n\t\t * array length does not make much difference, but for complex curves\n\t\t * longer arrays will provide smoother interpolation.\n\t\t * @memberOf Tone.WaveShaper#\n\t\t * @type {Array}\n\t\t * @name curve\n\t\t */\n\t    Object.defineProperty(Tone.WaveShaper.prototype, 'curve', {\n\t        get: function () {\n\t            return this._shaper.curve;\n\t        },\n\t        set: function (mapping) {\n\t            this._curve = new Float32Array(mapping);\n\t            this._shaper.curve = this._curve;\n\t        }\n\t    });\n\t    /**\n\t\t * Specifies what type of oversampling (if any) should be used when\n\t\t * applying the shaping curve. Can either be \"none\", \"2x\" or \"4x\".\n\t\t * @memberOf Tone.WaveShaper#\n\t\t * @type {string}\n\t\t * @name oversample\n\t\t */\n\t    Object.defineProperty(Tone.WaveShaper.prototype, 'oversample', {\n\t        get: function () {\n\t            return this._shaper.oversample;\n\t        },\n\t        set: function (oversampling) {\n\t            if ([\n\t                    'none',\n\t                    '2x',\n\t                    '4x'\n\t                ].includes(oversampling)) {\n\t                this._shaper.oversample = oversampling;\n\t            } else {\n\t                throw new RangeError('Tone.WaveShaper: oversampling must be either \\'none\\', \\'2x\\', or \\'4x\\'');\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.WaveShaper} this\n\t\t */\n\t    Tone.WaveShaper.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._shaper.disconnect();\n\t        this._shaper = null;\n\t        this._curve = null;\n\t        return this;\n\t    };\n\t    return Tone.WaveShaper;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.TimeBase is a flexible encoding of time\n\t\t *         which can be evaluated to and from a string.\n\t\t *  @extends {Tone}\n\t\t *  @param  {Time}  val    The time value as a number or string\n\t\t *  @param  {String=}  units  Unit values\n\t\t *  @example\n\t\t * Tone.TimeBase(4, \"n\")\n\t\t * Tone.TimeBase(2, \"t\")\n\t\t * Tone.TimeBase(\"2t\")\n\t\t * Tone.TimeBase(\"2t\") + Tone.TimeBase(\"4n\");\n\t\t */\n\t    Tone.TimeBase = function (val, units) {\n\t        //allows it to be constructed with or without 'new'\n\t        if (this instanceof Tone.TimeBase) {\n\t            /**\n\t\t\t\t *  The value\n\t\t\t\t *  @type  {Number|String|Tone.TimeBase}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._val = val;\n\t            /**\n\t\t\t\t * The units\n\t\t\t\t * @type {String?}\n\t\t\t\t * @private\n\t\t\t\t */\n\t            this._units = units;\n\t            //test if the value is a string representation of a number\n\t            if (Tone.isUndef(this._units) && Tone.isString(this._val) && // eslint-disable-next-line eqeqeq\n\t                parseFloat(this._val) == this._val && this._val.charAt(0) !== '+') {\n\t                this._val = parseFloat(this._val);\n\t                this._units = this._defaultUnits;\n\t            } else if (val && val.constructor === this.constructor) {\n\t                //if they're the same type, just copy values over\n\t                this._val = val._val;\n\t                this._units = val._units;\n\t            } else if (val instanceof Tone.TimeBase) {\n\t                switch (this._defaultUnits) {\n\t                case 's':\n\t                    this._val = val.toSeconds();\n\t                    break;\n\t                case 'i':\n\t                    this._val = val.toTicks();\n\t                    break;\n\t                case 'hz':\n\t                    this._val = val.toFrequency();\n\t                    break;\n\t                case 'midi':\n\t                    this._val = val.toMidi();\n\t                    break;\n\t                default:\n\t                    throw new Error('Unrecognized default units ' + this._defaultUnits);\n\t                }\n\t            }\n\t        } else {\n\t            return new Tone.TimeBase(val, units);\n\t        }\n\t    };\n\t    Tone.extend(Tone.TimeBase);\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tABSTRACT SYNTAX TREE PARSER\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  All the primary expressions.\n\t\t *  @private\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.TimeBase.prototype._expressions = {\n\t        'n': {\n\t            regexp: /^(\\d+)n(\\.?)$/i,\n\t            method: function (value, dot) {\n\t                value = parseInt(value);\n\t                var scalar = dot === '.' ? 1.5 : 1;\n\t                if (value === 1) {\n\t                    return this._beatsToUnits(this._getTimeSignature()) * scalar;\n\t                } else {\n\t                    return this._beatsToUnits(4 / value) * scalar;\n\t                }\n\t            }\n\t        },\n\t        't': {\n\t            regexp: /^(\\d+)t$/i,\n\t            method: function (value) {\n\t                value = parseInt(value);\n\t                return this._beatsToUnits(8 / (parseInt(value) * 3));\n\t            }\n\t        },\n\t        'm': {\n\t            regexp: /^(\\d+)m$/i,\n\t            method: function (value) {\n\t                return this._beatsToUnits(parseInt(value) * this._getTimeSignature());\n\t            }\n\t        },\n\t        'i': {\n\t            regexp: /^(\\d+)i$/i,\n\t            method: function (value) {\n\t                return this._ticksToUnits(parseInt(value));\n\t            }\n\t        },\n\t        'hz': {\n\t            regexp: /^(\\d+(?:\\.\\d+)?)hz$/i,\n\t            method: function (value) {\n\t                return this._frequencyToUnits(parseFloat(value));\n\t            }\n\t        },\n\t        'tr': {\n\t            regexp: /^(\\d+(?:\\.\\d+)?):(\\d+(?:\\.\\d+)?):?(\\d+(?:\\.\\d+)?)?$/,\n\t            method: function (m, q, s) {\n\t                var total = 0;\n\t                if (m && m !== '0') {\n\t                    total += this._beatsToUnits(this._getTimeSignature() * parseFloat(m));\n\t                }\n\t                if (q && q !== '0') {\n\t                    total += this._beatsToUnits(parseFloat(q));\n\t                }\n\t                if (s && s !== '0') {\n\t                    total += this._beatsToUnits(parseFloat(s) / 4);\n\t                }\n\t                return total;\n\t            }\n\t        },\n\t        's': {\n\t            regexp: /^(\\d+(?:\\.\\d+)?)s$/,\n\t            method: function (value) {\n\t                return this._secondsToUnits(parseFloat(value));\n\t            }\n\t        },\n\t        'samples': {\n\t            regexp: /^(\\d+)samples$/,\n\t            method: function (value) {\n\t                return parseInt(value) / this.context.sampleRate;\n\t            }\n\t        },\n\t        'default': {\n\t            regexp: /^(\\d+(?:\\.\\d+)?)$/,\n\t            method: function (value) {\n\t                return this._expressions[this._defaultUnits].method.call(this, value);\n\t            }\n\t        }\n\t    };\n\t    /**\n\t\t *  The default units if none are given.\n\t\t *  @type {String}\n\t\t *  @private\n\t\t */\n\t    Tone.TimeBase.prototype._defaultUnits = 's';\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tTRANSPORT FALLBACKS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t * Return the bpm, or 120 if Transport is not available\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t    Tone.TimeBase.prototype._getBpm = function () {\n\t        if (Tone.Transport) {\n\t            return Tone.Transport.bpm.value;\n\t        } else {\n\t            return 120;\n\t        }\n\t    };\n\t    /**\n\t\t * Return the timeSignature or 4 if Transport is not available\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t    Tone.TimeBase.prototype._getTimeSignature = function () {\n\t        if (Tone.Transport) {\n\t            return Tone.Transport.timeSignature;\n\t        } else {\n\t            return 4;\n\t        }\n\t    };\n\t    /**\n\t\t * Return the PPQ or 192 if Transport is not available\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t    Tone.TimeBase.prototype._getPPQ = function () {\n\t        if (Tone.Transport) {\n\t            return Tone.Transport.PPQ;\n\t        } else {\n\t            return 192;\n\t        }\n\t    };\n\t    /**\n\t\t * Return the current time in whichever context is relevant\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t    Tone.TimeBase.prototype._now = function () {\n\t        return this.now();\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tUNIT CONVERSIONS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Returns the value of a frequency in the current units\n\t\t *  @param {Frequency} freq\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.TimeBase.prototype._frequencyToUnits = function (freq) {\n\t        return 1 / freq;\n\t    };\n\t    /**\n\t\t *  Return the value of the beats in the current units\n\t\t *  @param {Number} beats\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.TimeBase.prototype._beatsToUnits = function (beats) {\n\t        return 60 / this._getBpm() * beats;\n\t    };\n\t    /**\n\t\t *  Returns the value of a second in the current units\n\t\t *  @param {Seconds} seconds\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.TimeBase.prototype._secondsToUnits = function (seconds) {\n\t        return seconds;\n\t    };\n\t    /**\n\t\t *  Returns the value of a tick in the current time units\n\t\t *  @param {Ticks} ticks\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.TimeBase.prototype._ticksToUnits = function (ticks) {\n\t        return ticks * (this._beatsToUnits(1) / this._getPPQ());\n\t    };\n\t    /**\n\t\t * With no arguments, return 'now'\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.TimeBase.prototype._noArg = function () {\n\t        return this._now();\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tEXPRESSIONS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Evaluate the time value. Returns the time\n\t\t *  in seconds.\n\t\t *  @return  {Seconds}\n\t\t */\n\t    Tone.TimeBase.prototype.valueOf = function () {\n\t        if (Tone.isUndef(this._val)) {\n\t            return this._noArg();\n\t        } else if (Tone.isString(this._val) && Tone.isUndef(this._units)) {\n\t            for (var units in this._expressions) {\n\t                if (this._expressions[units].regexp.test(this._val.trim())) {\n\t                    this._units = units;\n\t                    break;\n\t                }\n\t            }\n\t        }\n\t        if (Tone.isDefined(this._units)) {\n\t            var expr = this._expressions[this._units];\n\t            var matching = this._val.toString().trim().match(expr.regexp);\n\t            if (matching) {\n\t                return expr.method.apply(this, matching.slice(1));\n\t            } else {\n\t                return expr.method.call(this, parseFloat(this._val));\n\t            }\n\t        } else {\n\t            return this._val;\n\t        }\n\t    };\n\t    /**\n\t\t *  Return the value in seconds\n\t\t *  @return {Seconds}\n\t\t */\n\t    Tone.TimeBase.prototype.toSeconds = function () {\n\t        return this.valueOf();\n\t    };\n\t    /**\n\t\t *  Return the value in hertz\n\t\t *  @return {Frequency}\n\t\t */\n\t    Tone.TimeBase.prototype.toFrequency = function () {\n\t        return 1 / this.toSeconds();\n\t    };\n\t    /**\n\t\t *  Return the time in samples\n\t\t *  @return  {Samples}\n\t\t */\n\t    Tone.TimeBase.prototype.toSamples = function () {\n\t        return this.toSeconds() * this.context.sampleRate;\n\t    };\n\t    /**\n\t\t *  Return the time in milliseconds.\n\t\t *  @return  {Milliseconds}\n\t\t */\n\t    Tone.TimeBase.prototype.toMilliseconds = function () {\n\t        return this.toSeconds() * 1000;\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @return {Tone.TimeBase} this\n\t\t */\n\t    Tone.TimeBase.prototype.dispose = function () {\n\t        this._val = null;\n\t        this._units = null;\n\t    };\n\t    return Tone.TimeBase;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.Frequency is a primitive type for encoding Frequency values.\n\t\t *         Eventually all time values are evaluated to hertz\n\t\t *         using the `eval` method.\n\t\t *  @constructor\n\t\t *  @extends {Tone.TimeBase}\n\t\t *  @param  {String|Number}  val    The time value.\n\t\t *  @param  {String=}  units  The units of the value.\n\t\t *  @example\n\t\t * Tone.Frequency(\"C3\") // 261\n\t\t * Tone.Frequency(38, \"midi\") //\n\t\t * Tone.Frequency(\"C3\").transpose(4);\n\t\t */\n\t    Tone.Frequency = function (val, units) {\n\t        if (this instanceof Tone.Frequency) {\n\t            Tone.TimeBase.call(this, val, units);\n\t        } else {\n\t            return new Tone.Frequency(val, units);\n\t        }\n\t    };\n\t    Tone.extend(Tone.Frequency, Tone.TimeBase);\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tAUGMENT BASE EXPRESSIONS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    Tone.Frequency.prototype._expressions = Object.assign({}, Tone.TimeBase.prototype._expressions, {\n\t        'midi': {\n\t            regexp: /^(\\d+(?:\\.\\d+)?midi)/,\n\t            method: function (value) {\n\t                if (this._defaultUnits === 'midi') {\n\t                    return value;\n\t                } else {\n\t                    return Tone.Frequency.mtof(value);\n\t                }\n\t            }\n\t        },\n\t        'note': {\n\t            regexp: /^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i,\n\t            method: function (pitch, octave) {\n\t                var index = noteToScaleIndex[pitch.toLowerCase()];\n\t                var noteNumber = index + (parseInt(octave) + 1) * 12;\n\t                if (this._defaultUnits === 'midi') {\n\t                    return noteNumber;\n\t                } else {\n\t                    return Tone.Frequency.mtof(noteNumber);\n\t                }\n\t            }\n\t        },\n\t        'tr': {\n\t            regexp: /^(\\d+(?:\\.\\d+)?):(\\d+(?:\\.\\d+)?):?(\\d+(?:\\.\\d+)?)?/,\n\t            method: function (m, q, s) {\n\t                var total = 1;\n\t                if (m && m !== '0') {\n\t                    total *= this._beatsToUnits(this._getTimeSignature() * parseFloat(m));\n\t                }\n\t                if (q && q !== '0') {\n\t                    total *= this._beatsToUnits(parseFloat(q));\n\t                }\n\t                if (s && s !== '0') {\n\t                    total *= this._beatsToUnits(parseFloat(s) / 4);\n\t                }\n\t                return total;\n\t            }\n\t        }\n\t    });\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tEXPRESSIONS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Transposes the frequency by the given number of semitones.\n\t\t *  @param  {Interval}  interval\n\t\t *  @return  {Tone.Frequency} A new transposed frequency\n\t\t *  @example\n\t\t * Tone.Frequency(\"A4\").transpose(3); //\"C5\"\n\t\t */\n\t    Tone.Frequency.prototype.transpose = function (interval) {\n\t        return new this.constructor(this.valueOf() * Tone.intervalToFrequencyRatio(interval));\n\t    };\n\t    /**\n\t\t *  Takes an array of semitone intervals and returns\n\t\t *  an array of frequencies transposed by those intervals.\n\t\t *  @param  {Array}  intervals\n\t\t *  @return  {Array<Tone.Frequency>} Returns an array of Frequencies\n\t\t *  @example\n\t\t * Tone.Frequency(\"A4\").harmonize([0, 3, 7]); //[\"A4\", \"C5\", \"E5\"]\n\t\t */\n\t    Tone.Frequency.prototype.harmonize = function (intervals) {\n\t        return intervals.map(function (interval) {\n\t            return this.transpose(interval);\n\t        }.bind(this));\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tUNIT CONVERSIONS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Return the value of the frequency as a MIDI note\n\t\t *  @return  {MIDI}\n\t\t *  @example\n\t\t * Tone.Frequency(\"C4\").toMidi(); //60\n\t\t */\n\t    Tone.Frequency.prototype.toMidi = function () {\n\t        return Tone.Frequency.ftom(this.valueOf());\n\t    };\n\t    /**\n\t\t *  Return the value of the frequency in Scientific Pitch Notation\n\t\t *  @return  {Note}\n\t\t *  @example\n\t\t * Tone.Frequency(69, \"midi\").toNote(); //\"A4\"\n\t\t */\n\t    Tone.Frequency.prototype.toNote = function () {\n\t        var freq = this.toFrequency();\n\t        var log = Math.log2(freq / Tone.Frequency.A4);\n\t        var noteNumber = Math.round(12 * log) + 57;\n\t        var octave = Math.floor(noteNumber / 12);\n\t        if (octave < 0) {\n\t            noteNumber += -12 * octave;\n\t        }\n\t        var noteName = scaleIndexToNote[noteNumber % 12];\n\t        return noteName + octave.toString();\n\t    };\n\t    /**\n\t\t *  Return the duration of one cycle in seconds.\n\t\t *  @return  {Seconds}\n\t\t */\n\t    Tone.Frequency.prototype.toSeconds = function () {\n\t        return 1 / Tone.TimeBase.prototype.toSeconds.call(this);\n\t    };\n\t    /**\n\t\t *  Return the value in Hertz\n\t\t *  @return  {Frequency}\n\t\t */\n\t    Tone.Frequency.prototype.toFrequency = function () {\n\t        return Tone.TimeBase.prototype.toFrequency.call(this);\n\t    };\n\t    /**\n\t\t *  Return the duration of one cycle in ticks\n\t\t *  @return  {Ticks}\n\t\t */\n\t    Tone.Frequency.prototype.toTicks = function () {\n\t        var quarterTime = this._beatsToUnits(1);\n\t        var quarters = this.valueOf() / quarterTime;\n\t        return Math.floor(quarters * Tone.Transport.PPQ);\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tUNIT CONVERSIONS HELPERS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  With no arguments, return 0\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Frequency.prototype._noArg = function () {\n\t        return 0;\n\t    };\n\t    /**\n\t\t *  Returns the value of a frequency in the current units\n\t\t *  @param {Frequency} freq\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Frequency.prototype._frequencyToUnits = function (freq) {\n\t        return freq;\n\t    };\n\t    /**\n\t\t *  Returns the value of a tick in the current time units\n\t\t *  @param {Ticks} ticks\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Frequency.prototype._ticksToUnits = function (ticks) {\n\t        return 1 / (ticks * 60 / (Tone.Transport.bpm.value * Tone.Transport.PPQ));\n\t    };\n\t    /**\n\t\t *  Return the value of the beats in the current units\n\t\t *  @param {Number} beats\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Frequency.prototype._beatsToUnits = function (beats) {\n\t        return 1 / Tone.TimeBase.prototype._beatsToUnits.call(this, beats);\n\t    };\n\t    /**\n\t\t *  Returns the value of a second in the current units\n\t\t *  @param {Seconds} seconds\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Frequency.prototype._secondsToUnits = function (seconds) {\n\t        return 1 / seconds;\n\t    };\n\t    /**\n\t\t *  The default units if none are given.\n\t\t *  @private\n\t\t */\n\t    Tone.Frequency.prototype._defaultUnits = 'hz';\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tFREQUENCY CONVERSIONS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Note to scale index\n\t\t *  @type  {Object}\n\t\t */\n\t    var noteToScaleIndex = {\n\t        'cbb': -2,\n\t        'cb': -1,\n\t        'c': 0,\n\t        'c#': 1,\n\t        'cx': 2,\n\t        'dbb': 0,\n\t        'db': 1,\n\t        'd': 2,\n\t        'd#': 3,\n\t        'dx': 4,\n\t        'ebb': 2,\n\t        'eb': 3,\n\t        'e': 4,\n\t        'e#': 5,\n\t        'ex': 6,\n\t        'fbb': 3,\n\t        'fb': 4,\n\t        'f': 5,\n\t        'f#': 6,\n\t        'fx': 7,\n\t        'gbb': 5,\n\t        'gb': 6,\n\t        'g': 7,\n\t        'g#': 8,\n\t        'gx': 9,\n\t        'abb': 7,\n\t        'ab': 8,\n\t        'a': 9,\n\t        'a#': 10,\n\t        'ax': 11,\n\t        'bbb': 9,\n\t        'bb': 10,\n\t        'b': 11,\n\t        'b#': 12,\n\t        'bx': 13\n\t    };\n\t    /**\n\t\t *  scale index to note (sharps)\n\t\t *  @type  {Array}\n\t\t */\n\t    var scaleIndexToNote = [\n\t        'C',\n\t        'C#',\n\t        'D',\n\t        'D#',\n\t        'E',\n\t        'F',\n\t        'F#',\n\t        'G',\n\t        'G#',\n\t        'A',\n\t        'A#',\n\t        'B'\n\t    ];\n\t    /**\n\t\t *  The [concert pitch](https://en.wikipedia.org/wiki/Concert_pitch)\n\t\t *  A4's values in Hertz.\n\t\t *  @type {Frequency}\n\t\t *  @static\n\t\t */\n\t    Tone.Frequency.A4 = 440;\n\t    /**\n\t\t *  Convert a MIDI note to frequency value.\n\t\t *  @param  {MIDI} midi The midi number to convert.\n\t\t *  @return {Frequency} the corresponding frequency value\n\t\t *  @static\n\t\t *  @example\n\t\t * Tone.Frequency.mtof(69); // returns 440\n\t\t */\n\t    Tone.Frequency.mtof = function (midi) {\n\t        return Tone.Frequency.A4 * Math.pow(2, (midi - 69) / 12);\n\t    };\n\t    /**\n\t\t *  Convert a frequency value to a MIDI note.\n\t\t *  @param {Frequency} frequency The value to frequency value to convert.\n\t\t *  @returns  {MIDI}\n\t\t *  @static\n\t\t *  @example\n\t\t * Tone.Frequency.ftom(440); // returns 69\n\t\t */\n\t    Tone.Frequency.ftom = function (frequency) {\n\t        return 69 + Math.round(12 * Math.log2(frequency / Tone.Frequency.A4));\n\t    };\n\t    return Tone.Frequency;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.Time is a primitive type for encoding Time values.\n\t\t *         Tone.Time can be constructed with or without the `new` keyword. Tone.Time can be passed\n\t\t *         into the parameter of any method which takes time as an argument.\n\t\t *  @constructor\n\t\t *  @extends {Tone.TimeBase}\n\t\t *  @param  {String|Number}  val    The time value.\n\t\t *  @param  {String=}  units  The units of the value.\n\t\t *  @example\n\t\t * var t = Tone.Time(\"4n\");//a quarter note\n\t\t */\n\t    Tone.Time = function (val, units) {\n\t        if (this instanceof Tone.Time) {\n\t            Tone.TimeBase.call(this, val, units);\n\t        } else {\n\t            return new Tone.Time(val, units);\n\t        }\n\t    };\n\t    Tone.extend(Tone.Time, Tone.TimeBase);\n\t    /**\n\t\t * Extend the base expressions\n\t\t */\n\t    Tone.Time.prototype._expressions = Object.assign({}, Tone.TimeBase.prototype._expressions, {\n\t        'quantize': {\n\t            regexp: /^@(.+)/,\n\t            method: function (capture) {\n\t                if (Tone.Transport) {\n\t                    var quantTo = new this.constructor(capture);\n\t                    return Tone.Transport.nextSubdivision(quantTo);\n\t                } else {\n\t                    return 0;\n\t                }\n\t            }\n\t        },\n\t        'now': {\n\t            regexp: /^\\+(.+)/,\n\t            method: function (capture) {\n\t                return this._now() + new this.constructor(capture);\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Quantize the time by the given subdivision. Optionally add a\n\t\t *  percentage which will move the time value towards the ideal\n\t\t *  quantized value by that percentage.\n\t\t *  @param  {Number|Time}  val    The subdivision to quantize to\n\t\t *  @param  {NormalRange}  [percent=1]  Move the time value\n\t\t *                                   towards the quantized value by\n\t\t *                                   a percentage.\n\t\t *  @return  {Number}  this\n\t\t *  @example\n\t\t * Tone.Time(21).quantize(2) //returns 22\n\t\t * Tone.Time(0.6).quantize(\"4n\", 0.5) //returns 0.55\n\t\t */\n\t    Tone.Time.prototype.quantize = function (subdiv, percent) {\n\t        percent = Tone.defaultArg(percent, 1);\n\t        var subdivision = new this.constructor(subdiv);\n\t        var value = this.valueOf();\n\t        var multiple = Math.round(value / subdivision);\n\t        var ideal = multiple * subdivision;\n\t        var diff = ideal - value;\n\t        return value + diff * percent;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    // CONVERSIONS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Convert a Time to Notation. The notation values are will be the\n\t\t *  closest representation between 1m to 128th note.\n\t\t *  @return {Notation}\n\t\t *  @example\n\t\t * //if the Transport is at 120bpm:\n\t\t * Tone.Time(2).toNotation();//returns \"1m\"\n\t\t */\n\t    Tone.Time.prototype.toNotation = function () {\n\t        var time = this.toSeconds();\n\t        var testNotations = ['1m'];\n\t        for (var power = 1; power < 8; power++) {\n\t            var subdiv = Math.pow(2, power);\n\t            testNotations.push(subdiv + 'n.');\n\t            testNotations.push(subdiv + 'n');\n\t            testNotations.push(subdiv + 't');\n\t        }\n\t        testNotations.push('0');\n\t        //find the closets notation representation\n\t        var closest = testNotations[0];\n\t        var closestSeconds = Tone.Time(testNotations[0]).toSeconds();\n\t        testNotations.forEach(function (notation) {\n\t            var notationSeconds = Tone.Time(notation).toSeconds();\n\t            if (Math.abs(notationSeconds - time) < Math.abs(closestSeconds - time)) {\n\t                closest = notation;\n\t                closestSeconds = notationSeconds;\n\t            }\n\t        });\n\t        return closest;\n\t    };\n\t    /**\n\t\t *  Return the time encoded as Bars:Beats:Sixteenths.\n\t\t *  @return  {BarsBeatsSixteenths}\n\t\t */\n\t    Tone.Time.prototype.toBarsBeatsSixteenths = function () {\n\t        var quarterTime = this._beatsToUnits(1);\n\t        var quarters = this.valueOf() / quarterTime;\n\t        var measures = Math.floor(quarters / this._getTimeSignature());\n\t        var sixteenths = quarters % 1 * 4;\n\t        quarters = Math.floor(quarters) % this._getTimeSignature();\n\t        sixteenths = sixteenths.toString();\n\t        if (sixteenths.length > 3) {\n\t            // the additional parseFloat removes insignificant trailing zeroes\n\t            sixteenths = parseFloat(parseFloat(sixteenths).toFixed(3));\n\t        }\n\t        var progress = [\n\t            measures,\n\t            quarters,\n\t            sixteenths\n\t        ];\n\t        return progress.join(':');\n\t    };\n\t    /**\n\t\t *  Return the time in ticks.\n\t\t *  @return  {Ticks}\n\t\t */\n\t    Tone.Time.prototype.toTicks = function () {\n\t        var quarterTime = this._beatsToUnits(1);\n\t        var quarters = this.valueOf() / quarterTime;\n\t        return Math.round(quarters * this._getPPQ());\n\t    };\n\t    /**\n\t\t *  Return the time in seconds.\n\t\t *  @return  {Seconds}\n\t\t */\n\t    Tone.Time.prototype.toSeconds = function () {\n\t        return this.valueOf();\n\t    };\n\t    /**\n\t\t *  Return the value as a midi note.\n\t\t *  @return  {Midi}\n\t\t */\n\t    Tone.Time.prototype.toMidi = function () {\n\t        return Tone.Frequency.ftom(this.toFrequency());\n\t    };\n\t    return Tone.Time;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.TransportTime is a the time along the Transport's\n\t\t *         timeline. It is similar to Tone.Time, but instead of evaluating\n\t\t *         against the AudioContext's clock, it is evaluated against\n\t\t *         the Transport's position. See [TransportTime wiki](https://github.com/Tonejs/Tone.js/wiki/TransportTime).\n\t\t *  @constructor\n\t\t *  @param  {Time}  val    The time value as a number or string\n\t\t *  @param  {String=}  units  Unit values\n\t\t *  @extends {Tone.Time}\n\t\t */\n\t    Tone.TransportTime = function (val, units) {\n\t        if (this instanceof Tone.TransportTime) {\n\t            Tone.Time.call(this, val, units);\n\t        } else {\n\t            return new Tone.TransportTime(val, units);\n\t        }\n\t    };\n\t    Tone.extend(Tone.TransportTime, Tone.Time);\n\t    /**\n\t\t * Return the current time in whichever context is relevant\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t    Tone.TransportTime.prototype._now = function () {\n\t        return Tone.Transport.seconds;\n\t    };\n\t    return Tone.TransportTime;\n\t});\n\tModule(function (Tone) {\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tTYPES\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t * Units which a value can take on.\n\t\t * @enum {String}\n\t\t */\n\t    Tone.Type = {\n\t        /**\n\t\t\t *  Default units\n\t\t\t *  @typedef {Default}\n\t\t\t */\n\t        Default: 'number',\n\t        /**\n\t\t\t *  Time can be described in a number of ways. Read more [Time](https://github.com/Tonejs/Tone.js/wiki/Time).\n\t\t\t *\n\t\t\t *  * Numbers, which will be taken literally as the time (in seconds).\n\t\t\t *  * Notation, (\"4n\", \"8t\") describes time in BPM and time signature relative values.\n\t\t\t *  * TransportTime, (\"4:3:2\") will also provide tempo and time signature relative times\n\t\t\t *  in the form BARS:QUARTERS:SIXTEENTHS.\n\t\t\t *  * Frequency, (\"8hz\") is converted to the length of the cycle in seconds.\n\t\t\t *  * Now-Relative, (\"+1\") prefix any of the above with \"+\" and it will be interpreted as\n\t\t\t *  \"the current time plus whatever expression follows\".\n\t\t\t *  * Expressions, (\"3:0 + 2 - (1m / 7)\") any of the above can also be combined\n\t\t\t *  into a mathematical expression which will be evaluated to compute the desired time.\n\t\t\t *  * No Argument, for methods which accept time, no argument will be interpreted as\n\t\t\t *  \"now\" (i.e. the currentTime).\n\t\t\t *\n\t\t\t *  @typedef {Time}\n\t\t\t */\n\t        Time: 'time',\n\t        /**\n\t\t\t *  Frequency can be described similar to time, except ultimately the\n\t\t\t *  values are converted to frequency instead of seconds. A number\n\t\t\t *  is taken literally as the value in hertz. Additionally any of the\n\t\t\t *  Time encodings can be used. Note names in the form\n\t\t\t *  of NOTE OCTAVE (i.e. C4) are also accepted and converted to their\n\t\t\t *  frequency value.\n\t\t\t *  @typedef {Frequency}\n\t\t\t */\n\t        Frequency: 'frequency',\n\t        /**\n\t\t\t *  TransportTime describes a position along the Transport's timeline. It is\n\t\t\t *  similar to Time in that it uses all the same encodings, but TransportTime specifically\n\t\t\t *  pertains to the Transport's timeline, which is startable, stoppable, loopable, and seekable.\n\t\t\t *  [Read more](https://github.com/Tonejs/Tone.js/wiki/TransportTime)\n\t\t\t *  @typedef {TransportTime}\n\t\t\t */\n\t        TransportTime: 'transportTime',\n\t        /**\n\t\t\t *  Ticks are the basic subunit of the Transport. They are\n\t\t\t *  the smallest unit of time that the Transport supports.\n\t\t\t *  @typedef {Ticks}\n\t\t\t */\n\t        Ticks: 'ticks',\n\t        /**\n\t\t\t *  Normal values are within the range [0, 1].\n\t\t\t *  @typedef {NormalRange}\n\t\t\t */\n\t        NormalRange: 'normalRange',\n\t        /**\n\t\t\t *  AudioRange values are between [-1, 1].\n\t\t\t *  @typedef {AudioRange}\n\t\t\t */\n\t        AudioRange: 'audioRange',\n\t        /**\n\t\t\t *  Decibels are a logarithmic unit of measurement which is useful for volume\n\t\t\t *  because of the logarithmic way that we perceive loudness. 0 decibels\n\t\t\t *  means no change in volume. -10db is approximately half as loud and 10db\n\t\t\t *  is twice is loud.\n\t\t\t *  @typedef {Decibels}\n\t\t\t */\n\t        Decibels: 'db',\n\t        /**\n\t\t\t *  Half-step note increments, i.e. 12 is an octave above the root. and 1 is a half-step up.\n\t\t\t *  @typedef {Interval}\n\t\t\t */\n\t        Interval: 'interval',\n\t        /**\n\t\t\t *  Beats per minute.\n\t\t\t *  @typedef {BPM}\n\t\t\t */\n\t        BPM: 'bpm',\n\t        /**\n\t\t\t *  The value must be greater than or equal to 0.\n\t\t\t *  @typedef {Positive}\n\t\t\t */\n\t        Positive: 'positive',\n\t        /**\n\t\t\t *  Gain is the ratio between input and output of a signal.\n\t\t\t *  A gain of 0 is the same as silencing the signal. A gain of\n\t\t\t *  1, causes no change to the incoming signal.\n\t\t\t *  @typedef {Gain}\n\t\t\t */\n\t        Gain: 'gain',\n\t        /**\n\t\t\t *  A cent is a hundredth of a semitone.\n\t\t\t *  @typedef {Cents}\n\t\t\t */\n\t        Cents: 'cents',\n\t        /**\n\t\t\t *  Angle between 0 and 360.\n\t\t\t *  @typedef {Degrees}\n\t\t\t */\n\t        Degrees: 'degrees',\n\t        /**\n\t\t\t *  A number representing a midi note.\n\t\t\t *  @typedef {MIDI}\n\t\t\t */\n\t        MIDI: 'midi',\n\t        /**\n\t\t\t *  A colon-separated representation of time in the form of\n\t\t\t *  Bars:Beats:Sixteenths.\n\t\t\t *  @typedef {BarsBeatsSixteenths}\n\t\t\t */\n\t        BarsBeatsSixteenths: 'barsBeatsSixteenths',\n\t        /**\n\t\t\t *  Sampling is the reduction of a continuous signal to a discrete signal.\n\t\t\t *  Audio is typically sampled 44100 times per second.\n\t\t\t *  @typedef {Samples}\n\t\t\t */\n\t        Samples: 'samples',\n\t        /**\n\t\t\t *  Hertz are a frequency representation defined as one cycle per second.\n\t\t\t *  @typedef {Hertz}\n\t\t\t */\n\t        Hertz: 'hertz',\n\t        /**\n\t\t\t *  A frequency represented by a letter name,\n\t\t\t *  accidental and octave. This system is known as\n\t\t\t *  [Scientific Pitch Notation](https://en.wikipedia.org/wiki/Scientific_pitch_notation).\n\t\t\t *  @typedef {Note}\n\t\t\t */\n\t        Note: 'note',\n\t        /**\n\t\t\t *  One millisecond is a thousandth of a second.\n\t\t\t *  @typedef {Milliseconds}\n\t\t\t */\n\t        Milliseconds: 'milliseconds',\n\t        /**\n\t\t\t *  Seconds are the time unit of the AudioContext. In the end,\n\t\t\t *  all values need to be evaluated to seconds.\n\t\t\t *  @typedef {Seconds}\n\t\t\t */\n\t        Seconds: 'seconds',\n\t        /**\n\t\t\t *  A string representing a duration relative to a measure.\n\t\t\t *  * \"4n\" = quarter note\n\t\t\t *  * \"2m\" = two measures\n\t\t\t *  * \"8t\" = eighth-note triplet\n\t\t\t *  @typedef {Notation}\n\t\t\t */\n\t        Notation: 'notation'\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    // AUGMENT TONE's PROTOTYPE\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Convert Time into seconds.\n\t\t *\n\t\t *  Unlike the method which it overrides, this takes into account\n\t\t *  transporttime and musical notation.\n\t\t *\n\t\t *  Time : 1.40\n\t\t *  Notation: 4n or 1m or 2t\n\t\t *  Now Relative: +3n\n\t\t *  Math: 3n+16n or even complicated expressions ((3n*2)/6 + 1)\n\t\t *\n\t\t *  @param  {Time} time\n\t\t *  @return {Seconds}\n\t\t */\n\t    Tone.prototype.toSeconds = function (time) {\n\t        if (Tone.isNumber(time)) {\n\t            return time;\n\t        } else if (Tone.isUndef(time)) {\n\t            return this.now();\n\t        } else if (Tone.isString(time)) {\n\t            return new Tone.Time(time).toSeconds();\n\t        } else if (time instanceof Tone.TimeBase) {\n\t            return time.toSeconds();\n\t        }\n\t    };\n\t    /**\n\t\t *  Convert a frequency representation into a number.\n\t\t *  @param  {Frequency} freq\n\t\t *  @return {Hertz}      the frequency in hertz\n\t\t */\n\t    Tone.prototype.toFrequency = function (freq) {\n\t        if (Tone.isNumber(freq)) {\n\t            return freq;\n\t        } else if (Tone.isString(freq) || Tone.isUndef(freq)) {\n\t            return new Tone.Frequency(freq).valueOf();\n\t        } else if (freq instanceof Tone.TimeBase) {\n\t            return freq.toFrequency();\n\t        }\n\t    };\n\t    /**\n\t\t *  Convert a time representation into ticks.\n\t\t *  @param  {Time} time\n\t\t *  @return {Ticks}  the time in ticks\n\t\t */\n\t    Tone.prototype.toTicks = function (time) {\n\t        if (Tone.isNumber(time) || Tone.isString(time)) {\n\t            return new Tone.TransportTime(time).toTicks();\n\t        } else if (Tone.isUndef(time)) {\n\t            return Tone.Transport.ticks;\n\t        } else if (time instanceof Tone.TimeBase) {\n\t            return time.toTicks();\n\t        }\n\t    };\n\t    return Tone;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Param wraps the native Web Audio's AudioParam to provide\n\t\t *         additional unit conversion functionality. It also\n\t\t *         serves as a base-class for classes which have a single,\n\t\t *         automatable parameter.\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param  {AudioParam}  param  The parameter to wrap.\n\t\t *  @param  {Tone.Type} units The units of the audio param.\n\t\t *  @param  {Boolean} convert If the param should be converted.\n\t\t */\n\t    Tone.Param = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'param',\n\t            'units',\n\t            'convert'\n\t        ], Tone.Param);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The native parameter to control\n\t\t\t *  @type  {AudioParam}\n\t\t\t *  @private\n\t\t\t */\n\t        this._param = this.input = options.param;\n\t        /**\n\t\t\t *  The units of the parameter\n\t\t\t *  @type {Tone.Type}\n\t\t\t */\n\t        this.units = options.units;\n\t        /**\n\t\t\t *  If the value should be converted or not\n\t\t\t *  @type {Boolean}\n\t\t\t */\n\t        this.convert = options.convert;\n\t        /**\n\t\t\t *  True if the signal value is being overridden by\n\t\t\t *  a connected signal.\n\t\t\t *  @readOnly\n\t\t\t *  @type  {boolean}\n\t\t\t *  @private\n\t\t\t */\n\t        this.overridden = false;\n\t        /**\n\t\t\t * The timeline which tracks all of the automations.\n\t\t\t * @type {Tone.Timeline}\n\t\t\t * @private\n\t\t\t */\n\t        this._events = new Tone.Timeline(1000);\n\t        if (Tone.isDefined(options.value) && this._param) {\n\t            this.value = options.value;\n\t        }\n\t    };\n\t    Tone.extend(Tone.Param, Tone.AudioNode);\n\t    /**\n\t\t *  Defaults\n\t\t *  @type  {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.Param.defaults = {\n\t        'units': Tone.Type.Default,\n\t        'convert': true,\n\t        'param': undefined\n\t    };\n\t    /**\n\t\t * The current value of the parameter.\n\t\t * @memberOf Tone.Param#\n\t\t * @type {Number}\n\t\t * @name value\n\t\t */\n\t    Object.defineProperty(Tone.Param.prototype, 'value', {\n\t        get: function () {\n\t            var now = this.now();\n\t            return this._toUnits(this.getValueAtTime(now));\n\t        },\n\t        set: function (value) {\n\t            this._initialValue = this._fromUnits(value);\n\t            this.cancelScheduledValues(this.context.currentTime);\n\t            this.setValueAtTime(value, this.context.currentTime);\n\t        }\n\t    });\n\t    /**\n\t\t * The minimum output value of the parameter\n\t\t * @memberOf Tone.Param#\n\t\t * @type {Number}\n\t\t * @name value\n\t\t */\n\t    Object.defineProperty(Tone.Param.prototype, 'minValue', {\n\t        get: function () {\n\t            if (this.units === Tone.Type.Time || this.units === Tone.Type.Frequency || this.units === Tone.Type.NormalRange || this.units === Tone.Type.Positive || this.units === Tone.Type.BPM) {\n\t                return 0;\n\t            } else if (this.units === Tone.Type.AudioRange) {\n\t                return -1;\n\t            } else if (this.units === Tone.Type.Decibels) {\n\t                return -Infinity;\n\t            } else {\n\t                return this._param.minValue;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The maximum output value of the parameter\n\t\t * @memberOf Tone.Param#\n\t\t * @type {Number}\n\t\t * @name value\n\t\t */\n\t    Object.defineProperty(Tone.Param.prototype, 'maxValue', {\n\t        get: function () {\n\t            if (this.units === Tone.Type.NormalRange || this.units === Tone.Type.AudioRange) {\n\t                return 1;\n\t            } else {\n\t                return this._param.maxValue;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Convert the given value from the type specified by Tone.Param.units\n\t\t *  into the destination value (such as Gain or Frequency).\n\t\t *  @private\n\t\t *  @param  {*} val the value to convert\n\t\t *  @return {number}     the number which the value should be set to\n\t\t */\n\t    Tone.Param.prototype._fromUnits = function (val) {\n\t        if ((this.convert || Tone.isUndef(this.convert)) && !this.overridden) {\n\t            switch (this.units) {\n\t            case Tone.Type.Time:\n\t                return this.toSeconds(val);\n\t            case Tone.Type.Frequency:\n\t                return this.toFrequency(val);\n\t            case Tone.Type.Decibels:\n\t                return Tone.dbToGain(val);\n\t            case Tone.Type.NormalRange:\n\t                return Math.min(Math.max(val, 0), 1);\n\t            case Tone.Type.AudioRange:\n\t                return Math.min(Math.max(val, -1), 1);\n\t            case Tone.Type.Positive:\n\t                return Math.max(val, 0);\n\t            default:\n\t                return val;\n\t            }\n\t        } else {\n\t            return val;\n\t        }\n\t    };\n\t    /**\n\t\t * Convert the parameters value into the units specified by Tone.Param.units.\n\t\t * @private\n\t\t * @param  {number} val the value to convert\n\t\t * @return {number}\n\t\t */\n\t    Tone.Param.prototype._toUnits = function (val) {\n\t        if (this.convert || Tone.isUndef(this.convert)) {\n\t            switch (this.units) {\n\t            case Tone.Type.Decibels:\n\t                return Tone.gainToDb(val);\n\t            default:\n\t                return val;\n\t            }\n\t        } else {\n\t            return val;\n\t        }\n\t    };\n\t    /**\n\t\t *  the minimum output value\n\t\t *  @type {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Param.prototype._minOutput = 0.00001;\n\t    /**\n\t\t *  The event types\n\t\t *  @enum {String}\n\t\t *  @private\n\t\t */\n\t    Tone.Param.AutomationType = {\n\t        Linear: 'linearRampToValueAtTime',\n\t        Exponential: 'exponentialRampToValueAtTime',\n\t        Target: 'setTargetAtTime',\n\t        SetValue: 'setValueAtTime'\n\t    };\n\t    /**\n\t\t *  Schedules a parameter value change at the given time.\n\t\t *  @param {*}\tvalue The value to set the signal.\n\t\t *  @param {Time}  time The time when the change should occur.\n\t\t *  @returns {Tone.Param} this\n\t\t *  @example\n\t\t * //set the frequency to \"G4\" in exactly 1 second from now.\n\t\t * freq.setValueAtTime(\"G4\", \"+1\");\n\t\t */\n\t    Tone.Param.prototype.setValueAtTime = function (value, time) {\n\t        time = this.toSeconds(time);\n\t        value = this._fromUnits(value);\n\t        this._events.add({\n\t            'type': Tone.Param.AutomationType.SetValue,\n\t            'value': value,\n\t            'time': time\n\t        });\n\t        this._param.setValueAtTime(value, time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Get the signals value at the given time. Subsequent scheduling\n\t\t *  may invalidate the returned value.\n\t\t *  @param {Time} time When to get the value\n\t\t *  @returns {Number} The value at the given time\n\t\t */\n\t    Tone.Param.prototype.getValueAtTime = function (time) {\n\t        time = this.toSeconds(time);\n\t        var after = this._events.getAfter(time);\n\t        var before = this._events.get(time);\n\t        var initialValue = Tone.defaultArg(this._initialValue, this._param.defaultValue);\n\t        var value = initialValue;\n\t        //if it was set by\n\t        if (before === null) {\n\t            value = initialValue;\n\t        } else if (before.type === Tone.Param.AutomationType.Target) {\n\t            var previous = this._events.getBefore(before.time);\n\t            var previousVal;\n\t            if (previous === null) {\n\t                previousVal = initialValue;\n\t            } else {\n\t                previousVal = previous.value;\n\t            }\n\t            value = this._exponentialApproach(before.time, previousVal, before.value, before.constant, time);\n\t        } else if (after === null) {\n\t            value = before.value;\n\t        } else if (after.type === Tone.Param.AutomationType.Linear) {\n\t            value = this._linearInterpolate(before.time, before.value, after.time, after.value, time);\n\t        } else if (after.type === Tone.Param.AutomationType.Exponential) {\n\t            value = this._exponentialInterpolate(before.time, before.value, after.time, after.value, time);\n\t        } else {\n\t            value = before.value;\n\t        }\n\t        return value;\n\t    };\n\t    /**\n\t\t *  Creates a schedule point with the current value at the current time.\n\t\t *  This is useful for creating an automation anchor point in order to\n\t\t *  schedule changes from the current value.\n\t\t *\n\t\t *  @param {number=} now (Optionally) pass the now value in.\n\t\t *  @returns {Tone.Param} this\n\t\t */\n\t    Tone.Param.prototype.setRampPoint = function (time) {\n\t        time = this.toSeconds(time);\n\t        var currentVal = this.getValueAtTime(time);\n\t        this.cancelAndHoldAtTime(time);\n\t        if (currentVal === 0) {\n\t            currentVal = this._minOutput;\n\t        }\n\t        this.setValueAtTime(this._toUnits(currentVal), time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Schedules a linear continuous change in parameter value from the\n\t\t *  previous scheduled parameter value to the given value.\n\t\t *\n\t\t *  @param  {number} value\n\t\t *  @param  {Time} endTime\n\t\t *  @returns {Tone.Param} this\n\t\t */\n\t    Tone.Param.prototype.linearRampToValueAtTime = function (value, endTime) {\n\t        value = this._fromUnits(value);\n\t        endTime = this.toSeconds(endTime);\n\t        this._events.add({\n\t            'type': Tone.Param.AutomationType.Linear,\n\t            'value': value,\n\t            'time': endTime\n\t        });\n\t        this._param.linearRampToValueAtTime(value, endTime);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Schedules an exponential continuous change in parameter value from\n\t\t *  the previous scheduled parameter value to the given value.\n\t\t *\n\t\t *  @param  {number} value\n\t\t *  @param  {Time} endTime\n\t\t *  @returns {Tone.Param} this\n\t\t */\n\t    Tone.Param.prototype.exponentialRampToValueAtTime = function (value, endTime) {\n\t        value = this._fromUnits(value);\n\t        value = Math.max(this._minOutput, value);\n\t        endTime = this.toSeconds(endTime);\n\t        //store the event\n\t        this._events.add({\n\t            'type': Tone.Param.AutomationType.Exponential,\n\t            'time': endTime,\n\t            'value': value\n\t        });\n\t        this._param.exponentialRampToValueAtTime(value, endTime);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Schedules an exponential continuous change in parameter value from\n\t\t *  the current time and current value to the given value over the\n\t\t *  duration of the rampTime.\n\t\t *\n\t\t *  @param  {number} value   The value to ramp to.\n\t\t *  @param  {Time} rampTime the time that it takes the\n\t\t *                               value to ramp from it's current value\n\t\t *  @param {Time}\t[startTime=now] \tWhen the ramp should start.\n\t\t *  @returns {Tone.Param} this\n\t\t *  @example\n\t\t * //exponentially ramp to the value 2 over 4 seconds.\n\t\t * signal.exponentialRampTo(2, 4);\n\t\t */\n\t    Tone.Param.prototype.exponentialRampTo = function (value, rampTime, startTime) {\n\t        startTime = this.toSeconds(startTime);\n\t        this.setRampPoint(startTime);\n\t        this.exponentialRampToValueAtTime(value, startTime + this.toSeconds(rampTime));\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Schedules an linear continuous change in parameter value from\n\t\t *  the current time and current value to the given value over the\n\t\t *  duration of the rampTime.\n\t\t *\n\t\t *  @param  {number} value   The value to ramp to.\n\t\t *  @param  {Time} rampTime the time that it takes the\n\t\t *                               value to ramp from it's current value\n\t\t *  @param {Time}\t[startTime=now] \tWhen the ramp should start.\n\t\t *  @returns {Tone.Param} this\n\t\t *  @example\n\t\t * //linearly ramp to the value 4 over 3 seconds.\n\t\t * signal.linearRampTo(4, 3);\n\t\t */\n\t    Tone.Param.prototype.linearRampTo = function (value, rampTime, startTime) {\n\t        startTime = this.toSeconds(startTime);\n\t        this.setRampPoint(startTime);\n\t        this.linearRampToValueAtTime(value, startTime + this.toSeconds(rampTime));\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Start exponentially approaching the target value at the given time. Since it\n\t\t *  is an exponential approach it will continue approaching after the ramp duration. The\n\t\t *  rampTime is the time that it takes to reach over 99% of the way towards the value.\n\t\t *  @param  {number} value   The value to ramp to.\n\t\t *  @param  {Time} rampTime the time that it takes the\n\t\t *                               value to ramp from it's current value\n\t\t *  @param {Time}\t[startTime=now] \tWhen the ramp should start.\n\t\t *  @returns {Tone.Param} this\n\t\t *  @example\n\t\t * //exponentially ramp to the value 2 over 4 seconds.\n\t\t * signal.exponentialRampTo(2, 4);\n\t\t */\n\t    Tone.Param.prototype.targetRampTo = function (value, rampTime, startTime) {\n\t        startTime = this.toSeconds(startTime);\n\t        this.setRampPoint(startTime);\n\t        this.exponentialApproachValueAtTime(value, startTime, rampTime);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Start exponentially approaching the target value at the given time. Since it\n\t\t *  is an exponential approach it will continue approaching after the ramp duration. The\n\t\t *  rampTime is the time that it takes to reach over 99% of the way towards the value. This methods\n\t\t *  is similar to setTargetAtTime except the third argument is a time instead of a 'timeConstant'\n\t\t *  @param  {number} value   The value to ramp to.\n\t\t *  @param {Time}\ttime \tWhen the ramp should start.\n\t\t *  @param  {Time} rampTime the time that it takes the\n\t\t *                               value to ramp from it's current value\n\t\t *  @returns {Tone.Param} this\n\t\t *  @example\n\t\t * //exponentially ramp to the value 2 over 4 seconds.\n\t\t * signal.exponentialRampTo(2, 4);\n\t\t */\n\t    Tone.Param.prototype.exponentialApproachValueAtTime = function (value, time, rampTime) {\n\t        var timeConstant = Math.log(this.toSeconds(rampTime) + 1) / Math.log(200);\n\t        time = this.toSeconds(time);\n\t        return this.setTargetAtTime(value, time, timeConstant);\n\t    };\n\t    /**\n\t\t *  Start exponentially approaching the target value at the given time with\n\t\t *  a rate having the given time constant.\n\t\t *  @param {number} value\n\t\t *  @param {Time} startTime\n\t\t *  @param {number} timeConstant\n\t\t *  @returns {Tone.Param} this\n\t\t */\n\t    Tone.Param.prototype.setTargetAtTime = function (value, startTime, timeConstant) {\n\t        value = this._fromUnits(value);\n\t        // The value will never be able to approach without timeConstant > 0.\n\t        if (timeConstant <= 0) {\n\t            throw new Error('timeConstant must be greater than 0');\n\t        }\n\t        startTime = this.toSeconds(startTime);\n\t        this._events.add({\n\t            'type': Tone.Param.AutomationType.Target,\n\t            'value': value,\n\t            'time': startTime,\n\t            'constant': timeConstant\n\t        });\n\t        this._param.setTargetAtTime(value, startTime, timeConstant);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Sets an array of arbitrary parameter values starting at the given time\n\t\t *  for the given duration.\n\t\t *\n\t\t *  @param {Array} values\n\t\t *  @param {Time} startTime\n\t\t *  @param {Time} duration\n\t\t *  @param {NormalRange} [scaling=1] If the values in the curve should be scaled by some value\n\t\t *  @returns {Tone.Param} this\n\t\t */\n\t    Tone.Param.prototype.setValueCurveAtTime = function (values, startTime, duration, scaling) {\n\t        scaling = Tone.defaultArg(scaling, 1);\n\t        duration = this.toSeconds(duration);\n\t        startTime = this.toSeconds(startTime);\n\t        this.setValueAtTime(values[0] * scaling, startTime);\n\t        var segTime = duration / (values.length - 1);\n\t        for (var i = 1; i < values.length; i++) {\n\t            this.linearRampToValueAtTime(values[i] * scaling, startTime + i * segTime);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancels all scheduled parameter changes with times greater than or\n\t\t *  equal to startTime.\n\t\t *\n\t\t *  @param  {Time} time\n\t\t *  @returns {Tone.Param} this\n\t\t */\n\t    Tone.Param.prototype.cancelScheduledValues = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._events.cancel(time);\n\t        this._param.cancelScheduledValues(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  This is similar to [cancelScheduledValues](#cancelScheduledValues) except\n\t\t *  it holds the automated value at time until the next automated event.\n\t\t *  @param  {Time} time\n\t\t *  @returns {Tone.Param} this\n\t\t */\n\t    Tone.Param.prototype.cancelAndHoldAtTime = function (time) {\n\t        var valueAtTime = this.getValueAtTime(time);\n\t        //if there is an event at the given time\n\t        //and that even is not a \"set\"\n\t        var before = this._events.get(time);\n\t        var after = this._events.getAfter(time);\n\t        if (before && before.time === time) {\n\t            //remove everything after\n\t            if (after) {\n\t                this._events.cancel(after.time);\n\t            } else {\n\t                this._events.cancel(time + 0.000001);\n\t            }\n\t        } else if (after) {\n\t            //cancel the next event(s)\n\t            this._events.cancel(after.time);\n\t            if (!this._param.cancelAndHoldAtTime) {\n\t                this._param.cancelScheduledValues(time);\n\t            }\n\t            if (after.type === Tone.Param.AutomationType.Linear) {\n\t                if (!this._param.cancelAndHoldAtTime) {\n\t                    this.linearRampToValueAtTime(valueAtTime, time);\n\t                } else {\n\t                    this._events.add({\n\t                        'type': Tone.Param.AutomationType.Linear,\n\t                        'value': valueAtTime,\n\t                        'time': time\n\t                    });\n\t                }\n\t            } else if (after.type === Tone.Param.AutomationType.Exponential) {\n\t                if (!this._param.cancelAndHoldAtTime) {\n\t                    this.exponentialRampToValueAtTime(valueAtTime, time);\n\t                } else {\n\t                    this._events.add({\n\t                        'type': Tone.Param.AutomationType.Exponential,\n\t                        'value': valueAtTime,\n\t                        'time': time\n\t                    });\n\t                }\n\t            }\n\t        }\n\t        //set the value at the given time\n\t        this._events.add({\n\t            'type': Tone.Param.AutomationType.SetValue,\n\t            'value': valueAtTime,\n\t            'time': time\n\t        });\n\t        if (this._param.cancelAndHoldAtTime) {\n\t            this._param.cancelAndHoldAtTime(time);\n\t        } else {\n\t            this._param.setValueAtTime(valueAtTime, time);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Ramps to the given value over the duration of the rampTime.\n\t\t *  Automatically selects the best ramp type (exponential or linear)\n\t\t *  depending on the `units` of the signal\n\t\t *\n\t\t *  @param  {number} value\n\t\t *  @param  {Time} rampTime \tThe time that it takes the\n\t\t *                              value to ramp from it's current value\n\t\t *  @param {Time}\t[startTime=now] \tWhen the ramp should start.\n\t\t *  @returns {Tone.Param} this\n\t\t *  @example\n\t\t * //ramp to the value either linearly or exponentially\n\t\t * //depending on the \"units\" value of the signal\n\t\t * signal.rampTo(0, 10);\n\t\t *  @example\n\t\t * //schedule it to ramp starting at a specific time\n\t\t * signal.rampTo(0, 10, 5)\n\t\t */\n\t    Tone.Param.prototype.rampTo = function (value, rampTime, startTime) {\n\t        rampTime = Tone.defaultArg(rampTime, 0.1);\n\t        if (this.units === Tone.Type.Frequency || this.units === Tone.Type.BPM || this.units === Tone.Type.Decibels) {\n\t            this.exponentialRampTo(value, rampTime, startTime);\n\t        } else {\n\t            this.linearRampTo(value, rampTime, startTime);\n\t        }\n\t        return this;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tAUTOMATION CURVE CALCULATIONS\n\t    //\tMIT License, copyright (c) 2014 Jordan Santell\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    // Calculates the the value along the curve produced by setTargetAtTime\n\t    Tone.Param.prototype._exponentialApproach = function (t0, v0, v1, timeConstant, t) {\n\t        return v1 + (v0 - v1) * Math.exp(-(t - t0) / timeConstant);\n\t    };\n\t    // Calculates the the value along the curve produced by linearRampToValueAtTime\n\t    Tone.Param.prototype._linearInterpolate = function (t0, v0, t1, v1, t) {\n\t        return v0 + (v1 - v0) * ((t - t0) / (t1 - t0));\n\t    };\n\t    // Calculates the the value along the curve produced by exponentialRampToValueAtTime\n\t    Tone.Param.prototype._exponentialInterpolate = function (t0, v0, t1, v1, t) {\n\t        return v0 * Math.pow(v1 / v0, (t - t0) / (t1 - t0));\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @returns {Tone.Param} this\n\t\t */\n\t    Tone.Param.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._param = null;\n\t        this._events = null;\n\t        return this;\n\t    };\n\t    return Tone.Param;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Wrapper around the OfflineAudioContext\n\t\t *  @extends {Tone.Context}\n\t\t *  @param  {Number}  channels  The number of channels to render\n\t\t *  @param  {Number}  duration  The duration to render in samples\n\t\t *  @param {Number} sampleRate the sample rate to render at\n\t\t */\n\t    Tone.OfflineContext = function (channels, duration, sampleRate) {\n\t        /**\n\t\t\t *  The offline context\n\t\t\t *  @private\n\t\t\t *  @type  {OfflineAudioContext}\n\t\t\t */\n\t        var offlineContext = new OfflineAudioContext(channels, duration * sampleRate, sampleRate);\n\t        //wrap the methods/members\n\t        Tone.Context.call(this, {\n\t            'context': offlineContext,\n\t            'clockSource': 'offline',\n\t            'lookAhead': 0,\n\t            'updateInterval': 128 / sampleRate\n\t        });\n\t        /**\n\t\t\t *  A private reference to the duration\n\t\t\t *  @private\n\t\t\t *  @type  {Number}\n\t\t\t */\n\t        this._duration = duration;\n\t        /**\n\t\t\t *  An artificial clock source\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._currentTime = 0;\n\t    };\n\t    Tone.extend(Tone.OfflineContext, Tone.Context);\n\t    /**\n\t\t *  Override the now method to point to the internal clock time\n\t\t *  @return  {Number}\n\t\t */\n\t    Tone.OfflineContext.prototype.now = function () {\n\t        return this._currentTime;\n\t    };\n\t    /**\n\t\t *  Render the output of the OfflineContext\n\t\t *  @return  {Promise}\n\t\t */\n\t    Tone.OfflineContext.prototype.render = function () {\n\t        while (this._duration - this._currentTime >= 0) {\n\t            //invoke all the callbacks on that time\n\t            this.emit('tick');\n\t            //increment the clock\n\t            this._currentTime += this.blockTime;\n\t        }\n\t        return this._context.startRendering();\n\t    };\n\t    /**\n\t\t *  Close the context\n\t\t *  @return  {Promise}\n\t\t */\n\t    Tone.OfflineContext.prototype.close = function () {\n\t        this._context = null;\n\t        return Promise.resolve();\n\t    };\n\t    return Tone.OfflineContext;\n\t});\n\tModule(function (Tone) {\n\t    if (Tone.supported) {\n\t        var ua = navigator.userAgent.toLowerCase();\n\t        var isMobileSafari = ua.includes('safari') && !ua.includes('chrome') && ua.includes('mobile');\n\t        if (isMobileSafari) {\n\t            //mobile safari has a bizarre bug with the offline context\n\t            //when a BufferSourceNode is started, it starts the offline context\n\t            //\n\t            //deferring all BufferSource starts till the last possible moment\n\t            //reduces the likelihood of this happening\n\t            Tone.OfflineContext.prototype.createBufferSource = function () {\n\t                var bufferSource = this._context.createBufferSource();\n\t                var _native_start = bufferSource.start;\n\t                bufferSource.start = function (time) {\n\t                    this.setTimeout(function () {\n\t                        _native_start.call(bufferSource, time);\n\t                    }.bind(this), 0);\n\t                }.bind(this);\n\t                return bufferSource;\n\t            };\n\t        }\n\t    }\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class A thin wrapper around the Native Web Audio GainNode.\n\t\t *         The GainNode is a basic building block of the Web Audio\n\t\t *         API and is useful for routing audio and adjusting gains.\n\t\t *  @extends {Tone}\n\t\t *  @param  {Number=}  gain  The initial gain of the GainNode\n\t\t *  @param {Tone.Type=} units The units of the gain parameter.\n\t\t */\n\t    Tone.Gain = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'gain',\n\t            'units'\n\t        ], Tone.Gain);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The GainNode\n\t\t\t *  @type  {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this.input = this.output = this._gainNode = this.context.createGain();\n\t        /**\n\t\t\t *  The gain parameter of the gain node.\n\t\t\t *  @type {Gain}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.gain = new Tone.Param({\n\t            'param': this._gainNode.gain,\n\t            'units': options.units,\n\t            'value': options.gain,\n\t            'convert': options.convert\n\t        });\n\t        this._readOnly('gain');\n\t    };\n\t    Tone.extend(Tone.Gain, Tone.AudioNode);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.Gain.defaults = {\n\t        'gain': 1,\n\t        'convert': true\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.Gain}  this\n\t\t */\n\t    Tone.Gain.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._gainNode.disconnect();\n\t        this._gainNode = null;\n\t        this._writable('gain');\n\t        this.gain.dispose();\n\t        this.gain = null;\n\t    };\n\t    return Tone.Gain;\n\t});\n\tModule(function (Tone) {\n\t    if (Tone.supported && !AudioContext.prototype.createConstantSource) {\n\t        var ConstantSourceNode = function (context) {\n\t            this.context = context;\n\t            var buffer = context.createBuffer(1, 128, context.sampleRate);\n\t            var arr = buffer.getChannelData(0);\n\t            for (var i = 0; i < arr.length; i++) {\n\t                arr[i] = 1;\n\t            }\n\t            this._bufferSource = context.createBufferSource();\n\t            this._bufferSource.channelCount = 1;\n\t            this._bufferSource.channelCountMode = 'explicit';\n\t            this._bufferSource.buffer = buffer;\n\t            this._bufferSource.loop = true;\n\t            var gainNode = this._output = context.createGain();\n\t            this.offset = gainNode.gain;\n\t            this._bufferSource.connect(gainNode);\n\t        };\n\t        ConstantSourceNode.prototype.start = function (time) {\n\t            this._bufferSource.start(time);\n\t            return this;\n\t        };\n\t        ConstantSourceNode.prototype.stop = function (time) {\n\t            this._bufferSource.stop(time);\n\t            return this;\n\t        };\n\t        ConstantSourceNode.prototype.connect = function () {\n\t            this._output.connect.apply(this._output, arguments);\n\t            return this;\n\t        };\n\t        ConstantSourceNode.prototype.disconnect = function () {\n\t            this._output.disconnect.apply(this._output, arguments);\n\t            return this;\n\t        };\n\t        AudioContext.prototype.createConstantSource = function () {\n\t            return new ConstantSourceNode(this);\n\t        };\n\t        Tone.Context.prototype.createConstantSource = function () {\n\t            return new ConstantSourceNode(this);\n\t        };\n\t    }\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  A signal is an audio-rate value. Tone.Signal is a core component of the library.\n\t\t *          Unlike a number, Signals can be scheduled with sample-level accuracy. Tone.Signal\n\t\t *          has all of the methods available to native Web Audio\n\t\t *          [AudioParam](http://webaudio.github.io/web-audio-api/#the-audioparam-interface)\n\t\t *          as well as additional conveniences. Read more about working with signals\n\t\t *          [here](https://github.com/Tonejs/Tone.js/wiki/Signals).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Param}\n\t\t *  @param {Number|AudioParam} [value] Initial value of the signal. If an AudioParam\n\t\t *                                     is passed in, that parameter will be wrapped\n\t\t *                                     and controlled by the Signal.\n\t\t *  @param {string} [units=Number] unit The units the signal is in.\n\t\t *  @example\n\t\t * var signal = new Tone.Signal(10);\n\t\t */\n\t    Tone.Signal = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'value',\n\t            'units'\n\t        ], Tone.Signal);\n\t        Tone.Param.call(this, options);\n\t        /**\n\t\t\t* When a signal is connected to another signal or audio param,\n\t\t\t* this signal becomes a proxy for it\n\t\t\t* @type {Array}\n\t\t\t* @private\n\t\t\t*/\n\t        this._proxies = [];\n\t        /**\n\t\t\t* Indicates if the constant source was started or not\n\t\t\t* @private\n\t\t\t* @type {Boolean}\n\t\t\t*/\n\t        this._sourceStarted = false;\n\t        /**\n\t\t\t * The constant source node which generates the signal\n\t\t\t * @type {ConstantSourceNode}\n\t\t\t * @private\n\t\t\t */\n\t        this._constantSource = this.context.createConstantSource();\n\t        this._param = this._constantSource.offset;\n\t        this.value = options.value;\n\t        /**\n\t\t\t * The node where the constant signal value is scaled.\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t        this.output = this._constantSource;\n\t        /**\n\t\t\t * The node where the value is set.\n\t\t\t * @type {Tone.Param}\n\t\t\t * @private\n\t\t\t */\n\t        this.input = this._param = this.output.offset;\n\t    };\n\t    Tone.extend(Tone.Signal, Tone.Param);\n\t    /**\n\t\t *  The default values\n\t\t *  @type  {Object}\n\t\t *  @static\n\t\t *  @const\n\t\t */\n\t    Tone.Signal.defaults = {\n\t        'value': 0,\n\t        'units': Tone.Type.Default,\n\t        'convert': true\n\t    };\n\t    /**\n\t\t *  When signals connect to other signals or AudioParams,\n\t\t *  they take over the output value of that signal or AudioParam.\n\t\t *  For all other nodes, the behavior is the same as a default <code>connect</code>.\n\t\t *\n\t\t *  @override\n\t\t *  @param {AudioParam|AudioNode|Tone.Signal|Tone} node\n\t\t *  @param {number} [outputNumber=0] The output number to connect from.\n\t\t *  @param {number} [inputNumber=0] The input number to connect to.\n\t\t *  @returns {Tone.Signal} this\n\t\t *  @method\n\t\t */\n\t    Tone.Signal.prototype.connect = function (node) {\n\t        //this is an optimization where this node will forward automations\n\t        //to connected nodes without any signal if possible.\n\t        if (this._isParam(node) && !this._sourceStarted) {\n\t            this._proxies.push(node);\n\t            node.overridden = true;\n\t            this._applyAutomations(node);\n\t        } else {\n\t            Tone.SignalBase.prototype.connect.apply(this, arguments);\n\t            if (!this._sourceStarted) {\n\t                this._sourceStarted = true;\n\t                this._constantSource.start(0);\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * Takes a node as an argument and returns if it is a Param or AudioParam\n\t\t * @param  {*} node The node to test\n\t\t * @return {Boolean}\n\t\t * @private\n\t\t */\n\t    Tone.Signal.prototype._isParam = function (node) {\n\t        return Tone.Param && Tone.Param === node.constructor || node instanceof AudioParam;\n\t    };\n\t    /**\n\t\t * Discard the optimization and connect all of the proxies\n\t\t * @private\n\t\t */\n\t    Tone.Signal.prototype._connectProxies = function () {\n\t        if (!this._sourceStarted) {\n\t            this._sourceStarted = true;\n\t            this._constantSource.start(0);\n\t        }\n\t        this._proxies.forEach(function (proxy) {\n\t            Tone.SignalBase.prototype.connect.call(this, proxy);\n\t            if (proxy._proxies) {\n\t                proxy._connectProxies();\n\t            }\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t * Invoked when a node is connected to this\n\t\t * @param  {AudioNode} from\n\t\t * @private\n\t\t */\n\t    Tone.Signal.prototype._onConnect = function (from) {\n\t        if (!this._isParam(from)) {\n\t            //connect all the proxies\n\t            this._connectProxies();\n\t        }\n\t    };\n\t    /**\n\t\t * Apply all the current automations to the given parameter\n\t\t * @param  {AudioParam} param\n\t\t * @private\n\t\t */\n\t    Tone.Signal.prototype._applyAutomations = function (param) {\n\t        var now = this.context.currentTime;\n\t        param.cancelScheduledValues(now);\n\t        var currentVal = this.getValueAtTime(now);\n\t        param.setValueAtTime(currentVal, now);\n\t        this._events.forEachFrom(now, function (event) {\n\t            param[event.type](event.value, event.time, event.constant);\n\t        });\n\t    };\n\t    /**\n\t\t * Disconnect from the given node or all nodes if no param is given.\n\t\t * @param  {AudioNode|AudioParam} node\n\t\t * @return {Tone.Signal}      this\n\t\t */\n\t    Tone.Signal.prototype.disconnect = function (node) {\n\t        if (this._proxies.includes(node)) {\n\t            var index = this._proxies.indexOf(node);\n\t            this._proxies.splice(index, 1);\n\t        } else if (!node) {\n\t            //no argument, disconnect everything\n\t            this._proxies = [];\n\t        }\n\t        return Tone.SignalBase.prototype.disconnect.apply(this, arguments);\n\t    };\n\t    /**\n\t\t * Return the current signal value at the given time.\n\t\t * @param  {Time} time When to get the signal value\n\t\t * @return {Number}\n\t\t */\n\t    Tone.Signal.prototype.getValueAtTime = function (time) {\n\t        if (this._param.getValueAtTime) {\n\t            return this._param.getValueAtTime(time);\n\t        } else {\n\t            return Tone.Param.prototype.getValueAtTime.call(this, time);\n\t        }\n\t    };\n\t    //wrap all of the automation methods\n\t    [\n\t        'setValueAtTime',\n\t        'linearRampToValueAtTime',\n\t        'exponentialRampToValueAtTime',\n\t        'setTargetAtTime'\n\t    ].forEach(function (method) {\n\t        var previousMethod = Tone.Signal.prototype[method];\n\t        Tone.Signal.prototype[method] = function () {\n\t            var args = arguments;\n\t            previousMethod.apply(this, arguments);\n\t            args[0] = this._fromUnits(args[0]);\n\t            args[1] = this.toSeconds(args[1]);\n\t            //apply it to the proxies\n\t            this._proxies.forEach(function (signal) {\n\t                signal[method].apply(signal, args);\n\t            });\n\t        };\n\t    });\n\t    [\n\t        'cancelScheduledValues',\n\t        'cancelAndHoldAtTime'\n\t    ].forEach(function (method) {\n\t        var previousMethod = Tone.Signal.prototype[method];\n\t        Tone.Signal.prototype[method] = function () {\n\t            var args = arguments;\n\t            previousMethod.apply(this, arguments);\n\t            args[0] = this.toSeconds(args[0]);\n\t            //apply it to the proxies\n\t            this._proxies.forEach(function (signal) {\n\t                signal[method].apply(signal, args);\n\t            });\n\t        };\n\t    });\n\t    /**\n\t\t *  dispose and disconnect\n\t\t *  @returns {Tone.Signal} this\n\t\t */\n\t    Tone.Signal.prototype.dispose = function () {\n\t        Tone.Param.prototype.dispose.call(this);\n\t        this._constantSource.disconnect();\n\t        this._constantSource = null;\n\t        this._proxies = null;\n\t        return this;\n\t    };\n\t    return Tone.Signal;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Pow applies an exponent to the incoming signal. The incoming signal\n\t\t *         must be AudioRange.\n\t\t *\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @constructor\n\t\t *  @param {Positive} exp The exponent to apply to the incoming signal, must be at least 2. \n\t\t *  @example\n\t\t * var pow = new Tone.Pow(2);\n\t\t * var sig = new Tone.Signal(0.5).connect(pow);\n\t\t * //output of pow is 0.25. \n\t\t */\n\t    Tone.Pow = function (exp) {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t * the exponent\n\t\t\t * @private\n\t\t\t * @type {number}\n\t\t\t */\n\t        this._exp = Tone.defaultArg(exp, 1);\n\t        /**\n\t\t\t *  @type {WaveShaperNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._expScaler = this.input = this.output = new Tone.WaveShaper(this._expFunc(this._exp), 8192);\n\t    };\n\t    Tone.extend(Tone.Pow, Tone.SignalBase);\n\t    /**\n\t\t * The value of the exponent.\n\t\t * @memberOf Tone.Pow#\n\t\t * @type {number}\n\t\t * @name value\n\t\t */\n\t    Object.defineProperty(Tone.Pow.prototype, 'value', {\n\t        get: function () {\n\t            return this._exp;\n\t        },\n\t        set: function (exp) {\n\t            this._exp = exp;\n\t            this._expScaler.setMap(this._expFunc(this._exp));\n\t        }\n\t    });\n\t    /**\n\t\t *  the function which maps the waveshaper\n\t\t *  @param   {number} exp\n\t\t *  @return {function}\n\t\t *  @private\n\t\t */\n\t    Tone.Pow.prototype._expFunc = function (exp) {\n\t        return function (val) {\n\t            return Math.pow(Math.abs(val), exp);\n\t        };\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Pow} this\n\t\t */\n\t    Tone.Pow.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._expScaler.dispose();\n\t        this._expScaler = null;\n\t        return this;\n\t    };\n\t    return Tone.Pow;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Envelope is an [ADSR](https://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope)\n\t\t *          envelope generator. Tone.Envelope outputs a signal which\n\t\t *          can be connected to an AudioParam or Tone.Signal.\n\t\t *          <img src=\"https://upload.wikimedia.org/wikipedia/commons/e/ea/ADSR_parameter.svg\">\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Time} [attack] The amount of time it takes for the envelope to go from\n\t\t *                         0 to it's maximum value.\n\t\t *  @param {Time} [decay]\tThe period of time after the attack that it takes for the envelope\n\t\t *                       \tto fall to the sustain value.\n\t\t *  @param {NormalRange} [sustain]\tThe percent of the maximum value that the envelope rests at until\n\t\t *                                \tthe release is triggered.\n\t\t *  @param {Time} [release]\tThe amount of time after the release is triggered it takes to reach 0.\n\t\t *  @example\n\t\t * //an amplitude envelope\n\t\t * var gainNode = Tone.context.createGain();\n\t\t * var env = new Tone.Envelope({\n\t\t * \t\"attack\" : 0.1,\n\t\t * \t\"decay\" : 0.2,\n\t\t * \t\"sustain\" : 1,\n\t\t * \t\"release\" : 0.8,\n\t\t * });\n\t\t * env.connect(gainNode.gain);\n\t\t */\n\t    Tone.Envelope = function () {\n\t        //get all of the defaults\n\t        var options = Tone.defaults(arguments, [\n\t            'attack',\n\t            'decay',\n\t            'sustain',\n\t            'release'\n\t        ], Tone.Envelope);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  When triggerAttack is called, the attack time is the amount of\n\t\t\t *  time it takes for the envelope to reach it's maximum value.\n\t\t\t *  @type {Time}\n\t\t\t */\n\t        this.attack = options.attack;\n\t        /**\n\t\t\t *  After the attack portion of the envelope, the value will fall\n\t\t\t *  over the duration of the decay time to it's sustain value.\n\t\t\t *  @type {Time}\n\t\t\t */\n\t        this.decay = options.decay;\n\t        /**\n\t\t\t * \tThe sustain value is the value\n\t\t\t * \twhich the envelope rests at after triggerAttack is\n\t\t\t * \tcalled, but before triggerRelease is invoked.\n\t\t\t *  @type {NormalRange}\n\t\t\t */\n\t        this.sustain = options.sustain;\n\t        /**\n\t\t\t *  After triggerRelease is called, the envelope's\n\t\t\t *  value will fall to it's miminum value over the\n\t\t\t *  duration of the release time.\n\t\t\t *  @type {Time}\n\t\t\t */\n\t        this.release = options.release;\n\t        /**\n\t\t\t *  the next time the envelope is at standby\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._attackCurve = 'linear';\n\t        /**\n\t\t\t *  the next time the envelope is at standby\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._releaseCurve = 'exponential';\n\t        /**\n\t\t\t *  the signal\n\t\t\t *  @type {Tone.Signal}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sig = this.output = new Tone.Signal(0);\n\t        //set the attackCurve initially\n\t        this.attackCurve = options.attackCurve;\n\t        this.releaseCurve = options.releaseCurve;\n\t    };\n\t    Tone.extend(Tone.Envelope, Tone.AudioNode);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @static\n\t\t *  @const\n\t\t */\n\t    Tone.Envelope.defaults = {\n\t        'attack': 0.01,\n\t        'decay': 0.1,\n\t        'sustain': 0.5,\n\t        'release': 1,\n\t        'attackCurve': 'linear',\n\t        'releaseCurve': 'exponential'\n\t    };\n\t    /**\n\t\t * Read the current value of the envelope. Useful for\n\t\t * syncronizing visual output to the envelope.\n\t\t * @memberOf Tone.Envelope#\n\t\t * @type {Number}\n\t\t * @name value\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Envelope.prototype, 'value', {\n\t        get: function () {\n\t            return this.getValueAtTime(this.now());\n\t        }\n\t    });\n\t    /**\n\t\t * The shape of the attack.\n\t\t * Can be any of these strings:\n\t\t * <ul>\n\t\t *   <li>linear</li>\n\t\t *   <li>exponential</li>\n\t\t *   <li>sine</li>\n\t\t *   <li>cosine</li>\n\t\t *   <li>bounce</li>\n\t\t *   <li>ripple</li>\n\t\t *   <li>step</li>\n\t\t * </ul>\n\t\t * Can also be an array which describes the curve. Values\n\t\t * in the array are evenly subdivided and linearly\n\t\t * interpolated over the duration of the attack.\n\t\t * @memberOf Tone.Envelope#\n\t\t * @type {String|Array}\n\t\t * @name attackCurve\n\t\t * @example\n\t\t * env.attackCurve = \"linear\";\n\t\t * @example\n\t\t * //can also be an array\n\t\t * env.attackCurve = [0, 0.2, 0.3, 0.4, 1]\n\t\t */\n\t    Object.defineProperty(Tone.Envelope.prototype, 'attackCurve', {\n\t        get: function () {\n\t            if (Tone.isString(this._attackCurve)) {\n\t                return this._attackCurve;\n\t            } else if (Tone.isArray(this._attackCurve)) {\n\t                //look up the name in the curves array\n\t                for (var type in Tone.Envelope.Type) {\n\t                    if (Tone.Envelope.Type[type].In === this._attackCurve) {\n\t                        return type;\n\t                    }\n\t                }\n\t                //otherwise just return the array\n\t                return this._attackCurve;\n\t            }\n\t        },\n\t        set: function (curve) {\n\t            //check if it's a valid type\n\t            if (Tone.Envelope.Type.hasOwnProperty(curve)) {\n\t                var curveDef = Tone.Envelope.Type[curve];\n\t                if (Tone.isObject(curveDef)) {\n\t                    this._attackCurve = curveDef.In;\n\t                } else {\n\t                    this._attackCurve = curveDef;\n\t                }\n\t            } else if (Tone.isArray(curve)) {\n\t                this._attackCurve = curve;\n\t            } else {\n\t                throw new Error('Tone.Envelope: invalid curve: ' + curve);\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The shape of the release. See the attack curve types.\n\t\t * @memberOf Tone.Envelope#\n\t\t * @type {String|Array}\n\t\t * @name releaseCurve\n\t\t * @example\n\t\t * env.releaseCurve = \"linear\";\n\t\t */\n\t    Object.defineProperty(Tone.Envelope.prototype, 'releaseCurve', {\n\t        get: function () {\n\t            if (Tone.isString(this._releaseCurve)) {\n\t                return this._releaseCurve;\n\t            } else if (Tone.isArray(this._releaseCurve)) {\n\t                //look up the name in the curves array\n\t                for (var type in Tone.Envelope.Type) {\n\t                    if (Tone.Envelope.Type[type].Out === this._releaseCurve) {\n\t                        return type;\n\t                    }\n\t                }\n\t                //otherwise just return the array\n\t                return this._releaseCurve;\n\t            }\n\t        },\n\t        set: function (curve) {\n\t            //check if it's a valid type\n\t            if (Tone.Envelope.Type.hasOwnProperty(curve)) {\n\t                var curveDef = Tone.Envelope.Type[curve];\n\t                if (Tone.isObject(curveDef)) {\n\t                    this._releaseCurve = curveDef.Out;\n\t                } else {\n\t                    this._releaseCurve = curveDef;\n\t                }\n\t            } else if (Tone.isArray(curve)) {\n\t                this._releaseCurve = curve;\n\t            } else {\n\t                throw new Error('Tone.Envelope: invalid curve: ' + curve);\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Trigger the attack/decay portion of the ADSR envelope.\n\t\t *  @param  {Time} [time=now] When the attack should start.\n\t\t *  @param {NormalRange} [velocity=1] The velocity of the envelope scales the vales.\n\t\t *                               number between 0-1\n\t\t *  @returns {Tone.Envelope} this\n\t\t *  @example\n\t\t *  //trigger the attack 0.5 seconds from now with a velocity of 0.2\n\t\t *  env.triggerAttack(\"+0.5\", 0.2);\n\t\t */\n\t    Tone.Envelope.prototype.triggerAttack = function (time, velocity) {\n\t        time = this.toSeconds(time);\n\t        var originalAttack = this.toSeconds(this.attack);\n\t        var attack = originalAttack;\n\t        var decay = this.toSeconds(this.decay);\n\t        velocity = Tone.defaultArg(velocity, 1);\n\t        //check if it's not a complete attack\n\t        var currentValue = this.getValueAtTime(time);\n\t        if (currentValue > 0) {\n\t            //subtract the current value from the attack time\n\t            var attackRate = 1 / attack;\n\t            var remainingDistance = 1 - currentValue;\n\t            //the attack is now the remaining time\n\t            attack = remainingDistance / attackRate;\n\t        }\n\t        //attack\n\t        if (this._attackCurve === 'linear') {\n\t            this._sig.linearRampTo(velocity, attack, time);\n\t        } else if (this._attackCurve === 'exponential') {\n\t            this._sig.targetRampTo(velocity, attack, time);\n\t        } else if (attack > 0) {\n\t            this._sig.cancelAndHoldAtTime(time);\n\t            var curve = this._attackCurve;\n\t            //take only a portion of the curve\n\t            if (attack < originalAttack) {\n\t                var percentComplete = 1 - attack / originalAttack;\n\t                var sliceIndex = Math.floor(percentComplete * this._attackCurve.length);\n\t                curve = this._attackCurve.slice(sliceIndex);\n\t                //the first index is the current value\n\t                curve[0] = currentValue;\n\t            }\n\t            this._sig.setValueCurveAtTime(curve, time, attack, velocity);\n\t        }\n\t        //decay\n\t        if (decay) {\n\t            this._sig.targetRampTo(velocity * this.sustain, decay, attack + time);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Triggers the release of the envelope.\n\t\t *  @param  {Time} [time=now] When the release portion of the envelope should start.\n\t\t *  @returns {Tone.Envelope} this\n\t\t *  @example\n\t\t *  //trigger release immediately\n\t\t *  env.triggerRelease();\n\t\t */\n\t    Tone.Envelope.prototype.triggerRelease = function (time) {\n\t        time = this.toSeconds(time);\n\t        var currentValue = this.getValueAtTime(time);\n\t        if (currentValue > 0) {\n\t            var release = this.toSeconds(this.release);\n\t            if (this._releaseCurve === 'linear') {\n\t                this._sig.linearRampTo(0, release, time);\n\t            } else if (this._releaseCurve === 'exponential') {\n\t                this._sig.targetRampTo(0, release, time);\n\t            } else {\n\t                var curve = this._releaseCurve;\n\t                if (Tone.isArray(curve)) {\n\t                    this._sig.cancelAndHoldAtTime(time);\n\t                    this._sig.setValueCurveAtTime(curve, time, release, currentValue);\n\t                }\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Get the scheduled value at the given time. This will\n\t\t *  return the unconverted (raw) value.\n\t\t *  @param  {Number}  time  The time in seconds.\n\t\t *  @return  {Number}  The scheduled value at the given time.\n\t\t */\n\t    Tone.Envelope.prototype.getValueAtTime = function (time) {\n\t        return this._sig.getValueAtTime(time);\n\t    };\n\t    /**\n\t\t *  triggerAttackRelease is shorthand for triggerAttack, then waiting\n\t\t *  some duration, then triggerRelease.\n\t\t *  @param {Time} duration The duration of the sustain.\n\t\t *  @param {Time} [time=now] When the attack should be triggered.\n\t\t *  @param {number} [velocity=1] The velocity of the envelope.\n\t\t *  @returns {Tone.Envelope} this\n\t\t *  @example\n\t\t * //trigger the attack and then the release after 0.6 seconds.\n\t\t * env.triggerAttackRelease(0.6);\n\t\t */\n\t    Tone.Envelope.prototype.triggerAttackRelease = function (duration, time, velocity) {\n\t        time = this.toSeconds(time);\n\t        this.triggerAttack(time, velocity);\n\t        this.triggerRelease(time + this.toSeconds(duration));\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancels all scheduled envelope changes after the given time.\n\t\t *  @param  {Time} after\n\t\t *  @returns {Tone.Envelope} this\n\t\t */\n\t    Tone.Envelope.prototype.cancel = function (after) {\n\t        this._sig.cancelScheduledValues(after);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Borrows the connect method from Tone.Signal.\n\t\t *  @function\n\t\t *  @private\n\t\t */\n\t    Tone.Envelope.prototype.connect = Tone.SignalBase.prototype.connect;\n\t    /**\n\t \t *  Generate some complex envelope curves.\n\t \t */\n\t    (function _createCurves() {\n\t        var curveLen = 128;\n\t        var i, k;\n\t        //cosine curve\n\t        var cosineCurve = [];\n\t        for (i = 0; i < curveLen; i++) {\n\t            cosineCurve[i] = Math.sin(i / (curveLen - 1) * (Math.PI / 2));\n\t        }\n\t        //ripple curve\n\t        var rippleCurve = [];\n\t        var rippleCurveFreq = 6.4;\n\t        for (i = 0; i < curveLen - 1; i++) {\n\t            k = i / (curveLen - 1);\n\t            var sineWave = Math.sin(k * (Math.PI * 2) * rippleCurveFreq - Math.PI / 2) + 1;\n\t            rippleCurve[i] = sineWave / 10 + k * 0.83;\n\t        }\n\t        rippleCurve[curveLen - 1] = 1;\n\t        //stairs curve\n\t        var stairsCurve = [];\n\t        var steps = 5;\n\t        for (i = 0; i < curveLen; i++) {\n\t            stairsCurve[i] = Math.ceil(i / (curveLen - 1) * steps) / steps;\n\t        }\n\t        //in-out easing curve\n\t        var sineCurve = [];\n\t        for (i = 0; i < curveLen; i++) {\n\t            k = i / (curveLen - 1);\n\t            sineCurve[i] = 0.5 * (1 - Math.cos(Math.PI * k));\n\t        }\n\t        //a bounce curve\n\t        var bounceCurve = [];\n\t        for (i = 0; i < curveLen; i++) {\n\t            k = i / (curveLen - 1);\n\t            var freq = Math.pow(k, 3) * 4 + 0.2;\n\t            var val = Math.cos(freq * Math.PI * 2 * k);\n\t            bounceCurve[i] = Math.abs(val * (1 - k));\n\t        }\n\t        /**\n\t\t\t *  Invert a value curve to make it work for the release\n\t\t\t *  @private\n\t\t\t */\n\t        function invertCurve(curve) {\n\t            var out = new Array(curve.length);\n\t            for (var j = 0; j < curve.length; j++) {\n\t                out[j] = 1 - curve[j];\n\t            }\n\t            return out;\n\t        }\n\t        /**\n\t\t\t *  reverse the curve\n\t\t\t *  @private\n\t\t\t */\n\t        function reverseCurve(curve) {\n\t            return curve.slice(0).reverse();\n\t        }\n\t        /**\n\t\t\t *  attack and release curve arrays\n\t\t\t *  @type  {Object}\n\t\t\t *  @private\n\t\t\t */\n\t        Tone.Envelope.Type = {\n\t            'linear': 'linear',\n\t            'exponential': 'exponential',\n\t            'bounce': {\n\t                In: invertCurve(bounceCurve),\n\t                Out: bounceCurve\n\t            },\n\t            'cosine': {\n\t                In: cosineCurve,\n\t                Out: reverseCurve(cosineCurve)\n\t            },\n\t            'step': {\n\t                In: stairsCurve,\n\t                Out: invertCurve(stairsCurve)\n\t            },\n\t            'ripple': {\n\t                In: rippleCurve,\n\t                Out: invertCurve(rippleCurve)\n\t            },\n\t            'sine': {\n\t                In: sineCurve,\n\t                Out: invertCurve(sineCurve)\n\t            }\n\t        };\n\t    }());\n\t    /**\n\t\t *  Disconnect and dispose.\n\t\t *  @returns {Tone.Envelope} this\n\t\t */\n\t    Tone.Envelope.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._sig.dispose();\n\t        this._sig = null;\n\t        this._attackCurve = null;\n\t        this._releaseCurve = null;\n\t        return this;\n\t    };\n\t    return Tone.Envelope;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.AmplitudeEnvelope is a Tone.Envelope connected to a gain node.\n\t\t *          Unlike Tone.Envelope, which outputs the envelope's value, Tone.AmplitudeEnvelope accepts\n\t\t *          an audio signal as the input and will apply the envelope to the amplitude\n\t\t *          of the signal. Read more about ADSR Envelopes on [Wikipedia](https://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Envelope}\n\t\t *  @param {Time|Object} [attack] The amount of time it takes for the envelope to go from\n\t\t *                               0 to it's maximum value.\n\t\t *  @param {Time} [decay]\tThe period of time after the attack that it takes for the envelope\n\t\t *                       \tto fall to the sustain value.\n\t\t *  @param {NormalRange} [sustain]\tThe percent of the maximum value that the envelope rests at until\n\t\t *                                \tthe release is triggered.\n\t\t *  @param {Time} [release]\tThe amount of time after the release is triggered it takes to reach 0.\n\t\t *  @example\n\t\t * var ampEnv = new Tone.AmplitudeEnvelope({\n\t\t * \t\"attack\": 0.1,\n\t\t * \t\"decay\": 0.2,\n\t\t * \t\"sustain\": 1.0,\n\t\t * \t\"release\": 0.8\n\t\t * }).toMaster();\n\t\t * //create an oscillator and connect it\n\t\t * var osc = new Tone.Oscillator().connect(ampEnv).start();\n\t\t * //trigger the envelopes attack and release \"8t\" apart\n\t\t * ampEnv.triggerAttackRelease(\"8t\");\n\t\t */\n\t    Tone.AmplitudeEnvelope = function () {\n\t        Tone.Envelope.apply(this, arguments);\n\t        /**\n\t\t\t *  the input node\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this.input = this.output = new Tone.Gain();\n\t        this._sig.connect(this.output.gain);\n\t    };\n\t    Tone.extend(Tone.AmplitudeEnvelope, Tone.Envelope);\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.AmplitudeEnvelope}  this\n\t\t */\n\t    Tone.AmplitudeEnvelope.prototype.dispose = function () {\n\t        Tone.Envelope.prototype.dispose.call(this);\n\t        return this;\n\t    };\n\t    return Tone.AmplitudeEnvelope;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  AnalyserNode.getFloatTimeDomainData polyfill\n\t\t *  @private\n\t\t */\n\t    if (Tone.supported) {\n\t        if (!AnalyserNode.prototype.getFloatTimeDomainData) {\n\t            //referenced https://github.com/mohayonao/get-float-time-domain-data\n\t            AnalyserNode.prototype.getFloatTimeDomainData = function (array) {\n\t                var uint8 = new Uint8Array(array.length);\n\t                this.getByteTimeDomainData(uint8);\n\t                for (var i = 0; i < uint8.length; i++) {\n\t                    array[i] = (uint8[i] - 128) / 128;\n\t                }\n\t            };\n\t        }\n\t    }\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Wrapper around the native Web Audio's\n\t\t *          [AnalyserNode](http://webaudio.github.io/web-audio-api/#idl-def-AnalyserNode).\n\t\t *          Extracts FFT or Waveform data from the incoming signal.\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {String=} type The return type of the analysis, either \"fft\", or \"waveform\".\n\t\t *  @param {Number=} size The size of the FFT. Value must be a power of\n\t\t *                       two in the range 32 to 32768.\n\t\t */\n\t    Tone.Analyser = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'type',\n\t            'size'\n\t        ], Tone.Analyser);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The analyser node.\n\t\t\t *  @private\n\t\t\t *  @type {AnalyserNode}\n\t\t\t */\n\t        this._analyser = this.input = this.output = this.context.createAnalyser();\n\t        /**\n\t\t\t *  The analysis type\n\t\t\t *  @type {String}\n\t\t\t *  @private\n\t\t\t */\n\t        this._type = options.type;\n\t        /**\n\t\t\t *  The buffer that the FFT data is written to\n\t\t\t *  @type {TypedArray}\n\t\t\t *  @private\n\t\t\t */\n\t        this._buffer = null;\n\t        //set the values initially\n\t        this.size = options.size;\n\t        this.type = options.type;\n\t    };\n\t    Tone.extend(Tone.Analyser, Tone.AudioNode);\n\t    /**\n\t\t *  The default values.\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.Analyser.defaults = {\n\t        'size': 1024,\n\t        'type': 'fft',\n\t        'smoothing': 0.8\n\t    };\n\t    /**\n\t\t *  Possible return types of analyser.getValue()\n\t\t *  @enum {String}\n\t\t */\n\t    Tone.Analyser.Type = {\n\t        Waveform: 'waveform',\n\t        FFT: 'fft'\n\t    };\n\t    /**\n\t\t *  Run the analysis given the current settings and return the\n\t\t *  result as a TypedArray.\n\t\t *  @returns {TypedArray}\n\t\t */\n\t    Tone.Analyser.prototype.getValue = function () {\n\t        if (this._type === Tone.Analyser.Type.FFT) {\n\t            this._analyser.getFloatFrequencyData(this._buffer);\n\t        } else if (this._type === Tone.Analyser.Type.Waveform) {\n\t            this._analyser.getFloatTimeDomainData(this._buffer);\n\t        }\n\t        return this._buffer;\n\t    };\n\t    /**\n\t\t *  The size of analysis. This must be a power of two in the range 32 to 32768.\n\t\t *  @memberOf Tone.Analyser#\n\t\t *  @type {Number}\n\t\t *  @name size\n\t\t */\n\t    Object.defineProperty(Tone.Analyser.prototype, 'size', {\n\t        get: function () {\n\t            return this._analyser.frequencyBinCount;\n\t        },\n\t        set: function (size) {\n\t            this._analyser.fftSize = size * 2;\n\t            this._buffer = new Float32Array(size);\n\t        }\n\t    });\n\t    /**\n\t\t *  The analysis function returned by analyser.getValue(), either \"fft\" or \"waveform\".\n\t\t *  @memberOf Tone.Analyser#\n\t\t *  @type {String}\n\t\t *  @name type\n\t\t */\n\t    Object.defineProperty(Tone.Analyser.prototype, 'type', {\n\t        get: function () {\n\t            return this._type;\n\t        },\n\t        set: function (type) {\n\t            if (type !== Tone.Analyser.Type.Waveform && type !== Tone.Analyser.Type.FFT) {\n\t                throw new TypeError('Tone.Analyser: invalid type: ' + type);\n\t            }\n\t            this._type = type;\n\t        }\n\t    });\n\t    /**\n\t\t *  0 represents no time averaging with the last analysis frame.\n\t\t *  @memberOf Tone.Analyser#\n\t\t *  @type {NormalRange}\n\t\t *  @name smoothing\n\t\t */\n\t    Object.defineProperty(Tone.Analyser.prototype, 'smoothing', {\n\t        get: function () {\n\t            return this._analyser.smoothingTimeConstant;\n\t        },\n\t        set: function (val) {\n\t            this._analyser.smoothingTimeConstant = val;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.Analyser}  this\n\t\t */\n\t    Tone.Analyser.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._analyser.disconnect();\n\t        this._analyser = null;\n\t        this._buffer = null;\n\t    };\n\t    return Tone.Analyser;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Compressor is a thin wrapper around the Web Audio\n\t\t *         [DynamicsCompressorNode](http://webaudio.github.io/web-audio-api/#the-dynamicscompressornode-interface).\n\t\t *         Compression reduces the volume of loud sounds or amplifies quiet sounds\n\t\t *         by narrowing or \"compressing\" an audio signal's dynamic range.\n\t\t *         Read more on [Wikipedia](https://en.wikipedia.org/wiki/Dynamic_range_compression).\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t *  @param {Decibels|Object} [threshold] The value above which the compression starts to be applied.\n\t\t *  @param {Positive} [ratio] The gain reduction ratio.\n\t\t *  @example\n\t\t * var comp = new Tone.Compressor(-30, 3);\n\t\t */\n\t    Tone.Compressor = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'threshold',\n\t            'ratio'\n\t        ], Tone.Compressor);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  the compressor node\n\t\t\t *  @type {DynamicsCompressorNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._compressor = this.input = this.output = this.context.createDynamicsCompressor();\n\t        /**\n\t\t\t *  the threshold vaue\n\t\t\t *  @type {Decibels}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.threshold = new Tone.Param({\n\t            'param': this._compressor.threshold,\n\t            'units': Tone.Type.Decibels,\n\t            'convert': false\n\t        });\n\t        /**\n\t\t\t *  The attack parameter\n\t\t\t *  @type {Time}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.attack = new Tone.Param(this._compressor.attack, Tone.Type.Time);\n\t        /**\n\t\t\t *  The release parameter\n\t\t\t *  @type {Time}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.release = new Tone.Param(this._compressor.release, Tone.Type.Time);\n\t        /**\n\t\t\t *  The knee parameter\n\t\t\t *  @type {Decibels}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.knee = new Tone.Param({\n\t            'param': this._compressor.knee,\n\t            'units': Tone.Type.Decibels,\n\t            'convert': false\n\t        });\n\t        /**\n\t\t\t *  The ratio value\n\t\t\t *  @type {Number}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.ratio = new Tone.Param({\n\t            'param': this._compressor.ratio,\n\t            'convert': false\n\t        });\n\t        //set the defaults\n\t        this._readOnly([\n\t            'knee',\n\t            'release',\n\t            'attack',\n\t            'ratio',\n\t            'threshold'\n\t        ]);\n\t        this.set(options);\n\t    };\n\t    Tone.extend(Tone.Compressor, Tone.AudioNode);\n\t    /**\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Compressor.defaults = {\n\t        'ratio': 12,\n\t        'threshold': -24,\n\t        'release': 0.25,\n\t        'attack': 0.003,\n\t        'knee': 30\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Compressor} this\n\t\t */\n\t    Tone.Compressor.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable([\n\t            'knee',\n\t            'release',\n\t            'attack',\n\t            'ratio',\n\t            'threshold'\n\t        ]);\n\t        this._compressor.disconnect();\n\t        this._compressor = null;\n\t        this.attack.dispose();\n\t        this.attack = null;\n\t        this.release.dispose();\n\t        this.release = null;\n\t        this.threshold.dispose();\n\t        this.threshold = null;\n\t        this.ratio.dispose();\n\t        this.ratio = null;\n\t        this.knee.dispose();\n\t        this.knee = null;\n\t        return this;\n\t    };\n\t    return Tone.Compressor;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Add a signal and a number or two signals. When no value is\n\t\t *         passed into the constructor, Tone.Add will sum <code>input[0]</code>\n\t\t *         and <code>input[1]</code>. If a value is passed into the constructor, \n\t\t *         the it will be added to the input.\n\t\t *  \n\t\t *  @constructor\n\t\t *  @extends {Tone.Signal}\n\t\t *  @param {number=} value If no value is provided, Tone.Add will sum the first\n\t\t *                         and second inputs. \n\t\t *  @example\n\t\t * var signal = new Tone.Signal(2);\n\t\t * var add = new Tone.Add(2);\n\t\t * signal.connect(add);\n\t\t * //the output of add equals 4\n\t\t *  @example\n\t\t * //if constructed with no arguments\n\t\t * //it will add the first and second inputs\n\t\t * var add = new Tone.Add();\n\t\t * var sig0 = new Tone.Signal(3).connect(add, 0, 0);\n\t\t * var sig1 = new Tone.Signal(4).connect(add, 0, 1);\n\t\t * //the output of add equals 7. \n\t\t */\n\t    Tone.Add = function (value) {\n\t        Tone.Signal.call(this);\n\t        this.createInsOuts(2, 0);\n\t        /**\n\t\t\t *  the summing node\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sum = this.input[0] = this.input[1] = this.output = new Tone.Gain();\n\t        /**\n\t\t\t *  @private\n\t\t\t *  @type {Tone.Signal}\n\t\t\t */\n\t        this._param = this.input[1] = new Tone.Signal(value);\n\t        this._param.connect(this._sum);\n\t    };\n\t    Tone.extend(Tone.Add, Tone.Signal);\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Add} this\n\t\t */\n\t    Tone.Add.prototype.dispose = function () {\n\t        Tone.Signal.prototype.dispose.call(this);\n\t        this._sum.dispose();\n\t        this._sum = null;\n\t        return this;\n\t    };\n\t    return Tone.Add;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Multiply two incoming signals. Or, if a number is given in the constructor,\n\t\t *          multiplies the incoming signal by that value.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Signal}\n\t\t *  @param {number=} value Constant value to multiple. If no value is provided,\n\t\t *                         it will return the product of the first and second inputs\n\t\t *  @example\n\t\t * var mult = new Tone.Multiply();\n\t\t * var sigA = new Tone.Signal(3);\n\t\t * var sigB = new Tone.Signal(4);\n\t\t * sigA.connect(mult, 0, 0);\n\t\t * sigB.connect(mult, 0, 1);\n\t\t * //output of mult is 12.\n\t\t *  @example\n\t\t * var mult = new Tone.Multiply(10);\n\t\t * var sig = new Tone.Signal(2).connect(mult);\n\t\t * //the output of mult is 20.\n\t\t */\n\t    Tone.Multiply = function (value) {\n\t        Tone.Signal.call(this);\n\t        this.createInsOuts(2, 0);\n\t        /**\n\t\t\t *  the input node is the same as the output node\n\t\t\t *  it is also the GainNode which handles the scaling of incoming signal\n\t\t\t *\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._mult = this.input[0] = this.output = new Tone.Gain();\n\t        /**\n\t\t\t *  the scaling parameter\n\t\t\t *  @type {AudioParam}\n\t\t\t *  @private\n\t\t\t */\n\t        this._param = this.input[1] = this.output.gain;\n\t        this.value = Tone.defaultArg(value, 0);\n\t    };\n\t    Tone.extend(Tone.Multiply, Tone.Signal);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Multiply} this\n\t\t */\n\t    Tone.Multiply.prototype.dispose = function () {\n\t        Tone.Signal.prototype.dispose.call(this);\n\t        this._mult.dispose();\n\t        this._mult = null;\n\t        this._param = null;\n\t        return this;\n\t    };\n\t    return Tone.Multiply;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Negate the incoming signal. i.e. an input signal of 10 will output -10\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @example\n\t\t * var neg = new Tone.Negate();\n\t\t * var sig = new Tone.Signal(-2).connect(neg);\n\t\t * //output of neg is positive 2. \n\t\t */\n\t    Tone.Negate = function () {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  negation is done by multiplying by -1\n\t\t\t *  @type {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._multiply = this.input = this.output = new Tone.Multiply(-1);\n\t    };\n\t    Tone.extend(Tone.Negate, Tone.SignalBase);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Negate} this\n\t\t */\n\t    Tone.Negate.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._multiply.dispose();\n\t        this._multiply = null;\n\t        return this;\n\t    };\n\t    return Tone.Negate;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Subtract the signal connected to <code>input[1]</code> from the signal connected \n\t\t *         to <code>input[0]</code>. If an argument is provided in the constructor, the \n\t\t *         signals <code>.value</code> will be subtracted from the incoming signal.\n\t\t *\n\t\t *  @extends {Tone.Signal}\n\t\t *  @constructor\n\t\t *  @param {number=} value The value to subtract from the incoming signal. If the value\n\t\t *                         is omitted, it will subtract the second signal from the first.\n\t\t *  @example\n\t\t * var sub = new Tone.Subtract(1);\n\t\t * var sig = new Tone.Signal(4).connect(sub);\n\t\t * //the output of sub is 3. \n\t\t *  @example\n\t\t * var sub = new Tone.Subtract();\n\t\t * var sigA = new Tone.Signal(10);\n\t\t * var sigB = new Tone.Signal(2.5);\n\t\t * sigA.connect(sub, 0, 0);\n\t\t * sigB.connect(sub, 0, 1);\n\t\t * //output of sub is 7.5\n\t\t */\n\t    Tone.Subtract = function (value) {\n\t        Tone.Signal.call(this);\n\t        this.createInsOuts(2, 0);\n\t        /**\n\t\t\t *  the summing node\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sum = this.input[0] = this.output = new Tone.Gain();\n\t        /**\n\t\t\t *  negate the input of the second input before connecting it\n\t\t\t *  to the summing node.\n\t\t\t *  @type {Tone.Negate}\n\t\t\t *  @private\n\t\t\t */\n\t        this._neg = new Tone.Negate();\n\t        /**\n\t\t\t *  the node where the value is set\n\t\t\t *  @private\n\t\t\t *  @type {Tone.Signal}\n\t\t\t */\n\t        this._param = this.input[1] = new Tone.Signal(value);\n\t        this._param.chain(this._neg, this._sum);\n\t    };\n\t    Tone.extend(Tone.Subtract, Tone.Signal);\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.SignalBase} this\n\t\t */\n\t    Tone.Subtract.prototype.dispose = function () {\n\t        Tone.Signal.prototype.dispose.call(this);\n\t        this._neg.dispose();\n\t        this._neg = null;\n\t        this._sum.disconnect();\n\t        this._sum = null;\n\t        return this;\n\t    };\n\t    return Tone.Subtract;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Convert an incoming signal between 0, 1 to an equal power gain scale.\n\t\t *\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @constructor\n\t\t *  @example\n\t\t * var eqPowGain = new Tone.EqualPowerGain();\n\t\t */\n\t    Tone.EqualPowerGain = function () {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  @type {Tone.WaveShaper}\n\t\t\t *  @private\n\t\t\t */\n\t        this._eqPower = this.input = this.output = new Tone.WaveShaper(function (val) {\n\t            if (Math.abs(val) < 0.001) {\n\t                //should output 0 when input is 0\n\t                return 0;\n\t            } else {\n\t                return Tone.equalPowerScale(val);\n\t            }\n\t        }.bind(this), 4096);\n\t    };\n\t    Tone.extend(Tone.EqualPowerGain, Tone.SignalBase);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.EqualPowerGain} this\n\t\t */\n\t    Tone.EqualPowerGain.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._eqPower.dispose();\n\t        this._eqPower = null;\n\t        return this;\n\t    };\n\t    return Tone.EqualPowerGain;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t * @class  Tone.Crossfade provides equal power fading between two inputs.\n\t\t *         More on crossfading technique [here](https://en.wikipedia.org/wiki/Fade_(audio_engineering)#Crossfading).\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {NormalRange} [initialFade=0.5]\n\t\t * @example\n\t\t * var crossFade = new Tone.CrossFade(0.5);\n\t\t * //connect effect A to crossfade from\n\t\t * //effect output 0 to crossfade input 0\n\t\t * effectA.connect(crossFade, 0, 0);\n\t\t * //connect effect B to crossfade from\n\t\t * //effect output 0 to crossfade input 1\n\t\t * effectB.connect(crossFade, 0, 1);\n\t\t * crossFade.fade.value = 0;\n\t\t * // ^ only effectA is output\n\t\t * crossFade.fade.value = 1;\n\t\t * // ^ only effectB is output\n\t\t * crossFade.fade.value = 0.5;\n\t\t * // ^ the two signals are mixed equally.\n\t\t */\n\t    Tone.CrossFade = function (initialFade) {\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(2, 1);\n\t        /**\n\t\t\t *  Alias for <code>input[0]</code>.\n\t\t\t *  @type {Tone.Gain}\n\t\t\t */\n\t        this.a = this.input[0] = new Tone.Gain();\n\t        /**\n\t\t\t *  Alias for <code>input[1]</code>.\n\t\t\t *  @type {Tone.Gain}\n\t\t\t */\n\t        this.b = this.input[1] = new Tone.Gain();\n\t        /**\n\t\t\t * \tThe mix between the two inputs. A fade value of 0\n\t\t\t * \twill output 100% <code>input[0]</code> and\n\t\t\t * \ta value of 1 will output 100% <code>input[1]</code>.\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.fade = new Tone.Signal(Tone.defaultArg(initialFade, 0.5), Tone.Type.NormalRange);\n\t        /**\n\t\t\t *  equal power gain cross fade\n\t\t\t *  @private\n\t\t\t *  @type {Tone.EqualPowerGain}\n\t\t\t */\n\t        this._equalPowerA = new Tone.EqualPowerGain();\n\t        /**\n\t\t\t *  equal power gain cross fade\n\t\t\t *  @private\n\t\t\t *  @type {Tone.EqualPowerGain}\n\t\t\t */\n\t        this._equalPowerB = new Tone.EqualPowerGain();\n\t        /**\n\t\t\t *  invert the incoming signal\n\t\t\t *  @private\n\t\t\t *  @type {Tone}\n\t\t\t */\n\t        this._one = this.context.getConstant(1);\n\t        /**\n\t\t\t *  invert the incoming signal\n\t\t\t *  @private\n\t\t\t *  @type {Tone.Subtract}\n\t\t\t */\n\t        this._invert = new Tone.Subtract();\n\t        //connections\n\t        this.a.connect(this.output);\n\t        this.b.connect(this.output);\n\t        this.fade.chain(this._equalPowerB, this.b.gain);\n\t        this._one.connect(this._invert, 0, 0);\n\t        this.fade.connect(this._invert, 0, 1);\n\t        this._invert.chain(this._equalPowerA, this.a.gain);\n\t        this._readOnly('fade');\n\t    };\n\t    Tone.extend(Tone.CrossFade, Tone.AudioNode);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.CrossFade} this\n\t\t */\n\t    Tone.CrossFade.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable('fade');\n\t        this._equalPowerA.dispose();\n\t        this._equalPowerA = null;\n\t        this._equalPowerB.dispose();\n\t        this._equalPowerB = null;\n\t        this.fade.dispose();\n\t        this.fade = null;\n\t        this._invert.dispose();\n\t        this._invert = null;\n\t        this._one = null;\n\t        this.a.dispose();\n\t        this.a = null;\n\t        this.b.dispose();\n\t        this.b = null;\n\t        return this;\n\t    };\n\t    return Tone.CrossFade;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Filter is a filter which allows for all of the same native methods\n\t\t *          as the [BiquadFilterNode](http://webaudio.github.io/web-audio-api/#the-biquadfilternode-interface).\n\t\t *          Tone.Filter has the added ability to set the filter rolloff at -12\n\t\t *          (default), -24 and -48.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Frequency|Object} [frequency] The cutoff frequency of the filter.\n\t\t *  @param {string=} type The type of filter.\n\t\t *  @param {number=} rolloff The drop in decibels per octave after the cutoff frequency.\n\t\t *                            3 choices: -12, -24, and -48\n\t\t *  @example\n\t\t *  var filter = new Tone.Filter(200, \"highpass\");\n\t\t */\n\t    Tone.Filter = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'type',\n\t            'rolloff'\n\t        ], Tone.Filter);\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(1, 1);\n\t        /**\n\t\t\t *  the filter(s)\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._filters = [];\n\t        /**\n\t\t\t *  The cutoff frequency of the filter.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The detune parameter\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = new Tone.Signal(0, Tone.Type.Cents);\n\t        /**\n\t\t\t *  The gain of the filter, only used in certain filter types\n\t\t\t *  @type {Number}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.gain = new Tone.Signal({\n\t            'value': options.gain,\n\t            'convert': false\n\t        });\n\t        /**\n\t\t\t *  The Q or Quality of the filter\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.Q = new Tone.Signal(options.Q);\n\t        /**\n\t\t\t *  the type of the filter\n\t\t\t *  @type {string}\n\t\t\t *  @private\n\t\t\t */\n\t        this._type = options.type;\n\t        /**\n\t\t\t *  the rolloff value of the filter\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._rolloff = options.rolloff;\n\t        //set the rolloff;\n\t        this.rolloff = options.rolloff;\n\t        this._readOnly([\n\t            'detune',\n\t            'frequency',\n\t            'gain',\n\t            'Q'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.Filter, Tone.AudioNode);\n\t    /**\n\t\t *  the default parameters\n\t\t *\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Filter.defaults = {\n\t        'type': 'lowpass',\n\t        'frequency': 350,\n\t        'rolloff': -12,\n\t        'Q': 1,\n\t        'gain': 0\n\t    };\n\t    /**\n\t\t * The type of the filter. Types: \"lowpass\", \"highpass\",\n\t\t * \"bandpass\", \"lowshelf\", \"highshelf\", \"notch\", \"allpass\", or \"peaking\".\n\t\t * @memberOf Tone.Filter#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.Filter.prototype, 'type', {\n\t        get: function () {\n\t            return this._type;\n\t        },\n\t        set: function (type) {\n\t            var types = [\n\t                'lowpass',\n\t                'highpass',\n\t                'bandpass',\n\t                'lowshelf',\n\t                'highshelf',\n\t                'notch',\n\t                'allpass',\n\t                'peaking'\n\t            ];\n\t            if (types.indexOf(type) === -1) {\n\t                throw new TypeError('Tone.Filter: invalid type ' + type);\n\t            }\n\t            this._type = type;\n\t            for (var i = 0; i < this._filters.length; i++) {\n\t                this._filters[i].type = type;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The rolloff of the filter which is the drop in db\n\t\t * per octave. Implemented internally by cascading filters.\n\t\t * Only accepts the values -12, -24, -48 and -96.\n\t\t * @memberOf Tone.Filter#\n\t\t * @type {number}\n\t\t * @name rolloff\n\t\t */\n\t    Object.defineProperty(Tone.Filter.prototype, 'rolloff', {\n\t        get: function () {\n\t            return this._rolloff;\n\t        },\n\t        set: function (rolloff) {\n\t            rolloff = parseInt(rolloff, 10);\n\t            var possibilities = [\n\t                -12,\n\t                -24,\n\t                -48,\n\t                -96\n\t            ];\n\t            var cascadingCount = possibilities.indexOf(rolloff);\n\t            //check the rolloff is valid\n\t            if (cascadingCount === -1) {\n\t                throw new RangeError('Tone.Filter: rolloff can only be -12, -24, -48 or -96');\n\t            }\n\t            cascadingCount += 1;\n\t            this._rolloff = rolloff;\n\t            //first disconnect the filters and throw them away\n\t            this.input.disconnect();\n\t            for (var i = 0; i < this._filters.length; i++) {\n\t                this._filters[i].disconnect();\n\t                this._filters[i] = null;\n\t            }\n\t            this._filters = new Array(cascadingCount);\n\t            for (var count = 0; count < cascadingCount; count++) {\n\t                var filter = this.context.createBiquadFilter();\n\t                filter.type = this._type;\n\t                this.frequency.connect(filter.frequency);\n\t                this.detune.connect(filter.detune);\n\t                this.Q.connect(filter.Q);\n\t                this.gain.connect(filter.gain);\n\t                this._filters[count] = filter;\n\t            }\n\t            //connect them up\n\t            var connectionChain = [this.input].concat(this._filters).concat([this.output]);\n\t            Tone.connectSeries.apply(Tone, connectionChain);\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return {Tone.Filter} this\n\t\t */\n\t    Tone.Filter.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        for (var i = 0; i < this._filters.length; i++) {\n\t            this._filters[i].disconnect();\n\t            this._filters[i] = null;\n\t        }\n\t        this._filters = null;\n\t        this._writable([\n\t            'detune',\n\t            'frequency',\n\t            'gain',\n\t            'Q'\n\t        ]);\n\t        this.frequency.dispose();\n\t        this.Q.dispose();\n\t        this.frequency = null;\n\t        this.Q = null;\n\t        this.detune.dispose();\n\t        this.detune = null;\n\t        this.gain.dispose();\n\t        this.gain = null;\n\t        return this;\n\t    };\n\t    return Tone.Filter;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Split the incoming signal into three bands (low, mid, high)\n\t\t *         with two crossover frequency controls.\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t *  @param {Frequency|Object} [lowFrequency] the low/mid crossover frequency\n\t\t *  @param {Frequency} [highFrequency] the mid/high crossover frequency\n\t\t */\n\t    Tone.MultibandSplit = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'lowFrequency',\n\t            'highFrequency'\n\t        ], Tone.MultibandSplit);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  the input\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this.input = new Tone.Gain();\n\t        /**\n\t\t\t *  the outputs\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this.output = new Array(3);\n\t        /**\n\t\t\t *  The low band. Alias for <code>output[0]</code>\n\t\t\t *  @type {Tone.Filter}\n\t\t\t */\n\t        this.low = this.output[0] = new Tone.Filter(0, 'lowpass');\n\t        /**\n\t\t\t *  the lower filter of the mid band\n\t\t\t *  @type {Tone.Filter}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lowMidFilter = new Tone.Filter(0, 'highpass');\n\t        /**\n\t\t\t *  The mid band output. Alias for <code>output[1]</code>\n\t\t\t *  @type {Tone.Filter}\n\t\t\t */\n\t        this.mid = this.output[1] = new Tone.Filter(0, 'lowpass');\n\t        /**\n\t\t\t *  The high band output. Alias for <code>output[2]</code>\n\t\t\t *  @type {Tone.Filter}\n\t\t\t */\n\t        this.high = this.output[2] = new Tone.Filter(0, 'highpass');\n\t        /**\n\t\t\t *  The low/mid crossover frequency.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.lowFrequency = new Tone.Signal(options.lowFrequency, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The mid/high crossover frequency.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.highFrequency = new Tone.Signal(options.highFrequency, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The quality of all the filters\n\t\t\t *  @type {Number}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.Q = new Tone.Signal(options.Q);\n\t        this.input.fan(this.low, this.high);\n\t        this.input.chain(this._lowMidFilter, this.mid);\n\t        //the frequency control signal\n\t        this.lowFrequency.connect(this.low.frequency);\n\t        this.lowFrequency.connect(this._lowMidFilter.frequency);\n\t        this.highFrequency.connect(this.mid.frequency);\n\t        this.highFrequency.connect(this.high.frequency);\n\t        //the Q value\n\t        this.Q.connect(this.low.Q);\n\t        this.Q.connect(this._lowMidFilter.Q);\n\t        this.Q.connect(this.mid.Q);\n\t        this.Q.connect(this.high.Q);\n\t        this._readOnly([\n\t            'high',\n\t            'mid',\n\t            'low',\n\t            'highFrequency',\n\t            'lowFrequency'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.MultibandSplit, Tone.AudioNode);\n\t    /**\n\t\t *  @private\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.MultibandSplit.defaults = {\n\t        'lowFrequency': 400,\n\t        'highFrequency': 2500,\n\t        'Q': 1\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.MultibandSplit} this\n\t\t */\n\t    Tone.MultibandSplit.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable([\n\t            'high',\n\t            'mid',\n\t            'low',\n\t            'highFrequency',\n\t            'lowFrequency'\n\t        ]);\n\t        this.low.dispose();\n\t        this.low = null;\n\t        this._lowMidFilter.dispose();\n\t        this._lowMidFilter = null;\n\t        this.mid.dispose();\n\t        this.mid = null;\n\t        this.high.dispose();\n\t        this.high = null;\n\t        this.lowFrequency.dispose();\n\t        this.lowFrequency = null;\n\t        this.highFrequency.dispose();\n\t        this.highFrequency = null;\n\t        this.Q.dispose();\n\t        this.Q = null;\n\t        return this;\n\t    };\n\t    return Tone.MultibandSplit;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.EQ3 is a three band EQ with control over low, mid, and high gain as\n\t\t *         well as the low and high crossover frequencies.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *\n\t\t *  @param {Decibels|Object} [lowLevel] The gain applied to the lows.\n\t\t *  @param {Decibels} [midLevel] The gain applied to the mid.\n\t\t *  @param {Decibels} [highLevel] The gain applied to the high.\n\t\t *  @example\n\t\t * var eq = new Tone.EQ3(-10, 3, -20);\n\t\t */\n\t    Tone.EQ3 = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'low',\n\t            'mid',\n\t            'high'\n\t        ], Tone.EQ3);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  the output node\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this.output = new Tone.Gain();\n\t        /**\n\t\t\t *  the multiband split\n\t\t\t *  @type {Tone.MultibandSplit}\n\t\t\t *  @private\n\t\t\t */\n\t        this._multibandSplit = this.input = new Tone.MultibandSplit({\n\t            'lowFrequency': options.lowFrequency,\n\t            'highFrequency': options.highFrequency\n\t        });\n\t        /**\n\t\t\t *  The gain for the lower signals\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lowGain = new Tone.Gain(options.low, Tone.Type.Decibels);\n\t        /**\n\t\t\t *  The gain for the mid signals\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._midGain = new Tone.Gain(options.mid, Tone.Type.Decibels);\n\t        /**\n\t\t\t * The gain in decibels of the high part\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t        this._highGain = new Tone.Gain(options.high, Tone.Type.Decibels);\n\t        /**\n\t\t\t * The gain in decibels of the low part\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t */\n\t        this.low = this._lowGain.gain;\n\t        /**\n\t\t\t * The gain in decibels of the mid part\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t */\n\t        this.mid = this._midGain.gain;\n\t        /**\n\t\t\t * The gain in decibels of the high part\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t */\n\t        this.high = this._highGain.gain;\n\t        /**\n\t\t\t *  The Q value for all of the filters.\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.Q = this._multibandSplit.Q;\n\t        /**\n\t\t\t *  The low/mid crossover frequency.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.lowFrequency = this._multibandSplit.lowFrequency;\n\t        /**\n\t\t\t *  The mid/high crossover frequency.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.highFrequency = this._multibandSplit.highFrequency;\n\t        //the frequency bands\n\t        this._multibandSplit.low.chain(this._lowGain, this.output);\n\t        this._multibandSplit.mid.chain(this._midGain, this.output);\n\t        this._multibandSplit.high.chain(this._highGain, this.output);\n\t        this._readOnly([\n\t            'low',\n\t            'mid',\n\t            'high',\n\t            'lowFrequency',\n\t            'highFrequency'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.EQ3, Tone.AudioNode);\n\t    /**\n\t\t *  the default values\n\t\t */\n\t    Tone.EQ3.defaults = {\n\t        'low': 0,\n\t        'mid': 0,\n\t        'high': 0,\n\t        'lowFrequency': 400,\n\t        'highFrequency': 2500\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.EQ3} this\n\t\t */\n\t    Tone.EQ3.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable([\n\t            'low',\n\t            'mid',\n\t            'high',\n\t            'lowFrequency',\n\t            'highFrequency'\n\t        ]);\n\t        this._multibandSplit.dispose();\n\t        this._multibandSplit = null;\n\t        this.lowFrequency = null;\n\t        this.highFrequency = null;\n\t        this._lowGain.dispose();\n\t        this._lowGain = null;\n\t        this._midGain.dispose();\n\t        this._midGain = null;\n\t        this._highGain.dispose();\n\t        this._highGain = null;\n\t        this.low = null;\n\t        this.mid = null;\n\t        this.high = null;\n\t        this.Q = null;\n\t        return this;\n\t    };\n\t    return Tone.EQ3;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Performs a linear scaling on an input signal.\n\t\t *          Scales a NormalRange input to between\n\t\t *          outputMin and outputMax.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @param {number} [outputMin=0] The output value when the input is 0. \n\t\t *  @param {number} [outputMax=1]\tThe output value when the input is 1. \n\t\t *  @example\n\t\t * var scale = new Tone.Scale(50, 100);\n\t\t * var signal = new Tone.Signal(0.5).connect(scale);\n\t\t * //the output of scale equals 75\n\t\t */\n\t    Tone.Scale = function (outputMin, outputMax) {\n\t        Tone.SignalBase.call(this);\n\t        /** \n\t\t\t *  @private\n\t\t\t *  @type {number}\n\t\t\t */\n\t        this._outputMin = Tone.defaultArg(outputMin, 0);\n\t        /** \n\t\t\t *  @private\n\t\t\t *  @type {number}\n\t\t\t */\n\t        this._outputMax = Tone.defaultArg(outputMax, 1);\n\t        /** \n\t\t\t *  @private\n\t\t\t *  @type {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._scale = this.input = new Tone.Multiply(1);\n\t        /** \n\t\t\t *  @private\n\t\t\t *  @type {Tone.Add}\n\t\t\t *  @private\n\t\t\t */\n\t        this._add = this.output = new Tone.Add(0);\n\t        this._scale.connect(this._add);\n\t        this._setRange();\n\t    };\n\t    Tone.extend(Tone.Scale, Tone.SignalBase);\n\t    /**\n\t\t * The minimum output value. This number is output when \n\t\t * the value input value is 0. \n\t\t * @memberOf Tone.Scale#\n\t\t * @type {number}\n\t\t * @name min\n\t\t */\n\t    Object.defineProperty(Tone.Scale.prototype, 'min', {\n\t        get: function () {\n\t            return this._outputMin;\n\t        },\n\t        set: function (min) {\n\t            this._outputMin = min;\n\t            this._setRange();\n\t        }\n\t    });\n\t    /**\n\t\t * The maximum output value. This number is output when \n\t\t * the value input value is 1. \n\t\t * @memberOf Tone.Scale#\n\t\t * @type {number}\n\t\t * @name max\n\t\t */\n\t    Object.defineProperty(Tone.Scale.prototype, 'max', {\n\t        get: function () {\n\t            return this._outputMax;\n\t        },\n\t        set: function (max) {\n\t            this._outputMax = max;\n\t            this._setRange();\n\t        }\n\t    });\n\t    /**\n\t\t *  set the values\n\t\t *  @private\n\t\t */\n\t    Tone.Scale.prototype._setRange = function () {\n\t        this._add.value = this._outputMin;\n\t        this._scale.value = this._outputMax - this._outputMin;\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Scale} this\n\t\t */\n\t    Tone.Scale.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._add.dispose();\n\t        this._add = null;\n\t        this._scale.dispose();\n\t        this._scale = null;\n\t        return this;\n\t    };\n\t    return Tone.Scale;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class  Performs an exponential scaling on an input signal.\n\t\t *          Scales a NormalRange value [0,1] exponentially\n\t\t *          to the output range of outputMin to outputMax.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @param {number} [outputMin=0] The output value when the input is 0.\n\t\t *  @param {number} [outputMax=1]\tThe output value when the input is 1.\n\t\t *  @param {number} [exponent=2] The exponent which scales the incoming signal.\n\t\t *  @example\n\t\t * var scaleExp = new Tone.ScaleExp(0, 100, 2);\n\t\t * var signal = new Tone.Signal(0.5).connect(scaleExp);\n\t\t */\n\t    Tone.ScaleExp = function (outputMin, outputMax, exponent) {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  scale the input to the output range\n\t\t\t *  @type {Tone.Scale}\n\t\t\t *  @private\n\t\t\t */\n\t        this._scale = this.output = new Tone.Scale(outputMin, outputMax);\n\t        /**\n\t\t\t *  @private\n\t\t\t *  @type {Tone.Pow}\n\t\t\t *  @private\n\t\t\t */\n\t        this._exp = this.input = new Tone.Pow(Tone.defaultArg(exponent, 2));\n\t        this._exp.connect(this._scale);\n\t    };\n\t    Tone.extend(Tone.ScaleExp, Tone.SignalBase);\n\t    /**\n\t\t * Instead of interpolating linearly between the <code>min</code> and\n\t\t * <code>max</code> values, setting the exponent will interpolate between\n\t\t * the two values with an exponential curve.\n\t\t * @memberOf Tone.ScaleExp#\n\t\t * @type {number}\n\t\t * @name exponent\n\t\t */\n\t    Object.defineProperty(Tone.ScaleExp.prototype, 'exponent', {\n\t        get: function () {\n\t            return this._exp.value;\n\t        },\n\t        set: function (exp) {\n\t            this._exp.value = exp;\n\t        }\n\t    });\n\t    /**\n\t\t * The minimum output value. This number is output when\n\t\t * the value input value is 0.\n\t\t * @memberOf Tone.ScaleExp#\n\t\t * @type {number}\n\t\t * @name min\n\t\t */\n\t    Object.defineProperty(Tone.ScaleExp.prototype, 'min', {\n\t        get: function () {\n\t            return this._scale.min;\n\t        },\n\t        set: function (min) {\n\t            this._scale.min = min;\n\t        }\n\t    });\n\t    /**\n\t\t * The maximum output value. This number is output when\n\t\t * the value input value is 1.\n\t\t * @memberOf Tone.ScaleExp#\n\t\t * @type {number}\n\t\t * @name max\n\t\t */\n\t    Object.defineProperty(Tone.ScaleExp.prototype, 'max', {\n\t        get: function () {\n\t            return this._scale.max;\n\t        },\n\t        set: function (max) {\n\t            this._scale.max = max;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.ScaleExp} this\n\t\t */\n\t    Tone.ScaleExp.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._scale.dispose();\n\t        this._scale = null;\n\t        this._exp.dispose();\n\t        this._exp = null;\n\t        return this;\n\t    };\n\t    return Tone.ScaleExp;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Wrapper around Web Audio's native [DelayNode](http://webaudio.github.io/web-audio-api/#the-delaynode-interface).\n\t\t *  @extends {Tone}\n\t\t *  @param {Time=} delayTime The delay applied to the incoming signal.\n\t\t *  @param {Time=} maxDelay The maximum delay time.\n\t\t */\n\t    Tone.Delay = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'delayTime',\n\t            'maxDelay'\n\t        ], Tone.Delay);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t * The maximum delay time initialized with the node\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t        this._maxDelay = Math.max(this.toSeconds(options.maxDelay), this.toSeconds(options.delayTime));\n\t        /**\n\t\t\t *  The native delay node\n\t\t\t *  @type {DelayNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delayNode = this.input = this.output = this.context.createDelay(this._maxDelay);\n\t        /**\n\t\t\t *  The amount of time the incoming signal is\n\t\t\t *  delayed.\n\t\t\t *  @type {Time}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.delayTime = new Tone.Param({\n\t            'param': this._delayNode.delayTime,\n\t            'units': Tone.Type.Time,\n\t            'value': options.delayTime\n\t        });\n\t        this._readOnly('delayTime');\n\t    };\n\t    Tone.extend(Tone.Delay, Tone.AudioNode);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.Delay.defaults = {\n\t        'maxDelay': 1,\n\t        'delayTime': 0\n\t    };\n\t    /**\n\t\t * The maximum delay time. This cannot be changed. The value is passed into the constructor.\n\t\t * @memberof Tone.Delay#\n\t\t * @type {Time}\n\t\t * @name maxDelay\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Delay.prototype, 'maxDelay', {\n\t        get: function () {\n\t            return this._maxDelay;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.Delay}  this\n\t\t */\n\t    Tone.Delay.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._delayNode.disconnect();\n\t        this._delayNode = null;\n\t        this._writable('delayTime');\n\t        this.delayTime = null;\n\t        return this;\n\t    };\n\t    return Tone.Delay;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Comb filters are basic building blocks for physical modeling. Read more\n\t\t *         about comb filters on [CCRMA's website](https://ccrma.stanford.edu/~jos/pasp/Feedback_Comb_Filters.html).\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t *  @param {Time|Object} [delayTime] The delay time of the filter.\n\t\t *  @param {NormalRange=} resonance The amount of feedback the filter has.\n\t\t */\n\t    Tone.FeedbackCombFilter = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'delayTime',\n\t            'resonance'\n\t        ], Tone.FeedbackCombFilter);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  the delay node\n\t\t\t *  @type {DelayNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delay = this.input = this.output = new Tone.Delay(options.delayTime);\n\t        /**\n\t\t\t *  The amount of delay of the comb filter.\n\t\t\t *  @type {Time}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.delayTime = this._delay.delayTime;\n\t        /**\n\t\t\t *  the feedback node\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._feedback = new Tone.Gain(options.resonance, Tone.Type.NormalRange);\n\t        /**\n\t\t\t *  The amount of feedback of the delayed signal.\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.resonance = this._feedback.gain;\n\t        this._delay.chain(this._feedback, this._delay);\n\t        this._readOnly([\n\t            'resonance',\n\t            'delayTime'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.FeedbackCombFilter, Tone.AudioNode);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.FeedbackCombFilter.defaults = {\n\t        'delayTime': 0.1,\n\t        'resonance': 0.5\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.FeedbackCombFilter} this\n\t\t */\n\t    Tone.FeedbackCombFilter.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable([\n\t            'resonance',\n\t            'delayTime'\n\t        ]);\n\t        this._delay.dispose();\n\t        this._delay = null;\n\t        this.delayTime = null;\n\t        this._feedback.dispose();\n\t        this._feedback = null;\n\t        this.resonance = null;\n\t        return this;\n\t    };\n\t    return Tone.FeedbackCombFilter;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class  Get the current waveform data of the connected audio source.\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Number=} size The size of the FFT. Value must be a power of\n\t\t *                       two in the range 32 to 32768.\n\t\t */\n\t    Tone.FFT = function () {\n\t        var options = Tone.defaults(arguments, ['size'], Tone.FFT);\n\t        options.type = Tone.Analyser.Type.FFT;\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The analyser node.\n\t\t\t *  @private\n\t\t\t *  @type {Tone.Analyser}\n\t\t\t */\n\t        this._analyser = this.input = this.output = new Tone.Analyser(options);\n\t    };\n\t    Tone.extend(Tone.FFT, Tone.AudioNode);\n\t    /**\n\t\t *  The default values.\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.FFT.defaults = { 'size': 1024 };\n\t    /**\n\t\t *  Gets the waveform of the audio source. Returns the waveform data\n\t\t *  of length [size](#size) as a Float32Array with values between -1 and 1.\n\t\t *  @returns {TypedArray}\n\t\t */\n\t    Tone.FFT.prototype.getValue = function () {\n\t        return this._analyser.getValue();\n\t    };\n\t    /**\n\t\t *  The size of analysis. This must be a power of two in the range 32 to 32768.\n\t\t *  @memberOf Tone.FFT#\n\t\t *  @type {Number}\n\t\t *  @name size\n\t\t */\n\t    Object.defineProperty(Tone.FFT.prototype, 'size', {\n\t        get: function () {\n\t            return this._analyser.size;\n\t        },\n\t        set: function (size) {\n\t            this._analyser.size = size;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.FFT}  this\n\t\t */\n\t    Tone.FFT.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._analyser.dispose();\n\t        this._analyser = null;\n\t    };\n\t    return Tone.FFT;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Return the absolute value of an incoming signal.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @example\n\t\t * var signal = new Tone.Signal(-1);\n\t\t * var abs = new Tone.Abs();\n\t\t * signal.connect(abs);\n\t\t * //the output of abs is 1.\n\t\t */\n\t    Tone.Abs = function () {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  @type {Tone.LessThan}\n\t\t\t *  @private\n\t\t\t */\n\t        this._abs = this.input = this.output = new Tone.WaveShaper(function (val) {\n\t            if (Math.abs(val) < 0.001) {\n\t                return 0;\n\t            } else {\n\t                return Math.abs(val);\n\t            }\n\t        }, 1024);\n\t    };\n\t    Tone.extend(Tone.Abs, Tone.SignalBase);\n\t    /**\n\t\t *  dispose method\n\t\t *  @returns {Tone.Abs} this\n\t\t */\n\t    Tone.Abs.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._abs.dispose();\n\t        this._abs = null;\n\t        return this;\n\t    };\n\t    return Tone.Abs;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Follower is a  crude envelope follower which will follow\n\t\t *          the amplitude of an incoming signal.\n\t\t *          Take care with small (< 0.02) attack or decay values\n\t\t *          as follower has some ripple which is exaggerated\n\t\t *          at these values. Read more about envelope followers (also known\n\t\t *          as envelope detectors) on [Wikipedia](https://en.wikipedia.org/wiki/Envelope_detector).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Time|Object} [attack] The rate at which the follower rises.\n\t\t *  @param {Time=} release The rate at which the folower falls.\n\t\t *  @example\n\t\t * var follower = new Tone.Follower(0.2, 0.4);\n\t\t */\n\t    Tone.Follower = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'attack',\n\t            'release'\n\t        ], Tone.Follower);\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(1, 1);\n\t        /**\n\t\t\t *  @type {Tone.Abs}\n\t\t\t *  @private\n\t\t\t */\n\t        this._abs = new Tone.Abs();\n\t        /**\n\t\t\t *  the lowpass filter which smooths the input\n\t\t\t *  @type {BiquadFilterNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._filter = this.context.createBiquadFilter();\n\t        this._filter.type = 'lowpass';\n\t        this._filter.frequency.value = 0;\n\t        this._filter.Q.value = -100;\n\t        /**\n\t\t\t *  @type {WaveShaperNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._frequencyValues = new Tone.WaveShaper();\n\t        /**\n\t\t\t *  @type {Tone.Subtract}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sub = new Tone.Subtract();\n\t        /**\n\t\t\t *  @type {Tone.Delay}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delay = new Tone.Delay(this.blockTime);\n\t        /**\n\t\t\t *  this keeps it far from 0, even for very small differences\n\t\t\t *  @type {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._mult = new Tone.Multiply(10000);\n\t        /**\n\t\t\t *  @private\n\t\t\t *  @type {number}\n\t\t\t */\n\t        this._attack = options.attack;\n\t        /**\n\t\t\t *  @private\n\t\t\t *  @type {number}\n\t\t\t */\n\t        this._release = options.release;\n\t        //the smoothed signal to get the values\n\t        this.input.chain(this._abs, this._filter, this.output);\n\t        //the difference path\n\t        this._abs.connect(this._sub, 0, 1);\n\t        this._filter.chain(this._delay, this._sub);\n\t        //threshold the difference and use the thresh to set the frequency\n\t        this._sub.chain(this._mult, this._frequencyValues, this._filter.frequency);\n\t        //set the attack and release values in the table\n\t        this._setAttackRelease(this._attack, this._release);\n\t    };\n\t    Tone.extend(Tone.Follower, Tone.AudioNode);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Follower.defaults = {\n\t        'attack': 0.05,\n\t        'release': 0.5\n\t    };\n\t    /**\n\t\t *  sets the attack and release times in the wave shaper\n\t\t *  @param   {Time} attack\n\t\t *  @param   {Time} release\n\t\t *  @private\n\t\t */\n\t    Tone.Follower.prototype._setAttackRelease = function (attack, release) {\n\t        var minTime = this.blockTime;\n\t        attack = Tone.Time(attack).toFrequency();\n\t        release = Tone.Time(release).toFrequency();\n\t        attack = Math.max(attack, minTime);\n\t        release = Math.max(release, minTime);\n\t        this._frequencyValues.setMap(function (val) {\n\t            if (val <= 0) {\n\t                return attack;\n\t            } else {\n\t                return release;\n\t            }\n\t        });\n\t    };\n\t    /**\n\t\t * The attack time.\n\t\t * @memberOf Tone.Follower#\n\t\t * @type {Time}\n\t\t * @name attack\n\t\t */\n\t    Object.defineProperty(Tone.Follower.prototype, 'attack', {\n\t        get: function () {\n\t            return this._attack;\n\t        },\n\t        set: function (attack) {\n\t            this._attack = attack;\n\t            this._setAttackRelease(this._attack, this._release);\n\t        }\n\t    });\n\t    /**\n\t\t * The release time.\n\t\t * @memberOf Tone.Follower#\n\t\t * @type {Time}\n\t\t * @name release\n\t\t */\n\t    Object.defineProperty(Tone.Follower.prototype, 'release', {\n\t        get: function () {\n\t            return this._release;\n\t        },\n\t        set: function (release) {\n\t            this._release = release;\n\t            this._setAttackRelease(this._attack, this._release);\n\t        }\n\t    });\n\t    /**\n\t\t *  Borrows the connect method from Signal so that the output can be used\n\t\t *  as a Tone.Signal control signal.\n\t\t *  @function\n\t\t */\n\t    Tone.Follower.prototype.connect = Tone.SignalBase.prototype.connect;\n\t    /**\n\t\t *  dispose\n\t\t *  @returns {Tone.Follower} this\n\t\t */\n\t    Tone.Follower.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._filter.disconnect();\n\t        this._filter = null;\n\t        this._frequencyValues.disconnect();\n\t        this._frequencyValues = null;\n\t        this._delay.dispose();\n\t        this._delay = null;\n\t        this._sub.disconnect();\n\t        this._sub = null;\n\t        this._abs.dispose();\n\t        this._abs = null;\n\t        this._mult.dispose();\n\t        this._mult = null;\n\t        this._curve = null;\n\t        return this;\n\t    };\n\t    return Tone.Follower;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.ScaledEnvelop is an envelope which can be scaled\n\t\t *         to any range. It's useful for applying an envelope\n\t\t *         to a frequency or any other non-NormalRange signal\n\t\t *         parameter.\n\t\t *\n\t\t *  @extends {Tone.Envelope}\n\t\t *  @constructor\n\t\t *  @param {Time|Object} [attack]\tthe attack time in seconds\n\t\t *  @param {Time} [decay]\tthe decay time in seconds\n\t\t *  @param {number} [sustain] \ta percentage (0-1) of the full amplitude\n\t\t *  @param {Time} [release]\tthe release time in seconds\n\t\t *  @example\n\t\t *  var scaledEnv = new Tone.ScaledEnvelope({\n\t\t *  \t\"attack\" : 0.2,\n\t\t *  \t\"min\" : 200,\n\t\t *  \t\"max\" : 2000\n\t\t *  });\n\t\t *  scaledEnv.connect(oscillator.frequency);\n\t\t */\n\t    Tone.ScaledEnvelope = function () {\n\t        //get all of the defaults\n\t        var options = Tone.defaults(arguments, [\n\t            'attack',\n\t            'decay',\n\t            'sustain',\n\t            'release'\n\t        ], Tone.Envelope);\n\t        Tone.Envelope.call(this, options);\n\t        options = Tone.defaultArg(options, Tone.ScaledEnvelope.defaults);\n\t        /**\n\t\t\t *  scale the incoming signal by an exponent\n\t\t\t *  @type {Tone.Pow}\n\t\t\t *  @private\n\t\t\t */\n\t        this._exp = this.output = new Tone.Pow(options.exponent);\n\t        /**\n\t\t\t *  scale the signal to the desired range\n\t\t\t *  @type {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._scale = this.output = new Tone.Scale(options.min, options.max);\n\t        this._sig.chain(this._exp, this._scale);\n\t    };\n\t    Tone.extend(Tone.ScaledEnvelope, Tone.Envelope);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @static\n\t\t */\n\t    Tone.ScaledEnvelope.defaults = {\n\t        'min': 0,\n\t        'max': 1,\n\t        'exponent': 1\n\t    };\n\t    /**\n\t\t * The envelope's min output value. This is the value which it\n\t\t * starts at.\n\t\t * @memberOf Tone.ScaledEnvelope#\n\t\t * @type {number}\n\t\t * @name min\n\t\t */\n\t    Object.defineProperty(Tone.ScaledEnvelope.prototype, 'min', {\n\t        get: function () {\n\t            return this._scale.min;\n\t        },\n\t        set: function (min) {\n\t            this._scale.min = min;\n\t        }\n\t    });\n\t    /**\n\t\t * The envelope's max output value. In other words, the value\n\t\t * at the peak of the attack portion of the envelope.\n\t\t * @memberOf Tone.ScaledEnvelope#\n\t\t * @type {number}\n\t\t * @name max\n\t\t */\n\t    Object.defineProperty(Tone.ScaledEnvelope.prototype, 'max', {\n\t        get: function () {\n\t            return this._scale.max;\n\t        },\n\t        set: function (max) {\n\t            this._scale.max = max;\n\t        }\n\t    });\n\t    /**\n\t\t * The envelope's exponent value.\n\t\t * @memberOf Tone.ScaledEnvelope#\n\t\t * @type {number}\n\t\t * @name exponent\n\t\t */\n\t    Object.defineProperty(Tone.ScaledEnvelope.prototype, 'exponent', {\n\t        get: function () {\n\t            return this._exp.value;\n\t        },\n\t        set: function (exp) {\n\t            this._exp.value = exp;\n\t        }\n\t    });\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.ScaledEnvelope} this\n\t\t */\n\t    Tone.ScaledEnvelope.prototype.dispose = function () {\n\t        Tone.Envelope.prototype.dispose.call(this);\n\t        this._scale.dispose();\n\t        this._scale = null;\n\t        this._exp.dispose();\n\t        this._exp = null;\n\t        return this;\n\t    };\n\t    return Tone.ScaledEnvelope;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.FrequencyEnvelope is a Tone.ScaledEnvelope, but instead of `min` and `max`\n\t\t *         it's got a `baseFrequency` and `octaves` parameter.\n\t\t *\n\t\t *  @extends {Tone.Envelope}\n\t\t *  @constructor\n\t\t *  @param {Time|Object} [attack]\tthe attack time in seconds\n\t\t *  @param {Time} [decay]\tthe decay time in seconds\n\t\t *  @param {number} [sustain] \ta percentage (0-1) of the full amplitude\n\t\t *  @param {Time} [release]\tthe release time in seconds\n\t\t *  @example\n\t\t *  var freqEnv = new Tone.FrequencyEnvelope({\n\t\t *  \t\"attack\" : 0.2,\n\t\t *  \t\"baseFrequency\" : \"C2\",\n\t\t *  \t\"octaves\" : 4\n\t\t *  });\n\t\t *  freqEnv.connect(oscillator.frequency);\n\t\t */\n\t    Tone.FrequencyEnvelope = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'attack',\n\t            'decay',\n\t            'sustain',\n\t            'release'\n\t        ], Tone.Envelope);\n\t        Tone.ScaledEnvelope.call(this, options);\n\t        //merge it with the frequency envelope defaults\n\t        options = Tone.defaultArg(options, Tone.FrequencyEnvelope.defaults);\n\t        /**\n\t\t\t *  Stores the octave value\n\t\t\t *  @type {Positive}\n\t\t\t *  @private\n\t\t\t */\n\t        this._octaves = options.octaves;\n\t        //setup\n\t        this.baseFrequency = options.baseFrequency;\n\t        this.octaves = options.octaves;\n\t    };\n\t    Tone.extend(Tone.FrequencyEnvelope, Tone.Envelope);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @static\n\t\t */\n\t    Tone.FrequencyEnvelope.defaults = {\n\t        'baseFrequency': 200,\n\t        'octaves': 4,\n\t        'exponent': 2\n\t    };\n\t    /**\n\t\t * The envelope's mininum output value. This is the value which it\n\t\t * starts at.\n\t\t * @memberOf Tone.FrequencyEnvelope#\n\t\t * @type {Frequency}\n\t\t * @name baseFrequency\n\t\t */\n\t    Object.defineProperty(Tone.FrequencyEnvelope.prototype, 'baseFrequency', {\n\t        get: function () {\n\t            return this._scale.min;\n\t        },\n\t        set: function (min) {\n\t            this._scale.min = this.toFrequency(min);\n\t            //also update the octaves\n\t            this.octaves = this._octaves;\n\t        }\n\t    });\n\t    /**\n\t\t * The number of octaves above the baseFrequency that the\n\t\t * envelope will scale to.\n\t\t * @memberOf Tone.FrequencyEnvelope#\n\t\t * @type {Positive}\n\t\t * @name octaves\n\t\t */\n\t    Object.defineProperty(Tone.FrequencyEnvelope.prototype, 'octaves', {\n\t        get: function () {\n\t            return this._octaves;\n\t        },\n\t        set: function (octaves) {\n\t            this._octaves = octaves;\n\t            this._scale.max = this.baseFrequency * Math.pow(2, octaves);\n\t        }\n\t    });\n\t    /**\n\t\t * The envelope's exponent value.\n\t\t * @memberOf Tone.FrequencyEnvelope#\n\t\t * @type {number}\n\t\t * @name exponent\n\t\t */\n\t    Object.defineProperty(Tone.FrequencyEnvelope.prototype, 'exponent', {\n\t        get: function () {\n\t            return this._exp.value;\n\t        },\n\t        set: function (exp) {\n\t            this._exp.value = exp;\n\t        }\n\t    });\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.FrequencyEnvelope} this\n\t\t */\n\t    Tone.FrequencyEnvelope.prototype.dispose = function () {\n\t        Tone.ScaledEnvelope.prototype.dispose.call(this);\n\t        return this;\n\t    };\n\t    return Tone.FrequencyEnvelope;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  GreaterThanZero outputs 1 when the input is strictly greater than zero\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @example\n\t\t * var gt0 = new Tone.GreaterThanZero();\n\t\t * var sig = new Tone.Signal(0.01).connect(gt0);\n\t\t * //the output of gt0 is 1.\n\t\t * sig.value = 0;\n\t\t * //the output of gt0 is 0.\n\t\t */\n\t    Tone.GreaterThanZero = function () {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  @type {Tone.WaveShaper}\n\t\t\t *  @private\n\t\t\t */\n\t        this._thresh = this.output = new Tone.WaveShaper(function (val) {\n\t            if (val <= 0) {\n\t                return 0;\n\t            } else {\n\t                return 1;\n\t            }\n\t        }, 127);\n\t        /**\n\t\t\t *  scale the first thresholded signal by a large value.\n\t\t\t *  this will help with values which are very close to 0\n\t\t\t *  @type {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._scale = this.input = new Tone.Multiply(10000);\n\t        //connections\n\t        this._scale.connect(this._thresh);\n\t    };\n\t    Tone.extend(Tone.GreaterThanZero, Tone.SignalBase);\n\t    /**\n\t\t *  dispose method\n\t\t *  @returns {Tone.GreaterThanZero} this\n\t\t */\n\t    Tone.GreaterThanZero.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._scale.dispose();\n\t        this._scale = null;\n\t        this._thresh.dispose();\n\t        this._thresh = null;\n\t        return this;\n\t    };\n\t    return Tone.GreaterThanZero;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Output 1 if the signal is greater than the value, otherwise outputs 0.\n\t\t *          can compare two signals or a signal and a number.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Signal}\n\t\t *  @param {number} [value=0] the value to compare to the incoming signal\n\t\t *  @example\n\t\t * var gt = new Tone.GreaterThan(2);\n\t\t * var sig = new Tone.Signal(4).connect(gt);\n\t\t * //output of gt is equal 1.\n\t\t */\n\t    Tone.GreaterThan = function (value) {\n\t        Tone.Signal.call(this);\n\t        this.createInsOuts(2, 0);\n\t        /**\n\t\t\t *  subtract the amount from the incoming signal\n\t\t\t *  @type {Tone.Subtract}\n\t\t\t *  @private\n\t\t\t */\n\t        this._param = this.input[0] = new Tone.Subtract(value);\n\t        this.input[1] = this._param.input[1];\n\t        /**\n\t\t\t *  compare that amount to zero\n\t\t\t *  @type {Tone.GreaterThanZero}\n\t\t\t *  @private\n\t\t\t */\n\t        this._gtz = this.output = new Tone.GreaterThanZero();\n\t        //connect\n\t        this._param.connect(this._gtz);\n\t    };\n\t    Tone.extend(Tone.GreaterThan, Tone.Signal);\n\t    /**\n\t\t *  dispose method\n\t\t *  @returns {Tone.GreaterThan} this\n\t\t */\n\t    Tone.GreaterThan.prototype.dispose = function () {\n\t        Tone.Signal.prototype.dispose.call(this);\n\t        this._gtz.dispose();\n\t        this._gtz = null;\n\t        return this;\n\t    };\n\t    return Tone.GreaterThan;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Gate only passes a signal through when the incoming\n\t\t *          signal exceeds a specified threshold. To do this, Gate uses\n\t\t *          a Tone.Follower to follow the amplitude of the incoming signal.\n\t\t *          A common implementation of this class is a [Noise Gate](https://en.wikipedia.org/wiki/Noise_gate).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Decibels|Object} [threshold] The threshold above which the gate will open.\n\t\t *  @param {Time=} attack The follower's attack time\n\t\t *  @param {Time=} release The follower's release time\n\t\t *  @example\n\t\t * var gate = new Tone.Gate(-30, 0.2, 0.3).toMaster();\n\t\t * var mic = new Tone.UserMedia().connect(gate);\n\t\t * //the gate will only pass through the incoming\n\t\t * //signal when it's louder than -30db\n\t\t */\n\t    Tone.Gate = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'threshold',\n\t            'attack',\n\t            'release'\n\t        ], Tone.Gate);\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(1, 1);\n\t        /**\n\t\t\t *  @type {Tone.Follower}\n\t\t\t *  @private\n\t\t\t */\n\t        this._follower = new Tone.Follower(options.attack, options.release);\n\t        /**\n\t\t\t *  @type {Tone.GreaterThan}\n\t\t\t *  @private\n\t\t\t */\n\t        this._gt = new Tone.GreaterThan(Tone.dbToGain(options.threshold));\n\t        //the connections\n\t        this.input.connect(this.output);\n\t        //the control signal\n\t        this.input.chain(this._gt, this._follower, this.output.gain);\n\t    };\n\t    Tone.extend(Tone.Gate, Tone.AudioNode);\n\t    /**\n\t\t *  @const\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Gate.defaults = {\n\t        'attack': 0.1,\n\t        'release': 0.1,\n\t        'threshold': -40\n\t    };\n\t    /**\n\t\t * The threshold of the gate in decibels\n\t\t * @memberOf Tone.Gate#\n\t\t * @type {Decibels}\n\t\t * @name threshold\n\t\t */\n\t    Object.defineProperty(Tone.Gate.prototype, 'threshold', {\n\t        get: function () {\n\t            return Tone.gainToDb(this._gt.value);\n\t        },\n\t        set: function (thresh) {\n\t            this._gt.value = Tone.dbToGain(thresh);\n\t        }\n\t    });\n\t    /**\n\t\t * The attack speed of the gate\n\t\t * @memberOf Tone.Gate#\n\t\t * @type {Time}\n\t\t * @name attack\n\t\t */\n\t    Object.defineProperty(Tone.Gate.prototype, 'attack', {\n\t        get: function () {\n\t            return this._follower.attack;\n\t        },\n\t        set: function (attackTime) {\n\t            this._follower.attack = attackTime;\n\t        }\n\t    });\n\t    /**\n\t\t * The release speed of the gate\n\t\t * @memberOf Tone.Gate#\n\t\t * @type {Time}\n\t\t * @name release\n\t\t */\n\t    Object.defineProperty(Tone.Gate.prototype, 'release', {\n\t        get: function () {\n\t            return this._follower.release;\n\t        },\n\t        set: function (releaseTime) {\n\t            this._follower.release = releaseTime;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Gate} this\n\t\t */\n\t    Tone.Gate.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._follower.dispose();\n\t        this._gt.dispose();\n\t        this._follower = null;\n\t        this._gt = null;\n\t        return this;\n\t    };\n\t    return Tone.Gate;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t * @class Tone.TickSignal extends Tone.Signal, but adds the capability\n\t\t *        to calculate the number of elapsed ticks. exponential and target curves\n\t\t *        are approximated with multiple linear ramps.\n\t\t *\n\t\t *        Thank you Bruno Dias, H. Sofia Pinto, and David M. Matos, for your [WAC paper](https://smartech.gatech.edu/bitstream/handle/1853/54588/WAC2016-49.pdf)\n\t\t *        describing integrating timing functions for tempo calculations.\n\t\t *\n\t\t * @param {Number} value The initial value of the signal\n\t\t * @extends {Tone.Signal}\n\t\t */\n\t    Tone.TickSignal = function (value) {\n\t        value = Tone.defaultArg(value, 1);\n\t        Tone.Signal.call(this, {\n\t            'units': Tone.Type.Ticks,\n\t            'value': value\n\t        });\n\t        //extend the memory\n\t        this._events.memory = Infinity;\n\t        //clear the clock from the beginning\n\t        this.cancelScheduledValues(0);\n\t        //set an initial event\n\t        this._events.add({\n\t            'type': Tone.Param.AutomationType.SetValue,\n\t            'time': 0,\n\t            'value': value\n\t        });\n\t    };\n\t    Tone.extend(Tone.TickSignal, Tone.Signal);\n\t    /**\n\t\t * Wraps Tone.Signal methods so that they also\n\t\t * record the ticks.\n\t\t * @param  {Function} method\n\t\t * @return {Function}\n\t\t * @private\n\t\t */\n\t    function _wrapScheduleMethods(method) {\n\t        return function (value, time) {\n\t            time = this.toSeconds(time);\n\t            method.apply(this, arguments);\n\t            var event = this._events.get(time);\n\t            var previousEvent = this._events.previousEvent(event);\n\t            var ticksUntilTime = this._getTicksUntilEvent(previousEvent, time);\n\t            event.ticks = Math.max(ticksUntilTime, 0);\n\t            return this;\n\t        };\n\t    }\n\t    Tone.TickSignal.prototype.setValueAtTime = _wrapScheduleMethods(Tone.Signal.prototype.setValueAtTime);\n\t    Tone.TickSignal.prototype.linearRampToValueAtTime = _wrapScheduleMethods(Tone.Signal.prototype.linearRampToValueAtTime);\n\t    /**\n\t\t *  Start exponentially approaching the target value at the given time with\n\t\t *  a rate having the given time constant.\n\t\t *  @param {number} value\n\t\t *  @param {Time} startTime\n\t\t *  @param {number} timeConstant\n\t\t *  @returns {Tone.TickSignal} this\n\t\t */\n\t    Tone.TickSignal.prototype.setTargetAtTime = function (value, time, constant) {\n\t        //aproximate it with multiple linear ramps\n\t        time = this.toSeconds(time);\n\t        this.setRampPoint(time);\n\t        value = this._fromUnits(value);\n\t        //start from previously scheduled value\n\t        var prevEvent = this._events.get(time);\n\t        var segments = Math.round(Math.max(1 / constant, 1));\n\t        for (var i = 0; i <= segments; i++) {\n\t            var segTime = constant * i + time;\n\t            var rampVal = this._exponentialApproach(prevEvent.time, prevEvent.value, value, constant, segTime);\n\t            this.linearRampToValueAtTime(this._toUnits(rampVal), segTime);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Schedules an exponential continuous change in parameter value from\n\t\t *  the previous scheduled parameter value to the given value.\n\t\t *  @param  {number} value\n\t\t *  @param  {Time} endTime\n\t\t *  @returns {Tone.TickSignal} this\n\t\t */\n\t    Tone.TickSignal.prototype.exponentialRampToValueAtTime = function (value, time) {\n\t        //aproximate it with multiple linear ramps\n\t        time = this.toSeconds(time);\n\t        value = this._fromUnits(value);\n\t        //start from previously scheduled value\n\t        var prevEvent = this._events.get(time);\n\t        if (prevEvent === null) {\n\t            prevEvent = {\n\t                'value': this._initialValue,\n\t                'time': 0\n\t            };\n\t        }\n\t        //approx 10 segments per second\n\t        var segments = Math.round(Math.max((time - prevEvent.time) * 10, 1));\n\t        var segmentDur = (time - prevEvent.time) / segments;\n\t        for (var i = 0; i <= segments; i++) {\n\t            var segTime = segmentDur * i + prevEvent.time;\n\t            var rampVal = this._exponentialInterpolate(prevEvent.time, prevEvent.value, time, value, segTime);\n\t            this.linearRampToValueAtTime(this._toUnits(rampVal), segTime);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * Returns the tick value at the time. Takes into account\n\t\t * any automation curves scheduled on the signal.\n\t\t * @private\n\t\t * @param  {Time} time The time to get the tick count at\n\t\t * @return {Ticks}      The number of ticks which have elapsed at the time\n\t\t *                          given any automations.\n\t\t */\n\t    Tone.TickSignal.prototype._getTicksUntilEvent = function (event, time) {\n\t        if (event === null) {\n\t            event = {\n\t                'ticks': 0,\n\t                'time': 0\n\t            };\n\t        } else if (Tone.isUndef(event.ticks)) {\n\t            var previousEvent = this._events.previousEvent(event);\n\t            event.ticks = this._getTicksUntilEvent(previousEvent, event.time);\n\t        }\n\t        var val0 = this.getValueAtTime(event.time);\n\t        var val1 = this.getValueAtTime(time);\n\t        //if it's right on the line, take the previous value\n\t        if (this._events.get(time).time === time && this._events.get(time).type === Tone.Param.AutomationType.SetValue) {\n\t            val1 = this.getValueAtTime(time - this.sampleTime);\n\t        }\n\t        return 0.5 * (time - event.time) * (val0 + val1) + event.ticks;\n\t    };\n\t    /**\n\t\t * Returns the tick value at the time. Takes into account\n\t\t * any automation curves scheduled on the signal.\n\t\t * @param  {Time} time The time to get the tick count at\n\t\t * @return {Ticks}      The number of ticks which have elapsed at the time\n\t\t *                          given any automations.\n\t\t */\n\t    Tone.TickSignal.prototype.getTicksAtTime = function (time) {\n\t        time = this.toSeconds(time);\n\t        var event = this._events.get(time);\n\t        return Math.max(this._getTicksUntilEvent(event, time), 0);\n\t    };\n\t    /**\n\t\t * Return the elapsed time of the number of ticks from the given time\n\t\t * @param {Ticks} ticks The number of ticks to calculate\n\t\t * @param  {Time} time The time to get the next tick from\n\t\t * @return {Seconds} The duration of the number of ticks from the given time in seconds\n\t\t */\n\t    Tone.TickSignal.prototype.getDurationOfTicks = function (ticks, time) {\n\t        time = this.toSeconds(time);\n\t        var currentTick = this.getTicksAtTime(time);\n\t        return this.getTimeOfTick(currentTick + ticks) - time;\n\t    };\n\t    /**\n\t\t * Given a tick, returns the time that tick occurs at.\n\t\t * @param  {Ticks} tick\n\t\t * @return {Time}      The time that the tick occurs.\n\t\t */\n\t    Tone.TickSignal.prototype.getTimeOfTick = function (tick) {\n\t        var before = this._events.get(tick, 'ticks');\n\t        var after = this._events.getAfter(tick, 'ticks');\n\t        if (before && before.ticks === tick) {\n\t            return before.time;\n\t        } else if (before && after && after.type === Tone.Param.AutomationType.Linear && before.value !== after.value) {\n\t            var val0 = this.getValueAtTime(before.time);\n\t            var val1 = this.getValueAtTime(after.time);\n\t            var delta = (val1 - val0) / (after.time - before.time);\n\t            var k = Math.sqrt(Math.pow(val0, 2) - 2 * delta * (before.ticks - tick));\n\t            var sol1 = (-val0 + k) / delta;\n\t            var sol2 = (-val0 - k) / delta;\n\t            return (sol1 > 0 ? sol1 : sol2) + before.time;\n\t        } else if (before) {\n\t            if (before.value === 0) {\n\t                return Infinity;\n\t            } else {\n\t                return before.time + (tick - before.ticks) / before.value;\n\t            }\n\t        } else {\n\t            return tick / this._initialValue;\n\t        }\n\t    };\n\t    /**\n\t\t * Convert some number of ticks their the duration in seconds accounting\n\t\t * for any automation curves starting at the given time.\n\t\t * @param  {Ticks} ticks The number of ticks to convert to seconds.\n\t\t * @param  {Time} [when=now]  When along the automation timeline to convert the ticks.\n\t\t * @return {Tone.Time}       The duration in seconds of the ticks.\n\t\t */\n\t    Tone.TickSignal.prototype.ticksToTime = function (ticks, when) {\n\t        when = this.toSeconds(when);\n\t        return new Tone.Time(this.getDurationOfTicks(ticks, when));\n\t    };\n\t    /**\n\t\t * The inverse of [ticksToTime](#tickstotime). Convert a duration in\n\t\t * seconds to the corresponding number of ticks accounting for any\n\t\t * automation curves starting at the given time.\n\t\t * @param  {Time} duration The time interval to convert to ticks.\n\t\t * @param  {Time} [when=now]     When along the automation timeline to convert the ticks.\n\t\t * @return {Tone.Ticks}          The duration in ticks.\n\t\t */\n\t    Tone.TickSignal.prototype.timeToTicks = function (duration, when) {\n\t        when = this.toSeconds(when);\n\t        duration = this.toSeconds(duration);\n\t        var startTicks = this.getTicksAtTime(when);\n\t        var endTicks = this.getTicksAtTime(when + duration);\n\t        return new Tone.Ticks(endTicks - startTicks);\n\t    };\n\t    return Tone.TickSignal;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  A Timeline State. Provides the methods: <code>setStateAtTime(\"state\", time)</code>\n\t\t *          and <code>getValueAtTime(time)</code>.\n\t\t *\n\t\t *  @extends {Tone.Timeline}\n\t\t *  @param {String} initial The initial state of the TimelineState. \n\t\t *                          Defaults to <code>undefined</code>\n\t\t */\n\t    Tone.TimelineState = function (initial) {\n\t        Tone.Timeline.call(this);\n\t        /**\n\t\t\t *  The initial state\n\t\t\t *  @private\n\t\t\t *  @type {String}\n\t\t\t */\n\t        this._initial = initial;\n\t    };\n\t    Tone.extend(Tone.TimelineState, Tone.Timeline);\n\t    /**\n\t\t *  Returns the scheduled state scheduled before or at\n\t\t *  the given time.\n\t\t *  @param  {Number}  time  The time to query.\n\t\t *  @return  {String}  The name of the state input in setStateAtTime.\n\t\t */\n\t    Tone.TimelineState.prototype.getValueAtTime = function (time) {\n\t        var event = this.get(time);\n\t        if (event !== null) {\n\t            return event.state;\n\t        } else {\n\t            return this._initial;\n\t        }\n\t    };\n\t    /**\n\t\t *  Add a state to the timeline.\n\t\t *  @param  {String}  state The name of the state to set.\n\t\t *  @param  {Number}  time  The time to query.\n\t\t *  @returns {Tone.TimelineState} this\n\t\t */\n\t    Tone.TimelineState.prototype.setStateAtTime = function (state, time) {\n\t        //all state changes need to be >= the previous state time\n\t        //TODO throw error if time < the previous event time\n\t        this.add({\n\t            'state': state,\n\t            'time': time\n\t        });\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Return the event before the time with the given state\n\t\t *  @param {Tone.State} state The state to look for\n\t\t *  @param  {Time}  time  When to check before\t\t\t\n\t\t *  @return  {Object}  The event with the given state before the time\n\t\t */\n\t    Tone.TimelineState.prototype.getLastState = function (state, time) {\n\t        time = this.toSeconds(time);\n\t        var index = this._search(time);\n\t        for (var i = index; i >= 0; i--) {\n\t            var event = this._timeline[i];\n\t            if (event.state === state) {\n\t                return event;\n\t            }\n\t        }\n\t    };\n\t    /**\n\t\t *  Return the event after the time with the given state\n\t\t *  @param {Tone.State} state The state to look for\n\t\t *  @param  {Time}  time  When to check from\n\t\t *  @return  {Object}  The event with the given state after the time\n\t\t */\n\t    Tone.TimelineState.prototype.getNextState = function (state, time) {\n\t        time = this.toSeconds(time);\n\t        var index = this._search(time);\n\t        if (index !== -1) {\n\t            for (var i = index; i < this._timeline.length; i++) {\n\t                var event = this._timeline[i];\n\t                if (event.state === state) {\n\t                    return event;\n\t                }\n\t            }\n\t        }\n\t    };\n\t    return Tone.TimelineState;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Uses [Tone.TickSignal](TickSignal) to track elapsed ticks with\n\t\t *  \t\tcomplex automation curves.\n\t\t *\n\t\t * \t@constructor\n\t     *  @param {Frequency} frequency The initial frequency that the signal ticks at\n\t\t *  @extends {Tone}\n\t\t */\n\t    Tone.TickSource = function () {\n\t        var options = Tone.defaults(arguments, ['frequency'], Tone.TickSource);\n\t        /**\n\t\t\t *  The frequency the callback function should be invoked.\n\t\t\t *  @type  {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.TickSignal(options.frequency, Tone.Type.Frequency);\n\t        this._readOnly('frequency');\n\t        /**\n\t\t\t *  The state timeline\n\t\t\t *  @type {Tone.TimelineState}\n\t\t\t *  @private\n\t\t\t */\n\t        this._state = new Tone.TimelineState(Tone.State.Stopped);\n\t        this._state.setStateAtTime(Tone.State.Stopped, 0);\n\t        /**\n\t\t\t * The offset values of the ticks\n\t\t\t * @type {Tone.Timeline}\n\t\t\t * @private\n\t\t\t */\n\t        this._tickOffset = new Tone.Timeline();\n\t        //add the first event\n\t        this.setTicksAtTime(0, 0);\n\t    };\n\t    Tone.extend(Tone.TickSource);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.TickSource.defaults = { 'frequency': 1 };\n\t    /**\n\t\t *  Returns the playback state of the source, either \"started\", \"stopped\" or \"paused\".\n\t\t *  @type {Tone.State}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.TickSource#\n\t\t *  @name state\n\t\t */\n\t    Object.defineProperty(Tone.TickSource.prototype, 'state', {\n\t        get: function () {\n\t            return this._state.getValueAtTime(this.now());\n\t        }\n\t    });\n\t    /**\n\t\t *  Start the clock at the given time. Optionally pass in an offset\n\t\t *  of where to start the tick counter from.\n\t\t *  @param  {Time=}  time    The time the clock should start\n\t\t *  @param {Ticks=0} offset The number of ticks to start the source at\n\t\t *  @return  {Tone.TickSource}  this\n\t\t */\n\t    Tone.TickSource.prototype.start = function (time, offset) {\n\t        time = this.toSeconds(time);\n\t        if (this._state.getValueAtTime(time) !== Tone.State.Started) {\n\t            this._state.setStateAtTime(Tone.State.Started, time);\n\t            if (Tone.isDefined(offset)) {\n\t                this.setTicksAtTime(offset, time);\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Stop the clock. Stopping the clock resets the tick counter to 0.\n\t\t *  @param {Time} [time=now] The time when the clock should stop.\n\t\t *  @returns {Tone.TickSource} this\n\t\t *  @example\n\t\t * clock.stop();\n\t\t */\n\t    Tone.TickSource.prototype.stop = function (time) {\n\t        time = this.toSeconds(time);\n\t        //cancel the previous stop\n\t        if (this._state.getValueAtTime(time) === Tone.State.Stopped) {\n\t            var event = this._state.get(time);\n\t            if (event.time > 0) {\n\t                this._tickOffset.cancel(event.time);\n\t                this._state.cancel(event.time);\n\t            }\n\t        }\n\t        this._state.cancel(time);\n\t        this._state.setStateAtTime(Tone.State.Stopped, time);\n\t        this.setTicksAtTime(0, time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Pause the clock. Pausing does not reset the tick counter.\n\t\t *  @param {Time} [time=now] The time when the clock should stop.\n\t\t *  @returns {Tone.TickSource} this\n\t\t */\n\t    Tone.TickSource.prototype.pause = function (time) {\n\t        time = this.toSeconds(time);\n\t        if (this._state.getValueAtTime(time) === Tone.State.Started) {\n\t            this._state.setStateAtTime(Tone.State.Paused, time);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancel start/stop/pause and setTickAtTime events scheduled after the given time.\n\t\t *  @param {Time} [time=now] When to clear the events after\n\t\t *  @returns {Tone.TickSource} this\n\t\t */\n\t    Tone.TickSource.prototype.cancel = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._state.cancel(time);\n\t        this._tickOffset.cancel(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Get the elapsed ticks at the given time\n\t\t * @param  {Time} time  When to get the tick value\n\t\t * @return {Ticks}     The number of ticks\n\t\t */\n\t    Tone.TickSource.prototype.getTicksAtTime = function (time) {\n\t        time = this.toSeconds(time);\n\t        var stopEvent = this._state.getLastState(Tone.State.Stopped, time);\n\t        //this event allows forEachBetween to iterate until the current time\n\t        var tmpEvent = {\n\t            state: Tone.State.Paused,\n\t            time: time\n\t        };\n\t        this._state.add(tmpEvent);\n\t        //keep track of the previous offset event\n\t        var lastState = stopEvent;\n\t        var elapsedTicks = 0;\n\t        //iterate through all the events since the last stop\n\t        this._state.forEachBetween(stopEvent.time, time + this.sampleTime, function (e) {\n\t            var periodStartTime = lastState.time;\n\t            //if there is an offset event in this period use that\n\t            var offsetEvent = this._tickOffset.get(e.time);\n\t            if (offsetEvent.time >= lastState.time) {\n\t                elapsedTicks = offsetEvent.ticks;\n\t                periodStartTime = offsetEvent.time;\n\t            }\n\t            if (lastState.state === Tone.State.Started && e.state !== Tone.State.Started) {\n\t                elapsedTicks += this.frequency.getTicksAtTime(e.time) - this.frequency.getTicksAtTime(periodStartTime);\n\t            }\n\t            lastState = e;\n\t        }.bind(this));\n\t        //remove the temporary event\n\t        this._state.remove(tmpEvent);\n\t        //return the ticks\n\t        return elapsedTicks;\n\t    };\n\t    /**\n\t\t *  The number of times the callback was invoked. Starts counting at 0\n\t\t *  and increments after the callback was invoked. Returns -1 when stopped.\n\t\t *  @memberOf Tone.TickSource#\n\t\t *  @name ticks\n\t\t *  @type {Ticks}\n\t\t */\n\t    Object.defineProperty(Tone.TickSource.prototype, 'ticks', {\n\t        get: function () {\n\t            return this.getTicksAtTime(this.now());\n\t        },\n\t        set: function (t) {\n\t            this.setTicksAtTime(t, this.now());\n\t        }\n\t    });\n\t    /**\n\t\t *  The time since ticks=0 that the TickSource has been running. Accounts\n\t\t *  for tempo curves\n\t\t *  @memberOf Tone.TickSource#\n\t\t *  @name seconds\n\t\t *  @type {Seconds}\n\t\t */\n\t    Object.defineProperty(Tone.TickSource.prototype, 'seconds', {\n\t        get: function () {\n\t            return this.getSecondsAtTime(this.now());\n\t        },\n\t        set: function (s) {\n\t            var now = this.now();\n\t            var ticks = this.frequency.timeToTicks(s, now);\n\t            this.setTicksAtTime(ticks, now);\n\t        }\n\t    });\n\t    /**\n\t\t *  Return the elapsed seconds at the given time.\n\t\t *  @param  {Time}  time  When to get the elapsed seconds\n\t\t *  @return  {Seconds}  The number of elapsed seconds\n\t\t */\n\t    Tone.TickSource.prototype.getSecondsAtTime = function (time) {\n\t        time = this.toSeconds(time);\n\t        var stopEvent = this._state.getLastState(Tone.State.Stopped, time);\n\t        //this event allows forEachBetween to iterate until the current time\n\t        var tmpEvent = {\n\t            state: Tone.State.Paused,\n\t            time: time\n\t        };\n\t        this._state.add(tmpEvent);\n\t        //keep track of the previous offset event\n\t        var lastState = stopEvent;\n\t        var elapsedSeconds = 0;\n\t        //iterate through all the events since the last stop\n\t        this._state.forEachBetween(stopEvent.time, time + this.sampleTime, function (e) {\n\t            var periodStartTime = lastState.time;\n\t            //if there is an offset event in this period use that\n\t            var offsetEvent = this._tickOffset.get(e.time);\n\t            if (offsetEvent.time >= lastState.time) {\n\t                elapsedSeconds = offsetEvent.seconds;\n\t                periodStartTime = offsetEvent.time;\n\t            }\n\t            if (lastState.state === Tone.State.Started && e.state !== Tone.State.Started) {\n\t                elapsedSeconds += e.time - periodStartTime;\n\t            }\n\t            lastState = e;\n\t        }.bind(this));\n\t        //remove the temporary event\n\t        this._state.remove(tmpEvent);\n\t        //return the ticks\n\t        return elapsedSeconds;\n\t    };\n\t    /**\n\t\t * Set the clock's ticks at the given time.\n\t\t * @param  {Ticks} ticks The tick value to set\n\t\t * @param  {Time} time  When to set the tick value\n\t\t * @return {Tone.TickSource}       this\n\t\t */\n\t    Tone.TickSource.prototype.setTicksAtTime = function (ticks, time) {\n\t        time = this.toSeconds(time);\n\t        this._tickOffset.cancel(time);\n\t        this._tickOffset.add({\n\t            'time': time,\n\t            'ticks': ticks,\n\t            'seconds': this.frequency.getDurationOfTicks(ticks, time)\n\t        });\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Returns the scheduled state at the given time.\n\t\t *  @param  {Time}  time  The time to query.\n\t\t *  @return  {String}  The name of the state input in setStateAtTime.\n\t\t *  @example\n\t\t * source.start(\"+0.1\");\n\t\t * source.getStateAtTime(\"+0.1\"); //returns \"started\"\n\t\t */\n\t    Tone.TickSource.prototype.getStateAtTime = function (time) {\n\t        time = this.toSeconds(time);\n\t        return this._state.getValueAtTime(time);\n\t    };\n\t    /**\n\t\t * Get the time of the given tick. The second argument\n\t\t * is when to test before. Since ticks can be set (with setTicksAtTime)\n\t\t * there may be multiple times for a given tick value. \n\t\t * @param  {Ticks} ticks The tick number.\n\t\t * @param  {Time=} before When to measure the tick value from. \n\t\t * @return {Time}       The time of the tick\n\t\t */\n\t    Tone.TickSource.prototype.getTimeOfTick = function (tick, before) {\n\t        before = Tone.defaultArg(before, this.now());\n\t        var offset = this._tickOffset.get(before);\n\t        var event = this._state.get(before);\n\t        var startTime = Math.max(offset.time, event.time);\n\t        var absoluteTicks = this.frequency.getTicksAtTime(startTime) + tick - offset.ticks;\n\t        return this.frequency.getTimeOfTick(absoluteTicks);\n\t    };\n\t    /**\n\t\t *  Invoke the callback event at all scheduled ticks between the \n\t\t *  start time and the end time\n\t\t *  @param  {Time}    startTime  The beginning of the search range\n\t\t *  @param  {Time}    endTime    The end of the search range\n\t\t *  @param  {Function<Time,Ticks>}  callback   The callback to invoke with each tick\n\t\t *  @return  {Tone.TickSource}    this\n\t\t */\n\t    Tone.TickSource.prototype.forEachTickBetween = function (startTime, endTime, callback) {\n\t        //only iterate through the sections where it is \"started\"\n\t        var lastStateEvent = this._state.get(startTime);\n\t        this._state.forEachBetween(startTime, endTime, function (event) {\n\t            if (lastStateEvent.state === Tone.State.Started && event.state !== Tone.State.Started) {\n\t                this.forEachTickBetween(Math.max(lastStateEvent.time, startTime), event.time - this.sampleTime, callback);\n\t            }\n\t            lastStateEvent = event;\n\t        }.bind(this));\n\t        startTime = Math.max(lastStateEvent.time, startTime);\n\t        if (lastStateEvent.state === Tone.State.Started && this._state) {\n\t            //figure out the difference between the frequency ticks and the \n\t            var startTicks = this.frequency.getTicksAtTime(startTime);\n\t            var ticksAtStart = this.frequency.getTicksAtTime(lastStateEvent.time);\n\t            var diff = startTicks - ticksAtStart;\n\t            var offset = diff % 1;\n\t            if (offset !== 0) {\n\t                offset = 1 - offset;\n\t            }\n\t            var nextTickTime = this.frequency.getTimeOfTick(startTicks + offset);\n\t            var error = null;\n\t            while (nextTickTime < endTime && this._state) {\n\t                try {\n\t                    callback(nextTickTime, Math.round(this.getTicksAtTime(nextTickTime)));\n\t                } catch (e) {\n\t                    error = e;\n\t                    break;\n\t                }\n\t                if (this._state) {\n\t                    nextTickTime += this.frequency.getDurationOfTicks(1, nextTickTime);\n\t                }\n\t            }\n\t        }\n\t        if (error) {\n\t            throw error;\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @returns {Tone.TickSource} this\n\t\t */\n\t    Tone.TickSource.prototype.dispose = function () {\n\t        Tone.Param.prototype.dispose.call(this);\n\t        this._state.dispose();\n\t        this._state = null;\n\t        this._tickOffset.dispose();\n\t        this._tickOffset = null;\n\t        this._writable('frequency');\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        return this;\n\t    };\n\t    return Tone.TickSource;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  A sample accurate clock which provides a callback at the given rate.\n\t\t *          While the callback is not sample-accurate (it is still susceptible to\n\t\t *          loose JS timing), the time passed in as the argument to the callback\n\t\t *          is precise. For most applications, it is better to use Tone.Transport\n\t\t *          instead of the Clock by itself since you can synchronize multiple callbacks.\n\t\t *\n\t\t * \t@constructor\n\t\t *  @extends {Tone.Emitter}\n\t\t * \t@param {function} callback The callback to be invoked with the time of the audio event\n\t\t * \t@param {Frequency} frequency The rate of the callback\n\t\t * \t@example\n\t\t * //the callback will be invoked approximately once a second\n\t\t * //and will print the time exactly once a second apart.\n\t\t * var clock = new Tone.Clock(function(time){\n\t\t * \tconsole.log(time);\n\t\t * }, 1);\n\t\t */\n\t    Tone.Clock = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'callback',\n\t            'frequency'\n\t        ], Tone.Clock);\n\t        Tone.Emitter.call(this);\n\t        /**\n\t\t\t *  The callback function to invoke at the scheduled tick.\n\t\t\t *  @type  {Function}\n\t\t\t */\n\t        this.callback = options.callback;\n\t        /**\n\t\t\t *  The next time the callback is scheduled.\n\t\t\t *  @type {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._nextTick = 0;\n\t        /**\n\t\t\t *  The tick counter\n\t\t\t *  @type  {Tone.TickSource}\n\t\t\t *  @private\n\t\t\t */\n\t        this._tickSource = new Tone.TickSource(options.frequency);\n\t        /**\n\t\t\t *  The last time the loop callback was invoked\n\t\t\t *  @private\n\t\t\t *  @type {Number}\n\t\t\t */\n\t        this._lastUpdate = 0;\n\t        /**\n\t\t\t *  The rate the callback function should be invoked.\n\t\t\t *  @type  {BPM}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = this._tickSource.frequency;\n\t        this._readOnly('frequency');\n\t        /**\n\t\t\t *  The state timeline\n\t\t\t *  @type {Tone.TimelineState}\n\t\t\t *  @private\n\t\t\t */\n\t        this._state = new Tone.TimelineState(Tone.State.Stopped);\n\t        //add an initial state\n\t        this._state.setStateAtTime(Tone.State.Stopped, 0);\n\t        /**\n\t\t\t *  The loop function bound to its context.\n\t\t\t *  This is necessary to remove the event in the end.\n\t\t\t *  @type {Function}\n\t\t\t *  @private\n\t\t\t */\n\t        this._boundLoop = this._loop.bind(this);\n\t        //bind a callback to the worker thread\n\t        this.context.on('tick', this._boundLoop);\n\t    };\n\t    Tone.extend(Tone.Clock, Tone.Emitter);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.Clock.defaults = {\n\t        'callback': Tone.noOp,\n\t        'frequency': 1\n\t    };\n\t    /**\n\t\t *  Returns the playback state of the source, either \"started\", \"stopped\" or \"paused\".\n\t\t *  @type {Tone.State}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.Clock#\n\t\t *  @name state\n\t\t */\n\t    Object.defineProperty(Tone.Clock.prototype, 'state', {\n\t        get: function () {\n\t            return this._state.getValueAtTime(this.now());\n\t        }\n\t    });\n\t    /**\n\t\t *  Start the clock at the given time. Optionally pass in an offset\n\t\t *  of where to start the tick counter from.\n\t\t *  @param  {Time=}  time    The time the clock should start\n\t\t *  @param  {Ticks=}  offset  Where the tick counter starts counting from.\n\t\t *  @return  {Tone.Clock}  this\n\t\t */\n\t    Tone.Clock.prototype.start = function (time, offset) {\n\t        time = this.toSeconds(time);\n\t        if (this._state.getValueAtTime(time) !== Tone.State.Started) {\n\t            this._state.setStateAtTime(Tone.State.Started, time);\n\t            this._tickSource.start(time, offset);\n\t            if (time < this._lastUpdate) {\n\t                this.emit('start', time, offset);\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Stop the clock. Stopping the clock resets the tick counter to 0.\n\t\t *  @param {Time} [time=now] The time when the clock should stop.\n\t\t *  @returns {Tone.Clock} this\n\t\t *  @example\n\t\t * clock.stop();\n\t\t */\n\t    Tone.Clock.prototype.stop = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._state.cancel(time);\n\t        this._state.setStateAtTime(Tone.State.Stopped, time);\n\t        this._tickSource.stop(time);\n\t        if (time < this._lastUpdate) {\n\t            this.emit('stop', time);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Pause the clock. Pausing does not reset the tick counter.\n\t\t *  @param {Time} [time=now] The time when the clock should stop.\n\t\t *  @returns {Tone.Clock} this\n\t\t */\n\t    Tone.Clock.prototype.pause = function (time) {\n\t        time = this.toSeconds(time);\n\t        if (this._state.getValueAtTime(time) === Tone.State.Started) {\n\t            this._state.setStateAtTime(Tone.State.Paused, time);\n\t            this._tickSource.pause(time);\n\t            if (time < this._lastUpdate) {\n\t                this.emit('pause', time);\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  The number of times the callback was invoked. Starts counting at 0\n\t\t *  and increments after the callback was invoked.\n\t\t *  @type {Ticks}\n\t\t */\n\t    Object.defineProperty(Tone.Clock.prototype, 'ticks', {\n\t        get: function () {\n\t            return Math.ceil(this.getTicksAtTime(this.now()));\n\t        },\n\t        set: function (t) {\n\t            this._tickSource.ticks = t;\n\t        }\n\t    });\n\t    /**\n\t\t *  The time since ticks=0 that the Clock has been running. Accounts\n\t\t *  for tempo curves\n\t\t *  @type {Seconds}\n\t\t */\n\t    Object.defineProperty(Tone.Clock.prototype, 'seconds', {\n\t        get: function () {\n\t            return this._tickSource.seconds;\n\t        },\n\t        set: function (s) {\n\t            this._tickSource.seconds = s;\n\t        }\n\t    });\n\t    /**\n\t\t *  Return the elapsed seconds at the given time.\n\t\t *  @param  {Time}  time  When to get the elapsed seconds\n\t\t *  @return  {Seconds}  The number of elapsed seconds\n\t\t */\n\t    Tone.Clock.prototype.getSecondsAtTime = function (time) {\n\t        return this._tickSource.getSecondsAtTime(time);\n\t    };\n\t    /**\n\t\t * Set the clock's ticks at the given time.\n\t\t * @param  {Ticks} ticks The tick value to set\n\t\t * @param  {Time} time  When to set the tick value\n\t\t * @return {Tone.Clock}       this\n\t\t */\n\t    Tone.Clock.prototype.setTicksAtTime = function (ticks, time) {\n\t        this._tickSource.setTicksAtTime(ticks, time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Get the clock's ticks at the given time.\n\t\t * @param  {Time} time  When to get the tick value\n\t\t * @return {Ticks}       The tick value at the given time.\n\t\t */\n\t    Tone.Clock.prototype.getTicksAtTime = function (time) {\n\t        return this._tickSource.getTicksAtTime(time);\n\t    };\n\t    /**\n\t\t * Get the time of the next tick\n\t\t * @param  {Ticks} ticks The tick number.\n\t\t * @param  {Time} before \n\t\t * @return {Tone.Clock}       this\n\t\t */\n\t    Tone.Clock.prototype.nextTickTime = function (offset, when) {\n\t        when = this.toSeconds(when);\n\t        var currentTick = this.getTicksAtTime(when);\n\t        return this._tickSource.getTimeOfTick(currentTick + offset, when);\n\t    };\n\t    /**\n\t\t *  The scheduling loop.\n\t\t *  @private\n\t\t */\n\t    Tone.Clock.prototype._loop = function () {\n\t        var startTime = this._lastUpdate;\n\t        var endTime = this.now();\n\t        this._lastUpdate = endTime;\n\t        if (startTime !== endTime) {\n\t            //the state change events\n\t            this._state.forEachBetween(startTime, endTime, function (e) {\n\t                switch (e.state) {\n\t                case Tone.State.Started:\n\t                    var offset = this._tickSource.getTicksAtTime(e.time);\n\t                    this.emit('start', e.time, offset);\n\t                    break;\n\t                case Tone.State.Stopped:\n\t                    if (e.time !== 0) {\n\t                        this.emit('stop', e.time);\n\t                    }\n\t                    break;\n\t                case Tone.State.Paused:\n\t                    this.emit('pause', e.time);\n\t                    break;\n\t                }\n\t            }.bind(this));\n\t            //the tick callbacks\n\t            this._tickSource.forEachTickBetween(startTime, endTime, function (time, ticks) {\n\t                this.callback(time, ticks);\n\t            }.bind(this));\n\t        }\n\t    };\n\t    /**\n\t\t *  Returns the scheduled state at the given time.\n\t\t *  @param  {Time}  time  The time to query.\n\t\t *  @return  {String}  The name of the state input in setStateAtTime.\n\t\t *  @example\n\t\t * clock.start(\"+0.1\");\n\t\t * clock.getStateAtTime(\"+0.1\"); //returns \"started\"\n\t\t */\n\t    Tone.Clock.prototype.getStateAtTime = function (time) {\n\t        time = this.toSeconds(time);\n\t        return this._state.getValueAtTime(time);\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @returns {Tone.Clock} this\n\t\t */\n\t    Tone.Clock.prototype.dispose = function () {\n\t        Tone.Emitter.prototype.dispose.call(this);\n\t        this.context.off('tick', this._boundLoop);\n\t        this._writable('frequency');\n\t        this._tickSource.dispose();\n\t        this._tickSource = null;\n\t        this.frequency = null;\n\t        this._boundLoop = null;\n\t        this._nextTick = Infinity;\n\t        this.callback = null;\n\t        this._state.dispose();\n\t        this._state = null;\n\t    };\n\t    return Tone.Clock;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Similar to Tone.Timeline, but all events represent\n\t\t *         intervals with both \"time\" and \"duration\" times. The\n\t\t *         events are placed in a tree structure optimized\n\t\t *         for querying an intersection point with the timeline\n\t\t *         events. Internally uses an [Interval Tree](https://en.wikipedia.org/wiki/Interval_tree)\n\t\t *         to represent the data.\n\t\t *  @extends {Tone}\n\t\t */\n\t    Tone.IntervalTimeline = function () {\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  The root node of the inteval tree\n\t\t\t *  @type  {IntervalNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._root = null;\n\t        /**\n\t\t\t *  Keep track of the length of the timeline.\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._length = 0;\n\t    };\n\t    Tone.extend(Tone.IntervalTimeline);\n\t    /**\n\t\t *  The event to add to the timeline. All events must\n\t\t *  have a time and duration value\n\t\t *  @param  {Object}  event  The event to add to the timeline\n\t\t *  @return  {Tone.IntervalTimeline}  this\n\t\t */\n\t    Tone.IntervalTimeline.prototype.add = function (event) {\n\t        if (Tone.isUndef(event.time) || Tone.isUndef(event.duration)) {\n\t            throw new Error('Tone.IntervalTimeline: events must have time and duration parameters');\n\t        }\n\t        event.time = event.time.valueOf();\n\t        var node = new IntervalNode(event.time, event.time + event.duration, event);\n\t        if (this._root === null) {\n\t            this._root = node;\n\t        } else {\n\t            this._root.insert(node);\n\t        }\n\t        this._length++;\n\t        // Restructure tree to be balanced\n\t        while (node !== null) {\n\t            node.updateHeight();\n\t            node.updateMax();\n\t            this._rebalance(node);\n\t            node = node.parent;\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Remove an event from the timeline.\n\t\t *  @param  {Object}  event  The event to remove from the timeline\n\t\t *  @return  {Tone.IntervalTimeline}  this\n\t\t */\n\t    Tone.IntervalTimeline.prototype.remove = function (event) {\n\t        if (this._root !== null) {\n\t            var results = [];\n\t            this._root.search(event.time, results);\n\t            for (var i = 0; i < results.length; i++) {\n\t                var node = results[i];\n\t                if (node.event === event) {\n\t                    this._removeNode(node);\n\t                    this._length--;\n\t                    break;\n\t                }\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  The number of items in the timeline.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.IntervalTimeline#\n\t\t *  @name length\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.IntervalTimeline.prototype, 'length', {\n\t        get: function () {\n\t            return this._length;\n\t        }\n\t    });\n\t    /**\n\t\t *  Remove events whose time time is after the given time\n\t\t *  @param  {Number}  time  The time to query.\n\t\t *  @returns {Tone.IntervalTimeline} this\n\t\t */\n\t    Tone.IntervalTimeline.prototype.cancel = function (after) {\n\t        this.forEachFrom(after, function (event) {\n\t            this.remove(event);\n\t        }.bind(this));\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Set the root node as the given node\n\t\t *  @param {IntervalNode} node\n\t\t *  @private\n\t\t */\n\t    Tone.IntervalTimeline.prototype._setRoot = function (node) {\n\t        this._root = node;\n\t        if (this._root !== null) {\n\t            this._root.parent = null;\n\t        }\n\t    };\n\t    /**\n\t\t *  Replace the references to the node in the node's parent\n\t\t *  with the replacement node.\n\t\t *  @param  {IntervalNode}  node\n\t\t *  @param  {IntervalNode}  replacement\n\t\t *  @private\n\t\t */\n\t    Tone.IntervalTimeline.prototype._replaceNodeInParent = function (node, replacement) {\n\t        if (node.parent !== null) {\n\t            if (node.isLeftChild()) {\n\t                node.parent.left = replacement;\n\t            } else {\n\t                node.parent.right = replacement;\n\t            }\n\t            this._rebalance(node.parent);\n\t        } else {\n\t            this._setRoot(replacement);\n\t        }\n\t    };\n\t    /**\n\t\t *  Remove the node from the tree and replace it with\n\t\t *  a successor which follows the schema.\n\t\t *  @param  {IntervalNode}  node\n\t\t *  @private\n\t\t */\n\t    Tone.IntervalTimeline.prototype._removeNode = function (node) {\n\t        if (node.left === null && node.right === null) {\n\t            this._replaceNodeInParent(node, null);\n\t        } else if (node.right === null) {\n\t            this._replaceNodeInParent(node, node.left);\n\t        } else if (node.left === null) {\n\t            this._replaceNodeInParent(node, node.right);\n\t        } else {\n\t            var balance = node.getBalance();\n\t            var replacement, temp;\n\t            if (balance > 0) {\n\t                if (node.left.right === null) {\n\t                    replacement = node.left;\n\t                    replacement.right = node.right;\n\t                    temp = replacement;\n\t                } else {\n\t                    replacement = node.left.right;\n\t                    while (replacement.right !== null) {\n\t                        replacement = replacement.right;\n\t                    }\n\t                    replacement.parent.right = replacement.left;\n\t                    temp = replacement.parent;\n\t                    replacement.left = node.left;\n\t                    replacement.right = node.right;\n\t                }\n\t            } else if (node.right.left === null) {\n\t                replacement = node.right;\n\t                replacement.left = node.left;\n\t                temp = replacement;\n\t            } else {\n\t                replacement = node.right.left;\n\t                while (replacement.left !== null) {\n\t                    replacement = replacement.left;\n\t                }\n\t                replacement.parent = replacement.parent;\n\t                replacement.parent.left = replacement.right;\n\t                temp = replacement.parent;\n\t                replacement.left = node.left;\n\t                replacement.right = node.right;\n\t            }\n\t            if (node.parent !== null) {\n\t                if (node.isLeftChild()) {\n\t                    node.parent.left = replacement;\n\t                } else {\n\t                    node.parent.right = replacement;\n\t                }\n\t            } else {\n\t                this._setRoot(replacement);\n\t            }\n\t            // this._replaceNodeInParent(node, replacement);\n\t            this._rebalance(temp);\n\t        }\n\t        node.dispose();\n\t    };\n\t    /**\n\t\t *  Rotate the tree to the left\n\t\t *  @param  {IntervalNode}  node\n\t\t *  @private\n\t\t */\n\t    Tone.IntervalTimeline.prototype._rotateLeft = function (node) {\n\t        var parent = node.parent;\n\t        var isLeftChild = node.isLeftChild();\n\t        // Make node.right the new root of this sub tree (instead of node)\n\t        var pivotNode = node.right;\n\t        node.right = pivotNode.left;\n\t        pivotNode.left = node;\n\t        if (parent !== null) {\n\t            if (isLeftChild) {\n\t                parent.left = pivotNode;\n\t            } else {\n\t                parent.right = pivotNode;\n\t            }\n\t        } else {\n\t            this._setRoot(pivotNode);\n\t        }\n\t    };\n\t    /**\n\t\t *  Rotate the tree to the right\n\t\t *  @param  {IntervalNode}  node\n\t\t *  @private\n\t\t */\n\t    Tone.IntervalTimeline.prototype._rotateRight = function (node) {\n\t        var parent = node.parent;\n\t        var isLeftChild = node.isLeftChild();\n\t        // Make node.left the new root of this sub tree (instead of node)\n\t        var pivotNode = node.left;\n\t        node.left = pivotNode.right;\n\t        pivotNode.right = node;\n\t        if (parent !== null) {\n\t            if (isLeftChild) {\n\t                parent.left = pivotNode;\n\t            } else {\n\t                parent.right = pivotNode;\n\t            }\n\t        } else {\n\t            this._setRoot(pivotNode);\n\t        }\n\t    };\n\t    /**\n\t\t *  Balance the BST\n\t\t *  @param  {IntervalNode}  node\n\t\t *  @private\n\t\t */\n\t    Tone.IntervalTimeline.prototype._rebalance = function (node) {\n\t        var balance = node.getBalance();\n\t        if (balance > 1) {\n\t            if (node.left.getBalance() < 0) {\n\t                this._rotateLeft(node.left);\n\t            } else {\n\t                this._rotateRight(node);\n\t            }\n\t        } else if (balance < -1) {\n\t            if (node.right.getBalance() > 0) {\n\t                this._rotateRight(node.right);\n\t            } else {\n\t                this._rotateLeft(node);\n\t            }\n\t        }\n\t    };\n\t    /**\n\t\t *  Get an event whose time and duration span the give time. Will\n\t\t *  return the match whose \"time\" value is closest to the given time.\n\t\t *  @param  {Object}  event  The event to add to the timeline\n\t\t *  @return  {Object}  The event which spans the desired time\n\t\t */\n\t    Tone.IntervalTimeline.prototype.get = function (time) {\n\t        if (this._root !== null) {\n\t            var results = [];\n\t            this._root.search(time, results);\n\t            if (results.length > 0) {\n\t                var max = results[0];\n\t                for (var i = 1; i < results.length; i++) {\n\t                    if (results[i].low > max.low) {\n\t                        max = results[i];\n\t                    }\n\t                }\n\t                return max.event;\n\t            }\n\t        }\n\t        return null;\n\t    };\n\t    /**\n\t\t *  Iterate over everything in the timeline.\n\t\t *  @param  {Function}  callback The callback to invoke with every item\n\t\t *  @returns {Tone.IntervalTimeline} this\n\t\t */\n\t    Tone.IntervalTimeline.prototype.forEach = function (callback) {\n\t        if (this._root !== null) {\n\t            var allNodes = [];\n\t            this._root.traverse(function (node) {\n\t                allNodes.push(node);\n\t            });\n\t            for (var i = 0; i < allNodes.length; i++) {\n\t                var ev = allNodes[i].event;\n\t                if (ev) {\n\t                    callback(ev);\n\t                }\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Iterate over everything in the array in which the given time\n\t\t *  overlaps with the time and duration time of the event.\n\t\t *  @param  {Number}  time The time to check if items are overlapping\n\t\t *  @param  {Function}  callback The callback to invoke with every item\n\t\t *  @returns {Tone.IntervalTimeline} this\n\t\t */\n\t    Tone.IntervalTimeline.prototype.forEachAtTime = function (time, callback) {\n\t        if (this._root !== null) {\n\t            var results = [];\n\t            this._root.search(time, results);\n\t            for (var i = results.length - 1; i >= 0; i--) {\n\t                var ev = results[i].event;\n\t                if (ev) {\n\t                    callback(ev);\n\t                }\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Iterate over everything in the array in which the time is greater\n\t\t *  than or equal to the given time.\n\t\t *  @param  {Number}  time The time to check if items are before\n\t\t *  @param  {Function}  callback The callback to invoke with every item\n\t\t *  @returns {Tone.IntervalTimeline} this\n\t\t */\n\t    Tone.IntervalTimeline.prototype.forEachFrom = function (time, callback) {\n\t        if (this._root !== null) {\n\t            var results = [];\n\t            this._root.searchAfter(time, results);\n\t            for (var i = results.length - 1; i >= 0; i--) {\n\t                var ev = results[i].event;\n\t                callback(ev);\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.IntervalTimeline}  this\n\t\t */\n\t    Tone.IntervalTimeline.prototype.dispose = function () {\n\t        var allNodes = [];\n\t        if (this._root !== null) {\n\t            this._root.traverse(function (node) {\n\t                allNodes.push(node);\n\t            });\n\t        }\n\t        for (var i = 0; i < allNodes.length; i++) {\n\t            allNodes[i].dispose();\n\t        }\n\t        allNodes = null;\n\t        this._root = null;\n\t        return this;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tINTERVAL NODE HELPER\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Represents a node in the binary search tree, with the addition\n\t\t *  of a \"high\" value which keeps track of the highest value of\n\t\t *  its children.\n\t\t *  References:\n\t\t *  https://brooknovak.wordpress.com/2013/12/07/augmented-interval-tree-in-c/\n\t\t *  http://www.mif.vu.lt/~valdas/ALGORITMAI/LITERATURA/Cormen/Cormen.pdf\n\t\t *  @param {Number} low\n\t\t *  @param {Number} high\n\t\t *  @private\n\t\t */\n\t    var IntervalNode = function (low, high, event) {\n\t        //the event container\n\t        this.event = event;\n\t        //the low value\n\t        this.low = low;\n\t        //the high value\n\t        this.high = high;\n\t        //the high value for this and all child nodes\n\t        this.max = this.high;\n\t        //the nodes to the left\n\t        this._left = null;\n\t        //the nodes to the right\n\t        this._right = null;\n\t        //the parent node\n\t        this.parent = null;\n\t        //the number of child nodes\n\t        this.height = 0;\n\t    };\n\t    /**\n\t\t *  Insert a node into the correct spot in the tree\n\t\t *  @param  {IntervalNode}  node\n\t\t */\n\t    IntervalNode.prototype.insert = function (node) {\n\t        if (node.low <= this.low) {\n\t            if (this.left === null) {\n\t                this.left = node;\n\t            } else {\n\t                this.left.insert(node);\n\t            }\n\t        } else if (this.right === null) {\n\t            this.right = node;\n\t        } else {\n\t            this.right.insert(node);\n\t        }\n\t    };\n\t    /**\n\t\t *  Search the tree for nodes which overlap\n\t\t *  with the given point\n\t\t *  @param  {Number}  point  The point to query\n\t\t *  @param  {Array}  results  The array to put the results\n\t\t */\n\t    IntervalNode.prototype.search = function (point, results) {\n\t        // If p is to the right of the rightmost point of any interval\n\t        // in this node and all children, there won't be any matches.\n\t        if (point > this.max) {\n\t            return;\n\t        }\n\t        // Search left children\n\t        if (this.left !== null) {\n\t            this.left.search(point, results);\n\t        }\n\t        // Check this node\n\t        if (this.low <= point && this.high > point) {\n\t            results.push(this);\n\t        }\n\t        // If p is to the left of the time of this interval,\n\t        // then it can't be in any child to the right.\n\t        if (this.low > point) {\n\t            return;\n\t        }\n\t        // Search right children\n\t        if (this.right !== null) {\n\t            this.right.search(point, results);\n\t        }\n\t    };\n\t    /**\n\t\t *  Search the tree for nodes which are less\n\t\t *  than the given point\n\t\t *  @param  {Number}  point  The point to query\n\t\t *  @param  {Array}  results  The array to put the results\n\t\t */\n\t    IntervalNode.prototype.searchAfter = function (point, results) {\n\t        // Check this node\n\t        if (this.low >= point) {\n\t            results.push(this);\n\t            if (this.left !== null) {\n\t                this.left.searchAfter(point, results);\n\t            }\n\t        }\n\t        // search the right side\n\t        if (this.right !== null) {\n\t            this.right.searchAfter(point, results);\n\t        }\n\t    };\n\t    /**\n\t\t *  Invoke the callback on this element and both it's branches\n\t\t *  @param  {Function}  callback\n\t\t */\n\t    IntervalNode.prototype.traverse = function (callback) {\n\t        callback(this);\n\t        if (this.left !== null) {\n\t            this.left.traverse(callback);\n\t        }\n\t        if (this.right !== null) {\n\t            this.right.traverse(callback);\n\t        }\n\t    };\n\t    /**\n\t\t *  Update the height of the node\n\t\t */\n\t    IntervalNode.prototype.updateHeight = function () {\n\t        if (this.left !== null && this.right !== null) {\n\t            this.height = Math.max(this.left.height, this.right.height) + 1;\n\t        } else if (this.right !== null) {\n\t            this.height = this.right.height + 1;\n\t        } else if (this.left !== null) {\n\t            this.height = this.left.height + 1;\n\t        } else {\n\t            this.height = 0;\n\t        }\n\t    };\n\t    /**\n\t\t *  Update the height of the node\n\t\t */\n\t    IntervalNode.prototype.updateMax = function () {\n\t        this.max = this.high;\n\t        if (this.left !== null) {\n\t            this.max = Math.max(this.max, this.left.max);\n\t        }\n\t        if (this.right !== null) {\n\t            this.max = Math.max(this.max, this.right.max);\n\t        }\n\t    };\n\t    /**\n\t\t *  The balance is how the leafs are distributed on the node\n\t\t *  @return  {Number}  Negative numbers are balanced to the right\n\t\t */\n\t    IntervalNode.prototype.getBalance = function () {\n\t        var balance = 0;\n\t        if (this.left !== null && this.right !== null) {\n\t            balance = this.left.height - this.right.height;\n\t        } else if (this.left !== null) {\n\t            balance = this.left.height + 1;\n\t        } else if (this.right !== null) {\n\t            balance = -(this.right.height + 1);\n\t        }\n\t        return balance;\n\t    };\n\t    /**\n\t\t *  @returns {Boolean} true if this node is the left child\n\t\t *  of its parent\n\t\t */\n\t    IntervalNode.prototype.isLeftChild = function () {\n\t        return this.parent !== null && this.parent.left === this;\n\t    };\n\t    /**\n\t\t *  get/set the left node\n\t\t *  @type {IntervalNode}\n\t\t */\n\t    Object.defineProperty(IntervalNode.prototype, 'left', {\n\t        get: function () {\n\t            return this._left;\n\t        },\n\t        set: function (node) {\n\t            this._left = node;\n\t            if (node !== null) {\n\t                node.parent = this;\n\t            }\n\t            this.updateHeight();\n\t            this.updateMax();\n\t        }\n\t    });\n\t    /**\n\t\t *  get/set the right node\n\t\t *  @type {IntervalNode}\n\t\t */\n\t    Object.defineProperty(IntervalNode.prototype, 'right', {\n\t        get: function () {\n\t            return this._right;\n\t        },\n\t        set: function (node) {\n\t            this._right = node;\n\t            if (node !== null) {\n\t                node.parent = this;\n\t            }\n\t            this.updateHeight();\n\t            this.updateMax();\n\t        }\n\t    });\n\t    /**\n\t\t *  null out references.\n\t\t */\n\t    IntervalNode.prototype.dispose = function () {\n\t        this.parent = null;\n\t        this._left = null;\n\t        this._right = null;\n\t        this.event = null;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tEND INTERVAL NODE HELPER\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    return Tone.IntervalTimeline;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.Ticks is a primitive type for encoding Time values.\n\t\t *         Tone.Ticks can be constructed with or without the `new` keyword. Tone.Ticks can be passed\n\t\t *         into the parameter of any method which takes time as an argument.\n\t\t *  @constructor\n\t\t *  @extends {Tone.TransportTime}\n\t\t *  @param  {String|Number}  val    The time value.\n\t\t *  @param  {String=}  units  The units of the value.\n\t\t *  @example\n\t\t * var t = Tone.Ticks(\"4n\");//a quarter note\n\t\t */\n\t    Tone.Ticks = function (val, units) {\n\t        if (this instanceof Tone.Ticks) {\n\t            Tone.TransportTime.call(this, val, units);\n\t        } else {\n\t            return new Tone.Ticks(val, units);\n\t        }\n\t    };\n\t    Tone.extend(Tone.Ticks, Tone.TransportTime);\n\t    /**\n\t\t *  The default units if none are given.\n\t\t *  @type {String}\n\t\t *  @private\n\t\t */\n\t    Tone.Ticks.prototype._defaultUnits = 'i';\n\t    /**\n\t\t * Get the current time in the given units\n\t\t * @return {Ticks}\n\t\t * @private\n\t\t */\n\t    Tone.Ticks.prototype._now = function () {\n\t        return Tone.Transport.ticks;\n\t    };\n\t    /**\n\t\t *  Return the value of the beats in the current units\n\t\t *  @param {Number} beats\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Ticks.prototype._beatsToUnits = function (beats) {\n\t        return this._getPPQ() * beats;\n\t    };\n\t    /**\n\t\t *  Returns the value of a second in the current units\n\t\t *  @param {Seconds} seconds\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Ticks.prototype._secondsToUnits = function (seconds) {\n\t        return seconds / (60 / this._getBpm()) * this._getPPQ();\n\t    };\n\t    /**\n\t\t *  Returns the value of a tick in the current time units\n\t\t *  @param {Ticks} ticks\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Ticks.prototype._ticksToUnits = function (ticks) {\n\t        return ticks;\n\t    };\n\t    /**\n\t\t *  Return the time in ticks\n\t\t *  @return  {Ticks}\n\t\t */\n\t    Tone.Ticks.prototype.toTicks = function () {\n\t        return this.valueOf();\n\t    };\n\t    /**\n\t\t *  Return the time in ticks\n\t\t *  @return  {Ticks}\n\t\t */\n\t    Tone.Ticks.prototype.toSeconds = function () {\n\t        return this.valueOf() / this._getPPQ() * (60 / this._getBpm());\n\t    };\n\t    return Tone.Ticks;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.TransportEvent is an internal class used by (Tone.Transport)[Transport]\n\t\t *         to schedule events. Do no invoke this class directly, it is\n\t\t *         handled from within Tone.Transport.\n\t\t *  @extends {Tone}\n\t\t *  @param {Object} options\n\t\t */\n\t    Tone.TransportEvent = function (Transport, options) {\n\t        options = Tone.defaultArg(options, Tone.TransportEvent.defaults);\n\t        Tone.call(this);\n\t        /**\n\t\t\t * Reference to the Transport that created it\n\t\t\t * @type {Tone.Transport}\n\t\t\t */\n\t        this.Transport = Transport;\n\t        /**\n\t\t\t * The unique id of the event\n\t\t\t * @type {Number}\n\t\t\t */\n\t        this.id = Tone.TransportEvent._eventId++;\n\t        /**\n\t\t\t * The time the event starts\n\t\t\t * @type {Ticks}\n\t\t\t */\n\t        this.time = Tone.Ticks(options.time);\n\t        /**\n\t\t\t * The callback to invoke\n\t\t\t * @type {Function}\n\t\t\t */\n\t        this.callback = options.callback;\n\t        /**\n\t\t\t * If the event should be removed after being created.\n\t\t\t * @type {Boolean}\n\t\t\t * @private\n\t\t\t */\n\t        this._once = options.once;\n\t    };\n\t    Tone.extend(Tone.TransportEvent);\n\t    /**\n\t\t * The defaults\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t    Tone.TransportEvent.defaults = {\n\t        'once': false,\n\t        'callback': Tone.noOp\n\t    };\n\t    /**\n\t\t * Current ID counter\n\t\t * @private\n\t\t * @static\n\t\t * @type {Number}\n\t\t */\n\t    Tone.TransportEvent._eventId = 0;\n\t    /**\n\t\t * Invoke the event callback.\n\t\t * @param  {Time} time  The AudioContext time in seconds of the event\n\t\t */\n\t    Tone.TransportEvent.prototype.invoke = function (time) {\n\t        if (this.callback) {\n\t            this.callback(time);\n\t            if (this._once && this.Transport) {\n\t                this.Transport.clear(this.id);\n\t            }\n\t        }\n\t    };\n\t    /**\n\t\t * Clean up\n\t\t * @return {Tone.TransportEvent} this\n\t\t */\n\t    Tone.TransportEvent.prototype.dispose = function () {\n\t        Tone.prototype.dispose.call(this);\n\t        this.Transport = null;\n\t        this.callback = null;\n\t        this.time = null;\n\t        return this;\n\t    };\n\t    return Tone.TransportEvent;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.TransportRepeatEvent is an internal class used by Tone.Transport\n\t\t *         to schedule repeat events. This class should not be instantiated directly.\n\t\t *  @extends {Tone.TransportEvent}\n\t\t *  @param {Object} options\n\t\t */\n\t    Tone.TransportRepeatEvent = function (Transport, options) {\n\t        Tone.TransportEvent.call(this, Transport, options);\n\t        options = Tone.defaultArg(options, Tone.TransportRepeatEvent.defaults);\n\t        /**\n\t\t\t * When the event should stop repeating\n\t\t\t * @type {Ticks}\n\t\t\t * @private\n\t\t\t */\n\t        this.duration = Tone.Ticks(options.duration);\n\t        /**\n\t\t\t * The interval of the repeated event\n\t\t\t * @type {Ticks}\n\t\t\t * @private\n\t\t\t */\n\t        this._interval = Tone.Ticks(options.interval);\n\t        /**\n\t\t\t * The ID of the current timeline event\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t        this._currentId = -1;\n\t        /**\n\t\t\t * The ID of the next timeline event\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t        this._nextId = -1;\n\t        /**\n\t\t\t  * The time of the next event\n\t\t\t  * @type {Ticks}\n\t\t\t  * @private\n\t\t\t  */\n\t        this._nextTick = this.time;\n\t        /**\n\t\t\t * a reference to the bound start method\n\t\t\t * @type {Function}\n\t\t\t * @private\n\t\t\t */\n\t        this._boundRestart = this._restart.bind(this);\n\t        this.Transport.on('start loopStart', this._boundRestart);\n\t        this._restart();\n\t    };\n\t    Tone.extend(Tone.TransportRepeatEvent, Tone.TransportEvent);\n\t    /**\n\t\t * The defaults\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t    Tone.TransportRepeatEvent.defaults = {\n\t        'duration': Infinity,\n\t        'interval': 1\n\t    };\n\t    /**\n\t\t * Invoke the callback. Returns the tick time which\n\t\t * the next event should be scheduled at.\n\t\t * @param  {Number} time  The AudioContext time in seconds of the event\n\t\t */\n\t    Tone.TransportRepeatEvent.prototype.invoke = function (time) {\n\t        //create more events if necessary\n\t        this._createEvents(time);\n\t        //call the super class\n\t        Tone.TransportEvent.prototype.invoke.call(this, time);\n\t    };\n\t    /**\n\t\t * Push more events onto the timeline to keep up with the position of the timeline\n\t\t * @private\n\t\t */\n\t    Tone.TransportRepeatEvent.prototype._createEvents = function (time) {\n\t        // schedule the next event\n\t        var ticks = this.Transport.getTicksAtTime(time);\n\t        if (ticks >= this.time && ticks >= this._nextTick && this._nextTick + this._interval < this.time + this.duration) {\n\t            this._nextTick += this._interval;\n\t            this._currentId = this._nextId;\n\t            this._nextId = this.Transport.scheduleOnce(this.invoke.bind(this), Tone.Ticks(this._nextTick));\n\t        }\n\t    };\n\t    /**\n\t\t * Push more events onto the timeline to keep up with the position of the timeline\n\t\t * @private\n\t\t */\n\t    Tone.TransportRepeatEvent.prototype._restart = function (time) {\n\t        this.Transport.clear(this._currentId);\n\t        this.Transport.clear(this._nextId);\n\t        this._nextTick = this.time;\n\t        var ticks = this.Transport.getTicksAtTime(time);\n\t        if (ticks > this.time) {\n\t            this._nextTick = this.time + Math.ceil((ticks - this.time) / this._interval) * this._interval;\n\t        }\n\t        this._currentId = this.Transport.scheduleOnce(this.invoke.bind(this), Tone.Ticks(this._nextTick));\n\t        this._nextTick += this._interval;\n\t        this._nextId = this.Transport.scheduleOnce(this.invoke.bind(this), Tone.Ticks(this._nextTick));\n\t    };\n\t    /**\n\t\t * Clean up\n\t\t * @return {Tone.TransportRepeatEvent} this\n\t\t */\n\t    Tone.TransportRepeatEvent.prototype.dispose = function () {\n\t        this.Transport.clear(this._currentId);\n\t        this.Transport.clear(this._nextId);\n\t        this.Transport.off('start loopStart', this._boundRestart);\n\t        this._boundCreateEvents = null;\n\t        Tone.TransportEvent.prototype.dispose.call(this);\n\t        this.duration = null;\n\t        this._interval = null;\n\t        return this;\n\t    };\n\t    return Tone.TransportRepeatEvent;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Transport for timing musical events.\n\t\t *          Supports tempo curves and time changes. Unlike browser-based timing (setInterval, requestAnimationFrame)\n\t\t *          Tone.Transport timing events pass in the exact time of the scheduled event\n\t\t *          in the argument of the callback function. Pass that time value to the object\n\t\t *          you're scheduling. <br><br>\n\t\t *          A single transport is created for you when the library is initialized.\n\t\t *          <br><br>\n\t\t *          The transport emits the events: \"start\", \"stop\", \"pause\", and \"loop\" which are\n\t\t *          called with the time of that event as the argument.\n\t\t *\n\t\t *  @extends {Tone.Emitter}\n\t\t *  @singleton\n\t\t *  @example\n\t\t * //repeated event every 8th note\n\t\t * Tone.Transport.scheduleRepeat(function(time){\n\t\t * \t//do something with the time\n\t\t * }, \"8n\");\n\t\t *  @example\n\t\t * //schedule an event on the 16th measure\n\t\t * Tone.Transport.schedule(function(time){\n\t\t * \t//do something with the time\n\t\t * }, \"16:0:0\");\n\t\t */\n\t    Tone.Transport = function () {\n\t        Tone.Emitter.call(this);\n\t        Tone.getContext(function () {\n\t            ///////////////////////////////////////////////////////////////////////\n\t            //\tLOOPING\n\t            //////////////////////////////////////////////////////////////////////\n\t            /**\n\t\t\t\t * \tIf the transport loops or not.\n\t\t\t\t *  @type {boolean}\n\t\t\t\t */\n\t            this.loop = false;\n\t            /**\n\t\t\t\t * \tThe loop start position in ticks\n\t\t\t\t *  @type {Ticks}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._loopStart = 0;\n\t            /**\n\t\t\t\t * \tThe loop end position in ticks\n\t\t\t\t *  @type {Ticks}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._loopEnd = 0;\n\t            ///////////////////////////////////////////////////////////////////////\n\t            //\tCLOCK/TEMPO\n\t            //////////////////////////////////////////////////////////////////////\n\t            /**\n\t\t\t\t *  Pulses per quarter is the number of ticks per quarter note.\n\t\t\t\t *  @private\n\t\t\t\t *  @type  {Number}\n\t\t\t\t */\n\t            this._ppq = TransportConstructor.defaults.PPQ;\n\t            /**\n\t\t\t\t *  watches the main oscillator for timing ticks\n\t\t\t\t *  initially starts at 120bpm\n\t\t\t\t *  @private\n\t\t\t\t *  @type {Tone.Clock}\n\t\t\t\t */\n\t            this._clock = new Tone.Clock({\n\t                'callback': this._processTick.bind(this),\n\t                'frequency': 0\n\t            });\n\t            this._bindClockEvents();\n\t            /**\n\t\t\t\t *  The Beats Per Minute of the Transport.\n\t\t\t\t *  @type {BPM}\n\t\t\t\t *  @signal\n\t\t\t\t *  @example\n\t\t\t\t * Tone.Transport.bpm.value = 80;\n\t\t\t\t * //ramp the bpm to 120 over 10 seconds\n\t\t\t\t * Tone.Transport.bpm.rampTo(120, 10);\n\t\t\t\t */\n\t            this.bpm = this._clock.frequency;\n\t            this.bpm._toUnits = this._toUnits.bind(this);\n\t            this.bpm._fromUnits = this._fromUnits.bind(this);\n\t            this.bpm.units = Tone.Type.BPM;\n\t            this.bpm.value = TransportConstructor.defaults.bpm;\n\t            this._readOnly('bpm');\n\t            /**\n\t\t\t\t *  The time signature, or more accurately the numerator\n\t\t\t\t *  of the time signature over a denominator of 4.\n\t\t\t\t *  @type {Number}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._timeSignature = TransportConstructor.defaults.timeSignature;\n\t            ///////////////////////////////////////////////////////////////////////\n\t            //\tTIMELINE EVENTS\n\t            //////////////////////////////////////////////////////////////////////\n\t            /**\n\t\t\t\t *  All the events in an object to keep track by ID\n\t\t\t\t *  @type {Object}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._scheduledEvents = {};\n\t            /**\n\t\t\t\t * \tThe scheduled events.\n\t\t\t\t *  @type {Tone.Timeline}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._timeline = new Tone.Timeline();\n\t            /**\n\t\t\t\t *  Repeated events\n\t\t\t\t *  @type {Array}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._repeatedEvents = new Tone.IntervalTimeline();\n\t            /**\n\t\t\t\t *  All of the synced Signals\n\t\t\t\t *  @private\n\t\t\t\t *  @type {Array}\n\t\t\t\t */\n\t            this._syncedSignals = [];\n\t            ///////////////////////////////////////////////////////////////////////\n\t            //\tSWING\n\t            //////////////////////////////////////////////////////////////////////\n\t            /**\n\t\t\t\t *  The subdivision of the swing\n\t\t\t\t *  @type  {Ticks}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._swingTicks = TransportConstructor.defaults.PPQ / 2;\n\t            //8n\n\t            /**\n\t\t\t\t *  The swing amount\n\t\t\t\t *  @type {NormalRange}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._swingAmount = 0;\n\t        }.bind(this));\n\t    };\n\t    Tone.extend(Tone.Transport, Tone.Emitter);\n\t    /**\n\t\t *  the defaults\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t *  @static\n\t\t */\n\t    Tone.Transport.defaults = {\n\t        'bpm': 120,\n\t        'swing': 0,\n\t        'swingSubdivision': '8n',\n\t        'timeSignature': 4,\n\t        'loopStart': 0,\n\t        'loopEnd': '4m',\n\t        'PPQ': 192\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    //\tTICKS\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  called on every tick\n\t\t *  @param   {number} tickTime clock relative tick time\n\t\t *  @private\n\t\t */\n\t    Tone.Transport.prototype._processTick = function (tickTime, ticks) {\n\t        //handle swing\n\t        if (this._swingAmount > 0 && ticks % this._ppq !== 0 && //not on a downbeat\n\t            ticks % (this._swingTicks * 2) !== 0) {\n\t            //add some swing\n\t            var progress = ticks % (this._swingTicks * 2) / (this._swingTicks * 2);\n\t            var amount = Math.sin(progress * Math.PI) * this._swingAmount;\n\t            tickTime += Tone.Ticks(this._swingTicks * 2 / 3).toSeconds() * amount;\n\t        }\n\t        //do the loop test\n\t        if (this.loop) {\n\t            if (ticks >= this._loopEnd) {\n\t                this.emit('loopEnd', tickTime);\n\t                this._clock.setTicksAtTime(this._loopStart, tickTime);\n\t                ticks = this._loopStart;\n\t                this.emit('loopStart', tickTime, this._clock.getSecondsAtTime(tickTime));\n\t                this.emit('loop', tickTime);\n\t            }\n\t        }\n\t        //invoke the timeline events scheduled on this tick\n\t        this._timeline.forEachAtTime(ticks, function (event) {\n\t            event.invoke(tickTime);\n\t        });\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    //\tSCHEDULABLE EVENTS\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Schedule an event along the timeline.\n\t\t *  @param {Function} callback The callback to be invoked at the time.\n\t\t *  @param {TransportTime}  time The time to invoke the callback at.\n\t\t *  @return {Number} The id of the event which can be used for canceling the event.\n\t\t *  @example\n\t\t * //trigger the callback when the Transport reaches the desired time\n\t\t * Tone.Transport.schedule(function(time){\n\t\t * \tenvelope.triggerAttack(time);\n\t\t * }, \"128i\");\n\t\t */\n\t    Tone.Transport.prototype.schedule = function (callback, time) {\n\t        var event = new Tone.TransportEvent(this, {\n\t            'time': Tone.TransportTime(time),\n\t            'callback': callback\n\t        });\n\t        return this._addEvent(event, this._timeline);\n\t    };\n\t    /**\n\t\t *  Schedule a repeated event along the timeline. The event will fire\n\t\t *  at the `interval` starting at the `startTime` and for the specified\n\t\t *  `duration`.\n\t\t *  @param  {Function}  callback   The callback to invoke.\n\t\t *  @param  {Time}    interval   The duration between successive\n\t\t *                               callbacks. Must be a positive number.\n\t\t *  @param  {TransportTime=}    startTime  When along the timeline the events should\n\t\t *                               start being invoked.\n\t\t *  @param {Time} [duration=Infinity] How long the event should repeat.\n\t\t *  @return  {Number}    The ID of the scheduled event. Use this to cancel\n\t\t *                           the event.\n\t\t *  @example\n\t\t * //a callback invoked every eighth note after the first measure\n\t\t * Tone.Transport.scheduleRepeat(callback, \"8n\", \"1m\");\n\t\t */\n\t    Tone.Transport.prototype.scheduleRepeat = function (callback, interval, startTime, duration) {\n\t        var event = new Tone.TransportRepeatEvent(this, {\n\t            'callback': callback,\n\t            'interval': Tone.Time(interval),\n\t            'time': Tone.TransportTime(startTime),\n\t            'duration': Tone.Time(Tone.defaultArg(duration, Infinity))\n\t        });\n\t        //kick it off if the Transport is started\n\t        return this._addEvent(event, this._repeatedEvents);\n\t    };\n\t    /**\n\t\t *  Schedule an event that will be removed after it is invoked.\n\t\t *  Note that if the given time is less than the current transport time,\n\t\t *  the event will be invoked immediately.\n\t\t *  @param {Function} callback The callback to invoke once.\n\t\t *  @param {TransportTime} time The time the callback should be invoked.\n\t\t *  @returns {Number} The ID of the scheduled event.\n\t\t */\n\t    Tone.Transport.prototype.scheduleOnce = function (callback, time) {\n\t        var event = new Tone.TransportEvent(this, {\n\t            'time': Tone.TransportTime(time),\n\t            'callback': callback,\n\t            'once': true\n\t        });\n\t        return this._addEvent(event, this._timeline);\n\t    };\n\t    /**\n\t\t *  Clear the passed in event id from the timeline\n\t\t *  @param {Number} eventId The id of the event.\n\t\t *  @returns {Tone.Transport} this\n\t\t */\n\t    Tone.Transport.prototype.clear = function (eventId) {\n\t        if (this._scheduledEvents.hasOwnProperty(eventId)) {\n\t            var item = this._scheduledEvents[eventId.toString()];\n\t            item.timeline.remove(item.event);\n\t            item.event.dispose();\n\t            delete this._scheduledEvents[eventId.toString()];\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * Add an event to the correct timeline. Keep track of the\n\t\t * timeline it was added to.\n\t\t * @param {Tone.TransportEvent}\tevent\n\t\t * @param {Tone.Timeline} timeline\n\t\t * @returns {Number} the event id which was just added\n\t\t * @private\n\t\t */\n\t    Tone.Transport.prototype._addEvent = function (event, timeline) {\n\t        this._scheduledEvents[event.id.toString()] = {\n\t            'event': event,\n\t            'timeline': timeline\n\t        };\n\t        timeline.add(event);\n\t        return event.id;\n\t    };\n\t    /**\n\t\t *  Remove scheduled events from the timeline after\n\t\t *  the given time. Repeated events will be removed\n\t\t *  if their startTime is after the given time\n\t\t *  @param {TransportTime} [after=0] Clear all events after\n\t\t *                          this time.\n\t\t *  @returns {Tone.Transport} this\n\t\t */\n\t    Tone.Transport.prototype.cancel = function (after) {\n\t        after = Tone.defaultArg(after, 0);\n\t        after = this.toTicks(after);\n\t        this._timeline.forEachFrom(after, function (event) {\n\t            this.clear(event.id);\n\t        }.bind(this));\n\t        this._repeatedEvents.forEachFrom(after, function (event) {\n\t            this.clear(event.id);\n\t        }.bind(this));\n\t        return this;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    //\tSTART/STOP/PAUSE\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Bind start/stop/pause events from the clock and emit them.\n\t\t *  @private\n\t\t */\n\t    Tone.Transport.prototype._bindClockEvents = function () {\n\t        this._clock.on('start', function (time, offset) {\n\t            offset = Tone.Ticks(offset).toSeconds();\n\t            this.emit('start', time, offset);\n\t        }.bind(this));\n\t        this._clock.on('stop', function (time) {\n\t            this.emit('stop', time);\n\t        }.bind(this));\n\t        this._clock.on('pause', function (time) {\n\t            this.emit('pause', time);\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t *  Returns the playback state of the source, either \"started\", \"stopped\", or \"paused\"\n\t\t *  @type {Tone.State}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.Transport#\n\t\t *  @name state\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'state', {\n\t        get: function () {\n\t            return this._clock.getStateAtTime(this.now());\n\t        }\n\t    });\n\t    /**\n\t\t *  Start the transport and all sources synced to the transport.\n\t\t *  @param  {Time} [time=now] The time when the transport should start.\n\t\t *  @param  {TransportTime=} offset The timeline offset to start the transport.\n\t\t *  @returns {Tone.Transport} this\n\t\t *  @example\n\t\t * //start the transport in one second starting at beginning of the 5th measure.\n\t\t * Tone.Transport.start(\"+1\", \"4:0:0\");\n\t\t */\n\t    Tone.Transport.prototype.start = function (time, offset) {\n\t        //start the clock\n\t        if (Tone.isDefined(offset)) {\n\t            offset = this.toTicks(offset);\n\t        }\n\t        this._clock.start(time, offset);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Stop the transport and all sources synced to the transport.\n\t\t *  @param  {Time} [time=now] The time when the transport should stop.\n\t\t *  @returns {Tone.Transport} this\n\t\t *  @example\n\t\t * Tone.Transport.stop();\n\t\t */\n\t    Tone.Transport.prototype.stop = function (time) {\n\t        this._clock.stop(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Pause the transport and all sources synced to the transport.\n\t\t *  @param  {Time} [time=now]\n\t\t *  @returns {Tone.Transport} this\n\t\t */\n\t    Tone.Transport.prototype.pause = function (time) {\n\t        this._clock.pause(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Toggle the current state of the transport. If it is\n\t\t * started, it will stop it, otherwise it will start the Transport.\n\t\t * @param  {Time=} time The time of the event\n\t\t * @return {Tone.Transport}      this\n\t\t */\n\t    Tone.Transport.prototype.toggle = function (time) {\n\t        time = this.toSeconds(time);\n\t        if (this._clock.getStateAtTime(time) !== Tone.State.Started) {\n\t            this.start(time);\n\t        } else {\n\t            this.stop(time);\n\t        }\n\t        return this;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    //\tSETTERS/GETTERS\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  The time signature as just the numerator over 4.\n\t\t *  For example 4/4 would be just 4 and 6/8 would be 3.\n\t\t *  @memberOf Tone.Transport#\n\t\t *  @type {Number|Array}\n\t\t *  @name timeSignature\n\t\t *  @example\n\t\t * //common time\n\t\t * Tone.Transport.timeSignature = 4;\n\t\t * // 7/8\n\t\t * Tone.Transport.timeSignature = [7, 8];\n\t\t * //this will be reduced to a single number\n\t\t * Tone.Transport.timeSignature; //returns 3.5\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'timeSignature', {\n\t        get: function () {\n\t            return this._timeSignature;\n\t        },\n\t        set: function (timeSig) {\n\t            if (Tone.isArray(timeSig)) {\n\t                timeSig = timeSig[0] / timeSig[1] * 4;\n\t            }\n\t            this._timeSignature = timeSig;\n\t        }\n\t    });\n\t    /**\n\t\t * When the Tone.Transport.loop = true, this is the starting position of the loop.\n\t\t * @memberOf Tone.Transport#\n\t\t * @type {Time}\n\t\t * @name loopStart\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'loopStart', {\n\t        get: function () {\n\t            return Tone.Ticks(this._loopStart).toSeconds();\n\t        },\n\t        set: function (startPosition) {\n\t            this._loopStart = this.toTicks(startPosition);\n\t        }\n\t    });\n\t    /**\n\t\t * When the Tone.Transport.loop = true, this is the ending position of the loop.\n\t\t * @memberOf Tone.Transport#\n\t\t * @type {Time}\n\t\t * @name loopEnd\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'loopEnd', {\n\t        get: function () {\n\t            return Tone.Ticks(this._loopEnd).toSeconds();\n\t        },\n\t        set: function (endPosition) {\n\t            this._loopEnd = this.toTicks(endPosition);\n\t        }\n\t    });\n\t    /**\n\t\t *  Set the loop start and stop at the same time.\n\t\t *  @param {TransportTime} startPosition\n\t\t *  @param {TransportTime} endPosition\n\t\t *  @returns {Tone.Transport} this\n\t\t *  @example\n\t\t * //loop over the first measure\n\t\t * Tone.Transport.setLoopPoints(0, \"1m\");\n\t\t * Tone.Transport.loop = true;\n\t\t */\n\t    Tone.Transport.prototype.setLoopPoints = function (startPosition, endPosition) {\n\t        this.loopStart = startPosition;\n\t        this.loopEnd = endPosition;\n\t        return this;\n\t    };\n\t    /**\n\t\t *  The swing value. Between 0-1 where 1 equal to\n\t\t *  the note + half the subdivision.\n\t\t *  @memberOf Tone.Transport#\n\t\t *  @type {NormalRange}\n\t\t *  @name swing\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'swing', {\n\t        get: function () {\n\t            return this._swingAmount;\n\t        },\n\t        set: function (amount) {\n\t            //scale the values to a normal range\n\t            this._swingAmount = amount;\n\t        }\n\t    });\n\t    /**\n\t\t *  Set the subdivision which the swing will be applied to.\n\t\t *  The default value is an 8th note. Value must be less\n\t\t *  than a quarter note.\n\t\t *\n\t\t *  @memberOf Tone.Transport#\n\t\t *  @type {Time}\n\t\t *  @name swingSubdivision\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'swingSubdivision', {\n\t        get: function () {\n\t            return Tone.Ticks(this._swingTicks).toNotation();\n\t        },\n\t        set: function (subdivision) {\n\t            this._swingTicks = this.toTicks(subdivision);\n\t        }\n\t    });\n\t    /**\n\t\t *  The Transport's position in Bars:Beats:Sixteenths.\n\t\t *  Setting the value will jump to that position right away.\n\t\t *  @memberOf Tone.Transport#\n\t\t *  @type {BarsBeatsSixteenths}\n\t\t *  @name position\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'position', {\n\t        get: function () {\n\t            var now = this.now();\n\t            var ticks = this._clock.getTicksAtTime(now);\n\t            return Tone.Ticks(ticks).toBarsBeatsSixteenths();\n\t        },\n\t        set: function (progress) {\n\t            var ticks = this.toTicks(progress);\n\t            this.ticks = ticks;\n\t        }\n\t    });\n\t    /**\n\t\t *  The Transport's position in seconds\n\t\t *  Setting the value will jump to that position right away.\n\t\t *  @memberOf Tone.Transport#\n\t\t *  @type {Seconds}\n\t\t *  @name seconds\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'seconds', {\n\t        get: function () {\n\t            return this._clock.seconds;\n\t        },\n\t        set: function (s) {\n\t            var now = this.now();\n\t            var ticks = this.bpm.timeToTicks(s, now);\n\t            this.ticks = ticks;\n\t        }\n\t    });\n\t    /**\n\t\t *  The Transport's loop position as a normalized value. Always\n\t\t *  returns 0 if the transport if loop is not true.\n\t\t *  @memberOf Tone.Transport#\n\t\t *  @name progress\n\t\t *  @type {NormalRange}\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'progress', {\n\t        get: function () {\n\t            if (this.loop) {\n\t                var now = this.now();\n\t                var ticks = this._clock.getTicksAtTime(now);\n\t                return (ticks - this._loopStart) / (this._loopEnd - this._loopStart);\n\t            } else {\n\t                return 0;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  The transports current tick position.\n\t\t *\n\t\t *  @memberOf Tone.Transport#\n\t\t *  @type {Ticks}\n\t\t *  @name ticks\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'ticks', {\n\t        get: function () {\n\t            return this._clock.ticks;\n\t        },\n\t        set: function (t) {\n\t            if (this._clock.ticks !== t) {\n\t                var now = this.now();\n\t                //stop everything synced to the transport\n\t                if (this.state === Tone.State.Started) {\n\t                    this.emit('stop', now);\n\t                    this._clock.setTicksAtTime(t, now);\n\t                    //restart it with the new time\n\t                    this.emit('start', now, this.seconds);\n\t                } else {\n\t                    this._clock.setTicksAtTime(t, now);\n\t                }\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * Get the clock's ticks at the given time.\n\t\t * @param  {Time} time  When to get the tick value\n\t\t * @return {Ticks}       The tick value at the given time.\n\t\t */\n\t    Tone.Transport.prototype.getTicksAtTime = function (time) {\n\t        return Math.round(this._clock.getTicksAtTime(time));\n\t    };\n\t    /**\n\t\t *  Return the elapsed seconds at the given time.\n\t\t *  @param  {Time}  time  When to get the elapsed seconds\n\t\t *  @return  {Seconds}  The number of elapsed seconds\n\t\t */\n\t    Tone.Transport.prototype.getSecondsAtTime = function (time) {\n\t        return this._clock.getSecondsAtTime(time);\n\t    };\n\t    /**\n\t\t *  Pulses Per Quarter note. This is the smallest resolution\n\t\t *  the Transport timing supports. This should be set once\n\t\t *  on initialization and not set again. Changing this value\n\t\t *  after other objects have been created can cause problems.\n\t\t *\n\t\t *  @memberOf Tone.Transport#\n\t\t *  @type {Number}\n\t\t *  @name PPQ\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'PPQ', {\n\t        get: function () {\n\t            return this._ppq;\n\t        },\n\t        set: function (ppq) {\n\t            var bpm = this.bpm.value;\n\t            this._ppq = ppq;\n\t            this.bpm.value = bpm;\n\t        }\n\t    });\n\t    /**\n\t\t *  Convert from BPM to frequency (factoring in PPQ)\n\t\t *  @param  {BPM}  bpm The BPM value to convert to frequency\n\t\t *  @return  {Frequency}  The BPM as a frequency with PPQ factored in.\n\t\t *  @private\n\t\t */\n\t    Tone.Transport.prototype._fromUnits = function (bpm) {\n\t        return 1 / (60 / bpm / this.PPQ);\n\t    };\n\t    /**\n\t\t *  Convert from frequency (with PPQ) into BPM\n\t\t *  @param  {Frequency}  freq The clocks frequency to convert to BPM\n\t\t *  @return  {BPM}  The frequency value as BPM.\n\t\t *  @private\n\t\t */\n\t    Tone.Transport.prototype._toUnits = function (freq) {\n\t        return freq / this.PPQ * 60;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    //\tSYNCING\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Returns the time aligned to the next subdivision\n\t\t *  of the Transport. If the Transport is not started,\n\t\t *  it will return 0.\n\t\t *  Note: this will not work precisely during tempo ramps.\n\t\t *  @param  {Time}  subdivision  The subdivision to quantize to\n\t\t *  @return  {Number}  The context time of the next subdivision.\n\t\t *  @example\n\t\t * Tone.Transport.start(); //the transport must be started\n\t\t * Tone.Transport.nextSubdivision(\"4n\");\n\t\t */\n\t    Tone.Transport.prototype.nextSubdivision = function (subdivision) {\n\t        subdivision = this.toTicks(subdivision);\n\t        if (this.state !== Tone.State.Started) {\n\t            //if the transport's not started, return 0\n\t            return 0;\n\t        } else {\n\t            var now = this.now();\n\t            //the remainder of the current ticks and the subdivision\n\t            var transportPos = this.getTicksAtTime(now);\n\t            var remainingTicks = subdivision - transportPos % subdivision;\n\t            return this._clock.nextTickTime(remainingTicks, now);\n\t        }\n\t    };\n\t    /**\n\t\t *  Attaches the signal to the tempo control signal so that\n\t\t *  any changes in the tempo will change the signal in the same\n\t\t *  ratio.\n\t\t *\n\t\t *  @param  {Tone.Signal} signal\n\t\t *  @param {number=} ratio Optionally pass in the ratio between\n\t\t *                         the two signals. Otherwise it will be computed\n\t\t *                         based on their current values.\n\t\t *  @returns {Tone.Transport} this\n\t\t */\n\t    Tone.Transport.prototype.syncSignal = function (signal, ratio) {\n\t        if (!ratio) {\n\t            //get the sync ratio\n\t            var now = this.now();\n\t            if (signal.getValueAtTime(now) !== 0) {\n\t                ratio = signal.getValueAtTime(now) / this.bpm.getValueAtTime(now);\n\t            } else {\n\t                ratio = 0;\n\t            }\n\t        }\n\t        var ratioSignal = new Tone.Gain(ratio);\n\t        this.bpm.chain(ratioSignal, signal._param);\n\t        this._syncedSignals.push({\n\t            'ratio': ratioSignal,\n\t            'signal': signal,\n\t            'initial': signal.value\n\t        });\n\t        signal.value = 0;\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Unsyncs a previously synced signal from the transport's control.\n\t\t *  See Tone.Transport.syncSignal.\n\t\t *  @param  {Tone.Signal} signal\n\t\t *  @returns {Tone.Transport} this\n\t\t */\n\t    Tone.Transport.prototype.unsyncSignal = function (signal) {\n\t        for (var i = this._syncedSignals.length - 1; i >= 0; i--) {\n\t            var syncedSignal = this._syncedSignals[i];\n\t            if (syncedSignal.signal === signal) {\n\t                syncedSignal.ratio.dispose();\n\t                syncedSignal.signal.value = syncedSignal.initial;\n\t                this._syncedSignals.splice(i, 1);\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Transport} this\n\t\t *  @private\n\t\t */\n\t    Tone.Transport.prototype.dispose = function () {\n\t        Tone.Emitter.prototype.dispose.call(this);\n\t        this._clock.dispose();\n\t        this._clock = null;\n\t        this._writable('bpm');\n\t        this.bpm = null;\n\t        this._timeline.dispose();\n\t        this._timeline = null;\n\t        this._repeatedEvents.dispose();\n\t        this._repeatedEvents = null;\n\t        return this;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    //\tINITIALIZATION\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    var TransportConstructor = Tone.Transport;\n\t    Tone.Transport = new TransportConstructor();\n\t    Tone.Context.on('init', function (context) {\n\t        if (context.Transport instanceof TransportConstructor) {\n\t            Tone.Transport = context.Transport;\n\t        } else {\n\t            Tone.Transport = new TransportConstructor();\n\t        }\n\t        //store the Transport on the context so it can be retrieved later\n\t        context.Transport = Tone.Transport;\n\t    });\n\t    Tone.Context.on('close', function (context) {\n\t        if (context.Transport instanceof TransportConstructor) {\n\t            context.Transport.dispose();\n\t        }\n\t    });\n\t    return Tone.Transport;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Volume is a simple volume node, useful for creating a volume fader.\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t *  @param {Decibels} [volume=0] the initial volume\n\t\t *  @example\n\t\t * var vol = new Tone.Volume(-12);\n\t\t * instrument.chain(vol, Tone.Master);\n\t\t */\n\t    Tone.Volume = function () {\n\t        var options = Tone.defaults(arguments, ['volume'], Tone.Volume);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t * the output node\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t        this.output = this.input = new Tone.Gain(options.volume, Tone.Type.Decibels);\n\t        /**\n\t\t\t * The unmuted volume\n\t\t\t * @type {Decibels}\n\t\t\t * @private\n\t\t\t */\n\t        this._unmutedVolume = options.volume;\n\t        /**\n\t\t\t *  The volume control in decibels.\n\t\t\t *  @type {Decibels}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.volume = this.output.gain;\n\t        this._readOnly('volume');\n\t        //set the mute initially\n\t        this.mute = options.mute;\n\t    };\n\t    Tone.extend(Tone.Volume, Tone.AudioNode);\n\t    /**\n\t\t *  Defaults\n\t\t *  @type  {Object}\n\t\t *  @const\n\t\t *  @static\n\t\t */\n\t    Tone.Volume.defaults = {\n\t        'volume': 0,\n\t        'mute': false\n\t    };\n\t    /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.Volume#\n\t\t * @type {boolean}\n\t\t * @name mute\n\t\t * @example\n\t\t * //mute the output\n\t\t * volume.mute = true;\n\t\t */\n\t    Object.defineProperty(Tone.Volume.prototype, 'mute', {\n\t        get: function () {\n\t            return this.volume.value === -Infinity;\n\t        },\n\t        set: function (mute) {\n\t            if (!this.mute && mute) {\n\t                this._unmutedVolume = this.volume.value;\n\t                //maybe it should ramp here?\n\t                this.volume.value = -Infinity;\n\t            } else if (this.mute && !mute) {\n\t                this.volume.value = this._unmutedVolume;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Volume} this\n\t\t */\n\t    Tone.Volume.prototype.dispose = function () {\n\t        this.input.dispose();\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable('volume');\n\t        this.volume.dispose();\n\t        this.volume = null;\n\t        return this;\n\t    };\n\t    return Tone.Volume;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  A single master output which is connected to the\n\t\t *          AudioDestinationNode (aka your speakers).\n\t\t *          It provides useful conveniences such as the ability\n\t\t *          to set the volume and mute the entire application.\n\t\t *          It also gives you the ability to apply master effects to your application.\n\t\t *          <br><br>\n\t\t *          Like Tone.Transport, A single Tone.Master is created\n\t\t *          on initialization and you do not need to explicitly construct one.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone}\n\t\t *  @singleton\n\t\t *  @example\n\t\t * //the audio will go from the oscillator to the speakers\n\t\t * oscillator.connect(Tone.Master);\n\t\t * //a convenience for connecting to the master output is also provided:\n\t\t * oscillator.toMaster();\n\t\t * //the above two examples are equivalent.\n\t\t */\n\t    Tone.Master = function () {\n\t        Tone.AudioNode.call(this);\n\t        Tone.getContext(function () {\n\t            this.createInsOuts(1, 0);\n\t            /**\n\t\t\t\t *  The private volume node\n\t\t\t\t *  @type  {Tone.Volume}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._volume = this.output = new Tone.Volume();\n\t            /**\n\t\t\t\t * The volume of the master output.\n\t\t\t\t * @type {Decibels}\n\t\t\t\t * @signal\n\t\t\t\t */\n\t            this.volume = this._volume.volume;\n\t            this._readOnly('volume');\n\t            //connections\n\t            this.input.chain(this.output, this.context.destination);\n\t        }.bind(this));\n\t    };\n\t    Tone.extend(Tone.Master, Tone.AudioNode);\n\t    /**\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.Master.defaults = {\n\t        'volume': 0,\n\t        'mute': false\n\t    };\n\t    /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.Master#\n\t\t * @type {boolean}\n\t\t * @name mute\n\t\t * @example\n\t\t * //mute the output\n\t\t * Tone.Master.mute = true;\n\t\t */\n\t    Object.defineProperty(Tone.Master.prototype, 'mute', {\n\t        get: function () {\n\t            return this._volume.mute;\n\t        },\n\t        set: function (mute) {\n\t            this._volume.mute = mute;\n\t        }\n\t    });\n\t    /**\n\t\t *  Add a master effects chain. NOTE: this will disconnect any nodes which were previously\n\t\t *  chained in the master effects chain.\n\t\t *  @param {AudioNode|Tone} args... All arguments will be connected in a row\n\t\t *                                  and the Master will be routed through it.\n\t\t *  @return  {Tone.Master}  this\n\t\t *  @example\n\t\t * //some overall compression to keep the levels in check\n\t\t * var masterCompressor = new Tone.Compressor({\n\t\t * \t\"threshold\" : -6,\n\t\t * \t\"ratio\" : 3,\n\t\t * \t\"attack\" : 0.5,\n\t\t * \t\"release\" : 0.1\n\t\t * });\n\t\t * //give a little boost to the lows\n\t\t * var lowBump = new Tone.Filter(200, \"lowshelf\");\n\t\t * //route everything through the filter\n\t\t * //and compressor before going to the speakers\n\t\t * Tone.Master.chain(lowBump, masterCompressor);\n\t\t */\n\t    Tone.Master.prototype.chain = function () {\n\t        this.input.disconnect();\n\t        this.input.chain.apply(this.input, arguments);\n\t        arguments[arguments.length - 1].connect(this.output);\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.Master}  this\n\t\t */\n\t    Tone.Master.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable('volume');\n\t        this._volume.dispose();\n\t        this._volume = null;\n\t        this.volume = null;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tAUGMENT TONE's PROTOTYPE\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Connect 'this' to the master output. Shorthand for this.connect(Tone.Master)\n\t\t *  @returns {Tone.AudioNode} this\n\t\t *  @example\n\t\t * //connect an oscillator to the master output\n\t\t * var osc = new Tone.Oscillator().toMaster();\n\t\t */\n\t    Tone.AudioNode.prototype.toMaster = function () {\n\t        this.connect(Tone.Master);\n\t        return this;\n\t    };\n\t    if (window.AudioNode) {\n\t        // Also augment AudioNode's prototype to include toMaster as a convenience\n\t        AudioNode.prototype.toMaster = function () {\n\t            this.connect(Tone.Master);\n\t            return this;\n\t        };\n\t    }\n\t    /**\n\t\t *  initialize the module and listen for new audio contexts\n\t\t */\n\t    var MasterConstructor = Tone.Master;\n\t    Tone.Master = new MasterConstructor();\n\t    Tone.Context.on('init', function (context) {\n\t        // if it already exists, just restore it\n\t        if (context.Master instanceof MasterConstructor) {\n\t            Tone.Master = context.Master;\n\t        } else {\n\t            Tone.Master = new MasterConstructor();\n\t        }\n\t        context.Master = Tone.Master;\n\t    });\n\t    Tone.Context.on('close', function (context) {\n\t        if (context.Master instanceof MasterConstructor) {\n\t            context.Master.dispose();\n\t        }\n\t    });\n\t    return Tone.Master;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Base class for sources. Sources have start/stop methods\n\t\t *          and the ability to be synced to the\n\t\t *          start/stop of Tone.Transport.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @example\n\t\t * //Multiple state change events can be chained together,\n\t\t * //but must be set in the correct order and with ascending times\n\t\t *\n\t\t * // OK\n\t\t * state.start().stop(\"+0.2\");\n\t\t * // AND\n\t\t * state.start().stop(\"+0.2\").start(\"+0.4\").stop(\"+0.7\")\n\t\t *\n\t\t * // BAD\n\t\t * state.stop(\"+0.2\").start();\n\t\t * // OR\n\t\t * state.start(\"+0.3\").stop(\"+0.2\");\n\t\t *\n\t\t */\n\t    Tone.Source = function (options) {\n\t        options = Tone.defaultArg(options, Tone.Source.defaults);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The output volume node\n\t\t\t *  @type  {Tone.Volume}\n\t\t\t *  @private\n\t\t\t */\n\t        this._volume = this.output = new Tone.Volume(options.volume);\n\t        /**\n\t\t\t * The volume of the output in decibels.\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * source.volume.value = -6;\n\t\t\t */\n\t        this.volume = this._volume.volume;\n\t        this._readOnly('volume');\n\t        /**\n\t\t\t * \tKeep track of the scheduled state.\n\t\t\t *  @type {Tone.TimelineState}\n\t\t\t *  @private\n\t\t\t */\n\t        this._state = new Tone.TimelineState(Tone.State.Stopped);\n\t        this._state.memory = 100;\n\t        /**\n\t\t\t *  The synced `start` callback function from the transport\n\t\t\t *  @type {Function}\n\t\t\t *  @private\n\t\t\t */\n\t        this._synced = false;\n\t        /**\n\t\t\t *  Keep track of all of the scheduled event ids\n\t\t\t *  @type  {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._scheduled = [];\n\t        //make the output explicitly stereo\n\t        this._volume.output.output.channelCount = 2;\n\t        this._volume.output.output.channelCountMode = 'explicit';\n\t        //mute initially\n\t        this.mute = options.mute;\n\t    };\n\t    Tone.extend(Tone.Source, Tone.AudioNode);\n\t    /**\n\t\t *  The default parameters\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Source.defaults = {\n\t        'volume': 0,\n\t        'mute': false\n\t    };\n\t    /**\n\t\t *  Returns the playback state of the source, either \"started\" or \"stopped\".\n\t\t *  @type {Tone.State}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.Source#\n\t\t *  @name state\n\t\t */\n\t    Object.defineProperty(Tone.Source.prototype, 'state', {\n\t        get: function () {\n\t            if (this._synced) {\n\t                if (Tone.Transport.state === Tone.State.Started) {\n\t                    return this._state.getValueAtTime(Tone.Transport.seconds);\n\t                } else {\n\t                    return Tone.State.Stopped;\n\t                }\n\t            } else {\n\t                return this._state.getValueAtTime(this.now());\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.Source#\n\t\t * @type {boolean}\n\t\t * @name mute\n\t\t * @example\n\t\t * //mute the output\n\t\t * source.mute = true;\n\t\t */\n\t    Object.defineProperty(Tone.Source.prototype, 'mute', {\n\t        get: function () {\n\t            return this._volume.mute;\n\t        },\n\t        set: function (mute) {\n\t            this._volume.mute = mute;\n\t        }\n\t    });\n\t    //overwrite these functions\n\t    Tone.Source.prototype._start = Tone.noOp;\n\t    Tone.Source.prototype.restart = Tone.noOp;\n\t    Tone.Source.prototype._stop = Tone.noOp;\n\t    /**\n\t\t *  Start the source at the specified time. If no time is given,\n\t\t *  start the source now.\n\t\t *  @param  {Time} [time=now] When the source should be started.\n\t\t *  @returns {Tone.Source} this\n\t\t *  @example\n\t\t * source.start(\"+0.5\"); //starts the source 0.5 seconds from now\n\t\t */\n\t    Tone.Source.prototype.start = function (time, offset, duration) {\n\t        if (Tone.isUndef(time) && this._synced) {\n\t            time = Tone.Transport.seconds;\n\t        } else {\n\t            time = this.toSeconds(time);\n\t        }\n\t        //if it's started, stop it and restart it\n\t        if (this._state.getValueAtTime(time) === Tone.State.Started) {\n\t            this._state.cancel(time);\n\t            this._state.setStateAtTime(Tone.State.Started, time);\n\t            this.restart(time, offset, duration);\n\t        } else {\n\t            this._state.setStateAtTime(Tone.State.Started, time);\n\t            if (this._synced) {\n\t                // add the offset time to the event\n\t                var event = this._state.get(time);\n\t                event.offset = Tone.defaultArg(offset, 0);\n\t                event.duration = duration;\n\t                var sched = Tone.Transport.schedule(function (t) {\n\t                    this._start(t, offset, duration);\n\t                }.bind(this), time);\n\t                this._scheduled.push(sched);\n\t                //if it's already started\n\t                if (Tone.Transport.state === Tone.State.Started) {\n\t                    this._syncedStart(this.now(), Tone.Transport.seconds);\n\t                }\n\t            } else {\n\t                this._start.apply(this, arguments);\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Stop the source at the specified time. If no time is given,\n\t\t *  stop the source now.\n\t\t *  @param  {Time} [time=now] When the source should be stopped.\n\t\t *  @returns {Tone.Source} this\n\t\t *  @example\n\t\t * source.stop(); // stops the source immediately\n\t\t */\n\t    Tone.Source.prototype.stop = function (time) {\n\t        if (Tone.isUndef(time) && this._synced) {\n\t            time = Tone.Transport.seconds;\n\t        } else {\n\t            time = this.toSeconds(time);\n\t        }\n\t        if (!this._synced) {\n\t            this._stop.apply(this, arguments);\n\t        } else {\n\t            var sched = Tone.Transport.schedule(this._stop.bind(this), time);\n\t            this._scheduled.push(sched);\n\t        }\n\t        this._state.cancel(time);\n\t        this._state.setStateAtTime(Tone.State.Stopped, time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Sync the source to the Transport so that all subsequent\n\t\t *  calls to `start` and `stop` are synced to the TransportTime\n\t\t *  instead of the AudioContext time.\n\t\t *\n\t\t *  @returns {Tone.Source} this\n\t\t *  @example\n\t\t * //sync the source so that it plays between 0 and 0.3 on the Transport's timeline\n\t\t * source.sync().start(0).stop(0.3);\n\t\t * //start the transport.\n\t\t * Tone.Transport.start();\n\t\t *\n\t\t *  @example\n\t\t * //start the transport with an offset and the sync'ed sources\n\t\t * //will start in the correct position\n\t\t * source.sync().start(0.1);\n\t\t * //the source will be invoked with an offset of 0.4\n\t\t * Tone.Transport.start(\"+0.5\", 0.5);\n\t\t */\n\t    Tone.Source.prototype.sync = function () {\n\t        this._synced = true;\n\t        this._syncedStart = function (time, offset) {\n\t            if (offset > 0) {\n\t                // get the playback state at that time\n\t                var stateEvent = this._state.get(offset);\n\t                // listen for start events which may occur in the middle of the sync'ed time\n\t                if (stateEvent && stateEvent.state === Tone.State.Started && stateEvent.time !== offset) {\n\t                    // get the offset\n\t                    var startOffset = offset - this.toSeconds(stateEvent.time);\n\t                    var duration;\n\t                    if (stateEvent.duration) {\n\t                        duration = this.toSeconds(stateEvent.duration) - startOffset;\n\t                    }\n\t                    this._start(time, this.toSeconds(stateEvent.offset) + startOffset, duration);\n\t                }\n\t            }\n\t        }.bind(this);\n\t        this._syncedStop = function (time) {\n\t            var seconds = Tone.Transport.getSecondsAtTime(Math.max(time - this.sampleTime, 0));\n\t            if (this._state.getValueAtTime(seconds) === Tone.State.Started) {\n\t                this._stop(time);\n\t            }\n\t        }.bind(this);\n\t        Tone.Transport.on('start loopStart', this._syncedStart);\n\t        Tone.Transport.on('stop pause loopEnd', this._syncedStop);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Unsync the source to the Transport. See Tone.Source.sync\n\t\t *  @returns {Tone.Source} this\n\t\t */\n\t    Tone.Source.prototype.unsync = function () {\n\t        if (this._synced) {\n\t            Tone.Transport.off('stop pause loopEnd', this._syncedStop);\n\t            Tone.Transport.off('start loopStart', this._syncedStart);\n\t        }\n\t        this._synced = false;\n\t        // clear all of the scheduled ids\n\t        for (var i = 0; i < this._scheduled.length; i++) {\n\t            var id = this._scheduled[i];\n\t            Tone.Transport.clear(id);\n\t        }\n\t        this._scheduled = [];\n\t        this._state.cancel(0);\n\t        return this;\n\t    };\n\t    /**\n\t\t *\tClean up.\n\t\t *  @return {Tone.Source} this\n\t\t */\n\t    Tone.Source.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this.unsync();\n\t        this._scheduled = null;\n\t        this._writable('volume');\n\t        this._volume.dispose();\n\t        this._volume = null;\n\t        this.volume = null;\n\t        this._state.dispose();\n\t        this._state = null;\n\t    };\n\t    return Tone.Source;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  AudioBuffer.copyTo/FromChannel polyfill\n\t\t *  @private\n\t\t */\n\t    if (Tone.supported) {\n\t        if (!AudioBuffer.prototype.copyToChannel) {\n\t            AudioBuffer.prototype.copyToChannel = function (src, chanNum, start) {\n\t                var channel = this.getChannelData(chanNum);\n\t                start = start || 0;\n\t                for (var i = 0; i < channel.length; i++) {\n\t                    channel[i + start] = src[i];\n\t                }\n\t            };\n\t            AudioBuffer.prototype.copyFromChannel = function (dest, chanNum, start) {\n\t                var channel = this.getChannelData(chanNum);\n\t                start = start || 0;\n\t                for (var i = 0; i < dest.length; i++) {\n\t                    dest[i] = channel[i + start];\n\t                }\n\t            };\n\t        }\n\t    }\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Buffer loading and storage. Tone.Buffer is used internally by all\n\t\t *          classes that make requests for audio files such as Tone.Player,\n\t\t *          Tone.Sampler and Tone.Convolver.\n\t\t *\n\t\t *          Aside from load callbacks from individual buffers, Tone.Buffer\n\t\t *  \t\tprovides events which keep track of the loading progress\n\t\t *  \t\tof _all_ of the buffers. These are Tone.Buffer.on(\"load\" / \"progress\" / \"error\")\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone}\n\t\t *  @param {AudioBuffer|String} url The url to load, or the audio buffer to set.\n\t\t *  @param {Function=} onload A callback which is invoked after the buffer is loaded.\n\t\t *                            It's recommended to use `Tone.Buffer.on('load', callback)` instead\n\t\t *                            since it will give you a callback when _all_ buffers are loaded.\n\t\t *  @param {Function=} onerror The callback to invoke if there is an error\n\t\t *  @example\n\t\t * var buffer = new Tone.Buffer(\"path/to/sound.mp3\", function(){\n\t\t * \t//the buffer is now available.\n\t\t * \tvar buff = buffer.get();\n\t\t * });\n\t\t *  @example\n\t\t * //can load provide fallback extension types if the first type is not supported.\n\t\t * var buffer = new Tone.Buffer(\"path/to/sound.[mp3|ogg|wav]\");\n\t\t */\n\t    Tone.Buffer = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'url',\n\t            'onload',\n\t            'onerror'\n\t        ], Tone.Buffer);\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  stores the loaded AudioBuffer\n\t\t\t *  @type {AudioBuffer}\n\t\t\t *  @private\n\t\t\t */\n\t        this._buffer = null;\n\t        /**\n\t\t\t *  indicates if the buffer should be reversed or not\n\t\t\t *  @type {Boolean}\n\t\t\t *  @private\n\t\t\t */\n\t        this._reversed = options.reverse;\n\t        /**\n\t\t\t *  The XHR\n\t\t\t *  @type  {XMLHttpRequest}\n\t\t\t *  @private\n\t\t\t */\n\t        this._xhr = null;\n\t        /**\n\t\t\t * Private callback when the buffer is loaded.\n\t\t\t * @type {Function}\n\t\t\t * @private\n\t\t\t */\n\t        this._onload = Tone.noOp;\n\t        if (options.url instanceof AudioBuffer || options.url instanceof Tone.Buffer) {\n\t            this.set(options.url);\n\t            // invoke the onload callback\n\t            if (options.onload) {\n\t                if (this.loaded) {\n\t                    options.onload(this);\n\t                } else {\n\t                    this._onload = options.onload;\n\t                }\n\t            }\n\t        } else if (Tone.isString(options.url)) {\n\t            this.load(options.url).then(options.onload).catch(options.onerror);\n\t        }\n\t    };\n\t    Tone.extend(Tone.Buffer);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Buffer.defaults = {\n\t        'url': undefined,\n\t        'reverse': false,\n\t        'onload': Tone.noOp,\n\t        'onerror': Tone.noOp\n\t    };\n\t    /**\n\t\t *  Pass in an AudioBuffer or Tone.Buffer to set the value\n\t\t *  of this buffer.\n\t\t *  @param {AudioBuffer|Tone.Buffer} buffer the buffer\n\t\t *  @returns {Tone.Buffer} this\n\t\t */\n\t    Tone.Buffer.prototype.set = function (buffer) {\n\t        if (buffer instanceof Tone.Buffer) {\n\t            if (buffer.loaded) {\n\t                this._buffer = buffer.get();\n\t            } else {\n\t                buffer._onload = function () {\n\t                    this.set(buffer);\n\t                    this._onload(this);\n\t                }.bind(this);\n\t            }\n\t        } else {\n\t            this._buffer = buffer;\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  @return {AudioBuffer} The audio buffer stored in the object.\n\t\t */\n\t    Tone.Buffer.prototype.get = function () {\n\t        return this._buffer;\n\t    };\n\t    /**\n\t\t *  Makes an xhr reqest for the selected url then decodes\n\t\t *  the file as an audio buffer. Invokes\n\t\t *  the callback once the audio buffer loads.\n\t\t *  @param {String} url The url of the buffer to load.\n\t\t *                      filetype support depends on the\n\t\t *                      browser.\n\t\t *  @returns {Promise} returns a Promise which resolves with the Tone.Buffer\n\t\t */\n\t    Tone.Buffer.prototype.load = function (url, onload, onerror) {\n\t        var promise = new Promise(function (load, error) {\n\t            this._xhr = Tone.Buffer.load(url, //success\n\t            function (buff) {\n\t                this._xhr = null;\n\t                this.set(buff);\n\t                load(this);\n\t                this._onload(this);\n\t                if (onload) {\n\t                    onload(this);\n\t                }\n\t            }.bind(this), //error\n\t            function (err) {\n\t                this._xhr = null;\n\t                error(err);\n\t                if (onerror) {\n\t                    onerror(err);\n\t                }\n\t            }.bind(this));\n\t        }.bind(this));\n\t        return promise;\n\t    };\n\t    /**\n\t\t *  dispose and disconnect\n\t\t *  @returns {Tone.Buffer} this\n\t\t */\n\t    Tone.Buffer.prototype.dispose = function () {\n\t        Tone.prototype.dispose.call(this);\n\t        this._buffer = null;\n\t        if (this._xhr) {\n\t            Tone.Buffer._removeFromDownloadQueue(this._xhr);\n\t            this._xhr.abort();\n\t            this._xhr = null;\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * If the buffer is loaded or not\n\t\t * @memberOf Tone.Buffer#\n\t\t * @type {Boolean}\n\t\t * @name loaded\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Buffer.prototype, 'loaded', {\n\t        get: function () {\n\t            return this.length > 0;\n\t        }\n\t    });\n\t    /**\n\t\t * The duration of the buffer.\n\t\t * @memberOf Tone.Buffer#\n\t\t * @type {Number}\n\t\t * @name duration\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Buffer.prototype, 'duration', {\n\t        get: function () {\n\t            if (this._buffer) {\n\t                return this._buffer.duration;\n\t            } else {\n\t                return 0;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The length of the buffer in samples\n\t\t * @memberOf Tone.Buffer#\n\t\t * @type {Number}\n\t\t * @name length\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Buffer.prototype, 'length', {\n\t        get: function () {\n\t            if (this._buffer) {\n\t                return this._buffer.length;\n\t            } else {\n\t                return 0;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The number of discrete audio channels. Returns 0 if no buffer\n\t\t * is loaded.\n\t\t * @memberOf Tone.Buffer#\n\t\t * @type {Number}\n\t\t * @name numberOfChannels\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Buffer.prototype, 'numberOfChannels', {\n\t        get: function () {\n\t            if (this._buffer) {\n\t                return this._buffer.numberOfChannels;\n\t            } else {\n\t                return 0;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Set the audio buffer from the array. To create a multichannel AudioBuffer,\n\t\t *  pass in a multidimensional array.\n\t\t *  @param {Float32Array} array The array to fill the audio buffer\n\t\t *  @return {Tone.Buffer} this\n\t\t */\n\t    Tone.Buffer.prototype.fromArray = function (array) {\n\t        var isMultidimensional = array[0].length > 0;\n\t        var channels = isMultidimensional ? array.length : 1;\n\t        var len = isMultidimensional ? array[0].length : array.length;\n\t        var buffer = this.context.createBuffer(channels, len, this.context.sampleRate);\n\t        if (!isMultidimensional && channels === 1) {\n\t            array = [array];\n\t        }\n\t        for (var c = 0; c < channels; c++) {\n\t            buffer.copyToChannel(array[c], c);\n\t        }\n\t        this._buffer = buffer;\n\t        return this;\n\t    };\n\t    /**\n\t\t * \tSums muliple channels into 1 channel\n\t\t *  @param {Number=} channel Optionally only copy a single channel from the array.\n\t\t *  @return {Array}\n\t\t */\n\t    Tone.Buffer.prototype.toMono = function (chanNum) {\n\t        if (Tone.isNumber(chanNum)) {\n\t            this.fromArray(this.toArray(chanNum));\n\t        } else {\n\t            var outputArray = new Float32Array(this.length);\n\t            var numChannels = this.numberOfChannels;\n\t            for (var channel = 0; channel < numChannels; channel++) {\n\t                var channelArray = this.toArray(channel);\n\t                for (var i = 0; i < channelArray.length; i++) {\n\t                    outputArray[i] += channelArray[i];\n\t                }\n\t            }\n\t            //divide by the number of channels\n\t            outputArray = outputArray.map(function (sample) {\n\t                return sample / numChannels;\n\t            });\n\t            this.fromArray(outputArray);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * \tGet the buffer as an array. Single channel buffers will return a 1-dimensional\n\t\t * \tFloat32Array, and multichannel buffers will return multidimensional arrays.\n\t\t *  @param {Number=} channel Optionally only copy a single channel from the array.\n\t\t *  @return {Array}\n\t\t */\n\t    Tone.Buffer.prototype.toArray = function (channel) {\n\t        if (Tone.isNumber(channel)) {\n\t            return this.getChannelData(channel);\n\t        } else if (this.numberOfChannels === 1) {\n\t            return this.toArray(0);\n\t        } else {\n\t            var ret = [];\n\t            for (var c = 0; c < this.numberOfChannels; c++) {\n\t                ret[c] = this.getChannelData(c);\n\t            }\n\t            return ret;\n\t        }\n\t    };\n\t    /**\n\t\t *  Returns the Float32Array representing the PCM audio data for the specific channel.\n\t\t *  @param  {Number}  channel  The channel number to return\n\t\t *  @return  {Float32Array}  The audio as a TypedArray\n\t\t */\n\t    Tone.Buffer.prototype.getChannelData = function (channel) {\n\t        return this._buffer.getChannelData(channel);\n\t    };\n\t    /**\n\t\t *  Cut a subsection of the array and return a buffer of the\n\t\t *  subsection. Does not modify the original buffer\n\t\t *  @param {Time} start The time to start the slice\n\t\t *  @param {Time=} end The end time to slice. If none is given\n\t\t *                     will default to the end of the buffer\n\t\t *  @return {Tone.Buffer} this\n\t\t */\n\t    Tone.Buffer.prototype.slice = function (start, end) {\n\t        end = Tone.defaultArg(end, this.duration);\n\t        var startSamples = Math.floor(this.context.sampleRate * this.toSeconds(start));\n\t        var endSamples = Math.floor(this.context.sampleRate * this.toSeconds(end));\n\t        var replacement = [];\n\t        for (var i = 0; i < this.numberOfChannels; i++) {\n\t            replacement[i] = this.toArray(i).slice(startSamples, endSamples);\n\t        }\n\t        var retBuffer = new Tone.Buffer().fromArray(replacement);\n\t        return retBuffer;\n\t    };\n\t    /**\n\t\t *  Reverse the buffer.\n\t\t *  @private\n\t\t *  @return {Tone.Buffer} this\n\t\t */\n\t    Tone.Buffer.prototype._reverse = function () {\n\t        if (this.loaded) {\n\t            for (var i = 0; i < this.numberOfChannels; i++) {\n\t                Array.prototype.reverse.call(this.getChannelData(i));\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * Reverse the buffer.\n\t\t * @memberOf Tone.Buffer#\n\t\t * @type {Boolean}\n\t\t * @name reverse\n\t\t */\n\t    Object.defineProperty(Tone.Buffer.prototype, 'reverse', {\n\t        get: function () {\n\t            return this._reversed;\n\t        },\n\t        set: function (rev) {\n\t            if (this._reversed !== rev) {\n\t                this._reversed = rev;\n\t                this._reverse();\n\t            }\n\t        }\n\t    });\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    // STATIC METHODS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //statically inherits Emitter methods\n\t    Tone.Emitter.mixin(Tone.Buffer);\n\t    /**\n\t\t *  the static queue for all of the xhr requests\n\t\t *  @type {Array}\n\t\t *  @private\n\t\t */\n\t    Tone.Buffer._downloadQueue = [];\n\t    /**\n\t\t *  A path which is prefixed before every url.\n\t\t *  @type  {String}\n\t\t *  @static\n\t\t */\n\t    Tone.Buffer.baseUrl = '';\n\t    /**\n\t\t *  Create a Tone.Buffer from the array. To create a multichannel AudioBuffer,\n\t\t *  pass in a multidimensional array.\n\t\t *  @param {Float32Array} array The array to fill the audio buffer\n\t\t *  @return {Tone.Buffer} A Tone.Buffer created from the array\n\t\t */\n\t    Tone.Buffer.fromArray = function (array) {\n\t        return new Tone.Buffer().fromArray(array);\n\t    };\n\t    /**\n\t\t * Creates a Tone.Buffer from a URL, returns a promise\n\t\t * which resolves to a Tone.Buffer\n\t\t * @param  {String} url The url to load.\n\t\t * @return {Promise<Tone.Buffer>}     A promise which resolves to a Tone.Buffer\n\t\t */\n\t    Tone.Buffer.fromUrl = function (url) {\n\t        var buffer = new Tone.Buffer();\n\t        return buffer.load(url).then(function () {\n\t            return buffer;\n\t        });\n\t    };\n\t    /**\n\t\t * Remove an xhr request from the download queue\n\t\t * @private\n\t\t */\n\t    Tone.Buffer._removeFromDownloadQueue = function (request) {\n\t        var index = Tone.Buffer._downloadQueue.indexOf(request);\n\t        if (index !== -1) {\n\t            Tone.Buffer._downloadQueue.splice(index, 1);\n\t        }\n\t    };\n\t    /**\n\t\t *  Loads a url using XMLHttpRequest.\n\t\t *  @param {String} url\n\t\t *  @param {Function} onload\n\t\t *  @param {Function} onerror\n\t\t *  @param {Function} onprogress\n\t\t *  @return {XMLHttpRequest}\n\t\t */\n\t    Tone.Buffer.load = function (url, onload, onerror) {\n\t        //default\n\t        onload = Tone.defaultArg(onload, Tone.noOp);\n\t        // test if the url contains multiple extensions\n\t        var matches = url.match(/\\[(.+\\|?)+\\]$/);\n\t        if (matches) {\n\t            var extensions = matches[1].split('|');\n\t            var extension = extensions[0];\n\t            for (var i = 0; i < extensions.length; i++) {\n\t                if (Tone.Buffer.supportsType(extensions[i])) {\n\t                    extension = extensions[i];\n\t                    break;\n\t                }\n\t            }\n\t            url = url.replace(matches[0], extension);\n\t        }\n\t        function onError(e) {\n\t            Tone.Buffer._removeFromDownloadQueue(request);\n\t            Tone.Buffer.emit('error', e);\n\t            if (onerror) {\n\t                onerror(e);\n\t            } else {\n\t                throw e;\n\t            }\n\t        }\n\t        function onProgress() {\n\t            //calculate the progress\n\t            var totalProgress = 0;\n\t            for (var i = 0; i < Tone.Buffer._downloadQueue.length; i++) {\n\t                totalProgress += Tone.Buffer._downloadQueue[i].progress;\n\t            }\n\t            Tone.Buffer.emit('progress', totalProgress / Tone.Buffer._downloadQueue.length);\n\t        }\n\t        var request = new XMLHttpRequest();\n\t        request.open('GET', Tone.Buffer.baseUrl + url, true);\n\t        request.responseType = 'arraybuffer';\n\t        //start out as 0\n\t        request.progress = 0;\n\t        Tone.Buffer._downloadQueue.push(request);\n\t        request.addEventListener('load', function () {\n\t            if (request.status === 200) {\n\t                Tone.context.decodeAudioData(request.response).then(function (buff) {\n\t                    request.progress = 1;\n\t                    onProgress();\n\t                    onload(buff);\n\t                    Tone.Buffer._removeFromDownloadQueue(request);\n\t                    if (Tone.Buffer._downloadQueue.length === 0) {\n\t                        //emit the event at the end\n\t                        Tone.Buffer.emit('load');\n\t                    }\n\t                }).catch(function () {\n\t                    Tone.Buffer._removeFromDownloadQueue(request);\n\t                    onError('Tone.Buffer: could not decode audio data: ' + url);\n\t                });\n\t            } else {\n\t                onError('Tone.Buffer: could not locate file: ' + url);\n\t            }\n\t        });\n\t        request.addEventListener('error', onError);\n\t        request.addEventListener('progress', function (event) {\n\t            if (event.lengthComputable) {\n\t                //only go to 95%, the last 5% is when the audio is decoded\n\t                request.progress = event.loaded / event.total * 0.95;\n\t                onProgress();\n\t            }\n\t        });\n\t        request.send();\n\t        return request;\n\t    };\n\t    /**\n\t\t *  Stop all of the downloads in progress\n\t\t *  @return {Tone.Buffer}\n\t\t *  @static\n\t\t */\n\t    Tone.Buffer.cancelDownloads = function () {\n\t        Tone.Buffer._downloadQueue.slice().forEach(function (request) {\n\t            Tone.Buffer._removeFromDownloadQueue(request);\n\t            request.abort();\n\t        });\n\t        return Tone.Buffer;\n\t    };\n\t    /**\n\t\t *  Checks a url's extension to see if the current browser can play that file type.\n\t\t *  @param {String} url The url/extension to test\n\t\t *  @return {Boolean} If the file extension can be played\n\t\t *  @static\n\t\t *  @example\n\t\t * Tone.Buffer.supportsType(\"wav\"); //returns true\n\t\t * Tone.Buffer.supportsType(\"path/to/file.wav\"); //returns true\n\t\t */\n\t    Tone.Buffer.supportsType = function (url) {\n\t        var extension = url.split('.');\n\t        extension = extension[extension.length - 1];\n\t        var response = document.createElement('audio').canPlayType('audio/' + extension);\n\t        return response !== '';\n\t    };\n\t    /**\n\t\t *  Returns a Promise which resolves when all of the buffers have loaded\n\t\t *  @return {Promise}\n\t\t */\n\t    Tone.loaded = function () {\n\t        var onload, onerror;\n\t        function removeEvents() {\n\t            //remove the events when it's resolved\n\t            Tone.Buffer.off('load', onload);\n\t            Tone.Buffer.off('error', onerror);\n\t        }\n\t        return new Promise(function (success, fail) {\n\t            onload = function () {\n\t                success();\n\t            };\n\t            onerror = function () {\n\t                fail();\n\t            };\n\t            //add the event listeners\n\t            Tone.Buffer.on('load', onload);\n\t            Tone.Buffer.on('error', onerror);\n\t        }).then(removeEvents).catch(function (e) {\n\t            removeEvents();\n\t            throw new Error(e);\n\t        });\n\t    };\n\t    return Tone.Buffer;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Wrapper around the native fire-and-forget OscillatorNode. Adds the\n\t\t *     ability to reschedule the stop method.\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param  {AudioBuffer|Tone.Buffer}  buffer   The buffer to play\n\t\t *  @param  {Function}  onload  The callback to invoke when the\n\t\t *                               buffer is done playing.\n\t\t */\n\t    Tone.OscillatorNode = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'type'\n\t        ], Tone.OscillatorNode);\n\t        Tone.AudioNode.call(this, options);\n\t        /**\n\t\t\t *  The callback to invoke after the\n\t\t\t *  buffer source is done playing.\n\t\t\t *  @type  {Function}\n\t\t\t */\n\t        this.onended = options.onended;\n\t        /**\n\t\t\t *  The oscillator start time\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._startTime = -1;\n\t        /**\n\t\t\t *  The oscillator stop time\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._stopTime = -1;\n\t        /**\n\t\t\t *  The gain node which envelopes the OscillatorNode\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._gainNode = this.output = new Tone.Gain();\n\t        this._gainNode.gain.setValueAtTime(0, this.context.currentTime);\n\t        /**\n\t\t\t *  The oscillator\n\t\t\t *  @type  {OscillatorNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._oscillator = this.context.createOscillator();\n\t        this._oscillator.connect(this._gainNode);\n\t        this.type = options.type;\n\t        /**\n\t\t\t *  The frequency of the oscillator\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Param(this._oscillator.frequency, Tone.Type.Frequency);\n\t        this.frequency.value = options.frequency;\n\t        /**\n\t\t\t *  The detune of the oscillator\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = new Tone.Param(this._oscillator.detune, Tone.Type.Cents);\n\t        this.detune.value = options.detune;\n\t        /**\n\t\t\t *  The value that the buffer ramps to\n\t\t\t *  @type {Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._gain = 1;\n\t    };\n\t    Tone.extend(Tone.OscillatorNode, Tone.AudioNode);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.OscillatorNode.defaults = {\n\t        'frequency': 440,\n\t        'detune': 0,\n\t        'type': 'sine',\n\t        'onended': Tone.noOp\n\t    };\n\t    /**\n\t\t *  Returns the playback state of the oscillator, either \"started\" or \"stopped\".\n\t\t *  @type {Tone.State}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.OscillatorNode#\n\t\t *  @name state\n\t\t */\n\t    Object.defineProperty(Tone.OscillatorNode.prototype, 'state', {\n\t        get: function () {\n\t            return this.getStateAtTime(this.now());\n\t        }\n\t    });\n\t    /**\n\t\t *  Get the playback state at the given time\n\t\t *  @param  {Time}  time  The time to test the state at\n\t\t *  @return  {Tone.State}  The playback state. \n\t\t */\n\t    Tone.OscillatorNode.prototype.getStateAtTime = function (time) {\n\t        time = this.toSeconds(time);\n\t        if (this._startTime !== -1 && time >= this._startTime && (this._stopTime === -1 || time <= this._stopTime)) {\n\t            return Tone.State.Started;\n\t        } else {\n\t            return Tone.State.Stopped;\n\t        }\n\t    };\n\t    /**\n\t     * Start the oscillator node at the given time\n\t     * @param  {Time=} time When to start the oscillator\n\t     * @return {OscillatorNode}      this\n\t     */\n\t    Tone.OscillatorNode.prototype.start = function (time) {\n\t        if (this._startTime === -1) {\n\t            this._startTime = this.toSeconds(time);\n\t            this._oscillator.start(this._startTime);\n\t            var now = this.context.currentTime;\n\t            this._gainNode.gain.cancelScheduledValues(now);\n\t            this._gainNode.gain.setValueAtTime(0, now);\n\t            this._gainNode.gain.setValueAtTime(1, this._startTime);\n\t        } else {\n\t            throw new Error('cannot call OscillatorNode.start more than once');\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t     * Sets an arbitrary custom periodic waveform given a PeriodicWave.\n\t     * @param  {PeriodicWave} periodicWave PeriodicWave should be created with context.createPeriodicWave\n\t     * @return {OscillatorNode} this\n\t     */\n\t    Tone.OscillatorNode.prototype.setPeriodicWave = function (periodicWave) {\n\t        this._oscillator.setPeriodicWave(periodicWave);\n\t        return this;\n\t    };\n\t    /**\n\t     * Stop the oscillator node at the given time\n\t     * @param  {Time=} time When to stop the oscillator\n\t     * @return {OscillatorNode}      this\n\t     */\n\t    Tone.OscillatorNode.prototype.stop = function (time) {\n\t        //cancel the previous stop\n\t        this.cancelStop();\n\t        //reschedule it\n\t        this._stopTime = this.toSeconds(time);\n\t        this._gainNode.gain.setValueAtTime(0, this._stopTime);\n\t        this.context.clearTimeout(this._timeout);\n\t        this._timeout = this.context.setTimeout(function () {\n\t            this._oscillator.stop(this.now());\n\t            this.onended();\n\t        }.bind(this), this._stopTime - this.now());\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancel a scheduled stop event\n\t\t *  @return  {Tone.OscillatorNode}  this\n\t\t */\n\t    Tone.OscillatorNode.prototype.cancelStop = function () {\n\t        if (this._startTime !== -1) {\n\t            //cancel the stop envelope\n\t            this._gainNode.gain.cancelScheduledValues(this._startTime + this.sampleTime);\n\t            this._gainNode.gain.setValueAtTime(1, Math.max(this.now(), this._startTime));\n\t            this.context.clearTimeout(this._timeout);\n\t            this._stopTime = -1;\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * The oscillator type. Either 'sine', 'sawtooth', 'square', or 'triangle'\n\t\t * @memberOf Tone.OscillatorNode#\n\t\t * @type {Time}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.OscillatorNode.prototype, 'type', {\n\t        get: function () {\n\t            return this._oscillator.type;\n\t        },\n\t        set: function (type) {\n\t            this._oscillator.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.OscillatorNode}  this\n\t\t */\n\t    Tone.OscillatorNode.prototype.dispose = function () {\n\t        this.context.clearTimeout(this._timeout);\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this.onended = null;\n\t        this._oscillator.disconnect();\n\t        this._oscillator = null;\n\t        this._gainNode.dispose();\n\t        this._gainNode = null;\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        this.detune.dispose();\n\t        this.detune = null;\n\t        return this;\n\t    };\n\t    return Tone.OscillatorNode;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Oscillator supports a number of features including\n\t\t *         phase rotation, multiple oscillator types (see Tone.Oscillator.type),\n\t\t *         and Transport syncing (see Tone.Oscillator.syncFrequency).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Source}\n\t\t *  @param {Frequency} [frequency] Starting frequency\n\t\t *  @param {string} [type] The oscillator type. Read more about type below.\n\t\t *  @example\n\t\t * //make and start a 440hz sine tone\n\t\t * var osc = new Tone.Oscillator(440, \"sine\").toMaster().start();\n\t\t */\n\t    Tone.Oscillator = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'type'\n\t        ], Tone.Oscillator);\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  the main oscillator\n\t\t\t *  @type {OscillatorNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._oscillator = null;\n\t        /**\n\t\t\t *  The frequency control.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The detune control signal.\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t        /**\n\t\t\t *  the periodic wave\n\t\t\t *  @type {PeriodicWave}\n\t\t\t *  @private\n\t\t\t */\n\t        this._wave = null;\n\t        /**\n\t\t\t *  The partials of the oscillator\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._partials = Tone.defaultArg(options.partials, [1]);\n\t        /**\n\t\t\t *  the phase of the oscillator\n\t\t\t *  between 0 - 360\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._phase = options.phase;\n\t        /**\n\t\t\t *  the type of the oscillator\n\t\t\t *  @type {string}\n\t\t\t *  @private\n\t\t\t */\n\t        this._type = null;\n\t        //setup\n\t        this.type = options.type;\n\t        this.phase = this._phase;\n\t        this._readOnly([\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.Oscillator, Tone.Source);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Oscillator.defaults = {\n\t        'type': 'sine',\n\t        'frequency': 440,\n\t        'detune': 0,\n\t        'phase': 0,\n\t        'partials': []\n\t    };\n\t    /**\n\t\t *  The Oscillator types\n\t\t *  @enum {String}\n\t\t */\n\t    Tone.Oscillator.Type = {\n\t        Sine: 'sine',\n\t        Triangle: 'triangle',\n\t        Sawtooth: 'sawtooth',\n\t        Square: 'square',\n\t        Custom: 'custom'\n\t    };\n\t    /**\n\t\t *  start the oscillator\n\t\t *  @param  {Time} [time=now]\n\t\t *  @private\n\t\t */\n\t    Tone.Oscillator.prototype._start = function (time) {\n\t        //new oscillator with previous values\n\t        this._oscillator = new Tone.OscillatorNode();\n\t        if (this._wave) {\n\t            this._oscillator.setPeriodicWave(this._wave);\n\t        } else {\n\t            this._oscillator.type = this._type;\n\t        }\n\t        //connect the control signal to the oscillator frequency & detune\n\t        this._oscillator.connect(this.output);\n\t        this.frequency.connect(this._oscillator.frequency);\n\t        this.detune.connect(this._oscillator.detune);\n\t        //start the oscillator\n\t        time = this.toSeconds(time);\n\t        this._oscillator.start(time);\n\t    };\n\t    /**\n\t\t *  stop the oscillator\n\t\t *  @private\n\t\t *  @param  {Time} [time=now] (optional) timing parameter\n\t\t *  @returns {Tone.Oscillator} this\n\t\t */\n\t    Tone.Oscillator.prototype._stop = function (time) {\n\t        if (this._oscillator) {\n\t            time = this.toSeconds(time);\n\t            this._oscillator.stop(time);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * Restart the oscillator. Does not stop the oscillator, but instead\n\t\t * just cancels any scheduled 'stop' from being invoked.\n\t\t * @param  {Time=} time\n\t\t * @return {Tone.Oscillator}      this\n\t\t */\n\t    Tone.Oscillator.prototype.restart = function (time) {\n\t        this._oscillator.cancelStop();\n\t        this._state.cancel(this.toSeconds(time));\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Sync the signal to the Transport's bpm. Any changes to the transports bpm,\n\t\t *  will also affect the oscillators frequency.\n\t\t *  @returns {Tone.Oscillator} this\n\t\t *  @example\n\t\t * Tone.Transport.bpm.value = 120;\n\t\t * osc.frequency.value = 440;\n\t\t * //the ration between the bpm and the frequency will be maintained\n\t\t * osc.syncFrequency();\n\t\t * Tone.Transport.bpm.value = 240;\n\t\t * // the frequency of the oscillator is doubled to 880\n\t\t */\n\t    Tone.Oscillator.prototype.syncFrequency = function () {\n\t        Tone.Transport.syncSignal(this.frequency);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Unsync the oscillator's frequency from the Transport.\n\t\t *  See Tone.Oscillator.syncFrequency\n\t\t *  @returns {Tone.Oscillator} this\n\t\t */\n\t    Tone.Oscillator.prototype.unsyncFrequency = function () {\n\t        Tone.Transport.unsyncSignal(this.frequency);\n\t        return this;\n\t    };\n\t    /**\n\t\t * The type of the oscillator: either sine, square, triangle, or sawtooth. Also capable of\n\t\t * setting the first x number of partials of the oscillator. For example: \"sine4\" would\n\t\t * set be the first 4 partials of the sine wave and \"triangle8\" would set the first\n\t\t * 8 partials of the triangle wave.\n\t\t * <br><br>\n\t\t * Uses PeriodicWave internally even for native types so that it can set the phase.\n\t\t * PeriodicWave equations are from the\n\t\t * [Webkit Web Audio implementation](https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/modules/webaudio/PeriodicWave.cpp&sq=package:chromium).\n\t\t *\n\t\t * @memberOf Tone.Oscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t * @example\n\t\t * //set it to a square wave\n\t\t * osc.type = \"square\";\n\t\t * @example\n\t\t * //set the first 6 partials of a sawtooth wave\n\t\t * osc.type = \"sawtooth6\";\n\t\t */\n\t    Object.defineProperty(Tone.Oscillator.prototype, 'type', {\n\t        get: function () {\n\t            return this._type;\n\t        },\n\t        set: function (type) {\n\t            var isBasicType = [\n\t                Tone.Oscillator.Type.Sine,\n\t                Tone.Oscillator.Type.Square,\n\t                Tone.Oscillator.Type.Triangle,\n\t                Tone.Oscillator.Type.Sawtooth\n\t            ].includes(type);\n\t            if (this._phase === 0 && isBasicType) {\n\t                this._wave = null;\n\t                //just go with the basic approach\n\t                if (this._oscillator !== null) {\n\t                    this._oscillator.type === type;\n\t                }\n\t            } else {\n\t                var coefs = this._getRealImaginary(type, this._phase);\n\t                var periodicWave = this.context.createPeriodicWave(coefs[0], coefs[1]);\n\t                this._wave = periodicWave;\n\t                if (this._oscillator !== null) {\n\t                    this._oscillator.setPeriodicWave(this._wave);\n\t                }\n\t            }\n\t            this._type = type;\n\t        }\n\t    });\n\t    /**\n\t\t *  Returns the real and imaginary components based\n\t\t *  on the oscillator type.\n\t\t *  @returns {Array} [real, imaginary]\n\t\t *  @private\n\t\t */\n\t    Tone.Oscillator.prototype._getRealImaginary = function (type, phase) {\n\t        var fftSize = 4096;\n\t        var periodicWaveSize = fftSize / 2;\n\t        var real = new Float32Array(periodicWaveSize);\n\t        var imag = new Float32Array(periodicWaveSize);\n\t        var partialCount = 1;\n\t        if (type === Tone.Oscillator.Type.Custom) {\n\t            partialCount = this._partials.length + 1;\n\t            periodicWaveSize = partialCount;\n\t        } else {\n\t            var partial = /^(sine|triangle|square|sawtooth)(\\d+)$/.exec(type);\n\t            if (partial) {\n\t                partialCount = parseInt(partial[2]) + 1;\n\t                type = partial[1];\n\t                partialCount = Math.max(partialCount, 2);\n\t                periodicWaveSize = partialCount;\n\t            }\n\t        }\n\t        for (var n = 1; n < periodicWaveSize; ++n) {\n\t            var piFactor = 2 / (n * Math.PI);\n\t            var b;\n\t            switch (type) {\n\t            case Tone.Oscillator.Type.Sine:\n\t                b = n <= partialCount ? 1 : 0;\n\t                break;\n\t            case Tone.Oscillator.Type.Square:\n\t                b = n & 1 ? 2 * piFactor : 0;\n\t                break;\n\t            case Tone.Oscillator.Type.Sawtooth:\n\t                b = piFactor * (n & 1 ? 1 : -1);\n\t                break;\n\t            case Tone.Oscillator.Type.Triangle:\n\t                if (n & 1) {\n\t                    b = 2 * (piFactor * piFactor) * (n - 1 >> 1 & 1 ? -1 : 1);\n\t                } else {\n\t                    b = 0;\n\t                }\n\t                break;\n\t            case Tone.Oscillator.Type.Custom:\n\t                b = this._partials[n - 1];\n\t                break;\n\t            default:\n\t                throw new TypeError('Tone.Oscillator: invalid type: ' + type);\n\t            }\n\t            if (b !== 0) {\n\t                real[n] = -b * Math.sin(phase * n);\n\t                imag[n] = b * Math.cos(phase * n);\n\t            } else {\n\t                real[n] = 0;\n\t                imag[n] = 0;\n\t            }\n\t        }\n\t        return [\n\t            real,\n\t            imag\n\t        ];\n\t    };\n\t    /**\n\t\t *  Compute the inverse FFT for a given phase.\n\t\t *  @param  {Float32Array}  real\n\t\t *  @param  {Float32Array}  imag\n\t\t *  @param  {NormalRange}  phase\n\t\t *  @return  {AudioRange}\n\t\t *  @private\n\t\t */\n\t    Tone.Oscillator.prototype._inverseFFT = function (real, imag, phase) {\n\t        var sum = 0;\n\t        var len = real.length;\n\t        for (var i = 0; i < len; i++) {\n\t            sum += real[i] * Math.cos(i * phase) + imag[i] * Math.sin(i * phase);\n\t        }\n\t        return sum;\n\t    };\n\t    /**\n\t\t *  Returns the initial value of the oscillator.\n\t\t *  @return  {AudioRange}\n\t\t *  @private\n\t\t */\n\t    Tone.Oscillator.prototype._getInitialValue = function () {\n\t        var coefs = this._getRealImaginary(this._type, 0);\n\t        var real = coefs[0];\n\t        var imag = coefs[1];\n\t        var maxValue = 0;\n\t        var twoPi = Math.PI * 2;\n\t        //check for peaks in 8 places\n\t        for (var i = 0; i < 8; i++) {\n\t            maxValue = Math.max(this._inverseFFT(real, imag, i / 8 * twoPi), maxValue);\n\t        }\n\t        return -this._inverseFFT(real, imag, this._phase) / maxValue;\n\t    };\n\t    /**\n\t\t * The partials of the waveform. A partial represents\n\t\t * the amplitude at a harmonic. The first harmonic is the\n\t\t * fundamental frequency, the second is the octave and so on\n\t\t * following the harmonic series.\n\t\t * Setting this value will automatically set the type to \"custom\".\n\t\t * The value is an empty array when the type is not \"custom\".\n\t\t * @memberOf Tone.Oscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @example\n\t\t * osc.partials = [1, 0.2, 0.01];\n\t\t */\n\t    Object.defineProperty(Tone.Oscillator.prototype, 'partials', {\n\t        get: function () {\n\t            if (this._type !== Tone.Oscillator.Type.Custom) {\n\t                return [];\n\t            } else {\n\t                return this._partials;\n\t            }\n\t        },\n\t        set: function (partials) {\n\t            this._partials = partials;\n\t            this.type = Tone.Oscillator.Type.Custom;\n\t        }\n\t    });\n\t    /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.Oscillator#\n\t\t * @type {Degrees}\n\t\t * @name phase\n\t\t * @example\n\t\t * osc.phase = 180; //flips the phase of the oscillator\n\t\t */\n\t    Object.defineProperty(Tone.Oscillator.prototype, 'phase', {\n\t        get: function () {\n\t            return this._phase * (180 / Math.PI);\n\t        },\n\t        set: function (phase) {\n\t            this._phase = phase * Math.PI / 180;\n\t            //reset the type\n\t            this.type = this._type;\n\t        }\n\t    });\n\t    /**\n\t\t *  Dispose and disconnect.\n\t\t *  @return {Tone.Oscillator} this\n\t\t */\n\t    Tone.Oscillator.prototype.dispose = function () {\n\t        Tone.Source.prototype.dispose.call(this);\n\t        if (this._oscillator !== null) {\n\t            this._oscillator.dispose();\n\t            this._oscillator = null;\n\t        }\n\t        this._wave = null;\n\t        this._writable([\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        this.detune.dispose();\n\t        this.detune = null;\n\t        this._partials = null;\n\t        return this;\n\t    };\n\t    return Tone.Oscillator;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class AudioToGain converts an input in AudioRange [-1,1] to NormalRange [0,1]. \n\t\t *         See Tone.GainToAudio.\n\t\t *\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @constructor\n\t\t *  @example\n\t\t *  var a2g = new Tone.AudioToGain();\n\t\t */\n\t    Tone.AudioToGain = function () {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  @type {WaveShaperNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._norm = this.input = this.output = new Tone.WaveShaper(function (x) {\n\t            return (x + 1) / 2;\n\t        });\n\t    };\n\t    Tone.extend(Tone.AudioToGain, Tone.SignalBase);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.AudioToGain} this\n\t\t */\n\t    Tone.AudioToGain.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._norm.dispose();\n\t        this._norm = null;\n\t        return this;\n\t    };\n\t    return Tone.AudioToGain;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.Zero outputs 0's at audio-rate. The reason this has to be\n\t\t *         it's own class is that many browsers optimize out Tone.Signal\n\t\t *         with a value of 0 and will not process nodes further down the graph.\n\t\t *  @extends {Tone.SignalBase}\n\t\t */\n\t    Tone.Zero = function () {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  The gain node\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._gain = this.input = this.output = new Tone.Gain();\n\t        this.context.getConstant(0).connect(this._gain);\n\t    };\n\t    Tone.extend(Tone.Zero, Tone.SignalBase);\n\t    /**\n\t\t *  clean up\n\t\t *  @return  {Tone.Zero}  this\n\t\t */\n\t    Tone.Zero.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._gain.dispose();\n\t        this._gain = null;\n\t        return this;\n\t    };\n\t    return Tone.Zero;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  LFO stands for low frequency oscillator. Tone.LFO produces an output signal\n\t\t *          which can be attached to an AudioParam or Tone.Signal\n\t\t *          in order to modulate that parameter with an oscillator. The LFO can\n\t\t *          also be synced to the transport to start/stop and change when the tempo changes.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Frequency|Object} [frequency] The frequency of the oscillation. Typically, LFOs will be\n\t\t *                               in the frequency range of 0.1 to 10 hertz.\n\t\t *  @param {number=} min The minimum output value of the LFO.\n\t\t *  @param {number=} max The maximum value of the LFO.\n\t\t *  @example\n\t\t * var lfo = new Tone.LFO(\"4n\", 400, 4000);\n\t\t * lfo.connect(filter.frequency);\n\t\t */\n\t    Tone.LFO = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'min',\n\t            'max'\n\t        ], Tone.LFO);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The oscillator.\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t *  @private\n\t\t\t */\n\t        this._oscillator = new Tone.Oscillator({\n\t            'frequency': options.frequency,\n\t            'type': options.type\n\t        });\n\t        /**\n\t\t\t *  the lfo's frequency\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = this._oscillator.frequency;\n\t        /**\n\t\t\t * The amplitude of the LFO, which controls the output range between\n\t\t\t * the min and max output. For example if the min is -10 and the max\n\t\t\t * is 10, setting the amplitude to 0.5 would make the LFO modulate\n\t\t\t * between -5 and 5.\n\t\t\t * @type {Number}\n\t\t\t * @signal\n\t\t\t */\n\t        this.amplitude = this._oscillator.volume;\n\t        this.amplitude.units = Tone.Type.NormalRange;\n\t        this.amplitude.value = options.amplitude;\n\t        /**\n\t\t\t *  The signal which is output when the LFO is stopped\n\t\t\t *  @type  {Tone.Signal}\n\t\t\t *  @private\n\t\t\t */\n\t        this._stoppedSignal = new Tone.Signal(0, Tone.Type.AudioRange);\n\t        /**\n\t\t\t *  Just outputs zeros.\n\t\t\t *  @type {Tone.Zero}\n\t\t\t *  @private\n\t\t\t */\n\t        this._zeros = new Tone.Zero();\n\t        /**\n\t\t\t *  The value that the LFO outputs when it's stopped\n\t\t\t *  @type {AudioRange}\n\t\t\t *  @private\n\t\t\t */\n\t        this._stoppedValue = 0;\n\t        /**\n\t\t\t *  @type {Tone.AudioToGain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._a2g = new Tone.AudioToGain();\n\t        /**\n\t\t\t *  @type {Tone.Scale}\n\t\t\t *  @private\n\t\t\t */\n\t        this._scaler = this.output = new Tone.Scale(options.min, options.max);\n\t        /**\n\t\t\t *  the units of the LFO (used for converting)\n\t\t\t *  @type {Tone.Type}\n\t\t\t *  @private\n\t\t\t */\n\t        this._units = Tone.Type.Default;\n\t        this.units = options.units;\n\t        //connect it up\n\t        this._oscillator.chain(this._a2g, this._scaler);\n\t        this._zeros.connect(this._a2g);\n\t        this._stoppedSignal.connect(this._a2g);\n\t        this._readOnly([\n\t            'amplitude',\n\t            'frequency'\n\t        ]);\n\t        this.phase = options.phase;\n\t    };\n\t    Tone.extend(Tone.LFO, Tone.AudioNode);\n\t    /**\n\t\t *  the default parameters\n\t\t *\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.LFO.defaults = {\n\t        'type': 'sine',\n\t        'min': 0,\n\t        'max': 1,\n\t        'phase': 0,\n\t        'frequency': '4n',\n\t        'amplitude': 1,\n\t        'units': Tone.Type.Default\n\t    };\n\t    /**\n\t\t *  Start the LFO.\n\t\t *  @param  {Time} [time=now] the time the LFO will start\n\t\t *  @returns {Tone.LFO} this\n\t\t */\n\t    Tone.LFO.prototype.start = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._stoppedSignal.setValueAtTime(0, time);\n\t        this._oscillator.start(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Stop the LFO.\n\t\t *  @param  {Time} [time=now] the time the LFO will stop\n\t\t *  @returns {Tone.LFO} this\n\t\t */\n\t    Tone.LFO.prototype.stop = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._stoppedSignal.setValueAtTime(this._stoppedValue, time);\n\t        this._oscillator.stop(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Sync the start/stop/pause to the transport\n\t\t *  and the frequency to the bpm of the transport\n\t\t *  @returns {Tone.LFO} this\n\t\t *  @example\n\t\t *  lfo.frequency.value = \"8n\";\n\t\t *  lfo.sync().start(0)\n\t\t *  //the rate of the LFO will always be an eighth note,\n\t\t *  //even as the tempo changes\n\t\t */\n\t    Tone.LFO.prototype.sync = function () {\n\t        this._oscillator.sync();\n\t        this._oscillator.syncFrequency();\n\t        return this;\n\t    };\n\t    /**\n\t\t *  unsync the LFO from transport control\n\t\t *  @returns {Tone.LFO} this\n\t\t */\n\t    Tone.LFO.prototype.unsync = function () {\n\t        this._oscillator.unsync();\n\t        this._oscillator.unsyncFrequency();\n\t        return this;\n\t    };\n\t    /**\n\t\t * The miniumum output of the LFO.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {number}\n\t\t * @name min\n\t\t */\n\t    Object.defineProperty(Tone.LFO.prototype, 'min', {\n\t        get: function () {\n\t            return this._toUnits(this._scaler.min);\n\t        },\n\t        set: function (min) {\n\t            min = this._fromUnits(min);\n\t            this._scaler.min = min;\n\t        }\n\t    });\n\t    /**\n\t\t * The maximum output of the LFO.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {number}\n\t\t * @name max\n\t\t */\n\t    Object.defineProperty(Tone.LFO.prototype, 'max', {\n\t        get: function () {\n\t            return this._toUnits(this._scaler.max);\n\t        },\n\t        set: function (max) {\n\t            max = this._fromUnits(max);\n\t            this._scaler.max = max;\n\t        }\n\t    });\n\t    /**\n\t\t * The type of the oscillator: sine, square, sawtooth, triangle.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.LFO.prototype, 'type', {\n\t        get: function () {\n\t            return this._oscillator.type;\n\t        },\n\t        set: function (type) {\n\t            this._oscillator.type = type;\n\t            this._stoppedValue = this._oscillator._getInitialValue();\n\t            this._stoppedSignal.value = this._stoppedValue;\n\t        }\n\t    });\n\t    /**\n\t\t * The phase of the LFO.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {number}\n\t\t * @name phase\n\t\t */\n\t    Object.defineProperty(Tone.LFO.prototype, 'phase', {\n\t        get: function () {\n\t            return this._oscillator.phase;\n\t        },\n\t        set: function (phase) {\n\t            this._oscillator.phase = phase;\n\t            this._stoppedValue = this._oscillator._getInitialValue();\n\t            this._stoppedSignal.value = this._stoppedValue;\n\t        }\n\t    });\n\t    /**\n\t\t * The output units of the LFO.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {Tone.Type}\n\t\t * @name units\n\t\t */\n\t    Object.defineProperty(Tone.LFO.prototype, 'units', {\n\t        get: function () {\n\t            return this._units;\n\t        },\n\t        set: function (val) {\n\t            var currentMin = this.min;\n\t            var currentMax = this.max;\n\t            //convert the min and the max\n\t            this._units = val;\n\t            this.min = currentMin;\n\t            this.max = currentMax;\n\t        }\n\t    });\n\t    /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {Boolean}\n\t\t * @name mute\n\t\t */\n\t    Object.defineProperty(Tone.LFO.prototype, 'mute', {\n\t        get: function () {\n\t            return this._oscillator.mute;\n\t        },\n\t        set: function (mute) {\n\t            this._oscillator.mute = mute;\n\t        }\n\t    });\n\t    /**\n\t\t *  Returns the playback state of the source, either \"started\" or \"stopped\".\n\t\t *  @type {Tone.State}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.LFO#\n\t\t *  @name state\n\t\t */\n\t    Object.defineProperty(Tone.LFO.prototype, 'state', {\n\t        get: function () {\n\t            return this._oscillator.state;\n\t        }\n\t    });\n\t    /**\n\t\t *  Connect the output of the LFO to an AudioParam, AudioNode, or Tone Node.\n\t\t *  Tone.LFO will automatically convert to the destination units of the\n\t\t *  will get the units from the connected node.\n\t\t *  @param  {Tone | AudioParam | AudioNode} node\n\t\t *  @param {number} [outputNum=0] optionally which output to connect from\n\t\t *  @param {number} [inputNum=0] optionally which input to connect to\n\t\t *  @returns {Tone.LFO} this\n\t\t *  @private\n\t\t */\n\t    Tone.LFO.prototype.connect = function (node) {\n\t        if (node.constructor === Tone.Signal || node.constructor === Tone.Param) {\n\t            this.convert = node.convert;\n\t            this.units = node.units;\n\t        }\n\t        Tone.SignalBase.prototype.connect.apply(this, arguments);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  private method borrowed from Param converts\n\t\t *  units from their destination value\n\t\t *  @function\n\t\t *  @private\n\t\t */\n\t    Tone.LFO.prototype._fromUnits = Tone.Param.prototype._fromUnits;\n\t    /**\n\t\t *  private method borrowed from Param converts\n\t\t *  units to their destination value\n\t\t *  @function\n\t\t *  @private\n\t\t */\n\t    Tone.LFO.prototype._toUnits = Tone.Param.prototype._toUnits;\n\t    /**\n\t\t *  disconnect and dispose\n\t\t *  @returns {Tone.LFO} this\n\t\t */\n\t    Tone.LFO.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable([\n\t            'amplitude',\n\t            'frequency'\n\t        ]);\n\t        this._oscillator.dispose();\n\t        this._oscillator = null;\n\t        this._stoppedSignal.dispose();\n\t        this._stoppedSignal = null;\n\t        this._zeros.dispose();\n\t        this._zeros = null;\n\t        this._scaler.dispose();\n\t        this._scaler = null;\n\t        this._a2g.dispose();\n\t        this._a2g = null;\n\t        this.frequency = null;\n\t        this.amplitude = null;\n\t        return this;\n\t    };\n\t    return Tone.LFO;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Limiter will limit the loudness of an incoming signal.\n\t\t *         It is composed of a Tone.Compressor with a fast attack\n\t\t *         and release. Limiters are commonly used to safeguard against\n\t\t *         signal clipping. Unlike a compressor, limiters do not provide\n\t\t *         smooth gain reduction and almost completely prevent\n\t\t *         additional gain above the threshold.\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t *  @param {number} threshold The theshold above which the limiting is applied.\n\t\t *  @example\n\t\t *  var limiter = new Tone.Limiter(-6);\n\t\t */\n\t    Tone.Limiter = function () {\n\t        var options = Tone.defaults(arguments, ['threshold'], Tone.Limiter);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  the compressor\n\t\t\t *  @private\n\t\t\t *  @type {Tone.Compressor}\n\t\t\t */\n\t        this._compressor = this.input = this.output = new Tone.Compressor({\n\t            'attack': 0.001,\n\t            'decay': 0.001,\n\t            'threshold': options.threshold\n\t        });\n\t        /**\n\t\t\t * The threshold of of the limiter\n\t\t\t * @type {Decibel}\n\t\t\t * @signal\n\t\t\t */\n\t        this.threshold = this._compressor.threshold;\n\t        this._readOnly('threshold');\n\t    };\n\t    Tone.extend(Tone.Limiter, Tone.AudioNode);\n\t    /**\n\t\t *  The default value\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t *  @static\n\t\t */\n\t    Tone.Limiter.defaults = { 'threshold': -12 };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Limiter} this\n\t\t */\n\t    Tone.Limiter.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._compressor.dispose();\n\t        this._compressor = null;\n\t        this._writable('threshold');\n\t        this.threshold = null;\n\t        return this;\n\t    };\n\t    return Tone.Limiter;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Lowpass is a lowpass feedback comb filter. It is similar to\n\t\t *         Tone.FeedbackCombFilter, but includes a lowpass filter.\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t *  @param {Time|Object} [delayTime] The delay time of the comb filter\n\t\t *  @param {NormalRange=} resonance The resonance (feedback) of the comb filter\n\t\t *  @param {Frequency=} dampening The cutoff of the lowpass filter dampens the\n\t\t *                                signal as it is fedback.\n\t\t */\n\t    Tone.LowpassCombFilter = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'delayTime',\n\t            'resonance',\n\t            'dampening'\n\t        ], Tone.LowpassCombFilter);\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(1, 1);\n\t        /**\n\t\t\t *  the delay node\n\t\t\t *  @type {DelayNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delay = this.input = new Tone.Delay(options.delayTime);\n\t        /**\n\t\t\t *  The delayTime of the comb filter.\n\t\t\t *  @type {Time}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.delayTime = this._delay.delayTime;\n\t        /**\n\t\t\t *  the lowpass filter\n\t\t\t *  @type  {BiquadFilterNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lowpass = this.output = this.context.createBiquadFilter();\n\t        this._lowpass.Q.value = -3.0102999566398125;\n\t        this._lowpass.type = 'lowpass';\n\t        /**\n\t\t\t *  The dampening control of the feedback\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.dampening = new Tone.Param({\n\t            'param': this._lowpass.frequency,\n\t            'units': Tone.Type.Frequency,\n\t            'value': options.dampening\n\t        });\n\t        /**\n\t\t\t *  the feedback gain\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._feedback = new Tone.Gain(options.resonance, Tone.Type.NormalRange);\n\t        /**\n\t\t\t *  The amount of feedback of the delayed signal.\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.resonance = this._feedback.gain;\n\t        //connections\n\t        this._delay.chain(this._lowpass, this._feedback, this._delay);\n\t        this._readOnly([\n\t            'dampening',\n\t            'resonance',\n\t            'delayTime'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.LowpassCombFilter, Tone.AudioNode);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.LowpassCombFilter.defaults = {\n\t        'delayTime': 0.1,\n\t        'resonance': 0.5,\n\t        'dampening': 3000\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.LowpassCombFilter} this\n\t\t */\n\t    Tone.LowpassCombFilter.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable([\n\t            'dampening',\n\t            'resonance',\n\t            'delayTime'\n\t        ]);\n\t        this.dampening.dispose();\n\t        this.dampening = null;\n\t        this.resonance.dispose();\n\t        this.resonance = null;\n\t        this._delay.dispose();\n\t        this._delay = null;\n\t        this.delayTime = null;\n\t        this._lowpass.disconnect();\n\t        this._lowpass = null;\n\t        this._feedback.disconnect();\n\t        this._feedback = null;\n\t        return this;\n\t    };\n\t    return Tone.LowpassCombFilter;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Merge brings two signals into the left and right\n\t\t *          channels of a single stereo channel.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @example\n\t\t * var merge = new Tone.Merge().toMaster();\n\t\t * //routing a sine tone in the left channel\n\t\t * //and noise in the right channel\n\t\t * var osc = new Tone.Oscillator().connect(merge.left);\n\t\t * var noise = new Tone.Noise().connect(merge.right);\n\t\t * //starting our oscillators\n\t\t * noise.start();\n\t\t * osc.start();\n\t\t */\n\t    Tone.Merge = function () {\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(2, 0);\n\t        /**\n\t\t\t *  The left input channel.\n\t\t\t *  Alias for <code>input[0]</code>\n\t\t\t *  @type {GainNode}\n\t\t\t */\n\t        this.left = this.input[0] = new Tone.Gain();\n\t        /**\n\t\t\t *  The right input channel.\n\t\t\t *  Alias for <code>input[1]</code>.\n\t\t\t *  @type {GainNode}\n\t\t\t */\n\t        this.right = this.input[1] = new Tone.Gain();\n\t        /**\n\t\t\t *  the merger node for the two channels\n\t\t\t *  @type {ChannelMergerNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._merger = this.output = this.context.createChannelMerger(2);\n\t        //connections\n\t        this.left.connect(this._merger, 0, 0);\n\t        this.right.connect(this._merger, 0, 1);\n\t        this.left.channelCount = 1;\n\t        this.right.channelCount = 1;\n\t        this.left.channelCountMode = 'explicit';\n\t        this.right.channelCountMode = 'explicit';\n\t    };\n\t    Tone.extend(Tone.Merge, Tone.AudioNode);\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Merge} this\n\t\t */\n\t    Tone.Merge.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this.left.dispose();\n\t        this.left = null;\n\t        this.right.dispose();\n\t        this.right = null;\n\t        this._merger.disconnect();\n\t        this._merger = null;\n\t        return this;\n\t    };\n\t    return Tone.Merge;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Meter gets the [RMS](https://en.wikipedia.org/wiki/Root_mean_square)\n\t\t *          of an input signal with some averaging applied. It can also get the raw\n\t\t *          value of the input signal.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Number} smoothing The amount of smoothing applied between frames.\n\t\t *  @example\n\t\t * var meter = new Tone.Meter();\n\t\t * var mic = new Tone.UserMedia().open();\n\t\t * //connect mic to the meter\n\t\t * mic.connect(meter);\n\t\t * //the current level of the mic input in decibels\n\t\t * var level = meter.getValue();\n\t\t */\n\t    Tone.Meter = function () {\n\t        var options = Tone.defaults(arguments, ['smoothing'], Tone.Meter);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The analyser node which computes the levels.\n\t\t\t *  @private\n\t\t\t *  @type  {Tone.Analyser}\n\t\t\t */\n\t        this.input = this.output = this._analyser = new Tone.Analyser('waveform', 1024);\n\t        /**\n\t\t\t *  The amount of carryover between the current and last frame.\n\t\t\t *  Only applied meter for \"level\" type.\n\t\t\t *  @type  {Number}\n\t\t\t */\n\t        this.smoothing = options.smoothing;\n\t    };\n\t    Tone.extend(Tone.Meter, Tone.AudioNode);\n\t    /**\n\t\t *  The defaults\n\t\t *  @type {Object}\n\t\t *  @static\n\t\t *  @const\n\t\t */\n\t    Tone.Meter.defaults = { 'smoothing': 0.8 };\n\t    /**\n\t\t *  Get the current decibel value of the incoming signal\n\t\t *  @returns {Decibels}\n\t\t */\n\t    Tone.Meter.prototype.getLevel = function () {\n\t        this._analyser.type = 'fft';\n\t        var values = this._analyser.getValue();\n\t        var offset = 28;\n\t        // normalizes most signal levels\n\t        // TODO: compute loudness from FFT\n\t        return Math.max.apply(this, values) + offset;\n\t    };\n\t    /**\n\t\t *  Get the signal value of the incoming signal\n\t\t *  @returns {Number}\n\t\t */\n\t    Tone.Meter.prototype.getValue = function () {\n\t        this._analyser.type = 'waveform';\n\t        var value = this._analyser.getValue();\n\t        return value[0];\n\t    };\n\t    /**\n\t\t * A value from 0 -> 1 where 0 represents no time averaging with the last analysis frame.\n\t\t * @memberOf Tone.Meter#\n\t\t * @type {Number}\n\t\t * @name smoothing\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Meter.prototype, 'smoothing', {\n\t        get: function () {\n\t            return this._analyser.smoothing;\n\t        },\n\t        set: function (val) {\n\t            this._analyser.smoothing = val;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Meter} this\n\t\t */\n\t    Tone.Meter.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._analyser.dispose();\n\t        this._analyser = null;\n\t        return this;\n\t    };\n\t    return Tone.Meter;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *\t@class  Tone.Split splits an incoming signal into left and right channels.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @example\n\t\t * var split = new Tone.Split();\n\t\t * stereoSignal.connect(split);\n\t\t */\n\t    Tone.Split = function () {\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(0, 2);\n\t        /**\n\t\t\t *  @type {ChannelSplitterNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._splitter = this.input = this.context.createChannelSplitter(2);\n\t        this._splitter.channelCount = 2;\n\t        this._splitter.channelCountMode = 'explicit';\n\t        /**\n\t\t\t *  Left channel output.\n\t\t\t *  Alias for <code>output[0]</code>\n\t\t\t *  @type {Tone.Gain}\n\t\t\t */\n\t        this.left = this.output[0] = new Tone.Gain();\n\t        /**\n\t\t\t *  Right channel output.\n\t\t\t *  Alias for <code>output[1]</code>\n\t\t\t *  @type {Tone.Gain}\n\t\t\t */\n\t        this.right = this.output[1] = new Tone.Gain();\n\t        //connections\n\t        this._splitter.connect(this.left, 0, 0);\n\t        this._splitter.connect(this.right, 1, 0);\n\t    };\n\t    Tone.extend(Tone.Split, Tone.AudioNode);\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Split} this\n\t\t */\n\t    Tone.Split.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._splitter.disconnect();\n\t        this.left.dispose();\n\t        this.left = null;\n\t        this.right.dispose();\n\t        this.right = null;\n\t        this._splitter = null;\n\t        return this;\n\t    };\n\t    return Tone.Split;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Mid/Side processing separates the the 'mid' signal\n\t\t *         (which comes out of both the left and the right channel)\n\t\t *         and the 'side' (which only comes out of the the side channels). <br><br>\n\t\t *         <code>\n\t\t *         Mid = (Left+Right)/sqrt(2);   // obtain mid-signal from left and right<br>\n\t\t *         Side = (Left-Right)/sqrt(2);   // obtain side-signal from left and righ<br>\n\t\t *         </code>\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t */\n\t    Tone.MidSideSplit = function () {\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(0, 2);\n\t        /**\n\t\t\t *  split the incoming signal into left and right channels\n\t\t\t *  @type  {Tone.Split}\n\t\t\t *  @private\n\t\t\t */\n\t        this._split = this.input = new Tone.Split();\n\t        /**\n\t\t\t *  The mid send. Connect to mid processing. Alias for\n\t\t\t *  <code>output[0]</code>\n\t\t\t *  @type {Tone.Add}\n\t\t\t */\n\t        this._midAdd = new Tone.Add();\n\t        /**\n\t\t\t * Multiply the _midAdd by sqrt(1/2)\n\t\t\t * @type {Tone.Multiply}\n\t\t\t */\n\t        this.mid = this.output[0] = new Tone.Multiply(Math.SQRT1_2);\n\t        /**\n\t\t\t *  The side output. Connect to side processing. Also Output 1\n\t\t\t *  @type {Tone.Subtract}\n\t\t\t */\n\t        this._sideSubtract = new Tone.Subtract();\n\t        /**\n\t\t\t * Multiply the _midAdd by sqrt(1/2)\n\t\t\t * @type {Tone.Multiply}\n\t\t\t */\n\t        this.side = this.output[1] = new Tone.Multiply(Math.SQRT1_2);\n\t        this._split.connect(this._midAdd, 0, 0);\n\t        this._split.connect(this._midAdd, 1, 1);\n\t        this._split.connect(this._sideSubtract, 0, 0);\n\t        this._split.connect(this._sideSubtract, 1, 1);\n\t        this._midAdd.connect(this.mid);\n\t        this._sideSubtract.connect(this.side);\n\t    };\n\t    Tone.extend(Tone.MidSideSplit, Tone.AudioNode);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.MidSideSplit} this\n\t\t */\n\t    Tone.MidSideSplit.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this.mid.dispose();\n\t        this.mid = null;\n\t        this.side.dispose();\n\t        this.side = null;\n\t        this._midAdd.dispose();\n\t        this._midAdd = null;\n\t        this._sideSubtract.dispose();\n\t        this._sideSubtract = null;\n\t        this._split.dispose();\n\t        this._split = null;\n\t        return this;\n\t    };\n\t    return Tone.MidSideSplit;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Mid/Side processing separates the the 'mid' signal\n\t\t *         (which comes out of both the left and the right channel)\n\t\t *         and the 'side' (which only comes out of the the side channels).\n\t\t *         MidSideMerge merges the mid and side signal after they've been seperated\n\t\t *         by Tone.MidSideSplit.<br><br>\n\t\t *         <code>\n\t\t *         Left = (Mid+Side)/sqrt(2);   // obtain left signal from mid and side<br>\n\t\t *         Right = (Mid-Side)/sqrt(2);   // obtain right signal from mid and side<br>\n\t\t *         </code>\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t */\n\t    Tone.MidSideMerge = function () {\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(2, 0);\n\t        /**\n\t\t\t *  The mid signal input. Alias for\n\t\t\t *  <code>input[0]</code>\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t */\n\t        this.mid = this.input[0] = new Tone.Gain();\n\t        /**\n\t\t\t *  recombine the mid/side into Left\n\t\t\t *  @type {Tone.Add}\n\t\t\t *  @private\n\t\t\t */\n\t        this._left = new Tone.Add();\n\t        /**\n\t\t\t * Multiply the left by sqrt(1/2)\n\t\t\t * @type {Tone.Multiply}\n\t\t\t */\n\t        this._timesTwoLeft = new Tone.Multiply(Math.SQRT1_2);\n\t        /**\n\t\t\t *  The side signal input. Alias for\n\t\t\t *  <code>input[1]</code>\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t */\n\t        this.side = this.input[1] = new Tone.Gain();\n\t        /**\n\t\t\t *  recombine the mid/side into Right\n\t\t\t *  @type {Tone.Subtract}\n\t\t\t *  @private\n\t\t\t */\n\t        this._right = new Tone.Subtract();\n\t        /**\n\t\t\t * Multiply the right by sqrt(1/2)\n\t\t\t * @type {Tone.Multiply}\n\t\t\t */\n\t        this._timesTwoRight = new Tone.Multiply(Math.SQRT1_2);\n\t        /**\n\t\t\t *  Merge the left/right signal back into a stereo signal.\n\t\t\t *  @type {Tone.Merge}\n\t\t\t *  @private\n\t\t\t */\n\t        this._merge = this.output = new Tone.Merge();\n\t        this.mid.connect(this._left, 0, 0);\n\t        this.side.connect(this._left, 0, 1);\n\t        this.mid.connect(this._right, 0, 0);\n\t        this.side.connect(this._right, 0, 1);\n\t        this._left.connect(this._timesTwoLeft);\n\t        this._right.connect(this._timesTwoRight);\n\t        this._timesTwoLeft.connect(this._merge, 0, 0);\n\t        this._timesTwoRight.connect(this._merge, 0, 1);\n\t    };\n\t    Tone.extend(Tone.MidSideMerge, Tone.AudioNode);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.MidSideMerge} this\n\t\t */\n\t    Tone.MidSideMerge.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this.mid.dispose();\n\t        this.mid = null;\n\t        this.side.dispose();\n\t        this.side = null;\n\t        this._left.dispose();\n\t        this._left = null;\n\t        this._timesTwoLeft.dispose();\n\t        this._timesTwoLeft = null;\n\t        this._right.dispose();\n\t        this._right = null;\n\t        this._timesTwoRight.dispose();\n\t        this._timesTwoRight = null;\n\t        this._merge.dispose();\n\t        this._merge = null;\n\t        return this;\n\t    };\n\t    return Tone.MidSideMerge;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.MidSideCompressor applies two different compressors to the mid\n\t\t *         and side signal components. See Tone.MidSideSplit.\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Object} options The options that are passed to the mid and side\n\t\t *                          compressors.\n\t\t *  @constructor\n\t\t */\n\t    Tone.MidSideCompressor = function (options) {\n\t        Tone.AudioNode.call(this);\n\t        options = Tone.defaultArg(options, Tone.MidSideCompressor.defaults);\n\t        /**\n\t\t\t *  the mid/side split\n\t\t\t *  @type  {Tone.MidSideSplit}\n\t\t\t *  @private\n\t\t\t */\n\t        this._midSideSplit = this.input = new Tone.MidSideSplit();\n\t        /**\n\t\t\t *  the mid/side recombination\n\t\t\t *  @type  {Tone.MidSideMerge}\n\t\t\t *  @private\n\t\t\t */\n\t        this._midSideMerge = this.output = new Tone.MidSideMerge();\n\t        /**\n\t\t\t *  The compressor applied to the mid signal\n\t\t\t *  @type  {Tone.Compressor}\n\t\t\t */\n\t        this.mid = new Tone.Compressor(options.mid);\n\t        /**\n\t\t\t *  The compressor applied to the side signal\n\t\t\t *  @type  {Tone.Compressor}\n\t\t\t */\n\t        this.side = new Tone.Compressor(options.side);\n\t        this._midSideSplit.mid.chain(this.mid, this._midSideMerge.mid);\n\t        this._midSideSplit.side.chain(this.side, this._midSideMerge.side);\n\t        this._readOnly([\n\t            'mid',\n\t            'side'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.MidSideCompressor, Tone.AudioNode);\n\t    /**\n\t\t *  @const\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.MidSideCompressor.defaults = {\n\t        'mid': {\n\t            'ratio': 3,\n\t            'threshold': -24,\n\t            'release': 0.03,\n\t            'attack': 0.02,\n\t            'knee': 16\n\t        },\n\t        'side': {\n\t            'ratio': 6,\n\t            'threshold': -30,\n\t            'release': 0.25,\n\t            'attack': 0.03,\n\t            'knee': 10\n\t        }\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.MidSideCompressor} this\n\t\t */\n\t    Tone.MidSideCompressor.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable([\n\t            'mid',\n\t            'side'\n\t        ]);\n\t        this.mid.dispose();\n\t        this.mid = null;\n\t        this.side.dispose();\n\t        this.side = null;\n\t        this._midSideSplit.dispose();\n\t        this._midSideSplit = null;\n\t        this._midSideMerge.dispose();\n\t        this._midSideMerge = null;\n\t        return this;\n\t    };\n\t    return Tone.MidSideCompressor;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Mono coerces the incoming mono or stereo signal into a mono signal\n\t\t *         where both left and right channels have the same value. This can be useful\n\t\t *         for [stereo imaging](https://en.wikipedia.org/wiki/Stereo_imaging).\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t */\n\t    Tone.Mono = function () {\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(1, 0);\n\t        /**\n\t\t\t *  merge the signal\n\t\t\t *  @type {Tone.Merge}\n\t\t\t *  @private\n\t\t\t */\n\t        this._merge = this.output = new Tone.Merge();\n\t        this.input.connect(this._merge, 0, 0);\n\t        this.input.connect(this._merge, 0, 1);\n\t    };\n\t    Tone.extend(Tone.Mono, Tone.AudioNode);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Mono} this\n\t\t */\n\t    Tone.Mono.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._merge.dispose();\n\t        this._merge = null;\n\t        return this;\n\t    };\n\t    return Tone.Mono;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class A compressor with seperate controls over low/mid/high dynamics\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t *  @param {Object} options The low/mid/high compressor settings.\n\t\t *  @example\n\t\t *  var multiband = new Tone.MultibandCompressor({\n\t\t *  \t\"lowFrequency\" : 200,\n\t\t *  \t\"highFrequency\" : 1300\n\t\t *  \t\"low\" : {\n\t\t *  \t\t\"threshold\" : -12\n\t\t *  \t}\n\t\t *  })\n\t\t */\n\t    Tone.MultibandCompressor = function (options) {\n\t        Tone.AudioNode.call(this);\n\t        options = Tone.defaultArg(arguments, Tone.MultibandCompressor.defaults);\n\t        /**\n\t\t\t *  split the incoming signal into high/mid/low\n\t\t\t *  @type {Tone.MultibandSplit}\n\t\t\t *  @private\n\t\t\t */\n\t        this._splitter = this.input = new Tone.MultibandSplit({\n\t            'lowFrequency': options.lowFrequency,\n\t            'highFrequency': options.highFrequency\n\t        });\n\t        /**\n\t\t\t *  low/mid crossover frequency.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.lowFrequency = this._splitter.lowFrequency;\n\t        /**\n\t\t\t *  mid/high crossover frequency.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.highFrequency = this._splitter.highFrequency;\n\t        /**\n\t\t\t *  the output\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this.output = new Tone.Gain();\n\t        /**\n\t\t\t *  The compressor applied to the low frequencies.\n\t\t\t *  @type {Tone.Compressor}\n\t\t\t */\n\t        this.low = new Tone.Compressor(options.low);\n\t        /**\n\t\t\t *  The compressor applied to the mid frequencies.\n\t\t\t *  @type {Tone.Compressor}\n\t\t\t */\n\t        this.mid = new Tone.Compressor(options.mid);\n\t        /**\n\t\t\t *  The compressor applied to the high frequencies.\n\t\t\t *  @type {Tone.Compressor}\n\t\t\t */\n\t        this.high = new Tone.Compressor(options.high);\n\t        //connect the compressor\n\t        this._splitter.low.chain(this.low, this.output);\n\t        this._splitter.mid.chain(this.mid, this.output);\n\t        this._splitter.high.chain(this.high, this.output);\n\t        this._readOnly([\n\t            'high',\n\t            'mid',\n\t            'low',\n\t            'highFrequency',\n\t            'lowFrequency'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.MultibandCompressor, Tone.AudioNode);\n\t    /**\n\t\t *  @const\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.MultibandCompressor.defaults = {\n\t        'low': Tone.Compressor.defaults,\n\t        'mid': Tone.Compressor.defaults,\n\t        'high': Tone.Compressor.defaults,\n\t        'lowFrequency': 250,\n\t        'highFrequency': 2000\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.MultibandCompressor} this\n\t\t */\n\t    Tone.MultibandCompressor.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._splitter.dispose();\n\t        this._writable([\n\t            'high',\n\t            'mid',\n\t            'low',\n\t            'highFrequency',\n\t            'lowFrequency'\n\t        ]);\n\t        this.low.dispose();\n\t        this.mid.dispose();\n\t        this.high.dispose();\n\t        this._splitter = null;\n\t        this.low = null;\n\t        this.mid = null;\n\t        this.high = null;\n\t        this.lowFrequency = null;\n\t        this.highFrequency = null;\n\t        return this;\n\t    };\n\t    return Tone.MultibandCompressor;\n\t});\n\tModule(function (Tone) {\n\t    if (Tone.supported && !window.StereoPannerNode) {\n\t        /**\n\t\t\t * @class Shimmed StereoPannerNode\n\t\t\t * @param  {AudioContext} context\n\t\t\t * @private\n\t\t\t */\n\t        var StereoPannerNode = function (context) {\n\t            /**\n\t\t\t\t * The audio context\n\t\t\t\t * @type {AudioContext}\n\t\t\t\t */\n\t            this.context = context;\n\t            /**\n\t\t\t\t * The left/right panning. [-1, 1]\n\t\t\t\t * @type {AudioRange}\n\t\t\t\t * @signal\n\t\t\t\t */\n\t            this.pan = new Tone.Signal(0, Tone.Type.AudioRange);\n\t            /**\n\t\t\t\t * Equal power scaling of the right gain\n\t\t\t\t * @type {Tone.WaveShaper}\n\t\t\t\t */\n\t            var rightWaveShaper = new Tone.WaveShaper(function (val) {\n\t                return Tone.equalPowerScale((val + 1) / 2);\n\t            }, 4096);\n\t            /**\n\t\t\t\t * Equal power scaling of the left gain\n\t\t\t\t * @type {Tone.WaveShaper}\n\t\t\t\t * @private\n\t\t\t\t */\n\t            var leftWaveShaper = new Tone.WaveShaper(function (val) {\n\t                return Tone.equalPowerScale(1 - (val + 1) / 2);\n\t            }, 4096);\n\t            /**\n\t\t\t\t * The left gain value\n\t\t\t\t * @type {Tone.Gain}\n\t\t\t\t * @private\n\t\t\t\t */\n\t            var leftGain = new Tone.Gain();\n\t            /**\n\t\t\t\t * The right gain value\n\t\t\t\t * @type {Tone.Gain}\n\t\t\t\t * @private\n\t\t\t\t */\n\t            var rightGain = new Tone.Gain();\n\t            /**\n\t\t\t\t * Split the incoming signal\n\t\t\t\t * @type {Tone.Split}\n\t\t\t\t * @private\n\t\t\t\t */\n\t            var split = this.input = new Tone.Split();\n\t            /**\n\t\t\t\t * Keeps the waveshapers from optimizing 0s\n\t\t\t\t * @type {Tone.Zero}\n\t\t\t\t * @private\n\t\t\t\t */\n\t            var zero = new Tone.Zero();\n\t            zero.fan(rightWaveShaper, leftWaveShaper);\n\t            /**\n\t\t\t\t * Merge the outgoing signal\n\t\t\t\t * @type {Tone.Merge}\n\t\t\t\t * @private\n\t\t\t\t */\n\t            var merge = this.output = new Tone.Merge();\n\t            //connections\n\t            split.left.chain(leftGain, merge.left);\n\t            split.right.chain(rightGain, merge.right);\n\t            this.pan.chain(leftWaveShaper, leftGain.gain);\n\t            this.pan.chain(rightWaveShaper, rightGain.gain);\n\t        };\n\t        StereoPannerNode.prototype.disconnect = function () {\n\t            this.output.disconnect.apply(this.output, arguments);\n\t        };\n\t        StereoPannerNode.prototype.connect = function () {\n\t            this.output.connect.apply(this.output, arguments);\n\t        };\n\t        //add it to the AudioContext\n\t        AudioContext.prototype.createStereoPanner = function () {\n\t            return new StereoPannerNode(this);\n\t        };\n\t        Tone.Context.prototype.createStereoPanner = function () {\n\t            return new StereoPannerNode(this);\n\t        };\n\t    }\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Panner is an equal power Left/Right Panner and does not\n\t\t *          support 3D. Panner uses the StereoPannerNode when available.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {NormalRange} [initialPan=0] The initail panner value (center).\n\t\t *  @example\n\t\t *  //pan the input signal hard right.\n\t\t *  var panner = new Tone.Panner(1);\n\t\t */\n\t    Tone.Panner = function (initialPan) {\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t*  the panner node\n\t\t\t*  @type {StereoPannerNode}\n\t\t\t*  @private\n\t\t\t*/\n\t        this._panner = this.input = this.output = this.context.createStereoPanner();\n\t        /**\n\t\t\t*  The pan control. -1 = hard left, 1 = hard right.\n\t\t\t*  @type {AudioRange}\n\t\t\t*  @signal\n\t\t\t*/\n\t        this.pan = this._panner.pan;\n\t        //initial value\n\t        this.pan.value = Tone.defaultArg(initialPan, 0);\n\t        this._readOnly('pan');\n\t    };\n\t    Tone.extend(Tone.Panner, Tone.AudioNode);\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Panner} this\n\t\t */\n\t    Tone.Panner.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable('pan');\n\t        this._panner.disconnect();\n\t        this._panner = null;\n\t        this.pan = null;\n\t        return this;\n\t    };\n\t    return Tone.Panner;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  A spatialized panner node which supports equalpower or HRTF panning.\n\t\t *          Tries to normalize the API across various browsers. See Tone.Listener\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Number} positionX The initial x position.\n\t\t *  @param {Number} positionY The initial y position.\n\t\t *  @param {Number} positionZ The initial z position.\n\t\t */\n\t    Tone.Panner3D = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'positionX',\n\t            'positionY',\n\t            'positionZ'\n\t        ], Tone.Panner3D);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The panner node\n\t\t\t *  @type {PannerNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._panner = this.input = this.output = this.context.createPanner();\n\t        //set some values\n\t        this._panner.panningModel = options.panningModel;\n\t        this._panner.maxDistance = options.maxDistance;\n\t        this._panner.distanceModel = options.distanceModel;\n\t        this._panner.coneOuterGain = options.coneOuterGain;\n\t        this._panner.coneOuterAngle = options.coneOuterAngle;\n\t        this._panner.coneInnerAngle = options.coneInnerAngle;\n\t        this._panner.refDistance = options.refDistance;\n\t        this._panner.rolloffFactor = options.rolloffFactor;\n\t        /**\n\t\t\t *  Holds the current orientation\n\t\t\t *  @type  {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._orientation = [\n\t            options.orientationX,\n\t            options.orientationY,\n\t            options.orientationZ\n\t        ];\n\t        /**\n\t\t\t *  Holds the current position\n\t\t\t *  @type  {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._position = [\n\t            options.positionX,\n\t            options.positionY,\n\t            options.positionZ\n\t        ];\n\t        // set the default position/orientation\n\t        this.orientationX = options.orientationX;\n\t        this.orientationY = options.orientationY;\n\t        this.orientationZ = options.orientationZ;\n\t        this.positionX = options.positionX;\n\t        this.positionY = options.positionY;\n\t        this.positionZ = options.positionZ;\n\t    };\n\t    Tone.extend(Tone.Panner3D, Tone.AudioNode);\n\t    /**\n\t\t *  Defaults according to the specification\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Panner3D.defaults = {\n\t        'positionX': 0,\n\t        'positionY': 0,\n\t        'positionZ': 0,\n\t        'orientationX': 0,\n\t        'orientationY': 0,\n\t        'orientationZ': 0,\n\t        'panningModel': 'equalpower',\n\t        'maxDistance': 10000,\n\t        'distanceModel': 'inverse',\n\t        'coneOuterGain': 0,\n\t        'coneOuterAngle': 360,\n\t        'coneInnerAngle': 360,\n\t        'refDistance': 1,\n\t        'rolloffFactor': 1\n\t    };\n\t    /**\n\t\t * The ramp time which is applied to the setTargetAtTime\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t    Tone.Panner3D.prototype._rampTimeConstant = 0.01;\n\t    /**\n\t\t *  Sets the position of the source in 3d space.\n\t\t *  @param  {Number}  x\n\t\t *  @param  {Number}  y\n\t\t *  @param  {Number}  z\n\t\t *  @return {Tone.Panner3D} this\n\t\t */\n\t    Tone.Panner3D.prototype.setPosition = function (x, y, z) {\n\t        if (this._panner.positionX) {\n\t            var now = this.now();\n\t            this._panner.positionX.setTargetAtTime(x, now, this._rampTimeConstant);\n\t            this._panner.positionY.setTargetAtTime(y, now, this._rampTimeConstant);\n\t            this._panner.positionZ.setTargetAtTime(z, now, this._rampTimeConstant);\n\t        } else {\n\t            this._panner.setPosition(x, y, z);\n\t        }\n\t        this._position = Array.prototype.slice.call(arguments);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Sets the orientation of the source in 3d space.\n\t\t *  @param  {Number}  x\n\t\t *  @param  {Number}  y\n\t\t *  @param  {Number}  z\n\t\t *  @return {Tone.Panner3D} this\n\t\t */\n\t    Tone.Panner3D.prototype.setOrientation = function (x, y, z) {\n\t        if (this._panner.orientationX) {\n\t            var now = this.now();\n\t            this._panner.orientationX.setTargetAtTime(x, now, this._rampTimeConstant);\n\t            this._panner.orientationY.setTargetAtTime(y, now, this._rampTimeConstant);\n\t            this._panner.orientationZ.setTargetAtTime(z, now, this._rampTimeConstant);\n\t        } else {\n\t            this._panner.setOrientation(x, y, z);\n\t        }\n\t        this._orientation = Array.prototype.slice.call(arguments);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  The x position of the panner object.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name positionX\n\t\t */\n\t    Object.defineProperty(Tone.Panner3D.prototype, 'positionX', {\n\t        set: function (pos) {\n\t            this._position[0] = pos;\n\t            this.setPosition.apply(this, this._position);\n\t        },\n\t        get: function () {\n\t            return this._position[0];\n\t        }\n\t    });\n\t    /**\n\t\t *  The y position of the panner object.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name positionY\n\t\t */\n\t    Object.defineProperty(Tone.Panner3D.prototype, 'positionY', {\n\t        set: function (pos) {\n\t            this._position[1] = pos;\n\t            this.setPosition.apply(this, this._position);\n\t        },\n\t        get: function () {\n\t            return this._position[1];\n\t        }\n\t    });\n\t    /**\n\t\t *  The z position of the panner object.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name positionZ\n\t\t */\n\t    Object.defineProperty(Tone.Panner3D.prototype, 'positionZ', {\n\t        set: function (pos) {\n\t            this._position[2] = pos;\n\t            this.setPosition.apply(this, this._position);\n\t        },\n\t        get: function () {\n\t            return this._position[2];\n\t        }\n\t    });\n\t    /**\n\t\t *  The x orientation of the panner object.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name orientationX\n\t\t */\n\t    Object.defineProperty(Tone.Panner3D.prototype, 'orientationX', {\n\t        set: function (pos) {\n\t            this._orientation[0] = pos;\n\t            this.setOrientation.apply(this, this._orientation);\n\t        },\n\t        get: function () {\n\t            return this._orientation[0];\n\t        }\n\t    });\n\t    /**\n\t\t *  The y orientation of the panner object.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name orientationY\n\t\t */\n\t    Object.defineProperty(Tone.Panner3D.prototype, 'orientationY', {\n\t        set: function (pos) {\n\t            this._orientation[1] = pos;\n\t            this.setOrientation.apply(this, this._orientation);\n\t        },\n\t        get: function () {\n\t            return this._orientation[1];\n\t        }\n\t    });\n\t    /**\n\t\t *  The z orientation of the panner object.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name orientationZ\n\t\t */\n\t    Object.defineProperty(Tone.Panner3D.prototype, 'orientationZ', {\n\t        set: function (pos) {\n\t            this._orientation[2] = pos;\n\t            this.setOrientation.apply(this, this._orientation);\n\t        },\n\t        get: function () {\n\t            return this._orientation[2];\n\t        }\n\t    });\n\t    /**\n\t\t *  Proxy a property on the panner to an exposed public propery\n\t\t *  @param  {String}  prop\n\t\t *  @private\n\t\t */\n\t    Tone.Panner3D._aliasProperty = function (prop) {\n\t        Object.defineProperty(Tone.Panner3D.prototype, prop, {\n\t            set: function (val) {\n\t                this._panner[prop] = val;\n\t            },\n\t            get: function () {\n\t                return this._panner[prop];\n\t            }\n\t        });\n\t    };\n\t    /**\n\t\t *  The panning model. Either \"equalpower\" or \"HRTF\".\n\t\t *  @type {String}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name panningModel\n\t\t */\n\t    Tone.Panner3D._aliasProperty('panningModel');\n\t    /**\n\t\t *  A reference distance for reducing volume as source move further from the listener\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name refDistance\n\t\t */\n\t    Tone.Panner3D._aliasProperty('refDistance');\n\t    /**\n\t\t *  Describes how quickly the volume is reduced as source moves away from listener.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name rolloffFactor\n\t\t */\n\t    Tone.Panner3D._aliasProperty('rolloffFactor');\n\t    /**\n\t\t *  The distance model used by,  \"linear\", \"inverse\", or \"exponential\".\n\t\t *  @type {String}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name distanceModel\n\t\t */\n\t    Tone.Panner3D._aliasProperty('distanceModel');\n\t    /**\n\t\t *  The angle, in degrees, inside of which there will be no volume reduction\n\t\t *  @type {Degrees}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name coneInnerAngle\n\t\t */\n\t    Tone.Panner3D._aliasProperty('coneInnerAngle');\n\t    /**\n\t\t *  The angle, in degrees, outside of which the volume will be reduced\n\t\t *  to a constant value of coneOuterGain\n\t\t *  @type {Degrees}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name coneOuterAngle\n\t\t */\n\t    Tone.Panner3D._aliasProperty('coneOuterAngle');\n\t    /**\n\t\t *  The gain outside of the coneOuterAngle\n\t\t *  @type {Gain}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name coneOuterGain\n\t\t */\n\t    Tone.Panner3D._aliasProperty('coneOuterGain');\n\t    /**\n\t\t *  The maximum distance between source and listener,\n\t\t *  after which the volume will not be reduced any further.\n\t\t *  @type {Positive}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name maxDistance\n\t\t */\n\t    Tone.Panner3D._aliasProperty('maxDistance');\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Panner3D} this\n\t\t */\n\t    Tone.Panner3D.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._panner.disconnect();\n\t        this._panner = null;\n\t        this._orientation = null;\n\t        this._position = null;\n\t        return this;\n\t    };\n\t    return Tone.Panner3D;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.PanVol is a Tone.Panner and Tone.Volume in one.\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t *  @param {AudioRange} pan the initial pan\n\t\t *  @param {number} volume The output volume.\n\t\t *  @example\n\t\t * //pan the incoming signal left and drop the volume\n\t\t * var panVol = new Tone.PanVol(-0.25, -12);\n\t\t */\n\t    Tone.PanVol = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'pan',\n\t            'volume'\n\t        ], Tone.PanVol);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The panning node\n\t\t\t *  @type {Tone.Panner}\n\t\t\t *  @private\n\t\t\t */\n\t        this._panner = this.input = new Tone.Panner(options.pan);\n\t        /**\n\t\t\t *  The L/R panning control.\n\t\t\t *  @type {AudioRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.pan = this._panner.pan;\n\t        /**\n\t\t\t *  The volume node\n\t\t\t *  @type {Tone.Volume}\n\t\t\t *  @private\n\t\t\t */\n\t        this._volume = this.output = new Tone.Volume(options.volume);\n\t        /**\n\t\t\t *  The volume control in decibels.\n\t\t\t *  @type {Decibels}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.volume = this._volume.volume;\n\t        //connections\n\t        this._panner.connect(this._volume);\n\t        this.mute = options.mute;\n\t        this._readOnly([\n\t            'pan',\n\t            'volume'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.PanVol, Tone.AudioNode);\n\t    /**\n\t\t *  The defaults\n\t\t *  @type  {Object}\n\t\t *  @const\n\t\t *  @static\n\t\t */\n\t    Tone.PanVol.defaults = {\n\t        'pan': 0,\n\t        'volume': 0,\n\t        'mute': false\n\t    };\n\t    /**\n\t\t * Mute/unmute the volume\n\t\t * @memberOf Tone.PanVol#\n\t\t * @name mute\n\t\t * @type {Boolean}\n\t\t */\n\t    Object.defineProperty(Tone.PanVol.prototype, 'mute', {\n\t        get: function () {\n\t            return this._volume.mute;\n\t        },\n\t        set: function (mute) {\n\t            this._volume.mute = mute;\n\t        }\n\t    });\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.PanVol} this\n\t\t */\n\t    Tone.PanVol.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable([\n\t            'pan',\n\t            'volume'\n\t        ]);\n\t        this._panner.dispose();\n\t        this._panner = null;\n\t        this.pan = null;\n\t        this._volume.dispose();\n\t        this._volume = null;\n\t        this.volume = null;\n\t        return this;\n\t    };\n\t    return Tone.PanVol;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.Solo lets you isolate a specific audio stream. When\n\t\t *         an instance is set to `solo=true`, it will mute all other instances.\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @example\n\t\t * var soloA = new Tone.Solo()\n\t\t * var soloB = new Tone.Solo()\n\t\t * soloA.solo = true\n\t\t * //no audio will pass through soloB\n\t\t */\n\t    Tone.Solo = function () {\n\t        var options = Tone.defaults(arguments, ['solo'], Tone.Solo);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The input and output node\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t */\n\t        this.input = this.output = new Tone.Gain();\n\t        /**\n\t\t\t *  A bound _soloed method\n\t\t\t *  @type  {Function}\n\t\t\t *  @private\n\t\t\t */\n\t        this._soloBind = this._soloed.bind(this);\n\t        //listen for solo events class-wide.\n\t        this.context.on('solo', this._soloBind);\n\t        //set initially\n\t        this.solo = options.solo;\n\t    };\n\t    Tone.extend(Tone.Solo, Tone.AudioNode);\n\t    /**\n\t\t *  The defaults\n\t\t *  @type  {Object}\n\t\t *  @static\n\t\t */\n\t    Tone.Solo.defaults = { solo: false };\n\t    /**\n\t\t *  Isolates this instance and mutes all other instances of Tone.Solo.\n\t\t *  Only one instance can be soloed at a time. A soloed\n\t\t *  instance will report `solo=false` when another instance is soloed.\n\t\t *  @memberOf Tone.Solo#\n\t\t *  @type {Boolean}\n\t\t *  @name solo\n\t\t */\n\t    Object.defineProperty(Tone.Solo.prototype, 'solo', {\n\t        get: function () {\n\t            return this._isSoloed();\n\t        },\n\t        set: function (solo) {\n\t            if (solo) {\n\t                this._addSolo();\n\t            } else {\n\t                this._removeSolo();\n\t            }\n\t            this.context.emit('solo', this);\n\t        }\n\t    });\n\t    /**\n\t\t *  If the current instance is muted, i.e. another instance is soloed\n\t\t *  @memberOf Tone.Solo#\n\t\t *  @type {Boolean}\n\t\t *  @name muted\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Solo.prototype, 'muted', {\n\t        get: function () {\n\t            return this.input.gain.value === 0;\n\t        }\n\t    });\n\t    /**\n\t\t * Add this to the soloed array\n\t\t * @private\n\t\t */\n\t    Tone.Solo.prototype._addSolo = function () {\n\t        if (!Tone.isArray(this.context._currentSolo)) {\n\t            this.context._currentSolo = [];\n\t        }\n\t        if (!this._isSoloed()) {\n\t            this.context._currentSolo.push(this);\n\t        }\n\t    };\n\t    /**\n\t\t * Remove this from the soloed array\n\t\t * @private\n\t\t */\n\t    Tone.Solo.prototype._removeSolo = function () {\n\t        if (this._isSoloed()) {\n\t            var index = this.context._currentSolo.indexOf(this);\n\t            this.context._currentSolo.splice(index, 1);\n\t        }\n\t    };\n\t    /**\n\t\t * @return {Boolean} Is this on the soloed array\n\t\t * @private\n\t\t */\n\t    Tone.Solo.prototype._isSoloed = function () {\n\t        if (Tone.isArray(this.context._currentSolo)) {\n\t            return this.context._currentSolo.length !== 0 && this.context._currentSolo.indexOf(this) !== -1;\n\t        } else {\n\t            return false;\n\t        }\n\t    };\n\t    /**\n\t\t * @return {Boolean} Returns true if no one is soloed\n\t\t * @private\n\t\t */\n\t    Tone.Solo.prototype._noSolos = function () {\n\t        return !Tone.isArray(this.context._currentSolo) || this.context._currentSolo.length === 0;\n\t    };\n\t    /**\n\t\t *  Solo the current instance and unsolo all other instances.\n\t\t *  @param  {Tone.Solo}  instance  The instance which is being soloed/unsoloed.\n\t\t *  @private\n\t\t */\n\t    Tone.Solo.prototype._soloed = function () {\n\t        if (this._isSoloed()) {\n\t            this.input.gain.value = 1;\n\t        } else if (this._noSolos()) {\n\t            //no one is soloed\n\t            this.input.gain.value = 1;\n\t        } else {\n\t            this.input.gain.value = 0;\n\t        }\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.Solo}  this\n\t\t */\n\t    Tone.Solo.prototype.dispose = function () {\n\t        this.context.off('solo', this._soloBind);\n\t        this._removeSolo();\n\t        this._soloBind = null;\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        return this;\n\t    };\n\t    return Tone.Solo;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class  Get the current waveform data of the connected audio source.\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Number=} size The size of the FFT. Value must be a power of\n\t\t *                       two in the range 32 to 32768.\n\t\t */\n\t    Tone.Waveform = function () {\n\t        var options = Tone.defaults(arguments, ['size'], Tone.Waveform);\n\t        options.type = Tone.Analyser.Type.Waveform;\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The analyser node.\n\t\t\t *  @private\n\t\t\t *  @type {Tone.Analyser}\n\t\t\t */\n\t        this._analyser = this.input = this.output = new Tone.Analyser(options);\n\t    };\n\t    Tone.extend(Tone.Waveform, Tone.AudioNode);\n\t    /**\n\t\t *  The default values.\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.Waveform.defaults = { 'size': 1024 };\n\t    /**\n\t\t *  Gets the waveform of the audio source. Returns the waveform data\n\t\t *  of length [size](#size) as a Float32Array with values between -1 and 1.\n\t\t *  @returns {TypedArray}\n\t\t */\n\t    Tone.Waveform.prototype.getValue = function () {\n\t        return this._analyser.getValue();\n\t    };\n\t    /**\n\t\t *  The size of analysis. This must be a power of two in the range 32 to 32768.\n\t\t *  @memberOf Tone.Waveform#\n\t\t *  @type {Number}\n\t\t *  @name size\n\t\t */\n\t    Object.defineProperty(Tone.Waveform.prototype, 'size', {\n\t        get: function () {\n\t            return this._analyser.size;\n\t        },\n\t        set: function (size) {\n\t            this._analyser.size = size;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.Waveform}  this\n\t\t */\n\t    Tone.Waveform.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._analyser.dispose();\n\t        this._analyser = null;\n\t    };\n\t    return Tone.Waveform;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.CtrlInterpolate will interpolate between given values based\n\t\t *         on the \"index\" property. Passing in an array or object literal\n\t\t *         will interpolate each of the parameters. Note (i.e. \"C3\")\n\t\t *         and Time (i.e. \"4n + 2\") can be interpolated. All other values are\n\t\t *         assumed to be numbers. \n\t\t *  @example\n\t\t * var interp = new Tone.CtrlInterpolate([0, 2, 9, 4]);\n\t\t * interp.index = 0.75;\n\t\t * interp.value; //returns 1.5\n\t\t *\n\t\t *  @example\n\t\t * var interp = new Tone.CtrlInterpolate([\n\t\t * \t[2, 4, 5],\n\t\t * \t[9, 3, 2],\n\t\t * ]);\n\t\t * @param {Array} values The array of values to interpolate over\n\t\t * @param {Positive} index The initial interpolation index.\n\t\t * @extends {Tone}\n\t\t */\n\t    Tone.CtrlInterpolate = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'values',\n\t            'index'\n\t        ], Tone.CtrlInterpolate);\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  The values to interpolate between\n\t\t\t *  @type  {Array}\n\t\t\t */\n\t        this.values = options.values;\n\t        /**\n\t\t\t *  The interpolated index between values. For example: a value of 1.5\n\t\t\t *  would interpolate equally between the value at index 1\n\t\t\t *  and the value at index 2. \n\t\t\t *  @example\n\t\t\t * interp.index = 0; \n\t\t\t * interp.value; //returns the value at 0\n\t\t\t * interp.index = 0.5;\n\t\t\t * interp.value; //returns the value between indices 0 and 1. \n\t\t\t *  @type  {Positive}\n\t\t\t */\n\t        this.index = options.index;\n\t    };\n\t    Tone.extend(Tone.CtrlInterpolate);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.CtrlInterpolate.defaults = {\n\t        'index': 0,\n\t        'values': []\n\t    };\n\t    /**\n\t\t *  The current interpolated value based on the index\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.CtrlInterpolate#\n\t\t *  @type {*}\n\t\t *  @name value\n\t\t */\n\t    Object.defineProperty(Tone.CtrlInterpolate.prototype, 'value', {\n\t        get: function () {\n\t            var index = this.index;\n\t            index = Math.min(index, this.values.length - 1);\n\t            var lowerPosition = Math.floor(index);\n\t            var lower = this.values[lowerPosition];\n\t            var upper = this.values[Math.ceil(index)];\n\t            return this._interpolate(index - lowerPosition, lower, upper);\n\t        }\n\t    });\n\t    /**\n\t\t *  Internal interpolation routine\n\t\t *  @param  {NormalRange}  index  The index between the lower and upper\n\t\t *  @param  {*}  lower \n\t\t *  @param  {*}  upper \n\t\t *  @return  {*}  The interpolated value\n\t\t *  @private\n\t\t */\n\t    Tone.CtrlInterpolate.prototype._interpolate = function (index, lower, upper) {\n\t        if (Tone.isArray(lower)) {\n\t            var retArray = [];\n\t            for (var i = 0; i < lower.length; i++) {\n\t                retArray[i] = this._interpolate(index, lower[i], upper[i]);\n\t            }\n\t            return retArray;\n\t        } else if (Tone.isObject(lower)) {\n\t            var retObj = {};\n\t            for (var attr in lower) {\n\t                retObj[attr] = this._interpolate(index, lower[attr], upper[attr]);\n\t            }\n\t            return retObj;\n\t        } else {\n\t            lower = this._toNumber(lower);\n\t            upper = this._toNumber(upper);\n\t            return (1 - index) * lower + index * upper;\n\t        }\n\t    };\n\t    /**\n\t\t *  Convert from the given type into a number\n\t\t *  @param  {Number|String}  value\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.CtrlInterpolate.prototype._toNumber = function (val) {\n\t        if (Tone.isNumber(val)) {\n\t            return val;\n\t        } else {\n\t            //otherwise assume that it's Time...\n\t            return this.toSeconds(val);\n\t        }\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.CtrlInterpolate}  this\n\t\t */\n\t    Tone.CtrlInterpolate.prototype.dispose = function () {\n\t        this.values = null;\n\t    };\n\t    return Tone.CtrlInterpolate;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.CtrlMarkov represents a Markov Chain where each call\n\t\t *         to Tone.CtrlMarkov.next will move to the next state. If the next\n\t\t *         state choice is an array, the next state is chosen randomly with\n\t\t *         even probability for all of the choices. For a weighted probability\n\t\t *         of the next choices, pass in an object with \"state\" and \"probability\" attributes. \n\t\t *         The probabilities will be normalized and then chosen. If no next options\n\t\t *         are given for the current state, the state will stay there. \n\t\t *  @extends {Tone}\n\t\t *  @example\n\t\t * var chain = new Tone.CtrlMarkov({\n\t\t * \t\"beginning\" : [\"end\", \"middle\"],\n\t\t * \t\"middle\" : \"end\"\n\t\t * });\n\t\t * chain.value = \"beginning\";\n\t\t * chain.next(); //returns \"end\" or \"middle\" with 50% probability\n\t\t *\n\t\t *  @example\n\t\t * var chain = new Tone.CtrlMarkov({\n\t\t * \t\"beginning\" : [{\"value\" : \"end\", \"probability\" : 0.8}, \n\t\t * \t\t\t\t\t{\"value\" : \"middle\", \"probability\" : 0.2}],\n\t\t * \t\"middle\" : \"end\"\n\t\t * });\n\t\t * chain.value = \"beginning\";\n\t\t * chain.next(); //returns \"end\" with 80% probability or \"middle\" with 20%.\n\t\t *  @param {Object} values An object with the state names as the keys\n\t\t *                         and the next state(s) as the values. \n\t\t */\n\t    Tone.CtrlMarkov = function (values, initial) {\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  The Markov values with states as the keys\n\t\t\t *  and next state(s) as the values. \n\t\t\t *  @type {Object}\n\t\t\t */\n\t        this.values = Tone.defaultArg(values, {});\n\t        /**\n\t\t\t *  The current state of the Markov values. The next\n\t\t\t *  state will be evaluated and returned when Tone.CtrlMarkov.next\n\t\t\t *  is invoked.\n\t\t\t *  @type {String}\n\t\t\t */\n\t        this.value = Tone.defaultArg(initial, Object.keys(this.values)[0]);\n\t    };\n\t    Tone.extend(Tone.CtrlMarkov);\n\t    /**\n\t\t *  Returns the next state of the Markov values. \n\t\t *  @return  {String}\n\t\t */\n\t    Tone.CtrlMarkov.prototype.next = function () {\n\t        if (this.values.hasOwnProperty(this.value)) {\n\t            var next = this.values[this.value];\n\t            if (Tone.isArray(next)) {\n\t                var distribution = this._getProbDistribution(next);\n\t                var rand = Math.random();\n\t                var total = 0;\n\t                for (var i = 0; i < distribution.length; i++) {\n\t                    var dist = distribution[i];\n\t                    if (rand > total && rand < total + dist) {\n\t                        var chosen = next[i];\n\t                        if (Tone.isObject(chosen)) {\n\t                            this.value = chosen.value;\n\t                        } else {\n\t                            this.value = chosen;\n\t                        }\n\t                    }\n\t                    total += dist;\n\t                }\n\t            } else {\n\t                this.value = next;\n\t            }\n\t        }\n\t        return this.value;\n\t    };\n\t    /**\n\t\t *  Choose randomly from an array weighted options in the form \n\t\t *  {\"state\" : string, \"probability\" : number} or an array of values\n\t\t *  @param  {Array}  options \n\t\t *  @return  {Array}  The randomly selected choice\n\t\t *  @private\n\t\t */\n\t    Tone.CtrlMarkov.prototype._getProbDistribution = function (options) {\n\t        var distribution = [];\n\t        var total = 0;\n\t        var needsNormalizing = false;\n\t        for (var i = 0; i < options.length; i++) {\n\t            var option = options[i];\n\t            if (Tone.isObject(option)) {\n\t                needsNormalizing = true;\n\t                distribution[i] = option.probability;\n\t            } else {\n\t                distribution[i] = 1 / options.length;\n\t            }\n\t            total += distribution[i];\n\t        }\n\t        if (needsNormalizing) {\n\t            //normalize the values\n\t            for (var j = 0; j < distribution.length; j++) {\n\t                distribution[j] = distribution[j] / total;\n\t            }\n\t        }\n\t        return distribution;\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.CtrlMarkov}  this\n\t\t */\n\t    Tone.CtrlMarkov.prototype.dispose = function () {\n\t        this.values = null;\n\t    };\n\t    return Tone.CtrlMarkov;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Generate patterns from an array of values.\n\t\t *         Has a number of arpeggiation and randomized\n\t\t *         selection patterns. \n\t\t *           <ul>\n\t\t *  \t        <li>\"up\" - cycles upward</li>\n\t\t *  \t\t\t<li>\"down\" - cycles downward</li>\n\t\t *  \t\t\t<li>\"upDown\" - up then and down</li>\n\t\t *  \t\t\t<li>\"downUp\" - cycles down then and up</li>\n\t\t *  \t\t\t<li>\"alternateUp\" - jump up two and down one</li>\n\t\t *  \t\t\t<li>\"alternateDown\" - jump down two and up one</li>\n\t\t *  \t\t\t<li>\"random\" - randomly select an index</li>\n\t\t *  \t\t\t<li>\"randomWalk\" - randomly moves one index away from the current position</li>\n\t\t *  \t\t\t<li>\"randomOnce\" - randomly select an index without repeating until all values have been chosen.</li>\n\t\t *     \t\t</ul>\n\t\t *  @param  {Array}  values   An array of options to choose from.\n\t\t *  @param  {Tone.CtrlPattern.Type=}  type  The name of the pattern.\n\t\t *  @extends {Tone}\n\t\t */\n\t    Tone.CtrlPattern = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'values',\n\t            'type'\n\t        ], Tone.CtrlPattern);\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  The array of values to arpeggiate over\n\t\t\t *  @type {Array}\n\t\t\t */\n\t        this.values = options.values;\n\t        /**\n\t\t\t *  The current position in the values array\n\t\t\t *  @type  {Number}\n\t\t\t */\n\t        this.index = 0;\n\t        /**\n\t\t\t *  The type placeholder\n\t\t\t *  @type {Tone.CtrlPattern.Type}\n\t\t\t *  @private\n\t\t\t */\n\t        this._type = null;\n\t        /**\n\t\t\t *  Shuffled values for the RandomOnce type\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._shuffled = null;\n\t        /**\n\t\t\t *  The direction of the movement\n\t\t\t *  @type {String}\n\t\t\t *  @private\n\t\t\t */\n\t        this._direction = null;\n\t        this.type = options.type;\n\t    };\n\t    Tone.extend(Tone.CtrlPattern);\n\t    /**\n\t\t *  The Control Patterns\n\t\t *  @type  {Object}\n\t\t *  @static\n\t\t */\n\t    Tone.CtrlPattern.Type = {\n\t        Up: 'up',\n\t        Down: 'down',\n\t        UpDown: 'upDown',\n\t        DownUp: 'downUp',\n\t        AlternateUp: 'alternateUp',\n\t        AlternateDown: 'alternateDown',\n\t        Random: 'random',\n\t        RandomWalk: 'randomWalk',\n\t        RandomOnce: 'randomOnce'\n\t    };\n\t    /**\n\t\t *  The default values. \n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.CtrlPattern.defaults = {\n\t        'type': Tone.CtrlPattern.Type.Up,\n\t        'values': []\n\t    };\n\t    /**\n\t\t *  The value at the current index of the pattern.\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.CtrlPattern#\n\t\t *  @type {*}\n\t\t *  @name value\n\t\t */\n\t    Object.defineProperty(Tone.CtrlPattern.prototype, 'value', {\n\t        get: function () {\n\t            //some safeguards\n\t            if (this.values.length === 0) {\n\t                return;\n\t            } else if (this.values.length === 1) {\n\t                return this.values[0];\n\t            }\n\t            this.index = Math.min(this.index, this.values.length - 1);\n\t            var val = this.values[this.index];\n\t            if (this.type === Tone.CtrlPattern.Type.RandomOnce) {\n\t                if (this.values.length !== this._shuffled.length) {\n\t                    this._shuffleValues();\n\t                }\n\t                val = this.values[this._shuffled[this.index]];\n\t            }\n\t            return val;\n\t        }\n\t    });\n\t    /**\n\t\t *  The pattern used to select the next\n\t\t *  item from the values array\n\t\t *  @memberOf Tone.CtrlPattern#\n\t\t *  @type {Tone.CtrlPattern.Type}\n\t\t *  @name type\n\t\t */\n\t    Object.defineProperty(Tone.CtrlPattern.prototype, 'type', {\n\t        get: function () {\n\t            return this._type;\n\t        },\n\t        set: function (type) {\n\t            this._type = type;\n\t            this._shuffled = null;\n\t            //the first index\n\t            if (this._type === Tone.CtrlPattern.Type.Up || this._type === Tone.CtrlPattern.Type.UpDown || this._type === Tone.CtrlPattern.Type.RandomOnce || this._type === Tone.CtrlPattern.Type.AlternateUp) {\n\t                this.index = 0;\n\t            } else if (this._type === Tone.CtrlPattern.Type.Down || this._type === Tone.CtrlPattern.Type.DownUp || this._type === Tone.CtrlPattern.Type.AlternateDown) {\n\t                this.index = this.values.length - 1;\n\t            }\n\t            //the direction\n\t            if (this._type === Tone.CtrlPattern.Type.UpDown || this._type === Tone.CtrlPattern.Type.AlternateUp) {\n\t                this._direction = Tone.CtrlPattern.Type.Up;\n\t            } else if (this._type === Tone.CtrlPattern.Type.DownUp || this._type === Tone.CtrlPattern.Type.AlternateDown) {\n\t                this._direction = Tone.CtrlPattern.Type.Down;\n\t            }\n\t            //randoms\n\t            if (this._type === Tone.CtrlPattern.Type.RandomOnce) {\n\t                this._shuffleValues();\n\t            } else if (this._type === Tone.CtrlPattern.Random) {\n\t                this.index = Math.floor(Math.random() * this.values.length);\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Return the next value given the current position\n\t\t *  and pattern.\n\t\t *  @return {*} The next value\n\t\t */\n\t    Tone.CtrlPattern.prototype.next = function () {\n\t        var type = this.type;\n\t        //choose the next index\n\t        if (type === Tone.CtrlPattern.Type.Up) {\n\t            this.index++;\n\t            if (this.index >= this.values.length) {\n\t                this.index = 0;\n\t            }\n\t        } else if (type === Tone.CtrlPattern.Type.Down) {\n\t            this.index--;\n\t            if (this.index < 0) {\n\t                this.index = this.values.length - 1;\n\t            }\n\t        } else if (type === Tone.CtrlPattern.Type.UpDown || type === Tone.CtrlPattern.Type.DownUp) {\n\t            if (this._direction === Tone.CtrlPattern.Type.Up) {\n\t                this.index++;\n\t            } else {\n\t                this.index--;\n\t            }\n\t            if (this.index < 0) {\n\t                this.index = 1;\n\t                this._direction = Tone.CtrlPattern.Type.Up;\n\t            } else if (this.index >= this.values.length) {\n\t                this.index = this.values.length - 2;\n\t                this._direction = Tone.CtrlPattern.Type.Down;\n\t            }\n\t        } else if (type === Tone.CtrlPattern.Type.Random) {\n\t            this.index = Math.floor(Math.random() * this.values.length);\n\t        } else if (type === Tone.CtrlPattern.Type.RandomWalk) {\n\t            if (Math.random() < 0.5) {\n\t                this.index--;\n\t                this.index = Math.max(this.index, 0);\n\t            } else {\n\t                this.index++;\n\t                this.index = Math.min(this.index, this.values.length - 1);\n\t            }\n\t        } else if (type === Tone.CtrlPattern.Type.RandomOnce) {\n\t            this.index++;\n\t            if (this.index >= this.values.length) {\n\t                this.index = 0;\n\t                //reshuffle the values for next time\n\t                this._shuffleValues();\n\t            }\n\t        } else if (type === Tone.CtrlPattern.Type.AlternateUp) {\n\t            if (this._direction === Tone.CtrlPattern.Type.Up) {\n\t                this.index += 2;\n\t                this._direction = Tone.CtrlPattern.Type.Down;\n\t            } else {\n\t                this.index -= 1;\n\t                this._direction = Tone.CtrlPattern.Type.Up;\n\t            }\n\t            if (this.index >= this.values.length) {\n\t                this.index = 0;\n\t                this._direction = Tone.CtrlPattern.Type.Up;\n\t            }\n\t        } else if (type === Tone.CtrlPattern.Type.AlternateDown) {\n\t            if (this._direction === Tone.CtrlPattern.Type.Up) {\n\t                this.index += 1;\n\t                this._direction = Tone.CtrlPattern.Type.Down;\n\t            } else {\n\t                this.index -= 2;\n\t                this._direction = Tone.CtrlPattern.Type.Up;\n\t            }\n\t            if (this.index < 0) {\n\t                this.index = this.values.length - 1;\n\t                this._direction = Tone.CtrlPattern.Type.Down;\n\t            }\n\t        }\n\t        return this.value;\n\t    };\n\t    /**\n\t\t *  Shuffles the values and places the results into the _shuffled\n\t\t *  @private\n\t\t */\n\t    Tone.CtrlPattern.prototype._shuffleValues = function () {\n\t        var copy = [];\n\t        this._shuffled = [];\n\t        for (var i = 0; i < this.values.length; i++) {\n\t            copy[i] = i;\n\t        }\n\t        while (copy.length > 0) {\n\t            var randVal = copy.splice(Math.floor(copy.length * Math.random()), 1);\n\t            this._shuffled.push(randVal[0]);\n\t        }\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @returns {Tone.CtrlPattern} this\n\t\t */\n\t    Tone.CtrlPattern.prototype.dispose = function () {\n\t        this._shuffled = null;\n\t        this.values = null;\n\t    };\n\t    return Tone.CtrlPattern;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Choose a random value.\n\t\t *  @extends {Tone}\n\t\t *  @example\n\t\t * var randomWalk = new Tone.CtrlRandom({\n\t\t * \t\"min\" : 0,\n\t\t * \t\"max\" : 10,\n\t\t * \t\"integer\" : true\n\t\t * });\n\t\t * randomWalk.eval();\n\t\t *\n\t\t *  @param {Number|Time=} min The minimum return value.\n\t\t *  @param {Number|Time=} max The maximum return value.\n\t\t */\n\t    Tone.CtrlRandom = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'min',\n\t            'max'\n\t        ], Tone.CtrlRandom);\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  The minimum return value\n\t\t\t *  @type  {Number|Time}\n\t\t\t */\n\t        this.min = options.min;\n\t        /**\n\t\t\t *  The maximum return value\n\t\t\t *  @type  {Number|Time}\n\t\t\t */\n\t        this.max = options.max;\n\t        /**\n\t\t\t *  If the return value should be an integer\n\t\t\t *  @type  {Boolean}\n\t\t\t */\n\t        this.integer = options.integer;\n\t    };\n\t    Tone.extend(Tone.CtrlRandom);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.CtrlRandom.defaults = {\n\t        'min': 0,\n\t        'max': 1,\n\t        'integer': false\n\t    };\n\t    /**\n\t\t *  Return a random value between min and max. \n\t\t *  @readOnly\n\t\t *  @memberOf Tone.CtrlRandom#\n\t\t *  @type {*}\n\t\t *  @name value\n\t\t */\n\t    Object.defineProperty(Tone.CtrlRandom.prototype, 'value', {\n\t        get: function () {\n\t            var min = this.toSeconds(this.min);\n\t            var max = this.toSeconds(this.max);\n\t            var rand = Math.random();\n\t            var val = rand * min + (1 - rand) * max;\n\t            if (this.integer) {\n\t                val = Math.floor(val);\n\t            }\n\t            return val;\n\t        }\n\t    });\n\t    return Tone.CtrlRandom;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class A data structure for holding multiple buffers.\n\t\t *  \n\t\t *  @param  {Object|Array}    urls      An object literal or array\n\t\t *                                      of urls to load.\n\t\t *  @param  {Function=}  callback  The callback to invoke when\n\t\t *                                 the buffers are loaded. \n\t\t *  @extends {Tone}\n\t\t *  @example\n\t\t * //load a whole bank of piano samples\n\t\t * var pianoSamples = new Tone.Buffers({\n\t\t * \t\"C4\" : \"path/to/C4.mp3\"\n\t\t * \t\"C#4\" : \"path/to/C#4.mp3\"\n\t\t * \t\"D4\" : \"path/to/D4.mp3\"\n\t\t * \t\"D#4\" : \"path/to/D#4.mp3\"\n\t\t * \t...\n\t\t * }, function(){\n\t\t * \t//play one of the samples when they all load\n\t\t * \tplayer.buffer = pianoSamples.get(\"C4\");\n\t\t * \tplayer.start();\n\t\t * });\n\t\t * \t@example\n\t\t * //To pass in additional parameters in the second parameter\n\t\t * var buffers = new Tone.Buffers(urls, {\n\t\t * \t\"onload\" : callback,\n\t\t * \t\"baseUrl\" : \"../path/to/audio/\"\n\t\t * })\n\t\t */\n\t    Tone.Buffers = function (urls) {\n\t        //remove the urls from the options\n\t        var args = Array.prototype.slice.call(arguments);\n\t        args.shift();\n\t        var options = Tone.defaults(args, [\n\t            'onload',\n\t            'baseUrl'\n\t        ], Tone.Buffers);\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  All of the buffers\n\t\t\t *  @type  {Object}\n\t\t\t *  @private\n\t\t\t */\n\t        this._buffers = {};\n\t        /**\n\t\t\t *  A path which is prefixed before every url.\n\t\t\t *  @type  {String}\n\t\t\t */\n\t        this.baseUrl = options.baseUrl;\n\t        this._loadingCount = 0;\n\t        //add each one\n\t        for (var key in urls) {\n\t            this._loadingCount++;\n\t            this.add(key, urls[key], this._bufferLoaded.bind(this, options.onload));\n\t        }\n\t    };\n\t    Tone.extend(Tone.Buffers);\n\t    /**\n\t\t *  Defaults\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.Buffers.defaults = {\n\t        'onload': Tone.noOp,\n\t        'baseUrl': ''\n\t    };\n\t    /**\n\t\t *  True if the buffers object has a buffer by that name.\n\t\t *  @param  {String|Number}  name  The key or index of the \n\t\t *                                 buffer.\n\t\t *  @return  {Boolean}\n\t\t */\n\t    Tone.Buffers.prototype.has = function (name) {\n\t        return this._buffers.hasOwnProperty(name);\n\t    };\n\t    /**\n\t\t *  Get a buffer by name. If an array was loaded, \n\t\t *  then use the array index.\n\t\t *  @param  {String|Number}  name  The key or index of the \n\t\t *                                 buffer.\n\t\t *  @return  {Tone.Buffer}\n\t\t */\n\t    Tone.Buffers.prototype.get = function (name) {\n\t        if (this.has(name)) {\n\t            return this._buffers[name];\n\t        } else {\n\t            throw new Error('Tone.Buffers: no buffer named ' + name);\n\t        }\n\t    };\n\t    /**\n\t\t *  A buffer was loaded. decrement the counter.\n\t\t *  @param  {Function}  callback \n\t\t *  @private\n\t\t */\n\t    Tone.Buffers.prototype._bufferLoaded = function (callback) {\n\t        this._loadingCount--;\n\t        if (this._loadingCount === 0 && callback) {\n\t            callback(this);\n\t        }\n\t    };\n\t    /**\n\t\t * If the buffers are loaded or not\n\t\t * @memberOf Tone.Buffers#\n\t\t * @type {Boolean}\n\t\t * @name loaded\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Buffers.prototype, 'loaded', {\n\t        get: function () {\n\t            var isLoaded = true;\n\t            for (var buffName in this._buffers) {\n\t                var buff = this.get(buffName);\n\t                isLoaded = isLoaded && buff.loaded;\n\t            }\n\t            return isLoaded;\n\t        }\n\t    });\n\t    /**\n\t\t *  Add a buffer by name and url to the Buffers\n\t\t *  @param  {String}    name      A unique name to give\n\t\t *                                the buffer\n\t\t *  @param  {String|Tone.Buffer|Audiobuffer}  url  Either the url of the bufer, \n\t\t *                                                 or a buffer which will be added\n\t\t *                                                 with the given name.\n\t\t *  @param  {Function=}  callback  The callback to invoke \n\t\t *                                 when the url is loaded.\n\t\t */\n\t    Tone.Buffers.prototype.add = function (name, url, callback) {\n\t        callback = Tone.defaultArg(callback, Tone.noOp);\n\t        if (url instanceof Tone.Buffer) {\n\t            this._buffers[name] = url;\n\t            callback(this);\n\t        } else if (url instanceof AudioBuffer) {\n\t            this._buffers[name] = new Tone.Buffer(url);\n\t            callback(this);\n\t        } else if (Tone.isString(url)) {\n\t            this._buffers[name] = new Tone.Buffer(this.baseUrl + url, callback);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.Buffers} this\n\t\t */\n\t    Tone.Buffers.prototype.dispose = function () {\n\t        Tone.prototype.dispose.call(this);\n\t        for (var name in this._buffers) {\n\t            this._buffers[name].dispose();\n\t        }\n\t        this._buffers = null;\n\t        return this;\n\t    };\n\t    return Tone.Buffers;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  buses are another way of routing audio\n\t\t *\n\t\t *  augments Tone.prototype to include send and recieve\n\t\t */\n\t    /**\n\t\t *  All of the routes\n\t\t *\n\t\t *  @type {Object}\n\t\t *  @static\n\t\t *  @private\n\t\t */\n\t    var Buses = {};\n\t    /**\n\t\t *  Send this signal to the channel name.\n\t\t *  @param  {String} channelName A named channel to send the signal to.\n\t\t *  @param  {Decibels} amount The amount of the source to send to the bus.\n\t\t *  @return {GainNode} The gain node which connects this node to the desired channel.\n\t\t *                     Can be used to adjust the levels of the send.\n\t\t *  @example\n\t\t * source.send(\"reverb\", -12);\n\t\t */\n\t    Tone.prototype.send = function (channelName, amount) {\n\t        if (!Buses.hasOwnProperty(channelName)) {\n\t            Buses[channelName] = this.context.createGain();\n\t        }\n\t        amount = Tone.defaultArg(amount, 0);\n\t        var sendKnob = new Tone.Gain(amount, Tone.Type.Decibels);\n\t        this.connect(sendKnob);\n\t        sendKnob.connect(Buses[channelName]);\n\t        return sendKnob;\n\t    };\n\t    /**\n\t\t *  Recieve the input from the desired channelName to the input\n\t\t *\n\t\t *  @param  {String} channelName A named channel to send the signal to.\n\t\t *  @param  {Number=} channelNumber The channel to connect to\n\t\t *  @returns {Tone} this\n\t\t *  @example\n\t\t * reverbEffect.receive(\"reverb\");\n\t\t */\n\t    Tone.prototype.receive = function (channelName, inputNum) {\n\t        if (!Buses.hasOwnProperty(channelName)) {\n\t            Buses[channelName] = this.context.createGain();\n\t        }\n\t        Buses[channelName].connect(this, 0, inputNum);\n\t        return this;\n\t    };\n\t    //remove all the send/receives when a new audio context is passed in\n\t    Tone.Context.on('init', function (context) {\n\t        if (context.Buses) {\n\t            Buses = context.Buses;\n\t        } else {\n\t            Buses = {};\n\t            context.Buses = Buses;\n\t        }\n\t    });\n\t    return Tone;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Draw is useful for synchronizing visuals and audio events.\n\t\t *         Callbacks from Tone.Transport or any of the Tone.Event classes\n\t\t *         always happen _before_ the scheduled time and are not synchronized\n\t\t *         to the animation frame so they are not good for triggering tightly\n\t\t *         synchronized visuals and sound. Tone.Draw makes it easy to schedule\n\t\t *         callbacks using the AudioContext time and uses requestAnimationFrame.\n\t\t *         \n\t\t *  @singleton\n\t\t *  @extends {Tone}\n\t\t *  @example\n\t\t * Tone.Transport.schedule(function(time){\n\t\t * \t//use the time argument to schedule a callback with Tone.Draw\n\t\t * \tTone.Draw.schedule(function(){\n\t\t * \t\t//do drawing or DOM manipulation here\n\t\t * \t}, time)\n\t\t * }, \"+0.5\")\n\t\t */\n\t    Tone.Draw = function () {\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  All of the events.\n\t\t\t *  @type  {Tone.Timeline}\n\t\t\t *  @private\n\t\t\t */\n\t        this._events = new Tone.Timeline();\n\t        /**\n\t\t\t *  The duration after which events are not invoked.\n\t\t\t *  @type  {Number}\n\t\t\t *  @default 0.25\n\t\t\t */\n\t        this.expiration = 0.25;\n\t        /**\n\t\t\t *  The amount of time before the scheduled time \n\t\t\t *  that the callback can be invoked. Default is\n\t\t\t *  half the time of an animation frame (0.008 seconds).\n\t\t\t *  @type  {Number}\n\t\t\t *  @default 0.008\n\t\t\t */\n\t        this.anticipation = 0.008;\n\t        /**\n\t\t\t *  The draw loop\n\t\t\t *  @type  {Function}\n\t\t\t *  @private\n\t\t\t */\n\t        this._boundDrawLoop = this._drawLoop.bind(this);\n\t    };\n\t    Tone.extend(Tone.Draw);\n\t    /**\n\t\t *  Schedule a function at the given time to be invoked\n\t\t *  on the nearest animation frame.\n\t\t *  @param  {Function}  callback  Callback is invoked at the given time.\n\t\t *  @param  {Time}    time      The time relative to the AudioContext time\n\t\t *                              to invoke the callback.\n\t\t *  @return  {Tone.Draw}    this\n\t\t */\n\t    Tone.Draw.prototype.schedule = function (callback, time) {\n\t        this._events.add({\n\t            callback: callback,\n\t            time: this.toSeconds(time)\n\t        });\n\t        //start the draw loop on the first event\n\t        if (this._events.length === 1) {\n\t            requestAnimationFrame(this._boundDrawLoop);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancel events scheduled after the given time\n\t\t *  @param  {Time=}  after  Time after which scheduled events will \n\t\t *                          be removed from the scheduling timeline.\n\t\t *  @return  {Tone.Draw}  this\n\t\t */\n\t    Tone.Draw.prototype.cancel = function (after) {\n\t        this._events.cancel(this.toSeconds(after));\n\t        return this;\n\t    };\n\t    /**\n\t\t *  The draw loop\n\t\t *  @private\n\t\t */\n\t    Tone.Draw.prototype._drawLoop = function () {\n\t        var now = Tone.now();\n\t        while (this._events.length && this._events.peek().time - this.anticipation <= now) {\n\t            var event = this._events.shift();\n\t            if (now - event.time <= this.expiration) {\n\t                event.callback();\n\t            }\n\t        }\n\t        if (this._events.length > 0) {\n\t            requestAnimationFrame(this._boundDrawLoop);\n\t        }\n\t    };\n\t    //make a singleton\n\t    Tone.Draw = new Tone.Draw();\n\t    return Tone.Draw;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Both Tone.Panner3D and Tone.Listener have a position in 3D space\n\t\t *          using a right-handed cartesian coordinate system.\n\t\t *          The units used in the coordinate system are not defined;\n\t\t *          these coordinates are independent/invariant of any particular\n\t\t *          units such as meters or feet. Tone.Panner3D objects have an forward\n\t\t *          vector representing the direction the sound is projecting. Additionally,\n\t\t *          they have a sound cone representing how directional the sound is.\n\t\t *          For example, the sound could be omnidirectional, in which case it would\n\t\t *          be heard anywhere regardless of its forward, or it can be more directional\n\t\t *          and heard only if it is facing the listener. Tone.Listener objects\n\t\t *          (representing a person's ears) have an forward and up vector\n\t\t *          representing in which direction the person is facing. Because both the\n\t\t *          source stream and the listener can be moving, they both have a velocity\n\t\t *          vector representing both the speed and direction of movement. Taken together,\n\t\t *          these two velocities can be used to generate a doppler shift effect which changes the pitch.\n\t\t *          <br><br>\n\t\t *          Note: the position of the Listener will have no effect on nodes not connected to a Tone.Panner3D\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone}\n\t\t *  @singleton\n\t\t */\n\t    Tone.Listener = function () {\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  Holds the current forward orientation\n\t\t\t *  @type  {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._orientation = [\n\t            0,\n\t            0,\n\t            0,\n\t            0,\n\t            0,\n\t            0\n\t        ];\n\t        /**\n\t\t\t *  Holds the current position\n\t\t\t *  @type  {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._position = [\n\t            0,\n\t            0,\n\t            0\n\t        ];\n\t        Tone.getContext(function () {\n\t            // set the default position/forward\n\t            this.set(ListenerConstructor.defaults);\n\t        }.bind(this));\n\t    };\n\t    Tone.extend(Tone.Listener);\n\t    /**\n\t\t *  Defaults according to the specification\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Listener.defaults = {\n\t        'positionX': 0,\n\t        'positionY': 0,\n\t        'positionZ': 0,\n\t        'forwardX': 0,\n\t        'forwardY': 0,\n\t        'forwardZ': 1,\n\t        'upX': 0,\n\t        'upY': 1,\n\t        'upZ': 0\n\t    };\n\t    /**\n\t\t * The ramp time which is applied to the setTargetAtTime\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t    Tone.Listener.prototype._rampTimeConstant = 0.01;\n\t    /**\n\t\t *  Sets the position of the listener in 3d space.\n\t\t *  @param  {Number}  x\n\t\t *  @param  {Number}  y\n\t\t *  @param  {Number}  z\n\t\t *  @return {Tone.Listener} this\n\t\t */\n\t    Tone.Listener.prototype.setPosition = function (x, y, z) {\n\t        if (this.context.listener.positionX) {\n\t            var now = this.now();\n\t            this.context.listener.positionX.setTargetAtTime(x, now, this._rampTimeConstant);\n\t            this.context.listener.positionY.setTargetAtTime(y, now, this._rampTimeConstant);\n\t            this.context.listener.positionZ.setTargetAtTime(z, now, this._rampTimeConstant);\n\t        } else {\n\t            this.context.listener.setPosition(x, y, z);\n\t        }\n\t        this._position = Array.prototype.slice.call(arguments);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Sets the orientation of the listener using two vectors, the forward\n\t\t *  vector (which direction the listener is facing) and the up vector\n\t\t *  (which the up direction of the listener). An up vector\n\t\t *  of 0, 0, 1 is equivalent to the listener standing up in the Z direction.\n\t\t *  @param  {Number}  x\n\t\t *  @param  {Number}  y\n\t\t *  @param  {Number}  z\n\t\t *  @param  {Number}  upX\n\t\t *  @param  {Number}  upY\n\t\t *  @param  {Number}  upZ\n\t\t *  @return {Tone.Listener} this\n\t\t */\n\t    Tone.Listener.prototype.setOrientation = function (x, y, z, upX, upY, upZ) {\n\t        if (this.context.listener.forwardX) {\n\t            var now = this.now();\n\t            this.context.listener.forwardX.setTargetAtTime(x, now, this._rampTimeConstant);\n\t            this.context.listener.forwardY.setTargetAtTime(y, now, this._rampTimeConstant);\n\t            this.context.listener.forwardZ.setTargetAtTime(z, now, this._rampTimeConstant);\n\t            this.context.listener.upX.setTargetAtTime(upX, now, this._rampTimeConstant);\n\t            this.context.listener.upY.setTargetAtTime(upY, now, this._rampTimeConstant);\n\t            this.context.listener.upZ.setTargetAtTime(upZ, now, this._rampTimeConstant);\n\t        } else {\n\t            this.context.listener.setOrientation(x, y, z, upX, upY, upZ);\n\t        }\n\t        this._orientation = Array.prototype.slice.call(arguments);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  The x position of the panner object.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Listener#\n\t\t *  @name positionX\n\t\t */\n\t    Object.defineProperty(Tone.Listener.prototype, 'positionX', {\n\t        set: function (pos) {\n\t            this._position[0] = pos;\n\t            this.setPosition.apply(this, this._position);\n\t        },\n\t        get: function () {\n\t            return this._position[0];\n\t        }\n\t    });\n\t    /**\n\t\t *  The y position of the panner object.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Listener#\n\t\t *  @name positionY\n\t\t */\n\t    Object.defineProperty(Tone.Listener.prototype, 'positionY', {\n\t        set: function (pos) {\n\t            this._position[1] = pos;\n\t            this.setPosition.apply(this, this._position);\n\t        },\n\t        get: function () {\n\t            return this._position[1];\n\t        }\n\t    });\n\t    /**\n\t\t *  The z position of the panner object.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Listener#\n\t\t *  @name positionZ\n\t\t */\n\t    Object.defineProperty(Tone.Listener.prototype, 'positionZ', {\n\t        set: function (pos) {\n\t            this._position[2] = pos;\n\t            this.setPosition.apply(this, this._position);\n\t        },\n\t        get: function () {\n\t            return this._position[2];\n\t        }\n\t    });\n\t    /**\n\t\t *  The x coordinate of the listeners front direction. i.e.\n\t\t *  which way they are facing.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Listener#\n\t\t *  @name forwardX\n\t\t */\n\t    Object.defineProperty(Tone.Listener.prototype, 'forwardX', {\n\t        set: function (pos) {\n\t            this._orientation[0] = pos;\n\t            this.setOrientation.apply(this, this._orientation);\n\t        },\n\t        get: function () {\n\t            return this._orientation[0];\n\t        }\n\t    });\n\t    /**\n\t\t *  The y coordinate of the listeners front direction. i.e.\n\t\t *  which way they are facing.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Listener#\n\t\t *  @name forwardY\n\t\t */\n\t    Object.defineProperty(Tone.Listener.prototype, 'forwardY', {\n\t        set: function (pos) {\n\t            this._orientation[1] = pos;\n\t            this.setOrientation.apply(this, this._orientation);\n\t        },\n\t        get: function () {\n\t            return this._orientation[1];\n\t        }\n\t    });\n\t    /**\n\t\t *  The z coordinate of the listeners front direction. i.e.\n\t\t *  which way they are facing.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Listener#\n\t\t *  @name forwardZ\n\t\t */\n\t    Object.defineProperty(Tone.Listener.prototype, 'forwardZ', {\n\t        set: function (pos) {\n\t            this._orientation[2] = pos;\n\t            this.setOrientation.apply(this, this._orientation);\n\t        },\n\t        get: function () {\n\t            return this._orientation[2];\n\t        }\n\t    });\n\t    /**\n\t\t *  The x coordinate of the listener's up direction. i.e.\n\t\t *  the direction the listener is standing in.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Listener#\n\t\t *  @name upX\n\t\t */\n\t    Object.defineProperty(Tone.Listener.prototype, 'upX', {\n\t        set: function (pos) {\n\t            this._orientation[3] = pos;\n\t            this.setOrientation.apply(this, this._orientation);\n\t        },\n\t        get: function () {\n\t            return this._orientation[3];\n\t        }\n\t    });\n\t    /**\n\t\t *  The y coordinate of the listener's up direction. i.e.\n\t\t *  the direction the listener is standing in.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Listener#\n\t\t *  @name upY\n\t\t */\n\t    Object.defineProperty(Tone.Listener.prototype, 'upY', {\n\t        set: function (pos) {\n\t            this._orientation[4] = pos;\n\t            this.setOrientation.apply(this, this._orientation);\n\t        },\n\t        get: function () {\n\t            return this._orientation[4];\n\t        }\n\t    });\n\t    /**\n\t\t *  The z coordinate of the listener's up direction. i.e.\n\t\t *  the direction the listener is standing in.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Listener#\n\t\t *  @name upZ\n\t\t */\n\t    Object.defineProperty(Tone.Listener.prototype, 'upZ', {\n\t        set: function (pos) {\n\t            this._orientation[5] = pos;\n\t            this.setOrientation.apply(this, this._orientation);\n\t        },\n\t        get: function () {\n\t            return this._orientation[5];\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Listener} this\n\t\t */\n\t    Tone.Listener.prototype.dispose = function () {\n\t        this._orientation = null;\n\t        this._position = null;\n\t        return this;\n\t    };\n\t    //SINGLETON SETUP\n\t    var ListenerConstructor = Tone.Listener;\n\t    Tone.Listener = new ListenerConstructor();\n\t    Tone.Context.on('init', function (context) {\n\t        if (context.Listener instanceof ListenerConstructor) {\n\t            //a single listener object\n\t            Tone.Listener = context.Listener;\n\t        } else {\n\t            //make new Listener insides\n\t            Tone.Listener = new ListenerConstructor();\n\t        }\n\t        context.Listener = Tone.Listener;\n\t    });\n\t    //END SINGLETON SETUP\n\t    return Tone.Listener;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t * Because of a bug in iOS causing the currentTime to increment\n\t\t * before the rendering is started, sometimes it takes multiple\n\t\t * attempts to render the audio correctly.\n\t\t * @private\n\t\t */\n\t    function attemptRender(callback, duration, sampleRate, tries) {\n\t        tries = Tone.defaultArg(tries, 0);\n\t        var context = new Tone.OfflineContext(2, duration, sampleRate);\n\t        Tone.context = context;\n\t        //invoke the callback/scheduling\n\t        var response = callback(Tone.Transport);\n\t        if (context.currentTime > 0 && tries < 1000) {\n\t            return attemptRender(callback, duration, sampleRate, ++tries);\n\t        } else {\n\t            return {\n\t                'response': response,\n\t                'context': context\n\t            };\n\t        }\n\t    }\n\t    /**\n\t\t *  Generate a buffer by rendering all of the Tone.js code within the callback using the OfflineAudioContext.\n\t\t *  The OfflineAudioContext is capable of rendering much faster than real time in many cases.\n\t\t *  The callback function also passes in an offline instance of Tone.Transport which can be used\n\t\t *  to schedule events along the Transport. **NOTE** OfflineAudioContext has the same restrictions\n\t\t *  as the AudioContext in that on certain platforms (like iOS) it must be invoked by an explicit\n\t\t *  user action like a click or tap. \n\t\t *  @param  {Function}  callback  All Tone.js nodes which are created and scheduled within this callback are recorded into the output Buffer.\n\t\t *  @param  {Time}  duration     the amount of time to record for.\n\t\t *  @return  {Promise}  The promise which is invoked with the Tone.Buffer of the recorded output.\n\t\t *  @example\n\t\t * //render 2 seconds of the oscillator\n\t\t * Tone.Offline(function(){\n\t\t * \t//only nodes created in this callback will be recorded\n\t\t * \tvar oscillator = new Tone.Oscillator().toMaster().start(0)\n\t\t * \t//schedule their events\n\t\t * }, 2).then(function(buffer){\n\t\t * \t//do something with the output buffer\n\t\t * })\n\t\t * @example\n\t\t * //can also schedule events along the Transport\n\t\t * //using the passed in Offline Transport\n\t\t * Tone.Offline(function(Transport){\n\t\t * \tvar osc = new Tone.Oscillator().toMaster()\n\t\t * \tTransport.schedule(function(time){\n\t\t * \t\tosc.start(time).stop(time + 0.1)\n\t\t * \t}, 1)\n\t\t * \tTransport.start(0.2)\n\t\t * }, 4).then(function(buffer){\n\t\t * \t//do something with the output buffer\n\t\t * })\n\t\t */\n\t    Tone.Offline = function (callback, duration) {\n\t        //set the OfflineAudioContext\n\t        var sampleRate = Tone.context.sampleRate;\n\t        var originalContext = Tone.context;\n\t        var renderRet = attemptRender(callback, duration, sampleRate);\n\t        var response = renderRet.response;\n\t        var context = renderRet.context;\n\t        var ret;\n\t        if (response instanceof Promise) {\n\t            //wait for the promise to resolve\n\t            ret = response.then(function () {\n\t                //then render the audio\n\t                return context.render();\n\t            });\n\t        } else {\n\t            //process the audio\n\t            ret = context.render();\n\t        }\n\t        //return the original AudioContext\n\t        Tone.context = originalContext;\n\t        //return the audio\n\t        return ret.then(function (buffer) {\n\t            //wrap it in a Tone.Buffer\n\t            return new Tone.Buffer(buffer);\n\t        });\n\t    };\n\t    return Tone.Offline;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t * \t@class  Tone.Effect is the base class for effects. Connect the effect between\n\t\t * \t        the effectSend and effectReturn GainNodes, then control the amount of\n\t\t * \t        effect which goes to the output using the wet control.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {NormalRange|Object} [wet] The starting wet value.\n\t\t */\n\t    Tone.Effect = function () {\n\t        var options = Tone.defaults(arguments, ['wet'], Tone.Effect);\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(1, 1);\n\t        /**\n\t\t\t *  the drywet knob to control the amount of effect\n\t\t\t *  @type {Tone.CrossFade}\n\t\t\t *  @private\n\t\t\t */\n\t        this._dryWet = new Tone.CrossFade(options.wet);\n\t        /**\n\t\t\t *  The wet control is how much of the effected\n\t\t\t *  will pass through to the output. 1 = 100% effected\n\t\t\t *  signal, 0 = 100% dry signal.\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.wet = this._dryWet.fade;\n\t        /**\n\t\t\t *  connect the effectSend to the input of hte effect\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this.effectSend = new Tone.Gain();\n\t        /**\n\t\t\t *  connect the output of the effect to the effectReturn\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this.effectReturn = new Tone.Gain();\n\t        //connections\n\t        this.input.connect(this._dryWet.a);\n\t        this.input.connect(this.effectSend);\n\t        this.effectReturn.connect(this._dryWet.b);\n\t        this._dryWet.connect(this.output);\n\t        this._readOnly(['wet']);\n\t    };\n\t    Tone.extend(Tone.Effect, Tone.AudioNode);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Effect.defaults = { 'wet': 1 };\n\t    /**\n\t\t *  chains the effect in between the effectSend and effectReturn\n\t\t *  @param  {Tone} effect\n\t\t *  @private\n\t\t *  @returns {Tone.Effect} this\n\t\t */\n\t    Tone.Effect.prototype.connectEffect = function (effect) {\n\t        this.effectSend.chain(effect, this.effectReturn);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Effect} this\n\t\t */\n\t    Tone.Effect.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._dryWet.dispose();\n\t        this._dryWet = null;\n\t        this.effectSend.dispose();\n\t        this.effectSend = null;\n\t        this.effectReturn.dispose();\n\t        this.effectReturn = null;\n\t        this._writable(['wet']);\n\t        this.wet = null;\n\t        return this;\n\t    };\n\t    return Tone.Effect;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.AutoFilter is a Tone.Filter with a Tone.LFO connected to the filter cutoff frequency.\n\t\t *         Setting the LFO rate and depth allows for control over the filter modulation rate \n\t\t *         and depth.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Effect}\n\t\t *  @param {Time|Object} [frequency] The rate of the LFO.\n\t\t *  @param {Frequency=} baseFrequency The lower value of the LFOs oscillation\n\t \t *  @param {Frequency=} octaves The number of octaves above the baseFrequency\n\t\t *  @example\n\t\t * //create an autofilter and start it's LFO\n\t\t * var autoFilter = new Tone.AutoFilter(\"4n\").toMaster().start();\n\t\t * //route an oscillator through the filter and start it\n\t\t * var oscillator = new Tone.Oscillator().connect(autoFilter).start();\n\t\t */\n\t    Tone.AutoFilter = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'baseFrequency',\n\t            'octaves'\n\t        ], Tone.AutoFilter);\n\t        Tone.Effect.call(this, options);\n\t        /**\n\t\t\t *  the lfo which drives the filter cutoff\n\t\t\t *  @type {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfo = new Tone.LFO({\n\t            'frequency': options.frequency,\n\t            'amplitude': options.depth\n\t        });\n\t        /**\n\t\t\t * The range of the filter modulating between the min and max frequency. \n\t\t\t * 0 = no modulation. 1 = full modulation.\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t        this.depth = this._lfo.amplitude;\n\t        /**\n\t\t\t * How fast the filter modulates between min and max. \n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t        this.frequency = this._lfo.frequency;\n\t        /**\n\t\t\t *  The filter node\n\t\t\t *  @type {Tone.Filter}\n\t\t\t */\n\t        this.filter = new Tone.Filter(options.filter);\n\t        /**\n\t\t\t *  The octaves placeholder\n\t\t\t *  @type {Positive}\n\t\t\t *  @private\n\t\t\t */\n\t        this._octaves = 0;\n\t        //connections\n\t        this.connectEffect(this.filter);\n\t        this._lfo.connect(this.filter.frequency);\n\t        this.type = options.type;\n\t        this._readOnly([\n\t            'frequency',\n\t            'depth'\n\t        ]);\n\t        this.octaves = options.octaves;\n\t        this.baseFrequency = options.baseFrequency;\n\t    };\n\t    //extend Effect\n\t    Tone.extend(Tone.AutoFilter, Tone.Effect);\n\t    /**\n\t\t *  defaults\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.AutoFilter.defaults = {\n\t        'frequency': 1,\n\t        'type': 'sine',\n\t        'depth': 1,\n\t        'baseFrequency': 200,\n\t        'octaves': 2.6,\n\t        'filter': {\n\t            'type': 'lowpass',\n\t            'rolloff': -12,\n\t            'Q': 1\n\t        }\n\t    };\n\t    /**\n\t\t * Start the effect.\n\t\t * @param {Time} [time=now] When the LFO will start. \n\t\t * @returns {Tone.AutoFilter} this\n\t\t */\n\t    Tone.AutoFilter.prototype.start = function (time) {\n\t        this._lfo.start(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Stop the effect.\n\t\t * @param {Time} [time=now] When the LFO will stop. \n\t\t * @returns {Tone.AutoFilter} this\n\t\t */\n\t    Tone.AutoFilter.prototype.stop = function (time) {\n\t        this._lfo.stop(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Sync the filter to the transport.\n\t\t * @param {Time} [delay=0] Delay time before starting the effect after the\n\t\t *                               Transport has started. \n\t\t * @returns {Tone.AutoFilter} this\n\t\t */\n\t    Tone.AutoFilter.prototype.sync = function (delay) {\n\t        this._lfo.sync(delay);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Unsync the filter from the transport.\n\t\t * @returns {Tone.AutoFilter} this\n\t\t */\n\t    Tone.AutoFilter.prototype.unsync = function () {\n\t        this._lfo.unsync();\n\t        return this;\n\t    };\n\t    /**\n\t\t * Type of oscillator attached to the AutoFilter. \n\t\t * Possible values: \"sine\", \"square\", \"triangle\", \"sawtooth\".\n\t\t * @memberOf Tone.AutoFilter#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.AutoFilter.prototype, 'type', {\n\t        get: function () {\n\t            return this._lfo.type;\n\t        },\n\t        set: function (type) {\n\t            this._lfo.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t * The minimum value of the filter's cutoff frequency.\n\t\t * @memberOf Tone.AutoFilter#\n\t\t * @type {Frequency}\n\t\t * @name min\n\t\t */\n\t    Object.defineProperty(Tone.AutoFilter.prototype, 'baseFrequency', {\n\t        get: function () {\n\t            return this._lfo.min;\n\t        },\n\t        set: function (freq) {\n\t            this._lfo.min = this.toFrequency(freq);\n\t            //and set the max\n\t            this.octaves = this._octaves;\n\t        }\n\t    });\n\t    /**\n\t\t * The maximum value of the filter's cutoff frequency. \n\t\t * @memberOf Tone.AutoFilter#\n\t\t * @type {Positive}\n\t\t * @name octaves\n\t\t */\n\t    Object.defineProperty(Tone.AutoFilter.prototype, 'octaves', {\n\t        get: function () {\n\t            return this._octaves;\n\t        },\n\t        set: function (oct) {\n\t            this._octaves = oct;\n\t            this._lfo.max = this.baseFrequency * Math.pow(2, oct);\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up. \n\t\t *  @returns {Tone.AutoFilter} this\n\t\t */\n\t    Tone.AutoFilter.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._lfo.dispose();\n\t        this._lfo = null;\n\t        this.filter.dispose();\n\t        this.filter = null;\n\t        this._writable([\n\t            'frequency',\n\t            'depth'\n\t        ]);\n\t        this.frequency = null;\n\t        this.depth = null;\n\t        return this;\n\t    };\n\t    return Tone.AutoFilter;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.AutoPanner is a Tone.Panner with an LFO connected to the pan amount. \n\t\t *         More on using autopanners [here](https://www.ableton.com/en/blog/autopan-chopper-effect-and-more-liveschool/).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Effect}\n\t\t *  @param {Frequency|Object} [frequency] Rate of left-right oscillation. \n\t\t *  @example\n\t\t * //create an autopanner and start it's LFO\n\t\t * var autoPanner = new Tone.AutoPanner(\"4n\").toMaster().start();\n\t\t * //route an oscillator through the panner and start it\n\t\t * var oscillator = new Tone.Oscillator().connect(autoPanner).start();\n\t\t */\n\t    Tone.AutoPanner = function () {\n\t        var options = Tone.defaults(arguments, ['frequency'], Tone.AutoPanner);\n\t        Tone.Effect.call(this, options);\n\t        /**\n\t\t\t *  the lfo which drives the panning\n\t\t\t *  @type {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfo = new Tone.LFO({\n\t            'frequency': options.frequency,\n\t            'amplitude': options.depth,\n\t            'min': -1,\n\t            'max': 1\n\t        });\n\t        /**\n\t\t\t * The amount of panning between left and right. \n\t\t\t * 0 = always center. 1 = full range between left and right. \n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t        this.depth = this._lfo.amplitude;\n\t        /**\n\t\t\t *  the panner node which does the panning\n\t\t\t *  @type {Tone.Panner}\n\t\t\t *  @private\n\t\t\t */\n\t        this._panner = new Tone.Panner();\n\t        /**\n\t\t\t * How fast the panner modulates between left and right. \n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t        this.frequency = this._lfo.frequency;\n\t        //connections\n\t        this.connectEffect(this._panner);\n\t        this._lfo.connect(this._panner.pan);\n\t        this.type = options.type;\n\t        this._readOnly([\n\t            'depth',\n\t            'frequency'\n\t        ]);\n\t    };\n\t    //extend Effect\n\t    Tone.extend(Tone.AutoPanner, Tone.Effect);\n\t    /**\n\t\t *  defaults\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.AutoPanner.defaults = {\n\t        'frequency': 1,\n\t        'type': 'sine',\n\t        'depth': 1\n\t    };\n\t    /**\n\t\t * Start the effect.\n\t\t * @param {Time} [time=now] When the LFO will start. \n\t\t * @returns {Tone.AutoPanner} this\n\t\t */\n\t    Tone.AutoPanner.prototype.start = function (time) {\n\t        this._lfo.start(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Stop the effect.\n\t\t * @param {Time} [time=now] When the LFO will stop. \n\t\t * @returns {Tone.AutoPanner} this\n\t\t */\n\t    Tone.AutoPanner.prototype.stop = function (time) {\n\t        this._lfo.stop(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Sync the panner to the transport.\n\t\t * @param {Time} [delay=0] Delay time before starting the effect after the\n\t\t *                               Transport has started. \n\t\t * @returns {Tone.AutoPanner} this\n\t\t */\n\t    Tone.AutoPanner.prototype.sync = function (delay) {\n\t        this._lfo.sync(delay);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Unsync the panner from the transport\n\t\t * @returns {Tone.AutoPanner} this\n\t\t */\n\t    Tone.AutoPanner.prototype.unsync = function () {\n\t        this._lfo.unsync();\n\t        return this;\n\t    };\n\t    /**\n\t\t * Type of oscillator attached to the AutoFilter. \n\t\t * Possible values: \"sine\", \"square\", \"triangle\", \"sawtooth\".\n\t\t * @memberOf Tone.AutoFilter#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.AutoPanner.prototype, 'type', {\n\t        get: function () {\n\t            return this._lfo.type;\n\t        },\n\t        set: function (type) {\n\t            this._lfo.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.AutoPanner} this\n\t\t */\n\t    Tone.AutoPanner.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._lfo.dispose();\n\t        this._lfo = null;\n\t        this._panner.dispose();\n\t        this._panner = null;\n\t        this._writable([\n\t            'depth',\n\t            'frequency'\n\t        ]);\n\t        this.frequency = null;\n\t        this.depth = null;\n\t        return this;\n\t    };\n\t    return Tone.AutoPanner;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.AutoWah connects a Tone.Follower to a bandpass filter (Tone.Filter).\n\t\t *          The frequency of the filter is adjusted proportionally to the\n\t\t *          incoming signal's amplitude. Inspiration from [Tuna.js](https://github.com/Dinahmoe/tuna).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Effect}\n\t\t *  @param {Frequency|Object} [baseFrequency] The frequency the filter is set\n\t\t *                                            to at the low point of the wah\n\t\t *  @param {Positive} [octaves] The number of octaves above the baseFrequency\n\t\t *                                the filter will sweep to when fully open\n\t\t *  @param {Decibels} [sensitivity] The decibel threshold sensitivity for\n\t\t *                                   the incoming signal. Normal range of -40 to 0.\n\t\t *  @example\n\t\t * var autoWah = new Tone.AutoWah(50, 6, -30).toMaster();\n\t\t * //initialize the synth and connect to autowah\n\t\t * var synth = new Synth.connect(autoWah);\n\t\t * //Q value influences the effect of the wah - default is 2\n\t\t * autoWah.Q.value = 6;\n\t\t * //more audible on higher notes\n\t\t * synth.triggerAttackRelease(\"C4\", \"8n\")\n\t\t */\n\t    Tone.AutoWah = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'baseFrequency',\n\t            'octaves',\n\t            'sensitivity'\n\t        ], Tone.AutoWah);\n\t        Tone.Effect.call(this, options);\n\t        /**\n\t\t\t *  The envelope follower. Set the attack/release\n\t\t\t *  timing to adjust how the envelope is followed.\n\t\t\t *  @type {Tone.Follower}\n\t\t\t *  @private\n\t\t\t */\n\t        this.follower = new Tone.Follower(options.follower);\n\t        /**\n\t\t\t *  scales the follower value to the frequency domain\n\t\t\t *  @type {Tone}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sweepRange = new Tone.ScaleExp(0, 1, 0.5);\n\t        /**\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._baseFrequency = options.baseFrequency;\n\t        /**\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._octaves = options.octaves;\n\t        /**\n\t\t\t *  the input gain to adjust the sensitivity\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._inputBoost = new Tone.Gain();\n\t        /**\n\t\t\t *  @type {BiquadFilterNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._bandpass = new Tone.Filter({\n\t            'rolloff': -48,\n\t            'frequency': 0,\n\t            'Q': options.Q\n\t        });\n\t        /**\n\t\t\t *  @type {Tone.Filter}\n\t\t\t *  @private\n\t\t\t */\n\t        this._peaking = new Tone.Filter(0, 'peaking');\n\t        this._peaking.gain.value = options.gain;\n\t        /**\n\t\t\t * The gain of the filter.\n\t\t\t * @type {Number}\n\t\t\t * @signal\n\t\t\t */\n\t        this.gain = this._peaking.gain;\n\t        /**\n\t\t\t * The quality of the filter.\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t */\n\t        this.Q = this._bandpass.Q;\n\t        //the control signal path\n\t        this.effectSend.chain(this._inputBoost, this.follower, this._sweepRange);\n\t        this._sweepRange.connect(this._bandpass.frequency);\n\t        this._sweepRange.connect(this._peaking.frequency);\n\t        //the filtered path\n\t        this.effectSend.chain(this._bandpass, this._peaking, this.effectReturn);\n\t        //set the initial value\n\t        this._setSweepRange();\n\t        this.sensitivity = options.sensitivity;\n\t        this._readOnly([\n\t            'gain',\n\t            'Q'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.AutoWah, Tone.Effect);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.AutoWah.defaults = {\n\t        'baseFrequency': 100,\n\t        'octaves': 6,\n\t        'sensitivity': 0,\n\t        'Q': 2,\n\t        'gain': 2,\n\t        'follower': {\n\t            'attack': 0.3,\n\t            'release': 0.5\n\t        }\n\t    };\n\t    /**\n\t\t * The number of octaves that the filter will sweep above the\n\t\t * baseFrequency.\n\t\t * @memberOf Tone.AutoWah#\n\t\t * @type {Number}\n\t\t * @name octaves\n\t\t */\n\t    Object.defineProperty(Tone.AutoWah.prototype, 'octaves', {\n\t        get: function () {\n\t            return this._octaves;\n\t        },\n\t        set: function (octaves) {\n\t            this._octaves = octaves;\n\t            this._setSweepRange();\n\t        }\n\t    });\n\t    /**\n\t\t * The base frequency from which the sweep will start from.\n\t\t * @memberOf Tone.AutoWah#\n\t\t * @type {Frequency}\n\t\t * @name baseFrequency\n\t\t */\n\t    Object.defineProperty(Tone.AutoWah.prototype, 'baseFrequency', {\n\t        get: function () {\n\t            return this._baseFrequency;\n\t        },\n\t        set: function (baseFreq) {\n\t            this._baseFrequency = baseFreq;\n\t            this._setSweepRange();\n\t        }\n\t    });\n\t    /**\n\t\t * The sensitivity to control how responsive to the input signal the filter is.\n\t\t * @memberOf Tone.AutoWah#\n\t\t * @type {Decibels}\n\t\t * @name sensitivity\n\t\t */\n\t    Object.defineProperty(Tone.AutoWah.prototype, 'sensitivity', {\n\t        get: function () {\n\t            return Tone.gainToDb(1 / this._inputBoost.gain.value);\n\t        },\n\t        set: function (sensitivy) {\n\t            this._inputBoost.gain.value = 1 / Tone.dbToGain(sensitivy);\n\t        }\n\t    });\n\t    /**\n\t\t *  sets the sweep range of the scaler\n\t\t *  @private\n\t\t */\n\t    Tone.AutoWah.prototype._setSweepRange = function () {\n\t        this._sweepRange.min = this._baseFrequency;\n\t        this._sweepRange.max = Math.min(this._baseFrequency * Math.pow(2, this._octaves), this.context.sampleRate / 2);\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.AutoWah} this\n\t\t */\n\t    Tone.AutoWah.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this.follower.dispose();\n\t        this.follower = null;\n\t        this._sweepRange.dispose();\n\t        this._sweepRange = null;\n\t        this._bandpass.dispose();\n\t        this._bandpass = null;\n\t        this._peaking.dispose();\n\t        this._peaking = null;\n\t        this._inputBoost.dispose();\n\t        this._inputBoost = null;\n\t        this._writable([\n\t            'gain',\n\t            'Q'\n\t        ]);\n\t        this.gain = null;\n\t        this.Q = null;\n\t        return this;\n\t    };\n\t    return Tone.AutoWah;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Signal-rate modulo operator. Only works in AudioRange [-1, 1] and for modulus\n\t\t *         values in the NormalRange.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @param {NormalRange} modulus The modulus to apply.\n\t\t *  @example\n\t\t * var mod = new Tone.Modulo(0.2)\n\t\t * var sig = new Tone.Signal(0.5).connect(mod);\n\t\t * //mod outputs 0.1\n\t\t */\n\t    Tone.Modulo = function (modulus) {\n\t        Tone.SignalBase.call(this);\n\t        this.createInsOuts(1, 0);\n\t        /**\n\t\t\t *  A waveshaper gets the integer multiple of\n\t\t\t *  the input signal and the modulus.\n\t\t\t *  @private\n\t\t\t *  @type {Tone.WaveShaper}\n\t\t\t */\n\t        this._shaper = new Tone.WaveShaper(Math.pow(2, 16));\n\t        /**\n\t\t\t *  the integer multiple is multiplied by the modulus\n\t\t\t *  @type  {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._multiply = new Tone.Multiply();\n\t        /**\n\t\t\t *  and subtracted from the input signal\n\t\t\t *  @type  {Tone.Subtract}\n\t\t\t *  @private\n\t\t\t */\n\t        this._subtract = this.output = new Tone.Subtract();\n\t        /**\n\t\t\t *  the modulus signal\n\t\t\t *  @type  {Tone.Signal}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modSignal = new Tone.Signal(modulus);\n\t        //connections\n\t        this.input.fan(this._shaper, this._subtract);\n\t        this._modSignal.connect(this._multiply, 0, 0);\n\t        this._shaper.connect(this._multiply, 0, 1);\n\t        this._multiply.connect(this._subtract, 0, 1);\n\t        this._setWaveShaper(modulus);\n\t    };\n\t    Tone.extend(Tone.Modulo, Tone.SignalBase);\n\t    /**\n\t\t *  @param  {number}  mod  the modulus to apply\n\t\t *  @private\n\t\t */\n\t    Tone.Modulo.prototype._setWaveShaper = function (mod) {\n\t        this._shaper.setMap(function (val) {\n\t            var multiple = Math.floor((val + 0.0001) / mod);\n\t            return multiple;\n\t        });\n\t    };\n\t    /**\n\t\t * The modulus value.\n\t\t * @memberOf Tone.Modulo#\n\t\t * @type {NormalRange}\n\t\t * @name value\n\t\t */\n\t    Object.defineProperty(Tone.Modulo.prototype, 'value', {\n\t        get: function () {\n\t            return this._modSignal.value;\n\t        },\n\t        set: function (mod) {\n\t            this._modSignal.value = mod;\n\t            this._setWaveShaper(mod);\n\t        }\n\t    });\n\t    /**\n\t\t * clean up\n\t\t *  @returns {Tone.Modulo} this\n\t\t */\n\t    Tone.Modulo.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._shaper.dispose();\n\t        this._shaper = null;\n\t        this._multiply.dispose();\n\t        this._multiply = null;\n\t        this._subtract.dispose();\n\t        this._subtract = null;\n\t        this._modSignal.dispose();\n\t        this._modSignal = null;\n\t        return this;\n\t    };\n\t    return Tone.Modulo;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Bitcrusher downsamples the incoming signal to a different bitdepth.\n\t\t *         Lowering the bitdepth of the signal creates distortion. Read more about Bitcrushing\n\t\t *         on [Wikipedia](https://en.wikipedia.org/wiki/Bitcrusher).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Effect}\n\t\t *  @param {Number} bits The number of bits to downsample the signal. Nominal range\n\t\t *                       of 1 to 8.\n\t\t *  @example\n\t\t * //initialize crusher and route a synth through it\n\t\t * var crusher = new Tone.BitCrusher(4).toMaster();\n\t\t * var synth = new Tone.MonoSynth().connect(crusher);\n\t\t */\n\t    Tone.BitCrusher = function () {\n\t        var options = Tone.defaults(arguments, ['bits'], Tone.BitCrusher);\n\t        Tone.Effect.call(this, options);\n\t        var invStepSize = 1 / Math.pow(2, options.bits - 1);\n\t        /**\n\t\t\t *  Subtract the input signal and the modulus of the input signal\n\t\t\t *  @type {Tone.Subtract}\n\t\t\t *  @private\n\t\t\t */\n\t        this._subtract = new Tone.Subtract();\n\t        /**\n\t\t\t *  The mod function\n\t\t\t *  @type  {Tone.Modulo}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulo = new Tone.Modulo(invStepSize);\n\t        /**\n\t\t\t *  keeps track of the bits\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._bits = options.bits;\n\t        //connect it up\n\t        this.effectSend.fan(this._subtract, this._modulo);\n\t        this._modulo.connect(this._subtract, 0, 1);\n\t        this._subtract.connect(this.effectReturn);\n\t    };\n\t    Tone.extend(Tone.BitCrusher, Tone.Effect);\n\t    /**\n\t\t *  the default values\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.BitCrusher.defaults = { 'bits': 4 };\n\t    /**\n\t\t * The bit depth of the effect. Nominal range of 1-8.\n\t\t * @memberOf Tone.BitCrusher#\n\t\t * @type {number}\n\t\t * @name bits\n\t\t */\n\t    Object.defineProperty(Tone.BitCrusher.prototype, 'bits', {\n\t        get: function () {\n\t            return this._bits;\n\t        },\n\t        set: function (bits) {\n\t            this._bits = bits;\n\t            var invStepSize = 1 / Math.pow(2, bits - 1);\n\t            this._modulo.value = invStepSize;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.BitCrusher} this\n\t\t */\n\t    Tone.BitCrusher.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._subtract.dispose();\n\t        this._subtract = null;\n\t        this._modulo.dispose();\n\t        this._modulo = null;\n\t        return this;\n\t    };\n\t    return Tone.BitCrusher;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.ChebyShev is a Chebyshev waveshaper, an effect which is good \n\t\t *         for making different types of distortion sounds.\n\t\t *         Note that odd orders sound very different from even ones, \n\t\t *         and order = 1 is no change. \n\t\t *         Read more at [music.columbia.edu](http://music.columbia.edu/cmc/musicandcomputers/chapter4/04_06.php).\n\t\t *\n\t\t *  @extends {Tone.Effect}\n\t\t *  @constructor\n\t\t *  @param {Positive|Object} [order] The order of the chebyshev polynomial. Normal range between 1-100. \n\t\t *  @example\n\t\t * //create a new cheby\n\t\t * var cheby = new Tone.Chebyshev(50);\n\t\t * //create a monosynth connected to our cheby\n\t\t * synth = new Tone.MonoSynth().connect(cheby);\n\t\t */\n\t    Tone.Chebyshev = function () {\n\t        var options = Tone.defaults(arguments, ['order'], Tone.Chebyshev);\n\t        Tone.Effect.call(this, options);\n\t        /**\n\t\t\t *  @type {WaveShaperNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._shaper = new Tone.WaveShaper(4096);\n\t        /**\n\t\t\t * holds onto the order of the filter\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t        this._order = options.order;\n\t        this.connectEffect(this._shaper);\n\t        this.order = options.order;\n\t        this.oversample = options.oversample;\n\t    };\n\t    Tone.extend(Tone.Chebyshev, Tone.Effect);\n\t    /**\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Chebyshev.defaults = {\n\t        'order': 1,\n\t        'oversample': 'none'\n\t    };\n\t    /**\n\t\t *  get the coefficient for that degree\n\t\t *  @param {number} x the x value\n\t\t *  @param   {number} degree \n\t\t *  @param {Object} memo memoize the computed value. \n\t\t *                       this speeds up computation greatly. \n\t\t *  @return  {number}       the coefficient \n\t\t *  @private\n\t\t */\n\t    Tone.Chebyshev.prototype._getCoefficient = function (x, degree, memo) {\n\t        if (memo.hasOwnProperty(degree)) {\n\t            return memo[degree];\n\t        } else if (degree === 0) {\n\t            memo[degree] = 0;\n\t        } else if (degree === 1) {\n\t            memo[degree] = x;\n\t        } else {\n\t            memo[degree] = 2 * x * this._getCoefficient(x, degree - 1, memo) - this._getCoefficient(x, degree - 2, memo);\n\t        }\n\t        return memo[degree];\n\t    };\n\t    /**\n\t\t * The order of the Chebyshev polynomial which creates\n\t\t * the equation which is applied to the incoming \n\t\t * signal through a Tone.WaveShaper. The equations\n\t\t * are in the form:<br>\n\t\t * order 2: 2x^2 + 1<br>\n\t\t * order 3: 4x^3 + 3x <br>\n\t\t * @memberOf Tone.Chebyshev#\n\t\t * @type {Positive}\n\t\t * @name order\n\t\t */\n\t    Object.defineProperty(Tone.Chebyshev.prototype, 'order', {\n\t        get: function () {\n\t            return this._order;\n\t        },\n\t        set: function (order) {\n\t            this._order = order;\n\t            var curve = new Array(4096);\n\t            var len = curve.length;\n\t            for (var i = 0; i < len; ++i) {\n\t                var x = i * 2 / len - 1;\n\t                if (x === 0) {\n\t                    //should output 0 when input is 0\n\t                    curve[i] = 0;\n\t                } else {\n\t                    curve[i] = this._getCoefficient(x, order, {});\n\t                }\n\t            }\n\t            this._shaper.curve = curve;\n\t        }\n\t    });\n\t    /**\n\t\t * The oversampling of the effect. Can either be \"none\", \"2x\" or \"4x\".\n\t\t * @memberOf Tone.Chebyshev#\n\t\t * @type {string}\n\t\t * @name oversample\n\t\t */\n\t    Object.defineProperty(Tone.Chebyshev.prototype, 'oversample', {\n\t        get: function () {\n\t            return this._shaper.oversample;\n\t        },\n\t        set: function (oversampling) {\n\t            this._shaper.oversample = oversampling;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up. \n\t\t *  @returns {Tone.Chebyshev} this\n\t\t */\n\t    Tone.Chebyshev.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._shaper.dispose();\n\t        this._shaper = null;\n\t        return this;\n\t    };\n\t    return Tone.Chebyshev;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Base class for Stereo effects. Provides effectSendL/R and effectReturnL/R.\n\t\t *\n\t\t *\t@constructor\n\t\t *\t@extends {Tone.Effect}\n\t\t */\n\t    Tone.StereoEffect = function () {\n\t        //get the defaults\n\t        Tone.AudioNode.call(this);\n\t        var options = Tone.defaults(arguments, ['wet'], Tone.Effect);\n\t        this.createInsOuts(1, 1);\n\t        /**\n\t\t\t *  the drywet knob to control the amount of effect\n\t\t\t *  @type {Tone.CrossFade}\n\t\t\t *  @private\n\t\t\t */\n\t        this._dryWet = new Tone.CrossFade(options.wet);\n\t        /**\n\t\t\t *  The wet control, i.e. how much of the effected\n\t\t\t *  will pass through to the output.\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.wet = this._dryWet.fade;\n\t        /**\n\t\t\t *  then split it\n\t\t\t *  @type {Tone.Split}\n\t\t\t *  @private\n\t\t\t */\n\t        this._split = new Tone.Split();\n\t        /**\n\t\t\t *  the effects send LEFT\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this.effectSendL = this._split.left;\n\t        /**\n\t\t\t *  the effects send RIGHT\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this.effectSendR = this._split.right;\n\t        /**\n\t\t\t *  the stereo effect merger\n\t\t\t *  @type {Tone.Merge}\n\t\t\t *  @private\n\t\t\t */\n\t        this._merge = new Tone.Merge();\n\t        /**\n\t\t\t *  the effect return LEFT\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this.effectReturnL = this._merge.left;\n\t        /**\n\t\t\t *  the effect return RIGHT\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this.effectReturnR = this._merge.right;\n\t        //connections\n\t        this.input.connect(this._split);\n\t        //dry wet connections\n\t        this.input.connect(this._dryWet, 0, 0);\n\t        this._merge.connect(this._dryWet, 0, 1);\n\t        this._dryWet.connect(this.output);\n\t        this._readOnly(['wet']);\n\t    };\n\t    Tone.extend(Tone.StereoEffect, Tone.Effect);\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.StereoEffect} this\n\t\t */\n\t    Tone.StereoEffect.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._dryWet.dispose();\n\t        this._dryWet = null;\n\t        this._split.dispose();\n\t        this._split = null;\n\t        this._merge.dispose();\n\t        this._merge = null;\n\t        this.effectSendL = null;\n\t        this.effectSendR = null;\n\t        this.effectReturnL = null;\n\t        this.effectReturnR = null;\n\t        this._writable(['wet']);\n\t        this.wet = null;\n\t        return this;\n\t    };\n\t    return Tone.StereoEffect;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Chorus is a stereo chorus effect composed of\n\t\t *         a left and right delay with a Tone.LFO applied to the delayTime of each channel.\n\t\t *         Inspiration from [Tuna.js](https://github.com/Dinahmoe/tuna/blob/master/tuna.js).\n\t\t *         Read more on the chorus effect on [SoundOnSound](http://www.soundonsound.com/sos/jun04/articles/synthsecrets.htm).\n\t\t *\n\t\t *\t@constructor\n\t\t *\t@extends {Tone.StereoEffect}\n\t\t *\t@param {Frequency|Object} [frequency] The frequency of the LFO.\n\t\t *\t@param {Milliseconds} [delayTime] The delay of the chorus effect in ms.\n\t\t *\t@param {NormalRange} [depth] The depth of the chorus.\n\t\t *\t@example\n\t\t * var chorus = new Tone.Chorus(4, 2.5, 0.5);\n\t\t * var synth = new Tone.PolySynth(4, Tone.MonoSynth).connect(chorus);\n\t\t * synth.triggerAttackRelease([\"C3\",\"E3\",\"G3\"], \"8n\");\n\t\t */\n\t    Tone.Chorus = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'delayTime',\n\t            'depth'\n\t        ], Tone.Chorus);\n\t        Tone.StereoEffect.call(this, options);\n\t        /**\n\t\t\t *  the depth of the chorus\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._depth = options.depth;\n\t        /**\n\t\t\t *  the delayTime\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delayTime = options.delayTime / 1000;\n\t        /**\n\t\t\t *  the lfo which controls the delayTime\n\t\t\t *  @type {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfoL = new Tone.LFO({\n\t            'frequency': options.frequency,\n\t            'min': 0,\n\t            'max': 1\n\t        });\n\t        /**\n\t\t\t *  another LFO for the right side with a 180 degree phase diff\n\t\t\t *  @type {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfoR = new Tone.LFO({\n\t            'frequency': options.frequency,\n\t            'min': 0,\n\t            'max': 1,\n\t            'phase': 180\n\t        });\n\t        /**\n\t\t\t *  delay for left\n\t\t\t *  @type {Tone.Delay}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delayNodeL = new Tone.Delay();\n\t        /**\n\t\t\t *  delay for right\n\t\t\t *  @type {Tone.Delay}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delayNodeR = new Tone.Delay();\n\t        /**\n\t\t\t * The frequency of the LFO which modulates the delayTime.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t        this.frequency = this._lfoL.frequency;\n\t        //connections\n\t        this.effectSendL.chain(this._delayNodeL, this.effectReturnL);\n\t        this.effectSendR.chain(this._delayNodeR, this.effectReturnR);\n\t        //and pass through to make the detune apparent\n\t        this.effectSendL.connect(this.effectReturnL);\n\t        this.effectSendR.connect(this.effectReturnR);\n\t        //lfo setup\n\t        this._lfoL.connect(this._delayNodeL.delayTime);\n\t        this._lfoR.connect(this._delayNodeR.delayTime);\n\t        //start the lfo\n\t        this._lfoL.start();\n\t        this._lfoR.start();\n\t        //have one LFO frequency control the other\n\t        this._lfoL.frequency.connect(this._lfoR.frequency);\n\t        //set the initial values\n\t        this.depth = this._depth;\n\t        this.frequency.value = options.frequency;\n\t        this.type = options.type;\n\t        this._readOnly(['frequency']);\n\t        this.spread = options.spread;\n\t    };\n\t    Tone.extend(Tone.Chorus, Tone.StereoEffect);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Chorus.defaults = {\n\t        'frequency': 1.5,\n\t        'delayTime': 3.5,\n\t        'depth': 0.7,\n\t        'type': 'sine',\n\t        'spread': 180\n\t    };\n\t    /**\n\t\t * The depth of the effect. A depth of 1 makes the delayTime\n\t\t * modulate between 0 and 2*delayTime (centered around the delayTime).\n\t\t * @memberOf Tone.Chorus#\n\t\t * @type {NormalRange}\n\t\t * @name depth\n\t\t */\n\t    Object.defineProperty(Tone.Chorus.prototype, 'depth', {\n\t        get: function () {\n\t            return this._depth;\n\t        },\n\t        set: function (depth) {\n\t            this._depth = depth;\n\t            var deviation = this._delayTime * depth;\n\t            this._lfoL.min = Math.max(this._delayTime - deviation, 0);\n\t            this._lfoL.max = this._delayTime + deviation;\n\t            this._lfoR.min = Math.max(this._delayTime - deviation, 0);\n\t            this._lfoR.max = this._delayTime + deviation;\n\t        }\n\t    });\n\t    /**\n\t\t * The delayTime in milliseconds of the chorus. A larger delayTime\n\t\t * will give a more pronounced effect. Nominal range a delayTime\n\t\t * is between 2 and 20ms.\n\t\t * @memberOf Tone.Chorus#\n\t\t * @type {Milliseconds}\n\t\t * @name delayTime\n\t\t */\n\t    Object.defineProperty(Tone.Chorus.prototype, 'delayTime', {\n\t        get: function () {\n\t            return this._delayTime * 1000;\n\t        },\n\t        set: function (delayTime) {\n\t            this._delayTime = delayTime / 1000;\n\t            this.depth = this._depth;\n\t        }\n\t    });\n\t    /**\n\t\t * The oscillator type of the LFO.\n\t\t * @memberOf Tone.Chorus#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.Chorus.prototype, 'type', {\n\t        get: function () {\n\t            return this._lfoL.type;\n\t        },\n\t        set: function (type) {\n\t            this._lfoL.type = type;\n\t            this._lfoR.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t * Amount of stereo spread. When set to 0, both LFO's will be panned centrally.\n\t\t * When set to 180, LFO's will be panned hard left and right respectively.\n\t\t * @memberOf Tone.Chorus#\n\t\t * @type {Degrees}\n\t\t * @name spread\n\t\t */\n\t    Object.defineProperty(Tone.Chorus.prototype, 'spread', {\n\t        get: function () {\n\t            return this._lfoR.phase - this._lfoL.phase;\n\t        },\n\t        set: function (spread) {\n\t            this._lfoL.phase = 90 - spread / 2;\n\t            this._lfoR.phase = spread / 2 + 90;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Chorus} this\n\t\t */\n\t    Tone.Chorus.prototype.dispose = function () {\n\t        Tone.StereoEffect.prototype.dispose.call(this);\n\t        this._lfoL.dispose();\n\t        this._lfoL = null;\n\t        this._lfoR.dispose();\n\t        this._lfoR = null;\n\t        this._delayNodeL.dispose();\n\t        this._delayNodeL = null;\n\t        this._delayNodeR.dispose();\n\t        this._delayNodeR = null;\n\t        this._writable('frequency');\n\t        this.frequency = null;\n\t        return this;\n\t    };\n\t    return Tone.Chorus;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Convolver is a wrapper around the Native Web Audio\n\t\t *          [ConvolverNode](http://webaudio.github.io/web-audio-api/#the-convolvernode-interface).\n\t\t *          Convolution is useful for reverb and filter emulation. Read more about convolution reverb on\n\t\t *          [Wikipedia](https://en.wikipedia.org/wiki/Convolution_reverb).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Effect}\n\t\t *  @param {string|Tone.Buffer|Object} [url] The URL of the impulse response or the Tone.Buffer\n\t\t *                                           contianing the impulse response.\n\t\t *  @param {Function=} onload The callback to invoke when the url is loaded.\n\t\t *  @example\n\t\t * //initializing the convolver with an impulse response\n\t\t * var convolver = new Tone.Convolver(\"./path/to/ir.wav\").toMaster();\n\t\t */\n\t    Tone.Convolver = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'url',\n\t            'onload'\n\t        ], Tone.Convolver);\n\t        Tone.Effect.call(this, options);\n\t        /**\n\t\t\t *  convolver node\n\t\t\t *  @type {ConvolverNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._convolver = this.context.createConvolver();\n\t        /**\n\t\t\t *  the convolution buffer\n\t\t\t *  @type {Tone.Buffer}\n\t\t\t *  @private\n\t\t\t */\n\t        this._buffer = new Tone.Buffer(options.url, function (buffer) {\n\t            this._convolver.buffer = buffer.get();\n\t            options.onload();\n\t        }.bind(this));\n\t        this.connectEffect(this._convolver);\n\t    };\n\t    Tone.extend(Tone.Convolver, Tone.Effect);\n\t    /**\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.Convolver.defaults = { 'onload': Tone.noOp };\n\t    /**\n\t\t *  The convolver's buffer\n\t\t *  @memberOf Tone.Convolver#\n\t\t *  @type {AudioBuffer}\n\t\t *  @name buffer\n\t\t */\n\t    Object.defineProperty(Tone.Convolver.prototype, 'buffer', {\n\t        get: function () {\n\t            return this._buffer.get();\n\t        },\n\t        set: function (buffer) {\n\t            this._buffer.set(buffer);\n\t            this._convolver.buffer = this._buffer.get();\n\t        }\n\t    });\n\t    /**\n\t\t *  Load an impulse response url as an audio buffer.\n\t\t *  Decodes the audio asynchronously and invokes\n\t\t *  the callback once the audio buffer loads.\n\t\t *  @param {string} url The url of the buffer to load.\n\t\t *                      filetype support depends on the\n\t\t *                      browser.\n\t\t *  @param  {function=} callback\n\t\t *  @returns {Promise}\n\t\t */\n\t    Tone.Convolver.prototype.load = function (url, callback) {\n\t        return this._buffer.load(url, function (buff) {\n\t            this.buffer = buff;\n\t            if (callback) {\n\t                callback();\n\t            }\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Convolver} this\n\t\t */\n\t    Tone.Convolver.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._convolver.disconnect();\n\t        this._convolver = null;\n\t        this._buffer.dispose();\n\t        this._buffer = null;\n\t        return this;\n\t    };\n\t    return Tone.Convolver;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Distortion is a simple distortion effect using Tone.WaveShaper.\n\t\t *         Algorithm from [a stackoverflow answer](http://stackoverflow.com/a/22313408).\n\t\t *\n\t\t *  @extends {Tone.Effect}\n\t\t *  @constructor\n\t\t *  @param {Number|Object} [distortion] The amount of distortion (nominal range of 0-1)\n\t\t *  @example\n\t\t * var dist = new Tone.Distortion(0.8).toMaster();\n\t\t * var fm = new Tone.SimpleFM().connect(dist);\n\t\t * //this sounds good on bass notes\n\t\t * fm.triggerAttackRelease(\"A1\", \"8n\");\n\t\t */\n\t    Tone.Distortion = function () {\n\t        var options = Tone.defaults(arguments, ['distortion'], Tone.Distortion);\n\t        Tone.Effect.call(this, options);\n\t        /**\n\t\t\t *  @type {Tone.WaveShaper}\n\t\t\t *  @private\n\t\t\t */\n\t        this._shaper = new Tone.WaveShaper(4096);\n\t        /**\n\t\t\t * holds the distortion amount\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t        this._distortion = options.distortion;\n\t        this.connectEffect(this._shaper);\n\t        this.distortion = options.distortion;\n\t        this.oversample = options.oversample;\n\t    };\n\t    Tone.extend(Tone.Distortion, Tone.Effect);\n\t    /**\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Distortion.defaults = {\n\t        'distortion': 0.4,\n\t        'oversample': 'none'\n\t    };\n\t    /**\n\t\t * The amount of distortion.\n\t\t * @memberOf Tone.Distortion#\n\t\t * @type {NormalRange}\n\t\t * @name distortion\n\t\t */\n\t    Object.defineProperty(Tone.Distortion.prototype, 'distortion', {\n\t        get: function () {\n\t            return this._distortion;\n\t        },\n\t        set: function (amount) {\n\t            this._distortion = amount;\n\t            var k = amount * 100;\n\t            var deg = Math.PI / 180;\n\t            this._shaper.setMap(function (x) {\n\t                if (Math.abs(x) < 0.001) {\n\t                    //should output 0 when input is 0\n\t                    return 0;\n\t                } else {\n\t                    return (3 + k) * x * 20 * deg / (Math.PI + k * Math.abs(x));\n\t                }\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t * The oversampling of the effect. Can either be \"none\", \"2x\" or \"4x\".\n\t\t * @memberOf Tone.Distortion#\n\t\t * @type {string}\n\t\t * @name oversample\n\t\t */\n\t    Object.defineProperty(Tone.Distortion.prototype, 'oversample', {\n\t        get: function () {\n\t            return this._shaper.oversample;\n\t        },\n\t        set: function (oversampling) {\n\t            this._shaper.oversample = oversampling;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up. \n\t\t *  @returns {Tone.Distortion} this\n\t\t */\n\t    Tone.Distortion.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._shaper.dispose();\n\t        this._shaper = null;\n\t        return this;\n\t    };\n\t    return Tone.Distortion;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t * \t@class  Tone.FeedbackEffect provides a loop between an \n\t\t * \t        audio source and its own output. This is a base-class\n\t\t * \t        for feedback effects. \n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Effect}\n\t\t *  @param {NormalRange|Object} [feedback] The initial feedback value.\n\t\t */\n\t    Tone.FeedbackEffect = function () {\n\t        var options = Tone.defaults(arguments, ['feedback'], Tone.FeedbackEffect);\n\t        Tone.Effect.call(this, options);\n\t        /**\n\t\t\t *  the gain which controls the feedback\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._feedbackGain = new Tone.Gain(options.feedback, Tone.Type.NormalRange);\n\t        /**\n\t\t\t *  The amount of signal which is fed back into the effect input. \n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.feedback = this._feedbackGain.gain;\n\t        //the feedback loop\n\t        this.effectReturn.chain(this._feedbackGain, this.effectSend);\n\t        this._readOnly(['feedback']);\n\t    };\n\t    Tone.extend(Tone.FeedbackEffect, Tone.Effect);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.FeedbackEffect.defaults = { 'feedback': 0.125 };\n\t    /**\n\t\t *  Clean up. \n\t\t *  @returns {Tone.FeedbackEffect} this\n\t\t */\n\t    Tone.FeedbackEffect.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._writable(['feedback']);\n\t        this._feedbackGain.dispose();\n\t        this._feedbackGain = null;\n\t        this.feedback = null;\n\t        return this;\n\t    };\n\t    return Tone.FeedbackEffect;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.FeedbackDelay is a DelayNode in which part of output\n\t\t *          signal is fed back into the delay.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.FeedbackEffect}\n\t\t *  @param {Time|Object} [delayTime] The delay applied to the incoming signal.\n\t\t *  @param {NormalRange=} feedback The amount of the effected signal which\n\t\t *                            is fed back through the delay.\n\t\t *  @example\n\t\t * var feedbackDelay = new Tone.FeedbackDelay(\"8n\", 0.5).toMaster();\n\t\t * var tom = new Tone.DrumSynth({\n\t\t * \t\"octaves\" : 4,\n\t\t * \t\"pitchDecay\" : 0.1\n\t\t * }).connect(feedbackDelay);\n\t\t * tom.triggerAttackRelease(\"A2\",\"32n\");\n\t\t */\n\t    Tone.FeedbackDelay = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'delayTime',\n\t            'feedback'\n\t        ], Tone.FeedbackDelay);\n\t        Tone.FeedbackEffect.call(this, options);\n\t        /**\n\t\t\t *  the delay node\n\t\t\t *  @type {Tone.Delay}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delayNode = new Tone.Delay(options.delayTime, options.maxDelay);\n\t        /**\n\t\t\t *  The delayTime of the DelayNode.\n\t\t\t *  @type {Time}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.delayTime = this._delayNode.delayTime;\n\t        // connect it up\n\t        this.connectEffect(this._delayNode);\n\t        this._readOnly(['delayTime']);\n\t    };\n\t    Tone.extend(Tone.FeedbackDelay, Tone.FeedbackEffect);\n\t    /**\n\t\t *  The default values.\n\t\t *  @const\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.FeedbackDelay.defaults = {\n\t        'delayTime': 0.25,\n\t        'maxDelay': 1\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.FeedbackDelay} this\n\t\t */\n\t    Tone.FeedbackDelay.prototype.dispose = function () {\n\t        Tone.FeedbackEffect.prototype.dispose.call(this);\n\t        this._delayNode.dispose();\n\t        this._delayNode = null;\n\t        this._writable(['delayTime']);\n\t        this.delayTime = null;\n\t        return this;\n\t    };\n\t    return Tone.FeedbackDelay;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  an array of comb filter delay values from Freeverb implementation\n\t\t *  @static\n\t\t *  @private\n\t\t *  @type {Array}\n\t\t */\n\t    var combFilterTunings = [\n\t        1557 / 44100,\n\t        1617 / 44100,\n\t        1491 / 44100,\n\t        1422 / 44100,\n\t        1277 / 44100,\n\t        1356 / 44100,\n\t        1188 / 44100,\n\t        1116 / 44100\n\t    ];\n\t    /**\n\t\t *  an array of allpass filter frequency values from Freeverb implementation\n\t\t *  @private\n\t\t *  @static\n\t\t *  @type {Array}\n\t\t */\n\t    var allpassFilterFrequencies = [\n\t        225,\n\t        556,\n\t        441,\n\t        341\n\t    ];\n\t    /**\n\t\t *  @class Tone.Freeverb is a reverb based on [Freeverb](https://ccrma.stanford.edu/~jos/pasp/Freeverb.html).\n\t\t *         Read more on reverb on [Sound On Sound](https://web.archive.org/web/20160404083902/http://www.soundonsound.com:80/sos/feb01/articles/synthsecrets.asp).\n\t\t *\n\t\t *  @extends {Tone.Effect}\n\t\t *  @constructor\n\t\t *  @param {NormalRange|Object} [roomSize] Correlated to the decay time.\n\t\t *  @param {Frequency} [dampening] The cutoff frequency of a lowpass filter as part\n\t\t *                                 of the reverb.\n\t\t *  @example\n\t\t * var freeverb = new Tone.Freeverb().toMaster();\n\t\t * freeverb.dampening.value = 1000;\n\t\t * //routing synth through the reverb\n\t\t * var synth = new Tone.AMSynth().connect(freeverb);\n\t\t */\n\t    Tone.Freeverb = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'roomSize',\n\t            'dampening'\n\t        ], Tone.Freeverb);\n\t        Tone.StereoEffect.call(this, options);\n\t        /**\n\t\t\t *  The roomSize value between. A larger roomSize\n\t\t\t *  will result in a longer decay.\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.roomSize = new Tone.Signal(options.roomSize, Tone.Type.NormalRange);\n\t        /**\n\t\t\t *  The amount of dampening of the reverberant signal.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.dampening = new Tone.Signal(options.dampening, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  the comb filters\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._combFilters = [];\n\t        /**\n\t\t\t *  the allpass filters on the left\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._allpassFiltersL = [];\n\t        /**\n\t\t\t *  the allpass filters on the right\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._allpassFiltersR = [];\n\t        //make the allpass filters on the right\n\t        for (var l = 0; l < allpassFilterFrequencies.length; l++) {\n\t            var allpassL = this.context.createBiquadFilter();\n\t            allpassL.type = 'allpass';\n\t            allpassL.frequency.value = allpassFilterFrequencies[l];\n\t            this._allpassFiltersL.push(allpassL);\n\t        }\n\t        //make the allpass filters on the left\n\t        for (var r = 0; r < allpassFilterFrequencies.length; r++) {\n\t            var allpassR = this.context.createBiquadFilter();\n\t            allpassR.type = 'allpass';\n\t            allpassR.frequency.value = allpassFilterFrequencies[r];\n\t            this._allpassFiltersR.push(allpassR);\n\t        }\n\t        //make the comb filters\n\t        for (var c = 0; c < combFilterTunings.length; c++) {\n\t            var lfpf = new Tone.LowpassCombFilter(combFilterTunings[c]);\n\t            if (c < combFilterTunings.length / 2) {\n\t                this.effectSendL.chain(lfpf, this._allpassFiltersL[0]);\n\t            } else {\n\t                this.effectSendR.chain(lfpf, this._allpassFiltersR[0]);\n\t            }\n\t            this.roomSize.connect(lfpf.resonance);\n\t            this.dampening.connect(lfpf.dampening);\n\t            this._combFilters.push(lfpf);\n\t        }\n\t        //chain the allpass filters togetehr\n\t        Tone.connectSeries.apply(Tone, this._allpassFiltersL);\n\t        Tone.connectSeries.apply(Tone, this._allpassFiltersR);\n\t        this._allpassFiltersL[this._allpassFiltersL.length - 1].connect(this.effectReturnL);\n\t        this._allpassFiltersR[this._allpassFiltersR.length - 1].connect(this.effectReturnR);\n\t        this._readOnly([\n\t            'roomSize',\n\t            'dampening'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.Freeverb, Tone.StereoEffect);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Freeverb.defaults = {\n\t        'roomSize': 0.7,\n\t        'dampening': 3000\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Freeverb} this\n\t\t */\n\t    Tone.Freeverb.prototype.dispose = function () {\n\t        Tone.StereoEffect.prototype.dispose.call(this);\n\t        for (var al = 0; al < this._allpassFiltersL.length; al++) {\n\t            this._allpassFiltersL[al].disconnect();\n\t            this._allpassFiltersL[al] = null;\n\t        }\n\t        this._allpassFiltersL = null;\n\t        for (var ar = 0; ar < this._allpassFiltersR.length; ar++) {\n\t            this._allpassFiltersR[ar].disconnect();\n\t            this._allpassFiltersR[ar] = null;\n\t        }\n\t        this._allpassFiltersR = null;\n\t        for (var cf = 0; cf < this._combFilters.length; cf++) {\n\t            this._combFilters[cf].dispose();\n\t            this._combFilters[cf] = null;\n\t        }\n\t        this._combFilters = null;\n\t        this._writable([\n\t            'roomSize',\n\t            'dampening'\n\t        ]);\n\t        this.roomSize.dispose();\n\t        this.roomSize = null;\n\t        this.dampening.dispose();\n\t        this.dampening = null;\n\t        return this;\n\t    };\n\t    return Tone.Freeverb;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  an array of the comb filter delay time values\n\t\t *  @private\n\t\t *  @static\n\t\t *  @type {Array}\n\t\t */\n\t    var combFilterDelayTimes = [\n\t        1687 / 25000,\n\t        1601 / 25000,\n\t        2053 / 25000,\n\t        2251 / 25000\n\t    ];\n\t    /**\n\t\t *  the resonances of each of the comb filters\n\t\t *  @private\n\t\t *  @static\n\t\t *  @type {Array}\n\t\t */\n\t    var combFilterResonances = [\n\t        0.773,\n\t        0.802,\n\t        0.753,\n\t        0.733\n\t    ];\n\t    /**\n\t\t *  the allpass filter frequencies\n\t\t *  @private\n\t\t *  @static\n\t\t *  @type {Array}\n\t\t */\n\t    var allpassFilterFreqs = [\n\t        347,\n\t        113,\n\t        37\n\t    ];\n\t    /**\n\t\t *  @class Tone.JCReverb is a simple [Schroeder Reverberator](https://ccrma.stanford.edu/~jos/pasp/Schroeder_Reverberators.html)\n\t\t *         tuned by John Chowning in 1970.\n\t\t *         It is made up of three allpass filters and four Tone.FeedbackCombFilter.\n\t\t *\n\t\t *\n\t\t *  @extends {Tone.Effect}\n\t\t *  @constructor\n\t\t *  @param {NormalRange|Object} [roomSize] Coorelates to the decay time.\n\t\t *  @example\n\t\t * var reverb = new Tone.JCReverb(0.4).connect(Tone.Master);\n\t\t * var delay = new Tone.FeedbackDelay(0.5);\n\t\t * //connecting the synth to reverb through delay\n\t\t * var synth = new Tone.DuoSynth().chain(delay, reverb);\n\t\t * synth.triggerAttackRelease(\"A4\",\"8n\");\n\t\t */\n\t    Tone.JCReverb = function () {\n\t        var options = Tone.defaults(arguments, ['roomSize'], Tone.JCReverb);\n\t        Tone.StereoEffect.call(this, options);\n\t        /**\n\t\t\t *  room size control values between [0,1]\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.roomSize = new Tone.Signal(options.roomSize, Tone.Type.NormalRange);\n\t        /**\n\t\t\t *  scale the room size\n\t\t\t *  @type {Tone.Scale}\n\t\t\t *  @private\n\t\t\t */\n\t        this._scaleRoomSize = new Tone.Scale(-0.733, 0.197);\n\t        /**\n\t\t\t *  a series of allpass filters\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._allpassFilters = [];\n\t        /**\n\t\t\t *  parallel feedback comb filters\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._feedbackCombFilters = [];\n\t        //make the allpass filters\n\t        for (var af = 0; af < allpassFilterFreqs.length; af++) {\n\t            var allpass = this.context.createBiquadFilter();\n\t            allpass.type = 'allpass';\n\t            allpass.frequency.value = allpassFilterFreqs[af];\n\t            this._allpassFilters.push(allpass);\n\t        }\n\t        //and the comb filters\n\t        for (var cf = 0; cf < combFilterDelayTimes.length; cf++) {\n\t            var fbcf = new Tone.FeedbackCombFilter(combFilterDelayTimes[cf], 0.1);\n\t            this._scaleRoomSize.connect(fbcf.resonance);\n\t            fbcf.resonance.value = combFilterResonances[cf];\n\t            this._allpassFilters[this._allpassFilters.length - 1].connect(fbcf);\n\t            if (cf < combFilterDelayTimes.length / 2) {\n\t                fbcf.connect(this.effectReturnL);\n\t            } else {\n\t                fbcf.connect(this.effectReturnR);\n\t            }\n\t            this._feedbackCombFilters.push(fbcf);\n\t        }\n\t        //chain the allpass filters together\n\t        this.roomSize.connect(this._scaleRoomSize);\n\t        Tone.connectSeries.apply(Tone, this._allpassFilters);\n\t        this.effectSendL.connect(this._allpassFilters[0]);\n\t        this.effectSendR.connect(this._allpassFilters[0]);\n\t        this._readOnly(['roomSize']);\n\t    };\n\t    Tone.extend(Tone.JCReverb, Tone.StereoEffect);\n\t    /**\n\t\t *  the default values\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.JCReverb.defaults = { 'roomSize': 0.5 };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.JCReverb} this\n\t\t */\n\t    Tone.JCReverb.prototype.dispose = function () {\n\t        Tone.StereoEffect.prototype.dispose.call(this);\n\t        for (var apf = 0; apf < this._allpassFilters.length; apf++) {\n\t            this._allpassFilters[apf].disconnect();\n\t            this._allpassFilters[apf] = null;\n\t        }\n\t        this._allpassFilters = null;\n\t        for (var fbcf = 0; fbcf < this._feedbackCombFilters.length; fbcf++) {\n\t            this._feedbackCombFilters[fbcf].dispose();\n\t            this._feedbackCombFilters[fbcf] = null;\n\t        }\n\t        this._feedbackCombFilters = null;\n\t        this._writable(['roomSize']);\n\t        this.roomSize.dispose();\n\t        this.roomSize = null;\n\t        this._scaleRoomSize.dispose();\n\t        this._scaleRoomSize = null;\n\t        return this;\n\t    };\n\t    return Tone.JCReverb;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Mid/Side processing separates the the 'mid' signal\n\t\t *         (which comes out of both the left and the right channel)\n\t\t *         and the 'side' (which only comes out of the the side channels)\n\t\t *         and effects them separately before being recombined.\n\t\t *         Applies a Mid/Side seperation and recombination.\n\t\t *         Algorithm found in [kvraudio forums](http://www.kvraudio.com/forum/viewtopic.php?t=212587).\n\t\t *         <br><br>\n\t\t *         This is a base-class for Mid/Side Effects.\n\t\t *\n\t\t *  @extends {Tone.Effect}\n\t\t *  @constructor\n\t\t */\n\t    Tone.MidSideEffect = function () {\n\t        Tone.Effect.apply(this, arguments);\n\t        /**\n\t\t\t *  The mid/side split\n\t\t\t *  @type  {Tone.MidSideSplit}\n\t\t\t *  @private\n\t\t\t */\n\t        this._midSideSplit = new Tone.MidSideSplit();\n\t        /**\n\t\t\t *  The mid/side merge\n\t\t\t *  @type  {Tone.MidSideMerge}\n\t\t\t *  @private\n\t\t\t */\n\t        this._midSideMerge = new Tone.MidSideMerge();\n\t        /**\n\t\t\t *  The mid send. Connect to mid processing\n\t\t\t *  @type {Tone}\n\t\t\t *  @private\n\t\t\t */\n\t        this.midSend = this._midSideSplit.mid;\n\t        /**\n\t\t\t *  The side send. Connect to side processing\n\t\t\t *  @type {Tone}\n\t\t\t *  @private\n\t\t\t */\n\t        this.sideSend = this._midSideSplit.side;\n\t        /**\n\t\t\t *  The mid return connection\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this.midReturn = this._midSideMerge.mid;\n\t        /**\n\t\t\t *  The side return connection\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this.sideReturn = this._midSideMerge.side;\n\t        //the connections\n\t        this.effectSend.connect(this._midSideSplit);\n\t        this._midSideMerge.connect(this.effectReturn);\n\t    };\n\t    Tone.extend(Tone.MidSideEffect, Tone.Effect);\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.MidSideEffect} this\n\t\t */\n\t    Tone.MidSideEffect.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._midSideSplit.dispose();\n\t        this._midSideSplit = null;\n\t        this._midSideMerge.dispose();\n\t        this._midSideMerge = null;\n\t        this.midSend = null;\n\t        this.sideSend = null;\n\t        this.midReturn = null;\n\t        this.sideReturn = null;\n\t        return this;\n\t    };\n\t    return Tone.MidSideEffect;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Phaser is a phaser effect. Phasers work by changing the phase\n\t\t *         of different frequency components of an incoming signal. Read more on\n\t\t *         [Wikipedia](https://en.wikipedia.org/wiki/Phaser_(effect)).\n\t\t *         Inspiration for this phaser comes from [Tuna.js](https://github.com/Dinahmoe/tuna/).\n\t\t *\n\t\t *\t@extends {Tone.StereoEffect}\n\t\t *\t@constructor\n\t\t *\t@param {Frequency|Object} [frequency] The speed of the phasing.\n\t\t *\t@param {number} [octaves] The octaves of the effect.\n\t\t *\t@param {Frequency} [baseFrequency] The base frequency of the filters.\n\t\t *\t@example\n\t\t * var phaser = new Tone.Phaser({\n\t\t * \t\"frequency\" : 15,\n\t\t * \t\"octaves\" : 5,\n\t\t * \t\"baseFrequency\" : 1000\n\t\t * }).toMaster();\n\t\t * var synth = new Tone.FMSynth().connect(phaser);\n\t\t * synth.triggerAttackRelease(\"E3\", \"2n\");\n\t\t */\n\t    Tone.Phaser = function () {\n\t        //set the defaults\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'octaves',\n\t            'baseFrequency'\n\t        ], Tone.Phaser);\n\t        Tone.StereoEffect.call(this, options);\n\t        /**\n\t\t\t *  the lfo which controls the frequency on the left side\n\t\t\t *  @type {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfoL = new Tone.LFO(options.frequency, 0, 1);\n\t        /**\n\t\t\t *  the lfo which controls the frequency on the right side\n\t\t\t *  @type {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfoR = new Tone.LFO(options.frequency, 0, 1);\n\t        this._lfoR.phase = 180;\n\t        /**\n\t\t\t *  the base modulation frequency\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._baseFrequency = options.baseFrequency;\n\t        /**\n\t\t\t *  the octaves of the phasing\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._octaves = options.octaves;\n\t        /**\n\t\t\t *  The quality factor of the filters\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.Q = new Tone.Signal(options.Q, Tone.Type.Positive);\n\t        /**\n\t\t\t *  the array of filters for the left side\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._filtersL = this._makeFilters(options.stages, this._lfoL, this.Q);\n\t        /**\n\t\t\t *  the array of filters for the left side\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._filtersR = this._makeFilters(options.stages, this._lfoR, this.Q);\n\t        /**\n\t\t\t * the frequency of the effect\n\t\t\t * @type {Tone.Signal}\n\t\t\t */\n\t        this.frequency = this._lfoL.frequency;\n\t        this.frequency.value = options.frequency;\n\t        //connect them up\n\t        this.effectSendL.connect(this._filtersL[0]);\n\t        this.effectSendR.connect(this._filtersR[0]);\n\t        this._filtersL[options.stages - 1].connect(this.effectReturnL);\n\t        this._filtersR[options.stages - 1].connect(this.effectReturnR);\n\t        //control the frequency with one LFO\n\t        this._lfoL.frequency.connect(this._lfoR.frequency);\n\t        //set the options\n\t        this.baseFrequency = options.baseFrequency;\n\t        this.octaves = options.octaves;\n\t        //start the lfo\n\t        this._lfoL.start();\n\t        this._lfoR.start();\n\t        this._readOnly([\n\t            'frequency',\n\t            'Q'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.Phaser, Tone.StereoEffect);\n\t    /**\n\t\t *  defaults\n\t\t *  @static\n\t\t *  @type {object}\n\t\t */\n\t    Tone.Phaser.defaults = {\n\t        'frequency': 0.5,\n\t        'octaves': 3,\n\t        'stages': 10,\n\t        'Q': 10,\n\t        'baseFrequency': 350\n\t    };\n\t    /**\n\t\t *  @param {number} stages\n\t\t *  @returns {Array} the number of filters all connected together\n\t\t *  @private\n\t\t */\n\t    Tone.Phaser.prototype._makeFilters = function (stages, connectToFreq, Q) {\n\t        var filters = new Array(stages);\n\t        //make all the filters\n\t        for (var i = 0; i < stages; i++) {\n\t            var filter = this.context.createBiquadFilter();\n\t            filter.type = 'allpass';\n\t            Q.connect(filter.Q);\n\t            connectToFreq.connect(filter.frequency);\n\t            filters[i] = filter;\n\t        }\n\t        Tone.connectSeries.apply(Tone, filters);\n\t        return filters;\n\t    };\n\t    /**\n\t\t * The number of octaves the phase goes above\n\t\t * the baseFrequency\n\t\t * @memberOf Tone.Phaser#\n\t\t * @type {Positive}\n\t\t * @name octaves\n\t\t */\n\t    Object.defineProperty(Tone.Phaser.prototype, 'octaves', {\n\t        get: function () {\n\t            return this._octaves;\n\t        },\n\t        set: function (octaves) {\n\t            this._octaves = octaves;\n\t            var max = this._baseFrequency * Math.pow(2, octaves);\n\t            this._lfoL.max = max;\n\t            this._lfoR.max = max;\n\t        }\n\t    });\n\t    /**\n\t\t * The the base frequency of the filters.\n\t\t * @memberOf Tone.Phaser#\n\t\t * @type {number}\n\t\t * @name baseFrequency\n\t\t */\n\t    Object.defineProperty(Tone.Phaser.prototype, 'baseFrequency', {\n\t        get: function () {\n\t            return this._baseFrequency;\n\t        },\n\t        set: function (freq) {\n\t            this._baseFrequency = freq;\n\t            this._lfoL.min = freq;\n\t            this._lfoR.min = freq;\n\t            this.octaves = this._octaves;\n\t        }\n\t    });\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Phaser} this\n\t\t */\n\t    Tone.Phaser.prototype.dispose = function () {\n\t        Tone.StereoEffect.prototype.dispose.call(this);\n\t        this._writable([\n\t            'frequency',\n\t            'Q'\n\t        ]);\n\t        this.Q.dispose();\n\t        this.Q = null;\n\t        this._lfoL.dispose();\n\t        this._lfoL = null;\n\t        this._lfoR.dispose();\n\t        this._lfoR = null;\n\t        for (var i = 0; i < this._filtersL.length; i++) {\n\t            this._filtersL[i].disconnect();\n\t            this._filtersL[i] = null;\n\t        }\n\t        this._filtersL = null;\n\t        for (var j = 0; j < this._filtersR.length; j++) {\n\t            this._filtersR[j].disconnect();\n\t            this._filtersR[j] = null;\n\t        }\n\t        this._filtersR = null;\n\t        this.frequency = null;\n\t        return this;\n\t    };\n\t    return Tone.Phaser;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Just like a stereo feedback effect, but the feedback is routed from left to right\n\t\t *         and right to left instead of on the same channel.\n\t\t *\n\t\t *\t@constructor\n\t\t *\t@extends {Tone.StereoEffect}\n\t\t */\n\t    Tone.StereoXFeedbackEffect = function () {\n\t        var options = Tone.defaults(arguments, ['feedback'], Tone.FeedbackEffect);\n\t        Tone.StereoEffect.call(this, options);\n\t        /**\n\t\t\t *  The amount of feedback from the output\n\t\t\t *  back into the input of the effect (routed\n\t\t\t *  across left and right channels).\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.feedback = new Tone.Signal(options.feedback, Tone.Type.NormalRange);\n\t        /**\n\t\t\t *  the left side feeback\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._feedbackLR = new Tone.Gain();\n\t        /**\n\t\t\t *  the right side feeback\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._feedbackRL = new Tone.Gain();\n\t        //connect it up\n\t        this.effectReturnL.chain(this._feedbackLR, this.effectSendR);\n\t        this.effectReturnR.chain(this._feedbackRL, this.effectSendL);\n\t        this.feedback.fan(this._feedbackLR.gain, this._feedbackRL.gain);\n\t        this._readOnly(['feedback']);\n\t    };\n\t    Tone.extend(Tone.StereoXFeedbackEffect, Tone.StereoEffect);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.StereoXFeedbackEffect} this\n\t\t */\n\t    Tone.StereoXFeedbackEffect.prototype.dispose = function () {\n\t        Tone.StereoEffect.prototype.dispose.call(this);\n\t        this._writable(['feedback']);\n\t        this.feedback.dispose();\n\t        this.feedback = null;\n\t        this._feedbackLR.dispose();\n\t        this._feedbackLR = null;\n\t        this._feedbackRL.dispose();\n\t        this._feedbackRL = null;\n\t        return this;\n\t    };\n\t    return Tone.StereoXFeedbackEffect;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.PingPongDelay is a feedback delay effect where the echo is heard\n\t\t *          first in one channel and next in the opposite channel. In a stereo\n\t\t *          system these are the right and left channels.\n\t\t *          PingPongDelay in more simplified terms is two Tone.FeedbackDelays\n\t\t *          with independent delay values. Each delay is routed to one channel\n\t\t *          (left or right), and the channel triggered second will always\n\t\t *          trigger at the same interval after the first.\n\t\t *\n\t\t * \t@constructor\n\t\t * \t@extends {Tone.StereoXFeedbackEffect}\n\t\t *  @param {Time|Object} [delayTime] The delayTime between consecutive echos.\n\t\t *  @param {NormalRange=} feedback The amount of the effected signal which\n\t\t *                                 is fed back through the delay.\n\t\t *  @example\n\t\t * var pingPong = new Tone.PingPongDelay(\"4n\", 0.2).toMaster();\n\t\t * var drum = new Tone.DrumSynth().connect(pingPong);\n\t\t * drum.triggerAttackRelease(\"C4\", \"32n\");\n\t\t */\n\t    Tone.PingPongDelay = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'delayTime',\n\t            'feedback'\n\t        ], Tone.PingPongDelay);\n\t        Tone.StereoXFeedbackEffect.call(this, options);\n\t        /**\n\t\t\t *  the delay node on the left side\n\t\t\t *  @type {Tone.Delay}\n\t\t\t *  @private\n\t\t\t */\n\t        this._leftDelay = new Tone.Delay(0, options.maxDelayTime);\n\t        /**\n\t\t\t *  the delay node on the right side\n\t\t\t *  @type {Tone.Delay}\n\t\t\t *  @private\n\t\t\t */\n\t        this._rightDelay = new Tone.Delay(0, options.maxDelayTime);\n\t        /**\n\t\t\t *  the predelay on the right side\n\t\t\t *  @type {Tone.Delay}\n\t\t\t *  @private\n\t\t\t */\n\t        this._rightPreDelay = new Tone.Delay(0, options.maxDelayTime);\n\t        /**\n\t\t\t *  the delay time signal\n\t\t\t *  @type {Time}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.delayTime = new Tone.Signal(options.delayTime, Tone.Type.Time);\n\t        //connect it up\n\t        this.effectSendL.chain(this._leftDelay, this.effectReturnL);\n\t        this.effectSendR.chain(this._rightPreDelay, this._rightDelay, this.effectReturnR);\n\t        this.delayTime.fan(this._leftDelay.delayTime, this._rightDelay.delayTime, this._rightPreDelay.delayTime);\n\t        //rearranged the feedback to be after the rightPreDelay\n\t        this._feedbackLR.disconnect();\n\t        this._feedbackLR.connect(this._rightDelay);\n\t        this._readOnly(['delayTime']);\n\t    };\n\t    Tone.extend(Tone.PingPongDelay, Tone.StereoXFeedbackEffect);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.PingPongDelay.defaults = {\n\t        'delayTime': 0.25,\n\t        'maxDelayTime': 1\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.PingPongDelay} this\n\t\t */\n\t    Tone.PingPongDelay.prototype.dispose = function () {\n\t        Tone.StereoXFeedbackEffect.prototype.dispose.call(this);\n\t        this._leftDelay.dispose();\n\t        this._leftDelay = null;\n\t        this._rightDelay.dispose();\n\t        this._rightDelay = null;\n\t        this._rightPreDelay.dispose();\n\t        this._rightPreDelay = null;\n\t        this._writable(['delayTime']);\n\t        this.delayTime.dispose();\n\t        this.delayTime = null;\n\t        return this;\n\t    };\n\t    return Tone.PingPongDelay;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.PitchShift does near-realtime pitch shifting to the incoming signal.\n\t\t *         The effect is achieved by speeding up or slowing down the delayTime\n\t\t *         of a DelayNode using a sawtooth wave.\n\t\t *         Algorithm found in [this pdf](http://dsp-book.narod.ru/soundproc.pdf).\n\t\t *         Additional reference by [Miller Pucket](http://msp.ucsd.edu/techniques/v0.11/book-html/node115.html).\n\t\t *\n\t\t *  @extends {Tone.FeedbackEffect}\n\t\t *  @param {Interval=} pitch The interval to transpose the incoming signal by.\n\t\t */\n\t    Tone.PitchShift = function () {\n\t        var options = Tone.defaults(arguments, ['pitch'], Tone.PitchShift);\n\t        Tone.FeedbackEffect.call(this, options);\n\t        /**\n\t\t\t *  The pitch signal\n\t\t\t *  @type  {Tone.Signal}\n\t\t\t *  @private\n\t\t\t */\n\t        this._frequency = new Tone.Signal(0);\n\t        /**\n\t\t\t *  Uses two DelayNodes to cover up the jump in\n\t\t\t *  the sawtooth wave.\n\t\t\t *  @type  {DelayNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delayA = new Tone.Delay(0, 1);\n\t        /**\n\t\t\t *  The first LFO.\n\t\t\t *  @type  {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfoA = new Tone.LFO({\n\t            'min': 0,\n\t            'max': 0.1,\n\t            'type': 'sawtooth'\n\t        }).connect(this._delayA.delayTime);\n\t        /**\n\t\t\t *  The second DelayNode\n\t\t\t *  @type  {DelayNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delayB = new Tone.Delay(0, 1);\n\t        /**\n\t\t\t *  The first LFO.\n\t\t\t *  @type  {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfoB = new Tone.LFO({\n\t            'min': 0,\n\t            'max': 0.1,\n\t            'type': 'sawtooth',\n\t            'phase': 180\n\t        }).connect(this._delayB.delayTime);\n\t        /**\n\t\t\t *  Crossfade quickly between the two delay lines\n\t\t\t *  to cover up the jump in the sawtooth wave\n\t\t\t *  @type  {Tone.CrossFade}\n\t\t\t *  @private\n\t\t\t */\n\t        this._crossFade = new Tone.CrossFade();\n\t        /**\n\t\t\t *  LFO which alternates between the two\n\t\t\t *  delay lines to cover up the disparity in the\n\t\t\t *  sawtooth wave.\n\t\t\t *  @type  {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._crossFadeLFO = new Tone.LFO({\n\t            'min': 0,\n\t            'max': 1,\n\t            'type': 'triangle',\n\t            'phase': 90\n\t        }).connect(this._crossFade.fade);\n\t        /**\n\t\t\t *  The delay node\n\t\t\t *  @type {Tone.Delay}\n\t\t\t *  @private\n\t\t\t */\n\t        this._feedbackDelay = new Tone.Delay(options.delayTime);\n\t        /**\n\t\t\t *  The amount of delay on the input signal\n\t\t\t *  @type {Time}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.delayTime = this._feedbackDelay.delayTime;\n\t        this._readOnly('delayTime');\n\t        /**\n\t\t\t *  Hold the current pitch\n\t\t\t *  @type {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._pitch = options.pitch;\n\t        /**\n\t\t\t *  Hold the current windowSize\n\t\t\t *  @type {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._windowSize = options.windowSize;\n\t        //connect the two delay lines up\n\t        this._delayA.connect(this._crossFade.a);\n\t        this._delayB.connect(this._crossFade.b);\n\t        //connect the frequency\n\t        this._frequency.fan(this._lfoA.frequency, this._lfoB.frequency, this._crossFadeLFO.frequency);\n\t        //route the input\n\t        this.effectSend.fan(this._delayA, this._delayB);\n\t        this._crossFade.chain(this._feedbackDelay, this.effectReturn);\n\t        //start the LFOs at the same time\n\t        var now = this.now();\n\t        this._lfoA.start(now);\n\t        this._lfoB.start(now);\n\t        this._crossFadeLFO.start(now);\n\t        //set the initial value\n\t        this.windowSize = this._windowSize;\n\t    };\n\t    Tone.extend(Tone.PitchShift, Tone.FeedbackEffect);\n\t    /**\n\t\t *  default values\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.PitchShift.defaults = {\n\t        'pitch': 0,\n\t        'windowSize': 0.1,\n\t        'delayTime': 0,\n\t        'feedback': 0\n\t    };\n\t    /**\n\t\t * Repitch the incoming signal by some interval (measured\n\t\t * in semi-tones).\n\t\t * @memberOf Tone.PitchShift#\n\t\t * @type {Interval}\n\t\t * @name pitch\n\t\t * @example\n\t\t * pitchShift.pitch = -12; //down one octave\n\t\t * pitchShift.pitch = 7; //up a fifth\n\t\t */\n\t    Object.defineProperty(Tone.PitchShift.prototype, 'pitch', {\n\t        get: function () {\n\t            return this._pitch;\n\t        },\n\t        set: function (interval) {\n\t            this._pitch = interval;\n\t            var factor = 0;\n\t            if (interval < 0) {\n\t                this._lfoA.min = 0;\n\t                this._lfoA.max = this._windowSize;\n\t                this._lfoB.min = 0;\n\t                this._lfoB.max = this._windowSize;\n\t                factor = Tone.intervalToFrequencyRatio(interval - 1) + 1;\n\t            } else {\n\t                this._lfoA.min = this._windowSize;\n\t                this._lfoA.max = 0;\n\t                this._lfoB.min = this._windowSize;\n\t                this._lfoB.max = 0;\n\t                factor = Tone.intervalToFrequencyRatio(interval) - 1;\n\t            }\n\t            this._frequency.value = factor * (1.2 / this._windowSize);\n\t        }\n\t    });\n\t    /**\n\t\t * The window size corresponds roughly to the sample length in a looping sampler.\n\t\t * Smaller values are desirable for a less noticeable delay time of the pitch shifted\n\t\t * signal, but larger values will result in smoother pitch shifting for larger intervals.\n\t\t * A nominal range of 0.03 to 0.1 is recommended.\n\t\t * @memberOf Tone.PitchShift#\n\t\t * @type {Time}\n\t\t * @name windowSize\n\t\t * @example\n\t\t * pitchShift.windowSize = 0.1;\n\t\t */\n\t    Object.defineProperty(Tone.PitchShift.prototype, 'windowSize', {\n\t        get: function () {\n\t            return this._windowSize;\n\t        },\n\t        set: function (size) {\n\t            this._windowSize = this.toSeconds(size);\n\t            this.pitch = this._pitch;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.PitchShift}  this\n\t\t */\n\t    Tone.PitchShift.prototype.dispose = function () {\n\t        Tone.FeedbackEffect.prototype.dispose.call(this);\n\t        this._frequency.dispose();\n\t        this._frequency = null;\n\t        this._delayA.disconnect();\n\t        this._delayA = null;\n\t        this._delayB.disconnect();\n\t        this._delayB = null;\n\t        this._lfoA.dispose();\n\t        this._lfoA = null;\n\t        this._lfoB.dispose();\n\t        this._lfoB = null;\n\t        this._crossFade.dispose();\n\t        this._crossFade = null;\n\t        this._crossFadeLFO.dispose();\n\t        this._crossFadeLFO = null;\n\t        this._writable('delayTime');\n\t        this._feedbackDelay.dispose();\n\t        this._feedbackDelay = null;\n\t        this.delayTime = null;\n\t        return this;\n\t    };\n\t    return Tone.PitchShift;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Wrapper around the native BufferSourceNode.\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param  {AudioBuffer|Tone.Buffer}  buffer   The buffer to play\n\t\t *  @param  {Function}  onload  The callback to invoke when the\n\t\t *                               buffer is done playing.\n\t\t */\n\t    Tone.BufferSource = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'buffer',\n\t            'onload'\n\t        ], Tone.BufferSource);\n\t        Tone.AudioNode.call(this, options);\n\t        /**\n\t\t\t *  The callback to invoke after the\n\t\t\t *  buffer source is done playing.\n\t\t\t *  @type  {Function}\n\t\t\t */\n\t        this.onended = options.onended;\n\t        /**\n\t\t\t *  The time that the buffer was started.\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._startTime = -1;\n\t        /**\n\t\t\t *  An additional flag if the actual BufferSourceNode\n\t\t\t *  has been started. b/c stopping an unstarted buffer\n\t\t\t *  will throw it into an invalid state\n\t\t\t *  @type  {Boolean}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sourceStarted = false;\n\t        /**\n\t\t\t *  Flag if the source has already been stopped\n\t\t\t *  @type  {Boolean}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sourceStopped = false;\n\t        /**\n\t\t\t *  The time that the buffer is scheduled to stop.\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._stopTime = -1;\n\t        /**\n\t\t\t *  The gain node which envelopes the BufferSource\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._gainNode = this.output = new Tone.Gain();\n\t        /**\n\t\t\t *  The buffer source\n\t\t\t *  @type  {AudioBufferSourceNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._source = this.context.createBufferSource();\n\t        this._source.connect(this._gainNode);\n\t        this._source.onended = this._onended.bind(this);\n\t        /**\n\t\t\t * The private buffer instance\n\t\t\t * @type {Tone.Buffer}\n\t\t\t * @private\n\t\t\t */\n\t        this._buffer = new Tone.Buffer(options.buffer, options.onload);\n\t        /**\n\t\t\t *  The playbackRate of the buffer\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.playbackRate = new Tone.Param(this._source.playbackRate, Tone.Type.Positive);\n\t        /**\n\t\t\t *  The fadeIn time of the amplitude envelope.\n\t\t\t *  @type {Time}\n\t\t\t */\n\t        this.fadeIn = options.fadeIn;\n\t        /**\n\t\t\t *  The fadeOut time of the amplitude envelope.\n\t\t\t *  @type {Time}\n\t\t\t */\n\t        this.fadeOut = options.fadeOut;\n\t        /**\n\t\t\t * The curve applied to the fades, either \"linear\" or \"exponential\"\n\t\t\t * @type {String}\n\t\t\t */\n\t        this.curve = options.curve;\n\t        /**\n\t\t\t *  The value that the buffer ramps to\n\t\t\t *  @type {Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._gain = 1;\n\t        /**\n\t\t\t * The onended timeout\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t        this._onendedTimeout = -1;\n\t        //set some values initially\n\t        this.loop = options.loop;\n\t        this.loopStart = options.loopStart;\n\t        this.loopEnd = options.loopEnd;\n\t        this.playbackRate.value = options.playbackRate;\n\t    };\n\t    Tone.extend(Tone.BufferSource, Tone.AudioNode);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.BufferSource.defaults = {\n\t        'onended': Tone.noOp,\n\t        'onload': Tone.noOp,\n\t        'loop': false,\n\t        'loopStart': 0,\n\t        'loopEnd': 0,\n\t        'fadeIn': 0,\n\t        'fadeOut': 0,\n\t        'curve': 'linear',\n\t        'playbackRate': 1\n\t    };\n\t    /**\n\t\t *  Returns the playback state of the source, either \"started\" or \"stopped\".\n\t\t *  @type {Tone.State}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.BufferSource#\n\t\t *  @name state\n\t\t */\n\t    Object.defineProperty(Tone.BufferSource.prototype, 'state', {\n\t        get: function () {\n\t            return this.getStateAtTime(this.now());\n\t        }\n\t    });\n\t    /**\n\t\t *  Get the playback state at the given time\n\t\t *  @param  {Time}  time  The time to test the state at\n\t\t *  @return  {Tone.State}  The playback state. \n\t\t */\n\t    Tone.BufferSource.prototype.getStateAtTime = function (time) {\n\t        time = this.toSeconds(time);\n\t        if (this._startTime !== -1 && time >= this._startTime && !this._sourceStopped) {\n\t            return Tone.State.Started;\n\t        } else {\n\t            return Tone.State.Stopped;\n\t        }\n\t    };\n\t    /**\n\t\t *  Start the buffer\n\t\t *  @param  {Time} [startTime=now] When the player should start.\n\t\t *  @param  {Time} [offset=0] The offset from the beginning of the sample\n\t\t *                                 to start at.\n\t\t *  @param  {Time=} duration How long the sample should play. If no duration\n\t\t *                                is given, it will default to the full length\n\t\t *                                of the sample (minus any offset)\n\t\t *  @param  {Gain}  [gain=1]  The gain to play the buffer back at.\n\t\t *  @param  {Time=}  fadeInTime  The optional fadeIn ramp time.\n\t\t *  @return  {Tone.BufferSource}  this\n\t\t */\n\t    Tone.BufferSource.prototype.start = function (time, offset, duration, gain, fadeInTime) {\n\t        if (this._startTime !== -1) {\n\t            throw new Error('Tone.BufferSource can only be started once.');\n\t        }\n\t        if (!this.buffer.loaded) {\n\t            throw new Error('Tone.BufferSource: buffer is either not set or not loaded.');\n\t        }\n\t        time = this.toSeconds(time);\n\t        //if it's a loop the default offset is the loopstart point\n\t        if (this.loop) {\n\t            offset = Tone.defaultArg(offset, this.loopStart);\n\t        } else {\n\t            //otherwise the default offset is 0\n\t            offset = Tone.defaultArg(offset, 0);\n\t        }\n\t        offset = this.toSeconds(offset);\n\t        gain = Tone.defaultArg(gain, 1);\n\t        this._gain = gain;\n\t        fadeInTime = this.toSeconds(Tone.defaultArg(fadeInTime, this.fadeIn));\n\t        this.fadeIn = fadeInTime;\n\t        if (fadeInTime > 0) {\n\t            this._gainNode.gain.setValueAtTime(0, time);\n\t            if (this.curve === 'linear') {\n\t                this._gainNode.gain.linearRampToValueAtTime(this._gain, time + fadeInTime);\n\t            } else {\n\t                this._gainNode.gain.exponentialApproachValueAtTime(this._gain, time, fadeInTime);\n\t            }\n\t        } else {\n\t            this._gainNode.gain.setValueAtTime(gain, time);\n\t        }\n\t        this._startTime = time;\n\t        var computedDur = this.toSeconds(Tone.defaultArg(duration, this.buffer.duration - offset % this.buffer.duration));\n\t        computedDur = Math.max(computedDur, 0);\n\t        if (Tone.isDefined(duration)) {\n\t            //clip the duration when not looping\n\t            if (!this.loop) {\n\t                computedDur = Math.min(computedDur, this.buffer.duration - offset % this.buffer.duration);\n\t            }\n\t            this.stop(time + computedDur, this.fadeOut);\n\t        }\n\t        //start the buffer source\n\t        if (this.loop) {\n\t            //modify the offset if it's greater than the loop time\n\t            var loopEnd = this.loopEnd || this.buffer.duration;\n\t            var loopStart = this.loopStart;\n\t            var loopDuration = loopEnd - loopStart;\n\t            //move the offset back\n\t            if (offset >= loopEnd) {\n\t                offset = (offset - loopStart) % loopDuration + loopStart;\n\t            }\n\t        }\n\t        this._source.buffer = this.buffer.get();\n\t        this._source.loopEnd = this.loopEnd || this.buffer.duration;\n\t        if (offset < this.buffer.duration) {\n\t            this._sourceStarted = true;\n\t            this._source.start(time, offset);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Stop the buffer. Optionally add a ramp time to fade the\n\t\t *  buffer out.\n\t\t *  @param  {Time=}  time         The time the buffer should stop.\n\t\t *  @param  {Time=}  fadeOutTime  How long the gain should fade out for\n\t\t *  @return  {Tone.BufferSource}  this\n\t\t */\n\t    Tone.BufferSource.prototype.stop = function (time, fadeOutTime) {\n\t        if (!this.buffer.loaded) {\n\t            throw new Error('Tone.BufferSource: buffer is either not set or not loaded.');\n\t        }\n\t        if (this._sourceStopped) {\n\t            return;\n\t        }\n\t        time = this.toSeconds(time);\n\t        //if the event has already been scheduled, clear it\n\t        if (this._stopTime !== -1) {\n\t            this.cancelStop();\n\t        }\n\t        //stop if it's schedule before the start time\n\t        if (time <= this._startTime) {\n\t            this._gainNode.gain.cancelScheduledValues(time);\n\t            this._gainNode.gain.value = 0;\n\t            return this;\n\t        }\n\t        time = Math.max(this._startTime + this.fadeIn + this.sampleTime, time);\n\t        //cancel the previous curve\n\t        this._gainNode.gain.cancelScheduledValues(time);\n\t        this._stopTime = time;\n\t        //the fadeOut time\n\t        fadeOutTime = this.toSeconds(Tone.defaultArg(fadeOutTime, this.fadeOut));\n\t        var heldDuration = time - this._startTime - this.fadeIn - this.sampleTime;\n\t        if (!this.loop) {\n\t            //make sure the fade does not go beyond the length of the buffer\n\t            heldDuration = Math.min(heldDuration, this.buffer.duration);\n\t        }\n\t        fadeOutTime = Math.min(heldDuration, fadeOutTime);\n\t        var startFade = time - fadeOutTime;\n\t        if (fadeOutTime > this.sampleTime) {\n\t            this._gainNode.gain.setValueAtTime(this._gain, startFade);\n\t            if (this.curve === 'linear') {\n\t                this._gainNode.gain.linearRampToValueAtTime(0, time);\n\t            } else {\n\t                this._gainNode.gain.exponentialApproachValueAtTime(0, startFade, fadeOutTime);\n\t            }\n\t        } else {\n\t            this._gainNode.gain.setValueAtTime(0, time);\n\t        }\n\t        Tone.context.clearTimeout(this._onendedTimeout);\n\t        this._onendedTimeout = Tone.context.setTimeout(this._onended.bind(this), this._stopTime - this.now());\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancel a scheduled stop event\n\t\t *  @return  {Tone.BufferSource}  this\n\t\t */\n\t    Tone.BufferSource.prototype.cancelStop = function () {\n\t        if (this._startTime !== -1 && !this._sourceStopped) {\n\t            //cancel the stop envelope\n\t            var fadeInTime = this.toSeconds(this.fadeIn);\n\t            this._gainNode.gain.cancelScheduledValues(this._startTime + fadeInTime + this.sampleTime);\n\t            this._gainNode.gain.setValueAtTime(1, Math.max(this.now(), this._startTime + fadeInTime + this.sampleTime));\n\t            this.context.clearTimeout(this._onendedTimeout);\n\t            this._stopTime = -1;\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Internal callback when the buffer is ended.\n\t\t *  Invokes `onended` and disposes the node.\n\t\t *  @private\n\t\t */\n\t    Tone.BufferSource.prototype._onended = function () {\n\t        if (!this._sourceStopped) {\n\t            this._sourceStopped = true;\n\t            //allow additional time for the exponential curve to fully decay\n\t            var additionalTail = this.curve === 'exponential' ? this.fadeOut * 2 : 0;\n\t            if (this._sourceStarted && this._stopTime !== -1) {\n\t                this._source.stop(this._stopTime + additionalTail);\n\t            }\n\t            this.onended(this);\n\t        }\n\t    };\n\t    /**\n\t\t * If loop is true, the loop will start at this position.\n\t\t * @memberOf Tone.BufferSource#\n\t\t * @type {Time}\n\t\t * @name loopStart\n\t\t */\n\t    Object.defineProperty(Tone.BufferSource.prototype, 'loopStart', {\n\t        get: function () {\n\t            return this._source.loopStart;\n\t        },\n\t        set: function (loopStart) {\n\t            this._source.loopStart = this.toSeconds(loopStart);\n\t        }\n\t    });\n\t    /**\n\t\t * If loop is true, the loop will end at this position.\n\t\t * @memberOf Tone.BufferSource#\n\t\t * @type {Time}\n\t\t * @name loopEnd\n\t\t */\n\t    Object.defineProperty(Tone.BufferSource.prototype, 'loopEnd', {\n\t        get: function () {\n\t            return this._source.loopEnd;\n\t        },\n\t        set: function (loopEnd) {\n\t            this._source.loopEnd = this.toSeconds(loopEnd);\n\t        }\n\t    });\n\t    /**\n\t\t * The audio buffer belonging to the player.\n\t\t * @memberOf Tone.BufferSource#\n\t\t * @type {Tone.Buffer}\n\t\t * @name buffer\n\t\t */\n\t    Object.defineProperty(Tone.BufferSource.prototype, 'buffer', {\n\t        get: function () {\n\t            return this._buffer;\n\t        },\n\t        set: function (buffer) {\n\t            this._buffer.set(buffer);\n\t        }\n\t    });\n\t    /**\n\t\t * If the buffer should loop once it's over.\n\t\t * @memberOf Tone.BufferSource#\n\t\t * @type {Boolean}\n\t\t * @name loop\n\t\t */\n\t    Object.defineProperty(Tone.BufferSource.prototype, 'loop', {\n\t        get: function () {\n\t            return this._source.loop;\n\t        },\n\t        set: function (loop) {\n\t            this._source.loop = loop;\n\t            this.cancelStop();\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.BufferSource}  this\n\t\t */\n\t    Tone.BufferSource.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this.onended = null;\n\t        this._source.onended = null;\n\t        this._source.disconnect();\n\t        this._source = null;\n\t        this._gainNode.dispose();\n\t        this._gainNode = null;\n\t        this._buffer.dispose();\n\t        this._buffer = null;\n\t        this._startTime = -1;\n\t        this.playbackRate = null;\n\t        Tone.context.clearTimeout(this._onendedTimeout);\n\t        return this;\n\t    };\n\t    return Tone.BufferSource;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Noise is a noise generator. It uses looped noise buffers to save on performance.\n\t\t *          Tone.Noise supports the noise types: \"pink\", \"white\", and \"brown\". Read more about\n\t\t *          colors of noise on [Wikipedia](https://en.wikipedia.org/wiki/Colors_of_noise).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Source}\n\t\t *  @param {string} type the noise type (white|pink|brown)\n\t\t *  @example\n\t\t * //initialize the noise and start\n\t\t * var noise = new Tone.Noise(\"pink\").start();\n\t\t *\n\t\t * //make an autofilter to shape the noise\n\t\t * var autoFilter = new Tone.AutoFilter({\n\t\t * \t\"frequency\" : \"8m\",\n\t\t * \t\"min\" : 800,\n\t\t * \t\"max\" : 15000\n\t\t * }).connect(Tone.Master);\n\t\t *\n\t\t * //connect the noise\n\t\t * noise.connect(autoFilter);\n\t\t * //start the autofilter LFO\n\t\t * autoFilter.start()\n\t\t */\n\t    Tone.Noise = function () {\n\t        var options = Tone.defaults(arguments, ['type'], Tone.Noise);\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  @private\n\t\t\t *  @type {AudioBufferSourceNode}\n\t\t\t */\n\t        this._source = null;\n\t        /**\n\t\t\t *  the buffer\n\t\t\t *  @private\n\t\t\t *  @type {AudioBuffer}\n\t\t\t */\n\t        this._type = options.type;\n\t        /**\n\t\t\t *  The playback rate of the noise. Affects\n\t\t\t *  the \"frequency\" of the noise.\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t */\n\t        this._playbackRate = options.playbackRate;\n\t    };\n\t    Tone.extend(Tone.Noise, Tone.Source);\n\t    /**\n\t\t *  the default parameters\n\t\t *\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Noise.defaults = {\n\t        'type': 'white',\n\t        'playbackRate': 1\n\t    };\n\t    /**\n\t\t * The type of the noise. Can be \"white\", \"brown\", or \"pink\".\n\t\t * @memberOf Tone.Noise#\n\t\t * @type {string}\n\t\t * @name type\n\t\t * @example\n\t\t * noise.type = \"white\";\n\t\t */\n\t    Object.defineProperty(Tone.Noise.prototype, 'type', {\n\t        get: function () {\n\t            return this._type;\n\t        },\n\t        set: function (type) {\n\t            if (this._type !== type) {\n\t                if (type in _noiseBuffers) {\n\t                    this._type = type;\n\t                    //if it's playing, stop and restart it\n\t                    if (this.state === Tone.State.Started) {\n\t                        var now = this.now();\n\t                        this._stop(now);\n\t                        this._start(now);\n\t                    }\n\t                } else {\n\t                    throw new TypeError('Tone.Noise: invalid type: ' + type);\n\t                }\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  The playback rate of the noise. Affects\n\t\t *  the \"frequency\" of the noise.\n\t\t *  @type {Positive}\n\t\t *  @signal\n\t\t */\n\t    Object.defineProperty(Tone.Noise.prototype, 'playbackRate', {\n\t        get: function () {\n\t            return this._playbackRate;\n\t        },\n\t        set: function (rate) {\n\t            this._playbackRate = rate;\n\t            if (this._source) {\n\t                this._source.playbackRate.value = rate;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  internal start method\n\t\t *\n\t\t *  @param {Time} time\n\t\t *  @private\n\t\t */\n\t    Tone.Noise.prototype._start = function (time) {\n\t        var buffer = _noiseBuffers[this._type];\n\t        this._source = new Tone.BufferSource(buffer).connect(this.output);\n\t        this._source.loop = true;\n\t        this._source.playbackRate.value = this._playbackRate;\n\t        this._source.start(this.toSeconds(time), Math.random() * (buffer.duration - 0.001));\n\t    };\n\t    /**\n\t\t *  internal stop method\n\t\t *\n\t\t *  @param {Time} time\n\t\t *  @private\n\t\t */\n\t    Tone.Noise.prototype._stop = function (time) {\n\t        if (this._source) {\n\t            this._source.stop(this.toSeconds(time));\n\t            this._source = null;\n\t        }\n\t    };\n\t    /**\n\t\t * Restarts the noise.\n\t\t * @param  {[type]} time [description]\n\t\t * @return {[type]}      [description]\n\t\t */\n\t    Tone.Noise.prototype.restart = function (time) {\n\t        //TODO could be optimized by cancelling the buffer source 'stop'\n\t        //stop and restart\n\t        this._stop(time);\n\t        this._start(time);\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Noise} this\n\t\t */\n\t    Tone.Noise.prototype.dispose = function () {\n\t        Tone.Source.prototype.dispose.call(this);\n\t        if (this._source !== null) {\n\t            this._source.disconnect();\n\t            this._source = null;\n\t        }\n\t        this._buffer = null;\n\t        return this;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    // THE BUFFERS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //Noise buffer stats\n\t    var bufferLength = 44100 * 5;\n\t    var channels = 2;\n\t    /**\n\t\t *\tThe noise arrays. Generated on initialization.\n\t\t *  borrowed heavily from https://github.com/zacharydenton/noise.js\n\t\t *  (c) 2013 Zach Denton (MIT)\n\t\t *  @static\n\t\t *  @private\n\t\t *  @type {Array}\n\t\t */\n\t    var _noiseArrays = {\n\t        'pink': function () {\n\t            var buffer = [];\n\t            for (var channelNum = 0; channelNum < channels; channelNum++) {\n\t                var channel = new Float32Array(bufferLength);\n\t                buffer[channelNum] = channel;\n\t                var b0, b1, b2, b3, b4, b5, b6;\n\t                b0 = b1 = b2 = b3 = b4 = b5 = b6 = 0;\n\t                for (var i = 0; i < bufferLength; i++) {\n\t                    var white = Math.random() * 2 - 1;\n\t                    b0 = 0.99886 * b0 + white * 0.0555179;\n\t                    b1 = 0.99332 * b1 + white * 0.0750759;\n\t                    b2 = 0.969 * b2 + white * 0.153852;\n\t                    b3 = 0.8665 * b3 + white * 0.3104856;\n\t                    b4 = 0.55 * b4 + white * 0.5329522;\n\t                    b5 = -0.7616 * b5 - white * 0.016898;\n\t                    channel[i] = b0 + b1 + b2 + b3 + b4 + b5 + b6 + white * 0.5362;\n\t                    channel[i] *= 0.11;\n\t                    // (roughly) compensate for gain\n\t                    b6 = white * 0.115926;\n\t                }\n\t            }\n\t            return buffer;\n\t        }(),\n\t        'brown': function () {\n\t            var buffer = [];\n\t            for (var channelNum = 0; channelNum < channels; channelNum++) {\n\t                var channel = new Float32Array(bufferLength);\n\t                buffer[channelNum] = channel;\n\t                var lastOut = 0;\n\t                for (var i = 0; i < bufferLength; i++) {\n\t                    var white = Math.random() * 2 - 1;\n\t                    channel[i] = (lastOut + 0.02 * white) / 1.02;\n\t                    lastOut = channel[i];\n\t                    channel[i] *= 3.5;    // (roughly) compensate for gain\n\t                }\n\t            }\n\t            return buffer;\n\t        }(),\n\t        'white': function () {\n\t            var buffer = [];\n\t            for (var channelNum = 0; channelNum < channels; channelNum++) {\n\t                var channel = new Float32Array(bufferLength);\n\t                buffer[channelNum] = channel;\n\t                for (var i = 0; i < bufferLength; i++) {\n\t                    channel[i] = Math.random() * 2 - 1;\n\t                }\n\t            }\n\t            return buffer;\n\t        }()\n\t    };\n\t    /**\n\t\t *\tstatic noise buffers\n\t\t *  @static\n\t\t *  @private\n\t\t *  @type {Tone.Buffer}\n\t\t */\n\t    var _noiseBuffers = {};\n\t    //create the Tone.Buffers\n\t    function createBuffers() {\n\t        for (var type in _noiseArrays) {\n\t            _noiseBuffers[type] = new Tone.Buffer().fromArray(_noiseArrays[type]);\n\t        }\n\t    }\n\t    //create the noise buffers\n\t    Tone.getContext(createBuffers);\n\t    Tone.Context.on('init', createBuffers);\n\t    return Tone.Noise;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Simple convolution created with decaying noise.\n\t\t *  \t\tGenerates an Impulse Response Buffer\n\t\t * \t\t\twith Tone.Offline then feeds the IR into ConvolverNode.\n\t\t * \t\t\tNote: the Reverb will not make any sound until [generate](#generate)\n\t\t * \t\t\thas been invoked and resolved.\n\t\t *\n\t\t * \t\t\tInspiration from [ReverbGen](https://github.com/adelespinasse/reverbGen).\n\t\t * \t\t\tCopyright (c) 2014 Alan deLespinasse Apache 2.0 License.\n\t\t *\n\t\t *  @extends {Tone.Convolver}\n\t\t *  @param {Time=} decay The amount of time it will reverberate for.\n\t\t */\n\t    Tone.Reverb = function () {\n\t        var options = Tone.defaults(arguments, ['decay'], Tone.Reverb);\n\t        Tone.Effect.call(this, options);\n\t        /**\n\t\t\t *  Convolver node\n\t\t\t *  @type {ConvolverNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._convolver = this.context.createConvolver();\n\t        /**\n\t\t\t * The duration of the reverb\n\t\t\t * @type {Time}\n\t\t\t */\n\t        this.decay = options.decay;\n\t        /**\n\t\t\t * The amount of time before the reverb is fully\n\t\t\t * ramped in.\n\t\t\t * @type {Time}\n\t\t\t */\n\t        this.preDelay = options.preDelay;\n\t        this.connectEffect(this._convolver);\n\t    };\n\t    Tone.extend(Tone.Reverb, Tone.Effect);\n\t    /**\n\t\t * The defaults\n\t\t * @type {Object}\n\t\t * @static\n\t\t */\n\t    Tone.Reverb.defaults = {\n\t        'decay': 1.5,\n\t        'preDelay': 0.01\n\t    };\n\t    /**\n\t\t * Generate the Impulse Response. Returns a promise while the IR is being\n\t\t * generated.\n\t\t * @return {Promise<Tone.Reverb>} Promise which returns this object.\n\t\t */\n\t    Tone.Reverb.prototype.generate = function () {\n\t        return Tone.Offline(function () {\n\t            //create a noise burst which decays over the duration\n\t            var noiseL = new Tone.Noise();\n\t            var noiseR = new Tone.Noise();\n\t            var merge = new Tone.Merge();\n\t            noiseL.connect(merge.left);\n\t            noiseR.connect(merge.right);\n\t            var gainNode = new Tone.Gain().toMaster();\n\t            merge.connect(gainNode);\n\t            noiseL.start(0);\n\t            noiseR.start(0);\n\t            //short fade in\n\t            gainNode.gain.setValueAtTime(0, 0);\n\t            gainNode.gain.linearRampToValueAtTime(1, this.preDelay);\n\t            //decay\n\t            gainNode.gain.exponentialApproachValueAtTime(0, this.preDelay, this.decay - this.preDelay);\n\t        }.bind(this), this.decay).then(function (buffer) {\n\t            this._convolver.buffer = buffer.get();\n\t            return this;\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.Reverb}  this\n\t\t */\n\t    Tone.Reverb.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._convolver.disconnect();\n\t        this._convolver = null;\n\t        return this;\n\t    };\n\t    return Tone.Reverb;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Base class for stereo feedback effects where the effectReturn\n\t\t *         is fed back into the same channel.\n\t\t *\n\t\t *\t@constructor\n\t\t *\t@extends {Tone.StereoEffect}\n\t\t */\n\t    Tone.StereoFeedbackEffect = function () {\n\t        var options = Tone.defaults(arguments, ['feedback'], Tone.FeedbackEffect);\n\t        Tone.StereoEffect.call(this, options);\n\t        /**\n\t\t\t *  controls the amount of feedback\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.feedback = new Tone.Signal(options.feedback, Tone.Type.NormalRange);\n\t        /**\n\t\t\t *  the left side feeback\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._feedbackL = new Tone.Gain();\n\t        /**\n\t\t\t *  the right side feeback\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._feedbackR = new Tone.Gain();\n\t        //connect it up\n\t        this.effectReturnL.chain(this._feedbackL, this.effectSendL);\n\t        this.effectReturnR.chain(this._feedbackR, this.effectSendR);\n\t        this.feedback.fan(this._feedbackL.gain, this._feedbackR.gain);\n\t        this._readOnly(['feedback']);\n\t    };\n\t    Tone.extend(Tone.StereoFeedbackEffect, Tone.StereoEffect);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.StereoFeedbackEffect} this\n\t\t */\n\t    Tone.StereoFeedbackEffect.prototype.dispose = function () {\n\t        Tone.StereoEffect.prototype.dispose.call(this);\n\t        this._writable(['feedback']);\n\t        this.feedback.dispose();\n\t        this.feedback = null;\n\t        this._feedbackL.dispose();\n\t        this._feedbackL = null;\n\t        this._feedbackR.dispose();\n\t        this._feedbackR = null;\n\t        return this;\n\t    };\n\t    return Tone.StereoFeedbackEffect;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Applies a width factor to the mid/side seperation.\n\t\t *         0 is all mid and 1 is all side.\n\t\t *         Algorithm found in [kvraudio forums](http://www.kvraudio.com/forum/viewtopic.php?t=212587).\n\t\t *         <br><br>\n\t\t *         <code>\n\t\t *         Mid *= 2*(1-width)<br>\n\t\t *         Side *= 2*width\n\t\t *         </code>\n\t\t *\n\t\t *  @extends {Tone.MidSideEffect}\n\t\t *  @constructor\n\t\t *  @param {NormalRange|Object} [width] The stereo width. A width of 0 is mono and 1 is stereo. 0.5 is no change.\n\t\t */\n\t    Tone.StereoWidener = function () {\n\t        var options = Tone.defaults(arguments, ['width'], Tone.StereoWidener);\n\t        Tone.MidSideEffect.call(this, options);\n\t        /**\n\t\t\t *  The width control. 0 = 100% mid. 1 = 100% side. 0.5 = no change.\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.width = new Tone.Signal(options.width, Tone.Type.NormalRange);\n\t        this._readOnly(['width']);\n\t        /**\n\t\t\t * Two times the (1-width) for the mid channel\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t        this._twoTimesWidthMid = new Tone.Multiply(2);\n\t        /**\n\t\t\t * Two times the width for the side channel\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t        this._twoTimesWidthSide = new Tone.Multiply(2);\n\t        /**\n\t\t\t *  Mid multiplier\n\t\t\t *  @type {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._midMult = new Tone.Multiply();\n\t        this._twoTimesWidthMid.connect(this._midMult, 0, 1);\n\t        this.midSend.chain(this._midMult, this.midReturn);\n\t        /**\n\t\t\t * 1 - width\n\t\t\t * @type {Tone}\n\t\t\t */\n\t        this._oneMinusWidth = new Tone.Subtract();\n\t        this._oneMinusWidth.connect(this._twoTimesWidthMid);\n\t        this.context.getConstant(1).connect(this._oneMinusWidth, 0, 0);\n\t        this.width.connect(this._oneMinusWidth, 0, 1);\n\t        /**\n\t\t\t *  Side multiplier\n\t\t\t *  @type {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sideMult = new Tone.Multiply();\n\t        this.width.connect(this._twoTimesWidthSide);\n\t        this._twoTimesWidthSide.connect(this._sideMult, 0, 1);\n\t        this.sideSend.chain(this._sideMult, this.sideReturn);\n\t    };\n\t    Tone.extend(Tone.StereoWidener, Tone.MidSideEffect);\n\t    /**\n\t\t *  the default values\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.StereoWidener.defaults = { 'width': 0.5 };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.StereoWidener} this\n\t\t */\n\t    Tone.StereoWidener.prototype.dispose = function () {\n\t        Tone.MidSideEffect.prototype.dispose.call(this);\n\t        this._writable(['width']);\n\t        this.width.dispose();\n\t        this.width = null;\n\t        this._midMult.dispose();\n\t        this._midMult = null;\n\t        this._sideMult.dispose();\n\t        this._sideMult = null;\n\t        this._twoTimesWidthMid.dispose();\n\t        this._twoTimesWidthMid = null;\n\t        this._twoTimesWidthSide.dispose();\n\t        this._twoTimesWidthSide = null;\n\t        this._oneMinusWidth.dispose();\n\t        this._oneMinusWidth = null;\n\t        return this;\n\t    };\n\t    return Tone.StereoWidener;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Tremolo modulates the amplitude of an incoming signal using a Tone.LFO.\n\t\t *         The type, frequency, and depth of the LFO is controllable.\n\t\t *\n\t\t *  @extends {Tone.StereoEffect}\n\t\t *  @constructor\n\t\t *  @param {Frequency} [frequency] The rate of the effect.\n\t\t *  @param {NormalRange} [depth] The depth of the effect.\n\t\t *  @example\n\t\t * //create a tremolo and start it's LFO\n\t\t * var tremolo = new Tone.Tremolo(9, 0.75).toMaster().start();\n\t\t * //route an oscillator through the tremolo and start it\n\t\t * var oscillator = new Tone.Oscillator().connect(tremolo).start();\n\t\t */\n\t    Tone.Tremolo = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'depth'\n\t        ], Tone.Tremolo);\n\t        Tone.StereoEffect.call(this, options);\n\t        /**\n\t\t\t *  The tremelo LFO in the left channel\n\t\t\t *  @type  {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfoL = new Tone.LFO({\n\t            'phase': options.spread,\n\t            'min': 1,\n\t            'max': 0\n\t        });\n\t        /**\n\t\t\t *  The tremelo LFO in the left channel\n\t\t\t *  @type  {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfoR = new Tone.LFO({\n\t            'phase': options.spread,\n\t            'min': 1,\n\t            'max': 0\n\t        });\n\t        /**\n\t\t\t *  Where the gain is multiplied\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._amplitudeL = new Tone.Gain();\n\t        /**\n\t\t\t *  Where the gain is multiplied\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._amplitudeR = new Tone.Gain();\n\t        /**\n\t\t\t *  The frequency of the tremolo.\n\t\t\t *  @type  {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The depth of the effect. A depth of 0, has no effect\n\t\t\t *  on the amplitude, and a depth of 1 makes the amplitude\n\t\t\t *  modulate fully between 0 and 1.\n\t\t\t *  @type  {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.depth = new Tone.Signal(options.depth, Tone.Type.NormalRange);\n\t        this._readOnly([\n\t            'frequency',\n\t            'depth'\n\t        ]);\n\t        this.effectSendL.chain(this._amplitudeL, this.effectReturnL);\n\t        this.effectSendR.chain(this._amplitudeR, this.effectReturnR);\n\t        this._lfoL.connect(this._amplitudeL.gain);\n\t        this._lfoR.connect(this._amplitudeR.gain);\n\t        this.frequency.fan(this._lfoL.frequency, this._lfoR.frequency);\n\t        this.depth.fan(this._lfoR.amplitude, this._lfoL.amplitude);\n\t        this.type = options.type;\n\t        this.spread = options.spread;\n\t    };\n\t    Tone.extend(Tone.Tremolo, Tone.StereoEffect);\n\t    /**\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Tremolo.defaults = {\n\t        'frequency': 10,\n\t        'type': 'sine',\n\t        'depth': 0.5,\n\t        'spread': 180\n\t    };\n\t    /**\n\t\t * Start the tremolo.\n\t\t * @param {Time} [time=now] When the tremolo begins.\n\t\t * @returns {Tone.Tremolo} this\n\t\t */\n\t    Tone.Tremolo.prototype.start = function (time) {\n\t        this._lfoL.start(time);\n\t        this._lfoR.start(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Stop the tremolo.\n\t\t * @param {Time} [time=now] When the tremolo stops.\n\t\t * @returns {Tone.Tremolo} this\n\t\t */\n\t    Tone.Tremolo.prototype.stop = function (time) {\n\t        this._lfoL.stop(time);\n\t        this._lfoR.stop(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Sync the effect to the transport.\n\t\t * @param {Time} [delay=0] Delay time before starting the effect after the\n\t\t *                              Transport has started.\n\t\t * @returns {Tone.AutoFilter} this\n\t\t */\n\t    Tone.Tremolo.prototype.sync = function (delay) {\n\t        this._lfoL.sync(delay);\n\t        this._lfoR.sync(delay);\n\t        Tone.Transport.syncSignal(this.frequency);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Unsync the filter from the transport\n\t\t * @returns {Tone.Tremolo} this\n\t\t */\n\t    Tone.Tremolo.prototype.unsync = function () {\n\t        this._lfoL.unsync();\n\t        this._lfoR.unsync();\n\t        Tone.Transport.unsyncSignal(this.frequency);\n\t        return this;\n\t    };\n\t    /**\n\t\t * The Tremolo's oscillator type.\n\t\t * @memberOf Tone.Tremolo#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.Tremolo.prototype, 'type', {\n\t        get: function () {\n\t            return this._lfoL.type;\n\t        },\n\t        set: function (type) {\n\t            this._lfoL.type = type;\n\t            this._lfoR.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t * Amount of stereo spread. When set to 0, both LFO's will be panned centrally.\n\t\t * When set to 180, LFO's will be panned hard left and right respectively.\n\t\t * @memberOf Tone.Tremolo#\n\t\t * @type {Degrees}\n\t\t * @name spread\n\t\t */\n\t    Object.defineProperty(Tone.Tremolo.prototype, 'spread', {\n\t        get: function () {\n\t            return this._lfoR.phase - this._lfoL.phase;    //180\n\t        },\n\t        set: function (spread) {\n\t            this._lfoL.phase = 90 - spread / 2;\n\t            this._lfoR.phase = spread / 2 + 90;\n\t        }\n\t    });\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Tremolo} this\n\t\t */\n\t    Tone.Tremolo.prototype.dispose = function () {\n\t        Tone.StereoEffect.prototype.dispose.call(this);\n\t        this._writable([\n\t            'frequency',\n\t            'depth'\n\t        ]);\n\t        this._lfoL.dispose();\n\t        this._lfoL = null;\n\t        this._lfoR.dispose();\n\t        this._lfoR = null;\n\t        this._amplitudeL.dispose();\n\t        this._amplitudeL = null;\n\t        this._amplitudeR.dispose();\n\t        this._amplitudeR = null;\n\t        this.frequency = null;\n\t        this.depth = null;\n\t        return this;\n\t    };\n\t    return Tone.Tremolo;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class A Vibrato effect composed of a Tone.Delay and a Tone.LFO. The LFO\n\t\t *         modulates the delayTime of the delay, causing the pitch to rise\n\t\t *         and fall. \n\t\t *  @extends {Tone.Effect}\n\t\t *  @param {Frequency} frequency The frequency of the vibrato.\n\t\t *  @param {NormalRange} depth The amount the pitch is modulated.\n\t\t */\n\t    Tone.Vibrato = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'depth'\n\t        ], Tone.Vibrato);\n\t        Tone.Effect.call(this, options);\n\t        /**\n\t\t\t *  The delay node used for the vibrato effect\n\t\t\t *  @type {Tone.Delay}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delayNode = new Tone.Delay(0, options.maxDelay);\n\t        /**\n\t\t\t *  The LFO used to control the vibrato\n\t\t\t *  @type {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfo = new Tone.LFO({\n\t            'type': options.type,\n\t            'min': 0,\n\t            'max': options.maxDelay,\n\t            'frequency': options.frequency,\n\t            'phase': -90    //offse the phase so the resting position is in the center\n\t        }).start().connect(this._delayNode.delayTime);\n\t        /**\n\t\t\t *  The frequency of the vibrato\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = this._lfo.frequency;\n\t        /**\n\t\t\t *  The depth of the vibrato. \n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.depth = this._lfo.amplitude;\n\t        this.depth.value = options.depth;\n\t        this._readOnly([\n\t            'frequency',\n\t            'depth'\n\t        ]);\n\t        this.effectSend.chain(this._delayNode, this.effectReturn);\n\t    };\n\t    Tone.extend(Tone.Vibrato, Tone.Effect);\n\t    /**\n\t\t *  The defaults\n\t\t *  @type  {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.Vibrato.defaults = {\n\t        'maxDelay': 0.005,\n\t        'frequency': 5,\n\t        'depth': 0.1,\n\t        'type': 'sine'\n\t    };\n\t    /**\n\t\t * Type of oscillator attached to the Vibrato.\n\t\t * @memberOf Tone.Vibrato#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.Vibrato.prototype, 'type', {\n\t        get: function () {\n\t            return this._lfo.type;\n\t        },\n\t        set: function (type) {\n\t            this._lfo.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Vibrato} this\n\t\t */\n\t    Tone.Vibrato.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._delayNode.dispose();\n\t        this._delayNode = null;\n\t        this._lfo.dispose();\n\t        this._lfo = null;\n\t        this._writable([\n\t            'frequency',\n\t            'depth'\n\t        ]);\n\t        this.frequency = null;\n\t        this.depth = null;\n\t    };\n\t    return Tone.Vibrato;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Event abstracts away Tone.Transport.schedule and provides a schedulable\n\t\t *          callback for a single or repeatable events along the timeline.\n\t\t *\n\t\t *  @extends {Tone}\n\t\t *  @param {function} callback The callback to invoke at the time.\n\t\t *  @param {*} value The value or values which should be passed to\n\t\t *                      the callback function on invocation.\n\t\t *  @example\n\t\t * var chord = new Tone.Event(function(time, chord){\n\t\t * \t//the chord as well as the exact time of the event\n\t\t * \t//are passed in as arguments to the callback function\n\t\t * }, [\"D4\", \"E4\", \"F4\"]);\n\t\t * //start the chord at the beginning of the transport timeline\n\t\t * chord.start();\n\t\t * //loop it every measure for 8 measures\n\t\t * chord.loop = 8;\n\t\t * chord.loopEnd = \"1m\";\n\t\t */\n\t    Tone.Event = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'callback',\n\t            'value'\n\t        ], Tone.Event);\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  Loop value\n\t\t\t *  @type  {Boolean|Positive}\n\t\t\t *  @private\n\t\t\t */\n\t        this._loop = options.loop;\n\t        /**\n\t\t\t *  The callback to invoke.\n\t\t\t *  @type  {Function}\n\t\t\t */\n\t        this.callback = options.callback;\n\t        /**\n\t\t\t *  The value which is passed to the\n\t\t\t *  callback function.\n\t\t\t *  @type  {*}\n\t\t\t *  @private\n\t\t\t */\n\t        this.value = options.value;\n\t        /**\n\t\t\t *  When the note is scheduled to start.\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._loopStart = this.toTicks(options.loopStart);\n\t        /**\n\t\t\t *  When the note is scheduled to start.\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._loopEnd = this.toTicks(options.loopEnd);\n\t        /**\n\t\t\t *  Tracks the scheduled events\n\t\t\t *  @type {Tone.TimelineState}\n\t\t\t *  @private\n\t\t\t */\n\t        this._state = new Tone.TimelineState(Tone.State.Stopped);\n\t        /**\n\t\t\t *  The playback speed of the note. A speed of 1\n\t\t\t *  is no change.\n\t\t\t *  @private\n\t\t\t *  @type {Positive}\n\t\t\t */\n\t        this._playbackRate = 1;\n\t        /**\n\t\t\t *  A delay time from when the event is scheduled to start\n\t\t\t *  @type {Ticks}\n\t\t\t *  @private\n\t\t\t */\n\t        this._startOffset = 0;\n\t        /**\n\t\t\t *  private holder of probability value\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @private\n\t\t\t */\n\t        this._probability = options.probability;\n\t        /**\n\t\t\t *  the amount of variation from the\n\t\t\t *  given time.\n\t\t\t *  @type {Boolean|Time}\n\t\t\t *  @private\n\t\t\t */\n\t        this._humanize = options.humanize;\n\t        /**\n\t\t\t *  If mute is true, the callback won't be\n\t\t\t *  invoked.\n\t\t\t *  @type {Boolean}\n\t\t\t */\n\t        this.mute = options.mute;\n\t        //set the initial values\n\t        this.playbackRate = options.playbackRate;\n\t    };\n\t    Tone.extend(Tone.Event);\n\t    /**\n\t\t *  The default values\n\t\t *  @type  {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.Event.defaults = {\n\t        'callback': Tone.noOp,\n\t        'loop': false,\n\t        'loopEnd': '1m',\n\t        'loopStart': 0,\n\t        'playbackRate': 1,\n\t        'value': null,\n\t        'probability': 1,\n\t        'mute': false,\n\t        'humanize': false\n\t    };\n\t    /**\n\t\t *  Reschedule all of the events along the timeline\n\t\t *  with the updated values.\n\t\t *  @param {Time} after Only reschedules events after the given time.\n\t\t *  @return  {Tone.Event}  this\n\t\t *  @private\n\t\t */\n\t    Tone.Event.prototype._rescheduleEvents = function (after) {\n\t        //if no argument is given, schedules all of the events\n\t        after = Tone.defaultArg(after, -1);\n\t        this._state.forEachFrom(after, function (event) {\n\t            var duration;\n\t            if (event.state === Tone.State.Started) {\n\t                if (Tone.isDefined(event.id)) {\n\t                    Tone.Transport.clear(event.id);\n\t                }\n\t                var startTick = event.time + Math.round(this.startOffset / this._playbackRate);\n\t                if (this._loop) {\n\t                    duration = Infinity;\n\t                    if (Tone.isNumber(this._loop)) {\n\t                        duration = this._loop * this._getLoopDuration();\n\t                    }\n\t                    var nextEvent = this._state.getAfter(startTick);\n\t                    if (nextEvent !== null) {\n\t                        duration = Math.min(duration, nextEvent.time - startTick);\n\t                    }\n\t                    if (duration !== Infinity) {\n\t                        //schedule a stop since it's finite duration\n\t                        this._state.setStateAtTime(Tone.State.Stopped, startTick + duration + 1);\n\t                        duration = Tone.Ticks(duration);\n\t                    }\n\t                    var interval = Tone.Ticks(this._getLoopDuration());\n\t                    event.id = Tone.Transport.scheduleRepeat(this._tick.bind(this), interval, Tone.Ticks(startTick), duration);\n\t                } else {\n\t                    event.id = Tone.Transport.schedule(this._tick.bind(this), Tone.Ticks(startTick));\n\t                }\n\t            }\n\t        }.bind(this));\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Returns the playback state of the note, either \"started\" or \"stopped\".\n\t\t *  @type {String}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.Event#\n\t\t *  @name state\n\t\t */\n\t    Object.defineProperty(Tone.Event.prototype, 'state', {\n\t        get: function () {\n\t            return this._state.getValueAtTime(Tone.Transport.ticks);\n\t        }\n\t    });\n\t    /**\n\t\t *  The start from the scheduled start time\n\t\t *  @type {Ticks}\n\t\t *  @memberOf Tone.Event#\n\t\t *  @name startOffset\n\t\t *  @private\n\t\t */\n\t    Object.defineProperty(Tone.Event.prototype, 'startOffset', {\n\t        get: function () {\n\t            return this._startOffset;\n\t        },\n\t        set: function (offset) {\n\t            this._startOffset = offset;\n\t        }\n\t    });\n\t    /**\n\t\t *  The probability of the notes being triggered.\n\t\t *  @memberOf Tone.Event#\n\t\t *  @type {NormalRange}\n\t\t *  @name probability\n\t\t */\n\t    Object.defineProperty(Tone.Event.prototype, 'probability', {\n\t        get: function () {\n\t            return this._probability;\n\t        },\n\t        set: function (prob) {\n\t            this._probability = prob;\n\t        }\n\t    });\n\t    /**\n\t\t *  If set to true, will apply small random variation\n\t\t *  to the callback time. If the value is given as a time, it will randomize\n\t\t *  by that amount.\n\t\t *  @example\n\t\t * event.humanize = true;\n\t\t *  @type {Boolean|Time}\n\t\t *  @name humanize\n\t\t */\n\t    Object.defineProperty(Tone.Event.prototype, 'humanize', {\n\t        get: function () {\n\t            return this._humanize;\n\t        },\n\t        set: function (variation) {\n\t            this._humanize = variation;\n\t        }\n\t    });\n\t    /**\n\t\t *  Start the note at the given time.\n\t\t *  @param  {TimelinePosition}  time  When the note should start.\n\t\t *  @return  {Tone.Event}  this\n\t\t */\n\t    Tone.Event.prototype.start = function (time) {\n\t        time = this.toTicks(time);\n\t        if (this._state.getValueAtTime(time) === Tone.State.Stopped) {\n\t            this._state.add({\n\t                'state': Tone.State.Started,\n\t                'time': time,\n\t                'id': undefined\n\t            });\n\t            this._rescheduleEvents(time);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Stop the Event at the given time.\n\t\t *  @param  {TimelinePosition}  time  When the note should stop.\n\t\t *  @return  {Tone.Event}  this\n\t\t */\n\t    Tone.Event.prototype.stop = function (time) {\n\t        this.cancel(time);\n\t        time = this.toTicks(time);\n\t        if (this._state.getValueAtTime(time) === Tone.State.Started) {\n\t            this._state.setStateAtTime(Tone.State.Stopped, time);\n\t            var previousEvent = this._state.getBefore(time);\n\t            var reschedulTime = time;\n\t            if (previousEvent !== null) {\n\t                reschedulTime = previousEvent.time;\n\t            }\n\t            this._rescheduleEvents(reschedulTime);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancel all scheduled events greater than or equal to the given time\n\t\t *  @param  {TimelinePosition}  [time=0]  The time after which events will be cancel.\n\t\t *  @return  {Tone.Event}  this\n\t\t */\n\t    Tone.Event.prototype.cancel = function (time) {\n\t        time = Tone.defaultArg(time, -Infinity);\n\t        time = this.toTicks(time);\n\t        this._state.forEachFrom(time, function (event) {\n\t            Tone.Transport.clear(event.id);\n\t        });\n\t        this._state.cancel(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  The callback function invoker. Also\n\t\t *  checks if the Event is done playing\n\t\t *  @param  {Number}  time  The time of the event in seconds\n\t\t *  @private\n\t\t */\n\t    Tone.Event.prototype._tick = function (time) {\n\t        var ticks = Tone.Transport.getTicksAtTime(time);\n\t        if (!this.mute && this._state.getValueAtTime(ticks) === Tone.State.Started) {\n\t            if (this.probability < 1 && Math.random() > this.probability) {\n\t                return;\n\t            }\n\t            if (this.humanize) {\n\t                var variation = 0.02;\n\t                if (!Tone.isBoolean(this.humanize)) {\n\t                    variation = this.toSeconds(this.humanize);\n\t                }\n\t                time += (Math.random() * 2 - 1) * variation;\n\t            }\n\t            this.callback(time, this.value);\n\t        }\n\t    };\n\t    /**\n\t\t *  Get the duration of the loop.\n\t\t *  @return  {Ticks}\n\t\t *  @private\n\t\t */\n\t    Tone.Event.prototype._getLoopDuration = function () {\n\t        return Math.round((this._loopEnd - this._loopStart) / this._playbackRate);\n\t    };\n\t    /**\n\t\t *  If the note should loop or not\n\t\t *  between Tone.Event.loopStart and\n\t\t *  Tone.Event.loopEnd. An integer\n\t\t *  value corresponds to the number of\n\t\t *  loops the Event does after it starts.\n\t\t *  @memberOf Tone.Event#\n\t\t *  @type {Boolean|Positive}\n\t\t *  @name loop\n\t\t */\n\t    Object.defineProperty(Tone.Event.prototype, 'loop', {\n\t        get: function () {\n\t            return this._loop;\n\t        },\n\t        set: function (loop) {\n\t            this._loop = loop;\n\t            this._rescheduleEvents();\n\t        }\n\t    });\n\t    /**\n\t\t * \tThe playback rate of the note. Defaults to 1.\n\t\t *  @memberOf Tone.Event#\n\t\t *  @type {Positive}\n\t\t *  @name playbackRate\n\t\t *  @example\n\t\t * note.loop = true;\n\t\t * //repeat the note twice as fast\n\t\t * note.playbackRate = 2;\n\t\t */\n\t    Object.defineProperty(Tone.Event.prototype, 'playbackRate', {\n\t        get: function () {\n\t            return this._playbackRate;\n\t        },\n\t        set: function (rate) {\n\t            this._playbackRate = rate;\n\t            this._rescheduleEvents();\n\t        }\n\t    });\n\t    /**\n\t\t *  The loopEnd point is the time the event will loop\n\t\t *  if Tone.Event.loop is true.\n\t\t *  @memberOf Tone.Event#\n\t\t *  @type {Time}\n\t\t *  @name loopEnd\n\t\t */\n\t    Object.defineProperty(Tone.Event.prototype, 'loopEnd', {\n\t        get: function () {\n\t            return Tone.Ticks(this._loopEnd).toSeconds();\n\t        },\n\t        set: function (loopEnd) {\n\t            this._loopEnd = this.toTicks(loopEnd);\n\t            if (this._loop) {\n\t                this._rescheduleEvents();\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  The time when the loop should start.\n\t\t *  @memberOf Tone.Event#\n\t\t *  @type {Time}\n\t\t *  @name loopStart\n\t\t */\n\t    Object.defineProperty(Tone.Event.prototype, 'loopStart', {\n\t        get: function () {\n\t            return Tone.Ticks(this._loopStart).toSeconds();\n\t        },\n\t        set: function (loopStart) {\n\t            this._loopStart = this.toTicks(loopStart);\n\t            if (this._loop) {\n\t                this._rescheduleEvents();\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  The current progress of the loop interval.\n\t\t *  Returns 0 if the event is not started yet or\n\t\t *  it is not set to loop.\n\t\t *  @memberOf Tone.Event#\n\t\t *  @type {NormalRange}\n\t\t *  @name progress\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Event.prototype, 'progress', {\n\t        get: function () {\n\t            if (this._loop) {\n\t                var ticks = Tone.Transport.ticks;\n\t                var lastEvent = this._state.get(ticks);\n\t                if (lastEvent !== null && lastEvent.state === Tone.State.Started) {\n\t                    var loopDuration = this._getLoopDuration();\n\t                    var progress = (ticks - lastEvent.time) % loopDuration;\n\t                    return progress / loopDuration;\n\t                } else {\n\t                    return 0;\n\t                }\n\t            } else {\n\t                return 0;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.Event}  this\n\t\t */\n\t    Tone.Event.prototype.dispose = function () {\n\t        this.cancel();\n\t        this._state.dispose();\n\t        this._state = null;\n\t        this.callback = null;\n\t        this.value = null;\n\t    };\n\t    return Tone.Event;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.Loop creates a looped callback at the \n\t\t *         specified interval. The callback can be \n\t\t *         started, stopped and scheduled along\n\t\t *         the Transport's timeline. \n\t\t *  @example\n\t\t * var loop = new Tone.Loop(function(time){\n\t\t * \t//triggered every eighth note. \n\t\t * \tconsole.log(time);\n\t\t * }, \"8n\").start(0);\n\t\t * Tone.Transport.start();\n\t\t *  @extends {Tone}\n\t\t *  @param {Function} callback The callback to invoke with the event.\n\t\t *  @param {Time} interval The time between successive callback calls. \n\t\t */\n\t    Tone.Loop = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'callback',\n\t            'interval'\n\t        ], Tone.Loop);\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  The event which produces the callbacks\n\t\t\t */\n\t        this._event = new Tone.Event({\n\t            'callback': this._tick.bind(this),\n\t            'loop': true,\n\t            'loopEnd': options.interval,\n\t            'playbackRate': options.playbackRate,\n\t            'probability': options.probability\n\t        });\n\t        /**\n\t\t\t *  The callback to invoke with the next event in the pattern\n\t\t\t *  @type {Function}\n\t\t\t */\n\t        this.callback = options.callback;\n\t        //set the iterations\n\t        this.iterations = options.iterations;\n\t    };\n\t    Tone.extend(Tone.Loop);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.Loop.defaults = {\n\t        'interval': '4n',\n\t        'callback': Tone.noOp,\n\t        'playbackRate': 1,\n\t        'iterations': Infinity,\n\t        'probability': true,\n\t        'mute': false\n\t    };\n\t    /**\n\t\t *  Start the loop at the specified time along the Transport's\n\t\t *  timeline.\n\t\t *  @param  {TimelinePosition=}  time  When to start the Loop.\n\t\t *  @return  {Tone.Loop}  this\n\t\t */\n\t    Tone.Loop.prototype.start = function (time) {\n\t        this._event.start(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Stop the loop at the given time.\n\t\t *  @param  {TimelinePosition=}  time  When to stop the Arpeggio\n\t\t *  @return  {Tone.Loop}  this\n\t\t */\n\t    Tone.Loop.prototype.stop = function (time) {\n\t        this._event.stop(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancel all scheduled events greater than or equal to the given time\n\t\t *  @param  {TimelinePosition}  [time=0]  The time after which events will be cancel.\n\t\t *  @return  {Tone.Loop}  this\n\t\t */\n\t    Tone.Loop.prototype.cancel = function (time) {\n\t        this._event.cancel(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Internal function called when the notes should be called\n\t\t *  @param  {Number}  time  The time the event occurs\n\t\t *  @private\n\t\t */\n\t    Tone.Loop.prototype._tick = function (time) {\n\t        this.callback(time);\n\t    };\n\t    /**\n\t\t *  The state of the Loop, either started or stopped.\n\t\t *  @memberOf Tone.Loop#\n\t\t *  @type {String}\n\t\t *  @name state\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Loop.prototype, 'state', {\n\t        get: function () {\n\t            return this._event.state;\n\t        }\n\t    });\n\t    /**\n\t\t *  The progress of the loop as a value between 0-1. 0, when\n\t\t *  the loop is stopped or done iterating. \n\t\t *  @memberOf Tone.Loop#\n\t\t *  @type {NormalRange}\n\t\t *  @name progress\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Loop.prototype, 'progress', {\n\t        get: function () {\n\t            return this._event.progress;\n\t        }\n\t    });\n\t    /**\n\t\t *  The time between successive callbacks. \n\t\t *  @example\n\t\t * loop.interval = \"8n\"; //loop every 8n\n\t\t *  @memberOf Tone.Loop#\n\t\t *  @type {Time}\n\t\t *  @name interval\n\t\t */\n\t    Object.defineProperty(Tone.Loop.prototype, 'interval', {\n\t        get: function () {\n\t            return this._event.loopEnd;\n\t        },\n\t        set: function (interval) {\n\t            this._event.loopEnd = interval;\n\t        }\n\t    });\n\t    /**\n\t\t *  The playback rate of the loop. The normal playback rate is 1 (no change). \n\t\t *  A `playbackRate` of 2 would be twice as fast. \n\t\t *  @memberOf Tone.Loop#\n\t\t *  @type {Time}\n\t\t *  @name playbackRate\n\t\t */\n\t    Object.defineProperty(Tone.Loop.prototype, 'playbackRate', {\n\t        get: function () {\n\t            return this._event.playbackRate;\n\t        },\n\t        set: function (rate) {\n\t            this._event.playbackRate = rate;\n\t        }\n\t    });\n\t    /**\n\t\t *  Random variation +/-0.01s to the scheduled time. \n\t\t *  Or give it a time value which it will randomize by.\n\t\t *  @type {Boolean|Time}\n\t\t *  @memberOf Tone.Loop#\n\t\t *  @name humanize\n\t\t */\n\t    Object.defineProperty(Tone.Loop.prototype, 'humanize', {\n\t        get: function () {\n\t            return this._event.humanize;\n\t        },\n\t        set: function (variation) {\n\t            this._event.humanize = variation;\n\t        }\n\t    });\n\t    /**\n\t\t *  The probably of the callback being invoked.\n\t\t *  @memberOf Tone.Loop#\n\t\t *  @type {NormalRange}\n\t\t *  @name probability\n\t\t */\n\t    Object.defineProperty(Tone.Loop.prototype, 'probability', {\n\t        get: function () {\n\t            return this._event.probability;\n\t        },\n\t        set: function (prob) {\n\t            this._event.probability = prob;\n\t        }\n\t    });\n\t    /**\n\t\t *  Muting the Loop means that no callbacks are invoked.\n\t\t *  @memberOf Tone.Loop#\n\t\t *  @type {Boolean}\n\t\t *  @name mute\n\t\t */\n\t    Object.defineProperty(Tone.Loop.prototype, 'mute', {\n\t        get: function () {\n\t            return this._event.mute;\n\t        },\n\t        set: function (mute) {\n\t            this._event.mute = mute;\n\t        }\n\t    });\n\t    /**\n\t\t *  The number of iterations of the loop. The default\n\t\t *  value is Infinity (loop forever).\n\t\t *  @memberOf Tone.Loop#\n\t\t *  @type {Positive}\n\t\t *  @name iterations\n\t\t */\n\t    Object.defineProperty(Tone.Loop.prototype, 'iterations', {\n\t        get: function () {\n\t            if (this._event.loop === true) {\n\t                return Infinity;\n\t            } else {\n\t                return this._event.loop;\n\t            }\n\t        },\n\t        set: function (iters) {\n\t            if (iters === Infinity) {\n\t                this._event.loop = true;\n\t            } else {\n\t                this._event.loop = iters;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.Loop}  this\n\t\t */\n\t    Tone.Loop.prototype.dispose = function () {\n\t        this._event.dispose();\n\t        this._event = null;\n\t        this.callback = null;\n\t    };\n\t    return Tone.Loop;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Part is a collection Tone.Events which can be\n\t\t *         started/stopped and looped as a single unit.\n\t\t *\n\t\t *  @extends {Tone.Event}\n\t\t *  @param {Function} callback The callback to invoke on each event\n\t\t *  @param {Array} events the array of events\n\t\t *  @example\n\t\t * var part = new Tone.Part(function(time, note){\n\t\t * \t//the notes given as the second element in the array\n\t\t * \t//will be passed in as the second argument\n\t\t * \tsynth.triggerAttackRelease(note, \"8n\", time);\n\t\t * }, [[0, \"C2\"], [\"0:2\", \"C3\"], [\"0:3:2\", \"G2\"]]);\n\t\t *  @example\n\t\t * //use an array of objects as long as the object has a \"time\" attribute\n\t\t * var part = new Tone.Part(function(time, value){\n\t\t * \t//the value is an object which contains both the note and the velocity\n\t\t * \tsynth.triggerAttackRelease(value.note, \"8n\", time, value.velocity);\n\t\t * }, [{\"time\" : 0, \"note\" : \"C3\", \"velocity\": 0.9},\n\t\t * \t   {\"time\" : \"0:2\", \"note\" : \"C4\", \"velocity\": 0.5}\n\t\t * ]).start(0);\n\t\t */\n\t    Tone.Part = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'callback',\n\t            'events'\n\t        ], Tone.Part);\n\t        Tone.Event.call(this, options);\n\t        /**\n\t\t\t *  An array of Objects.\n\t\t\t *  @type  {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._events = [];\n\t        //add the events\n\t        for (var i = 0; i < options.events.length; i++) {\n\t            if (Array.isArray(options.events[i])) {\n\t                this.add(options.events[i][0], options.events[i][1]);\n\t            } else {\n\t                this.add(options.events[i]);\n\t            }\n\t        }\n\t    };\n\t    Tone.extend(Tone.Part, Tone.Event);\n\t    /**\n\t\t *  The default values\n\t\t *  @type  {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.Part.defaults = {\n\t        'callback': Tone.noOp,\n\t        'loop': false,\n\t        'loopEnd': '1m',\n\t        'loopStart': 0,\n\t        'playbackRate': 1,\n\t        'probability': 1,\n\t        'humanize': false,\n\t        'mute': false,\n\t        'events': []\n\t    };\n\t    /**\n\t\t *  Start the part at the given time.\n\t\t *  @param  {TransportTime}  time    When to start the part.\n\t\t *  @param  {Time=}  offset  The offset from the start of the part\n\t\t *                           to begin playing at.\n\t\t *  @return  {Tone.Part}  this\n\t\t */\n\t    Tone.Part.prototype.start = function (time, offset) {\n\t        var ticks = this.toTicks(time);\n\t        if (this._state.getValueAtTime(ticks) !== Tone.State.Started) {\n\t            if (this._loop) {\n\t                offset = Tone.defaultArg(offset, this._loopStart);\n\t            } else {\n\t                offset = Tone.defaultArg(offset, 0);\n\t            }\n\t            offset = this.toTicks(offset);\n\t            this._state.add({\n\t                'state': Tone.State.Started,\n\t                'time': ticks,\n\t                'offset': offset\n\t            });\n\t            this._forEach(function (event) {\n\t                this._startNote(event, ticks, offset);\n\t            });\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Start the event in the given event at the correct time given\n\t\t *  the ticks and offset and looping.\n\t\t *  @param  {Tone.Event}  event\n\t\t *  @param  {Ticks}  ticks\n\t\t *  @param  {Ticks}  offset\n\t\t *  @private\n\t\t */\n\t    Tone.Part.prototype._startNote = function (event, ticks, offset) {\n\t        ticks -= offset;\n\t        if (this._loop) {\n\t            if (event.startOffset >= this._loopStart && event.startOffset < this._loopEnd) {\n\t                if (event.startOffset < offset) {\n\t                    //start it on the next loop\n\t                    ticks += this._getLoopDuration();\n\t                }\n\t                event.start(Tone.Ticks(ticks));\n\t            } else if (event.startOffset < this._loopStart && event.startOffset >= offset) {\n\t                event.loop = false;\n\t                event.start(Tone.Ticks(ticks));\n\t            }\n\t        } else if (event.startOffset >= offset) {\n\t            event.start(Tone.Ticks(ticks));\n\t        }\n\t    };\n\t    /**\n\t\t *  The start from the scheduled start time\n\t\t *  @type {Ticks}\n\t\t *  @memberOf Tone.Part#\n\t\t *  @name startOffset\n\t\t *  @private\n\t\t */\n\t    Object.defineProperty(Tone.Part.prototype, 'startOffset', {\n\t        get: function () {\n\t            return this._startOffset;\n\t        },\n\t        set: function (offset) {\n\t            this._startOffset = offset;\n\t            this._forEach(function (event) {\n\t                event.startOffset += this._startOffset;\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t *  Stop the part at the given time.\n\t\t *  @param  {TimelinePosition}  time  When to stop the part.\n\t\t *  @return  {Tone.Part}  this\n\t\t */\n\t    Tone.Part.prototype.stop = function (time) {\n\t        var ticks = this.toTicks(time);\n\t        this._state.cancel(ticks);\n\t        this._state.setStateAtTime(Tone.State.Stopped, ticks);\n\t        this._forEach(function (event) {\n\t            event.stop(time);\n\t        });\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Get/Set an Event's value at the given time.\n\t\t *  If a value is passed in and no event exists at\n\t\t *  the given time, one will be created with that value.\n\t\t *  If two events are at the same time, the first one will\n\t\t *  be returned.\n\t\t *  @example\n\t\t * part.at(\"1m\"); //returns the part at the first measure\n\t\t *\n\t\t * part.at(\"2m\", \"C2\"); //set the value at \"2m\" to C2.\n\t\t * //if an event didn't exist at that time, it will be created.\n\t\t *  @param {TransportTime} time The time of the event to get or set.\n\t\t *  @param {*=} value If a value is passed in, the value of the\n\t\t *                    event at the given time will be set to it.\n\t\t *  @return {Tone.Event} the event at the time\n\t\t */\n\t    Tone.Part.prototype.at = function (time, value) {\n\t        time = Tone.TransportTime(time);\n\t        var tickTime = Tone.Ticks(1).toSeconds();\n\t        for (var i = 0; i < this._events.length; i++) {\n\t            var event = this._events[i];\n\t            if (Math.abs(time.toTicks() - event.startOffset) < tickTime) {\n\t                if (Tone.isDefined(value)) {\n\t                    event.value = value;\n\t                }\n\t                return event;\n\t            }\n\t        }\n\t        //if there was no event at that time, create one\n\t        if (Tone.isDefined(value)) {\n\t            this.add(time, value);\n\t            //return the new event\n\t            return this._events[this._events.length - 1];\n\t        } else {\n\t            return null;\n\t        }\n\t    };\n\t    /**\n\t\t *  Add a an event to the part.\n\t\t *  @param {Time} time The time the note should start.\n\t\t *                            If an object is passed in, it should\n\t\t *                            have a 'time' attribute and the rest\n\t\t *                            of the object will be used as the 'value'.\n\t\t *  @param  {Tone.Event|*}  value\n\t\t *  @returns {Tone.Part} this\n\t\t *  @example\n\t\t * part.add(\"1m\", \"C#+11\");\n\t\t */\n\t    Tone.Part.prototype.add = function (time, value) {\n\t        //extract the parameters\n\t        if (time.hasOwnProperty('time')) {\n\t            value = time;\n\t            time = value.time;\n\t        }\n\t        time = this.toTicks(time);\n\t        var event;\n\t        if (value instanceof Tone.Event) {\n\t            event = value;\n\t            event.callback = this._tick.bind(this);\n\t        } else {\n\t            event = new Tone.Event({\n\t                'callback': this._tick.bind(this),\n\t                'value': value\n\t            });\n\t        }\n\t        //the start offset\n\t        event.startOffset = time;\n\t        //initialize the values\n\t        event.set({\n\t            'loopEnd': this.loopEnd,\n\t            'loopStart': this.loopStart,\n\t            'loop': this.loop,\n\t            'humanize': this.humanize,\n\t            'playbackRate': this.playbackRate,\n\t            'probability': this.probability\n\t        });\n\t        this._events.push(event);\n\t        //start the note if it should be played right now\n\t        this._restartEvent(event);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Restart the given event\n\t\t *  @param  {Tone.Event}  event\n\t\t *  @private\n\t\t */\n\t    Tone.Part.prototype._restartEvent = function (event) {\n\t        this._state.forEach(function (stateEvent) {\n\t            if (stateEvent.state === Tone.State.Started) {\n\t                this._startNote(event, stateEvent.time, stateEvent.offset);\n\t            } else {\n\t                //stop the note\n\t                event.stop(Tone.Ticks(stateEvent.time));\n\t            }\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t *  Remove an event from the part. Will recursively iterate\n\t\t *  into nested parts to find the event.\n\t\t *  @param {Time} time The time of the event\n\t\t *  @param {*} value Optionally select only a specific event value\n\t\t *  @return  {Tone.Part}  this\n\t\t */\n\t    Tone.Part.prototype.remove = function (time, value) {\n\t        //extract the parameters\n\t        if (time.hasOwnProperty('time')) {\n\t            value = time;\n\t            time = value.time;\n\t        }\n\t        time = this.toTicks(time);\n\t        for (var i = this._events.length - 1; i >= 0; i--) {\n\t            var event = this._events[i];\n\t            if (event instanceof Tone.Part) {\n\t                event.remove(time, value);\n\t            } else if (event.startOffset === time) {\n\t                if (Tone.isUndef(value) || Tone.isDefined(value) && event.value === value) {\n\t                    this._events.splice(i, 1);\n\t                    event.dispose();\n\t                }\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Remove all of the notes from the group.\n\t\t *  @return  {Tone.Part}  this\n\t\t */\n\t    Tone.Part.prototype.removeAll = function () {\n\t        this._forEach(function (event) {\n\t            event.dispose();\n\t        });\n\t        this._events = [];\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancel scheduled state change events: i.e. \"start\" and \"stop\".\n\t\t *  @param {TimelinePosition} after The time after which to cancel the scheduled events.\n\t\t *  @return  {Tone.Part}  this\n\t\t */\n\t    Tone.Part.prototype.cancel = function (after) {\n\t        this._forEach(function (event) {\n\t            event.cancel(after);\n\t        });\n\t        this._state.cancel(this.toTicks(after));\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Iterate over all of the events\n\t\t *  @param {Function} callback\n\t\t *  @param {Object} ctx The context\n\t\t *  @private\n\t\t */\n\t    Tone.Part.prototype._forEach = function (callback, ctx) {\n\t        if (this._events) {\n\t            ctx = Tone.defaultArg(ctx, this);\n\t            for (var i = this._events.length - 1; i >= 0; i--) {\n\t                var e = this._events[i];\n\t                if (e instanceof Tone.Part) {\n\t                    e._forEach(callback, ctx);\n\t                } else {\n\t                    callback.call(ctx, e);\n\t                }\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Set the attribute of all of the events\n\t\t *  @param  {String}  attr  the attribute to set\n\t\t *  @param  {*}  value      The value to set it to\n\t\t *  @private\n\t\t */\n\t    Tone.Part.prototype._setAll = function (attr, value) {\n\t        this._forEach(function (event) {\n\t            event[attr] = value;\n\t        });\n\t    };\n\t    /**\n\t\t *  Internal tick method\n\t\t *  @param  {Number}  time  The time of the event in seconds\n\t\t *  @private\n\t\t */\n\t    Tone.Part.prototype._tick = function (time, value) {\n\t        if (!this.mute) {\n\t            this.callback(time, value);\n\t        }\n\t    };\n\t    /**\n\t\t *  Determine if the event should be currently looping\n\t\t *  given the loop boundries of this Part.\n\t\t *  @param  {Tone.Event}  event  The event to test\n\t\t *  @private\n\t\t */\n\t    Tone.Part.prototype._testLoopBoundries = function (event) {\n\t        if (event.startOffset < this._loopStart || event.startOffset >= this._loopEnd) {\n\t            event.cancel(0);\n\t        } else if (event.state === Tone.State.Stopped) {\n\t            //reschedule it if it's stopped\n\t            this._restartEvent(event);\n\t        }\n\t    };\n\t    /**\n\t\t *  The probability of the notes being triggered.\n\t\t *  @memberOf Tone.Part#\n\t\t *  @type {NormalRange}\n\t\t *  @name probability\n\t\t */\n\t    Object.defineProperty(Tone.Part.prototype, 'probability', {\n\t        get: function () {\n\t            return this._probability;\n\t        },\n\t        set: function (prob) {\n\t            this._probability = prob;\n\t            this._setAll('probability', prob);\n\t        }\n\t    });\n\t    /**\n\t\t *  If set to true, will apply small random variation\n\t\t *  to the callback time. If the value is given as a time, it will randomize\n\t\t *  by that amount.\n\t\t *  @example\n\t\t * event.humanize = true;\n\t\t *  @type {Boolean|Time}\n\t\t *  @name humanize\n\t\t */\n\t    Object.defineProperty(Tone.Part.prototype, 'humanize', {\n\t        get: function () {\n\t            return this._humanize;\n\t        },\n\t        set: function (variation) {\n\t            this._humanize = variation;\n\t            this._setAll('humanize', variation);\n\t        }\n\t    });\n\t    /**\n\t\t *  If the part should loop or not\n\t\t *  between Tone.Part.loopStart and\n\t\t *  Tone.Part.loopEnd. An integer\n\t\t *  value corresponds to the number of\n\t\t *  loops the Part does after it starts.\n\t\t *  @memberOf Tone.Part#\n\t\t *  @type {Boolean|Positive}\n\t\t *  @name loop\n\t\t *  @example\n\t\t * //loop the part 8 times\n\t\t * part.loop = 8;\n\t\t */\n\t    Object.defineProperty(Tone.Part.prototype, 'loop', {\n\t        get: function () {\n\t            return this._loop;\n\t        },\n\t        set: function (loop) {\n\t            this._loop = loop;\n\t            this._forEach(function (event) {\n\t                event._loopStart = this._loopStart;\n\t                event._loopEnd = this._loopEnd;\n\t                event.loop = loop;\n\t                this._testLoopBoundries(event);\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t *  The loopEnd point determines when it will\n\t\t *  loop if Tone.Part.loop is true.\n\t\t *  @memberOf Tone.Part#\n\t\t *  @type {Time}\n\t\t *  @name loopEnd\n\t\t */\n\t    Object.defineProperty(Tone.Part.prototype, 'loopEnd', {\n\t        get: function () {\n\t            return Tone.Ticks(this._loopEnd).toSeconds();\n\t        },\n\t        set: function (loopEnd) {\n\t            this._loopEnd = this.toTicks(loopEnd);\n\t            if (this._loop) {\n\t                this._forEach(function (event) {\n\t                    event.loopEnd = loopEnd;\n\t                    this._testLoopBoundries(event);\n\t                });\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  The loopStart point determines when it will\n\t\t *  loop if Tone.Part.loop is true.\n\t\t *  @memberOf Tone.Part#\n\t\t *  @type {Time}\n\t\t *  @name loopStart\n\t\t */\n\t    Object.defineProperty(Tone.Part.prototype, 'loopStart', {\n\t        get: function () {\n\t            return Tone.Ticks(this._loopStart).toSeconds();\n\t        },\n\t        set: function (loopStart) {\n\t            this._loopStart = this.toTicks(loopStart);\n\t            if (this._loop) {\n\t                this._forEach(function (event) {\n\t                    event.loopStart = this.loopStart;\n\t                    this._testLoopBoundries(event);\n\t                });\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * \tThe playback rate of the part\n\t\t *  @memberOf Tone.Part#\n\t\t *  @type {Positive}\n\t\t *  @name playbackRate\n\t\t */\n\t    Object.defineProperty(Tone.Part.prototype, 'playbackRate', {\n\t        get: function () {\n\t            return this._playbackRate;\n\t        },\n\t        set: function (rate) {\n\t            this._playbackRate = rate;\n\t            this._setAll('playbackRate', rate);\n\t        }\n\t    });\n\t    /**\n\t\t * \tThe number of scheduled notes in the part.\n\t\t *  @memberOf Tone.Part#\n\t\t *  @type {Positive}\n\t\t *  @name length\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Part.prototype, 'length', {\n\t        get: function () {\n\t            return this._events.length;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.Part}  this\n\t\t */\n\t    Tone.Part.prototype.dispose = function () {\n\t        this.removeAll();\n\t        this._state.dispose();\n\t        this._state = null;\n\t        this.callback = null;\n\t        this._events = null;\n\t        return this;\n\t    };\n\t    return Tone.Part;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.Pattern arpeggiates between the given notes\n\t\t *         in a number of patterns. See Tone.CtrlPattern for\n\t\t *         a full list of patterns.\n\t\t *  @example\n\t\t * var pattern = new Tone.Pattern(function(time, note){\n\t\t *   //the order of the notes passed in depends on the pattern\n\t\t * }, [\"C2\", \"D4\", \"E5\", \"A6\"], \"upDown\");\n\t\t *  @extends {Tone.Loop}\n\t\t *  @param {Function} callback The callback to invoke with the\n\t\t *                             event.\n\t\t *  @param {Array} values The values to arpeggiate over.\n\t\t */\n\t    Tone.Pattern = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'callback',\n\t            'values',\n\t            'pattern'\n\t        ], Tone.Pattern);\n\t        Tone.Loop.call(this, options);\n\t        /**\n\t\t\t *  The pattern manager\n\t\t\t *  @type {Tone.CtrlPattern}\n\t\t\t *  @private\n\t\t\t */\n\t        this._pattern = new Tone.CtrlPattern({\n\t            'values': options.values,\n\t            'type': options.pattern,\n\t            'index': options.index\n\t        });\n\t    };\n\t    Tone.extend(Tone.Pattern, Tone.Loop);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.Pattern.defaults = {\n\t        'pattern': Tone.CtrlPattern.Type.Up,\n\t        'callback': Tone.noOp,\n\t        'values': []\n\t    };\n\t    /**\n\t\t *  Internal function called when the notes should be called\n\t\t *  @param  {Number}  time  The time the event occurs\n\t\t *  @private\n\t\t */\n\t    Tone.Pattern.prototype._tick = function (time) {\n\t        this.callback(time, this._pattern.value);\n\t        this._pattern.next();\n\t    };\n\t    /**\n\t\t *  The current index in the values array.\n\t\t *  @memberOf Tone.Pattern#\n\t\t *  @type {Positive}\n\t\t *  @name index\n\t\t */\n\t    Object.defineProperty(Tone.Pattern.prototype, 'index', {\n\t        get: function () {\n\t            return this._pattern.index;\n\t        },\n\t        set: function (i) {\n\t            this._pattern.index = i;\n\t        }\n\t    });\n\t    /**\n\t\t *  The array of events.\n\t\t *  @memberOf Tone.Pattern#\n\t\t *  @type {Array}\n\t\t *  @name values\n\t\t */\n\t    Object.defineProperty(Tone.Pattern.prototype, 'values', {\n\t        get: function () {\n\t            return this._pattern.values;\n\t        },\n\t        set: function (vals) {\n\t            this._pattern.values = vals;\n\t        }\n\t    });\n\t    /**\n\t\t *  The current value of the pattern.\n\t\t *  @memberOf Tone.Pattern#\n\t\t *  @type {*}\n\t\t *  @name value\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Pattern.prototype, 'value', {\n\t        get: function () {\n\t            return this._pattern.value;\n\t        }\n\t    });\n\t    /**\n\t\t *  The pattern type. See Tone.CtrlPattern for the full list of patterns.\n\t\t *  @memberOf Tone.Pattern#\n\t\t *  @type {String}\n\t\t *  @name pattern\n\t\t */\n\t    Object.defineProperty(Tone.Pattern.prototype, 'pattern', {\n\t        get: function () {\n\t            return this._pattern.type;\n\t        },\n\t        set: function (pattern) {\n\t            this._pattern.type = pattern;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.Pattern}  this\n\t\t */\n\t    Tone.Pattern.prototype.dispose = function () {\n\t        Tone.Loop.prototype.dispose.call(this);\n\t        this._pattern.dispose();\n\t        this._pattern = null;\n\t    };\n\t    return Tone.Pattern;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class A sequence is an alternate notation of a part. Instead\n\t\t *         of passing in an array of [time, event] pairs, pass\n\t\t *         in an array of events which will be spaced at the\n\t\t *         given subdivision. Sub-arrays will subdivide that beat\n\t\t *         by the number of items are in the array.\n\t\t *         Sequence notation inspiration from [Tidal](http://yaxu.org/tidal/)\n\t\t *  @param  {Function}  callback  The callback to invoke with every note\n\t\t *  @param  {Array}    events  The sequence\n\t\t *  @param  {Time} subdivision  The subdivision between which events are placed.\n\t\t *  @extends {Tone.Part}\n\t\t *  @example\n\t\t * var seq = new Tone.Sequence(function(time, note){\n\t\t * \tconsole.log(note);\n\t\t * //straight quater notes\n\t\t * }, [\"C4\", \"E4\", \"G4\", \"A4\"], \"4n\");\n\t\t *  @example\n\t\t * var seq = new Tone.Sequence(function(time, note){\n\t\t * \tconsole.log(note);\n\t\t * //subdivisions are given as subarrays\n\t\t * }, [\"C4\", [\"E4\", \"D4\", \"E4\"], \"G4\", [\"A4\", \"G4\"]]);\n\t\t */\n\t    Tone.Sequence = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'callback',\n\t            'events',\n\t            'subdivision'\n\t        ], Tone.Sequence);\n\t        //remove the events\n\t        var events = options.events;\n\t        delete options.events;\n\t        Tone.Part.call(this, options);\n\t        /**\n\t\t\t *  The subdivison of each note\n\t\t\t *  @type  {Ticks}\n\t\t\t *  @private\n\t\t\t */\n\t        this._subdivision = this.toTicks(options.subdivision);\n\t        //if no time was passed in, the loop end is the end of the cycle\n\t        if (Tone.isUndef(options.loopEnd) && Tone.isDefined(events)) {\n\t            this._loopEnd = events.length * this._subdivision;\n\t        }\n\t        //defaults to looping\n\t        this._loop = true;\n\t        //add all of the events\n\t        if (Tone.isDefined(events)) {\n\t            for (var i = 0; i < events.length; i++) {\n\t                this.add(i, events[i]);\n\t            }\n\t        }\n\t    };\n\t    Tone.extend(Tone.Sequence, Tone.Part);\n\t    /**\n\t\t *  The default values.\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.Sequence.defaults = { 'subdivision': '4n' };\n\t    /**\n\t\t *  The subdivision of the sequence. This can only be\n\t\t *  set in the constructor. The subdivision is the\n\t\t *  interval between successive steps.\n\t\t *  @type {Time}\n\t\t *  @memberOf Tone.Sequence#\n\t\t *  @name subdivision\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Sequence.prototype, 'subdivision', {\n\t        get: function () {\n\t            return Tone.Ticks(this._subdivision).toSeconds();\n\t        }\n\t    });\n\t    /**\n\t\t *  Get/Set an index of the sequence. If the index contains a subarray,\n\t\t *  a Tone.Sequence representing that sub-array will be returned.\n\t\t *  @example\n\t\t * var sequence = new Tone.Sequence(playNote, [\"E4\", \"C4\", \"F#4\", [\"A4\", \"Bb3\"]])\n\t\t * sequence.at(0)// => returns \"E4\"\n\t\t * //set a value\n\t\t * sequence.at(0, \"G3\");\n\t\t * //get a nested sequence\n\t\t * sequence.at(3).at(1)// => returns \"Bb3\"\n\t\t * @param {Positive} index The index to get or set\n\t\t * @param {*} value Optionally pass in the value to set at the given index.\n\t\t */\n\t    Tone.Sequence.prototype.at = function (index, value) {\n\t        //if the value is an array,\n\t        if (Tone.isArray(value)) {\n\t            //remove the current event at that index\n\t            this.remove(index);\n\t        }\n\t        //call the parent's method\n\t        return Tone.Part.prototype.at.call(this, this._indexTime(index), value);\n\t    };\n\t    /**\n\t\t *  Add an event at an index, if there's already something\n\t\t *  at that index, overwrite it. If `value` is an array,\n\t\t *  it will be parsed as a subsequence.\n\t\t *  @param {Number} index The index to add the event to\n\t\t *  @param {*} value The value to add at that index\n\t\t *  @returns {Tone.Sequence} this\n\t\t */\n\t    Tone.Sequence.prototype.add = function (index, value) {\n\t        if (value === null) {\n\t            return this;\n\t        }\n\t        if (Tone.isArray(value)) {\n\t            //make a subsequence and add that to the sequence\n\t            var subSubdivision = Math.round(this._subdivision / value.length);\n\t            value = new Tone.Sequence(this._tick.bind(this), value, Tone.Ticks(subSubdivision));\n\t        }\n\t        Tone.Part.prototype.add.call(this, this._indexTime(index), value);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Remove a value from the sequence by index\n\t\t *  @param {Number} index The index of the event to remove\n\t\t *  @returns {Tone.Sequence} this\n\t\t */\n\t    Tone.Sequence.prototype.remove = function (index, value) {\n\t        Tone.Part.prototype.remove.call(this, this._indexTime(index), value);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Get the time of the index given the Sequence's subdivision\n\t\t *  @param  {Number}  index\n\t\t *  @return  {Time}  The time of that index\n\t\t *  @private\n\t\t */\n\t    Tone.Sequence.prototype._indexTime = function (index) {\n\t        if (index instanceof Tone.TransportTime) {\n\t            return index;\n\t        } else {\n\t            return Tone.Ticks(index * this._subdivision + this.startOffset).toSeconds();\n\t        }\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return {Tone.Sequence} this\n\t\t */\n\t    Tone.Sequence.prototype.dispose = function () {\n\t        Tone.Part.prototype.dispose.call(this);\n\t        return this;\n\t    };\n\t    return Tone.Sequence;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.PulseOscillator is a pulse oscillator with control over pulse width,\n\t\t *         also known as the duty cycle. At 50% duty cycle (width = 0.5) the wave is\n\t\t *         a square and only odd-numbered harmonics are present. At all other widths\n\t\t *         even-numbered harmonics are present. Read more\n\t\t *         [here](https://wigglewave.wordpress.com/2014/08/16/pulse-waveforms-and-harmonics/).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Source}\n\t\t *  @param {Frequency} [frequency] The frequency of the oscillator\n\t\t *  @param {NormalRange} [width] The width of the pulse\n\t\t *  @example\n\t\t * var pulse = new Tone.PulseOscillator(\"E5\", 0.4).toMaster().start();\n\t\t */\n\t    Tone.PulseOscillator = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'width'\n\t        ], Tone.Oscillator);\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  The width of the pulse.\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.width = new Tone.Signal(options.width, Tone.Type.NormalRange);\n\t        /**\n\t\t\t *  gate the width amount\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._widthGate = new Tone.Gain();\n\t        /**\n\t\t\t *  the sawtooth oscillator\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sawtooth = new Tone.Oscillator({\n\t            frequency: options.frequency,\n\t            detune: options.detune,\n\t            type: 'sawtooth',\n\t            phase: options.phase\n\t        });\n\t        /**\n\t\t\t *  The frequency control.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = this._sawtooth.frequency;\n\t        /**\n\t\t\t *  The detune in cents.\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = this._sawtooth.detune;\n\t        /**\n\t\t\t *  Threshold the signal to turn it into a square\n\t\t\t *  @type {Tone.WaveShaper}\n\t\t\t *  @private\n\t\t\t */\n\t        this._thresh = new Tone.WaveShaper(function (val) {\n\t            if (val < 0) {\n\t                return -1;\n\t            } else {\n\t                return 1;\n\t            }\n\t        });\n\t        //connections\n\t        this._sawtooth.chain(this._thresh, this.output);\n\t        this.width.chain(this._widthGate, this._thresh);\n\t        this._readOnly([\n\t            'width',\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.PulseOscillator, Tone.Source);\n\t    /**\n\t\t *  The default parameters.\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.PulseOscillator.defaults = {\n\t        'frequency': 440,\n\t        'detune': 0,\n\t        'phase': 0,\n\t        'width': 0.2\n\t    };\n\t    /**\n\t\t *  start the oscillator\n\t\t *  @param  {Time} time\n\t\t *  @private\n\t\t */\n\t    Tone.PulseOscillator.prototype._start = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._sawtooth.start(time);\n\t        this._widthGate.gain.setValueAtTime(1, time);\n\t    };\n\t    /**\n\t\t *  stop the oscillator\n\t\t *  @param  {Time} time\n\t\t *  @private\n\t\t */\n\t    Tone.PulseOscillator.prototype._stop = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._sawtooth.stop(time);\n\t        //the width is still connected to the output.\n\t        //that needs to be stopped also\n\t        this._widthGate.gain.setValueAtTime(0, time);\n\t    };\n\t    /**\n\t\t *  restart the oscillator\n\t\t *  @param  {Time} time (optional) timing parameter\n\t\t *  @private\n\t\t */\n\t    Tone.PulseOscillator.prototype.restart = function (time) {\n\t        this._sawtooth.restart(time);\n\t    };\n\t    /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.PulseOscillator#\n\t\t * @type {Degrees}\n\t\t * @name phase\n\t\t */\n\t    Object.defineProperty(Tone.PulseOscillator.prototype, 'phase', {\n\t        get: function () {\n\t            return this._sawtooth.phase;\n\t        },\n\t        set: function (phase) {\n\t            this._sawtooth.phase = phase;\n\t        }\n\t    });\n\t    /**\n\t\t * The type of the oscillator. Always returns \"pulse\".\n\t\t * @readOnly\n\t\t * @memberOf Tone.PulseOscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.PulseOscillator.prototype, 'type', {\n\t        get: function () {\n\t            return 'pulse';\n\t        }\n\t    });\n\t    /**\n\t\t * The partials of the waveform. Cannot set partials for this waveform type\n\t\t * @memberOf Tone.PulseOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @private\n\t\t */\n\t    Object.defineProperty(Tone.PulseOscillator.prototype, 'partials', {\n\t        get: function () {\n\t            return [];\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up method.\n\t\t *  @return {Tone.PulseOscillator} this\n\t\t */\n\t    Tone.PulseOscillator.prototype.dispose = function () {\n\t        Tone.Source.prototype.dispose.call(this);\n\t        this._sawtooth.dispose();\n\t        this._sawtooth = null;\n\t        this._writable([\n\t            'width',\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t        this.width.dispose();\n\t        this.width = null;\n\t        this._widthGate.dispose();\n\t        this._widthGate = null;\n\t        this._thresh.dispose();\n\t        this._thresh = null;\n\t        this.frequency = null;\n\t        this.detune = null;\n\t        return this;\n\t    };\n\t    return Tone.PulseOscillator;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.PWMOscillator modulates the width of a Tone.PulseOscillator\n\t\t *         at the modulationFrequency. This has the effect of continuously\n\t\t *         changing the timbre of the oscillator by altering the harmonics\n\t\t *         generated.\n\t\t *\n\t\t *  @extends {Tone.Source}\n\t\t *  @constructor\n\t\t *  @param {Frequency} frequency The starting frequency of the oscillator.\n\t\t *  @param {Frequency} modulationFrequency The modulation frequency of the width of the pulse.\n\t\t *  @example\n\t\t *  var pwm = new Tone.PWMOscillator(\"Ab3\", 0.3).toMaster().start();\n\t\t */\n\t    Tone.PWMOscillator = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'modulationFrequency'\n\t        ], Tone.PWMOscillator);\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  the pulse oscillator\n\t\t\t *  @type {Tone.PulseOscillator}\n\t\t\t *  @private\n\t\t\t */\n\t        this._pulse = new Tone.PulseOscillator(options.modulationFrequency);\n\t        //change the pulse oscillator type\n\t        this._pulse._sawtooth.type = 'sine';\n\t        /**\n\t\t\t *  the modulator\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulator = new Tone.Oscillator({\n\t            'frequency': options.frequency,\n\t            'detune': options.detune,\n\t            'phase': options.phase\n\t        });\n\t        /**\n\t\t\t *  Scale the oscillator so it doesn't go silent\n\t\t\t *  at the extreme values.\n\t\t\t *  @type {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._scale = new Tone.Multiply(2);\n\t        /**\n\t\t\t *  The frequency control.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = this._modulator.frequency;\n\t        /**\n\t\t\t *  The detune of the oscillator.\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = this._modulator.detune;\n\t        /**\n\t\t\t *  The modulation rate of the oscillator.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.modulationFrequency = this._pulse.frequency;\n\t        //connections\n\t        this._modulator.chain(this._scale, this._pulse.width);\n\t        this._pulse.connect(this.output);\n\t        this._readOnly([\n\t            'modulationFrequency',\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.PWMOscillator, Tone.Source);\n\t    /**\n\t\t *  default values\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.PWMOscillator.defaults = {\n\t        'frequency': 440,\n\t        'detune': 0,\n\t        'phase': 0,\n\t        'modulationFrequency': 0.4\n\t    };\n\t    /**\n\t\t *  start the oscillator\n\t\t *  @param  {Time} [time=now]\n\t\t *  @private\n\t\t */\n\t    Tone.PWMOscillator.prototype._start = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._modulator.start(time);\n\t        this._pulse.start(time);\n\t    };\n\t    /**\n\t\t *  stop the oscillator\n\t\t *  @param  {Time} time (optional) timing parameter\n\t\t *  @private\n\t\t */\n\t    Tone.PWMOscillator.prototype._stop = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._modulator.stop(time);\n\t        this._pulse.stop(time);\n\t    };\n\t    /**\n\t\t *  restart the oscillator\n\t\t *  @param  {Time} time (optional) timing parameter\n\t\t *  @private\n\t\t */\n\t    Tone.PWMOscillator.prototype.restart = function (time) {\n\t        this._modulator.restart(time);\n\t        this._pulse.restart(time);\n\t    };\n\t    /**\n\t\t * The type of the oscillator. Always returns \"pwm\".\n\t\t * @readOnly\n\t\t * @memberOf Tone.PWMOscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.PWMOscillator.prototype, 'type', {\n\t        get: function () {\n\t            return 'pwm';\n\t        }\n\t    });\n\t    /**\n\t\t * The partials of the waveform. Cannot set partials for this waveform type\n\t\t * @memberOf Tone.PWMOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @private\n\t\t */\n\t    Object.defineProperty(Tone.PWMOscillator.prototype, 'partials', {\n\t        get: function () {\n\t            return [];\n\t        }\n\t    });\n\t    /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.PWMOscillator#\n\t\t * @type {number}\n\t\t * @name phase\n\t\t */\n\t    Object.defineProperty(Tone.PWMOscillator.prototype, 'phase', {\n\t        get: function () {\n\t            return this._modulator.phase;\n\t        },\n\t        set: function (phase) {\n\t            this._modulator.phase = phase;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return {Tone.PWMOscillator} this\n\t\t */\n\t    Tone.PWMOscillator.prototype.dispose = function () {\n\t        Tone.Source.prototype.dispose.call(this);\n\t        this._pulse.dispose();\n\t        this._pulse = null;\n\t        this._scale.dispose();\n\t        this._scale = null;\n\t        this._modulator.dispose();\n\t        this._modulator = null;\n\t        this._writable([\n\t            'modulationFrequency',\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t        this.frequency = null;\n\t        this.detune = null;\n\t        this.modulationFrequency = null;\n\t        return this;\n\t    };\n\t    return Tone.PWMOscillator;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.FMOscillator\n\t\t *\n\t\t *  @extends {Tone.Source}\n\t\t *  @constructor\n\t\t *  @param {Frequency} frequency The starting frequency of the oscillator.\n\t\t *  @param {String} type The type of the carrier oscillator.\n\t\t *  @param {String} modulationType The type of the modulator oscillator.\n\t\t *  @example\n\t\t * //a sine oscillator frequency-modulated by a square wave\n\t\t * var fmOsc = new Tone.FMOscillator(\"Ab3\", \"sine\", \"square\").toMaster().start();\n\t\t */\n\t    Tone.FMOscillator = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'type',\n\t            'modulationType'\n\t        ], Tone.FMOscillator);\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  The carrier oscillator\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t *  @private\n\t\t\t */\n\t        this._carrier = new Tone.Oscillator(options.frequency, options.type);\n\t        /**\n\t\t\t *  The oscillator's frequency\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The detune control signal.\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = this._carrier.detune;\n\t        this.detune.value = options.detune;\n\t        /**\n\t\t\t *  The modulation index which is in essence the depth or amount of the modulation. In other terms it is the\n\t\t\t *  ratio of the frequency of the modulating signal (mf) to the amplitude of the\n\t\t\t *  modulating signal (ma) -- as in ma/mf.\n\t\t\t *\t@type {Positive}\n\t\t\t *\t@signal\n\t\t\t */\n\t        this.modulationIndex = new Tone.Multiply(options.modulationIndex);\n\t        this.modulationIndex.units = Tone.Type.Positive;\n\t        /**\n\t\t\t *  The modulating oscillator\n\t\t\t *  @type  {Tone.Oscillator}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulator = new Tone.Oscillator(options.frequency, options.modulationType);\n\t        /**\n\t\t\t *  Harmonicity is the frequency ratio between the carrier and the modulator oscillators.\n\t\t\t *  A harmonicity of 1 gives both oscillators the same frequency.\n\t\t\t *  Harmonicity = 2 means a change of an octave.\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t *  @example\n\t\t\t * //pitch the modulator an octave below carrier\n\t\t\t * synth.harmonicity.value = 0.5;\n\t\t\t */\n\t        this.harmonicity = new Tone.Multiply(options.harmonicity);\n\t        this.harmonicity.units = Tone.Type.Positive;\n\t        /**\n\t\t\t *  the node where the modulation happens\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulationNode = new Tone.Gain(0);\n\t        //connections\n\t        this.frequency.connect(this._carrier.frequency);\n\t        this.frequency.chain(this.harmonicity, this._modulator.frequency);\n\t        this.frequency.chain(this.modulationIndex, this._modulationNode);\n\t        this._modulator.connect(this._modulationNode.gain);\n\t        this._modulationNode.connect(this._carrier.frequency);\n\t        this._carrier.connect(this.output);\n\t        this.detune.connect(this._modulator.detune);\n\t        this.phase = options.phase;\n\t        this._readOnly([\n\t            'modulationIndex',\n\t            'frequency',\n\t            'detune',\n\t            'harmonicity'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.FMOscillator, Tone.Source);\n\t    /**\n\t\t *  default values\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.FMOscillator.defaults = {\n\t        'frequency': 440,\n\t        'detune': 0,\n\t        'phase': 0,\n\t        'modulationIndex': 2,\n\t        'modulationType': 'square',\n\t        'harmonicity': 1\n\t    };\n\t    /**\n\t\t *  start the oscillator\n\t\t *  @param  {Time} [time=now]\n\t\t *  @private\n\t\t */\n\t    Tone.FMOscillator.prototype._start = function (time) {\n\t        this._modulator.start(time);\n\t        this._carrier.start(time);\n\t    };\n\t    /**\n\t\t *  stop the oscillator\n\t\t *  @param  {Time} time (optional) timing parameter\n\t\t *  @private\n\t\t */\n\t    Tone.FMOscillator.prototype._stop = function (time) {\n\t        this._modulator.stop(time);\n\t        this._carrier.stop(time);\n\t    };\n\t    /**\n\t\t *  stop the oscillator\n\t\t *  @param  {Time} time (optional) timing parameter\n\t\t *  @private\n\t\t */\n\t    Tone.FMOscillator.prototype.restart = function (time) {\n\t        this._modulator.restart(time);\n\t        this._carrier.restart(time);\n\t    };\n\t    /**\n\t\t * The type of the carrier oscillator\n\t\t * @memberOf Tone.FMOscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.FMOscillator.prototype, 'type', {\n\t        get: function () {\n\t            return this._carrier.type;\n\t        },\n\t        set: function (type) {\n\t            this._carrier.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t * The type of the modulator oscillator\n\t\t * @memberOf Tone.FMOscillator#\n\t\t * @type {String}\n\t\t * @name modulationType\n\t\t */\n\t    Object.defineProperty(Tone.FMOscillator.prototype, 'modulationType', {\n\t        get: function () {\n\t            return this._modulator.type;\n\t        },\n\t        set: function (type) {\n\t            this._modulator.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.FMOscillator#\n\t\t * @type {number}\n\t\t * @name phase\n\t\t */\n\t    Object.defineProperty(Tone.FMOscillator.prototype, 'phase', {\n\t        get: function () {\n\t            return this._carrier.phase;\n\t        },\n\t        set: function (phase) {\n\t            this._carrier.phase = phase;\n\t            this._modulator.phase = phase;\n\t        }\n\t    });\n\t    /**\n\t\t * The partials of the carrier waveform. A partial represents\n\t\t * the amplitude at a harmonic. The first harmonic is the\n\t\t * fundamental frequency, the second is the octave and so on\n\t\t * following the harmonic series.\n\t\t * Setting this value will automatically set the type to \"custom\".\n\t\t * The value is an empty array when the type is not \"custom\".\n\t\t * @memberOf Tone.FMOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @example\n\t\t * osc.partials = [1, 0.2, 0.01];\n\t\t */\n\t    Object.defineProperty(Tone.FMOscillator.prototype, 'partials', {\n\t        get: function () {\n\t            return this._carrier.partials;\n\t        },\n\t        set: function (partials) {\n\t            this._carrier.partials = partials;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return {Tone.FMOscillator} this\n\t\t */\n\t    Tone.FMOscillator.prototype.dispose = function () {\n\t        Tone.Source.prototype.dispose.call(this);\n\t        this._writable([\n\t            'modulationIndex',\n\t            'frequency',\n\t            'detune',\n\t            'harmonicity'\n\t        ]);\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        this.detune = null;\n\t        this.harmonicity.dispose();\n\t        this.harmonicity = null;\n\t        this._carrier.dispose();\n\t        this._carrier = null;\n\t        this._modulator.dispose();\n\t        this._modulator = null;\n\t        this._modulationNode.dispose();\n\t        this._modulationNode = null;\n\t        this.modulationIndex.dispose();\n\t        this.modulationIndex = null;\n\t        return this;\n\t    };\n\t    return Tone.FMOscillator;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.AMOscillator\n\t\t *\n\t\t *  @extends {Tone.Oscillator}\n\t\t *  @constructor\n\t\t *  @param {Frequency} frequency The starting frequency of the oscillator.\n\t\t *  @param {String} type The type of the carrier oscillator.\n\t\t *  @param {String} modulationType The type of the modulator oscillator.\n\t\t *  @example\n\t\t * //a sine oscillator frequency-modulated by a square wave\n\t\t * var fmOsc = new Tone.AMOscillator(\"Ab3\", \"sine\", \"square\").toMaster().start();\n\t\t */\n\t    Tone.AMOscillator = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'type',\n\t            'modulationType'\n\t        ], Tone.AMOscillator);\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  The carrier oscillator\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t *  @private\n\t\t\t */\n\t        this._carrier = new Tone.Oscillator(options.frequency, options.type);\n\t        /**\n\t\t\t *  The oscillator's frequency\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = this._carrier.frequency;\n\t        /**\n\t\t\t *  The detune control signal.\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = this._carrier.detune;\n\t        this.detune.value = options.detune;\n\t        /**\n\t\t\t *  The modulating oscillator\n\t\t\t *  @type  {Tone.Oscillator}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulator = new Tone.Oscillator(options.frequency, options.modulationType);\n\t        /**\n\t\t\t *  convert the -1,1 output to 0,1\n\t\t\t *  @type {Tone.AudioToGain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulationScale = new Tone.AudioToGain();\n\t        /**\n\t\t\t *  Harmonicity is the frequency ratio between the carrier and the modulator oscillators.\n\t\t\t *  A harmonicity of 1 gives both oscillators the same frequency.\n\t\t\t *  Harmonicity = 2 means a change of an octave.\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t *  @example\n\t\t\t * //pitch the modulator an octave below carrier\n\t\t\t * synth.harmonicity.value = 0.5;\n\t\t\t */\n\t        this.harmonicity = new Tone.Multiply(options.harmonicity);\n\t        this.harmonicity.units = Tone.Type.Positive;\n\t        /**\n\t\t\t *  the node where the modulation happens\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulationNode = new Tone.Gain(0);\n\t        //connections\n\t        this.frequency.chain(this.harmonicity, this._modulator.frequency);\n\t        this.detune.connect(this._modulator.detune);\n\t        this._modulator.chain(this._modulationScale, this._modulationNode.gain);\n\t        this._carrier.chain(this._modulationNode, this.output);\n\t        this.phase = options.phase;\n\t        this._readOnly([\n\t            'frequency',\n\t            'detune',\n\t            'harmonicity'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.AMOscillator, Tone.Oscillator);\n\t    /**\n\t\t *  default values\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.AMOscillator.defaults = {\n\t        'frequency': 440,\n\t        'detune': 0,\n\t        'phase': 0,\n\t        'modulationType': 'square',\n\t        'harmonicity': 1\n\t    };\n\t    /**\n\t\t *  start the oscillator\n\t\t *  @param  {Time} [time=now]\n\t\t *  @private\n\t\t */\n\t    Tone.AMOscillator.prototype._start = function (time) {\n\t        this._modulator.start(time);\n\t        this._carrier.start(time);\n\t    };\n\t    /**\n\t\t *  stop the oscillator\n\t\t *  @param  {Time} time (optional) timing parameter\n\t\t *  @private\n\t\t */\n\t    Tone.AMOscillator.prototype._stop = function (time) {\n\t        this._modulator.stop(time);\n\t        this._carrier.stop(time);\n\t    };\n\t    /**\n\t\t *  restart the oscillator\n\t\t *  @param  {Time} time (optional) timing parameter\n\t\t *  @private\n\t\t */\n\t    Tone.AMOscillator.prototype.restart = function (time) {\n\t        this._modulator.restart(time);\n\t        this._carrier.restart(time);\n\t    };\n\t    /**\n\t\t * The type of the carrier oscillator\n\t\t * @memberOf Tone.AMOscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.AMOscillator.prototype, 'type', {\n\t        get: function () {\n\t            return this._carrier.type;\n\t        },\n\t        set: function (type) {\n\t            this._carrier.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t * The type of the modulator oscillator\n\t\t * @memberOf Tone.AMOscillator#\n\t\t * @type {string}\n\t\t * @name modulationType\n\t\t */\n\t    Object.defineProperty(Tone.AMOscillator.prototype, 'modulationType', {\n\t        get: function () {\n\t            return this._modulator.type;\n\t        },\n\t        set: function (type) {\n\t            this._modulator.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.AMOscillator#\n\t\t * @type {number}\n\t\t * @name phase\n\t\t */\n\t    Object.defineProperty(Tone.AMOscillator.prototype, 'phase', {\n\t        get: function () {\n\t            return this._carrier.phase;\n\t        },\n\t        set: function (phase) {\n\t            this._carrier.phase = phase;\n\t            this._modulator.phase = phase;\n\t        }\n\t    });\n\t    /**\n\t\t * The partials of the carrier waveform. A partial represents\n\t\t * the amplitude at a harmonic. The first harmonic is the\n\t\t * fundamental frequency, the second is the octave and so on\n\t\t * following the harmonic series.\n\t\t * Setting this value will automatically set the type to \"custom\".\n\t\t * The value is an empty array when the type is not \"custom\".\n\t\t * @memberOf Tone.AMOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @example\n\t\t * osc.partials = [1, 0.2, 0.01];\n\t\t */\n\t    Object.defineProperty(Tone.AMOscillator.prototype, 'partials', {\n\t        get: function () {\n\t            return this._carrier.partials;\n\t        },\n\t        set: function (partials) {\n\t            this._carrier.partials = partials;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return {Tone.AMOscillator} this\n\t\t */\n\t    Tone.AMOscillator.prototype.dispose = function () {\n\t        Tone.Source.prototype.dispose.call(this);\n\t        this._writable([\n\t            'frequency',\n\t            'detune',\n\t            'harmonicity'\n\t        ]);\n\t        this.frequency = null;\n\t        this.detune = null;\n\t        this.harmonicity.dispose();\n\t        this.harmonicity = null;\n\t        this._carrier.dispose();\n\t        this._carrier = null;\n\t        this._modulator.dispose();\n\t        this._modulator = null;\n\t        this._modulationNode.dispose();\n\t        this._modulationNode = null;\n\t        this._modulationScale.dispose();\n\t        this._modulationScale = null;\n\t        return this;\n\t    };\n\t    return Tone.AMOscillator;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.FatOscillator\n\t\t *\n\t\t *  @extends {Tone.Source}\n\t\t *  @constructor\n\t\t *  @param {Frequency} frequency The starting frequency of the oscillator.\n\t\t *  @param {String} type The type of the carrier oscillator.\n\t\t *  @param {String} modulationType The type of the modulator oscillator.\n\t\t *  @example\n\t\t * //a sine oscillator frequency-modulated by a square wave\n\t\t * var fmOsc = new Tone.FatOscillator(\"Ab3\", \"sine\", \"square\").toMaster().start();\n\t\t */\n\t    Tone.FatOscillator = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'type',\n\t            'spread'\n\t        ], Tone.FatOscillator);\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  The oscillator's frequency\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The detune control signal.\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t        /**\n\t\t\t *  The array of oscillators\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._oscillators = [];\n\t        /**\n\t\t\t *  The total spread of the oscillators\n\t\t\t *  @type  {Cents}\n\t\t\t *  @private\n\t\t\t */\n\t        this._spread = options.spread;\n\t        /**\n\t\t\t *  The type of the oscillator\n\t\t\t *  @type {String}\n\t\t\t *  @private\n\t\t\t */\n\t        this._type = options.type;\n\t        /**\n\t\t\t *  The phase of the oscillators\n\t\t\t *  @type {Degrees}\n\t\t\t *  @private\n\t\t\t */\n\t        this._phase = options.phase;\n\t        /**\n\t\t\t *  The partials array\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._partials = Tone.defaultArg(options.partials, []);\n\t        //set the count initially\n\t        this.count = options.count;\n\t        this._readOnly([\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.FatOscillator, Tone.Source);\n\t    /**\n\t\t *  default values\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.FatOscillator.defaults = {\n\t        'frequency': 440,\n\t        'detune': 0,\n\t        'phase': 0,\n\t        'spread': 20,\n\t        'count': 3,\n\t        'type': 'sawtooth'\n\t    };\n\t    /**\n\t\t *  start the oscillator\n\t\t *  @param  {Time} [time=now]\n\t\t *  @private\n\t\t */\n\t    Tone.FatOscillator.prototype._start = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._forEach(function (osc) {\n\t            osc.start(time);\n\t        });\n\t    };\n\t    /**\n\t\t *  stop the oscillator\n\t\t *  @param  {Time} [time=now]\n\t\t *  @private\n\t\t */\n\t    Tone.FatOscillator.prototype._stop = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._forEach(function (osc) {\n\t            osc.stop(time);\n\t        });\n\t    };\n\t    /**\n\t\t *  restart the oscillator\n\t\t *  @param  {Time} time (optional) timing parameter\n\t\t *  @private\n\t\t */\n\t    Tone.FatOscillator.prototype.restart = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._forEach(function (osc) {\n\t            osc.restart(time);\n\t        });\n\t    };\n\t    /**\n\t\t *  Iterate over all of the oscillators\n\t\t *  @param  {Function}  iterator  The iterator function\n\t\t *  @private\n\t\t */\n\t    Tone.FatOscillator.prototype._forEach = function (iterator) {\n\t        for (var i = 0; i < this._oscillators.length; i++) {\n\t            iterator.call(this, this._oscillators[i], i);\n\t        }\n\t    };\n\t    /**\n\t\t * The type of the carrier oscillator\n\t\t * @memberOf Tone.FatOscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.FatOscillator.prototype, 'type', {\n\t        get: function () {\n\t            return this._type;\n\t        },\n\t        set: function (type) {\n\t            this._type = type;\n\t            this._forEach(function (osc) {\n\t                osc.type = type;\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t * The detune spread between the oscillators. If \"count\" is\n\t\t * set to 3 oscillators and the \"spread\" is set to 40,\n\t\t * the three oscillators would be detuned like this: [-20, 0, 20]\n\t\t * for a total detune spread of 40 cents.\n\t\t * @memberOf Tone.FatOscillator#\n\t\t * @type {Cents}\n\t\t * @name spread\n\t\t */\n\t    Object.defineProperty(Tone.FatOscillator.prototype, 'spread', {\n\t        get: function () {\n\t            return this._spread;\n\t        },\n\t        set: function (spread) {\n\t            this._spread = spread;\n\t            if (this._oscillators.length > 1) {\n\t                var start = -spread / 2;\n\t                var step = spread / (this._oscillators.length - 1);\n\t                this._forEach(function (osc, i) {\n\t                    osc.detune.value = start + step * i;\n\t                });\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The number of detuned oscillators\n\t\t * @memberOf Tone.FatOscillator#\n\t\t * @type {Number}\n\t\t * @name count\n\t\t */\n\t    Object.defineProperty(Tone.FatOscillator.prototype, 'count', {\n\t        get: function () {\n\t            return this._oscillators.length;\n\t        },\n\t        set: function (count) {\n\t            count = Math.max(count, 1);\n\t            if (this._oscillators.length !== count) {\n\t                // var partials = this.partials;\n\t                // var type = this.type;\n\t                //dispose the previous oscillators\n\t                this._forEach(function (osc) {\n\t                    osc.dispose();\n\t                });\n\t                this._oscillators = [];\n\t                for (var i = 0; i < count; i++) {\n\t                    var osc = new Tone.Oscillator();\n\t                    if (this.type === Tone.Oscillator.Type.Custom) {\n\t                        osc.partials = this._partials;\n\t                    } else {\n\t                        osc.type = this._type;\n\t                    }\n\t                    osc.phase = this._phase;\n\t                    osc.volume.value = -6 - count * 1.1;\n\t                    this.frequency.connect(osc.frequency);\n\t                    this.detune.connect(osc.detune);\n\t                    osc.connect(this.output);\n\t                    this._oscillators[i] = osc;\n\t                }\n\t                //set the spread\n\t                this.spread = this._spread;\n\t                if (this.state === Tone.State.Started) {\n\t                    this._forEach(function (osc) {\n\t                        osc.start();\n\t                    });\n\t                }\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.FatOscillator#\n\t\t * @type {Number}\n\t\t * @name phase\n\t\t */\n\t    Object.defineProperty(Tone.FatOscillator.prototype, 'phase', {\n\t        get: function () {\n\t            return this._phase;\n\t        },\n\t        set: function (phase) {\n\t            this._phase = phase;\n\t            this._forEach(function (osc) {\n\t                osc.phase = phase;\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t * The partials of the carrier waveform. A partial represents\n\t\t * the amplitude at a harmonic. The first harmonic is the\n\t\t * fundamental frequency, the second is the octave and so on\n\t\t * following the harmonic series.\n\t\t * Setting this value will automatically set the type to \"custom\".\n\t\t * The value is an empty array when the type is not \"custom\".\n\t\t * @memberOf Tone.FatOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @example\n\t\t * osc.partials = [1, 0.2, 0.01];\n\t\t */\n\t    Object.defineProperty(Tone.FatOscillator.prototype, 'partials', {\n\t        get: function () {\n\t            return this._partials;\n\t        },\n\t        set: function (partials) {\n\t            this._partials = partials;\n\t            this._type = Tone.Oscillator.Type.Custom;\n\t            this._forEach(function (osc) {\n\t                osc.partials = partials;\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return {Tone.FatOscillator} this\n\t\t */\n\t    Tone.FatOscillator.prototype.dispose = function () {\n\t        Tone.Source.prototype.dispose.call(this);\n\t        this._writable([\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        this.detune.dispose();\n\t        this.detune = null;\n\t        this._forEach(function (osc) {\n\t            osc.dispose();\n\t        });\n\t        this._oscillators = null;\n\t        this._partials = null;\n\t        return this;\n\t    };\n\t    return Tone.FatOscillator;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.OmniOscillator aggregates Tone.Oscillator, Tone.PulseOscillator,\n\t\t *         Tone.PWMOscillator, Tone.FMOscillator, Tone.AMOscillator, and Tone.FatOscillator\n\t\t *         into one class. The oscillator class can be changed by setting the `type`.\n\t\t *         `omniOsc.type = \"pwm\"` will set it to the Tone.PWMOscillator. Prefixing\n\t\t *         any of the basic types (\"sine\", \"square4\", etc.) with \"fm\", \"am\", or \"fat\"\n\t\t *         will use the FMOscillator, AMOscillator or FatOscillator respectively.\n\t\t *         For example: `omniOsc.type = \"fatsawtooth\"` will create set the oscillator\n\t\t *         to a FatOscillator of type \"sawtooth\".\n\t\t *\n\t\t *  @extends {Tone.Source}\n\t\t *  @constructor\n\t\t *  @param {Frequency} frequency The initial frequency of the oscillator.\n\t\t *  @param {String} type The type of the oscillator.\n\t\t *  @example\n\t\t *  var omniOsc = new Tone.OmniOscillator(\"C#4\", \"pwm\");\n\t\t */\n\t    Tone.OmniOscillator = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'type'\n\t        ], Tone.OmniOscillator);\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  The frequency control.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The detune control\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t        /**\n\t\t\t *  the type of the oscillator source\n\t\t\t *  @type {String}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sourceType = undefined;\n\t        /**\n\t\t\t *  the oscillator\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t *  @private\n\t\t\t */\n\t        this._oscillator = null;\n\t        //set the oscillator\n\t        this.type = options.type;\n\t        this._readOnly([\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t        //set the options\n\t        this.set(options);\n\t    };\n\t    Tone.extend(Tone.OmniOscillator, Tone.Source);\n\t    /**\n\t\t *  default values\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.OmniOscillator.defaults = {\n\t        'frequency': 440,\n\t        'detune': 0,\n\t        'type': 'sine',\n\t        'phase': 0\n\t    };\n\t    /**\n\t\t *  @enum {String}\n\t\t *  @private\n\t\t */\n\t    var OmniOscType = {\n\t        Pulse: 'PulseOscillator',\n\t        PWM: 'PWMOscillator',\n\t        Osc: 'Oscillator',\n\t        FM: 'FMOscillator',\n\t        AM: 'AMOscillator',\n\t        Fat: 'FatOscillator'\n\t    };\n\t    /**\n\t\t *  start the oscillator\n\t\t *  @param {Time} [time=now] the time to start the oscillator\n\t\t *  @private\n\t\t */\n\t    Tone.OmniOscillator.prototype._start = function (time) {\n\t        this._oscillator.start(time);\n\t    };\n\t    /**\n\t\t *  start the oscillator\n\t\t *  @param {Time} [time=now] the time to start the oscillator\n\t\t *  @private\n\t\t */\n\t    Tone.OmniOscillator.prototype._stop = function (time) {\n\t        this._oscillator.stop(time);\n\t    };\n\t    Tone.OmniOscillator.prototype.restart = function (time) {\n\t        this._oscillator.restart(time);\n\t    };\n\t    /**\n\t\t * The type of the oscillator. Can be any of the basic types: sine, square, triangle, sawtooth. Or\n\t\t * prefix the basic types with \"fm\", \"am\", or \"fat\" to use the FMOscillator, AMOscillator or FatOscillator\n\t\t * types. The oscillator could also be set to \"pwm\" or \"pulse\". All of the parameters of the\n\t\t * oscillator's class are accessible when the oscillator is set to that type, but throws an error\n\t\t * when it's not.\n\t\t *\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {String}\n\t\t * @name type\n\t\t * @example\n\t\t * omniOsc.type = \"pwm\";\n\t\t * //modulationFrequency is parameter which is available\n\t\t * //only when the type is \"pwm\".\n\t\t * omniOsc.modulationFrequency.value = 0.5;\n\t\t * @example\n\t\t * //an square wave frequency modulated by a sawtooth\n\t\t * omniOsc.type = \"fmsquare\";\n\t\t * omniOsc.modulationType = \"sawtooth\";\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'type', {\n\t        get: function () {\n\t            var prefix = '';\n\t            if (this._sourceType === OmniOscType.FM) {\n\t                prefix = 'fm';\n\t            } else if (this._sourceType === OmniOscType.AM) {\n\t                prefix = 'am';\n\t            } else if (this._sourceType === OmniOscType.Fat) {\n\t                prefix = 'fat';\n\t            }\n\t            return prefix + this._oscillator.type;\n\t        },\n\t        set: function (type) {\n\t            if (type.substr(0, 2) === 'fm') {\n\t                this._createNewOscillator(OmniOscType.FM);\n\t                this._oscillator.type = type.substr(2);\n\t            } else if (type.substr(0, 2) === 'am') {\n\t                this._createNewOscillator(OmniOscType.AM);\n\t                this._oscillator.type = type.substr(2);\n\t            } else if (type.substr(0, 3) === 'fat') {\n\t                this._createNewOscillator(OmniOscType.Fat);\n\t                this._oscillator.type = type.substr(3);\n\t            } else if (type === 'pwm') {\n\t                this._createNewOscillator(OmniOscType.PWM);\n\t            } else if (type === 'pulse') {\n\t                this._createNewOscillator(OmniOscType.Pulse);\n\t            } else {\n\t                this._createNewOscillator(OmniOscType.Osc);\n\t                this._oscillator.type = type;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The partials of the waveform. A partial represents\n\t\t * the amplitude at a harmonic. The first harmonic is the\n\t\t * fundamental frequency, the second is the octave and so on\n\t\t * following the harmonic series.\n\t\t * Setting this value will automatically set the type to \"custom\".\n\t\t * The value is an empty array when the type is not \"custom\".\n\t\t * This is not available on \"pwm\" and \"pulse\" oscillator types.\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @example\n\t\t * osc.partials = [1, 0.2, 0.01];\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'partials', {\n\t        get: function () {\n\t            return this._oscillator.partials;\n\t        },\n\t        set: function (partials) {\n\t            this._oscillator.partials = partials;\n\t        }\n\t    });\n\t    /**\n\t\t *  Set a member/attribute of the oscillator.\n\t\t *  @param {Object|String} params\n\t\t *  @param {number=} value\n\t\t *  @param {Time=} rampTime\n\t\t *  @returns {Tone.OmniOscillator} this\n\t\t */\n\t    Tone.OmniOscillator.prototype.set = function (params, value) {\n\t        //make sure the type is set first\n\t        if (params === 'type') {\n\t            this.type = value;\n\t        } else if (Tone.isObject(params) && params.hasOwnProperty('type')) {\n\t            this.type = params.type;\n\t        }\n\t        //then set the rest\n\t        Tone.prototype.set.apply(this, arguments);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  connect the oscillator to the frequency and detune signals\n\t\t *  @private\n\t\t */\n\t    Tone.OmniOscillator.prototype._createNewOscillator = function (oscType) {\n\t        if (oscType !== this._sourceType) {\n\t            this._sourceType = oscType;\n\t            var OscillatorConstructor = Tone[oscType];\n\t            //short delay to avoid clicks on the change\n\t            var now = this.now();\n\t            if (this._oscillator !== null) {\n\t                var oldOsc = this._oscillator;\n\t                oldOsc.stop(now);\n\t                //dispose the old one\n\t                this.context.setTimeout(function () {\n\t                    oldOsc.dispose();\n\t                    oldOsc = null;\n\t                }, this.blockTime);\n\t            }\n\t            this._oscillator = new OscillatorConstructor();\n\t            this.frequency.connect(this._oscillator.frequency);\n\t            this.detune.connect(this._oscillator.detune);\n\t            this._oscillator.connect(this.output);\n\t            if (this.state === Tone.State.Started) {\n\t                this._oscillator.start(now);\n\t            }\n\t        }\n\t    };\n\t    /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {Degrees}\n\t\t * @name phase\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'phase', {\n\t        get: function () {\n\t            return this._oscillator.phase;\n\t        },\n\t        set: function (phase) {\n\t            this._oscillator.phase = phase;\n\t        }\n\t    });\n\t    /**\n\t\t * The width of the oscillator (only if the oscillator is set to \"pulse\")\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {NormalRange}\n\t\t * @signal\n\t\t * @name width\n\t\t * @example\n\t\t * var omniOsc = new Tone.OmniOscillator(440, \"pulse\");\n\t\t * //can access the width attribute only if type === \"pulse\"\n\t\t * omniOsc.width.value = 0.2;\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'width', {\n\t        get: function () {\n\t            if (this._sourceType === OmniOscType.Pulse) {\n\t                return this._oscillator.width;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The number of detuned oscillators\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {Number}\n\t\t * @name count\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'count', {\n\t        get: function () {\n\t            if (this._sourceType === OmniOscType.Fat) {\n\t                return this._oscillator.count;\n\t            }\n\t        },\n\t        set: function (count) {\n\t            if (this._sourceType === OmniOscType.Fat) {\n\t                this._oscillator.count = count;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The detune spread between the oscillators. If \"count\" is\n\t\t * set to 3 oscillators and the \"spread\" is set to 40,\n\t\t * the three oscillators would be detuned like this: [-20, 0, 20]\n\t\t * for a total detune spread of 40 cents. See Tone.FatOscillator\n\t\t * for more info.\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {Cents}\n\t\t * @name spread\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'spread', {\n\t        get: function () {\n\t            if (this._sourceType === OmniOscType.Fat) {\n\t                return this._oscillator.spread;\n\t            }\n\t        },\n\t        set: function (spread) {\n\t            if (this._sourceType === OmniOscType.Fat) {\n\t                this._oscillator.spread = spread;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The type of the modulator oscillator. Only if the oscillator\n\t\t * is set to \"am\" or \"fm\" types. see. Tone.AMOscillator or Tone.FMOscillator\n\t\t * for more info.\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {String}\n\t\t * @name modulationType\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'modulationType', {\n\t        get: function () {\n\t            if (this._sourceType === OmniOscType.FM || this._sourceType === OmniOscType.AM) {\n\t                return this._oscillator.modulationType;\n\t            }\n\t        },\n\t        set: function (mType) {\n\t            if (this._sourceType === OmniOscType.FM || this._sourceType === OmniOscType.AM) {\n\t                this._oscillator.modulationType = mType;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The modulation index which is in essence the depth or amount of the modulation. In other terms it is the\n\t\t * ratio of the frequency of the modulating signal (mf) to the amplitude of the\n\t\t * modulating signal (ma) -- as in ma/mf.\n\t\t * See Tone.FMOscillator for more info.\n\t\t * @type {Positive}\n\t\t * @signal\n\t\t * @name modulationIndex\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'modulationIndex', {\n\t        get: function () {\n\t            if (this._sourceType === OmniOscType.FM) {\n\t                return this._oscillator.modulationIndex;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Harmonicity is the frequency ratio between the carrier and the modulator oscillators.\n\t\t *  A harmonicity of 1 gives both oscillators the same frequency.\n\t\t *  Harmonicity = 2 means a change of an octave. See Tone.AMOscillator or Tone.FMOscillator\n\t\t *  for more info.\n\t\t *  @memberOf Tone.OmniOscillator#\n\t\t *  @signal\n\t\t *  @type {Positive}\n\t\t *  @name harmonicity\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'harmonicity', {\n\t        get: function () {\n\t            if (this._sourceType === OmniOscType.FM || this._sourceType === OmniOscType.AM) {\n\t                return this._oscillator.harmonicity;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The modulationFrequency Signal of the oscillator\n\t\t * (only if the oscillator type is set to pwm). See\n\t\t * Tone.PWMOscillator for more info.\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {Frequency}\n\t\t * @signal\n\t\t * @name modulationFrequency\n\t\t * @example\n\t\t * var omniOsc = new Tone.OmniOscillator(440, \"pwm\");\n\t\t * //can access the modulationFrequency attribute only if type === \"pwm\"\n\t\t * omniOsc.modulationFrequency.value = 0.2;\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'modulationFrequency', {\n\t        get: function () {\n\t            if (this._sourceType === OmniOscType.PWM) {\n\t                return this._oscillator.modulationFrequency;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return {Tone.OmniOscillator} this\n\t\t */\n\t    Tone.OmniOscillator.prototype.dispose = function () {\n\t        Tone.Source.prototype.dispose.call(this);\n\t        this._writable([\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t        this.detune.dispose();\n\t        this.detune = null;\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        this._oscillator.dispose();\n\t        this._oscillator = null;\n\t        this._sourceType = null;\n\t        return this;\n\t    };\n\t    return Tone.OmniOscillator;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Base-class for all instruments\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t */\n\t    Tone.Instrument = function (options) {\n\t        //get the defaults\n\t        options = Tone.defaultArg(options, Tone.Instrument.defaults);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The output and volume triming node\n\t\t\t *  @type  {Tone.Volume}\n\t\t\t *  @private\n\t\t\t */\n\t        this._volume = this.output = new Tone.Volume(options.volume);\n\t        /**\n\t\t\t * The volume of the output in decibels.\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * source.volume.value = -6;\n\t\t\t */\n\t        this.volume = this._volume.volume;\n\t        this._readOnly('volume');\n\t        /**\n\t\t\t * Keep track of all events scheduled to the transport\n\t\t\t * when the instrument is 'synced'\n\t\t\t * @type {Array<Number>}\n\t\t\t * @private\n\t\t\t */\n\t        this._scheduledEvents = [];\n\t    };\n\t    Tone.extend(Tone.Instrument, Tone.AudioNode);\n\t    /**\n\t\t *  the default attributes\n\t\t *  @type {object}\n\t\t */\n\t    Tone.Instrument.defaults = {\n\t        /** the volume of the output in decibels */\n\t        'volume': 0\n\t    };\n\t    /**\n\t\t *  @abstract\n\t\t *  @param {string|number} note the note to trigger\n\t\t *  @param {Time} [time=now] the time to trigger the ntoe\n\t\t *  @param {number} [velocity=1] the velocity to trigger the note\n\t\t */\n\t    Tone.Instrument.prototype.triggerAttack = Tone.noOp;\n\t    /**\n\t\t *  @abstract\n\t\t *  @param {Time} [time=now] when to trigger the release\n\t\t */\n\t    Tone.Instrument.prototype.triggerRelease = Tone.noOp;\n\t    /**\n\t\t * Sync the instrument to the Transport. All subsequent calls of\n\t\t * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n\t\t * will be scheduled along the transport.\n\t\t * @example\n\t\t * instrument.sync()\n\t\t * //schedule 3 notes when the transport first starts\n\t\t * instrument.triggerAttackRelease('C4', '8n', 0)\n\t\t * instrument.triggerAttackRelease('E4', '8n', '8n')\n\t\t * instrument.triggerAttackRelease('G4', '8n', '4n')\n\t\t * //start the transport to hear the notes\n\t\t * Transport.start()\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t    Tone.Instrument.prototype.sync = function () {\n\t        this._syncMethod('triggerAttack', 1);\n\t        this._syncMethod('triggerRelease', 0);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Wrap the given method so that it can be synchronized\n\t\t * @param {String} method Which method to wrap and sync\n\t\t * @param  {Number} timePosition What position the time argument appears in\n\t\t * @private\n\t\t */\n\t    Tone.Instrument.prototype._syncMethod = function (method, timePosition) {\n\t        var originalMethod = this['_original_' + method] = this[method];\n\t        this[method] = function () {\n\t            var args = Array.prototype.slice.call(arguments);\n\t            var time = args[timePosition];\n\t            var id = Tone.Transport.schedule(function (t) {\n\t                args[timePosition] = t;\n\t                originalMethod.apply(this, args);\n\t            }.bind(this), time);\n\t            this._scheduledEvents.push(id);\n\t        }.bind(this);\n\t    };\n\t    /**\n\t\t * Unsync the instrument from the Transport\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t    Tone.Instrument.prototype.unsync = function () {\n\t        this._scheduledEvents.forEach(function (id) {\n\t            Tone.Transport.clear(id);\n\t        });\n\t        this._scheduledEvents = [];\n\t        if (this._original_triggerAttack) {\n\t            this.triggerAttack = this._original_triggerAttack;\n\t            this.triggerRelease = this._original_triggerRelease;\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Trigger the attack and then the release after the duration.\n\t\t *  @param  {Frequency} note     The note to trigger.\n\t\t *  @param  {Time} duration How long the note should be held for before\n\t\t *                          triggering the release. This value must be greater than 0.\n\t\t *  @param {Time} [time=now]  When the note should be triggered.\n\t\t *  @param  {NormalRange} [velocity=1] The velocity the note should be triggered at.\n\t\t *  @returns {Tone.Instrument} this\n\t\t *  @example\n\t\t * //trigger \"C4\" for the duration of an 8th note\n\t\t * synth.triggerAttackRelease(\"C4\", \"8n\");\n\t\t */\n\t    Tone.Instrument.prototype.triggerAttackRelease = function (note, duration, time, velocity) {\n\t        time = this.toSeconds(time);\n\t        duration = this.toSeconds(duration);\n\t        this.triggerAttack(note, time, velocity);\n\t        this.triggerRelease(time + duration);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Instrument} this\n\t\t */\n\t    Tone.Instrument.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._volume.dispose();\n\t        this._volume = null;\n\t        this._writable(['volume']);\n\t        this.volume = null;\n\t        this.unsync();\n\t        this._scheduledEvents = null;\n\t        return this;\n\t    };\n\t    return Tone.Instrument;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  This is an abstract base class for other monophonic instruments to \n\t\t *          extend. IMPORTANT: It does not make any sound on its own and\n\t\t *          shouldn't be directly instantiated.\n\t\t *\n\t\t *  @constructor\n\t\t *  @abstract\n\t\t *  @extends {Tone.Instrument}\n\t\t */\n\t    Tone.Monophonic = function (options) {\n\t        //get the defaults\n\t        options = Tone.defaultArg(options, Tone.Monophonic.defaults);\n\t        Tone.Instrument.call(this, options);\n\t        /**\n\t\t\t *  The glide time between notes. \n\t\t\t *  @type {Time}\n\t\t\t */\n\t        this.portamento = options.portamento;\n\t    };\n\t    Tone.extend(Tone.Monophonic, Tone.Instrument);\n\t    /**\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Monophonic.defaults = { 'portamento': 0 };\n\t    /**\n\t\t *  Trigger the attack of the note optionally with a given velocity. \n\t\t *  \n\t\t *  \n\t\t *  @param  {Frequency} note     The note to trigger.\n\t\t *  @param  {Time} [time=now]     When the note should start.\n\t\t *  @param  {number} [velocity=1] velocity The velocity scaler \n\t\t *                                determines how \"loud\" the note \n\t\t *                                will be triggered.\n\t\t *  @returns {Tone.Monophonic} this\n\t\t *  @example\n\t\t * synth.triggerAttack(\"C4\");\n\t\t *  @example\n\t\t * //trigger the note a half second from now at half velocity\n\t\t * synth.triggerAttack(\"C4\", \"+0.5\", 0.5);\n\t\t */\n\t    Tone.Monophonic.prototype.triggerAttack = function (note, time, velocity) {\n\t        time = this.toSeconds(time);\n\t        this._triggerEnvelopeAttack(time, velocity);\n\t        this.setNote(note, time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Trigger the release portion of the envelope\n\t\t *  @param  {Time} [time=now] If no time is given, the release happens immediatly\n\t\t *  @returns {Tone.Monophonic} this\n\t\t *  @example\n\t\t * synth.triggerRelease();\n\t\t */\n\t    Tone.Monophonic.prototype.triggerRelease = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._triggerEnvelopeRelease(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  override this method with the actual method\n\t\t *  @abstract\n\t\t *  @private\n\t\t */\n\t    Tone.Monophonic.prototype._triggerEnvelopeAttack = function () {\n\t    };\n\t    /**\n\t\t *  override this method with the actual method\n\t\t *  @abstract\n\t\t *  @private\n\t\t */\n\t    Tone.Monophonic.prototype._triggerEnvelopeRelease = function () {\n\t    };\n\t    /**\n\t\t *  Get the level of the output at the given time. Measures\n\t\t *  the envelope(s) value at the time. \n\t\t *  @param {Time} time The time to query the envelope value\n\t\t *  @return {NormalRange} The output level between 0-1\n\t\t */\n\t    Tone.Monophonic.prototype.getLevelAtTime = function (time) {\n\t        time = this.toSeconds(time);\n\t        return this.envelope.getValueAtTime(time);\n\t    };\n\t    /**\n\t\t *  Set the note at the given time. If no time is given, the note\n\t\t *  will set immediately. \n\t\t *  @param {Frequency} note The note to change to.\n\t\t *  @param  {Time} [time=now] The time when the note should be set. \n\t\t *  @returns {Tone.Monophonic} this\n\t\t * @example\n\t\t * //change to F#6 in one quarter note from now.\n\t\t * synth.setNote(\"F#6\", \"+4n\");\n\t\t * @example\n\t\t * //change to Bb4 right now\n\t\t * synth.setNote(\"Bb4\");\n\t\t */\n\t    Tone.Monophonic.prototype.setNote = function (note, time) {\n\t        time = this.toSeconds(time);\n\t        if (this.portamento > 0 && this.getLevelAtTime(time) > 0.05) {\n\t            var portTime = this.toSeconds(this.portamento);\n\t            this.frequency.exponentialRampTo(note, portTime, time);\n\t        } else {\n\t            this.frequency.setValueAtTime(note, time);\n\t        }\n\t        return this;\n\t    };\n\t    return Tone.Monophonic;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Synth is composed simply of a Tone.OmniOscillator\n\t\t *          routed through a Tone.AmplitudeEnvelope.\n\t\t *          <img src=\"https://docs.google.com/drawings/d/1-1_0YW2Z1J2EPI36P8fNCMcZG7N1w1GZluPs4og4evo/pub?w=1163&h=231\">\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Monophonic}\n\t\t *  @param {Object} [options] the options available for the synth\n\t\t *                          see defaults below\n\t\t *  @example\n\t\t * var synth = new Tone.Synth().toMaster();\n\t\t * synth.triggerAttackRelease(\"C4\", \"8n\");\n\t\t */\n\t    Tone.Synth = function (options) {\n\t        //get the defaults\n\t        options = Tone.defaultArg(options, Tone.Synth.defaults);\n\t        Tone.Monophonic.call(this, options);\n\t        /**\n\t\t\t *  The oscillator.\n\t\t\t *  @type {Tone.OmniOscillator}\n\t\t\t */\n\t        this.oscillator = new Tone.OmniOscillator(options.oscillator);\n\t        /**\n\t\t\t *  The frequency control.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = this.oscillator.frequency;\n\t        /**\n\t\t\t *  The detune control.\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = this.oscillator.detune;\n\t        /**\n\t\t\t *  The amplitude envelope.\n\t\t\t *  @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t        this.envelope = new Tone.AmplitudeEnvelope(options.envelope);\n\t        //connect the oscillators to the output\n\t        this.oscillator.chain(this.envelope, this.output);\n\t        this._readOnly([\n\t            'oscillator',\n\t            'frequency',\n\t            'detune',\n\t            'envelope'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.Synth, Tone.Monophonic);\n\t    /**\n\t\t *  @const\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Synth.defaults = {\n\t        'oscillator': { 'type': 'triangle' },\n\t        'envelope': {\n\t            'attack': 0.005,\n\t            'decay': 0.1,\n\t            'sustain': 0.3,\n\t            'release': 1\n\t        }\n\t    };\n\t    /**\n\t\t *  start the attack portion of the envelope\n\t\t *  @param {Time} [time=now] the time the attack should start\n\t\t *  @param {number} [velocity=1] the velocity of the note (0-1)\n\t\t *  @returns {Tone.Synth} this\n\t\t *  @private\n\t\t */\n\t    Tone.Synth.prototype._triggerEnvelopeAttack = function (time, velocity) {\n\t        //the envelopes\n\t        this.envelope.triggerAttack(time, velocity);\n\t        this.oscillator.start(time);\n\t        //if there is no release portion, stop the oscillator\n\t        if (this.envelope.sustain === 0) {\n\t            this.oscillator.stop(time + this.envelope.attack + this.envelope.decay);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  start the release portion of the envelope\n\t\t *  @param {Time} [time=now] the time the release should start\n\t\t *  @returns {Tone.Synth} this\n\t\t *  @private\n\t\t */\n\t    Tone.Synth.prototype._triggerEnvelopeRelease = function (time) {\n\t        time = this.toSeconds(time);\n\t        this.envelope.triggerRelease(time);\n\t        this.oscillator.stop(time + this.envelope.release);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Synth} this\n\t\t */\n\t    Tone.Synth.prototype.dispose = function () {\n\t        Tone.Monophonic.prototype.dispose.call(this);\n\t        this._writable([\n\t            'oscillator',\n\t            'frequency',\n\t            'detune',\n\t            'envelope'\n\t        ]);\n\t        this.oscillator.dispose();\n\t        this.oscillator = null;\n\t        this.envelope.dispose();\n\t        this.envelope = null;\n\t        this.frequency = null;\n\t        this.detune = null;\n\t        return this;\n\t    };\n\t    return Tone.Synth;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  AMSynth uses the output of one Tone.Synth to modulate the\n\t\t *          amplitude of another Tone.Synth. The harmonicity (the ratio between\n\t\t *          the two signals) affects the timbre of the output signal greatly.\n\t\t *          Read more about Amplitude Modulation Synthesis on\n\t\t *          [SoundOnSound](https://web.archive.org/web/20160404103653/http://www.soundonsound.com:80/sos/mar00/articles/synthsecrets.htm).\n\t\t *          <img src=\"https://docs.google.com/drawings/d/1TQu8Ed4iFr1YTLKpB3U1_hur-UwBrh5gdBXc8BxfGKw/pub?w=1009&h=457\">\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Monophonic}\n\t\t *  @param {Object} [options] the options available for the synth\n\t\t *                            see defaults below\n\t\t *  @example\n\t\t * var synth = new Tone.AMSynth().toMaster();\n\t\t * synth.triggerAttackRelease(\"C4\", \"4n\");\n\t\t */\n\t    Tone.AMSynth = function (options) {\n\t        options = Tone.defaultArg(options, Tone.AMSynth.defaults);\n\t        Tone.Monophonic.call(this, options);\n\t        /**\n\t\t\t *  The carrier voice.\n\t\t\t *  @type {Tone.Synth}\n\t\t\t *  @private\n\t\t\t */\n\t        this._carrier = new Tone.Synth();\n\t        this._carrier.volume.value = -10;\n\t        /**\n\t\t\t *  The carrier's oscillator\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t */\n\t        this.oscillator = this._carrier.oscillator;\n\t        /**\n\t\t\t *  The carrier's envelope\n\t\t\t *  @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t        this.envelope = this._carrier.envelope.set(options.envelope);\n\t        /**\n\t\t\t *  The modulator voice.\n\t\t\t *  @type {Tone.Synth}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulator = new Tone.Synth();\n\t        this._modulator.volume.value = -10;\n\t        /**\n\t\t\t *  The modulator's oscillator which is applied\n\t\t\t *  to the amplitude of the oscillator\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t */\n\t        this.modulation = this._modulator.oscillator.set(options.modulation);\n\t        /**\n\t\t\t *  The modulator's envelope\n\t\t\t *  @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t        this.modulationEnvelope = this._modulator.envelope.set(options.modulationEnvelope);\n\t        /**\n\t\t\t *  The frequency.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(440, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The detune in cents\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t        /**\n\t\t\t *  Harmonicity is the ratio between the two voices. A harmonicity of\n\t\t\t *  1 is no change. Harmonicity = 2 means a change of an octave.\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t *  @example\n\t\t\t * //pitch voice1 an octave below voice0\n\t\t\t * synth.harmonicity.value = 0.5;\n\t\t\t */\n\t        this.harmonicity = new Tone.Multiply(options.harmonicity);\n\t        this.harmonicity.units = Tone.Type.Positive;\n\t        /**\n\t\t\t *  convert the -1,1 output to 0,1\n\t\t\t *  @type {Tone.AudioToGain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulationScale = new Tone.AudioToGain();\n\t        /**\n\t\t\t *  the node where the modulation happens\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulationNode = new Tone.Gain();\n\t        //control the two voices frequency\n\t        this.frequency.connect(this._carrier.frequency);\n\t        this.frequency.chain(this.harmonicity, this._modulator.frequency);\n\t        this.detune.fan(this._carrier.detune, this._modulator.detune);\n\t        this._modulator.chain(this._modulationScale, this._modulationNode.gain);\n\t        this._carrier.chain(this._modulationNode, this.output);\n\t        this._readOnly([\n\t            'frequency',\n\t            'harmonicity',\n\t            'oscillator',\n\t            'envelope',\n\t            'modulation',\n\t            'modulationEnvelope',\n\t            'detune'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.AMSynth, Tone.Monophonic);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.AMSynth.defaults = {\n\t        'harmonicity': 3,\n\t        'detune': 0,\n\t        'oscillator': { 'type': 'sine' },\n\t        'envelope': {\n\t            'attack': 0.01,\n\t            'decay': 0.01,\n\t            'sustain': 1,\n\t            'release': 0.5\n\t        },\n\t        'modulation': { 'type': 'square' },\n\t        'modulationEnvelope': {\n\t            'attack': 0.5,\n\t            'decay': 0,\n\t            'sustain': 1,\n\t            'release': 0.5\n\t        }\n\t    };\n\t    /**\n\t\t *  trigger the attack portion of the note\n\t\t *\n\t\t *  @param  {Time} [time=now] the time the note will occur\n\t\t *  @param {NormalRange} [velocity=1] the velocity of the note\n\t\t *  @private\n\t\t *  @returns {Tone.AMSynth} this\n\t\t */\n\t    Tone.AMSynth.prototype._triggerEnvelopeAttack = function (time, velocity) {\n\t        //the port glide\n\t        time = this.toSeconds(time);\n\t        //the envelopes\n\t        this._carrier._triggerEnvelopeAttack(time, velocity);\n\t        this._modulator._triggerEnvelopeAttack(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  trigger the release portion of the note\n\t\t *\n\t\t *  @param  {Time} [time=now] the time the note will release\n\t\t *  @private\n\t\t *  @returns {Tone.AMSynth} this\n\t\t */\n\t    Tone.AMSynth.prototype._triggerEnvelopeRelease = function (time) {\n\t        this._carrier._triggerEnvelopeRelease(time);\n\t        this._modulator._triggerEnvelopeRelease(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.AMSynth} this\n\t\t */\n\t    Tone.AMSynth.prototype.dispose = function () {\n\t        Tone.Monophonic.prototype.dispose.call(this);\n\t        this._writable([\n\t            'frequency',\n\t            'harmonicity',\n\t            'oscillator',\n\t            'envelope',\n\t            'modulation',\n\t            'modulationEnvelope',\n\t            'detune'\n\t        ]);\n\t        this._carrier.dispose();\n\t        this._carrier = null;\n\t        this._modulator.dispose();\n\t        this._modulator = null;\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        this.detune.dispose();\n\t        this.detune = null;\n\t        this.harmonicity.dispose();\n\t        this.harmonicity = null;\n\t        this._modulationScale.dispose();\n\t        this._modulationScale = null;\n\t        this._modulationNode.dispose();\n\t        this._modulationNode = null;\n\t        this.oscillator = null;\n\t        this.envelope = null;\n\t        this.modulationEnvelope = null;\n\t        this.modulation = null;\n\t        return this;\n\t    };\n\t    return Tone.AMSynth;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.MonoSynth is composed of one oscillator, one filter, and two envelopes.\n\t\t *          The amplitude of the Tone.Oscillator and the cutoff frequency of the\n\t\t *          Tone.Filter are controlled by Tone.Envelopes.\n\t\t *          <img src=\"https://docs.google.com/drawings/d/1gaY1DF9_Hzkodqf8JI1Cg2VZfwSElpFQfI94IQwad38/pub?w=924&h=240\">\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Monophonic}\n\t\t *  @param {Object} [options] the options available for the synth\n\t\t *                          see defaults below\n\t\t *  @example\n\t\t * var synth = new Tone.MonoSynth({\n\t\t * \t\"oscillator\" : {\n\t\t * \t\t\"type\" : \"square\"\n\t\t *  },\n\t\t *  \"envelope\" : {\n\t\t *  \t\"attack\" : 0.1\n\t\t *  }\n\t\t * }).toMaster();\n\t\t * synth.triggerAttackRelease(\"C4\", \"8n\");\n\t\t */\n\t    Tone.MonoSynth = function (options) {\n\t        //get the defaults\n\t        options = Tone.defaultArg(options, Tone.MonoSynth.defaults);\n\t        Tone.Monophonic.call(this, options);\n\t        /**\n\t\t\t *  The oscillator.\n\t\t\t *  @type {Tone.OmniOscillator}\n\t\t\t */\n\t        this.oscillator = new Tone.OmniOscillator(options.oscillator);\n\t        /**\n\t\t\t *  The frequency control.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = this.oscillator.frequency;\n\t        /**\n\t\t\t *  The detune control.\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = this.oscillator.detune;\n\t        /**\n\t\t\t *  The filter.\n\t\t\t *  @type {Tone.Filter}\n\t\t\t */\n\t        this.filter = new Tone.Filter(options.filter);\n\t        /**\n\t\t\t *  The filter envelope.\n\t\t\t *  @type {Tone.FrequencyEnvelope}\n\t\t\t */\n\t        this.filterEnvelope = new Tone.FrequencyEnvelope(options.filterEnvelope);\n\t        /**\n\t\t\t *  The amplitude envelope.\n\t\t\t *  @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t        this.envelope = new Tone.AmplitudeEnvelope(options.envelope);\n\t        //connect the oscillators to the output\n\t        this.oscillator.chain(this.filter, this.envelope, this.output);\n\t        //connect the filter envelope\n\t        this.filterEnvelope.connect(this.filter.frequency);\n\t        this._readOnly([\n\t            'oscillator',\n\t            'frequency',\n\t            'detune',\n\t            'filter',\n\t            'filterEnvelope',\n\t            'envelope'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.MonoSynth, Tone.Monophonic);\n\t    /**\n\t\t *  @const\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.MonoSynth.defaults = {\n\t        'frequency': 'C4',\n\t        'detune': 0,\n\t        'oscillator': { 'type': 'square' },\n\t        'filter': {\n\t            'Q': 6,\n\t            'type': 'lowpass',\n\t            'rolloff': -24\n\t        },\n\t        'envelope': {\n\t            'attack': 0.005,\n\t            'decay': 0.1,\n\t            'sustain': 0.9,\n\t            'release': 1\n\t        },\n\t        'filterEnvelope': {\n\t            'attack': 0.06,\n\t            'decay': 0.2,\n\t            'sustain': 0.5,\n\t            'release': 2,\n\t            'baseFrequency': 200,\n\t            'octaves': 7,\n\t            'exponent': 2\n\t        }\n\t    };\n\t    /**\n\t\t *  start the attack portion of the envelope\n\t\t *  @param {Time} [time=now] the time the attack should start\n\t\t *  @param {NormalRange} [velocity=1] the velocity of the note (0-1)\n\t\t *  @returns {Tone.MonoSynth} this\n\t\t *  @private\n\t\t */\n\t    Tone.MonoSynth.prototype._triggerEnvelopeAttack = function (time, velocity) {\n\t        time = this.toSeconds(time);\n\t        //the envelopes\n\t        this.envelope.triggerAttack(time, velocity);\n\t        this.filterEnvelope.triggerAttack(time);\n\t        this.oscillator.start(time);\n\t        if (this.envelope.sustain === 0) {\n\t            this.oscillator.stop(time + this.envelope.attack + this.envelope.decay);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  start the release portion of the envelope\n\t\t *  @param {Time} [time=now] the time the release should start\n\t\t *  @returns {Tone.MonoSynth} this\n\t\t *  @private\n\t\t */\n\t    Tone.MonoSynth.prototype._triggerEnvelopeRelease = function (time) {\n\t        this.envelope.triggerRelease(time);\n\t        this.filterEnvelope.triggerRelease(time);\n\t        this.oscillator.stop(time + this.envelope.release);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.MonoSynth} this\n\t\t */\n\t    Tone.MonoSynth.prototype.dispose = function () {\n\t        Tone.Monophonic.prototype.dispose.call(this);\n\t        this._writable([\n\t            'oscillator',\n\t            'frequency',\n\t            'detune',\n\t            'filter',\n\t            'filterEnvelope',\n\t            'envelope'\n\t        ]);\n\t        this.oscillator.dispose();\n\t        this.oscillator = null;\n\t        this.envelope.dispose();\n\t        this.envelope = null;\n\t        this.filterEnvelope.dispose();\n\t        this.filterEnvelope = null;\n\t        this.filter.dispose();\n\t        this.filter = null;\n\t        this.frequency = null;\n\t        this.detune = null;\n\t        return this;\n\t    };\n\t    return Tone.MonoSynth;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.DuoSynth is a monophonic synth composed of two\n\t\t *          MonoSynths run in parallel with control over the\n\t\t *          frequency ratio between the two voices and vibrato effect.\n\t\t *          <img src=\"https://docs.google.com/drawings/d/1bL4GXvfRMMlqS7XyBm9CjL9KJPSUKbcdBNpqOlkFLxk/pub?w=1012&h=448\">\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Monophonic}\n\t\t *  @param {Object} [options] the options available for the synth\n\t\t *                          see defaults below\n\t\t *  @example\n\t\t * var duoSynth = new Tone.DuoSynth().toMaster();\n\t\t * duoSynth.triggerAttackRelease(\"C4\", \"2n\");\n\t\t */\n\t    Tone.DuoSynth = function (options) {\n\t        options = Tone.defaultArg(options, Tone.DuoSynth.defaults);\n\t        Tone.Monophonic.call(this, options);\n\t        /**\n\t\t\t *  the first voice\n\t\t\t *  @type {Tone.MonoSynth}\n\t\t\t */\n\t        this.voice0 = new Tone.MonoSynth(options.voice0);\n\t        this.voice0.volume.value = -10;\n\t        /**\n\t\t\t *  the second voice\n\t\t\t *  @type {Tone.MonoSynth}\n\t\t\t */\n\t        this.voice1 = new Tone.MonoSynth(options.voice1);\n\t        this.voice1.volume.value = -10;\n\t        /**\n\t\t\t *  The vibrato LFO.\n\t\t\t *  @type {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._vibrato = new Tone.LFO(options.vibratoRate, -50, 50);\n\t        this._vibrato.start();\n\t        /**\n\t\t\t * the vibrato frequency\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t        this.vibratoRate = this._vibrato.frequency;\n\t        /**\n\t\t\t *  the vibrato gain\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._vibratoGain = new Tone.Gain(options.vibratoAmount, Tone.Type.Positive);\n\t        /**\n\t\t\t * The amount of vibrato\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t */\n\t        this.vibratoAmount = this._vibratoGain.gain;\n\t        /**\n\t\t\t *  the frequency control\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(440, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  Harmonicity is the ratio between the two voices. A harmonicity of\n\t\t\t *  1 is no change. Harmonicity = 2 means a change of an octave.\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t *  @example\n\t\t\t * //pitch voice1 an octave below voice0\n\t\t\t * duoSynth.harmonicity.value = 0.5;\n\t\t\t */\n\t        this.harmonicity = new Tone.Multiply(options.harmonicity);\n\t        this.harmonicity.units = Tone.Type.Positive;\n\t        //control the two voices frequency\n\t        this.frequency.connect(this.voice0.frequency);\n\t        this.frequency.chain(this.harmonicity, this.voice1.frequency);\n\t        this._vibrato.connect(this._vibratoGain);\n\t        this._vibratoGain.fan(this.voice0.detune, this.voice1.detune);\n\t        this.voice0.connect(this.output);\n\t        this.voice1.connect(this.output);\n\t        this._readOnly([\n\t            'voice0',\n\t            'voice1',\n\t            'frequency',\n\t            'vibratoAmount',\n\t            'vibratoRate'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.DuoSynth, Tone.Monophonic);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.DuoSynth.defaults = {\n\t        'vibratoAmount': 0.5,\n\t        'vibratoRate': 5,\n\t        'harmonicity': 1.5,\n\t        'voice0': {\n\t            'volume': -10,\n\t            'portamento': 0,\n\t            'oscillator': { 'type': 'sine' },\n\t            'filterEnvelope': {\n\t                'attack': 0.01,\n\t                'decay': 0,\n\t                'sustain': 1,\n\t                'release': 0.5\n\t            },\n\t            'envelope': {\n\t                'attack': 0.01,\n\t                'decay': 0,\n\t                'sustain': 1,\n\t                'release': 0.5\n\t            }\n\t        },\n\t        'voice1': {\n\t            'volume': -10,\n\t            'portamento': 0,\n\t            'oscillator': { 'type': 'sine' },\n\t            'filterEnvelope': {\n\t                'attack': 0.01,\n\t                'decay': 0,\n\t                'sustain': 1,\n\t                'release': 0.5\n\t            },\n\t            'envelope': {\n\t                'attack': 0.01,\n\t                'decay': 0,\n\t                'sustain': 1,\n\t                'release': 0.5\n\t            }\n\t        }\n\t    };\n\t    /**\n\t\t *  start the attack portion of the envelopes\n\t\t *\n\t\t *  @param {Time} [time=now] the time the attack should start\n\t\t *  @param {NormalRange} [velocity=1] the velocity of the note (0-1)\n\t\t *  @returns {Tone.DuoSynth} this\n\t\t *  @private\n\t\t */\n\t    Tone.DuoSynth.prototype._triggerEnvelopeAttack = function (time, velocity) {\n\t        time = this.toSeconds(time);\n\t        this.voice0._triggerEnvelopeAttack(time, velocity);\n\t        this.voice1._triggerEnvelopeAttack(time, velocity);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  start the release portion of the envelopes\n\t\t *\n\t\t *  @param {Time} [time=now] the time the release should start\n\t\t *  @returns {Tone.DuoSynth} this\n\t\t *  @private\n\t\t */\n\t    Tone.DuoSynth.prototype._triggerEnvelopeRelease = function (time) {\n\t        this.voice0._triggerEnvelopeRelease(time);\n\t        this.voice1._triggerEnvelopeRelease(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Get the level of the output at the given time. Measures\n\t\t *  the envelope(s) value at the time. \n\t\t *  @param {Time} time The time to query the envelope value\n\t\t *  @return {NormalRange} The output level between 0-1\n\t\t */\n\t    Tone.DuoSynth.prototype.getLevelAtTime = function (time) {\n\t        return (this.voice0.getLevelAtTime(time) + this.voice1.getLevelAtTime(time)) / 2;\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.DuoSynth} this\n\t\t */\n\t    Tone.DuoSynth.prototype.dispose = function () {\n\t        Tone.Monophonic.prototype.dispose.call(this);\n\t        this._writable([\n\t            'voice0',\n\t            'voice1',\n\t            'frequency',\n\t            'vibratoAmount',\n\t            'vibratoRate'\n\t        ]);\n\t        this.voice0.dispose();\n\t        this.voice0 = null;\n\t        this.voice1.dispose();\n\t        this.voice1 = null;\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        this._vibratoGain.dispose();\n\t        this._vibratoGain = null;\n\t        this._vibrato = null;\n\t        this.harmonicity.dispose();\n\t        this.harmonicity = null;\n\t        this.vibratoAmount.dispose();\n\t        this.vibratoAmount = null;\n\t        this.vibratoRate = null;\n\t        return this;\n\t    };\n\t    return Tone.DuoSynth;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  FMSynth is composed of two Tone.Synths where one Tone.Synth modulates\n\t\t *          the frequency of a second Tone.Synth. A lot of spectral content\n\t\t *          can be explored using the modulationIndex parameter. Read more about\n\t\t *          frequency modulation synthesis on Sound On Sound: [Part 1](https://web.archive.org/web/20160403123704/http://www.soundonsound.com/sos/apr00/articles/synthsecrets.htm), [Part 2](https://web.archive.org/web/20160403115835/http://www.soundonsound.com/sos/may00/articles/synth.htm).\n\t\t *          <img src=\"https://docs.google.com/drawings/d/1h0PUDZXPgi4Ikx6bVT6oncrYPLluFKy7lj53puxj-DM/pub?w=902&h=462\">\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Monophonic}\n\t\t *  @param {Object} [options] the options available for the synth\n\t\t *                          see defaults below\n\t\t *  @example\n\t\t * var fmSynth = new Tone.FMSynth().toMaster();\n\t\t * fmSynth.triggerAttackRelease(\"C5\", \"4n\");\n\t\t */\n\t    Tone.FMSynth = function (options) {\n\t        options = Tone.defaultArg(options, Tone.FMSynth.defaults);\n\t        Tone.Monophonic.call(this, options);\n\t        /**\n\t\t\t *  The carrier voice.\n\t\t\t *  @type {Tone.Synth}\n\t\t\t *  @private\n\t\t\t */\n\t        this._carrier = new Tone.Synth(options.carrier);\n\t        this._carrier.volume.value = -10;\n\t        /**\n\t\t\t *  The carrier's oscillator\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t */\n\t        this.oscillator = this._carrier.oscillator;\n\t        /**\n\t\t\t *  The carrier's envelope\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t */\n\t        this.envelope = this._carrier.envelope.set(options.envelope);\n\t        /**\n\t\t\t *  The modulator voice.\n\t\t\t *  @type {Tone.Synth}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulator = new Tone.Synth(options.modulator);\n\t        this._modulator.volume.value = -10;\n\t        /**\n\t\t\t *  The modulator's oscillator which is applied\n\t\t\t *  to the amplitude of the oscillator\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t */\n\t        this.modulation = this._modulator.oscillator.set(options.modulation);\n\t        /**\n\t\t\t *  The modulator's envelope\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t */\n\t        this.modulationEnvelope = this._modulator.envelope.set(options.modulationEnvelope);\n\t        /**\n\t\t\t *  The frequency control.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(440, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The detune in cents\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t        /**\n\t\t\t *  Harmonicity is the ratio between the two voices. A harmonicity of\n\t\t\t *  1 is no change. Harmonicity = 2 means a change of an octave.\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t *  @example\n\t\t\t * //pitch voice1 an octave below voice0\n\t\t\t * synth.harmonicity.value = 0.5;\n\t\t\t */\n\t        this.harmonicity = new Tone.Multiply(options.harmonicity);\n\t        this.harmonicity.units = Tone.Type.Positive;\n\t        /**\n\t\t\t *  The modulation index which essentially the depth or amount of the modulation. It is the\n\t\t\t *  ratio of the frequency of the modulating signal (mf) to the amplitude of the\n\t\t\t *  modulating signal (ma) -- as in ma/mf.\n\t\t\t *\t@type {Positive}\n\t\t\t *\t@signal\n\t\t\t */\n\t        this.modulationIndex = new Tone.Multiply(options.modulationIndex);\n\t        this.modulationIndex.units = Tone.Type.Positive;\n\t        /**\n\t\t\t *  the node where the modulation happens\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulationNode = new Tone.Gain(0);\n\t        //control the two voices frequency\n\t        this.frequency.connect(this._carrier.frequency);\n\t        this.frequency.chain(this.harmonicity, this._modulator.frequency);\n\t        this.frequency.chain(this.modulationIndex, this._modulationNode);\n\t        this.detune.fan(this._carrier.detune, this._modulator.detune);\n\t        this._modulator.connect(this._modulationNode.gain);\n\t        this._modulationNode.connect(this._carrier.frequency);\n\t        this._carrier.connect(this.output);\n\t        this._readOnly([\n\t            'frequency',\n\t            'harmonicity',\n\t            'modulationIndex',\n\t            'oscillator',\n\t            'envelope',\n\t            'modulation',\n\t            'modulationEnvelope',\n\t            'detune'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.FMSynth, Tone.Monophonic);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.FMSynth.defaults = {\n\t        'harmonicity': 3,\n\t        'modulationIndex': 10,\n\t        'detune': 0,\n\t        'oscillator': { 'type': 'sine' },\n\t        'envelope': {\n\t            'attack': 0.01,\n\t            'decay': 0.01,\n\t            'sustain': 1,\n\t            'release': 0.5\n\t        },\n\t        'modulation': { 'type': 'square' },\n\t        'modulationEnvelope': {\n\t            'attack': 0.5,\n\t            'decay': 0,\n\t            'sustain': 1,\n\t            'release': 0.5\n\t        }\n\t    };\n\t    /**\n\t\t * \ttrigger the attack portion of the note\n\t\t *\n\t\t *  @param  {Time} [time=now] the time the note will occur\n\t\t *  @param {number} [velocity=1] the velocity of the note\n\t\t *  @returns {Tone.FMSynth} this\n\t\t *  @private\n\t\t */\n\t    Tone.FMSynth.prototype._triggerEnvelopeAttack = function (time, velocity) {\n\t        time = this.toSeconds(time);\n\t        //the envelopes\n\t        this._carrier._triggerEnvelopeAttack(time, velocity);\n\t        this._modulator._triggerEnvelopeAttack(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  trigger the release portion of the note\n\t\t *\n\t\t *  @param  {Time} [time=now] the time the note will release\n\t\t *  @returns {Tone.FMSynth} this\n\t\t *  @private\n\t\t */\n\t    Tone.FMSynth.prototype._triggerEnvelopeRelease = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._carrier._triggerEnvelopeRelease(time);\n\t        this._modulator._triggerEnvelopeRelease(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.FMSynth} this\n\t\t */\n\t    Tone.FMSynth.prototype.dispose = function () {\n\t        Tone.Monophonic.prototype.dispose.call(this);\n\t        this._writable([\n\t            'frequency',\n\t            'harmonicity',\n\t            'modulationIndex',\n\t            'oscillator',\n\t            'envelope',\n\t            'modulation',\n\t            'modulationEnvelope',\n\t            'detune'\n\t        ]);\n\t        this._carrier.dispose();\n\t        this._carrier = null;\n\t        this._modulator.dispose();\n\t        this._modulator = null;\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        this.detune.dispose();\n\t        this.detune = null;\n\t        this.modulationIndex.dispose();\n\t        this.modulationIndex = null;\n\t        this.harmonicity.dispose();\n\t        this.harmonicity = null;\n\t        this._modulationNode.dispose();\n\t        this._modulationNode = null;\n\t        this.oscillator = null;\n\t        this.envelope = null;\n\t        this.modulationEnvelope = null;\n\t        this.modulation = null;\n\t        return this;\n\t    };\n\t    return Tone.FMSynth;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.MembraneSynth makes kick and tom sounds using a single oscillator\n\t\t *          with an amplitude envelope and frequency ramp. A Tone.OmniOscillator\n\t\t *          is routed through a Tone.AmplitudeEnvelope to the output. The drum\n\t\t *          quality of the sound comes from the frequency envelope applied\n\t\t *          during Tone.MembraneSynth.triggerAttack(note). The frequency envelope\n\t\t *          starts at <code>note * .octaves</code> and ramps to <code>note</code>\n\t\t *          over the duration of <code>.pitchDecay</code>.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Instrument}\n\t\t *  @param {Object} [options] the options available for the synth\n\t\t *                          see defaults below\n\t\t *  @example\n\t\t * var synth = new Tone.MembraneSynth().toMaster();\n\t\t * synth.triggerAttackRelease(\"C2\", \"8n\");\n\t\t */\n\t    Tone.MembraneSynth = function (options) {\n\t        options = Tone.defaultArg(options, Tone.MembraneSynth.defaults);\n\t        Tone.Instrument.call(this, options);\n\t        /**\n\t\t\t *  The oscillator.\n\t\t\t *  @type {Tone.OmniOscillator}\n\t\t\t */\n\t        this.oscillator = new Tone.OmniOscillator(options.oscillator);\n\t        /**\n\t\t\t *  The amplitude envelope.\n\t\t\t *  @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t        this.envelope = new Tone.AmplitudeEnvelope(options.envelope);\n\t        /**\n\t\t\t *  The number of octaves the pitch envelope ramps.\n\t\t\t *  @type {Positive}\n\t\t\t */\n\t        this.octaves = options.octaves;\n\t        /**\n\t\t\t *  The amount of time the frequency envelope takes.\n\t\t\t *  @type {Time}\n\t\t\t */\n\t        this.pitchDecay = options.pitchDecay;\n\t        this.oscillator.chain(this.envelope, this.output);\n\t        this._readOnly([\n\t            'oscillator',\n\t            'envelope'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.MembraneSynth, Tone.Instrument);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.MembraneSynth.defaults = {\n\t        'pitchDecay': 0.05,\n\t        'octaves': 10,\n\t        'oscillator': { 'type': 'sine' },\n\t        'envelope': {\n\t            'attack': 0.001,\n\t            'decay': 0.4,\n\t            'sustain': 0.01,\n\t            'release': 1.4,\n\t            'attackCurve': 'exponential'\n\t        }\n\t    };\n\t    /**\n\t\t *  Trigger the note at the given time with the given velocity.\n\t\t *\n\t\t *  @param  {Frequency} note     the note\n\t\t *  @param  {Time} [time=now]     the time, if not given is now\n\t\t *  @param  {number} [velocity=1] velocity defaults to 1\n\t\t *  @returns {Tone.MembraneSynth} this\n\t\t *  @example\n\t\t *  kick.triggerAttack(60);\n\t\t */\n\t    Tone.MembraneSynth.prototype.triggerAttack = function (note, time, velocity) {\n\t        time = this.toSeconds(time);\n\t        note = this.toFrequency(note);\n\t        var maxNote = note * this.octaves;\n\t        this.oscillator.frequency.setValueAtTime(maxNote, time);\n\t        this.oscillator.frequency.exponentialRampToValueAtTime(note, time + this.toSeconds(this.pitchDecay));\n\t        this.envelope.triggerAttack(time, velocity);\n\t        this.oscillator.start(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Trigger the release portion of the note.\n\t\t *\n\t\t *  @param  {Time} [time=now] the time the note will release\n\t\t *  @returns {Tone.MembraneSynth} this\n\t\t */\n\t    Tone.MembraneSynth.prototype.triggerRelease = function (time) {\n\t        time = this.toSeconds(time);\n\t        this.envelope.triggerRelease(time);\n\t        this.oscillator.stop(time + this.envelope.release);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.MembraneSynth} this\n\t\t */\n\t    Tone.MembraneSynth.prototype.dispose = function () {\n\t        Tone.Instrument.prototype.dispose.call(this);\n\t        this._writable([\n\t            'oscillator',\n\t            'envelope'\n\t        ]);\n\t        this.oscillator.dispose();\n\t        this.oscillator = null;\n\t        this.envelope.dispose();\n\t        this.envelope = null;\n\t        return this;\n\t    };\n\t    return Tone.MembraneSynth;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  Inharmonic ratio of frequencies based on the Roland TR-808\n\t\t *  Taken from https://ccrma.stanford.edu/papers/tr-808-cymbal-physically-informed-circuit-bendable-digital-model\n\t\t *  @private\n\t\t *  @static\n\t\t *  @type {Array}\n\t\t */\n\t    var inharmRatios = [\n\t        1,\n\t        1.483,\n\t        1.932,\n\t        2.546,\n\t        2.63,\n\t        3.897\n\t    ];\n\t    /**\n\t\t *  @class  A highly inharmonic and spectrally complex source with a highpass filter\n\t\t *          and amplitude envelope which is good for making metalophone sounds. Based\n\t\t *          on CymbalSynth by [@polyrhythmatic](https://github.com/polyrhythmatic).\n\t\t *          Inspiration from [Sound on Sound](https://web.archive.org/web/20160610143924/https://www.soundonsound.com/sos/jul02/articles/synthsecrets0702.asp).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Instrument}\n\t\t *  @param {Object} [options] The options availble for the synth\n\t\t *                             see defaults below\n\t\t */\n\t    Tone.MetalSynth = function (options) {\n\t        options = Tone.defaultArg(options, Tone.MetalSynth.defaults);\n\t        Tone.Instrument.call(this, options);\n\t        /**\n\t\t\t *  The frequency of the cymbal\n\t\t\t *  @type  {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The array of FMOscillators\n\t\t\t *  @type  {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._oscillators = [];\n\t        /**\n\t\t\t *  The frequency multipliers\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._freqMultipliers = [];\n\t        /**\n\t\t\t *  The amplitude for the body\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._amplitue = new Tone.Gain(0).connect(this.output);\n\t        /**\n\t\t\t *  highpass the output\n\t\t\t *  @type {Tone.Filter}\n\t\t\t *  @private\n\t\t\t */\n\t        this._highpass = new Tone.Filter({\n\t            'type': 'highpass',\n\t            'Q': -3.0102999566398125\n\t        }).connect(this._amplitue);\n\t        /**\n\t\t\t *  The number of octaves the highpass\n\t\t\t *  filter frequency ramps\n\t\t\t *  @type {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._octaves = options.octaves;\n\t        /**\n\t\t\t *  Scale the body envelope\n\t\t\t *  for the bandpass\n\t\t\t *  @type {Tone.Scale}\n\t\t\t *  @private\n\t\t\t */\n\t        this._filterFreqScaler = new Tone.Scale(options.resonance, 7000);\n\t        /**\n\t\t\t *  The envelope which is connected both to the\n\t\t\t *  amplitude and highpass filter's cutoff frequency\n\t\t\t *  @type  {Tone.Envelope}\n\t\t\t */\n\t        this.envelope = new Tone.Envelope({\n\t            'attack': options.envelope.attack,\n\t            'attackCurve': 'linear',\n\t            'decay': options.envelope.decay,\n\t            'sustain': 0,\n\t            'release': options.envelope.release\n\t        }).chain(this._filterFreqScaler, this._highpass.frequency);\n\t        this.envelope.connect(this._amplitue.gain);\n\t        for (var i = 0; i < inharmRatios.length; i++) {\n\t            var osc = new Tone.FMOscillator({\n\t                'type': 'square',\n\t                'modulationType': 'square',\n\t                'harmonicity': options.harmonicity,\n\t                'modulationIndex': options.modulationIndex\n\t            });\n\t            osc.connect(this._highpass);\n\t            this._oscillators[i] = osc;\n\t            var mult = new Tone.Multiply(inharmRatios[i]);\n\t            this._freqMultipliers[i] = mult;\n\t            this.frequency.chain(mult, osc.frequency);\n\t        }\n\t        //set the octaves\n\t        this.octaves = options.octaves;\n\t    };\n\t    Tone.extend(Tone.MetalSynth, Tone.Instrument);\n\t    /**\n\t\t *  default values\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.MetalSynth.defaults = {\n\t        'frequency': 200,\n\t        'envelope': {\n\t            'attack': 0.001,\n\t            'decay': 1.4,\n\t            'release': 0.2\n\t        },\n\t        'harmonicity': 5.1,\n\t        'modulationIndex': 32,\n\t        'resonance': 4000,\n\t        'octaves': 1.5\n\t    };\n\t    /**\n\t\t *  Trigger the attack.\n\t\t *  @param  {Time}  time      When the attack should be triggered.\n\t\t *  @param  {NormalRange}  [velocity=1]  The velocity that the envelope should be triggered at.\n\t\t *  @return  {Tone.MetalSynth}  this\n\t\t */\n\t    Tone.MetalSynth.prototype.triggerAttack = function (time, vel) {\n\t        time = this.toSeconds(time);\n\t        vel = Tone.defaultArg(vel, 1);\n\t        this.envelope.triggerAttack(time, vel);\n\t        this._oscillators.forEach(function (osc) {\n\t            osc.start(time);\n\t        });\n\t        //if the sustain is 0, stop the oscillator as well\n\t        if (this.envelope.sustain === 0) {\n\t            this._oscillators.forEach(function (osc) {\n\t                osc.stop(time + this.envelope.attack + this.envelope.decay);\n\t            }.bind(this));\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Trigger the release of the envelope.\n\t\t *  @param  {Time}  time      When the release should be triggered.\n\t\t *  @return  {Tone.MetalSynth}  this\n\t\t */\n\t    Tone.MetalSynth.prototype.triggerRelease = function (time) {\n\t        time = this.toSeconds(time);\n\t        this.envelope.triggerRelease(time);\n\t        this._oscillators.forEach(function (osc) {\n\t            osc.stop(time + this.envelope.release);\n\t        }.bind(this));\n\t        return this;\n\t    };\n\t    /**\n\t\t * Sync the instrument to the Transport. All subsequent calls of\n\t\t * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n\t\t * will be scheduled along the transport.\n\t\t * @example\n\t\t * synth.sync()\n\t\t * //schedule 3 notes when the transport first starts\n\t\t * synth.triggerAttackRelease('8n', 0)\n\t\t * synth.triggerAttackRelease('8n', '8n')\n\t\t * synth.triggerAttackRelease('8n', '4n')\n\t\t * //start the transport to hear the notes\n\t\t * Transport.start()\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t    Tone.MetalSynth.prototype.sync = function () {\n\t        this._syncMethod('triggerAttack', 0);\n\t        this._syncMethod('triggerRelease', 0);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Trigger the attack and release of the envelope after the given\n\t\t *  duration.\n\t\t *  @param  {Time}  duration  The duration before triggering the release\n\t\t *  @param  {Time}  time      When the attack should be triggered.\n\t\t *  @param  {NormalRange}  [velocity=1]  The velocity that the envelope should be triggered at.\n\t\t *  @return  {Tone.MetalSynth}  this\n\t\t */\n\t    Tone.MetalSynth.prototype.triggerAttackRelease = function (duration, time, velocity) {\n\t        time = this.toSeconds(time);\n\t        duration = this.toSeconds(duration);\n\t        this.triggerAttack(time, velocity);\n\t        this.triggerRelease(time + duration);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  The modulationIndex of the oscillators which make up the source.\n\t\t *  see Tone.FMOscillator.modulationIndex\n\t\t *  @memberOf Tone.MetalSynth#\n\t\t *  @type {Positive}\n\t\t *  @name  modulationIndex\n\t\t */\n\t    Object.defineProperty(Tone.MetalSynth.prototype, 'modulationIndex', {\n\t        get: function () {\n\t            return this._oscillators[0].modulationIndex.value;\n\t        },\n\t        set: function (val) {\n\t            for (var i = 0; i < this._oscillators.length; i++) {\n\t                this._oscillators[i].modulationIndex.value = val;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  The harmonicity of the oscillators which make up the source.\n\t\t *  see Tone.FMOscillator.harmonicity\n\t\t *  @memberOf Tone.MetalSynth#\n\t\t *  @type {Positive}\n\t\t *  @name  harmonicity\n\t\t */\n\t    Object.defineProperty(Tone.MetalSynth.prototype, 'harmonicity', {\n\t        get: function () {\n\t            return this._oscillators[0].harmonicity.value;\n\t        },\n\t        set: function (val) {\n\t            for (var i = 0; i < this._oscillators.length; i++) {\n\t                this._oscillators[i].harmonicity.value = val;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  The frequency of the highpass filter attached to the envelope\n\t\t *  @memberOf Tone.MetalSynth#\n\t\t *  @type {Frequency}\n\t\t *  @name  resonance\n\t\t */\n\t    Object.defineProperty(Tone.MetalSynth.prototype, 'resonance', {\n\t        get: function () {\n\t            return this._filterFreqScaler.min;\n\t        },\n\t        set: function (val) {\n\t            this._filterFreqScaler.min = val;\n\t            this.octaves = this._octaves;\n\t        }\n\t    });\n\t    /**\n\t\t *  The number of octaves above the \"resonance\" frequency\n\t\t *  that the filter ramps during the attack/decay envelope\n\t\t *  @memberOf Tone.MetalSynth#\n\t\t *  @type {Number}\n\t\t *  @name  octaves\n\t\t */\n\t    Object.defineProperty(Tone.MetalSynth.prototype, 'octaves', {\n\t        get: function () {\n\t            return this._octaves;\n\t        },\n\t        set: function (octs) {\n\t            this._octaves = octs;\n\t            this._filterFreqScaler.max = this._filterFreqScaler.min * Math.pow(2, octs);\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up\n\t\t *  @returns {Tone.MetalSynth} this\n\t\t */\n\t    Tone.MetalSynth.prototype.dispose = function () {\n\t        Tone.Instrument.prototype.dispose.call(this);\n\t        for (var i = 0; i < this._oscillators.length; i++) {\n\t            this._oscillators[i].dispose();\n\t            this._freqMultipliers[i].dispose();\n\t        }\n\t        this._oscillators = null;\n\t        this._freqMultipliers = null;\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        this._filterFreqScaler.dispose();\n\t        this._filterFreqScaler = null;\n\t        this._amplitue.dispose();\n\t        this._amplitue = null;\n\t        this.envelope.dispose();\n\t        this.envelope = null;\n\t        this._highpass.dispose();\n\t        this._highpass = null;\n\t    };\n\t    return Tone.MetalSynth;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.NoiseSynth is composed of a noise generator (Tone.Noise), one filter (Tone.Filter),\n\t\t *          and two envelopes (Tone.Envelop). One envelope controls the amplitude\n\t\t *          of the noise and the other is controls the cutoff frequency of the filter.\n\t\t *          <img src=\"https://docs.google.com/drawings/d/1rqzuX9rBlhT50MRvD2TKml9bnZhcZmzXF1rf_o7vdnE/pub?w=918&h=242\">\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Instrument}\n\t\t *  @param {Object} [options] the options available for the synth\n\t\t *                          see defaults below\n\t\t * @example\n\t\t * var noiseSynth = new Tone.NoiseSynth().toMaster();\n\t\t * noiseSynth.triggerAttackRelease(\"8n\");\n\t\t */\n\t    Tone.NoiseSynth = function (options) {\n\t        //get the defaults\n\t        options = Tone.defaultArg(options, Tone.NoiseSynth.defaults);\n\t        Tone.Instrument.call(this, options);\n\t        /**\n\t\t\t *  The noise source.\n\t\t\t *  @type {Tone.Noise}\n\t\t\t *  @example\n\t\t\t * noiseSynth.set(\"noise.type\", \"brown\");\n\t\t\t */\n\t        this.noise = new Tone.Noise();\n\t        /**\n\t\t\t *  The amplitude envelope.\n\t\t\t *  @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t        this.envelope = new Tone.AmplitudeEnvelope(options.envelope);\n\t        //connect the noise to the output\n\t        this.noise.chain(this.envelope, this.output);\n\t        this._readOnly([\n\t            'noise',\n\t            'envelope'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.NoiseSynth, Tone.Instrument);\n\t    /**\n\t\t *  @const\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.NoiseSynth.defaults = {\n\t        'noise': { 'type': 'white' },\n\t        'envelope': {\n\t            'attack': 0.005,\n\t            'decay': 0.1,\n\t            'sustain': 0\n\t        }\n\t    };\n\t    /**\n\t\t *  Start the attack portion of the envelopes. Unlike other\n\t\t *  instruments, Tone.NoiseSynth doesn't have a note.\n\t\t *  @param {Time} [time=now] the time the attack should start\n\t\t *  @param {number} [velocity=1] the velocity of the note (0-1)\n\t\t *  @returns {Tone.NoiseSynth} this\n\t\t *  @example\n\t\t * noiseSynth.triggerAttack();\n\t\t */\n\t    Tone.NoiseSynth.prototype.triggerAttack = function (time, velocity) {\n\t        //the envelopes\n\t        this.envelope.triggerAttack(time, velocity);\n\t        //start the noise\n\t        this.noise.start(time);\n\t        if (this.envelope.sustain === 0) {\n\t            this.noise.stop(time = this.envelope.attack + this.envelope.decay);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Start the release portion of the envelopes.\n\t\t *  @param {Time} [time=now] the time the release should start\n\t\t *  @returns {Tone.NoiseSynth} this\n\t\t */\n\t    Tone.NoiseSynth.prototype.triggerRelease = function (time) {\n\t        this.envelope.triggerRelease(time);\n\t        this.noise.stop(time + this.envelope.release);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Sync the instrument to the Transport. All subsequent calls of\n\t\t * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n\t\t * will be scheduled along the transport.\n\t\t * @example\n\t\t * synth.sync()\n\t\t * //schedule 3 notes when the transport first starts\n\t\t * synth.triggerAttackRelease('8n', 0)\n\t\t * synth.triggerAttackRelease('8n', '8n')\n\t\t * synth.triggerAttackRelease('8n', '4n')\n\t\t * //start the transport to hear the notes\n\t\t * Transport.start()\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t    Tone.NoiseSynth.prototype.sync = function () {\n\t        this._syncMethod('triggerAttack', 0);\n\t        this._syncMethod('triggerRelease', 0);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Trigger the attack and then the release.\n\t\t *  @param  {Time} duration the duration of the note\n\t\t *  @param  {Time} [time=now]     the time of the attack\n\t\t *  @param  {number} [velocity=1] the velocity\n\t\t *  @returns {Tone.NoiseSynth} this\n\t\t */\n\t    Tone.NoiseSynth.prototype.triggerAttackRelease = function (duration, time, velocity) {\n\t        time = this.toSeconds(time);\n\t        duration = this.toSeconds(duration);\n\t        this.triggerAttack(time, velocity);\n\t        this.triggerRelease(time + duration);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.NoiseSynth} this\n\t\t */\n\t    Tone.NoiseSynth.prototype.dispose = function () {\n\t        Tone.Instrument.prototype.dispose.call(this);\n\t        this._writable([\n\t            'noise',\n\t            'envelope'\n\t        ]);\n\t        this.noise.dispose();\n\t        this.noise = null;\n\t        this.envelope.dispose();\n\t        this.envelope = null;\n\t        return this;\n\t    };\n\t    return Tone.NoiseSynth;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Karplus-String string synthesis. Often out of tune.\n\t\t *         Will change when the AudioWorkerNode is available across\n\t\t *         browsers.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Instrument}\n\t\t *  @param {Object} [options] see the defaults\n\t\t *  @example\n\t\t * var plucky = new Tone.PluckSynth().toMaster();\n\t\t * plucky.triggerAttack(\"C4\");\n\t\t */\n\t    Tone.PluckSynth = function (options) {\n\t        options = Tone.defaultArg(options, Tone.PluckSynth.defaults);\n\t        Tone.Instrument.call(this, options);\n\t        /**\n\t\t\t *  @type {Tone.Noise}\n\t\t\t *  @private\n\t\t\t */\n\t        this._noise = new Tone.Noise('pink');\n\t        /**\n\t\t\t *  The amount of noise at the attack.\n\t\t\t *  Nominal range of [0.1, 20]\n\t\t\t *  @type {number}\n\t\t\t */\n\t        this.attackNoise = options.attackNoise;\n\t        /**\n\t\t\t *  the LFCF\n\t\t\t *  @type {Tone.LowpassCombFilter}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfcf = new Tone.LowpassCombFilter({\n\t            'resonance': options.resonance,\n\t            'dampening': options.dampening\n\t        });\n\t        /**\n\t\t\t *  The resonance control.\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.resonance = this._lfcf.resonance;\n\t        /**\n\t\t\t *  The dampening control. i.e. the lowpass filter frequency of the comb filter\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.dampening = this._lfcf.dampening;\n\t        //connections\n\t        this._noise.connect(this._lfcf);\n\t        this._lfcf.connect(this.output);\n\t        this._readOnly([\n\t            'resonance',\n\t            'dampening'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.PluckSynth, Tone.Instrument);\n\t    /**\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.PluckSynth.defaults = {\n\t        'attackNoise': 1,\n\t        'dampening': 4000,\n\t        'resonance': 0.7\n\t    };\n\t    /**\n\t\t *  Trigger the note.\n\t\t *  @param {Frequency} note The note to trigger.\n\t\t *  @param {Time} [time=now] When the note should be triggered.\n\t\t *  @returns {Tone.PluckSynth} this\n\t\t */\n\t    Tone.PluckSynth.prototype.triggerAttack = function (note, time) {\n\t        note = this.toFrequency(note);\n\t        time = this.toSeconds(time);\n\t        var delayAmount = 1 / note;\n\t        this._lfcf.delayTime.setValueAtTime(delayAmount, time);\n\t        this._noise.start(time);\n\t        this._noise.stop(time + delayAmount * this.attackNoise);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.PluckSynth} this\n\t\t */\n\t    Tone.PluckSynth.prototype.dispose = function () {\n\t        Tone.Instrument.prototype.dispose.call(this);\n\t        this._noise.dispose();\n\t        this._lfcf.dispose();\n\t        this._noise = null;\n\t        this._lfcf = null;\n\t        this._writable([\n\t            'resonance',\n\t            'dampening'\n\t        ]);\n\t        this.dampening = null;\n\t        this.resonance = null;\n\t        return this;\n\t    };\n\t    return Tone.PluckSynth;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.PolySynth handles voice creation and allocation for any\n\t\t *          instruments passed in as the second paramter. PolySynth is\n\t\t *          not a synthesizer by itself, it merely manages voices of\n\t\t *          one of the other types of synths, allowing any of the\n\t\t *          monophonic synthesizers to be polyphonic.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Instrument}\n\t\t *  @param {number|Object} [polyphony=4] The number of voices to create\n\t\t *  @param {function} [voice=Tone.Synth] The constructor of the voices\n\t\t *                                            uses Tone.Synth by default.\n\t\t *  @example\n\t\t * //a polysynth composed of 6 Voices of Synth\n\t\t * var synth = new Tone.PolySynth(6, Tone.Synth).toMaster();\n\t\t * //set the attributes using the set interface\n\t\t * synth.set(\"detune\", -1200);\n\t\t * //play a chord\n\t\t * synth.triggerAttackRelease([\"C4\", \"E4\", \"A4\"], \"4n\");\n\t\t */\n\t    Tone.PolySynth = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'polyphony',\n\t            'voice'\n\t        ], Tone.PolySynth);\n\t        Tone.Instrument.call(this, options);\n\t        options = Tone.defaultArg(options, Tone.Instrument.defaults);\n\t        //max polyphony\n\t        options.polyphony = Math.min(Tone.PolySynth.MAX_POLYPHONY, options.polyphony);\n\t        /**\n\t\t\t *  the array of voices\n\t\t\t *  @type {Array}\n\t\t\t */\n\t        this.voices = new Array(options.polyphony);\n\t        /**\n\t\t\t *  The queue of voices with data about last trigger\n\t\t\t *  and the triggered note\n\t\t\t *  @private\n\t\t\t *  @type {Array}\n\t\t\t */\n\t        this._triggers = new Array(options.polyphony);\n\t        /**\n\t\t\t *  The detune in cents\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t        this._readOnly('detune');\n\t        //create the voices\n\t        for (var i = 0; i < options.polyphony; i++) {\n\t            var v = new options.voice(arguments[2], arguments[3]);\n\t            if (!(v instanceof Tone.Monophonic)) {\n\t                throw new Error('Synth constructor must be instance of Tone.Monophonic');\n\t            }\n\t            this.voices[i] = v;\n\t            v.connect(this.output);\n\t            if (v.hasOwnProperty('detune')) {\n\t                this.detune.connect(v.detune);\n\t            }\n\t            this._triggers[i] = {\n\t                release: -1,\n\t                note: null,\n\t                voice: v\n\t            };\n\t        }\n\t    };\n\t    Tone.extend(Tone.PolySynth, Tone.Instrument);\n\t    /**\n\t\t *  the defaults\n\t\t *  @const\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.PolySynth.defaults = {\n\t        'polyphony': 4,\n\t        'volume': 0,\n\t        'detune': 0,\n\t        'voice': Tone.Synth\n\t    };\n\t    /**\n\t\t *  Trigger the attack portion of the note\n\t\t *  @param  {Frequency|Array} notes The notes to play. Accepts a single\n\t\t *                                  Frequency or an array of frequencies.\n\t\t *  @param  {Time} [time=now]  The start time of the note.\n\t\t *  @param {number} [velocity=1] The velocity of the note.\n\t\t *  @returns {Tone.PolySynth} this\n\t\t *  @example\n\t\t * //trigger a chord immediately with a velocity of 0.2\n\t\t * poly.triggerAttack([\"Ab3\", \"C4\", \"F5\"], undefined, 0.2);\n\t\t */\n\t    Tone.PolySynth.prototype.triggerAttack = function (notes, time, velocity) {\n\t        if (!Array.isArray(notes)) {\n\t            notes = [notes];\n\t        }\n\t        time = this.toSeconds(time);\n\t        for (var i = 0; i < notes.length; i++) {\n\t            var val = notes[i];\n\t            //trigger the oldest voice\n\t            var oldest = this._triggers[0];\n\t            for (var j = 1; j < this._triggers.length; j++) {\n\t                if (this._triggers[j].release < oldest.release) {\n\t                    oldest = this._triggers[j];\n\t                }\n\t            }\n\t            oldest.release = Infinity;\n\t            oldest.note = JSON.stringify(val);\n\t            oldest.voice.triggerAttack(val, time, velocity);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Trigger the attack and release after the specified duration\n\t\t *\n\t\t *  @param  {Frequency|Array} notes The notes to play. Accepts a single\n\t\t *                                  Frequency or an array of frequencies.\n\t\t *  @param  {Time} duration the duration of the note\n\t\t *  @param  {Time} [time=now]     if no time is given, defaults to now\n\t\t *  @param  {number} [velocity=1] the velocity of the attack (0-1)\n\t\t *  @returns {Tone.PolySynth} this\n\t\t *  @example\n\t\t * //trigger a chord for a duration of a half note\n\t\t * poly.triggerAttackRelease([\"Eb3\", \"G4\", \"C5\"], \"2n\");\n\t\t *  @example\n\t\t * //can pass in an array of durations as well\n\t\t * poly.triggerAttackRelease([\"Eb3\", \"G4\", \"C5\"], [\"2n\", \"4n\", \"4n\"]);\n\t\t */\n\t    Tone.PolySynth.prototype.triggerAttackRelease = function (notes, duration, time, velocity) {\n\t        time = this.toSeconds(time);\n\t        this.triggerAttack(notes, time, velocity);\n\t        if (Tone.isArray(duration) && Tone.isArray(notes)) {\n\t            for (var i = 0; i < notes.length; i++) {\n\t                var d = duration[Math.min(i, duration.length - 1)];\n\t                this.triggerRelease(notes[i], time + this.toSeconds(d));\n\t            }\n\t        } else {\n\t            this.triggerRelease(notes, time + this.toSeconds(duration));\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Trigger the release of the note. Unlike monophonic instruments,\n\t\t *  a note (or array of notes) needs to be passed in as the first argument.\n\t\t *  @param  {Frequency|Array} notes The notes to play. Accepts a single\n\t\t *                                  Frequency or an array of frequencies.\n\t\t *  @param  {Time} [time=now]  When the release will be triggered.\n\t\t *  @returns {Tone.PolySynth} this\n\t\t *  @example\n\t\t * poly.triggerRelease([\"Ab3\", \"C4\", \"F5\"], \"+2n\");\n\t\t */\n\t    Tone.PolySynth.prototype.triggerRelease = function (notes, time) {\n\t        if (!Array.isArray(notes)) {\n\t            notes = [notes];\n\t        }\n\t        time = this.toSeconds(time);\n\t        for (var i = 0; i < notes.length; i++) {\n\t            //get the voice\n\t            var stringified = JSON.stringify(notes[i]);\n\t            for (var v = 0; v < this._triggers.length; v++) {\n\t                var desc = this._triggers[v];\n\t                if (desc.note === stringified && desc.release > time) {\n\t                    desc.voice.triggerRelease(time);\n\t                    desc.release = time;\n\t                }\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * Sync the instrument to the Transport. All subsequent calls of\n\t\t * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n\t\t * will be scheduled along the transport.\n\t\t * @example\n\t\t * synth.sync()\n\t\t * //schedule 3 notes when the transport first starts\n\t\t * synth.triggerAttackRelease('8n', 0)\n\t\t * synth.triggerAttackRelease('8n', '8n')\n\t\t * synth.triggerAttackRelease('8n', '4n')\n\t\t * //start the transport to hear the notes\n\t\t * Transport.start()\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t    Tone.PolySynth.prototype.sync = function () {\n\t        this._syncMethod('triggerAttack', 1);\n\t        this._syncMethod('triggerRelease', 1);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Set a member/attribute of the voices.\n\t\t *  @param {Object|string} params\n\t\t *  @param {number=} value\n\t\t *  @param {Time=} rampTime\n\t\t *  @returns {Tone.PolySynth} this\n\t\t *  @example\n\t\t * poly.set({\n\t\t * \t\"filter\" : {\n\t\t * \t\t\"type\" : \"highpass\"\n\t\t * \t},\n\t\t * \t\"envelope\" : {\n\t\t * \t\t\"attack\" : 0.25\n\t\t * \t}\n\t\t * });\n\t\t */\n\t    Tone.PolySynth.prototype.set = function (params, value, rampTime) {\n\t        for (var i = 0; i < this.voices.length; i++) {\n\t            this.voices[i].set(params, value, rampTime);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Get the synth's attributes. Given no arguments get\n\t\t *  will return all available object properties and their corresponding\n\t\t *  values. Pass in a single attribute to retrieve or an array\n\t\t *  of attributes. The attribute strings can also include a \".\"\n\t\t *  to access deeper properties.\n\t\t *  @param {Array=} params the parameters to get, otherwise will return\n\t\t *  \t\t\t\t\t   all available.\n\t\t */\n\t    Tone.PolySynth.prototype.get = function (params) {\n\t        return this.voices[0].get(params);\n\t    };\n\t    /**\n\t\t *  Trigger the release portion of all the currently active voices.\n\t\t *  @param {Time} [time=now] When the notes should be released.\n\t\t *  @return {Tone.PolySynth} this\n\t\t */\n\t    Tone.PolySynth.prototype.releaseAll = function (time) {\n\t        time = this.toSeconds(time);\n\t        for (var i = 0; i < this._triggers.length; i++) {\n\t            var desc = this._triggers[i];\n\t            if (desc.release > time) {\n\t                desc.release = time;\n\t                desc.voice.triggerRelease(time);\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.PolySynth} this\n\t\t */\n\t    Tone.PolySynth.prototype.dispose = function () {\n\t        Tone.Instrument.prototype.dispose.call(this);\n\t        for (var i = 0; i < this.voices.length; i++) {\n\t            this.voices[i].dispose();\n\t            this.voices[i] = null;\n\t        }\n\t        this._writable('detune');\n\t        this.detune.dispose();\n\t        this.detune = null;\n\t        this.voices = null;\n\t        this._triggers = null;\n\t        return this;\n\t    };\n\t    /**\n\t\t *  The maximum number of notes that can be allocated\n\t\t *  to a polysynth.\n\t\t *  @type  {Number}\n\t\t *  @static\n\t\t */\n\t    Tone.PolySynth.MAX_POLYPHONY = 20;\n\t    return Tone.PolySynth;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t * @class Automatically interpolates between a set of pitched samples. Pass in an object which maps the note's pitch or midi value to the url, then you can trigger the attack and release of that note like other instruments. By automatically repitching the samples, it is possible to play pitches which were not explicitly included which can save loading time.\n\t\t *        For sample or buffer playback where repitching is not necessary, use [Tone.Player](https://tonejs.github.io/docs/Player).\n\t\t * @param {Object} samples An object of samples mapping either Midi\n\t\t *                         Note Numbers or Scientific Pitch Notation\n\t\t *                         to the url of that sample.\n\t\t * @param {Function=} onload The callback to invoke when all of the samples are loaded.\n\t\t * @param {String=} baseUrl The root URL of all of the samples, which is prepended to all the URLs.\n\t\t * @example\n\t\t * var sampler = new Tone.Sampler({\n\t\t * \t\"C3\" : \"path/to/C3.mp3\",\n\t\t * \t\"D#3\" : \"path/to/Dsharp3.mp3\",\n\t\t * \t\"F#3\" : \"path/to/Fsharp3.mp3\",\n\t\t * \t\"A3\" : \"path/to/A3.mp3\",\n\t\t * }, function(){\n\t\t * \t//sampler will repitch the closest sample\n\t\t * \tsampler.triggerAttack(\"D3\")\n\t\t * })\n\t\t * @extends {Tone.Instrument}\n\t\t */\n\t    Tone.Sampler = function (urls) {\n\t        // shift arguments over one. Those are the remainder of the options\n\t        var args = Array.prototype.slice.call(arguments);\n\t        args.shift();\n\t        var options = Tone.defaults(args, [\n\t            'onload',\n\t            'baseUrl'\n\t        ], Tone.Sampler);\n\t        Tone.Instrument.call(this, options);\n\t        var urlMap = {};\n\t        for (var note in urls) {\n\t            if (Tone.isNote(note)) {\n\t                //convert the note name to MIDI\n\t                var mid = Tone.Frequency(note).toMidi();\n\t                urlMap[mid] = urls[note];\n\t            } else if (!isNaN(parseFloat(note))) {\n\t                //otherwise if it's numbers assume it's midi\n\t                urlMap[note] = urls[note];\n\t            } else {\n\t                throw new Error('Tone.Sampler: url keys must be the note\\'s pitch');\n\t            }\n\t        }\n\t        /**\n\t\t\t * The stored and loaded buffers\n\t\t\t * @type {Tone.Buffers}\n\t\t\t * @private\n\t\t\t */\n\t        this._buffers = new Tone.Buffers(urlMap, options.onload, options.baseUrl);\n\t        /**\n\t\t\t * The object of all currently playing BufferSources\n\t\t\t * @type {Object}\n\t\t\t * @private\n\t\t\t */\n\t        this._activeSources = {};\n\t        /**\n\t\t\t * The envelope applied to the beginning of the sample.\n\t\t\t * @type {Time}\n\t\t\t */\n\t        this.attack = options.attack;\n\t        /**\n\t\t\t * The envelope applied to the end of the envelope.\n\t\t\t * @type {Time}\n\t\t\t */\n\t        this.release = options.release;\n\t    };\n\t    Tone.extend(Tone.Sampler, Tone.Instrument);\n\t    /**\n\t\t * The defaults\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t    Tone.Sampler.defaults = {\n\t        attack: 0,\n\t        release: 0.1,\n\t        onload: Tone.noOp,\n\t        baseUrl: ''\n\t    };\n\t    /**\n\t\t * Returns the difference in steps between the given midi note at the closets sample.\n\t\t * @param  {Midi} midi\n\t\t * @return {Interval}\n\t\t * @private\n\t\t */\n\t    Tone.Sampler.prototype._findClosest = function (midi) {\n\t        //searches within 8 octaves of the given midi note\n\t        var MAX_INTERVAL = 96;\n\t        var interval = 0;\n\t        while (interval < MAX_INTERVAL) {\n\t            // check above and below\n\t            if (this._buffers.has(midi + interval)) {\n\t                return -interval;\n\t            } else if (this._buffers.has(midi - interval)) {\n\t                return interval;\n\t            }\n\t            interval++;\n\t        }\n\t        return null;\n\t    };\n\t    /**\n\t\t * @param  {Frequency} note     The note to play\n\t\t * @param  {Time=} time     When to play the note\n\t\t * @param  {NormalRange=} velocity The velocity to play the sample back.\n\t\t * @return {Tone.Sampler}          this\n\t\t */\n\t    Tone.Sampler.prototype.triggerAttack = function (note, time, velocity) {\n\t        var midi = Tone.Frequency(note).toMidi();\n\t        // find the closest note pitch\n\t        var difference = this._findClosest(midi);\n\t        if (difference !== null) {\n\t            var closestNote = midi - difference;\n\t            var buffer = this._buffers.get(closestNote);\n\t            // play that note\n\t            var source = new Tone.BufferSource({\n\t                'buffer': buffer,\n\t                'playbackRate': Tone.intervalToFrequencyRatio(difference),\n\t                'fadeIn': this.attack,\n\t                'fadeOut': this.release,\n\t                'curve': 'exponential'\n\t            }).connect(this.output);\n\t            source.start(time, 0, buffer.duration, velocity);\n\t            // add it to the active sources\n\t            if (!Tone.isArray(this._activeSources[midi])) {\n\t                this._activeSources[midi] = [];\n\t            }\n\t            this._activeSources[midi].push({\n\t                note: midi,\n\t                source: source\n\t            });\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * @param  {Frequency} note     The note to release.\n\t\t * @param  {Time=} time     \tWhen to release the note.\n\t\t * @return {Tone.Sampler}\tthis\n\t\t */\n\t    Tone.Sampler.prototype.triggerRelease = function (note, time) {\n\t        var midi = Tone.Frequency(note).toMidi();\n\t        // find the note\n\t        if (this._activeSources[midi] && this._activeSources[midi].length) {\n\t            var source = this._activeSources[midi].shift().source;\n\t            time = this.toSeconds(time);\n\t            source.stop(time + this.release, this.release);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * Release all currently active notes.\n\t\t * @param  {Time=} time     \tWhen to release the notes.\n\t\t * @return {Tone.Sampler}\tthis\n\t\t */\n\t    Tone.Sampler.prototype.releaseAll = function (time) {\n\t        time = this.toSeconds(time);\n\t        for (var note in this._activeSources) {\n\t            var sources = this._activeSources[note];\n\t            while (sources.length) {\n\t                var source = sources.shift().source;\n\t                source.stop(time + this.release, this.release);\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * Sync the instrument to the Transport. All subsequent calls of\n\t\t * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n\t\t * will be scheduled along the transport.\n\t\t * @example\n\t\t * synth.sync()\n\t\t * //schedule 3 notes when the transport first starts\n\t\t * synth.triggerAttackRelease('8n', 0)\n\t\t * synth.triggerAttackRelease('8n', '8n')\n\t\t * synth.triggerAttackRelease('8n', '4n')\n\t\t * //start the transport to hear the notes\n\t\t * Transport.start()\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t    Tone.Sampler.prototype.sync = function () {\n\t        this._syncMethod('triggerAttack', 1);\n\t        this._syncMethod('triggerRelease', 1);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Invoke the attack phase, then after the duration, invoke the release.\n\t\t * @param  {Frequency} note     The note to play\n\t\t * @param  {Time} duration The time the note should be held\n\t\t * @param  {Time=} time     When to start the attack\n\t\t * @param  {NormalRange} [velocity=1] The velocity of the attack\n\t\t * @return {Tone.Sampler}          this\n\t\t */\n\t    Tone.Sampler.prototype.triggerAttackRelease = function (note, duration, time, velocity) {\n\t        time = this.toSeconds(time);\n\t        duration = this.toSeconds(duration);\n\t        this.triggerAttack(note, time, velocity);\n\t        this.triggerRelease(note, time + duration);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Add a note to the sampler.\n\t\t *  @param  {Note|Midi}   note      The buffer's pitch.\n\t\t *  @param  {String|Tone.Buffer|Audiobuffer}  url  Either the url of the bufer,\n\t\t *                                                 or a buffer which will be added\n\t\t *                                                 with the given name.\n\t\t *  @param  {Function=}  callback  The callback to invoke\n\t\t *                                 when the url is loaded.\n\t\t */\n\t    Tone.Sampler.prototype.add = function (note, url, callback) {\n\t        if (Tone.isNote(note)) {\n\t            //convert the note name to MIDI\n\t            var mid = Tone.Frequency(note).toMidi();\n\t            this._buffers.add(mid, url, callback);\n\t        } else if (!isNaN(parseFloat(note))) {\n\t            //otherwise if it's numbers assume it's midi\n\t            this._buffers.add(note, url, callback);\n\t        } else {\n\t            throw new Error('Tone.Sampler: note must be the note\\'s pitch. Instead got ' + note);\n\t        }\n\t    };\n\t    /**\n\t\t * If the buffers are loaded or not\n\t\t * @memberOf Tone.Sampler#\n\t\t * @type {Boolean}\n\t\t * @name loaded\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Sampler.prototype, 'loaded', {\n\t        get: function () {\n\t            return this._buffers.loaded;\n\t        }\n\t    });\n\t    /**\n\t\t * Clean up\n\t\t * @return {Tone.Sampler} this\n\t\t */\n\t    Tone.Sampler.prototype.dispose = function () {\n\t        Tone.Instrument.prototype.dispose.call(this);\n\t        this._buffers.dispose();\n\t        this._buffers = null;\n\t        for (var midi in this._activeSources) {\n\t            this._activeSources[midi].forEach(function (event) {\n\t                event.source.dispose();\n\t            });\n\t        }\n\t        this._activeSources = null;\n\t        return this;\n\t    };\n\t    return Tone.Sampler;\n\t});\n\tModule(function (Tone) {\n\t    if (Tone.supported) {\n\t        if (!OscillatorNode.prototype.setPeriodicWave) {\n\t            OscillatorNode.prototype.setPeriodicWave = OscillatorNode.prototype.setWaveTable;\n\t        }\n\t        if (!AudioContext.prototype.createPeriodicWave) {\n\t            AudioContext.prototype.createPeriodicWave = AudioContext.prototype.createWaveTable;\n\t        }\n\t    }\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Maps a NormalRange [0, 1] to an AudioRange [-1, 1]. \n\t\t *         See also Tone.AudioToGain. \n\t\t *\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @constructor\n\t\t *  @example\n\t\t * var g2a = new Tone.GainToAudio();\n\t\t */\n\t    Tone.GainToAudio = function () {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  @type {WaveShaperNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._norm = this.input = this.output = new Tone.WaveShaper(function (x) {\n\t            return Math.abs(x) * 2 - 1;\n\t        });\n\t    };\n\t    Tone.extend(Tone.GainToAudio, Tone.SignalBase);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.GainToAudio} this\n\t\t */\n\t    Tone.GainToAudio.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._norm.dispose();\n\t        this._norm = null;\n\t        return this;\n\t    };\n\t    return Tone.GainToAudio;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Normalize takes an input min and max and maps it linearly to NormalRange [0,1]\n\t\t *\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @constructor\n\t\t *  @param {number} inputMin the min input value\n\t\t *  @param {number} inputMax the max input value\n\t\t *  @example\n\t\t * var norm = new Tone.Normalize(2, 4);\n\t\t * var sig = new Tone.Signal(3).connect(norm);\n\t\t * //output of norm is 0.5. \n\t\t */\n\t    Tone.Normalize = function (inputMin, inputMax) {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  the min input value\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._inputMin = Tone.defaultArg(inputMin, 0);\n\t        /**\n\t\t\t *  the max input value\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._inputMax = Tone.defaultArg(inputMax, 1);\n\t        /**\n\t\t\t *  subtract the min from the input\n\t\t\t *  @type {Tone.Add}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sub = this.input = new Tone.Add(0);\n\t        /**\n\t\t\t *  divide by the difference between the input and output\n\t\t\t *  @type {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._div = this.output = new Tone.Multiply(1);\n\t        this._sub.connect(this._div);\n\t        this._setRange();\n\t    };\n\t    Tone.extend(Tone.Normalize, Tone.SignalBase);\n\t    /**\n\t\t * The minimum value the input signal will reach.\n\t\t * @memberOf Tone.Normalize#\n\t\t * @type {number}\n\t\t * @name min\n\t\t */\n\t    Object.defineProperty(Tone.Normalize.prototype, 'min', {\n\t        get: function () {\n\t            return this._inputMin;\n\t        },\n\t        set: function (min) {\n\t            this._inputMin = min;\n\t            this._setRange();\n\t        }\n\t    });\n\t    /**\n\t\t * The maximum value the input signal will reach.\n\t\t * @memberOf Tone.Normalize#\n\t\t * @type {number}\n\t\t * @name max\n\t\t */\n\t    Object.defineProperty(Tone.Normalize.prototype, 'max', {\n\t        get: function () {\n\t            return this._inputMax;\n\t        },\n\t        set: function (max) {\n\t            this._inputMax = max;\n\t            this._setRange();\n\t        }\n\t    });\n\t    /**\n\t\t *  set the values\n\t\t *  @private\n\t\t */\n\t    Tone.Normalize.prototype._setRange = function () {\n\t        this._sub.value = -this._inputMin;\n\t        this._div.value = 1 / (this._inputMax - this._inputMin);\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Normalize} this\n\t\t */\n\t    Tone.Normalize.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._sub.dispose();\n\t        this._sub = null;\n\t        this._div.dispose();\n\t        this._div = null;\n\t        return this;\n\t    };\n\t    return Tone.Normalize;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t * @class Tone.TransportTimelineSignal extends Tone.Signal, but adds the ability to synchronize the signal to the signal to the Tone.Transport\n\t\t * @extends {Tone.Signal}\n\t\t */\n\t    Tone.TransportTimelineSignal = function () {\n\t        Tone.Signal.apply(this, arguments);\n\t        /**\n\t\t\t * The real signal output\n\t\t\t * @type {Tone.Signal}\n\t\t\t * @private\n\t\t\t */\n\t        this.output = this._outputSig = new Tone.Signal(this._initialValue);\n\t        /**\n\t\t\t * Keep track of the last value. (small optimization)\n\t\t\t * @private\n\t\t\t * @type {Number}\n\t\t\t */\n\t        this._lastVal = this.value;\n\t        /**\n\t\t\t * The event id of the tick update loop\n\t\t\t * @private\n\t\t\t * @type {Number}\n\t\t\t */\n\t        this._synced = Tone.Transport.scheduleRepeat(this._onTick.bind(this), '1i');\n\t        /**\n\t\t\t * A bound version of the anchor value methods\n\t\t\t * @type {Function}\n\t\t\t * @private\n\t\t\t */\n\t        this._bindAnchorValue = this._anchorValue.bind(this);\n\t        Tone.Transport.on('start stop pause', this._bindAnchorValue);\n\t        this._events.memory = Infinity;\n\t    };\n\t    Tone.extend(Tone.TransportTimelineSignal, Tone.Signal);\n\t    /**\n\t\t * Callback which is invoked every tick.\n\t\t * @private\n\t\t * @param  {Number} time\n\t\t * @return {Tone.TransportTimelineSignal}      this\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype._onTick = function (time) {\n\t        var val = this.getValueAtTime(Tone.Transport.seconds);\n\t        if (this._lastVal !== val) {\n\t            this._lastVal = val;\n\t            //approximate ramp curves with linear ramps\n\t            this._outputSig.linearRampToValueAtTime(val, time);\n\t        }\n\t    };\n\t    /**\n\t\t * Anchor the value at the start and stop of the Transport\n\t\t * @param  {Number} time The time of the event\n\t\t * @return {Tone.TransportTimelineSignal}      this\n\t\t * @private\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype._anchorValue = function (time) {\n\t        var val = this.getValueAtTime(Tone.Transport.seconds);\n\t        this._lastVal = val;\n\t        this._outputSig.cancelScheduledValues(time);\n\t        this._outputSig.setValueAtTime(val, time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Get the scheduled value at the given time. This will\n\t\t *  return the unconverted (raw) value.\n\t\t *  @param  {TransportTime}  time  The time in seconds.\n\t\t *  @return  {Number}  The scheduled value at the given time.\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype.getValueAtTime = function (time) {\n\t        time = Tone.TransportTime(time);\n\t        return Tone.Signal.prototype.getValueAtTime.call(this, time);\n\t    };\n\t    /**\n\t\t * Set the output of the signal at the given time\n\t\t * @param  {Number} value The value to change to at the given time\n\t\t * @param  {TransportTime} time  The time to change the signal\n\t\t * @return {Tone.TransportTimelineSignal}       this\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype.setValueAtTime = function (value, time) {\n\t        time = Tone.TransportTime(time);\n\t        Tone.Signal.prototype.setValueAtTime.call(this, value, time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Linear ramp to the given value from the previous scheduled point to the given value\n\t\t * @param  {Number} value The value to change to at the given time\n\t\t * @param  {TransportTime} time  The time to change the signal\n\t\t * @return {Tone.TransportTimelineSignal}       this\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype.linearRampToValueAtTime = function (value, time) {\n\t        time = Tone.TransportTime(time);\n\t        Tone.Signal.prototype.linearRampToValueAtTime.call(this, value, time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Exponential ramp to the given value from the previous scheduled point to the given value\n\t\t * @param  {Number} value The value to change to at the given time\n\t\t * @param  {TransportTime} time  The time to change the signal\n\t\t * @return {Tone.TransportTimelineSignal}       this\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype.exponentialRampToValueAtTime = function (value, time) {\n\t        time = Tone.TransportTime(time);\n\t        Tone.Signal.prototype.exponentialRampToValueAtTime.call(this, value, time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Start exponentially approaching the target value at the given time with\n\t\t *  a rate having the given time constant.\n\t\t *  @param {number} value\n\t\t *  @param {TransportTime} startTime\n\t\t *  @param {number} timeConstant\n\t\t * @return {Tone.TransportTimelineSignal}       this\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype.setTargetAtTime = function (value, startTime, timeConstant) {\n\t        startTime = Tone.TransportTime(startTime);\n\t        Tone.Signal.prototype.setTargetAtTime.call(this, value, startTime, timeConstant);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancels all scheduled parameter changes with times greater than or\n\t\t *  equal to startTime.\n\t\t *  @param  {TransportTime} startTime\n\t\t *  @returns {Tone.Param} this\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype.cancelScheduledValues = function (startTime) {\n\t        startTime = Tone.TransportTime(startTime);\n\t        Tone.Signal.prototype.cancelScheduledValues.call(this, startTime);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Set an array of arbitrary values starting at the given time for the given duration.\n\t\t *  @param {Float32Array} values\n\t\t *  @param {Time} startTime\n\t\t *  @param {Time} duration\n\t\t *  @param {NormalRange} [scaling=1] If the values in the curve should be scaled by some value\n\t\t *  @returns {Tone.Signal} this\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype.setValueCurveAtTime = function (values, startTime, duration, scaling) {\n\t        startTime = Tone.TransportTime(startTime);\n\t        duration = Tone.TransportTime(duration);\n\t        Tone.Signal.prototype.setValueCurveAtTime.call(this, values, startTime, duration, scaling);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  This is similar to [cancelScheduledValues](#cancelScheduledValues) except\n\t\t *  it holds the automated value at time until the next automated event.\n\t\t *  @param  {Time} time\n\t\t *  @returns {Tone.TransportTimelineSignal} this\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype.cancelAndHoldAtTime = function (time) {\n\t        return Tone.Signal.prototype.cancelAndHoldAtTime.call(this, Tone.TransportTime(time));\n\t    };\n\t    /**\n\t\t * Dispose and disconnect\n\t\t * @return {Tone.TransportTimelineSignal} this\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype.dispose = function () {\n\t        Tone.Transport.clear(this._synced);\n\t        Tone.Transport.off('start stop pause', this._syncedCallback);\n\t        this._events.cancel(0);\n\t        Tone.Signal.prototype.dispose.call(this);\n\t        this._outputSig.dispose();\n\t        this._outputSig = null;\n\t    };\n\t    return Tone.TransportTimelineSignal;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t * @class Tone.GrainPlayer implements [granular synthesis](https://en.wikipedia.org/wiki/Granular_synthesis).\n\t\t *        Granular Synthesis enables you to adjust pitch and playback rate independently. The grainSize is the\n\t\t *        amount of time each small chunk of audio is played for and the overlap is the\n\t\t *        amount of crossfading transition time between successive grains.\n\t\t * @extends {Tone.Source}\n\t\t * @param {String|Tone.Buffer} url\tThe url to load, or the Tone.Buffer to play.\n\t\t * @param {Function=} callback The callback to invoke after the url is loaded.\n\t\t */\n\t    Tone.GrainPlayer = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'url',\n\t            'onload'\n\t        ], Tone.GrainPlayer);\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  The audio buffer belonging to the player.\n\t\t\t *  @type  {Tone.Buffer}\n\t\t\t */\n\t        this.buffer = new Tone.Buffer(options.url, options.onload);\n\t        /**\n\t\t\t *  Create a repeating tick to schedule\n\t\t\t *  the grains.\n\t\t\t *  @type  {Tone.Clock}\n\t\t\t *  @private\n\t\t\t */\n\t        this._clock = new Tone.Clock(this._tick.bind(this), options.grainSize);\n\t        /**\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._loopStart = 0;\n\t        /**\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._loopEnd = 0;\n\t        /**\n\t\t\t * All of the currently playing BufferSources\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t        this._activeSources = [];\n\t        /**\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._playbackRate = options.playbackRate;\n\t        /**\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._grainSize = options.grainSize;\n\t        /**\n\t\t\t *  @private\n\t\t\t *  @type {Number}\n\t\t\t */\n\t        this._overlap = options.overlap;\n\t        /**\n\t\t\t *  Adjust the pitch independently of the playbackRate.\n\t\t\t *  @type  {Cents}\n\t\t\t */\n\t        this.detune = options.detune;\n\t        //setup\n\t        this.overlap = options.overlap;\n\t        this.loop = options.loop;\n\t        this.playbackRate = options.playbackRate;\n\t        this.grainSize = options.grainSize;\n\t        this.loopStart = options.loopStart;\n\t        this.loopEnd = options.loopEnd;\n\t        this.reverse = options.reverse;\n\t        this._clock.on('stop', this._onstop.bind(this));\n\t    };\n\t    Tone.extend(Tone.GrainPlayer, Tone.Source);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.GrainPlayer.defaults = {\n\t        'onload': Tone.noOp,\n\t        'overlap': 0.1,\n\t        'grainSize': 0.2,\n\t        'playbackRate': 1,\n\t        'detune': 0,\n\t        'loop': false,\n\t        'loopStart': 0,\n\t        'loopEnd': 0,\n\t        'reverse': false\n\t    };\n\t    /**\n\t\t *  Play the buffer at the given startTime. Optionally add an offset\n\t\t *  and/or duration which will play the buffer from a position\n\t\t *  within the buffer for the given duration.\n\t\t *\n\t\t *  @param  {Time} [startTime=now] When the player should start.\n\t\t *  @param  {Time} [offset=0] The offset from the beginning of the sample\n\t\t *                                 to start at.\n\t\t *  @param  {Time=} duration How long the sample should play. If no duration\n\t\t *                                is given, it will default to the full length\n\t\t *                                of the sample (minus any offset)\n\t\t *  @returns {Tone.GrainPlayer} this\n\t\t *  @memberOf Tone.GrainPlayer#\n\t\t *  @method start\n\t\t *  @name start\n\t\t */\n\t    /**\n\t\t *  Internal start method\n\t\t *  @param {Time} time\n\t\t *  @param {Time} offset\n\t\t *  @private\n\t\t */\n\t    Tone.GrainPlayer.prototype._start = function (time, offset, duration) {\n\t        offset = Tone.defaultArg(offset, 0);\n\t        offset = this.toSeconds(offset);\n\t        time = this.toSeconds(time);\n\t        this._offset = offset;\n\t        this._clock.start(time);\n\t        if (duration) {\n\t            this.stop(time + this.toSeconds(duration));\n\t        }\n\t    };\n\t    /**\n\t\t *  Internal start method\n\t\t *  @param {Time} time\n\t\t *  @private\n\t\t */\n\t    Tone.GrainPlayer.prototype._stop = function (time) {\n\t        this._clock.stop(time);\n\t    };\n\t    /**\n\t\t * Invoked when the clock is stopped\n\t\t * @param  {Number} time\n\t\t * @private\n\t\t */\n\t    Tone.GrainPlayer.prototype._onstop = function (time) {\n\t        //stop the players\n\t        this._activeSources.forEach(function (source) {\n\t            source.stop(time, 0);\n\t        });\n\t    };\n\t    /**\n\t\t *  Invoked on each clock tick. scheduled a new\n\t\t *  grain at this time.\n\t\t *  @param  {Time}  time\n\t\t *  @private\n\t\t */\n\t    Tone.GrainPlayer.prototype._tick = function (time) {\n\t        var fadeIn = this._offset < this._overlap ? 0 : this._overlap;\n\t        var source = new Tone.BufferSource({\n\t            'buffer': this.buffer,\n\t            'fadeIn': fadeIn,\n\t            'fadeOut': this._overlap,\n\t            'loop': this.loop,\n\t            'loopStart': this._loopStart,\n\t            'loopEnd': this._loopEnd,\n\t            'playbackRate': Tone.intervalToFrequencyRatio(this.detune / 100)\n\t        }).connect(this.output);\n\t        source.start(time, this._offset);\n\t        this._offset += this.grainSize;\n\t        source.stop(time + this.grainSize);\n\t        //add it to the active sources\n\t        this._activeSources.push(source);\n\t        //remove it when it's done\n\t        source.onended = function () {\n\t            var index = this._activeSources.indexOf(source);\n\t            if (index !== -1) {\n\t                this._activeSources.splice(index, 1);\n\t            }\n\t        }.bind(this);\n\t    };\n\t    /**\n\t\t *  Jump to a specific time and play it.\n\t\t *  @param  {Time}  offset  The offset to jump to.\n\t\t *  @param {Time=} time When to make the jump.\n\t\t *  @return  {Tone.GrainPlayer}  this\n\t\t */\n\t    Tone.GrainPlayer.prototype.seek = function (offset, time) {\n\t        this._offset = this.toSeconds(offset);\n\t        this._tick(this.toSeconds(time));\n\t        return this;\n\t    };\n\t    /**\n\t\t * The playback rate of the sample\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {Positive}\n\t\t * @name playbackRate\n\t\t */\n\t    Object.defineProperty(Tone.GrainPlayer.prototype, 'playbackRate', {\n\t        get: function () {\n\t            return this._playbackRate;\n\t        },\n\t        set: function (rate) {\n\t            this._playbackRate = rate;\n\t            this.grainSize = this._grainSize;\n\t        }\n\t    });\n\t    /**\n\t\t * The loop start time.\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {Time}\n\t\t * @name loopStart\n\t\t */\n\t    Object.defineProperty(Tone.GrainPlayer.prototype, 'loopStart', {\n\t        get: function () {\n\t            return this._loopStart;\n\t        },\n\t        set: function (time) {\n\t            this._loopStart = this.toSeconds(time);\n\t        }\n\t    });\n\t    /**\n\t\t * The loop end time.\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {Time}\n\t\t * @name loopEnd\n\t\t */\n\t    Object.defineProperty(Tone.GrainPlayer.prototype, 'loopEnd', {\n\t        get: function () {\n\t            return this._loopEnd;\n\t        },\n\t        set: function (time) {\n\t            this._loopEnd = this.toSeconds(time);\n\t        }\n\t    });\n\t    /**\n\t\t * The direction the buffer should play in\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {boolean}\n\t\t * @name reverse\n\t\t */\n\t    Object.defineProperty(Tone.GrainPlayer.prototype, 'reverse', {\n\t        get: function () {\n\t            return this.buffer.reverse;\n\t        },\n\t        set: function (rev) {\n\t            this.buffer.reverse = rev;\n\t        }\n\t    });\n\t    /**\n\t\t * The size of each chunk of audio that the\n\t\t * buffer is chopped into and played back at.\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {Time}\n\t\t * @name grainSize\n\t\t */\n\t    Object.defineProperty(Tone.GrainPlayer.prototype, 'grainSize', {\n\t        get: function () {\n\t            return this._grainSize;\n\t        },\n\t        set: function (size) {\n\t            this._grainSize = this.toSeconds(size);\n\t            this._clock.frequency.value = this._playbackRate / this._grainSize;\n\t        }\n\t    });\n\t    /**\n\t\t * This is the duration of the cross-fade between\n\t\t * sucessive grains.\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {Time}\n\t\t * @name overlap\n\t\t */\n\t    Object.defineProperty(Tone.GrainPlayer.prototype, 'overlap', {\n\t        get: function () {\n\t            return this._overlap;\n\t        },\n\t        set: function (time) {\n\t            this._overlap = this.toSeconds(time);\n\t        }\n\t    });\n\t    /**\n\t\t * Clean up\n\t\t * @return {Tone.GrainPlayer} this\n\t\t */\n\t    Tone.GrainPlayer.prototype.dispose = function () {\n\t        Tone.Source.prototype.dispose.call(this);\n\t        this.buffer.dispose();\n\t        this.buffer = null;\n\t        this._clock.dispose();\n\t        this._clock = null;\n\t        this._activeSources.forEach(function (source) {\n\t            source.dispose();\n\t        });\n\t        this._activeSources = null;\n\t        return this;\n\t    };\n\t    return Tone.GrainPlayer;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Player is an audio file player with start, loop, and stop functions.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Source}\n\t\t *  @param {string|AudioBuffer} url Either the AudioBuffer or the url from\n\t\t *                                  which to load the AudioBuffer\n\t\t *  @param {Function=} onload The function to invoke when the buffer is loaded.\n\t\t *                            Recommended to use Tone.Buffer.on('load') instead.\n\t\t *  @example\n\t\t * var player = new Tone.Player(\"./path/to/sample.mp3\").toMaster();\n\t\t * //play as soon as the buffer is loaded\n\t\t * player.autostart = true;\n\t\t */\n\t    Tone.Player = function (url) {\n\t        var options;\n\t        if (url instanceof Tone.Buffer && url.loaded) {\n\t            url = url.get();\n\t            options = Tone.Player.defaults;\n\t        } else {\n\t            options = Tone.defaults(arguments, [\n\t                'url',\n\t                'onload'\n\t            ], Tone.Player);\n\t        }\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  If the file should play as soon\n\t\t\t *  as the buffer is loaded.\n\t\t\t *  @type {Boolean}\n\t\t\t *  @example\n\t\t\t * //will play as soon as it's loaded\n\t\t\t * var player = new Tone.Player({\n\t\t\t * \t\"url\" : \"./path/to/sample.mp3\",\n\t\t\t * \t\"autostart\" : true,\n\t\t\t * }).toMaster();\n\t\t\t */\n\t        this.autostart = options.autostart;\n\t        /**\n\t\t\t *  the buffer\n\t\t\t *  @private\n\t\t\t *  @type {Tone.Buffer}\n\t\t\t */\n\t        this._buffer = new Tone.Buffer({\n\t            'url': options.url,\n\t            'onload': this._onload.bind(this, options.onload),\n\t            'reverse': options.reverse\n\t        });\n\t        if (url instanceof AudioBuffer) {\n\t            this._buffer.set(url);\n\t        }\n\t        /**\n\t\t\t *  if the buffer should loop once it's over\n\t\t\t *  @type {Boolean}\n\t\t\t *  @private\n\t\t\t */\n\t        this._loop = options.loop;\n\t        /**\n\t\t\t *  if 'loop' is true, the loop will start at this position\n\t\t\t *  @type {Time}\n\t\t\t *  @private\n\t\t\t */\n\t        this._loopStart = options.loopStart;\n\t        /**\n\t\t\t *  if 'loop' is true, the loop will end at this position\n\t\t\t *  @type {Time}\n\t\t\t *  @private\n\t\t\t */\n\t        this._loopEnd = options.loopEnd;\n\t        /**\n\t\t\t *  the playback rate\n\t\t\t *  @private\n\t\t\t *  @type {Number}\n\t\t\t */\n\t        this._playbackRate = options.playbackRate;\n\t        /**\n\t\t\t *  All of the active buffer source nodes\n\t\t\t *  @type {Array<Tone.BufferSource>}\n\t\t\t *  @private\n\t\t\t */\n\t        this._activeSources = [];\n\t        /**\n\t\t\t *  The elapsed time counter.\n\t\t\t *  @type {Tone.TickSource}\n\t\t\t *  @private\n\t\t\t */\n\t        this._elapsedTime = new Tone.TickSource(options.playbackRate);\n\t        /**\n\t\t\t *  The fadeIn time of the amplitude envelope.\n\t\t\t *  @type {Time}\n\t\t\t */\n\t        this.fadeIn = options.fadeIn;\n\t        /**\n\t\t\t *  The fadeOut time of the amplitude envelope.\n\t\t\t *  @type {Time}\n\t\t\t */\n\t        this.fadeOut = options.fadeOut;\n\t    };\n\t    Tone.extend(Tone.Player, Tone.Source);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Player.defaults = {\n\t        'onload': Tone.noOp,\n\t        'playbackRate': 1,\n\t        'loop': false,\n\t        'autostart': false,\n\t        'loopStart': 0,\n\t        'loopEnd': 0,\n\t        'retrigger': false,\n\t        'reverse': false,\n\t        'fadeIn': 0,\n\t        'fadeOut': 0\n\t    };\n\t    /**\n\t\t *  Load the audio file as an audio buffer.\n\t\t *  Decodes the audio asynchronously and invokes\n\t\t *  the callback once the audio buffer loads.\n\t\t *  Note: this does not need to be called if a url\n\t\t *  was passed in to the constructor. Only use this\n\t\t *  if you want to manually load a new url.\n\t\t * @param {string} url The url of the buffer to load.\n\t\t *                     Filetype support depends on the\n\t\t *                     browser.\n\t\t *  @param  {Function=} callback The function to invoke once\n\t\t *                               the sample is loaded.\n\t\t *  @returns {Promise}\n\t\t */\n\t    Tone.Player.prototype.load = function (url, callback) {\n\t        return this._buffer.load(url, this._onload.bind(this, callback));\n\t    };\n\t    /**\n\t\t * Internal callback when the buffer is loaded.\n\t\t * @private\n\t\t */\n\t    Tone.Player.prototype._onload = function (callback) {\n\t        callback = Tone.defaultArg(callback, Tone.noOp);\n\t        callback(this);\n\t        if (this.autostart) {\n\t            this.start();\n\t        }\n\t    };\n\t    /**\n\t\t * Internal callback when the buffer is done playing.\n\t\t * @private\n\t\t */\n\t    Tone.Player.prototype._onSourceEnd = function (source) {\n\t        var index = this._activeSources.indexOf(source);\n\t        this._activeSources.splice(index, 1);\n\t    };\n\t    /**\n\t\t *  Play the buffer at the given startTime. Optionally add an offset\n\t\t *  and/or duration which will play the buffer from a position\n\t\t *  within the buffer for the given duration.\n\t\t *\n\t\t *  @param  {Time} [startTime=now] When the player should start.\n\t\t *  @param  {Time} [offset=0] The offset from the beginning of the sample\n\t\t *                                 to start at.\n\t\t *  @param  {Time=} duration How long the sample should play. If no duration\n\t\t *                                is given, it will default to the full length\n\t\t *                                of the sample (minus any offset)\n\t\t *  @returns {Tone.Player} this\n\t\t *  @memberOf Tone.Player#\n\t\t *  @method start\n\t\t *  @name start\n\t\t */\n\t    /**\n\t\t *  Internal start method\n\t\t *  @private\n\t\t */\n\t    Tone.Player.prototype._start = function (startTime, offset, duration) {\n\t        //if it's a loop the default offset is the loopstart point\n\t        if (this._loop) {\n\t            offset = Tone.defaultArg(offset, this._loopStart);\n\t        } else {\n\t            //otherwise the default offset is 0\n\t            offset = Tone.defaultArg(offset, 0);\n\t        }\n\t        //compute the values in seconds\n\t        offset = this.toSeconds(offset);\n\t        var computedDuration = Tone.defaultArg(duration, Math.max(this._buffer.duration - offset, 0));\n\t        computedDuration = this.toSeconds(computedDuration);\n\t        startTime = this.toSeconds(startTime);\n\t        //start the elapsed time counter\n\t        this._elapsedTime.start(startTime, offset);\n\t        //make the source\n\t        var source = new Tone.BufferSource({\n\t            'buffer': this._buffer,\n\t            'loop': this._loop,\n\t            'loopStart': this._loopStart,\n\t            'loopEnd': this._loopEnd,\n\t            'onended': this._onSourceEnd.bind(this),\n\t            'playbackRate': this._playbackRate,\n\t            'fadeIn': this.fadeIn,\n\t            'fadeOut': this.fadeOut\n\t        }).connect(this.output);\n\t        //set the looping properties\n\t        if (!this._loop && !this._synced) {\n\t            //if it's not looping, set the state change at the end of the sample\n\t            this._state.setStateAtTime(Tone.State.Stopped, startTime + computedDuration / this._playbackRate);\n\t        }\n\t        //add it to the array of active sources\n\t        this._activeSources.push(source);\n\t        //start it\n\t        if (this._loop && Tone.isUndef(duration)) {\n\t            source.start(startTime, offset);\n\t        } else {\n\t            source.start(startTime, offset, computedDuration);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Stop playback.\n\t\t *  @private\n\t\t *  @param  {Time} [time=now]\n\t\t *  @returns {Tone.Player} this\n\t\t */\n\t    Tone.Player.prototype._stop = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._elapsedTime.stop(time);\n\t        this._activeSources.forEach(function (source) {\n\t            source.stop(time);\n\t        });\n\t        return this;\n\t    };\n\t    /**\n\t\t * Stop and then restart the player from the beginning (or offset)\n\t\t *  @param  {Time} [startTime=now] When the player should start.\n\t\t *  @param  {Time} [offset=0] The offset from the beginning of the sample\n\t\t *                                 to start at.\n\t\t *  @param  {Time=} duration How long the sample should play. If no duration\n\t\t *                                is given, it will default to the full length\n\t\t *                                of the sample (minus any offset)\n\t\t *  @returns {Tone.Player} this\n\t\t */\n\t    Tone.Player.prototype.restart = function (time, offset, duration) {\n\t        this._stop(time);\n\t        this._start(time, offset, duration);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Seek to a specific time in the player's buffer. If the\n\t\t *  source is no longer playing at that time, it will stop.\n\t\t *  If you seek to a time that\n\t\t *  @param {Time} offset The time to seek to.\n\t\t *  @param {Time=} time The time for the seek event to occur.\n\t\t *  @return {Tone.Player} this\n\t\t *  @example\n\t\t * source.start(0.2);\n\t\t * source.stop(0.4);\n\t\t */\n\t    Tone.Player.prototype.seek = function (offset, time) {\n\t        time = this.toSeconds(time);\n\t        if (this._state.getValueAtTime(time) === Tone.State.Started) {\n\t            offset = this.toSeconds(offset);\n\t            // if it's currently playing, stop it\n\t            this._stop(time);\n\t            //restart it at the given time\n\t            this._start(time, offset);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Set the loop start and end. Will only loop if loop is\n\t\t *  set to true.\n\t\t *  @param {Time} loopStart The loop end time\n\t\t *  @param {Time} loopEnd The loop end time\n\t\t *  @returns {Tone.Player} this\n\t\t *  @example\n\t\t * //loop 0.1 seconds of the file.\n\t\t * player.setLoopPoints(0.2, 0.3);\n\t\t * player.loop = true;\n\t\t */\n\t    Tone.Player.prototype.setLoopPoints = function (loopStart, loopEnd) {\n\t        this.loopStart = loopStart;\n\t        this.loopEnd = loopEnd;\n\t        return this;\n\t    };\n\t    /**\n\t\t * If loop is true, the loop will start at this position.\n\t\t * @memberOf Tone.Player#\n\t\t * @type {Time}\n\t\t * @name loopStart\n\t\t */\n\t    Object.defineProperty(Tone.Player.prototype, 'loopStart', {\n\t        get: function () {\n\t            return this._loopStart;\n\t        },\n\t        set: function (loopStart) {\n\t            this._loopStart = loopStart;\n\t            //get the current source\n\t            this._activeSources.forEach(function (source) {\n\t                source.loopStart = loopStart;\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t * If loop is true, the loop will end at this position.\n\t\t * @memberOf Tone.Player#\n\t\t * @type {Time}\n\t\t * @name loopEnd\n\t\t */\n\t    Object.defineProperty(Tone.Player.prototype, 'loopEnd', {\n\t        get: function () {\n\t            return this._loopEnd;\n\t        },\n\t        set: function (loopEnd) {\n\t            this._loopEnd = loopEnd;\n\t            //get the current source\n\t            this._activeSources.forEach(function (source) {\n\t                source.loopEnd = loopEnd;\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t * The audio buffer belonging to the player.\n\t\t * @memberOf Tone.Player#\n\t\t * @type {Tone.Buffer}\n\t\t * @name buffer\n\t\t */\n\t    Object.defineProperty(Tone.Player.prototype, 'buffer', {\n\t        get: function () {\n\t            return this._buffer;\n\t        },\n\t        set: function (buffer) {\n\t            this._buffer.set(buffer);\n\t        }\n\t    });\n\t    /**\n\t\t * If the buffer should loop once it's over.\n\t\t * @memberOf Tone.Player#\n\t\t * @type {Boolean}\n\t\t * @name loop\n\t\t */\n\t    Object.defineProperty(Tone.Player.prototype, 'loop', {\n\t        get: function () {\n\t            return this._loop;\n\t        },\n\t        set: function (loop) {\n\t            //if no change, do nothing\n\t            if (this._loop === loop) {\n\t                return;\n\t            }\n\t            this._loop = loop;\n\t            var now = this.now();\n\t            if (!loop) {\n\t                //stop the playback on the next cycle\n\t                this._stopAtNextIteration(now);\n\t            } else {\n\t                //remove the next stopEvent\n\t                var stopEvent = this._state.getNextState(Tone.State.Stopped, now);\n\t                if (stopEvent) {\n\t                    this._activeSources.forEach(function (source) {\n\t                        source.loop = loop;\n\t                    });\n\t                    this._state.cancel(stopEvent.time);\n\t                    this._elapsedTime.cancel(stopEvent.time);\n\t                }\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Schedules a stop event at the next full iteration. Used\n\t\t *  for scheduling stop when the loop state or playbackRate changes\n\t\t *  @param  {Number}  now  The current time\n\t\t *  @private\n\t\t */\n\t    Tone.Player.prototype._stopAtNextIteration = function (now) {\n\t        if (this._state.getValueAtTime(now) === Tone.State.Started) {\n\t            var nextStop = this._state.getNextState(Tone.State.Stopped, now);\n\t            var position = this._elapsedTime.getTicksAtTime(now);\n\t            var iterations = Math.max(Math.ceil(position / this.buffer.duration), 1);\n\t            var stopTime = this._elapsedTime.getTimeOfTick(iterations * this.buffer.duration, nextStop ? nextStop.time - this.sampleTime : Infinity);\n\t            this.stop(stopTime);\n\t        }\n\t    };\n\t    /**\n\t\t * The playback speed. 1 is normal speed. This is not a signal because\n\t\t * Safari and iOS currently don't support playbackRate as a signal.\n\t\t * @memberOf Tone.Player#\n\t\t * @type {Number}\n\t\t * @name playbackRate\n\t\t */\n\t    Object.defineProperty(Tone.Player.prototype, 'playbackRate', {\n\t        get: function () {\n\t            return this._playbackRate;\n\t        },\n\t        set: function (rate) {\n\t            this._playbackRate = rate;\n\t            var now = this.now();\n\t            this._elapsedTime.frequency.setValueAtTime(rate, now);\n\t            //if it's not looping\n\t            if (!this._loop) {\n\t                this._stopAtNextIteration(now);\n\t            }\n\t            //set all the sources\n\t            this._activeSources.forEach(function (source) {\n\t                source.playbackRate.setValueAtTime(rate, now);\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t * The current playback position of the buffer. \n\t\t * @memberOf Tone.Player#\n\t\t * @type {Number}\n\t\t * @name position\n\t\t */\n\t    Object.defineProperty(Tone.Player.prototype, 'position', {\n\t        get: function () {\n\t            var now = this.now();\n\t            if (this._state.getValueAtTime(now) === Tone.State.Started && this.loaded) {\n\t                var duration = this.buffer.duration;\n\t                var position = this._elapsedTime.getTicksAtTime(now);\n\t                return position % duration;\n\t            } else {\n\t                return 0;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The direction the buffer should play in\n\t\t * @memberOf Tone.Player#\n\t\t * @type {Boolean}\n\t\t * @name reverse\n\t\t */\n\t    Object.defineProperty(Tone.Player.prototype, 'reverse', {\n\t        get: function () {\n\t            return this._buffer.reverse;\n\t        },\n\t        set: function (rev) {\n\t            this._buffer.reverse = rev;\n\t        }\n\t    });\n\t    /**\n\t\t * If all the buffer is loaded\n\t\t * @memberOf Tone.Player#\n\t\t * @type {Boolean}\n\t\t * @name loaded\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Player.prototype, 'loaded', {\n\t        get: function () {\n\t            return this._buffer.loaded;\n\t        }\n\t    });\n\t    /**\n\t\t *  Dispose and disconnect.\n\t\t *  @return {Tone.Player} this\n\t\t */\n\t    Tone.Player.prototype.dispose = function () {\n\t        //disconnect all of the players\n\t        this._activeSources.forEach(function (source) {\n\t            source.dispose();\n\t        });\n\t        this._activeSources = null;\n\t        Tone.Source.prototype.dispose.call(this);\n\t        this._buffer.dispose();\n\t        this._buffer = null;\n\t        this._elapsedTime.dispose();\n\t        this._elapsedTime = null;\n\t        return this;\n\t    };\n\t    return Tone.Player;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Players combines multiple [Tone.Player](Player) objects.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Object} urls An object mapping a name to a url.\n\t\t *  @param {function=} onload The function to invoke when all buffers are loaded.\n\t\t */\n\t    Tone.Players = function (urls) {\n\t        var args = Array.prototype.slice.call(arguments);\n\t        args.shift();\n\t        var options = Tone.defaults(args, ['onload'], Tone.Players);\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  The output volume node\n\t\t\t *  @type  {Tone.Volume}\n\t\t\t *  @private\n\t\t\t */\n\t        this._volume = this.output = new Tone.Volume(options.volume);\n\t        /**\n\t\t\t * The volume of the output in decibels.\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * source.volume.value = -6;\n\t\t\t */\n\t        this.volume = this._volume.volume;\n\t        this._readOnly('volume');\n\t        //make the output explicitly stereo\n\t        this._volume.output.output.channelCount = 2;\n\t        this._volume.output.output.channelCountMode = 'explicit';\n\t        //mute initially\n\t        this.mute = options.mute;\n\t        /**\n\t\t\t * The container of all of the players\n\t\t\t * @type {Object}\n\t\t\t * @private\n\t\t\t */\n\t        this._players = {};\n\t        /**\n\t\t\t * The loading count\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t        this._loadingCount = 0;\n\t        /**\n\t\t\t * private holder of the fadeIn time\n\t\t\t * @type {Time}\n\t\t\t * @private\n\t\t\t */\n\t        this._fadeIn = options.fadeIn;\n\t        /**\n\t\t\t * private holder of the fadeOut time\n\t\t\t * @type {Time}\n\t\t\t * @private\n\t\t\t */\n\t        this._fadeOut = options.fadeOut;\n\t        //add all of the players\n\t        for (var name in urls) {\n\t            this._loadingCount++;\n\t            this.add(name, urls[name], this._bufferLoaded.bind(this, options.onload));\n\t        }\n\t    };\n\t    Tone.extend(Tone.Players, Tone.AudioNode);\n\t    /**\n\t\t * The default values\n\t\t * @type {Object}\n\t\t */\n\t    Tone.Players.defaults = {\n\t        'volume': 0,\n\t        'mute': false,\n\t        'onload': Tone.noOp,\n\t        'fadeIn': 0,\n\t        'fadeOut': 0\n\t    };\n\t    /**\n\t\t *  A buffer was loaded. decrement the counter.\n\t\t *  @param  {Function}  callback\n\t\t *  @private\n\t\t */\n\t    Tone.Players.prototype._bufferLoaded = function (callback) {\n\t        this._loadingCount--;\n\t        if (this._loadingCount === 0 && callback) {\n\t            callback(this);\n\t        }\n\t    };\n\t    /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.Source#\n\t\t * @type {boolean}\n\t\t * @name mute\n\t\t * @example\n\t\t * //mute the output\n\t\t * source.mute = true;\n\t\t */\n\t    Object.defineProperty(Tone.Players.prototype, 'mute', {\n\t        get: function () {\n\t            return this._volume.mute;\n\t        },\n\t        set: function (mute) {\n\t            this._volume.mute = mute;\n\t        }\n\t    });\n\t    /**\n\t\t * The fadeIn time of the amplitude envelope.\n\t\t * @memberOf Tone.Source#\n\t\t * @type {Time}\n\t\t * @name fadeIn\n\t\t */\n\t    Object.defineProperty(Tone.Players.prototype, 'fadeIn', {\n\t        get: function () {\n\t            return this._fadeIn;\n\t        },\n\t        set: function (fadeIn) {\n\t            this._fadeIn = fadeIn;\n\t            this._forEach(function (player) {\n\t                player.fadeIn = fadeIn;\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t * The fadeOut time of the amplitude envelope.\n\t\t * @memberOf Tone.Source#\n\t\t * @type {Time}\n\t\t * @name fadeOut\n\t\t */\n\t    Object.defineProperty(Tone.Players.prototype, 'fadeOut', {\n\t        get: function () {\n\t            return this._fadeOut;\n\t        },\n\t        set: function (fadeOut) {\n\t            this._fadeOut = fadeOut;\n\t            this._forEach(function (player) {\n\t                player.fadeOut = fadeOut;\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t * The state of the players object. Returns \"started\" if any of the players are playing.\n\t\t * @memberOf Tone.Players#\n\t\t * @type {String}\n\t\t * @name state\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Players.prototype, 'state', {\n\t        get: function () {\n\t            var playing = false;\n\t            this._forEach(function (player) {\n\t                playing = playing || player.state === Tone.State.Started;\n\t            });\n\t            return playing ? Tone.State.Started : Tone.State.Stopped;\n\t        }\n\t    });\n\t    /**\n\t\t *  True if the buffers object has a buffer by that name.\n\t\t *  @param  {String|Number}  name  The key or index of the\n\t\t *                                 buffer.\n\t\t *  @return  {Boolean}\n\t\t */\n\t    Tone.Players.prototype.has = function (name) {\n\t        return this._players.hasOwnProperty(name);\n\t    };\n\t    /**\n\t\t *  Get a player by name.\n\t\t *  @param  {String}  name  The players name as defined in\n\t\t *                          the constructor object or `add` method.\n\t\t *  @return  {Tone.Player}\n\t\t */\n\t    Tone.Players.prototype.get = function (name) {\n\t        if (this.has(name)) {\n\t            return this._players[name];\n\t        } else {\n\t            throw new Error('Tone.Players: no player named ' + name);\n\t        }\n\t    };\n\t    /**\n\t\t * Iterate over all of the players\n\t\t * @param  {Function} callback\n\t\t * @return {Tone.Players}            this\n\t\t * @private\n\t\t */\n\t    Tone.Players.prototype._forEach = function (callback) {\n\t        for (var playerName in this._players) {\n\t            callback(this._players[playerName], playerName);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * If all the buffers are loaded or not\n\t\t * @memberOf Tone.Players#\n\t\t * @type {Boolean}\n\t\t * @name loaded\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Players.prototype, 'loaded', {\n\t        get: function () {\n\t            var isLoaded = true;\n\t            this._forEach(function (player) {\n\t                isLoaded = isLoaded && player.loaded;\n\t            });\n\t            return isLoaded;\n\t        }\n\t    });\n\t    /**\n\t\t *  Add a player by name and url to the Players\n\t\t *  @param  {String}    name      A unique name to give the player\n\t\t *  @param  {String|Tone.Buffer|Audiobuffer}  url  Either the url of the bufer,\n\t\t *                                                 or a buffer which will be added\n\t\t *                                                 with the given name.\n\t\t *  @param  {Function=}  callback  The callback to invoke\n\t\t *                                 when the url is loaded.\n\t\t */\n\t    Tone.Players.prototype.add = function (name, url, callback) {\n\t        this._players[name] = new Tone.Player(url, callback).connect(this.output);\n\t        this._players[name].fadeIn = this._fadeIn;\n\t        this._players[name].fadeOut = this._fadeOut;\n\t        return this;\n\t    };\n\t    /**\n\t\t * Stop all of the players at the given time\n\t\t * @param {Time} time The time to stop all of the players.\n\t\t * @return {Tone.Players} this\n\t\t */\n\t    Tone.Players.prototype.stopAll = function (time) {\n\t        this._forEach(function (player) {\n\t            player.stop(time);\n\t        });\n\t    };\n\t    /**\n\t\t *  Dispose and disconnect.\n\t\t *  @return {Tone.Players} this\n\t\t */\n\t    Tone.Players.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._volume.dispose();\n\t        this._volume = null;\n\t        this._writable('volume');\n\t        this.volume = null;\n\t        this.output = null;\n\t        this._forEach(function (player) {\n\t            player.dispose();\n\t        });\n\t        this._players = null;\n\t        return this;\n\t    };\n\t    return Tone.Players;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.UserMedia uses MediaDevices.getUserMedia to open up\n\t\t *          and external microphone or audio input. Check\n\t\t *          [MediaDevices API Support](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia)\n\t\t *          to see which browsers are supported. Access to an external input\n\t\t *          is limited to secure (HTTPS) connections.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Decibels=} volume The level of the input\n\t\t *  @example\n\t\t * //list the inputs and open the third one\n\t\t * var motu = new Tone.UserMedia();\n\t\t *\n\t\t * //opening the input asks the user to activate their mic\n\t\t * motu.open().then(function(){\n\t\t * \t//promise resolves when input is available\n\t\t * });\n\t\t */\n\t    Tone.UserMedia = function () {\n\t        var options = Tone.defaults(arguments, ['volume'], Tone.UserMedia);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The MediaStreamNode\n\t\t\t *  @type {MediaStreamAudioSourceNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._mediaStream = null;\n\t        /**\n\t\t\t *  The media stream created by getUserMedia.\n\t\t\t *  @type {LocalMediaStream}\n\t\t\t *  @private\n\t\t\t */\n\t        this._stream = null;\n\t        /**\n\t\t\t *  The open device\n\t\t\t *  @type  {MediaDeviceInfo}\n\t\t\t *  @private\n\t\t\t */\n\t        this._device = null;\n\t        /**\n\t\t\t *  The output volume node\n\t\t\t *  @type  {Tone.Volume}\n\t\t\t *  @private\n\t\t\t */\n\t        this._volume = this.output = new Tone.Volume(options.volume);\n\t        /**\n\t\t\t * The volume of the output in decibels.\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * input.volume.value = -6;\n\t\t\t */\n\t        this.volume = this._volume.volume;\n\t        this._readOnly('volume');\n\t        this.mute = options.mute;\n\t    };\n\t    Tone.extend(Tone.UserMedia, Tone.AudioNode);\n\t    /**\n\t\t * the default parameters\n\t\t * @type {Object}\n\t\t */\n\t    Tone.UserMedia.defaults = {\n\t        'volume': 0,\n\t        'mute': false\n\t    };\n\t    /**\n\t\t *  Open the media stream. If a string is passed in, it is assumed\n\t\t *  to be the label or id of the stream, if a number is passed in,\n\t\t *  it is the input number of the stream.\n\t\t *  @param  {String|Number} [labelOrId=\"default\"] The label or id of the audio input media device.\n\t\t *                                                With no argument, the default stream is opened.\n\t\t *  @return {Promise} The promise is resolved when the stream is open.\n\t\t */\n\t    Tone.UserMedia.prototype.open = function (labelOrId) {\n\t        return Tone.UserMedia.enumerateDevices().then(function (devices) {\n\t            var device;\n\t            if (Tone.isNumber(labelOrId)) {\n\t                device = devices[labelOrId];\n\t            } else {\n\t                device = devices.find(function (device) {\n\t                    return device.label === labelOrId || device.deviceId === labelOrId;\n\t                });\n\t                //didn't find a matching device\n\t                if (!device && devices.length > 0) {\n\t                    device = devices[0];\n\t                } else if (!device && Tone.isDefined(labelOrId)) {\n\t                    throw new Error('Tone.UserMedia: no matching device: ' + labelOrId);\n\t                }\n\t            }\n\t            this._device = device;\n\t            //do getUserMedia\n\t            var constraints = {\n\t                audio: {\n\t                    'echoCancellation': false,\n\t                    'sampleRate': this.context.sampleRate\n\t                }\n\t            };\n\t            if (device) {\n\t                constraints.audio.deviceId = device.deviceId;\n\t            }\n\t            return navigator.mediaDevices.getUserMedia(constraints).then(function (stream) {\n\t                //start a new source only if the previous one is closed\n\t                if (!this._stream) {\n\t                    this._stream = stream;\n\t                    //Wrap a MediaStreamSourceNode around the live input stream.\n\t                    this._mediaStream = this.context.createMediaStreamSource(stream);\n\t                    //Connect the MediaStreamSourceNode to a gate gain node\n\t                    this._mediaStream.connect(this.output);\n\t                }\n\t                return this;\n\t            }.bind(this));\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t *  Close the media stream\n\t\t *  @return {Tone.UserMedia} this\n\t\t */\n\t    Tone.UserMedia.prototype.close = function () {\n\t        if (this._stream) {\n\t            this._stream.getAudioTracks().forEach(function (track) {\n\t                track.stop();\n\t            });\n\t            this._stream = null;\n\t            //remove the old media stream\n\t            this._mediaStream.disconnect();\n\t            this._mediaStream = null;\n\t        }\n\t        this._device = null;\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Returns a promise which resolves with the list of audio input devices available.\n\t\t *  @return {Promise} The promise that is resolved with the devices\n\t\t *  @static\n\t\t *  @example\n\t\t * Tone.UserMedia.enumerateDevices().then(function(devices){\n\t\t * \tconsole.log(devices)\n\t\t * })\n\t\t */\n\t    Tone.UserMedia.enumerateDevices = function () {\n\t        return navigator.mediaDevices.enumerateDevices().then(function (devices) {\n\t            return devices.filter(function (device) {\n\t                return device.kind === 'audioinput';\n\t            });\n\t        });\n\t    };\n\t    /**\n\t\t *  Returns the playback state of the source, \"started\" when the microphone is open\n\t\t *  and \"stopped\" when the mic is closed.\n\t\t *  @type {Tone.State}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.UserMedia#\n\t\t *  @name state\n\t\t */\n\t    Object.defineProperty(Tone.UserMedia.prototype, 'state', {\n\t        get: function () {\n\t            return this._stream && this._stream.active ? Tone.State.Started : Tone.State.Stopped;\n\t        }\n\t    });\n\t    /**\n\t\t * \tReturns an identifier for the represented device that is\n\t\t * \tpersisted across sessions. It is un-guessable by other applications and\n\t\t * \tunique to the origin of the calling application. It is reset when the\n\t\t * \tuser clears cookies (for Private Browsing, a different identifier is\n\t\t * \tused that is not persisted across sessions). Returns undefined when the\n\t\t * \tdevice is not open.\n\t\t *  @type {String}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.UserMedia#\n\t\t *  @name deviceId\n\t\t */\n\t    Object.defineProperty(Tone.UserMedia.prototype, 'deviceId', {\n\t        get: function () {\n\t            if (this._device) {\n\t                return this._device.deviceId;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * \tReturns a group identifier. Two devices have the\n\t\t * \tsame group identifier if they belong to the same physical device.\n\t\t * \tReturns undefined when the device is not open.\n\t\t *  @type {String}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.UserMedia#\n\t\t *  @name groupId\n\t\t */\n\t    Object.defineProperty(Tone.UserMedia.prototype, 'groupId', {\n\t        get: function () {\n\t            if (this._device) {\n\t                return this._device.groupId;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * \tReturns a label describing this device (for example \"Built-in Microphone\").\n\t\t * \tReturns undefined when the device is not open or label is not available\n\t\t * \tbecause of permissions.\n\t\t *  @type {String}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.UserMedia#\n\t\t *  @name groupId\n\t\t */\n\t    Object.defineProperty(Tone.UserMedia.prototype, 'label', {\n\t        get: function () {\n\t            if (this._device) {\n\t                return this._device.label;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.UserMedia#\n\t\t * @type {boolean}\n\t\t * @name mute\n\t\t * @example\n\t\t * //mute the output\n\t\t * userMedia.mute = true;\n\t\t */\n\t    Object.defineProperty(Tone.UserMedia.prototype, 'mute', {\n\t        get: function () {\n\t            return this._volume.mute;\n\t        },\n\t        set: function (mute) {\n\t            this._volume.mute = mute;\n\t        }\n\t    });\n\t    /**\n\t\t * Clean up.\n\t\t * @return {Tone.UserMedia} this\n\t\t */\n\t    Tone.UserMedia.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this.close();\n\t        this._writable('volume');\n\t        this._volume.dispose();\n\t        this._volume = null;\n\t        this.volume = null;\n\t        return this;\n\t    };\n\t    /**\n\t\t *  If getUserMedia is supported by the browser.\n\t\t *  @type  {Boolean}\n\t\t *  @memberOf Tone.UserMedia#\n\t\t *  @name supported\n\t\t *  @static\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.UserMedia, 'supported', {\n\t        get: function () {\n\t            return Tone.isDefined(navigator.mediaDevices) && Tone.isFunction(navigator.mediaDevices.getUserMedia);\n\t        }\n\t    });\n\t    return Tone.UserMedia;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.Midi is a primitive type for encoding Time values.\n\t\t *         Tone.Midi can be constructed with or without the `new` keyword. Tone.Midi can be passed\n\t\t *         into the parameter of any method which takes time as an argument.\n\t\t *  @constructor\n\t\t *  @extends {Tone.Frequency}\n\t\t *  @param  {String|Number}  val    The time value.\n\t\t *  @param  {String=}  units  The units of the value.\n\t\t *  @example\n\t\t * var t = Tone.Midi(\"4n\");//a quarter note\n\t\t */\n\t    Tone.Midi = function (val, units) {\n\t        if (this instanceof Tone.Midi) {\n\t            Tone.Frequency.call(this, val, units);\n\t        } else {\n\t            return new Tone.Midi(val, units);\n\t        }\n\t    };\n\t    Tone.extend(Tone.Midi, Tone.Frequency);\n\t    /**\n\t\t *  The default units if none are given.\n\t\t *  @type {String}\n\t\t *  @private\n\t\t */\n\t    Tone.Midi.prototype._defaultUnits = 'midi';\n\t    /**\n\t\t *  Returns the value of a frequency in the current units\n\t\t *  @param {Frequency} freq\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Midi.prototype._frequencyToUnits = function (freq) {\n\t        return Tone.Frequency.ftom(Tone.Frequency.prototype._frequencyToUnits.call(this, freq));\n\t    };\n\t    /**\n\t\t *  Returns the value of a tick in the current time units\n\t\t *  @param {Ticks} ticks\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Midi.prototype._ticksToUnits = function (ticks) {\n\t        return Tone.Frequency.ftom(Tone.Frequency.prototype._ticksToUnits.call(this, ticks));\n\t    };\n\t    /**\n\t\t *  Return the value of the beats in the current units\n\t\t *  @param {Number} beats\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Midi.prototype._beatsToUnits = function (beats) {\n\t        return Tone.Frequency.ftom(Tone.Frequency.prototype._beatsToUnits.call(this, beats));\n\t    };\n\t    /**\n\t\t *  Returns the value of a second in the current units\n\t\t *  @param {Seconds} seconds\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Midi.prototype._secondsToUnits = function (seconds) {\n\t        return Tone.Frequency.ftom(Tone.Frequency.prototype._secondsToUnits.call(this, seconds));\n\t    };\n\t    /**\n\t\t *  Return the value of the frequency as a MIDI note\n\t\t *  @return  {MIDI}\n\t\t *  @example\n\t\t * Tone.Midi(60).toMidi(); //60\n\t\t */\n\t    Tone.Midi.prototype.toMidi = function () {\n\t        return this.valueOf();\n\t    };\n\t    /**\n\t\t *  Return the value of the frequency as a MIDI note\n\t\t *  @return  {MIDI}\n\t\t *  @example\n\t\t * Tone.Midi(60).toMidi(); //60\n\t\t */\n\t    Tone.Midi.prototype.toFrequency = function () {\n\t        return Tone.Frequency.mtof(this.toMidi());\n\t    };\n\t    /**\n\t\t *  Transposes the frequency by the given number of semitones.\n\t\t *  @param  {Interval}  interval\n\t\t *  @return  {Tone.Frequency} A new transposed frequency\n\t\t *  @example\n\t\t * Tone.Frequency(\"A4\").transpose(3); //\"C5\"\n\t\t */\n\t    Tone.Midi.prototype.transpose = function (interval) {\n\t        return new this.constructor(this.toMidi() + interval);\n\t    };\n\t    return Tone.Midi;\n\t});\n\t\n\treturn Tone;\n}));","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n  byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n  var i = offset || 0;\n  var bth = byteToHex;\n  return bth[buf[i++]] + bth[buf[i++]] +\n          bth[buf[i++]] + bth[buf[i++]] + '-' +\n          bth[buf[i++]] + bth[buf[i++]] + '-' +\n          bth[buf[i++]] + bth[buf[i++]] + '-' +\n          bth[buf[i++]] + bth[buf[i++]] + '-' +\n          bth[buf[i++]] + bth[buf[i++]] +\n          bth[buf[i++]] + bth[buf[i++]] +\n          bth[buf[i++]] + bth[buf[i++]];\n}\n\nmodule.exports = bytesToUuid;\n","// Unique ID creation requires a high quality random # generator.  In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API.  We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues.bind(crypto)) ||\n                      (typeof(msCrypto) != 'undefined' && msCrypto.getRandomValues.bind(msCrypto));\nif (getRandomValues) {\n  // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n  var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n  module.exports = function whatwgRNG() {\n    getRandomValues(rnds8);\n    return rnds8;\n  };\n} else {\n  // Math.random()-based (RNG)\n  //\n  // If all else fails, use Math.random().  It's fast, but is of unspecified\n  // quality.\n  var rnds = new Array(16);\n\n  module.exports = function mathRNG() {\n    for (var i = 0, r; i < 16; i++) {\n      if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n      rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n    }\n\n    return rnds;\n  };\n}\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/broofa/node-uuid for API details\nfunction v1(options, buf, offset) {\n  var i = buf && offset || 0;\n  var b = buf || [];\n\n  options = options || {};\n  var node = options.node || _nodeId;\n  var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n  // node and clockseq need to be initialized to random values if they're not\n  // specified.  We do this lazily to minimize issues related to insufficient\n  // system entropy.  See #189\n  if (node == null || clockseq == null) {\n    var seedBytes = rng();\n    if (node == null) {\n      // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n      node = _nodeId = [\n        seedBytes[0] | 0x01,\n        seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]\n      ];\n    }\n    if (clockseq == null) {\n      // Per 4.2.2, randomize (14 bit) clockseq\n      clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n    }\n  }\n\n  // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n  // (1582-10-15 00:00).  JSNumbers aren't precise enough for this, so\n  // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n  // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n  var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n  // Per 4.2.1.2, use count of uuid's generated during the current clock\n  // cycle to simulate higher resolution clock\n  var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n  // Time since last uuid creation (in msecs)\n  var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n  // Per 4.2.1.2, Bump clockseq on clock regression\n  if (dt < 0 && options.clockseq === undefined) {\n    clockseq = clockseq + 1 & 0x3fff;\n  }\n\n  // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n  // time interval\n  if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n    nsecs = 0;\n  }\n\n  // Per 4.2.1.2 Throw error if too many uuids are requested\n  if (nsecs >= 10000) {\n    throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n  }\n\n  _lastMSecs = msecs;\n  _lastNSecs = nsecs;\n  _clockseq = clockseq;\n\n  // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n  msecs += 12219292800000;\n\n  // `time_low`\n  var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n  b[i++] = tl >>> 24 & 0xff;\n  b[i++] = tl >>> 16 & 0xff;\n  b[i++] = tl >>> 8 & 0xff;\n  b[i++] = tl & 0xff;\n\n  // `time_mid`\n  var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n  b[i++] = tmh >>> 8 & 0xff;\n  b[i++] = tmh & 0xff;\n\n  // `time_high_and_version`\n  b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n  b[i++] = tmh >>> 16 & 0xff;\n\n  // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n  b[i++] = clockseq >>> 8 | 0x80;\n\n  // `clock_seq_low`\n  b[i++] = clockseq & 0xff;\n\n  // `node`\n  for (var n = 0; n < 6; ++n) {\n    b[i + n] = node[n];\n  }\n\n  return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction valueEqual(a, b) {\n  if (a === b) return true;\n\n  if (a == null || b == null) return false;\n\n  if (Array.isArray(a)) {\n    return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {\n      return valueEqual(item, b[index]);\n    });\n  }\n\n  var aType = typeof a === 'undefined' ? 'undefined' : _typeof(a);\n  var bType = typeof b === 'undefined' ? 'undefined' : _typeof(b);\n\n  if (aType !== bType) return false;\n\n  if (aType === 'object') {\n    var aValue = a.valueOf();\n    var bValue = b.valueOf();\n\n    if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);\n\n    var aKeys = Object.keys(a);\n    var bKeys = Object.keys(b);\n\n    if (aKeys.length !== bKeys.length) return false;\n\n    return aKeys.every(function (key) {\n      return valueEqual(a[key], b[key]);\n    });\n  }\n\n  return false;\n}\n\nexport default valueEqual;","/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n  warning = function(condition, format, args) {\n    var len = arguments.length;\n    args = new Array(len > 2 ? len - 2 : 0);\n    for (var key = 2; key < len; key++) {\n      args[key - 2] = arguments[key];\n    }\n    if (format === undefined) {\n      throw new Error(\n        '`warning(condition, format, ...args)` requires a warning ' +\n        'message argument'\n      );\n    }\n\n    if (format.length < 10 || (/^[s\\W]*$/).test(format)) {\n      throw new Error(\n        'The warning format should be able to uniquely identify this ' +\n        'warning. Please, use a more descriptive format than: ' + format\n      );\n    }\n\n    if (!condition) {\n      var argIndex = 0;\n      var message = 'Warning: ' +\n        format.replace(/%s/g, function() {\n          return args[argIndex++];\n        });\n      if (typeof console !== 'undefined') {\n        console.error(message);\n      }\n      try {\n        // This error was thrown as a convenience so that you can use this stack\n        // to find the callsite that caused this warning to fire.\n        throw new Error(message);\n      } catch(x) {}\n    }\n  };\n}\n\nmodule.exports = warning;\n","module.exports = function() {\r\n\tthrow new Error(\"define cannot be used indirect\");\r\n};\r\n","/* globals __webpack_amd_options__ */\r\nmodule.exports = __webpack_amd_options__;\r\n","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1, eval)(\"this\");\r\n} catch (e) {\r\n\t// This works if the window reference is available\r\n\tif (typeof window === \"object\") g = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n","module.exports = function(originalModule) {\r\n\tif (!originalModule.webpackPolyfill) {\r\n\t\tvar module = Object.create(originalModule);\r\n\t\t// module.parent = undefined by default\r\n\t\tif (!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"exports\", {\r\n\t\t\tenumerable: true\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n","module.exports = function(module) {\r\n\tif (!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif (!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n  lookup[i] = code[i]\n  revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n  var len = b64.length\n\n  if (len % 4 > 0) {\n    throw new Error('Invalid string. Length must be a multiple of 4')\n  }\n\n  // Trim off extra bytes after placeholder bytes are found\n  // See: https://github.com/beatgammit/base64-js/issues/42\n  var validLen = b64.indexOf('=')\n  if (validLen === -1) validLen = len\n\n  var placeHoldersLen = validLen === len\n    ? 0\n    : 4 - (validLen % 4)\n\n  return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n  var lens = getLens(b64)\n  var validLen = lens[0]\n  var placeHoldersLen = lens[1]\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n  var tmp\n  var lens = getLens(b64)\n  var validLen = lens[0]\n  var placeHoldersLen = lens[1]\n\n  var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n  var curByte = 0\n\n  // if there are placeholders, only get up to the last complete 4 chars\n  var len = placeHoldersLen > 0\n    ? validLen - 4\n    : validLen\n\n  for (var i = 0; i < len; i += 4) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 18) |\n      (revLookup[b64.charCodeAt(i + 1)] << 12) |\n      (revLookup[b64.charCodeAt(i + 2)] << 6) |\n      revLookup[b64.charCodeAt(i + 3)]\n    arr[curByte++] = (tmp >> 16) & 0xFF\n    arr[curByte++] = (tmp >> 8) & 0xFF\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  if (placeHoldersLen === 2) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 2) |\n      (revLookup[b64.charCodeAt(i + 1)] >> 4)\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  if (placeHoldersLen === 1) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 10) |\n      (revLookup[b64.charCodeAt(i + 1)] << 4) |\n      (revLookup[b64.charCodeAt(i + 2)] >> 2)\n    arr[curByte++] = (tmp >> 8) & 0xFF\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  return arr\n}\n\nfunction tripletToBase64 (num) {\n  return lookup[num >> 18 & 0x3F] +\n    lookup[num >> 12 & 0x3F] +\n    lookup[num >> 6 & 0x3F] +\n    lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n  var tmp\n  var output = []\n  for (var i = start; i < end; i += 3) {\n    tmp =\n      ((uint8[i] << 16) & 0xFF0000) +\n      ((uint8[i + 1] << 8) & 0xFF00) +\n      (uint8[i + 2] & 0xFF)\n    output.push(tripletToBase64(tmp))\n  }\n  return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n  var tmp\n  var len = uint8.length\n  var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n  var parts = []\n  var maxChunkLength = 16383 // must be multiple of 3\n\n  // go through the array every three bytes, we'll deal with trailing stuff later\n  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n    parts.push(encodeChunk(\n      uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n    ))\n  }\n\n  // pad the end with zeros, but make sure to not forget the extra bytes\n  if (extraBytes === 1) {\n    tmp = uint8[len - 1]\n    parts.push(\n      lookup[tmp >> 2] +\n      lookup[(tmp << 4) & 0x3F] +\n      '=='\n    )\n  } else if (extraBytes === 2) {\n    tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n    parts.push(\n      lookup[tmp >> 10] +\n      lookup[(tmp >> 4) & 0x3F] +\n      lookup[(tmp << 2) & 0x3F] +\n      '='\n    )\n  }\n\n  return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>\n * @license  MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n *   === true    Use Uint8Array implementation (fastest)\n *   === false   Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n *   - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n *     See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n *   - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n *   - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n *     incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n  ? global.TYPED_ARRAY_SUPPORT\n  : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n  try {\n    var arr = new Uint8Array(1)\n    arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n    return arr.foo() === 42 && // typed array instances can be augmented\n        typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n        arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n  } catch (e) {\n    return false\n  }\n}\n\nfunction kMaxLength () {\n  return Buffer.TYPED_ARRAY_SUPPORT\n    ? 0x7fffffff\n    : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n  if (kMaxLength() < length) {\n    throw new RangeError('Invalid typed array length')\n  }\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    // Return an augmented `Uint8Array` instance, for best performance\n    that = new Uint8Array(length)\n    that.__proto__ = Buffer.prototype\n  } else {\n    // Fallback: Return an object instance of the Buffer class\n    if (that === null) {\n      that = new Buffer(length)\n    }\n    that.length = length\n  }\n\n  return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n  if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n    return new Buffer(arg, encodingOrOffset, length)\n  }\n\n  // Common case.\n  if (typeof arg === 'number') {\n    if (typeof encodingOrOffset === 'string') {\n      throw new Error(\n        'If encoding is specified then the first argument must be a string'\n      )\n    }\n    return allocUnsafe(this, arg)\n  }\n  return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n  arr.__proto__ = Buffer.prototype\n  return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n  if (typeof value === 'number') {\n    throw new TypeError('\"value\" argument must not be a number')\n  }\n\n  if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n    return fromArrayBuffer(that, value, encodingOrOffset, length)\n  }\n\n  if (typeof value === 'string') {\n    return fromString(that, value, encodingOrOffset)\n  }\n\n  return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n  return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n  Buffer.prototype.__proto__ = Uint8Array.prototype\n  Buffer.__proto__ = Uint8Array\n  if (typeof Symbol !== 'undefined' && Symbol.species &&\n      Buffer[Symbol.species] === Buffer) {\n    // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n    Object.defineProperty(Buffer, Symbol.species, {\n      value: null,\n      configurable: true\n    })\n  }\n}\n\nfunction assertSize (size) {\n  if (typeof size !== 'number') {\n    throw new TypeError('\"size\" argument must be a number')\n  } else if (size < 0) {\n    throw new RangeError('\"size\" argument must not be negative')\n  }\n}\n\nfunction alloc (that, size, fill, encoding) {\n  assertSize(size)\n  if (size <= 0) {\n    return createBuffer(that, size)\n  }\n  if (fill !== undefined) {\n    // Only pay attention to encoding if it's a string. This\n    // prevents accidentally sending in a number that would\n    // be interpretted as a start offset.\n    return typeof encoding === 'string'\n      ? createBuffer(that, size).fill(fill, encoding)\n      : createBuffer(that, size).fill(fill)\n  }\n  return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n  return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n  assertSize(size)\n  that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) {\n    for (var i = 0; i < size; ++i) {\n      that[i] = 0\n    }\n  }\n  return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n  return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n  return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n  if (typeof encoding !== 'string' || encoding === '') {\n    encoding = 'utf8'\n  }\n\n  if (!Buffer.isEncoding(encoding)) {\n    throw new TypeError('\"encoding\" must be a valid string encoding')\n  }\n\n  var length = byteLength(string, encoding) | 0\n  that = createBuffer(that, length)\n\n  var actual = that.write(string, encoding)\n\n  if (actual !== length) {\n    // Writing a hex string, for example, that contains invalid characters will\n    // cause everything after the first invalid character to be ignored. (e.g.\n    // 'abxxcd' will be treated as 'ab')\n    that = that.slice(0, actual)\n  }\n\n  return that\n}\n\nfunction fromArrayLike (that, array) {\n  var length = array.length < 0 ? 0 : checked(array.length) | 0\n  that = createBuffer(that, length)\n  for (var i = 0; i < length; i += 1) {\n    that[i] = array[i] & 255\n  }\n  return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n  array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n  if (byteOffset < 0 || array.byteLength < byteOffset) {\n    throw new RangeError('\\'offset\\' is out of bounds')\n  }\n\n  if (array.byteLength < byteOffset + (length || 0)) {\n    throw new RangeError('\\'length\\' is out of bounds')\n  }\n\n  if (byteOffset === undefined && length === undefined) {\n    array = new Uint8Array(array)\n  } else if (length === undefined) {\n    array = new Uint8Array(array, byteOffset)\n  } else {\n    array = new Uint8Array(array, byteOffset, length)\n  }\n\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    // Return an augmented `Uint8Array` instance, for best performance\n    that = array\n    that.__proto__ = Buffer.prototype\n  } else {\n    // Fallback: Return an object instance of the Buffer class\n    that = fromArrayLike(that, array)\n  }\n  return that\n}\n\nfunction fromObject (that, obj) {\n  if (Buffer.isBuffer(obj)) {\n    var len = checked(obj.length) | 0\n    that = createBuffer(that, len)\n\n    if (that.length === 0) {\n      return that\n    }\n\n    obj.copy(that, 0, 0, len)\n    return that\n  }\n\n  if (obj) {\n    if ((typeof ArrayBuffer !== 'undefined' &&\n        obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n      if (typeof obj.length !== 'number' || isnan(obj.length)) {\n        return createBuffer(that, 0)\n      }\n      return fromArrayLike(that, obj)\n    }\n\n    if (obj.type === 'Buffer' && isArray(obj.data)) {\n      return fromArrayLike(that, obj.data)\n    }\n  }\n\n  throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n  // Note: cannot use `length < kMaxLength()` here because that fails when\n  // length is NaN (which is otherwise coerced to zero.)\n  if (length >= kMaxLength()) {\n    throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n                         'size: 0x' + kMaxLength().toString(16) + ' bytes')\n  }\n  return length | 0\n}\n\nfunction SlowBuffer (length) {\n  if (+length != length) { // eslint-disable-line eqeqeq\n    length = 0\n  }\n  return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n  return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n  if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n    throw new TypeError('Arguments must be Buffers')\n  }\n\n  if (a === b) return 0\n\n  var x = a.length\n  var y = b.length\n\n  for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n    if (a[i] !== b[i]) {\n      x = a[i]\n      y = b[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n  switch (String(encoding).toLowerCase()) {\n    case 'hex':\n    case 'utf8':\n    case 'utf-8':\n    case 'ascii':\n    case 'latin1':\n    case 'binary':\n    case 'base64':\n    case 'ucs2':\n    case 'ucs-2':\n    case 'utf16le':\n    case 'utf-16le':\n      return true\n    default:\n      return false\n  }\n}\n\nBuffer.concat = function concat (list, length) {\n  if (!isArray(list)) {\n    throw new TypeError('\"list\" argument must be an Array of Buffers')\n  }\n\n  if (list.length === 0) {\n    return Buffer.alloc(0)\n  }\n\n  var i\n  if (length === undefined) {\n    length = 0\n    for (i = 0; i < list.length; ++i) {\n      length += list[i].length\n    }\n  }\n\n  var buffer = Buffer.allocUnsafe(length)\n  var pos = 0\n  for (i = 0; i < list.length; ++i) {\n    var buf = list[i]\n    if (!Buffer.isBuffer(buf)) {\n      throw new TypeError('\"list\" argument must be an Array of Buffers')\n    }\n    buf.copy(buffer, pos)\n    pos += buf.length\n  }\n  return buffer\n}\n\nfunction byteLength (string, encoding) {\n  if (Buffer.isBuffer(string)) {\n    return string.length\n  }\n  if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n      (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n    return string.byteLength\n  }\n  if (typeof string !== 'string') {\n    string = '' + string\n  }\n\n  var len = string.length\n  if (len === 0) return 0\n\n  // Use a for loop to avoid recursion\n  var loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'ascii':\n      case 'latin1':\n      case 'binary':\n        return len\n      case 'utf8':\n      case 'utf-8':\n      case undefined:\n        return utf8ToBytes(string).length\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return len * 2\n      case 'hex':\n        return len >>> 1\n      case 'base64':\n        return base64ToBytes(string).length\n      default:\n        if (loweredCase) return utf8ToBytes(string).length // assume utf8\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n  var loweredCase = false\n\n  // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n  // property of a typed array.\n\n  // This behaves neither like String nor Uint8Array in that we set start/end\n  // to their upper/lower bounds if the value passed is out of range.\n  // undefined is handled specially as per ECMA-262 6th Edition,\n  // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n  if (start === undefined || start < 0) {\n    start = 0\n  }\n  // Return early if start > this.length. Done here to prevent potential uint32\n  // coercion fail below.\n  if (start > this.length) {\n    return ''\n  }\n\n  if (end === undefined || end > this.length) {\n    end = this.length\n  }\n\n  if (end <= 0) {\n    return ''\n  }\n\n  // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n  end >>>= 0\n  start >>>= 0\n\n  if (end <= start) {\n    return ''\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  while (true) {\n    switch (encoding) {\n      case 'hex':\n        return hexSlice(this, start, end)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Slice(this, start, end)\n\n      case 'ascii':\n        return asciiSlice(this, start, end)\n\n      case 'latin1':\n      case 'binary':\n        return latin1Slice(this, start, end)\n\n      case 'base64':\n        return base64Slice(this, start, end)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return utf16leSlice(this, start, end)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = (encoding + '').toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n  var i = b[n]\n  b[n] = b[m]\n  b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n  var len = this.length\n  if (len % 2 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 16-bits')\n  }\n  for (var i = 0; i < len; i += 2) {\n    swap(this, i, i + 1)\n  }\n  return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n  var len = this.length\n  if (len % 4 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 32-bits')\n  }\n  for (var i = 0; i < len; i += 4) {\n    swap(this, i, i + 3)\n    swap(this, i + 1, i + 2)\n  }\n  return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n  var len = this.length\n  if (len % 8 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 64-bits')\n  }\n  for (var i = 0; i < len; i += 8) {\n    swap(this, i, i + 7)\n    swap(this, i + 1, i + 6)\n    swap(this, i + 2, i + 5)\n    swap(this, i + 3, i + 4)\n  }\n  return this\n}\n\nBuffer.prototype.toString = function toString () {\n  var length = this.length | 0\n  if (length === 0) return ''\n  if (arguments.length === 0) return utf8Slice(this, 0, length)\n  return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n  if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n  if (this === b) return true\n  return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n  var str = ''\n  var max = exports.INSPECT_MAX_BYTES\n  if (this.length > 0) {\n    str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n    if (this.length > max) str += ' ... '\n  }\n  return '<Buffer ' + str + '>'\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n  if (!Buffer.isBuffer(target)) {\n    throw new TypeError('Argument must be a Buffer')\n  }\n\n  if (start === undefined) {\n    start = 0\n  }\n  if (end === undefined) {\n    end = target ? target.length : 0\n  }\n  if (thisStart === undefined) {\n    thisStart = 0\n  }\n  if (thisEnd === undefined) {\n    thisEnd = this.length\n  }\n\n  if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n    throw new RangeError('out of range index')\n  }\n\n  if (thisStart >= thisEnd && start >= end) {\n    return 0\n  }\n  if (thisStart >= thisEnd) {\n    return -1\n  }\n  if (start >= end) {\n    return 1\n  }\n\n  start >>>= 0\n  end >>>= 0\n  thisStart >>>= 0\n  thisEnd >>>= 0\n\n  if (this === target) return 0\n\n  var x = thisEnd - thisStart\n  var y = end - start\n  var len = Math.min(x, y)\n\n  var thisCopy = this.slice(thisStart, thisEnd)\n  var targetCopy = target.slice(start, end)\n\n  for (var i = 0; i < len; ++i) {\n    if (thisCopy[i] !== targetCopy[i]) {\n      x = thisCopy[i]\n      y = targetCopy[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n  // Empty buffer means no match\n  if (buffer.length === 0) return -1\n\n  // Normalize byteOffset\n  if (typeof byteOffset === 'string') {\n    encoding = byteOffset\n    byteOffset = 0\n  } else if (byteOffset > 0x7fffffff) {\n    byteOffset = 0x7fffffff\n  } else if (byteOffset < -0x80000000) {\n    byteOffset = -0x80000000\n  }\n  byteOffset = +byteOffset  // Coerce to Number.\n  if (isNaN(byteOffset)) {\n    // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n    byteOffset = dir ? 0 : (buffer.length - 1)\n  }\n\n  // Normalize byteOffset: negative offsets start from the end of the buffer\n  if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n  if (byteOffset >= buffer.length) {\n    if (dir) return -1\n    else byteOffset = buffer.length - 1\n  } else if (byteOffset < 0) {\n    if (dir) byteOffset = 0\n    else return -1\n  }\n\n  // Normalize val\n  if (typeof val === 'string') {\n    val = Buffer.from(val, encoding)\n  }\n\n  // Finally, search either indexOf (if dir is true) or lastIndexOf\n  if (Buffer.isBuffer(val)) {\n    // Special case: looking for empty string/buffer always fails\n    if (val.length === 0) {\n      return -1\n    }\n    return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n  } else if (typeof val === 'number') {\n    val = val & 0xFF // Search for a byte value [0-255]\n    if (Buffer.TYPED_ARRAY_SUPPORT &&\n        typeof Uint8Array.prototype.indexOf === 'function') {\n      if (dir) {\n        return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n      } else {\n        return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n      }\n    }\n    return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n  }\n\n  throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n  var indexSize = 1\n  var arrLength = arr.length\n  var valLength = val.length\n\n  if (encoding !== undefined) {\n    encoding = String(encoding).toLowerCase()\n    if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n        encoding === 'utf16le' || encoding === 'utf-16le') {\n      if (arr.length < 2 || val.length < 2) {\n        return -1\n      }\n      indexSize = 2\n      arrLength /= 2\n      valLength /= 2\n      byteOffset /= 2\n    }\n  }\n\n  function read (buf, i) {\n    if (indexSize === 1) {\n      return buf[i]\n    } else {\n      return buf.readUInt16BE(i * indexSize)\n    }\n  }\n\n  var i\n  if (dir) {\n    var foundIndex = -1\n    for (i = byteOffset; i < arrLength; i++) {\n      if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n        if (foundIndex === -1) foundIndex = i\n        if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n      } else {\n        if (foundIndex !== -1) i -= i - foundIndex\n        foundIndex = -1\n      }\n    }\n  } else {\n    if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n    for (i = byteOffset; i >= 0; i--) {\n      var found = true\n      for (var j = 0; j < valLength; j++) {\n        if (read(arr, i + j) !== read(val, j)) {\n          found = false\n          break\n        }\n      }\n      if (found) return i\n    }\n  }\n\n  return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n  return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n  offset = Number(offset) || 0\n  var remaining = buf.length - offset\n  if (!length) {\n    length = remaining\n  } else {\n    length = Number(length)\n    if (length > remaining) {\n      length = remaining\n    }\n  }\n\n  // must be an even number of digits\n  var strLen = string.length\n  if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n  if (length > strLen / 2) {\n    length = strLen / 2\n  }\n  for (var i = 0; i < length; ++i) {\n    var parsed = parseInt(string.substr(i * 2, 2), 16)\n    if (isNaN(parsed)) return i\n    buf[offset + i] = parsed\n  }\n  return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n  return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n  return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n  return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n  return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n  return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n  // Buffer#write(string)\n  if (offset === undefined) {\n    encoding = 'utf8'\n    length = this.length\n    offset = 0\n  // Buffer#write(string, encoding)\n  } else if (length === undefined && typeof offset === 'string') {\n    encoding = offset\n    length = this.length\n    offset = 0\n  // Buffer#write(string, offset[, length][, encoding])\n  } else if (isFinite(offset)) {\n    offset = offset | 0\n    if (isFinite(length)) {\n      length = length | 0\n      if (encoding === undefined) encoding = 'utf8'\n    } else {\n      encoding = length\n      length = undefined\n    }\n  // legacy write(string, encoding, offset, length) - remove in v0.13\n  } else {\n    throw new Error(\n      'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n    )\n  }\n\n  var remaining = this.length - offset\n  if (length === undefined || length > remaining) length = remaining\n\n  if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n    throw new RangeError('Attempt to write outside buffer bounds')\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  var loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'hex':\n        return hexWrite(this, string, offset, length)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Write(this, string, offset, length)\n\n      case 'ascii':\n        return asciiWrite(this, string, offset, length)\n\n      case 'latin1':\n      case 'binary':\n        return latin1Write(this, string, offset, length)\n\n      case 'base64':\n        // Warning: maxLength not taken into account in base64Write\n        return base64Write(this, string, offset, length)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return ucs2Write(this, string, offset, length)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n  return {\n    type: 'Buffer',\n    data: Array.prototype.slice.call(this._arr || this, 0)\n  }\n}\n\nfunction base64Slice (buf, start, end) {\n  if (start === 0 && end === buf.length) {\n    return base64.fromByteArray(buf)\n  } else {\n    return base64.fromByteArray(buf.slice(start, end))\n  }\n}\n\nfunction utf8Slice (buf, start, end) {\n  end = Math.min(buf.length, end)\n  var res = []\n\n  var i = start\n  while (i < end) {\n    var firstByte = buf[i]\n    var codePoint = null\n    var bytesPerSequence = (firstByte > 0xEF) ? 4\n      : (firstByte > 0xDF) ? 3\n      : (firstByte > 0xBF) ? 2\n      : 1\n\n    if (i + bytesPerSequence <= end) {\n      var secondByte, thirdByte, fourthByte, tempCodePoint\n\n      switch (bytesPerSequence) {\n        case 1:\n          if (firstByte < 0x80) {\n            codePoint = firstByte\n          }\n          break\n        case 2:\n          secondByte = buf[i + 1]\n          if ((secondByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n            if (tempCodePoint > 0x7F) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 3:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n            if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 4:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          fourthByte = buf[i + 3]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n            if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n              codePoint = tempCodePoint\n            }\n          }\n      }\n    }\n\n    if (codePoint === null) {\n      // we did not generate a valid codePoint so insert a\n      // replacement char (U+FFFD) and advance only 1 byte\n      codePoint = 0xFFFD\n      bytesPerSequence = 1\n    } else if (codePoint > 0xFFFF) {\n      // encode to utf16 (surrogate pair dance)\n      codePoint -= 0x10000\n      res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n      codePoint = 0xDC00 | codePoint & 0x3FF\n    }\n\n    res.push(codePoint)\n    i += bytesPerSequence\n  }\n\n  return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n  var len = codePoints.length\n  if (len <= MAX_ARGUMENTS_LENGTH) {\n    return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n  }\n\n  // Decode in chunks to avoid \"call stack size exceeded\".\n  var res = ''\n  var i = 0\n  while (i < len) {\n    res += String.fromCharCode.apply(\n      String,\n      codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n    )\n  }\n  return res\n}\n\nfunction asciiSlice (buf, start, end) {\n  var ret = ''\n  end = Math.min(buf.length, end)\n\n  for (var i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i] & 0x7F)\n  }\n  return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n  var ret = ''\n  end = Math.min(buf.length, end)\n\n  for (var i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i])\n  }\n  return ret\n}\n\nfunction hexSlice (buf, start, end) {\n  var len = buf.length\n\n  if (!start || start < 0) start = 0\n  if (!end || end < 0 || end > len) end = len\n\n  var out = ''\n  for (var i = start; i < end; ++i) {\n    out += toHex(buf[i])\n  }\n  return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n  var bytes = buf.slice(start, end)\n  var res = ''\n  for (var i = 0; i < bytes.length; i += 2) {\n    res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n  }\n  return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n  var len = this.length\n  start = ~~start\n  end = end === undefined ? len : ~~end\n\n  if (start < 0) {\n    start += len\n    if (start < 0) start = 0\n  } else if (start > len) {\n    start = len\n  }\n\n  if (end < 0) {\n    end += len\n    if (end < 0) end = 0\n  } else if (end > len) {\n    end = len\n  }\n\n  if (end < start) end = start\n\n  var newBuf\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    newBuf = this.subarray(start, end)\n    newBuf.__proto__ = Buffer.prototype\n  } else {\n    var sliceLen = end - start\n    newBuf = new Buffer(sliceLen, undefined)\n    for (var i = 0; i < sliceLen; ++i) {\n      newBuf[i] = this[i + start]\n    }\n  }\n\n  return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n  if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n  if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var val = this[offset]\n  var mul = 1\n  var i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    checkOffset(offset, byteLength, this.length)\n  }\n\n  var val = this[offset + --byteLength]\n  var mul = 1\n  while (byteLength > 0 && (mul *= 0x100)) {\n    val += this[offset + --byteLength] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return ((this[offset]) |\n      (this[offset + 1] << 8) |\n      (this[offset + 2] << 16)) +\n      (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] * 0x1000000) +\n    ((this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var val = this[offset]\n  var mul = 1\n  var i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var i = byteLength\n  var mul = 1\n  var val = this[offset + --i]\n  while (i > 0 && (mul *= 0x100)) {\n    val += this[offset + --i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  if (!(this[offset] & 0x80)) return (this[offset])\n  return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  var val = this[offset] | (this[offset + 1] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  var val = this[offset + 1] | (this[offset] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset]) |\n    (this[offset + 1] << 8) |\n    (this[offset + 2] << 16) |\n    (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] << 24) |\n    (this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n  if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n  if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  var mul = 1\n  var i = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  var i = byteLength - 1\n  var mul = 1\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n  if (value < 0) value = 0xffff + value + 1\n  for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n    buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n      (littleEndian ? i : 1 - i) * 8\n  }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n  } else {\n    objectWriteUInt16(this, value, offset, true)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 8)\n    this[offset + 1] = (value & 0xff)\n  } else {\n    objectWriteUInt16(this, value, offset, false)\n  }\n  return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n  if (value < 0) value = 0xffffffff + value + 1\n  for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n    buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n  }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset + 3] = (value >>> 24)\n    this[offset + 2] = (value >>> 16)\n    this[offset + 1] = (value >>> 8)\n    this[offset] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, true)\n  }\n  return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 24)\n    this[offset + 1] = (value >>> 16)\n    this[offset + 2] = (value >>> 8)\n    this[offset + 3] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, false)\n  }\n  return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) {\n    var limit = Math.pow(2, 8 * byteLength - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  var i = 0\n  var mul = 1\n  var sub = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) {\n    var limit = Math.pow(2, 8 * byteLength - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  var i = byteLength - 1\n  var mul = 1\n  var sub = 0\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n  if (value < 0) value = 0xff + value + 1\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n  } else {\n    objectWriteUInt16(this, value, offset, true)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 8)\n    this[offset + 1] = (value & 0xff)\n  } else {\n    objectWriteUInt16(this, value, offset, false)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n    this[offset + 2] = (value >>> 16)\n    this[offset + 3] = (value >>> 24)\n  } else {\n    objectWriteUInt32(this, value, offset, true)\n  }\n  return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  if (value < 0) value = 0xffffffff + value + 1\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 24)\n    this[offset + 1] = (value >>> 16)\n    this[offset + 2] = (value >>> 8)\n    this[offset + 3] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, false)\n  }\n  return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n  if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 23, 4)\n  return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 52, 8)\n  return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n  if (!start) start = 0\n  if (!end && end !== 0) end = this.length\n  if (targetStart >= target.length) targetStart = target.length\n  if (!targetStart) targetStart = 0\n  if (end > 0 && end < start) end = start\n\n  // Copy 0 bytes; we're done\n  if (end === start) return 0\n  if (target.length === 0 || this.length === 0) return 0\n\n  // Fatal error conditions\n  if (targetStart < 0) {\n    throw new RangeError('targetStart out of bounds')\n  }\n  if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n  if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n  // Are we oob?\n  if (end > this.length) end = this.length\n  if (target.length - targetStart < end - start) {\n    end = target.length - targetStart + start\n  }\n\n  var len = end - start\n  var i\n\n  if (this === target && start < targetStart && targetStart < end) {\n    // descending copy from end\n    for (i = len - 1; i >= 0; --i) {\n      target[i + targetStart] = this[i + start]\n    }\n  } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n    // ascending copy from start\n    for (i = 0; i < len; ++i) {\n      target[i + targetStart] = this[i + start]\n    }\n  } else {\n    Uint8Array.prototype.set.call(\n      target,\n      this.subarray(start, start + len),\n      targetStart\n    )\n  }\n\n  return len\n}\n\n// Usage:\n//    buffer.fill(number[, offset[, end]])\n//    buffer.fill(buffer[, offset[, end]])\n//    buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n  // Handle string cases:\n  if (typeof val === 'string') {\n    if (typeof start === 'string') {\n      encoding = start\n      start = 0\n      end = this.length\n    } else if (typeof end === 'string') {\n      encoding = end\n      end = this.length\n    }\n    if (val.length === 1) {\n      var code = val.charCodeAt(0)\n      if (code < 256) {\n        val = code\n      }\n    }\n    if (encoding !== undefined && typeof encoding !== 'string') {\n      throw new TypeError('encoding must be a string')\n    }\n    if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n      throw new TypeError('Unknown encoding: ' + encoding)\n    }\n  } else if (typeof val === 'number') {\n    val = val & 255\n  }\n\n  // Invalid ranges are not set to a default, so can range check early.\n  if (start < 0 || this.length < start || this.length < end) {\n    throw new RangeError('Out of range index')\n  }\n\n  if (end <= start) {\n    return this\n  }\n\n  start = start >>> 0\n  end = end === undefined ? this.length : end >>> 0\n\n  if (!val) val = 0\n\n  var i\n  if (typeof val === 'number') {\n    for (i = start; i < end; ++i) {\n      this[i] = val\n    }\n  } else {\n    var bytes = Buffer.isBuffer(val)\n      ? val\n      : utf8ToBytes(new Buffer(val, encoding).toString())\n    var len = bytes.length\n    for (i = 0; i < end - start; ++i) {\n      this[i + start] = bytes[i % len]\n    }\n  }\n\n  return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n  // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n  str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n  // Node converts strings with length < 2 to ''\n  if (str.length < 2) return ''\n  // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n  while (str.length % 4 !== 0) {\n    str = str + '='\n  }\n  return str\n}\n\nfunction stringtrim (str) {\n  if (str.trim) return str.trim()\n  return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n  if (n < 16) return '0' + n.toString(16)\n  return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n  units = units || Infinity\n  var codePoint\n  var length = string.length\n  var leadSurrogate = null\n  var bytes = []\n\n  for (var i = 0; i < length; ++i) {\n    codePoint = string.charCodeAt(i)\n\n    // is surrogate component\n    if (codePoint > 0xD7FF && codePoint < 0xE000) {\n      // last char was a lead\n      if (!leadSurrogate) {\n        // no lead yet\n        if (codePoint > 0xDBFF) {\n          // unexpected trail\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        } else if (i + 1 === length) {\n          // unpaired lead\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        }\n\n        // valid lead\n        leadSurrogate = codePoint\n\n        continue\n      }\n\n      // 2 leads in a row\n      if (codePoint < 0xDC00) {\n        if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n        leadSurrogate = codePoint\n        continue\n      }\n\n      // valid surrogate pair\n      codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n    } else if (leadSurrogate) {\n      // valid bmp char, but last char was a lead\n      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n    }\n\n    leadSurrogate = null\n\n    // encode utf8\n    if (codePoint < 0x80) {\n      if ((units -= 1) < 0) break\n      bytes.push(codePoint)\n    } else if (codePoint < 0x800) {\n      if ((units -= 2) < 0) break\n      bytes.push(\n        codePoint >> 0x6 | 0xC0,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x10000) {\n      if ((units -= 3) < 0) break\n      bytes.push(\n        codePoint >> 0xC | 0xE0,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x110000) {\n      if ((units -= 4) < 0) break\n      bytes.push(\n        codePoint >> 0x12 | 0xF0,\n        codePoint >> 0xC & 0x3F | 0x80,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else {\n      throw new Error('Invalid code point')\n    }\n  }\n\n  return bytes\n}\n\nfunction asciiToBytes (str) {\n  var byteArray = []\n  for (var i = 0; i < str.length; ++i) {\n    // Node's code seems to be doing this and not & 0x7F..\n    byteArray.push(str.charCodeAt(i) & 0xFF)\n  }\n  return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n  var c, hi, lo\n  var byteArray = []\n  for (var i = 0; i < str.length; ++i) {\n    if ((units -= 2) < 0) break\n\n    c = str.charCodeAt(i)\n    hi = c >> 8\n    lo = c % 256\n    byteArray.push(lo)\n    byteArray.push(hi)\n  }\n\n  return byteArray\n}\n\nfunction base64ToBytes (str) {\n  return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n  for (var i = 0; i < length; ++i) {\n    if ((i + offset >= dst.length) || (i >= src.length)) break\n    dst[i + offset] = src[i]\n  }\n  return i\n}\n\nfunction isnan (val) {\n  return val !== val // eslint-disable-line no-self-compare\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\n\nfunction isArray(arg) {\n  if (Array.isArray) {\n    return Array.isArray(arg);\n  }\n  return objectToString(arg) === '[object Array]';\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n  return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n  return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n  return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n  return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n  return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n  return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n  return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n  return objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n  return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n  return objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n  return (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n  return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n  return arg === null ||\n         typeof arg === 'boolean' ||\n         typeof arg === 'number' ||\n         typeof arg === 'string' ||\n         typeof arg === 'symbol' ||  // ES6 symbol\n         typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = Buffer.isBuffer;\n\nfunction objectToString(o) {\n  return Object.prototype.toString.call(o);\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nfunction EventEmitter() {\n  this._events = this._events || {};\n  this._maxListeners = this._maxListeners || undefined;\n}\nmodule.exports = EventEmitter;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nEventEmitter.defaultMaxListeners = 10;\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function(n) {\n  if (!isNumber(n) || n < 0 || isNaN(n))\n    throw TypeError('n must be a positive number');\n  this._maxListeners = n;\n  return this;\n};\n\nEventEmitter.prototype.emit = function(type) {\n  var er, handler, len, args, i, listeners;\n\n  if (!this._events)\n    this._events = {};\n\n  // If there is no 'error' event listener then throw.\n  if (type === 'error') {\n    if (!this._events.error ||\n        (isObject(this._events.error) && !this._events.error.length)) {\n      er = arguments[1];\n      if (er instanceof Error) {\n        throw er; // Unhandled 'error' event\n      } else {\n        // At least give some kind of context to the user\n        var err = new Error('Uncaught, unspecified \"error\" event. (' + er + ')');\n        err.context = er;\n        throw err;\n      }\n    }\n  }\n\n  handler = this._events[type];\n\n  if (isUndefined(handler))\n    return false;\n\n  if (isFunction(handler)) {\n    switch (arguments.length) {\n      // fast cases\n      case 1:\n        handler.call(this);\n        break;\n      case 2:\n        handler.call(this, arguments[1]);\n        break;\n      case 3:\n        handler.call(this, arguments[1], arguments[2]);\n        break;\n      // slower\n      default:\n        args = Array.prototype.slice.call(arguments, 1);\n        handler.apply(this, args);\n    }\n  } else if (isObject(handler)) {\n    args = Array.prototype.slice.call(arguments, 1);\n    listeners = handler.slice();\n    len = listeners.length;\n    for (i = 0; i < len; i++)\n      listeners[i].apply(this, args);\n  }\n\n  return true;\n};\n\nEventEmitter.prototype.addListener = function(type, listener) {\n  var m;\n\n  if (!isFunction(listener))\n    throw TypeError('listener must be a function');\n\n  if (!this._events)\n    this._events = {};\n\n  // To avoid recursion in the case that type === \"newListener\"! Before\n  // adding it to the listeners, first emit \"newListener\".\n  if (this._events.newListener)\n    this.emit('newListener', type,\n              isFunction(listener.listener) ?\n              listener.listener : listener);\n\n  if (!this._events[type])\n    // Optimize the case of one listener. Don't need the extra array object.\n    this._events[type] = listener;\n  else if (isObject(this._events[type]))\n    // If we've already got an array, just append.\n    this._events[type].push(listener);\n  else\n    // Adding the second element, need to change to array.\n    this._events[type] = [this._events[type], listener];\n\n  // Check for listener leak\n  if (isObject(this._events[type]) && !this._events[type].warned) {\n    if (!isUndefined(this._maxListeners)) {\n      m = this._maxListeners;\n    } else {\n      m = EventEmitter.defaultMaxListeners;\n    }\n\n    if (m && m > 0 && this._events[type].length > m) {\n      this._events[type].warned = true;\n      console.error('(node) warning: possible EventEmitter memory ' +\n                    'leak detected. %d listeners added. ' +\n                    'Use emitter.setMaxListeners() to increase limit.',\n                    this._events[type].length);\n      if (typeof console.trace === 'function') {\n        // not supported in IE 10\n        console.trace();\n      }\n    }\n  }\n\n  return this;\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.once = function(type, listener) {\n  if (!isFunction(listener))\n    throw TypeError('listener must be a function');\n\n  var fired = false;\n\n  function g() {\n    this.removeListener(type, g);\n\n    if (!fired) {\n      fired = true;\n      listener.apply(this, arguments);\n    }\n  }\n\n  g.listener = listener;\n  this.on(type, g);\n\n  return this;\n};\n\n// emits a 'removeListener' event iff the listener was removed\nEventEmitter.prototype.removeListener = function(type, listener) {\n  var list, position, length, i;\n\n  if (!isFunction(listener))\n    throw TypeError('listener must be a function');\n\n  if (!this._events || !this._events[type])\n    return this;\n\n  list = this._events[type];\n  length = list.length;\n  position = -1;\n\n  if (list === listener ||\n      (isFunction(list.listener) && list.listener === listener)) {\n    delete this._events[type];\n    if (this._events.removeListener)\n      this.emit('removeListener', type, listener);\n\n  } else if (isObject(list)) {\n    for (i = length; i-- > 0;) {\n      if (list[i] === listener ||\n          (list[i].listener && list[i].listener === listener)) {\n        position = i;\n        break;\n      }\n    }\n\n    if (position < 0)\n      return this;\n\n    if (list.length === 1) {\n      list.length = 0;\n      delete this._events[type];\n    } else {\n      list.splice(position, 1);\n    }\n\n    if (this._events.removeListener)\n      this.emit('removeListener', type, listener);\n  }\n\n  return this;\n};\n\nEventEmitter.prototype.removeAllListeners = function(type) {\n  var key, listeners;\n\n  if (!this._events)\n    return this;\n\n  // not listening for removeListener, no need to emit\n  if (!this._events.removeListener) {\n    if (arguments.length === 0)\n      this._events = {};\n    else if (this._events[type])\n      delete this._events[type];\n    return this;\n  }\n\n  // emit removeListener for all listeners on all events\n  if (arguments.length === 0) {\n    for (key in this._events) {\n      if (key === 'removeListener') continue;\n      this.removeAllListeners(key);\n    }\n    this.removeAllListeners('removeListener');\n    this._events = {};\n    return this;\n  }\n\n  listeners = this._events[type];\n\n  if (isFunction(listeners)) {\n    this.removeListener(type, listeners);\n  } else if (listeners) {\n    // LIFO order\n    while (listeners.length)\n      this.removeListener(type, listeners[listeners.length - 1]);\n  }\n  delete this._events[type];\n\n  return this;\n};\n\nEventEmitter.prototype.listeners = function(type) {\n  var ret;\n  if (!this._events || !this._events[type])\n    ret = [];\n  else if (isFunction(this._events[type]))\n    ret = [this._events[type]];\n  else\n    ret = this._events[type].slice();\n  return ret;\n};\n\nEventEmitter.prototype.listenerCount = function(type) {\n  if (this._events) {\n    var evlistener = this._events[type];\n\n    if (isFunction(evlistener))\n      return 1;\n    else if (evlistener)\n      return evlistener.length;\n  }\n  return 0;\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n  return emitter.listenerCount(type);\n};\n\nfunction isFunction(arg) {\n  return typeof arg === 'function';\n}\n\nfunction isNumber(arg) {\n  return typeof arg === 'number';\n}\n\nfunction isObject(arg) {\n  return typeof arg === 'object' && arg !== null;\n}\n\nfunction isUndefined(arg) {\n  return arg === void 0;\n}\n","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n  var e, m\n  var eLen = (nBytes * 8) - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var nBits = -7\n  var i = isLE ? (nBytes - 1) : 0\n  var d = isLE ? -1 : 1\n  var s = buffer[offset + i]\n\n  i += d\n\n  e = s & ((1 << (-nBits)) - 1)\n  s >>= (-nBits)\n  nBits += eLen\n  for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n  m = e & ((1 << (-nBits)) - 1)\n  e >>= (-nBits)\n  nBits += mLen\n  for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n  if (e === 0) {\n    e = 1 - eBias\n  } else if (e === eMax) {\n    return m ? NaN : ((s ? -1 : 1) * Infinity)\n  } else {\n    m = m + Math.pow(2, mLen)\n    e = e - eBias\n  }\n  return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n  var e, m, c\n  var eLen = (nBytes * 8) - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n  var i = isLE ? 0 : (nBytes - 1)\n  var d = isLE ? 1 : -1\n  var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n  value = Math.abs(value)\n\n  if (isNaN(value) || value === Infinity) {\n    m = isNaN(value) ? 1 : 0\n    e = eMax\n  } else {\n    e = Math.floor(Math.log(value) / Math.LN2)\n    if (value * (c = Math.pow(2, -e)) < 1) {\n      e--\n      c *= 2\n    }\n    if (e + eBias >= 1) {\n      value += rt / c\n    } else {\n      value += rt * Math.pow(2, 1 - eBias)\n    }\n    if (value * c >= 2) {\n      e++\n      c /= 2\n    }\n\n    if (e + eBias >= eMax) {\n      m = 0\n      e = eMax\n    } else if (e + eBias >= 1) {\n      m = ((value * c) - 1) * Math.pow(2, mLen)\n      e = e + eBias\n    } else {\n      m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n      e = 0\n    }\n  }\n\n  for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n  e = (e << mLen) | m\n  eLen += mLen\n  for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n  buffer[offset + i - d] |= s * 128\n}\n","if (typeof Object.create === 'function') {\n  // implementation from standard node.js 'util' module\n  module.exports = function inherits(ctor, superCtor) {\n    ctor.super_ = superCtor\n    ctor.prototype = Object.create(superCtor.prototype, {\n      constructor: {\n        value: ctor,\n        enumerable: false,\n        writable: true,\n        configurable: true\n      }\n    });\n  };\n} else {\n  // old school shim for old browsers\n  module.exports = function inherits(ctor, superCtor) {\n    ctor.super_ = superCtor\n    var TempCtor = function () {}\n    TempCtor.prototype = superCtor.prototype\n    ctor.prototype = new TempCtor()\n    ctor.prototype.constructor = ctor\n  }\n}\n","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n  return toString.call(arr) == '[object Array]';\n};\n","'use strict';\n\nif (!process.version ||\n    process.version.indexOf('v0.') === 0 ||\n    process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {\n  module.exports = { nextTick: nextTick };\n} else {\n  module.exports = process\n}\n\nfunction nextTick(fn, arg1, arg2, arg3) {\n  if (typeof fn !== 'function') {\n    throw new TypeError('\"callback\" argument must be a function');\n  }\n  var len = arguments.length;\n  var args, i;\n  switch (len) {\n  case 0:\n  case 1:\n    return process.nextTick(fn);\n  case 2:\n    return process.nextTick(function afterTickOne() {\n      fn.call(null, arg1);\n    });\n  case 3:\n    return process.nextTick(function afterTickTwo() {\n      fn.call(null, arg1, arg2);\n    });\n  case 4:\n    return process.nextTick(function afterTickThree() {\n      fn.call(null, arg1, arg2, arg3);\n    });\n  default:\n    args = new Array(len - 1);\n    i = 0;\n    while (i < args.length) {\n      args[i++] = arguments[i];\n    }\n    return process.nextTick(function afterTick() {\n      fn.apply(null, args);\n    });\n  }\n}\n\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things.  But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals.  It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n    throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n    throw new Error('clearTimeout has not been defined');\n}\n(function () {\n    try {\n        if (typeof setTimeout === 'function') {\n            cachedSetTimeout = setTimeout;\n        } else {\n            cachedSetTimeout = defaultSetTimout;\n        }\n    } catch (e) {\n        cachedSetTimeout = defaultSetTimout;\n    }\n    try {\n        if (typeof clearTimeout === 'function') {\n            cachedClearTimeout = clearTimeout;\n        } else {\n            cachedClearTimeout = defaultClearTimeout;\n        }\n    } catch (e) {\n        cachedClearTimeout = defaultClearTimeout;\n    }\n} ())\nfunction runTimeout(fun) {\n    if (cachedSetTimeout === setTimeout) {\n        //normal enviroments in sane situations\n        return setTimeout(fun, 0);\n    }\n    // if setTimeout wasn't available but was latter defined\n    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n        cachedSetTimeout = setTimeout;\n        return setTimeout(fun, 0);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedSetTimeout(fun, 0);\n    } catch(e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n            return cachedSetTimeout.call(null, fun, 0);\n        } catch(e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n            return cachedSetTimeout.call(this, fun, 0);\n        }\n    }\n\n\n}\nfunction runClearTimeout(marker) {\n    if (cachedClearTimeout === clearTimeout) {\n        //normal enviroments in sane situations\n        return clearTimeout(marker);\n    }\n    // if clearTimeout wasn't available but was latter defined\n    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n        cachedClearTimeout = clearTimeout;\n        return clearTimeout(marker);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedClearTimeout(marker);\n    } catch (e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally\n            return cachedClearTimeout.call(null, marker);\n        } catch (e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n            // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n            return cachedClearTimeout.call(this, marker);\n        }\n    }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n    if (!draining || !currentQueue) {\n        return;\n    }\n    draining = false;\n    if (currentQueue.length) {\n        queue = currentQueue.concat(queue);\n    } else {\n        queueIndex = -1;\n    }\n    if (queue.length) {\n        drainQueue();\n    }\n}\n\nfunction drainQueue() {\n    if (draining) {\n        return;\n    }\n    var timeout = runTimeout(cleanUpNextTick);\n    draining = true;\n\n    var len = queue.length;\n    while(len) {\n        currentQueue = queue;\n        queue = [];\n        while (++queueIndex < len) {\n            if (currentQueue) {\n                currentQueue[queueIndex].run();\n            }\n        }\n        queueIndex = -1;\n        len = queue.length;\n    }\n    currentQueue = null;\n    draining = false;\n    runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n    var args = new Array(arguments.length - 1);\n    if (arguments.length > 1) {\n        for (var i = 1; i < arguments.length; i++) {\n            args[i - 1] = arguments[i];\n        }\n    }\n    queue.push(new Item(fun, args));\n    if (queue.length === 1 && !draining) {\n        runTimeout(drainQueue);\n    }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n    this.fun = fun;\n    this.array = array;\n}\nItem.prototype.run = function () {\n    this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n    throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n    throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","module.exports = require('./lib/_stream_duplex.js');\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n\n'use strict';\n\n/*<replacement>*/\n\nvar pna = require('process-nextick-args');\n/*</replacement>*/\n\n/*<replacement>*/\nvar objectKeys = Object.keys || function (obj) {\n  var keys = [];\n  for (var key in obj) {\n    keys.push(key);\n  }return keys;\n};\n/*</replacement>*/\n\nmodule.exports = Duplex;\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\nvar Readable = require('./_stream_readable');\nvar Writable = require('./_stream_writable');\n\nutil.inherits(Duplex, Readable);\n\n{\n  // avoid scope creep, the keys array can then be collected\n  var keys = objectKeys(Writable.prototype);\n  for (var v = 0; v < keys.length; v++) {\n    var method = keys[v];\n    if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n  }\n}\n\nfunction Duplex(options) {\n  if (!(this instanceof Duplex)) return new Duplex(options);\n\n  Readable.call(this, options);\n  Writable.call(this, options);\n\n  if (options && options.readable === false) this.readable = false;\n\n  if (options && options.writable === false) this.writable = false;\n\n  this.allowHalfOpen = true;\n  if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;\n\n  this.once('end', onend);\n}\n\nObject.defineProperty(Duplex.prototype, 'writableHighWaterMark', {\n  // making it explicit this property is not enumerable\n  // because otherwise some prototype manipulation in\n  // userland will fail\n  enumerable: false,\n  get: function () {\n    return this._writableState.highWaterMark;\n  }\n});\n\n// the no-half-open enforcer\nfunction onend() {\n  // if we allow half-open state, or if the writable side ended,\n  // then we're ok.\n  if (this.allowHalfOpen || this._writableState.ended) return;\n\n  // no more data can be written.\n  // But allow more writes to happen in this tick.\n  pna.nextTick(onEndNT, this);\n}\n\nfunction onEndNT(self) {\n  self.end();\n}\n\nObject.defineProperty(Duplex.prototype, 'destroyed', {\n  get: function () {\n    if (this._readableState === undefined || this._writableState === undefined) {\n      return false;\n    }\n    return this._readableState.destroyed && this._writableState.destroyed;\n  },\n  set: function (value) {\n    // we ignore the value if the stream\n    // has not been initialized yet\n    if (this._readableState === undefined || this._writableState === undefined) {\n      return;\n    }\n\n    // backward compatibility, the user is explicitly\n    // managing destroyed\n    this._readableState.destroyed = value;\n    this._writableState.destroyed = value;\n  }\n});\n\nDuplex.prototype._destroy = function (err, cb) {\n  this.push(null);\n  this.end();\n\n  pna.nextTick(cb, err);\n};","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a passthrough stream.\n// basically just the most minimal sort of Transform stream.\n// Every written chunk gets output as-is.\n\n'use strict';\n\nmodule.exports = PassThrough;\n\nvar Transform = require('./_stream_transform');\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\nutil.inherits(PassThrough, Transform);\n\nfunction PassThrough(options) {\n  if (!(this instanceof PassThrough)) return new PassThrough(options);\n\n  Transform.call(this, options);\n}\n\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n  cb(null, chunk);\n};","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n/*<replacement>*/\n\nvar pna = require('process-nextick-args');\n/*</replacement>*/\n\nmodule.exports = Readable;\n\n/*<replacement>*/\nvar isArray = require('isarray');\n/*</replacement>*/\n\n/*<replacement>*/\nvar Duplex;\n/*</replacement>*/\n\nReadable.ReadableState = ReadableState;\n\n/*<replacement>*/\nvar EE = require('events').EventEmitter;\n\nvar EElistenerCount = function (emitter, type) {\n  return emitter.listeners(type).length;\n};\n/*</replacement>*/\n\n/*<replacement>*/\nvar Stream = require('./internal/streams/stream');\n/*</replacement>*/\n\n/*<replacement>*/\n\nvar Buffer = require('safe-buffer').Buffer;\nvar OurUint8Array = global.Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n  return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n  return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/*</replacement>*/\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\n/*<replacement>*/\nvar debugUtil = require('util');\nvar debug = void 0;\nif (debugUtil && debugUtil.debuglog) {\n  debug = debugUtil.debuglog('stream');\n} else {\n  debug = function () {};\n}\n/*</replacement>*/\n\nvar BufferList = require('./internal/streams/BufferList');\nvar destroyImpl = require('./internal/streams/destroy');\nvar StringDecoder;\n\nutil.inherits(Readable, Stream);\n\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\n\nfunction prependListener(emitter, event, fn) {\n  // Sadly this is not cacheable as some libraries bundle their own\n  // event emitter implementation with them.\n  if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);\n\n  // This is a hack to make sure that our error handler is attached before any\n  // userland ones.  NEVER DO THIS. This is here only because this code needs\n  // to continue to work with older versions of Node.js that do not include\n  // the prependListener() method. The goal is to eventually remove this hack.\n  if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n}\n\nfunction ReadableState(options, stream) {\n  Duplex = Duplex || require('./_stream_duplex');\n\n  options = options || {};\n\n  // Duplex streams are both readable and writable, but share\n  // the same options object.\n  // However, some cases require setting options to different\n  // values for the readable and the writable sides of the duplex stream.\n  // These options can be provided separately as readableXXX and writableXXX.\n  var isDuplex = stream instanceof Duplex;\n\n  // object stream flag. Used to make read(n) ignore n and to\n  // make all the buffer merging and length checks go away\n  this.objectMode = !!options.objectMode;\n\n  if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n  // the point at which it stops calling _read() to fill the buffer\n  // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n  var hwm = options.highWaterMark;\n  var readableHwm = options.readableHighWaterMark;\n  var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n\n  if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;\n\n  // cast to ints.\n  this.highWaterMark = Math.floor(this.highWaterMark);\n\n  // A linked list is used to store data chunks instead of an array because the\n  // linked list can remove elements from the beginning faster than\n  // array.shift()\n  this.buffer = new BufferList();\n  this.length = 0;\n  this.pipes = null;\n  this.pipesCount = 0;\n  this.flowing = null;\n  this.ended = false;\n  this.endEmitted = false;\n  this.reading = false;\n\n  // a flag to be able to tell if the event 'readable'/'data' is emitted\n  // immediately, or on a later tick.  We set this to true at first, because\n  // any actions that shouldn't happen until \"later\" should generally also\n  // not happen before the first read call.\n  this.sync = true;\n\n  // whenever we return null, then we set a flag to say\n  // that we're awaiting a 'readable' event emission.\n  this.needReadable = false;\n  this.emittedReadable = false;\n  this.readableListening = false;\n  this.resumeScheduled = false;\n\n  // has it been destroyed\n  this.destroyed = false;\n\n  // Crypto is kind of old and crusty.  Historically, its default string\n  // encoding is 'binary' so we have to make this configurable.\n  // Everything else in the universe uses 'utf8', though.\n  this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n  // the number of writers that are awaiting a drain event in .pipe()s\n  this.awaitDrain = 0;\n\n  // if true, a maybeReadMore has been scheduled\n  this.readingMore = false;\n\n  this.decoder = null;\n  this.encoding = null;\n  if (options.encoding) {\n    if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n    this.decoder = new StringDecoder(options.encoding);\n    this.encoding = options.encoding;\n  }\n}\n\nfunction Readable(options) {\n  Duplex = Duplex || require('./_stream_duplex');\n\n  if (!(this instanceof Readable)) return new Readable(options);\n\n  this._readableState = new ReadableState(options, this);\n\n  // legacy\n  this.readable = true;\n\n  if (options) {\n    if (typeof options.read === 'function') this._read = options.read;\n\n    if (typeof options.destroy === 'function') this._destroy = options.destroy;\n  }\n\n  Stream.call(this);\n}\n\nObject.defineProperty(Readable.prototype, 'destroyed', {\n  get: function () {\n    if (this._readableState === undefined) {\n      return false;\n    }\n    return this._readableState.destroyed;\n  },\n  set: function (value) {\n    // we ignore the value if the stream\n    // has not been initialized yet\n    if (!this._readableState) {\n      return;\n    }\n\n    // backward compatibility, the user is explicitly\n    // managing destroyed\n    this._readableState.destroyed = value;\n  }\n});\n\nReadable.prototype.destroy = destroyImpl.destroy;\nReadable.prototype._undestroy = destroyImpl.undestroy;\nReadable.prototype._destroy = function (err, cb) {\n  this.push(null);\n  cb(err);\n};\n\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function (chunk, encoding) {\n  var state = this._readableState;\n  var skipChunkCheck;\n\n  if (!state.objectMode) {\n    if (typeof chunk === 'string') {\n      encoding = encoding || state.defaultEncoding;\n      if (encoding !== state.encoding) {\n        chunk = Buffer.from(chunk, encoding);\n        encoding = '';\n      }\n      skipChunkCheck = true;\n    }\n  } else {\n    skipChunkCheck = true;\n  }\n\n  return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n};\n\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function (chunk) {\n  return readableAddChunk(this, chunk, null, true, false);\n};\n\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n  var state = stream._readableState;\n  if (chunk === null) {\n    state.reading = false;\n    onEofChunk(stream, state);\n  } else {\n    var er;\n    if (!skipChunkCheck) er = chunkInvalid(state, chunk);\n    if (er) {\n      stream.emit('error', er);\n    } else if (state.objectMode || chunk && chunk.length > 0) {\n      if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\n        chunk = _uint8ArrayToBuffer(chunk);\n      }\n\n      if (addToFront) {\n        if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);\n      } else if (state.ended) {\n        stream.emit('error', new Error('stream.push() after EOF'));\n      } else {\n        state.reading = false;\n        if (state.decoder && !encoding) {\n          chunk = state.decoder.write(chunk);\n          if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\n        } else {\n          addChunk(stream, state, chunk, false);\n        }\n      }\n    } else if (!addToFront) {\n      state.reading = false;\n    }\n  }\n\n  return needMoreData(state);\n}\n\nfunction addChunk(stream, state, chunk, addToFront) {\n  if (state.flowing && state.length === 0 && !state.sync) {\n    stream.emit('data', chunk);\n    stream.read(0);\n  } else {\n    // update the buffer info.\n    state.length += state.objectMode ? 1 : chunk.length;\n    if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n\n    if (state.needReadable) emitReadable(stream);\n  }\n  maybeReadMore(stream, state);\n}\n\nfunction chunkInvalid(state, chunk) {\n  var er;\n  if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n    er = new TypeError('Invalid non-string/buffer chunk');\n  }\n  return er;\n}\n\n// if it's past the high water mark, we can push in some more.\n// Also, if we have no data yet, we can stand some\n// more bytes.  This is to work around cases where hwm=0,\n// such as the repl.  Also, if the push() triggered a\n// readable event, and the user called read(largeNumber) such that\n// needReadable was set, then we ought to push more, so that another\n// 'readable' event will be triggered.\nfunction needMoreData(state) {\n  return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}\n\nReadable.prototype.isPaused = function () {\n  return this._readableState.flowing === false;\n};\n\n// backwards compatibility.\nReadable.prototype.setEncoding = function (enc) {\n  if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n  this._readableState.decoder = new StringDecoder(enc);\n  this._readableState.encoding = enc;\n  return this;\n};\n\n// Don't raise the hwm > 8MB\nvar MAX_HWM = 0x800000;\nfunction computeNewHighWaterMark(n) {\n  if (n >= MAX_HWM) {\n    n = MAX_HWM;\n  } else {\n    // Get the next highest power of 2 to prevent increasing hwm excessively in\n    // tiny amounts\n    n--;\n    n |= n >>> 1;\n    n |= n >>> 2;\n    n |= n >>> 4;\n    n |= n >>> 8;\n    n |= n >>> 16;\n    n++;\n  }\n  return n;\n}\n\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction howMuchToRead(n, state) {\n  if (n <= 0 || state.length === 0 && state.ended) return 0;\n  if (state.objectMode) return 1;\n  if (n !== n) {\n    // Only flow one buffer at a time\n    if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n  }\n  // If we're asking for more than the current hwm, then raise the hwm.\n  if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n  if (n <= state.length) return n;\n  // Don't have enough\n  if (!state.ended) {\n    state.needReadable = true;\n    return 0;\n  }\n  return state.length;\n}\n\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function (n) {\n  debug('read', n);\n  n = parseInt(n, 10);\n  var state = this._readableState;\n  var nOrig = n;\n\n  if (n !== 0) state.emittedReadable = false;\n\n  // if we're doing read(0) to trigger a readable event, but we\n  // already have a bunch of data in the buffer, then just trigger\n  // the 'readable' event and move on.\n  if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {\n    debug('read: emitReadable', state.length, state.ended);\n    if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n    return null;\n  }\n\n  n = howMuchToRead(n, state);\n\n  // if we've ended, and we're now clear, then finish it up.\n  if (n === 0 && state.ended) {\n    if (state.length === 0) endReadable(this);\n    return null;\n  }\n\n  // All the actual chunk generation logic needs to be\n  // *below* the call to _read.  The reason is that in certain\n  // synthetic stream cases, such as passthrough streams, _read\n  // may be a completely synchronous operation which may change\n  // the state of the read buffer, providing enough data when\n  // before there was *not* enough.\n  //\n  // So, the steps are:\n  // 1. Figure out what the state of things will be after we do\n  // a read from the buffer.\n  //\n  // 2. If that resulting state will trigger a _read, then call _read.\n  // Note that this may be asynchronous, or synchronous.  Yes, it is\n  // deeply ugly to write APIs this way, but that still doesn't mean\n  // that the Readable class should behave improperly, as streams are\n  // designed to be sync/async agnostic.\n  // Take note if the _read call is sync or async (ie, if the read call\n  // has returned yet), so that we know whether or not it's safe to emit\n  // 'readable' etc.\n  //\n  // 3. Actually pull the requested chunks out of the buffer and return.\n\n  // if we need a readable event, then we need to do some reading.\n  var doRead = state.needReadable;\n  debug('need readable', doRead);\n\n  // if we currently have less than the highWaterMark, then also read some\n  if (state.length === 0 || state.length - n < state.highWaterMark) {\n    doRead = true;\n    debug('length less than watermark', doRead);\n  }\n\n  // however, if we've ended, then there's no point, and if we're already\n  // reading, then it's unnecessary.\n  if (state.ended || state.reading) {\n    doRead = false;\n    debug('reading or ended', doRead);\n  } else if (doRead) {\n    debug('do read');\n    state.reading = true;\n    state.sync = true;\n    // if the length is currently zero, then we *need* a readable event.\n    if (state.length === 0) state.needReadable = true;\n    // call internal read method\n    this._read(state.highWaterMark);\n    state.sync = false;\n    // If _read pushed data synchronously, then `reading` will be false,\n    // and we need to re-evaluate how much data we can return to the user.\n    if (!state.reading) n = howMuchToRead(nOrig, state);\n  }\n\n  var ret;\n  if (n > 0) ret = fromList(n, state);else ret = null;\n\n  if (ret === null) {\n    state.needReadable = true;\n    n = 0;\n  } else {\n    state.length -= n;\n  }\n\n  if (state.length === 0) {\n    // If we have nothing in the buffer, then we want to know\n    // as soon as we *do* get something into the buffer.\n    if (!state.ended) state.needReadable = true;\n\n    // If we tried to read() past the EOF, then emit end on the next tick.\n    if (nOrig !== n && state.ended) endReadable(this);\n  }\n\n  if (ret !== null) this.emit('data', ret);\n\n  return ret;\n};\n\nfunction onEofChunk(stream, state) {\n  if (state.ended) return;\n  if (state.decoder) {\n    var chunk = state.decoder.end();\n    if (chunk && chunk.length) {\n      state.buffer.push(chunk);\n      state.length += state.objectMode ? 1 : chunk.length;\n    }\n  }\n  state.ended = true;\n\n  // emit 'readable' now to make sure it gets picked up.\n  emitReadable(stream);\n}\n\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow.  This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n  var state = stream._readableState;\n  state.needReadable = false;\n  if (!state.emittedReadable) {\n    debug('emitReadable', state.flowing);\n    state.emittedReadable = true;\n    if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);\n  }\n}\n\nfunction emitReadable_(stream) {\n  debug('emit readable');\n  stream.emit('readable');\n  flow(stream);\n}\n\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data.  that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n  if (!state.readingMore) {\n    state.readingMore = true;\n    pna.nextTick(maybeReadMore_, stream, state);\n  }\n}\n\nfunction maybeReadMore_(stream, state) {\n  var len = state.length;\n  while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {\n    debug('maybeReadMore read 0');\n    stream.read(0);\n    if (len === state.length)\n      // didn't get any data, stop spinning.\n      break;else len = state.length;\n  }\n  state.readingMore = false;\n}\n\n// abstract method.  to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function (n) {\n  this.emit('error', new Error('_read() is not implemented'));\n};\n\nReadable.prototype.pipe = function (dest, pipeOpts) {\n  var src = this;\n  var state = this._readableState;\n\n  switch (state.pipesCount) {\n    case 0:\n      state.pipes = dest;\n      break;\n    case 1:\n      state.pipes = [state.pipes, dest];\n      break;\n    default:\n      state.pipes.push(dest);\n      break;\n  }\n  state.pipesCount += 1;\n  debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n\n  var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n\n  var endFn = doEnd ? onend : unpipe;\n  if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);\n\n  dest.on('unpipe', onunpipe);\n  function onunpipe(readable, unpipeInfo) {\n    debug('onunpipe');\n    if (readable === src) {\n      if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n        unpipeInfo.hasUnpiped = true;\n        cleanup();\n      }\n    }\n  }\n\n  function onend() {\n    debug('onend');\n    dest.end();\n  }\n\n  // when the dest drains, it reduces the awaitDrain counter\n  // on the source.  This would be more elegant with a .once()\n  // handler in flow(), but adding and removing repeatedly is\n  // too slow.\n  var ondrain = pipeOnDrain(src);\n  dest.on('drain', ondrain);\n\n  var cleanedUp = false;\n  function cleanup() {\n    debug('cleanup');\n    // cleanup event handlers once the pipe is broken\n    dest.removeListener('close', onclose);\n    dest.removeListener('finish', onfinish);\n    dest.removeListener('drain', ondrain);\n    dest.removeListener('error', onerror);\n    dest.removeListener('unpipe', onunpipe);\n    src.removeListener('end', onend);\n    src.removeListener('end', unpipe);\n    src.removeListener('data', ondata);\n\n    cleanedUp = true;\n\n    // if the reader is waiting for a drain event from this\n    // specific writer, then it would cause it to never start\n    // flowing again.\n    // So, if this is awaiting a drain, then we just call it now.\n    // If we don't know, then assume that we are waiting for one.\n    if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n  }\n\n  // If the user pushes more data while we're writing to dest then we'll end up\n  // in ondata again. However, we only want to increase awaitDrain once because\n  // dest will only emit one 'drain' event for the multiple writes.\n  // => Introduce a guard on increasing awaitDrain.\n  var increasedAwaitDrain = false;\n  src.on('data', ondata);\n  function ondata(chunk) {\n    debug('ondata');\n    increasedAwaitDrain = false;\n    var ret = dest.write(chunk);\n    if (false === ret && !increasedAwaitDrain) {\n      // If the user unpiped during `dest.write()`, it is possible\n      // to get stuck in a permanently paused state if that write\n      // also returned false.\n      // => Check whether `dest` is still a piping destination.\n      if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n        debug('false write response, pause', src._readableState.awaitDrain);\n        src._readableState.awaitDrain++;\n        increasedAwaitDrain = true;\n      }\n      src.pause();\n    }\n  }\n\n  // if the dest has an error, then stop piping into it.\n  // however, don't suppress the throwing behavior for this.\n  function onerror(er) {\n    debug('onerror', er);\n    unpipe();\n    dest.removeListener('error', onerror);\n    if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);\n  }\n\n  // Make sure our error handler is attached before userland ones.\n  prependListener(dest, 'error', onerror);\n\n  // Both close and finish should trigger unpipe, but only once.\n  function onclose() {\n    dest.removeListener('finish', onfinish);\n    unpipe();\n  }\n  dest.once('close', onclose);\n  function onfinish() {\n    debug('onfinish');\n    dest.removeListener('close', onclose);\n    unpipe();\n  }\n  dest.once('finish', onfinish);\n\n  function unpipe() {\n    debug('unpipe');\n    src.unpipe(dest);\n  }\n\n  // tell the dest that it's being piped to\n  dest.emit('pipe', src);\n\n  // start the flow if it hasn't been started already.\n  if (!state.flowing) {\n    debug('pipe resume');\n    src.resume();\n  }\n\n  return dest;\n};\n\nfunction pipeOnDrain(src) {\n  return function () {\n    var state = src._readableState;\n    debug('pipeOnDrain', state.awaitDrain);\n    if (state.awaitDrain) state.awaitDrain--;\n    if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n      state.flowing = true;\n      flow(src);\n    }\n  };\n}\n\nReadable.prototype.unpipe = function (dest) {\n  var state = this._readableState;\n  var unpipeInfo = { hasUnpiped: false };\n\n  // if we're not piping anywhere, then do nothing.\n  if (state.pipesCount === 0) return this;\n\n  // just one destination.  most common case.\n  if (state.pipesCount === 1) {\n    // passed in one, but it's not the right one.\n    if (dest && dest !== state.pipes) return this;\n\n    if (!dest) dest = state.pipes;\n\n    // got a match.\n    state.pipes = null;\n    state.pipesCount = 0;\n    state.flowing = false;\n    if (dest) dest.emit('unpipe', this, unpipeInfo);\n    return this;\n  }\n\n  // slow case. multiple pipe destinations.\n\n  if (!dest) {\n    // remove all.\n    var dests = state.pipes;\n    var len = state.pipesCount;\n    state.pipes = null;\n    state.pipesCount = 0;\n    state.flowing = false;\n\n    for (var i = 0; i < len; i++) {\n      dests[i].emit('unpipe', this, unpipeInfo);\n    }return this;\n  }\n\n  // try to find the right one.\n  var index = indexOf(state.pipes, dest);\n  if (index === -1) return this;\n\n  state.pipes.splice(index, 1);\n  state.pipesCount -= 1;\n  if (state.pipesCount === 1) state.pipes = state.pipes[0];\n\n  dest.emit('unpipe', this, unpipeInfo);\n\n  return this;\n};\n\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function (ev, fn) {\n  var res = Stream.prototype.on.call(this, ev, fn);\n\n  if (ev === 'data') {\n    // Start flowing on next tick if stream isn't explicitly paused\n    if (this._readableState.flowing !== false) this.resume();\n  } else if (ev === 'readable') {\n    var state = this._readableState;\n    if (!state.endEmitted && !state.readableListening) {\n      state.readableListening = state.needReadable = true;\n      state.emittedReadable = false;\n      if (!state.reading) {\n        pna.nextTick(nReadingNextTick, this);\n      } else if (state.length) {\n        emitReadable(this);\n      }\n    }\n  }\n\n  return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\n\nfunction nReadingNextTick(self) {\n  debug('readable nexttick read 0');\n  self.read(0);\n}\n\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function () {\n  var state = this._readableState;\n  if (!state.flowing) {\n    debug('resume');\n    state.flowing = true;\n    resume(this, state);\n  }\n  return this;\n};\n\nfunction resume(stream, state) {\n  if (!state.resumeScheduled) {\n    state.resumeScheduled = true;\n    pna.nextTick(resume_, stream, state);\n  }\n}\n\nfunction resume_(stream, state) {\n  if (!state.reading) {\n    debug('resume read 0');\n    stream.read(0);\n  }\n\n  state.resumeScheduled = false;\n  state.awaitDrain = 0;\n  stream.emit('resume');\n  flow(stream);\n  if (state.flowing && !state.reading) stream.read(0);\n}\n\nReadable.prototype.pause = function () {\n  debug('call pause flowing=%j', this._readableState.flowing);\n  if (false !== this._readableState.flowing) {\n    debug('pause');\n    this._readableState.flowing = false;\n    this.emit('pause');\n  }\n  return this;\n};\n\nfunction flow(stream) {\n  var state = stream._readableState;\n  debug('flow', state.flowing);\n  while (state.flowing && stream.read() !== null) {}\n}\n\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function (stream) {\n  var _this = this;\n\n  var state = this._readableState;\n  var paused = false;\n\n  stream.on('end', function () {\n    debug('wrapped end');\n    if (state.decoder && !state.ended) {\n      var chunk = state.decoder.end();\n      if (chunk && chunk.length) _this.push(chunk);\n    }\n\n    _this.push(null);\n  });\n\n  stream.on('data', function (chunk) {\n    debug('wrapped data');\n    if (state.decoder) chunk = state.decoder.write(chunk);\n\n    // don't skip over falsy values in objectMode\n    if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n\n    var ret = _this.push(chunk);\n    if (!ret) {\n      paused = true;\n      stream.pause();\n    }\n  });\n\n  // proxy all the other methods.\n  // important when wrapping filters and duplexes.\n  for (var i in stream) {\n    if (this[i] === undefined && typeof stream[i] === 'function') {\n      this[i] = function (method) {\n        return function () {\n          return stream[method].apply(stream, arguments);\n        };\n      }(i);\n    }\n  }\n\n  // proxy certain important events.\n  for (var n = 0; n < kProxyEvents.length; n++) {\n    stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n  }\n\n  // when we try to consume some more bytes, simply unpause the\n  // underlying stream.\n  this._read = function (n) {\n    debug('wrapped _read', n);\n    if (paused) {\n      paused = false;\n      stream.resume();\n    }\n  };\n\n  return this;\n};\n\nObject.defineProperty(Readable.prototype, 'readableHighWaterMark', {\n  // making it explicit this property is not enumerable\n  // because otherwise some prototype manipulation in\n  // userland will fail\n  enumerable: false,\n  get: function () {\n    return this._readableState.highWaterMark;\n  }\n});\n\n// exposed for testing purposes only.\nReadable._fromList = fromList;\n\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromList(n, state) {\n  // nothing buffered\n  if (state.length === 0) return null;\n\n  var ret;\n  if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n    // read it all, truncate the list\n    if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);\n    state.buffer.clear();\n  } else {\n    // read part of list\n    ret = fromListPartial(n, state.buffer, state.decoder);\n  }\n\n  return ret;\n}\n\n// Extracts only enough buffered data to satisfy the amount requested.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromListPartial(n, list, hasStrings) {\n  var ret;\n  if (n < list.head.data.length) {\n    // slice is the same for buffers and strings\n    ret = list.head.data.slice(0, n);\n    list.head.data = list.head.data.slice(n);\n  } else if (n === list.head.data.length) {\n    // first chunk is a perfect match\n    ret = list.shift();\n  } else {\n    // result spans more than one buffer\n    ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);\n  }\n  return ret;\n}\n\n// Copies a specified amount of characters from the list of buffered data\n// chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBufferString(n, list) {\n  var p = list.head;\n  var c = 1;\n  var ret = p.data;\n  n -= ret.length;\n  while (p = p.next) {\n    var str = p.data;\n    var nb = n > str.length ? str.length : n;\n    if (nb === str.length) ret += str;else ret += str.slice(0, n);\n    n -= nb;\n    if (n === 0) {\n      if (nb === str.length) {\n        ++c;\n        if (p.next) list.head = p.next;else list.head = list.tail = null;\n      } else {\n        list.head = p;\n        p.data = str.slice(nb);\n      }\n      break;\n    }\n    ++c;\n  }\n  list.length -= c;\n  return ret;\n}\n\n// Copies a specified amount of bytes from the list of buffered data chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBuffer(n, list) {\n  var ret = Buffer.allocUnsafe(n);\n  var p = list.head;\n  var c = 1;\n  p.data.copy(ret);\n  n -= p.data.length;\n  while (p = p.next) {\n    var buf = p.data;\n    var nb = n > buf.length ? buf.length : n;\n    buf.copy(ret, ret.length - n, 0, nb);\n    n -= nb;\n    if (n === 0) {\n      if (nb === buf.length) {\n        ++c;\n        if (p.next) list.head = p.next;else list.head = list.tail = null;\n      } else {\n        list.head = p;\n        p.data = buf.slice(nb);\n      }\n      break;\n    }\n    ++c;\n  }\n  list.length -= c;\n  return ret;\n}\n\nfunction endReadable(stream) {\n  var state = stream._readableState;\n\n  // If we get here before consuming all the bytes, then that is a\n  // bug in node.  Should never happen.\n  if (state.length > 0) throw new Error('\"endReadable()\" called on non-empty stream');\n\n  if (!state.endEmitted) {\n    state.ended = true;\n    pna.nextTick(endReadableNT, state, stream);\n  }\n}\n\nfunction endReadableNT(state, stream) {\n  // Check that we didn't get one last unshift.\n  if (!state.endEmitted && state.length === 0) {\n    state.endEmitted = true;\n    stream.readable = false;\n    stream.emit('end');\n  }\n}\n\nfunction indexOf(xs, x) {\n  for (var i = 0, l = xs.length; i < l; i++) {\n    if (xs[i] === x) return i;\n  }\n  return -1;\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a transform stream is a readable/writable stream where you do\n// something with the data.  Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored.  (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation.  For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes.  When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up.  When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer.  When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks.  If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk.  However,\n// a pathological inflate type of transform can cause excessive buffering\n// here.  For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output.  Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output.  In this case, you could write a very small\n// amount of input, and end up with a very large amount of output.  In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform.  A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n\n'use strict';\n\nmodule.exports = Transform;\n\nvar Duplex = require('./_stream_duplex');\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\nutil.inherits(Transform, Duplex);\n\nfunction afterTransform(er, data) {\n  var ts = this._transformState;\n  ts.transforming = false;\n\n  var cb = ts.writecb;\n\n  if (!cb) {\n    return this.emit('error', new Error('write callback called multiple times'));\n  }\n\n  ts.writechunk = null;\n  ts.writecb = null;\n\n  if (data != null) // single equals check for both `null` and `undefined`\n    this.push(data);\n\n  cb(er);\n\n  var rs = this._readableState;\n  rs.reading = false;\n  if (rs.needReadable || rs.length < rs.highWaterMark) {\n    this._read(rs.highWaterMark);\n  }\n}\n\nfunction Transform(options) {\n  if (!(this instanceof Transform)) return new Transform(options);\n\n  Duplex.call(this, options);\n\n  this._transformState = {\n    afterTransform: afterTransform.bind(this),\n    needTransform: false,\n    transforming: false,\n    writecb: null,\n    writechunk: null,\n    writeencoding: null\n  };\n\n  // start out asking for a readable event once data is transformed.\n  this._readableState.needReadable = true;\n\n  // we have implemented the _read method, and done the other things\n  // that Readable wants before the first _read call, so unset the\n  // sync guard flag.\n  this._readableState.sync = false;\n\n  if (options) {\n    if (typeof options.transform === 'function') this._transform = options.transform;\n\n    if (typeof options.flush === 'function') this._flush = options.flush;\n  }\n\n  // When the writable side finishes, then flush out anything remaining.\n  this.on('prefinish', prefinish);\n}\n\nfunction prefinish() {\n  var _this = this;\n\n  if (typeof this._flush === 'function') {\n    this._flush(function (er, data) {\n      done(_this, er, data);\n    });\n  } else {\n    done(this, null, null);\n  }\n}\n\nTransform.prototype.push = function (chunk, encoding) {\n  this._transformState.needTransform = false;\n  return Duplex.prototype.push.call(this, chunk, encoding);\n};\n\n// This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side.  You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk.  If you pass\n// an error, then that'll put the hurt on the whole operation.  If you\n// never call cb(), then you'll never get another chunk.\nTransform.prototype._transform = function (chunk, encoding, cb) {\n  throw new Error('_transform() is not implemented');\n};\n\nTransform.prototype._write = function (chunk, encoding, cb) {\n  var ts = this._transformState;\n  ts.writecb = cb;\n  ts.writechunk = chunk;\n  ts.writeencoding = encoding;\n  if (!ts.transforming) {\n    var rs = this._readableState;\n    if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n  }\n};\n\n// Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\nTransform.prototype._read = function (n) {\n  var ts = this._transformState;\n\n  if (ts.writechunk !== null && ts.writecb && !ts.transforming) {\n    ts.transforming = true;\n    this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n  } else {\n    // mark that we need a transform, so that any data that comes in\n    // will get processed, now that we've asked for it.\n    ts.needTransform = true;\n  }\n};\n\nTransform.prototype._destroy = function (err, cb) {\n  var _this2 = this;\n\n  Duplex.prototype._destroy.call(this, err, function (err2) {\n    cb(err2);\n    _this2.emit('close');\n  });\n};\n\nfunction done(stream, er, data) {\n  if (er) return stream.emit('error', er);\n\n  if (data != null) // single equals check for both `null` and `undefined`\n    stream.push(data);\n\n  // if there's nothing in the write buffer, then that means\n  // that nothing more will ever be provided\n  if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');\n\n  if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');\n\n  return stream.push(null);\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n'use strict';\n\n/*<replacement>*/\n\nvar pna = require('process-nextick-args');\n/*</replacement>*/\n\nmodule.exports = Writable;\n\n/* <replacement> */\nfunction WriteReq(chunk, encoding, cb) {\n  this.chunk = chunk;\n  this.encoding = encoding;\n  this.callback = cb;\n  this.next = null;\n}\n\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n  var _this = this;\n\n  this.next = null;\n  this.entry = null;\n  this.finish = function () {\n    onCorkedFinish(_this, state);\n  };\n}\n/* </replacement> */\n\n/*<replacement>*/\nvar asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;\n/*</replacement>*/\n\n/*<replacement>*/\nvar Duplex;\n/*</replacement>*/\n\nWritable.WritableState = WritableState;\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\n/*<replacement>*/\nvar internalUtil = {\n  deprecate: require('util-deprecate')\n};\n/*</replacement>*/\n\n/*<replacement>*/\nvar Stream = require('./internal/streams/stream');\n/*</replacement>*/\n\n/*<replacement>*/\n\nvar Buffer = require('safe-buffer').Buffer;\nvar OurUint8Array = global.Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n  return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n  return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/*</replacement>*/\n\nvar destroyImpl = require('./internal/streams/destroy');\n\nutil.inherits(Writable, Stream);\n\nfunction nop() {}\n\nfunction WritableState(options, stream) {\n  Duplex = Duplex || require('./_stream_duplex');\n\n  options = options || {};\n\n  // Duplex streams are both readable and writable, but share\n  // the same options object.\n  // However, some cases require setting options to different\n  // values for the readable and the writable sides of the duplex stream.\n  // These options can be provided separately as readableXXX and writableXXX.\n  var isDuplex = stream instanceof Duplex;\n\n  // object stream flag to indicate whether or not this stream\n  // contains buffers or objects.\n  this.objectMode = !!options.objectMode;\n\n  if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n  // the point at which write() starts returning false\n  // Note: 0 is a valid value, means that we always return false if\n  // the entire buffer is not flushed immediately on write()\n  var hwm = options.highWaterMark;\n  var writableHwm = options.writableHighWaterMark;\n  var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n\n  if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;\n\n  // cast to ints.\n  this.highWaterMark = Math.floor(this.highWaterMark);\n\n  // if _final has been called\n  this.finalCalled = false;\n\n  // drain event flag.\n  this.needDrain = false;\n  // at the start of calling end()\n  this.ending = false;\n  // when end() has been called, and returned\n  this.ended = false;\n  // when 'finish' is emitted\n  this.finished = false;\n\n  // has it been destroyed\n  this.destroyed = false;\n\n  // should we decode strings into buffers before passing to _write?\n  // this is here so that some node-core streams can optimize string\n  // handling at a lower level.\n  var noDecode = options.decodeStrings === false;\n  this.decodeStrings = !noDecode;\n\n  // Crypto is kind of old and crusty.  Historically, its default string\n  // encoding is 'binary' so we have to make this configurable.\n  // Everything else in the universe uses 'utf8', though.\n  this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n  // not an actual buffer we keep track of, but a measurement\n  // of how much we're waiting to get pushed to some underlying\n  // socket or file.\n  this.length = 0;\n\n  // a flag to see when we're in the middle of a write.\n  this.writing = false;\n\n  // when true all writes will be buffered until .uncork() call\n  this.corked = 0;\n\n  // a flag to be able to tell if the onwrite cb is called immediately,\n  // or on a later tick.  We set this to true at first, because any\n  // actions that shouldn't happen until \"later\" should generally also\n  // not happen before the first write call.\n  this.sync = true;\n\n  // a flag to know if we're processing previously buffered items, which\n  // may call the _write() callback in the same tick, so that we don't\n  // end up in an overlapped onwrite situation.\n  this.bufferProcessing = false;\n\n  // the callback that's passed to _write(chunk,cb)\n  this.onwrite = function (er) {\n    onwrite(stream, er);\n  };\n\n  // the callback that the user supplies to write(chunk,encoding,cb)\n  this.writecb = null;\n\n  // the amount that is being written when _write is called.\n  this.writelen = 0;\n\n  this.bufferedRequest = null;\n  this.lastBufferedRequest = null;\n\n  // number of pending user-supplied write callbacks\n  // this must be 0 before 'finish' can be emitted\n  this.pendingcb = 0;\n\n  // emit prefinish if the only thing we're waiting for is _write cbs\n  // This is relevant for synchronous Transform streams\n  this.prefinished = false;\n\n  // True if the error was already emitted and should not be thrown again\n  this.errorEmitted = false;\n\n  // count buffered requests\n  this.bufferedRequestCount = 0;\n\n  // allocate the first CorkedRequest, there is always\n  // one allocated and free to use, and we maintain at most two\n  this.corkedRequestsFree = new CorkedRequest(this);\n}\n\nWritableState.prototype.getBuffer = function getBuffer() {\n  var current = this.bufferedRequest;\n  var out = [];\n  while (current) {\n    out.push(current);\n    current = current.next;\n  }\n  return out;\n};\n\n(function () {\n  try {\n    Object.defineProperty(WritableState.prototype, 'buffer', {\n      get: internalUtil.deprecate(function () {\n        return this.getBuffer();\n      }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\n    });\n  } catch (_) {}\n})();\n\n// Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\nvar realHasInstance;\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\n  realHasInstance = Function.prototype[Symbol.hasInstance];\n  Object.defineProperty(Writable, Symbol.hasInstance, {\n    value: function (object) {\n      if (realHasInstance.call(this, object)) return true;\n      if (this !== Writable) return false;\n\n      return object && object._writableState instanceof WritableState;\n    }\n  });\n} else {\n  realHasInstance = function (object) {\n    return object instanceof this;\n  };\n}\n\nfunction Writable(options) {\n  Duplex = Duplex || require('./_stream_duplex');\n\n  // Writable ctor is applied to Duplexes, too.\n  // `realHasInstance` is necessary because using plain `instanceof`\n  // would return false, as no `_writableState` property is attached.\n\n  // Trying to use the custom `instanceof` for Writable here will also break the\n  // Node.js LazyTransform implementation, which has a non-trivial getter for\n  // `_writableState` that would lead to infinite recursion.\n  if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {\n    return new Writable(options);\n  }\n\n  this._writableState = new WritableState(options, this);\n\n  // legacy.\n  this.writable = true;\n\n  if (options) {\n    if (typeof options.write === 'function') this._write = options.write;\n\n    if (typeof options.writev === 'function') this._writev = options.writev;\n\n    if (typeof options.destroy === 'function') this._destroy = options.destroy;\n\n    if (typeof options.final === 'function') this._final = options.final;\n  }\n\n  Stream.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n  this.emit('error', new Error('Cannot pipe, not readable'));\n};\n\nfunction writeAfterEnd(stream, cb) {\n  var er = new Error('write after end');\n  // TODO: defer error events consistently everywhere, not just the cb\n  stream.emit('error', er);\n  pna.nextTick(cb, er);\n}\n\n// Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\nfunction validChunk(stream, state, chunk, cb) {\n  var valid = true;\n  var er = false;\n\n  if (chunk === null) {\n    er = new TypeError('May not write null values to stream');\n  } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n    er = new TypeError('Invalid non-string/buffer chunk');\n  }\n  if (er) {\n    stream.emit('error', er);\n    pna.nextTick(cb, er);\n    valid = false;\n  }\n  return valid;\n}\n\nWritable.prototype.write = function (chunk, encoding, cb) {\n  var state = this._writableState;\n  var ret = false;\n  var isBuf = !state.objectMode && _isUint8Array(chunk);\n\n  if (isBuf && !Buffer.isBuffer(chunk)) {\n    chunk = _uint8ArrayToBuffer(chunk);\n  }\n\n  if (typeof encoding === 'function') {\n    cb = encoding;\n    encoding = null;\n  }\n\n  if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n\n  if (typeof cb !== 'function') cb = nop;\n\n  if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\n    state.pendingcb++;\n    ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n  }\n\n  return ret;\n};\n\nWritable.prototype.cork = function () {\n  var state = this._writableState;\n\n  state.corked++;\n};\n\nWritable.prototype.uncork = function () {\n  var state = this._writableState;\n\n  if (state.corked) {\n    state.corked--;\n\n    if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n  }\n};\n\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n  // node::ParseEncoding() requires lower case.\n  if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n  if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);\n  this._writableState.defaultEncoding = encoding;\n  return this;\n};\n\nfunction decodeChunk(state, chunk, encoding) {\n  if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n    chunk = Buffer.from(chunk, encoding);\n  }\n  return chunk;\n}\n\nObject.defineProperty(Writable.prototype, 'writableHighWaterMark', {\n  // making it explicit this property is not enumerable\n  // because otherwise some prototype manipulation in\n  // userland will fail\n  enumerable: false,\n  get: function () {\n    return this._writableState.highWaterMark;\n  }\n});\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn.  Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n  if (!isBuf) {\n    var newChunk = decodeChunk(state, chunk, encoding);\n    if (chunk !== newChunk) {\n      isBuf = true;\n      encoding = 'buffer';\n      chunk = newChunk;\n    }\n  }\n  var len = state.objectMode ? 1 : chunk.length;\n\n  state.length += len;\n\n  var ret = state.length < state.highWaterMark;\n  // we must ensure that previous needDrain will not be reset to false.\n  if (!ret) state.needDrain = true;\n\n  if (state.writing || state.corked) {\n    var last = state.lastBufferedRequest;\n    state.lastBufferedRequest = {\n      chunk: chunk,\n      encoding: encoding,\n      isBuf: isBuf,\n      callback: cb,\n      next: null\n    };\n    if (last) {\n      last.next = state.lastBufferedRequest;\n    } else {\n      state.bufferedRequest = state.lastBufferedRequest;\n    }\n    state.bufferedRequestCount += 1;\n  } else {\n    doWrite(stream, state, false, len, chunk, encoding, cb);\n  }\n\n  return ret;\n}\n\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n  state.writelen = len;\n  state.writecb = cb;\n  state.writing = true;\n  state.sync = true;\n  if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n  state.sync = false;\n}\n\nfunction onwriteError(stream, state, sync, er, cb) {\n  --state.pendingcb;\n\n  if (sync) {\n    // defer the callback if we are being called synchronously\n    // to avoid piling up things on the stack\n    pna.nextTick(cb, er);\n    // this can emit finish, and it will always happen\n    // after error\n    pna.nextTick(finishMaybe, stream, state);\n    stream._writableState.errorEmitted = true;\n    stream.emit('error', er);\n  } else {\n    // the caller expect this to happen before if\n    // it is async\n    cb(er);\n    stream._writableState.errorEmitted = true;\n    stream.emit('error', er);\n    // this can emit finish, but finish must\n    // always follow error\n    finishMaybe(stream, state);\n  }\n}\n\nfunction onwriteStateUpdate(state) {\n  state.writing = false;\n  state.writecb = null;\n  state.length -= state.writelen;\n  state.writelen = 0;\n}\n\nfunction onwrite(stream, er) {\n  var state = stream._writableState;\n  var sync = state.sync;\n  var cb = state.writecb;\n\n  onwriteStateUpdate(state);\n\n  if (er) onwriteError(stream, state, sync, er, cb);else {\n    // Check if we're actually ready to finish, but don't emit yet\n    var finished = needFinish(state);\n\n    if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n      clearBuffer(stream, state);\n    }\n\n    if (sync) {\n      /*<replacement>*/\n      asyncWrite(afterWrite, stream, state, finished, cb);\n      /*</replacement>*/\n    } else {\n      afterWrite(stream, state, finished, cb);\n    }\n  }\n}\n\nfunction afterWrite(stream, state, finished, cb) {\n  if (!finished) onwriteDrain(stream, state);\n  state.pendingcb--;\n  cb();\n  finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n  if (state.length === 0 && state.needDrain) {\n    state.needDrain = false;\n    stream.emit('drain');\n  }\n}\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n  state.bufferProcessing = true;\n  var entry = state.bufferedRequest;\n\n  if (stream._writev && entry && entry.next) {\n    // Fast case, write everything using _writev()\n    var l = state.bufferedRequestCount;\n    var buffer = new Array(l);\n    var holder = state.corkedRequestsFree;\n    holder.entry = entry;\n\n    var count = 0;\n    var allBuffers = true;\n    while (entry) {\n      buffer[count] = entry;\n      if (!entry.isBuf) allBuffers = false;\n      entry = entry.next;\n      count += 1;\n    }\n    buffer.allBuffers = allBuffers;\n\n    doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n    // doWrite is almost always async, defer these to save a bit of time\n    // as the hot path ends with doWrite\n    state.pendingcb++;\n    state.lastBufferedRequest = null;\n    if (holder.next) {\n      state.corkedRequestsFree = holder.next;\n      holder.next = null;\n    } else {\n      state.corkedRequestsFree = new CorkedRequest(state);\n    }\n    state.bufferedRequestCount = 0;\n  } else {\n    // Slow case, write chunks one-by-one\n    while (entry) {\n      var chunk = entry.chunk;\n      var encoding = entry.encoding;\n      var cb = entry.callback;\n      var len = state.objectMode ? 1 : chunk.length;\n\n      doWrite(stream, state, false, len, chunk, encoding, cb);\n      entry = entry.next;\n      state.bufferedRequestCount--;\n      // if we didn't call the onwrite immediately, then\n      // it means that we need to wait until it does.\n      // also, that means that the chunk and cb are currently\n      // being processed, so move the buffer counter past them.\n      if (state.writing) {\n        break;\n      }\n    }\n\n    if (entry === null) state.lastBufferedRequest = null;\n  }\n\n  state.bufferedRequest = entry;\n  state.bufferProcessing = false;\n}\n\nWritable.prototype._write = function (chunk, encoding, cb) {\n  cb(new Error('_write() is not implemented'));\n};\n\nWritable.prototype._writev = null;\n\nWritable.prototype.end = function (chunk, encoding, cb) {\n  var state = this._writableState;\n\n  if (typeof chunk === 'function') {\n    cb = chunk;\n    chunk = null;\n    encoding = null;\n  } else if (typeof encoding === 'function') {\n    cb = encoding;\n    encoding = null;\n  }\n\n  if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n  // .end() fully uncorks\n  if (state.corked) {\n    state.corked = 1;\n    this.uncork();\n  }\n\n  // ignore unnecessary end() calls.\n  if (!state.ending && !state.finished) endWritable(this, state, cb);\n};\n\nfunction needFinish(state) {\n  return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\nfunction callFinal(stream, state) {\n  stream._final(function (err) {\n    state.pendingcb--;\n    if (err) {\n      stream.emit('error', err);\n    }\n    state.prefinished = true;\n    stream.emit('prefinish');\n    finishMaybe(stream, state);\n  });\n}\nfunction prefinish(stream, state) {\n  if (!state.prefinished && !state.finalCalled) {\n    if (typeof stream._final === 'function') {\n      state.pendingcb++;\n      state.finalCalled = true;\n      pna.nextTick(callFinal, stream, state);\n    } else {\n      state.prefinished = true;\n      stream.emit('prefinish');\n    }\n  }\n}\n\nfunction finishMaybe(stream, state) {\n  var need = needFinish(state);\n  if (need) {\n    prefinish(stream, state);\n    if (state.pendingcb === 0) {\n      state.finished = true;\n      stream.emit('finish');\n    }\n  }\n  return need;\n}\n\nfunction endWritable(stream, state, cb) {\n  state.ending = true;\n  finishMaybe(stream, state);\n  if (cb) {\n    if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);\n  }\n  state.ended = true;\n  stream.writable = false;\n}\n\nfunction onCorkedFinish(corkReq, state, err) {\n  var entry = corkReq.entry;\n  corkReq.entry = null;\n  while (entry) {\n    var cb = entry.callback;\n    state.pendingcb--;\n    cb(err);\n    entry = entry.next;\n  }\n  if (state.corkedRequestsFree) {\n    state.corkedRequestsFree.next = corkReq;\n  } else {\n    state.corkedRequestsFree = corkReq;\n  }\n}\n\nObject.defineProperty(Writable.prototype, 'destroyed', {\n  get: function () {\n    if (this._writableState === undefined) {\n      return false;\n    }\n    return this._writableState.destroyed;\n  },\n  set: function (value) {\n    // we ignore the value if the stream\n    // has not been initialized yet\n    if (!this._writableState) {\n      return;\n    }\n\n    // backward compatibility, the user is explicitly\n    // managing destroyed\n    this._writableState.destroyed = value;\n  }\n});\n\nWritable.prototype.destroy = destroyImpl.destroy;\nWritable.prototype._undestroy = destroyImpl.undestroy;\nWritable.prototype._destroy = function (err, cb) {\n  this.end();\n  cb(err);\n};","'use strict';\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Buffer = require('safe-buffer').Buffer;\nvar util = require('util');\n\nfunction copyBuffer(src, target, offset) {\n  src.copy(target, offset);\n}\n\nmodule.exports = function () {\n  function BufferList() {\n    _classCallCheck(this, BufferList);\n\n    this.head = null;\n    this.tail = null;\n    this.length = 0;\n  }\n\n  BufferList.prototype.push = function push(v) {\n    var entry = { data: v, next: null };\n    if (this.length > 0) this.tail.next = entry;else this.head = entry;\n    this.tail = entry;\n    ++this.length;\n  };\n\n  BufferList.prototype.unshift = function unshift(v) {\n    var entry = { data: v, next: this.head };\n    if (this.length === 0) this.tail = entry;\n    this.head = entry;\n    ++this.length;\n  };\n\n  BufferList.prototype.shift = function shift() {\n    if (this.length === 0) return;\n    var ret = this.head.data;\n    if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n    --this.length;\n    return ret;\n  };\n\n  BufferList.prototype.clear = function clear() {\n    this.head = this.tail = null;\n    this.length = 0;\n  };\n\n  BufferList.prototype.join = function join(s) {\n    if (this.length === 0) return '';\n    var p = this.head;\n    var ret = '' + p.data;\n    while (p = p.next) {\n      ret += s + p.data;\n    }return ret;\n  };\n\n  BufferList.prototype.concat = function concat(n) {\n    if (this.length === 0) return Buffer.alloc(0);\n    if (this.length === 1) return this.head.data;\n    var ret = Buffer.allocUnsafe(n >>> 0);\n    var p = this.head;\n    var i = 0;\n    while (p) {\n      copyBuffer(p.data, ret, i);\n      i += p.data.length;\n      p = p.next;\n    }\n    return ret;\n  };\n\n  return BufferList;\n}();\n\nif (util && util.inspect && util.inspect.custom) {\n  module.exports.prototype[util.inspect.custom] = function () {\n    var obj = util.inspect({ length: this.length });\n    return this.constructor.name + ' ' + obj;\n  };\n}","'use strict';\n\n/*<replacement>*/\n\nvar pna = require('process-nextick-args');\n/*</replacement>*/\n\n// undocumented cb() API, needed for core, not for public API\nfunction destroy(err, cb) {\n  var _this = this;\n\n  var readableDestroyed = this._readableState && this._readableState.destroyed;\n  var writableDestroyed = this._writableState && this._writableState.destroyed;\n\n  if (readableDestroyed || writableDestroyed) {\n    if (cb) {\n      cb(err);\n    } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {\n      pna.nextTick(emitErrorNT, this, err);\n    }\n    return this;\n  }\n\n  // we set destroyed to true before firing error callbacks in order\n  // to make it re-entrance safe in case destroy() is called within callbacks\n\n  if (this._readableState) {\n    this._readableState.destroyed = true;\n  }\n\n  // if this is a duplex stream mark the writable part as destroyed as well\n  if (this._writableState) {\n    this._writableState.destroyed = true;\n  }\n\n  this._destroy(err || null, function (err) {\n    if (!cb && err) {\n      pna.nextTick(emitErrorNT, _this, err);\n      if (_this._writableState) {\n        _this._writableState.errorEmitted = true;\n      }\n    } else if (cb) {\n      cb(err);\n    }\n  });\n\n  return this;\n}\n\nfunction undestroy() {\n  if (this._readableState) {\n    this._readableState.destroyed = false;\n    this._readableState.reading = false;\n    this._readableState.ended = false;\n    this._readableState.endEmitted = false;\n  }\n\n  if (this._writableState) {\n    this._writableState.destroyed = false;\n    this._writableState.ended = false;\n    this._writableState.ending = false;\n    this._writableState.finished = false;\n    this._writableState.errorEmitted = false;\n  }\n}\n\nfunction emitErrorNT(self, err) {\n  self.emit('error', err);\n}\n\nmodule.exports = {\n  destroy: destroy,\n  undestroy: undestroy\n};","module.exports = require('events').EventEmitter;\n","module.exports = require('./readable').PassThrough\n","exports = module.exports = require('./lib/_stream_readable.js');\nexports.Stream = exports;\nexports.Readable = exports;\nexports.Writable = require('./lib/_stream_writable.js');\nexports.Duplex = require('./lib/_stream_duplex.js');\nexports.Transform = require('./lib/_stream_transform.js');\nexports.PassThrough = require('./lib/_stream_passthrough.js');\n","module.exports = require('./readable').Transform\n","module.exports = require('./lib/_stream_writable.js');\n","/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n  for (var key in src) {\n    dst[key] = src[key]\n  }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n  module.exports = buffer\n} else {\n  // Copy properties from require('buffer')\n  copyProps(buffer, exports)\n  exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n  return Buffer(arg, encodingOrOffset, length)\n}\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n  if (typeof arg === 'number') {\n    throw new TypeError('Argument must not be a number')\n  }\n  return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n  if (typeof size !== 'number') {\n    throw new TypeError('Argument must be a number')\n  }\n  var buf = Buffer(size)\n  if (fill !== undefined) {\n    if (typeof encoding === 'string') {\n      buf.fill(fill, encoding)\n    } else {\n      buf.fill(fill)\n    }\n  } else {\n    buf.fill(0)\n  }\n  return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n  if (typeof size !== 'number') {\n    throw new TypeError('Argument must be a number')\n  }\n  return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n  if (typeof size !== 'number') {\n    throw new TypeError('Argument must be a number')\n  }\n  return buffer.SlowBuffer(size)\n}\n","(function (global, undefined) {\n    \"use strict\";\n\n    if (global.setImmediate) {\n        return;\n    }\n\n    var nextHandle = 1; // Spec says greater than zero\n    var tasksByHandle = {};\n    var currentlyRunningATask = false;\n    var doc = global.document;\n    var registerImmediate;\n\n    function setImmediate(callback) {\n      // Callback can either be a function or a string\n      if (typeof callback !== \"function\") {\n        callback = new Function(\"\" + callback);\n      }\n      // Copy function arguments\n      var args = new Array(arguments.length - 1);\n      for (var i = 0; i < args.length; i++) {\n          args[i] = arguments[i + 1];\n      }\n      // Store and register the task\n      var task = { callback: callback, args: args };\n      tasksByHandle[nextHandle] = task;\n      registerImmediate(nextHandle);\n      return nextHandle++;\n    }\n\n    function clearImmediate(handle) {\n        delete tasksByHandle[handle];\n    }\n\n    function run(task) {\n        var callback = task.callback;\n        var args = task.args;\n        switch (args.length) {\n        case 0:\n            callback();\n            break;\n        case 1:\n            callback(args[0]);\n            break;\n        case 2:\n            callback(args[0], args[1]);\n            break;\n        case 3:\n            callback(args[0], args[1], args[2]);\n            break;\n        default:\n            callback.apply(undefined, args);\n            break;\n        }\n    }\n\n    function runIfPresent(handle) {\n        // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n        // So if we're currently running a task, we'll need to delay this invocation.\n        if (currentlyRunningATask) {\n            // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n            // \"too much recursion\" error.\n            setTimeout(runIfPresent, 0, handle);\n        } else {\n            var task = tasksByHandle[handle];\n            if (task) {\n                currentlyRunningATask = true;\n                try {\n                    run(task);\n                } finally {\n                    clearImmediate(handle);\n                    currentlyRunningATask = false;\n                }\n            }\n        }\n    }\n\n    function installNextTickImplementation() {\n        registerImmediate = function(handle) {\n            process.nextTick(function () { runIfPresent(handle); });\n        };\n    }\n\n    function canUsePostMessage() {\n        // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n        // where `global.postMessage` means something completely different and can't be used for this purpose.\n        if (global.postMessage && !global.importScripts) {\n            var postMessageIsAsynchronous = true;\n            var oldOnMessage = global.onmessage;\n            global.onmessage = function() {\n                postMessageIsAsynchronous = false;\n            };\n            global.postMessage(\"\", \"*\");\n            global.onmessage = oldOnMessage;\n            return postMessageIsAsynchronous;\n        }\n    }\n\n    function installPostMessageImplementation() {\n        // Installs an event handler on `global` for the `message` event: see\n        // * https://developer.mozilla.org/en/DOM/window.postMessage\n        // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n        var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n        var onGlobalMessage = function(event) {\n            if (event.source === global &&\n                typeof event.data === \"string\" &&\n                event.data.indexOf(messagePrefix) === 0) {\n                runIfPresent(+event.data.slice(messagePrefix.length));\n            }\n        };\n\n        if (global.addEventListener) {\n            global.addEventListener(\"message\", onGlobalMessage, false);\n        } else {\n            global.attachEvent(\"onmessage\", onGlobalMessage);\n        }\n\n        registerImmediate = function(handle) {\n            global.postMessage(messagePrefix + handle, \"*\");\n        };\n    }\n\n    function installMessageChannelImplementation() {\n        var channel = new MessageChannel();\n        channel.port1.onmessage = function(event) {\n            var handle = event.data;\n            runIfPresent(handle);\n        };\n\n        registerImmediate = function(handle) {\n            channel.port2.postMessage(handle);\n        };\n    }\n\n    function installReadyStateChangeImplementation() {\n        var html = doc.documentElement;\n        registerImmediate = function(handle) {\n            // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n            // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n            var script = doc.createElement(\"script\");\n            script.onreadystatechange = function () {\n                runIfPresent(handle);\n                script.onreadystatechange = null;\n                html.removeChild(script);\n                script = null;\n            };\n            html.appendChild(script);\n        };\n    }\n\n    function installSetTimeoutImplementation() {\n        registerImmediate = function(handle) {\n            setTimeout(runIfPresent, 0, handle);\n        };\n    }\n\n    // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\n    var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n    attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n\n    // Don't get fooled by e.g. browserify environments.\n    if ({}.toString.call(global.process) === \"[object process]\") {\n        // For Node.js before 0.9\n        installNextTickImplementation();\n\n    } else if (canUsePostMessage()) {\n        // For non-IE10 modern browsers\n        installPostMessageImplementation();\n\n    } else if (global.MessageChannel) {\n        // For web workers, where supported\n        installMessageChannelImplementation();\n\n    } else if (doc && \"onreadystatechange\" in doc.createElement(\"script\")) {\n        // For IE 6–8\n        installReadyStateChangeImplementation();\n\n    } else {\n        // For older browsers\n        installSetTimeoutImplementation();\n    }\n\n    attachTo.setImmediate = setImmediate;\n    attachTo.clearImmediate = clearImmediate;\n}(typeof self === \"undefined\" ? typeof global === \"undefined\" ? this : global : self));\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nmodule.exports = Stream;\n\nvar EE = require('events').EventEmitter;\nvar inherits = require('inherits');\n\ninherits(Stream, EE);\nStream.Readable = require('readable-stream/readable.js');\nStream.Writable = require('readable-stream/writable.js');\nStream.Duplex = require('readable-stream/duplex.js');\nStream.Transform = require('readable-stream/transform.js');\nStream.PassThrough = require('readable-stream/passthrough.js');\n\n// Backwards-compat with node 0.4.x\nStream.Stream = Stream;\n\n\n\n// old-style streams.  Note that the pipe method (the only relevant\n// part of this class) is overridden in the Readable class.\n\nfunction Stream() {\n  EE.call(this);\n}\n\nStream.prototype.pipe = function(dest, options) {\n  var source = this;\n\n  function ondata(chunk) {\n    if (dest.writable) {\n      if (false === dest.write(chunk) && source.pause) {\n        source.pause();\n      }\n    }\n  }\n\n  source.on('data', ondata);\n\n  function ondrain() {\n    if (source.readable && source.resume) {\n      source.resume();\n    }\n  }\n\n  dest.on('drain', ondrain);\n\n  // If the 'end' option is not supplied, dest.end() will be called when\n  // source gets the 'end' or 'close' events.  Only dest.end() once.\n  if (!dest._isStdio && (!options || options.end !== false)) {\n    source.on('end', onend);\n    source.on('close', onclose);\n  }\n\n  var didOnEnd = false;\n  function onend() {\n    if (didOnEnd) return;\n    didOnEnd = true;\n\n    dest.end();\n  }\n\n\n  function onclose() {\n    if (didOnEnd) return;\n    didOnEnd = true;\n\n    if (typeof dest.destroy === 'function') dest.destroy();\n  }\n\n  // don't leave dangling pipes when there are errors.\n  function onerror(er) {\n    cleanup();\n    if (EE.listenerCount(this, 'error') === 0) {\n      throw er; // Unhandled stream error in pipe.\n    }\n  }\n\n  source.on('error', onerror);\n  dest.on('error', onerror);\n\n  // remove all the event listeners that were added.\n  function cleanup() {\n    source.removeListener('data', ondata);\n    dest.removeListener('drain', ondrain);\n\n    source.removeListener('end', onend);\n    source.removeListener('close', onclose);\n\n    source.removeListener('error', onerror);\n    dest.removeListener('error', onerror);\n\n    source.removeListener('end', cleanup);\n    source.removeListener('close', cleanup);\n\n    dest.removeListener('close', cleanup);\n  }\n\n  source.on('end', cleanup);\n  source.on('close', cleanup);\n\n  dest.on('close', cleanup);\n\n  dest.emit('pipe', source);\n\n  // Allow for unix-like usage: A.pipe(B).pipe(C)\n  return dest;\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n/*<replacement>*/\n\nvar Buffer = require('safe-buffer').Buffer;\n/*</replacement>*/\n\nvar isEncoding = Buffer.isEncoding || function (encoding) {\n  encoding = '' + encoding;\n  switch (encoding && encoding.toLowerCase()) {\n    case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':\n      return true;\n    default:\n      return false;\n  }\n};\n\nfunction _normalizeEncoding(enc) {\n  if (!enc) return 'utf8';\n  var retried;\n  while (true) {\n    switch (enc) {\n      case 'utf8':\n      case 'utf-8':\n        return 'utf8';\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return 'utf16le';\n      case 'latin1':\n      case 'binary':\n        return 'latin1';\n      case 'base64':\n      case 'ascii':\n      case 'hex':\n        return enc;\n      default:\n        if (retried) return; // undefined\n        enc = ('' + enc).toLowerCase();\n        retried = true;\n    }\n  }\n};\n\n// Do not cache `Buffer.isEncoding` when checking encoding names as some\n// modules monkey-patch it to support additional encodings\nfunction normalizeEncoding(enc) {\n  var nenc = _normalizeEncoding(enc);\n  if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);\n  return nenc || enc;\n}\n\n// StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters.\nexports.StringDecoder = StringDecoder;\nfunction StringDecoder(encoding) {\n  this.encoding = normalizeEncoding(encoding);\n  var nb;\n  switch (this.encoding) {\n    case 'utf16le':\n      this.text = utf16Text;\n      this.end = utf16End;\n      nb = 4;\n      break;\n    case 'utf8':\n      this.fillLast = utf8FillLast;\n      nb = 4;\n      break;\n    case 'base64':\n      this.text = base64Text;\n      this.end = base64End;\n      nb = 3;\n      break;\n    default:\n      this.write = simpleWrite;\n      this.end = simpleEnd;\n      return;\n  }\n  this.lastNeed = 0;\n  this.lastTotal = 0;\n  this.lastChar = Buffer.allocUnsafe(nb);\n}\n\nStringDecoder.prototype.write = function (buf) {\n  if (buf.length === 0) return '';\n  var r;\n  var i;\n  if (this.lastNeed) {\n    r = this.fillLast(buf);\n    if (r === undefined) return '';\n    i = this.lastNeed;\n    this.lastNeed = 0;\n  } else {\n    i = 0;\n  }\n  if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);\n  return r || '';\n};\n\nStringDecoder.prototype.end = utf8End;\n\n// Returns only complete characters in a Buffer\nStringDecoder.prototype.text = utf8Text;\n\n// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer\nStringDecoder.prototype.fillLast = function (buf) {\n  if (this.lastNeed <= buf.length) {\n    buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);\n    return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n  }\n  buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);\n  this.lastNeed -= buf.length;\n};\n\n// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a\n// continuation byte. If an invalid byte is detected, -2 is returned.\nfunction utf8CheckByte(byte) {\n  if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;\n  return byte >> 6 === 0x02 ? -1 : -2;\n}\n\n// Checks at most 3 bytes at the end of a Buffer in order to detect an\n// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)\n// needed to complete the UTF-8 character (if applicable) are returned.\nfunction utf8CheckIncomplete(self, buf, i) {\n  var j = buf.length - 1;\n  if (j < i) return 0;\n  var nb = utf8CheckByte(buf[j]);\n  if (nb >= 0) {\n    if (nb > 0) self.lastNeed = nb - 1;\n    return nb;\n  }\n  if (--j < i || nb === -2) return 0;\n  nb = utf8CheckByte(buf[j]);\n  if (nb >= 0) {\n    if (nb > 0) self.lastNeed = nb - 2;\n    return nb;\n  }\n  if (--j < i || nb === -2) return 0;\n  nb = utf8CheckByte(buf[j]);\n  if (nb >= 0) {\n    if (nb > 0) {\n      if (nb === 2) nb = 0;else self.lastNeed = nb - 3;\n    }\n    return nb;\n  }\n  return 0;\n}\n\n// Validates as many continuation bytes for a multi-byte UTF-8 character as\n// needed or are available. If we see a non-continuation byte where we expect\n// one, we \"replace\" the validated continuation bytes we've seen so far with\n// a single UTF-8 replacement character ('\\ufffd'), to match v8's UTF-8 decoding\n// behavior. The continuation byte check is included three times in the case\n// where all of the continuation bytes for a character exist in the same buffer.\n// It is also done this way as a slight performance increase instead of using a\n// loop.\nfunction utf8CheckExtraBytes(self, buf, p) {\n  if ((buf[0] & 0xC0) !== 0x80) {\n    self.lastNeed = 0;\n    return '\\ufffd';\n  }\n  if (self.lastNeed > 1 && buf.length > 1) {\n    if ((buf[1] & 0xC0) !== 0x80) {\n      self.lastNeed = 1;\n      return '\\ufffd';\n    }\n    if (self.lastNeed > 2 && buf.length > 2) {\n      if ((buf[2] & 0xC0) !== 0x80) {\n        self.lastNeed = 2;\n        return '\\ufffd';\n      }\n    }\n  }\n}\n\n// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.\nfunction utf8FillLast(buf) {\n  var p = this.lastTotal - this.lastNeed;\n  var r = utf8CheckExtraBytes(this, buf, p);\n  if (r !== undefined) return r;\n  if (this.lastNeed <= buf.length) {\n    buf.copy(this.lastChar, p, 0, this.lastNeed);\n    return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n  }\n  buf.copy(this.lastChar, p, 0, buf.length);\n  this.lastNeed -= buf.length;\n}\n\n// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a\n// partial character, the character's bytes are buffered until the required\n// number of bytes are available.\nfunction utf8Text(buf, i) {\n  var total = utf8CheckIncomplete(this, buf, i);\n  if (!this.lastNeed) return buf.toString('utf8', i);\n  this.lastTotal = total;\n  var end = buf.length - (total - this.lastNeed);\n  buf.copy(this.lastChar, 0, end);\n  return buf.toString('utf8', i, end);\n}\n\n// For UTF-8, a replacement character is added when ending on a partial\n// character.\nfunction utf8End(buf) {\n  var r = buf && buf.length ? this.write(buf) : '';\n  if (this.lastNeed) return r + '\\ufffd';\n  return r;\n}\n\n// UTF-16LE typically needs two bytes per character, but even if we have an even\n// number of bytes available, we need to check if we end on a leading/high\n// surrogate. In that case, we need to wait for the next two bytes in order to\n// decode the last character properly.\nfunction utf16Text(buf, i) {\n  if ((buf.length - i) % 2 === 0) {\n    var r = buf.toString('utf16le', i);\n    if (r) {\n      var c = r.charCodeAt(r.length - 1);\n      if (c >= 0xD800 && c <= 0xDBFF) {\n        this.lastNeed = 2;\n        this.lastTotal = 4;\n        this.lastChar[0] = buf[buf.length - 2];\n        this.lastChar[1] = buf[buf.length - 1];\n        return r.slice(0, -1);\n      }\n    }\n    return r;\n  }\n  this.lastNeed = 1;\n  this.lastTotal = 2;\n  this.lastChar[0] = buf[buf.length - 1];\n  return buf.toString('utf16le', i, buf.length - 1);\n}\n\n// For UTF-16LE we do not explicitly append special replacement characters if we\n// end on a partial character, we simply let v8 handle that.\nfunction utf16End(buf) {\n  var r = buf && buf.length ? this.write(buf) : '';\n  if (this.lastNeed) {\n    var end = this.lastTotal - this.lastNeed;\n    return r + this.lastChar.toString('utf16le', 0, end);\n  }\n  return r;\n}\n\nfunction base64Text(buf, i) {\n  var n = (buf.length - i) % 3;\n  if (n === 0) return buf.toString('base64', i);\n  this.lastNeed = 3 - n;\n  this.lastTotal = 3;\n  if (n === 1) {\n    this.lastChar[0] = buf[buf.length - 1];\n  } else {\n    this.lastChar[0] = buf[buf.length - 2];\n    this.lastChar[1] = buf[buf.length - 1];\n  }\n  return buf.toString('base64', i, buf.length - n);\n}\n\nfunction base64End(buf) {\n  var r = buf && buf.length ? this.write(buf) : '';\n  if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);\n  return r;\n}\n\n// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)\nfunction simpleWrite(buf) {\n  return buf.toString(this.encoding);\n}\n\nfunction simpleEnd(buf) {\n  return buf && buf.length ? this.write(buf) : '';\n}","var scope = (typeof global !== \"undefined\" && global) ||\n            (typeof self !== \"undefined\" && self) ||\n            window;\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n  return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n  return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n  if (timeout) {\n    timeout.close();\n  }\n};\n\nfunction Timeout(id, clearFn) {\n  this._id = id;\n  this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n  this._clearFn.call(scope, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n  clearTimeout(item._idleTimeoutId);\n  item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n  clearTimeout(item._idleTimeoutId);\n  item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n  clearTimeout(item._idleTimeoutId);\n\n  var msecs = item._idleTimeout;\n  if (msecs >= 0) {\n    item._idleTimeoutId = setTimeout(function onTimeout() {\n      if (item._onTimeout)\n        item._onTimeout();\n    }, msecs);\n  }\n};\n\n// setimmediate attaches itself to the global object\nrequire(\"setimmediate\");\n// On some exotic environments, it's not clear which object `setimmediate` was\n// able to install onto.  Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\n                       (typeof global !== \"undefined\" && global.setImmediate) ||\n                       (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\n                         (typeof global !== \"undefined\" && global.clearImmediate) ||\n                         (this && this.clearImmediate);\n","\n/**\n * Module exports.\n */\n\nmodule.exports = deprecate;\n\n/**\n * Mark that a method should not be used.\n * Returns a modified function which warns once by default.\n *\n * If `localStorage.noDeprecation = true` is set, then it is a no-op.\n *\n * If `localStorage.throwDeprecation = true` is set, then deprecated functions\n * will throw an Error when invoked.\n *\n * If `localStorage.traceDeprecation = true` is set, then deprecated functions\n * will invoke `console.trace()` instead of `console.error()`.\n *\n * @param {Function} fn - the function to deprecate\n * @param {String} msg - the string to print to the console when `fn` is invoked\n * @returns {Function} a new \"deprecated\" version of `fn`\n * @api public\n */\n\nfunction deprecate (fn, msg) {\n  if (config('noDeprecation')) {\n    return fn;\n  }\n\n  var warned = false;\n  function deprecated() {\n    if (!warned) {\n      if (config('throwDeprecation')) {\n        throw new Error(msg);\n      } else if (config('traceDeprecation')) {\n        console.trace(msg);\n      } else {\n        console.warn(msg);\n      }\n      warned = true;\n    }\n    return fn.apply(this, arguments);\n  }\n\n  return deprecated;\n}\n\n/**\n * Checks `localStorage` for boolean values for the given `name`.\n *\n * @param {String} name\n * @returns {Boolean}\n * @api private\n */\n\nfunction config (name) {\n  // accessing global.localStorage can trigger a DOMException in sandboxed iframes\n  try {\n    if (!global.localStorage) return false;\n  } catch (_) {\n    return false;\n  }\n  var val = global.localStorage[name];\n  if (null == val) return false;\n  return String(val).toLowerCase() === 'true';\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA,WAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/TA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9bA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3EA;AACA;AACA;AAAA;AAAA;AAAA;AACA,qBAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1fA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;;;;;;;;;;;;;AC3LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC3hBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACtQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACnNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AClRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC3dA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpIA;AACA;;;;;;;;;;;ACDA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACJA;AACA;;;;;;;;;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACNA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACPA;;;;;;;;;;;ACAA;AACA;AACA;;;;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACfA;AACA;AACA;;;;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC5PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC/YA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACjaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACxLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACj1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACxVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnhDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACtVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnsCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9CA;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACPA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACrnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7hBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAIA;;;;;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACXA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC7+BA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChSA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtGA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnBA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5CA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrGA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;;ACHA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACbA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1FA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7BA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACPA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA,aACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AChDA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACLA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC3BA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;;;ACHA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACLA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC7CA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrBA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACdA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACRA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC5BA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7hBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAIA;;;;;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACXA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnDA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClDA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjGA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpEA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACxBA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnDA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzDA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjSA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClTA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5JA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5EA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA,aACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChDA;AACA;AACA;;;;;;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7hBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAIA;;;;;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACXA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnDA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9EA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChHA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1IA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxGA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrJA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5EA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpCA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC/DA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC3kBA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAEA;AACA;AACA;AACA;;;;;;;;;;;;;;AClBA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AChBA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrEA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzNA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA,UAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7zvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC5GA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3DA;AACA;AACA;;;;;;;;;;;;ACFA;AACA;;;;;;;;;;;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACtJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC5vDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvLA;;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC9qBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzEA;;;;;;;;;;;;ACAA;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACNA;;;;;;;;;;;;ACAA;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;A","sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"bundle.js","sources":["webpack:///webpack/bootstrap","webpack:///./app/client/actions.js","webpack:///./app/client/api/crud.actions.js","webpack:///./app/client/api/crud.fetch.js","webpack:///./app/client/api/crud.types.js","webpack:///./app/client/api/crud.upload.js","webpack:///./app/client/api/index.js","webpack:///./app/client/api/parser.js","webpack:///./app/client/audio/lib/draw.js","webpack:///./app/client/audio/lib/index.js","webpack:///./app/client/audio/lib/output.js","webpack:///./app/client/audio/lib/spectrum.js","webpack:///./app/client/audio/lib/startAudioContext.js","webpack:///./app/client/audio/pix2wav.js","webpack:///./app/client/audio/wav2pix.js","webpack:///./app/client/auth/auth.actions.js","webpack:///./app/client/auth/auth.gate.js","webpack:///./app/client/auth/auth.reducer.js","webpack:///./app/client/auth/index.js","webpack:///./app/client/auth/login.component.js","webpack:///./app/client/auth/logout.component.js","webpack:///./app/client/auth/signup.component.js","webpack:///./app/client/common/audioPlayer/audioPlayer.actions.js","webpack:///./app/client/common/audioPlayer/audioPlayer.component.js","webpack:///./app/client/common/audioPlayer/audioPlayer.reducer.js","webpack:///./app/client/common/augmentationGrid.component.js","webpack:///./app/client/common/browser.component.js","webpack:///./app/client/common/button.component.js","webpack:///./app/client/common/buttonGrid.component.js","webpack:///./app/client/common/checkbox.component.js","webpack:///./app/client/common/currentTask.component.js","webpack:///./app/client/common/fileList.component.js","webpack:///./app/client/common/fileUpload.component.js","webpack:///./app/client/common/fileViewer.component.js","webpack:///./app/client/common/folderList.component.js","webpack:///./app/client/common/gallery.component.js","webpack:///./app/client/common/group.component.js","webpack:///./app/client/common/header.component.js","webpack:///./app/client/common/index.js","webpack:///./app/client/common/loading.component.js","webpack:///./app/client/common/numberInput.component.js","webpack:///./app/client/common/param.component.js","webpack:///./app/client/common/paramGroup.component.js","webpack:///./app/client/common/player.component.js","webpack:///./app/client/common/progress.component.js","webpack:///./app/client/common/select.component.js","webpack:///./app/client/common/selectGroup.component.js","webpack:///./app/client/common/slider.component.js","webpack:///./app/client/common/taskList.component.js","webpack:///./app/client/common/textInput.component.js","webpack:///./app/client/common/views/index.js","webpack:///./app/client/common/views/new.view.js","webpack:///./app/client/dashboard/dashboard.actions.js","webpack:///./app/client/dashboard/dashboard.component.js","webpack:///./app/client/dashboard/dashboard.reducer.js","webpack:///./app/client/dashboard/dashboardheader.component.js","webpack:///./app/client/dataset/dataset.actions.js","webpack:///./app/client/dataset/dataset.component.js","webpack:///./app/client/dataset/dataset.form.js","webpack:///./app/client/dataset/dataset.loader.js","webpack:///./app/client/dataset/dataset.new.js","webpack:///./app/client/dataset/dataset.reducer.js","webpack:///./app/client/dataset/upload.reducer.js","webpack:///./app/client/dataset/upload.status.js","webpack:///./app/client/index.jsx","webpack:///./app/client/live/live.actions.js","webpack:///./app/client/live/live.reducer.js","webpack:///./app/client/live/player.js","webpack:///./app/client/live/whammy.js","webpack:///./app/client/modules/index.js","webpack:///./app/client/modules/module.reducer.js","webpack:///./app/client/modules/morph/index.js","webpack:///./app/client/modules/morph/morph.actions.js","webpack:///./app/client/modules/morph/morph.module.js","webpack:///./app/client/modules/morph/morph.reducer.js","webpack:///./app/client/modules/morph/morph.tasks.js","webpack:///./app/client/modules/morph/views/morph.app.js","webpack:///./app/client/modules/pix2pix/index.js","webpack:///./app/client/modules/pix2pix/pix2pix.actions.js","webpack:///./app/client/modules/pix2pix/pix2pix.module.js","webpack:///./app/client/modules/pix2pix/pix2pix.reducer.js","webpack:///./app/client/modules/pix2pix/pix2pix.tasks.js","webpack:///./app/client/modules/pix2pix/views/pix2pix.live.js","webpack:///./app/client/modules/pix2pix/views/pix2pix.new.js","webpack:///./app/client/modules/pix2pix/views/pix2pix.show.js","webpack:///./app/client/modules/pix2pixhd/index.js","webpack:///./app/client/modules/pix2pixhd/pix2pixhd.actions.js","webpack:///./app/client/modules/pix2pixhd/pix2pixhd.module.js","webpack:///./app/client/modules/pix2pixhd/pix2pixhd.reducer.js","webpack:///./app/client/modules/pix2pixhd/pix2pixhd.tasks.js","webpack:///./app/client/modules/pix2pixhd/views/pix2pixhd.live.js","webpack:///./app/client/modules/pix2pixhd/views/pix2pixhd.new.js","webpack:///./app/client/modules/pix2pixhd/views/pix2pixhd.results.js","webpack:///./app/client/modules/pix2pixhd/views/pix2pixhd.show.js","webpack:///./app/client/modules/pix2pixhd/views/pix2pixhd.train.js","webpack:///./app/client/modules/pix2wav/index.js","webpack:///./app/client/modules/pix2wav/pix2wav.actions.js","webpack:///./app/client/modules/pix2wav/pix2wav.module.js","webpack:///./app/client/modules/pix2wav/pix2wav.reducer.js","webpack:///./app/client/modules/pix2wav/pix2wav.tasks.js","webpack:///./app/client/modules/pix2wav/views/pix2wav.live.js","webpack:///./app/client/modules/pix2wav/views/pix2wav.new.js","webpack:///./app/client/modules/pix2wav/views/pix2wav.show.js","webpack:///./app/client/modules/pix2wav/views/spectrogram.upload.js","webpack:///./app/client/modules/samplernn/index.js","webpack:///./app/client/modules/samplernn/samplernn.actions.js","webpack:///./app/client/modules/samplernn/samplernn.module.js","webpack:///./app/client/modules/samplernn/samplernn.reducer.js","webpack:///./app/client/modules/samplernn/samplernn.tasks.js","webpack:///./app/client/modules/samplernn/views/samplernn.graph.js","webpack:///./app/client/modules/samplernn/views/samplernn.import.js","webpack:///./app/client/modules/samplernn/views/samplernn.new.js","webpack:///./app/client/modules/samplernn/views/samplernn.results.js","webpack:///./app/client/modules/samplernn/views/samplernn.show.js","webpack:///./app/client/queue/queue.actions.js","webpack:///./app/client/queue/queue.reducer.js","webpack:///./app/client/socket/index.js","webpack:///./app/client/socket/socket.actions.js","webpack:///./app/client/socket/socket.api.js","webpack:///./app/client/socket/socket.connection.js","webpack:///./app/client/socket/socket.live.js","webpack:///./app/client/socket/socket.system.js","webpack:///./app/client/socket/socket.task.js","webpack:///./app/client/store.js","webpack:///./app/client/system/system.actions.js","webpack:///./app/client/system/system.component.js","webpack:///./app/client/system/system.reducer.js","webpack:///./app/client/types.js","webpack:///./app/client/util/format.js","webpack:///./app/client/util/hidpi-canvas.js","webpack:///./app/client/util/index.js","webpack:///./app/client/util/math.js","webpack:///./app/client/util/sort.js","webpack:///./node_modules/fetch-jsonp/build/fetch-jsonp.js","webpack:///./node_modules/fft.js/lib/fft.js","webpack:///./node_modules/file-saver/FileSaver.js","webpack:///./node_modules/history/DOMUtils.js","webpack:///./node_modules/history/LocationUtils.js","webpack:///./node_modules/history/PathUtils.js","webpack:///./node_modules/history/createBrowserHistory.js","webpack:///./node_modules/history/createTransitionManager.js","webpack:///./node_modules/invariant/browser.js","webpack:///./node_modules/jszip/lib/base64.js","webpack:///./node_modules/jszip/lib/compressedObject.js","webpack:///./node_modules/jszip/lib/compressions.js","webpack:///./node_modules/jszip/lib/crc32.js","webpack:///./node_modules/jszip/lib/defaults.js","webpack:///./node_modules/jszip/lib/external.js","webpack:///./node_modules/jszip/lib/flate.js","webpack:///./node_modules/jszip/lib/generate/ZipFileWorker.js","webpack:///./node_modules/jszip/lib/generate/index.js","webpack:///./node_modules/jszip/lib/index.js","webpack:///./node_modules/jszip/lib/load.js","webpack:///./node_modules/jszip/lib/nodejs/NodejsStreamInputAdapter.js","webpack:///./node_modules/jszip/lib/nodejs/NodejsStreamOutputAdapter.js","webpack:///./node_modules/jszip/lib/nodejsUtils.js","webpack:///./node_modules/jszip/lib/object.js","webpack:///./node_modules/jszip/lib/readable-stream-browser.js","webpack:///./node_modules/jszip/lib/reader/ArrayReader.js","webpack:///./node_modules/jszip/lib/reader/DataReader.js","webpack:///./node_modules/jszip/lib/reader/NodeBufferReader.js","webpack:///./node_modules/jszip/lib/reader/StringReader.js","webpack:///./node_modules/jszip/lib/reader/Uint8ArrayReader.js","webpack:///./node_modules/jszip/lib/reader/readerFor.js","webpack:///./node_modules/jszip/lib/signature.js","webpack:///./node_modules/jszip/lib/stream/ConvertWorker.js","webpack:///./node_modules/jszip/lib/stream/Crc32Probe.js","webpack:///./node_modules/jszip/lib/stream/DataLengthProbe.js","webpack:///./node_modules/jszip/lib/stream/DataWorker.js","webpack:///./node_modules/jszip/lib/stream/GenericWorker.js","webpack:///./node_modules/jszip/lib/stream/StreamHelper.js","webpack:///./node_modules/jszip/lib/support.js","webpack:///./node_modules/jszip/lib/utf8.js","webpack:///./node_modules/jszip/lib/utils.js","webpack:///./node_modules/jszip/lib/zipEntries.js","webpack:///./node_modules/jszip/lib/zipEntry.js","webpack:///./node_modules/jszip/lib/zipObject.js","webpack:///./node_modules/jszip/node_modules/core-js/library/fn/set-immediate.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_a-function.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_an-object.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_cof.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_core.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_ctx.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_descriptors.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_dom-create.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_export.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_fails.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_global.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_hide.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_html.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_ie8-dom-define.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_invoke.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_is-object.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_object-dp.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_property-desc.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_task.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/_to-primitive.js","webpack:///./node_modules/jszip/node_modules/core-js/library/modules/web.immediate.js","webpack:///./node_modules/jszip/node_modules/immediate/lib/browser.js","webpack:///./node_modules/jszip/node_modules/lie/lib/browser.js","webpack:///./node_modules/jszip/node_modules/pako/index.js","webpack:///./node_modules/jszip/node_modules/pako/lib/deflate.js","webpack:///./node_modules/jszip/node_modules/pako/lib/inflate.js","webpack:///./node_modules/jszip/node_modules/pako/lib/utils/common.js","webpack:///./node_modules/jszip/node_modules/pako/lib/utils/strings.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/adler32.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/constants.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/crc32.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/deflate.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/gzheader.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/inffast.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/inflate.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/inftrees.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/messages.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/trees.js","webpack:///./node_modules/jszip/node_modules/pako/lib/zlib/zstream.js","webpack:///./node_modules/moment/min/moment.min.js","webpack:///./node_modules/node-fetch/browser.js","webpack:///./node_modules/preact-compat/dist/preact-compat.es.js","webpack:///./node_modules/preact-compat/node_modules/fbjs/lib/emptyFunction.js","webpack:///./node_modules/preact-compat/node_modules/fbjs/lib/invariant.js","webpack:///./node_modules/preact-compat/node_modules/fbjs/lib/warning.js","webpack:///./node_modules/preact-compat/node_modules/object-assign/index.js","webpack:///./node_modules/preact-compat/node_modules/prop-types/checkPropTypes.js","webpack:///./node_modules/preact-compat/node_modules/prop-types/factoryWithTypeCheckers.js","webpack:///./node_modules/preact-compat/node_modules/prop-types/index.js","webpack:///./node_modules/preact-compat/node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack:///./node_modules/preact/dist/preact.esm.js","webpack:///./node_modules/react-redux/es/components/Provider.js","webpack:///./node_modules/react-redux/es/components/connectAdvanced.js","webpack:///./node_modules/react-redux/es/connect/connect.js","webpack:///./node_modules/react-redux/es/connect/mapDispatchToProps.js","webpack:///./node_modules/react-redux/es/connect/mapStateToProps.js","webpack:///./node_modules/react-redux/es/connect/mergeProps.js","webpack:///./node_modules/react-redux/es/connect/selectorFactory.js","webpack:///./node_modules/react-redux/es/connect/verifySubselectors.js","webpack:///./node_modules/react-redux/es/connect/wrapMapToProps.js","webpack:///./node_modules/react-redux/es/index.js","webpack:///./node_modules/react-redux/es/utils/PropTypes.js","webpack:///./node_modules/react-redux/es/utils/Subscription.js","webpack:///./node_modules/react-redux/es/utils/shallowEqual.js","webpack:///./node_modules/react-redux/es/utils/verifyPlainObject.js","webpack:///./node_modules/react-redux/es/utils/warning.js","webpack:///./node_modules/react-redux/node_modules/fbjs/lib/emptyFunction.js","webpack:///./node_modules/react-redux/node_modules/fbjs/lib/invariant.js","webpack:///./node_modules/react-redux/node_modules/fbjs/lib/warning.js","webpack:///./node_modules/react-redux/node_modules/hoist-non-react-statics/index.js","webpack:///./node_modules/react-redux/node_modules/invariant/browser.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/_Symbol.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/_baseGetTag.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/_freeGlobal.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/_getPrototype.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/_getRawTag.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/_objectToString.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/_overArg.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/_root.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/isObjectLike.js","webpack:///./node_modules/react-redux/node_modules/lodash-es/isPlainObject.js","webpack:///./node_modules/react-redux/node_modules/object-assign/index.js","webpack:///./node_modules/react-redux/node_modules/prop-types/checkPropTypes.js","webpack:///./node_modules/react-redux/node_modules/prop-types/factoryWithTypeCheckers.js","webpack:///./node_modules/react-redux/node_modules/prop-types/index.js","webpack:///./node_modules/react-redux/node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack:///./node_modules/react-router-dom/es/BrowserRouter.js","webpack:///./node_modules/react-router-dom/es/HashRouter.js","webpack:///./node_modules/react-router-dom/es/Link.js","webpack:///./node_modules/react-router-dom/es/MemoryRouter.js","webpack:///./node_modules/react-router-dom/es/NavLink.js","webpack:///./node_modules/react-router-dom/es/Prompt.js","webpack:///./node_modules/react-router-dom/es/Redirect.js","webpack:///./node_modules/react-router-dom/es/Route.js","webpack:///./node_modules/react-router-dom/es/Router.js","webpack:///./node_modules/react-router-dom/es/StaticRouter.js","webpack:///./node_modules/react-router-dom/es/Switch.js","webpack:///./node_modules/react-router-dom/es/index.js","webpack:///./node_modules/react-router-dom/es/matchPath.js","webpack:///./node_modules/react-router-dom/es/withRouter.js","webpack:///./node_modules/react-router-dom/node_modules/fbjs/lib/emptyFunction.js","webpack:///./node_modules/react-router-dom/node_modules/fbjs/lib/invariant.js","webpack:///./node_modules/react-router-dom/node_modules/fbjs/lib/warning.js","webpack:///./node_modules/react-router-dom/node_modules/history/DOMUtils.js","webpack:///./node_modules/react-router-dom/node_modules/history/LocationUtils.js","webpack:///./node_modules/react-router-dom/node_modules/history/PathUtils.js","webpack:///./node_modules/react-router-dom/node_modules/history/createBrowserHistory.js","webpack:///./node_modules/react-router-dom/node_modules/history/createHashHistory.js","webpack:///./node_modules/react-router-dom/node_modules/history/createTransitionManager.js","webpack:///./node_modules/react-router-dom/node_modules/history/es/DOMUtils.js","webpack:///./node_modules/react-router-dom/node_modules/history/es/LocationUtils.js","webpack:///./node_modules/react-router-dom/node_modules/history/es/PathUtils.js","webpack:///./node_modules/react-router-dom/node_modules/history/es/createBrowserHistory.js","webpack:///./node_modules/react-router-dom/node_modules/history/es/createHashHistory.js","webpack:///./node_modules/react-router-dom/node_modules/history/es/createMemoryHistory.js","webpack:///./node_modules/react-router-dom/node_modules/history/es/createTransitionManager.js","webpack:///./node_modules/react-router-dom/node_modules/history/es/index.js","webpack:///./node_modules/react-router-dom/node_modules/hoist-non-react-statics/index.js","webpack:///./node_modules/react-router-dom/node_modules/invariant/browser.js","webpack:///./node_modules/react-router-dom/node_modules/isarray/index.js","webpack:///./node_modules/react-router-dom/node_modules/object-assign/index.js","webpack:///./node_modules/react-router-dom/node_modules/path-to-regexp/index.js","webpack:///./node_modules/react-router-dom/node_modules/prop-types/checkPropTypes.js","webpack:///./node_modules/react-router-dom/node_modules/prop-types/factoryWithTypeCheckers.js","webpack:///./node_modules/react-router-dom/node_modules/prop-types/index.js","webpack:///./node_modules/react-router-dom/node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/MemoryRouter.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/Prompt.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/Redirect.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/Route.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/Router.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/StaticRouter.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/Switch.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/generatePath.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/matchPath.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/es/withRouter.js","webpack:///./node_modules/react-router-dom/node_modules/react-router/node_modules/warning/warning.js","webpack:///./node_modules/react-router-dom/node_modules/resolve-pathname/index.js","webpack:///./node_modules/react-router-dom/node_modules/value-equal/index.js","webpack:///./node_modules/react-router-dom/node_modules/warning/browser.js","webpack:///./node_modules/react-router-redux/lib/actions.js","webpack:///./node_modules/react-router-redux/lib/index.js","webpack:///./node_modules/react-router-redux/lib/middleware.js","webpack:///./node_modules/react-router-redux/lib/reducer.js","webpack:///./node_modules/react-router-redux/lib/sync.js","webpack:///./node_modules/redux-thunk/lib/index.js","webpack:///./node_modules/redux/es/redux.js","webpack:///./node_modules/redux/node_modules/symbol-observable/es/index.js","webpack:///./node_modules/redux/node_modules/symbol-observable/es/ponyfill.js","webpack:///./node_modules/resolve-pathname/index.js","webpack:///./node_modules/signal-windows/index.js","webpack:///./node_modules/signal-windows/src/framer.js","webpack:///./node_modules/signal-windows/src/windows.js","webpack:///./node_modules/sprintf-js/src/sprintf.js","webpack:///./node_modules/tone/build/Tone.js","webpack:///./node_modules/uuid/lib/bytesToUuid.js","webpack:///./node_modules/uuid/lib/rng-browser.js","webpack:///./node_modules/uuid/v1.js","webpack:///./node_modules/value-equal/index.js","webpack:///./node_modules/warning/browser.js","webpack:///(webpack)/buildin/amd-define.js","webpack:///(webpack)/buildin/amd-options.js","webpack:///(webpack)/buildin/global.js","webpack:///(webpack)/buildin/harmony-module.js","webpack:///(webpack)/buildin/module.js","webpack:///(webpack)/node_modules/base64-js/index.js","webpack:///(webpack)/node_modules/buffer/index.js","webpack:///(webpack)/node_modules/core-util-is/lib/util.js","webpack:///(webpack)/node_modules/events/events.js","webpack:///(webpack)/node_modules/ieee754/index.js","webpack:///(webpack)/node_modules/inherits/inherits_browser.js","webpack:///(webpack)/node_modules/isarray/index.js","webpack:///(webpack)/node_modules/process-nextick-args/index.js","webpack:///(webpack)/node_modules/process/browser.js","webpack:///(webpack)/node_modules/readable-stream/duplex-browser.js","webpack:///(webpack)/node_modules/readable-stream/lib/_stream_duplex.js","webpack:///(webpack)/node_modules/readable-stream/lib/_stream_passthrough.js","webpack:///(webpack)/node_modules/readable-stream/lib/_stream_readable.js","webpack:///(webpack)/node_modules/readable-stream/lib/_stream_transform.js","webpack:///(webpack)/node_modules/readable-stream/lib/_stream_writable.js","webpack:///(webpack)/node_modules/readable-stream/lib/internal/streams/BufferList.js","webpack:///(webpack)/node_modules/readable-stream/lib/internal/streams/destroy.js","webpack:///(webpack)/node_modules/readable-stream/lib/internal/streams/stream-browser.js","webpack:///(webpack)/node_modules/readable-stream/passthrough.js","webpack:///(webpack)/node_modules/readable-stream/readable-browser.js","webpack:///(webpack)/node_modules/readable-stream/transform.js","webpack:///(webpack)/node_modules/readable-stream/writable-browser.js","webpack:///(webpack)/node_modules/safe-buffer/index.js","webpack:///(webpack)/node_modules/setimmediate/setImmediate.js","webpack:///(webpack)/node_modules/stream-browserify/index.js","webpack:///(webpack)/node_modules/string_decoder/lib/string_decoder.js","webpack:///(webpack)/node_modules/timers-browserify/main.js","webpack:///(webpack)/node_modules/util-deprecate/browser.js"],"sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./app/client/index.jsx\");\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _redux = require('redux');\n\nvar _api = require('./api');\n\nvar _live = require('./live/live.actions');\n\nvar liveActions = _interopRequireWildcard(_live);\n\nvar _queue = require('./queue/queue.actions');\n\nvar queueActions = _interopRequireWildcard(_queue);\n\nvar _system = require('./system/system.actions');\n\nvar systemActions = _interopRequireWildcard(_system);\n\nvar _socket = require('./socket/socket.actions');\n\nvar socketActions = _interopRequireWildcard(_socket);\n\nvar _dataset = require('./dataset/dataset.actions');\n\nvar datasetActions = _interopRequireWildcard(_dataset);\n\nvar _audioPlayer = require('./common/audioPlayer/audioPlayer.actions');\n\nvar audioPlayerActions = _interopRequireWildcard(_audioPlayer);\n\nvar _store = require('./store');\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nexports.default = Object.keys(_api.actions).map(function (a) {\n  return [a, _api.actions[a]];\n}).concat([['live', liveActions], ['queue', queueActions], ['system', systemActions], ['dataset', datasetActions], ['audioPlayer', audioPlayerActions]]).map(function (p) {\n  return [p[0], (0, _redux.bindActionCreators)(p[1], _store.store.dispatch)];\n}).concat([['socket', socketActions]]).reduce(function (a, b) {\n  return (a[b[0]] = b[1]) && a;\n}, {});","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.crud_action = undefined;\nexports.crud_actions = crud_actions;\n\nvar _crud = require('./crud.fetch');\n\nvar _crud2 = require('./crud.types');\n\nvar _crud3 = require('./crud.upload');\n\nfunction crud_actions(type) {\n  var fetch_type = (0, _crud.crud_fetch)(type);\n  return ['index', 'show', 'create', 'update', 'destroy'].reduce(function (lookup, param) {\n    lookup[param] = crud_action(type, param, function (q) {\n      return fetch_type[param](q);\n    });\n    return lookup;\n  }, {\n    action: function action(method, fn) {\n      return crud_action(type, method, fn);\n    },\n    upload: function upload(id, fd) {\n      return (0, _crud3.upload_action)(type, id, fd);\n    }\n  });\n}\n\nvar crud_action = exports.crud_action = function crud_action(type, method, fn) {\n  return function (q) {\n    return function (dispatch) {\n      return new Promise(function (resolve, reject) {\n        dispatch({ type: (0, _crud2.as_type)(type, method + '_loading') });\n        fn(q).then(function (data) {\n          dispatch({ type: (0, _crud2.as_type)(type, method), data: data });\n          resolve(data);\n        }).catch(function (e) {\n          dispatch({ type: (0, _crud2.as_type)(type, method + '_error') });\n          reject(e);\n        });\n      });\n    };\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.destroy = undefined;\nexports.crud_fetch = crud_fetch;\nexports._get_headers = _get_headers;\nexports.post = post;\nexports.postBody = postBody;\nexports.put = put;\n\nvar _nodeFetch = require('node-fetch');\n\nvar _nodeFetch2 = _interopRequireDefault(_nodeFetch);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction crud_fetch(type, tag) {\n  var uri = '/api/' + type + '/' + (tag || '');\n  return {\n    index: function index(q) {\n      return (0, _nodeFetch2.default)(_get_url(uri, q), _get_headers()).then(function (req) {\n        return req.json();\n      }).catch(error);\n    },\n\n    show: function show(id) {\n      return (0, _nodeFetch2.default)(uri + id, _get_headers(), _get_headers()).then(function (req) {\n        return req.json();\n      }).catch(error);\n    },\n\n    create: function create(data) {\n      return (0, _nodeFetch2.default)(uri, post(data)).then(function (req) {\n        return req.json();\n      }).catch(error);\n    },\n\n    update: function update(data) {\n      return (0, _nodeFetch2.default)(uri + data.id, put(data)).then(function (req) {\n        return req.json();\n      }).catch(error);\n    },\n\n    destroy: function destroy(data) {\n      return (0, _nodeFetch2.default)(uri + data.id, _destroy(data)).then(function (req) {\n        return req.json();\n      }).catch(error);\n    }\n  };\n}\n\nfunction _get_url(_url, data) {\n  var url = new URL(window.location.origin + _url);\n  if (data) {\n    Object.keys(data).forEach(function (key) {\n      return url.searchParams.append(key, data[key]);\n    });\n  }\n  return url;\n}\nfunction _get_headers() {\n  return {\n    method: 'GET',\n    credentials: 'same-origin',\n    headers: {\n      'Accept': 'application/json'\n    }\n  };\n}\nfunction post(data) {\n  return {\n    method: 'POST',\n    body: JSON.stringify(data),\n    credentials: 'same-origin',\n    headers: {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json'\n    }\n  };\n}\nfunction postBody(data) {\n  return {\n    method: 'POST',\n    body: data,\n    credentials: 'same-origin',\n    headers: {\n      'Accept': 'application/json'\n    }\n  };\n}\nfunction put(data) {\n  return {\n    method: 'PUT',\n    body: JSON.stringify(data),\n    credentials: 'same-origin',\n    headers: {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json'\n    }\n  };\n}\nfunction _destroy(data) {\n  return {\n    method: 'DELETE',\n    body: JSON.stringify(data),\n    credentials: 'same-origin',\n    headers: {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json'\n    }\n  };\n}\nexports.destroy = _destroy;\nfunction error(err) {\n  console.warn(err);\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nvar as_type = exports.as_type = function as_type(a, b) {\n  return [a, b].join('_').toUpperCase();\n};\n\nvar with_type = exports.with_type = function with_type(type, actions) {\n  return actions.reduce(function (a, b) {\n    return (a[b] = as_type(type, b)) && a;\n  }, {});\n};\n\nvar crud_type = exports.crud_type = function crud_type(type) {\n  var actions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n  return with_type(type, actions.concat(['index_loading', 'index', 'index_error', 'show_loading', 'show', 'show_error', 'create_loading', 'create', 'create_error', 'update_loading', 'update', 'update_error', 'destroy_loading', 'destroy', 'destroy_error', 'upload_loading', 'upload_progress', 'upload_waiting', 'upload_complete', 'upload_error', 'sort']));\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.upload_action = undefined;\nexports.crud_upload = crud_upload;\n\nvar _crud = require('./crud.types');\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction crud_upload(type, fd, data, dispatch) {\n  return new Promise(function (resolve, reject) {\n    var id = data.id;\n\n    Object.keys(data).forEach(function (key) {\n      if (key !== 'id') {\n        fd.append(key, data[key]);\n      }\n    });\n\n    console.log('/api/' + type + '/' + id + '/upload/');\n\n    var xhr = new XMLHttpRequest();\n    xhr.upload.addEventListener(\"progress\", uploadProgress, false);\n    xhr.addEventListener(\"load\", uploadComplete, false);\n    xhr.addEventListener(\"error\", uploadFailed, false);\n    xhr.addEventListener(\"abort\", uploadCancelled, false);\n    xhr.open(\"POST\", '/api/' + type + '/' + id + '/upload/');\n    xhr.send(fd);\n\n    dispatch && dispatch({ type: (0, _crud.as_type)(type, 'upload_loading') });\n\n    var complete = false;\n\n    function uploadProgress(e) {\n      if (e.lengthComputable) {\n        var percent = Math.round(e.loaded * 100 / e.total) || 0;\n        if (percent > 99) {\n          dispatch && dispatch(_defineProperty({\n            type: (0, _crud.as_type)(type, 'upload_waiting'),\n            percent: percent\n          }, type, id));\n        } else {\n          dispatch && dispatch(_defineProperty({\n            type: (0, _crud.as_type)(type, 'upload_progress'),\n            percent: percent\n          }, type, id));\n        }\n      } else {\n        dispatch && dispatch(_defineProperty({\n          type: (0, _crud.as_type)(type, 'upload_error'),\n          error: 'unable to compute upload progress'\n        }, type, id));\n      }\n    }\n\n    function uploadComplete(e) {\n      var parsed = void 0;\n      try {\n        parsed = JSON.parse(e.target.responseText);\n      } catch (e) {\n        dispatch && dispatch(_defineProperty({\n          type: (0, _crud.as_type)(type, 'upload_error'),\n          error: 'upload failed'\n        }, type, id));\n        reject(e);\n        return;\n      }\n      dispatch && dispatch(_defineProperty({\n        type: (0, _crud.as_type)(type, 'upload_complete'),\n        data: parsed\n      }, type, id));\n      if (parsed.files && parsed.files.length) {\n        parsed.files.forEach(function (file) {\n          console.log(file);\n          dispatch && dispatch({\n            type: (0, _crud.as_type)('file', 'create'),\n            data: file\n          });\n        });\n      }\n      resolve(parsed);\n    }\n\n    function uploadFailed(evt) {\n      dispatch && dispatch(_defineProperty({\n        type: (0, _crud.as_type)(type, 'upload_error'),\n        error: 'upload failed'\n      }, type, id));\n      reject(evt);\n    }\n\n    function uploadCancelled(evt) {\n      dispatch && dispatch(_defineProperty({\n        type: (0, _crud.as_type)(type, 'upload_error'),\n        error: 'upload cancelled'\n      }, type, id));\n      reject(evt);\n    }\n  });\n}\n\nvar upload_action = exports.upload_action = function upload_action(type, id, fd) {\n  return function (dispatch) {\n    return crud_upload(type, id, fd, dispatch);\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.actions = exports.parser = exports.util = undefined;\n\nvar _crud = require('./crud.actions');\n\nvar _util = require('../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _parser = require('./parser');\n\nvar parser = _interopRequireWildcard(_parser);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/*\nfor our crud events, create corresponding actions\nthe actions fire a 'loading' event, call the underlying api method, and then resolve.\nso you can do ... \n  import { folderActions } from '../../api'\n  folderActions.index({ module: 'samplernn' })\n  folderActions.show(12)\n  folderActions.create({ module: 'samplernn', name: 'foo' })\n  folderActions.update(12, { module: 'pix2pix' })\n  folderActions.destroy(12, { confirm: true })\n  folderActions.upload(12, form_data)\n*/\n\nexports.util = _util2.default;\nexports.parser = parser;\nvar actions = exports.actions = ['folder', 'file', 'dataset', 'task', 'user'].reduce(function (a, b) {\n  return (a[b] = (0, _crud.crud_actions)(b)) && a;\n}, {});","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.tumblr = exports.thumbnail = exports.loadImage = exports.tag = exports.parse = exports.lookup = exports.integrations = undefined;\n\nvar _nodeFetch = require('node-fetch');\n\nvar _nodeFetch2 = _interopRequireDefault(_nodeFetch);\n\nvar _fetchJsonp = require('fetch-jsonp');\n\nvar _fetchJsonp2 = _interopRequireDefault(_fetchJsonp);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar integrations = exports.integrations = [{\n  type: 'image',\n  regex: /\\.(jpeg|jpg|gif|png|svg)(\\?.*)?$/i,\n  fetch: function fetch(url, done) {\n    var img = new Image();\n    img.onload = function () {\n      if (!img) return;\n      var width = img.naturalWidth,\n          height = img.naturalHeight;\n      img = null;\n      done({\n        url: url,\n        type: \"image\",\n        token: \"\",\n        thumbnail: \"\",\n        title: \"\",\n        width: width,\n        height: height\n      });\n    };\n    img.src = url;\n    if (img.complete) {\n      img.onload();\n    }\n  },\n  tag: function tag(media) {\n    return '<img src=\"' + media.url + '\">';\n  }\n}, {\n  type: 'video',\n  regex: /\\.(mp4|webm)(\\?.*)?$/i,\n  fetch: function fetch(url, done) {\n    var video = document.createElement(\"video\");\n    var url_parts = url.replace(/\\?.*$/, \"\").split(\"/\");\n    var filename = url_parts[url_parts.length - 1];\n    video.addEventListener(\"loadedmetadata\", function () {\n      var width = video.videoWidth,\n          height = video.videoHeight;\n      video = null;\n      done({\n        url: url,\n        type: \"video\",\n        token: url,\n        thumbnail: \"/public/assets/img/video-thumbnail.png\",\n        title: filename,\n        width: width,\n        height: height\n      });\n    });\n    video.src = url;\n    video.load();\n  },\n  tag: function tag(media) {\n    return '<video src=\"' + media.url + '\">';\n  }\n}, {\n  type: 'audio',\n  regex: /\\.(wav|mp3)(\\?.*)?$/i,\n  fetch: function fetch(url, done) {\n    var audio = document.createElement(\"audio\");\n    var url_parts = url.replace(/\\?.*$/, \"\").split(\"/\");\n    var filename = url_parts[url_parts.length - 1];\n    audio.addEventListener(\"loadedmetadata\", function () {\n      var duration = audio.duration;\n      audio = null;\n      done({\n        url: url,\n        type: \"audio\",\n        token: url,\n        thumbnail: \"/public/assets/img/audio-thumbnail.png\",\n        title: filename,\n        duration: duration\n      });\n    });\n    audio.src = url;\n    audio.load();\n  },\n  tag: function tag(media) {\n    return '<audio src=\"' + media.url + '\">';\n  }\n}, {\n  type: 'youtube',\n  regex: /(?:youtube\\.com\\/(?:[^\\/]+\\/.+\\/|(?:v|e(?:mbed)?)\\/|.*[?&]v=)|youtu\\.be\\/)([^\"&?\\/ ]{11})/i,\n  fetch: function fetch(url, done) {\n    var id = (url.match(/v=([-_a-zA-Z0-9]{11})/i) || url.match(/youtu.be\\/([-_a-zA-Z0-9]{11})/i) || url.match(/embed\\/([-_a-zA-Z0-9]{11})/i))[1].split('&')[0];\n    var thumb = \"https://i.ytimg.com/vi/\" + id + \"/hqdefault.jpg\";\n\n    var jsonp_url = new URL('https://www.googleapis.com/youtube/v3/videos');\n    var data = {\n      id: id,\n      key: \"AIzaSyCaLRGY-hxs92045X-Jew7w1FgQPkStHgc\",\n      part: \"id,contentDetails,snippet,status\"\n    };\n    Object.keys(data).forEach(function (key) {\n      return jsonp_url.searchParams.append(key, data[key]);\n    });\n\n    (0, _fetchJsonp2.default)(jsonp_url.toString()).then(function (result) {\n      return result.json();\n    }).then(function (result) {\n      if (!result || !result.items.length) {\n        return alert(\"Sorry, this video URL is invalid.\");\n      }\n      var res = result.items[0];\n      // console.log(res)\n\n      var dd = res.contentDetails.duration.match(/\\d+/g).map(function (i) {\n        return parseInt(i);\n      });\n      var duration = 0;\n      if (dd.length == 3) {\n        duration = dd[0] * 60 + dd[1] * 60 + dd[2];\n      } else if (dd.length == 2) {\n        duration = dd[0] * 60 + dd[1];\n      } else {\n        duration = dd[0];\n      }\n\n      [\"maxres\", \"high\", \"medium\", \"standard\", \"default\"].some(function (t) {\n        if (res.snippet.thumbnails[t]) {\n          thumb = res.snippet.thumbnails[t].url;\n          return true;\n        }\n        return false;\n      });\n\n      done({\n        url: url,\n        type: \"youtube\",\n        token: id,\n        thumbnail: thumb,\n        title: res.snippet.title,\n        duration: duration,\n        width: 640,\n        height: 360\n      });\n    });\n  },\n  tag: function tag(media) {\n    // return '<img class=\"video\" type=\"youtube\" vid=\"'+media.token+'\" src=\"'+media.thumbnail+'\"><span class=\"playvid\">&#9654;</span>';\n    return '<div class=\"video\" style=\"width: ' + media.width + 'px; height: ' + media.height + 'px; overflow: hidden; position: relative;\"><iframe frameborder=\"0\" scrolling=\"no\" seamless=\"seamless\" webkitallowfullscreen=\"webkitAllowFullScreen\" mozallowfullscreen=\"mozallowfullscreen\" allowfullscreen=\"allowfullscreen\" id=\"okplayer\" width=\"' + media.width + '\" height=\"' + media.height + '\" src=\"https://youtube.com/embed/' + media.token + '?showinfo=0\" style=\"position: absolute; top: 0px; left: 0px; width: ' + media.width + 'px; height: ' + media.height + 'px;\"></iframe></div>';\n  }\n}, {\n  type: 'vimeo',\n  regex: /vimeo.com\\/\\d+$/i,\n  fetch: function fetch(url, done) {\n    var id = url.match(/\\d+$/i)[0];\n    (0, _nodeFetch2.default)('https://vimeo.com/api/v2/video/' + id + '.json').then(function (result) {\n      return result.json();\n    }).then(function (result) {\n      if (result.length == 0) {\n        return done(id, \"\", 640, 360);\n      }\n      var res = result[0];\n      if (res.embed_privacy != \"anywhere\") {\n        alert(\"Sorry, the author of this video has marked it private, preventing it from being embedded.\", function () {});\n        return;\n      }\n      done({\n        url: url,\n        type: \"vimeo\",\n        token: id,\n        thumbnail: res.thumbnail_large,\n        duration: res.duration,\n        title: res.title,\n        width: res.width,\n        height: res.height\n      });\n    });\n  },\n  tag: function tag(media) {\n    // return '<img class=\"video\" type=\"vimeo\" vid=\"'+media.token+'\" src=\"'+media.thumbnail+'\"><span class=\"playvid\">&#9654;</span>';\n    return '<div class=\"video\" style=\"width: ' + media.width + 'px; height: ' + media.height + 'px; overflow: hidden; position: relative;\"><iframe frameborder=\"0\" scrolling=\"no\" seamless=\"seamless\" webkitallowfullscreen=\"webkitAllowFullScreen\" mozallowfullscreen=\"mozallowfullscreen\" allowfullscreen=\"allowfullscreen\" id=\"okplayer\" src=\"https://player.vimeo.com/video/' + media.token + '?api=1&title=0&byline=0&portrait=0&playbar=0&player_id=okplayer&loop=0&autoplay=0\" width=\"' + media.width + '\" height=\"' + media.height + '\" style=\"position: absolute; top: 0px; left: 0px; width: ' + media.width + 'px; height: ' + media.height + 'px;\"></iframe></div>';\n  }\n},\n// {\n//   type: 'soundcloud',\n//   regex: /soundcloud.com\\/[-a-zA-Z0-9]+\\/[-a-zA-Z0-9]+\\/?$/i,\n//   fetch: function (url, done) {\n//     fetch('https://api.soundcloud.com/resolve.json?url=' \n//         + url\n//         + '&client_id=' \n//         + '0673fbe6fc794a7750f680747e863b10')\n//     .then(result => result.json())\n//     .then(result => {\n//         console.log(result)\n//         done({\n//           url: url,\n//           type: \"soundcloud\",\n//           token: result.id,\n//           thumbnail: result.artwork_url || result.user.avatar_url,\n//           title: result.user.username + \" - \" + result.title,\n//           duration: result.duration,\n//           width: 166,\n//           height: 166,\n//         })\n//     })\n//   },\n//   tag: function (media) {\n//     return '<iframe width=\"166\" height=\"166\" scrolling=\"no\" frameborder=\"no\"' +\n//         'src=\"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/' + media.token +\n//         '&amp;color=ff6600&amp;auto_play=false&amp;show_artwork=true\"></iframe>'\n//   }\n// },\n{\n  type: 'link',\n  regex: /^http.+/i,\n  fetch: function fetch(url, done) {\n    done({\n      url: url,\n      type: \"link\",\n      token: \"\",\n      thumbnail: \"\",\n      title: \"\",\n      width: 100,\n      height: 100\n    });\n  },\n  tag: function tag(media) {\n    return '<a href=\"' + media.url + '\" target=\"_blank\">' + media.url + '</a>';\n  }\n}];\n\nvar lookup = exports.lookup = integrations.reduce(function (a, b) {\n  return (a[b.type] = b) && a;\n}, {});\n\nvar parse = exports.parse = function parse(url, cb) {\n  var matched = integrations.some(function (integration) {\n    if (integration.regex.test(url)) {\n      integration.fetch(url, function (res) {\n        cb(res);\n      });\n      return true;\n    }\n    return false;\n  });\n  if (!matched) {\n    cb(null);\n  }\n};\n\nvar tag = exports.tag = function tag(media) {\n  if (media.type in lookup) {\n    return lookup[media.type].tag(media);\n  }\n  return \"\";\n};\n\nvar loadImage = exports.loadImage = function loadImage(url, cb, error) {\n  if (lookup.image.regex.test(url)) {\n    lookup.image.fetch(url, function (media) {\n      cb(media);\n    });\n  } else error && error();\n};\n\nvar thumbnail = exports.thumbnail = function thumbnail(media) {\n  return '<img src=\"' + (media.thumbnail || media.url) + '\" class=\"thumb\">';\n};\n\nvar tumblr = exports.tumblr = function tumblr(url, cb) {\n  var domain = url.replace(/^https?:\\/\\//, \"\").split(\"/\")[0];\n  if (domain.indexOf(\".\") == -1) {\n    domain += \".tumblr.com\";\n  }\n  (0, _fetchJsonp2.default)(\"http://\" + domain + \"/api/read\").then(function (data) {\n    // const blog = data.tumblelog\n    var media_list = data.posts.reduce(parseTumblrPost, []);\n    cb(media_list);\n  });\n};\n\nfunction parseTumblrPost(media_list, post) {\n  var media = void 0,\n      caption = void 0,\n      url = void 0;\n  switch (post.type) {\n    case 'photo':\n      caption = stripHTML(post['photo-caption']);\n      if (post.photos.length) {\n        post.photos.forEach(function (photo) {\n          media = {\n            url: photo['photo-url-1280'],\n            type: \"image\",\n            token: \"\",\n            thumbnail: photo['photo-url-500'],\n            description: caption,\n            width: parseInt(photo.width),\n            height: parseInt(photo.height)\n          };\n          media_list.push(media);\n        });\n      } else {\n        media = {\n          url: post['photo-url-1280'],\n          type: \"image\",\n          token: \"\",\n          thumbnail: post['photo-url-500'],\n          description: caption,\n          width: parseInt(post.width),\n          height: parseInt(post.height)\n        };\n        media_list.push(media);\n      }\n      break;\n    case 'video':\n      url = post['video-source'];\n      if (url.indexOf(\"http\") !== 0) {\n        break;\n      }\n      if (lookup.youtube.regex.test(url)) {\n        var id = (url.match(/v=([-_a-zA-Z0-9]{11})/i) || url.match(/youtu.be\\/([-_a-zA-Z0-9]{11})/i) || url.match(/embed\\/([-_a-zA-Z0-9]{11})/i))[1].split('&')[0];\n        var thumb = \"https://i.ytimg.com/vi/\" + id + \"/hqdefault.jpg\";\n        media = {\n          url: post['video-source'],\n          type: \"youtube\",\n          token: id,\n          thumbnail: thumb,\n          title: stripHTML(post['video-caption']),\n          width: 640,\n          height: 360\n        };\n        media_list.push(media);\n      }\n      break;\n    default:\n      break;\n  }\n  return media_list;\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.spectrum = spectrum;\nexports.raw_spectrum = raw_spectrum;\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar scratch = document.createElement('canvas');\nvar scratchCtx = scratch.getContext('2d-lodpi');\n\nvar w = 256;\nvar h = 256;\n\nfunction spectrum(spec, x0, y0, ww, hh) {\n  var data = spec.data;\n  var fft_size = spec.fft_size;\n  var half_fft_size = spec.fft_size / 2;\n  var spec_len = data.length;\n\n  scratch.width = data.length;\n  scratch.height = half_fft_size;\n\n  var imageData = ctx.createImageData(scratch.width, scratch.height);\n  var pixels = imageData.data;\n\n  var i = void 0,\n      j = void 0,\n      u = void 0,\n      v = void 0,\n      _r = void 0,\n      _i = void 0,\n      col = void 0,\n      hsl = void 0;\n\n  for (i = 0; i < spec_len; i++) {\n    col = data[i];\n\n    for (j = 0; j < half_fft_size; j++) {\n      u = ((half_fft_size - j) * spec_len + i) * 4;\n      v = j * 2;\n      _r = col[v];\n      _i = mod(col[v + 1], Math.PI * 2) / (Math.PI * 2);\n      hsl = color.hsl2rgb((_i + 1) / 2, 1.0, 1 - Math.abs(_r / 10));\n      // red - real part\n      // pixels[u] = _r * 127 + 127\n      // // green - imag part\n      // pixels[u+1] = _i * 127 + 127\n      // // blue - magnitude\n      // pixels[u+2] = Math.sqrt(Math.pow(_r, 2) + Math.pow(_i, 2)) * 128 + 127\n      // pixels[u+3] = 255\n      pixels[u] = hsl[0];\n      pixels[u + 1] = hsl[1];\n      pixels[u + 2] = hsl[2];\n      pixels[u + 3] = 255;\n    }\n  }\n\n  scratchCtx.putImageData(imageData, 0, 0);\n\n  var pcm_length = spec.fft_overlap * spec_len;\n\n  x0 = x0 * devicePixelRatio || 0;\n  y0 = y0 * devicePixelRatio || Math.floor(h / 4);\n  ww = ww * devicePixelRatio || w;\n  hh = hh * devicePixelRatio || h / 4;\n\n  var width = Math.round(pcm_length / spec.sr * pixels_per_second);\n  var height = Math.floor(hh);\n\n  ctx.save();\n  clear(1, x0, y0, w, height);\n  ctx.drawImage(scratch, x0, y0, width, height);\n  ctx.restore();\n}\n\nfunction raw_spectrum(spec, x0, y0, ww, hh, def_min_r, def_min_i) {\n  var data = spec.data;\n  var fft_size = spec.fft_size;\n  var half_fft_size = spec.fft_size / 2;\n  var spec_len = data.length;\n\n  var _scratch = document.createElement('canvas');\n  var _scratchCtx = _scratch.getContext('2d-lodpi');\n  _scratch.width = data.length;\n  _scratch.height = half_fft_size;\n  // console.log(\"spectrum w/h:\", _scratch.width, _scratch.height)\n\n  var imageData = _scratchCtx.createImageData(_scratch.width, _scratch.height);\n  var pixels = imageData.data;\n\n  var i = void 0,\n      j = void 0,\n      u = void 0,\n      v = void 0,\n      _r = void 0,\n      _i = void 0,\n      col = void 0,\n      hsl = void 0;\n  // let min_r = Infinity, max_r = -Infinity\n  // let min_i = Infinity, max_i = -Infinity\n\n  // determined empirically..\n  // let min_r = -60.4894057005308\n  // let max_r = 107.23800966675353\n  // let min_i = -59.4894057005308\n  // let max_i = 108.23800966675353\n  var min_r = -def_min_r;\n  var max_r = def_min_r;\n  var min_i = -def_min_i;\n  var max_i = def_min_i;\n  var delta_r = max_r - min_r;\n  var delta_i = max_i - min_i;\n  var mean_r = 0;\n  var mean_i = 0;\n  var sum_mean_r = 0,\n      sum_mean_i = 0;\n  var real = void 0,\n      imag = void 0;\n\n  for (i = 0; i < spec_len; i++) {\n    col = data[i];\n    mean_r = 0;\n    mean_i = 0;\n\n    for (j = 0; j < half_fft_size; j++) {\n      u = (j * spec_len + i) * 4;\n      v = j * 2;\n      real = col[v];\n      imag = col[v + 1];\n      mean_r += real;\n      mean_i += imag;\n      _r = _util2.default.clamp((real - min_r) / delta_r * 255, 0, 255);\n      _i = _util2.default.clamp((imag - min_i) / delta_i * 255, 0, 255);\n\n      // hsl = color.hsl2rgb((_i + 1) / 2, 1.0, 1 - Math.abs(_r / 10))\n      pixels[u + 0] = _r;\n      pixels[u + 1] = _i;\n      pixels[u + 2] = 127; // hsl[2]\n      pixels[u + 3] = 255;\n\n      // min_r = Math.min(min_r, col[v])\n      // max_r = Math.max(max_r, col[v])\n      // min_i = Math.min(min_i, col[v]+1)\n      // max_i = Math.max(max_i, col[v]+1)\n    }\n    mean_r /= half_fft_size;\n    mean_i /= half_fft_size;\n    sum_mean_r += mean_r;\n    sum_mean_i += mean_i;\n  }\n\n  sum_mean_r /= spec_len;\n  sum_mean_i /= spec_len;\n  // console.log(sum_mean_r, sum_mean_i)\n  // console.log(\"r:\", min_r, max_r)\n  // console.log(\"i:\", min_i, max_i)\n  _scratchCtx.putImageData(imageData, 0, 0);\n\n  return { canvas: _scratch, imageData: imageData };\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.requestAudioContext = requestAudioContext;\n\nvar _tone = require('tone');\n\nvar _tone2 = _interopRequireDefault(_tone);\n\nvar _startAudioContext = require('./startAudioContext');\n\nvar _startAudioContext2 = _interopRequireDefault(_startAudioContext);\n\nvar _util = require('../../util');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction requestAudioContext(fn) {\n  if (_util.is_mobile) {\n    var container = document.createElement('div');\n    var button = document.createElement('div');\n    button.innerHTML = 'Tap to start - please unmute your phone';\n    Object.assign(container.style, {\n      display: 'block',\n      position: 'absolute',\n      width: '100%',\n      height: '100%',\n      zIndex: '10000',\n      top: '0px',\n      left: '0px',\n      backgroundColor: 'rgba(0, 0, 0, 0.8)'\n    });\n    Object.assign(button.style, {\n      display: 'block',\n      position: 'absolute',\n      left: '50%',\n      top: '50%',\n      padding: '20px',\n      backgroundColor: '#7F33ED',\n      color: 'white',\n      fontFamily: 'monospace',\n      borderRadius: '3px',\n      transform: 'translate3D(-50%,-50%,0)',\n      textAlign: 'center',\n      lineHeight: '1.5',\n      width: '150px'\n    });\n    container.appendChild(button);\n    document.body.appendChild(container);\n    _startAudioContext2.default.setContext(_tone2.default.context);\n    _startAudioContext2.default.on(button);\n    _startAudioContext2.default.onStarted(function (_) {\n      container.remove();\n      fn();\n    });\n  } else {\n    fn();\n  }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _tone = require('tone');\n\nvar _tone2 = _interopRequireDefault(_tone);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// const compressor = new Tone.Compressor(-30, 3).toMaster()\n\nvar compressor = new _tone2.default.Compressor(-30, 3).toMaster();\nvar gain = new _tone2.default.Gain(1).connect(compressor);\n\nexports.default = gain;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _tone = require('tone');\n\nvar _tone2 = _interopRequireDefault(_tone);\n\nvar _util = require('../../util');\n\nvar _signalWindows = require('signal-windows');\n\nvar _fft = require('fft.js');\n\nvar _fft2 = _interopRequireDefault(_fft);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar fft_size = 512;\nvar fft_overlap = fft_size / 4;\n\nvar fft = new _fft2.default(fft_size);\n\nfunction toSpectrum(pcm, sr) {\n  sr = sr || 44100;\n  var ham = _signalWindows.windows.construct('ham', fft_size);\n  var pcm_in = new Array(fft_size);\n  var pcm_length = pcm.length;\n  var pcm_q_length = Math.ceil(pcm_length / fft_size) * fft_size;\n  var i = void 0,\n      j = void 0,\n      fft_out = void 0,\n      data = [];\n  for (i = -fft_size; i < pcm_q_length; i += fft_overlap) {\n    for (j = 0; j < fft_size; j++) {\n      pcm_in[j] = pcm[i + j] * ham[j] || 0;\n    }\n    fft_out = fft.createComplexArray();\n    fft.realTransform(fft_out, pcm_in);\n    fft.completeSpectrum(fft_out);\n    data.push(fft_out);\n  }\n  return {\n    data: data,\n    sr: sr,\n    fft_size: fft_size,\n    fft_overlap: fft_overlap\n  };\n}\n\nfunction fromSpectrum(spec) {\n  var data = spec.data;\n  var sr = spec.sr;\n  var fft_size = spec.fft_size;\n  var fft_overlap = spec.fft_overlap;\n  var spec_len = data.length;\n\n  var ham = _signalWindows.windows.construct('ham', fft_size);\n  var out = fft.createComplexArray();\n  var pcm_length = fft_overlap * spec_len;\n\n  var audioBuffer = _tone2.default.context.createBuffer(1, pcm_length, sr);\n  var pcm = audioBuffer.getChannelData(0);\n\n  var i = void 0,\n      j = void 0,\n      u = void 0,\n      col = void 0;\n\n  for (i = 0; i < spec_len; i++) {\n    col = data[i];\n    // for (j = fft_size; j < fft_size << 1; j++) {\n    //   col[j] = 0\n    // }\n    // if (i == 0) console.log(col)\n    fft.inverseTransform(out, col);\n    u = i * fft_overlap;\n    for (j = 0; j < fft_size; j++) {\n      pcm[u + j] += out[j * 2] * ham[j] || 0;\n    }\n  }\n\n  fadeInOut(pcm, fft_size);\n  // console.log(pcm)\n  return audioBuffer;\n}\n\nfunction fromImageData(imageData, sr, _r, _i) {\n  var pixels = imageData.data;\n  var w = imageData.width;\n  var h = imageData.height;\n  var data = new Array(w);\n  var x = void 0,\n      y = void 0,\n      u = void 0,\n      v = void 0,\n      v2 = void 0;\n  for (y = 0; y < h; y++) {\n    var col = data[y] = new Float32Array(h * 4);\n    for (x = 0; x < w; x++) {\n      u = (x * w + y) * 4;\n      v = x * 2;\n      col[v] = (pixels[u] / 255 - 0.5) * _r;\n      col[v + 1] = (pixels[u + 1] / 255 - 0.5) * _i;\n      v2 = (h - y + h) * 2;\n      col[v2] = col[v];\n      col[v2 + 1] = 0; // col[v+1]\n    }\n    col[h * 2] = col[h * 2 + 1] = col[h * 2 - 1] = col[h * 2 - 2] = 0;\n  }\n  var spec = {\n    data: data,\n    sr: sr,\n    fft_size: fft_size, fft_overlap: fft_overlap\n  };\n  return spec;\n}\n\nfunction binToHz(spec, i) {\n  return i / spec.fft_size * spec.sr;\n}\n\nfunction fadeInOut(pcm, fade_size) {\n  var pcm_length = pcm.length;\n  var fade = 0,\n      i = void 0;\n  for (i = 0; i < fade_size; i++) {\n    fade = i / fade_size;\n    fade *= fade;\n    pcm[i] *= fade;\n    pcm[pcm_length - i] *= fade;\n  }\n}\nfunction rotatePhase(spec, theta) {\n  var data = spec.data,\n      fft_size = spec.fft_size;\n\n  var i = void 0,\n      j = void 0,\n      col = void 0,\n      len = data.length;\n  for (i = 0; i < len; i++) {\n    col = data[i];\n    for (j = 0; j < fft_size; j++) {\n      col[j * 2 + 1] += theta;\n    }\n  }\n  return spec;\n}\n\nfunction linearBins(spec, n) {\n  n = n || 1;\n\n  var bins = [],\n      i = void 0,\n      q_i = void 0;\n  for (q_i = 0; q_i < n; q_i++) {\n    bins[q_i] = [];\n  }\n  var step = Math.floor(spec.fft_size / n);\n  var len_quantize_n = (0, _util.quantize)(spec.fft_size, n);\n  for (i = 0; i < len_quantize_n; i++) {\n    q_i = Math.floor(i / step);\n    bins[q_i] = bins[q_i] || [];\n    bins[q_i].push(i);\n  }\n  // leftover bins get put at end\n  for (; i < spec.fft_size; i++) {\n    bins[q_i].push(i);\n  }\n  return bins;\n}\nfunction logarithmicBins(spec) {\n  var bins = [],\n      i = void 0,\n      j = void 0,\n      q_i = void 0;\n  var binCount = Math.log2(spec.fft_size) - 1;\n  for (i = 0, q_i = 0, j = 0; i < binCount; i++) {\n    j += 1 << i;\n    bins[i] = [];\n    for (; q_i < j; q_i++) {\n      bins[i].push(q_i);\n    }\n  }\n  return bins;\n}\nfunction concatBins(bins) {\n  return bins.reduce(function (acc, cv) {\n    return acc.concat(cv);\n  }, []);\n}\nfunction reverseBins(bins) {\n  return bins.map(function (bin) {\n    return bin.reverse();\n  });\n}\nfunction minBins(bins) {\n  return bins.map(function (bin) {\n    var b = bin[0];\n    return bin.map(function () {\n      return b;\n    });\n  });\n}\nfunction maxBins(bins) {\n  return bins.map(function (bin) {\n    var b = bin[bin.length - 1];\n    return bin.map(function () {\n      return b;\n    });\n  });\n}\nfunction rotateSpectrum(spec, n) {\n  var fft_size = spec.fft_size;\n\n  if (n && n < 1) {\n    n -= 0.5;\n    n *= fft_size;\n  }\n  n = Math.floor(n);\n  var order = new Array(fft_size),\n      i = void 0;\n  for (i = 0; i < fft_size; i++) {\n    order[i] = (0, _util.mod)(i + n, fft_size / 2);\n  }\n  return reorderBins(spec, order);\n}\nfunction cloneSpectrum(spec) {\n  var data = spec.data,\n      fft_size = spec.fft_size,\n      sr = spec.sr,\n      fft_overlap = spec.fft_overlap;\n\n  var spec_len = data.length;\n\n  var new_data = new Array(spec_len);\n  var i = void 0;\n  for (i = 0; i < spec_len; i++) {\n    new_data[i] = data[i].concat();\n    new_data[i][2] = 0;\n  }\n\n  return {\n    data: new_data,\n    fft_size: fft_size,\n    sr: sr, fft_overlap: fft_overlap\n  };\n}\nfunction reverseSpectrum(spec) {\n  var new_spec = cloneSpectrum(spec);\n  new_spec.data = new_spec.data.reverse();\n  return new_spec;\n}\nfunction shuffleSpectrum(spec) {\n  var fft_size = spec.fft_size;\n\n  var order = new Array(fft_size),\n      i = void 0;\n  for (i = 0; i < fft_size; i++) {\n    order[i] = i;\n  }\n  (0, _util.shuffle)(order);\n  return reorderBins(spec, order);\n}\nfunction invertSpectrum(spec) {\n  var fft_size = spec.fft_size;\n\n  var order = new Array(fft_size),\n      i = void 0;\n  for (i = 0; i < fft_size; i++) {\n    order[i] = fft_size - i - 1;\n  }\n  return reorderBins(spec, order);\n}\nfunction reorderBins(spec, order) {\n  var new_spec = cloneSpectrum(spec);\n  var data = spec.data,\n      sr = spec.sr,\n      fft_size = spec.fft_size,\n      fft_overlap = spec.fft_overlap;\n\n  var spec_len = data.length;\n  var new_data = new_spec.data;\n\n\n  var i = void 0,\n      j = void 0,\n      col = void 0,\n      new_col = void 0;\n  for (j = order.length; j < fft_size; j++) {\n    order[j] = j;\n  }\n\n  for (i = 0; i < spec_len; i++) {\n    col = data[i];\n    new_col = new_data[i] = data[i].concat();\n    col[0] = 0;\n    col[2] = 0;\n    col[4] = 0;\n    for (j = 0; j < fft_size / 2; j++) {\n      new_col[j * 2] = col[order[j] * 2];\n      new_col[j * 2 + 1] = col[order[j] * 2 + 1];\n    }\n    for (; j < fft_size; j++) {\n      new_col[j * 2] = 0;\n      new_col[j * 2 + 1] = 0;\n    }\n  }\n\n  return {\n    data: new_data,\n    sr: sr, fft_size: fft_size, fft_overlap: fft_overlap\n  };\n}\n\nexports.default = {\n  fft_size: fft_size, fft_overlap: fft_overlap,\n  toSpectrum: toSpectrum, fromSpectrum: fromSpectrum, fromImageData: fromImageData, binToHz: binToHz,\n  fadeInOut: fadeInOut,\n  cloneSpectrum: cloneSpectrum,\n  reverseSpectrum: reverseSpectrum, shuffleSpectrum: shuffleSpectrum, invertSpectrum: invertSpectrum, rotateSpectrum: rotateSpectrum,\n  reorderBins: reorderBins,\n  linearBins: linearBins, logarithmicBins: logarithmicBins,\n  concatBins: concatBins,\n  reverseBins: reverseBins, minBins: minBins, maxBins: maxBins,\n  rotatePhase: rotatePhase\n};","\"use strict\";\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/**\n *  StartAudioContext.js\n *  @author Yotam Mann\n *  @license http://opensource.org/licenses/MIT MIT License\n *  @copyright 2016 Yotam Mann\n */\n(function (root, factory) {\n  if (typeof define === \"function\" && define.amd) {\n    define([], factory);\n  } else if ((typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) === 'object' && module.exports) {\n    module.exports = factory();\n  } else {\n    root.StartAudioContext = factory();\n  }\n})(undefined, function () {\n\n  /**\n   * The StartAudioContext object\n   */\n  var StartAudioContext = {\n    /**\n     * The audio context passed in by the user\n     * @type {AudioContext}\n     */\n    context: null,\n    /**\n     * The TapListeners bound to the elements\n     * @type {Array}\n     * @private\n     */\n    _tapListeners: [],\n    /**\n     * Callbacks to invoke when the audio context is started\n     * @type {Array}\n     * @private\n     */\n    _onStarted: []\n  };\n\n  /**\n   * Set the context\n   * @param {AudioContext} ctx\n   * @returns {StartAudioContext}\n   */\n  StartAudioContext.setContext = function (ctx) {\n    StartAudioContext.context = ctx;\n    return StartAudioContext;\n  };\n\n  /**\n   * Add a tap listener to the audio context\n   * @param  {Array|Element|String|jQuery} element\n   * @returns {StartAudioContext}\n   */\n  StartAudioContext.on = function (element) {\n    if (Array.isArray(element) || NodeList && element instanceof NodeList) {\n      for (var i = 0; i < element.length; i++) {\n        StartAudioContext.on(element[i]);\n      }\n    } else if (typeof element === \"string\") {\n      StartAudioContext.on(document.querySelectorAll(element));\n    } else if (element.jquery && typeof element.toArray === \"function\") {\n      StartAudioContext.on(element.toArray());\n    } else if (Element && element instanceof Element) {\n      //if it's an element, create a TapListener\n      var tap = new TapListener(element, onTap);\n      StartAudioContext._tapListeners.push(tap);\n    }\n    return StartAudioContext;\n  };\n\n  /**\n   * Bind a callback to when the audio context is started. \n   * @param {Function} cb\n   * @return {StartAudioContext}\n   */\n  StartAudioContext.onStarted = function (cb) {\n    //if it's already started, invoke the callback\n    if (StartAudioContext.isStarted()) {\n      cb();\n    } else {\n      StartAudioContext._onStarted.push(cb);\n    }\n    return StartAudioContext;\n  };\n\n  /**\n   * returns true if the context is started\n   * @return {Boolean}\n   */\n  StartAudioContext.isStarted = function () {\n    return StartAudioContext.context !== null && StartAudioContext.context.state === \"running\";\n  };\n\n  /**\n   * @class  Listens for non-dragging tap ends on the given element\n   * @param {Element} element\n   * @internal\n   */\n  var TapListener = function TapListener(element) {\n\n    this._dragged = false;\n\n    this._element = element;\n\n    this._bindedMove = this._moved.bind(this);\n    this._bindedEnd = this._ended.bind(this);\n\n    element.addEventListener(\"touchmove\", this._bindedMove);\n    element.addEventListener(\"touchend\", this._bindedEnd);\n    element.addEventListener(\"mouseup\", this._bindedEnd);\n  };\n\n  /**\n   * drag move event\n   */\n  TapListener.prototype._moved = function (e) {\n    this._dragged = true;\n  };\n\n  /**\n   * tap ended listener\n   */\n  TapListener.prototype._ended = function (e) {\n    if (!this._dragged) {\n      onTap();\n    }\n    this._dragged = false;\n  };\n\n  /**\n   * remove all the bound events\n   */\n  TapListener.prototype.dispose = function () {\n    this._element.removeEventListener(\"touchmove\", this._bindedMove);\n    this._element.removeEventListener(\"touchend\", this._bindedEnd);\n    this._element.removeEventListener(\"mouseup\", this._bindedEnd);\n    this._bindedMove = null;\n    this._bindedEnd = null;\n    this._element = null;\n  };\n\n  /**\n   * Invoked the first time of the elements is tapped.\n   * Creates a silent oscillator when a non-dragging touchend \n   * event has been triggered.\n   */\n  function onTap() {\n    //start the audio context with a silent oscillator\n    if (StartAudioContext.context && !StartAudioContext.isStarted()) {\n      var osc = StartAudioContext.context.createOscillator();\n      var silent = StartAudioContext.context.createGain();\n      silent.gain.value = 0;\n      osc.connect(silent);\n      silent.connect(StartAudioContext.context.destination);\n      var now = StartAudioContext.context.currentTime;\n      osc.start(now);\n      osc.stop(now + 0.5);\n    }\n\n    //dispose all the tap listeners\n    if (StartAudioContext._tapListeners) {\n      for (var i = 0; i < StartAudioContext._tapListeners.length; i++) {\n        StartAudioContext._tapListeners[i].dispose();\n      }\n      StartAudioContext._tapListeners = null;\n    }\n    //the onstarted callbacks\n    if (StartAudioContext._onStarted) {\n      for (var j = 0; j < StartAudioContext._onStarted.length; j++) {\n        StartAudioContext._onStarted[j]();\n      }\n      StartAudioContext._onStarted = null;\n    }\n  }\n\n  return StartAudioContext;\n});","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.play = play;\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _tone = require('tone');\n\nvar _tone2 = _interopRequireDefault(_tone);\n\nvar _draw = require('./lib/draw');\n\nvar draw = _interopRequireWildcard(_draw);\n\nvar _output = require('./lib/output');\n\nvar _output2 = _interopRequireDefault(_output);\n\nvar _spectrum = require('./lib/spectrum');\n\nvar _spectrum2 = _interopRequireDefault(_spectrum);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _r = 8;\nvar _i = 8;\n\nfunction play(frame) {\n  // const { canvas, imageData } = draw.raw_spectrum(fft, 0, 256, 0, 256, 1, 1)\n  // console.log(_r, _i)\n  // const { canvas, imageData } = draw.raw_spectrum(player.fft, 0, 256, 0, 256, _r, _i)\n  var new_fft = _spectrum2.default.fromImageData(frame.imageData, 44100, _r, _i);\n  // gallery.innerHTML = ''\n\n  // console.log(player.fft.data, new_fft.data)\n  var buf = _spectrum2.default.fromSpectrum(new_fft);\n  var _p = new _tone2.default.Player(buf);\n  _p.connect(_output2.default);\n  _p.start(_tone2.default.now());\n  // redraw(new_fft)\n}\n// function redraw(new_fft){\n//   const { canvas, imageData } = draw.raw_spectrum(new_fft, 0, 256, 0, 256, _r, _i)\n// }","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.buildZip = exports.renderFrames = exports.loadPCM = exports.loadBuffer = exports.spectrum = exports.FRAME_STEP = exports.FRAME_LENGTH = undefined;\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _tone = require('tone');\n\nvar _tone2 = _interopRequireDefault(_tone);\n\nvar _jszip = require('jszip');\n\nvar _jszip2 = _interopRequireDefault(_jszip);\n\nvar _sprintfJs = require('sprintf-js');\n\nvar _draw = require('./lib/draw');\n\nvar draw = _interopRequireWildcard(_draw);\n\nvar _output = require('./lib/output');\n\nvar _output2 = _interopRequireDefault(_output);\n\nvar _spectrum = require('./lib/spectrum');\n\nvar _spectrum2 = _interopRequireDefault(_spectrum);\n\nvar _lib = require('./lib');\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar FRAME_LENGTH = exports.FRAME_LENGTH = 126 * 255;\nvar FRAME_STEP = exports.FRAME_STEP = Math.round(FRAME_LENGTH / 4);\n\nvar _r = 8;\nvar _i = 8;\n\nexports.spectrum = _spectrum2.default;\n// requestAudioContext(() => {})\n\nvar loadBuffer = exports.loadBuffer = function loadBuffer(file) {\n  return new Promise(function (resolve, reject) {\n    var url = URL.createObjectURL(file);\n    var buffer = new _tone2.default.Buffer(url, loadBuffer, function (err) {\n      console.error('err', err);\n      reject(err);\n    });\n    function loadBuffer() {\n      URL.revokeObjectURL(url);\n      resolve(buffer);\n    }\n  });\n};\n\nvar loadPCM = exports.loadPCM = function loadPCM(file) {\n  return new Promise(function (resolve, reject) {\n    // if we've already fetched this file...\n    if (file.pcm) {\n      return resolve(file);\n    }\n    loadBuffer(file).then(function (buffer) {\n      var pcm = buffer._buffer.getChannelData(0);\n      var sr = buffer._buffer.sampleRate;\n      if (!pcm) return reject();\n      console.log(pcm.length, sr);\n      resolve({ file: file, buffer: buffer, pcm: pcm, sr: sr });\n    });\n  });\n};\n\nvar renderFrames = exports.renderFrames = function renderFrames(file, _ref) {\n  var _ref$frame_step = _ref.frame_step,\n      frame_step = _ref$frame_step === undefined ? FRAME_STEP : _ref$frame_step,\n      _ref$frame_start = _ref.frame_start,\n      frame_start = _ref$frame_start === undefined ? 0 : _ref$frame_start,\n      _ref$max = _ref.max,\n      max = _ref$max === undefined ? 12 : _ref$max;\n  return function (dispatch) {\n    return new Promise(function (resolve, reject) {\n      loadPCM(file).then(function (pcmProps) {\n        var file = pcmProps.file,\n            buffer = pcmProps.buffer,\n            pcm = pcmProps.pcm,\n            sr = pcmProps.sr;\n\n        dispatch({ type: _types2.default.wav2pix.load });\n        var frames = [];\n        var count = 0;\n        var _len = pcm.length - FRAME_LENGTH;\n        var offset = Math.round(_len * frame_start);\n        for (; offset < _len && count < max; offset += frame_step, count += 1) {\n          frames.push(render(pcm.slice(offset, offset + FRAME_LENGTH), sr, count));\n        }\n        dispatch({ type: _types2.default.wav2pix.finish, message: 'Rendered ' + count + ' images' });\n        resolve({ pcm: pcmProps, frames: frames });\n      });\n    });\n  };\n};\n\nvar buildZip = exports.buildZip = function buildZip(name, file, _ref2) {\n  var _ref2$frame_step = _ref2.frame_step,\n      frame_step = _ref2$frame_step === undefined ? FRAME_STEP : _ref2$frame_step,\n      _ref2$frame_start = _ref2.frame_start,\n      frame_start = _ref2$frame_start === undefined ? 0 : _ref2$frame_start,\n      _ref2$max = _ref2.max,\n      max = _ref2$max === undefined ? 10000 : _ref2$max;\n  return function (dispatch) {\n    return new Promise(function (resolve, reject) {\n      loadPCM(file).then(function (_ref3) {\n        var buffer = _ref3.buffer,\n            pcm = _ref3.pcm,\n            sr = _ref3.sr;\n\n        dispatch({ type: _types2.default.wav2pix.load });\n\n        var zip = new _jszip2.default();\n        var zip_folder = zip.folder(\"wav2pix_\" + name);\n\n        var steps = (pcm.length - FRAME_LENGTH) / frame_step;\n        console.log(steps);\n\n        var count = 0;\n        var _len = pcm.length - FRAME_LENGTH;\n        var offset = Math.round(_len * frame_start);\n        for (; offset < _len && count < max; offset += frame_step, count += 1) {\n          if (count % 10 === 0) {\n            dispatch({ type: _types2.default.wav2pix.progress, progress: { i: count / max * 6, n: 6 } });\n          }\n          render(pcm.slice(offset, offset + FRAME_LENGTH), sr, count, zip_folder);\n        }\n\n        // dispatch event\n        dispatch({ type: _types2.default.wav2pix.finish, message: 'Rendered ' + count + ' images' });\n        zip.generateAsync({ type: \"blob\" }).then(function (content) {\n          dispatch({ type: _types2.default.wav2pix.zip, size: content.size });\n          // FileSaver.saveAs(content, \"wav2pix_\" + name + \".zip\")\n          resolve({\n            zip: content,\n            filename: \"wav2pix_\" + name + \".zip\",\n            count: count\n          });\n        });\n      });\n    });\n  };\n};\n\nfunction render(pcm, sr, count, zip) {\n  var fft = _spectrum2.default.toSpectrum(pcm, sr);\n  // console.log('render', fft)\n  // const pcm_rev = pcm.slice().reverse()\n  // const spec_rev = spectrum.toSpectrum(pcm_rev, spec.sr)\n\n  var _draw$raw_spectrum = draw.raw_spectrum(fft, 0, 256, 0, 256, _r, _i),\n      canvas = _draw$raw_spectrum.canvas,\n      imageData = _draw$raw_spectrum.imageData;\n\n  if (zip) {\n    var name = (0, _sprintfJs.sprintf)('frame_%05d.png', count);\n    var dataURL = canvas.toDataURL(\"image/png\");\n    zip.file(name, dataURL.split(',')[1], { base64: true });\n  }\n  return { fft: fft, canvas: canvas, imageData: imageData };\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.clearCurrentUser = exports.setCurrentUser = exports.setError = exports.setReturnTo = exports.setToken = undefined;\nexports.initialized = initialized;\nexports.loading = loading;\nexports.InvalidCredentialsException = InvalidCredentialsException;\nexports.login = login;\nexports.signup = signup;\nexports.checkin = checkin;\nexports.logout = logout;\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _crud = require('../api/crud.fetch');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar setToken = exports.setToken = function setToken(data) {\n  return { type: _types2.default.auth.set_token, data: data };\n};\nvar setReturnTo = exports.setReturnTo = function setReturnTo(data) {\n  return { type: _types2.default.auth.set_return_to, data: data };\n};\nvar setError = exports.setError = function setError(data) {\n  return { type: _types2.default.auth.set_error, data: data };\n};\nvar setCurrentUser = exports.setCurrentUser = function setCurrentUser(data) {\n  return { type: _types2.default.auth.set_current_user, data: data };\n};\nvar clearCurrentUser = exports.clearCurrentUser = function clearCurrentUser() {\n  return { type: _types2.default.auth.logout_user };\n};\nfunction initialized() {\n  return { type: _types2.default.auth.initialized };\n}\nfunction loading() {\n  return { type: _types2.default.auth.loading };\n}\n\nfunction InvalidCredentialsException(message) {\n  this.message = message;\n  this.name = 'InvalidCredentialsException';\n}\n\nvar api = {\n  login: '/api/login',\n  logout: '/api/logout',\n  signup: '/api/signup',\n  checkin: '/api/checkin'\n};\n\nfunction login(username, password) {\n  return function (dispatch) {\n    dispatch(loading());\n    fetch(api.login, (0, _crud.put)({\n      username: username,\n      password: password\n    })).then(function (req) {\n      return req.json();\n    }).then(function (data) {\n      console.log(data);\n      console.log('logged in', data.user.username);\n      dispatch(setCurrentUser(data.user));\n    }).catch(function (error) {\n      console.error('login error', error);\n      dispatch(setError(true));\n    });\n  };\n}\n\nfunction signup(data) {\n  return function (dispatch) {\n    dispatch(loading());\n    fetch(api.signup, (0, _crud.put)(data)).then(function (req) {\n      return req.json();\n    }).then(function (data) {\n      console.log(data);\n      console.log('signed up', data.user.username);\n      dispatch(setCurrentUser(data.user));\n    }).catch(function (error) {\n      console.error('signup error', error);\n      dispatch(initialized());\n    });\n  };\n}\n\nfunction checkin() {\n  return function (dispatch) {\n    dispatch(loading());\n    fetch(api.checkin, (0, _crud.put)({})).then(function (req) {\n      return req.json();\n    }).then(function (data) {\n      // console.log(data)\n      console.log('checked in', data.user.username);\n      dispatch(setCurrentUser(data.user));\n    }).catch(function (error) {\n      console.error('checkin error', error);\n      dispatch(initialized());\n    });\n  };\n}\n\nfunction logout() {\n  return function (dispatch) {\n    dispatch(loading());\n    fetch(api.logout, (0, _crud._get_headers)({})).then(function (req) {\n      return req.json();\n    }).then(function (data) {\n      console.log('logged out', data);\n      dispatch(clearCurrentUser());\n      dispatch(initialized());\n    }).catch(function (error) {\n      console.error('logout error', error);\n      dispatch(clearCurrentUser());\n      dispatch(initialized());\n    });\n  };\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _store = require('../store');\n\nvar _auth = require('./auth.actions');\n\nvar authActions = _interopRequireWildcard(_auth);\n\nvar _login = require('./login.component');\n\nvar _login2 = _interopRequireDefault(_login);\n\nvar _logout = require('./logout.component');\n\nvar _logout2 = _interopRequireDefault(_logout);\n\nvar _signup = require('./signup.component');\n\nvar _signup2 = _interopRequireDefault(_signup);\n\nvar _math = require('../util/math');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n// import PropTypes from 'prop-types';\n\n\nvar AuthRouter = function (_Component) {\n  _inherits(AuthRouter, _Component);\n\n  function AuthRouter() {\n    _classCallCheck(this, AuthRouter);\n\n    return _possibleConstructorReturn(this, (AuthRouter.__proto__ || Object.getPrototypeOf(AuthRouter)).apply(this, arguments));\n  }\n\n  _createClass(AuthRouter, [{\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      return (0, _preact.h)(\n        _reactRouterDom.BrowserRouter,\n        null,\n        (0, _preact.h)(\n          'div',\n          null,\n          (0, _preact.h)('div', { className: 'diamond' }),\n          (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/', component: _login2.default }),\n          (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/login', component: _login2.default }),\n          (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/logout', component: _logout2.default }),\n          (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/signup', component: _signup2.default }),\n          (0, _preact.h)(_reactRouterDom.Route, { path: '/:module', component: function component(props) {\n              switch (props.location.pathname) {\n                case '/login':\n                case '/logout':\n                case '/signup':\n                  return null;\n              }\n              _this2.props.actions.setReturnTo(props.location.pathname);\n              return (0, _preact.h)(_reactRouterDom.Redirect, { to: '/login' });\n            } })\n        )\n      );\n    }\n  }, {\n    key: 'componentDidMount',\n    value: function componentDidMount() {\n      document.querySelector('.diamond').style.backgroundImage = 'linear-gradient(' + ((0, _math.randint)(40) - 5) + 'deg, #fde, #ffe)';\n    }\n  }]);\n\n  return AuthRouter;\n}(_preact.Component);\n\nvar AuthGate = function (_Component2) {\n  _inherits(AuthGate, _Component2);\n\n  function AuthGate() {\n    _classCallCheck(this, AuthGate);\n\n    return _possibleConstructorReturn(this, (AuthGate.__proto__ || Object.getPrototypeOf(AuthGate)).apply(this, arguments));\n  }\n\n  _createClass(AuthGate, [{\n    key: 'render',\n    value: function render() {\n      if (true && !this.props.auth.initialized) {\n        console.log('loading auth');\n        return (0, _preact.h)(\n          'div',\n          { className: 'loading' },\n          'Loading'\n        );\n      }\n      if (true || this.props.auth.isAuthenticated) {\n        console.log('authenticated...');\n        if (this.props.auth.returnTo) {\n          var returnTo = this.props.auth.returnTo;\n\n          if (!returnTo || returnTo.match(/(login|logout|signup)/i)) {\n            returnTo = '/';\n          }\n          console.log('history.push', returnTo);\n          this.props.actions.setReturnTo(null);\n          _store.history.push(returnTo);\n          return (0, _preact.h)(\n            'div',\n            null,\n            'Launching app'\n          );\n        }\n        console.log('rendering as normal');\n        return (0, _preact.h)(\n          'div',\n          null,\n          this.props.children\n        );\n      }\n      return (0, _preact.h)(AuthRouter, this.props);\n    }\n  }, {\n    key: 'componentDidMount',\n    value: function componentDidMount() {\n      this.props.actions.checkin();\n    }\n  }]);\n\n  return AuthGate;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    auth: state.auth\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n  return {\n    actions: (0, _redux.bindActionCreators)(authActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(AuthGate);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar authInitialState = {\n  token: null,\n  user: {},\n  groups: {},\n  initialized: false,\n  loading: false,\n  isAuthenticated: false,\n  returnTo: null\n};\n\nvar auth = function auth() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : authInitialState;\n  var action = arguments[1];\n\n  console.log(action);\n  switch (action.type) {\n    case _types2.default.auth.set_token:\n      return _extends({}, state, {\n        token: action.data,\n        isAuthenticated: !!action.data,\n        loading: false,\n        error: null\n      });\n\n    case _types2.default.auth.initialized:\n      return _extends({}, state, {\n        loading: false,\n        initialized: true,\n        error: null\n      });\n\n    case _types2.default.auth.loading:\n      return _extends({}, state, {\n        loading: true,\n        error: null\n      });\n\n    case _types2.default.auth.set_current_user:\n      return _extends({}, state, {\n        loading: false,\n        initialized: true,\n        isAuthenticated: true,\n        user: action.data,\n        error: null\n      });\n\n    case _types2.default.auth.set_return_to:\n      return _extends({}, state, {\n        returnTo: action.data\n      });\n\n    case _types2.default.auth.logout_user:\n      return _extends({}, authInitialState);\n\n    case _types2.default.auth.set_error:\n      return _extends({}, state, {\n        loading: false,\n        error: action.data\n      });\n\n    case _types2.default.auth.loading:\n      // const initial_state_el = document.querySelector('#initial_state')\n      // if (initial_state_el) {\n      //   try {\n      //     const initial_state = JSON.parse(initial_state_el.innerHTML)\n      //     if (initial_state && initial_state.auth && initial_state.auth.user) {\n      //       console.log(initial_state.auth.user)\n      //       return {\n      //         ...state,\n      //         user: {\n      //           ...initial_state.auth.user,\n      //         }\n      //       }\n      //     }\n      //   } catch (e) {\n      //     console.error(\"error loading initial state\")\n      //   }\n      // }\n      return state;\n\n    default:\n      return state;\n  }\n};\n\nexports.default = auth;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _auth = require('./auth.gate');\n\nvar _auth2 = _interopRequireDefault(_auth);\n\nvar _login = require('./login.component');\n\nvar _login2 = _interopRequireDefault(_login);\n\nvar _logout = require('./logout.component');\n\nvar _logout2 = _interopRequireDefault(_logout);\n\nvar _signup = require('./signup.component');\n\nvar _signup2 = _interopRequireDefault(_signup);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = {\n  Gate: _auth2.default,\n  Login: _login2.default,\n  Logout: _logout2.default,\n  Signup: _signup2.default\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _auth = require('./auth.actions');\n\nvar authActions = _interopRequireWildcard(_auth);\n\nvar _common = require('../common');\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n// import PropTypes from 'prop-types';\n\n// import { Link } from 'react-router-dom';\n\n\nvar Login = function (_Component) {\n  _inherits(Login, _Component);\n\n  function Login() {\n    _classCallCheck(this, Login);\n\n    var _this = _possibleConstructorReturn(this, (Login.__proto__ || Object.getPrototypeOf(Login)).call(this));\n\n    _this.state = {\n      username: '',\n      password: ''\n    };\n\n    _this.handleChange = _this.handleChange.bind(_this);\n    _this.handleSubmit = _this.handleSubmit.bind(_this);\n    return _this;\n  }\n\n  _createClass(Login, [{\n    key: 'handleChange',\n    value: function handleChange(value, name) {\n      var _setState;\n\n      this.setState((_setState = {}, _defineProperty(_setState, name, value), _defineProperty(_setState, 'error', null), _setState));\n    }\n  }, {\n    key: 'handleSubmit',\n    value: function handleSubmit(e) {\n      e.preventDefault();\n      if (this.props.auth.loading) return;\n      this.props.actions.login(this.state.username, this.state.password);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'form',\n        { onSubmit: this.handleSubmit },\n        (0, _preact.h)(\n          'h1',\n          null,\n          'Log in'\n        ),\n        (0, _preact.h)('br', null),\n        (0, _preact.h)(\n          _common.Group,\n          null,\n          (0, _preact.h)(_common.TextInput, {\n            autofocus: true,\n            autocapitalize: 'off',\n            autocomplete: 'off',\n            title: 'Username',\n            name: 'username',\n            type: 'text',\n            value: this.state.username,\n            onInput: this.handleChange\n          }),\n          (0, _preact.h)(_common.TextInput, {\n            title: 'Password',\n            name: 'password',\n            type: 'password',\n            value: this.state.password,\n            onInput: this.handleChange\n          }),\n          (0, _preact.h)(\n            _common.Button,\n            {\n              loading: this.props.auth.loading\n            },\n            'Login'\n          ),\n          this.renderAuthError()\n        )\n      );\n    }\n  }, {\n    key: 'renderAuthError',\n    value: function renderAuthError() {\n      if (this.props.auth.error) {\n        return (0, _preact.h)(\n          'div',\n          { className: 'form-input-hint' },\n          \"There was an error logging you in (bad password?)\"\n        );\n      }\n      return null;\n    }\n  }]);\n\n  return Login;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    auth: state.auth\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n  return {\n    actions: (0, _redux.bindActionCreators)(authActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Login);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _auth = require('./auth.actions');\n\nvar authActions = _interopRequireWildcard(_auth);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n// import PropTypes from 'prop-types';\n\n\nvar Logout = function (_Component) {\n  _inherits(Logout, _Component);\n\n  function Logout() {\n    _classCallCheck(this, Logout);\n\n    return _possibleConstructorReturn(this, (Logout.__proto__ || Object.getPrototypeOf(Logout)).apply(this, arguments));\n  }\n\n  _createClass(Logout, [{\n    key: 'componentWillMount',\n    value: function componentWillMount(props) {\n      this.props.actions.logout();\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(_reactRouterDom.Redirect, { to: '/' });\n    }\n  }]);\n\n  return Logout;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {};\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n  return {\n    actions: (0, _redux.bindActionCreators)(authActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Logout);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _auth = require('./auth.actions');\n\nvar actions = _interopRequireWildcard(_auth);\n\nvar _common = require('../common');\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Signup = function (_Component) {\n  _inherits(Signup, _Component);\n\n  function Signup() {\n    _classCallCheck(this, Signup);\n\n    var _this = _possibleConstructorReturn(this, (Signup.__proto__ || Object.getPrototypeOf(Signup)).call(this));\n\n    _this.state = {\n      username: '',\n      password: '',\n      password2: ''\n    };\n\n    _this.handleChange = _this.handleChange.bind(_this);\n    _this.handleSubmit = _this.handleSubmit.bind(_this);\n    return _this;\n  }\n\n  _createClass(Signup, [{\n    key: 'handleChange',\n    value: function handleChange(value, name) {\n      this.setState(_defineProperty({}, name, value));\n    }\n  }, {\n    key: 'validate',\n    value: function validate() {\n      if (!this.state.password || this.state.password !== this.state.password2) {\n        return false;\n      }\n      return true;\n    }\n  }, {\n    key: 'handleSubmit',\n    value: function handleSubmit(e) {\n      e.preventDefault();\n      if (this.props.auth.loading) return;\n      if (!this.validate()) {\n        return this.props.actions.setError('bad password');\n      }\n\n      var user = _objectWithoutProperties(this.state, []);\n\n      this.props.actions.signup(user);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      if (this.props.auth.isAuthenticated) {\n        var returnTo = this.props.auth.returnTo;\n\n        if (!returnTo || returnTo.match(/(api|login|logout|signup)/i)) {\n          returnTo = '/';\n        }\n        return (0, _preact.h)(_reactRouterDom.Redirect, { to: returnTo });\n      }\n      return (0, _preact.h)(\n        'form',\n        { onSubmit: this.handleSubmit },\n        (0, _preact.h)(\n          'h1',\n          null,\n          'New account'\n        ),\n        (0, _preact.h)('br', null),\n        (0, _preact.h)(\n          _common.Group,\n          null,\n          (0, _preact.h)(_common.TextInput, {\n            autofocus: true,\n            autocapitalize: 'off',\n            autocomplete: 'off',\n            title: 'Username',\n            name: 'username',\n            type: 'text',\n            value: this.state.username,\n            onInput: this.handleChange\n          }),\n          (0, _preact.h)(_common.TextInput, {\n            title: 'Password',\n            name: 'password',\n            type: 'password',\n            value: this.state.password,\n            onInput: this.handleChange\n          }),\n          (0, _preact.h)(_common.TextInput, {\n            title: 'Password again :)',\n            name: 'password2',\n            type: 'password',\n            value: this.state.password2,\n            onInput: this.handleChange\n          }),\n          (0, _preact.h)(\n            _common.Button,\n            {\n              loading: this.props.auth.loading\n            },\n            'Sign up'\n          ),\n          this.renderAuthError()\n        )\n      );\n    }\n  }, {\n    key: 'renderAuthError',\n    value: function renderAuthError() {\n      if (this.props.auth.error) {\n        return (0, _preact.h)(\n          'div',\n          { className: 'form-input-hint' },\n          \"Please doublecheck the form (o=_o~~)\"\n        );\n      }\n      return (0, _preact.h)('div', { className: 'form-input-hint' });\n    }\n  }]);\n\n  return Signup;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    auth: state.auth\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n  return {\n    actions: (0, _redux.bindActionCreators)(_extends({}, actions), dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Signup);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.enqueue = exports.resume = exports.pause = exports.play = undefined;\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar play = exports.play = function play(file) {\n  return { type: _types2.default.audioPlayer.play, file: file };\n};\nvar pause = exports.pause = function pause() {\n  return { type: _types2.default.audioPlayer.pause };\n};\nvar resume = exports.resume = function resume() {\n  return { type: _types2.default.audioPlayer.resume };\n};\nvar enqueue = exports.enqueue = function enqueue(file) {\n  return { type: _types2.default.audioPlayer.enqueue, file: file };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nvar _redux = require('redux');\n\nvar _audioPlayer = require('./audioPlayer.actions');\n\nvar audioPlayerActions = _interopRequireWildcard(_audioPlayer);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar AudioPlayer = function (_Component) {\n  _inherits(AudioPlayer, _Component);\n\n  function AudioPlayer(props) {\n    _classCallCheck(this, AudioPlayer);\n\n    var _this = _possibleConstructorReturn(this, (AudioPlayer.__proto__ || Object.getPrototypeOf(AudioPlayer)).call(this, props));\n\n    _this.handleClick = _this.handleClick.bind(_this);\n    return _this;\n  }\n\n  _createClass(AudioPlayer, [{\n    key: 'handleClick',\n    value: function handleClick(e) {\n      var _props = this.props,\n          audioPlayer = _props.audioPlayer,\n          actions = _props.actions;\n\n      if (audioPlayer.playing) {\n        actions.pause();\n      } else {\n        actions.resume();\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var audioPlayer = this.props.audioPlayer;\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'audioPlayer' },\n        (0, _preact.h)(\n          'span',\n          null,\n          this.props.title\n        ),\n        (0, _preact.h)(\n          'button',\n          {\n            onClick: this.handleClick\n          },\n          audioPlayer.playing ? '▶' : '~'\n        )\n      );\n    }\n  }]);\n\n  return AudioPlayer;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    audioPlayer: state.audioPlayer\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(audioPlayerActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(AudioPlayer);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar audioPlayerInitialState = {\n  loading: false,\n  error: null,\n  status: '',\n  current: null,\n  index: -1,\n  playlist: []\n};\n\nvar audio = document.createElement('audio');\n\nvar audioPlayerReducer = function audioPlayerReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : audioPlayerInitialState;\n  var action = arguments[1];\n\n  switch (action.type) {\n    case _types2.default.audioPlayer.play:\n      if (!action.file.url) {\n        return state;\n      }\n      audio.src = action.file.url;\n      audio.play();\n      return _extends({}, state, {\n        playing: true,\n        current: action.file\n      });\n    case _types2.default.audioPlayer.pause:\n      audio.pause();\n      return _extends({}, state, {\n        playing: false\n      });\n    case _types2.default.audioPlayer.resume:\n      audio.play();\n      return _extends({}, state, {\n        playing: true\n      });\n    default:\n      return state;\n  }\n};\n\nexports.default = audioPlayerReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _group = require('./group.component');\n\nvar _group2 = _interopRequireDefault(_group);\n\nvar _param = require('./param.component');\n\nvar _param2 = _interopRequireDefault(_param);\n\nvar _button = require('./button.component');\n\nvar _button2 = _interopRequireDefault(_button);\n\nvar _buttonGrid = require('./buttonGrid.component');\n\nvar _buttonGrid2 = _interopRequireDefault(_buttonGrid);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar AugmentationGrid = function (_Component) {\n  _inherits(AugmentationGrid, _Component);\n\n  function AugmentationGrid() {\n    var _ref;\n\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, AugmentationGrid);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = AugmentationGrid.__proto__ || Object.getPrototypeOf(AugmentationGrid)).call.apply(_ref, [this].concat(args))), _this), _this.state = {\n      x: 0, y: 0, sum: 0\n    }, _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  _createClass(AugmentationGrid, [{\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      var _props = this.props,\n          make = _props.make,\n          take = _props.take,\n          checkpoint = _props.checkpoint,\n          onTrain = _props.onTrain,\n          onAugment = _props.onAugment;\n      var _state = this.state,\n          x = _state.x,\n          y = _state.y,\n          sum = _state.sum;\n\n      var rows = [];\n      return (0, _preact.h)(\n        _group2.default,\n        { className: 'augmentationGrid' },\n        (0, _preact.h)(_buttonGrid2.default, {\n          x: make,\n          y: take,\n          max: 5000,\n          onHover: function onHover(x, y) {\n            return _this2.setState({ x: x, y: y });\n          },\n          onClick: function onClick(x, y) {\n            _this2.setState({ sum: sum + x * y });\n            onAugment(y, x);\n          }\n        }),\n        (0, _preact.h)(\n          _param2.default,\n          { title: 'Name' },\n          checkpoint.name\n        ),\n        (0, _preact.h)(\n          _param2.default,\n          { title: 'Take' },\n          y\n        ),\n        (0, _preact.h)(\n          _param2.default,\n          { title: 'Make' },\n          x\n        ),\n        (0, _preact.h)(\n          _param2.default,\n          { title: 'Will add to dataset' },\n          x * y\n        ),\n        (0, _preact.h)(\n          _param2.default,\n          { title: 'Total added this epoch' },\n          sum\n        ),\n        (0, _preact.h)(\n          _param2.default,\n          { title: 'Sequence length' },\n          checkpoint.sequenceCount\n        ),\n        (0, _preact.h)(\n          _param2.default,\n          { title: 'Dataset size' },\n          checkpoint.datasetCount\n        ),\n        (0, _preact.h)(\n          _button2.default,\n          { onClick: function onClick() {\n              _this2.setState({ sum: 0 });\n              onTrain();\n            } },\n          'Train'\n        )\n      );\n    }\n  }]);\n\n  return AugmentationGrid;\n}(_preact.Component);\n\nexports.default = AugmentationGrid;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _common = require('../common');\n\nvar _actions = require('../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Browser = function (_Component) {\n  _inherits(Browser, _Component);\n\n  function Browser() {\n    var _ref;\n\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, Browser);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Browser.__proto__ || Object.getPrototypeOf(Browser)).call.apply(_ref, [this].concat(args))), _this), _this.state = {\n      dir: '/',\n      files: [],\n      loading: true\n    }, _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  _createClass(Browser, [{\n    key: 'componentDidMount',\n    value: function componentDidMount() {\n      this.fetch(this.state.dir);\n    }\n  }, {\n    key: 'handlePick',\n    value: function handlePick(file) {\n      console.log(file);\n      if (file.dir) {\n        this.fetch([this.state.dir, file.name].join('/').replace('//', '/'));\n      } else {\n        this.fetchFile([this.state.dir, file.name].join('/').replace('//', '/'));\n      }\n    }\n  }, {\n    key: 'fetch',\n    value: function fetch(dir) {\n      var _this2 = this;\n\n      console.log('fetch', dir);\n      var module = this.props.app.tool;\n\n      this.setState({ dir: dir, file: null, loading: true });\n      _actions2.default.socket.list_directory({ module: module, dir: dir }).then(function (files) {\n        console.log(files);\n        _this2.setState({ dir: dir, files: files, loading: false });\n      });\n    }\n  }, {\n    key: 'fetchFile',\n    value: function fetchFile(fn) {\n      var _this3 = this;\n\n      console.log('fetch file', fn);\n      var module = this.props.app.tool;\n\n      this.setState({ file: null, loadingFile: true });\n      _actions2.default.socket.read_file({ module: module, fn: fn }).then(function (file) {\n        console.log(file);\n        _this3.setState({ file: file, loadingFile: false });\n      });\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this4 = this;\n\n      var app = this.props.app;\n      var _state = this.state,\n          loading = _state.loading,\n          dir = _state.dir,\n          files = _state.files,\n          loadingFile = _state.loadingFile,\n          file = _state.file;\n\n      console.log(this.props, this.state);\n      return (0, _preact.h)(\n        'div',\n        { className: 'app browser' },\n        (0, _preact.h)(\n          'h1',\n          null,\n          dir,\n          dir[dir.length - 1] !== '/' && '/'\n        ),\n        app.tool,\n        (0, _preact.h)('br', null),\n        loading && (0, _preact.h)(_common.Loading, null),\n        (0, _preact.h)(_common.FileList, {\n          files: files,\n          groupDirectories: true,\n          parentDirectory: dir !== '/',\n          orderBy: 'name asc',\n          fields: 'name datetime size',\n          onClick: function onClick(file, e) {\n            e.preventDefault();\n            e.stopPropagation();\n            console.log('picked a result', file);\n            _this4.handlePick(file);\n          },\n          onClickParent: function onClickParent(e) {\n            console.log('navigate up');\n            _this4.fetch(_this4.state.dir.split('/').slice(0, -1).join('/') || '/');\n          }\n        }),\n        loadingFile && (0, _preact.h)(_common.Loading, null),\n        file && (0, _preact.h)(_common.FileViewer, { file: file })\n      );\n    }\n  }]);\n\n  return Browser;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    app: state.system.app\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)({}, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Browser);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nvar _redux = require('redux');\n\nvar _live = require('../live/live.actions');\n\nvar liveActions = _interopRequireWildcard(_live);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Button = function (_Component) {\n  _inherits(Button, _Component);\n\n  function Button(props) {\n    _classCallCheck(this, Button);\n\n    var _this = _possibleConstructorReturn(this, (Button.__proto__ || Object.getPrototypeOf(Button)).call(this, props));\n\n    _this.handleClick = _this.handleClick.bind(_this);\n    return _this;\n  }\n\n  _createClass(Button, [{\n    key: 'handleClick',\n    value: function handleClick(e) {\n      this.props.onClick && this.props.onClick();\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'div',\n        { className: 'button param' },\n        (0, _preact.h)(\n          'label',\n          null,\n          (0, _preact.h)(\n            'span',\n            null,\n            this.props.title\n          ),\n          (0, _preact.h)(\n            'button',\n            {\n              onClick: this.handleClick\n            },\n            this.props.value || this.props.children\n          )\n        )\n      );\n    }\n  }]);\n\n  return Button;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {};\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {};\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Button);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ButtonGrid = function (_Component) {\n  _inherits(ButtonGrid, _Component);\n\n  function ButtonGrid() {\n    var _ref;\n\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, ButtonGrid);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = ButtonGrid.__proto__ || Object.getPrototypeOf(ButtonGrid)).call.apply(_ref, [this].concat(args))), _this), _this.state = {\n      x: 0, y: 0\n    }, _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  _createClass(ButtonGrid, [{\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      var _state = this.state,\n          _x = _state.x,\n          _y = _state.y;\n      var _props = this.props,\n          X = _props.x,\n          Y = _props.y,\n          _props$max = _props.max,\n          max = _props$max === undefined ? Infinity : _props$max,\n          _onClick = _props.onClick,\n          onHover = _props.onHover;\n\n      return (0, _preact.h)(\n        'table',\n        { className: 'buttonGrid' },\n        (0, _preact.h)(\n          'tr',\n          { className: 'row' },\n          (0, _preact.h)(\n            'th',\n            null,\n            \" \"\n          ),\n          X.map(function (x) {\n            return (0, _preact.h)(\n              'th',\n              { className: x === _x && 'bold' },\n              x\n            );\n          })\n        ),\n        Y.map(function (y) {\n          return (0, _preact.h)(\n            'tr',\n            { className: 'row' },\n            (0, _preact.h)(\n              'th',\n              { className: y === _y && 'bold' },\n              y\n            ),\n            X.map(function (x) {\n              return (0, _preact.h)(\n                'td',\n                null,\n                x * y > max ? \" \" : (0, _preact.h)(\n                  'button',\n                  {\n                    onClick: function onClick() {\n                      return _onClick(x, y);\n                    },\n                    onMouseEnter: function onMouseEnter() {\n                      _this2.setState({ x: x, y: y });\n                      onHover(x, y);\n                    }\n                  },\n                  \" \"\n                )\n              );\n            })\n          );\n        })\n      );\n    }\n  }]);\n\n  return ButtonGrid;\n}(_preact.Component);\n\nexports.default = ButtonGrid;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nvar _redux = require('redux');\n\nvar _live = require('../live/live.actions');\n\nvar liveActions = _interopRequireWildcard(_live);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Checkbox = function (_Component) {\n  _inherits(Checkbox, _Component);\n\n  function Checkbox(props) {\n    _classCallCheck(this, Checkbox);\n\n    var _this = _possibleConstructorReturn(this, (Checkbox.__proto__ || Object.getPrototypeOf(Checkbox)).call(this, props));\n\n    _this.handleClick = _this.handleClick.bind(_this);\n    return _this;\n  }\n\n  _createClass(Checkbox, [{\n    key: 'handleClick',\n    value: function handleClick(e) {\n      clearTimeout(this.timeout);\n      var new_value = e.target.checked;\n      this.props.onToggle && this.props.onToggle(new_value);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var checked = this.props.value;\n      var dim = !this.props.noDim;\n      return (0, _preact.h)(\n        'div',\n        { className: 'checkbox param' },\n        (0, _preact.h)(\n          'label',\n          null,\n          (0, _preact.h)(\n            'span',\n            null,\n            this.props.title\n          ),\n          (0, _preact.h)('input', {\n            type: 'checkbox',\n            onClick: this.handleClick,\n            checked: checked\n          })\n        )\n      );\n    }\n  }]);\n\n  return Checkbox;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {};\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    // actions: bindActionCreators(liveActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Checkbox);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// import { Loading, CurrentTask, FileList, FileRow } from '../../../common'\n\nfunction CurrentTask(_ref) {\n  var cpu = _ref.cpu,\n      gpu = _ref.gpu,\n      processor = _ref.processor;\n\n  var processor_name = void 0;\n  if (processor) {\n    processor_name = processor === 'cpu' ? 'cpu' : 'gpu';\n  } else if (gpu.status !== 'IDLE') {\n    processor_name = 'gpu';\n  } else if (cpu.status !== 'IDLE') {\n    processor_name = 'cpu';\n  }\n  var p = processor_name === 'cpu' ? cpu : gpu;\n  if (!p) return (0, _preact.h)('div', null);\n  if (p.status === 'IDLE') {\n    return (0, _preact.h)(\n      'div',\n      null,\n      processor_name,\n      ' idle'\n    );\n  }\n  var last_message = p.last_message,\n      pid = p.pid,\n      task = p.task;\n  var activity = task.activity,\n      epoch = task.epoch,\n      epochs = task.epochs,\n      dataset = task.dataset,\n      module = task.module;\n\n  return (0, _preact.h)(\n    'div',\n    { className: 'currentTask' },\n    '#',\n    pid,\n    ': ',\n    (0, _preact.h)(\n      'b',\n      null,\n      module,\n      ' ',\n      activity\n    ),\n    ' ',\n    (0, _preact.h)(\n      'i',\n      null,\n      dataset\n    ),\n    !!epochs ? (0, _preact.h)(\n      'span',\n      null,\n      epochs,\n      ' epoch',\n      _util2.default.courtesy_s(epochs)\n    ) : \"\",\n    epoch ? (0, _preact.h)(\n      'span',\n      null,\n      '(currently #',\n      epoch,\n      ')'\n    ) : \"\",\n    (0, _preact.h)('br', null),\n    (0, _preact.h)('br', null),\n    (0, _preact.h)(\n      'div',\n      { className: 'quiet' },\n      last_message\n    )\n  );\n}\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return state.system.runner;\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    // actions: bindActionCreators(samplernnActions, dispatch),\n    // remote: bindActionCreators(samplernnTasks, dispatch),\n    // audioPlayer: bindActionCreators(audioPlayerActions, dispatch),\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(CurrentTask);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.FileRow = exports.FileList = undefined;\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _moment = require('moment/min/moment.min');\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nvar _util = require('../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar fieldSet = _util2.default.fieldSet(new Set(['name', 'date', 'size']));\n\nvar FileList = exports.FileList = function FileList(props) {\n  var files = props.files,\n      fields = props.fields,\n      sort = props.sort,\n      title = props.title,\n      linkFiles = props.linkFiles,\n      onClick = props.onClick,\n      onClickParent = props.onClickParent,\n      onDelete = props.onDelete,\n      groupDirectories = props.groupDirectories,\n      parentDirectory = props.parentDirectory,\n      _props$orderBy = props.orderBy,\n      orderBy = _props$orderBy === undefined ? 'name asc' : _props$orderBy,\n      _props$className = props.className,\n      className = _props$className === undefined ? '' : _props$className,\n      _props$fileListClassN = props.fileListClassName,\n      fileListClassName = _props$fileListClassN === undefined ? 'filelist' : _props$fileListClassN,\n      _props$rowClassName = props.rowClassName,\n      rowClassName = _props$rowClassName === undefined ? 'row file' : _props$rowClassName;\n\n  var _util$sort$orderByFn = _util2.default.sort.orderByFn(orderBy),\n      mapFn = _util$sort$orderByFn.mapFn,\n      sortFn = _util$sort$orderByFn.sortFn;\n\n  var sortedFiles = (files || []).filter(function (f) {\n    return !!f;\n  }).map(mapFn).sort(sortFn);\n  if (groupDirectories) {\n    var groupedFiles = sortedFiles.reduce(function (a, b) {\n      a[b[1].dir].push(b);return a;\n    }, { true: [], false: [] });\n    sortedFiles = groupedFiles.true.concat(groupedFiles.false);\n  }\n  var fileList = sortedFiles.map(function (pair) {\n    return (0, _preact.h)(FileRow, {\n      file: pair[1],\n      fields: fieldSet(fields),\n      className: rowClassName,\n      linkFiles: linkFiles,\n      onDelete: onDelete,\n      onClick: onClick\n    });\n  });\n  if (!fileList || !fileList.length) {\n    return (0, _preact.h)(\n      'div',\n      { className: 'rows ' + className },\n      (0, _preact.h)(\n        'div',\n        { className: 'row heading' },\n        (0, _preact.h)(\n          'h4',\n          { className: 'noFiles' },\n          'No files'\n        )\n      )\n    );\n  }\n  // console.log(files)\n  return (0, _preact.h)(\n    'div',\n    { className: 'rows ' + className },\n    title && (0, _preact.h)(\n      'div',\n      { className: 'row heading' },\n      (0, _preact.h)(\n        'h3',\n        null,\n        title\n      ),\n      '}'\n    ),\n    (0, _preact.h)(\n      'div',\n      { className: 'rows ' + fileListClassName },\n      parentDirectory && (0, _preact.h)(\n        'div',\n        { className: rowClassName + ' parent' },\n        (0, _preact.h)(\n          'div',\n          { className: 'filename', title: 'Parent Directory' },\n          (0, _preact.h)(\n            'span',\n            { className: 'link', onClick: function onClick(e) {\n                return onClickParent && onClickParent(e);\n              } },\n            (0, _preact.h)(\n              'i',\n              null,\n              'Parent Directory'\n            )\n          )\n        )\n      ),\n      fileList\n    )\n  );\n};\n\nvar FileRow = exports.FileRow = function FileRow(props) {\n  var file = props.file,\n      linkFiles = props.linkFiles,\n      onDelete = props.onDelete,\n      _onClick = props.onClick,\n      _props$className2 = props.className,\n      className = _props$className2 === undefined ? 'row file' : _props$className2,\n      _props$username = props.username,\n      username = _props$username === undefined ? '' : _props$username;\n\n  var fields = fieldSet(props.fields);\n\n  var size = _util2.default.hush_size(file.size);\n  var date = file.date || file.created_at;\n  var epoch = file.epoch || file.epochs || 0;\n  var count = file.count || 0;\n\n  var name = void 0;\n  var key = void 0;\n  if (file.name) {\n    name = file.name;\n    key = name;\n  } else if (file.url) {\n    if (file.opt && file.opt.type) {\n      name = file.opt.type + ': ' + file.opt.title;\n      key = file.opt.token;\n    } else {\n      name = file.url.replace(/^https?:\\/\\//, '');\n      key = name;\n    }\n  }\n\n  return (0, _preact.h)(\n    'div',\n    { className: className, key: key },\n    fields.has('name') && (0, _preact.h)(\n      'div',\n      { className: 'filename', title: file.name || file.url },\n      file.persisted === false ? (0, _preact.h)(\n        'span',\n        { className: 'unpersisted' },\n        name\n      ) : linkFiles && file.url ? (0, _preact.h)(\n        'a',\n        { target: '_blank', onClick: function onClick(e) {\n            if (!(e.metaKey || e.ctrlKey || e.altKey) && _onClick) {\n              e.preventDefault();_onClick && _onClick(file, e);\n            }\n          }, href: file.url },\n        name\n      ) : (0, _preact.h)(\n        'span',\n        { className: 'link', onClick: function onClick(e) {\n            return _onClick && _onClick(file, e);\n          } },\n        name\n      )\n    ),\n    fields.has('age') && (0, _preact.h)(\n      'div',\n      { className: \"age \" + _util2.default.carbon_date(date) },\n      _util2.default.get_age(date)\n    ),\n    fields.has('username') && (0, _preact.h)(\n      'div',\n      { className: \"username\" },\n      username\n    ),\n    fields.has('epoch') && (0, _preact.h)(\n      'div',\n      { className: \"epoch \" + _util2.default.hush_null(epoch)[0] },\n      epoch > 0 ? 'ep. ' + epoch : ''\n    ),\n    fields.has('date') && (0, _preact.h)(\n      'div',\n      { className: \"date \" + _util2.default.carbon_date(date) },\n      (0, _moment2.default)(date).format(\"YYYY-MM-DD\")\n    ),\n    fields.has('datetime') && (0, _preact.h)(\n      'div',\n      { className: \"datetime \" + _util2.default.carbon_date(date) },\n      (0, _moment2.default)(date).format(\"YYYY-MM-DD h:mm a\")\n    ),\n    fields.has('size') && (0, _preact.h)(\n      'div',\n      { className: \"size \" + size[0] },\n      size[1]\n    ),\n    fields.has('count') && (0, _preact.h)(\n      'div',\n      { className: \"count \" + _util2.default.hush_null(count)[0] },\n      count > 0 ? count + ' files' : ''\n    ),\n    (fields.has('activity') || fields.has('module')) && (0, _preact.h)(\n      'div',\n      { className: 'activity' },\n      fields.has('activity') && file.activity,\n      fields.has('module') && file.module\n    ),\n    fields.has('delete') && onDelete && file.id && (0, _preact.h)(\n      'div',\n      { className: 'destroy', onClick: function onClick(e) {\n          return onDelete(file);\n        } },\n      'x'\n    ),\n    props.options && props.options(file)\n  );\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar FileUpload = function (_Component) {\n  _inherits(FileUpload, _Component);\n\n  function FileUpload(props) {\n    _classCallCheck(this, FileUpload);\n\n    var _this = _possibleConstructorReturn(this, (FileUpload.__proto__ || Object.getPrototypeOf(FileUpload)).call(this, props));\n\n    _this.handleChange = _this.handleChange.bind(_this);\n    return _this;\n  }\n\n  _createClass(FileUpload, [{\n    key: 'handleChange',\n    value: function handleChange(e) {\n      this.props.onChange && this.props.onChange();\n      e.stopPropagation();\n      e.preventDefault();\n      this.setState({ thumbnails: [], images: [] });\n      var files = e.dataTransfer ? e.dataTransfer.files : e.target.files;\n      var i = void 0,\n          f = void 0;\n      for (i = 0, f; i < files.length; i++) {\n        f = files[i];\n        if (!f) continue;\n        break;\n        // if (!f.type.match(this.props.mime)) continue\n      }\n      this.props.onUpload && this.props.onUpload(f);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'div',\n        { className: 'fileUpload param' },\n        (0, _preact.h)(\n          'label',\n          null,\n          (0, _preact.h)(\n            'span',\n            null,\n            this.props.title\n          ),\n          (0, _preact.h)('input', {\n            type: 'file',\n            accept: this.props.accept || '*/*',\n            multiple: this.props.multiple,\n            onChange: this.handleChange\n          }),\n          (0, _preact.h)(\n            'button',\n            null,\n            this.props.label || 'Choose file...'\n          )\n        )\n      );\n    }\n  }]);\n\n  return FileUpload;\n}(_preact.Component);\n\nexports.default = FileUpload;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = FileViewer;\n\nvar _preact = require('preact');\n\nvar image_types = {\n  'jpg': 'image/jpeg',\n  'jpeg': 'image/jpeg',\n  'png': 'image/png',\n  'gif': 'image/gif'\n};\n\nvar audio_types = {\n  'wav': 'audio/wav',\n  'mp3': 'audio/mp3',\n  'flac': 'audio/flac',\n  'aiff': 'audio/aiff'\n};\n\nvar video_types = {\n  'mp4': 'video/mp4'\n};\n\nfunction FileViewer(_ref) {\n  var file = _ref.file;\n  var error = file.error,\n      name = file.name,\n      path = file.path,\n      date = file.date,\n      size = file.size,\n      buf = file.buf;\n\n  if (error) {\n    return (0, _preact.h)(\n      'div',\n      { className: 'fileViewer' },\n      error\n    );\n  }\n  if (!buf) {\n    return (0, _preact.h)(\n      'div',\n      { className: 'fileViewer' },\n      'File empty'\n    );\n  }\n  var ext = name.split('.').slice(-1)[0].toLowerCase();\n  var tag = void 0;\n  if (ext in image_types) {\n    tag = (0, _preact.h)('img', { src: getURLFor(buf, image_types[ext]) });\n  } else if (ext in audio_types) {\n    tag = (0, _preact.h)('audio', { src: getURLFor(buf, audio_types[ext]), controls: true, autoplay: true });\n  } else if (ext in video_types) {\n    tag = (0, _preact.h)('video', { src: getURLFor(buf, audio_types[ext]), controls: true, autoplay: true });\n  } else {\n    tag = (0, _preact.h)(\n      'div',\n      { className: 'text' },\n      ab2str(buf)\n    );\n  }\n  return (0, _preact.h)(\n    'div',\n    { className: 'fileViewer' },\n    tag\n  );\n}\n\nvar getURLFor = function getURLFor(buf, type) {\n  var arrayBufferView = new Uint8Array(buf);\n  var blob = new Blob([arrayBufferView], { type: type });\n  var urlCreator = window.URL || window.webkitURL;\n  return urlCreator.createObjectURL(blob);\n};\n\nvar ab2str = function ab2str(buf) {\n  return String.fromCharCode.apply(null, new Uint8Array(buf));\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nexports.default = FolderList;\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _util = require('../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _group = require('./group.component');\n\nvar _group2 = _interopRequireDefault(_group);\n\nvar _param = require('./param.component');\n\nvar _param2 = _interopRequireDefault(_param);\n\nvar _loading = require('./loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction FolderList(_ref) {\n  var db = _ref.db,\n      path = _ref.path,\n      emptyText = _ref.emptyText,\n      activity = _ref.activity;\n\n  if (!db) return null;\n  if (db.loading || !db.data) {\n    return (0, _preact.h)(\n      'div',\n      { className: 'col folderList' },\n      (0, _preact.h)(_loading2.default, { progress: db.progress })\n    );\n  }\n  var folderList = db.data.folders;\n  if (activity) {\n    folderList = folderList.filter(function (f) {\n      return f.activity === activity;\n    });\n  }\n  if (!folderList.length && emptyText) {\n    return (0, _preact.h)(\n      'div',\n      { className: 'col folderList' },\n      emptyText\n    );\n  }\n  console.log(folders);\n  var folders = folderList.map(function (raw_folder) {\n    var folder = db.data.folderLookup[raw_folder.id];\n    var fileCount = folder.files ? folder.files.length : 0;\n\n    var _util$hush_null = _util2.default.hush_null(fileCount),\n        _util$hush_null2 = _slicedToArray(_util$hush_null, 2),\n        className = _util$hush_null2[0],\n        size = _util$hush_null2[1];\n\n    return (0, _preact.h)(\n      _param2.default,\n      { title: (0, _preact.h)(\n          _reactRouterDom.Link,\n          { to: path + folder.id + '/' },\n          folder.name\n        ) },\n      (0, _preact.h)(\n        'span',\n        { className: className },\n        fileCount,\n        ' file',\n        _util2.default.courtesy_s(fileCount)\n      )\n    );\n  });\n\n  return (0, _preact.h)(\n    'div',\n    { className: 'col folderList' },\n    (0, _preact.h)(\n      _group2.default,\n      { title: 'Projects' },\n      folders\n    )\n  );\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\t\tvalue: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Gallery = function (_Component) {\n\t\t_inherits(Gallery, _Component);\n\n\t\tfunction Gallery(props) {\n\t\t\t\t_classCallCheck(this, Gallery);\n\n\t\t\t\treturn _possibleConstructorReturn(this, (Gallery.__proto__ || Object.getPrototypeOf(Gallery)).call(this));\n\t\t}\n\n\t\t_createClass(Gallery, [{\n\t\t\t\tkey: 'render',\n\t\t\t\tvalue: function render() {\n\t\t\t\t\t\tvar _props = this.props,\n\t\t\t\t\t\t    title = _props.title,\n\t\t\t\t\t\t    images = _props.images;\n\n\t\t\t\t\t\tvar imageList = images.map(function (image) {\n\t\t\t\t\t\t\t\treturn (0, _preact.h)(\n\t\t\t\t\t\t\t\t\t\t'div',\n\t\t\t\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\t\t\t(0, _preact.h)('img', { src: image.url })\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t});\n\t\t\t\t\t\treturn (0, _preact.h)(\n\t\t\t\t\t\t\t\t'div',\n\t\t\t\t\t\t\t\t{ 'class': 'gallery' },\n\t\t\t\t\t\t\t\timageList\n\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t}]);\n\n\t\treturn Gallery;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n\t\treturn {};\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n\t\treturn {\n\t\t\t\t// actions: bindActionCreators(liveActions, dispatch)\n\t\t};\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Gallery);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = Group;\n\nvar _preact = require('preact');\n\nfunction Group(props) {\n  return (0, _preact.h)(\n    'div',\n    { className: 'group' },\n    this.props.title && (0, _preact.h)(\n      'h3',\n      null,\n      this.props.title\n    ),\n    this.props.children\n  );\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _reactRedux = require('react-redux');\n\nvar _system = require('../system/system.actions');\n\nvar systemActions = _interopRequireWildcard(_system);\n\nvar _modules = require('../modules');\n\nvar _modules2 = _interopRequireDefault(_modules);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction NavLink(props) {\n  if (!props.to) {\n    return (0, _preact.h)(\n      'span',\n      null,\n      props.children\n    );\n  }\n  var children = props.to === props.location.pathname ? (0, _preact.h)(\n    'b',\n    null,\n    props.children\n  ) : props.children;\n  return (0, _preact.h)(\n    'span',\n    null,\n    (0, _preact.h)(\n      _reactRouterDom.Link,\n      { to: props.to },\n      children\n    )\n  );\n}\n\nfunction Header(props) {\n  var site = props.site,\n      app = props.app,\n      fps = props.fps,\n      playing = props.playing,\n      actions = props.actions,\n      location = props.location,\n      history = props.history;\n\n  var tool_list = Object.keys(_modules2.default).map(function (name, i) {\n    var label = name.replace(/_/, \" \");\n    return (0, _preact.h)(\n      'option',\n      { value: name, key: i },\n      label\n    );\n  });\n  var tool = _modules2.default[app.tool];\n  var links = tool.links().map(function (link, i) {\n    return (0, _preact.h)(\n      NavLink,\n      { key: i, location: location, to: link.url },\n      link.name\n    );\n  });\n  return (0, _preact.h)(\n    'header',\n    null,\n    (0, _preact.h)(\n      'span',\n      null,\n      (0, _preact.h)(\n        'b',\n        null,\n        site.name,\n        ' cortex'\n      )\n    ),\n    (0, _preact.h)(\n      'span',\n      null,\n      (0, _preact.h)(\n        'select',\n        { onChange: function onChange(e) {\n            var path = window.location.pathname.split(\"/\");\n            path.shift();\n            console.log(path);\n            if (path[0] in _modules2.default && path[1]) {\n              history.push('/' + e.target.value + '/' + path[1] + '/');\n            }\n            actions.changeTool(e.target.value, true);\n          }, value: app.tool },\n        tool_list\n      )\n    ),\n    (0, _preact.h)(\n      NavLink,\n      { location: location, to: '/system' },\n      'system'\n    ),\n    (0, _preact.h)(\n      NavLink,\n      { location: location, to: '/dashboard' },\n      'dashboard'\n    ),\n    (0, _preact.h)(\n      'span',\n      null,\n      links\n    ),\n    playing && (0, _preact.h)(\n      'span',\n      null,\n      fps,\n      ' fps'\n    )\n  );\n}\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    site: state.system.site,\n    app: state.system.app,\n    fps: state.live.fps,\n    playing: state.live.playing\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(systemActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Header);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.AugmentationGrid = exports.ButtonGrid = exports.TaskList = exports.CurrentTask = exports.Checkbox = exports.Button = exports.SelectGroup = exports.Select = exports.Slider = exports.NumberInput = exports.TextInput = exports.Param = exports.ParamGroup = exports.Group = exports.Browser = exports.Player = exports.Gallery = exports.FileViewer = exports.FileUpload = exports.FileRow = exports.FileList = exports.FolderList = exports.AudioPlayer = exports.Header = exports.Progress = exports.Loading = exports.Views = undefined;\n\nvar _audioPlayer = require('./audioPlayer/audioPlayer.component');\n\nvar _audioPlayer2 = _interopRequireDefault(_audioPlayer);\n\nvar _augmentationGrid = require('./augmentationGrid.component');\n\nvar _augmentationGrid2 = _interopRequireDefault(_augmentationGrid);\n\nvar _browser = require('./browser.component');\n\nvar _browser2 = _interopRequireDefault(_browser);\n\nvar _button = require('./button.component');\n\nvar _button2 = _interopRequireDefault(_button);\n\nvar _buttonGrid = require('./buttonGrid.component');\n\nvar _buttonGrid2 = _interopRequireDefault(_buttonGrid);\n\nvar _checkbox = require('./checkbox.component');\n\nvar _checkbox2 = _interopRequireDefault(_checkbox);\n\nvar _currentTask = require('./currentTask.component');\n\nvar _currentTask2 = _interopRequireDefault(_currentTask);\n\nvar _fileList = require('./fileList.component');\n\nvar _fileUpload = require('./fileUpload.component');\n\nvar _fileUpload2 = _interopRequireDefault(_fileUpload);\n\nvar _fileViewer = require('./fileViewer.component');\n\nvar _fileViewer2 = _interopRequireDefault(_fileViewer);\n\nvar _folderList = require('./folderList.component');\n\nvar _folderList2 = _interopRequireDefault(_folderList);\n\nvar _gallery = require('./gallery.component');\n\nvar _gallery2 = _interopRequireDefault(_gallery);\n\nvar _group = require('./group.component');\n\nvar _group2 = _interopRequireDefault(_group);\n\nvar _header = require('./header.component');\n\nvar _header2 = _interopRequireDefault(_header);\n\nvar _loading = require('./loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nvar _numberInput = require('./numberInput.component');\n\nvar _numberInput2 = _interopRequireDefault(_numberInput);\n\nvar _param = require('./param.component');\n\nvar _param2 = _interopRequireDefault(_param);\n\nvar _paramGroup = require('./paramGroup.component');\n\nvar _paramGroup2 = _interopRequireDefault(_paramGroup);\n\nvar _player = require('./player.component');\n\nvar _player2 = _interopRequireDefault(_player);\n\nvar _progress = require('./progress.component');\n\nvar _progress2 = _interopRequireDefault(_progress);\n\nvar _select = require('./select.component');\n\nvar _select2 = _interopRequireDefault(_select);\n\nvar _selectGroup = require('./selectGroup.component');\n\nvar _selectGroup2 = _interopRequireDefault(_selectGroup);\n\nvar _slider = require('./slider.component');\n\nvar _slider2 = _interopRequireDefault(_slider);\n\nvar _textInput = require('./textInput.component');\n\nvar _textInput2 = _interopRequireDefault(_textInput);\n\nvar _taskList = require('./taskList.component');\n\nvar _taskList2 = _interopRequireDefault(_taskList);\n\nvar _views = require('./views');\n\nvar Views = _interopRequireWildcard(_views);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.Views = Views;\nexports.Loading = _loading2.default;\nexports.Progress = _progress2.default;\nexports.Header = _header2.default;\nexports.AudioPlayer = _audioPlayer2.default;\nexports.FolderList = _folderList2.default;\nexports.FileList = _fileList.FileList;\nexports.FileRow = _fileList.FileRow;\nexports.FileUpload = _fileUpload2.default;\nexports.FileViewer = _fileViewer2.default;\nexports.Gallery = _gallery2.default;\nexports.Player = _player2.default;\nexports.Browser = _browser2.default;\nexports.Group = _group2.default;\nexports.ParamGroup = _paramGroup2.default;\nexports.Param = _param2.default;\nexports.TextInput = _textInput2.default;\nexports.NumberInput = _numberInput2.default;\nexports.Slider = _slider2.default;\nexports.Select = _select2.default;\nexports.SelectGroup = _selectGroup2.default;\nexports.Button = _button2.default;\nexports.Checkbox = _checkbox2.default;\nexports.CurrentTask = _currentTask2.default;\nexports.TaskList = _taskList2.default;\nexports.ButtonGrid = _buttonGrid2.default;\nexports.AugmentationGrid = _augmentationGrid2.default;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = Loading;\n\nvar _preact = require('preact');\n\nvar _progress = require('./progress.component');\n\nvar _progress2 = _interopRequireDefault(_progress);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction Loading(_ref) {\n  var progress = _ref.progress;\n\n  return (0, _preact.h)(\n    'div',\n    { className: 'loading' },\n    'Loading',\n    (0, _preact.h)('br', null),\n    progress && (0, _preact.h)(_progress2.default, { progress: progress })\n  );\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar NumberInput = function (_Component) {\n  _inherits(NumberInput, _Component);\n\n  function NumberInput(props) {\n    _classCallCheck(this, NumberInput);\n\n    var _this = _possibleConstructorReturn(this, (NumberInput.__proto__ || Object.getPrototypeOf(NumberInput)).call(this, props));\n\n    _this.state = { value: null, changed: false };\n    _this.handleInput = _this.handleInput.bind(_this);\n    _this.handleKeydown = _this.handleKeydown.bind(_this);\n    return _this;\n  }\n\n  _createClass(NumberInput, [{\n    key: 'handleInput',\n    value: function handleInput(e) {\n      this.setState({\n        value: e.target.value,\n        changed: true\n      });\n      this.props.onInput && this.props.onInput(e.target.value, e.target.name);\n      this.props.onChange && this.props.onChange(e.target.name, e.target.value);\n    }\n  }, {\n    key: 'handleKeydown',\n    value: function handleKeydown(e) {\n      if (e.keyCode === 13) {\n        this.setState({\n          value: e.target.value,\n          changed: false\n        });\n        this.props.onSave && this.props.onSave(e.target.value, e.target.name);\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'div',\n        { className: 'numberInput param' },\n        (0, _preact.h)(\n          'label',\n          null,\n          (0, _preact.h)(\n            'span',\n            null,\n            this.props.title\n          ),\n          (0, _preact.h)('input', {\n            type: 'number',\n            name: this.props.name || 'number',\n            value: this.state.changed ? this.state.value : this.props.value,\n            onInput: this.handleInput,\n            onKeydown: this.handleKeydown,\n            placeholder: this.props.placeholder,\n            autofocus: this.props.autofocus,\n            min: this.props.min,\n            max: this.props.max,\n            step: this.props.step || this.props.type === 'int' ? 1 : 0.01\n          })\n        )\n      );\n    }\n  }]);\n\n  return NumberInput;\n}(_preact.Component);\n\nexports.default = NumberInput;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Param = function (_Component) {\n  _inherits(Param, _Component);\n\n  function Param(props) {\n    _classCallCheck(this, Param);\n\n    return _possibleConstructorReturn(this, (Param.__proto__ || Object.getPrototypeOf(Param)).call(this, props));\n  }\n\n  _createClass(Param, [{\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'div',\n        { className: 'button param' },\n        (0, _preact.h)(\n          'span',\n          null,\n          this.props.title\n        ),\n        (0, _preact.h)(\n          'span',\n          null,\n          this.props.children\n        )\n      );\n    }\n  }]);\n\n  return Param;\n}(_preact.Component);\n\nexports.default = Param;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nvar _redux = require('redux');\n\nvar _live = require('../live/live.actions');\n\nvar liveActions = _interopRequireWildcard(_live);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ParamGroup = function (_Component) {\n  _inherits(ParamGroup, _Component);\n\n  function ParamGroup(props) {\n    _classCallCheck(this, ParamGroup);\n\n    var _this = _possibleConstructorReturn(this, (ParamGroup.__proto__ || Object.getPrototypeOf(ParamGroup)).call(this, props));\n\n    _this.handleClick = _this.handleClick.bind(_this);\n    return _this;\n  }\n\n  _createClass(ParamGroup, [{\n    key: 'handleClick',\n    value: function handleClick(e) {\n      clearTimeout(this.timeout);\n      var new_value = e.target.checked;\n      this.props.actions.set_param(this.props.name, new_value);\n      this.props.onToggle && this.props.onToggle(new_value);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var checked = this.props.opt[this.props.name];\n      var toggle = !this.props.noToggle;\n      var dim = !this.props.noDim;\n      var className = !dim || !toggle || checked ? 'paramGroup active' : 'paramGroup inactive';\n      return (0, _preact.h)(\n        'div',\n        { className: className },\n        (0, _preact.h)(\n          'label',\n          null,\n          (0, _preact.h)(\n            'h3',\n            null,\n            this.props.title\n          ),\n          toggle ? (0, _preact.h)('input', {\n            type: 'checkbox',\n            onClick: this.handleClick,\n            checked: checked\n          }) : null\n        ),\n        this.props.children\n      );\n    }\n  }]);\n\n  return ParamGroup;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    opt: state.live.opt\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(liveActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(ParamGroup);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nfunction Player(props) {\n  var className = props.fullscreen ? 'player fullscreen' : 'player';\n  return (0, _preact.h)(\n    'div',\n    { className: className },\n    (0, _preact.h)('canvas', { width: props.width, height: props.height })\n  );\n}\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {};\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {};\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Player);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = Progress;\n\nvar _preact = require('preact');\n\nfunction Progress(_ref) {\n  var progress = _ref.progress;\n\n  if (!progress) return;\n  var i = progress.i,\n      n = progress.n;\n\n  var a = [];\n  for (var j = 0; j < n; j++) {\n    a.push((0, _preact.h)('div', { key: j, className: j < i ? 'x' : 'o' }));\n  }\n  return (0, _preact.h)(\n    'div',\n    { className: 'progress' },\n    a\n  );\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nvar _redux = require('redux');\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Select = function (_Component) {\n  _inherits(Select, _Component);\n\n  function Select(props) {\n    _classCallCheck(this, Select);\n\n    var _this = _possibleConstructorReturn(this, (Select.__proto__ || Object.getPrototypeOf(Select)).call(this, props));\n\n    _this.handleChange = _this.handleChange.bind(_this);\n    return _this;\n  }\n\n  _createClass(Select, [{\n    key: 'handleChange',\n    value: function handleChange(e) {\n      clearTimeout(this.timeout);\n      var new_value = e.target.value;\n      if (new_value === 'PLACEHOLDER') return;\n      this.props.onChange && this.props.onChange(this.props.name, new_value);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var currentValue = this.props.live ? this.props.opt[this.props.name] : this.props.value;\n      var lastValue = void 0;\n      var options = (this.props.options || []).map(function (key, i) {\n        var name = void 0,\n            value = void 0;\n        if (typeof key === 'string') {\n          name = key.length < 2 ? key.toUpperCase() : key;\n          value = key;\n        } else if ((typeof key === 'undefined' ? 'undefined' : _typeof(key)) === 'object') {\n          if (key.length) {\n            var _key = _slicedToArray(key, 2);\n\n            name = _key[0];\n            value = _key[1];\n          } else if (key.count) {\n            var frames = Math.round(key.count / 30) + ' s.';\n            name = key.name.replace(/_/g, ' ') + ' (' + frames + ')';\n            value = key.name;\n          } else {\n            name = key.name;\n            value = key.value || key.name;\n          }\n        }\n        lastValue = value;\n        return (0, _preact.h)(\n          'option',\n          { value: value, key: i },\n          name\n        );\n      });\n      return (0, _preact.h)(\n        'div',\n        { className: 'select param' },\n        (0, _preact.h)(\n          'label',\n          null,\n          (0, _preact.h)(\n            'span',\n            null,\n            this.props.title\n          ),\n          (0, _preact.h)(\n            'select',\n            {\n              onChange: this.handleChange,\n              value: currentValue || lastValue\n            },\n            this.props.placeholder && (0, _preact.h)(\n              'option',\n              { value: 'PLACEHOLDER' },\n              this.props.placeholder\n            ),\n            options\n          )\n        ),\n        this.props.children\n      );\n    }\n  }]);\n\n  return Select;\n}(_preact.Component);\n\nfunction capitalize(s) {\n  return (s || \"\").replace(/(?:^|\\s)\\S/g, function (a) {\n    return a.toUpperCase();\n  });\n}\n\nvar mapStateToProps = function mapStateToProps(state, props) {\n  return {\n    opt: props.opt || state.live.opt\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {};\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Select);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nvar _redux = require('redux');\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SelectGroup = function (_Component) {\n  _inherits(SelectGroup, _Component);\n\n  function SelectGroup(props) {\n    _classCallCheck(this, SelectGroup);\n\n    var _this = _possibleConstructorReturn(this, (SelectGroup.__proto__ || Object.getPrototypeOf(SelectGroup)).call(this, props));\n\n    _this.handleChange = _this.handleChange.bind(_this);\n    return _this;\n  }\n\n  _createClass(SelectGroup, [{\n    key: 'handleChange',\n    value: function handleChange(e) {\n      clearTimeout(this.timeout);\n      var new_value = e.target.value;\n      if (new_value === 'PLACEHOLDER') return;\n      this.props.onChange && this.props.onChange(this.props.name, new_value);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var currentValue = this.props.live ? this.props.opt[this.props.name] : this.props.value;\n      var lastValue = void 0;\n      var options = (this.props.options || []).map(function (group, i) {\n        var groupName = group.name;\n        var children = group.options.map(function (key) {\n          var name = key.length < 2 ? key.toUpperCase() : key;\n          name = name.replace(/_/g, ' ');\n          var value = key;\n          lastValue = value;\n          return (0, _preact.h)(\n            'option',\n            { value: value, key: value },\n            name\n          );\n        });\n        return (0, _preact.h)(\n          'optgroup',\n          { label: groupName, key: groupName },\n          children\n        );\n      });\n      return (0, _preact.h)(\n        'div',\n        { className: 'select param' },\n        (0, _preact.h)(\n          'label',\n          null,\n          (0, _preact.h)(\n            'span',\n            null,\n            this.props.title\n          ),\n          (0, _preact.h)(\n            'select',\n            {\n              onChange: this.handleChange,\n              value: currentValue || lastValue\n            },\n            this.props.placeholder && (0, _preact.h)(\n              'option',\n              { value: 'PLACEHOLDER' },\n              this.props.placeholder\n            ),\n            options\n          )\n        ),\n        this.props.children\n      );\n    }\n  }]);\n\n  return SelectGroup;\n}(_preact.Component);\n\nfunction capitalize(s) {\n  return (s || \"\").replace(/(?:^|\\s)\\S/g, function (a) {\n    return a.toUpperCase();\n  });\n}\n\nvar mapStateToProps = function mapStateToProps(state, props) {\n  return {\n    opt: props.opt || state.live.opt\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {};\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SelectGroup);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nvar _redux = require('redux');\n\nvar _live = require('../live/live.actions');\n\nvar liveActions = _interopRequireWildcard(_live);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SLIDER_THROTTLE_TIME = 100;\n\nvar Slider = function (_Component) {\n  _inherits(Slider, _Component);\n\n  function Slider(props) {\n    _classCallCheck(this, Slider);\n\n    var _this = _possibleConstructorReturn(this, (Slider.__proto__ || Object.getPrototypeOf(Slider)).call(this, props));\n\n    _this.timeout = 0;\n    _this.state = {\n      value: props.live ? props.opt[props.name] : props.value\n    };\n    _this.handleInput = _this.handleInput.bind(_this);\n    _this.handleRange = _this.handleRange.bind(_this);\n    return _this;\n  }\n\n  _createClass(Slider, [{\n    key: 'componentWillReceiveProps',\n    value: function componentWillReceiveProps(nextProps) {\n      var next_value = nextProps.value || nextProps.opt[nextProps.name];\n      if (next_value !== this.state.value) {\n        this.setState({ value: next_value });\n      }\n    }\n  }, {\n    key: 'handleInput',\n    value: function handleInput(e) {\n      var _props = this.props,\n          name = _props.name,\n          opt = _props.opt;\n\n      var old_value = opt[name];\n      var new_value = e.target.value;\n      if (new_value === '') {\n        new_value = this.props.defaultValue || (this.props.max - this.props.min) / 2;\n      } else if (this.props.type === 'int') {\n        new_value = parseInt(new_value);\n      } else if (this.props.type === 'odd') {\n        new_value = parseInt(Math.floor(new_value / 2) * 2 + 1);\n      }\n      if (old_value !== new_value) {\n        this.setState({ value: new_value });\n        this.props.live && this.props.actions.set_param(this.props.name, new_value);\n        this.props.onChange && this.props.onChange(new_value);\n      }\n      clearTimeout(this.timeout);\n    }\n  }, {\n    key: 'handleRange',\n    value: function handleRange(e) {\n      var _this2 = this;\n\n      clearTimeout(this.timeout);\n      var new_value = e.target.value;\n      if (this.props.type === 'int') {\n        new_value = parseInt(new_value);\n      }\n      if (this.props.type === 'odd') {\n        new_value = parseInt(Math.floor(new_value / 2) * 2 + 1);\n      }\n      if (this.props.type === 'list') {\n        new_value = this.props.options[new_value] || this.props.options[0];\n      }\n      this.setState({ value: new_value });\n      this.timeout = setTimeout(function () {\n        _this2.props.live && _this2.props.actions.set_param(_this2.props.name, new_value);\n        _this2.props.onChange && _this2.props.onChange(new_value);\n      }, SLIDER_THROTTLE_TIME);\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props2 = this.props,\n          name = _props2.name,\n          title = _props2.title;\n\n      var value = this.state.value;\n      if (typeof value === 'undefined') {\n        value = this.props.min;\n      }\n      var text_value = value;\n      var step = void 0;\n      var min = this.props.min || 0;\n      var max = this.props.max || 0;\n      if (this.props.type === 'int') {\n        step = 1;\n      } else if (this.props.type === 'list') {\n        min = 0;\n        max = this.props.options.length - 1;\n        step = 1;\n        value = this.props.options.indexOf(value);\n      } else {\n        step = (this.props.max - this.props.min) / 100;\n        text_value = parseFloat(value).toFixed(2);\n      }\n      return (0, _preact.h)(\n        'div',\n        { className: 'slider param' },\n        (0, _preact.h)(\n          'label',\n          null,\n          (0, _preact.h)(\n            'span',\n            null,\n            title || name.replace(/_/g, ' ')\n          ),\n          (0, _preact.h)('input', { type: 'text', value: text_value, onBlur: this.handleInput })\n        ),\n        (0, _preact.h)('input', {\n          type: 'range',\n          min: min,\n          max: max,\n          step: step,\n          value: value,\n          onInput: this.handleRange\n        })\n      );\n    }\n  }]);\n\n  return Slider;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    opt: state.live.opt\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(liveActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Slider);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _util = require('../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _actions = require('../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar TaskList = function (_Component) {\n  _inherits(TaskList, _Component);\n\n  function TaskList(props) {\n    _classCallCheck(this, TaskList);\n\n    return _possibleConstructorReturn(this, (TaskList.__proto__ || Object.getPrototypeOf(TaskList)).call(this));\n  }\n\n  _createClass(TaskList, [{\n    key: 'shouldComponentUpdate',\n    value: function shouldComponentUpdate(nextProps) {\n      if (nextProps.tasks.length !== this.props.tasks.length) {\n        return true;\n      }\n      if (nextProps.tasks[0] !== this.props.tasks[0]) {\n        return true;\n      }\n      return false;\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      var _props = this.props,\n          title = _props.title,\n          tasks = _props.tasks;\n\n      var time = 0;\n\n      var _util$sort$orderByFn = _util2.default.sort.orderByFn(this.props.sort || 'date desc'),\n          mapFn = _util$sort$orderByFn.mapFn,\n          sortFn = _util$sort$orderByFn.sortFn;\n\n      var taskList = tasks.map(mapFn).sort(sortFn).map(function (pair) {\n        var task = pair[1];\n        var dataset = task.dataset;\n\n        var dataset_link = void 0,\n            label = dataset;\n        // console.log(task)\n        switch (task.activity) {\n          case 'train':\n            if (task.epoch === 0) {\n              label += ', latest';\n            } else {\n              label += ', ' + task.epoch;\n            }\n            label += ' + ' + task.epochs;\n            break;\n          case 'augment':\n            try {\n              var opt = JSON.parse(task.opt);\n              label += ', ' + opt.augment_take + ' x ' + opt.augment_make;\n            } catch (e) {\n              //\n            }\n          default:\n            break;\n        }\n        if (task.folder_id) {\n          var href = '/' + task.module + '/' + (task.module === 'samplernn' ? 'datasets' : 'sequences') + '/' + task.folder_id + '/';\n          dataset_link = (0, _preact.h)(\n            _reactRouterDom.Link,\n            { to: href },\n            label\n          );\n        } else {\n          dataset_link = label;\n        }\n        return (0, _preact.h)(\n          'div',\n          { className: 'row' },\n          (0, _preact.h)(\n            'div',\n            { className: 'activity' },\n            task.activity,\n            ' ',\n            task.module\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'dataset' },\n            dataset_link\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: \"age \" + _util2.default.carbon_date(task.updated_at) },\n            _util2.default.get_age(task.updated_at)\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'options' },\n            (0, _preact.h)(\n              'span',\n              { className: 'destroy', onClick: function onClick() {\n                  return _this2.handleDestroy(task);\n                } },\n              'x'\n            )\n          )\n        );\n      });\n      return (0, _preact.h)(\n        'div',\n        { className: 'tasklist rows' },\n        taskList\n      );\n    }\n  }, {\n    key: 'handleDestroy',\n    value: function handleDestroy(task) {\n      var yes = confirm('Are you sure you want to delete this task?');\n      if (yes) {\n        _actions2.default.task.destroy(task);\n      }\n    }\n  }]);\n\n  return TaskList;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {};\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    // actions: bindActionCreators(liveActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(TaskList);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar TextInput = function (_Component) {\n  _inherits(TextInput, _Component);\n\n  function TextInput(props) {\n    _classCallCheck(this, TextInput);\n\n    var _this = _possibleConstructorReturn(this, (TextInput.__proto__ || Object.getPrototypeOf(TextInput)).call(this, props));\n\n    _this.state = { value: null, changed: false };\n    _this.handleInput = _this.handleInput.bind(_this);\n    _this.handleKeydown = _this.handleKeydown.bind(_this);\n    return _this;\n  }\n\n  _createClass(TextInput, [{\n    key: 'handleInput',\n    value: function handleInput(e) {\n      this.setState({\n        value: e.target.value,\n        changed: true\n      });\n      this.props.onInput && this.props.onInput(e.target.value, e.target.name);\n    }\n  }, {\n    key: 'handleKeydown',\n    value: function handleKeydown(e) {\n      if (e.keyCode === 13) {\n        this.setState({\n          value: e.target.value,\n          changed: false\n        });\n        this.props.onSave && this.props.onSave(e.target.value, e.target.name);\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _h;\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'textInput param' },\n        (0, _preact.h)(\n          'label',\n          null,\n          (0, _preact.h)(\n            'span',\n            null,\n            this.props.title\n          ),\n          (0, _preact.h)('input', (_h = {\n            type: this.props.type || 'text',\n            name: this.props.name || 'text',\n            value: this.state.changed ? this.state.value : this.props.value,\n            onInput: this.handleInput,\n            onKeydown: this.handleKeydown,\n            autofocus: this.props.autofocus,\n            autoComplete: this.props.autocomplete,\n            autoCapitalize: this.props.autocapitalize || 'off',\n            placeholder: this.props.placeholder\n          }, _defineProperty(_h, 'autofocus', this.props.autofocus), _defineProperty(_h, 'className', this.props.className || ''), _h))\n        )\n      );\n    }\n  }]);\n\n  return TextInput;\n}(_preact.Component);\n\nexports.default = TextInput;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.New = undefined;\n\nvar _newView = require('./new.view.js');\n\nvar _newView2 = _interopRequireDefault(_newView);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar New = exports.New = _newView2.default;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _group = require('../group.component');\n\nvar _group2 = _interopRequireDefault(_group);\n\nvar _param = require('../param.component');\n\nvar _param2 = _interopRequireDefault(_param);\n\nvar _loading = require('../loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nvar _folderList = require('../folderList.component');\n\nvar _folderList2 = _interopRequireDefault(_folderList);\n\nvar _dataset = require('../../dataset/dataset.new');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar NewView = function (_Component) {\n  _inherits(NewView, _Component);\n\n  function NewView(props) {\n    _classCallCheck(this, NewView);\n\n    var _this = _possibleConstructorReturn(this, (NewView.__proto__ || Object.getPrototypeOf(NewView)).call(this, props));\n\n    console.log(props);\n    if (!props.db.data) {\n      props.actions.load_directories();\n    }\n    return _this;\n  }\n\n  _createClass(NewView, [{\n    key: 'render',\n    value: function render() {\n      var _props = this.props,\n          module = _props.module,\n          history = _props.history,\n          db = _props.db,\n          path = _props.path;\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'app new-view ' + module.name },\n        (0, _preact.h)(\n          'div',\n          { className: 'heading' },\n          (0, _preact.h)(\n            'h1',\n            null,\n            module.displayName || module.name\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { className: 'col narrow' },\n          (0, _preact.h)(_dataset2.default, {\n            module: module,\n            history: history\n          }),\n          (0, _preact.h)(_folderList2.default, {\n            db: db,\n            path: path,\n            activity: 'dataset',\n            emptyText: (0, _preact.h)(\n              'i',\n              null,\n              'No projects yet. Please create one~'\n            )\n          })\n        )\n      );\n    }\n  }]);\n\n  return NewView;\n}(_preact.Component);\n\nexports.default = NewView;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.load = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _actions = require('../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar load = exports.load = function load() {\n  return function (dispatch) {\n    _util2.default.allProgress([_actions2.default.task.index({ limit: 40, orderBy: 'created_at desc' }), _actions2.default.folder.index({ activity: 'dataset' }), _actions2.default.file.index({ module: 'samplernn', generated: 1, limit: 15, orderBy: 'created_at desc' }), _actions2.default.file.index({ module: 'pix2pixhd', generated: 1, limit: 15, orderBy: 'created_at desc' }), _actions2.default.file.index({ module: 'morph', generated: 1, limit: 15, orderBy: 'created_at desc' })], function (percent, i, n) {\n      // console.log('dashboard load progress', i, n)\n      dispatch({\n        type: _types2.default.app.load_progress,\n        progress: { i: i, n: n },\n        data: { module: 'dashboard' }\n      });\n    }).then(function (res) {\n      var _res = _slicedToArray(res, 5),\n          tasks = _res[0],\n          folders = _res[1],\n          samplernn = _res[2],\n          pix2pixhd = _res[3],\n          morph = _res[4];\n\n      var _util$sort$orderByFn = _util2.default.sort.orderByFn('date desc'),\n          mapFn = _util$sort$orderByFn.mapFn,\n          sortFn = _util$sort$orderByFn.sortFn;\n\n      var foldersByModule = folders.map(mapFn).sort(sortFn).reduce(function (a, b) {\n        var module = b[1].module;\n        a[module] = a[module] || [];\n        a[module].push(b[1]);\n        return a;\n      }, {});\n      dispatch({\n        type: _types2.default.dashboard.load,\n        data: {\n          tasks: tasks,\n          folders: folders,\n          foldersByModule: foldersByModule,\n          renders: {\n            samplernn: samplernn,\n            pix2pixhd: pix2pixhd,\n            morph: morph\n          }\n        }\n      });\n    });\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _reactRedux = require('react-redux');\n\nvar _player = require('../common/player.component');\n\nvar _player2 = _interopRequireDefault(_player);\n\nvar _group = require('../common/group.component');\n\nvar _group2 = _interopRequireDefault(_group);\n\nvar _slider = require('../common/slider.component');\n\nvar _slider2 = _interopRequireDefault(_slider);\n\nvar _select = require('../common/select.component');\n\nvar _select2 = _interopRequireDefault(_select);\n\nvar _button = require('../common/button.component');\n\nvar _button2 = _interopRequireDefault(_button);\n\nvar _dashboardheader = require('./dashboardheader.component');\n\nvar _dashboardheader2 = _interopRequireDefault(_dashboardheader);\n\nvar _common = require('../common');\n\nvar _dashboard = require('./dashboard.actions');\n\nvar dashboardActions = _interopRequireWildcard(_dashboard);\n\nvar _audioPlayer = require('../common/audioPlayer/audioPlayer.actions');\n\nvar audioPlayerActions = _interopRequireWildcard(_audioPlayer);\n\nvar _modules = require('../modules');\n\nvar _modules2 = _interopRequireDefault(_modules);\n\nvar _actions = require('../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Dashboard = function (_Component) {\n  _inherits(Dashboard, _Component);\n\n  function Dashboard(props) {\n    _classCallCheck(this, Dashboard);\n\n    // console.log(props)\n    var _this = _possibleConstructorReturn(this, (Dashboard.__proto__ || Object.getPrototypeOf(Dashboard)).call(this));\n\n    props.actions.load();\n    return _this;\n  }\n\n  _createClass(Dashboard, [{\n    key: 'componentWillUpdate',\n    value: function componentWillUpdate(nextProps) {\n      // if (nextProps.opt.checkpoint_name && nextProps.opt.checkpoint_name !== this.props.opt.checkpoint_name) {\n      //   this.props.actions.list_epochs(nextProps.opt.checkpoint_name)\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      var _props = this.props,\n          loading = _props.loading,\n          progress = _props.progress,\n          site = _props.site,\n          foldersByModule = _props.foldersByModule,\n          renders = _props.renders,\n          queue = _props.queue,\n          images = _props.images;\n\n      if (loading) {\n        return (0, _preact.h)(_common.Loading, { progress: progress });\n      }\n      var tasks = queue.tasks;\n\n      var folders = foldersByModule && Object.keys(_modules2.default).sort().map(function (key) {\n        var path = key === 'samplernn' ? '/samplernn/datasets/' : '/' + key + '/sequences/';\n        var folder_list = (foldersByModule[key] || []).map(function (folder) {\n          return (0, _preact.h)(\n            'div',\n            { key: folder.id },\n            (0, _preact.h)(\n              _reactRouterDom.Link,\n              { to: path + folder.id + '/' },\n              folder.name\n            )\n          );\n        });\n\n        var files = renders[key] && (0, _preact.h)(_common.FileList, {\n          linkFiles: true,\n          files: renders[key],\n          orderBy: 'date desc',\n          fields: 'name date epoch size',\n          onClick: key === 'samplernn' ? function (file, e) {\n            e.preventDefault();\n            e.stopPropagation();\n            console.log('picked a file', file);\n            _this2.handlePick(file);\n          } : null\n        });\n\n        return (0, _preact.h)(\n          'div',\n          { className: 'dashboardModule', key: key },\n          (0, _preact.h)(\n            'div',\n            { className: 'row moduleHeading' },\n            (0, _preact.h)(\n              'h3',\n              null,\n              key\n            ),\n            (0, _preact.h)(\n              'div',\n              null,\n              (0, _preact.h)(\n                _reactRouterDom.Link,\n                { to: '/' + key + '/new/' },\n                'new'\n              )\n            ),\n            folder_list\n          ),\n          files\n        );\n      }).filter(function (a) {\n        return !!a;\n      });\n      return (0, _preact.h)(\n        'div',\n        { className: 'app dashboard' },\n        (0, _preact.h)(_dashboardheader2.default, null),\n        (0, _preact.h)(\n          'div',\n          { className: 'params row' },\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            !!queue.queue.length && (0, _preact.h)(\n              _group2.default,\n              { title: 'Upcoming Tasks' },\n              (0, _preact.h)(_common.TaskList, { tasks: queue.queue.map(function (id) {\n                  return tasks[id];\n                }) })\n            ),\n            !!queue.completed.length && (0, _preact.h)(\n              _group2.default,\n              { title: 'Completed Tasks' },\n              (0, _preact.h)(_common.TaskList, { tasks: queue.completed.map(function (id) {\n                  return tasks[id];\n                }) })\n            )\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            folders\n          )\n        )\n      );\n    }\n  }, {\n    key: 'handlePick',\n    value: function handlePick(file) {\n      this.props.audioPlayer.play(file);\n    }\n  }]);\n\n  return Dashboard;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    loading: state.dashboard.loading,\n    progress: state.dashboard.progress,\n    site: state.system.site,\n    foldersByModule: state.dashboard.data.foldersByModule,\n    renders: state.dashboard.data.renders,\n    images: state.dashboard.images,\n    files: state.dashboard.files,\n    queue: state.queue\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(dashboardActions, dispatch),\n    audioPlayer: (0, _redux.bindActionCreators)(audioPlayerActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Dashboard);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _moment = require('moment/min/moment.min');\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar FileSaver = require('file-saver');\n\nvar dashboardInitialState = {\n  loading: false,\n  progress: null,\n  error: null,\n  data: {},\n  images: [],\n  files: []\n};\n\nvar dashboardReducer = function dashboardReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : dashboardInitialState;\n  var action = arguments[1];\n\n  switch (action.type) {\n    case _types2.default.app.load_progress:\n      if (!action.data || action.data.module !== 'dashboard') {\n        return state;\n      }\n      return _extends({}, state, {\n        loading: true,\n        progress: action.progress\n      });\n    case _types2.default.dashboard.load:\n      return _extends({}, state, {\n        loading: false,\n        error: null,\n        data: action.data\n      });\n    default:\n      return state;\n  }\n};\n\nexports.default = dashboardReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nvar _redux = require('redux');\n\nvar _util = require('../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar DashboardHeader = function (_Component) {\n  _inherits(DashboardHeader, _Component);\n\n  function DashboardHeader(props) {\n    _classCallCheck(this, DashboardHeader);\n\n    var _this = _possibleConstructorReturn(this, (DashboardHeader.__proto__ || Object.getPrototypeOf(DashboardHeader)).call(this, props));\n\n    _this.handleClick = _this.handleClick.bind(_this);\n    return _this;\n  }\n\n  _createClass(DashboardHeader, [{\n    key: 'handleClick',\n    value: function handleClick(e) {\n      this.props.onClick && this.props.onClick();\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props = this.props,\n          site = _props.site,\n          runner = _props.runner;\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'dashboardHeader heading' },\n        (0, _preact.h)(\n          'h1',\n          null,\n          site.name,\n          ' cortex'\n        ),\n        this.renderStatus(\"GPU\", runner.gpu),\n        this.renderStatus(\"CPU\", runner.cpu)\n      );\n    }\n  }, {\n    key: 'renderStatus',\n    value: function renderStatus(name, gpu) {\n      if (gpu.status === 'IDLE') {\n        return (0, _preact.h)(\n          'div',\n          null,\n          name,\n          ' idle'\n        );\n      }\n      var task = gpu.task;\n      var activityPhrase = void 0,\n          liveMessage = void 0;\n      if (task.activity === 'live') {\n        return (0, _preact.h)(\n          'div',\n          null,\n          name,\n          ' running ',\n          (0, _preact.h)(\n            'b',\n            null,\n            task.module\n          ),\n          ' live on \"',\n          task.dataset,\n          '\"'\n        );\n      } else {\n        return (0, _preact.h)(\n          'div',\n          null,\n          name,\n          ' ',\n          _util2.default.gerund(task.activity),\n          ' ',\n          (0, _preact.h)(\n            'b',\n            null,\n            task.module\n          ),\n          ' on ',\n          (0, _preact.h)(\n            'b',\n            null,\n            task.dataset\n          ),\n          !!task.epoch && (0, _preact.h)(\n            'span',\n            null,\n            'Epoch: ',\n            task.epoch,\n            ' / ',\n            task.epochs,\n            (0, _preact.h)('br', null)\n          )\n        );\n      }\n    }\n  }]);\n\n  return DashboardHeader;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    runner: state.system.runner,\n    site: state.system.site\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {};\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(DashboardHeader);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.uploadFiles = exports.fetchURL = exports.uploadFile = exports.updateFolder = exports.createFolder = undefined;\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _actions = require('../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _api = require('../api');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar createFolder = exports.createFolder = function createFolder(module, name) {\n  return function (dispatch) {\n    return _actions2.default.folder.create({\n      // username... should get added inside the API\n      module: module.name,\n      datatype: module.datatype,\n      activity: 'dataset',\n      name: name\n    });\n  };\n}; // import socket from '../socket'\nvar updateFolder = exports.updateFolder = function updateFolder(module, folder, name) {\n  var opt = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n  return function (dispatch) {\n    if (!folder || !folder.id) {\n      return null;\n    }\n    return _actions2.default.folder.update({\n      id: folder.id,\n      module: module.name,\n      datatype: module.datatype,\n      activity: 'dataset',\n      name: name,\n      opt: opt\n    });\n  };\n};\n\nvar uploadFile = exports.uploadFile = function uploadFile(module, folder, file, filename, opt) {\n  return function (dispatch) {\n    var fd = new FormData();\n    fd.append('file', file, filename);\n    _actions2.default.folder.upload(fd, {\n      id: folder.id,\n      module: module.name,\n      activity: 'file',\n      epoch: 0,\n      processed: false,\n      generated: false,\n      opt: opt\n    });\n  };\n};\n\nvar fetchURL = exports.fetchURL = function fetchURL(module, folder, url) {\n  return function (dispatch) {\n    // name url\n    // mime datatype\n    // duration analysis\n    // size activity\n    // opt created_at updated_at\n    console.log(module, folder, url);\n    var seenURL = folder.files.some(function (file) {\n      return file.url === url;\n    });\n    console.log(seenURL);\n    if (seenURL) {\n      console.log('already seen this url');\n      return;\n    }\n    _api.parser.parse(url, function (media) {\n      if (!media) return;\n      console.log('media', media);\n      _actions2.default.file.create({\n        folder_id: folder.id,\n        name: (media.title || \"\").replace(/\\.[^.]+$/g, '').replace(/[^a-zA-Z0-9_]/g, '_').replace(/\\s+/g, '_').replace(/_+/g, '_'),\n        module: module.name,\n        dataset: media.token,\n        activity: 'url',\n        duration: parseInt(media.duration) || 0,\n        epoch: 0,\n        processed: false,\n        generated: false,\n        opt: media,\n        url: url\n      });\n    });\n  };\n};\n\nvar uploadFiles = exports.uploadFiles = function uploadFiles(files) {\n  return { type: _types2.default.dataset.upload_files };\n};\n\n// export const uploadFiles = (files) => {\n//   return dispatch => {\n//     // return { type: types.dataset.upload_files }\n//   }\n// }\n\n// export const fetchURL = (url) => { type: types.dataset.fetch_url }","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _actions = require('../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _fileList = require('../common/fileList.component');\n\nvar _loading = require('../common/loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar fieldSet = _util2.default.fieldSet(new Set(['input', 'status', 'checkpoint', 'output']));\n\nvar DatasetComponent = function (_Component) {\n  _inherits(DatasetComponent, _Component);\n\n  function DatasetComponent() {\n    _classCallCheck(this, DatasetComponent);\n\n    return _possibleConstructorReturn(this, (DatasetComponent.__proto__ || Object.getPrototypeOf(DatasetComponent)).apply(this, arguments));\n  }\n\n  _createClass(DatasetComponent, [{\n    key: 'render',\n    value: function render() {\n      var _props = this.props,\n          loading = _props.loading,\n          progress = _props.progress,\n          fields = _props.fields,\n          module = _props.module,\n          data = _props.data,\n          folder = _props.folder,\n          match = _props.match,\n          history = _props.history;\n\n      if (loading) {\n        return (0, _preact.h)(_loading2.default, { progress: progress });\n      }\n      if (!data.folders.length) {\n        console.log('no folders, redirect to /new');\n        return history.push('/' + module.name + '/new/');\n      }\n      if (!folder || !folder.name) return;\n      fields = fieldSet(fields);\n      return (0, _preact.h)(\n        'div',\n        { className: 'rows params datasets' },\n        (0, _preact.h)(\n          'div',\n          { className: 'row row-heading dataset' },\n          fields.has('input') && (0, _preact.h)(\n            'div',\n            { className: 'col' },\n            'input'\n          ),\n          fields.has('status') && (0, _preact.h)(\n            'div',\n            { className: 'col' },\n            'status'\n          ),\n          fields.has('checkpoint') && (0, _preact.h)(\n            'div',\n            { className: 'col' },\n            'checkpoint'\n          ),\n          fields.has('output') && (0, _preact.h)(\n            'div',\n            { className: 'col' },\n            'output'\n          )\n        ),\n        this.renderGroups()\n      );\n    }\n  }, {\n    key: 'renderGroups',\n    value: function renderGroups() {\n      var _this2 = this;\n\n      var _props2 = this.props,\n          module = _props2.module,\n          data = _props2.data,\n          folder = _props2.folder,\n          fields = _props2.fields,\n          runner = _props2.runner,\n          onPickDataset = _props2.onPickDataset,\n          onPickFile = _props2.onPickFile,\n          datasetActions = _props2.datasetActions;\n\n      fields = fieldSet(fields);\n      var datasetLookup = data.datasetLookup,\n          fileLookup = data.fileLookup;\n\n      if (!datasetLookup) {\n        return (0, _preact.h)('div', null);\n      }\n\n      var _util$sort$orderByFn = _util2.default.sort.orderByFn('date desc'),\n          mapFn = _util$sort$orderByFn.mapFn,\n          sortFn = _util$sort$orderByFn.sortFn;\n\n      var moduleOnCPU = runner && runner.cpu.task && runner.cpu.task.module === module.name;\n      var moduleOnGPU = runner && runner.gpu.task && runner.gpu.task.module === module.name;\n      var datasets = folder.datasets.map(function (name) {\n        return datasetLookup[name];\n      }).map(mapFn).sort(sortFn).map(function (pair) {\n        var dataset = pair[1];\n        var status = '';\n        var isProcessing = false,\n            isFetching = false;\n        if (moduleOnGPU && runner.gpu.task.dataset === dataset) {\n          status = _util2.default.gerund(runner.gpu.task.activity);\n          isProcessing = true;\n        } else if (moduleOnCPU && runner.cpu.task.activity === 'fetch' && runner.cpu.task.opt.file_id === dataset.input[0]) {\n          isProcessing = true;\n          isFetching = true;\n        }\n        return (0, _preact.h)(\n          'div',\n          { key: dataset.name, className: 'row dataset', onClick: function onClick() {\n              return onPickDataset && onPickDataset(dataset);\n            } },\n          _this2.props.beforeRow && _this2.props.beforeRow(dataset),\n          fields.has('input') && (0, _preact.h)(\n            'div',\n            { className: 'col' },\n            !!dataset.input.length && (0, _preact.h)(_fileList.FileList, {\n              files: dataset.input.map(function (id) {\n                return fileLookup[id];\n              }),\n              className: 'input_files',\n              fileListClassName: '',\n              rowClassName: 'input_file',\n              fields: 'name date size delete',\n              linkFiles: true,\n              onClick: onPickFile,\n              onDelete: function onDelete(file) {\n                return _this2.onDeleteFile(file);\n              }\n            })\n          ),\n          fields.has('status') && (0, _preact.h)(\n            'div',\n            { className: ['col', 'quiet', dataset.isBuilt ? 'built' : 'not_built', isProcessing ? 'processing' : 'not_processing'].join(' ') },\n            _this2.props.datasetActions && _this2.props.datasetActions(dataset, isFetching, isProcessing),\n            status\n          ),\n          fields.has('checkpoint') && (0, _preact.h)(\n            'div',\n            { className: 'col checkpoint' },\n            !!dataset.checkpoints.length && (0, _preact.h)(_fileList.FileRow, {\n              file: dataset.checkpoints[0],\n              fields: 'name date epoch',\n              className: 'row checkpoint'\n            })\n          ),\n          fields.has('output') && (0, _preact.h)(\n            'div',\n            { className: 'col' },\n            !!dataset.output.length && (0, _preact.h)(_fileList.FileList, {\n              files: dataset.output.map(function (id) {\n                return fileLookup[id];\n              }),\n              orderBy: 'epoch desc',\n              fields: 'name date epoch size',\n              linkFiles: true,\n              onClick: onPickFile,\n              onDelete: function onDelete(file) {\n                return _this2.onDeleteFile(file);\n              }\n            })\n          ),\n          _this2.props.afterRow && _this2.props.afterRow(dataset)\n        );\n      });\n      return datasets;\n    }\n  }, {\n    key: 'onDeleteFile',\n    value: function onDeleteFile(file) {\n      var yes = confirm('Are you sure you want to delete this file?');\n      if (yes) {\n        console.log('delete: confirmed');\n        if (this.props.onDeleteFile) {\n          console.log('calling custom deletefile function');\n          this.props.onDeleteFile(file);\n        } else {\n          _actions2.default.file.destroy(file);\n        }\n      }\n    }\n  }]);\n\n  return DatasetComponent;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    runner: state.system.runner\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {};\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(DatasetComponent);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _dataset = require('./dataset.actions');\n\nvar datasetActions = _interopRequireWildcard(_dataset);\n\nvar _group = require('../common/group.component');\n\nvar _group2 = _interopRequireDefault(_group);\n\nvar _param = require('../common/param.component');\n\nvar _param2 = _interopRequireDefault(_param);\n\nvar _fileList = require('../common/fileList.component');\n\nvar _fileUpload = require('../common/fileUpload.component');\n\nvar _fileUpload2 = _interopRequireDefault(_fileUpload);\n\nvar _textInput = require('../common/textInput.component');\n\nvar _textInput2 = _interopRequireDefault(_textInput);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar DatasetForm = function (_Component) {\n  _inherits(DatasetForm, _Component);\n\n  function DatasetForm() {\n    _classCallCheck(this, DatasetForm);\n\n    return _possibleConstructorReturn(this, (DatasetForm.__proto__ || Object.getPrototypeOf(DatasetForm)).apply(this, arguments));\n  }\n\n  _createClass(DatasetForm, [{\n    key: 'render',\n    value: function render() {\n      var _props = this.props,\n          loading = _props.loading,\n          status = _props.status,\n          error = _props.error,\n          module = _props.module,\n          folder = _props.folder,\n          _props$title = _props.title,\n          title = _props$title === undefined ? 'Dataset' : _props$title,\n          canRename = _props.canRename,\n          canUpload = _props.canUpload,\n          canAddURL = _props.canAddURL;\n      // sort files??\n\n      if (!folder.id) {\n        return (0, _preact.h)(\n          'div',\n          { className: 'params row' },\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            this.renderFolderNameInput(folder.name)\n          )\n        );\n      }\n      return (0, _preact.h)(\n        'div',\n        { className: 'form params row' },\n        (0, _preact.h)(\n          'div',\n          { className: 'col' },\n          (0, _preact.h)(\n            _group2.default,\n            null,\n            canRename && this.renderFolderNameInput(folder.name),\n            canUpload && this.renderUploadInput(),\n            canAddURL && this.renderURLInput()\n          )\n        )\n      );\n    }\n  }, {\n    key: 'curry',\n    value: function curry(action) {\n      var _props2 = this.props,\n          module = _props2.module,\n          folder = _props2.folder;\n\n      return function (param) {\n        return action(module, folder, param);\n      };\n    }\n  }, {\n    key: 'renderFolderNameInput',\n    value: function renderFolderNameInput(name) {\n      return (0, _preact.h)(_textInput2.default, {\n        title: 'Dataset name',\n        value: name,\n        onSave: this.curry(this.props.actions.dataset.updateFolder)\n      });\n    }\n  }, {\n    key: 'renderUploadInput',\n    value: function renderUploadInput() {\n      return (0, _preact.h)(_fileUpload2.default, {\n        title: 'Upload a file',\n        mime: 'image.*',\n        onUpload: this.curry(this.props.actions.dataset.uploadFile)\n      });\n    }\n  }, {\n    key: 'renderURLInput',\n    value: function renderURLInput() {\n      return (0, _preact.h)(_textInput2.default, {\n        title: 'Fetch a URL',\n        placeholder: 'http://',\n        onSave: this.curry(this.props.actions.dataset.fetchURL)\n      });\n    }\n  }]);\n\n  return DatasetForm;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return state.upload;\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: {\n      dataset: (0, _redux.bindActionCreators)(datasetActions, dispatch)\n    }\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(DatasetForm);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.load = exports.getDataset = exports.emptyDataset = exports.unsortedFolder = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _actions = require('../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar unsortedFolders = {};\n\nvar unsortedFolder = exports.unsortedFolder = function unsortedFolder(module) {\n  var instantiate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n  if (!unsortedFolders[module] || instantiate) {\n    var folder = {\n      id: 0,\n      module: module,\n      name: 'unsorted',\n      files: [],\n      datasets: []\n    };\n    unsortedFolders[module] = folder;\n  }\n  return unsortedFolders[module];\n};\n\nvar emptyDataset = exports.emptyDataset = function emptyDataset(module, datasetLookup, name, folder) {\n  var dataset = {\n    name: name,\n    input: [],\n    checkpoints: [],\n    output: []\n  };\n  datasetLookup[name] = dataset;\n  folder = folder || unsortedFolder(module);\n  folder.datasets.push(name);\n  return dataset;\n};\n\nvar getDataset = exports.getDataset = function getDataset(module, datasetLookup, name, folder, date) {\n  name = name.toLowerCase();\n  var dataset = datasetLookup[name] || emptyDataset(module, datasetLookup, name, folder);\n  // folder = folder || unsortedFolder(module)\n  if (date) {\n    dataset.date = dataset.date && !isNaN(dataset.date) ? Math.max(+new Date(date), dataset.date) : +new Date(date);\n  }\n  return dataset;\n};\n\nvar load = exports.load = function load(module) {\n  console.log(module);\n  return Promise.all([_actions2.default.folder.index({ module: module, limit: 0 }), _actions2.default.file.index({ module: module, limit: 0 }), _actions2.default.task.index({ module: module })]).then(function (res) {\n    var _res = _slicedToArray(res, 3),\n        folders = _res[0],\n        files = _res[1],\n        tasks = _res[2];\n\n    var datasetLookup = {};\n    var folderLookup = {};\n    var fileLookup = {};\n\n    var resultsFolder = void 0;\n\n    // take all of the folders and put them in a lookup\n    folderLookup = folders.reduce(function (folderLookup, folder) {\n      folderLookup[folder.id] = {\n        id: folder.id,\n        name: folder.name,\n        folder: folder,\n        files: [],\n        datasets: []\n      };\n      if (folder.name === 'results') {\n        resultsFolder = folder;\n      }\n      return folderLookup;\n    }, {\n      unsorted: unsortedFolder(module, true)\n    });\n\n    if (!resultsFolder) {\n      console.log('creating results folder...');\n      _actions2.default.folder.create({\n        module: module,\n        name: 'results',\n        activity: 'results'\n      }).then(function (folder) {\n        console.log('created folder', folder);\n        folderLookup.results = folder;\n      });\n    } else {\n      console.log('got results folder', resultsFolder);\n    }\n\n    // prepare the files by splitting into two groups\n    var generatedFiles = files.filter(function (file) {\n      return file.generated;\n    });\n    var ungeneratedFiles = files.filter(function (file) {\n      return !file.generated;\n    });\n\n    // build the initial dataset lookup table using the ungenerated files\n    ungeneratedFiles.reduce(function (datasetLookup, file) {\n      fileLookup[file.id] = file;\n      if (!file.name) {\n        if (file.opt && file.opt.media && file.opt.media.token) {\n          file.name = file.opt.media.token;\n        } else {\n          file.name = file.url.replace(/^https?:\\/\\/(www.)?/, '').replace(/[^a-zA-Z0-9_]/g, '_').replace(/_+/g, '_') || 'unknown_' + Math.floor(1000 * Math.random());\n        }\n      }\n      var name = (file.name || 'unsorted').split('.')[0];\n      var folder = folderLookup[file.folder_id] || unsortedFolder(module);\n      var dataset = getDataset(module, datasetLookup, file.dataset || name, folder, file.date || file.created_at);\n      if (file.url.match(file.name)) file.persisted = true;\n      dataset.input.push(file.id);\n      folder.files.push(file.id);\n      return datasetLookup;\n    }, datasetLookup);\n\n    // go over the generated files and add addl datasets (if the files were deleted)\n    generatedFiles.map(function (file) {\n      fileLookup[file.id] = file;\n      var pair = file.name.split('.')[0].split('-');\n      var folder = folderLookup[file.folder_id] || unsortedFolder(module);\n      var dataset = getDataset(module, datasetLookup, file.dataset || pair[0], folder, file.date || file.created_at);\n      dataset.output.push(file.id);\n      folder.files.push(file.id);\n      file.epoch = file.epoch || pair[1];\n    });\n\n    return {\n      folderLookup: folderLookup,\n      fileLookup: fileLookup,\n      datasetLookup: datasetLookup,\n      folders: folders,\n      files: files,\n      unsortedFolder: folderLookup.unsorted,\n      resultsFolder: resultsFolder\n    };\n  }).catch(function (e) {\n    console.error(e);\n  });\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _dataset = require('./dataset.actions');\n\nvar datasetActions = _interopRequireWildcard(_dataset);\n\nvar _loading = require('../common/loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nvar _textInput = require('../common/textInput.component');\n\nvar _textInput2 = _interopRequireDefault(_textInput);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction NewDatasetForm(props) {\n  var loading = props.loading,\n      status = props.status,\n      error = props.error,\n      history = props.history,\n      actions = props.actions,\n      module = props.module;\n\n  if (loading) return (0, _preact.h)(_loading2.default, null);\n  console.log(props);\n  return (0, _preact.h)(\n    'div',\n    { className: 'opaque' },\n    (0, _preact.h)(\n      'div',\n      { className: 'heading' },\n      (0, _preact.h)(\n        'h2',\n        null,\n        'Create a new ',\n        module.displayName,\n        ' project'\n      )\n    ),\n    (0, _preact.h)(\n      'div',\n      { className: 'params' },\n      (0, _preact.h)(_textInput2.default, {\n        autofocus: true,\n        title: 'Name your project',\n        onSave: function onSave(name) {\n          actions.createFolder(module, name).then(function (folder) {\n            window.location.href = '/' + module.name + '/datasets/' + folder.id + '/';\n          });\n        }\n      })\n    )\n  );\n}\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {};\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(datasetActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(NewDatasetForm);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/*\n  Note:\n  This is a sub-reducer intended to process the folder-file API output from the DB.\n  Please run this from inside your module reducers :) \n*/\n\nvar datasetInitialState = function datasetInitialState() {\n  return {\n    loading: true,\n    progress: null,\n    error: null,\n    data: null,\n    folder_id: 0\n  };\n};\n\nvar datasetReducer = function datasetReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : datasetInitialState();\n  var action = arguments[1];\n\n  switch (action.type) {\n    case _types2.default.app.load_progress:\n      return _extends({}, state, {\n        progress: action.progress\n      });\n\n    case _types2.default.dataset.load:\n      return _extends({}, state, {\n        loading: false,\n        data: action.data\n      });\n\n    case _types2.default.dataset.set_folder:\n      return _extends({}, state, {\n        folder_id: action.data.folder_id\n      });\n\n    case _types2.default.folder.create:\n      return _extends({}, state, {\n        loading: false,\n        data: {\n          folders: state.data.folders.concat([action.data.id]),\n          folderLookup: _extends({}, state.data.folderLookup, _defineProperty({}, action.data.id, action.data))\n        }\n      });\n      return state;\n\n    case _types2.default.file.create:\n      return handleFileCreate(state, action);\n\n    case _types2.default.file.update:\n      return handleFileUpdate(state, action);\n\n    case _types2.default.file.destroy:\n      return handleFileDestroy(state, action);\n\n    case _types2.default.dataset.list_epochs:\n      return _extends({}, state, {\n        data: _extends({}, state.data, {\n          epochs: action.data.epochs\n        })\n      });\n\n    default:\n      return state;\n  }\n};\n\nfunction handleFileCreate(state, action) {\n  console.log(action.data);\n  if (!state.data || !state.data.datasetLookup) return state;\n  var dataset = void 0,\n      old_dataset = void 0,\n      folder = void 0,\n      old_folder = void 0;\n  var dataset_name = void 0;\n  if (action.data.dataset) {\n    dataset_name = action.data.dataset;\n  } else if (action.data.name) {\n    dataset_name = action.data.name.split('.')[0];\n  } else if (action.data.url) {\n    dataset_name = action.data.url;\n  } else {\n    dataset_name = null;\n  }\n  if (dataset_name in state.data.datasetLookup) {\n    old_dataset = state.data.datasetLookup[dataset_name];\n    dataset = _extends({}, old_dataset, {\n      input: action.data.generated ? old_dataset.input : [action.data.id].concat(old_dataset.input),\n      output: !action.data.generated ? old_dataset.output : [action.data.id].concat(old_dataset.output)\n    });\n  } else {\n    console.log(action.data.created_at, action.data.date);\n    dataset = {\n      name: dataset_name,\n      date: action.data.created_at || action.data.date,\n      input: action.data.generated ? [] : [action.data.id],\n      checkpoints: [],\n      output: !action.data.generated ? [] : [action.data.id]\n    };\n  }\n  old_folder = state.data.folderLookup[action.data.folder_id];\n  folder = _extends({}, old_folder, {\n    datasets: old_folder.datasets.concat([dataset_name]),\n    files: old_folder.files.concat([action.data.id])\n  });\n  return _extends({}, state, {\n    loading: false,\n    data: _extends({}, state.data, {\n      files: state.data.files.concat([action.data.id]),\n      folderLookup: _extends({}, state.data.folderLookup, _defineProperty({}, action.data.folder_id, folder)),\n      fileLookup: _extends({}, state.data.fileLookup, _defineProperty({}, action.data.id, action.data)),\n      datasetLookup: _extends({}, state.data.datasetLookup, _defineProperty({}, dataset_name, dataset))\n    })\n  });\n}\n\nfunction handleFileUpdate(state, action) {\n  var _extends6;\n\n  var old_dataset = void 0;\n  var new_dataset = state.data.datasetLookup[action.data.dataset];\n  var old_file = state.data.fileLookup[action.data.id];\n  var new_dataset_update = void 0;\n  if (old_file && action.data.dataset !== old_file.dataset) {\n    if (state.data.datasetLookup[old_file.dataset]) {\n      old_dataset = state.data.datasetLookup[old_file.dataset];\n      old_dataset_update = _extends({}, old_dataset, {\n        input: old_dataset.input.filter(function (id) {\n          return id !== action.data.id;\n        }),\n        output: old_dataset.output.filter(function (id) {\n          return id !== action.data.id;\n        })\n      });\n    }\n    new_dataset_update = _extends({}, new_dataset, {\n      input: action.data.generated ? [] : [action.data.id],\n      output: !action.data.generated ? [] : [action.data.id]\n    });\n  }\n  console.log('old_dataset', old_dataset_update.name);\n  console.log('new_dataset', new_dataset_update.name);\n  return _extends({}, state, {\n    loading: false,\n    data: _extends({}, state.data, {\n      datasetLookup: old_dataset ? _extends({}, state.data.datasetLookup, (_extends6 = {}, _defineProperty(_extends6, old_dataset.name, old_dataset_update), _defineProperty(_extends6, new_dataset.name, new_dataset_update), _extends6)) : new_dataset_update ? _extends({}, state.data.datasetLookup, _defineProperty({}, new_dataset.name, new_dataset_update)) : state.data.datasetLookup,\n      fileLookup: _extends({}, state.data.fileLookup, _defineProperty({}, action.data.id, action.data))\n    })\n  });\n  return state;\n}\n\nfunction handleFileDestroy(state, action) {\n  if (!state.data) return state;\n  // delete the key from fileLookup\n  var fileLookup = _extends({}, state.data.fileLookup);\n  var datasetLookup = _extends({}, state.data.datasetLookup);\n  var folderLookup = _extends({}, state.data.folderLookup);\n  var old_file = fileLookup[action.data.id];\n  if (!old_file) return state;\n  var old_dataset = state.data.datasetLookup[old_file.dataset];\n  var dataset = void 0;\n  if (old_dataset) {\n    dataset = _extends({}, old_dataset, {\n      input: old_dataset.input.filter(function (id) {\n        return id !== old_file.id;\n      }),\n      output: old_dataset.output.filter(function (id) {\n        return id !== old_file.id;\n      })\n    });\n    if (!dataset.input.length && !dataset.checkpoints.length && !dataset.output.length) {\n      delete datasetLookup[old_file.dataset];\n      var old_folder = folderLookup[old_file.folder_id];\n      folderLookup[old_file.folder_id] = _extends({}, old_folder, {\n        datasets: old_folder.datasets.filter(function (name) {\n          return name !== old_file.dataset;\n        })\n      });\n    } else {\n      console.log('dataset just needs sweeping');\n      datasetLookup[old_file.dataset] = dataset;\n    }\n  }\n  delete fileLookup[old_file.id];\n\n  return _extends({}, state, {\n    loading: false,\n    data: _extends({}, state.data, {\n      folderLookup: folderLookup,\n      fileLookup: fileLookup,\n      datasetLookup: datasetLookup\n    })\n  });\n}\n\nexports.default = datasetReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar uploadInitialState = {\n  loading: false,\n  error: null,\n  status: ''\n};\n\nvar uploadReducer = function uploadReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : uploadInitialState;\n  var action = arguments[1];\n\n  switch (action.type) {\n    case _types2.default.folder.upload_loading:\n      return {\n        error: null,\n        loading: true,\n        status: 'Loading...'\n      };\n    case _types2.default.folder.upload_error:\n      return {\n        error: null,\n        loading: false,\n        status: 'Error uploading :('\n      };\n    case _types2.default.folder.upload_progress:\n      return {\n        error: null,\n        loading: true,\n        status: 'Upload progress ' + action.percent + '%'\n      };\n    case _types2.default.folder.upload_waiting:\n      return {\n        error: null,\n        loading: true,\n        status: 'Waiting for server to finish processing...'\n      };\n    case _types2.default.folder.upload_complete:\n      return {\n        error: null,\n        loading: false,\n        status: 'Upload complete'\n      };\n    case _types2.default.file.create_loading:\n      return {\n        error: null,\n        loading: true,\n        status: 'Creating file...'\n      };\n    default:\n      return state;\n  }\n};\n\nexports.default = uploadReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _loading = require('../common/loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction UploadStatus(props) {\n  return (0, _preact.h)(\n    'div',\n    { className: 'status' },\n    props.status\n  );\n}\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return state.upload;\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {};\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(UploadStatus);","'use strict';\n\nvar _preact = require('preact');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _store = require('./store');\n\nvar _socket = require('./socket');\n\nvar socket = _interopRequireWildcard(_socket);\n\nvar _util = require('./util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _auth = require('./auth');\n\nvar _auth2 = _interopRequireDefault(_auth);\n\nvar _common = require('./common');\n\nvar _system = require('./system/system.component');\n\nvar _system2 = _interopRequireDefault(_system);\n\nvar _dashboard = require('./dashboard/dashboard.component');\n\nvar _dashboard2 = _interopRequireDefault(_dashboard);\n\nvar _modules = require('./modules');\n\nvar _modules2 = _interopRequireDefault(_modules);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nvar module_list = Object.keys(_modules2.default).map(function (name) {\n  var module = _modules2.default[name];\n  return (0, _preact.h)(_reactRouterDom.Route, { path: '/' + module.name, component: module.router });\n});\n\nvar ModuleRouter = function ModuleRouter() {\n  return (0, _preact.h)(_reactRouterDom.Switch, null);\n};\n\nvar app = (0, _preact.h)(\n  _reactRedux.Provider,\n  { store: _store.store },\n  (0, _preact.h)(\n    _auth2.default.Gate,\n    null,\n    (0, _preact.h)(\n      _reactRouterDom.BrowserRouter,\n      null,\n      (0, _preact.h)(\n        'div',\n        { className: 'everybody' },\n        (0, _preact.h)(_reactRouterDom.Route, { path: '/', children: function children(props) {\n            return (0, _preact.h)(\n              'div',\n              null,\n              console.log(props.location.pathname)\n            );\n          } }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/system', component: _system2.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/dashboard', component: _dashboard2.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/browse', component: _common.Browser }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/logout', component: _auth2.default.Logout }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/login', component: function component() {\n            (0, _preact.h)(_reactRouterDom.Redirect, { to: '/' });\n          } }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/signup', component: function component() {\n            (0, _preact.h)(_reactRouterDom.Redirect, { to: '/' });\n          } }),\n        module_list,\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/', component: _dashboard2.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { path: '/', component: _common.Header })\n      )\n    ),\n    (0, _preact.h)(_common.AudioPlayer, null)\n  )\n);\n\n(0, _preact.render)(app, document.getElementById('container'));","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.play = exports.pause = exports.seek = exports.load_epoch = exports.load_sequence = exports.list_sequences = exports.list_epochs = exports.list_checkpoints = exports.set_fullscreen = exports.set_param = exports.get_params = undefined;\n\nvar _socket = require('../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _player = require('./player');\n\nvar player = _interopRequireWildcard(_player);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar get_params = exports.get_params = function get_params() {\n  _socket2.default.live.get_params();\n  return { type: _types2.default.player.get_params };\n};\n\nvar set_param = exports.set_param = function set_param(key, value) {\n  console.log('set param', key, value);\n  _socket2.default.live.set_param(key, value);\n  return { type: _types2.default.player.set_param, key: key, value: value };\n};\n\nvar set_fullscreen = exports.set_fullscreen = function set_fullscreen(value) {\n  return { type: _types2.default.player.set_fullscreen, value: value };\n};\n\nvar list_checkpoints = exports.list_checkpoints = function list_checkpoints(module) {\n  _socket2.default.live.list_checkpoints(module);\n  return { type: _types2.default.player.loading_checkpoints };\n};\n\nvar list_epochs = exports.list_epochs = function list_epochs(module, checkpoint) {\n  _socket2.default.live.list_epochs(module, checkpoint);\n  return { type: _types2.default.player.loading_epochs };\n};\n\nvar list_sequences = exports.list_sequences = function list_sequences(module) {\n  _socket2.default.live.list_sequences(module);\n  return { type: _types2.default.player.loading_sequences };\n};\n\nvar load_sequence = exports.load_sequence = function load_sequence(sequence_name) {\n  _socket2.default.live.load_sequence(sequence_name);\n  return { type: _types2.default.player.loading_sequence, sequence_name: sequence_name };\n};\n\nvar load_epoch = exports.load_epoch = function load_epoch(checkpoint_name, epoch) {\n  _socket2.default.live.load_epoch(checkpoint_name, epoch);\n  return { type: _types2.default.player.loading_checkpoint, checkpoint_name: checkpoint_name, epoch: epoch };\n};\n\nvar seek = exports.seek = function seek(frame) {\n  _socket2.default.live.seek(frame);\n  return { type: _types2.default.player.seeking };\n};\n\nvar pause = exports.pause = function pause(frame) {\n  _socket2.default.live.pause(pause);\n  player.toggleFPS(false);\n  return { type: _types2.default.player.pausing };\n};\n\nvar play = exports.play = function play(frame) {\n  _socket2.default.live.play();\n  player.toggleFPS(true);\n  return { type: _types2.default.player.playing };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _moment = require('moment/min/moment.min');\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nvar _fileSaver = require('file-saver');\n\nvar _fileSaver2 = _interopRequireDefault(_fileSaver);\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar liveInitialState = {\n  loading: false,\n  error: null,\n  opt: {\n    hue: 0, saturation: 0, luminosity: 0,\n    sequence_playing: true, sequence_step: 1,\n    recurse_roll: 0, rotate: 0, scale: 0, process_frac: 0.5,\n    view_mode: 'b'\n  },\n  all_checkpoints: [],\n  checkpoints: [],\n  epochs: ['latest'],\n  sequences: [],\n  fps: 0,\n  playing: false,\n  last_message: '',\n  fullscreen: false,\n  frame: { i: 0, sequence_i: 0, sequence_len: '1' }\n};\n\nvar liveReducer = function liveReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : liveInitialState;\n  var action = arguments[1];\n\n  var results = void 0;\n  switch (action.type) {\n    case _types2.default.socket.load_params:\n      if (!action.opt || !Object.keys(action.opt).length) {\n        return state;\n      }\n      return _extends({}, state, {\n        loading: false,\n        error: null,\n        opt: action.opt\n      });\n\n    case _types2.default.player.set_param:\n      return _extends({}, state, {\n        opt: _extends({}, state.opt, _defineProperty({}, action.key, action.value))\n      });\n\n    case _types2.default.player.set_fullscreen:\n      return _extends({}, state, {\n        fullscreen: action.value\n      });\n\n    case _types2.default.socket.list_checkpoints:\n      return _extends({}, state, {\n        checkpoints: action.checkpoints,\n        epochs: []\n      });\n\n    case _types2.default.socket.list_all_checkpoints:\n      return _extends({}, state, {\n        all_checkpoints: action.all_checkpoints,\n        epochs: []\n      });\n\n    case _types2.default.socket.list_epochs:\n      console.log(action);\n      if (action.epochs === \"not found\") return _extends({}, state, { epochs: [] });\n      return _extends({}, state, {\n        epochs: (action.epochs || []).map(function (a) {\n          return [a == 'latest' ? Infinity : a, a];\n        }).sort(function (a, b) {\n          return a[0] - b[0];\n        }).map(function (a) {\n          return a[1];\n        })\n      });\n\n    case _types2.default.socket.list_sequences:\n      return _extends({}, state, {\n        sequences: action.sequences\n      });\n\n    case _types2.default.player.loading_sequence:\n      return _extends({}, state, {\n        opt: _extends({}, state.opt, {\n          sequence_name: action.sequence_name\n        })\n      });\n\n    case _types2.default.player.loading_checkpoint:\n      return _extends({}, state, {\n        opt: _extends({}, state.opt, {\n          checkpoint_name: action.checkpoint_name,\n          epoch: action.epoch\n        })\n      });\n\n    case _types2.default.player.set_fps:\n      return _extends({}, state, {\n        fps: action.fps\n      });\n\n    case _types2.default.system.stdout:\n      if (action.data.processor === 'gpu') {\n        return _extends({}, state, {\n          last_message: action.data.data\n        });\n      }\n      return state;\n\n    case _types2.default.player.current_frame:\n      return action.meta ? _extends({}, state, {\n        frame: action.meta\n      }) : state;\n\n    case _types2.default.player.pausing:\n      return _extends({}, state, {\n        playing: false\n      });\n\n    case _types2.default.player.playing:\n      return _extends({}, state, {\n        playing: true\n      });\n\n    case _types2.default.player.start_recording:\n      return _extends({}, state, {\n        opt: _extends({}, state.opt, {\n          recording: true\n        })\n      });\n    case _types2.default.player.add_record_frame:\n      return _extends({}, state, {\n        opt: _extends({}, state.opt, {\n          recordFrames: (state.opt.recordFrames || 0) + 1\n        })\n      });\n    case _types2.default.player.save_frame:\n      _fileSaver2.default.saveAs(action.blob, state.opt.checkpoint_name + \"_\" + state.opt.sequence + \"_\" + (0, _moment2.default)().format(\"YYYYMMDD_HHmm\") + \".png\");\n      return state;\n\n    case _types2.default.player.saving_video:\n      return _extends({}, state, {\n        opt: _extends({}, state.opt, {\n          savingVideo: true\n        })\n      });\n    case _types2.default.player.save_video:\n      _fileSaver2.default.saveAs(action.blob, state.opt.checkpoint_name + \"_\" + state.opt.sequence + \"_\" + (0, _moment2.default)().format(\"YYYYMMDD_HHmm\") + \".webm\");\n      return _extends({}, state, {\n        opt: _extends({}, state.opt, {\n          recording: false,\n          savingVideo: false,\n          recordFrames: 0\n        })\n      });\n\n    default:\n      return state;\n  }\n};\n\nexports.default = liveReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.startSynthesizing = startSynthesizing;\nexports.stopSynthesizing = stopSynthesizing;\nexports.startRecording = startRecording;\nexports.stopRecording = stopRecording;\nexports.saveFrame = saveFrame;\nexports.onFrame = onFrame;\nexports.toggleFPS = toggleFPS;\nexports.startWatchingFPS = startWatchingFPS;\nexports.stopWatchingFPS = stopWatchingFPS;\n\nvar _store = require('../store');\n\nvar _whammy = require('./whammy');\n\nvar _whammy2 = _interopRequireDefault(_whammy);\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _pix2wav = require('../audio/pix2wav');\n\nvar pix2wav = _interopRequireWildcard(_pix2wav);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar fps = 0,\n    last_frame = void 0;\nvar recording = false,\n    saving = false,\n    synthesizing = false;\nvar videoWriter = void 0;\n\nfunction startSynthesizing() {\n  synthesizing = true;\n}\nfunction stopSynthesizing() {\n  synthesizing = false;\n}\n\nfunction startRecording() {\n  videoWriter = new _whammy2.default.Video(25, 0.95);\n  recording = true;\n  _store.store.dispatch({\n    type: _types2.default.player.start_recording\n  });\n}\n\nfunction stopRecording() {\n  if (!recording) return;\n  recording = false;\n  _store.store.dispatch({\n    type: _types2.default.player.saving_video\n  });\n  videoWriter.compile(false, function (blob) {\n    // console.log(blob)\n    _store.store.dispatch({\n      type: _types2.default.player.save_video,\n      blob: blob\n    });\n  });\n}\n\nfunction saveFrame() {\n  saving = true;\n}\n\nfunction onFrame(data) {\n  var blob = new Blob([data.frame], { type: 'image/jpg' });\n  var url = URL.createObjectURL(blob);\n  var img = new Image();\n  var canvas = document.querySelector('.player canvas');\n  if (!canvas) return console.error('no canvas for frame');\n  img.onload = function () {\n    img.onload = null;\n    last_frame = data.meta;\n    URL.revokeObjectURL(url);\n    var ctx = canvas.getContext('2d-lodpi');\n    ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n    if (synthesizing) {\n      var imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);\n      pix2wav.play({ imageData: imageData });\n    }\n    if (recording) {\n      console.log('record frame');\n      videoWriter.add(canvas);\n      _store.store.dispatch({\n        type: _types2.default.player.add_record_frame\n      });\n    }\n    if (saving) {\n      saving = false;\n      canvas.toBlob(function (blob) {\n        _store.store.dispatch({\n          type: _types2.default.player.save_frame,\n          blob: blob\n        });\n      });\n    }\n    fps += 1;\n  };\n  img.src = url;\n}\n\nvar previousValue = void 0,\n    currentValue = void 0;\nfunction toggleFPS(state) {\n  currentValue = typeof state !== 'undefined' ? state : _store.store.getState().live.playing;\n  if (previousValue !== currentValue) {\n    if (currentValue) {\n      startWatchingFPS();\n    } else {\n      stopWatchingFPS();\n    }\n  }\n  previousValue = currentValue;\n}\n\nvar fpsInterval = void 0;\n\nfunction startWatchingFPS() {\n  clearInterval(fpsInterval);\n  fpsInterval = setInterval(function () {\n    _store.store.dispatch({\n      type: _types2.default.player.set_fps,\n      fps: fps\n    });\n    _store.store.dispatch({\n      type: _types2.default.player.current_frame,\n      meta: last_frame\n    });\n    fps = 0;\n  }, 1000);\n}\nfunction stopWatchingFPS() {\n  clearInterval(fpsInterval);\n}","\"use strict\";\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nmodule.exports = function () {\n  // in this case, frames has a very specific meaning, which will be\n  // detailed once i finish writing the code\n\n  function toWebM(frames, outputAsArray) {\n    var info = checkFrames(frames);\n\n    //max duration by cluster in milliseconds\n    var CLUSTER_MAX_DURATION = 30000;\n\n    var EBML = [{\n      \"id\": 0x1a45dfa3, // EBML\n      \"data\": [{\n        \"data\": 1,\n        \"id\": 0x4286 // EBMLVersion\n      }, {\n        \"data\": 1,\n        \"id\": 0x42f7 // EBMLReadVersion\n      }, {\n        \"data\": 4,\n        \"id\": 0x42f2 // EBMLMaxIDLength\n      }, {\n        \"data\": 8,\n        \"id\": 0x42f3 // EBMLMaxSizeLength\n      }, {\n        \"data\": \"webm\",\n        \"id\": 0x4282 // DocType\n      }, {\n        \"data\": 2,\n        \"id\": 0x4287 // DocTypeVersion\n      }, {\n        \"data\": 2,\n        \"id\": 0x4285 // DocTypeReadVersion\n      }]\n    }, {\n      \"id\": 0x18538067, // Segment\n      \"data\": [{\n        \"id\": 0x1549a966, // Info\n        \"data\": [{\n          \"data\": 1e6, //do things in millisecs (num of nanosecs for duration scale)\n          \"id\": 0x2ad7b1 // TimecodeScale\n        }, {\n          \"data\": \"whammy\",\n          \"id\": 0x4d80 // MuxingApp\n        }, {\n          \"data\": \"whammy\",\n          \"id\": 0x5741 // WritingApp\n        }, {\n          \"data\": doubleToString(info.duration),\n          \"id\": 0x4489 // Duration\n        }]\n      }, {\n        \"id\": 0x1654ae6b, // Tracks\n        \"data\": [{\n          \"id\": 0xae, // TrackEntry\n          \"data\": [{\n            \"data\": 1,\n            \"id\": 0xd7 // TrackNumber\n          }, {\n            \"data\": 1,\n            \"id\": 0x73c5 // TrackUID\n          }, {\n            \"data\": 0,\n            \"id\": 0x9c // FlagLacing\n          }, {\n            \"data\": \"und\",\n            \"id\": 0x22b59c // Language\n          }, {\n            \"data\": \"V_VP8\",\n            \"id\": 0x86 // CodecID\n          }, {\n            \"data\": \"VP8\",\n            \"id\": 0x258688 // CodecName\n          }, {\n            \"data\": 1,\n            \"id\": 0x83 // TrackType\n          }, {\n            \"id\": 0xe0, // Video\n            \"data\": [{\n              \"data\": info.width,\n              \"id\": 0xb0 // PixelWidth\n            }, {\n              \"data\": info.height,\n              \"id\": 0xba // PixelHeight\n            }]\n          }]\n        }]\n      }, {\n        \"id\": 0x1c53bb6b, // Cues\n        \"data\": [\n          //cue insertion point\n        ]\n\n        //cluster insertion point\n      }]\n    }];\n\n    var segment = EBML[1];\n    var cues = segment.data[2];\n\n    //Generate clusters (max duration)\n    var frameNumber = 0;\n    var clusterTimecode = 0;\n    while (frameNumber < frames.length) {\n\n      var cuePoint = {\n        \"id\": 0xbb, // CuePoint\n        \"data\": [{\n          \"data\": Math.round(clusterTimecode),\n          \"id\": 0xb3 // CueTime\n        }, {\n          \"id\": 0xb7, // CueTrackPositions\n          \"data\": [{\n            \"data\": 1,\n            \"id\": 0xf7 // CueTrack\n          }, {\n            \"data\": 0, // to be filled in when we know it\n            \"size\": 8,\n            \"id\": 0xf1 // CueClusterPosition\n          }]\n        }]\n      };\n\n      cues.data.push(cuePoint);\n\n      var clusterFrames = [];\n      var clusterDuration = 0;\n      do {\n        clusterFrames.push(frames[frameNumber]);\n        clusterDuration += frames[frameNumber].duration;\n        frameNumber++;\n      } while (frameNumber < frames.length && clusterDuration < CLUSTER_MAX_DURATION);\n\n      var clusterCounter = 0;\n      var cluster = {\n        \"id\": 0x1f43b675, // Cluster\n        \"data\": [{\n          \"data\": Math.round(clusterTimecode),\n          \"id\": 0xe7 // Timecode\n        }].concat(clusterFrames.map(function (webp) {\n          var block = makeSimpleBlock({\n            discardable: 0,\n            frame: webp.data.slice(4),\n            invisible: 0,\n            keyframe: 1,\n            lacing: 0,\n            trackNum: 1,\n            timecode: Math.round(clusterCounter)\n          });\n          clusterCounter += webp.duration;\n          return {\n            data: block,\n            id: 0xa3\n          };\n        }))\n\n        //Add cluster to segment\n      };segment.data.push(cluster);\n      clusterTimecode += clusterDuration;\n    }\n\n    //First pass to compute cluster positions\n    var position = 0;\n    for (var i = 0; i < segment.data.length; i++) {\n      if (i >= 3) {\n        cues.data[i - 3].data[1].data[1].data = position;\n      }\n      var data = generateEBML([segment.data[i]], outputAsArray);\n      position += data.size || data.byteLength || data.length;\n      if (i != 2) {\n        // not cues\n        //Save results to avoid having to encode everything twice\n        segment.data[i] = data;\n      }\n    }\n\n    return generateEBML(EBML, outputAsArray);\n  }\n\n  // sums the lengths of all the frames and gets the duration, woo\n\n  function checkFrames(frames) {\n    var width = frames[0].width,\n        height = frames[0].height,\n        duration = frames[0].duration;\n    for (var i = 1; i < frames.length; i++) {\n      if (frames[i].width != width) throw \"Frame \" + (i + 1) + \" has a different width\";\n      if (frames[i].height != height) throw \"Frame \" + (i + 1) + \" has a different height\";\n      if (frames[i].duration < 0 || frames[i].duration > 0x7fff) throw \"Frame \" + (i + 1) + \" has a weird duration (must be between 0 and 32767)\";\n      duration += frames[i].duration;\n    }\n    return {\n      duration: duration,\n      width: width,\n      height: height\n    };\n  }\n\n  function numToBuffer(num) {\n    var parts = [];\n    while (num > 0) {\n      parts.push(num & 0xff);\n      num = num >> 8;\n    }\n    return new Uint8Array(parts.reverse());\n  }\n\n  function numToFixedBuffer(num, size) {\n    var parts = new Uint8Array(size);\n    for (var i = size - 1; i >= 0; i--) {\n      parts[i] = num & 0xff;\n      num = num >> 8;\n    }\n    return parts;\n  }\n\n  function strToBuffer(str) {\n    // return new Blob([str]);\n\n    var arr = new Uint8Array(str.length);\n    for (var i = 0; i < str.length; i++) {\n      arr[i] = str.charCodeAt(i);\n    }\n    return arr;\n    // this is slower\n    // return new Uint8Array(str.split('').map(function(e){\n    //  return e.charCodeAt(0)\n    // }))\n  }\n\n  //sorry this is ugly, and sort of hard to understand exactly why this was done\n  // at all really, but the reason is that there's some code below that i dont really\n  // feel like understanding, and this is easier than using my brain.\n\n  function bitsToBuffer(bits) {\n    var data = [];\n    var pad = bits.length % 8 ? new Array(1 + 8 - bits.length % 8).join('0') : '';\n    bits = pad + bits;\n    for (var i = 0; i < bits.length; i += 8) {\n      data.push(parseInt(bits.substr(i, 8), 2));\n    }\n    return new Uint8Array(data);\n  }\n\n  function generateEBML(json, outputAsArray) {\n    var ebml = [];\n    for (var i = 0; i < json.length; i++) {\n      if (!('id' in json[i])) {\n        //already encoded blob or byteArray\n        ebml.push(json[i]);\n        continue;\n      }\n\n      var data = json[i].data;\n      if ((typeof data === \"undefined\" ? \"undefined\" : _typeof(data)) == 'object') data = generateEBML(data, outputAsArray);\n      if (typeof data == 'number') data = 'size' in json[i] ? numToFixedBuffer(data, json[i].size) : bitsToBuffer(data.toString(2));\n      if (typeof data == 'string') data = strToBuffer(data);\n\n      if (data.length) {\n        var z = z;\n      }\n\n      var len = data.size || data.byteLength || data.length;\n      var zeroes = Math.ceil(Math.ceil(Math.log(len) / Math.log(2)) / 8);\n      var size_str = len.toString(2);\n      var padded = new Array(zeroes * 7 + 7 + 1 - size_str.length).join('0') + size_str;\n      var size = new Array(zeroes).join('0') + '1' + padded;\n\n      //i actually dont quite understand what went on up there, so I'm not really\n      //going to fix this, i'm probably just going to write some hacky thing which\n      //converts that string into a buffer-esque thing\n\n      ebml.push(numToBuffer(json[i].id));\n      ebml.push(bitsToBuffer(size));\n      ebml.push(data);\n    }\n\n    //output as blob or byteArray\n    if (outputAsArray) {\n      //convert ebml to an array\n      var buffer = toFlatArray(ebml);\n      return new Uint8Array(buffer);\n    } else {\n      return new Blob(ebml, { type: \"video/webm\" });\n    }\n  }\n\n  function toFlatArray(arr, outBuffer) {\n    if (outBuffer == null) {\n      outBuffer = [];\n    }\n    for (var i = 0; i < arr.length; i++) {\n      if (_typeof(arr[i]) == 'object') {\n        //an array\n        toFlatArray(arr[i], outBuffer);\n      } else {\n        //a simple element\n        outBuffer.push(arr[i]);\n      }\n    }\n    return outBuffer;\n  }\n\n  //OKAY, so the following two functions are the string-based old stuff, the reason they're\n  //still sort of in here, is that they're actually faster than the new blob stuff because\n  //getAsFile isn't widely implemented, or at least, it doesn't work in chrome, which is the\n  // only browser which supports get as webp\n\n  //Converting between a string of 0010101001's and binary back and forth is probably inefficient\n  //TODO: get rid of this function\n  function toBinStr_old(bits) {\n    var data = '';\n    var pad = bits.length % 8 ? new Array(1 + 8 - bits.length % 8).join('0') : '';\n    bits = pad + bits;\n    for (var i = 0; i < bits.length; i += 8) {\n      data += String.fromCharCode(parseInt(bits.substr(i, 8), 2));\n    }\n    return data;\n  }\n\n  function generateEBML_old(json) {\n    var ebml = '';\n    for (var i = 0; i < json.length; i++) {\n      var data = json[i].data;\n      if ((typeof data === \"undefined\" ? \"undefined\" : _typeof(data)) == 'object') data = generateEBML_old(data);\n      if (typeof data == 'number') data = toBinStr_old(data.toString(2));\n\n      var len = data.length;\n      var zeroes = Math.ceil(Math.ceil(Math.log(len) / Math.log(2)) / 8);\n      var size_str = len.toString(2);\n      var padded = new Array(zeroes * 7 + 7 + 1 - size_str.length).join('0') + size_str;\n      var size = new Array(zeroes).join('0') + '1' + padded;\n\n      ebml += toBinStr_old(json[i].id.toString(2)) + toBinStr_old(size) + data;\n    }\n    return ebml;\n  }\n\n  //woot, a function that's actually written for this project!\n  //this parses some json markup and makes it into that binary magic\n  //which can then get shoved into the matroska comtainer (peaceably)\n\n  function makeSimpleBlock(data) {\n    var flags = 0;\n    if (data.keyframe) flags |= 128;\n    if (data.invisible) flags |= 8;\n    if (data.lacing) flags |= data.lacing << 1;\n    if (data.discardable) flags |= 1;\n    if (data.trackNum > 127) {\n      throw \"TrackNumber > 127 not supported\";\n    }\n    var out = [data.trackNum | 0x80, data.timecode >> 8, data.timecode & 0xff, flags].map(function (e) {\n      return String.fromCharCode(e);\n    }).join('') + data.frame;\n\n    return out;\n  }\n\n  // here's something else taken verbatim from weppy, awesome rite?\n\n  function parseWebP(riff) {\n    var VP8 = riff.RIFF[0].WEBP[0];\n\n    var frame_start = VP8.indexOf('\\x9d\\x01\\x2a'); //A VP8 keyframe starts with the 0x9d012a header\n    for (var i = 0, c = []; i < 4; i++) {\n      c[i] = VP8.charCodeAt(frame_start + 3 + i);\n    }var width, horizontal_scale, height, vertical_scale, tmp;\n\n    //the code below is literally copied verbatim from the bitstream spec\n    tmp = c[1] << 8 | c[0];\n    width = tmp & 0x3FFF;\n    horizontal_scale = tmp >> 14;\n    tmp = c[3] << 8 | c[2];\n    height = tmp & 0x3FFF;\n    vertical_scale = tmp >> 14;\n    return {\n      width: width,\n      height: height,\n      data: VP8,\n      riff: riff\n    };\n  }\n\n  // i think i'm going off on a riff by pretending this is some known\n  // idiom which i'm making a casual and brilliant pun about, but since\n  // i can't find anything on google which conforms to this idiomatic\n  // usage, I'm assuming this is just a consequence of some psychotic\n  // break which makes me make up puns. well, enough riff-raff (aha a\n  // rescue of sorts), this function was ripped wholesale from weppy\n\n  function parseRIFF(string) {\n    var offset = 0;\n    var chunks = {};\n\n    while (offset < string.length) {\n      var id = string.substr(offset, 4);\n      chunks[id] = chunks[id] || [];\n      if (id == 'RIFF' || id == 'LIST') {\n        var len = parseInt(string.substr(offset + 4, 4).split('').map(function (i) {\n          var unpadded = i.charCodeAt(0).toString(2);\n          return new Array(8 - unpadded.length + 1).join('0') + unpadded;\n        }).join(''), 2);\n        var data = string.substr(offset + 4 + 4, len);\n        offset += 4 + 4 + len;\n        chunks[id].push(parseRIFF(data));\n      } else if (id == 'WEBP') {\n        // Use (offset + 8) to skip past \"VP8 \"/\"VP8L\"/\"VP8X\" field after \"WEBP\"\n        chunks[id].push(string.substr(offset + 8));\n        offset = string.length;\n      } else {\n        // Unknown chunk type; push entire payload\n        chunks[id].push(string.substr(offset + 4));\n        offset = string.length;\n      }\n    }\n    return chunks;\n  }\n\n  // here's a little utility function that acts as a utility for other functions\n  // basically, the only purpose is for encoding \"Duration\", which is encoded as\n  // a double (considerably more difficult to encode than an integer)\n  function doubleToString(num) {\n    return [].slice.call(new Uint8Array(new Float64Array([num]) //create a float64 array\n    .buffer) //extract the array buffer\n    , 0) // convert the Uint8Array into a regular array\n    .map(function (e) {\n      //since it's a regular array, we can now use map\n      return String.fromCharCode(e); // encode all the bytes individually\n    }).reverse() //correct the byte endianness (assume it's little endian for now)\n    .join(''); // join the bytes in holy matrimony as a string\n  }\n\n  function WhammyVideo(speed, quality) {\n    // a more abstract-ish API\n    this.frames = [];\n    this.duration = 1000 / speed;\n    this.quality = quality || 0.8;\n  }\n\n  WhammyVideo.prototype.add = function (frame, duration) {\n    if (typeof duration != 'undefined' && this.duration) throw \"you can't pass a duration if the fps is set\";\n    if (typeof duration == 'undefined' && !this.duration) throw \"if you don't have the fps set, you need to have durations here.\";\n    if (frame.canvas) {\n      //CanvasRenderingContext2D\n      frame = frame.canvas;\n    }\n    if (frame.toDataURL) {\n      // frame = frame.toDataURL('image/webp', this.quality);\n      // quickly store image data so we don't block cpu. encode in compile method.\n      frame = frame.getContext('2d-lodpi').getImageData(0, 0, frame.width, frame.height);\n    } else if (typeof frame != \"string\") {\n      throw \"frame must be a a HTMLCanvasElement, a CanvasRenderingContext2D or a DataURI formatted string\";\n    }\n    if (typeof frame === \"string\" && !/^data:image\\/webp;base64,/ig.test(frame)) {\n      throw \"Input must be formatted properly as a base64 encoded DataURI of type image/webp\";\n    }\n    this.frames.push({\n      image: frame,\n      duration: duration || this.duration\n    });\n  };\n\n  // deferred webp encoding. Draws image data to canvas, then encodes as dataUrl\n  WhammyVideo.prototype.encodeFrames = function (callback) {\n\n    if (this.frames[0].image instanceof ImageData) {\n\n      var frames = this.frames;\n      var tmpCanvas = document.createElement('canvas');\n      var tmpContext = tmpCanvas.getContext('2d-lodpi');\n      tmpCanvas.width = this.frames[0].image.width;\n      tmpCanvas.height = this.frames[0].image.height;\n\n      var encodeFrame = function (index) {\n        console.log('encodeFrame', index);\n        var frame = frames[index];\n        tmpContext.putImageData(frame.image, 0, 0);\n        frame.image = tmpCanvas.toDataURL('image/webp', this.quality);\n        if (index < frames.length - 1) {\n          setTimeout(function () {\n            encodeFrame(index + 1);\n          }, 1);\n        } else {\n          callback();\n        }\n      }.bind(this);\n\n      encodeFrame(0);\n    } else {\n      callback();\n    }\n  };\n\n  WhammyVideo.prototype.compile = function (outputAsArray, callback) {\n\n    this.encodeFrames(function () {\n      var width = 0;\n      var height = 0;\n      var webm = new toWebM(this.frames.map(function (frame) {\n        var webp = parseWebP(parseRIFF(atob(frame.image.slice(23))));\n        webp.duration = frame.duration;\n        if (!webp || !webp.width || !webp.height) return null;\n        if (!width) width = webp.width;else if (width !== webp.width) return null;\n        if (!height) height = webp.height;else if (height !== webp.height) return null;\n        return webp;\n      }).filter(function (frame) {\n        return !!frame;\n      }), outputAsArray);\n      callback(webm);\n    }.bind(this));\n  };\n\n  return {\n    Video: WhammyVideo,\n    fromImageArray: function fromImageArray(images, fps, outputAsArray) {\n      return toWebM(images.map(function (image) {\n        var webp = parseWebP(parseRIFF(atob(image.slice(23))));\n        webp.duration = 1000 / fps;\n        return webp;\n      }), outputAsArray);\n    },\n    toWebM: toWebM\n    // expose methods of madness\n  };\n}();","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _morph = require('./morph');\n\nvar _morph2 = _interopRequireDefault(_morph);\n\nvar _pix2pix = require('./pix2pix');\n\nvar _pix2pix2 = _interopRequireDefault(_pix2pix);\n\nvar _pix2pixhd = require('./pix2pixhd');\n\nvar _pix2pixhd2 = _interopRequireDefault(_pix2pixhd);\n\nvar _pix2wav = require('./pix2wav');\n\nvar _pix2wav2 = _interopRequireDefault(_pix2wav);\n\nvar _samplernn = require('./samplernn');\n\nvar _samplernn2 = _interopRequireDefault(_samplernn);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = {\n  morph: _morph2.default, pix2pix: _pix2pix2.default, pix2pixhd: _pix2pixhd2.default, pix2wav: _pix2wav2.default, samplernn: _samplernn2.default\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.moduleReducer = undefined;\n\nvar _redux = require('redux');\n\nvar _morph = require('./morph/morph.reducer');\n\nvar _morph2 = _interopRequireDefault(_morph);\n\nvar _pix2pix = require('./pix2pix/pix2pix.reducer');\n\nvar _pix2pix2 = _interopRequireDefault(_pix2pix);\n\nvar _pix2pixhd = require('./pix2pixhd/pix2pixhd.reducer');\n\nvar _pix2pixhd2 = _interopRequireDefault(_pix2pixhd);\n\nvar _pix2wav = require('./pix2wav/pix2wav.reducer');\n\nvar _pix2wav2 = _interopRequireDefault(_pix2wav);\n\nvar _samplernn = require('./samplernn/samplernn.reducer');\n\nvar _samplernn2 = _interopRequireDefault(_samplernn);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar moduleReducer = exports.moduleReducer = (0, _redux.combineReducers)({\n  morph: _morph2.default,\n  pix2pix: _pix2pix2.default,\n  pix2pixhd: _pix2pixhd2.default,\n  pix2wav: _pix2wav2.default,\n  samplernn: _samplernn2.default\n});","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _morph = require('./views/morph.app');\n\nvar _morph2 = _interopRequireDefault(_morph);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar router = function () {\n  function router() {\n    _classCallCheck(this, router);\n  }\n\n  _createClass(router, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      _actions2.default.system.changeTool('morph');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #def, #dfe)';\n    }\n  }, {\n    key: 'componentWillReceiveProps',\n    value: function componentWillReceiveProps() {\n      _actions2.default.system.changeTool('morph');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #def, #dfe)';\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'section',\n        null,\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/morph/app/', component: _morph2.default })\n      );\n    }\n  }]);\n\n  return router;\n}();\n\nfunction links() {\n  return [{ url: '/morph/app/', name: 'morph' }];\n}\n\nexports.default = {\n  name: 'morph',\n  router: router, links: links\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.load_data = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.loader');\n\nvar datasetLoader = _interopRequireWildcard(_dataset);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _morph = require('./morph.module');\n\nvar _morph2 = _interopRequireDefault(_morph);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar load_data = exports.load_data = function load_data(id) {\n  return function (dispatch) {\n    var module = _morph2.default.name;\n    _util2.default.allProgress([datasetLoader.load(module), _actions2.default.socket.list_sequences({ module: 'pix2pixhd', dir: 'sequences' }), _actions2.default.socket.list_directory({ module: module, dir: 'renders' })], function (percent, i, n) {\n      console.log('morph load progress', i, n);\n      dispatch({\n        type: _types2.default.app.load_progress,\n        progress: { i: i, n: n },\n        data: { module: 'morph' }\n      });\n    }).then(function (res) {\n      var _res = _slicedToArray(res, 3),\n          datasetApiReport = _res[0],\n          sequences = _res[1],\n          renders = _res[2];\n\n      var folderLookup = datasetApiReport.folderLookup,\n          fileLookup = datasetApiReport.fileLookup,\n          datasetLookup = datasetApiReport.datasetLookup,\n          folders = datasetApiReport.folders,\n          files = datasetApiReport.files,\n          unsortedFolder = datasetApiReport.unsortedFolder,\n          resultsFolder = datasetApiReport.resultsFolder;\n\n\n      dispatch({\n        type: _types2.default.morph.load,\n        data: datasetApiReport,\n        app: {\n          resultsFolder: resultsFolder,\n          files: files,\n          sequences: sequences,\n          renders: renders\n        }\n      });\n    });\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nvar morphModule = {\n  name: 'morph',\n  displayName: 'Morph',\n  datatype: 'video'\n};\n\nexports.default = morphModule;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.reducer');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar morphInitialState = {\n  loading: true,\n  progress: { i: 0, n: 0 },\n  error: null,\n  folder_id: 0,\n  data: null,\n  app: null\n};\n\nvar morphReducer = function morphReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : morphInitialState;\n  var action = arguments[1];\n\n  if (action.data && action.data.module === 'morph') {\n    state = (0, _dataset2.default)(state, action);\n  }\n\n  switch (action.type) {\n    case _types2.default.morph.load:\n      console.log('morph load', action.app);\n      return _extends({}, state, {\n        app: action.app,\n        loading: false,\n        data: action.data\n      });\n    case _types2.default.file.create:\n      console.log(action);\n      if (action.data.module !== 'morph') return state;\n      return _extends({}, state, {\n        app: state.app && _extends({}, state.app, {\n          files: [action.data].concat(state.app.files)\n        })\n      });\n    default:\n      return state;\n  }\n};\n\nexports.default = morphReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.morph_task = undefined;\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _morph = require('./morph.module');\n\nvar _morph2 = _interopRequireDefault(_morph);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar morph_task = exports.morph_task = function morph_task(state, folder) {\n  return function (dispatch) {\n    if (state.a === 'PLACEHOLDER' || state.b === 'PLACEHOLDER') return;\n    var task = {\n      module: _morph2.default.name,\n      activity: 'morph',\n      dataset: state.a,\n      folder_id: folder.id,\n      opt: state\n    };\n    return _actions2.default.queue.add_task(task);\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _actions = require('../../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _morph = require('../morph.actions');\n\nvar morphActions = _interopRequireWildcard(_morph);\n\nvar _morph2 = require('../morph.tasks');\n\nvar morphTasks = _interopRequireWildcard(_morph2);\n\nvar _loading = require('../../../common/loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nvar _common = require('../../../common');\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar yes_count = 0;\n\nvar MorphResults = function (_Component) {\n  _inherits(MorphResults, _Component);\n\n  function MorphResults(props) {\n    _classCallCheck(this, MorphResults);\n\n    var _this = _possibleConstructorReturn(this, (MorphResults.__proto__ || Object.getPrototypeOf(MorphResults)).call(this));\n\n    _this.state = {\n      dataset_module: 'pix2pixhd',\n      a: \"PLACEHOLDER\",\n      b: \"PLACEHOLDER\",\n      a_offset: 0,\n      a_duration: 1,\n      a_pos: 0,\n      b_offset: 0,\n      b_duration: 1,\n      b_pos: 0,\n      steps: 16,\n      dilate: 2,\n      frames: 32,\n      padding: 3,\n      smooth: true,\n      mode: 'mix'\n    };\n    if (!props.morph.data) props.actions.load_data();\n    return _this;\n  }\n\n  _createClass(MorphResults, [{\n    key: 'componentDidMount',\n    value: function componentDidMount() {\n      yes_count = 0;\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      if (!this.props.morph.app) return (0, _preact.h)(_loading2.default, { progress: this.props.morph.progress });\n\n      var _props$morph$app = this.props.morph.app,\n          resultsFolder = _props$morph$app.resultsFolder,\n          sequences = _props$morph$app.sequences,\n          renders = _props$morph$app.renders,\n          files = _props$morph$app.files;\n\n      var sequence_options = sequences.map(function (sequence) {\n        return [sequence.name.split(\"_\").slice(0, 3).join(\" \") + \"~ (\" + sequence.count + \")\", sequence.name];\n      });\n      var sequenceLookup = sequences.reduce(function (a, b) {\n        return a[b.name] = b, a;\n      }, {});\n\n      var totalLength = this.state.frames / 25;\n      var lengthWarning = void 0;\n      if (this.state.steps / this.state.dilate > 64 && this.state.mode === 'mix') {\n        lengthWarning = (0, _preact.h)(\n          'span',\n          null,\n          (0, _preact.h)('br', null),\n          'warning, this will take a while'\n        );\n      }\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'app morph' },\n        (0, _preact.h)(\n          'div',\n          { className: 'heading row middle' },\n          (0, _preact.h)(\n            'h1',\n            null,\n            'Morph'\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { className: 'rows params renders' },\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.Group,\n              { title: 'From' },\n              (0, _preact.h)(_common.Select, {\n                title: 'Starting sequence',\n                placeholder: 'Please choose a video',\n                value: this.state.a,\n                options: sequence_options,\n                onChange: function onChange(name, key) {\n                  return _this2.setState({ a: key, a_duration: sequenceLookup[key].count, a_pos: 0, a_offset: 0 });\n                }\n              }),\n              (0, _preact.h)(_common.Slider, {\n                title: 'Offset',\n                value: this.state.a_pos,\n                min: 0, max: 1, step: 0.01,\n                onChange: function onChange(key) {\n                  return _this2.setState({ a_pos: key, a_offset: Math.floor(key * (_this2.state.a_duration - _this2.state.frames)) });\n                }\n              })\n            ),\n            (0, _preact.h)(\n              _common.Group,\n              { title: 'To' },\n              (0, _preact.h)(_common.Select, {\n                title: 'Ending sequence',\n                placeholder: 'Please choose a video',\n                value: this.state.b,\n                options: sequence_options,\n                onChange: function onChange(name, key) {\n                  return _this2.setState({ b: key, b_duration: sequenceLookup[key].count, b_pos: 0, b_offset: 0 });\n                }\n              }),\n              (0, _preact.h)(_common.Slider, {\n                title: 'Offset',\n                value: this.state.b_pos,\n                min: 0, max: 1, step: 0.01,\n                onChange: function onChange(key) {\n                  return _this2.setState({ b_pos: key, b_offset: Math.floor(key * (_this2.state.b_duration - _this2.state.frames)) });\n                }\n              })\n            ),\n            (0, _preact.h)(\n              _common.Group,\n              { title: 'Morph Settings' },\n              (0, _preact.h)(_common.Select, {\n                title: \"Mode\",\n                value: this.state.mode,\n                options: ['mix', 'average', 'mix_images'],\n                onChange: function onChange(name, key) {\n                  return _this2.setState({ mode: key });\n                }\n              }),\n              (0, _preact.h)(_common.Slider, {\n                type: 'list',\n                title: 'Steps',\n                value: this.state.steps,\n                options: [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096],\n                onChange: function onChange(key) {\n                  return _this2.setState({ steps: key, frames: key * _this2.state.dilate });\n                }\n              }),\n              (0, _preact.h)(_common.Slider, {\n                type: 'list',\n                title: 'Dilate',\n                value: this.state.dilate,\n                options: [1, 2, 4, 8, 16, 32],\n                onChange: function onChange(key) {\n                  return _this2.setState({ dilate: key, frames: _this2.state.steps * key });\n                }\n              }),\n              (0, _preact.h)(_common.Checkbox, {\n                title: 'Smooth',\n                value: this.state.smooth,\n                onToggle: function onToggle(key) {\n                  return _this2.setState({ smooth: key });\n                }\n              }),\n              (0, _preact.h)(_common.Slider, {\n                type: 'int',\n                title: 'Padding (in seconds)',\n                value: this.state.padding,\n                min: 0, max: 30, step: 1,\n                onChange: function onChange(key) {\n                  return _this2.setState({ padding: key });\n                }\n              }),\n              (0, _preact.h)(_common.Button, {\n                title: 'Run task',\n                value: 'Morph!',\n                onClick: function onClick() {\n                  return _this2.props.remote.morph_task(_this2.state, resultsFolder);\n                }\n              }),\n              (0, _preact.h)('br', null),\n              (0, _preact.h)(\n                _common.Param,\n                { title: 'Total length' },\n                totalLength.toFixed(1) + \" seconds\"\n              ),\n              (0, _preact.h)(\n                _common.Param,\n                { title: 'Total frames' },\n                this.state.frames + \" frames\"\n              ),\n              lengthWarning,\n              (0, _preact.h)('br', null),\n              (0, _preact.h)(_common.CurrentTask, null)\n            )\n          ),\n          (0, _preact.h)(\n            'h3',\n            null,\n            'morphed videos'\n          ),\n          (0, _preact.h)(_common.FileList, {\n            linkFiles: true,\n            files: files,\n            orderBy: 'date desc',\n            fields: 'name datetime size delete',\n            onDelete: function onDelete(file) {\n              var yes = void 0;\n              if (yes_count < 3) {\n                yes = confirm('Are you sure you want to delete this file?');\n              } else {\n                yes = true;\n              }\n              if (yes) {\n                yes_count += 1;\n                console.log('delete: confirmed');\n                _actions2.default.file.destroy(file);\n              }\n            }\n          }),\n          (0, _preact.h)('br', null),\n          (0, _preact.h)(\n            'h3',\n            null,\n            'renders on server'\n          ),\n          (0, _preact.h)(_common.FileList, {\n            files: renders,\n            orderBy: 'date desc',\n            fields: 'name datetime time size',\n            onClick: function onClick(file, e) {\n              e.preventDefault();\n              e.stopPropagation();\n              console.log('picked a result', file);\n              _this2.handlePick(file);\n            }\n          })\n        )\n      );\n    }\n  }, {\n    key: 'handlePick',\n    value: function handlePick(file) {\n      // this.props.audioPlayer.play(file)\n    }\n  }]);\n\n  return MorphResults;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    morph: state.module.morph\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(morphActions, dispatch),\n    remote: (0, _redux.bindActionCreators)(morphTasks, dispatch)\n    // audioPlayer: bindActionCreators(audioPlayerActions, dispatch),\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(MorphResults);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2pix = require('./views/pix2pix.new');\n\nvar _pix2pix2 = _interopRequireDefault(_pix2pix);\n\nvar _pix2pix3 = require('./views/pix2pix.show');\n\nvar _pix2pix4 = _interopRequireDefault(_pix2pix3);\n\nvar _pix2pix5 = require('./views/pix2pix.live');\n\nvar _pix2pix6 = _interopRequireDefault(_pix2pix5);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar router = function () {\n  function router() {\n    _classCallCheck(this, router);\n  }\n\n  _createClass(router, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      _actions2.default.system.changeTool('pix2pix');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #fde, #ffe)';\n    }\n  }, {\n    key: 'componentWillReceiveProps',\n    value: function componentWillReceiveProps() {\n      _actions2.default.system.changeTool('pix2pix');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #fde, #ffe)';\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'section',\n        null,\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pix/new/', component: _pix2pix2.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pix/sequences/', component: _pix2pix4.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pix/sequences/:id/', component: _pix2pix4.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pix/live/', component: _pix2pix6.default })\n      );\n    }\n  }]);\n\n  return router;\n}();\n\nfunction links() {\n  return [{ url: '/pix2pix/new/', name: 'new' }, { url: '/pix2pix/sequences/', name: 'sequences' }, { url: '/pix2pix/live/', name: 'live' }];\n}\n\nexports.default = {\n  name: 'pix2pix',\n  router: router, links: links\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.load_directories = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.loader');\n\nvar datasetLoader = _interopRequireWildcard(_dataset);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2pix = require('./pix2pix.module');\n\nvar _pix2pix2 = _interopRequireDefault(_pix2pix);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar load_directories = exports.load_directories = function load_directories(id) {\n  return function (dispatch) {\n    var module = _pix2pix2.default.name;\n    _util2.default.allProgress([datasetLoader.load(module), _actions2.default.socket.list_directory({ module: module, dir: 'sequences/pix2pix/' }), _actions2.default.socket.list_directory({ module: module, dir: 'datasets/pix2pix/' }), _actions2.default.socket.list_directory({ module: module, dir: 'checkpoints/pix2pix/' })], function (percent, i, n) {\n      console.log('pix2pix load progress', i, n);\n      dispatch({ type: _types2.default.app.load_progress, progress: { i: i, n: n } });\n    }).then(function (res) {\n      var _res = _slicedToArray(res, 4),\n          datasetApiReport = _res[0],\n          sequences = _res[1],\n          datasets = _res[2],\n          checkpoints = _res[3]; //, datasets, results, output, datasetUsage, lossReport] = res\n\n\n      var folderLookup = datasetApiReport.folderLookup,\n          fileLookup = datasetApiReport.fileLookup,\n          datasetLookup = datasetApiReport.datasetLookup,\n          folders = datasetApiReport.folders,\n          files = datasetApiReport.files,\n          unsortedFolder = datasetApiReport.unsortedFolder;\n      // console.log(datasetUsage)\n\n      var sequenceDirectories = sequences.filter(function (s) {\n        return s.dir;\n      });\n      // console.log(sequenceDirectories)\n      sequenceDirectories.forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.isBuilt = true;\n        // console.log(dir.name, dataset)\n      });\n\n      datasets.filter(function (s) {\n        return s.dir;\n      }).forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.hasDataset = true;\n      });\n\n      var checkpointDirectories = checkpoints.filter(function (s) {\n        return s.dir;\n      });\n      checkpointDirectories.forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.hasCheckpoints = true;\n        dataset.checkpoints = [dir];\n      });\n\n      // console.log(res)\n\n      // flatDatasets.forEach(file => {\n      //   file.uuid = uuidv1()\n      //   fileLookup[file.uuid] = file\n      //   const name = file.name.split('.')[0]\n      //   const dataset = datasetLoader.getDataset(module, datasetLookup, name, unsortedFolder, file.date)\n      //   file.persisted = false\n      //   dataset.input.push(file.uuid)\n      // })\n\n      // // exp:coccokit_3-frame_sizes:8,2-n_rnn:2-dataset:coccokit_3\n      // const checkpoints = results.filter(s => s.dir).map(s => {\n      //   const checkpoint = s.name\n      //     .split('-')\n      //     .map(s => s.split(':'))\n      //     .filter(b => b.length && b[1])\n      //     .reduce((a,b) => (a[b[0]] = b[1]) && a, {})\n      //   checkpoint.name = checkpoint.name || checkpoint.dataset || checkpoint.exp\n      //   checkpoint.date = s.date\n      //   checkpoint.dir = s\n      //   checkpoint.persisted = false\n      //   const dataset = datasetLoader.getDataset(module, datasetLookup, checkpoint.name, unsortedFolder, checkpoint.date)\n      //   const loss = lossReport[checkpoint.name]\n      //   if (loss) {\n      //     dataset.epoch = checkpoint.epoch = loss.length\n      //     checkpoint.training_loss = loss\n      //   }\n      //   dataset.checkpoints.push(checkpoint)\n      //   return checkpoint\n      // })\n\n      // output.map(file => {\n      //   file.uuid = uuidv1()\n      //   fileLookup[file.uuid] = file\n      //   const pair = file.name.split('.')[0].split('-')\n      //   const dataset = datasetLoader.getDataset(module, datasetLookup, pair[0], unsortedFolder, file.date)\n      //   file.persisted = false\n      //   file.epoch = parseInt(file.epoch || pair[1].replace(/^\\D+/, '')) || 0\n      //   dataset.epoch = Math.max(file.epoch, dataset.epoch || 0)\n      //   // here check if the file exists in dataset, if so just check that it's persisted\n      //   const found = dataset.output.some(file_id => {\n      //     // if (f.name === \n      //     if (fileLookup[file_id].name === file.name) {\n      //       fileLookup[file_id].persisted = true\n      //       return true\n      //     }\n      //     return false\n      //   })\n      //   if (! found) {\n      //     dataset.output.push(file.uuid)\n      //   }\n      // })\n\n      dispatch({\n        type: _types2.default.dataset.load,\n        data: {\n          module: module,\n          folderLookup: folderLookup,\n          fileLookup: fileLookup,\n          datasetLookup: datasetLookup,\n          folders: folders, files: files,\n          sequences: sequenceDirectories,\n          datasets: datasets,\n          checkpoints: checkpointDirectories\n        }\n      });\n    }).catch(function (e) {\n      console.error(e);\n    });\n    if (id) {\n      console.log('folder id', id);\n      dispatch({\n        type: _types2.default.dataset.set_folder,\n        data: {\n          folder_id: id,\n          module: module\n        }\n      });\n    }\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nvar pix2pixModule = {\n  name: 'pix2pix',\n  displayName: 'Pix2Pix',\n  datatype: 'video'\n};\n\nexports.default = pix2pixModule;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.reducer');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar pix2pixInitialState = {\n  loading: true,\n  progress: { i: 0, n: 0 },\n  error: null,\n  folder_id: 0,\n  data: null\n};\n\nvar pix2pixReducer = function pix2pixReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : pix2pixInitialState;\n  var action = arguments[1];\n\n  if (action.data && action.data.module === 'pix2pix') {\n    state = (0, _dataset2.default)(state, action);\n  }\n\n  switch (action.type) {\n    default:\n      return state;\n  }\n};\n\nexports.default = pix2pixReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.train_task = exports.live_task = exports.fetch_task = undefined;\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar fetch_task = exports.fetch_task = function fetch_task(url, file_id, dataset) {\n  return function (dispatch) {\n    if (!url) return console.log('input file inaccessible (no url)');\n    var task = {\n      module: 'pix2pix',\n      activity: 'fetch',\n      dataset: dataset,\n      opt: {\n        url: url,\n        file_id: file_id,\n        dataset: dataset\n      }\n    };\n    return _actions2.default.queue.add_task(task);\n  };\n};\n\nvar live_task = exports.live_task = function live_task(sequence, checkpoint) {\n  return function (dispatch) {\n    var task = {\n      module: 'pix2pix',\n      activity: 'live',\n      dataset: sequence,\n      checkpoint: checkpoint,\n      opt: {\n        poll_delay: 0.09\n      }\n    };\n    console.log(task);\n    console.log('add live task');\n    return _actions2.default.queue.add_task(task);\n  };\n};\n\nvar train_task = exports.train_task = function train_task(dataset, folder_id) {\n  var epochs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n  return function (dispatch) {\n    var task = {\n      module: 'pix2pix',\n      activity: 'train',\n      dataset: dataset.name,\n      epoch: 0,\n      epochs: epochs,\n      opt: {\n        folder_id: folder_id,\n        load_size: 264 // switch to 256 for pix2wav\n      }\n    };\n    console.log(task);\n    return _actions2.default.queue.add_task(task);\n  };\n};\n// export const log_task = (dataset) => dispatch => {\n//   const task = {\n//     module: 'samplernn',\n//     activity: 'log',\n//     dataset: dataset.name,\n//   }\n//   return actions.queue.add_task(task)\n// }\n// export const clear_cache_task = (dataset) => dispatch => {\n//   const task = {\n//     module: 'samplernn',\n//     activity: 'clear_cache',\n//     dataset: dataset.name,\n//   }\n//   return actions.queue.add_task(task)\n// }","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _common = require('../../../common/');\n\nvar _player = require('../../../live/player');\n\nvar _live = require('../../../live/live.actions');\n\nvar liveActions = _interopRequireWildcard(_live);\n\nvar _queue = require('../../../queue/queue.actions');\n\nvar queueActions = _interopRequireWildcard(_queue);\n\nvar _pix2pix = require('../pix2pix.tasks');\n\nvar pix2pixTasks = _interopRequireWildcard(_pix2pix);\n\nvar _pix2pix2 = require('../pix2pix.actions');\n\nvar pix2pixActions = _interopRequireWildcard(_pix2pix2);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Pix2PixLive = function (_Component) {\n  _inherits(Pix2PixLive, _Component);\n\n  function Pix2PixLive(props) {\n    _classCallCheck(this, Pix2PixLive);\n\n    // if (! props.pix2pix || ! props.pix2pix.data) {\n    var _this = _possibleConstructorReturn(this, (Pix2PixLive.__proto__ || Object.getPrototypeOf(Pix2PixLive)).call(this));\n\n    props.actions.pix2pix.load_directories();\n    // }\n    props.actions.live.get_params();\n    // props.actions.live.list_checkpoints('pix2pix')\n    // props.actions.live.list_sequences('pix2pix')\n    _this.changeCheckpoint = _this.changeCheckpoint.bind(_this);\n    _this.changeEpoch = _this.changeEpoch.bind(_this);\n    _this.changeSequence = _this.changeSequence.bind(_this);\n    _this.seek = _this.seek.bind(_this);\n    _this.togglePlaying = _this.togglePlaying.bind(_this);\n    _this.toggleRecording = _this.toggleRecording.bind(_this);\n    return _this;\n  }\n\n  _createClass(Pix2PixLive, [{\n    key: 'componentWillUpdate',\n    value: function componentWillUpdate(nextProps) {\n      if (nextProps.opt.checkpoint_name && nextProps.opt.checkpoint_name !== this.props.opt.checkpoint_name) {\n        this.props.actions.live.list_epochs('pix2pix', nextProps.opt.checkpoint_name);\n      }\n    }\n  }, {\n    key: 'changeCheckpoint',\n    value: function changeCheckpoint(field, checkpoint_name) {\n      this.props.actions.live.load_epoch(checkpoint_name, 'latest');\n    }\n  }, {\n    key: 'changeEpoch',\n    value: function changeEpoch(field, epoch_name) {\n      this.props.actions.live.load_epoch(this.props.opt.checkpoint_name, epoch_name);\n    }\n  }, {\n    key: 'changeSequence',\n    value: function changeSequence(field, sequence) {\n      console.log('load sequence', sequence);\n      this.props.actions.live.load_sequence(sequence);\n    }\n  }, {\n    key: 'seek',\n    value: function seek(percentage) {\n      var frame = Math.floor(percentage * (parseInt(this.props.frame.sequence_len) || 1) + 1);\n      console.log(\"seek to frame\", percentage, frame);\n      this.props.actions.live.seek(frame);\n    }\n  }, {\n    key: 'start',\n    value: function start() {\n      // console.log(this.props)\n      var sequence = this.props.pix2pix.data.sequences[0].name;\n      var checkpoint = this.props.pix2pix.data.checkpoints[0].name;\n      console.log('starting up!', sequence, checkpoint);\n      this.props.actions.tasks.live_task(sequence, checkpoint);\n    }\n  }, {\n    key: 'interrupt',\n    value: function interrupt() {\n      this.props.actions.queue.stop_task('gpu');\n    }\n  }, {\n    key: 'togglePlaying',\n    value: function togglePlaying() {\n      if (this.props.opt.processing) {\n        this.props.actions.live.pause();\n      } else {\n        this.props.actions.live.play();\n      }\n    }\n  }, {\n    key: 'toggleRecording',\n    value: function toggleRecording() {\n      if (this.props.opt.recording) {\n        (0, _player.stopRecording)();\n        this.props.actions.live.pause();\n      } else {\n        (0, _player.startRecording)();\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      // console.log(this.props)\n      if (this.props.pix2pix.loading) {\n        return (0, _preact.h)(_common.Loading, null);\n      }\n      return (0, _preact.h)(\n        'div',\n        { className: 'app centered' },\n        (0, _preact.h)(_common.Player, { width: 424, height: 256 }),\n        (0, _preact.h)(\n          'div',\n          { className: 'params row' },\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Playback',\n                noToggle: true\n              },\n              (0, _preact.h)(_common.Select, {\n                name: 'send_image',\n                title: 'view mode',\n                options: ['a', 'b', 'sequence', 'recursive'],\n                onChange: this.props.actions.live.set_param\n              }),\n              (0, _preact.h)(_common.Select, {\n                name: 'sequence_name',\n                title: 'sequence',\n                options: this.props.pix2pix.data.sequences.map(function (file) {\n                  return file.name;\n                }),\n                onChange: this.changeSequence\n              }),\n              (0, _preact.h)(_common.Select, {\n                name: 'checkpoint_name',\n                title: 'checkpoint',\n                options: this.props.pix2pix.data.checkpoints.map(function (file) {\n                  return file.name;\n                }),\n                onChange: this.changeCheckpoint\n              }),\n              (0, _preact.h)(_common.Select, {\n                name: 'epoch',\n                title: 'epoch',\n                options: this.props.epochs,\n                onChange: this.changeEpoch\n              }),\n              (0, _preact.h)(_common.Slider, {\n                name: 'position',\n                min: 0.0, max: 1.0, type: 'float',\n                value: (this.props.frame.sequence_i || 0) / (this.props.frame.sequence_len || 1),\n                onChange: this.seek\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'frame_delay',\n                min: 0.05, max: 2.0, type: 'float'\n              }),\n              this.renderRestartButton(),\n              (0, _preact.h)(\n                _common.Button,\n                {\n                  title: this.props.opt.savingVideo ? 'Saving video...' : this.props.opt.recording ? 'Recording (' + timeInSeconds(this.props.opt.recordFrames / 25) + ')' : 'Record video',\n                  onClick: this.toggleRecording\n                },\n                this.props.opt.savingVideo ? 'Saving' : this.props.opt.recording ? 'Recording' : 'Record'\n              ),\n              (0, _preact.h)(\n                _common.Button,\n                {\n                  title: 'Save frame',\n                  onClick: _player.saveFrame\n                },\n                'Save'\n              ),\n              (0, _preact.h)(_common.ParamGroup, {\n                title: 'Render on server',\n                name: 'store_b',\n                onToggle: function onToggle(value) {\n                  // now storing frames on server...\n                }\n              }),\n              (0, _preact.h)(\n                'p',\n                { className: 'last_message' },\n                this.props.last_message\n              )\n            )\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Transition',\n                name: 'transition'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'transition_period',\n                min: 10, max: 5000, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'transition_min',\n                min: 0.001, max: 0.2, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'transition_max',\n                min: 0.1, max: 1.0, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Recursion',\n                name: 'recursive'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'recursive_frac',\n                min: 0.0, max: 0.5, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'recurse_roll',\n                min: -64, max: 64, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'recurse_roll_axis',\n                min: 0, max: 1, type: 'int'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Sequence',\n                name: 'sequence'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'sequence_frac',\n                min: 0.0, max: 0.5, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'process_frac',\n                min: 0, max: 1, type: 'float'\n              })\n            )\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Clahe',\n                name: 'clahe'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'clip_limit',\n                min: 1.0, max: 4.0, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Posterize',\n                name: 'posterize'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'spatial_window',\n                min: 2, max: 128, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'color_window',\n                min: 2, max: 128, type: 'int'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Blur',\n                name: 'blur'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'blur_radius',\n                min: 3, max: 7, type: 'odd'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'blur_sigma',\n                min: 0, max: 2, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Canny Edge Detection',\n                name: 'canny'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'canny_lo',\n                min: 10, max: 200, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'canny_hi',\n                min: 10, max: 200, type: 'int'\n              })\n            )\n          )\n        )\n      );\n    }\n  }, {\n    key: 'renderRestartButton',\n    value: function renderRestartButton() {\n      var _this2 = this;\n\n      if (this.props.runner.gpu.status === 'IDLE') {\n        return (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'GPU Idle',\n            onClick: function onClick() {\n              return _this2.start();\n            }\n          },\n          'Start'\n        );\n      }\n      if (this.props.runner.gpu.task.module !== 'pix2pix') {\n        return (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'GPU Busy',\n            onClick: function onClick() {\n              return _this2.interrupt();\n            }\n          },\n          'Interrupt'\n        );\n      }\n      if (!this.props.opt.processing) {\n        return (0, _preact.h)(\n          'div',\n          null,\n          (0, _preact.h)(\n            _common.Button,\n            {\n              title: 'Not processing',\n              onClick: this.togglePlaying\n            },\n            'Restart'\n          ),\n          (0, _preact.h)(\n            _common.Button,\n            {\n              title: 'GPU Busy',\n              onClick: function onClick() {\n                return _this2.interrupt();\n              }\n            },\n            'Interrupt'\n          )\n        );\n      }\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'Processing',\n            onClick: this.togglePlaying\n          },\n          'Stop'\n        ),\n        (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'GPU Busy',\n            onClick: function onClick() {\n              return _this2.interrupt();\n            }\n          },\n          'Interrupt'\n        )\n      );\n    }\n  }]);\n\n  return Pix2PixLive;\n}(_preact.Component);\n\nfunction timeInSeconds(n) {\n  return n.toFixed(1) + ' s.';\n}\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    last_message: state.live.last_message,\n    opt: state.live.opt,\n    frame: state.live.frame,\n    checkpoints: state.live.checkpoints,\n    epochs: state.live.epochs,\n    sequences: state.live.sequences,\n    runner: state.system.runner,\n    pix2pix: state.module.pix2pix\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: {\n      live: (0, _redux.bindActionCreators)(liveActions, dispatch),\n      queue: (0, _redux.bindActionCreators)(queueActions, dispatch),\n      pix2pix: (0, _redux.bindActionCreators)(pix2pixActions, dispatch),\n      tasks: (0, _redux.bindActionCreators)(pix2pixTasks, dispatch), s: s\n    }\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2PixLive);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _common = require('../../../common');\n\nvar _pix2pix = require('../pix2pix.actions');\n\nvar pix2pixActions = _interopRequireWildcard(_pix2pix);\n\nvar _pix2pix2 = require('../pix2pix.module');\n\nvar _pix2pix3 = _interopRequireDefault(_pix2pix2);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction Pix2PixNew(props) {\n  return (0, _preact.h)(_common.Views.New, {\n    db: props.pix2pix,\n    path: '/pix2pix/sequences/',\n    actions: props.actions,\n    module: _pix2pix3.default,\n    history: props.history\n  });\n}\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    pix2pix: state.module.pix2pix\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(pix2pixActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2PixNew);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2pix = require('../pix2pix.actions');\n\nvar pix2pixActions = _interopRequireWildcard(_pix2pix);\n\nvar _pix2pix2 = require('../pix2pix.tasks');\n\nvar pix2pixTasks = _interopRequireWildcard(_pix2pix2);\n\nvar _common = require('../../../common');\n\nvar _dataset = require('../../../dataset/dataset.form');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nvar _dataset3 = require('../../../dataset/dataset.new');\n\nvar _dataset4 = _interopRequireDefault(_dataset3);\n\nvar _upload = require('../../../dataset/upload.status');\n\nvar _upload2 = _interopRequireDefault(_upload);\n\nvar _dataset5 = require('../../../dataset/dataset.component');\n\nvar _dataset6 = _interopRequireDefault(_dataset5);\n\nvar _pix2pix3 = require('../pix2pix.module');\n\nvar _pix2pix4 = _interopRequireDefault(_pix2pix3);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Pix2pixShow = function (_Component) {\n  _inherits(Pix2pixShow, _Component);\n\n  function Pix2pixShow(props) {\n    _classCallCheck(this, Pix2pixShow);\n\n    var _this = _possibleConstructorReturn(this, (Pix2pixShow.__proto__ || Object.getPrototypeOf(Pix2pixShow)).call(this, props));\n\n    _this.datasetActions = _this.datasetActions.bind(_this);\n    return _this;\n  }\n\n  _createClass(Pix2pixShow, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      var id = this.props.match.params.id || localStorage.getItem('pix2pix.last_id');\n      console.log('load dataset:', id);\n      var _props = this.props,\n          match = _props.match,\n          pix2pix = _props.pix2pix,\n          actions = _props.actions;\n\n      if (id === 'new') return;\n      if (id) {\n        if (parseInt(id)) localStorage.setItem('pix2pix.last_id', id);\n        if (!pix2pix.folder || pix2pix.folder.id !== id) {\n          actions.load_directories(id);\n        }\n      } else {\n        this.props.history.push('/pix2pix/new/');\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props2 = this.props,\n          pix2pix = _props2.pix2pix,\n          match = _props2.match,\n          history = _props2.history;\n\n      var _ref = pix2pix.data || {},\n          folderLookup = _ref.folderLookup;\n\n      var folder = (folderLookup || {})[pix2pix.folder_id] || {};\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'app pix2pix' },\n        (0, _preact.h)(\n          'div',\n          { className: 'heading' },\n          (0, _preact.h)(\n            'div',\n            { className: 'spaced' },\n            (0, _preact.h)(\n              'h1',\n              null,\n              folder ? folder.name : (0, _preact.h)(_common.Loading, null)\n            ),\n            (0, _preact.h)(_upload2.default, null)\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { className: 'row' },\n          folder && folder.name && folder.name !== 'unsorted' && (0, _preact.h)(_dataset2.default, {\n            title: 'Add Files',\n            module: _pix2pix4.default,\n            folder: folder,\n            canUpload: true, canAddURL: true\n          }),\n          (0, _preact.h)(\n            'div',\n            null,\n            (0, _preact.h)(_upload2.default, null),\n            (0, _preact.h)(_common.CurrentTask, null)\n          )\n        ),\n        (0, _preact.h)(_dataset6.default, {\n          loading: pix2pix.loading,\n          progress: pix2pix.progress,\n          id: pix2pix.folder_id,\n          module: _pix2pix4.default,\n          data: pix2pix.data,\n          folder: folder,\n          history: history,\n          onPickFile: function onPickFile(file, e) {\n            e.preventDefault();\n            e.stopPropagation();\n            console.log('picked a file', file);\n          },\n          datasetActions: this.datasetActions\n        })\n      );\n    }\n  }, {\n    key: 'datasetActions',\n    value: function datasetActions(dataset) {\n      var isFetching = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      var isProcessing = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n      var _props3 = this.props,\n          pix2pix = _props3.pix2pix,\n          remote = _props3.remote;\n\n      var input = pix2pix.data.fileLookup[dataset.input[0]];\n      if (!input) return null;\n      if (input.name && input.name.match(/(gif|jpe?g|png)$/i)) return null;\n      console.log(dataset);\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)(\n          'div',\n          { className: 'actions' },\n          (0, _preact.h)(\n            'span',\n            { className: 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pix.folder_id, 1);\n              } },\n            'train'\n          ),\n          (0, _preact.h)(\n            'span',\n            { className: 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pix.folder_id, 5);\n              } },\n            '5x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { className: 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pix.folder_id, 10);\n              } },\n            '10x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { className: 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pix.folder_id, 20);\n              } },\n            '20x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { className: 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pix.folder_id, 50);\n              } },\n            '50x'\n          )\n        ),\n        dataset.isBuilt ? (0, _preact.h)(\n          'div',\n          { className: 'subtext' },\n          'fetched ',\n          (0, _preact.h)(\n            'span',\n            { className: 'link', onClick: function onClick() {\n                return remote.clear_cache_task(dataset);\n              } },\n            'rm'\n          )\n        ) : isFetching ? (0, _preact.h)(\n          'div',\n          { className: 'subtext' },\n          'fetching'\n        ) : (0, _preact.h)(\n          'div',\n          { className: 'subtext' },\n          (0, _preact.h)(\n            'span',\n            { className: 'link', onClick: function onClick() {\n                return remote.fetch_task(input.url, input.id, dataset.name);\n              } },\n            'fetch'\n          )\n        )\n      );\n    }\n  }]);\n\n  return Pix2pixShow;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    pix2pix: state.module.pix2pix\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(pix2pixActions, dispatch),\n    remote: (0, _redux.bindActionCreators)(pix2pixTasks, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2pixShow);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2pixhd = require('./views/pix2pixhd.new');\n\nvar _pix2pixhd2 = _interopRequireDefault(_pix2pixhd);\n\nvar _pix2pixhd3 = require('./views/pix2pixhd.show');\n\nvar _pix2pixhd4 = _interopRequireDefault(_pix2pixhd3);\n\nvar _pix2pixhd5 = require('./views/pix2pixhd.results');\n\nvar _pix2pixhd6 = _interopRequireDefault(_pix2pixhd5);\n\nvar _pix2pixhd7 = require('./views/pix2pixhd.train');\n\nvar _pix2pixhd8 = _interopRequireDefault(_pix2pixhd7);\n\nvar _pix2pixhd9 = require('./views/pix2pixhd.live');\n\nvar _pix2pixhd10 = _interopRequireDefault(_pix2pixhd9);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar router = function () {\n  function router() {\n    _classCallCheck(this, router);\n  }\n\n  _createClass(router, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      _actions2.default.system.changeTool('pix2pixhd');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #def, #dfe)';\n    }\n  }, {\n    key: 'componentWillReceiveProps',\n    value: function componentWillReceiveProps() {\n      _actions2.default.system.changeTool('pix2pixhd');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #def, #dfe)';\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'section',\n        null,\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pixhd/new/', component: _pix2pixhd2.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pixhd/sequences/', component: _pix2pixhd4.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pixhd/sequences/:id/', component: _pix2pixhd4.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pixhd/train/', component: _pix2pixhd8.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pixhd/results/', component: _pix2pixhd6.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2pixhd/live/', component: _pix2pixhd10.default })\n      );\n    }\n  }]);\n\n  return router;\n}();\n\nfunction links() {\n  return [{ url: '/pix2pixhd/new/', name: 'folders' }, { url: '/pix2pixhd/sequences/', name: 'sequences' }, { url: '/pix2pixhd/train/', name: 'checkpoints' }, { url: '/pix2pixhd/results/', name: 'results' }, { url: '/pix2pixhd/live/', name: 'live' }];\n}\n\nexports.default = {\n  name: 'pix2pixhd',\n  router: router, links: links\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.count_dataset = exports.list_epochs = exports.load_results = exports.load_directories = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.loader');\n\nvar datasetLoader = _interopRequireWildcard(_dataset);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2pixhd = require('./pix2pixhd.module');\n\nvar _pix2pixhd2 = _interopRequireDefault(_pix2pixhd);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar load_directories = exports.load_directories = function load_directories(id) {\n  return function (dispatch) {\n    var module = _pix2pixhd2.default.name;\n    _util2.default.allProgress([datasetLoader.load(module), _actions2.default.socket.list_directory({ module: module, dir: 'sequences' }), _actions2.default.socket.list_directory({ module: module, dir: 'datasets' }), _actions2.default.socket.list_directory({ module: module, dir: 'checkpoints' })], function (percent, i, n) {\n      console.log('pix2pixhd load progress', i, n);\n      dispatch({\n        type: _types2.default.app.load_progress,\n        progress: { i: i, n: n },\n        data: { module: 'pix2pixhd' }\n      });\n    }).then(function (res) {\n      var _res = _slicedToArray(res, 4),\n          datasetApiReport = _res[0],\n          sequences = _res[1],\n          datasets = _res[2],\n          checkpoints = _res[3]; //, datasets, results, output, datasetUsage, lossReport] = res\n\n\n      var folderLookup = datasetApiReport.folderLookup,\n          fileLookup = datasetApiReport.fileLookup,\n          datasetLookup = datasetApiReport.datasetLookup,\n          folders = datasetApiReport.folders,\n          files = datasetApiReport.files,\n          unsortedFolder = datasetApiReport.unsortedFolder,\n          resultsFolder = datasetApiReport.resultsFolder;\n      // console.log(datasetUsage)\n\n      var sequenceDirectories = sequences.filter(function (s) {\n        return s.dir;\n      });\n      // console.log(sequenceDirectories)\n      sequenceDirectories.forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.isBuilt = true;\n        // console.log(dir.name, dataset)\n      });\n\n      datasets.filter(function (s) {\n        return s.dir;\n      }).forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.hasDataset = true;\n      });\n\n      var checkpointDirectories = checkpoints.filter(function (s) {\n        return s.dir;\n      });\n      checkpointDirectories.forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.hasCheckpoints = true;\n        dataset.checkpoints = [dir];\n      });\n\n      // console.log(res)\n\n      // flatDatasets.forEach(file => {\n      //   file.uuid = uuidv1()\n      //   fileLookup[file.uuid] = file\n      //   const name = file.name.split('.')[0]\n      //   const dataset = datasetLoader.getDataset(module, datasetLookup, name, unsortedFolder, file.date)\n      //   file.persisted = false\n      //   dataset.input.push(file.uuid)\n      // })\n\n      // // exp:coccokit_3-frame_sizes:8,2-n_rnn:2-dataset:coccokit_3\n      // const checkpoints = results.filter(s => s.dir).map(s => {\n      //   const checkpoint = s.name\n      //     .split('-')\n      //     .map(s => s.split(':'))\n      //     .filter(b => b.length && b[1])\n      //     .reduce((a,b) => (a[b[0]] = b[1]) && a, {})\n      //   checkpoint.name = checkpoint.name || checkpoint.dataset || checkpoint.exp\n      //   checkpoint.date = s.date\n      //   checkpoint.dir = s\n      //   checkpoint.persisted = false\n      //   const dataset = datasetLoader.getDataset(module, datasetLookup, checkpoint.name, unsortedFolder, checkpoint.date)\n      //   const loss = lossReport[checkpoint.name]\n      //   if (loss) {\n      //     dataset.epoch = checkpoint.epoch = loss.length\n      //     checkpoint.training_loss = loss\n      //   }\n      //   dataset.checkpoints.push(checkpoint)\n      //   return checkpoint\n      // })\n\n      // output.map(file => {\n      //   file.uuid = uuidv1()\n      //   fileLookup[file.uuid] = file\n      //   const pair = file.name.split('.')[0].split('-')\n      //   const dataset = datasetLoader.getDataset(module, datasetLookup, pair[0], unsortedFolder, file.date)\n      //   file.persisted = false\n      //   file.epoch = parseInt(file.epoch || pair[1].replace(/^\\D+/, '')) || 0\n      //   dataset.epoch = Math.max(file.epoch, dataset.epoch || 0)\n      //   // here check if the file exists in dataset, if so just check that it's persisted\n      //   const found = dataset.output.some(file_id => {\n      //     // if (f.name === \n      //     if (fileLookup[file_id].name === file.name) {\n      //       fileLookup[file_id].persisted = true\n      //       return true\n      //     }\n      //     return false\n      //   })\n      //   if (! found) {\n      //     dataset.output.push(file.uuid)\n      //   }\n      // })\n\n      dispatch({\n        type: _types2.default.dataset.load,\n        data: {\n          module: module,\n          folderLookup: folderLookup,\n          fileLookup: fileLookup,\n          datasetLookup: datasetLookup,\n          folders: folders, files: files,\n          sequences: sequenceDirectories,\n          datasets: datasets,\n          checkpoints: checkpointDirectories,\n          resultsFolder: resultsFolder\n        }\n      });\n      if (id) {\n        console.log('folder id', id);\n        dispatch({\n          type: _types2.default.dataset.set_folder,\n          data: {\n            folder_id: id,\n            module: module\n          }\n        });\n      }\n    }).catch(function (e) {\n      console.error(e);\n    });\n    if (id) {\n      console.log('folder id', id);\n      dispatch({\n        type: _types2.default.dataset.set_folder,\n        data: {\n          folder_id: id,\n          module: module\n        }\n      });\n    }\n  };\n};\n\nvar load_results = exports.load_results = function load_results(id) {\n  return function (dispatch) {\n    var module = _pix2pixhd2.default.name;\n    _util2.default.allProgress([_actions2.default.folder.index({ name: 'results' }), _actions2.default.file.index({ module: module, generated: 1 }), _actions2.default.socket.list_sequences({ module: module, dir: 'results' }), _actions2.default.socket.list_directory({ module: module, dir: 'renders' })], function (percent, i, n) {\n      console.log('pix2pixhd load progress', i, n);\n      dispatch({\n        type: _types2.default.app.load_progress,\n        progress: { i: i, n: n },\n        data: { module: 'pix2pixhd' }\n      });\n    }).then(function (res) {\n      var _res2 = _slicedToArray(res, 4),\n          folders = _res2[0],\n          files = _res2[1],\n          results = _res2[2],\n          renders = _res2[3]; //, datasets, results, output, datasetUsage, lossReport] = res\n\n\n      console.log(files, results, renders);\n      dispatch({\n        type: _types2.default.pix2pixhd.load_results,\n        results: {\n          resultsFolder: folders[0],\n          files: files,\n          results: results,\n          renders: renders\n        }\n      });\n    });\n  };\n};\n\nvar G_NET_REGEXP = new RegExp('_net_G.pth$');\n\nvar list_epochs = exports.list_epochs = function list_epochs(checkpoint_name) {\n  return function (dispatch) {\n    var module = _pix2pixhd2.default.name;\n    _actions2.default.socket.list_directory({ module: module, dir: 'checkpoints/' + checkpoint_name }).then(function (files) {\n      // console.log(files)\n      var epochs = files.map(function (f) {\n        if (!f.name.match(G_NET_REGEXP)) return null;\n        return f.name.replace(G_NET_REGEXP, '');\n      }).filter(function (f) {\n        return !!f;\n      });\n      // console.log(epochs)\n      dispatch({\n        type: _types2.default.dataset.list_epochs,\n        data: {\n          epochs: epochs,\n          module: module\n        }\n      });\n    });\n  };\n};\n\nvar count_dataset = exports.count_dataset = function count_dataset(checkpoint_name) {\n  return function (dispatch) {\n    var module = _pix2pixhd2.default.name;\n    _util2.default.allProgress([_actions2.default.socket.count_directory({ module: module, dir: 'sequences/' + checkpoint_name + '/' }), _actions2.default.socket.count_directory({ module: module, dir: 'datasets/' + checkpoint_name + '/train_A/' })], function (percent, i, n) {\n      console.log('pix2pixhd load progress', i, n);\n      dispatch({\n        type: _types2.default.app.load_progress,\n        progress: { i: i, n: n },\n        data: { module: 'pix2pixhd' }\n      });\n    }).then(function (res) {\n      var _res3 = _slicedToArray(res, 2),\n          sequenceCount = _res3[0],\n          datasetCount = _res3[1]; //, datasets, results, output, datasetUsage, lossReport] = res\n\n\n      console.log(sequenceCount, datasetCount);\n      dispatch({\n        type: _types2.default.pix2pixhd.load_dataset_count,\n        data: {\n          name: checkpoint_name,\n          sequenceCount: sequenceCount,\n          datasetCount: datasetCount\n        }\n      });\n    });\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nvar pix2pixhdModule = {\n  name: 'pix2pixhd',\n  displayName: 'Pix2PixHD',\n  datatype: 'video'\n};\n\nexports.default = pix2pixhdModule;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.reducer');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar pix2pixhdInitialState = {\n  loading: true,\n  progress: { i: 0, n: 0 },\n  error: null,\n  folder_id: 0,\n  data: null,\n  results: null,\n  checkpoint: {\n    name: '',\n    sequenceCount: 0,\n    datasetCount: 0\n  }\n};\n\nvar pix2pixhdReducer = function pix2pixhdReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : pix2pixhdInitialState;\n  var action = arguments[1];\n\n  if (action.data && action.data.module === 'pix2pixhd') {\n    state = (0, _dataset2.default)(state, action);\n  }\n\n  switch (action.type) {\n    case _types2.default.pix2pixhd.load_results:\n      return _extends({}, state, {\n        results: action.results\n      });\n    case _types2.default.pix2pixhd.load_dataset_count:\n      return _extends({}, state, {\n        checkpoint: action.data\n      });\n    case _types2.default.file.destroy:\n      console.log('file destroy', state.results);\n      return _extends({}, state, {\n        results: _extends({}, state.results, {\n          files: state.results.files.filter(function (f) {\n            return f.id !== action.data.id;\n          })\n        })\n      });\n    default:\n      return state;\n  }\n};\n\nexports.default = pix2pixhdReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.clear_recursive_task = exports.augment_task = exports.live_task = exports.train_task = exports.fetch_task = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _pix2pixhd = require('./pix2pixhd.module');\n\nvar _pix2pixhd2 = _interopRequireDefault(_pix2pixhd);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar fetch_task = exports.fetch_task = function fetch_task(url, file_id, dataset) {\n  return function (dispatch) {\n    if (!url) return console.log('input file inaccessible (no url)');\n    var task = {\n      module: _pix2pixhd2.default.name,\n      activity: 'fetch',\n      dataset: dataset,\n      opt: {\n        url: url,\n        file_id: file_id,\n        dataset: dataset\n      }\n    };\n    return _actions2.default.queue.add_task(task);\n  };\n};\n\nvar train_task = exports.train_task = function train_task(dataset, folder_id) {\n  var epochs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n  return function (dispatch) {\n    var task = {\n      module: _pix2pixhd2.default.name,\n      activity: 'train',\n      dataset: dataset.name || dataset,\n      epoch: 0,\n      epochs: epochs,\n      opt: {\n        folder_id: folder_id\n      }\n    };\n    if (!task.dataset) {\n      console.error(\"train task: no dataset specified\");\n      return;\n    }\n    console.log(task);\n    return _actions2.default.queue.add_task(task);\n  };\n};\n\nvar live_task = exports.live_task = function live_task(sequence, checkpoint, opt) {\n  return function (dispatch) {\n    var task = {\n      module: _pix2pixhd2.default.name,\n      activity: 'live',\n      dataset: sequence,\n      checkpoint: checkpoint,\n      opt: _extends({}, opt, {\n        poll_delay: 0.01\n      })\n    };\n    console.log(task);\n    console.log('add live task');\n    return _actions2.default.queue.add_task(task);\n  };\n};\n\nvar augment_task = exports.augment_task = function augment_task(dataset, opt) {\n  return function (dispatch) {\n    var task = {\n      module: _pix2pixhd2.default.name,\n      activity: 'augment',\n      dataset: dataset,\n      folder_id: opt.folder_id,\n      opt: _extends({}, opt)\n    };\n    console.log(task);\n    console.log('add augment task');\n    return _actions2.default.queue.add_task(task);\n  };\n};\n\nvar clear_recursive_task = exports.clear_recursive_task = function clear_recursive_task(dataset) {\n  return function (dispatch) {\n    var task = {\n      module: _pix2pixhd2.default.name,\n      activity: 'clear_recursive',\n      dataset: dataset\n    };\n    console.log(task);\n    console.log('add clear recursive task');\n    return _actions2.default.queue.add_task(task);\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _common = require('../../../common/');\n\nvar _player = require('../../../live/player');\n\nvar _live = require('../../../live/live.actions');\n\nvar liveActions = _interopRequireWildcard(_live);\n\nvar _queue = require('../../../queue/queue.actions');\n\nvar queueActions = _interopRequireWildcard(_queue);\n\nvar _pix2pixhd = require('../pix2pixhd.tasks');\n\nvar pix2pixhdTasks = _interopRequireWildcard(_pix2pixhd);\n\nvar _pix2pixhd2 = require('../pix2pixhd.actions');\n\nvar pix2pixhdActions = _interopRequireWildcard(_pix2pixhd2);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Pix2PixHDLive = function (_Component) {\n  _inherits(Pix2PixHDLive, _Component);\n\n  function Pix2PixHDLive(props) {\n    _classCallCheck(this, Pix2PixHDLive);\n\n    // if (! props.pix2pixhd || ! props.pix2pixhd.data) {\n    var _this = _possibleConstructorReturn(this, (Pix2PixHDLive.__proto__ || Object.getPrototypeOf(Pix2PixHDLive)).call(this));\n\n    props.actions.pix2pixhd.load_directories();\n    // }\n    props.actions.live.get_params();\n    // props.actions.live.list_checkpoints('pix2pixhd')\n    // props.actions.live.list_sequences('pix2pixhd')\n    _this.changeCheckpoint = _this.changeCheckpoint.bind(_this);\n    _this.changeEpoch = _this.changeEpoch.bind(_this);\n    _this.changeSequence = _this.changeSequence.bind(_this);\n    _this.seek = _this.seek.bind(_this);\n    _this.togglePlaying = _this.togglePlaying.bind(_this);\n    _this.toggleRecording = _this.toggleRecording.bind(_this);\n    _this.handleKeydown = _this.handleKeydown.bind(_this);\n    return _this;\n  }\n\n  _createClass(Pix2PixHDLive, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      document.addEventListener('keydown', this.handleKeydown);\n    }\n  }, {\n    key: 'componentWillUnmount',\n    value: function componentWillUnmount() {\n      document.removeEventListener('keydown', this.handleKeydown);\n    }\n  }, {\n    key: 'componentWillUpdate',\n    value: function componentWillUpdate(nextProps) {\n      if (nextProps.opt.checkpoint_name && nextProps.opt.checkpoint_name !== this.props.opt.checkpoint_name) {\n        console.log('listing epochs');\n        this.props.actions.live.list_epochs('pix2pixhd', nextProps.opt.checkpoint_name);\n      }\n    }\n  }, {\n    key: 'handleKeydown',\n    value: function handleKeydown(e) {\n      console.log(e.keyCode);\n      if (e.altKey || e.ctrlKey || e.metaKey) return;\n      switch (e.keyCode) {\n        case 27:\n          // esc\n          e.preventDefault();\n          this.props.actions.live.set_fullscreen(!this.props.fullscreen);\n          break;\n        default:\n          break;\n      }\n    }\n  }, {\n    key: 'changeCheckpoint',\n    value: function changeCheckpoint(field, checkpoint_name) {\n      this.props.actions.live.load_epoch(checkpoint_name, 'latest');\n    }\n  }, {\n    key: 'changeEpoch',\n    value: function changeEpoch(field, epoch_name) {\n      this.props.actions.live.load_epoch(this.props.opt.checkpoint_name, epoch_name);\n    }\n  }, {\n    key: 'changeSequence',\n    value: function changeSequence(field, sequence) {\n      console.log('load sequence', sequence);\n      this.props.actions.live.load_sequence(sequence);\n    }\n  }, {\n    key: 'seek',\n    value: function seek(percentage) {\n      var frame = Math.floor(percentage * (parseInt(this.props.frame.sequence_len) || 1) + 1);\n      console.log(\"seek to frame\", percentage, frame);\n      this.props.actions.live.seek(frame);\n    }\n  }, {\n    key: 'start',\n    value: function start() {\n      console.log(this.props.opt);\n      var sequence = this.props.opt.sequence_name || this.props.pix2pixhd.data.sequences[0].name;\n      var checkpoint = this.props.opt.checkpoint_name || this.props.pix2pixhd.data.checkpoints[0].name;\n      console.log('starting up!', sequence, checkpoint);\n      this.props.actions.tasks.live_task(sequence, checkpoint, {\n        folder_id: this.props.pix2pixhd.data.resultsFolder.id\n      });\n    }\n  }, {\n    key: 'interrupt',\n    value: function interrupt() {\n      this.props.actions.queue.stop_task('gpu');\n    }\n  }, {\n    key: 'togglePlaying',\n    value: function togglePlaying() {\n      if (this.props.opt.processing) {\n        this.props.actions.live.pause();\n      } else {\n        this.props.actions.live.play();\n      }\n    }\n  }, {\n    key: 'toggleRecording',\n    value: function toggleRecording() {\n      if (this.props.opt.recording) {\n        (0, _player.stopRecording)();\n        this.props.actions.live.pause();\n      } else {\n        (0, _player.startRecording)();\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      // console.log(this.props)\n      if (this.props.pix2pixhd.loading) {\n        return (0, _preact.h)(_common.Loading, { progress: this.props.pix2pixhd.progress });\n      }\n      var _props$pix2pixhd$data = this.props.pix2pixhd.data,\n          folderLookup = _props$pix2pixhd$data.folderLookup,\n          datasetLookup = _props$pix2pixhd$data.datasetLookup,\n          sequences = _props$pix2pixhd$data.sequences;\n\n\n      var sequenceLookup = sequences.reduce(function (a, b) {\n        a[b.name] = true;\n        return a;\n      }, {});\n\n      var sequenceGroups = Object.keys(folderLookup).map(function (id) {\n        var folder = _this2.props.pix2pixhd.data.folderLookup[id];\n        if (folder.name === 'results') return;\n        var datasets = folder.datasets.map(function (name) {\n          var sequence = sequenceLookup[name];\n          if (sequence) {\n            return name;\n          }\n          return null;\n        }).filter(function (n) {\n          return !!n;\n        });\n        return {\n          name: folder.name,\n          options: datasets.sort()\n        };\n      }).filter(function (n) {\n        return !!n && !!n.options.length;\n      }).sort(function (a, b) {\n        return a.name.localeCompare(b.name);\n      });\n\n      var checkpointGroups = Object.keys(folderLookup).map(function (id) {\n        var folder = _this2.props.pix2pixhd.data.folderLookup[id];\n        if (folder.name === 'results') return;\n        var datasets = folder.datasets.map(function (name) {\n          var dataset = datasetLookup[name];\n          if (dataset.checkpoints.length) {\n            return name;\n          }\n          return null;\n        }).filter(function (n) {\n          return !!n;\n        });\n        return {\n          name: folder.name,\n          options: datasets.sort()\n        };\n      }).filter(function (n) {\n        return !!n && !!n.options.length;\n      }).sort(function (a, b) {\n        return a.name.localeCompare(b.name);\n      });\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'app live centered' },\n        (0, _preact.h)(_common.Player, { width: 424, height: 256, fullscreen: this.props.fullscreen }),\n        (0, _preact.h)(\n          'div',\n          { className: 'params row' },\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Network',\n                noToggle: true\n              },\n              (0, _preact.h)(_common.Select, { live: true,\n                name: 'send_image',\n                title: 'view mode',\n                options: ['a', 'b', 'sequence', 'recursive'],\n                onChange: this.props.actions.live.set_param\n              }),\n              (0, _preact.h)(_common.SelectGroup, { live: true,\n                name: 'sequence_name',\n                title: 'sequence',\n                options: sequenceGroups,\n                onChange: this.changeSequence\n              }),\n              (0, _preact.h)(_common.SelectGroup, { live: true,\n                name: 'checkpoint_name',\n                title: 'checkpoint',\n                options: checkpointGroups,\n                onChange: this.changeCheckpoint\n              }),\n              (0, _preact.h)(_common.Select, { live: true,\n                name: 'epoch',\n                title: 'epoch',\n                options: this.props.epochs,\n                onChange: this.changeEpoch\n              })\n            ),\n            (0, _preact.h)(\n              'div',\n              null,\n              (0, _preact.h)(\n                _common.ParamGroup,\n                {\n                  title: 'Playback',\n                  name: 'sequence_playing'\n                },\n                (0, _preact.h)(_common.Slider, {\n                  name: 'position',\n                  min: 0.0, max: 1.0, type: 'float',\n                  value: (this.props.frame.sequence_i || 0) / (this.props.frame.sequence_len || 1),\n                  onChange: this.seek\n                }),\n                (0, _preact.h)(_common.Slider, { live: true,\n                  title: 'playback rate',\n                  name: 'sequence_step',\n                  min: -4.0, max: 4.0, type: 'float'\n                }),\n                (0, _preact.h)(_common.Slider, { live: true,\n                  title: 'skip frames',\n                  name: 'sequence_skip',\n                  min: 0, max: 1000, type: 'int'\n                }),\n                (0, _preact.h)(_common.Slider, { live: true,\n                  title: 'fade sequence',\n                  name: 'fade_sequence',\n                  min: 0, max: 4.0, type: 'float'\n                }),\n                (0, _preact.h)(_common.Slider, { live: true,\n                  name: 'frame_delay',\n                  min: 0.0, max: 2.0, type: 'float'\n                })\n              )\n            ),\n            (0, _preact.h)(\n              _common.Group,\n              null,\n              this.renderRestartButton(),\n              this.renderLiveButtons(),\n              this.renderRecordButton(),\n              (0, _preact.h)(\n                'p',\n                { 'class': 'last_message' },\n                this.props.last_message\n              )\n            )\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Transition',\n                name: 'transition'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'transition_period',\n                min: 10, max: 5000, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'transition_min',\n                min: 0.001, max: 0.2, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'transition_max',\n                min: 0.1, max: 1.0, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Recursion',\n                name: 'recursive'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'recursive_frac',\n                min: 0.0, max: 0.5, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'recurse_roll',\n                min: -64, max: 64, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'recurse_roll_axis',\n                min: 0, max: 1, type: 'int'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Sequence',\n                name: 'sequence'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'sequence_frac',\n                min: 0.0, max: 1.0, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'process_frac',\n                min: 0, max: 1, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Transform',\n                name: 'transform'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'rotate',\n                min: -1, max: 1, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'scale',\n                min: 0.9, max: 1.1, type: 'float'\n              })\n            )\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Clahe',\n                name: 'clahe'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'clip_limit',\n                min: 1.0, max: 4.0, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Posterize',\n                name: 'posterize'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'spatial_window',\n                min: 2, max: 128, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'color_window',\n                min: 2, max: 128, type: 'int'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Blur',\n                name: 'blur'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'blur_radius',\n                min: 3, max: 7, type: 'odd'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'blur_sigma',\n                min: 0, max: 2, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Canny Edge Detection',\n                name: 'canny'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'canny_lo',\n                min: 10, max: 200, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'canny_hi',\n                min: 10, max: 200, type: 'int'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Hue / Saturation',\n                name: 'hsl'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'hue',\n                min: -127, max: 127, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'saturation',\n                min: -255, max: 255, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'luminosity',\n                min: -255, max: 255, type: 'int'\n              })\n            )\n          )\n        )\n      );\n    }\n  }, {\n    key: 'renderRestartButton',\n    value: function renderRestartButton() {\n      var _this3 = this;\n\n      // console.log(this.props.runner.gpu)\n      if (this.props.runner.gpu.status === 'IDLE') {\n        return (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'GPU Idle',\n            onClick: function onClick() {\n              return _this3.start();\n            }\n          },\n          'Start'\n        );\n      }\n      if (this.props.runner.gpu.task.module !== 'pix2pixhd') {\n        return (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'GPU Busy',\n            onClick: function onClick() {\n              return _this3.interrupt();\n            }\n          },\n          'Interrupt'\n        );\n      }\n      if (!this.props.opt.processing) {\n        return (0, _preact.h)(\n          'div',\n          null,\n          (0, _preact.h)(\n            _common.Button,\n            {\n              title: 'Not processing',\n              onClick: this.togglePlaying\n            },\n            'Restart'\n          ),\n          (0, _preact.h)(\n            _common.Button,\n            {\n              title: 'GPU Busy',\n              onClick: function onClick() {\n                return _this3.interrupt();\n              }\n            },\n            'Interrupt'\n          )\n        );\n      }\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'Processing',\n            onClick: this.togglePlaying\n          },\n          'Stop'\n        ),\n        (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'GPU Busy',\n            onClick: function onClick() {\n              return _this3.interrupt();\n            }\n          },\n          'Interrupt'\n        )\n      );\n    }\n  }, {\n    key: 'renderRecordButton',\n    value: function renderRecordButton() {\n      return null;\n      // return (\n      //   <Button\n      //     title={\n      //       this.props.opt.savingVideo\n      //       ? 'Saving video...'\n      //       : this.props.opt.recording\n      //       ? 'Recording (' + timeInSeconds(this.props.opt.recordFrames/25) +')'\n      //       : 'Record video'\n      //     }\n      //     onClick={this.toggleRecording}\n      //   >\n      //     {this.props.opt.savingVideo ? 'Saving' : this.props.opt.recording ? 'Recording' : 'Record'}\n      //   </Button>\n      // )\n    }\n  }, {\n    key: 'renderLiveButtons',\n    value: function renderLiveButtons() {\n      var _this4 = this;\n\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'Save frame',\n            onClick: _player.saveFrame\n          },\n          'Save'\n        ),\n        (0, _preact.h)(\n          _common.ParamGroup,\n          {\n            title: 'Record video',\n            name: 'store_b',\n            noDim: true,\n            onToggle: function onToggle(value) {\n              // now storing frames on server...\n            }\n          },\n          (0, _preact.h)(_common.TextInput, {\n            title: 'Video name',\n            name: 'final_tag',\n            value: this.props.opt.final_tag,\n            onSave: function onSave(value) {\n              _this4.props.actions.live.set_param('final_tag', value);\n            }\n          })\n        )\n      );\n    }\n  }]);\n\n  return Pix2PixHDLive;\n}(_preact.Component);\n\nfunction timeInSeconds(n) {\n  return n.toFixed(1) + ' s.';\n}\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    last_message: state.live.last_message,\n    fullscreen: state.live.fullscreen,\n    opt: state.live.opt,\n    frame: state.live.frame,\n    checkpoints: state.live.checkpoints,\n    epochs: state.live.epochs,\n    sequences: state.live.sequences,\n    runner: state.system.runner,\n    pix2pixhd: state.module.pix2pixhd\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: {\n      live: (0, _redux.bindActionCreators)(liveActions, dispatch),\n      queue: (0, _redux.bindActionCreators)(queueActions, dispatch),\n      pix2pixhd: (0, _redux.bindActionCreators)(pix2pixhdActions, dispatch),\n      tasks: (0, _redux.bindActionCreators)(pix2pixhdTasks, dispatch), s: s\n    }\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2PixHDLive);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _common = require('../../../common');\n\nvar _pix2pixhd = require('../pix2pixhd.actions');\n\nvar pix2pixhdActions = _interopRequireWildcard(_pix2pixhd);\n\nvar _pix2pixhd2 = require('../pix2pixhd.module');\n\nvar _pix2pixhd3 = _interopRequireDefault(_pix2pixhd2);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction Pix2PixHDNew(props) {\n  return (0, _preact.h)(_common.Views.New, {\n    db: props.pix2pixhd,\n    path: '/pix2pixhd/sequences/',\n    actions: props.actions,\n    module: _pix2pixhd3.default,\n    history: props.history\n  });\n}\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    pix2pixhd: state.module.pix2pixhd\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(pix2pixhdActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2PixHDNew);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _actions = require('../../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _pix2pixhd = require('../pix2pixhd.actions');\n\nvar pix2pixhdActions = _interopRequireWildcard(_pix2pixhd);\n\nvar _pix2pixhd2 = require('../pix2pixhd.tasks');\n\nvar pix2pixhdTasks = _interopRequireWildcard(_pix2pixhd2);\n\nvar _loading = require('../../../common/loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nvar _fileList = require('../../../common/fileList.component');\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar yes_count = 0;\n\nvar Pix2pixHDResults = function (_Component) {\n  _inherits(Pix2pixHDResults, _Component);\n\n  function Pix2pixHDResults(props) {\n    _classCallCheck(this, Pix2pixHDResults);\n\n    var _this = _possibleConstructorReturn(this, (Pix2pixHDResults.__proto__ || Object.getPrototypeOf(Pix2pixHDResults)).call(this));\n\n    if (!props.pix2pixhd.results) props.actions.load_results();\n    return _this;\n  }\n\n  _createClass(Pix2pixHDResults, [{\n    key: 'componentDidMount',\n    value: function componentDidMount() {\n      yes_count = 0;\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      if (!this.props.pix2pixhd.results) return (0, _preact.h)(_loading2.default, { progress: this.props.pix2pixhd.progress });\n\n      var _props$pix2pixhd$resu = this.props.pix2pixhd.results,\n          resultsFolder = _props$pix2pixhd$resu.resultsFolder,\n          results = _props$pix2pixhd$resu.results,\n          renders = _props$pix2pixhd$resu.renders,\n          files = _props$pix2pixhd$resu.files;\n      // console.log(resultsFolder, results)\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'app pix2pixhd' },\n        (0, _preact.h)(\n          'div',\n          { className: 'heading row middle' },\n          (0, _preact.h)(\n            'h1',\n            null,\n            'Pix2PixHD Results'\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { 'class': 'rows params renders' },\n          (0, _preact.h)(_fileList.FileList, {\n            linkFiles: true,\n            files: files,\n            orderBy: 'date desc',\n            fields: 'name date size delete',\n            onDelete: function onDelete(file) {\n              var yes = void 0;\n              if (yes_count < 3) {\n                yes = confirm('Are you sure you want to delete this file?');\n              } else {\n                yes = true;\n              }\n              if (yes) {\n                yes_count += 1;\n                console.log('delete: confirmed');\n                _actions2.default.file.destroy(file);\n              }\n            }\n          }),\n          (0, _preact.h)('br', null),\n          (0, _preact.h)(\n            'h3',\n            null,\n            'renders on server'\n          ),\n          (0, _preact.h)(_fileList.FileList, {\n            files: renders,\n            orderBy: 'date desc',\n            fields: 'name date size',\n            onClick: function onClick(file, e) {\n              e.preventDefault();\n              e.stopPropagation();\n              console.log('picked a result', file);\n              _this2.handlePick(file);\n            }\n          }),\n          (0, _preact.h)('br', null),\n          (0, _preact.h)(\n            'h3',\n            null,\n            'folders on server'\n          ),\n          (0, _preact.h)(_fileList.FileList, {\n            files: results,\n            orderBy: 'date desc',\n            fields: 'name date count',\n            onClick: function onClick(file, e) {\n              e.preventDefault();\n              e.stopPropagation();\n              console.log('picked a result', file);\n              _this2.handlePick(file);\n            }\n          })\n        )\n      );\n    }\n  }, {\n    key: 'handlePick',\n    value: function handlePick(file) {\n      // this.props.audioPlayer.play(file)\n    }\n  }]);\n\n  return Pix2pixHDResults;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    pix2pixhd: state.module.pix2pixhd\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(pix2pixhdActions, dispatch),\n    remote: (0, _redux.bindActionCreators)(pix2pixhdTasks, dispatch)\n    // audioPlayer: bindActionCreators(audioPlayerActions, dispatch),\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2pixHDResults);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2pixhd = require('../pix2pixhd.actions');\n\nvar pix2pixhdActions = _interopRequireWildcard(_pix2pixhd);\n\nvar _pix2pixhd2 = require('../pix2pixhd.tasks');\n\nvar pix2pixhdTasks = _interopRequireWildcard(_pix2pixhd2);\n\nvar _common = require('../../../common');\n\nvar _dataset = require('../../../dataset/dataset.form');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nvar _dataset3 = require('../../../dataset/dataset.new');\n\nvar _dataset4 = _interopRequireDefault(_dataset3);\n\nvar _upload = require('../../../dataset/upload.status');\n\nvar _upload2 = _interopRequireDefault(_upload);\n\nvar _dataset5 = require('../../../dataset/dataset.component');\n\nvar _dataset6 = _interopRequireDefault(_dataset5);\n\nvar _pix2pixhd3 = require('../pix2pixhd.module');\n\nvar _pix2pixhd4 = _interopRequireDefault(_pix2pixhd3);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Pix2PixHDShow = function (_Component) {\n  _inherits(Pix2PixHDShow, _Component);\n\n  function Pix2PixHDShow(props) {\n    _classCallCheck(this, Pix2PixHDShow);\n\n    var _this = _possibleConstructorReturn(this, (Pix2PixHDShow.__proto__ || Object.getPrototypeOf(Pix2PixHDShow)).call(this, props));\n\n    _this.datasetActions = _this.datasetActions.bind(_this);\n    return _this;\n  }\n\n  _createClass(Pix2PixHDShow, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      var id = this.props.match.params.id || localStorage.getItem('pix2pixhd.last_id');\n      console.log('load dataset:', id);\n      var _props = this.props,\n          match = _props.match,\n          pix2pixhd = _props.pix2pixhd,\n          actions = _props.actions;\n\n      if (id === 'new') return;\n      if (id) {\n        if (parseInt(id)) localStorage.setItem('pix2pixhd.last_id', id);\n        if (!pix2pixhd.folder || pix2pixhd.folder.id !== id) {\n          actions.load_directories(id);\n        }\n      } else {\n        this.props.history.push('/pix2pixhd/new/');\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props2 = this.props,\n          pix2pixhd = _props2.pix2pixhd,\n          match = _props2.match,\n          history = _props2.history;\n\n      var _ref = pix2pixhd.data || {},\n          folderLookup = _ref.folderLookup;\n\n      var folder = (folderLookup || {})[pix2pixhd.folder_id] || {};\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'app pix2pixhd' },\n        (0, _preact.h)(\n          'div',\n          { 'class': 'heading' },\n          (0, _preact.h)(\n            'div',\n            { 'class': 'spaced' },\n            (0, _preact.h)(\n              'h1',\n              null,\n              folder ? folder.name : (0, _preact.h)(_common.Loading, null)\n            ),\n            (0, _preact.h)(_upload2.default, null)\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { className: 'row' },\n          folder && folder.name && folder.name !== 'unsorted' && (0, _preact.h)(_dataset2.default, {\n            title: 'Add Files',\n            module: _pix2pixhd4.default,\n            folder: folder,\n            canUpload: true, canAddURL: true\n          }),\n          (0, _preact.h)(\n            'div',\n            null,\n            (0, _preact.h)(_upload2.default, null),\n            (0, _preact.h)(_common.CurrentTask, null)\n          )\n        ),\n        (0, _preact.h)(_dataset6.default, {\n          loading: pix2pixhd.loading,\n          progress: pix2pixhd.progress,\n          id: pix2pixhd.folder_id,\n          module: _pix2pixhd4.default,\n          data: pix2pixhd.data,\n          folder: folder,\n          history: history,\n          onPickFile: function onPickFile(file, e) {\n            e.preventDefault();\n            e.stopPropagation();\n            console.log('picked a file', file);\n          },\n          datasetActions: this.datasetActions\n        })\n      );\n    }\n  }, {\n    key: 'datasetActions',\n    value: function datasetActions(dataset) {\n      var isFetching = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      var isProcessing = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n      var _props3 = this.props,\n          pix2pixhd = _props3.pix2pixhd,\n          remote = _props3.remote;\n\n      var input = pix2pixhd.data.fileLookup[dataset.input[0]];\n      if (!input) return null;\n      if (input.name && input.name.match(/(gif|jpe?g|png)$/i)) return null;\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)(\n          'div',\n          { 'class': 'actions' },\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pixhd.folder_id, 1);\n              } },\n            'train'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pixhd.folder_id, 5);\n              } },\n            '5x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pixhd.folder_id, 10);\n              } },\n            '10x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pixhd.folder_id, 20);\n              } },\n            '20x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2pixhd.folder_id, 50);\n              } },\n            '50x'\n          )\n        ),\n        dataset.isBuilt ? (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          'fetched ',\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.clear_cache_task(dataset);\n              } },\n            'rm'\n          )\n        ) : isFetching ? (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          'fetching'\n        ) : (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.fetch_task(input.url, input.id, dataset.name);\n              } },\n            'fetch'\n          )\n        )\n      );\n    }\n  }]);\n\n  return Pix2PixHDShow;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    pix2pixhd: state.module.pix2pixhd\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(pix2pixhdActions, dispatch),\n    remote: (0, _redux.bindActionCreators)(pix2pixhdTasks, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2PixHDShow);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2pixhd = require('../pix2pixhd.actions');\n\nvar pix2pixhdActions = _interopRequireWildcard(_pix2pixhd);\n\nvar _pix2pixhd2 = require('../pix2pixhd.tasks');\n\nvar pix2pixhdTasks = _interopRequireWildcard(_pix2pixhd2);\n\nvar _common = require('../../../common');\n\nvar _dataset = require('../../../dataset/dataset.form');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nvar _dataset3 = require('../../../dataset/dataset.new');\n\nvar _dataset4 = _interopRequireDefault(_dataset3);\n\nvar _upload = require('../../../dataset/upload.status');\n\nvar _upload2 = _interopRequireDefault(_upload);\n\nvar _dataset5 = require('../../../dataset/dataset.component');\n\nvar _dataset6 = _interopRequireDefault(_dataset5);\n\nvar _pix2pixhd3 = require('../pix2pixhd.module');\n\nvar _pix2pixhd4 = _interopRequireDefault(_pix2pixhd3);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Pix2PixHDTrain = function (_Component) {\n  _inherits(Pix2PixHDTrain, _Component);\n\n  function Pix2PixHDTrain(props) {\n    _classCallCheck(this, Pix2PixHDTrain);\n\n    var _this = _possibleConstructorReturn(this, (Pix2PixHDTrain.__proto__ || Object.getPrototypeOf(Pix2PixHDTrain)).call(this, props));\n\n    _this.handleChange = _this.handleChange.bind(_this);\n    _this.state = {\n      checkpoint_name: 'PLACEHOLDER',\n      epoch: 'latest',\n      augment_name: '',\n      augment_take: 100,\n      augment_make: 20\n    };\n    return _this;\n  }\n\n  _createClass(Pix2PixHDTrain, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      var id = this.props.match.params.id || localStorage.getItem('pix2pixhd.last_id');\n      console.log('load dataset:', id);\n      var _props = this.props,\n          match = _props.match,\n          pix2pixhd = _props.pix2pixhd,\n          actions = _props.actions;\n\n      if (id === 'new') return;\n      if (id) {\n        if (parseInt(id)) localStorage.setItem('pix2pixhd.last_id', id);\n        if (!pix2pixhd.folder || pix2pixhd.folder.id !== id) {\n          actions.load_directories(id);\n        }\n      } else {\n        this.props.history.push('/pix2pixhd/new/');\n      }\n    }\n  }, {\n    key: 'componentDidUpdate',\n    value: function componentDidUpdate(prevProps, prevState) {\n      if (prevState.checkpoint_name !== this.state.checkpoint_name) {\n        this.setState({ epoch: 'latest' });\n        this.props.actions.list_epochs(this.state.checkpoint_name);\n        this.props.actions.count_dataset(this.state.checkpoint_name);\n      }\n    }\n  }, {\n    key: 'handleChange',\n    value: function handleChange(name, value) {\n      console.log('name', name, 'value', value);\n      this.setState(_defineProperty({}, name, value));\n    }\n  }, {\n    key: 'interrupt',\n    value: function interrupt() {\n      this.props.actions.queue.stop_task('gpu');\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      if (this.props.pix2pixhd.loading) {\n        return (0, _preact.h)(_common.Loading, { progress: this.props.pix2pixhd.progress });\n      }\n      var _props2 = this.props,\n          pix2pixhd = _props2.pix2pixhd,\n          match = _props2.match,\n          history = _props2.history,\n          queue = _props2.queue;\n\n      var _ref = pix2pixhd.data || {},\n          folderLookup = _ref.folderLookup,\n          datasetLookup = _ref.datasetLookup;\n\n      var folder = (folderLookup || {})[pix2pixhd.folder_id] || {};\n      // console.log(pix2pixhd)\n\n      var checkpointGroups = Object.keys(folderLookup).map(function (id) {\n        var folder = _this2.props.pix2pixhd.data.folderLookup[id];\n        if (folder.name === 'results') return;\n        var datasets = folder.datasets.map(function (name) {\n          var dataset = datasetLookup[name];\n          if (dataset.checkpoints.length) {\n            return name;\n          }\n          return null;\n        }).filter(function (n) {\n          return !!n;\n        });\n        return {\n          name: folder.name,\n          options: datasets.sort()\n        };\n      }).filter(function (n) {\n        return !!n && !!n.options.length;\n      }).sort(function (a, b) {\n        return a.name.localeCompare(b.name);\n      });\n\n      // console.log('state', this.props.pix2pixhd.data.epochs)\n      // console.log(this.state.checkpoint_name, this.state.epoch)\n      // console.log(queue)\n      return (0, _preact.h)(\n        'div',\n        { className: 'app pix2pixhd' },\n        (0, _preact.h)(\n          'div',\n          { className: 'heading' },\n          (0, _preact.h)(\n            'h1',\n            null,\n            'pix2pixhd training'\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { className: 'columns' },\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.Group,\n              { title: 'Dataset' },\n              (0, _preact.h)(_common.SelectGroup, {\n                name: 'checkpoint_name',\n                title: 'Dataset',\n                options: checkpointGroups,\n                onChange: this.handleChange,\n                placeholder: 'Pick a dataset',\n                value: this.state.checkpoint_name\n              }),\n              (0, _preact.h)(_common.Select, {\n                title: 'Epoch',\n                name: 'epoch',\n                options: this.props.pix2pixhd.data.epochs,\n                onChange: this.handleChange,\n                value: this.state.epoch\n              })\n            ),\n            (0, _preact.h)(\n              _common.Group,\n              { title: 'Augmentation Grid' },\n              (0, _preact.h)(_common.AugmentationGrid, {\n                checkpoint: this.props.pix2pixhd.checkpoint,\n                take: [1, 2, 3, 4, 5, 10, 15, 20, 25, 50, 75, 100, 200, 300, 400, 500, 1000],\n                make: [1, 2, 3, 4, 5, 10, 15, 20, 25, 50, 75, 100, 200],\n                onAugment: function onAugment(augment_take, augment_make) {\n                  _this2.props.remote.augment_task(_this2.state.checkpoint_name, _extends({}, _this2.state, {\n                    augment_take: augment_take,\n                    augment_make: augment_make\n                  }));\n                },\n                onTrain: function onTrain() {\n                  _this2.props.remote.train_task(_this2.state.checkpoint_name, pix2pixhd.folder_id, 1);\n                  setTimeout(function () {\n                    // auto-generate epoch demo\n                    _this2.props.remote.augment_task(_this2.state.checkpoint_name, _extends({}, _this2.state, {\n                      augment_take: 10,\n                      augment_make: 150,\n                      no_symlinks: true,\n                      mov: true,\n                      folder_id: _this2.props.pix2pixhd.data.resultsFolder.id\n                    }));\n                  }, 250);\n                }\n              })\n            ),\n            (0, _preact.h)(\n              _common.Group,\n              { title: 'Augment' },\n              (0, _preact.h)(_common.NumberInput, {\n                name: 'augment_take',\n                title: 'Pick N random frames',\n                value: this.state.augment_take,\n                onChange: this.handleChange,\n                type: 'int',\n                min: '1',\n                max: '1000'\n              }),\n              (0, _preact.h)(_common.NumberInput, {\n                name: 'augment_make',\n                title: 'Generate N recursively',\n                value: this.state.augment_make,\n                onChange: this.handleChange,\n                type: 'int',\n                min: '1',\n                max: '1000'\n              }),\n              (0, _preact.h)(_common.Button, {\n                title: 'Augment dataset',\n                value: 'Augment',\n                onClick: function onClick() {\n                  return _this2.props.remote.augment_task(_this2.state.checkpoint_name, _this2.state);\n                }\n              }),\n              (0, _preact.h)(_common.Button, {\n                title: 'Make a movie without augmenting',\n                value: 'Generate',\n                onClick: function onClick() {\n                  _this2.props.remote.augment_task(_this2.state.checkpoint_name, _extends({}, _this2.state, {\n                    no_symlinks: true,\n                    mov: true,\n                    folder_id: _this2.props.pix2pixhd.data.resultsFolder.id\n                  }));\n                }\n              })\n            ),\n            (0, _preact.h)(\n              _common.Group,\n              { title: 'Status' },\n              (0, _preact.h)(_common.Button, {\n                title: 'GPU',\n                value: this.props.runner.gpu.status === 'IDLE' ? \"Idle\" : \"Interrupt\",\n                onClick: function onClick() {\n                  return _this2.interrupt();\n                }\n              }),\n              (0, _preact.h)(_common.CurrentTask, null)\n            )\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.Group,\n              { title: 'Upcoming Tasks' },\n              (0, _preact.h)(_common.TaskList, { tasks: queue.queue.map(function (id) {\n                  return queue.tasks[id];\n                }), sort: 'date asc' })\n            )\n          )\n        )\n      );\n    }\n  }]);\n\n  return Pix2PixHDTrain;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    pix2pixhd: state.module.pix2pixhd,\n    runner: state.system.runner,\n    queue: state.queue\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(pix2pixhdActions, dispatch),\n    remote: (0, _redux.bindActionCreators)(pix2pixhdTasks, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2PixHDTrain);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2wav = require('./views/pix2wav.new');\n\nvar _pix2wav2 = _interopRequireDefault(_pix2wav);\n\nvar _pix2wav3 = require('./views/pix2wav.show');\n\nvar _pix2wav4 = _interopRequireDefault(_pix2wav3);\n\nvar _pix2wav5 = require('./views/pix2wav.live');\n\nvar _pix2wav6 = _interopRequireDefault(_pix2wav5);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar router = function () {\n  function router() {\n    _classCallCheck(this, router);\n  }\n\n  _createClass(router, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      _actions2.default.system.changeTool('pix2wav');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #bdf, #def)';\n    }\n  }, {\n    key: 'componentWillReceiveProps',\n    value: function componentWillReceiveProps() {\n      _actions2.default.system.changeTool('pix2wav');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #bdf, #def)';\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'section',\n        null,\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2wav/new/', component: _pix2wav2.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2wav/datasets/', component: _pix2wav4.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2wav/datasets/:id/', component: _pix2wav4.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/pix2wav/live/', component: _pix2wav6.default })\n      );\n    }\n  }]);\n\n  return router;\n}();\n\nfunction links() {\n  return [{ url: '/pix2wav/new/', name: 'new' }, { url: '/pix2wav/datasets/', name: 'datasets' }, { url: '/pix2wav/live/', name: 'live' }];\n}\n\nexports.default = {\n  name: 'pix2wav',\n  router: router, links: links\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.load_directories = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.loader');\n\nvar datasetLoader = _interopRequireWildcard(_dataset);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2wav = require('./pix2wav.module');\n\nvar _pix2wav2 = _interopRequireDefault(_pix2wav);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar load_directories = exports.load_directories = function load_directories(id) {\n  return function (dispatch) {\n    var module = _pix2wav2.default.name;\n    _util2.default.allProgress([datasetLoader.load(module), _actions2.default.socket.list_directory({ module: 'pix2pix', dir: 'sequences/pix2wav/' }), _actions2.default.socket.list_directory({ module: 'pix2pix', dir: 'datasets/pix2wav/' }), _actions2.default.socket.list_directory({ module: 'pix2pix', dir: 'checkpoints/pix2wav/' }), _actions2.default.socket.list_directory({ module: 'pix2pix', dir: 'checkpoints/pix2pix/' })], function (percent, i, n) {\n      console.log('progress', i, n);\n      dispatch({ type: _types2.default.app.load_progress, progress: { i: i, n: n } });\n    }).then(function (res) {\n      var _res = _slicedToArray(res, 5),\n          datasetApiReport = _res[0],\n          sequences = _res[1],\n          datasets = _res[2],\n          checkpoints = _res[3],\n          pix2pixCheckpoints = _res[4];\n\n      var folderLookup = datasetApiReport.folderLookup,\n          fileLookup = datasetApiReport.fileLookup,\n          datasetLookup = datasetApiReport.datasetLookup,\n          folders = datasetApiReport.folders,\n          files = datasetApiReport.files,\n          unsortedFolder = datasetApiReport.unsortedFolder;\n\n\n      var sequenceDirectories = sequences.filter(function (s) {\n        return s.dir;\n      });\n      sequenceDirectories.forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.isBuilt = true;\n      });\n\n      datasets.filter(function (s) {\n        return s.dir;\n      }).forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.hasDataset = true;\n      });\n\n      var checkpointDirectories = checkpoints.filter(function (s) {\n        return s.dir;\n      });\n      checkpointDirectories.forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.hasCheckpoints = true;\n        dir.module = 'pix2wav';\n      });\n\n      var pix2pixCheckpointDirectories = pix2pixCheckpoints.filter(function (s) {\n        return s.dir;\n      });\n      pix2pixCheckpointDirectories.forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name);\n        dataset.hasCheckpoints = true;\n        dir.module = 'pix2pix';\n      });\n\n      console.log(res);\n      console.log(checkpointDirectories);\n      console.log(pix2pixCheckpointDirectories);\n\n      dispatch({\n        type: _types2.default.dataset.load,\n        data: {\n          module: module,\n          folderLookup: folderLookup,\n          fileLookup: fileLookup,\n          datasetLookup: datasetLookup,\n          folders: folders, files: files,\n          sequences: sequenceDirectories,\n          datasets: datasets,\n          checkpoints: checkpointDirectories.concat(pix2pixCheckpointDirectories)\n        }\n      });\n    }).catch(function (e) {\n      console.error(e);\n    });\n    if (id) {\n      console.log('folder id', id);\n      dispatch({\n        type: _types2.default.dataset.set_folder,\n        data: {\n          folder_id: id,\n          module: module\n        }\n      });\n    }\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nvar pix2wavModule = {\n  name: 'pix2wav',\n  displayName: 'Pix2Wav',\n  datatype: 'spectrogram'\n};\n\nexports.default = pix2wavModule;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.reducer');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar pix2wavInitialState = {\n  loading: true,\n  progress: { i: 0, n: 0 },\n  status: '',\n  error: null,\n  folder_id: 0,\n  data: null\n};\n\nvar pix2wavReducer = function pix2wavReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : pix2wavInitialState;\n  var action = arguments[1];\n\n  if (action.data && action.data.module === 'pix2wav') {\n    state = (0, _dataset2.default)(state, action);\n  }\n\n  switch (action.type) {\n    case _types2.default.wav2pix.load:\n      return _extends({}, state, {\n        status: 'Loaded buffer'\n      });\n    case _types2.default.wav2pix.progress:\n      return _extends({}, state, {\n        status: 'Rendering frame ' + action.count\n      });\n    case _types2.default.wav2pix.finish:\n      return _extends({}, state, {\n        status: action.message || 'Render complete'\n      });\n    case _types2.default.wav2pix.zip:\n      return _extends({}, state, {\n        status: 'Built zip file ' + _util2.default.hush_size(state.size)[1]\n      });\n    case _types2.default.wav2pix.uploading:\n      return _extends({}, state, {\n        status: 'Uploading zip file'\n      });\n    default:\n      return state;\n  }\n};\n\nexports.default = pix2wavReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.live_task = undefined;\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar live_task = exports.live_task = function live_task(sequence, checkpoint) {\n  return function (dispatch) {\n    var task = {\n      module: 'pix2wav',\n      activity: 'live',\n      dataset: sequence,\n      checkpoint: checkpoint,\n      opt: {\n        poll_delay: 0.2\n      }\n    };\n    console.log(task);\n    console.log('add live task');\n    return _actions2.default.queue.add_task(task);\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _common = require('../../../common/');\n\nvar _player = require('../../../live/player');\n\nvar playerActions = _interopRequireWildcard(_player);\n\nvar _live = require('../../../live/live.actions');\n\nvar liveActions = _interopRequireWildcard(_live);\n\nvar _queue = require('../../../queue/queue.actions');\n\nvar queueActions = _interopRequireWildcard(_queue);\n\nvar _pix2wav = require('../pix2wav.tasks');\n\nvar pix2wavTasks = _interopRequireWildcard(_pix2wav);\n\nvar _pix2wav2 = require('../pix2wav.actions');\n\nvar pix2wavActions = _interopRequireWildcard(_pix2wav2);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Pix2WavLive = function (_Component) {\n  _inherits(Pix2WavLive, _Component);\n\n  function Pix2WavLive(props) {\n    _classCallCheck(this, Pix2WavLive);\n\n    var _this = _possibleConstructorReturn(this, (Pix2WavLive.__proto__ || Object.getPrototypeOf(Pix2WavLive)).call(this));\n\n    props.actions.pix2wav.load_directories();\n    props.actions.live.get_params();\n    _this.changeCheckpoint = _this.changeCheckpoint.bind(_this);\n    _this.changeEpoch = _this.changeEpoch.bind(_this);\n    _this.changeSequence = _this.changeSequence.bind(_this);\n    _this.seek = _this.seek.bind(_this);\n    _this.togglePlaying = _this.togglePlaying.bind(_this);\n    _this.toggleRecording = _this.toggleRecording.bind(_this);\n    return _this;\n  }\n\n  _createClass(Pix2WavLive, [{\n    key: 'componentWillUpdate',\n    value: function componentWillUpdate(nextProps) {\n      if (nextProps.opt.checkpoint_name && nextProps.opt.checkpoint_name !== this.props.opt.checkpoint_name) {\n        console.log('fetch checkpoint', nextProps.opt.checkpoint_name);\n        this.props.actions.live.list_epochs('pix2wav', nextProps.opt.checkpoint_name);\n      }\n    }\n  }, {\n    key: 'changeCheckpoint',\n    value: function changeCheckpoint(field, checkpoint_name) {\n      this.props.actions.live.load_epoch(checkpoint_name, 'latest');\n    }\n  }, {\n    key: 'changeEpoch',\n    value: function changeEpoch(field, epoch_name) {\n      this.props.actions.live.load_epoch(this.props.opt.checkpoint_name, epoch_name);\n    }\n  }, {\n    key: 'changeSequence',\n    value: function changeSequence(field, sequence) {\n      console.log('got sequence', sequence);\n      this.props.actions.live.load_sequence(sequence);\n    }\n  }, {\n    key: 'seek',\n    value: function seek(percentage) {\n      var frame = Math.floor(percentage * (parseInt(this.props.frame.sequence_len) || 1) + 1);\n      this.props.actions.live.seek(frame);\n    }\n  }, {\n    key: 'start',\n    value: function start() {\n      // console.log(this.props)\n      console.log(this.props.pix2wav.data);\n      var sequence = this.props.pix2wav.data.sequences[0].name || '';\n      var checkpoint = this.props.pix2wav.data.checkpoints[0].name || '';\n      console.log('starting up!', sequence, checkpoint);\n      this.props.actions.tasks.live_task(sequence, checkpoint);\n    }\n  }, {\n    key: 'interrupt',\n    value: function interrupt() {\n      this.props.actions.queue.stop_task('gpu');\n    }\n  }, {\n    key: 'exit',\n    value: function exit() {\n      this.props.actions.queue.stop_task('gpu', { sigkill: true });\n    }\n  }, {\n    key: 'togglePlaying',\n    value: function togglePlaying() {\n      if (this.props.opt.processing) {\n        this.props.actions.live.pause();\n      } else {\n        this.props.actions.live.play();\n      }\n    }\n  }, {\n    key: 'toggleRecording',\n    value: function toggleRecording() {\n      if (this.props.opt.recording) {\n        (0, _player.stopRecording)();\n        this.props.actions.live.pause();\n      } else {\n        (0, _player.startRecording)();\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      // console.log(this.props)\n      if (this.props.pix2wav.loading) {\n        return (0, _preact.h)(_common.Loading, null);\n      }\n      // console.log('sequence', this.props.opt)\n      return (0, _preact.h)(\n        'div',\n        { className: 'app pix2wav centered' },\n        (0, _preact.h)(\n          'div',\n          { className: 'row' },\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(_common.Player, { width: 256, height: 256 })\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'params column audioParams' },\n            (0, _preact.h)(\n              _common.Group,\n              { title: 'Audio playback' },\n              (0, _preact.h)(\n                _common.Button,\n                { title: 'Start playback',\n                  onClick: function onClick() {\n                    return playerActions.startSynthesizing();\n                  }\n                },\n                'Start'\n              ),\n              (0, _preact.h)(\n                _common.Button,\n                { title: 'Stop playback',\n                  onClick: function onClick() {\n                    return playerActions.stopSynthesizing();\n                  }\n                },\n                'Stop'\n              )\n            )\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { className: 'params row' },\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Playback',\n                noToggle: true\n              },\n              (0, _preact.h)(_common.Select, {\n                name: 'send_image',\n                title: 'view mode',\n                options: ['a', 'b', 'sequence', 'recursive'],\n                onChange: this.props.actions.live.set_param\n              }),\n              (0, _preact.h)(_common.Select, {\n                name: 'sequence_name',\n                title: 'sequence',\n                options: this.props.pix2wav.data.sequences,\n                onChange: this.changeSequence\n              }),\n              (0, _preact.h)(_common.Select, {\n                name: 'output_format',\n                title: 'format',\n                options: ['JPEG', 'PNG']\n              }),\n              (0, _preact.h)(_common.Select, {\n                name: 'checkpoint_name',\n                title: 'checkpoint',\n                options: this.props.pix2wav.data.checkpoints,\n                onChange: this.changeCheckpoint\n              }),\n              (0, _preact.h)(_common.Select, {\n                name: 'epoch',\n                title: 'epoch',\n                options: this.props.epochs,\n                onChange: this.changeEpoch\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'position',\n                min: 0.0, max: 1.0, type: 'float',\n                value: (this.props.frame.sequence_i || 0) / (this.props.frame.sequence_len || 1),\n                onChange: this.seek\n              }),\n              this.renderRestartButton(),\n              (0, _preact.h)(\n                _common.Button,\n                {\n                  title: this.props.opt.savingVideo ? 'Saving video...' : this.props.opt.recording ? 'Recording (' + timeInSeconds(this.props.opt.recordFrames) + ')' : 'Record video',\n                  onClick: this.toggleRecording\n                },\n                this.props.opt.savingVideo ? 'Saving' : this.props.opt.recording ? 'Recording' : 'Record'\n              ),\n              (0, _preact.h)(\n                _common.Button,\n                {\n                  title: 'Save frame',\n                  onClick: _player.saveFrame\n                },\n                'Save'\n              ),\n              (0, _preact.h)(\n                'p',\n                { 'class': 'last_message' },\n                this.props.last_message\n              )\n            )\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Transition',\n                name: 'transition'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'transition_period',\n                min: 10, max: 5000, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'transition_min',\n                min: 0.001, max: 0.2, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'transition_max',\n                min: 0.1, max: 1.0, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Recursion',\n                name: 'recursive'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'recursive_frac',\n                min: 0.0, max: 0.5, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'recurse_roll',\n                min: -64, max: 64, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'recurse_roll_axis',\n                min: 0, max: 1, type: 'int'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Sequence',\n                name: 'sequence'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'sequence_frac',\n                min: 0.0, max: 1, type: 'float'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'process_frac',\n                min: 0, max: 1, type: 'float'\n              })\n            )\n          ),\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Clahe',\n                name: 'clahe'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'clip_limit',\n                min: 1.0, max: 4.0, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Posterize',\n                name: 'posterize'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'spatial_window',\n                min: 2, max: 128, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'color_window',\n                min: 2, max: 128, type: 'int'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Blur',\n                name: 'blur'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'blur_radius',\n                min: 3, max: 7, type: 'odd'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'blur_sigma',\n                min: 0, max: 2, type: 'float'\n              })\n            ),\n            (0, _preact.h)(\n              _common.ParamGroup,\n              {\n                title: 'Canny Edge Detection',\n                name: 'canny'\n              },\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'canny_lo',\n                min: 10, max: 200, type: 'int'\n              }),\n              (0, _preact.h)(_common.Slider, { live: true,\n                name: 'canny_hi',\n                min: 10, max: 200, type: 'int'\n              })\n            )\n          )\n        )\n      );\n    }\n  }, {\n    key: 'renderRestartButton',\n    value: function renderRestartButton() {\n      var _this2 = this;\n\n      if (this.props.runner.gpu.status === 'IDLE') {\n        return (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'GPU Idle',\n            onClick: function onClick() {\n              return _this2.start();\n            }\n          },\n          'Start'\n        );\n      }\n      if (this.props.runner.gpu.task.module !== 'pix2pix' && this.props.runner.gpu.task.module !== 'pix2wav') {\n        return (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'GPU Busy',\n            onClick: function onClick() {\n              return _this2.interrupt();\n            }\n          },\n          'Interrupt'\n        );\n      }\n      if (!this.props.opt.processing) {\n        return (0, _preact.h)(\n          'div',\n          null,\n          (0, _preact.h)(\n            _common.Button,\n            {\n              title: 'Not processing',\n              onClick: this.togglePlaying\n            },\n            'Restart'\n          ),\n          (0, _preact.h)(\n            _common.Button,\n            {\n              title: 'GPU Busy',\n              onClick: function onClick() {\n                return _this2.interrupt();\n              }\n            },\n            'Interrupt'\n          ),\n          (0, _preact.h)(\n            _common.Button,\n            {\n              title: 'Last resort',\n              onClick: function onClick() {\n                return _this2.exit();\n              }\n            },\n            'Exit'\n          )\n        );\n      }\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'Processing',\n            onClick: this.togglePlaying\n          },\n          'Pause'\n        ),\n        (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'GPU Busy',\n            onClick: function onClick() {\n              return _this2.interrupt();\n            }\n          },\n          'Interrupt'\n        ),\n        (0, _preact.h)(\n          _common.Button,\n          {\n            title: 'Last resort',\n            onClick: function onClick() {\n              return _this2.exit();\n            }\n          },\n          'Exit'\n        )\n      );\n    }\n  }]);\n\n  return Pix2WavLive;\n}(_preact.Component);\n\nfunction timeInSeconds(n) {\n  return (n / 10).toFixed(1) + ' s.';\n}\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    last_message: state.live.last_message,\n    opt: state.live.opt,\n    frame: state.live.frame,\n    checkpoints: state.live.checkpoints,\n    epochs: state.live.epochs,\n    sequences: state.live.sequences,\n    runner: state.system.runner,\n    pix2wav: state.module.pix2wav\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: {\n      live: (0, _redux.bindActionCreators)(liveActions, dispatch),\n      queue: (0, _redux.bindActionCreators)(queueActions, dispatch),\n      pix2wav: (0, _redux.bindActionCreators)(pix2wavActions, dispatch),\n      tasks: (0, _redux.bindActionCreators)(pix2wavTasks, dispatch), s: s\n    }\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2WavLive);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = Pix2WavNew;\n\nvar _preact = require('preact');\n\nvar _dataset = require('../../../dataset/dataset.new');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nvar _pix2wav = require('../pix2wav.module');\n\nvar _pix2wav2 = _interopRequireDefault(_pix2wav);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction Pix2WavNew(_ref) {\n  var history = _ref.history;\n\n  return (0, _preact.h)(\n    'div',\n    { 'class': 'app pix2wav' },\n    (0, _preact.h)(_dataset2.default, { module: _pix2wav2.default, history: history })\n  );\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2wav = require('../pix2wav.actions');\n\nvar pix2wavActions = _interopRequireWildcard(_pix2wav);\n\nvar _pix2wav2 = require('../pix2wav.tasks');\n\nvar pix2wavTasks = _interopRequireWildcard(_pix2wav2);\n\nvar _loading = require('../../../common/loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nvar _dataset = require('../../../dataset/dataset.form');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nvar _dataset3 = require('../../../dataset/dataset.new');\n\nvar _dataset4 = _interopRequireDefault(_dataset3);\n\nvar _upload = require('../../../dataset/upload.status');\n\nvar _upload2 = _interopRequireDefault(_upload);\n\nvar _fileList = require('../../../common/fileList.component');\n\nvar _spectrogram = require('./spectrogram.upload');\n\nvar _spectrogram2 = _interopRequireDefault(_spectrogram);\n\nvar _dataset5 = require('../../../dataset/dataset.component');\n\nvar _dataset6 = _interopRequireDefault(_dataset5);\n\nvar _pix2wav3 = require('../pix2wav.module');\n\nvar _pix2wav4 = _interopRequireDefault(_pix2wav3);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Pix2wavShow = function (_Component) {\n  _inherits(Pix2wavShow, _Component);\n\n  function Pix2wavShow(props) {\n    _classCallCheck(this, Pix2wavShow);\n\n    var _this = _possibleConstructorReturn(this, (Pix2wavShow.__proto__ || Object.getPrototypeOf(Pix2wavShow)).call(this, props));\n\n    _this.datasetActions = _this.datasetActions.bind(_this);\n    return _this;\n  }\n\n  _createClass(Pix2wavShow, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      var id = this.props.match.params.id || localStorage.getItem('pix2wav.last_id');\n      console.log('load dataset:', id);\n      var _props = this.props,\n          match = _props.match,\n          pix2wav = _props.pix2wav,\n          actions = _props.actions;\n\n      if (id === 'new') return;\n      if (id) {\n        if (parseInt(id)) localStorage.setItem('pix2wav.last_id', id);\n        if (!pix2wav.folder || pix2wav.folder.id !== id) {\n          actions.load_directories(id);\n        }\n      } else {\n        this.props.history.push('/pix2wav/new/');\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props2 = this.props,\n          pix2wav = _props2.pix2wav,\n          match = _props2.match,\n          history = _props2.history;\n\n      var _ref = pix2wav.data || {},\n          folderLookup = _ref.folderLookup;\n\n      var folder = (folderLookup || {})[pix2wav.folder_id] || {};\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'app pix2wav' },\n        (0, _preact.h)(\n          'div',\n          { 'class': 'heading' },\n          (0, _preact.h)(\n            'div',\n            { 'class': 'spaced' },\n            (0, _preact.h)(\n              'h1',\n              null,\n              folder ? folder.name : (0, _preact.h)(_loading2.default, null)\n            ),\n            (0, _preact.h)(_upload2.default, null)\n          )\n        ),\n        (0, _preact.h)(_spectrogram2.default, {\n          loading: pix2wav.loading,\n          progress: pix2wav.progress,\n          id: pix2wav.folder_id,\n          module: _pix2wav4.default,\n          data: pix2wav.data,\n          folder: folder\n        }),\n        (0, _preact.h)(_dataset6.default, {\n          loading: pix2wav.loading,\n          progress: pix2wav.progress,\n          id: pix2wav.folder_id,\n          module: _pix2wav4.default,\n          data: pix2wav.data,\n          folder: folder,\n          history: history,\n          onPickFile: function onPickFile(file, e) {\n            e.preventDefault();\n            e.stopPropagation();\n            console.log('picked a file', file);\n          },\n          datasetActions: this.datasetActions\n        })\n      );\n    }\n  }, {\n    key: 'datasetActions',\n    value: function datasetActions(dataset) {\n      var isFetching = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      var isProcessing = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n      var _props3 = this.props,\n          pix2wav = _props3.pix2wav,\n          remote = _props3.remote;\n\n      var input = pix2wav.data.fileLookup[dataset.input[0]];\n      if (!input) return null;\n      if (input.name && input.name.match(/(gif|jpe?g|png)$/i)) return null;\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)(\n          'div',\n          { 'class': 'actions' },\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2wav.folder_id, 1);\n              } },\n            'train'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2wav.folder_id, 2);\n              } },\n            '2x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2wav.folder_id, 4);\n              } },\n            '4x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2wav.folder_id, 6);\n              } },\n            '6x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, pix2wav.folder_id, 18);\n              } },\n            '18x'\n          )\n        ),\n        dataset.isBuilt ? (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          'fetched ',\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.clear_cache_task(dataset);\n              } },\n            'rm'\n          )\n        ) : isFetching ? (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          'fetching'\n        ) : (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.fetch_task(input.url, input.id, dataset.name);\n              } },\n            'fetch'\n          )\n        )\n      );\n    }\n  }]);\n\n  return Pix2wavShow;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    pix2wav: state.module.pix2wav\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(pix2wavActions, dispatch),\n    remote: (0, _redux.bindActionCreators)(pix2wavTasks, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Pix2wavShow);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _moment = require('moment/min/moment.min');\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _pix2wav = require('../pix2wav.actions');\n\nvar pix2wavActions = _interopRequireWildcard(_pix2wav);\n\nvar _pix2wav2 = require('../pix2wav.tasks');\n\nvar pix2wavTasks = _interopRequireWildcard(_pix2wav2);\n\nvar _common = require('../../../common');\n\nvar _dataset = require('../../../dataset/dataset.actions');\n\nvar datasetActions = _interopRequireWildcard(_dataset);\n\nvar _wav2pix = require('../../../audio/wav2pix');\n\nvar wav2pixActions = _interopRequireWildcard(_wav2pix);\n\nvar _pix2wav3 = require('../../../audio/pix2wav');\n\nvar pix2wavPlayer = _interopRequireWildcard(_pix2wav3);\n\nvar _pix2wav4 = require('../pix2wav.module');\n\nvar _pix2wav5 = _interopRequireDefault(_pix2wav4);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar date_stamp = function date_stamp() {\n  return (0, _moment2.default)().format(\"_YYYYMMDD_HHmm\");\n};\n\nvar SpectrogramUpload = function (_Component) {\n  _inherits(SpectrogramUpload, _Component);\n\n  function SpectrogramUpload(props) {\n    _classCallCheck(this, SpectrogramUpload);\n\n    var _this = _possibleConstructorReturn(this, (SpectrogramUpload.__proto__ || Object.getPrototypeOf(SpectrogramUpload)).call(this, props));\n\n    _this.state = {\n      file: null,\n      pcm: null,\n      name: \"\",\n      datasetName: \"\",\n      frames: [],\n      frame_start: 0,\n      max: 1000,\n      preview_count: 8 * 4,\n      frame_step: wav2pixActions.FRAME_STEP\n    };\n    var audioElement = document.createElement('audio');\n    audioElement.addEventListener('loadedmetadata', function () {\n      var duration = audioElement.duration;\n      var total_frame_count = Math.floor((duration * 44100 - wav2pixActions.FRAME_LENGTH) / _this.state.frame_step);\n      _this.setState({\n        duration: duration,\n        max: Math.min(_this.state.max, total_frame_count, 1000)\n      });\n    });\n    _this.audioElement = audioElement;\n    return _this;\n  }\n\n  _createClass(SpectrogramUpload, [{\n    key: 'pickFile',\n    value: function pickFile(file) {\n      var _this2 = this;\n\n      var name = file.name.split('.')[0].replace(/\\s+/g, '_').replace(/-/g, '_').replace(/_+/g, '_');\n      this.setState({\n        file: file,\n        name: name + date_stamp(),\n        datasetName: name,\n        pcm: ''\n      }, function () {\n        _this2.rebuildFrames();\n      });\n      this.audioElement.src = URL.createObjectURL(file);\n    }\n  }, {\n    key: 'rebuildFrames',\n    value: function rebuildFrames() {\n      var _this3 = this;\n\n      var _state = this.state,\n          file = _state.file,\n          pcm = _state.pcm,\n          frame_step = _state.frame_step,\n          frame_start = _state.frame_start,\n          preview_count = _state.preview_count;\n\n      this.props.wav2pix.renderFrames(pcm || file, { frame_start: frame_start, frame_step: frame_step, max: preview_count }).then(function (data) {\n        console.log('got frames', data.frames.length);\n        _this3.setState(_extends({}, _this3.state, {\n          frames: data.frames,\n          pcm: data.pcm\n        }));\n      });\n    }\n  }, {\n    key: 'buildZip',\n    value: function buildZip() {\n      var _this4 = this;\n\n      var _state2 = this.state,\n          pcm = _state2.pcm,\n          file = _state2.file,\n          max = _state2.max,\n          frame_step = _state2.frame_step,\n          frame_start = _state2.frame_start;\n\n      this.props.wav2pix.buildZip(this.state.name, pcm || file, { frame_start: frame_start, frame_step: frame_step, max: max }).then(function (_ref) {\n        var zip = _ref.zip,\n            filename = _ref.filename,\n            count = _ref.count;\n\n        _this4.props.datasetActions.uploadFile(_this4.props.module, _this4.props.folder, zip, filename, { count: count, max: max, frame_step: frame_step, frame_size: wav2pixActions.FRAME_LENGTH / 44100 });\n      });\n    }\n  }, {\n    key: 'playFrame',\n    value: function playFrame(i) {\n      var _this5 = this;\n\n      return function () {\n        var frame = _this5.state.frames[i];\n        pix2wavPlayer.play(frame);\n      };\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this6 = this;\n\n      // loading={pix2wav.loading}\n      // progress={pix2wav.progress}\n      // id={pix2wav.folder_id}\n      // module={pix2wavModule}\n      // data={pix2wav.data}\n      // folder={folder}\n      var _state3 = this.state,\n          file = _state3.file,\n          frames = _state3.frames,\n          preview_count = _state3.preview_count;\n\n      var canvases = [];\n      for (var i = 0, _len = preview_count; i < _len; i++) {\n        canvases.push((0, _preact.h)('canvas', { key: i, onClick: this.playFrame(i) }));\n      }\n      return (0, _preact.h)(\n        'div',\n        { className: 'row' },\n        (0, _preact.h)(\n          'div',\n          { className: 'col spectrogramBuilder' },\n          (0, _preact.h)(\n            _common.Group,\n            { title: 'Spectrogram Builder' },\n            (0, _preact.h)(\n              'p',\n              null,\n              \"Convert your sounds into spectrograms. \",\n              \"Sound files can be WAV, MP3, AIFF, or FLAC. \"\n            ),\n            (0, _preact.h)(_common.FileUpload, {\n              title: 'Choose a sound file',\n              accept: 'audio/*',\n              onUpload: function onUpload(file) {\n                return _this6.pickFile(file);\n              }\n            }),\n            file && this.renderMetadata(file)\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { ref: function ref(c) {\n              _this6.canvases = c;\n            }, className: 'thumbs', id: 'pix2wav_canvases' },\n          canvases\n        )\n      );\n    }\n  }, {\n    key: 'renderMetadata',\n    value: function renderMetadata(file) {\n      var _this7 = this;\n\n      var _state4 = this.state,\n          duration = _state4.duration,\n          preview_count = _state4.preview_count;\n\n      var size = _util2.default.hush_size(file.size);\n      var total_frame_count = Math.floor((duration * 44100 - wav2pixActions.FRAME_LENGTH) / this.state.frame_step);\n      var frame_size = Math.round(wav2pixActions.FRAME_LENGTH / 44100 * 1000) + ' ms.';\n      var frame_step = Math.round(this.state.frame_step / 44100 * 1000) + ' ms.';\n      return (0, _preact.h)(\n        'div',\n        { className: 'fileMetadata' },\n        (0, _preact.h)(\n          _common.Group,\n          { title: 'Metadata' },\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'Name' },\n            file.name\n          ),\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'Type' },\n            file.type\n          ),\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'Size' },\n            (0, _preact.h)(\n              'span',\n              { className: size[0] },\n              size[1]\n            )\n          ),\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'Date' },\n            (0, _moment2.default)(file.lastModifiedDate).format(\"YYYY-MM-DD h:mm a\")\n          ),\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'Duration' },\n            Math.floor(duration) + ' s.'\n          ),\n          (0, _preact.h)('br', null),\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'Frames' },\n            total_frame_count\n          ),\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'Frame Size' },\n            frame_size\n          ),\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'Frame Step' },\n            frame_step\n          ),\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'FFT Size' },\n            wav2pixActions.spectrum.fft_size\n          ),\n          (0, _preact.h)('br', null),\n          (0, _preact.h)(\n            _common.Param,\n            { title: 'Status' },\n            this.props.pix2wav.status\n          ),\n          (0, _preact.h)('br', null)\n        ),\n        (0, _preact.h)(\n          _common.Group,\n          { title: 'Data settings' },\n          (0, _preact.h)(_common.TextInput, {\n            title: 'Dataset name',\n            onChange: function onChange(e) {\n              return _this7.setState({ name: e.target.value });\n            },\n            value: this.state.name\n          }),\n          (0, _preact.h)(_common.Slider, {\n            name: 'Starting Frame',\n            min: 0, max: 1, type: 'float',\n            value: this.state.frame_start,\n            defaultValue: 0,\n            onChange: function onChange(frame_start) {\n              _this7.setState({\n                frame_start: frame_start\n              }, function () {\n                _this7.rebuildFrames();\n              });\n            }\n          }),\n          (0, _preact.h)(_common.Slider, {\n            name: 'No. Frames',\n            min: 10, max: Math.min(total_frame_count, 1000), type: 'int',\n            value: this.state.max,\n            defaultValue: Math.min(total_frame_count, 300),\n            onChange: function onChange(max) {\n              return _this7.setState({ max: max });\n            }\n          }),\n          (0, _preact.h)(_common.Slider, {\n            name: 'Frame step',\n            min: 10, max: 20000, type: 'int',\n            value: this.state.frame_step,\n            defaultValue: wav2pixActions.FRAME_STEP,\n            onChange: function onChange(frame_step) {\n              var total_frame_count = Math.floor((duration * 44100 - wav2pixActions.FRAME_LENGTH) / frame_step);\n              _this7.setState({\n                name: _this7.state.datasetName + '_step_' + frame_step + date_stamp(),\n                frame_step: frame_step,\n                max: Math.min(_this7.state.max, total_frame_count)\n              }, function () {\n                _this7.rebuildFrames();\n              });\n            }\n          }),\n          (0, _preact.h)(\n            _common.Button,\n            {\n              onClick: function onClick() {\n                return _this7.buildZip();\n              }\n            },\n            'Upload Frames'\n          )\n        ),\n        (0, _preact.h)(_common.Progress, null)\n      );\n    }\n  }, {\n    key: 'componentDidUpdate',\n    value: function componentDidUpdate() {\n      var _this8 = this;\n\n      (this.state.frames || []).map(function (frame, i) {\n        var canvas = _this8.canvases.children[i];\n        var ctx = canvas.getContext('2d-lodpi');\n        canvas.width = frame.canvas.width;\n        canvas.height = frame.canvas.height;\n        ctx.drawImage(frame.canvas, 0, 0);\n      });\n    }\n  }]);\n\n  return SpectrogramUpload;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    pix2wav: state.module.pix2wav,\n    upload: state.upload\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    datasetActions: (0, _redux.bindActionCreators)(datasetActions, dispatch),\n    actions: (0, _redux.bindActionCreators)(pix2wavActions, dispatch),\n    remote: (0, _redux.bindActionCreators)(pix2wavTasks, dispatch),\n    wav2pix: (0, _redux.bindActionCreators)(wav2pixActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SpectrogramUpload);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _samplernn = require('./views/samplernn.new');\n\nvar _samplernn2 = _interopRequireDefault(_samplernn);\n\nvar _samplernn3 = require('./views/samplernn.show');\n\nvar _samplernn4 = _interopRequireDefault(_samplernn3);\n\nvar _samplernn5 = require('./views/samplernn.import');\n\nvar _samplernn6 = _interopRequireDefault(_samplernn5);\n\nvar _samplernn7 = require('./views/samplernn.results');\n\nvar _samplernn8 = _interopRequireDefault(_samplernn7);\n\nvar _samplernn9 = require('./views/samplernn.graph');\n\nvar _samplernn10 = _interopRequireDefault(_samplernn9);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar router = function () {\n  function router() {\n    _classCallCheck(this, router);\n  }\n\n  _createClass(router, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      _actions2.default.system.changeTool('samplernn');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #eef, #fef)';\n    }\n  }, {\n    key: 'componentWillReceiveProps',\n    value: function componentWillReceiveProps() {\n      _actions2.default.system.changeTool('samplernn');\n      document.body.style.backgroundImage = 'linear-gradient(' + (_util2.default.randint(40) + 40) + 'deg, #eef, #fef)';\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      return (0, _preact.h)(\n        'section',\n        null,\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/samplernn/new', component: _samplernn2.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/samplernn/datasets', component: _samplernn4.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/samplernn/datasets/:id', component: _samplernn4.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/samplernn/import', component: _samplernn6.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/samplernn/results', component: _samplernn8.default }),\n        (0, _preact.h)(_reactRouterDom.Route, { exact: true, path: '/samplernn/graph', component: _samplernn10.default })\n      );\n    }\n  }]);\n\n  return router;\n}();\n\nfunction links() {\n  return [{ url: '/samplernn/new/', name: 'new' }, { url: '/samplernn/datasets/', name: 'datasets' }, { url: '/samplernn/graph/', name: 'graph' }, { url: '/samplernn/results/', name: 'results' }];\n}\n\nexports.default = {\n  name: 'samplernn',\n  router: router, links: links\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.import_files = exports.load_loss = exports.load_graph = exports.load_directories = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.loader');\n\nvar datasetLoader = _interopRequireWildcard(_dataset);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nvar _util = require('../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _samplernn = require('./samplernn.module');\n\nvar _samplernn2 = _interopRequireDefault(_samplernn);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toArray(arr) { return Array.isArray(arr) ? arr : Array.from(arr); }\n\nvar load_directories = exports.load_directories = function load_directories(id) {\n  return function (dispatch) {\n    var module = _samplernn2.default.name;\n    _util2.default.allProgress([datasetLoader.load(module), _actions2.default.socket.list_directory({ module: module, dir: 'datasets' }), _actions2.default.socket.list_directory({ module: module, dir: 'results' }), _actions2.default.socket.list_directory({ module: module, dir: 'output' }), _actions2.default.socket.disk_usage({ module: module, dir: 'datasets' }), load_loss()(dispatch)], function (percent, i, n) {\n      dispatch({\n        type: _types2.default.app.load_progress,\n        progress: { i: i, n: n },\n        data: { module: 'samplernn' }\n      });\n    }).then(function (res) {\n      // console.log(res)\n      var _res = _slicedToArray(res, 6),\n          datasetApiReport = _res[0],\n          datasets = _res[1],\n          results = _res[2],\n          output = _res[3],\n          datasetUsage = _res[4],\n          lossReport = _res[5];\n\n      var folderLookup = datasetApiReport.folderLookup,\n          fileLookup = datasetApiReport.fileLookup,\n          datasetLookup = datasetApiReport.datasetLookup,\n          folders = datasetApiReport.folders,\n          files = datasetApiReport.files,\n          unsortedFolder = datasetApiReport.unsortedFolder;\n\n      console.log(datasetUsage);\n\n      // also show the various flat audio files we have, in the input area..\n      var flatDatasets = datasets.filter(function (s) {\n        return s.name.match(/(wav|aiff?|flac|mp3)$/) && !s.dir;\n      });\n      var builtDatasets = datasets.filter(function (s) {\n        return s.dir;\n      });\n      builtDatasets.forEach(function (dir) {\n        var dataset = datasetLoader.getDataset(module, datasetLookup, dir.name, unsortedFolder, dir.date);\n        dataset.isBuilt = true;\n      });\n\n      flatDatasets.forEach(function (file) {\n        file.uuid = (0, _v2.default)();\n        fileLookup[file.uuid] = file;\n        var name = file.name.split('.')[0];\n        var dataset = datasetLoader.getDataset(module, datasetLookup, name, unsortedFolder, file.date);\n        file.persisted = false;\n        dataset.input.push(file.uuid);\n      });\n\n      // exp:coccokit_3-frame_sizes:8,2-n_rnn:2-dataset:coccokit_3\n      var checkpoints = results.filter(function (s) {\n        return s.dir;\n      }).map(function (s) {\n        var checkpoint = s.name.split('-').map(function (s) {\n          return s.split(':');\n        }).filter(function (b) {\n          return b.length && b[1];\n        }).reduce(function (a, b) {\n          return (a[b[0]] = b[1]) && a;\n        }, {});\n        checkpoint.name = checkpoint.name || checkpoint.dataset || checkpoint.exp;\n        checkpoint.date = s.date;\n        checkpoint.dir = s;\n        checkpoint.persisted = false;\n        var dataset = datasetLoader.getDataset(module, datasetLookup, checkpoint.name, unsortedFolder, checkpoint.date);\n        var loss = lossReport[checkpoint.name];\n        if (loss) {\n          dataset.epoch = checkpoint.epoch = loss.length;\n          checkpoint.training_loss = loss;\n        }\n        dataset.checkpoints.push(checkpoint);\n        return checkpoint;\n      });\n\n      output.map(function (file) {\n        file.uuid = (0, _v2.default)();\n        fileLookup[file.uuid] = file;\n        var pair = file.name.split('.')[0].split('-');\n        var dataset = datasetLoader.getDataset(module, datasetLookup, pair[0], unsortedFolder, file.date);\n        file.persisted = false;\n        file.epoch = parseInt(file.epoch || pair[1].replace(/^\\D+/, '')) || 0;\n        dataset.epoch = Math.max(file.epoch, dataset.epoch || 0);\n        // here check if the file exists in dataset, if so just check that it's persisted\n        var found = dataset.output.some(function (file_id) {\n          // if (f.name === \n          if (fileLookup[file_id].name === file.name) {\n            fileLookup[file_id].persisted = true;\n            return true;\n          }\n          return false;\n        });\n        if (!found) {\n          dataset.output.push(file.uuid);\n        }\n      });\n\n      dispatch({\n        type: _types2.default.dataset.load,\n        data: {\n          module: module,\n          folderLookup: folderLookup,\n          fileLookup: fileLookup,\n          datasetLookup: datasetLookup,\n          folders: folders, files: files,\n          checkpoints: checkpoints,\n          output: output\n        }\n      });\n    }).catch(function (e) {\n      console.error(e);\n    });\n    if (id) {\n      dispatch({\n        type: _types2.default.dataset.set_folder,\n        data: {\n          folder_id: id,\n          module: module\n        }\n      });\n    }\n  };\n};\n\nvar load_graph = exports.load_graph = function load_graph() {\n  return function (dispatch) {\n    var module = _samplernn2.default.name;\n    _util2.default.allProgress([load_loss()(dispatch), _actions2.default.socket.list_directory({ module: module, dir: 'results' })], function (percent, i, n) {\n      dispatch({\n        type: _types2.default.app.load_progress,\n        progress: { i: i, n: n },\n        data: { module: 'samplernn' }\n      });\n    }).then(function (res) {\n      var _res2 = _slicedToArray(res, 2),\n          lossReport = _res2[0],\n          results = _res2[1];\n\n      dispatch({\n        type: _types2.default.samplernn.load_graph,\n        lossReport: lossReport,\n        results: results\n      });\n    });\n  };\n};\n\nvar load_loss = exports.load_loss = function load_loss() {\n  return function (dispatch) {\n    return _actions2.default.socket.run_script({ module: 'samplernn', activity: 'report' }).then(function (report) {\n      var lossReport = {};\n      report.stdout.split('\\n\\n').filter(function (a) {\n        return !!a;\n      }).forEach(function (data) {\n        var _data$split = data.split('\\n'),\n            _data$split2 = _toArray(_data$split),\n            name = _data$split2[0],\n            lines = _data$split2.slice(1);\n\n        lossReport[name] = lines.map(function (s) {\n          return s.split('\\t').reduce(function (a, s) {\n            var b = s.split(': ');\n            a[b[0]] = b[1];\n            return a;\n          }, {});\n        });\n        // console.log(data, name, lossReport[name])\n      });\n      dispatch({\n        type: _types2.default.samplernn.load_loss,\n        lossReport: lossReport\n      });\n      return lossReport;\n    });\n  };\n};\n\nvar import_files = exports.import_files = function import_files(state, datasetLookup, fileLookup) {\n  return function (dispatch) {\n    var selected = state.selected,\n        folder_id = state.folder_id,\n        url_base = state.url_base,\n        import_action = state.import_action;\n\n    var names = Object.keys(selected).filter(function (k) {\n      return selected[k];\n    });\n    var promises = void 0;\n    switch (import_action) {\n      case 'Hotlink':\n        // in this case, create a new file for each file we see.\n        promises = names.reduce(function (a, name) {\n          return datasetLookup[name].output.map(function (id) {\n            return fileLookup[id];\n          }).map(function (file) {\n            var partz = file.name.split('.');\n            var ext = partz.pop();\n            return _actions2.default.file.create({\n              folder_id: folder_id,\n              name: file.name,\n              url: url_base + file.name,\n              mime: 'audio/' + ext,\n              epoch: file.epoch,\n              size: file.size,\n              module: 'samplernn',\n              dataset: name,\n              activity: 'train',\n              datatype: 'audio',\n              generated: true,\n              created_at: new Date(file.date),\n              updated_at: new Date(file.date)\n            });\n          }).concat(a);\n        }, []);\n        break;\n      case 'Upload':\n        promises = names.reduce(function (a, name) {\n          return datasetLookup[name].input.map(function (id) {\n            return fileLookup[id];\n          }).map(function (file) {\n            if (file.persisted) return null;\n            var partz = file.name.split('.');\n            var ext = partz.pop();\n            if (ext === 'wav' || ext === 'flac') return;\n            console.log(file);\n            return _actions2.default.socket.upload_file({\n              folder_id: folder_id,\n              module: 'samplernn',\n              activity: 'train',\n              path: 'datasets',\n              filename: file.name,\n              generated: false,\n              processed: false,\n              datatype: 'audio',\n              ttl: 60000\n            });\n          }).concat(a);\n        }, []).filter(function (a) {\n          return !!a;\n        });\n        break;\n      default:\n        break;\n    }\n    console.log(promises);\n    return Promise.all(promises).then(function (data) {\n      console.log(data);\n      window.location.href = '/samplernn/datasets/' + folder_id + '/';\n    }).catch(function (e) {\n      console.error(e);\n    });\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nvar samplernnModule = {\n  name: 'samplernn',\n  displayName: 'SampleRNN',\n  datatype: 'audio'\n};\n\nexports.default = samplernnModule;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _dataset = require('../../dataset/dataset.reducer');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar samplernnInitialState = {\n  loading: true,\n  progress: { i: 0, n: 0 },\n  error: null,\n  folders: [],\n  folder_id: 0,\n  data: null,\n  lossReport: null,\n  results: null\n};\n\nvar samplernnReducer = function samplernnReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : samplernnInitialState;\n  var action = arguments[1];\n\n  if (action.data && action.data.module === 'samplernn') {\n    return (0, _dataset2.default)(state, action);\n  }\n\n  switch (action.type) {\n    case _types2.default.samplernn.load_loss:\n      return _extends({}, state, {\n        lossReport: action.lossReport\n      });\n    case _types2.default.samplernn.load_graph:\n      return _extends({}, state, {\n        lossReport: action.lossReport,\n        results: action.results\n      });\n    default:\n      return state;\n  }\n};\n\nexports.default = samplernnReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.clear_cache_task = exports.log_task = exports.fetch_task = exports.train_task = undefined;\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('../../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _actions = require('../../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar train_task = exports.train_task = function train_task(dataset, folder_id) {\n  var epochs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n  return function (dispatch) {\n    var task = {\n      module: 'samplernn',\n      activity: 'train',\n      dataset: dataset.name,\n      epoch: dataset.checkpoints.length ? dataset.checkpoints[0].epoch || 0 : 0,\n      epochs: epochs,\n      folder_id: folder_id,\n      opt: {\n        sample_length: 44100 * 5,\n        n_samples: 6,\n        keep_old_checkpoints: false\n      }\n    };\n    console.log(task);\n    return _actions2.default.queue.add_task(task);\n  };\n};\nvar fetch_task = exports.fetch_task = function fetch_task(url, folder_id, file_id, dataset) {\n  return function (dispatch) {\n    if (!url) return console.log('input file inaccessible (no url)');\n    var task = {\n      module: 'samplernn',\n      activity: 'fetch',\n      dataset: dataset,\n      folder_id: folder_id,\n      opt: {\n        url: url,\n        file_id: file_id,\n        dataset: dataset\n      }\n    };\n    return _actions2.default.queue.add_task(task);\n  };\n};\nvar log_task = exports.log_task = function log_task(dataset) {\n  return function (dispatch) {\n    var task = {\n      module: 'samplernn',\n      activity: 'log',\n      dataset: dataset.name\n    };\n    return _actions2.default.queue.add_task(task);\n  };\n};\nvar clear_cache_task = exports.clear_cache_task = function clear_cache_task(dataset) {\n  return function (dispatch) {\n    var task = {\n      module: 'samplernn',\n      activity: 'clear_cache',\n      dataset: dataset.name\n    };\n    return _actions2.default.queue.add_task(task);\n  };\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _samplernn = require('../samplernn.actions');\n\nvar samplernnActions = _interopRequireWildcard(_samplernn);\n\nvar _group = require('../../../common/group.component');\n\nvar _group2 = _interopRequireDefault(_group);\n\nvar _slider = require('../../../common/slider.component');\n\nvar _slider2 = _interopRequireDefault(_slider);\n\nvar _select = require('../../../common/select.component');\n\nvar _select2 = _interopRequireDefault(_select);\n\nvar _button = require('../../../common/button.component');\n\nvar _button2 = _interopRequireDefault(_button);\n\nvar _fileList = require('../../../common/fileList.component');\n\nvar _textInput = require('../../../common/textInput.component');\n\nvar _textInput2 = _interopRequireDefault(_textInput);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar lerp = _util2.default.lerp,\n    norm = _util2.default.norm,\n    randint = _util2.default.randint,\n    randrange = _util2.default.randrange;\n\nvar SampleRNNGraph = function (_Component) {\n  _inherits(SampleRNNGraph, _Component);\n\n  function SampleRNNGraph(props) {\n    _classCallCheck(this, SampleRNNGraph);\n\n    var _this = _possibleConstructorReturn(this, (SampleRNNGraph.__proto__ || Object.getPrototypeOf(SampleRNNGraph)).call(this));\n\n    props.actions.load_graph();\n    return _this;\n  }\n\n  _createClass(SampleRNNGraph, [{\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      this.refs = {};\n      return (0, _preact.h)(\n        'div',\n        { className: 'app lossGraph' },\n        (0, _preact.h)(\n          'div',\n          { className: 'heading' },\n          (0, _preact.h)(\n            'h3',\n            null,\n            'SampleRNN Loss Graph'\n          ),\n          (0, _preact.h)('canvas', { ref: function ref(_ref) {\n              return _this2.refs['canvas'] = _ref;\n            } })\n        )\n      );\n    }\n  }, {\n    key: 'componentDidUpdate',\n    value: function componentDidUpdate() {\n      var _props$samplernn = this.props.samplernn,\n          lossReport = _props$samplernn.lossReport,\n          results = _props$samplernn.results;\n\n      if (!lossReport || !results) return;\n      var canvas = this.refs.canvas;\n      canvas.width = window.innerWidth;\n      canvas.height = window.innerHeight;\n      canvas.style.width = canvas.width + 'px';\n      canvas.style.height = canvas.height + 'px';\n\n      var ctx = canvas.getContext('2d');\n      var w = canvas.width;\n      var h = canvas.height;\n      ctx.clearRect(0, 0, w, h);\n\n      var resultsByDate = results.map(function (file) {\n        if (!file.name.match(/^exp:/)) return null;\n        var dataset = file.name.split(\"-\")[3].split(\":\")[1];\n        return [+new Date(file.date), dataset];\n      }).filter(function (a) {\n        return !!a;\n      }).sort(function (a, b) {\n        return a[0] - a[1];\n      });\n\n      var keys = Object.keys(lossReport).filter(function (k) {\n        return !!lossReport[k].length;\n      });\n      var scaleMax = 0;\n      var scaleMin = Infinity;\n      var epochsMax = 0;\n      keys.forEach(function (key) {\n        var loss = lossReport[key];\n        epochsMax = Math.max(loss.length, epochsMax);\n        loss.forEach(function (a) {\n          var v = parseFloat(a.training_loss);\n          if (!v) return;\n          scaleMax = Math.max(v, scaleMax);\n          scaleMin = Math.min(v, scaleMin);\n        });\n      });\n      // scaleMax *= 10\n      // console.log(scaleMax, scaleMin, epochsMax)\n\n      scaleMax = 3;\n      scaleMin = 0;\n      var margin = 0;\n      var wmin = 0;\n      var wmax = w / 2;\n      var hmin = 0;\n      var hmax = h / 2;\n      var epochsScaleFactor = 1; // 3/2\n\n      ctx.save();\n      var X = void 0,\n          Y = void 0;\n      for (var ii = 0; ii < epochsMax; ii++) {\n        X = lerp(ii / (epochsMax / epochsScaleFactor) * epochsScaleFactor, wmin, wmax);\n        ctx.strokeStyle = 'rgba(0,0,0,0.3)';\n        ctx.beginPath(0, 0);\n        ctx.moveTo(X, 0);\n        ctx.lineTo(X, h);\n        ctx.lineWidth = 0.5;\n        // ctx.stroke()\n        if ((ii + 1) % 6 === 0) {\n          ctx.lineWidth = 0.5;\n          ctx.stroke();\n          var fontSize = 12;\n          ctx.font = 'italic ' + fontSize + 'px \"Georgia\"';\n          ctx.fillStyle = 'rgba(0,12,28,0.6)';\n          ctx.fillText(ii / 5 * 6, X + 8, h - (fontSize + 4));\n        }\n      }\n      for (var ii = scaleMin; ii < scaleMax; ii += 1) {\n        Y = lerp(ii / scaleMax, hmin, hmax);\n        // ctx.strokeStyle = 'rgba(255,255,255,1.0)'\n        ctx.beginPath(0, 0);\n        ctx.moveTo(0, h - Y);\n        ctx.lineTo(w, h - Y);\n        ctx.lineWidth = 1;\n        // ctx.stroke()        \n        // if ( (ii % 1) < 0.1) {\n        // ctx.strokeStyle = 'rgba(255,255,255,1.0)'\n        ctx.lineWidth = 2;\n        ctx.setLineDash([4, 4]);\n        ctx.stroke();\n        ctx.stroke();\n        ctx.stroke();\n        ctx.setLineDash([1, 1]);\n        var _fontSize = 12;\n        ctx.font = 'italic ' + _fontSize + 'px \"Georgia\"';\n        ctx.fillStyle = 'rgba(0,12,28,0.6)';\n        ctx.fillText(ii.toFixed(1), w - 50, h - Y + _fontSize + 10);\n        // }\n      }\n      ctx.lineWidth = 1;\n      ctx.restore();\n\n      var min_date = resultsByDate[0][0];\n      var max_date = resultsByDate[resultsByDate.length - 1][0];\n      resultsByDate.forEach(function (pair) {\n        var date = pair[0];\n        var key = pair[1];\n        var loss = lossReport[key];\n        if (!key || !loss || !loss.length) return;\n        var vf = parseFloat(loss[loss.length - 1].training_loss) || 0;\n        var vg = parseFloat(loss[0].training_loss) || 5;\n        // console.log(vf)\n        var vv = 1 - norm(vf, scaleMin, scaleMax / 2);\n        ctx.lineWidth = (1 - norm(vf, scaleMin, scaleMax)) * 4;\n        // ctx.lineWidth = norm(date, min_date, max_date) * 3\n        // console.log(date, min_date, max_date)\n        ctx.strokeStyle = 'rgba(' + [randrange(30, 190), randrange(30, 150), randrange(60, 120)].join(',') + ',' + 0.8 + ')';\n        var begun = false;\n        loss.forEach(function (a, i) {\n          var v = parseFloat(a.training_loss);\n          if (!v) return;\n          var x = lerp(i / (epochsMax / epochsScaleFactor) * epochsScaleFactor, wmin, wmax);\n          var y = lerp(norm(v, scaleMin, scaleMax), hmax, hmin);\n          if (!begun) {\n            begun = true;\n            ctx.beginPath(0, 0);\n            ctx.moveTo(x, y);\n          } else {\n            ctx.lineTo(x, y);\n            // ctx.stroke()\n          }\n        });\n        ctx.stroke();\n        var i = loss.length - 1;\n        var v = parseFloat(loss[i].training_loss);\n        var x = lerp(i / (epochsMax / epochsScaleFactor) * epochsScaleFactor, wmin, wmax);\n        var y = lerp(norm(v, scaleMin, scaleMax), hmax, hmin);\n        var fontSize = 9;\n        ctx.font = 'italic ' + fontSize + 'px \"Georgia\"';\n        ctx.fillStyle = 'rgba(0,12,28,0.6)';\n        ctx.fillText(key, x + 4, y + fontSize / 2);\n      });\n    }\n  }]);\n\n  return SampleRNNGraph;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    samplernn: state.module.samplernn\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(samplernnActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SampleRNNGraph);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _samplernn = require('../samplernn.actions');\n\nvar samplernnActions = _interopRequireWildcard(_samplernn);\n\nvar _select = require('../../../common/select.component');\n\nvar _select2 = _interopRequireDefault(_select);\n\nvar _textInput = require('../../../common/textInput.component');\n\nvar _textInput2 = _interopRequireDefault(_textInput);\n\nvar _button = require('../../../common/button.component');\n\nvar _button2 = _interopRequireDefault(_button);\n\nvar _dataset = require('../../../dataset/dataset.component');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar samplernnModule = {\n  name: 'samplernn',\n  datatype: 'audio'\n};\n\nvar SampleRNNImport = function (_Component) {\n  _inherits(SampleRNNImport, _Component);\n\n  function SampleRNNImport() {\n    _classCallCheck(this, SampleRNNImport);\n\n    var _this = _possibleConstructorReturn(this, (SampleRNNImport.__proto__ || Object.getPrototypeOf(SampleRNNImport)).call(this));\n\n    _this.state = {\n      folder_id: 1,\n      import_action: 'Hotlink',\n      url_base: 'https://s3.amazonaws.com/i.asdf.us/bucky/data/4279/',\n      selected: {}\n    };\n    return _this;\n  }\n\n  _createClass(SampleRNNImport, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      var id = this.props.match.params.id || localStorage.getItem('samplernn.last_id');\n      console.log('load dataset:', id);\n      var _props = this.props,\n          match = _props.match,\n          samplernn = _props.samplernn,\n          samplernnActions = _props.samplernnActions;\n\n      if (id === 'new') return;\n      if (id) {\n        if (parseInt(id)) localStorage.setItem('samplernn.last_id', id);\n        if (!samplernn.folder || samplernn.folder.id !== id) {\n          this.props.actions.load_directories(id);\n        }\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      var samplernn = this.props.samplernn;\n\n      var datasets = [],\n          folder = void 0;\n      if (this.props.samplernn.data) {\n        datasets = (this.props.samplernn.data.folders || []).map(function (folder) {\n          return [folder.name, folder.id];\n        });\n        folder = this.props.samplernn.data.folderLookup.unsorted;\n      }\n      return (0, _preact.h)(\n        'div',\n        { className: 'app top' },\n        (0, _preact.h)(\n          'div',\n          { 'class': 'heading' },\n          (0, _preact.h)(\n            'h1',\n            null,\n            'Import'\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { 'class': 'params form row datasets' },\n          (0, _preact.h)(\n            'div',\n            { 'class': 'row dataset' },\n            (0, _preact.h)('div', { 'class': 'col' }),\n            (0, _preact.h)('div', { 'class': 'col' }),\n            (0, _preact.h)('div', { 'class': 'col' }),\n            (0, _preact.h)(\n              'div',\n              { 'class': 'col' },\n              (0, _preact.h)(\n                'h2',\n                null,\n                'Import to dataset'\n              ),\n              (0, _preact.h)(_select2.default, {\n                title: 'Destination dataset',\n                options: datasets,\n                name: 'folder_id',\n                opt: this.state,\n                onChange: function onChange(name, value) {\n                  return _this2.setState({ folder_id: value });\n                }\n              }),\n              (0, _preact.h)(_select2.default, {\n                title: 'Import action',\n                options: ['Hotlink', 'Upload'],\n                name: 'import_action',\n                opt: this.state,\n                onChange: function onChange(name, value) {\n                  return _this2.setState({ import_action: value });\n                }\n              }),\n              (0, _preact.h)(_textInput2.default, {\n                title: 'Remote URL base',\n                value: this.state.url_base,\n                placeholder: 'http://',\n                onSave: function onSave(value) {\n                  return _this2.setState({ url_base: value });\n                }\n              }),\n              (0, _preact.h)(\n                _button2.default,\n                {\n                  title: '',\n                  onClick: function onClick() {\n                    return _this2.doImport();\n                  }\n                },\n                'Import'\n              )\n            )\n          )\n        ),\n        (0, _preact.h)(_dataset2.default, {\n          loading: samplernn.loading,\n          progress: samplernn.progress,\n          module: samplernnModule,\n          data: samplernn.data,\n          id: 'unsorted',\n          folder: folder,\n          history: this.props.history,\n          onPickDataset: function onPickDataset(dataset) {\n            return _this2.toggle(dataset.name, _this2.state.selected[name]);\n          },\n          beforeRow: function beforeRow(dataset) {\n            return _this2.beforeRow(dataset);\n          },\n          afterRow: function afterRow(dataset) {\n            return _this2.afterRow(dataset);\n          }\n        })\n      );\n    }\n  }, {\n    key: 'toggle',\n    value: function toggle(name) {\n      this.setState(_extends({}, this.state, {\n        selected: _extends({}, this.state.selected, _defineProperty({}, name, !this.state.selected[name]))\n      }));\n    }\n  }, {\n    key: 'beforeRow',\n    value: function beforeRow(dataset) {\n      // console.log(dataset)\n    }\n  }, {\n    key: 'afterRow',\n    value: function afterRow(dataset) {\n      var name = dataset.name;\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)('input', {\n          type: 'checkbox',\n          value: name,\n          checked: !!this.state.selected[name]\n        })\n      );\n    }\n  }, {\n    key: 'doImport',\n    value: function doImport() {\n      var samplernn = this.props.samplernn;\n\n      console.log(this.state);\n      this.props.actions.import_files(this.state, samplernn.data.datasetLookup, samplernn.data.fileLookup);\n    }\n  }]);\n\n  return SampleRNNImport;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    samplernn: state.module.samplernn,\n    runner: state.system.runner,\n    task: state.task\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(samplernnActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SampleRNNImport);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _common = require('../../../common');\n\nvar _samplernn = require('../samplernn.actions');\n\nvar samplernnActions = _interopRequireWildcard(_samplernn);\n\nvar _samplernn2 = require('../samplernn.module');\n\nvar _samplernn3 = _interopRequireDefault(_samplernn2);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction SampleRNNNew(props) {\n  return (0, _preact.h)(_common.Views.New, {\n    db: props.samplernn,\n    path: '/samplernn/datasets/',\n    actions: props.actions,\n    module: _samplernn3.default,\n    history: props.history\n  });\n}\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    samplernn: state.module.samplernn\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(samplernnActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SampleRNNNew);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRouterDom = require('react-router-dom');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _samplernn = require('../samplernn.actions');\n\nvar samplernnActions = _interopRequireWildcard(_samplernn);\n\nvar _audioPlayer = require('../../../common/audioPlayer/audioPlayer.actions');\n\nvar audioPlayerActions = _interopRequireWildcard(_audioPlayer);\n\nvar _loading = require('../../../common/loading.component');\n\nvar _loading2 = _interopRequireDefault(_loading);\n\nvar _fileList = require('../../../common/fileList.component');\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SampleRNNResults = function (_Component) {\n  _inherits(SampleRNNResults, _Component);\n\n  function SampleRNNResults(props) {\n    _classCallCheck(this, SampleRNNResults);\n\n    var _this = _possibleConstructorReturn(this, (SampleRNNResults.__proto__ || Object.getPrototypeOf(SampleRNNResults)).call(this));\n\n    if (!props.samplernn.data) props.actions.load_directories();\n    return _this;\n  }\n\n  _createClass(SampleRNNResults, [{\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      if (this.props.samplernn.loading) return (0, _preact.h)(_loading2.default, { progress: this.props.samplernn.progress });\n      var _props$samplernn$data = this.props.samplernn.data,\n          folderLookup = _props$samplernn$data.folderLookup,\n          fileLookup = _props$samplernn$data.fileLookup,\n          datasetLookup = _props$samplernn$data.datasetLookup;\n      // const { folderLookup } = samplernn\n\n      var renders = Object.keys(folderLookup).sort(_util2.default.sort.stringSort.asc).map(function (key) {\n        var folder = folderLookup[key];\n\n        var _util$sort$orderByFn = _util2.default.sort.orderByFn('epoch desc'),\n            mapFn = _util$sort$orderByFn.mapFn,\n            sortFn = _util$sort$orderByFn.sortFn;\n\n        var datasetPairs = folder.datasets.map(function (name) {\n          return datasetLookup[name];\n        }).map(mapFn).sort(sortFn);\n        var bestRenders = datasetPairs.map(function (pair) {\n          return pair[1];\n        }).filter(function (dataset) {\n          return dataset.output.length;\n        }).map(function (dataset) {\n          var output = dataset.output;\n\n          return output.map(function (id) {\n            return fileLookup[id];\n          }).map(mapFn).sort(sortFn)[0][1];\n        });\n        // console.log(bestRenders.map(r => r.epoch))\n        var path = folder.name === 'unsorted' ? \"/samplernn/import/\" : \"/samplernn/datasets/\" + folder.id + \"/\";\n        return (0, _preact.h)(\n          'div',\n          { className: 'col bestRenders' },\n          (0, _preact.h)(\n            'h3',\n            null,\n            (0, _preact.h)(\n              _reactRouterDom.Link,\n              { to: path },\n              folder.name\n            )\n          ),\n          (0, _preact.h)(_fileList.FileList, {\n            linkFiles: true,\n            files: bestRenders,\n            orderBy: 'date desc',\n            fields: 'name date epoch size',\n            onClick: function onClick(file, e) {\n              e.preventDefault();\n              e.stopPropagation();\n              console.log('picked a file', file);\n              _this2.handlePick(file);\n            }\n          })\n        );\n      });\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'app samplernn' },\n        (0, _preact.h)(\n          'div',\n          { className: 'heading row middle' },\n          (0, _preact.h)(\n            'h1',\n            null,\n            'SampleRNN Results'\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { 'class': 'rows params renders' },\n          renders\n        )\n      );\n    }\n  }, {\n    key: 'handlePick',\n    value: function handlePick(file) {\n      this.props.audioPlayer.play(file);\n    }\n  }]);\n\n  return SampleRNNResults;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    samplernn: state.module.samplernn\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(samplernnActions, dispatch),\n    audioPlayer: (0, _redux.bindActionCreators)(audioPlayerActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SampleRNNResults);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _util = require('../../../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _samplernn = require('../samplernn.actions');\n\nvar samplernnActions = _interopRequireWildcard(_samplernn);\n\nvar _samplernn2 = require('../samplernn.tasks');\n\nvar samplernnTasks = _interopRequireWildcard(_samplernn2);\n\nvar _audioPlayer = require('../../../common/audioPlayer/audioPlayer.actions');\n\nvar audioPlayerActions = _interopRequireWildcard(_audioPlayer);\n\nvar _common = require('../../../common');\n\nvar _dataset = require('../../../dataset/dataset.form');\n\nvar _dataset2 = _interopRequireDefault(_dataset);\n\nvar _upload = require('../../../dataset/upload.status');\n\nvar _upload2 = _interopRequireDefault(_upload);\n\nvar _dataset3 = require('../../../dataset/dataset.component');\n\nvar _dataset4 = _interopRequireDefault(_dataset3);\n\nvar _samplernn3 = require('../samplernn.module');\n\nvar _samplernn4 = _interopRequireDefault(_samplernn3);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SampleRNNShow = function (_Component) {\n  _inherits(SampleRNNShow, _Component);\n\n  function SampleRNNShow(props) {\n    _classCallCheck(this, SampleRNNShow);\n\n    var _this = _possibleConstructorReturn(this, (SampleRNNShow.__proto__ || Object.getPrototypeOf(SampleRNNShow)).call(this, props));\n\n    _this.datasetActions = _this.datasetActions.bind(_this);\n    return _this;\n  }\n\n  _createClass(SampleRNNShow, [{\n    key: 'componentWillMount',\n    value: function componentWillMount() {\n      var id = this.props.match.params.id || localStorage.getItem('samplernn.last_id');\n      console.log('load dataset:', id);\n      var _props = this.props,\n          match = _props.match,\n          samplernn = _props.samplernn,\n          actions = _props.actions;\n\n      if (id === 'new') return;\n      if (id) {\n        if (parseInt(id)) localStorage.setItem('samplernn.last_id', id);\n        if (!samplernn.folder || samplernn.folder.id !== id) {\n          // console.log('looooooooooad', id)\n          actions.load_directories(id);\n        }\n      } else {\n        this.props.history.push('/samplernn/new/');\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _this2 = this;\n\n      var _props2 = this.props,\n          samplernn = _props2.samplernn,\n          runner = _props2.runner,\n          match = _props2.match,\n          history = _props2.history;\n\n      var _ref = samplernn.data || {},\n          folderLookup = _ref.folderLookup;\n      // console.log(runner)\n\n\n      var folder = (folderLookup || {})[samplernn.folder_id] || {};\n      return (0, _preact.h)(\n        'div',\n        { className: 'app samplernn' },\n        (0, _preact.h)(\n          'div',\n          { className: 'heading' },\n          (0, _preact.h)(\n            'h1',\n            null,\n            folder ? folder.name : (0, _preact.h)(_common.Loading, null)\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { className: 'row' },\n          folder && folder.name && folder.name !== 'unsorted' && (0, _preact.h)(_dataset2.default, {\n            title: 'Add Files',\n            module: _samplernn4.default,\n            folder: folder,\n            canUpload: true, canAddURL: true\n          }),\n          (0, _preact.h)(\n            'div',\n            null,\n            (0, _preact.h)(_upload2.default, null),\n            (0, _preact.h)(_common.CurrentTask, { processor: 'gpu' })\n          )\n        ),\n        (0, _preact.h)(_dataset4.default, {\n          loading: samplernn.loading,\n          progress: samplernn.progress,\n          id: samplernn.folder_id,\n          module: _samplernn4.default,\n          data: samplernn.data,\n          folder: folder,\n          history: history,\n          onPickFile: function onPickFile(file, e) {\n            e.preventDefault();\n            e.stopPropagation();\n            // console.log('picked a file', file)\n            _this2.handlePick(file);\n          },\n          datasetActions: this.datasetActions\n        })\n      );\n    }\n  }, {\n    key: 'datasetActions',\n    value: function datasetActions(dataset) {\n      var isFetching = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      var isProcessing = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n      var _props3 = this.props,\n          samplernn = _props3.samplernn,\n          remote = _props3.remote;\n\n      var input = samplernn.data.fileLookup[dataset.input[0]];\n      if (!input) return null;\n      if (input.name && input.name.match(/(gif|jpe?g|png)$/i)) return null;\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)(\n          'div',\n          { 'class': 'actions' },\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, samplernn.folder_id, 1);\n              } },\n            'train'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, samplernn.folder_id, 2);\n              } },\n            '2x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, samplernn.folder_id, 4);\n              } },\n            '4x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, samplernn.folder_id, 6);\n              } },\n            '6x'\n          ),\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.train_task(dataset, samplernn.folder_id, 18);\n              } },\n            '18x'\n          )\n        ),\n        dataset.isBuilt ? (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          'fetched ',\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.clear_cache_task(dataset);\n              } },\n            'x'\n          )\n        ) : isFetching ? (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          'fetching'\n        ) : (0, _preact.h)(\n          'div',\n          { 'class': 'subtext' },\n          (0, _preact.h)(\n            'span',\n            { 'class': 'link', onClick: function onClick() {\n                return remote.fetch_task(input.url, samplernn.folder_id, input.id, dataset.name);\n              } },\n            'fetch'\n          )\n        )\n      );\n    }\n  }, {\n    key: 'handlePick',\n    value: function handlePick(file) {\n      // console.log(file)\n      this.props.audioPlayer.play(file);\n    }\n  }]);\n\n  return SampleRNNShow;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return {\n    samplernn: state.module.samplernn,\n    runner: state.system.runner\n  };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: (0, _redux.bindActionCreators)(samplernnActions, dispatch),\n    remote: (0, _redux.bindActionCreators)(samplernnTasks, dispatch),\n    audioPlayer: (0, _redux.bindActionCreators)(audioPlayerActions, dispatch)\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(SampleRNNShow);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.stop_queue = exports.start_queue = exports.add_task = exports.stop_task = exports.start_task = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _socket = require('../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _actions = require('../actions');\n\nvar _actions2 = _interopRequireDefault(_actions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar start_task = exports.start_task = function start_task(task) {\n  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n  _socket2.default.task.start_task(task, opt);\n  return _extends({ type: _types2.default.task.starting_task, task: task }, opt);\n};\n\nvar stop_task = exports.stop_task = function stop_task(task) {\n  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n  _socket2.default.task.stop_task(task, opt);\n  return _extends({ type: _types2.default.task.stopping_task, task: task }, opt);\n};\n\nvar add_task = exports.add_task = function add_task(new_task) {\n  return function (dispatch) {\n    _actions2.default.task.create(new_task).then(function (task) {\n      _socket2.default.task.add_task(task);\n    });\n  };\n};\n\nvar start_queue = exports.start_queue = function start_queue(task) {\n  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n  _socket2.default.task.start_queue(task, opt);\n  return _extends({ type: _types2.default.task.starting_queue, task: task }, opt);\n};\n\nvar stop_queue = exports.stop_queue = function stop_queue(task) {\n  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n  _socket2.default.task.stop_queue(task, opt);\n  return _extends({ type: _types2.default.task.stopping_queue, task: task }, opt);\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _util = require('../util');\n\nvar _util2 = _interopRequireDefault(_util);\n\nvar _moment = require('moment/min/moment.min');\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar queueInitialState = {\n  loading: false,\n  error: null,\n  tasks: {},\n  queue: [],\n  completed: []\n};\n\nvar dateSort = _util2.default.sort.orderByFn('updated_at desc');\nvar prioritySort = _util2.default.sort.orderByFn('priority asc');\n\nvar queueReducer = function queueReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : queueInitialState;\n  var action = arguments[1];\n\n  switch (action.type) {\n    case _types2.default.task.index:\n      return _extends({}, state, {\n        tasks: action.data.reduce(function (a, b) {\n          return a[b.id] = b, a;\n        }, {}),\n        queue: action.data.filter(function (a) {\n          return !a.completed;\n        }).map(dateSort.mapFn).sort(dateSort.sortFn).map(function (pair) {\n          return pair[1].id;\n        }),\n        completed: action.data.filter(function (a) {\n          return a.completed;\n        }).map(prioritySort.mapFn).sort(prioritySort.sortFn).map(function (pair) {\n          return pair[1].id;\n        })\n      });\n    case _types2.default.task.create:\n      console.log(action.data);\n      return _extends({}, state, {\n        tasks: _extends({}, state.tasks, _defineProperty({}, action.data.id, action.data)),\n        queue: state.queue.concat([action.data.id])\n      });\n    case _types2.default.task.update:\n      return _extends({}, state, {\n        tasks: _extends({}, state.tasks, _defineProperty({}, action.data.id, action.data))\n      });\n    case _types2.default.task.destroy:\n      var _state$tasks = state.tasks,\n          deletedTask = _state$tasks[action.data.id],\n          taskLookup = _objectWithoutProperties(_state$tasks, [action.data.id]);\n\n      return _extends({}, state, {\n        queue: state.queue.filter(function (id) {\n          return id !== deletedTask.id;\n        }),\n        completed: state.completed.filter(function (id) {\n          return id !== deletedTask.id;\n        }),\n        tasks: taskLookup\n      });\n    case _types2.default.task.task_finish:\n      return _extends({}, state, {\n        queue: state.queue.filter(function (a) {\n          return a !== action.task.id;\n        }),\n        completed: [action.task.id].concat(state.completed)\n      });\n    default:\n      return state;\n  }\n};\n\nexports.default = queueReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _store = require('../store');\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _socket = require('./socket.connection');\n\nvar _socket2 = require('./socket.actions');\n\nvar actions = _interopRequireWildcard(_socket2);\n\nvar _socket3 = require('./socket.system');\n\nvar system = _interopRequireWildcard(_socket3);\n\nvar _socket4 = require('./socket.live');\n\nvar live = _interopRequireWildcard(_socket4);\n\nvar _socket5 = require('./socket.task');\n\nvar task = _interopRequireWildcard(_socket5);\n\nvar _socket6 = require('./socket.api');\n\nvar api = _interopRequireWildcard(_socket6);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = {\n  socket: _socket.socket,\n  actions: actions,\n  system: system,\n  live: live,\n  task: task,\n  api: api\n};\n\n\n_socket.socket.on('status', function (data) {\n  console.log('got status', data.key, data.value);\n  _store.store.dispatch(_extends({ type: _types2.default.socket.status }, data));\n  switch (data.key) {\n    case 'processing':\n      _store.store.dispatch(_extends({\n        type: 'SET_PARAM'\n      }, data));\n      break;\n    default:\n      break;\n  }\n});","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.syscall_async = exports.read_file = exports.upload_file = exports.run_script = exports.list_sequences = exports.count_directory = exports.list_directory = exports.disk_usage = exports.run_system_command = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _v = require('uuid/v1');\n\nvar _v2 = _interopRequireDefault(_v);\n\nvar _socket = require('./socket.connection');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar run_system_command = exports.run_system_command = function run_system_command(opt) {\n  return syscall_async('run_system_command', opt);\n};\nvar disk_usage = exports.disk_usage = function disk_usage(opt) {\n  return syscall_async('run_system_command', _extends({ cmd: 'du' }, opt));\n};\nvar list_directory = exports.list_directory = function list_directory(opt) {\n  return syscall_async('list_directory', opt).then(function (res) {\n    return res.files;\n  });\n};\nvar count_directory = exports.count_directory = function count_directory(opt) {\n  return syscall_async('count_directory', opt).then(function (res) {\n    return res.count;\n  });\n};\nvar list_sequences = exports.list_sequences = function list_sequences(opt) {\n  return syscall_async('list_sequences', opt).then(function (res) {\n    return res.sequences;\n  });\n};\nvar run_script = exports.run_script = function run_script(opt) {\n  return syscall_async('run_script', opt);\n};\nvar upload_file = exports.upload_file = function upload_file(opt) {\n  return syscall_async('upload_file', opt);\n};\nvar read_file = exports.read_file = function read_file(opt) {\n  return syscall_async('read_file', opt).then(function (res) {\n    return res.file;\n  });\n};\n\nvar syscall_async = exports.syscall_async = function syscall_async(tag, payload) {\n  var ttl = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10000;\n\n  ttl = payload.ttl || ttl;\n  return new Promise(function (resolve, reject) {\n    var uuid = (0, _v2.default)();\n    var timeout = setTimeout(function () {\n      _socket.socket.off('system_res', cb);\n      reject('timeout');\n    }, ttl);\n    var cb = function cb(data) {\n      if (!data.uuid) return;\n      if (data.uuid === uuid) {\n        clearTimeout(timeout);\n        _socket.socket.off('system_res', cb);\n        resolve(data);\n      }\n    };\n    _socket.socket.emit('system', { cmd: tag, payload: payload, uuid: uuid });\n    _socket.socket.on('system_res', cb);\n  });\n};","'use strict';\n\nvar _store = require('../store');\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _socket = require('./socket.connection');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n_socket.socket.on('api_res', function (data) {\n  // console.log('system response', data)\n  data = parse(data);\n  var type = _types2.default[data.datatype];\n  console.log('api_res', data.type, data.datatype);\n  if (!type) return console.error('socket:api_res bad datatype', data.datatype);\n  switch (data.type) {\n    case 'create':\n      return (0, _store.dispatch)({\n        type: type.create,\n        source: 'socket',\n        data: data.data\n      });\n    case 'update':\n      return (0, _store.dispatch)({\n        type: type.update,\n        source: 'socket',\n        data: data.data\n      });\n    case 'destroy':\n      return (0, _store.dispatch)({\n        type: type.destroy,\n        source: 'socket',\n        data: data.data\n      });\n    default:\n      break;\n  }\n});\n\nfunction parse(s) {\n  if (typeof s === 'string') {\n    try {\n      var d = JSON.parse(s);\n      return d;\n    } catch (e) {\n      console.error('not valid json');\n      return s;\n    }\n  }\n  return s;\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.socket = undefined;\n\nvar _store = require('../store');\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar socket = exports.socket = io.connect('/client');\n\n// SOCKET ACTIONS\n\nsocket.on('connect', function () {\n  return _store.store.dispatch({ type: _types2.default.socket.connect });\n});\nsocket.on('connect_error', function (error) {\n  return _store.store.dispatch({ type: _types2.default.socket.connect_error, error: error });\n});\nsocket.on('reconnect', function (attempt) {\n  return _store.store.dispatch({ type: _types2.default.socket.reconnect, attempt: attempt });\n});\nsocket.on('reconnecting', function () {\n  return _store.store.dispatch({ type: _types2.default.socket.reconnecting });\n});\nsocket.on('reconnect_error', function (error) {\n  return _store.store.dispatch({ type: _types2.default.socket.reconnect_error, error: error });\n});\nsocket.on('reconnect_failed', function (error) {\n  return _store.store.dispatch({ type: _types2.default.socket.reconnect_failed, error: error });\n});\nsocket.on('disconnect', function () {\n  return _store.store.dispatch({ type: _types2.default.socket.disconnect });\n});\nsocket.on('error', function (error) {\n  return _store.store.dispatch({ type: _types2.default.socket.error, error: error });\n});","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.list_checkpoints = list_checkpoints;\nexports.list_all_checkpoints = list_all_checkpoints;\nexports.list_epochs = list_epochs;\nexports.list_sequences = list_sequences;\nexports.load_epoch = load_epoch;\nexports.load_sequence = load_sequence;\nexports.seek = seek;\nexports.pause = pause;\nexports.play = play;\nexports.get_params = get_params;\nexports.set_param = set_param;\n\nvar _store = require('../store');\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _player = require('../live/player');\n\nvar player = _interopRequireWildcard(_player);\n\nvar _socket = require('./socket.connection');\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n_socket.socket.on('res', function (data) {\n  // console.log('socket:', data.cmd)\n  switch (data.cmd) {\n    case 'get_last_frame':\n      if (data.res !== 'working') {\n        _socket.socket.emit('cmd', {\n          cmd: 'get_last_frame'\n        });\n      }\n      break;\n    case 'get_params':\n      data.res && (0, _store.dispatch)({\n        type: _types2.default.socket.load_params,\n        opt: data.res\n      });\n      data.res && player.toggleFPS(data.res.processing);\n      break;\n    case 'list_checkpoints':\n      (0, _store.dispatch)({\n        type: _types2.default.socket.list_checkpoints,\n        checkpoints: data.res\n      });\n      break;\n    case 'list_all_checkpoints':\n      (0, _store.dispatch)({\n        type: _types2.default.socket.list_all_checkpoints,\n        checkpoints: data.res\n      });\n      break;\n    case 'list_epochs':\n      (0, _store.dispatch)({\n        type: _types2.default.socket.list_epochs,\n        epochs: data.res\n      });\n      break;\n    case 'list_sequences':\n      (0, _store.dispatch)({\n        type: _types2.default.socket.list_sequences,\n        sequences: data.res\n      });\n      break;\n    default:\n      break;\n  }\n  // console.log(data)\n});\n\n_socket.socket.on('frame', player.onFrame);\n\nfunction list_checkpoints(module) {\n  _socket.socket.emit('cmd', {\n    cmd: 'list_checkpoints',\n    payload: module\n  });\n}\nfunction list_all_checkpoints(module) {\n  _socket.socket.emit('cmd', {\n    cmd: 'list_all_checkpoints',\n    payload: module\n  });\n}\nfunction list_epochs(module, checkpoint_name) {\n  _socket.socket.emit('cmd', {\n    cmd: 'list_epochs',\n    payload: module === 'pix2pix' || module === 'pix2wav' ? module + '/' + checkpoint_name : checkpoint_name\n  });\n}\nfunction list_sequences(module) {\n  _socket.socket.emit('cmd', {\n    cmd: 'list_sequences',\n    payload: module\n  });\n}\nfunction load_epoch(checkpoint_name, epoch) {\n  console.log(\">> SWITCH CHECKPOINT\", checkpoint_name, epoch);\n  _socket.socket.emit('cmd', {\n    cmd: 'load_epoch',\n    payload: checkpoint_name + ':' + epoch\n  });\n}\nfunction load_sequence(sequence) {\n  _socket.socket.emit('cmd', {\n    cmd: 'load_sequence',\n    payload: sequence\n  });\n}\nfunction seek(frame) {\n  _socket.socket.emit('cmd', {\n    cmd: 'seek',\n    payload: frame\n  });\n}\nfunction pause(frame) {\n  _socket.socket.emit('cmd', {\n    cmd: 'pause'\n  });\n}\nfunction play(frame) {\n  _socket.socket.emit('cmd', {\n    cmd: 'play'\n  });\n}\nfunction get_params() {\n  _socket.socket.emit('cmd', {\n    cmd: 'get_params'\n  });\n}\nfunction set_param(key, value) {\n  _socket.socket.emit('cmd', {\n    cmd: 'set_param',\n    payload: {\n      'key': key,\n      'value': value\n    }\n  });\n}","'use strict';\n\nvar _store = require('../store');\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _socket = require('./socket.connection');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n_socket.socket.on('system_res', function (data) {\n  // console.log('system response', data)\n  switch (data.type) {\n    case 'relay_connected':\n      return (0, _store.dispatch)({\n        type: _types2.default.system.relay_connected\n      });\n    case 'relay_disconnected':\n      return (0, _store.dispatch)({\n        type: _types2.default.system.relay_disconnected\n      });\n    case 'rpc_connected':\n      return (0, _store.dispatch)({\n        type: _types2.default.system.rpc_connected,\n        runner: data.runner\n      });\n    case 'rpc_disconnected':\n      return (0, _store.dispatch)({\n        type: _types2.default.system.rpc_disconnected\n      });\n    case 'relay_status':\n      return (0, _store.dispatch)({\n        type: data.rpc_connected ? _types2.default.system.rpc_connected : _types2.default.system.rpc_disconnected,\n        runner: data.runner\n      });\n    case 'site':\n      return (0, _store.dispatch)({\n        type: _types2.default.system.load_site,\n        site: data.site\n      });\n    default:\n      break;\n  }\n});","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.stop_queue = exports.start_queue = exports.stop_task = exports.start_task = exports.remove_task = exports.add_task = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nexports.emit = emit;\n\nvar _store = require('../store');\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _socket = require('./socket.connection');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar finishTimeout = void 0;\n\n_socket.socket.on('task_res', function (raw_data) {\n  // does not like the nested task object for some reason..\n  var data = void 0;\n  try {\n    if (typeof raw_data === 'string') {\n      data = JSON.parse(raw_data);\n      if (typeof data === 'string') {\n        data = JSON.parse(data);\n      }\n    } else {\n      data = raw_data;\n    }\n  } catch (e) {\n    console.warn('problem with json', e);\n    return;\n  }\n  if (data.task) {\n    (0, _store.dispatch)({ type: _types2.default.task.update, data: data.task });\n  }\n  // console.log('task', data.type)\n  switch (data.type) {\n    case 'start':\n      // return dispatch({ type: types.system.rpc_connected, runner: data.runner })\n      break;\n    case 'stop':\n      break;\n    // begin and finish calls often arrive out of order, if the old task was preempted\n    case 'task_begin':\n      (0, _store.dispatch)({ type: _types2.default.task.task_begin, task: data.task });\n      break;\n    case 'task_finish':\n      (0, _store.dispatch)({ type: _types2.default.task.task_finish, task: data.task });\n      break;\n    case 'kill':\n      break;\n    case 'stdout':\n      return (0, _store.dispatch)({ type: _types2.default.system.stdout, data: data });\n      break;\n    case 'stderr':\n      return (0, _store.dispatch)({ type: _types2.default.system.stderr, data: data });\n      break;\n    case 'add':\n      break;\n    case 'remove':\n      break;\n    case 'start_queue':\n      break;\n    case 'stop_queue':\n      break;\n    case 'list':\n      break;\n    case 'set_priority':\n      break;\n    case 'progress':\n      (0, _store.dispatch)({ type: _types2.default.task.progress, task: data.task });\n      break;\n    case 'epoch':\n      (0, _store.dispatch)({ type: _types2.default.task.epoch, task: data.task });\n      break;\n    case 'task_error':\n      return console.log('task error', data);\n    default:\n      console.log(data);\n      return console.log('no such task command', data.type);\n  }\n});\n\nfunction emit(type) {\n  var task = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  var opt = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n  _socket.socket.emit('task', _extends({ type: type, task: task }, opt));\n}\n\nvar add_task = exports.add_task = function add_task(task) {\n  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  return emit('add', task, opt);\n};\nvar remove_task = exports.remove_task = function remove_task(task) {\n  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  return emit('remove', task, opt);\n};\nvar start_task = exports.start_task = function start_task(task) {\n  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  return emit('start', task, opt);\n};\nvar stop_task = exports.stop_task = function stop_task(task) {\n  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  return emit('stop', task, opt);\n};\nvar start_queue = exports.start_queue = function start_queue() {\n  var opt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  return emit('start_queue', {}, opt);\n};\nvar stop_queue = exports.stop_queue = function stop_queue() {\n  var opt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  return emit('stop_queue', {}, opt);\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.dispatch = exports.store = exports.history = undefined;\n\nvar _redux = require('redux');\n\nvar _reactRouterRedux = require('react-router-redux');\n\nvar _reduxThunk = require('redux-thunk');\n\nvar _reduxThunk2 = _interopRequireDefault(_reduxThunk);\n\nvar _createBrowserHistory = require('history/createBrowserHistory');\n\nvar _createBrowserHistory2 = _interopRequireDefault(_createBrowserHistory);\n\nvar _auth = require('./auth/auth.reducer');\n\nvar _auth2 = _interopRequireDefault(_auth);\n\nvar _live = require('./live/live.reducer');\n\nvar _live2 = _interopRequireDefault(_live);\n\nvar _queue = require('./queue/queue.reducer');\n\nvar _queue2 = _interopRequireDefault(_queue);\n\nvar _system = require('./system/system.reducer');\n\nvar _system2 = _interopRequireDefault(_system);\n\nvar _upload = require('./dataset/upload.reducer');\n\nvar _upload2 = _interopRequireDefault(_upload);\n\nvar _dashboard = require('./dashboard/dashboard.reducer');\n\nvar _dashboard2 = _interopRequireDefault(_dashboard);\n\nvar _audioPlayer = require('./common/audioPlayer/audioPlayer.reducer');\n\nvar _audioPlayer2 = _interopRequireDefault(_audioPlayer);\n\nvar _module = require('./modules/module.reducer');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// import navReducer from './nav.reducer'\nvar appReducer = (0, _redux.combineReducers)({\n  router: _reactRouterRedux.routerReducer,\n  auth: _auth2.default,\n  live: _live2.default,\n  queue: _queue2.default,\n  system: _system2.default,\n  upload: _upload2.default,\n  dashboard: _dashboard2.default,\n  audioPlayer: _audioPlayer2.default,\n  module: _module.moduleReducer\n});\n\nvar history = exports.history = (0, _createBrowserHistory2.default)();\nvar store = exports.store = (0, _redux.createStore)(appReducer, (0, _redux.compose)((0, _redux.applyMiddleware)(\n// createLogger(),\n_reduxThunk2.default, (0, _reactRouterRedux.routerMiddleware)(history))));\n\nvar dispatch = exports.dispatch = store.dispatch;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.enqueue_test_task = exports.changeTool = exports.countDirectory = exports.listDirectory = exports.run = undefined;\n\nvar _socket = require('../socket');\n\nvar _socket2 = _interopRequireDefault(_socket);\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// import actions from '../actions'\n\nvar run = exports.run = function run(cmd) {\n  return function (dispatch) {\n    dispatch({ type: _types2.default.system.running_command, cmd: cmd });\n    _socket2.default.actions.run_system_command({ cmd: cmd }).then(function (data) {\n      dispatch({\n        type: _types2.default.system.command_output,\n        data: data\n      });\n    });\n  };\n};\n\nvar listDirectory = exports.listDirectory = function listDirectory(opt) {\n  return function (dispatch) {\n    dispatch({ type: _types2.default.system.listing_directory, opt: opt });\n    _socket2.default.actions.list_directory(opt).then(function (data) {\n      dispatch({\n        type: _types2.default.system.list_directory,\n        data: data\n      });\n    });\n  };\n};\n\nvar countDirectory = exports.countDirectory = function countDirectory(opt) {\n  return function (dispatch) {\n    dispatch({ type: _types2.default.system.counting_directory, opt: opt });\n    _socket2.default.actions.count_directory(opt).then(function (data) {\n      dispatch({\n        type: _types2.default.system.count_directory,\n        data: data\n      });\n    });\n  };\n};\n\nvar changeTool = exports.changeTool = function changeTool(tool) {\n  localStorage.setItem('system.last_tool', tool);\n  return { type: _types2.default.app.change_tool, tool: tool };\n};\n\nvar enqueue_test_task = exports.enqueue_test_task = function enqueue_test_task(dataset) {\n  return function (dispatch) {\n    var task = {\n      module: 'test',\n      activity: 'cpu',\n      dataset: dataset\n      // return actions.queue.add_task(task)\n    };\n  };\n};\n\nwindow.addEventListener('keyDown', function (e) {\n  if (e.altKey) {\n    switch (e.keyCode) {\n      case 192:\n        // tilde - switch tool\n        break;\n      case 49:\n        // 1\n        break;\n      case 50:\n        // 2\n        break;\n      case 51:\n        // 3\n        break;\n      case 52:\n        // 4\n        break;\n      case 53:\n        // 5\n        break;\n      case 54:\n        // 6\n        break;\n      case 55:\n        // 7\n        break;\n      case 56:\n        // 8\n        break;\n      case 57:\n        // 9\n        break;\n      case 48:\n        // 0\n        break;\n    }\n  }\n});","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _preact = require('preact');\n\nvar _redux = require('redux');\n\nvar _reactRedux = require('react-redux');\n\nvar _group = require('../common/group.component');\n\nvar _group2 = _interopRequireDefault(_group);\n\nvar _param = require('../common/param.component');\n\nvar _param2 = _interopRequireDefault(_param);\n\nvar _system = require('./system.actions');\n\nvar systemActions = _interopRequireWildcard(_system);\n\nvar _live = require('../live/live.actions');\n\nvar liveActions = _interopRequireWildcard(_live);\n\nvar _queue = require('../queue/queue.actions');\n\nvar queueActions = _interopRequireWildcard(_queue);\n\nvar _auth = require('../auth/auth.actions');\n\nvar authActions = _interopRequireWildcard(_auth);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar cpu_test_task = {\n  activity: 'cpu',\n  module: 'test',\n  dataset: 'test',\n  epochs: 1,\n  opt: {}\n};\nvar gpu_test_task = {\n  activity: 'gpu',\n  module: 'test',\n  dataset: 'test',\n  epochs: 1,\n  opt: {}\n};\nvar live_test_task = {\n  activity: 'live',\n  module: 'test',\n  dataset: 'test',\n  epochs: 1,\n  opt: {}\n};\nvar wait_test_task = {\n  activity: 'wait',\n  module: 'test',\n  dataset: 'test',\n  epochs: 1,\n  opt: {}\n};\nvar fruits = [\"apple\", \"pear\", \"orange\", \"strawberry\"];\nfunction choice(a) {\n  return a[Math.floor(Math.random() * a.length)];\n}\n\nvar System = function (_Component) {\n  _inherits(System, _Component);\n\n  function System(props) {\n    _classCallCheck(this, System);\n\n    return _possibleConstructorReturn(this, (System.__proto__ || Object.getPrototypeOf(System)).call(this));\n  }\n\n  _createClass(System, [{\n    key: 'componentDidUpdate',\n    value: function componentDidUpdate() {\n      if (this._screen.scrollHeight > this._screen.scrollTop - this._screen.offsetHeight + 100) {\n        this._screen.scrollTop = this._screen.scrollHeight;\n      }\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var _props = this.props,\n          site = _props.site,\n          server = _props.server,\n          relay = _props.relay,\n          runner = _props.runner,\n          rpc = _props.rpc,\n          actions = _props.actions,\n          user = _props.user;\n\n      return (0, _preact.h)(\n        'div',\n        { className: 'app system' },\n        (0, _preact.h)(\n          'div',\n          { className: 'heading' },\n          (0, _preact.h)(\n            'h1',\n            null,\n            site.name,\n            ' system'\n          )\n        ),\n        (0, _preact.h)(\n          'div',\n          { className: 'row params' },\n          (0, _preact.h)(\n            'div',\n            { className: 'column' },\n            (0, _preact.h)(\n              _group2.default,\n              { title: 'Status' },\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Server' },\n                server.status\n              ),\n              server.error && (0, _preact.h)(\n                _param2.default,\n                { title: 'Server error' },\n                server.error.message\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Relay' },\n                relay.status\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'RPC' },\n                rpc.status\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'CPU' },\n                this.renderStatus(runner.cpu)\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'GPU' },\n                this.renderStatus(runner.gpu)\n              )\n            ),\n            (0, _preact.h)(\n              _group2.default,\n              { title: 'Diagnostics' },\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Check GPU' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.system.run('nvidia-smi');\n                    } },\n                  'nvidia-smi'\n                )\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'List processes' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.system.run('ps');\n                    } },\n                  'ps'\n                )\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'List users' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.system.run('w');\n                    } },\n                  'w'\n                )\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Disk free space' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.system.run('df');\n                    } },\n                  'df'\n                )\n              )\n            ),\n            (0, _preact.h)(\n              _group2.default,\n              { title: 'Tasks' },\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Kill task' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.stop_task('cpu');\n                    } },\n                  'CPU'\n                ),\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.stop_task('gpu');\n                    } },\n                  'GPU'\n                )\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Queue' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.start_queue();\n                    } },\n                  'Start'\n                ),\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.stop_queue();\n                    } },\n                  'Stop'\n                )\n              )\n            ),\n            (0, _preact.h)(\n              _group2.default,\n              { title: 'Auth' },\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Logged in as ' + user.username },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.auth.logout();\n                    } },\n                  'Logout'\n                )\n              )\n            ),\n            (0, _preact.h)(\n              _group2.default,\n              { title: 'Test' },\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'CPU Test Task' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.start_task(cpu_test_task, { preempt: true, watch: true });\n                    } },\n                  'Start'\n                ),\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.stop_task(runner.cpu.task);\n                    } },\n                  'Stop'\n                )\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'GPU Test Task' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.start_task(gpu_test_task, { preempt: true, watch: true });\n                    } },\n                  'Start'\n                ),\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.stop_task(runner.gpu.task);\n                    } },\n                  'Stop'\n                )\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Live Test Task' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.start_task(live_test_task, { preempt: true, watch: true });\n                    } },\n                  'Start'\n                ),\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.stop_task(runner.cpu.task);\n                    } },\n                  'Stop'\n                )\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Test Live RPC' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.live.get_params();\n                    } },\n                  'Get'\n                ),\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.live.set_param('fruit', choice(fruits));\n                    } },\n                  'Set'\n                )\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: 'Queue Tests' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.system.enqueue_test_task(choice(fruits));\n                    } },\n                  '+Add test task'\n                )\n              ),\n              (0, _preact.h)(\n                _param2.default,\n                { title: '' },\n                (0, _preact.h)(\n                  'button',\n                  { onClick: function onClick() {\n                      return actions.queue.start_task(wait_test_task, { preempt: true, watch: true });\n                    } },\n                  'Wait and Buzz'\n                )\n              )\n            )\n          ),\n          this.renderCommandOutput()\n        )\n      );\n    }\n  }, {\n    key: 'renderStatus',\n    value: function renderStatus(processor) {\n      if (!processor) {\n        return 'unknown';\n      }\n      if (processor.status === 'IDLE') {\n        return 'idle';\n      }\n      var task = processor.task;\n      return task.activity + ' ' + task.module;\n    }\n  }, {\n    key: 'renderCommandOutput',\n    value: function renderCommandOutput() {\n      var _this2 = this;\n\n      var _props2 = this.props,\n          cmd = _props2.cmd,\n          stdout = _props2.stdout,\n          stderr = _props2.stderr;\n\n      var output = void 0;\n      if (cmd.loading) {\n        output = 'Loading: ' + cmd.name;\n      } else if (cmd.loaded) {\n        if (cmd.error) {\n          output = 'Error: ' + cmd.name + '\\n\\n' + JSON.stringify(cmd.error, null, 2);\n        } else {\n          output = cmd.stdout;\n          if (cmd.stderr) {\n            output += '\\n\\n_________________________________\\n\\n';\n            output += cmd.stderr;\n          }\n        }\n      } else {\n        output = stdout;\n        if (stderr.length) {\n          output += '\\n\\n_________________________________\\n\\n';\n          output += stderr;\n        }\n      }\n      return (0, _preact.h)(\n        'div',\n        null,\n        (0, _preact.h)(\n          'div',\n          { ref: function ref(_ref) {\n              return _this2._screen = _ref;\n            }, className: 'screen' },\n          output\n        )\n      );\n    }\n  }]);\n\n  return System;\n}(_preact.Component);\n\nvar mapStateToProps = function mapStateToProps(state) {\n  return _extends({\n    user: state.auth.user\n  }, state.system, state.live);\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {\n  return {\n    actions: {\n      auth: (0, _redux.bindActionCreators)(authActions, dispatch),\n      system: (0, _redux.bindActionCreators)(systemActions, dispatch),\n      queue: (0, _redux.bindActionCreators)(queueActions, dispatch),\n      live: (0, _redux.bindActionCreators)(liveActions, dispatch)\n    }\n  };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(System);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _types = require('../types');\n\nvar _types2 = _interopRequireDefault(_types);\n\nvar _moment = require('moment/min/moment.min');\n\nvar _moment2 = _interopRequireDefault(_moment);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar FileSaver = require('file-saver');\n\nvar systemInitialState = {\n  loading: false,\n  error: null,\n\n  site: {\n    name: 'loading'\n  },\n  app: {\n    tool: localStorage.getItem('system.last_tool') || 'pix2pix'\n  },\n  server: {\n    connected: false,\n    status: \"disconnected\",\n    error: null\n  },\n  relay: {\n    connected: false,\n    status: \"unknown\",\n    error: null\n  },\n  rpc: {\n    connected: false,\n    status: \"disconnected\",\n    error: null\n  },\n  cmd: {\n    loading: false,\n    loaded: false,\n    name: null,\n    error: null,\n    stdout: \"\",\n    stderr: \"\"\n  },\n  runner: {\n    cpu: { status: 'IDLE', task: {} },\n    gpu: { status: 'IDLE', task: {} }\n  },\n  stdout: \"\",\n  stderr: \"\"\n};\n\nvar modules = ['pix2pix', 'samplernn', 'pix2wav'].reduce(function (a, b) {\n  return a[b] = b, a;\n}, {});\n\nvar systemReducer = function systemReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : systemInitialState;\n  var action = arguments[1];\n\n  // console.log(action.type)\n  var processor = null;\n  switch (action.type) {\n    case _types2.default.socket.connect:\n    case _types2.default.socket.reconnecting:\n      return _extends({}, state, {\n        server: {\n          status: 'connected',\n          connected: true,\n          error: null\n        }\n      });\n    case _types2.default.socket.reconnect:\n      return _extends({}, state, {\n        server: {\n          status: 'reconnecting (attempt ' + action.attempt + ')',\n          connected: false,\n          error: null\n        }\n      });\n    case _types2.default.socket.connect_error:\n    case _types2.default.socket.reconnect_error:\n    case _types2.default.socket.disconnect:\n    case _types2.default.socket.reconnect_failed:\n      return _extends({}, state, {\n        server: {\n          status: 'disconnected',\n          connected: false,\n          error: action.error || null\n        }\n      });\n    case _types2.default.socket.error:\n      return _extends({}, state, {\n        server: _extends({}, state.socket, {\n          error: action.error\n        })\n      });\n    case _types2.default.system.relay_connected:\n      return _extends({}, state, {\n        relay: {\n          status: 'connected',\n          connected: true,\n          error: null\n        }\n      });\n    case _types2.default.system.relay_disconnected:\n      return _extends({}, state, {\n        relay: {\n          status: 'disconnected',\n          connected: false,\n          error: null\n        },\n        rpc: {\n          status: 'disconnected',\n          connected: false,\n          error: null\n        }\n      });\n    case _types2.default.system.rpc_connected:\n      return _extends({}, state, {\n        rpc: {\n          status: 'connected',\n          connected: true,\n          error: null\n        },\n        runner: action.runner\n      });\n    case _types2.default.system.rpc_disconnected:\n      return _extends({}, state, {\n        rpc: {\n          status: 'disconnected',\n          connected: false,\n          error: null\n        },\n        runner: action.runner || state.runner\n      });\n    case _types2.default.system.load_site:\n      document.querySelector('title').innerHTML = action.site.name + '.cortex';\n      var tool = state.app.tool;\n      var path = window.location.pathname.split('/')[1];\n      if (path in modules) {\n        tool = path;\n      }\n      return _extends({}, state, {\n        site: action.site,\n        app: _extends({}, state.app, {\n          tool: tool\n        })\n      });\n    case _types2.default.system.running_command:\n      return _extends({}, state, {\n        cmd: {\n          loading: true,\n          loaded: false,\n          name: action.cmd,\n          error: null,\n          stdout: null,\n          stderr: null\n        }\n      });\n    case _types2.default.system.command_output:\n      return _extends({}, state, {\n        cmd: {\n          loading: false,\n          loaded: true,\n          name: action.data.cmd,\n          error: action.data.error,\n          stdout: action.data.stdout,\n          stderr: action.data.stderr\n        }\n      });\n    case _types2.default.task.task_begin:\n      console.log('task begin', action.task, action.task.processor);\n      return _extends({}, state, {\n        runner: _extends({}, state.runner, _defineProperty({}, action.task.processor, { status: 'RUNNING', task: action.task })),\n        cmd: _extends({}, state.cmd, {\n          loaded: false,\n          stdout: \"\",\n          stderr: \"\"\n        }),\n        stdout: \"\",\n        stderr: \"\"\n      });\n    case _types2.default.task.task_finish:\n      if (action.task.processor === 'cpu' || state.runner.cpu.task && state.runner.cpu.task.uuid === action.task.uuid) {\n        processor = 'cpu';\n      } else if (action.task.processor === 'gpu' || state.runner.gpu.task && state.runner.gpu.task.uuid === action.task.uuid) {\n        processor = 'gpu';\n      } else {\n        processor = null;\n      }\n      console.log('task finish', action);\n      return _extends({}, state, {\n        rpc: {\n          connected: false,\n          status: \"disconnected\",\n          error: null\n        },\n        runner: processor ? _extends({}, state.runner, _defineProperty({}, processor, { status: 'IDLE', task: {} })) : state.runner\n      });\n    case _types2.default.app.change_tool:\n      return _extends({}, state, {\n        app: _extends({}, state.app, {\n          tool: action.tool\n        })\n      });\n    case _types2.default.system.stdout:\n      if (action.data.processor && state.runner[action.data.processor]) {\n        return _extends({}, state, {\n          runner: _extends({}, state.runner, _defineProperty({}, action.data.processor, _extends({}, state.runner[action.data.processor], {\n            last_message: action.data.data\n          }))),\n          stdout: state.stdout + action.data.data\n        });\n      }\n      return _extends({}, state, {\n        stdout: state.stdout + action.data.data\n      });\n    case _types2.default.system.stderr:\n      return _extends({}, state, {\n        last_message: action.data.data,\n        stderr: state.stderr + action.data.data\n      });\n    default:\n      return state;\n  }\n};\n\nexports.default = systemReducer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _crud = require('./api/crud.types');\n\nexports.default = {\n\tsystem: {\n\t\tload_site: 'SYSTEM_LOAD_SITE',\n\t\trunning_command: 'SYSTEM_RUNNING_COMMAND',\n\t\tcommand_output: 'SYSTEM_COMMAND_OUTPUT',\n\t\trelay_connected: 'SYSTEM_RELAY_CONNECTED',\n\t\trelay_disconnected: 'SYSTEM_RELAY_DISCONNECTED',\n\t\trpc_connected: 'SYSTEM_RPC_CONNECTED',\n\t\trpc_disconnected: 'SYSTEM_RPC_DISCONNECTED',\n\t\tlist_directory: 'SYSTEM_LIST_DIRECTORY',\n\t\tlisting_directory: 'SYSTEM_LISTING_DIRECTORY',\n\t\tcount_directory: 'SYSTEM_COUNT_DIRECTORY',\n\t\tcounting_directory: 'SYSTEM_COUNTING_DIRECTORY',\n\t\tstdout: 'SYSTEM_STDOUT',\n\t\tstderr: 'SYSTEM_STDERR'\n\t},\n\tapp: {\n\t\tchange_tool: \"APP_CHANGE_TOOL\",\n\t\tload_progress: \"APP_LOAD_PROGRESS\"\n\t},\n\tfolder: (0, _crud.crud_type)('folder', []),\n\tfile: (0, _crud.crud_type)('file', []),\n\ttask: (0, _crud.crud_type)('task', ['starting_task', 'stopping_task', 'task_begin', 'task_finish', 'start_queue', 'stop_queue', 'starting_queue', 'stopping_queue', 'progress', 'epoch']),\n\tauth: (0, _crud.crud_type)('auth', ['set_token', 'set_error', 'set_current_user', 'logout_user', 'loading', 'initialized', 'set_return_to']),\n\tsocket: {\n\t\tconnect: 'SOCKET_CONNECT',\n\t\tconnect_error: 'SOCKET_CONNECT_ERROR',\n\t\treconnect: 'SOCKET_RECONNECT',\n\t\treconnecting: 'SOCKET_RECONNECTING',\n\t\treconnect_error: 'SOCKET_RECONNECT_ERROR',\n\t\treconnect_failed: 'SOCKET_RECONNECT_FAILED',\n\t\tdisconnect: 'SOCKET_DISCONNECT',\n\t\terror: 'SOCKET_ERROR',\n\t\tstatus: 'SOCKET_STATUS',\n\n\t\tload_params: 'SOCKET_LOAD_PARAMS',\n\t\tlist_checkpoints: 'SOCKET_LIST_CHECKPOINTS',\n\t\tlist_sequences: 'SOCKET_LIST_SEQUENCES',\n\t\tlist_epochs: 'SOCKET_LIST_EPOCHS'\n\t},\n\tplayer: {\n\t\tget_params: 'GET_PARAMS',\n\t\tset_param: 'SET_PARAM',\n\n\t\tloading_checkpoints: 'LOADING_CHECKPOINTS',\n\t\tloading_checkpoint: 'LOADING_CHECKPOINT',\n\t\tlist_checkpoints: 'LIST_CHECKPOINTS',\n\n\t\tloading_sequences: 'LOADING_SEQUENCES',\n\t\tloading_sequence: 'LOADING_SEQUENCE',\n\t\tload_sequence: 'LOAD_SEQUENCE',\n\n\t\tloading_epochs: 'LOADING_EPOCHS',\n\t\tload_epoch: 'LOAD_EPOCH',\n\n\t\tset_fps: 'SET_FPS',\n\t\tseeking: 'SEEKING',\n\t\tpausing: 'PAUSING',\n\t\tplaying: 'PLAYING',\n\t\tcurrent_frame: 'CURRENT_FRAME',\n\t\tstart_recording: 'START_RECORDING',\n\t\tadd_record_frame: 'ADD_RECORD_FRAME',\n\t\tsave_frame: 'SAVE_FRAME',\n\t\tsaving_video: 'SAVING_VIDEO',\n\t\tsave_video: 'SAVE_VIDEO',\n\n\t\tset_fullscreen: 'SET_FULLSCREEN'\n\t},\n\taudioPlayer: {\n\t\tplay: 'AUDIO_PLAY',\n\t\tpause: 'AUDIO_PAUSE',\n\t\tresume: 'AUDIO_RESUME',\n\t\tenqueue: 'AUDIO_ENQUEUE'\n\t},\n\tdataset: {\n\t\tload: 'DATASET_LOAD',\n\t\tset_folder: 'DATASET_SET_FOLDER',\n\t\tupload_files: 'DATASET_UPLOAD_FILES',\n\t\tfile_progress: 'DATASET_FILE_PROGRESS',\n\t\tfile_uploaded: 'DATASET_FILE_UPLOADED',\n\t\tfetch_url: 'DATASET_FETCH_URL',\n\t\tfetch_progress: 'DATASET_FETCH_PROGRESS',\n\t\tlist_epochs: 'DATASET_LIST_EPOCHS'\n\t},\n\tsamplernn: {\n\t\tinit: 'SAMPLERNN_INIT',\n\t\tset_folder: 'SAMPLERNN_SET_FOLDER',\n\t\tload_loss: 'SAMPLERNN_LOAD_LOSS',\n\t\tload_graph: 'SAMPLERNN_LOAD_GRAPH'\n\t\t// queue and train\n\t\t// update checkpoint settings\n\t\t// reset checkpoint settings\n\t\t// queue new checkpoint\n\t},\n\tpix2pix: (0, _crud.with_type)('pix2pix', ['init', 'set_folder']),\n\tpix2pixhd: (0, _crud.with_type)('pix2pixhd', ['init', 'set_folder', 'load_results', 'load_dataset_count']),\n\tpix2wav: (0, _crud.with_type)('pix2wav', ['init', 'set_folder']),\n\twav2pix: (0, _crud.with_type)('wav2pix', ['load', 'progress', 'finish', 'zip', 'uploading']),\n\tdashboard: (0, _crud.with_type)('dashboard', ['load']),\n\tmorph: (0, _crud.with_type)('morph', ['load'])\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.timeInSeconds = timeInSeconds;\nexports.gerund = gerund;\nexports.commatize = commatize;\nexports.carbon_date = carbon_date;\nexports.hush_views = hush_views;\nexports.hush_threads = hush_threads;\nexports.hush_size = hush_size;\nexports.hush_null = hush_null;\nexports.get_age = get_age;\nexports.courtesy_s = courtesy_s;\nfunction timeInSeconds(n) {\n  return (n / 10).toFixed(1) + ' s.';\n}\nfunction gerund(s) {\n  return s.replace(/e?$/, 'ing');\n}\nfunction commatize(n, radix) {\n  radix = radix || 1024;\n  var nums = [],\n      i,\n      counter = 0,\n      r = Math.floor;\n  if (n > radix) {\n    n /= radix;\n    nums.unshift(r(n * 10 % 10));\n    nums.unshift(\".\");\n  }\n  do {\n    i = n % 10;\n    n = r(n / 10);\n    if (n && !(++counter % 3)) {\n      i = ' ' + r(i);\n    }\n    nums.unshift(r(i));\n  } while (n);\n  return nums.join(\"\");\n}\nfunction carbon_date(date, no_bold) {\n  var span = (+new Date() - new Date(date)) / 1000,\n      color;\n  if (!no_bold && span < 86400) // modified today\n    {\n      color = \"new\";\n    } else if (span < 604800) // modifed this week\n    {\n      color = \"recent\";\n    } else if (span < 1209600) // modifed 2 weeks ago\n    {\n      color = \"med\";\n    } else if (span < 3024000) // modifed 5 weeks ago\n    {\n      color = \"old\";\n    } else if (span < 12315200) // modifed 6 months ago\n    {\n      color = \"older\";\n    } else {\n    color = \"quiet\";\n  }\n  return color;\n}\nfunction hush_views(n, bias, no_bold) {\n  var txt = commatize(n, 1000);\n  bias = bias || 1;\n  n = n || 0;\n  if (n < 30) {\n    return [\"quiet\", n + \" v.\"];\n  }\n  if (n < 200) {\n    return [\"quiet\", txt + \" v.\"];\n  } else if (n < 500) {\n    return [\"quiet\", txt + \" v.\"];\n  } else if (n < 1000) {\n    return [\"old\", txt + \" v.\"];\n  } else if (n < 5000) {\n    return [\"med\", txt + \" kv.\"];\n  } else if (no_bold || n < 10000) {\n    return [\"recent\", txt + \" kv.\"];\n  } else {\n    return [\"new\", txt + \" kv.\"];\n  }\n}\nfunction hush_threads(n, bias, no_bold) {\n  var txt = commatize(n, 1000);\n  bias = bias || 1;\n  n = n || 0;\n  if (n < 10) {\n    return [\"quiet\", n + \" t.\"];\n  } else if (n < 25) {\n    return [\"old\", txt + \" t.\"];\n  } else if (n < 50) {\n    return [\"med\", txt + \" t.\"];\n  } else if (no_bold || n < 100) {\n    return [\"recent\", txt + \" t.\"];\n  } else {\n    return [\"new\", txt + \" t.\"];\n  }\n}\nfunction hush_size(n, bias, no_bold) {\n  var txt = commatize(Math.round(n / 1024));\n  bias = 1 || bias;\n  n = n || 0;\n  if (!n) {\n    return ['', ''];\n  }\n  if (n < 1000) {\n    return [\"quiet\", n + \" b.\"];\n  }\n  if (n < 1000000) {\n    return [\"quiet\", txt + \" kb.\"];\n  } else if (n < 20000000 / bias) {\n    return [\"quiet\", txt + \" mb.\"];\n  } else if (n < 50000000 / bias) {\n    return [\"old\", txt + \" mb.\"];\n  } else if (n < 80000000 / bias) {\n    return [\"med\", txt + \" mb.\"];\n  } else if (no_bold || n < 170000000 / bias) {\n    return [\"recent\", txt + \" mb.\"];\n  } else {\n    return [\"new\", txt + \" mb.\"];\n  }\n}\nfunction hush_null(n, unit, no_bold) {\n  var s = unit ? n + \" \" + unit + \".\" : n;\n  if (n < 3) {\n    return [\"quiet\", s];\n  } else if (n < 6) {\n    return [\"older\", s];\n  } else if (n < 10) {\n    return [\"old\", s];\n  } else if (n < 16) {\n    return [\"med\", s];\n  } else if (no_bold || n < 21) {\n    return [\"recent\", s];\n  } else {\n    return [\"new\", s];\n  }\n}\nfunction get_age(t) {\n  var age = Math.abs(+Date.now() - new Date(t)) / 1000;\n  var r = Math.floor;\n  var m;\n  if (age < 5) {\n    return \"now\";\n  }\n  if (age < 60) {\n    return r(age) + \"s\";\n  }\n  age /= 60;\n  if (age < 60) {\n    return r(age) + \"m\";\n  }\n  m = r(age % 60);\n  age /= 60;\n  if (m > 0 && age < 2) {\n    return r(age) + \"h\" + m + \"m\";\n  }\n  if (age < 24) {\n    return r(age) + \"h\";\n  }\n  age /= 24;\n  if (age < 7) {\n    return r(age) + \"d\";\n  }\n  age /= 7;\n  if (age < 12) {\n    return r(age) + \"w\";\n  }\n  age /= 4;\n  if (age < 12) {\n    return r(age) + \"m\";\n  }\n  age /= 12;\n  return r(age) + \"y\";\n}\nfunction courtesy_s(n, s) {\n  return n == 1 ? \"\" : s || \"s\";\n}","'use strict';\n\n/**\n * HiDPI Canvas Polyfill (1.0.10)\n *\n * Author: Jonathan D. Johnson (http://jondavidjohn.com)\n * Homepage: https://github.com/jondavidjohn/hidpi-canvas-polyfill\n * Issue Tracker: https://github.com/jondavidjohn/hidpi-canvas-polyfill/issues\n * License: Apache-2.0\n*/\n(function (prototype) {\n\n  var pixelRatio = function () {\n    var canvas = window.document.createElement('canvas'),\n        context = canvas.getContext('2d'),\n        backingStore = context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1;\n\n    return (window.devicePixelRatio || 1) / backingStore;\n  }(),\n      forEach = function forEach(obj, func) {\n    for (var p in obj) {\n      if (obj.hasOwnProperty(p)) {\n        func(obj[p], p);\n      }\n    }\n  },\n      ratioArgs = {\n    'fillRect': 'all',\n    'clearRect': 'all',\n    'strokeRect': 'all',\n    'moveTo': 'all',\n    'lineTo': 'all',\n    'arc': [0, 1, 2],\n    'arcTo': 'all',\n    'bezierCurveTo': 'all',\n    'isPointinPath': 'all',\n    'isPointinStroke': 'all',\n    'quadraticCurveTo': 'all',\n    'rect': 'all',\n    'translate': 'all',\n    'createRadialGradient': 'all',\n    'createLinearGradient': 'all'\n  };\n\n  if (pixelRatio === 1) return;\n\n  forEach(ratioArgs, function (value, key) {\n    prototype[key] = function (_super) {\n      return function () {\n        var i,\n            len,\n            args = Array.prototype.slice.call(arguments);\n\n        if (value === 'all') {\n          args = args.map(function (a) {\n            return a * pixelRatio;\n          });\n        } else if (Array.isArray(value)) {\n          for (i = 0, len = value.length; i < len; i++) {\n            args[value[i]] *= pixelRatio;\n          }\n        }\n\n        return _super.apply(this, args);\n      };\n    }(prototype[key]);\n  });\n\n  // Stroke lineWidth adjustment\n  prototype.stroke = function (_super) {\n    return function () {\n      this.lineWidth *= pixelRatio;\n      _super.apply(this, arguments);\n      this.lineWidth /= pixelRatio;\n    };\n  }(prototype.stroke);\n\n  // Text\n  //\n  prototype.fillText = function (_super) {\n    return function () {\n      var args = Array.prototype.slice.call(arguments);\n\n      args[1] *= pixelRatio; // x\n      args[2] *= pixelRatio; // y\n\n      this.font = this.font.replace(/(\\d+)(px|em|rem|pt)/g, function (w, m, u) {\n        return m * pixelRatio + u;\n      });\n\n      _super.apply(this, args);\n\n      this.font = this.font.replace(/(\\d+)(px|em|rem|pt)/g, function (w, m, u) {\n        return m / pixelRatio + u;\n      });\n    };\n  }(prototype.fillText);\n\n  prototype.strokeText = function (_super) {\n    return function () {\n      var args = Array.prototype.slice.call(arguments);\n\n      args[1] *= pixelRatio; // x\n      args[2] *= pixelRatio; // y\n\n      this.font = this.font.replace(/(\\d+)(px|em|rem|pt)/g, function (w, m, u) {\n        return m * pixelRatio + u;\n      });\n\n      _super.apply(this, args);\n\n      this.font = this.font.replace(/(\\d+)(px|em|rem|pt)/g, function (w, m, u) {\n        return m / pixelRatio + u;\n      });\n    };\n  }(prototype.strokeText);\n})(window.CanvasRenderingContext2D.prototype);\n;(function (prototype) {\n  prototype.getContext = function (_super) {\n    return function (type) {\n      var backingStore, ratio, context;\n\n      if (type == '2d-lodpi') {\n        context = _super.call(this, '2d');\n      } else if (type === '2d') {\n        context = _super.call(this, '2d');\n\n        backingStore = context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1;\n\n        ratio = (window.devicePixelRatio || 1) / backingStore;\n\n        if (ratio > 1) {\n          this.style.height = this.height + 'px';\n          this.style.width = this.width + 'px';\n          this.width *= ratio;\n          this.height *= ratio;\n        }\n      } else {\n        context = _super.call(this, type);\n      }\n\n      return context;\n    };\n  }(prototype.getContext);\n})(window.HTMLCanvasElement.prototype);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _sort = require('./sort');\n\nvar sort = _interopRequireWildcard(_sort);\n\nvar _format = require('./format');\n\nvar format = _interopRequireWildcard(_format);\n\nvar _math = require('./math');\n\nvar maths = _interopRequireWildcard(_math);\n\nrequire('./hidpi-canvas');\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nvar is_iphone = !!(navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i));\nvar is_ipad = !!navigator.userAgent.match(/iPad/i);\nvar is_android = !!navigator.userAgent.match(/Android/i);\nvar is_mobile = is_iphone || is_ipad || is_android;\nvar is_desktop = !is_mobile;\n\nvar htmlClassList = document.body.parentNode.classList;\nhtmlClassList.add(is_desktop ? 'desktop' : 'mobile');\nhtmlClassList.remove('loading');\n\n// window.debug = false\n\nvar allProgress = function allProgress(promises, progress_cb) {\n  var d = 0;\n  progress_cb(0, 0, promises.length);\n  promises.forEach(function (p) {\n    p.then(function (s) {\n      d += 1;\n      progress_cb(Math.floor(d * 100 / promises.length), d, promises.length);\n      return s;\n    });\n  });\n  return Promise.all(promises);\n};\n\ndocument.body.style.backgroundImage = 'linear-gradient(' + (maths.randint(40) + 40) + 'deg, #fde, #ffe)';\n\nvar fieldSet = function fieldSet(defaultFields) {\n  return function (fields) {\n    if (fields) {\n      if (fields instanceof Set) {\n        return fields;\n      }\n      return new Set(fields.split(' '));\n    }\n    return defaultFields;\n  };\n};\n\nexports.default = _extends({}, maths, format, {\n  sort: sort,\n  allProgress: allProgress, fieldSet: fieldSet,\n  is_iphone: is_iphone, is_ipad: is_ipad, is_android: is_android, is_mobile: is_mobile, is_desktop: is_desktop\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.randrange = randrange;\nexports.randsign = randsign;\nexports.choice = choice;\nexports.angle = angle;\nexports.dist = dist;\nexports.xor = xor;\nexports.quantize = quantize;\nexports.shuffle = shuffle;\nexports.gaussian = gaussian;\nvar mod = exports.mod = function mod(n, m) {\n  return n - m * Math.floor(n / m);\n};\nvar clamp = exports.clamp = function clamp(n, a, b) {\n  return n < a ? a : n < b ? n : b;\n};\nvar norm = exports.norm = function norm(n, a, b) {\n  return (n - a) / (b - a);\n};\nvar lerp = exports.lerp = function lerp(n, a, b) {\n  return (b - a) * n + a;\n};\nvar mix = exports.mix = function mix(n, a, b) {\n  return a * (1 - n) + b * n;\n};\nvar randint = exports.randint = function randint(n) {\n  return Math.floor(Math.random() * n);\n};\nfunction randrange(a, b) {\n  return Math.random() * (b - a) + a;\n}\nfunction randsign() {\n  return Math.random() >= 0.5 ? -1 : 1;\n}\nfunction choice(a) {\n  return a[Math.floor(Math.random() * a.length)];\n}\nfunction angle(x0, y0, x1, y1) {\n  return Math.atan2(y1 - y0, x1 - x0);\n}\nfunction dist(x0, y0, x1, y1) {\n  return Math.sqrt(Math.pow(x1 - x0, 2) + Math.pow(y1 - y0, 2));\n}\nfunction xor(a, b) {\n  a = !!a;b = !!b;return (a || b) && !(a && b);\n}\nfunction quantize(a, b) {\n  return Math.floor(a / b) * b;\n}\nfunction shuffle(a) {\n  for (var i = a.length; i > 0; i--) {\n    var r = randint(i);\n    var swap = a[i - 1];\n    a[i - 1] = a[r];\n    a[r] = swap;\n  }\n  return a;\n}\n// returns a gaussian random function with the given mean and stdev.\nfunction gaussian(mean, stdev) {\n  var y2 = void 0;\n  var use_last = false;\n  return function () {\n    var y1 = void 0;\n    if (use_last) {\n      y1 = y2;\n      use_last = false;\n    } else {\n      var x1 = void 0,\n          x2 = void 0,\n          w = void 0;\n      do {\n        x1 = 2.0 * Math.random() - 1.0;\n        x2 = 2.0 * Math.random() - 1.0;\n        w = x1 * x1 + x2 * x2;\n      } while (w >= 1.0);\n      w = Math.sqrt(-2.0 * Math.log(w) / w);\n      y1 = x1 * w;\n      y2 = x2 * w;\n      use_last = true;\n    }\n\n    var retval = mean + stdev * y1;\n    if (retval > 0) return retval;\n    return -retval;\n  };\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar numericSort = exports.numericSort = {\n  asc: function asc(a, b) {\n    return a[0] - b[0];\n  },\n  desc: function desc(a, b) {\n    return b[0] - a[0];\n  }\n};\nvar stringSort = exports.stringSort = {\n  asc: function asc(a, b) {\n    return a[0].localeCompare(b[0]);\n  },\n  desc: function desc(a, b) {\n    return b[0].localeCompare(a[0]);\n  }\n};\nvar orderByFn = exports.orderByFn = function orderByFn() {\n  var s = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'name asc';\n\n  var _s$split = s.split(' '),\n      _s$split2 = _slicedToArray(_s$split, 2),\n      _s$split2$ = _s$split2[0],\n      field = _s$split2$ === undefined ? 'name' : _s$split2$,\n      _s$split2$2 = _s$split2[1],\n      direction = _s$split2$2 === undefined ? 'asc' : _s$split2$2;\n\n  var mapFn = void 0,\n      sortFn = void 0;\n  switch (field) {\n    case 'epoch':\n      mapFn = function mapFn(a) {\n        return [parseInt(a.epoch || a.epochs) || 0, a];\n      };\n      sortFn = numericSort[direction];\n      break;\n    case 'size':\n      mapFn = function mapFn(a) {\n        return [parseInt(a.size) || 0, a];\n      };\n      sortFn = numericSort[direction];\n      break;\n    case 'date':\n      mapFn = function mapFn(a) {\n        return [+new Date(a.date || a.created_at), a];\n      };\n      sortFn = numericSort[direction];\n      break;\n    case 'updated_at':\n      mapFn = function mapFn(a) {\n        return [+new Date(a.updated_at), a];\n      };\n      sortFn = numericSort[direction];\n      break;\n    case 'priority':\n      mapFn = function mapFn(a) {\n        return [parseInt(a.priority) || parseInt(a.id) || 1000, a];\n      };\n      sortFn = numericSort[direction];\n    case 'name':\n    default:\n      mapFn = function mapFn(a) {\n        return [a.name || \"\", a];\n      };\n      sortFn = stringSort[direction];\n      break;\n  }\n  return { mapFn: mapFn, sortFn: sortFn };\n};","(function (global, factory) {\n  if (typeof define === 'function' && define.amd) {\n    define(['exports', 'module'], factory);\n  } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {\n    factory(exports, module);\n  } else {\n    var mod = {\n      exports: {}\n    };\n    factory(mod.exports, mod);\n    global.fetchJsonp = mod.exports;\n  }\n})(this, function (exports, module) {\n  'use strict';\n\n  var defaultOptions = {\n    timeout: 5000,\n    jsonpCallback: 'callback',\n    jsonpCallbackFunction: null\n  };\n\n  function generateCallbackFunction() {\n    return 'jsonp_' + Date.now() + '_' + Math.ceil(Math.random() * 100000);\n  }\n\n  function clearFunction(functionName) {\n    // IE8 throws an exception when you try to delete a property on window\n    // http://stackoverflow.com/a/1824228/751089\n    try {\n      delete window[functionName];\n    } catch (e) {\n      window[functionName] = undefined;\n    }\n  }\n\n  function removeScript(scriptId) {\n    var script = document.getElementById(scriptId);\n    if (script) {\n      document.getElementsByTagName('head')[0].removeChild(script);\n    }\n  }\n\n  function fetchJsonp(_url) {\n    var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\n    // to avoid param reassign\n    var url = _url;\n    var timeout = options.timeout || defaultOptions.timeout;\n    var jsonpCallback = options.jsonpCallback || defaultOptions.jsonpCallback;\n\n    var timeoutId = undefined;\n\n    return new Promise(function (resolve, reject) {\n      var callbackFunction = options.jsonpCallbackFunction || generateCallbackFunction();\n      var scriptId = jsonpCallback + '_' + callbackFunction;\n\n      window[callbackFunction] = function (response) {\n        resolve({\n          ok: true,\n          // keep consistent with fetch API\n          json: function json() {\n            return Promise.resolve(response);\n          }\n        });\n\n        if (timeoutId) clearTimeout(timeoutId);\n\n        removeScript(scriptId);\n\n        clearFunction(callbackFunction);\n      };\n\n      // Check if the user set their own params, and if not add a ? to start a list of params\n      url += url.indexOf('?') === -1 ? '?' : '&';\n\n      var jsonpScript = document.createElement('script');\n      jsonpScript.setAttribute('src', '' + url + jsonpCallback + '=' + callbackFunction);\n      if (options.charset) {\n        jsonpScript.setAttribute('charset', options.charset);\n      }\n      jsonpScript.id = scriptId;\n      document.getElementsByTagName('head')[0].appendChild(jsonpScript);\n\n      timeoutId = setTimeout(function () {\n        reject(new Error('JSONP request to ' + _url + ' timed out'));\n\n        clearFunction(callbackFunction);\n        removeScript(scriptId);\n        window[callbackFunction] = function () {\n          clearFunction(callbackFunction);\n        };\n      }, timeout);\n\n      // Caught if got 404/500\n      jsonpScript.onerror = function () {\n        reject(new Error('JSONP request to ' + _url + ' failed'));\n\n        clearFunction(callbackFunction);\n        removeScript(scriptId);\n        if (timeoutId) clearTimeout(timeoutId);\n      };\n    });\n  }\n\n  // export as global function\n  /*\n  let local;\n  if (typeof global !== 'undefined') {\n    local = global;\n  } else if (typeof self !== 'undefined') {\n    local = self;\n  } else {\n    try {\n      local = Function('return this')();\n    } catch (e) {\n      throw new Error('polyfill failed because global object is unavailable in this environment');\n    }\n  }\n  local.fetchJsonp = fetchJsonp;\n  */\n\n  module.exports = fetchJsonp;\n});","'use strict';\n\nfunction FFT(size) {\n  this.size = size | 0;\n  if (this.size <= 1 || (this.size & (this.size - 1)) !== 0)\n    throw new Error('FFT size must be a power of two and bigger than 1');\n\n  this._csize = size << 1;\n\n  // NOTE: Use of `var` is intentional for old V8 versions\n  var table = new Array(this.size * 2);\n  for (var i = 0; i < table.length; i += 2) {\n    const angle = Math.PI * i / this.size;\n    table[i] = Math.cos(angle);\n    table[i + 1] = -Math.sin(angle);\n  }\n  this.table = table;\n\n  // Find size's power of two\n  var power = 0;\n  for (var t = 1; this.size > t; t <<= 1)\n    power++;\n\n  // Calculate initial step's width:\n  //   * If we are full radix-4 - it is 2x smaller to give inital len=8\n  //   * Otherwise it is the same as `power` to give len=4\n  this._width = power % 2 === 0 ? power - 1 : power;\n\n  // Pre-compute bit-reversal patterns\n  this._bitrev = new Array(1 << this._width);\n  for (var j = 0; j < this._bitrev.length; j++) {\n    this._bitrev[j] = 0;\n    for (var shift = 0; shift < this._width; shift += 2) {\n      var revShift = this._width - shift - 2;\n      this._bitrev[j] |= ((j >>> shift) & 3) << revShift;\n    }\n  }\n\n  this._out = null;\n  this._data = null;\n  this._inv = 0;\n}\nmodule.exports = FFT;\n\nFFT.prototype.fromComplexArray = function fromComplexArray(complex, storage) {\n  var res = storage || new Array(complex.length >>> 1);\n  for (var i = 0; i < complex.length; i += 2)\n    res[i >>> 1] = complex[i];\n  return res;\n};\n\nFFT.prototype.createComplexArray = function createComplexArray() {\n  const res = new Array(this._csize);\n  for (var i = 0; i < res.length; i++)\n    res[i] = 0;\n  return res;\n};\n\nFFT.prototype.toComplexArray = function toComplexArray(input, storage) {\n  var res = storage || this.createComplexArray();\n  for (var i = 0; i < res.length; i += 2) {\n    res[i] = input[i >>> 1];\n    res[i + 1] = 0;\n  }\n  return res;\n};\n\nFFT.prototype.completeSpectrum = function completeSpectrum(spectrum) {\n  var size = this._csize;\n  var half = size >>> 1;\n  for (var i = 2; i < half; i += 2) {\n    spectrum[size - i] = spectrum[i];\n    spectrum[size - i + 1] = -spectrum[i + 1];\n  }\n};\n\nFFT.prototype.transform = function transform(out, data) {\n  if (out === data)\n    throw new Error('Input and output buffers must be different');\n\n  this._out = out;\n  this._data = data;\n  this._inv = 0;\n  this._transform4();\n  this._out = null;\n  this._data = null;\n};\n\nFFT.prototype.realTransform = function realTransform(out, data) {\n  if (out === data)\n    throw new Error('Input and output buffers must be different');\n\n  this._out = out;\n  this._data = data;\n  this._inv = 0;\n  this._realTransform4();\n  this._out = null;\n  this._data = null;\n};\n\nFFT.prototype.inverseTransform = function inverseTransform(out, data) {\n  if (out === data)\n    throw new Error('Input and output buffers must be different');\n\n  this._out = out;\n  this._data = data;\n  this._inv = 1;\n  this._transform4();\n  for (var i = 0; i < out.length; i++)\n    out[i] /= this.size;\n  this._out = null;\n  this._data = null;\n};\n\n// radix-4 implementation\n//\n// NOTE: Uses of `var` are intentional for older V8 version that do not\n// support both `let compound assignments` and `const phi`\nFFT.prototype._transform4 = function _transform4() {\n  var out = this._out;\n  var size = this._csize;\n\n  // Initial step (permute and transform)\n  var width = this._width;\n  var step = 1 << width;\n  var len = (size / step) << 1;\n\n  var outOff;\n  var t;\n  var bitrev = this._bitrev;\n  if (len === 4) {\n    for (outOff = 0, t = 0; outOff < size; outOff += len, t++) {\n      const off = bitrev[t];\n      this._singleTransform2(outOff, off, step);\n    }\n  } else {\n    // len === 8\n    for (outOff = 0, t = 0; outOff < size; outOff += len, t++) {\n      const off = bitrev[t];\n      this._singleTransform4(outOff, off, step);\n    }\n  }\n\n  // Loop through steps in decreasing order\n  var inv = this._inv ? -1 : 1;\n  var table = this.table;\n  for (step >>= 2; step >= 2; step >>= 2) {\n    len = (size / step) << 1;\n    var quarterLen = len >>> 2;\n\n    // Loop through offsets in the data\n    for (outOff = 0; outOff < size; outOff += len) {\n      // Full case\n      var limit = outOff + quarterLen;\n      for (var i = outOff, k = 0; i < limit; i += 2, k += step) {\n        const A = i;\n        const B = A + quarterLen;\n        const C = B + quarterLen;\n        const D = C + quarterLen;\n\n        // Original values\n        const Ar = out[A];\n        const Ai = out[A + 1];\n        const Br = out[B];\n        const Bi = out[B + 1];\n        const Cr = out[C];\n        const Ci = out[C + 1];\n        const Dr = out[D];\n        const Di = out[D + 1];\n\n        // Middle values\n        const MAr = Ar;\n        const MAi = Ai;\n\n        const tableBr = table[k];\n        const tableBi = inv * table[k + 1];\n        const MBr = Br * tableBr - Bi * tableBi;\n        const MBi = Br * tableBi + Bi * tableBr;\n\n        const tableCr = table[2 * k];\n        const tableCi = inv * table[2 * k + 1];\n        const MCr = Cr * tableCr - Ci * tableCi;\n        const MCi = Cr * tableCi + Ci * tableCr;\n\n        const tableDr = table[3 * k];\n        const tableDi = inv * table[3 * k + 1];\n        const MDr = Dr * tableDr - Di * tableDi;\n        const MDi = Dr * tableDi + Di * tableDr;\n\n        // Pre-Final values\n        const T0r = MAr + MCr;\n        const T0i = MAi + MCi;\n        const T1r = MAr - MCr;\n        const T1i = MAi - MCi;\n        const T2r = MBr + MDr;\n        const T2i = MBi + MDi;\n        const T3r = inv * (MBr - MDr);\n        const T3i = inv * (MBi - MDi);\n\n        // Final values\n        const FAr = T0r + T2r;\n        const FAi = T0i + T2i;\n\n        const FCr = T0r - T2r;\n        const FCi = T0i - T2i;\n\n        const FBr = T1r + T3i;\n        const FBi = T1i - T3r;\n\n        const FDr = T1r - T3i;\n        const FDi = T1i + T3r;\n\n        out[A] = FAr;\n        out[A + 1] = FAi;\n        out[B] = FBr;\n        out[B + 1] = FBi;\n        out[C] = FCr;\n        out[C + 1] = FCi;\n        out[D] = FDr;\n        out[D + 1] = FDi;\n      }\n    }\n  }\n};\n\n// radix-2 implementation\n//\n// NOTE: Only called for len=4\nFFT.prototype._singleTransform2 = function _singleTransform2(outOff, off,\n                                                             step) {\n  const out = this._out;\n  const data = this._data;\n\n  const evenR = data[off];\n  const evenI = data[off + 1];\n  const oddR = data[off + step];\n  const oddI = data[off + step + 1];\n\n  const leftR = evenR + oddR;\n  const leftI = evenI + oddI;\n  const rightR = evenR - oddR;\n  const rightI = evenI - oddI;\n\n  out[outOff] = leftR;\n  out[outOff + 1] = leftI;\n  out[outOff + 2] = rightR;\n  out[outOff + 3] = rightI;\n};\n\n// radix-4\n//\n// NOTE: Only called for len=8\nFFT.prototype._singleTransform4 = function _singleTransform4(outOff, off,\n                                                             step) {\n  const out = this._out;\n  const data = this._data;\n  const inv = this._inv ? -1 : 1;\n  const step2 = step * 2;\n  const step3 = step * 3;\n\n  // Original values\n  const Ar = data[off];\n  const Ai = data[off + 1];\n  const Br = data[off + step];\n  const Bi = data[off + step + 1];\n  const Cr = data[off + step2];\n  const Ci = data[off + step2 + 1];\n  const Dr = data[off + step3];\n  const Di = data[off + step3 + 1];\n\n  // Pre-Final values\n  const T0r = Ar + Cr;\n  const T0i = Ai + Ci;\n  const T1r = Ar - Cr;\n  const T1i = Ai - Ci;\n  const T2r = Br + Dr;\n  const T2i = Bi + Di;\n  const T3r = inv * (Br - Dr);\n  const T3i = inv * (Bi - Di);\n\n  // Final values\n  const FAr = T0r + T2r;\n  const FAi = T0i + T2i;\n\n  const FBr = T1r + T3i;\n  const FBi = T1i - T3r;\n\n  const FCr = T0r - T2r;\n  const FCi = T0i - T2i;\n\n  const FDr = T1r - T3i;\n  const FDi = T1i + T3r;\n\n  out[outOff] = FAr;\n  out[outOff + 1] = FAi;\n  out[outOff + 2] = FBr;\n  out[outOff + 3] = FBi;\n  out[outOff + 4] = FCr;\n  out[outOff + 5] = FCi;\n  out[outOff + 6] = FDr;\n  out[outOff + 7] = FDi;\n};\n\n// Real input radix-4 implementation\nFFT.prototype._realTransform4 = function _realTransform4() {\n  var out = this._out;\n  var size = this._csize;\n\n  // Initial step (permute and transform)\n  var width = this._width;\n  var step = 1 << width;\n  var len = (size / step) << 1;\n\n  var outOff;\n  var t;\n  var bitrev = this._bitrev;\n  if (len === 4) {\n    for (outOff = 0, t = 0; outOff < size; outOff += len, t++) {\n      const off = bitrev[t];\n      this._singleRealTransform2(outOff, off >>> 1, step >>> 1);\n    }\n  } else {\n    // len === 8\n    for (outOff = 0, t = 0; outOff < size; outOff += len, t++) {\n      const off = bitrev[t];\n      this._singleRealTransform4(outOff, off >>> 1, step >>> 1);\n    }\n  }\n\n  // Loop through steps in decreasing order\n  var inv = this._inv ? -1 : 1;\n  var table = this.table;\n  for (step >>= 2; step >= 2; step >>= 2) {\n    len = (size / step) << 1;\n    var halfLen = len >>> 1;\n    var quarterLen = halfLen >>> 1;\n    var hquarterLen = quarterLen >>> 1;\n\n    // Loop through offsets in the data\n    for (outOff = 0; outOff < size; outOff += len) {\n      for (var i = 0, k = 0; i <= hquarterLen; i += 2, k += step) {\n        var A = outOff + i;\n        var B = A + quarterLen;\n        var C = B + quarterLen;\n        var D = C + quarterLen;\n\n        // Original values\n        var Ar = out[A];\n        var Ai = out[A + 1];\n        var Br = out[B];\n        var Bi = out[B + 1];\n        var Cr = out[C];\n        var Ci = out[C + 1];\n        var Dr = out[D];\n        var Di = out[D + 1];\n\n        // Middle values\n        var MAr = Ar;\n        var MAi = Ai;\n\n        var tableBr = table[k];\n        var tableBi = inv * table[k + 1];\n        var MBr = Br * tableBr - Bi * tableBi;\n        var MBi = Br * tableBi + Bi * tableBr;\n\n        var tableCr = table[2 * k];\n        var tableCi = inv * table[2 * k + 1];\n        var MCr = Cr * tableCr - Ci * tableCi;\n        var MCi = Cr * tableCi + Ci * tableCr;\n\n        var tableDr = table[3 * k];\n        var tableDi = inv * table[3 * k + 1];\n        var MDr = Dr * tableDr - Di * tableDi;\n        var MDi = Dr * tableDi + Di * tableDr;\n\n        // Pre-Final values\n        var T0r = MAr + MCr;\n        var T0i = MAi + MCi;\n        var T1r = MAr - MCr;\n        var T1i = MAi - MCi;\n        var T2r = MBr + MDr;\n        var T2i = MBi + MDi;\n        var T3r = inv * (MBr - MDr);\n        var T3i = inv * (MBi - MDi);\n\n        // Final values\n        var FAr = T0r + T2r;\n        var FAi = T0i + T2i;\n\n        var FBr = T1r + T3i;\n        var FBi = T1i - T3r;\n\n        out[A] = FAr;\n        out[A + 1] = FAi;\n        out[B] = FBr;\n        out[B + 1] = FBi;\n\n        // Output final middle point\n        if (i === 0) {\n          var FCr = T0r - T2r;\n          var FCi = T0i - T2i;\n          out[C] = FCr;\n          out[C + 1] = FCi;\n          continue;\n        }\n\n        // Do not overwrite ourselves\n        if (i === hquarterLen)\n          continue;\n\n        // In the flipped case:\n        // MAi = -MAi\n        // MBr=-MBi, MBi=-MBr\n        // MCr=-MCr\n        // MDr=MDi, MDi=MDr\n        var ST0r = T1r;\n        var ST0i = -T1i;\n        var ST1r = T0r;\n        var ST1i = -T0i;\n        var ST2r = -inv * T3i;\n        var ST2i = -inv * T3r;\n        var ST3r = -inv * T2i;\n        var ST3i = -inv * T2r;\n\n        var SFAr = ST0r + ST2r;\n        var SFAi = ST0i + ST2i;\n\n        var SFBr = ST1r + ST3i;\n        var SFBi = ST1i - ST3r;\n\n        var SA = outOff + quarterLen - i;\n        var SB = outOff + halfLen - i;\n\n        out[SA] = SFAr;\n        out[SA + 1] = SFAi;\n        out[SB] = SFBr;\n        out[SB + 1] = SFBi;\n      }\n    }\n  }\n};\n\n// radix-2 implementation\n//\n// NOTE: Only called for len=4\nFFT.prototype._singleRealTransform2 = function _singleRealTransform2(outOff,\n                                                                     off,\n                                                                     step) {\n  const out = this._out;\n  const data = this._data;\n\n  const evenR = data[off];\n  const oddR = data[off + step];\n\n  const leftR = evenR + oddR;\n  const rightR = evenR - oddR;\n\n  out[outOff] = leftR;\n  out[outOff + 1] = 0;\n  out[outOff + 2] = rightR;\n  out[outOff + 3] = 0;\n};\n\n// radix-4\n//\n// NOTE: Only called for len=8\nFFT.prototype._singleRealTransform4 = function _singleRealTransform4(outOff,\n                                                                     off,\n                                                                     step) {\n  const out = this._out;\n  const data = this._data;\n  const inv = this._inv ? -1 : 1;\n  const step2 = step * 2;\n  const step3 = step * 3;\n\n  // Original values\n  const Ar = data[off];\n  const Br = data[off + step];\n  const Cr = data[off + step2];\n  const Dr = data[off + step3];\n\n  // Pre-Final values\n  const T0r = Ar + Cr;\n  const T1r = Ar - Cr;\n  const T2r = Br + Dr;\n  const T3r = inv * (Br - Dr);\n\n  // Final values\n  const FAr = T0r + T2r;\n\n  const FBr = T1r;\n  const FBi = -T3r;\n\n  const FCr = T0r - T2r;\n\n  const FDr = T1r;\n  const FDi = T3r;\n\n  out[outOff] = FAr;\n  out[outOff + 1] = 0;\n  out[outOff + 2] = FBr;\n  out[outOff + 3] = FBi;\n  out[outOff + 4] = FCr;\n  out[outOff + 5] = 0;\n  out[outOff + 6] = FDr;\n  out[outOff + 7] = FDi;\n};\n","/* FileSaver.js\n * A saveAs() FileSaver implementation.\n * 1.3.2\n * 2016-06-16 18:25:19\n *\n * By Eli Grey, http://eligrey.com\n * License: MIT\n *   See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md\n */\n\n/*global self */\n/*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */\n\n/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */\n\nvar saveAs = saveAs || (function(view) {\n\t\"use strict\";\n\t// IE <10 is explicitly unsupported\n\tif (typeof view === \"undefined\" || typeof navigator !== \"undefined\" && /MSIE [1-9]\\./.test(navigator.userAgent)) {\n\t\treturn;\n\t}\n\tvar\n\t\t  doc = view.document\n\t\t  // only get URL when necessary in case Blob.js hasn't overridden it yet\n\t\t, get_URL = function() {\n\t\t\treturn view.URL || view.webkitURL || view;\n\t\t}\n\t\t, save_link = doc.createElementNS(\"http://www.w3.org/1999/xhtml\", \"a\")\n\t\t, can_use_save_link = \"download\" in save_link\n\t\t, click = function(node) {\n\t\t\tvar event = new MouseEvent(\"click\");\n\t\t\tnode.dispatchEvent(event);\n\t\t}\n\t\t, is_safari = /constructor/i.test(view.HTMLElement) || view.safari\n\t\t, is_chrome_ios =/CriOS\\/[\\d]+/.test(navigator.userAgent)\n\t\t, throw_outside = function(ex) {\n\t\t\t(view.setImmediate || view.setTimeout)(function() {\n\t\t\t\tthrow ex;\n\t\t\t}, 0);\n\t\t}\n\t\t, force_saveable_type = \"application/octet-stream\"\n\t\t// the Blob API is fundamentally broken as there is no \"downloadfinished\" event to subscribe to\n\t\t, arbitrary_revoke_timeout = 1000 * 40 // in ms\n\t\t, revoke = function(file) {\n\t\t\tvar revoker = function() {\n\t\t\t\tif (typeof file === \"string\") { // file is an object URL\n\t\t\t\t\tget_URL().revokeObjectURL(file);\n\t\t\t\t} else { // file is a File\n\t\t\t\t\tfile.remove();\n\t\t\t\t}\n\t\t\t};\n\t\t\tsetTimeout(revoker, arbitrary_revoke_timeout);\n\t\t}\n\t\t, dispatch = function(filesaver, event_types, event) {\n\t\t\tevent_types = [].concat(event_types);\n\t\t\tvar i = event_types.length;\n\t\t\twhile (i--) {\n\t\t\t\tvar listener = filesaver[\"on\" + event_types[i]];\n\t\t\t\tif (typeof listener === \"function\") {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlistener.call(filesaver, event || filesaver);\n\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\tthrow_outside(ex);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t, auto_bom = function(blob) {\n\t\t\t// prepend BOM for UTF-8 XML and text/* types (including HTML)\n\t\t\t// note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF\n\t\t\tif (/^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n\t\t\t\treturn new Blob([String.fromCharCode(0xFEFF), blob], {type: blob.type});\n\t\t\t}\n\t\t\treturn blob;\n\t\t}\n\t\t, FileSaver = function(blob, name, no_auto_bom) {\n\t\t\tif (!no_auto_bom) {\n\t\t\t\tblob = auto_bom(blob);\n\t\t\t}\n\t\t\t// First try a.download, then web filesystem, then object URLs\n\t\t\tvar\n\t\t\t\t  filesaver = this\n\t\t\t\t, type = blob.type\n\t\t\t\t, force = type === force_saveable_type\n\t\t\t\t, object_url\n\t\t\t\t, dispatch_all = function() {\n\t\t\t\t\tdispatch(filesaver, \"writestart progress write writeend\".split(\" \"));\n\t\t\t\t}\n\t\t\t\t// on any filesys errors revert to saving with object URLs\n\t\t\t\t, fs_error = function() {\n\t\t\t\t\tif ((is_chrome_ios || (force && is_safari)) && view.FileReader) {\n\t\t\t\t\t\t// Safari doesn't allow downloading of blob urls\n\t\t\t\t\t\tvar reader = new FileReader();\n\t\t\t\t\t\treader.onloadend = function() {\n\t\t\t\t\t\t\tvar url = is_chrome_ios ? reader.result : reader.result.replace(/^data:[^;]*;/, 'data:attachment/file;');\n\t\t\t\t\t\t\tvar popup = view.open(url, '_blank');\n\t\t\t\t\t\t\tif(!popup) view.location.href = url;\n\t\t\t\t\t\t\turl=undefined; // release reference before dispatching\n\t\t\t\t\t\t\tfilesaver.readyState = filesaver.DONE;\n\t\t\t\t\t\t\tdispatch_all();\n\t\t\t\t\t\t};\n\t\t\t\t\t\treader.readAsDataURL(blob);\n\t\t\t\t\t\tfilesaver.readyState = filesaver.INIT;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// don't create more object URLs than needed\n\t\t\t\t\tif (!object_url) {\n\t\t\t\t\t\tobject_url = get_URL().createObjectURL(blob);\n\t\t\t\t\t}\n\t\t\t\t\tif (force) {\n\t\t\t\t\t\tview.location.href = object_url;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar opened = view.open(object_url, \"_blank\");\n\t\t\t\t\t\tif (!opened) {\n\t\t\t\t\t\t\t// Apple does not allow window.open, see https://developer.apple.com/library/safari/documentation/Tools/Conceptual/SafariExtensionGuide/WorkingwithWindowsandTabs/WorkingwithWindowsandTabs.html\n\t\t\t\t\t\t\tview.location.href = object_url;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfilesaver.readyState = filesaver.DONE;\n\t\t\t\t\tdispatch_all();\n\t\t\t\t\trevoke(object_url);\n\t\t\t\t}\n\t\t\t;\n\t\t\tfilesaver.readyState = filesaver.INIT;\n\n\t\t\tif (can_use_save_link) {\n\t\t\t\tobject_url = get_URL().createObjectURL(blob);\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\tsave_link.href = object_url;\n\t\t\t\t\tsave_link.download = name;\n\t\t\t\t\tclick(save_link);\n\t\t\t\t\tdispatch_all();\n\t\t\t\t\trevoke(object_url);\n\t\t\t\t\tfilesaver.readyState = filesaver.DONE;\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfs_error();\n\t\t}\n\t\t, FS_proto = FileSaver.prototype\n\t\t, saveAs = function(blob, name, no_auto_bom) {\n\t\t\treturn new FileSaver(blob, name || blob.name || \"download\", no_auto_bom);\n\t\t}\n\t;\n\t// IE 10+ (native saveAs)\n\tif (typeof navigator !== \"undefined\" && navigator.msSaveOrOpenBlob) {\n\t\treturn function(blob, name, no_auto_bom) {\n\t\t\tname = name || blob.name || \"download\";\n\n\t\t\tif (!no_auto_bom) {\n\t\t\t\tblob = auto_bom(blob);\n\t\t\t}\n\t\t\treturn navigator.msSaveOrOpenBlob(blob, name);\n\t\t};\n\t}\n\n\tFS_proto.abort = function(){};\n\tFS_proto.readyState = FS_proto.INIT = 0;\n\tFS_proto.WRITING = 1;\n\tFS_proto.DONE = 2;\n\n\tFS_proto.error =\n\tFS_proto.onwritestart =\n\tFS_proto.onprogress =\n\tFS_proto.onwrite =\n\tFS_proto.onabort =\n\tFS_proto.onerror =\n\tFS_proto.onwriteend =\n\t\tnull;\n\n\treturn saveAs;\n}(\n\t   typeof self !== \"undefined\" && self\n\t|| typeof window !== \"undefined\" && window\n\t|| this.content\n));\n// `self` is undefined in Firefox for Android content script context\n// while `this` is nsIContentFrameMessageManager\n// with an attribute `content` that corresponds to the window\n\nif (typeof module !== \"undefined\" && module.exports) {\n  module.exports.saveAs = saveAs;\n} else if ((typeof define !== \"undefined\" && define !== null) && (define.amd !== null)) {\n  define(\"FileSaver.js\", function() {\n    return saveAs;\n  });\n}\n","'use strict';\n\nexports.__esModule = true;\nvar canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nvar addEventListener = exports.addEventListener = function addEventListener(node, event, listener) {\n  return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener);\n};\n\nvar removeEventListener = exports.removeEventListener = function removeEventListener(node, event, listener) {\n  return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener);\n};\n\nvar getConfirmation = exports.getConfirmation = function getConfirmation(message, callback) {\n  return callback(window.confirm(message));\n}; // eslint-disable-line no-alert\n\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\nvar supportsHistory = exports.supportsHistory = function supportsHistory() {\n  var ua = window.navigator.userAgent;\n\n  if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n\n  return window.history && 'pushState' in window.history;\n};\n\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\nvar supportsPopStateOnHashChange = exports.supportsPopStateOnHashChange = function supportsPopStateOnHashChange() {\n  return window.navigator.userAgent.indexOf('Trident') === -1;\n};\n\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\nvar supportsGoWithoutReloadUsingHash = exports.supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() {\n  return window.navigator.userAgent.indexOf('Firefox') === -1;\n};\n\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\nvar isExtraneousPopstateEvent = exports.isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) {\n  return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n};","'use strict';\n\nexports.__esModule = true;\nexports.locationsAreEqual = exports.createLocation = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _resolvePathname = require('resolve-pathname');\n\nvar _resolvePathname2 = _interopRequireDefault(_resolvePathname);\n\nvar _valueEqual = require('value-equal');\n\nvar _valueEqual2 = _interopRequireDefault(_valueEqual);\n\nvar _PathUtils = require('./PathUtils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar createLocation = exports.createLocation = function createLocation(path, state, key, currentLocation) {\n  var location = void 0;\n  if (typeof path === 'string') {\n    // Two-arg form: push(path, state)\n    location = (0, _PathUtils.parsePath)(path);\n    location.state = state;\n  } else {\n    // One-arg form: push(location)\n    location = _extends({}, path);\n\n    if (location.pathname === undefined) location.pathname = '';\n\n    if (location.search) {\n      if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n    } else {\n      location.search = '';\n    }\n\n    if (location.hash) {\n      if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n    } else {\n      location.hash = '';\n    }\n\n    if (state !== undefined && location.state === undefined) location.state = state;\n  }\n\n  try {\n    location.pathname = decodeURI(location.pathname);\n  } catch (e) {\n    if (e instanceof URIError) {\n      throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n    } else {\n      throw e;\n    }\n  }\n\n  if (key) location.key = key;\n\n  if (currentLocation) {\n    // Resolve incomplete/relative pathname relative to current location.\n    if (!location.pathname) {\n      location.pathname = currentLocation.pathname;\n    } else if (location.pathname.charAt(0) !== '/') {\n      location.pathname = (0, _resolvePathname2.default)(location.pathname, currentLocation.pathname);\n    }\n  } else {\n    // When there is no prior location and pathname is empty, set it to /\n    if (!location.pathname) {\n      location.pathname = '/';\n    }\n  }\n\n  return location;\n};\n\nvar locationsAreEqual = exports.locationsAreEqual = function locationsAreEqual(a, b) {\n  return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && (0, _valueEqual2.default)(a.state, b.state);\n};","'use strict';\n\nexports.__esModule = true;\nvar addLeadingSlash = exports.addLeadingSlash = function addLeadingSlash(path) {\n  return path.charAt(0) === '/' ? path : '/' + path;\n};\n\nvar stripLeadingSlash = exports.stripLeadingSlash = function stripLeadingSlash(path) {\n  return path.charAt(0) === '/' ? path.substr(1) : path;\n};\n\nvar hasBasename = exports.hasBasename = function hasBasename(path, prefix) {\n  return new RegExp('^' + prefix + '(\\\\/|\\\\?|#|$)', 'i').test(path);\n};\n\nvar stripBasename = exports.stripBasename = function stripBasename(path, prefix) {\n  return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n};\n\nvar stripTrailingSlash = exports.stripTrailingSlash = function stripTrailingSlash(path) {\n  return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n};\n\nvar parsePath = exports.parsePath = function parsePath(path) {\n  var pathname = path || '/';\n  var search = '';\n  var hash = '';\n\n  var hashIndex = pathname.indexOf('#');\n  if (hashIndex !== -1) {\n    hash = pathname.substr(hashIndex);\n    pathname = pathname.substr(0, hashIndex);\n  }\n\n  var searchIndex = pathname.indexOf('?');\n  if (searchIndex !== -1) {\n    search = pathname.substr(searchIndex);\n    pathname = pathname.substr(0, searchIndex);\n  }\n\n  return {\n    pathname: pathname,\n    search: search === '?' ? '' : search,\n    hash: hash === '#' ? '' : hash\n  };\n};\n\nvar createPath = exports.createPath = function createPath(location) {\n  var pathname = location.pathname,\n      search = location.search,\n      hash = location.hash;\n\n\n  var path = pathname || '/';\n\n  if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search;\n\n  if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash;\n\n  return path;\n};","'use strict';\n\nexports.__esModule = true;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _LocationUtils = require('./LocationUtils');\n\nvar _PathUtils = require('./PathUtils');\n\nvar _createTransitionManager = require('./createTransitionManager');\n\nvar _createTransitionManager2 = _interopRequireDefault(_createTransitionManager);\n\nvar _DOMUtils = require('./DOMUtils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nvar getHistoryState = function getHistoryState() {\n  try {\n    return window.history.state || {};\n  } catch (e) {\n    // IE 11 sometimes throws when accessing window.history.state\n    // See https://github.com/ReactTraining/history/pull/289\n    return {};\n  }\n};\n\n/**\n * Creates a history object that uses the HTML5 history API including\n * pushState, replaceState, and the popstate event.\n */\nvar createBrowserHistory = function createBrowserHistory() {\n  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n  (0, _invariant2.default)(_DOMUtils.canUseDOM, 'Browser history needs a DOM');\n\n  var globalHistory = window.history;\n  var canUseHistory = (0, _DOMUtils.supportsHistory)();\n  var needsHashChangeListener = !(0, _DOMUtils.supportsPopStateOnHashChange)();\n\n  var _props$forceRefresh = props.forceRefresh,\n      forceRefresh = _props$forceRefresh === undefined ? false : _props$forceRefresh,\n      _props$getUserConfirm = props.getUserConfirmation,\n      getUserConfirmation = _props$getUserConfirm === undefined ? _DOMUtils.getConfirmation : _props$getUserConfirm,\n      _props$keyLength = props.keyLength,\n      keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;\n\n  var basename = props.basename ? (0, _PathUtils.stripTrailingSlash)((0, _PathUtils.addLeadingSlash)(props.basename)) : '';\n\n  var getDOMLocation = function getDOMLocation(historyState) {\n    var _ref = historyState || {},\n        key = _ref.key,\n        state = _ref.state;\n\n    var _window$location = window.location,\n        pathname = _window$location.pathname,\n        search = _window$location.search,\n        hash = _window$location.hash;\n\n\n    var path = pathname + search + hash;\n\n    (0, _warning2.default)(!basename || (0, _PathUtils.hasBasename)(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n    if (basename) path = (0, _PathUtils.stripBasename)(path, basename);\n\n    return (0, _LocationUtils.createLocation)(path, state, key);\n  };\n\n  var createKey = function createKey() {\n    return Math.random().toString(36).substr(2, keyLength);\n  };\n\n  var transitionManager = (0, _createTransitionManager2.default)();\n\n  var setState = function setState(nextState) {\n    _extends(history, nextState);\n\n    history.length = globalHistory.length;\n\n    transitionManager.notifyListeners(history.location, history.action);\n  };\n\n  var handlePopState = function handlePopState(event) {\n    // Ignore extraneous popstate events in WebKit.\n    if ((0, _DOMUtils.isExtraneousPopstateEvent)(event)) return;\n\n    handlePop(getDOMLocation(event.state));\n  };\n\n  var handleHashChange = function handleHashChange() {\n    handlePop(getDOMLocation(getHistoryState()));\n  };\n\n  var forceNextPop = false;\n\n  var handlePop = function handlePop(location) {\n    if (forceNextPop) {\n      forceNextPop = false;\n      setState();\n    } else {\n      var action = 'POP';\n\n      transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n        if (ok) {\n          setState({ action: action, location: location });\n        } else {\n          revertPop(location);\n        }\n      });\n    }\n  };\n\n  var revertPop = function revertPop(fromLocation) {\n    var toLocation = history.location;\n\n    // TODO: We could probably make this more reliable by\n    // keeping a list of keys we've seen in sessionStorage.\n    // Instead, we just default to 0 for keys we don't know.\n\n    var toIndex = allKeys.indexOf(toLocation.key);\n\n    if (toIndex === -1) toIndex = 0;\n\n    var fromIndex = allKeys.indexOf(fromLocation.key);\n\n    if (fromIndex === -1) fromIndex = 0;\n\n    var delta = toIndex - fromIndex;\n\n    if (delta) {\n      forceNextPop = true;\n      go(delta);\n    }\n  };\n\n  var initialLocation = getDOMLocation(getHistoryState());\n  var allKeys = [initialLocation.key];\n\n  // Public interface\n\n  var createHref = function createHref(location) {\n    return basename + (0, _PathUtils.createPath)(location);\n  };\n\n  var push = function push(path, state) {\n    (0, _warning2.default)(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n    var action = 'PUSH';\n    var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var href = createHref(location);\n      var key = location.key,\n          state = location.state;\n\n\n      if (canUseHistory) {\n        globalHistory.pushState({ key: key, state: state }, null, href);\n\n        if (forceRefresh) {\n          window.location.href = href;\n        } else {\n          var prevIndex = allKeys.indexOf(history.location.key);\n          var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n          nextKeys.push(location.key);\n          allKeys = nextKeys;\n\n          setState({ action: action, location: location });\n        }\n      } else {\n        (0, _warning2.default)(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history');\n\n        window.location.href = href;\n      }\n    });\n  };\n\n  var replace = function replace(path, state) {\n    (0, _warning2.default)(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n    var action = 'REPLACE';\n    var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var href = createHref(location);\n      var key = location.key,\n          state = location.state;\n\n\n      if (canUseHistory) {\n        globalHistory.replaceState({ key: key, state: state }, null, href);\n\n        if (forceRefresh) {\n          window.location.replace(href);\n        } else {\n          var prevIndex = allKeys.indexOf(history.location.key);\n\n          if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n\n          setState({ action: action, location: location });\n        }\n      } else {\n        (0, _warning2.default)(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history');\n\n        window.location.replace(href);\n      }\n    });\n  };\n\n  var go = function go(n) {\n    globalHistory.go(n);\n  };\n\n  var goBack = function goBack() {\n    return go(-1);\n  };\n\n  var goForward = function goForward() {\n    return go(1);\n  };\n\n  var listenerCount = 0;\n\n  var checkDOMListeners = function checkDOMListeners(delta) {\n    listenerCount += delta;\n\n    if (listenerCount === 1) {\n      (0, _DOMUtils.addEventListener)(window, PopStateEvent, handlePopState);\n\n      if (needsHashChangeListener) (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleHashChange);\n    } else if (listenerCount === 0) {\n      (0, _DOMUtils.removeEventListener)(window, PopStateEvent, handlePopState);\n\n      if (needsHashChangeListener) (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleHashChange);\n    }\n  };\n\n  var isBlocked = false;\n\n  var block = function block() {\n    var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n    var unblock = transitionManager.setPrompt(prompt);\n\n    if (!isBlocked) {\n      checkDOMListeners(1);\n      isBlocked = true;\n    }\n\n    return function () {\n      if (isBlocked) {\n        isBlocked = false;\n        checkDOMListeners(-1);\n      }\n\n      return unblock();\n    };\n  };\n\n  var listen = function listen(listener) {\n    var unlisten = transitionManager.appendListener(listener);\n    checkDOMListeners(1);\n\n    return function () {\n      checkDOMListeners(-1);\n      unlisten();\n    };\n  };\n\n  var history = {\n    length: globalHistory.length,\n    action: 'POP',\n    location: initialLocation,\n    createHref: createHref,\n    push: push,\n    replace: replace,\n    go: go,\n    goBack: goBack,\n    goForward: goForward,\n    block: block,\n    listen: listen\n  };\n\n  return history;\n};\n\nexports.default = createBrowserHistory;","'use strict';\n\nexports.__esModule = true;\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar createTransitionManager = function createTransitionManager() {\n  var prompt = null;\n\n  var setPrompt = function setPrompt(nextPrompt) {\n    (0, _warning2.default)(prompt == null, 'A history supports only one prompt at a time');\n\n    prompt = nextPrompt;\n\n    return function () {\n      if (prompt === nextPrompt) prompt = null;\n    };\n  };\n\n  var confirmTransitionTo = function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n    // TODO: If another transition starts while we're still confirming\n    // the previous one, we may end up in a weird state. Figure out the\n    // best way to handle this.\n    if (prompt != null) {\n      var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n\n      if (typeof result === 'string') {\n        if (typeof getUserConfirmation === 'function') {\n          getUserConfirmation(result, callback);\n        } else {\n          (0, _warning2.default)(false, 'A history needs a getUserConfirmation function in order to use a prompt message');\n\n          callback(true);\n        }\n      } else {\n        // Return false from a transition hook to cancel the transition.\n        callback(result !== false);\n      }\n    } else {\n      callback(true);\n    }\n  };\n\n  var listeners = [];\n\n  var appendListener = function appendListener(fn) {\n    var isActive = true;\n\n    var listener = function listener() {\n      if (isActive) fn.apply(undefined, arguments);\n    };\n\n    listeners.push(listener);\n\n    return function () {\n      isActive = false;\n      listeners = listeners.filter(function (item) {\n        return item !== listener;\n      });\n    };\n  };\n\n  var notifyListeners = function notifyListeners() {\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    listeners.forEach(function (listener) {\n      return listener.apply(undefined, args);\n    });\n  };\n\n  return {\n    setPrompt: setPrompt,\n    confirmTransitionTo: confirmTransitionTo,\n    appendListener: appendListener,\n    notifyListeners: notifyListeners\n  };\n};\n\nexports.default = createTransitionManager;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n  if (process.env.NODE_ENV !== 'production') {\n    if (format === undefined) {\n      throw new Error('invariant requires an error message argument');\n    }\n  }\n\n  if (!condition) {\n    var error;\n    if (format === undefined) {\n      error = new Error(\n        'Minified exception occurred; use the non-minified dev environment ' +\n        'for the full error message and additional helpful warnings.'\n      );\n    } else {\n      var args = [a, b, c, d, e, f];\n      var argIndex = 0;\n      error = new Error(\n        format.replace(/%s/g, function() { return args[argIndex++]; })\n      );\n      error.name = 'Invariant Violation';\n    }\n\n    error.framesToPop = 1; // we don't care about invariant's own frame\n    throw error;\n  }\n};\n\nmodule.exports = invariant;\n","'use strict';\nvar utils = require('./utils');\nvar support = require('./support');\n// private property\nvar _keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\n\n// public method for encoding\nexports.encode = function(input) {\n    var output = [];\n    var chr1, chr2, chr3, enc1, enc2, enc3, enc4;\n    var i = 0, len = input.length, remainingBytes = len;\n\n    var isArray = utils.getTypeOf(input) !== \"string\";\n    while (i < input.length) {\n        remainingBytes = len - i;\n\n        if (!isArray) {\n            chr1 = input.charCodeAt(i++);\n            chr2 = i < len ? input.charCodeAt(i++) : 0;\n            chr3 = i < len ? input.charCodeAt(i++) : 0;\n        } else {\n            chr1 = input[i++];\n            chr2 = i < len ? input[i++] : 0;\n            chr3 = i < len ? input[i++] : 0;\n        }\n\n        enc1 = chr1 >> 2;\n        enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n        enc3 = remainingBytes > 1 ? (((chr2 & 15) << 2) | (chr3 >> 6)) : 64;\n        enc4 = remainingBytes > 2 ? (chr3 & 63) : 64;\n\n        output.push(_keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4));\n\n    }\n\n    return output.join(\"\");\n};\n\n// public method for decoding\nexports.decode = function(input) {\n    var chr1, chr2, chr3;\n    var enc1, enc2, enc3, enc4;\n    var i = 0, resultIndex = 0;\n\n    var dataUrlPrefix = \"data:\";\n\n    if (input.substr(0, dataUrlPrefix.length) === dataUrlPrefix) {\n        // This is a common error: people give a data url\n        // (data:image/png;base64,iVBOR...) with a {base64: true} and\n        // wonders why things don't work.\n        // We can detect that the string input looks like a data url but we\n        // *can't* be sure it is one: removing everything up to the comma would\n        // be too dangerous.\n        throw new Error(\"Invalid base64 input, it looks like a data url.\");\n    }\n\n    input = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, \"\");\n\n    var totalLength = input.length * 3 / 4;\n    if(input.charAt(input.length - 1) === _keyStr.charAt(64)) {\n        totalLength--;\n    }\n    if(input.charAt(input.length - 2) === _keyStr.charAt(64)) {\n        totalLength--;\n    }\n    if (totalLength % 1 !== 0) {\n        // totalLength is not an integer, the length does not match a valid\n        // base64 content. That can happen if:\n        // - the input is not a base64 content\n        // - the input is *almost* a base64 content, with a extra chars at the\n        //   beginning or at the end\n        // - the input uses a base64 variant (base64url for example)\n        throw new Error(\"Invalid base64 input, bad content length.\");\n    }\n    var output;\n    if (support.uint8array) {\n        output = new Uint8Array(totalLength|0);\n    } else {\n        output = new Array(totalLength|0);\n    }\n\n    while (i < input.length) {\n\n        enc1 = _keyStr.indexOf(input.charAt(i++));\n        enc2 = _keyStr.indexOf(input.charAt(i++));\n        enc3 = _keyStr.indexOf(input.charAt(i++));\n        enc4 = _keyStr.indexOf(input.charAt(i++));\n\n        chr1 = (enc1 << 2) | (enc2 >> 4);\n        chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);\n        chr3 = ((enc3 & 3) << 6) | enc4;\n\n        output[resultIndex++] = chr1;\n\n        if (enc3 !== 64) {\n            output[resultIndex++] = chr2;\n        }\n        if (enc4 !== 64) {\n            output[resultIndex++] = chr3;\n        }\n\n    }\n\n    return output;\n};\n","'use strict';\n\nvar external = require(\"./external\");\nvar DataWorker = require('./stream/DataWorker');\nvar DataLengthProbe = require('./stream/DataLengthProbe');\nvar Crc32Probe = require('./stream/Crc32Probe');\nvar DataLengthProbe = require('./stream/DataLengthProbe');\n\n/**\n * Represent a compressed object, with everything needed to decompress it.\n * @constructor\n * @param {number} compressedSize the size of the data compressed.\n * @param {number} uncompressedSize the size of the data after decompression.\n * @param {number} crc32 the crc32 of the decompressed file.\n * @param {object} compression the type of compression, see lib/compressions.js.\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the compressed data.\n */\nfunction CompressedObject(compressedSize, uncompressedSize, crc32, compression, data) {\n    this.compressedSize = compressedSize;\n    this.uncompressedSize = uncompressedSize;\n    this.crc32 = crc32;\n    this.compression = compression;\n    this.compressedContent = data;\n}\n\nCompressedObject.prototype = {\n    /**\n     * Create a worker to get the uncompressed content.\n     * @return {GenericWorker} the worker.\n     */\n    getContentWorker : function () {\n        var worker = new DataWorker(external.Promise.resolve(this.compressedContent))\n        .pipe(this.compression.uncompressWorker())\n        .pipe(new DataLengthProbe(\"data_length\"));\n\n        var that = this;\n        worker.on(\"end\", function () {\n            if(this.streamInfo['data_length'] !== that.uncompressedSize) {\n                throw new Error(\"Bug : uncompressed data size mismatch\");\n            }\n        });\n        return worker;\n    },\n    /**\n     * Create a worker to get the compressed content.\n     * @return {GenericWorker} the worker.\n     */\n    getCompressedWorker : function () {\n        return new DataWorker(external.Promise.resolve(this.compressedContent))\n        .withStreamInfo(\"compressedSize\", this.compressedSize)\n        .withStreamInfo(\"uncompressedSize\", this.uncompressedSize)\n        .withStreamInfo(\"crc32\", this.crc32)\n        .withStreamInfo(\"compression\", this.compression)\n        ;\n    }\n};\n\n/**\n * Chain the given worker with other workers to compress the content with the\n * given compresion.\n * @param {GenericWorker} uncompressedWorker the worker to pipe.\n * @param {Object} compression the compression object.\n * @param {Object} compressionOptions the options to use when compressing.\n * @return {GenericWorker} the new worker compressing the content.\n */\nCompressedObject.createWorkerFrom = function (uncompressedWorker, compression, compressionOptions) {\n    return uncompressedWorker\n    .pipe(new Crc32Probe())\n    .pipe(new DataLengthProbe(\"uncompressedSize\"))\n    .pipe(compression.compressWorker(compressionOptions))\n    .pipe(new DataLengthProbe(\"compressedSize\"))\n    .withStreamInfo(\"compression\", compression);\n};\n\nmodule.exports = CompressedObject;\n","'use strict';\n\nvar GenericWorker = require(\"./stream/GenericWorker\");\n\nexports.STORE = {\n    magic: \"\\x00\\x00\",\n    compressWorker : function (compressionOptions) {\n        return new GenericWorker(\"STORE compression\");\n    },\n    uncompressWorker : function () {\n        return new GenericWorker(\"STORE decompression\");\n    }\n};\nexports.DEFLATE = require('./flate');\n","'use strict';\n\nvar utils = require('./utils');\n\n/**\n * The following functions come from pako, from pako/lib/zlib/crc32.js\n * released under the MIT license, see pako https://github.com/nodeca/pako/\n */\n\n// Use ordinary array, since untyped makes no boost here\nfunction makeTable() {\n    var c, table = [];\n\n    for(var n =0; n < 256; n++){\n        c = n;\n        for(var k =0; k < 8; k++){\n            c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n        }\n        table[n] = c;\n    }\n\n    return table;\n}\n\n// Create table on load. Just 255 signed longs. Not a problem.\nvar crcTable = makeTable();\n\n\nfunction crc32(crc, buf, len, pos) {\n    var t = crcTable, end = pos + len;\n\n    crc = crc ^ (-1);\n\n    for (var i = pos; i < end; i++ ) {\n        crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n    }\n\n    return (crc ^ (-1)); // >>> 0;\n}\n\n// That's all for the pako functions.\n\n/**\n * Compute the crc32 of a string.\n * This is almost the same as the function crc32, but for strings. Using the\n * same function for the two use cases leads to horrible performances.\n * @param {Number} crc the starting value of the crc.\n * @param {String} str the string to use.\n * @param {Number} len the length of the string.\n * @param {Number} pos the starting position for the crc32 computation.\n * @return {Number} the computed crc32.\n */\nfunction crc32str(crc, str, len, pos) {\n    var t = crcTable, end = pos + len;\n\n    crc = crc ^ (-1);\n\n    for (var i = pos; i < end; i++ ) {\n        crc = (crc >>> 8) ^ t[(crc ^ str.charCodeAt(i)) & 0xFF];\n    }\n\n    return (crc ^ (-1)); // >>> 0;\n}\n\nmodule.exports = function crc32wrapper(input, crc) {\n    if (typeof input === \"undefined\" || !input.length) {\n        return 0;\n    }\n\n    var isArray = utils.getTypeOf(input) !== \"string\";\n\n    if(isArray) {\n        return crc32(crc|0, input, input.length, 0);\n    } else {\n        return crc32str(crc|0, input, input.length, 0);\n    }\n};\n","'use strict';\nexports.base64 = false;\nexports.binary = false;\nexports.dir = false;\nexports.createFolders = true;\nexports.date = null;\nexports.compression = null;\nexports.compressionOptions = null;\nexports.comment = null;\nexports.unixPermissions = null;\nexports.dosPermissions = null;\n","/* global Promise */\n'use strict';\n\n// load the global object first:\n// - it should be better integrated in the system (unhandledRejection in node)\n// - the environment may have a custom Promise implementation (see zone.js)\nvar ES6Promise = null;\nif (typeof Promise !== \"undefined\") {\n    ES6Promise = Promise;\n} else {\n    ES6Promise = require(\"lie\");\n}\n\n/**\n * Let the user use/change some implementations.\n */\nmodule.exports = {\n    Promise: ES6Promise\n};\n","'use strict';\nvar USE_TYPEDARRAY = (typeof Uint8Array !== 'undefined') && (typeof Uint16Array !== 'undefined') && (typeof Uint32Array !== 'undefined');\n\nvar pako = require(\"pako\");\nvar utils = require(\"./utils\");\nvar GenericWorker = require(\"./stream/GenericWorker\");\n\nvar ARRAY_TYPE = USE_TYPEDARRAY ? \"uint8array\" : \"array\";\n\nexports.magic = \"\\x08\\x00\";\n\n/**\n * Create a worker that uses pako to inflate/deflate.\n * @constructor\n * @param {String} action the name of the pako function to call : either \"Deflate\" or \"Inflate\".\n * @param {Object} options the options to use when (de)compressing.\n */\nfunction FlateWorker(action, options) {\n    GenericWorker.call(this, \"FlateWorker/\" + action);\n\n    this._pako = null;\n    this._pakoAction = action;\n    this._pakoOptions = options;\n    // the `meta` object from the last chunk received\n    // this allow this worker to pass around metadata\n    this.meta = {};\n}\n\nutils.inherits(FlateWorker, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nFlateWorker.prototype.processChunk = function (chunk) {\n    this.meta = chunk.meta;\n    if (this._pako === null) {\n        this._createPako();\n    }\n    this._pako.push(utils.transformTo(ARRAY_TYPE, chunk.data), false);\n};\n\n/**\n * @see GenericWorker.flush\n */\nFlateWorker.prototype.flush = function () {\n    GenericWorker.prototype.flush.call(this);\n    if (this._pako === null) {\n        this._createPako();\n    }\n    this._pako.push([], true);\n};\n/**\n * @see GenericWorker.cleanUp\n */\nFlateWorker.prototype.cleanUp = function () {\n    GenericWorker.prototype.cleanUp.call(this);\n    this._pako = null;\n};\n\n/**\n * Create the _pako object.\n * TODO: lazy-loading this object isn't the best solution but it's the\n * quickest. The best solution is to lazy-load the worker list. See also the\n * issue #446.\n */\nFlateWorker.prototype._createPako = function () {\n    this._pako = new pako[this._pakoAction]({\n        raw: true,\n        level: this._pakoOptions.level || -1 // default compression\n    });\n    var self = this;\n    this._pako.onData = function(data) {\n        self.push({\n            data : data,\n            meta : self.meta\n        });\n    };\n};\n\nexports.compressWorker = function (compressionOptions) {\n    return new FlateWorker(\"Deflate\", compressionOptions);\n};\nexports.uncompressWorker = function () {\n    return new FlateWorker(\"Inflate\", {});\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar GenericWorker = require('../stream/GenericWorker');\nvar utf8 = require('../utf8');\nvar crc32 = require('../crc32');\nvar signature = require('../signature');\n\n/**\n * Transform an integer into a string in hexadecimal.\n * @private\n * @param {number} dec the number to convert.\n * @param {number} bytes the number of bytes to generate.\n * @returns {string} the result.\n */\nvar decToHex = function(dec, bytes) {\n    var hex = \"\", i;\n    for (i = 0; i < bytes; i++) {\n        hex += String.fromCharCode(dec & 0xff);\n        dec = dec >>> 8;\n    }\n    return hex;\n};\n\n/**\n * Generate the UNIX part of the external file attributes.\n * @param {Object} unixPermissions the unix permissions or null.\n * @param {Boolean} isDir true if the entry is a directory, false otherwise.\n * @return {Number} a 32 bit integer.\n *\n * adapted from http://unix.stackexchange.com/questions/14705/the-zip-formats-external-file-attribute :\n *\n * TTTTsstrwxrwxrwx0000000000ADVSHR\n * ^^^^____________________________ file type, see zipinfo.c (UNX_*)\n *     ^^^_________________________ setuid, setgid, sticky\n *        ^^^^^^^^^________________ permissions\n *                 ^^^^^^^^^^______ not used ?\n *                           ^^^^^^ DOS attribute bits : Archive, Directory, Volume label, System file, Hidden, Read only\n */\nvar generateUnixExternalFileAttr = function (unixPermissions, isDir) {\n\n    var result = unixPermissions;\n    if (!unixPermissions) {\n        // I can't use octal values in strict mode, hence the hexa.\n        //  040775 => 0x41fd\n        // 0100664 => 0x81b4\n        result = isDir ? 0x41fd : 0x81b4;\n    }\n    return (result & 0xFFFF) << 16;\n};\n\n/**\n * Generate the DOS part of the external file attributes.\n * @param {Object} dosPermissions the dos permissions or null.\n * @param {Boolean} isDir true if the entry is a directory, false otherwise.\n * @return {Number} a 32 bit integer.\n *\n * Bit 0     Read-Only\n * Bit 1     Hidden\n * Bit 2     System\n * Bit 3     Volume Label\n * Bit 4     Directory\n * Bit 5     Archive\n */\nvar generateDosExternalFileAttr = function (dosPermissions, isDir) {\n\n    // the dir flag is already set for compatibility\n    return (dosPermissions || 0)  & 0x3F;\n};\n\n/**\n * Generate the various parts used in the construction of the final zip file.\n * @param {Object} streamInfo the hash with informations about the compressed file.\n * @param {Boolean} streamedContent is the content streamed ?\n * @param {Boolean} streamingEnded is the stream finished ?\n * @param {number} offset the current offset from the start of the zip file.\n * @param {String} platform let's pretend we are this platform (change platform dependents fields)\n * @param {Function} encodeFileName the function to encode the file name / comment.\n * @return {Object} the zip parts.\n */\nvar generateZipParts = function(streamInfo, streamedContent, streamingEnded, offset, platform, encodeFileName) {\n    var file = streamInfo['file'],\n    compression = streamInfo['compression'],\n    useCustomEncoding = encodeFileName !== utf8.utf8encode,\n    encodedFileName = utils.transformTo(\"string\", encodeFileName(file.name)),\n    utfEncodedFileName = utils.transformTo(\"string\", utf8.utf8encode(file.name)),\n    comment = file.comment,\n    encodedComment = utils.transformTo(\"string\", encodeFileName(comment)),\n    utfEncodedComment = utils.transformTo(\"string\", utf8.utf8encode(comment)),\n    useUTF8ForFileName = utfEncodedFileName.length !== file.name.length,\n    useUTF8ForComment = utfEncodedComment.length !== comment.length,\n    dosTime,\n    dosDate,\n    extraFields = \"\",\n    unicodePathExtraField = \"\",\n    unicodeCommentExtraField = \"\",\n    dir = file.dir,\n    date = file.date;\n\n\n    var dataInfo = {\n        crc32 : 0,\n        compressedSize : 0,\n        uncompressedSize : 0\n    };\n\n    // if the content is streamed, the sizes/crc32 are only available AFTER\n    // the end of the stream.\n    if (!streamedContent || streamingEnded) {\n        dataInfo.crc32 = streamInfo['crc32'];\n        dataInfo.compressedSize = streamInfo['compressedSize'];\n        dataInfo.uncompressedSize = streamInfo['uncompressedSize'];\n    }\n\n    var bitflag = 0;\n    if (streamedContent) {\n        // Bit 3: the sizes/crc32 are set to zero in the local header.\n        // The correct values are put in the data descriptor immediately\n        // following the compressed data.\n        bitflag |= 0x0008;\n    }\n    if (!useCustomEncoding && (useUTF8ForFileName || useUTF8ForComment)) {\n        // Bit 11: Language encoding flag (EFS).\n        bitflag |= 0x0800;\n    }\n\n\n    var extFileAttr = 0;\n    var versionMadeBy = 0;\n    if (dir) {\n        // dos or unix, we set the dos dir flag\n        extFileAttr |= 0x00010;\n    }\n    if(platform === \"UNIX\") {\n        versionMadeBy = 0x031E; // UNIX, version 3.0\n        extFileAttr |= generateUnixExternalFileAttr(file.unixPermissions, dir);\n    } else { // DOS or other, fallback to DOS\n        versionMadeBy = 0x0014; // DOS, version 2.0\n        extFileAttr |= generateDosExternalFileAttr(file.dosPermissions, dir);\n    }\n\n    // date\n    // @see http://www.delorie.com/djgpp/doc/rbinter/it/52/13.html\n    // @see http://www.delorie.com/djgpp/doc/rbinter/it/65/16.html\n    // @see http://www.delorie.com/djgpp/doc/rbinter/it/66/16.html\n\n    dosTime = date.getUTCHours();\n    dosTime = dosTime << 6;\n    dosTime = dosTime | date.getUTCMinutes();\n    dosTime = dosTime << 5;\n    dosTime = dosTime | date.getUTCSeconds() / 2;\n\n    dosDate = date.getUTCFullYear() - 1980;\n    dosDate = dosDate << 4;\n    dosDate = dosDate | (date.getUTCMonth() + 1);\n    dosDate = dosDate << 5;\n    dosDate = dosDate | date.getUTCDate();\n\n    if (useUTF8ForFileName) {\n        // set the unicode path extra field. unzip needs at least one extra\n        // field to correctly handle unicode path, so using the path is as good\n        // as any other information. This could improve the situation with\n        // other archive managers too.\n        // This field is usually used without the utf8 flag, with a non\n        // unicode path in the header (winrar, winzip). This helps (a bit)\n        // with the messy Windows' default compressed folders feature but\n        // breaks on p7zip which doesn't seek the unicode path extra field.\n        // So for now, UTF-8 everywhere !\n        unicodePathExtraField =\n            // Version\n            decToHex(1, 1) +\n            // NameCRC32\n            decToHex(crc32(encodedFileName), 4) +\n            // UnicodeName\n            utfEncodedFileName;\n\n        extraFields +=\n            // Info-ZIP Unicode Path Extra Field\n            \"\\x75\\x70\" +\n            // size\n            decToHex(unicodePathExtraField.length, 2) +\n            // content\n            unicodePathExtraField;\n    }\n\n    if(useUTF8ForComment) {\n\n        unicodeCommentExtraField =\n            // Version\n            decToHex(1, 1) +\n            // CommentCRC32\n            decToHex(crc32(encodedComment), 4) +\n            // UnicodeName\n            utfEncodedComment;\n\n        extraFields +=\n            // Info-ZIP Unicode Path Extra Field\n            \"\\x75\\x63\" +\n            // size\n            decToHex(unicodeCommentExtraField.length, 2) +\n            // content\n            unicodeCommentExtraField;\n    }\n\n    var header = \"\";\n\n    // version needed to extract\n    header += \"\\x0A\\x00\";\n    // general purpose bit flag\n    header += decToHex(bitflag, 2);\n    // compression method\n    header += compression.magic;\n    // last mod file time\n    header += decToHex(dosTime, 2);\n    // last mod file date\n    header += decToHex(dosDate, 2);\n    // crc-32\n    header += decToHex(dataInfo.crc32, 4);\n    // compressed size\n    header += decToHex(dataInfo.compressedSize, 4);\n    // uncompressed size\n    header += decToHex(dataInfo.uncompressedSize, 4);\n    // file name length\n    header += decToHex(encodedFileName.length, 2);\n    // extra field length\n    header += decToHex(extraFields.length, 2);\n\n\n    var fileRecord = signature.LOCAL_FILE_HEADER + header + encodedFileName + extraFields;\n\n    var dirRecord = signature.CENTRAL_FILE_HEADER +\n        // version made by (00: DOS)\n        decToHex(versionMadeBy, 2) +\n        // file header (common to file and central directory)\n        header +\n        // file comment length\n        decToHex(encodedComment.length, 2) +\n        // disk number start\n        \"\\x00\\x00\" +\n        // internal file attributes TODO\n        \"\\x00\\x00\" +\n        // external file attributes\n        decToHex(extFileAttr, 4) +\n        // relative offset of local header\n        decToHex(offset, 4) +\n        // file name\n        encodedFileName +\n        // extra field\n        extraFields +\n        // file comment\n        encodedComment;\n\n    return {\n        fileRecord: fileRecord,\n        dirRecord: dirRecord\n    };\n};\n\n/**\n * Generate the EOCD record.\n * @param {Number} entriesCount the number of entries in the zip file.\n * @param {Number} centralDirLength the length (in bytes) of the central dir.\n * @param {Number} localDirLength the length (in bytes) of the local dir.\n * @param {String} comment the zip file comment as a binary string.\n * @param {Function} encodeFileName the function to encode the comment.\n * @return {String} the EOCD record.\n */\nvar generateCentralDirectoryEnd = function (entriesCount, centralDirLength, localDirLength, comment, encodeFileName) {\n    var dirEnd = \"\";\n    var encodedComment = utils.transformTo(\"string\", encodeFileName(comment));\n\n    // end of central dir signature\n    dirEnd = signature.CENTRAL_DIRECTORY_END +\n        // number of this disk\n        \"\\x00\\x00\" +\n        // number of the disk with the start of the central directory\n        \"\\x00\\x00\" +\n        // total number of entries in the central directory on this disk\n        decToHex(entriesCount, 2) +\n        // total number of entries in the central directory\n        decToHex(entriesCount, 2) +\n        // size of the central directory   4 bytes\n        decToHex(centralDirLength, 4) +\n        // offset of start of central directory with respect to the starting disk number\n        decToHex(localDirLength, 4) +\n        // .ZIP file comment length\n        decToHex(encodedComment.length, 2) +\n        // .ZIP file comment\n        encodedComment;\n\n    return dirEnd;\n};\n\n/**\n * Generate data descriptors for a file entry.\n * @param {Object} streamInfo the hash generated by a worker, containing informations\n * on the file entry.\n * @return {String} the data descriptors.\n */\nvar generateDataDescriptors = function (streamInfo) {\n    var descriptor = \"\";\n    descriptor = signature.DATA_DESCRIPTOR +\n        // crc-32                          4 bytes\n        decToHex(streamInfo['crc32'], 4) +\n        // compressed size                 4 bytes\n        decToHex(streamInfo['compressedSize'], 4) +\n        // uncompressed size               4 bytes\n        decToHex(streamInfo['uncompressedSize'], 4);\n\n    return descriptor;\n};\n\n\n/**\n * A worker to concatenate other workers to create a zip file.\n * @param {Boolean} streamFiles `true` to stream the content of the files,\n * `false` to accumulate it.\n * @param {String} comment the comment to use.\n * @param {String} platform the platform to use, \"UNIX\" or \"DOS\".\n * @param {Function} encodeFileName the function to encode file names and comments.\n */\nfunction ZipFileWorker(streamFiles, comment, platform, encodeFileName) {\n    GenericWorker.call(this, \"ZipFileWorker\");\n    // The number of bytes written so far. This doesn't count accumulated chunks.\n    this.bytesWritten = 0;\n    // The comment of the zip file\n    this.zipComment = comment;\n    // The platform \"generating\" the zip file.\n    this.zipPlatform = platform;\n    // the function to encode file names and comments.\n    this.encodeFileName = encodeFileName;\n    // Should we stream the content of the files ?\n    this.streamFiles = streamFiles;\n    // If `streamFiles` is false, we will need to accumulate the content of the\n    // files to calculate sizes / crc32 (and write them *before* the content).\n    // This boolean indicates if we are accumulating chunks (it will change a lot\n    // during the lifetime of this worker).\n    this.accumulate = false;\n    // The buffer receiving chunks when accumulating content.\n    this.contentBuffer = [];\n    // The list of generated directory records.\n    this.dirRecords = [];\n    // The offset (in bytes) from the beginning of the zip file for the current source.\n    this.currentSourceOffset = 0;\n    // The total number of entries in this zip file.\n    this.entriesCount = 0;\n    // the name of the file currently being added, null when handling the end of the zip file.\n    // Used for the emited metadata.\n    this.currentFile = null;\n\n\n\n    this._sources = [];\n}\nutils.inherits(ZipFileWorker, GenericWorker);\n\n/**\n * @see GenericWorker.push\n */\nZipFileWorker.prototype.push = function (chunk) {\n\n    var currentFilePercent = chunk.meta.percent || 0;\n    var entriesCount = this.entriesCount;\n    var remainingFiles = this._sources.length;\n\n    if(this.accumulate) {\n        this.contentBuffer.push(chunk);\n    } else {\n        this.bytesWritten += chunk.data.length;\n\n        GenericWorker.prototype.push.call(this, {\n            data : chunk.data,\n            meta : {\n                currentFile : this.currentFile,\n                percent : entriesCount ? (currentFilePercent + 100 * (entriesCount - remainingFiles - 1)) / entriesCount : 100\n            }\n        });\n    }\n};\n\n/**\n * The worker started a new source (an other worker).\n * @param {Object} streamInfo the streamInfo object from the new source.\n */\nZipFileWorker.prototype.openedSource = function (streamInfo) {\n    this.currentSourceOffset = this.bytesWritten;\n    this.currentFile = streamInfo['file'].name;\n\n    var streamedContent = this.streamFiles && !streamInfo['file'].dir;\n\n    // don't stream folders (because they don't have any content)\n    if(streamedContent) {\n        var record = generateZipParts(streamInfo, streamedContent, false, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);\n        this.push({\n            data : record.fileRecord,\n            meta : {percent:0}\n        });\n    } else {\n        // we need to wait for the whole file before pushing anything\n        this.accumulate = true;\n    }\n};\n\n/**\n * The worker finished a source (an other worker).\n * @param {Object} streamInfo the streamInfo object from the finished source.\n */\nZipFileWorker.prototype.closedSource = function (streamInfo) {\n    this.accumulate = false;\n    var streamedContent = this.streamFiles && !streamInfo['file'].dir;\n    var record = generateZipParts(streamInfo, streamedContent, true, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);\n\n    this.dirRecords.push(record.dirRecord);\n    if(streamedContent) {\n        // after the streamed file, we put data descriptors\n        this.push({\n            data : generateDataDescriptors(streamInfo),\n            meta : {percent:100}\n        });\n    } else {\n        // the content wasn't streamed, we need to push everything now\n        // first the file record, then the content\n        this.push({\n            data : record.fileRecord,\n            meta : {percent:0}\n        });\n        while(this.contentBuffer.length) {\n            this.push(this.contentBuffer.shift());\n        }\n    }\n    this.currentFile = null;\n};\n\n/**\n * @see GenericWorker.flush\n */\nZipFileWorker.prototype.flush = function () {\n\n    var localDirLength = this.bytesWritten;\n    for(var i = 0; i < this.dirRecords.length; i++) {\n        this.push({\n            data : this.dirRecords[i],\n            meta : {percent:100}\n        });\n    }\n    var centralDirLength = this.bytesWritten - localDirLength;\n\n    var dirEnd = generateCentralDirectoryEnd(this.dirRecords.length, centralDirLength, localDirLength, this.zipComment, this.encodeFileName);\n\n    this.push({\n        data : dirEnd,\n        meta : {percent:100}\n    });\n};\n\n/**\n * Prepare the next source to be read.\n */\nZipFileWorker.prototype.prepareNextSource = function () {\n    this.previous = this._sources.shift();\n    this.openedSource(this.previous.streamInfo);\n    if (this.isPaused) {\n        this.previous.pause();\n    } else {\n        this.previous.resume();\n    }\n};\n\n/**\n * @see GenericWorker.registerPrevious\n */\nZipFileWorker.prototype.registerPrevious = function (previous) {\n    this._sources.push(previous);\n    var self = this;\n\n    previous.on('data', function (chunk) {\n        self.processChunk(chunk);\n    });\n    previous.on('end', function () {\n        self.closedSource(self.previous.streamInfo);\n        if(self._sources.length) {\n            self.prepareNextSource();\n        } else {\n            self.end();\n        }\n    });\n    previous.on('error', function (e) {\n        self.error(e);\n    });\n    return this;\n};\n\n/**\n * @see GenericWorker.resume\n */\nZipFileWorker.prototype.resume = function () {\n    if(!GenericWorker.prototype.resume.call(this)) {\n        return false;\n    }\n\n    if (!this.previous && this._sources.length) {\n        this.prepareNextSource();\n        return true;\n    }\n    if (!this.previous && !this._sources.length && !this.generatedError) {\n        this.end();\n        return true;\n    }\n};\n\n/**\n * @see GenericWorker.error\n */\nZipFileWorker.prototype.error = function (e) {\n    var sources = this._sources;\n    if(!GenericWorker.prototype.error.call(this, e)) {\n        return false;\n    }\n    for(var i = 0; i < sources.length; i++) {\n        try {\n            sources[i].error(e);\n        } catch(e) {\n            // the `error` exploded, nothing to do\n        }\n    }\n    return true;\n};\n\n/**\n * @see GenericWorker.lock\n */\nZipFileWorker.prototype.lock = function () {\n    GenericWorker.prototype.lock.call(this);\n    var sources = this._sources;\n    for(var i = 0; i < sources.length; i++) {\n        sources[i].lock();\n    }\n};\n\nmodule.exports = ZipFileWorker;\n","'use strict';\n\nvar compressions = require('../compressions');\nvar ZipFileWorker = require('./ZipFileWorker');\n\n/**\n * Find the compression to use.\n * @param {String} fileCompression the compression defined at the file level, if any.\n * @param {String} zipCompression the compression defined at the load() level.\n * @return {Object} the compression object to use.\n */\nvar getCompression = function (fileCompression, zipCompression) {\n\n    var compressionName = fileCompression || zipCompression;\n    var compression = compressions[compressionName];\n    if (!compression) {\n        throw new Error(compressionName + \" is not a valid compression method !\");\n    }\n    return compression;\n};\n\n/**\n * Create a worker to generate a zip file.\n * @param {JSZip} zip the JSZip instance at the right root level.\n * @param {Object} options to generate the zip file.\n * @param {String} comment the comment to use.\n */\nexports.generateWorker = function (zip, options, comment) {\n\n    var zipFileWorker = new ZipFileWorker(options.streamFiles, comment, options.platform, options.encodeFileName);\n    var entriesCount = 0;\n    try {\n\n        zip.forEach(function (relativePath, file) {\n            entriesCount++;\n            var compression = getCompression(file.options.compression, options.compression);\n            var compressionOptions = file.options.compressionOptions || options.compressionOptions || {};\n            var dir = file.dir, date = file.date;\n\n            file._compressWorker(compression, compressionOptions)\n            .withStreamInfo(\"file\", {\n                name : relativePath,\n                dir : dir,\n                date : date,\n                comment : file.comment || \"\",\n                unixPermissions : file.unixPermissions,\n                dosPermissions : file.dosPermissions\n            })\n            .pipe(zipFileWorker);\n        });\n        zipFileWorker.entriesCount = entriesCount;\n    } catch (e) {\n        zipFileWorker.error(e);\n    }\n\n    return zipFileWorker;\n};\n","'use strict';\n\n/**\n * Representation a of zip file in js\n * @constructor\n */\nfunction JSZip() {\n    // if this constructor is used without `new`, it adds `new` before itself:\n    if(!(this instanceof JSZip)) {\n        return new JSZip();\n    }\n\n    if(arguments.length) {\n        throw new Error(\"The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.\");\n    }\n\n    // object containing the files :\n    // {\n    //   \"folder/\" : {...},\n    //   \"folder/data.txt\" : {...}\n    // }\n    this.files = {};\n\n    this.comment = null;\n\n    // Where we are in the hierarchy\n    this.root = \"\";\n    this.clone = function() {\n        var newObj = new JSZip();\n        for (var i in this) {\n            if (typeof this[i] !== \"function\") {\n                newObj[i] = this[i];\n            }\n        }\n        return newObj;\n    };\n}\nJSZip.prototype = require('./object');\nJSZip.prototype.loadAsync = require('./load');\nJSZip.support = require('./support');\nJSZip.defaults = require('./defaults');\n\n// TODO find a better way to handle this version,\n// a require('package.json').version doesn't work with webpack, see #327\nJSZip.version = \"3.1.5\";\n\nJSZip.loadAsync = function (content, options) {\n    return new JSZip().loadAsync(content, options);\n};\n\nJSZip.external = require(\"./external\");\nmodule.exports = JSZip;\n","'use strict';\nvar utils = require('./utils');\nvar external = require(\"./external\");\nvar utf8 = require('./utf8');\nvar utils = require('./utils');\nvar ZipEntries = require('./zipEntries');\nvar Crc32Probe = require('./stream/Crc32Probe');\nvar nodejsUtils = require(\"./nodejsUtils\");\n\n/**\n * Check the CRC32 of an entry.\n * @param {ZipEntry} zipEntry the zip entry to check.\n * @return {Promise} the result.\n */\nfunction checkEntryCRC32(zipEntry) {\n    return new external.Promise(function (resolve, reject) {\n        var worker = zipEntry.decompressed.getContentWorker().pipe(new Crc32Probe());\n        worker.on(\"error\", function (e) {\n            reject(e);\n        })\n        .on(\"end\", function () {\n            if (worker.streamInfo.crc32 !== zipEntry.decompressed.crc32) {\n                reject(new Error(\"Corrupted zip : CRC32 mismatch\"));\n            } else {\n                resolve();\n            }\n        })\n        .resume();\n    });\n}\n\nmodule.exports = function(data, options) {\n    var zip = this;\n    options = utils.extend(options || {}, {\n        base64: false,\n        checkCRC32: false,\n        optimizedBinaryString: false,\n        createFolders: false,\n        decodeFileName: utf8.utf8decode\n    });\n\n    if (nodejsUtils.isNode && nodejsUtils.isStream(data)) {\n        return external.Promise.reject(new Error(\"JSZip can't accept a stream when loading a zip file.\"));\n    }\n\n    return utils.prepareContent(\"the loaded zip file\", data, true, options.optimizedBinaryString, options.base64)\n    .then(function(data) {\n        var zipEntries = new ZipEntries(options);\n        zipEntries.load(data);\n        return zipEntries;\n    }).then(function checkCRC32(zipEntries) {\n        var promises = [external.Promise.resolve(zipEntries)];\n        var files = zipEntries.files;\n        if (options.checkCRC32) {\n            for (var i = 0; i < files.length; i++) {\n                promises.push(checkEntryCRC32(files[i]));\n            }\n        }\n        return external.Promise.all(promises);\n    }).then(function addFiles(results) {\n        var zipEntries = results.shift();\n        var files = zipEntries.files;\n        for (var i = 0; i < files.length; i++) {\n            var input = files[i];\n            zip.file(input.fileNameStr, input.decompressed, {\n                binary: true,\n                optimizedBinaryString: true,\n                date: input.date,\n                dir: input.dir,\n                comment : input.fileCommentStr.length ? input.fileCommentStr : null,\n                unixPermissions : input.unixPermissions,\n                dosPermissions : input.dosPermissions,\n                createFolders: options.createFolders\n            });\n        }\n        if (zipEntries.zipComment.length) {\n            zip.comment = zipEntries.zipComment;\n        }\n\n        return zip;\n    });\n};\n","\"use strict\";\n\nvar utils = require('../utils');\nvar GenericWorker = require('../stream/GenericWorker');\n\n/**\n * A worker that use a nodejs stream as source.\n * @constructor\n * @param {String} filename the name of the file entry for this stream.\n * @param {Readable} stream the nodejs stream.\n */\nfunction NodejsStreamInputAdapter(filename, stream) {\n    GenericWorker.call(this, \"Nodejs stream input adapter for \" + filename);\n    this._upstreamEnded = false;\n    this._bindStream(stream);\n}\n\nutils.inherits(NodejsStreamInputAdapter, GenericWorker);\n\n/**\n * Prepare the stream and bind the callbacks on it.\n * Do this ASAP on node 0.10 ! A lazy binding doesn't always work.\n * @param {Stream} stream the nodejs stream to use.\n */\nNodejsStreamInputAdapter.prototype._bindStream = function (stream) {\n    var self = this;\n    this._stream = stream;\n    stream.pause();\n    stream\n    .on(\"data\", function (chunk) {\n        self.push({\n            data: chunk,\n            meta : {\n                percent : 0\n            }\n        });\n    })\n    .on(\"error\", function (e) {\n        if(self.isPaused) {\n            this.generatedError = e;\n        } else {\n            self.error(e);\n        }\n    })\n    .on(\"end\", function () {\n        if(self.isPaused) {\n            self._upstreamEnded = true;\n        } else {\n            self.end();\n        }\n    });\n};\nNodejsStreamInputAdapter.prototype.pause = function () {\n    if(!GenericWorker.prototype.pause.call(this)) {\n        return false;\n    }\n    this._stream.pause();\n    return true;\n};\nNodejsStreamInputAdapter.prototype.resume = function () {\n    if(!GenericWorker.prototype.resume.call(this)) {\n        return false;\n    }\n\n    if(this._upstreamEnded) {\n        this.end();\n    } else {\n        this._stream.resume();\n    }\n\n    return true;\n};\n\nmodule.exports = NodejsStreamInputAdapter;\n","'use strict';\n\nvar Readable = require('readable-stream').Readable;\n\nvar utils = require('../utils');\nutils.inherits(NodejsStreamOutputAdapter, Readable);\n\n/**\n* A nodejs stream using a worker as source.\n* @see the SourceWrapper in http://nodejs.org/api/stream.html\n* @constructor\n* @param {StreamHelper} helper the helper wrapping the worker\n* @param {Object} options the nodejs stream options\n* @param {Function} updateCb the update callback.\n*/\nfunction NodejsStreamOutputAdapter(helper, options, updateCb) {\n    Readable.call(this, options);\n    this._helper = helper;\n\n    var self = this;\n    helper.on(\"data\", function (data, meta) {\n        if (!self.push(data)) {\n            self._helper.pause();\n        }\n        if(updateCb) {\n            updateCb(meta);\n        }\n    })\n    .on(\"error\", function(e) {\n        self.emit('error', e);\n    })\n    .on(\"end\", function () {\n        self.push(null);\n    });\n}\n\n\nNodejsStreamOutputAdapter.prototype._read = function() {\n    this._helper.resume();\n};\n\nmodule.exports = NodejsStreamOutputAdapter;\n","'use strict';\n\nmodule.exports = {\n    /**\n     * True if this is running in Nodejs, will be undefined in a browser.\n     * In a browser, browserify won't include this file and the whole module\n     * will be resolved an empty object.\n     */\n    isNode : typeof Buffer !== \"undefined\",\n    /**\n     * Create a new nodejs Buffer from an existing content.\n     * @param {Object} data the data to pass to the constructor.\n     * @param {String} encoding the encoding to use.\n     * @return {Buffer} a new Buffer.\n     */\n    newBufferFrom: function(data, encoding) {\n        // XXX We can't use `Buffer.from` which comes from `Uint8Array.from`\n        // in nodejs v4 (< v.4.5). It's not the expected implementation (and\n        // has a different signature).\n        // see https://github.com/nodejs/node/issues/8053\n        // A condition on nodejs' version won't solve the issue as we don't\n        // control the Buffer polyfills that may or may not be used.\n        return new Buffer(data, encoding);\n    },\n    /**\n     * Create a new nodejs Buffer with the specified size.\n     * @param {Integer} size the size of the buffer.\n     * @return {Buffer} a new Buffer.\n     */\n    allocBuffer: function (size) {\n        if (Buffer.alloc) {\n            return Buffer.alloc(size);\n        } else {\n            return new Buffer(size);\n        }\n    },\n    /**\n     * Find out if an object is a Buffer.\n     * @param {Object} b the object to test.\n     * @return {Boolean} true if the object is a Buffer, false otherwise.\n     */\n    isBuffer : function(b){\n        return Buffer.isBuffer(b);\n    },\n\n    isStream : function (obj) {\n        return obj &&\n            typeof obj.on === \"function\" &&\n            typeof obj.pause === \"function\" &&\n            typeof obj.resume === \"function\";\n    }\n};\n","'use strict';\nvar utf8 = require('./utf8');\nvar utils = require('./utils');\nvar GenericWorker = require('./stream/GenericWorker');\nvar StreamHelper = require('./stream/StreamHelper');\nvar defaults = require('./defaults');\nvar CompressedObject = require('./compressedObject');\nvar ZipObject = require('./zipObject');\nvar generate = require(\"./generate\");\nvar nodejsUtils = require(\"./nodejsUtils\");\nvar NodejsStreamInputAdapter = require(\"./nodejs/NodejsStreamInputAdapter\");\n\n\n/**\n * Add a file in the current folder.\n * @private\n * @param {string} name the name of the file\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data of the file\n * @param {Object} originalOptions the options of the file\n * @return {Object} the new file.\n */\nvar fileAdd = function(name, data, originalOptions) {\n    // be sure sub folders exist\n    var dataType = utils.getTypeOf(data),\n        parent;\n\n\n    /*\n     * Correct options.\n     */\n\n    var o = utils.extend(originalOptions || {}, defaults);\n    o.date = o.date || new Date();\n    if (o.compression !== null) {\n        o.compression = o.compression.toUpperCase();\n    }\n\n    if (typeof o.unixPermissions === \"string\") {\n        o.unixPermissions = parseInt(o.unixPermissions, 8);\n    }\n\n    // UNX_IFDIR  0040000 see zipinfo.c\n    if (o.unixPermissions && (o.unixPermissions & 0x4000)) {\n        o.dir = true;\n    }\n    // Bit 4    Directory\n    if (o.dosPermissions && (o.dosPermissions & 0x0010)) {\n        o.dir = true;\n    }\n\n    if (o.dir) {\n        name = forceTrailingSlash(name);\n    }\n    if (o.createFolders && (parent = parentFolder(name))) {\n        folderAdd.call(this, parent, true);\n    }\n\n    var isUnicodeString = dataType === \"string\" && o.binary === false && o.base64 === false;\n    if (!originalOptions || typeof originalOptions.binary === \"undefined\") {\n        o.binary = !isUnicodeString;\n    }\n\n\n    var isCompressedEmpty = (data instanceof CompressedObject) && data.uncompressedSize === 0;\n\n    if (isCompressedEmpty || o.dir || !data || data.length === 0) {\n        o.base64 = false;\n        o.binary = true;\n        data = \"\";\n        o.compression = \"STORE\";\n        dataType = \"string\";\n    }\n\n    /*\n     * Convert content to fit.\n     */\n\n    var zipObjectContent = null;\n    if (data instanceof CompressedObject || data instanceof GenericWorker) {\n        zipObjectContent = data;\n    } else if (nodejsUtils.isNode && nodejsUtils.isStream(data)) {\n        zipObjectContent = new NodejsStreamInputAdapter(name, data);\n    } else {\n        zipObjectContent = utils.prepareContent(name, data, o.binary, o.optimizedBinaryString, o.base64);\n    }\n\n    var object = new ZipObject(name, zipObjectContent, o);\n    this.files[name] = object;\n    /*\n    TODO: we can't throw an exception because we have async promises\n    (we can have a promise of a Date() for example) but returning a\n    promise is useless because file(name, data) returns the JSZip\n    object for chaining. Should we break that to allow the user\n    to catch the error ?\n\n    return external.Promise.resolve(zipObjectContent)\n    .then(function () {\n        return object;\n    });\n    */\n};\n\n/**\n * Find the parent folder of the path.\n * @private\n * @param {string} path the path to use\n * @return {string} the parent folder, or \"\"\n */\nvar parentFolder = function (path) {\n    if (path.slice(-1) === '/') {\n        path = path.substring(0, path.length - 1);\n    }\n    var lastSlash = path.lastIndexOf('/');\n    return (lastSlash > 0) ? path.substring(0, lastSlash) : \"\";\n};\n\n/**\n * Returns the path with a slash at the end.\n * @private\n * @param {String} path the path to check.\n * @return {String} the path with a trailing slash.\n */\nvar forceTrailingSlash = function(path) {\n    // Check the name ends with a /\n    if (path.slice(-1) !== \"/\") {\n        path += \"/\"; // IE doesn't like substr(-1)\n    }\n    return path;\n};\n\n/**\n * Add a (sub) folder in the current folder.\n * @private\n * @param {string} name the folder's name\n * @param {boolean=} [createFolders] If true, automatically create sub\n *  folders. Defaults to false.\n * @return {Object} the new folder.\n */\nvar folderAdd = function(name, createFolders) {\n    createFolders = (typeof createFolders !== 'undefined') ? createFolders : defaults.createFolders;\n\n    name = forceTrailingSlash(name);\n\n    // Does this folder already exist?\n    if (!this.files[name]) {\n        fileAdd.call(this, name, null, {\n            dir: true,\n            createFolders: createFolders\n        });\n    }\n    return this.files[name];\n};\n\n/**\n* Cross-window, cross-Node-context regular expression detection\n* @param  {Object}  object Anything\n* @return {Boolean}        true if the object is a regular expression,\n* false otherwise\n*/\nfunction isRegExp(object) {\n    return Object.prototype.toString.call(object) === \"[object RegExp]\";\n}\n\n// return the actual prototype of JSZip\nvar out = {\n    /**\n     * @see loadAsync\n     */\n    load: function() {\n        throw new Error(\"This method has been removed in JSZip 3.0, please check the upgrade guide.\");\n    },\n\n\n    /**\n     * Call a callback function for each entry at this folder level.\n     * @param {Function} cb the callback function:\n     * function (relativePath, file) {...}\n     * It takes 2 arguments : the relative path and the file.\n     */\n    forEach: function(cb) {\n        var filename, relativePath, file;\n        for (filename in this.files) {\n            if (!this.files.hasOwnProperty(filename)) {\n                continue;\n            }\n            file = this.files[filename];\n            relativePath = filename.slice(this.root.length, filename.length);\n            if (relativePath && filename.slice(0, this.root.length) === this.root) { // the file is in the current root\n                cb(relativePath, file); // TODO reverse the parameters ? need to be clean AND consistent with the filter search fn...\n            }\n        }\n    },\n\n    /**\n     * Filter nested files/folders with the specified function.\n     * @param {Function} search the predicate to use :\n     * function (relativePath, file) {...}\n     * It takes 2 arguments : the relative path and the file.\n     * @return {Array} An array of matching elements.\n     */\n    filter: function(search) {\n        var result = [];\n        this.forEach(function (relativePath, entry) {\n            if (search(relativePath, entry)) { // the file matches the function\n                result.push(entry);\n            }\n\n        });\n        return result;\n    },\n\n    /**\n     * Add a file to the zip file, or search a file.\n     * @param   {string|RegExp} name The name of the file to add (if data is defined),\n     * the name of the file to find (if no data) or a regex to match files.\n     * @param   {String|ArrayBuffer|Uint8Array|Buffer} data  The file data, either raw or base64 encoded\n     * @param   {Object} o     File options\n     * @return  {JSZip|Object|Array} this JSZip object (when adding a file),\n     * a file (when searching by string) or an array of files (when searching by regex).\n     */\n    file: function(name, data, o) {\n        if (arguments.length === 1) {\n            if (isRegExp(name)) {\n                var regexp = name;\n                return this.filter(function(relativePath, file) {\n                    return !file.dir && regexp.test(relativePath);\n                });\n            }\n            else { // text\n                var obj = this.files[this.root + name];\n                if (obj && !obj.dir) {\n                    return obj;\n                } else {\n                    return null;\n                }\n            }\n        }\n        else { // more than one argument : we have data !\n            name = this.root + name;\n            fileAdd.call(this, name, data, o);\n        }\n        return this;\n    },\n\n    /**\n     * Add a directory to the zip file, or search.\n     * @param   {String|RegExp} arg The name of the directory to add, or a regex to search folders.\n     * @return  {JSZip} an object with the new directory as the root, or an array containing matching folders.\n     */\n    folder: function(arg) {\n        if (!arg) {\n            return this;\n        }\n\n        if (isRegExp(arg)) {\n            return this.filter(function(relativePath, file) {\n                return file.dir && arg.test(relativePath);\n            });\n        }\n\n        // else, name is a new folder\n        var name = this.root + arg;\n        var newFolder = folderAdd.call(this, name);\n\n        // Allow chaining by returning a new object with this folder as the root\n        var ret = this.clone();\n        ret.root = newFolder.name;\n        return ret;\n    },\n\n    /**\n     * Delete a file, or a directory and all sub-files, from the zip\n     * @param {string} name the name of the file to delete\n     * @return {JSZip} this JSZip object\n     */\n    remove: function(name) {\n        name = this.root + name;\n        var file = this.files[name];\n        if (!file) {\n            // Look for any folders\n            if (name.slice(-1) !== \"/\") {\n                name += \"/\";\n            }\n            file = this.files[name];\n        }\n\n        if (file && !file.dir) {\n            // file\n            delete this.files[name];\n        } else {\n            // maybe a folder, delete recursively\n            var kids = this.filter(function(relativePath, file) {\n                return file.name.slice(0, name.length) === name;\n            });\n            for (var i = 0; i < kids.length; i++) {\n                delete this.files[kids[i].name];\n            }\n        }\n\n        return this;\n    },\n\n    /**\n     * Generate the complete zip file\n     * @param {Object} options the options to generate the zip file :\n     * - compression, \"STORE\" by default.\n     * - type, \"base64\" by default. Values are : string, base64, uint8array, arraybuffer, blob.\n     * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the zip file\n     */\n    generate: function(options) {\n        throw new Error(\"This method has been removed in JSZip 3.0, please check the upgrade guide.\");\n    },\n\n    /**\n     * Generate the complete zip file as an internal stream.\n     * @param {Object} options the options to generate the zip file :\n     * - compression, \"STORE\" by default.\n     * - type, \"base64\" by default. Values are : string, base64, uint8array, arraybuffer, blob.\n     * @return {StreamHelper} the streamed zip file.\n     */\n    generateInternalStream: function(options) {\n      var worker, opts = {};\n      try {\n          opts = utils.extend(options || {}, {\n              streamFiles: false,\n              compression: \"STORE\",\n              compressionOptions : null,\n              type: \"\",\n              platform: \"DOS\",\n              comment: null,\n              mimeType: 'application/zip',\n              encodeFileName: utf8.utf8encode\n          });\n\n          opts.type = opts.type.toLowerCase();\n          opts.compression = opts.compression.toUpperCase();\n\n          // \"binarystring\" is prefered but the internals use \"string\".\n          if(opts.type === \"binarystring\") {\n            opts.type = \"string\";\n          }\n\n          if (!opts.type) {\n            throw new Error(\"No output type specified.\");\n          }\n\n          utils.checkSupport(opts.type);\n\n          // accept nodejs `process.platform`\n          if(\n              opts.platform === 'darwin' ||\n              opts.platform === 'freebsd' ||\n              opts.platform === 'linux' ||\n              opts.platform === 'sunos'\n          ) {\n              opts.platform = \"UNIX\";\n          }\n          if (opts.platform === 'win32') {\n              opts.platform = \"DOS\";\n          }\n\n          var comment = opts.comment || this.comment || \"\";\n          worker = generate.generateWorker(this, opts, comment);\n      } catch (e) {\n        worker = new GenericWorker(\"error\");\n        worker.error(e);\n      }\n      return new StreamHelper(worker, opts.type || \"string\", opts.mimeType);\n    },\n    /**\n     * Generate the complete zip file asynchronously.\n     * @see generateInternalStream\n     */\n    generateAsync: function(options, onUpdate) {\n        return this.generateInternalStream(options).accumulate(onUpdate);\n    },\n    /**\n     * Generate the complete zip file asynchronously.\n     * @see generateInternalStream\n     */\n    generateNodeStream: function(options, onUpdate) {\n        options = options || {};\n        if (!options.type) {\n            options.type = \"nodebuffer\";\n        }\n        return this.generateInternalStream(options).toNodejsStream(onUpdate);\n    }\n};\nmodule.exports = out;\n","/*\n * This file is used by module bundlers (browserify/webpack/etc) when\n * including a stream implementation. We use \"readable-stream\" to get a\n * consistent behavior between nodejs versions but bundlers often have a shim\n * for \"stream\". Using this shim greatly improve the compatibility and greatly\n * reduce the final size of the bundle (only one stream implementation, not\n * two).\n */\nmodule.exports = require(\"stream\");\n","'use strict';\nvar DataReader = require('./DataReader');\nvar utils = require('../utils');\n\nfunction ArrayReader(data) {\n    DataReader.call(this, data);\n\tfor(var i = 0; i < this.data.length; i++) {\n\t\tdata[i] = data[i] & 0xFF;\n\t}\n}\nutils.inherits(ArrayReader, DataReader);\n/**\n * @see DataReader.byteAt\n */\nArrayReader.prototype.byteAt = function(i) {\n    return this.data[this.zero + i];\n};\n/**\n * @see DataReader.lastIndexOfSignature\n */\nArrayReader.prototype.lastIndexOfSignature = function(sig) {\n    var sig0 = sig.charCodeAt(0),\n        sig1 = sig.charCodeAt(1),\n        sig2 = sig.charCodeAt(2),\n        sig3 = sig.charCodeAt(3);\n    for (var i = this.length - 4; i >= 0; --i) {\n        if (this.data[i] === sig0 && this.data[i + 1] === sig1 && this.data[i + 2] === sig2 && this.data[i + 3] === sig3) {\n            return i - this.zero;\n        }\n    }\n\n    return -1;\n};\n/**\n * @see DataReader.readAndCheckSignature\n */\nArrayReader.prototype.readAndCheckSignature = function (sig) {\n    var sig0 = sig.charCodeAt(0),\n        sig1 = sig.charCodeAt(1),\n        sig2 = sig.charCodeAt(2),\n        sig3 = sig.charCodeAt(3),\n        data = this.readData(4);\n    return sig0 === data[0] && sig1 === data[1] && sig2 === data[2] && sig3 === data[3];\n};\n/**\n * @see DataReader.readData\n */\nArrayReader.prototype.readData = function(size) {\n    this.checkOffset(size);\n    if(size === 0) {\n        return [];\n    }\n    var result = this.data.slice(this.zero + this.index, this.zero + this.index + size);\n    this.index += size;\n    return result;\n};\nmodule.exports = ArrayReader;\n","'use strict';\nvar utils = require('../utils');\n\nfunction DataReader(data) {\n    this.data = data; // type : see implementation\n    this.length = data.length;\n    this.index = 0;\n    this.zero = 0;\n}\nDataReader.prototype = {\n    /**\n     * Check that the offset will not go too far.\n     * @param {string} offset the additional offset to check.\n     * @throws {Error} an Error if the offset is out of bounds.\n     */\n    checkOffset: function(offset) {\n        this.checkIndex(this.index + offset);\n    },\n    /**\n     * Check that the specified index will not be too far.\n     * @param {string} newIndex the index to check.\n     * @throws {Error} an Error if the index is out of bounds.\n     */\n    checkIndex: function(newIndex) {\n        if (this.length < this.zero + newIndex || newIndex < 0) {\n            throw new Error(\"End of data reached (data length = \" + this.length + \", asked index = \" + (newIndex) + \"). Corrupted zip ?\");\n        }\n    },\n    /**\n     * Change the index.\n     * @param {number} newIndex The new index.\n     * @throws {Error} if the new index is out of the data.\n     */\n    setIndex: function(newIndex) {\n        this.checkIndex(newIndex);\n        this.index = newIndex;\n    },\n    /**\n     * Skip the next n bytes.\n     * @param {number} n the number of bytes to skip.\n     * @throws {Error} if the new index is out of the data.\n     */\n    skip: function(n) {\n        this.setIndex(this.index + n);\n    },\n    /**\n     * Get the byte at the specified index.\n     * @param {number} i the index to use.\n     * @return {number} a byte.\n     */\n    byteAt: function(i) {\n        // see implementations\n    },\n    /**\n     * Get the next number with a given byte size.\n     * @param {number} size the number of bytes to read.\n     * @return {number} the corresponding number.\n     */\n    readInt: function(size) {\n        var result = 0,\n            i;\n        this.checkOffset(size);\n        for (i = this.index + size - 1; i >= this.index; i--) {\n            result = (result << 8) + this.byteAt(i);\n        }\n        this.index += size;\n        return result;\n    },\n    /**\n     * Get the next string with a given byte size.\n     * @param {number} size the number of bytes to read.\n     * @return {string} the corresponding string.\n     */\n    readString: function(size) {\n        return utils.transformTo(\"string\", this.readData(size));\n    },\n    /**\n     * Get raw data without conversion, <size> bytes.\n     * @param {number} size the number of bytes to read.\n     * @return {Object} the raw data, implementation specific.\n     */\n    readData: function(size) {\n        // see implementations\n    },\n    /**\n     * Find the last occurence of a zip signature (4 bytes).\n     * @param {string} sig the signature to find.\n     * @return {number} the index of the last occurence, -1 if not found.\n     */\n    lastIndexOfSignature: function(sig) {\n        // see implementations\n    },\n    /**\n     * Read the signature (4 bytes) at the current position and compare it with sig.\n     * @param {string} sig the expected signature\n     * @return {boolean} true if the signature matches, false otherwise.\n     */\n    readAndCheckSignature: function(sig) {\n        // see implementations\n    },\n    /**\n     * Get the next date.\n     * @return {Date} the date.\n     */\n    readDate: function() {\n        var dostime = this.readInt(4);\n        return new Date(Date.UTC(\n        ((dostime >> 25) & 0x7f) + 1980, // year\n        ((dostime >> 21) & 0x0f) - 1, // month\n        (dostime >> 16) & 0x1f, // day\n        (dostime >> 11) & 0x1f, // hour\n        (dostime >> 5) & 0x3f, // minute\n        (dostime & 0x1f) << 1)); // second\n    }\n};\nmodule.exports = DataReader;\n","'use strict';\nvar Uint8ArrayReader = require('./Uint8ArrayReader');\nvar utils = require('../utils');\n\nfunction NodeBufferReader(data) {\n    Uint8ArrayReader.call(this, data);\n}\nutils.inherits(NodeBufferReader, Uint8ArrayReader);\n\n/**\n * @see DataReader.readData\n */\nNodeBufferReader.prototype.readData = function(size) {\n    this.checkOffset(size);\n    var result = this.data.slice(this.zero + this.index, this.zero + this.index + size);\n    this.index += size;\n    return result;\n};\nmodule.exports = NodeBufferReader;\n","'use strict';\nvar DataReader = require('./DataReader');\nvar utils = require('../utils');\n\nfunction StringReader(data) {\n    DataReader.call(this, data);\n}\nutils.inherits(StringReader, DataReader);\n/**\n * @see DataReader.byteAt\n */\nStringReader.prototype.byteAt = function(i) {\n    return this.data.charCodeAt(this.zero + i);\n};\n/**\n * @see DataReader.lastIndexOfSignature\n */\nStringReader.prototype.lastIndexOfSignature = function(sig) {\n    return this.data.lastIndexOf(sig) - this.zero;\n};\n/**\n * @see DataReader.readAndCheckSignature\n */\nStringReader.prototype.readAndCheckSignature = function (sig) {\n    var data = this.readData(4);\n    return sig === data;\n};\n/**\n * @see DataReader.readData\n */\nStringReader.prototype.readData = function(size) {\n    this.checkOffset(size);\n    // this will work because the constructor applied the \"& 0xff\" mask.\n    var result = this.data.slice(this.zero + this.index, this.zero + this.index + size);\n    this.index += size;\n    return result;\n};\nmodule.exports = StringReader;\n","'use strict';\nvar ArrayReader = require('./ArrayReader');\nvar utils = require('../utils');\n\nfunction Uint8ArrayReader(data) {\n    ArrayReader.call(this, data);\n}\nutils.inherits(Uint8ArrayReader, ArrayReader);\n/**\n * @see DataReader.readData\n */\nUint8ArrayReader.prototype.readData = function(size) {\n    this.checkOffset(size);\n    if(size === 0) {\n        // in IE10, when using subarray(idx, idx), we get the array [0x00] instead of [].\n        return new Uint8Array(0);\n    }\n    var result = this.data.subarray(this.zero + this.index, this.zero + this.index + size);\n    this.index += size;\n    return result;\n};\nmodule.exports = Uint8ArrayReader;\n","'use strict';\n\nvar utils = require('../utils');\nvar support = require('../support');\nvar ArrayReader = require('./ArrayReader');\nvar StringReader = require('./StringReader');\nvar NodeBufferReader = require('./NodeBufferReader');\nvar Uint8ArrayReader = require('./Uint8ArrayReader');\n\n/**\n * Create a reader adapted to the data.\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data to read.\n * @return {DataReader} the data reader.\n */\nmodule.exports = function (data) {\n    var type = utils.getTypeOf(data);\n    utils.checkSupport(type);\n    if (type === \"string\" && !support.uint8array) {\n        return new StringReader(data);\n    }\n    if (type === \"nodebuffer\") {\n        return new NodeBufferReader(data);\n    }\n    if (support.uint8array) {\n        return new Uint8ArrayReader(utils.transformTo(\"uint8array\", data));\n    }\n    return new ArrayReader(utils.transformTo(\"array\", data));\n};\n","'use strict';\nexports.LOCAL_FILE_HEADER = \"PK\\x03\\x04\";\nexports.CENTRAL_FILE_HEADER = \"PK\\x01\\x02\";\nexports.CENTRAL_DIRECTORY_END = \"PK\\x05\\x06\";\nexports.ZIP64_CENTRAL_DIRECTORY_LOCATOR = \"PK\\x06\\x07\";\nexports.ZIP64_CENTRAL_DIRECTORY_END = \"PK\\x06\\x06\";\nexports.DATA_DESCRIPTOR = \"PK\\x07\\x08\";\n","'use strict';\n\nvar GenericWorker = require('./GenericWorker');\nvar utils = require('../utils');\n\n/**\n * A worker which convert chunks to a specified type.\n * @constructor\n * @param {String} destType the destination type.\n */\nfunction ConvertWorker(destType) {\n    GenericWorker.call(this, \"ConvertWorker to \" + destType);\n    this.destType = destType;\n}\nutils.inherits(ConvertWorker, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nConvertWorker.prototype.processChunk = function (chunk) {\n    this.push({\n        data : utils.transformTo(this.destType, chunk.data),\n        meta : chunk.meta\n    });\n};\nmodule.exports = ConvertWorker;\n","'use strict';\n\nvar GenericWorker = require('./GenericWorker');\nvar crc32 = require('../crc32');\nvar utils = require('../utils');\n\n/**\n * A worker which calculate the crc32 of the data flowing through.\n * @constructor\n */\nfunction Crc32Probe() {\n    GenericWorker.call(this, \"Crc32Probe\");\n    this.withStreamInfo(\"crc32\", 0);\n}\nutils.inherits(Crc32Probe, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nCrc32Probe.prototype.processChunk = function (chunk) {\n    this.streamInfo.crc32 = crc32(chunk.data, this.streamInfo.crc32 || 0);\n    this.push(chunk);\n};\nmodule.exports = Crc32Probe;\n","'use strict';\n\nvar utils = require('../utils');\nvar GenericWorker = require('./GenericWorker');\n\n/**\n * A worker which calculate the total length of the data flowing through.\n * @constructor\n * @param {String} propName the name used to expose the length\n */\nfunction DataLengthProbe(propName) {\n    GenericWorker.call(this, \"DataLengthProbe for \" + propName);\n    this.propName = propName;\n    this.withStreamInfo(propName, 0);\n}\nutils.inherits(DataLengthProbe, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nDataLengthProbe.prototype.processChunk = function (chunk) {\n    if(chunk) {\n        var length = this.streamInfo[this.propName] || 0;\n        this.streamInfo[this.propName] = length + chunk.data.length;\n    }\n    GenericWorker.prototype.processChunk.call(this, chunk);\n};\nmodule.exports = DataLengthProbe;\n\n","'use strict';\n\nvar utils = require('../utils');\nvar GenericWorker = require('./GenericWorker');\n\n// the size of the generated chunks\n// TODO expose this as a public variable\nvar DEFAULT_BLOCK_SIZE = 16 * 1024;\n\n/**\n * A worker that reads a content and emits chunks.\n * @constructor\n * @param {Promise} dataP the promise of the data to split\n */\nfunction DataWorker(dataP) {\n    GenericWorker.call(this, \"DataWorker\");\n    var self = this;\n    this.dataIsReady = false;\n    this.index = 0;\n    this.max = 0;\n    this.data = null;\n    this.type = \"\";\n\n    this._tickScheduled = false;\n\n    dataP.then(function (data) {\n        self.dataIsReady = true;\n        self.data = data;\n        self.max = data && data.length || 0;\n        self.type = utils.getTypeOf(data);\n        if(!self.isPaused) {\n            self._tickAndRepeat();\n        }\n    }, function (e) {\n        self.error(e);\n    });\n}\n\nutils.inherits(DataWorker, GenericWorker);\n\n/**\n * @see GenericWorker.cleanUp\n */\nDataWorker.prototype.cleanUp = function () {\n    GenericWorker.prototype.cleanUp.call(this);\n    this.data = null;\n};\n\n/**\n * @see GenericWorker.resume\n */\nDataWorker.prototype.resume = function () {\n    if(!GenericWorker.prototype.resume.call(this)) {\n        return false;\n    }\n\n    if (!this._tickScheduled && this.dataIsReady) {\n        this._tickScheduled = true;\n        utils.delay(this._tickAndRepeat, [], this);\n    }\n    return true;\n};\n\n/**\n * Trigger a tick a schedule an other call to this function.\n */\nDataWorker.prototype._tickAndRepeat = function() {\n    this._tickScheduled = false;\n    if(this.isPaused || this.isFinished) {\n        return;\n    }\n    this._tick();\n    if(!this.isFinished) {\n        utils.delay(this._tickAndRepeat, [], this);\n        this._tickScheduled = true;\n    }\n};\n\n/**\n * Read and push a chunk.\n */\nDataWorker.prototype._tick = function() {\n\n    if(this.isPaused || this.isFinished) {\n        return false;\n    }\n\n    var size = DEFAULT_BLOCK_SIZE;\n    var data = null, nextIndex = Math.min(this.max, this.index + size);\n    if (this.index >= this.max) {\n        // EOF\n        return this.end();\n    } else {\n        switch(this.type) {\n            case \"string\":\n                data = this.data.substring(this.index, nextIndex);\n            break;\n            case \"uint8array\":\n                data = this.data.subarray(this.index, nextIndex);\n            break;\n            case \"array\":\n            case \"nodebuffer\":\n                data = this.data.slice(this.index, nextIndex);\n            break;\n        }\n        this.index = nextIndex;\n        return this.push({\n            data : data,\n            meta : {\n                percent : this.max ? this.index / this.max * 100 : 0\n            }\n        });\n    }\n};\n\nmodule.exports = DataWorker;\n","'use strict';\n\n/**\n * A worker that does nothing but passing chunks to the next one. This is like\n * a nodejs stream but with some differences. On the good side :\n * - it works on IE 6-9 without any issue / polyfill\n * - it weights less than the full dependencies bundled with browserify\n * - it forwards errors (no need to declare an error handler EVERYWHERE)\n *\n * A chunk is an object with 2 attributes : `meta` and `data`. The former is an\n * object containing anything (`percent` for example), see each worker for more\n * details. The latter is the real data (String, Uint8Array, etc).\n *\n * @constructor\n * @param {String} name the name of the stream (mainly used for debugging purposes)\n */\nfunction GenericWorker(name) {\n    // the name of the worker\n    this.name = name || \"default\";\n    // an object containing metadata about the workers chain\n    this.streamInfo = {};\n    // an error which happened when the worker was paused\n    this.generatedError = null;\n    // an object containing metadata to be merged by this worker into the general metadata\n    this.extraStreamInfo = {};\n    // true if the stream is paused (and should not do anything), false otherwise\n    this.isPaused = true;\n    // true if the stream is finished (and should not do anything), false otherwise\n    this.isFinished = false;\n    // true if the stream is locked to prevent further structure updates (pipe), false otherwise\n    this.isLocked = false;\n    // the event listeners\n    this._listeners = {\n        'data':[],\n        'end':[],\n        'error':[]\n    };\n    // the previous worker, if any\n    this.previous = null;\n}\n\nGenericWorker.prototype = {\n    /**\n     * Push a chunk to the next workers.\n     * @param {Object} chunk the chunk to push\n     */\n    push : function (chunk) {\n        this.emit(\"data\", chunk);\n    },\n    /**\n     * End the stream.\n     * @return {Boolean} true if this call ended the worker, false otherwise.\n     */\n    end : function () {\n        if (this.isFinished) {\n            return false;\n        }\n\n        this.flush();\n        try {\n            this.emit(\"end\");\n            this.cleanUp();\n            this.isFinished = true;\n        } catch (e) {\n            this.emit(\"error\", e);\n        }\n        return true;\n    },\n    /**\n     * End the stream with an error.\n     * @param {Error} e the error which caused the premature end.\n     * @return {Boolean} true if this call ended the worker with an error, false otherwise.\n     */\n    error : function (e) {\n        if (this.isFinished) {\n            return false;\n        }\n\n        if(this.isPaused) {\n            this.generatedError = e;\n        } else {\n            this.isFinished = true;\n\n            this.emit(\"error\", e);\n\n            // in the workers chain exploded in the middle of the chain,\n            // the error event will go downward but we also need to notify\n            // workers upward that there has been an error.\n            if(this.previous) {\n                this.previous.error(e);\n            }\n\n            this.cleanUp();\n        }\n        return true;\n    },\n    /**\n     * Add a callback on an event.\n     * @param {String} name the name of the event (data, end, error)\n     * @param {Function} listener the function to call when the event is triggered\n     * @return {GenericWorker} the current object for chainability\n     */\n    on : function (name, listener) {\n        this._listeners[name].push(listener);\n        return this;\n    },\n    /**\n     * Clean any references when a worker is ending.\n     */\n    cleanUp : function () {\n        this.streamInfo = this.generatedError = this.extraStreamInfo = null;\n        this._listeners = [];\n    },\n    /**\n     * Trigger an event. This will call registered callback with the provided arg.\n     * @param {String} name the name of the event (data, end, error)\n     * @param {Object} arg the argument to call the callback with.\n     */\n    emit : function (name, arg) {\n        if (this._listeners[name]) {\n            for(var i = 0; i < this._listeners[name].length; i++) {\n                this._listeners[name][i].call(this, arg);\n            }\n        }\n    },\n    /**\n     * Chain a worker with an other.\n     * @param {Worker} next the worker receiving events from the current one.\n     * @return {worker} the next worker for chainability\n     */\n    pipe : function (next) {\n        return next.registerPrevious(this);\n    },\n    /**\n     * Same as `pipe` in the other direction.\n     * Using an API with `pipe(next)` is very easy.\n     * Implementing the API with the point of view of the next one registering\n     * a source is easier, see the ZipFileWorker.\n     * @param {Worker} previous the previous worker, sending events to this one\n     * @return {Worker} the current worker for chainability\n     */\n    registerPrevious : function (previous) {\n        if (this.isLocked) {\n            throw new Error(\"The stream '\" + this + \"' has already been used.\");\n        }\n\n        // sharing the streamInfo...\n        this.streamInfo = previous.streamInfo;\n        // ... and adding our own bits\n        this.mergeStreamInfo();\n        this.previous =  previous;\n        var self = this;\n        previous.on('data', function (chunk) {\n            self.processChunk(chunk);\n        });\n        previous.on('end', function () {\n            self.end();\n        });\n        previous.on('error', function (e) {\n            self.error(e);\n        });\n        return this;\n    },\n    /**\n     * Pause the stream so it doesn't send events anymore.\n     * @return {Boolean} true if this call paused the worker, false otherwise.\n     */\n    pause : function () {\n        if(this.isPaused || this.isFinished) {\n            return false;\n        }\n        this.isPaused = true;\n\n        if(this.previous) {\n            this.previous.pause();\n        }\n        return true;\n    },\n    /**\n     * Resume a paused stream.\n     * @return {Boolean} true if this call resumed the worker, false otherwise.\n     */\n    resume : function () {\n        if(!this.isPaused || this.isFinished) {\n            return false;\n        }\n        this.isPaused = false;\n\n        // if true, the worker tried to resume but failed\n        var withError = false;\n        if(this.generatedError) {\n            this.error(this.generatedError);\n            withError = true;\n        }\n        if(this.previous) {\n            this.previous.resume();\n        }\n\n        return !withError;\n    },\n    /**\n     * Flush any remaining bytes as the stream is ending.\n     */\n    flush : function () {},\n    /**\n     * Process a chunk. This is usually the method overridden.\n     * @param {Object} chunk the chunk to process.\n     */\n    processChunk : function(chunk) {\n        this.push(chunk);\n    },\n    /**\n     * Add a key/value to be added in the workers chain streamInfo once activated.\n     * @param {String} key the key to use\n     * @param {Object} value the associated value\n     * @return {Worker} the current worker for chainability\n     */\n    withStreamInfo : function (key, value) {\n        this.extraStreamInfo[key] = value;\n        this.mergeStreamInfo();\n        return this;\n    },\n    /**\n     * Merge this worker's streamInfo into the chain's streamInfo.\n     */\n    mergeStreamInfo : function () {\n        for(var key in this.extraStreamInfo) {\n            if (!this.extraStreamInfo.hasOwnProperty(key)) {\n                continue;\n            }\n            this.streamInfo[key] = this.extraStreamInfo[key];\n        }\n    },\n\n    /**\n     * Lock the stream to prevent further updates on the workers chain.\n     * After calling this method, all calls to pipe will fail.\n     */\n    lock: function () {\n        if (this.isLocked) {\n            throw new Error(\"The stream '\" + this + \"' has already been used.\");\n        }\n        this.isLocked = true;\n        if (this.previous) {\n            this.previous.lock();\n        }\n    },\n\n    /**\n     *\n     * Pretty print the workers chain.\n     */\n    toString : function () {\n        var me = \"Worker \" + this.name;\n        if (this.previous) {\n            return this.previous + \" -> \" + me;\n        } else {\n            return me;\n        }\n    }\n};\n\nmodule.exports = GenericWorker;\n","'use strict';\n\nvar utils = require('../utils');\nvar ConvertWorker = require('./ConvertWorker');\nvar GenericWorker = require('./GenericWorker');\nvar base64 = require('../base64');\nvar support = require(\"../support\");\nvar external = require(\"../external\");\n\nvar NodejsStreamOutputAdapter = null;\nif (support.nodestream) {\n    try {\n        NodejsStreamOutputAdapter = require('../nodejs/NodejsStreamOutputAdapter');\n    } catch(e) {}\n}\n\n/**\n * Apply the final transformation of the data. If the user wants a Blob for\n * example, it's easier to work with an U8intArray and finally do the\n * ArrayBuffer/Blob conversion.\n * @param {String} type the name of the final type\n * @param {String|Uint8Array|Buffer} content the content to transform\n * @param {String} mimeType the mime type of the content, if applicable.\n * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the content in the right format.\n */\nfunction transformZipOutput(type, content, mimeType) {\n    switch(type) {\n        case \"blob\" :\n            return utils.newBlob(utils.transformTo(\"arraybuffer\", content), mimeType);\n        case \"base64\" :\n            return base64.encode(content);\n        default :\n            return utils.transformTo(type, content);\n    }\n}\n\n/**\n * Concatenate an array of data of the given type.\n * @param {String} type the type of the data in the given array.\n * @param {Array} dataArray the array containing the data chunks to concatenate\n * @return {String|Uint8Array|Buffer} the concatenated data\n * @throws Error if the asked type is unsupported\n */\nfunction concat (type, dataArray) {\n    var i, index = 0, res = null, totalLength = 0;\n    for(i = 0; i < dataArray.length; i++) {\n        totalLength += dataArray[i].length;\n    }\n    switch(type) {\n        case \"string\":\n            return dataArray.join(\"\");\n          case \"array\":\n            return Array.prototype.concat.apply([], dataArray);\n        case \"uint8array\":\n            res = new Uint8Array(totalLength);\n            for(i = 0; i < dataArray.length; i++) {\n                res.set(dataArray[i], index);\n                index += dataArray[i].length;\n            }\n            return res;\n        case \"nodebuffer\":\n            return Buffer.concat(dataArray);\n        default:\n            throw new Error(\"concat : unsupported type '\"  + type + \"'\");\n    }\n}\n\n/**\n * Listen a StreamHelper, accumulate its content and concatenate it into a\n * complete block.\n * @param {StreamHelper} helper the helper to use.\n * @param {Function} updateCallback a callback called on each update. Called\n * with one arg :\n * - the metadata linked to the update received.\n * @return Promise the promise for the accumulation.\n */\nfunction accumulate(helper, updateCallback) {\n    return new external.Promise(function (resolve, reject){\n        var dataArray = [];\n        var chunkType = helper._internalType,\n            resultType = helper._outputType,\n            mimeType = helper._mimeType;\n        helper\n        .on('data', function (data, meta) {\n            dataArray.push(data);\n            if(updateCallback) {\n                updateCallback(meta);\n            }\n        })\n        .on('error', function(err) {\n            dataArray = [];\n            reject(err);\n        })\n        .on('end', function (){\n            try {\n                var result = transformZipOutput(resultType, concat(chunkType, dataArray), mimeType);\n                resolve(result);\n            } catch (e) {\n                reject(e);\n            }\n            dataArray = [];\n        })\n        .resume();\n    });\n}\n\n/**\n * An helper to easily use workers outside of JSZip.\n * @constructor\n * @param {Worker} worker the worker to wrap\n * @param {String} outputType the type of data expected by the use\n * @param {String} mimeType the mime type of the content, if applicable.\n */\nfunction StreamHelper(worker, outputType, mimeType) {\n    var internalType = outputType;\n    switch(outputType) {\n        case \"blob\":\n        case \"arraybuffer\":\n            internalType = \"uint8array\";\n        break;\n        case \"base64\":\n            internalType = \"string\";\n        break;\n    }\n\n    try {\n        // the type used internally\n        this._internalType = internalType;\n        // the type used to output results\n        this._outputType = outputType;\n        // the mime type\n        this._mimeType = mimeType;\n        utils.checkSupport(internalType);\n        this._worker = worker.pipe(new ConvertWorker(internalType));\n        // the last workers can be rewired without issues but we need to\n        // prevent any updates on previous workers.\n        worker.lock();\n    } catch(e) {\n        this._worker = new GenericWorker(\"error\");\n        this._worker.error(e);\n    }\n}\n\nStreamHelper.prototype = {\n    /**\n     * Listen a StreamHelper, accumulate its content and concatenate it into a\n     * complete block.\n     * @param {Function} updateCb the update callback.\n     * @return Promise the promise for the accumulation.\n     */\n    accumulate : function (updateCb) {\n        return accumulate(this, updateCb);\n    },\n    /**\n     * Add a listener on an event triggered on a stream.\n     * @param {String} evt the name of the event\n     * @param {Function} fn the listener\n     * @return {StreamHelper} the current helper.\n     */\n    on : function (evt, fn) {\n        var self = this;\n\n        if(evt === \"data\") {\n            this._worker.on(evt, function (chunk) {\n                fn.call(self, chunk.data, chunk.meta);\n            });\n        } else {\n            this._worker.on(evt, function () {\n                utils.delay(fn, arguments, self);\n            });\n        }\n        return this;\n    },\n    /**\n     * Resume the flow of chunks.\n     * @return {StreamHelper} the current helper.\n     */\n    resume : function () {\n        utils.delay(this._worker.resume, [], this._worker);\n        return this;\n    },\n    /**\n     * Pause the flow of chunks.\n     * @return {StreamHelper} the current helper.\n     */\n    pause : function () {\n        this._worker.pause();\n        return this;\n    },\n    /**\n     * Return a nodejs stream for this helper.\n     * @param {Function} updateCb the update callback.\n     * @return {NodejsStreamOutputAdapter} the nodejs stream.\n     */\n    toNodejsStream : function (updateCb) {\n        utils.checkSupport(\"nodestream\");\n        if (this._outputType !== \"nodebuffer\") {\n            // an object stream containing blob/arraybuffer/uint8array/string\n            // is strange and I don't know if it would be useful.\n            // I you find this comment and have a good usecase, please open a\n            // bug report !\n            throw new Error(this._outputType + \" is not supported by this method\");\n        }\n\n        return new NodejsStreamOutputAdapter(this, {\n            objectMode : this._outputType !== \"nodebuffer\"\n        }, updateCb);\n    }\n};\n\n\nmodule.exports = StreamHelper;\n","'use strict';\n\nexports.base64 = true;\nexports.array = true;\nexports.string = true;\nexports.arraybuffer = typeof ArrayBuffer !== \"undefined\" && typeof Uint8Array !== \"undefined\";\nexports.nodebuffer = typeof Buffer !== \"undefined\";\n// contains true if JSZip can read/generate Uint8Array, false otherwise.\nexports.uint8array = typeof Uint8Array !== \"undefined\";\n\nif (typeof ArrayBuffer === \"undefined\") {\n    exports.blob = false;\n}\nelse {\n    var buffer = new ArrayBuffer(0);\n    try {\n        exports.blob = new Blob([buffer], {\n            type: \"application/zip\"\n        }).size === 0;\n    }\n    catch (e) {\n        try {\n            var Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder;\n            var builder = new Builder();\n            builder.append(buffer);\n            exports.blob = builder.getBlob('application/zip').size === 0;\n        }\n        catch (e) {\n            exports.blob = false;\n        }\n    }\n}\n\ntry {\n    exports.nodestream = !!require('readable-stream').Readable;\n} catch(e) {\n    exports.nodestream = false;\n}\n","'use strict';\n\nvar utils = require('./utils');\nvar support = require('./support');\nvar nodejsUtils = require('./nodejsUtils');\nvar GenericWorker = require('./stream/GenericWorker');\n\n/**\n * The following functions come from pako, from pako/lib/utils/strings\n * released under the MIT license, see pako https://github.com/nodeca/pako/\n */\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nvar _utf8len = new Array(256);\nfor (var i=0; i<256; i++) {\n  _utf8len[i] = (i >= 252 ? 6 : i >= 248 ? 5 : i >= 240 ? 4 : i >= 224 ? 3 : i >= 192 ? 2 : 1);\n}\n_utf8len[254]=_utf8len[254]=1; // Invalid sequence start\n\n// convert string to array (typed, when possible)\nvar string2buf = function (str) {\n    var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n    // count binary size\n    for (m_pos = 0; m_pos < str_len; m_pos++) {\n        c = str.charCodeAt(m_pos);\n        if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {\n            c2 = str.charCodeAt(m_pos+1);\n            if ((c2 & 0xfc00) === 0xdc00) {\n                c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n                m_pos++;\n            }\n        }\n        buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n    }\n\n    // allocate buffer\n    if (support.uint8array) {\n        buf = new Uint8Array(buf_len);\n    } else {\n        buf = new Array(buf_len);\n    }\n\n    // convert\n    for (i=0, m_pos = 0; i < buf_len; m_pos++) {\n        c = str.charCodeAt(m_pos);\n        if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {\n            c2 = str.charCodeAt(m_pos+1);\n            if ((c2 & 0xfc00) === 0xdc00) {\n                c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n                m_pos++;\n            }\n        }\n        if (c < 0x80) {\n            /* one byte */\n            buf[i++] = c;\n        } else if (c < 0x800) {\n            /* two bytes */\n            buf[i++] = 0xC0 | (c >>> 6);\n            buf[i++] = 0x80 | (c & 0x3f);\n        } else if (c < 0x10000) {\n            /* three bytes */\n            buf[i++] = 0xE0 | (c >>> 12);\n            buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n            buf[i++] = 0x80 | (c & 0x3f);\n        } else {\n            /* four bytes */\n            buf[i++] = 0xf0 | (c >>> 18);\n            buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n            buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n            buf[i++] = 0x80 | (c & 0x3f);\n        }\n    }\n\n    return buf;\n};\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max   - length limit (mandatory);\nvar utf8border = function(buf, max) {\n    var pos;\n\n    max = max || buf.length;\n    if (max > buf.length) { max = buf.length; }\n\n    // go back from last position, until start of sequence found\n    pos = max-1;\n    while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n    // Fuckup - very small and broken sequence,\n    // return max, because we should return something anyway.\n    if (pos < 0) { return max; }\n\n    // If we came to start of buffer - that means vuffer is too small,\n    // return max too.\n    if (pos === 0) { return max; }\n\n    return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n\n// convert array to string\nvar buf2string = function (buf) {\n    var str, i, out, c, c_len;\n    var len = buf.length;\n\n    // Reserve max possible length (2 words per char)\n    // NB: by unknown reasons, Array is significantly faster for\n    //     String.fromCharCode.apply than Uint16Array.\n    var utf16buf = new Array(len*2);\n\n    for (out=0, i=0; i<len;) {\n        c = buf[i++];\n        // quick process ascii\n        if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n        c_len = _utf8len[c];\n        // skip 5 & 6 byte codes\n        if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len-1; continue; }\n\n        // apply mask on first byte\n        c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n        // join the rest\n        while (c_len > 1 && i < len) {\n            c = (c << 6) | (buf[i++] & 0x3f);\n            c_len--;\n        }\n\n        // terminated by end of string?\n        if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n        if (c < 0x10000) {\n            utf16buf[out++] = c;\n        } else {\n            c -= 0x10000;\n            utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n            utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n        }\n    }\n\n    // shrinkBuf(utf16buf, out)\n    if (utf16buf.length !== out) {\n        if(utf16buf.subarray) {\n            utf16buf = utf16buf.subarray(0, out);\n        } else {\n            utf16buf.length = out;\n        }\n    }\n\n    // return String.fromCharCode.apply(null, utf16buf);\n    return utils.applyFromCharCode(utf16buf);\n};\n\n\n// That's all for the pako functions.\n\n\n/**\n * Transform a javascript string into an array (typed if possible) of bytes,\n * UTF-8 encoded.\n * @param {String} str the string to encode\n * @return {Array|Uint8Array|Buffer} the UTF-8 encoded string.\n */\nexports.utf8encode = function utf8encode(str) {\n    if (support.nodebuffer) {\n        return nodejsUtils.newBufferFrom(str, \"utf-8\");\n    }\n\n    return string2buf(str);\n};\n\n\n/**\n * Transform a bytes array (or a representation) representing an UTF-8 encoded\n * string into a javascript string.\n * @param {Array|Uint8Array|Buffer} buf the data de decode\n * @return {String} the decoded string.\n */\nexports.utf8decode = function utf8decode(buf) {\n    if (support.nodebuffer) {\n        return utils.transformTo(\"nodebuffer\", buf).toString(\"utf-8\");\n    }\n\n    buf = utils.transformTo(support.uint8array ? \"uint8array\" : \"array\", buf);\n\n    return buf2string(buf);\n};\n\n/**\n * A worker to decode utf8 encoded binary chunks into string chunks.\n * @constructor\n */\nfunction Utf8DecodeWorker() {\n    GenericWorker.call(this, \"utf-8 decode\");\n    // the last bytes if a chunk didn't end with a complete codepoint.\n    this.leftOver = null;\n}\nutils.inherits(Utf8DecodeWorker, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nUtf8DecodeWorker.prototype.processChunk = function (chunk) {\n\n    var data = utils.transformTo(support.uint8array ? \"uint8array\" : \"array\", chunk.data);\n\n    // 1st step, re-use what's left of the previous chunk\n    if (this.leftOver && this.leftOver.length) {\n        if(support.uint8array) {\n            var previousData = data;\n            data = new Uint8Array(previousData.length + this.leftOver.length);\n            data.set(this.leftOver, 0);\n            data.set(previousData, this.leftOver.length);\n        } else {\n            data = this.leftOver.concat(data);\n        }\n        this.leftOver = null;\n    }\n\n    var nextBoundary = utf8border(data);\n    var usableData = data;\n    if (nextBoundary !== data.length) {\n        if (support.uint8array) {\n            usableData = data.subarray(0, nextBoundary);\n            this.leftOver = data.subarray(nextBoundary, data.length);\n        } else {\n            usableData = data.slice(0, nextBoundary);\n            this.leftOver = data.slice(nextBoundary, data.length);\n        }\n    }\n\n    this.push({\n        data : exports.utf8decode(usableData),\n        meta : chunk.meta\n    });\n};\n\n/**\n * @see GenericWorker.flush\n */\nUtf8DecodeWorker.prototype.flush = function () {\n    if(this.leftOver && this.leftOver.length) {\n        this.push({\n            data : exports.utf8decode(this.leftOver),\n            meta : {}\n        });\n        this.leftOver = null;\n    }\n};\nexports.Utf8DecodeWorker = Utf8DecodeWorker;\n\n/**\n * A worker to endcode string chunks into utf8 encoded binary chunks.\n * @constructor\n */\nfunction Utf8EncodeWorker() {\n    GenericWorker.call(this, \"utf-8 encode\");\n}\nutils.inherits(Utf8EncodeWorker, GenericWorker);\n\n/**\n * @see GenericWorker.processChunk\n */\nUtf8EncodeWorker.prototype.processChunk = function (chunk) {\n    this.push({\n        data : exports.utf8encode(chunk.data),\n        meta : chunk.meta\n    });\n};\nexports.Utf8EncodeWorker = Utf8EncodeWorker;\n","'use strict';\n\nvar support = require('./support');\nvar base64 = require('./base64');\nvar nodejsUtils = require('./nodejsUtils');\nvar setImmediate = require('core-js/library/fn/set-immediate');\nvar external = require(\"./external\");\n\n\n/**\n * Convert a string that pass as a \"binary string\": it should represent a byte\n * array but may have > 255 char codes. Be sure to take only the first byte\n * and returns the byte array.\n * @param {String} str the string to transform.\n * @return {Array|Uint8Array} the string in a binary format.\n */\nfunction string2binary(str) {\n    var result = null;\n    if (support.uint8array) {\n      result = new Uint8Array(str.length);\n    } else {\n      result = new Array(str.length);\n    }\n    return stringToArrayLike(str, result);\n}\n\n/**\n * Create a new blob with the given content and the given type.\n * @param {String|ArrayBuffer} part the content to put in the blob. DO NOT use\n * an Uint8Array because the stock browser of android 4 won't accept it (it\n * will be silently converted to a string, \"[object Uint8Array]\").\n *\n * Use only ONE part to build the blob to avoid a memory leak in IE11 / Edge:\n * when a large amount of Array is used to create the Blob, the amount of\n * memory consumed is nearly 100 times the original data amount.\n *\n * @param {String} type the mime type of the blob.\n * @return {Blob} the created blob.\n */\nexports.newBlob = function(part, type) {\n    exports.checkSupport(\"blob\");\n\n    try {\n        // Blob constructor\n        return new Blob([part], {\n            type: type\n        });\n    }\n    catch (e) {\n\n        try {\n            // deprecated, browser only, old way\n            var Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder;\n            var builder = new Builder();\n            builder.append(part);\n            return builder.getBlob(type);\n        }\n        catch (e) {\n\n            // well, fuck ?!\n            throw new Error(\"Bug : can't construct the Blob.\");\n        }\n    }\n\n\n};\n/**\n * The identity function.\n * @param {Object} input the input.\n * @return {Object} the same input.\n */\nfunction identity(input) {\n    return input;\n}\n\n/**\n * Fill in an array with a string.\n * @param {String} str the string to use.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to fill in (will be mutated).\n * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated array.\n */\nfunction stringToArrayLike(str, array) {\n    for (var i = 0; i < str.length; ++i) {\n        array[i] = str.charCodeAt(i) & 0xFF;\n    }\n    return array;\n}\n\n/**\n * An helper for the function arrayLikeToString.\n * This contains static informations and functions that\n * can be optimized by the browser JIT compiler.\n */\nvar arrayToStringHelper = {\n    /**\n     * Transform an array of int into a string, chunk by chunk.\n     * See the performances notes on arrayLikeToString.\n     * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.\n     * @param {String} type the type of the array.\n     * @param {Integer} chunk the chunk size.\n     * @return {String} the resulting string.\n     * @throws Error if the chunk is too big for the stack.\n     */\n    stringifyByChunk: function(array, type, chunk) {\n        var result = [], k = 0, len = array.length;\n        // shortcut\n        if (len <= chunk) {\n            return String.fromCharCode.apply(null, array);\n        }\n        while (k < len) {\n            if (type === \"array\" || type === \"nodebuffer\") {\n                result.push(String.fromCharCode.apply(null, array.slice(k, Math.min(k + chunk, len))));\n            }\n            else {\n                result.push(String.fromCharCode.apply(null, array.subarray(k, Math.min(k + chunk, len))));\n            }\n            k += chunk;\n        }\n        return result.join(\"\");\n    },\n    /**\n     * Call String.fromCharCode on every item in the array.\n     * This is the naive implementation, which generate A LOT of intermediate string.\n     * This should be used when everything else fail.\n     * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.\n     * @return {String} the result.\n     */\n    stringifyByChar: function(array){\n        var resultStr = \"\";\n        for(var i = 0; i < array.length; i++) {\n            resultStr += String.fromCharCode(array[i]);\n        }\n        return resultStr;\n    },\n    applyCanBeUsed : {\n        /**\n         * true if the browser accepts to use String.fromCharCode on Uint8Array\n         */\n        uint8array : (function () {\n            try {\n                return support.uint8array && String.fromCharCode.apply(null, new Uint8Array(1)).length === 1;\n            } catch (e) {\n                return false;\n            }\n        })(),\n        /**\n         * true if the browser accepts to use String.fromCharCode on nodejs Buffer.\n         */\n        nodebuffer : (function () {\n            try {\n                return support.nodebuffer && String.fromCharCode.apply(null, nodejsUtils.allocBuffer(1)).length === 1;\n            } catch (e) {\n                return false;\n            }\n        })()\n    }\n};\n\n/**\n * Transform an array-like object to a string.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.\n * @return {String} the result.\n */\nfunction arrayLikeToString(array) {\n    // Performances notes :\n    // --------------------\n    // String.fromCharCode.apply(null, array) is the fastest, see\n    // see http://jsperf.com/converting-a-uint8array-to-a-string/2\n    // but the stack is limited (and we can get huge arrays !).\n    //\n    // result += String.fromCharCode(array[i]); generate too many strings !\n    //\n    // This code is inspired by http://jsperf.com/arraybuffer-to-string-apply-performance/2\n    // TODO : we now have workers that split the work. Do we still need that ?\n    var chunk = 65536,\n        type = exports.getTypeOf(array),\n        canUseApply = true;\n    if (type === \"uint8array\") {\n        canUseApply = arrayToStringHelper.applyCanBeUsed.uint8array;\n    } else if (type === \"nodebuffer\") {\n        canUseApply = arrayToStringHelper.applyCanBeUsed.nodebuffer;\n    }\n\n    if (canUseApply) {\n        while (chunk > 1) {\n            try {\n                return arrayToStringHelper.stringifyByChunk(array, type, chunk);\n            } catch (e) {\n                chunk = Math.floor(chunk / 2);\n            }\n        }\n    }\n\n    // no apply or chunk error : slow and painful algorithm\n    // default browser on android 4.*\n    return arrayToStringHelper.stringifyByChar(array);\n}\n\nexports.applyFromCharCode = arrayLikeToString;\n\n\n/**\n * Copy the data from an array-like to an other array-like.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayFrom the origin array.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayTo the destination array which will be mutated.\n * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated destination array.\n */\nfunction arrayLikeToArrayLike(arrayFrom, arrayTo) {\n    for (var i = 0; i < arrayFrom.length; i++) {\n        arrayTo[i] = arrayFrom[i];\n    }\n    return arrayTo;\n}\n\n// a matrix containing functions to transform everything into everything.\nvar transform = {};\n\n// string to ?\ntransform[\"string\"] = {\n    \"string\": identity,\n    \"array\": function(input) {\n        return stringToArrayLike(input, new Array(input.length));\n    },\n    \"arraybuffer\": function(input) {\n        return transform[\"string\"][\"uint8array\"](input).buffer;\n    },\n    \"uint8array\": function(input) {\n        return stringToArrayLike(input, new Uint8Array(input.length));\n    },\n    \"nodebuffer\": function(input) {\n        return stringToArrayLike(input, nodejsUtils.allocBuffer(input.length));\n    }\n};\n\n// array to ?\ntransform[\"array\"] = {\n    \"string\": arrayLikeToString,\n    \"array\": identity,\n    \"arraybuffer\": function(input) {\n        return (new Uint8Array(input)).buffer;\n    },\n    \"uint8array\": function(input) {\n        return new Uint8Array(input);\n    },\n    \"nodebuffer\": function(input) {\n        return nodejsUtils.newBufferFrom(input);\n    }\n};\n\n// arraybuffer to ?\ntransform[\"arraybuffer\"] = {\n    \"string\": function(input) {\n        return arrayLikeToString(new Uint8Array(input));\n    },\n    \"array\": function(input) {\n        return arrayLikeToArrayLike(new Uint8Array(input), new Array(input.byteLength));\n    },\n    \"arraybuffer\": identity,\n    \"uint8array\": function(input) {\n        return new Uint8Array(input);\n    },\n    \"nodebuffer\": function(input) {\n        return nodejsUtils.newBufferFrom(new Uint8Array(input));\n    }\n};\n\n// uint8array to ?\ntransform[\"uint8array\"] = {\n    \"string\": arrayLikeToString,\n    \"array\": function(input) {\n        return arrayLikeToArrayLike(input, new Array(input.length));\n    },\n    \"arraybuffer\": function(input) {\n        return input.buffer;\n    },\n    \"uint8array\": identity,\n    \"nodebuffer\": function(input) {\n        return nodejsUtils.newBufferFrom(input);\n    }\n};\n\n// nodebuffer to ?\ntransform[\"nodebuffer\"] = {\n    \"string\": arrayLikeToString,\n    \"array\": function(input) {\n        return arrayLikeToArrayLike(input, new Array(input.length));\n    },\n    \"arraybuffer\": function(input) {\n        return transform[\"nodebuffer\"][\"uint8array\"](input).buffer;\n    },\n    \"uint8array\": function(input) {\n        return arrayLikeToArrayLike(input, new Uint8Array(input.length));\n    },\n    \"nodebuffer\": identity\n};\n\n/**\n * Transform an input into any type.\n * The supported output type are : string, array, uint8array, arraybuffer, nodebuffer.\n * If no output type is specified, the unmodified input will be returned.\n * @param {String} outputType the output type.\n * @param {String|Array|ArrayBuffer|Uint8Array|Buffer} input the input to convert.\n * @throws {Error} an Error if the browser doesn't support the requested output type.\n */\nexports.transformTo = function(outputType, input) {\n    if (!input) {\n        // undefined, null, etc\n        // an empty string won't harm.\n        input = \"\";\n    }\n    if (!outputType) {\n        return input;\n    }\n    exports.checkSupport(outputType);\n    var inputType = exports.getTypeOf(input);\n    var result = transform[inputType][outputType](input);\n    return result;\n};\n\n/**\n * Return the type of the input.\n * The type will be in a format valid for JSZip.utils.transformTo : string, array, uint8array, arraybuffer.\n * @param {Object} input the input to identify.\n * @return {String} the (lowercase) type of the input.\n */\nexports.getTypeOf = function(input) {\n    if (typeof input === \"string\") {\n        return \"string\";\n    }\n    if (Object.prototype.toString.call(input) === \"[object Array]\") {\n        return \"array\";\n    }\n    if (support.nodebuffer && nodejsUtils.isBuffer(input)) {\n        return \"nodebuffer\";\n    }\n    if (support.uint8array && input instanceof Uint8Array) {\n        return \"uint8array\";\n    }\n    if (support.arraybuffer && input instanceof ArrayBuffer) {\n        return \"arraybuffer\";\n    }\n};\n\n/**\n * Throw an exception if the type is not supported.\n * @param {String} type the type to check.\n * @throws {Error} an Error if the browser doesn't support the requested type.\n */\nexports.checkSupport = function(type) {\n    var supported = support[type.toLowerCase()];\n    if (!supported) {\n        throw new Error(type + \" is not supported by this platform\");\n    }\n};\n\nexports.MAX_VALUE_16BITS = 65535;\nexports.MAX_VALUE_32BITS = -1; // well, \"\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\" is parsed as -1\n\n/**\n * Prettify a string read as binary.\n * @param {string} str the string to prettify.\n * @return {string} a pretty string.\n */\nexports.pretty = function(str) {\n    var res = '',\n        code, i;\n    for (i = 0; i < (str || \"\").length; i++) {\n        code = str.charCodeAt(i);\n        res += '\\\\x' + (code < 16 ? \"0\" : \"\") + code.toString(16).toUpperCase();\n    }\n    return res;\n};\n\n/**\n * Defer the call of a function.\n * @param {Function} callback the function to call asynchronously.\n * @param {Array} args the arguments to give to the callback.\n */\nexports.delay = function(callback, args, self) {\n    setImmediate(function () {\n        callback.apply(self || null, args || []);\n    });\n};\n\n/**\n * Extends a prototype with an other, without calling a constructor with\n * side effects. Inspired by nodejs' `utils.inherits`\n * @param {Function} ctor the constructor to augment\n * @param {Function} superCtor the parent constructor to use\n */\nexports.inherits = function (ctor, superCtor) {\n    var Obj = function() {};\n    Obj.prototype = superCtor.prototype;\n    ctor.prototype = new Obj();\n};\n\n/**\n * Merge the objects passed as parameters into a new one.\n * @private\n * @param {...Object} var_args All objects to merge.\n * @return {Object} a new object with the data of the others.\n */\nexports.extend = function() {\n    var result = {}, i, attr;\n    for (i = 0; i < arguments.length; i++) { // arguments is not enumerable in some browsers\n        for (attr in arguments[i]) {\n            if (arguments[i].hasOwnProperty(attr) && typeof result[attr] === \"undefined\") {\n                result[attr] = arguments[i][attr];\n            }\n        }\n    }\n    return result;\n};\n\n/**\n * Transform arbitrary content into a Promise.\n * @param {String} name a name for the content being processed.\n * @param {Object} inputData the content to process.\n * @param {Boolean} isBinary true if the content is not an unicode string\n * @param {Boolean} isOptimizedBinaryString true if the string content only has one byte per character.\n * @param {Boolean} isBase64 true if the string content is encoded with base64.\n * @return {Promise} a promise in a format usable by JSZip.\n */\nexports.prepareContent = function(name, inputData, isBinary, isOptimizedBinaryString, isBase64) {\n\n    // if inputData is already a promise, this flatten it.\n    var promise = external.Promise.resolve(inputData).then(function(data) {\n        \n        \n        var isBlob = support.blob && (data instanceof Blob || ['[object File]', '[object Blob]'].indexOf(Object.prototype.toString.call(data)) !== -1);\n\n        if (isBlob && typeof FileReader !== \"undefined\") {\n            return new external.Promise(function (resolve, reject) {\n                var reader = new FileReader();\n\n                reader.onload = function(e) {\n                    resolve(e.target.result);\n                };\n                reader.onerror = function(e) {\n                    reject(e.target.error);\n                };\n                reader.readAsArrayBuffer(data);\n            });\n        } else {\n            return data;\n        }\n    });\n\n    return promise.then(function(data) {\n        var dataType = exports.getTypeOf(data);\n\n        if (!dataType) {\n            return external.Promise.reject(\n                new Error(\"Can't read the data of '\" + name + \"'. Is it \" +\n                          \"in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?\")\n            );\n        }\n        // special case : it's way easier to work with Uint8Array than with ArrayBuffer\n        if (dataType === \"arraybuffer\") {\n            data = exports.transformTo(\"uint8array\", data);\n        } else if (dataType === \"string\") {\n            if (isBase64) {\n                data = base64.decode(data);\n            }\n            else if (isBinary) {\n                // optimizedBinaryString === true means that the file has already been filtered with a 0xFF mask\n                if (isOptimizedBinaryString !== true) {\n                    // this is a string, not in a base64 format.\n                    // Be sure that this is a correct \"binary string\"\n                    data = string2binary(data);\n                }\n            }\n        }\n        return data;\n    });\n};\n","'use strict';\nvar readerFor = require('./reader/readerFor');\nvar utils = require('./utils');\nvar sig = require('./signature');\nvar ZipEntry = require('./zipEntry');\nvar utf8 = require('./utf8');\nvar support = require('./support');\n//  class ZipEntries {{{\n/**\n * All the entries in the zip file.\n * @constructor\n * @param {Object} loadOptions Options for loading the stream.\n */\nfunction ZipEntries(loadOptions) {\n    this.files = [];\n    this.loadOptions = loadOptions;\n}\nZipEntries.prototype = {\n    /**\n     * Check that the reader is on the specified signature.\n     * @param {string} expectedSignature the expected signature.\n     * @throws {Error} if it is an other signature.\n     */\n    checkSignature: function(expectedSignature) {\n        if (!this.reader.readAndCheckSignature(expectedSignature)) {\n            this.reader.index -= 4;\n            var signature = this.reader.readString(4);\n            throw new Error(\"Corrupted zip or bug: unexpected signature \" + \"(\" + utils.pretty(signature) + \", expected \" + utils.pretty(expectedSignature) + \")\");\n        }\n    },\n    /**\n     * Check if the given signature is at the given index.\n     * @param {number} askedIndex the index to check.\n     * @param {string} expectedSignature the signature to expect.\n     * @return {boolean} true if the signature is here, false otherwise.\n     */\n    isSignature: function(askedIndex, expectedSignature) {\n        var currentIndex = this.reader.index;\n        this.reader.setIndex(askedIndex);\n        var signature = this.reader.readString(4);\n        var result = signature === expectedSignature;\n        this.reader.setIndex(currentIndex);\n        return result;\n    },\n    /**\n     * Read the end of the central directory.\n     */\n    readBlockEndOfCentral: function() {\n        this.diskNumber = this.reader.readInt(2);\n        this.diskWithCentralDirStart = this.reader.readInt(2);\n        this.centralDirRecordsOnThisDisk = this.reader.readInt(2);\n        this.centralDirRecords = this.reader.readInt(2);\n        this.centralDirSize = this.reader.readInt(4);\n        this.centralDirOffset = this.reader.readInt(4);\n\n        this.zipCommentLength = this.reader.readInt(2);\n        // warning : the encoding depends of the system locale\n        // On a linux machine with LANG=en_US.utf8, this field is utf8 encoded.\n        // On a windows machine, this field is encoded with the localized windows code page.\n        var zipComment = this.reader.readData(this.zipCommentLength);\n        var decodeParamType = support.uint8array ? \"uint8array\" : \"array\";\n        // To get consistent behavior with the generation part, we will assume that\n        // this is utf8 encoded unless specified otherwise.\n        var decodeContent = utils.transformTo(decodeParamType, zipComment);\n        this.zipComment = this.loadOptions.decodeFileName(decodeContent);\n    },\n    /**\n     * Read the end of the Zip 64 central directory.\n     * Not merged with the method readEndOfCentral :\n     * The end of central can coexist with its Zip64 brother,\n     * I don't want to read the wrong number of bytes !\n     */\n    readBlockZip64EndOfCentral: function() {\n        this.zip64EndOfCentralSize = this.reader.readInt(8);\n        this.reader.skip(4);\n        // this.versionMadeBy = this.reader.readString(2);\n        // this.versionNeeded = this.reader.readInt(2);\n        this.diskNumber = this.reader.readInt(4);\n        this.diskWithCentralDirStart = this.reader.readInt(4);\n        this.centralDirRecordsOnThisDisk = this.reader.readInt(8);\n        this.centralDirRecords = this.reader.readInt(8);\n        this.centralDirSize = this.reader.readInt(8);\n        this.centralDirOffset = this.reader.readInt(8);\n\n        this.zip64ExtensibleData = {};\n        var extraDataSize = this.zip64EndOfCentralSize - 44,\n            index = 0,\n            extraFieldId,\n            extraFieldLength,\n            extraFieldValue;\n        while (index < extraDataSize) {\n            extraFieldId = this.reader.readInt(2);\n            extraFieldLength = this.reader.readInt(4);\n            extraFieldValue = this.reader.readData(extraFieldLength);\n            this.zip64ExtensibleData[extraFieldId] = {\n                id: extraFieldId,\n                length: extraFieldLength,\n                value: extraFieldValue\n            };\n        }\n    },\n    /**\n     * Read the end of the Zip 64 central directory locator.\n     */\n    readBlockZip64EndOfCentralLocator: function() {\n        this.diskWithZip64CentralDirStart = this.reader.readInt(4);\n        this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8);\n        this.disksCount = this.reader.readInt(4);\n        if (this.disksCount > 1) {\n            throw new Error(\"Multi-volumes zip are not supported\");\n        }\n    },\n    /**\n     * Read the local files, based on the offset read in the central part.\n     */\n    readLocalFiles: function() {\n        var i, file;\n        for (i = 0; i < this.files.length; i++) {\n            file = this.files[i];\n            this.reader.setIndex(file.localHeaderOffset);\n            this.checkSignature(sig.LOCAL_FILE_HEADER);\n            file.readLocalPart(this.reader);\n            file.handleUTF8();\n            file.processAttributes();\n        }\n    },\n    /**\n     * Read the central directory.\n     */\n    readCentralDir: function() {\n        var file;\n\n        this.reader.setIndex(this.centralDirOffset);\n        while (this.reader.readAndCheckSignature(sig.CENTRAL_FILE_HEADER)) {\n            file = new ZipEntry({\n                zip64: this.zip64\n            }, this.loadOptions);\n            file.readCentralPart(this.reader);\n            this.files.push(file);\n        }\n\n        if (this.centralDirRecords !== this.files.length) {\n            if (this.centralDirRecords !== 0 && this.files.length === 0) {\n                // We expected some records but couldn't find ANY.\n                // This is really suspicious, as if something went wrong.\n                throw new Error(\"Corrupted zip or bug: expected \" + this.centralDirRecords + \" records in central dir, got \" + this.files.length);\n            } else {\n                // We found some records but not all.\n                // Something is wrong but we got something for the user: no error here.\n                // console.warn(\"expected\", this.centralDirRecords, \"records in central dir, got\", this.files.length);\n            }\n        }\n    },\n    /**\n     * Read the end of central directory.\n     */\n    readEndOfCentral: function() {\n        var offset = this.reader.lastIndexOfSignature(sig.CENTRAL_DIRECTORY_END);\n        if (offset < 0) {\n            // Check if the content is a truncated zip or complete garbage.\n            // A \"LOCAL_FILE_HEADER\" is not required at the beginning (auto\n            // extractible zip for example) but it can give a good hint.\n            // If an ajax request was used without responseType, we will also\n            // get unreadable data.\n            var isGarbage = !this.isSignature(0, sig.LOCAL_FILE_HEADER);\n\n            if (isGarbage) {\n                throw new Error(\"Can't find end of central directory : is this a zip file ? \" +\n                                \"If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html\");\n            } else {\n                throw new Error(\"Corrupted zip: can't find end of central directory\");\n            }\n\n        }\n        this.reader.setIndex(offset);\n        var endOfCentralDirOffset = offset;\n        this.checkSignature(sig.CENTRAL_DIRECTORY_END);\n        this.readBlockEndOfCentral();\n\n\n        /* extract from the zip spec :\n            4)  If one of the fields in the end of central directory\n                record is too small to hold required data, the field\n                should be set to -1 (0xFFFF or 0xFFFFFFFF) and the\n                ZIP64 format record should be created.\n            5)  The end of central directory record and the\n                Zip64 end of central directory locator record must\n                reside on the same disk when splitting or spanning\n                an archive.\n         */\n        if (this.diskNumber === utils.MAX_VALUE_16BITS || this.diskWithCentralDirStart === utils.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === utils.MAX_VALUE_16BITS || this.centralDirRecords === utils.MAX_VALUE_16BITS || this.centralDirSize === utils.MAX_VALUE_32BITS || this.centralDirOffset === utils.MAX_VALUE_32BITS) {\n            this.zip64 = true;\n\n            /*\n            Warning : the zip64 extension is supported, but ONLY if the 64bits integer read from\n            the zip file can fit into a 32bits integer. This cannot be solved : JavaScript represents\n            all numbers as 64-bit double precision IEEE 754 floating point numbers.\n            So, we have 53bits for integers and bitwise operations treat everything as 32bits.\n            see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/Bitwise_Operators\n            and http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf section 8.5\n            */\n\n            // should look for a zip64 EOCD locator\n            offset = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR);\n            if (offset < 0) {\n                throw new Error(\"Corrupted zip: can't find the ZIP64 end of central directory locator\");\n            }\n            this.reader.setIndex(offset);\n            this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR);\n            this.readBlockZip64EndOfCentralLocator();\n\n            // now the zip64 EOCD record\n            if (!this.isSignature(this.relativeOffsetEndOfZip64CentralDir, sig.ZIP64_CENTRAL_DIRECTORY_END)) {\n                // console.warn(\"ZIP64 end of central directory not where expected.\");\n                this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_END);\n                if (this.relativeOffsetEndOfZip64CentralDir < 0) {\n                    throw new Error(\"Corrupted zip: can't find the ZIP64 end of central directory\");\n                }\n            }\n            this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir);\n            this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_END);\n            this.readBlockZip64EndOfCentral();\n        }\n\n        var expectedEndOfCentralDirOffset = this.centralDirOffset + this.centralDirSize;\n        if (this.zip64) {\n            expectedEndOfCentralDirOffset += 20; // end of central dir 64 locator\n            expectedEndOfCentralDirOffset += 12 /* should not include the leading 12 bytes */ + this.zip64EndOfCentralSize;\n        }\n\n        var extraBytes = endOfCentralDirOffset - expectedEndOfCentralDirOffset;\n\n        if (extraBytes > 0) {\n            // console.warn(extraBytes, \"extra bytes at beginning or within zipfile\");\n            if (this.isSignature(endOfCentralDirOffset, sig.CENTRAL_FILE_HEADER)) {\n                // The offsets seem wrong, but we have something at the specified offset.\n                // So… we keep it.\n            } else {\n                // the offset is wrong, update the \"zero\" of the reader\n                // this happens if data has been prepended (crx files for example)\n                this.reader.zero = extraBytes;\n            }\n        } else if (extraBytes < 0) {\n            throw new Error(\"Corrupted zip: missing \" + Math.abs(extraBytes) + \" bytes.\");\n        }\n    },\n    prepareReader: function(data) {\n        this.reader = readerFor(data);\n    },\n    /**\n     * Read a zip file and create ZipEntries.\n     * @param {String|ArrayBuffer|Uint8Array|Buffer} data the binary string representing a zip file.\n     */\n    load: function(data) {\n        this.prepareReader(data);\n        this.readEndOfCentral();\n        this.readCentralDir();\n        this.readLocalFiles();\n    }\n};\n// }}} end of ZipEntries\nmodule.exports = ZipEntries;\n","'use strict';\nvar readerFor = require('./reader/readerFor');\nvar utils = require('./utils');\nvar CompressedObject = require('./compressedObject');\nvar crc32fn = require('./crc32');\nvar utf8 = require('./utf8');\nvar compressions = require('./compressions');\nvar support = require('./support');\n\nvar MADE_BY_DOS = 0x00;\nvar MADE_BY_UNIX = 0x03;\n\n/**\n * Find a compression registered in JSZip.\n * @param {string} compressionMethod the method magic to find.\n * @return {Object|null} the JSZip compression object, null if none found.\n */\nvar findCompression = function(compressionMethod) {\n    for (var method in compressions) {\n        if (!compressions.hasOwnProperty(method)) {\n            continue;\n        }\n        if (compressions[method].magic === compressionMethod) {\n            return compressions[method];\n        }\n    }\n    return null;\n};\n\n// class ZipEntry {{{\n/**\n * An entry in the zip file.\n * @constructor\n * @param {Object} options Options of the current file.\n * @param {Object} loadOptions Options for loading the stream.\n */\nfunction ZipEntry(options, loadOptions) {\n    this.options = options;\n    this.loadOptions = loadOptions;\n}\nZipEntry.prototype = {\n    /**\n     * say if the file is encrypted.\n     * @return {boolean} true if the file is encrypted, false otherwise.\n     */\n    isEncrypted: function() {\n        // bit 1 is set\n        return (this.bitFlag & 0x0001) === 0x0001;\n    },\n    /**\n     * say if the file has utf-8 filename/comment.\n     * @return {boolean} true if the filename/comment is in utf-8, false otherwise.\n     */\n    useUTF8: function() {\n        // bit 11 is set\n        return (this.bitFlag & 0x0800) === 0x0800;\n    },\n    /**\n     * Read the local part of a zip file and add the info in this object.\n     * @param {DataReader} reader the reader to use.\n     */\n    readLocalPart: function(reader) {\n        var compression, localExtraFieldsLength;\n\n        // we already know everything from the central dir !\n        // If the central dir data are false, we are doomed.\n        // On the bright side, the local part is scary  : zip64, data descriptors, both, etc.\n        // The less data we get here, the more reliable this should be.\n        // Let's skip the whole header and dash to the data !\n        reader.skip(22);\n        // in some zip created on windows, the filename stored in the central dir contains \\ instead of /.\n        // Strangely, the filename here is OK.\n        // I would love to treat these zip files as corrupted (see http://www.info-zip.org/FAQ.html#backslashes\n        // or APPNOTE#4.4.17.1, \"All slashes MUST be forward slashes '/'\") but there are a lot of bad zip generators...\n        // Search \"unzip mismatching \"local\" filename continuing with \"central\" filename version\" on\n        // the internet.\n        //\n        // I think I see the logic here : the central directory is used to display\n        // content and the local directory is used to extract the files. Mixing / and \\\n        // may be used to display \\ to windows users and use / when extracting the files.\n        // Unfortunately, this lead also to some issues : http://seclists.org/fulldisclosure/2009/Sep/394\n        this.fileNameLength = reader.readInt(2);\n        localExtraFieldsLength = reader.readInt(2); // can't be sure this will be the same as the central dir\n        // the fileName is stored as binary data, the handleUTF8 method will take care of the encoding.\n        this.fileName = reader.readData(this.fileNameLength);\n        reader.skip(localExtraFieldsLength);\n\n        if (this.compressedSize === -1 || this.uncompressedSize === -1) {\n            throw new Error(\"Bug or corrupted zip : didn't get enough informations from the central directory \" + \"(compressedSize === -1 || uncompressedSize === -1)\");\n        }\n\n        compression = findCompression(this.compressionMethod);\n        if (compression === null) { // no compression found\n            throw new Error(\"Corrupted zip : compression \" + utils.pretty(this.compressionMethod) + \" unknown (inner file : \" + utils.transformTo(\"string\", this.fileName) + \")\");\n        }\n        this.decompressed = new CompressedObject(this.compressedSize, this.uncompressedSize, this.crc32, compression, reader.readData(this.compressedSize));\n    },\n\n    /**\n     * Read the central part of a zip file and add the info in this object.\n     * @param {DataReader} reader the reader to use.\n     */\n    readCentralPart: function(reader) {\n        this.versionMadeBy = reader.readInt(2);\n        reader.skip(2);\n        // this.versionNeeded = reader.readInt(2);\n        this.bitFlag = reader.readInt(2);\n        this.compressionMethod = reader.readString(2);\n        this.date = reader.readDate();\n        this.crc32 = reader.readInt(4);\n        this.compressedSize = reader.readInt(4);\n        this.uncompressedSize = reader.readInt(4);\n        var fileNameLength = reader.readInt(2);\n        this.extraFieldsLength = reader.readInt(2);\n        this.fileCommentLength = reader.readInt(2);\n        this.diskNumberStart = reader.readInt(2);\n        this.internalFileAttributes = reader.readInt(2);\n        this.externalFileAttributes = reader.readInt(4);\n        this.localHeaderOffset = reader.readInt(4);\n\n        if (this.isEncrypted()) {\n            throw new Error(\"Encrypted zip are not supported\");\n        }\n\n        // will be read in the local part, see the comments there\n        reader.skip(fileNameLength);\n        this.readExtraFields(reader);\n        this.parseZIP64ExtraField(reader);\n        this.fileComment = reader.readData(this.fileCommentLength);\n    },\n\n    /**\n     * Parse the external file attributes and get the unix/dos permissions.\n     */\n    processAttributes: function () {\n        this.unixPermissions = null;\n        this.dosPermissions = null;\n        var madeBy = this.versionMadeBy >> 8;\n\n        // Check if we have the DOS directory flag set.\n        // We look for it in the DOS and UNIX permissions\n        // but some unknown platform could set it as a compatibility flag.\n        this.dir = this.externalFileAttributes & 0x0010 ? true : false;\n\n        if(madeBy === MADE_BY_DOS) {\n            // first 6 bits (0 to 5)\n            this.dosPermissions = this.externalFileAttributes & 0x3F;\n        }\n\n        if(madeBy === MADE_BY_UNIX) {\n            this.unixPermissions = (this.externalFileAttributes >> 16) & 0xFFFF;\n            // the octal permissions are in (this.unixPermissions & 0x01FF).toString(8);\n        }\n\n        // fail safe : if the name ends with a / it probably means a folder\n        if (!this.dir && this.fileNameStr.slice(-1) === '/') {\n            this.dir = true;\n        }\n    },\n\n    /**\n     * Parse the ZIP64 extra field and merge the info in the current ZipEntry.\n     * @param {DataReader} reader the reader to use.\n     */\n    parseZIP64ExtraField: function(reader) {\n\n        if (!this.extraFields[0x0001]) {\n            return;\n        }\n\n        // should be something, preparing the extra reader\n        var extraReader = readerFor(this.extraFields[0x0001].value);\n\n        // I really hope that these 64bits integer can fit in 32 bits integer, because js\n        // won't let us have more.\n        if (this.uncompressedSize === utils.MAX_VALUE_32BITS) {\n            this.uncompressedSize = extraReader.readInt(8);\n        }\n        if (this.compressedSize === utils.MAX_VALUE_32BITS) {\n            this.compressedSize = extraReader.readInt(8);\n        }\n        if (this.localHeaderOffset === utils.MAX_VALUE_32BITS) {\n            this.localHeaderOffset = extraReader.readInt(8);\n        }\n        if (this.diskNumberStart === utils.MAX_VALUE_32BITS) {\n            this.diskNumberStart = extraReader.readInt(4);\n        }\n    },\n    /**\n     * Read the central part of a zip file and add the info in this object.\n     * @param {DataReader} reader the reader to use.\n     */\n    readExtraFields: function(reader) {\n        var end = reader.index + this.extraFieldsLength,\n            extraFieldId,\n            extraFieldLength,\n            extraFieldValue;\n\n        if (!this.extraFields) {\n            this.extraFields = {};\n        }\n\n        while (reader.index < end) {\n            extraFieldId = reader.readInt(2);\n            extraFieldLength = reader.readInt(2);\n            extraFieldValue = reader.readData(extraFieldLength);\n\n            this.extraFields[extraFieldId] = {\n                id: extraFieldId,\n                length: extraFieldLength,\n                value: extraFieldValue\n            };\n        }\n    },\n    /**\n     * Apply an UTF8 transformation if needed.\n     */\n    handleUTF8: function() {\n        var decodeParamType = support.uint8array ? \"uint8array\" : \"array\";\n        if (this.useUTF8()) {\n            this.fileNameStr = utf8.utf8decode(this.fileName);\n            this.fileCommentStr = utf8.utf8decode(this.fileComment);\n        } else {\n            var upath = this.findExtraFieldUnicodePath();\n            if (upath !== null) {\n                this.fileNameStr = upath;\n            } else {\n                // ASCII text or unsupported code page\n                var fileNameByteArray =  utils.transformTo(decodeParamType, this.fileName);\n                this.fileNameStr = this.loadOptions.decodeFileName(fileNameByteArray);\n            }\n\n            var ucomment = this.findExtraFieldUnicodeComment();\n            if (ucomment !== null) {\n                this.fileCommentStr = ucomment;\n            } else {\n                // ASCII text or unsupported code page\n                var commentByteArray =  utils.transformTo(decodeParamType, this.fileComment);\n                this.fileCommentStr = this.loadOptions.decodeFileName(commentByteArray);\n            }\n        }\n    },\n\n    /**\n     * Find the unicode path declared in the extra field, if any.\n     * @return {String} the unicode path, null otherwise.\n     */\n    findExtraFieldUnicodePath: function() {\n        var upathField = this.extraFields[0x7075];\n        if (upathField) {\n            var extraReader = readerFor(upathField.value);\n\n            // wrong version\n            if (extraReader.readInt(1) !== 1) {\n                return null;\n            }\n\n            // the crc of the filename changed, this field is out of date.\n            if (crc32fn(this.fileName) !== extraReader.readInt(4)) {\n                return null;\n            }\n\n            return utf8.utf8decode(extraReader.readData(upathField.length - 5));\n        }\n        return null;\n    },\n\n    /**\n     * Find the unicode comment declared in the extra field, if any.\n     * @return {String} the unicode comment, null otherwise.\n     */\n    findExtraFieldUnicodeComment: function() {\n        var ucommentField = this.extraFields[0x6375];\n        if (ucommentField) {\n            var extraReader = readerFor(ucommentField.value);\n\n            // wrong version\n            if (extraReader.readInt(1) !== 1) {\n                return null;\n            }\n\n            // the crc of the comment changed, this field is out of date.\n            if (crc32fn(this.fileComment) !== extraReader.readInt(4)) {\n                return null;\n            }\n\n            return utf8.utf8decode(extraReader.readData(ucommentField.length - 5));\n        }\n        return null;\n    }\n};\nmodule.exports = ZipEntry;\n","'use strict';\n\nvar StreamHelper = require('./stream/StreamHelper');\nvar DataWorker = require('./stream/DataWorker');\nvar utf8 = require('./utf8');\nvar CompressedObject = require('./compressedObject');\nvar GenericWorker = require('./stream/GenericWorker');\n\n/**\n * A simple object representing a file in the zip file.\n * @constructor\n * @param {string} name the name of the file\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data\n * @param {Object} options the options of the file\n */\nvar ZipObject = function(name, data, options) {\n    this.name = name;\n    this.dir = options.dir;\n    this.date = options.date;\n    this.comment = options.comment;\n    this.unixPermissions = options.unixPermissions;\n    this.dosPermissions = options.dosPermissions;\n\n    this._data = data;\n    this._dataBinary = options.binary;\n    // keep only the compression\n    this.options = {\n        compression : options.compression,\n        compressionOptions : options.compressionOptions\n    };\n};\n\nZipObject.prototype = {\n    /**\n     * Create an internal stream for the content of this object.\n     * @param {String} type the type of each chunk.\n     * @return StreamHelper the stream.\n     */\n    internalStream: function (type) {\n        var result = null, outputType = \"string\";\n        try {\n            if (!type) {\n                throw new Error(\"No output type specified.\");\n            }\n            outputType = type.toLowerCase();\n            var askUnicodeString = outputType === \"string\" || outputType === \"text\";\n            if (outputType === \"binarystring\" || outputType === \"text\") {\n                outputType = \"string\";\n            }\n            result = this._decompressWorker();\n\n            var isUnicodeString = !this._dataBinary;\n\n            if (isUnicodeString && !askUnicodeString) {\n                result = result.pipe(new utf8.Utf8EncodeWorker());\n            }\n            if (!isUnicodeString && askUnicodeString) {\n                result = result.pipe(new utf8.Utf8DecodeWorker());\n            }\n        } catch (e) {\n            result = new GenericWorker(\"error\");\n            result.error(e);\n        }\n\n        return new StreamHelper(result, outputType, \"\");\n    },\n\n    /**\n     * Prepare the content in the asked type.\n     * @param {String} type the type of the result.\n     * @param {Function} onUpdate a function to call on each internal update.\n     * @return Promise the promise of the result.\n     */\n    async: function (type, onUpdate) {\n        return this.internalStream(type).accumulate(onUpdate);\n    },\n\n    /**\n     * Prepare the content as a nodejs stream.\n     * @param {String} type the type of each chunk.\n     * @param {Function} onUpdate a function to call on each internal update.\n     * @return Stream the stream.\n     */\n    nodeStream: function (type, onUpdate) {\n        return this.internalStream(type || \"nodebuffer\").toNodejsStream(onUpdate);\n    },\n\n    /**\n     * Return a worker for the compressed content.\n     * @private\n     * @param {Object} compression the compression object to use.\n     * @param {Object} compressionOptions the options to use when compressing.\n     * @return Worker the worker.\n     */\n    _compressWorker: function (compression, compressionOptions) {\n        if (\n            this._data instanceof CompressedObject &&\n            this._data.compression.magic === compression.magic\n        ) {\n            return this._data.getCompressedWorker();\n        } else {\n            var result = this._decompressWorker();\n            if(!this._dataBinary) {\n                result = result.pipe(new utf8.Utf8EncodeWorker());\n            }\n            return CompressedObject.createWorkerFrom(result, compression, compressionOptions);\n        }\n    },\n    /**\n     * Return a worker for the decompressed content.\n     * @private\n     * @return Worker the worker.\n     */\n    _decompressWorker : function () {\n        if (this._data instanceof CompressedObject) {\n            return this._data.getContentWorker();\n        } else if (this._data instanceof GenericWorker) {\n            return this._data;\n        } else {\n            return new DataWorker(this._data);\n        }\n    }\n};\n\nvar removedMethods = [\"asText\", \"asBinary\", \"asNodeBuffer\", \"asUint8Array\", \"asArrayBuffer\"];\nvar removedFn = function () {\n    throw new Error(\"This method has been removed in JSZip 3.0, please check the upgrade guide.\");\n};\n\nfor(var i = 0; i < removedMethods.length; i++) {\n    ZipObject.prototype[removedMethods[i]] = removedFn;\n}\nmodule.exports = ZipObject;\n","require('../modules/web.immediate');\nmodule.exports = require('../modules/_core').setImmediate;","module.exports = function(it){\n  if(typeof it != 'function')throw TypeError(it + ' is not a function!');\n  return it;\n};","var isObject = require('./_is-object');\nmodule.exports = function(it){\n  if(!isObject(it))throw TypeError(it + ' is not an object!');\n  return it;\n};","var toString = {}.toString;\n\nmodule.exports = function(it){\n  return toString.call(it).slice(8, -1);\n};","var core = module.exports = {version: '2.3.0'};\nif(typeof __e == 'number')__e = core; // eslint-disable-line no-undef","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function(fn, that, length){\n  aFunction(fn);\n  if(that === undefined)return fn;\n  switch(length){\n    case 1: return function(a){\n      return fn.call(that, a);\n    };\n    case 2: return function(a, b){\n      return fn.call(that, a, b);\n    };\n    case 3: return function(a, b, c){\n      return fn.call(that, a, b, c);\n    };\n  }\n  return function(/* ...args */){\n    return fn.apply(that, arguments);\n  };\n};","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function(){\n  return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;\n});","var isObject = require('./_is-object')\n  , document = require('./_global').document\n  // in old IE typeof document.createElement is 'object'\n  , is = isObject(document) && isObject(document.createElement);\nmodule.exports = function(it){\n  return is ? document.createElement(it) : {};\n};","var global    = require('./_global')\n  , core      = require('./_core')\n  , ctx       = require('./_ctx')\n  , hide      = require('./_hide')\n  , PROTOTYPE = 'prototype';\n\nvar $export = function(type, name, source){\n  var IS_FORCED = type & $export.F\n    , IS_GLOBAL = type & $export.G\n    , IS_STATIC = type & $export.S\n    , IS_PROTO  = type & $export.P\n    , IS_BIND   = type & $export.B\n    , IS_WRAP   = type & $export.W\n    , exports   = IS_GLOBAL ? core : core[name] || (core[name] = {})\n    , expProto  = exports[PROTOTYPE]\n    , target    = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]\n    , key, own, out;\n  if(IS_GLOBAL)source = name;\n  for(key in source){\n    // contains in native\n    own = !IS_FORCED && target && target[key] !== undefined;\n    if(own && key in exports)continue;\n    // export native or passed\n    out = own ? target[key] : source[key];\n    // prevent global pollution for namespaces\n    exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n    // bind timers to global for call from export context\n    : IS_BIND && own ? ctx(out, global)\n    // wrap global constructors for prevent change them in library\n    : IS_WRAP && target[key] == out ? (function(C){\n      var F = function(a, b, c){\n        if(this instanceof C){\n          switch(arguments.length){\n            case 0: return new C;\n            case 1: return new C(a);\n            case 2: return new C(a, b);\n          } return new C(a, b, c);\n        } return C.apply(this, arguments);\n      };\n      F[PROTOTYPE] = C[PROTOTYPE];\n      return F;\n    // make static versions for prototype methods\n    })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n    // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n    if(IS_PROTO){\n      (exports.virtual || (exports.virtual = {}))[key] = out;\n      // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n      if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);\n    }\n  }\n};\n// type bitmap\n$export.F = 1;   // forced\n$export.G = 2;   // global\n$export.S = 4;   // static\n$export.P = 8;   // proto\n$export.B = 16;  // bind\n$export.W = 32;  // wrap\n$export.U = 64;  // safe\n$export.R = 128; // real proto method for `library` \nmodule.exports = $export;","module.exports = function(exec){\n  try {\n    return !!exec();\n  } catch(e){\n    return true;\n  }\n};","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n  ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();\nif(typeof __g == 'number')__g = global; // eslint-disable-line no-undef","var dP         = require('./_object-dp')\n  , createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function(object, key, value){\n  return dP.f(object, key, createDesc(1, value));\n} : function(object, key, value){\n  object[key] = value;\n  return object;\n};","module.exports = require('./_global').document && document.documentElement;","module.exports = !require('./_descriptors') && !require('./_fails')(function(){\r\n  return Object.defineProperty(require('./_dom-create')('div'), 'a', {get: function(){ return 7; }}).a != 7;\r\n});","// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function(fn, args, that){\n  var un = that === undefined;\n  switch(args.length){\n    case 0: return un ? fn()\n                      : fn.call(that);\n    case 1: return un ? fn(args[0])\n                      : fn.call(that, args[0]);\n    case 2: return un ? fn(args[0], args[1])\n                      : fn.call(that, args[0], args[1]);\n    case 3: return un ? fn(args[0], args[1], args[2])\n                      : fn.call(that, args[0], args[1], args[2]);\n    case 4: return un ? fn(args[0], args[1], args[2], args[3])\n                      : fn.call(that, args[0], args[1], args[2], args[3]);\n  } return              fn.apply(that, args);\n};","module.exports = function(it){\n  return typeof it === 'object' ? it !== null : typeof it === 'function';\n};","var anObject       = require('./_an-object')\n  , IE8_DOM_DEFINE = require('./_ie8-dom-define')\n  , toPrimitive    = require('./_to-primitive')\n  , dP             = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes){\n  anObject(O);\n  P = toPrimitive(P, true);\n  anObject(Attributes);\n  if(IE8_DOM_DEFINE)try {\n    return dP(O, P, Attributes);\n  } catch(e){ /* empty */ }\n  if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');\n  if('value' in Attributes)O[P] = Attributes.value;\n  return O;\n};","module.exports = function(bitmap, value){\n  return {\n    enumerable  : !(bitmap & 1),\n    configurable: !(bitmap & 2),\n    writable    : !(bitmap & 4),\n    value       : value\n  };\n};","var ctx                = require('./_ctx')\n  , invoke             = require('./_invoke')\n  , html               = require('./_html')\n  , cel                = require('./_dom-create')\n  , global             = require('./_global')\n  , process            = global.process\n  , setTask            = global.setImmediate\n  , clearTask          = global.clearImmediate\n  , MessageChannel     = global.MessageChannel\n  , counter            = 0\n  , queue              = {}\n  , ONREADYSTATECHANGE = 'onreadystatechange'\n  , defer, channel, port;\nvar run = function(){\n  var id = +this;\n  if(queue.hasOwnProperty(id)){\n    var fn = queue[id];\n    delete queue[id];\n    fn();\n  }\n};\nvar listener = function(event){\n  run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif(!setTask || !clearTask){\n  setTask = function setImmediate(fn){\n    var args = [], i = 1;\n    while(arguments.length > i)args.push(arguments[i++]);\n    queue[++counter] = function(){\n      invoke(typeof fn == 'function' ? fn : Function(fn), args);\n    };\n    defer(counter);\n    return counter;\n  };\n  clearTask = function clearImmediate(id){\n    delete queue[id];\n  };\n  // Node.js 0.8-\n  if(require('./_cof')(process) == 'process'){\n    defer = function(id){\n      process.nextTick(ctx(run, id, 1));\n    };\n  // Browsers with MessageChannel, includes WebWorkers\n  } else if(MessageChannel){\n    channel = new MessageChannel;\n    port    = channel.port2;\n    channel.port1.onmessage = listener;\n    defer = ctx(port.postMessage, port, 1);\n  // Browsers with postMessage, skip WebWorkers\n  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n  } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){\n    defer = function(id){\n      global.postMessage(id + '', '*');\n    };\n    global.addEventListener('message', listener, false);\n  // IE8-\n  } else if(ONREADYSTATECHANGE in cel('script')){\n    defer = function(id){\n      html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){\n        html.removeChild(this);\n        run.call(id);\n      };\n    };\n  // Rest old browsers\n  } else {\n    defer = function(id){\n      setTimeout(ctx(run, id, 1), 0);\n    };\n  }\n}\nmodule.exports = {\n  set:   setTask,\n  clear: clearTask\n};","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function(it, S){\n  if(!isObject(it))return it;\n  var fn, val;\n  if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;\n  if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;\n  if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;\n  throw TypeError(\"Can't convert object to primitive value\");\n};","var $export = require('./_export')\n  , $task   = require('./_task');\n$export($export.G + $export.B, {\n  setImmediate:   $task.set,\n  clearImmediate: $task.clear\n});","'use strict';\nvar Mutation = global.MutationObserver || global.WebKitMutationObserver;\n\nvar scheduleDrain;\n\n{\n  if (Mutation) {\n    var called = 0;\n    var observer = new Mutation(nextTick);\n    var element = global.document.createTextNode('');\n    observer.observe(element, {\n      characterData: true\n    });\n    scheduleDrain = function () {\n      element.data = (called = ++called % 2);\n    };\n  } else if (!global.setImmediate && typeof global.MessageChannel !== 'undefined') {\n    var channel = new global.MessageChannel();\n    channel.port1.onmessage = nextTick;\n    scheduleDrain = function () {\n      channel.port2.postMessage(0);\n    };\n  } else if ('document' in global && 'onreadystatechange' in global.document.createElement('script')) {\n    scheduleDrain = function () {\n\n      // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n      // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n      var scriptEl = global.document.createElement('script');\n      scriptEl.onreadystatechange = function () {\n        nextTick();\n\n        scriptEl.onreadystatechange = null;\n        scriptEl.parentNode.removeChild(scriptEl);\n        scriptEl = null;\n      };\n      global.document.documentElement.appendChild(scriptEl);\n    };\n  } else {\n    scheduleDrain = function () {\n      setTimeout(nextTick, 0);\n    };\n  }\n}\n\nvar draining;\nvar queue = [];\n//named nextTick for less confusing stack traces\nfunction nextTick() {\n  draining = true;\n  var i, oldQueue;\n  var len = queue.length;\n  while (len) {\n    oldQueue = queue;\n    queue = [];\n    i = -1;\n    while (++i < len) {\n      oldQueue[i]();\n    }\n    len = queue.length;\n  }\n  draining = false;\n}\n\nmodule.exports = immediate;\nfunction immediate(task) {\n  if (queue.push(task) === 1 && !draining) {\n    scheduleDrain();\n  }\n}\n","'use strict';\nvar immediate = require('immediate');\n\n/* istanbul ignore next */\nfunction INTERNAL() {}\n\nvar handlers = {};\n\nvar REJECTED = ['REJECTED'];\nvar FULFILLED = ['FULFILLED'];\nvar PENDING = ['PENDING'];\n\nmodule.exports = Promise;\n\nfunction Promise(resolver) {\n  if (typeof resolver !== 'function') {\n    throw new TypeError('resolver must be a function');\n  }\n  this.state = PENDING;\n  this.queue = [];\n  this.outcome = void 0;\n  if (resolver !== INTERNAL) {\n    safelyResolveThenable(this, resolver);\n  }\n}\n\nPromise.prototype[\"catch\"] = function (onRejected) {\n  return this.then(null, onRejected);\n};\nPromise.prototype.then = function (onFulfilled, onRejected) {\n  if (typeof onFulfilled !== 'function' && this.state === FULFILLED ||\n    typeof onRejected !== 'function' && this.state === REJECTED) {\n    return this;\n  }\n  var promise = new this.constructor(INTERNAL);\n  if (this.state !== PENDING) {\n    var resolver = this.state === FULFILLED ? onFulfilled : onRejected;\n    unwrap(promise, resolver, this.outcome);\n  } else {\n    this.queue.push(new QueueItem(promise, onFulfilled, onRejected));\n  }\n\n  return promise;\n};\nfunction QueueItem(promise, onFulfilled, onRejected) {\n  this.promise = promise;\n  if (typeof onFulfilled === 'function') {\n    this.onFulfilled = onFulfilled;\n    this.callFulfilled = this.otherCallFulfilled;\n  }\n  if (typeof onRejected === 'function') {\n    this.onRejected = onRejected;\n    this.callRejected = this.otherCallRejected;\n  }\n}\nQueueItem.prototype.callFulfilled = function (value) {\n  handlers.resolve(this.promise, value);\n};\nQueueItem.prototype.otherCallFulfilled = function (value) {\n  unwrap(this.promise, this.onFulfilled, value);\n};\nQueueItem.prototype.callRejected = function (value) {\n  handlers.reject(this.promise, value);\n};\nQueueItem.prototype.otherCallRejected = function (value) {\n  unwrap(this.promise, this.onRejected, value);\n};\n\nfunction unwrap(promise, func, value) {\n  immediate(function () {\n    var returnValue;\n    try {\n      returnValue = func(value);\n    } catch (e) {\n      return handlers.reject(promise, e);\n    }\n    if (returnValue === promise) {\n      handlers.reject(promise, new TypeError('Cannot resolve promise with itself'));\n    } else {\n      handlers.resolve(promise, returnValue);\n    }\n  });\n}\n\nhandlers.resolve = function (self, value) {\n  var result = tryCatch(getThen, value);\n  if (result.status === 'error') {\n    return handlers.reject(self, result.value);\n  }\n  var thenable = result.value;\n\n  if (thenable) {\n    safelyResolveThenable(self, thenable);\n  } else {\n    self.state = FULFILLED;\n    self.outcome = value;\n    var i = -1;\n    var len = self.queue.length;\n    while (++i < len) {\n      self.queue[i].callFulfilled(value);\n    }\n  }\n  return self;\n};\nhandlers.reject = function (self, error) {\n  self.state = REJECTED;\n  self.outcome = error;\n  var i = -1;\n  var len = self.queue.length;\n  while (++i < len) {\n    self.queue[i].callRejected(error);\n  }\n  return self;\n};\n\nfunction getThen(obj) {\n  // Make sure we only access the accessor once as required by the spec\n  var then = obj && obj.then;\n  if (obj && (typeof obj === 'object' || typeof obj === 'function') && typeof then === 'function') {\n    return function appyThen() {\n      then.apply(obj, arguments);\n    };\n  }\n}\n\nfunction safelyResolveThenable(self, thenable) {\n  // Either fulfill, reject or reject with error\n  var called = false;\n  function onError(value) {\n    if (called) {\n      return;\n    }\n    called = true;\n    handlers.reject(self, value);\n  }\n\n  function onSuccess(value) {\n    if (called) {\n      return;\n    }\n    called = true;\n    handlers.resolve(self, value);\n  }\n\n  function tryToUnwrap() {\n    thenable(onSuccess, onError);\n  }\n\n  var result = tryCatch(tryToUnwrap);\n  if (result.status === 'error') {\n    onError(result.value);\n  }\n}\n\nfunction tryCatch(func, value) {\n  var out = {};\n  try {\n    out.value = func(value);\n    out.status = 'success';\n  } catch (e) {\n    out.status = 'error';\n    out.value = e;\n  }\n  return out;\n}\n\nPromise.resolve = resolve;\nfunction resolve(value) {\n  if (value instanceof this) {\n    return value;\n  }\n  return handlers.resolve(new this(INTERNAL), value);\n}\n\nPromise.reject = reject;\nfunction reject(reason) {\n  var promise = new this(INTERNAL);\n  return handlers.reject(promise, reason);\n}\n\nPromise.all = all;\nfunction all(iterable) {\n  var self = this;\n  if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n    return this.reject(new TypeError('must be an array'));\n  }\n\n  var len = iterable.length;\n  var called = false;\n  if (!len) {\n    return this.resolve([]);\n  }\n\n  var values = new Array(len);\n  var resolved = 0;\n  var i = -1;\n  var promise = new this(INTERNAL);\n\n  while (++i < len) {\n    allResolver(iterable[i], i);\n  }\n  return promise;\n  function allResolver(value, i) {\n    self.resolve(value).then(resolveFromAll, function (error) {\n      if (!called) {\n        called = true;\n        handlers.reject(promise, error);\n      }\n    });\n    function resolveFromAll(outValue) {\n      values[i] = outValue;\n      if (++resolved === len && !called) {\n        called = true;\n        handlers.resolve(promise, values);\n      }\n    }\n  }\n}\n\nPromise.race = race;\nfunction race(iterable) {\n  var self = this;\n  if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n    return this.reject(new TypeError('must be an array'));\n  }\n\n  var len = iterable.length;\n  var called = false;\n  if (!len) {\n    return this.resolve([]);\n  }\n\n  var i = -1;\n  var promise = new this(INTERNAL);\n\n  while (++i < len) {\n    resolver(iterable[i]);\n  }\n  return promise;\n  function resolver(value) {\n    self.resolve(value).then(function (response) {\n      if (!called) {\n        called = true;\n        handlers.resolve(promise, response);\n      }\n    }, function (error) {\n      if (!called) {\n        called = true;\n        handlers.reject(promise, error);\n      }\n    });\n  }\n}\n","// Top level file is just a mixin of submodules & constants\n'use strict';\n\nvar assign    = require('./lib/utils/common').assign;\n\nvar deflate   = require('./lib/deflate');\nvar inflate   = require('./lib/inflate');\nvar constants = require('./lib/zlib/constants');\n\nvar pako = {};\n\nassign(pako, deflate, inflate, constants);\n\nmodule.exports = pako;\n","'use strict';\n\n\nvar zlib_deflate = require('./zlib/deflate');\nvar utils        = require('./utils/common');\nvar strings      = require('./utils/strings');\nvar msg          = require('./zlib/messages');\nvar ZStream      = require('./zlib/zstream');\n\nvar toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nvar Z_NO_FLUSH      = 0;\nvar Z_FINISH        = 4;\n\nvar Z_OK            = 0;\nvar Z_STREAM_END    = 1;\nvar Z_SYNC_FLUSH    = 2;\n\nvar Z_DEFAULT_COMPRESSION = -1;\n\nvar Z_DEFAULT_STRATEGY    = 0;\n\nvar Z_DEFLATED  = 8;\n\n/* ===========================================================================*/\n\n\n/**\n * class Deflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[deflate]],\n * [[deflateRaw]] and [[gzip]].\n **/\n\n/* internal\n * Deflate.chunks -> Array\n *\n * Chunks of output data, if [[Deflate#onData]] not overridden.\n **/\n\n/**\n * Deflate.result -> Uint8Array|Array\n *\n * Compressed result, generated by default [[Deflate#onData]]\n * and [[Deflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Deflate#push]] with `Z_FINISH` / `true` param)  or if you\n * push a chunk with explicit flush (call [[Deflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Deflate.err -> Number\n *\n * Error code after deflate finished. 0 (Z_OK) on success.\n * You will not need it in real life, because deflate errors\n * are possible only on wrong options or bad `onData` / `onEnd`\n * custom handlers.\n **/\n\n/**\n * Deflate.msg -> String\n *\n * Error message, if [[Deflate.err]] != 0\n **/\n\n\n/**\n * new Deflate(options)\n * - options (Object): zlib deflate options.\n *\n * Creates new deflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `level`\n * - `windowBits`\n * - `memLevel`\n * - `strategy`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw deflate\n * - `gzip` (Boolean) - create gzip wrapper\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n *    (each char code [0..255])\n * - `header` (Object) - custom header for gzip\n *   - `text` (Boolean) - true if compressed data believed to be text\n *   - `time` (Number) - modification time, unix timestamp\n *   - `os` (Number) - operation system code\n *   - `extra` (Array) - array of bytes with extra data (max 65536)\n *   - `name` (String) - file name (binary string)\n *   - `comment` (String) - comment (binary string)\n *   - `hcrc` (Boolean) - true if header crc should be added\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n *   , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n *   , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var deflate = new pako.Deflate({ level: 3});\n *\n * deflate.push(chunk1, false);\n * deflate.push(chunk2, true);  // true -> last chunk\n *\n * if (deflate.err) { throw new Error(deflate.err); }\n *\n * console.log(deflate.result);\n * ```\n **/\nfunction Deflate(options) {\n  if (!(this instanceof Deflate)) return new Deflate(options);\n\n  this.options = utils.assign({\n    level: Z_DEFAULT_COMPRESSION,\n    method: Z_DEFLATED,\n    chunkSize: 16384,\n    windowBits: 15,\n    memLevel: 8,\n    strategy: Z_DEFAULT_STRATEGY,\n    to: ''\n  }, options || {});\n\n  var opt = this.options;\n\n  if (opt.raw && (opt.windowBits > 0)) {\n    opt.windowBits = -opt.windowBits;\n  }\n\n  else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {\n    opt.windowBits += 16;\n  }\n\n  this.err    = 0;      // error code, if happens (0 = Z_OK)\n  this.msg    = '';     // error message\n  this.ended  = false;  // used to avoid multiple onEnd() calls\n  this.chunks = [];     // chunks of compressed data\n\n  this.strm = new ZStream();\n  this.strm.avail_out = 0;\n\n  var status = zlib_deflate.deflateInit2(\n    this.strm,\n    opt.level,\n    opt.method,\n    opt.windowBits,\n    opt.memLevel,\n    opt.strategy\n  );\n\n  if (status !== Z_OK) {\n    throw new Error(msg[status]);\n  }\n\n  if (opt.header) {\n    zlib_deflate.deflateSetHeader(this.strm, opt.header);\n  }\n\n  if (opt.dictionary) {\n    var dict;\n    // Convert data if needed\n    if (typeof opt.dictionary === 'string') {\n      // If we need to compress text, change encoding to utf8.\n      dict = strings.string2buf(opt.dictionary);\n    } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n      dict = new Uint8Array(opt.dictionary);\n    } else {\n      dict = opt.dictionary;\n    }\n\n    status = zlib_deflate.deflateSetDictionary(this.strm, dict);\n\n    if (status !== Z_OK) {\n      throw new Error(msg[status]);\n    }\n\n    this._dict_set = true;\n  }\n}\n\n/**\n * Deflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be\n *   converted to utf8 byte sequence.\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n *   See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with\n * new compressed chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the compression context.\n *\n * On fail call [[Deflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * array format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true);  // push last chunk\n * ```\n **/\nDeflate.prototype.push = function (data, mode) {\n  var strm = this.strm;\n  var chunkSize = this.options.chunkSize;\n  var status, _mode;\n\n  if (this.ended) { return false; }\n\n  _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH);\n\n  // Convert data if needed\n  if (typeof data === 'string') {\n    // If we need to compress text, change encoding to utf8.\n    strm.input = strings.string2buf(data);\n  } else if (toString.call(data) === '[object ArrayBuffer]') {\n    strm.input = new Uint8Array(data);\n  } else {\n    strm.input = data;\n  }\n\n  strm.next_in = 0;\n  strm.avail_in = strm.input.length;\n\n  do {\n    if (strm.avail_out === 0) {\n      strm.output = new utils.Buf8(chunkSize);\n      strm.next_out = 0;\n      strm.avail_out = chunkSize;\n    }\n    status = zlib_deflate.deflate(strm, _mode);    /* no bad return value */\n\n    if (status !== Z_STREAM_END && status !== Z_OK) {\n      this.onEnd(status);\n      this.ended = true;\n      return false;\n    }\n    if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) {\n      if (this.options.to === 'string') {\n        this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out)));\n      } else {\n        this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n      }\n    }\n  } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END);\n\n  // Finalize on the last chunk.\n  if (_mode === Z_FINISH) {\n    status = zlib_deflate.deflateEnd(this.strm);\n    this.onEnd(status);\n    this.ended = true;\n    return status === Z_OK;\n  }\n\n  // callback interim results if Z_SYNC_FLUSH.\n  if (_mode === Z_SYNC_FLUSH) {\n    this.onEnd(Z_OK);\n    strm.avail_out = 0;\n    return true;\n  }\n\n  return true;\n};\n\n\n/**\n * Deflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n *   on js engine support. When string output requested, each chunk\n *   will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nDeflate.prototype.onData = function (chunk) {\n  this.chunks.push(chunk);\n};\n\n\n/**\n * Deflate#onEnd(status) -> Void\n * - status (Number): deflate status. 0 (Z_OK) on success,\n *   other if not.\n *\n * Called once after you tell deflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nDeflate.prototype.onEnd = function (status) {\n  // On success - join\n  if (status === Z_OK) {\n    if (this.options.to === 'string') {\n      this.result = this.chunks.join('');\n    } else {\n      this.result = utils.flattenChunks(this.chunks);\n    }\n  }\n  this.chunks = [];\n  this.err = status;\n  this.msg = this.strm.msg;\n};\n\n\n/**\n * deflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * Compress `data` with deflate algorithm and `options`.\n *\n * Supported options are:\n *\n * - level\n * - windowBits\n * - memLevel\n * - strategy\n * - dictionary\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n *   negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n *    (each char code [0..255])\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n *   , data = Uint8Array([1,2,3,4,5,6,7,8,9]);\n *\n * console.log(pako.deflate(data));\n * ```\n **/\nfunction deflate(input, options) {\n  var deflator = new Deflate(options);\n\n  deflator.push(input, true);\n\n  // That will never happens, if you don't cheat with options :)\n  if (deflator.err) { throw deflator.msg || msg[deflator.err]; }\n\n  return deflator.result;\n}\n\n\n/**\n * deflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction deflateRaw(input, options) {\n  options = options || {};\n  options.raw = true;\n  return deflate(input, options);\n}\n\n\n/**\n * gzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but create gzip wrapper instead of\n * deflate one.\n **/\nfunction gzip(input, options) {\n  options = options || {};\n  options.gzip = true;\n  return deflate(input, options);\n}\n\n\nexports.Deflate = Deflate;\nexports.deflate = deflate;\nexports.deflateRaw = deflateRaw;\nexports.gzip = gzip;\n","'use strict';\n\n\nvar zlib_inflate = require('./zlib/inflate');\nvar utils        = require('./utils/common');\nvar strings      = require('./utils/strings');\nvar c            = require('./zlib/constants');\nvar msg          = require('./zlib/messages');\nvar ZStream      = require('./zlib/zstream');\nvar GZheader     = require('./zlib/gzheader');\n\nvar toString = Object.prototype.toString;\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Inflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n *   from utf8 to utf16 (javascript) string. When string output requested,\n *   chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n *   , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n *   , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true);  // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nfunction Inflate(options) {\n  if (!(this instanceof Inflate)) return new Inflate(options);\n\n  this.options = utils.assign({\n    chunkSize: 16384,\n    windowBits: 0,\n    to: ''\n  }, options || {});\n\n  var opt = this.options;\n\n  // Force window size for `raw` data, if not set directly,\n  // because we have no header for autodetect.\n  if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n    opt.windowBits = -opt.windowBits;\n    if (opt.windowBits === 0) { opt.windowBits = -15; }\n  }\n\n  // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n  if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n      !(options && options.windowBits)) {\n    opt.windowBits += 32;\n  }\n\n  // Gzip header has no info about windows size, we can do autodetect only\n  // for deflate. So, if window size not set, force it to max when gzip possible\n  if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n    // bit 3 (16) -> gzipped data\n    // bit 4 (32) -> autodetect gzip/deflate\n    if ((opt.windowBits & 15) === 0) {\n      opt.windowBits |= 15;\n    }\n  }\n\n  this.err    = 0;      // error code, if happens (0 = Z_OK)\n  this.msg    = '';     // error message\n  this.ended  = false;  // used to avoid multiple onEnd() calls\n  this.chunks = [];     // chunks of compressed data\n\n  this.strm   = new ZStream();\n  this.strm.avail_out = 0;\n\n  var status  = zlib_inflate.inflateInit2(\n    this.strm,\n    opt.windowBits\n  );\n\n  if (status !== c.Z_OK) {\n    throw new Error(msg[status]);\n  }\n\n  this.header = new GZheader();\n\n  zlib_inflate.inflateGetHeader(this.strm, this.header);\n}\n\n/**\n * Inflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n *   See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the decompression context.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true);  // push last chunk\n * ```\n **/\nInflate.prototype.push = function (data, mode) {\n  var strm = this.strm;\n  var chunkSize = this.options.chunkSize;\n  var dictionary = this.options.dictionary;\n  var status, _mode;\n  var next_out_utf8, tail, utf8str;\n  var dict;\n\n  // Flag to properly process Z_BUF_ERROR on testing inflate call\n  // when we check that all output data was flushed.\n  var allowBufError = false;\n\n  if (this.ended) { return false; }\n  _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH);\n\n  // Convert data if needed\n  if (typeof data === 'string') {\n    // Only binary strings can be decompressed on practice\n    strm.input = strings.binstring2buf(data);\n  } else if (toString.call(data) === '[object ArrayBuffer]') {\n    strm.input = new Uint8Array(data);\n  } else {\n    strm.input = data;\n  }\n\n  strm.next_in = 0;\n  strm.avail_in = strm.input.length;\n\n  do {\n    if (strm.avail_out === 0) {\n      strm.output = new utils.Buf8(chunkSize);\n      strm.next_out = 0;\n      strm.avail_out = chunkSize;\n    }\n\n    status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH);    /* no bad return value */\n\n    if (status === c.Z_NEED_DICT && dictionary) {\n      // Convert data if needed\n      if (typeof dictionary === 'string') {\n        dict = strings.string2buf(dictionary);\n      } else if (toString.call(dictionary) === '[object ArrayBuffer]') {\n        dict = new Uint8Array(dictionary);\n      } else {\n        dict = dictionary;\n      }\n\n      status = zlib_inflate.inflateSetDictionary(this.strm, dict);\n\n    }\n\n    if (status === c.Z_BUF_ERROR && allowBufError === true) {\n      status = c.Z_OK;\n      allowBufError = false;\n    }\n\n    if (status !== c.Z_STREAM_END && status !== c.Z_OK) {\n      this.onEnd(status);\n      this.ended = true;\n      return false;\n    }\n\n    if (strm.next_out) {\n      if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) {\n\n        if (this.options.to === 'string') {\n\n          next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n          tail = strm.next_out - next_out_utf8;\n          utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n          // move tail\n          strm.next_out = tail;\n          strm.avail_out = chunkSize - tail;\n          if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); }\n\n          this.onData(utf8str);\n\n        } else {\n          this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n        }\n      }\n    }\n\n    // When no more input data, we should check that internal inflate buffers\n    // are flushed. The only way to do it when avail_out = 0 - run one more\n    // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR.\n    // Here we set flag to process this error properly.\n    //\n    // NOTE. Deflate does not return error in this case and does not needs such\n    // logic.\n    if (strm.avail_in === 0 && strm.avail_out === 0) {\n      allowBufError = true;\n    }\n\n  } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END);\n\n  if (status === c.Z_STREAM_END) {\n    _mode = c.Z_FINISH;\n  }\n\n  // Finalize on the last chunk.\n  if (_mode === c.Z_FINISH) {\n    status = zlib_inflate.inflateEnd(this.strm);\n    this.onEnd(status);\n    this.ended = true;\n    return status === c.Z_OK;\n  }\n\n  // callback interim results if Z_SYNC_FLUSH.\n  if (_mode === c.Z_SYNC_FLUSH) {\n    this.onEnd(c.Z_OK);\n    strm.avail_out = 0;\n    return true;\n  }\n\n  return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n *   on js engine support. When string output requested, each chunk\n *   will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate.prototype.onData = function (chunk) {\n  this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n *   other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate.prototype.onEnd = function (status) {\n  // On success - join\n  if (status === c.Z_OK) {\n    if (this.options.to === 'string') {\n      // Glue & convert here, until we teach pako to send\n      // utf8 aligned strings to onData\n      this.result = this.chunks.join('');\n    } else {\n      this.result = utils.flattenChunks(this.chunks);\n    }\n  }\n  this.chunks = [];\n  this.err = status;\n  this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n *   negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n *   from utf8 to utf16 (javascript) string. When string output requested,\n *   chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n *   , input = pako.deflate([1,2,3,4,5,6,7,8,9])\n *   , output;\n *\n * try {\n *   output = pako.inflate(input);\n * } catch (err)\n *   console.log(err);\n * }\n * ```\n **/\nfunction inflate(input, options) {\n  var inflator = new Inflate(options);\n\n  inflator.push(input, true);\n\n  // That will never happens, if you don't cheat with options :)\n  if (inflator.err) { throw inflator.msg || msg[inflator.err]; }\n\n  return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw(input, options) {\n  options = options || {};\n  options.raw = true;\n  return inflate(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nexports.Inflate = Inflate;\nexports.inflate = inflate;\nexports.inflateRaw = inflateRaw;\nexports.ungzip  = inflate;\n","'use strict';\n\n\nvar TYPED_OK =  (typeof Uint8Array !== 'undefined') &&\n                (typeof Uint16Array !== 'undefined') &&\n                (typeof Int32Array !== 'undefined');\n\nfunction _has(obj, key) {\n  return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexports.assign = function (obj /*from1, from2, from3, ...*/) {\n  var sources = Array.prototype.slice.call(arguments, 1);\n  while (sources.length) {\n    var source = sources.shift();\n    if (!source) { continue; }\n\n    if (typeof source !== 'object') {\n      throw new TypeError(source + 'must be non-object');\n    }\n\n    for (var p in source) {\n      if (_has(source, p)) {\n        obj[p] = source[p];\n      }\n    }\n  }\n\n  return obj;\n};\n\n\n// reduce buffer size, avoiding mem copy\nexports.shrinkBuf = function (buf, size) {\n  if (buf.length === size) { return buf; }\n  if (buf.subarray) { return buf.subarray(0, size); }\n  buf.length = size;\n  return buf;\n};\n\n\nvar fnTyped = {\n  arraySet: function (dest, src, src_offs, len, dest_offs) {\n    if (src.subarray && dest.subarray) {\n      dest.set(src.subarray(src_offs, src_offs + len), dest_offs);\n      return;\n    }\n    // Fallback to ordinary array\n    for (var i = 0; i < len; i++) {\n      dest[dest_offs + i] = src[src_offs + i];\n    }\n  },\n  // Join array of chunks to single array.\n  flattenChunks: function (chunks) {\n    var i, l, len, pos, chunk, result;\n\n    // calculate data length\n    len = 0;\n    for (i = 0, l = chunks.length; i < l; i++) {\n      len += chunks[i].length;\n    }\n\n    // join chunks\n    result = new Uint8Array(len);\n    pos = 0;\n    for (i = 0, l = chunks.length; i < l; i++) {\n      chunk = chunks[i];\n      result.set(chunk, pos);\n      pos += chunk.length;\n    }\n\n    return result;\n  }\n};\n\nvar fnUntyped = {\n  arraySet: function (dest, src, src_offs, len, dest_offs) {\n    for (var i = 0; i < len; i++) {\n      dest[dest_offs + i] = src[src_offs + i];\n    }\n  },\n  // Join array of chunks to single array.\n  flattenChunks: function (chunks) {\n    return [].concat.apply([], chunks);\n  }\n};\n\n\n// Enable/Disable typed arrays use, for testing\n//\nexports.setTyped = function (on) {\n  if (on) {\n    exports.Buf8  = Uint8Array;\n    exports.Buf16 = Uint16Array;\n    exports.Buf32 = Int32Array;\n    exports.assign(exports, fnTyped);\n  } else {\n    exports.Buf8  = Array;\n    exports.Buf16 = Array;\n    exports.Buf32 = Array;\n    exports.assign(exports, fnUntyped);\n  }\n};\n\nexports.setTyped(TYPED_OK);\n","// String encode/decode helpers\n'use strict';\n\n\nvar utils = require('./common');\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safari\n//\nvar STR_APPLY_OK = true;\nvar STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; }\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nvar _utf8len = new utils.Buf8(256);\nfor (var q = 0; q < 256; q++) {\n  _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nexports.string2buf = function (str) {\n  var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n  // count binary size\n  for (m_pos = 0; m_pos < str_len; m_pos++) {\n    c = str.charCodeAt(m_pos);\n    if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n      c2 = str.charCodeAt(m_pos + 1);\n      if ((c2 & 0xfc00) === 0xdc00) {\n        c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n        m_pos++;\n      }\n    }\n    buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n  }\n\n  // allocate buffer\n  buf = new utils.Buf8(buf_len);\n\n  // convert\n  for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n    c = str.charCodeAt(m_pos);\n    if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n      c2 = str.charCodeAt(m_pos + 1);\n      if ((c2 & 0xfc00) === 0xdc00) {\n        c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n        m_pos++;\n      }\n    }\n    if (c < 0x80) {\n      /* one byte */\n      buf[i++] = c;\n    } else if (c < 0x800) {\n      /* two bytes */\n      buf[i++] = 0xC0 | (c >>> 6);\n      buf[i++] = 0x80 | (c & 0x3f);\n    } else if (c < 0x10000) {\n      /* three bytes */\n      buf[i++] = 0xE0 | (c >>> 12);\n      buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n      buf[i++] = 0x80 | (c & 0x3f);\n    } else {\n      /* four bytes */\n      buf[i++] = 0xf0 | (c >>> 18);\n      buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n      buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n      buf[i++] = 0x80 | (c & 0x3f);\n    }\n  }\n\n  return buf;\n};\n\n// Helper (used in 2 places)\nfunction buf2binstring(buf, len) {\n  // use fallback for big arrays to avoid stack overflow\n  if (len < 65537) {\n    if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {\n      return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));\n    }\n  }\n\n  var result = '';\n  for (var i = 0; i < len; i++) {\n    result += String.fromCharCode(buf[i]);\n  }\n  return result;\n}\n\n\n// Convert byte array to binary string\nexports.buf2binstring = function (buf) {\n  return buf2binstring(buf, buf.length);\n};\n\n\n// Convert binary string (typed, when possible)\nexports.binstring2buf = function (str) {\n  var buf = new utils.Buf8(str.length);\n  for (var i = 0, len = buf.length; i < len; i++) {\n    buf[i] = str.charCodeAt(i);\n  }\n  return buf;\n};\n\n\n// convert array to string\nexports.buf2string = function (buf, max) {\n  var i, out, c, c_len;\n  var len = max || buf.length;\n\n  // Reserve max possible length (2 words per char)\n  // NB: by unknown reasons, Array is significantly faster for\n  //     String.fromCharCode.apply than Uint16Array.\n  var utf16buf = new Array(len * 2);\n\n  for (out = 0, i = 0; i < len;) {\n    c = buf[i++];\n    // quick process ascii\n    if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n    c_len = _utf8len[c];\n    // skip 5 & 6 byte codes\n    if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n    // apply mask on first byte\n    c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n    // join the rest\n    while (c_len > 1 && i < len) {\n      c = (c << 6) | (buf[i++] & 0x3f);\n      c_len--;\n    }\n\n    // terminated by end of string?\n    if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n    if (c < 0x10000) {\n      utf16buf[out++] = c;\n    } else {\n      c -= 0x10000;\n      utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n      utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n    }\n  }\n\n  return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max   - length limit (mandatory);\nexports.utf8border = function (buf, max) {\n  var pos;\n\n  max = max || buf.length;\n  if (max > buf.length) { max = buf.length; }\n\n  // go back from last position, until start of sequence found\n  pos = max - 1;\n  while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n  // Very small and broken sequence,\n  // return max, because we should return something anyway.\n  if (pos < 0) { return max; }\n\n  // If we came to start of buffer - that means buffer is too small,\n  // return max too.\n  if (pos === 0) { return max; }\n\n  return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n","'use strict';\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It isn't worth it to make additional optimizations as in original.\n// Small size is preferable.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction adler32(adler, buf, len, pos) {\n  var s1 = (adler & 0xffff) |0,\n      s2 = ((adler >>> 16) & 0xffff) |0,\n      n = 0;\n\n  while (len !== 0) {\n    // Set limit ~ twice less than 5552, to keep\n    // s2 in 31-bits, because we force signed ints.\n    // in other case %= will fail.\n    n = len > 2000 ? 2000 : len;\n    len -= n;\n\n    do {\n      s1 = (s1 + buf[pos++]) |0;\n      s2 = (s2 + s1) |0;\n    } while (--n);\n\n    s1 %= 65521;\n    s2 %= 65521;\n  }\n\n  return (s1 | (s2 << 16)) |0;\n}\n\n\nmodule.exports = adler32;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n\n  /* Allowed flush values; see deflate() and inflate() below for details */\n  Z_NO_FLUSH:         0,\n  Z_PARTIAL_FLUSH:    1,\n  Z_SYNC_FLUSH:       2,\n  Z_FULL_FLUSH:       3,\n  Z_FINISH:           4,\n  Z_BLOCK:            5,\n  Z_TREES:            6,\n\n  /* Return codes for the compression/decompression functions. Negative values\n  * are errors, positive values are used for special but normal events.\n  */\n  Z_OK:               0,\n  Z_STREAM_END:       1,\n  Z_NEED_DICT:        2,\n  Z_ERRNO:           -1,\n  Z_STREAM_ERROR:    -2,\n  Z_DATA_ERROR:      -3,\n  //Z_MEM_ERROR:     -4,\n  Z_BUF_ERROR:       -5,\n  //Z_VERSION_ERROR: -6,\n\n  /* compression levels */\n  Z_NO_COMPRESSION:         0,\n  Z_BEST_SPEED:             1,\n  Z_BEST_COMPRESSION:       9,\n  Z_DEFAULT_COMPRESSION:   -1,\n\n\n  Z_FILTERED:               1,\n  Z_HUFFMAN_ONLY:           2,\n  Z_RLE:                    3,\n  Z_FIXED:                  4,\n  Z_DEFAULT_STRATEGY:       0,\n\n  /* Possible values of the data_type field (though see inflate()) */\n  Z_BINARY:                 0,\n  Z_TEXT:                   1,\n  //Z_ASCII:                1, // = Z_TEXT (deprecated)\n  Z_UNKNOWN:                2,\n\n  /* The deflate compression method */\n  Z_DEFLATED:               8\n  //Z_NULL:                 null // Use -1 or null inline, depending on var type\n};\n","'use strict';\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// Use ordinary array, since untyped makes no boost here\nfunction makeTable() {\n  var c, table = [];\n\n  for (var n = 0; n < 256; n++) {\n    c = n;\n    for (var k = 0; k < 8; k++) {\n      c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n    }\n    table[n] = c;\n  }\n\n  return table;\n}\n\n// Create table on load. Just 255 signed longs. Not a problem.\nvar crcTable = makeTable();\n\n\nfunction crc32(crc, buf, len, pos) {\n  var t = crcTable,\n      end = pos + len;\n\n  crc ^= -1;\n\n  for (var i = pos; i < end; i++) {\n    crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n  }\n\n  return (crc ^ (-1)); // >>> 0;\n}\n\n\nmodule.exports = crc32;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils   = require('../utils/common');\nvar trees   = require('./trees');\nvar adler32 = require('./adler32');\nvar crc32   = require('./crc32');\nvar msg     = require('./messages');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\nvar Z_NO_FLUSH      = 0;\nvar Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH    = 2;\nvar Z_FULL_FLUSH    = 3;\nvar Z_FINISH        = 4;\nvar Z_BLOCK         = 5;\n//var Z_TREES         = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK            = 0;\nvar Z_STREAM_END    = 1;\n//var Z_NEED_DICT     = 2;\n//var Z_ERRNO         = -1;\nvar Z_STREAM_ERROR  = -2;\nvar Z_DATA_ERROR    = -3;\n//var Z_MEM_ERROR     = -4;\nvar Z_BUF_ERROR     = -5;\n//var Z_VERSION_ERROR = -6;\n\n\n/* compression levels */\n//var Z_NO_COMPRESSION      = 0;\n//var Z_BEST_SPEED          = 1;\n//var Z_BEST_COMPRESSION    = 9;\nvar Z_DEFAULT_COMPRESSION = -1;\n\n\nvar Z_FILTERED            = 1;\nvar Z_HUFFMAN_ONLY        = 2;\nvar Z_RLE                 = 3;\nvar Z_FIXED               = 4;\nvar Z_DEFAULT_STRATEGY    = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\n//var Z_BINARY              = 0;\n//var Z_TEXT                = 1;\n//var Z_ASCII               = 1; // = Z_TEXT\nvar Z_UNKNOWN             = 2;\n\n\n/* The deflate compression method */\nvar Z_DEFLATED  = 8;\n\n/*============================================================================*/\n\n\nvar MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_MEM_LEVEL = 8;\n\n\nvar LENGTH_CODES  = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nvar LITERALS      = 256;\n/* number of literal bytes 0..255 */\nvar L_CODES       = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\nvar D_CODES       = 30;\n/* number of distance codes */\nvar BL_CODES      = 19;\n/* number of codes used to transfer the bit lengths */\nvar HEAP_SIZE     = 2 * L_CODES + 1;\n/* maximum heap size */\nvar MAX_BITS  = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\nvar MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nvar PRESET_DICT = 0x20;\n\nvar INIT_STATE = 42;\nvar EXTRA_STATE = 69;\nvar NAME_STATE = 73;\nvar COMMENT_STATE = 91;\nvar HCRC_STATE = 103;\nvar BUSY_STATE = 113;\nvar FINISH_STATE = 666;\n\nvar BS_NEED_MORE      = 1; /* block not completed, need more input or more output */\nvar BS_BLOCK_DONE     = 2; /* block flush performed */\nvar BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nvar BS_FINISH_DONE    = 4; /* finish done, accept no more input or output */\n\nvar OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nfunction err(strm, errorCode) {\n  strm.msg = msg[errorCode];\n  return errorCode;\n}\n\nfunction rank(f) {\n  return ((f) << 1) - ((f) > 4 ? 9 : 0);\n}\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output goes\n * through this function so some applications may wish to modify it\n * to avoid allocating a large strm->output buffer and copying into it.\n * (See also read_buf()).\n */\nfunction flush_pending(strm) {\n  var s = strm.state;\n\n  //_tr_flush_bits(s);\n  var len = s.pending;\n  if (len > strm.avail_out) {\n    len = strm.avail_out;\n  }\n  if (len === 0) { return; }\n\n  utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);\n  strm.next_out += len;\n  s.pending_out += len;\n  strm.total_out += len;\n  strm.avail_out -= len;\n  s.pending -= len;\n  if (s.pending === 0) {\n    s.pending_out = 0;\n  }\n}\n\n\nfunction flush_block_only(s, last) {\n  trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n  s.block_start = s.strstart;\n  flush_pending(s.strm);\n}\n\n\nfunction put_byte(s, b) {\n  s.pending_buf[s.pending++] = b;\n}\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nfunction putShortMSB(s, b) {\n//  put_byte(s, (Byte)(b >> 8));\n//  put_byte(s, (Byte)(b & 0xff));\n  s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n  s.pending_buf[s.pending++] = b & 0xff;\n}\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read.  All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nfunction read_buf(strm, buf, start, size) {\n  var len = strm.avail_in;\n\n  if (len > size) { len = size; }\n  if (len === 0) { return 0; }\n\n  strm.avail_in -= len;\n\n  // zmemcpy(buf, strm->next_in, len);\n  utils.arraySet(buf, strm.input, strm.next_in, len, start);\n  if (strm.state.wrap === 1) {\n    strm.adler = adler32(strm.adler, buf, len, start);\n  }\n\n  else if (strm.state.wrap === 2) {\n    strm.adler = crc32(strm.adler, buf, len, start);\n  }\n\n  strm.next_in += len;\n  strm.total_in += len;\n\n  return len;\n}\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n *   string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nfunction longest_match(s, cur_match) {\n  var chain_length = s.max_chain_length;      /* max hash chain length */\n  var scan = s.strstart; /* current string */\n  var match;                       /* matched string */\n  var len;                           /* length of current match */\n  var best_len = s.prev_length;              /* best match length so far */\n  var nice_match = s.nice_match;             /* stop if match long enough */\n  var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n      s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;\n\n  var _win = s.window; // shortcut\n\n  var wmask = s.w_mask;\n  var prev  = s.prev;\n\n  /* Stop when cur_match becomes <= limit. To simplify the code,\n   * we prevent matches with the string of window index 0.\n   */\n\n  var strend = s.strstart + MAX_MATCH;\n  var scan_end1  = _win[scan + best_len - 1];\n  var scan_end   = _win[scan + best_len];\n\n  /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n   * It is easy to get rid of this optimization if necessary.\n   */\n  // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n  /* Do not waste too much time if we already have a good match: */\n  if (s.prev_length >= s.good_match) {\n    chain_length >>= 2;\n  }\n  /* Do not look for matches beyond the end of the input. This is necessary\n   * to make deflate deterministic.\n   */\n  if (nice_match > s.lookahead) { nice_match = s.lookahead; }\n\n  // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n  do {\n    // Assert(cur_match < s->strstart, \"no future\");\n    match = cur_match;\n\n    /* Skip to next match if the match length cannot increase\n     * or if the match length is less than 2.  Note that the checks below\n     * for insufficient lookahead only occur occasionally for performance\n     * reasons.  Therefore uninitialized memory will be accessed, and\n     * conditional jumps will be made that depend on those values.\n     * However the length of the match is limited to the lookahead, so\n     * the output of deflate is not affected by the uninitialized values.\n     */\n\n    if (_win[match + best_len]     !== scan_end  ||\n        _win[match + best_len - 1] !== scan_end1 ||\n        _win[match]                !== _win[scan] ||\n        _win[++match]              !== _win[scan + 1]) {\n      continue;\n    }\n\n    /* The check at best_len-1 can be removed because it will be made\n     * again later. (This heuristic is not always a win.)\n     * It is not necessary to compare scan[2] and match[2] since they\n     * are always equal when the other bytes match, given that\n     * the hash keys are equal and that HASH_BITS >= 8.\n     */\n    scan += 2;\n    match++;\n    // Assert(*scan == *match, \"match[2]?\");\n\n    /* We check for insufficient lookahead only every 8th comparison;\n     * the 256th check will be made at strstart+258.\n     */\n    do {\n      /*jshint noempty:false*/\n    } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n             scan < strend);\n\n    // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n    len = MAX_MATCH - (strend - scan);\n    scan = strend - MAX_MATCH;\n\n    if (len > best_len) {\n      s.match_start = cur_match;\n      best_len = len;\n      if (len >= nice_match) {\n        break;\n      }\n      scan_end1  = _win[scan + best_len - 1];\n      scan_end   = _win[scan + best_len];\n    }\n  } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n  if (best_len <= s.lookahead) {\n    return best_len;\n  }\n  return s.lookahead;\n}\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n *    At least one byte has been read, or avail_in == 0; reads are\n *    performed for at least two bytes (required for the zip translate_eol\n *    option -- not supported here).\n */\nfunction fill_window(s) {\n  var _w_size = s.w_size;\n  var p, n, m, more, str;\n\n  //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n  do {\n    more = s.window_size - s.lookahead - s.strstart;\n\n    // JS ints have 32 bit, block below not needed\n    /* Deal with !@#$% 64K limit: */\n    //if (sizeof(int) <= 2) {\n    //    if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n    //        more = wsize;\n    //\n    //  } else if (more == (unsigned)(-1)) {\n    //        /* Very unlikely, but possible on 16 bit machine if\n    //         * strstart == 0 && lookahead == 1 (input done a byte at time)\n    //         */\n    //        more--;\n    //    }\n    //}\n\n\n    /* If the window is almost full and there is insufficient lookahead,\n     * move the upper half to the lower one to make room in the upper half.\n     */\n    if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n      utils.arraySet(s.window, s.window, _w_size, _w_size, 0);\n      s.match_start -= _w_size;\n      s.strstart -= _w_size;\n      /* we now have strstart >= MAX_DIST */\n      s.block_start -= _w_size;\n\n      /* Slide the hash table (could be avoided with 32 bit values\n       at the expense of memory usage). We slide even when level == 0\n       to keep the hash table consistent if we switch back to level > 0\n       later. (Using level 0 permanently is not an optimal usage of\n       zlib, so we don't care about this pathological case.)\n       */\n\n      n = s.hash_size;\n      p = n;\n      do {\n        m = s.head[--p];\n        s.head[p] = (m >= _w_size ? m - _w_size : 0);\n      } while (--n);\n\n      n = _w_size;\n      p = n;\n      do {\n        m = s.prev[--p];\n        s.prev[p] = (m >= _w_size ? m - _w_size : 0);\n        /* If n is not on any hash chain, prev[n] is garbage but\n         * its value will never be used.\n         */\n      } while (--n);\n\n      more += _w_size;\n    }\n    if (s.strm.avail_in === 0) {\n      break;\n    }\n\n    /* If there was no sliding:\n     *    strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n     *    more == window_size - lookahead - strstart\n     * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n     * => more >= window_size - 2*WSIZE + 2\n     * In the BIG_MEM or MMAP case (not yet supported),\n     *   window_size == input_size + MIN_LOOKAHEAD  &&\n     *   strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n     * Otherwise, window_size == 2*WSIZE so more >= 2.\n     * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n     */\n    //Assert(more >= 2, \"more < 2\");\n    n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n    s.lookahead += n;\n\n    /* Initialize the hash value now that we have some input: */\n    if (s.lookahead + s.insert >= MIN_MATCH) {\n      str = s.strstart - s.insert;\n      s.ins_h = s.window[str];\n\n      /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask;\n//#if MIN_MATCH != 3\n//        Call update_hash() MIN_MATCH-3 more times\n//#endif\n      while (s.insert) {\n        /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n        s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n        s.prev[str & s.w_mask] = s.head[s.ins_h];\n        s.head[s.ins_h] = str;\n        str++;\n        s.insert--;\n        if (s.lookahead + s.insert < MIN_MATCH) {\n          break;\n        }\n      }\n    }\n    /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n     * but this is not important since only literal bytes will be emitted.\n     */\n\n  } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n  /* If the WIN_INIT bytes after the end of the current data have never been\n   * written, then zero those bytes in order to avoid memory check reports of\n   * the use of uninitialized (or uninitialised as Julian writes) bytes by\n   * the longest match routines.  Update the high water mark for the next\n   * time through here.  WIN_INIT is set to MAX_MATCH since the longest match\n   * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n   */\n//  if (s.high_water < s.window_size) {\n//    var curr = s.strstart + s.lookahead;\n//    var init = 0;\n//\n//    if (s.high_water < curr) {\n//      /* Previous high water mark below current data -- zero WIN_INIT\n//       * bytes or up to end of window, whichever is less.\n//       */\n//      init = s.window_size - curr;\n//      if (init > WIN_INIT)\n//        init = WIN_INIT;\n//      zmemzero(s->window + curr, (unsigned)init);\n//      s->high_water = curr + init;\n//    }\n//    else if (s->high_water < (ulg)curr + WIN_INIT) {\n//      /* High water mark at or above current data, but below current data\n//       * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n//       * to end of window, whichever is less.\n//       */\n//      init = (ulg)curr + WIN_INIT - s->high_water;\n//      if (init > s->window_size - s->high_water)\n//        init = s->window_size - s->high_water;\n//      zmemzero(s->window + s->high_water, (unsigned)init);\n//      s->high_water += init;\n//    }\n//  }\n//\n//  Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n//    \"not enough room for search\");\n}\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n * This function does not insert new strings in the dictionary since\n * uncompressible data is probably not useful. This function is used\n * only for the level=0 compression option.\n * NOTE: this function should be optimized to avoid extra copying from\n * window to pending_buf.\n */\nfunction deflate_stored(s, flush) {\n  /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n   * to pending_buf_size, and each stored block has a 5 byte header:\n   */\n  var max_block_size = 0xffff;\n\n  if (max_block_size > s.pending_buf_size - 5) {\n    max_block_size = s.pending_buf_size - 5;\n  }\n\n  /* Copy as much as possible from input to output: */\n  for (;;) {\n    /* Fill the window as much as possible: */\n    if (s.lookahead <= 1) {\n\n      //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n      //  s->block_start >= (long)s->w_size, \"slide too late\");\n//      if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n//        s.block_start >= s.w_size)) {\n//        throw  new Error(\"slide too late\");\n//      }\n\n      fill_window(s);\n      if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n        return BS_NEED_MORE;\n      }\n\n      if (s.lookahead === 0) {\n        break;\n      }\n      /* flush the current block */\n    }\n    //Assert(s->block_start >= 0L, \"block gone\");\n//    if (s.block_start < 0) throw new Error(\"block gone\");\n\n    s.strstart += s.lookahead;\n    s.lookahead = 0;\n\n    /* Emit a stored block if pending_buf will be full: */\n    var max_start = s.block_start + max_block_size;\n\n    if (s.strstart === 0 || s.strstart >= max_start) {\n      /* strstart == 0 is possible when wraparound on 16-bit machine */\n      s.lookahead = s.strstart - max_start;\n      s.strstart = max_start;\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n\n\n    }\n    /* Flush if we may have to slide, otherwise block_start may become\n     * negative and the data will be gone:\n     */\n    if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n    }\n  }\n\n  s.insert = 0;\n\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n\n  if (s.strstart > s.block_start) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n\n  return BS_NEED_MORE;\n}\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nfunction deflate_fast(s, flush) {\n  var hash_head;        /* head of the hash chain */\n  var bflush;           /* set if current block must be flushed */\n\n  for (;;) {\n    /* Make sure that we always have enough lookahead, except\n     * at the end of the input file. We need MAX_MATCH bytes\n     * for the next match, plus MIN_MATCH bytes to insert the\n     * string following the next match.\n     */\n    if (s.lookahead < MIN_LOOKAHEAD) {\n      fill_window(s);\n      if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n        return BS_NEED_MORE;\n      }\n      if (s.lookahead === 0) {\n        break; /* flush the current block */\n      }\n    }\n\n    /* Insert the string window[strstart .. strstart+2] in the\n     * dictionary, and set hash_head to the head of the hash chain:\n     */\n    hash_head = 0/*NIL*/;\n    if (s.lookahead >= MIN_MATCH) {\n      /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n      hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n      s.head[s.ins_h] = s.strstart;\n      /***/\n    }\n\n    /* Find the longest match, discarding those <= prev_length.\n     * At this point we have always match_length < MIN_MATCH\n     */\n    if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n      /* To simplify the code, we prevent matches with the string\n       * of window index 0 (in particular we have to avoid a match\n       * of the string with itself at the start of the input file).\n       */\n      s.match_length = longest_match(s, hash_head);\n      /* longest_match() sets match_start */\n    }\n    if (s.match_length >= MIN_MATCH) {\n      // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n      /*** _tr_tally_dist(s, s.strstart - s.match_start,\n                     s.match_length - MIN_MATCH, bflush); ***/\n      bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n\n      s.lookahead -= s.match_length;\n\n      /* Insert new strings in the hash table only if the match length\n       * is not too large. This saves time but degrades compression.\n       */\n      if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n        s.match_length--; /* string at strstart already in table */\n        do {\n          s.strstart++;\n          /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n          s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n          hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n          s.head[s.ins_h] = s.strstart;\n          /***/\n          /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n           * always MIN_MATCH bytes ahead.\n           */\n        } while (--s.match_length !== 0);\n        s.strstart++;\n      } else\n      {\n        s.strstart += s.match_length;\n        s.match_length = 0;\n        s.ins_h = s.window[s.strstart];\n        /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n        s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;\n\n//#if MIN_MATCH != 3\n//                Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n        /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n         * matter since it will be recomputed at next deflate call.\n         */\n      }\n    } else {\n      /* No match, output a literal byte */\n      //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n      /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n      bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n      s.lookahead--;\n      s.strstart++;\n    }\n    if (bflush) {\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n    }\n  }\n  s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n  if (s.last_lit) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n  return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nfunction deflate_slow(s, flush) {\n  var hash_head;          /* head of hash chain */\n  var bflush;              /* set if current block must be flushed */\n\n  var max_insert;\n\n  /* Process the input block. */\n  for (;;) {\n    /* Make sure that we always have enough lookahead, except\n     * at the end of the input file. We need MAX_MATCH bytes\n     * for the next match, plus MIN_MATCH bytes to insert the\n     * string following the next match.\n     */\n    if (s.lookahead < MIN_LOOKAHEAD) {\n      fill_window(s);\n      if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n        return BS_NEED_MORE;\n      }\n      if (s.lookahead === 0) { break; } /* flush the current block */\n    }\n\n    /* Insert the string window[strstart .. strstart+2] in the\n     * dictionary, and set hash_head to the head of the hash chain:\n     */\n    hash_head = 0/*NIL*/;\n    if (s.lookahead >= MIN_MATCH) {\n      /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n      hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n      s.head[s.ins_h] = s.strstart;\n      /***/\n    }\n\n    /* Find the longest match, discarding those <= prev_length.\n     */\n    s.prev_length = s.match_length;\n    s.prev_match = s.match_start;\n    s.match_length = MIN_MATCH - 1;\n\n    if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n        s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n      /* To simplify the code, we prevent matches with the string\n       * of window index 0 (in particular we have to avoid a match\n       * of the string with itself at the start of the input file).\n       */\n      s.match_length = longest_match(s, hash_head);\n      /* longest_match() sets match_start */\n\n      if (s.match_length <= 5 &&\n         (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n        /* If prev_match is also MIN_MATCH, match_start is garbage\n         * but we will ignore the current match anyway.\n         */\n        s.match_length = MIN_MATCH - 1;\n      }\n    }\n    /* If there was a match at the previous step and the current\n     * match is not better, output the previous match:\n     */\n    if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n      max_insert = s.strstart + s.lookahead - MIN_MATCH;\n      /* Do not insert strings in hash table beyond this. */\n\n      //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n      /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n                     s.prev_length - MIN_MATCH, bflush);***/\n      bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);\n      /* Insert in hash table all strings up to the end of the match.\n       * strstart-1 and strstart are already inserted. If there is not\n       * enough lookahead, the last two strings are not inserted in\n       * the hash table.\n       */\n      s.lookahead -= s.prev_length - 1;\n      s.prev_length -= 2;\n      do {\n        if (++s.strstart <= max_insert) {\n          /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n          s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n          hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n          s.head[s.ins_h] = s.strstart;\n          /***/\n        }\n      } while (--s.prev_length !== 0);\n      s.match_available = 0;\n      s.match_length = MIN_MATCH - 1;\n      s.strstart++;\n\n      if (bflush) {\n        /*** FLUSH_BLOCK(s, 0); ***/\n        flush_block_only(s, false);\n        if (s.strm.avail_out === 0) {\n          return BS_NEED_MORE;\n        }\n        /***/\n      }\n\n    } else if (s.match_available) {\n      /* If there was no match at the previous position, output a\n       * single literal. If there was a match but the current match\n       * is longer, truncate the previous match to a single literal.\n       */\n      //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n      /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n      bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n      if (bflush) {\n        /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n        flush_block_only(s, false);\n        /***/\n      }\n      s.strstart++;\n      s.lookahead--;\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n    } else {\n      /* There is no previous match to compare with, wait for\n       * the next step to decide.\n       */\n      s.match_available = 1;\n      s.strstart++;\n      s.lookahead--;\n    }\n  }\n  //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n  if (s.match_available) {\n    //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n    /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n    bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n    s.match_available = 0;\n  }\n  s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n  if (s.last_lit) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n\n  return BS_BLOCK_DONE;\n}\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one.  Do not maintain a hash table.  (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nfunction deflate_rle(s, flush) {\n  var bflush;            /* set if current block must be flushed */\n  var prev;              /* byte at distance one to match */\n  var scan, strend;      /* scan goes up to strend for length of run */\n\n  var _win = s.window;\n\n  for (;;) {\n    /* Make sure that we always have enough lookahead, except\n     * at the end of the input file. We need MAX_MATCH bytes\n     * for the longest run, plus one for the unrolled loop.\n     */\n    if (s.lookahead <= MAX_MATCH) {\n      fill_window(s);\n      if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {\n        return BS_NEED_MORE;\n      }\n      if (s.lookahead === 0) { break; } /* flush the current block */\n    }\n\n    /* See how many times the previous byte repeats */\n    s.match_length = 0;\n    if (s.lookahead >= MIN_MATCH && s.strstart > 0) {\n      scan = s.strstart - 1;\n      prev = _win[scan];\n      if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n        strend = s.strstart + MAX_MATCH;\n        do {\n          /*jshint noempty:false*/\n        } while (prev === _win[++scan] && prev === _win[++scan] &&\n                 prev === _win[++scan] && prev === _win[++scan] &&\n                 prev === _win[++scan] && prev === _win[++scan] &&\n                 prev === _win[++scan] && prev === _win[++scan] &&\n                 scan < strend);\n        s.match_length = MAX_MATCH - (strend - scan);\n        if (s.match_length > s.lookahead) {\n          s.match_length = s.lookahead;\n        }\n      }\n      //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n    }\n\n    /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n    if (s.match_length >= MIN_MATCH) {\n      //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n      /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n      bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH);\n\n      s.lookahead -= s.match_length;\n      s.strstart += s.match_length;\n      s.match_length = 0;\n    } else {\n      /* No match, output a literal byte */\n      //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n      /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n      bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n      s.lookahead--;\n      s.strstart++;\n    }\n    if (bflush) {\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n    }\n  }\n  s.insert = 0;\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n  if (s.last_lit) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n  return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches.  Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nfunction deflate_huff(s, flush) {\n  var bflush;             /* set if current block must be flushed */\n\n  for (;;) {\n    /* Make sure that we have a literal to write. */\n    if (s.lookahead === 0) {\n      fill_window(s);\n      if (s.lookahead === 0) {\n        if (flush === Z_NO_FLUSH) {\n          return BS_NEED_MORE;\n        }\n        break;      /* flush the current block */\n      }\n    }\n\n    /* Output a literal byte */\n    s.match_length = 0;\n    //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n    /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n    bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n    s.lookahead--;\n    s.strstart++;\n    if (bflush) {\n      /*** FLUSH_BLOCK(s, 0); ***/\n      flush_block_only(s, false);\n      if (s.strm.avail_out === 0) {\n        return BS_NEED_MORE;\n      }\n      /***/\n    }\n  }\n  s.insert = 0;\n  if (flush === Z_FINISH) {\n    /*** FLUSH_BLOCK(s, 1); ***/\n    flush_block_only(s, true);\n    if (s.strm.avail_out === 0) {\n      return BS_FINISH_STARTED;\n    }\n    /***/\n    return BS_FINISH_DONE;\n  }\n  if (s.last_lit) {\n    /*** FLUSH_BLOCK(s, 0); ***/\n    flush_block_only(s, false);\n    if (s.strm.avail_out === 0) {\n      return BS_NEED_MORE;\n    }\n    /***/\n  }\n  return BS_BLOCK_DONE;\n}\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n  this.good_length = good_length;\n  this.max_lazy = max_lazy;\n  this.nice_length = nice_length;\n  this.max_chain = max_chain;\n  this.func = func;\n}\n\nvar configuration_table;\n\nconfiguration_table = [\n  /*      good lazy nice chain */\n  new Config(0, 0, 0, 0, deflate_stored),          /* 0 store only */\n  new Config(4, 4, 8, 4, deflate_fast),            /* 1 max speed, no lazy matches */\n  new Config(4, 5, 16, 8, deflate_fast),           /* 2 */\n  new Config(4, 6, 32, 32, deflate_fast),          /* 3 */\n\n  new Config(4, 4, 16, 16, deflate_slow),          /* 4 lazy matches */\n  new Config(8, 16, 32, 32, deflate_slow),         /* 5 */\n  new Config(8, 16, 128, 128, deflate_slow),       /* 6 */\n  new Config(8, 32, 128, 256, deflate_slow),       /* 7 */\n  new Config(32, 128, 258, 1024, deflate_slow),    /* 8 */\n  new Config(32, 258, 258, 4096, deflate_slow)     /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nfunction lm_init(s) {\n  s.window_size = 2 * s.w_size;\n\n  /*** CLEAR_HASH(s); ***/\n  zero(s.head); // Fill with NIL (= 0);\n\n  /* Set the default configuration parameters:\n   */\n  s.max_lazy_match = configuration_table[s.level].max_lazy;\n  s.good_match = configuration_table[s.level].good_length;\n  s.nice_match = configuration_table[s.level].nice_length;\n  s.max_chain_length = configuration_table[s.level].max_chain;\n\n  s.strstart = 0;\n  s.block_start = 0;\n  s.lookahead = 0;\n  s.insert = 0;\n  s.match_length = s.prev_length = MIN_MATCH - 1;\n  s.match_available = 0;\n  s.ins_h = 0;\n}\n\n\nfunction DeflateState() {\n  this.strm = null;            /* pointer back to this zlib stream */\n  this.status = 0;            /* as the name implies */\n  this.pending_buf = null;      /* output still pending */\n  this.pending_buf_size = 0;  /* size of pending_buf */\n  this.pending_out = 0;       /* next pending byte to output to the stream */\n  this.pending = 0;           /* nb of bytes in the pending buffer */\n  this.wrap = 0;              /* bit 0 true for zlib, bit 1 true for gzip */\n  this.gzhead = null;         /* gzip header information to write */\n  this.gzindex = 0;           /* where in extra, name, or comment */\n  this.method = Z_DEFLATED; /* can only be DEFLATED */\n  this.last_flush = -1;   /* value of flush param for previous deflate call */\n\n  this.w_size = 0;  /* LZ77 window size (32K by default) */\n  this.w_bits = 0;  /* log2(w_size)  (8..16) */\n  this.w_mask = 0;  /* w_size - 1 */\n\n  this.window = null;\n  /* Sliding window. Input bytes are read into the second half of the window,\n   * and move to the first half later to keep a dictionary of at least wSize\n   * bytes. With this organization, matches are limited to a distance of\n   * wSize-MAX_MATCH bytes, but this ensures that IO is always\n   * performed with a length multiple of the block size.\n   */\n\n  this.window_size = 0;\n  /* Actual size of window: 2*wSize, except when the user input buffer\n   * is directly used as sliding window.\n   */\n\n  this.prev = null;\n  /* Link to older string with same hash index. To limit the size of this\n   * array to 64K, this link is maintained only for the last 32K strings.\n   * An index in this array is thus a window index modulo 32K.\n   */\n\n  this.head = null;   /* Heads of the hash chains or NIL. */\n\n  this.ins_h = 0;       /* hash index of string to be inserted */\n  this.hash_size = 0;   /* number of elements in hash table */\n  this.hash_bits = 0;   /* log2(hash_size) */\n  this.hash_mask = 0;   /* hash_size-1 */\n\n  this.hash_shift = 0;\n  /* Number of bits by which ins_h must be shifted at each input\n   * step. It must be such that after MIN_MATCH steps, the oldest\n   * byte no longer takes part in the hash key, that is:\n   *   hash_shift * MIN_MATCH >= hash_bits\n   */\n\n  this.block_start = 0;\n  /* Window position at the beginning of the current output block. Gets\n   * negative when the window is moved backwards.\n   */\n\n  this.match_length = 0;      /* length of best match */\n  this.prev_match = 0;        /* previous match */\n  this.match_available = 0;   /* set if previous match exists */\n  this.strstart = 0;          /* start of string to insert */\n  this.match_start = 0;       /* start of matching string */\n  this.lookahead = 0;         /* number of valid bytes ahead in window */\n\n  this.prev_length = 0;\n  /* Length of the best match at previous step. Matches not greater than this\n   * are discarded. This is used in the lazy match evaluation.\n   */\n\n  this.max_chain_length = 0;\n  /* To speed up deflation, hash chains are never searched beyond this\n   * length.  A higher limit improves compression ratio but degrades the\n   * speed.\n   */\n\n  this.max_lazy_match = 0;\n  /* Attempt to find a better match only when the current match is strictly\n   * smaller than this value. This mechanism is used only for compression\n   * levels >= 4.\n   */\n  // That's alias to max_lazy_match, don't use directly\n  //this.max_insert_length = 0;\n  /* Insert new strings in the hash table only if the match length is not\n   * greater than this length. This saves time but degrades compression.\n   * max_insert_length is used only for compression levels <= 3.\n   */\n\n  this.level = 0;     /* compression level (1..9) */\n  this.strategy = 0;  /* favor or force Huffman coding*/\n\n  this.good_match = 0;\n  /* Use a faster search when the previous match is longer than this */\n\n  this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n              /* used by trees.c: */\n\n  /* Didn't use ct_data typedef below to suppress compiler warning */\n\n  // struct ct_data_s dyn_ltree[HEAP_SIZE];   /* literal and length tree */\n  // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n  // struct ct_data_s bl_tree[2*BL_CODES+1];  /* Huffman tree for bit lengths */\n\n  // Use flat array of DOUBLE size, with interleaved fata,\n  // because JS does not support effective\n  this.dyn_ltree  = new utils.Buf16(HEAP_SIZE * 2);\n  this.dyn_dtree  = new utils.Buf16((2 * D_CODES + 1) * 2);\n  this.bl_tree    = new utils.Buf16((2 * BL_CODES + 1) * 2);\n  zero(this.dyn_ltree);\n  zero(this.dyn_dtree);\n  zero(this.bl_tree);\n\n  this.l_desc   = null;         /* desc. for literal tree */\n  this.d_desc   = null;         /* desc. for distance tree */\n  this.bl_desc  = null;         /* desc. for bit length tree */\n\n  //ush bl_count[MAX_BITS+1];\n  this.bl_count = new utils.Buf16(MAX_BITS + 1);\n  /* number of codes at each bit length for an optimal tree */\n\n  //int heap[2*L_CODES+1];      /* heap used to build the Huffman trees */\n  this.heap = new utils.Buf16(2 * L_CODES + 1);  /* heap used to build the Huffman trees */\n  zero(this.heap);\n\n  this.heap_len = 0;               /* number of elements in the heap */\n  this.heap_max = 0;               /* element of largest frequency */\n  /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n   * The same heap array is used to build all trees.\n   */\n\n  this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1];\n  zero(this.depth);\n  /* Depth of each subtree used as tie breaker for trees of equal frequency\n   */\n\n  this.l_buf = 0;          /* buffer index for literals or lengths */\n\n  this.lit_bufsize = 0;\n  /* Size of match buffer for literals/lengths.  There are 4 reasons for\n   * limiting lit_bufsize to 64K:\n   *   - frequencies can be kept in 16 bit counters\n   *   - if compression is not successful for the first block, all input\n   *     data is still in the window so we can still emit a stored block even\n   *     when input comes from standard input.  (This can also be done for\n   *     all blocks if lit_bufsize is not greater than 32K.)\n   *   - if compression is not successful for a file smaller than 64K, we can\n   *     even emit a stored file instead of a stored block (saving 5 bytes).\n   *     This is applicable only for zip (not gzip or zlib).\n   *   - creating new Huffman trees less frequently may not provide fast\n   *     adaptation to changes in the input data statistics. (Take for\n   *     example a binary file with poorly compressible code followed by\n   *     a highly compressible string table.) Smaller buffer sizes give\n   *     fast adaptation but have of course the overhead of transmitting\n   *     trees more frequently.\n   *   - I can't count above 4\n   */\n\n  this.last_lit = 0;      /* running index in l_buf */\n\n  this.d_buf = 0;\n  /* Buffer index for distances. To simplify the code, d_buf and l_buf have\n   * the same number of elements. To use different lengths, an extra flag\n   * array would be necessary.\n   */\n\n  this.opt_len = 0;       /* bit length of current block with optimal trees */\n  this.static_len = 0;    /* bit length of current block with static trees */\n  this.matches = 0;       /* number of string matches in current block */\n  this.insert = 0;        /* bytes at end of window left to insert */\n\n\n  this.bi_buf = 0;\n  /* Output buffer. bits are inserted starting at the bottom (least\n   * significant bits).\n   */\n  this.bi_valid = 0;\n  /* Number of valid bits in bi_buf.  All bits above the last valid bit\n   * are always zero.\n   */\n\n  // Used for window memory init. We safely ignore it for JS. That makes\n  // sense only for pointers and memory check tools.\n  //this.high_water = 0;\n  /* High water mark offset in window for initialized bytes -- bytes above\n   * this are set to zero in order to avoid memory check warnings when\n   * longest match routines access bytes past the input.  This is then\n   * updated to the new high water mark.\n   */\n}\n\n\nfunction deflateResetKeep(strm) {\n  var s;\n\n  if (!strm || !strm.state) {\n    return err(strm, Z_STREAM_ERROR);\n  }\n\n  strm.total_in = strm.total_out = 0;\n  strm.data_type = Z_UNKNOWN;\n\n  s = strm.state;\n  s.pending = 0;\n  s.pending_out = 0;\n\n  if (s.wrap < 0) {\n    s.wrap = -s.wrap;\n    /* was made negative by deflate(..., Z_FINISH); */\n  }\n  s.status = (s.wrap ? INIT_STATE : BUSY_STATE);\n  strm.adler = (s.wrap === 2) ?\n    0  // crc32(0, Z_NULL, 0)\n  :\n    1; // adler32(0, Z_NULL, 0)\n  s.last_flush = Z_NO_FLUSH;\n  trees._tr_init(s);\n  return Z_OK;\n}\n\n\nfunction deflateReset(strm) {\n  var ret = deflateResetKeep(strm);\n  if (ret === Z_OK) {\n    lm_init(strm.state);\n  }\n  return ret;\n}\n\n\nfunction deflateSetHeader(strm, head) {\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }\n  strm.state.gzhead = head;\n  return Z_OK;\n}\n\n\nfunction deflateInit2(strm, level, method, windowBits, memLevel, strategy) {\n  if (!strm) { // === Z_NULL\n    return Z_STREAM_ERROR;\n  }\n  var wrap = 1;\n\n  if (level === Z_DEFAULT_COMPRESSION) {\n    level = 6;\n  }\n\n  if (windowBits < 0) { /* suppress zlib wrapper */\n    wrap = 0;\n    windowBits = -windowBits;\n  }\n\n  else if (windowBits > 15) {\n    wrap = 2;           /* write gzip wrapper instead */\n    windowBits -= 16;\n  }\n\n\n  if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||\n    windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n    strategy < 0 || strategy > Z_FIXED) {\n    return err(strm, Z_STREAM_ERROR);\n  }\n\n\n  if (windowBits === 8) {\n    windowBits = 9;\n  }\n  /* until 256-byte window bug fixed */\n\n  var s = new DeflateState();\n\n  strm.state = s;\n  s.strm = strm;\n\n  s.wrap = wrap;\n  s.gzhead = null;\n  s.w_bits = windowBits;\n  s.w_size = 1 << s.w_bits;\n  s.w_mask = s.w_size - 1;\n\n  s.hash_bits = memLevel + 7;\n  s.hash_size = 1 << s.hash_bits;\n  s.hash_mask = s.hash_size - 1;\n  s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n  s.window = new utils.Buf8(s.w_size * 2);\n  s.head = new utils.Buf16(s.hash_size);\n  s.prev = new utils.Buf16(s.w_size);\n\n  // Don't need mem init magic for JS.\n  //s.high_water = 0;  /* nothing written to s->window yet */\n\n  s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n  s.pending_buf_size = s.lit_bufsize * 4;\n\n  //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);\n  //s->pending_buf = (uchf *) overlay;\n  s.pending_buf = new utils.Buf8(s.pending_buf_size);\n\n  // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)\n  //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);\n  s.d_buf = 1 * s.lit_bufsize;\n\n  //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;\n  s.l_buf = (1 + 2) * s.lit_bufsize;\n\n  s.level = level;\n  s.strategy = strategy;\n  s.method = method;\n\n  return deflateReset(strm);\n}\n\nfunction deflateInit(strm, level) {\n  return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n}\n\n\nfunction deflate(strm, flush) {\n  var old_flush, s;\n  var beg, val; // for gzip header write only\n\n  if (!strm || !strm.state ||\n    flush > Z_BLOCK || flush < 0) {\n    return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n  }\n\n  s = strm.state;\n\n  if (!strm.output ||\n      (!strm.input && strm.avail_in !== 0) ||\n      (s.status === FINISH_STATE && flush !== Z_FINISH)) {\n    return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);\n  }\n\n  s.strm = strm; /* just in case */\n  old_flush = s.last_flush;\n  s.last_flush = flush;\n\n  /* Write the header */\n  if (s.status === INIT_STATE) {\n\n    if (s.wrap === 2) { // GZIP header\n      strm.adler = 0;  //crc32(0L, Z_NULL, 0);\n      put_byte(s, 31);\n      put_byte(s, 139);\n      put_byte(s, 8);\n      if (!s.gzhead) { // s->gzhead == Z_NULL\n        put_byte(s, 0);\n        put_byte(s, 0);\n        put_byte(s, 0);\n        put_byte(s, 0);\n        put_byte(s, 0);\n        put_byte(s, s.level === 9 ? 2 :\n                    (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n                     4 : 0));\n        put_byte(s, OS_CODE);\n        s.status = BUSY_STATE;\n      }\n      else {\n        put_byte(s, (s.gzhead.text ? 1 : 0) +\n                    (s.gzhead.hcrc ? 2 : 0) +\n                    (!s.gzhead.extra ? 0 : 4) +\n                    (!s.gzhead.name ? 0 : 8) +\n                    (!s.gzhead.comment ? 0 : 16)\n                );\n        put_byte(s, s.gzhead.time & 0xff);\n        put_byte(s, (s.gzhead.time >> 8) & 0xff);\n        put_byte(s, (s.gzhead.time >> 16) & 0xff);\n        put_byte(s, (s.gzhead.time >> 24) & 0xff);\n        put_byte(s, s.level === 9 ? 2 :\n                    (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n                     4 : 0));\n        put_byte(s, s.gzhead.os & 0xff);\n        if (s.gzhead.extra && s.gzhead.extra.length) {\n          put_byte(s, s.gzhead.extra.length & 0xff);\n          put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n        }\n        if (s.gzhead.hcrc) {\n          strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);\n        }\n        s.gzindex = 0;\n        s.status = EXTRA_STATE;\n      }\n    }\n    else // DEFLATE header\n    {\n      var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;\n      var level_flags = -1;\n\n      if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n        level_flags = 0;\n      } else if (s.level < 6) {\n        level_flags = 1;\n      } else if (s.level === 6) {\n        level_flags = 2;\n      } else {\n        level_flags = 3;\n      }\n      header |= (level_flags << 6);\n      if (s.strstart !== 0) { header |= PRESET_DICT; }\n      header += 31 - (header % 31);\n\n      s.status = BUSY_STATE;\n      putShortMSB(s, header);\n\n      /* Save the adler32 of the preset dictionary: */\n      if (s.strstart !== 0) {\n        putShortMSB(s, strm.adler >>> 16);\n        putShortMSB(s, strm.adler & 0xffff);\n      }\n      strm.adler = 1; // adler32(0L, Z_NULL, 0);\n    }\n  }\n\n//#ifdef GZIP\n  if (s.status === EXTRA_STATE) {\n    if (s.gzhead.extra/* != Z_NULL*/) {\n      beg = s.pending;  /* start of bytes to update crc */\n\n      while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {\n        if (s.pending === s.pending_buf_size) {\n          if (s.gzhead.hcrc && s.pending > beg) {\n            strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n          }\n          flush_pending(strm);\n          beg = s.pending;\n          if (s.pending === s.pending_buf_size) {\n            break;\n          }\n        }\n        put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);\n        s.gzindex++;\n      }\n      if (s.gzhead.hcrc && s.pending > beg) {\n        strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n      }\n      if (s.gzindex === s.gzhead.extra.length) {\n        s.gzindex = 0;\n        s.status = NAME_STATE;\n      }\n    }\n    else {\n      s.status = NAME_STATE;\n    }\n  }\n  if (s.status === NAME_STATE) {\n    if (s.gzhead.name/* != Z_NULL*/) {\n      beg = s.pending;  /* start of bytes to update crc */\n      //int val;\n\n      do {\n        if (s.pending === s.pending_buf_size) {\n          if (s.gzhead.hcrc && s.pending > beg) {\n            strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n          }\n          flush_pending(strm);\n          beg = s.pending;\n          if (s.pending === s.pending_buf_size) {\n            val = 1;\n            break;\n          }\n        }\n        // JS specific: little magic to add zero terminator to end of string\n        if (s.gzindex < s.gzhead.name.length) {\n          val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n        } else {\n          val = 0;\n        }\n        put_byte(s, val);\n      } while (val !== 0);\n\n      if (s.gzhead.hcrc && s.pending > beg) {\n        strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n      }\n      if (val === 0) {\n        s.gzindex = 0;\n        s.status = COMMENT_STATE;\n      }\n    }\n    else {\n      s.status = COMMENT_STATE;\n    }\n  }\n  if (s.status === COMMENT_STATE) {\n    if (s.gzhead.comment/* != Z_NULL*/) {\n      beg = s.pending;  /* start of bytes to update crc */\n      //int val;\n\n      do {\n        if (s.pending === s.pending_buf_size) {\n          if (s.gzhead.hcrc && s.pending > beg) {\n            strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n          }\n          flush_pending(strm);\n          beg = s.pending;\n          if (s.pending === s.pending_buf_size) {\n            val = 1;\n            break;\n          }\n        }\n        // JS specific: little magic to add zero terminator to end of string\n        if (s.gzindex < s.gzhead.comment.length) {\n          val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n        } else {\n          val = 0;\n        }\n        put_byte(s, val);\n      } while (val !== 0);\n\n      if (s.gzhead.hcrc && s.pending > beg) {\n        strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n      }\n      if (val === 0) {\n        s.status = HCRC_STATE;\n      }\n    }\n    else {\n      s.status = HCRC_STATE;\n    }\n  }\n  if (s.status === HCRC_STATE) {\n    if (s.gzhead.hcrc) {\n      if (s.pending + 2 > s.pending_buf_size) {\n        flush_pending(strm);\n      }\n      if (s.pending + 2 <= s.pending_buf_size) {\n        put_byte(s, strm.adler & 0xff);\n        put_byte(s, (strm.adler >> 8) & 0xff);\n        strm.adler = 0; //crc32(0L, Z_NULL, 0);\n        s.status = BUSY_STATE;\n      }\n    }\n    else {\n      s.status = BUSY_STATE;\n    }\n  }\n//#endif\n\n  /* Flush as much pending output as possible */\n  if (s.pending !== 0) {\n    flush_pending(strm);\n    if (strm.avail_out === 0) {\n      /* Since avail_out is 0, deflate will be called again with\n       * more output space, but possibly with both pending and\n       * avail_in equal to zero. There won't be anything to do,\n       * but this is not an error situation so make sure we\n       * return OK instead of BUF_ERROR at next call of deflate:\n       */\n      s.last_flush = -1;\n      return Z_OK;\n    }\n\n    /* Make sure there is something to do and avoid duplicate consecutive\n     * flushes. For repeated and useless calls with Z_FINISH, we keep\n     * returning Z_STREAM_END instead of Z_BUF_ERROR.\n     */\n  } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n    flush !== Z_FINISH) {\n    return err(strm, Z_BUF_ERROR);\n  }\n\n  /* User must not provide more input after the first FINISH: */\n  if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n    return err(strm, Z_BUF_ERROR);\n  }\n\n  /* Start a new block or continue the current one.\n   */\n  if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n    (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {\n    var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :\n      (s.strategy === Z_RLE ? deflate_rle(s, flush) :\n        configuration_table[s.level].func(s, flush));\n\n    if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n      s.status = FINISH_STATE;\n    }\n    if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n      if (strm.avail_out === 0) {\n        s.last_flush = -1;\n        /* avoid BUF_ERROR next call, see above */\n      }\n      return Z_OK;\n      /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n       * of deflate should use the same flush parameter to make sure\n       * that the flush is complete. So we don't have to output an\n       * empty block here, this will be done at next call. This also\n       * ensures that for a very small output buffer, we emit at most\n       * one empty block.\n       */\n    }\n    if (bstate === BS_BLOCK_DONE) {\n      if (flush === Z_PARTIAL_FLUSH) {\n        trees._tr_align(s);\n      }\n      else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */\n\n        trees._tr_stored_block(s, 0, 0, false);\n        /* For a full flush, this empty block will be recognized\n         * as a special marker by inflate_sync().\n         */\n        if (flush === Z_FULL_FLUSH) {\n          /*** CLEAR_HASH(s); ***/             /* forget history */\n          zero(s.head); // Fill with NIL (= 0);\n\n          if (s.lookahead === 0) {\n            s.strstart = 0;\n            s.block_start = 0;\n            s.insert = 0;\n          }\n        }\n      }\n      flush_pending(strm);\n      if (strm.avail_out === 0) {\n        s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n        return Z_OK;\n      }\n    }\n  }\n  //Assert(strm->avail_out > 0, \"bug2\");\n  //if (strm.avail_out <= 0) { throw new Error(\"bug2\");}\n\n  if (flush !== Z_FINISH) { return Z_OK; }\n  if (s.wrap <= 0) { return Z_STREAM_END; }\n\n  /* Write the trailer */\n  if (s.wrap === 2) {\n    put_byte(s, strm.adler & 0xff);\n    put_byte(s, (strm.adler >> 8) & 0xff);\n    put_byte(s, (strm.adler >> 16) & 0xff);\n    put_byte(s, (strm.adler >> 24) & 0xff);\n    put_byte(s, strm.total_in & 0xff);\n    put_byte(s, (strm.total_in >> 8) & 0xff);\n    put_byte(s, (strm.total_in >> 16) & 0xff);\n    put_byte(s, (strm.total_in >> 24) & 0xff);\n  }\n  else\n  {\n    putShortMSB(s, strm.adler >>> 16);\n    putShortMSB(s, strm.adler & 0xffff);\n  }\n\n  flush_pending(strm);\n  /* If avail_out is zero, the application will call deflate again\n   * to flush the rest.\n   */\n  if (s.wrap > 0) { s.wrap = -s.wrap; }\n  /* write the trailer only once! */\n  return s.pending !== 0 ? Z_OK : Z_STREAM_END;\n}\n\nfunction deflateEnd(strm) {\n  var status;\n\n  if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n    return Z_STREAM_ERROR;\n  }\n\n  status = strm.state.status;\n  if (status !== INIT_STATE &&\n    status !== EXTRA_STATE &&\n    status !== NAME_STATE &&\n    status !== COMMENT_STATE &&\n    status !== HCRC_STATE &&\n    status !== BUSY_STATE &&\n    status !== FINISH_STATE\n  ) {\n    return err(strm, Z_STREAM_ERROR);\n  }\n\n  strm.state = null;\n\n  return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;\n}\n\n\n/* =========================================================================\n * Initializes the compression dictionary from the given byte\n * sequence without producing any compressed output.\n */\nfunction deflateSetDictionary(strm, dictionary) {\n  var dictLength = dictionary.length;\n\n  var s;\n  var str, n;\n  var wrap;\n  var avail;\n  var next;\n  var input;\n  var tmpDict;\n\n  if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n    return Z_STREAM_ERROR;\n  }\n\n  s = strm.state;\n  wrap = s.wrap;\n\n  if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {\n    return Z_STREAM_ERROR;\n  }\n\n  /* when using zlib wrappers, compute Adler-32 for provided dictionary */\n  if (wrap === 1) {\n    /* adler32(strm->adler, dictionary, dictLength); */\n    strm.adler = adler32(strm.adler, dictionary, dictLength, 0);\n  }\n\n  s.wrap = 0;   /* avoid computing Adler-32 in read_buf */\n\n  /* if dictionary would fill window, just replace the history */\n  if (dictLength >= s.w_size) {\n    if (wrap === 0) {            /* already empty otherwise */\n      /*** CLEAR_HASH(s); ***/\n      zero(s.head); // Fill with NIL (= 0);\n      s.strstart = 0;\n      s.block_start = 0;\n      s.insert = 0;\n    }\n    /* use the tail */\n    // dictionary = dictionary.slice(dictLength - s.w_size);\n    tmpDict = new utils.Buf8(s.w_size);\n    utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0);\n    dictionary = tmpDict;\n    dictLength = s.w_size;\n  }\n  /* insert dictionary into window and hash */\n  avail = strm.avail_in;\n  next = strm.next_in;\n  input = strm.input;\n  strm.avail_in = dictLength;\n  strm.next_in = 0;\n  strm.input = dictionary;\n  fill_window(s);\n  while (s.lookahead >= MIN_MATCH) {\n    str = s.strstart;\n    n = s.lookahead - (MIN_MATCH - 1);\n    do {\n      /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n      s.prev[str & s.w_mask] = s.head[s.ins_h];\n\n      s.head[s.ins_h] = str;\n      str++;\n    } while (--n);\n    s.strstart = str;\n    s.lookahead = MIN_MATCH - 1;\n    fill_window(s);\n  }\n  s.strstart += s.lookahead;\n  s.block_start = s.strstart;\n  s.insert = s.lookahead;\n  s.lookahead = 0;\n  s.match_length = s.prev_length = MIN_MATCH - 1;\n  s.match_available = 0;\n  strm.next_in = next;\n  strm.input = input;\n  strm.avail_in = avail;\n  s.wrap = wrap;\n  return Z_OK;\n}\n\n\nexports.deflateInit = deflateInit;\nexports.deflateInit2 = deflateInit2;\nexports.deflateReset = deflateReset;\nexports.deflateResetKeep = deflateResetKeep;\nexports.deflateSetHeader = deflateSetHeader;\nexports.deflate = deflate;\nexports.deflateEnd = deflateEnd;\nexports.deflateSetDictionary = deflateSetDictionary;\nexports.deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nexports.deflateBound = deflateBound;\nexports.deflateCopy = deflateCopy;\nexports.deflateParams = deflateParams;\nexports.deflatePending = deflatePending;\nexports.deflatePrime = deflatePrime;\nexports.deflateTune = deflateTune;\n*/\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction GZheader() {\n  /* true if compressed data believed to be text */\n  this.text       = 0;\n  /* modification time */\n  this.time       = 0;\n  /* extra flags (not used when writing a gzip file) */\n  this.xflags     = 0;\n  /* operating system */\n  this.os         = 0;\n  /* pointer to extra field or Z_NULL if none */\n  this.extra      = null;\n  /* extra field length (valid if extra != Z_NULL) */\n  this.extra_len  = 0; // Actually, we don't need it in JS,\n                       // but leave for few code modifications\n\n  //\n  // Setup limits is not necessary because in js we should not preallocate memory\n  // for inflate use constant limit in 65536 bytes\n  //\n\n  /* space at extra (only when reading header) */\n  // this.extra_max  = 0;\n  /* pointer to zero-terminated file name or Z_NULL */\n  this.name       = '';\n  /* space at name (only when reading header) */\n  // this.name_max   = 0;\n  /* pointer to zero-terminated comment or Z_NULL */\n  this.comment    = '';\n  /* space at comment (only when reading header) */\n  // this.comm_max   = 0;\n  /* true if there was or will be a header crc */\n  this.hcrc       = 0;\n  /* true when done reading gzip header (not used when writing a gzip file) */\n  this.done       = false;\n}\n\nmodule.exports = GZheader;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// See state defs from inflate.js\nvar BAD = 30;       /* got a data error -- remain here until reset */\nvar TYPE = 12;      /* i: waiting for type bits, including last-flag bit */\n\n/*\n   Decode literal, length, and distance codes and write out the resulting\n   literal and match bytes until either not enough input or output is\n   available, an end-of-block is encountered, or a data error is encountered.\n   When large enough input and output buffers are supplied to inflate(), for\n   example, a 16K input buffer and a 64K output buffer, more than 95% of the\n   inflate execution time is spent in this routine.\n\n   Entry assumptions:\n\n        state.mode === LEN\n        strm.avail_in >= 6\n        strm.avail_out >= 258\n        start >= strm.avail_out\n        state.bits < 8\n\n   On return, state.mode is one of:\n\n        LEN -- ran out of enough output space or enough available input\n        TYPE -- reached end of block code, inflate() to interpret next block\n        BAD -- error in block data\n\n   Notes:\n\n    - The maximum input bits used by a length/distance pair is 15 bits for the\n      length code, 5 bits for the length extra, 15 bits for the distance code,\n      and 13 bits for the distance extra.  This totals 48 bits, or six bytes.\n      Therefore if strm.avail_in >= 6, then there is enough input to avoid\n      checking for available input while decoding.\n\n    - The maximum bytes that a single length/distance pair can output is 258\n      bytes, which is the maximum length that can be coded.  inflate_fast()\n      requires strm.avail_out >= 258 for each loop to avoid checking for\n      output space.\n */\nmodule.exports = function inflate_fast(strm, start) {\n  var state;\n  var _in;                    /* local strm.input */\n  var last;                   /* have enough input while in < last */\n  var _out;                   /* local strm.output */\n  var beg;                    /* inflate()'s initial strm.output */\n  var end;                    /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n  var dmax;                   /* maximum distance from zlib header */\n//#endif\n  var wsize;                  /* window size or zero if not using window */\n  var whave;                  /* valid bytes in the window */\n  var wnext;                  /* window write index */\n  // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n  var s_window;               /* allocated sliding window, if wsize != 0 */\n  var hold;                   /* local strm.hold */\n  var bits;                   /* local strm.bits */\n  var lcode;                  /* local strm.lencode */\n  var dcode;                  /* local strm.distcode */\n  var lmask;                  /* mask for first level of length codes */\n  var dmask;                  /* mask for first level of distance codes */\n  var here;                   /* retrieved table entry */\n  var op;                     /* code bits, operation, extra bits, or */\n                              /*  window position, window bytes to copy */\n  var len;                    /* match length, unused bytes */\n  var dist;                   /* match distance */\n  var from;                   /* where to copy match from */\n  var from_source;\n\n\n  var input, output; // JS specific, because we have no pointers\n\n  /* copy state to local variables */\n  state = strm.state;\n  //here = state.here;\n  _in = strm.next_in;\n  input = strm.input;\n  last = _in + (strm.avail_in - 5);\n  _out = strm.next_out;\n  output = strm.output;\n  beg = _out - (start - strm.avail_out);\n  end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n  dmax = state.dmax;\n//#endif\n  wsize = state.wsize;\n  whave = state.whave;\n  wnext = state.wnext;\n  s_window = state.window;\n  hold = state.hold;\n  bits = state.bits;\n  lcode = state.lencode;\n  dcode = state.distcode;\n  lmask = (1 << state.lenbits) - 1;\n  dmask = (1 << state.distbits) - 1;\n\n\n  /* decode literals and length/distances until end-of-block or not enough\n     input data or output space */\n\n  top:\n  do {\n    if (bits < 15) {\n      hold += input[_in++] << bits;\n      bits += 8;\n      hold += input[_in++] << bits;\n      bits += 8;\n    }\n\n    here = lcode[hold & lmask];\n\n    dolen:\n    for (;;) { // Goto emulation\n      op = here >>> 24/*here.bits*/;\n      hold >>>= op;\n      bits -= op;\n      op = (here >>> 16) & 0xff/*here.op*/;\n      if (op === 0) {                          /* literal */\n        //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n        //        \"inflate:         literal '%c'\\n\" :\n        //        \"inflate:         literal 0x%02x\\n\", here.val));\n        output[_out++] = here & 0xffff/*here.val*/;\n      }\n      else if (op & 16) {                     /* length base */\n        len = here & 0xffff/*here.val*/;\n        op &= 15;                           /* number of extra bits */\n        if (op) {\n          if (bits < op) {\n            hold += input[_in++] << bits;\n            bits += 8;\n          }\n          len += hold & ((1 << op) - 1);\n          hold >>>= op;\n          bits -= op;\n        }\n        //Tracevv((stderr, \"inflate:         length %u\\n\", len));\n        if (bits < 15) {\n          hold += input[_in++] << bits;\n          bits += 8;\n          hold += input[_in++] << bits;\n          bits += 8;\n        }\n        here = dcode[hold & dmask];\n\n        dodist:\n        for (;;) { // goto emulation\n          op = here >>> 24/*here.bits*/;\n          hold >>>= op;\n          bits -= op;\n          op = (here >>> 16) & 0xff/*here.op*/;\n\n          if (op & 16) {                      /* distance base */\n            dist = here & 0xffff/*here.val*/;\n            op &= 15;                       /* number of extra bits */\n            if (bits < op) {\n              hold += input[_in++] << bits;\n              bits += 8;\n              if (bits < op) {\n                hold += input[_in++] << bits;\n                bits += 8;\n              }\n            }\n            dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n            if (dist > dmax) {\n              strm.msg = 'invalid distance too far back';\n              state.mode = BAD;\n              break top;\n            }\n//#endif\n            hold >>>= op;\n            bits -= op;\n            //Tracevv((stderr, \"inflate:         distance %u\\n\", dist));\n            op = _out - beg;                /* max distance in output */\n            if (dist > op) {                /* see if copy from window */\n              op = dist - op;               /* distance back in window */\n              if (op > whave) {\n                if (state.sane) {\n                  strm.msg = 'invalid distance too far back';\n                  state.mode = BAD;\n                  break top;\n                }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n//                if (len <= op - whave) {\n//                  do {\n//                    output[_out++] = 0;\n//                  } while (--len);\n//                  continue top;\n//                }\n//                len -= op - whave;\n//                do {\n//                  output[_out++] = 0;\n//                } while (--op > whave);\n//                if (op === 0) {\n//                  from = _out - dist;\n//                  do {\n//                    output[_out++] = output[from++];\n//                  } while (--len);\n//                  continue top;\n//                }\n//#endif\n              }\n              from = 0; // window index\n              from_source = s_window;\n              if (wnext === 0) {           /* very common case */\n                from += wsize - op;\n                if (op < len) {         /* some from window */\n                  len -= op;\n                  do {\n                    output[_out++] = s_window[from++];\n                  } while (--op);\n                  from = _out - dist;  /* rest from output */\n                  from_source = output;\n                }\n              }\n              else if (wnext < op) {      /* wrap around window */\n                from += wsize + wnext - op;\n                op -= wnext;\n                if (op < len) {         /* some from end of window */\n                  len -= op;\n                  do {\n                    output[_out++] = s_window[from++];\n                  } while (--op);\n                  from = 0;\n                  if (wnext < len) {  /* some from start of window */\n                    op = wnext;\n                    len -= op;\n                    do {\n                      output[_out++] = s_window[from++];\n                    } while (--op);\n                    from = _out - dist;      /* rest from output */\n                    from_source = output;\n                  }\n                }\n              }\n              else {                      /* contiguous in window */\n                from += wnext - op;\n                if (op < len) {         /* some from window */\n                  len -= op;\n                  do {\n                    output[_out++] = s_window[from++];\n                  } while (--op);\n                  from = _out - dist;  /* rest from output */\n                  from_source = output;\n                }\n              }\n              while (len > 2) {\n                output[_out++] = from_source[from++];\n                output[_out++] = from_source[from++];\n                output[_out++] = from_source[from++];\n                len -= 3;\n              }\n              if (len) {\n                output[_out++] = from_source[from++];\n                if (len > 1) {\n                  output[_out++] = from_source[from++];\n                }\n              }\n            }\n            else {\n              from = _out - dist;          /* copy direct from output */\n              do {                        /* minimum length is three */\n                output[_out++] = output[from++];\n                output[_out++] = output[from++];\n                output[_out++] = output[from++];\n                len -= 3;\n              } while (len > 2);\n              if (len) {\n                output[_out++] = output[from++];\n                if (len > 1) {\n                  output[_out++] = output[from++];\n                }\n              }\n            }\n          }\n          else if ((op & 64) === 0) {          /* 2nd level distance code */\n            here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n            continue dodist;\n          }\n          else {\n            strm.msg = 'invalid distance code';\n            state.mode = BAD;\n            break top;\n          }\n\n          break; // need to emulate goto via \"continue\"\n        }\n      }\n      else if ((op & 64) === 0) {              /* 2nd level length code */\n        here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n        continue dolen;\n      }\n      else if (op & 32) {                     /* end-of-block */\n        //Tracevv((stderr, \"inflate:         end of block\\n\"));\n        state.mode = TYPE;\n        break top;\n      }\n      else {\n        strm.msg = 'invalid literal/length code';\n        state.mode = BAD;\n        break top;\n      }\n\n      break; // need to emulate goto via \"continue\"\n    }\n  } while (_in < last && _out < end);\n\n  /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n  len = bits >> 3;\n  _in -= len;\n  bits -= len << 3;\n  hold &= (1 << bits) - 1;\n\n  /* update state and return */\n  strm.next_in = _in;\n  strm.next_out = _out;\n  strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n  strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n  state.hold = hold;\n  state.bits = bits;\n  return;\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils         = require('../utils/common');\nvar adler32       = require('./adler32');\nvar crc32         = require('./crc32');\nvar inflate_fast  = require('./inffast');\nvar inflate_table = require('./inftrees');\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\n//var Z_NO_FLUSH      = 0;\n//var Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH    = 2;\n//var Z_FULL_FLUSH    = 3;\nvar Z_FINISH        = 4;\nvar Z_BLOCK         = 5;\nvar Z_TREES         = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK            = 0;\nvar Z_STREAM_END    = 1;\nvar Z_NEED_DICT     = 2;\n//var Z_ERRNO         = -1;\nvar Z_STREAM_ERROR  = -2;\nvar Z_DATA_ERROR    = -3;\nvar Z_MEM_ERROR     = -4;\nvar Z_BUF_ERROR     = -5;\n//var Z_VERSION_ERROR = -6;\n\n/* The deflate compression method */\nvar Z_DEFLATED  = 8;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nvar    HEAD = 1;       /* i: waiting for magic header */\nvar    FLAGS = 2;      /* i: waiting for method and flags (gzip) */\nvar    TIME = 3;       /* i: waiting for modification time (gzip) */\nvar    OS = 4;         /* i: waiting for extra flags and operating system (gzip) */\nvar    EXLEN = 5;      /* i: waiting for extra length (gzip) */\nvar    EXTRA = 6;      /* i: waiting for extra bytes (gzip) */\nvar    NAME = 7;       /* i: waiting for end of file name (gzip) */\nvar    COMMENT = 8;    /* i: waiting for end of comment (gzip) */\nvar    HCRC = 9;       /* i: waiting for header crc (gzip) */\nvar    DICTID = 10;    /* i: waiting for dictionary check value */\nvar    DICT = 11;      /* waiting for inflateSetDictionary() call */\nvar        TYPE = 12;      /* i: waiting for type bits, including last-flag bit */\nvar        TYPEDO = 13;    /* i: same, but skip check to exit inflate on new block */\nvar        STORED = 14;    /* i: waiting for stored size (length and complement) */\nvar        COPY_ = 15;     /* i/o: same as COPY below, but only first time in */\nvar        COPY = 16;      /* i/o: waiting for input or output to copy stored block */\nvar        TABLE = 17;     /* i: waiting for dynamic block table lengths */\nvar        LENLENS = 18;   /* i: waiting for code length code lengths */\nvar        CODELENS = 19;  /* i: waiting for length/lit and distance code lengths */\nvar            LEN_ = 20;      /* i: same as LEN below, but only first time in */\nvar            LEN = 21;       /* i: waiting for length/lit/eob code */\nvar            LENEXT = 22;    /* i: waiting for length extra bits */\nvar            DIST = 23;      /* i: waiting for distance code */\nvar            DISTEXT = 24;   /* i: waiting for distance extra bits */\nvar            MATCH = 25;     /* o: waiting for output space to copy string */\nvar            LIT = 26;       /* o: waiting for output space to write literal */\nvar    CHECK = 27;     /* i: waiting for 32-bit check value */\nvar    LENGTH = 28;    /* i: waiting for 32-bit length (gzip) */\nvar    DONE = 29;      /* finished check, done -- remain here until reset */\nvar    BAD = 30;       /* got a data error -- remain here until reset */\nvar    MEM = 31;       /* got an inflate() memory error -- remain here until reset */\nvar    SYNC = 32;      /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH =  (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_WBITS = MAX_WBITS;\n\n\nfunction zswap32(q) {\n  return  (((q >>> 24) & 0xff) +\n          ((q >>> 8) & 0xff00) +\n          ((q & 0xff00) << 8) +\n          ((q & 0xff) << 24));\n}\n\n\nfunction InflateState() {\n  this.mode = 0;             /* current inflate mode */\n  this.last = false;          /* true if processing last block */\n  this.wrap = 0;              /* bit 0 true for zlib, bit 1 true for gzip */\n  this.havedict = false;      /* true if dictionary provided */\n  this.flags = 0;             /* gzip header method and flags (0 if zlib) */\n  this.dmax = 0;              /* zlib header max distance (INFLATE_STRICT) */\n  this.check = 0;             /* protected copy of check value */\n  this.total = 0;             /* protected copy of output count */\n  // TODO: may be {}\n  this.head = null;           /* where to save gzip header information */\n\n  /* sliding window */\n  this.wbits = 0;             /* log base 2 of requested window size */\n  this.wsize = 0;             /* window size or zero if not using window */\n  this.whave = 0;             /* valid bytes in the window */\n  this.wnext = 0;             /* window write index */\n  this.window = null;         /* allocated sliding window, if needed */\n\n  /* bit accumulator */\n  this.hold = 0;              /* input bit accumulator */\n  this.bits = 0;              /* number of bits in \"in\" */\n\n  /* for string and stored block copying */\n  this.length = 0;            /* literal or length of data to copy */\n  this.offset = 0;            /* distance back to copy string from */\n\n  /* for table and code decoding */\n  this.extra = 0;             /* extra bits needed */\n\n  /* fixed and dynamic code tables */\n  this.lencode = null;          /* starting table for length/literal codes */\n  this.distcode = null;         /* starting table for distance codes */\n  this.lenbits = 0;           /* index bits for lencode */\n  this.distbits = 0;          /* index bits for distcode */\n\n  /* dynamic table building */\n  this.ncode = 0;             /* number of code length code lengths */\n  this.nlen = 0;              /* number of length code lengths */\n  this.ndist = 0;             /* number of distance code lengths */\n  this.have = 0;              /* number of code lengths in lens[] */\n  this.next = null;              /* next available space in codes[] */\n\n  this.lens = new utils.Buf16(320); /* temporary storage for code lengths */\n  this.work = new utils.Buf16(288); /* work area for code table building */\n\n  /*\n   because we don't have pointers in js, we use lencode and distcode directly\n   as buffers so we don't need codes\n  */\n  //this.codes = new utils.Buf32(ENOUGH);       /* space for code tables */\n  this.lendyn = null;              /* dynamic table for length/literal codes (JS specific) */\n  this.distdyn = null;             /* dynamic table for distance codes (JS specific) */\n  this.sane = 0;                   /* if false, allow invalid distance too far */\n  this.back = 0;                   /* bits back of last unprocessed length/lit */\n  this.was = 0;                    /* initial length of match */\n}\n\nfunction inflateResetKeep(strm) {\n  var state;\n\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  state = strm.state;\n  strm.total_in = strm.total_out = state.total = 0;\n  strm.msg = ''; /*Z_NULL*/\n  if (state.wrap) {       /* to support ill-conceived Java test suite */\n    strm.adler = state.wrap & 1;\n  }\n  state.mode = HEAD;\n  state.last = 0;\n  state.havedict = 0;\n  state.dmax = 32768;\n  state.head = null/*Z_NULL*/;\n  state.hold = 0;\n  state.bits = 0;\n  //state.lencode = state.distcode = state.next = state.codes;\n  state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);\n  state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);\n\n  state.sane = 1;\n  state.back = -1;\n  //Tracev((stderr, \"inflate: reset\\n\"));\n  return Z_OK;\n}\n\nfunction inflateReset(strm) {\n  var state;\n\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  state = strm.state;\n  state.wsize = 0;\n  state.whave = 0;\n  state.wnext = 0;\n  return inflateResetKeep(strm);\n\n}\n\nfunction inflateReset2(strm, windowBits) {\n  var wrap;\n  var state;\n\n  /* get the state */\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  state = strm.state;\n\n  /* extract wrap request from windowBits parameter */\n  if (windowBits < 0) {\n    wrap = 0;\n    windowBits = -windowBits;\n  }\n  else {\n    wrap = (windowBits >> 4) + 1;\n    if (windowBits < 48) {\n      windowBits &= 15;\n    }\n  }\n\n  /* set number of window bits, free window if different */\n  if (windowBits && (windowBits < 8 || windowBits > 15)) {\n    return Z_STREAM_ERROR;\n  }\n  if (state.window !== null && state.wbits !== windowBits) {\n    state.window = null;\n  }\n\n  /* update state and reset the rest of it */\n  state.wrap = wrap;\n  state.wbits = windowBits;\n  return inflateReset(strm);\n}\n\nfunction inflateInit2(strm, windowBits) {\n  var ret;\n  var state;\n\n  if (!strm) { return Z_STREAM_ERROR; }\n  //strm.msg = Z_NULL;                 /* in case we return an error */\n\n  state = new InflateState();\n\n  //if (state === Z_NULL) return Z_MEM_ERROR;\n  //Tracev((stderr, \"inflate: allocated\\n\"));\n  strm.state = state;\n  state.window = null/*Z_NULL*/;\n  ret = inflateReset2(strm, windowBits);\n  if (ret !== Z_OK) {\n    strm.state = null/*Z_NULL*/;\n  }\n  return ret;\n}\n\nfunction inflateInit(strm) {\n  return inflateInit2(strm, DEF_WBITS);\n}\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding.  Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter.  This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time.  However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nvar virgin = true;\n\nvar lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\nfunction fixedtables(state) {\n  /* build fixed huffman tables if first call (may not be thread safe) */\n  if (virgin) {\n    var sym;\n\n    lenfix = new utils.Buf32(512);\n    distfix = new utils.Buf32(32);\n\n    /* literal/length table */\n    sym = 0;\n    while (sym < 144) { state.lens[sym++] = 8; }\n    while (sym < 256) { state.lens[sym++] = 9; }\n    while (sym < 280) { state.lens[sym++] = 7; }\n    while (sym < 288) { state.lens[sym++] = 8; }\n\n    inflate_table(LENS,  state.lens, 0, 288, lenfix,   0, state.work, { bits: 9 });\n\n    /* distance table */\n    sym = 0;\n    while (sym < 32) { state.lens[sym++] = 5; }\n\n    inflate_table(DISTS, state.lens, 0, 32,   distfix, 0, state.work, { bits: 5 });\n\n    /* do this just once */\n    virgin = false;\n  }\n\n  state.lencode = lenfix;\n  state.lenbits = 9;\n  state.distcode = distfix;\n  state.distbits = 5;\n}\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning.  If window does not exist yet, create it.  This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nfunction updatewindow(strm, src, end, copy) {\n  var dist;\n  var state = strm.state;\n\n  /* if it hasn't been done already, allocate space for the window */\n  if (state.window === null) {\n    state.wsize = 1 << state.wbits;\n    state.wnext = 0;\n    state.whave = 0;\n\n    state.window = new utils.Buf8(state.wsize);\n  }\n\n  /* copy state->wsize or less output bytes into the circular window */\n  if (copy >= state.wsize) {\n    utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n    state.wnext = 0;\n    state.whave = state.wsize;\n  }\n  else {\n    dist = state.wsize - state.wnext;\n    if (dist > copy) {\n      dist = copy;\n    }\n    //zmemcpy(state->window + state->wnext, end - copy, dist);\n    utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n    copy -= dist;\n    if (copy) {\n      //zmemcpy(state->window, end - copy, copy);\n      utils.arraySet(state.window, src, end - copy, copy, 0);\n      state.wnext = copy;\n      state.whave = state.wsize;\n    }\n    else {\n      state.wnext += dist;\n      if (state.wnext === state.wsize) { state.wnext = 0; }\n      if (state.whave < state.wsize) { state.whave += dist; }\n    }\n  }\n  return 0;\n}\n\nfunction inflate(strm, flush) {\n  var state;\n  var input, output;          // input/output buffers\n  var next;                   /* next input INDEX */\n  var put;                    /* next output INDEX */\n  var have, left;             /* available input and output */\n  var hold;                   /* bit buffer */\n  var bits;                   /* bits in bit buffer */\n  var _in, _out;              /* save starting available input and output */\n  var copy;                   /* number of stored or match bytes to copy */\n  var from;                   /* where to copy match bytes from */\n  var from_source;\n  var here = 0;               /* current decoding table entry */\n  var here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n  //var last;                   /* parent table entry */\n  var last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n  var len;                    /* length to copy for repeats, bits to drop */\n  var ret;                    /* return code */\n  var hbuf = new utils.Buf8(4);    /* buffer for gzip header crc calculation */\n  var opts;\n\n  var n; // temporary var for NEED_BITS\n\n  var order = /* permutation of code lengths */\n    [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];\n\n\n  if (!strm || !strm.state || !strm.output ||\n      (!strm.input && strm.avail_in !== 0)) {\n    return Z_STREAM_ERROR;\n  }\n\n  state = strm.state;\n  if (state.mode === TYPE) { state.mode = TYPEDO; }    /* skip check */\n\n\n  //--- LOAD() ---\n  put = strm.next_out;\n  output = strm.output;\n  left = strm.avail_out;\n  next = strm.next_in;\n  input = strm.input;\n  have = strm.avail_in;\n  hold = state.hold;\n  bits = state.bits;\n  //---\n\n  _in = have;\n  _out = left;\n  ret = Z_OK;\n\n  inf_leave: // goto emulation\n  for (;;) {\n    switch (state.mode) {\n      case HEAD:\n        if (state.wrap === 0) {\n          state.mode = TYPEDO;\n          break;\n        }\n        //=== NEEDBITS(16);\n        while (bits < 16) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        if ((state.wrap & 2) && hold === 0x8b1f) {  /* gzip header */\n          state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n          //=== CRC2(state.check, hold);\n          hbuf[0] = hold & 0xff;\n          hbuf[1] = (hold >>> 8) & 0xff;\n          state.check = crc32(state.check, hbuf, 2, 0);\n          //===//\n\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n          state.mode = FLAGS;\n          break;\n        }\n        state.flags = 0;           /* expect zlib header */\n        if (state.head) {\n          state.head.done = false;\n        }\n        if (!(state.wrap & 1) ||   /* check if zlib header allowed */\n          (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n          strm.msg = 'incorrect header check';\n          state.mode = BAD;\n          break;\n        }\n        if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n          strm.msg = 'unknown compression method';\n          state.mode = BAD;\n          break;\n        }\n        //--- DROPBITS(4) ---//\n        hold >>>= 4;\n        bits -= 4;\n        //---//\n        len = (hold & 0x0f)/*BITS(4)*/ + 8;\n        if (state.wbits === 0) {\n          state.wbits = len;\n        }\n        else if (len > state.wbits) {\n          strm.msg = 'invalid window size';\n          state.mode = BAD;\n          break;\n        }\n        state.dmax = 1 << len;\n        //Tracev((stderr, \"inflate:   zlib header ok\\n\"));\n        strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n        state.mode = hold & 0x200 ? DICTID : TYPE;\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        break;\n      case FLAGS:\n        //=== NEEDBITS(16); */\n        while (bits < 16) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        state.flags = hold;\n        if ((state.flags & 0xff) !== Z_DEFLATED) {\n          strm.msg = 'unknown compression method';\n          state.mode = BAD;\n          break;\n        }\n        if (state.flags & 0xe000) {\n          strm.msg = 'unknown header flags set';\n          state.mode = BAD;\n          break;\n        }\n        if (state.head) {\n          state.head.text = ((hold >> 8) & 1);\n        }\n        if (state.flags & 0x0200) {\n          //=== CRC2(state.check, hold);\n          hbuf[0] = hold & 0xff;\n          hbuf[1] = (hold >>> 8) & 0xff;\n          state.check = crc32(state.check, hbuf, 2, 0);\n          //===//\n        }\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = TIME;\n        /* falls through */\n      case TIME:\n        //=== NEEDBITS(32); */\n        while (bits < 32) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        if (state.head) {\n          state.head.time = hold;\n        }\n        if (state.flags & 0x0200) {\n          //=== CRC4(state.check, hold)\n          hbuf[0] = hold & 0xff;\n          hbuf[1] = (hold >>> 8) & 0xff;\n          hbuf[2] = (hold >>> 16) & 0xff;\n          hbuf[3] = (hold >>> 24) & 0xff;\n          state.check = crc32(state.check, hbuf, 4, 0);\n          //===\n        }\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = OS;\n        /* falls through */\n      case OS:\n        //=== NEEDBITS(16); */\n        while (bits < 16) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        if (state.head) {\n          state.head.xflags = (hold & 0xff);\n          state.head.os = (hold >> 8);\n        }\n        if (state.flags & 0x0200) {\n          //=== CRC2(state.check, hold);\n          hbuf[0] = hold & 0xff;\n          hbuf[1] = (hold >>> 8) & 0xff;\n          state.check = crc32(state.check, hbuf, 2, 0);\n          //===//\n        }\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = EXLEN;\n        /* falls through */\n      case EXLEN:\n        if (state.flags & 0x0400) {\n          //=== NEEDBITS(16); */\n          while (bits < 16) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          state.length = hold;\n          if (state.head) {\n            state.head.extra_len = hold;\n          }\n          if (state.flags & 0x0200) {\n            //=== CRC2(state.check, hold);\n            hbuf[0] = hold & 0xff;\n            hbuf[1] = (hold >>> 8) & 0xff;\n            state.check = crc32(state.check, hbuf, 2, 0);\n            //===//\n          }\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n        }\n        else if (state.head) {\n          state.head.extra = null/*Z_NULL*/;\n        }\n        state.mode = EXTRA;\n        /* falls through */\n      case EXTRA:\n        if (state.flags & 0x0400) {\n          copy = state.length;\n          if (copy > have) { copy = have; }\n          if (copy) {\n            if (state.head) {\n              len = state.head.extra_len - state.length;\n              if (!state.head.extra) {\n                // Use untyped array for more convenient processing later\n                state.head.extra = new Array(state.head.extra_len);\n              }\n              utils.arraySet(\n                state.head.extra,\n                input,\n                next,\n                // extra field is limited to 65536 bytes\n                // - no need for additional size check\n                copy,\n                /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n                len\n              );\n              //zmemcpy(state.head.extra + len, next,\n              //        len + copy > state.head.extra_max ?\n              //        state.head.extra_max - len : copy);\n            }\n            if (state.flags & 0x0200) {\n              state.check = crc32(state.check, input, copy, next);\n            }\n            have -= copy;\n            next += copy;\n            state.length -= copy;\n          }\n          if (state.length) { break inf_leave; }\n        }\n        state.length = 0;\n        state.mode = NAME;\n        /* falls through */\n      case NAME:\n        if (state.flags & 0x0800) {\n          if (have === 0) { break inf_leave; }\n          copy = 0;\n          do {\n            // TODO: 2 or 1 bytes?\n            len = input[next + copy++];\n            /* use constant limit because in js we should not preallocate memory */\n            if (state.head && len &&\n                (state.length < 65536 /*state.head.name_max*/)) {\n              state.head.name += String.fromCharCode(len);\n            }\n          } while (len && copy < have);\n\n          if (state.flags & 0x0200) {\n            state.check = crc32(state.check, input, copy, next);\n          }\n          have -= copy;\n          next += copy;\n          if (len) { break inf_leave; }\n        }\n        else if (state.head) {\n          state.head.name = null;\n        }\n        state.length = 0;\n        state.mode = COMMENT;\n        /* falls through */\n      case COMMENT:\n        if (state.flags & 0x1000) {\n          if (have === 0) { break inf_leave; }\n          copy = 0;\n          do {\n            len = input[next + copy++];\n            /* use constant limit because in js we should not preallocate memory */\n            if (state.head && len &&\n                (state.length < 65536 /*state.head.comm_max*/)) {\n              state.head.comment += String.fromCharCode(len);\n            }\n          } while (len && copy < have);\n          if (state.flags & 0x0200) {\n            state.check = crc32(state.check, input, copy, next);\n          }\n          have -= copy;\n          next += copy;\n          if (len) { break inf_leave; }\n        }\n        else if (state.head) {\n          state.head.comment = null;\n        }\n        state.mode = HCRC;\n        /* falls through */\n      case HCRC:\n        if (state.flags & 0x0200) {\n          //=== NEEDBITS(16); */\n          while (bits < 16) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          if (hold !== (state.check & 0xffff)) {\n            strm.msg = 'header crc mismatch';\n            state.mode = BAD;\n            break;\n          }\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n        }\n        if (state.head) {\n          state.head.hcrc = ((state.flags >> 9) & 1);\n          state.head.done = true;\n        }\n        strm.adler = state.check = 0;\n        state.mode = TYPE;\n        break;\n      case DICTID:\n        //=== NEEDBITS(32); */\n        while (bits < 32) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        strm.adler = state.check = zswap32(hold);\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = DICT;\n        /* falls through */\n      case DICT:\n        if (state.havedict === 0) {\n          //--- RESTORE() ---\n          strm.next_out = put;\n          strm.avail_out = left;\n          strm.next_in = next;\n          strm.avail_in = have;\n          state.hold = hold;\n          state.bits = bits;\n          //---\n          return Z_NEED_DICT;\n        }\n        strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n        state.mode = TYPE;\n        /* falls through */\n      case TYPE:\n        if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n        /* falls through */\n      case TYPEDO:\n        if (state.last) {\n          //--- BYTEBITS() ---//\n          hold >>>= bits & 7;\n          bits -= bits & 7;\n          //---//\n          state.mode = CHECK;\n          break;\n        }\n        //=== NEEDBITS(3); */\n        while (bits < 3) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        state.last = (hold & 0x01)/*BITS(1)*/;\n        //--- DROPBITS(1) ---//\n        hold >>>= 1;\n        bits -= 1;\n        //---//\n\n        switch ((hold & 0x03)/*BITS(2)*/) {\n          case 0:                             /* stored block */\n            //Tracev((stderr, \"inflate:     stored block%s\\n\",\n            //        state.last ? \" (last)\" : \"\"));\n            state.mode = STORED;\n            break;\n          case 1:                             /* fixed block */\n            fixedtables(state);\n            //Tracev((stderr, \"inflate:     fixed codes block%s\\n\",\n            //        state.last ? \" (last)\" : \"\"));\n            state.mode = LEN_;             /* decode codes */\n            if (flush === Z_TREES) {\n              //--- DROPBITS(2) ---//\n              hold >>>= 2;\n              bits -= 2;\n              //---//\n              break inf_leave;\n            }\n            break;\n          case 2:                             /* dynamic block */\n            //Tracev((stderr, \"inflate:     dynamic codes block%s\\n\",\n            //        state.last ? \" (last)\" : \"\"));\n            state.mode = TABLE;\n            break;\n          case 3:\n            strm.msg = 'invalid block type';\n            state.mode = BAD;\n        }\n        //--- DROPBITS(2) ---//\n        hold >>>= 2;\n        bits -= 2;\n        //---//\n        break;\n      case STORED:\n        //--- BYTEBITS() ---// /* go to byte boundary */\n        hold >>>= bits & 7;\n        bits -= bits & 7;\n        //---//\n        //=== NEEDBITS(32); */\n        while (bits < 32) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n          strm.msg = 'invalid stored block lengths';\n          state.mode = BAD;\n          break;\n        }\n        state.length = hold & 0xffff;\n        //Tracev((stderr, \"inflate:       stored length %u\\n\",\n        //        state.length));\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = COPY_;\n        if (flush === Z_TREES) { break inf_leave; }\n        /* falls through */\n      case COPY_:\n        state.mode = COPY;\n        /* falls through */\n      case COPY:\n        copy = state.length;\n        if (copy) {\n          if (copy > have) { copy = have; }\n          if (copy > left) { copy = left; }\n          if (copy === 0) { break inf_leave; }\n          //--- zmemcpy(put, next, copy); ---\n          utils.arraySet(output, input, next, copy, put);\n          //---//\n          have -= copy;\n          next += copy;\n          left -= copy;\n          put += copy;\n          state.length -= copy;\n          break;\n        }\n        //Tracev((stderr, \"inflate:       stored end\\n\"));\n        state.mode = TYPE;\n        break;\n      case TABLE:\n        //=== NEEDBITS(14); */\n        while (bits < 14) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n        //--- DROPBITS(5) ---//\n        hold >>>= 5;\n        bits -= 5;\n        //---//\n        state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n        //--- DROPBITS(5) ---//\n        hold >>>= 5;\n        bits -= 5;\n        //---//\n        state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n        //--- DROPBITS(4) ---//\n        hold >>>= 4;\n        bits -= 4;\n        //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n        if (state.nlen > 286 || state.ndist > 30) {\n          strm.msg = 'too many length or distance symbols';\n          state.mode = BAD;\n          break;\n        }\n//#endif\n        //Tracev((stderr, \"inflate:       table sizes ok\\n\"));\n        state.have = 0;\n        state.mode = LENLENS;\n        /* falls through */\n      case LENLENS:\n        while (state.have < state.ncode) {\n          //=== NEEDBITS(3);\n          while (bits < 3) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n          //--- DROPBITS(3) ---//\n          hold >>>= 3;\n          bits -= 3;\n          //---//\n        }\n        while (state.have < 19) {\n          state.lens[order[state.have++]] = 0;\n        }\n        // We have separate tables & no pointers. 2 commented lines below not needed.\n        //state.next = state.codes;\n        //state.lencode = state.next;\n        // Switch to use dynamic table\n        state.lencode = state.lendyn;\n        state.lenbits = 7;\n\n        opts = { bits: state.lenbits };\n        ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n        state.lenbits = opts.bits;\n\n        if (ret) {\n          strm.msg = 'invalid code lengths set';\n          state.mode = BAD;\n          break;\n        }\n        //Tracev((stderr, \"inflate:       code lengths ok\\n\"));\n        state.have = 0;\n        state.mode = CODELENS;\n        /* falls through */\n      case CODELENS:\n        while (state.have < state.nlen + state.ndist) {\n          for (;;) {\n            here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n            here_bits = here >>> 24;\n            here_op = (here >>> 16) & 0xff;\n            here_val = here & 0xffff;\n\n            if ((here_bits) <= bits) { break; }\n            //--- PULLBYTE() ---//\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n            //---//\n          }\n          if (here_val < 16) {\n            //--- DROPBITS(here.bits) ---//\n            hold >>>= here_bits;\n            bits -= here_bits;\n            //---//\n            state.lens[state.have++] = here_val;\n          }\n          else {\n            if (here_val === 16) {\n              //=== NEEDBITS(here.bits + 2);\n              n = here_bits + 2;\n              while (bits < n) {\n                if (have === 0) { break inf_leave; }\n                have--;\n                hold += input[next++] << bits;\n                bits += 8;\n              }\n              //===//\n              //--- DROPBITS(here.bits) ---//\n              hold >>>= here_bits;\n              bits -= here_bits;\n              //---//\n              if (state.have === 0) {\n                strm.msg = 'invalid bit length repeat';\n                state.mode = BAD;\n                break;\n              }\n              len = state.lens[state.have - 1];\n              copy = 3 + (hold & 0x03);//BITS(2);\n              //--- DROPBITS(2) ---//\n              hold >>>= 2;\n              bits -= 2;\n              //---//\n            }\n            else if (here_val === 17) {\n              //=== NEEDBITS(here.bits + 3);\n              n = here_bits + 3;\n              while (bits < n) {\n                if (have === 0) { break inf_leave; }\n                have--;\n                hold += input[next++] << bits;\n                bits += 8;\n              }\n              //===//\n              //--- DROPBITS(here.bits) ---//\n              hold >>>= here_bits;\n              bits -= here_bits;\n              //---//\n              len = 0;\n              copy = 3 + (hold & 0x07);//BITS(3);\n              //--- DROPBITS(3) ---//\n              hold >>>= 3;\n              bits -= 3;\n              //---//\n            }\n            else {\n              //=== NEEDBITS(here.bits + 7);\n              n = here_bits + 7;\n              while (bits < n) {\n                if (have === 0) { break inf_leave; }\n                have--;\n                hold += input[next++] << bits;\n                bits += 8;\n              }\n              //===//\n              //--- DROPBITS(here.bits) ---//\n              hold >>>= here_bits;\n              bits -= here_bits;\n              //---//\n              len = 0;\n              copy = 11 + (hold & 0x7f);//BITS(7);\n              //--- DROPBITS(7) ---//\n              hold >>>= 7;\n              bits -= 7;\n              //---//\n            }\n            if (state.have + copy > state.nlen + state.ndist) {\n              strm.msg = 'invalid bit length repeat';\n              state.mode = BAD;\n              break;\n            }\n            while (copy--) {\n              state.lens[state.have++] = len;\n            }\n          }\n        }\n\n        /* handle error breaks in while */\n        if (state.mode === BAD) { break; }\n\n        /* check for end-of-block code (better have one) */\n        if (state.lens[256] === 0) {\n          strm.msg = 'invalid code -- missing end-of-block';\n          state.mode = BAD;\n          break;\n        }\n\n        /* build code tables -- note: do not change the lenbits or distbits\n           values here (9 and 6) without reading the comments in inftrees.h\n           concerning the ENOUGH constants, which depend on those values */\n        state.lenbits = 9;\n\n        opts = { bits: state.lenbits };\n        ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n        // We have separate tables & no pointers. 2 commented lines below not needed.\n        // state.next_index = opts.table_index;\n        state.lenbits = opts.bits;\n        // state.lencode = state.next;\n\n        if (ret) {\n          strm.msg = 'invalid literal/lengths set';\n          state.mode = BAD;\n          break;\n        }\n\n        state.distbits = 6;\n        //state.distcode.copy(state.codes);\n        // Switch to use dynamic table\n        state.distcode = state.distdyn;\n        opts = { bits: state.distbits };\n        ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n        // We have separate tables & no pointers. 2 commented lines below not needed.\n        // state.next_index = opts.table_index;\n        state.distbits = opts.bits;\n        // state.distcode = state.next;\n\n        if (ret) {\n          strm.msg = 'invalid distances set';\n          state.mode = BAD;\n          break;\n        }\n        //Tracev((stderr, 'inflate:       codes ok\\n'));\n        state.mode = LEN_;\n        if (flush === Z_TREES) { break inf_leave; }\n        /* falls through */\n      case LEN_:\n        state.mode = LEN;\n        /* falls through */\n      case LEN:\n        if (have >= 6 && left >= 258) {\n          //--- RESTORE() ---\n          strm.next_out = put;\n          strm.avail_out = left;\n          strm.next_in = next;\n          strm.avail_in = have;\n          state.hold = hold;\n          state.bits = bits;\n          //---\n          inflate_fast(strm, _out);\n          //--- LOAD() ---\n          put = strm.next_out;\n          output = strm.output;\n          left = strm.avail_out;\n          next = strm.next_in;\n          input = strm.input;\n          have = strm.avail_in;\n          hold = state.hold;\n          bits = state.bits;\n          //---\n\n          if (state.mode === TYPE) {\n            state.back = -1;\n          }\n          break;\n        }\n        state.back = 0;\n        for (;;) {\n          here = state.lencode[hold & ((1 << state.lenbits) - 1)];  /*BITS(state.lenbits)*/\n          here_bits = here >>> 24;\n          here_op = (here >>> 16) & 0xff;\n          here_val = here & 0xffff;\n\n          if (here_bits <= bits) { break; }\n          //--- PULLBYTE() ---//\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n          //---//\n        }\n        if (here_op && (here_op & 0xf0) === 0) {\n          last_bits = here_bits;\n          last_op = here_op;\n          last_val = here_val;\n          for (;;) {\n            here = state.lencode[last_val +\n                    ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n            here_bits = here >>> 24;\n            here_op = (here >>> 16) & 0xff;\n            here_val = here & 0xffff;\n\n            if ((last_bits + here_bits) <= bits) { break; }\n            //--- PULLBYTE() ---//\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n            //---//\n          }\n          //--- DROPBITS(last.bits) ---//\n          hold >>>= last_bits;\n          bits -= last_bits;\n          //---//\n          state.back += last_bits;\n        }\n        //--- DROPBITS(here.bits) ---//\n        hold >>>= here_bits;\n        bits -= here_bits;\n        //---//\n        state.back += here_bits;\n        state.length = here_val;\n        if (here_op === 0) {\n          //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n          //        \"inflate:         literal '%c'\\n\" :\n          //        \"inflate:         literal 0x%02x\\n\", here.val));\n          state.mode = LIT;\n          break;\n        }\n        if (here_op & 32) {\n          //Tracevv((stderr, \"inflate:         end of block\\n\"));\n          state.back = -1;\n          state.mode = TYPE;\n          break;\n        }\n        if (here_op & 64) {\n          strm.msg = 'invalid literal/length code';\n          state.mode = BAD;\n          break;\n        }\n        state.extra = here_op & 15;\n        state.mode = LENEXT;\n        /* falls through */\n      case LENEXT:\n        if (state.extra) {\n          //=== NEEDBITS(state.extra);\n          n = state.extra;\n          while (bits < n) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n          //--- DROPBITS(state.extra) ---//\n          hold >>>= state.extra;\n          bits -= state.extra;\n          //---//\n          state.back += state.extra;\n        }\n        //Tracevv((stderr, \"inflate:         length %u\\n\", state.length));\n        state.was = state.length;\n        state.mode = DIST;\n        /* falls through */\n      case DIST:\n        for (;;) {\n          here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n          here_bits = here >>> 24;\n          here_op = (here >>> 16) & 0xff;\n          here_val = here & 0xffff;\n\n          if ((here_bits) <= bits) { break; }\n          //--- PULLBYTE() ---//\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n          //---//\n        }\n        if ((here_op & 0xf0) === 0) {\n          last_bits = here_bits;\n          last_op = here_op;\n          last_val = here_val;\n          for (;;) {\n            here = state.distcode[last_val +\n                    ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n            here_bits = here >>> 24;\n            here_op = (here >>> 16) & 0xff;\n            here_val = here & 0xffff;\n\n            if ((last_bits + here_bits) <= bits) { break; }\n            //--- PULLBYTE() ---//\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n            //---//\n          }\n          //--- DROPBITS(last.bits) ---//\n          hold >>>= last_bits;\n          bits -= last_bits;\n          //---//\n          state.back += last_bits;\n        }\n        //--- DROPBITS(here.bits) ---//\n        hold >>>= here_bits;\n        bits -= here_bits;\n        //---//\n        state.back += here_bits;\n        if (here_op & 64) {\n          strm.msg = 'invalid distance code';\n          state.mode = BAD;\n          break;\n        }\n        state.offset = here_val;\n        state.extra = (here_op) & 15;\n        state.mode = DISTEXT;\n        /* falls through */\n      case DISTEXT:\n        if (state.extra) {\n          //=== NEEDBITS(state.extra);\n          n = state.extra;\n          while (bits < n) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n          //--- DROPBITS(state.extra) ---//\n          hold >>>= state.extra;\n          bits -= state.extra;\n          //---//\n          state.back += state.extra;\n        }\n//#ifdef INFLATE_STRICT\n        if (state.offset > state.dmax) {\n          strm.msg = 'invalid distance too far back';\n          state.mode = BAD;\n          break;\n        }\n//#endif\n        //Tracevv((stderr, \"inflate:         distance %u\\n\", state.offset));\n        state.mode = MATCH;\n        /* falls through */\n      case MATCH:\n        if (left === 0) { break inf_leave; }\n        copy = _out - left;\n        if (state.offset > copy) {         /* copy from window */\n          copy = state.offset - copy;\n          if (copy > state.whave) {\n            if (state.sane) {\n              strm.msg = 'invalid distance too far back';\n              state.mode = BAD;\n              break;\n            }\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n//          Trace((stderr, \"inflate.c too far\\n\"));\n//          copy -= state.whave;\n//          if (copy > state.length) { copy = state.length; }\n//          if (copy > left) { copy = left; }\n//          left -= copy;\n//          state.length -= copy;\n//          do {\n//            output[put++] = 0;\n//          } while (--copy);\n//          if (state.length === 0) { state.mode = LEN; }\n//          break;\n//#endif\n          }\n          if (copy > state.wnext) {\n            copy -= state.wnext;\n            from = state.wsize - copy;\n          }\n          else {\n            from = state.wnext - copy;\n          }\n          if (copy > state.length) { copy = state.length; }\n          from_source = state.window;\n        }\n        else {                              /* copy from output */\n          from_source = output;\n          from = put - state.offset;\n          copy = state.length;\n        }\n        if (copy > left) { copy = left; }\n        left -= copy;\n        state.length -= copy;\n        do {\n          output[put++] = from_source[from++];\n        } while (--copy);\n        if (state.length === 0) { state.mode = LEN; }\n        break;\n      case LIT:\n        if (left === 0) { break inf_leave; }\n        output[put++] = state.length;\n        left--;\n        state.mode = LEN;\n        break;\n      case CHECK:\n        if (state.wrap) {\n          //=== NEEDBITS(32);\n          while (bits < 32) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            // Use '|' instead of '+' to make sure that result is signed\n            hold |= input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          _out -= left;\n          strm.total_out += _out;\n          state.total += _out;\n          if (_out) {\n            strm.adler = state.check =\n                /*UPDATE(state.check, put - _out, _out);*/\n                (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));\n\n          }\n          _out = left;\n          // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n          if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n            strm.msg = 'incorrect data check';\n            state.mode = BAD;\n            break;\n          }\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n          //Tracev((stderr, \"inflate:   check matches trailer\\n\"));\n        }\n        state.mode = LENGTH;\n        /* falls through */\n      case LENGTH:\n        if (state.wrap && state.flags) {\n          //=== NEEDBITS(32);\n          while (bits < 32) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          if (hold !== (state.total & 0xffffffff)) {\n            strm.msg = 'incorrect length check';\n            state.mode = BAD;\n            break;\n          }\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n          //Tracev((stderr, \"inflate:   length matches trailer\\n\"));\n        }\n        state.mode = DONE;\n        /* falls through */\n      case DONE:\n        ret = Z_STREAM_END;\n        break inf_leave;\n      case BAD:\n        ret = Z_DATA_ERROR;\n        break inf_leave;\n      case MEM:\n        return Z_MEM_ERROR;\n      case SYNC:\n        /* falls through */\n      default:\n        return Z_STREAM_ERROR;\n    }\n  }\n\n  // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n  /*\n     Return from inflate(), updating the total counts and the check value.\n     If there was no progress during the inflate() call, return a buffer\n     error.  Call updatewindow() to create and/or update the window state.\n     Note: a memory error from inflate() is non-recoverable.\n   */\n\n  //--- RESTORE() ---\n  strm.next_out = put;\n  strm.avail_out = left;\n  strm.next_in = next;\n  strm.avail_in = have;\n  state.hold = hold;\n  state.bits = bits;\n  //---\n\n  if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n                      (state.mode < CHECK || flush !== Z_FINISH))) {\n    if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {\n      state.mode = MEM;\n      return Z_MEM_ERROR;\n    }\n  }\n  _in -= strm.avail_in;\n  _out -= strm.avail_out;\n  strm.total_in += _in;\n  strm.total_out += _out;\n  state.total += _out;\n  if (state.wrap && _out) {\n    strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n      (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));\n  }\n  strm.data_type = state.bits + (state.last ? 64 : 0) +\n                    (state.mode === TYPE ? 128 : 0) +\n                    (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n  if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {\n    ret = Z_BUF_ERROR;\n  }\n  return ret;\n}\n\nfunction inflateEnd(strm) {\n\n  if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n    return Z_STREAM_ERROR;\n  }\n\n  var state = strm.state;\n  if (state.window) {\n    state.window = null;\n  }\n  strm.state = null;\n  return Z_OK;\n}\n\nfunction inflateGetHeader(strm, head) {\n  var state;\n\n  /* check state */\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  state = strm.state;\n  if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }\n\n  /* save header structure */\n  state.head = head;\n  head.done = false;\n  return Z_OK;\n}\n\nfunction inflateSetDictionary(strm, dictionary) {\n  var dictLength = dictionary.length;\n\n  var state;\n  var dictid;\n  var ret;\n\n  /* check state */\n  if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; }\n  state = strm.state;\n\n  if (state.wrap !== 0 && state.mode !== DICT) {\n    return Z_STREAM_ERROR;\n  }\n\n  /* check for correct dictionary identifier */\n  if (state.mode === DICT) {\n    dictid = 1; /* adler32(0, null, 0)*/\n    /* dictid = adler32(dictid, dictionary, dictLength); */\n    dictid = adler32(dictid, dictionary, dictLength, 0);\n    if (dictid !== state.check) {\n      return Z_DATA_ERROR;\n    }\n  }\n  /* copy dictionary to window using updatewindow(), which will amend the\n   existing dictionary if appropriate */\n  ret = updatewindow(strm, dictionary, dictLength, dictLength);\n  if (ret) {\n    state.mode = MEM;\n    return Z_MEM_ERROR;\n  }\n  state.havedict = 1;\n  // Tracev((stderr, \"inflate:   dictionary set\\n\"));\n  return Z_OK;\n}\n\nexports.inflateReset = inflateReset;\nexports.inflateReset2 = inflateReset2;\nexports.inflateResetKeep = inflateResetKeep;\nexports.inflateInit = inflateInit;\nexports.inflateInit2 = inflateInit2;\nexports.inflate = inflate;\nexports.inflateEnd = inflateEnd;\nexports.inflateGetHeader = inflateGetHeader;\nexports.inflateSetDictionary = inflateSetDictionary;\nexports.inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nexports.inflateCopy = inflateCopy;\nexports.inflateGetDictionary = inflateGetDictionary;\nexports.inflateMark = inflateMark;\nexports.inflatePrime = inflatePrime;\nexports.inflateSync = inflateSync;\nexports.inflateSyncPoint = inflateSyncPoint;\nexports.inflateUndermine = inflateUndermine;\n*/\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\n\nvar MAXBITS = 15;\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\nvar lbase = [ /* Length codes 257..285 base */\n  3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n  35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n];\n\nvar lext = [ /* Length codes 257..285 extra */\n  16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n  19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n];\n\nvar dbase = [ /* Distance codes 0..29 base */\n  1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n  257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n  8193, 12289, 16385, 24577, 0, 0\n];\n\nvar dext = [ /* Distance codes 0..29 extra */\n  16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n  23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n  28, 28, 29, 29, 64, 64\n];\n\nmodule.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts)\n{\n  var bits = opts.bits;\n      //here = opts.here; /* table entry for duplication */\n\n  var len = 0;               /* a code's length in bits */\n  var sym = 0;               /* index of code symbols */\n  var min = 0, max = 0;          /* minimum and maximum code lengths */\n  var root = 0;              /* number of index bits for root table */\n  var curr = 0;              /* number of index bits for current table */\n  var drop = 0;              /* code bits to drop for sub-table */\n  var left = 0;                   /* number of prefix codes available */\n  var used = 0;              /* code entries in table used */\n  var huff = 0;              /* Huffman code */\n  var incr;              /* for incrementing code, index */\n  var fill;              /* index for replicating entries */\n  var low;               /* low bits for current root entry */\n  var mask;              /* mask for low root bits */\n  var next;             /* next available space in table */\n  var base = null;     /* base value table to use */\n  var base_index = 0;\n//  var shoextra;    /* extra bits table to use */\n  var end;                    /* use base and extra for symbol > end */\n  var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1];    /* number of codes of each length */\n  var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1];     /* offsets in table for each length */\n  var extra = null;\n  var extra_index = 0;\n\n  var here_bits, here_op, here_val;\n\n  /*\n   Process a set of code lengths to create a canonical Huffman code.  The\n   code lengths are lens[0..codes-1].  Each length corresponds to the\n   symbols 0..codes-1.  The Huffman code is generated by first sorting the\n   symbols by length from short to long, and retaining the symbol order\n   for codes with equal lengths.  Then the code starts with all zero bits\n   for the first code of the shortest length, and the codes are integer\n   increments for the same length, and zeros are appended as the length\n   increases.  For the deflate format, these bits are stored backwards\n   from their more natural integer increment ordering, and so when the\n   decoding tables are built in the large loop below, the integer codes\n   are incremented backwards.\n\n   This routine assumes, but does not check, that all of the entries in\n   lens[] are in the range 0..MAXBITS.  The caller must assure this.\n   1..MAXBITS is interpreted as that code length.  zero means that that\n   symbol does not occur in this code.\n\n   The codes are sorted by computing a count of codes for each length,\n   creating from that a table of starting indices for each length in the\n   sorted table, and then entering the symbols in order in the sorted\n   table.  The sorted table is work[], with that space being provided by\n   the caller.\n\n   The length counts are used for other purposes as well, i.e. finding\n   the minimum and maximum length codes, determining if there are any\n   codes at all, checking for a valid set of lengths, and looking ahead\n   at length counts to determine sub-table sizes when building the\n   decoding tables.\n   */\n\n  /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n  for (len = 0; len <= MAXBITS; len++) {\n    count[len] = 0;\n  }\n  for (sym = 0; sym < codes; sym++) {\n    count[lens[lens_index + sym]]++;\n  }\n\n  /* bound code lengths, force root to be within code lengths */\n  root = bits;\n  for (max = MAXBITS; max >= 1; max--) {\n    if (count[max] !== 0) { break; }\n  }\n  if (root > max) {\n    root = max;\n  }\n  if (max === 0) {                     /* no symbols to code at all */\n    //table.op[opts.table_index] = 64;  //here.op = (var char)64;    /* invalid code marker */\n    //table.bits[opts.table_index] = 1;   //here.bits = (var char)1;\n    //table.val[opts.table_index++] = 0;   //here.val = (var short)0;\n    table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n    //table.op[opts.table_index] = 64;\n    //table.bits[opts.table_index] = 1;\n    //table.val[opts.table_index++] = 0;\n    table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n    opts.bits = 1;\n    return 0;     /* no symbols, but wait for decoding to report error */\n  }\n  for (min = 1; min < max; min++) {\n    if (count[min] !== 0) { break; }\n  }\n  if (root < min) {\n    root = min;\n  }\n\n  /* check for an over-subscribed or incomplete set of lengths */\n  left = 1;\n  for (len = 1; len <= MAXBITS; len++) {\n    left <<= 1;\n    left -= count[len];\n    if (left < 0) {\n      return -1;\n    }        /* over-subscribed */\n  }\n  if (left > 0 && (type === CODES || max !== 1)) {\n    return -1;                      /* incomplete set */\n  }\n\n  /* generate offsets into symbol table for each length for sorting */\n  offs[1] = 0;\n  for (len = 1; len < MAXBITS; len++) {\n    offs[len + 1] = offs[len] + count[len];\n  }\n\n  /* sort symbols by length, by symbol order within each length */\n  for (sym = 0; sym < codes; sym++) {\n    if (lens[lens_index + sym] !== 0) {\n      work[offs[lens[lens_index + sym]]++] = sym;\n    }\n  }\n\n  /*\n   Create and fill in decoding tables.  In this loop, the table being\n   filled is at next and has curr index bits.  The code being used is huff\n   with length len.  That code is converted to an index by dropping drop\n   bits off of the bottom.  For codes where len is less than drop + curr,\n   those top drop + curr - len bits are incremented through all values to\n   fill the table with replicated entries.\n\n   root is the number of index bits for the root table.  When len exceeds\n   root, sub-tables are created pointed to by the root entry with an index\n   of the low root bits of huff.  This is saved in low to check for when a\n   new sub-table should be started.  drop is zero when the root table is\n   being filled, and drop is root when sub-tables are being filled.\n\n   When a new sub-table is needed, it is necessary to look ahead in the\n   code lengths to determine what size sub-table is needed.  The length\n   counts are used for this, and so count[] is decremented as codes are\n   entered in the tables.\n\n   used keeps track of how many table entries have been allocated from the\n   provided *table space.  It is checked for LENS and DIST tables against\n   the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n   the initial root table size constants.  See the comments in inftrees.h\n   for more information.\n\n   sym increments through all symbols, and the loop terminates when\n   all codes of length max, i.e. all codes, have been processed.  This\n   routine permits incomplete codes, so another loop after this one fills\n   in the rest of the decoding tables with invalid code markers.\n   */\n\n  /* set up for code type */\n  // poor man optimization - use if-else instead of switch,\n  // to avoid deopts in old v8\n  if (type === CODES) {\n    base = extra = work;    /* dummy value--not used */\n    end = 19;\n\n  } else if (type === LENS) {\n    base = lbase;\n    base_index -= 257;\n    extra = lext;\n    extra_index -= 257;\n    end = 256;\n\n  } else {                    /* DISTS */\n    base = dbase;\n    extra = dext;\n    end = -1;\n  }\n\n  /* initialize opts for loop */\n  huff = 0;                   /* starting code */\n  sym = 0;                    /* starting code symbol */\n  len = min;                  /* starting code length */\n  next = table_index;              /* current table to fill in */\n  curr = root;                /* current table index bits */\n  drop = 0;                   /* current bits to drop from code for index */\n  low = -1;                   /* trigger new sub-table when len > root */\n  used = 1 << root;          /* use root table entries */\n  mask = used - 1;            /* mask for comparing low */\n\n  /* check available table space */\n  if ((type === LENS && used > ENOUGH_LENS) ||\n    (type === DISTS && used > ENOUGH_DISTS)) {\n    return 1;\n  }\n\n  /* process all codes and make table entries */\n  for (;;) {\n    /* create table entry */\n    here_bits = len - drop;\n    if (work[sym] < end) {\n      here_op = 0;\n      here_val = work[sym];\n    }\n    else if (work[sym] > end) {\n      here_op = extra[extra_index + work[sym]];\n      here_val = base[base_index + work[sym]];\n    }\n    else {\n      here_op = 32 + 64;         /* end of block */\n      here_val = 0;\n    }\n\n    /* replicate for those indices with low len bits equal to huff */\n    incr = 1 << (len - drop);\n    fill = 1 << curr;\n    min = fill;                 /* save offset to next table */\n    do {\n      fill -= incr;\n      table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n    } while (fill !== 0);\n\n    /* backwards increment the len-bit code huff */\n    incr = 1 << (len - 1);\n    while (huff & incr) {\n      incr >>= 1;\n    }\n    if (incr !== 0) {\n      huff &= incr - 1;\n      huff += incr;\n    } else {\n      huff = 0;\n    }\n\n    /* go to next symbol, update count, len */\n    sym++;\n    if (--count[len] === 0) {\n      if (len === max) { break; }\n      len = lens[lens_index + work[sym]];\n    }\n\n    /* create new sub-table if needed */\n    if (len > root && (huff & mask) !== low) {\n      /* if first time, transition to sub-tables */\n      if (drop === 0) {\n        drop = root;\n      }\n\n      /* increment past last table */\n      next += min;            /* here min is 1 << curr */\n\n      /* determine length of next table */\n      curr = len - drop;\n      left = 1 << curr;\n      while (curr + drop < max) {\n        left -= count[curr + drop];\n        if (left <= 0) { break; }\n        curr++;\n        left <<= 1;\n      }\n\n      /* check for enough space */\n      used += 1 << curr;\n      if ((type === LENS && used > ENOUGH_LENS) ||\n        (type === DISTS && used > ENOUGH_DISTS)) {\n        return 1;\n      }\n\n      /* point entry in root table to sub-table */\n      low = huff & mask;\n      /*table.op[low] = curr;\n      table.bits[low] = root;\n      table.val[low] = next - opts.table_index;*/\n      table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n    }\n  }\n\n  /* fill in remaining table entry if code is incomplete (guaranteed to have\n   at most one remaining entry, since if the code is incomplete, the\n   maximum code length that was allowed to get this far is one bit) */\n  if (huff !== 0) {\n    //table.op[next + huff] = 64;            /* invalid code marker */\n    //table.bits[next + huff] = len - drop;\n    //table.val[next + huff] = 0;\n    table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n  }\n\n  /* set return parameters */\n  //opts.table_index += used;\n  opts.bits = root;\n  return 0;\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n  2:      'need dictionary',     /* Z_NEED_DICT       2  */\n  1:      'stream end',          /* Z_STREAM_END      1  */\n  0:      '',                    /* Z_OK              0  */\n  '-1':   'file error',          /* Z_ERRNO         (-1) */\n  '-2':   'stream error',        /* Z_STREAM_ERROR  (-2) */\n  '-3':   'data error',          /* Z_DATA_ERROR    (-3) */\n  '-4':   'insufficient memory', /* Z_MEM_ERROR     (-4) */\n  '-5':   'buffer error',        /* Z_BUF_ERROR     (-5) */\n  '-6':   'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//var Z_FILTERED          = 1;\n//var Z_HUFFMAN_ONLY      = 2;\n//var Z_RLE               = 3;\nvar Z_FIXED               = 4;\n//var Z_DEFAULT_STRATEGY  = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nvar Z_BINARY              = 0;\nvar Z_TEXT                = 1;\n//var Z_ASCII             = 1; // = Z_TEXT\nvar Z_UNKNOWN             = 2;\n\n/*============================================================================*/\n\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n// From zutil.h\n\nvar STORED_BLOCK = 0;\nvar STATIC_TREES = 1;\nvar DYN_TREES    = 2;\n/* The three kinds of block type */\n\nvar MIN_MATCH    = 3;\nvar MAX_MATCH    = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nvar LENGTH_CODES  = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nvar LITERALS      = 256;\n/* number of literal bytes 0..255 */\n\nvar L_CODES       = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nvar D_CODES       = 30;\n/* number of distance codes */\n\nvar BL_CODES      = 19;\n/* number of codes used to transfer the bit lengths */\n\nvar HEAP_SIZE     = 2 * L_CODES + 1;\n/* maximum heap size */\n\nvar MAX_BITS      = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar Buf_size      = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nvar MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nvar END_BLOCK   = 256;\n/* end of block literal code */\n\nvar REP_3_6     = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nvar REPZ_3_10   = 17;\n/* repeat a zero length 3-10 times  (3 bits of repeat count) */\n\nvar REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times  (7 bits of repeat count) */\n\n/* eslint-disable comma-spacing,array-bracket-spacing */\nvar extra_lbits =   /* extra bits for each length code */\n  [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];\n\nvar extra_dbits =   /* extra bits for each distance code */\n  [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];\n\nvar extra_blbits =  /* extra bits for each bit length code */\n  [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];\n\nvar bl_order =\n  [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];\n/* eslint-enable comma-spacing,array-bracket-spacing */\n\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nvar DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1\nvar static_ltree  = new Array((L_CODES + 2) * 2);\nzero(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nvar static_dtree  = new Array(D_CODES * 2);\nzero(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nvar _dist_code    = new Array(DIST_CODE_LEN);\nzero(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nvar _length_code  = new Array(MAX_MATCH - MIN_MATCH + 1);\nzero(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nvar base_length   = new Array(LENGTH_CODES);\nzero(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nvar base_dist     = new Array(D_CODES);\nzero(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nfunction StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n\n  this.static_tree  = static_tree;  /* static tree or NULL */\n  this.extra_bits   = extra_bits;   /* extra bits for each code or NULL */\n  this.extra_base   = extra_base;   /* base index for extra_bits */\n  this.elems        = elems;        /* max number of elements in the tree */\n  this.max_length   = max_length;   /* max bit length for the codes */\n\n  // show if `static_tree` has data or dummy - needed for monomorphic objects\n  this.has_stree    = static_tree && static_tree.length;\n}\n\n\nvar static_l_desc;\nvar static_d_desc;\nvar static_bl_desc;\n\n\nfunction TreeDesc(dyn_tree, stat_desc) {\n  this.dyn_tree = dyn_tree;     /* the dynamic tree */\n  this.max_code = 0;            /* largest code with non zero frequency */\n  this.stat_desc = stat_desc;   /* the corresponding static tree */\n}\n\n\n\nfunction d_code(dist) {\n  return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n}\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nfunction put_short(s, w) {\n//    put_byte(s, (uch)((w) & 0xff));\n//    put_byte(s, (uch)((ush)(w) >> 8));\n  s.pending_buf[s.pending++] = (w) & 0xff;\n  s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n}\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nfunction send_bits(s, value, length) {\n  if (s.bi_valid > (Buf_size - length)) {\n    s.bi_buf |= (value << s.bi_valid) & 0xffff;\n    put_short(s, s.bi_buf);\n    s.bi_buf = value >> (Buf_size - s.bi_valid);\n    s.bi_valid += length - Buf_size;\n  } else {\n    s.bi_buf |= (value << s.bi_valid) & 0xffff;\n    s.bi_valid += length;\n  }\n}\n\n\nfunction send_code(s, c, tree) {\n  send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);\n}\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nfunction bi_reverse(code, len) {\n  var res = 0;\n  do {\n    res |= code & 1;\n    code >>>= 1;\n    res <<= 1;\n  } while (--len > 0);\n  return res >>> 1;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nfunction bi_flush(s) {\n  if (s.bi_valid === 16) {\n    put_short(s, s.bi_buf);\n    s.bi_buf = 0;\n    s.bi_valid = 0;\n\n  } else if (s.bi_valid >= 8) {\n    s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n    s.bi_buf >>= 8;\n    s.bi_valid -= 8;\n  }\n}\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n *    above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n *     array bl_count contains the frequencies for each bit length.\n *     The length opt_len is updated; static_len is also updated if stree is\n *     not null.\n */\nfunction gen_bitlen(s, desc)\n//    deflate_state *s;\n//    tree_desc *desc;    /* the tree descriptor */\n{\n  var tree            = desc.dyn_tree;\n  var max_code        = desc.max_code;\n  var stree           = desc.stat_desc.static_tree;\n  var has_stree       = desc.stat_desc.has_stree;\n  var extra           = desc.stat_desc.extra_bits;\n  var base            = desc.stat_desc.extra_base;\n  var max_length      = desc.stat_desc.max_length;\n  var h;              /* heap index */\n  var n, m;           /* iterate over the tree elements */\n  var bits;           /* bit length */\n  var xbits;          /* extra bits */\n  var f;              /* frequency */\n  var overflow = 0;   /* number of elements with bit length too large */\n\n  for (bits = 0; bits <= MAX_BITS; bits++) {\n    s.bl_count[bits] = 0;\n  }\n\n  /* In a first pass, compute the optimal bit lengths (which may\n   * overflow in the case of the bit length tree).\n   */\n  tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */\n\n  for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n    n = s.heap[h];\n    bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;\n    if (bits > max_length) {\n      bits = max_length;\n      overflow++;\n    }\n    tree[n * 2 + 1]/*.Len*/ = bits;\n    /* We overwrite tree[n].Dad which is no longer needed */\n\n    if (n > max_code) { continue; } /* not a leaf node */\n\n    s.bl_count[bits]++;\n    xbits = 0;\n    if (n >= base) {\n      xbits = extra[n - base];\n    }\n    f = tree[n * 2]/*.Freq*/;\n    s.opt_len += f * (bits + xbits);\n    if (has_stree) {\n      s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);\n    }\n  }\n  if (overflow === 0) { return; }\n\n  // Trace((stderr,\"\\nbit length overflow\\n\"));\n  /* This happens for example on obj2 and pic of the Calgary corpus */\n\n  /* Find the first bit length which could increase: */\n  do {\n    bits = max_length - 1;\n    while (s.bl_count[bits] === 0) { bits--; }\n    s.bl_count[bits]--;      /* move one leaf down the tree */\n    s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */\n    s.bl_count[max_length]--;\n    /* The brother of the overflow item also moves one step up,\n     * but this does not affect bl_count[max_length]\n     */\n    overflow -= 2;\n  } while (overflow > 0);\n\n  /* Now recompute all bit lengths, scanning in increasing frequency.\n   * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n   * lengths instead of fixing only the wrong ones. This idea is taken\n   * from 'ar' written by Haruhiko Okumura.)\n   */\n  for (bits = max_length; bits !== 0; bits--) {\n    n = s.bl_count[bits];\n    while (n !== 0) {\n      m = s.heap[--h];\n      if (m > max_code) { continue; }\n      if (tree[m * 2 + 1]/*.Len*/ !== bits) {\n        // Trace((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n        s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;\n        tree[m * 2 + 1]/*.Len*/ = bits;\n      }\n      n--;\n    }\n  }\n}\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n *     zero code length.\n */\nfunction gen_codes(tree, max_code, bl_count)\n//    ct_data *tree;             /* the tree to decorate */\n//    int max_code;              /* largest code with non zero frequency */\n//    ushf *bl_count;            /* number of codes at each bit length */\n{\n  var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */\n  var code = 0;              /* running code value */\n  var bits;                  /* bit index */\n  var n;                     /* code index */\n\n  /* The distribution counts are first used to generate the code values\n   * without bit reversal.\n   */\n  for (bits = 1; bits <= MAX_BITS; bits++) {\n    next_code[bits] = code = (code + bl_count[bits - 1]) << 1;\n  }\n  /* Check that the bit counts in bl_count are consistent. The last code\n   * must be all ones.\n   */\n  //Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,\n  //        \"inconsistent bit counts\");\n  //Tracev((stderr,\"\\ngen_codes: max_code %d \", max_code));\n\n  for (n = 0;  n <= max_code; n++) {\n    var len = tree[n * 2 + 1]/*.Len*/;\n    if (len === 0) { continue; }\n    /* Now reverse the bits */\n    tree[n * 2]/*.Code*/ = bi_reverse(next_code[len]++, len);\n\n    //Tracecv(tree != static_ltree, (stderr,\"\\nn %3d %c l %2d c %4x (%x) \",\n    //     n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));\n  }\n}\n\n\n/* ===========================================================================\n * Initialize the various 'constant' tables.\n */\nfunction tr_static_init() {\n  var n;        /* iterates over tree elements */\n  var bits;     /* bit counter */\n  var length;   /* length value */\n  var code;     /* code value */\n  var dist;     /* distance index */\n  var bl_count = new Array(MAX_BITS + 1);\n  /* number of codes at each bit length for an optimal tree */\n\n  // do check in _tr_init()\n  //if (static_init_done) return;\n\n  /* For some embedded targets, global variables are not initialized: */\n/*#ifdef NO_INIT_GLOBAL_POINTERS\n  static_l_desc.static_tree = static_ltree;\n  static_l_desc.extra_bits = extra_lbits;\n  static_d_desc.static_tree = static_dtree;\n  static_d_desc.extra_bits = extra_dbits;\n  static_bl_desc.extra_bits = extra_blbits;\n#endif*/\n\n  /* Initialize the mapping length (0..255) -> length code (0..28) */\n  length = 0;\n  for (code = 0; code < LENGTH_CODES - 1; code++) {\n    base_length[code] = length;\n    for (n = 0; n < (1 << extra_lbits[code]); n++) {\n      _length_code[length++] = code;\n    }\n  }\n  //Assert (length == 256, \"tr_static_init: length != 256\");\n  /* Note that the length 255 (match length 258) can be represented\n   * in two different ways: code 284 + 5 bits or code 285, so we\n   * overwrite length_code[255] to use the best encoding:\n   */\n  _length_code[length - 1] = code;\n\n  /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n  dist = 0;\n  for (code = 0; code < 16; code++) {\n    base_dist[code] = dist;\n    for (n = 0; n < (1 << extra_dbits[code]); n++) {\n      _dist_code[dist++] = code;\n    }\n  }\n  //Assert (dist == 256, \"tr_static_init: dist != 256\");\n  dist >>= 7; /* from now on, all distances are divided by 128 */\n  for (; code < D_CODES; code++) {\n    base_dist[code] = dist << 7;\n    for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {\n      _dist_code[256 + dist++] = code;\n    }\n  }\n  //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n  /* Construct the codes of the static literal tree */\n  for (bits = 0; bits <= MAX_BITS; bits++) {\n    bl_count[bits] = 0;\n  }\n\n  n = 0;\n  while (n <= 143) {\n    static_ltree[n * 2 + 1]/*.Len*/ = 8;\n    n++;\n    bl_count[8]++;\n  }\n  while (n <= 255) {\n    static_ltree[n * 2 + 1]/*.Len*/ = 9;\n    n++;\n    bl_count[9]++;\n  }\n  while (n <= 279) {\n    static_ltree[n * 2 + 1]/*.Len*/ = 7;\n    n++;\n    bl_count[7]++;\n  }\n  while (n <= 287) {\n    static_ltree[n * 2 + 1]/*.Len*/ = 8;\n    n++;\n    bl_count[8]++;\n  }\n  /* Codes 286 and 287 do not exist, but we must include them in the\n   * tree construction to get a canonical Huffman tree (longest code\n   * all ones)\n   */\n  gen_codes(static_ltree, L_CODES + 1, bl_count);\n\n  /* The static distance tree is trivial: */\n  for (n = 0; n < D_CODES; n++) {\n    static_dtree[n * 2 + 1]/*.Len*/ = 5;\n    static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);\n  }\n\n  // Now data ready and we can init static trees\n  static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n  static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0,          D_CODES, MAX_BITS);\n  static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0,         BL_CODES, MAX_BL_BITS);\n\n  //static_init_done = true;\n}\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nfunction init_block(s) {\n  var n; /* iterates over tree elements */\n\n  /* Initialize the trees. */\n  for (n = 0; n < L_CODES;  n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }\n  for (n = 0; n < D_CODES;  n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }\n  for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }\n\n  s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;\n  s.opt_len = s.static_len = 0;\n  s.last_lit = s.matches = 0;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nfunction bi_windup(s)\n{\n  if (s.bi_valid > 8) {\n    put_short(s, s.bi_buf);\n  } else if (s.bi_valid > 0) {\n    //put_byte(s, (Byte)s->bi_buf);\n    s.pending_buf[s.pending++] = s.bi_buf;\n  }\n  s.bi_buf = 0;\n  s.bi_valid = 0;\n}\n\n/* ===========================================================================\n * Copy a stored block, storing first the length and its\n * one's complement if requested.\n */\nfunction copy_block(s, buf, len, header)\n//DeflateState *s;\n//charf    *buf;    /* the input data */\n//unsigned len;     /* its length */\n//int      header;  /* true if block header must be written */\n{\n  bi_windup(s);        /* align on byte boundary */\n\n  if (header) {\n    put_short(s, len);\n    put_short(s, ~len);\n  }\n//  while (len--) {\n//    put_byte(s, *buf++);\n//  }\n  utils.arraySet(s.pending_buf, s.window, buf, len, s.pending);\n  s.pending += len;\n}\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nfunction smaller(tree, n, m, depth) {\n  var _n2 = n * 2;\n  var _m2 = m * 2;\n  return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n         (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));\n}\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nfunction pqdownheap(s, tree, k)\n//    deflate_state *s;\n//    ct_data *tree;  /* the tree to restore */\n//    int k;               /* node to move down */\n{\n  var v = s.heap[k];\n  var j = k << 1;  /* left son of k */\n  while (j <= s.heap_len) {\n    /* Set j to the smallest of the two sons: */\n    if (j < s.heap_len &&\n      smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n      j++;\n    }\n    /* Exit if v is smaller than both sons */\n    if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n    /* Exchange v with the smallest son */\n    s.heap[k] = s.heap[j];\n    k = j;\n\n    /* And continue down the tree, setting j to the left son of k */\n    j <<= 1;\n  }\n  s.heap[k] = v;\n}\n\n\n// inlined manually\n// var SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nfunction compress_block(s, ltree, dtree)\n//    deflate_state *s;\n//    const ct_data *ltree; /* literal tree */\n//    const ct_data *dtree; /* distance tree */\n{\n  var dist;           /* distance of matched string */\n  var lc;             /* match length or unmatched char (if dist == 0) */\n  var lx = 0;         /* running index in l_buf */\n  var code;           /* the code to send */\n  var extra;          /* number of extra bits to send */\n\n  if (s.last_lit !== 0) {\n    do {\n      dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);\n      lc = s.pending_buf[s.l_buf + lx];\n      lx++;\n\n      if (dist === 0) {\n        send_code(s, lc, ltree); /* send a literal byte */\n        //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n      } else {\n        /* Here, lc is the match length - MIN_MATCH */\n        code = _length_code[lc];\n        send_code(s, code + LITERALS + 1, ltree); /* send the length code */\n        extra = extra_lbits[code];\n        if (extra !== 0) {\n          lc -= base_length[code];\n          send_bits(s, lc, extra);       /* send the extra length bits */\n        }\n        dist--; /* dist is now the match distance - 1 */\n        code = d_code(dist);\n        //Assert (code < D_CODES, \"bad d_code\");\n\n        send_code(s, code, dtree);       /* send the distance code */\n        extra = extra_dbits[code];\n        if (extra !== 0) {\n          dist -= base_dist[code];\n          send_bits(s, dist, extra);   /* send the extra distance bits */\n        }\n      } /* literal or match pair ? */\n\n      /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */\n      //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,\n      //       \"pendingBuf overflow\");\n\n    } while (lx < s.last_lit);\n  }\n\n  send_code(s, END_BLOCK, ltree);\n}\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n *     and corresponding code. The length opt_len is updated; static_len is\n *     also updated if stree is not null. The field max_code is set.\n */\nfunction build_tree(s, desc)\n//    deflate_state *s;\n//    tree_desc *desc; /* the tree descriptor */\n{\n  var tree     = desc.dyn_tree;\n  var stree    = desc.stat_desc.static_tree;\n  var has_stree = desc.stat_desc.has_stree;\n  var elems    = desc.stat_desc.elems;\n  var n, m;          /* iterate over heap elements */\n  var max_code = -1; /* largest code with non zero frequency */\n  var node;          /* new node being created */\n\n  /* Construct the initial heap, with least frequent element in\n   * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n   * heap[0] is not used.\n   */\n  s.heap_len = 0;\n  s.heap_max = HEAP_SIZE;\n\n  for (n = 0; n < elems; n++) {\n    if (tree[n * 2]/*.Freq*/ !== 0) {\n      s.heap[++s.heap_len] = max_code = n;\n      s.depth[n] = 0;\n\n    } else {\n      tree[n * 2 + 1]/*.Len*/ = 0;\n    }\n  }\n\n  /* The pkzip format requires that at least one distance code exists,\n   * and that at least one bit should be sent even if there is only one\n   * possible code. So to avoid special checks later on we force at least\n   * two codes of non zero frequency.\n   */\n  while (s.heap_len < 2) {\n    node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n    tree[node * 2]/*.Freq*/ = 1;\n    s.depth[node] = 0;\n    s.opt_len--;\n\n    if (has_stree) {\n      s.static_len -= stree[node * 2 + 1]/*.Len*/;\n    }\n    /* node is 0 or 1 so it does not have extra bits */\n  }\n  desc.max_code = max_code;\n\n  /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n   * establish sub-heaps of increasing lengths:\n   */\n  for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }\n\n  /* Construct the Huffman tree by repeatedly combining the least two\n   * frequent nodes.\n   */\n  node = elems;              /* next internal node of the tree */\n  do {\n    //pqremove(s, tree, n);  /* n = node of least frequency */\n    /*** pqremove ***/\n    n = s.heap[1/*SMALLEST*/];\n    s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];\n    pqdownheap(s, tree, 1/*SMALLEST*/);\n    /***/\n\n    m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */\n\n    s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n    s.heap[--s.heap_max] = m;\n\n    /* Create a new node father of n and m */\n    tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;\n    s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n    tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;\n\n    /* and insert the new node in the heap */\n    s.heap[1/*SMALLEST*/] = node++;\n    pqdownheap(s, tree, 1/*SMALLEST*/);\n\n  } while (s.heap_len >= 2);\n\n  s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];\n\n  /* At this point, the fields freq and dad are set. We can now\n   * generate the bit lengths.\n   */\n  gen_bitlen(s, desc);\n\n  /* The field len is now set, we can generate the bit codes */\n  gen_codes(tree, max_code, s.bl_count);\n}\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nfunction scan_tree(s, tree, max_code)\n//    deflate_state *s;\n//    ct_data *tree;   /* the tree to be scanned */\n//    int max_code;    /* and its largest code of non zero frequency */\n{\n  var n;                     /* iterates over all tree elements */\n  var prevlen = -1;          /* last emitted length */\n  var curlen;                /* length of current code */\n\n  var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n  var count = 0;             /* repeat count of the current code */\n  var max_count = 7;         /* max repeat count */\n  var min_count = 4;         /* min repeat count */\n\n  if (nextlen === 0) {\n    max_count = 138;\n    min_count = 3;\n  }\n  tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */\n\n  for (n = 0; n <= max_code; n++) {\n    curlen = nextlen;\n    nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n    if (++count < max_count && curlen === nextlen) {\n      continue;\n\n    } else if (count < min_count) {\n      s.bl_tree[curlen * 2]/*.Freq*/ += count;\n\n    } else if (curlen !== 0) {\n\n      if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }\n      s.bl_tree[REP_3_6 * 2]/*.Freq*/++;\n\n    } else if (count <= 10) {\n      s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;\n\n    } else {\n      s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;\n    }\n\n    count = 0;\n    prevlen = curlen;\n\n    if (nextlen === 0) {\n      max_count = 138;\n      min_count = 3;\n\n    } else if (curlen === nextlen) {\n      max_count = 6;\n      min_count = 3;\n\n    } else {\n      max_count = 7;\n      min_count = 4;\n    }\n  }\n}\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nfunction send_tree(s, tree, max_code)\n//    deflate_state *s;\n//    ct_data *tree; /* the tree to be scanned */\n//    int max_code;       /* and its largest code of non zero frequency */\n{\n  var n;                     /* iterates over all tree elements */\n  var prevlen = -1;          /* last emitted length */\n  var curlen;                /* length of current code */\n\n  var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n  var count = 0;             /* repeat count of the current code */\n  var max_count = 7;         /* max repeat count */\n  var min_count = 4;         /* min repeat count */\n\n  /* tree[max_code+1].Len = -1; */  /* guard already set */\n  if (nextlen === 0) {\n    max_count = 138;\n    min_count = 3;\n  }\n\n  for (n = 0; n <= max_code; n++) {\n    curlen = nextlen;\n    nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n    if (++count < max_count && curlen === nextlen) {\n      continue;\n\n    } else if (count < min_count) {\n      do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);\n\n    } else if (curlen !== 0) {\n      if (curlen !== prevlen) {\n        send_code(s, curlen, s.bl_tree);\n        count--;\n      }\n      //Assert(count >= 3 && count <= 6, \" 3_6?\");\n      send_code(s, REP_3_6, s.bl_tree);\n      send_bits(s, count - 3, 2);\n\n    } else if (count <= 10) {\n      send_code(s, REPZ_3_10, s.bl_tree);\n      send_bits(s, count - 3, 3);\n\n    } else {\n      send_code(s, REPZ_11_138, s.bl_tree);\n      send_bits(s, count - 11, 7);\n    }\n\n    count = 0;\n    prevlen = curlen;\n    if (nextlen === 0) {\n      max_count = 138;\n      min_count = 3;\n\n    } else if (curlen === nextlen) {\n      max_count = 6;\n      min_count = 3;\n\n    } else {\n      max_count = 7;\n      min_count = 4;\n    }\n  }\n}\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nfunction build_bl_tree(s) {\n  var max_blindex;  /* index of last bit length code of non zero freq */\n\n  /* Determine the bit length frequencies for literal and distance trees */\n  scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n  scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n  /* Build the bit length tree: */\n  build_tree(s, s.bl_desc);\n  /* opt_len now includes the length of the tree representations, except\n   * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n   */\n\n  /* Determine the number of bit length codes to send. The pkzip format\n   * requires that at least 4 bit length codes be sent. (appnote.txt says\n   * 3 but the actual value used is 4.)\n   */\n  for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n    if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {\n      break;\n    }\n  }\n  /* Update opt_len to include the bit length tree and counts */\n  s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n  //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n  //        s->opt_len, s->static_len));\n\n  return max_blindex;\n}\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nfunction send_all_trees(s, lcodes, dcodes, blcodes)\n//    deflate_state *s;\n//    int lcodes, dcodes, blcodes; /* number of codes for each tree */\n{\n  var rank;                    /* index in bl_order */\n\n  //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n  //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n  //        \"too many codes\");\n  //Tracev((stderr, \"\\nbl counts: \"));\n  send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */\n  send_bits(s, dcodes - 1,   5);\n  send_bits(s, blcodes - 4,  4); /* not -3 as stated in appnote.txt */\n  for (rank = 0; rank < blcodes; rank++) {\n    //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n    send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);\n  }\n  //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n  send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */\n  //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n  send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */\n  //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n}\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n *    a) There are no non-portable control characters belonging to the\n *       \"black list\" (0..6, 14..25, 28..31).\n *    b) There is at least one printable character belonging to the\n *       \"white list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n *   \"gray list\" that is ignored in this detection algorithm:\n *   (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nfunction detect_data_type(s) {\n  /* black_mask is the bit mask of black-listed bytes\n   * set bits 0..6, 14..25, and 28..31\n   * 0xf3ffc07f = binary 11110011111111111100000001111111\n   */\n  var black_mask = 0xf3ffc07f;\n  var n;\n\n  /* Check for non-textual (\"black-listed\") bytes. */\n  for (n = 0; n <= 31; n++, black_mask >>>= 1) {\n    if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {\n      return Z_BINARY;\n    }\n  }\n\n  /* Check for textual (\"white-listed\") bytes. */\n  if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||\n      s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {\n    return Z_TEXT;\n  }\n  for (n = 32; n < LITERALS; n++) {\n    if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {\n      return Z_TEXT;\n    }\n  }\n\n  /* There are no \"black-listed\" or \"white-listed\" bytes:\n   * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n   */\n  return Z_BINARY;\n}\n\n\nvar static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nfunction _tr_init(s)\n{\n\n  if (!static_init_done) {\n    tr_static_init();\n    static_init_done = true;\n  }\n\n  s.l_desc  = new TreeDesc(s.dyn_ltree, static_l_desc);\n  s.d_desc  = new TreeDesc(s.dyn_dtree, static_d_desc);\n  s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n  s.bi_buf = 0;\n  s.bi_valid = 0;\n\n  /* Initialize the first block of the first file: */\n  init_block(s);\n}\n\n\n/* ===========================================================================\n * Send a stored block\n */\nfunction _tr_stored_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf;       /* input block */\n//ulg stored_len;   /* length of input block */\n//int last;         /* one if this is the last block for a file */\n{\n  send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3);    /* send block type */\n  copy_block(s, buf, stored_len, true); /* with header */\n}\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nfunction _tr_align(s) {\n  send_bits(s, STATIC_TREES << 1, 3);\n  send_code(s, END_BLOCK, static_ltree);\n  bi_flush(s);\n}\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and output the encoded block to the zip file.\n */\nfunction _tr_flush_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf;       /* input block, or NULL if too old */\n//ulg stored_len;   /* length of input block */\n//int last;         /* one if this is the last block for a file */\n{\n  var opt_lenb, static_lenb;  /* opt_len and static_len in bytes */\n  var max_blindex = 0;        /* index of last bit length code of non zero freq */\n\n  /* Build the Huffman trees unless a stored block is forced */\n  if (s.level > 0) {\n\n    /* Check if the file is binary or text */\n    if (s.strm.data_type === Z_UNKNOWN) {\n      s.strm.data_type = detect_data_type(s);\n    }\n\n    /* Construct the literal and distance trees */\n    build_tree(s, s.l_desc);\n    // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n    //        s->static_len));\n\n    build_tree(s, s.d_desc);\n    // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n    //        s->static_len));\n    /* At this point, opt_len and static_len are the total bit lengths of\n     * the compressed block data, excluding the tree representations.\n     */\n\n    /* Build the bit length tree for the above two trees, and get the index\n     * in bl_order of the last bit length code to send.\n     */\n    max_blindex = build_bl_tree(s);\n\n    /* Determine the best encoding. Compute the block lengths in bytes. */\n    opt_lenb = (s.opt_len + 3 + 7) >>> 3;\n    static_lenb = (s.static_len + 3 + 7) >>> 3;\n\n    // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n    //        opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n    //        s->last_lit));\n\n    if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }\n\n  } else {\n    // Assert(buf != (char*)0, \"lost buf\");\n    opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n  }\n\n  if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {\n    /* 4: two words for the lengths */\n\n    /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n     * Otherwise we can't have processed more than WSIZE input bytes since\n     * the last block flush, because compression would have been\n     * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n     * transform a block into a stored block.\n     */\n    _tr_stored_block(s, buf, stored_len, last);\n\n  } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {\n\n    send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);\n    compress_block(s, static_ltree, static_dtree);\n\n  } else {\n    send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);\n    send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);\n    compress_block(s, s.dyn_ltree, s.dyn_dtree);\n  }\n  // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n  /* The above check is made mod 2^32, for files larger than 512 MB\n   * and uLong implemented on 32 bits.\n   */\n  init_block(s);\n\n  if (last) {\n    bi_windup(s);\n  }\n  // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n  //       s->compressed_len-7*last));\n}\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nfunction _tr_tally(s, dist, lc)\n//    deflate_state *s;\n//    unsigned dist;  /* distance of matched string */\n//    unsigned lc;    /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n  //var out_length, in_length, dcode;\n\n  s.pending_buf[s.d_buf + s.last_lit * 2]     = (dist >>> 8) & 0xff;\n  s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n  s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n  s.last_lit++;\n\n  if (dist === 0) {\n    /* lc is the unmatched char */\n    s.dyn_ltree[lc * 2]/*.Freq*/++;\n  } else {\n    s.matches++;\n    /* Here, lc is the match length - MIN_MATCH */\n    dist--;             /* dist = match distance - 1 */\n    //Assert((ush)dist < (ush)MAX_DIST(s) &&\n    //       (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n    //       (ush)d_code(dist) < (ush)D_CODES,  \"_tr_tally: bad match\");\n\n    s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n    s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n  }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n//  /* Try to guess if it is profitable to stop the current block here */\n//  if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n//    /* Compute an upper bound for the compressed length */\n//    out_length = s.last_lit*8;\n//    in_length = s.strstart - s.block_start;\n//\n//    for (dcode = 0; dcode < D_CODES; dcode++) {\n//      out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n//    }\n//    out_length >>>= 3;\n//    //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n//    //       s->last_lit, in_length, out_length,\n//    //       100L - out_length*100L/in_length));\n//    if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n//      return true;\n//    }\n//  }\n//#endif\n\n  return (s.last_lit === s.lit_bufsize - 1);\n  /* We avoid equality with lit_bufsize because of wraparound at 64K\n   * on 16 bit machines and because stored blocks are restricted to\n   * 64K-1 bytes.\n   */\n}\n\nexports._tr_init  = _tr_init;\nexports._tr_stored_block = _tr_stored_block;\nexports._tr_flush_block  = _tr_flush_block;\nexports._tr_tally = _tr_tally;\nexports._tr_align = _tr_align;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction ZStream() {\n  /* next input byte */\n  this.input = null; // JS specific, because we have no pointers\n  this.next_in = 0;\n  /* number of bytes available at input */\n  this.avail_in = 0;\n  /* total number of input bytes read so far */\n  this.total_in = 0;\n  /* next output byte should be put there */\n  this.output = null; // JS specific, because we have no pointers\n  this.next_out = 0;\n  /* remaining free space at output */\n  this.avail_out = 0;\n  /* total number of bytes output so far */\n  this.total_out = 0;\n  /* last error message, NULL if no error */\n  this.msg = ''/*Z_NULL*/;\n  /* not visible by applications */\n  this.state = null;\n  /* best guess about the data type: binary or text */\n  this.data_type = 2/*Z_UNKNOWN*/;\n  /* adler32 value of the uncompressed data */\n  this.adler = 0;\n}\n\nmodule.exports = ZStream;\n","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){\"use strict\";var e,i;function c(){return e.apply(null,arguments)}function o(e){return e instanceof Array||\"[object Array]\"===Object.prototype.toString.call(e)}function u(e){return null!=e&&\"[object Object]\"===Object.prototype.toString.call(e)}function l(e){return void 0===e}function d(e){return\"number\"==typeof e||\"[object Number]\"===Object.prototype.toString.call(e)}function h(e){return e instanceof Date||\"[object Date]\"===Object.prototype.toString.call(e)}function f(e,t){var n,s=[];for(n=0;n<e.length;++n)s.push(t(e[n],n));return s}function m(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function _(e,t){for(var n in t)m(t,n)&&(e[n]=t[n]);return m(t,\"toString\")&&(e.toString=t.toString),m(t,\"valueOf\")&&(e.valueOf=t.valueOf),e}function y(e,t,n,s){return Ot(e,t,n,s,!0).utc()}function g(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function p(e){if(null==e._isValid){var t=g(e),n=i.call(t.parsedDateParts,function(e){return null!=e}),s=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(s=s&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return s;e._isValid=s}return e._isValid}function v(e){var t=y(NaN);return null!=e?_(g(t),e):g(t).userInvalidated=!0,t}i=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,s=0;s<n;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1};var r=c.momentProperties=[];function w(e,t){var n,s,i;if(l(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),l(t._i)||(e._i=t._i),l(t._f)||(e._f=t._f),l(t._l)||(e._l=t._l),l(t._strict)||(e._strict=t._strict),l(t._tzm)||(e._tzm=t._tzm),l(t._isUTC)||(e._isUTC=t._isUTC),l(t._offset)||(e._offset=t._offset),l(t._pf)||(e._pf=g(t)),l(t._locale)||(e._locale=t._locale),0<r.length)for(n=0;n<r.length;n++)l(i=t[s=r[n]])||(e[s]=i);return e}var t=!1;function M(e){w(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===t&&(t=!0,c.updateOffset(this),t=!1)}function S(e){return e instanceof M||null!=e&&null!=e._isAMomentObject}function D(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function k(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=D(t)),n}function a(e,t,n){var s,i=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),a=0;for(s=0;s<i;s++)(n&&e[s]!==t[s]||!n&&k(e[s])!==k(t[s]))&&a++;return a+r}function Y(e){!1===c.suppressDeprecationWarnings&&\"undefined\"!=typeof console&&console.warn&&console.warn(\"Deprecation warning: \"+e)}function n(i,r){var a=!0;return _(function(){if(null!=c.deprecationHandler&&c.deprecationHandler(null,i),a){for(var e,t=[],n=0;n<arguments.length;n++){if(e=\"\",\"object\"==typeof arguments[n]){for(var s in e+=\"\\n[\"+n+\"] \",arguments[0])e+=s+\": \"+arguments[0][s]+\", \";e=e.slice(0,-2)}else e=arguments[n];t.push(e)}Y(i+\"\\nArguments: \"+Array.prototype.slice.call(t).join(\"\")+\"\\n\"+(new Error).stack),a=!1}return r.apply(this,arguments)},r)}var s,O={};function T(e,t){null!=c.deprecationHandler&&c.deprecationHandler(e,t),O[e]||(Y(t),O[e]=!0)}function x(e){return e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}function b(e,t){var n,s=_({},e);for(n in t)m(t,n)&&(u(e[n])&&u(t[n])?(s[n]={},_(s[n],e[n]),_(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)m(e,n)&&!m(t,n)&&u(e[n])&&(s[n]=_({},s[n]));return s}function P(e){null!=e&&this.set(e)}c.suppressDeprecationWarnings=!1,c.deprecationHandler=null,s=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)m(e,t)&&n.push(t);return n};var W={};function H(e,t){var n=e.toLowerCase();W[n]=W[n+\"s\"]=W[t]=e}function R(e){return\"string\"==typeof e?W[e]||W[e.toLowerCase()]:void 0}function C(e){var t,n,s={};for(n in e)m(e,n)&&(t=R(n))&&(s[t]=e[n]);return s}var F={};function L(e,t){F[e]=t}function U(e,t,n){var s=\"\"+Math.abs(e),i=t-s.length;return(0<=e?n?\"+\":\"\":\"-\")+Math.pow(10,Math.max(0,i)).toString().substr(1)+s}var N=/(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,G=/(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,V={},E={};function I(e,t,n,s){var i=s;\"string\"==typeof s&&(i=function(){return this[s]()}),e&&(E[e]=i),t&&(E[t[0]]=function(){return U(i.apply(this,arguments),t[1],t[2])}),n&&(E[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function A(e,t){return e.isValid()?(t=j(t,e.localeData()),V[t]=V[t]||function(s){var e,i,t,r=s.match(N);for(e=0,i=r.length;e<i;e++)E[r[e]]?r[e]=E[r[e]]:r[e]=(t=r[e]).match(/\\[[\\s\\S]/)?t.replace(/^\\[|\\]$/g,\"\"):t.replace(/\\\\/g,\"\");return function(e){var t,n=\"\";for(t=0;t<i;t++)n+=x(r[t])?r[t].call(e,s):r[t];return n}}(t),V[t](e)):e.localeData().invalidDate()}function j(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(G.lastIndex=0;0<=n&&G.test(e);)e=e.replace(G,s),G.lastIndex=0,n-=1;return e}var Z=/\\d/,z=/\\d\\d/,$=/\\d{3}/,q=/\\d{4}/,J=/[+-]?\\d{6}/,B=/\\d\\d?/,Q=/\\d\\d\\d\\d?/,X=/\\d\\d\\d\\d\\d\\d?/,K=/\\d{1,3}/,ee=/\\d{1,4}/,te=/[+-]?\\d{1,6}/,ne=/\\d+/,se=/[+-]?\\d+/,ie=/Z|[+-]\\d\\d:?\\d\\d/gi,re=/Z|[+-]\\d\\d(?::?\\d\\d)?/gi,ae=/[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,oe={};function ue(e,n,s){oe[e]=x(n)?n:function(e,t){return e&&s?s:n}}function le(e,t){return m(oe,e)?oe[e](t._strict,t._locale):new RegExp(de(e.replace(\"\\\\\",\"\").replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,function(e,t,n,s,i){return t||n||s||i})))}function de(e){return e.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g,\"\\\\$&\")}var he={};function ce(e,n){var t,s=n;for(\"string\"==typeof e&&(e=[e]),d(n)&&(s=function(e,t){t[n]=k(e)}),t=0;t<e.length;t++)he[e[t]]=s}function fe(e,i){ce(e,function(e,t,n,s){n._w=n._w||{},i(e,n._w,n,s)})}var me=0,_e=1,ye=2,ge=3,pe=4,ve=5,we=6,Me=7,Se=8;function De(e){return ke(e)?366:365}function ke(e){return e%4==0&&e%100!=0||e%400==0}I(\"Y\",0,0,function(){var e=this.year();return e<=9999?\"\"+e:\"+\"+e}),I(0,[\"YY\",2],0,function(){return this.year()%100}),I(0,[\"YYYY\",4],0,\"year\"),I(0,[\"YYYYY\",5],0,\"year\"),I(0,[\"YYYYYY\",6,!0],0,\"year\"),H(\"year\",\"y\"),L(\"year\",1),ue(\"Y\",se),ue(\"YY\",B,z),ue(\"YYYY\",ee,q),ue(\"YYYYY\",te,J),ue(\"YYYYYY\",te,J),ce([\"YYYYY\",\"YYYYYY\"],me),ce(\"YYYY\",function(e,t){t[me]=2===e.length?c.parseTwoDigitYear(e):k(e)}),ce(\"YY\",function(e,t){t[me]=c.parseTwoDigitYear(e)}),ce(\"Y\",function(e,t){t[me]=parseInt(e,10)}),c.parseTwoDigitYear=function(e){return k(e)+(68<k(e)?1900:2e3)};var Ye,Oe=Te(\"FullYear\",!0);function Te(t,n){return function(e){return null!=e?(be(this,t,e),c.updateOffset(this,n),this):xe(this,t)}}function xe(e,t){return e.isValid()?e._d[\"get\"+(e._isUTC?\"UTC\":\"\")+t]():NaN}function be(e,t,n){e.isValid()&&!isNaN(n)&&(\"FullYear\"===t&&ke(e.year())&&1===e.month()&&29===e.date()?e._d[\"set\"+(e._isUTC?\"UTC\":\"\")+t](n,e.month(),Pe(n,e.month())):e._d[\"set\"+(e._isUTC?\"UTC\":\"\")+t](n))}function Pe(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,s=(t%(n=12)+n)%n;return e+=(t-s)/12,1===s?ke(e)?29:28:31-s%7%2}Ye=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},I(\"M\",[\"MM\",2],\"Mo\",function(){return this.month()+1}),I(\"MMM\",0,0,function(e){return this.localeData().monthsShort(this,e)}),I(\"MMMM\",0,0,function(e){return this.localeData().months(this,e)}),H(\"month\",\"M\"),L(\"month\",8),ue(\"M\",B),ue(\"MM\",B,z),ue(\"MMM\",function(e,t){return t.monthsShortRegex(e)}),ue(\"MMMM\",function(e,t){return t.monthsRegex(e)}),ce([\"M\",\"MM\"],function(e,t){t[_e]=k(e)-1}),ce([\"MMM\",\"MMMM\"],function(e,t,n,s){var i=n._locale.monthsParse(e,s,n._strict);null!=i?t[_e]=i:g(n).invalidMonth=e});var We=/D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,He=\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\");var Re=\"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec\".split(\"_\");function Ce(e,t){var n;if(!e.isValid())return e;if(\"string\"==typeof t)if(/^\\d+$/.test(t))t=k(t);else if(!d(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Pe(e.year(),t)),e._d[\"set\"+(e._isUTC?\"UTC\":\"\")+\"Month\"](t,n),e}function Fe(e){return null!=e?(Ce(this,e),c.updateOffset(this,!0),this):xe(this,\"Month\")}var Le=ae;var Ue=ae;function Ne(){function e(e,t){return t.length-e.length}var t,n,s=[],i=[],r=[];for(t=0;t<12;t++)n=y([2e3,t]),s.push(this.monthsShort(n,\"\")),i.push(this.months(n,\"\")),r.push(this.months(n,\"\")),r.push(this.monthsShort(n,\"\"));for(s.sort(e),i.sort(e),r.sort(e),t=0;t<12;t++)s[t]=de(s[t]),i[t]=de(i[t]);for(t=0;t<24;t++)r[t]=de(r[t]);this._monthsRegex=new RegExp(\"^(\"+r.join(\"|\")+\")\",\"i\"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp(\"^(\"+i.join(\"|\")+\")\",\"i\"),this._monthsShortStrictRegex=new RegExp(\"^(\"+s.join(\"|\")+\")\",\"i\")}function Ge(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&0<=e&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function Ve(e,t,n){var s=7+t-n;return-((7+Ge(e,0,s).getUTCDay()-t)%7)+s-1}function Ee(e,t,n,s,i){var r,a,o=1+7*(t-1)+(7+n-s)%7+Ve(e,s,i);return o<=0?a=De(r=e-1)+o:o>De(e)?(r=e+1,a=o-De(e)):(r=e,a=o),{year:r,dayOfYear:a}}function Ie(e,t,n){var s,i,r=Ve(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+Ae(i=e.year()-1,t,n):a>Ae(e.year(),t,n)?(s=a-Ae(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function Ae(e,t,n){var s=Ve(e,t,n),i=Ve(e+1,t,n);return(De(e)-s+i)/7}I(\"w\",[\"ww\",2],\"wo\",\"week\"),I(\"W\",[\"WW\",2],\"Wo\",\"isoWeek\"),H(\"week\",\"w\"),H(\"isoWeek\",\"W\"),L(\"week\",5),L(\"isoWeek\",5),ue(\"w\",B),ue(\"ww\",B,z),ue(\"W\",B),ue(\"WW\",B,z),fe([\"w\",\"ww\",\"W\",\"WW\"],function(e,t,n,s){t[s.substr(0,1)]=k(e)});I(\"d\",0,\"do\",\"day\"),I(\"dd\",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),I(\"ddd\",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),I(\"dddd\",0,0,function(e){return this.localeData().weekdays(this,e)}),I(\"e\",0,0,\"weekday\"),I(\"E\",0,0,\"isoWeekday\"),H(\"day\",\"d\"),H(\"weekday\",\"e\"),H(\"isoWeekday\",\"E\"),L(\"day\",11),L(\"weekday\",11),L(\"isoWeekday\",11),ue(\"d\",B),ue(\"e\",B),ue(\"E\",B),ue(\"dd\",function(e,t){return t.weekdaysMinRegex(e)}),ue(\"ddd\",function(e,t){return t.weekdaysShortRegex(e)}),ue(\"dddd\",function(e,t){return t.weekdaysRegex(e)}),fe([\"dd\",\"ddd\",\"dddd\"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e}),fe([\"d\",\"e\",\"E\"],function(e,t,n,s){t[s]=k(e)});var je=\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\");var Ze=\"Sun_Mon_Tue_Wed_Thu_Fri_Sat\".split(\"_\");var ze=\"Su_Mo_Tu_We_Th_Fr_Sa\".split(\"_\");var $e=ae;var qe=ae;var Je=ae;function Be(){function e(e,t){return t.length-e.length}var t,n,s,i,r,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=y([2e3,1]).day(t),s=this.weekdaysMin(n,\"\"),i=this.weekdaysShort(n,\"\"),r=this.weekdays(n,\"\"),a.push(s),o.push(i),u.push(r),l.push(s),l.push(i),l.push(r);for(a.sort(e),o.sort(e),u.sort(e),l.sort(e),t=0;t<7;t++)o[t]=de(o[t]),u[t]=de(u[t]),l[t]=de(l[t]);this._weekdaysRegex=new RegExp(\"^(\"+l.join(\"|\")+\")\",\"i\"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp(\"^(\"+u.join(\"|\")+\")\",\"i\"),this._weekdaysShortStrictRegex=new RegExp(\"^(\"+o.join(\"|\")+\")\",\"i\"),this._weekdaysMinStrictRegex=new RegExp(\"^(\"+a.join(\"|\")+\")\",\"i\")}function Qe(){return this.hours()%12||12}function Xe(e,t){I(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Ke(e,t){return t._meridiemParse}I(\"H\",[\"HH\",2],0,\"hour\"),I(\"h\",[\"hh\",2],0,Qe),I(\"k\",[\"kk\",2],0,function(){return this.hours()||24}),I(\"hmm\",0,0,function(){return\"\"+Qe.apply(this)+U(this.minutes(),2)}),I(\"hmmss\",0,0,function(){return\"\"+Qe.apply(this)+U(this.minutes(),2)+U(this.seconds(),2)}),I(\"Hmm\",0,0,function(){return\"\"+this.hours()+U(this.minutes(),2)}),I(\"Hmmss\",0,0,function(){return\"\"+this.hours()+U(this.minutes(),2)+U(this.seconds(),2)}),Xe(\"a\",!0),Xe(\"A\",!1),H(\"hour\",\"h\"),L(\"hour\",13),ue(\"a\",Ke),ue(\"A\",Ke),ue(\"H\",B),ue(\"h\",B),ue(\"k\",B),ue(\"HH\",B,z),ue(\"hh\",B,z),ue(\"kk\",B,z),ue(\"hmm\",Q),ue(\"hmmss\",X),ue(\"Hmm\",Q),ue(\"Hmmss\",X),ce([\"H\",\"HH\"],ge),ce([\"k\",\"kk\"],function(e,t,n){var s=k(e);t[ge]=24===s?0:s}),ce([\"a\",\"A\"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ce([\"h\",\"hh\"],function(e,t,n){t[ge]=k(e),g(n).bigHour=!0}),ce(\"hmm\",function(e,t,n){var s=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s)),g(n).bigHour=!0}),ce(\"hmmss\",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s,2)),t[ve]=k(e.substr(i)),g(n).bigHour=!0}),ce(\"Hmm\",function(e,t,n){var s=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s))}),ce(\"Hmmss\",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s,2)),t[ve]=k(e.substr(i))});var et,tt=Te(\"Hours\",!0),nt={calendar:{sameDay:\"[Today at] LT\",nextDay:\"[Tomorrow at] LT\",nextWeek:\"dddd [at] LT\",lastDay:\"[Yesterday at] LT\",lastWeek:\"[Last] dddd [at] LT\",sameElse:\"L\"},longDateFormat:{LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"},invalidDate:\"Invalid date\",ordinal:\"%d\",dayOfMonthOrdinalParse:/\\d{1,2}/,relativeTime:{future:\"in %s\",past:\"%s ago\",s:\"a few seconds\",ss:\"%d seconds\",m:\"a minute\",mm:\"%d minutes\",h:\"an hour\",hh:\"%d hours\",d:\"a day\",dd:\"%d days\",M:\"a month\",MM:\"%d months\",y:\"a year\",yy:\"%d years\"},months:He,monthsShort:Re,week:{dow:0,doy:6},weekdays:je,weekdaysMin:ze,weekdaysShort:Ze,meridiemParse:/[ap]\\.?m?\\.?/i},st={},it={};function rt(e){return e?e.toLowerCase().replace(\"_\",\"-\"):e}function at(e){var t=null;if(!st[e]&&\"undefined\"!=typeof module&&module&&module.exports)try{t=et._abbr,require(\"./locale/\"+e),ot(t)}catch(e){}return st[e]}function ot(e,t){var n;return e&&((n=l(t)?lt(e):ut(e,t))?et=n:\"undefined\"!=typeof console&&console.warn&&console.warn(\"Locale \"+e+\" not found. Did you forget to load it?\")),et._abbr}function ut(e,t){if(null!==t){var n,s=nt;if(t.abbr=e,null!=st[e])T(\"defineLocaleOverride\",\"use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.\"),s=st[e]._config;else if(null!=t.parentLocale)if(null!=st[t.parentLocale])s=st[t.parentLocale]._config;else{if(null==(n=at(t.parentLocale)))return it[t.parentLocale]||(it[t.parentLocale]=[]),it[t.parentLocale].push({name:e,config:t}),null;s=n._config}return st[e]=new P(b(s,t)),it[e]&&it[e].forEach(function(e){ut(e.name,e.config)}),ot(e),st[e]}return delete st[e],null}function lt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return et;if(!o(e)){if(t=at(e))return t;e=[e]}return function(e){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=rt(e[r]).split(\"-\")).length,n=(n=rt(e[r+1]))?n.split(\"-\"):null;0<t;){if(s=at(i.slice(0,t).join(\"-\")))return s;if(n&&n.length>=t&&a(i,n,!0)>=t-1)break;t--}r++}return et}(e)}function dt(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[_e]<0||11<n[_e]?_e:n[ye]<1||n[ye]>Pe(n[me],n[_e])?ye:n[ge]<0||24<n[ge]||24===n[ge]&&(0!==n[pe]||0!==n[ve]||0!==n[we])?ge:n[pe]<0||59<n[pe]?pe:n[ve]<0||59<n[ve]?ve:n[we]<0||999<n[we]?we:-1,g(e)._overflowDayOfYear&&(t<me||ye<t)&&(t=ye),g(e)._overflowWeeks&&-1===t&&(t=Me),g(e)._overflowWeekday&&-1===t&&(t=Se),g(e).overflow=t),e}function ht(e,t,n){return null!=e?e:null!=t?t:n}function ct(e){var t,n,s,i,r,a=[];if(!e._d){var o,u;for(o=e,u=new Date(c.now()),s=o._useUTC?[u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()]:[u.getFullYear(),u.getMonth(),u.getDate()],e._w&&null==e._a[ye]&&null==e._a[_e]&&function(e){var t,n,s,i,r,a,o,u;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)r=1,a=4,n=ht(t.GG,e._a[me],Ie(Tt(),1,4).year),s=ht(t.W,1),((i=ht(t.E,1))<1||7<i)&&(u=!0);else{r=e._locale._week.dow,a=e._locale._week.doy;var l=Ie(Tt(),r,a);n=ht(t.gg,e._a[me],l.year),s=ht(t.w,l.week),null!=t.d?((i=t.d)<0||6<i)&&(u=!0):null!=t.e?(i=t.e+r,(t.e<0||6<t.e)&&(u=!0)):i=r}s<1||s>Ae(n,r,a)?g(e)._overflowWeeks=!0:null!=u?g(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[me]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=ht(e._a[me],s[me]),(e._dayOfYear>De(r)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=Ge(r,0,e._dayOfYear),e._a[_e]=n.getUTCMonth(),e._a[ye]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=s[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ge]&&0===e._a[pe]&&0===e._a[ve]&&0===e._a[we]&&(e._nextDay=!0,e._a[ge]=0),e._d=(e._useUTC?Ge:function(e,t,n,s,i,r,a){var o=new Date(e,t,n,s,i,r,a);return e<100&&0<=e&&isFinite(o.getFullYear())&&o.setFullYear(e),o}).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ge]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}var ft=/^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,mt=/^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,_t=/Z|[+-]\\d\\d(?::?\\d\\d)?/,yt=[[\"YYYYYY-MM-DD\",/[+-]\\d{6}-\\d\\d-\\d\\d/],[\"YYYY-MM-DD\",/\\d{4}-\\d\\d-\\d\\d/],[\"GGGG-[W]WW-E\",/\\d{4}-W\\d\\d-\\d/],[\"GGGG-[W]WW\",/\\d{4}-W\\d\\d/,!1],[\"YYYY-DDD\",/\\d{4}-\\d{3}/],[\"YYYY-MM\",/\\d{4}-\\d\\d/,!1],[\"YYYYYYMMDD\",/[+-]\\d{10}/],[\"YYYYMMDD\",/\\d{8}/],[\"GGGG[W]WWE\",/\\d{4}W\\d{3}/],[\"GGGG[W]WW\",/\\d{4}W\\d{2}/,!1],[\"YYYYDDD\",/\\d{7}/]],gt=[[\"HH:mm:ss.SSSS\",/\\d\\d:\\d\\d:\\d\\d\\.\\d+/],[\"HH:mm:ss,SSSS\",/\\d\\d:\\d\\d:\\d\\d,\\d+/],[\"HH:mm:ss\",/\\d\\d:\\d\\d:\\d\\d/],[\"HH:mm\",/\\d\\d:\\d\\d/],[\"HHmmss.SSSS\",/\\d\\d\\d\\d\\d\\d\\.\\d+/],[\"HHmmss,SSSS\",/\\d\\d\\d\\d\\d\\d,\\d+/],[\"HHmmss\",/\\d\\d\\d\\d\\d\\d/],[\"HHmm\",/\\d\\d\\d\\d/],[\"HH\",/\\d\\d/]],pt=/^\\/?Date\\((\\-?\\d+)/i;function vt(e){var t,n,s,i,r,a,o=e._i,u=ft.exec(o)||mt.exec(o);if(u){for(g(e).iso=!0,t=0,n=yt.length;t<n;t++)if(yt[t][1].exec(u[1])){i=yt[t][0],s=!1!==yt[t][2];break}if(null==i)return void(e._isValid=!1);if(u[3]){for(t=0,n=gt.length;t<n;t++)if(gt[t][1].exec(u[3])){r=(u[2]||\" \")+gt[t][0];break}if(null==r)return void(e._isValid=!1)}if(!s&&null!=r)return void(e._isValid=!1);if(u[4]){if(!_t.exec(u[4]))return void(e._isValid=!1);a=\"Z\"}e._f=i+(r||\"\")+(a||\"\"),kt(e)}else e._isValid=!1}var wt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/;function Mt(e,t,n,s,i,r){var a=[function(e){var t=parseInt(e,10);{if(t<=49)return 2e3+t;if(t<=999)return 1900+t}return t}(e),Re.indexOf(t),parseInt(n,10),parseInt(s,10),parseInt(i,10)];return r&&a.push(parseInt(r,10)),a}var St={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Dt(e){var t,n,s,i=wt.exec(e._i.replace(/\\([^)]*\\)|[\\n\\t]/g,\" \").replace(/(\\s\\s+)/g,\" \").trim());if(i){var r=Mt(i[4],i[3],i[2],i[5],i[6],i[7]);if(t=i[1],n=r,s=e,t&&Ze.indexOf(t)!==new Date(n[0],n[1],n[2]).getDay()&&(g(s).weekdayMismatch=!0,!(s._isValid=!1)))return;e._a=r,e._tzm=function(e,t,n){if(e)return St[e];if(t)return 0;var s=parseInt(n,10),i=s%100;return(s-i)/100*60+i}(i[8],i[9],i[10]),e._d=Ge.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function kt(e){if(e._f!==c.ISO_8601)if(e._f!==c.RFC_2822){e._a=[],g(e).empty=!0;var t,n,s,i,r,a,o,u,l=\"\"+e._i,d=l.length,h=0;for(s=j(e._f,e._locale).match(N)||[],t=0;t<s.length;t++)i=s[t],(n=(l.match(le(i,e))||[])[0])&&(0<(r=l.substr(0,l.indexOf(n))).length&&g(e).unusedInput.push(r),l=l.slice(l.indexOf(n)+n.length),h+=n.length),E[i]?(n?g(e).empty=!1:g(e).unusedTokens.push(i),a=i,u=e,null!=(o=n)&&m(he,a)&&he[a](o,u._a,u,a)):e._strict&&!n&&g(e).unusedTokens.push(i);g(e).charsLeftOver=d-h,0<l.length&&g(e).unusedInput.push(l),e._a[ge]<=12&&!0===g(e).bigHour&&0<e._a[ge]&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[ge]=function(e,t,n){var s;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):(null!=e.isPM&&((s=e.isPM(n))&&t<12&&(t+=12),s||12!==t||(t=0)),t)}(e._locale,e._a[ge],e._meridiem),ct(e),dt(e)}else Dt(e);else vt(e)}function Yt(e){var t,n,s,i,r=e._i,a=e._f;return e._locale=e._locale||lt(e._l),null===r||void 0===a&&\"\"===r?v({nullInput:!0}):(\"string\"==typeof r&&(e._i=r=e._locale.preparse(r)),S(r)?new M(dt(r)):(h(r)?e._d=r:o(a)?function(e){var t,n,s,i,r;if(0===e._f.length)return g(e).invalidFormat=!0,e._d=new Date(NaN);for(i=0;i<e._f.length;i++)r=0,t=w({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],kt(t),p(t)&&(r+=g(t).charsLeftOver,r+=10*g(t).unusedTokens.length,g(t).score=r,(null==s||r<s)&&(s=r,n=t));_(e,n||t)}(e):a?kt(e):l(n=(t=e)._i)?t._d=new Date(c.now()):h(n)?t._d=new Date(n.valueOf()):\"string\"==typeof n?(s=t,null===(i=pt.exec(s._i))?(vt(s),!1===s._isValid&&(delete s._isValid,Dt(s),!1===s._isValid&&(delete s._isValid,c.createFromInputFallback(s)))):s._d=new Date(+i[1])):o(n)?(t._a=f(n.slice(0),function(e){return parseInt(e,10)}),ct(t)):u(n)?function(e){if(!e._d){var t=C(e._i);e._a=f([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),ct(e)}}(t):d(n)?t._d=new Date(n):c.createFromInputFallback(t),p(e)||(e._d=null),e))}function Ot(e,t,n,s,i){var r,a={};return!0!==n&&!1!==n||(s=n,n=void 0),(u(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||o(e)&&0===e.length)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=e,a._f=t,a._strict=s,(r=new M(dt(Yt(a))))._nextDay&&(r.add(1,\"d\"),r._nextDay=void 0),r}function Tt(e,t,n,s){return Ot(e,t,n,s,!1)}c.createFromInputFallback=n(\"value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.\",function(e){e._d=new Date(e._i+(e._useUTC?\" UTC\":\"\"))}),c.ISO_8601=function(){},c.RFC_2822=function(){};var xt=n(\"moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/\",function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:v()}),bt=n(\"moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/\",function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:v()});function Pt(e,t){var n,s;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Tt();for(n=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](n)||(n=t[s]);return n}var Wt=[\"year\",\"quarter\",\"month\",\"week\",\"day\",\"hour\",\"minute\",\"second\",\"millisecond\"];function Ht(e){var t=C(e),n=t.year||0,s=t.quarter||0,i=t.month||0,r=t.week||0,a=t.day||0,o=t.hour||0,u=t.minute||0,l=t.second||0,d=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===Ye.call(Wt,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,s=0;s<Wt.length;++s)if(e[Wt[s]]){if(n)return!1;parseFloat(e[Wt[s]])!==k(e[Wt[s]])&&(n=!0)}return!0}(t),this._milliseconds=+d+1e3*l+6e4*u+1e3*o*60*60,this._days=+a+7*r,this._months=+i+3*s+12*n,this._data={},this._locale=lt(),this._bubble()}function Rt(e){return e instanceof Ht}function Ct(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ft(e,n){I(e,0,0,function(){var e=this.utcOffset(),t=\"+\";return e<0&&(e=-e,t=\"-\"),t+U(~~(e/60),2)+n+U(~~e%60,2)})}Ft(\"Z\",\":\"),Ft(\"ZZ\",\"\"),ue(\"Z\",re),ue(\"ZZ\",re),ce([\"Z\",\"ZZ\"],function(e,t,n){n._useUTC=!0,n._tzm=Ut(re,e)});var Lt=/([\\+\\-]|\\d\\d)/gi;function Ut(e,t){var n=(t||\"\").match(e);if(null===n)return null;var s=((n[n.length-1]||[])+\"\").match(Lt)||[\"-\",0,0],i=60*s[1]+k(s[2]);return 0===i?0:\"+\"===s[0]?i:-i}function Nt(e,t){var n,s;return t._isUTC?(n=t.clone(),s=(S(e)||h(e)?e.valueOf():Tt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+s),c.updateOffset(n,!1),n):Tt(e).local()}function Gt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Vt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}c.updateOffset=function(){};var Et=/^(\\-|\\+)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/,It=/^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function At(e,t){var n,s,i,r=e,a=null;return Rt(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:d(e)?(r={},t?r[t]=e:r.milliseconds=e):(a=Et.exec(e))?(n=\"-\"===a[1]?-1:1,r={y:0,d:k(a[ye])*n,h:k(a[ge])*n,m:k(a[pe])*n,s:k(a[ve])*n,ms:k(Ct(1e3*a[we]))*n}):(a=It.exec(e))?(n=\"-\"===a[1]?-1:(a[1],1),r={y:jt(a[2],n),M:jt(a[3],n),w:jt(a[4],n),d:jt(a[5],n),h:jt(a[6],n),m:jt(a[7],n),s:jt(a[8],n)}):null==r?r={}:\"object\"==typeof r&&(\"from\"in r||\"to\"in r)&&(i=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Nt(t,e),e.isBefore(t)?n=Zt(e,t):((n=Zt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(Tt(r.from),Tt(r.to)),(r={}).ms=i.milliseconds,r.M=i.months),s=new Ht(r),Rt(e)&&m(e,\"_locale\")&&(s._locale=e._locale),s}function jt(e,t){var n=e&&parseFloat(e.replace(\",\",\".\"));return(isNaN(n)?0:n)*t}function Zt(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,\"M\").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,\"M\"),n}function zt(s,i){return function(e,t){var n;return null===t||isNaN(+t)||(T(i,\"moment().\"+i+\"(period, number) is deprecated. Please use moment().\"+i+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),n=e,e=t,t=n),$t(this,At(e=\"string\"==typeof e?+e:e,t),s),this}}function $t(e,t,n,s){var i=t._milliseconds,r=Ct(t._days),a=Ct(t._months);e.isValid()&&(s=null==s||s,a&&Ce(e,xe(e,\"Month\")+a*n),r&&be(e,\"Date\",xe(e,\"Date\")+r*n),i&&e._d.setTime(e._d.valueOf()+i*n),s&&c.updateOffset(e,r||a))}At.fn=Ht.prototype,At.invalid=function(){return At(NaN)};var qt=zt(1,\"add\"),Jt=zt(-1,\"subtract\");function Bt(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),s=e.clone().add(n,\"months\");return-(n+(t-s<0?(t-s)/(s-e.clone().add(n-1,\"months\")):(t-s)/(e.clone().add(n+1,\"months\")-s)))||0}function Qt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=lt(e))&&(this._locale=t),this)}c.defaultFormat=\"YYYY-MM-DDTHH:mm:ssZ\",c.defaultFormatUtc=\"YYYY-MM-DDTHH:mm:ss[Z]\";var Xt=n(\"moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.\",function(e){return void 0===e?this.localeData():this.locale(e)});function Kt(){return this._locale}function en(e,t){I(0,[e,e.length],0,t)}function tn(e,t,n,s,i){var r;return null==e?Ie(this,s,i).year:((r=Ae(e,s,i))<t&&(t=r),function(e,t,n,s,i){var r=Ee(e,t,n,s,i),a=Ge(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,n,s,i))}I(0,[\"gg\",2],0,function(){return this.weekYear()%100}),I(0,[\"GG\",2],0,function(){return this.isoWeekYear()%100}),en(\"gggg\",\"weekYear\"),en(\"ggggg\",\"weekYear\"),en(\"GGGG\",\"isoWeekYear\"),en(\"GGGGG\",\"isoWeekYear\"),H(\"weekYear\",\"gg\"),H(\"isoWeekYear\",\"GG\"),L(\"weekYear\",1),L(\"isoWeekYear\",1),ue(\"G\",se),ue(\"g\",se),ue(\"GG\",B,z),ue(\"gg\",B,z),ue(\"GGGG\",ee,q),ue(\"gggg\",ee,q),ue(\"GGGGG\",te,J),ue(\"ggggg\",te,J),fe([\"gggg\",\"ggggg\",\"GGGG\",\"GGGGG\"],function(e,t,n,s){t[s.substr(0,2)]=k(e)}),fe([\"gg\",\"GG\"],function(e,t,n,s){t[s]=c.parseTwoDigitYear(e)}),I(\"Q\",0,\"Qo\",\"quarter\"),H(\"quarter\",\"Q\"),L(\"quarter\",7),ue(\"Q\",Z),ce(\"Q\",function(e,t){t[_e]=3*(k(e)-1)}),I(\"D\",[\"DD\",2],\"Do\",\"date\"),H(\"date\",\"D\"),L(\"date\",9),ue(\"D\",B),ue(\"DD\",B,z),ue(\"Do\",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),ce([\"D\",\"DD\"],ye),ce(\"Do\",function(e,t){t[ye]=k(e.match(B)[0])});var nn=Te(\"Date\",!0);I(\"DDD\",[\"DDDD\",3],\"DDDo\",\"dayOfYear\"),H(\"dayOfYear\",\"DDD\"),L(\"dayOfYear\",4),ue(\"DDD\",K),ue(\"DDDD\",$),ce([\"DDD\",\"DDDD\"],function(e,t,n){n._dayOfYear=k(e)}),I(\"m\",[\"mm\",2],0,\"minute\"),H(\"minute\",\"m\"),L(\"minute\",14),ue(\"m\",B),ue(\"mm\",B,z),ce([\"m\",\"mm\"],pe);var sn=Te(\"Minutes\",!1);I(\"s\",[\"ss\",2],0,\"second\"),H(\"second\",\"s\"),L(\"second\",15),ue(\"s\",B),ue(\"ss\",B,z),ce([\"s\",\"ss\"],ve);var rn,an=Te(\"Seconds\",!1);for(I(\"S\",0,0,function(){return~~(this.millisecond()/100)}),I(0,[\"SS\",2],0,function(){return~~(this.millisecond()/10)}),I(0,[\"SSS\",3],0,\"millisecond\"),I(0,[\"SSSS\",4],0,function(){return 10*this.millisecond()}),I(0,[\"SSSSS\",5],0,function(){return 100*this.millisecond()}),I(0,[\"SSSSSS\",6],0,function(){return 1e3*this.millisecond()}),I(0,[\"SSSSSSS\",7],0,function(){return 1e4*this.millisecond()}),I(0,[\"SSSSSSSS\",8],0,function(){return 1e5*this.millisecond()}),I(0,[\"SSSSSSSSS\",9],0,function(){return 1e6*this.millisecond()}),H(\"millisecond\",\"ms\"),L(\"millisecond\",16),ue(\"S\",K,Z),ue(\"SS\",K,z),ue(\"SSS\",K,$),rn=\"SSSS\";rn.length<=9;rn+=\"S\")ue(rn,ne);function on(e,t){t[we]=k(1e3*(\"0.\"+e))}for(rn=\"S\";rn.length<=9;rn+=\"S\")ce(rn,on);var un=Te(\"Milliseconds\",!1);I(\"z\",0,0,\"zoneAbbr\"),I(\"zz\",0,0,\"zoneName\");var ln=M.prototype;function dn(e){return e}ln.add=qt,ln.calendar=function(e,t){var n=e||Tt(),s=Nt(n,this).startOf(\"day\"),i=c.calendarFormat(this,s)||\"sameElse\",r=t&&(x(t[i])?t[i].call(this,n):t[i]);return this.format(r||this.localeData().calendar(i,this,Tt(n)))},ln.clone=function(){return new M(this)},ln.diff=function(e,t,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=Nt(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=R(t)){case\"year\":r=Bt(this,s)/12;break;case\"month\":r=Bt(this,s);break;case\"quarter\":r=Bt(this,s)/3;break;case\"second\":r=(this-s)/1e3;break;case\"minute\":r=(this-s)/6e4;break;case\"hour\":r=(this-s)/36e5;break;case\"day\":r=(this-s-i)/864e5;break;case\"week\":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:D(r)},ln.endOf=function(e){return void 0===(e=R(e))||\"millisecond\"===e?this:(\"date\"===e&&(e=\"day\"),this.startOf(e).add(1,\"isoWeek\"===e?\"week\":e).subtract(1,\"ms\"))},ln.format=function(e){e||(e=this.isUtc()?c.defaultFormatUtc:c.defaultFormat);var t=A(this,e);return this.localeData().postformat(t)},ln.from=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Tt(e).isValid())?At({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},ln.fromNow=function(e){return this.from(Tt(),e)},ln.to=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Tt(e).isValid())?At({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},ln.toNow=function(e){return this.to(Tt(),e)},ln.get=function(e){return x(this[e=R(e)])?this[e]():this},ln.invalidAt=function(){return g(this).overflow},ln.isAfter=function(e,t){var n=S(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&(\"millisecond\"===(t=R(l(t)?\"millisecond\":t))?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},ln.isBefore=function(e,t){var n=S(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&(\"millisecond\"===(t=R(l(t)?\"millisecond\":t))?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},ln.isBetween=function(e,t,n,s){return(\"(\"===(s=s||\"()\")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(\")\"===s[1]?this.isBefore(t,n):!this.isAfter(t,n))},ln.isSame=function(e,t){var n,s=S(e)?e:Tt(e);return!(!this.isValid()||!s.isValid())&&(\"millisecond\"===(t=R(t||\"millisecond\"))?this.valueOf()===s.valueOf():(n=s.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},ln.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},ln.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},ln.isValid=function(){return p(this)},ln.lang=Xt,ln.locale=Qt,ln.localeData=Kt,ln.max=bt,ln.min=xt,ln.parsingFlags=function(){return _({},g(this))},ln.set=function(e,t){if(\"object\"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:F[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}(e=C(e)),s=0;s<n.length;s++)this[n[s].unit](e[n[s].unit]);else if(x(this[e=R(e)]))return this[e](t);return this},ln.startOf=function(e){switch(e=R(e)){case\"year\":this.month(0);case\"quarter\":case\"month\":this.date(1);case\"week\":case\"isoWeek\":case\"day\":case\"date\":this.hours(0);case\"hour\":this.minutes(0);case\"minute\":this.seconds(0);case\"second\":this.milliseconds(0)}return\"week\"===e&&this.weekday(0),\"isoWeek\"===e&&this.isoWeekday(1),\"quarter\"===e&&this.month(3*Math.floor(this.month()/3)),this},ln.subtract=Jt,ln.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},ln.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},ln.toDate=function(){return new Date(this.valueOf())},ln.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||9999<n.year()?A(n,t?\"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]\":\"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ\"):x(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace(\"Z\",A(n,\"Z\")):A(n,t?\"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]\":\"YYYY-MM-DD[T]HH:mm:ss.SSSZ\")},ln.inspect=function(){if(!this.isValid())return\"moment.invalid(/* \"+this._i+\" */)\";var e=\"moment\",t=\"\";this.isLocal()||(e=0===this.utcOffset()?\"moment.utc\":\"moment.parseZone\",t=\"Z\");var n=\"[\"+e+'(\"]',s=0<=this.year()&&this.year()<=9999?\"YYYY\":\"YYYYYY\",i=t+'[\")]';return this.format(n+s+\"-MM-DD[T]HH:mm:ss.SSS\"+i)},ln.toJSON=function(){return this.isValid()?this.toISOString():null},ln.toString=function(){return this.clone().locale(\"en\").format(\"ddd MMM DD YYYY HH:mm:ss [GMT]ZZ\")},ln.unix=function(){return Math.floor(this.valueOf()/1e3)},ln.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},ln.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},ln.year=Oe,ln.isLeapYear=function(){return ke(this.year())},ln.weekYear=function(e){return tn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},ln.isoWeekYear=function(e){return tn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},ln.quarter=ln.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},ln.month=Fe,ln.daysInMonth=function(){return Pe(this.year(),this.month())},ln.week=ln.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),\"d\")},ln.isoWeek=ln.isoWeeks=function(e){var t=Ie(this,1,4).week;return null==e?t:this.add(7*(e-t),\"d\")},ln.weeksInYear=function(){var e=this.localeData()._week;return Ae(this.year(),e.dow,e.doy)},ln.isoWeeksInYear=function(){return Ae(this.year(),1,4)},ln.date=nn,ln.day=ln.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t,n,s=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(t=e,n=this.localeData(),e=\"string\"!=typeof t?t:isNaN(t)?\"number\"==typeof(t=n.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-s,\"d\")):s},ln.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,\"d\")},ln.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=(n=e,s=this.localeData(),\"string\"==typeof n?s.weekdaysParse(n)%7||7:isNaN(n)?null:n);return this.day(this.day()%7?t:t-7)}return this.day()||7;var n,s},ln.dayOfYear=function(e){var t=Math.round((this.clone().startOf(\"day\")-this.clone().startOf(\"year\"))/864e5)+1;return null==e?t:this.add(e-t,\"d\")},ln.hour=ln.hours=tt,ln.minute=ln.minutes=sn,ln.second=ln.seconds=an,ln.millisecond=ln.milliseconds=un,ln.utcOffset=function(e,t,n){var s,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if(\"string\"==typeof e){if(null===(e=Ut(re,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(s=Gt(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,\"m\"),i!==e&&(!t||this._changeInProgress?$t(this,At(e-i,\"m\"),1,!1):this._changeInProgress||(this._changeInProgress=!0,c.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Gt(this)},ln.utc=function(e){return this.utcOffset(0,e)},ln.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Gt(this),\"m\")),this},ln.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if(\"string\"==typeof this._i){var e=Ut(ie,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},ln.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Tt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},ln.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},ln.isLocal=function(){return!!this.isValid()&&!this._isUTC},ln.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},ln.isUtc=Vt,ln.isUTC=Vt,ln.zoneAbbr=function(){return this._isUTC?\"UTC\":\"\"},ln.zoneName=function(){return this._isUTC?\"Coordinated Universal Time\":\"\"},ln.dates=n(\"dates accessor is deprecated. Use date instead.\",nn),ln.months=n(\"months accessor is deprecated. Use month instead\",Fe),ln.years=n(\"years accessor is deprecated. Use year instead\",Oe),ln.zone=n(\"moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/\",function(e,t){return null!=e?(\"string\"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),ln.isDSTShifted=n(\"isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information\",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e={};if(w(e,this),(e=Yt(e))._a){var t=e._isUTC?y(e._a):Tt(e._a);this._isDSTShifted=this.isValid()&&0<a(e._a,t.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted});var hn=P.prototype;function cn(e,t,n,s){var i=lt(),r=y().set(s,t);return i[n](r,e)}function fn(e,t,n){if(d(e)&&(t=e,e=void 0),e=e||\"\",null!=t)return cn(e,t,n,\"month\");var s,i=[];for(s=0;s<12;s++)i[s]=cn(e,s,n,\"month\");return i}function mn(e,t,n,s){\"boolean\"==typeof e?d(t)&&(n=t,t=void 0):(t=e,e=!1,d(n=t)&&(n=t,t=void 0)),t=t||\"\";var i,r=lt(),a=e?r._week.dow:0;if(null!=n)return cn(t,(n+a)%7,s,\"day\");var o=[];for(i=0;i<7;i++)o[i]=cn(t,(i+a)%7,s,\"day\");return o}hn.calendar=function(e,t,n){var s=this._calendar[e]||this._calendar.sameElse;return x(s)?s.call(t,n):s},hn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},hn.invalidDate=function(){return this._invalidDate},hn.ordinal=function(e){return this._ordinal.replace(\"%d\",e)},hn.preparse=dn,hn.postformat=dn,hn.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return x(i)?i(e,t,n,s):i.replace(/%d/i,e)},hn.pastFuture=function(e,t){var n=this._relativeTime[0<e?\"future\":\"past\"];return x(n)?n(t):n.replace(/%s/i,t)},hn.set=function(e){var t,n;for(n in e)x(t=e[n])?this[n]=t:this[\"_\"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+\"|\"+/\\d{1,2}/.source)},hn.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||We).test(t)?\"format\":\"standalone\"][e.month()]:o(this._months)?this._months:this._months.standalone},hn.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[We.test(t)?\"format\":\"standalone\"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},hn.monthsParse=function(e,t,n){var s,i,r;if(this._monthsParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=y([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,\"\").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,\"\").toLocaleLowerCase();return n?\"MMM\"===t?-1!==(i=Ye.call(this._shortMonthsParse,a))?i:null:-1!==(i=Ye.call(this._longMonthsParse,a))?i:null:\"MMM\"===t?-1!==(i=Ye.call(this._shortMonthsParse,a))?i:-1!==(i=Ye.call(this._longMonthsParse,a))?i:null:-1!==(i=Ye.call(this._longMonthsParse,a))?i:-1!==(i=Ye.call(this._shortMonthsParse,a))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=y([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp(\"^\"+this.months(i,\"\").replace(\".\",\"\")+\"$\",\"i\"),this._shortMonthsParse[s]=new RegExp(\"^\"+this.monthsShort(i,\"\").replace(\".\",\"\")+\"$\",\"i\")),n||this._monthsParse[s]||(r=\"^\"+this.months(i,\"\")+\"|^\"+this.monthsShort(i,\"\"),this._monthsParse[s]=new RegExp(r.replace(\".\",\"\"),\"i\")),n&&\"MMMM\"===t&&this._longMonthsParse[s].test(e))return s;if(n&&\"MMM\"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},hn.monthsRegex=function(e){return this._monthsParseExact?(m(this,\"_monthsRegex\")||Ne.call(this),e?this._monthsStrictRegex:this._monthsRegex):(m(this,\"_monthsRegex\")||(this._monthsRegex=Ue),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},hn.monthsShortRegex=function(e){return this._monthsParseExact?(m(this,\"_monthsRegex\")||Ne.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(m(this,\"_monthsShortRegex\")||(this._monthsShortRegex=Le),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},hn.week=function(e){return Ie(e,this._week.dow,this._week.doy).week},hn.firstDayOfYear=function(){return this._week.doy},hn.firstDayOfWeek=function(){return this._week.dow},hn.weekdays=function(e,t){return e?o(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?\"format\":\"standalone\"][e.day()]:o(this._weekdays)?this._weekdays:this._weekdays.standalone},hn.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},hn.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},hn.weekdaysParse=function(e,t,n){var s,i,r;if(this._weekdaysParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=y([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,\"\").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,\"\").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,\"\").toLocaleLowerCase();return n?\"dddd\"===t?-1!==(i=Ye.call(this._weekdaysParse,a))?i:null:\"ddd\"===t?-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:\"dddd\"===t?-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:\"ddd\"===t?-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=y([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp(\"^\"+this.weekdays(i,\"\").replace(\".\",\".?\")+\"$\",\"i\"),this._shortWeekdaysParse[s]=new RegExp(\"^\"+this.weekdaysShort(i,\"\").replace(\".\",\".?\")+\"$\",\"i\"),this._minWeekdaysParse[s]=new RegExp(\"^\"+this.weekdaysMin(i,\"\").replace(\".\",\".?\")+\"$\",\"i\")),this._weekdaysParse[s]||(r=\"^\"+this.weekdays(i,\"\")+\"|^\"+this.weekdaysShort(i,\"\")+\"|^\"+this.weekdaysMin(i,\"\"),this._weekdaysParse[s]=new RegExp(r.replace(\".\",\"\"),\"i\")),n&&\"dddd\"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&\"ddd\"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&\"dd\"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},hn.weekdaysRegex=function(e){return this._weekdaysParseExact?(m(this,\"_weekdaysRegex\")||Be.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(m(this,\"_weekdaysRegex\")||(this._weekdaysRegex=$e),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},hn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(m(this,\"_weekdaysRegex\")||Be.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(m(this,\"_weekdaysShortRegex\")||(this._weekdaysShortRegex=qe),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},hn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(m(this,\"_weekdaysRegex\")||Be.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(m(this,\"_weekdaysMinRegex\")||(this._weekdaysMinRegex=Je),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},hn.isPM=function(e){return\"p\"===(e+\"\").toLowerCase().charAt(0)},hn.meridiem=function(e,t,n){return 11<e?n?\"pm\":\"PM\":n?\"am\":\"AM\"},ot(\"en\",{dayOfMonthOrdinalParse:/\\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===k(e%100/10)?\"th\":1===t?\"st\":2===t?\"nd\":3===t?\"rd\":\"th\")}}),c.lang=n(\"moment.lang is deprecated. Use moment.locale instead.\",ot),c.langData=n(\"moment.langData is deprecated. Use moment.localeData instead.\",lt);var _n=Math.abs;function yn(e,t,n,s){var i=At(t,n);return e._milliseconds+=s*i._milliseconds,e._days+=s*i._days,e._months+=s*i._months,e._bubble()}function gn(e){return e<0?Math.floor(e):Math.ceil(e)}function pn(e){return 4800*e/146097}function vn(e){return 146097*e/4800}function wn(e){return function(){return this.as(e)}}var Mn=wn(\"ms\"),Sn=wn(\"s\"),Dn=wn(\"m\"),kn=wn(\"h\"),Yn=wn(\"d\"),On=wn(\"w\"),Tn=wn(\"M\"),xn=wn(\"y\");function bn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Pn=bn(\"milliseconds\"),Wn=bn(\"seconds\"),Hn=bn(\"minutes\"),Rn=bn(\"hours\"),Cn=bn(\"days\"),Fn=bn(\"months\"),Ln=bn(\"years\");var Un=Math.round,Nn={ss:44,s:45,m:45,h:22,d:26,M:11};var Gn=Math.abs;function Vn(e){return(0<e)-(e<0)||+e}function En(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Gn(this._milliseconds)/1e3,s=Gn(this._days),i=Gn(this._months);t=D((e=D(n/60))/60),n%=60,e%=60;var r=D(i/12),a=i%=12,o=s,u=t,l=e,d=n?n.toFixed(3).replace(/\\.?0+$/,\"\"):\"\",h=this.asSeconds();if(!h)return\"P0D\";var c=h<0?\"-\":\"\",f=Vn(this._months)!==Vn(h)?\"-\":\"\",m=Vn(this._days)!==Vn(h)?\"-\":\"\",_=Vn(this._milliseconds)!==Vn(h)?\"-\":\"\";return c+\"P\"+(r?f+r+\"Y\":\"\")+(a?f+a+\"M\":\"\")+(o?m+o+\"D\":\"\")+(u||l||d?\"T\":\"\")+(u?_+u+\"H\":\"\")+(l?_+l+\"M\":\"\")+(d?_+d+\"S\":\"\")}var In=Ht.prototype;return In.isValid=function(){return this._isValid},In.abs=function(){var e=this._data;return this._milliseconds=_n(this._milliseconds),this._days=_n(this._days),this._months=_n(this._months),e.milliseconds=_n(e.milliseconds),e.seconds=_n(e.seconds),e.minutes=_n(e.minutes),e.hours=_n(e.hours),e.months=_n(e.months),e.years=_n(e.years),this},In.add=function(e,t){return yn(this,e,t,1)},In.subtract=function(e,t){return yn(this,e,t,-1)},In.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if(\"month\"===(e=R(e))||\"year\"===e)return t=this._days+s/864e5,n=this._months+pn(t),\"month\"===e?n:n/12;switch(t=this._days+Math.round(vn(this._months)),e){case\"week\":return t/7+s/6048e5;case\"day\":return t+s/864e5;case\"hour\":return 24*t+s/36e5;case\"minute\":return 1440*t+s/6e4;case\"second\":return 86400*t+s/1e3;case\"millisecond\":return Math.floor(864e5*t)+s;default:throw new Error(\"Unknown unit \"+e)}},In.asMilliseconds=Mn,In.asSeconds=Sn,In.asMinutes=Dn,In.asHours=kn,In.asDays=Yn,In.asWeeks=On,In.asMonths=Tn,In.asYears=xn,In.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},In._bubble=function(){var e,t,n,s,i,r=this._milliseconds,a=this._days,o=this._months,u=this._data;return 0<=r&&0<=a&&0<=o||r<=0&&a<=0&&o<=0||(r+=864e5*gn(vn(o)+a),o=a=0),u.milliseconds=r%1e3,e=D(r/1e3),u.seconds=e%60,t=D(e/60),u.minutes=t%60,n=D(t/60),u.hours=n%24,o+=i=D(pn(a+=D(n/24))),a-=gn(vn(i)),s=D(o/12),o%=12,u.days=a,u.months=o,u.years=s,this},In.clone=function(){return At(this)},In.get=function(e){return e=R(e),this.isValid()?this[e+\"s\"]():NaN},In.milliseconds=Pn,In.seconds=Wn,In.minutes=Hn,In.hours=Rn,In.days=Cn,In.weeks=function(){return D(this.days()/7)},In.months=Fn,In.years=Ln,In.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t,n,s,i,r,a,o,u,l,d,h,c=this.localeData(),f=(n=!e,s=c,i=At(t=this).abs(),r=Un(i.as(\"s\")),a=Un(i.as(\"m\")),o=Un(i.as(\"h\")),u=Un(i.as(\"d\")),l=Un(i.as(\"M\")),d=Un(i.as(\"y\")),(h=r<=Nn.ss&&[\"s\",r]||r<Nn.s&&[\"ss\",r]||a<=1&&[\"m\"]||a<Nn.m&&[\"mm\",a]||o<=1&&[\"h\"]||o<Nn.h&&[\"hh\",o]||u<=1&&[\"d\"]||u<Nn.d&&[\"dd\",u]||l<=1&&[\"M\"]||l<Nn.M&&[\"MM\",l]||d<=1&&[\"y\"]||[\"yy\",d])[2]=n,h[3]=0<+t,h[4]=s,function(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}.apply(null,h));return e&&(f=c.pastFuture(+this,f)),c.postformat(f)},In.toISOString=En,In.toString=En,In.toJSON=En,In.locale=Qt,In.localeData=Kt,In.toIsoString=n(\"toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)\",En),In.lang=Xt,I(\"X\",0,0,\"unix\"),I(\"x\",0,0,\"valueOf\"),ue(\"x\",se),ue(\"X\",/[+-]?\\d+(\\.\\d{1,3})?/),ce(\"X\",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),ce(\"x\",function(e,t,n){n._d=new Date(k(e))}),c.version=\"2.22.1\",e=Tt,c.fn=ln,c.min=function(){return Pt(\"isBefore\",[].slice.call(arguments,0))},c.max=function(){return Pt(\"isAfter\",[].slice.call(arguments,0))},c.now=function(){return Date.now?Date.now():+new Date},c.utc=y,c.unix=function(e){return Tt(1e3*e)},c.months=function(e,t){return fn(e,t,\"months\")},c.isDate=h,c.locale=ot,c.invalid=v,c.duration=At,c.isMoment=S,c.weekdays=function(e,t,n){return mn(e,t,n,\"weekdays\")},c.parseZone=function(){return Tt.apply(null,arguments).parseZone()},c.localeData=lt,c.isDuration=Rt,c.monthsShort=function(e,t){return fn(e,t,\"monthsShort\")},c.weekdaysMin=function(e,t,n){return mn(e,t,n,\"weekdaysMin\")},c.defineLocale=ut,c.updateLocale=function(e,t){if(null!=t){var n,s,i=nt;null!=(s=at(e))&&(i=s._config),(n=new P(t=b(i,t))).parentLocale=st[e],st[e]=n,ot(e)}else null!=st[e]&&(null!=st[e].parentLocale?st[e]=st[e].parentLocale:null!=st[e]&&delete st[e]);return st[e]},c.locales=function(){return s(st)},c.weekdaysShort=function(e,t,n){return mn(e,t,n,\"weekdaysShort\")},c.normalizeUnits=R,c.relativeTimeRounding=function(e){return void 0===e?Un:\"function\"==typeof e&&(Un=e,!0)},c.relativeTimeThreshold=function(e,t){return void 0!==Nn[e]&&(void 0===t?Nn[e]:(Nn[e]=t,\"s\"===e&&(Nn.ss=t-1),!0))},c.calendarFormat=function(e,t){var n=e.diff(t,\"days\",!0);return n<-6?\"sameElse\":n<-1?\"lastWeek\":n<0?\"lastDay\":n<1?\"sameDay\":n<2?\"nextDay\":n<7?\"nextWeek\":\"sameElse\"},c.prototype=ln,c.HTML5_FMT={DATETIME_LOCAL:\"YYYY-MM-DDTHH:mm\",DATETIME_LOCAL_SECONDS:\"YYYY-MM-DDTHH:mm:ss\",DATETIME_LOCAL_MS:\"YYYY-MM-DDTHH:mm:ss.SSS\",DATE:\"YYYY-MM-DD\",TIME:\"HH:mm\",TIME_SECONDS:\"HH:mm:ss\",TIME_MS:\"HH:mm:ss.SSS\",WEEK:\"YYYY-[W]WW\",MONTH:\"YYYY-MM\"},c});","module.exports = exports = window.fetch;\n\n// Needed for TypeScript and Webpack.\nexports.default = window.fetch.bind(window);\n\nexports.Headers = window.Headers;\nexports.Request = window.Request;\nexports.Response = window.Response;\n","import PropTypes from 'prop-types';\nimport { Component, cloneElement, h, options, render } from 'preact';\n\nvar version = '15.1.0'; // trick libraries to think we are react\n\nvar ELEMENTS = 'a abbr address area article aside audio b base bdi bdo big blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins kbd keygen label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script section select small source span strong style sub summary sup table tbody td textarea tfoot th thead time title tr track u ul var video wbr circle clipPath defs ellipse g image line linearGradient mask path pattern polygon polyline radialGradient rect stop svg text tspan'.split(' ');\n\nvar REACT_ELEMENT_TYPE = (typeof Symbol!=='undefined' && Symbol.for && Symbol.for('react.element')) || 0xeac7;\n\nvar COMPONENT_WRAPPER_KEY = (typeof Symbol!=='undefined' && Symbol.for) ? Symbol.for('__preactCompatWrapper') : '__preactCompatWrapper';\n\n// don't autobind these methods since they already have guaranteed context.\nvar AUTOBIND_BLACKLIST = {\n\tconstructor: 1,\n\trender: 1,\n\tshouldComponentUpdate: 1,\n\tcomponentWillReceiveProps: 1,\n\tcomponentWillUpdate: 1,\n\tcomponentDidUpdate: 1,\n\tcomponentWillMount: 1,\n\tcomponentDidMount: 1,\n\tcomponentWillUnmount: 1,\n\tcomponentDidUnmount: 1\n};\n\n\nvar CAMEL_PROPS = /^(?:accent|alignment|arabic|baseline|cap|clip|color|fill|flood|font|glyph|horiz|marker|overline|paint|stop|strikethrough|stroke|text|underline|unicode|units|v|vector|vert|word|writing|x)[A-Z]/;\n\n\nvar BYPASS_HOOK = {};\n\n/*global process*/\nvar DEV = typeof process==='undefined' || !process.env || process.env.NODE_ENV!=='production';\n\n// a component that renders nothing. Used to replace components for unmountComponentAtNode.\nfunction EmptyComponent() { return null; }\n\n\n\n// make react think we're react.\nvar VNode = h('a', null).constructor;\nVNode.prototype.$$typeof = REACT_ELEMENT_TYPE;\nVNode.prototype.preactCompatUpgraded = false;\nVNode.prototype.preactCompatNormalized = false;\n\nObject.defineProperty(VNode.prototype, 'type', {\n\tget: function() { return this.nodeName; },\n\tset: function(v) { this.nodeName = v; },\n\tconfigurable:true\n});\n\nObject.defineProperty(VNode.prototype, 'props', {\n\tget: function() { return this.attributes; },\n\tset: function(v) { this.attributes = v; },\n\tconfigurable:true\n});\n\n\n\nvar oldEventHook = options.event;\noptions.event = function (e) {\n\tif (oldEventHook) { e = oldEventHook(e); }\n\te.persist = Object;\n\te.nativeEvent = e;\n\treturn e;\n};\n\n\nvar oldVnodeHook = options.vnode;\noptions.vnode = function (vnode) {\n\tif (!vnode.preactCompatUpgraded) {\n\t\tvnode.preactCompatUpgraded = true;\n\n\t\tvar tag = vnode.nodeName,\n\t\t\tattrs = vnode.attributes = extend({}, vnode.attributes);\n\n\t\tif (typeof tag==='function') {\n\t\t\tif (tag[COMPONENT_WRAPPER_KEY]===true || (tag.prototype && 'isReactComponent' in tag.prototype)) {\n\t\t\t\tif (vnode.children && String(vnode.children)==='') { vnode.children = undefined; }\n\t\t\t\tif (vnode.children) { attrs.children = vnode.children; }\n\n\t\t\t\tif (!vnode.preactCompatNormalized) {\n\t\t\t\t\tnormalizeVNode(vnode);\n\t\t\t\t}\n\t\t\t\thandleComponentVNode(vnode);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (vnode.children && String(vnode.children)==='') { vnode.children = undefined; }\n\t\t\tif (vnode.children) { attrs.children = vnode.children; }\n\n\t\t\tif (attrs.defaultValue) {\n\t\t\t\tif (!attrs.value && attrs.value!==0) {\n\t\t\t\t\tattrs.value = attrs.defaultValue;\n\t\t\t\t}\n\t\t\t\tdelete attrs.defaultValue;\n\t\t\t}\n\n\t\t\thandleElementVNode(vnode, attrs);\n\t\t}\n\t}\n\n\tif (oldVnodeHook) { oldVnodeHook(vnode); }\n};\n\nfunction handleComponentVNode(vnode) {\n\tvar tag = vnode.nodeName,\n\t\ta = vnode.attributes;\n\n\tvnode.attributes = {};\n\tif (tag.defaultProps) { extend(vnode.attributes, tag.defaultProps); }\n\tif (a) { extend(vnode.attributes, a); }\n}\n\nfunction handleElementVNode(vnode, a) {\n\tvar shouldSanitize, attrs, i;\n\tif (a) {\n\t\tfor (i in a) { if ((shouldSanitize = CAMEL_PROPS.test(i))) { break; } }\n\t\tif (shouldSanitize) {\n\t\t\tattrs = vnode.attributes = {};\n\t\t\tfor (i in a) {\n\t\t\t\tif (a.hasOwnProperty(i)) {\n\t\t\t\t\tattrs[ CAMEL_PROPS.test(i) ? i.replace(/([A-Z0-9])/, '-$1').toLowerCase() : i ] = a[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n\n// proxy render() since React returns a Component reference.\nfunction render$1(vnode, parent, callback) {\n\tvar prev = parent && parent._preactCompatRendered && parent._preactCompatRendered.base;\n\n\t// ignore impossible previous renders\n\tif (prev && prev.parentNode!==parent) { prev = null; }\n\n\t// default to first Element child\n\tif (!prev && parent) { prev = parent.firstElementChild; }\n\n\t// remove unaffected siblings\n\tfor (var i=parent.childNodes.length; i--; ) {\n\t\tif (parent.childNodes[i]!==prev) {\n\t\t\tparent.removeChild(parent.childNodes[i]);\n\t\t}\n\t}\n\n\tvar out = render(vnode, parent, prev);\n\tif (parent) { parent._preactCompatRendered = out && (out._component || { base: out }); }\n\tif (typeof callback==='function') { callback(); }\n\treturn out && out._component || out;\n}\n\n\nvar ContextProvider = function () {};\n\nContextProvider.prototype.getChildContext = function () {\n\treturn this.props.context;\n};\nContextProvider.prototype.render = function (props) {\n\treturn props.children[0];\n};\n\nfunction renderSubtreeIntoContainer(parentComponent, vnode, container, callback) {\n\tvar wrap = h(ContextProvider, { context: parentComponent.context }, vnode);\n\tvar renderContainer = render$1(wrap, container);\n\tvar component = renderContainer._component || renderContainer.base;\n\tif (callback) { callback.call(component, renderContainer); }\n\treturn component;\n}\n\n\nfunction unmountComponentAtNode(container) {\n\tvar existing = container._preactCompatRendered && container._preactCompatRendered.base;\n\tif (existing && existing.parentNode===container) {\n\t\trender(h(EmptyComponent), container, existing);\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n\nvar ARR = [];\n\n// This API is completely unnecessary for Preact, so it's basically passthrough.\nvar Children = {\n\tmap: function(children, fn, ctx) {\n\t\tif (children == null) { return null; }\n\t\tchildren = Children.toArray(children);\n\t\tif (ctx && ctx!==children) { fn = fn.bind(ctx); }\n\t\treturn children.map(fn);\n\t},\n\tforEach: function(children, fn, ctx) {\n\t\tif (children == null) { return null; }\n\t\tchildren = Children.toArray(children);\n\t\tif (ctx && ctx!==children) { fn = fn.bind(ctx); }\n\t\tchildren.forEach(fn);\n\t},\n\tcount: function(children) {\n\t\treturn children && children.length || 0;\n\t},\n\tonly: function(children) {\n\t\tchildren = Children.toArray(children);\n\t\tif (children.length!==1) { throw new Error('Children.only() expects only one child.'); }\n\t\treturn children[0];\n\t},\n\ttoArray: function(children) {\n\t\tif (children == null) { return []; }\n\t\treturn ARR.concat(children);\n\t}\n};\n\n\n/** Track current render() component for ref assignment */\nvar currentComponent;\n\n\nfunction createFactory(type) {\n\treturn createElement.bind(null, type);\n}\n\n\nvar DOM = {};\nfor (var i=ELEMENTS.length; i--; ) {\n\tDOM[ELEMENTS[i]] = createFactory(ELEMENTS[i]);\n}\n\nfunction upgradeToVNodes(arr, offset) {\n\tfor (var i=offset || 0; i<arr.length; i++) {\n\t\tvar obj = arr[i];\n\t\tif (Array.isArray(obj)) {\n\t\t\tupgradeToVNodes(obj);\n\t\t}\n\t\telse if (obj && typeof obj==='object' && !isValidElement(obj) && ((obj.props && obj.type) || (obj.attributes && obj.nodeName) || obj.children)) {\n\t\t\tarr[i] = createElement(obj.type || obj.nodeName, obj.props || obj.attributes, obj.children);\n\t\t}\n\t}\n}\n\nfunction isStatelessComponent(c) {\n\treturn typeof c==='function' && !(c.prototype && c.prototype.render);\n}\n\n\n// wraps stateless functional components in a PropTypes validator\nfunction wrapStatelessComponent(WrappedComponent) {\n\treturn createClass({\n\t\tdisplayName: WrappedComponent.displayName || WrappedComponent.name,\n\t\trender: function() {\n\t\t\treturn WrappedComponent(this.props, this.context);\n\t\t}\n\t});\n}\n\n\nfunction statelessComponentHook(Ctor) {\n\tvar Wrapped = Ctor[COMPONENT_WRAPPER_KEY];\n\tif (Wrapped) { return Wrapped===true ? Ctor : Wrapped; }\n\n\tWrapped = wrapStatelessComponent(Ctor);\n\n\tObject.defineProperty(Wrapped, COMPONENT_WRAPPER_KEY, { configurable:true, value:true });\n\tWrapped.displayName = Ctor.displayName;\n\tWrapped.propTypes = Ctor.propTypes;\n\tWrapped.defaultProps = Ctor.defaultProps;\n\n\tObject.defineProperty(Ctor, COMPONENT_WRAPPER_KEY, { configurable:true, value:Wrapped });\n\n\treturn Wrapped;\n}\n\n\nfunction createElement() {\n\tvar args = [], len = arguments.length;\n\twhile ( len-- ) args[ len ] = arguments[ len ];\n\n\tupgradeToVNodes(args, 2);\n\treturn normalizeVNode(h.apply(void 0, args));\n}\n\n\nfunction normalizeVNode(vnode) {\n\tvnode.preactCompatNormalized = true;\n\n\tapplyClassName(vnode);\n\n\tif (isStatelessComponent(vnode.nodeName)) {\n\t\tvnode.nodeName = statelessComponentHook(vnode.nodeName);\n\t}\n\n\tvar ref = vnode.attributes.ref,\n\t\ttype = ref && typeof ref;\n\tif (currentComponent && (type==='string' || type==='number')) {\n\t\tvnode.attributes.ref = createStringRefProxy(ref, currentComponent);\n\t}\n\n\tapplyEventNormalization(vnode);\n\n\treturn vnode;\n}\n\n\nfunction cloneElement$1(element, props) {\n\tvar children = [], len = arguments.length - 2;\n\twhile ( len-- > 0 ) children[ len ] = arguments[ len + 2 ];\n\n\tif (!isValidElement(element)) { return element; }\n\tvar elementProps = element.attributes || element.props;\n\tvar node = h(\n\t\telement.nodeName || element.type,\n\t\textend({}, elementProps),\n\t\telement.children || elementProps && elementProps.children\n\t);\n\t// Only provide the 3rd argument if needed.\n\t// Arguments 3+ overwrite element.children in preactCloneElement\n\tvar cloneArgs = [node, props];\n\tif (children && children.length) {\n\t\tcloneArgs.push(children);\n\t}\n\telse if (props && props.children) {\n\t\tcloneArgs.push(props.children);\n\t}\n\treturn normalizeVNode(cloneElement.apply(void 0, cloneArgs));\n}\n\n\nfunction isValidElement(element) {\n\treturn element && ((element instanceof VNode) || element.$$typeof===REACT_ELEMENT_TYPE);\n}\n\n\nfunction createStringRefProxy(name, component) {\n\treturn component._refProxies[name] || (component._refProxies[name] = function (resolved) {\n\t\tif (component && component.refs) {\n\t\t\tcomponent.refs[name] = resolved;\n\t\t\tif (resolved===null) {\n\t\t\t\tdelete component._refProxies[name];\n\t\t\t\tcomponent = null;\n\t\t\t}\n\t\t}\n\t});\n}\n\n\nfunction applyEventNormalization(ref) {\n\tvar nodeName = ref.nodeName;\n\tvar attributes = ref.attributes;\n\n\tif (!attributes || typeof nodeName!=='string') { return; }\n\tvar props = {};\n\tfor (var i in attributes) {\n\t\tprops[i.toLowerCase()] = i;\n\t}\n\tif (props.ondoubleclick) {\n\t\tattributes.ondblclick = attributes[props.ondoubleclick];\n\t\tdelete attributes[props.ondoubleclick];\n\t}\n\t// for *textual inputs* (incl textarea), normalize `onChange` -> `onInput`:\n\tif (props.onchange && (nodeName==='textarea' || (nodeName.toLowerCase()==='input' && !/^fil|che|rad/i.test(attributes.type)))) {\n\t\tvar normalized = props.oninput || 'oninput';\n\t\tif (!attributes[normalized]) {\n\t\t\tattributes[normalized] = multihook([attributes[normalized], attributes[props.onchange]]);\n\t\t\tdelete attributes[props.onchange];\n\t\t}\n\t}\n}\n\n\nfunction applyClassName(vnode) {\n\tvar a = vnode.attributes || (vnode.attributes = {});\n\tclassNameDescriptor.enumerable = 'className' in a;\n\tif (a.className) { a.class = a.className; }\n\tObject.defineProperty(a, 'className', classNameDescriptor);\n}\n\n\nvar classNameDescriptor = {\n\tconfigurable: true,\n\tget: function() { return this.class; },\n\tset: function(v) { this.class = v; }\n};\n\nfunction extend(base, props) {\n\tvar arguments$1 = arguments;\n\n\tfor (var i=1, obj = (void 0); i<arguments.length; i++) {\n\t\tif ((obj = arguments$1[i])) {\n\t\t\tfor (var key in obj) {\n\t\t\t\tif (obj.hasOwnProperty(key)) {\n\t\t\t\t\tbase[key] = obj[key];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn base;\n}\n\n\nfunction shallowDiffers(a, b) {\n\tfor (var i in a) { if (!(i in b)) { return true; } }\n\tfor (var i$1 in b) { if (a[i$1]!==b[i$1]) { return true; } }\n\treturn false;\n}\n\n\nfunction findDOMNode(component) {\n\treturn component && component.base || component;\n}\n\n\nfunction F(){}\n\nfunction createClass(obj) {\n\tfunction cl(props, context) {\n\t\tbindAll(this);\n\t\tComponent$1.call(this, props, context, BYPASS_HOOK);\n\t\tnewComponentHook.call(this, props, context);\n\t}\n\n\tobj = extend({ constructor: cl }, obj);\n\n\t// We need to apply mixins here so that getDefaultProps is correctly mixed\n\tif (obj.mixins) {\n\t\tapplyMixins(obj, collateMixins(obj.mixins));\n\t}\n\tif (obj.statics) {\n\t\textend(cl, obj.statics);\n\t}\n\tif (obj.propTypes) {\n\t\tcl.propTypes = obj.propTypes;\n\t}\n\tif (obj.defaultProps) {\n\t\tcl.defaultProps = obj.defaultProps;\n\t}\n\tif (obj.getDefaultProps) {\n\t\tcl.defaultProps = obj.getDefaultProps.call(cl);\n\t}\n\n\tF.prototype = Component$1.prototype;\n\tcl.prototype = extend(new F(), obj);\n\n\tcl.displayName = obj.displayName || 'Component';\n\n\treturn cl;\n}\n\n\n// Flatten an Array of mixins to a map of method name to mixin implementations\nfunction collateMixins(mixins) {\n\tvar keyed = {};\n\tfor (var i=0; i<mixins.length; i++) {\n\t\tvar mixin = mixins[i];\n\t\tfor (var key in mixin) {\n\t\t\tif (mixin.hasOwnProperty(key) && typeof mixin[key]==='function') {\n\t\t\t\t(keyed[key] || (keyed[key]=[])).push(mixin[key]);\n\t\t\t}\n\t\t}\n\t}\n\treturn keyed;\n}\n\n\n// apply a mapping of Arrays of mixin methods to a component prototype\nfunction applyMixins(proto, mixins) {\n\tfor (var key in mixins) { if (mixins.hasOwnProperty(key)) {\n\t\tproto[key] = multihook(\n\t\t\tmixins[key].concat(proto[key] || ARR),\n\t\t\tkey==='getDefaultProps' || key==='getInitialState' || key==='getChildContext'\n\t\t);\n\t} }\n}\n\n\nfunction bindAll(ctx) {\n\tfor (var i in ctx) {\n\t\tvar v = ctx[i];\n\t\tif (typeof v==='function' && !v.__bound && !AUTOBIND_BLACKLIST.hasOwnProperty(i)) {\n\t\t\t(ctx[i] = v.bind(ctx)).__bound = true;\n\t\t}\n\t}\n}\n\n\nfunction callMethod(ctx, m, args) {\n\tif (typeof m==='string') {\n\t\tm = ctx.constructor.prototype[m];\n\t}\n\tif (typeof m==='function') {\n\t\treturn m.apply(ctx, args);\n\t}\n}\n\nfunction multihook(hooks, skipDuplicates) {\n\treturn function() {\n\t\tvar arguments$1 = arguments;\n\t\tvar this$1 = this;\n\n\t\tvar ret;\n\t\tfor (var i=0; i<hooks.length; i++) {\n\t\t\tvar r = callMethod(this$1, hooks[i], arguments$1);\n\n\t\t\tif (skipDuplicates && r!=null) {\n\t\t\t\tif (!ret) { ret = {}; }\n\t\t\t\tfor (var key in r) { if (r.hasOwnProperty(key)) {\n\t\t\t\t\tret[key] = r[key];\n\t\t\t\t} }\n\t\t\t}\n\t\t\telse if (typeof r!=='undefined') { ret = r; }\n\t\t}\n\t\treturn ret;\n\t};\n}\n\n\nfunction newComponentHook(props, context) {\n\tpropsHook.call(this, props, context);\n\tthis.componentWillReceiveProps = multihook([propsHook, this.componentWillReceiveProps || 'componentWillReceiveProps']);\n\tthis.render = multihook([propsHook, beforeRender, this.render || 'render', afterRender]);\n}\n\n\nfunction propsHook(props, context) {\n\tif (!props) { return; }\n\n\t// React annoyingly special-cases single children, and some react components are ridiculously strict about this.\n\tvar c = props.children;\n\tif (c && Array.isArray(c) && c.length===1 && (typeof c[0]==='string' || typeof c[0]==='function' || c[0] instanceof VNode)) {\n\t\tprops.children = c[0];\n\n\t\t// but its totally still going to be an Array.\n\t\tif (props.children && typeof props.children==='object') {\n\t\t\tprops.children.length = 1;\n\t\t\tprops.children[0] = props.children;\n\t\t}\n\t}\n\n\t// add proptype checking\n\tif (DEV) {\n\t\tvar ctor = typeof this==='function' ? this : this.constructor,\n\t\t\tpropTypes = this.propTypes || ctor.propTypes;\n\t\tvar displayName = this.displayName || ctor.name;\n\n\t\tif (propTypes) {\n\t\t\tPropTypes.checkPropTypes(propTypes, props, 'prop', displayName);\n\t\t}\n\t}\n}\n\n\nfunction beforeRender(props) {\n\tcurrentComponent = this;\n}\n\nfunction afterRender() {\n\tif (currentComponent===this) {\n\t\tcurrentComponent = null;\n\t}\n}\n\n\n\nfunction Component$1(props, context, opts) {\n\tComponent.call(this, props, context);\n\tthis.state = this.getInitialState ? this.getInitialState() : {};\n\tthis.refs = {};\n\tthis._refProxies = {};\n\tif (opts!==BYPASS_HOOK) {\n\t\tnewComponentHook.call(this, props, context);\n\t}\n}\nextend(Component$1.prototype = new Component(), {\n\tconstructor: Component$1,\n\n\tisReactComponent: {},\n\n\treplaceState: function(state, callback) {\n\t\tvar this$1 = this;\n\n\t\tthis.setState(state, callback);\n\t\tfor (var i in this$1.state) {\n\t\t\tif (!(i in state)) {\n\t\t\t\tdelete this$1.state[i];\n\t\t\t}\n\t\t}\n\t},\n\n\tgetDOMNode: function() {\n\t\treturn this.base;\n\t},\n\n\tisMounted: function() {\n\t\treturn !!this.base;\n\t}\n});\n\n\n\nfunction PureComponent(props, context) {\n\tComponent$1.call(this, props, context);\n}\nF.prototype = Component$1.prototype;\nPureComponent.prototype = new F();\nPureComponent.prototype.isPureReactComponent = true;\nPureComponent.prototype.shouldComponentUpdate = function(props, state) {\n\treturn shallowDiffers(this.props, props) || shallowDiffers(this.state, state);\n};\n\nvar index = {\n\tversion: version,\n\tDOM: DOM,\n\tPropTypes: PropTypes,\n\tChildren: Children,\n\trender: render$1,\n\tcreateClass: createClass,\n\tcreateFactory: createFactory,\n\tcreateElement: createElement,\n\tcloneElement: cloneElement$1,\n\tisValidElement: isValidElement,\n\tfindDOMNode: findDOMNode,\n\tunmountComponentAtNode: unmountComponentAtNode,\n\tComponent: Component$1,\n\tPureComponent: PureComponent,\n\tunstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer,\n\t__spread: extend\n};\n\nexport { version, DOM, PropTypes, Children, render$1 as render, createClass, createFactory, createElement, cloneElement$1 as cloneElement, isValidElement, findDOMNode, unmountComponentAtNode, Component$1 as Component, PureComponent, renderSubtreeIntoContainer as unstable_renderSubtreeIntoContainer, extend as __spread };export default index;\n//# sourceMappingURL=preact-compat.es.js.map\n","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n  return function () {\n    return arg;\n  };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n  return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n  return arg;\n};\n\nmodule.exports = emptyFunction;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n  validateFormat = function validateFormat(format) {\n    if (format === undefined) {\n      throw new Error('invariant requires an error message argument');\n    }\n  };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n  validateFormat(format);\n\n  if (!condition) {\n    var error;\n    if (format === undefined) {\n      error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n    } else {\n      var args = [a, b, c, d, e, f];\n      var argIndex = 0;\n      error = new Error(format.replace(/%s/g, function () {\n        return args[argIndex++];\n      }));\n      error.name = 'Invariant Violation';\n    }\n\n    error.framesToPop = 1; // we don't care about invariant's own frame\n    throw error;\n  }\n}\n\nmodule.exports = invariant;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar emptyFunction = require('./emptyFunction');\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = emptyFunction;\n\nif (process.env.NODE_ENV !== 'production') {\n  var printWarning = function printWarning(format) {\n    for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n      args[_key - 1] = arguments[_key];\n    }\n\n    var argIndex = 0;\n    var message = 'Warning: ' + format.replace(/%s/g, function () {\n      return args[argIndex++];\n    });\n    if (typeof console !== 'undefined') {\n      console.error(message);\n    }\n    try {\n      // --- Welcome to debugging React ---\n      // This error was thrown as a convenience so that you can use this stack\n      // to find the callsite that caused this warning to fire.\n      throw new Error(message);\n    } catch (x) {}\n  };\n\n  warning = function warning(condition, format) {\n    if (format === undefined) {\n      throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n    }\n\n    if (format.indexOf('Failed Composite propType: ') === 0) {\n      return; // Ignore CompositeComponent proptype check.\n    }\n\n    if (!condition) {\n      for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n        args[_key2 - 2] = arguments[_key2];\n      }\n\n      printWarning.apply(undefined, [format].concat(args));\n    }\n  };\n}\n\nmodule.exports = warning;","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc');  // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== 'production') {\n  var invariant = require('fbjs/lib/invariant');\n  var warning = require('fbjs/lib/warning');\n  var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n  var loggedTypeFailures = {};\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n  if (process.env.NODE_ENV !== 'production') {\n    for (var typeSpecName in typeSpecs) {\n      if (typeSpecs.hasOwnProperty(typeSpecName)) {\n        var error;\n        // Prop type validation may throw. In case they do, we don't want to\n        // fail the render phase where it didn't fail before. So we log it.\n        // After these have been cleaned up, we'll let them throw.\n        try {\n          // This is intentionally an invariant that gets caught. It's the same\n          // behavior as without this statement except with a better message.\n          invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);\n          error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n        } catch (ex) {\n          error = ex;\n        }\n        warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);\n        if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n          // Only monitor this failure once because there tends to be a lot of the\n          // same error.\n          loggedTypeFailures[error.message] = true;\n\n          var stack = getStack ? getStack() : '';\n\n          warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');\n        }\n      }\n    }\n  }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n  /* global Symbol */\n  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n  /**\n   * Returns the iterator method function contained on the iterable object.\n   *\n   * Be sure to invoke the function with the iterable as context:\n   *\n   *     var iteratorFn = getIteratorFn(myIterable);\n   *     if (iteratorFn) {\n   *       var iterator = iteratorFn.call(myIterable);\n   *       ...\n   *     }\n   *\n   * @param {?object} maybeIterable\n   * @return {?function}\n   */\n  function getIteratorFn(maybeIterable) {\n    var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n    if (typeof iteratorFn === 'function') {\n      return iteratorFn;\n    }\n  }\n\n  /**\n   * Collection of methods that allow declaration and validation of props that are\n   * supplied to React components. Example usage:\n   *\n   *   var Props = require('ReactPropTypes');\n   *   var MyArticle = React.createClass({\n   *     propTypes: {\n   *       // An optional string prop named \"description\".\n   *       description: Props.string,\n   *\n   *       // A required enum prop named \"category\".\n   *       category: Props.oneOf(['News','Photos']).isRequired,\n   *\n   *       // A prop named \"dialog\" that requires an instance of Dialog.\n   *       dialog: Props.instanceOf(Dialog).isRequired\n   *     },\n   *     render: function() { ... }\n   *   });\n   *\n   * A more formal specification of how these methods are used:\n   *\n   *   type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n   *   decl := ReactPropTypes.{type}(.isRequired)?\n   *\n   * Each and every declaration produces a function with the same signature. This\n   * allows the creation of custom validation functions. For example:\n   *\n   *  var MyLink = React.createClass({\n   *    propTypes: {\n   *      // An optional string or URI prop named \"href\".\n   *      href: function(props, propName, componentName) {\n   *        var propValue = props[propName];\n   *        if (propValue != null && typeof propValue !== 'string' &&\n   *            !(propValue instanceof URI)) {\n   *          return new Error(\n   *            'Expected a string or an URI for ' + propName + ' in ' +\n   *            componentName\n   *          );\n   *        }\n   *      }\n   *    },\n   *    render: function() {...}\n   *  });\n   *\n   * @internal\n   */\n\n  var ANONYMOUS = '<<anonymous>>';\n\n  // Important!\n  // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n  var ReactPropTypes = {\n    array: createPrimitiveTypeChecker('array'),\n    bool: createPrimitiveTypeChecker('boolean'),\n    func: createPrimitiveTypeChecker('function'),\n    number: createPrimitiveTypeChecker('number'),\n    object: createPrimitiveTypeChecker('object'),\n    string: createPrimitiveTypeChecker('string'),\n    symbol: createPrimitiveTypeChecker('symbol'),\n\n    any: createAnyTypeChecker(),\n    arrayOf: createArrayOfTypeChecker,\n    element: createElementTypeChecker(),\n    instanceOf: createInstanceTypeChecker,\n    node: createNodeChecker(),\n    objectOf: createObjectOfTypeChecker,\n    oneOf: createEnumTypeChecker,\n    oneOfType: createUnionTypeChecker,\n    shape: createShapeTypeChecker,\n    exact: createStrictShapeTypeChecker,\n  };\n\n  /**\n   * inlined Object.is polyfill to avoid requiring consumers ship their own\n   * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n   */\n  /*eslint-disable no-self-compare*/\n  function is(x, y) {\n    // SameValue algorithm\n    if (x === y) {\n      // Steps 1-5, 7-10\n      // Steps 6.b-6.e: +0 != -0\n      return x !== 0 || 1 / x === 1 / y;\n    } else {\n      // Step 6.a: NaN == NaN\n      return x !== x && y !== y;\n    }\n  }\n  /*eslint-enable no-self-compare*/\n\n  /**\n   * We use an Error-like object for backward compatibility as people may call\n   * PropTypes directly and inspect their output. However, we don't use real\n   * Errors anymore. We don't inspect their stack anyway, and creating them\n   * is prohibitively expensive if they are created too often, such as what\n   * happens in oneOfType() for any type before the one that matched.\n   */\n  function PropTypeError(message) {\n    this.message = message;\n    this.stack = '';\n  }\n  // Make `instanceof Error` still work for returned errors.\n  PropTypeError.prototype = Error.prototype;\n\n  function createChainableTypeChecker(validate) {\n    if (process.env.NODE_ENV !== 'production') {\n      var manualPropTypeCallCache = {};\n      var manualPropTypeWarningCount = 0;\n    }\n    function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n      componentName = componentName || ANONYMOUS;\n      propFullName = propFullName || propName;\n\n      if (secret !== ReactPropTypesSecret) {\n        if (throwOnDirectAccess) {\n          // New behavior only for users of `prop-types` package\n          invariant(\n            false,\n            'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n            'Use `PropTypes.checkPropTypes()` to call them. ' +\n            'Read more at http://fb.me/use-check-prop-types'\n          );\n        } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n          // Old behavior for people using React.PropTypes\n          var cacheKey = componentName + ':' + propName;\n          if (\n            !manualPropTypeCallCache[cacheKey] &&\n            // Avoid spamming the console because they are often not actionable except for lib authors\n            manualPropTypeWarningCount < 3\n          ) {\n            warning(\n              false,\n              'You are manually calling a React.PropTypes validation ' +\n              'function for the `%s` prop on `%s`. This is deprecated ' +\n              'and will throw in the standalone `prop-types` package. ' +\n              'You may be seeing this warning due to a third-party PropTypes ' +\n              'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',\n              propFullName,\n              componentName\n            );\n            manualPropTypeCallCache[cacheKey] = true;\n            manualPropTypeWarningCount++;\n          }\n        }\n      }\n      if (props[propName] == null) {\n        if (isRequired) {\n          if (props[propName] === null) {\n            return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n          }\n          return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n        }\n        return null;\n      } else {\n        return validate(props, propName, componentName, location, propFullName);\n      }\n    }\n\n    var chainedCheckType = checkType.bind(null, false);\n    chainedCheckType.isRequired = checkType.bind(null, true);\n\n    return chainedCheckType;\n  }\n\n  function createPrimitiveTypeChecker(expectedType) {\n    function validate(props, propName, componentName, location, propFullName, secret) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== expectedType) {\n        // `propValue` being instance of, say, date/regexp, pass the 'object'\n        // check, but we can offer a more precise error message here rather than\n        // 'of type `object`'.\n        var preciseType = getPreciseType(propValue);\n\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createAnyTypeChecker() {\n    return createChainableTypeChecker(emptyFunction.thatReturnsNull);\n  }\n\n  function createArrayOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n      }\n      var propValue = props[propName];\n      if (!Array.isArray(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n      }\n      for (var i = 0; i < propValue.length; i++) {\n        var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n        if (error instanceof Error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createElementTypeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      if (!isValidElement(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createInstanceTypeChecker(expectedClass) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!(props[propName] instanceof expectedClass)) {\n        var expectedClassName = expectedClass.name || ANONYMOUS;\n        var actualClassName = getClassName(props[propName]);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createEnumTypeChecker(expectedValues) {\n    if (!Array.isArray(expectedValues)) {\n      process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;\n      return emptyFunction.thatReturnsNull;\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      for (var i = 0; i < expectedValues.length; i++) {\n        if (is(propValue, expectedValues[i])) {\n          return null;\n        }\n      }\n\n      var valuesString = JSON.stringify(expectedValues);\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createObjectOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n      }\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n      }\n      for (var key in propValue) {\n        if (propValue.hasOwnProperty(key)) {\n          var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n          if (error instanceof Error) {\n            return error;\n          }\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createUnionTypeChecker(arrayOfTypeCheckers) {\n    if (!Array.isArray(arrayOfTypeCheckers)) {\n      process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n      return emptyFunction.thatReturnsNull;\n    }\n\n    for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n      var checker = arrayOfTypeCheckers[i];\n      if (typeof checker !== 'function') {\n        warning(\n          false,\n          'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n          'received %s at index %s.',\n          getPostfixForTypeWarning(checker),\n          i\n        );\n        return emptyFunction.thatReturnsNull;\n      }\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n        var checker = arrayOfTypeCheckers[i];\n        if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n          return null;\n        }\n      }\n\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createNodeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!isNode(props[propName])) {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      for (var key in shapeTypes) {\n        var checker = shapeTypes[key];\n        if (!checker) {\n          continue;\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createStrictShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      // We need to check all keys in case some are required but missing from\n      // props.\n      var allKeys = assign({}, props[propName], shapeTypes);\n      for (var key in allKeys) {\n        var checker = shapeTypes[key];\n        if (!checker) {\n          return new PropTypeError(\n            'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n            '\\nBad object: ' + JSON.stringify(props[propName], null, '  ') +\n            '\\nValid keys: ' +  JSON.stringify(Object.keys(shapeTypes), null, '  ')\n          );\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n\n    return createChainableTypeChecker(validate);\n  }\n\n  function isNode(propValue) {\n    switch (typeof propValue) {\n      case 'number':\n      case 'string':\n      case 'undefined':\n        return true;\n      case 'boolean':\n        return !propValue;\n      case 'object':\n        if (Array.isArray(propValue)) {\n          return propValue.every(isNode);\n        }\n        if (propValue === null || isValidElement(propValue)) {\n          return true;\n        }\n\n        var iteratorFn = getIteratorFn(propValue);\n        if (iteratorFn) {\n          var iterator = iteratorFn.call(propValue);\n          var step;\n          if (iteratorFn !== propValue.entries) {\n            while (!(step = iterator.next()).done) {\n              if (!isNode(step.value)) {\n                return false;\n              }\n            }\n          } else {\n            // Iterator will provide entry [k,v] tuples rather than values.\n            while (!(step = iterator.next()).done) {\n              var entry = step.value;\n              if (entry) {\n                if (!isNode(entry[1])) {\n                  return false;\n                }\n              }\n            }\n          }\n        } else {\n          return false;\n        }\n\n        return true;\n      default:\n        return false;\n    }\n  }\n\n  function isSymbol(propType, propValue) {\n    // Native Symbol.\n    if (propType === 'symbol') {\n      return true;\n    }\n\n    // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n    if (propValue['@@toStringTag'] === 'Symbol') {\n      return true;\n    }\n\n    // Fallback for non-spec compliant Symbols which are polyfilled.\n    if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n      return true;\n    }\n\n    return false;\n  }\n\n  // Equivalent of `typeof` but with special handling for array and regexp.\n  function getPropType(propValue) {\n    var propType = typeof propValue;\n    if (Array.isArray(propValue)) {\n      return 'array';\n    }\n    if (propValue instanceof RegExp) {\n      // Old webkits (at least until Android 4.0) return 'function' rather than\n      // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n      // passes PropTypes.object.\n      return 'object';\n    }\n    if (isSymbol(propType, propValue)) {\n      return 'symbol';\n    }\n    return propType;\n  }\n\n  // This handles more types than `getPropType`. Only used for error messages.\n  // See `createPrimitiveTypeChecker`.\n  function getPreciseType(propValue) {\n    if (typeof propValue === 'undefined' || propValue === null) {\n      return '' + propValue;\n    }\n    var propType = getPropType(propValue);\n    if (propType === 'object') {\n      if (propValue instanceof Date) {\n        return 'date';\n      } else if (propValue instanceof RegExp) {\n        return 'regexp';\n      }\n    }\n    return propType;\n  }\n\n  // Returns a string that is postfixed to a warning about an invalid type.\n  // For example, \"undefined\" or \"of type array\"\n  function getPostfixForTypeWarning(value) {\n    var type = getPreciseType(value);\n    switch (type) {\n      case 'array':\n      case 'object':\n        return 'an ' + type;\n      case 'boolean':\n      case 'date':\n      case 'regexp':\n        return 'a ' + type;\n      default:\n        return type;\n    }\n  }\n\n  // Returns class name of the object, if any.\n  function getClassName(propValue) {\n    if (!propValue.constructor || !propValue.constructor.name) {\n      return ANONYMOUS;\n    }\n    return propValue.constructor.name;\n  }\n\n  ReactPropTypes.checkPropTypes = checkPropTypes;\n  ReactPropTypes.PropTypes = ReactPropTypes;\n\n  return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n  var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n    Symbol.for &&\n    Symbol.for('react.element')) ||\n    0xeac7;\n\n  var isValidElement = function(object) {\n    return typeof object === 'object' &&\n      object !== null &&\n      object.$$typeof === REACT_ELEMENT_TYPE;\n  };\n\n  // By explicitly using `prop-types` you are opting into new development behavior.\n  // http://fb.me/prop-types-in-prod\n  var throwOnDirectAccess = true;\n  module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n  // By explicitly using `prop-types` you are opting into new production behavior.\n  // http://fb.me/prop-types-in-prod\n  module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/** Virtual DOM Node */\nfunction VNode() {}\n\n/** Global options\n *\t@public\n *\t@namespace options {Object}\n */\nvar options = {\n\n\t/** If `true`, `prop` changes trigger synchronous component updates.\n  *\t@name syncComponentUpdates\n  *\t@type Boolean\n  *\t@default true\n  */\n\t//syncComponentUpdates: true,\n\n\t/** Processes all created VNodes.\n  *\t@param {VNode} vnode\tA newly-created VNode to normalize/process\n  */\n\t//vnode(vnode) { }\n\n\t/** Hook invoked after a component is mounted. */\n\t// afterMount(component) { }\n\n\t/** Hook invoked after the DOM is updated with a component's latest render. */\n\t// afterUpdate(component) { }\n\n\t/** Hook invoked immediately before a component is unmounted. */\n\t// beforeUnmount(component) { }\n};\n\nvar stack = [];\n\nvar EMPTY_CHILDREN = [];\n\n/**\n * JSX/hyperscript reviver.\n * @see http://jasonformat.com/wtf-is-jsx\n * Benchmarks: https://esbench.com/bench/57ee8f8e330ab09900a1a1a0\n *\n * Note: this is exported as both `h()` and `createElement()` for compatibility reasons.\n *\n * Creates a VNode (virtual DOM element). A tree of VNodes can be used as a lightweight representation\n * of the structure of a DOM tree. This structure can be realized by recursively comparing it against\n * the current _actual_ DOM structure, and applying only the differences.\n *\n * `h()`/`createElement()` accepts an element name, a list of attributes/props,\n * and optionally children to append to the element.\n *\n * @example The following DOM tree\n *\n * `<div id=\"foo\" name=\"bar\">Hello!</div>`\n *\n * can be constructed using this function as:\n *\n * `h('div', { id: 'foo', name : 'bar' }, 'Hello!');`\n *\n * @param {string} nodeName\tAn element name. Ex: `div`, `a`, `span`, etc.\n * @param {Object} attributes\tAny attributes/props to set on the created element.\n * @param rest\t\t\tAdditional arguments are taken to be children to append. Can be infinitely nested Arrays.\n *\n * @public\n */\nfunction h(nodeName, attributes) {\n\tvar children = EMPTY_CHILDREN,\n\t    lastSimple,\n\t    child,\n\t    simple,\n\t    i;\n\tfor (i = arguments.length; i-- > 2;) {\n\t\tstack.push(arguments[i]);\n\t}\n\tif (attributes && attributes.children != null) {\n\t\tif (!stack.length) stack.push(attributes.children);\n\t\tdelete attributes.children;\n\t}\n\twhile (stack.length) {\n\t\tif ((child = stack.pop()) && child.pop !== undefined) {\n\t\t\tfor (i = child.length; i--;) {\n\t\t\t\tstack.push(child[i]);\n\t\t\t}\n\t\t} else {\n\t\t\tif (typeof child === 'boolean') child = null;\n\n\t\t\tif (simple = typeof nodeName !== 'function') {\n\t\t\t\tif (child == null) child = '';else if (typeof child === 'number') child = String(child);else if (typeof child !== 'string') simple = false;\n\t\t\t}\n\n\t\t\tif (simple && lastSimple) {\n\t\t\t\tchildren[children.length - 1] += child;\n\t\t\t} else if (children === EMPTY_CHILDREN) {\n\t\t\t\tchildren = [child];\n\t\t\t} else {\n\t\t\t\tchildren.push(child);\n\t\t\t}\n\n\t\t\tlastSimple = simple;\n\t\t}\n\t}\n\n\tvar p = new VNode();\n\tp.nodeName = nodeName;\n\tp.children = children;\n\tp.attributes = attributes == null ? undefined : attributes;\n\tp.key = attributes == null ? undefined : attributes.key;\n\n\t// if a \"vnode hook\" is defined, pass every created VNode to it\n\tif (options.vnode !== undefined) options.vnode(p);\n\n\treturn p;\n}\n\n/**\n *  Copy all properties from `props` onto `obj`.\n *  @param {Object} obj\t\tObject onto which properties should be copied.\n *  @param {Object} props\tObject from which to copy properties.\n *  @returns obj\n *  @private\n */\nfunction extend(obj, props) {\n  for (var i in props) {\n    obj[i] = props[i];\n  }return obj;\n}\n\n/**\n * Call a function asynchronously, as soon as possible. Makes\n * use of HTML Promise to schedule the callback if available,\n * otherwise falling back to `setTimeout` (mainly for IE<11).\n *\n * @param {Function} callback\n */\nvar defer = typeof Promise == 'function' ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\n * @param {VNode} vnode\t\tThe virtual DOM element to clone\n * @param {Object} props\tAttributes/props to add when cloning\n * @param {VNode} rest\t\tAny additional arguments will be used as replacement children.\n */\nfunction cloneElement(vnode, props) {\n  return h(vnode.nodeName, extend(extend({}, vnode.attributes), props), arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children);\n}\n\n// DOM properties that should NOT have \"px\" added when numeric\nvar IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;\n\n/** Managed queue of dirty components to be re-rendered */\n\nvar items = [];\n\nfunction enqueueRender(component) {\n\tif (!component._dirty && (component._dirty = true) && items.push(component) == 1) {\n\t\t(options.debounceRendering || defer)(rerender);\n\t}\n}\n\nfunction rerender() {\n\tvar p,\n\t    list = items;\n\titems = [];\n\twhile (p = list.pop()) {\n\t\tif (p._dirty) renderComponent(p);\n\t}\n}\n\n/**\n * Check if two nodes are equivalent.\n *\n * @param {Node} node\t\t\tDOM Node to compare\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\n * @private\n */\nfunction isSameNodeType(node, vnode, hydrating) {\n  if (typeof vnode === 'string' || typeof vnode === 'number') {\n    return node.splitText !== undefined;\n  }\n  if (typeof vnode.nodeName === 'string') {\n    return !node._componentConstructor && isNamedNode(node, vnode.nodeName);\n  }\n  return hydrating || node._componentConstructor === vnode.nodeName;\n}\n\n/**\n * Check if an Element has a given nodeName, case-insensitively.\n *\n * @param {Element} node\tA DOM Element to inspect the name of.\n * @param {String} nodeName\tUnnormalized name to compare against.\n */\nfunction isNamedNode(node, nodeName) {\n  return node.normalizedNodeName === nodeName || node.nodeName.toLowerCase() === nodeName.toLowerCase();\n}\n\n/**\n * Reconstruct Component-style `props` from a VNode.\n * Ensures default/fallback values from `defaultProps`:\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\n *\n * @param {VNode} vnode\n * @returns {Object} props\n */\nfunction getNodeProps(vnode) {\n  var props = extend({}, vnode.attributes);\n  props.children = vnode.children;\n\n  var defaultProps = vnode.nodeName.defaultProps;\n  if (defaultProps !== undefined) {\n    for (var i in defaultProps) {\n      if (props[i] === undefined) {\n        props[i] = defaultProps[i];\n      }\n    }\n  }\n\n  return props;\n}\n\n/** Create an element with the given nodeName.\n *\t@param {String} nodeName\n *\t@param {Boolean} [isSvg=false]\tIf `true`, creates an element within the SVG namespace.\n *\t@returns {Element} node\n */\nfunction createNode(nodeName, isSvg) {\n\tvar node = isSvg ? document.createElementNS('http://www.w3.org/2000/svg', nodeName) : document.createElement(nodeName);\n\tnode.normalizedNodeName = nodeName;\n\treturn node;\n}\n\n/** Remove a child node from its parent if attached.\n *\t@param {Element} node\t\tThe node to remove\n */\nfunction removeNode(node) {\n\tvar parentNode = node.parentNode;\n\tif (parentNode) parentNode.removeChild(node);\n}\n\n/** Set a named attribute on the given Node, with special behavior for some names and event handlers.\n *\tIf `value` is `null`, the attribute/handler will be removed.\n *\t@param {Element} node\tAn element to mutate\n *\t@param {string} name\tThe name/key to set, such as an event or attribute name\n *\t@param {any} old\tThe last value that was set for this name/node pair\n *\t@param {any} value\tAn attribute value, such as a function to be used as an event handler\n *\t@param {Boolean} isSvg\tAre we currently diffing inside an svg?\n *\t@private\n */\nfunction setAccessor(node, name, old, value, isSvg) {\n\tif (name === 'className') name = 'class';\n\n\tif (name === 'key') {\n\t\t// ignore\n\t} else if (name === 'ref') {\n\t\tif (old) old(null);\n\t\tif (value) value(node);\n\t} else if (name === 'class' && !isSvg) {\n\t\tnode.className = value || '';\n\t} else if (name === 'style') {\n\t\tif (!value || typeof value === 'string' || typeof old === 'string') {\n\t\t\tnode.style.cssText = value || '';\n\t\t}\n\t\tif (value && typeof value === 'object') {\n\t\t\tif (typeof old !== 'string') {\n\t\t\t\tfor (var i in old) {\n\t\t\t\t\tif (!(i in value)) node.style[i] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (var i in value) {\n\t\t\t\tnode.style[i] = typeof value[i] === 'number' && IS_NON_DIMENSIONAL.test(i) === false ? value[i] + 'px' : value[i];\n\t\t\t}\n\t\t}\n\t} else if (name === 'dangerouslySetInnerHTML') {\n\t\tif (value) node.innerHTML = value.__html || '';\n\t} else if (name[0] == 'o' && name[1] == 'n') {\n\t\tvar useCapture = name !== (name = name.replace(/Capture$/, ''));\n\t\tname = name.toLowerCase().substring(2);\n\t\tif (value) {\n\t\t\tif (!old) node.addEventListener(name, eventProxy, useCapture);\n\t\t} else {\n\t\t\tnode.removeEventListener(name, eventProxy, useCapture);\n\t\t}\n\t\t(node._listeners || (node._listeners = {}))[name] = value;\n\t} else if (name !== 'list' && name !== 'type' && !isSvg && name in node) {\n\t\tsetProperty(node, name, value == null ? '' : value);\n\t\tif (value == null || value === false) node.removeAttribute(name);\n\t} else {\n\t\tvar ns = isSvg && name !== (name = name.replace(/^xlink:?/, ''));\n\t\tif (value == null || value === false) {\n\t\t\tif (ns) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase());else node.removeAttribute(name);\n\t\t} else if (typeof value !== 'function') {\n\t\t\tif (ns) node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value);else node.setAttribute(name, value);\n\t\t}\n\t}\n}\n\n/** Attempt to set a DOM property to the given value.\n *\tIE & FF throw for certain property-value combinations.\n */\nfunction setProperty(node, name, value) {\n\ttry {\n\t\tnode[name] = value;\n\t} catch (e) {}\n}\n\n/** Proxy an event to hooked event handlers\n *\t@private\n */\nfunction eventProxy(e) {\n\treturn this._listeners[e.type](options.event && options.event(e) || e);\n}\n\n/** Queue of components that have been mounted and are awaiting componentDidMount */\nvar mounts = [];\n\n/** Diff recursion count, used to track the end of the diff cycle. */\nvar diffLevel = 0;\n\n/** Global flag indicating if the diff is currently within an SVG */\nvar isSvgMode = false;\n\n/** Global flag indicating if the diff is performing hydration */\nvar hydrating = false;\n\n/** Invoke queued componentDidMount lifecycle methods */\nfunction flushMounts() {\n\tvar c;\n\twhile (c = mounts.pop()) {\n\t\tif (options.afterMount) options.afterMount(c);\n\t\tif (c.componentDidMount) c.componentDidMount();\n\t}\n}\n\n/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.\n *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\n *\t@returns {Element} dom\t\t\tThe created/mutated element\n *\t@private\n */\nfunction diff(dom, vnode, context, mountAll, parent, componentRoot) {\n\t// diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\n\tif (!diffLevel++) {\n\t\t// when first starting the diff, check if we're diffing an SVG or within an SVG\n\t\tisSvgMode = parent != null && parent.ownerSVGElement !== undefined;\n\n\t\t// hydration is indicated by the existing element to be diffed not having a prop cache\n\t\thydrating = dom != null && !('__preactattr_' in dom);\n\t}\n\n\tvar ret = idiff(dom, vnode, context, mountAll, componentRoot);\n\n\t// append the element if its a new parent\n\tif (parent && ret.parentNode !== parent) parent.appendChild(ret);\n\n\t// diffLevel being reduced to 0 means we're exiting the diff\n\tif (! --diffLevel) {\n\t\thydrating = false;\n\t\t// invoke queued componentDidMount lifecycle methods\n\t\tif (!componentRoot) flushMounts();\n\t}\n\n\treturn ret;\n}\n\n/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */\nfunction idiff(dom, vnode, context, mountAll, componentRoot) {\n\tvar out = dom,\n\t    prevSvgMode = isSvgMode;\n\n\t// empty values (null, undefined, booleans) render as empty Text nodes\n\tif (vnode == null || typeof vnode === 'boolean') vnode = '';\n\n\t// Fast case: Strings & Numbers create/update Text nodes.\n\tif (typeof vnode === 'string' || typeof vnode === 'number') {\n\n\t\t// update if it's already a Text node:\n\t\tif (dom && dom.splitText !== undefined && dom.parentNode && (!dom._component || componentRoot)) {\n\t\t\t/* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\n\t\t\tif (dom.nodeValue != vnode) {\n\t\t\t\tdom.nodeValue = vnode;\n\t\t\t}\n\t\t} else {\n\t\t\t// it wasn't a Text node: replace it with one and recycle the old Element\n\t\t\tout = document.createTextNode(vnode);\n\t\t\tif (dom) {\n\t\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\t\t\t\trecollectNodeTree(dom, true);\n\t\t\t}\n\t\t}\n\n\t\tout['__preactattr_'] = true;\n\n\t\treturn out;\n\t}\n\n\t// If the VNode represents a Component, perform a component diff:\n\tvar vnodeName = vnode.nodeName;\n\tif (typeof vnodeName === 'function') {\n\t\treturn buildComponentFromVNode(dom, vnode, context, mountAll);\n\t}\n\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\n\tisSvgMode = vnodeName === 'svg' ? true : vnodeName === 'foreignObject' ? false : isSvgMode;\n\n\t// If there's no existing element or it's the wrong type, create a new one:\n\tvnodeName = String(vnodeName);\n\tif (!dom || !isNamedNode(dom, vnodeName)) {\n\t\tout = createNode(vnodeName, isSvgMode);\n\n\t\tif (dom) {\n\t\t\t// move children into the replacement node\n\t\t\twhile (dom.firstChild) {\n\t\t\t\tout.appendChild(dom.firstChild);\n\t\t\t} // if the previous Element was mounted into the DOM, replace it inline\n\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\n\t\t\t// recycle the old element (skips non-Element node types)\n\t\t\trecollectNodeTree(dom, true);\n\t\t}\n\t}\n\n\tvar fc = out.firstChild,\n\t    props = out['__preactattr_'],\n\t    vchildren = vnode.children;\n\n\tif (props == null) {\n\t\tprops = out['__preactattr_'] = {};\n\t\tfor (var a = out.attributes, i = a.length; i--;) {\n\t\t\tprops[a[i].name] = a[i].value;\n\t\t}\n\t}\n\n\t// Optimization: fast-path for elements containing a single TextNode:\n\tif (!hydrating && vchildren && vchildren.length === 1 && typeof vchildren[0] === 'string' && fc != null && fc.splitText !== undefined && fc.nextSibling == null) {\n\t\tif (fc.nodeValue != vchildren[0]) {\n\t\t\tfc.nodeValue = vchildren[0];\n\t\t}\n\t}\n\t// otherwise, if there are existing or new children, diff them:\n\telse if (vchildren && vchildren.length || fc != null) {\n\t\t\tinnerDiffNode(out, vchildren, context, mountAll, hydrating || props.dangerouslySetInnerHTML != null);\n\t\t}\n\n\t// Apply attributes/props from VNode to the DOM Element:\n\tdiffAttributes(out, vnode.attributes, props);\n\n\t// restore previous SVG mode: (in case we're exiting an SVG namespace)\n\tisSvgMode = prevSvgMode;\n\n\treturn out;\n}\n\n/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.\n *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\n *\t@param {Object} context\t\t\tImplicitly descendant context object (from most recent `getChildContext()`)\n *\t@param {Boolean} mountAll\n *\t@param {Boolean} isHydrating\tIf `true`, consumes externally created elements similar to hydration\n */\nfunction innerDiffNode(dom, vchildren, context, mountAll, isHydrating) {\n\tvar originalChildren = dom.childNodes,\n\t    children = [],\n\t    keyed = {},\n\t    keyedLen = 0,\n\t    min = 0,\n\t    len = originalChildren.length,\n\t    childrenLen = 0,\n\t    vlen = vchildren ? vchildren.length : 0,\n\t    j,\n\t    c,\n\t    f,\n\t    vchild,\n\t    child;\n\n\t// Build up a map of keyed children and an Array of unkeyed children:\n\tif (len !== 0) {\n\t\tfor (var i = 0; i < len; i++) {\n\t\t\tvar _child = originalChildren[i],\n\t\t\t    props = _child['__preactattr_'],\n\t\t\t    key = vlen && props ? _child._component ? _child._component.__key : props.key : null;\n\t\t\tif (key != null) {\n\t\t\t\tkeyedLen++;\n\t\t\t\tkeyed[key] = _child;\n\t\t\t} else if (props || (_child.splitText !== undefined ? isHydrating ? _child.nodeValue.trim() : true : isHydrating)) {\n\t\t\t\tchildren[childrenLen++] = _child;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (vlen !== 0) {\n\t\tfor (var i = 0; i < vlen; i++) {\n\t\t\tvchild = vchildren[i];\n\t\t\tchild = null;\n\n\t\t\t// attempt to find a node based on key matching\n\t\t\tvar key = vchild.key;\n\t\t\tif (key != null) {\n\t\t\t\tif (keyedLen && keyed[key] !== undefined) {\n\t\t\t\t\tchild = keyed[key];\n\t\t\t\t\tkeyed[key] = undefined;\n\t\t\t\t\tkeyedLen--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// attempt to pluck a node of the same type from the existing children\n\t\t\telse if (!child && min < childrenLen) {\n\t\t\t\t\tfor (j = min; j < childrenLen; j++) {\n\t\t\t\t\t\tif (children[j] !== undefined && isSameNodeType(c = children[j], vchild, isHydrating)) {\n\t\t\t\t\t\t\tchild = c;\n\t\t\t\t\t\t\tchildren[j] = undefined;\n\t\t\t\t\t\t\tif (j === childrenLen - 1) childrenLen--;\n\t\t\t\t\t\t\tif (j === min) min++;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// morph the matched/found/created DOM child to match vchild (deep)\n\t\t\tchild = idiff(child, vchild, context, mountAll);\n\n\t\t\tf = originalChildren[i];\n\t\t\tif (child && child !== dom && child !== f) {\n\t\t\t\tif (f == null) {\n\t\t\t\t\tdom.appendChild(child);\n\t\t\t\t} else if (child === f.nextSibling) {\n\t\t\t\t\tremoveNode(f);\n\t\t\t\t} else {\n\t\t\t\t\tdom.insertBefore(child, f);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// remove unused keyed children:\n\tif (keyedLen) {\n\t\tfor (var i in keyed) {\n\t\t\tif (keyed[i] !== undefined) recollectNodeTree(keyed[i], false);\n\t\t}\n\t}\n\n\t// remove orphaned unkeyed children:\n\twhile (min <= childrenLen) {\n\t\tif ((child = children[childrenLen--]) !== undefined) recollectNodeTree(child, false);\n\t}\n}\n\n/** Recursively recycle (or just unmount) a node and its descendants.\n *\t@param {Node} node\t\t\t\t\t\tDOM node to start unmount/removal from\n *\t@param {Boolean} [unmountOnly=false]\tIf `true`, only triggers unmount lifecycle, skips removal\n */\nfunction recollectNodeTree(node, unmountOnly) {\n\tvar component = node._component;\n\tif (component) {\n\t\t// if node is owned by a Component, unmount that component (ends up recursing back here)\n\t\tunmountComponent(component);\n\t} else {\n\t\t// If the node's VNode had a ref function, invoke it with null here.\n\t\t// (this is part of the React spec, and smart for unsetting references)\n\t\tif (node['__preactattr_'] != null && node['__preactattr_'].ref) node['__preactattr_'].ref(null);\n\n\t\tif (unmountOnly === false || node['__preactattr_'] == null) {\n\t\t\tremoveNode(node);\n\t\t}\n\n\t\tremoveChildren(node);\n\t}\n}\n\n/** Recollect/unmount all children.\n *\t- we use .lastChild here because it causes less reflow than .firstChild\n *\t- it's also cheaper than accessing the .childNodes Live NodeList\n */\nfunction removeChildren(node) {\n\tnode = node.lastChild;\n\twhile (node) {\n\t\tvar next = node.previousSibling;\n\t\trecollectNodeTree(node, true);\n\t\tnode = next;\n\t}\n}\n\n/** Apply differences in attributes from a VNode to the given DOM Element.\n *\t@param {Element} dom\t\tElement with attributes to diff `attrs` against\n *\t@param {Object} attrs\t\tThe desired end-state key-value attribute pairs\n *\t@param {Object} old\t\t\tCurrent/previous attributes (from previous VNode or element's prop cache)\n */\nfunction diffAttributes(dom, attrs, old) {\n\tvar name;\n\n\t// remove attributes no longer present on the vnode by setting them to undefined\n\tfor (name in old) {\n\t\tif (!(attrs && attrs[name] != null) && old[name] != null) {\n\t\t\tsetAccessor(dom, name, old[name], old[name] = undefined, isSvgMode);\n\t\t}\n\t}\n\n\t// add new & update changed attributes\n\tfor (name in attrs) {\n\t\tif (name !== 'children' && name !== 'innerHTML' && (!(name in old) || attrs[name] !== (name === 'value' || name === 'checked' ? dom[name] : old[name]))) {\n\t\t\tsetAccessor(dom, name, old[name], old[name] = attrs[name], isSvgMode);\n\t\t}\n\t}\n}\n\n/** Retains a pool of Components for re-use, keyed on component name.\n *\tNote: since component names are not unique or even necessarily available, these are primarily a form of sharding.\n *\t@private\n */\nvar components = {};\n\n/** Reclaim a component for later re-use by the recycler. */\nfunction collectComponent(component) {\n\tvar name = component.constructor.name;\n\t(components[name] || (components[name] = [])).push(component);\n}\n\n/** Create a component. Normalizes differences between PFC's and classful Components. */\nfunction createComponent(Ctor, props, context) {\n\tvar list = components[Ctor.name],\n\t    inst;\n\n\tif (Ctor.prototype && Ctor.prototype.render) {\n\t\tinst = new Ctor(props, context);\n\t\tComponent.call(inst, props, context);\n\t} else {\n\t\tinst = new Component(props, context);\n\t\tinst.constructor = Ctor;\n\t\tinst.render = doRender;\n\t}\n\n\tif (list) {\n\t\tfor (var i = list.length; i--;) {\n\t\t\tif (list[i].constructor === Ctor) {\n\t\t\t\tinst.nextBase = list[i].nextBase;\n\t\t\t\tlist.splice(i, 1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn inst;\n}\n\n/** The `.render()` method for a PFC backing instance. */\nfunction doRender(props, state, context) {\n\treturn this.constructor(props, context);\n}\n\n/** Set a component's `props` (generally derived from JSX attributes).\n *\t@param {Object} props\n *\t@param {Object} [opts]\n *\t@param {boolean} [opts.renderSync=false]\tIf `true` and {@link options.syncComponentUpdates} is `true`, triggers synchronous rendering.\n *\t@param {boolean} [opts.render=true]\t\t\tIf `false`, no render will be triggered.\n */\nfunction setComponentProps(component, props, opts, context, mountAll) {\n\tif (component._disable) return;\n\tcomponent._disable = true;\n\n\tif (component.__ref = props.ref) delete props.ref;\n\tif (component.__key = props.key) delete props.key;\n\n\tif (!component.base || mountAll) {\n\t\tif (component.componentWillMount) component.componentWillMount();\n\t} else if (component.componentWillReceiveProps) {\n\t\tcomponent.componentWillReceiveProps(props, context);\n\t}\n\n\tif (context && context !== component.context) {\n\t\tif (!component.prevContext) component.prevContext = component.context;\n\t\tcomponent.context = context;\n\t}\n\n\tif (!component.prevProps) component.prevProps = component.props;\n\tcomponent.props = props;\n\n\tcomponent._disable = false;\n\n\tif (opts !== 0) {\n\t\tif (opts === 1 || options.syncComponentUpdates !== false || !component.base) {\n\t\t\trenderComponent(component, 1, mountAll);\n\t\t} else {\n\t\t\tenqueueRender(component);\n\t\t}\n\t}\n\n\tif (component.__ref) component.__ref(component);\n}\n\n/** Render a Component, triggering necessary lifecycle events and taking High-Order Components into account.\n *\t@param {Component} component\n *\t@param {Object} [opts]\n *\t@param {boolean} [opts.build=false]\t\tIf `true`, component will build and store a DOM node if not already associated with one.\n *\t@private\n */\nfunction renderComponent(component, opts, mountAll, isChild) {\n\tif (component._disable) return;\n\n\tvar props = component.props,\n\t    state = component.state,\n\t    context = component.context,\n\t    previousProps = component.prevProps || props,\n\t    previousState = component.prevState || state,\n\t    previousContext = component.prevContext || context,\n\t    isUpdate = component.base,\n\t    nextBase = component.nextBase,\n\t    initialBase = isUpdate || nextBase,\n\t    initialChildComponent = component._component,\n\t    skip = false,\n\t    rendered,\n\t    inst,\n\t    cbase;\n\n\t// if updating\n\tif (isUpdate) {\n\t\tcomponent.props = previousProps;\n\t\tcomponent.state = previousState;\n\t\tcomponent.context = previousContext;\n\t\tif (opts !== 2 && component.shouldComponentUpdate && component.shouldComponentUpdate(props, state, context) === false) {\n\t\t\tskip = true;\n\t\t} else if (component.componentWillUpdate) {\n\t\t\tcomponent.componentWillUpdate(props, state, context);\n\t\t}\n\t\tcomponent.props = props;\n\t\tcomponent.state = state;\n\t\tcomponent.context = context;\n\t}\n\n\tcomponent.prevProps = component.prevState = component.prevContext = component.nextBase = null;\n\tcomponent._dirty = false;\n\n\tif (!skip) {\n\t\trendered = component.render(props, state, context);\n\n\t\t// context to pass to the child, can be updated via (grand-)parent component\n\t\tif (component.getChildContext) {\n\t\t\tcontext = extend(extend({}, context), component.getChildContext());\n\t\t}\n\n\t\tvar childComponent = rendered && rendered.nodeName,\n\t\t    toUnmount,\n\t\t    base;\n\n\t\tif (typeof childComponent === 'function') {\n\t\t\t// set up high order component link\n\n\t\t\tvar childProps = getNodeProps(rendered);\n\t\t\tinst = initialChildComponent;\n\n\t\t\tif (inst && inst.constructor === childComponent && childProps.key == inst.__key) {\n\t\t\t\tsetComponentProps(inst, childProps, 1, context, false);\n\t\t\t} else {\n\t\t\t\ttoUnmount = inst;\n\n\t\t\t\tcomponent._component = inst = createComponent(childComponent, childProps, context);\n\t\t\t\tinst.nextBase = inst.nextBase || nextBase;\n\t\t\t\tinst._parentComponent = component;\n\t\t\t\tsetComponentProps(inst, childProps, 0, context, false);\n\t\t\t\trenderComponent(inst, 1, mountAll, true);\n\t\t\t}\n\n\t\t\tbase = inst.base;\n\t\t} else {\n\t\t\tcbase = initialBase;\n\n\t\t\t// destroy high order component link\n\t\t\ttoUnmount = initialChildComponent;\n\t\t\tif (toUnmount) {\n\t\t\t\tcbase = component._component = null;\n\t\t\t}\n\n\t\t\tif (initialBase || opts === 1) {\n\t\t\t\tif (cbase) cbase._component = null;\n\t\t\t\tbase = diff(cbase, rendered, context, mountAll || !isUpdate, initialBase && initialBase.parentNode, true);\n\t\t\t}\n\t\t}\n\n\t\tif (initialBase && base !== initialBase && inst !== initialChildComponent) {\n\t\t\tvar baseParent = initialBase.parentNode;\n\t\t\tif (baseParent && base !== baseParent) {\n\t\t\t\tbaseParent.replaceChild(base, initialBase);\n\n\t\t\t\tif (!toUnmount) {\n\t\t\t\t\tinitialBase._component = null;\n\t\t\t\t\trecollectNodeTree(initialBase, false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (toUnmount) {\n\t\t\tunmountComponent(toUnmount);\n\t\t}\n\n\t\tcomponent.base = base;\n\t\tif (base && !isChild) {\n\t\t\tvar componentRef = component,\n\t\t\t    t = component;\n\t\t\twhile (t = t._parentComponent) {\n\t\t\t\t(componentRef = t).base = base;\n\t\t\t}\n\t\t\tbase._component = componentRef;\n\t\t\tbase._componentConstructor = componentRef.constructor;\n\t\t}\n\t}\n\n\tif (!isUpdate || mountAll) {\n\t\tmounts.unshift(component);\n\t} else if (!skip) {\n\t\t// Ensure that pending componentDidMount() hooks of child components\n\t\t// are called before the componentDidUpdate() hook in the parent.\n\t\t// Note: disabled as it causes duplicate hooks, see https://github.com/developit/preact/issues/750\n\t\t// flushMounts();\n\n\t\tif (component.componentDidUpdate) {\n\t\t\tcomponent.componentDidUpdate(previousProps, previousState, previousContext);\n\t\t}\n\t\tif (options.afterUpdate) options.afterUpdate(component);\n\t}\n\n\tif (component._renderCallbacks != null) {\n\t\twhile (component._renderCallbacks.length) {\n\t\t\tcomponent._renderCallbacks.pop().call(component);\n\t\t}\n\t}\n\n\tif (!diffLevel && !isChild) flushMounts();\n}\n\n/** Apply the Component referenced by a VNode to the DOM.\n *\t@param {Element} dom\tThe DOM node to mutate\n *\t@param {VNode} vnode\tA Component-referencing VNode\n *\t@returns {Element} dom\tThe created/mutated element\n *\t@private\n */\nfunction buildComponentFromVNode(dom, vnode, context, mountAll) {\n\tvar c = dom && dom._component,\n\t    originalComponent = c,\n\t    oldDom = dom,\n\t    isDirectOwner = c && dom._componentConstructor === vnode.nodeName,\n\t    isOwner = isDirectOwner,\n\t    props = getNodeProps(vnode);\n\twhile (c && !isOwner && (c = c._parentComponent)) {\n\t\tisOwner = c.constructor === vnode.nodeName;\n\t}\n\n\tif (c && isOwner && (!mountAll || c._component)) {\n\t\tsetComponentProps(c, props, 3, context, mountAll);\n\t\tdom = c.base;\n\t} else {\n\t\tif (originalComponent && !isDirectOwner) {\n\t\t\tunmountComponent(originalComponent);\n\t\t\tdom = oldDom = null;\n\t\t}\n\n\t\tc = createComponent(vnode.nodeName, props, context);\n\t\tif (dom && !c.nextBase) {\n\t\t\tc.nextBase = dom;\n\t\t\t// passing dom/oldDom as nextBase will recycle it if unused, so bypass recycling on L229:\n\t\t\toldDom = null;\n\t\t}\n\t\tsetComponentProps(c, props, 1, context, mountAll);\n\t\tdom = c.base;\n\n\t\tif (oldDom && dom !== oldDom) {\n\t\t\toldDom._component = null;\n\t\t\trecollectNodeTree(oldDom, false);\n\t\t}\n\t}\n\n\treturn dom;\n}\n\n/** Remove a component from the DOM and recycle it.\n *\t@param {Component} component\tThe Component instance to unmount\n *\t@private\n */\nfunction unmountComponent(component) {\n\tif (options.beforeUnmount) options.beforeUnmount(component);\n\n\tvar base = component.base;\n\n\tcomponent._disable = true;\n\n\tif (component.componentWillUnmount) component.componentWillUnmount();\n\n\tcomponent.base = null;\n\n\t// recursively tear down & recollect high-order component children:\n\tvar inner = component._component;\n\tif (inner) {\n\t\tunmountComponent(inner);\n\t} else if (base) {\n\t\tif (base['__preactattr_'] && base['__preactattr_'].ref) base['__preactattr_'].ref(null);\n\n\t\tcomponent.nextBase = base;\n\n\t\tremoveNode(base);\n\t\tcollectComponent(component);\n\n\t\tremoveChildren(base);\n\t}\n\n\tif (component.__ref) component.__ref(null);\n}\n\n/** Base Component class.\n *\tProvides `setState()` and `forceUpdate()`, which trigger rendering.\n *\t@public\n *\n *\t@example\n *\tclass MyFoo extends Component {\n *\t\trender(props, state) {\n *\t\t\treturn <div />;\n *\t\t}\n *\t}\n */\nfunction Component(props, context) {\n\tthis._dirty = true;\n\n\t/** @public\n  *\t@type {object}\n  */\n\tthis.context = context;\n\n\t/** @public\n  *\t@type {object}\n  */\n\tthis.props = props;\n\n\t/** @public\n  *\t@type {object}\n  */\n\tthis.state = this.state || {};\n}\n\nextend(Component.prototype, {\n\n\t/** Returns a `boolean` indicating if the component should re-render when receiving the given `props` and `state`.\n  *\t@param {object} nextProps\n  *\t@param {object} nextState\n  *\t@param {object} nextContext\n  *\t@returns {Boolean} should the component re-render\n  *\t@name shouldComponentUpdate\n  *\t@function\n  */\n\n\t/** Update component state by copying properties from `state` to `this.state`.\n  *\t@param {object} state\t\tA hash of state properties to update with new values\n  *\t@param {function} callback\tA function to be called once component state is updated\n  */\n\tsetState: function setState(state, callback) {\n\t\tvar s = this.state;\n\t\tif (!this.prevState) this.prevState = extend({}, s);\n\t\textend(s, typeof state === 'function' ? state(s, this.props) : state);\n\t\tif (callback) (this._renderCallbacks = this._renderCallbacks || []).push(callback);\n\t\tenqueueRender(this);\n\t},\n\n\n\t/** Immediately perform a synchronous re-render of the component.\n  *\t@param {function} callback\t\tA function to be called after component is re-rendered.\n  *\t@private\n  */\n\tforceUpdate: function forceUpdate(callback) {\n\t\tif (callback) (this._renderCallbacks = this._renderCallbacks || []).push(callback);\n\t\trenderComponent(this, 2);\n\t},\n\n\n\t/** Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n  *\tVirtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\n  *\t@param {object} props\t\tProps (eg: JSX attributes) received from parent element/component\n  *\t@param {object} state\t\tThe component's current state\n  *\t@param {object} context\t\tContext object (if a parent component has provided context)\n  *\t@returns VNode\n  */\n\trender: function render() {}\n});\n\n/** Render JSX into a `parent` Element.\n *\t@param {VNode} vnode\t\tA (JSX) VNode to render\n *\t@param {Element} parent\t\tDOM element to render into\n *\t@param {Element} [merge]\tAttempt to re-use an existing DOM tree rooted at `merge`\n *\t@public\n *\n *\t@example\n *\t// render a div into <body>:\n *\trender(<div id=\"hello\">hello!</div>, document.body);\n *\n *\t@example\n *\t// render a \"Thing\" component into #foo:\n *\tconst Thing = ({ name }) => <span>{ name }</span>;\n *\trender(<Thing name=\"one\" />, document.querySelector('#foo'));\n */\nfunction render(vnode, parent, merge) {\n  return diff(merge, vnode, {}, false, parent, false);\n}\n\nvar preact = {\n\th: h,\n\tcreateElement: h,\n\tcloneElement: cloneElement,\n\tComponent: Component,\n\trender: render,\n\trerender: rerender,\n\toptions: options\n};\n\nexport default preact;\nexport { h, h as createElement, cloneElement, Component, render, rerender, options };\n//# sourceMappingURL=preact.esm.js.map\n","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport { Component, Children } from 'react';\nimport PropTypes from 'prop-types';\nimport { storeShape, subscriptionShape } from '../utils/PropTypes';\nimport warning from '../utils/warning';\n\nvar didWarnAboutReceivingStore = false;\nfunction warnAboutReceivingStore() {\n  if (didWarnAboutReceivingStore) {\n    return;\n  }\n  didWarnAboutReceivingStore = true;\n\n  warning('<Provider> does not support changing `store` on the fly. ' + 'It is most likely that you see this error because you updated to ' + 'Redux 2.x and React Redux 2.x which no longer hot reload reducers ' + 'automatically. See https://github.com/reactjs/react-redux/releases/' + 'tag/v2.0.0 for the migration instructions.');\n}\n\nexport function createProvider() {\n  var _Provider$childContex;\n\n  var storeKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'store';\n  var subKey = arguments[1];\n\n  var subscriptionKey = subKey || storeKey + 'Subscription';\n\n  var Provider = function (_Component) {\n    _inherits(Provider, _Component);\n\n    Provider.prototype.getChildContext = function getChildContext() {\n      var _ref;\n\n      return _ref = {}, _ref[storeKey] = this[storeKey], _ref[subscriptionKey] = null, _ref;\n    };\n\n    function Provider(props, context) {\n      _classCallCheck(this, Provider);\n\n      var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));\n\n      _this[storeKey] = props.store;\n      return _this;\n    }\n\n    Provider.prototype.render = function render() {\n      return Children.only(this.props.children);\n    };\n\n    return Provider;\n  }(Component);\n\n  if (process.env.NODE_ENV !== 'production') {\n    Provider.prototype.componentWillReceiveProps = function (nextProps) {\n      if (this[storeKey] !== nextProps.store) {\n        warnAboutReceivingStore();\n      }\n    };\n  }\n\n  Provider.propTypes = {\n    store: storeShape.isRequired,\n    children: PropTypes.element.isRequired\n  };\n  Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[storeKey] = storeShape.isRequired, _Provider$childContex[subscriptionKey] = subscriptionShape, _Provider$childContex);\n\n  return Provider;\n}\n\nexport default createProvider();","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport hoistStatics from 'hoist-non-react-statics';\nimport invariant from 'invariant';\nimport { Component, createElement } from 'react';\n\nimport Subscription from '../utils/Subscription';\nimport { storeShape, subscriptionShape } from '../utils/PropTypes';\n\nvar hotReloadingVersion = 0;\nvar dummyState = {};\nfunction noop() {}\nfunction makeSelectorStateful(sourceSelector, store) {\n  // wrap the selector in an object that tracks its results between runs.\n  var selector = {\n    run: function runComponentSelector(props) {\n      try {\n        var nextProps = sourceSelector(store.getState(), props);\n        if (nextProps !== selector.props || selector.error) {\n          selector.shouldComponentUpdate = true;\n          selector.props = nextProps;\n          selector.error = null;\n        }\n      } catch (error) {\n        selector.shouldComponentUpdate = true;\n        selector.error = error;\n      }\n    }\n  };\n\n  return selector;\n}\n\nexport default function connectAdvanced(\n/*\n  selectorFactory is a func that is responsible for returning the selector function used to\n  compute new props from state, props, and dispatch. For example:\n     export default connectAdvanced((dispatch, options) => (state, props) => ({\n      thing: state.things[props.thingId],\n      saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)),\n    }))(YourComponent)\n   Access to dispatch is provided to the factory so selectorFactories can bind actionCreators\n  outside of their selector as an optimization. Options passed to connectAdvanced are passed to\n  the selectorFactory, along with displayName and WrappedComponent, as the second argument.\n   Note that selectorFactory is responsible for all caching/memoization of inbound and outbound\n  props. Do not use connectAdvanced directly without memoizing results between calls to your\n  selector, otherwise the Connect component will re-render on every state or props change.\n*/\nselectorFactory) {\n  var _contextTypes, _childContextTypes;\n\n  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n      _ref$getDisplayName = _ref.getDisplayName,\n      getDisplayName = _ref$getDisplayName === undefined ? function (name) {\n    return 'ConnectAdvanced(' + name + ')';\n  } : _ref$getDisplayName,\n      _ref$methodName = _ref.methodName,\n      methodName = _ref$methodName === undefined ? 'connectAdvanced' : _ref$methodName,\n      _ref$renderCountProp = _ref.renderCountProp,\n      renderCountProp = _ref$renderCountProp === undefined ? undefined : _ref$renderCountProp,\n      _ref$shouldHandleStat = _ref.shouldHandleStateChanges,\n      shouldHandleStateChanges = _ref$shouldHandleStat === undefined ? true : _ref$shouldHandleStat,\n      _ref$storeKey = _ref.storeKey,\n      storeKey = _ref$storeKey === undefined ? 'store' : _ref$storeKey,\n      _ref$withRef = _ref.withRef,\n      withRef = _ref$withRef === undefined ? false : _ref$withRef,\n      connectOptions = _objectWithoutProperties(_ref, ['getDisplayName', 'methodName', 'renderCountProp', 'shouldHandleStateChanges', 'storeKey', 'withRef']);\n\n  var subscriptionKey = storeKey + 'Subscription';\n  var version = hotReloadingVersion++;\n\n  var contextTypes = (_contextTypes = {}, _contextTypes[storeKey] = storeShape, _contextTypes[subscriptionKey] = subscriptionShape, _contextTypes);\n  var childContextTypes = (_childContextTypes = {}, _childContextTypes[subscriptionKey] = subscriptionShape, _childContextTypes);\n\n  return function wrapWithConnect(WrappedComponent) {\n    invariant(typeof WrappedComponent == 'function', 'You must pass a component to the function returned by ' + (methodName + '. Instead received ' + JSON.stringify(WrappedComponent)));\n\n    var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';\n\n    var displayName = getDisplayName(wrappedComponentName);\n\n    var selectorFactoryOptions = _extends({}, connectOptions, {\n      getDisplayName: getDisplayName,\n      methodName: methodName,\n      renderCountProp: renderCountProp,\n      shouldHandleStateChanges: shouldHandleStateChanges,\n      storeKey: storeKey,\n      withRef: withRef,\n      displayName: displayName,\n      wrappedComponentName: wrappedComponentName,\n      WrappedComponent: WrappedComponent\n    });\n\n    var Connect = function (_Component) {\n      _inherits(Connect, _Component);\n\n      function Connect(props, context) {\n        _classCallCheck(this, Connect);\n\n        var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));\n\n        _this.version = version;\n        _this.state = {};\n        _this.renderCount = 0;\n        _this.store = props[storeKey] || context[storeKey];\n        _this.propsMode = Boolean(props[storeKey]);\n        _this.setWrappedInstance = _this.setWrappedInstance.bind(_this);\n\n        invariant(_this.store, 'Could not find \"' + storeKey + '\" in either the context or props of ' + ('\"' + displayName + '\". Either wrap the root component in a <Provider>, ') + ('or explicitly pass \"' + storeKey + '\" as a prop to \"' + displayName + '\".'));\n\n        _this.initSelector();\n        _this.initSubscription();\n        return _this;\n      }\n\n      Connect.prototype.getChildContext = function getChildContext() {\n        var _ref2;\n\n        // If this component received store from props, its subscription should be transparent\n        // to any descendants receiving store+subscription from context; it passes along\n        // subscription passed to it. Otherwise, it shadows the parent subscription, which allows\n        // Connect to control ordering of notifications to flow top-down.\n        var subscription = this.propsMode ? null : this.subscription;\n        return _ref2 = {}, _ref2[subscriptionKey] = subscription || this.context[subscriptionKey], _ref2;\n      };\n\n      Connect.prototype.componentDidMount = function componentDidMount() {\n        if (!shouldHandleStateChanges) return;\n\n        // componentWillMount fires during server side rendering, but componentDidMount and\n        // componentWillUnmount do not. Because of this, trySubscribe happens during ...didMount.\n        // Otherwise, unsubscription would never take place during SSR, causing a memory leak.\n        // To handle the case where a child component may have triggered a state change by\n        // dispatching an action in its componentWillMount, we have to re-run the select and maybe\n        // re-render.\n        this.subscription.trySubscribe();\n        this.selector.run(this.props);\n        if (this.selector.shouldComponentUpdate) this.forceUpdate();\n      };\n\n      Connect.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n        this.selector.run(nextProps);\n      };\n\n      Connect.prototype.shouldComponentUpdate = function shouldComponentUpdate() {\n        return this.selector.shouldComponentUpdate;\n      };\n\n      Connect.prototype.componentWillUnmount = function componentWillUnmount() {\n        if (this.subscription) this.subscription.tryUnsubscribe();\n        this.subscription = null;\n        this.notifyNestedSubs = noop;\n        this.store = null;\n        this.selector.run = noop;\n        this.selector.shouldComponentUpdate = false;\n      };\n\n      Connect.prototype.getWrappedInstance = function getWrappedInstance() {\n        invariant(withRef, 'To access the wrapped instance, you need to specify ' + ('{ withRef: true } in the options argument of the ' + methodName + '() call.'));\n        return this.wrappedInstance;\n      };\n\n      Connect.prototype.setWrappedInstance = function setWrappedInstance(ref) {\n        this.wrappedInstance = ref;\n      };\n\n      Connect.prototype.initSelector = function initSelector() {\n        var sourceSelector = selectorFactory(this.store.dispatch, selectorFactoryOptions);\n        this.selector = makeSelectorStateful(sourceSelector, this.store);\n        this.selector.run(this.props);\n      };\n\n      Connect.prototype.initSubscription = function initSubscription() {\n        if (!shouldHandleStateChanges) return;\n\n        // parentSub's source should match where store came from: props vs. context. A component\n        // connected to the store via props shouldn't use subscription from context, or vice versa.\n        var parentSub = (this.propsMode ? this.props : this.context)[subscriptionKey];\n        this.subscription = new Subscription(this.store, parentSub, this.onStateChange.bind(this));\n\n        // `notifyNestedSubs` is duplicated to handle the case where the component is  unmounted in\n        // the middle of the notification loop, where `this.subscription` will then be null. An\n        // extra null check every change can be avoided by copying the method onto `this` and then\n        // replacing it with a no-op on unmount. This can probably be avoided if Subscription's\n        // listeners logic is changed to not call listeners that have been unsubscribed in the\n        // middle of the notification loop.\n        this.notifyNestedSubs = this.subscription.notifyNestedSubs.bind(this.subscription);\n      };\n\n      Connect.prototype.onStateChange = function onStateChange() {\n        this.selector.run(this.props);\n\n        if (!this.selector.shouldComponentUpdate) {\n          this.notifyNestedSubs();\n        } else {\n          this.componentDidUpdate = this.notifyNestedSubsOnComponentDidUpdate;\n          this.setState(dummyState);\n        }\n      };\n\n      Connect.prototype.notifyNestedSubsOnComponentDidUpdate = function notifyNestedSubsOnComponentDidUpdate() {\n        // `componentDidUpdate` is conditionally implemented when `onStateChange` determines it\n        // needs to notify nested subs. Once called, it unimplements itself until further state\n        // changes occur. Doing it this way vs having a permanent `componentDidUpdate` that does\n        // a boolean check every time avoids an extra method call most of the time, resulting\n        // in some perf boost.\n        this.componentDidUpdate = undefined;\n        this.notifyNestedSubs();\n      };\n\n      Connect.prototype.isSubscribed = function isSubscribed() {\n        return Boolean(this.subscription) && this.subscription.isSubscribed();\n      };\n\n      Connect.prototype.addExtraProps = function addExtraProps(props) {\n        if (!withRef && !renderCountProp && !(this.propsMode && this.subscription)) return props;\n        // make a shallow copy so that fields added don't leak to the original selector.\n        // this is especially important for 'ref' since that's a reference back to the component\n        // instance. a singleton memoized selector would then be holding a reference to the\n        // instance, preventing the instance from being garbage collected, and that would be bad\n        var withExtras = _extends({}, props);\n        if (withRef) withExtras.ref = this.setWrappedInstance;\n        if (renderCountProp) withExtras[renderCountProp] = this.renderCount++;\n        if (this.propsMode && this.subscription) withExtras[subscriptionKey] = this.subscription;\n        return withExtras;\n      };\n\n      Connect.prototype.render = function render() {\n        var selector = this.selector;\n        selector.shouldComponentUpdate = false;\n\n        if (selector.error) {\n          throw selector.error;\n        } else {\n          return createElement(WrappedComponent, this.addExtraProps(selector.props));\n        }\n      };\n\n      return Connect;\n    }(Component);\n\n    Connect.WrappedComponent = WrappedComponent;\n    Connect.displayName = displayName;\n    Connect.childContextTypes = childContextTypes;\n    Connect.contextTypes = contextTypes;\n    Connect.propTypes = contextTypes;\n\n    if (process.env.NODE_ENV !== 'production') {\n      Connect.prototype.componentWillUpdate = function componentWillUpdate() {\n        var _this2 = this;\n\n        // We are hot reloading!\n        if (this.version !== version) {\n          this.version = version;\n          this.initSelector();\n\n          // If any connected descendants don't hot reload (and resubscribe in the process), their\n          // listeners will be lost when we unsubscribe. Unfortunately, by copying over all\n          // listeners, this does mean that the old versions of connected descendants will still be\n          // notified of state changes; however, their onStateChange function is a no-op so this\n          // isn't a huge deal.\n          var oldListeners = [];\n\n          if (this.subscription) {\n            oldListeners = this.subscription.listeners.get();\n            this.subscription.tryUnsubscribe();\n          }\n          this.initSubscription();\n          if (shouldHandleStateChanges) {\n            this.subscription.trySubscribe();\n            oldListeners.forEach(function (listener) {\n              return _this2.subscription.listeners.subscribe(listener);\n            });\n          }\n        }\n      };\n    }\n\n    return hoistStatics(Connect, WrappedComponent);\n  };\n}","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport connectAdvanced from '../components/connectAdvanced';\nimport shallowEqual from '../utils/shallowEqual';\nimport defaultMapDispatchToPropsFactories from './mapDispatchToProps';\nimport defaultMapStateToPropsFactories from './mapStateToProps';\nimport defaultMergePropsFactories from './mergeProps';\nimport defaultSelectorFactory from './selectorFactory';\n\n/*\n  connect is a facade over connectAdvanced. It turns its args into a compatible\n  selectorFactory, which has the signature:\n\n    (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps\n  \n  connect passes its args to connectAdvanced as options, which will in turn pass them to\n  selectorFactory each time a Connect component instance is instantiated or hot reloaded.\n\n  selectorFactory returns a final props selector from its mapStateToProps,\n  mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps,\n  mergePropsFactories, and pure args.\n\n  The resulting final props selector is called by the Connect component instance whenever\n  it receives new props or store state.\n */\n\nfunction match(arg, factories, name) {\n  for (var i = factories.length - 1; i >= 0; i--) {\n    var result = factories[i](arg);\n    if (result) return result;\n  }\n\n  return function (dispatch, options) {\n    throw new Error('Invalid value of type ' + typeof arg + ' for ' + name + ' argument when connecting component ' + options.wrappedComponentName + '.');\n  };\n}\n\nfunction strictEqual(a, b) {\n  return a === b;\n}\n\n// createConnect with default args builds the 'official' connect behavior. Calling it with\n// different options opens up some testing and extensibility scenarios\nexport function createConnect() {\n  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n      _ref$connectHOC = _ref.connectHOC,\n      connectHOC = _ref$connectHOC === undefined ? connectAdvanced : _ref$connectHOC,\n      _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n      mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? defaultMapStateToPropsFactories : _ref$mapStateToPropsF,\n      _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n      mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? defaultMapDispatchToPropsFactories : _ref$mapDispatchToPro,\n      _ref$mergePropsFactor = _ref.mergePropsFactories,\n      mergePropsFactories = _ref$mergePropsFactor === undefined ? defaultMergePropsFactories : _ref$mergePropsFactor,\n      _ref$selectorFactory = _ref.selectorFactory,\n      selectorFactory = _ref$selectorFactory === undefined ? defaultSelectorFactory : _ref$selectorFactory;\n\n  return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n    var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n        _ref2$pure = _ref2.pure,\n        pure = _ref2$pure === undefined ? true : _ref2$pure,\n        _ref2$areStatesEqual = _ref2.areStatesEqual,\n        areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n        _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n        areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? shallowEqual : _ref2$areOwnPropsEqua,\n        _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n        areStatePropsEqual = _ref2$areStatePropsEq === undefined ? shallowEqual : _ref2$areStatePropsEq,\n        _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n        areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? shallowEqual : _ref2$areMergedPropsE,\n        extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n    var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n    var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n    var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n    return connectHOC(selectorFactory, _extends({\n      // used in error messages\n      methodName: 'connect',\n\n      // used to compute Connect's displayName from the wrapped component's displayName.\n      getDisplayName: function getDisplayName(name) {\n        return 'Connect(' + name + ')';\n      },\n\n      // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n      shouldHandleStateChanges: Boolean(mapStateToProps),\n\n      // passed through to selectorFactory\n      initMapStateToProps: initMapStateToProps,\n      initMapDispatchToProps: initMapDispatchToProps,\n      initMergeProps: initMergeProps,\n      pure: pure,\n      areStatesEqual: areStatesEqual,\n      areOwnPropsEqual: areOwnPropsEqual,\n      areStatePropsEqual: areStatePropsEqual,\n      areMergedPropsEqual: areMergedPropsEqual\n\n    }, extraOptions));\n  };\n}\n\nexport default createConnect();","import { bindActionCreators } from 'redux';\nimport { wrapMapToPropsConstant, wrapMapToPropsFunc } from './wrapMapToProps';\n\nexport function whenMapDispatchToPropsIsFunction(mapDispatchToProps) {\n  return typeof mapDispatchToProps === 'function' ? wrapMapToPropsFunc(mapDispatchToProps, 'mapDispatchToProps') : undefined;\n}\n\nexport function whenMapDispatchToPropsIsMissing(mapDispatchToProps) {\n  return !mapDispatchToProps ? wrapMapToPropsConstant(function (dispatch) {\n    return { dispatch: dispatch };\n  }) : undefined;\n}\n\nexport function whenMapDispatchToPropsIsObject(mapDispatchToProps) {\n  return mapDispatchToProps && typeof mapDispatchToProps === 'object' ? wrapMapToPropsConstant(function (dispatch) {\n    return bindActionCreators(mapDispatchToProps, dispatch);\n  }) : undefined;\n}\n\nexport default [whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject];","import { wrapMapToPropsConstant, wrapMapToPropsFunc } from './wrapMapToProps';\n\nexport function whenMapStateToPropsIsFunction(mapStateToProps) {\n  return typeof mapStateToProps === 'function' ? wrapMapToPropsFunc(mapStateToProps, 'mapStateToProps') : undefined;\n}\n\nexport function whenMapStateToPropsIsMissing(mapStateToProps) {\n  return !mapStateToProps ? wrapMapToPropsConstant(function () {\n    return {};\n  }) : undefined;\n}\n\nexport default [whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing];","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport verifyPlainObject from '../utils/verifyPlainObject';\n\nexport function defaultMergeProps(stateProps, dispatchProps, ownProps) {\n  return _extends({}, ownProps, stateProps, dispatchProps);\n}\n\nexport function wrapMergePropsFunc(mergeProps) {\n  return function initMergePropsProxy(dispatch, _ref) {\n    var displayName = _ref.displayName,\n        pure = _ref.pure,\n        areMergedPropsEqual = _ref.areMergedPropsEqual;\n\n    var hasRunOnce = false;\n    var mergedProps = void 0;\n\n    return function mergePropsProxy(stateProps, dispatchProps, ownProps) {\n      var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n\n      if (hasRunOnce) {\n        if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps;\n      } else {\n        hasRunOnce = true;\n        mergedProps = nextMergedProps;\n\n        if (process.env.NODE_ENV !== 'production') verifyPlainObject(mergedProps, displayName, 'mergeProps');\n      }\n\n      return mergedProps;\n    };\n  };\n}\n\nexport function whenMergePropsIsFunction(mergeProps) {\n  return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined;\n}\n\nexport function whenMergePropsIsOmitted(mergeProps) {\n  return !mergeProps ? function () {\n    return defaultMergeProps;\n  } : undefined;\n}\n\nexport default [whenMergePropsIsFunction, whenMergePropsIsOmitted];","function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport verifySubselectors from './verifySubselectors';\n\nexport function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) {\n  return function impureFinalPropsSelector(state, ownProps) {\n    return mergeProps(mapStateToProps(state, ownProps), mapDispatchToProps(dispatch, ownProps), ownProps);\n  };\n}\n\nexport function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref) {\n  var areStatesEqual = _ref.areStatesEqual,\n      areOwnPropsEqual = _ref.areOwnPropsEqual,\n      areStatePropsEqual = _ref.areStatePropsEqual;\n\n  var hasRunAtLeastOnce = false;\n  var state = void 0;\n  var ownProps = void 0;\n  var stateProps = void 0;\n  var dispatchProps = void 0;\n  var mergedProps = void 0;\n\n  function handleFirstCall(firstState, firstOwnProps) {\n    state = firstState;\n    ownProps = firstOwnProps;\n    stateProps = mapStateToProps(state, ownProps);\n    dispatchProps = mapDispatchToProps(dispatch, ownProps);\n    mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n    hasRunAtLeastOnce = true;\n    return mergedProps;\n  }\n\n  function handleNewPropsAndNewState() {\n    stateProps = mapStateToProps(state, ownProps);\n\n    if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);\n\n    mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n    return mergedProps;\n  }\n\n  function handleNewProps() {\n    if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps);\n\n    if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);\n\n    mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n    return mergedProps;\n  }\n\n  function handleNewState() {\n    var nextStateProps = mapStateToProps(state, ownProps);\n    var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps);\n    stateProps = nextStateProps;\n\n    if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n\n    return mergedProps;\n  }\n\n  function handleSubsequentCalls(nextState, nextOwnProps) {\n    var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps);\n    var stateChanged = !areStatesEqual(nextState, state);\n    state = nextState;\n    ownProps = nextOwnProps;\n\n    if (propsChanged && stateChanged) return handleNewPropsAndNewState();\n    if (propsChanged) return handleNewProps();\n    if (stateChanged) return handleNewState();\n    return mergedProps;\n  }\n\n  return function pureFinalPropsSelector(nextState, nextOwnProps) {\n    return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps);\n  };\n}\n\n// TODO: Add more comments\n\n// If pure is true, the selector returned by selectorFactory will memoize its results,\n// allowing connectAdvanced's shouldComponentUpdate to return false if final\n// props have not changed. If false, the selector will always return a new\n// object and shouldComponentUpdate will always return true.\n\nexport default function finalPropsSelectorFactory(dispatch, _ref2) {\n  var initMapStateToProps = _ref2.initMapStateToProps,\n      initMapDispatchToProps = _ref2.initMapDispatchToProps,\n      initMergeProps = _ref2.initMergeProps,\n      options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n  var mapStateToProps = initMapStateToProps(dispatch, options);\n  var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n  var mergeProps = initMergeProps(dispatch, options);\n\n  if (process.env.NODE_ENV !== 'production') {\n    verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n  }\n\n  var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n  return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}","import warning from '../utils/warning';\n\nfunction verify(selector, methodName, displayName) {\n  if (!selector) {\n    throw new Error('Unexpected value for ' + methodName + ' in ' + displayName + '.');\n  } else if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') {\n    if (!selector.hasOwnProperty('dependsOnOwnProps')) {\n      warning('The selector for ' + methodName + ' of ' + displayName + ' did not specify a value for dependsOnOwnProps.');\n    }\n  }\n}\n\nexport default function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, displayName) {\n  verify(mapStateToProps, 'mapStateToProps', displayName);\n  verify(mapDispatchToProps, 'mapDispatchToProps', displayName);\n  verify(mergeProps, 'mergeProps', displayName);\n}","import verifyPlainObject from '../utils/verifyPlainObject';\n\nexport function wrapMapToPropsConstant(getConstant) {\n  return function initConstantSelector(dispatch, options) {\n    var constant = getConstant(dispatch, options);\n\n    function constantSelector() {\n      return constant;\n    }\n    constantSelector.dependsOnOwnProps = false;\n    return constantSelector;\n  };\n}\n\n// dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args\n// to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine\n// whether mapToProps needs to be invoked when props have changed.\n// \n// A length of one signals that mapToProps does not depend on props from the parent component.\n// A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and\n// therefore not reporting its length accurately..\nexport function getDependsOnOwnProps(mapToProps) {\n  return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1;\n}\n\n// Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction,\n// this function wraps mapToProps in a proxy function which does several things:\n// \n//  * Detects whether the mapToProps function being called depends on props, which\n//    is used by selectorFactory to decide if it should reinvoke on props changes.\n//    \n//  * On first call, handles mapToProps if returns another function, and treats that\n//    new function as the true mapToProps for subsequent calls.\n//    \n//  * On first call, verifies the first result is a plain object, in order to warn\n//    the developer that their mapToProps function is not returning a valid result.\n//    \nexport function wrapMapToPropsFunc(mapToProps, methodName) {\n  return function initProxySelector(dispatch, _ref) {\n    var displayName = _ref.displayName;\n\n    var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n      return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n    };\n\n    // allow detectFactoryAndVerify to get ownProps\n    proxy.dependsOnOwnProps = true;\n\n    proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n      proxy.mapToProps = mapToProps;\n      proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n      var props = proxy(stateOrDispatch, ownProps);\n\n      if (typeof props === 'function') {\n        proxy.mapToProps = props;\n        proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n        props = proxy(stateOrDispatch, ownProps);\n      }\n\n      if (process.env.NODE_ENV !== 'production') verifyPlainObject(props, displayName, methodName);\n\n      return props;\n    };\n\n    return proxy;\n  };\n}","import Provider, { createProvider } from './components/Provider';\nimport connectAdvanced from './components/connectAdvanced';\nimport connect from './connect/connect';\n\nexport { Provider, createProvider, connectAdvanced, connect };","import PropTypes from 'prop-types';\n\nexport var subscriptionShape = PropTypes.shape({\n  trySubscribe: PropTypes.func.isRequired,\n  tryUnsubscribe: PropTypes.func.isRequired,\n  notifyNestedSubs: PropTypes.func.isRequired,\n  isSubscribed: PropTypes.func.isRequired\n});\n\nexport var storeShape = PropTypes.shape({\n  subscribe: PropTypes.func.isRequired,\n  dispatch: PropTypes.func.isRequired,\n  getState: PropTypes.func.isRequired\n});","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n// encapsulates the subscription logic for connecting a component to the redux store, as\n// well as nesting subscriptions of descendant components, so that we can ensure the\n// ancestor components re-render before descendants\n\nvar CLEARED = null;\nvar nullListeners = {\n  notify: function notify() {}\n};\n\nfunction createListenerCollection() {\n  // the current/next pattern is copied from redux's createStore code.\n  // TODO: refactor+expose that code to be reusable here?\n  var current = [];\n  var next = [];\n\n  return {\n    clear: function clear() {\n      next = CLEARED;\n      current = CLEARED;\n    },\n    notify: function notify() {\n      var listeners = current = next;\n      for (var i = 0; i < listeners.length; i++) {\n        listeners[i]();\n      }\n    },\n    get: function get() {\n      return next;\n    },\n    subscribe: function subscribe(listener) {\n      var isSubscribed = true;\n      if (next === current) next = current.slice();\n      next.push(listener);\n\n      return function unsubscribe() {\n        if (!isSubscribed || current === CLEARED) return;\n        isSubscribed = false;\n\n        if (next === current) next = current.slice();\n        next.splice(next.indexOf(listener), 1);\n      };\n    }\n  };\n}\n\nvar Subscription = function () {\n  function Subscription(store, parentSub, onStateChange) {\n    _classCallCheck(this, Subscription);\n\n    this.store = store;\n    this.parentSub = parentSub;\n    this.onStateChange = onStateChange;\n    this.unsubscribe = null;\n    this.listeners = nullListeners;\n  }\n\n  Subscription.prototype.addNestedSub = function addNestedSub(listener) {\n    this.trySubscribe();\n    return this.listeners.subscribe(listener);\n  };\n\n  Subscription.prototype.notifyNestedSubs = function notifyNestedSubs() {\n    this.listeners.notify();\n  };\n\n  Subscription.prototype.isSubscribed = function isSubscribed() {\n    return Boolean(this.unsubscribe);\n  };\n\n  Subscription.prototype.trySubscribe = function trySubscribe() {\n    if (!this.unsubscribe) {\n      this.unsubscribe = this.parentSub ? this.parentSub.addNestedSub(this.onStateChange) : this.store.subscribe(this.onStateChange);\n\n      this.listeners = createListenerCollection();\n    }\n  };\n\n  Subscription.prototype.tryUnsubscribe = function tryUnsubscribe() {\n    if (this.unsubscribe) {\n      this.unsubscribe();\n      this.unsubscribe = null;\n      this.listeners.clear();\n      this.listeners = nullListeners;\n    }\n  };\n\n  return Subscription;\n}();\n\nexport { Subscription as default };","var hasOwn = Object.prototype.hasOwnProperty;\n\nfunction is(x, y) {\n  if (x === y) {\n    return x !== 0 || y !== 0 || 1 / x === 1 / y;\n  } else {\n    return x !== x && y !== y;\n  }\n}\n\nexport default function shallowEqual(objA, objB) {\n  if (is(objA, objB)) return true;\n\n  if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n    return false;\n  }\n\n  var keysA = Object.keys(objA);\n  var keysB = Object.keys(objB);\n\n  if (keysA.length !== keysB.length) return false;\n\n  for (var i = 0; i < keysA.length; i++) {\n    if (!hasOwn.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n      return false;\n    }\n  }\n\n  return true;\n}","import isPlainObject from 'lodash-es/isPlainObject';\nimport warning from './warning';\n\nexport default function verifyPlainObject(value, displayName, methodName) {\n  if (!isPlainObject(value)) {\n    warning(methodName + '() in ' + displayName + ' must return a plain object. Instead received ' + value + '.');\n  }\n}","/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\nexport default function warning(message) {\n  /* eslint-disable no-console */\n  if (typeof console !== 'undefined' && typeof console.error === 'function') {\n    console.error(message);\n  }\n  /* eslint-enable no-console */\n  try {\n    // This error was thrown as a convenience so that if you enable\n    // \"break on all exceptions\" in your console,\n    // it would pause the execution at this line.\n    throw new Error(message);\n    /* eslint-disable no-empty */\n  } catch (e) {}\n  /* eslint-enable no-empty */\n}","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n  return function () {\n    return arg;\n  };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n  return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n  return arg;\n};\n\nmodule.exports = emptyFunction;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n  validateFormat = function validateFormat(format) {\n    if (format === undefined) {\n      throw new Error('invariant requires an error message argument');\n    }\n  };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n  validateFormat(format);\n\n  if (!condition) {\n    var error;\n    if (format === undefined) {\n      error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n    } else {\n      var args = [a, b, c, d, e, f];\n      var argIndex = 0;\n      error = new Error(format.replace(/%s/g, function () {\n        return args[argIndex++];\n      }));\n      error.name = 'Invariant Violation';\n    }\n\n    error.framesToPop = 1; // we don't care about invariant's own frame\n    throw error;\n  }\n}\n\nmodule.exports = invariant;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar emptyFunction = require('./emptyFunction');\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = emptyFunction;\n\nif (process.env.NODE_ENV !== 'production') {\n  var printWarning = function printWarning(format) {\n    for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n      args[_key - 1] = arguments[_key];\n    }\n\n    var argIndex = 0;\n    var message = 'Warning: ' + format.replace(/%s/g, function () {\n      return args[argIndex++];\n    });\n    if (typeof console !== 'undefined') {\n      console.error(message);\n    }\n    try {\n      // --- Welcome to debugging React ---\n      // This error was thrown as a convenience so that you can use this stack\n      // to find the callsite that caused this warning to fire.\n      throw new Error(message);\n    } catch (x) {}\n  };\n\n  warning = function warning(condition, format) {\n    if (format === undefined) {\n      throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n    }\n\n    if (format.indexOf('Failed Composite propType: ') === 0) {\n      return; // Ignore CompositeComponent proptype check.\n    }\n\n    if (!condition) {\n      for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n        args[_key2 - 2] = arguments[_key2];\n      }\n\n      printWarning.apply(undefined, [format].concat(args));\n    }\n  };\n}\n\nmodule.exports = warning;","/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\n(function (global, factory) {\n    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n    typeof define === 'function' && define.amd ? define(factory) :\n    (global.hoistNonReactStatics = factory());\n}(this, (function () {\n    'use strict';\n    \n    var REACT_STATICS = {\n        childContextTypes: true,\n        contextTypes: true,\n        defaultProps: true,\n        displayName: true,\n        getDefaultProps: true,\n        getDerivedStateFromProps: true,\n        mixins: true,\n        propTypes: true,\n        type: true\n    };\n    \n    var KNOWN_STATICS = {\n        name: true,\n        length: true,\n        prototype: true,\n        caller: true,\n        callee: true,\n        arguments: true,\n        arity: true\n    };\n    \n    var defineProperty = Object.defineProperty;\n    var getOwnPropertyNames = Object.getOwnPropertyNames;\n    var getOwnPropertySymbols = Object.getOwnPropertySymbols;\n    var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n    var getPrototypeOf = Object.getPrototypeOf;\n    var objectPrototype = getPrototypeOf && getPrototypeOf(Object);\n    \n    return function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n        if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components\n            \n            if (objectPrototype) {\n                var inheritedComponent = getPrototypeOf(sourceComponent);\n                if (inheritedComponent && inheritedComponent !== objectPrototype) {\n                    hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n                }\n            }\n            \n            var keys = getOwnPropertyNames(sourceComponent);\n            \n            if (getOwnPropertySymbols) {\n                keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n            }\n            \n            for (var i = 0; i < keys.length; ++i) {\n                var key = keys[i];\n                if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {\n                    var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n                    try { // Avoid failures from read-only properties\n                        defineProperty(targetComponent, key, descriptor);\n                    } catch (e) {}\n                }\n            }\n            \n            return targetComponent;\n        }\n        \n        return targetComponent;\n    };\n})));\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n  if (process.env.NODE_ENV !== 'production') {\n    if (format === undefined) {\n      throw new Error('invariant requires an error message argument');\n    }\n  }\n\n  if (!condition) {\n    var error;\n    if (format === undefined) {\n      error = new Error(\n        'Minified exception occurred; use the non-minified dev environment ' +\n        'for the full error message and additional helpful warnings.'\n      );\n    } else {\n      var args = [a, b, c, d, e, f];\n      var argIndex = 0;\n      error = new Error(\n        format.replace(/%s/g, function() { return args[argIndex++]; })\n      );\n      error.name = 'Invariant Violation';\n    }\n\n    error.framesToPop = 1; // we don't care about invariant's own frame\n    throw error;\n  }\n};\n\nmodule.exports = invariant;\n","import root from './_root.js';\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nexport default Symbol;\n","import Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n    undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n  if (value == null) {\n    return value === undefined ? undefinedTag : nullTag;\n  }\n  return (symToStringTag && symToStringTag in Object(value))\n    ? getRawTag(value)\n    : objectToString(value);\n}\n\nexport default baseGetTag;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n","import overArg from './_overArg.js';\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nexport default getPrototype;\n","import Symbol from './_Symbol.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n  var isOwn = hasOwnProperty.call(value, symToStringTag),\n      tag = value[symToStringTag];\n\n  try {\n    value[symToStringTag] = undefined;\n    var unmasked = true;\n  } catch (e) {}\n\n  var result = nativeObjectToString.call(value);\n  if (unmasked) {\n    if (isOwn) {\n      value[symToStringTag] = tag;\n    } else {\n      delete value[symToStringTag];\n    }\n  }\n  return result;\n}\n\nexport default getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n  return nativeObjectToString.call(value);\n}\n\nexport default objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n  return function(arg) {\n    return func(transform(arg));\n  };\n}\n\nexport default overArg;\n","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nexport default root;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return value != null && typeof value == 'object';\n}\n\nexport default isObjectLike;\n","import baseGetTag from './_baseGetTag.js';\nimport getPrototype from './_getPrototype.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n  if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n    return false;\n  }\n  var proto = getPrototype(value);\n  if (proto === null) {\n    return true;\n  }\n  var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n  return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n    funcToString.call(Ctor) == objectCtorString;\n}\n\nexport default isPlainObject;\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc');  // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== 'production') {\n  var invariant = require('fbjs/lib/invariant');\n  var warning = require('fbjs/lib/warning');\n  var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n  var loggedTypeFailures = {};\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n  if (process.env.NODE_ENV !== 'production') {\n    for (var typeSpecName in typeSpecs) {\n      if (typeSpecs.hasOwnProperty(typeSpecName)) {\n        var error;\n        // Prop type validation may throw. In case they do, we don't want to\n        // fail the render phase where it didn't fail before. So we log it.\n        // After these have been cleaned up, we'll let them throw.\n        try {\n          // This is intentionally an invariant that gets caught. It's the same\n          // behavior as without this statement except with a better message.\n          invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);\n          error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n        } catch (ex) {\n          error = ex;\n        }\n        warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);\n        if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n          // Only monitor this failure once because there tends to be a lot of the\n          // same error.\n          loggedTypeFailures[error.message] = true;\n\n          var stack = getStack ? getStack() : '';\n\n          warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');\n        }\n      }\n    }\n  }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n  /* global Symbol */\n  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n  /**\n   * Returns the iterator method function contained on the iterable object.\n   *\n   * Be sure to invoke the function with the iterable as context:\n   *\n   *     var iteratorFn = getIteratorFn(myIterable);\n   *     if (iteratorFn) {\n   *       var iterator = iteratorFn.call(myIterable);\n   *       ...\n   *     }\n   *\n   * @param {?object} maybeIterable\n   * @return {?function}\n   */\n  function getIteratorFn(maybeIterable) {\n    var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n    if (typeof iteratorFn === 'function') {\n      return iteratorFn;\n    }\n  }\n\n  /**\n   * Collection of methods that allow declaration and validation of props that are\n   * supplied to React components. Example usage:\n   *\n   *   var Props = require('ReactPropTypes');\n   *   var MyArticle = React.createClass({\n   *     propTypes: {\n   *       // An optional string prop named \"description\".\n   *       description: Props.string,\n   *\n   *       // A required enum prop named \"category\".\n   *       category: Props.oneOf(['News','Photos']).isRequired,\n   *\n   *       // A prop named \"dialog\" that requires an instance of Dialog.\n   *       dialog: Props.instanceOf(Dialog).isRequired\n   *     },\n   *     render: function() { ... }\n   *   });\n   *\n   * A more formal specification of how these methods are used:\n   *\n   *   type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n   *   decl := ReactPropTypes.{type}(.isRequired)?\n   *\n   * Each and every declaration produces a function with the same signature. This\n   * allows the creation of custom validation functions. For example:\n   *\n   *  var MyLink = React.createClass({\n   *    propTypes: {\n   *      // An optional string or URI prop named \"href\".\n   *      href: function(props, propName, componentName) {\n   *        var propValue = props[propName];\n   *        if (propValue != null && typeof propValue !== 'string' &&\n   *            !(propValue instanceof URI)) {\n   *          return new Error(\n   *            'Expected a string or an URI for ' + propName + ' in ' +\n   *            componentName\n   *          );\n   *        }\n   *      }\n   *    },\n   *    render: function() {...}\n   *  });\n   *\n   * @internal\n   */\n\n  var ANONYMOUS = '<<anonymous>>';\n\n  // Important!\n  // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n  var ReactPropTypes = {\n    array: createPrimitiveTypeChecker('array'),\n    bool: createPrimitiveTypeChecker('boolean'),\n    func: createPrimitiveTypeChecker('function'),\n    number: createPrimitiveTypeChecker('number'),\n    object: createPrimitiveTypeChecker('object'),\n    string: createPrimitiveTypeChecker('string'),\n    symbol: createPrimitiveTypeChecker('symbol'),\n\n    any: createAnyTypeChecker(),\n    arrayOf: createArrayOfTypeChecker,\n    element: createElementTypeChecker(),\n    instanceOf: createInstanceTypeChecker,\n    node: createNodeChecker(),\n    objectOf: createObjectOfTypeChecker,\n    oneOf: createEnumTypeChecker,\n    oneOfType: createUnionTypeChecker,\n    shape: createShapeTypeChecker,\n    exact: createStrictShapeTypeChecker,\n  };\n\n  /**\n   * inlined Object.is polyfill to avoid requiring consumers ship their own\n   * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n   */\n  /*eslint-disable no-self-compare*/\n  function is(x, y) {\n    // SameValue algorithm\n    if (x === y) {\n      // Steps 1-5, 7-10\n      // Steps 6.b-6.e: +0 != -0\n      return x !== 0 || 1 / x === 1 / y;\n    } else {\n      // Step 6.a: NaN == NaN\n      return x !== x && y !== y;\n    }\n  }\n  /*eslint-enable no-self-compare*/\n\n  /**\n   * We use an Error-like object for backward compatibility as people may call\n   * PropTypes directly and inspect their output. However, we don't use real\n   * Errors anymore. We don't inspect their stack anyway, and creating them\n   * is prohibitively expensive if they are created too often, such as what\n   * happens in oneOfType() for any type before the one that matched.\n   */\n  function PropTypeError(message) {\n    this.message = message;\n    this.stack = '';\n  }\n  // Make `instanceof Error` still work for returned errors.\n  PropTypeError.prototype = Error.prototype;\n\n  function createChainableTypeChecker(validate) {\n    if (process.env.NODE_ENV !== 'production') {\n      var manualPropTypeCallCache = {};\n      var manualPropTypeWarningCount = 0;\n    }\n    function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n      componentName = componentName || ANONYMOUS;\n      propFullName = propFullName || propName;\n\n      if (secret !== ReactPropTypesSecret) {\n        if (throwOnDirectAccess) {\n          // New behavior only for users of `prop-types` package\n          invariant(\n            false,\n            'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n            'Use `PropTypes.checkPropTypes()` to call them. ' +\n            'Read more at http://fb.me/use-check-prop-types'\n          );\n        } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n          // Old behavior for people using React.PropTypes\n          var cacheKey = componentName + ':' + propName;\n          if (\n            !manualPropTypeCallCache[cacheKey] &&\n            // Avoid spamming the console because they are often not actionable except for lib authors\n            manualPropTypeWarningCount < 3\n          ) {\n            warning(\n              false,\n              'You are manually calling a React.PropTypes validation ' +\n              'function for the `%s` prop on `%s`. This is deprecated ' +\n              'and will throw in the standalone `prop-types` package. ' +\n              'You may be seeing this warning due to a third-party PropTypes ' +\n              'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',\n              propFullName,\n              componentName\n            );\n            manualPropTypeCallCache[cacheKey] = true;\n            manualPropTypeWarningCount++;\n          }\n        }\n      }\n      if (props[propName] == null) {\n        if (isRequired) {\n          if (props[propName] === null) {\n            return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n          }\n          return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n        }\n        return null;\n      } else {\n        return validate(props, propName, componentName, location, propFullName);\n      }\n    }\n\n    var chainedCheckType = checkType.bind(null, false);\n    chainedCheckType.isRequired = checkType.bind(null, true);\n\n    return chainedCheckType;\n  }\n\n  function createPrimitiveTypeChecker(expectedType) {\n    function validate(props, propName, componentName, location, propFullName, secret) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== expectedType) {\n        // `propValue` being instance of, say, date/regexp, pass the 'object'\n        // check, but we can offer a more precise error message here rather than\n        // 'of type `object`'.\n        var preciseType = getPreciseType(propValue);\n\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createAnyTypeChecker() {\n    return createChainableTypeChecker(emptyFunction.thatReturnsNull);\n  }\n\n  function createArrayOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n      }\n      var propValue = props[propName];\n      if (!Array.isArray(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n      }\n      for (var i = 0; i < propValue.length; i++) {\n        var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n        if (error instanceof Error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createElementTypeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      if (!isValidElement(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createInstanceTypeChecker(expectedClass) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!(props[propName] instanceof expectedClass)) {\n        var expectedClassName = expectedClass.name || ANONYMOUS;\n        var actualClassName = getClassName(props[propName]);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createEnumTypeChecker(expectedValues) {\n    if (!Array.isArray(expectedValues)) {\n      process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;\n      return emptyFunction.thatReturnsNull;\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      for (var i = 0; i < expectedValues.length; i++) {\n        if (is(propValue, expectedValues[i])) {\n          return null;\n        }\n      }\n\n      var valuesString = JSON.stringify(expectedValues);\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createObjectOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n      }\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n      }\n      for (var key in propValue) {\n        if (propValue.hasOwnProperty(key)) {\n          var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n          if (error instanceof Error) {\n            return error;\n          }\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createUnionTypeChecker(arrayOfTypeCheckers) {\n    if (!Array.isArray(arrayOfTypeCheckers)) {\n      process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n      return emptyFunction.thatReturnsNull;\n    }\n\n    for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n      var checker = arrayOfTypeCheckers[i];\n      if (typeof checker !== 'function') {\n        warning(\n          false,\n          'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n          'received %s at index %s.',\n          getPostfixForTypeWarning(checker),\n          i\n        );\n        return emptyFunction.thatReturnsNull;\n      }\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n        var checker = arrayOfTypeCheckers[i];\n        if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n          return null;\n        }\n      }\n\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createNodeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!isNode(props[propName])) {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      for (var key in shapeTypes) {\n        var checker = shapeTypes[key];\n        if (!checker) {\n          continue;\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createStrictShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      // We need to check all keys in case some are required but missing from\n      // props.\n      var allKeys = assign({}, props[propName], shapeTypes);\n      for (var key in allKeys) {\n        var checker = shapeTypes[key];\n        if (!checker) {\n          return new PropTypeError(\n            'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n            '\\nBad object: ' + JSON.stringify(props[propName], null, '  ') +\n            '\\nValid keys: ' +  JSON.stringify(Object.keys(shapeTypes), null, '  ')\n          );\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n\n    return createChainableTypeChecker(validate);\n  }\n\n  function isNode(propValue) {\n    switch (typeof propValue) {\n      case 'number':\n      case 'string':\n      case 'undefined':\n        return true;\n      case 'boolean':\n        return !propValue;\n      case 'object':\n        if (Array.isArray(propValue)) {\n          return propValue.every(isNode);\n        }\n        if (propValue === null || isValidElement(propValue)) {\n          return true;\n        }\n\n        var iteratorFn = getIteratorFn(propValue);\n        if (iteratorFn) {\n          var iterator = iteratorFn.call(propValue);\n          var step;\n          if (iteratorFn !== propValue.entries) {\n            while (!(step = iterator.next()).done) {\n              if (!isNode(step.value)) {\n                return false;\n              }\n            }\n          } else {\n            // Iterator will provide entry [k,v] tuples rather than values.\n            while (!(step = iterator.next()).done) {\n              var entry = step.value;\n              if (entry) {\n                if (!isNode(entry[1])) {\n                  return false;\n                }\n              }\n            }\n          }\n        } else {\n          return false;\n        }\n\n        return true;\n      default:\n        return false;\n    }\n  }\n\n  function isSymbol(propType, propValue) {\n    // Native Symbol.\n    if (propType === 'symbol') {\n      return true;\n    }\n\n    // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n    if (propValue['@@toStringTag'] === 'Symbol') {\n      return true;\n    }\n\n    // Fallback for non-spec compliant Symbols which are polyfilled.\n    if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n      return true;\n    }\n\n    return false;\n  }\n\n  // Equivalent of `typeof` but with special handling for array and regexp.\n  function getPropType(propValue) {\n    var propType = typeof propValue;\n    if (Array.isArray(propValue)) {\n      return 'array';\n    }\n    if (propValue instanceof RegExp) {\n      // Old webkits (at least until Android 4.0) return 'function' rather than\n      // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n      // passes PropTypes.object.\n      return 'object';\n    }\n    if (isSymbol(propType, propValue)) {\n      return 'symbol';\n    }\n    return propType;\n  }\n\n  // This handles more types than `getPropType`. Only used for error messages.\n  // See `createPrimitiveTypeChecker`.\n  function getPreciseType(propValue) {\n    if (typeof propValue === 'undefined' || propValue === null) {\n      return '' + propValue;\n    }\n    var propType = getPropType(propValue);\n    if (propType === 'object') {\n      if (propValue instanceof Date) {\n        return 'date';\n      } else if (propValue instanceof RegExp) {\n        return 'regexp';\n      }\n    }\n    return propType;\n  }\n\n  // Returns a string that is postfixed to a warning about an invalid type.\n  // For example, \"undefined\" or \"of type array\"\n  function getPostfixForTypeWarning(value) {\n    var type = getPreciseType(value);\n    switch (type) {\n      case 'array':\n      case 'object':\n        return 'an ' + type;\n      case 'boolean':\n      case 'date':\n      case 'regexp':\n        return 'a ' + type;\n      default:\n        return type;\n    }\n  }\n\n  // Returns class name of the object, if any.\n  function getClassName(propValue) {\n    if (!propValue.constructor || !propValue.constructor.name) {\n      return ANONYMOUS;\n    }\n    return propValue.constructor.name;\n  }\n\n  ReactPropTypes.checkPropTypes = checkPropTypes;\n  ReactPropTypes.PropTypes = ReactPropTypes;\n\n  return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n  var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n    Symbol.for &&\n    Symbol.for('react.element')) ||\n    0xeac7;\n\n  var isValidElement = function(object) {\n    return typeof object === 'object' &&\n      object !== null &&\n      object.$$typeof === REACT_ELEMENT_TYPE;\n  };\n\n  // By explicitly using `prop-types` you are opting into new development behavior.\n  // http://fb.me/prop-types-in-prod\n  var throwOnDirectAccess = true;\n  module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n  // By explicitly using `prop-types` you are opting into new production behavior.\n  // http://fb.me/prop-types-in-prod\n  module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from 'warning';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport createHistory from 'history/createBrowserHistory';\nimport Router from './Router';\n\n/**\n * The public API for a <Router> that uses HTML5 history.\n */\n\nvar BrowserRouter = function (_React$Component) {\n  _inherits(BrowserRouter, _React$Component);\n\n  function BrowserRouter() {\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, BrowserRouter);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = createHistory(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  BrowserRouter.prototype.componentWillMount = function componentWillMount() {\n    warning(!this.props.history, '<BrowserRouter> ignores the history prop. To use a custom history, ' + 'use `import { Router }` instead of `import { BrowserRouter as Router }`.');\n  };\n\n  BrowserRouter.prototype.render = function render() {\n    return React.createElement(Router, { history: this.history, children: this.props.children });\n  };\n\n  return BrowserRouter;\n}(React.Component);\n\nBrowserRouter.propTypes = {\n  basename: PropTypes.string,\n  forceRefresh: PropTypes.bool,\n  getUserConfirmation: PropTypes.func,\n  keyLength: PropTypes.number,\n  children: PropTypes.node\n};\n\n\nexport default BrowserRouter;","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from 'warning';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport createHistory from 'history/createHashHistory';\nimport Router from './Router';\n\n/**\n * The public API for a <Router> that uses window.location.hash.\n */\n\nvar HashRouter = function (_React$Component) {\n  _inherits(HashRouter, _React$Component);\n\n  function HashRouter() {\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, HashRouter);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = createHistory(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  HashRouter.prototype.componentWillMount = function componentWillMount() {\n    warning(!this.props.history, '<HashRouter> ignores the history prop. To use a custom history, ' + 'use `import { Router }` instead of `import { HashRouter as Router }`.');\n  };\n\n  HashRouter.prototype.render = function render() {\n    return React.createElement(Router, { history: this.history, children: this.props.children });\n  };\n\n  return HashRouter;\n}(React.Component);\n\nHashRouter.propTypes = {\n  basename: PropTypes.string,\n  getUserConfirmation: PropTypes.func,\n  hashType: PropTypes.oneOf(['hashbang', 'noslash', 'slash']),\n  children: PropTypes.node\n};\n\n\nexport default HashRouter;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport invariant from 'invariant';\n\nvar isModifiedEvent = function isModifiedEvent(event) {\n  return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n};\n\n/**\n * The public API for rendering a history-aware <a>.\n */\n\nvar Link = function (_React$Component) {\n  _inherits(Link, _React$Component);\n\n  function Link() {\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, Link);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleClick = function (event) {\n      if (_this.props.onClick) _this.props.onClick(event);\n\n      if (!event.defaultPrevented && // onClick prevented default\n      event.button === 0 && // ignore right clicks\n      !_this.props.target && // let browser handle \"target=_blank\" etc.\n      !isModifiedEvent(event) // ignore clicks with modifier keys\n      ) {\n          event.preventDefault();\n\n          var history = _this.context.router.history;\n          var _this$props = _this.props,\n              replace = _this$props.replace,\n              to = _this$props.to;\n\n\n          if (replace) {\n            history.replace(to);\n          } else {\n            history.push(to);\n          }\n        }\n    }, _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  Link.prototype.render = function render() {\n    var _props = this.props,\n        replace = _props.replace,\n        to = _props.to,\n        innerRef = _props.innerRef,\n        props = _objectWithoutProperties(_props, ['replace', 'to', 'innerRef']); // eslint-disable-line no-unused-vars\n\n    invariant(this.context.router, 'You should not use <Link> outside a <Router>');\n\n    var href = this.context.router.history.createHref(typeof to === 'string' ? { pathname: to } : to);\n\n    return React.createElement('a', _extends({}, props, { onClick: this.handleClick, href: href, ref: innerRef }));\n  };\n\n  return Link;\n}(React.Component);\n\nLink.propTypes = {\n  onClick: PropTypes.func,\n  target: PropTypes.string,\n  replace: PropTypes.bool,\n  to: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,\n  innerRef: PropTypes.oneOfType([PropTypes.string, PropTypes.func])\n};\nLink.defaultProps = {\n  replace: false\n};\nLink.contextTypes = {\n  router: PropTypes.shape({\n    history: PropTypes.shape({\n      push: PropTypes.func.isRequired,\n      replace: PropTypes.func.isRequired,\n      createHref: PropTypes.func.isRequired\n    }).isRequired\n  }).isRequired\n};\n\n\nexport default Link;","// Written in this round about way for babel-transform-imports\nimport MemoryRouter from 'react-router/es/MemoryRouter';\n\nexport default MemoryRouter;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Route from './Route';\nimport Link from './Link';\n\n/**\n * A <Link> wrapper that knows if it's \"active\" or not.\n */\nvar NavLink = function NavLink(_ref) {\n  var to = _ref.to,\n      exact = _ref.exact,\n      strict = _ref.strict,\n      location = _ref.location,\n      activeClassName = _ref.activeClassName,\n      className = _ref.className,\n      activeStyle = _ref.activeStyle,\n      style = _ref.style,\n      getIsActive = _ref.isActive,\n      ariaCurrent = _ref.ariaCurrent,\n      rest = _objectWithoutProperties(_ref, ['to', 'exact', 'strict', 'location', 'activeClassName', 'className', 'activeStyle', 'style', 'isActive', 'ariaCurrent']);\n\n  return React.createElement(Route, {\n    path: (typeof to === 'undefined' ? 'undefined' : _typeof(to)) === 'object' ? to.pathname : to,\n    exact: exact,\n    strict: strict,\n    location: location,\n    children: function children(_ref2) {\n      var location = _ref2.location,\n          match = _ref2.match;\n\n      var isActive = !!(getIsActive ? getIsActive(match, location) : match);\n\n      return React.createElement(Link, _extends({\n        to: to,\n        className: isActive ? [className, activeClassName].filter(function (i) {\n          return i;\n        }).join(' ') : className,\n        style: isActive ? _extends({}, style, activeStyle) : style,\n        'aria-current': isActive && ariaCurrent\n      }, rest));\n    }\n  });\n};\n\nNavLink.propTypes = {\n  to: Link.propTypes.to,\n  exact: PropTypes.bool,\n  strict: PropTypes.bool,\n  location: PropTypes.object,\n  activeClassName: PropTypes.string,\n  className: PropTypes.string,\n  activeStyle: PropTypes.object,\n  style: PropTypes.object,\n  isActive: PropTypes.func,\n  ariaCurrent: PropTypes.oneOf(['page', 'step', 'location', 'true'])\n};\n\nNavLink.defaultProps = {\n  activeClassName: 'active',\n  ariaCurrent: 'true'\n};\n\nexport default NavLink;","// Written in this round about way for babel-transform-imports\nimport Prompt from 'react-router/es/Prompt';\n\nexport default Prompt;","// Written in this round about way for babel-transform-imports\nimport Redirect from 'react-router/es/Redirect';\n\nexport default Redirect;","// Written in this round about way for babel-transform-imports\nimport Route from 'react-router/es/Route';\n\nexport default Route;","// Written in this round about way for babel-transform-imports\nimport Router from 'react-router/es/Router';\n\nexport default Router;","// Written in this round about way for babel-transform-imports\nimport StaticRouter from 'react-router/es/StaticRouter';\n\nexport default StaticRouter;","// Written in this round about way for babel-transform-imports\nimport Switch from 'react-router/es/Switch';\n\nexport default Switch;","import _BrowserRouter from './BrowserRouter';\nexport { _BrowserRouter as BrowserRouter };\nimport _HashRouter from './HashRouter';\nexport { _HashRouter as HashRouter };\nimport _Link from './Link';\nexport { _Link as Link };\nimport _MemoryRouter from './MemoryRouter';\nexport { _MemoryRouter as MemoryRouter };\nimport _NavLink from './NavLink';\nexport { _NavLink as NavLink };\nimport _Prompt from './Prompt';\nexport { _Prompt as Prompt };\nimport _Redirect from './Redirect';\nexport { _Redirect as Redirect };\nimport _Route from './Route';\nexport { _Route as Route };\nimport _Router from './Router';\nexport { _Router as Router };\nimport _StaticRouter from './StaticRouter';\nexport { _StaticRouter as StaticRouter };\nimport _Switch from './Switch';\nexport { _Switch as Switch };\nimport _matchPath from './matchPath';\nexport { _matchPath as matchPath };\nimport _withRouter from './withRouter';\nexport { _withRouter as withRouter };","// Written in this round about way for babel-transform-imports\nimport matchPath from 'react-router/es/matchPath';\n\nexport default matchPath;","// Written in this round about way for babel-transform-imports\nimport withRouter from 'react-router/es/withRouter';\n\nexport default withRouter;","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n  return function () {\n    return arg;\n  };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n  return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n  return arg;\n};\n\nmodule.exports = emptyFunction;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n  validateFormat = function validateFormat(format) {\n    if (format === undefined) {\n      throw new Error('invariant requires an error message argument');\n    }\n  };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n  validateFormat(format);\n\n  if (!condition) {\n    var error;\n    if (format === undefined) {\n      error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n    } else {\n      var args = [a, b, c, d, e, f];\n      var argIndex = 0;\n      error = new Error(format.replace(/%s/g, function () {\n        return args[argIndex++];\n      }));\n      error.name = 'Invariant Violation';\n    }\n\n    error.framesToPop = 1; // we don't care about invariant's own frame\n    throw error;\n  }\n}\n\nmodule.exports = invariant;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar emptyFunction = require('./emptyFunction');\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = emptyFunction;\n\nif (process.env.NODE_ENV !== 'production') {\n  var printWarning = function printWarning(format) {\n    for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n      args[_key - 1] = arguments[_key];\n    }\n\n    var argIndex = 0;\n    var message = 'Warning: ' + format.replace(/%s/g, function () {\n      return args[argIndex++];\n    });\n    if (typeof console !== 'undefined') {\n      console.error(message);\n    }\n    try {\n      // --- Welcome to debugging React ---\n      // This error was thrown as a convenience so that you can use this stack\n      // to find the callsite that caused this warning to fire.\n      throw new Error(message);\n    } catch (x) {}\n  };\n\n  warning = function warning(condition, format) {\n    if (format === undefined) {\n      throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n    }\n\n    if (format.indexOf('Failed Composite propType: ') === 0) {\n      return; // Ignore CompositeComponent proptype check.\n    }\n\n    if (!condition) {\n      for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n        args[_key2 - 2] = arguments[_key2];\n      }\n\n      printWarning.apply(undefined, [format].concat(args));\n    }\n  };\n}\n\nmodule.exports = warning;","'use strict';\n\nexports.__esModule = true;\nvar canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nvar addEventListener = exports.addEventListener = function addEventListener(node, event, listener) {\n  return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener);\n};\n\nvar removeEventListener = exports.removeEventListener = function removeEventListener(node, event, listener) {\n  return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener);\n};\n\nvar getConfirmation = exports.getConfirmation = function getConfirmation(message, callback) {\n  return callback(window.confirm(message));\n}; // eslint-disable-line no-alert\n\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\nvar supportsHistory = exports.supportsHistory = function supportsHistory() {\n  var ua = window.navigator.userAgent;\n\n  if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n\n  return window.history && 'pushState' in window.history;\n};\n\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\nvar supportsPopStateOnHashChange = exports.supportsPopStateOnHashChange = function supportsPopStateOnHashChange() {\n  return window.navigator.userAgent.indexOf('Trident') === -1;\n};\n\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\nvar supportsGoWithoutReloadUsingHash = exports.supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() {\n  return window.navigator.userAgent.indexOf('Firefox') === -1;\n};\n\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\nvar isExtraneousPopstateEvent = exports.isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) {\n  return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n};","'use strict';\n\nexports.__esModule = true;\nexports.locationsAreEqual = exports.createLocation = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _resolvePathname = require('resolve-pathname');\n\nvar _resolvePathname2 = _interopRequireDefault(_resolvePathname);\n\nvar _valueEqual = require('value-equal');\n\nvar _valueEqual2 = _interopRequireDefault(_valueEqual);\n\nvar _PathUtils = require('./PathUtils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar createLocation = exports.createLocation = function createLocation(path, state, key, currentLocation) {\n  var location = void 0;\n  if (typeof path === 'string') {\n    // Two-arg form: push(path, state)\n    location = (0, _PathUtils.parsePath)(path);\n    location.state = state;\n  } else {\n    // One-arg form: push(location)\n    location = _extends({}, path);\n\n    if (location.pathname === undefined) location.pathname = '';\n\n    if (location.search) {\n      if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n    } else {\n      location.search = '';\n    }\n\n    if (location.hash) {\n      if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n    } else {\n      location.hash = '';\n    }\n\n    if (state !== undefined && location.state === undefined) location.state = state;\n  }\n\n  try {\n    location.pathname = decodeURI(location.pathname);\n  } catch (e) {\n    if (e instanceof URIError) {\n      throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n    } else {\n      throw e;\n    }\n  }\n\n  if (key) location.key = key;\n\n  if (currentLocation) {\n    // Resolve incomplete/relative pathname relative to current location.\n    if (!location.pathname) {\n      location.pathname = currentLocation.pathname;\n    } else if (location.pathname.charAt(0) !== '/') {\n      location.pathname = (0, _resolvePathname2.default)(location.pathname, currentLocation.pathname);\n    }\n  } else {\n    // When there is no prior location and pathname is empty, set it to /\n    if (!location.pathname) {\n      location.pathname = '/';\n    }\n  }\n\n  return location;\n};\n\nvar locationsAreEqual = exports.locationsAreEqual = function locationsAreEqual(a, b) {\n  return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && (0, _valueEqual2.default)(a.state, b.state);\n};","'use strict';\n\nexports.__esModule = true;\nvar addLeadingSlash = exports.addLeadingSlash = function addLeadingSlash(path) {\n  return path.charAt(0) === '/' ? path : '/' + path;\n};\n\nvar stripLeadingSlash = exports.stripLeadingSlash = function stripLeadingSlash(path) {\n  return path.charAt(0) === '/' ? path.substr(1) : path;\n};\n\nvar hasBasename = exports.hasBasename = function hasBasename(path, prefix) {\n  return new RegExp('^' + prefix + '(\\\\/|\\\\?|#|$)', 'i').test(path);\n};\n\nvar stripBasename = exports.stripBasename = function stripBasename(path, prefix) {\n  return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n};\n\nvar stripTrailingSlash = exports.stripTrailingSlash = function stripTrailingSlash(path) {\n  return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n};\n\nvar parsePath = exports.parsePath = function parsePath(path) {\n  var pathname = path || '/';\n  var search = '';\n  var hash = '';\n\n  var hashIndex = pathname.indexOf('#');\n  if (hashIndex !== -1) {\n    hash = pathname.substr(hashIndex);\n    pathname = pathname.substr(0, hashIndex);\n  }\n\n  var searchIndex = pathname.indexOf('?');\n  if (searchIndex !== -1) {\n    search = pathname.substr(searchIndex);\n    pathname = pathname.substr(0, searchIndex);\n  }\n\n  return {\n    pathname: pathname,\n    search: search === '?' ? '' : search,\n    hash: hash === '#' ? '' : hash\n  };\n};\n\nvar createPath = exports.createPath = function createPath(location) {\n  var pathname = location.pathname,\n      search = location.search,\n      hash = location.hash;\n\n\n  var path = pathname || '/';\n\n  if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search;\n\n  if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash;\n\n  return path;\n};","'use strict';\n\nexports.__esModule = true;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _LocationUtils = require('./LocationUtils');\n\nvar _PathUtils = require('./PathUtils');\n\nvar _createTransitionManager = require('./createTransitionManager');\n\nvar _createTransitionManager2 = _interopRequireDefault(_createTransitionManager);\n\nvar _DOMUtils = require('./DOMUtils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nvar getHistoryState = function getHistoryState() {\n  try {\n    return window.history.state || {};\n  } catch (e) {\n    // IE 11 sometimes throws when accessing window.history.state\n    // See https://github.com/ReactTraining/history/pull/289\n    return {};\n  }\n};\n\n/**\n * Creates a history object that uses the HTML5 history API including\n * pushState, replaceState, and the popstate event.\n */\nvar createBrowserHistory = function createBrowserHistory() {\n  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n  (0, _invariant2.default)(_DOMUtils.canUseDOM, 'Browser history needs a DOM');\n\n  var globalHistory = window.history;\n  var canUseHistory = (0, _DOMUtils.supportsHistory)();\n  var needsHashChangeListener = !(0, _DOMUtils.supportsPopStateOnHashChange)();\n\n  var _props$forceRefresh = props.forceRefresh,\n      forceRefresh = _props$forceRefresh === undefined ? false : _props$forceRefresh,\n      _props$getUserConfirm = props.getUserConfirmation,\n      getUserConfirmation = _props$getUserConfirm === undefined ? _DOMUtils.getConfirmation : _props$getUserConfirm,\n      _props$keyLength = props.keyLength,\n      keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;\n\n  var basename = props.basename ? (0, _PathUtils.stripTrailingSlash)((0, _PathUtils.addLeadingSlash)(props.basename)) : '';\n\n  var getDOMLocation = function getDOMLocation(historyState) {\n    var _ref = historyState || {},\n        key = _ref.key,\n        state = _ref.state;\n\n    var _window$location = window.location,\n        pathname = _window$location.pathname,\n        search = _window$location.search,\n        hash = _window$location.hash;\n\n\n    var path = pathname + search + hash;\n\n    (0, _warning2.default)(!basename || (0, _PathUtils.hasBasename)(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n    if (basename) path = (0, _PathUtils.stripBasename)(path, basename);\n\n    return (0, _LocationUtils.createLocation)(path, state, key);\n  };\n\n  var createKey = function createKey() {\n    return Math.random().toString(36).substr(2, keyLength);\n  };\n\n  var transitionManager = (0, _createTransitionManager2.default)();\n\n  var setState = function setState(nextState) {\n    _extends(history, nextState);\n\n    history.length = globalHistory.length;\n\n    transitionManager.notifyListeners(history.location, history.action);\n  };\n\n  var handlePopState = function handlePopState(event) {\n    // Ignore extraneous popstate events in WebKit.\n    if ((0, _DOMUtils.isExtraneousPopstateEvent)(event)) return;\n\n    handlePop(getDOMLocation(event.state));\n  };\n\n  var handleHashChange = function handleHashChange() {\n    handlePop(getDOMLocation(getHistoryState()));\n  };\n\n  var forceNextPop = false;\n\n  var handlePop = function handlePop(location) {\n    if (forceNextPop) {\n      forceNextPop = false;\n      setState();\n    } else {\n      var action = 'POP';\n\n      transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n        if (ok) {\n          setState({ action: action, location: location });\n        } else {\n          revertPop(location);\n        }\n      });\n    }\n  };\n\n  var revertPop = function revertPop(fromLocation) {\n    var toLocation = history.location;\n\n    // TODO: We could probably make this more reliable by\n    // keeping a list of keys we've seen in sessionStorage.\n    // Instead, we just default to 0 for keys we don't know.\n\n    var toIndex = allKeys.indexOf(toLocation.key);\n\n    if (toIndex === -1) toIndex = 0;\n\n    var fromIndex = allKeys.indexOf(fromLocation.key);\n\n    if (fromIndex === -1) fromIndex = 0;\n\n    var delta = toIndex - fromIndex;\n\n    if (delta) {\n      forceNextPop = true;\n      go(delta);\n    }\n  };\n\n  var initialLocation = getDOMLocation(getHistoryState());\n  var allKeys = [initialLocation.key];\n\n  // Public interface\n\n  var createHref = function createHref(location) {\n    return basename + (0, _PathUtils.createPath)(location);\n  };\n\n  var push = function push(path, state) {\n    (0, _warning2.default)(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n    var action = 'PUSH';\n    var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var href = createHref(location);\n      var key = location.key,\n          state = location.state;\n\n\n      if (canUseHistory) {\n        globalHistory.pushState({ key: key, state: state }, null, href);\n\n        if (forceRefresh) {\n          window.location.href = href;\n        } else {\n          var prevIndex = allKeys.indexOf(history.location.key);\n          var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n          nextKeys.push(location.key);\n          allKeys = nextKeys;\n\n          setState({ action: action, location: location });\n        }\n      } else {\n        (0, _warning2.default)(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history');\n\n        window.location.href = href;\n      }\n    });\n  };\n\n  var replace = function replace(path, state) {\n    (0, _warning2.default)(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n    var action = 'REPLACE';\n    var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var href = createHref(location);\n      var key = location.key,\n          state = location.state;\n\n\n      if (canUseHistory) {\n        globalHistory.replaceState({ key: key, state: state }, null, href);\n\n        if (forceRefresh) {\n          window.location.replace(href);\n        } else {\n          var prevIndex = allKeys.indexOf(history.location.key);\n\n          if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n\n          setState({ action: action, location: location });\n        }\n      } else {\n        (0, _warning2.default)(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history');\n\n        window.location.replace(href);\n      }\n    });\n  };\n\n  var go = function go(n) {\n    globalHistory.go(n);\n  };\n\n  var goBack = function goBack() {\n    return go(-1);\n  };\n\n  var goForward = function goForward() {\n    return go(1);\n  };\n\n  var listenerCount = 0;\n\n  var checkDOMListeners = function checkDOMListeners(delta) {\n    listenerCount += delta;\n\n    if (listenerCount === 1) {\n      (0, _DOMUtils.addEventListener)(window, PopStateEvent, handlePopState);\n\n      if (needsHashChangeListener) (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleHashChange);\n    } else if (listenerCount === 0) {\n      (0, _DOMUtils.removeEventListener)(window, PopStateEvent, handlePopState);\n\n      if (needsHashChangeListener) (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleHashChange);\n    }\n  };\n\n  var isBlocked = false;\n\n  var block = function block() {\n    var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n    var unblock = transitionManager.setPrompt(prompt);\n\n    if (!isBlocked) {\n      checkDOMListeners(1);\n      isBlocked = true;\n    }\n\n    return function () {\n      if (isBlocked) {\n        isBlocked = false;\n        checkDOMListeners(-1);\n      }\n\n      return unblock();\n    };\n  };\n\n  var listen = function listen(listener) {\n    var unlisten = transitionManager.appendListener(listener);\n    checkDOMListeners(1);\n\n    return function () {\n      checkDOMListeners(-1);\n      unlisten();\n    };\n  };\n\n  var history = {\n    length: globalHistory.length,\n    action: 'POP',\n    location: initialLocation,\n    createHref: createHref,\n    push: push,\n    replace: replace,\n    go: go,\n    goBack: goBack,\n    goForward: goForward,\n    block: block,\n    listen: listen\n  };\n\n  return history;\n};\n\nexports.default = createBrowserHistory;","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _LocationUtils = require('./LocationUtils');\n\nvar _PathUtils = require('./PathUtils');\n\nvar _createTransitionManager = require('./createTransitionManager');\n\nvar _createTransitionManager2 = _interopRequireDefault(_createTransitionManager);\n\nvar _DOMUtils = require('./DOMUtils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar HashChangeEvent = 'hashchange';\n\nvar HashPathCoders = {\n  hashbang: {\n    encodePath: function encodePath(path) {\n      return path.charAt(0) === '!' ? path : '!/' + (0, _PathUtils.stripLeadingSlash)(path);\n    },\n    decodePath: function decodePath(path) {\n      return path.charAt(0) === '!' ? path.substr(1) : path;\n    }\n  },\n  noslash: {\n    encodePath: _PathUtils.stripLeadingSlash,\n    decodePath: _PathUtils.addLeadingSlash\n  },\n  slash: {\n    encodePath: _PathUtils.addLeadingSlash,\n    decodePath: _PathUtils.addLeadingSlash\n  }\n};\n\nvar getHashPath = function getHashPath() {\n  // We can't use window.location.hash here because it's not\n  // consistent across browsers - Firefox will pre-decode it!\n  var href = window.location.href;\n  var hashIndex = href.indexOf('#');\n  return hashIndex === -1 ? '' : href.substring(hashIndex + 1);\n};\n\nvar pushHashPath = function pushHashPath(path) {\n  return window.location.hash = path;\n};\n\nvar replaceHashPath = function replaceHashPath(path) {\n  var hashIndex = window.location.href.indexOf('#');\n\n  window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path);\n};\n\nvar createHashHistory = function createHashHistory() {\n  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n  (0, _invariant2.default)(_DOMUtils.canUseDOM, 'Hash history needs a DOM');\n\n  var globalHistory = window.history;\n  var canGoWithoutReload = (0, _DOMUtils.supportsGoWithoutReloadUsingHash)();\n\n  var _props$getUserConfirm = props.getUserConfirmation,\n      getUserConfirmation = _props$getUserConfirm === undefined ? _DOMUtils.getConfirmation : _props$getUserConfirm,\n      _props$hashType = props.hashType,\n      hashType = _props$hashType === undefined ? 'slash' : _props$hashType;\n\n  var basename = props.basename ? (0, _PathUtils.stripTrailingSlash)((0, _PathUtils.addLeadingSlash)(props.basename)) : '';\n\n  var _HashPathCoders$hashT = HashPathCoders[hashType],\n      encodePath = _HashPathCoders$hashT.encodePath,\n      decodePath = _HashPathCoders$hashT.decodePath;\n\n\n  var getDOMLocation = function getDOMLocation() {\n    var path = decodePath(getHashPath());\n\n    (0, _warning2.default)(!basename || (0, _PathUtils.hasBasename)(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n    if (basename) path = (0, _PathUtils.stripBasename)(path, basename);\n\n    return (0, _LocationUtils.createLocation)(path);\n  };\n\n  var transitionManager = (0, _createTransitionManager2.default)();\n\n  var setState = function setState(nextState) {\n    _extends(history, nextState);\n\n    history.length = globalHistory.length;\n\n    transitionManager.notifyListeners(history.location, history.action);\n  };\n\n  var forceNextPop = false;\n  var ignorePath = null;\n\n  var handleHashChange = function handleHashChange() {\n    var path = getHashPath();\n    var encodedPath = encodePath(path);\n\n    if (path !== encodedPath) {\n      // Ensure we always have a properly-encoded hash.\n      replaceHashPath(encodedPath);\n    } else {\n      var location = getDOMLocation();\n      var prevLocation = history.location;\n\n      if (!forceNextPop && (0, _LocationUtils.locationsAreEqual)(prevLocation, location)) return; // A hashchange doesn't always == location change.\n\n      if (ignorePath === (0, _PathUtils.createPath)(location)) return; // Ignore this change; we already setState in push/replace.\n\n      ignorePath = null;\n\n      handlePop(location);\n    }\n  };\n\n  var handlePop = function handlePop(location) {\n    if (forceNextPop) {\n      forceNextPop = false;\n      setState();\n    } else {\n      var action = 'POP';\n\n      transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n        if (ok) {\n          setState({ action: action, location: location });\n        } else {\n          revertPop(location);\n        }\n      });\n    }\n  };\n\n  var revertPop = function revertPop(fromLocation) {\n    var toLocation = history.location;\n\n    // TODO: We could probably make this more reliable by\n    // keeping a list of paths we've seen in sessionStorage.\n    // Instead, we just default to 0 for paths we don't know.\n\n    var toIndex = allPaths.lastIndexOf((0, _PathUtils.createPath)(toLocation));\n\n    if (toIndex === -1) toIndex = 0;\n\n    var fromIndex = allPaths.lastIndexOf((0, _PathUtils.createPath)(fromLocation));\n\n    if (fromIndex === -1) fromIndex = 0;\n\n    var delta = toIndex - fromIndex;\n\n    if (delta) {\n      forceNextPop = true;\n      go(delta);\n    }\n  };\n\n  // Ensure the hash is encoded properly before doing anything else.\n  var path = getHashPath();\n  var encodedPath = encodePath(path);\n\n  if (path !== encodedPath) replaceHashPath(encodedPath);\n\n  var initialLocation = getDOMLocation();\n  var allPaths = [(0, _PathUtils.createPath)(initialLocation)];\n\n  // Public interface\n\n  var createHref = function createHref(location) {\n    return '#' + encodePath(basename + (0, _PathUtils.createPath)(location));\n  };\n\n  var push = function push(path, state) {\n    (0, _warning2.default)(state === undefined, 'Hash history cannot push state; it is ignored');\n\n    var action = 'PUSH';\n    var location = (0, _LocationUtils.createLocation)(path, undefined, undefined, history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var path = (0, _PathUtils.createPath)(location);\n      var encodedPath = encodePath(basename + path);\n      var hashChanged = getHashPath() !== encodedPath;\n\n      if (hashChanged) {\n        // We cannot tell if a hashchange was caused by a PUSH, so we'd\n        // rather setState here and ignore the hashchange. The caveat here\n        // is that other hash histories in the page will consider it a POP.\n        ignorePath = path;\n        pushHashPath(encodedPath);\n\n        var prevIndex = allPaths.lastIndexOf((0, _PathUtils.createPath)(history.location));\n        var nextPaths = allPaths.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n        nextPaths.push(path);\n        allPaths = nextPaths;\n\n        setState({ action: action, location: location });\n      } else {\n        (0, _warning2.default)(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack');\n\n        setState();\n      }\n    });\n  };\n\n  var replace = function replace(path, state) {\n    (0, _warning2.default)(state === undefined, 'Hash history cannot replace state; it is ignored');\n\n    var action = 'REPLACE';\n    var location = (0, _LocationUtils.createLocation)(path, undefined, undefined, history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var path = (0, _PathUtils.createPath)(location);\n      var encodedPath = encodePath(basename + path);\n      var hashChanged = getHashPath() !== encodedPath;\n\n      if (hashChanged) {\n        // We cannot tell if a hashchange was caused by a REPLACE, so we'd\n        // rather setState here and ignore the hashchange. The caveat here\n        // is that other hash histories in the page will consider it a POP.\n        ignorePath = path;\n        replaceHashPath(encodedPath);\n      }\n\n      var prevIndex = allPaths.indexOf((0, _PathUtils.createPath)(history.location));\n\n      if (prevIndex !== -1) allPaths[prevIndex] = path;\n\n      setState({ action: action, location: location });\n    });\n  };\n\n  var go = function go(n) {\n    (0, _warning2.default)(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser');\n\n    globalHistory.go(n);\n  };\n\n  var goBack = function goBack() {\n    return go(-1);\n  };\n\n  var goForward = function goForward() {\n    return go(1);\n  };\n\n  var listenerCount = 0;\n\n  var checkDOMListeners = function checkDOMListeners(delta) {\n    listenerCount += delta;\n\n    if (listenerCount === 1) {\n      (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleHashChange);\n    } else if (listenerCount === 0) {\n      (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleHashChange);\n    }\n  };\n\n  var isBlocked = false;\n\n  var block = function block() {\n    var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n    var unblock = transitionManager.setPrompt(prompt);\n\n    if (!isBlocked) {\n      checkDOMListeners(1);\n      isBlocked = true;\n    }\n\n    return function () {\n      if (isBlocked) {\n        isBlocked = false;\n        checkDOMListeners(-1);\n      }\n\n      return unblock();\n    };\n  };\n\n  var listen = function listen(listener) {\n    var unlisten = transitionManager.appendListener(listener);\n    checkDOMListeners(1);\n\n    return function () {\n      checkDOMListeners(-1);\n      unlisten();\n    };\n  };\n\n  var history = {\n    length: globalHistory.length,\n    action: 'POP',\n    location: initialLocation,\n    createHref: createHref,\n    push: push,\n    replace: replace,\n    go: go,\n    goBack: goBack,\n    goForward: goForward,\n    block: block,\n    listen: listen\n  };\n\n  return history;\n};\n\nexports.default = createHashHistory;","'use strict';\n\nexports.__esModule = true;\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar createTransitionManager = function createTransitionManager() {\n  var prompt = null;\n\n  var setPrompt = function setPrompt(nextPrompt) {\n    (0, _warning2.default)(prompt == null, 'A history supports only one prompt at a time');\n\n    prompt = nextPrompt;\n\n    return function () {\n      if (prompt === nextPrompt) prompt = null;\n    };\n  };\n\n  var confirmTransitionTo = function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n    // TODO: If another transition starts while we're still confirming\n    // the previous one, we may end up in a weird state. Figure out the\n    // best way to handle this.\n    if (prompt != null) {\n      var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n\n      if (typeof result === 'string') {\n        if (typeof getUserConfirmation === 'function') {\n          getUserConfirmation(result, callback);\n        } else {\n          (0, _warning2.default)(false, 'A history needs a getUserConfirmation function in order to use a prompt message');\n\n          callback(true);\n        }\n      } else {\n        // Return false from a transition hook to cancel the transition.\n        callback(result !== false);\n      }\n    } else {\n      callback(true);\n    }\n  };\n\n  var listeners = [];\n\n  var appendListener = function appendListener(fn) {\n    var isActive = true;\n\n    var listener = function listener() {\n      if (isActive) fn.apply(undefined, arguments);\n    };\n\n    listeners.push(listener);\n\n    return function () {\n      isActive = false;\n      listeners = listeners.filter(function (item) {\n        return item !== listener;\n      });\n    };\n  };\n\n  var notifyListeners = function notifyListeners() {\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    listeners.forEach(function (listener) {\n      return listener.apply(undefined, args);\n    });\n  };\n\n  return {\n    setPrompt: setPrompt,\n    confirmTransitionTo: confirmTransitionTo,\n    appendListener: appendListener,\n    notifyListeners: notifyListeners\n  };\n};\n\nexports.default = createTransitionManager;","export var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nexport var addEventListener = function addEventListener(node, event, listener) {\n  return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener);\n};\n\nexport var removeEventListener = function removeEventListener(node, event, listener) {\n  return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener);\n};\n\nexport var getConfirmation = function getConfirmation(message, callback) {\n  return callback(window.confirm(message));\n}; // eslint-disable-line no-alert\n\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\nexport var supportsHistory = function supportsHistory() {\n  var ua = window.navigator.userAgent;\n\n  if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n\n  return window.history && 'pushState' in window.history;\n};\n\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\nexport var supportsPopStateOnHashChange = function supportsPopStateOnHashChange() {\n  return window.navigator.userAgent.indexOf('Trident') === -1;\n};\n\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\nexport var supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() {\n  return window.navigator.userAgent.indexOf('Firefox') === -1;\n};\n\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\nexport var isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) {\n  return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n};","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport resolvePathname from 'resolve-pathname';\nimport valueEqual from 'value-equal';\nimport { parsePath } from './PathUtils';\n\nexport var createLocation = function createLocation(path, state, key, currentLocation) {\n  var location = void 0;\n  if (typeof path === 'string') {\n    // Two-arg form: push(path, state)\n    location = parsePath(path);\n    location.state = state;\n  } else {\n    // One-arg form: push(location)\n    location = _extends({}, path);\n\n    if (location.pathname === undefined) location.pathname = '';\n\n    if (location.search) {\n      if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n    } else {\n      location.search = '';\n    }\n\n    if (location.hash) {\n      if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n    } else {\n      location.hash = '';\n    }\n\n    if (state !== undefined && location.state === undefined) location.state = state;\n  }\n\n  try {\n    location.pathname = decodeURI(location.pathname);\n  } catch (e) {\n    if (e instanceof URIError) {\n      throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n    } else {\n      throw e;\n    }\n  }\n\n  if (key) location.key = key;\n\n  if (currentLocation) {\n    // Resolve incomplete/relative pathname relative to current location.\n    if (!location.pathname) {\n      location.pathname = currentLocation.pathname;\n    } else if (location.pathname.charAt(0) !== '/') {\n      location.pathname = resolvePathname(location.pathname, currentLocation.pathname);\n    }\n  } else {\n    // When there is no prior location and pathname is empty, set it to /\n    if (!location.pathname) {\n      location.pathname = '/';\n    }\n  }\n\n  return location;\n};\n\nexport var locationsAreEqual = function locationsAreEqual(a, b) {\n  return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && valueEqual(a.state, b.state);\n};","export var addLeadingSlash = function addLeadingSlash(path) {\n  return path.charAt(0) === '/' ? path : '/' + path;\n};\n\nexport var stripLeadingSlash = function stripLeadingSlash(path) {\n  return path.charAt(0) === '/' ? path.substr(1) : path;\n};\n\nexport var hasBasename = function hasBasename(path, prefix) {\n  return new RegExp('^' + prefix + '(\\\\/|\\\\?|#|$)', 'i').test(path);\n};\n\nexport var stripBasename = function stripBasename(path, prefix) {\n  return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n};\n\nexport var stripTrailingSlash = function stripTrailingSlash(path) {\n  return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n};\n\nexport var parsePath = function parsePath(path) {\n  var pathname = path || '/';\n  var search = '';\n  var hash = '';\n\n  var hashIndex = pathname.indexOf('#');\n  if (hashIndex !== -1) {\n    hash = pathname.substr(hashIndex);\n    pathname = pathname.substr(0, hashIndex);\n  }\n\n  var searchIndex = pathname.indexOf('?');\n  if (searchIndex !== -1) {\n    search = pathname.substr(searchIndex);\n    pathname = pathname.substr(0, searchIndex);\n  }\n\n  return {\n    pathname: pathname,\n    search: search === '?' ? '' : search,\n    hash: hash === '#' ? '' : hash\n  };\n};\n\nexport var createPath = function createPath(location) {\n  var pathname = location.pathname,\n      search = location.search,\n      hash = location.hash;\n\n\n  var path = pathname || '/';\n\n  if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search;\n\n  if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash;\n\n  return path;\n};","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport warning from 'warning';\nimport invariant from 'invariant';\nimport { createLocation } from './LocationUtils';\nimport { addLeadingSlash, stripTrailingSlash, hasBasename, stripBasename, createPath } from './PathUtils';\nimport createTransitionManager from './createTransitionManager';\nimport { canUseDOM, addEventListener, removeEventListener, getConfirmation, supportsHistory, supportsPopStateOnHashChange, isExtraneousPopstateEvent } from './DOMUtils';\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nvar getHistoryState = function getHistoryState() {\n  try {\n    return window.history.state || {};\n  } catch (e) {\n    // IE 11 sometimes throws when accessing window.history.state\n    // See https://github.com/ReactTraining/history/pull/289\n    return {};\n  }\n};\n\n/**\n * Creates a history object that uses the HTML5 history API including\n * pushState, replaceState, and the popstate event.\n */\nvar createBrowserHistory = function createBrowserHistory() {\n  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n  invariant(canUseDOM, 'Browser history needs a DOM');\n\n  var globalHistory = window.history;\n  var canUseHistory = supportsHistory();\n  var needsHashChangeListener = !supportsPopStateOnHashChange();\n\n  var _props$forceRefresh = props.forceRefresh,\n      forceRefresh = _props$forceRefresh === undefined ? false : _props$forceRefresh,\n      _props$getUserConfirm = props.getUserConfirmation,\n      getUserConfirmation = _props$getUserConfirm === undefined ? getConfirmation : _props$getUserConfirm,\n      _props$keyLength = props.keyLength,\n      keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;\n\n  var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n  var getDOMLocation = function getDOMLocation(historyState) {\n    var _ref = historyState || {},\n        key = _ref.key,\n        state = _ref.state;\n\n    var _window$location = window.location,\n        pathname = _window$location.pathname,\n        search = _window$location.search,\n        hash = _window$location.hash;\n\n\n    var path = pathname + search + hash;\n\n    warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n    if (basename) path = stripBasename(path, basename);\n\n    return createLocation(path, state, key);\n  };\n\n  var createKey = function createKey() {\n    return Math.random().toString(36).substr(2, keyLength);\n  };\n\n  var transitionManager = createTransitionManager();\n\n  var setState = function setState(nextState) {\n    _extends(history, nextState);\n\n    history.length = globalHistory.length;\n\n    transitionManager.notifyListeners(history.location, history.action);\n  };\n\n  var handlePopState = function handlePopState(event) {\n    // Ignore extraneous popstate events in WebKit.\n    if (isExtraneousPopstateEvent(event)) return;\n\n    handlePop(getDOMLocation(event.state));\n  };\n\n  var handleHashChange = function handleHashChange() {\n    handlePop(getDOMLocation(getHistoryState()));\n  };\n\n  var forceNextPop = false;\n\n  var handlePop = function handlePop(location) {\n    if (forceNextPop) {\n      forceNextPop = false;\n      setState();\n    } else {\n      var action = 'POP';\n\n      transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n        if (ok) {\n          setState({ action: action, location: location });\n        } else {\n          revertPop(location);\n        }\n      });\n    }\n  };\n\n  var revertPop = function revertPop(fromLocation) {\n    var toLocation = history.location;\n\n    // TODO: We could probably make this more reliable by\n    // keeping a list of keys we've seen in sessionStorage.\n    // Instead, we just default to 0 for keys we don't know.\n\n    var toIndex = allKeys.indexOf(toLocation.key);\n\n    if (toIndex === -1) toIndex = 0;\n\n    var fromIndex = allKeys.indexOf(fromLocation.key);\n\n    if (fromIndex === -1) fromIndex = 0;\n\n    var delta = toIndex - fromIndex;\n\n    if (delta) {\n      forceNextPop = true;\n      go(delta);\n    }\n  };\n\n  var initialLocation = getDOMLocation(getHistoryState());\n  var allKeys = [initialLocation.key];\n\n  // Public interface\n\n  var createHref = function createHref(location) {\n    return basename + createPath(location);\n  };\n\n  var push = function push(path, state) {\n    warning(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n    var action = 'PUSH';\n    var location = createLocation(path, state, createKey(), history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var href = createHref(location);\n      var key = location.key,\n          state = location.state;\n\n\n      if (canUseHistory) {\n        globalHistory.pushState({ key: key, state: state }, null, href);\n\n        if (forceRefresh) {\n          window.location.href = href;\n        } else {\n          var prevIndex = allKeys.indexOf(history.location.key);\n          var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n          nextKeys.push(location.key);\n          allKeys = nextKeys;\n\n          setState({ action: action, location: location });\n        }\n      } else {\n        warning(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history');\n\n        window.location.href = href;\n      }\n    });\n  };\n\n  var replace = function replace(path, state) {\n    warning(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n    var action = 'REPLACE';\n    var location = createLocation(path, state, createKey(), history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var href = createHref(location);\n      var key = location.key,\n          state = location.state;\n\n\n      if (canUseHistory) {\n        globalHistory.replaceState({ key: key, state: state }, null, href);\n\n        if (forceRefresh) {\n          window.location.replace(href);\n        } else {\n          var prevIndex = allKeys.indexOf(history.location.key);\n\n          if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n\n          setState({ action: action, location: location });\n        }\n      } else {\n        warning(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history');\n\n        window.location.replace(href);\n      }\n    });\n  };\n\n  var go = function go(n) {\n    globalHistory.go(n);\n  };\n\n  var goBack = function goBack() {\n    return go(-1);\n  };\n\n  var goForward = function goForward() {\n    return go(1);\n  };\n\n  var listenerCount = 0;\n\n  var checkDOMListeners = function checkDOMListeners(delta) {\n    listenerCount += delta;\n\n    if (listenerCount === 1) {\n      addEventListener(window, PopStateEvent, handlePopState);\n\n      if (needsHashChangeListener) addEventListener(window, HashChangeEvent, handleHashChange);\n    } else if (listenerCount === 0) {\n      removeEventListener(window, PopStateEvent, handlePopState);\n\n      if (needsHashChangeListener) removeEventListener(window, HashChangeEvent, handleHashChange);\n    }\n  };\n\n  var isBlocked = false;\n\n  var block = function block() {\n    var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n    var unblock = transitionManager.setPrompt(prompt);\n\n    if (!isBlocked) {\n      checkDOMListeners(1);\n      isBlocked = true;\n    }\n\n    return function () {\n      if (isBlocked) {\n        isBlocked = false;\n        checkDOMListeners(-1);\n      }\n\n      return unblock();\n    };\n  };\n\n  var listen = function listen(listener) {\n    var unlisten = transitionManager.appendListener(listener);\n    checkDOMListeners(1);\n\n    return function () {\n      checkDOMListeners(-1);\n      unlisten();\n    };\n  };\n\n  var history = {\n    length: globalHistory.length,\n    action: 'POP',\n    location: initialLocation,\n    createHref: createHref,\n    push: push,\n    replace: replace,\n    go: go,\n    goBack: goBack,\n    goForward: goForward,\n    block: block,\n    listen: listen\n  };\n\n  return history;\n};\n\nexport default createBrowserHistory;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport warning from 'warning';\nimport invariant from 'invariant';\nimport { createLocation, locationsAreEqual } from './LocationUtils';\nimport { addLeadingSlash, stripLeadingSlash, stripTrailingSlash, hasBasename, stripBasename, createPath } from './PathUtils';\nimport createTransitionManager from './createTransitionManager';\nimport { canUseDOM, addEventListener, removeEventListener, getConfirmation, supportsGoWithoutReloadUsingHash } from './DOMUtils';\n\nvar HashChangeEvent = 'hashchange';\n\nvar HashPathCoders = {\n  hashbang: {\n    encodePath: function encodePath(path) {\n      return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path);\n    },\n    decodePath: function decodePath(path) {\n      return path.charAt(0) === '!' ? path.substr(1) : path;\n    }\n  },\n  noslash: {\n    encodePath: stripLeadingSlash,\n    decodePath: addLeadingSlash\n  },\n  slash: {\n    encodePath: addLeadingSlash,\n    decodePath: addLeadingSlash\n  }\n};\n\nvar getHashPath = function getHashPath() {\n  // We can't use window.location.hash here because it's not\n  // consistent across browsers - Firefox will pre-decode it!\n  var href = window.location.href;\n  var hashIndex = href.indexOf('#');\n  return hashIndex === -1 ? '' : href.substring(hashIndex + 1);\n};\n\nvar pushHashPath = function pushHashPath(path) {\n  return window.location.hash = path;\n};\n\nvar replaceHashPath = function replaceHashPath(path) {\n  var hashIndex = window.location.href.indexOf('#');\n\n  window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path);\n};\n\nvar createHashHistory = function createHashHistory() {\n  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n  invariant(canUseDOM, 'Hash history needs a DOM');\n\n  var globalHistory = window.history;\n  var canGoWithoutReload = supportsGoWithoutReloadUsingHash();\n\n  var _props$getUserConfirm = props.getUserConfirmation,\n      getUserConfirmation = _props$getUserConfirm === undefined ? getConfirmation : _props$getUserConfirm,\n      _props$hashType = props.hashType,\n      hashType = _props$hashType === undefined ? 'slash' : _props$hashType;\n\n  var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n  var _HashPathCoders$hashT = HashPathCoders[hashType],\n      encodePath = _HashPathCoders$hashT.encodePath,\n      decodePath = _HashPathCoders$hashT.decodePath;\n\n\n  var getDOMLocation = function getDOMLocation() {\n    var path = decodePath(getHashPath());\n\n    warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n    if (basename) path = stripBasename(path, basename);\n\n    return createLocation(path);\n  };\n\n  var transitionManager = createTransitionManager();\n\n  var setState = function setState(nextState) {\n    _extends(history, nextState);\n\n    history.length = globalHistory.length;\n\n    transitionManager.notifyListeners(history.location, history.action);\n  };\n\n  var forceNextPop = false;\n  var ignorePath = null;\n\n  var handleHashChange = function handleHashChange() {\n    var path = getHashPath();\n    var encodedPath = encodePath(path);\n\n    if (path !== encodedPath) {\n      // Ensure we always have a properly-encoded hash.\n      replaceHashPath(encodedPath);\n    } else {\n      var location = getDOMLocation();\n      var prevLocation = history.location;\n\n      if (!forceNextPop && locationsAreEqual(prevLocation, location)) return; // A hashchange doesn't always == location change.\n\n      if (ignorePath === createPath(location)) return; // Ignore this change; we already setState in push/replace.\n\n      ignorePath = null;\n\n      handlePop(location);\n    }\n  };\n\n  var handlePop = function handlePop(location) {\n    if (forceNextPop) {\n      forceNextPop = false;\n      setState();\n    } else {\n      var action = 'POP';\n\n      transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n        if (ok) {\n          setState({ action: action, location: location });\n        } else {\n          revertPop(location);\n        }\n      });\n    }\n  };\n\n  var revertPop = function revertPop(fromLocation) {\n    var toLocation = history.location;\n\n    // TODO: We could probably make this more reliable by\n    // keeping a list of paths we've seen in sessionStorage.\n    // Instead, we just default to 0 for paths we don't know.\n\n    var toIndex = allPaths.lastIndexOf(createPath(toLocation));\n\n    if (toIndex === -1) toIndex = 0;\n\n    var fromIndex = allPaths.lastIndexOf(createPath(fromLocation));\n\n    if (fromIndex === -1) fromIndex = 0;\n\n    var delta = toIndex - fromIndex;\n\n    if (delta) {\n      forceNextPop = true;\n      go(delta);\n    }\n  };\n\n  // Ensure the hash is encoded properly before doing anything else.\n  var path = getHashPath();\n  var encodedPath = encodePath(path);\n\n  if (path !== encodedPath) replaceHashPath(encodedPath);\n\n  var initialLocation = getDOMLocation();\n  var allPaths = [createPath(initialLocation)];\n\n  // Public interface\n\n  var createHref = function createHref(location) {\n    return '#' + encodePath(basename + createPath(location));\n  };\n\n  var push = function push(path, state) {\n    warning(state === undefined, 'Hash history cannot push state; it is ignored');\n\n    var action = 'PUSH';\n    var location = createLocation(path, undefined, undefined, history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var path = createPath(location);\n      var encodedPath = encodePath(basename + path);\n      var hashChanged = getHashPath() !== encodedPath;\n\n      if (hashChanged) {\n        // We cannot tell if a hashchange was caused by a PUSH, so we'd\n        // rather setState here and ignore the hashchange. The caveat here\n        // is that other hash histories in the page will consider it a POP.\n        ignorePath = path;\n        pushHashPath(encodedPath);\n\n        var prevIndex = allPaths.lastIndexOf(createPath(history.location));\n        var nextPaths = allPaths.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n        nextPaths.push(path);\n        allPaths = nextPaths;\n\n        setState({ action: action, location: location });\n      } else {\n        warning(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack');\n\n        setState();\n      }\n    });\n  };\n\n  var replace = function replace(path, state) {\n    warning(state === undefined, 'Hash history cannot replace state; it is ignored');\n\n    var action = 'REPLACE';\n    var location = createLocation(path, undefined, undefined, history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var path = createPath(location);\n      var encodedPath = encodePath(basename + path);\n      var hashChanged = getHashPath() !== encodedPath;\n\n      if (hashChanged) {\n        // We cannot tell if a hashchange was caused by a REPLACE, so we'd\n        // rather setState here and ignore the hashchange. The caveat here\n        // is that other hash histories in the page will consider it a POP.\n        ignorePath = path;\n        replaceHashPath(encodedPath);\n      }\n\n      var prevIndex = allPaths.indexOf(createPath(history.location));\n\n      if (prevIndex !== -1) allPaths[prevIndex] = path;\n\n      setState({ action: action, location: location });\n    });\n  };\n\n  var go = function go(n) {\n    warning(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser');\n\n    globalHistory.go(n);\n  };\n\n  var goBack = function goBack() {\n    return go(-1);\n  };\n\n  var goForward = function goForward() {\n    return go(1);\n  };\n\n  var listenerCount = 0;\n\n  var checkDOMListeners = function checkDOMListeners(delta) {\n    listenerCount += delta;\n\n    if (listenerCount === 1) {\n      addEventListener(window, HashChangeEvent, handleHashChange);\n    } else if (listenerCount === 0) {\n      removeEventListener(window, HashChangeEvent, handleHashChange);\n    }\n  };\n\n  var isBlocked = false;\n\n  var block = function block() {\n    var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n    var unblock = transitionManager.setPrompt(prompt);\n\n    if (!isBlocked) {\n      checkDOMListeners(1);\n      isBlocked = true;\n    }\n\n    return function () {\n      if (isBlocked) {\n        isBlocked = false;\n        checkDOMListeners(-1);\n      }\n\n      return unblock();\n    };\n  };\n\n  var listen = function listen(listener) {\n    var unlisten = transitionManager.appendListener(listener);\n    checkDOMListeners(1);\n\n    return function () {\n      checkDOMListeners(-1);\n      unlisten();\n    };\n  };\n\n  var history = {\n    length: globalHistory.length,\n    action: 'POP',\n    location: initialLocation,\n    createHref: createHref,\n    push: push,\n    replace: replace,\n    go: go,\n    goBack: goBack,\n    goForward: goForward,\n    block: block,\n    listen: listen\n  };\n\n  return history;\n};\n\nexport default createHashHistory;","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport warning from 'warning';\nimport { createPath } from './PathUtils';\nimport { createLocation } from './LocationUtils';\nimport createTransitionManager from './createTransitionManager';\n\nvar clamp = function clamp(n, lowerBound, upperBound) {\n  return Math.min(Math.max(n, lowerBound), upperBound);\n};\n\n/**\n * Creates a history object that stores locations in memory.\n */\nvar createMemoryHistory = function createMemoryHistory() {\n  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  var getUserConfirmation = props.getUserConfirmation,\n      _props$initialEntries = props.initialEntries,\n      initialEntries = _props$initialEntries === undefined ? ['/'] : _props$initialEntries,\n      _props$initialIndex = props.initialIndex,\n      initialIndex = _props$initialIndex === undefined ? 0 : _props$initialIndex,\n      _props$keyLength = props.keyLength,\n      keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;\n\n\n  var transitionManager = createTransitionManager();\n\n  var setState = function setState(nextState) {\n    _extends(history, nextState);\n\n    history.length = history.entries.length;\n\n    transitionManager.notifyListeners(history.location, history.action);\n  };\n\n  var createKey = function createKey() {\n    return Math.random().toString(36).substr(2, keyLength);\n  };\n\n  var index = clamp(initialIndex, 0, initialEntries.length - 1);\n  var entries = initialEntries.map(function (entry) {\n    return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n  });\n\n  // Public interface\n\n  var createHref = createPath;\n\n  var push = function push(path, state) {\n    warning(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n    var action = 'PUSH';\n    var location = createLocation(path, state, createKey(), history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      var prevIndex = history.index;\n      var nextIndex = prevIndex + 1;\n\n      var nextEntries = history.entries.slice(0);\n      if (nextEntries.length > nextIndex) {\n        nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n      } else {\n        nextEntries.push(location);\n      }\n\n      setState({\n        action: action,\n        location: location,\n        index: nextIndex,\n        entries: nextEntries\n      });\n    });\n  };\n\n  var replace = function replace(path, state) {\n    warning(!((typeof path === 'undefined' ? 'undefined' : _typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n\n    var action = 'REPLACE';\n    var location = createLocation(path, state, createKey(), history.location);\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (!ok) return;\n\n      history.entries[history.index] = location;\n\n      setState({ action: action, location: location });\n    });\n  };\n\n  var go = function go(n) {\n    var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n\n    var action = 'POP';\n    var location = history.entries[nextIndex];\n\n    transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n      if (ok) {\n        setState({\n          action: action,\n          location: location,\n          index: nextIndex\n        });\n      } else {\n        // Mimic the behavior of DOM histories by\n        // causing a render after a cancelled POP.\n        setState();\n      }\n    });\n  };\n\n  var goBack = function goBack() {\n    return go(-1);\n  };\n\n  var goForward = function goForward() {\n    return go(1);\n  };\n\n  var canGo = function canGo(n) {\n    var nextIndex = history.index + n;\n    return nextIndex >= 0 && nextIndex < history.entries.length;\n  };\n\n  var block = function block() {\n    var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n    return transitionManager.setPrompt(prompt);\n  };\n\n  var listen = function listen(listener) {\n    return transitionManager.appendListener(listener);\n  };\n\n  var history = {\n    length: entries.length,\n    action: 'POP',\n    location: entries[index],\n    index: index,\n    entries: entries,\n    createHref: createHref,\n    push: push,\n    replace: replace,\n    go: go,\n    goBack: goBack,\n    goForward: goForward,\n    canGo: canGo,\n    block: block,\n    listen: listen\n  };\n\n  return history;\n};\n\nexport default createMemoryHistory;","import warning from 'warning';\n\nvar createTransitionManager = function createTransitionManager() {\n  var prompt = null;\n\n  var setPrompt = function setPrompt(nextPrompt) {\n    warning(prompt == null, 'A history supports only one prompt at a time');\n\n    prompt = nextPrompt;\n\n    return function () {\n      if (prompt === nextPrompt) prompt = null;\n    };\n  };\n\n  var confirmTransitionTo = function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n    // TODO: If another transition starts while we're still confirming\n    // the previous one, we may end up in a weird state. Figure out the\n    // best way to handle this.\n    if (prompt != null) {\n      var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n\n      if (typeof result === 'string') {\n        if (typeof getUserConfirmation === 'function') {\n          getUserConfirmation(result, callback);\n        } else {\n          warning(false, 'A history needs a getUserConfirmation function in order to use a prompt message');\n\n          callback(true);\n        }\n      } else {\n        // Return false from a transition hook to cancel the transition.\n        callback(result !== false);\n      }\n    } else {\n      callback(true);\n    }\n  };\n\n  var listeners = [];\n\n  var appendListener = function appendListener(fn) {\n    var isActive = true;\n\n    var listener = function listener() {\n      if (isActive) fn.apply(undefined, arguments);\n    };\n\n    listeners.push(listener);\n\n    return function () {\n      isActive = false;\n      listeners = listeners.filter(function (item) {\n        return item !== listener;\n      });\n    };\n  };\n\n  var notifyListeners = function notifyListeners() {\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    listeners.forEach(function (listener) {\n      return listener.apply(undefined, args);\n    });\n  };\n\n  return {\n    setPrompt: setPrompt,\n    confirmTransitionTo: confirmTransitionTo,\n    appendListener: appendListener,\n    notifyListeners: notifyListeners\n  };\n};\n\nexport default createTransitionManager;","import _createBrowserHistory from './createBrowserHistory';\nexport { _createBrowserHistory as createBrowserHistory };\nimport _createHashHistory from './createHashHistory';\nexport { _createHashHistory as createHashHistory };\nimport _createMemoryHistory from './createMemoryHistory';\nexport { _createMemoryHistory as createMemoryHistory };\n\nexport { createLocation, locationsAreEqual } from './LocationUtils';\nexport { parsePath, createPath } from './PathUtils';","/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\n(function (global, factory) {\n    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n    typeof define === 'function' && define.amd ? define(factory) :\n    (global.hoistNonReactStatics = factory());\n}(this, (function () {\n    'use strict';\n    \n    var REACT_STATICS = {\n        childContextTypes: true,\n        contextTypes: true,\n        defaultProps: true,\n        displayName: true,\n        getDefaultProps: true,\n        getDerivedStateFromProps: true,\n        mixins: true,\n        propTypes: true,\n        type: true\n    };\n    \n    var KNOWN_STATICS = {\n        name: true,\n        length: true,\n        prototype: true,\n        caller: true,\n        callee: true,\n        arguments: true,\n        arity: true\n    };\n    \n    var defineProperty = Object.defineProperty;\n    var getOwnPropertyNames = Object.getOwnPropertyNames;\n    var getOwnPropertySymbols = Object.getOwnPropertySymbols;\n    var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n    var getPrototypeOf = Object.getPrototypeOf;\n    var objectPrototype = getPrototypeOf && getPrototypeOf(Object);\n    \n    return function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n        if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components\n            \n            if (objectPrototype) {\n                var inheritedComponent = getPrototypeOf(sourceComponent);\n                if (inheritedComponent && inheritedComponent !== objectPrototype) {\n                    hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n                }\n            }\n            \n            var keys = getOwnPropertyNames(sourceComponent);\n            \n            if (getOwnPropertySymbols) {\n                keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n            }\n            \n            for (var i = 0; i < keys.length; ++i) {\n                var key = keys[i];\n                if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {\n                    var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n                    try { // Avoid failures from read-only properties\n                        defineProperty(targetComponent, key, descriptor);\n                    } catch (e) {}\n                }\n            }\n            \n            return targetComponent;\n        }\n        \n        return targetComponent;\n    };\n})));\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n  if (process.env.NODE_ENV !== 'production') {\n    if (format === undefined) {\n      throw new Error('invariant requires an error message argument');\n    }\n  }\n\n  if (!condition) {\n    var error;\n    if (format === undefined) {\n      error = new Error(\n        'Minified exception occurred; use the non-minified dev environment ' +\n        'for the full error message and additional helpful warnings.'\n      );\n    } else {\n      var args = [a, b, c, d, e, f];\n      var argIndex = 0;\n      error = new Error(\n        format.replace(/%s/g, function() { return args[argIndex++]; })\n      );\n      error.name = 'Invariant Violation';\n    }\n\n    error.framesToPop = 1; // we don't care about invariant's own frame\n    throw error;\n  }\n};\n\nmodule.exports = invariant;\n","module.exports = Array.isArray || function (arr) {\n  return Object.prototype.toString.call(arr) == '[object Array]';\n};\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc');  // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","var isarray = require('isarray')\n\n/**\n * Expose `pathToRegexp`.\n */\nmodule.exports = pathToRegexp\nmodule.exports.parse = parse\nmodule.exports.compile = compile\nmodule.exports.tokensToFunction = tokensToFunction\nmodule.exports.tokensToRegExp = tokensToRegExp\n\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\nvar PATH_REGEXP = new RegExp([\n  // Match escaped characters that would otherwise appear in future matches.\n  // This allows the user to escape special characters that won't transform.\n  '(\\\\\\\\.)',\n  // Match Express-style parameters and un-named parameters with a prefix\n  // and optional suffixes. Matches appear as:\n  //\n  // \"/:test(\\\\d+)?\" => [\"/\", \"test\", \"\\d+\", undefined, \"?\", undefined]\n  // \"/route(\\\\d+)\"  => [undefined, undefined, undefined, \"\\d+\", undefined, undefined]\n  // \"/*\"            => [\"/\", undefined, undefined, undefined, undefined, \"*\"]\n  '([\\\\/.])?(?:(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?|(\\\\*))'\n].join('|'), 'g')\n\n/**\n * Parse a string for the raw tokens.\n *\n * @param  {string}  str\n * @param  {Object=} options\n * @return {!Array}\n */\nfunction parse (str, options) {\n  var tokens = []\n  var key = 0\n  var index = 0\n  var path = ''\n  var defaultDelimiter = options && options.delimiter || '/'\n  var res\n\n  while ((res = PATH_REGEXP.exec(str)) != null) {\n    var m = res[0]\n    var escaped = res[1]\n    var offset = res.index\n    path += str.slice(index, offset)\n    index = offset + m.length\n\n    // Ignore already escaped sequences.\n    if (escaped) {\n      path += escaped[1]\n      continue\n    }\n\n    var next = str[index]\n    var prefix = res[2]\n    var name = res[3]\n    var capture = res[4]\n    var group = res[5]\n    var modifier = res[6]\n    var asterisk = res[7]\n\n    // Push the current path onto the tokens.\n    if (path) {\n      tokens.push(path)\n      path = ''\n    }\n\n    var partial = prefix != null && next != null && next !== prefix\n    var repeat = modifier === '+' || modifier === '*'\n    var optional = modifier === '?' || modifier === '*'\n    var delimiter = res[2] || defaultDelimiter\n    var pattern = capture || group\n\n    tokens.push({\n      name: name || key++,\n      prefix: prefix || '',\n      delimiter: delimiter,\n      optional: optional,\n      repeat: repeat,\n      partial: partial,\n      asterisk: !!asterisk,\n      pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')\n    })\n  }\n\n  // Match any characters still remaining.\n  if (index < str.length) {\n    path += str.substr(index)\n  }\n\n  // If the path exists, push it onto the end.\n  if (path) {\n    tokens.push(path)\n  }\n\n  return tokens\n}\n\n/**\n * Compile a string to a template function for the path.\n *\n * @param  {string}             str\n * @param  {Object=}            options\n * @return {!function(Object=, Object=)}\n */\nfunction compile (str, options) {\n  return tokensToFunction(parse(str, options))\n}\n\n/**\n * Prettier encoding of URI path segments.\n *\n * @param  {string}\n * @return {string}\n */\nfunction encodeURIComponentPretty (str) {\n  return encodeURI(str).replace(/[\\/?#]/g, function (c) {\n    return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n  })\n}\n\n/**\n * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.\n *\n * @param  {string}\n * @return {string}\n */\nfunction encodeAsterisk (str) {\n  return encodeURI(str).replace(/[?#]/g, function (c) {\n    return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n  })\n}\n\n/**\n * Expose a method for transforming tokens into the path function.\n */\nfunction tokensToFunction (tokens) {\n  // Compile all the tokens into regexps.\n  var matches = new Array(tokens.length)\n\n  // Compile all the patterns before compilation.\n  for (var i = 0; i < tokens.length; i++) {\n    if (typeof tokens[i] === 'object') {\n      matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n    }\n  }\n\n  return function (obj, opts) {\n    var path = ''\n    var data = obj || {}\n    var options = opts || {}\n    var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n    for (var i = 0; i < tokens.length; i++) {\n      var token = tokens[i]\n\n      if (typeof token === 'string') {\n        path += token\n\n        continue\n      }\n\n      var value = data[token.name]\n      var segment\n\n      if (value == null) {\n        if (token.optional) {\n          // Prepend partial segment prefixes.\n          if (token.partial) {\n            path += token.prefix\n          }\n\n          continue\n        } else {\n          throw new TypeError('Expected \"' + token.name + '\" to be defined')\n        }\n      }\n\n      if (isarray(value)) {\n        if (!token.repeat) {\n          throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n        }\n\n        if (value.length === 0) {\n          if (token.optional) {\n            continue\n          } else {\n            throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n          }\n        }\n\n        for (var j = 0; j < value.length; j++) {\n          segment = encode(value[j])\n\n          if (!matches[i].test(segment)) {\n            throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n          }\n\n          path += (j === 0 ? token.prefix : token.delimiter) + segment\n        }\n\n        continue\n      }\n\n      segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n      if (!matches[i].test(segment)) {\n        throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n      }\n\n      path += token.prefix + segment\n    }\n\n    return path\n  }\n}\n\n/**\n * Escape a regular expression string.\n *\n * @param  {string} str\n * @return {string}\n */\nfunction escapeString (str) {\n  return str.replace(/([.+*?=^!:${}()[\\]|\\/\\\\])/g, '\\\\$1')\n}\n\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param  {string} group\n * @return {string}\n */\nfunction escapeGroup (group) {\n  return group.replace(/([=!:$\\/()])/g, '\\\\$1')\n}\n\n/**\n * Attach the keys as a property of the regexp.\n *\n * @param  {!RegExp} re\n * @param  {Array}   keys\n * @return {!RegExp}\n */\nfunction attachKeys (re, keys) {\n  re.keys = keys\n  return re\n}\n\n/**\n * Get the flags for a regexp from the options.\n *\n * @param  {Object} options\n * @return {string}\n */\nfunction flags (options) {\n  return options.sensitive ? '' : 'i'\n}\n\n/**\n * Pull out keys from a regexp.\n *\n * @param  {!RegExp} path\n * @param  {!Array}  keys\n * @return {!RegExp}\n */\nfunction regexpToRegexp (path, keys) {\n  // Use a negative lookahead to match only capturing groups.\n  var groups = path.source.match(/\\((?!\\?)/g)\n\n  if (groups) {\n    for (var i = 0; i < groups.length; i++) {\n      keys.push({\n        name: i,\n        prefix: null,\n        delimiter: null,\n        optional: false,\n        repeat: false,\n        partial: false,\n        asterisk: false,\n        pattern: null\n      })\n    }\n  }\n\n  return attachKeys(path, keys)\n}\n\n/**\n * Transform an array into a regexp.\n *\n * @param  {!Array}  path\n * @param  {Array}   keys\n * @param  {!Object} options\n * @return {!RegExp}\n */\nfunction arrayToRegexp (path, keys, options) {\n  var parts = []\n\n  for (var i = 0; i < path.length; i++) {\n    parts.push(pathToRegexp(path[i], keys, options).source)\n  }\n\n  var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))\n\n  return attachKeys(regexp, keys)\n}\n\n/**\n * Create a path regexp from string input.\n *\n * @param  {string}  path\n * @param  {!Array}  keys\n * @param  {!Object} options\n * @return {!RegExp}\n */\nfunction stringToRegexp (path, keys, options) {\n  return tokensToRegExp(parse(path, options), keys, options)\n}\n\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param  {!Array}          tokens\n * @param  {(Array|Object)=} keys\n * @param  {Object=}         options\n * @return {!RegExp}\n */\nfunction tokensToRegExp (tokens, keys, options) {\n  if (!isarray(keys)) {\n    options = /** @type {!Object} */ (keys || options)\n    keys = []\n  }\n\n  options = options || {}\n\n  var strict = options.strict\n  var end = options.end !== false\n  var route = ''\n\n  // Iterate over the tokens and create our regexp string.\n  for (var i = 0; i < tokens.length; i++) {\n    var token = tokens[i]\n\n    if (typeof token === 'string') {\n      route += escapeString(token)\n    } else {\n      var prefix = escapeString(token.prefix)\n      var capture = '(?:' + token.pattern + ')'\n\n      keys.push(token)\n\n      if (token.repeat) {\n        capture += '(?:' + prefix + capture + ')*'\n      }\n\n      if (token.optional) {\n        if (!token.partial) {\n          capture = '(?:' + prefix + '(' + capture + '))?'\n        } else {\n          capture = prefix + '(' + capture + ')?'\n        }\n      } else {\n        capture = prefix + '(' + capture + ')'\n      }\n\n      route += capture\n    }\n  }\n\n  var delimiter = escapeString(options.delimiter || '/')\n  var endsWithDelimiter = route.slice(-delimiter.length) === delimiter\n\n  // In non-strict mode we allow a slash at the end of match. If the path to\n  // match already ends with a slash, we remove it for consistency. The slash\n  // is valid at the end of a path match, not in the middle. This is important\n  // in non-ending mode, where \"/test/\" shouldn't match \"/test//route\".\n  if (!strict) {\n    route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'\n  }\n\n  if (end) {\n    route += '$'\n  } else {\n    // In non-ending mode, we need the capturing groups to match as much as\n    // possible by using a positive lookahead to the end or next path segment.\n    route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'\n  }\n\n  return attachKeys(new RegExp('^' + route, flags(options)), keys)\n}\n\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param  {(string|RegExp|Array)} path\n * @param  {(Array|Object)=}       keys\n * @param  {Object=}               options\n * @return {!RegExp}\n */\nfunction pathToRegexp (path, keys, options) {\n  if (!isarray(keys)) {\n    options = /** @type {!Object} */ (keys || options)\n    keys = []\n  }\n\n  options = options || {}\n\n  if (path instanceof RegExp) {\n    return regexpToRegexp(path, /** @type {!Array} */ (keys))\n  }\n\n  if (isarray(path)) {\n    return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)\n  }\n\n  return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== 'production') {\n  var invariant = require('fbjs/lib/invariant');\n  var warning = require('fbjs/lib/warning');\n  var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n  var loggedTypeFailures = {};\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n  if (process.env.NODE_ENV !== 'production') {\n    for (var typeSpecName in typeSpecs) {\n      if (typeSpecs.hasOwnProperty(typeSpecName)) {\n        var error;\n        // Prop type validation may throw. In case they do, we don't want to\n        // fail the render phase where it didn't fail before. So we log it.\n        // After these have been cleaned up, we'll let them throw.\n        try {\n          // This is intentionally an invariant that gets caught. It's the same\n          // behavior as without this statement except with a better message.\n          invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);\n          error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n        } catch (ex) {\n          error = ex;\n        }\n        warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);\n        if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n          // Only monitor this failure once because there tends to be a lot of the\n          // same error.\n          loggedTypeFailures[error.message] = true;\n\n          var stack = getStack ? getStack() : '';\n\n          warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');\n        }\n      }\n    }\n  }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n  /* global Symbol */\n  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n  /**\n   * Returns the iterator method function contained on the iterable object.\n   *\n   * Be sure to invoke the function with the iterable as context:\n   *\n   *     var iteratorFn = getIteratorFn(myIterable);\n   *     if (iteratorFn) {\n   *       var iterator = iteratorFn.call(myIterable);\n   *       ...\n   *     }\n   *\n   * @param {?object} maybeIterable\n   * @return {?function}\n   */\n  function getIteratorFn(maybeIterable) {\n    var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n    if (typeof iteratorFn === 'function') {\n      return iteratorFn;\n    }\n  }\n\n  /**\n   * Collection of methods that allow declaration and validation of props that are\n   * supplied to React components. Example usage:\n   *\n   *   var Props = require('ReactPropTypes');\n   *   var MyArticle = React.createClass({\n   *     propTypes: {\n   *       // An optional string prop named \"description\".\n   *       description: Props.string,\n   *\n   *       // A required enum prop named \"category\".\n   *       category: Props.oneOf(['News','Photos']).isRequired,\n   *\n   *       // A prop named \"dialog\" that requires an instance of Dialog.\n   *       dialog: Props.instanceOf(Dialog).isRequired\n   *     },\n   *     render: function() { ... }\n   *   });\n   *\n   * A more formal specification of how these methods are used:\n   *\n   *   type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n   *   decl := ReactPropTypes.{type}(.isRequired)?\n   *\n   * Each and every declaration produces a function with the same signature. This\n   * allows the creation of custom validation functions. For example:\n   *\n   *  var MyLink = React.createClass({\n   *    propTypes: {\n   *      // An optional string or URI prop named \"href\".\n   *      href: function(props, propName, componentName) {\n   *        var propValue = props[propName];\n   *        if (propValue != null && typeof propValue !== 'string' &&\n   *            !(propValue instanceof URI)) {\n   *          return new Error(\n   *            'Expected a string or an URI for ' + propName + ' in ' +\n   *            componentName\n   *          );\n   *        }\n   *      }\n   *    },\n   *    render: function() {...}\n   *  });\n   *\n   * @internal\n   */\n\n  var ANONYMOUS = '<<anonymous>>';\n\n  // Important!\n  // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n  var ReactPropTypes = {\n    array: createPrimitiveTypeChecker('array'),\n    bool: createPrimitiveTypeChecker('boolean'),\n    func: createPrimitiveTypeChecker('function'),\n    number: createPrimitiveTypeChecker('number'),\n    object: createPrimitiveTypeChecker('object'),\n    string: createPrimitiveTypeChecker('string'),\n    symbol: createPrimitiveTypeChecker('symbol'),\n\n    any: createAnyTypeChecker(),\n    arrayOf: createArrayOfTypeChecker,\n    element: createElementTypeChecker(),\n    instanceOf: createInstanceTypeChecker,\n    node: createNodeChecker(),\n    objectOf: createObjectOfTypeChecker,\n    oneOf: createEnumTypeChecker,\n    oneOfType: createUnionTypeChecker,\n    shape: createShapeTypeChecker,\n    exact: createStrictShapeTypeChecker,\n  };\n\n  /**\n   * inlined Object.is polyfill to avoid requiring consumers ship their own\n   * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n   */\n  /*eslint-disable no-self-compare*/\n  function is(x, y) {\n    // SameValue algorithm\n    if (x === y) {\n      // Steps 1-5, 7-10\n      // Steps 6.b-6.e: +0 != -0\n      return x !== 0 || 1 / x === 1 / y;\n    } else {\n      // Step 6.a: NaN == NaN\n      return x !== x && y !== y;\n    }\n  }\n  /*eslint-enable no-self-compare*/\n\n  /**\n   * We use an Error-like object for backward compatibility as people may call\n   * PropTypes directly and inspect their output. However, we don't use real\n   * Errors anymore. We don't inspect their stack anyway, and creating them\n   * is prohibitively expensive if they are created too often, such as what\n   * happens in oneOfType() for any type before the one that matched.\n   */\n  function PropTypeError(message) {\n    this.message = message;\n    this.stack = '';\n  }\n  // Make `instanceof Error` still work for returned errors.\n  PropTypeError.prototype = Error.prototype;\n\n  function createChainableTypeChecker(validate) {\n    if (process.env.NODE_ENV !== 'production') {\n      var manualPropTypeCallCache = {};\n      var manualPropTypeWarningCount = 0;\n    }\n    function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n      componentName = componentName || ANONYMOUS;\n      propFullName = propFullName || propName;\n\n      if (secret !== ReactPropTypesSecret) {\n        if (throwOnDirectAccess) {\n          // New behavior only for users of `prop-types` package\n          invariant(\n            false,\n            'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n            'Use `PropTypes.checkPropTypes()` to call them. ' +\n            'Read more at http://fb.me/use-check-prop-types'\n          );\n        } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n          // Old behavior for people using React.PropTypes\n          var cacheKey = componentName + ':' + propName;\n          if (\n            !manualPropTypeCallCache[cacheKey] &&\n            // Avoid spamming the console because they are often not actionable except for lib authors\n            manualPropTypeWarningCount < 3\n          ) {\n            warning(\n              false,\n              'You are manually calling a React.PropTypes validation ' +\n              'function for the `%s` prop on `%s`. This is deprecated ' +\n              'and will throw in the standalone `prop-types` package. ' +\n              'You may be seeing this warning due to a third-party PropTypes ' +\n              'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',\n              propFullName,\n              componentName\n            );\n            manualPropTypeCallCache[cacheKey] = true;\n            manualPropTypeWarningCount++;\n          }\n        }\n      }\n      if (props[propName] == null) {\n        if (isRequired) {\n          if (props[propName] === null) {\n            return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n          }\n          return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n        }\n        return null;\n      } else {\n        return validate(props, propName, componentName, location, propFullName);\n      }\n    }\n\n    var chainedCheckType = checkType.bind(null, false);\n    chainedCheckType.isRequired = checkType.bind(null, true);\n\n    return chainedCheckType;\n  }\n\n  function createPrimitiveTypeChecker(expectedType) {\n    function validate(props, propName, componentName, location, propFullName, secret) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== expectedType) {\n        // `propValue` being instance of, say, date/regexp, pass the 'object'\n        // check, but we can offer a more precise error message here rather than\n        // 'of type `object`'.\n        var preciseType = getPreciseType(propValue);\n\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createAnyTypeChecker() {\n    return createChainableTypeChecker(emptyFunction.thatReturnsNull);\n  }\n\n  function createArrayOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n      }\n      var propValue = props[propName];\n      if (!Array.isArray(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n      }\n      for (var i = 0; i < propValue.length; i++) {\n        var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n        if (error instanceof Error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createElementTypeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      if (!isValidElement(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createInstanceTypeChecker(expectedClass) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!(props[propName] instanceof expectedClass)) {\n        var expectedClassName = expectedClass.name || ANONYMOUS;\n        var actualClassName = getClassName(props[propName]);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createEnumTypeChecker(expectedValues) {\n    if (!Array.isArray(expectedValues)) {\n      process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;\n      return emptyFunction.thatReturnsNull;\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      for (var i = 0; i < expectedValues.length; i++) {\n        if (is(propValue, expectedValues[i])) {\n          return null;\n        }\n      }\n\n      var valuesString = JSON.stringify(expectedValues);\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createObjectOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n      }\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n      }\n      for (var key in propValue) {\n        if (propValue.hasOwnProperty(key)) {\n          var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n          if (error instanceof Error) {\n            return error;\n          }\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createUnionTypeChecker(arrayOfTypeCheckers) {\n    if (!Array.isArray(arrayOfTypeCheckers)) {\n      process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n      return emptyFunction.thatReturnsNull;\n    }\n\n    for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n      var checker = arrayOfTypeCheckers[i];\n      if (typeof checker !== 'function') {\n        warning(\n          false,\n          'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n          'received %s at index %s.',\n          getPostfixForTypeWarning(checker),\n          i\n        );\n        return emptyFunction.thatReturnsNull;\n      }\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n        var checker = arrayOfTypeCheckers[i];\n        if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n          return null;\n        }\n      }\n\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createNodeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!isNode(props[propName])) {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      for (var key in shapeTypes) {\n        var checker = shapeTypes[key];\n        if (!checker) {\n          continue;\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createStrictShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      // We need to check all keys in case some are required but missing from\n      // props.\n      var allKeys = assign({}, props[propName], shapeTypes);\n      for (var key in allKeys) {\n        var checker = shapeTypes[key];\n        if (!checker) {\n          return new PropTypeError(\n            'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n            '\\nBad object: ' + JSON.stringify(props[propName], null, '  ') +\n            '\\nValid keys: ' +  JSON.stringify(Object.keys(shapeTypes), null, '  ')\n          );\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n\n    return createChainableTypeChecker(validate);\n  }\n\n  function isNode(propValue) {\n    switch (typeof propValue) {\n      case 'number':\n      case 'string':\n      case 'undefined':\n        return true;\n      case 'boolean':\n        return !propValue;\n      case 'object':\n        if (Array.isArray(propValue)) {\n          return propValue.every(isNode);\n        }\n        if (propValue === null || isValidElement(propValue)) {\n          return true;\n        }\n\n        var iteratorFn = getIteratorFn(propValue);\n        if (iteratorFn) {\n          var iterator = iteratorFn.call(propValue);\n          var step;\n          if (iteratorFn !== propValue.entries) {\n            while (!(step = iterator.next()).done) {\n              if (!isNode(step.value)) {\n                return false;\n              }\n            }\n          } else {\n            // Iterator will provide entry [k,v] tuples rather than values.\n            while (!(step = iterator.next()).done) {\n              var entry = step.value;\n              if (entry) {\n                if (!isNode(entry[1])) {\n                  return false;\n                }\n              }\n            }\n          }\n        } else {\n          return false;\n        }\n\n        return true;\n      default:\n        return false;\n    }\n  }\n\n  function isSymbol(propType, propValue) {\n    // Native Symbol.\n    if (propType === 'symbol') {\n      return true;\n    }\n\n    // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n    if (propValue['@@toStringTag'] === 'Symbol') {\n      return true;\n    }\n\n    // Fallback for non-spec compliant Symbols which are polyfilled.\n    if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n      return true;\n    }\n\n    return false;\n  }\n\n  // Equivalent of `typeof` but with special handling for array and regexp.\n  function getPropType(propValue) {\n    var propType = typeof propValue;\n    if (Array.isArray(propValue)) {\n      return 'array';\n    }\n    if (propValue instanceof RegExp) {\n      // Old webkits (at least until Android 4.0) return 'function' rather than\n      // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n      // passes PropTypes.object.\n      return 'object';\n    }\n    if (isSymbol(propType, propValue)) {\n      return 'symbol';\n    }\n    return propType;\n  }\n\n  // This handles more types than `getPropType`. Only used for error messages.\n  // See `createPrimitiveTypeChecker`.\n  function getPreciseType(propValue) {\n    if (typeof propValue === 'undefined' || propValue === null) {\n      return '' + propValue;\n    }\n    var propType = getPropType(propValue);\n    if (propType === 'object') {\n      if (propValue instanceof Date) {\n        return 'date';\n      } else if (propValue instanceof RegExp) {\n        return 'regexp';\n      }\n    }\n    return propType;\n  }\n\n  // Returns a string that is postfixed to a warning about an invalid type.\n  // For example, \"undefined\" or \"of type array\"\n  function getPostfixForTypeWarning(value) {\n    var type = getPreciseType(value);\n    switch (type) {\n      case 'array':\n      case 'object':\n        return 'an ' + type;\n      case 'boolean':\n      case 'date':\n      case 'regexp':\n        return 'a ' + type;\n      default:\n        return type;\n    }\n  }\n\n  // Returns class name of the object, if any.\n  function getClassName(propValue) {\n    if (!propValue.constructor || !propValue.constructor.name) {\n      return ANONYMOUS;\n    }\n    return propValue.constructor.name;\n  }\n\n  ReactPropTypes.checkPropTypes = checkPropTypes;\n  ReactPropTypes.PropTypes = ReactPropTypes;\n\n  return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n  var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n    Symbol.for &&\n    Symbol.for('react.element')) ||\n    0xeac7;\n\n  var isValidElement = function(object) {\n    return typeof object === 'object' &&\n      object !== null &&\n      object.$$typeof === REACT_ELEMENT_TYPE;\n  };\n\n  // By explicitly using `prop-types` you are opting into new development behavior.\n  // http://fb.me/prop-types-in-prod\n  var throwOnDirectAccess = true;\n  module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n  // By explicitly using `prop-types` you are opting into new production behavior.\n  // http://fb.me/prop-types-in-prod\n  module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { createMemoryHistory as createHistory } from \"history\";\nimport Router from \"./Router\";\n\n/**\n * The public API for a <Router> that stores location in memory.\n */\n\nvar MemoryRouter = function (_React$Component) {\n  _inherits(MemoryRouter, _React$Component);\n\n  function MemoryRouter() {\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, MemoryRouter);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = createHistory(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  MemoryRouter.prototype.componentWillMount = function componentWillMount() {\n    warning(!this.props.history, \"<MemoryRouter> ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { MemoryRouter as Router }`.\");\n  };\n\n  MemoryRouter.prototype.render = function render() {\n    return React.createElement(Router, { history: this.history, children: this.props.children });\n  };\n\n  return MemoryRouter;\n}(React.Component);\n\nMemoryRouter.propTypes = {\n  initialEntries: PropTypes.array,\n  initialIndex: PropTypes.number,\n  getUserConfirmation: PropTypes.func,\n  keyLength: PropTypes.number,\n  children: PropTypes.node\n};\n\n\nexport default MemoryRouter;","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport invariant from \"invariant\";\n\n/**\n * The public API for prompting the user before navigating away\n * from a screen with a component.\n */\n\nvar Prompt = function (_React$Component) {\n  _inherits(Prompt, _React$Component);\n\n  function Prompt() {\n    _classCallCheck(this, Prompt);\n\n    return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n  }\n\n  Prompt.prototype.enable = function enable(message) {\n    if (this.unblock) this.unblock();\n\n    this.unblock = this.context.router.history.block(message);\n  };\n\n  Prompt.prototype.disable = function disable() {\n    if (this.unblock) {\n      this.unblock();\n      this.unblock = null;\n    }\n  };\n\n  Prompt.prototype.componentWillMount = function componentWillMount() {\n    invariant(this.context.router, \"You should not use <Prompt> outside a <Router>\");\n\n    if (this.props.when) this.enable(this.props.message);\n  };\n\n  Prompt.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n    if (nextProps.when) {\n      if (!this.props.when || this.props.message !== nextProps.message) this.enable(nextProps.message);\n    } else {\n      this.disable();\n    }\n  };\n\n  Prompt.prototype.componentWillUnmount = function componentWillUnmount() {\n    this.disable();\n  };\n\n  Prompt.prototype.render = function render() {\n    return null;\n  };\n\n  return Prompt;\n}(React.Component);\n\nPrompt.propTypes = {\n  when: PropTypes.bool,\n  message: PropTypes.oneOfType([PropTypes.func, PropTypes.string]).isRequired\n};\nPrompt.defaultProps = {\n  when: true\n};\nPrompt.contextTypes = {\n  router: PropTypes.shape({\n    history: PropTypes.shape({\n      block: PropTypes.func.isRequired\n    }).isRequired\n  }).isRequired\n};\n\n\nexport default Prompt;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport { createLocation, locationsAreEqual } from \"history\";\nimport generatePath from \"./generatePath\";\n\n/**\n * The public API for updating the location programmatically\n * with a component.\n */\n\nvar Redirect = function (_React$Component) {\n  _inherits(Redirect, _React$Component);\n\n  function Redirect() {\n    _classCallCheck(this, Redirect);\n\n    return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n  }\n\n  Redirect.prototype.isStatic = function isStatic() {\n    return this.context.router && this.context.router.staticContext;\n  };\n\n  Redirect.prototype.componentWillMount = function componentWillMount() {\n    invariant(this.context.router, \"You should not use <Redirect> outside a <Router>\");\n\n    if (this.isStatic()) this.perform();\n  };\n\n  Redirect.prototype.componentDidMount = function componentDidMount() {\n    if (!this.isStatic()) this.perform();\n  };\n\n  Redirect.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {\n    var prevTo = createLocation(prevProps.to);\n    var nextTo = createLocation(this.props.to);\n\n    if (locationsAreEqual(prevTo, nextTo)) {\n      warning(false, \"You tried to redirect to the same route you're currently on: \" + (\"\\\"\" + nextTo.pathname + nextTo.search + \"\\\"\"));\n      return;\n    }\n\n    this.perform();\n  };\n\n  Redirect.prototype.computeTo = function computeTo(_ref) {\n    var computedMatch = _ref.computedMatch,\n        to = _ref.to;\n\n    if (computedMatch) {\n      if (typeof to === \"string\") {\n        return generatePath(to, computedMatch.params);\n      } else {\n        return _extends({}, to, {\n          pathname: generatePath(to.pathname, computedMatch.params)\n        });\n      }\n    }\n\n    return to;\n  };\n\n  Redirect.prototype.perform = function perform() {\n    var history = this.context.router.history;\n    var push = this.props.push;\n\n    var to = this.computeTo(this.props);\n\n    if (push) {\n      history.push(to);\n    } else {\n      history.replace(to);\n    }\n  };\n\n  Redirect.prototype.render = function render() {\n    return null;\n  };\n\n  return Redirect;\n}(React.Component);\n\nRedirect.propTypes = {\n  computedMatch: PropTypes.object, // private, from <Switch>\n  push: PropTypes.bool,\n  from: PropTypes.string,\n  to: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired\n};\nRedirect.defaultProps = {\n  push: false\n};\nRedirect.contextTypes = {\n  router: PropTypes.shape({\n    history: PropTypes.shape({\n      push: PropTypes.func.isRequired,\n      replace: PropTypes.func.isRequired\n    }).isRequired,\n    staticContext: PropTypes.object\n  }).isRequired\n};\n\n\nexport default Redirect;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport matchPath from \"./matchPath\";\n\nvar isEmptyChildren = function isEmptyChildren(children) {\n  return React.Children.count(children) === 0;\n};\n\n/**\n * The public API for matching a single path and rendering.\n */\n\nvar Route = function (_React$Component) {\n  _inherits(Route, _React$Component);\n\n  function Route() {\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, Route);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n      match: _this.computeMatch(_this.props, _this.context.router)\n    }, _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  Route.prototype.getChildContext = function getChildContext() {\n    return {\n      router: _extends({}, this.context.router, {\n        route: {\n          location: this.props.location || this.context.router.route.location,\n          match: this.state.match\n        }\n      })\n    };\n  };\n\n  Route.prototype.computeMatch = function computeMatch(_ref, router) {\n    var computedMatch = _ref.computedMatch,\n        location = _ref.location,\n        path = _ref.path,\n        strict = _ref.strict,\n        exact = _ref.exact,\n        sensitive = _ref.sensitive;\n\n    if (computedMatch) return computedMatch; // <Switch> already computed the match for us\n\n    invariant(router, \"You should not use <Route> or withRouter() outside a <Router>\");\n\n    var route = router.route;\n\n    var pathname = (location || route.location).pathname;\n\n    return matchPath(pathname, { path: path, strict: strict, exact: exact, sensitive: sensitive }, route.match);\n  };\n\n  Route.prototype.componentWillMount = function componentWillMount() {\n    warning(!(this.props.component && this.props.render), \"You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored\");\n\n    warning(!(this.props.component && this.props.children && !isEmptyChildren(this.props.children)), \"You should not use <Route component> and <Route children> in the same route; <Route children> will be ignored\");\n\n    warning(!(this.props.render && this.props.children && !isEmptyChildren(this.props.children)), \"You should not use <Route render> and <Route children> in the same route; <Route children> will be ignored\");\n  };\n\n  Route.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps, nextContext) {\n    warning(!(nextProps.location && !this.props.location), '<Route> elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.');\n\n    warning(!(!nextProps.location && this.props.location), '<Route> elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.');\n\n    this.setState({\n      match: this.computeMatch(nextProps, nextContext.router)\n    });\n  };\n\n  Route.prototype.render = function render() {\n    var match = this.state.match;\n    var _props = this.props,\n        children = _props.children,\n        component = _props.component,\n        render = _props.render;\n    var _context$router = this.context.router,\n        history = _context$router.history,\n        route = _context$router.route,\n        staticContext = _context$router.staticContext;\n\n    var location = this.props.location || route.location;\n    var props = { match: match, location: location, history: history, staticContext: staticContext };\n\n    if (component) return match ? React.createElement(component, props) : null;\n\n    if (render) return match ? render(props) : null;\n\n    if (typeof children === \"function\") return children(props);\n\n    if (children && !isEmptyChildren(children)) return React.Children.only(children);\n\n    return null;\n  };\n\n  return Route;\n}(React.Component);\n\nRoute.propTypes = {\n  computedMatch: PropTypes.object, // private, from <Switch>\n  path: PropTypes.string,\n  exact: PropTypes.bool,\n  strict: PropTypes.bool,\n  sensitive: PropTypes.bool,\n  component: PropTypes.func,\n  render: PropTypes.func,\n  children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),\n  location: PropTypes.object\n};\nRoute.contextTypes = {\n  router: PropTypes.shape({\n    history: PropTypes.object.isRequired,\n    route: PropTypes.object.isRequired,\n    staticContext: PropTypes.object\n  })\n};\nRoute.childContextTypes = {\n  router: PropTypes.object.isRequired\n};\n\n\nexport default Route;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\n\n/**\n * The public API for putting history on context.\n */\n\nvar Router = function (_React$Component) {\n  _inherits(Router, _React$Component);\n\n  function Router() {\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, Router);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n      match: _this.computeMatch(_this.props.history.location.pathname)\n    }, _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  Router.prototype.getChildContext = function getChildContext() {\n    return {\n      router: _extends({}, this.context.router, {\n        history: this.props.history,\n        route: {\n          location: this.props.history.location,\n          match: this.state.match\n        }\n      })\n    };\n  };\n\n  Router.prototype.computeMatch = function computeMatch(pathname) {\n    return {\n      path: \"/\",\n      url: \"/\",\n      params: {},\n      isExact: pathname === \"/\"\n    };\n  };\n\n  Router.prototype.componentWillMount = function componentWillMount() {\n    var _this2 = this;\n\n    var _props = this.props,\n        children = _props.children,\n        history = _props.history;\n\n\n    invariant(children == null || React.Children.count(children) === 1, \"A <Router> may have only one child element\");\n\n    // Do this here so we can setState when a <Redirect> changes the\n    // location in componentWillMount. This happens e.g. when doing\n    // server rendering using a <StaticRouter>.\n    this.unlisten = history.listen(function () {\n      _this2.setState({\n        match: _this2.computeMatch(history.location.pathname)\n      });\n    });\n  };\n\n  Router.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n    warning(this.props.history === nextProps.history, \"You cannot change <Router history>\");\n  };\n\n  Router.prototype.componentWillUnmount = function componentWillUnmount() {\n    this.unlisten();\n  };\n\n  Router.prototype.render = function render() {\n    var children = this.props.children;\n\n    return children ? React.Children.only(children) : null;\n  };\n\n  return Router;\n}(React.Component);\n\nRouter.propTypes = {\n  history: PropTypes.object.isRequired,\n  children: PropTypes.node\n};\nRouter.contextTypes = {\n  router: PropTypes.object\n};\nRouter.childContextTypes = {\n  router: PropTypes.object.isRequired\n};\n\n\nexport default Router;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { createLocation, createPath } from \"history\";\nimport Router from \"./Router\";\n\nvar addLeadingSlash = function addLeadingSlash(path) {\n  return path.charAt(0) === \"/\" ? path : \"/\" + path;\n};\n\nvar addBasename = function addBasename(basename, location) {\n  if (!basename) return location;\n\n  return _extends({}, location, {\n    pathname: addLeadingSlash(basename) + location.pathname\n  });\n};\n\nvar stripBasename = function stripBasename(basename, location) {\n  if (!basename) return location;\n\n  var base = addLeadingSlash(basename);\n\n  if (location.pathname.indexOf(base) !== 0) return location;\n\n  return _extends({}, location, {\n    pathname: location.pathname.substr(base.length)\n  });\n};\n\nvar createURL = function createURL(location) {\n  return typeof location === \"string\" ? location : createPath(location);\n};\n\nvar staticHandler = function staticHandler(methodName) {\n  return function () {\n    invariant(false, \"You cannot %s with <StaticRouter>\", methodName);\n  };\n};\n\nvar noop = function noop() {};\n\n/**\n * The public top-level API for a \"static\" <Router>, so-called because it\n * can't actually change the current location. Instead, it just records\n * location changes in a context object. Useful mainly in testing and\n * server-rendering scenarios.\n */\n\nvar StaticRouter = function (_React$Component) {\n  _inherits(StaticRouter, _React$Component);\n\n  function StaticRouter() {\n    var _temp, _this, _ret;\n\n    _classCallCheck(this, StaticRouter);\n\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.createHref = function (path) {\n      return addLeadingSlash(_this.props.basename + createURL(path));\n    }, _this.handlePush = function (location) {\n      var _this$props = _this.props,\n          basename = _this$props.basename,\n          context = _this$props.context;\n\n      context.action = \"PUSH\";\n      context.location = addBasename(basename, createLocation(location));\n      context.url = createURL(context.location);\n    }, _this.handleReplace = function (location) {\n      var _this$props2 = _this.props,\n          basename = _this$props2.basename,\n          context = _this$props2.context;\n\n      context.action = \"REPLACE\";\n      context.location = addBasename(basename, createLocation(location));\n      context.url = createURL(context.location);\n    }, _this.handleListen = function () {\n      return noop;\n    }, _this.handleBlock = function () {\n      return noop;\n    }, _temp), _possibleConstructorReturn(_this, _ret);\n  }\n\n  StaticRouter.prototype.getChildContext = function getChildContext() {\n    return {\n      router: {\n        staticContext: this.props.context\n      }\n    };\n  };\n\n  StaticRouter.prototype.componentWillMount = function componentWillMount() {\n    warning(!this.props.history, \"<StaticRouter> ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { StaticRouter as Router }`.\");\n  };\n\n  StaticRouter.prototype.render = function render() {\n    var _props = this.props,\n        basename = _props.basename,\n        context = _props.context,\n        location = _props.location,\n        props = _objectWithoutProperties(_props, [\"basename\", \"context\", \"location\"]);\n\n    var history = {\n      createHref: this.createHref,\n      action: \"POP\",\n      location: stripBasename(basename, createLocation(location)),\n      push: this.handlePush,\n      replace: this.handleReplace,\n      go: staticHandler(\"go\"),\n      goBack: staticHandler(\"goBack\"),\n      goForward: staticHandler(\"goForward\"),\n      listen: this.handleListen,\n      block: this.handleBlock\n    };\n\n    return React.createElement(Router, _extends({}, props, { history: history }));\n  };\n\n  return StaticRouter;\n}(React.Component);\n\nStaticRouter.propTypes = {\n  basename: PropTypes.string,\n  context: PropTypes.object.isRequired,\n  location: PropTypes.oneOfType([PropTypes.string, PropTypes.object])\n};\nStaticRouter.defaultProps = {\n  basename: \"\",\n  location: \"/\"\n};\nStaticRouter.childContextTypes = {\n  router: PropTypes.object.isRequired\n};\n\n\nexport default StaticRouter;","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport matchPath from \"./matchPath\";\n\n/**\n * The public API for rendering the first <Route> that matches.\n */\n\nvar Switch = function (_React$Component) {\n  _inherits(Switch, _React$Component);\n\n  function Switch() {\n    _classCallCheck(this, Switch);\n\n    return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n  }\n\n  Switch.prototype.componentWillMount = function componentWillMount() {\n    invariant(this.context.router, \"You should not use <Switch> outside a <Router>\");\n  };\n\n  Switch.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n    warning(!(nextProps.location && !this.props.location), '<Switch> elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.');\n\n    warning(!(!nextProps.location && this.props.location), '<Switch> elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.');\n  };\n\n  Switch.prototype.render = function render() {\n    var route = this.context.router.route;\n    var children = this.props.children;\n\n    var location = this.props.location || route.location;\n\n    var match = void 0,\n        child = void 0;\n    React.Children.forEach(children, function (element) {\n      if (match == null && React.isValidElement(element)) {\n        var _element$props = element.props,\n            pathProp = _element$props.path,\n            exact = _element$props.exact,\n            strict = _element$props.strict,\n            sensitive = _element$props.sensitive,\n            from = _element$props.from;\n\n        var path = pathProp || from;\n\n        child = element;\n        match = matchPath(location.pathname, { path: path, exact: exact, strict: strict, sensitive: sensitive }, route.match);\n      }\n    });\n\n    return match ? React.cloneElement(child, { location: location, computedMatch: match }) : null;\n  };\n\n  return Switch;\n}(React.Component);\n\nSwitch.contextTypes = {\n  router: PropTypes.shape({\n    route: PropTypes.object.isRequired\n  }).isRequired\n};\nSwitch.propTypes = {\n  children: PropTypes.node,\n  location: PropTypes.object\n};\n\n\nexport default Switch;","import pathToRegexp from \"path-to-regexp\";\n\nvar patternCache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\n\nvar compileGenerator = function compileGenerator(pattern) {\n  var cacheKey = pattern;\n  var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});\n\n  if (cache[pattern]) return cache[pattern];\n\n  var compiledGenerator = pathToRegexp.compile(pattern);\n\n  if (cacheCount < cacheLimit) {\n    cache[pattern] = compiledGenerator;\n    cacheCount++;\n  }\n\n  return compiledGenerator;\n};\n\n/**\n * Public API for generating a URL pathname from a pattern and parameters.\n */\nvar generatePath = function generatePath() {\n  var pattern = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n  var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n  if (pattern === \"/\") {\n    return pattern;\n  }\n  var generator = compileGenerator(pattern);\n  return generator(params, { pretty: true });\n};\n\nexport default generatePath;","import pathToRegexp from \"path-to-regexp\";\n\nvar patternCache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\n\nvar compilePath = function compilePath(pattern, options) {\n  var cacheKey = \"\" + options.end + options.strict + options.sensitive;\n  var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});\n\n  if (cache[pattern]) return cache[pattern];\n\n  var keys = [];\n  var re = pathToRegexp(pattern, keys, options);\n  var compiledPattern = { re: re, keys: keys };\n\n  if (cacheCount < cacheLimit) {\n    cache[pattern] = compiledPattern;\n    cacheCount++;\n  }\n\n  return compiledPattern;\n};\n\n/**\n * Public API for matching a URL pathname to a path pattern.\n */\nvar matchPath = function matchPath(pathname) {\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  var parent = arguments[2];\n\n  if (typeof options === \"string\") options = { path: options };\n\n  var _options = options,\n      path = _options.path,\n      _options$exact = _options.exact,\n      exact = _options$exact === undefined ? false : _options$exact,\n      _options$strict = _options.strict,\n      strict = _options$strict === undefined ? false : _options$strict,\n      _options$sensitive = _options.sensitive,\n      sensitive = _options$sensitive === undefined ? false : _options$sensitive;\n\n\n  if (path == null) return parent;\n\n  var _compilePath = compilePath(path, { end: exact, strict: strict, sensitive: sensitive }),\n      re = _compilePath.re,\n      keys = _compilePath.keys;\n\n  var match = re.exec(pathname);\n\n  if (!match) return null;\n\n  var url = match[0],\n      values = match.slice(1);\n\n  var isExact = pathname === url;\n\n  if (exact && !isExact) return null;\n\n  return {\n    path: path, // the path pattern used to match\n    url: path === \"/\" && url === \"\" ? \"/\" : url, // the matched portion of the URL\n    isExact: isExact, // whether or not we matched exactly\n    params: keys.reduce(function (memo, key, index) {\n      memo[key.name] = values[index];\n      return memo;\n    }, {})\n  };\n};\n\nexport default matchPath;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport hoistStatics from \"hoist-non-react-statics\";\nimport Route from \"./Route\";\n\n/**\n * A public higher-order component to access the imperative API\n */\nvar withRouter = function withRouter(Component) {\n  var C = function C(props) {\n    var wrappedComponentRef = props.wrappedComponentRef,\n        remainingProps = _objectWithoutProperties(props, [\"wrappedComponentRef\"]);\n\n    return React.createElement(Route, {\n      children: function children(routeComponentProps) {\n        return React.createElement(Component, _extends({}, remainingProps, routeComponentProps, {\n          ref: wrappedComponentRef\n        }));\n      }\n    });\n  };\n\n  C.displayName = \"withRouter(\" + (Component.displayName || Component.name) + \")\";\n  C.WrappedComponent = Component;\n  C.propTypes = {\n    wrappedComponentRef: PropTypes.func\n  };\n\n  return hoistStatics(C, Component);\n};\n\nexport default withRouter;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @providesModule warning\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n  var printWarning = function printWarning(format, args) {\n    var len = arguments.length;\n    args = new Array(len > 2 ? len - 2 : 0);\n    for (var key = 2; key < len; key++) {\n      args[key - 2] = arguments[key];\n    }\n    var argIndex = 0;\n    var message = 'Warning: ' +\n      format.replace(/%s/g, function() {\n        return args[argIndex++];\n      });\n    if (typeof console !== 'undefined') {\n      console.error(message);\n    }\n    try {\n      // --- Welcome to debugging React ---\n      // This error was thrown as a convenience so that you can use this stack\n      // to find the callsite that caused this warning to fire.\n      throw new Error(message);\n    } catch (x) {}\n  }\n\n  warning = function(condition, format, args) {\n    var len = arguments.length;\n    args = new Array(len > 2 ? len - 2 : 0);\n    for (var key = 2; key < len; key++) {\n      args[key - 2] = arguments[key];\n    }\n    if (format === undefined) {\n      throw new Error(\n          '`warning(condition, format, ...args)` requires a warning ' +\n          'message argument'\n      );\n    }\n    if (!condition) {\n      printWarning.apply(null, [format].concat(args));\n    }\n  };\n}\n\nmodule.exports = warning;\n","function isAbsolute(pathname) {\n  return pathname.charAt(0) === '/';\n}\n\n// About 1.5x faster than the two-arg version of Array#splice()\nfunction spliceOne(list, index) {\n  for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n    list[i] = list[k];\n  }\n\n  list.pop();\n}\n\n// This implementation is based heavily on node's url.parse\nfunction resolvePathname(to) {\n  var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n  var toParts = to && to.split('/') || [];\n  var fromParts = from && from.split('/') || [];\n\n  var isToAbs = to && isAbsolute(to);\n  var isFromAbs = from && isAbsolute(from);\n  var mustEndAbs = isToAbs || isFromAbs;\n\n  if (to && isAbsolute(to)) {\n    // to is absolute\n    fromParts = toParts;\n  } else if (toParts.length) {\n    // to is relative, drop the filename\n    fromParts.pop();\n    fromParts = fromParts.concat(toParts);\n  }\n\n  if (!fromParts.length) return '/';\n\n  var hasTrailingSlash = void 0;\n  if (fromParts.length) {\n    var last = fromParts[fromParts.length - 1];\n    hasTrailingSlash = last === '.' || last === '..' || last === '';\n  } else {\n    hasTrailingSlash = false;\n  }\n\n  var up = 0;\n  for (var i = fromParts.length; i >= 0; i--) {\n    var part = fromParts[i];\n\n    if (part === '.') {\n      spliceOne(fromParts, i);\n    } else if (part === '..') {\n      spliceOne(fromParts, i);\n      up++;\n    } else if (up) {\n      spliceOne(fromParts, i);\n      up--;\n    }\n  }\n\n  if (!mustEndAbs) for (; up--; up) {\n    fromParts.unshift('..');\n  }if (mustEndAbs && fromParts[0] !== '' && (!fromParts[0] || !isAbsolute(fromParts[0]))) fromParts.unshift('');\n\n  var result = fromParts.join('/');\n\n  if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n\n  return result;\n}\n\nexport default resolvePathname;","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction valueEqual(a, b) {\n  if (a === b) return true;\n\n  if (a == null || b == null) return false;\n\n  if (Array.isArray(a)) {\n    return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {\n      return valueEqual(item, b[index]);\n    });\n  }\n\n  var aType = typeof a === 'undefined' ? 'undefined' : _typeof(a);\n  var bType = typeof b === 'undefined' ? 'undefined' : _typeof(b);\n\n  if (aType !== bType) return false;\n\n  if (aType === 'object') {\n    var aValue = a.valueOf();\n    var bValue = b.valueOf();\n\n    if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);\n\n    var aKeys = Object.keys(a);\n    var bKeys = Object.keys(b);\n\n    if (aKeys.length !== bKeys.length) return false;\n\n    return aKeys.every(function (key) {\n      return valueEqual(a[key], b[key]);\n    });\n  }\n\n  return false;\n}\n\nexport default valueEqual;","/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n  warning = function(condition, format, args) {\n    var len = arguments.length;\n    args = new Array(len > 2 ? len - 2 : 0);\n    for (var key = 2; key < len; key++) {\n      args[key - 2] = arguments[key];\n    }\n    if (format === undefined) {\n      throw new Error(\n        '`warning(condition, format, ...args)` requires a warning ' +\n        'message argument'\n      );\n    }\n\n    if (format.length < 10 || (/^[s\\W]*$/).test(format)) {\n      throw new Error(\n        'The warning format should be able to uniquely identify this ' +\n        'warning. Please, use a more descriptive format than: ' + format\n      );\n    }\n\n    if (!condition) {\n      var argIndex = 0;\n      var message = 'Warning: ' +\n        format.replace(/%s/g, function() {\n          return args[argIndex++];\n        });\n      if (typeof console !== 'undefined') {\n        console.error(message);\n      }\n      try {\n        // This error was thrown as a convenience so that you can use this stack\n        // to find the callsite that caused this warning to fire.\n        throw new Error(message);\n      } catch(x) {}\n    }\n  };\n}\n\nmodule.exports = warning;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n/**\n * This action type will be dispatched by the history actions below.\n * If you're writing a middleware to watch for navigation events, be sure to\n * look for actions of this type.\n */\nvar CALL_HISTORY_METHOD = exports.CALL_HISTORY_METHOD = '@@router/CALL_HISTORY_METHOD';\n\nfunction updateLocation(method) {\n  return function () {\n    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    return {\n      type: CALL_HISTORY_METHOD,\n      payload: { method: method, args: args }\n    };\n  };\n}\n\n/**\n * These actions correspond to the history API.\n * The associated routerMiddleware will capture these events before they get to\n * your reducer and reissue them as the matching function on your history.\n */\nvar push = exports.push = updateLocation('push');\nvar replace = exports.replace = updateLocation('replace');\nvar go = exports.go = updateLocation('go');\nvar goBack = exports.goBack = updateLocation('goBack');\nvar goForward = exports.goForward = updateLocation('goForward');\n\nvar routerActions = exports.routerActions = { push: push, replace: replace, go: go, goBack: goBack, goForward: goForward };","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.routerMiddleware = exports.routerActions = exports.goForward = exports.goBack = exports.go = exports.replace = exports.push = exports.CALL_HISTORY_METHOD = exports.routerReducer = exports.LOCATION_CHANGE = exports.syncHistoryWithStore = undefined;\n\nvar _reducer = require('./reducer');\n\nObject.defineProperty(exports, 'LOCATION_CHANGE', {\n  enumerable: true,\n  get: function get() {\n    return _reducer.LOCATION_CHANGE;\n  }\n});\nObject.defineProperty(exports, 'routerReducer', {\n  enumerable: true,\n  get: function get() {\n    return _reducer.routerReducer;\n  }\n});\n\nvar _actions = require('./actions');\n\nObject.defineProperty(exports, 'CALL_HISTORY_METHOD', {\n  enumerable: true,\n  get: function get() {\n    return _actions.CALL_HISTORY_METHOD;\n  }\n});\nObject.defineProperty(exports, 'push', {\n  enumerable: true,\n  get: function get() {\n    return _actions.push;\n  }\n});\nObject.defineProperty(exports, 'replace', {\n  enumerable: true,\n  get: function get() {\n    return _actions.replace;\n  }\n});\nObject.defineProperty(exports, 'go', {\n  enumerable: true,\n  get: function get() {\n    return _actions.go;\n  }\n});\nObject.defineProperty(exports, 'goBack', {\n  enumerable: true,\n  get: function get() {\n    return _actions.goBack;\n  }\n});\nObject.defineProperty(exports, 'goForward', {\n  enumerable: true,\n  get: function get() {\n    return _actions.goForward;\n  }\n});\nObject.defineProperty(exports, 'routerActions', {\n  enumerable: true,\n  get: function get() {\n    return _actions.routerActions;\n  }\n});\n\nvar _sync = require('./sync');\n\nvar _sync2 = _interopRequireDefault(_sync);\n\nvar _middleware = require('./middleware');\n\nvar _middleware2 = _interopRequireDefault(_middleware);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nexports.syncHistoryWithStore = _sync2['default'];\nexports.routerMiddleware = _middleware2['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports['default'] = routerMiddleware;\n\nvar _actions = require('./actions');\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n/**\n * This middleware captures CALL_HISTORY_METHOD actions to redirect to the\n * provided history object. This will prevent these actions from reaching your\n * reducer or any middleware that comes after this one.\n */\nfunction routerMiddleware(history) {\n  return function () {\n    return function (next) {\n      return function (action) {\n        if (action.type !== _actions.CALL_HISTORY_METHOD) {\n          return next(action);\n        }\n\n        var _action$payload = action.payload,\n            method = _action$payload.method,\n            args = _action$payload.args;\n\n        history[method].apply(history, _toConsumableArray(args));\n      };\n    };\n  };\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nexports.routerReducer = routerReducer;\n/**\n * This action type will be dispatched when your history\n * receives a location change.\n */\nvar LOCATION_CHANGE = exports.LOCATION_CHANGE = '@@router/LOCATION_CHANGE';\n\nvar initialState = {\n  locationBeforeTransitions: null\n};\n\n/**\n * This reducer will update the state with the most recent location history\n * has transitioned to. This may not be in sync with the router, particularly\n * if you have asynchronously-loaded routes, so reading from and relying on\n * this state is discouraged.\n */\nfunction routerReducer() {\n  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n\n  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n      type = _ref.type,\n      payload = _ref.payload;\n\n  if (type === LOCATION_CHANGE) {\n    return _extends({}, state, { locationBeforeTransitions: payload });\n  }\n\n  return state;\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nexports['default'] = syncHistoryWithStore;\n\nvar _reducer = require('./reducer');\n\nvar defaultSelectLocationState = function defaultSelectLocationState(state) {\n  return state.routing;\n};\n\n/**\n * This function synchronizes your history state with the Redux store.\n * Location changes flow from history to the store. An enhanced history is\n * returned with a listen method that responds to store updates for location.\n *\n * When this history is provided to the router, this means the location data\n * will flow like this:\n * history.push -> store.dispatch -> enhancedHistory.listen -> router\n * This ensures that when the store state changes due to a replay or other\n * event, the router will be updated appropriately and can transition to the\n * correct router state.\n */\nfunction syncHistoryWithStore(history, store) {\n  var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n      _ref$selectLocationSt = _ref.selectLocationState,\n      selectLocationState = _ref$selectLocationSt === undefined ? defaultSelectLocationState : _ref$selectLocationSt,\n      _ref$adjustUrlOnRepla = _ref.adjustUrlOnReplay,\n      adjustUrlOnReplay = _ref$adjustUrlOnRepla === undefined ? true : _ref$adjustUrlOnRepla;\n\n  // Ensure that the reducer is mounted on the store and functioning properly.\n  if (typeof selectLocationState(store.getState()) === 'undefined') {\n    throw new Error('Expected the routing state to be available either as `state.routing` ' + 'or as the custom expression you can specify as `selectLocationState` ' + 'in the `syncHistoryWithStore()` options. ' + 'Ensure you have added the `routerReducer` to your store\\'s ' + 'reducers via `combineReducers` or whatever method you use to isolate ' + 'your reducers.');\n  }\n\n  var initialLocation = void 0;\n  var isTimeTraveling = void 0;\n  var unsubscribeFromStore = void 0;\n  var unsubscribeFromHistory = void 0;\n  var currentLocation = void 0;\n\n  // What does the store say about current location?\n  var getLocationInStore = function getLocationInStore(useInitialIfEmpty) {\n    var locationState = selectLocationState(store.getState());\n    return locationState.locationBeforeTransitions || (useInitialIfEmpty ? initialLocation : undefined);\n  };\n\n  // Init initialLocation with potential location in store\n  initialLocation = getLocationInStore();\n\n  // If the store is replayed, update the URL in the browser to match.\n  if (adjustUrlOnReplay) {\n    var handleStoreChange = function handleStoreChange() {\n      var locationInStore = getLocationInStore(true);\n      if (currentLocation === locationInStore || initialLocation === locationInStore) {\n        return;\n      }\n\n      // Update address bar to reflect store state\n      isTimeTraveling = true;\n      currentLocation = locationInStore;\n      history.transitionTo(_extends({}, locationInStore, {\n        action: 'PUSH'\n      }));\n      isTimeTraveling = false;\n    };\n\n    unsubscribeFromStore = store.subscribe(handleStoreChange);\n    handleStoreChange();\n  }\n\n  // Whenever location changes, dispatch an action to get it in the store\n  var handleLocationChange = function handleLocationChange(location) {\n    // ... unless we just caused that location change\n    if (isTimeTraveling) {\n      return;\n    }\n\n    // Remember where we are\n    currentLocation = location;\n\n    // Are we being called for the first time?\n    if (!initialLocation) {\n      // Remember as a fallback in case state is reset\n      initialLocation = location;\n\n      // Respect persisted location, if any\n      if (getLocationInStore()) {\n        return;\n      }\n    }\n\n    // Tell the store to update by dispatching an action\n    store.dispatch({\n      type: _reducer.LOCATION_CHANGE,\n      payload: location\n    });\n  };\n  unsubscribeFromHistory = history.listen(handleLocationChange);\n\n  // History 3.x doesn't call listen synchronously, so fire the initial location change ourselves\n  if (history.getCurrentLocation) {\n    handleLocationChange(history.getCurrentLocation());\n  }\n\n  // The enhanced history uses store as source of truth\n  return _extends({}, history, {\n    // The listeners are subscribed to the store instead of history\n    listen: function listen(listener) {\n      // Copy of last location.\n      var lastPublishedLocation = getLocationInStore(true);\n\n      // Keep track of whether we unsubscribed, as Redux store\n      // only applies changes in subscriptions on next dispatch\n      var unsubscribed = false;\n      var unsubscribeFromStore = store.subscribe(function () {\n        var currentLocation = getLocationInStore(true);\n        if (currentLocation === lastPublishedLocation) {\n          return;\n        }\n        lastPublishedLocation = currentLocation;\n        if (!unsubscribed) {\n          listener(lastPublishedLocation);\n        }\n      });\n\n      // History 2.x listeners expect a synchronous call. Make the first call to the\n      // listener after subscribing to the store, in case the listener causes a\n      // location change (e.g. when it redirects)\n      if (!history.getCurrentLocation) {\n        listener(lastPublishedLocation);\n      }\n\n      // Let user unsubscribe later\n      return function () {\n        unsubscribed = true;\n        unsubscribeFromStore();\n      };\n    },\n\n\n    // It also provides a way to destroy internal listeners\n    unsubscribe: function unsubscribe() {\n      if (adjustUrlOnReplay) {\n        unsubscribeFromStore();\n      }\n      unsubscribeFromHistory();\n    }\n  });\n}","'use strict';\n\nexports.__esModule = true;\nfunction createThunkMiddleware(extraArgument) {\n  return function (_ref) {\n    var dispatch = _ref.dispatch,\n        getState = _ref.getState;\n    return function (next) {\n      return function (action) {\n        if (typeof action === 'function') {\n          return action(dispatch, getState, extraArgument);\n        }\n\n        return next(action);\n      };\n    };\n  };\n}\n\nvar thunk = createThunkMiddleware();\nthunk.withExtraArgument = createThunkMiddleware;\n\nexports['default'] = thunk;","import $$observable from 'symbol-observable';\n\n/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\nvar ActionTypes = {\n  INIT: '@@redux/INIT' + Math.random().toString(36).substring(7).split('').join('.'),\n  REPLACE: '@@redux/REPLACE' + Math.random().toString(36).substring(7).split('').join('.')\n};\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n  return typeof obj;\n} : function (obj) {\n  return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\n/**\n * @param {any} obj The object to inspect.\n * @returns {boolean} True if the argument appears to be a plain object.\n */\nfunction isPlainObject(obj) {\n  if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || obj === null) return false;\n\n  var proto = obj;\n  while (Object.getPrototypeOf(proto) !== null) {\n    proto = Object.getPrototypeOf(proto);\n  }\n\n  return Object.getPrototypeOf(obj) === proto;\n}\n\n/**\n * Creates a Redux store that holds the state tree.\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} [enhancer] The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\nfunction createStore(reducer, preloadedState, enhancer) {\n  var _ref2;\n\n  if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {\n    enhancer = preloadedState;\n    preloadedState = undefined;\n  }\n\n  if (typeof enhancer !== 'undefined') {\n    if (typeof enhancer !== 'function') {\n      throw new Error('Expected the enhancer to be a function.');\n    }\n\n    return enhancer(createStore)(reducer, preloadedState);\n  }\n\n  if (typeof reducer !== 'function') {\n    throw new Error('Expected the reducer to be a function.');\n  }\n\n  var currentReducer = reducer;\n  var currentState = preloadedState;\n  var currentListeners = [];\n  var nextListeners = currentListeners;\n  var isDispatching = false;\n\n  function ensureCanMutateNextListeners() {\n    if (nextListeners === currentListeners) {\n      nextListeners = currentListeners.slice();\n    }\n  }\n\n  /**\n   * Reads the state tree managed by the store.\n   *\n   * @returns {any} The current state tree of your application.\n   */\n  function getState() {\n    if (isDispatching) {\n      throw new Error('You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.');\n    }\n\n    return currentState;\n  }\n\n  /**\n   * Adds a change listener. It will be called any time an action is dispatched,\n   * and some part of the state tree may potentially have changed. You may then\n   * call `getState()` to read the current state tree inside the callback.\n   *\n   * You may call `dispatch()` from a change listener, with the following\n   * caveats:\n   *\n   * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n   * If you subscribe or unsubscribe while the listeners are being invoked, this\n   * will not have any effect on the `dispatch()` that is currently in progress.\n   * However, the next `dispatch()` call, whether nested or not, will use a more\n   * recent snapshot of the subscription list.\n   *\n   * 2. The listener should not expect to see all state changes, as the state\n   * might have been updated multiple times during a nested `dispatch()` before\n   * the listener is called. It is, however, guaranteed that all subscribers\n   * registered before the `dispatch()` started will be called with the latest\n   * state by the time it exits.\n   *\n   * @param {Function} listener A callback to be invoked on every dispatch.\n   * @returns {Function} A function to remove this change listener.\n   */\n  function subscribe(listener) {\n    if (typeof listener !== 'function') {\n      throw new Error('Expected the listener to be a function.');\n    }\n\n    if (isDispatching) {\n      throw new Error('You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');\n    }\n\n    var isSubscribed = true;\n\n    ensureCanMutateNextListeners();\n    nextListeners.push(listener);\n\n    return function unsubscribe() {\n      if (!isSubscribed) {\n        return;\n      }\n\n      if (isDispatching) {\n        throw new Error('You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');\n      }\n\n      isSubscribed = false;\n\n      ensureCanMutateNextListeners();\n      var index = nextListeners.indexOf(listener);\n      nextListeners.splice(index, 1);\n    };\n  }\n\n  /**\n   * Dispatches an action. It is the only way to trigger a state change.\n   *\n   * The `reducer` function, used to create the store, will be called with the\n   * current state tree and the given `action`. Its return value will\n   * be considered the **next** state of the tree, and the change listeners\n   * will be notified.\n   *\n   * The base implementation only supports plain object actions. If you want to\n   * dispatch a Promise, an Observable, a thunk, or something else, you need to\n   * wrap your store creating function into the corresponding middleware. For\n   * example, see the documentation for the `redux-thunk` package. Even the\n   * middleware will eventually dispatch plain object actions using this method.\n   *\n   * @param {Object} action A plain object representing “what changed”. It is\n   * a good idea to keep actions serializable so you can record and replay user\n   * sessions, or use the time travelling `redux-devtools`. An action must have\n   * a `type` property which may not be `undefined`. It is a good idea to use\n   * string constants for action types.\n   *\n   * @returns {Object} For convenience, the same action object you dispatched.\n   *\n   * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n   * return something else (for example, a Promise you can await).\n   */\n  function dispatch(action) {\n    if (!isPlainObject(action)) {\n      throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');\n    }\n\n    if (typeof action.type === 'undefined') {\n      throw new Error('Actions may not have an undefined \"type\" property. ' + 'Have you misspelled a constant?');\n    }\n\n    if (isDispatching) {\n      throw new Error('Reducers may not dispatch actions.');\n    }\n\n    try {\n      isDispatching = true;\n      currentState = currentReducer(currentState, action);\n    } finally {\n      isDispatching = false;\n    }\n\n    var listeners = currentListeners = nextListeners;\n    for (var i = 0; i < listeners.length; i++) {\n      var listener = listeners[i];\n      listener();\n    }\n\n    return action;\n  }\n\n  /**\n   * Replaces the reducer currently used by the store to calculate the state.\n   *\n   * You might need this if your app implements code splitting and you want to\n   * load some of the reducers dynamically. You might also need this if you\n   * implement a hot reloading mechanism for Redux.\n   *\n   * @param {Function} nextReducer The reducer for the store to use instead.\n   * @returns {void}\n   */\n  function replaceReducer(nextReducer) {\n    if (typeof nextReducer !== 'function') {\n      throw new Error('Expected the nextReducer to be a function.');\n    }\n\n    currentReducer = nextReducer;\n    dispatch({ type: ActionTypes.REPLACE });\n  }\n\n  /**\n   * Interoperability point for observable/reactive libraries.\n   * @returns {observable} A minimal observable of state changes.\n   * For more information, see the observable proposal:\n   * https://github.com/tc39/proposal-observable\n   */\n  function observable() {\n    var _ref;\n\n    var outerSubscribe = subscribe;\n    return _ref = {\n      /**\n       * The minimal observable subscription method.\n       * @param {Object} observer Any object that can be used as an observer.\n       * The observer object should have a `next` method.\n       * @returns {subscription} An object with an `unsubscribe` method that can\n       * be used to unsubscribe the observable from the store, and prevent further\n       * emission of values from the observable.\n       */\n      subscribe: function subscribe(observer) {\n        if ((typeof observer === 'undefined' ? 'undefined' : _typeof(observer)) !== 'object' || observer === null) {\n          throw new TypeError('Expected the observer to be an object.');\n        }\n\n        function observeState() {\n          if (observer.next) {\n            observer.next(getState());\n          }\n        }\n\n        observeState();\n        var unsubscribe = outerSubscribe(observeState);\n        return { unsubscribe: unsubscribe };\n      }\n    }, _ref[$$observable] = function () {\n      return this;\n    }, _ref;\n  }\n\n  // When a store is created, an \"INIT\" action is dispatched so that every\n  // reducer returns their initial state. This effectively populates\n  // the initial state tree.\n  dispatch({ type: ActionTypes.INIT });\n\n  return _ref2 = {\n    dispatch: dispatch,\n    subscribe: subscribe,\n    getState: getState,\n    replaceReducer: replaceReducer\n  }, _ref2[$$observable] = observable, _ref2;\n}\n\n/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\nfunction warning(message) {\n  /* eslint-disable no-console */\n  if (typeof console !== 'undefined' && typeof console.error === 'function') {\n    console.error(message);\n  }\n  /* eslint-enable no-console */\n  try {\n    // This error was thrown as a convenience so that if you enable\n    // \"break on all exceptions\" in your console,\n    // it would pause the execution at this line.\n    throw new Error(message);\n  } catch (e) {} // eslint-disable-line no-empty\n}\n\nfunction getUndefinedStateErrorMessage(key, action) {\n  var actionType = action && action.type;\n  var actionDescription = actionType && 'action \"' + String(actionType) + '\"' || 'an action';\n\n  return 'Given ' + actionDescription + ', reducer \"' + key + '\" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state. ' + 'If you want this reducer to hold no value, you can return null instead of undefined.';\n}\n\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n  var reducerKeys = Object.keys(reducers);\n  var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';\n\n  if (reducerKeys.length === 0) {\n    return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';\n  }\n\n  if (!isPlainObject(inputState)) {\n    return 'The ' + argumentName + ' has unexpected type of \"' + {}.toString.call(inputState).match(/\\s([a-z|A-Z]+)/)[1] + '\". Expected argument to be an object with the following ' + ('keys: \"' + reducerKeys.join('\", \"') + '\"');\n  }\n\n  var unexpectedKeys = Object.keys(inputState).filter(function (key) {\n    return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];\n  });\n\n  unexpectedKeys.forEach(function (key) {\n    unexpectedKeyCache[key] = true;\n  });\n\n  if (action && action.type === ActionTypes.REPLACE) return;\n\n  if (unexpectedKeys.length > 0) {\n    return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('\"' + unexpectedKeys.join('\", \"') + '\" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('\"' + reducerKeys.join('\", \"') + '\". Unexpected keys will be ignored.');\n  }\n}\n\nfunction assertReducerShape(reducers) {\n  Object.keys(reducers).forEach(function (key) {\n    var reducer = reducers[key];\n    var initialState = reducer(undefined, { type: ActionTypes.INIT });\n\n    if (typeof initialState === 'undefined') {\n      throw new Error('Reducer \"' + key + '\" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined. If you don\\'t want to set a value for this reducer, ' + 'you can use null instead of undefined.');\n    }\n\n    var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');\n    if (typeof reducer(undefined, { type: type }) === 'undefined') {\n      throw new Error('Reducer \"' + key + '\" returned undefined when probed with a random type. ' + ('Don\\'t try to handle ' + ActionTypes.INIT + ' or other actions in \"redux/*\" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined, but can be null.');\n    }\n  });\n}\n\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\nfunction combineReducers(reducers) {\n  var reducerKeys = Object.keys(reducers);\n  var finalReducers = {};\n  for (var i = 0; i < reducerKeys.length; i++) {\n    var key = reducerKeys[i];\n\n    if (process.env.NODE_ENV !== 'production') {\n      if (typeof reducers[key] === 'undefined') {\n        warning('No reducer provided for key \"' + key + '\"');\n      }\n    }\n\n    if (typeof reducers[key] === 'function') {\n      finalReducers[key] = reducers[key];\n    }\n  }\n  var finalReducerKeys = Object.keys(finalReducers);\n\n  var unexpectedKeyCache = void 0;\n  if (process.env.NODE_ENV !== 'production') {\n    unexpectedKeyCache = {};\n  }\n\n  var shapeAssertionError = void 0;\n  try {\n    assertReducerShape(finalReducers);\n  } catch (e) {\n    shapeAssertionError = e;\n  }\n\n  return function combination() {\n    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    var action = arguments[1];\n\n    if (shapeAssertionError) {\n      throw shapeAssertionError;\n    }\n\n    if (process.env.NODE_ENV !== 'production') {\n      var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\n      if (warningMessage) {\n        warning(warningMessage);\n      }\n    }\n\n    var hasChanged = false;\n    var nextState = {};\n    for (var _i = 0; _i < finalReducerKeys.length; _i++) {\n      var _key = finalReducerKeys[_i];\n      var reducer = finalReducers[_key];\n      var previousStateForKey = state[_key];\n      var nextStateForKey = reducer(previousStateForKey, action);\n      if (typeof nextStateForKey === 'undefined') {\n        var errorMessage = getUndefinedStateErrorMessage(_key, action);\n        throw new Error(errorMessage);\n      }\n      nextState[_key] = nextStateForKey;\n      hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n    }\n    return hasChanged ? nextState : state;\n  };\n}\n\nfunction bindActionCreator(actionCreator, dispatch) {\n  return function () {\n    return dispatch(actionCreator.apply(this, arguments));\n  };\n}\n\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass a single function as the first argument,\n * and get a function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\nfunction bindActionCreators(actionCreators, dispatch) {\n  if (typeof actionCreators === 'function') {\n    return bindActionCreator(actionCreators, dispatch);\n  }\n\n  if ((typeof actionCreators === 'undefined' ? 'undefined' : _typeof(actionCreators)) !== 'object' || actionCreators === null) {\n    throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators === 'undefined' ? 'undefined' : _typeof(actionCreators)) + '. ' + 'Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?');\n  }\n\n  var keys = Object.keys(actionCreators);\n  var boundActionCreators = {};\n  for (var i = 0; i < keys.length; i++) {\n    var key = keys[i];\n    var actionCreator = actionCreators[key];\n    if (typeof actionCreator === 'function') {\n      boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n    }\n  }\n  return boundActionCreators;\n}\n\n/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\n\nfunction compose() {\n  for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {\n    funcs[_key] = arguments[_key];\n  }\n\n  if (funcs.length === 0) {\n    return function (arg) {\n      return arg;\n    };\n  }\n\n  if (funcs.length === 1) {\n    return funcs[0];\n  }\n\n  return funcs.reduce(function (a, b) {\n    return function () {\n      return a(b.apply(undefined, arguments));\n    };\n  });\n}\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\nfunction applyMiddleware() {\n  for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {\n    middlewares[_key] = arguments[_key];\n  }\n\n  return function (createStore) {\n    return function () {\n      for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n        args[_key2] = arguments[_key2];\n      }\n\n      var store = createStore.apply(undefined, args);\n      var _dispatch = function dispatch() {\n        throw new Error('Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');\n      };\n\n      var middlewareAPI = {\n        getState: store.getState,\n        dispatch: function dispatch() {\n          return _dispatch.apply(undefined, arguments);\n        }\n      };\n      var chain = middlewares.map(function (middleware) {\n        return middleware(middlewareAPI);\n      });\n      _dispatch = compose.apply(undefined, chain)(store.dispatch);\n\n      return _extends({}, store, {\n        dispatch: _dispatch\n      });\n    };\n  };\n}\n\n/*\n * This is a dummy function to check if the function name has been altered by minification.\n * If the function has been minified and NODE_ENV !== 'production', warn the user.\n */\nfunction isCrushed() {}\n\nif (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {\n  warning(\"You are currently using minified code outside of NODE_ENV === 'production'. \" + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.');\n}\n\nexport { createStore, combineReducers, bindActionCreators, applyMiddleware, compose, ActionTypes as __DO_NOT_USE__ActionTypes };\n","/* global window */\nimport ponyfill from './ponyfill.js';\n\nvar root;\n\nif (typeof self !== 'undefined') {\n  root = self;\n} else if (typeof window !== 'undefined') {\n  root = window;\n} else if (typeof global !== 'undefined') {\n  root = global;\n} else if (typeof module !== 'undefined') {\n  root = module;\n} else {\n  root = Function('return this')();\n}\n\nvar result = ponyfill(root);\nexport default result;\n","export default function symbolObservablePonyfill(root) {\n\tvar result;\n\tvar Symbol = root.Symbol;\n\n\tif (typeof Symbol === 'function') {\n\t\tif (Symbol.observable) {\n\t\t\tresult = Symbol.observable;\n\t\t} else {\n\t\t\tresult = Symbol('observable');\n\t\t\tSymbol.observable = result;\n\t\t}\n\t} else {\n\t\tresult = '@@observable';\n\t}\n\n\treturn result;\n};\n","function isAbsolute(pathname) {\n  return pathname.charAt(0) === '/';\n}\n\n// About 1.5x faster than the two-arg version of Array#splice()\nfunction spliceOne(list, index) {\n  for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n    list[i] = list[k];\n  }\n\n  list.pop();\n}\n\n// This implementation is based heavily on node's url.parse\nfunction resolvePathname(to) {\n  var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n  var toParts = to && to.split('/') || [];\n  var fromParts = from && from.split('/') || [];\n\n  var isToAbs = to && isAbsolute(to);\n  var isFromAbs = from && isAbsolute(from);\n  var mustEndAbs = isToAbs || isFromAbs;\n\n  if (to && isAbsolute(to)) {\n    // to is absolute\n    fromParts = toParts;\n  } else if (toParts.length) {\n    // to is relative, drop the filename\n    fromParts.pop();\n    fromParts = fromParts.concat(toParts);\n  }\n\n  if (!fromParts.length) return '/';\n\n  var hasTrailingSlash = void 0;\n  if (fromParts.length) {\n    var last = fromParts[fromParts.length - 1];\n    hasTrailingSlash = last === '.' || last === '..' || last === '';\n  } else {\n    hasTrailingSlash = false;\n  }\n\n  var up = 0;\n  for (var i = fromParts.length; i >= 0; i--) {\n    var part = fromParts[i];\n\n    if (part === '.') {\n      spliceOne(fromParts, i);\n    } else if (part === '..') {\n      spliceOne(fromParts, i);\n      up++;\n    } else if (up) {\n      spliceOne(fromParts, i);\n      up--;\n    }\n  }\n\n  if (!mustEndAbs) for (; up--; up) {\n    fromParts.unshift('..');\n  }if (mustEndAbs && fromParts[0] !== '' && (!fromParts[0] || !isAbsolute(fromParts[0]))) fromParts.unshift('');\n\n  var result = fromParts.join('/');\n\n  if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n\n  return result;\n}\n\nexport default resolvePathname;","module.exports = {\n  framer: require('./src/framer.js'),\n  windows: require('./src/windows.js')\n};\n","/*===========================================================================*\\\n * Framer for breaking a U-Law ByteBuffer or Array into windows of a particular\n * size at an arbitrary step.\n *\n * (c) Vail Systems. Joshua Jung and Ben Bryan. 2015\n\\*===========================================================================*/\nvar Framer = function (options) {\n  options = options || {};\n\n  this.frameIx = 0;\n  this.frameSize = options.frameSize || 64;\n  this.frameStep = options.frameStep|| this.frameSize;\n  this.map = options.map || undefined;\n  this.scale = options.scale || undefined;\n  this.offset = options.offset ? options.offset : 0;\n  this.sampleType = options.sampleType || 'UInt8';\n  this.wordSize = options.wordSize || 1;\n};\n\nFramer.prototype = {\n  /**\n   * Frames a buffer of single-byte char values or an array of Numbers into windows of the specified size.\n   */\n  frame: function(bufferOrArray, callback) {\n    var self = this,\n        ix = this.offset,\n        frame = [],\n        isArray = Object.prototype.toString.call( bufferOrArray) === '[object Array]';\n\n    self.frameIx = 0;\n\n    while (ix < bufferOrArray.length) {\n      var value = isArray ? bufferOrArray[ix] : bufferOrArray['read' + self.sampleType](ix); \n\n      frame.push(this.map ? this.map[value] : value);\n\n      if (frame.length == this.frameSize || ix+self.wordSize == bufferOrArray.length) finishFrame(frame);\n\n      ix += self.wordSize;\n    }\n\n    // Did we not process any frames at all for some reason?\n    if (this.frameIx == 0) callback(undefined);\n\n    function finishFrame(frame) {\n      if (this.scale) frame = frame.map(function (s, ix) {return s * self.scale[ix];});\n\n      callback(frame, self.frameIx);\n\n      if (ix != bufferOrArray.length - self.wordSize)\n      {\n          ix -= (self.frameSize - self.frameStep) * self.wordSize;\n\n          self.frameIx++;\n          frame.length = 0;\n      }\n    }\n  }\n};\n\nmodule.exports = Framer;\n","/*===========================================================================*\\\n * Method for producing the coefficients for windowing functions of an\n * arbitrary length.\n *\n * (c) Vail Systems. Joshua Jung and Ben Bryan. 2015\n\\*===========================================================================*/\nmodule.exports = {\n    construct: function (type, sampleCount, alpha)  {\n       var coef = [];\n       switch (type)\n       {\n           case 'ham': \n               for (var i = 0; i < sampleCount; i++) {\n                   coef[i] = 0.54 - 0.46 * Math.cos((2 * Math.PI * i)/(sampleCount - 1));\n               }\n           break;\n           case 'tukey':\n               var sm1 = sampleCount - 1,\n                   asm1 = alpha * sm1;\n               for (var i = 0; i < sampleCount; i++) {\n                   // Left tail\n                   if (i < asm1 / 2)\n                      coef[i] = 0.5 * (1 + Math.cos(Math.PI * ((2 * sampleCount)/(asm1) - 1))); \n                   // Right tail\n                   else if (i > (sm1 * (1 - alpha / 2)))\n                      coef[i] = 0.5 * (1 + Math.cos(Math.PI * ((2 * sampleCount)/(asm1) - (2 / alpha) + 1)));\n                   // Middle (rectangular)\n                   else coef[i] = 1;\n               }\n           break;\n           case 'rectangular':\n               for (var i = 0; i < sampleCount; i++)\n                   coef[i] = 1.0;\n           break;\n       }\n       return coef;\n    }\n};\n","/* global window, exports, define */\n\n!function() {\n    'use strict'\n\n    var re = {\n        not_string: /[^s]/,\n        not_bool: /[^t]/,\n        not_type: /[^T]/,\n        not_primitive: /[^v]/,\n        number: /[diefg]/,\n        numeric_arg: /[bcdiefguxX]/,\n        json: /[j]/,\n        not_json: /[^j]/,\n        text: /^[^\\x25]+/,\n        modulo: /^\\x25{2}/,\n        placeholder: /^\\x25(?:([1-9]\\d*)\\$|\\(([^\\)]+)\\))?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-gijostTuvxX])/,\n        key: /^([a-z_][a-z_\\d]*)/i,\n        key_access: /^\\.([a-z_][a-z_\\d]*)/i,\n        index_access: /^\\[(\\d+)\\]/,\n        sign: /^[\\+\\-]/\n    }\n\n    function sprintf(key) {\n        // `arguments` is not an array, but should be fine for this call\n        return sprintf_format(sprintf_parse(key), arguments)\n    }\n\n    function vsprintf(fmt, argv) {\n        return sprintf.apply(null, [fmt].concat(argv || []))\n    }\n\n    function sprintf_format(parse_tree, argv) {\n        var cursor = 1, tree_length = parse_tree.length, arg, output = '', i, k, match, pad, pad_character, pad_length, is_positive, sign\n        for (i = 0; i < tree_length; i++) {\n            if (typeof parse_tree[i] === 'string') {\n                output += parse_tree[i]\n            }\n            else if (Array.isArray(parse_tree[i])) {\n                match = parse_tree[i] // convenience purposes only\n                if (match[2]) { // keyword argument\n                    arg = argv[cursor]\n                    for (k = 0; k < match[2].length; k++) {\n                        if (!arg.hasOwnProperty(match[2][k])) {\n                            throw new Error(sprintf('[sprintf] property \"%s\" does not exist', match[2][k]))\n                        }\n                        arg = arg[match[2][k]]\n                    }\n                }\n                else if (match[1]) { // positional argument (explicit)\n                    arg = argv[match[1]]\n                }\n                else { // positional argument (implicit)\n                    arg = argv[cursor++]\n                }\n\n                if (re.not_type.test(match[8]) && re.not_primitive.test(match[8]) && arg instanceof Function) {\n                    arg = arg()\n                }\n\n                if (re.numeric_arg.test(match[8]) && (typeof arg !== 'number' && isNaN(arg))) {\n                    throw new TypeError(sprintf('[sprintf] expecting number but found %T', arg))\n                }\n\n                if (re.number.test(match[8])) {\n                    is_positive = arg >= 0\n                }\n\n                switch (match[8]) {\n                    case 'b':\n                        arg = parseInt(arg, 10).toString(2)\n                        break\n                    case 'c':\n                        arg = String.fromCharCode(parseInt(arg, 10))\n                        break\n                    case 'd':\n                    case 'i':\n                        arg = parseInt(arg, 10)\n                        break\n                    case 'j':\n                        arg = JSON.stringify(arg, null, match[6] ? parseInt(match[6]) : 0)\n                        break\n                    case 'e':\n                        arg = match[7] ? parseFloat(arg).toExponential(match[7]) : parseFloat(arg).toExponential()\n                        break\n                    case 'f':\n                        arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg)\n                        break\n                    case 'g':\n                        arg = match[7] ? String(Number(arg.toPrecision(match[7]))) : parseFloat(arg)\n                        break\n                    case 'o':\n                        arg = (parseInt(arg, 10) >>> 0).toString(8)\n                        break\n                    case 's':\n                        arg = String(arg)\n                        arg = (match[7] ? arg.substring(0, match[7]) : arg)\n                        break\n                    case 't':\n                        arg = String(!!arg)\n                        arg = (match[7] ? arg.substring(0, match[7]) : arg)\n                        break\n                    case 'T':\n                        arg = Object.prototype.toString.call(arg).slice(8, -1).toLowerCase()\n                        arg = (match[7] ? arg.substring(0, match[7]) : arg)\n                        break\n                    case 'u':\n                        arg = parseInt(arg, 10) >>> 0\n                        break\n                    case 'v':\n                        arg = arg.valueOf()\n                        arg = (match[7] ? arg.substring(0, match[7]) : arg)\n                        break\n                    case 'x':\n                        arg = (parseInt(arg, 10) >>> 0).toString(16)\n                        break\n                    case 'X':\n                        arg = (parseInt(arg, 10) >>> 0).toString(16).toUpperCase()\n                        break\n                }\n                if (re.json.test(match[8])) {\n                    output += arg\n                }\n                else {\n                    if (re.number.test(match[8]) && (!is_positive || match[3])) {\n                        sign = is_positive ? '+' : '-'\n                        arg = arg.toString().replace(re.sign, '')\n                    }\n                    else {\n                        sign = ''\n                    }\n                    pad_character = match[4] ? match[4] === '0' ? '0' : match[4].charAt(1) : ' '\n                    pad_length = match[6] - (sign + arg).length\n                    pad = match[6] ? (pad_length > 0 ? pad_character.repeat(pad_length) : '') : ''\n                    output += match[5] ? sign + arg + pad : (pad_character === '0' ? sign + pad + arg : pad + sign + arg)\n                }\n            }\n        }\n        return output\n    }\n\n    var sprintf_cache = Object.create(null)\n\n    function sprintf_parse(fmt) {\n        if (sprintf_cache[fmt]) {\n            return sprintf_cache[fmt]\n        }\n\n        var _fmt = fmt, match, parse_tree = [], arg_names = 0\n        while (_fmt) {\n            if ((match = re.text.exec(_fmt)) !== null) {\n                parse_tree.push(match[0])\n            }\n            else if ((match = re.modulo.exec(_fmt)) !== null) {\n                parse_tree.push('%')\n            }\n            else if ((match = re.placeholder.exec(_fmt)) !== null) {\n                if (match[2]) {\n                    arg_names |= 1\n                    var field_list = [], replacement_field = match[2], field_match = []\n                    if ((field_match = re.key.exec(replacement_field)) !== null) {\n                        field_list.push(field_match[1])\n                        while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {\n                            if ((field_match = re.key_access.exec(replacement_field)) !== null) {\n                                field_list.push(field_match[1])\n                            }\n                            else if ((field_match = re.index_access.exec(replacement_field)) !== null) {\n                                field_list.push(field_match[1])\n                            }\n                            else {\n                                throw new SyntaxError('[sprintf] failed to parse named argument key')\n                            }\n                        }\n                    }\n                    else {\n                        throw new SyntaxError('[sprintf] failed to parse named argument key')\n                    }\n                    match[2] = field_list\n                }\n                else {\n                    arg_names |= 2\n                }\n                if (arg_names === 3) {\n                    throw new Error('[sprintf] mixing positional and named placeholders is not (yet) supported')\n                }\n                parse_tree.push(match)\n            }\n            else {\n                throw new SyntaxError('[sprintf] unexpected placeholder')\n            }\n            _fmt = _fmt.substring(match[0].length)\n        }\n        return sprintf_cache[fmt] = parse_tree\n    }\n\n    /**\n     * export to either browser or node.js\n     */\n    /* eslint-disable quote-props */\n    if (typeof exports !== 'undefined') {\n        exports['sprintf'] = sprintf\n        exports['vsprintf'] = vsprintf\n    }\n    if (typeof window !== 'undefined') {\n        window['sprintf'] = sprintf\n        window['vsprintf'] = vsprintf\n\n        if (typeof define === 'function' && define['amd']) {\n            define(function() {\n                return {\n                    'sprintf': sprintf,\n                    'vsprintf': vsprintf\n                }\n            })\n        }\n    }\n    /* eslint-enable quote-props */\n}()\n","(function(root, factory){\n\n\t//UMD\n\tif ( typeof define === \"function\" && define.amd ) {\n\t\tdefine(function() {\n\t\t\treturn factory();\n\t\t});\n\t} else if (typeof module === \"object\") {\n\t\tmodule.exports = factory();\n \t} else {\n\t\troot.Tone = factory();\n\t}\n\n}(this, function(){\n\n\t\"use strict\";\n\t\n\tvar Tone;\n\t//constructs the main Tone object\n\tfunction Main(func){\n\t\tTone = func();\n\t}\n\t//invokes each of the modules with the main Tone object as the argument\n\tfunction Module(func){\n\t\tfunc(Tone);\n\t}\t/**\n\t *  Tone.js\n\t *  @author Yotam Mann\n\t *  @license http://opensource.org/licenses/MIT MIT License\n\t *  @copyright 2014-2018 Yotam Mann\n\t */\n\tMain(function () {\n\t    \n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tTONE\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  @class  Tone is the base class of all other classes.\n\t\t *  @constructor\n\t\t */\n\t    var Tone = function () {\n\t        if (!(this instanceof Tone)) {\n\t            throw new Error('constructor needs to be called with the \\'new\\' keyword');\n\t        }\n\t    };\n\t    /**\n\t\t *  @memberOf Tone#\n\t\t *  @returns {String} returns the name of the class as a string\n\t\t */\n\t    Tone.prototype.toString = function () {\n\t        for (var className in Tone) {\n\t            var isLetter = className[0].match(/^[A-Z]$/);\n\t            var sameConstructor = Tone[className] === this.constructor;\n\t            if (Tone.isFunction(Tone[className]) && isLetter && sameConstructor) {\n\t                return className;\n\t            }\n\t        }\n\t        return 'Tone';\n\t    };\n\t    /**\n\t\t *  @memberOf Tone#\n\t\t *  disconnect and dispose\n\t\t *  @returns {Tone} this\n\t\t */\n\t    Tone.prototype.dispose = function () {\n\t        return this;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tGET/SET\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Set the parameters at once. Either pass in an\n\t\t *  object mapping parameters to values, or to set a\n\t\t *  single parameter, by passing in a string and value.\n\t\t *  The last argument is an optional ramp time which\n\t\t *  will ramp any signal values to their destination value\n\t\t *  over the duration of the rampTime.\n\t\t *  @param {Object|String} params\n\t\t *  @param {Number=} value\n\t\t *  @param {Time=} rampTime\n\t\t *  @returns {Tone} this\n\t\t *  @memberOf Tone#\n\t\t *  @example\n\t\t * //set values using an object\n\t\t * filter.set({\n\t\t * \t\"frequency\" : 300,\n\t\t * \t\"type\" : highpass\n\t\t * });\n\t\t *  @example\n\t\t * filter.set(\"type\", \"highpass\");\n\t\t *  @example\n\t\t * //ramp to the value 220 over 3 seconds.\n\t\t * oscillator.set({\n\t\t * \t\"frequency\" : 220\n\t\t * }, 3);\n\t\t */\n\t    Tone.prototype.set = function (params, value, rampTime) {\n\t        if (Tone.isObject(params)) {\n\t            rampTime = value;\n\t        } else if (Tone.isString(params)) {\n\t            var tmpObj = {};\n\t            tmpObj[params] = value;\n\t            params = tmpObj;\n\t        }\n\t        paramLoop:\n\t            for (var attr in params) {\n\t                value = params[attr];\n\t                var parent = this;\n\t                if (attr.indexOf('.') !== -1) {\n\t                    var attrSplit = attr.split('.');\n\t                    for (var i = 0; i < attrSplit.length - 1; i++) {\n\t                        parent = parent[attrSplit[i]];\n\t                        if (parent instanceof Tone) {\n\t                            attrSplit.splice(0, i + 1);\n\t                            var innerParam = attrSplit.join('.');\n\t                            parent.set(innerParam, value);\n\t                            continue paramLoop;\n\t                        }\n\t                    }\n\t                    attr = attrSplit[attrSplit.length - 1];\n\t                }\n\t                var param = parent[attr];\n\t                if (Tone.isUndef(param)) {\n\t                    continue;\n\t                }\n\t                if (Tone.Signal && param instanceof Tone.Signal || Tone.Param && param instanceof Tone.Param) {\n\t                    if (param.value !== value) {\n\t                        if (Tone.isUndef(rampTime)) {\n\t                            param.value = value;\n\t                        } else {\n\t                            param.rampTo(value, rampTime);\n\t                        }\n\t                    }\n\t                } else if (param instanceof AudioParam) {\n\t                    if (param.value !== value) {\n\t                        param.value = value;\n\t                    }\n\t                } else if (Tone.TimeBase && param instanceof Tone.TimeBase) {\n\t                    parent[attr] = value;\n\t                } else if (param instanceof Tone) {\n\t                    param.set(value);\n\t                } else if (param !== value) {\n\t                    parent[attr] = value;\n\t                }\n\t            }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Get the object's attributes. Given no arguments get\n\t\t *  will return all available object properties and their corresponding\n\t\t *  values. Pass in a single attribute to retrieve or an array\n\t\t *  of attributes. The attribute strings can also include a \".\"\n\t\t *  to access deeper properties.\n\t\t *  @memberOf Tone#\n\t\t *  @example\n\t\t * osc.get();\n\t\t * //returns {\"type\" : \"sine\", \"frequency\" : 440, ...etc}\n\t\t *  @example\n\t\t * osc.get(\"type\");\n\t\t * //returns { \"type\" : \"sine\"}\n\t\t * @example\n\t\t * //use dot notation to access deep properties\n\t\t * synth.get([\"envelope.attack\", \"envelope.release\"]);\n\t\t * //returns {\"envelope\" : {\"attack\" : 0.2, \"release\" : 0.4}}\n\t\t *  @param {Array=|string|undefined} params the parameters to get, otherwise will return\n\t\t *  \t\t\t\t\t                  all available.\n\t\t *  @returns {Object}\n\t\t */\n\t    Tone.prototype.get = function (params) {\n\t        if (Tone.isUndef(params)) {\n\t            params = this._collectDefaults(this.constructor);\n\t        } else if (Tone.isString(params)) {\n\t            params = [params];\n\t        }\n\t        var ret = {};\n\t        for (var i = 0; i < params.length; i++) {\n\t            var attr = params[i];\n\t            var parent = this;\n\t            var subRet = ret;\n\t            if (attr.indexOf('.') !== -1) {\n\t                var attrSplit = attr.split('.');\n\t                for (var j = 0; j < attrSplit.length - 1; j++) {\n\t                    var subAttr = attrSplit[j];\n\t                    subRet[subAttr] = subRet[subAttr] || {};\n\t                    subRet = subRet[subAttr];\n\t                    parent = parent[subAttr];\n\t                }\n\t                attr = attrSplit[attrSplit.length - 1];\n\t            }\n\t            var param = parent[attr];\n\t            if (Tone.isObject(params[attr])) {\n\t                subRet[attr] = param.get();\n\t            } else if (Tone.Signal && param instanceof Tone.Signal) {\n\t                subRet[attr] = param.value;\n\t            } else if (Tone.Param && param instanceof Tone.Param) {\n\t                subRet[attr] = param.value;\n\t            } else if (param instanceof AudioParam) {\n\t                subRet[attr] = param.value;\n\t            } else if (param instanceof Tone) {\n\t                subRet[attr] = param.get();\n\t            } else if (!Tone.isFunction(param) && Tone.isDefined(param)) {\n\t                subRet[attr] = param;\n\t            }\n\t        }\n\t        return ret;\n\t    };\n\t    /**\n\t\t *  collect all of the default attributes in one\n\t\t *  @private\n\t\t *  @param {Function} constr the constructor to find the defaults from\n\t\t *  @return {Array} all of the attributes which belong to the class\n\t\t */\n\t    Tone.prototype._collectDefaults = function (constr) {\n\t        var ret = [];\n\t        if (Tone.isDefined(constr.defaults)) {\n\t            ret = Object.keys(constr.defaults);\n\t        }\n\t        if (Tone.isDefined(constr._super)) {\n\t            var superDefs = this._collectDefaults(constr._super);\n\t            //filter out repeats\n\t            for (var i = 0; i < superDefs.length; i++) {\n\t                if (ret.indexOf(superDefs[i]) === -1) {\n\t                    ret.push(superDefs[i]);\n\t                }\n\t            }\n\t        }\n\t        return ret;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tDEFAULTS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  @memberOf Tone\n\t\t *  @param  {Array}  values  The arguments array\n\t\t *  @param  {Array}  keys    The names of the arguments\n\t\t *  @param {Function|Object} constr The class constructor\n\t\t *  @return  {Object}  An object composed of the  defaults between the class' defaults\n\t\t *                        and the passed in arguments.\n\t\t */\n\t    Tone.defaults = function (values, keys, constr) {\n\t        var options = {};\n\t        if (values.length === 1 && Tone.isObject(values[0])) {\n\t            options = values[0];\n\t        } else {\n\t            for (var i = 0; i < keys.length; i++) {\n\t                options[keys[i]] = values[i];\n\t            }\n\t        }\n\t        if (Tone.isDefined(constr.defaults)) {\n\t            return Tone.defaultArg(options, constr.defaults);\n\t        } else if (Tone.isObject(constr)) {\n\t            return Tone.defaultArg(options, constr);\n\t        } else {\n\t            return options;\n\t        }\n\t    };\n\t    /**\n\t\t *  If the `given` parameter is undefined, use the `fallback`.\n\t\t *  If both `given` and `fallback` are object literals, it will\n\t\t *  return a deep copy which includes all of the parameters from both\n\t\t *  objects. If a parameter is undefined in given, it will return\n\t\t *  the fallback property.\n\t\t *  <br><br>\n\t\t *  WARNING: if object is self referential, it will go into an an\n\t\t *  infinite recursive loop.\n\t\t *  @memberOf Tone\n\t\t *  @param  {*} given\n\t\t *  @param  {*} fallback\n\t\t *  @return {*}\n\t\t */\n\t    Tone.defaultArg = function (given, fallback) {\n\t        if (Tone.isObject(given) && Tone.isObject(fallback)) {\n\t            var ret = {};\n\t            //make a deep copy of the given object\n\t            for (var givenProp in given) {\n\t                ret[givenProp] = Tone.defaultArg(fallback[givenProp], given[givenProp]);\n\t            }\n\t            for (var fallbackProp in fallback) {\n\t                ret[fallbackProp] = Tone.defaultArg(given[fallbackProp], fallback[fallbackProp]);\n\t            }\n\t            return ret;\n\t        } else {\n\t            return Tone.isUndef(given) ? fallback : given;\n\t        }\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tCONNECTIONS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  connect together all of the arguments in series\n\t\t *  @param {...AudioParam|Tone|AudioNode} nodes\n\t\t *  @returns {Tone}\n\t\t *  @memberOf Tone\n\t\t *  @static\n\t\t */\n\t    Tone.connectSeries = function () {\n\t        var currentUnit = arguments[0];\n\t        for (var i = 1; i < arguments.length; i++) {\n\t            var toUnit = arguments[i];\n\t            currentUnit.connect(toUnit);\n\t            currentUnit = toUnit;\n\t        }\n\t        return Tone;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    // TYPE CHECKING\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Test if the arg is undefined\n\t\t *  @param {*} arg the argument to test\n\t\t *  @returns {Boolean} true if the arg is undefined\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.isUndef = function (val) {\n\t        return typeof val === 'undefined';\n\t    };\n\t    /**\n\t\t *  Test if the arg is not undefined\n\t\t *  @param {*} arg the argument to test\n\t\t *  @returns {Boolean} true if the arg is undefined\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.isDefined = function (val) {\n\t        return !Tone.isUndef(val);\n\t    };\n\t    /**\n\t\t *  Test if the arg is a function\n\t\t *  @param {*} arg the argument to test\n\t\t *  @returns {Boolean} true if the arg is a function\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.isFunction = function (val) {\n\t        return typeof val === 'function';\n\t    };\n\t    /**\n\t\t *  Test if the argument is a number.\n\t\t *  @param {*} arg the argument to test\n\t\t *  @returns {Boolean} true if the arg is a number\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.isNumber = function (arg) {\n\t        return typeof arg === 'number';\n\t    };\n\t    /**\n\t\t *  Test if the given argument is an object literal (i.e. `{}`);\n\t\t *  @param {*} arg the argument to test\n\t\t *  @returns {Boolean} true if the arg is an object literal.\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.isObject = function (arg) {\n\t        return Object.prototype.toString.call(arg) === '[object Object]' && arg.constructor === Object;\n\t    };\n\t    /**\n\t\t *  Test if the argument is a boolean.\n\t\t *  @param {*} arg the argument to test\n\t\t *  @returns {Boolean} true if the arg is a boolean\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.isBoolean = function (arg) {\n\t        return typeof arg === 'boolean';\n\t    };\n\t    /**\n\t\t *  Test if the argument is an Array\n\t\t *  @param {*} arg the argument to test\n\t\t *  @returns {Boolean} true if the arg is an array\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.isArray = function (arg) {\n\t        return Array.isArray(arg);\n\t    };\n\t    /**\n\t\t *  Test if the argument is a string.\n\t\t *  @param {*} arg the argument to test\n\t\t *  @returns {Boolean} true if the arg is a string\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.isString = function (arg) {\n\t        return typeof arg === 'string';\n\t    };\n\t    /**\n\t\t *  Test if the argument is in the form of a note in scientific pitch notation.\n\t\t *  e.g. \"C4\"\n\t\t *  @param {*} arg the argument to test\n\t\t *  @returns {Boolean} true if the arg is a string\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.isNote = function (arg) {\n\t        return Tone.isString(arg) && /^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i.test(arg);\n\t    };\n\t    /**\n\t\t *  An empty function.\n\t\t *  @static\n\t\t */\n\t    Tone.noOp = function () {\n\t    };\n\t    /**\n\t\t *  Make the property not writable. Internal use only.\n\t\t *  @private\n\t\t *  @param  {String}  property  the property to make not writable\n\t\t */\n\t    Tone.prototype._readOnly = function (property) {\n\t        if (Array.isArray(property)) {\n\t            for (var i = 0; i < property.length; i++) {\n\t                this._readOnly(property[i]);\n\t            }\n\t        } else {\n\t            Object.defineProperty(this, property, {\n\t                writable: false,\n\t                enumerable: true\n\t            });\n\t        }\n\t    };\n\t    /**\n\t\t *  Make an attribute writeable. Interal use only.\n\t\t *  @private\n\t\t *  @param  {String}  property  the property to make writable\n\t\t */\n\t    Tone.prototype._writable = function (property) {\n\t        if (Array.isArray(property)) {\n\t            for (var i = 0; i < property.length; i++) {\n\t                this._writable(property[i]);\n\t            }\n\t        } else {\n\t            Object.defineProperty(this, property, { writable: true });\n\t        }\n\t    };\n\t    /**\n\t\t * Possible play states.\n\t\t * @enum {String}\n\t\t */\n\t    Tone.State = {\n\t        Started: 'started',\n\t        Stopped: 'stopped',\n\t        Paused: 'paused'\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    // CONVERSIONS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Equal power gain scale. Good for cross-fading.\n\t\t *  @param  {NormalRange} percent (0-1)\n\t\t *  @return {Number}         output gain (0-1)\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.equalPowerScale = function (percent) {\n\t        var piFactor = 0.5 * Math.PI;\n\t        return Math.sin(percent * piFactor);\n\t    };\n\t    /**\n\t\t *  Convert decibels into gain.\n\t\t *  @param  {Decibels} db\n\t\t *  @return {Number}\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.dbToGain = function (db) {\n\t        return Math.pow(10, db / 20);\n\t    };\n\t    /**\n\t\t *  Convert gain to decibels.\n\t\t *  @param  {Number} gain (0-1)\n\t\t *  @return {Decibels}\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.gainToDb = function (gain) {\n\t        return 20 * (Math.log(gain) / Math.LN10);\n\t    };\n\t    /**\n\t\t *  Convert an interval (in semitones) to a frequency ratio.\n\t\t *  @param  {Interval} interval the number of semitones above the base note\n\t\t *  @return {Number}          the frequency ratio\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t *  @example\n\t\t * tone.intervalToFrequencyRatio(0); // 1\n\t\t * tone.intervalToFrequencyRatio(12); // 2\n\t\t * tone.intervalToFrequencyRatio(-12); // 0.5\n\t\t */\n\t    Tone.intervalToFrequencyRatio = function (interval) {\n\t        return Math.pow(2, interval / 12);\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tTIMING\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Return the current time of the AudioContext clock.\n\t\t *  @return {Number} the currentTime from the AudioContext\n\t\t *  @memberOf Tone#\n\t\t */\n\t    Tone.prototype.now = function () {\n\t        return Tone.context.now();\n\t    };\n\t    /**\n\t\t *  Return the current time of the AudioContext clock.\n\t\t *  @return {Number} the currentTime from the AudioContext\n\t\t *  @static\n\t\t *  @memberOf Tone\n\t\t */\n\t    Tone.now = function () {\n\t        return Tone.context.now();\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tINHERITANCE\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  have a child inherit all of Tone's (or a parent's) prototype\n\t\t *  to inherit the parent's properties, make sure to call\n\t\t *  Parent.call(this) in the child's constructor\n\t\t *\n\t\t *  based on closure library's inherit function\n\t\t *\n\t\t *  @memberOf Tone\n\t\t *  @static\n\t\t *  @param  {Function} \tchild\n\t\t *  @param  {Function=} parent (optional) parent to inherit from\n\t\t *                             if no parent is supplied, the child\n\t\t *                             will inherit from Tone\n\t\t */\n\t    Tone.extend = function (child, parent) {\n\t        if (Tone.isUndef(parent)) {\n\t            parent = Tone;\n\t        }\n\t        function TempConstructor() {\n\t        }\n\t        TempConstructor.prototype = parent.prototype;\n\t        child.prototype = new TempConstructor();\n\t        /** @override */\n\t        child.prototype.constructor = child;\n\t        child._super = parent;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tCONTEXT\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Private reference to the global AudioContext\n\t\t *  @type {AudioContext}\n\t\t *  @private\n\t\t */\n\t    var audioContext = null;\n\t    /**\n\t\t *  A static pointer to the audio context accessible as Tone.context.\n\t\t *  @type {Tone.Context}\n\t\t *  @name context\n\t\t *  @memberOf Tone\n\t\t */\n\t    Object.defineProperty(Tone, 'context', {\n\t        get: function () {\n\t            return audioContext;\n\t        },\n\t        set: function (context) {\n\t            if (Tone.Context && context instanceof Tone.Context) {\n\t                audioContext = context;\n\t            } else {\n\t                audioContext = new Tone.Context(context);\n\t            }\n\t            //initialize the new audio context\n\t            Tone.Context.emit('init', audioContext);\n\t        }\n\t    });\n\t    /**\n\t\t *  The AudioContext\n\t\t *  @type {Tone.Context}\n\t\t *  @name context\n\t\t *  @memberOf Tone#\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.prototype, 'context', {\n\t        get: function () {\n\t            return Tone.context;\n\t        }\n\t    });\n\t    /**\n\t\t *  Tone automatically creates a context on init, but if you are working\n\t\t *  with other libraries which also create an AudioContext, it can be\n\t\t *  useful to set your own. If you are going to set your own context,\n\t\t *  be sure to do it at the start of your code, before creating any objects.\n\t\t *  @static\n\t\t *  @param {AudioContext} ctx The new audio context to set\n\t\t */\n\t    Tone.setContext = function (ctx) {\n\t        Tone.context = ctx;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tATTRIBUTES\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  The number of seconds of 1 processing block (128 samples)\n\t\t *  @type {Number}\n\t\t *  @name blockTime\n\t\t *  @memberOf Tone\n\t\t *  @static\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.prototype, 'blockTime', {\n\t        get: function () {\n\t            return 128 / this.context.sampleRate;\n\t        }\n\t    });\n\t    /**\n\t\t *  The duration in seconds of one sample.\n\t\t *  @type {Number}\n\t\t *  @name sampleTime\n\t\t *  @memberOf Tone\n\t\t *  @static\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.prototype, 'sampleTime', {\n\t        get: function () {\n\t            return 1 / this.context.sampleRate;\n\t        }\n\t    });\n\t    /**\n\t\t *  Whether or not all the technologies that Tone.js relies on are supported by the current browser.\n\t\t *  @type {Boolean}\n\t\t *  @name supported\n\t\t *  @memberOf Tone\n\t\t *  @readOnly\n\t\t *  @static\n\t\t */\n\t    Object.defineProperty(Tone, 'supported', {\n\t        get: function () {\n\t            var hasAudioContext = window.hasOwnProperty('AudioContext') || window.hasOwnProperty('webkitAudioContext');\n\t            var hasPromises = window.hasOwnProperty('Promise');\n\t            var hasWorkers = window.hasOwnProperty('Worker');\n\t            return hasAudioContext && hasPromises && hasWorkers;\n\t        }\n\t    });\n\t    /**\n\t\t *  Boolean value if the audio context has been initialized.\n\t\t *  @type {Boolean}\n\t\t *  @memberOf Tone\n\t\t *  @static\n\t\t *  @name initialized\n\t\t */\n\t    Object.defineProperty(Tone, 'initialized', {\n\t        get: function () {\n\t            return audioContext !== null;\n\t        }\n\t    });\n\t    /**\n\t\t *  Get the context when it becomes available\n\t\t *  @param  {Function}  resolve  Callback when the context is initialized\n\t\t *  @return  {Tone}\n\t\t */\n\t    Tone.getContext = function (resolve) {\n\t        if (Tone.initialized) {\n\t            resolve(Tone.context);\n\t        } else {\n\t            var resCallback = function () {\n\t                resolve(Tone.context);\n\t                Tone.Context.off('init', resCallback);\n\t            };\n\t            Tone.Context.on('init', resCallback);\n\t        }\n\t        return Tone;\n\t    };\n\t    /**\n\t\t * The version number\n\t\t * @type {String}\n\t\t * @static\n\t\t */\n\t    Tone.version = 'r12';\n\t    return Tone;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Emitter gives classes which extend it\n\t\t *         the ability to listen for and emit events.\n\t\t *         Inspiration and reference from Jerome Etienne's [MicroEvent](https://github.com/jeromeetienne/microevent.js).\n\t\t *         MIT (c) 2011 Jerome Etienne.\n\t\t *\n\t\t *  @extends {Tone}\n\t\t */\n\t    Tone.Emitter = function () {\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  Contains all of the events.\n\t\t\t *  @private\n\t\t\t *  @type  {Object}\n\t\t\t */\n\t        this._events = {};\n\t    };\n\t    Tone.extend(Tone.Emitter);\n\t    /**\n\t\t *  Bind a callback to a specific event.\n\t\t *  @param  {String}    event     The name of the event to listen for.\n\t\t *  @param  {Function}  callback  The callback to invoke when the\n\t\t *                                event is emitted\n\t\t *  @return  {Tone.Emitter}    this\n\t\t */\n\t    Tone.Emitter.prototype.on = function (event, callback) {\n\t        //split the event\n\t        var events = event.split(/\\W+/);\n\t        for (var i = 0; i < events.length; i++) {\n\t            var eventName = events[i];\n\t            if (!this._events.hasOwnProperty(eventName)) {\n\t                this._events[eventName] = [];\n\t            }\n\t            this._events[eventName].push(callback);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Bind a callback which is only invoked once\n\t\t *  @param  {String}    event     The name of the event to listen for.\n\t\t *  @param  {Function}  callback  The callback to invoke when the\n\t\t *                                event is emitted\n\t\t *  @return  {Tone.Emitter}    this\n\t\t */\n\t    Tone.Emitter.prototype.once = function (event, callback) {\n\t        var boundCallback = function () {\n\t            //invoke the callback\n\t            callback.apply(this, arguments);\n\t            this.off(event, boundCallback);\n\t        }.bind(this);\n\t        this.on(event, boundCallback);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Remove the event listener.\n\t\t *  @param  {String}    event     The event to stop listening to.\n\t\t *  @param  {Function=}  callback  The callback which was bound to\n\t\t *                                the event with Tone.Emitter.on.\n\t\t *                                If no callback is given, all callbacks\n\t\t *                                events are removed.\n\t\t *  @return  {Tone.Emitter}    this\n\t\t */\n\t    Tone.Emitter.prototype.off = function (event, callback) {\n\t        var events = event.split(/\\W+/);\n\t        for (var ev = 0; ev < events.length; ev++) {\n\t            event = events[ev];\n\t            if (this._events.hasOwnProperty(event)) {\n\t                if (Tone.isUndef(callback)) {\n\t                    this._events[event] = [];\n\t                } else {\n\t                    var eventList = this._events[event];\n\t                    for (var i = 0; i < eventList.length; i++) {\n\t                        if (eventList[i] === callback) {\n\t                            eventList.splice(i, 1);\n\t                        }\n\t                    }\n\t                }\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Invoke all of the callbacks bound to the event\n\t\t *  with any arguments passed in.\n\t\t *  @param  {String}  event  The name of the event.\n\t\t *  @param {*} args... The arguments to pass to the functions listening.\n\t\t *  @return  {Tone.Emitter}  this\n\t\t */\n\t    Tone.Emitter.prototype.emit = function (event) {\n\t        if (this._events) {\n\t            var args = Array.apply(null, arguments).slice(1);\n\t            if (this._events.hasOwnProperty(event)) {\n\t                var eventList = this._events[event].slice(0);\n\t                for (var i = 0, len = eventList.length; i < len; i++) {\n\t                    eventList[i].apply(this, args);\n\t                }\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Add Emitter functions (on/off/emit) to the object\n\t\t *  @param  {Object|Function}  object  The object or class to extend.\n\t\t *  @returns {Tone.Emitter}\n\t\t */\n\t    Tone.Emitter.mixin = function (object) {\n\t        var functions = [\n\t            'on',\n\t            'once',\n\t            'off',\n\t            'emit'\n\t        ];\n\t        object._events = {};\n\t        for (var i = 0; i < functions.length; i++) {\n\t            var func = functions[i];\n\t            var emitterFunc = Tone.Emitter.prototype[func];\n\t            object[func] = emitterFunc;\n\t        }\n\t        return Tone.Emitter;\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.Emitter}  this\n\t\t */\n\t    Tone.Emitter.prototype.dispose = function () {\n\t        Tone.prototype.dispose.call(this);\n\t        this._events = null;\n\t        return this;\n\t    };\n\t    return Tone.Emitter;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class A Timeline class for scheduling and maintaining state\n\t\t *         along a timeline. All events must have a \"time\" property.\n\t\t *         Internally, events are stored in time order for fast\n\t\t *         retrieval.\n\t\t *  @extends {Tone}\n\t\t *  @param {Positive} [memory=Infinity] The number of previous events that are retained.\n\t\t */\n\t    Tone.Timeline = function () {\n\t        var options = Tone.defaults(arguments, ['memory'], Tone.Timeline);\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  The array of scheduled timeline events\n\t\t\t *  @type  {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._timeline = [];\n\t        /**\n\t\t\t *  The memory of the timeline, i.e.\n\t\t\t *  how many events in the past it will retain\n\t\t\t *  @type {Positive}\n\t\t\t */\n\t        this.memory = options.memory;\n\t    };\n\t    Tone.extend(Tone.Timeline);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @static\n\t\t *  @const\n\t\t */\n\t    Tone.Timeline.defaults = { 'memory': Infinity };\n\t    /**\n\t\t *  The number of items in the timeline.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Timeline#\n\t\t *  @name length\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Timeline.prototype, 'length', {\n\t        get: function () {\n\t            return this._timeline.length;\n\t        }\n\t    });\n\t    /**\n\t\t *  Insert an event object onto the timeline. Events must have a \"time\" attribute.\n\t\t *  @param  {Object}  event  The event object to insert into the\n\t\t *                           timeline.\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.add = function (event) {\n\t        //the event needs to have a time attribute\n\t        if (Tone.isUndef(event.time)) {\n\t            throw new Error('Tone.Timeline: events must have a time attribute');\n\t        }\n\t        event.time = event.time.valueOf();\n\t        var index = this._search(event.time);\n\t        this._timeline.splice(index + 1, 0, event);\n\t        //if the length is more than the memory, remove the previous ones\n\t        if (this.length > this.memory) {\n\t            var diff = this.length - this.memory;\n\t            this._timeline.splice(0, diff);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Remove an event from the timeline.\n\t\t *  @param  {Object}  event  The event object to remove from the list.\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.remove = function (event) {\n\t        var index = this._timeline.indexOf(event);\n\t        if (index !== -1) {\n\t            this._timeline.splice(index, 1);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Get the nearest event whose time is less than or equal to the given time.\n\t\t *  @param  {Number}  time  The time to query.\n\t\t *  @param  {String}  comparator Which value in the object to compare\n\t\t *  @returns {Object} The event object set after that time.\n\t\t */\n\t    Tone.Timeline.prototype.get = function (time, comparator) {\n\t        comparator = Tone.defaultArg(comparator, 'time');\n\t        var index = this._search(time, comparator);\n\t        if (index !== -1) {\n\t            return this._timeline[index];\n\t        } else {\n\t            return null;\n\t        }\n\t    };\n\t    /**\n\t\t *  Return the first event in the timeline without removing it\n\t\t *  @returns {Object} The first event object\n\t\t */\n\t    Tone.Timeline.prototype.peek = function () {\n\t        return this._timeline[0];\n\t    };\n\t    /**\n\t\t *  Return the first event in the timeline and remove it\n\t\t *  @returns {Object} The first event object\n\t\t */\n\t    Tone.Timeline.prototype.shift = function () {\n\t        return this._timeline.shift();\n\t    };\n\t    /**\n\t\t *  Get the event which is scheduled after the given time.\n\t\t *  @param  {Number}  time  The time to query.\n\t\t *  @param  {String}  comparator Which value in the object to compare\n\t\t *  @returns {Object} The event object after the given time\n\t\t */\n\t    Tone.Timeline.prototype.getAfter = function (time, comparator) {\n\t        comparator = Tone.defaultArg(comparator, 'time');\n\t        var index = this._search(time, comparator);\n\t        if (index + 1 < this._timeline.length) {\n\t            return this._timeline[index + 1];\n\t        } else {\n\t            return null;\n\t        }\n\t    };\n\t    /**\n\t\t *  Get the event before the event at the given time.\n\t\t *  @param  {Number}  time  The time to query.\n\t\t *  @param  {String}  comparator Which value in the object to compare\n\t\t *  @returns {Object} The event object before the given time\n\t\t */\n\t    Tone.Timeline.prototype.getBefore = function (time, comparator) {\n\t        comparator = Tone.defaultArg(comparator, 'time');\n\t        var len = this._timeline.length;\n\t        //if it's after the last item, return the last item\n\t        if (len > 0 && this._timeline[len - 1][comparator] < time) {\n\t            return this._timeline[len - 1];\n\t        }\n\t        var index = this._search(time, comparator);\n\t        if (index - 1 >= 0) {\n\t            return this._timeline[index - 1];\n\t        } else {\n\t            return null;\n\t        }\n\t    };\n\t    /**\n\t\t *  Cancel events after the given time\n\t\t *  @param  {Number}  time  The time to query.\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.cancel = function (after) {\n\t        if (this._timeline.length > 1) {\n\t            var index = this._search(after);\n\t            if (index >= 0) {\n\t                if (this._timeline[index].time === after) {\n\t                    //get the first item with that time\n\t                    for (var i = index; i >= 0; i--) {\n\t                        if (this._timeline[i].time === after) {\n\t                            index = i;\n\t                        } else {\n\t                            break;\n\t                        }\n\t                    }\n\t                    this._timeline = this._timeline.slice(0, index);\n\t                } else {\n\t                    this._timeline = this._timeline.slice(0, index + 1);\n\t                }\n\t            } else {\n\t                this._timeline = [];\n\t            }\n\t        } else if (this._timeline.length === 1) {\n\t            //the first item's time\n\t            if (this._timeline[0].time >= after) {\n\t                this._timeline = [];\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancel events before or equal to the given time.\n\t\t *  @param  {Number}  time  The time to cancel before.\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.cancelBefore = function (time) {\n\t        var index = this._search(time);\n\t        if (index >= 0) {\n\t            this._timeline = this._timeline.slice(index + 1);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * Returns the previous event if there is one. null otherwise\n\t\t * @param  {Object} event The event to find the previous one of\n\t\t * @return {Object}       The event right before the given event\n\t\t */\n\t    Tone.Timeline.prototype.previousEvent = function (event) {\n\t        var index = this._timeline.indexOf(event);\n\t        if (index > 0) {\n\t            return this._timeline[index - 1];\n\t        } else {\n\t            return null;\n\t        }\n\t    };\n\t    /**\n\t\t *  Does a binary search on the timeline array and returns the\n\t\t *  nearest event index whose time is after or equal to the given time.\n\t\t *  If a time is searched before the first index in the timeline, -1 is returned.\n\t\t *  If the time is after the end, the index of the last item is returned.\n\t\t *  @param  {Number}  time\n\t\t *  @param  {String}  comparator Which value in the object to compare\n\t\t *  @return  {Number} the index in the timeline array\n\t\t *  @private\n\t\t */\n\t    Tone.Timeline.prototype._search = function (time, comparator) {\n\t        if (this._timeline.length === 0) {\n\t            return -1;\n\t        }\n\t        comparator = Tone.defaultArg(comparator, 'time');\n\t        var beginning = 0;\n\t        var len = this._timeline.length;\n\t        var end = len;\n\t        if (len > 0 && this._timeline[len - 1][comparator] <= time) {\n\t            return len - 1;\n\t        }\n\t        while (beginning < end) {\n\t            // calculate the midpoint for roughly equal partition\n\t            var midPoint = Math.floor(beginning + (end - beginning) / 2);\n\t            var event = this._timeline[midPoint];\n\t            var nextEvent = this._timeline[midPoint + 1];\n\t            if (event[comparator] === time) {\n\t                //choose the last one that has the same time\n\t                for (var i = midPoint; i < this._timeline.length; i++) {\n\t                    var testEvent = this._timeline[i];\n\t                    if (testEvent[comparator] === time) {\n\t                        midPoint = i;\n\t                    }\n\t                }\n\t                return midPoint;\n\t            } else if (event[comparator] < time && nextEvent[comparator] > time) {\n\t                return midPoint;\n\t            } else if (event[comparator] > time) {\n\t                //search lower\n\t                end = midPoint;\n\t            } else {\n\t                //search upper\n\t                beginning = midPoint + 1;\n\t            }\n\t        }\n\t        return -1;\n\t    };\n\t    /**\n\t\t *  Internal iterator. Applies extra safety checks for\n\t\t *  removing items from the array.\n\t\t *  @param  {Function}  callback\n\t\t *  @param  {Number=}    lowerBound\n\t\t *  @param  {Number=}    upperBound\n\t\t *  @private\n\t\t */\n\t    Tone.Timeline.prototype._iterate = function (callback, lowerBound, upperBound) {\n\t        lowerBound = Tone.defaultArg(lowerBound, 0);\n\t        upperBound = Tone.defaultArg(upperBound, this._timeline.length - 1);\n\t        this._timeline.slice(lowerBound, upperBound + 1).forEach(function (event) {\n\t            callback.call(this, event);\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t *  Iterate over everything in the array\n\t\t *  @param  {Function}  callback The callback to invoke with every item\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.forEach = function (callback) {\n\t        this._iterate(callback);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Iterate over everything in the array at or before the given time.\n\t\t *  @param  {Number}  time The time to check if items are before\n\t\t *  @param  {Function}  callback The callback to invoke with every item\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.forEachBefore = function (time, callback) {\n\t        //iterate over the items in reverse so that removing an item doesn't break things\n\t        var upperBound = this._search(time);\n\t        if (upperBound !== -1) {\n\t            this._iterate(callback, 0, upperBound);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Iterate over everything in the array after the given time.\n\t\t *  @param  {Number}  time The time to check if items are before\n\t\t *  @param  {Function}  callback The callback to invoke with every item\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.forEachAfter = function (time, callback) {\n\t        //iterate over the items in reverse so that removing an item doesn't break things\n\t        var lowerBound = this._search(time);\n\t        this._iterate(callback, lowerBound + 1);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Iterate over everything in the array between the startTime and endTime. \n\t\t *  The timerange is inclusive of the startTime, but exclusive of the endTime. \n\t\t *  range = [startTime, endTime). \n\t\t *  @param  {Number}  startTime The time to check if items are before\n\t\t *  @param  {Number}  endTime The end of the test interval. \n\t\t *  @param  {Function}  callback The callback to invoke with every item\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.forEachBetween = function (startTime, endTime, callback) {\n\t        var lowerBound = this._search(startTime);\n\t        var upperBound = this._search(endTime);\n\t        if (lowerBound !== -1 && upperBound !== -1) {\n\t            if (this._timeline[lowerBound].time !== startTime) {\n\t                lowerBound += 1;\n\t            }\n\t            //exclusive of the end time\n\t            if (this._timeline[upperBound].time === endTime) {\n\t                upperBound -= 1;\n\t            }\n\t            this._iterate(callback, lowerBound, upperBound);\n\t        } else if (lowerBound === -1) {\n\t            this._iterate(callback, 0, upperBound);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Iterate over everything in the array at or after the given time. Similar to\n\t\t *  forEachAfter, but includes the item(s) at the given time.\n\t\t *  @param  {Number}  time The time to check if items are before\n\t\t *  @param  {Function}  callback The callback to invoke with every item\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.forEachFrom = function (time, callback) {\n\t        //iterate over the items in reverse so that removing an item doesn't break things\n\t        var lowerBound = this._search(time);\n\t        //work backwards until the event time is less than time\n\t        while (lowerBound >= 0 && this._timeline[lowerBound].time >= time) {\n\t            lowerBound--;\n\t        }\n\t        this._iterate(callback, lowerBound + 1);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Iterate over everything in the array at the given time\n\t\t *  @param  {Number}  time The time to check if items are before\n\t\t *  @param  {Function}  callback The callback to invoke with every item\n\t\t *  @returns {Tone.Timeline} this\n\t\t */\n\t    Tone.Timeline.prototype.forEachAtTime = function (time, callback) {\n\t        //iterate over the items in reverse so that removing an item doesn't break things\n\t        var upperBound = this._search(time);\n\t        if (upperBound !== -1) {\n\t            this._iterate(function (event) {\n\t                if (event.time === time) {\n\t                    callback.call(this, event);\n\t                }\n\t            }, 0, upperBound);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.Timeline}  this\n\t\t */\n\t    Tone.Timeline.prototype.dispose = function () {\n\t        Tone.prototype.dispose.call(this);\n\t        this._timeline = null;\n\t        return this;\n\t    };\n\t    return Tone.Timeline;\n\t});\n\tModule(function (Tone) {\n\t    if (Tone.supported) {\n\t        if (!window.hasOwnProperty('OfflineAudioContext') && window.hasOwnProperty('webkitOfflineAudioContext')) {\n\t            window.OfflineAudioContext = window.webkitOfflineAudioContext;\n\t        }\n\t        //returns promise?\n\t        var context = new OfflineAudioContext(1, 1, 44100);\n\t        var ret = context.startRendering();\n\t        if (!(ret instanceof Promise)) {\n\t            OfflineAudioContext.prototype._native_startRendering = OfflineAudioContext.prototype.startRendering;\n\t            OfflineAudioContext.prototype.startRendering = function () {\n\t                return new Promise(function (done) {\n\t                    this.oncomplete = function (e) {\n\t                        done(e.renderedBuffer);\n\t                    };\n\t                    this._native_startRendering();\n\t                }.bind(this));\n\t            };\n\t        }\n\t    }\n\t});\n\tModule(function (Tone) {\n\t    if (Tone.supported) {\n\t        if (!window.hasOwnProperty('AudioContext') && window.hasOwnProperty('webkitAudioContext')) {\n\t            window.AudioContext = window.webkitAudioContext;\n\t        }\n\t        //not functionally equivalent, but only an API placeholder\n\t        if (!AudioContext.prototype.close) {\n\t            AudioContext.prototype.close = function () {\n\t                if (Tone.isFunction(this.suspend)) {\n\t                    this.suspend();\n\t                }\n\t                return Promise.resolve();\n\t            };\n\t        }\n\t        //not functionally equivalent\n\t        if (!AudioContext.prototype.resume) {\n\t            AudioContext.prototype.resume = function () {\n\t                return Promise.resolve();\n\t            };\n\t        }\n\t        //createGain\n\t        if (!AudioContext.prototype.createGain && AudioContext.prototype.createGainNode) {\n\t            AudioContext.prototype.createGain = AudioContext.prototype.createGainNode;\n\t        }\n\t        //createDelay\n\t        if (!AudioContext.prototype.createDelay && AudioContext.prototype.createDelayNode) {\n\t            AudioContext.prototype.createDelay = AudioContext.prototype.createDelayNode;\n\t        }\n\t        //test decodeAudioData returns a promise\n\t        // https://github.com/mohayonao/web-audio-api-shim/blob/master/src/AudioContext.js\n\t        // MIT License (c) 2015 @mohayonao\n\t        var decodeAudioDataPromise = false;\n\t        var offlineContext = new OfflineAudioContext(1, 1, 44100);\n\t        var audioData = new Uint32Array([\n\t            1179011410,\n\t            48,\n\t            1163280727,\n\t            544501094,\n\t            16,\n\t            131073,\n\t            44100,\n\t            176400,\n\t            1048580,\n\t            1635017060,\n\t            8,\n\t            0,\n\t            0,\n\t            0,\n\t            0\n\t        ]).buffer;\n\t        try {\n\t            var ret = offlineContext.decodeAudioData(audioData);\n\t            if (ret instanceof Promise) {\n\t                decodeAudioDataPromise = true;\n\t            }\n\t        } catch (e) {\n\t            decodeAudioDataPromise = false;\n\t        }\n\t        if (!decodeAudioDataPromise) {\n\t            AudioContext.prototype._native_decodeAudioData = AudioContext.prototype.decodeAudioData;\n\t            AudioContext.prototype.decodeAudioData = function (audioData) {\n\t                return new Promise(function (success, error) {\n\t                    this._native_decodeAudioData(audioData, success, error);\n\t                }.bind(this));\n\t            };\n\t        }\n\t    }\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Wrapper around the native AudioContext.\n\t\t *  @extends {Tone.Emitter}\n\t\t *  @param {AudioContext=} context optionally pass in a context\n\t\t */\n\t    Tone.Context = function () {\n\t        Tone.Emitter.call(this);\n\t        var options = Tone.defaults(arguments, ['context'], Tone.Context);\n\t        if (!options.context) {\n\t            options.context = new window.AudioContext();\n\t            if (!options.context) {\n\t                throw new Error('could not create AudioContext. Possibly too many AudioContexts running already.');\n\t            }\n\t        }\n\t        this._context = options.context;\n\t        // extend all of the methods\n\t        for (var prop in this._context) {\n\t            this._defineProperty(this._context, prop);\n\t        }\n\t        /**\n\t\t\t *  The default latency hint\n\t\t\t *  @type  {String}\n\t\t\t *  @private\n\t\t\t */\n\t        this._latencyHint = options.latencyHint;\n\t        /**\n\t\t\t *  An object containing all of the constants AudioBufferSourceNodes\n\t\t\t *  @type  {Object}\n\t\t\t *  @private\n\t\t\t */\n\t        this._constants = {};\n\t        ///////////////////////////////////////////////////////////////////////\n\t        // WORKER\n\t        ///////////////////////////////////////////////////////////////////////\n\t        /**\n\t\t\t *  The amount of time events are scheduled\n\t\t\t *  into the future\n\t\t\t *  @type  {Number}\n\t\t\t */\n\t        this.lookAhead = options.lookAhead;\n\t        /**\n\t\t\t *  A reference to the actual computed update interval\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._computedUpdateInterval = 0;\n\t        /**\n\t\t\t *  A reliable callback method\n\t\t\t *  @private\n\t\t\t *  @type  {Ticker}\n\t\t\t */\n\t        this._ticker = new Ticker(this.emit.bind(this, 'tick'), options.clockSource, options.updateInterval);\n\t        ///////////////////////////////////////////////////////////////////////\n\t        // TIMEOUTS\n\t        ///////////////////////////////////////////////////////////////////////\n\t        /**\n\t\t\t *  All of the setTimeout events.\n\t\t\t *  @type  {Tone.Timeline}\n\t\t\t *  @private\n\t\t\t */\n\t        this._timeouts = new Tone.Timeline();\n\t        /**\n\t\t\t *  The timeout id counter\n\t\t\t *  @private\n\t\t\t *  @type {Number}\n\t\t\t */\n\t        this._timeoutIds = 0;\n\t        this.on('tick', this._timeoutLoop.bind(this));\n\t    };\n\t    Tone.extend(Tone.Context, Tone.Emitter);\n\t    Tone.Emitter.mixin(Tone.Context);\n\t    /**\n\t\t * defaults\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t    Tone.Context.defaults = {\n\t        'clockSource': 'worker',\n\t        'latencyHint': 'interactive',\n\t        'lookAhead': 0.1,\n\t        'updateInterval': 0.03\n\t    };\n\t    /**\n\t\t *  Define a property on this Tone.Context.\n\t\t *  This is used to extend the native AudioContext\n\t\t *  @param  {AudioContext}  context\n\t\t *  @param  {String}  prop\n\t\t *  @private\n\t\t */\n\t    Tone.Context.prototype._defineProperty = function (context, prop) {\n\t        if (Tone.isUndef(this[prop])) {\n\t            Object.defineProperty(this, prop, {\n\t                get: function () {\n\t                    if (typeof context[prop] === 'function') {\n\t                        return context[prop].bind(context);\n\t                    } else {\n\t                        return context[prop];\n\t                    }\n\t                },\n\t                set: function (val) {\n\t                    context[prop] = val;\n\t                }\n\t            });\n\t        }\n\t    };\n\t    /**\n\t\t *  The current audio context time\n\t\t *  @return  {Number}\n\t\t */\n\t    Tone.Context.prototype.now = function () {\n\t        return this._context.currentTime + this.lookAhead;\n\t    };\n\t    /**\n\t\t *  Promise which is invoked when the context is running.\n\t\t *  Tries to resume the context if it's not started.\n\t\t *  @return  {Promise}\n\t\t */\n\t    Tone.Context.prototype.ready = function () {\n\t        return new Promise(function (done) {\n\t            if (this._context.state === 'running') {\n\t                done();\n\t            } else {\n\t                this._context.resume().then(function () {\n\t                    done();\n\t                });\n\t            }\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t *  Promise which is invoked when the context is running.\n\t\t *  Tries to resume the context if it's not started.\n\t\t *  @return  {Promise}\n\t\t */\n\t    Tone.Context.prototype.close = function () {\n\t        return this._context.close().then(function () {\n\t            Tone.Context.emit('close', this);\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t *  Generate a looped buffer at some constant value.\n\t\t *  @param  {Number}  val\n\t\t *  @return  {BufferSourceNode}\n\t\t */\n\t    Tone.Context.prototype.getConstant = function (val) {\n\t        if (this._constants[val]) {\n\t            return this._constants[val];\n\t        } else {\n\t            var buffer = this._context.createBuffer(1, 128, this._context.sampleRate);\n\t            var arr = buffer.getChannelData(0);\n\t            for (var i = 0; i < arr.length; i++) {\n\t                arr[i] = val;\n\t            }\n\t            var constant = this._context.createBufferSource();\n\t            constant.channelCount = 1;\n\t            constant.channelCountMode = 'explicit';\n\t            constant.buffer = buffer;\n\t            constant.loop = true;\n\t            constant.start(0);\n\t            this._constants[val] = constant;\n\t            return constant;\n\t        }\n\t    };\n\t    /**\n\t\t *  The private loop which keeps track of the context scheduled timeouts\n\t\t *  Is invoked from the clock source\n\t\t *  @private\n\t\t */\n\t    Tone.Context.prototype._timeoutLoop = function () {\n\t        var now = this.now();\n\t        while (this._timeouts && this._timeouts.length && this._timeouts.peek().time <= now) {\n\t            this._timeouts.shift().callback();\n\t        }\n\t    };\n\t    /**\n\t\t *  A setTimeout which is gaurenteed by the clock source.\n\t\t *  Also runs in the offline context.\n\t\t *  @param  {Function}  fn       The callback to invoke\n\t\t *  @param  {Seconds}    timeout  The timeout in seconds\n\t\t *  @returns {Number} ID to use when invoking Tone.Context.clearTimeout\n\t\t */\n\t    Tone.Context.prototype.setTimeout = function (fn, timeout) {\n\t        this._timeoutIds++;\n\t        var now = this.now();\n\t        this._timeouts.add({\n\t            callback: fn,\n\t            time: now + timeout,\n\t            id: this._timeoutIds\n\t        });\n\t        return this._timeoutIds;\n\t    };\n\t    /**\n\t\t *  Clears a previously scheduled timeout with Tone.context.setTimeout\n\t\t *  @param  {Number}  id  The ID returned from setTimeout\n\t\t *  @return  {Tone.Context}  this\n\t\t */\n\t    Tone.Context.prototype.clearTimeout = function (id) {\n\t        this._timeouts.forEach(function (event) {\n\t            if (event.id === id) {\n\t                this.remove(event);\n\t            }\n\t        });\n\t        return this;\n\t    };\n\t    /**\n\t\t *  How often the Web Worker callback is invoked.\n\t\t *  This number corresponds to how responsive the scheduling\n\t\t *  can be. Context.updateInterval + Context.lookAhead gives you the\n\t\t *  total latency between scheduling an event and hearing it.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Context#\n\t\t *  @name updateInterval\n\t\t */\n\t    Object.defineProperty(Tone.Context.prototype, 'updateInterval', {\n\t        get: function () {\n\t            return this._ticker.updateInterval;\n\t        },\n\t        set: function (interval) {\n\t            this._ticker.updateInterval = interval;\n\t        }\n\t    });\n\t    /**\n\t\t *  What the source of the clock is, either \"worker\" (Web Worker [default]),\n\t\t *  \"timeout\" (setTimeout), or \"offline\" (none).\n\t\t *  @type {String}\n\t\t *  @memberOf Tone.Context#\n\t\t *  @name clockSource\n\t\t */\n\t    Object.defineProperty(Tone.Context.prototype, 'clockSource', {\n\t        get: function () {\n\t            return this._ticker.type;\n\t        },\n\t        set: function (type) {\n\t            this._ticker.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t *  The type of playback, which affects tradeoffs between audio\n\t\t *  output latency and responsiveness.\n\t\t *\n\t\t *  In addition to setting the value in seconds, the latencyHint also\n\t\t *  accepts the strings \"interactive\" (prioritizes low latency),\n\t\t *  \"playback\" (prioritizes sustained playback), \"balanced\" (balances\n\t\t *  latency and performance), and \"fastest\" (lowest latency, might glitch more often).\n\t\t *  @type {String|Seconds}\n\t\t *  @memberOf Tone.Context#\n\t\t *  @name latencyHint\n\t\t *  @example\n\t\t * //set the lookAhead to 0.3 seconds\n\t\t * Tone.context.latencyHint = 0.3;\n\t\t */\n\t    Object.defineProperty(Tone.Context.prototype, 'latencyHint', {\n\t        get: function () {\n\t            return this._latencyHint;\n\t        },\n\t        set: function (hint) {\n\t            var lookAhead = hint;\n\t            this._latencyHint = hint;\n\t            if (Tone.isString(hint)) {\n\t                switch (hint) {\n\t                case 'interactive':\n\t                    lookAhead = 0.1;\n\t                    this._context.latencyHint = hint;\n\t                    break;\n\t                case 'playback':\n\t                    lookAhead = 0.8;\n\t                    this._context.latencyHint = hint;\n\t                    break;\n\t                case 'balanced':\n\t                    lookAhead = 0.25;\n\t                    this._context.latencyHint = hint;\n\t                    break;\n\t                case 'fastest':\n\t                    this._context.latencyHint = 'interactive';\n\t                    lookAhead = 0.01;\n\t                    break;\n\t                }\n\t            }\n\t            this.lookAhead = lookAhead;\n\t            this.updateInterval = lookAhead / 3;\n\t        }\n\t    });\n\t    /**\n\t\t *  Unlike other dispose methods, this returns a Promise\n\t\t *  which executes when the context is closed and disposed\n\t\t *  @returns {Promise} this\n\t\t */\n\t    Tone.Context.prototype.dispose = function () {\n\t        return this.close().then(function () {\n\t            Tone.Emitter.prototype.dispose.call(this);\n\t            this._ticker.dispose();\n\t            this._ticker = null;\n\t            this._timeouts.dispose();\n\t            this._timeouts = null;\n\t            for (var con in this._constants) {\n\t                this._constants[con].disconnect();\n\t            }\n\t            this._constants = null;\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t * @class A class which provides a reliable callback using either\n\t\t *        a Web Worker, or if that isn't supported, falls back to setTimeout.\n\t\t * @private\n\t\t */\n\t    var Ticker = function (callback, type, updateInterval) {\n\t        /**\n\t\t\t * Either \"worker\" or \"timeout\"\n\t\t\t * @type {String}\n\t\t\t * @private\n\t\t\t */\n\t        this._type = type;\n\t        /**\n\t\t\t * The update interval of the worker\n\t\t\t * @private\n\t\t\t * @type {Number}\n\t\t\t */\n\t        this._updateInterval = updateInterval;\n\t        /**\n\t\t\t * The callback to invoke at regular intervals\n\t\t\t * @type {Function}\n\t\t\t * @private\n\t\t\t */\n\t        this._callback = Tone.defaultArg(callback, Tone.noOp);\n\t        //create the clock source for the first time\n\t        this._createClock();\n\t    };\n\t    /**\n\t\t * The possible ticker types\n\t\t * @private\n\t\t * @type {Object}\n\t\t */\n\t    Ticker.Type = {\n\t        Worker: 'worker',\n\t        Timeout: 'timeout',\n\t        Offline: 'offline'\n\t    };\n\t    /**\n\t\t *  Generate a web worker\n\t\t *  @return  {WebWorker}\n\t\t *  @private\n\t\t */\n\t    Ticker.prototype._createWorker = function () {\n\t        //URL Shim\n\t        window.URL = window.URL || window.webkitURL;\n\t        var blob = new Blob([//the initial timeout time\n\t            'var timeoutTime = ' + (this._updateInterval * 1000).toFixed(1) + ';' + //onmessage callback\n\t            'self.onmessage = function(msg){' + '\\ttimeoutTime = parseInt(msg.data);' + '};' + //the tick function which posts a message\n\t            //and schedules a new tick\n\t            'function tick(){' + '\\tsetTimeout(tick, timeoutTime);' + '\\tself.postMessage(\\'tick\\');' + '}' + //call tick initially\n\t            'tick();']);\n\t        var blobUrl = URL.createObjectURL(blob);\n\t        var worker = new Worker(blobUrl);\n\t        worker.onmessage = this._callback.bind(this);\n\t        this._worker = worker;\n\t    };\n\t    /**\n\t\t * Create a timeout loop\n\t\t * @private\n\t\t */\n\t    Ticker.prototype._createTimeout = function () {\n\t        this._timeout = setTimeout(function () {\n\t            this._createTimeout();\n\t            this._callback();\n\t        }.bind(this), this._updateInterval * 1000);\n\t    };\n\t    /**\n\t\t * Create the clock source.\n\t\t * @private\n\t\t */\n\t    Ticker.prototype._createClock = function () {\n\t        if (this._type === Ticker.Type.Worker) {\n\t            try {\n\t                this._createWorker();\n\t            } catch (e) {\n\t                // workers not supported, fallback to timeout\n\t                this._type = Ticker.Type.Timeout;\n\t                this._createClock();\n\t            }\n\t        } else if (this._type === Ticker.Type.Timeout) {\n\t            this._createTimeout();\n\t        }\n\t    };\n\t    /**\n\t\t * @memberOf Ticker#\n\t\t * @type {Number}\n\t\t * @name updateInterval\n\t\t * @private\n\t\t */\n\t    Object.defineProperty(Ticker.prototype, 'updateInterval', {\n\t        get: function () {\n\t            return this._updateInterval;\n\t        },\n\t        set: function (interval) {\n\t            this._updateInterval = Math.max(interval, 128 / 44100);\n\t            if (this._type === Ticker.Type.Worker) {\n\t                this._worker.postMessage(Math.max(interval * 1000, 1));\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The type of the ticker, either a worker or a timeout\n\t\t * @memberOf Ticker#\n\t\t * @type {Number}\n\t\t * @name type\n\t\t * @private\n\t\t */\n\t    Object.defineProperty(Ticker.prototype, 'type', {\n\t        get: function () {\n\t            return this._type;\n\t        },\n\t        set: function (type) {\n\t            this._disposeClock();\n\t            this._type = type;\n\t            this._createClock();\n\t        }\n\t    });\n\t    /**\n\t\t * Clean up the current clock source\n\t\t * @private\n\t\t */\n\t    Ticker.prototype._disposeClock = function () {\n\t        if (this._timeout) {\n\t            clearTimeout(this._timeout);\n\t            this._timeout = null;\n\t        }\n\t        if (this._worker) {\n\t            this._worker.terminate();\n\t            this._worker.onmessage = null;\n\t            this._worker = null;\n\t        }\n\t    };\n\t    /**\n\t\t * Clean up\n\t\t * @private\n\t\t */\n\t    Ticker.prototype.dispose = function () {\n\t        this._disposeClock();\n\t        this._callback = null;\n\t    };\n\t    /**\n\t\t *  Shim all connect/disconnect and some deprecated methods which are still in\n\t\t *  some older implementations.\n\t\t *  @private\n\t\t */\n\t    Tone.getContext(function () {\n\t        var nativeConnect = AudioNode.prototype.connect;\n\t        var nativeDisconnect = AudioNode.prototype.disconnect;\n\t        //replace the old connect method\n\t        function toneConnect(B, outNum, inNum) {\n\t            if (B.input) {\n\t                inNum = Tone.defaultArg(inNum, 0);\n\t                if (Tone.isArray(B.input)) {\n\t                    return this.connect(B.input[inNum]);\n\t                } else {\n\t                    return this.connect(B.input, outNum, inNum);\n\t                }\n\t            } else {\n\t                try {\n\t                    if (B instanceof AudioNode) {\n\t                        nativeConnect.call(this, B, outNum, inNum);\n\t                        return B;\n\t                    } else {\n\t                        nativeConnect.call(this, B, outNum);\n\t                        return B;\n\t                    }\n\t                } catch (e) {\n\t                    throw new Error('error connecting to node: ' + B + '\\n' + e);\n\t                }\n\t            }\n\t        }\n\t        //replace the old disconnect method\n\t        function toneDisconnect(B, outNum, inNum) {\n\t            if (B && B.input && Tone.isArray(B.input)) {\n\t                inNum = Tone.defaultArg(inNum, 0);\n\t                this.disconnect(B.input[inNum], outNum, 0);\n\t            } else if (B && B.input) {\n\t                this.disconnect(B.input, outNum, inNum);\n\t            } else {\n\t                try {\n\t                    nativeDisconnect.apply(this, arguments);\n\t                } catch (e) {\n\t                    throw new Error('error disconnecting node: ' + B + '\\n' + e);\n\t                }\n\t            }\n\t        }\n\t        if (AudioNode.prototype.connect !== toneConnect) {\n\t            AudioNode.prototype.connect = toneConnect;\n\t            AudioNode.prototype.disconnect = toneDisconnect;\n\t        }\n\t    });\n\t    // set the audio context initially, and if one is not already created\n\t    if (Tone.supported && !Tone.initialized) {\n\t        Tone.context = new Tone.Context();\n\t        // log on first initialization\n\t        // allow optional silencing of this log\n\t        if (!window.TONE_SILENCE_VERSION_LOGGING) {\n\t            // eslint-disable-next-line no-console\n\t            console.log('%c * Tone.js ' + Tone.version + ' * ', 'background: #000; color: #fff');\n\t        }\n\t    } else if (!Tone.supported) {\n\t        // eslint-disable-next-line no-console\n\t        console.warn('This browser does not support Tone.js');\n\t    }\n\t    return Tone.Context;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.AudioNode is the base class for classes which process audio.\n\t\t *         AudioNodes have inputs and outputs.\n\t\t *  @param\t{AudioContext=} context\tThe audio context to use with the class\n\t\t *  @extends {Tone}\n\t\t */\n\t    Tone.AudioNode = function () {\n\t        Tone.call(this);\n\t        //use the default context if one is not passed in\n\t        var options = Tone.defaults(arguments, ['context'], { 'context': Tone.context });\n\t        /**\n\t\t\t * The AudioContext of this instance\n\t\t\t * @private\n\t\t\t * @type {AudioContext}\n\t\t\t */\n\t        this._context = options.context;\n\t    };\n\t    Tone.extend(Tone.AudioNode);\n\t    /**\n\t\t * Get the audio context belonging to this instance.\n\t\t * @type {Tone.Context}\n\t\t * @memberOf Tone.AudioNode#\n\t\t * @name context\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.AudioNode.prototype, 'context', {\n\t        get: function () {\n\t            return this._context;\n\t        }\n\t    });\n\t    /**\n\t\t *  Create input and outputs for this object.\n\t\t *  @param  {Number}  [input=0]   The number of inputs\n\t\t *  @param  {Number}  [outputs=0]  The number of outputs\n\t\t *  @return  {Tone.AudioNode}  this\n\t\t *  @private\n\t\t */\n\t    Tone.AudioNode.prototype.createInsOuts = function (inputs, outputs) {\n\t        if (inputs === 1) {\n\t            this.input = this.context.createGain();\n\t        } else if (inputs > 1) {\n\t            this.input = new Array(inputs);\n\t        }\n\t        if (outputs === 1) {\n\t            this.output = this.context.createGain();\n\t        } else if (outputs > 1) {\n\t            this.output = new Array(outputs);\n\t        }\n\t    };\n\t    /**\n\t\t *  channelCount is the number of channels used when up-mixing and down-mixing\n\t\t *  connections to any inputs to the node. The default value is 2 except for\n\t\t *  specific nodes where its value is specially determined.\n\t\t *\n\t\t *  @memberof Tone.AudioNode#\n\t\t *  @type {Number}\n\t\t *  @name channelCount\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.AudioNode.prototype, 'channelCount', {\n\t        get: function () {\n\t            return this.output.channelCount;\n\t        },\n\t        set: function (c) {\n\t            return this.output.channelCount = c;\n\t        }\n\t    });\n\t    /**\n\t\t *  channelCountMode determines how channels will be counted when up-mixing and\n\t\t *  down-mixing connections to any inputs to the node.\n\t\t *  The default value is \"max\". This attribute has no effect for nodes with no inputs.\n\t\t *  @memberof Tone.AudioNode#\n\t\t *  @type {String}\n\t\t *  @name channelCountMode\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.AudioNode.prototype, 'channelCountMode', {\n\t        get: function () {\n\t            return this.output.channelCountMode;\n\t        },\n\t        set: function (m) {\n\t            return this.output.channelCountMode = m;\n\t        }\n\t    });\n\t    /**\n\t\t *  channelInterpretation determines how individual channels will be treated\n\t\t *  when up-mixing and down-mixing connections to any inputs to the node.\n\t\t *  The default value is \"speakers\".\n\t\t *  @memberof Tone.AudioNode#\n\t\t *  @type {String}\n\t\t *  @name channelInterpretation\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.AudioNode.prototype, 'channelInterpretation', {\n\t        get: function () {\n\t            return this.output.channelInterpretation;\n\t        },\n\t        set: function (i) {\n\t            return this.output.channelInterpretation = i;\n\t        }\n\t    });\n\t    /**\n\t\t *  The number of inputs feeding into the AudioNode.\n\t\t *  For source nodes, this will be 0.\n\t\t *  @type {Number}\n\t\t *  @name numberOfInputs\n\t\t *  @memberof Tone.AudioNode#\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.AudioNode.prototype, 'numberOfInputs', {\n\t        get: function () {\n\t            if (this.input) {\n\t                if (Tone.isArray(this.input)) {\n\t                    return this.input.length;\n\t                } else {\n\t                    return 1;\n\t                }\n\t            } else {\n\t                return 0;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  The number of outputs coming out of the AudioNode.\n\t\t *  @type {Number}\n\t\t *  @name numberOfOutputs\n\t\t *  @memberof Tone.AudioNode#\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.AudioNode.prototype, 'numberOfOutputs', {\n\t        get: function () {\n\t            if (this.output) {\n\t                if (Tone.isArray(this.output)) {\n\t                    return this.output.length;\n\t                } else {\n\t                    return 1;\n\t                }\n\t            } else {\n\t                return 0;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * Called when an audio param connects to this node\n\t\t * @private\n\t\t */\n\t    Tone.AudioNode.prototype._onConnect = function () {\n\t    };\n\t    /**\n\t\t *  connect the output of a ToneNode to an AudioParam, AudioNode, or ToneNode\n\t\t *  @param  {Tone | AudioParam | AudioNode} unit\n\t\t *  @param {number} [outputNum=0] optionally which output to connect from\n\t\t *  @param {number} [inputNum=0] optionally which input to connect to\n\t\t *  @returns {Tone.AudioNode} this\n\t\t */\n\t    Tone.AudioNode.prototype.connect = function (unit, outputNum, inputNum) {\n\t        if (unit._onConnect) {\n\t            unit._onConnect(this);\n\t        }\n\t        if (Tone.isArray(this.output)) {\n\t            outputNum = Tone.defaultArg(outputNum, 0);\n\t            this.output[outputNum].connect(unit, 0, inputNum);\n\t        } else {\n\t            this.output.connect(unit, outputNum, inputNum);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  disconnect the output\n\t\t *  @param {Number|AudioNode} output Either the output index to disconnect\n\t\t *                                   if the output is an array, or the\n\t\t *                                   node to disconnect from.\n\t\t *  @returns {Tone.AudioNode} this\n\t\t */\n\t    Tone.AudioNode.prototype.disconnect = function (destination, outputNum, inputNum) {\n\t        if (Tone.isArray(this.output)) {\n\t            if (Tone.isNumber(destination)) {\n\t                this.output[destination].disconnect();\n\t            } else {\n\t                outputNum = Tone.defaultArg(outputNum, 0);\n\t                this.output[outputNum].disconnect(destination, 0, inputNum);\n\t            }\n\t        } else {\n\t            this.output.disconnect.apply(this.output, arguments);\n\t        }\n\t    };\n\t    /**\n\t\t *  Connect the output of this node to the rest of the nodes in series.\n\t\t *  @example\n\t\t *  //connect a node to an effect, panVol and then to the master output\n\t\t *  node.chain(effect, panVol, Tone.Master);\n\t\t *  @param {...AudioParam|Tone|AudioNode} nodes\n\t\t *  @returns {Tone.AudioNode} this\n\t\t *  @private\n\t\t */\n\t    Tone.AudioNode.prototype.chain = function () {\n\t        var currentUnit = this;\n\t        for (var i = 0; i < arguments.length; i++) {\n\t            var toUnit = arguments[i];\n\t            currentUnit.connect(toUnit);\n\t            currentUnit = toUnit;\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  connect the output of this node to the rest of the nodes in parallel.\n\t\t *  @param {...AudioParam|Tone|AudioNode} nodes\n\t\t *  @returns {Tone.AudioNode} this\n\t\t *  @private\n\t\t */\n\t    Tone.AudioNode.prototype.fan = function () {\n\t        for (var i = 0; i < arguments.length; i++) {\n\t            this.connect(arguments[i]);\n\t        }\n\t        return this;\n\t    };\n\t    if (window.AudioNode) {\n\t        //give native nodes chain and fan methods\n\t        AudioNode.prototype.chain = Tone.AudioNode.prototype.chain;\n\t        AudioNode.prototype.fan = Tone.AudioNode.prototype.fan;\n\t    }\n\t    /**\n\t\t * Dispose and disconnect\n\t\t * @return {Tone.AudioNode} this\n\t\t */\n\t    Tone.AudioNode.prototype.dispose = function () {\n\t        if (Tone.isDefined(this.input)) {\n\t            if (this.input instanceof AudioNode) {\n\t                this.input.disconnect();\n\t            }\n\t            this.input = null;\n\t        }\n\t        if (Tone.isDefined(this.output)) {\n\t            if (this.output instanceof AudioNode) {\n\t                this.output.disconnect();\n\t            }\n\t            this.output = null;\n\t        }\n\t        this._context = null;\n\t        return this;\n\t    };\n\t    return Tone.AudioNode;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Base class for all Signals. Used Internally.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone}\n\t\t */\n\t    Tone.SignalBase = function () {\n\t        Tone.AudioNode.call(this);\n\t    };\n\t    Tone.extend(Tone.SignalBase, Tone.AudioNode);\n\t    /**\n\t\t *  When signals connect to other signals or AudioParams,\n\t\t *  they take over the output value of that signal or AudioParam.\n\t\t *  For all other nodes, the behavior is the same as a default <code>connect</code>.\n\t\t *\n\t\t *  @override\n\t\t *  @param {AudioParam|AudioNode|Tone.Signal|Tone} node\n\t\t *  @param {number} [outputNumber=0] The output number to connect from.\n\t\t *  @param {number} [inputNumber=0] The input number to connect to.\n\t\t *  @returns {Tone.SignalBase} this\n\t\t */\n\t    Tone.SignalBase.prototype.connect = function (node, outputNumber, inputNumber) {\n\t        //zero it out so that the signal can have full control\n\t        if (Tone.Signal && Tone.Signal === node.constructor || Tone.Param && Tone.Param === node.constructor) {\n\t            //cancel changes\n\t            node._param.cancelScheduledValues(0);\n\t            //reset the value\n\t            node._param.value = 0;\n\t            //mark the value as overridden\n\t            node.overridden = true;\n\t        } else if (node instanceof AudioParam) {\n\t            node.cancelScheduledValues(0);\n\t            node.value = 0;\n\t        }\n\t        Tone.AudioNode.prototype.connect.call(this, node, outputNumber, inputNumber);\n\t        return this;\n\t    };\n\t    return Tone.SignalBase;\n\t});\n\tModule(function (Tone) {\n\t    if (Tone.supported) {\n\t        //fixes safari only bug which is still present in 11\n\t        var ua = navigator.userAgent.toLowerCase();\n\t        var isSafari = ua.includes('safari') && !ua.includes('chrome');\n\t        if (isSafari) {\n\t            var WaveShaperNode = function (context) {\n\t                this._internalNode = this.input = this.output = context._native_createWaveShaper();\n\t                this._curve = null;\n\t                for (var prop in this._internalNode) {\n\t                    this._defineProperty(this._internalNode, prop);\n\t                }\n\t            };\n\t            Object.defineProperty(WaveShaperNode.prototype, 'curve', {\n\t                get: function () {\n\t                    return this._curve;\n\t                },\n\t                set: function (curve) {\n\t                    this._curve = curve;\n\t                    var array = new Float32Array(curve.length + 1);\n\t                    array.set(curve, 1);\n\t                    array[0] = curve[0];\n\t                    this._internalNode.curve = array;\n\t                }\n\t            });\n\t            WaveShaperNode.prototype._defineProperty = function (context, prop) {\n\t                if (Tone.isUndef(this[prop])) {\n\t                    Object.defineProperty(this, prop, {\n\t                        get: function () {\n\t                            if (typeof context[prop] === 'function') {\n\t                                return context[prop].bind(context);\n\t                            } else {\n\t                                return context[prop];\n\t                            }\n\t                        },\n\t                        set: function (val) {\n\t                            context[prop] = val;\n\t                        }\n\t                    });\n\t                }\n\t            };\n\t            AudioContext.prototype._native_createWaveShaper = AudioContext.prototype.createWaveShaper;\n\t            AudioContext.prototype.createWaveShaper = function () {\n\t                return new WaveShaperNode(this);\n\t            };\n\t        }\n\t    }\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Wraps the native Web Audio API\n\t\t *         [WaveShaperNode](http://webaudio.github.io/web-audio-api/#the-waveshapernode-interface).\n\t\t *\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @constructor\n\t\t *  @param {function|Array|Number} mapping The function used to define the values.\n\t\t *                                    The mapping function should take two arguments:\n\t\t *                                    the first is the value at the current position\n\t\t *                                    and the second is the array position.\n\t\t *                                    If the argument is an array, that array will be\n\t\t *                                    set as the wave shaping function. The input\n\t\t *                                    signal is an AudioRange [-1, 1] value and the output\n\t\t *                                    signal can take on any numerical values.\n\t\t *\n\t\t *  @param {Number} [bufferLen=1024] The length of the WaveShaperNode buffer.\n\t\t *  @example\n\t\t * var timesTwo = new Tone.WaveShaper(function(val){\n\t\t * \treturn val * 2;\n\t\t * }, 2048);\n\t\t *  @example\n\t\t * //a waveshaper can also be constructed with an array of values\n\t\t * var invert = new Tone.WaveShaper([1, -1]);\n\t\t */\n\t    Tone.WaveShaper = function (mapping, bufferLen) {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  the waveshaper\n\t\t\t *  @type {WaveShaperNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._shaper = this.input = this.output = this.context.createWaveShaper();\n\t        /**\n\t\t\t *  the waveshapers curve\n\t\t\t *  @type {Float32Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._curve = null;\n\t        if (Array.isArray(mapping)) {\n\t            this.curve = mapping;\n\t        } else if (isFinite(mapping) || Tone.isUndef(mapping)) {\n\t            this._curve = new Float32Array(Tone.defaultArg(mapping, 1024));\n\t        } else if (Tone.isFunction(mapping)) {\n\t            this._curve = new Float32Array(Tone.defaultArg(bufferLen, 1024));\n\t            this.setMap(mapping);\n\t        }\n\t    };\n\t    Tone.extend(Tone.WaveShaper, Tone.SignalBase);\n\t    /**\n\t\t *  Uses a mapping function to set the value of the curve.\n\t\t *  @param {function} mapping The function used to define the values.\n\t\t *                            The mapping function take two arguments:\n\t\t *                            the first is the value at the current position\n\t\t *                            which goes from -1 to 1 over the number of elements\n\t\t *                            in the curve array. The second argument is the array position.\n\t\t *  @returns {Tone.WaveShaper} this\n\t\t *  @example\n\t\t * //map the input signal from [-1, 1] to [0, 10]\n\t\t * shaper.setMap(function(val, index){\n\t\t * \treturn (val + 1) * 5;\n\t\t * })\n\t\t */\n\t    Tone.WaveShaper.prototype.setMap = function (mapping) {\n\t        var array = new Array(this._curve.length);\n\t        for (var i = 0, len = this._curve.length; i < len; i++) {\n\t            var normalized = i / (len - 1) * 2 - 1;\n\t            array[i] = mapping(normalized, i);\n\t        }\n\t        this.curve = array;\n\t        return this;\n\t    };\n\t    /**\n\t\t * The array to set as the waveshaper curve. For linear curves\n\t\t * array length does not make much difference, but for complex curves\n\t\t * longer arrays will provide smoother interpolation.\n\t\t * @memberOf Tone.WaveShaper#\n\t\t * @type {Array}\n\t\t * @name curve\n\t\t */\n\t    Object.defineProperty(Tone.WaveShaper.prototype, 'curve', {\n\t        get: function () {\n\t            return this._shaper.curve;\n\t        },\n\t        set: function (mapping) {\n\t            this._curve = new Float32Array(mapping);\n\t            this._shaper.curve = this._curve;\n\t        }\n\t    });\n\t    /**\n\t\t * Specifies what type of oversampling (if any) should be used when\n\t\t * applying the shaping curve. Can either be \"none\", \"2x\" or \"4x\".\n\t\t * @memberOf Tone.WaveShaper#\n\t\t * @type {string}\n\t\t * @name oversample\n\t\t */\n\t    Object.defineProperty(Tone.WaveShaper.prototype, 'oversample', {\n\t        get: function () {\n\t            return this._shaper.oversample;\n\t        },\n\t        set: function (oversampling) {\n\t            if ([\n\t                    'none',\n\t                    '2x',\n\t                    '4x'\n\t                ].includes(oversampling)) {\n\t                this._shaper.oversample = oversampling;\n\t            } else {\n\t                throw new RangeError('Tone.WaveShaper: oversampling must be either \\'none\\', \\'2x\\', or \\'4x\\'');\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.WaveShaper} this\n\t\t */\n\t    Tone.WaveShaper.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._shaper.disconnect();\n\t        this._shaper = null;\n\t        this._curve = null;\n\t        return this;\n\t    };\n\t    return Tone.WaveShaper;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.TimeBase is a flexible encoding of time\n\t\t *         which can be evaluated to and from a string.\n\t\t *  @extends {Tone}\n\t\t *  @param  {Time}  val    The time value as a number or string\n\t\t *  @param  {String=}  units  Unit values\n\t\t *  @example\n\t\t * Tone.TimeBase(4, \"n\")\n\t\t * Tone.TimeBase(2, \"t\")\n\t\t * Tone.TimeBase(\"2t\")\n\t\t * Tone.TimeBase(\"2t\") + Tone.TimeBase(\"4n\");\n\t\t */\n\t    Tone.TimeBase = function (val, units) {\n\t        //allows it to be constructed with or without 'new'\n\t        if (this instanceof Tone.TimeBase) {\n\t            /**\n\t\t\t\t *  The value\n\t\t\t\t *  @type  {Number|String|Tone.TimeBase}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._val = val;\n\t            /**\n\t\t\t\t * The units\n\t\t\t\t * @type {String?}\n\t\t\t\t * @private\n\t\t\t\t */\n\t            this._units = units;\n\t            //test if the value is a string representation of a number\n\t            if (Tone.isUndef(this._units) && Tone.isString(this._val) && // eslint-disable-next-line eqeqeq\n\t                parseFloat(this._val) == this._val && this._val.charAt(0) !== '+') {\n\t                this._val = parseFloat(this._val);\n\t                this._units = this._defaultUnits;\n\t            } else if (val && val.constructor === this.constructor) {\n\t                //if they're the same type, just copy values over\n\t                this._val = val._val;\n\t                this._units = val._units;\n\t            } else if (val instanceof Tone.TimeBase) {\n\t                switch (this._defaultUnits) {\n\t                case 's':\n\t                    this._val = val.toSeconds();\n\t                    break;\n\t                case 'i':\n\t                    this._val = val.toTicks();\n\t                    break;\n\t                case 'hz':\n\t                    this._val = val.toFrequency();\n\t                    break;\n\t                case 'midi':\n\t                    this._val = val.toMidi();\n\t                    break;\n\t                default:\n\t                    throw new Error('Unrecognized default units ' + this._defaultUnits);\n\t                }\n\t            }\n\t        } else {\n\t            return new Tone.TimeBase(val, units);\n\t        }\n\t    };\n\t    Tone.extend(Tone.TimeBase);\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tABSTRACT SYNTAX TREE PARSER\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  All the primary expressions.\n\t\t *  @private\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.TimeBase.prototype._expressions = {\n\t        'n': {\n\t            regexp: /^(\\d+)n(\\.?)$/i,\n\t            method: function (value, dot) {\n\t                value = parseInt(value);\n\t                var scalar = dot === '.' ? 1.5 : 1;\n\t                if (value === 1) {\n\t                    return this._beatsToUnits(this._getTimeSignature()) * scalar;\n\t                } else {\n\t                    return this._beatsToUnits(4 / value) * scalar;\n\t                }\n\t            }\n\t        },\n\t        't': {\n\t            regexp: /^(\\d+)t$/i,\n\t            method: function (value) {\n\t                value = parseInt(value);\n\t                return this._beatsToUnits(8 / (parseInt(value) * 3));\n\t            }\n\t        },\n\t        'm': {\n\t            regexp: /^(\\d+)m$/i,\n\t            method: function (value) {\n\t                return this._beatsToUnits(parseInt(value) * this._getTimeSignature());\n\t            }\n\t        },\n\t        'i': {\n\t            regexp: /^(\\d+)i$/i,\n\t            method: function (value) {\n\t                return this._ticksToUnits(parseInt(value));\n\t            }\n\t        },\n\t        'hz': {\n\t            regexp: /^(\\d+(?:\\.\\d+)?)hz$/i,\n\t            method: function (value) {\n\t                return this._frequencyToUnits(parseFloat(value));\n\t            }\n\t        },\n\t        'tr': {\n\t            regexp: /^(\\d+(?:\\.\\d+)?):(\\d+(?:\\.\\d+)?):?(\\d+(?:\\.\\d+)?)?$/,\n\t            method: function (m, q, s) {\n\t                var total = 0;\n\t                if (m && m !== '0') {\n\t                    total += this._beatsToUnits(this._getTimeSignature() * parseFloat(m));\n\t                }\n\t                if (q && q !== '0') {\n\t                    total += this._beatsToUnits(parseFloat(q));\n\t                }\n\t                if (s && s !== '0') {\n\t                    total += this._beatsToUnits(parseFloat(s) / 4);\n\t                }\n\t                return total;\n\t            }\n\t        },\n\t        's': {\n\t            regexp: /^(\\d+(?:\\.\\d+)?)s$/,\n\t            method: function (value) {\n\t                return this._secondsToUnits(parseFloat(value));\n\t            }\n\t        },\n\t        'samples': {\n\t            regexp: /^(\\d+)samples$/,\n\t            method: function (value) {\n\t                return parseInt(value) / this.context.sampleRate;\n\t            }\n\t        },\n\t        'default': {\n\t            regexp: /^(\\d+(?:\\.\\d+)?)$/,\n\t            method: function (value) {\n\t                return this._expressions[this._defaultUnits].method.call(this, value);\n\t            }\n\t        }\n\t    };\n\t    /**\n\t\t *  The default units if none are given.\n\t\t *  @type {String}\n\t\t *  @private\n\t\t */\n\t    Tone.TimeBase.prototype._defaultUnits = 's';\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tTRANSPORT FALLBACKS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t * Return the bpm, or 120 if Transport is not available\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t    Tone.TimeBase.prototype._getBpm = function () {\n\t        if (Tone.Transport) {\n\t            return Tone.Transport.bpm.value;\n\t        } else {\n\t            return 120;\n\t        }\n\t    };\n\t    /**\n\t\t * Return the timeSignature or 4 if Transport is not available\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t    Tone.TimeBase.prototype._getTimeSignature = function () {\n\t        if (Tone.Transport) {\n\t            return Tone.Transport.timeSignature;\n\t        } else {\n\t            return 4;\n\t        }\n\t    };\n\t    /**\n\t\t * Return the PPQ or 192 if Transport is not available\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t    Tone.TimeBase.prototype._getPPQ = function () {\n\t        if (Tone.Transport) {\n\t            return Tone.Transport.PPQ;\n\t        } else {\n\t            return 192;\n\t        }\n\t    };\n\t    /**\n\t\t * Return the current time in whichever context is relevant\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t    Tone.TimeBase.prototype._now = function () {\n\t        return this.now();\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tUNIT CONVERSIONS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Returns the value of a frequency in the current units\n\t\t *  @param {Frequency} freq\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.TimeBase.prototype._frequencyToUnits = function (freq) {\n\t        return 1 / freq;\n\t    };\n\t    /**\n\t\t *  Return the value of the beats in the current units\n\t\t *  @param {Number} beats\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.TimeBase.prototype._beatsToUnits = function (beats) {\n\t        return 60 / this._getBpm() * beats;\n\t    };\n\t    /**\n\t\t *  Returns the value of a second in the current units\n\t\t *  @param {Seconds} seconds\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.TimeBase.prototype._secondsToUnits = function (seconds) {\n\t        return seconds;\n\t    };\n\t    /**\n\t\t *  Returns the value of a tick in the current time units\n\t\t *  @param {Ticks} ticks\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.TimeBase.prototype._ticksToUnits = function (ticks) {\n\t        return ticks * (this._beatsToUnits(1) / this._getPPQ());\n\t    };\n\t    /**\n\t\t * With no arguments, return 'now'\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.TimeBase.prototype._noArg = function () {\n\t        return this._now();\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tEXPRESSIONS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Evaluate the time value. Returns the time\n\t\t *  in seconds.\n\t\t *  @return  {Seconds}\n\t\t */\n\t    Tone.TimeBase.prototype.valueOf = function () {\n\t        if (Tone.isUndef(this._val)) {\n\t            return this._noArg();\n\t        } else if (Tone.isString(this._val) && Tone.isUndef(this._units)) {\n\t            for (var units in this._expressions) {\n\t                if (this._expressions[units].regexp.test(this._val.trim())) {\n\t                    this._units = units;\n\t                    break;\n\t                }\n\t            }\n\t        }\n\t        if (Tone.isDefined(this._units)) {\n\t            var expr = this._expressions[this._units];\n\t            var matching = this._val.toString().trim().match(expr.regexp);\n\t            if (matching) {\n\t                return expr.method.apply(this, matching.slice(1));\n\t            } else {\n\t                return expr.method.call(this, parseFloat(this._val));\n\t            }\n\t        } else {\n\t            return this._val;\n\t        }\n\t    };\n\t    /**\n\t\t *  Return the value in seconds\n\t\t *  @return {Seconds}\n\t\t */\n\t    Tone.TimeBase.prototype.toSeconds = function () {\n\t        return this.valueOf();\n\t    };\n\t    /**\n\t\t *  Return the value in hertz\n\t\t *  @return {Frequency}\n\t\t */\n\t    Tone.TimeBase.prototype.toFrequency = function () {\n\t        return 1 / this.toSeconds();\n\t    };\n\t    /**\n\t\t *  Return the time in samples\n\t\t *  @return  {Samples}\n\t\t */\n\t    Tone.TimeBase.prototype.toSamples = function () {\n\t        return this.toSeconds() * this.context.sampleRate;\n\t    };\n\t    /**\n\t\t *  Return the time in milliseconds.\n\t\t *  @return  {Milliseconds}\n\t\t */\n\t    Tone.TimeBase.prototype.toMilliseconds = function () {\n\t        return this.toSeconds() * 1000;\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @return {Tone.TimeBase} this\n\t\t */\n\t    Tone.TimeBase.prototype.dispose = function () {\n\t        this._val = null;\n\t        this._units = null;\n\t    };\n\t    return Tone.TimeBase;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.Frequency is a primitive type for encoding Frequency values.\n\t\t *         Eventually all time values are evaluated to hertz\n\t\t *         using the `eval` method.\n\t\t *  @constructor\n\t\t *  @extends {Tone.TimeBase}\n\t\t *  @param  {String|Number}  val    The time value.\n\t\t *  @param  {String=}  units  The units of the value.\n\t\t *  @example\n\t\t * Tone.Frequency(\"C3\") // 261\n\t\t * Tone.Frequency(38, \"midi\") //\n\t\t * Tone.Frequency(\"C3\").transpose(4);\n\t\t */\n\t    Tone.Frequency = function (val, units) {\n\t        if (this instanceof Tone.Frequency) {\n\t            Tone.TimeBase.call(this, val, units);\n\t        } else {\n\t            return new Tone.Frequency(val, units);\n\t        }\n\t    };\n\t    Tone.extend(Tone.Frequency, Tone.TimeBase);\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tAUGMENT BASE EXPRESSIONS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    Tone.Frequency.prototype._expressions = Object.assign({}, Tone.TimeBase.prototype._expressions, {\n\t        'midi': {\n\t            regexp: /^(\\d+(?:\\.\\d+)?midi)/,\n\t            method: function (value) {\n\t                if (this._defaultUnits === 'midi') {\n\t                    return value;\n\t                } else {\n\t                    return Tone.Frequency.mtof(value);\n\t                }\n\t            }\n\t        },\n\t        'note': {\n\t            regexp: /^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i,\n\t            method: function (pitch, octave) {\n\t                var index = noteToScaleIndex[pitch.toLowerCase()];\n\t                var noteNumber = index + (parseInt(octave) + 1) * 12;\n\t                if (this._defaultUnits === 'midi') {\n\t                    return noteNumber;\n\t                } else {\n\t                    return Tone.Frequency.mtof(noteNumber);\n\t                }\n\t            }\n\t        },\n\t        'tr': {\n\t            regexp: /^(\\d+(?:\\.\\d+)?):(\\d+(?:\\.\\d+)?):?(\\d+(?:\\.\\d+)?)?/,\n\t            method: function (m, q, s) {\n\t                var total = 1;\n\t                if (m && m !== '0') {\n\t                    total *= this._beatsToUnits(this._getTimeSignature() * parseFloat(m));\n\t                }\n\t                if (q && q !== '0') {\n\t                    total *= this._beatsToUnits(parseFloat(q));\n\t                }\n\t                if (s && s !== '0') {\n\t                    total *= this._beatsToUnits(parseFloat(s) / 4);\n\t                }\n\t                return total;\n\t            }\n\t        }\n\t    });\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tEXPRESSIONS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Transposes the frequency by the given number of semitones.\n\t\t *  @param  {Interval}  interval\n\t\t *  @return  {Tone.Frequency} A new transposed frequency\n\t\t *  @example\n\t\t * Tone.Frequency(\"A4\").transpose(3); //\"C5\"\n\t\t */\n\t    Tone.Frequency.prototype.transpose = function (interval) {\n\t        return new this.constructor(this.valueOf() * Tone.intervalToFrequencyRatio(interval));\n\t    };\n\t    /**\n\t\t *  Takes an array of semitone intervals and returns\n\t\t *  an array of frequencies transposed by those intervals.\n\t\t *  @param  {Array}  intervals\n\t\t *  @return  {Array<Tone.Frequency>} Returns an array of Frequencies\n\t\t *  @example\n\t\t * Tone.Frequency(\"A4\").harmonize([0, 3, 7]); //[\"A4\", \"C5\", \"E5\"]\n\t\t */\n\t    Tone.Frequency.prototype.harmonize = function (intervals) {\n\t        return intervals.map(function (interval) {\n\t            return this.transpose(interval);\n\t        }.bind(this));\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tUNIT CONVERSIONS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Return the value of the frequency as a MIDI note\n\t\t *  @return  {MIDI}\n\t\t *  @example\n\t\t * Tone.Frequency(\"C4\").toMidi(); //60\n\t\t */\n\t    Tone.Frequency.prototype.toMidi = function () {\n\t        return Tone.Frequency.ftom(this.valueOf());\n\t    };\n\t    /**\n\t\t *  Return the value of the frequency in Scientific Pitch Notation\n\t\t *  @return  {Note}\n\t\t *  @example\n\t\t * Tone.Frequency(69, \"midi\").toNote(); //\"A4\"\n\t\t */\n\t    Tone.Frequency.prototype.toNote = function () {\n\t        var freq = this.toFrequency();\n\t        var log = Math.log2(freq / Tone.Frequency.A4);\n\t        var noteNumber = Math.round(12 * log) + 57;\n\t        var octave = Math.floor(noteNumber / 12);\n\t        if (octave < 0) {\n\t            noteNumber += -12 * octave;\n\t        }\n\t        var noteName = scaleIndexToNote[noteNumber % 12];\n\t        return noteName + octave.toString();\n\t    };\n\t    /**\n\t\t *  Return the duration of one cycle in seconds.\n\t\t *  @return  {Seconds}\n\t\t */\n\t    Tone.Frequency.prototype.toSeconds = function () {\n\t        return 1 / Tone.TimeBase.prototype.toSeconds.call(this);\n\t    };\n\t    /**\n\t\t *  Return the value in Hertz\n\t\t *  @return  {Frequency}\n\t\t */\n\t    Tone.Frequency.prototype.toFrequency = function () {\n\t        return Tone.TimeBase.prototype.toFrequency.call(this);\n\t    };\n\t    /**\n\t\t *  Return the duration of one cycle in ticks\n\t\t *  @return  {Ticks}\n\t\t */\n\t    Tone.Frequency.prototype.toTicks = function () {\n\t        var quarterTime = this._beatsToUnits(1);\n\t        var quarters = this.valueOf() / quarterTime;\n\t        return Math.floor(quarters * Tone.Transport.PPQ);\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tUNIT CONVERSIONS HELPERS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  With no arguments, return 0\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Frequency.prototype._noArg = function () {\n\t        return 0;\n\t    };\n\t    /**\n\t\t *  Returns the value of a frequency in the current units\n\t\t *  @param {Frequency} freq\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Frequency.prototype._frequencyToUnits = function (freq) {\n\t        return freq;\n\t    };\n\t    /**\n\t\t *  Returns the value of a tick in the current time units\n\t\t *  @param {Ticks} ticks\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Frequency.prototype._ticksToUnits = function (ticks) {\n\t        return 1 / (ticks * 60 / (Tone.Transport.bpm.value * Tone.Transport.PPQ));\n\t    };\n\t    /**\n\t\t *  Return the value of the beats in the current units\n\t\t *  @param {Number} beats\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Frequency.prototype._beatsToUnits = function (beats) {\n\t        return 1 / Tone.TimeBase.prototype._beatsToUnits.call(this, beats);\n\t    };\n\t    /**\n\t\t *  Returns the value of a second in the current units\n\t\t *  @param {Seconds} seconds\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Frequency.prototype._secondsToUnits = function (seconds) {\n\t        return 1 / seconds;\n\t    };\n\t    /**\n\t\t *  The default units if none are given.\n\t\t *  @private\n\t\t */\n\t    Tone.Frequency.prototype._defaultUnits = 'hz';\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tFREQUENCY CONVERSIONS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Note to scale index\n\t\t *  @type  {Object}\n\t\t */\n\t    var noteToScaleIndex = {\n\t        'cbb': -2,\n\t        'cb': -1,\n\t        'c': 0,\n\t        'c#': 1,\n\t        'cx': 2,\n\t        'dbb': 0,\n\t        'db': 1,\n\t        'd': 2,\n\t        'd#': 3,\n\t        'dx': 4,\n\t        'ebb': 2,\n\t        'eb': 3,\n\t        'e': 4,\n\t        'e#': 5,\n\t        'ex': 6,\n\t        'fbb': 3,\n\t        'fb': 4,\n\t        'f': 5,\n\t        'f#': 6,\n\t        'fx': 7,\n\t        'gbb': 5,\n\t        'gb': 6,\n\t        'g': 7,\n\t        'g#': 8,\n\t        'gx': 9,\n\t        'abb': 7,\n\t        'ab': 8,\n\t        'a': 9,\n\t        'a#': 10,\n\t        'ax': 11,\n\t        'bbb': 9,\n\t        'bb': 10,\n\t        'b': 11,\n\t        'b#': 12,\n\t        'bx': 13\n\t    };\n\t    /**\n\t\t *  scale index to note (sharps)\n\t\t *  @type  {Array}\n\t\t */\n\t    var scaleIndexToNote = [\n\t        'C',\n\t        'C#',\n\t        'D',\n\t        'D#',\n\t        'E',\n\t        'F',\n\t        'F#',\n\t        'G',\n\t        'G#',\n\t        'A',\n\t        'A#',\n\t        'B'\n\t    ];\n\t    /**\n\t\t *  The [concert pitch](https://en.wikipedia.org/wiki/Concert_pitch)\n\t\t *  A4's values in Hertz.\n\t\t *  @type {Frequency}\n\t\t *  @static\n\t\t */\n\t    Tone.Frequency.A4 = 440;\n\t    /**\n\t\t *  Convert a MIDI note to frequency value.\n\t\t *  @param  {MIDI} midi The midi number to convert.\n\t\t *  @return {Frequency} the corresponding frequency value\n\t\t *  @static\n\t\t *  @example\n\t\t * Tone.Frequency.mtof(69); // returns 440\n\t\t */\n\t    Tone.Frequency.mtof = function (midi) {\n\t        return Tone.Frequency.A4 * Math.pow(2, (midi - 69) / 12);\n\t    };\n\t    /**\n\t\t *  Convert a frequency value to a MIDI note.\n\t\t *  @param {Frequency} frequency The value to frequency value to convert.\n\t\t *  @returns  {MIDI}\n\t\t *  @static\n\t\t *  @example\n\t\t * Tone.Frequency.ftom(440); // returns 69\n\t\t */\n\t    Tone.Frequency.ftom = function (frequency) {\n\t        return 69 + Math.round(12 * Math.log2(frequency / Tone.Frequency.A4));\n\t    };\n\t    return Tone.Frequency;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.Time is a primitive type for encoding Time values.\n\t\t *         Tone.Time can be constructed with or without the `new` keyword. Tone.Time can be passed\n\t\t *         into the parameter of any method which takes time as an argument.\n\t\t *  @constructor\n\t\t *  @extends {Tone.TimeBase}\n\t\t *  @param  {String|Number}  val    The time value.\n\t\t *  @param  {String=}  units  The units of the value.\n\t\t *  @example\n\t\t * var t = Tone.Time(\"4n\");//a quarter note\n\t\t */\n\t    Tone.Time = function (val, units) {\n\t        if (this instanceof Tone.Time) {\n\t            Tone.TimeBase.call(this, val, units);\n\t        } else {\n\t            return new Tone.Time(val, units);\n\t        }\n\t    };\n\t    Tone.extend(Tone.Time, Tone.TimeBase);\n\t    /**\n\t\t * Extend the base expressions\n\t\t */\n\t    Tone.Time.prototype._expressions = Object.assign({}, Tone.TimeBase.prototype._expressions, {\n\t        'quantize': {\n\t            regexp: /^@(.+)/,\n\t            method: function (capture) {\n\t                if (Tone.Transport) {\n\t                    var quantTo = new this.constructor(capture);\n\t                    return Tone.Transport.nextSubdivision(quantTo);\n\t                } else {\n\t                    return 0;\n\t                }\n\t            }\n\t        },\n\t        'now': {\n\t            regexp: /^\\+(.+)/,\n\t            method: function (capture) {\n\t                return this._now() + new this.constructor(capture);\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Quantize the time by the given subdivision. Optionally add a\n\t\t *  percentage which will move the time value towards the ideal\n\t\t *  quantized value by that percentage.\n\t\t *  @param  {Number|Time}  val    The subdivision to quantize to\n\t\t *  @param  {NormalRange}  [percent=1]  Move the time value\n\t\t *                                   towards the quantized value by\n\t\t *                                   a percentage.\n\t\t *  @return  {Number}  this\n\t\t *  @example\n\t\t * Tone.Time(21).quantize(2) //returns 22\n\t\t * Tone.Time(0.6).quantize(\"4n\", 0.5) //returns 0.55\n\t\t */\n\t    Tone.Time.prototype.quantize = function (subdiv, percent) {\n\t        percent = Tone.defaultArg(percent, 1);\n\t        var subdivision = new this.constructor(subdiv);\n\t        var value = this.valueOf();\n\t        var multiple = Math.round(value / subdivision);\n\t        var ideal = multiple * subdivision;\n\t        var diff = ideal - value;\n\t        return value + diff * percent;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    // CONVERSIONS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Convert a Time to Notation. The notation values are will be the\n\t\t *  closest representation between 1m to 128th note.\n\t\t *  @return {Notation}\n\t\t *  @example\n\t\t * //if the Transport is at 120bpm:\n\t\t * Tone.Time(2).toNotation();//returns \"1m\"\n\t\t */\n\t    Tone.Time.prototype.toNotation = function () {\n\t        var time = this.toSeconds();\n\t        var testNotations = ['1m'];\n\t        for (var power = 1; power < 8; power++) {\n\t            var subdiv = Math.pow(2, power);\n\t            testNotations.push(subdiv + 'n.');\n\t            testNotations.push(subdiv + 'n');\n\t            testNotations.push(subdiv + 't');\n\t        }\n\t        testNotations.push('0');\n\t        //find the closets notation representation\n\t        var closest = testNotations[0];\n\t        var closestSeconds = Tone.Time(testNotations[0]).toSeconds();\n\t        testNotations.forEach(function (notation) {\n\t            var notationSeconds = Tone.Time(notation).toSeconds();\n\t            if (Math.abs(notationSeconds - time) < Math.abs(closestSeconds - time)) {\n\t                closest = notation;\n\t                closestSeconds = notationSeconds;\n\t            }\n\t        });\n\t        return closest;\n\t    };\n\t    /**\n\t\t *  Return the time encoded as Bars:Beats:Sixteenths.\n\t\t *  @return  {BarsBeatsSixteenths}\n\t\t */\n\t    Tone.Time.prototype.toBarsBeatsSixteenths = function () {\n\t        var quarterTime = this._beatsToUnits(1);\n\t        var quarters = this.valueOf() / quarterTime;\n\t        var measures = Math.floor(quarters / this._getTimeSignature());\n\t        var sixteenths = quarters % 1 * 4;\n\t        quarters = Math.floor(quarters) % this._getTimeSignature();\n\t        sixteenths = sixteenths.toString();\n\t        if (sixteenths.length > 3) {\n\t            // the additional parseFloat removes insignificant trailing zeroes\n\t            sixteenths = parseFloat(parseFloat(sixteenths).toFixed(3));\n\t        }\n\t        var progress = [\n\t            measures,\n\t            quarters,\n\t            sixteenths\n\t        ];\n\t        return progress.join(':');\n\t    };\n\t    /**\n\t\t *  Return the time in ticks.\n\t\t *  @return  {Ticks}\n\t\t */\n\t    Tone.Time.prototype.toTicks = function () {\n\t        var quarterTime = this._beatsToUnits(1);\n\t        var quarters = this.valueOf() / quarterTime;\n\t        return Math.round(quarters * this._getPPQ());\n\t    };\n\t    /**\n\t\t *  Return the time in seconds.\n\t\t *  @return  {Seconds}\n\t\t */\n\t    Tone.Time.prototype.toSeconds = function () {\n\t        return this.valueOf();\n\t    };\n\t    /**\n\t\t *  Return the value as a midi note.\n\t\t *  @return  {Midi}\n\t\t */\n\t    Tone.Time.prototype.toMidi = function () {\n\t        return Tone.Frequency.ftom(this.toFrequency());\n\t    };\n\t    return Tone.Time;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.TransportTime is a the time along the Transport's\n\t\t *         timeline. It is similar to Tone.Time, but instead of evaluating\n\t\t *         against the AudioContext's clock, it is evaluated against\n\t\t *         the Transport's position. See [TransportTime wiki](https://github.com/Tonejs/Tone.js/wiki/TransportTime).\n\t\t *  @constructor\n\t\t *  @param  {Time}  val    The time value as a number or string\n\t\t *  @param  {String=}  units  Unit values\n\t\t *  @extends {Tone.Time}\n\t\t */\n\t    Tone.TransportTime = function (val, units) {\n\t        if (this instanceof Tone.TransportTime) {\n\t            Tone.Time.call(this, val, units);\n\t        } else {\n\t            return new Tone.TransportTime(val, units);\n\t        }\n\t    };\n\t    Tone.extend(Tone.TransportTime, Tone.Time);\n\t    /**\n\t\t * Return the current time in whichever context is relevant\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t    Tone.TransportTime.prototype._now = function () {\n\t        return Tone.Transport.seconds;\n\t    };\n\t    return Tone.TransportTime;\n\t});\n\tModule(function (Tone) {\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tTYPES\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t * Units which a value can take on.\n\t\t * @enum {String}\n\t\t */\n\t    Tone.Type = {\n\t        /**\n\t\t\t *  Default units\n\t\t\t *  @typedef {Default}\n\t\t\t */\n\t        Default: 'number',\n\t        /**\n\t\t\t *  Time can be described in a number of ways. Read more [Time](https://github.com/Tonejs/Tone.js/wiki/Time).\n\t\t\t *\n\t\t\t *  * Numbers, which will be taken literally as the time (in seconds).\n\t\t\t *  * Notation, (\"4n\", \"8t\") describes time in BPM and time signature relative values.\n\t\t\t *  * TransportTime, (\"4:3:2\") will also provide tempo and time signature relative times\n\t\t\t *  in the form BARS:QUARTERS:SIXTEENTHS.\n\t\t\t *  * Frequency, (\"8hz\") is converted to the length of the cycle in seconds.\n\t\t\t *  * Now-Relative, (\"+1\") prefix any of the above with \"+\" and it will be interpreted as\n\t\t\t *  \"the current time plus whatever expression follows\".\n\t\t\t *  * Expressions, (\"3:0 + 2 - (1m / 7)\") any of the above can also be combined\n\t\t\t *  into a mathematical expression which will be evaluated to compute the desired time.\n\t\t\t *  * No Argument, for methods which accept time, no argument will be interpreted as\n\t\t\t *  \"now\" (i.e. the currentTime).\n\t\t\t *\n\t\t\t *  @typedef {Time}\n\t\t\t */\n\t        Time: 'time',\n\t        /**\n\t\t\t *  Frequency can be described similar to time, except ultimately the\n\t\t\t *  values are converted to frequency instead of seconds. A number\n\t\t\t *  is taken literally as the value in hertz. Additionally any of the\n\t\t\t *  Time encodings can be used. Note names in the form\n\t\t\t *  of NOTE OCTAVE (i.e. C4) are also accepted and converted to their\n\t\t\t *  frequency value.\n\t\t\t *  @typedef {Frequency}\n\t\t\t */\n\t        Frequency: 'frequency',\n\t        /**\n\t\t\t *  TransportTime describes a position along the Transport's timeline. It is\n\t\t\t *  similar to Time in that it uses all the same encodings, but TransportTime specifically\n\t\t\t *  pertains to the Transport's timeline, which is startable, stoppable, loopable, and seekable.\n\t\t\t *  [Read more](https://github.com/Tonejs/Tone.js/wiki/TransportTime)\n\t\t\t *  @typedef {TransportTime}\n\t\t\t */\n\t        TransportTime: 'transportTime',\n\t        /**\n\t\t\t *  Ticks are the basic subunit of the Transport. They are\n\t\t\t *  the smallest unit of time that the Transport supports.\n\t\t\t *  @typedef {Ticks}\n\t\t\t */\n\t        Ticks: 'ticks',\n\t        /**\n\t\t\t *  Normal values are within the range [0, 1].\n\t\t\t *  @typedef {NormalRange}\n\t\t\t */\n\t        NormalRange: 'normalRange',\n\t        /**\n\t\t\t *  AudioRange values are between [-1, 1].\n\t\t\t *  @typedef {AudioRange}\n\t\t\t */\n\t        AudioRange: 'audioRange',\n\t        /**\n\t\t\t *  Decibels are a logarithmic unit of measurement which is useful for volume\n\t\t\t *  because of the logarithmic way that we perceive loudness. 0 decibels\n\t\t\t *  means no change in volume. -10db is approximately half as loud and 10db\n\t\t\t *  is twice is loud.\n\t\t\t *  @typedef {Decibels}\n\t\t\t */\n\t        Decibels: 'db',\n\t        /**\n\t\t\t *  Half-step note increments, i.e. 12 is an octave above the root. and 1 is a half-step up.\n\t\t\t *  @typedef {Interval}\n\t\t\t */\n\t        Interval: 'interval',\n\t        /**\n\t\t\t *  Beats per minute.\n\t\t\t *  @typedef {BPM}\n\t\t\t */\n\t        BPM: 'bpm',\n\t        /**\n\t\t\t *  The value must be greater than or equal to 0.\n\t\t\t *  @typedef {Positive}\n\t\t\t */\n\t        Positive: 'positive',\n\t        /**\n\t\t\t *  Gain is the ratio between input and output of a signal.\n\t\t\t *  A gain of 0 is the same as silencing the signal. A gain of\n\t\t\t *  1, causes no change to the incoming signal.\n\t\t\t *  @typedef {Gain}\n\t\t\t */\n\t        Gain: 'gain',\n\t        /**\n\t\t\t *  A cent is a hundredth of a semitone.\n\t\t\t *  @typedef {Cents}\n\t\t\t */\n\t        Cents: 'cents',\n\t        /**\n\t\t\t *  Angle between 0 and 360.\n\t\t\t *  @typedef {Degrees}\n\t\t\t */\n\t        Degrees: 'degrees',\n\t        /**\n\t\t\t *  A number representing a midi note.\n\t\t\t *  @typedef {MIDI}\n\t\t\t */\n\t        MIDI: 'midi',\n\t        /**\n\t\t\t *  A colon-separated representation of time in the form of\n\t\t\t *  Bars:Beats:Sixteenths.\n\t\t\t *  @typedef {BarsBeatsSixteenths}\n\t\t\t */\n\t        BarsBeatsSixteenths: 'barsBeatsSixteenths',\n\t        /**\n\t\t\t *  Sampling is the reduction of a continuous signal to a discrete signal.\n\t\t\t *  Audio is typically sampled 44100 times per second.\n\t\t\t *  @typedef {Samples}\n\t\t\t */\n\t        Samples: 'samples',\n\t        /**\n\t\t\t *  Hertz are a frequency representation defined as one cycle per second.\n\t\t\t *  @typedef {Hertz}\n\t\t\t */\n\t        Hertz: 'hertz',\n\t        /**\n\t\t\t *  A frequency represented by a letter name,\n\t\t\t *  accidental and octave. This system is known as\n\t\t\t *  [Scientific Pitch Notation](https://en.wikipedia.org/wiki/Scientific_pitch_notation).\n\t\t\t *  @typedef {Note}\n\t\t\t */\n\t        Note: 'note',\n\t        /**\n\t\t\t *  One millisecond is a thousandth of a second.\n\t\t\t *  @typedef {Milliseconds}\n\t\t\t */\n\t        Milliseconds: 'milliseconds',\n\t        /**\n\t\t\t *  Seconds are the time unit of the AudioContext. In the end,\n\t\t\t *  all values need to be evaluated to seconds.\n\t\t\t *  @typedef {Seconds}\n\t\t\t */\n\t        Seconds: 'seconds',\n\t        /**\n\t\t\t *  A string representing a duration relative to a measure.\n\t\t\t *  * \"4n\" = quarter note\n\t\t\t *  * \"2m\" = two measures\n\t\t\t *  * \"8t\" = eighth-note triplet\n\t\t\t *  @typedef {Notation}\n\t\t\t */\n\t        Notation: 'notation'\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    // AUGMENT TONE's PROTOTYPE\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Convert Time into seconds.\n\t\t *\n\t\t *  Unlike the method which it overrides, this takes into account\n\t\t *  transporttime and musical notation.\n\t\t *\n\t\t *  Time : 1.40\n\t\t *  Notation: 4n or 1m or 2t\n\t\t *  Now Relative: +3n\n\t\t *  Math: 3n+16n or even complicated expressions ((3n*2)/6 + 1)\n\t\t *\n\t\t *  @param  {Time} time\n\t\t *  @return {Seconds}\n\t\t */\n\t    Tone.prototype.toSeconds = function (time) {\n\t        if (Tone.isNumber(time)) {\n\t            return time;\n\t        } else if (Tone.isUndef(time)) {\n\t            return this.now();\n\t        } else if (Tone.isString(time)) {\n\t            return new Tone.Time(time).toSeconds();\n\t        } else if (time instanceof Tone.TimeBase) {\n\t            return time.toSeconds();\n\t        }\n\t    };\n\t    /**\n\t\t *  Convert a frequency representation into a number.\n\t\t *  @param  {Frequency} freq\n\t\t *  @return {Hertz}      the frequency in hertz\n\t\t */\n\t    Tone.prototype.toFrequency = function (freq) {\n\t        if (Tone.isNumber(freq)) {\n\t            return freq;\n\t        } else if (Tone.isString(freq) || Tone.isUndef(freq)) {\n\t            return new Tone.Frequency(freq).valueOf();\n\t        } else if (freq instanceof Tone.TimeBase) {\n\t            return freq.toFrequency();\n\t        }\n\t    };\n\t    /**\n\t\t *  Convert a time representation into ticks.\n\t\t *  @param  {Time} time\n\t\t *  @return {Ticks}  the time in ticks\n\t\t */\n\t    Tone.prototype.toTicks = function (time) {\n\t        if (Tone.isNumber(time) || Tone.isString(time)) {\n\t            return new Tone.TransportTime(time).toTicks();\n\t        } else if (Tone.isUndef(time)) {\n\t            return Tone.Transport.ticks;\n\t        } else if (time instanceof Tone.TimeBase) {\n\t            return time.toTicks();\n\t        }\n\t    };\n\t    return Tone;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Param wraps the native Web Audio's AudioParam to provide\n\t\t *         additional unit conversion functionality. It also\n\t\t *         serves as a base-class for classes which have a single,\n\t\t *         automatable parameter.\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param  {AudioParam}  param  The parameter to wrap.\n\t\t *  @param  {Tone.Type} units The units of the audio param.\n\t\t *  @param  {Boolean} convert If the param should be converted.\n\t\t */\n\t    Tone.Param = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'param',\n\t            'units',\n\t            'convert'\n\t        ], Tone.Param);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The native parameter to control\n\t\t\t *  @type  {AudioParam}\n\t\t\t *  @private\n\t\t\t */\n\t        this._param = this.input = options.param;\n\t        /**\n\t\t\t *  The units of the parameter\n\t\t\t *  @type {Tone.Type}\n\t\t\t */\n\t        this.units = options.units;\n\t        /**\n\t\t\t *  If the value should be converted or not\n\t\t\t *  @type {Boolean}\n\t\t\t */\n\t        this.convert = options.convert;\n\t        /**\n\t\t\t *  True if the signal value is being overridden by\n\t\t\t *  a connected signal.\n\t\t\t *  @readOnly\n\t\t\t *  @type  {boolean}\n\t\t\t *  @private\n\t\t\t */\n\t        this.overridden = false;\n\t        /**\n\t\t\t * The timeline which tracks all of the automations.\n\t\t\t * @type {Tone.Timeline}\n\t\t\t * @private\n\t\t\t */\n\t        this._events = new Tone.Timeline(1000);\n\t        if (Tone.isDefined(options.value) && this._param) {\n\t            this.value = options.value;\n\t        }\n\t    };\n\t    Tone.extend(Tone.Param, Tone.AudioNode);\n\t    /**\n\t\t *  Defaults\n\t\t *  @type  {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.Param.defaults = {\n\t        'units': Tone.Type.Default,\n\t        'convert': true,\n\t        'param': undefined\n\t    };\n\t    /**\n\t\t * The current value of the parameter.\n\t\t * @memberOf Tone.Param#\n\t\t * @type {Number}\n\t\t * @name value\n\t\t */\n\t    Object.defineProperty(Tone.Param.prototype, 'value', {\n\t        get: function () {\n\t            var now = this.now();\n\t            return this._toUnits(this.getValueAtTime(now));\n\t        },\n\t        set: function (value) {\n\t            this._initialValue = this._fromUnits(value);\n\t            this.cancelScheduledValues(this.context.currentTime);\n\t            this.setValueAtTime(value, this.context.currentTime);\n\t        }\n\t    });\n\t    /**\n\t\t * The minimum output value of the parameter\n\t\t * @memberOf Tone.Param#\n\t\t * @type {Number}\n\t\t * @name value\n\t\t */\n\t    Object.defineProperty(Tone.Param.prototype, 'minValue', {\n\t        get: function () {\n\t            if (this.units === Tone.Type.Time || this.units === Tone.Type.Frequency || this.units === Tone.Type.NormalRange || this.units === Tone.Type.Positive || this.units === Tone.Type.BPM) {\n\t                return 0;\n\t            } else if (this.units === Tone.Type.AudioRange) {\n\t                return -1;\n\t            } else if (this.units === Tone.Type.Decibels) {\n\t                return -Infinity;\n\t            } else {\n\t                return this._param.minValue;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The maximum output value of the parameter\n\t\t * @memberOf Tone.Param#\n\t\t * @type {Number}\n\t\t * @name value\n\t\t */\n\t    Object.defineProperty(Tone.Param.prototype, 'maxValue', {\n\t        get: function () {\n\t            if (this.units === Tone.Type.NormalRange || this.units === Tone.Type.AudioRange) {\n\t                return 1;\n\t            } else {\n\t                return this._param.maxValue;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Convert the given value from the type specified by Tone.Param.units\n\t\t *  into the destination value (such as Gain or Frequency).\n\t\t *  @private\n\t\t *  @param  {*} val the value to convert\n\t\t *  @return {number}     the number which the value should be set to\n\t\t */\n\t    Tone.Param.prototype._fromUnits = function (val) {\n\t        if ((this.convert || Tone.isUndef(this.convert)) && !this.overridden) {\n\t            switch (this.units) {\n\t            case Tone.Type.Time:\n\t                return this.toSeconds(val);\n\t            case Tone.Type.Frequency:\n\t                return this.toFrequency(val);\n\t            case Tone.Type.Decibels:\n\t                return Tone.dbToGain(val);\n\t            case Tone.Type.NormalRange:\n\t                return Math.min(Math.max(val, 0), 1);\n\t            case Tone.Type.AudioRange:\n\t                return Math.min(Math.max(val, -1), 1);\n\t            case Tone.Type.Positive:\n\t                return Math.max(val, 0);\n\t            default:\n\t                return val;\n\t            }\n\t        } else {\n\t            return val;\n\t        }\n\t    };\n\t    /**\n\t\t * Convert the parameters value into the units specified by Tone.Param.units.\n\t\t * @private\n\t\t * @param  {number} val the value to convert\n\t\t * @return {number}\n\t\t */\n\t    Tone.Param.prototype._toUnits = function (val) {\n\t        if (this.convert || Tone.isUndef(this.convert)) {\n\t            switch (this.units) {\n\t            case Tone.Type.Decibels:\n\t                return Tone.gainToDb(val);\n\t            default:\n\t                return val;\n\t            }\n\t        } else {\n\t            return val;\n\t        }\n\t    };\n\t    /**\n\t\t *  the minimum output value\n\t\t *  @type {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Param.prototype._minOutput = 0.00001;\n\t    /**\n\t\t *  The event types\n\t\t *  @enum {String}\n\t\t *  @private\n\t\t */\n\t    Tone.Param.AutomationType = {\n\t        Linear: 'linearRampToValueAtTime',\n\t        Exponential: 'exponentialRampToValueAtTime',\n\t        Target: 'setTargetAtTime',\n\t        SetValue: 'setValueAtTime'\n\t    };\n\t    /**\n\t\t *  Schedules a parameter value change at the given time.\n\t\t *  @param {*}\tvalue The value to set the signal.\n\t\t *  @param {Time}  time The time when the change should occur.\n\t\t *  @returns {Tone.Param} this\n\t\t *  @example\n\t\t * //set the frequency to \"G4\" in exactly 1 second from now.\n\t\t * freq.setValueAtTime(\"G4\", \"+1\");\n\t\t */\n\t    Tone.Param.prototype.setValueAtTime = function (value, time) {\n\t        time = this.toSeconds(time);\n\t        value = this._fromUnits(value);\n\t        this._events.add({\n\t            'type': Tone.Param.AutomationType.SetValue,\n\t            'value': value,\n\t            'time': time\n\t        });\n\t        this._param.setValueAtTime(value, time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Get the signals value at the given time. Subsequent scheduling\n\t\t *  may invalidate the returned value.\n\t\t *  @param {Time} time When to get the value\n\t\t *  @returns {Number} The value at the given time\n\t\t */\n\t    Tone.Param.prototype.getValueAtTime = function (time) {\n\t        time = this.toSeconds(time);\n\t        var after = this._events.getAfter(time);\n\t        var before = this._events.get(time);\n\t        var initialValue = Tone.defaultArg(this._initialValue, this._param.defaultValue);\n\t        var value = initialValue;\n\t        //if it was set by\n\t        if (before === null) {\n\t            value = initialValue;\n\t        } else if (before.type === Tone.Param.AutomationType.Target) {\n\t            var previous = this._events.getBefore(before.time);\n\t            var previousVal;\n\t            if (previous === null) {\n\t                previousVal = initialValue;\n\t            } else {\n\t                previousVal = previous.value;\n\t            }\n\t            value = this._exponentialApproach(before.time, previousVal, before.value, before.constant, time);\n\t        } else if (after === null) {\n\t            value = before.value;\n\t        } else if (after.type === Tone.Param.AutomationType.Linear) {\n\t            value = this._linearInterpolate(before.time, before.value, after.time, after.value, time);\n\t        } else if (after.type === Tone.Param.AutomationType.Exponential) {\n\t            value = this._exponentialInterpolate(before.time, before.value, after.time, after.value, time);\n\t        } else {\n\t            value = before.value;\n\t        }\n\t        return value;\n\t    };\n\t    /**\n\t\t *  Creates a schedule point with the current value at the current time.\n\t\t *  This is useful for creating an automation anchor point in order to\n\t\t *  schedule changes from the current value.\n\t\t *\n\t\t *  @param {number=} now (Optionally) pass the now value in.\n\t\t *  @returns {Tone.Param} this\n\t\t */\n\t    Tone.Param.prototype.setRampPoint = function (time) {\n\t        time = this.toSeconds(time);\n\t        var currentVal = this.getValueAtTime(time);\n\t        this.cancelAndHoldAtTime(time);\n\t        if (currentVal === 0) {\n\t            currentVal = this._minOutput;\n\t        }\n\t        this.setValueAtTime(this._toUnits(currentVal), time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Schedules a linear continuous change in parameter value from the\n\t\t *  previous scheduled parameter value to the given value.\n\t\t *\n\t\t *  @param  {number} value\n\t\t *  @param  {Time} endTime\n\t\t *  @returns {Tone.Param} this\n\t\t */\n\t    Tone.Param.prototype.linearRampToValueAtTime = function (value, endTime) {\n\t        value = this._fromUnits(value);\n\t        endTime = this.toSeconds(endTime);\n\t        this._events.add({\n\t            'type': Tone.Param.AutomationType.Linear,\n\t            'value': value,\n\t            'time': endTime\n\t        });\n\t        this._param.linearRampToValueAtTime(value, endTime);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Schedules an exponential continuous change in parameter value from\n\t\t *  the previous scheduled parameter value to the given value.\n\t\t *\n\t\t *  @param  {number} value\n\t\t *  @param  {Time} endTime\n\t\t *  @returns {Tone.Param} this\n\t\t */\n\t    Tone.Param.prototype.exponentialRampToValueAtTime = function (value, endTime) {\n\t        value = this._fromUnits(value);\n\t        value = Math.max(this._minOutput, value);\n\t        endTime = this.toSeconds(endTime);\n\t        //store the event\n\t        this._events.add({\n\t            'type': Tone.Param.AutomationType.Exponential,\n\t            'time': endTime,\n\t            'value': value\n\t        });\n\t        this._param.exponentialRampToValueAtTime(value, endTime);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Schedules an exponential continuous change in parameter value from\n\t\t *  the current time and current value to the given value over the\n\t\t *  duration of the rampTime.\n\t\t *\n\t\t *  @param  {number} value   The value to ramp to.\n\t\t *  @param  {Time} rampTime the time that it takes the\n\t\t *                               value to ramp from it's current value\n\t\t *  @param {Time}\t[startTime=now] \tWhen the ramp should start.\n\t\t *  @returns {Tone.Param} this\n\t\t *  @example\n\t\t * //exponentially ramp to the value 2 over 4 seconds.\n\t\t * signal.exponentialRampTo(2, 4);\n\t\t */\n\t    Tone.Param.prototype.exponentialRampTo = function (value, rampTime, startTime) {\n\t        startTime = this.toSeconds(startTime);\n\t        this.setRampPoint(startTime);\n\t        this.exponentialRampToValueAtTime(value, startTime + this.toSeconds(rampTime));\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Schedules an linear continuous change in parameter value from\n\t\t *  the current time and current value to the given value over the\n\t\t *  duration of the rampTime.\n\t\t *\n\t\t *  @param  {number} value   The value to ramp to.\n\t\t *  @param  {Time} rampTime the time that it takes the\n\t\t *                               value to ramp from it's current value\n\t\t *  @param {Time}\t[startTime=now] \tWhen the ramp should start.\n\t\t *  @returns {Tone.Param} this\n\t\t *  @example\n\t\t * //linearly ramp to the value 4 over 3 seconds.\n\t\t * signal.linearRampTo(4, 3);\n\t\t */\n\t    Tone.Param.prototype.linearRampTo = function (value, rampTime, startTime) {\n\t        startTime = this.toSeconds(startTime);\n\t        this.setRampPoint(startTime);\n\t        this.linearRampToValueAtTime(value, startTime + this.toSeconds(rampTime));\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Start exponentially approaching the target value at the given time. Since it\n\t\t *  is an exponential approach it will continue approaching after the ramp duration. The\n\t\t *  rampTime is the time that it takes to reach over 99% of the way towards the value.\n\t\t *  @param  {number} value   The value to ramp to.\n\t\t *  @param  {Time} rampTime the time that it takes the\n\t\t *                               value to ramp from it's current value\n\t\t *  @param {Time}\t[startTime=now] \tWhen the ramp should start.\n\t\t *  @returns {Tone.Param} this\n\t\t *  @example\n\t\t * //exponentially ramp to the value 2 over 4 seconds.\n\t\t * signal.exponentialRampTo(2, 4);\n\t\t */\n\t    Tone.Param.prototype.targetRampTo = function (value, rampTime, startTime) {\n\t        startTime = this.toSeconds(startTime);\n\t        this.setRampPoint(startTime);\n\t        this.exponentialApproachValueAtTime(value, startTime, rampTime);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Start exponentially approaching the target value at the given time. Since it\n\t\t *  is an exponential approach it will continue approaching after the ramp duration. The\n\t\t *  rampTime is the time that it takes to reach over 99% of the way towards the value. This methods\n\t\t *  is similar to setTargetAtTime except the third argument is a time instead of a 'timeConstant'\n\t\t *  @param  {number} value   The value to ramp to.\n\t\t *  @param {Time}\ttime \tWhen the ramp should start.\n\t\t *  @param  {Time} rampTime the time that it takes the\n\t\t *                               value to ramp from it's current value\n\t\t *  @returns {Tone.Param} this\n\t\t *  @example\n\t\t * //exponentially ramp to the value 2 over 4 seconds.\n\t\t * signal.exponentialRampTo(2, 4);\n\t\t */\n\t    Tone.Param.prototype.exponentialApproachValueAtTime = function (value, time, rampTime) {\n\t        var timeConstant = Math.log(this.toSeconds(rampTime) + 1) / Math.log(200);\n\t        time = this.toSeconds(time);\n\t        return this.setTargetAtTime(value, time, timeConstant);\n\t    };\n\t    /**\n\t\t *  Start exponentially approaching the target value at the given time with\n\t\t *  a rate having the given time constant.\n\t\t *  @param {number} value\n\t\t *  @param {Time} startTime\n\t\t *  @param {number} timeConstant\n\t\t *  @returns {Tone.Param} this\n\t\t */\n\t    Tone.Param.prototype.setTargetAtTime = function (value, startTime, timeConstant) {\n\t        value = this._fromUnits(value);\n\t        // The value will never be able to approach without timeConstant > 0.\n\t        if (timeConstant <= 0) {\n\t            throw new Error('timeConstant must be greater than 0');\n\t        }\n\t        startTime = this.toSeconds(startTime);\n\t        this._events.add({\n\t            'type': Tone.Param.AutomationType.Target,\n\t            'value': value,\n\t            'time': startTime,\n\t            'constant': timeConstant\n\t        });\n\t        this._param.setTargetAtTime(value, startTime, timeConstant);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Sets an array of arbitrary parameter values starting at the given time\n\t\t *  for the given duration.\n\t\t *\n\t\t *  @param {Array} values\n\t\t *  @param {Time} startTime\n\t\t *  @param {Time} duration\n\t\t *  @param {NormalRange} [scaling=1] If the values in the curve should be scaled by some value\n\t\t *  @returns {Tone.Param} this\n\t\t */\n\t    Tone.Param.prototype.setValueCurveAtTime = function (values, startTime, duration, scaling) {\n\t        scaling = Tone.defaultArg(scaling, 1);\n\t        duration = this.toSeconds(duration);\n\t        startTime = this.toSeconds(startTime);\n\t        this.setValueAtTime(values[0] * scaling, startTime);\n\t        var segTime = duration / (values.length - 1);\n\t        for (var i = 1; i < values.length; i++) {\n\t            this.linearRampToValueAtTime(values[i] * scaling, startTime + i * segTime);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancels all scheduled parameter changes with times greater than or\n\t\t *  equal to startTime.\n\t\t *\n\t\t *  @param  {Time} time\n\t\t *  @returns {Tone.Param} this\n\t\t */\n\t    Tone.Param.prototype.cancelScheduledValues = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._events.cancel(time);\n\t        this._param.cancelScheduledValues(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  This is similar to [cancelScheduledValues](#cancelScheduledValues) except\n\t\t *  it holds the automated value at time until the next automated event.\n\t\t *  @param  {Time} time\n\t\t *  @returns {Tone.Param} this\n\t\t */\n\t    Tone.Param.prototype.cancelAndHoldAtTime = function (time) {\n\t        var valueAtTime = this.getValueAtTime(time);\n\t        //if there is an event at the given time\n\t        //and that even is not a \"set\"\n\t        var before = this._events.get(time);\n\t        var after = this._events.getAfter(time);\n\t        if (before && before.time === time) {\n\t            //remove everything after\n\t            if (after) {\n\t                this._events.cancel(after.time);\n\t            } else {\n\t                this._events.cancel(time + 0.000001);\n\t            }\n\t        } else if (after) {\n\t            //cancel the next event(s)\n\t            this._events.cancel(after.time);\n\t            if (!this._param.cancelAndHoldAtTime) {\n\t                this._param.cancelScheduledValues(time);\n\t            }\n\t            if (after.type === Tone.Param.AutomationType.Linear) {\n\t                if (!this._param.cancelAndHoldAtTime) {\n\t                    this.linearRampToValueAtTime(valueAtTime, time);\n\t                } else {\n\t                    this._events.add({\n\t                        'type': Tone.Param.AutomationType.Linear,\n\t                        'value': valueAtTime,\n\t                        'time': time\n\t                    });\n\t                }\n\t            } else if (after.type === Tone.Param.AutomationType.Exponential) {\n\t                if (!this._param.cancelAndHoldAtTime) {\n\t                    this.exponentialRampToValueAtTime(valueAtTime, time);\n\t                } else {\n\t                    this._events.add({\n\t                        'type': Tone.Param.AutomationType.Exponential,\n\t                        'value': valueAtTime,\n\t                        'time': time\n\t                    });\n\t                }\n\t            }\n\t        }\n\t        //set the value at the given time\n\t        this._events.add({\n\t            'type': Tone.Param.AutomationType.SetValue,\n\t            'value': valueAtTime,\n\t            'time': time\n\t        });\n\t        if (this._param.cancelAndHoldAtTime) {\n\t            this._param.cancelAndHoldAtTime(time);\n\t        } else {\n\t            this._param.setValueAtTime(valueAtTime, time);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Ramps to the given value over the duration of the rampTime.\n\t\t *  Automatically selects the best ramp type (exponential or linear)\n\t\t *  depending on the `units` of the signal\n\t\t *\n\t\t *  @param  {number} value\n\t\t *  @param  {Time} rampTime \tThe time that it takes the\n\t\t *                              value to ramp from it's current value\n\t\t *  @param {Time}\t[startTime=now] \tWhen the ramp should start.\n\t\t *  @returns {Tone.Param} this\n\t\t *  @example\n\t\t * //ramp to the value either linearly or exponentially\n\t\t * //depending on the \"units\" value of the signal\n\t\t * signal.rampTo(0, 10);\n\t\t *  @example\n\t\t * //schedule it to ramp starting at a specific time\n\t\t * signal.rampTo(0, 10, 5)\n\t\t */\n\t    Tone.Param.prototype.rampTo = function (value, rampTime, startTime) {\n\t        rampTime = Tone.defaultArg(rampTime, 0.1);\n\t        if (this.units === Tone.Type.Frequency || this.units === Tone.Type.BPM || this.units === Tone.Type.Decibels) {\n\t            this.exponentialRampTo(value, rampTime, startTime);\n\t        } else {\n\t            this.linearRampTo(value, rampTime, startTime);\n\t        }\n\t        return this;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tAUTOMATION CURVE CALCULATIONS\n\t    //\tMIT License, copyright (c) 2014 Jordan Santell\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    // Calculates the the value along the curve produced by setTargetAtTime\n\t    Tone.Param.prototype._exponentialApproach = function (t0, v0, v1, timeConstant, t) {\n\t        return v1 + (v0 - v1) * Math.exp(-(t - t0) / timeConstant);\n\t    };\n\t    // Calculates the the value along the curve produced by linearRampToValueAtTime\n\t    Tone.Param.prototype._linearInterpolate = function (t0, v0, t1, v1, t) {\n\t        return v0 + (v1 - v0) * ((t - t0) / (t1 - t0));\n\t    };\n\t    // Calculates the the value along the curve produced by exponentialRampToValueAtTime\n\t    Tone.Param.prototype._exponentialInterpolate = function (t0, v0, t1, v1, t) {\n\t        return v0 * Math.pow(v1 / v0, (t - t0) / (t1 - t0));\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @returns {Tone.Param} this\n\t\t */\n\t    Tone.Param.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._param = null;\n\t        this._events = null;\n\t        return this;\n\t    };\n\t    return Tone.Param;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Wrapper around the OfflineAudioContext\n\t\t *  @extends {Tone.Context}\n\t\t *  @param  {Number}  channels  The number of channels to render\n\t\t *  @param  {Number}  duration  The duration to render in samples\n\t\t *  @param {Number} sampleRate the sample rate to render at\n\t\t */\n\t    Tone.OfflineContext = function (channels, duration, sampleRate) {\n\t        /**\n\t\t\t *  The offline context\n\t\t\t *  @private\n\t\t\t *  @type  {OfflineAudioContext}\n\t\t\t */\n\t        var offlineContext = new OfflineAudioContext(channels, duration * sampleRate, sampleRate);\n\t        //wrap the methods/members\n\t        Tone.Context.call(this, {\n\t            'context': offlineContext,\n\t            'clockSource': 'offline',\n\t            'lookAhead': 0,\n\t            'updateInterval': 128 / sampleRate\n\t        });\n\t        /**\n\t\t\t *  A private reference to the duration\n\t\t\t *  @private\n\t\t\t *  @type  {Number}\n\t\t\t */\n\t        this._duration = duration;\n\t        /**\n\t\t\t *  An artificial clock source\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._currentTime = 0;\n\t    };\n\t    Tone.extend(Tone.OfflineContext, Tone.Context);\n\t    /**\n\t\t *  Override the now method to point to the internal clock time\n\t\t *  @return  {Number}\n\t\t */\n\t    Tone.OfflineContext.prototype.now = function () {\n\t        return this._currentTime;\n\t    };\n\t    /**\n\t\t *  Render the output of the OfflineContext\n\t\t *  @return  {Promise}\n\t\t */\n\t    Tone.OfflineContext.prototype.render = function () {\n\t        while (this._duration - this._currentTime >= 0) {\n\t            //invoke all the callbacks on that time\n\t            this.emit('tick');\n\t            //increment the clock\n\t            this._currentTime += this.blockTime;\n\t        }\n\t        return this._context.startRendering();\n\t    };\n\t    /**\n\t\t *  Close the context\n\t\t *  @return  {Promise}\n\t\t */\n\t    Tone.OfflineContext.prototype.close = function () {\n\t        this._context = null;\n\t        return Promise.resolve();\n\t    };\n\t    return Tone.OfflineContext;\n\t});\n\tModule(function (Tone) {\n\t    if (Tone.supported) {\n\t        var ua = navigator.userAgent.toLowerCase();\n\t        var isMobileSafari = ua.includes('safari') && !ua.includes('chrome') && ua.includes('mobile');\n\t        if (isMobileSafari) {\n\t            //mobile safari has a bizarre bug with the offline context\n\t            //when a BufferSourceNode is started, it starts the offline context\n\t            //\n\t            //deferring all BufferSource starts till the last possible moment\n\t            //reduces the likelihood of this happening\n\t            Tone.OfflineContext.prototype.createBufferSource = function () {\n\t                var bufferSource = this._context.createBufferSource();\n\t                var _native_start = bufferSource.start;\n\t                bufferSource.start = function (time) {\n\t                    this.setTimeout(function () {\n\t                        _native_start.call(bufferSource, time);\n\t                    }.bind(this), 0);\n\t                }.bind(this);\n\t                return bufferSource;\n\t            };\n\t        }\n\t    }\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class A thin wrapper around the Native Web Audio GainNode.\n\t\t *         The GainNode is a basic building block of the Web Audio\n\t\t *         API and is useful for routing audio and adjusting gains.\n\t\t *  @extends {Tone}\n\t\t *  @param  {Number=}  gain  The initial gain of the GainNode\n\t\t *  @param {Tone.Type=} units The units of the gain parameter.\n\t\t */\n\t    Tone.Gain = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'gain',\n\t            'units'\n\t        ], Tone.Gain);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The GainNode\n\t\t\t *  @type  {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this.input = this.output = this._gainNode = this.context.createGain();\n\t        /**\n\t\t\t *  The gain parameter of the gain node.\n\t\t\t *  @type {Gain}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.gain = new Tone.Param({\n\t            'param': this._gainNode.gain,\n\t            'units': options.units,\n\t            'value': options.gain,\n\t            'convert': options.convert\n\t        });\n\t        this._readOnly('gain');\n\t    };\n\t    Tone.extend(Tone.Gain, Tone.AudioNode);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.Gain.defaults = {\n\t        'gain': 1,\n\t        'convert': true\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.Gain}  this\n\t\t */\n\t    Tone.Gain.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._gainNode.disconnect();\n\t        this._gainNode = null;\n\t        this._writable('gain');\n\t        this.gain.dispose();\n\t        this.gain = null;\n\t    };\n\t    return Tone.Gain;\n\t});\n\tModule(function (Tone) {\n\t    if (Tone.supported && !AudioContext.prototype.createConstantSource) {\n\t        var ConstantSourceNode = function (context) {\n\t            this.context = context;\n\t            var buffer = context.createBuffer(1, 128, context.sampleRate);\n\t            var arr = buffer.getChannelData(0);\n\t            for (var i = 0; i < arr.length; i++) {\n\t                arr[i] = 1;\n\t            }\n\t            this._bufferSource = context.createBufferSource();\n\t            this._bufferSource.channelCount = 1;\n\t            this._bufferSource.channelCountMode = 'explicit';\n\t            this._bufferSource.buffer = buffer;\n\t            this._bufferSource.loop = true;\n\t            var gainNode = this._output = context.createGain();\n\t            this.offset = gainNode.gain;\n\t            this._bufferSource.connect(gainNode);\n\t        };\n\t        ConstantSourceNode.prototype.start = function (time) {\n\t            this._bufferSource.start(time);\n\t            return this;\n\t        };\n\t        ConstantSourceNode.prototype.stop = function (time) {\n\t            this._bufferSource.stop(time);\n\t            return this;\n\t        };\n\t        ConstantSourceNode.prototype.connect = function () {\n\t            this._output.connect.apply(this._output, arguments);\n\t            return this;\n\t        };\n\t        ConstantSourceNode.prototype.disconnect = function () {\n\t            this._output.disconnect.apply(this._output, arguments);\n\t            return this;\n\t        };\n\t        AudioContext.prototype.createConstantSource = function () {\n\t            return new ConstantSourceNode(this);\n\t        };\n\t        Tone.Context.prototype.createConstantSource = function () {\n\t            return new ConstantSourceNode(this);\n\t        };\n\t    }\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  A signal is an audio-rate value. Tone.Signal is a core component of the library.\n\t\t *          Unlike a number, Signals can be scheduled with sample-level accuracy. Tone.Signal\n\t\t *          has all of the methods available to native Web Audio\n\t\t *          [AudioParam](http://webaudio.github.io/web-audio-api/#the-audioparam-interface)\n\t\t *          as well as additional conveniences. Read more about working with signals\n\t\t *          [here](https://github.com/Tonejs/Tone.js/wiki/Signals).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Param}\n\t\t *  @param {Number|AudioParam} [value] Initial value of the signal. If an AudioParam\n\t\t *                                     is passed in, that parameter will be wrapped\n\t\t *                                     and controlled by the Signal.\n\t\t *  @param {string} [units=Number] unit The units the signal is in.\n\t\t *  @example\n\t\t * var signal = new Tone.Signal(10);\n\t\t */\n\t    Tone.Signal = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'value',\n\t            'units'\n\t        ], Tone.Signal);\n\t        Tone.Param.call(this, options);\n\t        /**\n\t\t\t* When a signal is connected to another signal or audio param,\n\t\t\t* this signal becomes a proxy for it\n\t\t\t* @type {Array}\n\t\t\t* @private\n\t\t\t*/\n\t        this._proxies = [];\n\t        /**\n\t\t\t* Indicates if the constant source was started or not\n\t\t\t* @private\n\t\t\t* @type {Boolean}\n\t\t\t*/\n\t        this._sourceStarted = false;\n\t        /**\n\t\t\t * The constant source node which generates the signal\n\t\t\t * @type {ConstantSourceNode}\n\t\t\t * @private\n\t\t\t */\n\t        this._constantSource = this.context.createConstantSource();\n\t        this._param = this._constantSource.offset;\n\t        this.value = options.value;\n\t        /**\n\t\t\t * The node where the constant signal value is scaled.\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t        this.output = this._constantSource;\n\t        /**\n\t\t\t * The node where the value is set.\n\t\t\t * @type {Tone.Param}\n\t\t\t * @private\n\t\t\t */\n\t        this.input = this._param = this.output.offset;\n\t    };\n\t    Tone.extend(Tone.Signal, Tone.Param);\n\t    /**\n\t\t *  The default values\n\t\t *  @type  {Object}\n\t\t *  @static\n\t\t *  @const\n\t\t */\n\t    Tone.Signal.defaults = {\n\t        'value': 0,\n\t        'units': Tone.Type.Default,\n\t        'convert': true\n\t    };\n\t    /**\n\t\t *  When signals connect to other signals or AudioParams,\n\t\t *  they take over the output value of that signal or AudioParam.\n\t\t *  For all other nodes, the behavior is the same as a default <code>connect</code>.\n\t\t *\n\t\t *  @override\n\t\t *  @param {AudioParam|AudioNode|Tone.Signal|Tone} node\n\t\t *  @param {number} [outputNumber=0] The output number to connect from.\n\t\t *  @param {number} [inputNumber=0] The input number to connect to.\n\t\t *  @returns {Tone.Signal} this\n\t\t *  @method\n\t\t */\n\t    Tone.Signal.prototype.connect = function (node) {\n\t        //this is an optimization where this node will forward automations\n\t        //to connected nodes without any signal if possible.\n\t        if (this._isParam(node) && !this._sourceStarted) {\n\t            this._proxies.push(node);\n\t            node.overridden = true;\n\t            this._applyAutomations(node);\n\t        } else {\n\t            Tone.SignalBase.prototype.connect.apply(this, arguments);\n\t            if (!this._sourceStarted) {\n\t                this._sourceStarted = true;\n\t                this._constantSource.start(0);\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * Takes a node as an argument and returns if it is a Param or AudioParam\n\t\t * @param  {*} node The node to test\n\t\t * @return {Boolean}\n\t\t * @private\n\t\t */\n\t    Tone.Signal.prototype._isParam = function (node) {\n\t        return Tone.Param && Tone.Param === node.constructor || node instanceof AudioParam;\n\t    };\n\t    /**\n\t\t * Discard the optimization and connect all of the proxies\n\t\t * @private\n\t\t */\n\t    Tone.Signal.prototype._connectProxies = function () {\n\t        if (!this._sourceStarted) {\n\t            this._sourceStarted = true;\n\t            this._constantSource.start(0);\n\t        }\n\t        this._proxies.forEach(function (proxy) {\n\t            Tone.SignalBase.prototype.connect.call(this, proxy);\n\t            if (proxy._proxies) {\n\t                proxy._connectProxies();\n\t            }\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t * Invoked when a node is connected to this\n\t\t * @param  {AudioNode} from\n\t\t * @private\n\t\t */\n\t    Tone.Signal.prototype._onConnect = function (from) {\n\t        if (!this._isParam(from)) {\n\t            //connect all the proxies\n\t            this._connectProxies();\n\t        }\n\t    };\n\t    /**\n\t\t * Apply all the current automations to the given parameter\n\t\t * @param  {AudioParam} param\n\t\t * @private\n\t\t */\n\t    Tone.Signal.prototype._applyAutomations = function (param) {\n\t        var now = this.context.currentTime;\n\t        param.cancelScheduledValues(now);\n\t        var currentVal = this.getValueAtTime(now);\n\t        param.setValueAtTime(currentVal, now);\n\t        this._events.forEachFrom(now, function (event) {\n\t            param[event.type](event.value, event.time, event.constant);\n\t        });\n\t    };\n\t    /**\n\t\t * Disconnect from the given node or all nodes if no param is given.\n\t\t * @param  {AudioNode|AudioParam} node\n\t\t * @return {Tone.Signal}      this\n\t\t */\n\t    Tone.Signal.prototype.disconnect = function (node) {\n\t        if (this._proxies.includes(node)) {\n\t            var index = this._proxies.indexOf(node);\n\t            this._proxies.splice(index, 1);\n\t        } else if (!node) {\n\t            //no argument, disconnect everything\n\t            this._proxies = [];\n\t        }\n\t        return Tone.SignalBase.prototype.disconnect.apply(this, arguments);\n\t    };\n\t    /**\n\t\t * Return the current signal value at the given time.\n\t\t * @param  {Time} time When to get the signal value\n\t\t * @return {Number}\n\t\t */\n\t    Tone.Signal.prototype.getValueAtTime = function (time) {\n\t        if (this._param.getValueAtTime) {\n\t            return this._param.getValueAtTime(time);\n\t        } else {\n\t            return Tone.Param.prototype.getValueAtTime.call(this, time);\n\t        }\n\t    };\n\t    //wrap all of the automation methods\n\t    [\n\t        'setValueAtTime',\n\t        'linearRampToValueAtTime',\n\t        'exponentialRampToValueAtTime',\n\t        'setTargetAtTime'\n\t    ].forEach(function (method) {\n\t        var previousMethod = Tone.Signal.prototype[method];\n\t        Tone.Signal.prototype[method] = function () {\n\t            var args = arguments;\n\t            previousMethod.apply(this, arguments);\n\t            args[0] = this._fromUnits(args[0]);\n\t            args[1] = this.toSeconds(args[1]);\n\t            //apply it to the proxies\n\t            this._proxies.forEach(function (signal) {\n\t                signal[method].apply(signal, args);\n\t            });\n\t        };\n\t    });\n\t    [\n\t        'cancelScheduledValues',\n\t        'cancelAndHoldAtTime'\n\t    ].forEach(function (method) {\n\t        var previousMethod = Tone.Signal.prototype[method];\n\t        Tone.Signal.prototype[method] = function () {\n\t            var args = arguments;\n\t            previousMethod.apply(this, arguments);\n\t            args[0] = this.toSeconds(args[0]);\n\t            //apply it to the proxies\n\t            this._proxies.forEach(function (signal) {\n\t                signal[method].apply(signal, args);\n\t            });\n\t        };\n\t    });\n\t    /**\n\t\t *  dispose and disconnect\n\t\t *  @returns {Tone.Signal} this\n\t\t */\n\t    Tone.Signal.prototype.dispose = function () {\n\t        Tone.Param.prototype.dispose.call(this);\n\t        this._constantSource.disconnect();\n\t        this._constantSource = null;\n\t        this._proxies = null;\n\t        return this;\n\t    };\n\t    return Tone.Signal;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Pow applies an exponent to the incoming signal. The incoming signal\n\t\t *         must be AudioRange.\n\t\t *\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @constructor\n\t\t *  @param {Positive} exp The exponent to apply to the incoming signal, must be at least 2. \n\t\t *  @example\n\t\t * var pow = new Tone.Pow(2);\n\t\t * var sig = new Tone.Signal(0.5).connect(pow);\n\t\t * //output of pow is 0.25. \n\t\t */\n\t    Tone.Pow = function (exp) {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t * the exponent\n\t\t\t * @private\n\t\t\t * @type {number}\n\t\t\t */\n\t        this._exp = Tone.defaultArg(exp, 1);\n\t        /**\n\t\t\t *  @type {WaveShaperNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._expScaler = this.input = this.output = new Tone.WaveShaper(this._expFunc(this._exp), 8192);\n\t    };\n\t    Tone.extend(Tone.Pow, Tone.SignalBase);\n\t    /**\n\t\t * The value of the exponent.\n\t\t * @memberOf Tone.Pow#\n\t\t * @type {number}\n\t\t * @name value\n\t\t */\n\t    Object.defineProperty(Tone.Pow.prototype, 'value', {\n\t        get: function () {\n\t            return this._exp;\n\t        },\n\t        set: function (exp) {\n\t            this._exp = exp;\n\t            this._expScaler.setMap(this._expFunc(this._exp));\n\t        }\n\t    });\n\t    /**\n\t\t *  the function which maps the waveshaper\n\t\t *  @param   {number} exp\n\t\t *  @return {function}\n\t\t *  @private\n\t\t */\n\t    Tone.Pow.prototype._expFunc = function (exp) {\n\t        return function (val) {\n\t            return Math.pow(Math.abs(val), exp);\n\t        };\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Pow} this\n\t\t */\n\t    Tone.Pow.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._expScaler.dispose();\n\t        this._expScaler = null;\n\t        return this;\n\t    };\n\t    return Tone.Pow;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Envelope is an [ADSR](https://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope)\n\t\t *          envelope generator. Tone.Envelope outputs a signal which\n\t\t *          can be connected to an AudioParam or Tone.Signal.\n\t\t *          <img src=\"https://upload.wikimedia.org/wikipedia/commons/e/ea/ADSR_parameter.svg\">\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Time} [attack] The amount of time it takes for the envelope to go from\n\t\t *                         0 to it's maximum value.\n\t\t *  @param {Time} [decay]\tThe period of time after the attack that it takes for the envelope\n\t\t *                       \tto fall to the sustain value.\n\t\t *  @param {NormalRange} [sustain]\tThe percent of the maximum value that the envelope rests at until\n\t\t *                                \tthe release is triggered.\n\t\t *  @param {Time} [release]\tThe amount of time after the release is triggered it takes to reach 0.\n\t\t *  @example\n\t\t * //an amplitude envelope\n\t\t * var gainNode = Tone.context.createGain();\n\t\t * var env = new Tone.Envelope({\n\t\t * \t\"attack\" : 0.1,\n\t\t * \t\"decay\" : 0.2,\n\t\t * \t\"sustain\" : 1,\n\t\t * \t\"release\" : 0.8,\n\t\t * });\n\t\t * env.connect(gainNode.gain);\n\t\t */\n\t    Tone.Envelope = function () {\n\t        //get all of the defaults\n\t        var options = Tone.defaults(arguments, [\n\t            'attack',\n\t            'decay',\n\t            'sustain',\n\t            'release'\n\t        ], Tone.Envelope);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  When triggerAttack is called, the attack time is the amount of\n\t\t\t *  time it takes for the envelope to reach it's maximum value.\n\t\t\t *  @type {Time}\n\t\t\t */\n\t        this.attack = options.attack;\n\t        /**\n\t\t\t *  After the attack portion of the envelope, the value will fall\n\t\t\t *  over the duration of the decay time to it's sustain value.\n\t\t\t *  @type {Time}\n\t\t\t */\n\t        this.decay = options.decay;\n\t        /**\n\t\t\t * \tThe sustain value is the value\n\t\t\t * \twhich the envelope rests at after triggerAttack is\n\t\t\t * \tcalled, but before triggerRelease is invoked.\n\t\t\t *  @type {NormalRange}\n\t\t\t */\n\t        this.sustain = options.sustain;\n\t        /**\n\t\t\t *  After triggerRelease is called, the envelope's\n\t\t\t *  value will fall to it's miminum value over the\n\t\t\t *  duration of the release time.\n\t\t\t *  @type {Time}\n\t\t\t */\n\t        this.release = options.release;\n\t        /**\n\t\t\t *  the next time the envelope is at standby\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._attackCurve = 'linear';\n\t        /**\n\t\t\t *  the next time the envelope is at standby\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._releaseCurve = 'exponential';\n\t        /**\n\t\t\t *  the signal\n\t\t\t *  @type {Tone.Signal}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sig = this.output = new Tone.Signal(0);\n\t        //set the attackCurve initially\n\t        this.attackCurve = options.attackCurve;\n\t        this.releaseCurve = options.releaseCurve;\n\t    };\n\t    Tone.extend(Tone.Envelope, Tone.AudioNode);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @static\n\t\t *  @const\n\t\t */\n\t    Tone.Envelope.defaults = {\n\t        'attack': 0.01,\n\t        'decay': 0.1,\n\t        'sustain': 0.5,\n\t        'release': 1,\n\t        'attackCurve': 'linear',\n\t        'releaseCurve': 'exponential'\n\t    };\n\t    /**\n\t\t * Read the current value of the envelope. Useful for\n\t\t * syncronizing visual output to the envelope.\n\t\t * @memberOf Tone.Envelope#\n\t\t * @type {Number}\n\t\t * @name value\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Envelope.prototype, 'value', {\n\t        get: function () {\n\t            return this.getValueAtTime(this.now());\n\t        }\n\t    });\n\t    /**\n\t\t * The shape of the attack.\n\t\t * Can be any of these strings:\n\t\t * <ul>\n\t\t *   <li>linear</li>\n\t\t *   <li>exponential</li>\n\t\t *   <li>sine</li>\n\t\t *   <li>cosine</li>\n\t\t *   <li>bounce</li>\n\t\t *   <li>ripple</li>\n\t\t *   <li>step</li>\n\t\t * </ul>\n\t\t * Can also be an array which describes the curve. Values\n\t\t * in the array are evenly subdivided and linearly\n\t\t * interpolated over the duration of the attack.\n\t\t * @memberOf Tone.Envelope#\n\t\t * @type {String|Array}\n\t\t * @name attackCurve\n\t\t * @example\n\t\t * env.attackCurve = \"linear\";\n\t\t * @example\n\t\t * //can also be an array\n\t\t * env.attackCurve = [0, 0.2, 0.3, 0.4, 1]\n\t\t */\n\t    Object.defineProperty(Tone.Envelope.prototype, 'attackCurve', {\n\t        get: function () {\n\t            if (Tone.isString(this._attackCurve)) {\n\t                return this._attackCurve;\n\t            } else if (Tone.isArray(this._attackCurve)) {\n\t                //look up the name in the curves array\n\t                for (var type in Tone.Envelope.Type) {\n\t                    if (Tone.Envelope.Type[type].In === this._attackCurve) {\n\t                        return type;\n\t                    }\n\t                }\n\t                //otherwise just return the array\n\t                return this._attackCurve;\n\t            }\n\t        },\n\t        set: function (curve) {\n\t            //check if it's a valid type\n\t            if (Tone.Envelope.Type.hasOwnProperty(curve)) {\n\t                var curveDef = Tone.Envelope.Type[curve];\n\t                if (Tone.isObject(curveDef)) {\n\t                    this._attackCurve = curveDef.In;\n\t                } else {\n\t                    this._attackCurve = curveDef;\n\t                }\n\t            } else if (Tone.isArray(curve)) {\n\t                this._attackCurve = curve;\n\t            } else {\n\t                throw new Error('Tone.Envelope: invalid curve: ' + curve);\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The shape of the release. See the attack curve types.\n\t\t * @memberOf Tone.Envelope#\n\t\t * @type {String|Array}\n\t\t * @name releaseCurve\n\t\t * @example\n\t\t * env.releaseCurve = \"linear\";\n\t\t */\n\t    Object.defineProperty(Tone.Envelope.prototype, 'releaseCurve', {\n\t        get: function () {\n\t            if (Tone.isString(this._releaseCurve)) {\n\t                return this._releaseCurve;\n\t            } else if (Tone.isArray(this._releaseCurve)) {\n\t                //look up the name in the curves array\n\t                for (var type in Tone.Envelope.Type) {\n\t                    if (Tone.Envelope.Type[type].Out === this._releaseCurve) {\n\t                        return type;\n\t                    }\n\t                }\n\t                //otherwise just return the array\n\t                return this._releaseCurve;\n\t            }\n\t        },\n\t        set: function (curve) {\n\t            //check if it's a valid type\n\t            if (Tone.Envelope.Type.hasOwnProperty(curve)) {\n\t                var curveDef = Tone.Envelope.Type[curve];\n\t                if (Tone.isObject(curveDef)) {\n\t                    this._releaseCurve = curveDef.Out;\n\t                } else {\n\t                    this._releaseCurve = curveDef;\n\t                }\n\t            } else if (Tone.isArray(curve)) {\n\t                this._releaseCurve = curve;\n\t            } else {\n\t                throw new Error('Tone.Envelope: invalid curve: ' + curve);\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Trigger the attack/decay portion of the ADSR envelope.\n\t\t *  @param  {Time} [time=now] When the attack should start.\n\t\t *  @param {NormalRange} [velocity=1] The velocity of the envelope scales the vales.\n\t\t *                               number between 0-1\n\t\t *  @returns {Tone.Envelope} this\n\t\t *  @example\n\t\t *  //trigger the attack 0.5 seconds from now with a velocity of 0.2\n\t\t *  env.triggerAttack(\"+0.5\", 0.2);\n\t\t */\n\t    Tone.Envelope.prototype.triggerAttack = function (time, velocity) {\n\t        time = this.toSeconds(time);\n\t        var originalAttack = this.toSeconds(this.attack);\n\t        var attack = originalAttack;\n\t        var decay = this.toSeconds(this.decay);\n\t        velocity = Tone.defaultArg(velocity, 1);\n\t        //check if it's not a complete attack\n\t        var currentValue = this.getValueAtTime(time);\n\t        if (currentValue > 0) {\n\t            //subtract the current value from the attack time\n\t            var attackRate = 1 / attack;\n\t            var remainingDistance = 1 - currentValue;\n\t            //the attack is now the remaining time\n\t            attack = remainingDistance / attackRate;\n\t        }\n\t        //attack\n\t        if (this._attackCurve === 'linear') {\n\t            this._sig.linearRampTo(velocity, attack, time);\n\t        } else if (this._attackCurve === 'exponential') {\n\t            this._sig.targetRampTo(velocity, attack, time);\n\t        } else if (attack > 0) {\n\t            this._sig.cancelAndHoldAtTime(time);\n\t            var curve = this._attackCurve;\n\t            //take only a portion of the curve\n\t            if (attack < originalAttack) {\n\t                var percentComplete = 1 - attack / originalAttack;\n\t                var sliceIndex = Math.floor(percentComplete * this._attackCurve.length);\n\t                curve = this._attackCurve.slice(sliceIndex);\n\t                //the first index is the current value\n\t                curve[0] = currentValue;\n\t            }\n\t            this._sig.setValueCurveAtTime(curve, time, attack, velocity);\n\t        }\n\t        //decay\n\t        if (decay) {\n\t            this._sig.targetRampTo(velocity * this.sustain, decay, attack + time);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Triggers the release of the envelope.\n\t\t *  @param  {Time} [time=now] When the release portion of the envelope should start.\n\t\t *  @returns {Tone.Envelope} this\n\t\t *  @example\n\t\t *  //trigger release immediately\n\t\t *  env.triggerRelease();\n\t\t */\n\t    Tone.Envelope.prototype.triggerRelease = function (time) {\n\t        time = this.toSeconds(time);\n\t        var currentValue = this.getValueAtTime(time);\n\t        if (currentValue > 0) {\n\t            var release = this.toSeconds(this.release);\n\t            if (this._releaseCurve === 'linear') {\n\t                this._sig.linearRampTo(0, release, time);\n\t            } else if (this._releaseCurve === 'exponential') {\n\t                this._sig.targetRampTo(0, release, time);\n\t            } else {\n\t                var curve = this._releaseCurve;\n\t                if (Tone.isArray(curve)) {\n\t                    this._sig.cancelAndHoldAtTime(time);\n\t                    this._sig.setValueCurveAtTime(curve, time, release, currentValue);\n\t                }\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Get the scheduled value at the given time. This will\n\t\t *  return the unconverted (raw) value.\n\t\t *  @param  {Number}  time  The time in seconds.\n\t\t *  @return  {Number}  The scheduled value at the given time.\n\t\t */\n\t    Tone.Envelope.prototype.getValueAtTime = function (time) {\n\t        return this._sig.getValueAtTime(time);\n\t    };\n\t    /**\n\t\t *  triggerAttackRelease is shorthand for triggerAttack, then waiting\n\t\t *  some duration, then triggerRelease.\n\t\t *  @param {Time} duration The duration of the sustain.\n\t\t *  @param {Time} [time=now] When the attack should be triggered.\n\t\t *  @param {number} [velocity=1] The velocity of the envelope.\n\t\t *  @returns {Tone.Envelope} this\n\t\t *  @example\n\t\t * //trigger the attack and then the release after 0.6 seconds.\n\t\t * env.triggerAttackRelease(0.6);\n\t\t */\n\t    Tone.Envelope.prototype.triggerAttackRelease = function (duration, time, velocity) {\n\t        time = this.toSeconds(time);\n\t        this.triggerAttack(time, velocity);\n\t        this.triggerRelease(time + this.toSeconds(duration));\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancels all scheduled envelope changes after the given time.\n\t\t *  @param  {Time} after\n\t\t *  @returns {Tone.Envelope} this\n\t\t */\n\t    Tone.Envelope.prototype.cancel = function (after) {\n\t        this._sig.cancelScheduledValues(after);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Borrows the connect method from Tone.Signal.\n\t\t *  @function\n\t\t *  @private\n\t\t */\n\t    Tone.Envelope.prototype.connect = Tone.SignalBase.prototype.connect;\n\t    /**\n\t \t *  Generate some complex envelope curves.\n\t \t */\n\t    (function _createCurves() {\n\t        var curveLen = 128;\n\t        var i, k;\n\t        //cosine curve\n\t        var cosineCurve = [];\n\t        for (i = 0; i < curveLen; i++) {\n\t            cosineCurve[i] = Math.sin(i / (curveLen - 1) * (Math.PI / 2));\n\t        }\n\t        //ripple curve\n\t        var rippleCurve = [];\n\t        var rippleCurveFreq = 6.4;\n\t        for (i = 0; i < curveLen - 1; i++) {\n\t            k = i / (curveLen - 1);\n\t            var sineWave = Math.sin(k * (Math.PI * 2) * rippleCurveFreq - Math.PI / 2) + 1;\n\t            rippleCurve[i] = sineWave / 10 + k * 0.83;\n\t        }\n\t        rippleCurve[curveLen - 1] = 1;\n\t        //stairs curve\n\t        var stairsCurve = [];\n\t        var steps = 5;\n\t        for (i = 0; i < curveLen; i++) {\n\t            stairsCurve[i] = Math.ceil(i / (curveLen - 1) * steps) / steps;\n\t        }\n\t        //in-out easing curve\n\t        var sineCurve = [];\n\t        for (i = 0; i < curveLen; i++) {\n\t            k = i / (curveLen - 1);\n\t            sineCurve[i] = 0.5 * (1 - Math.cos(Math.PI * k));\n\t        }\n\t        //a bounce curve\n\t        var bounceCurve = [];\n\t        for (i = 0; i < curveLen; i++) {\n\t            k = i / (curveLen - 1);\n\t            var freq = Math.pow(k, 3) * 4 + 0.2;\n\t            var val = Math.cos(freq * Math.PI * 2 * k);\n\t            bounceCurve[i] = Math.abs(val * (1 - k));\n\t        }\n\t        /**\n\t\t\t *  Invert a value curve to make it work for the release\n\t\t\t *  @private\n\t\t\t */\n\t        function invertCurve(curve) {\n\t            var out = new Array(curve.length);\n\t            for (var j = 0; j < curve.length; j++) {\n\t                out[j] = 1 - curve[j];\n\t            }\n\t            return out;\n\t        }\n\t        /**\n\t\t\t *  reverse the curve\n\t\t\t *  @private\n\t\t\t */\n\t        function reverseCurve(curve) {\n\t            return curve.slice(0).reverse();\n\t        }\n\t        /**\n\t\t\t *  attack and release curve arrays\n\t\t\t *  @type  {Object}\n\t\t\t *  @private\n\t\t\t */\n\t        Tone.Envelope.Type = {\n\t            'linear': 'linear',\n\t            'exponential': 'exponential',\n\t            'bounce': {\n\t                In: invertCurve(bounceCurve),\n\t                Out: bounceCurve\n\t            },\n\t            'cosine': {\n\t                In: cosineCurve,\n\t                Out: reverseCurve(cosineCurve)\n\t            },\n\t            'step': {\n\t                In: stairsCurve,\n\t                Out: invertCurve(stairsCurve)\n\t            },\n\t            'ripple': {\n\t                In: rippleCurve,\n\t                Out: invertCurve(rippleCurve)\n\t            },\n\t            'sine': {\n\t                In: sineCurve,\n\t                Out: invertCurve(sineCurve)\n\t            }\n\t        };\n\t    }());\n\t    /**\n\t\t *  Disconnect and dispose.\n\t\t *  @returns {Tone.Envelope} this\n\t\t */\n\t    Tone.Envelope.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._sig.dispose();\n\t        this._sig = null;\n\t        this._attackCurve = null;\n\t        this._releaseCurve = null;\n\t        return this;\n\t    };\n\t    return Tone.Envelope;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.AmplitudeEnvelope is a Tone.Envelope connected to a gain node.\n\t\t *          Unlike Tone.Envelope, which outputs the envelope's value, Tone.AmplitudeEnvelope accepts\n\t\t *          an audio signal as the input and will apply the envelope to the amplitude\n\t\t *          of the signal. Read more about ADSR Envelopes on [Wikipedia](https://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Envelope}\n\t\t *  @param {Time|Object} [attack] The amount of time it takes for the envelope to go from\n\t\t *                               0 to it's maximum value.\n\t\t *  @param {Time} [decay]\tThe period of time after the attack that it takes for the envelope\n\t\t *                       \tto fall to the sustain value.\n\t\t *  @param {NormalRange} [sustain]\tThe percent of the maximum value that the envelope rests at until\n\t\t *                                \tthe release is triggered.\n\t\t *  @param {Time} [release]\tThe amount of time after the release is triggered it takes to reach 0.\n\t\t *  @example\n\t\t * var ampEnv = new Tone.AmplitudeEnvelope({\n\t\t * \t\"attack\": 0.1,\n\t\t * \t\"decay\": 0.2,\n\t\t * \t\"sustain\": 1.0,\n\t\t * \t\"release\": 0.8\n\t\t * }).toMaster();\n\t\t * //create an oscillator and connect it\n\t\t * var osc = new Tone.Oscillator().connect(ampEnv).start();\n\t\t * //trigger the envelopes attack and release \"8t\" apart\n\t\t * ampEnv.triggerAttackRelease(\"8t\");\n\t\t */\n\t    Tone.AmplitudeEnvelope = function () {\n\t        Tone.Envelope.apply(this, arguments);\n\t        /**\n\t\t\t *  the input node\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this.input = this.output = new Tone.Gain();\n\t        this._sig.connect(this.output.gain);\n\t    };\n\t    Tone.extend(Tone.AmplitudeEnvelope, Tone.Envelope);\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.AmplitudeEnvelope}  this\n\t\t */\n\t    Tone.AmplitudeEnvelope.prototype.dispose = function () {\n\t        Tone.Envelope.prototype.dispose.call(this);\n\t        return this;\n\t    };\n\t    return Tone.AmplitudeEnvelope;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  AnalyserNode.getFloatTimeDomainData polyfill\n\t\t *  @private\n\t\t */\n\t    if (Tone.supported) {\n\t        if (!AnalyserNode.prototype.getFloatTimeDomainData) {\n\t            //referenced https://github.com/mohayonao/get-float-time-domain-data\n\t            AnalyserNode.prototype.getFloatTimeDomainData = function (array) {\n\t                var uint8 = new Uint8Array(array.length);\n\t                this.getByteTimeDomainData(uint8);\n\t                for (var i = 0; i < uint8.length; i++) {\n\t                    array[i] = (uint8[i] - 128) / 128;\n\t                }\n\t            };\n\t        }\n\t    }\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Wrapper around the native Web Audio's\n\t\t *          [AnalyserNode](http://webaudio.github.io/web-audio-api/#idl-def-AnalyserNode).\n\t\t *          Extracts FFT or Waveform data from the incoming signal.\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {String=} type The return type of the analysis, either \"fft\", or \"waveform\".\n\t\t *  @param {Number=} size The size of the FFT. Value must be a power of\n\t\t *                       two in the range 32 to 32768.\n\t\t */\n\t    Tone.Analyser = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'type',\n\t            'size'\n\t        ], Tone.Analyser);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The analyser node.\n\t\t\t *  @private\n\t\t\t *  @type {AnalyserNode}\n\t\t\t */\n\t        this._analyser = this.input = this.output = this.context.createAnalyser();\n\t        /**\n\t\t\t *  The analysis type\n\t\t\t *  @type {String}\n\t\t\t *  @private\n\t\t\t */\n\t        this._type = options.type;\n\t        /**\n\t\t\t *  The buffer that the FFT data is written to\n\t\t\t *  @type {TypedArray}\n\t\t\t *  @private\n\t\t\t */\n\t        this._buffer = null;\n\t        //set the values initially\n\t        this.size = options.size;\n\t        this.type = options.type;\n\t    };\n\t    Tone.extend(Tone.Analyser, Tone.AudioNode);\n\t    /**\n\t\t *  The default values.\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.Analyser.defaults = {\n\t        'size': 1024,\n\t        'type': 'fft',\n\t        'smoothing': 0.8\n\t    };\n\t    /**\n\t\t *  Possible return types of analyser.getValue()\n\t\t *  @enum {String}\n\t\t */\n\t    Tone.Analyser.Type = {\n\t        Waveform: 'waveform',\n\t        FFT: 'fft'\n\t    };\n\t    /**\n\t\t *  Run the analysis given the current settings and return the\n\t\t *  result as a TypedArray.\n\t\t *  @returns {TypedArray}\n\t\t */\n\t    Tone.Analyser.prototype.getValue = function () {\n\t        if (this._type === Tone.Analyser.Type.FFT) {\n\t            this._analyser.getFloatFrequencyData(this._buffer);\n\t        } else if (this._type === Tone.Analyser.Type.Waveform) {\n\t            this._analyser.getFloatTimeDomainData(this._buffer);\n\t        }\n\t        return this._buffer;\n\t    };\n\t    /**\n\t\t *  The size of analysis. This must be a power of two in the range 32 to 32768.\n\t\t *  @memberOf Tone.Analyser#\n\t\t *  @type {Number}\n\t\t *  @name size\n\t\t */\n\t    Object.defineProperty(Tone.Analyser.prototype, 'size', {\n\t        get: function () {\n\t            return this._analyser.frequencyBinCount;\n\t        },\n\t        set: function (size) {\n\t            this._analyser.fftSize = size * 2;\n\t            this._buffer = new Float32Array(size);\n\t        }\n\t    });\n\t    /**\n\t\t *  The analysis function returned by analyser.getValue(), either \"fft\" or \"waveform\".\n\t\t *  @memberOf Tone.Analyser#\n\t\t *  @type {String}\n\t\t *  @name type\n\t\t */\n\t    Object.defineProperty(Tone.Analyser.prototype, 'type', {\n\t        get: function () {\n\t            return this._type;\n\t        },\n\t        set: function (type) {\n\t            if (type !== Tone.Analyser.Type.Waveform && type !== Tone.Analyser.Type.FFT) {\n\t                throw new TypeError('Tone.Analyser: invalid type: ' + type);\n\t            }\n\t            this._type = type;\n\t        }\n\t    });\n\t    /**\n\t\t *  0 represents no time averaging with the last analysis frame.\n\t\t *  @memberOf Tone.Analyser#\n\t\t *  @type {NormalRange}\n\t\t *  @name smoothing\n\t\t */\n\t    Object.defineProperty(Tone.Analyser.prototype, 'smoothing', {\n\t        get: function () {\n\t            return this._analyser.smoothingTimeConstant;\n\t        },\n\t        set: function (val) {\n\t            this._analyser.smoothingTimeConstant = val;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.Analyser}  this\n\t\t */\n\t    Tone.Analyser.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._analyser.disconnect();\n\t        this._analyser = null;\n\t        this._buffer = null;\n\t    };\n\t    return Tone.Analyser;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Compressor is a thin wrapper around the Web Audio\n\t\t *         [DynamicsCompressorNode](http://webaudio.github.io/web-audio-api/#the-dynamicscompressornode-interface).\n\t\t *         Compression reduces the volume of loud sounds or amplifies quiet sounds\n\t\t *         by narrowing or \"compressing\" an audio signal's dynamic range.\n\t\t *         Read more on [Wikipedia](https://en.wikipedia.org/wiki/Dynamic_range_compression).\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t *  @param {Decibels|Object} [threshold] The value above which the compression starts to be applied.\n\t\t *  @param {Positive} [ratio] The gain reduction ratio.\n\t\t *  @example\n\t\t * var comp = new Tone.Compressor(-30, 3);\n\t\t */\n\t    Tone.Compressor = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'threshold',\n\t            'ratio'\n\t        ], Tone.Compressor);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  the compressor node\n\t\t\t *  @type {DynamicsCompressorNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._compressor = this.input = this.output = this.context.createDynamicsCompressor();\n\t        /**\n\t\t\t *  the threshold vaue\n\t\t\t *  @type {Decibels}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.threshold = new Tone.Param({\n\t            'param': this._compressor.threshold,\n\t            'units': Tone.Type.Decibels,\n\t            'convert': false\n\t        });\n\t        /**\n\t\t\t *  The attack parameter\n\t\t\t *  @type {Time}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.attack = new Tone.Param(this._compressor.attack, Tone.Type.Time);\n\t        /**\n\t\t\t *  The release parameter\n\t\t\t *  @type {Time}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.release = new Tone.Param(this._compressor.release, Tone.Type.Time);\n\t        /**\n\t\t\t *  The knee parameter\n\t\t\t *  @type {Decibels}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.knee = new Tone.Param({\n\t            'param': this._compressor.knee,\n\t            'units': Tone.Type.Decibels,\n\t            'convert': false\n\t        });\n\t        /**\n\t\t\t *  The ratio value\n\t\t\t *  @type {Number}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.ratio = new Tone.Param({\n\t            'param': this._compressor.ratio,\n\t            'convert': false\n\t        });\n\t        //set the defaults\n\t        this._readOnly([\n\t            'knee',\n\t            'release',\n\t            'attack',\n\t            'ratio',\n\t            'threshold'\n\t        ]);\n\t        this.set(options);\n\t    };\n\t    Tone.extend(Tone.Compressor, Tone.AudioNode);\n\t    /**\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Compressor.defaults = {\n\t        'ratio': 12,\n\t        'threshold': -24,\n\t        'release': 0.25,\n\t        'attack': 0.003,\n\t        'knee': 30\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Compressor} this\n\t\t */\n\t    Tone.Compressor.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable([\n\t            'knee',\n\t            'release',\n\t            'attack',\n\t            'ratio',\n\t            'threshold'\n\t        ]);\n\t        this._compressor.disconnect();\n\t        this._compressor = null;\n\t        this.attack.dispose();\n\t        this.attack = null;\n\t        this.release.dispose();\n\t        this.release = null;\n\t        this.threshold.dispose();\n\t        this.threshold = null;\n\t        this.ratio.dispose();\n\t        this.ratio = null;\n\t        this.knee.dispose();\n\t        this.knee = null;\n\t        return this;\n\t    };\n\t    return Tone.Compressor;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Add a signal and a number or two signals. When no value is\n\t\t *         passed into the constructor, Tone.Add will sum <code>input[0]</code>\n\t\t *         and <code>input[1]</code>. If a value is passed into the constructor, \n\t\t *         the it will be added to the input.\n\t\t *  \n\t\t *  @constructor\n\t\t *  @extends {Tone.Signal}\n\t\t *  @param {number=} value If no value is provided, Tone.Add will sum the first\n\t\t *                         and second inputs. \n\t\t *  @example\n\t\t * var signal = new Tone.Signal(2);\n\t\t * var add = new Tone.Add(2);\n\t\t * signal.connect(add);\n\t\t * //the output of add equals 4\n\t\t *  @example\n\t\t * //if constructed with no arguments\n\t\t * //it will add the first and second inputs\n\t\t * var add = new Tone.Add();\n\t\t * var sig0 = new Tone.Signal(3).connect(add, 0, 0);\n\t\t * var sig1 = new Tone.Signal(4).connect(add, 0, 1);\n\t\t * //the output of add equals 7. \n\t\t */\n\t    Tone.Add = function (value) {\n\t        Tone.Signal.call(this);\n\t        this.createInsOuts(2, 0);\n\t        /**\n\t\t\t *  the summing node\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sum = this.input[0] = this.input[1] = this.output = new Tone.Gain();\n\t        /**\n\t\t\t *  @private\n\t\t\t *  @type {Tone.Signal}\n\t\t\t */\n\t        this._param = this.input[1] = new Tone.Signal(value);\n\t        this._param.connect(this._sum);\n\t    };\n\t    Tone.extend(Tone.Add, Tone.Signal);\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Add} this\n\t\t */\n\t    Tone.Add.prototype.dispose = function () {\n\t        Tone.Signal.prototype.dispose.call(this);\n\t        this._sum.dispose();\n\t        this._sum = null;\n\t        return this;\n\t    };\n\t    return Tone.Add;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Multiply two incoming signals. Or, if a number is given in the constructor,\n\t\t *          multiplies the incoming signal by that value.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Signal}\n\t\t *  @param {number=} value Constant value to multiple. If no value is provided,\n\t\t *                         it will return the product of the first and second inputs\n\t\t *  @example\n\t\t * var mult = new Tone.Multiply();\n\t\t * var sigA = new Tone.Signal(3);\n\t\t * var sigB = new Tone.Signal(4);\n\t\t * sigA.connect(mult, 0, 0);\n\t\t * sigB.connect(mult, 0, 1);\n\t\t * //output of mult is 12.\n\t\t *  @example\n\t\t * var mult = new Tone.Multiply(10);\n\t\t * var sig = new Tone.Signal(2).connect(mult);\n\t\t * //the output of mult is 20.\n\t\t */\n\t    Tone.Multiply = function (value) {\n\t        Tone.Signal.call(this);\n\t        this.createInsOuts(2, 0);\n\t        /**\n\t\t\t *  the input node is the same as the output node\n\t\t\t *  it is also the GainNode which handles the scaling of incoming signal\n\t\t\t *\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._mult = this.input[0] = this.output = new Tone.Gain();\n\t        /**\n\t\t\t *  the scaling parameter\n\t\t\t *  @type {AudioParam}\n\t\t\t *  @private\n\t\t\t */\n\t        this._param = this.input[1] = this.output.gain;\n\t        this.value = Tone.defaultArg(value, 0);\n\t    };\n\t    Tone.extend(Tone.Multiply, Tone.Signal);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Multiply} this\n\t\t */\n\t    Tone.Multiply.prototype.dispose = function () {\n\t        Tone.Signal.prototype.dispose.call(this);\n\t        this._mult.dispose();\n\t        this._mult = null;\n\t        this._param = null;\n\t        return this;\n\t    };\n\t    return Tone.Multiply;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Negate the incoming signal. i.e. an input signal of 10 will output -10\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @example\n\t\t * var neg = new Tone.Negate();\n\t\t * var sig = new Tone.Signal(-2).connect(neg);\n\t\t * //output of neg is positive 2. \n\t\t */\n\t    Tone.Negate = function () {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  negation is done by multiplying by -1\n\t\t\t *  @type {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._multiply = this.input = this.output = new Tone.Multiply(-1);\n\t    };\n\t    Tone.extend(Tone.Negate, Tone.SignalBase);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Negate} this\n\t\t */\n\t    Tone.Negate.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._multiply.dispose();\n\t        this._multiply = null;\n\t        return this;\n\t    };\n\t    return Tone.Negate;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Subtract the signal connected to <code>input[1]</code> from the signal connected \n\t\t *         to <code>input[0]</code>. If an argument is provided in the constructor, the \n\t\t *         signals <code>.value</code> will be subtracted from the incoming signal.\n\t\t *\n\t\t *  @extends {Tone.Signal}\n\t\t *  @constructor\n\t\t *  @param {number=} value The value to subtract from the incoming signal. If the value\n\t\t *                         is omitted, it will subtract the second signal from the first.\n\t\t *  @example\n\t\t * var sub = new Tone.Subtract(1);\n\t\t * var sig = new Tone.Signal(4).connect(sub);\n\t\t * //the output of sub is 3. \n\t\t *  @example\n\t\t * var sub = new Tone.Subtract();\n\t\t * var sigA = new Tone.Signal(10);\n\t\t * var sigB = new Tone.Signal(2.5);\n\t\t * sigA.connect(sub, 0, 0);\n\t\t * sigB.connect(sub, 0, 1);\n\t\t * //output of sub is 7.5\n\t\t */\n\t    Tone.Subtract = function (value) {\n\t        Tone.Signal.call(this);\n\t        this.createInsOuts(2, 0);\n\t        /**\n\t\t\t *  the summing node\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sum = this.input[0] = this.output = new Tone.Gain();\n\t        /**\n\t\t\t *  negate the input of the second input before connecting it\n\t\t\t *  to the summing node.\n\t\t\t *  @type {Tone.Negate}\n\t\t\t *  @private\n\t\t\t */\n\t        this._neg = new Tone.Negate();\n\t        /**\n\t\t\t *  the node where the value is set\n\t\t\t *  @private\n\t\t\t *  @type {Tone.Signal}\n\t\t\t */\n\t        this._param = this.input[1] = new Tone.Signal(value);\n\t        this._param.chain(this._neg, this._sum);\n\t    };\n\t    Tone.extend(Tone.Subtract, Tone.Signal);\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.SignalBase} this\n\t\t */\n\t    Tone.Subtract.prototype.dispose = function () {\n\t        Tone.Signal.prototype.dispose.call(this);\n\t        this._neg.dispose();\n\t        this._neg = null;\n\t        this._sum.disconnect();\n\t        this._sum = null;\n\t        return this;\n\t    };\n\t    return Tone.Subtract;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Convert an incoming signal between 0, 1 to an equal power gain scale.\n\t\t *\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @constructor\n\t\t *  @example\n\t\t * var eqPowGain = new Tone.EqualPowerGain();\n\t\t */\n\t    Tone.EqualPowerGain = function () {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  @type {Tone.WaveShaper}\n\t\t\t *  @private\n\t\t\t */\n\t        this._eqPower = this.input = this.output = new Tone.WaveShaper(function (val) {\n\t            if (Math.abs(val) < 0.001) {\n\t                //should output 0 when input is 0\n\t                return 0;\n\t            } else {\n\t                return Tone.equalPowerScale(val);\n\t            }\n\t        }.bind(this), 4096);\n\t    };\n\t    Tone.extend(Tone.EqualPowerGain, Tone.SignalBase);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.EqualPowerGain} this\n\t\t */\n\t    Tone.EqualPowerGain.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._eqPower.dispose();\n\t        this._eqPower = null;\n\t        return this;\n\t    };\n\t    return Tone.EqualPowerGain;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t * @class  Tone.Crossfade provides equal power fading between two inputs.\n\t\t *         More on crossfading technique [here](https://en.wikipedia.org/wiki/Fade_(audio_engineering)#Crossfading).\n\t\t *\n\t\t * @constructor\n\t\t * @extends {Tone.AudioNode}\n\t\t * @param {NormalRange} [initialFade=0.5]\n\t\t * @example\n\t\t * var crossFade = new Tone.CrossFade(0.5);\n\t\t * //connect effect A to crossfade from\n\t\t * //effect output 0 to crossfade input 0\n\t\t * effectA.connect(crossFade, 0, 0);\n\t\t * //connect effect B to crossfade from\n\t\t * //effect output 0 to crossfade input 1\n\t\t * effectB.connect(crossFade, 0, 1);\n\t\t * crossFade.fade.value = 0;\n\t\t * // ^ only effectA is output\n\t\t * crossFade.fade.value = 1;\n\t\t * // ^ only effectB is output\n\t\t * crossFade.fade.value = 0.5;\n\t\t * // ^ the two signals are mixed equally.\n\t\t */\n\t    Tone.CrossFade = function (initialFade) {\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(2, 1);\n\t        /**\n\t\t\t *  Alias for <code>input[0]</code>.\n\t\t\t *  @type {Tone.Gain}\n\t\t\t */\n\t        this.a = this.input[0] = new Tone.Gain();\n\t        /**\n\t\t\t *  Alias for <code>input[1]</code>.\n\t\t\t *  @type {Tone.Gain}\n\t\t\t */\n\t        this.b = this.input[1] = new Tone.Gain();\n\t        /**\n\t\t\t * \tThe mix between the two inputs. A fade value of 0\n\t\t\t * \twill output 100% <code>input[0]</code> and\n\t\t\t * \ta value of 1 will output 100% <code>input[1]</code>.\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.fade = new Tone.Signal(Tone.defaultArg(initialFade, 0.5), Tone.Type.NormalRange);\n\t        /**\n\t\t\t *  equal power gain cross fade\n\t\t\t *  @private\n\t\t\t *  @type {Tone.EqualPowerGain}\n\t\t\t */\n\t        this._equalPowerA = new Tone.EqualPowerGain();\n\t        /**\n\t\t\t *  equal power gain cross fade\n\t\t\t *  @private\n\t\t\t *  @type {Tone.EqualPowerGain}\n\t\t\t */\n\t        this._equalPowerB = new Tone.EqualPowerGain();\n\t        /**\n\t\t\t *  invert the incoming signal\n\t\t\t *  @private\n\t\t\t *  @type {Tone}\n\t\t\t */\n\t        this._one = this.context.getConstant(1);\n\t        /**\n\t\t\t *  invert the incoming signal\n\t\t\t *  @private\n\t\t\t *  @type {Tone.Subtract}\n\t\t\t */\n\t        this._invert = new Tone.Subtract();\n\t        //connections\n\t        this.a.connect(this.output);\n\t        this.b.connect(this.output);\n\t        this.fade.chain(this._equalPowerB, this.b.gain);\n\t        this._one.connect(this._invert, 0, 0);\n\t        this.fade.connect(this._invert, 0, 1);\n\t        this._invert.chain(this._equalPowerA, this.a.gain);\n\t        this._readOnly('fade');\n\t    };\n\t    Tone.extend(Tone.CrossFade, Tone.AudioNode);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.CrossFade} this\n\t\t */\n\t    Tone.CrossFade.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable('fade');\n\t        this._equalPowerA.dispose();\n\t        this._equalPowerA = null;\n\t        this._equalPowerB.dispose();\n\t        this._equalPowerB = null;\n\t        this.fade.dispose();\n\t        this.fade = null;\n\t        this._invert.dispose();\n\t        this._invert = null;\n\t        this._one = null;\n\t        this.a.dispose();\n\t        this.a = null;\n\t        this.b.dispose();\n\t        this.b = null;\n\t        return this;\n\t    };\n\t    return Tone.CrossFade;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Filter is a filter which allows for all of the same native methods\n\t\t *          as the [BiquadFilterNode](http://webaudio.github.io/web-audio-api/#the-biquadfilternode-interface).\n\t\t *          Tone.Filter has the added ability to set the filter rolloff at -12\n\t\t *          (default), -24 and -48.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Frequency|Object} [frequency] The cutoff frequency of the filter.\n\t\t *  @param {string=} type The type of filter.\n\t\t *  @param {number=} rolloff The drop in decibels per octave after the cutoff frequency.\n\t\t *                            3 choices: -12, -24, and -48\n\t\t *  @example\n\t\t *  var filter = new Tone.Filter(200, \"highpass\");\n\t\t */\n\t    Tone.Filter = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'type',\n\t            'rolloff'\n\t        ], Tone.Filter);\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(1, 1);\n\t        /**\n\t\t\t *  the filter(s)\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._filters = [];\n\t        /**\n\t\t\t *  The cutoff frequency of the filter.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The detune parameter\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = new Tone.Signal(0, Tone.Type.Cents);\n\t        /**\n\t\t\t *  The gain of the filter, only used in certain filter types\n\t\t\t *  @type {Number}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.gain = new Tone.Signal({\n\t            'value': options.gain,\n\t            'convert': false\n\t        });\n\t        /**\n\t\t\t *  The Q or Quality of the filter\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.Q = new Tone.Signal(options.Q);\n\t        /**\n\t\t\t *  the type of the filter\n\t\t\t *  @type {string}\n\t\t\t *  @private\n\t\t\t */\n\t        this._type = options.type;\n\t        /**\n\t\t\t *  the rolloff value of the filter\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._rolloff = options.rolloff;\n\t        //set the rolloff;\n\t        this.rolloff = options.rolloff;\n\t        this._readOnly([\n\t            'detune',\n\t            'frequency',\n\t            'gain',\n\t            'Q'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.Filter, Tone.AudioNode);\n\t    /**\n\t\t *  the default parameters\n\t\t *\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Filter.defaults = {\n\t        'type': 'lowpass',\n\t        'frequency': 350,\n\t        'rolloff': -12,\n\t        'Q': 1,\n\t        'gain': 0\n\t    };\n\t    /**\n\t\t * The type of the filter. Types: \"lowpass\", \"highpass\",\n\t\t * \"bandpass\", \"lowshelf\", \"highshelf\", \"notch\", \"allpass\", or \"peaking\".\n\t\t * @memberOf Tone.Filter#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.Filter.prototype, 'type', {\n\t        get: function () {\n\t            return this._type;\n\t        },\n\t        set: function (type) {\n\t            var types = [\n\t                'lowpass',\n\t                'highpass',\n\t                'bandpass',\n\t                'lowshelf',\n\t                'highshelf',\n\t                'notch',\n\t                'allpass',\n\t                'peaking'\n\t            ];\n\t            if (types.indexOf(type) === -1) {\n\t                throw new TypeError('Tone.Filter: invalid type ' + type);\n\t            }\n\t            this._type = type;\n\t            for (var i = 0; i < this._filters.length; i++) {\n\t                this._filters[i].type = type;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The rolloff of the filter which is the drop in db\n\t\t * per octave. Implemented internally by cascading filters.\n\t\t * Only accepts the values -12, -24, -48 and -96.\n\t\t * @memberOf Tone.Filter#\n\t\t * @type {number}\n\t\t * @name rolloff\n\t\t */\n\t    Object.defineProperty(Tone.Filter.prototype, 'rolloff', {\n\t        get: function () {\n\t            return this._rolloff;\n\t        },\n\t        set: function (rolloff) {\n\t            rolloff = parseInt(rolloff, 10);\n\t            var possibilities = [\n\t                -12,\n\t                -24,\n\t                -48,\n\t                -96\n\t            ];\n\t            var cascadingCount = possibilities.indexOf(rolloff);\n\t            //check the rolloff is valid\n\t            if (cascadingCount === -1) {\n\t                throw new RangeError('Tone.Filter: rolloff can only be -12, -24, -48 or -96');\n\t            }\n\t            cascadingCount += 1;\n\t            this._rolloff = rolloff;\n\t            //first disconnect the filters and throw them away\n\t            this.input.disconnect();\n\t            for (var i = 0; i < this._filters.length; i++) {\n\t                this._filters[i].disconnect();\n\t                this._filters[i] = null;\n\t            }\n\t            this._filters = new Array(cascadingCount);\n\t            for (var count = 0; count < cascadingCount; count++) {\n\t                var filter = this.context.createBiquadFilter();\n\t                filter.type = this._type;\n\t                this.frequency.connect(filter.frequency);\n\t                this.detune.connect(filter.detune);\n\t                this.Q.connect(filter.Q);\n\t                this.gain.connect(filter.gain);\n\t                this._filters[count] = filter;\n\t            }\n\t            //connect them up\n\t            var connectionChain = [this.input].concat(this._filters).concat([this.output]);\n\t            Tone.connectSeries.apply(Tone, connectionChain);\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return {Tone.Filter} this\n\t\t */\n\t    Tone.Filter.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        for (var i = 0; i < this._filters.length; i++) {\n\t            this._filters[i].disconnect();\n\t            this._filters[i] = null;\n\t        }\n\t        this._filters = null;\n\t        this._writable([\n\t            'detune',\n\t            'frequency',\n\t            'gain',\n\t            'Q'\n\t        ]);\n\t        this.frequency.dispose();\n\t        this.Q.dispose();\n\t        this.frequency = null;\n\t        this.Q = null;\n\t        this.detune.dispose();\n\t        this.detune = null;\n\t        this.gain.dispose();\n\t        this.gain = null;\n\t        return this;\n\t    };\n\t    return Tone.Filter;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Split the incoming signal into three bands (low, mid, high)\n\t\t *         with two crossover frequency controls.\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t *  @param {Frequency|Object} [lowFrequency] the low/mid crossover frequency\n\t\t *  @param {Frequency} [highFrequency] the mid/high crossover frequency\n\t\t */\n\t    Tone.MultibandSplit = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'lowFrequency',\n\t            'highFrequency'\n\t        ], Tone.MultibandSplit);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  the input\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this.input = new Tone.Gain();\n\t        /**\n\t\t\t *  the outputs\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this.output = new Array(3);\n\t        /**\n\t\t\t *  The low band. Alias for <code>output[0]</code>\n\t\t\t *  @type {Tone.Filter}\n\t\t\t */\n\t        this.low = this.output[0] = new Tone.Filter(0, 'lowpass');\n\t        /**\n\t\t\t *  the lower filter of the mid band\n\t\t\t *  @type {Tone.Filter}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lowMidFilter = new Tone.Filter(0, 'highpass');\n\t        /**\n\t\t\t *  The mid band output. Alias for <code>output[1]</code>\n\t\t\t *  @type {Tone.Filter}\n\t\t\t */\n\t        this.mid = this.output[1] = new Tone.Filter(0, 'lowpass');\n\t        /**\n\t\t\t *  The high band output. Alias for <code>output[2]</code>\n\t\t\t *  @type {Tone.Filter}\n\t\t\t */\n\t        this.high = this.output[2] = new Tone.Filter(0, 'highpass');\n\t        /**\n\t\t\t *  The low/mid crossover frequency.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.lowFrequency = new Tone.Signal(options.lowFrequency, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The mid/high crossover frequency.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.highFrequency = new Tone.Signal(options.highFrequency, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The quality of all the filters\n\t\t\t *  @type {Number}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.Q = new Tone.Signal(options.Q);\n\t        this.input.fan(this.low, this.high);\n\t        this.input.chain(this._lowMidFilter, this.mid);\n\t        //the frequency control signal\n\t        this.lowFrequency.connect(this.low.frequency);\n\t        this.lowFrequency.connect(this._lowMidFilter.frequency);\n\t        this.highFrequency.connect(this.mid.frequency);\n\t        this.highFrequency.connect(this.high.frequency);\n\t        //the Q value\n\t        this.Q.connect(this.low.Q);\n\t        this.Q.connect(this._lowMidFilter.Q);\n\t        this.Q.connect(this.mid.Q);\n\t        this.Q.connect(this.high.Q);\n\t        this._readOnly([\n\t            'high',\n\t            'mid',\n\t            'low',\n\t            'highFrequency',\n\t            'lowFrequency'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.MultibandSplit, Tone.AudioNode);\n\t    /**\n\t\t *  @private\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.MultibandSplit.defaults = {\n\t        'lowFrequency': 400,\n\t        'highFrequency': 2500,\n\t        'Q': 1\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.MultibandSplit} this\n\t\t */\n\t    Tone.MultibandSplit.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable([\n\t            'high',\n\t            'mid',\n\t            'low',\n\t            'highFrequency',\n\t            'lowFrequency'\n\t        ]);\n\t        this.low.dispose();\n\t        this.low = null;\n\t        this._lowMidFilter.dispose();\n\t        this._lowMidFilter = null;\n\t        this.mid.dispose();\n\t        this.mid = null;\n\t        this.high.dispose();\n\t        this.high = null;\n\t        this.lowFrequency.dispose();\n\t        this.lowFrequency = null;\n\t        this.highFrequency.dispose();\n\t        this.highFrequency = null;\n\t        this.Q.dispose();\n\t        this.Q = null;\n\t        return this;\n\t    };\n\t    return Tone.MultibandSplit;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.EQ3 is a three band EQ with control over low, mid, and high gain as\n\t\t *         well as the low and high crossover frequencies.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *\n\t\t *  @param {Decibels|Object} [lowLevel] The gain applied to the lows.\n\t\t *  @param {Decibels} [midLevel] The gain applied to the mid.\n\t\t *  @param {Decibels} [highLevel] The gain applied to the high.\n\t\t *  @example\n\t\t * var eq = new Tone.EQ3(-10, 3, -20);\n\t\t */\n\t    Tone.EQ3 = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'low',\n\t            'mid',\n\t            'high'\n\t        ], Tone.EQ3);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  the output node\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this.output = new Tone.Gain();\n\t        /**\n\t\t\t *  the multiband split\n\t\t\t *  @type {Tone.MultibandSplit}\n\t\t\t *  @private\n\t\t\t */\n\t        this._multibandSplit = this.input = new Tone.MultibandSplit({\n\t            'lowFrequency': options.lowFrequency,\n\t            'highFrequency': options.highFrequency\n\t        });\n\t        /**\n\t\t\t *  The gain for the lower signals\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lowGain = new Tone.Gain(options.low, Tone.Type.Decibels);\n\t        /**\n\t\t\t *  The gain for the mid signals\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._midGain = new Tone.Gain(options.mid, Tone.Type.Decibels);\n\t        /**\n\t\t\t * The gain in decibels of the high part\n\t\t\t * @type {Tone.Gain}\n\t\t\t * @private\n\t\t\t */\n\t        this._highGain = new Tone.Gain(options.high, Tone.Type.Decibels);\n\t        /**\n\t\t\t * The gain in decibels of the low part\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t */\n\t        this.low = this._lowGain.gain;\n\t        /**\n\t\t\t * The gain in decibels of the mid part\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t */\n\t        this.mid = this._midGain.gain;\n\t        /**\n\t\t\t * The gain in decibels of the high part\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t */\n\t        this.high = this._highGain.gain;\n\t        /**\n\t\t\t *  The Q value for all of the filters.\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.Q = this._multibandSplit.Q;\n\t        /**\n\t\t\t *  The low/mid crossover frequency.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.lowFrequency = this._multibandSplit.lowFrequency;\n\t        /**\n\t\t\t *  The mid/high crossover frequency.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.highFrequency = this._multibandSplit.highFrequency;\n\t        //the frequency bands\n\t        this._multibandSplit.low.chain(this._lowGain, this.output);\n\t        this._multibandSplit.mid.chain(this._midGain, this.output);\n\t        this._multibandSplit.high.chain(this._highGain, this.output);\n\t        this._readOnly([\n\t            'low',\n\t            'mid',\n\t            'high',\n\t            'lowFrequency',\n\t            'highFrequency'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.EQ3, Tone.AudioNode);\n\t    /**\n\t\t *  the default values\n\t\t */\n\t    Tone.EQ3.defaults = {\n\t        'low': 0,\n\t        'mid': 0,\n\t        'high': 0,\n\t        'lowFrequency': 400,\n\t        'highFrequency': 2500\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.EQ3} this\n\t\t */\n\t    Tone.EQ3.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable([\n\t            'low',\n\t            'mid',\n\t            'high',\n\t            'lowFrequency',\n\t            'highFrequency'\n\t        ]);\n\t        this._multibandSplit.dispose();\n\t        this._multibandSplit = null;\n\t        this.lowFrequency = null;\n\t        this.highFrequency = null;\n\t        this._lowGain.dispose();\n\t        this._lowGain = null;\n\t        this._midGain.dispose();\n\t        this._midGain = null;\n\t        this._highGain.dispose();\n\t        this._highGain = null;\n\t        this.low = null;\n\t        this.mid = null;\n\t        this.high = null;\n\t        this.Q = null;\n\t        return this;\n\t    };\n\t    return Tone.EQ3;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Performs a linear scaling on an input signal.\n\t\t *          Scales a NormalRange input to between\n\t\t *          outputMin and outputMax.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @param {number} [outputMin=0] The output value when the input is 0. \n\t\t *  @param {number} [outputMax=1]\tThe output value when the input is 1. \n\t\t *  @example\n\t\t * var scale = new Tone.Scale(50, 100);\n\t\t * var signal = new Tone.Signal(0.5).connect(scale);\n\t\t * //the output of scale equals 75\n\t\t */\n\t    Tone.Scale = function (outputMin, outputMax) {\n\t        Tone.SignalBase.call(this);\n\t        /** \n\t\t\t *  @private\n\t\t\t *  @type {number}\n\t\t\t */\n\t        this._outputMin = Tone.defaultArg(outputMin, 0);\n\t        /** \n\t\t\t *  @private\n\t\t\t *  @type {number}\n\t\t\t */\n\t        this._outputMax = Tone.defaultArg(outputMax, 1);\n\t        /** \n\t\t\t *  @private\n\t\t\t *  @type {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._scale = this.input = new Tone.Multiply(1);\n\t        /** \n\t\t\t *  @private\n\t\t\t *  @type {Tone.Add}\n\t\t\t *  @private\n\t\t\t */\n\t        this._add = this.output = new Tone.Add(0);\n\t        this._scale.connect(this._add);\n\t        this._setRange();\n\t    };\n\t    Tone.extend(Tone.Scale, Tone.SignalBase);\n\t    /**\n\t\t * The minimum output value. This number is output when \n\t\t * the value input value is 0. \n\t\t * @memberOf Tone.Scale#\n\t\t * @type {number}\n\t\t * @name min\n\t\t */\n\t    Object.defineProperty(Tone.Scale.prototype, 'min', {\n\t        get: function () {\n\t            return this._outputMin;\n\t        },\n\t        set: function (min) {\n\t            this._outputMin = min;\n\t            this._setRange();\n\t        }\n\t    });\n\t    /**\n\t\t * The maximum output value. This number is output when \n\t\t * the value input value is 1. \n\t\t * @memberOf Tone.Scale#\n\t\t * @type {number}\n\t\t * @name max\n\t\t */\n\t    Object.defineProperty(Tone.Scale.prototype, 'max', {\n\t        get: function () {\n\t            return this._outputMax;\n\t        },\n\t        set: function (max) {\n\t            this._outputMax = max;\n\t            this._setRange();\n\t        }\n\t    });\n\t    /**\n\t\t *  set the values\n\t\t *  @private\n\t\t */\n\t    Tone.Scale.prototype._setRange = function () {\n\t        this._add.value = this._outputMin;\n\t        this._scale.value = this._outputMax - this._outputMin;\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Scale} this\n\t\t */\n\t    Tone.Scale.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._add.dispose();\n\t        this._add = null;\n\t        this._scale.dispose();\n\t        this._scale = null;\n\t        return this;\n\t    };\n\t    return Tone.Scale;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class  Performs an exponential scaling on an input signal.\n\t\t *          Scales a NormalRange value [0,1] exponentially\n\t\t *          to the output range of outputMin to outputMax.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @param {number} [outputMin=0] The output value when the input is 0.\n\t\t *  @param {number} [outputMax=1]\tThe output value when the input is 1.\n\t\t *  @param {number} [exponent=2] The exponent which scales the incoming signal.\n\t\t *  @example\n\t\t * var scaleExp = new Tone.ScaleExp(0, 100, 2);\n\t\t * var signal = new Tone.Signal(0.5).connect(scaleExp);\n\t\t */\n\t    Tone.ScaleExp = function (outputMin, outputMax, exponent) {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  scale the input to the output range\n\t\t\t *  @type {Tone.Scale}\n\t\t\t *  @private\n\t\t\t */\n\t        this._scale = this.output = new Tone.Scale(outputMin, outputMax);\n\t        /**\n\t\t\t *  @private\n\t\t\t *  @type {Tone.Pow}\n\t\t\t *  @private\n\t\t\t */\n\t        this._exp = this.input = new Tone.Pow(Tone.defaultArg(exponent, 2));\n\t        this._exp.connect(this._scale);\n\t    };\n\t    Tone.extend(Tone.ScaleExp, Tone.SignalBase);\n\t    /**\n\t\t * Instead of interpolating linearly between the <code>min</code> and\n\t\t * <code>max</code> values, setting the exponent will interpolate between\n\t\t * the two values with an exponential curve.\n\t\t * @memberOf Tone.ScaleExp#\n\t\t * @type {number}\n\t\t * @name exponent\n\t\t */\n\t    Object.defineProperty(Tone.ScaleExp.prototype, 'exponent', {\n\t        get: function () {\n\t            return this._exp.value;\n\t        },\n\t        set: function (exp) {\n\t            this._exp.value = exp;\n\t        }\n\t    });\n\t    /**\n\t\t * The minimum output value. This number is output when\n\t\t * the value input value is 0.\n\t\t * @memberOf Tone.ScaleExp#\n\t\t * @type {number}\n\t\t * @name min\n\t\t */\n\t    Object.defineProperty(Tone.ScaleExp.prototype, 'min', {\n\t        get: function () {\n\t            return this._scale.min;\n\t        },\n\t        set: function (min) {\n\t            this._scale.min = min;\n\t        }\n\t    });\n\t    /**\n\t\t * The maximum output value. This number is output when\n\t\t * the value input value is 1.\n\t\t * @memberOf Tone.ScaleExp#\n\t\t * @type {number}\n\t\t * @name max\n\t\t */\n\t    Object.defineProperty(Tone.ScaleExp.prototype, 'max', {\n\t        get: function () {\n\t            return this._scale.max;\n\t        },\n\t        set: function (max) {\n\t            this._scale.max = max;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.ScaleExp} this\n\t\t */\n\t    Tone.ScaleExp.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._scale.dispose();\n\t        this._scale = null;\n\t        this._exp.dispose();\n\t        this._exp = null;\n\t        return this;\n\t    };\n\t    return Tone.ScaleExp;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Wrapper around Web Audio's native [DelayNode](http://webaudio.github.io/web-audio-api/#the-delaynode-interface).\n\t\t *  @extends {Tone}\n\t\t *  @param {Time=} delayTime The delay applied to the incoming signal.\n\t\t *  @param {Time=} maxDelay The maximum delay time.\n\t\t */\n\t    Tone.Delay = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'delayTime',\n\t            'maxDelay'\n\t        ], Tone.Delay);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t * The maximum delay time initialized with the node\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t        this._maxDelay = Math.max(this.toSeconds(options.maxDelay), this.toSeconds(options.delayTime));\n\t        /**\n\t\t\t *  The native delay node\n\t\t\t *  @type {DelayNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delayNode = this.input = this.output = this.context.createDelay(this._maxDelay);\n\t        /**\n\t\t\t *  The amount of time the incoming signal is\n\t\t\t *  delayed.\n\t\t\t *  @type {Time}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.delayTime = new Tone.Param({\n\t            'param': this._delayNode.delayTime,\n\t            'units': Tone.Type.Time,\n\t            'value': options.delayTime\n\t        });\n\t        this._readOnly('delayTime');\n\t    };\n\t    Tone.extend(Tone.Delay, Tone.AudioNode);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.Delay.defaults = {\n\t        'maxDelay': 1,\n\t        'delayTime': 0\n\t    };\n\t    /**\n\t\t * The maximum delay time. This cannot be changed. The value is passed into the constructor.\n\t\t * @memberof Tone.Delay#\n\t\t * @type {Time}\n\t\t * @name maxDelay\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Delay.prototype, 'maxDelay', {\n\t        get: function () {\n\t            return this._maxDelay;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.Delay}  this\n\t\t */\n\t    Tone.Delay.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._delayNode.disconnect();\n\t        this._delayNode = null;\n\t        this._writable('delayTime');\n\t        this.delayTime = null;\n\t        return this;\n\t    };\n\t    return Tone.Delay;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Comb filters are basic building blocks for physical modeling. Read more\n\t\t *         about comb filters on [CCRMA's website](https://ccrma.stanford.edu/~jos/pasp/Feedback_Comb_Filters.html).\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t *  @param {Time|Object} [delayTime] The delay time of the filter.\n\t\t *  @param {NormalRange=} resonance The amount of feedback the filter has.\n\t\t */\n\t    Tone.FeedbackCombFilter = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'delayTime',\n\t            'resonance'\n\t        ], Tone.FeedbackCombFilter);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  the delay node\n\t\t\t *  @type {DelayNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delay = this.input = this.output = new Tone.Delay(options.delayTime);\n\t        /**\n\t\t\t *  The amount of delay of the comb filter.\n\t\t\t *  @type {Time}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.delayTime = this._delay.delayTime;\n\t        /**\n\t\t\t *  the feedback node\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._feedback = new Tone.Gain(options.resonance, Tone.Type.NormalRange);\n\t        /**\n\t\t\t *  The amount of feedback of the delayed signal.\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.resonance = this._feedback.gain;\n\t        this._delay.chain(this._feedback, this._delay);\n\t        this._readOnly([\n\t            'resonance',\n\t            'delayTime'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.FeedbackCombFilter, Tone.AudioNode);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.FeedbackCombFilter.defaults = {\n\t        'delayTime': 0.1,\n\t        'resonance': 0.5\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.FeedbackCombFilter} this\n\t\t */\n\t    Tone.FeedbackCombFilter.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable([\n\t            'resonance',\n\t            'delayTime'\n\t        ]);\n\t        this._delay.dispose();\n\t        this._delay = null;\n\t        this.delayTime = null;\n\t        this._feedback.dispose();\n\t        this._feedback = null;\n\t        this.resonance = null;\n\t        return this;\n\t    };\n\t    return Tone.FeedbackCombFilter;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class  Get the current waveform data of the connected audio source.\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Number=} size The size of the FFT. Value must be a power of\n\t\t *                       two in the range 32 to 32768.\n\t\t */\n\t    Tone.FFT = function () {\n\t        var options = Tone.defaults(arguments, ['size'], Tone.FFT);\n\t        options.type = Tone.Analyser.Type.FFT;\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The analyser node.\n\t\t\t *  @private\n\t\t\t *  @type {Tone.Analyser}\n\t\t\t */\n\t        this._analyser = this.input = this.output = new Tone.Analyser(options);\n\t    };\n\t    Tone.extend(Tone.FFT, Tone.AudioNode);\n\t    /**\n\t\t *  The default values.\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.FFT.defaults = { 'size': 1024 };\n\t    /**\n\t\t *  Gets the waveform of the audio source. Returns the waveform data\n\t\t *  of length [size](#size) as a Float32Array with values between -1 and 1.\n\t\t *  @returns {TypedArray}\n\t\t */\n\t    Tone.FFT.prototype.getValue = function () {\n\t        return this._analyser.getValue();\n\t    };\n\t    /**\n\t\t *  The size of analysis. This must be a power of two in the range 32 to 32768.\n\t\t *  @memberOf Tone.FFT#\n\t\t *  @type {Number}\n\t\t *  @name size\n\t\t */\n\t    Object.defineProperty(Tone.FFT.prototype, 'size', {\n\t        get: function () {\n\t            return this._analyser.size;\n\t        },\n\t        set: function (size) {\n\t            this._analyser.size = size;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.FFT}  this\n\t\t */\n\t    Tone.FFT.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._analyser.dispose();\n\t        this._analyser = null;\n\t    };\n\t    return Tone.FFT;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Return the absolute value of an incoming signal.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @example\n\t\t * var signal = new Tone.Signal(-1);\n\t\t * var abs = new Tone.Abs();\n\t\t * signal.connect(abs);\n\t\t * //the output of abs is 1.\n\t\t */\n\t    Tone.Abs = function () {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  @type {Tone.LessThan}\n\t\t\t *  @private\n\t\t\t */\n\t        this._abs = this.input = this.output = new Tone.WaveShaper(function (val) {\n\t            if (Math.abs(val) < 0.001) {\n\t                return 0;\n\t            } else {\n\t                return Math.abs(val);\n\t            }\n\t        }, 1024);\n\t    };\n\t    Tone.extend(Tone.Abs, Tone.SignalBase);\n\t    /**\n\t\t *  dispose method\n\t\t *  @returns {Tone.Abs} this\n\t\t */\n\t    Tone.Abs.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._abs.dispose();\n\t        this._abs = null;\n\t        return this;\n\t    };\n\t    return Tone.Abs;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Follower is a  crude envelope follower which will follow\n\t\t *          the amplitude of an incoming signal.\n\t\t *          Take care with small (< 0.02) attack or decay values\n\t\t *          as follower has some ripple which is exaggerated\n\t\t *          at these values. Read more about envelope followers (also known\n\t\t *          as envelope detectors) on [Wikipedia](https://en.wikipedia.org/wiki/Envelope_detector).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Time|Object} [attack] The rate at which the follower rises.\n\t\t *  @param {Time=} release The rate at which the folower falls.\n\t\t *  @example\n\t\t * var follower = new Tone.Follower(0.2, 0.4);\n\t\t */\n\t    Tone.Follower = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'attack',\n\t            'release'\n\t        ], Tone.Follower);\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(1, 1);\n\t        /**\n\t\t\t *  @type {Tone.Abs}\n\t\t\t *  @private\n\t\t\t */\n\t        this._abs = new Tone.Abs();\n\t        /**\n\t\t\t *  the lowpass filter which smooths the input\n\t\t\t *  @type {BiquadFilterNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._filter = this.context.createBiquadFilter();\n\t        this._filter.type = 'lowpass';\n\t        this._filter.frequency.value = 0;\n\t        this._filter.Q.value = -100;\n\t        /**\n\t\t\t *  @type {WaveShaperNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._frequencyValues = new Tone.WaveShaper();\n\t        /**\n\t\t\t *  @type {Tone.Subtract}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sub = new Tone.Subtract();\n\t        /**\n\t\t\t *  @type {Tone.Delay}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delay = new Tone.Delay(this.blockTime);\n\t        /**\n\t\t\t *  this keeps it far from 0, even for very small differences\n\t\t\t *  @type {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._mult = new Tone.Multiply(10000);\n\t        /**\n\t\t\t *  @private\n\t\t\t *  @type {number}\n\t\t\t */\n\t        this._attack = options.attack;\n\t        /**\n\t\t\t *  @private\n\t\t\t *  @type {number}\n\t\t\t */\n\t        this._release = options.release;\n\t        //the smoothed signal to get the values\n\t        this.input.chain(this._abs, this._filter, this.output);\n\t        //the difference path\n\t        this._abs.connect(this._sub, 0, 1);\n\t        this._filter.chain(this._delay, this._sub);\n\t        //threshold the difference and use the thresh to set the frequency\n\t        this._sub.chain(this._mult, this._frequencyValues, this._filter.frequency);\n\t        //set the attack and release values in the table\n\t        this._setAttackRelease(this._attack, this._release);\n\t    };\n\t    Tone.extend(Tone.Follower, Tone.AudioNode);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Follower.defaults = {\n\t        'attack': 0.05,\n\t        'release': 0.5\n\t    };\n\t    /**\n\t\t *  sets the attack and release times in the wave shaper\n\t\t *  @param   {Time} attack\n\t\t *  @param   {Time} release\n\t\t *  @private\n\t\t */\n\t    Tone.Follower.prototype._setAttackRelease = function (attack, release) {\n\t        var minTime = this.blockTime;\n\t        attack = Tone.Time(attack).toFrequency();\n\t        release = Tone.Time(release).toFrequency();\n\t        attack = Math.max(attack, minTime);\n\t        release = Math.max(release, minTime);\n\t        this._frequencyValues.setMap(function (val) {\n\t            if (val <= 0) {\n\t                return attack;\n\t            } else {\n\t                return release;\n\t            }\n\t        });\n\t    };\n\t    /**\n\t\t * The attack time.\n\t\t * @memberOf Tone.Follower#\n\t\t * @type {Time}\n\t\t * @name attack\n\t\t */\n\t    Object.defineProperty(Tone.Follower.prototype, 'attack', {\n\t        get: function () {\n\t            return this._attack;\n\t        },\n\t        set: function (attack) {\n\t            this._attack = attack;\n\t            this._setAttackRelease(this._attack, this._release);\n\t        }\n\t    });\n\t    /**\n\t\t * The release time.\n\t\t * @memberOf Tone.Follower#\n\t\t * @type {Time}\n\t\t * @name release\n\t\t */\n\t    Object.defineProperty(Tone.Follower.prototype, 'release', {\n\t        get: function () {\n\t            return this._release;\n\t        },\n\t        set: function (release) {\n\t            this._release = release;\n\t            this._setAttackRelease(this._attack, this._release);\n\t        }\n\t    });\n\t    /**\n\t\t *  Borrows the connect method from Signal so that the output can be used\n\t\t *  as a Tone.Signal control signal.\n\t\t *  @function\n\t\t */\n\t    Tone.Follower.prototype.connect = Tone.SignalBase.prototype.connect;\n\t    /**\n\t\t *  dispose\n\t\t *  @returns {Tone.Follower} this\n\t\t */\n\t    Tone.Follower.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._filter.disconnect();\n\t        this._filter = null;\n\t        this._frequencyValues.disconnect();\n\t        this._frequencyValues = null;\n\t        this._delay.dispose();\n\t        this._delay = null;\n\t        this._sub.disconnect();\n\t        this._sub = null;\n\t        this._abs.dispose();\n\t        this._abs = null;\n\t        this._mult.dispose();\n\t        this._mult = null;\n\t        this._curve = null;\n\t        return this;\n\t    };\n\t    return Tone.Follower;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.ScaledEnvelop is an envelope which can be scaled\n\t\t *         to any range. It's useful for applying an envelope\n\t\t *         to a frequency or any other non-NormalRange signal\n\t\t *         parameter.\n\t\t *\n\t\t *  @extends {Tone.Envelope}\n\t\t *  @constructor\n\t\t *  @param {Time|Object} [attack]\tthe attack time in seconds\n\t\t *  @param {Time} [decay]\tthe decay time in seconds\n\t\t *  @param {number} [sustain] \ta percentage (0-1) of the full amplitude\n\t\t *  @param {Time} [release]\tthe release time in seconds\n\t\t *  @example\n\t\t *  var scaledEnv = new Tone.ScaledEnvelope({\n\t\t *  \t\"attack\" : 0.2,\n\t\t *  \t\"min\" : 200,\n\t\t *  \t\"max\" : 2000\n\t\t *  });\n\t\t *  scaledEnv.connect(oscillator.frequency);\n\t\t */\n\t    Tone.ScaledEnvelope = function () {\n\t        //get all of the defaults\n\t        var options = Tone.defaults(arguments, [\n\t            'attack',\n\t            'decay',\n\t            'sustain',\n\t            'release'\n\t        ], Tone.Envelope);\n\t        Tone.Envelope.call(this, options);\n\t        options = Tone.defaultArg(options, Tone.ScaledEnvelope.defaults);\n\t        /**\n\t\t\t *  scale the incoming signal by an exponent\n\t\t\t *  @type {Tone.Pow}\n\t\t\t *  @private\n\t\t\t */\n\t        this._exp = this.output = new Tone.Pow(options.exponent);\n\t        /**\n\t\t\t *  scale the signal to the desired range\n\t\t\t *  @type {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._scale = this.output = new Tone.Scale(options.min, options.max);\n\t        this._sig.chain(this._exp, this._scale);\n\t    };\n\t    Tone.extend(Tone.ScaledEnvelope, Tone.Envelope);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @static\n\t\t */\n\t    Tone.ScaledEnvelope.defaults = {\n\t        'min': 0,\n\t        'max': 1,\n\t        'exponent': 1\n\t    };\n\t    /**\n\t\t * The envelope's min output value. This is the value which it\n\t\t * starts at.\n\t\t * @memberOf Tone.ScaledEnvelope#\n\t\t * @type {number}\n\t\t * @name min\n\t\t */\n\t    Object.defineProperty(Tone.ScaledEnvelope.prototype, 'min', {\n\t        get: function () {\n\t            return this._scale.min;\n\t        },\n\t        set: function (min) {\n\t            this._scale.min = min;\n\t        }\n\t    });\n\t    /**\n\t\t * The envelope's max output value. In other words, the value\n\t\t * at the peak of the attack portion of the envelope.\n\t\t * @memberOf Tone.ScaledEnvelope#\n\t\t * @type {number}\n\t\t * @name max\n\t\t */\n\t    Object.defineProperty(Tone.ScaledEnvelope.prototype, 'max', {\n\t        get: function () {\n\t            return this._scale.max;\n\t        },\n\t        set: function (max) {\n\t            this._scale.max = max;\n\t        }\n\t    });\n\t    /**\n\t\t * The envelope's exponent value.\n\t\t * @memberOf Tone.ScaledEnvelope#\n\t\t * @type {number}\n\t\t * @name exponent\n\t\t */\n\t    Object.defineProperty(Tone.ScaledEnvelope.prototype, 'exponent', {\n\t        get: function () {\n\t            return this._exp.value;\n\t        },\n\t        set: function (exp) {\n\t            this._exp.value = exp;\n\t        }\n\t    });\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.ScaledEnvelope} this\n\t\t */\n\t    Tone.ScaledEnvelope.prototype.dispose = function () {\n\t        Tone.Envelope.prototype.dispose.call(this);\n\t        this._scale.dispose();\n\t        this._scale = null;\n\t        this._exp.dispose();\n\t        this._exp = null;\n\t        return this;\n\t    };\n\t    return Tone.ScaledEnvelope;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.FrequencyEnvelope is a Tone.ScaledEnvelope, but instead of `min` and `max`\n\t\t *         it's got a `baseFrequency` and `octaves` parameter.\n\t\t *\n\t\t *  @extends {Tone.Envelope}\n\t\t *  @constructor\n\t\t *  @param {Time|Object} [attack]\tthe attack time in seconds\n\t\t *  @param {Time} [decay]\tthe decay time in seconds\n\t\t *  @param {number} [sustain] \ta percentage (0-1) of the full amplitude\n\t\t *  @param {Time} [release]\tthe release time in seconds\n\t\t *  @example\n\t\t *  var freqEnv = new Tone.FrequencyEnvelope({\n\t\t *  \t\"attack\" : 0.2,\n\t\t *  \t\"baseFrequency\" : \"C2\",\n\t\t *  \t\"octaves\" : 4\n\t\t *  });\n\t\t *  freqEnv.connect(oscillator.frequency);\n\t\t */\n\t    Tone.FrequencyEnvelope = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'attack',\n\t            'decay',\n\t            'sustain',\n\t            'release'\n\t        ], Tone.Envelope);\n\t        Tone.ScaledEnvelope.call(this, options);\n\t        //merge it with the frequency envelope defaults\n\t        options = Tone.defaultArg(options, Tone.FrequencyEnvelope.defaults);\n\t        /**\n\t\t\t *  Stores the octave value\n\t\t\t *  @type {Positive}\n\t\t\t *  @private\n\t\t\t */\n\t        this._octaves = options.octaves;\n\t        //setup\n\t        this.baseFrequency = options.baseFrequency;\n\t        this.octaves = options.octaves;\n\t    };\n\t    Tone.extend(Tone.FrequencyEnvelope, Tone.Envelope);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @static\n\t\t */\n\t    Tone.FrequencyEnvelope.defaults = {\n\t        'baseFrequency': 200,\n\t        'octaves': 4,\n\t        'exponent': 2\n\t    };\n\t    /**\n\t\t * The envelope's mininum output value. This is the value which it\n\t\t * starts at.\n\t\t * @memberOf Tone.FrequencyEnvelope#\n\t\t * @type {Frequency}\n\t\t * @name baseFrequency\n\t\t */\n\t    Object.defineProperty(Tone.FrequencyEnvelope.prototype, 'baseFrequency', {\n\t        get: function () {\n\t            return this._scale.min;\n\t        },\n\t        set: function (min) {\n\t            this._scale.min = this.toFrequency(min);\n\t            //also update the octaves\n\t            this.octaves = this._octaves;\n\t        }\n\t    });\n\t    /**\n\t\t * The number of octaves above the baseFrequency that the\n\t\t * envelope will scale to.\n\t\t * @memberOf Tone.FrequencyEnvelope#\n\t\t * @type {Positive}\n\t\t * @name octaves\n\t\t */\n\t    Object.defineProperty(Tone.FrequencyEnvelope.prototype, 'octaves', {\n\t        get: function () {\n\t            return this._octaves;\n\t        },\n\t        set: function (octaves) {\n\t            this._octaves = octaves;\n\t            this._scale.max = this.baseFrequency * Math.pow(2, octaves);\n\t        }\n\t    });\n\t    /**\n\t\t * The envelope's exponent value.\n\t\t * @memberOf Tone.FrequencyEnvelope#\n\t\t * @type {number}\n\t\t * @name exponent\n\t\t */\n\t    Object.defineProperty(Tone.FrequencyEnvelope.prototype, 'exponent', {\n\t        get: function () {\n\t            return this._exp.value;\n\t        },\n\t        set: function (exp) {\n\t            this._exp.value = exp;\n\t        }\n\t    });\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.FrequencyEnvelope} this\n\t\t */\n\t    Tone.FrequencyEnvelope.prototype.dispose = function () {\n\t        Tone.ScaledEnvelope.prototype.dispose.call(this);\n\t        return this;\n\t    };\n\t    return Tone.FrequencyEnvelope;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  GreaterThanZero outputs 1 when the input is strictly greater than zero\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @example\n\t\t * var gt0 = new Tone.GreaterThanZero();\n\t\t * var sig = new Tone.Signal(0.01).connect(gt0);\n\t\t * //the output of gt0 is 1.\n\t\t * sig.value = 0;\n\t\t * //the output of gt0 is 0.\n\t\t */\n\t    Tone.GreaterThanZero = function () {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  @type {Tone.WaveShaper}\n\t\t\t *  @private\n\t\t\t */\n\t        this._thresh = this.output = new Tone.WaveShaper(function (val) {\n\t            if (val <= 0) {\n\t                return 0;\n\t            } else {\n\t                return 1;\n\t            }\n\t        }, 127);\n\t        /**\n\t\t\t *  scale the first thresholded signal by a large value.\n\t\t\t *  this will help with values which are very close to 0\n\t\t\t *  @type {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._scale = this.input = new Tone.Multiply(10000);\n\t        //connections\n\t        this._scale.connect(this._thresh);\n\t    };\n\t    Tone.extend(Tone.GreaterThanZero, Tone.SignalBase);\n\t    /**\n\t\t *  dispose method\n\t\t *  @returns {Tone.GreaterThanZero} this\n\t\t */\n\t    Tone.GreaterThanZero.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._scale.dispose();\n\t        this._scale = null;\n\t        this._thresh.dispose();\n\t        this._thresh = null;\n\t        return this;\n\t    };\n\t    return Tone.GreaterThanZero;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Output 1 if the signal is greater than the value, otherwise outputs 0.\n\t\t *          can compare two signals or a signal and a number.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Signal}\n\t\t *  @param {number} [value=0] the value to compare to the incoming signal\n\t\t *  @example\n\t\t * var gt = new Tone.GreaterThan(2);\n\t\t * var sig = new Tone.Signal(4).connect(gt);\n\t\t * //output of gt is equal 1.\n\t\t */\n\t    Tone.GreaterThan = function (value) {\n\t        Tone.Signal.call(this);\n\t        this.createInsOuts(2, 0);\n\t        /**\n\t\t\t *  subtract the amount from the incoming signal\n\t\t\t *  @type {Tone.Subtract}\n\t\t\t *  @private\n\t\t\t */\n\t        this._param = this.input[0] = new Tone.Subtract(value);\n\t        this.input[1] = this._param.input[1];\n\t        /**\n\t\t\t *  compare that amount to zero\n\t\t\t *  @type {Tone.GreaterThanZero}\n\t\t\t *  @private\n\t\t\t */\n\t        this._gtz = this.output = new Tone.GreaterThanZero();\n\t        //connect\n\t        this._param.connect(this._gtz);\n\t    };\n\t    Tone.extend(Tone.GreaterThan, Tone.Signal);\n\t    /**\n\t\t *  dispose method\n\t\t *  @returns {Tone.GreaterThan} this\n\t\t */\n\t    Tone.GreaterThan.prototype.dispose = function () {\n\t        Tone.Signal.prototype.dispose.call(this);\n\t        this._gtz.dispose();\n\t        this._gtz = null;\n\t        return this;\n\t    };\n\t    return Tone.GreaterThan;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Gate only passes a signal through when the incoming\n\t\t *          signal exceeds a specified threshold. To do this, Gate uses\n\t\t *          a Tone.Follower to follow the amplitude of the incoming signal.\n\t\t *          A common implementation of this class is a [Noise Gate](https://en.wikipedia.org/wiki/Noise_gate).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Decibels|Object} [threshold] The threshold above which the gate will open.\n\t\t *  @param {Time=} attack The follower's attack time\n\t\t *  @param {Time=} release The follower's release time\n\t\t *  @example\n\t\t * var gate = new Tone.Gate(-30, 0.2, 0.3).toMaster();\n\t\t * var mic = new Tone.UserMedia().connect(gate);\n\t\t * //the gate will only pass through the incoming\n\t\t * //signal when it's louder than -30db\n\t\t */\n\t    Tone.Gate = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'threshold',\n\t            'attack',\n\t            'release'\n\t        ], Tone.Gate);\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(1, 1);\n\t        /**\n\t\t\t *  @type {Tone.Follower}\n\t\t\t *  @private\n\t\t\t */\n\t        this._follower = new Tone.Follower(options.attack, options.release);\n\t        /**\n\t\t\t *  @type {Tone.GreaterThan}\n\t\t\t *  @private\n\t\t\t */\n\t        this._gt = new Tone.GreaterThan(Tone.dbToGain(options.threshold));\n\t        //the connections\n\t        this.input.connect(this.output);\n\t        //the control signal\n\t        this.input.chain(this._gt, this._follower, this.output.gain);\n\t    };\n\t    Tone.extend(Tone.Gate, Tone.AudioNode);\n\t    /**\n\t\t *  @const\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Gate.defaults = {\n\t        'attack': 0.1,\n\t        'release': 0.1,\n\t        'threshold': -40\n\t    };\n\t    /**\n\t\t * The threshold of the gate in decibels\n\t\t * @memberOf Tone.Gate#\n\t\t * @type {Decibels}\n\t\t * @name threshold\n\t\t */\n\t    Object.defineProperty(Tone.Gate.prototype, 'threshold', {\n\t        get: function () {\n\t            return Tone.gainToDb(this._gt.value);\n\t        },\n\t        set: function (thresh) {\n\t            this._gt.value = Tone.dbToGain(thresh);\n\t        }\n\t    });\n\t    /**\n\t\t * The attack speed of the gate\n\t\t * @memberOf Tone.Gate#\n\t\t * @type {Time}\n\t\t * @name attack\n\t\t */\n\t    Object.defineProperty(Tone.Gate.prototype, 'attack', {\n\t        get: function () {\n\t            return this._follower.attack;\n\t        },\n\t        set: function (attackTime) {\n\t            this._follower.attack = attackTime;\n\t        }\n\t    });\n\t    /**\n\t\t * The release speed of the gate\n\t\t * @memberOf Tone.Gate#\n\t\t * @type {Time}\n\t\t * @name release\n\t\t */\n\t    Object.defineProperty(Tone.Gate.prototype, 'release', {\n\t        get: function () {\n\t            return this._follower.release;\n\t        },\n\t        set: function (releaseTime) {\n\t            this._follower.release = releaseTime;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Gate} this\n\t\t */\n\t    Tone.Gate.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._follower.dispose();\n\t        this._gt.dispose();\n\t        this._follower = null;\n\t        this._gt = null;\n\t        return this;\n\t    };\n\t    return Tone.Gate;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t * @class Tone.TickSignal extends Tone.Signal, but adds the capability\n\t\t *        to calculate the number of elapsed ticks. exponential and target curves\n\t\t *        are approximated with multiple linear ramps.\n\t\t *\n\t\t *        Thank you Bruno Dias, H. Sofia Pinto, and David M. Matos, for your [WAC paper](https://smartech.gatech.edu/bitstream/handle/1853/54588/WAC2016-49.pdf)\n\t\t *        describing integrating timing functions for tempo calculations.\n\t\t *\n\t\t * @param {Number} value The initial value of the signal\n\t\t * @extends {Tone.Signal}\n\t\t */\n\t    Tone.TickSignal = function (value) {\n\t        value = Tone.defaultArg(value, 1);\n\t        Tone.Signal.call(this, {\n\t            'units': Tone.Type.Ticks,\n\t            'value': value\n\t        });\n\t        //extend the memory\n\t        this._events.memory = Infinity;\n\t        //clear the clock from the beginning\n\t        this.cancelScheduledValues(0);\n\t        //set an initial event\n\t        this._events.add({\n\t            'type': Tone.Param.AutomationType.SetValue,\n\t            'time': 0,\n\t            'value': value\n\t        });\n\t    };\n\t    Tone.extend(Tone.TickSignal, Tone.Signal);\n\t    /**\n\t\t * Wraps Tone.Signal methods so that they also\n\t\t * record the ticks.\n\t\t * @param  {Function} method\n\t\t * @return {Function}\n\t\t * @private\n\t\t */\n\t    function _wrapScheduleMethods(method) {\n\t        return function (value, time) {\n\t            time = this.toSeconds(time);\n\t            method.apply(this, arguments);\n\t            var event = this._events.get(time);\n\t            var previousEvent = this._events.previousEvent(event);\n\t            var ticksUntilTime = this._getTicksUntilEvent(previousEvent, time);\n\t            event.ticks = Math.max(ticksUntilTime, 0);\n\t            return this;\n\t        };\n\t    }\n\t    Tone.TickSignal.prototype.setValueAtTime = _wrapScheduleMethods(Tone.Signal.prototype.setValueAtTime);\n\t    Tone.TickSignal.prototype.linearRampToValueAtTime = _wrapScheduleMethods(Tone.Signal.prototype.linearRampToValueAtTime);\n\t    /**\n\t\t *  Start exponentially approaching the target value at the given time with\n\t\t *  a rate having the given time constant.\n\t\t *  @param {number} value\n\t\t *  @param {Time} startTime\n\t\t *  @param {number} timeConstant\n\t\t *  @returns {Tone.TickSignal} this\n\t\t */\n\t    Tone.TickSignal.prototype.setTargetAtTime = function (value, time, constant) {\n\t        //aproximate it with multiple linear ramps\n\t        time = this.toSeconds(time);\n\t        this.setRampPoint(time);\n\t        value = this._fromUnits(value);\n\t        //start from previously scheduled value\n\t        var prevEvent = this._events.get(time);\n\t        var segments = Math.round(Math.max(1 / constant, 1));\n\t        for (var i = 0; i <= segments; i++) {\n\t            var segTime = constant * i + time;\n\t            var rampVal = this._exponentialApproach(prevEvent.time, prevEvent.value, value, constant, segTime);\n\t            this.linearRampToValueAtTime(this._toUnits(rampVal), segTime);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Schedules an exponential continuous change in parameter value from\n\t\t *  the previous scheduled parameter value to the given value.\n\t\t *  @param  {number} value\n\t\t *  @param  {Time} endTime\n\t\t *  @returns {Tone.TickSignal} this\n\t\t */\n\t    Tone.TickSignal.prototype.exponentialRampToValueAtTime = function (value, time) {\n\t        //aproximate it with multiple linear ramps\n\t        time = this.toSeconds(time);\n\t        value = this._fromUnits(value);\n\t        //start from previously scheduled value\n\t        var prevEvent = this._events.get(time);\n\t        if (prevEvent === null) {\n\t            prevEvent = {\n\t                'value': this._initialValue,\n\t                'time': 0\n\t            };\n\t        }\n\t        //approx 10 segments per second\n\t        var segments = Math.round(Math.max((time - prevEvent.time) * 10, 1));\n\t        var segmentDur = (time - prevEvent.time) / segments;\n\t        for (var i = 0; i <= segments; i++) {\n\t            var segTime = segmentDur * i + prevEvent.time;\n\t            var rampVal = this._exponentialInterpolate(prevEvent.time, prevEvent.value, time, value, segTime);\n\t            this.linearRampToValueAtTime(this._toUnits(rampVal), segTime);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * Returns the tick value at the time. Takes into account\n\t\t * any automation curves scheduled on the signal.\n\t\t * @private\n\t\t * @param  {Time} time The time to get the tick count at\n\t\t * @return {Ticks}      The number of ticks which have elapsed at the time\n\t\t *                          given any automations.\n\t\t */\n\t    Tone.TickSignal.prototype._getTicksUntilEvent = function (event, time) {\n\t        if (event === null) {\n\t            event = {\n\t                'ticks': 0,\n\t                'time': 0\n\t            };\n\t        } else if (Tone.isUndef(event.ticks)) {\n\t            var previousEvent = this._events.previousEvent(event);\n\t            event.ticks = this._getTicksUntilEvent(previousEvent, event.time);\n\t        }\n\t        var val0 = this.getValueAtTime(event.time);\n\t        var val1 = this.getValueAtTime(time);\n\t        //if it's right on the line, take the previous value\n\t        if (this._events.get(time).time === time && this._events.get(time).type === Tone.Param.AutomationType.SetValue) {\n\t            val1 = this.getValueAtTime(time - this.sampleTime);\n\t        }\n\t        return 0.5 * (time - event.time) * (val0 + val1) + event.ticks;\n\t    };\n\t    /**\n\t\t * Returns the tick value at the time. Takes into account\n\t\t * any automation curves scheduled on the signal.\n\t\t * @param  {Time} time The time to get the tick count at\n\t\t * @return {Ticks}      The number of ticks which have elapsed at the time\n\t\t *                          given any automations.\n\t\t */\n\t    Tone.TickSignal.prototype.getTicksAtTime = function (time) {\n\t        time = this.toSeconds(time);\n\t        var event = this._events.get(time);\n\t        return Math.max(this._getTicksUntilEvent(event, time), 0);\n\t    };\n\t    /**\n\t\t * Return the elapsed time of the number of ticks from the given time\n\t\t * @param {Ticks} ticks The number of ticks to calculate\n\t\t * @param  {Time} time The time to get the next tick from\n\t\t * @return {Seconds} The duration of the number of ticks from the given time in seconds\n\t\t */\n\t    Tone.TickSignal.prototype.getDurationOfTicks = function (ticks, time) {\n\t        time = this.toSeconds(time);\n\t        var currentTick = this.getTicksAtTime(time);\n\t        return this.getTimeOfTick(currentTick + ticks) - time;\n\t    };\n\t    /**\n\t\t * Given a tick, returns the time that tick occurs at.\n\t\t * @param  {Ticks} tick\n\t\t * @return {Time}      The time that the tick occurs.\n\t\t */\n\t    Tone.TickSignal.prototype.getTimeOfTick = function (tick) {\n\t        var before = this._events.get(tick, 'ticks');\n\t        var after = this._events.getAfter(tick, 'ticks');\n\t        if (before && before.ticks === tick) {\n\t            return before.time;\n\t        } else if (before && after && after.type === Tone.Param.AutomationType.Linear && before.value !== after.value) {\n\t            var val0 = this.getValueAtTime(before.time);\n\t            var val1 = this.getValueAtTime(after.time);\n\t            var delta = (val1 - val0) / (after.time - before.time);\n\t            var k = Math.sqrt(Math.pow(val0, 2) - 2 * delta * (before.ticks - tick));\n\t            var sol1 = (-val0 + k) / delta;\n\t            var sol2 = (-val0 - k) / delta;\n\t            return (sol1 > 0 ? sol1 : sol2) + before.time;\n\t        } else if (before) {\n\t            if (before.value === 0) {\n\t                return Infinity;\n\t            } else {\n\t                return before.time + (tick - before.ticks) / before.value;\n\t            }\n\t        } else {\n\t            return tick / this._initialValue;\n\t        }\n\t    };\n\t    /**\n\t\t * Convert some number of ticks their the duration in seconds accounting\n\t\t * for any automation curves starting at the given time.\n\t\t * @param  {Ticks} ticks The number of ticks to convert to seconds.\n\t\t * @param  {Time} [when=now]  When along the automation timeline to convert the ticks.\n\t\t * @return {Tone.Time}       The duration in seconds of the ticks.\n\t\t */\n\t    Tone.TickSignal.prototype.ticksToTime = function (ticks, when) {\n\t        when = this.toSeconds(when);\n\t        return new Tone.Time(this.getDurationOfTicks(ticks, when));\n\t    };\n\t    /**\n\t\t * The inverse of [ticksToTime](#tickstotime). Convert a duration in\n\t\t * seconds to the corresponding number of ticks accounting for any\n\t\t * automation curves starting at the given time.\n\t\t * @param  {Time} duration The time interval to convert to ticks.\n\t\t * @param  {Time} [when=now]     When along the automation timeline to convert the ticks.\n\t\t * @return {Tone.Ticks}          The duration in ticks.\n\t\t */\n\t    Tone.TickSignal.prototype.timeToTicks = function (duration, when) {\n\t        when = this.toSeconds(when);\n\t        duration = this.toSeconds(duration);\n\t        var startTicks = this.getTicksAtTime(when);\n\t        var endTicks = this.getTicksAtTime(when + duration);\n\t        return new Tone.Ticks(endTicks - startTicks);\n\t    };\n\t    return Tone.TickSignal;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  A Timeline State. Provides the methods: <code>setStateAtTime(\"state\", time)</code>\n\t\t *          and <code>getValueAtTime(time)</code>.\n\t\t *\n\t\t *  @extends {Tone.Timeline}\n\t\t *  @param {String} initial The initial state of the TimelineState. \n\t\t *                          Defaults to <code>undefined</code>\n\t\t */\n\t    Tone.TimelineState = function (initial) {\n\t        Tone.Timeline.call(this);\n\t        /**\n\t\t\t *  The initial state\n\t\t\t *  @private\n\t\t\t *  @type {String}\n\t\t\t */\n\t        this._initial = initial;\n\t    };\n\t    Tone.extend(Tone.TimelineState, Tone.Timeline);\n\t    /**\n\t\t *  Returns the scheduled state scheduled before or at\n\t\t *  the given time.\n\t\t *  @param  {Number}  time  The time to query.\n\t\t *  @return  {String}  The name of the state input in setStateAtTime.\n\t\t */\n\t    Tone.TimelineState.prototype.getValueAtTime = function (time) {\n\t        var event = this.get(time);\n\t        if (event !== null) {\n\t            return event.state;\n\t        } else {\n\t            return this._initial;\n\t        }\n\t    };\n\t    /**\n\t\t *  Add a state to the timeline.\n\t\t *  @param  {String}  state The name of the state to set.\n\t\t *  @param  {Number}  time  The time to query.\n\t\t *  @returns {Tone.TimelineState} this\n\t\t */\n\t    Tone.TimelineState.prototype.setStateAtTime = function (state, time) {\n\t        //all state changes need to be >= the previous state time\n\t        //TODO throw error if time < the previous event time\n\t        this.add({\n\t            'state': state,\n\t            'time': time\n\t        });\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Return the event before the time with the given state\n\t\t *  @param {Tone.State} state The state to look for\n\t\t *  @param  {Time}  time  When to check before\t\t\t\n\t\t *  @return  {Object}  The event with the given state before the time\n\t\t */\n\t    Tone.TimelineState.prototype.getLastState = function (state, time) {\n\t        time = this.toSeconds(time);\n\t        var index = this._search(time);\n\t        for (var i = index; i >= 0; i--) {\n\t            var event = this._timeline[i];\n\t            if (event.state === state) {\n\t                return event;\n\t            }\n\t        }\n\t    };\n\t    /**\n\t\t *  Return the event after the time with the given state\n\t\t *  @param {Tone.State} state The state to look for\n\t\t *  @param  {Time}  time  When to check from\n\t\t *  @return  {Object}  The event with the given state after the time\n\t\t */\n\t    Tone.TimelineState.prototype.getNextState = function (state, time) {\n\t        time = this.toSeconds(time);\n\t        var index = this._search(time);\n\t        if (index !== -1) {\n\t            for (var i = index; i < this._timeline.length; i++) {\n\t                var event = this._timeline[i];\n\t                if (event.state === state) {\n\t                    return event;\n\t                }\n\t            }\n\t        }\n\t    };\n\t    return Tone.TimelineState;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Uses [Tone.TickSignal](TickSignal) to track elapsed ticks with\n\t\t *  \t\tcomplex automation curves.\n\t\t *\n\t\t * \t@constructor\n\t     *  @param {Frequency} frequency The initial frequency that the signal ticks at\n\t\t *  @extends {Tone}\n\t\t */\n\t    Tone.TickSource = function () {\n\t        var options = Tone.defaults(arguments, ['frequency'], Tone.TickSource);\n\t        /**\n\t\t\t *  The frequency the callback function should be invoked.\n\t\t\t *  @type  {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.TickSignal(options.frequency, Tone.Type.Frequency);\n\t        this._readOnly('frequency');\n\t        /**\n\t\t\t *  The state timeline\n\t\t\t *  @type {Tone.TimelineState}\n\t\t\t *  @private\n\t\t\t */\n\t        this._state = new Tone.TimelineState(Tone.State.Stopped);\n\t        this._state.setStateAtTime(Tone.State.Stopped, 0);\n\t        /**\n\t\t\t * The offset values of the ticks\n\t\t\t * @type {Tone.Timeline}\n\t\t\t * @private\n\t\t\t */\n\t        this._tickOffset = new Tone.Timeline();\n\t        //add the first event\n\t        this.setTicksAtTime(0, 0);\n\t    };\n\t    Tone.extend(Tone.TickSource);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.TickSource.defaults = { 'frequency': 1 };\n\t    /**\n\t\t *  Returns the playback state of the source, either \"started\", \"stopped\" or \"paused\".\n\t\t *  @type {Tone.State}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.TickSource#\n\t\t *  @name state\n\t\t */\n\t    Object.defineProperty(Tone.TickSource.prototype, 'state', {\n\t        get: function () {\n\t            return this._state.getValueAtTime(this.now());\n\t        }\n\t    });\n\t    /**\n\t\t *  Start the clock at the given time. Optionally pass in an offset\n\t\t *  of where to start the tick counter from.\n\t\t *  @param  {Time=}  time    The time the clock should start\n\t\t *  @param {Ticks=0} offset The number of ticks to start the source at\n\t\t *  @return  {Tone.TickSource}  this\n\t\t */\n\t    Tone.TickSource.prototype.start = function (time, offset) {\n\t        time = this.toSeconds(time);\n\t        if (this._state.getValueAtTime(time) !== Tone.State.Started) {\n\t            this._state.setStateAtTime(Tone.State.Started, time);\n\t            if (Tone.isDefined(offset)) {\n\t                this.setTicksAtTime(offset, time);\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Stop the clock. Stopping the clock resets the tick counter to 0.\n\t\t *  @param {Time} [time=now] The time when the clock should stop.\n\t\t *  @returns {Tone.TickSource} this\n\t\t *  @example\n\t\t * clock.stop();\n\t\t */\n\t    Tone.TickSource.prototype.stop = function (time) {\n\t        time = this.toSeconds(time);\n\t        //cancel the previous stop\n\t        if (this._state.getValueAtTime(time) === Tone.State.Stopped) {\n\t            var event = this._state.get(time);\n\t            if (event.time > 0) {\n\t                this._tickOffset.cancel(event.time);\n\t                this._state.cancel(event.time);\n\t            }\n\t        }\n\t        this._state.cancel(time);\n\t        this._state.setStateAtTime(Tone.State.Stopped, time);\n\t        this.setTicksAtTime(0, time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Pause the clock. Pausing does not reset the tick counter.\n\t\t *  @param {Time} [time=now] The time when the clock should stop.\n\t\t *  @returns {Tone.TickSource} this\n\t\t */\n\t    Tone.TickSource.prototype.pause = function (time) {\n\t        time = this.toSeconds(time);\n\t        if (this._state.getValueAtTime(time) === Tone.State.Started) {\n\t            this._state.setStateAtTime(Tone.State.Paused, time);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancel start/stop/pause and setTickAtTime events scheduled after the given time.\n\t\t *  @param {Time} [time=now] When to clear the events after\n\t\t *  @returns {Tone.TickSource} this\n\t\t */\n\t    Tone.TickSource.prototype.cancel = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._state.cancel(time);\n\t        this._tickOffset.cancel(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Get the elapsed ticks at the given time\n\t\t * @param  {Time} time  When to get the tick value\n\t\t * @return {Ticks}     The number of ticks\n\t\t */\n\t    Tone.TickSource.prototype.getTicksAtTime = function (time) {\n\t        time = this.toSeconds(time);\n\t        var stopEvent = this._state.getLastState(Tone.State.Stopped, time);\n\t        //this event allows forEachBetween to iterate until the current time\n\t        var tmpEvent = {\n\t            state: Tone.State.Paused,\n\t            time: time\n\t        };\n\t        this._state.add(tmpEvent);\n\t        //keep track of the previous offset event\n\t        var lastState = stopEvent;\n\t        var elapsedTicks = 0;\n\t        //iterate through all the events since the last stop\n\t        this._state.forEachBetween(stopEvent.time, time + this.sampleTime, function (e) {\n\t            var periodStartTime = lastState.time;\n\t            //if there is an offset event in this period use that\n\t            var offsetEvent = this._tickOffset.get(e.time);\n\t            if (offsetEvent.time >= lastState.time) {\n\t                elapsedTicks = offsetEvent.ticks;\n\t                periodStartTime = offsetEvent.time;\n\t            }\n\t            if (lastState.state === Tone.State.Started && e.state !== Tone.State.Started) {\n\t                elapsedTicks += this.frequency.getTicksAtTime(e.time) - this.frequency.getTicksAtTime(periodStartTime);\n\t            }\n\t            lastState = e;\n\t        }.bind(this));\n\t        //remove the temporary event\n\t        this._state.remove(tmpEvent);\n\t        //return the ticks\n\t        return elapsedTicks;\n\t    };\n\t    /**\n\t\t *  The number of times the callback was invoked. Starts counting at 0\n\t\t *  and increments after the callback was invoked. Returns -1 when stopped.\n\t\t *  @memberOf Tone.TickSource#\n\t\t *  @name ticks\n\t\t *  @type {Ticks}\n\t\t */\n\t    Object.defineProperty(Tone.TickSource.prototype, 'ticks', {\n\t        get: function () {\n\t            return this.getTicksAtTime(this.now());\n\t        },\n\t        set: function (t) {\n\t            this.setTicksAtTime(t, this.now());\n\t        }\n\t    });\n\t    /**\n\t\t *  The time since ticks=0 that the TickSource has been running. Accounts\n\t\t *  for tempo curves\n\t\t *  @memberOf Tone.TickSource#\n\t\t *  @name seconds\n\t\t *  @type {Seconds}\n\t\t */\n\t    Object.defineProperty(Tone.TickSource.prototype, 'seconds', {\n\t        get: function () {\n\t            return this.getSecondsAtTime(this.now());\n\t        },\n\t        set: function (s) {\n\t            var now = this.now();\n\t            var ticks = this.frequency.timeToTicks(s, now);\n\t            this.setTicksAtTime(ticks, now);\n\t        }\n\t    });\n\t    /**\n\t\t *  Return the elapsed seconds at the given time.\n\t\t *  @param  {Time}  time  When to get the elapsed seconds\n\t\t *  @return  {Seconds}  The number of elapsed seconds\n\t\t */\n\t    Tone.TickSource.prototype.getSecondsAtTime = function (time) {\n\t        time = this.toSeconds(time);\n\t        var stopEvent = this._state.getLastState(Tone.State.Stopped, time);\n\t        //this event allows forEachBetween to iterate until the current time\n\t        var tmpEvent = {\n\t            state: Tone.State.Paused,\n\t            time: time\n\t        };\n\t        this._state.add(tmpEvent);\n\t        //keep track of the previous offset event\n\t        var lastState = stopEvent;\n\t        var elapsedSeconds = 0;\n\t        //iterate through all the events since the last stop\n\t        this._state.forEachBetween(stopEvent.time, time + this.sampleTime, function (e) {\n\t            var periodStartTime = lastState.time;\n\t            //if there is an offset event in this period use that\n\t            var offsetEvent = this._tickOffset.get(e.time);\n\t            if (offsetEvent.time >= lastState.time) {\n\t                elapsedSeconds = offsetEvent.seconds;\n\t                periodStartTime = offsetEvent.time;\n\t            }\n\t            if (lastState.state === Tone.State.Started && e.state !== Tone.State.Started) {\n\t                elapsedSeconds += e.time - periodStartTime;\n\t            }\n\t            lastState = e;\n\t        }.bind(this));\n\t        //remove the temporary event\n\t        this._state.remove(tmpEvent);\n\t        //return the ticks\n\t        return elapsedSeconds;\n\t    };\n\t    /**\n\t\t * Set the clock's ticks at the given time.\n\t\t * @param  {Ticks} ticks The tick value to set\n\t\t * @param  {Time} time  When to set the tick value\n\t\t * @return {Tone.TickSource}       this\n\t\t */\n\t    Tone.TickSource.prototype.setTicksAtTime = function (ticks, time) {\n\t        time = this.toSeconds(time);\n\t        this._tickOffset.cancel(time);\n\t        this._tickOffset.add({\n\t            'time': time,\n\t            'ticks': ticks,\n\t            'seconds': this.frequency.getDurationOfTicks(ticks, time)\n\t        });\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Returns the scheduled state at the given time.\n\t\t *  @param  {Time}  time  The time to query.\n\t\t *  @return  {String}  The name of the state input in setStateAtTime.\n\t\t *  @example\n\t\t * source.start(\"+0.1\");\n\t\t * source.getStateAtTime(\"+0.1\"); //returns \"started\"\n\t\t */\n\t    Tone.TickSource.prototype.getStateAtTime = function (time) {\n\t        time = this.toSeconds(time);\n\t        return this._state.getValueAtTime(time);\n\t    };\n\t    /**\n\t\t * Get the time of the given tick. The second argument\n\t\t * is when to test before. Since ticks can be set (with setTicksAtTime)\n\t\t * there may be multiple times for a given tick value. \n\t\t * @param  {Ticks} ticks The tick number.\n\t\t * @param  {Time=} before When to measure the tick value from. \n\t\t * @return {Time}       The time of the tick\n\t\t */\n\t    Tone.TickSource.prototype.getTimeOfTick = function (tick, before) {\n\t        before = Tone.defaultArg(before, this.now());\n\t        var offset = this._tickOffset.get(before);\n\t        var event = this._state.get(before);\n\t        var startTime = Math.max(offset.time, event.time);\n\t        var absoluteTicks = this.frequency.getTicksAtTime(startTime) + tick - offset.ticks;\n\t        return this.frequency.getTimeOfTick(absoluteTicks);\n\t    };\n\t    /**\n\t\t *  Invoke the callback event at all scheduled ticks between the \n\t\t *  start time and the end time\n\t\t *  @param  {Time}    startTime  The beginning of the search range\n\t\t *  @param  {Time}    endTime    The end of the search range\n\t\t *  @param  {Function<Time,Ticks>}  callback   The callback to invoke with each tick\n\t\t *  @return  {Tone.TickSource}    this\n\t\t */\n\t    Tone.TickSource.prototype.forEachTickBetween = function (startTime, endTime, callback) {\n\t        //only iterate through the sections where it is \"started\"\n\t        var lastStateEvent = this._state.get(startTime);\n\t        this._state.forEachBetween(startTime, endTime, function (event) {\n\t            if (lastStateEvent.state === Tone.State.Started && event.state !== Tone.State.Started) {\n\t                this.forEachTickBetween(Math.max(lastStateEvent.time, startTime), event.time - this.sampleTime, callback);\n\t            }\n\t            lastStateEvent = event;\n\t        }.bind(this));\n\t        startTime = Math.max(lastStateEvent.time, startTime);\n\t        if (lastStateEvent.state === Tone.State.Started && this._state) {\n\t            //figure out the difference between the frequency ticks and the \n\t            var startTicks = this.frequency.getTicksAtTime(startTime);\n\t            var ticksAtStart = this.frequency.getTicksAtTime(lastStateEvent.time);\n\t            var diff = startTicks - ticksAtStart;\n\t            var offset = diff % 1;\n\t            if (offset !== 0) {\n\t                offset = 1 - offset;\n\t            }\n\t            var nextTickTime = this.frequency.getTimeOfTick(startTicks + offset);\n\t            var error = null;\n\t            while (nextTickTime < endTime && this._state) {\n\t                try {\n\t                    callback(nextTickTime, Math.round(this.getTicksAtTime(nextTickTime)));\n\t                } catch (e) {\n\t                    error = e;\n\t                    break;\n\t                }\n\t                if (this._state) {\n\t                    nextTickTime += this.frequency.getDurationOfTicks(1, nextTickTime);\n\t                }\n\t            }\n\t        }\n\t        if (error) {\n\t            throw error;\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @returns {Tone.TickSource} this\n\t\t */\n\t    Tone.TickSource.prototype.dispose = function () {\n\t        Tone.Param.prototype.dispose.call(this);\n\t        this._state.dispose();\n\t        this._state = null;\n\t        this._tickOffset.dispose();\n\t        this._tickOffset = null;\n\t        this._writable('frequency');\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        return this;\n\t    };\n\t    return Tone.TickSource;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  A sample accurate clock which provides a callback at the given rate.\n\t\t *          While the callback is not sample-accurate (it is still susceptible to\n\t\t *          loose JS timing), the time passed in as the argument to the callback\n\t\t *          is precise. For most applications, it is better to use Tone.Transport\n\t\t *          instead of the Clock by itself since you can synchronize multiple callbacks.\n\t\t *\n\t\t * \t@constructor\n\t\t *  @extends {Tone.Emitter}\n\t\t * \t@param {function} callback The callback to be invoked with the time of the audio event\n\t\t * \t@param {Frequency} frequency The rate of the callback\n\t\t * \t@example\n\t\t * //the callback will be invoked approximately once a second\n\t\t * //and will print the time exactly once a second apart.\n\t\t * var clock = new Tone.Clock(function(time){\n\t\t * \tconsole.log(time);\n\t\t * }, 1);\n\t\t */\n\t    Tone.Clock = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'callback',\n\t            'frequency'\n\t        ], Tone.Clock);\n\t        Tone.Emitter.call(this);\n\t        /**\n\t\t\t *  The callback function to invoke at the scheduled tick.\n\t\t\t *  @type  {Function}\n\t\t\t */\n\t        this.callback = options.callback;\n\t        /**\n\t\t\t *  The next time the callback is scheduled.\n\t\t\t *  @type {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._nextTick = 0;\n\t        /**\n\t\t\t *  The tick counter\n\t\t\t *  @type  {Tone.TickSource}\n\t\t\t *  @private\n\t\t\t */\n\t        this._tickSource = new Tone.TickSource(options.frequency);\n\t        /**\n\t\t\t *  The last time the loop callback was invoked\n\t\t\t *  @private\n\t\t\t *  @type {Number}\n\t\t\t */\n\t        this._lastUpdate = 0;\n\t        /**\n\t\t\t *  The rate the callback function should be invoked.\n\t\t\t *  @type  {BPM}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = this._tickSource.frequency;\n\t        this._readOnly('frequency');\n\t        /**\n\t\t\t *  The state timeline\n\t\t\t *  @type {Tone.TimelineState}\n\t\t\t *  @private\n\t\t\t */\n\t        this._state = new Tone.TimelineState(Tone.State.Stopped);\n\t        //add an initial state\n\t        this._state.setStateAtTime(Tone.State.Stopped, 0);\n\t        /**\n\t\t\t *  The loop function bound to its context.\n\t\t\t *  This is necessary to remove the event in the end.\n\t\t\t *  @type {Function}\n\t\t\t *  @private\n\t\t\t */\n\t        this._boundLoop = this._loop.bind(this);\n\t        //bind a callback to the worker thread\n\t        this.context.on('tick', this._boundLoop);\n\t    };\n\t    Tone.extend(Tone.Clock, Tone.Emitter);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.Clock.defaults = {\n\t        'callback': Tone.noOp,\n\t        'frequency': 1\n\t    };\n\t    /**\n\t\t *  Returns the playback state of the source, either \"started\", \"stopped\" or \"paused\".\n\t\t *  @type {Tone.State}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.Clock#\n\t\t *  @name state\n\t\t */\n\t    Object.defineProperty(Tone.Clock.prototype, 'state', {\n\t        get: function () {\n\t            return this._state.getValueAtTime(this.now());\n\t        }\n\t    });\n\t    /**\n\t\t *  Start the clock at the given time. Optionally pass in an offset\n\t\t *  of where to start the tick counter from.\n\t\t *  @param  {Time=}  time    The time the clock should start\n\t\t *  @param  {Ticks=}  offset  Where the tick counter starts counting from.\n\t\t *  @return  {Tone.Clock}  this\n\t\t */\n\t    Tone.Clock.prototype.start = function (time, offset) {\n\t        time = this.toSeconds(time);\n\t        if (this._state.getValueAtTime(time) !== Tone.State.Started) {\n\t            this._state.setStateAtTime(Tone.State.Started, time);\n\t            this._tickSource.start(time, offset);\n\t            if (time < this._lastUpdate) {\n\t                this.emit('start', time, offset);\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Stop the clock. Stopping the clock resets the tick counter to 0.\n\t\t *  @param {Time} [time=now] The time when the clock should stop.\n\t\t *  @returns {Tone.Clock} this\n\t\t *  @example\n\t\t * clock.stop();\n\t\t */\n\t    Tone.Clock.prototype.stop = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._state.cancel(time);\n\t        this._state.setStateAtTime(Tone.State.Stopped, time);\n\t        this._tickSource.stop(time);\n\t        if (time < this._lastUpdate) {\n\t            this.emit('stop', time);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Pause the clock. Pausing does not reset the tick counter.\n\t\t *  @param {Time} [time=now] The time when the clock should stop.\n\t\t *  @returns {Tone.Clock} this\n\t\t */\n\t    Tone.Clock.prototype.pause = function (time) {\n\t        time = this.toSeconds(time);\n\t        if (this._state.getValueAtTime(time) === Tone.State.Started) {\n\t            this._state.setStateAtTime(Tone.State.Paused, time);\n\t            this._tickSource.pause(time);\n\t            if (time < this._lastUpdate) {\n\t                this.emit('pause', time);\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  The number of times the callback was invoked. Starts counting at 0\n\t\t *  and increments after the callback was invoked.\n\t\t *  @type {Ticks}\n\t\t */\n\t    Object.defineProperty(Tone.Clock.prototype, 'ticks', {\n\t        get: function () {\n\t            return Math.ceil(this.getTicksAtTime(this.now()));\n\t        },\n\t        set: function (t) {\n\t            this._tickSource.ticks = t;\n\t        }\n\t    });\n\t    /**\n\t\t *  The time since ticks=0 that the Clock has been running. Accounts\n\t\t *  for tempo curves\n\t\t *  @type {Seconds}\n\t\t */\n\t    Object.defineProperty(Tone.Clock.prototype, 'seconds', {\n\t        get: function () {\n\t            return this._tickSource.seconds;\n\t        },\n\t        set: function (s) {\n\t            this._tickSource.seconds = s;\n\t        }\n\t    });\n\t    /**\n\t\t *  Return the elapsed seconds at the given time.\n\t\t *  @param  {Time}  time  When to get the elapsed seconds\n\t\t *  @return  {Seconds}  The number of elapsed seconds\n\t\t */\n\t    Tone.Clock.prototype.getSecondsAtTime = function (time) {\n\t        return this._tickSource.getSecondsAtTime(time);\n\t    };\n\t    /**\n\t\t * Set the clock's ticks at the given time.\n\t\t * @param  {Ticks} ticks The tick value to set\n\t\t * @param  {Time} time  When to set the tick value\n\t\t * @return {Tone.Clock}       this\n\t\t */\n\t    Tone.Clock.prototype.setTicksAtTime = function (ticks, time) {\n\t        this._tickSource.setTicksAtTime(ticks, time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Get the clock's ticks at the given time.\n\t\t * @param  {Time} time  When to get the tick value\n\t\t * @return {Ticks}       The tick value at the given time.\n\t\t */\n\t    Tone.Clock.prototype.getTicksAtTime = function (time) {\n\t        return this._tickSource.getTicksAtTime(time);\n\t    };\n\t    /**\n\t\t * Get the time of the next tick\n\t\t * @param  {Ticks} ticks The tick number.\n\t\t * @param  {Time} before \n\t\t * @return {Tone.Clock}       this\n\t\t */\n\t    Tone.Clock.prototype.nextTickTime = function (offset, when) {\n\t        when = this.toSeconds(when);\n\t        var currentTick = this.getTicksAtTime(when);\n\t        return this._tickSource.getTimeOfTick(currentTick + offset, when);\n\t    };\n\t    /**\n\t\t *  The scheduling loop.\n\t\t *  @private\n\t\t */\n\t    Tone.Clock.prototype._loop = function () {\n\t        var startTime = this._lastUpdate;\n\t        var endTime = this.now();\n\t        this._lastUpdate = endTime;\n\t        if (startTime !== endTime) {\n\t            //the state change events\n\t            this._state.forEachBetween(startTime, endTime, function (e) {\n\t                switch (e.state) {\n\t                case Tone.State.Started:\n\t                    var offset = this._tickSource.getTicksAtTime(e.time);\n\t                    this.emit('start', e.time, offset);\n\t                    break;\n\t                case Tone.State.Stopped:\n\t                    if (e.time !== 0) {\n\t                        this.emit('stop', e.time);\n\t                    }\n\t                    break;\n\t                case Tone.State.Paused:\n\t                    this.emit('pause', e.time);\n\t                    break;\n\t                }\n\t            }.bind(this));\n\t            //the tick callbacks\n\t            this._tickSource.forEachTickBetween(startTime, endTime, function (time, ticks) {\n\t                this.callback(time, ticks);\n\t            }.bind(this));\n\t        }\n\t    };\n\t    /**\n\t\t *  Returns the scheduled state at the given time.\n\t\t *  @param  {Time}  time  The time to query.\n\t\t *  @return  {String}  The name of the state input in setStateAtTime.\n\t\t *  @example\n\t\t * clock.start(\"+0.1\");\n\t\t * clock.getStateAtTime(\"+0.1\"); //returns \"started\"\n\t\t */\n\t    Tone.Clock.prototype.getStateAtTime = function (time) {\n\t        time = this.toSeconds(time);\n\t        return this._state.getValueAtTime(time);\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @returns {Tone.Clock} this\n\t\t */\n\t    Tone.Clock.prototype.dispose = function () {\n\t        Tone.Emitter.prototype.dispose.call(this);\n\t        this.context.off('tick', this._boundLoop);\n\t        this._writable('frequency');\n\t        this._tickSource.dispose();\n\t        this._tickSource = null;\n\t        this.frequency = null;\n\t        this._boundLoop = null;\n\t        this._nextTick = Infinity;\n\t        this.callback = null;\n\t        this._state.dispose();\n\t        this._state = null;\n\t    };\n\t    return Tone.Clock;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Similar to Tone.Timeline, but all events represent\n\t\t *         intervals with both \"time\" and \"duration\" times. The\n\t\t *         events are placed in a tree structure optimized\n\t\t *         for querying an intersection point with the timeline\n\t\t *         events. Internally uses an [Interval Tree](https://en.wikipedia.org/wiki/Interval_tree)\n\t\t *         to represent the data.\n\t\t *  @extends {Tone}\n\t\t */\n\t    Tone.IntervalTimeline = function () {\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  The root node of the inteval tree\n\t\t\t *  @type  {IntervalNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._root = null;\n\t        /**\n\t\t\t *  Keep track of the length of the timeline.\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._length = 0;\n\t    };\n\t    Tone.extend(Tone.IntervalTimeline);\n\t    /**\n\t\t *  The event to add to the timeline. All events must\n\t\t *  have a time and duration value\n\t\t *  @param  {Object}  event  The event to add to the timeline\n\t\t *  @return  {Tone.IntervalTimeline}  this\n\t\t */\n\t    Tone.IntervalTimeline.prototype.add = function (event) {\n\t        if (Tone.isUndef(event.time) || Tone.isUndef(event.duration)) {\n\t            throw new Error('Tone.IntervalTimeline: events must have time and duration parameters');\n\t        }\n\t        event.time = event.time.valueOf();\n\t        var node = new IntervalNode(event.time, event.time + event.duration, event);\n\t        if (this._root === null) {\n\t            this._root = node;\n\t        } else {\n\t            this._root.insert(node);\n\t        }\n\t        this._length++;\n\t        // Restructure tree to be balanced\n\t        while (node !== null) {\n\t            node.updateHeight();\n\t            node.updateMax();\n\t            this._rebalance(node);\n\t            node = node.parent;\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Remove an event from the timeline.\n\t\t *  @param  {Object}  event  The event to remove from the timeline\n\t\t *  @return  {Tone.IntervalTimeline}  this\n\t\t */\n\t    Tone.IntervalTimeline.prototype.remove = function (event) {\n\t        if (this._root !== null) {\n\t            var results = [];\n\t            this._root.search(event.time, results);\n\t            for (var i = 0; i < results.length; i++) {\n\t                var node = results[i];\n\t                if (node.event === event) {\n\t                    this._removeNode(node);\n\t                    this._length--;\n\t                    break;\n\t                }\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  The number of items in the timeline.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.IntervalTimeline#\n\t\t *  @name length\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.IntervalTimeline.prototype, 'length', {\n\t        get: function () {\n\t            return this._length;\n\t        }\n\t    });\n\t    /**\n\t\t *  Remove events whose time time is after the given time\n\t\t *  @param  {Number}  time  The time to query.\n\t\t *  @returns {Tone.IntervalTimeline} this\n\t\t */\n\t    Tone.IntervalTimeline.prototype.cancel = function (after) {\n\t        this.forEachFrom(after, function (event) {\n\t            this.remove(event);\n\t        }.bind(this));\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Set the root node as the given node\n\t\t *  @param {IntervalNode} node\n\t\t *  @private\n\t\t */\n\t    Tone.IntervalTimeline.prototype._setRoot = function (node) {\n\t        this._root = node;\n\t        if (this._root !== null) {\n\t            this._root.parent = null;\n\t        }\n\t    };\n\t    /**\n\t\t *  Replace the references to the node in the node's parent\n\t\t *  with the replacement node.\n\t\t *  @param  {IntervalNode}  node\n\t\t *  @param  {IntervalNode}  replacement\n\t\t *  @private\n\t\t */\n\t    Tone.IntervalTimeline.prototype._replaceNodeInParent = function (node, replacement) {\n\t        if (node.parent !== null) {\n\t            if (node.isLeftChild()) {\n\t                node.parent.left = replacement;\n\t            } else {\n\t                node.parent.right = replacement;\n\t            }\n\t            this._rebalance(node.parent);\n\t        } else {\n\t            this._setRoot(replacement);\n\t        }\n\t    };\n\t    /**\n\t\t *  Remove the node from the tree and replace it with\n\t\t *  a successor which follows the schema.\n\t\t *  @param  {IntervalNode}  node\n\t\t *  @private\n\t\t */\n\t    Tone.IntervalTimeline.prototype._removeNode = function (node) {\n\t        if (node.left === null && node.right === null) {\n\t            this._replaceNodeInParent(node, null);\n\t        } else if (node.right === null) {\n\t            this._replaceNodeInParent(node, node.left);\n\t        } else if (node.left === null) {\n\t            this._replaceNodeInParent(node, node.right);\n\t        } else {\n\t            var balance = node.getBalance();\n\t            var replacement, temp;\n\t            if (balance > 0) {\n\t                if (node.left.right === null) {\n\t                    replacement = node.left;\n\t                    replacement.right = node.right;\n\t                    temp = replacement;\n\t                } else {\n\t                    replacement = node.left.right;\n\t                    while (replacement.right !== null) {\n\t                        replacement = replacement.right;\n\t                    }\n\t                    replacement.parent.right = replacement.left;\n\t                    temp = replacement.parent;\n\t                    replacement.left = node.left;\n\t                    replacement.right = node.right;\n\t                }\n\t            } else if (node.right.left === null) {\n\t                replacement = node.right;\n\t                replacement.left = node.left;\n\t                temp = replacement;\n\t            } else {\n\t                replacement = node.right.left;\n\t                while (replacement.left !== null) {\n\t                    replacement = replacement.left;\n\t                }\n\t                replacement.parent = replacement.parent;\n\t                replacement.parent.left = replacement.right;\n\t                temp = replacement.parent;\n\t                replacement.left = node.left;\n\t                replacement.right = node.right;\n\t            }\n\t            if (node.parent !== null) {\n\t                if (node.isLeftChild()) {\n\t                    node.parent.left = replacement;\n\t                } else {\n\t                    node.parent.right = replacement;\n\t                }\n\t            } else {\n\t                this._setRoot(replacement);\n\t            }\n\t            // this._replaceNodeInParent(node, replacement);\n\t            this._rebalance(temp);\n\t        }\n\t        node.dispose();\n\t    };\n\t    /**\n\t\t *  Rotate the tree to the left\n\t\t *  @param  {IntervalNode}  node\n\t\t *  @private\n\t\t */\n\t    Tone.IntervalTimeline.prototype._rotateLeft = function (node) {\n\t        var parent = node.parent;\n\t        var isLeftChild = node.isLeftChild();\n\t        // Make node.right the new root of this sub tree (instead of node)\n\t        var pivotNode = node.right;\n\t        node.right = pivotNode.left;\n\t        pivotNode.left = node;\n\t        if (parent !== null) {\n\t            if (isLeftChild) {\n\t                parent.left = pivotNode;\n\t            } else {\n\t                parent.right = pivotNode;\n\t            }\n\t        } else {\n\t            this._setRoot(pivotNode);\n\t        }\n\t    };\n\t    /**\n\t\t *  Rotate the tree to the right\n\t\t *  @param  {IntervalNode}  node\n\t\t *  @private\n\t\t */\n\t    Tone.IntervalTimeline.prototype._rotateRight = function (node) {\n\t        var parent = node.parent;\n\t        var isLeftChild = node.isLeftChild();\n\t        // Make node.left the new root of this sub tree (instead of node)\n\t        var pivotNode = node.left;\n\t        node.left = pivotNode.right;\n\t        pivotNode.right = node;\n\t        if (parent !== null) {\n\t            if (isLeftChild) {\n\t                parent.left = pivotNode;\n\t            } else {\n\t                parent.right = pivotNode;\n\t            }\n\t        } else {\n\t            this._setRoot(pivotNode);\n\t        }\n\t    };\n\t    /**\n\t\t *  Balance the BST\n\t\t *  @param  {IntervalNode}  node\n\t\t *  @private\n\t\t */\n\t    Tone.IntervalTimeline.prototype._rebalance = function (node) {\n\t        var balance = node.getBalance();\n\t        if (balance > 1) {\n\t            if (node.left.getBalance() < 0) {\n\t                this._rotateLeft(node.left);\n\t            } else {\n\t                this._rotateRight(node);\n\t            }\n\t        } else if (balance < -1) {\n\t            if (node.right.getBalance() > 0) {\n\t                this._rotateRight(node.right);\n\t            } else {\n\t                this._rotateLeft(node);\n\t            }\n\t        }\n\t    };\n\t    /**\n\t\t *  Get an event whose time and duration span the give time. Will\n\t\t *  return the match whose \"time\" value is closest to the given time.\n\t\t *  @param  {Object}  event  The event to add to the timeline\n\t\t *  @return  {Object}  The event which spans the desired time\n\t\t */\n\t    Tone.IntervalTimeline.prototype.get = function (time) {\n\t        if (this._root !== null) {\n\t            var results = [];\n\t            this._root.search(time, results);\n\t            if (results.length > 0) {\n\t                var max = results[0];\n\t                for (var i = 1; i < results.length; i++) {\n\t                    if (results[i].low > max.low) {\n\t                        max = results[i];\n\t                    }\n\t                }\n\t                return max.event;\n\t            }\n\t        }\n\t        return null;\n\t    };\n\t    /**\n\t\t *  Iterate over everything in the timeline.\n\t\t *  @param  {Function}  callback The callback to invoke with every item\n\t\t *  @returns {Tone.IntervalTimeline} this\n\t\t */\n\t    Tone.IntervalTimeline.prototype.forEach = function (callback) {\n\t        if (this._root !== null) {\n\t            var allNodes = [];\n\t            this._root.traverse(function (node) {\n\t                allNodes.push(node);\n\t            });\n\t            for (var i = 0; i < allNodes.length; i++) {\n\t                var ev = allNodes[i].event;\n\t                if (ev) {\n\t                    callback(ev);\n\t                }\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Iterate over everything in the array in which the given time\n\t\t *  overlaps with the time and duration time of the event.\n\t\t *  @param  {Number}  time The time to check if items are overlapping\n\t\t *  @param  {Function}  callback The callback to invoke with every item\n\t\t *  @returns {Tone.IntervalTimeline} this\n\t\t */\n\t    Tone.IntervalTimeline.prototype.forEachAtTime = function (time, callback) {\n\t        if (this._root !== null) {\n\t            var results = [];\n\t            this._root.search(time, results);\n\t            for (var i = results.length - 1; i >= 0; i--) {\n\t                var ev = results[i].event;\n\t                if (ev) {\n\t                    callback(ev);\n\t                }\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Iterate over everything in the array in which the time is greater\n\t\t *  than or equal to the given time.\n\t\t *  @param  {Number}  time The time to check if items are before\n\t\t *  @param  {Function}  callback The callback to invoke with every item\n\t\t *  @returns {Tone.IntervalTimeline} this\n\t\t */\n\t    Tone.IntervalTimeline.prototype.forEachFrom = function (time, callback) {\n\t        if (this._root !== null) {\n\t            var results = [];\n\t            this._root.searchAfter(time, results);\n\t            for (var i = results.length - 1; i >= 0; i--) {\n\t                var ev = results[i].event;\n\t                callback(ev);\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.IntervalTimeline}  this\n\t\t */\n\t    Tone.IntervalTimeline.prototype.dispose = function () {\n\t        var allNodes = [];\n\t        if (this._root !== null) {\n\t            this._root.traverse(function (node) {\n\t                allNodes.push(node);\n\t            });\n\t        }\n\t        for (var i = 0; i < allNodes.length; i++) {\n\t            allNodes[i].dispose();\n\t        }\n\t        allNodes = null;\n\t        this._root = null;\n\t        return this;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tINTERVAL NODE HELPER\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Represents a node in the binary search tree, with the addition\n\t\t *  of a \"high\" value which keeps track of the highest value of\n\t\t *  its children.\n\t\t *  References:\n\t\t *  https://brooknovak.wordpress.com/2013/12/07/augmented-interval-tree-in-c/\n\t\t *  http://www.mif.vu.lt/~valdas/ALGORITMAI/LITERATURA/Cormen/Cormen.pdf\n\t\t *  @param {Number} low\n\t\t *  @param {Number} high\n\t\t *  @private\n\t\t */\n\t    var IntervalNode = function (low, high, event) {\n\t        //the event container\n\t        this.event = event;\n\t        //the low value\n\t        this.low = low;\n\t        //the high value\n\t        this.high = high;\n\t        //the high value for this and all child nodes\n\t        this.max = this.high;\n\t        //the nodes to the left\n\t        this._left = null;\n\t        //the nodes to the right\n\t        this._right = null;\n\t        //the parent node\n\t        this.parent = null;\n\t        //the number of child nodes\n\t        this.height = 0;\n\t    };\n\t    /**\n\t\t *  Insert a node into the correct spot in the tree\n\t\t *  @param  {IntervalNode}  node\n\t\t */\n\t    IntervalNode.prototype.insert = function (node) {\n\t        if (node.low <= this.low) {\n\t            if (this.left === null) {\n\t                this.left = node;\n\t            } else {\n\t                this.left.insert(node);\n\t            }\n\t        } else if (this.right === null) {\n\t            this.right = node;\n\t        } else {\n\t            this.right.insert(node);\n\t        }\n\t    };\n\t    /**\n\t\t *  Search the tree for nodes which overlap\n\t\t *  with the given point\n\t\t *  @param  {Number}  point  The point to query\n\t\t *  @param  {Array}  results  The array to put the results\n\t\t */\n\t    IntervalNode.prototype.search = function (point, results) {\n\t        // If p is to the right of the rightmost point of any interval\n\t        // in this node and all children, there won't be any matches.\n\t        if (point > this.max) {\n\t            return;\n\t        }\n\t        // Search left children\n\t        if (this.left !== null) {\n\t            this.left.search(point, results);\n\t        }\n\t        // Check this node\n\t        if (this.low <= point && this.high > point) {\n\t            results.push(this);\n\t        }\n\t        // If p is to the left of the time of this interval,\n\t        // then it can't be in any child to the right.\n\t        if (this.low > point) {\n\t            return;\n\t        }\n\t        // Search right children\n\t        if (this.right !== null) {\n\t            this.right.search(point, results);\n\t        }\n\t    };\n\t    /**\n\t\t *  Search the tree for nodes which are less\n\t\t *  than the given point\n\t\t *  @param  {Number}  point  The point to query\n\t\t *  @param  {Array}  results  The array to put the results\n\t\t */\n\t    IntervalNode.prototype.searchAfter = function (point, results) {\n\t        // Check this node\n\t        if (this.low >= point) {\n\t            results.push(this);\n\t            if (this.left !== null) {\n\t                this.left.searchAfter(point, results);\n\t            }\n\t        }\n\t        // search the right side\n\t        if (this.right !== null) {\n\t            this.right.searchAfter(point, results);\n\t        }\n\t    };\n\t    /**\n\t\t *  Invoke the callback on this element and both it's branches\n\t\t *  @param  {Function}  callback\n\t\t */\n\t    IntervalNode.prototype.traverse = function (callback) {\n\t        callback(this);\n\t        if (this.left !== null) {\n\t            this.left.traverse(callback);\n\t        }\n\t        if (this.right !== null) {\n\t            this.right.traverse(callback);\n\t        }\n\t    };\n\t    /**\n\t\t *  Update the height of the node\n\t\t */\n\t    IntervalNode.prototype.updateHeight = function () {\n\t        if (this.left !== null && this.right !== null) {\n\t            this.height = Math.max(this.left.height, this.right.height) + 1;\n\t        } else if (this.right !== null) {\n\t            this.height = this.right.height + 1;\n\t        } else if (this.left !== null) {\n\t            this.height = this.left.height + 1;\n\t        } else {\n\t            this.height = 0;\n\t        }\n\t    };\n\t    /**\n\t\t *  Update the height of the node\n\t\t */\n\t    IntervalNode.prototype.updateMax = function () {\n\t        this.max = this.high;\n\t        if (this.left !== null) {\n\t            this.max = Math.max(this.max, this.left.max);\n\t        }\n\t        if (this.right !== null) {\n\t            this.max = Math.max(this.max, this.right.max);\n\t        }\n\t    };\n\t    /**\n\t\t *  The balance is how the leafs are distributed on the node\n\t\t *  @return  {Number}  Negative numbers are balanced to the right\n\t\t */\n\t    IntervalNode.prototype.getBalance = function () {\n\t        var balance = 0;\n\t        if (this.left !== null && this.right !== null) {\n\t            balance = this.left.height - this.right.height;\n\t        } else if (this.left !== null) {\n\t            balance = this.left.height + 1;\n\t        } else if (this.right !== null) {\n\t            balance = -(this.right.height + 1);\n\t        }\n\t        return balance;\n\t    };\n\t    /**\n\t\t *  @returns {Boolean} true if this node is the left child\n\t\t *  of its parent\n\t\t */\n\t    IntervalNode.prototype.isLeftChild = function () {\n\t        return this.parent !== null && this.parent.left === this;\n\t    };\n\t    /**\n\t\t *  get/set the left node\n\t\t *  @type {IntervalNode}\n\t\t */\n\t    Object.defineProperty(IntervalNode.prototype, 'left', {\n\t        get: function () {\n\t            return this._left;\n\t        },\n\t        set: function (node) {\n\t            this._left = node;\n\t            if (node !== null) {\n\t                node.parent = this;\n\t            }\n\t            this.updateHeight();\n\t            this.updateMax();\n\t        }\n\t    });\n\t    /**\n\t\t *  get/set the right node\n\t\t *  @type {IntervalNode}\n\t\t */\n\t    Object.defineProperty(IntervalNode.prototype, 'right', {\n\t        get: function () {\n\t            return this._right;\n\t        },\n\t        set: function (node) {\n\t            this._right = node;\n\t            if (node !== null) {\n\t                node.parent = this;\n\t            }\n\t            this.updateHeight();\n\t            this.updateMax();\n\t        }\n\t    });\n\t    /**\n\t\t *  null out references.\n\t\t */\n\t    IntervalNode.prototype.dispose = function () {\n\t        this.parent = null;\n\t        this._left = null;\n\t        this._right = null;\n\t        this.event = null;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tEND INTERVAL NODE HELPER\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    return Tone.IntervalTimeline;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.Ticks is a primitive type for encoding Time values.\n\t\t *         Tone.Ticks can be constructed with or without the `new` keyword. Tone.Ticks can be passed\n\t\t *         into the parameter of any method which takes time as an argument.\n\t\t *  @constructor\n\t\t *  @extends {Tone.TransportTime}\n\t\t *  @param  {String|Number}  val    The time value.\n\t\t *  @param  {String=}  units  The units of the value.\n\t\t *  @example\n\t\t * var t = Tone.Ticks(\"4n\");//a quarter note\n\t\t */\n\t    Tone.Ticks = function (val, units) {\n\t        if (this instanceof Tone.Ticks) {\n\t            Tone.TransportTime.call(this, val, units);\n\t        } else {\n\t            return new Tone.Ticks(val, units);\n\t        }\n\t    };\n\t    Tone.extend(Tone.Ticks, Tone.TransportTime);\n\t    /**\n\t\t *  The default units if none are given.\n\t\t *  @type {String}\n\t\t *  @private\n\t\t */\n\t    Tone.Ticks.prototype._defaultUnits = 'i';\n\t    /**\n\t\t * Get the current time in the given units\n\t\t * @return {Ticks}\n\t\t * @private\n\t\t */\n\t    Tone.Ticks.prototype._now = function () {\n\t        return Tone.Transport.ticks;\n\t    };\n\t    /**\n\t\t *  Return the value of the beats in the current units\n\t\t *  @param {Number} beats\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Ticks.prototype._beatsToUnits = function (beats) {\n\t        return this._getPPQ() * beats;\n\t    };\n\t    /**\n\t\t *  Returns the value of a second in the current units\n\t\t *  @param {Seconds} seconds\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Ticks.prototype._secondsToUnits = function (seconds) {\n\t        return seconds / (60 / this._getBpm()) * this._getPPQ();\n\t    };\n\t    /**\n\t\t *  Returns the value of a tick in the current time units\n\t\t *  @param {Ticks} ticks\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Ticks.prototype._ticksToUnits = function (ticks) {\n\t        return ticks;\n\t    };\n\t    /**\n\t\t *  Return the time in ticks\n\t\t *  @return  {Ticks}\n\t\t */\n\t    Tone.Ticks.prototype.toTicks = function () {\n\t        return this.valueOf();\n\t    };\n\t    /**\n\t\t *  Return the time in ticks\n\t\t *  @return  {Ticks}\n\t\t */\n\t    Tone.Ticks.prototype.toSeconds = function () {\n\t        return this.valueOf() / this._getPPQ() * (60 / this._getBpm());\n\t    };\n\t    return Tone.Ticks;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.TransportEvent is an internal class used by (Tone.Transport)[Transport]\n\t\t *         to schedule events. Do no invoke this class directly, it is\n\t\t *         handled from within Tone.Transport.\n\t\t *  @extends {Tone}\n\t\t *  @param {Object} options\n\t\t */\n\t    Tone.TransportEvent = function (Transport, options) {\n\t        options = Tone.defaultArg(options, Tone.TransportEvent.defaults);\n\t        Tone.call(this);\n\t        /**\n\t\t\t * Reference to the Transport that created it\n\t\t\t * @type {Tone.Transport}\n\t\t\t */\n\t        this.Transport = Transport;\n\t        /**\n\t\t\t * The unique id of the event\n\t\t\t * @type {Number}\n\t\t\t */\n\t        this.id = Tone.TransportEvent._eventId++;\n\t        /**\n\t\t\t * The time the event starts\n\t\t\t * @type {Ticks}\n\t\t\t */\n\t        this.time = Tone.Ticks(options.time);\n\t        /**\n\t\t\t * The callback to invoke\n\t\t\t * @type {Function}\n\t\t\t */\n\t        this.callback = options.callback;\n\t        /**\n\t\t\t * If the event should be removed after being created.\n\t\t\t * @type {Boolean}\n\t\t\t * @private\n\t\t\t */\n\t        this._once = options.once;\n\t    };\n\t    Tone.extend(Tone.TransportEvent);\n\t    /**\n\t\t * The defaults\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t    Tone.TransportEvent.defaults = {\n\t        'once': false,\n\t        'callback': Tone.noOp\n\t    };\n\t    /**\n\t\t * Current ID counter\n\t\t * @private\n\t\t * @static\n\t\t * @type {Number}\n\t\t */\n\t    Tone.TransportEvent._eventId = 0;\n\t    /**\n\t\t * Invoke the event callback.\n\t\t * @param  {Time} time  The AudioContext time in seconds of the event\n\t\t */\n\t    Tone.TransportEvent.prototype.invoke = function (time) {\n\t        if (this.callback) {\n\t            this.callback(time);\n\t            if (this._once && this.Transport) {\n\t                this.Transport.clear(this.id);\n\t            }\n\t        }\n\t    };\n\t    /**\n\t\t * Clean up\n\t\t * @return {Tone.TransportEvent} this\n\t\t */\n\t    Tone.TransportEvent.prototype.dispose = function () {\n\t        Tone.prototype.dispose.call(this);\n\t        this.Transport = null;\n\t        this.callback = null;\n\t        this.time = null;\n\t        return this;\n\t    };\n\t    return Tone.TransportEvent;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.TransportRepeatEvent is an internal class used by Tone.Transport\n\t\t *         to schedule repeat events. This class should not be instantiated directly.\n\t\t *  @extends {Tone.TransportEvent}\n\t\t *  @param {Object} options\n\t\t */\n\t    Tone.TransportRepeatEvent = function (Transport, options) {\n\t        Tone.TransportEvent.call(this, Transport, options);\n\t        options = Tone.defaultArg(options, Tone.TransportRepeatEvent.defaults);\n\t        /**\n\t\t\t * When the event should stop repeating\n\t\t\t * @type {Ticks}\n\t\t\t * @private\n\t\t\t */\n\t        this.duration = Tone.Ticks(options.duration);\n\t        /**\n\t\t\t * The interval of the repeated event\n\t\t\t * @type {Ticks}\n\t\t\t * @private\n\t\t\t */\n\t        this._interval = Tone.Ticks(options.interval);\n\t        /**\n\t\t\t * The ID of the current timeline event\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t        this._currentId = -1;\n\t        /**\n\t\t\t * The ID of the next timeline event\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t        this._nextId = -1;\n\t        /**\n\t\t\t  * The time of the next event\n\t\t\t  * @type {Ticks}\n\t\t\t  * @private\n\t\t\t  */\n\t        this._nextTick = this.time;\n\t        /**\n\t\t\t * a reference to the bound start method\n\t\t\t * @type {Function}\n\t\t\t * @private\n\t\t\t */\n\t        this._boundRestart = this._restart.bind(this);\n\t        this.Transport.on('start loopStart', this._boundRestart);\n\t        this._restart();\n\t    };\n\t    Tone.extend(Tone.TransportRepeatEvent, Tone.TransportEvent);\n\t    /**\n\t\t * The defaults\n\t\t * @static\n\t\t * @type {Object}\n\t\t */\n\t    Tone.TransportRepeatEvent.defaults = {\n\t        'duration': Infinity,\n\t        'interval': 1\n\t    };\n\t    /**\n\t\t * Invoke the callback. Returns the tick time which\n\t\t * the next event should be scheduled at.\n\t\t * @param  {Number} time  The AudioContext time in seconds of the event\n\t\t */\n\t    Tone.TransportRepeatEvent.prototype.invoke = function (time) {\n\t        //create more events if necessary\n\t        this._createEvents(time);\n\t        //call the super class\n\t        Tone.TransportEvent.prototype.invoke.call(this, time);\n\t    };\n\t    /**\n\t\t * Push more events onto the timeline to keep up with the position of the timeline\n\t\t * @private\n\t\t */\n\t    Tone.TransportRepeatEvent.prototype._createEvents = function (time) {\n\t        // schedule the next event\n\t        var ticks = this.Transport.getTicksAtTime(time);\n\t        if (ticks >= this.time && ticks >= this._nextTick && this._nextTick + this._interval < this.time + this.duration) {\n\t            this._nextTick += this._interval;\n\t            this._currentId = this._nextId;\n\t            this._nextId = this.Transport.scheduleOnce(this.invoke.bind(this), Tone.Ticks(this._nextTick));\n\t        }\n\t    };\n\t    /**\n\t\t * Push more events onto the timeline to keep up with the position of the timeline\n\t\t * @private\n\t\t */\n\t    Tone.TransportRepeatEvent.prototype._restart = function (time) {\n\t        this.Transport.clear(this._currentId);\n\t        this.Transport.clear(this._nextId);\n\t        this._nextTick = this.time;\n\t        var ticks = this.Transport.getTicksAtTime(time);\n\t        if (ticks > this.time) {\n\t            this._nextTick = this.time + Math.ceil((ticks - this.time) / this._interval) * this._interval;\n\t        }\n\t        this._currentId = this.Transport.scheduleOnce(this.invoke.bind(this), Tone.Ticks(this._nextTick));\n\t        this._nextTick += this._interval;\n\t        this._nextId = this.Transport.scheduleOnce(this.invoke.bind(this), Tone.Ticks(this._nextTick));\n\t    };\n\t    /**\n\t\t * Clean up\n\t\t * @return {Tone.TransportRepeatEvent} this\n\t\t */\n\t    Tone.TransportRepeatEvent.prototype.dispose = function () {\n\t        this.Transport.clear(this._currentId);\n\t        this.Transport.clear(this._nextId);\n\t        this.Transport.off('start loopStart', this._boundRestart);\n\t        this._boundCreateEvents = null;\n\t        Tone.TransportEvent.prototype.dispose.call(this);\n\t        this.duration = null;\n\t        this._interval = null;\n\t        return this;\n\t    };\n\t    return Tone.TransportRepeatEvent;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Transport for timing musical events.\n\t\t *          Supports tempo curves and time changes. Unlike browser-based timing (setInterval, requestAnimationFrame)\n\t\t *          Tone.Transport timing events pass in the exact time of the scheduled event\n\t\t *          in the argument of the callback function. Pass that time value to the object\n\t\t *          you're scheduling. <br><br>\n\t\t *          A single transport is created for you when the library is initialized.\n\t\t *          <br><br>\n\t\t *          The transport emits the events: \"start\", \"stop\", \"pause\", and \"loop\" which are\n\t\t *          called with the time of that event as the argument.\n\t\t *\n\t\t *  @extends {Tone.Emitter}\n\t\t *  @singleton\n\t\t *  @example\n\t\t * //repeated event every 8th note\n\t\t * Tone.Transport.scheduleRepeat(function(time){\n\t\t * \t//do something with the time\n\t\t * }, \"8n\");\n\t\t *  @example\n\t\t * //schedule an event on the 16th measure\n\t\t * Tone.Transport.schedule(function(time){\n\t\t * \t//do something with the time\n\t\t * }, \"16:0:0\");\n\t\t */\n\t    Tone.Transport = function () {\n\t        Tone.Emitter.call(this);\n\t        Tone.getContext(function () {\n\t            ///////////////////////////////////////////////////////////////////////\n\t            //\tLOOPING\n\t            //////////////////////////////////////////////////////////////////////\n\t            /**\n\t\t\t\t * \tIf the transport loops or not.\n\t\t\t\t *  @type {boolean}\n\t\t\t\t */\n\t            this.loop = false;\n\t            /**\n\t\t\t\t * \tThe loop start position in ticks\n\t\t\t\t *  @type {Ticks}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._loopStart = 0;\n\t            /**\n\t\t\t\t * \tThe loop end position in ticks\n\t\t\t\t *  @type {Ticks}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._loopEnd = 0;\n\t            ///////////////////////////////////////////////////////////////////////\n\t            //\tCLOCK/TEMPO\n\t            //////////////////////////////////////////////////////////////////////\n\t            /**\n\t\t\t\t *  Pulses per quarter is the number of ticks per quarter note.\n\t\t\t\t *  @private\n\t\t\t\t *  @type  {Number}\n\t\t\t\t */\n\t            this._ppq = TransportConstructor.defaults.PPQ;\n\t            /**\n\t\t\t\t *  watches the main oscillator for timing ticks\n\t\t\t\t *  initially starts at 120bpm\n\t\t\t\t *  @private\n\t\t\t\t *  @type {Tone.Clock}\n\t\t\t\t */\n\t            this._clock = new Tone.Clock({\n\t                'callback': this._processTick.bind(this),\n\t                'frequency': 0\n\t            });\n\t            this._bindClockEvents();\n\t            /**\n\t\t\t\t *  The Beats Per Minute of the Transport.\n\t\t\t\t *  @type {BPM}\n\t\t\t\t *  @signal\n\t\t\t\t *  @example\n\t\t\t\t * Tone.Transport.bpm.value = 80;\n\t\t\t\t * //ramp the bpm to 120 over 10 seconds\n\t\t\t\t * Tone.Transport.bpm.rampTo(120, 10);\n\t\t\t\t */\n\t            this.bpm = this._clock.frequency;\n\t            this.bpm._toUnits = this._toUnits.bind(this);\n\t            this.bpm._fromUnits = this._fromUnits.bind(this);\n\t            this.bpm.units = Tone.Type.BPM;\n\t            this.bpm.value = TransportConstructor.defaults.bpm;\n\t            this._readOnly('bpm');\n\t            /**\n\t\t\t\t *  The time signature, or more accurately the numerator\n\t\t\t\t *  of the time signature over a denominator of 4.\n\t\t\t\t *  @type {Number}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._timeSignature = TransportConstructor.defaults.timeSignature;\n\t            ///////////////////////////////////////////////////////////////////////\n\t            //\tTIMELINE EVENTS\n\t            //////////////////////////////////////////////////////////////////////\n\t            /**\n\t\t\t\t *  All the events in an object to keep track by ID\n\t\t\t\t *  @type {Object}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._scheduledEvents = {};\n\t            /**\n\t\t\t\t * \tThe scheduled events.\n\t\t\t\t *  @type {Tone.Timeline}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._timeline = new Tone.Timeline();\n\t            /**\n\t\t\t\t *  Repeated events\n\t\t\t\t *  @type {Array}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._repeatedEvents = new Tone.IntervalTimeline();\n\t            /**\n\t\t\t\t *  All of the synced Signals\n\t\t\t\t *  @private\n\t\t\t\t *  @type {Array}\n\t\t\t\t */\n\t            this._syncedSignals = [];\n\t            ///////////////////////////////////////////////////////////////////////\n\t            //\tSWING\n\t            //////////////////////////////////////////////////////////////////////\n\t            /**\n\t\t\t\t *  The subdivision of the swing\n\t\t\t\t *  @type  {Ticks}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._swingTicks = TransportConstructor.defaults.PPQ / 2;\n\t            //8n\n\t            /**\n\t\t\t\t *  The swing amount\n\t\t\t\t *  @type {NormalRange}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._swingAmount = 0;\n\t        }.bind(this));\n\t    };\n\t    Tone.extend(Tone.Transport, Tone.Emitter);\n\t    /**\n\t\t *  the defaults\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t *  @static\n\t\t */\n\t    Tone.Transport.defaults = {\n\t        'bpm': 120,\n\t        'swing': 0,\n\t        'swingSubdivision': '8n',\n\t        'timeSignature': 4,\n\t        'loopStart': 0,\n\t        'loopEnd': '4m',\n\t        'PPQ': 192\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    //\tTICKS\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  called on every tick\n\t\t *  @param   {number} tickTime clock relative tick time\n\t\t *  @private\n\t\t */\n\t    Tone.Transport.prototype._processTick = function (tickTime, ticks) {\n\t        //handle swing\n\t        if (this._swingAmount > 0 && ticks % this._ppq !== 0 && //not on a downbeat\n\t            ticks % (this._swingTicks * 2) !== 0) {\n\t            //add some swing\n\t            var progress = ticks % (this._swingTicks * 2) / (this._swingTicks * 2);\n\t            var amount = Math.sin(progress * Math.PI) * this._swingAmount;\n\t            tickTime += Tone.Ticks(this._swingTicks * 2 / 3).toSeconds() * amount;\n\t        }\n\t        //do the loop test\n\t        if (this.loop) {\n\t            if (ticks >= this._loopEnd) {\n\t                this.emit('loopEnd', tickTime);\n\t                this._clock.setTicksAtTime(this._loopStart, tickTime);\n\t                ticks = this._loopStart;\n\t                this.emit('loopStart', tickTime, this._clock.getSecondsAtTime(tickTime));\n\t                this.emit('loop', tickTime);\n\t            }\n\t        }\n\t        //invoke the timeline events scheduled on this tick\n\t        this._timeline.forEachAtTime(ticks, function (event) {\n\t            event.invoke(tickTime);\n\t        });\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    //\tSCHEDULABLE EVENTS\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Schedule an event along the timeline.\n\t\t *  @param {Function} callback The callback to be invoked at the time.\n\t\t *  @param {TransportTime}  time The time to invoke the callback at.\n\t\t *  @return {Number} The id of the event which can be used for canceling the event.\n\t\t *  @example\n\t\t * //trigger the callback when the Transport reaches the desired time\n\t\t * Tone.Transport.schedule(function(time){\n\t\t * \tenvelope.triggerAttack(time);\n\t\t * }, \"128i\");\n\t\t */\n\t    Tone.Transport.prototype.schedule = function (callback, time) {\n\t        var event = new Tone.TransportEvent(this, {\n\t            'time': Tone.TransportTime(time),\n\t            'callback': callback\n\t        });\n\t        return this._addEvent(event, this._timeline);\n\t    };\n\t    /**\n\t\t *  Schedule a repeated event along the timeline. The event will fire\n\t\t *  at the `interval` starting at the `startTime` and for the specified\n\t\t *  `duration`.\n\t\t *  @param  {Function}  callback   The callback to invoke.\n\t\t *  @param  {Time}    interval   The duration between successive\n\t\t *                               callbacks. Must be a positive number.\n\t\t *  @param  {TransportTime=}    startTime  When along the timeline the events should\n\t\t *                               start being invoked.\n\t\t *  @param {Time} [duration=Infinity] How long the event should repeat.\n\t\t *  @return  {Number}    The ID of the scheduled event. Use this to cancel\n\t\t *                           the event.\n\t\t *  @example\n\t\t * //a callback invoked every eighth note after the first measure\n\t\t * Tone.Transport.scheduleRepeat(callback, \"8n\", \"1m\");\n\t\t */\n\t    Tone.Transport.prototype.scheduleRepeat = function (callback, interval, startTime, duration) {\n\t        var event = new Tone.TransportRepeatEvent(this, {\n\t            'callback': callback,\n\t            'interval': Tone.Time(interval),\n\t            'time': Tone.TransportTime(startTime),\n\t            'duration': Tone.Time(Tone.defaultArg(duration, Infinity))\n\t        });\n\t        //kick it off if the Transport is started\n\t        return this._addEvent(event, this._repeatedEvents);\n\t    };\n\t    /**\n\t\t *  Schedule an event that will be removed after it is invoked.\n\t\t *  Note that if the given time is less than the current transport time,\n\t\t *  the event will be invoked immediately.\n\t\t *  @param {Function} callback The callback to invoke once.\n\t\t *  @param {TransportTime} time The time the callback should be invoked.\n\t\t *  @returns {Number} The ID of the scheduled event.\n\t\t */\n\t    Tone.Transport.prototype.scheduleOnce = function (callback, time) {\n\t        var event = new Tone.TransportEvent(this, {\n\t            'time': Tone.TransportTime(time),\n\t            'callback': callback,\n\t            'once': true\n\t        });\n\t        return this._addEvent(event, this._timeline);\n\t    };\n\t    /**\n\t\t *  Clear the passed in event id from the timeline\n\t\t *  @param {Number} eventId The id of the event.\n\t\t *  @returns {Tone.Transport} this\n\t\t */\n\t    Tone.Transport.prototype.clear = function (eventId) {\n\t        if (this._scheduledEvents.hasOwnProperty(eventId)) {\n\t            var item = this._scheduledEvents[eventId.toString()];\n\t            item.timeline.remove(item.event);\n\t            item.event.dispose();\n\t            delete this._scheduledEvents[eventId.toString()];\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * Add an event to the correct timeline. Keep track of the\n\t\t * timeline it was added to.\n\t\t * @param {Tone.TransportEvent}\tevent\n\t\t * @param {Tone.Timeline} timeline\n\t\t * @returns {Number} the event id which was just added\n\t\t * @private\n\t\t */\n\t    Tone.Transport.prototype._addEvent = function (event, timeline) {\n\t        this._scheduledEvents[event.id.toString()] = {\n\t            'event': event,\n\t            'timeline': timeline\n\t        };\n\t        timeline.add(event);\n\t        return event.id;\n\t    };\n\t    /**\n\t\t *  Remove scheduled events from the timeline after\n\t\t *  the given time. Repeated events will be removed\n\t\t *  if their startTime is after the given time\n\t\t *  @param {TransportTime} [after=0] Clear all events after\n\t\t *                          this time.\n\t\t *  @returns {Tone.Transport} this\n\t\t */\n\t    Tone.Transport.prototype.cancel = function (after) {\n\t        after = Tone.defaultArg(after, 0);\n\t        after = this.toTicks(after);\n\t        this._timeline.forEachFrom(after, function (event) {\n\t            this.clear(event.id);\n\t        }.bind(this));\n\t        this._repeatedEvents.forEachFrom(after, function (event) {\n\t            this.clear(event.id);\n\t        }.bind(this));\n\t        return this;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    //\tSTART/STOP/PAUSE\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Bind start/stop/pause events from the clock and emit them.\n\t\t *  @private\n\t\t */\n\t    Tone.Transport.prototype._bindClockEvents = function () {\n\t        this._clock.on('start', function (time, offset) {\n\t            offset = Tone.Ticks(offset).toSeconds();\n\t            this.emit('start', time, offset);\n\t        }.bind(this));\n\t        this._clock.on('stop', function (time) {\n\t            this.emit('stop', time);\n\t        }.bind(this));\n\t        this._clock.on('pause', function (time) {\n\t            this.emit('pause', time);\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t *  Returns the playback state of the source, either \"started\", \"stopped\", or \"paused\"\n\t\t *  @type {Tone.State}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.Transport#\n\t\t *  @name state\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'state', {\n\t        get: function () {\n\t            return this._clock.getStateAtTime(this.now());\n\t        }\n\t    });\n\t    /**\n\t\t *  Start the transport and all sources synced to the transport.\n\t\t *  @param  {Time} [time=now] The time when the transport should start.\n\t\t *  @param  {TransportTime=} offset The timeline offset to start the transport.\n\t\t *  @returns {Tone.Transport} this\n\t\t *  @example\n\t\t * //start the transport in one second starting at beginning of the 5th measure.\n\t\t * Tone.Transport.start(\"+1\", \"4:0:0\");\n\t\t */\n\t    Tone.Transport.prototype.start = function (time, offset) {\n\t        //start the clock\n\t        if (Tone.isDefined(offset)) {\n\t            offset = this.toTicks(offset);\n\t        }\n\t        this._clock.start(time, offset);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Stop the transport and all sources synced to the transport.\n\t\t *  @param  {Time} [time=now] The time when the transport should stop.\n\t\t *  @returns {Tone.Transport} this\n\t\t *  @example\n\t\t * Tone.Transport.stop();\n\t\t */\n\t    Tone.Transport.prototype.stop = function (time) {\n\t        this._clock.stop(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Pause the transport and all sources synced to the transport.\n\t\t *  @param  {Time} [time=now]\n\t\t *  @returns {Tone.Transport} this\n\t\t */\n\t    Tone.Transport.prototype.pause = function (time) {\n\t        this._clock.pause(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Toggle the current state of the transport. If it is\n\t\t * started, it will stop it, otherwise it will start the Transport.\n\t\t * @param  {Time=} time The time of the event\n\t\t * @return {Tone.Transport}      this\n\t\t */\n\t    Tone.Transport.prototype.toggle = function (time) {\n\t        time = this.toSeconds(time);\n\t        if (this._clock.getStateAtTime(time) !== Tone.State.Started) {\n\t            this.start(time);\n\t        } else {\n\t            this.stop(time);\n\t        }\n\t        return this;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    //\tSETTERS/GETTERS\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  The time signature as just the numerator over 4.\n\t\t *  For example 4/4 would be just 4 and 6/8 would be 3.\n\t\t *  @memberOf Tone.Transport#\n\t\t *  @type {Number|Array}\n\t\t *  @name timeSignature\n\t\t *  @example\n\t\t * //common time\n\t\t * Tone.Transport.timeSignature = 4;\n\t\t * // 7/8\n\t\t * Tone.Transport.timeSignature = [7, 8];\n\t\t * //this will be reduced to a single number\n\t\t * Tone.Transport.timeSignature; //returns 3.5\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'timeSignature', {\n\t        get: function () {\n\t            return this._timeSignature;\n\t        },\n\t        set: function (timeSig) {\n\t            if (Tone.isArray(timeSig)) {\n\t                timeSig = timeSig[0] / timeSig[1] * 4;\n\t            }\n\t            this._timeSignature = timeSig;\n\t        }\n\t    });\n\t    /**\n\t\t * When the Tone.Transport.loop = true, this is the starting position of the loop.\n\t\t * @memberOf Tone.Transport#\n\t\t * @type {Time}\n\t\t * @name loopStart\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'loopStart', {\n\t        get: function () {\n\t            return Tone.Ticks(this._loopStart).toSeconds();\n\t        },\n\t        set: function (startPosition) {\n\t            this._loopStart = this.toTicks(startPosition);\n\t        }\n\t    });\n\t    /**\n\t\t * When the Tone.Transport.loop = true, this is the ending position of the loop.\n\t\t * @memberOf Tone.Transport#\n\t\t * @type {Time}\n\t\t * @name loopEnd\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'loopEnd', {\n\t        get: function () {\n\t            return Tone.Ticks(this._loopEnd).toSeconds();\n\t        },\n\t        set: function (endPosition) {\n\t            this._loopEnd = this.toTicks(endPosition);\n\t        }\n\t    });\n\t    /**\n\t\t *  Set the loop start and stop at the same time.\n\t\t *  @param {TransportTime} startPosition\n\t\t *  @param {TransportTime} endPosition\n\t\t *  @returns {Tone.Transport} this\n\t\t *  @example\n\t\t * //loop over the first measure\n\t\t * Tone.Transport.setLoopPoints(0, \"1m\");\n\t\t * Tone.Transport.loop = true;\n\t\t */\n\t    Tone.Transport.prototype.setLoopPoints = function (startPosition, endPosition) {\n\t        this.loopStart = startPosition;\n\t        this.loopEnd = endPosition;\n\t        return this;\n\t    };\n\t    /**\n\t\t *  The swing value. Between 0-1 where 1 equal to\n\t\t *  the note + half the subdivision.\n\t\t *  @memberOf Tone.Transport#\n\t\t *  @type {NormalRange}\n\t\t *  @name swing\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'swing', {\n\t        get: function () {\n\t            return this._swingAmount;\n\t        },\n\t        set: function (amount) {\n\t            //scale the values to a normal range\n\t            this._swingAmount = amount;\n\t        }\n\t    });\n\t    /**\n\t\t *  Set the subdivision which the swing will be applied to.\n\t\t *  The default value is an 8th note. Value must be less\n\t\t *  than a quarter note.\n\t\t *\n\t\t *  @memberOf Tone.Transport#\n\t\t *  @type {Time}\n\t\t *  @name swingSubdivision\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'swingSubdivision', {\n\t        get: function () {\n\t            return Tone.Ticks(this._swingTicks).toNotation();\n\t        },\n\t        set: function (subdivision) {\n\t            this._swingTicks = this.toTicks(subdivision);\n\t        }\n\t    });\n\t    /**\n\t\t *  The Transport's position in Bars:Beats:Sixteenths.\n\t\t *  Setting the value will jump to that position right away.\n\t\t *  @memberOf Tone.Transport#\n\t\t *  @type {BarsBeatsSixteenths}\n\t\t *  @name position\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'position', {\n\t        get: function () {\n\t            var now = this.now();\n\t            var ticks = this._clock.getTicksAtTime(now);\n\t            return Tone.Ticks(ticks).toBarsBeatsSixteenths();\n\t        },\n\t        set: function (progress) {\n\t            var ticks = this.toTicks(progress);\n\t            this.ticks = ticks;\n\t        }\n\t    });\n\t    /**\n\t\t *  The Transport's position in seconds\n\t\t *  Setting the value will jump to that position right away.\n\t\t *  @memberOf Tone.Transport#\n\t\t *  @type {Seconds}\n\t\t *  @name seconds\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'seconds', {\n\t        get: function () {\n\t            return this._clock.seconds;\n\t        },\n\t        set: function (s) {\n\t            var now = this.now();\n\t            var ticks = this.bpm.timeToTicks(s, now);\n\t            this.ticks = ticks;\n\t        }\n\t    });\n\t    /**\n\t\t *  The Transport's loop position as a normalized value. Always\n\t\t *  returns 0 if the transport if loop is not true.\n\t\t *  @memberOf Tone.Transport#\n\t\t *  @name progress\n\t\t *  @type {NormalRange}\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'progress', {\n\t        get: function () {\n\t            if (this.loop) {\n\t                var now = this.now();\n\t                var ticks = this._clock.getTicksAtTime(now);\n\t                return (ticks - this._loopStart) / (this._loopEnd - this._loopStart);\n\t            } else {\n\t                return 0;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  The transports current tick position.\n\t\t *\n\t\t *  @memberOf Tone.Transport#\n\t\t *  @type {Ticks}\n\t\t *  @name ticks\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'ticks', {\n\t        get: function () {\n\t            return this._clock.ticks;\n\t        },\n\t        set: function (t) {\n\t            if (this._clock.ticks !== t) {\n\t                var now = this.now();\n\t                //stop everything synced to the transport\n\t                if (this.state === Tone.State.Started) {\n\t                    this.emit('stop', now);\n\t                    this._clock.setTicksAtTime(t, now);\n\t                    //restart it with the new time\n\t                    this.emit('start', now, this.seconds);\n\t                } else {\n\t                    this._clock.setTicksAtTime(t, now);\n\t                }\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * Get the clock's ticks at the given time.\n\t\t * @param  {Time} time  When to get the tick value\n\t\t * @return {Ticks}       The tick value at the given time.\n\t\t */\n\t    Tone.Transport.prototype.getTicksAtTime = function (time) {\n\t        return Math.round(this._clock.getTicksAtTime(time));\n\t    };\n\t    /**\n\t\t *  Return the elapsed seconds at the given time.\n\t\t *  @param  {Time}  time  When to get the elapsed seconds\n\t\t *  @return  {Seconds}  The number of elapsed seconds\n\t\t */\n\t    Tone.Transport.prototype.getSecondsAtTime = function (time) {\n\t        return this._clock.getSecondsAtTime(time);\n\t    };\n\t    /**\n\t\t *  Pulses Per Quarter note. This is the smallest resolution\n\t\t *  the Transport timing supports. This should be set once\n\t\t *  on initialization and not set again. Changing this value\n\t\t *  after other objects have been created can cause problems.\n\t\t *\n\t\t *  @memberOf Tone.Transport#\n\t\t *  @type {Number}\n\t\t *  @name PPQ\n\t\t */\n\t    Object.defineProperty(Tone.Transport.prototype, 'PPQ', {\n\t        get: function () {\n\t            return this._ppq;\n\t        },\n\t        set: function (ppq) {\n\t            var bpm = this.bpm.value;\n\t            this._ppq = ppq;\n\t            this.bpm.value = bpm;\n\t        }\n\t    });\n\t    /**\n\t\t *  Convert from BPM to frequency (factoring in PPQ)\n\t\t *  @param  {BPM}  bpm The BPM value to convert to frequency\n\t\t *  @return  {Frequency}  The BPM as a frequency with PPQ factored in.\n\t\t *  @private\n\t\t */\n\t    Tone.Transport.prototype._fromUnits = function (bpm) {\n\t        return 1 / (60 / bpm / this.PPQ);\n\t    };\n\t    /**\n\t\t *  Convert from frequency (with PPQ) into BPM\n\t\t *  @param  {Frequency}  freq The clocks frequency to convert to BPM\n\t\t *  @return  {BPM}  The frequency value as BPM.\n\t\t *  @private\n\t\t */\n\t    Tone.Transport.prototype._toUnits = function (freq) {\n\t        return freq / this.PPQ * 60;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    //\tSYNCING\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Returns the time aligned to the next subdivision\n\t\t *  of the Transport. If the Transport is not started,\n\t\t *  it will return 0.\n\t\t *  Note: this will not work precisely during tempo ramps.\n\t\t *  @param  {Time}  subdivision  The subdivision to quantize to\n\t\t *  @return  {Number}  The context time of the next subdivision.\n\t\t *  @example\n\t\t * Tone.Transport.start(); //the transport must be started\n\t\t * Tone.Transport.nextSubdivision(\"4n\");\n\t\t */\n\t    Tone.Transport.prototype.nextSubdivision = function (subdivision) {\n\t        subdivision = this.toTicks(subdivision);\n\t        if (this.state !== Tone.State.Started) {\n\t            //if the transport's not started, return 0\n\t            return 0;\n\t        } else {\n\t            var now = this.now();\n\t            //the remainder of the current ticks and the subdivision\n\t            var transportPos = this.getTicksAtTime(now);\n\t            var remainingTicks = subdivision - transportPos % subdivision;\n\t            return this._clock.nextTickTime(remainingTicks, now);\n\t        }\n\t    };\n\t    /**\n\t\t *  Attaches the signal to the tempo control signal so that\n\t\t *  any changes in the tempo will change the signal in the same\n\t\t *  ratio.\n\t\t *\n\t\t *  @param  {Tone.Signal} signal\n\t\t *  @param {number=} ratio Optionally pass in the ratio between\n\t\t *                         the two signals. Otherwise it will be computed\n\t\t *                         based on their current values.\n\t\t *  @returns {Tone.Transport} this\n\t\t */\n\t    Tone.Transport.prototype.syncSignal = function (signal, ratio) {\n\t        if (!ratio) {\n\t            //get the sync ratio\n\t            var now = this.now();\n\t            if (signal.getValueAtTime(now) !== 0) {\n\t                ratio = signal.getValueAtTime(now) / this.bpm.getValueAtTime(now);\n\t            } else {\n\t                ratio = 0;\n\t            }\n\t        }\n\t        var ratioSignal = new Tone.Gain(ratio);\n\t        this.bpm.chain(ratioSignal, signal._param);\n\t        this._syncedSignals.push({\n\t            'ratio': ratioSignal,\n\t            'signal': signal,\n\t            'initial': signal.value\n\t        });\n\t        signal.value = 0;\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Unsyncs a previously synced signal from the transport's control.\n\t\t *  See Tone.Transport.syncSignal.\n\t\t *  @param  {Tone.Signal} signal\n\t\t *  @returns {Tone.Transport} this\n\t\t */\n\t    Tone.Transport.prototype.unsyncSignal = function (signal) {\n\t        for (var i = this._syncedSignals.length - 1; i >= 0; i--) {\n\t            var syncedSignal = this._syncedSignals[i];\n\t            if (syncedSignal.signal === signal) {\n\t                syncedSignal.ratio.dispose();\n\t                syncedSignal.signal.value = syncedSignal.initial;\n\t                this._syncedSignals.splice(i, 1);\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Transport} this\n\t\t *  @private\n\t\t */\n\t    Tone.Transport.prototype.dispose = function () {\n\t        Tone.Emitter.prototype.dispose.call(this);\n\t        this._clock.dispose();\n\t        this._clock = null;\n\t        this._writable('bpm');\n\t        this.bpm = null;\n\t        this._timeline.dispose();\n\t        this._timeline = null;\n\t        this._repeatedEvents.dispose();\n\t        this._repeatedEvents = null;\n\t        return this;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    //\tINITIALIZATION\n\t    ///////////////////////////////////////////////////////////////////////////////\n\t    var TransportConstructor = Tone.Transport;\n\t    Tone.Transport = new TransportConstructor();\n\t    Tone.Context.on('init', function (context) {\n\t        if (context.Transport instanceof TransportConstructor) {\n\t            Tone.Transport = context.Transport;\n\t        } else {\n\t            Tone.Transport = new TransportConstructor();\n\t        }\n\t        //store the Transport on the context so it can be retrieved later\n\t        context.Transport = Tone.Transport;\n\t    });\n\t    Tone.Context.on('close', function (context) {\n\t        if (context.Transport instanceof TransportConstructor) {\n\t            context.Transport.dispose();\n\t        }\n\t    });\n\t    return Tone.Transport;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Volume is a simple volume node, useful for creating a volume fader.\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t *  @param {Decibels} [volume=0] the initial volume\n\t\t *  @example\n\t\t * var vol = new Tone.Volume(-12);\n\t\t * instrument.chain(vol, Tone.Master);\n\t\t */\n\t    Tone.Volume = function () {\n\t        var options = Tone.defaults(arguments, ['volume'], Tone.Volume);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t * the output node\n\t\t\t * @type {GainNode}\n\t\t\t * @private\n\t\t\t */\n\t        this.output = this.input = new Tone.Gain(options.volume, Tone.Type.Decibels);\n\t        /**\n\t\t\t * The unmuted volume\n\t\t\t * @type {Decibels}\n\t\t\t * @private\n\t\t\t */\n\t        this._unmutedVolume = options.volume;\n\t        /**\n\t\t\t *  The volume control in decibels.\n\t\t\t *  @type {Decibels}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.volume = this.output.gain;\n\t        this._readOnly('volume');\n\t        //set the mute initially\n\t        this.mute = options.mute;\n\t    };\n\t    Tone.extend(Tone.Volume, Tone.AudioNode);\n\t    /**\n\t\t *  Defaults\n\t\t *  @type  {Object}\n\t\t *  @const\n\t\t *  @static\n\t\t */\n\t    Tone.Volume.defaults = {\n\t        'volume': 0,\n\t        'mute': false\n\t    };\n\t    /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.Volume#\n\t\t * @type {boolean}\n\t\t * @name mute\n\t\t * @example\n\t\t * //mute the output\n\t\t * volume.mute = true;\n\t\t */\n\t    Object.defineProperty(Tone.Volume.prototype, 'mute', {\n\t        get: function () {\n\t            return this.volume.value === -Infinity;\n\t        },\n\t        set: function (mute) {\n\t            if (!this.mute && mute) {\n\t                this._unmutedVolume = this.volume.value;\n\t                //maybe it should ramp here?\n\t                this.volume.value = -Infinity;\n\t            } else if (this.mute && !mute) {\n\t                this.volume.value = this._unmutedVolume;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Volume} this\n\t\t */\n\t    Tone.Volume.prototype.dispose = function () {\n\t        this.input.dispose();\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable('volume');\n\t        this.volume.dispose();\n\t        this.volume = null;\n\t        return this;\n\t    };\n\t    return Tone.Volume;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  A single master output which is connected to the\n\t\t *          AudioDestinationNode (aka your speakers).\n\t\t *          It provides useful conveniences such as the ability\n\t\t *          to set the volume and mute the entire application.\n\t\t *          It also gives you the ability to apply master effects to your application.\n\t\t *          <br><br>\n\t\t *          Like Tone.Transport, A single Tone.Master is created\n\t\t *          on initialization and you do not need to explicitly construct one.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone}\n\t\t *  @singleton\n\t\t *  @example\n\t\t * //the audio will go from the oscillator to the speakers\n\t\t * oscillator.connect(Tone.Master);\n\t\t * //a convenience for connecting to the master output is also provided:\n\t\t * oscillator.toMaster();\n\t\t * //the above two examples are equivalent.\n\t\t */\n\t    Tone.Master = function () {\n\t        Tone.AudioNode.call(this);\n\t        Tone.getContext(function () {\n\t            this.createInsOuts(1, 0);\n\t            /**\n\t\t\t\t *  The private volume node\n\t\t\t\t *  @type  {Tone.Volume}\n\t\t\t\t *  @private\n\t\t\t\t */\n\t            this._volume = this.output = new Tone.Volume();\n\t            /**\n\t\t\t\t * The volume of the master output.\n\t\t\t\t * @type {Decibels}\n\t\t\t\t * @signal\n\t\t\t\t */\n\t            this.volume = this._volume.volume;\n\t            this._readOnly('volume');\n\t            //connections\n\t            this.input.chain(this.output, this.context.destination);\n\t        }.bind(this));\n\t    };\n\t    Tone.extend(Tone.Master, Tone.AudioNode);\n\t    /**\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.Master.defaults = {\n\t        'volume': 0,\n\t        'mute': false\n\t    };\n\t    /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.Master#\n\t\t * @type {boolean}\n\t\t * @name mute\n\t\t * @example\n\t\t * //mute the output\n\t\t * Tone.Master.mute = true;\n\t\t */\n\t    Object.defineProperty(Tone.Master.prototype, 'mute', {\n\t        get: function () {\n\t            return this._volume.mute;\n\t        },\n\t        set: function (mute) {\n\t            this._volume.mute = mute;\n\t        }\n\t    });\n\t    /**\n\t\t *  Add a master effects chain. NOTE: this will disconnect any nodes which were previously\n\t\t *  chained in the master effects chain.\n\t\t *  @param {AudioNode|Tone} args... All arguments will be connected in a row\n\t\t *                                  and the Master will be routed through it.\n\t\t *  @return  {Tone.Master}  this\n\t\t *  @example\n\t\t * //some overall compression to keep the levels in check\n\t\t * var masterCompressor = new Tone.Compressor({\n\t\t * \t\"threshold\" : -6,\n\t\t * \t\"ratio\" : 3,\n\t\t * \t\"attack\" : 0.5,\n\t\t * \t\"release\" : 0.1\n\t\t * });\n\t\t * //give a little boost to the lows\n\t\t * var lowBump = new Tone.Filter(200, \"lowshelf\");\n\t\t * //route everything through the filter\n\t\t * //and compressor before going to the speakers\n\t\t * Tone.Master.chain(lowBump, masterCompressor);\n\t\t */\n\t    Tone.Master.prototype.chain = function () {\n\t        this.input.disconnect();\n\t        this.input.chain.apply(this.input, arguments);\n\t        arguments[arguments.length - 1].connect(this.output);\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.Master}  this\n\t\t */\n\t    Tone.Master.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable('volume');\n\t        this._volume.dispose();\n\t        this._volume = null;\n\t        this.volume = null;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //\tAUGMENT TONE's PROTOTYPE\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    /**\n\t\t *  Connect 'this' to the master output. Shorthand for this.connect(Tone.Master)\n\t\t *  @returns {Tone.AudioNode} this\n\t\t *  @example\n\t\t * //connect an oscillator to the master output\n\t\t * var osc = new Tone.Oscillator().toMaster();\n\t\t */\n\t    Tone.AudioNode.prototype.toMaster = function () {\n\t        this.connect(Tone.Master);\n\t        return this;\n\t    };\n\t    if (window.AudioNode) {\n\t        // Also augment AudioNode's prototype to include toMaster as a convenience\n\t        AudioNode.prototype.toMaster = function () {\n\t            this.connect(Tone.Master);\n\t            return this;\n\t        };\n\t    }\n\t    /**\n\t\t *  initialize the module and listen for new audio contexts\n\t\t */\n\t    var MasterConstructor = Tone.Master;\n\t    Tone.Master = new MasterConstructor();\n\t    Tone.Context.on('init', function (context) {\n\t        // if it already exists, just restore it\n\t        if (context.Master instanceof MasterConstructor) {\n\t            Tone.Master = context.Master;\n\t        } else {\n\t            Tone.Master = new MasterConstructor();\n\t        }\n\t        context.Master = Tone.Master;\n\t    });\n\t    Tone.Context.on('close', function (context) {\n\t        if (context.Master instanceof MasterConstructor) {\n\t            context.Master.dispose();\n\t        }\n\t    });\n\t    return Tone.Master;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Base class for sources. Sources have start/stop methods\n\t\t *          and the ability to be synced to the\n\t\t *          start/stop of Tone.Transport.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @example\n\t\t * //Multiple state change events can be chained together,\n\t\t * //but must be set in the correct order and with ascending times\n\t\t *\n\t\t * // OK\n\t\t * state.start().stop(\"+0.2\");\n\t\t * // AND\n\t\t * state.start().stop(\"+0.2\").start(\"+0.4\").stop(\"+0.7\")\n\t\t *\n\t\t * // BAD\n\t\t * state.stop(\"+0.2\").start();\n\t\t * // OR\n\t\t * state.start(\"+0.3\").stop(\"+0.2\");\n\t\t *\n\t\t */\n\t    Tone.Source = function (options) {\n\t        options = Tone.defaultArg(options, Tone.Source.defaults);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The output volume node\n\t\t\t *  @type  {Tone.Volume}\n\t\t\t *  @private\n\t\t\t */\n\t        this._volume = this.output = new Tone.Volume(options.volume);\n\t        /**\n\t\t\t * The volume of the output in decibels.\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * source.volume.value = -6;\n\t\t\t */\n\t        this.volume = this._volume.volume;\n\t        this._readOnly('volume');\n\t        /**\n\t\t\t * \tKeep track of the scheduled state.\n\t\t\t *  @type {Tone.TimelineState}\n\t\t\t *  @private\n\t\t\t */\n\t        this._state = new Tone.TimelineState(Tone.State.Stopped);\n\t        this._state.memory = 100;\n\t        /**\n\t\t\t *  The synced `start` callback function from the transport\n\t\t\t *  @type {Function}\n\t\t\t *  @private\n\t\t\t */\n\t        this._synced = false;\n\t        /**\n\t\t\t *  Keep track of all of the scheduled event ids\n\t\t\t *  @type  {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._scheduled = [];\n\t        //make the output explicitly stereo\n\t        this._volume.output.output.channelCount = 2;\n\t        this._volume.output.output.channelCountMode = 'explicit';\n\t        //mute initially\n\t        this.mute = options.mute;\n\t    };\n\t    Tone.extend(Tone.Source, Tone.AudioNode);\n\t    /**\n\t\t *  The default parameters\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Source.defaults = {\n\t        'volume': 0,\n\t        'mute': false\n\t    };\n\t    /**\n\t\t *  Returns the playback state of the source, either \"started\" or \"stopped\".\n\t\t *  @type {Tone.State}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.Source#\n\t\t *  @name state\n\t\t */\n\t    Object.defineProperty(Tone.Source.prototype, 'state', {\n\t        get: function () {\n\t            if (this._synced) {\n\t                if (Tone.Transport.state === Tone.State.Started) {\n\t                    return this._state.getValueAtTime(Tone.Transport.seconds);\n\t                } else {\n\t                    return Tone.State.Stopped;\n\t                }\n\t            } else {\n\t                return this._state.getValueAtTime(this.now());\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.Source#\n\t\t * @type {boolean}\n\t\t * @name mute\n\t\t * @example\n\t\t * //mute the output\n\t\t * source.mute = true;\n\t\t */\n\t    Object.defineProperty(Tone.Source.prototype, 'mute', {\n\t        get: function () {\n\t            return this._volume.mute;\n\t        },\n\t        set: function (mute) {\n\t            this._volume.mute = mute;\n\t        }\n\t    });\n\t    //overwrite these functions\n\t    Tone.Source.prototype._start = Tone.noOp;\n\t    Tone.Source.prototype.restart = Tone.noOp;\n\t    Tone.Source.prototype._stop = Tone.noOp;\n\t    /**\n\t\t *  Start the source at the specified time. If no time is given,\n\t\t *  start the source now.\n\t\t *  @param  {Time} [time=now] When the source should be started.\n\t\t *  @returns {Tone.Source} this\n\t\t *  @example\n\t\t * source.start(\"+0.5\"); //starts the source 0.5 seconds from now\n\t\t */\n\t    Tone.Source.prototype.start = function (time, offset, duration) {\n\t        if (Tone.isUndef(time) && this._synced) {\n\t            time = Tone.Transport.seconds;\n\t        } else {\n\t            time = this.toSeconds(time);\n\t        }\n\t        //if it's started, stop it and restart it\n\t        if (this._state.getValueAtTime(time) === Tone.State.Started) {\n\t            this._state.cancel(time);\n\t            this._state.setStateAtTime(Tone.State.Started, time);\n\t            this.restart(time, offset, duration);\n\t        } else {\n\t            this._state.setStateAtTime(Tone.State.Started, time);\n\t            if (this._synced) {\n\t                // add the offset time to the event\n\t                var event = this._state.get(time);\n\t                event.offset = Tone.defaultArg(offset, 0);\n\t                event.duration = duration;\n\t                var sched = Tone.Transport.schedule(function (t) {\n\t                    this._start(t, offset, duration);\n\t                }.bind(this), time);\n\t                this._scheduled.push(sched);\n\t                //if it's already started\n\t                if (Tone.Transport.state === Tone.State.Started) {\n\t                    this._syncedStart(this.now(), Tone.Transport.seconds);\n\t                }\n\t            } else {\n\t                this._start.apply(this, arguments);\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Stop the source at the specified time. If no time is given,\n\t\t *  stop the source now.\n\t\t *  @param  {Time} [time=now] When the source should be stopped.\n\t\t *  @returns {Tone.Source} this\n\t\t *  @example\n\t\t * source.stop(); // stops the source immediately\n\t\t */\n\t    Tone.Source.prototype.stop = function (time) {\n\t        if (Tone.isUndef(time) && this._synced) {\n\t            time = Tone.Transport.seconds;\n\t        } else {\n\t            time = this.toSeconds(time);\n\t        }\n\t        if (!this._synced) {\n\t            this._stop.apply(this, arguments);\n\t        } else {\n\t            var sched = Tone.Transport.schedule(this._stop.bind(this), time);\n\t            this._scheduled.push(sched);\n\t        }\n\t        this._state.cancel(time);\n\t        this._state.setStateAtTime(Tone.State.Stopped, time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Sync the source to the Transport so that all subsequent\n\t\t *  calls to `start` and `stop` are synced to the TransportTime\n\t\t *  instead of the AudioContext time.\n\t\t *\n\t\t *  @returns {Tone.Source} this\n\t\t *  @example\n\t\t * //sync the source so that it plays between 0 and 0.3 on the Transport's timeline\n\t\t * source.sync().start(0).stop(0.3);\n\t\t * //start the transport.\n\t\t * Tone.Transport.start();\n\t\t *\n\t\t *  @example\n\t\t * //start the transport with an offset and the sync'ed sources\n\t\t * //will start in the correct position\n\t\t * source.sync().start(0.1);\n\t\t * //the source will be invoked with an offset of 0.4\n\t\t * Tone.Transport.start(\"+0.5\", 0.5);\n\t\t */\n\t    Tone.Source.prototype.sync = function () {\n\t        this._synced = true;\n\t        this._syncedStart = function (time, offset) {\n\t            if (offset > 0) {\n\t                // get the playback state at that time\n\t                var stateEvent = this._state.get(offset);\n\t                // listen for start events which may occur in the middle of the sync'ed time\n\t                if (stateEvent && stateEvent.state === Tone.State.Started && stateEvent.time !== offset) {\n\t                    // get the offset\n\t                    var startOffset = offset - this.toSeconds(stateEvent.time);\n\t                    var duration;\n\t                    if (stateEvent.duration) {\n\t                        duration = this.toSeconds(stateEvent.duration) - startOffset;\n\t                    }\n\t                    this._start(time, this.toSeconds(stateEvent.offset) + startOffset, duration);\n\t                }\n\t            }\n\t        }.bind(this);\n\t        this._syncedStop = function (time) {\n\t            var seconds = Tone.Transport.getSecondsAtTime(Math.max(time - this.sampleTime, 0));\n\t            if (this._state.getValueAtTime(seconds) === Tone.State.Started) {\n\t                this._stop(time);\n\t            }\n\t        }.bind(this);\n\t        Tone.Transport.on('start loopStart', this._syncedStart);\n\t        Tone.Transport.on('stop pause loopEnd', this._syncedStop);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Unsync the source to the Transport. See Tone.Source.sync\n\t\t *  @returns {Tone.Source} this\n\t\t */\n\t    Tone.Source.prototype.unsync = function () {\n\t        if (this._synced) {\n\t            Tone.Transport.off('stop pause loopEnd', this._syncedStop);\n\t            Tone.Transport.off('start loopStart', this._syncedStart);\n\t        }\n\t        this._synced = false;\n\t        // clear all of the scheduled ids\n\t        for (var i = 0; i < this._scheduled.length; i++) {\n\t            var id = this._scheduled[i];\n\t            Tone.Transport.clear(id);\n\t        }\n\t        this._scheduled = [];\n\t        this._state.cancel(0);\n\t        return this;\n\t    };\n\t    /**\n\t\t *\tClean up.\n\t\t *  @return {Tone.Source} this\n\t\t */\n\t    Tone.Source.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this.unsync();\n\t        this._scheduled = null;\n\t        this._writable('volume');\n\t        this._volume.dispose();\n\t        this._volume = null;\n\t        this.volume = null;\n\t        this._state.dispose();\n\t        this._state = null;\n\t    };\n\t    return Tone.Source;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  AudioBuffer.copyTo/FromChannel polyfill\n\t\t *  @private\n\t\t */\n\t    if (Tone.supported) {\n\t        if (!AudioBuffer.prototype.copyToChannel) {\n\t            AudioBuffer.prototype.copyToChannel = function (src, chanNum, start) {\n\t                var channel = this.getChannelData(chanNum);\n\t                start = start || 0;\n\t                for (var i = 0; i < channel.length; i++) {\n\t                    channel[i + start] = src[i];\n\t                }\n\t            };\n\t            AudioBuffer.prototype.copyFromChannel = function (dest, chanNum, start) {\n\t                var channel = this.getChannelData(chanNum);\n\t                start = start || 0;\n\t                for (var i = 0; i < dest.length; i++) {\n\t                    dest[i] = channel[i + start];\n\t                }\n\t            };\n\t        }\n\t    }\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Buffer loading and storage. Tone.Buffer is used internally by all\n\t\t *          classes that make requests for audio files such as Tone.Player,\n\t\t *          Tone.Sampler and Tone.Convolver.\n\t\t *\n\t\t *          Aside from load callbacks from individual buffers, Tone.Buffer\n\t\t *  \t\tprovides events which keep track of the loading progress\n\t\t *  \t\tof _all_ of the buffers. These are Tone.Buffer.on(\"load\" / \"progress\" / \"error\")\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone}\n\t\t *  @param {AudioBuffer|String} url The url to load, or the audio buffer to set.\n\t\t *  @param {Function=} onload A callback which is invoked after the buffer is loaded.\n\t\t *                            It's recommended to use `Tone.Buffer.on('load', callback)` instead\n\t\t *                            since it will give you a callback when _all_ buffers are loaded.\n\t\t *  @param {Function=} onerror The callback to invoke if there is an error\n\t\t *  @example\n\t\t * var buffer = new Tone.Buffer(\"path/to/sound.mp3\", function(){\n\t\t * \t//the buffer is now available.\n\t\t * \tvar buff = buffer.get();\n\t\t * });\n\t\t *  @example\n\t\t * //can load provide fallback extension types if the first type is not supported.\n\t\t * var buffer = new Tone.Buffer(\"path/to/sound.[mp3|ogg|wav]\");\n\t\t */\n\t    Tone.Buffer = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'url',\n\t            'onload',\n\t            'onerror'\n\t        ], Tone.Buffer);\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  stores the loaded AudioBuffer\n\t\t\t *  @type {AudioBuffer}\n\t\t\t *  @private\n\t\t\t */\n\t        this._buffer = null;\n\t        /**\n\t\t\t *  indicates if the buffer should be reversed or not\n\t\t\t *  @type {Boolean}\n\t\t\t *  @private\n\t\t\t */\n\t        this._reversed = options.reverse;\n\t        /**\n\t\t\t *  The XHR\n\t\t\t *  @type  {XMLHttpRequest}\n\t\t\t *  @private\n\t\t\t */\n\t        this._xhr = null;\n\t        /**\n\t\t\t * Private callback when the buffer is loaded.\n\t\t\t * @type {Function}\n\t\t\t * @private\n\t\t\t */\n\t        this._onload = Tone.noOp;\n\t        if (options.url instanceof AudioBuffer || options.url instanceof Tone.Buffer) {\n\t            this.set(options.url);\n\t            // invoke the onload callback\n\t            if (options.onload) {\n\t                if (this.loaded) {\n\t                    options.onload(this);\n\t                } else {\n\t                    this._onload = options.onload;\n\t                }\n\t            }\n\t        } else if (Tone.isString(options.url)) {\n\t            this.load(options.url).then(options.onload).catch(options.onerror);\n\t        }\n\t    };\n\t    Tone.extend(Tone.Buffer);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Buffer.defaults = {\n\t        'url': undefined,\n\t        'reverse': false,\n\t        'onload': Tone.noOp,\n\t        'onerror': Tone.noOp\n\t    };\n\t    /**\n\t\t *  Pass in an AudioBuffer or Tone.Buffer to set the value\n\t\t *  of this buffer.\n\t\t *  @param {AudioBuffer|Tone.Buffer} buffer the buffer\n\t\t *  @returns {Tone.Buffer} this\n\t\t */\n\t    Tone.Buffer.prototype.set = function (buffer) {\n\t        if (buffer instanceof Tone.Buffer) {\n\t            if (buffer.loaded) {\n\t                this._buffer = buffer.get();\n\t            } else {\n\t                buffer._onload = function () {\n\t                    this.set(buffer);\n\t                    this._onload(this);\n\t                }.bind(this);\n\t            }\n\t        } else {\n\t            this._buffer = buffer;\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  @return {AudioBuffer} The audio buffer stored in the object.\n\t\t */\n\t    Tone.Buffer.prototype.get = function () {\n\t        return this._buffer;\n\t    };\n\t    /**\n\t\t *  Makes an xhr reqest for the selected url then decodes\n\t\t *  the file as an audio buffer. Invokes\n\t\t *  the callback once the audio buffer loads.\n\t\t *  @param {String} url The url of the buffer to load.\n\t\t *                      filetype support depends on the\n\t\t *                      browser.\n\t\t *  @returns {Promise} returns a Promise which resolves with the Tone.Buffer\n\t\t */\n\t    Tone.Buffer.prototype.load = function (url, onload, onerror) {\n\t        var promise = new Promise(function (load, error) {\n\t            this._xhr = Tone.Buffer.load(url, //success\n\t            function (buff) {\n\t                this._xhr = null;\n\t                this.set(buff);\n\t                load(this);\n\t                this._onload(this);\n\t                if (onload) {\n\t                    onload(this);\n\t                }\n\t            }.bind(this), //error\n\t            function (err) {\n\t                this._xhr = null;\n\t                error(err);\n\t                if (onerror) {\n\t                    onerror(err);\n\t                }\n\t            }.bind(this));\n\t        }.bind(this));\n\t        return promise;\n\t    };\n\t    /**\n\t\t *  dispose and disconnect\n\t\t *  @returns {Tone.Buffer} this\n\t\t */\n\t    Tone.Buffer.prototype.dispose = function () {\n\t        Tone.prototype.dispose.call(this);\n\t        this._buffer = null;\n\t        if (this._xhr) {\n\t            Tone.Buffer._removeFromDownloadQueue(this._xhr);\n\t            this._xhr.abort();\n\t            this._xhr = null;\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * If the buffer is loaded or not\n\t\t * @memberOf Tone.Buffer#\n\t\t * @type {Boolean}\n\t\t * @name loaded\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Buffer.prototype, 'loaded', {\n\t        get: function () {\n\t            return this.length > 0;\n\t        }\n\t    });\n\t    /**\n\t\t * The duration of the buffer.\n\t\t * @memberOf Tone.Buffer#\n\t\t * @type {Number}\n\t\t * @name duration\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Buffer.prototype, 'duration', {\n\t        get: function () {\n\t            if (this._buffer) {\n\t                return this._buffer.duration;\n\t            } else {\n\t                return 0;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The length of the buffer in samples\n\t\t * @memberOf Tone.Buffer#\n\t\t * @type {Number}\n\t\t * @name length\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Buffer.prototype, 'length', {\n\t        get: function () {\n\t            if (this._buffer) {\n\t                return this._buffer.length;\n\t            } else {\n\t                return 0;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The number of discrete audio channels. Returns 0 if no buffer\n\t\t * is loaded.\n\t\t * @memberOf Tone.Buffer#\n\t\t * @type {Number}\n\t\t * @name numberOfChannels\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Buffer.prototype, 'numberOfChannels', {\n\t        get: function () {\n\t            if (this._buffer) {\n\t                return this._buffer.numberOfChannels;\n\t            } else {\n\t                return 0;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Set the audio buffer from the array. To create a multichannel AudioBuffer,\n\t\t *  pass in a multidimensional array.\n\t\t *  @param {Float32Array} array The array to fill the audio buffer\n\t\t *  @return {Tone.Buffer} this\n\t\t */\n\t    Tone.Buffer.prototype.fromArray = function (array) {\n\t        var isMultidimensional = array[0].length > 0;\n\t        var channels = isMultidimensional ? array.length : 1;\n\t        var len = isMultidimensional ? array[0].length : array.length;\n\t        var buffer = this.context.createBuffer(channels, len, this.context.sampleRate);\n\t        if (!isMultidimensional && channels === 1) {\n\t            array = [array];\n\t        }\n\t        for (var c = 0; c < channels; c++) {\n\t            buffer.copyToChannel(array[c], c);\n\t        }\n\t        this._buffer = buffer;\n\t        return this;\n\t    };\n\t    /**\n\t\t * \tSums muliple channels into 1 channel\n\t\t *  @param {Number=} channel Optionally only copy a single channel from the array.\n\t\t *  @return {Array}\n\t\t */\n\t    Tone.Buffer.prototype.toMono = function (chanNum) {\n\t        if (Tone.isNumber(chanNum)) {\n\t            this.fromArray(this.toArray(chanNum));\n\t        } else {\n\t            var outputArray = new Float32Array(this.length);\n\t            var numChannels = this.numberOfChannels;\n\t            for (var channel = 0; channel < numChannels; channel++) {\n\t                var channelArray = this.toArray(channel);\n\t                for (var i = 0; i < channelArray.length; i++) {\n\t                    outputArray[i] += channelArray[i];\n\t                }\n\t            }\n\t            //divide by the number of channels\n\t            outputArray = outputArray.map(function (sample) {\n\t                return sample / numChannels;\n\t            });\n\t            this.fromArray(outputArray);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * \tGet the buffer as an array. Single channel buffers will return a 1-dimensional\n\t\t * \tFloat32Array, and multichannel buffers will return multidimensional arrays.\n\t\t *  @param {Number=} channel Optionally only copy a single channel from the array.\n\t\t *  @return {Array}\n\t\t */\n\t    Tone.Buffer.prototype.toArray = function (channel) {\n\t        if (Tone.isNumber(channel)) {\n\t            return this.getChannelData(channel);\n\t        } else if (this.numberOfChannels === 1) {\n\t            return this.toArray(0);\n\t        } else {\n\t            var ret = [];\n\t            for (var c = 0; c < this.numberOfChannels; c++) {\n\t                ret[c] = this.getChannelData(c);\n\t            }\n\t            return ret;\n\t        }\n\t    };\n\t    /**\n\t\t *  Returns the Float32Array representing the PCM audio data for the specific channel.\n\t\t *  @param  {Number}  channel  The channel number to return\n\t\t *  @return  {Float32Array}  The audio as a TypedArray\n\t\t */\n\t    Tone.Buffer.prototype.getChannelData = function (channel) {\n\t        return this._buffer.getChannelData(channel);\n\t    };\n\t    /**\n\t\t *  Cut a subsection of the array and return a buffer of the\n\t\t *  subsection. Does not modify the original buffer\n\t\t *  @param {Time} start The time to start the slice\n\t\t *  @param {Time=} end The end time to slice. If none is given\n\t\t *                     will default to the end of the buffer\n\t\t *  @return {Tone.Buffer} this\n\t\t */\n\t    Tone.Buffer.prototype.slice = function (start, end) {\n\t        end = Tone.defaultArg(end, this.duration);\n\t        var startSamples = Math.floor(this.context.sampleRate * this.toSeconds(start));\n\t        var endSamples = Math.floor(this.context.sampleRate * this.toSeconds(end));\n\t        var replacement = [];\n\t        for (var i = 0; i < this.numberOfChannels; i++) {\n\t            replacement[i] = this.toArray(i).slice(startSamples, endSamples);\n\t        }\n\t        var retBuffer = new Tone.Buffer().fromArray(replacement);\n\t        return retBuffer;\n\t    };\n\t    /**\n\t\t *  Reverse the buffer.\n\t\t *  @private\n\t\t *  @return {Tone.Buffer} this\n\t\t */\n\t    Tone.Buffer.prototype._reverse = function () {\n\t        if (this.loaded) {\n\t            for (var i = 0; i < this.numberOfChannels; i++) {\n\t                Array.prototype.reverse.call(this.getChannelData(i));\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * Reverse the buffer.\n\t\t * @memberOf Tone.Buffer#\n\t\t * @type {Boolean}\n\t\t * @name reverse\n\t\t */\n\t    Object.defineProperty(Tone.Buffer.prototype, 'reverse', {\n\t        get: function () {\n\t            return this._reversed;\n\t        },\n\t        set: function (rev) {\n\t            if (this._reversed !== rev) {\n\t                this._reversed = rev;\n\t                this._reverse();\n\t            }\n\t        }\n\t    });\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    // STATIC METHODS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //statically inherits Emitter methods\n\t    Tone.Emitter.mixin(Tone.Buffer);\n\t    /**\n\t\t *  the static queue for all of the xhr requests\n\t\t *  @type {Array}\n\t\t *  @private\n\t\t */\n\t    Tone.Buffer._downloadQueue = [];\n\t    /**\n\t\t *  A path which is prefixed before every url.\n\t\t *  @type  {String}\n\t\t *  @static\n\t\t */\n\t    Tone.Buffer.baseUrl = '';\n\t    /**\n\t\t *  Create a Tone.Buffer from the array. To create a multichannel AudioBuffer,\n\t\t *  pass in a multidimensional array.\n\t\t *  @param {Float32Array} array The array to fill the audio buffer\n\t\t *  @return {Tone.Buffer} A Tone.Buffer created from the array\n\t\t */\n\t    Tone.Buffer.fromArray = function (array) {\n\t        return new Tone.Buffer().fromArray(array);\n\t    };\n\t    /**\n\t\t * Creates a Tone.Buffer from a URL, returns a promise\n\t\t * which resolves to a Tone.Buffer\n\t\t * @param  {String} url The url to load.\n\t\t * @return {Promise<Tone.Buffer>}     A promise which resolves to a Tone.Buffer\n\t\t */\n\t    Tone.Buffer.fromUrl = function (url) {\n\t        var buffer = new Tone.Buffer();\n\t        return buffer.load(url).then(function () {\n\t            return buffer;\n\t        });\n\t    };\n\t    /**\n\t\t * Remove an xhr request from the download queue\n\t\t * @private\n\t\t */\n\t    Tone.Buffer._removeFromDownloadQueue = function (request) {\n\t        var index = Tone.Buffer._downloadQueue.indexOf(request);\n\t        if (index !== -1) {\n\t            Tone.Buffer._downloadQueue.splice(index, 1);\n\t        }\n\t    };\n\t    /**\n\t\t *  Loads a url using XMLHttpRequest.\n\t\t *  @param {String} url\n\t\t *  @param {Function} onload\n\t\t *  @param {Function} onerror\n\t\t *  @param {Function} onprogress\n\t\t *  @return {XMLHttpRequest}\n\t\t */\n\t    Tone.Buffer.load = function (url, onload, onerror) {\n\t        //default\n\t        onload = Tone.defaultArg(onload, Tone.noOp);\n\t        // test if the url contains multiple extensions\n\t        var matches = url.match(/\\[(.+\\|?)+\\]$/);\n\t        if (matches) {\n\t            var extensions = matches[1].split('|');\n\t            var extension = extensions[0];\n\t            for (var i = 0; i < extensions.length; i++) {\n\t                if (Tone.Buffer.supportsType(extensions[i])) {\n\t                    extension = extensions[i];\n\t                    break;\n\t                }\n\t            }\n\t            url = url.replace(matches[0], extension);\n\t        }\n\t        function onError(e) {\n\t            Tone.Buffer._removeFromDownloadQueue(request);\n\t            Tone.Buffer.emit('error', e);\n\t            if (onerror) {\n\t                onerror(e);\n\t            } else {\n\t                throw e;\n\t            }\n\t        }\n\t        function onProgress() {\n\t            //calculate the progress\n\t            var totalProgress = 0;\n\t            for (var i = 0; i < Tone.Buffer._downloadQueue.length; i++) {\n\t                totalProgress += Tone.Buffer._downloadQueue[i].progress;\n\t            }\n\t            Tone.Buffer.emit('progress', totalProgress / Tone.Buffer._downloadQueue.length);\n\t        }\n\t        var request = new XMLHttpRequest();\n\t        request.open('GET', Tone.Buffer.baseUrl + url, true);\n\t        request.responseType = 'arraybuffer';\n\t        //start out as 0\n\t        request.progress = 0;\n\t        Tone.Buffer._downloadQueue.push(request);\n\t        request.addEventListener('load', function () {\n\t            if (request.status === 200) {\n\t                Tone.context.decodeAudioData(request.response).then(function (buff) {\n\t                    request.progress = 1;\n\t                    onProgress();\n\t                    onload(buff);\n\t                    Tone.Buffer._removeFromDownloadQueue(request);\n\t                    if (Tone.Buffer._downloadQueue.length === 0) {\n\t                        //emit the event at the end\n\t                        Tone.Buffer.emit('load');\n\t                    }\n\t                }).catch(function () {\n\t                    Tone.Buffer._removeFromDownloadQueue(request);\n\t                    onError('Tone.Buffer: could not decode audio data: ' + url);\n\t                });\n\t            } else {\n\t                onError('Tone.Buffer: could not locate file: ' + url);\n\t            }\n\t        });\n\t        request.addEventListener('error', onError);\n\t        request.addEventListener('progress', function (event) {\n\t            if (event.lengthComputable) {\n\t                //only go to 95%, the last 5% is when the audio is decoded\n\t                request.progress = event.loaded / event.total * 0.95;\n\t                onProgress();\n\t            }\n\t        });\n\t        request.send();\n\t        return request;\n\t    };\n\t    /**\n\t\t *  Stop all of the downloads in progress\n\t\t *  @return {Tone.Buffer}\n\t\t *  @static\n\t\t */\n\t    Tone.Buffer.cancelDownloads = function () {\n\t        Tone.Buffer._downloadQueue.slice().forEach(function (request) {\n\t            Tone.Buffer._removeFromDownloadQueue(request);\n\t            request.abort();\n\t        });\n\t        return Tone.Buffer;\n\t    };\n\t    /**\n\t\t *  Checks a url's extension to see if the current browser can play that file type.\n\t\t *  @param {String} url The url/extension to test\n\t\t *  @return {Boolean} If the file extension can be played\n\t\t *  @static\n\t\t *  @example\n\t\t * Tone.Buffer.supportsType(\"wav\"); //returns true\n\t\t * Tone.Buffer.supportsType(\"path/to/file.wav\"); //returns true\n\t\t */\n\t    Tone.Buffer.supportsType = function (url) {\n\t        var extension = url.split('.');\n\t        extension = extension[extension.length - 1];\n\t        var response = document.createElement('audio').canPlayType('audio/' + extension);\n\t        return response !== '';\n\t    };\n\t    /**\n\t\t *  Returns a Promise which resolves when all of the buffers have loaded\n\t\t *  @return {Promise}\n\t\t */\n\t    Tone.loaded = function () {\n\t        var onload, onerror;\n\t        function removeEvents() {\n\t            //remove the events when it's resolved\n\t            Tone.Buffer.off('load', onload);\n\t            Tone.Buffer.off('error', onerror);\n\t        }\n\t        return new Promise(function (success, fail) {\n\t            onload = function () {\n\t                success();\n\t            };\n\t            onerror = function () {\n\t                fail();\n\t            };\n\t            //add the event listeners\n\t            Tone.Buffer.on('load', onload);\n\t            Tone.Buffer.on('error', onerror);\n\t        }).then(removeEvents).catch(function (e) {\n\t            removeEvents();\n\t            throw new Error(e);\n\t        });\n\t    };\n\t    return Tone.Buffer;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Wrapper around the native fire-and-forget OscillatorNode. Adds the\n\t\t *     ability to reschedule the stop method.\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param  {AudioBuffer|Tone.Buffer}  buffer   The buffer to play\n\t\t *  @param  {Function}  onload  The callback to invoke when the\n\t\t *                               buffer is done playing.\n\t\t */\n\t    Tone.OscillatorNode = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'type'\n\t        ], Tone.OscillatorNode);\n\t        Tone.AudioNode.call(this, options);\n\t        /**\n\t\t\t *  The callback to invoke after the\n\t\t\t *  buffer source is done playing.\n\t\t\t *  @type  {Function}\n\t\t\t */\n\t        this.onended = options.onended;\n\t        /**\n\t\t\t *  The oscillator start time\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._startTime = -1;\n\t        /**\n\t\t\t *  The oscillator stop time\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._stopTime = -1;\n\t        /**\n\t\t\t *  The gain node which envelopes the OscillatorNode\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._gainNode = this.output = new Tone.Gain();\n\t        this._gainNode.gain.setValueAtTime(0, this.context.currentTime);\n\t        /**\n\t\t\t *  The oscillator\n\t\t\t *  @type  {OscillatorNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._oscillator = this.context.createOscillator();\n\t        this._oscillator.connect(this._gainNode);\n\t        this.type = options.type;\n\t        /**\n\t\t\t *  The frequency of the oscillator\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Param(this._oscillator.frequency, Tone.Type.Frequency);\n\t        this.frequency.value = options.frequency;\n\t        /**\n\t\t\t *  The detune of the oscillator\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = new Tone.Param(this._oscillator.detune, Tone.Type.Cents);\n\t        this.detune.value = options.detune;\n\t        /**\n\t\t\t *  The value that the buffer ramps to\n\t\t\t *  @type {Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._gain = 1;\n\t    };\n\t    Tone.extend(Tone.OscillatorNode, Tone.AudioNode);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.OscillatorNode.defaults = {\n\t        'frequency': 440,\n\t        'detune': 0,\n\t        'type': 'sine',\n\t        'onended': Tone.noOp\n\t    };\n\t    /**\n\t\t *  Returns the playback state of the oscillator, either \"started\" or \"stopped\".\n\t\t *  @type {Tone.State}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.OscillatorNode#\n\t\t *  @name state\n\t\t */\n\t    Object.defineProperty(Tone.OscillatorNode.prototype, 'state', {\n\t        get: function () {\n\t            return this.getStateAtTime(this.now());\n\t        }\n\t    });\n\t    /**\n\t\t *  Get the playback state at the given time\n\t\t *  @param  {Time}  time  The time to test the state at\n\t\t *  @return  {Tone.State}  The playback state. \n\t\t */\n\t    Tone.OscillatorNode.prototype.getStateAtTime = function (time) {\n\t        time = this.toSeconds(time);\n\t        if (this._startTime !== -1 && time >= this._startTime && (this._stopTime === -1 || time <= this._stopTime)) {\n\t            return Tone.State.Started;\n\t        } else {\n\t            return Tone.State.Stopped;\n\t        }\n\t    };\n\t    /**\n\t     * Start the oscillator node at the given time\n\t     * @param  {Time=} time When to start the oscillator\n\t     * @return {OscillatorNode}      this\n\t     */\n\t    Tone.OscillatorNode.prototype.start = function (time) {\n\t        if (this._startTime === -1) {\n\t            this._startTime = this.toSeconds(time);\n\t            this._oscillator.start(this._startTime);\n\t            var now = this.context.currentTime;\n\t            this._gainNode.gain.cancelScheduledValues(now);\n\t            this._gainNode.gain.setValueAtTime(0, now);\n\t            this._gainNode.gain.setValueAtTime(1, this._startTime);\n\t        } else {\n\t            throw new Error('cannot call OscillatorNode.start more than once');\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t     * Sets an arbitrary custom periodic waveform given a PeriodicWave.\n\t     * @param  {PeriodicWave} periodicWave PeriodicWave should be created with context.createPeriodicWave\n\t     * @return {OscillatorNode} this\n\t     */\n\t    Tone.OscillatorNode.prototype.setPeriodicWave = function (periodicWave) {\n\t        this._oscillator.setPeriodicWave(periodicWave);\n\t        return this;\n\t    };\n\t    /**\n\t     * Stop the oscillator node at the given time\n\t     * @param  {Time=} time When to stop the oscillator\n\t     * @return {OscillatorNode}      this\n\t     */\n\t    Tone.OscillatorNode.prototype.stop = function (time) {\n\t        //cancel the previous stop\n\t        this.cancelStop();\n\t        //reschedule it\n\t        this._stopTime = this.toSeconds(time);\n\t        this._gainNode.gain.setValueAtTime(0, this._stopTime);\n\t        this.context.clearTimeout(this._timeout);\n\t        this._timeout = this.context.setTimeout(function () {\n\t            this._oscillator.stop(this.now());\n\t            this.onended();\n\t        }.bind(this), this._stopTime - this.now());\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancel a scheduled stop event\n\t\t *  @return  {Tone.OscillatorNode}  this\n\t\t */\n\t    Tone.OscillatorNode.prototype.cancelStop = function () {\n\t        if (this._startTime !== -1) {\n\t            //cancel the stop envelope\n\t            this._gainNode.gain.cancelScheduledValues(this._startTime + this.sampleTime);\n\t            this._gainNode.gain.setValueAtTime(1, Math.max(this.now(), this._startTime));\n\t            this.context.clearTimeout(this._timeout);\n\t            this._stopTime = -1;\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * The oscillator type. Either 'sine', 'sawtooth', 'square', or 'triangle'\n\t\t * @memberOf Tone.OscillatorNode#\n\t\t * @type {Time}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.OscillatorNode.prototype, 'type', {\n\t        get: function () {\n\t            return this._oscillator.type;\n\t        },\n\t        set: function (type) {\n\t            this._oscillator.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.OscillatorNode}  this\n\t\t */\n\t    Tone.OscillatorNode.prototype.dispose = function () {\n\t        this.context.clearTimeout(this._timeout);\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this.onended = null;\n\t        this._oscillator.disconnect();\n\t        this._oscillator = null;\n\t        this._gainNode.dispose();\n\t        this._gainNode = null;\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        this.detune.dispose();\n\t        this.detune = null;\n\t        return this;\n\t    };\n\t    return Tone.OscillatorNode;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Oscillator supports a number of features including\n\t\t *         phase rotation, multiple oscillator types (see Tone.Oscillator.type),\n\t\t *         and Transport syncing (see Tone.Oscillator.syncFrequency).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Source}\n\t\t *  @param {Frequency} [frequency] Starting frequency\n\t\t *  @param {string} [type] The oscillator type. Read more about type below.\n\t\t *  @example\n\t\t * //make and start a 440hz sine tone\n\t\t * var osc = new Tone.Oscillator(440, \"sine\").toMaster().start();\n\t\t */\n\t    Tone.Oscillator = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'type'\n\t        ], Tone.Oscillator);\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  the main oscillator\n\t\t\t *  @type {OscillatorNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._oscillator = null;\n\t        /**\n\t\t\t *  The frequency control.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The detune control signal.\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t        /**\n\t\t\t *  the periodic wave\n\t\t\t *  @type {PeriodicWave}\n\t\t\t *  @private\n\t\t\t */\n\t        this._wave = null;\n\t        /**\n\t\t\t *  The partials of the oscillator\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._partials = Tone.defaultArg(options.partials, [1]);\n\t        /**\n\t\t\t *  the phase of the oscillator\n\t\t\t *  between 0 - 360\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._phase = options.phase;\n\t        /**\n\t\t\t *  the type of the oscillator\n\t\t\t *  @type {string}\n\t\t\t *  @private\n\t\t\t */\n\t        this._type = null;\n\t        //setup\n\t        this.type = options.type;\n\t        this.phase = this._phase;\n\t        this._readOnly([\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.Oscillator, Tone.Source);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Oscillator.defaults = {\n\t        'type': 'sine',\n\t        'frequency': 440,\n\t        'detune': 0,\n\t        'phase': 0,\n\t        'partials': []\n\t    };\n\t    /**\n\t\t *  The Oscillator types\n\t\t *  @enum {String}\n\t\t */\n\t    Tone.Oscillator.Type = {\n\t        Sine: 'sine',\n\t        Triangle: 'triangle',\n\t        Sawtooth: 'sawtooth',\n\t        Square: 'square',\n\t        Custom: 'custom'\n\t    };\n\t    /**\n\t\t *  start the oscillator\n\t\t *  @param  {Time} [time=now]\n\t\t *  @private\n\t\t */\n\t    Tone.Oscillator.prototype._start = function (time) {\n\t        //new oscillator with previous values\n\t        this._oscillator = new Tone.OscillatorNode();\n\t        if (this._wave) {\n\t            this._oscillator.setPeriodicWave(this._wave);\n\t        } else {\n\t            this._oscillator.type = this._type;\n\t        }\n\t        //connect the control signal to the oscillator frequency & detune\n\t        this._oscillator.connect(this.output);\n\t        this.frequency.connect(this._oscillator.frequency);\n\t        this.detune.connect(this._oscillator.detune);\n\t        //start the oscillator\n\t        time = this.toSeconds(time);\n\t        this._oscillator.start(time);\n\t    };\n\t    /**\n\t\t *  stop the oscillator\n\t\t *  @private\n\t\t *  @param  {Time} [time=now] (optional) timing parameter\n\t\t *  @returns {Tone.Oscillator} this\n\t\t */\n\t    Tone.Oscillator.prototype._stop = function (time) {\n\t        if (this._oscillator) {\n\t            time = this.toSeconds(time);\n\t            this._oscillator.stop(time);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * Restart the oscillator. Does not stop the oscillator, but instead\n\t\t * just cancels any scheduled 'stop' from being invoked.\n\t\t * @param  {Time=} time\n\t\t * @return {Tone.Oscillator}      this\n\t\t */\n\t    Tone.Oscillator.prototype.restart = function (time) {\n\t        this._oscillator.cancelStop();\n\t        this._state.cancel(this.toSeconds(time));\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Sync the signal to the Transport's bpm. Any changes to the transports bpm,\n\t\t *  will also affect the oscillators frequency.\n\t\t *  @returns {Tone.Oscillator} this\n\t\t *  @example\n\t\t * Tone.Transport.bpm.value = 120;\n\t\t * osc.frequency.value = 440;\n\t\t * //the ration between the bpm and the frequency will be maintained\n\t\t * osc.syncFrequency();\n\t\t * Tone.Transport.bpm.value = 240;\n\t\t * // the frequency of the oscillator is doubled to 880\n\t\t */\n\t    Tone.Oscillator.prototype.syncFrequency = function () {\n\t        Tone.Transport.syncSignal(this.frequency);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Unsync the oscillator's frequency from the Transport.\n\t\t *  See Tone.Oscillator.syncFrequency\n\t\t *  @returns {Tone.Oscillator} this\n\t\t */\n\t    Tone.Oscillator.prototype.unsyncFrequency = function () {\n\t        Tone.Transport.unsyncSignal(this.frequency);\n\t        return this;\n\t    };\n\t    /**\n\t\t * The type of the oscillator: either sine, square, triangle, or sawtooth. Also capable of\n\t\t * setting the first x number of partials of the oscillator. For example: \"sine4\" would\n\t\t * set be the first 4 partials of the sine wave and \"triangle8\" would set the first\n\t\t * 8 partials of the triangle wave.\n\t\t * <br><br>\n\t\t * Uses PeriodicWave internally even for native types so that it can set the phase.\n\t\t * PeriodicWave equations are from the\n\t\t * [Webkit Web Audio implementation](https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/modules/webaudio/PeriodicWave.cpp&sq=package:chromium).\n\t\t *\n\t\t * @memberOf Tone.Oscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t * @example\n\t\t * //set it to a square wave\n\t\t * osc.type = \"square\";\n\t\t * @example\n\t\t * //set the first 6 partials of a sawtooth wave\n\t\t * osc.type = \"sawtooth6\";\n\t\t */\n\t    Object.defineProperty(Tone.Oscillator.prototype, 'type', {\n\t        get: function () {\n\t            return this._type;\n\t        },\n\t        set: function (type) {\n\t            var isBasicType = [\n\t                Tone.Oscillator.Type.Sine,\n\t                Tone.Oscillator.Type.Square,\n\t                Tone.Oscillator.Type.Triangle,\n\t                Tone.Oscillator.Type.Sawtooth\n\t            ].includes(type);\n\t            if (this._phase === 0 && isBasicType) {\n\t                this._wave = null;\n\t                //just go with the basic approach\n\t                if (this._oscillator !== null) {\n\t                    this._oscillator.type === type;\n\t                }\n\t            } else {\n\t                var coefs = this._getRealImaginary(type, this._phase);\n\t                var periodicWave = this.context.createPeriodicWave(coefs[0], coefs[1]);\n\t                this._wave = periodicWave;\n\t                if (this._oscillator !== null) {\n\t                    this._oscillator.setPeriodicWave(this._wave);\n\t                }\n\t            }\n\t            this._type = type;\n\t        }\n\t    });\n\t    /**\n\t\t *  Returns the real and imaginary components based\n\t\t *  on the oscillator type.\n\t\t *  @returns {Array} [real, imaginary]\n\t\t *  @private\n\t\t */\n\t    Tone.Oscillator.prototype._getRealImaginary = function (type, phase) {\n\t        var fftSize = 4096;\n\t        var periodicWaveSize = fftSize / 2;\n\t        var real = new Float32Array(periodicWaveSize);\n\t        var imag = new Float32Array(periodicWaveSize);\n\t        var partialCount = 1;\n\t        if (type === Tone.Oscillator.Type.Custom) {\n\t            partialCount = this._partials.length + 1;\n\t            periodicWaveSize = partialCount;\n\t        } else {\n\t            var partial = /^(sine|triangle|square|sawtooth)(\\d+)$/.exec(type);\n\t            if (partial) {\n\t                partialCount = parseInt(partial[2]) + 1;\n\t                type = partial[1];\n\t                partialCount = Math.max(partialCount, 2);\n\t                periodicWaveSize = partialCount;\n\t            }\n\t        }\n\t        for (var n = 1; n < periodicWaveSize; ++n) {\n\t            var piFactor = 2 / (n * Math.PI);\n\t            var b;\n\t            switch (type) {\n\t            case Tone.Oscillator.Type.Sine:\n\t                b = n <= partialCount ? 1 : 0;\n\t                break;\n\t            case Tone.Oscillator.Type.Square:\n\t                b = n & 1 ? 2 * piFactor : 0;\n\t                break;\n\t            case Tone.Oscillator.Type.Sawtooth:\n\t                b = piFactor * (n & 1 ? 1 : -1);\n\t                break;\n\t            case Tone.Oscillator.Type.Triangle:\n\t                if (n & 1) {\n\t                    b = 2 * (piFactor * piFactor) * (n - 1 >> 1 & 1 ? -1 : 1);\n\t                } else {\n\t                    b = 0;\n\t                }\n\t                break;\n\t            case Tone.Oscillator.Type.Custom:\n\t                b = this._partials[n - 1];\n\t                break;\n\t            default:\n\t                throw new TypeError('Tone.Oscillator: invalid type: ' + type);\n\t            }\n\t            if (b !== 0) {\n\t                real[n] = -b * Math.sin(phase * n);\n\t                imag[n] = b * Math.cos(phase * n);\n\t            } else {\n\t                real[n] = 0;\n\t                imag[n] = 0;\n\t            }\n\t        }\n\t        return [\n\t            real,\n\t            imag\n\t        ];\n\t    };\n\t    /**\n\t\t *  Compute the inverse FFT for a given phase.\n\t\t *  @param  {Float32Array}  real\n\t\t *  @param  {Float32Array}  imag\n\t\t *  @param  {NormalRange}  phase\n\t\t *  @return  {AudioRange}\n\t\t *  @private\n\t\t */\n\t    Tone.Oscillator.prototype._inverseFFT = function (real, imag, phase) {\n\t        var sum = 0;\n\t        var len = real.length;\n\t        for (var i = 0; i < len; i++) {\n\t            sum += real[i] * Math.cos(i * phase) + imag[i] * Math.sin(i * phase);\n\t        }\n\t        return sum;\n\t    };\n\t    /**\n\t\t *  Returns the initial value of the oscillator.\n\t\t *  @return  {AudioRange}\n\t\t *  @private\n\t\t */\n\t    Tone.Oscillator.prototype._getInitialValue = function () {\n\t        var coefs = this._getRealImaginary(this._type, 0);\n\t        var real = coefs[0];\n\t        var imag = coefs[1];\n\t        var maxValue = 0;\n\t        var twoPi = Math.PI * 2;\n\t        //check for peaks in 8 places\n\t        for (var i = 0; i < 8; i++) {\n\t            maxValue = Math.max(this._inverseFFT(real, imag, i / 8 * twoPi), maxValue);\n\t        }\n\t        return -this._inverseFFT(real, imag, this._phase) / maxValue;\n\t    };\n\t    /**\n\t\t * The partials of the waveform. A partial represents\n\t\t * the amplitude at a harmonic. The first harmonic is the\n\t\t * fundamental frequency, the second is the octave and so on\n\t\t * following the harmonic series.\n\t\t * Setting this value will automatically set the type to \"custom\".\n\t\t * The value is an empty array when the type is not \"custom\".\n\t\t * @memberOf Tone.Oscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @example\n\t\t * osc.partials = [1, 0.2, 0.01];\n\t\t */\n\t    Object.defineProperty(Tone.Oscillator.prototype, 'partials', {\n\t        get: function () {\n\t            if (this._type !== Tone.Oscillator.Type.Custom) {\n\t                return [];\n\t            } else {\n\t                return this._partials;\n\t            }\n\t        },\n\t        set: function (partials) {\n\t            this._partials = partials;\n\t            this.type = Tone.Oscillator.Type.Custom;\n\t        }\n\t    });\n\t    /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.Oscillator#\n\t\t * @type {Degrees}\n\t\t * @name phase\n\t\t * @example\n\t\t * osc.phase = 180; //flips the phase of the oscillator\n\t\t */\n\t    Object.defineProperty(Tone.Oscillator.prototype, 'phase', {\n\t        get: function () {\n\t            return this._phase * (180 / Math.PI);\n\t        },\n\t        set: function (phase) {\n\t            this._phase = phase * Math.PI / 180;\n\t            //reset the type\n\t            this.type = this._type;\n\t        }\n\t    });\n\t    /**\n\t\t *  Dispose and disconnect.\n\t\t *  @return {Tone.Oscillator} this\n\t\t */\n\t    Tone.Oscillator.prototype.dispose = function () {\n\t        Tone.Source.prototype.dispose.call(this);\n\t        if (this._oscillator !== null) {\n\t            this._oscillator.dispose();\n\t            this._oscillator = null;\n\t        }\n\t        this._wave = null;\n\t        this._writable([\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        this.detune.dispose();\n\t        this.detune = null;\n\t        this._partials = null;\n\t        return this;\n\t    };\n\t    return Tone.Oscillator;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class AudioToGain converts an input in AudioRange [-1,1] to NormalRange [0,1]. \n\t\t *         See Tone.GainToAudio.\n\t\t *\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @constructor\n\t\t *  @example\n\t\t *  var a2g = new Tone.AudioToGain();\n\t\t */\n\t    Tone.AudioToGain = function () {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  @type {WaveShaperNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._norm = this.input = this.output = new Tone.WaveShaper(function (x) {\n\t            return (x + 1) / 2;\n\t        });\n\t    };\n\t    Tone.extend(Tone.AudioToGain, Tone.SignalBase);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.AudioToGain} this\n\t\t */\n\t    Tone.AudioToGain.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._norm.dispose();\n\t        this._norm = null;\n\t        return this;\n\t    };\n\t    return Tone.AudioToGain;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.Zero outputs 0's at audio-rate. The reason this has to be\n\t\t *         it's own class is that many browsers optimize out Tone.Signal\n\t\t *         with a value of 0 and will not process nodes further down the graph.\n\t\t *  @extends {Tone.SignalBase}\n\t\t */\n\t    Tone.Zero = function () {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  The gain node\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._gain = this.input = this.output = new Tone.Gain();\n\t        this.context.getConstant(0).connect(this._gain);\n\t    };\n\t    Tone.extend(Tone.Zero, Tone.SignalBase);\n\t    /**\n\t\t *  clean up\n\t\t *  @return  {Tone.Zero}  this\n\t\t */\n\t    Tone.Zero.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._gain.dispose();\n\t        this._gain = null;\n\t        return this;\n\t    };\n\t    return Tone.Zero;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  LFO stands for low frequency oscillator. Tone.LFO produces an output signal\n\t\t *          which can be attached to an AudioParam or Tone.Signal\n\t\t *          in order to modulate that parameter with an oscillator. The LFO can\n\t\t *          also be synced to the transport to start/stop and change when the tempo changes.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Frequency|Object} [frequency] The frequency of the oscillation. Typically, LFOs will be\n\t\t *                               in the frequency range of 0.1 to 10 hertz.\n\t\t *  @param {number=} min The minimum output value of the LFO.\n\t\t *  @param {number=} max The maximum value of the LFO.\n\t\t *  @example\n\t\t * var lfo = new Tone.LFO(\"4n\", 400, 4000);\n\t\t * lfo.connect(filter.frequency);\n\t\t */\n\t    Tone.LFO = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'min',\n\t            'max'\n\t        ], Tone.LFO);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The oscillator.\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t *  @private\n\t\t\t */\n\t        this._oscillator = new Tone.Oscillator({\n\t            'frequency': options.frequency,\n\t            'type': options.type\n\t        });\n\t        /**\n\t\t\t *  the lfo's frequency\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = this._oscillator.frequency;\n\t        /**\n\t\t\t * The amplitude of the LFO, which controls the output range between\n\t\t\t * the min and max output. For example if the min is -10 and the max\n\t\t\t * is 10, setting the amplitude to 0.5 would make the LFO modulate\n\t\t\t * between -5 and 5.\n\t\t\t * @type {Number}\n\t\t\t * @signal\n\t\t\t */\n\t        this.amplitude = this._oscillator.volume;\n\t        this.amplitude.units = Tone.Type.NormalRange;\n\t        this.amplitude.value = options.amplitude;\n\t        /**\n\t\t\t *  The signal which is output when the LFO is stopped\n\t\t\t *  @type  {Tone.Signal}\n\t\t\t *  @private\n\t\t\t */\n\t        this._stoppedSignal = new Tone.Signal(0, Tone.Type.AudioRange);\n\t        /**\n\t\t\t *  Just outputs zeros.\n\t\t\t *  @type {Tone.Zero}\n\t\t\t *  @private\n\t\t\t */\n\t        this._zeros = new Tone.Zero();\n\t        /**\n\t\t\t *  The value that the LFO outputs when it's stopped\n\t\t\t *  @type {AudioRange}\n\t\t\t *  @private\n\t\t\t */\n\t        this._stoppedValue = 0;\n\t        /**\n\t\t\t *  @type {Tone.AudioToGain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._a2g = new Tone.AudioToGain();\n\t        /**\n\t\t\t *  @type {Tone.Scale}\n\t\t\t *  @private\n\t\t\t */\n\t        this._scaler = this.output = new Tone.Scale(options.min, options.max);\n\t        /**\n\t\t\t *  the units of the LFO (used for converting)\n\t\t\t *  @type {Tone.Type}\n\t\t\t *  @private\n\t\t\t */\n\t        this._units = Tone.Type.Default;\n\t        this.units = options.units;\n\t        //connect it up\n\t        this._oscillator.chain(this._a2g, this._scaler);\n\t        this._zeros.connect(this._a2g);\n\t        this._stoppedSignal.connect(this._a2g);\n\t        this._readOnly([\n\t            'amplitude',\n\t            'frequency'\n\t        ]);\n\t        this.phase = options.phase;\n\t    };\n\t    Tone.extend(Tone.LFO, Tone.AudioNode);\n\t    /**\n\t\t *  the default parameters\n\t\t *\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.LFO.defaults = {\n\t        'type': 'sine',\n\t        'min': 0,\n\t        'max': 1,\n\t        'phase': 0,\n\t        'frequency': '4n',\n\t        'amplitude': 1,\n\t        'units': Tone.Type.Default\n\t    };\n\t    /**\n\t\t *  Start the LFO.\n\t\t *  @param  {Time} [time=now] the time the LFO will start\n\t\t *  @returns {Tone.LFO} this\n\t\t */\n\t    Tone.LFO.prototype.start = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._stoppedSignal.setValueAtTime(0, time);\n\t        this._oscillator.start(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Stop the LFO.\n\t\t *  @param  {Time} [time=now] the time the LFO will stop\n\t\t *  @returns {Tone.LFO} this\n\t\t */\n\t    Tone.LFO.prototype.stop = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._stoppedSignal.setValueAtTime(this._stoppedValue, time);\n\t        this._oscillator.stop(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Sync the start/stop/pause to the transport\n\t\t *  and the frequency to the bpm of the transport\n\t\t *  @returns {Tone.LFO} this\n\t\t *  @example\n\t\t *  lfo.frequency.value = \"8n\";\n\t\t *  lfo.sync().start(0)\n\t\t *  //the rate of the LFO will always be an eighth note,\n\t\t *  //even as the tempo changes\n\t\t */\n\t    Tone.LFO.prototype.sync = function () {\n\t        this._oscillator.sync();\n\t        this._oscillator.syncFrequency();\n\t        return this;\n\t    };\n\t    /**\n\t\t *  unsync the LFO from transport control\n\t\t *  @returns {Tone.LFO} this\n\t\t */\n\t    Tone.LFO.prototype.unsync = function () {\n\t        this._oscillator.unsync();\n\t        this._oscillator.unsyncFrequency();\n\t        return this;\n\t    };\n\t    /**\n\t\t * The miniumum output of the LFO.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {number}\n\t\t * @name min\n\t\t */\n\t    Object.defineProperty(Tone.LFO.prototype, 'min', {\n\t        get: function () {\n\t            return this._toUnits(this._scaler.min);\n\t        },\n\t        set: function (min) {\n\t            min = this._fromUnits(min);\n\t            this._scaler.min = min;\n\t        }\n\t    });\n\t    /**\n\t\t * The maximum output of the LFO.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {number}\n\t\t * @name max\n\t\t */\n\t    Object.defineProperty(Tone.LFO.prototype, 'max', {\n\t        get: function () {\n\t            return this._toUnits(this._scaler.max);\n\t        },\n\t        set: function (max) {\n\t            max = this._fromUnits(max);\n\t            this._scaler.max = max;\n\t        }\n\t    });\n\t    /**\n\t\t * The type of the oscillator: sine, square, sawtooth, triangle.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.LFO.prototype, 'type', {\n\t        get: function () {\n\t            return this._oscillator.type;\n\t        },\n\t        set: function (type) {\n\t            this._oscillator.type = type;\n\t            this._stoppedValue = this._oscillator._getInitialValue();\n\t            this._stoppedSignal.value = this._stoppedValue;\n\t        }\n\t    });\n\t    /**\n\t\t * The phase of the LFO.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {number}\n\t\t * @name phase\n\t\t */\n\t    Object.defineProperty(Tone.LFO.prototype, 'phase', {\n\t        get: function () {\n\t            return this._oscillator.phase;\n\t        },\n\t        set: function (phase) {\n\t            this._oscillator.phase = phase;\n\t            this._stoppedValue = this._oscillator._getInitialValue();\n\t            this._stoppedSignal.value = this._stoppedValue;\n\t        }\n\t    });\n\t    /**\n\t\t * The output units of the LFO.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {Tone.Type}\n\t\t * @name units\n\t\t */\n\t    Object.defineProperty(Tone.LFO.prototype, 'units', {\n\t        get: function () {\n\t            return this._units;\n\t        },\n\t        set: function (val) {\n\t            var currentMin = this.min;\n\t            var currentMax = this.max;\n\t            //convert the min and the max\n\t            this._units = val;\n\t            this.min = currentMin;\n\t            this.max = currentMax;\n\t        }\n\t    });\n\t    /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.LFO#\n\t\t * @type {Boolean}\n\t\t * @name mute\n\t\t */\n\t    Object.defineProperty(Tone.LFO.prototype, 'mute', {\n\t        get: function () {\n\t            return this._oscillator.mute;\n\t        },\n\t        set: function (mute) {\n\t            this._oscillator.mute = mute;\n\t        }\n\t    });\n\t    /**\n\t\t *  Returns the playback state of the source, either \"started\" or \"stopped\".\n\t\t *  @type {Tone.State}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.LFO#\n\t\t *  @name state\n\t\t */\n\t    Object.defineProperty(Tone.LFO.prototype, 'state', {\n\t        get: function () {\n\t            return this._oscillator.state;\n\t        }\n\t    });\n\t    /**\n\t\t *  Connect the output of the LFO to an AudioParam, AudioNode, or Tone Node.\n\t\t *  Tone.LFO will automatically convert to the destination units of the\n\t\t *  will get the units from the connected node.\n\t\t *  @param  {Tone | AudioParam | AudioNode} node\n\t\t *  @param {number} [outputNum=0] optionally which output to connect from\n\t\t *  @param {number} [inputNum=0] optionally which input to connect to\n\t\t *  @returns {Tone.LFO} this\n\t\t *  @private\n\t\t */\n\t    Tone.LFO.prototype.connect = function (node) {\n\t        if (node.constructor === Tone.Signal || node.constructor === Tone.Param) {\n\t            this.convert = node.convert;\n\t            this.units = node.units;\n\t        }\n\t        Tone.SignalBase.prototype.connect.apply(this, arguments);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  private method borrowed from Param converts\n\t\t *  units from their destination value\n\t\t *  @function\n\t\t *  @private\n\t\t */\n\t    Tone.LFO.prototype._fromUnits = Tone.Param.prototype._fromUnits;\n\t    /**\n\t\t *  private method borrowed from Param converts\n\t\t *  units to their destination value\n\t\t *  @function\n\t\t *  @private\n\t\t */\n\t    Tone.LFO.prototype._toUnits = Tone.Param.prototype._toUnits;\n\t    /**\n\t\t *  disconnect and dispose\n\t\t *  @returns {Tone.LFO} this\n\t\t */\n\t    Tone.LFO.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable([\n\t            'amplitude',\n\t            'frequency'\n\t        ]);\n\t        this._oscillator.dispose();\n\t        this._oscillator = null;\n\t        this._stoppedSignal.dispose();\n\t        this._stoppedSignal = null;\n\t        this._zeros.dispose();\n\t        this._zeros = null;\n\t        this._scaler.dispose();\n\t        this._scaler = null;\n\t        this._a2g.dispose();\n\t        this._a2g = null;\n\t        this.frequency = null;\n\t        this.amplitude = null;\n\t        return this;\n\t    };\n\t    return Tone.LFO;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Limiter will limit the loudness of an incoming signal.\n\t\t *         It is composed of a Tone.Compressor with a fast attack\n\t\t *         and release. Limiters are commonly used to safeguard against\n\t\t *         signal clipping. Unlike a compressor, limiters do not provide\n\t\t *         smooth gain reduction and almost completely prevent\n\t\t *         additional gain above the threshold.\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t *  @param {number} threshold The theshold above which the limiting is applied.\n\t\t *  @example\n\t\t *  var limiter = new Tone.Limiter(-6);\n\t\t */\n\t    Tone.Limiter = function () {\n\t        var options = Tone.defaults(arguments, ['threshold'], Tone.Limiter);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  the compressor\n\t\t\t *  @private\n\t\t\t *  @type {Tone.Compressor}\n\t\t\t */\n\t        this._compressor = this.input = this.output = new Tone.Compressor({\n\t            'attack': 0.001,\n\t            'decay': 0.001,\n\t            'threshold': options.threshold\n\t        });\n\t        /**\n\t\t\t * The threshold of of the limiter\n\t\t\t * @type {Decibel}\n\t\t\t * @signal\n\t\t\t */\n\t        this.threshold = this._compressor.threshold;\n\t        this._readOnly('threshold');\n\t    };\n\t    Tone.extend(Tone.Limiter, Tone.AudioNode);\n\t    /**\n\t\t *  The default value\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t *  @static\n\t\t */\n\t    Tone.Limiter.defaults = { 'threshold': -12 };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Limiter} this\n\t\t */\n\t    Tone.Limiter.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._compressor.dispose();\n\t        this._compressor = null;\n\t        this._writable('threshold');\n\t        this.threshold = null;\n\t        return this;\n\t    };\n\t    return Tone.Limiter;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Lowpass is a lowpass feedback comb filter. It is similar to\n\t\t *         Tone.FeedbackCombFilter, but includes a lowpass filter.\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t *  @param {Time|Object} [delayTime] The delay time of the comb filter\n\t\t *  @param {NormalRange=} resonance The resonance (feedback) of the comb filter\n\t\t *  @param {Frequency=} dampening The cutoff of the lowpass filter dampens the\n\t\t *                                signal as it is fedback.\n\t\t */\n\t    Tone.LowpassCombFilter = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'delayTime',\n\t            'resonance',\n\t            'dampening'\n\t        ], Tone.LowpassCombFilter);\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(1, 1);\n\t        /**\n\t\t\t *  the delay node\n\t\t\t *  @type {DelayNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delay = this.input = new Tone.Delay(options.delayTime);\n\t        /**\n\t\t\t *  The delayTime of the comb filter.\n\t\t\t *  @type {Time}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.delayTime = this._delay.delayTime;\n\t        /**\n\t\t\t *  the lowpass filter\n\t\t\t *  @type  {BiquadFilterNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lowpass = this.output = this.context.createBiquadFilter();\n\t        this._lowpass.Q.value = -3.0102999566398125;\n\t        this._lowpass.type = 'lowpass';\n\t        /**\n\t\t\t *  The dampening control of the feedback\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.dampening = new Tone.Param({\n\t            'param': this._lowpass.frequency,\n\t            'units': Tone.Type.Frequency,\n\t            'value': options.dampening\n\t        });\n\t        /**\n\t\t\t *  the feedback gain\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._feedback = new Tone.Gain(options.resonance, Tone.Type.NormalRange);\n\t        /**\n\t\t\t *  The amount of feedback of the delayed signal.\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.resonance = this._feedback.gain;\n\t        //connections\n\t        this._delay.chain(this._lowpass, this._feedback, this._delay);\n\t        this._readOnly([\n\t            'dampening',\n\t            'resonance',\n\t            'delayTime'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.LowpassCombFilter, Tone.AudioNode);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.LowpassCombFilter.defaults = {\n\t        'delayTime': 0.1,\n\t        'resonance': 0.5,\n\t        'dampening': 3000\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.LowpassCombFilter} this\n\t\t */\n\t    Tone.LowpassCombFilter.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable([\n\t            'dampening',\n\t            'resonance',\n\t            'delayTime'\n\t        ]);\n\t        this.dampening.dispose();\n\t        this.dampening = null;\n\t        this.resonance.dispose();\n\t        this.resonance = null;\n\t        this._delay.dispose();\n\t        this._delay = null;\n\t        this.delayTime = null;\n\t        this._lowpass.disconnect();\n\t        this._lowpass = null;\n\t        this._feedback.disconnect();\n\t        this._feedback = null;\n\t        return this;\n\t    };\n\t    return Tone.LowpassCombFilter;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Merge brings two signals into the left and right\n\t\t *          channels of a single stereo channel.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @example\n\t\t * var merge = new Tone.Merge().toMaster();\n\t\t * //routing a sine tone in the left channel\n\t\t * //and noise in the right channel\n\t\t * var osc = new Tone.Oscillator().connect(merge.left);\n\t\t * var noise = new Tone.Noise().connect(merge.right);\n\t\t * //starting our oscillators\n\t\t * noise.start();\n\t\t * osc.start();\n\t\t */\n\t    Tone.Merge = function () {\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(2, 0);\n\t        /**\n\t\t\t *  The left input channel.\n\t\t\t *  Alias for <code>input[0]</code>\n\t\t\t *  @type {GainNode}\n\t\t\t */\n\t        this.left = this.input[0] = new Tone.Gain();\n\t        /**\n\t\t\t *  The right input channel.\n\t\t\t *  Alias for <code>input[1]</code>.\n\t\t\t *  @type {GainNode}\n\t\t\t */\n\t        this.right = this.input[1] = new Tone.Gain();\n\t        /**\n\t\t\t *  the merger node for the two channels\n\t\t\t *  @type {ChannelMergerNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._merger = this.output = this.context.createChannelMerger(2);\n\t        //connections\n\t        this.left.connect(this._merger, 0, 0);\n\t        this.right.connect(this._merger, 0, 1);\n\t        this.left.channelCount = 1;\n\t        this.right.channelCount = 1;\n\t        this.left.channelCountMode = 'explicit';\n\t        this.right.channelCountMode = 'explicit';\n\t    };\n\t    Tone.extend(Tone.Merge, Tone.AudioNode);\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Merge} this\n\t\t */\n\t    Tone.Merge.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this.left.dispose();\n\t        this.left = null;\n\t        this.right.dispose();\n\t        this.right = null;\n\t        this._merger.disconnect();\n\t        this._merger = null;\n\t        return this;\n\t    };\n\t    return Tone.Merge;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Meter gets the [RMS](https://en.wikipedia.org/wiki/Root_mean_square)\n\t\t *          of an input signal with some averaging applied. It can also get the raw\n\t\t *          value of the input signal.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Number} smoothing The amount of smoothing applied between frames.\n\t\t *  @example\n\t\t * var meter = new Tone.Meter();\n\t\t * var mic = new Tone.UserMedia().open();\n\t\t * //connect mic to the meter\n\t\t * mic.connect(meter);\n\t\t * //the current level of the mic input in decibels\n\t\t * var level = meter.getValue();\n\t\t */\n\t    Tone.Meter = function () {\n\t        var options = Tone.defaults(arguments, ['smoothing'], Tone.Meter);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The analyser node which computes the levels.\n\t\t\t *  @private\n\t\t\t *  @type  {Tone.Analyser}\n\t\t\t */\n\t        this.input = this.output = this._analyser = new Tone.Analyser('waveform', 1024);\n\t        /**\n\t\t\t *  The amount of carryover between the current and last frame.\n\t\t\t *  Only applied meter for \"level\" type.\n\t\t\t *  @type  {Number}\n\t\t\t */\n\t        this.smoothing = options.smoothing;\n\t    };\n\t    Tone.extend(Tone.Meter, Tone.AudioNode);\n\t    /**\n\t\t *  The defaults\n\t\t *  @type {Object}\n\t\t *  @static\n\t\t *  @const\n\t\t */\n\t    Tone.Meter.defaults = { 'smoothing': 0.8 };\n\t    /**\n\t\t *  Get the current decibel value of the incoming signal\n\t\t *  @returns {Decibels}\n\t\t */\n\t    Tone.Meter.prototype.getLevel = function () {\n\t        this._analyser.type = 'fft';\n\t        var values = this._analyser.getValue();\n\t        var offset = 28;\n\t        // normalizes most signal levels\n\t        // TODO: compute loudness from FFT\n\t        return Math.max.apply(this, values) + offset;\n\t    };\n\t    /**\n\t\t *  Get the signal value of the incoming signal\n\t\t *  @returns {Number}\n\t\t */\n\t    Tone.Meter.prototype.getValue = function () {\n\t        this._analyser.type = 'waveform';\n\t        var value = this._analyser.getValue();\n\t        return value[0];\n\t    };\n\t    /**\n\t\t * A value from 0 -> 1 where 0 represents no time averaging with the last analysis frame.\n\t\t * @memberOf Tone.Meter#\n\t\t * @type {Number}\n\t\t * @name smoothing\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Meter.prototype, 'smoothing', {\n\t        get: function () {\n\t            return this._analyser.smoothing;\n\t        },\n\t        set: function (val) {\n\t            this._analyser.smoothing = val;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Meter} this\n\t\t */\n\t    Tone.Meter.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._analyser.dispose();\n\t        this._analyser = null;\n\t        return this;\n\t    };\n\t    return Tone.Meter;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *\t@class  Tone.Split splits an incoming signal into left and right channels.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @example\n\t\t * var split = new Tone.Split();\n\t\t * stereoSignal.connect(split);\n\t\t */\n\t    Tone.Split = function () {\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(0, 2);\n\t        /**\n\t\t\t *  @type {ChannelSplitterNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._splitter = this.input = this.context.createChannelSplitter(2);\n\t        this._splitter.channelCount = 2;\n\t        this._splitter.channelCountMode = 'explicit';\n\t        /**\n\t\t\t *  Left channel output.\n\t\t\t *  Alias for <code>output[0]</code>\n\t\t\t *  @type {Tone.Gain}\n\t\t\t */\n\t        this.left = this.output[0] = new Tone.Gain();\n\t        /**\n\t\t\t *  Right channel output.\n\t\t\t *  Alias for <code>output[1]</code>\n\t\t\t *  @type {Tone.Gain}\n\t\t\t */\n\t        this.right = this.output[1] = new Tone.Gain();\n\t        //connections\n\t        this._splitter.connect(this.left, 0, 0);\n\t        this._splitter.connect(this.right, 1, 0);\n\t    };\n\t    Tone.extend(Tone.Split, Tone.AudioNode);\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Split} this\n\t\t */\n\t    Tone.Split.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._splitter.disconnect();\n\t        this.left.dispose();\n\t        this.left = null;\n\t        this.right.dispose();\n\t        this.right = null;\n\t        this._splitter = null;\n\t        return this;\n\t    };\n\t    return Tone.Split;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Mid/Side processing separates the the 'mid' signal\n\t\t *         (which comes out of both the left and the right channel)\n\t\t *         and the 'side' (which only comes out of the the side channels). <br><br>\n\t\t *         <code>\n\t\t *         Mid = (Left+Right)/sqrt(2);   // obtain mid-signal from left and right<br>\n\t\t *         Side = (Left-Right)/sqrt(2);   // obtain side-signal from left and righ<br>\n\t\t *         </code>\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t */\n\t    Tone.MidSideSplit = function () {\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(0, 2);\n\t        /**\n\t\t\t *  split the incoming signal into left and right channels\n\t\t\t *  @type  {Tone.Split}\n\t\t\t *  @private\n\t\t\t */\n\t        this._split = this.input = new Tone.Split();\n\t        /**\n\t\t\t *  The mid send. Connect to mid processing. Alias for\n\t\t\t *  <code>output[0]</code>\n\t\t\t *  @type {Tone.Add}\n\t\t\t */\n\t        this._midAdd = new Tone.Add();\n\t        /**\n\t\t\t * Multiply the _midAdd by sqrt(1/2)\n\t\t\t * @type {Tone.Multiply}\n\t\t\t */\n\t        this.mid = this.output[0] = new Tone.Multiply(Math.SQRT1_2);\n\t        /**\n\t\t\t *  The side output. Connect to side processing. Also Output 1\n\t\t\t *  @type {Tone.Subtract}\n\t\t\t */\n\t        this._sideSubtract = new Tone.Subtract();\n\t        /**\n\t\t\t * Multiply the _midAdd by sqrt(1/2)\n\t\t\t * @type {Tone.Multiply}\n\t\t\t */\n\t        this.side = this.output[1] = new Tone.Multiply(Math.SQRT1_2);\n\t        this._split.connect(this._midAdd, 0, 0);\n\t        this._split.connect(this._midAdd, 1, 1);\n\t        this._split.connect(this._sideSubtract, 0, 0);\n\t        this._split.connect(this._sideSubtract, 1, 1);\n\t        this._midAdd.connect(this.mid);\n\t        this._sideSubtract.connect(this.side);\n\t    };\n\t    Tone.extend(Tone.MidSideSplit, Tone.AudioNode);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.MidSideSplit} this\n\t\t */\n\t    Tone.MidSideSplit.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this.mid.dispose();\n\t        this.mid = null;\n\t        this.side.dispose();\n\t        this.side = null;\n\t        this._midAdd.dispose();\n\t        this._midAdd = null;\n\t        this._sideSubtract.dispose();\n\t        this._sideSubtract = null;\n\t        this._split.dispose();\n\t        this._split = null;\n\t        return this;\n\t    };\n\t    return Tone.MidSideSplit;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Mid/Side processing separates the the 'mid' signal\n\t\t *         (which comes out of both the left and the right channel)\n\t\t *         and the 'side' (which only comes out of the the side channels).\n\t\t *         MidSideMerge merges the mid and side signal after they've been seperated\n\t\t *         by Tone.MidSideSplit.<br><br>\n\t\t *         <code>\n\t\t *         Left = (Mid+Side)/sqrt(2);   // obtain left signal from mid and side<br>\n\t\t *         Right = (Mid-Side)/sqrt(2);   // obtain right signal from mid and side<br>\n\t\t *         </code>\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t */\n\t    Tone.MidSideMerge = function () {\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(2, 0);\n\t        /**\n\t\t\t *  The mid signal input. Alias for\n\t\t\t *  <code>input[0]</code>\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t */\n\t        this.mid = this.input[0] = new Tone.Gain();\n\t        /**\n\t\t\t *  recombine the mid/side into Left\n\t\t\t *  @type {Tone.Add}\n\t\t\t *  @private\n\t\t\t */\n\t        this._left = new Tone.Add();\n\t        /**\n\t\t\t * Multiply the left by sqrt(1/2)\n\t\t\t * @type {Tone.Multiply}\n\t\t\t */\n\t        this._timesTwoLeft = new Tone.Multiply(Math.SQRT1_2);\n\t        /**\n\t\t\t *  The side signal input. Alias for\n\t\t\t *  <code>input[1]</code>\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t */\n\t        this.side = this.input[1] = new Tone.Gain();\n\t        /**\n\t\t\t *  recombine the mid/side into Right\n\t\t\t *  @type {Tone.Subtract}\n\t\t\t *  @private\n\t\t\t */\n\t        this._right = new Tone.Subtract();\n\t        /**\n\t\t\t * Multiply the right by sqrt(1/2)\n\t\t\t * @type {Tone.Multiply}\n\t\t\t */\n\t        this._timesTwoRight = new Tone.Multiply(Math.SQRT1_2);\n\t        /**\n\t\t\t *  Merge the left/right signal back into a stereo signal.\n\t\t\t *  @type {Tone.Merge}\n\t\t\t *  @private\n\t\t\t */\n\t        this._merge = this.output = new Tone.Merge();\n\t        this.mid.connect(this._left, 0, 0);\n\t        this.side.connect(this._left, 0, 1);\n\t        this.mid.connect(this._right, 0, 0);\n\t        this.side.connect(this._right, 0, 1);\n\t        this._left.connect(this._timesTwoLeft);\n\t        this._right.connect(this._timesTwoRight);\n\t        this._timesTwoLeft.connect(this._merge, 0, 0);\n\t        this._timesTwoRight.connect(this._merge, 0, 1);\n\t    };\n\t    Tone.extend(Tone.MidSideMerge, Tone.AudioNode);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.MidSideMerge} this\n\t\t */\n\t    Tone.MidSideMerge.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this.mid.dispose();\n\t        this.mid = null;\n\t        this.side.dispose();\n\t        this.side = null;\n\t        this._left.dispose();\n\t        this._left = null;\n\t        this._timesTwoLeft.dispose();\n\t        this._timesTwoLeft = null;\n\t        this._right.dispose();\n\t        this._right = null;\n\t        this._timesTwoRight.dispose();\n\t        this._timesTwoRight = null;\n\t        this._merge.dispose();\n\t        this._merge = null;\n\t        return this;\n\t    };\n\t    return Tone.MidSideMerge;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.MidSideCompressor applies two different compressors to the mid\n\t\t *         and side signal components. See Tone.MidSideSplit.\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Object} options The options that are passed to the mid and side\n\t\t *                          compressors.\n\t\t *  @constructor\n\t\t */\n\t    Tone.MidSideCompressor = function (options) {\n\t        Tone.AudioNode.call(this);\n\t        options = Tone.defaultArg(options, Tone.MidSideCompressor.defaults);\n\t        /**\n\t\t\t *  the mid/side split\n\t\t\t *  @type  {Tone.MidSideSplit}\n\t\t\t *  @private\n\t\t\t */\n\t        this._midSideSplit = this.input = new Tone.MidSideSplit();\n\t        /**\n\t\t\t *  the mid/side recombination\n\t\t\t *  @type  {Tone.MidSideMerge}\n\t\t\t *  @private\n\t\t\t */\n\t        this._midSideMerge = this.output = new Tone.MidSideMerge();\n\t        /**\n\t\t\t *  The compressor applied to the mid signal\n\t\t\t *  @type  {Tone.Compressor}\n\t\t\t */\n\t        this.mid = new Tone.Compressor(options.mid);\n\t        /**\n\t\t\t *  The compressor applied to the side signal\n\t\t\t *  @type  {Tone.Compressor}\n\t\t\t */\n\t        this.side = new Tone.Compressor(options.side);\n\t        this._midSideSplit.mid.chain(this.mid, this._midSideMerge.mid);\n\t        this._midSideSplit.side.chain(this.side, this._midSideMerge.side);\n\t        this._readOnly([\n\t            'mid',\n\t            'side'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.MidSideCompressor, Tone.AudioNode);\n\t    /**\n\t\t *  @const\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.MidSideCompressor.defaults = {\n\t        'mid': {\n\t            'ratio': 3,\n\t            'threshold': -24,\n\t            'release': 0.03,\n\t            'attack': 0.02,\n\t            'knee': 16\n\t        },\n\t        'side': {\n\t            'ratio': 6,\n\t            'threshold': -30,\n\t            'release': 0.25,\n\t            'attack': 0.03,\n\t            'knee': 10\n\t        }\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.MidSideCompressor} this\n\t\t */\n\t    Tone.MidSideCompressor.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable([\n\t            'mid',\n\t            'side'\n\t        ]);\n\t        this.mid.dispose();\n\t        this.mid = null;\n\t        this.side.dispose();\n\t        this.side = null;\n\t        this._midSideSplit.dispose();\n\t        this._midSideSplit = null;\n\t        this._midSideMerge.dispose();\n\t        this._midSideMerge = null;\n\t        return this;\n\t    };\n\t    return Tone.MidSideCompressor;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Mono coerces the incoming mono or stereo signal into a mono signal\n\t\t *         where both left and right channels have the same value. This can be useful\n\t\t *         for [stereo imaging](https://en.wikipedia.org/wiki/Stereo_imaging).\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t */\n\t    Tone.Mono = function () {\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(1, 0);\n\t        /**\n\t\t\t *  merge the signal\n\t\t\t *  @type {Tone.Merge}\n\t\t\t *  @private\n\t\t\t */\n\t        this._merge = this.output = new Tone.Merge();\n\t        this.input.connect(this._merge, 0, 0);\n\t        this.input.connect(this._merge, 0, 1);\n\t    };\n\t    Tone.extend(Tone.Mono, Tone.AudioNode);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Mono} this\n\t\t */\n\t    Tone.Mono.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._merge.dispose();\n\t        this._merge = null;\n\t        return this;\n\t    };\n\t    return Tone.Mono;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class A compressor with seperate controls over low/mid/high dynamics\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t *  @param {Object} options The low/mid/high compressor settings.\n\t\t *  @example\n\t\t *  var multiband = new Tone.MultibandCompressor({\n\t\t *  \t\"lowFrequency\" : 200,\n\t\t *  \t\"highFrequency\" : 1300\n\t\t *  \t\"low\" : {\n\t\t *  \t\t\"threshold\" : -12\n\t\t *  \t}\n\t\t *  })\n\t\t */\n\t    Tone.MultibandCompressor = function (options) {\n\t        Tone.AudioNode.call(this);\n\t        options = Tone.defaultArg(arguments, Tone.MultibandCompressor.defaults);\n\t        /**\n\t\t\t *  split the incoming signal into high/mid/low\n\t\t\t *  @type {Tone.MultibandSplit}\n\t\t\t *  @private\n\t\t\t */\n\t        this._splitter = this.input = new Tone.MultibandSplit({\n\t            'lowFrequency': options.lowFrequency,\n\t            'highFrequency': options.highFrequency\n\t        });\n\t        /**\n\t\t\t *  low/mid crossover frequency.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.lowFrequency = this._splitter.lowFrequency;\n\t        /**\n\t\t\t *  mid/high crossover frequency.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.highFrequency = this._splitter.highFrequency;\n\t        /**\n\t\t\t *  the output\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this.output = new Tone.Gain();\n\t        /**\n\t\t\t *  The compressor applied to the low frequencies.\n\t\t\t *  @type {Tone.Compressor}\n\t\t\t */\n\t        this.low = new Tone.Compressor(options.low);\n\t        /**\n\t\t\t *  The compressor applied to the mid frequencies.\n\t\t\t *  @type {Tone.Compressor}\n\t\t\t */\n\t        this.mid = new Tone.Compressor(options.mid);\n\t        /**\n\t\t\t *  The compressor applied to the high frequencies.\n\t\t\t *  @type {Tone.Compressor}\n\t\t\t */\n\t        this.high = new Tone.Compressor(options.high);\n\t        //connect the compressor\n\t        this._splitter.low.chain(this.low, this.output);\n\t        this._splitter.mid.chain(this.mid, this.output);\n\t        this._splitter.high.chain(this.high, this.output);\n\t        this._readOnly([\n\t            'high',\n\t            'mid',\n\t            'low',\n\t            'highFrequency',\n\t            'lowFrequency'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.MultibandCompressor, Tone.AudioNode);\n\t    /**\n\t\t *  @const\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.MultibandCompressor.defaults = {\n\t        'low': Tone.Compressor.defaults,\n\t        'mid': Tone.Compressor.defaults,\n\t        'high': Tone.Compressor.defaults,\n\t        'lowFrequency': 250,\n\t        'highFrequency': 2000\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.MultibandCompressor} this\n\t\t */\n\t    Tone.MultibandCompressor.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._splitter.dispose();\n\t        this._writable([\n\t            'high',\n\t            'mid',\n\t            'low',\n\t            'highFrequency',\n\t            'lowFrequency'\n\t        ]);\n\t        this.low.dispose();\n\t        this.mid.dispose();\n\t        this.high.dispose();\n\t        this._splitter = null;\n\t        this.low = null;\n\t        this.mid = null;\n\t        this.high = null;\n\t        this.lowFrequency = null;\n\t        this.highFrequency = null;\n\t        return this;\n\t    };\n\t    return Tone.MultibandCompressor;\n\t});\n\tModule(function (Tone) {\n\t    if (Tone.supported && !window.StereoPannerNode) {\n\t        /**\n\t\t\t * @class Shimmed StereoPannerNode\n\t\t\t * @param  {AudioContext} context\n\t\t\t * @private\n\t\t\t */\n\t        var StereoPannerNode = function (context) {\n\t            /**\n\t\t\t\t * The audio context\n\t\t\t\t * @type {AudioContext}\n\t\t\t\t */\n\t            this.context = context;\n\t            /**\n\t\t\t\t * The left/right panning. [-1, 1]\n\t\t\t\t * @type {AudioRange}\n\t\t\t\t * @signal\n\t\t\t\t */\n\t            this.pan = new Tone.Signal(0, Tone.Type.AudioRange);\n\t            /**\n\t\t\t\t * Equal power scaling of the right gain\n\t\t\t\t * @type {Tone.WaveShaper}\n\t\t\t\t */\n\t            var rightWaveShaper = new Tone.WaveShaper(function (val) {\n\t                return Tone.equalPowerScale((val + 1) / 2);\n\t            }, 4096);\n\t            /**\n\t\t\t\t * Equal power scaling of the left gain\n\t\t\t\t * @type {Tone.WaveShaper}\n\t\t\t\t * @private\n\t\t\t\t */\n\t            var leftWaveShaper = new Tone.WaveShaper(function (val) {\n\t                return Tone.equalPowerScale(1 - (val + 1) / 2);\n\t            }, 4096);\n\t            /**\n\t\t\t\t * The left gain value\n\t\t\t\t * @type {Tone.Gain}\n\t\t\t\t * @private\n\t\t\t\t */\n\t            var leftGain = new Tone.Gain();\n\t            /**\n\t\t\t\t * The right gain value\n\t\t\t\t * @type {Tone.Gain}\n\t\t\t\t * @private\n\t\t\t\t */\n\t            var rightGain = new Tone.Gain();\n\t            /**\n\t\t\t\t * Split the incoming signal\n\t\t\t\t * @type {Tone.Split}\n\t\t\t\t * @private\n\t\t\t\t */\n\t            var split = this.input = new Tone.Split();\n\t            /**\n\t\t\t\t * Keeps the waveshapers from optimizing 0s\n\t\t\t\t * @type {Tone.Zero}\n\t\t\t\t * @private\n\t\t\t\t */\n\t            var zero = new Tone.Zero();\n\t            zero.fan(rightWaveShaper, leftWaveShaper);\n\t            /**\n\t\t\t\t * Merge the outgoing signal\n\t\t\t\t * @type {Tone.Merge}\n\t\t\t\t * @private\n\t\t\t\t */\n\t            var merge = this.output = new Tone.Merge();\n\t            //connections\n\t            split.left.chain(leftGain, merge.left);\n\t            split.right.chain(rightGain, merge.right);\n\t            this.pan.chain(leftWaveShaper, leftGain.gain);\n\t            this.pan.chain(rightWaveShaper, rightGain.gain);\n\t        };\n\t        StereoPannerNode.prototype.disconnect = function () {\n\t            this.output.disconnect.apply(this.output, arguments);\n\t        };\n\t        StereoPannerNode.prototype.connect = function () {\n\t            this.output.connect.apply(this.output, arguments);\n\t        };\n\t        //add it to the AudioContext\n\t        AudioContext.prototype.createStereoPanner = function () {\n\t            return new StereoPannerNode(this);\n\t        };\n\t        Tone.Context.prototype.createStereoPanner = function () {\n\t            return new StereoPannerNode(this);\n\t        };\n\t    }\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Panner is an equal power Left/Right Panner and does not\n\t\t *          support 3D. Panner uses the StereoPannerNode when available.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {NormalRange} [initialPan=0] The initail panner value (center).\n\t\t *  @example\n\t\t *  //pan the input signal hard right.\n\t\t *  var panner = new Tone.Panner(1);\n\t\t */\n\t    Tone.Panner = function (initialPan) {\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t*  the panner node\n\t\t\t*  @type {StereoPannerNode}\n\t\t\t*  @private\n\t\t\t*/\n\t        this._panner = this.input = this.output = this.context.createStereoPanner();\n\t        /**\n\t\t\t*  The pan control. -1 = hard left, 1 = hard right.\n\t\t\t*  @type {AudioRange}\n\t\t\t*  @signal\n\t\t\t*/\n\t        this.pan = this._panner.pan;\n\t        //initial value\n\t        this.pan.value = Tone.defaultArg(initialPan, 0);\n\t        this._readOnly('pan');\n\t    };\n\t    Tone.extend(Tone.Panner, Tone.AudioNode);\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Panner} this\n\t\t */\n\t    Tone.Panner.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable('pan');\n\t        this._panner.disconnect();\n\t        this._panner = null;\n\t        this.pan = null;\n\t        return this;\n\t    };\n\t    return Tone.Panner;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  A spatialized panner node which supports equalpower or HRTF panning.\n\t\t *          Tries to normalize the API across various browsers. See Tone.Listener\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Number} positionX The initial x position.\n\t\t *  @param {Number} positionY The initial y position.\n\t\t *  @param {Number} positionZ The initial z position.\n\t\t */\n\t    Tone.Panner3D = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'positionX',\n\t            'positionY',\n\t            'positionZ'\n\t        ], Tone.Panner3D);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The panner node\n\t\t\t *  @type {PannerNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._panner = this.input = this.output = this.context.createPanner();\n\t        //set some values\n\t        this._panner.panningModel = options.panningModel;\n\t        this._panner.maxDistance = options.maxDistance;\n\t        this._panner.distanceModel = options.distanceModel;\n\t        this._panner.coneOuterGain = options.coneOuterGain;\n\t        this._panner.coneOuterAngle = options.coneOuterAngle;\n\t        this._panner.coneInnerAngle = options.coneInnerAngle;\n\t        this._panner.refDistance = options.refDistance;\n\t        this._panner.rolloffFactor = options.rolloffFactor;\n\t        /**\n\t\t\t *  Holds the current orientation\n\t\t\t *  @type  {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._orientation = [\n\t            options.orientationX,\n\t            options.orientationY,\n\t            options.orientationZ\n\t        ];\n\t        /**\n\t\t\t *  Holds the current position\n\t\t\t *  @type  {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._position = [\n\t            options.positionX,\n\t            options.positionY,\n\t            options.positionZ\n\t        ];\n\t        // set the default position/orientation\n\t        this.orientationX = options.orientationX;\n\t        this.orientationY = options.orientationY;\n\t        this.orientationZ = options.orientationZ;\n\t        this.positionX = options.positionX;\n\t        this.positionY = options.positionY;\n\t        this.positionZ = options.positionZ;\n\t    };\n\t    Tone.extend(Tone.Panner3D, Tone.AudioNode);\n\t    /**\n\t\t *  Defaults according to the specification\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Panner3D.defaults = {\n\t        'positionX': 0,\n\t        'positionY': 0,\n\t        'positionZ': 0,\n\t        'orientationX': 0,\n\t        'orientationY': 0,\n\t        'orientationZ': 0,\n\t        'panningModel': 'equalpower',\n\t        'maxDistance': 10000,\n\t        'distanceModel': 'inverse',\n\t        'coneOuterGain': 0,\n\t        'coneOuterAngle': 360,\n\t        'coneInnerAngle': 360,\n\t        'refDistance': 1,\n\t        'rolloffFactor': 1\n\t    };\n\t    /**\n\t\t * The ramp time which is applied to the setTargetAtTime\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t    Tone.Panner3D.prototype._rampTimeConstant = 0.01;\n\t    /**\n\t\t *  Sets the position of the source in 3d space.\n\t\t *  @param  {Number}  x\n\t\t *  @param  {Number}  y\n\t\t *  @param  {Number}  z\n\t\t *  @return {Tone.Panner3D} this\n\t\t */\n\t    Tone.Panner3D.prototype.setPosition = function (x, y, z) {\n\t        if (this._panner.positionX) {\n\t            var now = this.now();\n\t            this._panner.positionX.setTargetAtTime(x, now, this._rampTimeConstant);\n\t            this._panner.positionY.setTargetAtTime(y, now, this._rampTimeConstant);\n\t            this._panner.positionZ.setTargetAtTime(z, now, this._rampTimeConstant);\n\t        } else {\n\t            this._panner.setPosition(x, y, z);\n\t        }\n\t        this._position = Array.prototype.slice.call(arguments);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Sets the orientation of the source in 3d space.\n\t\t *  @param  {Number}  x\n\t\t *  @param  {Number}  y\n\t\t *  @param  {Number}  z\n\t\t *  @return {Tone.Panner3D} this\n\t\t */\n\t    Tone.Panner3D.prototype.setOrientation = function (x, y, z) {\n\t        if (this._panner.orientationX) {\n\t            var now = this.now();\n\t            this._panner.orientationX.setTargetAtTime(x, now, this._rampTimeConstant);\n\t            this._panner.orientationY.setTargetAtTime(y, now, this._rampTimeConstant);\n\t            this._panner.orientationZ.setTargetAtTime(z, now, this._rampTimeConstant);\n\t        } else {\n\t            this._panner.setOrientation(x, y, z);\n\t        }\n\t        this._orientation = Array.prototype.slice.call(arguments);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  The x position of the panner object.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name positionX\n\t\t */\n\t    Object.defineProperty(Tone.Panner3D.prototype, 'positionX', {\n\t        set: function (pos) {\n\t            this._position[0] = pos;\n\t            this.setPosition.apply(this, this._position);\n\t        },\n\t        get: function () {\n\t            return this._position[0];\n\t        }\n\t    });\n\t    /**\n\t\t *  The y position of the panner object.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name positionY\n\t\t */\n\t    Object.defineProperty(Tone.Panner3D.prototype, 'positionY', {\n\t        set: function (pos) {\n\t            this._position[1] = pos;\n\t            this.setPosition.apply(this, this._position);\n\t        },\n\t        get: function () {\n\t            return this._position[1];\n\t        }\n\t    });\n\t    /**\n\t\t *  The z position of the panner object.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name positionZ\n\t\t */\n\t    Object.defineProperty(Tone.Panner3D.prototype, 'positionZ', {\n\t        set: function (pos) {\n\t            this._position[2] = pos;\n\t            this.setPosition.apply(this, this._position);\n\t        },\n\t        get: function () {\n\t            return this._position[2];\n\t        }\n\t    });\n\t    /**\n\t\t *  The x orientation of the panner object.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name orientationX\n\t\t */\n\t    Object.defineProperty(Tone.Panner3D.prototype, 'orientationX', {\n\t        set: function (pos) {\n\t            this._orientation[0] = pos;\n\t            this.setOrientation.apply(this, this._orientation);\n\t        },\n\t        get: function () {\n\t            return this._orientation[0];\n\t        }\n\t    });\n\t    /**\n\t\t *  The y orientation of the panner object.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name orientationY\n\t\t */\n\t    Object.defineProperty(Tone.Panner3D.prototype, 'orientationY', {\n\t        set: function (pos) {\n\t            this._orientation[1] = pos;\n\t            this.setOrientation.apply(this, this._orientation);\n\t        },\n\t        get: function () {\n\t            return this._orientation[1];\n\t        }\n\t    });\n\t    /**\n\t\t *  The z orientation of the panner object.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name orientationZ\n\t\t */\n\t    Object.defineProperty(Tone.Panner3D.prototype, 'orientationZ', {\n\t        set: function (pos) {\n\t            this._orientation[2] = pos;\n\t            this.setOrientation.apply(this, this._orientation);\n\t        },\n\t        get: function () {\n\t            return this._orientation[2];\n\t        }\n\t    });\n\t    /**\n\t\t *  Proxy a property on the panner to an exposed public propery\n\t\t *  @param  {String}  prop\n\t\t *  @private\n\t\t */\n\t    Tone.Panner3D._aliasProperty = function (prop) {\n\t        Object.defineProperty(Tone.Panner3D.prototype, prop, {\n\t            set: function (val) {\n\t                this._panner[prop] = val;\n\t            },\n\t            get: function () {\n\t                return this._panner[prop];\n\t            }\n\t        });\n\t    };\n\t    /**\n\t\t *  The panning model. Either \"equalpower\" or \"HRTF\".\n\t\t *  @type {String}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name panningModel\n\t\t */\n\t    Tone.Panner3D._aliasProperty('panningModel');\n\t    /**\n\t\t *  A reference distance for reducing volume as source move further from the listener\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name refDistance\n\t\t */\n\t    Tone.Panner3D._aliasProperty('refDistance');\n\t    /**\n\t\t *  Describes how quickly the volume is reduced as source moves away from listener.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name rolloffFactor\n\t\t */\n\t    Tone.Panner3D._aliasProperty('rolloffFactor');\n\t    /**\n\t\t *  The distance model used by,  \"linear\", \"inverse\", or \"exponential\".\n\t\t *  @type {String}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name distanceModel\n\t\t */\n\t    Tone.Panner3D._aliasProperty('distanceModel');\n\t    /**\n\t\t *  The angle, in degrees, inside of which there will be no volume reduction\n\t\t *  @type {Degrees}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name coneInnerAngle\n\t\t */\n\t    Tone.Panner3D._aliasProperty('coneInnerAngle');\n\t    /**\n\t\t *  The angle, in degrees, outside of which the volume will be reduced\n\t\t *  to a constant value of coneOuterGain\n\t\t *  @type {Degrees}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name coneOuterAngle\n\t\t */\n\t    Tone.Panner3D._aliasProperty('coneOuterAngle');\n\t    /**\n\t\t *  The gain outside of the coneOuterAngle\n\t\t *  @type {Gain}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name coneOuterGain\n\t\t */\n\t    Tone.Panner3D._aliasProperty('coneOuterGain');\n\t    /**\n\t\t *  The maximum distance between source and listener,\n\t\t *  after which the volume will not be reduced any further.\n\t\t *  @type {Positive}\n\t\t *  @memberOf Tone.Panner3D#\n\t\t *  @name maxDistance\n\t\t */\n\t    Tone.Panner3D._aliasProperty('maxDistance');\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Panner3D} this\n\t\t */\n\t    Tone.Panner3D.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._panner.disconnect();\n\t        this._panner = null;\n\t        this._orientation = null;\n\t        this._position = null;\n\t        return this;\n\t    };\n\t    return Tone.Panner3D;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.PanVol is a Tone.Panner and Tone.Volume in one.\n\t\t *\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @constructor\n\t\t *  @param {AudioRange} pan the initial pan\n\t\t *  @param {number} volume The output volume.\n\t\t *  @example\n\t\t * //pan the incoming signal left and drop the volume\n\t\t * var panVol = new Tone.PanVol(-0.25, -12);\n\t\t */\n\t    Tone.PanVol = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'pan',\n\t            'volume'\n\t        ], Tone.PanVol);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The panning node\n\t\t\t *  @type {Tone.Panner}\n\t\t\t *  @private\n\t\t\t */\n\t        this._panner = this.input = new Tone.Panner(options.pan);\n\t        /**\n\t\t\t *  The L/R panning control.\n\t\t\t *  @type {AudioRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.pan = this._panner.pan;\n\t        /**\n\t\t\t *  The volume node\n\t\t\t *  @type {Tone.Volume}\n\t\t\t *  @private\n\t\t\t */\n\t        this._volume = this.output = new Tone.Volume(options.volume);\n\t        /**\n\t\t\t *  The volume control in decibels.\n\t\t\t *  @type {Decibels}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.volume = this._volume.volume;\n\t        //connections\n\t        this._panner.connect(this._volume);\n\t        this.mute = options.mute;\n\t        this._readOnly([\n\t            'pan',\n\t            'volume'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.PanVol, Tone.AudioNode);\n\t    /**\n\t\t *  The defaults\n\t\t *  @type  {Object}\n\t\t *  @const\n\t\t *  @static\n\t\t */\n\t    Tone.PanVol.defaults = {\n\t        'pan': 0,\n\t        'volume': 0,\n\t        'mute': false\n\t    };\n\t    /**\n\t\t * Mute/unmute the volume\n\t\t * @memberOf Tone.PanVol#\n\t\t * @name mute\n\t\t * @type {Boolean}\n\t\t */\n\t    Object.defineProperty(Tone.PanVol.prototype, 'mute', {\n\t        get: function () {\n\t            return this._volume.mute;\n\t        },\n\t        set: function (mute) {\n\t            this._volume.mute = mute;\n\t        }\n\t    });\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.PanVol} this\n\t\t */\n\t    Tone.PanVol.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._writable([\n\t            'pan',\n\t            'volume'\n\t        ]);\n\t        this._panner.dispose();\n\t        this._panner = null;\n\t        this.pan = null;\n\t        this._volume.dispose();\n\t        this._volume = null;\n\t        this.volume = null;\n\t        return this;\n\t    };\n\t    return Tone.PanVol;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.Solo lets you isolate a specific audio stream. When\n\t\t *         an instance is set to `solo=true`, it will mute all other instances.\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @example\n\t\t * var soloA = new Tone.Solo()\n\t\t * var soloB = new Tone.Solo()\n\t\t * soloA.solo = true\n\t\t * //no audio will pass through soloB\n\t\t */\n\t    Tone.Solo = function () {\n\t        var options = Tone.defaults(arguments, ['solo'], Tone.Solo);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The input and output node\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t */\n\t        this.input = this.output = new Tone.Gain();\n\t        /**\n\t\t\t *  A bound _soloed method\n\t\t\t *  @type  {Function}\n\t\t\t *  @private\n\t\t\t */\n\t        this._soloBind = this._soloed.bind(this);\n\t        //listen for solo events class-wide.\n\t        this.context.on('solo', this._soloBind);\n\t        //set initially\n\t        this.solo = options.solo;\n\t    };\n\t    Tone.extend(Tone.Solo, Tone.AudioNode);\n\t    /**\n\t\t *  The defaults\n\t\t *  @type  {Object}\n\t\t *  @static\n\t\t */\n\t    Tone.Solo.defaults = { solo: false };\n\t    /**\n\t\t *  Isolates this instance and mutes all other instances of Tone.Solo.\n\t\t *  Only one instance can be soloed at a time. A soloed\n\t\t *  instance will report `solo=false` when another instance is soloed.\n\t\t *  @memberOf Tone.Solo#\n\t\t *  @type {Boolean}\n\t\t *  @name solo\n\t\t */\n\t    Object.defineProperty(Tone.Solo.prototype, 'solo', {\n\t        get: function () {\n\t            return this._isSoloed();\n\t        },\n\t        set: function (solo) {\n\t            if (solo) {\n\t                this._addSolo();\n\t            } else {\n\t                this._removeSolo();\n\t            }\n\t            this.context.emit('solo', this);\n\t        }\n\t    });\n\t    /**\n\t\t *  If the current instance is muted, i.e. another instance is soloed\n\t\t *  @memberOf Tone.Solo#\n\t\t *  @type {Boolean}\n\t\t *  @name muted\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Solo.prototype, 'muted', {\n\t        get: function () {\n\t            return this.input.gain.value === 0;\n\t        }\n\t    });\n\t    /**\n\t\t * Add this to the soloed array\n\t\t * @private\n\t\t */\n\t    Tone.Solo.prototype._addSolo = function () {\n\t        if (!Tone.isArray(this.context._currentSolo)) {\n\t            this.context._currentSolo = [];\n\t        }\n\t        if (!this._isSoloed()) {\n\t            this.context._currentSolo.push(this);\n\t        }\n\t    };\n\t    /**\n\t\t * Remove this from the soloed array\n\t\t * @private\n\t\t */\n\t    Tone.Solo.prototype._removeSolo = function () {\n\t        if (this._isSoloed()) {\n\t            var index = this.context._currentSolo.indexOf(this);\n\t            this.context._currentSolo.splice(index, 1);\n\t        }\n\t    };\n\t    /**\n\t\t * @return {Boolean} Is this on the soloed array\n\t\t * @private\n\t\t */\n\t    Tone.Solo.prototype._isSoloed = function () {\n\t        if (Tone.isArray(this.context._currentSolo)) {\n\t            return this.context._currentSolo.length !== 0 && this.context._currentSolo.indexOf(this) !== -1;\n\t        } else {\n\t            return false;\n\t        }\n\t    };\n\t    /**\n\t\t * @return {Boolean} Returns true if no one is soloed\n\t\t * @private\n\t\t */\n\t    Tone.Solo.prototype._noSolos = function () {\n\t        return !Tone.isArray(this.context._currentSolo) || this.context._currentSolo.length === 0;\n\t    };\n\t    /**\n\t\t *  Solo the current instance and unsolo all other instances.\n\t\t *  @param  {Tone.Solo}  instance  The instance which is being soloed/unsoloed.\n\t\t *  @private\n\t\t */\n\t    Tone.Solo.prototype._soloed = function () {\n\t        if (this._isSoloed()) {\n\t            this.input.gain.value = 1;\n\t        } else if (this._noSolos()) {\n\t            //no one is soloed\n\t            this.input.gain.value = 1;\n\t        } else {\n\t            this.input.gain.value = 0;\n\t        }\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.Solo}  this\n\t\t */\n\t    Tone.Solo.prototype.dispose = function () {\n\t        this.context.off('solo', this._soloBind);\n\t        this._removeSolo();\n\t        this._soloBind = null;\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        return this;\n\t    };\n\t    return Tone.Solo;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class  Get the current waveform data of the connected audio source.\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Number=} size The size of the FFT. Value must be a power of\n\t\t *                       two in the range 32 to 32768.\n\t\t */\n\t    Tone.Waveform = function () {\n\t        var options = Tone.defaults(arguments, ['size'], Tone.Waveform);\n\t        options.type = Tone.Analyser.Type.Waveform;\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The analyser node.\n\t\t\t *  @private\n\t\t\t *  @type {Tone.Analyser}\n\t\t\t */\n\t        this._analyser = this.input = this.output = new Tone.Analyser(options);\n\t    };\n\t    Tone.extend(Tone.Waveform, Tone.AudioNode);\n\t    /**\n\t\t *  The default values.\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.Waveform.defaults = { 'size': 1024 };\n\t    /**\n\t\t *  Gets the waveform of the audio source. Returns the waveform data\n\t\t *  of length [size](#size) as a Float32Array with values between -1 and 1.\n\t\t *  @returns {TypedArray}\n\t\t */\n\t    Tone.Waveform.prototype.getValue = function () {\n\t        return this._analyser.getValue();\n\t    };\n\t    /**\n\t\t *  The size of analysis. This must be a power of two in the range 32 to 32768.\n\t\t *  @memberOf Tone.Waveform#\n\t\t *  @type {Number}\n\t\t *  @name size\n\t\t */\n\t    Object.defineProperty(Tone.Waveform.prototype, 'size', {\n\t        get: function () {\n\t            return this._analyser.size;\n\t        },\n\t        set: function (size) {\n\t            this._analyser.size = size;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.Waveform}  this\n\t\t */\n\t    Tone.Waveform.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._analyser.dispose();\n\t        this._analyser = null;\n\t    };\n\t    return Tone.Waveform;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.CtrlInterpolate will interpolate between given values based\n\t\t *         on the \"index\" property. Passing in an array or object literal\n\t\t *         will interpolate each of the parameters. Note (i.e. \"C3\")\n\t\t *         and Time (i.e. \"4n + 2\") can be interpolated. All other values are\n\t\t *         assumed to be numbers. \n\t\t *  @example\n\t\t * var interp = new Tone.CtrlInterpolate([0, 2, 9, 4]);\n\t\t * interp.index = 0.75;\n\t\t * interp.value; //returns 1.5\n\t\t *\n\t\t *  @example\n\t\t * var interp = new Tone.CtrlInterpolate([\n\t\t * \t[2, 4, 5],\n\t\t * \t[9, 3, 2],\n\t\t * ]);\n\t\t * @param {Array} values The array of values to interpolate over\n\t\t * @param {Positive} index The initial interpolation index.\n\t\t * @extends {Tone}\n\t\t */\n\t    Tone.CtrlInterpolate = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'values',\n\t            'index'\n\t        ], Tone.CtrlInterpolate);\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  The values to interpolate between\n\t\t\t *  @type  {Array}\n\t\t\t */\n\t        this.values = options.values;\n\t        /**\n\t\t\t *  The interpolated index between values. For example: a value of 1.5\n\t\t\t *  would interpolate equally between the value at index 1\n\t\t\t *  and the value at index 2. \n\t\t\t *  @example\n\t\t\t * interp.index = 0; \n\t\t\t * interp.value; //returns the value at 0\n\t\t\t * interp.index = 0.5;\n\t\t\t * interp.value; //returns the value between indices 0 and 1. \n\t\t\t *  @type  {Positive}\n\t\t\t */\n\t        this.index = options.index;\n\t    };\n\t    Tone.extend(Tone.CtrlInterpolate);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.CtrlInterpolate.defaults = {\n\t        'index': 0,\n\t        'values': []\n\t    };\n\t    /**\n\t\t *  The current interpolated value based on the index\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.CtrlInterpolate#\n\t\t *  @type {*}\n\t\t *  @name value\n\t\t */\n\t    Object.defineProperty(Tone.CtrlInterpolate.prototype, 'value', {\n\t        get: function () {\n\t            var index = this.index;\n\t            index = Math.min(index, this.values.length - 1);\n\t            var lowerPosition = Math.floor(index);\n\t            var lower = this.values[lowerPosition];\n\t            var upper = this.values[Math.ceil(index)];\n\t            return this._interpolate(index - lowerPosition, lower, upper);\n\t        }\n\t    });\n\t    /**\n\t\t *  Internal interpolation routine\n\t\t *  @param  {NormalRange}  index  The index between the lower and upper\n\t\t *  @param  {*}  lower \n\t\t *  @param  {*}  upper \n\t\t *  @return  {*}  The interpolated value\n\t\t *  @private\n\t\t */\n\t    Tone.CtrlInterpolate.prototype._interpolate = function (index, lower, upper) {\n\t        if (Tone.isArray(lower)) {\n\t            var retArray = [];\n\t            for (var i = 0; i < lower.length; i++) {\n\t                retArray[i] = this._interpolate(index, lower[i], upper[i]);\n\t            }\n\t            return retArray;\n\t        } else if (Tone.isObject(lower)) {\n\t            var retObj = {};\n\t            for (var attr in lower) {\n\t                retObj[attr] = this._interpolate(index, lower[attr], upper[attr]);\n\t            }\n\t            return retObj;\n\t        } else {\n\t            lower = this._toNumber(lower);\n\t            upper = this._toNumber(upper);\n\t            return (1 - index) * lower + index * upper;\n\t        }\n\t    };\n\t    /**\n\t\t *  Convert from the given type into a number\n\t\t *  @param  {Number|String}  value\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.CtrlInterpolate.prototype._toNumber = function (val) {\n\t        if (Tone.isNumber(val)) {\n\t            return val;\n\t        } else {\n\t            //otherwise assume that it's Time...\n\t            return this.toSeconds(val);\n\t        }\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.CtrlInterpolate}  this\n\t\t */\n\t    Tone.CtrlInterpolate.prototype.dispose = function () {\n\t        this.values = null;\n\t    };\n\t    return Tone.CtrlInterpolate;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.CtrlMarkov represents a Markov Chain where each call\n\t\t *         to Tone.CtrlMarkov.next will move to the next state. If the next\n\t\t *         state choice is an array, the next state is chosen randomly with\n\t\t *         even probability for all of the choices. For a weighted probability\n\t\t *         of the next choices, pass in an object with \"state\" and \"probability\" attributes. \n\t\t *         The probabilities will be normalized and then chosen. If no next options\n\t\t *         are given for the current state, the state will stay there. \n\t\t *  @extends {Tone}\n\t\t *  @example\n\t\t * var chain = new Tone.CtrlMarkov({\n\t\t * \t\"beginning\" : [\"end\", \"middle\"],\n\t\t * \t\"middle\" : \"end\"\n\t\t * });\n\t\t * chain.value = \"beginning\";\n\t\t * chain.next(); //returns \"end\" or \"middle\" with 50% probability\n\t\t *\n\t\t *  @example\n\t\t * var chain = new Tone.CtrlMarkov({\n\t\t * \t\"beginning\" : [{\"value\" : \"end\", \"probability\" : 0.8}, \n\t\t * \t\t\t\t\t{\"value\" : \"middle\", \"probability\" : 0.2}],\n\t\t * \t\"middle\" : \"end\"\n\t\t * });\n\t\t * chain.value = \"beginning\";\n\t\t * chain.next(); //returns \"end\" with 80% probability or \"middle\" with 20%.\n\t\t *  @param {Object} values An object with the state names as the keys\n\t\t *                         and the next state(s) as the values. \n\t\t */\n\t    Tone.CtrlMarkov = function (values, initial) {\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  The Markov values with states as the keys\n\t\t\t *  and next state(s) as the values. \n\t\t\t *  @type {Object}\n\t\t\t */\n\t        this.values = Tone.defaultArg(values, {});\n\t        /**\n\t\t\t *  The current state of the Markov values. The next\n\t\t\t *  state will be evaluated and returned when Tone.CtrlMarkov.next\n\t\t\t *  is invoked.\n\t\t\t *  @type {String}\n\t\t\t */\n\t        this.value = Tone.defaultArg(initial, Object.keys(this.values)[0]);\n\t    };\n\t    Tone.extend(Tone.CtrlMarkov);\n\t    /**\n\t\t *  Returns the next state of the Markov values. \n\t\t *  @return  {String}\n\t\t */\n\t    Tone.CtrlMarkov.prototype.next = function () {\n\t        if (this.values.hasOwnProperty(this.value)) {\n\t            var next = this.values[this.value];\n\t            if (Tone.isArray(next)) {\n\t                var distribution = this._getProbDistribution(next);\n\t                var rand = Math.random();\n\t                var total = 0;\n\t                for (var i = 0; i < distribution.length; i++) {\n\t                    var dist = distribution[i];\n\t                    if (rand > total && rand < total + dist) {\n\t                        var chosen = next[i];\n\t                        if (Tone.isObject(chosen)) {\n\t                            this.value = chosen.value;\n\t                        } else {\n\t                            this.value = chosen;\n\t                        }\n\t                    }\n\t                    total += dist;\n\t                }\n\t            } else {\n\t                this.value = next;\n\t            }\n\t        }\n\t        return this.value;\n\t    };\n\t    /**\n\t\t *  Choose randomly from an array weighted options in the form \n\t\t *  {\"state\" : string, \"probability\" : number} or an array of values\n\t\t *  @param  {Array}  options \n\t\t *  @return  {Array}  The randomly selected choice\n\t\t *  @private\n\t\t */\n\t    Tone.CtrlMarkov.prototype._getProbDistribution = function (options) {\n\t        var distribution = [];\n\t        var total = 0;\n\t        var needsNormalizing = false;\n\t        for (var i = 0; i < options.length; i++) {\n\t            var option = options[i];\n\t            if (Tone.isObject(option)) {\n\t                needsNormalizing = true;\n\t                distribution[i] = option.probability;\n\t            } else {\n\t                distribution[i] = 1 / options.length;\n\t            }\n\t            total += distribution[i];\n\t        }\n\t        if (needsNormalizing) {\n\t            //normalize the values\n\t            for (var j = 0; j < distribution.length; j++) {\n\t                distribution[j] = distribution[j] / total;\n\t            }\n\t        }\n\t        return distribution;\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.CtrlMarkov}  this\n\t\t */\n\t    Tone.CtrlMarkov.prototype.dispose = function () {\n\t        this.values = null;\n\t    };\n\t    return Tone.CtrlMarkov;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Generate patterns from an array of values.\n\t\t *         Has a number of arpeggiation and randomized\n\t\t *         selection patterns. \n\t\t *           <ul>\n\t\t *  \t        <li>\"up\" - cycles upward</li>\n\t\t *  \t\t\t<li>\"down\" - cycles downward</li>\n\t\t *  \t\t\t<li>\"upDown\" - up then and down</li>\n\t\t *  \t\t\t<li>\"downUp\" - cycles down then and up</li>\n\t\t *  \t\t\t<li>\"alternateUp\" - jump up two and down one</li>\n\t\t *  \t\t\t<li>\"alternateDown\" - jump down two and up one</li>\n\t\t *  \t\t\t<li>\"random\" - randomly select an index</li>\n\t\t *  \t\t\t<li>\"randomWalk\" - randomly moves one index away from the current position</li>\n\t\t *  \t\t\t<li>\"randomOnce\" - randomly select an index without repeating until all values have been chosen.</li>\n\t\t *     \t\t</ul>\n\t\t *  @param  {Array}  values   An array of options to choose from.\n\t\t *  @param  {Tone.CtrlPattern.Type=}  type  The name of the pattern.\n\t\t *  @extends {Tone}\n\t\t */\n\t    Tone.CtrlPattern = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'values',\n\t            'type'\n\t        ], Tone.CtrlPattern);\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  The array of values to arpeggiate over\n\t\t\t *  @type {Array}\n\t\t\t */\n\t        this.values = options.values;\n\t        /**\n\t\t\t *  The current position in the values array\n\t\t\t *  @type  {Number}\n\t\t\t */\n\t        this.index = 0;\n\t        /**\n\t\t\t *  The type placeholder\n\t\t\t *  @type {Tone.CtrlPattern.Type}\n\t\t\t *  @private\n\t\t\t */\n\t        this._type = null;\n\t        /**\n\t\t\t *  Shuffled values for the RandomOnce type\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._shuffled = null;\n\t        /**\n\t\t\t *  The direction of the movement\n\t\t\t *  @type {String}\n\t\t\t *  @private\n\t\t\t */\n\t        this._direction = null;\n\t        this.type = options.type;\n\t    };\n\t    Tone.extend(Tone.CtrlPattern);\n\t    /**\n\t\t *  The Control Patterns\n\t\t *  @type  {Object}\n\t\t *  @static\n\t\t */\n\t    Tone.CtrlPattern.Type = {\n\t        Up: 'up',\n\t        Down: 'down',\n\t        UpDown: 'upDown',\n\t        DownUp: 'downUp',\n\t        AlternateUp: 'alternateUp',\n\t        AlternateDown: 'alternateDown',\n\t        Random: 'random',\n\t        RandomWalk: 'randomWalk',\n\t        RandomOnce: 'randomOnce'\n\t    };\n\t    /**\n\t\t *  The default values. \n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.CtrlPattern.defaults = {\n\t        'type': Tone.CtrlPattern.Type.Up,\n\t        'values': []\n\t    };\n\t    /**\n\t\t *  The value at the current index of the pattern.\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.CtrlPattern#\n\t\t *  @type {*}\n\t\t *  @name value\n\t\t */\n\t    Object.defineProperty(Tone.CtrlPattern.prototype, 'value', {\n\t        get: function () {\n\t            //some safeguards\n\t            if (this.values.length === 0) {\n\t                return;\n\t            } else if (this.values.length === 1) {\n\t                return this.values[0];\n\t            }\n\t            this.index = Math.min(this.index, this.values.length - 1);\n\t            var val = this.values[this.index];\n\t            if (this.type === Tone.CtrlPattern.Type.RandomOnce) {\n\t                if (this.values.length !== this._shuffled.length) {\n\t                    this._shuffleValues();\n\t                }\n\t                val = this.values[this._shuffled[this.index]];\n\t            }\n\t            return val;\n\t        }\n\t    });\n\t    /**\n\t\t *  The pattern used to select the next\n\t\t *  item from the values array\n\t\t *  @memberOf Tone.CtrlPattern#\n\t\t *  @type {Tone.CtrlPattern.Type}\n\t\t *  @name type\n\t\t */\n\t    Object.defineProperty(Tone.CtrlPattern.prototype, 'type', {\n\t        get: function () {\n\t            return this._type;\n\t        },\n\t        set: function (type) {\n\t            this._type = type;\n\t            this._shuffled = null;\n\t            //the first index\n\t            if (this._type === Tone.CtrlPattern.Type.Up || this._type === Tone.CtrlPattern.Type.UpDown || this._type === Tone.CtrlPattern.Type.RandomOnce || this._type === Tone.CtrlPattern.Type.AlternateUp) {\n\t                this.index = 0;\n\t            } else if (this._type === Tone.CtrlPattern.Type.Down || this._type === Tone.CtrlPattern.Type.DownUp || this._type === Tone.CtrlPattern.Type.AlternateDown) {\n\t                this.index = this.values.length - 1;\n\t            }\n\t            //the direction\n\t            if (this._type === Tone.CtrlPattern.Type.UpDown || this._type === Tone.CtrlPattern.Type.AlternateUp) {\n\t                this._direction = Tone.CtrlPattern.Type.Up;\n\t            } else if (this._type === Tone.CtrlPattern.Type.DownUp || this._type === Tone.CtrlPattern.Type.AlternateDown) {\n\t                this._direction = Tone.CtrlPattern.Type.Down;\n\t            }\n\t            //randoms\n\t            if (this._type === Tone.CtrlPattern.Type.RandomOnce) {\n\t                this._shuffleValues();\n\t            } else if (this._type === Tone.CtrlPattern.Random) {\n\t                this.index = Math.floor(Math.random() * this.values.length);\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Return the next value given the current position\n\t\t *  and pattern.\n\t\t *  @return {*} The next value\n\t\t */\n\t    Tone.CtrlPattern.prototype.next = function () {\n\t        var type = this.type;\n\t        //choose the next index\n\t        if (type === Tone.CtrlPattern.Type.Up) {\n\t            this.index++;\n\t            if (this.index >= this.values.length) {\n\t                this.index = 0;\n\t            }\n\t        } else if (type === Tone.CtrlPattern.Type.Down) {\n\t            this.index--;\n\t            if (this.index < 0) {\n\t                this.index = this.values.length - 1;\n\t            }\n\t        } else if (type === Tone.CtrlPattern.Type.UpDown || type === Tone.CtrlPattern.Type.DownUp) {\n\t            if (this._direction === Tone.CtrlPattern.Type.Up) {\n\t                this.index++;\n\t            } else {\n\t                this.index--;\n\t            }\n\t            if (this.index < 0) {\n\t                this.index = 1;\n\t                this._direction = Tone.CtrlPattern.Type.Up;\n\t            } else if (this.index >= this.values.length) {\n\t                this.index = this.values.length - 2;\n\t                this._direction = Tone.CtrlPattern.Type.Down;\n\t            }\n\t        } else if (type === Tone.CtrlPattern.Type.Random) {\n\t            this.index = Math.floor(Math.random() * this.values.length);\n\t        } else if (type === Tone.CtrlPattern.Type.RandomWalk) {\n\t            if (Math.random() < 0.5) {\n\t                this.index--;\n\t                this.index = Math.max(this.index, 0);\n\t            } else {\n\t                this.index++;\n\t                this.index = Math.min(this.index, this.values.length - 1);\n\t            }\n\t        } else if (type === Tone.CtrlPattern.Type.RandomOnce) {\n\t            this.index++;\n\t            if (this.index >= this.values.length) {\n\t                this.index = 0;\n\t                //reshuffle the values for next time\n\t                this._shuffleValues();\n\t            }\n\t        } else if (type === Tone.CtrlPattern.Type.AlternateUp) {\n\t            if (this._direction === Tone.CtrlPattern.Type.Up) {\n\t                this.index += 2;\n\t                this._direction = Tone.CtrlPattern.Type.Down;\n\t            } else {\n\t                this.index -= 1;\n\t                this._direction = Tone.CtrlPattern.Type.Up;\n\t            }\n\t            if (this.index >= this.values.length) {\n\t                this.index = 0;\n\t                this._direction = Tone.CtrlPattern.Type.Up;\n\t            }\n\t        } else if (type === Tone.CtrlPattern.Type.AlternateDown) {\n\t            if (this._direction === Tone.CtrlPattern.Type.Up) {\n\t                this.index += 1;\n\t                this._direction = Tone.CtrlPattern.Type.Down;\n\t            } else {\n\t                this.index -= 2;\n\t                this._direction = Tone.CtrlPattern.Type.Up;\n\t            }\n\t            if (this.index < 0) {\n\t                this.index = this.values.length - 1;\n\t                this._direction = Tone.CtrlPattern.Type.Down;\n\t            }\n\t        }\n\t        return this.value;\n\t    };\n\t    /**\n\t\t *  Shuffles the values and places the results into the _shuffled\n\t\t *  @private\n\t\t */\n\t    Tone.CtrlPattern.prototype._shuffleValues = function () {\n\t        var copy = [];\n\t        this._shuffled = [];\n\t        for (var i = 0; i < this.values.length; i++) {\n\t            copy[i] = i;\n\t        }\n\t        while (copy.length > 0) {\n\t            var randVal = copy.splice(Math.floor(copy.length * Math.random()), 1);\n\t            this._shuffled.push(randVal[0]);\n\t        }\n\t    };\n\t    /**\n\t\t *  Clean up\n\t\t *  @returns {Tone.CtrlPattern} this\n\t\t */\n\t    Tone.CtrlPattern.prototype.dispose = function () {\n\t        this._shuffled = null;\n\t        this.values = null;\n\t    };\n\t    return Tone.CtrlPattern;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Choose a random value.\n\t\t *  @extends {Tone}\n\t\t *  @example\n\t\t * var randomWalk = new Tone.CtrlRandom({\n\t\t * \t\"min\" : 0,\n\t\t * \t\"max\" : 10,\n\t\t * \t\"integer\" : true\n\t\t * });\n\t\t * randomWalk.eval();\n\t\t *\n\t\t *  @param {Number|Time=} min The minimum return value.\n\t\t *  @param {Number|Time=} max The maximum return value.\n\t\t */\n\t    Tone.CtrlRandom = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'min',\n\t            'max'\n\t        ], Tone.CtrlRandom);\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  The minimum return value\n\t\t\t *  @type  {Number|Time}\n\t\t\t */\n\t        this.min = options.min;\n\t        /**\n\t\t\t *  The maximum return value\n\t\t\t *  @type  {Number|Time}\n\t\t\t */\n\t        this.max = options.max;\n\t        /**\n\t\t\t *  If the return value should be an integer\n\t\t\t *  @type  {Boolean}\n\t\t\t */\n\t        this.integer = options.integer;\n\t    };\n\t    Tone.extend(Tone.CtrlRandom);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.CtrlRandom.defaults = {\n\t        'min': 0,\n\t        'max': 1,\n\t        'integer': false\n\t    };\n\t    /**\n\t\t *  Return a random value between min and max. \n\t\t *  @readOnly\n\t\t *  @memberOf Tone.CtrlRandom#\n\t\t *  @type {*}\n\t\t *  @name value\n\t\t */\n\t    Object.defineProperty(Tone.CtrlRandom.prototype, 'value', {\n\t        get: function () {\n\t            var min = this.toSeconds(this.min);\n\t            var max = this.toSeconds(this.max);\n\t            var rand = Math.random();\n\t            var val = rand * min + (1 - rand) * max;\n\t            if (this.integer) {\n\t                val = Math.floor(val);\n\t            }\n\t            return val;\n\t        }\n\t    });\n\t    return Tone.CtrlRandom;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class A data structure for holding multiple buffers.\n\t\t *  \n\t\t *  @param  {Object|Array}    urls      An object literal or array\n\t\t *                                      of urls to load.\n\t\t *  @param  {Function=}  callback  The callback to invoke when\n\t\t *                                 the buffers are loaded. \n\t\t *  @extends {Tone}\n\t\t *  @example\n\t\t * //load a whole bank of piano samples\n\t\t * var pianoSamples = new Tone.Buffers({\n\t\t * \t\"C4\" : \"path/to/C4.mp3\"\n\t\t * \t\"C#4\" : \"path/to/C#4.mp3\"\n\t\t * \t\"D4\" : \"path/to/D4.mp3\"\n\t\t * \t\"D#4\" : \"path/to/D#4.mp3\"\n\t\t * \t...\n\t\t * }, function(){\n\t\t * \t//play one of the samples when they all load\n\t\t * \tplayer.buffer = pianoSamples.get(\"C4\");\n\t\t * \tplayer.start();\n\t\t * });\n\t\t * \t@example\n\t\t * //To pass in additional parameters in the second parameter\n\t\t * var buffers = new Tone.Buffers(urls, {\n\t\t * \t\"onload\" : callback,\n\t\t * \t\"baseUrl\" : \"../path/to/audio/\"\n\t\t * })\n\t\t */\n\t    Tone.Buffers = function (urls) {\n\t        //remove the urls from the options\n\t        var args = Array.prototype.slice.call(arguments);\n\t        args.shift();\n\t        var options = Tone.defaults(args, [\n\t            'onload',\n\t            'baseUrl'\n\t        ], Tone.Buffers);\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  All of the buffers\n\t\t\t *  @type  {Object}\n\t\t\t *  @private\n\t\t\t */\n\t        this._buffers = {};\n\t        /**\n\t\t\t *  A path which is prefixed before every url.\n\t\t\t *  @type  {String}\n\t\t\t */\n\t        this.baseUrl = options.baseUrl;\n\t        this._loadingCount = 0;\n\t        //add each one\n\t        for (var key in urls) {\n\t            this._loadingCount++;\n\t            this.add(key, urls[key], this._bufferLoaded.bind(this, options.onload));\n\t        }\n\t    };\n\t    Tone.extend(Tone.Buffers);\n\t    /**\n\t\t *  Defaults\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.Buffers.defaults = {\n\t        'onload': Tone.noOp,\n\t        'baseUrl': ''\n\t    };\n\t    /**\n\t\t *  True if the buffers object has a buffer by that name.\n\t\t *  @param  {String|Number}  name  The key or index of the \n\t\t *                                 buffer.\n\t\t *  @return  {Boolean}\n\t\t */\n\t    Tone.Buffers.prototype.has = function (name) {\n\t        return this._buffers.hasOwnProperty(name);\n\t    };\n\t    /**\n\t\t *  Get a buffer by name. If an array was loaded, \n\t\t *  then use the array index.\n\t\t *  @param  {String|Number}  name  The key or index of the \n\t\t *                                 buffer.\n\t\t *  @return  {Tone.Buffer}\n\t\t */\n\t    Tone.Buffers.prototype.get = function (name) {\n\t        if (this.has(name)) {\n\t            return this._buffers[name];\n\t        } else {\n\t            throw new Error('Tone.Buffers: no buffer named ' + name);\n\t        }\n\t    };\n\t    /**\n\t\t *  A buffer was loaded. decrement the counter.\n\t\t *  @param  {Function}  callback \n\t\t *  @private\n\t\t */\n\t    Tone.Buffers.prototype._bufferLoaded = function (callback) {\n\t        this._loadingCount--;\n\t        if (this._loadingCount === 0 && callback) {\n\t            callback(this);\n\t        }\n\t    };\n\t    /**\n\t\t * If the buffers are loaded or not\n\t\t * @memberOf Tone.Buffers#\n\t\t * @type {Boolean}\n\t\t * @name loaded\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Buffers.prototype, 'loaded', {\n\t        get: function () {\n\t            var isLoaded = true;\n\t            for (var buffName in this._buffers) {\n\t                var buff = this.get(buffName);\n\t                isLoaded = isLoaded && buff.loaded;\n\t            }\n\t            return isLoaded;\n\t        }\n\t    });\n\t    /**\n\t\t *  Add a buffer by name and url to the Buffers\n\t\t *  @param  {String}    name      A unique name to give\n\t\t *                                the buffer\n\t\t *  @param  {String|Tone.Buffer|Audiobuffer}  url  Either the url of the bufer, \n\t\t *                                                 or a buffer which will be added\n\t\t *                                                 with the given name.\n\t\t *  @param  {Function=}  callback  The callback to invoke \n\t\t *                                 when the url is loaded.\n\t\t */\n\t    Tone.Buffers.prototype.add = function (name, url, callback) {\n\t        callback = Tone.defaultArg(callback, Tone.noOp);\n\t        if (url instanceof Tone.Buffer) {\n\t            this._buffers[name] = url;\n\t            callback(this);\n\t        } else if (url instanceof AudioBuffer) {\n\t            this._buffers[name] = new Tone.Buffer(url);\n\t            callback(this);\n\t        } else if (Tone.isString(url)) {\n\t            this._buffers[name] = new Tone.Buffer(this.baseUrl + url, callback);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.Buffers} this\n\t\t */\n\t    Tone.Buffers.prototype.dispose = function () {\n\t        Tone.prototype.dispose.call(this);\n\t        for (var name in this._buffers) {\n\t            this._buffers[name].dispose();\n\t        }\n\t        this._buffers = null;\n\t        return this;\n\t    };\n\t    return Tone.Buffers;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  buses are another way of routing audio\n\t\t *\n\t\t *  augments Tone.prototype to include send and recieve\n\t\t */\n\t    /**\n\t\t *  All of the routes\n\t\t *\n\t\t *  @type {Object}\n\t\t *  @static\n\t\t *  @private\n\t\t */\n\t    var Buses = {};\n\t    /**\n\t\t *  Send this signal to the channel name.\n\t\t *  @param  {String} channelName A named channel to send the signal to.\n\t\t *  @param  {Decibels} amount The amount of the source to send to the bus.\n\t\t *  @return {GainNode} The gain node which connects this node to the desired channel.\n\t\t *                     Can be used to adjust the levels of the send.\n\t\t *  @example\n\t\t * source.send(\"reverb\", -12);\n\t\t */\n\t    Tone.prototype.send = function (channelName, amount) {\n\t        if (!Buses.hasOwnProperty(channelName)) {\n\t            Buses[channelName] = this.context.createGain();\n\t        }\n\t        amount = Tone.defaultArg(amount, 0);\n\t        var sendKnob = new Tone.Gain(amount, Tone.Type.Decibels);\n\t        this.connect(sendKnob);\n\t        sendKnob.connect(Buses[channelName]);\n\t        return sendKnob;\n\t    };\n\t    /**\n\t\t *  Recieve the input from the desired channelName to the input\n\t\t *\n\t\t *  @param  {String} channelName A named channel to send the signal to.\n\t\t *  @param  {Number=} channelNumber The channel to connect to\n\t\t *  @returns {Tone} this\n\t\t *  @example\n\t\t * reverbEffect.receive(\"reverb\");\n\t\t */\n\t    Tone.prototype.receive = function (channelName, inputNum) {\n\t        if (!Buses.hasOwnProperty(channelName)) {\n\t            Buses[channelName] = this.context.createGain();\n\t        }\n\t        Buses[channelName].connect(this, 0, inputNum);\n\t        return this;\n\t    };\n\t    //remove all the send/receives when a new audio context is passed in\n\t    Tone.Context.on('init', function (context) {\n\t        if (context.Buses) {\n\t            Buses = context.Buses;\n\t        } else {\n\t            Buses = {};\n\t            context.Buses = Buses;\n\t        }\n\t    });\n\t    return Tone;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Draw is useful for synchronizing visuals and audio events.\n\t\t *         Callbacks from Tone.Transport or any of the Tone.Event classes\n\t\t *         always happen _before_ the scheduled time and are not synchronized\n\t\t *         to the animation frame so they are not good for triggering tightly\n\t\t *         synchronized visuals and sound. Tone.Draw makes it easy to schedule\n\t\t *         callbacks using the AudioContext time and uses requestAnimationFrame.\n\t\t *         \n\t\t *  @singleton\n\t\t *  @extends {Tone}\n\t\t *  @example\n\t\t * Tone.Transport.schedule(function(time){\n\t\t * \t//use the time argument to schedule a callback with Tone.Draw\n\t\t * \tTone.Draw.schedule(function(){\n\t\t * \t\t//do drawing or DOM manipulation here\n\t\t * \t}, time)\n\t\t * }, \"+0.5\")\n\t\t */\n\t    Tone.Draw = function () {\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  All of the events.\n\t\t\t *  @type  {Tone.Timeline}\n\t\t\t *  @private\n\t\t\t */\n\t        this._events = new Tone.Timeline();\n\t        /**\n\t\t\t *  The duration after which events are not invoked.\n\t\t\t *  @type  {Number}\n\t\t\t *  @default 0.25\n\t\t\t */\n\t        this.expiration = 0.25;\n\t        /**\n\t\t\t *  The amount of time before the scheduled time \n\t\t\t *  that the callback can be invoked. Default is\n\t\t\t *  half the time of an animation frame (0.008 seconds).\n\t\t\t *  @type  {Number}\n\t\t\t *  @default 0.008\n\t\t\t */\n\t        this.anticipation = 0.008;\n\t        /**\n\t\t\t *  The draw loop\n\t\t\t *  @type  {Function}\n\t\t\t *  @private\n\t\t\t */\n\t        this._boundDrawLoop = this._drawLoop.bind(this);\n\t    };\n\t    Tone.extend(Tone.Draw);\n\t    /**\n\t\t *  Schedule a function at the given time to be invoked\n\t\t *  on the nearest animation frame.\n\t\t *  @param  {Function}  callback  Callback is invoked at the given time.\n\t\t *  @param  {Time}    time      The time relative to the AudioContext time\n\t\t *                              to invoke the callback.\n\t\t *  @return  {Tone.Draw}    this\n\t\t */\n\t    Tone.Draw.prototype.schedule = function (callback, time) {\n\t        this._events.add({\n\t            callback: callback,\n\t            time: this.toSeconds(time)\n\t        });\n\t        //start the draw loop on the first event\n\t        if (this._events.length === 1) {\n\t            requestAnimationFrame(this._boundDrawLoop);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancel events scheduled after the given time\n\t\t *  @param  {Time=}  after  Time after which scheduled events will \n\t\t *                          be removed from the scheduling timeline.\n\t\t *  @return  {Tone.Draw}  this\n\t\t */\n\t    Tone.Draw.prototype.cancel = function (after) {\n\t        this._events.cancel(this.toSeconds(after));\n\t        return this;\n\t    };\n\t    /**\n\t\t *  The draw loop\n\t\t *  @private\n\t\t */\n\t    Tone.Draw.prototype._drawLoop = function () {\n\t        var now = Tone.now();\n\t        while (this._events.length && this._events.peek().time - this.anticipation <= now) {\n\t            var event = this._events.shift();\n\t            if (now - event.time <= this.expiration) {\n\t                event.callback();\n\t            }\n\t        }\n\t        if (this._events.length > 0) {\n\t            requestAnimationFrame(this._boundDrawLoop);\n\t        }\n\t    };\n\t    //make a singleton\n\t    Tone.Draw = new Tone.Draw();\n\t    return Tone.Draw;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Both Tone.Panner3D and Tone.Listener have a position in 3D space\n\t\t *          using a right-handed cartesian coordinate system.\n\t\t *          The units used in the coordinate system are not defined;\n\t\t *          these coordinates are independent/invariant of any particular\n\t\t *          units such as meters or feet. Tone.Panner3D objects have an forward\n\t\t *          vector representing the direction the sound is projecting. Additionally,\n\t\t *          they have a sound cone representing how directional the sound is.\n\t\t *          For example, the sound could be omnidirectional, in which case it would\n\t\t *          be heard anywhere regardless of its forward, or it can be more directional\n\t\t *          and heard only if it is facing the listener. Tone.Listener objects\n\t\t *          (representing a person's ears) have an forward and up vector\n\t\t *          representing in which direction the person is facing. Because both the\n\t\t *          source stream and the listener can be moving, they both have a velocity\n\t\t *          vector representing both the speed and direction of movement. Taken together,\n\t\t *          these two velocities can be used to generate a doppler shift effect which changes the pitch.\n\t\t *          <br><br>\n\t\t *          Note: the position of the Listener will have no effect on nodes not connected to a Tone.Panner3D\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone}\n\t\t *  @singleton\n\t\t */\n\t    Tone.Listener = function () {\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  Holds the current forward orientation\n\t\t\t *  @type  {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._orientation = [\n\t            0,\n\t            0,\n\t            0,\n\t            0,\n\t            0,\n\t            0\n\t        ];\n\t        /**\n\t\t\t *  Holds the current position\n\t\t\t *  @type  {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._position = [\n\t            0,\n\t            0,\n\t            0\n\t        ];\n\t        Tone.getContext(function () {\n\t            // set the default position/forward\n\t            this.set(ListenerConstructor.defaults);\n\t        }.bind(this));\n\t    };\n\t    Tone.extend(Tone.Listener);\n\t    /**\n\t\t *  Defaults according to the specification\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Listener.defaults = {\n\t        'positionX': 0,\n\t        'positionY': 0,\n\t        'positionZ': 0,\n\t        'forwardX': 0,\n\t        'forwardY': 0,\n\t        'forwardZ': 1,\n\t        'upX': 0,\n\t        'upY': 1,\n\t        'upZ': 0\n\t    };\n\t    /**\n\t\t * The ramp time which is applied to the setTargetAtTime\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t    Tone.Listener.prototype._rampTimeConstant = 0.01;\n\t    /**\n\t\t *  Sets the position of the listener in 3d space.\n\t\t *  @param  {Number}  x\n\t\t *  @param  {Number}  y\n\t\t *  @param  {Number}  z\n\t\t *  @return {Tone.Listener} this\n\t\t */\n\t    Tone.Listener.prototype.setPosition = function (x, y, z) {\n\t        if (this.context.listener.positionX) {\n\t            var now = this.now();\n\t            this.context.listener.positionX.setTargetAtTime(x, now, this._rampTimeConstant);\n\t            this.context.listener.positionY.setTargetAtTime(y, now, this._rampTimeConstant);\n\t            this.context.listener.positionZ.setTargetAtTime(z, now, this._rampTimeConstant);\n\t        } else {\n\t            this.context.listener.setPosition(x, y, z);\n\t        }\n\t        this._position = Array.prototype.slice.call(arguments);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Sets the orientation of the listener using two vectors, the forward\n\t\t *  vector (which direction the listener is facing) and the up vector\n\t\t *  (which the up direction of the listener). An up vector\n\t\t *  of 0, 0, 1 is equivalent to the listener standing up in the Z direction.\n\t\t *  @param  {Number}  x\n\t\t *  @param  {Number}  y\n\t\t *  @param  {Number}  z\n\t\t *  @param  {Number}  upX\n\t\t *  @param  {Number}  upY\n\t\t *  @param  {Number}  upZ\n\t\t *  @return {Tone.Listener} this\n\t\t */\n\t    Tone.Listener.prototype.setOrientation = function (x, y, z, upX, upY, upZ) {\n\t        if (this.context.listener.forwardX) {\n\t            var now = this.now();\n\t            this.context.listener.forwardX.setTargetAtTime(x, now, this._rampTimeConstant);\n\t            this.context.listener.forwardY.setTargetAtTime(y, now, this._rampTimeConstant);\n\t            this.context.listener.forwardZ.setTargetAtTime(z, now, this._rampTimeConstant);\n\t            this.context.listener.upX.setTargetAtTime(upX, now, this._rampTimeConstant);\n\t            this.context.listener.upY.setTargetAtTime(upY, now, this._rampTimeConstant);\n\t            this.context.listener.upZ.setTargetAtTime(upZ, now, this._rampTimeConstant);\n\t        } else {\n\t            this.context.listener.setOrientation(x, y, z, upX, upY, upZ);\n\t        }\n\t        this._orientation = Array.prototype.slice.call(arguments);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  The x position of the panner object.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Listener#\n\t\t *  @name positionX\n\t\t */\n\t    Object.defineProperty(Tone.Listener.prototype, 'positionX', {\n\t        set: function (pos) {\n\t            this._position[0] = pos;\n\t            this.setPosition.apply(this, this._position);\n\t        },\n\t        get: function () {\n\t            return this._position[0];\n\t        }\n\t    });\n\t    /**\n\t\t *  The y position of the panner object.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Listener#\n\t\t *  @name positionY\n\t\t */\n\t    Object.defineProperty(Tone.Listener.prototype, 'positionY', {\n\t        set: function (pos) {\n\t            this._position[1] = pos;\n\t            this.setPosition.apply(this, this._position);\n\t        },\n\t        get: function () {\n\t            return this._position[1];\n\t        }\n\t    });\n\t    /**\n\t\t *  The z position of the panner object.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Listener#\n\t\t *  @name positionZ\n\t\t */\n\t    Object.defineProperty(Tone.Listener.prototype, 'positionZ', {\n\t        set: function (pos) {\n\t            this._position[2] = pos;\n\t            this.setPosition.apply(this, this._position);\n\t        },\n\t        get: function () {\n\t            return this._position[2];\n\t        }\n\t    });\n\t    /**\n\t\t *  The x coordinate of the listeners front direction. i.e.\n\t\t *  which way they are facing.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Listener#\n\t\t *  @name forwardX\n\t\t */\n\t    Object.defineProperty(Tone.Listener.prototype, 'forwardX', {\n\t        set: function (pos) {\n\t            this._orientation[0] = pos;\n\t            this.setOrientation.apply(this, this._orientation);\n\t        },\n\t        get: function () {\n\t            return this._orientation[0];\n\t        }\n\t    });\n\t    /**\n\t\t *  The y coordinate of the listeners front direction. i.e.\n\t\t *  which way they are facing.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Listener#\n\t\t *  @name forwardY\n\t\t */\n\t    Object.defineProperty(Tone.Listener.prototype, 'forwardY', {\n\t        set: function (pos) {\n\t            this._orientation[1] = pos;\n\t            this.setOrientation.apply(this, this._orientation);\n\t        },\n\t        get: function () {\n\t            return this._orientation[1];\n\t        }\n\t    });\n\t    /**\n\t\t *  The z coordinate of the listeners front direction. i.e.\n\t\t *  which way they are facing.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Listener#\n\t\t *  @name forwardZ\n\t\t */\n\t    Object.defineProperty(Tone.Listener.prototype, 'forwardZ', {\n\t        set: function (pos) {\n\t            this._orientation[2] = pos;\n\t            this.setOrientation.apply(this, this._orientation);\n\t        },\n\t        get: function () {\n\t            return this._orientation[2];\n\t        }\n\t    });\n\t    /**\n\t\t *  The x coordinate of the listener's up direction. i.e.\n\t\t *  the direction the listener is standing in.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Listener#\n\t\t *  @name upX\n\t\t */\n\t    Object.defineProperty(Tone.Listener.prototype, 'upX', {\n\t        set: function (pos) {\n\t            this._orientation[3] = pos;\n\t            this.setOrientation.apply(this, this._orientation);\n\t        },\n\t        get: function () {\n\t            return this._orientation[3];\n\t        }\n\t    });\n\t    /**\n\t\t *  The y coordinate of the listener's up direction. i.e.\n\t\t *  the direction the listener is standing in.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Listener#\n\t\t *  @name upY\n\t\t */\n\t    Object.defineProperty(Tone.Listener.prototype, 'upY', {\n\t        set: function (pos) {\n\t            this._orientation[4] = pos;\n\t            this.setOrientation.apply(this, this._orientation);\n\t        },\n\t        get: function () {\n\t            return this._orientation[4];\n\t        }\n\t    });\n\t    /**\n\t\t *  The z coordinate of the listener's up direction. i.e.\n\t\t *  the direction the listener is standing in.\n\t\t *  @type {Number}\n\t\t *  @memberOf Tone.Listener#\n\t\t *  @name upZ\n\t\t */\n\t    Object.defineProperty(Tone.Listener.prototype, 'upZ', {\n\t        set: function (pos) {\n\t            this._orientation[5] = pos;\n\t            this.setOrientation.apply(this, this._orientation);\n\t        },\n\t        get: function () {\n\t            return this._orientation[5];\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Listener} this\n\t\t */\n\t    Tone.Listener.prototype.dispose = function () {\n\t        this._orientation = null;\n\t        this._position = null;\n\t        return this;\n\t    };\n\t    //SINGLETON SETUP\n\t    var ListenerConstructor = Tone.Listener;\n\t    Tone.Listener = new ListenerConstructor();\n\t    Tone.Context.on('init', function (context) {\n\t        if (context.Listener instanceof ListenerConstructor) {\n\t            //a single listener object\n\t            Tone.Listener = context.Listener;\n\t        } else {\n\t            //make new Listener insides\n\t            Tone.Listener = new ListenerConstructor();\n\t        }\n\t        context.Listener = Tone.Listener;\n\t    });\n\t    //END SINGLETON SETUP\n\t    return Tone.Listener;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t * Because of a bug in iOS causing the currentTime to increment\n\t\t * before the rendering is started, sometimes it takes multiple\n\t\t * attempts to render the audio correctly.\n\t\t * @private\n\t\t */\n\t    function attemptRender(callback, duration, sampleRate, tries) {\n\t        tries = Tone.defaultArg(tries, 0);\n\t        var context = new Tone.OfflineContext(2, duration, sampleRate);\n\t        Tone.context = context;\n\t        //invoke the callback/scheduling\n\t        var response = callback(Tone.Transport);\n\t        if (context.currentTime > 0 && tries < 1000) {\n\t            return attemptRender(callback, duration, sampleRate, ++tries);\n\t        } else {\n\t            return {\n\t                'response': response,\n\t                'context': context\n\t            };\n\t        }\n\t    }\n\t    /**\n\t\t *  Generate a buffer by rendering all of the Tone.js code within the callback using the OfflineAudioContext.\n\t\t *  The OfflineAudioContext is capable of rendering much faster than real time in many cases.\n\t\t *  The callback function also passes in an offline instance of Tone.Transport which can be used\n\t\t *  to schedule events along the Transport. **NOTE** OfflineAudioContext has the same restrictions\n\t\t *  as the AudioContext in that on certain platforms (like iOS) it must be invoked by an explicit\n\t\t *  user action like a click or tap. \n\t\t *  @param  {Function}  callback  All Tone.js nodes which are created and scheduled within this callback are recorded into the output Buffer.\n\t\t *  @param  {Time}  duration     the amount of time to record for.\n\t\t *  @return  {Promise}  The promise which is invoked with the Tone.Buffer of the recorded output.\n\t\t *  @example\n\t\t * //render 2 seconds of the oscillator\n\t\t * Tone.Offline(function(){\n\t\t * \t//only nodes created in this callback will be recorded\n\t\t * \tvar oscillator = new Tone.Oscillator().toMaster().start(0)\n\t\t * \t//schedule their events\n\t\t * }, 2).then(function(buffer){\n\t\t * \t//do something with the output buffer\n\t\t * })\n\t\t * @example\n\t\t * //can also schedule events along the Transport\n\t\t * //using the passed in Offline Transport\n\t\t * Tone.Offline(function(Transport){\n\t\t * \tvar osc = new Tone.Oscillator().toMaster()\n\t\t * \tTransport.schedule(function(time){\n\t\t * \t\tosc.start(time).stop(time + 0.1)\n\t\t * \t}, 1)\n\t\t * \tTransport.start(0.2)\n\t\t * }, 4).then(function(buffer){\n\t\t * \t//do something with the output buffer\n\t\t * })\n\t\t */\n\t    Tone.Offline = function (callback, duration) {\n\t        //set the OfflineAudioContext\n\t        var sampleRate = Tone.context.sampleRate;\n\t        var originalContext = Tone.context;\n\t        var renderRet = attemptRender(callback, duration, sampleRate);\n\t        var response = renderRet.response;\n\t        var context = renderRet.context;\n\t        var ret;\n\t        if (response instanceof Promise) {\n\t            //wait for the promise to resolve\n\t            ret = response.then(function () {\n\t                //then render the audio\n\t                return context.render();\n\t            });\n\t        } else {\n\t            //process the audio\n\t            ret = context.render();\n\t        }\n\t        //return the original AudioContext\n\t        Tone.context = originalContext;\n\t        //return the audio\n\t        return ret.then(function (buffer) {\n\t            //wrap it in a Tone.Buffer\n\t            return new Tone.Buffer(buffer);\n\t        });\n\t    };\n\t    return Tone.Offline;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t * \t@class  Tone.Effect is the base class for effects. Connect the effect between\n\t\t * \t        the effectSend and effectReturn GainNodes, then control the amount of\n\t\t * \t        effect which goes to the output using the wet control.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {NormalRange|Object} [wet] The starting wet value.\n\t\t */\n\t    Tone.Effect = function () {\n\t        var options = Tone.defaults(arguments, ['wet'], Tone.Effect);\n\t        Tone.AudioNode.call(this);\n\t        this.createInsOuts(1, 1);\n\t        /**\n\t\t\t *  the drywet knob to control the amount of effect\n\t\t\t *  @type {Tone.CrossFade}\n\t\t\t *  @private\n\t\t\t */\n\t        this._dryWet = new Tone.CrossFade(options.wet);\n\t        /**\n\t\t\t *  The wet control is how much of the effected\n\t\t\t *  will pass through to the output. 1 = 100% effected\n\t\t\t *  signal, 0 = 100% dry signal.\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.wet = this._dryWet.fade;\n\t        /**\n\t\t\t *  connect the effectSend to the input of hte effect\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this.effectSend = new Tone.Gain();\n\t        /**\n\t\t\t *  connect the output of the effect to the effectReturn\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this.effectReturn = new Tone.Gain();\n\t        //connections\n\t        this.input.connect(this._dryWet.a);\n\t        this.input.connect(this.effectSend);\n\t        this.effectReturn.connect(this._dryWet.b);\n\t        this._dryWet.connect(this.output);\n\t        this._readOnly(['wet']);\n\t    };\n\t    Tone.extend(Tone.Effect, Tone.AudioNode);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Effect.defaults = { 'wet': 1 };\n\t    /**\n\t\t *  chains the effect in between the effectSend and effectReturn\n\t\t *  @param  {Tone} effect\n\t\t *  @private\n\t\t *  @returns {Tone.Effect} this\n\t\t */\n\t    Tone.Effect.prototype.connectEffect = function (effect) {\n\t        this.effectSend.chain(effect, this.effectReturn);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Effect} this\n\t\t */\n\t    Tone.Effect.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._dryWet.dispose();\n\t        this._dryWet = null;\n\t        this.effectSend.dispose();\n\t        this.effectSend = null;\n\t        this.effectReturn.dispose();\n\t        this.effectReturn = null;\n\t        this._writable(['wet']);\n\t        this.wet = null;\n\t        return this;\n\t    };\n\t    return Tone.Effect;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.AutoFilter is a Tone.Filter with a Tone.LFO connected to the filter cutoff frequency.\n\t\t *         Setting the LFO rate and depth allows for control over the filter modulation rate \n\t\t *         and depth.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Effect}\n\t\t *  @param {Time|Object} [frequency] The rate of the LFO.\n\t\t *  @param {Frequency=} baseFrequency The lower value of the LFOs oscillation\n\t \t *  @param {Frequency=} octaves The number of octaves above the baseFrequency\n\t\t *  @example\n\t\t * //create an autofilter and start it's LFO\n\t\t * var autoFilter = new Tone.AutoFilter(\"4n\").toMaster().start();\n\t\t * //route an oscillator through the filter and start it\n\t\t * var oscillator = new Tone.Oscillator().connect(autoFilter).start();\n\t\t */\n\t    Tone.AutoFilter = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'baseFrequency',\n\t            'octaves'\n\t        ], Tone.AutoFilter);\n\t        Tone.Effect.call(this, options);\n\t        /**\n\t\t\t *  the lfo which drives the filter cutoff\n\t\t\t *  @type {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfo = new Tone.LFO({\n\t            'frequency': options.frequency,\n\t            'amplitude': options.depth\n\t        });\n\t        /**\n\t\t\t * The range of the filter modulating between the min and max frequency. \n\t\t\t * 0 = no modulation. 1 = full modulation.\n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t        this.depth = this._lfo.amplitude;\n\t        /**\n\t\t\t * How fast the filter modulates between min and max. \n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t        this.frequency = this._lfo.frequency;\n\t        /**\n\t\t\t *  The filter node\n\t\t\t *  @type {Tone.Filter}\n\t\t\t */\n\t        this.filter = new Tone.Filter(options.filter);\n\t        /**\n\t\t\t *  The octaves placeholder\n\t\t\t *  @type {Positive}\n\t\t\t *  @private\n\t\t\t */\n\t        this._octaves = 0;\n\t        //connections\n\t        this.connectEffect(this.filter);\n\t        this._lfo.connect(this.filter.frequency);\n\t        this.type = options.type;\n\t        this._readOnly([\n\t            'frequency',\n\t            'depth'\n\t        ]);\n\t        this.octaves = options.octaves;\n\t        this.baseFrequency = options.baseFrequency;\n\t    };\n\t    //extend Effect\n\t    Tone.extend(Tone.AutoFilter, Tone.Effect);\n\t    /**\n\t\t *  defaults\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.AutoFilter.defaults = {\n\t        'frequency': 1,\n\t        'type': 'sine',\n\t        'depth': 1,\n\t        'baseFrequency': 200,\n\t        'octaves': 2.6,\n\t        'filter': {\n\t            'type': 'lowpass',\n\t            'rolloff': -12,\n\t            'Q': 1\n\t        }\n\t    };\n\t    /**\n\t\t * Start the effect.\n\t\t * @param {Time} [time=now] When the LFO will start. \n\t\t * @returns {Tone.AutoFilter} this\n\t\t */\n\t    Tone.AutoFilter.prototype.start = function (time) {\n\t        this._lfo.start(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Stop the effect.\n\t\t * @param {Time} [time=now] When the LFO will stop. \n\t\t * @returns {Tone.AutoFilter} this\n\t\t */\n\t    Tone.AutoFilter.prototype.stop = function (time) {\n\t        this._lfo.stop(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Sync the filter to the transport.\n\t\t * @param {Time} [delay=0] Delay time before starting the effect after the\n\t\t *                               Transport has started. \n\t\t * @returns {Tone.AutoFilter} this\n\t\t */\n\t    Tone.AutoFilter.prototype.sync = function (delay) {\n\t        this._lfo.sync(delay);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Unsync the filter from the transport.\n\t\t * @returns {Tone.AutoFilter} this\n\t\t */\n\t    Tone.AutoFilter.prototype.unsync = function () {\n\t        this._lfo.unsync();\n\t        return this;\n\t    };\n\t    /**\n\t\t * Type of oscillator attached to the AutoFilter. \n\t\t * Possible values: \"sine\", \"square\", \"triangle\", \"sawtooth\".\n\t\t * @memberOf Tone.AutoFilter#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.AutoFilter.prototype, 'type', {\n\t        get: function () {\n\t            return this._lfo.type;\n\t        },\n\t        set: function (type) {\n\t            this._lfo.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t * The minimum value of the filter's cutoff frequency.\n\t\t * @memberOf Tone.AutoFilter#\n\t\t * @type {Frequency}\n\t\t * @name min\n\t\t */\n\t    Object.defineProperty(Tone.AutoFilter.prototype, 'baseFrequency', {\n\t        get: function () {\n\t            return this._lfo.min;\n\t        },\n\t        set: function (freq) {\n\t            this._lfo.min = this.toFrequency(freq);\n\t            //and set the max\n\t            this.octaves = this._octaves;\n\t        }\n\t    });\n\t    /**\n\t\t * The maximum value of the filter's cutoff frequency. \n\t\t * @memberOf Tone.AutoFilter#\n\t\t * @type {Positive}\n\t\t * @name octaves\n\t\t */\n\t    Object.defineProperty(Tone.AutoFilter.prototype, 'octaves', {\n\t        get: function () {\n\t            return this._octaves;\n\t        },\n\t        set: function (oct) {\n\t            this._octaves = oct;\n\t            this._lfo.max = this.baseFrequency * Math.pow(2, oct);\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up. \n\t\t *  @returns {Tone.AutoFilter} this\n\t\t */\n\t    Tone.AutoFilter.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._lfo.dispose();\n\t        this._lfo = null;\n\t        this.filter.dispose();\n\t        this.filter = null;\n\t        this._writable([\n\t            'frequency',\n\t            'depth'\n\t        ]);\n\t        this.frequency = null;\n\t        this.depth = null;\n\t        return this;\n\t    };\n\t    return Tone.AutoFilter;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.AutoPanner is a Tone.Panner with an LFO connected to the pan amount. \n\t\t *         More on using autopanners [here](https://www.ableton.com/en/blog/autopan-chopper-effect-and-more-liveschool/).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Effect}\n\t\t *  @param {Frequency|Object} [frequency] Rate of left-right oscillation. \n\t\t *  @example\n\t\t * //create an autopanner and start it's LFO\n\t\t * var autoPanner = new Tone.AutoPanner(\"4n\").toMaster().start();\n\t\t * //route an oscillator through the panner and start it\n\t\t * var oscillator = new Tone.Oscillator().connect(autoPanner).start();\n\t\t */\n\t    Tone.AutoPanner = function () {\n\t        var options = Tone.defaults(arguments, ['frequency'], Tone.AutoPanner);\n\t        Tone.Effect.call(this, options);\n\t        /**\n\t\t\t *  the lfo which drives the panning\n\t\t\t *  @type {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfo = new Tone.LFO({\n\t            'frequency': options.frequency,\n\t            'amplitude': options.depth,\n\t            'min': -1,\n\t            'max': 1\n\t        });\n\t        /**\n\t\t\t * The amount of panning between left and right. \n\t\t\t * 0 = always center. 1 = full range between left and right. \n\t\t\t * @type {NormalRange}\n\t\t\t * @signal\n\t\t\t */\n\t        this.depth = this._lfo.amplitude;\n\t        /**\n\t\t\t *  the panner node which does the panning\n\t\t\t *  @type {Tone.Panner}\n\t\t\t *  @private\n\t\t\t */\n\t        this._panner = new Tone.Panner();\n\t        /**\n\t\t\t * How fast the panner modulates between left and right. \n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t        this.frequency = this._lfo.frequency;\n\t        //connections\n\t        this.connectEffect(this._panner);\n\t        this._lfo.connect(this._panner.pan);\n\t        this.type = options.type;\n\t        this._readOnly([\n\t            'depth',\n\t            'frequency'\n\t        ]);\n\t    };\n\t    //extend Effect\n\t    Tone.extend(Tone.AutoPanner, Tone.Effect);\n\t    /**\n\t\t *  defaults\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.AutoPanner.defaults = {\n\t        'frequency': 1,\n\t        'type': 'sine',\n\t        'depth': 1\n\t    };\n\t    /**\n\t\t * Start the effect.\n\t\t * @param {Time} [time=now] When the LFO will start. \n\t\t * @returns {Tone.AutoPanner} this\n\t\t */\n\t    Tone.AutoPanner.prototype.start = function (time) {\n\t        this._lfo.start(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Stop the effect.\n\t\t * @param {Time} [time=now] When the LFO will stop. \n\t\t * @returns {Tone.AutoPanner} this\n\t\t */\n\t    Tone.AutoPanner.prototype.stop = function (time) {\n\t        this._lfo.stop(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Sync the panner to the transport.\n\t\t * @param {Time} [delay=0] Delay time before starting the effect after the\n\t\t *                               Transport has started. \n\t\t * @returns {Tone.AutoPanner} this\n\t\t */\n\t    Tone.AutoPanner.prototype.sync = function (delay) {\n\t        this._lfo.sync(delay);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Unsync the panner from the transport\n\t\t * @returns {Tone.AutoPanner} this\n\t\t */\n\t    Tone.AutoPanner.prototype.unsync = function () {\n\t        this._lfo.unsync();\n\t        return this;\n\t    };\n\t    /**\n\t\t * Type of oscillator attached to the AutoFilter. \n\t\t * Possible values: \"sine\", \"square\", \"triangle\", \"sawtooth\".\n\t\t * @memberOf Tone.AutoFilter#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.AutoPanner.prototype, 'type', {\n\t        get: function () {\n\t            return this._lfo.type;\n\t        },\n\t        set: function (type) {\n\t            this._lfo.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.AutoPanner} this\n\t\t */\n\t    Tone.AutoPanner.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._lfo.dispose();\n\t        this._lfo = null;\n\t        this._panner.dispose();\n\t        this._panner = null;\n\t        this._writable([\n\t            'depth',\n\t            'frequency'\n\t        ]);\n\t        this.frequency = null;\n\t        this.depth = null;\n\t        return this;\n\t    };\n\t    return Tone.AutoPanner;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.AutoWah connects a Tone.Follower to a bandpass filter (Tone.Filter).\n\t\t *          The frequency of the filter is adjusted proportionally to the\n\t\t *          incoming signal's amplitude. Inspiration from [Tuna.js](https://github.com/Dinahmoe/tuna).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Effect}\n\t\t *  @param {Frequency|Object} [baseFrequency] The frequency the filter is set\n\t\t *                                            to at the low point of the wah\n\t\t *  @param {Positive} [octaves] The number of octaves above the baseFrequency\n\t\t *                                the filter will sweep to when fully open\n\t\t *  @param {Decibels} [sensitivity] The decibel threshold sensitivity for\n\t\t *                                   the incoming signal. Normal range of -40 to 0.\n\t\t *  @example\n\t\t * var autoWah = new Tone.AutoWah(50, 6, -30).toMaster();\n\t\t * //initialize the synth and connect to autowah\n\t\t * var synth = new Synth.connect(autoWah);\n\t\t * //Q value influences the effect of the wah - default is 2\n\t\t * autoWah.Q.value = 6;\n\t\t * //more audible on higher notes\n\t\t * synth.triggerAttackRelease(\"C4\", \"8n\")\n\t\t */\n\t    Tone.AutoWah = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'baseFrequency',\n\t            'octaves',\n\t            'sensitivity'\n\t        ], Tone.AutoWah);\n\t        Tone.Effect.call(this, options);\n\t        /**\n\t\t\t *  The envelope follower. Set the attack/release\n\t\t\t *  timing to adjust how the envelope is followed.\n\t\t\t *  @type {Tone.Follower}\n\t\t\t *  @private\n\t\t\t */\n\t        this.follower = new Tone.Follower(options.follower);\n\t        /**\n\t\t\t *  scales the follower value to the frequency domain\n\t\t\t *  @type {Tone}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sweepRange = new Tone.ScaleExp(0, 1, 0.5);\n\t        /**\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._baseFrequency = options.baseFrequency;\n\t        /**\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._octaves = options.octaves;\n\t        /**\n\t\t\t *  the input gain to adjust the sensitivity\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._inputBoost = new Tone.Gain();\n\t        /**\n\t\t\t *  @type {BiquadFilterNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._bandpass = new Tone.Filter({\n\t            'rolloff': -48,\n\t            'frequency': 0,\n\t            'Q': options.Q\n\t        });\n\t        /**\n\t\t\t *  @type {Tone.Filter}\n\t\t\t *  @private\n\t\t\t */\n\t        this._peaking = new Tone.Filter(0, 'peaking');\n\t        this._peaking.gain.value = options.gain;\n\t        /**\n\t\t\t * The gain of the filter.\n\t\t\t * @type {Number}\n\t\t\t * @signal\n\t\t\t */\n\t        this.gain = this._peaking.gain;\n\t        /**\n\t\t\t * The quality of the filter.\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t */\n\t        this.Q = this._bandpass.Q;\n\t        //the control signal path\n\t        this.effectSend.chain(this._inputBoost, this.follower, this._sweepRange);\n\t        this._sweepRange.connect(this._bandpass.frequency);\n\t        this._sweepRange.connect(this._peaking.frequency);\n\t        //the filtered path\n\t        this.effectSend.chain(this._bandpass, this._peaking, this.effectReturn);\n\t        //set the initial value\n\t        this._setSweepRange();\n\t        this.sensitivity = options.sensitivity;\n\t        this._readOnly([\n\t            'gain',\n\t            'Q'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.AutoWah, Tone.Effect);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.AutoWah.defaults = {\n\t        'baseFrequency': 100,\n\t        'octaves': 6,\n\t        'sensitivity': 0,\n\t        'Q': 2,\n\t        'gain': 2,\n\t        'follower': {\n\t            'attack': 0.3,\n\t            'release': 0.5\n\t        }\n\t    };\n\t    /**\n\t\t * The number of octaves that the filter will sweep above the\n\t\t * baseFrequency.\n\t\t * @memberOf Tone.AutoWah#\n\t\t * @type {Number}\n\t\t * @name octaves\n\t\t */\n\t    Object.defineProperty(Tone.AutoWah.prototype, 'octaves', {\n\t        get: function () {\n\t            return this._octaves;\n\t        },\n\t        set: function (octaves) {\n\t            this._octaves = octaves;\n\t            this._setSweepRange();\n\t        }\n\t    });\n\t    /**\n\t\t * The base frequency from which the sweep will start from.\n\t\t * @memberOf Tone.AutoWah#\n\t\t * @type {Frequency}\n\t\t * @name baseFrequency\n\t\t */\n\t    Object.defineProperty(Tone.AutoWah.prototype, 'baseFrequency', {\n\t        get: function () {\n\t            return this._baseFrequency;\n\t        },\n\t        set: function (baseFreq) {\n\t            this._baseFrequency = baseFreq;\n\t            this._setSweepRange();\n\t        }\n\t    });\n\t    /**\n\t\t * The sensitivity to control how responsive to the input signal the filter is.\n\t\t * @memberOf Tone.AutoWah#\n\t\t * @type {Decibels}\n\t\t * @name sensitivity\n\t\t */\n\t    Object.defineProperty(Tone.AutoWah.prototype, 'sensitivity', {\n\t        get: function () {\n\t            return Tone.gainToDb(1 / this._inputBoost.gain.value);\n\t        },\n\t        set: function (sensitivy) {\n\t            this._inputBoost.gain.value = 1 / Tone.dbToGain(sensitivy);\n\t        }\n\t    });\n\t    /**\n\t\t *  sets the sweep range of the scaler\n\t\t *  @private\n\t\t */\n\t    Tone.AutoWah.prototype._setSweepRange = function () {\n\t        this._sweepRange.min = this._baseFrequency;\n\t        this._sweepRange.max = Math.min(this._baseFrequency * Math.pow(2, this._octaves), this.context.sampleRate / 2);\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.AutoWah} this\n\t\t */\n\t    Tone.AutoWah.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this.follower.dispose();\n\t        this.follower = null;\n\t        this._sweepRange.dispose();\n\t        this._sweepRange = null;\n\t        this._bandpass.dispose();\n\t        this._bandpass = null;\n\t        this._peaking.dispose();\n\t        this._peaking = null;\n\t        this._inputBoost.dispose();\n\t        this._inputBoost = null;\n\t        this._writable([\n\t            'gain',\n\t            'Q'\n\t        ]);\n\t        this.gain = null;\n\t        this.Q = null;\n\t        return this;\n\t    };\n\t    return Tone.AutoWah;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Signal-rate modulo operator. Only works in AudioRange [-1, 1] and for modulus\n\t\t *         values in the NormalRange.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @param {NormalRange} modulus The modulus to apply.\n\t\t *  @example\n\t\t * var mod = new Tone.Modulo(0.2)\n\t\t * var sig = new Tone.Signal(0.5).connect(mod);\n\t\t * //mod outputs 0.1\n\t\t */\n\t    Tone.Modulo = function (modulus) {\n\t        Tone.SignalBase.call(this);\n\t        this.createInsOuts(1, 0);\n\t        /**\n\t\t\t *  A waveshaper gets the integer multiple of\n\t\t\t *  the input signal and the modulus.\n\t\t\t *  @private\n\t\t\t *  @type {Tone.WaveShaper}\n\t\t\t */\n\t        this._shaper = new Tone.WaveShaper(Math.pow(2, 16));\n\t        /**\n\t\t\t *  the integer multiple is multiplied by the modulus\n\t\t\t *  @type  {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._multiply = new Tone.Multiply();\n\t        /**\n\t\t\t *  and subtracted from the input signal\n\t\t\t *  @type  {Tone.Subtract}\n\t\t\t *  @private\n\t\t\t */\n\t        this._subtract = this.output = new Tone.Subtract();\n\t        /**\n\t\t\t *  the modulus signal\n\t\t\t *  @type  {Tone.Signal}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modSignal = new Tone.Signal(modulus);\n\t        //connections\n\t        this.input.fan(this._shaper, this._subtract);\n\t        this._modSignal.connect(this._multiply, 0, 0);\n\t        this._shaper.connect(this._multiply, 0, 1);\n\t        this._multiply.connect(this._subtract, 0, 1);\n\t        this._setWaveShaper(modulus);\n\t    };\n\t    Tone.extend(Tone.Modulo, Tone.SignalBase);\n\t    /**\n\t\t *  @param  {number}  mod  the modulus to apply\n\t\t *  @private\n\t\t */\n\t    Tone.Modulo.prototype._setWaveShaper = function (mod) {\n\t        this._shaper.setMap(function (val) {\n\t            var multiple = Math.floor((val + 0.0001) / mod);\n\t            return multiple;\n\t        });\n\t    };\n\t    /**\n\t\t * The modulus value.\n\t\t * @memberOf Tone.Modulo#\n\t\t * @type {NormalRange}\n\t\t * @name value\n\t\t */\n\t    Object.defineProperty(Tone.Modulo.prototype, 'value', {\n\t        get: function () {\n\t            return this._modSignal.value;\n\t        },\n\t        set: function (mod) {\n\t            this._modSignal.value = mod;\n\t            this._setWaveShaper(mod);\n\t        }\n\t    });\n\t    /**\n\t\t * clean up\n\t\t *  @returns {Tone.Modulo} this\n\t\t */\n\t    Tone.Modulo.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._shaper.dispose();\n\t        this._shaper = null;\n\t        this._multiply.dispose();\n\t        this._multiply = null;\n\t        this._subtract.dispose();\n\t        this._subtract = null;\n\t        this._modSignal.dispose();\n\t        this._modSignal = null;\n\t        return this;\n\t    };\n\t    return Tone.Modulo;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Bitcrusher downsamples the incoming signal to a different bitdepth.\n\t\t *         Lowering the bitdepth of the signal creates distortion. Read more about Bitcrushing\n\t\t *         on [Wikipedia](https://en.wikipedia.org/wiki/Bitcrusher).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Effect}\n\t\t *  @param {Number} bits The number of bits to downsample the signal. Nominal range\n\t\t *                       of 1 to 8.\n\t\t *  @example\n\t\t * //initialize crusher and route a synth through it\n\t\t * var crusher = new Tone.BitCrusher(4).toMaster();\n\t\t * var synth = new Tone.MonoSynth().connect(crusher);\n\t\t */\n\t    Tone.BitCrusher = function () {\n\t        var options = Tone.defaults(arguments, ['bits'], Tone.BitCrusher);\n\t        Tone.Effect.call(this, options);\n\t        var invStepSize = 1 / Math.pow(2, options.bits - 1);\n\t        /**\n\t\t\t *  Subtract the input signal and the modulus of the input signal\n\t\t\t *  @type {Tone.Subtract}\n\t\t\t *  @private\n\t\t\t */\n\t        this._subtract = new Tone.Subtract();\n\t        /**\n\t\t\t *  The mod function\n\t\t\t *  @type  {Tone.Modulo}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulo = new Tone.Modulo(invStepSize);\n\t        /**\n\t\t\t *  keeps track of the bits\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._bits = options.bits;\n\t        //connect it up\n\t        this.effectSend.fan(this._subtract, this._modulo);\n\t        this._modulo.connect(this._subtract, 0, 1);\n\t        this._subtract.connect(this.effectReturn);\n\t    };\n\t    Tone.extend(Tone.BitCrusher, Tone.Effect);\n\t    /**\n\t\t *  the default values\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.BitCrusher.defaults = { 'bits': 4 };\n\t    /**\n\t\t * The bit depth of the effect. Nominal range of 1-8.\n\t\t * @memberOf Tone.BitCrusher#\n\t\t * @type {number}\n\t\t * @name bits\n\t\t */\n\t    Object.defineProperty(Tone.BitCrusher.prototype, 'bits', {\n\t        get: function () {\n\t            return this._bits;\n\t        },\n\t        set: function (bits) {\n\t            this._bits = bits;\n\t            var invStepSize = 1 / Math.pow(2, bits - 1);\n\t            this._modulo.value = invStepSize;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.BitCrusher} this\n\t\t */\n\t    Tone.BitCrusher.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._subtract.dispose();\n\t        this._subtract = null;\n\t        this._modulo.dispose();\n\t        this._modulo = null;\n\t        return this;\n\t    };\n\t    return Tone.BitCrusher;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.ChebyShev is a Chebyshev waveshaper, an effect which is good \n\t\t *         for making different types of distortion sounds.\n\t\t *         Note that odd orders sound very different from even ones, \n\t\t *         and order = 1 is no change. \n\t\t *         Read more at [music.columbia.edu](http://music.columbia.edu/cmc/musicandcomputers/chapter4/04_06.php).\n\t\t *\n\t\t *  @extends {Tone.Effect}\n\t\t *  @constructor\n\t\t *  @param {Positive|Object} [order] The order of the chebyshev polynomial. Normal range between 1-100. \n\t\t *  @example\n\t\t * //create a new cheby\n\t\t * var cheby = new Tone.Chebyshev(50);\n\t\t * //create a monosynth connected to our cheby\n\t\t * synth = new Tone.MonoSynth().connect(cheby);\n\t\t */\n\t    Tone.Chebyshev = function () {\n\t        var options = Tone.defaults(arguments, ['order'], Tone.Chebyshev);\n\t        Tone.Effect.call(this, options);\n\t        /**\n\t\t\t *  @type {WaveShaperNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._shaper = new Tone.WaveShaper(4096);\n\t        /**\n\t\t\t * holds onto the order of the filter\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t        this._order = options.order;\n\t        this.connectEffect(this._shaper);\n\t        this.order = options.order;\n\t        this.oversample = options.oversample;\n\t    };\n\t    Tone.extend(Tone.Chebyshev, Tone.Effect);\n\t    /**\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Chebyshev.defaults = {\n\t        'order': 1,\n\t        'oversample': 'none'\n\t    };\n\t    /**\n\t\t *  get the coefficient for that degree\n\t\t *  @param {number} x the x value\n\t\t *  @param   {number} degree \n\t\t *  @param {Object} memo memoize the computed value. \n\t\t *                       this speeds up computation greatly. \n\t\t *  @return  {number}       the coefficient \n\t\t *  @private\n\t\t */\n\t    Tone.Chebyshev.prototype._getCoefficient = function (x, degree, memo) {\n\t        if (memo.hasOwnProperty(degree)) {\n\t            return memo[degree];\n\t        } else if (degree === 0) {\n\t            memo[degree] = 0;\n\t        } else if (degree === 1) {\n\t            memo[degree] = x;\n\t        } else {\n\t            memo[degree] = 2 * x * this._getCoefficient(x, degree - 1, memo) - this._getCoefficient(x, degree - 2, memo);\n\t        }\n\t        return memo[degree];\n\t    };\n\t    /**\n\t\t * The order of the Chebyshev polynomial which creates\n\t\t * the equation which is applied to the incoming \n\t\t * signal through a Tone.WaveShaper. The equations\n\t\t * are in the form:<br>\n\t\t * order 2: 2x^2 + 1<br>\n\t\t * order 3: 4x^3 + 3x <br>\n\t\t * @memberOf Tone.Chebyshev#\n\t\t * @type {Positive}\n\t\t * @name order\n\t\t */\n\t    Object.defineProperty(Tone.Chebyshev.prototype, 'order', {\n\t        get: function () {\n\t            return this._order;\n\t        },\n\t        set: function (order) {\n\t            this._order = order;\n\t            var curve = new Array(4096);\n\t            var len = curve.length;\n\t            for (var i = 0; i < len; ++i) {\n\t                var x = i * 2 / len - 1;\n\t                if (x === 0) {\n\t                    //should output 0 when input is 0\n\t                    curve[i] = 0;\n\t                } else {\n\t                    curve[i] = this._getCoefficient(x, order, {});\n\t                }\n\t            }\n\t            this._shaper.curve = curve;\n\t        }\n\t    });\n\t    /**\n\t\t * The oversampling of the effect. Can either be \"none\", \"2x\" or \"4x\".\n\t\t * @memberOf Tone.Chebyshev#\n\t\t * @type {string}\n\t\t * @name oversample\n\t\t */\n\t    Object.defineProperty(Tone.Chebyshev.prototype, 'oversample', {\n\t        get: function () {\n\t            return this._shaper.oversample;\n\t        },\n\t        set: function (oversampling) {\n\t            this._shaper.oversample = oversampling;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up. \n\t\t *  @returns {Tone.Chebyshev} this\n\t\t */\n\t    Tone.Chebyshev.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._shaper.dispose();\n\t        this._shaper = null;\n\t        return this;\n\t    };\n\t    return Tone.Chebyshev;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Base class for Stereo effects. Provides effectSendL/R and effectReturnL/R.\n\t\t *\n\t\t *\t@constructor\n\t\t *\t@extends {Tone.Effect}\n\t\t */\n\t    Tone.StereoEffect = function () {\n\t        //get the defaults\n\t        Tone.AudioNode.call(this);\n\t        var options = Tone.defaults(arguments, ['wet'], Tone.Effect);\n\t        this.createInsOuts(1, 1);\n\t        /**\n\t\t\t *  the drywet knob to control the amount of effect\n\t\t\t *  @type {Tone.CrossFade}\n\t\t\t *  @private\n\t\t\t */\n\t        this._dryWet = new Tone.CrossFade(options.wet);\n\t        /**\n\t\t\t *  The wet control, i.e. how much of the effected\n\t\t\t *  will pass through to the output.\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.wet = this._dryWet.fade;\n\t        /**\n\t\t\t *  then split it\n\t\t\t *  @type {Tone.Split}\n\t\t\t *  @private\n\t\t\t */\n\t        this._split = new Tone.Split();\n\t        /**\n\t\t\t *  the effects send LEFT\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this.effectSendL = this._split.left;\n\t        /**\n\t\t\t *  the effects send RIGHT\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this.effectSendR = this._split.right;\n\t        /**\n\t\t\t *  the stereo effect merger\n\t\t\t *  @type {Tone.Merge}\n\t\t\t *  @private\n\t\t\t */\n\t        this._merge = new Tone.Merge();\n\t        /**\n\t\t\t *  the effect return LEFT\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this.effectReturnL = this._merge.left;\n\t        /**\n\t\t\t *  the effect return RIGHT\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this.effectReturnR = this._merge.right;\n\t        //connections\n\t        this.input.connect(this._split);\n\t        //dry wet connections\n\t        this.input.connect(this._dryWet, 0, 0);\n\t        this._merge.connect(this._dryWet, 0, 1);\n\t        this._dryWet.connect(this.output);\n\t        this._readOnly(['wet']);\n\t    };\n\t    Tone.extend(Tone.StereoEffect, Tone.Effect);\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.StereoEffect} this\n\t\t */\n\t    Tone.StereoEffect.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._dryWet.dispose();\n\t        this._dryWet = null;\n\t        this._split.dispose();\n\t        this._split = null;\n\t        this._merge.dispose();\n\t        this._merge = null;\n\t        this.effectSendL = null;\n\t        this.effectSendR = null;\n\t        this.effectReturnL = null;\n\t        this.effectReturnR = null;\n\t        this._writable(['wet']);\n\t        this.wet = null;\n\t        return this;\n\t    };\n\t    return Tone.StereoEffect;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Chorus is a stereo chorus effect composed of\n\t\t *         a left and right delay with a Tone.LFO applied to the delayTime of each channel.\n\t\t *         Inspiration from [Tuna.js](https://github.com/Dinahmoe/tuna/blob/master/tuna.js).\n\t\t *         Read more on the chorus effect on [SoundOnSound](http://www.soundonsound.com/sos/jun04/articles/synthsecrets.htm).\n\t\t *\n\t\t *\t@constructor\n\t\t *\t@extends {Tone.StereoEffect}\n\t\t *\t@param {Frequency|Object} [frequency] The frequency of the LFO.\n\t\t *\t@param {Milliseconds} [delayTime] The delay of the chorus effect in ms.\n\t\t *\t@param {NormalRange} [depth] The depth of the chorus.\n\t\t *\t@example\n\t\t * var chorus = new Tone.Chorus(4, 2.5, 0.5);\n\t\t * var synth = new Tone.PolySynth(4, Tone.MonoSynth).connect(chorus);\n\t\t * synth.triggerAttackRelease([\"C3\",\"E3\",\"G3\"], \"8n\");\n\t\t */\n\t    Tone.Chorus = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'delayTime',\n\t            'depth'\n\t        ], Tone.Chorus);\n\t        Tone.StereoEffect.call(this, options);\n\t        /**\n\t\t\t *  the depth of the chorus\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._depth = options.depth;\n\t        /**\n\t\t\t *  the delayTime\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delayTime = options.delayTime / 1000;\n\t        /**\n\t\t\t *  the lfo which controls the delayTime\n\t\t\t *  @type {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfoL = new Tone.LFO({\n\t            'frequency': options.frequency,\n\t            'min': 0,\n\t            'max': 1\n\t        });\n\t        /**\n\t\t\t *  another LFO for the right side with a 180 degree phase diff\n\t\t\t *  @type {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfoR = new Tone.LFO({\n\t            'frequency': options.frequency,\n\t            'min': 0,\n\t            'max': 1,\n\t            'phase': 180\n\t        });\n\t        /**\n\t\t\t *  delay for left\n\t\t\t *  @type {Tone.Delay}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delayNodeL = new Tone.Delay();\n\t        /**\n\t\t\t *  delay for right\n\t\t\t *  @type {Tone.Delay}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delayNodeR = new Tone.Delay();\n\t        /**\n\t\t\t * The frequency of the LFO which modulates the delayTime.\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t        this.frequency = this._lfoL.frequency;\n\t        //connections\n\t        this.effectSendL.chain(this._delayNodeL, this.effectReturnL);\n\t        this.effectSendR.chain(this._delayNodeR, this.effectReturnR);\n\t        //and pass through to make the detune apparent\n\t        this.effectSendL.connect(this.effectReturnL);\n\t        this.effectSendR.connect(this.effectReturnR);\n\t        //lfo setup\n\t        this._lfoL.connect(this._delayNodeL.delayTime);\n\t        this._lfoR.connect(this._delayNodeR.delayTime);\n\t        //start the lfo\n\t        this._lfoL.start();\n\t        this._lfoR.start();\n\t        //have one LFO frequency control the other\n\t        this._lfoL.frequency.connect(this._lfoR.frequency);\n\t        //set the initial values\n\t        this.depth = this._depth;\n\t        this.frequency.value = options.frequency;\n\t        this.type = options.type;\n\t        this._readOnly(['frequency']);\n\t        this.spread = options.spread;\n\t    };\n\t    Tone.extend(Tone.Chorus, Tone.StereoEffect);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Chorus.defaults = {\n\t        'frequency': 1.5,\n\t        'delayTime': 3.5,\n\t        'depth': 0.7,\n\t        'type': 'sine',\n\t        'spread': 180\n\t    };\n\t    /**\n\t\t * The depth of the effect. A depth of 1 makes the delayTime\n\t\t * modulate between 0 and 2*delayTime (centered around the delayTime).\n\t\t * @memberOf Tone.Chorus#\n\t\t * @type {NormalRange}\n\t\t * @name depth\n\t\t */\n\t    Object.defineProperty(Tone.Chorus.prototype, 'depth', {\n\t        get: function () {\n\t            return this._depth;\n\t        },\n\t        set: function (depth) {\n\t            this._depth = depth;\n\t            var deviation = this._delayTime * depth;\n\t            this._lfoL.min = Math.max(this._delayTime - deviation, 0);\n\t            this._lfoL.max = this._delayTime + deviation;\n\t            this._lfoR.min = Math.max(this._delayTime - deviation, 0);\n\t            this._lfoR.max = this._delayTime + deviation;\n\t        }\n\t    });\n\t    /**\n\t\t * The delayTime in milliseconds of the chorus. A larger delayTime\n\t\t * will give a more pronounced effect. Nominal range a delayTime\n\t\t * is between 2 and 20ms.\n\t\t * @memberOf Tone.Chorus#\n\t\t * @type {Milliseconds}\n\t\t * @name delayTime\n\t\t */\n\t    Object.defineProperty(Tone.Chorus.prototype, 'delayTime', {\n\t        get: function () {\n\t            return this._delayTime * 1000;\n\t        },\n\t        set: function (delayTime) {\n\t            this._delayTime = delayTime / 1000;\n\t            this.depth = this._depth;\n\t        }\n\t    });\n\t    /**\n\t\t * The oscillator type of the LFO.\n\t\t * @memberOf Tone.Chorus#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.Chorus.prototype, 'type', {\n\t        get: function () {\n\t            return this._lfoL.type;\n\t        },\n\t        set: function (type) {\n\t            this._lfoL.type = type;\n\t            this._lfoR.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t * Amount of stereo spread. When set to 0, both LFO's will be panned centrally.\n\t\t * When set to 180, LFO's will be panned hard left and right respectively.\n\t\t * @memberOf Tone.Chorus#\n\t\t * @type {Degrees}\n\t\t * @name spread\n\t\t */\n\t    Object.defineProperty(Tone.Chorus.prototype, 'spread', {\n\t        get: function () {\n\t            return this._lfoR.phase - this._lfoL.phase;\n\t        },\n\t        set: function (spread) {\n\t            this._lfoL.phase = 90 - spread / 2;\n\t            this._lfoR.phase = spread / 2 + 90;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Chorus} this\n\t\t */\n\t    Tone.Chorus.prototype.dispose = function () {\n\t        Tone.StereoEffect.prototype.dispose.call(this);\n\t        this._lfoL.dispose();\n\t        this._lfoL = null;\n\t        this._lfoR.dispose();\n\t        this._lfoR = null;\n\t        this._delayNodeL.dispose();\n\t        this._delayNodeL = null;\n\t        this._delayNodeR.dispose();\n\t        this._delayNodeR = null;\n\t        this._writable('frequency');\n\t        this.frequency = null;\n\t        return this;\n\t    };\n\t    return Tone.Chorus;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Convolver is a wrapper around the Native Web Audio\n\t\t *          [ConvolverNode](http://webaudio.github.io/web-audio-api/#the-convolvernode-interface).\n\t\t *          Convolution is useful for reverb and filter emulation. Read more about convolution reverb on\n\t\t *          [Wikipedia](https://en.wikipedia.org/wiki/Convolution_reverb).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Effect}\n\t\t *  @param {string|Tone.Buffer|Object} [url] The URL of the impulse response or the Tone.Buffer\n\t\t *                                           contianing the impulse response.\n\t\t *  @param {Function=} onload The callback to invoke when the url is loaded.\n\t\t *  @example\n\t\t * //initializing the convolver with an impulse response\n\t\t * var convolver = new Tone.Convolver(\"./path/to/ir.wav\").toMaster();\n\t\t */\n\t    Tone.Convolver = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'url',\n\t            'onload'\n\t        ], Tone.Convolver);\n\t        Tone.Effect.call(this, options);\n\t        /**\n\t\t\t *  convolver node\n\t\t\t *  @type {ConvolverNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._convolver = this.context.createConvolver();\n\t        /**\n\t\t\t *  the convolution buffer\n\t\t\t *  @type {Tone.Buffer}\n\t\t\t *  @private\n\t\t\t */\n\t        this._buffer = new Tone.Buffer(options.url, function (buffer) {\n\t            this._convolver.buffer = buffer.get();\n\t            options.onload();\n\t        }.bind(this));\n\t        this.connectEffect(this._convolver);\n\t    };\n\t    Tone.extend(Tone.Convolver, Tone.Effect);\n\t    /**\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.Convolver.defaults = { 'onload': Tone.noOp };\n\t    /**\n\t\t *  The convolver's buffer\n\t\t *  @memberOf Tone.Convolver#\n\t\t *  @type {AudioBuffer}\n\t\t *  @name buffer\n\t\t */\n\t    Object.defineProperty(Tone.Convolver.prototype, 'buffer', {\n\t        get: function () {\n\t            return this._buffer.get();\n\t        },\n\t        set: function (buffer) {\n\t            this._buffer.set(buffer);\n\t            this._convolver.buffer = this._buffer.get();\n\t        }\n\t    });\n\t    /**\n\t\t *  Load an impulse response url as an audio buffer.\n\t\t *  Decodes the audio asynchronously and invokes\n\t\t *  the callback once the audio buffer loads.\n\t\t *  @param {string} url The url of the buffer to load.\n\t\t *                      filetype support depends on the\n\t\t *                      browser.\n\t\t *  @param  {function=} callback\n\t\t *  @returns {Promise}\n\t\t */\n\t    Tone.Convolver.prototype.load = function (url, callback) {\n\t        return this._buffer.load(url, function (buff) {\n\t            this.buffer = buff;\n\t            if (callback) {\n\t                callback();\n\t            }\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Convolver} this\n\t\t */\n\t    Tone.Convolver.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._convolver.disconnect();\n\t        this._convolver = null;\n\t        this._buffer.dispose();\n\t        this._buffer = null;\n\t        return this;\n\t    };\n\t    return Tone.Convolver;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Distortion is a simple distortion effect using Tone.WaveShaper.\n\t\t *         Algorithm from [a stackoverflow answer](http://stackoverflow.com/a/22313408).\n\t\t *\n\t\t *  @extends {Tone.Effect}\n\t\t *  @constructor\n\t\t *  @param {Number|Object} [distortion] The amount of distortion (nominal range of 0-1)\n\t\t *  @example\n\t\t * var dist = new Tone.Distortion(0.8).toMaster();\n\t\t * var fm = new Tone.SimpleFM().connect(dist);\n\t\t * //this sounds good on bass notes\n\t\t * fm.triggerAttackRelease(\"A1\", \"8n\");\n\t\t */\n\t    Tone.Distortion = function () {\n\t        var options = Tone.defaults(arguments, ['distortion'], Tone.Distortion);\n\t        Tone.Effect.call(this, options);\n\t        /**\n\t\t\t *  @type {Tone.WaveShaper}\n\t\t\t *  @private\n\t\t\t */\n\t        this._shaper = new Tone.WaveShaper(4096);\n\t        /**\n\t\t\t * holds the distortion amount\n\t\t\t * @type {number}\n\t\t\t * @private\n\t\t\t */\n\t        this._distortion = options.distortion;\n\t        this.connectEffect(this._shaper);\n\t        this.distortion = options.distortion;\n\t        this.oversample = options.oversample;\n\t    };\n\t    Tone.extend(Tone.Distortion, Tone.Effect);\n\t    /**\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Distortion.defaults = {\n\t        'distortion': 0.4,\n\t        'oversample': 'none'\n\t    };\n\t    /**\n\t\t * The amount of distortion.\n\t\t * @memberOf Tone.Distortion#\n\t\t * @type {NormalRange}\n\t\t * @name distortion\n\t\t */\n\t    Object.defineProperty(Tone.Distortion.prototype, 'distortion', {\n\t        get: function () {\n\t            return this._distortion;\n\t        },\n\t        set: function (amount) {\n\t            this._distortion = amount;\n\t            var k = amount * 100;\n\t            var deg = Math.PI / 180;\n\t            this._shaper.setMap(function (x) {\n\t                if (Math.abs(x) < 0.001) {\n\t                    //should output 0 when input is 0\n\t                    return 0;\n\t                } else {\n\t                    return (3 + k) * x * 20 * deg / (Math.PI + k * Math.abs(x));\n\t                }\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t * The oversampling of the effect. Can either be \"none\", \"2x\" or \"4x\".\n\t\t * @memberOf Tone.Distortion#\n\t\t * @type {string}\n\t\t * @name oversample\n\t\t */\n\t    Object.defineProperty(Tone.Distortion.prototype, 'oversample', {\n\t        get: function () {\n\t            return this._shaper.oversample;\n\t        },\n\t        set: function (oversampling) {\n\t            this._shaper.oversample = oversampling;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up. \n\t\t *  @returns {Tone.Distortion} this\n\t\t */\n\t    Tone.Distortion.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._shaper.dispose();\n\t        this._shaper = null;\n\t        return this;\n\t    };\n\t    return Tone.Distortion;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t * \t@class  Tone.FeedbackEffect provides a loop between an \n\t\t * \t        audio source and its own output. This is a base-class\n\t\t * \t        for feedback effects. \n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Effect}\n\t\t *  @param {NormalRange|Object} [feedback] The initial feedback value.\n\t\t */\n\t    Tone.FeedbackEffect = function () {\n\t        var options = Tone.defaults(arguments, ['feedback'], Tone.FeedbackEffect);\n\t        Tone.Effect.call(this, options);\n\t        /**\n\t\t\t *  the gain which controls the feedback\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._feedbackGain = new Tone.Gain(options.feedback, Tone.Type.NormalRange);\n\t        /**\n\t\t\t *  The amount of signal which is fed back into the effect input. \n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.feedback = this._feedbackGain.gain;\n\t        //the feedback loop\n\t        this.effectReturn.chain(this._feedbackGain, this.effectSend);\n\t        this._readOnly(['feedback']);\n\t    };\n\t    Tone.extend(Tone.FeedbackEffect, Tone.Effect);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.FeedbackEffect.defaults = { 'feedback': 0.125 };\n\t    /**\n\t\t *  Clean up. \n\t\t *  @returns {Tone.FeedbackEffect} this\n\t\t */\n\t    Tone.FeedbackEffect.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._writable(['feedback']);\n\t        this._feedbackGain.dispose();\n\t        this._feedbackGain = null;\n\t        this.feedback = null;\n\t        return this;\n\t    };\n\t    return Tone.FeedbackEffect;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.FeedbackDelay is a DelayNode in which part of output\n\t\t *          signal is fed back into the delay.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.FeedbackEffect}\n\t\t *  @param {Time|Object} [delayTime] The delay applied to the incoming signal.\n\t\t *  @param {NormalRange=} feedback The amount of the effected signal which\n\t\t *                            is fed back through the delay.\n\t\t *  @example\n\t\t * var feedbackDelay = new Tone.FeedbackDelay(\"8n\", 0.5).toMaster();\n\t\t * var tom = new Tone.DrumSynth({\n\t\t * \t\"octaves\" : 4,\n\t\t * \t\"pitchDecay\" : 0.1\n\t\t * }).connect(feedbackDelay);\n\t\t * tom.triggerAttackRelease(\"A2\",\"32n\");\n\t\t */\n\t    Tone.FeedbackDelay = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'delayTime',\n\t            'feedback'\n\t        ], Tone.FeedbackDelay);\n\t        Tone.FeedbackEffect.call(this, options);\n\t        /**\n\t\t\t *  the delay node\n\t\t\t *  @type {Tone.Delay}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delayNode = new Tone.Delay(options.delayTime, options.maxDelay);\n\t        /**\n\t\t\t *  The delayTime of the DelayNode.\n\t\t\t *  @type {Time}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.delayTime = this._delayNode.delayTime;\n\t        // connect it up\n\t        this.connectEffect(this._delayNode);\n\t        this._readOnly(['delayTime']);\n\t    };\n\t    Tone.extend(Tone.FeedbackDelay, Tone.FeedbackEffect);\n\t    /**\n\t\t *  The default values.\n\t\t *  @const\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.FeedbackDelay.defaults = {\n\t        'delayTime': 0.25,\n\t        'maxDelay': 1\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.FeedbackDelay} this\n\t\t */\n\t    Tone.FeedbackDelay.prototype.dispose = function () {\n\t        Tone.FeedbackEffect.prototype.dispose.call(this);\n\t        this._delayNode.dispose();\n\t        this._delayNode = null;\n\t        this._writable(['delayTime']);\n\t        this.delayTime = null;\n\t        return this;\n\t    };\n\t    return Tone.FeedbackDelay;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  an array of comb filter delay values from Freeverb implementation\n\t\t *  @static\n\t\t *  @private\n\t\t *  @type {Array}\n\t\t */\n\t    var combFilterTunings = [\n\t        1557 / 44100,\n\t        1617 / 44100,\n\t        1491 / 44100,\n\t        1422 / 44100,\n\t        1277 / 44100,\n\t        1356 / 44100,\n\t        1188 / 44100,\n\t        1116 / 44100\n\t    ];\n\t    /**\n\t\t *  an array of allpass filter frequency values from Freeverb implementation\n\t\t *  @private\n\t\t *  @static\n\t\t *  @type {Array}\n\t\t */\n\t    var allpassFilterFrequencies = [\n\t        225,\n\t        556,\n\t        441,\n\t        341\n\t    ];\n\t    /**\n\t\t *  @class Tone.Freeverb is a reverb based on [Freeverb](https://ccrma.stanford.edu/~jos/pasp/Freeverb.html).\n\t\t *         Read more on reverb on [Sound On Sound](https://web.archive.org/web/20160404083902/http://www.soundonsound.com:80/sos/feb01/articles/synthsecrets.asp).\n\t\t *\n\t\t *  @extends {Tone.Effect}\n\t\t *  @constructor\n\t\t *  @param {NormalRange|Object} [roomSize] Correlated to the decay time.\n\t\t *  @param {Frequency} [dampening] The cutoff frequency of a lowpass filter as part\n\t\t *                                 of the reverb.\n\t\t *  @example\n\t\t * var freeverb = new Tone.Freeverb().toMaster();\n\t\t * freeverb.dampening.value = 1000;\n\t\t * //routing synth through the reverb\n\t\t * var synth = new Tone.AMSynth().connect(freeverb);\n\t\t */\n\t    Tone.Freeverb = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'roomSize',\n\t            'dampening'\n\t        ], Tone.Freeverb);\n\t        Tone.StereoEffect.call(this, options);\n\t        /**\n\t\t\t *  The roomSize value between. A larger roomSize\n\t\t\t *  will result in a longer decay.\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.roomSize = new Tone.Signal(options.roomSize, Tone.Type.NormalRange);\n\t        /**\n\t\t\t *  The amount of dampening of the reverberant signal.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.dampening = new Tone.Signal(options.dampening, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  the comb filters\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._combFilters = [];\n\t        /**\n\t\t\t *  the allpass filters on the left\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._allpassFiltersL = [];\n\t        /**\n\t\t\t *  the allpass filters on the right\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._allpassFiltersR = [];\n\t        //make the allpass filters on the right\n\t        for (var l = 0; l < allpassFilterFrequencies.length; l++) {\n\t            var allpassL = this.context.createBiquadFilter();\n\t            allpassL.type = 'allpass';\n\t            allpassL.frequency.value = allpassFilterFrequencies[l];\n\t            this._allpassFiltersL.push(allpassL);\n\t        }\n\t        //make the allpass filters on the left\n\t        for (var r = 0; r < allpassFilterFrequencies.length; r++) {\n\t            var allpassR = this.context.createBiquadFilter();\n\t            allpassR.type = 'allpass';\n\t            allpassR.frequency.value = allpassFilterFrequencies[r];\n\t            this._allpassFiltersR.push(allpassR);\n\t        }\n\t        //make the comb filters\n\t        for (var c = 0; c < combFilterTunings.length; c++) {\n\t            var lfpf = new Tone.LowpassCombFilter(combFilterTunings[c]);\n\t            if (c < combFilterTunings.length / 2) {\n\t                this.effectSendL.chain(lfpf, this._allpassFiltersL[0]);\n\t            } else {\n\t                this.effectSendR.chain(lfpf, this._allpassFiltersR[0]);\n\t            }\n\t            this.roomSize.connect(lfpf.resonance);\n\t            this.dampening.connect(lfpf.dampening);\n\t            this._combFilters.push(lfpf);\n\t        }\n\t        //chain the allpass filters togetehr\n\t        Tone.connectSeries.apply(Tone, this._allpassFiltersL);\n\t        Tone.connectSeries.apply(Tone, this._allpassFiltersR);\n\t        this._allpassFiltersL[this._allpassFiltersL.length - 1].connect(this.effectReturnL);\n\t        this._allpassFiltersR[this._allpassFiltersR.length - 1].connect(this.effectReturnR);\n\t        this._readOnly([\n\t            'roomSize',\n\t            'dampening'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.Freeverb, Tone.StereoEffect);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Freeverb.defaults = {\n\t        'roomSize': 0.7,\n\t        'dampening': 3000\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Freeverb} this\n\t\t */\n\t    Tone.Freeverb.prototype.dispose = function () {\n\t        Tone.StereoEffect.prototype.dispose.call(this);\n\t        for (var al = 0; al < this._allpassFiltersL.length; al++) {\n\t            this._allpassFiltersL[al].disconnect();\n\t            this._allpassFiltersL[al] = null;\n\t        }\n\t        this._allpassFiltersL = null;\n\t        for (var ar = 0; ar < this._allpassFiltersR.length; ar++) {\n\t            this._allpassFiltersR[ar].disconnect();\n\t            this._allpassFiltersR[ar] = null;\n\t        }\n\t        this._allpassFiltersR = null;\n\t        for (var cf = 0; cf < this._combFilters.length; cf++) {\n\t            this._combFilters[cf].dispose();\n\t            this._combFilters[cf] = null;\n\t        }\n\t        this._combFilters = null;\n\t        this._writable([\n\t            'roomSize',\n\t            'dampening'\n\t        ]);\n\t        this.roomSize.dispose();\n\t        this.roomSize = null;\n\t        this.dampening.dispose();\n\t        this.dampening = null;\n\t        return this;\n\t    };\n\t    return Tone.Freeverb;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  an array of the comb filter delay time values\n\t\t *  @private\n\t\t *  @static\n\t\t *  @type {Array}\n\t\t */\n\t    var combFilterDelayTimes = [\n\t        1687 / 25000,\n\t        1601 / 25000,\n\t        2053 / 25000,\n\t        2251 / 25000\n\t    ];\n\t    /**\n\t\t *  the resonances of each of the comb filters\n\t\t *  @private\n\t\t *  @static\n\t\t *  @type {Array}\n\t\t */\n\t    var combFilterResonances = [\n\t        0.773,\n\t        0.802,\n\t        0.753,\n\t        0.733\n\t    ];\n\t    /**\n\t\t *  the allpass filter frequencies\n\t\t *  @private\n\t\t *  @static\n\t\t *  @type {Array}\n\t\t */\n\t    var allpassFilterFreqs = [\n\t        347,\n\t        113,\n\t        37\n\t    ];\n\t    /**\n\t\t *  @class Tone.JCReverb is a simple [Schroeder Reverberator](https://ccrma.stanford.edu/~jos/pasp/Schroeder_Reverberators.html)\n\t\t *         tuned by John Chowning in 1970.\n\t\t *         It is made up of three allpass filters and four Tone.FeedbackCombFilter.\n\t\t *\n\t\t *\n\t\t *  @extends {Tone.Effect}\n\t\t *  @constructor\n\t\t *  @param {NormalRange|Object} [roomSize] Coorelates to the decay time.\n\t\t *  @example\n\t\t * var reverb = new Tone.JCReverb(0.4).connect(Tone.Master);\n\t\t * var delay = new Tone.FeedbackDelay(0.5);\n\t\t * //connecting the synth to reverb through delay\n\t\t * var synth = new Tone.DuoSynth().chain(delay, reverb);\n\t\t * synth.triggerAttackRelease(\"A4\",\"8n\");\n\t\t */\n\t    Tone.JCReverb = function () {\n\t        var options = Tone.defaults(arguments, ['roomSize'], Tone.JCReverb);\n\t        Tone.StereoEffect.call(this, options);\n\t        /**\n\t\t\t *  room size control values between [0,1]\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.roomSize = new Tone.Signal(options.roomSize, Tone.Type.NormalRange);\n\t        /**\n\t\t\t *  scale the room size\n\t\t\t *  @type {Tone.Scale}\n\t\t\t *  @private\n\t\t\t */\n\t        this._scaleRoomSize = new Tone.Scale(-0.733, 0.197);\n\t        /**\n\t\t\t *  a series of allpass filters\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._allpassFilters = [];\n\t        /**\n\t\t\t *  parallel feedback comb filters\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._feedbackCombFilters = [];\n\t        //make the allpass filters\n\t        for (var af = 0; af < allpassFilterFreqs.length; af++) {\n\t            var allpass = this.context.createBiquadFilter();\n\t            allpass.type = 'allpass';\n\t            allpass.frequency.value = allpassFilterFreqs[af];\n\t            this._allpassFilters.push(allpass);\n\t        }\n\t        //and the comb filters\n\t        for (var cf = 0; cf < combFilterDelayTimes.length; cf++) {\n\t            var fbcf = new Tone.FeedbackCombFilter(combFilterDelayTimes[cf], 0.1);\n\t            this._scaleRoomSize.connect(fbcf.resonance);\n\t            fbcf.resonance.value = combFilterResonances[cf];\n\t            this._allpassFilters[this._allpassFilters.length - 1].connect(fbcf);\n\t            if (cf < combFilterDelayTimes.length / 2) {\n\t                fbcf.connect(this.effectReturnL);\n\t            } else {\n\t                fbcf.connect(this.effectReturnR);\n\t            }\n\t            this._feedbackCombFilters.push(fbcf);\n\t        }\n\t        //chain the allpass filters together\n\t        this.roomSize.connect(this._scaleRoomSize);\n\t        Tone.connectSeries.apply(Tone, this._allpassFilters);\n\t        this.effectSendL.connect(this._allpassFilters[0]);\n\t        this.effectSendR.connect(this._allpassFilters[0]);\n\t        this._readOnly(['roomSize']);\n\t    };\n\t    Tone.extend(Tone.JCReverb, Tone.StereoEffect);\n\t    /**\n\t\t *  the default values\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.JCReverb.defaults = { 'roomSize': 0.5 };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.JCReverb} this\n\t\t */\n\t    Tone.JCReverb.prototype.dispose = function () {\n\t        Tone.StereoEffect.prototype.dispose.call(this);\n\t        for (var apf = 0; apf < this._allpassFilters.length; apf++) {\n\t            this._allpassFilters[apf].disconnect();\n\t            this._allpassFilters[apf] = null;\n\t        }\n\t        this._allpassFilters = null;\n\t        for (var fbcf = 0; fbcf < this._feedbackCombFilters.length; fbcf++) {\n\t            this._feedbackCombFilters[fbcf].dispose();\n\t            this._feedbackCombFilters[fbcf] = null;\n\t        }\n\t        this._feedbackCombFilters = null;\n\t        this._writable(['roomSize']);\n\t        this.roomSize.dispose();\n\t        this.roomSize = null;\n\t        this._scaleRoomSize.dispose();\n\t        this._scaleRoomSize = null;\n\t        return this;\n\t    };\n\t    return Tone.JCReverb;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Mid/Side processing separates the the 'mid' signal\n\t\t *         (which comes out of both the left and the right channel)\n\t\t *         and the 'side' (which only comes out of the the side channels)\n\t\t *         and effects them separately before being recombined.\n\t\t *         Applies a Mid/Side seperation and recombination.\n\t\t *         Algorithm found in [kvraudio forums](http://www.kvraudio.com/forum/viewtopic.php?t=212587).\n\t\t *         <br><br>\n\t\t *         This is a base-class for Mid/Side Effects.\n\t\t *\n\t\t *  @extends {Tone.Effect}\n\t\t *  @constructor\n\t\t */\n\t    Tone.MidSideEffect = function () {\n\t        Tone.Effect.apply(this, arguments);\n\t        /**\n\t\t\t *  The mid/side split\n\t\t\t *  @type  {Tone.MidSideSplit}\n\t\t\t *  @private\n\t\t\t */\n\t        this._midSideSplit = new Tone.MidSideSplit();\n\t        /**\n\t\t\t *  The mid/side merge\n\t\t\t *  @type  {Tone.MidSideMerge}\n\t\t\t *  @private\n\t\t\t */\n\t        this._midSideMerge = new Tone.MidSideMerge();\n\t        /**\n\t\t\t *  The mid send. Connect to mid processing\n\t\t\t *  @type {Tone}\n\t\t\t *  @private\n\t\t\t */\n\t        this.midSend = this._midSideSplit.mid;\n\t        /**\n\t\t\t *  The side send. Connect to side processing\n\t\t\t *  @type {Tone}\n\t\t\t *  @private\n\t\t\t */\n\t        this.sideSend = this._midSideSplit.side;\n\t        /**\n\t\t\t *  The mid return connection\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this.midReturn = this._midSideMerge.mid;\n\t        /**\n\t\t\t *  The side return connection\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this.sideReturn = this._midSideMerge.side;\n\t        //the connections\n\t        this.effectSend.connect(this._midSideSplit);\n\t        this._midSideMerge.connect(this.effectReturn);\n\t    };\n\t    Tone.extend(Tone.MidSideEffect, Tone.Effect);\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.MidSideEffect} this\n\t\t */\n\t    Tone.MidSideEffect.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._midSideSplit.dispose();\n\t        this._midSideSplit = null;\n\t        this._midSideMerge.dispose();\n\t        this._midSideMerge = null;\n\t        this.midSend = null;\n\t        this.sideSend = null;\n\t        this.midReturn = null;\n\t        this.sideReturn = null;\n\t        return this;\n\t    };\n\t    return Tone.MidSideEffect;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Phaser is a phaser effect. Phasers work by changing the phase\n\t\t *         of different frequency components of an incoming signal. Read more on\n\t\t *         [Wikipedia](https://en.wikipedia.org/wiki/Phaser_(effect)).\n\t\t *         Inspiration for this phaser comes from [Tuna.js](https://github.com/Dinahmoe/tuna/).\n\t\t *\n\t\t *\t@extends {Tone.StereoEffect}\n\t\t *\t@constructor\n\t\t *\t@param {Frequency|Object} [frequency] The speed of the phasing.\n\t\t *\t@param {number} [octaves] The octaves of the effect.\n\t\t *\t@param {Frequency} [baseFrequency] The base frequency of the filters.\n\t\t *\t@example\n\t\t * var phaser = new Tone.Phaser({\n\t\t * \t\"frequency\" : 15,\n\t\t * \t\"octaves\" : 5,\n\t\t * \t\"baseFrequency\" : 1000\n\t\t * }).toMaster();\n\t\t * var synth = new Tone.FMSynth().connect(phaser);\n\t\t * synth.triggerAttackRelease(\"E3\", \"2n\");\n\t\t */\n\t    Tone.Phaser = function () {\n\t        //set the defaults\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'octaves',\n\t            'baseFrequency'\n\t        ], Tone.Phaser);\n\t        Tone.StereoEffect.call(this, options);\n\t        /**\n\t\t\t *  the lfo which controls the frequency on the left side\n\t\t\t *  @type {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfoL = new Tone.LFO(options.frequency, 0, 1);\n\t        /**\n\t\t\t *  the lfo which controls the frequency on the right side\n\t\t\t *  @type {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfoR = new Tone.LFO(options.frequency, 0, 1);\n\t        this._lfoR.phase = 180;\n\t        /**\n\t\t\t *  the base modulation frequency\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._baseFrequency = options.baseFrequency;\n\t        /**\n\t\t\t *  the octaves of the phasing\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._octaves = options.octaves;\n\t        /**\n\t\t\t *  The quality factor of the filters\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.Q = new Tone.Signal(options.Q, Tone.Type.Positive);\n\t        /**\n\t\t\t *  the array of filters for the left side\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._filtersL = this._makeFilters(options.stages, this._lfoL, this.Q);\n\t        /**\n\t\t\t *  the array of filters for the left side\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._filtersR = this._makeFilters(options.stages, this._lfoR, this.Q);\n\t        /**\n\t\t\t * the frequency of the effect\n\t\t\t * @type {Tone.Signal}\n\t\t\t */\n\t        this.frequency = this._lfoL.frequency;\n\t        this.frequency.value = options.frequency;\n\t        //connect them up\n\t        this.effectSendL.connect(this._filtersL[0]);\n\t        this.effectSendR.connect(this._filtersR[0]);\n\t        this._filtersL[options.stages - 1].connect(this.effectReturnL);\n\t        this._filtersR[options.stages - 1].connect(this.effectReturnR);\n\t        //control the frequency with one LFO\n\t        this._lfoL.frequency.connect(this._lfoR.frequency);\n\t        //set the options\n\t        this.baseFrequency = options.baseFrequency;\n\t        this.octaves = options.octaves;\n\t        //start the lfo\n\t        this._lfoL.start();\n\t        this._lfoR.start();\n\t        this._readOnly([\n\t            'frequency',\n\t            'Q'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.Phaser, Tone.StereoEffect);\n\t    /**\n\t\t *  defaults\n\t\t *  @static\n\t\t *  @type {object}\n\t\t */\n\t    Tone.Phaser.defaults = {\n\t        'frequency': 0.5,\n\t        'octaves': 3,\n\t        'stages': 10,\n\t        'Q': 10,\n\t        'baseFrequency': 350\n\t    };\n\t    /**\n\t\t *  @param {number} stages\n\t\t *  @returns {Array} the number of filters all connected together\n\t\t *  @private\n\t\t */\n\t    Tone.Phaser.prototype._makeFilters = function (stages, connectToFreq, Q) {\n\t        var filters = new Array(stages);\n\t        //make all the filters\n\t        for (var i = 0; i < stages; i++) {\n\t            var filter = this.context.createBiquadFilter();\n\t            filter.type = 'allpass';\n\t            Q.connect(filter.Q);\n\t            connectToFreq.connect(filter.frequency);\n\t            filters[i] = filter;\n\t        }\n\t        Tone.connectSeries.apply(Tone, filters);\n\t        return filters;\n\t    };\n\t    /**\n\t\t * The number of octaves the phase goes above\n\t\t * the baseFrequency\n\t\t * @memberOf Tone.Phaser#\n\t\t * @type {Positive}\n\t\t * @name octaves\n\t\t */\n\t    Object.defineProperty(Tone.Phaser.prototype, 'octaves', {\n\t        get: function () {\n\t            return this._octaves;\n\t        },\n\t        set: function (octaves) {\n\t            this._octaves = octaves;\n\t            var max = this._baseFrequency * Math.pow(2, octaves);\n\t            this._lfoL.max = max;\n\t            this._lfoR.max = max;\n\t        }\n\t    });\n\t    /**\n\t\t * The the base frequency of the filters.\n\t\t * @memberOf Tone.Phaser#\n\t\t * @type {number}\n\t\t * @name baseFrequency\n\t\t */\n\t    Object.defineProperty(Tone.Phaser.prototype, 'baseFrequency', {\n\t        get: function () {\n\t            return this._baseFrequency;\n\t        },\n\t        set: function (freq) {\n\t            this._baseFrequency = freq;\n\t            this._lfoL.min = freq;\n\t            this._lfoR.min = freq;\n\t            this.octaves = this._octaves;\n\t        }\n\t    });\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Phaser} this\n\t\t */\n\t    Tone.Phaser.prototype.dispose = function () {\n\t        Tone.StereoEffect.prototype.dispose.call(this);\n\t        this._writable([\n\t            'frequency',\n\t            'Q'\n\t        ]);\n\t        this.Q.dispose();\n\t        this.Q = null;\n\t        this._lfoL.dispose();\n\t        this._lfoL = null;\n\t        this._lfoR.dispose();\n\t        this._lfoR = null;\n\t        for (var i = 0; i < this._filtersL.length; i++) {\n\t            this._filtersL[i].disconnect();\n\t            this._filtersL[i] = null;\n\t        }\n\t        this._filtersL = null;\n\t        for (var j = 0; j < this._filtersR.length; j++) {\n\t            this._filtersR[j].disconnect();\n\t            this._filtersR[j] = null;\n\t        }\n\t        this._filtersR = null;\n\t        this.frequency = null;\n\t        return this;\n\t    };\n\t    return Tone.Phaser;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Just like a stereo feedback effect, but the feedback is routed from left to right\n\t\t *         and right to left instead of on the same channel.\n\t\t *\n\t\t *\t@constructor\n\t\t *\t@extends {Tone.StereoEffect}\n\t\t */\n\t    Tone.StereoXFeedbackEffect = function () {\n\t        var options = Tone.defaults(arguments, ['feedback'], Tone.FeedbackEffect);\n\t        Tone.StereoEffect.call(this, options);\n\t        /**\n\t\t\t *  The amount of feedback from the output\n\t\t\t *  back into the input of the effect (routed\n\t\t\t *  across left and right channels).\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.feedback = new Tone.Signal(options.feedback, Tone.Type.NormalRange);\n\t        /**\n\t\t\t *  the left side feeback\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._feedbackLR = new Tone.Gain();\n\t        /**\n\t\t\t *  the right side feeback\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._feedbackRL = new Tone.Gain();\n\t        //connect it up\n\t        this.effectReturnL.chain(this._feedbackLR, this.effectSendR);\n\t        this.effectReturnR.chain(this._feedbackRL, this.effectSendL);\n\t        this.feedback.fan(this._feedbackLR.gain, this._feedbackRL.gain);\n\t        this._readOnly(['feedback']);\n\t    };\n\t    Tone.extend(Tone.StereoXFeedbackEffect, Tone.StereoEffect);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.StereoXFeedbackEffect} this\n\t\t */\n\t    Tone.StereoXFeedbackEffect.prototype.dispose = function () {\n\t        Tone.StereoEffect.prototype.dispose.call(this);\n\t        this._writable(['feedback']);\n\t        this.feedback.dispose();\n\t        this.feedback = null;\n\t        this._feedbackLR.dispose();\n\t        this._feedbackLR = null;\n\t        this._feedbackRL.dispose();\n\t        this._feedbackRL = null;\n\t        return this;\n\t    };\n\t    return Tone.StereoXFeedbackEffect;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.PingPongDelay is a feedback delay effect where the echo is heard\n\t\t *          first in one channel and next in the opposite channel. In a stereo\n\t\t *          system these are the right and left channels.\n\t\t *          PingPongDelay in more simplified terms is two Tone.FeedbackDelays\n\t\t *          with independent delay values. Each delay is routed to one channel\n\t\t *          (left or right), and the channel triggered second will always\n\t\t *          trigger at the same interval after the first.\n\t\t *\n\t\t * \t@constructor\n\t\t * \t@extends {Tone.StereoXFeedbackEffect}\n\t\t *  @param {Time|Object} [delayTime] The delayTime between consecutive echos.\n\t\t *  @param {NormalRange=} feedback The amount of the effected signal which\n\t\t *                                 is fed back through the delay.\n\t\t *  @example\n\t\t * var pingPong = new Tone.PingPongDelay(\"4n\", 0.2).toMaster();\n\t\t * var drum = new Tone.DrumSynth().connect(pingPong);\n\t\t * drum.triggerAttackRelease(\"C4\", \"32n\");\n\t\t */\n\t    Tone.PingPongDelay = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'delayTime',\n\t            'feedback'\n\t        ], Tone.PingPongDelay);\n\t        Tone.StereoXFeedbackEffect.call(this, options);\n\t        /**\n\t\t\t *  the delay node on the left side\n\t\t\t *  @type {Tone.Delay}\n\t\t\t *  @private\n\t\t\t */\n\t        this._leftDelay = new Tone.Delay(0, options.maxDelayTime);\n\t        /**\n\t\t\t *  the delay node on the right side\n\t\t\t *  @type {Tone.Delay}\n\t\t\t *  @private\n\t\t\t */\n\t        this._rightDelay = new Tone.Delay(0, options.maxDelayTime);\n\t        /**\n\t\t\t *  the predelay on the right side\n\t\t\t *  @type {Tone.Delay}\n\t\t\t *  @private\n\t\t\t */\n\t        this._rightPreDelay = new Tone.Delay(0, options.maxDelayTime);\n\t        /**\n\t\t\t *  the delay time signal\n\t\t\t *  @type {Time}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.delayTime = new Tone.Signal(options.delayTime, Tone.Type.Time);\n\t        //connect it up\n\t        this.effectSendL.chain(this._leftDelay, this.effectReturnL);\n\t        this.effectSendR.chain(this._rightPreDelay, this._rightDelay, this.effectReturnR);\n\t        this.delayTime.fan(this._leftDelay.delayTime, this._rightDelay.delayTime, this._rightPreDelay.delayTime);\n\t        //rearranged the feedback to be after the rightPreDelay\n\t        this._feedbackLR.disconnect();\n\t        this._feedbackLR.connect(this._rightDelay);\n\t        this._readOnly(['delayTime']);\n\t    };\n\t    Tone.extend(Tone.PingPongDelay, Tone.StereoXFeedbackEffect);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.PingPongDelay.defaults = {\n\t        'delayTime': 0.25,\n\t        'maxDelayTime': 1\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.PingPongDelay} this\n\t\t */\n\t    Tone.PingPongDelay.prototype.dispose = function () {\n\t        Tone.StereoXFeedbackEffect.prototype.dispose.call(this);\n\t        this._leftDelay.dispose();\n\t        this._leftDelay = null;\n\t        this._rightDelay.dispose();\n\t        this._rightDelay = null;\n\t        this._rightPreDelay.dispose();\n\t        this._rightPreDelay = null;\n\t        this._writable(['delayTime']);\n\t        this.delayTime.dispose();\n\t        this.delayTime = null;\n\t        return this;\n\t    };\n\t    return Tone.PingPongDelay;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.PitchShift does near-realtime pitch shifting to the incoming signal.\n\t\t *         The effect is achieved by speeding up or slowing down the delayTime\n\t\t *         of a DelayNode using a sawtooth wave.\n\t\t *         Algorithm found in [this pdf](http://dsp-book.narod.ru/soundproc.pdf).\n\t\t *         Additional reference by [Miller Pucket](http://msp.ucsd.edu/techniques/v0.11/book-html/node115.html).\n\t\t *\n\t\t *  @extends {Tone.FeedbackEffect}\n\t\t *  @param {Interval=} pitch The interval to transpose the incoming signal by.\n\t\t */\n\t    Tone.PitchShift = function () {\n\t        var options = Tone.defaults(arguments, ['pitch'], Tone.PitchShift);\n\t        Tone.FeedbackEffect.call(this, options);\n\t        /**\n\t\t\t *  The pitch signal\n\t\t\t *  @type  {Tone.Signal}\n\t\t\t *  @private\n\t\t\t */\n\t        this._frequency = new Tone.Signal(0);\n\t        /**\n\t\t\t *  Uses two DelayNodes to cover up the jump in\n\t\t\t *  the sawtooth wave.\n\t\t\t *  @type  {DelayNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delayA = new Tone.Delay(0, 1);\n\t        /**\n\t\t\t *  The first LFO.\n\t\t\t *  @type  {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfoA = new Tone.LFO({\n\t            'min': 0,\n\t            'max': 0.1,\n\t            'type': 'sawtooth'\n\t        }).connect(this._delayA.delayTime);\n\t        /**\n\t\t\t *  The second DelayNode\n\t\t\t *  @type  {DelayNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delayB = new Tone.Delay(0, 1);\n\t        /**\n\t\t\t *  The first LFO.\n\t\t\t *  @type  {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfoB = new Tone.LFO({\n\t            'min': 0,\n\t            'max': 0.1,\n\t            'type': 'sawtooth',\n\t            'phase': 180\n\t        }).connect(this._delayB.delayTime);\n\t        /**\n\t\t\t *  Crossfade quickly between the two delay lines\n\t\t\t *  to cover up the jump in the sawtooth wave\n\t\t\t *  @type  {Tone.CrossFade}\n\t\t\t *  @private\n\t\t\t */\n\t        this._crossFade = new Tone.CrossFade();\n\t        /**\n\t\t\t *  LFO which alternates between the two\n\t\t\t *  delay lines to cover up the disparity in the\n\t\t\t *  sawtooth wave.\n\t\t\t *  @type  {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._crossFadeLFO = new Tone.LFO({\n\t            'min': 0,\n\t            'max': 1,\n\t            'type': 'triangle',\n\t            'phase': 90\n\t        }).connect(this._crossFade.fade);\n\t        /**\n\t\t\t *  The delay node\n\t\t\t *  @type {Tone.Delay}\n\t\t\t *  @private\n\t\t\t */\n\t        this._feedbackDelay = new Tone.Delay(options.delayTime);\n\t        /**\n\t\t\t *  The amount of delay on the input signal\n\t\t\t *  @type {Time}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.delayTime = this._feedbackDelay.delayTime;\n\t        this._readOnly('delayTime');\n\t        /**\n\t\t\t *  Hold the current pitch\n\t\t\t *  @type {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._pitch = options.pitch;\n\t        /**\n\t\t\t *  Hold the current windowSize\n\t\t\t *  @type {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._windowSize = options.windowSize;\n\t        //connect the two delay lines up\n\t        this._delayA.connect(this._crossFade.a);\n\t        this._delayB.connect(this._crossFade.b);\n\t        //connect the frequency\n\t        this._frequency.fan(this._lfoA.frequency, this._lfoB.frequency, this._crossFadeLFO.frequency);\n\t        //route the input\n\t        this.effectSend.fan(this._delayA, this._delayB);\n\t        this._crossFade.chain(this._feedbackDelay, this.effectReturn);\n\t        //start the LFOs at the same time\n\t        var now = this.now();\n\t        this._lfoA.start(now);\n\t        this._lfoB.start(now);\n\t        this._crossFadeLFO.start(now);\n\t        //set the initial value\n\t        this.windowSize = this._windowSize;\n\t    };\n\t    Tone.extend(Tone.PitchShift, Tone.FeedbackEffect);\n\t    /**\n\t\t *  default values\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.PitchShift.defaults = {\n\t        'pitch': 0,\n\t        'windowSize': 0.1,\n\t        'delayTime': 0,\n\t        'feedback': 0\n\t    };\n\t    /**\n\t\t * Repitch the incoming signal by some interval (measured\n\t\t * in semi-tones).\n\t\t * @memberOf Tone.PitchShift#\n\t\t * @type {Interval}\n\t\t * @name pitch\n\t\t * @example\n\t\t * pitchShift.pitch = -12; //down one octave\n\t\t * pitchShift.pitch = 7; //up a fifth\n\t\t */\n\t    Object.defineProperty(Tone.PitchShift.prototype, 'pitch', {\n\t        get: function () {\n\t            return this._pitch;\n\t        },\n\t        set: function (interval) {\n\t            this._pitch = interval;\n\t            var factor = 0;\n\t            if (interval < 0) {\n\t                this._lfoA.min = 0;\n\t                this._lfoA.max = this._windowSize;\n\t                this._lfoB.min = 0;\n\t                this._lfoB.max = this._windowSize;\n\t                factor = Tone.intervalToFrequencyRatio(interval - 1) + 1;\n\t            } else {\n\t                this._lfoA.min = this._windowSize;\n\t                this._lfoA.max = 0;\n\t                this._lfoB.min = this._windowSize;\n\t                this._lfoB.max = 0;\n\t                factor = Tone.intervalToFrequencyRatio(interval) - 1;\n\t            }\n\t            this._frequency.value = factor * (1.2 / this._windowSize);\n\t        }\n\t    });\n\t    /**\n\t\t * The window size corresponds roughly to the sample length in a looping sampler.\n\t\t * Smaller values are desirable for a less noticeable delay time of the pitch shifted\n\t\t * signal, but larger values will result in smoother pitch shifting for larger intervals.\n\t\t * A nominal range of 0.03 to 0.1 is recommended.\n\t\t * @memberOf Tone.PitchShift#\n\t\t * @type {Time}\n\t\t * @name windowSize\n\t\t * @example\n\t\t * pitchShift.windowSize = 0.1;\n\t\t */\n\t    Object.defineProperty(Tone.PitchShift.prototype, 'windowSize', {\n\t        get: function () {\n\t            return this._windowSize;\n\t        },\n\t        set: function (size) {\n\t            this._windowSize = this.toSeconds(size);\n\t            this.pitch = this._pitch;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.PitchShift}  this\n\t\t */\n\t    Tone.PitchShift.prototype.dispose = function () {\n\t        Tone.FeedbackEffect.prototype.dispose.call(this);\n\t        this._frequency.dispose();\n\t        this._frequency = null;\n\t        this._delayA.disconnect();\n\t        this._delayA = null;\n\t        this._delayB.disconnect();\n\t        this._delayB = null;\n\t        this._lfoA.dispose();\n\t        this._lfoA = null;\n\t        this._lfoB.dispose();\n\t        this._lfoB = null;\n\t        this._crossFade.dispose();\n\t        this._crossFade = null;\n\t        this._crossFadeLFO.dispose();\n\t        this._crossFadeLFO = null;\n\t        this._writable('delayTime');\n\t        this._feedbackDelay.dispose();\n\t        this._feedbackDelay = null;\n\t        this.delayTime = null;\n\t        return this;\n\t    };\n\t    return Tone.PitchShift;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Wrapper around the native BufferSourceNode.\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param  {AudioBuffer|Tone.Buffer}  buffer   The buffer to play\n\t\t *  @param  {Function}  onload  The callback to invoke when the\n\t\t *                               buffer is done playing.\n\t\t */\n\t    Tone.BufferSource = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'buffer',\n\t            'onload'\n\t        ], Tone.BufferSource);\n\t        Tone.AudioNode.call(this, options);\n\t        /**\n\t\t\t *  The callback to invoke after the\n\t\t\t *  buffer source is done playing.\n\t\t\t *  @type  {Function}\n\t\t\t */\n\t        this.onended = options.onended;\n\t        /**\n\t\t\t *  The time that the buffer was started.\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._startTime = -1;\n\t        /**\n\t\t\t *  An additional flag if the actual BufferSourceNode\n\t\t\t *  has been started. b/c stopping an unstarted buffer\n\t\t\t *  will throw it into an invalid state\n\t\t\t *  @type  {Boolean}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sourceStarted = false;\n\t        /**\n\t\t\t *  Flag if the source has already been stopped\n\t\t\t *  @type  {Boolean}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sourceStopped = false;\n\t        /**\n\t\t\t *  The time that the buffer is scheduled to stop.\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._stopTime = -1;\n\t        /**\n\t\t\t *  The gain node which envelopes the BufferSource\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._gainNode = this.output = new Tone.Gain();\n\t        /**\n\t\t\t *  The buffer source\n\t\t\t *  @type  {AudioBufferSourceNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._source = this.context.createBufferSource();\n\t        this._source.connect(this._gainNode);\n\t        this._source.onended = this._onended.bind(this);\n\t        /**\n\t\t\t * The private buffer instance\n\t\t\t * @type {Tone.Buffer}\n\t\t\t * @private\n\t\t\t */\n\t        this._buffer = new Tone.Buffer(options.buffer, options.onload);\n\t        /**\n\t\t\t *  The playbackRate of the buffer\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.playbackRate = new Tone.Param(this._source.playbackRate, Tone.Type.Positive);\n\t        /**\n\t\t\t *  The fadeIn time of the amplitude envelope.\n\t\t\t *  @type {Time}\n\t\t\t */\n\t        this.fadeIn = options.fadeIn;\n\t        /**\n\t\t\t *  The fadeOut time of the amplitude envelope.\n\t\t\t *  @type {Time}\n\t\t\t */\n\t        this.fadeOut = options.fadeOut;\n\t        /**\n\t\t\t * The curve applied to the fades, either \"linear\" or \"exponential\"\n\t\t\t * @type {String}\n\t\t\t */\n\t        this.curve = options.curve;\n\t        /**\n\t\t\t *  The value that the buffer ramps to\n\t\t\t *  @type {Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._gain = 1;\n\t        /**\n\t\t\t * The onended timeout\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t        this._onendedTimeout = -1;\n\t        //set some values initially\n\t        this.loop = options.loop;\n\t        this.loopStart = options.loopStart;\n\t        this.loopEnd = options.loopEnd;\n\t        this.playbackRate.value = options.playbackRate;\n\t    };\n\t    Tone.extend(Tone.BufferSource, Tone.AudioNode);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.BufferSource.defaults = {\n\t        'onended': Tone.noOp,\n\t        'onload': Tone.noOp,\n\t        'loop': false,\n\t        'loopStart': 0,\n\t        'loopEnd': 0,\n\t        'fadeIn': 0,\n\t        'fadeOut': 0,\n\t        'curve': 'linear',\n\t        'playbackRate': 1\n\t    };\n\t    /**\n\t\t *  Returns the playback state of the source, either \"started\" or \"stopped\".\n\t\t *  @type {Tone.State}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.BufferSource#\n\t\t *  @name state\n\t\t */\n\t    Object.defineProperty(Tone.BufferSource.prototype, 'state', {\n\t        get: function () {\n\t            return this.getStateAtTime(this.now());\n\t        }\n\t    });\n\t    /**\n\t\t *  Get the playback state at the given time\n\t\t *  @param  {Time}  time  The time to test the state at\n\t\t *  @return  {Tone.State}  The playback state. \n\t\t */\n\t    Tone.BufferSource.prototype.getStateAtTime = function (time) {\n\t        time = this.toSeconds(time);\n\t        if (this._startTime !== -1 && time >= this._startTime && !this._sourceStopped) {\n\t            return Tone.State.Started;\n\t        } else {\n\t            return Tone.State.Stopped;\n\t        }\n\t    };\n\t    /**\n\t\t *  Start the buffer\n\t\t *  @param  {Time} [startTime=now] When the player should start.\n\t\t *  @param  {Time} [offset=0] The offset from the beginning of the sample\n\t\t *                                 to start at.\n\t\t *  @param  {Time=} duration How long the sample should play. If no duration\n\t\t *                                is given, it will default to the full length\n\t\t *                                of the sample (minus any offset)\n\t\t *  @param  {Gain}  [gain=1]  The gain to play the buffer back at.\n\t\t *  @param  {Time=}  fadeInTime  The optional fadeIn ramp time.\n\t\t *  @return  {Tone.BufferSource}  this\n\t\t */\n\t    Tone.BufferSource.prototype.start = function (time, offset, duration, gain, fadeInTime) {\n\t        if (this._startTime !== -1) {\n\t            throw new Error('Tone.BufferSource can only be started once.');\n\t        }\n\t        if (!this.buffer.loaded) {\n\t            throw new Error('Tone.BufferSource: buffer is either not set or not loaded.');\n\t        }\n\t        time = this.toSeconds(time);\n\t        //if it's a loop the default offset is the loopstart point\n\t        if (this.loop) {\n\t            offset = Tone.defaultArg(offset, this.loopStart);\n\t        } else {\n\t            //otherwise the default offset is 0\n\t            offset = Tone.defaultArg(offset, 0);\n\t        }\n\t        offset = this.toSeconds(offset);\n\t        gain = Tone.defaultArg(gain, 1);\n\t        this._gain = gain;\n\t        fadeInTime = this.toSeconds(Tone.defaultArg(fadeInTime, this.fadeIn));\n\t        this.fadeIn = fadeInTime;\n\t        if (fadeInTime > 0) {\n\t            this._gainNode.gain.setValueAtTime(0, time);\n\t            if (this.curve === 'linear') {\n\t                this._gainNode.gain.linearRampToValueAtTime(this._gain, time + fadeInTime);\n\t            } else {\n\t                this._gainNode.gain.exponentialApproachValueAtTime(this._gain, time, fadeInTime);\n\t            }\n\t        } else {\n\t            this._gainNode.gain.setValueAtTime(gain, time);\n\t        }\n\t        this._startTime = time;\n\t        var computedDur = this.toSeconds(Tone.defaultArg(duration, this.buffer.duration - offset % this.buffer.duration));\n\t        computedDur = Math.max(computedDur, 0);\n\t        if (Tone.isDefined(duration)) {\n\t            //clip the duration when not looping\n\t            if (!this.loop) {\n\t                computedDur = Math.min(computedDur, this.buffer.duration - offset % this.buffer.duration);\n\t            }\n\t            this.stop(time + computedDur, this.fadeOut);\n\t        }\n\t        //start the buffer source\n\t        if (this.loop) {\n\t            //modify the offset if it's greater than the loop time\n\t            var loopEnd = this.loopEnd || this.buffer.duration;\n\t            var loopStart = this.loopStart;\n\t            var loopDuration = loopEnd - loopStart;\n\t            //move the offset back\n\t            if (offset >= loopEnd) {\n\t                offset = (offset - loopStart) % loopDuration + loopStart;\n\t            }\n\t        }\n\t        this._source.buffer = this.buffer.get();\n\t        this._source.loopEnd = this.loopEnd || this.buffer.duration;\n\t        if (offset < this.buffer.duration) {\n\t            this._sourceStarted = true;\n\t            this._source.start(time, offset);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Stop the buffer. Optionally add a ramp time to fade the\n\t\t *  buffer out.\n\t\t *  @param  {Time=}  time         The time the buffer should stop.\n\t\t *  @param  {Time=}  fadeOutTime  How long the gain should fade out for\n\t\t *  @return  {Tone.BufferSource}  this\n\t\t */\n\t    Tone.BufferSource.prototype.stop = function (time, fadeOutTime) {\n\t        if (!this.buffer.loaded) {\n\t            throw new Error('Tone.BufferSource: buffer is either not set or not loaded.');\n\t        }\n\t        if (this._sourceStopped) {\n\t            return;\n\t        }\n\t        time = this.toSeconds(time);\n\t        //if the event has already been scheduled, clear it\n\t        if (this._stopTime !== -1) {\n\t            this.cancelStop();\n\t        }\n\t        //stop if it's schedule before the start time\n\t        if (time <= this._startTime) {\n\t            this._gainNode.gain.cancelScheduledValues(time);\n\t            this._gainNode.gain.value = 0;\n\t            return this;\n\t        }\n\t        time = Math.max(this._startTime + this.fadeIn + this.sampleTime, time);\n\t        //cancel the previous curve\n\t        this._gainNode.gain.cancelScheduledValues(time);\n\t        this._stopTime = time;\n\t        //the fadeOut time\n\t        fadeOutTime = this.toSeconds(Tone.defaultArg(fadeOutTime, this.fadeOut));\n\t        var heldDuration = time - this._startTime - this.fadeIn - this.sampleTime;\n\t        if (!this.loop) {\n\t            //make sure the fade does not go beyond the length of the buffer\n\t            heldDuration = Math.min(heldDuration, this.buffer.duration);\n\t        }\n\t        fadeOutTime = Math.min(heldDuration, fadeOutTime);\n\t        var startFade = time - fadeOutTime;\n\t        if (fadeOutTime > this.sampleTime) {\n\t            this._gainNode.gain.setValueAtTime(this._gain, startFade);\n\t            if (this.curve === 'linear') {\n\t                this._gainNode.gain.linearRampToValueAtTime(0, time);\n\t            } else {\n\t                this._gainNode.gain.exponentialApproachValueAtTime(0, startFade, fadeOutTime);\n\t            }\n\t        } else {\n\t            this._gainNode.gain.setValueAtTime(0, time);\n\t        }\n\t        Tone.context.clearTimeout(this._onendedTimeout);\n\t        this._onendedTimeout = Tone.context.setTimeout(this._onended.bind(this), this._stopTime - this.now());\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancel a scheduled stop event\n\t\t *  @return  {Tone.BufferSource}  this\n\t\t */\n\t    Tone.BufferSource.prototype.cancelStop = function () {\n\t        if (this._startTime !== -1 && !this._sourceStopped) {\n\t            //cancel the stop envelope\n\t            var fadeInTime = this.toSeconds(this.fadeIn);\n\t            this._gainNode.gain.cancelScheduledValues(this._startTime + fadeInTime + this.sampleTime);\n\t            this._gainNode.gain.setValueAtTime(1, Math.max(this.now(), this._startTime + fadeInTime + this.sampleTime));\n\t            this.context.clearTimeout(this._onendedTimeout);\n\t            this._stopTime = -1;\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Internal callback when the buffer is ended.\n\t\t *  Invokes `onended` and disposes the node.\n\t\t *  @private\n\t\t */\n\t    Tone.BufferSource.prototype._onended = function () {\n\t        if (!this._sourceStopped) {\n\t            this._sourceStopped = true;\n\t            //allow additional time for the exponential curve to fully decay\n\t            var additionalTail = this.curve === 'exponential' ? this.fadeOut * 2 : 0;\n\t            if (this._sourceStarted && this._stopTime !== -1) {\n\t                this._source.stop(this._stopTime + additionalTail);\n\t            }\n\t            this.onended(this);\n\t        }\n\t    };\n\t    /**\n\t\t * If loop is true, the loop will start at this position.\n\t\t * @memberOf Tone.BufferSource#\n\t\t * @type {Time}\n\t\t * @name loopStart\n\t\t */\n\t    Object.defineProperty(Tone.BufferSource.prototype, 'loopStart', {\n\t        get: function () {\n\t            return this._source.loopStart;\n\t        },\n\t        set: function (loopStart) {\n\t            this._source.loopStart = this.toSeconds(loopStart);\n\t        }\n\t    });\n\t    /**\n\t\t * If loop is true, the loop will end at this position.\n\t\t * @memberOf Tone.BufferSource#\n\t\t * @type {Time}\n\t\t * @name loopEnd\n\t\t */\n\t    Object.defineProperty(Tone.BufferSource.prototype, 'loopEnd', {\n\t        get: function () {\n\t            return this._source.loopEnd;\n\t        },\n\t        set: function (loopEnd) {\n\t            this._source.loopEnd = this.toSeconds(loopEnd);\n\t        }\n\t    });\n\t    /**\n\t\t * The audio buffer belonging to the player.\n\t\t * @memberOf Tone.BufferSource#\n\t\t * @type {Tone.Buffer}\n\t\t * @name buffer\n\t\t */\n\t    Object.defineProperty(Tone.BufferSource.prototype, 'buffer', {\n\t        get: function () {\n\t            return this._buffer;\n\t        },\n\t        set: function (buffer) {\n\t            this._buffer.set(buffer);\n\t        }\n\t    });\n\t    /**\n\t\t * If the buffer should loop once it's over.\n\t\t * @memberOf Tone.BufferSource#\n\t\t * @type {Boolean}\n\t\t * @name loop\n\t\t */\n\t    Object.defineProperty(Tone.BufferSource.prototype, 'loop', {\n\t        get: function () {\n\t            return this._source.loop;\n\t        },\n\t        set: function (loop) {\n\t            this._source.loop = loop;\n\t            this.cancelStop();\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.BufferSource}  this\n\t\t */\n\t    Tone.BufferSource.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this.onended = null;\n\t        this._source.onended = null;\n\t        this._source.disconnect();\n\t        this._source = null;\n\t        this._gainNode.dispose();\n\t        this._gainNode = null;\n\t        this._buffer.dispose();\n\t        this._buffer = null;\n\t        this._startTime = -1;\n\t        this.playbackRate = null;\n\t        Tone.context.clearTimeout(this._onendedTimeout);\n\t        return this;\n\t    };\n\t    return Tone.BufferSource;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Noise is a noise generator. It uses looped noise buffers to save on performance.\n\t\t *          Tone.Noise supports the noise types: \"pink\", \"white\", and \"brown\". Read more about\n\t\t *          colors of noise on [Wikipedia](https://en.wikipedia.org/wiki/Colors_of_noise).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Source}\n\t\t *  @param {string} type the noise type (white|pink|brown)\n\t\t *  @example\n\t\t * //initialize the noise and start\n\t\t * var noise = new Tone.Noise(\"pink\").start();\n\t\t *\n\t\t * //make an autofilter to shape the noise\n\t\t * var autoFilter = new Tone.AutoFilter({\n\t\t * \t\"frequency\" : \"8m\",\n\t\t * \t\"min\" : 800,\n\t\t * \t\"max\" : 15000\n\t\t * }).connect(Tone.Master);\n\t\t *\n\t\t * //connect the noise\n\t\t * noise.connect(autoFilter);\n\t\t * //start the autofilter LFO\n\t\t * autoFilter.start()\n\t\t */\n\t    Tone.Noise = function () {\n\t        var options = Tone.defaults(arguments, ['type'], Tone.Noise);\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  @private\n\t\t\t *  @type {AudioBufferSourceNode}\n\t\t\t */\n\t        this._source = null;\n\t        /**\n\t\t\t *  the buffer\n\t\t\t *  @private\n\t\t\t *  @type {AudioBuffer}\n\t\t\t */\n\t        this._type = options.type;\n\t        /**\n\t\t\t *  The playback rate of the noise. Affects\n\t\t\t *  the \"frequency\" of the noise.\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t */\n\t        this._playbackRate = options.playbackRate;\n\t    };\n\t    Tone.extend(Tone.Noise, Tone.Source);\n\t    /**\n\t\t *  the default parameters\n\t\t *\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Noise.defaults = {\n\t        'type': 'white',\n\t        'playbackRate': 1\n\t    };\n\t    /**\n\t\t * The type of the noise. Can be \"white\", \"brown\", or \"pink\".\n\t\t * @memberOf Tone.Noise#\n\t\t * @type {string}\n\t\t * @name type\n\t\t * @example\n\t\t * noise.type = \"white\";\n\t\t */\n\t    Object.defineProperty(Tone.Noise.prototype, 'type', {\n\t        get: function () {\n\t            return this._type;\n\t        },\n\t        set: function (type) {\n\t            if (this._type !== type) {\n\t                if (type in _noiseBuffers) {\n\t                    this._type = type;\n\t                    //if it's playing, stop and restart it\n\t                    if (this.state === Tone.State.Started) {\n\t                        var now = this.now();\n\t                        this._stop(now);\n\t                        this._start(now);\n\t                    }\n\t                } else {\n\t                    throw new TypeError('Tone.Noise: invalid type: ' + type);\n\t                }\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  The playback rate of the noise. Affects\n\t\t *  the \"frequency\" of the noise.\n\t\t *  @type {Positive}\n\t\t *  @signal\n\t\t */\n\t    Object.defineProperty(Tone.Noise.prototype, 'playbackRate', {\n\t        get: function () {\n\t            return this._playbackRate;\n\t        },\n\t        set: function (rate) {\n\t            this._playbackRate = rate;\n\t            if (this._source) {\n\t                this._source.playbackRate.value = rate;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  internal start method\n\t\t *\n\t\t *  @param {Time} time\n\t\t *  @private\n\t\t */\n\t    Tone.Noise.prototype._start = function (time) {\n\t        var buffer = _noiseBuffers[this._type];\n\t        this._source = new Tone.BufferSource(buffer).connect(this.output);\n\t        this._source.loop = true;\n\t        this._source.playbackRate.value = this._playbackRate;\n\t        this._source.start(this.toSeconds(time), Math.random() * (buffer.duration - 0.001));\n\t    };\n\t    /**\n\t\t *  internal stop method\n\t\t *\n\t\t *  @param {Time} time\n\t\t *  @private\n\t\t */\n\t    Tone.Noise.prototype._stop = function (time) {\n\t        if (this._source) {\n\t            this._source.stop(this.toSeconds(time));\n\t            this._source = null;\n\t        }\n\t    };\n\t    /**\n\t\t * Restarts the noise.\n\t\t * @param  {[type]} time [description]\n\t\t * @return {[type]}      [description]\n\t\t */\n\t    Tone.Noise.prototype.restart = function (time) {\n\t        //TODO could be optimized by cancelling the buffer source 'stop'\n\t        //stop and restart\n\t        this._stop(time);\n\t        this._start(time);\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Noise} this\n\t\t */\n\t    Tone.Noise.prototype.dispose = function () {\n\t        Tone.Source.prototype.dispose.call(this);\n\t        if (this._source !== null) {\n\t            this._source.disconnect();\n\t            this._source = null;\n\t        }\n\t        this._buffer = null;\n\t        return this;\n\t    };\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    // THE BUFFERS\n\t    ///////////////////////////////////////////////////////////////////////////\n\t    //Noise buffer stats\n\t    var bufferLength = 44100 * 5;\n\t    var channels = 2;\n\t    /**\n\t\t *\tThe noise arrays. Generated on initialization.\n\t\t *  borrowed heavily from https://github.com/zacharydenton/noise.js\n\t\t *  (c) 2013 Zach Denton (MIT)\n\t\t *  @static\n\t\t *  @private\n\t\t *  @type {Array}\n\t\t */\n\t    var _noiseArrays = {\n\t        'pink': function () {\n\t            var buffer = [];\n\t            for (var channelNum = 0; channelNum < channels; channelNum++) {\n\t                var channel = new Float32Array(bufferLength);\n\t                buffer[channelNum] = channel;\n\t                var b0, b1, b2, b3, b4, b5, b6;\n\t                b0 = b1 = b2 = b3 = b4 = b5 = b6 = 0;\n\t                for (var i = 0; i < bufferLength; i++) {\n\t                    var white = Math.random() * 2 - 1;\n\t                    b0 = 0.99886 * b0 + white * 0.0555179;\n\t                    b1 = 0.99332 * b1 + white * 0.0750759;\n\t                    b2 = 0.969 * b2 + white * 0.153852;\n\t                    b3 = 0.8665 * b3 + white * 0.3104856;\n\t                    b4 = 0.55 * b4 + white * 0.5329522;\n\t                    b5 = -0.7616 * b5 - white * 0.016898;\n\t                    channel[i] = b0 + b1 + b2 + b3 + b4 + b5 + b6 + white * 0.5362;\n\t                    channel[i] *= 0.11;\n\t                    // (roughly) compensate for gain\n\t                    b6 = white * 0.115926;\n\t                }\n\t            }\n\t            return buffer;\n\t        }(),\n\t        'brown': function () {\n\t            var buffer = [];\n\t            for (var channelNum = 0; channelNum < channels; channelNum++) {\n\t                var channel = new Float32Array(bufferLength);\n\t                buffer[channelNum] = channel;\n\t                var lastOut = 0;\n\t                for (var i = 0; i < bufferLength; i++) {\n\t                    var white = Math.random() * 2 - 1;\n\t                    channel[i] = (lastOut + 0.02 * white) / 1.02;\n\t                    lastOut = channel[i];\n\t                    channel[i] *= 3.5;    // (roughly) compensate for gain\n\t                }\n\t            }\n\t            return buffer;\n\t        }(),\n\t        'white': function () {\n\t            var buffer = [];\n\t            for (var channelNum = 0; channelNum < channels; channelNum++) {\n\t                var channel = new Float32Array(bufferLength);\n\t                buffer[channelNum] = channel;\n\t                for (var i = 0; i < bufferLength; i++) {\n\t                    channel[i] = Math.random() * 2 - 1;\n\t                }\n\t            }\n\t            return buffer;\n\t        }()\n\t    };\n\t    /**\n\t\t *\tstatic noise buffers\n\t\t *  @static\n\t\t *  @private\n\t\t *  @type {Tone.Buffer}\n\t\t */\n\t    var _noiseBuffers = {};\n\t    //create the Tone.Buffers\n\t    function createBuffers() {\n\t        for (var type in _noiseArrays) {\n\t            _noiseBuffers[type] = new Tone.Buffer().fromArray(_noiseArrays[type]);\n\t        }\n\t    }\n\t    //create the noise buffers\n\t    Tone.getContext(createBuffers);\n\t    Tone.Context.on('init', createBuffers);\n\t    return Tone.Noise;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Simple convolution created with decaying noise.\n\t\t *  \t\tGenerates an Impulse Response Buffer\n\t\t * \t\t\twith Tone.Offline then feeds the IR into ConvolverNode.\n\t\t * \t\t\tNote: the Reverb will not make any sound until [generate](#generate)\n\t\t * \t\t\thas been invoked and resolved.\n\t\t *\n\t\t * \t\t\tInspiration from [ReverbGen](https://github.com/adelespinasse/reverbGen).\n\t\t * \t\t\tCopyright (c) 2014 Alan deLespinasse Apache 2.0 License.\n\t\t *\n\t\t *  @extends {Tone.Convolver}\n\t\t *  @param {Time=} decay The amount of time it will reverberate for.\n\t\t */\n\t    Tone.Reverb = function () {\n\t        var options = Tone.defaults(arguments, ['decay'], Tone.Reverb);\n\t        Tone.Effect.call(this, options);\n\t        /**\n\t\t\t *  Convolver node\n\t\t\t *  @type {ConvolverNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._convolver = this.context.createConvolver();\n\t        /**\n\t\t\t * The duration of the reverb\n\t\t\t * @type {Time}\n\t\t\t */\n\t        this.decay = options.decay;\n\t        /**\n\t\t\t * The amount of time before the reverb is fully\n\t\t\t * ramped in.\n\t\t\t * @type {Time}\n\t\t\t */\n\t        this.preDelay = options.preDelay;\n\t        this.connectEffect(this._convolver);\n\t    };\n\t    Tone.extend(Tone.Reverb, Tone.Effect);\n\t    /**\n\t\t * The defaults\n\t\t * @type {Object}\n\t\t * @static\n\t\t */\n\t    Tone.Reverb.defaults = {\n\t        'decay': 1.5,\n\t        'preDelay': 0.01\n\t    };\n\t    /**\n\t\t * Generate the Impulse Response. Returns a promise while the IR is being\n\t\t * generated.\n\t\t * @return {Promise<Tone.Reverb>} Promise which returns this object.\n\t\t */\n\t    Tone.Reverb.prototype.generate = function () {\n\t        return Tone.Offline(function () {\n\t            //create a noise burst which decays over the duration\n\t            var noiseL = new Tone.Noise();\n\t            var noiseR = new Tone.Noise();\n\t            var merge = new Tone.Merge();\n\t            noiseL.connect(merge.left);\n\t            noiseR.connect(merge.right);\n\t            var gainNode = new Tone.Gain().toMaster();\n\t            merge.connect(gainNode);\n\t            noiseL.start(0);\n\t            noiseR.start(0);\n\t            //short fade in\n\t            gainNode.gain.setValueAtTime(0, 0);\n\t            gainNode.gain.linearRampToValueAtTime(1, this.preDelay);\n\t            //decay\n\t            gainNode.gain.exponentialApproachValueAtTime(0, this.preDelay, this.decay - this.preDelay);\n\t        }.bind(this), this.decay).then(function (buffer) {\n\t            this._convolver.buffer = buffer.get();\n\t            return this;\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return  {Tone.Reverb}  this\n\t\t */\n\t    Tone.Reverb.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._convolver.disconnect();\n\t        this._convolver = null;\n\t        return this;\n\t    };\n\t    return Tone.Reverb;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Base class for stereo feedback effects where the effectReturn\n\t\t *         is fed back into the same channel.\n\t\t *\n\t\t *\t@constructor\n\t\t *\t@extends {Tone.StereoEffect}\n\t\t */\n\t    Tone.StereoFeedbackEffect = function () {\n\t        var options = Tone.defaults(arguments, ['feedback'], Tone.FeedbackEffect);\n\t        Tone.StereoEffect.call(this, options);\n\t        /**\n\t\t\t *  controls the amount of feedback\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.feedback = new Tone.Signal(options.feedback, Tone.Type.NormalRange);\n\t        /**\n\t\t\t *  the left side feeback\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._feedbackL = new Tone.Gain();\n\t        /**\n\t\t\t *  the right side feeback\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._feedbackR = new Tone.Gain();\n\t        //connect it up\n\t        this.effectReturnL.chain(this._feedbackL, this.effectSendL);\n\t        this.effectReturnR.chain(this._feedbackR, this.effectSendR);\n\t        this.feedback.fan(this._feedbackL.gain, this._feedbackR.gain);\n\t        this._readOnly(['feedback']);\n\t    };\n\t    Tone.extend(Tone.StereoFeedbackEffect, Tone.StereoEffect);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.StereoFeedbackEffect} this\n\t\t */\n\t    Tone.StereoFeedbackEffect.prototype.dispose = function () {\n\t        Tone.StereoEffect.prototype.dispose.call(this);\n\t        this._writable(['feedback']);\n\t        this.feedback.dispose();\n\t        this.feedback = null;\n\t        this._feedbackL.dispose();\n\t        this._feedbackL = null;\n\t        this._feedbackR.dispose();\n\t        this._feedbackR = null;\n\t        return this;\n\t    };\n\t    return Tone.StereoFeedbackEffect;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Applies a width factor to the mid/side seperation.\n\t\t *         0 is all mid and 1 is all side.\n\t\t *         Algorithm found in [kvraudio forums](http://www.kvraudio.com/forum/viewtopic.php?t=212587).\n\t\t *         <br><br>\n\t\t *         <code>\n\t\t *         Mid *= 2*(1-width)<br>\n\t\t *         Side *= 2*width\n\t\t *         </code>\n\t\t *\n\t\t *  @extends {Tone.MidSideEffect}\n\t\t *  @constructor\n\t\t *  @param {NormalRange|Object} [width] The stereo width. A width of 0 is mono and 1 is stereo. 0.5 is no change.\n\t\t */\n\t    Tone.StereoWidener = function () {\n\t        var options = Tone.defaults(arguments, ['width'], Tone.StereoWidener);\n\t        Tone.MidSideEffect.call(this, options);\n\t        /**\n\t\t\t *  The width control. 0 = 100% mid. 1 = 100% side. 0.5 = no change.\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.width = new Tone.Signal(options.width, Tone.Type.NormalRange);\n\t        this._readOnly(['width']);\n\t        /**\n\t\t\t * Two times the (1-width) for the mid channel\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t        this._twoTimesWidthMid = new Tone.Multiply(2);\n\t        /**\n\t\t\t * Two times the width for the side channel\n\t\t\t * @type {Tone.Multiply}\n\t\t\t * @private\n\t\t\t */\n\t        this._twoTimesWidthSide = new Tone.Multiply(2);\n\t        /**\n\t\t\t *  Mid multiplier\n\t\t\t *  @type {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._midMult = new Tone.Multiply();\n\t        this._twoTimesWidthMid.connect(this._midMult, 0, 1);\n\t        this.midSend.chain(this._midMult, this.midReturn);\n\t        /**\n\t\t\t * 1 - width\n\t\t\t * @type {Tone}\n\t\t\t */\n\t        this._oneMinusWidth = new Tone.Subtract();\n\t        this._oneMinusWidth.connect(this._twoTimesWidthMid);\n\t        this.context.getConstant(1).connect(this._oneMinusWidth, 0, 0);\n\t        this.width.connect(this._oneMinusWidth, 0, 1);\n\t        /**\n\t\t\t *  Side multiplier\n\t\t\t *  @type {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sideMult = new Tone.Multiply();\n\t        this.width.connect(this._twoTimesWidthSide);\n\t        this._twoTimesWidthSide.connect(this._sideMult, 0, 1);\n\t        this.sideSend.chain(this._sideMult, this.sideReturn);\n\t    };\n\t    Tone.extend(Tone.StereoWidener, Tone.MidSideEffect);\n\t    /**\n\t\t *  the default values\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.StereoWidener.defaults = { 'width': 0.5 };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.StereoWidener} this\n\t\t */\n\t    Tone.StereoWidener.prototype.dispose = function () {\n\t        Tone.MidSideEffect.prototype.dispose.call(this);\n\t        this._writable(['width']);\n\t        this.width.dispose();\n\t        this.width = null;\n\t        this._midMult.dispose();\n\t        this._midMult = null;\n\t        this._sideMult.dispose();\n\t        this._sideMult = null;\n\t        this._twoTimesWidthMid.dispose();\n\t        this._twoTimesWidthMid = null;\n\t        this._twoTimesWidthSide.dispose();\n\t        this._twoTimesWidthSide = null;\n\t        this._oneMinusWidth.dispose();\n\t        this._oneMinusWidth = null;\n\t        return this;\n\t    };\n\t    return Tone.StereoWidener;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Tremolo modulates the amplitude of an incoming signal using a Tone.LFO.\n\t\t *         The type, frequency, and depth of the LFO is controllable.\n\t\t *\n\t\t *  @extends {Tone.StereoEffect}\n\t\t *  @constructor\n\t\t *  @param {Frequency} [frequency] The rate of the effect.\n\t\t *  @param {NormalRange} [depth] The depth of the effect.\n\t\t *  @example\n\t\t * //create a tremolo and start it's LFO\n\t\t * var tremolo = new Tone.Tremolo(9, 0.75).toMaster().start();\n\t\t * //route an oscillator through the tremolo and start it\n\t\t * var oscillator = new Tone.Oscillator().connect(tremolo).start();\n\t\t */\n\t    Tone.Tremolo = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'depth'\n\t        ], Tone.Tremolo);\n\t        Tone.StereoEffect.call(this, options);\n\t        /**\n\t\t\t *  The tremelo LFO in the left channel\n\t\t\t *  @type  {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfoL = new Tone.LFO({\n\t            'phase': options.spread,\n\t            'min': 1,\n\t            'max': 0\n\t        });\n\t        /**\n\t\t\t *  The tremelo LFO in the left channel\n\t\t\t *  @type  {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfoR = new Tone.LFO({\n\t            'phase': options.spread,\n\t            'min': 1,\n\t            'max': 0\n\t        });\n\t        /**\n\t\t\t *  Where the gain is multiplied\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._amplitudeL = new Tone.Gain();\n\t        /**\n\t\t\t *  Where the gain is multiplied\n\t\t\t *  @type  {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._amplitudeR = new Tone.Gain();\n\t        /**\n\t\t\t *  The frequency of the tremolo.\n\t\t\t *  @type  {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The depth of the effect. A depth of 0, has no effect\n\t\t\t *  on the amplitude, and a depth of 1 makes the amplitude\n\t\t\t *  modulate fully between 0 and 1.\n\t\t\t *  @type  {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.depth = new Tone.Signal(options.depth, Tone.Type.NormalRange);\n\t        this._readOnly([\n\t            'frequency',\n\t            'depth'\n\t        ]);\n\t        this.effectSendL.chain(this._amplitudeL, this.effectReturnL);\n\t        this.effectSendR.chain(this._amplitudeR, this.effectReturnR);\n\t        this._lfoL.connect(this._amplitudeL.gain);\n\t        this._lfoR.connect(this._amplitudeR.gain);\n\t        this.frequency.fan(this._lfoL.frequency, this._lfoR.frequency);\n\t        this.depth.fan(this._lfoR.amplitude, this._lfoL.amplitude);\n\t        this.type = options.type;\n\t        this.spread = options.spread;\n\t    };\n\t    Tone.extend(Tone.Tremolo, Tone.StereoEffect);\n\t    /**\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Tremolo.defaults = {\n\t        'frequency': 10,\n\t        'type': 'sine',\n\t        'depth': 0.5,\n\t        'spread': 180\n\t    };\n\t    /**\n\t\t * Start the tremolo.\n\t\t * @param {Time} [time=now] When the tremolo begins.\n\t\t * @returns {Tone.Tremolo} this\n\t\t */\n\t    Tone.Tremolo.prototype.start = function (time) {\n\t        this._lfoL.start(time);\n\t        this._lfoR.start(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Stop the tremolo.\n\t\t * @param {Time} [time=now] When the tremolo stops.\n\t\t * @returns {Tone.Tremolo} this\n\t\t */\n\t    Tone.Tremolo.prototype.stop = function (time) {\n\t        this._lfoL.stop(time);\n\t        this._lfoR.stop(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Sync the effect to the transport.\n\t\t * @param {Time} [delay=0] Delay time before starting the effect after the\n\t\t *                              Transport has started.\n\t\t * @returns {Tone.AutoFilter} this\n\t\t */\n\t    Tone.Tremolo.prototype.sync = function (delay) {\n\t        this._lfoL.sync(delay);\n\t        this._lfoR.sync(delay);\n\t        Tone.Transport.syncSignal(this.frequency);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Unsync the filter from the transport\n\t\t * @returns {Tone.Tremolo} this\n\t\t */\n\t    Tone.Tremolo.prototype.unsync = function () {\n\t        this._lfoL.unsync();\n\t        this._lfoR.unsync();\n\t        Tone.Transport.unsyncSignal(this.frequency);\n\t        return this;\n\t    };\n\t    /**\n\t\t * The Tremolo's oscillator type.\n\t\t * @memberOf Tone.Tremolo#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.Tremolo.prototype, 'type', {\n\t        get: function () {\n\t            return this._lfoL.type;\n\t        },\n\t        set: function (type) {\n\t            this._lfoL.type = type;\n\t            this._lfoR.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t * Amount of stereo spread. When set to 0, both LFO's will be panned centrally.\n\t\t * When set to 180, LFO's will be panned hard left and right respectively.\n\t\t * @memberOf Tone.Tremolo#\n\t\t * @type {Degrees}\n\t\t * @name spread\n\t\t */\n\t    Object.defineProperty(Tone.Tremolo.prototype, 'spread', {\n\t        get: function () {\n\t            return this._lfoR.phase - this._lfoL.phase;    //180\n\t        },\n\t        set: function (spread) {\n\t            this._lfoL.phase = 90 - spread / 2;\n\t            this._lfoR.phase = spread / 2 + 90;\n\t        }\n\t    });\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Tremolo} this\n\t\t */\n\t    Tone.Tremolo.prototype.dispose = function () {\n\t        Tone.StereoEffect.prototype.dispose.call(this);\n\t        this._writable([\n\t            'frequency',\n\t            'depth'\n\t        ]);\n\t        this._lfoL.dispose();\n\t        this._lfoL = null;\n\t        this._lfoR.dispose();\n\t        this._lfoR = null;\n\t        this._amplitudeL.dispose();\n\t        this._amplitudeL = null;\n\t        this._amplitudeR.dispose();\n\t        this._amplitudeR = null;\n\t        this.frequency = null;\n\t        this.depth = null;\n\t        return this;\n\t    };\n\t    return Tone.Tremolo;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class A Vibrato effect composed of a Tone.Delay and a Tone.LFO. The LFO\n\t\t *         modulates the delayTime of the delay, causing the pitch to rise\n\t\t *         and fall. \n\t\t *  @extends {Tone.Effect}\n\t\t *  @param {Frequency} frequency The frequency of the vibrato.\n\t\t *  @param {NormalRange} depth The amount the pitch is modulated.\n\t\t */\n\t    Tone.Vibrato = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'depth'\n\t        ], Tone.Vibrato);\n\t        Tone.Effect.call(this, options);\n\t        /**\n\t\t\t *  The delay node used for the vibrato effect\n\t\t\t *  @type {Tone.Delay}\n\t\t\t *  @private\n\t\t\t */\n\t        this._delayNode = new Tone.Delay(0, options.maxDelay);\n\t        /**\n\t\t\t *  The LFO used to control the vibrato\n\t\t\t *  @type {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfo = new Tone.LFO({\n\t            'type': options.type,\n\t            'min': 0,\n\t            'max': options.maxDelay,\n\t            'frequency': options.frequency,\n\t            'phase': -90    //offse the phase so the resting position is in the center\n\t        }).start().connect(this._delayNode.delayTime);\n\t        /**\n\t\t\t *  The frequency of the vibrato\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = this._lfo.frequency;\n\t        /**\n\t\t\t *  The depth of the vibrato. \n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.depth = this._lfo.amplitude;\n\t        this.depth.value = options.depth;\n\t        this._readOnly([\n\t            'frequency',\n\t            'depth'\n\t        ]);\n\t        this.effectSend.chain(this._delayNode, this.effectReturn);\n\t    };\n\t    Tone.extend(Tone.Vibrato, Tone.Effect);\n\t    /**\n\t\t *  The defaults\n\t\t *  @type  {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.Vibrato.defaults = {\n\t        'maxDelay': 0.005,\n\t        'frequency': 5,\n\t        'depth': 0.1,\n\t        'type': 'sine'\n\t    };\n\t    /**\n\t\t * Type of oscillator attached to the Vibrato.\n\t\t * @memberOf Tone.Vibrato#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.Vibrato.prototype, 'type', {\n\t        get: function () {\n\t            return this._lfo.type;\n\t        },\n\t        set: function (type) {\n\t            this._lfo.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.Vibrato} this\n\t\t */\n\t    Tone.Vibrato.prototype.dispose = function () {\n\t        Tone.Effect.prototype.dispose.call(this);\n\t        this._delayNode.dispose();\n\t        this._delayNode = null;\n\t        this._lfo.dispose();\n\t        this._lfo = null;\n\t        this._writable([\n\t            'frequency',\n\t            'depth'\n\t        ]);\n\t        this.frequency = null;\n\t        this.depth = null;\n\t    };\n\t    return Tone.Vibrato;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Event abstracts away Tone.Transport.schedule and provides a schedulable\n\t\t *          callback for a single or repeatable events along the timeline.\n\t\t *\n\t\t *  @extends {Tone}\n\t\t *  @param {function} callback The callback to invoke at the time.\n\t\t *  @param {*} value The value or values which should be passed to\n\t\t *                      the callback function on invocation.\n\t\t *  @example\n\t\t * var chord = new Tone.Event(function(time, chord){\n\t\t * \t//the chord as well as the exact time of the event\n\t\t * \t//are passed in as arguments to the callback function\n\t\t * }, [\"D4\", \"E4\", \"F4\"]);\n\t\t * //start the chord at the beginning of the transport timeline\n\t\t * chord.start();\n\t\t * //loop it every measure for 8 measures\n\t\t * chord.loop = 8;\n\t\t * chord.loopEnd = \"1m\";\n\t\t */\n\t    Tone.Event = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'callback',\n\t            'value'\n\t        ], Tone.Event);\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  Loop value\n\t\t\t *  @type  {Boolean|Positive}\n\t\t\t *  @private\n\t\t\t */\n\t        this._loop = options.loop;\n\t        /**\n\t\t\t *  The callback to invoke.\n\t\t\t *  @type  {Function}\n\t\t\t */\n\t        this.callback = options.callback;\n\t        /**\n\t\t\t *  The value which is passed to the\n\t\t\t *  callback function.\n\t\t\t *  @type  {*}\n\t\t\t *  @private\n\t\t\t */\n\t        this.value = options.value;\n\t        /**\n\t\t\t *  When the note is scheduled to start.\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._loopStart = this.toTicks(options.loopStart);\n\t        /**\n\t\t\t *  When the note is scheduled to start.\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._loopEnd = this.toTicks(options.loopEnd);\n\t        /**\n\t\t\t *  Tracks the scheduled events\n\t\t\t *  @type {Tone.TimelineState}\n\t\t\t *  @private\n\t\t\t */\n\t        this._state = new Tone.TimelineState(Tone.State.Stopped);\n\t        /**\n\t\t\t *  The playback speed of the note. A speed of 1\n\t\t\t *  is no change.\n\t\t\t *  @private\n\t\t\t *  @type {Positive}\n\t\t\t */\n\t        this._playbackRate = 1;\n\t        /**\n\t\t\t *  A delay time from when the event is scheduled to start\n\t\t\t *  @type {Ticks}\n\t\t\t *  @private\n\t\t\t */\n\t        this._startOffset = 0;\n\t        /**\n\t\t\t *  private holder of probability value\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @private\n\t\t\t */\n\t        this._probability = options.probability;\n\t        /**\n\t\t\t *  the amount of variation from the\n\t\t\t *  given time.\n\t\t\t *  @type {Boolean|Time}\n\t\t\t *  @private\n\t\t\t */\n\t        this._humanize = options.humanize;\n\t        /**\n\t\t\t *  If mute is true, the callback won't be\n\t\t\t *  invoked.\n\t\t\t *  @type {Boolean}\n\t\t\t */\n\t        this.mute = options.mute;\n\t        //set the initial values\n\t        this.playbackRate = options.playbackRate;\n\t    };\n\t    Tone.extend(Tone.Event);\n\t    /**\n\t\t *  The default values\n\t\t *  @type  {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.Event.defaults = {\n\t        'callback': Tone.noOp,\n\t        'loop': false,\n\t        'loopEnd': '1m',\n\t        'loopStart': 0,\n\t        'playbackRate': 1,\n\t        'value': null,\n\t        'probability': 1,\n\t        'mute': false,\n\t        'humanize': false\n\t    };\n\t    /**\n\t\t *  Reschedule all of the events along the timeline\n\t\t *  with the updated values.\n\t\t *  @param {Time} after Only reschedules events after the given time.\n\t\t *  @return  {Tone.Event}  this\n\t\t *  @private\n\t\t */\n\t    Tone.Event.prototype._rescheduleEvents = function (after) {\n\t        //if no argument is given, schedules all of the events\n\t        after = Tone.defaultArg(after, -1);\n\t        this._state.forEachFrom(after, function (event) {\n\t            var duration;\n\t            if (event.state === Tone.State.Started) {\n\t                if (Tone.isDefined(event.id)) {\n\t                    Tone.Transport.clear(event.id);\n\t                }\n\t                var startTick = event.time + Math.round(this.startOffset / this._playbackRate);\n\t                if (this._loop) {\n\t                    duration = Infinity;\n\t                    if (Tone.isNumber(this._loop)) {\n\t                        duration = this._loop * this._getLoopDuration();\n\t                    }\n\t                    var nextEvent = this._state.getAfter(startTick);\n\t                    if (nextEvent !== null) {\n\t                        duration = Math.min(duration, nextEvent.time - startTick);\n\t                    }\n\t                    if (duration !== Infinity) {\n\t                        //schedule a stop since it's finite duration\n\t                        this._state.setStateAtTime(Tone.State.Stopped, startTick + duration + 1);\n\t                        duration = Tone.Ticks(duration);\n\t                    }\n\t                    var interval = Tone.Ticks(this._getLoopDuration());\n\t                    event.id = Tone.Transport.scheduleRepeat(this._tick.bind(this), interval, Tone.Ticks(startTick), duration);\n\t                } else {\n\t                    event.id = Tone.Transport.schedule(this._tick.bind(this), Tone.Ticks(startTick));\n\t                }\n\t            }\n\t        }.bind(this));\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Returns the playback state of the note, either \"started\" or \"stopped\".\n\t\t *  @type {String}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.Event#\n\t\t *  @name state\n\t\t */\n\t    Object.defineProperty(Tone.Event.prototype, 'state', {\n\t        get: function () {\n\t            return this._state.getValueAtTime(Tone.Transport.ticks);\n\t        }\n\t    });\n\t    /**\n\t\t *  The start from the scheduled start time\n\t\t *  @type {Ticks}\n\t\t *  @memberOf Tone.Event#\n\t\t *  @name startOffset\n\t\t *  @private\n\t\t */\n\t    Object.defineProperty(Tone.Event.prototype, 'startOffset', {\n\t        get: function () {\n\t            return this._startOffset;\n\t        },\n\t        set: function (offset) {\n\t            this._startOffset = offset;\n\t        }\n\t    });\n\t    /**\n\t\t *  The probability of the notes being triggered.\n\t\t *  @memberOf Tone.Event#\n\t\t *  @type {NormalRange}\n\t\t *  @name probability\n\t\t */\n\t    Object.defineProperty(Tone.Event.prototype, 'probability', {\n\t        get: function () {\n\t            return this._probability;\n\t        },\n\t        set: function (prob) {\n\t            this._probability = prob;\n\t        }\n\t    });\n\t    /**\n\t\t *  If set to true, will apply small random variation\n\t\t *  to the callback time. If the value is given as a time, it will randomize\n\t\t *  by that amount.\n\t\t *  @example\n\t\t * event.humanize = true;\n\t\t *  @type {Boolean|Time}\n\t\t *  @name humanize\n\t\t */\n\t    Object.defineProperty(Tone.Event.prototype, 'humanize', {\n\t        get: function () {\n\t            return this._humanize;\n\t        },\n\t        set: function (variation) {\n\t            this._humanize = variation;\n\t        }\n\t    });\n\t    /**\n\t\t *  Start the note at the given time.\n\t\t *  @param  {TimelinePosition}  time  When the note should start.\n\t\t *  @return  {Tone.Event}  this\n\t\t */\n\t    Tone.Event.prototype.start = function (time) {\n\t        time = this.toTicks(time);\n\t        if (this._state.getValueAtTime(time) === Tone.State.Stopped) {\n\t            this._state.add({\n\t                'state': Tone.State.Started,\n\t                'time': time,\n\t                'id': undefined\n\t            });\n\t            this._rescheduleEvents(time);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Stop the Event at the given time.\n\t\t *  @param  {TimelinePosition}  time  When the note should stop.\n\t\t *  @return  {Tone.Event}  this\n\t\t */\n\t    Tone.Event.prototype.stop = function (time) {\n\t        this.cancel(time);\n\t        time = this.toTicks(time);\n\t        if (this._state.getValueAtTime(time) === Tone.State.Started) {\n\t            this._state.setStateAtTime(Tone.State.Stopped, time);\n\t            var previousEvent = this._state.getBefore(time);\n\t            var reschedulTime = time;\n\t            if (previousEvent !== null) {\n\t                reschedulTime = previousEvent.time;\n\t            }\n\t            this._rescheduleEvents(reschedulTime);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancel all scheduled events greater than or equal to the given time\n\t\t *  @param  {TimelinePosition}  [time=0]  The time after which events will be cancel.\n\t\t *  @return  {Tone.Event}  this\n\t\t */\n\t    Tone.Event.prototype.cancel = function (time) {\n\t        time = Tone.defaultArg(time, -Infinity);\n\t        time = this.toTicks(time);\n\t        this._state.forEachFrom(time, function (event) {\n\t            Tone.Transport.clear(event.id);\n\t        });\n\t        this._state.cancel(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  The callback function invoker. Also\n\t\t *  checks if the Event is done playing\n\t\t *  @param  {Number}  time  The time of the event in seconds\n\t\t *  @private\n\t\t */\n\t    Tone.Event.prototype._tick = function (time) {\n\t        var ticks = Tone.Transport.getTicksAtTime(time);\n\t        if (!this.mute && this._state.getValueAtTime(ticks) === Tone.State.Started) {\n\t            if (this.probability < 1 && Math.random() > this.probability) {\n\t                return;\n\t            }\n\t            if (this.humanize) {\n\t                var variation = 0.02;\n\t                if (!Tone.isBoolean(this.humanize)) {\n\t                    variation = this.toSeconds(this.humanize);\n\t                }\n\t                time += (Math.random() * 2 - 1) * variation;\n\t            }\n\t            this.callback(time, this.value);\n\t        }\n\t    };\n\t    /**\n\t\t *  Get the duration of the loop.\n\t\t *  @return  {Ticks}\n\t\t *  @private\n\t\t */\n\t    Tone.Event.prototype._getLoopDuration = function () {\n\t        return Math.round((this._loopEnd - this._loopStart) / this._playbackRate);\n\t    };\n\t    /**\n\t\t *  If the note should loop or not\n\t\t *  between Tone.Event.loopStart and\n\t\t *  Tone.Event.loopEnd. An integer\n\t\t *  value corresponds to the number of\n\t\t *  loops the Event does after it starts.\n\t\t *  @memberOf Tone.Event#\n\t\t *  @type {Boolean|Positive}\n\t\t *  @name loop\n\t\t */\n\t    Object.defineProperty(Tone.Event.prototype, 'loop', {\n\t        get: function () {\n\t            return this._loop;\n\t        },\n\t        set: function (loop) {\n\t            this._loop = loop;\n\t            this._rescheduleEvents();\n\t        }\n\t    });\n\t    /**\n\t\t * \tThe playback rate of the note. Defaults to 1.\n\t\t *  @memberOf Tone.Event#\n\t\t *  @type {Positive}\n\t\t *  @name playbackRate\n\t\t *  @example\n\t\t * note.loop = true;\n\t\t * //repeat the note twice as fast\n\t\t * note.playbackRate = 2;\n\t\t */\n\t    Object.defineProperty(Tone.Event.prototype, 'playbackRate', {\n\t        get: function () {\n\t            return this._playbackRate;\n\t        },\n\t        set: function (rate) {\n\t            this._playbackRate = rate;\n\t            this._rescheduleEvents();\n\t        }\n\t    });\n\t    /**\n\t\t *  The loopEnd point is the time the event will loop\n\t\t *  if Tone.Event.loop is true.\n\t\t *  @memberOf Tone.Event#\n\t\t *  @type {Time}\n\t\t *  @name loopEnd\n\t\t */\n\t    Object.defineProperty(Tone.Event.prototype, 'loopEnd', {\n\t        get: function () {\n\t            return Tone.Ticks(this._loopEnd).toSeconds();\n\t        },\n\t        set: function (loopEnd) {\n\t            this._loopEnd = this.toTicks(loopEnd);\n\t            if (this._loop) {\n\t                this._rescheduleEvents();\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  The time when the loop should start.\n\t\t *  @memberOf Tone.Event#\n\t\t *  @type {Time}\n\t\t *  @name loopStart\n\t\t */\n\t    Object.defineProperty(Tone.Event.prototype, 'loopStart', {\n\t        get: function () {\n\t            return Tone.Ticks(this._loopStart).toSeconds();\n\t        },\n\t        set: function (loopStart) {\n\t            this._loopStart = this.toTicks(loopStart);\n\t            if (this._loop) {\n\t                this._rescheduleEvents();\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  The current progress of the loop interval.\n\t\t *  Returns 0 if the event is not started yet or\n\t\t *  it is not set to loop.\n\t\t *  @memberOf Tone.Event#\n\t\t *  @type {NormalRange}\n\t\t *  @name progress\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Event.prototype, 'progress', {\n\t        get: function () {\n\t            if (this._loop) {\n\t                var ticks = Tone.Transport.ticks;\n\t                var lastEvent = this._state.get(ticks);\n\t                if (lastEvent !== null && lastEvent.state === Tone.State.Started) {\n\t                    var loopDuration = this._getLoopDuration();\n\t                    var progress = (ticks - lastEvent.time) % loopDuration;\n\t                    return progress / loopDuration;\n\t                } else {\n\t                    return 0;\n\t                }\n\t            } else {\n\t                return 0;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.Event}  this\n\t\t */\n\t    Tone.Event.prototype.dispose = function () {\n\t        this.cancel();\n\t        this._state.dispose();\n\t        this._state = null;\n\t        this.callback = null;\n\t        this.value = null;\n\t    };\n\t    return Tone.Event;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.Loop creates a looped callback at the \n\t\t *         specified interval. The callback can be \n\t\t *         started, stopped and scheduled along\n\t\t *         the Transport's timeline. \n\t\t *  @example\n\t\t * var loop = new Tone.Loop(function(time){\n\t\t * \t//triggered every eighth note. \n\t\t * \tconsole.log(time);\n\t\t * }, \"8n\").start(0);\n\t\t * Tone.Transport.start();\n\t\t *  @extends {Tone}\n\t\t *  @param {Function} callback The callback to invoke with the event.\n\t\t *  @param {Time} interval The time between successive callback calls. \n\t\t */\n\t    Tone.Loop = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'callback',\n\t            'interval'\n\t        ], Tone.Loop);\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  The event which produces the callbacks\n\t\t\t */\n\t        this._event = new Tone.Event({\n\t            'callback': this._tick.bind(this),\n\t            'loop': true,\n\t            'loopEnd': options.interval,\n\t            'playbackRate': options.playbackRate,\n\t            'probability': options.probability\n\t        });\n\t        /**\n\t\t\t *  The callback to invoke with the next event in the pattern\n\t\t\t *  @type {Function}\n\t\t\t */\n\t        this.callback = options.callback;\n\t        //set the iterations\n\t        this.iterations = options.iterations;\n\t    };\n\t    Tone.extend(Tone.Loop);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.Loop.defaults = {\n\t        'interval': '4n',\n\t        'callback': Tone.noOp,\n\t        'playbackRate': 1,\n\t        'iterations': Infinity,\n\t        'probability': true,\n\t        'mute': false\n\t    };\n\t    /**\n\t\t *  Start the loop at the specified time along the Transport's\n\t\t *  timeline.\n\t\t *  @param  {TimelinePosition=}  time  When to start the Loop.\n\t\t *  @return  {Tone.Loop}  this\n\t\t */\n\t    Tone.Loop.prototype.start = function (time) {\n\t        this._event.start(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Stop the loop at the given time.\n\t\t *  @param  {TimelinePosition=}  time  When to stop the Arpeggio\n\t\t *  @return  {Tone.Loop}  this\n\t\t */\n\t    Tone.Loop.prototype.stop = function (time) {\n\t        this._event.stop(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancel all scheduled events greater than or equal to the given time\n\t\t *  @param  {TimelinePosition}  [time=0]  The time after which events will be cancel.\n\t\t *  @return  {Tone.Loop}  this\n\t\t */\n\t    Tone.Loop.prototype.cancel = function (time) {\n\t        this._event.cancel(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Internal function called when the notes should be called\n\t\t *  @param  {Number}  time  The time the event occurs\n\t\t *  @private\n\t\t */\n\t    Tone.Loop.prototype._tick = function (time) {\n\t        this.callback(time);\n\t    };\n\t    /**\n\t\t *  The state of the Loop, either started or stopped.\n\t\t *  @memberOf Tone.Loop#\n\t\t *  @type {String}\n\t\t *  @name state\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Loop.prototype, 'state', {\n\t        get: function () {\n\t            return this._event.state;\n\t        }\n\t    });\n\t    /**\n\t\t *  The progress of the loop as a value between 0-1. 0, when\n\t\t *  the loop is stopped or done iterating. \n\t\t *  @memberOf Tone.Loop#\n\t\t *  @type {NormalRange}\n\t\t *  @name progress\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Loop.prototype, 'progress', {\n\t        get: function () {\n\t            return this._event.progress;\n\t        }\n\t    });\n\t    /**\n\t\t *  The time between successive callbacks. \n\t\t *  @example\n\t\t * loop.interval = \"8n\"; //loop every 8n\n\t\t *  @memberOf Tone.Loop#\n\t\t *  @type {Time}\n\t\t *  @name interval\n\t\t */\n\t    Object.defineProperty(Tone.Loop.prototype, 'interval', {\n\t        get: function () {\n\t            return this._event.loopEnd;\n\t        },\n\t        set: function (interval) {\n\t            this._event.loopEnd = interval;\n\t        }\n\t    });\n\t    /**\n\t\t *  The playback rate of the loop. The normal playback rate is 1 (no change). \n\t\t *  A `playbackRate` of 2 would be twice as fast. \n\t\t *  @memberOf Tone.Loop#\n\t\t *  @type {Time}\n\t\t *  @name playbackRate\n\t\t */\n\t    Object.defineProperty(Tone.Loop.prototype, 'playbackRate', {\n\t        get: function () {\n\t            return this._event.playbackRate;\n\t        },\n\t        set: function (rate) {\n\t            this._event.playbackRate = rate;\n\t        }\n\t    });\n\t    /**\n\t\t *  Random variation +/-0.01s to the scheduled time. \n\t\t *  Or give it a time value which it will randomize by.\n\t\t *  @type {Boolean|Time}\n\t\t *  @memberOf Tone.Loop#\n\t\t *  @name humanize\n\t\t */\n\t    Object.defineProperty(Tone.Loop.prototype, 'humanize', {\n\t        get: function () {\n\t            return this._event.humanize;\n\t        },\n\t        set: function (variation) {\n\t            this._event.humanize = variation;\n\t        }\n\t    });\n\t    /**\n\t\t *  The probably of the callback being invoked.\n\t\t *  @memberOf Tone.Loop#\n\t\t *  @type {NormalRange}\n\t\t *  @name probability\n\t\t */\n\t    Object.defineProperty(Tone.Loop.prototype, 'probability', {\n\t        get: function () {\n\t            return this._event.probability;\n\t        },\n\t        set: function (prob) {\n\t            this._event.probability = prob;\n\t        }\n\t    });\n\t    /**\n\t\t *  Muting the Loop means that no callbacks are invoked.\n\t\t *  @memberOf Tone.Loop#\n\t\t *  @type {Boolean}\n\t\t *  @name mute\n\t\t */\n\t    Object.defineProperty(Tone.Loop.prototype, 'mute', {\n\t        get: function () {\n\t            return this._event.mute;\n\t        },\n\t        set: function (mute) {\n\t            this._event.mute = mute;\n\t        }\n\t    });\n\t    /**\n\t\t *  The number of iterations of the loop. The default\n\t\t *  value is Infinity (loop forever).\n\t\t *  @memberOf Tone.Loop#\n\t\t *  @type {Positive}\n\t\t *  @name iterations\n\t\t */\n\t    Object.defineProperty(Tone.Loop.prototype, 'iterations', {\n\t        get: function () {\n\t            if (this._event.loop === true) {\n\t                return Infinity;\n\t            } else {\n\t                return this._event.loop;\n\t            }\n\t        },\n\t        set: function (iters) {\n\t            if (iters === Infinity) {\n\t                this._event.loop = true;\n\t            } else {\n\t                this._event.loop = iters;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.Loop}  this\n\t\t */\n\t    Tone.Loop.prototype.dispose = function () {\n\t        this._event.dispose();\n\t        this._event = null;\n\t        this.callback = null;\n\t    };\n\t    return Tone.Loop;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.Part is a collection Tone.Events which can be\n\t\t *         started/stopped and looped as a single unit.\n\t\t *\n\t\t *  @extends {Tone.Event}\n\t\t *  @param {Function} callback The callback to invoke on each event\n\t\t *  @param {Array} events the array of events\n\t\t *  @example\n\t\t * var part = new Tone.Part(function(time, note){\n\t\t * \t//the notes given as the second element in the array\n\t\t * \t//will be passed in as the second argument\n\t\t * \tsynth.triggerAttackRelease(note, \"8n\", time);\n\t\t * }, [[0, \"C2\"], [\"0:2\", \"C3\"], [\"0:3:2\", \"G2\"]]);\n\t\t *  @example\n\t\t * //use an array of objects as long as the object has a \"time\" attribute\n\t\t * var part = new Tone.Part(function(time, value){\n\t\t * \t//the value is an object which contains both the note and the velocity\n\t\t * \tsynth.triggerAttackRelease(value.note, \"8n\", time, value.velocity);\n\t\t * }, [{\"time\" : 0, \"note\" : \"C3\", \"velocity\": 0.9},\n\t\t * \t   {\"time\" : \"0:2\", \"note\" : \"C4\", \"velocity\": 0.5}\n\t\t * ]).start(0);\n\t\t */\n\t    Tone.Part = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'callback',\n\t            'events'\n\t        ], Tone.Part);\n\t        Tone.Event.call(this, options);\n\t        /**\n\t\t\t *  An array of Objects.\n\t\t\t *  @type  {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._events = [];\n\t        //add the events\n\t        for (var i = 0; i < options.events.length; i++) {\n\t            if (Array.isArray(options.events[i])) {\n\t                this.add(options.events[i][0], options.events[i][1]);\n\t            } else {\n\t                this.add(options.events[i]);\n\t            }\n\t        }\n\t    };\n\t    Tone.extend(Tone.Part, Tone.Event);\n\t    /**\n\t\t *  The default values\n\t\t *  @type  {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.Part.defaults = {\n\t        'callback': Tone.noOp,\n\t        'loop': false,\n\t        'loopEnd': '1m',\n\t        'loopStart': 0,\n\t        'playbackRate': 1,\n\t        'probability': 1,\n\t        'humanize': false,\n\t        'mute': false,\n\t        'events': []\n\t    };\n\t    /**\n\t\t *  Start the part at the given time.\n\t\t *  @param  {TransportTime}  time    When to start the part.\n\t\t *  @param  {Time=}  offset  The offset from the start of the part\n\t\t *                           to begin playing at.\n\t\t *  @return  {Tone.Part}  this\n\t\t */\n\t    Tone.Part.prototype.start = function (time, offset) {\n\t        var ticks = this.toTicks(time);\n\t        if (this._state.getValueAtTime(ticks) !== Tone.State.Started) {\n\t            if (this._loop) {\n\t                offset = Tone.defaultArg(offset, this._loopStart);\n\t            } else {\n\t                offset = Tone.defaultArg(offset, 0);\n\t            }\n\t            offset = this.toTicks(offset);\n\t            this._state.add({\n\t                'state': Tone.State.Started,\n\t                'time': ticks,\n\t                'offset': offset\n\t            });\n\t            this._forEach(function (event) {\n\t                this._startNote(event, ticks, offset);\n\t            });\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Start the event in the given event at the correct time given\n\t\t *  the ticks and offset and looping.\n\t\t *  @param  {Tone.Event}  event\n\t\t *  @param  {Ticks}  ticks\n\t\t *  @param  {Ticks}  offset\n\t\t *  @private\n\t\t */\n\t    Tone.Part.prototype._startNote = function (event, ticks, offset) {\n\t        ticks -= offset;\n\t        if (this._loop) {\n\t            if (event.startOffset >= this._loopStart && event.startOffset < this._loopEnd) {\n\t                if (event.startOffset < offset) {\n\t                    //start it on the next loop\n\t                    ticks += this._getLoopDuration();\n\t                }\n\t                event.start(Tone.Ticks(ticks));\n\t            } else if (event.startOffset < this._loopStart && event.startOffset >= offset) {\n\t                event.loop = false;\n\t                event.start(Tone.Ticks(ticks));\n\t            }\n\t        } else if (event.startOffset >= offset) {\n\t            event.start(Tone.Ticks(ticks));\n\t        }\n\t    };\n\t    /**\n\t\t *  The start from the scheduled start time\n\t\t *  @type {Ticks}\n\t\t *  @memberOf Tone.Part#\n\t\t *  @name startOffset\n\t\t *  @private\n\t\t */\n\t    Object.defineProperty(Tone.Part.prototype, 'startOffset', {\n\t        get: function () {\n\t            return this._startOffset;\n\t        },\n\t        set: function (offset) {\n\t            this._startOffset = offset;\n\t            this._forEach(function (event) {\n\t                event.startOffset += this._startOffset;\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t *  Stop the part at the given time.\n\t\t *  @param  {TimelinePosition}  time  When to stop the part.\n\t\t *  @return  {Tone.Part}  this\n\t\t */\n\t    Tone.Part.prototype.stop = function (time) {\n\t        var ticks = this.toTicks(time);\n\t        this._state.cancel(ticks);\n\t        this._state.setStateAtTime(Tone.State.Stopped, ticks);\n\t        this._forEach(function (event) {\n\t            event.stop(time);\n\t        });\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Get/Set an Event's value at the given time.\n\t\t *  If a value is passed in and no event exists at\n\t\t *  the given time, one will be created with that value.\n\t\t *  If two events are at the same time, the first one will\n\t\t *  be returned.\n\t\t *  @example\n\t\t * part.at(\"1m\"); //returns the part at the first measure\n\t\t *\n\t\t * part.at(\"2m\", \"C2\"); //set the value at \"2m\" to C2.\n\t\t * //if an event didn't exist at that time, it will be created.\n\t\t *  @param {TransportTime} time The time of the event to get or set.\n\t\t *  @param {*=} value If a value is passed in, the value of the\n\t\t *                    event at the given time will be set to it.\n\t\t *  @return {Tone.Event} the event at the time\n\t\t */\n\t    Tone.Part.prototype.at = function (time, value) {\n\t        time = Tone.TransportTime(time);\n\t        var tickTime = Tone.Ticks(1).toSeconds();\n\t        for (var i = 0; i < this._events.length; i++) {\n\t            var event = this._events[i];\n\t            if (Math.abs(time.toTicks() - event.startOffset) < tickTime) {\n\t                if (Tone.isDefined(value)) {\n\t                    event.value = value;\n\t                }\n\t                return event;\n\t            }\n\t        }\n\t        //if there was no event at that time, create one\n\t        if (Tone.isDefined(value)) {\n\t            this.add(time, value);\n\t            //return the new event\n\t            return this._events[this._events.length - 1];\n\t        } else {\n\t            return null;\n\t        }\n\t    };\n\t    /**\n\t\t *  Add a an event to the part.\n\t\t *  @param {Time} time The time the note should start.\n\t\t *                            If an object is passed in, it should\n\t\t *                            have a 'time' attribute and the rest\n\t\t *                            of the object will be used as the 'value'.\n\t\t *  @param  {Tone.Event|*}  value\n\t\t *  @returns {Tone.Part} this\n\t\t *  @example\n\t\t * part.add(\"1m\", \"C#+11\");\n\t\t */\n\t    Tone.Part.prototype.add = function (time, value) {\n\t        //extract the parameters\n\t        if (time.hasOwnProperty('time')) {\n\t            value = time;\n\t            time = value.time;\n\t        }\n\t        time = this.toTicks(time);\n\t        var event;\n\t        if (value instanceof Tone.Event) {\n\t            event = value;\n\t            event.callback = this._tick.bind(this);\n\t        } else {\n\t            event = new Tone.Event({\n\t                'callback': this._tick.bind(this),\n\t                'value': value\n\t            });\n\t        }\n\t        //the start offset\n\t        event.startOffset = time;\n\t        //initialize the values\n\t        event.set({\n\t            'loopEnd': this.loopEnd,\n\t            'loopStart': this.loopStart,\n\t            'loop': this.loop,\n\t            'humanize': this.humanize,\n\t            'playbackRate': this.playbackRate,\n\t            'probability': this.probability\n\t        });\n\t        this._events.push(event);\n\t        //start the note if it should be played right now\n\t        this._restartEvent(event);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Restart the given event\n\t\t *  @param  {Tone.Event}  event\n\t\t *  @private\n\t\t */\n\t    Tone.Part.prototype._restartEvent = function (event) {\n\t        this._state.forEach(function (stateEvent) {\n\t            if (stateEvent.state === Tone.State.Started) {\n\t                this._startNote(event, stateEvent.time, stateEvent.offset);\n\t            } else {\n\t                //stop the note\n\t                event.stop(Tone.Ticks(stateEvent.time));\n\t            }\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t *  Remove an event from the part. Will recursively iterate\n\t\t *  into nested parts to find the event.\n\t\t *  @param {Time} time The time of the event\n\t\t *  @param {*} value Optionally select only a specific event value\n\t\t *  @return  {Tone.Part}  this\n\t\t */\n\t    Tone.Part.prototype.remove = function (time, value) {\n\t        //extract the parameters\n\t        if (time.hasOwnProperty('time')) {\n\t            value = time;\n\t            time = value.time;\n\t        }\n\t        time = this.toTicks(time);\n\t        for (var i = this._events.length - 1; i >= 0; i--) {\n\t            var event = this._events[i];\n\t            if (event instanceof Tone.Part) {\n\t                event.remove(time, value);\n\t            } else if (event.startOffset === time) {\n\t                if (Tone.isUndef(value) || Tone.isDefined(value) && event.value === value) {\n\t                    this._events.splice(i, 1);\n\t                    event.dispose();\n\t                }\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Remove all of the notes from the group.\n\t\t *  @return  {Tone.Part}  this\n\t\t */\n\t    Tone.Part.prototype.removeAll = function () {\n\t        this._forEach(function (event) {\n\t            event.dispose();\n\t        });\n\t        this._events = [];\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancel scheduled state change events: i.e. \"start\" and \"stop\".\n\t\t *  @param {TimelinePosition} after The time after which to cancel the scheduled events.\n\t\t *  @return  {Tone.Part}  this\n\t\t */\n\t    Tone.Part.prototype.cancel = function (after) {\n\t        this._forEach(function (event) {\n\t            event.cancel(after);\n\t        });\n\t        this._state.cancel(this.toTicks(after));\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Iterate over all of the events\n\t\t *  @param {Function} callback\n\t\t *  @param {Object} ctx The context\n\t\t *  @private\n\t\t */\n\t    Tone.Part.prototype._forEach = function (callback, ctx) {\n\t        if (this._events) {\n\t            ctx = Tone.defaultArg(ctx, this);\n\t            for (var i = this._events.length - 1; i >= 0; i--) {\n\t                var e = this._events[i];\n\t                if (e instanceof Tone.Part) {\n\t                    e._forEach(callback, ctx);\n\t                } else {\n\t                    callback.call(ctx, e);\n\t                }\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Set the attribute of all of the events\n\t\t *  @param  {String}  attr  the attribute to set\n\t\t *  @param  {*}  value      The value to set it to\n\t\t *  @private\n\t\t */\n\t    Tone.Part.prototype._setAll = function (attr, value) {\n\t        this._forEach(function (event) {\n\t            event[attr] = value;\n\t        });\n\t    };\n\t    /**\n\t\t *  Internal tick method\n\t\t *  @param  {Number}  time  The time of the event in seconds\n\t\t *  @private\n\t\t */\n\t    Tone.Part.prototype._tick = function (time, value) {\n\t        if (!this.mute) {\n\t            this.callback(time, value);\n\t        }\n\t    };\n\t    /**\n\t\t *  Determine if the event should be currently looping\n\t\t *  given the loop boundries of this Part.\n\t\t *  @param  {Tone.Event}  event  The event to test\n\t\t *  @private\n\t\t */\n\t    Tone.Part.prototype._testLoopBoundries = function (event) {\n\t        if (event.startOffset < this._loopStart || event.startOffset >= this._loopEnd) {\n\t            event.cancel(0);\n\t        } else if (event.state === Tone.State.Stopped) {\n\t            //reschedule it if it's stopped\n\t            this._restartEvent(event);\n\t        }\n\t    };\n\t    /**\n\t\t *  The probability of the notes being triggered.\n\t\t *  @memberOf Tone.Part#\n\t\t *  @type {NormalRange}\n\t\t *  @name probability\n\t\t */\n\t    Object.defineProperty(Tone.Part.prototype, 'probability', {\n\t        get: function () {\n\t            return this._probability;\n\t        },\n\t        set: function (prob) {\n\t            this._probability = prob;\n\t            this._setAll('probability', prob);\n\t        }\n\t    });\n\t    /**\n\t\t *  If set to true, will apply small random variation\n\t\t *  to the callback time. If the value is given as a time, it will randomize\n\t\t *  by that amount.\n\t\t *  @example\n\t\t * event.humanize = true;\n\t\t *  @type {Boolean|Time}\n\t\t *  @name humanize\n\t\t */\n\t    Object.defineProperty(Tone.Part.prototype, 'humanize', {\n\t        get: function () {\n\t            return this._humanize;\n\t        },\n\t        set: function (variation) {\n\t            this._humanize = variation;\n\t            this._setAll('humanize', variation);\n\t        }\n\t    });\n\t    /**\n\t\t *  If the part should loop or not\n\t\t *  between Tone.Part.loopStart and\n\t\t *  Tone.Part.loopEnd. An integer\n\t\t *  value corresponds to the number of\n\t\t *  loops the Part does after it starts.\n\t\t *  @memberOf Tone.Part#\n\t\t *  @type {Boolean|Positive}\n\t\t *  @name loop\n\t\t *  @example\n\t\t * //loop the part 8 times\n\t\t * part.loop = 8;\n\t\t */\n\t    Object.defineProperty(Tone.Part.prototype, 'loop', {\n\t        get: function () {\n\t            return this._loop;\n\t        },\n\t        set: function (loop) {\n\t            this._loop = loop;\n\t            this._forEach(function (event) {\n\t                event._loopStart = this._loopStart;\n\t                event._loopEnd = this._loopEnd;\n\t                event.loop = loop;\n\t                this._testLoopBoundries(event);\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t *  The loopEnd point determines when it will\n\t\t *  loop if Tone.Part.loop is true.\n\t\t *  @memberOf Tone.Part#\n\t\t *  @type {Time}\n\t\t *  @name loopEnd\n\t\t */\n\t    Object.defineProperty(Tone.Part.prototype, 'loopEnd', {\n\t        get: function () {\n\t            return Tone.Ticks(this._loopEnd).toSeconds();\n\t        },\n\t        set: function (loopEnd) {\n\t            this._loopEnd = this.toTicks(loopEnd);\n\t            if (this._loop) {\n\t                this._forEach(function (event) {\n\t                    event.loopEnd = loopEnd;\n\t                    this._testLoopBoundries(event);\n\t                });\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  The loopStart point determines when it will\n\t\t *  loop if Tone.Part.loop is true.\n\t\t *  @memberOf Tone.Part#\n\t\t *  @type {Time}\n\t\t *  @name loopStart\n\t\t */\n\t    Object.defineProperty(Tone.Part.prototype, 'loopStart', {\n\t        get: function () {\n\t            return Tone.Ticks(this._loopStart).toSeconds();\n\t        },\n\t        set: function (loopStart) {\n\t            this._loopStart = this.toTicks(loopStart);\n\t            if (this._loop) {\n\t                this._forEach(function (event) {\n\t                    event.loopStart = this.loopStart;\n\t                    this._testLoopBoundries(event);\n\t                });\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * \tThe playback rate of the part\n\t\t *  @memberOf Tone.Part#\n\t\t *  @type {Positive}\n\t\t *  @name playbackRate\n\t\t */\n\t    Object.defineProperty(Tone.Part.prototype, 'playbackRate', {\n\t        get: function () {\n\t            return this._playbackRate;\n\t        },\n\t        set: function (rate) {\n\t            this._playbackRate = rate;\n\t            this._setAll('playbackRate', rate);\n\t        }\n\t    });\n\t    /**\n\t\t * \tThe number of scheduled notes in the part.\n\t\t *  @memberOf Tone.Part#\n\t\t *  @type {Positive}\n\t\t *  @name length\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Part.prototype, 'length', {\n\t        get: function () {\n\t            return this._events.length;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.Part}  this\n\t\t */\n\t    Tone.Part.prototype.dispose = function () {\n\t        this.removeAll();\n\t        this._state.dispose();\n\t        this._state = null;\n\t        this.callback = null;\n\t        this._events = null;\n\t        return this;\n\t    };\n\t    return Tone.Part;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.Pattern arpeggiates between the given notes\n\t\t *         in a number of patterns. See Tone.CtrlPattern for\n\t\t *         a full list of patterns.\n\t\t *  @example\n\t\t * var pattern = new Tone.Pattern(function(time, note){\n\t\t *   //the order of the notes passed in depends on the pattern\n\t\t * }, [\"C2\", \"D4\", \"E5\", \"A6\"], \"upDown\");\n\t\t *  @extends {Tone.Loop}\n\t\t *  @param {Function} callback The callback to invoke with the\n\t\t *                             event.\n\t\t *  @param {Array} values The values to arpeggiate over.\n\t\t */\n\t    Tone.Pattern = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'callback',\n\t            'values',\n\t            'pattern'\n\t        ], Tone.Pattern);\n\t        Tone.Loop.call(this, options);\n\t        /**\n\t\t\t *  The pattern manager\n\t\t\t *  @type {Tone.CtrlPattern}\n\t\t\t *  @private\n\t\t\t */\n\t        this._pattern = new Tone.CtrlPattern({\n\t            'values': options.values,\n\t            'type': options.pattern,\n\t            'index': options.index\n\t        });\n\t    };\n\t    Tone.extend(Tone.Pattern, Tone.Loop);\n\t    /**\n\t\t *  The defaults\n\t\t *  @const\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.Pattern.defaults = {\n\t        'pattern': Tone.CtrlPattern.Type.Up,\n\t        'callback': Tone.noOp,\n\t        'values': []\n\t    };\n\t    /**\n\t\t *  Internal function called when the notes should be called\n\t\t *  @param  {Number}  time  The time the event occurs\n\t\t *  @private\n\t\t */\n\t    Tone.Pattern.prototype._tick = function (time) {\n\t        this.callback(time, this._pattern.value);\n\t        this._pattern.next();\n\t    };\n\t    /**\n\t\t *  The current index in the values array.\n\t\t *  @memberOf Tone.Pattern#\n\t\t *  @type {Positive}\n\t\t *  @name index\n\t\t */\n\t    Object.defineProperty(Tone.Pattern.prototype, 'index', {\n\t        get: function () {\n\t            return this._pattern.index;\n\t        },\n\t        set: function (i) {\n\t            this._pattern.index = i;\n\t        }\n\t    });\n\t    /**\n\t\t *  The array of events.\n\t\t *  @memberOf Tone.Pattern#\n\t\t *  @type {Array}\n\t\t *  @name values\n\t\t */\n\t    Object.defineProperty(Tone.Pattern.prototype, 'values', {\n\t        get: function () {\n\t            return this._pattern.values;\n\t        },\n\t        set: function (vals) {\n\t            this._pattern.values = vals;\n\t        }\n\t    });\n\t    /**\n\t\t *  The current value of the pattern.\n\t\t *  @memberOf Tone.Pattern#\n\t\t *  @type {*}\n\t\t *  @name value\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Pattern.prototype, 'value', {\n\t        get: function () {\n\t            return this._pattern.value;\n\t        }\n\t    });\n\t    /**\n\t\t *  The pattern type. See Tone.CtrlPattern for the full list of patterns.\n\t\t *  @memberOf Tone.Pattern#\n\t\t *  @type {String}\n\t\t *  @name pattern\n\t\t */\n\t    Object.defineProperty(Tone.Pattern.prototype, 'pattern', {\n\t        get: function () {\n\t            return this._pattern.type;\n\t        },\n\t        set: function (pattern) {\n\t            this._pattern.type = pattern;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up\n\t\t *  @return  {Tone.Pattern}  this\n\t\t */\n\t    Tone.Pattern.prototype.dispose = function () {\n\t        Tone.Loop.prototype.dispose.call(this);\n\t        this._pattern.dispose();\n\t        this._pattern = null;\n\t    };\n\t    return Tone.Pattern;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class A sequence is an alternate notation of a part. Instead\n\t\t *         of passing in an array of [time, event] pairs, pass\n\t\t *         in an array of events which will be spaced at the\n\t\t *         given subdivision. Sub-arrays will subdivide that beat\n\t\t *         by the number of items are in the array.\n\t\t *         Sequence notation inspiration from [Tidal](http://yaxu.org/tidal/)\n\t\t *  @param  {Function}  callback  The callback to invoke with every note\n\t\t *  @param  {Array}    events  The sequence\n\t\t *  @param  {Time} subdivision  The subdivision between which events are placed.\n\t\t *  @extends {Tone.Part}\n\t\t *  @example\n\t\t * var seq = new Tone.Sequence(function(time, note){\n\t\t * \tconsole.log(note);\n\t\t * //straight quater notes\n\t\t * }, [\"C4\", \"E4\", \"G4\", \"A4\"], \"4n\");\n\t\t *  @example\n\t\t * var seq = new Tone.Sequence(function(time, note){\n\t\t * \tconsole.log(note);\n\t\t * //subdivisions are given as subarrays\n\t\t * }, [\"C4\", [\"E4\", \"D4\", \"E4\"], \"G4\", [\"A4\", \"G4\"]]);\n\t\t */\n\t    Tone.Sequence = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'callback',\n\t            'events',\n\t            'subdivision'\n\t        ], Tone.Sequence);\n\t        //remove the events\n\t        var events = options.events;\n\t        delete options.events;\n\t        Tone.Part.call(this, options);\n\t        /**\n\t\t\t *  The subdivison of each note\n\t\t\t *  @type  {Ticks}\n\t\t\t *  @private\n\t\t\t */\n\t        this._subdivision = this.toTicks(options.subdivision);\n\t        //if no time was passed in, the loop end is the end of the cycle\n\t        if (Tone.isUndef(options.loopEnd) && Tone.isDefined(events)) {\n\t            this._loopEnd = events.length * this._subdivision;\n\t        }\n\t        //defaults to looping\n\t        this._loop = true;\n\t        //add all of the events\n\t        if (Tone.isDefined(events)) {\n\t            for (var i = 0; i < events.length; i++) {\n\t                this.add(i, events[i]);\n\t            }\n\t        }\n\t    };\n\t    Tone.extend(Tone.Sequence, Tone.Part);\n\t    /**\n\t\t *  The default values.\n\t\t *  @type  {Object}\n\t\t */\n\t    Tone.Sequence.defaults = { 'subdivision': '4n' };\n\t    /**\n\t\t *  The subdivision of the sequence. This can only be\n\t\t *  set in the constructor. The subdivision is the\n\t\t *  interval between successive steps.\n\t\t *  @type {Time}\n\t\t *  @memberOf Tone.Sequence#\n\t\t *  @name subdivision\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Sequence.prototype, 'subdivision', {\n\t        get: function () {\n\t            return Tone.Ticks(this._subdivision).toSeconds();\n\t        }\n\t    });\n\t    /**\n\t\t *  Get/Set an index of the sequence. If the index contains a subarray,\n\t\t *  a Tone.Sequence representing that sub-array will be returned.\n\t\t *  @example\n\t\t * var sequence = new Tone.Sequence(playNote, [\"E4\", \"C4\", \"F#4\", [\"A4\", \"Bb3\"]])\n\t\t * sequence.at(0)// => returns \"E4\"\n\t\t * //set a value\n\t\t * sequence.at(0, \"G3\");\n\t\t * //get a nested sequence\n\t\t * sequence.at(3).at(1)// => returns \"Bb3\"\n\t\t * @param {Positive} index The index to get or set\n\t\t * @param {*} value Optionally pass in the value to set at the given index.\n\t\t */\n\t    Tone.Sequence.prototype.at = function (index, value) {\n\t        //if the value is an array,\n\t        if (Tone.isArray(value)) {\n\t            //remove the current event at that index\n\t            this.remove(index);\n\t        }\n\t        //call the parent's method\n\t        return Tone.Part.prototype.at.call(this, this._indexTime(index), value);\n\t    };\n\t    /**\n\t\t *  Add an event at an index, if there's already something\n\t\t *  at that index, overwrite it. If `value` is an array,\n\t\t *  it will be parsed as a subsequence.\n\t\t *  @param {Number} index The index to add the event to\n\t\t *  @param {*} value The value to add at that index\n\t\t *  @returns {Tone.Sequence} this\n\t\t */\n\t    Tone.Sequence.prototype.add = function (index, value) {\n\t        if (value === null) {\n\t            return this;\n\t        }\n\t        if (Tone.isArray(value)) {\n\t            //make a subsequence and add that to the sequence\n\t            var subSubdivision = Math.round(this._subdivision / value.length);\n\t            value = new Tone.Sequence(this._tick.bind(this), value, Tone.Ticks(subSubdivision));\n\t        }\n\t        Tone.Part.prototype.add.call(this, this._indexTime(index), value);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Remove a value from the sequence by index\n\t\t *  @param {Number} index The index of the event to remove\n\t\t *  @returns {Tone.Sequence} this\n\t\t */\n\t    Tone.Sequence.prototype.remove = function (index, value) {\n\t        Tone.Part.prototype.remove.call(this, this._indexTime(index), value);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Get the time of the index given the Sequence's subdivision\n\t\t *  @param  {Number}  index\n\t\t *  @return  {Time}  The time of that index\n\t\t *  @private\n\t\t */\n\t    Tone.Sequence.prototype._indexTime = function (index) {\n\t        if (index instanceof Tone.TransportTime) {\n\t            return index;\n\t        } else {\n\t            return Tone.Ticks(index * this._subdivision + this.startOffset).toSeconds();\n\t        }\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return {Tone.Sequence} this\n\t\t */\n\t    Tone.Sequence.prototype.dispose = function () {\n\t        Tone.Part.prototype.dispose.call(this);\n\t        return this;\n\t    };\n\t    return Tone.Sequence;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.PulseOscillator is a pulse oscillator with control over pulse width,\n\t\t *         also known as the duty cycle. At 50% duty cycle (width = 0.5) the wave is\n\t\t *         a square and only odd-numbered harmonics are present. At all other widths\n\t\t *         even-numbered harmonics are present. Read more\n\t\t *         [here](https://wigglewave.wordpress.com/2014/08/16/pulse-waveforms-and-harmonics/).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Source}\n\t\t *  @param {Frequency} [frequency] The frequency of the oscillator\n\t\t *  @param {NormalRange} [width] The width of the pulse\n\t\t *  @example\n\t\t * var pulse = new Tone.PulseOscillator(\"E5\", 0.4).toMaster().start();\n\t\t */\n\t    Tone.PulseOscillator = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'width'\n\t        ], Tone.Oscillator);\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  The width of the pulse.\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.width = new Tone.Signal(options.width, Tone.Type.NormalRange);\n\t        /**\n\t\t\t *  gate the width amount\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._widthGate = new Tone.Gain();\n\t        /**\n\t\t\t *  the sawtooth oscillator\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sawtooth = new Tone.Oscillator({\n\t            frequency: options.frequency,\n\t            detune: options.detune,\n\t            type: 'sawtooth',\n\t            phase: options.phase\n\t        });\n\t        /**\n\t\t\t *  The frequency control.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = this._sawtooth.frequency;\n\t        /**\n\t\t\t *  The detune in cents.\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = this._sawtooth.detune;\n\t        /**\n\t\t\t *  Threshold the signal to turn it into a square\n\t\t\t *  @type {Tone.WaveShaper}\n\t\t\t *  @private\n\t\t\t */\n\t        this._thresh = new Tone.WaveShaper(function (val) {\n\t            if (val < 0) {\n\t                return -1;\n\t            } else {\n\t                return 1;\n\t            }\n\t        });\n\t        //connections\n\t        this._sawtooth.chain(this._thresh, this.output);\n\t        this.width.chain(this._widthGate, this._thresh);\n\t        this._readOnly([\n\t            'width',\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.PulseOscillator, Tone.Source);\n\t    /**\n\t\t *  The default parameters.\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.PulseOscillator.defaults = {\n\t        'frequency': 440,\n\t        'detune': 0,\n\t        'phase': 0,\n\t        'width': 0.2\n\t    };\n\t    /**\n\t\t *  start the oscillator\n\t\t *  @param  {Time} time\n\t\t *  @private\n\t\t */\n\t    Tone.PulseOscillator.prototype._start = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._sawtooth.start(time);\n\t        this._widthGate.gain.setValueAtTime(1, time);\n\t    };\n\t    /**\n\t\t *  stop the oscillator\n\t\t *  @param  {Time} time\n\t\t *  @private\n\t\t */\n\t    Tone.PulseOscillator.prototype._stop = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._sawtooth.stop(time);\n\t        //the width is still connected to the output.\n\t        //that needs to be stopped also\n\t        this._widthGate.gain.setValueAtTime(0, time);\n\t    };\n\t    /**\n\t\t *  restart the oscillator\n\t\t *  @param  {Time} time (optional) timing parameter\n\t\t *  @private\n\t\t */\n\t    Tone.PulseOscillator.prototype.restart = function (time) {\n\t        this._sawtooth.restart(time);\n\t    };\n\t    /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.PulseOscillator#\n\t\t * @type {Degrees}\n\t\t * @name phase\n\t\t */\n\t    Object.defineProperty(Tone.PulseOscillator.prototype, 'phase', {\n\t        get: function () {\n\t            return this._sawtooth.phase;\n\t        },\n\t        set: function (phase) {\n\t            this._sawtooth.phase = phase;\n\t        }\n\t    });\n\t    /**\n\t\t * The type of the oscillator. Always returns \"pulse\".\n\t\t * @readOnly\n\t\t * @memberOf Tone.PulseOscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.PulseOscillator.prototype, 'type', {\n\t        get: function () {\n\t            return 'pulse';\n\t        }\n\t    });\n\t    /**\n\t\t * The partials of the waveform. Cannot set partials for this waveform type\n\t\t * @memberOf Tone.PulseOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @private\n\t\t */\n\t    Object.defineProperty(Tone.PulseOscillator.prototype, 'partials', {\n\t        get: function () {\n\t            return [];\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up method.\n\t\t *  @return {Tone.PulseOscillator} this\n\t\t */\n\t    Tone.PulseOscillator.prototype.dispose = function () {\n\t        Tone.Source.prototype.dispose.call(this);\n\t        this._sawtooth.dispose();\n\t        this._sawtooth = null;\n\t        this._writable([\n\t            'width',\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t        this.width.dispose();\n\t        this.width = null;\n\t        this._widthGate.dispose();\n\t        this._widthGate = null;\n\t        this._thresh.dispose();\n\t        this._thresh = null;\n\t        this.frequency = null;\n\t        this.detune = null;\n\t        return this;\n\t    };\n\t    return Tone.PulseOscillator;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.PWMOscillator modulates the width of a Tone.PulseOscillator\n\t\t *         at the modulationFrequency. This has the effect of continuously\n\t\t *         changing the timbre of the oscillator by altering the harmonics\n\t\t *         generated.\n\t\t *\n\t\t *  @extends {Tone.Source}\n\t\t *  @constructor\n\t\t *  @param {Frequency} frequency The starting frequency of the oscillator.\n\t\t *  @param {Frequency} modulationFrequency The modulation frequency of the width of the pulse.\n\t\t *  @example\n\t\t *  var pwm = new Tone.PWMOscillator(\"Ab3\", 0.3).toMaster().start();\n\t\t */\n\t    Tone.PWMOscillator = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'modulationFrequency'\n\t        ], Tone.PWMOscillator);\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  the pulse oscillator\n\t\t\t *  @type {Tone.PulseOscillator}\n\t\t\t *  @private\n\t\t\t */\n\t        this._pulse = new Tone.PulseOscillator(options.modulationFrequency);\n\t        //change the pulse oscillator type\n\t        this._pulse._sawtooth.type = 'sine';\n\t        /**\n\t\t\t *  the modulator\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulator = new Tone.Oscillator({\n\t            'frequency': options.frequency,\n\t            'detune': options.detune,\n\t            'phase': options.phase\n\t        });\n\t        /**\n\t\t\t *  Scale the oscillator so it doesn't go silent\n\t\t\t *  at the extreme values.\n\t\t\t *  @type {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._scale = new Tone.Multiply(2);\n\t        /**\n\t\t\t *  The frequency control.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = this._modulator.frequency;\n\t        /**\n\t\t\t *  The detune of the oscillator.\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = this._modulator.detune;\n\t        /**\n\t\t\t *  The modulation rate of the oscillator.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.modulationFrequency = this._pulse.frequency;\n\t        //connections\n\t        this._modulator.chain(this._scale, this._pulse.width);\n\t        this._pulse.connect(this.output);\n\t        this._readOnly([\n\t            'modulationFrequency',\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.PWMOscillator, Tone.Source);\n\t    /**\n\t\t *  default values\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.PWMOscillator.defaults = {\n\t        'frequency': 440,\n\t        'detune': 0,\n\t        'phase': 0,\n\t        'modulationFrequency': 0.4\n\t    };\n\t    /**\n\t\t *  start the oscillator\n\t\t *  @param  {Time} [time=now]\n\t\t *  @private\n\t\t */\n\t    Tone.PWMOscillator.prototype._start = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._modulator.start(time);\n\t        this._pulse.start(time);\n\t    };\n\t    /**\n\t\t *  stop the oscillator\n\t\t *  @param  {Time} time (optional) timing parameter\n\t\t *  @private\n\t\t */\n\t    Tone.PWMOscillator.prototype._stop = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._modulator.stop(time);\n\t        this._pulse.stop(time);\n\t    };\n\t    /**\n\t\t *  restart the oscillator\n\t\t *  @param  {Time} time (optional) timing parameter\n\t\t *  @private\n\t\t */\n\t    Tone.PWMOscillator.prototype.restart = function (time) {\n\t        this._modulator.restart(time);\n\t        this._pulse.restart(time);\n\t    };\n\t    /**\n\t\t * The type of the oscillator. Always returns \"pwm\".\n\t\t * @readOnly\n\t\t * @memberOf Tone.PWMOscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.PWMOscillator.prototype, 'type', {\n\t        get: function () {\n\t            return 'pwm';\n\t        }\n\t    });\n\t    /**\n\t\t * The partials of the waveform. Cannot set partials for this waveform type\n\t\t * @memberOf Tone.PWMOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @private\n\t\t */\n\t    Object.defineProperty(Tone.PWMOscillator.prototype, 'partials', {\n\t        get: function () {\n\t            return [];\n\t        }\n\t    });\n\t    /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.PWMOscillator#\n\t\t * @type {number}\n\t\t * @name phase\n\t\t */\n\t    Object.defineProperty(Tone.PWMOscillator.prototype, 'phase', {\n\t        get: function () {\n\t            return this._modulator.phase;\n\t        },\n\t        set: function (phase) {\n\t            this._modulator.phase = phase;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return {Tone.PWMOscillator} this\n\t\t */\n\t    Tone.PWMOscillator.prototype.dispose = function () {\n\t        Tone.Source.prototype.dispose.call(this);\n\t        this._pulse.dispose();\n\t        this._pulse = null;\n\t        this._scale.dispose();\n\t        this._scale = null;\n\t        this._modulator.dispose();\n\t        this._modulator = null;\n\t        this._writable([\n\t            'modulationFrequency',\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t        this.frequency = null;\n\t        this.detune = null;\n\t        this.modulationFrequency = null;\n\t        return this;\n\t    };\n\t    return Tone.PWMOscillator;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.FMOscillator\n\t\t *\n\t\t *  @extends {Tone.Source}\n\t\t *  @constructor\n\t\t *  @param {Frequency} frequency The starting frequency of the oscillator.\n\t\t *  @param {String} type The type of the carrier oscillator.\n\t\t *  @param {String} modulationType The type of the modulator oscillator.\n\t\t *  @example\n\t\t * //a sine oscillator frequency-modulated by a square wave\n\t\t * var fmOsc = new Tone.FMOscillator(\"Ab3\", \"sine\", \"square\").toMaster().start();\n\t\t */\n\t    Tone.FMOscillator = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'type',\n\t            'modulationType'\n\t        ], Tone.FMOscillator);\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  The carrier oscillator\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t *  @private\n\t\t\t */\n\t        this._carrier = new Tone.Oscillator(options.frequency, options.type);\n\t        /**\n\t\t\t *  The oscillator's frequency\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The detune control signal.\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = this._carrier.detune;\n\t        this.detune.value = options.detune;\n\t        /**\n\t\t\t *  The modulation index which is in essence the depth or amount of the modulation. In other terms it is the\n\t\t\t *  ratio of the frequency of the modulating signal (mf) to the amplitude of the\n\t\t\t *  modulating signal (ma) -- as in ma/mf.\n\t\t\t *\t@type {Positive}\n\t\t\t *\t@signal\n\t\t\t */\n\t        this.modulationIndex = new Tone.Multiply(options.modulationIndex);\n\t        this.modulationIndex.units = Tone.Type.Positive;\n\t        /**\n\t\t\t *  The modulating oscillator\n\t\t\t *  @type  {Tone.Oscillator}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulator = new Tone.Oscillator(options.frequency, options.modulationType);\n\t        /**\n\t\t\t *  Harmonicity is the frequency ratio between the carrier and the modulator oscillators.\n\t\t\t *  A harmonicity of 1 gives both oscillators the same frequency.\n\t\t\t *  Harmonicity = 2 means a change of an octave.\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t *  @example\n\t\t\t * //pitch the modulator an octave below carrier\n\t\t\t * synth.harmonicity.value = 0.5;\n\t\t\t */\n\t        this.harmonicity = new Tone.Multiply(options.harmonicity);\n\t        this.harmonicity.units = Tone.Type.Positive;\n\t        /**\n\t\t\t *  the node where the modulation happens\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulationNode = new Tone.Gain(0);\n\t        //connections\n\t        this.frequency.connect(this._carrier.frequency);\n\t        this.frequency.chain(this.harmonicity, this._modulator.frequency);\n\t        this.frequency.chain(this.modulationIndex, this._modulationNode);\n\t        this._modulator.connect(this._modulationNode.gain);\n\t        this._modulationNode.connect(this._carrier.frequency);\n\t        this._carrier.connect(this.output);\n\t        this.detune.connect(this._modulator.detune);\n\t        this.phase = options.phase;\n\t        this._readOnly([\n\t            'modulationIndex',\n\t            'frequency',\n\t            'detune',\n\t            'harmonicity'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.FMOscillator, Tone.Source);\n\t    /**\n\t\t *  default values\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.FMOscillator.defaults = {\n\t        'frequency': 440,\n\t        'detune': 0,\n\t        'phase': 0,\n\t        'modulationIndex': 2,\n\t        'modulationType': 'square',\n\t        'harmonicity': 1\n\t    };\n\t    /**\n\t\t *  start the oscillator\n\t\t *  @param  {Time} [time=now]\n\t\t *  @private\n\t\t */\n\t    Tone.FMOscillator.prototype._start = function (time) {\n\t        this._modulator.start(time);\n\t        this._carrier.start(time);\n\t    };\n\t    /**\n\t\t *  stop the oscillator\n\t\t *  @param  {Time} time (optional) timing parameter\n\t\t *  @private\n\t\t */\n\t    Tone.FMOscillator.prototype._stop = function (time) {\n\t        this._modulator.stop(time);\n\t        this._carrier.stop(time);\n\t    };\n\t    /**\n\t\t *  stop the oscillator\n\t\t *  @param  {Time} time (optional) timing parameter\n\t\t *  @private\n\t\t */\n\t    Tone.FMOscillator.prototype.restart = function (time) {\n\t        this._modulator.restart(time);\n\t        this._carrier.restart(time);\n\t    };\n\t    /**\n\t\t * The type of the carrier oscillator\n\t\t * @memberOf Tone.FMOscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.FMOscillator.prototype, 'type', {\n\t        get: function () {\n\t            return this._carrier.type;\n\t        },\n\t        set: function (type) {\n\t            this._carrier.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t * The type of the modulator oscillator\n\t\t * @memberOf Tone.FMOscillator#\n\t\t * @type {String}\n\t\t * @name modulationType\n\t\t */\n\t    Object.defineProperty(Tone.FMOscillator.prototype, 'modulationType', {\n\t        get: function () {\n\t            return this._modulator.type;\n\t        },\n\t        set: function (type) {\n\t            this._modulator.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.FMOscillator#\n\t\t * @type {number}\n\t\t * @name phase\n\t\t */\n\t    Object.defineProperty(Tone.FMOscillator.prototype, 'phase', {\n\t        get: function () {\n\t            return this._carrier.phase;\n\t        },\n\t        set: function (phase) {\n\t            this._carrier.phase = phase;\n\t            this._modulator.phase = phase;\n\t        }\n\t    });\n\t    /**\n\t\t * The partials of the carrier waveform. A partial represents\n\t\t * the amplitude at a harmonic. The first harmonic is the\n\t\t * fundamental frequency, the second is the octave and so on\n\t\t * following the harmonic series.\n\t\t * Setting this value will automatically set the type to \"custom\".\n\t\t * The value is an empty array when the type is not \"custom\".\n\t\t * @memberOf Tone.FMOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @example\n\t\t * osc.partials = [1, 0.2, 0.01];\n\t\t */\n\t    Object.defineProperty(Tone.FMOscillator.prototype, 'partials', {\n\t        get: function () {\n\t            return this._carrier.partials;\n\t        },\n\t        set: function (partials) {\n\t            this._carrier.partials = partials;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return {Tone.FMOscillator} this\n\t\t */\n\t    Tone.FMOscillator.prototype.dispose = function () {\n\t        Tone.Source.prototype.dispose.call(this);\n\t        this._writable([\n\t            'modulationIndex',\n\t            'frequency',\n\t            'detune',\n\t            'harmonicity'\n\t        ]);\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        this.detune = null;\n\t        this.harmonicity.dispose();\n\t        this.harmonicity = null;\n\t        this._carrier.dispose();\n\t        this._carrier = null;\n\t        this._modulator.dispose();\n\t        this._modulator = null;\n\t        this._modulationNode.dispose();\n\t        this._modulationNode = null;\n\t        this.modulationIndex.dispose();\n\t        this.modulationIndex = null;\n\t        return this;\n\t    };\n\t    return Tone.FMOscillator;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.AMOscillator\n\t\t *\n\t\t *  @extends {Tone.Oscillator}\n\t\t *  @constructor\n\t\t *  @param {Frequency} frequency The starting frequency of the oscillator.\n\t\t *  @param {String} type The type of the carrier oscillator.\n\t\t *  @param {String} modulationType The type of the modulator oscillator.\n\t\t *  @example\n\t\t * //a sine oscillator frequency-modulated by a square wave\n\t\t * var fmOsc = new Tone.AMOscillator(\"Ab3\", \"sine\", \"square\").toMaster().start();\n\t\t */\n\t    Tone.AMOscillator = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'type',\n\t            'modulationType'\n\t        ], Tone.AMOscillator);\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  The carrier oscillator\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t *  @private\n\t\t\t */\n\t        this._carrier = new Tone.Oscillator(options.frequency, options.type);\n\t        /**\n\t\t\t *  The oscillator's frequency\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = this._carrier.frequency;\n\t        /**\n\t\t\t *  The detune control signal.\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = this._carrier.detune;\n\t        this.detune.value = options.detune;\n\t        /**\n\t\t\t *  The modulating oscillator\n\t\t\t *  @type  {Tone.Oscillator}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulator = new Tone.Oscillator(options.frequency, options.modulationType);\n\t        /**\n\t\t\t *  convert the -1,1 output to 0,1\n\t\t\t *  @type {Tone.AudioToGain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulationScale = new Tone.AudioToGain();\n\t        /**\n\t\t\t *  Harmonicity is the frequency ratio between the carrier and the modulator oscillators.\n\t\t\t *  A harmonicity of 1 gives both oscillators the same frequency.\n\t\t\t *  Harmonicity = 2 means a change of an octave.\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t *  @example\n\t\t\t * //pitch the modulator an octave below carrier\n\t\t\t * synth.harmonicity.value = 0.5;\n\t\t\t */\n\t        this.harmonicity = new Tone.Multiply(options.harmonicity);\n\t        this.harmonicity.units = Tone.Type.Positive;\n\t        /**\n\t\t\t *  the node where the modulation happens\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulationNode = new Tone.Gain(0);\n\t        //connections\n\t        this.frequency.chain(this.harmonicity, this._modulator.frequency);\n\t        this.detune.connect(this._modulator.detune);\n\t        this._modulator.chain(this._modulationScale, this._modulationNode.gain);\n\t        this._carrier.chain(this._modulationNode, this.output);\n\t        this.phase = options.phase;\n\t        this._readOnly([\n\t            'frequency',\n\t            'detune',\n\t            'harmonicity'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.AMOscillator, Tone.Oscillator);\n\t    /**\n\t\t *  default values\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.AMOscillator.defaults = {\n\t        'frequency': 440,\n\t        'detune': 0,\n\t        'phase': 0,\n\t        'modulationType': 'square',\n\t        'harmonicity': 1\n\t    };\n\t    /**\n\t\t *  start the oscillator\n\t\t *  @param  {Time} [time=now]\n\t\t *  @private\n\t\t */\n\t    Tone.AMOscillator.prototype._start = function (time) {\n\t        this._modulator.start(time);\n\t        this._carrier.start(time);\n\t    };\n\t    /**\n\t\t *  stop the oscillator\n\t\t *  @param  {Time} time (optional) timing parameter\n\t\t *  @private\n\t\t */\n\t    Tone.AMOscillator.prototype._stop = function (time) {\n\t        this._modulator.stop(time);\n\t        this._carrier.stop(time);\n\t    };\n\t    /**\n\t\t *  restart the oscillator\n\t\t *  @param  {Time} time (optional) timing parameter\n\t\t *  @private\n\t\t */\n\t    Tone.AMOscillator.prototype.restart = function (time) {\n\t        this._modulator.restart(time);\n\t        this._carrier.restart(time);\n\t    };\n\t    /**\n\t\t * The type of the carrier oscillator\n\t\t * @memberOf Tone.AMOscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.AMOscillator.prototype, 'type', {\n\t        get: function () {\n\t            return this._carrier.type;\n\t        },\n\t        set: function (type) {\n\t            this._carrier.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t * The type of the modulator oscillator\n\t\t * @memberOf Tone.AMOscillator#\n\t\t * @type {string}\n\t\t * @name modulationType\n\t\t */\n\t    Object.defineProperty(Tone.AMOscillator.prototype, 'modulationType', {\n\t        get: function () {\n\t            return this._modulator.type;\n\t        },\n\t        set: function (type) {\n\t            this._modulator.type = type;\n\t        }\n\t    });\n\t    /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.AMOscillator#\n\t\t * @type {number}\n\t\t * @name phase\n\t\t */\n\t    Object.defineProperty(Tone.AMOscillator.prototype, 'phase', {\n\t        get: function () {\n\t            return this._carrier.phase;\n\t        },\n\t        set: function (phase) {\n\t            this._carrier.phase = phase;\n\t            this._modulator.phase = phase;\n\t        }\n\t    });\n\t    /**\n\t\t * The partials of the carrier waveform. A partial represents\n\t\t * the amplitude at a harmonic. The first harmonic is the\n\t\t * fundamental frequency, the second is the octave and so on\n\t\t * following the harmonic series.\n\t\t * Setting this value will automatically set the type to \"custom\".\n\t\t * The value is an empty array when the type is not \"custom\".\n\t\t * @memberOf Tone.AMOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @example\n\t\t * osc.partials = [1, 0.2, 0.01];\n\t\t */\n\t    Object.defineProperty(Tone.AMOscillator.prototype, 'partials', {\n\t        get: function () {\n\t            return this._carrier.partials;\n\t        },\n\t        set: function (partials) {\n\t            this._carrier.partials = partials;\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return {Tone.AMOscillator} this\n\t\t */\n\t    Tone.AMOscillator.prototype.dispose = function () {\n\t        Tone.Source.prototype.dispose.call(this);\n\t        this._writable([\n\t            'frequency',\n\t            'detune',\n\t            'harmonicity'\n\t        ]);\n\t        this.frequency = null;\n\t        this.detune = null;\n\t        this.harmonicity.dispose();\n\t        this.harmonicity = null;\n\t        this._carrier.dispose();\n\t        this._carrier = null;\n\t        this._modulator.dispose();\n\t        this._modulator = null;\n\t        this._modulationNode.dispose();\n\t        this._modulationNode = null;\n\t        this._modulationScale.dispose();\n\t        this._modulationScale = null;\n\t        return this;\n\t    };\n\t    return Tone.AMOscillator;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.FatOscillator\n\t\t *\n\t\t *  @extends {Tone.Source}\n\t\t *  @constructor\n\t\t *  @param {Frequency} frequency The starting frequency of the oscillator.\n\t\t *  @param {String} type The type of the carrier oscillator.\n\t\t *  @param {String} modulationType The type of the modulator oscillator.\n\t\t *  @example\n\t\t * //a sine oscillator frequency-modulated by a square wave\n\t\t * var fmOsc = new Tone.FatOscillator(\"Ab3\", \"sine\", \"square\").toMaster().start();\n\t\t */\n\t    Tone.FatOscillator = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'type',\n\t            'spread'\n\t        ], Tone.FatOscillator);\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  The oscillator's frequency\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The detune control signal.\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t        /**\n\t\t\t *  The array of oscillators\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._oscillators = [];\n\t        /**\n\t\t\t *  The total spread of the oscillators\n\t\t\t *  @type  {Cents}\n\t\t\t *  @private\n\t\t\t */\n\t        this._spread = options.spread;\n\t        /**\n\t\t\t *  The type of the oscillator\n\t\t\t *  @type {String}\n\t\t\t *  @private\n\t\t\t */\n\t        this._type = options.type;\n\t        /**\n\t\t\t *  The phase of the oscillators\n\t\t\t *  @type {Degrees}\n\t\t\t *  @private\n\t\t\t */\n\t        this._phase = options.phase;\n\t        /**\n\t\t\t *  The partials array\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._partials = Tone.defaultArg(options.partials, []);\n\t        //set the count initially\n\t        this.count = options.count;\n\t        this._readOnly([\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.FatOscillator, Tone.Source);\n\t    /**\n\t\t *  default values\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.FatOscillator.defaults = {\n\t        'frequency': 440,\n\t        'detune': 0,\n\t        'phase': 0,\n\t        'spread': 20,\n\t        'count': 3,\n\t        'type': 'sawtooth'\n\t    };\n\t    /**\n\t\t *  start the oscillator\n\t\t *  @param  {Time} [time=now]\n\t\t *  @private\n\t\t */\n\t    Tone.FatOscillator.prototype._start = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._forEach(function (osc) {\n\t            osc.start(time);\n\t        });\n\t    };\n\t    /**\n\t\t *  stop the oscillator\n\t\t *  @param  {Time} [time=now]\n\t\t *  @private\n\t\t */\n\t    Tone.FatOscillator.prototype._stop = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._forEach(function (osc) {\n\t            osc.stop(time);\n\t        });\n\t    };\n\t    /**\n\t\t *  restart the oscillator\n\t\t *  @param  {Time} time (optional) timing parameter\n\t\t *  @private\n\t\t */\n\t    Tone.FatOscillator.prototype.restart = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._forEach(function (osc) {\n\t            osc.restart(time);\n\t        });\n\t    };\n\t    /**\n\t\t *  Iterate over all of the oscillators\n\t\t *  @param  {Function}  iterator  The iterator function\n\t\t *  @private\n\t\t */\n\t    Tone.FatOscillator.prototype._forEach = function (iterator) {\n\t        for (var i = 0; i < this._oscillators.length; i++) {\n\t            iterator.call(this, this._oscillators[i], i);\n\t        }\n\t    };\n\t    /**\n\t\t * The type of the carrier oscillator\n\t\t * @memberOf Tone.FatOscillator#\n\t\t * @type {string}\n\t\t * @name type\n\t\t */\n\t    Object.defineProperty(Tone.FatOscillator.prototype, 'type', {\n\t        get: function () {\n\t            return this._type;\n\t        },\n\t        set: function (type) {\n\t            this._type = type;\n\t            this._forEach(function (osc) {\n\t                osc.type = type;\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t * The detune spread between the oscillators. If \"count\" is\n\t\t * set to 3 oscillators and the \"spread\" is set to 40,\n\t\t * the three oscillators would be detuned like this: [-20, 0, 20]\n\t\t * for a total detune spread of 40 cents.\n\t\t * @memberOf Tone.FatOscillator#\n\t\t * @type {Cents}\n\t\t * @name spread\n\t\t */\n\t    Object.defineProperty(Tone.FatOscillator.prototype, 'spread', {\n\t        get: function () {\n\t            return this._spread;\n\t        },\n\t        set: function (spread) {\n\t            this._spread = spread;\n\t            if (this._oscillators.length > 1) {\n\t                var start = -spread / 2;\n\t                var step = spread / (this._oscillators.length - 1);\n\t                this._forEach(function (osc, i) {\n\t                    osc.detune.value = start + step * i;\n\t                });\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The number of detuned oscillators\n\t\t * @memberOf Tone.FatOscillator#\n\t\t * @type {Number}\n\t\t * @name count\n\t\t */\n\t    Object.defineProperty(Tone.FatOscillator.prototype, 'count', {\n\t        get: function () {\n\t            return this._oscillators.length;\n\t        },\n\t        set: function (count) {\n\t            count = Math.max(count, 1);\n\t            if (this._oscillators.length !== count) {\n\t                // var partials = this.partials;\n\t                // var type = this.type;\n\t                //dispose the previous oscillators\n\t                this._forEach(function (osc) {\n\t                    osc.dispose();\n\t                });\n\t                this._oscillators = [];\n\t                for (var i = 0; i < count; i++) {\n\t                    var osc = new Tone.Oscillator();\n\t                    if (this.type === Tone.Oscillator.Type.Custom) {\n\t                        osc.partials = this._partials;\n\t                    } else {\n\t                        osc.type = this._type;\n\t                    }\n\t                    osc.phase = this._phase;\n\t                    osc.volume.value = -6 - count * 1.1;\n\t                    this.frequency.connect(osc.frequency);\n\t                    this.detune.connect(osc.detune);\n\t                    osc.connect(this.output);\n\t                    this._oscillators[i] = osc;\n\t                }\n\t                //set the spread\n\t                this.spread = this._spread;\n\t                if (this.state === Tone.State.Started) {\n\t                    this._forEach(function (osc) {\n\t                        osc.start();\n\t                    });\n\t                }\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.FatOscillator#\n\t\t * @type {Number}\n\t\t * @name phase\n\t\t */\n\t    Object.defineProperty(Tone.FatOscillator.prototype, 'phase', {\n\t        get: function () {\n\t            return this._phase;\n\t        },\n\t        set: function (phase) {\n\t            this._phase = phase;\n\t            this._forEach(function (osc) {\n\t                osc.phase = phase;\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t * The partials of the carrier waveform. A partial represents\n\t\t * the amplitude at a harmonic. The first harmonic is the\n\t\t * fundamental frequency, the second is the octave and so on\n\t\t * following the harmonic series.\n\t\t * Setting this value will automatically set the type to \"custom\".\n\t\t * The value is an empty array when the type is not \"custom\".\n\t\t * @memberOf Tone.FatOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @example\n\t\t * osc.partials = [1, 0.2, 0.01];\n\t\t */\n\t    Object.defineProperty(Tone.FatOscillator.prototype, 'partials', {\n\t        get: function () {\n\t            return this._partials;\n\t        },\n\t        set: function (partials) {\n\t            this._partials = partials;\n\t            this._type = Tone.Oscillator.Type.Custom;\n\t            this._forEach(function (osc) {\n\t                osc.partials = partials;\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return {Tone.FatOscillator} this\n\t\t */\n\t    Tone.FatOscillator.prototype.dispose = function () {\n\t        Tone.Source.prototype.dispose.call(this);\n\t        this._writable([\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        this.detune.dispose();\n\t        this.detune = null;\n\t        this._forEach(function (osc) {\n\t            osc.dispose();\n\t        });\n\t        this._oscillators = null;\n\t        this._partials = null;\n\t        return this;\n\t    };\n\t    return Tone.FatOscillator;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Tone.OmniOscillator aggregates Tone.Oscillator, Tone.PulseOscillator,\n\t\t *         Tone.PWMOscillator, Tone.FMOscillator, Tone.AMOscillator, and Tone.FatOscillator\n\t\t *         into one class. The oscillator class can be changed by setting the `type`.\n\t\t *         `omniOsc.type = \"pwm\"` will set it to the Tone.PWMOscillator. Prefixing\n\t\t *         any of the basic types (\"sine\", \"square4\", etc.) with \"fm\", \"am\", or \"fat\"\n\t\t *         will use the FMOscillator, AMOscillator or FatOscillator respectively.\n\t\t *         For example: `omniOsc.type = \"fatsawtooth\"` will create set the oscillator\n\t\t *         to a FatOscillator of type \"sawtooth\".\n\t\t *\n\t\t *  @extends {Tone.Source}\n\t\t *  @constructor\n\t\t *  @param {Frequency} frequency The initial frequency of the oscillator.\n\t\t *  @param {String} type The type of the oscillator.\n\t\t *  @example\n\t\t *  var omniOsc = new Tone.OmniOscillator(\"C#4\", \"pwm\");\n\t\t */\n\t    Tone.OmniOscillator = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'frequency',\n\t            'type'\n\t        ], Tone.OmniOscillator);\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  The frequency control.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The detune control\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t        /**\n\t\t\t *  the type of the oscillator source\n\t\t\t *  @type {String}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sourceType = undefined;\n\t        /**\n\t\t\t *  the oscillator\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t *  @private\n\t\t\t */\n\t        this._oscillator = null;\n\t        //set the oscillator\n\t        this.type = options.type;\n\t        this._readOnly([\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t        //set the options\n\t        this.set(options);\n\t    };\n\t    Tone.extend(Tone.OmniOscillator, Tone.Source);\n\t    /**\n\t\t *  default values\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t *  @const\n\t\t */\n\t    Tone.OmniOscillator.defaults = {\n\t        'frequency': 440,\n\t        'detune': 0,\n\t        'type': 'sine',\n\t        'phase': 0\n\t    };\n\t    /**\n\t\t *  @enum {String}\n\t\t *  @private\n\t\t */\n\t    var OmniOscType = {\n\t        Pulse: 'PulseOscillator',\n\t        PWM: 'PWMOscillator',\n\t        Osc: 'Oscillator',\n\t        FM: 'FMOscillator',\n\t        AM: 'AMOscillator',\n\t        Fat: 'FatOscillator'\n\t    };\n\t    /**\n\t\t *  start the oscillator\n\t\t *  @param {Time} [time=now] the time to start the oscillator\n\t\t *  @private\n\t\t */\n\t    Tone.OmniOscillator.prototype._start = function (time) {\n\t        this._oscillator.start(time);\n\t    };\n\t    /**\n\t\t *  start the oscillator\n\t\t *  @param {Time} [time=now] the time to start the oscillator\n\t\t *  @private\n\t\t */\n\t    Tone.OmniOscillator.prototype._stop = function (time) {\n\t        this._oscillator.stop(time);\n\t    };\n\t    Tone.OmniOscillator.prototype.restart = function (time) {\n\t        this._oscillator.restart(time);\n\t    };\n\t    /**\n\t\t * The type of the oscillator. Can be any of the basic types: sine, square, triangle, sawtooth. Or\n\t\t * prefix the basic types with \"fm\", \"am\", or \"fat\" to use the FMOscillator, AMOscillator or FatOscillator\n\t\t * types. The oscillator could also be set to \"pwm\" or \"pulse\". All of the parameters of the\n\t\t * oscillator's class are accessible when the oscillator is set to that type, but throws an error\n\t\t * when it's not.\n\t\t *\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {String}\n\t\t * @name type\n\t\t * @example\n\t\t * omniOsc.type = \"pwm\";\n\t\t * //modulationFrequency is parameter which is available\n\t\t * //only when the type is \"pwm\".\n\t\t * omniOsc.modulationFrequency.value = 0.5;\n\t\t * @example\n\t\t * //an square wave frequency modulated by a sawtooth\n\t\t * omniOsc.type = \"fmsquare\";\n\t\t * omniOsc.modulationType = \"sawtooth\";\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'type', {\n\t        get: function () {\n\t            var prefix = '';\n\t            if (this._sourceType === OmniOscType.FM) {\n\t                prefix = 'fm';\n\t            } else if (this._sourceType === OmniOscType.AM) {\n\t                prefix = 'am';\n\t            } else if (this._sourceType === OmniOscType.Fat) {\n\t                prefix = 'fat';\n\t            }\n\t            return prefix + this._oscillator.type;\n\t        },\n\t        set: function (type) {\n\t            if (type.substr(0, 2) === 'fm') {\n\t                this._createNewOscillator(OmniOscType.FM);\n\t                this._oscillator.type = type.substr(2);\n\t            } else if (type.substr(0, 2) === 'am') {\n\t                this._createNewOscillator(OmniOscType.AM);\n\t                this._oscillator.type = type.substr(2);\n\t            } else if (type.substr(0, 3) === 'fat') {\n\t                this._createNewOscillator(OmniOscType.Fat);\n\t                this._oscillator.type = type.substr(3);\n\t            } else if (type === 'pwm') {\n\t                this._createNewOscillator(OmniOscType.PWM);\n\t            } else if (type === 'pulse') {\n\t                this._createNewOscillator(OmniOscType.Pulse);\n\t            } else {\n\t                this._createNewOscillator(OmniOscType.Osc);\n\t                this._oscillator.type = type;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The partials of the waveform. A partial represents\n\t\t * the amplitude at a harmonic. The first harmonic is the\n\t\t * fundamental frequency, the second is the octave and so on\n\t\t * following the harmonic series.\n\t\t * Setting this value will automatically set the type to \"custom\".\n\t\t * The value is an empty array when the type is not \"custom\".\n\t\t * This is not available on \"pwm\" and \"pulse\" oscillator types.\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {Array}\n\t\t * @name partials\n\t\t * @example\n\t\t * osc.partials = [1, 0.2, 0.01];\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'partials', {\n\t        get: function () {\n\t            return this._oscillator.partials;\n\t        },\n\t        set: function (partials) {\n\t            this._oscillator.partials = partials;\n\t        }\n\t    });\n\t    /**\n\t\t *  Set a member/attribute of the oscillator.\n\t\t *  @param {Object|String} params\n\t\t *  @param {number=} value\n\t\t *  @param {Time=} rampTime\n\t\t *  @returns {Tone.OmniOscillator} this\n\t\t */\n\t    Tone.OmniOscillator.prototype.set = function (params, value) {\n\t        //make sure the type is set first\n\t        if (params === 'type') {\n\t            this.type = value;\n\t        } else if (Tone.isObject(params) && params.hasOwnProperty('type')) {\n\t            this.type = params.type;\n\t        }\n\t        //then set the rest\n\t        Tone.prototype.set.apply(this, arguments);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  connect the oscillator to the frequency and detune signals\n\t\t *  @private\n\t\t */\n\t    Tone.OmniOscillator.prototype._createNewOscillator = function (oscType) {\n\t        if (oscType !== this._sourceType) {\n\t            this._sourceType = oscType;\n\t            var OscillatorConstructor = Tone[oscType];\n\t            //short delay to avoid clicks on the change\n\t            var now = this.now();\n\t            if (this._oscillator !== null) {\n\t                var oldOsc = this._oscillator;\n\t                oldOsc.stop(now);\n\t                //dispose the old one\n\t                this.context.setTimeout(function () {\n\t                    oldOsc.dispose();\n\t                    oldOsc = null;\n\t                }, this.blockTime);\n\t            }\n\t            this._oscillator = new OscillatorConstructor();\n\t            this.frequency.connect(this._oscillator.frequency);\n\t            this.detune.connect(this._oscillator.detune);\n\t            this._oscillator.connect(this.output);\n\t            if (this.state === Tone.State.Started) {\n\t                this._oscillator.start(now);\n\t            }\n\t        }\n\t    };\n\t    /**\n\t\t * The phase of the oscillator in degrees.\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {Degrees}\n\t\t * @name phase\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'phase', {\n\t        get: function () {\n\t            return this._oscillator.phase;\n\t        },\n\t        set: function (phase) {\n\t            this._oscillator.phase = phase;\n\t        }\n\t    });\n\t    /**\n\t\t * The width of the oscillator (only if the oscillator is set to \"pulse\")\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {NormalRange}\n\t\t * @signal\n\t\t * @name width\n\t\t * @example\n\t\t * var omniOsc = new Tone.OmniOscillator(440, \"pulse\");\n\t\t * //can access the width attribute only if type === \"pulse\"\n\t\t * omniOsc.width.value = 0.2;\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'width', {\n\t        get: function () {\n\t            if (this._sourceType === OmniOscType.Pulse) {\n\t                return this._oscillator.width;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The number of detuned oscillators\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {Number}\n\t\t * @name count\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'count', {\n\t        get: function () {\n\t            if (this._sourceType === OmniOscType.Fat) {\n\t                return this._oscillator.count;\n\t            }\n\t        },\n\t        set: function (count) {\n\t            if (this._sourceType === OmniOscType.Fat) {\n\t                this._oscillator.count = count;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The detune spread between the oscillators. If \"count\" is\n\t\t * set to 3 oscillators and the \"spread\" is set to 40,\n\t\t * the three oscillators would be detuned like this: [-20, 0, 20]\n\t\t * for a total detune spread of 40 cents. See Tone.FatOscillator\n\t\t * for more info.\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {Cents}\n\t\t * @name spread\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'spread', {\n\t        get: function () {\n\t            if (this._sourceType === OmniOscType.Fat) {\n\t                return this._oscillator.spread;\n\t            }\n\t        },\n\t        set: function (spread) {\n\t            if (this._sourceType === OmniOscType.Fat) {\n\t                this._oscillator.spread = spread;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The type of the modulator oscillator. Only if the oscillator\n\t\t * is set to \"am\" or \"fm\" types. see. Tone.AMOscillator or Tone.FMOscillator\n\t\t * for more info.\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {String}\n\t\t * @name modulationType\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'modulationType', {\n\t        get: function () {\n\t            if (this._sourceType === OmniOscType.FM || this._sourceType === OmniOscType.AM) {\n\t                return this._oscillator.modulationType;\n\t            }\n\t        },\n\t        set: function (mType) {\n\t            if (this._sourceType === OmniOscType.FM || this._sourceType === OmniOscType.AM) {\n\t                this._oscillator.modulationType = mType;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The modulation index which is in essence the depth or amount of the modulation. In other terms it is the\n\t\t * ratio of the frequency of the modulating signal (mf) to the amplitude of the\n\t\t * modulating signal (ma) -- as in ma/mf.\n\t\t * See Tone.FMOscillator for more info.\n\t\t * @type {Positive}\n\t\t * @signal\n\t\t * @name modulationIndex\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'modulationIndex', {\n\t        get: function () {\n\t            if (this._sourceType === OmniOscType.FM) {\n\t                return this._oscillator.modulationIndex;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Harmonicity is the frequency ratio between the carrier and the modulator oscillators.\n\t\t *  A harmonicity of 1 gives both oscillators the same frequency.\n\t\t *  Harmonicity = 2 means a change of an octave. See Tone.AMOscillator or Tone.FMOscillator\n\t\t *  for more info.\n\t\t *  @memberOf Tone.OmniOscillator#\n\t\t *  @signal\n\t\t *  @type {Positive}\n\t\t *  @name harmonicity\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'harmonicity', {\n\t        get: function () {\n\t            if (this._sourceType === OmniOscType.FM || this._sourceType === OmniOscType.AM) {\n\t                return this._oscillator.harmonicity;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The modulationFrequency Signal of the oscillator\n\t\t * (only if the oscillator type is set to pwm). See\n\t\t * Tone.PWMOscillator for more info.\n\t\t * @memberOf Tone.OmniOscillator#\n\t\t * @type {Frequency}\n\t\t * @signal\n\t\t * @name modulationFrequency\n\t\t * @example\n\t\t * var omniOsc = new Tone.OmniOscillator(440, \"pwm\");\n\t\t * //can access the modulationFrequency attribute only if type === \"pwm\"\n\t\t * omniOsc.modulationFrequency.value = 0.2;\n\t\t */\n\t    Object.defineProperty(Tone.OmniOscillator.prototype, 'modulationFrequency', {\n\t        get: function () {\n\t            if (this._sourceType === OmniOscType.PWM) {\n\t                return this._oscillator.modulationFrequency;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up.\n\t\t *  @return {Tone.OmniOscillator} this\n\t\t */\n\t    Tone.OmniOscillator.prototype.dispose = function () {\n\t        Tone.Source.prototype.dispose.call(this);\n\t        this._writable([\n\t            'frequency',\n\t            'detune'\n\t        ]);\n\t        this.detune.dispose();\n\t        this.detune = null;\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        this._oscillator.dispose();\n\t        this._oscillator = null;\n\t        this._sourceType = null;\n\t        return this;\n\t    };\n\t    return Tone.OmniOscillator;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Base-class for all instruments\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t */\n\t    Tone.Instrument = function (options) {\n\t        //get the defaults\n\t        options = Tone.defaultArg(options, Tone.Instrument.defaults);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The output and volume triming node\n\t\t\t *  @type  {Tone.Volume}\n\t\t\t *  @private\n\t\t\t */\n\t        this._volume = this.output = new Tone.Volume(options.volume);\n\t        /**\n\t\t\t * The volume of the output in decibels.\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * source.volume.value = -6;\n\t\t\t */\n\t        this.volume = this._volume.volume;\n\t        this._readOnly('volume');\n\t        /**\n\t\t\t * Keep track of all events scheduled to the transport\n\t\t\t * when the instrument is 'synced'\n\t\t\t * @type {Array<Number>}\n\t\t\t * @private\n\t\t\t */\n\t        this._scheduledEvents = [];\n\t    };\n\t    Tone.extend(Tone.Instrument, Tone.AudioNode);\n\t    /**\n\t\t *  the default attributes\n\t\t *  @type {object}\n\t\t */\n\t    Tone.Instrument.defaults = {\n\t        /** the volume of the output in decibels */\n\t        'volume': 0\n\t    };\n\t    /**\n\t\t *  @abstract\n\t\t *  @param {string|number} note the note to trigger\n\t\t *  @param {Time} [time=now] the time to trigger the ntoe\n\t\t *  @param {number} [velocity=1] the velocity to trigger the note\n\t\t */\n\t    Tone.Instrument.prototype.triggerAttack = Tone.noOp;\n\t    /**\n\t\t *  @abstract\n\t\t *  @param {Time} [time=now] when to trigger the release\n\t\t */\n\t    Tone.Instrument.prototype.triggerRelease = Tone.noOp;\n\t    /**\n\t\t * Sync the instrument to the Transport. All subsequent calls of\n\t\t * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n\t\t * will be scheduled along the transport.\n\t\t * @example\n\t\t * instrument.sync()\n\t\t * //schedule 3 notes when the transport first starts\n\t\t * instrument.triggerAttackRelease('C4', '8n', 0)\n\t\t * instrument.triggerAttackRelease('E4', '8n', '8n')\n\t\t * instrument.triggerAttackRelease('G4', '8n', '4n')\n\t\t * //start the transport to hear the notes\n\t\t * Transport.start()\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t    Tone.Instrument.prototype.sync = function () {\n\t        this._syncMethod('triggerAttack', 1);\n\t        this._syncMethod('triggerRelease', 0);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Wrap the given method so that it can be synchronized\n\t\t * @param {String} method Which method to wrap and sync\n\t\t * @param  {Number} timePosition What position the time argument appears in\n\t\t * @private\n\t\t */\n\t    Tone.Instrument.prototype._syncMethod = function (method, timePosition) {\n\t        var originalMethod = this['_original_' + method] = this[method];\n\t        this[method] = function () {\n\t            var args = Array.prototype.slice.call(arguments);\n\t            var time = args[timePosition];\n\t            var id = Tone.Transport.schedule(function (t) {\n\t                args[timePosition] = t;\n\t                originalMethod.apply(this, args);\n\t            }.bind(this), time);\n\t            this._scheduledEvents.push(id);\n\t        }.bind(this);\n\t    };\n\t    /**\n\t\t * Unsync the instrument from the Transport\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t    Tone.Instrument.prototype.unsync = function () {\n\t        this._scheduledEvents.forEach(function (id) {\n\t            Tone.Transport.clear(id);\n\t        });\n\t        this._scheduledEvents = [];\n\t        if (this._original_triggerAttack) {\n\t            this.triggerAttack = this._original_triggerAttack;\n\t            this.triggerRelease = this._original_triggerRelease;\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Trigger the attack and then the release after the duration.\n\t\t *  @param  {Frequency} note     The note to trigger.\n\t\t *  @param  {Time} duration How long the note should be held for before\n\t\t *                          triggering the release. This value must be greater than 0.\n\t\t *  @param {Time} [time=now]  When the note should be triggered.\n\t\t *  @param  {NormalRange} [velocity=1] The velocity the note should be triggered at.\n\t\t *  @returns {Tone.Instrument} this\n\t\t *  @example\n\t\t * //trigger \"C4\" for the duration of an 8th note\n\t\t * synth.triggerAttackRelease(\"C4\", \"8n\");\n\t\t */\n\t    Tone.Instrument.prototype.triggerAttackRelease = function (note, duration, time, velocity) {\n\t        time = this.toSeconds(time);\n\t        duration = this.toSeconds(duration);\n\t        this.triggerAttack(note, time, velocity);\n\t        this.triggerRelease(time + duration);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Instrument} this\n\t\t */\n\t    Tone.Instrument.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._volume.dispose();\n\t        this._volume = null;\n\t        this._writable(['volume']);\n\t        this.volume = null;\n\t        this.unsync();\n\t        this._scheduledEvents = null;\n\t        return this;\n\t    };\n\t    return Tone.Instrument;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  This is an abstract base class for other monophonic instruments to \n\t\t *          extend. IMPORTANT: It does not make any sound on its own and\n\t\t *          shouldn't be directly instantiated.\n\t\t *\n\t\t *  @constructor\n\t\t *  @abstract\n\t\t *  @extends {Tone.Instrument}\n\t\t */\n\t    Tone.Monophonic = function (options) {\n\t        //get the defaults\n\t        options = Tone.defaultArg(options, Tone.Monophonic.defaults);\n\t        Tone.Instrument.call(this, options);\n\t        /**\n\t\t\t *  The glide time between notes. \n\t\t\t *  @type {Time}\n\t\t\t */\n\t        this.portamento = options.portamento;\n\t    };\n\t    Tone.extend(Tone.Monophonic, Tone.Instrument);\n\t    /**\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Monophonic.defaults = { 'portamento': 0 };\n\t    /**\n\t\t *  Trigger the attack of the note optionally with a given velocity. \n\t\t *  \n\t\t *  \n\t\t *  @param  {Frequency} note     The note to trigger.\n\t\t *  @param  {Time} [time=now]     When the note should start.\n\t\t *  @param  {number} [velocity=1] velocity The velocity scaler \n\t\t *                                determines how \"loud\" the note \n\t\t *                                will be triggered.\n\t\t *  @returns {Tone.Monophonic} this\n\t\t *  @example\n\t\t * synth.triggerAttack(\"C4\");\n\t\t *  @example\n\t\t * //trigger the note a half second from now at half velocity\n\t\t * synth.triggerAttack(\"C4\", \"+0.5\", 0.5);\n\t\t */\n\t    Tone.Monophonic.prototype.triggerAttack = function (note, time, velocity) {\n\t        time = this.toSeconds(time);\n\t        this._triggerEnvelopeAttack(time, velocity);\n\t        this.setNote(note, time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Trigger the release portion of the envelope\n\t\t *  @param  {Time} [time=now] If no time is given, the release happens immediatly\n\t\t *  @returns {Tone.Monophonic} this\n\t\t *  @example\n\t\t * synth.triggerRelease();\n\t\t */\n\t    Tone.Monophonic.prototype.triggerRelease = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._triggerEnvelopeRelease(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  override this method with the actual method\n\t\t *  @abstract\n\t\t *  @private\n\t\t */\n\t    Tone.Monophonic.prototype._triggerEnvelopeAttack = function () {\n\t    };\n\t    /**\n\t\t *  override this method with the actual method\n\t\t *  @abstract\n\t\t *  @private\n\t\t */\n\t    Tone.Monophonic.prototype._triggerEnvelopeRelease = function () {\n\t    };\n\t    /**\n\t\t *  Get the level of the output at the given time. Measures\n\t\t *  the envelope(s) value at the time. \n\t\t *  @param {Time} time The time to query the envelope value\n\t\t *  @return {NormalRange} The output level between 0-1\n\t\t */\n\t    Tone.Monophonic.prototype.getLevelAtTime = function (time) {\n\t        time = this.toSeconds(time);\n\t        return this.envelope.getValueAtTime(time);\n\t    };\n\t    /**\n\t\t *  Set the note at the given time. If no time is given, the note\n\t\t *  will set immediately. \n\t\t *  @param {Frequency} note The note to change to.\n\t\t *  @param  {Time} [time=now] The time when the note should be set. \n\t\t *  @returns {Tone.Monophonic} this\n\t\t * @example\n\t\t * //change to F#6 in one quarter note from now.\n\t\t * synth.setNote(\"F#6\", \"+4n\");\n\t\t * @example\n\t\t * //change to Bb4 right now\n\t\t * synth.setNote(\"Bb4\");\n\t\t */\n\t    Tone.Monophonic.prototype.setNote = function (note, time) {\n\t        time = this.toSeconds(time);\n\t        if (this.portamento > 0 && this.getLevelAtTime(time) > 0.05) {\n\t            var portTime = this.toSeconds(this.portamento);\n\t            this.frequency.exponentialRampTo(note, portTime, time);\n\t        } else {\n\t            this.frequency.setValueAtTime(note, time);\n\t        }\n\t        return this;\n\t    };\n\t    return Tone.Monophonic;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Synth is composed simply of a Tone.OmniOscillator\n\t\t *          routed through a Tone.AmplitudeEnvelope.\n\t\t *          <img src=\"https://docs.google.com/drawings/d/1-1_0YW2Z1J2EPI36P8fNCMcZG7N1w1GZluPs4og4evo/pub?w=1163&h=231\">\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Monophonic}\n\t\t *  @param {Object} [options] the options available for the synth\n\t\t *                          see defaults below\n\t\t *  @example\n\t\t * var synth = new Tone.Synth().toMaster();\n\t\t * synth.triggerAttackRelease(\"C4\", \"8n\");\n\t\t */\n\t    Tone.Synth = function (options) {\n\t        //get the defaults\n\t        options = Tone.defaultArg(options, Tone.Synth.defaults);\n\t        Tone.Monophonic.call(this, options);\n\t        /**\n\t\t\t *  The oscillator.\n\t\t\t *  @type {Tone.OmniOscillator}\n\t\t\t */\n\t        this.oscillator = new Tone.OmniOscillator(options.oscillator);\n\t        /**\n\t\t\t *  The frequency control.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = this.oscillator.frequency;\n\t        /**\n\t\t\t *  The detune control.\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = this.oscillator.detune;\n\t        /**\n\t\t\t *  The amplitude envelope.\n\t\t\t *  @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t        this.envelope = new Tone.AmplitudeEnvelope(options.envelope);\n\t        //connect the oscillators to the output\n\t        this.oscillator.chain(this.envelope, this.output);\n\t        this._readOnly([\n\t            'oscillator',\n\t            'frequency',\n\t            'detune',\n\t            'envelope'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.Synth, Tone.Monophonic);\n\t    /**\n\t\t *  @const\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Synth.defaults = {\n\t        'oscillator': { 'type': 'triangle' },\n\t        'envelope': {\n\t            'attack': 0.005,\n\t            'decay': 0.1,\n\t            'sustain': 0.3,\n\t            'release': 1\n\t        }\n\t    };\n\t    /**\n\t\t *  start the attack portion of the envelope\n\t\t *  @param {Time} [time=now] the time the attack should start\n\t\t *  @param {number} [velocity=1] the velocity of the note (0-1)\n\t\t *  @returns {Tone.Synth} this\n\t\t *  @private\n\t\t */\n\t    Tone.Synth.prototype._triggerEnvelopeAttack = function (time, velocity) {\n\t        //the envelopes\n\t        this.envelope.triggerAttack(time, velocity);\n\t        this.oscillator.start(time);\n\t        //if there is no release portion, stop the oscillator\n\t        if (this.envelope.sustain === 0) {\n\t            this.oscillator.stop(time + this.envelope.attack + this.envelope.decay);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  start the release portion of the envelope\n\t\t *  @param {Time} [time=now] the time the release should start\n\t\t *  @returns {Tone.Synth} this\n\t\t *  @private\n\t\t */\n\t    Tone.Synth.prototype._triggerEnvelopeRelease = function (time) {\n\t        time = this.toSeconds(time);\n\t        this.envelope.triggerRelease(time);\n\t        this.oscillator.stop(time + this.envelope.release);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Synth} this\n\t\t */\n\t    Tone.Synth.prototype.dispose = function () {\n\t        Tone.Monophonic.prototype.dispose.call(this);\n\t        this._writable([\n\t            'oscillator',\n\t            'frequency',\n\t            'detune',\n\t            'envelope'\n\t        ]);\n\t        this.oscillator.dispose();\n\t        this.oscillator = null;\n\t        this.envelope.dispose();\n\t        this.envelope = null;\n\t        this.frequency = null;\n\t        this.detune = null;\n\t        return this;\n\t    };\n\t    return Tone.Synth;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  AMSynth uses the output of one Tone.Synth to modulate the\n\t\t *          amplitude of another Tone.Synth. The harmonicity (the ratio between\n\t\t *          the two signals) affects the timbre of the output signal greatly.\n\t\t *          Read more about Amplitude Modulation Synthesis on\n\t\t *          [SoundOnSound](https://web.archive.org/web/20160404103653/http://www.soundonsound.com:80/sos/mar00/articles/synthsecrets.htm).\n\t\t *          <img src=\"https://docs.google.com/drawings/d/1TQu8Ed4iFr1YTLKpB3U1_hur-UwBrh5gdBXc8BxfGKw/pub?w=1009&h=457\">\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Monophonic}\n\t\t *  @param {Object} [options] the options available for the synth\n\t\t *                            see defaults below\n\t\t *  @example\n\t\t * var synth = new Tone.AMSynth().toMaster();\n\t\t * synth.triggerAttackRelease(\"C4\", \"4n\");\n\t\t */\n\t    Tone.AMSynth = function (options) {\n\t        options = Tone.defaultArg(options, Tone.AMSynth.defaults);\n\t        Tone.Monophonic.call(this, options);\n\t        /**\n\t\t\t *  The carrier voice.\n\t\t\t *  @type {Tone.Synth}\n\t\t\t *  @private\n\t\t\t */\n\t        this._carrier = new Tone.Synth();\n\t        this._carrier.volume.value = -10;\n\t        /**\n\t\t\t *  The carrier's oscillator\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t */\n\t        this.oscillator = this._carrier.oscillator;\n\t        /**\n\t\t\t *  The carrier's envelope\n\t\t\t *  @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t        this.envelope = this._carrier.envelope.set(options.envelope);\n\t        /**\n\t\t\t *  The modulator voice.\n\t\t\t *  @type {Tone.Synth}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulator = new Tone.Synth();\n\t        this._modulator.volume.value = -10;\n\t        /**\n\t\t\t *  The modulator's oscillator which is applied\n\t\t\t *  to the amplitude of the oscillator\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t */\n\t        this.modulation = this._modulator.oscillator.set(options.modulation);\n\t        /**\n\t\t\t *  The modulator's envelope\n\t\t\t *  @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t        this.modulationEnvelope = this._modulator.envelope.set(options.modulationEnvelope);\n\t        /**\n\t\t\t *  The frequency.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(440, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The detune in cents\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t        /**\n\t\t\t *  Harmonicity is the ratio between the two voices. A harmonicity of\n\t\t\t *  1 is no change. Harmonicity = 2 means a change of an octave.\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t *  @example\n\t\t\t * //pitch voice1 an octave below voice0\n\t\t\t * synth.harmonicity.value = 0.5;\n\t\t\t */\n\t        this.harmonicity = new Tone.Multiply(options.harmonicity);\n\t        this.harmonicity.units = Tone.Type.Positive;\n\t        /**\n\t\t\t *  convert the -1,1 output to 0,1\n\t\t\t *  @type {Tone.AudioToGain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulationScale = new Tone.AudioToGain();\n\t        /**\n\t\t\t *  the node where the modulation happens\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulationNode = new Tone.Gain();\n\t        //control the two voices frequency\n\t        this.frequency.connect(this._carrier.frequency);\n\t        this.frequency.chain(this.harmonicity, this._modulator.frequency);\n\t        this.detune.fan(this._carrier.detune, this._modulator.detune);\n\t        this._modulator.chain(this._modulationScale, this._modulationNode.gain);\n\t        this._carrier.chain(this._modulationNode, this.output);\n\t        this._readOnly([\n\t            'frequency',\n\t            'harmonicity',\n\t            'oscillator',\n\t            'envelope',\n\t            'modulation',\n\t            'modulationEnvelope',\n\t            'detune'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.AMSynth, Tone.Monophonic);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.AMSynth.defaults = {\n\t        'harmonicity': 3,\n\t        'detune': 0,\n\t        'oscillator': { 'type': 'sine' },\n\t        'envelope': {\n\t            'attack': 0.01,\n\t            'decay': 0.01,\n\t            'sustain': 1,\n\t            'release': 0.5\n\t        },\n\t        'modulation': { 'type': 'square' },\n\t        'modulationEnvelope': {\n\t            'attack': 0.5,\n\t            'decay': 0,\n\t            'sustain': 1,\n\t            'release': 0.5\n\t        }\n\t    };\n\t    /**\n\t\t *  trigger the attack portion of the note\n\t\t *\n\t\t *  @param  {Time} [time=now] the time the note will occur\n\t\t *  @param {NormalRange} [velocity=1] the velocity of the note\n\t\t *  @private\n\t\t *  @returns {Tone.AMSynth} this\n\t\t */\n\t    Tone.AMSynth.prototype._triggerEnvelopeAttack = function (time, velocity) {\n\t        //the port glide\n\t        time = this.toSeconds(time);\n\t        //the envelopes\n\t        this._carrier._triggerEnvelopeAttack(time, velocity);\n\t        this._modulator._triggerEnvelopeAttack(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  trigger the release portion of the note\n\t\t *\n\t\t *  @param  {Time} [time=now] the time the note will release\n\t\t *  @private\n\t\t *  @returns {Tone.AMSynth} this\n\t\t */\n\t    Tone.AMSynth.prototype._triggerEnvelopeRelease = function (time) {\n\t        this._carrier._triggerEnvelopeRelease(time);\n\t        this._modulator._triggerEnvelopeRelease(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.AMSynth} this\n\t\t */\n\t    Tone.AMSynth.prototype.dispose = function () {\n\t        Tone.Monophonic.prototype.dispose.call(this);\n\t        this._writable([\n\t            'frequency',\n\t            'harmonicity',\n\t            'oscillator',\n\t            'envelope',\n\t            'modulation',\n\t            'modulationEnvelope',\n\t            'detune'\n\t        ]);\n\t        this._carrier.dispose();\n\t        this._carrier = null;\n\t        this._modulator.dispose();\n\t        this._modulator = null;\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        this.detune.dispose();\n\t        this.detune = null;\n\t        this.harmonicity.dispose();\n\t        this.harmonicity = null;\n\t        this._modulationScale.dispose();\n\t        this._modulationScale = null;\n\t        this._modulationNode.dispose();\n\t        this._modulationNode = null;\n\t        this.oscillator = null;\n\t        this.envelope = null;\n\t        this.modulationEnvelope = null;\n\t        this.modulation = null;\n\t        return this;\n\t    };\n\t    return Tone.AMSynth;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.MonoSynth is composed of one oscillator, one filter, and two envelopes.\n\t\t *          The amplitude of the Tone.Oscillator and the cutoff frequency of the\n\t\t *          Tone.Filter are controlled by Tone.Envelopes.\n\t\t *          <img src=\"https://docs.google.com/drawings/d/1gaY1DF9_Hzkodqf8JI1Cg2VZfwSElpFQfI94IQwad38/pub?w=924&h=240\">\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Monophonic}\n\t\t *  @param {Object} [options] the options available for the synth\n\t\t *                          see defaults below\n\t\t *  @example\n\t\t * var synth = new Tone.MonoSynth({\n\t\t * \t\"oscillator\" : {\n\t\t * \t\t\"type\" : \"square\"\n\t\t *  },\n\t\t *  \"envelope\" : {\n\t\t *  \t\"attack\" : 0.1\n\t\t *  }\n\t\t * }).toMaster();\n\t\t * synth.triggerAttackRelease(\"C4\", \"8n\");\n\t\t */\n\t    Tone.MonoSynth = function (options) {\n\t        //get the defaults\n\t        options = Tone.defaultArg(options, Tone.MonoSynth.defaults);\n\t        Tone.Monophonic.call(this, options);\n\t        /**\n\t\t\t *  The oscillator.\n\t\t\t *  @type {Tone.OmniOscillator}\n\t\t\t */\n\t        this.oscillator = new Tone.OmniOscillator(options.oscillator);\n\t        /**\n\t\t\t *  The frequency control.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = this.oscillator.frequency;\n\t        /**\n\t\t\t *  The detune control.\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = this.oscillator.detune;\n\t        /**\n\t\t\t *  The filter.\n\t\t\t *  @type {Tone.Filter}\n\t\t\t */\n\t        this.filter = new Tone.Filter(options.filter);\n\t        /**\n\t\t\t *  The filter envelope.\n\t\t\t *  @type {Tone.FrequencyEnvelope}\n\t\t\t */\n\t        this.filterEnvelope = new Tone.FrequencyEnvelope(options.filterEnvelope);\n\t        /**\n\t\t\t *  The amplitude envelope.\n\t\t\t *  @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t        this.envelope = new Tone.AmplitudeEnvelope(options.envelope);\n\t        //connect the oscillators to the output\n\t        this.oscillator.chain(this.filter, this.envelope, this.output);\n\t        //connect the filter envelope\n\t        this.filterEnvelope.connect(this.filter.frequency);\n\t        this._readOnly([\n\t            'oscillator',\n\t            'frequency',\n\t            'detune',\n\t            'filter',\n\t            'filterEnvelope',\n\t            'envelope'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.MonoSynth, Tone.Monophonic);\n\t    /**\n\t\t *  @const\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.MonoSynth.defaults = {\n\t        'frequency': 'C4',\n\t        'detune': 0,\n\t        'oscillator': { 'type': 'square' },\n\t        'filter': {\n\t            'Q': 6,\n\t            'type': 'lowpass',\n\t            'rolloff': -24\n\t        },\n\t        'envelope': {\n\t            'attack': 0.005,\n\t            'decay': 0.1,\n\t            'sustain': 0.9,\n\t            'release': 1\n\t        },\n\t        'filterEnvelope': {\n\t            'attack': 0.06,\n\t            'decay': 0.2,\n\t            'sustain': 0.5,\n\t            'release': 2,\n\t            'baseFrequency': 200,\n\t            'octaves': 7,\n\t            'exponent': 2\n\t        }\n\t    };\n\t    /**\n\t\t *  start the attack portion of the envelope\n\t\t *  @param {Time} [time=now] the time the attack should start\n\t\t *  @param {NormalRange} [velocity=1] the velocity of the note (0-1)\n\t\t *  @returns {Tone.MonoSynth} this\n\t\t *  @private\n\t\t */\n\t    Tone.MonoSynth.prototype._triggerEnvelopeAttack = function (time, velocity) {\n\t        time = this.toSeconds(time);\n\t        //the envelopes\n\t        this.envelope.triggerAttack(time, velocity);\n\t        this.filterEnvelope.triggerAttack(time);\n\t        this.oscillator.start(time);\n\t        if (this.envelope.sustain === 0) {\n\t            this.oscillator.stop(time + this.envelope.attack + this.envelope.decay);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  start the release portion of the envelope\n\t\t *  @param {Time} [time=now] the time the release should start\n\t\t *  @returns {Tone.MonoSynth} this\n\t\t *  @private\n\t\t */\n\t    Tone.MonoSynth.prototype._triggerEnvelopeRelease = function (time) {\n\t        this.envelope.triggerRelease(time);\n\t        this.filterEnvelope.triggerRelease(time);\n\t        this.oscillator.stop(time + this.envelope.release);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.MonoSynth} this\n\t\t */\n\t    Tone.MonoSynth.prototype.dispose = function () {\n\t        Tone.Monophonic.prototype.dispose.call(this);\n\t        this._writable([\n\t            'oscillator',\n\t            'frequency',\n\t            'detune',\n\t            'filter',\n\t            'filterEnvelope',\n\t            'envelope'\n\t        ]);\n\t        this.oscillator.dispose();\n\t        this.oscillator = null;\n\t        this.envelope.dispose();\n\t        this.envelope = null;\n\t        this.filterEnvelope.dispose();\n\t        this.filterEnvelope = null;\n\t        this.filter.dispose();\n\t        this.filter = null;\n\t        this.frequency = null;\n\t        this.detune = null;\n\t        return this;\n\t    };\n\t    return Tone.MonoSynth;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.DuoSynth is a monophonic synth composed of two\n\t\t *          MonoSynths run in parallel with control over the\n\t\t *          frequency ratio between the two voices and vibrato effect.\n\t\t *          <img src=\"https://docs.google.com/drawings/d/1bL4GXvfRMMlqS7XyBm9CjL9KJPSUKbcdBNpqOlkFLxk/pub?w=1012&h=448\">\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Monophonic}\n\t\t *  @param {Object} [options] the options available for the synth\n\t\t *                          see defaults below\n\t\t *  @example\n\t\t * var duoSynth = new Tone.DuoSynth().toMaster();\n\t\t * duoSynth.triggerAttackRelease(\"C4\", \"2n\");\n\t\t */\n\t    Tone.DuoSynth = function (options) {\n\t        options = Tone.defaultArg(options, Tone.DuoSynth.defaults);\n\t        Tone.Monophonic.call(this, options);\n\t        /**\n\t\t\t *  the first voice\n\t\t\t *  @type {Tone.MonoSynth}\n\t\t\t */\n\t        this.voice0 = new Tone.MonoSynth(options.voice0);\n\t        this.voice0.volume.value = -10;\n\t        /**\n\t\t\t *  the second voice\n\t\t\t *  @type {Tone.MonoSynth}\n\t\t\t */\n\t        this.voice1 = new Tone.MonoSynth(options.voice1);\n\t        this.voice1.volume.value = -10;\n\t        /**\n\t\t\t *  The vibrato LFO.\n\t\t\t *  @type {Tone.LFO}\n\t\t\t *  @private\n\t\t\t */\n\t        this._vibrato = new Tone.LFO(options.vibratoRate, -50, 50);\n\t        this._vibrato.start();\n\t        /**\n\t\t\t * the vibrato frequency\n\t\t\t * @type {Frequency}\n\t\t\t * @signal\n\t\t\t */\n\t        this.vibratoRate = this._vibrato.frequency;\n\t        /**\n\t\t\t *  the vibrato gain\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._vibratoGain = new Tone.Gain(options.vibratoAmount, Tone.Type.Positive);\n\t        /**\n\t\t\t * The amount of vibrato\n\t\t\t * @type {Positive}\n\t\t\t * @signal\n\t\t\t */\n\t        this.vibratoAmount = this._vibratoGain.gain;\n\t        /**\n\t\t\t *  the frequency control\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(440, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  Harmonicity is the ratio between the two voices. A harmonicity of\n\t\t\t *  1 is no change. Harmonicity = 2 means a change of an octave.\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t *  @example\n\t\t\t * //pitch voice1 an octave below voice0\n\t\t\t * duoSynth.harmonicity.value = 0.5;\n\t\t\t */\n\t        this.harmonicity = new Tone.Multiply(options.harmonicity);\n\t        this.harmonicity.units = Tone.Type.Positive;\n\t        //control the two voices frequency\n\t        this.frequency.connect(this.voice0.frequency);\n\t        this.frequency.chain(this.harmonicity, this.voice1.frequency);\n\t        this._vibrato.connect(this._vibratoGain);\n\t        this._vibratoGain.fan(this.voice0.detune, this.voice1.detune);\n\t        this.voice0.connect(this.output);\n\t        this.voice1.connect(this.output);\n\t        this._readOnly([\n\t            'voice0',\n\t            'voice1',\n\t            'frequency',\n\t            'vibratoAmount',\n\t            'vibratoRate'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.DuoSynth, Tone.Monophonic);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.DuoSynth.defaults = {\n\t        'vibratoAmount': 0.5,\n\t        'vibratoRate': 5,\n\t        'harmonicity': 1.5,\n\t        'voice0': {\n\t            'volume': -10,\n\t            'portamento': 0,\n\t            'oscillator': { 'type': 'sine' },\n\t            'filterEnvelope': {\n\t                'attack': 0.01,\n\t                'decay': 0,\n\t                'sustain': 1,\n\t                'release': 0.5\n\t            },\n\t            'envelope': {\n\t                'attack': 0.01,\n\t                'decay': 0,\n\t                'sustain': 1,\n\t                'release': 0.5\n\t            }\n\t        },\n\t        'voice1': {\n\t            'volume': -10,\n\t            'portamento': 0,\n\t            'oscillator': { 'type': 'sine' },\n\t            'filterEnvelope': {\n\t                'attack': 0.01,\n\t                'decay': 0,\n\t                'sustain': 1,\n\t                'release': 0.5\n\t            },\n\t            'envelope': {\n\t                'attack': 0.01,\n\t                'decay': 0,\n\t                'sustain': 1,\n\t                'release': 0.5\n\t            }\n\t        }\n\t    };\n\t    /**\n\t\t *  start the attack portion of the envelopes\n\t\t *\n\t\t *  @param {Time} [time=now] the time the attack should start\n\t\t *  @param {NormalRange} [velocity=1] the velocity of the note (0-1)\n\t\t *  @returns {Tone.DuoSynth} this\n\t\t *  @private\n\t\t */\n\t    Tone.DuoSynth.prototype._triggerEnvelopeAttack = function (time, velocity) {\n\t        time = this.toSeconds(time);\n\t        this.voice0._triggerEnvelopeAttack(time, velocity);\n\t        this.voice1._triggerEnvelopeAttack(time, velocity);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  start the release portion of the envelopes\n\t\t *\n\t\t *  @param {Time} [time=now] the time the release should start\n\t\t *  @returns {Tone.DuoSynth} this\n\t\t *  @private\n\t\t */\n\t    Tone.DuoSynth.prototype._triggerEnvelopeRelease = function (time) {\n\t        this.voice0._triggerEnvelopeRelease(time);\n\t        this.voice1._triggerEnvelopeRelease(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Get the level of the output at the given time. Measures\n\t\t *  the envelope(s) value at the time. \n\t\t *  @param {Time} time The time to query the envelope value\n\t\t *  @return {NormalRange} The output level between 0-1\n\t\t */\n\t    Tone.DuoSynth.prototype.getLevelAtTime = function (time) {\n\t        return (this.voice0.getLevelAtTime(time) + this.voice1.getLevelAtTime(time)) / 2;\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.DuoSynth} this\n\t\t */\n\t    Tone.DuoSynth.prototype.dispose = function () {\n\t        Tone.Monophonic.prototype.dispose.call(this);\n\t        this._writable([\n\t            'voice0',\n\t            'voice1',\n\t            'frequency',\n\t            'vibratoAmount',\n\t            'vibratoRate'\n\t        ]);\n\t        this.voice0.dispose();\n\t        this.voice0 = null;\n\t        this.voice1.dispose();\n\t        this.voice1 = null;\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        this._vibratoGain.dispose();\n\t        this._vibratoGain = null;\n\t        this._vibrato = null;\n\t        this.harmonicity.dispose();\n\t        this.harmonicity = null;\n\t        this.vibratoAmount.dispose();\n\t        this.vibratoAmount = null;\n\t        this.vibratoRate = null;\n\t        return this;\n\t    };\n\t    return Tone.DuoSynth;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  FMSynth is composed of two Tone.Synths where one Tone.Synth modulates\n\t\t *          the frequency of a second Tone.Synth. A lot of spectral content\n\t\t *          can be explored using the modulationIndex parameter. Read more about\n\t\t *          frequency modulation synthesis on Sound On Sound: [Part 1](https://web.archive.org/web/20160403123704/http://www.soundonsound.com/sos/apr00/articles/synthsecrets.htm), [Part 2](https://web.archive.org/web/20160403115835/http://www.soundonsound.com/sos/may00/articles/synth.htm).\n\t\t *          <img src=\"https://docs.google.com/drawings/d/1h0PUDZXPgi4Ikx6bVT6oncrYPLluFKy7lj53puxj-DM/pub?w=902&h=462\">\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Monophonic}\n\t\t *  @param {Object} [options] the options available for the synth\n\t\t *                          see defaults below\n\t\t *  @example\n\t\t * var fmSynth = new Tone.FMSynth().toMaster();\n\t\t * fmSynth.triggerAttackRelease(\"C5\", \"4n\");\n\t\t */\n\t    Tone.FMSynth = function (options) {\n\t        options = Tone.defaultArg(options, Tone.FMSynth.defaults);\n\t        Tone.Monophonic.call(this, options);\n\t        /**\n\t\t\t *  The carrier voice.\n\t\t\t *  @type {Tone.Synth}\n\t\t\t *  @private\n\t\t\t */\n\t        this._carrier = new Tone.Synth(options.carrier);\n\t        this._carrier.volume.value = -10;\n\t        /**\n\t\t\t *  The carrier's oscillator\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t */\n\t        this.oscillator = this._carrier.oscillator;\n\t        /**\n\t\t\t *  The carrier's envelope\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t */\n\t        this.envelope = this._carrier.envelope.set(options.envelope);\n\t        /**\n\t\t\t *  The modulator voice.\n\t\t\t *  @type {Tone.Synth}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulator = new Tone.Synth(options.modulator);\n\t        this._modulator.volume.value = -10;\n\t        /**\n\t\t\t *  The modulator's oscillator which is applied\n\t\t\t *  to the amplitude of the oscillator\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t */\n\t        this.modulation = this._modulator.oscillator.set(options.modulation);\n\t        /**\n\t\t\t *  The modulator's envelope\n\t\t\t *  @type {Tone.Oscillator}\n\t\t\t */\n\t        this.modulationEnvelope = this._modulator.envelope.set(options.modulationEnvelope);\n\t        /**\n\t\t\t *  The frequency control.\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(440, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The detune in cents\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t        /**\n\t\t\t *  Harmonicity is the ratio between the two voices. A harmonicity of\n\t\t\t *  1 is no change. Harmonicity = 2 means a change of an octave.\n\t\t\t *  @type {Positive}\n\t\t\t *  @signal\n\t\t\t *  @example\n\t\t\t * //pitch voice1 an octave below voice0\n\t\t\t * synth.harmonicity.value = 0.5;\n\t\t\t */\n\t        this.harmonicity = new Tone.Multiply(options.harmonicity);\n\t        this.harmonicity.units = Tone.Type.Positive;\n\t        /**\n\t\t\t *  The modulation index which essentially the depth or amount of the modulation. It is the\n\t\t\t *  ratio of the frequency of the modulating signal (mf) to the amplitude of the\n\t\t\t *  modulating signal (ma) -- as in ma/mf.\n\t\t\t *\t@type {Positive}\n\t\t\t *\t@signal\n\t\t\t */\n\t        this.modulationIndex = new Tone.Multiply(options.modulationIndex);\n\t        this.modulationIndex.units = Tone.Type.Positive;\n\t        /**\n\t\t\t *  the node where the modulation happens\n\t\t\t *  @type {GainNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._modulationNode = new Tone.Gain(0);\n\t        //control the two voices frequency\n\t        this.frequency.connect(this._carrier.frequency);\n\t        this.frequency.chain(this.harmonicity, this._modulator.frequency);\n\t        this.frequency.chain(this.modulationIndex, this._modulationNode);\n\t        this.detune.fan(this._carrier.detune, this._modulator.detune);\n\t        this._modulator.connect(this._modulationNode.gain);\n\t        this._modulationNode.connect(this._carrier.frequency);\n\t        this._carrier.connect(this.output);\n\t        this._readOnly([\n\t            'frequency',\n\t            'harmonicity',\n\t            'modulationIndex',\n\t            'oscillator',\n\t            'envelope',\n\t            'modulation',\n\t            'modulationEnvelope',\n\t            'detune'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.FMSynth, Tone.Monophonic);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.FMSynth.defaults = {\n\t        'harmonicity': 3,\n\t        'modulationIndex': 10,\n\t        'detune': 0,\n\t        'oscillator': { 'type': 'sine' },\n\t        'envelope': {\n\t            'attack': 0.01,\n\t            'decay': 0.01,\n\t            'sustain': 1,\n\t            'release': 0.5\n\t        },\n\t        'modulation': { 'type': 'square' },\n\t        'modulationEnvelope': {\n\t            'attack': 0.5,\n\t            'decay': 0,\n\t            'sustain': 1,\n\t            'release': 0.5\n\t        }\n\t    };\n\t    /**\n\t\t * \ttrigger the attack portion of the note\n\t\t *\n\t\t *  @param  {Time} [time=now] the time the note will occur\n\t\t *  @param {number} [velocity=1] the velocity of the note\n\t\t *  @returns {Tone.FMSynth} this\n\t\t *  @private\n\t\t */\n\t    Tone.FMSynth.prototype._triggerEnvelopeAttack = function (time, velocity) {\n\t        time = this.toSeconds(time);\n\t        //the envelopes\n\t        this._carrier._triggerEnvelopeAttack(time, velocity);\n\t        this._modulator._triggerEnvelopeAttack(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  trigger the release portion of the note\n\t\t *\n\t\t *  @param  {Time} [time=now] the time the note will release\n\t\t *  @returns {Tone.FMSynth} this\n\t\t *  @private\n\t\t */\n\t    Tone.FMSynth.prototype._triggerEnvelopeRelease = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._carrier._triggerEnvelopeRelease(time);\n\t        this._modulator._triggerEnvelopeRelease(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.FMSynth} this\n\t\t */\n\t    Tone.FMSynth.prototype.dispose = function () {\n\t        Tone.Monophonic.prototype.dispose.call(this);\n\t        this._writable([\n\t            'frequency',\n\t            'harmonicity',\n\t            'modulationIndex',\n\t            'oscillator',\n\t            'envelope',\n\t            'modulation',\n\t            'modulationEnvelope',\n\t            'detune'\n\t        ]);\n\t        this._carrier.dispose();\n\t        this._carrier = null;\n\t        this._modulator.dispose();\n\t        this._modulator = null;\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        this.detune.dispose();\n\t        this.detune = null;\n\t        this.modulationIndex.dispose();\n\t        this.modulationIndex = null;\n\t        this.harmonicity.dispose();\n\t        this.harmonicity = null;\n\t        this._modulationNode.dispose();\n\t        this._modulationNode = null;\n\t        this.oscillator = null;\n\t        this.envelope = null;\n\t        this.modulationEnvelope = null;\n\t        this.modulation = null;\n\t        return this;\n\t    };\n\t    return Tone.FMSynth;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.MembraneSynth makes kick and tom sounds using a single oscillator\n\t\t *          with an amplitude envelope and frequency ramp. A Tone.OmniOscillator\n\t\t *          is routed through a Tone.AmplitudeEnvelope to the output. The drum\n\t\t *          quality of the sound comes from the frequency envelope applied\n\t\t *          during Tone.MembraneSynth.triggerAttack(note). The frequency envelope\n\t\t *          starts at <code>note * .octaves</code> and ramps to <code>note</code>\n\t\t *          over the duration of <code>.pitchDecay</code>.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Instrument}\n\t\t *  @param {Object} [options] the options available for the synth\n\t\t *                          see defaults below\n\t\t *  @example\n\t\t * var synth = new Tone.MembraneSynth().toMaster();\n\t\t * synth.triggerAttackRelease(\"C2\", \"8n\");\n\t\t */\n\t    Tone.MembraneSynth = function (options) {\n\t        options = Tone.defaultArg(options, Tone.MembraneSynth.defaults);\n\t        Tone.Instrument.call(this, options);\n\t        /**\n\t\t\t *  The oscillator.\n\t\t\t *  @type {Tone.OmniOscillator}\n\t\t\t */\n\t        this.oscillator = new Tone.OmniOscillator(options.oscillator);\n\t        /**\n\t\t\t *  The amplitude envelope.\n\t\t\t *  @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t        this.envelope = new Tone.AmplitudeEnvelope(options.envelope);\n\t        /**\n\t\t\t *  The number of octaves the pitch envelope ramps.\n\t\t\t *  @type {Positive}\n\t\t\t */\n\t        this.octaves = options.octaves;\n\t        /**\n\t\t\t *  The amount of time the frequency envelope takes.\n\t\t\t *  @type {Time}\n\t\t\t */\n\t        this.pitchDecay = options.pitchDecay;\n\t        this.oscillator.chain(this.envelope, this.output);\n\t        this._readOnly([\n\t            'oscillator',\n\t            'envelope'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.MembraneSynth, Tone.Instrument);\n\t    /**\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.MembraneSynth.defaults = {\n\t        'pitchDecay': 0.05,\n\t        'octaves': 10,\n\t        'oscillator': { 'type': 'sine' },\n\t        'envelope': {\n\t            'attack': 0.001,\n\t            'decay': 0.4,\n\t            'sustain': 0.01,\n\t            'release': 1.4,\n\t            'attackCurve': 'exponential'\n\t        }\n\t    };\n\t    /**\n\t\t *  Trigger the note at the given time with the given velocity.\n\t\t *\n\t\t *  @param  {Frequency} note     the note\n\t\t *  @param  {Time} [time=now]     the time, if not given is now\n\t\t *  @param  {number} [velocity=1] velocity defaults to 1\n\t\t *  @returns {Tone.MembraneSynth} this\n\t\t *  @example\n\t\t *  kick.triggerAttack(60);\n\t\t */\n\t    Tone.MembraneSynth.prototype.triggerAttack = function (note, time, velocity) {\n\t        time = this.toSeconds(time);\n\t        note = this.toFrequency(note);\n\t        var maxNote = note * this.octaves;\n\t        this.oscillator.frequency.setValueAtTime(maxNote, time);\n\t        this.oscillator.frequency.exponentialRampToValueAtTime(note, time + this.toSeconds(this.pitchDecay));\n\t        this.envelope.triggerAttack(time, velocity);\n\t        this.oscillator.start(time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Trigger the release portion of the note.\n\t\t *\n\t\t *  @param  {Time} [time=now] the time the note will release\n\t\t *  @returns {Tone.MembraneSynth} this\n\t\t */\n\t    Tone.MembraneSynth.prototype.triggerRelease = function (time) {\n\t        time = this.toSeconds(time);\n\t        this.envelope.triggerRelease(time);\n\t        this.oscillator.stop(time + this.envelope.release);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.MembraneSynth} this\n\t\t */\n\t    Tone.MembraneSynth.prototype.dispose = function () {\n\t        Tone.Instrument.prototype.dispose.call(this);\n\t        this._writable([\n\t            'oscillator',\n\t            'envelope'\n\t        ]);\n\t        this.oscillator.dispose();\n\t        this.oscillator = null;\n\t        this.envelope.dispose();\n\t        this.envelope = null;\n\t        return this;\n\t    };\n\t    return Tone.MembraneSynth;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  Inharmonic ratio of frequencies based on the Roland TR-808\n\t\t *  Taken from https://ccrma.stanford.edu/papers/tr-808-cymbal-physically-informed-circuit-bendable-digital-model\n\t\t *  @private\n\t\t *  @static\n\t\t *  @type {Array}\n\t\t */\n\t    var inharmRatios = [\n\t        1,\n\t        1.483,\n\t        1.932,\n\t        2.546,\n\t        2.63,\n\t        3.897\n\t    ];\n\t    /**\n\t\t *  @class  A highly inharmonic and spectrally complex source with a highpass filter\n\t\t *          and amplitude envelope which is good for making metalophone sounds. Based\n\t\t *          on CymbalSynth by [@polyrhythmatic](https://github.com/polyrhythmatic).\n\t\t *          Inspiration from [Sound on Sound](https://web.archive.org/web/20160610143924/https://www.soundonsound.com/sos/jul02/articles/synthsecrets0702.asp).\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Instrument}\n\t\t *  @param {Object} [options] The options availble for the synth\n\t\t *                             see defaults below\n\t\t */\n\t    Tone.MetalSynth = function (options) {\n\t        options = Tone.defaultArg(options, Tone.MetalSynth.defaults);\n\t        Tone.Instrument.call(this, options);\n\t        /**\n\t\t\t *  The frequency of the cymbal\n\t\t\t *  @type  {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\t        /**\n\t\t\t *  The array of FMOscillators\n\t\t\t *  @type  {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._oscillators = [];\n\t        /**\n\t\t\t *  The frequency multipliers\n\t\t\t *  @type {Array}\n\t\t\t *  @private\n\t\t\t */\n\t        this._freqMultipliers = [];\n\t        /**\n\t\t\t *  The amplitude for the body\n\t\t\t *  @type {Tone.Gain}\n\t\t\t *  @private\n\t\t\t */\n\t        this._amplitue = new Tone.Gain(0).connect(this.output);\n\t        /**\n\t\t\t *  highpass the output\n\t\t\t *  @type {Tone.Filter}\n\t\t\t *  @private\n\t\t\t */\n\t        this._highpass = new Tone.Filter({\n\t            'type': 'highpass',\n\t            'Q': -3.0102999566398125\n\t        }).connect(this._amplitue);\n\t        /**\n\t\t\t *  The number of octaves the highpass\n\t\t\t *  filter frequency ramps\n\t\t\t *  @type {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._octaves = options.octaves;\n\t        /**\n\t\t\t *  Scale the body envelope\n\t\t\t *  for the bandpass\n\t\t\t *  @type {Tone.Scale}\n\t\t\t *  @private\n\t\t\t */\n\t        this._filterFreqScaler = new Tone.Scale(options.resonance, 7000);\n\t        /**\n\t\t\t *  The envelope which is connected both to the\n\t\t\t *  amplitude and highpass filter's cutoff frequency\n\t\t\t *  @type  {Tone.Envelope}\n\t\t\t */\n\t        this.envelope = new Tone.Envelope({\n\t            'attack': options.envelope.attack,\n\t            'attackCurve': 'linear',\n\t            'decay': options.envelope.decay,\n\t            'sustain': 0,\n\t            'release': options.envelope.release\n\t        }).chain(this._filterFreqScaler, this._highpass.frequency);\n\t        this.envelope.connect(this._amplitue.gain);\n\t        for (var i = 0; i < inharmRatios.length; i++) {\n\t            var osc = new Tone.FMOscillator({\n\t                'type': 'square',\n\t                'modulationType': 'square',\n\t                'harmonicity': options.harmonicity,\n\t                'modulationIndex': options.modulationIndex\n\t            });\n\t            osc.connect(this._highpass);\n\t            this._oscillators[i] = osc;\n\t            var mult = new Tone.Multiply(inharmRatios[i]);\n\t            this._freqMultipliers[i] = mult;\n\t            this.frequency.chain(mult, osc.frequency);\n\t        }\n\t        //set the octaves\n\t        this.octaves = options.octaves;\n\t    };\n\t    Tone.extend(Tone.MetalSynth, Tone.Instrument);\n\t    /**\n\t\t *  default values\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.MetalSynth.defaults = {\n\t        'frequency': 200,\n\t        'envelope': {\n\t            'attack': 0.001,\n\t            'decay': 1.4,\n\t            'release': 0.2\n\t        },\n\t        'harmonicity': 5.1,\n\t        'modulationIndex': 32,\n\t        'resonance': 4000,\n\t        'octaves': 1.5\n\t    };\n\t    /**\n\t\t *  Trigger the attack.\n\t\t *  @param  {Time}  time      When the attack should be triggered.\n\t\t *  @param  {NormalRange}  [velocity=1]  The velocity that the envelope should be triggered at.\n\t\t *  @return  {Tone.MetalSynth}  this\n\t\t */\n\t    Tone.MetalSynth.prototype.triggerAttack = function (time, vel) {\n\t        time = this.toSeconds(time);\n\t        vel = Tone.defaultArg(vel, 1);\n\t        this.envelope.triggerAttack(time, vel);\n\t        this._oscillators.forEach(function (osc) {\n\t            osc.start(time);\n\t        });\n\t        //if the sustain is 0, stop the oscillator as well\n\t        if (this.envelope.sustain === 0) {\n\t            this._oscillators.forEach(function (osc) {\n\t                osc.stop(time + this.envelope.attack + this.envelope.decay);\n\t            }.bind(this));\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Trigger the release of the envelope.\n\t\t *  @param  {Time}  time      When the release should be triggered.\n\t\t *  @return  {Tone.MetalSynth}  this\n\t\t */\n\t    Tone.MetalSynth.prototype.triggerRelease = function (time) {\n\t        time = this.toSeconds(time);\n\t        this.envelope.triggerRelease(time);\n\t        this._oscillators.forEach(function (osc) {\n\t            osc.stop(time + this.envelope.release);\n\t        }.bind(this));\n\t        return this;\n\t    };\n\t    /**\n\t\t * Sync the instrument to the Transport. All subsequent calls of\n\t\t * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n\t\t * will be scheduled along the transport.\n\t\t * @example\n\t\t * synth.sync()\n\t\t * //schedule 3 notes when the transport first starts\n\t\t * synth.triggerAttackRelease('8n', 0)\n\t\t * synth.triggerAttackRelease('8n', '8n')\n\t\t * synth.triggerAttackRelease('8n', '4n')\n\t\t * //start the transport to hear the notes\n\t\t * Transport.start()\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t    Tone.MetalSynth.prototype.sync = function () {\n\t        this._syncMethod('triggerAttack', 0);\n\t        this._syncMethod('triggerRelease', 0);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Trigger the attack and release of the envelope after the given\n\t\t *  duration.\n\t\t *  @param  {Time}  duration  The duration before triggering the release\n\t\t *  @param  {Time}  time      When the attack should be triggered.\n\t\t *  @param  {NormalRange}  [velocity=1]  The velocity that the envelope should be triggered at.\n\t\t *  @return  {Tone.MetalSynth}  this\n\t\t */\n\t    Tone.MetalSynth.prototype.triggerAttackRelease = function (duration, time, velocity) {\n\t        time = this.toSeconds(time);\n\t        duration = this.toSeconds(duration);\n\t        this.triggerAttack(time, velocity);\n\t        this.triggerRelease(time + duration);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  The modulationIndex of the oscillators which make up the source.\n\t\t *  see Tone.FMOscillator.modulationIndex\n\t\t *  @memberOf Tone.MetalSynth#\n\t\t *  @type {Positive}\n\t\t *  @name  modulationIndex\n\t\t */\n\t    Object.defineProperty(Tone.MetalSynth.prototype, 'modulationIndex', {\n\t        get: function () {\n\t            return this._oscillators[0].modulationIndex.value;\n\t        },\n\t        set: function (val) {\n\t            for (var i = 0; i < this._oscillators.length; i++) {\n\t                this._oscillators[i].modulationIndex.value = val;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  The harmonicity of the oscillators which make up the source.\n\t\t *  see Tone.FMOscillator.harmonicity\n\t\t *  @memberOf Tone.MetalSynth#\n\t\t *  @type {Positive}\n\t\t *  @name  harmonicity\n\t\t */\n\t    Object.defineProperty(Tone.MetalSynth.prototype, 'harmonicity', {\n\t        get: function () {\n\t            return this._oscillators[0].harmonicity.value;\n\t        },\n\t        set: function (val) {\n\t            for (var i = 0; i < this._oscillators.length; i++) {\n\t                this._oscillators[i].harmonicity.value = val;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  The frequency of the highpass filter attached to the envelope\n\t\t *  @memberOf Tone.MetalSynth#\n\t\t *  @type {Frequency}\n\t\t *  @name  resonance\n\t\t */\n\t    Object.defineProperty(Tone.MetalSynth.prototype, 'resonance', {\n\t        get: function () {\n\t            return this._filterFreqScaler.min;\n\t        },\n\t        set: function (val) {\n\t            this._filterFreqScaler.min = val;\n\t            this.octaves = this._octaves;\n\t        }\n\t    });\n\t    /**\n\t\t *  The number of octaves above the \"resonance\" frequency\n\t\t *  that the filter ramps during the attack/decay envelope\n\t\t *  @memberOf Tone.MetalSynth#\n\t\t *  @type {Number}\n\t\t *  @name  octaves\n\t\t */\n\t    Object.defineProperty(Tone.MetalSynth.prototype, 'octaves', {\n\t        get: function () {\n\t            return this._octaves;\n\t        },\n\t        set: function (octs) {\n\t            this._octaves = octs;\n\t            this._filterFreqScaler.max = this._filterFreqScaler.min * Math.pow(2, octs);\n\t        }\n\t    });\n\t    /**\n\t\t *  Clean up\n\t\t *  @returns {Tone.MetalSynth} this\n\t\t */\n\t    Tone.MetalSynth.prototype.dispose = function () {\n\t        Tone.Instrument.prototype.dispose.call(this);\n\t        for (var i = 0; i < this._oscillators.length; i++) {\n\t            this._oscillators[i].dispose();\n\t            this._freqMultipliers[i].dispose();\n\t        }\n\t        this._oscillators = null;\n\t        this._freqMultipliers = null;\n\t        this.frequency.dispose();\n\t        this.frequency = null;\n\t        this._filterFreqScaler.dispose();\n\t        this._filterFreqScaler = null;\n\t        this._amplitue.dispose();\n\t        this._amplitue = null;\n\t        this.envelope.dispose();\n\t        this.envelope = null;\n\t        this._highpass.dispose();\n\t        this._highpass = null;\n\t    };\n\t    return Tone.MetalSynth;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.NoiseSynth is composed of a noise generator (Tone.Noise), one filter (Tone.Filter),\n\t\t *          and two envelopes (Tone.Envelop). One envelope controls the amplitude\n\t\t *          of the noise and the other is controls the cutoff frequency of the filter.\n\t\t *          <img src=\"https://docs.google.com/drawings/d/1rqzuX9rBlhT50MRvD2TKml9bnZhcZmzXF1rf_o7vdnE/pub?w=918&h=242\">\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Instrument}\n\t\t *  @param {Object} [options] the options available for the synth\n\t\t *                          see defaults below\n\t\t * @example\n\t\t * var noiseSynth = new Tone.NoiseSynth().toMaster();\n\t\t * noiseSynth.triggerAttackRelease(\"8n\");\n\t\t */\n\t    Tone.NoiseSynth = function (options) {\n\t        //get the defaults\n\t        options = Tone.defaultArg(options, Tone.NoiseSynth.defaults);\n\t        Tone.Instrument.call(this, options);\n\t        /**\n\t\t\t *  The noise source.\n\t\t\t *  @type {Tone.Noise}\n\t\t\t *  @example\n\t\t\t * noiseSynth.set(\"noise.type\", \"brown\");\n\t\t\t */\n\t        this.noise = new Tone.Noise();\n\t        /**\n\t\t\t *  The amplitude envelope.\n\t\t\t *  @type {Tone.AmplitudeEnvelope}\n\t\t\t */\n\t        this.envelope = new Tone.AmplitudeEnvelope(options.envelope);\n\t        //connect the noise to the output\n\t        this.noise.chain(this.envelope, this.output);\n\t        this._readOnly([\n\t            'noise',\n\t            'envelope'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.NoiseSynth, Tone.Instrument);\n\t    /**\n\t\t *  @const\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.NoiseSynth.defaults = {\n\t        'noise': { 'type': 'white' },\n\t        'envelope': {\n\t            'attack': 0.005,\n\t            'decay': 0.1,\n\t            'sustain': 0\n\t        }\n\t    };\n\t    /**\n\t\t *  Start the attack portion of the envelopes. Unlike other\n\t\t *  instruments, Tone.NoiseSynth doesn't have a note.\n\t\t *  @param {Time} [time=now] the time the attack should start\n\t\t *  @param {number} [velocity=1] the velocity of the note (0-1)\n\t\t *  @returns {Tone.NoiseSynth} this\n\t\t *  @example\n\t\t * noiseSynth.triggerAttack();\n\t\t */\n\t    Tone.NoiseSynth.prototype.triggerAttack = function (time, velocity) {\n\t        //the envelopes\n\t        this.envelope.triggerAttack(time, velocity);\n\t        //start the noise\n\t        this.noise.start(time);\n\t        if (this.envelope.sustain === 0) {\n\t            this.noise.stop(time = this.envelope.attack + this.envelope.decay);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Start the release portion of the envelopes.\n\t\t *  @param {Time} [time=now] the time the release should start\n\t\t *  @returns {Tone.NoiseSynth} this\n\t\t */\n\t    Tone.NoiseSynth.prototype.triggerRelease = function (time) {\n\t        this.envelope.triggerRelease(time);\n\t        this.noise.stop(time + this.envelope.release);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Sync the instrument to the Transport. All subsequent calls of\n\t\t * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n\t\t * will be scheduled along the transport.\n\t\t * @example\n\t\t * synth.sync()\n\t\t * //schedule 3 notes when the transport first starts\n\t\t * synth.triggerAttackRelease('8n', 0)\n\t\t * synth.triggerAttackRelease('8n', '8n')\n\t\t * synth.triggerAttackRelease('8n', '4n')\n\t\t * //start the transport to hear the notes\n\t\t * Transport.start()\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t    Tone.NoiseSynth.prototype.sync = function () {\n\t        this._syncMethod('triggerAttack', 0);\n\t        this._syncMethod('triggerRelease', 0);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Trigger the attack and then the release.\n\t\t *  @param  {Time} duration the duration of the note\n\t\t *  @param  {Time} [time=now]     the time of the attack\n\t\t *  @param  {number} [velocity=1] the velocity\n\t\t *  @returns {Tone.NoiseSynth} this\n\t\t */\n\t    Tone.NoiseSynth.prototype.triggerAttackRelease = function (duration, time, velocity) {\n\t        time = this.toSeconds(time);\n\t        duration = this.toSeconds(duration);\n\t        this.triggerAttack(time, velocity);\n\t        this.triggerRelease(time + duration);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.NoiseSynth} this\n\t\t */\n\t    Tone.NoiseSynth.prototype.dispose = function () {\n\t        Tone.Instrument.prototype.dispose.call(this);\n\t        this._writable([\n\t            'noise',\n\t            'envelope'\n\t        ]);\n\t        this.noise.dispose();\n\t        this.noise = null;\n\t        this.envelope.dispose();\n\t        this.envelope = null;\n\t        return this;\n\t    };\n\t    return Tone.NoiseSynth;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Karplus-String string synthesis. Often out of tune.\n\t\t *         Will change when the AudioWorkerNode is available across\n\t\t *         browsers.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Instrument}\n\t\t *  @param {Object} [options] see the defaults\n\t\t *  @example\n\t\t * var plucky = new Tone.PluckSynth().toMaster();\n\t\t * plucky.triggerAttack(\"C4\");\n\t\t */\n\t    Tone.PluckSynth = function (options) {\n\t        options = Tone.defaultArg(options, Tone.PluckSynth.defaults);\n\t        Tone.Instrument.call(this, options);\n\t        /**\n\t\t\t *  @type {Tone.Noise}\n\t\t\t *  @private\n\t\t\t */\n\t        this._noise = new Tone.Noise('pink');\n\t        /**\n\t\t\t *  The amount of noise at the attack.\n\t\t\t *  Nominal range of [0.1, 20]\n\t\t\t *  @type {number}\n\t\t\t */\n\t        this.attackNoise = options.attackNoise;\n\t        /**\n\t\t\t *  the LFCF\n\t\t\t *  @type {Tone.LowpassCombFilter}\n\t\t\t *  @private\n\t\t\t */\n\t        this._lfcf = new Tone.LowpassCombFilter({\n\t            'resonance': options.resonance,\n\t            'dampening': options.dampening\n\t        });\n\t        /**\n\t\t\t *  The resonance control.\n\t\t\t *  @type {NormalRange}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.resonance = this._lfcf.resonance;\n\t        /**\n\t\t\t *  The dampening control. i.e. the lowpass filter frequency of the comb filter\n\t\t\t *  @type {Frequency}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.dampening = this._lfcf.dampening;\n\t        //connections\n\t        this._noise.connect(this._lfcf);\n\t        this._lfcf.connect(this.output);\n\t        this._readOnly([\n\t            'resonance',\n\t            'dampening'\n\t        ]);\n\t    };\n\t    Tone.extend(Tone.PluckSynth, Tone.Instrument);\n\t    /**\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.PluckSynth.defaults = {\n\t        'attackNoise': 1,\n\t        'dampening': 4000,\n\t        'resonance': 0.7\n\t    };\n\t    /**\n\t\t *  Trigger the note.\n\t\t *  @param {Frequency} note The note to trigger.\n\t\t *  @param {Time} [time=now] When the note should be triggered.\n\t\t *  @returns {Tone.PluckSynth} this\n\t\t */\n\t    Tone.PluckSynth.prototype.triggerAttack = function (note, time) {\n\t        note = this.toFrequency(note);\n\t        time = this.toSeconds(time);\n\t        var delayAmount = 1 / note;\n\t        this._lfcf.delayTime.setValueAtTime(delayAmount, time);\n\t        this._noise.start(time);\n\t        this._noise.stop(time + delayAmount * this.attackNoise);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.PluckSynth} this\n\t\t */\n\t    Tone.PluckSynth.prototype.dispose = function () {\n\t        Tone.Instrument.prototype.dispose.call(this);\n\t        this._noise.dispose();\n\t        this._lfcf.dispose();\n\t        this._noise = null;\n\t        this._lfcf = null;\n\t        this._writable([\n\t            'resonance',\n\t            'dampening'\n\t        ]);\n\t        this.dampening = null;\n\t        this.resonance = null;\n\t        return this;\n\t    };\n\t    return Tone.PluckSynth;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.PolySynth handles voice creation and allocation for any\n\t\t *          instruments passed in as the second paramter. PolySynth is\n\t\t *          not a synthesizer by itself, it merely manages voices of\n\t\t *          one of the other types of synths, allowing any of the\n\t\t *          monophonic synthesizers to be polyphonic.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Instrument}\n\t\t *  @param {number|Object} [polyphony=4] The number of voices to create\n\t\t *  @param {function} [voice=Tone.Synth] The constructor of the voices\n\t\t *                                            uses Tone.Synth by default.\n\t\t *  @example\n\t\t * //a polysynth composed of 6 Voices of Synth\n\t\t * var synth = new Tone.PolySynth(6, Tone.Synth).toMaster();\n\t\t * //set the attributes using the set interface\n\t\t * synth.set(\"detune\", -1200);\n\t\t * //play a chord\n\t\t * synth.triggerAttackRelease([\"C4\", \"E4\", \"A4\"], \"4n\");\n\t\t */\n\t    Tone.PolySynth = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'polyphony',\n\t            'voice'\n\t        ], Tone.PolySynth);\n\t        Tone.Instrument.call(this, options);\n\t        options = Tone.defaultArg(options, Tone.Instrument.defaults);\n\t        //max polyphony\n\t        options.polyphony = Math.min(Tone.PolySynth.MAX_POLYPHONY, options.polyphony);\n\t        /**\n\t\t\t *  the array of voices\n\t\t\t *  @type {Array}\n\t\t\t */\n\t        this.voices = new Array(options.polyphony);\n\t        /**\n\t\t\t *  The queue of voices with data about last trigger\n\t\t\t *  and the triggered note\n\t\t\t *  @private\n\t\t\t *  @type {Array}\n\t\t\t */\n\t        this._triggers = new Array(options.polyphony);\n\t        /**\n\t\t\t *  The detune in cents\n\t\t\t *  @type {Cents}\n\t\t\t *  @signal\n\t\t\t */\n\t        this.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\t        this._readOnly('detune');\n\t        //create the voices\n\t        for (var i = 0; i < options.polyphony; i++) {\n\t            var v = new options.voice(arguments[2], arguments[3]);\n\t            if (!(v instanceof Tone.Monophonic)) {\n\t                throw new Error('Synth constructor must be instance of Tone.Monophonic');\n\t            }\n\t            this.voices[i] = v;\n\t            v.connect(this.output);\n\t            if (v.hasOwnProperty('detune')) {\n\t                this.detune.connect(v.detune);\n\t            }\n\t            this._triggers[i] = {\n\t                release: -1,\n\t                note: null,\n\t                voice: v\n\t            };\n\t        }\n\t    };\n\t    Tone.extend(Tone.PolySynth, Tone.Instrument);\n\t    /**\n\t\t *  the defaults\n\t\t *  @const\n\t\t *  @static\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.PolySynth.defaults = {\n\t        'polyphony': 4,\n\t        'volume': 0,\n\t        'detune': 0,\n\t        'voice': Tone.Synth\n\t    };\n\t    /**\n\t\t *  Trigger the attack portion of the note\n\t\t *  @param  {Frequency|Array} notes The notes to play. Accepts a single\n\t\t *                                  Frequency or an array of frequencies.\n\t\t *  @param  {Time} [time=now]  The start time of the note.\n\t\t *  @param {number} [velocity=1] The velocity of the note.\n\t\t *  @returns {Tone.PolySynth} this\n\t\t *  @example\n\t\t * //trigger a chord immediately with a velocity of 0.2\n\t\t * poly.triggerAttack([\"Ab3\", \"C4\", \"F5\"], undefined, 0.2);\n\t\t */\n\t    Tone.PolySynth.prototype.triggerAttack = function (notes, time, velocity) {\n\t        if (!Array.isArray(notes)) {\n\t            notes = [notes];\n\t        }\n\t        time = this.toSeconds(time);\n\t        for (var i = 0; i < notes.length; i++) {\n\t            var val = notes[i];\n\t            //trigger the oldest voice\n\t            var oldest = this._triggers[0];\n\t            for (var j = 1; j < this._triggers.length; j++) {\n\t                if (this._triggers[j].release < oldest.release) {\n\t                    oldest = this._triggers[j];\n\t                }\n\t            }\n\t            oldest.release = Infinity;\n\t            oldest.note = JSON.stringify(val);\n\t            oldest.voice.triggerAttack(val, time, velocity);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Trigger the attack and release after the specified duration\n\t\t *\n\t\t *  @param  {Frequency|Array} notes The notes to play. Accepts a single\n\t\t *                                  Frequency or an array of frequencies.\n\t\t *  @param  {Time} duration the duration of the note\n\t\t *  @param  {Time} [time=now]     if no time is given, defaults to now\n\t\t *  @param  {number} [velocity=1] the velocity of the attack (0-1)\n\t\t *  @returns {Tone.PolySynth} this\n\t\t *  @example\n\t\t * //trigger a chord for a duration of a half note\n\t\t * poly.triggerAttackRelease([\"Eb3\", \"G4\", \"C5\"], \"2n\");\n\t\t *  @example\n\t\t * //can pass in an array of durations as well\n\t\t * poly.triggerAttackRelease([\"Eb3\", \"G4\", \"C5\"], [\"2n\", \"4n\", \"4n\"]);\n\t\t */\n\t    Tone.PolySynth.prototype.triggerAttackRelease = function (notes, duration, time, velocity) {\n\t        time = this.toSeconds(time);\n\t        this.triggerAttack(notes, time, velocity);\n\t        if (Tone.isArray(duration) && Tone.isArray(notes)) {\n\t            for (var i = 0; i < notes.length; i++) {\n\t                var d = duration[Math.min(i, duration.length - 1)];\n\t                this.triggerRelease(notes[i], time + this.toSeconds(d));\n\t            }\n\t        } else {\n\t            this.triggerRelease(notes, time + this.toSeconds(duration));\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Trigger the release of the note. Unlike monophonic instruments,\n\t\t *  a note (or array of notes) needs to be passed in as the first argument.\n\t\t *  @param  {Frequency|Array} notes The notes to play. Accepts a single\n\t\t *                                  Frequency or an array of frequencies.\n\t\t *  @param  {Time} [time=now]  When the release will be triggered.\n\t\t *  @returns {Tone.PolySynth} this\n\t\t *  @example\n\t\t * poly.triggerRelease([\"Ab3\", \"C4\", \"F5\"], \"+2n\");\n\t\t */\n\t    Tone.PolySynth.prototype.triggerRelease = function (notes, time) {\n\t        if (!Array.isArray(notes)) {\n\t            notes = [notes];\n\t        }\n\t        time = this.toSeconds(time);\n\t        for (var i = 0; i < notes.length; i++) {\n\t            //get the voice\n\t            var stringified = JSON.stringify(notes[i]);\n\t            for (var v = 0; v < this._triggers.length; v++) {\n\t                var desc = this._triggers[v];\n\t                if (desc.note === stringified && desc.release > time) {\n\t                    desc.voice.triggerRelease(time);\n\t                    desc.release = time;\n\t                }\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * Sync the instrument to the Transport. All subsequent calls of\n\t\t * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n\t\t * will be scheduled along the transport.\n\t\t * @example\n\t\t * synth.sync()\n\t\t * //schedule 3 notes when the transport first starts\n\t\t * synth.triggerAttackRelease('8n', 0)\n\t\t * synth.triggerAttackRelease('8n', '8n')\n\t\t * synth.triggerAttackRelease('8n', '4n')\n\t\t * //start the transport to hear the notes\n\t\t * Transport.start()\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t    Tone.PolySynth.prototype.sync = function () {\n\t        this._syncMethod('triggerAttack', 1);\n\t        this._syncMethod('triggerRelease', 1);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Set a member/attribute of the voices.\n\t\t *  @param {Object|string} params\n\t\t *  @param {number=} value\n\t\t *  @param {Time=} rampTime\n\t\t *  @returns {Tone.PolySynth} this\n\t\t *  @example\n\t\t * poly.set({\n\t\t * \t\"filter\" : {\n\t\t * \t\t\"type\" : \"highpass\"\n\t\t * \t},\n\t\t * \t\"envelope\" : {\n\t\t * \t\t\"attack\" : 0.25\n\t\t * \t}\n\t\t * });\n\t\t */\n\t    Tone.PolySynth.prototype.set = function (params, value, rampTime) {\n\t        for (var i = 0; i < this.voices.length; i++) {\n\t            this.voices[i].set(params, value, rampTime);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Get the synth's attributes. Given no arguments get\n\t\t *  will return all available object properties and their corresponding\n\t\t *  values. Pass in a single attribute to retrieve or an array\n\t\t *  of attributes. The attribute strings can also include a \".\"\n\t\t *  to access deeper properties.\n\t\t *  @param {Array=} params the parameters to get, otherwise will return\n\t\t *  \t\t\t\t\t   all available.\n\t\t */\n\t    Tone.PolySynth.prototype.get = function (params) {\n\t        return this.voices[0].get(params);\n\t    };\n\t    /**\n\t\t *  Trigger the release portion of all the currently active voices.\n\t\t *  @param {Time} [time=now] When the notes should be released.\n\t\t *  @return {Tone.PolySynth} this\n\t\t */\n\t    Tone.PolySynth.prototype.releaseAll = function (time) {\n\t        time = this.toSeconds(time);\n\t        for (var i = 0; i < this._triggers.length; i++) {\n\t            var desc = this._triggers[i];\n\t            if (desc.release > time) {\n\t                desc.release = time;\n\t                desc.voice.triggerRelease(time);\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Clean up.\n\t\t *  @returns {Tone.PolySynth} this\n\t\t */\n\t    Tone.PolySynth.prototype.dispose = function () {\n\t        Tone.Instrument.prototype.dispose.call(this);\n\t        for (var i = 0; i < this.voices.length; i++) {\n\t            this.voices[i].dispose();\n\t            this.voices[i] = null;\n\t        }\n\t        this._writable('detune');\n\t        this.detune.dispose();\n\t        this.detune = null;\n\t        this.voices = null;\n\t        this._triggers = null;\n\t        return this;\n\t    };\n\t    /**\n\t\t *  The maximum number of notes that can be allocated\n\t\t *  to a polysynth.\n\t\t *  @type  {Number}\n\t\t *  @static\n\t\t */\n\t    Tone.PolySynth.MAX_POLYPHONY = 20;\n\t    return Tone.PolySynth;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t * @class Automatically interpolates between a set of pitched samples. Pass in an object which maps the note's pitch or midi value to the url, then you can trigger the attack and release of that note like other instruments. By automatically repitching the samples, it is possible to play pitches which were not explicitly included which can save loading time.\n\t\t *        For sample or buffer playback where repitching is not necessary, use [Tone.Player](https://tonejs.github.io/docs/Player).\n\t\t * @param {Object} samples An object of samples mapping either Midi\n\t\t *                         Note Numbers or Scientific Pitch Notation\n\t\t *                         to the url of that sample.\n\t\t * @param {Function=} onload The callback to invoke when all of the samples are loaded.\n\t\t * @param {String=} baseUrl The root URL of all of the samples, which is prepended to all the URLs.\n\t\t * @example\n\t\t * var sampler = new Tone.Sampler({\n\t\t * \t\"C3\" : \"path/to/C3.mp3\",\n\t\t * \t\"D#3\" : \"path/to/Dsharp3.mp3\",\n\t\t * \t\"F#3\" : \"path/to/Fsharp3.mp3\",\n\t\t * \t\"A3\" : \"path/to/A3.mp3\",\n\t\t * }, function(){\n\t\t * \t//sampler will repitch the closest sample\n\t\t * \tsampler.triggerAttack(\"D3\")\n\t\t * })\n\t\t * @extends {Tone.Instrument}\n\t\t */\n\t    Tone.Sampler = function (urls) {\n\t        // shift arguments over one. Those are the remainder of the options\n\t        var args = Array.prototype.slice.call(arguments);\n\t        args.shift();\n\t        var options = Tone.defaults(args, [\n\t            'onload',\n\t            'baseUrl'\n\t        ], Tone.Sampler);\n\t        Tone.Instrument.call(this, options);\n\t        var urlMap = {};\n\t        for (var note in urls) {\n\t            if (Tone.isNote(note)) {\n\t                //convert the note name to MIDI\n\t                var mid = Tone.Frequency(note).toMidi();\n\t                urlMap[mid] = urls[note];\n\t            } else if (!isNaN(parseFloat(note))) {\n\t                //otherwise if it's numbers assume it's midi\n\t                urlMap[note] = urls[note];\n\t            } else {\n\t                throw new Error('Tone.Sampler: url keys must be the note\\'s pitch');\n\t            }\n\t        }\n\t        /**\n\t\t\t * The stored and loaded buffers\n\t\t\t * @type {Tone.Buffers}\n\t\t\t * @private\n\t\t\t */\n\t        this._buffers = new Tone.Buffers(urlMap, options.onload, options.baseUrl);\n\t        /**\n\t\t\t * The object of all currently playing BufferSources\n\t\t\t * @type {Object}\n\t\t\t * @private\n\t\t\t */\n\t        this._activeSources = {};\n\t        /**\n\t\t\t * The envelope applied to the beginning of the sample.\n\t\t\t * @type {Time}\n\t\t\t */\n\t        this.attack = options.attack;\n\t        /**\n\t\t\t * The envelope applied to the end of the envelope.\n\t\t\t * @type {Time}\n\t\t\t */\n\t        this.release = options.release;\n\t    };\n\t    Tone.extend(Tone.Sampler, Tone.Instrument);\n\t    /**\n\t\t * The defaults\n\t\t * @const\n\t\t * @type {Object}\n\t\t */\n\t    Tone.Sampler.defaults = {\n\t        attack: 0,\n\t        release: 0.1,\n\t        onload: Tone.noOp,\n\t        baseUrl: ''\n\t    };\n\t    /**\n\t\t * Returns the difference in steps between the given midi note at the closets sample.\n\t\t * @param  {Midi} midi\n\t\t * @return {Interval}\n\t\t * @private\n\t\t */\n\t    Tone.Sampler.prototype._findClosest = function (midi) {\n\t        //searches within 8 octaves of the given midi note\n\t        var MAX_INTERVAL = 96;\n\t        var interval = 0;\n\t        while (interval < MAX_INTERVAL) {\n\t            // check above and below\n\t            if (this._buffers.has(midi + interval)) {\n\t                return -interval;\n\t            } else if (this._buffers.has(midi - interval)) {\n\t                return interval;\n\t            }\n\t            interval++;\n\t        }\n\t        return null;\n\t    };\n\t    /**\n\t\t * @param  {Frequency} note     The note to play\n\t\t * @param  {Time=} time     When to play the note\n\t\t * @param  {NormalRange=} velocity The velocity to play the sample back.\n\t\t * @return {Tone.Sampler}          this\n\t\t */\n\t    Tone.Sampler.prototype.triggerAttack = function (note, time, velocity) {\n\t        var midi = Tone.Frequency(note).toMidi();\n\t        // find the closest note pitch\n\t        var difference = this._findClosest(midi);\n\t        if (difference !== null) {\n\t            var closestNote = midi - difference;\n\t            var buffer = this._buffers.get(closestNote);\n\t            // play that note\n\t            var source = new Tone.BufferSource({\n\t                'buffer': buffer,\n\t                'playbackRate': Tone.intervalToFrequencyRatio(difference),\n\t                'fadeIn': this.attack,\n\t                'fadeOut': this.release,\n\t                'curve': 'exponential'\n\t            }).connect(this.output);\n\t            source.start(time, 0, buffer.duration, velocity);\n\t            // add it to the active sources\n\t            if (!Tone.isArray(this._activeSources[midi])) {\n\t                this._activeSources[midi] = [];\n\t            }\n\t            this._activeSources[midi].push({\n\t                note: midi,\n\t                source: source\n\t            });\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * @param  {Frequency} note     The note to release.\n\t\t * @param  {Time=} time     \tWhen to release the note.\n\t\t * @return {Tone.Sampler}\tthis\n\t\t */\n\t    Tone.Sampler.prototype.triggerRelease = function (note, time) {\n\t        var midi = Tone.Frequency(note).toMidi();\n\t        // find the note\n\t        if (this._activeSources[midi] && this._activeSources[midi].length) {\n\t            var source = this._activeSources[midi].shift().source;\n\t            time = this.toSeconds(time);\n\t            source.stop(time + this.release, this.release);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * Release all currently active notes.\n\t\t * @param  {Time=} time     \tWhen to release the notes.\n\t\t * @return {Tone.Sampler}\tthis\n\t\t */\n\t    Tone.Sampler.prototype.releaseAll = function (time) {\n\t        time = this.toSeconds(time);\n\t        for (var note in this._activeSources) {\n\t            var sources = this._activeSources[note];\n\t            while (sources.length) {\n\t                var source = sources.shift().source;\n\t                source.stop(time + this.release, this.release);\n\t            }\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * Sync the instrument to the Transport. All subsequent calls of\n\t\t * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n\t\t * will be scheduled along the transport.\n\t\t * @example\n\t\t * synth.sync()\n\t\t * //schedule 3 notes when the transport first starts\n\t\t * synth.triggerAttackRelease('8n', 0)\n\t\t * synth.triggerAttackRelease('8n', '8n')\n\t\t * synth.triggerAttackRelease('8n', '4n')\n\t\t * //start the transport to hear the notes\n\t\t * Transport.start()\n\t\t * @returns {Tone.Instrument} this\n\t\t */\n\t    Tone.Sampler.prototype.sync = function () {\n\t        this._syncMethod('triggerAttack', 1);\n\t        this._syncMethod('triggerRelease', 1);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Invoke the attack phase, then after the duration, invoke the release.\n\t\t * @param  {Frequency} note     The note to play\n\t\t * @param  {Time} duration The time the note should be held\n\t\t * @param  {Time=} time     When to start the attack\n\t\t * @param  {NormalRange} [velocity=1] The velocity of the attack\n\t\t * @return {Tone.Sampler}          this\n\t\t */\n\t    Tone.Sampler.prototype.triggerAttackRelease = function (note, duration, time, velocity) {\n\t        time = this.toSeconds(time);\n\t        duration = this.toSeconds(duration);\n\t        this.triggerAttack(note, time, velocity);\n\t        this.triggerRelease(note, time + duration);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Add a note to the sampler.\n\t\t *  @param  {Note|Midi}   note      The buffer's pitch.\n\t\t *  @param  {String|Tone.Buffer|Audiobuffer}  url  Either the url of the bufer,\n\t\t *                                                 or a buffer which will be added\n\t\t *                                                 with the given name.\n\t\t *  @param  {Function=}  callback  The callback to invoke\n\t\t *                                 when the url is loaded.\n\t\t */\n\t    Tone.Sampler.prototype.add = function (note, url, callback) {\n\t        if (Tone.isNote(note)) {\n\t            //convert the note name to MIDI\n\t            var mid = Tone.Frequency(note).toMidi();\n\t            this._buffers.add(mid, url, callback);\n\t        } else if (!isNaN(parseFloat(note))) {\n\t            //otherwise if it's numbers assume it's midi\n\t            this._buffers.add(note, url, callback);\n\t        } else {\n\t            throw new Error('Tone.Sampler: note must be the note\\'s pitch. Instead got ' + note);\n\t        }\n\t    };\n\t    /**\n\t\t * If the buffers are loaded or not\n\t\t * @memberOf Tone.Sampler#\n\t\t * @type {Boolean}\n\t\t * @name loaded\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Sampler.prototype, 'loaded', {\n\t        get: function () {\n\t            return this._buffers.loaded;\n\t        }\n\t    });\n\t    /**\n\t\t * Clean up\n\t\t * @return {Tone.Sampler} this\n\t\t */\n\t    Tone.Sampler.prototype.dispose = function () {\n\t        Tone.Instrument.prototype.dispose.call(this);\n\t        this._buffers.dispose();\n\t        this._buffers = null;\n\t        for (var midi in this._activeSources) {\n\t            this._activeSources[midi].forEach(function (event) {\n\t                event.source.dispose();\n\t            });\n\t        }\n\t        this._activeSources = null;\n\t        return this;\n\t    };\n\t    return Tone.Sampler;\n\t});\n\tModule(function (Tone) {\n\t    if (Tone.supported) {\n\t        if (!OscillatorNode.prototype.setPeriodicWave) {\n\t            OscillatorNode.prototype.setPeriodicWave = OscillatorNode.prototype.setWaveTable;\n\t        }\n\t        if (!AudioContext.prototype.createPeriodicWave) {\n\t            AudioContext.prototype.createPeriodicWave = AudioContext.prototype.createWaveTable;\n\t        }\n\t    }\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Maps a NormalRange [0, 1] to an AudioRange [-1, 1]. \n\t\t *         See also Tone.AudioToGain. \n\t\t *\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @constructor\n\t\t *  @example\n\t\t * var g2a = new Tone.GainToAudio();\n\t\t */\n\t    Tone.GainToAudio = function () {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  @type {WaveShaperNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._norm = this.input = this.output = new Tone.WaveShaper(function (x) {\n\t            return Math.abs(x) * 2 - 1;\n\t        });\n\t    };\n\t    Tone.extend(Tone.GainToAudio, Tone.SignalBase);\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.GainToAudio} this\n\t\t */\n\t    Tone.GainToAudio.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._norm.dispose();\n\t        this._norm = null;\n\t        return this;\n\t    };\n\t    return Tone.GainToAudio;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class Normalize takes an input min and max and maps it linearly to NormalRange [0,1]\n\t\t *\n\t\t *  @extends {Tone.SignalBase}\n\t\t *  @constructor\n\t\t *  @param {number} inputMin the min input value\n\t\t *  @param {number} inputMax the max input value\n\t\t *  @example\n\t\t * var norm = new Tone.Normalize(2, 4);\n\t\t * var sig = new Tone.Signal(3).connect(norm);\n\t\t * //output of norm is 0.5. \n\t\t */\n\t    Tone.Normalize = function (inputMin, inputMax) {\n\t        Tone.SignalBase.call(this);\n\t        /**\n\t\t\t *  the min input value\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._inputMin = Tone.defaultArg(inputMin, 0);\n\t        /**\n\t\t\t *  the max input value\n\t\t\t *  @type {number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._inputMax = Tone.defaultArg(inputMax, 1);\n\t        /**\n\t\t\t *  subtract the min from the input\n\t\t\t *  @type {Tone.Add}\n\t\t\t *  @private\n\t\t\t */\n\t        this._sub = this.input = new Tone.Add(0);\n\t        /**\n\t\t\t *  divide by the difference between the input and output\n\t\t\t *  @type {Tone.Multiply}\n\t\t\t *  @private\n\t\t\t */\n\t        this._div = this.output = new Tone.Multiply(1);\n\t        this._sub.connect(this._div);\n\t        this._setRange();\n\t    };\n\t    Tone.extend(Tone.Normalize, Tone.SignalBase);\n\t    /**\n\t\t * The minimum value the input signal will reach.\n\t\t * @memberOf Tone.Normalize#\n\t\t * @type {number}\n\t\t * @name min\n\t\t */\n\t    Object.defineProperty(Tone.Normalize.prototype, 'min', {\n\t        get: function () {\n\t            return this._inputMin;\n\t        },\n\t        set: function (min) {\n\t            this._inputMin = min;\n\t            this._setRange();\n\t        }\n\t    });\n\t    /**\n\t\t * The maximum value the input signal will reach.\n\t\t * @memberOf Tone.Normalize#\n\t\t * @type {number}\n\t\t * @name max\n\t\t */\n\t    Object.defineProperty(Tone.Normalize.prototype, 'max', {\n\t        get: function () {\n\t            return this._inputMax;\n\t        },\n\t        set: function (max) {\n\t            this._inputMax = max;\n\t            this._setRange();\n\t        }\n\t    });\n\t    /**\n\t\t *  set the values\n\t\t *  @private\n\t\t */\n\t    Tone.Normalize.prototype._setRange = function () {\n\t        this._sub.value = -this._inputMin;\n\t        this._div.value = 1 / (this._inputMax - this._inputMin);\n\t    };\n\t    /**\n\t\t *  clean up\n\t\t *  @returns {Tone.Normalize} this\n\t\t */\n\t    Tone.Normalize.prototype.dispose = function () {\n\t        Tone.SignalBase.prototype.dispose.call(this);\n\t        this._sub.dispose();\n\t        this._sub = null;\n\t        this._div.dispose();\n\t        this._div = null;\n\t        return this;\n\t    };\n\t    return Tone.Normalize;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t * @class Tone.TransportTimelineSignal extends Tone.Signal, but adds the ability to synchronize the signal to the signal to the Tone.Transport\n\t\t * @extends {Tone.Signal}\n\t\t */\n\t    Tone.TransportTimelineSignal = function () {\n\t        Tone.Signal.apply(this, arguments);\n\t        /**\n\t\t\t * The real signal output\n\t\t\t * @type {Tone.Signal}\n\t\t\t * @private\n\t\t\t */\n\t        this.output = this._outputSig = new Tone.Signal(this._initialValue);\n\t        /**\n\t\t\t * Keep track of the last value. (small optimization)\n\t\t\t * @private\n\t\t\t * @type {Number}\n\t\t\t */\n\t        this._lastVal = this.value;\n\t        /**\n\t\t\t * The event id of the tick update loop\n\t\t\t * @private\n\t\t\t * @type {Number}\n\t\t\t */\n\t        this._synced = Tone.Transport.scheduleRepeat(this._onTick.bind(this), '1i');\n\t        /**\n\t\t\t * A bound version of the anchor value methods\n\t\t\t * @type {Function}\n\t\t\t * @private\n\t\t\t */\n\t        this._bindAnchorValue = this._anchorValue.bind(this);\n\t        Tone.Transport.on('start stop pause', this._bindAnchorValue);\n\t        this._events.memory = Infinity;\n\t    };\n\t    Tone.extend(Tone.TransportTimelineSignal, Tone.Signal);\n\t    /**\n\t\t * Callback which is invoked every tick.\n\t\t * @private\n\t\t * @param  {Number} time\n\t\t * @return {Tone.TransportTimelineSignal}      this\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype._onTick = function (time) {\n\t        var val = this.getValueAtTime(Tone.Transport.seconds);\n\t        if (this._lastVal !== val) {\n\t            this._lastVal = val;\n\t            //approximate ramp curves with linear ramps\n\t            this._outputSig.linearRampToValueAtTime(val, time);\n\t        }\n\t    };\n\t    /**\n\t\t * Anchor the value at the start and stop of the Transport\n\t\t * @param  {Number} time The time of the event\n\t\t * @return {Tone.TransportTimelineSignal}      this\n\t\t * @private\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype._anchorValue = function (time) {\n\t        var val = this.getValueAtTime(Tone.Transport.seconds);\n\t        this._lastVal = val;\n\t        this._outputSig.cancelScheduledValues(time);\n\t        this._outputSig.setValueAtTime(val, time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Get the scheduled value at the given time. This will\n\t\t *  return the unconverted (raw) value.\n\t\t *  @param  {TransportTime}  time  The time in seconds.\n\t\t *  @return  {Number}  The scheduled value at the given time.\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype.getValueAtTime = function (time) {\n\t        time = Tone.TransportTime(time);\n\t        return Tone.Signal.prototype.getValueAtTime.call(this, time);\n\t    };\n\t    /**\n\t\t * Set the output of the signal at the given time\n\t\t * @param  {Number} value The value to change to at the given time\n\t\t * @param  {TransportTime} time  The time to change the signal\n\t\t * @return {Tone.TransportTimelineSignal}       this\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype.setValueAtTime = function (value, time) {\n\t        time = Tone.TransportTime(time);\n\t        Tone.Signal.prototype.setValueAtTime.call(this, value, time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Linear ramp to the given value from the previous scheduled point to the given value\n\t\t * @param  {Number} value The value to change to at the given time\n\t\t * @param  {TransportTime} time  The time to change the signal\n\t\t * @return {Tone.TransportTimelineSignal}       this\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype.linearRampToValueAtTime = function (value, time) {\n\t        time = Tone.TransportTime(time);\n\t        Tone.Signal.prototype.linearRampToValueAtTime.call(this, value, time);\n\t        return this;\n\t    };\n\t    /**\n\t\t * Exponential ramp to the given value from the previous scheduled point to the given value\n\t\t * @param  {Number} value The value to change to at the given time\n\t\t * @param  {TransportTime} time  The time to change the signal\n\t\t * @return {Tone.TransportTimelineSignal}       this\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype.exponentialRampToValueAtTime = function (value, time) {\n\t        time = Tone.TransportTime(time);\n\t        Tone.Signal.prototype.exponentialRampToValueAtTime.call(this, value, time);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Start exponentially approaching the target value at the given time with\n\t\t *  a rate having the given time constant.\n\t\t *  @param {number} value\n\t\t *  @param {TransportTime} startTime\n\t\t *  @param {number} timeConstant\n\t\t * @return {Tone.TransportTimelineSignal}       this\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype.setTargetAtTime = function (value, startTime, timeConstant) {\n\t        startTime = Tone.TransportTime(startTime);\n\t        Tone.Signal.prototype.setTargetAtTime.call(this, value, startTime, timeConstant);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Cancels all scheduled parameter changes with times greater than or\n\t\t *  equal to startTime.\n\t\t *  @param  {TransportTime} startTime\n\t\t *  @returns {Tone.Param} this\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype.cancelScheduledValues = function (startTime) {\n\t        startTime = Tone.TransportTime(startTime);\n\t        Tone.Signal.prototype.cancelScheduledValues.call(this, startTime);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Set an array of arbitrary values starting at the given time for the given duration.\n\t\t *  @param {Float32Array} values\n\t\t *  @param {Time} startTime\n\t\t *  @param {Time} duration\n\t\t *  @param {NormalRange} [scaling=1] If the values in the curve should be scaled by some value\n\t\t *  @returns {Tone.Signal} this\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype.setValueCurveAtTime = function (values, startTime, duration, scaling) {\n\t        startTime = Tone.TransportTime(startTime);\n\t        duration = Tone.TransportTime(duration);\n\t        Tone.Signal.prototype.setValueCurveAtTime.call(this, values, startTime, duration, scaling);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  This is similar to [cancelScheduledValues](#cancelScheduledValues) except\n\t\t *  it holds the automated value at time until the next automated event.\n\t\t *  @param  {Time} time\n\t\t *  @returns {Tone.TransportTimelineSignal} this\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype.cancelAndHoldAtTime = function (time) {\n\t        return Tone.Signal.prototype.cancelAndHoldAtTime.call(this, Tone.TransportTime(time));\n\t    };\n\t    /**\n\t\t * Dispose and disconnect\n\t\t * @return {Tone.TransportTimelineSignal} this\n\t\t */\n\t    Tone.TransportTimelineSignal.prototype.dispose = function () {\n\t        Tone.Transport.clear(this._synced);\n\t        Tone.Transport.off('start stop pause', this._syncedCallback);\n\t        this._events.cancel(0);\n\t        Tone.Signal.prototype.dispose.call(this);\n\t        this._outputSig.dispose();\n\t        this._outputSig = null;\n\t    };\n\t    return Tone.TransportTimelineSignal;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t * @class Tone.GrainPlayer implements [granular synthesis](https://en.wikipedia.org/wiki/Granular_synthesis).\n\t\t *        Granular Synthesis enables you to adjust pitch and playback rate independently. The grainSize is the\n\t\t *        amount of time each small chunk of audio is played for and the overlap is the\n\t\t *        amount of crossfading transition time between successive grains.\n\t\t * @extends {Tone.Source}\n\t\t * @param {String|Tone.Buffer} url\tThe url to load, or the Tone.Buffer to play.\n\t\t * @param {Function=} callback The callback to invoke after the url is loaded.\n\t\t */\n\t    Tone.GrainPlayer = function () {\n\t        var options = Tone.defaults(arguments, [\n\t            'url',\n\t            'onload'\n\t        ], Tone.GrainPlayer);\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  The audio buffer belonging to the player.\n\t\t\t *  @type  {Tone.Buffer}\n\t\t\t */\n\t        this.buffer = new Tone.Buffer(options.url, options.onload);\n\t        /**\n\t\t\t *  Create a repeating tick to schedule\n\t\t\t *  the grains.\n\t\t\t *  @type  {Tone.Clock}\n\t\t\t *  @private\n\t\t\t */\n\t        this._clock = new Tone.Clock(this._tick.bind(this), options.grainSize);\n\t        /**\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._loopStart = 0;\n\t        /**\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._loopEnd = 0;\n\t        /**\n\t\t\t * All of the currently playing BufferSources\n\t\t\t * @type {Array}\n\t\t\t * @private\n\t\t\t */\n\t        this._activeSources = [];\n\t        /**\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._playbackRate = options.playbackRate;\n\t        /**\n\t\t\t *  @type  {Number}\n\t\t\t *  @private\n\t\t\t */\n\t        this._grainSize = options.grainSize;\n\t        /**\n\t\t\t *  @private\n\t\t\t *  @type {Number}\n\t\t\t */\n\t        this._overlap = options.overlap;\n\t        /**\n\t\t\t *  Adjust the pitch independently of the playbackRate.\n\t\t\t *  @type  {Cents}\n\t\t\t */\n\t        this.detune = options.detune;\n\t        //setup\n\t        this.overlap = options.overlap;\n\t        this.loop = options.loop;\n\t        this.playbackRate = options.playbackRate;\n\t        this.grainSize = options.grainSize;\n\t        this.loopStart = options.loopStart;\n\t        this.loopEnd = options.loopEnd;\n\t        this.reverse = options.reverse;\n\t        this._clock.on('stop', this._onstop.bind(this));\n\t    };\n\t    Tone.extend(Tone.GrainPlayer, Tone.Source);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.GrainPlayer.defaults = {\n\t        'onload': Tone.noOp,\n\t        'overlap': 0.1,\n\t        'grainSize': 0.2,\n\t        'playbackRate': 1,\n\t        'detune': 0,\n\t        'loop': false,\n\t        'loopStart': 0,\n\t        'loopEnd': 0,\n\t        'reverse': false\n\t    };\n\t    /**\n\t\t *  Play the buffer at the given startTime. Optionally add an offset\n\t\t *  and/or duration which will play the buffer from a position\n\t\t *  within the buffer for the given duration.\n\t\t *\n\t\t *  @param  {Time} [startTime=now] When the player should start.\n\t\t *  @param  {Time} [offset=0] The offset from the beginning of the sample\n\t\t *                                 to start at.\n\t\t *  @param  {Time=} duration How long the sample should play. If no duration\n\t\t *                                is given, it will default to the full length\n\t\t *                                of the sample (minus any offset)\n\t\t *  @returns {Tone.GrainPlayer} this\n\t\t *  @memberOf Tone.GrainPlayer#\n\t\t *  @method start\n\t\t *  @name start\n\t\t */\n\t    /**\n\t\t *  Internal start method\n\t\t *  @param {Time} time\n\t\t *  @param {Time} offset\n\t\t *  @private\n\t\t */\n\t    Tone.GrainPlayer.prototype._start = function (time, offset, duration) {\n\t        offset = Tone.defaultArg(offset, 0);\n\t        offset = this.toSeconds(offset);\n\t        time = this.toSeconds(time);\n\t        this._offset = offset;\n\t        this._clock.start(time);\n\t        if (duration) {\n\t            this.stop(time + this.toSeconds(duration));\n\t        }\n\t    };\n\t    /**\n\t\t *  Internal start method\n\t\t *  @param {Time} time\n\t\t *  @private\n\t\t */\n\t    Tone.GrainPlayer.prototype._stop = function (time) {\n\t        this._clock.stop(time);\n\t    };\n\t    /**\n\t\t * Invoked when the clock is stopped\n\t\t * @param  {Number} time\n\t\t * @private\n\t\t */\n\t    Tone.GrainPlayer.prototype._onstop = function (time) {\n\t        //stop the players\n\t        this._activeSources.forEach(function (source) {\n\t            source.stop(time, 0);\n\t        });\n\t    };\n\t    /**\n\t\t *  Invoked on each clock tick. scheduled a new\n\t\t *  grain at this time.\n\t\t *  @param  {Time}  time\n\t\t *  @private\n\t\t */\n\t    Tone.GrainPlayer.prototype._tick = function (time) {\n\t        var fadeIn = this._offset < this._overlap ? 0 : this._overlap;\n\t        var source = new Tone.BufferSource({\n\t            'buffer': this.buffer,\n\t            'fadeIn': fadeIn,\n\t            'fadeOut': this._overlap,\n\t            'loop': this.loop,\n\t            'loopStart': this._loopStart,\n\t            'loopEnd': this._loopEnd,\n\t            'playbackRate': Tone.intervalToFrequencyRatio(this.detune / 100)\n\t        }).connect(this.output);\n\t        source.start(time, this._offset);\n\t        this._offset += this.grainSize;\n\t        source.stop(time + this.grainSize);\n\t        //add it to the active sources\n\t        this._activeSources.push(source);\n\t        //remove it when it's done\n\t        source.onended = function () {\n\t            var index = this._activeSources.indexOf(source);\n\t            if (index !== -1) {\n\t                this._activeSources.splice(index, 1);\n\t            }\n\t        }.bind(this);\n\t    };\n\t    /**\n\t\t *  Jump to a specific time and play it.\n\t\t *  @param  {Time}  offset  The offset to jump to.\n\t\t *  @param {Time=} time When to make the jump.\n\t\t *  @return  {Tone.GrainPlayer}  this\n\t\t */\n\t    Tone.GrainPlayer.prototype.seek = function (offset, time) {\n\t        this._offset = this.toSeconds(offset);\n\t        this._tick(this.toSeconds(time));\n\t        return this;\n\t    };\n\t    /**\n\t\t * The playback rate of the sample\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {Positive}\n\t\t * @name playbackRate\n\t\t */\n\t    Object.defineProperty(Tone.GrainPlayer.prototype, 'playbackRate', {\n\t        get: function () {\n\t            return this._playbackRate;\n\t        },\n\t        set: function (rate) {\n\t            this._playbackRate = rate;\n\t            this.grainSize = this._grainSize;\n\t        }\n\t    });\n\t    /**\n\t\t * The loop start time.\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {Time}\n\t\t * @name loopStart\n\t\t */\n\t    Object.defineProperty(Tone.GrainPlayer.prototype, 'loopStart', {\n\t        get: function () {\n\t            return this._loopStart;\n\t        },\n\t        set: function (time) {\n\t            this._loopStart = this.toSeconds(time);\n\t        }\n\t    });\n\t    /**\n\t\t * The loop end time.\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {Time}\n\t\t * @name loopEnd\n\t\t */\n\t    Object.defineProperty(Tone.GrainPlayer.prototype, 'loopEnd', {\n\t        get: function () {\n\t            return this._loopEnd;\n\t        },\n\t        set: function (time) {\n\t            this._loopEnd = this.toSeconds(time);\n\t        }\n\t    });\n\t    /**\n\t\t * The direction the buffer should play in\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {boolean}\n\t\t * @name reverse\n\t\t */\n\t    Object.defineProperty(Tone.GrainPlayer.prototype, 'reverse', {\n\t        get: function () {\n\t            return this.buffer.reverse;\n\t        },\n\t        set: function (rev) {\n\t            this.buffer.reverse = rev;\n\t        }\n\t    });\n\t    /**\n\t\t * The size of each chunk of audio that the\n\t\t * buffer is chopped into and played back at.\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {Time}\n\t\t * @name grainSize\n\t\t */\n\t    Object.defineProperty(Tone.GrainPlayer.prototype, 'grainSize', {\n\t        get: function () {\n\t            return this._grainSize;\n\t        },\n\t        set: function (size) {\n\t            this._grainSize = this.toSeconds(size);\n\t            this._clock.frequency.value = this._playbackRate / this._grainSize;\n\t        }\n\t    });\n\t    /**\n\t\t * This is the duration of the cross-fade between\n\t\t * sucessive grains.\n\t\t * @memberOf Tone.GrainPlayer#\n\t\t * @type {Time}\n\t\t * @name overlap\n\t\t */\n\t    Object.defineProperty(Tone.GrainPlayer.prototype, 'overlap', {\n\t        get: function () {\n\t            return this._overlap;\n\t        },\n\t        set: function (time) {\n\t            this._overlap = this.toSeconds(time);\n\t        }\n\t    });\n\t    /**\n\t\t * Clean up\n\t\t * @return {Tone.GrainPlayer} this\n\t\t */\n\t    Tone.GrainPlayer.prototype.dispose = function () {\n\t        Tone.Source.prototype.dispose.call(this);\n\t        this.buffer.dispose();\n\t        this.buffer = null;\n\t        this._clock.dispose();\n\t        this._clock = null;\n\t        this._activeSources.forEach(function (source) {\n\t            source.dispose();\n\t        });\n\t        this._activeSources = null;\n\t        return this;\n\t    };\n\t    return Tone.GrainPlayer;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Player is an audio file player with start, loop, and stop functions.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.Source}\n\t\t *  @param {string|AudioBuffer} url Either the AudioBuffer or the url from\n\t\t *                                  which to load the AudioBuffer\n\t\t *  @param {Function=} onload The function to invoke when the buffer is loaded.\n\t\t *                            Recommended to use Tone.Buffer.on('load') instead.\n\t\t *  @example\n\t\t * var player = new Tone.Player(\"./path/to/sample.mp3\").toMaster();\n\t\t * //play as soon as the buffer is loaded\n\t\t * player.autostart = true;\n\t\t */\n\t    Tone.Player = function (url) {\n\t        var options;\n\t        if (url instanceof Tone.Buffer && url.loaded) {\n\t            url = url.get();\n\t            options = Tone.Player.defaults;\n\t        } else {\n\t            options = Tone.defaults(arguments, [\n\t                'url',\n\t                'onload'\n\t            ], Tone.Player);\n\t        }\n\t        Tone.Source.call(this, options);\n\t        /**\n\t\t\t *  If the file should play as soon\n\t\t\t *  as the buffer is loaded.\n\t\t\t *  @type {Boolean}\n\t\t\t *  @example\n\t\t\t * //will play as soon as it's loaded\n\t\t\t * var player = new Tone.Player({\n\t\t\t * \t\"url\" : \"./path/to/sample.mp3\",\n\t\t\t * \t\"autostart\" : true,\n\t\t\t * }).toMaster();\n\t\t\t */\n\t        this.autostart = options.autostart;\n\t        /**\n\t\t\t *  the buffer\n\t\t\t *  @private\n\t\t\t *  @type {Tone.Buffer}\n\t\t\t */\n\t        this._buffer = new Tone.Buffer({\n\t            'url': options.url,\n\t            'onload': this._onload.bind(this, options.onload),\n\t            'reverse': options.reverse\n\t        });\n\t        if (url instanceof AudioBuffer) {\n\t            this._buffer.set(url);\n\t        }\n\t        /**\n\t\t\t *  if the buffer should loop once it's over\n\t\t\t *  @type {Boolean}\n\t\t\t *  @private\n\t\t\t */\n\t        this._loop = options.loop;\n\t        /**\n\t\t\t *  if 'loop' is true, the loop will start at this position\n\t\t\t *  @type {Time}\n\t\t\t *  @private\n\t\t\t */\n\t        this._loopStart = options.loopStart;\n\t        /**\n\t\t\t *  if 'loop' is true, the loop will end at this position\n\t\t\t *  @type {Time}\n\t\t\t *  @private\n\t\t\t */\n\t        this._loopEnd = options.loopEnd;\n\t        /**\n\t\t\t *  the playback rate\n\t\t\t *  @private\n\t\t\t *  @type {Number}\n\t\t\t */\n\t        this._playbackRate = options.playbackRate;\n\t        /**\n\t\t\t *  All of the active buffer source nodes\n\t\t\t *  @type {Array<Tone.BufferSource>}\n\t\t\t *  @private\n\t\t\t */\n\t        this._activeSources = [];\n\t        /**\n\t\t\t *  The elapsed time counter.\n\t\t\t *  @type {Tone.TickSource}\n\t\t\t *  @private\n\t\t\t */\n\t        this._elapsedTime = new Tone.TickSource(options.playbackRate);\n\t        /**\n\t\t\t *  The fadeIn time of the amplitude envelope.\n\t\t\t *  @type {Time}\n\t\t\t */\n\t        this.fadeIn = options.fadeIn;\n\t        /**\n\t\t\t *  The fadeOut time of the amplitude envelope.\n\t\t\t *  @type {Time}\n\t\t\t */\n\t        this.fadeOut = options.fadeOut;\n\t    };\n\t    Tone.extend(Tone.Player, Tone.Source);\n\t    /**\n\t\t *  the default parameters\n\t\t *  @static\n\t\t *  @const\n\t\t *  @type {Object}\n\t\t */\n\t    Tone.Player.defaults = {\n\t        'onload': Tone.noOp,\n\t        'playbackRate': 1,\n\t        'loop': false,\n\t        'autostart': false,\n\t        'loopStart': 0,\n\t        'loopEnd': 0,\n\t        'retrigger': false,\n\t        'reverse': false,\n\t        'fadeIn': 0,\n\t        'fadeOut': 0\n\t    };\n\t    /**\n\t\t *  Load the audio file as an audio buffer.\n\t\t *  Decodes the audio asynchronously and invokes\n\t\t *  the callback once the audio buffer loads.\n\t\t *  Note: this does not need to be called if a url\n\t\t *  was passed in to the constructor. Only use this\n\t\t *  if you want to manually load a new url.\n\t\t * @param {string} url The url of the buffer to load.\n\t\t *                     Filetype support depends on the\n\t\t *                     browser.\n\t\t *  @param  {Function=} callback The function to invoke once\n\t\t *                               the sample is loaded.\n\t\t *  @returns {Promise}\n\t\t */\n\t    Tone.Player.prototype.load = function (url, callback) {\n\t        return this._buffer.load(url, this._onload.bind(this, callback));\n\t    };\n\t    /**\n\t\t * Internal callback when the buffer is loaded.\n\t\t * @private\n\t\t */\n\t    Tone.Player.prototype._onload = function (callback) {\n\t        callback = Tone.defaultArg(callback, Tone.noOp);\n\t        callback(this);\n\t        if (this.autostart) {\n\t            this.start();\n\t        }\n\t    };\n\t    /**\n\t\t * Internal callback when the buffer is done playing.\n\t\t * @private\n\t\t */\n\t    Tone.Player.prototype._onSourceEnd = function (source) {\n\t        var index = this._activeSources.indexOf(source);\n\t        this._activeSources.splice(index, 1);\n\t    };\n\t    /**\n\t\t *  Play the buffer at the given startTime. Optionally add an offset\n\t\t *  and/or duration which will play the buffer from a position\n\t\t *  within the buffer for the given duration.\n\t\t *\n\t\t *  @param  {Time} [startTime=now] When the player should start.\n\t\t *  @param  {Time} [offset=0] The offset from the beginning of the sample\n\t\t *                                 to start at.\n\t\t *  @param  {Time=} duration How long the sample should play. If no duration\n\t\t *                                is given, it will default to the full length\n\t\t *                                of the sample (minus any offset)\n\t\t *  @returns {Tone.Player} this\n\t\t *  @memberOf Tone.Player#\n\t\t *  @method start\n\t\t *  @name start\n\t\t */\n\t    /**\n\t\t *  Internal start method\n\t\t *  @private\n\t\t */\n\t    Tone.Player.prototype._start = function (startTime, offset, duration) {\n\t        //if it's a loop the default offset is the loopstart point\n\t        if (this._loop) {\n\t            offset = Tone.defaultArg(offset, this._loopStart);\n\t        } else {\n\t            //otherwise the default offset is 0\n\t            offset = Tone.defaultArg(offset, 0);\n\t        }\n\t        //compute the values in seconds\n\t        offset = this.toSeconds(offset);\n\t        var computedDuration = Tone.defaultArg(duration, Math.max(this._buffer.duration - offset, 0));\n\t        computedDuration = this.toSeconds(computedDuration);\n\t        startTime = this.toSeconds(startTime);\n\t        //start the elapsed time counter\n\t        this._elapsedTime.start(startTime, offset);\n\t        //make the source\n\t        var source = new Tone.BufferSource({\n\t            'buffer': this._buffer,\n\t            'loop': this._loop,\n\t            'loopStart': this._loopStart,\n\t            'loopEnd': this._loopEnd,\n\t            'onended': this._onSourceEnd.bind(this),\n\t            'playbackRate': this._playbackRate,\n\t            'fadeIn': this.fadeIn,\n\t            'fadeOut': this.fadeOut\n\t        }).connect(this.output);\n\t        //set the looping properties\n\t        if (!this._loop && !this._synced) {\n\t            //if it's not looping, set the state change at the end of the sample\n\t            this._state.setStateAtTime(Tone.State.Stopped, startTime + computedDuration / this._playbackRate);\n\t        }\n\t        //add it to the array of active sources\n\t        this._activeSources.push(source);\n\t        //start it\n\t        if (this._loop && Tone.isUndef(duration)) {\n\t            source.start(startTime, offset);\n\t        } else {\n\t            source.start(startTime, offset, computedDuration);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Stop playback.\n\t\t *  @private\n\t\t *  @param  {Time} [time=now]\n\t\t *  @returns {Tone.Player} this\n\t\t */\n\t    Tone.Player.prototype._stop = function (time) {\n\t        time = this.toSeconds(time);\n\t        this._elapsedTime.stop(time);\n\t        this._activeSources.forEach(function (source) {\n\t            source.stop(time);\n\t        });\n\t        return this;\n\t    };\n\t    /**\n\t\t * Stop and then restart the player from the beginning (or offset)\n\t\t *  @param  {Time} [startTime=now] When the player should start.\n\t\t *  @param  {Time} [offset=0] The offset from the beginning of the sample\n\t\t *                                 to start at.\n\t\t *  @param  {Time=} duration How long the sample should play. If no duration\n\t\t *                                is given, it will default to the full length\n\t\t *                                of the sample (minus any offset)\n\t\t *  @returns {Tone.Player} this\n\t\t */\n\t    Tone.Player.prototype.restart = function (time, offset, duration) {\n\t        this._stop(time);\n\t        this._start(time, offset, duration);\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Seek to a specific time in the player's buffer. If the\n\t\t *  source is no longer playing at that time, it will stop.\n\t\t *  If you seek to a time that\n\t\t *  @param {Time} offset The time to seek to.\n\t\t *  @param {Time=} time The time for the seek event to occur.\n\t\t *  @return {Tone.Player} this\n\t\t *  @example\n\t\t * source.start(0.2);\n\t\t * source.stop(0.4);\n\t\t */\n\t    Tone.Player.prototype.seek = function (offset, time) {\n\t        time = this.toSeconds(time);\n\t        if (this._state.getValueAtTime(time) === Tone.State.Started) {\n\t            offset = this.toSeconds(offset);\n\t            // if it's currently playing, stop it\n\t            this._stop(time);\n\t            //restart it at the given time\n\t            this._start(time, offset);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Set the loop start and end. Will only loop if loop is\n\t\t *  set to true.\n\t\t *  @param {Time} loopStart The loop end time\n\t\t *  @param {Time} loopEnd The loop end time\n\t\t *  @returns {Tone.Player} this\n\t\t *  @example\n\t\t * //loop 0.1 seconds of the file.\n\t\t * player.setLoopPoints(0.2, 0.3);\n\t\t * player.loop = true;\n\t\t */\n\t    Tone.Player.prototype.setLoopPoints = function (loopStart, loopEnd) {\n\t        this.loopStart = loopStart;\n\t        this.loopEnd = loopEnd;\n\t        return this;\n\t    };\n\t    /**\n\t\t * If loop is true, the loop will start at this position.\n\t\t * @memberOf Tone.Player#\n\t\t * @type {Time}\n\t\t * @name loopStart\n\t\t */\n\t    Object.defineProperty(Tone.Player.prototype, 'loopStart', {\n\t        get: function () {\n\t            return this._loopStart;\n\t        },\n\t        set: function (loopStart) {\n\t            this._loopStart = loopStart;\n\t            //get the current source\n\t            this._activeSources.forEach(function (source) {\n\t                source.loopStart = loopStart;\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t * If loop is true, the loop will end at this position.\n\t\t * @memberOf Tone.Player#\n\t\t * @type {Time}\n\t\t * @name loopEnd\n\t\t */\n\t    Object.defineProperty(Tone.Player.prototype, 'loopEnd', {\n\t        get: function () {\n\t            return this._loopEnd;\n\t        },\n\t        set: function (loopEnd) {\n\t            this._loopEnd = loopEnd;\n\t            //get the current source\n\t            this._activeSources.forEach(function (source) {\n\t                source.loopEnd = loopEnd;\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t * The audio buffer belonging to the player.\n\t\t * @memberOf Tone.Player#\n\t\t * @type {Tone.Buffer}\n\t\t * @name buffer\n\t\t */\n\t    Object.defineProperty(Tone.Player.prototype, 'buffer', {\n\t        get: function () {\n\t            return this._buffer;\n\t        },\n\t        set: function (buffer) {\n\t            this._buffer.set(buffer);\n\t        }\n\t    });\n\t    /**\n\t\t * If the buffer should loop once it's over.\n\t\t * @memberOf Tone.Player#\n\t\t * @type {Boolean}\n\t\t * @name loop\n\t\t */\n\t    Object.defineProperty(Tone.Player.prototype, 'loop', {\n\t        get: function () {\n\t            return this._loop;\n\t        },\n\t        set: function (loop) {\n\t            //if no change, do nothing\n\t            if (this._loop === loop) {\n\t                return;\n\t            }\n\t            this._loop = loop;\n\t            var now = this.now();\n\t            if (!loop) {\n\t                //stop the playback on the next cycle\n\t                this._stopAtNextIteration(now);\n\t            } else {\n\t                //remove the next stopEvent\n\t                var stopEvent = this._state.getNextState(Tone.State.Stopped, now);\n\t                if (stopEvent) {\n\t                    this._activeSources.forEach(function (source) {\n\t                        source.loop = loop;\n\t                    });\n\t                    this._state.cancel(stopEvent.time);\n\t                    this._elapsedTime.cancel(stopEvent.time);\n\t                }\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t *  Schedules a stop event at the next full iteration. Used\n\t\t *  for scheduling stop when the loop state or playbackRate changes\n\t\t *  @param  {Number}  now  The current time\n\t\t *  @private\n\t\t */\n\t    Tone.Player.prototype._stopAtNextIteration = function (now) {\n\t        if (this._state.getValueAtTime(now) === Tone.State.Started) {\n\t            var nextStop = this._state.getNextState(Tone.State.Stopped, now);\n\t            var position = this._elapsedTime.getTicksAtTime(now);\n\t            var iterations = Math.max(Math.ceil(position / this.buffer.duration), 1);\n\t            var stopTime = this._elapsedTime.getTimeOfTick(iterations * this.buffer.duration, nextStop ? nextStop.time - this.sampleTime : Infinity);\n\t            this.stop(stopTime);\n\t        }\n\t    };\n\t    /**\n\t\t * The playback speed. 1 is normal speed. This is not a signal because\n\t\t * Safari and iOS currently don't support playbackRate as a signal.\n\t\t * @memberOf Tone.Player#\n\t\t * @type {Number}\n\t\t * @name playbackRate\n\t\t */\n\t    Object.defineProperty(Tone.Player.prototype, 'playbackRate', {\n\t        get: function () {\n\t            return this._playbackRate;\n\t        },\n\t        set: function (rate) {\n\t            this._playbackRate = rate;\n\t            var now = this.now();\n\t            this._elapsedTime.frequency.setValueAtTime(rate, now);\n\t            //if it's not looping\n\t            if (!this._loop) {\n\t                this._stopAtNextIteration(now);\n\t            }\n\t            //set all the sources\n\t            this._activeSources.forEach(function (source) {\n\t                source.playbackRate.setValueAtTime(rate, now);\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t * The current playback position of the buffer. \n\t\t * @memberOf Tone.Player#\n\t\t * @type {Number}\n\t\t * @name position\n\t\t */\n\t    Object.defineProperty(Tone.Player.prototype, 'position', {\n\t        get: function () {\n\t            var now = this.now();\n\t            if (this._state.getValueAtTime(now) === Tone.State.Started && this.loaded) {\n\t                var duration = this.buffer.duration;\n\t                var position = this._elapsedTime.getTicksAtTime(now);\n\t                return position % duration;\n\t            } else {\n\t                return 0;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * The direction the buffer should play in\n\t\t * @memberOf Tone.Player#\n\t\t * @type {Boolean}\n\t\t * @name reverse\n\t\t */\n\t    Object.defineProperty(Tone.Player.prototype, 'reverse', {\n\t        get: function () {\n\t            return this._buffer.reverse;\n\t        },\n\t        set: function (rev) {\n\t            this._buffer.reverse = rev;\n\t        }\n\t    });\n\t    /**\n\t\t * If all the buffer is loaded\n\t\t * @memberOf Tone.Player#\n\t\t * @type {Boolean}\n\t\t * @name loaded\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Player.prototype, 'loaded', {\n\t        get: function () {\n\t            return this._buffer.loaded;\n\t        }\n\t    });\n\t    /**\n\t\t *  Dispose and disconnect.\n\t\t *  @return {Tone.Player} this\n\t\t */\n\t    Tone.Player.prototype.dispose = function () {\n\t        //disconnect all of the players\n\t        this._activeSources.forEach(function (source) {\n\t            source.dispose();\n\t        });\n\t        this._activeSources = null;\n\t        Tone.Source.prototype.dispose.call(this);\n\t        this._buffer.dispose();\n\t        this._buffer = null;\n\t        this._elapsedTime.dispose();\n\t        this._elapsedTime = null;\n\t        return this;\n\t    };\n\t    return Tone.Player;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.Players combines multiple [Tone.Player](Player) objects.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Object} urls An object mapping a name to a url.\n\t\t *  @param {function=} onload The function to invoke when all buffers are loaded.\n\t\t */\n\t    Tone.Players = function (urls) {\n\t        var args = Array.prototype.slice.call(arguments);\n\t        args.shift();\n\t        var options = Tone.defaults(args, ['onload'], Tone.Players);\n\t        Tone.call(this);\n\t        /**\n\t\t\t *  The output volume node\n\t\t\t *  @type  {Tone.Volume}\n\t\t\t *  @private\n\t\t\t */\n\t        this._volume = this.output = new Tone.Volume(options.volume);\n\t        /**\n\t\t\t * The volume of the output in decibels.\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * source.volume.value = -6;\n\t\t\t */\n\t        this.volume = this._volume.volume;\n\t        this._readOnly('volume');\n\t        //make the output explicitly stereo\n\t        this._volume.output.output.channelCount = 2;\n\t        this._volume.output.output.channelCountMode = 'explicit';\n\t        //mute initially\n\t        this.mute = options.mute;\n\t        /**\n\t\t\t * The container of all of the players\n\t\t\t * @type {Object}\n\t\t\t * @private\n\t\t\t */\n\t        this._players = {};\n\t        /**\n\t\t\t * The loading count\n\t\t\t * @type {Number}\n\t\t\t * @private\n\t\t\t */\n\t        this._loadingCount = 0;\n\t        /**\n\t\t\t * private holder of the fadeIn time\n\t\t\t * @type {Time}\n\t\t\t * @private\n\t\t\t */\n\t        this._fadeIn = options.fadeIn;\n\t        /**\n\t\t\t * private holder of the fadeOut time\n\t\t\t * @type {Time}\n\t\t\t * @private\n\t\t\t */\n\t        this._fadeOut = options.fadeOut;\n\t        //add all of the players\n\t        for (var name in urls) {\n\t            this._loadingCount++;\n\t            this.add(name, urls[name], this._bufferLoaded.bind(this, options.onload));\n\t        }\n\t    };\n\t    Tone.extend(Tone.Players, Tone.AudioNode);\n\t    /**\n\t\t * The default values\n\t\t * @type {Object}\n\t\t */\n\t    Tone.Players.defaults = {\n\t        'volume': 0,\n\t        'mute': false,\n\t        'onload': Tone.noOp,\n\t        'fadeIn': 0,\n\t        'fadeOut': 0\n\t    };\n\t    /**\n\t\t *  A buffer was loaded. decrement the counter.\n\t\t *  @param  {Function}  callback\n\t\t *  @private\n\t\t */\n\t    Tone.Players.prototype._bufferLoaded = function (callback) {\n\t        this._loadingCount--;\n\t        if (this._loadingCount === 0 && callback) {\n\t            callback(this);\n\t        }\n\t    };\n\t    /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.Source#\n\t\t * @type {boolean}\n\t\t * @name mute\n\t\t * @example\n\t\t * //mute the output\n\t\t * source.mute = true;\n\t\t */\n\t    Object.defineProperty(Tone.Players.prototype, 'mute', {\n\t        get: function () {\n\t            return this._volume.mute;\n\t        },\n\t        set: function (mute) {\n\t            this._volume.mute = mute;\n\t        }\n\t    });\n\t    /**\n\t\t * The fadeIn time of the amplitude envelope.\n\t\t * @memberOf Tone.Source#\n\t\t * @type {Time}\n\t\t * @name fadeIn\n\t\t */\n\t    Object.defineProperty(Tone.Players.prototype, 'fadeIn', {\n\t        get: function () {\n\t            return this._fadeIn;\n\t        },\n\t        set: function (fadeIn) {\n\t            this._fadeIn = fadeIn;\n\t            this._forEach(function (player) {\n\t                player.fadeIn = fadeIn;\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t * The fadeOut time of the amplitude envelope.\n\t\t * @memberOf Tone.Source#\n\t\t * @type {Time}\n\t\t * @name fadeOut\n\t\t */\n\t    Object.defineProperty(Tone.Players.prototype, 'fadeOut', {\n\t        get: function () {\n\t            return this._fadeOut;\n\t        },\n\t        set: function (fadeOut) {\n\t            this._fadeOut = fadeOut;\n\t            this._forEach(function (player) {\n\t                player.fadeOut = fadeOut;\n\t            });\n\t        }\n\t    });\n\t    /**\n\t\t * The state of the players object. Returns \"started\" if any of the players are playing.\n\t\t * @memberOf Tone.Players#\n\t\t * @type {String}\n\t\t * @name state\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Players.prototype, 'state', {\n\t        get: function () {\n\t            var playing = false;\n\t            this._forEach(function (player) {\n\t                playing = playing || player.state === Tone.State.Started;\n\t            });\n\t            return playing ? Tone.State.Started : Tone.State.Stopped;\n\t        }\n\t    });\n\t    /**\n\t\t *  True if the buffers object has a buffer by that name.\n\t\t *  @param  {String|Number}  name  The key or index of the\n\t\t *                                 buffer.\n\t\t *  @return  {Boolean}\n\t\t */\n\t    Tone.Players.prototype.has = function (name) {\n\t        return this._players.hasOwnProperty(name);\n\t    };\n\t    /**\n\t\t *  Get a player by name.\n\t\t *  @param  {String}  name  The players name as defined in\n\t\t *                          the constructor object or `add` method.\n\t\t *  @return  {Tone.Player}\n\t\t */\n\t    Tone.Players.prototype.get = function (name) {\n\t        if (this.has(name)) {\n\t            return this._players[name];\n\t        } else {\n\t            throw new Error('Tone.Players: no player named ' + name);\n\t        }\n\t    };\n\t    /**\n\t\t * Iterate over all of the players\n\t\t * @param  {Function} callback\n\t\t * @return {Tone.Players}            this\n\t\t * @private\n\t\t */\n\t    Tone.Players.prototype._forEach = function (callback) {\n\t        for (var playerName in this._players) {\n\t            callback(this._players[playerName], playerName);\n\t        }\n\t        return this;\n\t    };\n\t    /**\n\t\t * If all the buffers are loaded or not\n\t\t * @memberOf Tone.Players#\n\t\t * @type {Boolean}\n\t\t * @name loaded\n\t\t * @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.Players.prototype, 'loaded', {\n\t        get: function () {\n\t            var isLoaded = true;\n\t            this._forEach(function (player) {\n\t                isLoaded = isLoaded && player.loaded;\n\t            });\n\t            return isLoaded;\n\t        }\n\t    });\n\t    /**\n\t\t *  Add a player by name and url to the Players\n\t\t *  @param  {String}    name      A unique name to give the player\n\t\t *  @param  {String|Tone.Buffer|Audiobuffer}  url  Either the url of the bufer,\n\t\t *                                                 or a buffer which will be added\n\t\t *                                                 with the given name.\n\t\t *  @param  {Function=}  callback  The callback to invoke\n\t\t *                                 when the url is loaded.\n\t\t */\n\t    Tone.Players.prototype.add = function (name, url, callback) {\n\t        this._players[name] = new Tone.Player(url, callback).connect(this.output);\n\t        this._players[name].fadeIn = this._fadeIn;\n\t        this._players[name].fadeOut = this._fadeOut;\n\t        return this;\n\t    };\n\t    /**\n\t\t * Stop all of the players at the given time\n\t\t * @param {Time} time The time to stop all of the players.\n\t\t * @return {Tone.Players} this\n\t\t */\n\t    Tone.Players.prototype.stopAll = function (time) {\n\t        this._forEach(function (player) {\n\t            player.stop(time);\n\t        });\n\t    };\n\t    /**\n\t\t *  Dispose and disconnect.\n\t\t *  @return {Tone.Players} this\n\t\t */\n\t    Tone.Players.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this._volume.dispose();\n\t        this._volume = null;\n\t        this._writable('volume');\n\t        this.volume = null;\n\t        this.output = null;\n\t        this._forEach(function (player) {\n\t            player.dispose();\n\t        });\n\t        this._players = null;\n\t        return this;\n\t    };\n\t    return Tone.Players;\n\t});\n\tModule(function (Tone) {\n\t    \n\t    /**\n\t\t *  @class  Tone.UserMedia uses MediaDevices.getUserMedia to open up\n\t\t *          and external microphone or audio input. Check\n\t\t *          [MediaDevices API Support](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia)\n\t\t *          to see which browsers are supported. Access to an external input\n\t\t *          is limited to secure (HTTPS) connections.\n\t\t *\n\t\t *  @constructor\n\t\t *  @extends {Tone.AudioNode}\n\t\t *  @param {Decibels=} volume The level of the input\n\t\t *  @example\n\t\t * //list the inputs and open the third one\n\t\t * var motu = new Tone.UserMedia();\n\t\t *\n\t\t * //opening the input asks the user to activate their mic\n\t\t * motu.open().then(function(){\n\t\t * \t//promise resolves when input is available\n\t\t * });\n\t\t */\n\t    Tone.UserMedia = function () {\n\t        var options = Tone.defaults(arguments, ['volume'], Tone.UserMedia);\n\t        Tone.AudioNode.call(this);\n\t        /**\n\t\t\t *  The MediaStreamNode\n\t\t\t *  @type {MediaStreamAudioSourceNode}\n\t\t\t *  @private\n\t\t\t */\n\t        this._mediaStream = null;\n\t        /**\n\t\t\t *  The media stream created by getUserMedia.\n\t\t\t *  @type {LocalMediaStream}\n\t\t\t *  @private\n\t\t\t */\n\t        this._stream = null;\n\t        /**\n\t\t\t *  The open device\n\t\t\t *  @type  {MediaDeviceInfo}\n\t\t\t *  @private\n\t\t\t */\n\t        this._device = null;\n\t        /**\n\t\t\t *  The output volume node\n\t\t\t *  @type  {Tone.Volume}\n\t\t\t *  @private\n\t\t\t */\n\t        this._volume = this.output = new Tone.Volume(options.volume);\n\t        /**\n\t\t\t * The volume of the output in decibels.\n\t\t\t * @type {Decibels}\n\t\t\t * @signal\n\t\t\t * @example\n\t\t\t * input.volume.value = -6;\n\t\t\t */\n\t        this.volume = this._volume.volume;\n\t        this._readOnly('volume');\n\t        this.mute = options.mute;\n\t    };\n\t    Tone.extend(Tone.UserMedia, Tone.AudioNode);\n\t    /**\n\t\t * the default parameters\n\t\t * @type {Object}\n\t\t */\n\t    Tone.UserMedia.defaults = {\n\t        'volume': 0,\n\t        'mute': false\n\t    };\n\t    /**\n\t\t *  Open the media stream. If a string is passed in, it is assumed\n\t\t *  to be the label or id of the stream, if a number is passed in,\n\t\t *  it is the input number of the stream.\n\t\t *  @param  {String|Number} [labelOrId=\"default\"] The label or id of the audio input media device.\n\t\t *                                                With no argument, the default stream is opened.\n\t\t *  @return {Promise} The promise is resolved when the stream is open.\n\t\t */\n\t    Tone.UserMedia.prototype.open = function (labelOrId) {\n\t        return Tone.UserMedia.enumerateDevices().then(function (devices) {\n\t            var device;\n\t            if (Tone.isNumber(labelOrId)) {\n\t                device = devices[labelOrId];\n\t            } else {\n\t                device = devices.find(function (device) {\n\t                    return device.label === labelOrId || device.deviceId === labelOrId;\n\t                });\n\t                //didn't find a matching device\n\t                if (!device && devices.length > 0) {\n\t                    device = devices[0];\n\t                } else if (!device && Tone.isDefined(labelOrId)) {\n\t                    throw new Error('Tone.UserMedia: no matching device: ' + labelOrId);\n\t                }\n\t            }\n\t            this._device = device;\n\t            //do getUserMedia\n\t            var constraints = {\n\t                audio: {\n\t                    'echoCancellation': false,\n\t                    'sampleRate': this.context.sampleRate\n\t                }\n\t            };\n\t            if (device) {\n\t                constraints.audio.deviceId = device.deviceId;\n\t            }\n\t            return navigator.mediaDevices.getUserMedia(constraints).then(function (stream) {\n\t                //start a new source only if the previous one is closed\n\t                if (!this._stream) {\n\t                    this._stream = stream;\n\t                    //Wrap a MediaStreamSourceNode around the live input stream.\n\t                    this._mediaStream = this.context.createMediaStreamSource(stream);\n\t                    //Connect the MediaStreamSourceNode to a gate gain node\n\t                    this._mediaStream.connect(this.output);\n\t                }\n\t                return this;\n\t            }.bind(this));\n\t        }.bind(this));\n\t    };\n\t    /**\n\t\t *  Close the media stream\n\t\t *  @return {Tone.UserMedia} this\n\t\t */\n\t    Tone.UserMedia.prototype.close = function () {\n\t        if (this._stream) {\n\t            this._stream.getAudioTracks().forEach(function (track) {\n\t                track.stop();\n\t            });\n\t            this._stream = null;\n\t            //remove the old media stream\n\t            this._mediaStream.disconnect();\n\t            this._mediaStream = null;\n\t        }\n\t        this._device = null;\n\t        return this;\n\t    };\n\t    /**\n\t\t *  Returns a promise which resolves with the list of audio input devices available.\n\t\t *  @return {Promise} The promise that is resolved with the devices\n\t\t *  @static\n\t\t *  @example\n\t\t * Tone.UserMedia.enumerateDevices().then(function(devices){\n\t\t * \tconsole.log(devices)\n\t\t * })\n\t\t */\n\t    Tone.UserMedia.enumerateDevices = function () {\n\t        return navigator.mediaDevices.enumerateDevices().then(function (devices) {\n\t            return devices.filter(function (device) {\n\t                return device.kind === 'audioinput';\n\t            });\n\t        });\n\t    };\n\t    /**\n\t\t *  Returns the playback state of the source, \"started\" when the microphone is open\n\t\t *  and \"stopped\" when the mic is closed.\n\t\t *  @type {Tone.State}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.UserMedia#\n\t\t *  @name state\n\t\t */\n\t    Object.defineProperty(Tone.UserMedia.prototype, 'state', {\n\t        get: function () {\n\t            return this._stream && this._stream.active ? Tone.State.Started : Tone.State.Stopped;\n\t        }\n\t    });\n\t    /**\n\t\t * \tReturns an identifier for the represented device that is\n\t\t * \tpersisted across sessions. It is un-guessable by other applications and\n\t\t * \tunique to the origin of the calling application. It is reset when the\n\t\t * \tuser clears cookies (for Private Browsing, a different identifier is\n\t\t * \tused that is not persisted across sessions). Returns undefined when the\n\t\t * \tdevice is not open.\n\t\t *  @type {String}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.UserMedia#\n\t\t *  @name deviceId\n\t\t */\n\t    Object.defineProperty(Tone.UserMedia.prototype, 'deviceId', {\n\t        get: function () {\n\t            if (this._device) {\n\t                return this._device.deviceId;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * \tReturns a group identifier. Two devices have the\n\t\t * \tsame group identifier if they belong to the same physical device.\n\t\t * \tReturns undefined when the device is not open.\n\t\t *  @type {String}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.UserMedia#\n\t\t *  @name groupId\n\t\t */\n\t    Object.defineProperty(Tone.UserMedia.prototype, 'groupId', {\n\t        get: function () {\n\t            if (this._device) {\n\t                return this._device.groupId;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * \tReturns a label describing this device (for example \"Built-in Microphone\").\n\t\t * \tReturns undefined when the device is not open or label is not available\n\t\t * \tbecause of permissions.\n\t\t *  @type {String}\n\t\t *  @readOnly\n\t\t *  @memberOf Tone.UserMedia#\n\t\t *  @name groupId\n\t\t */\n\t    Object.defineProperty(Tone.UserMedia.prototype, 'label', {\n\t        get: function () {\n\t            if (this._device) {\n\t                return this._device.label;\n\t            }\n\t        }\n\t    });\n\t    /**\n\t\t * Mute the output.\n\t\t * @memberOf Tone.UserMedia#\n\t\t * @type {boolean}\n\t\t * @name mute\n\t\t * @example\n\t\t * //mute the output\n\t\t * userMedia.mute = true;\n\t\t */\n\t    Object.defineProperty(Tone.UserMedia.prototype, 'mute', {\n\t        get: function () {\n\t            return this._volume.mute;\n\t        },\n\t        set: function (mute) {\n\t            this._volume.mute = mute;\n\t        }\n\t    });\n\t    /**\n\t\t * Clean up.\n\t\t * @return {Tone.UserMedia} this\n\t\t */\n\t    Tone.UserMedia.prototype.dispose = function () {\n\t        Tone.AudioNode.prototype.dispose.call(this);\n\t        this.close();\n\t        this._writable('volume');\n\t        this._volume.dispose();\n\t        this._volume = null;\n\t        this.volume = null;\n\t        return this;\n\t    };\n\t    /**\n\t\t *  If getUserMedia is supported by the browser.\n\t\t *  @type  {Boolean}\n\t\t *  @memberOf Tone.UserMedia#\n\t\t *  @name supported\n\t\t *  @static\n\t\t *  @readOnly\n\t\t */\n\t    Object.defineProperty(Tone.UserMedia, 'supported', {\n\t        get: function () {\n\t            return Tone.isDefined(navigator.mediaDevices) && Tone.isFunction(navigator.mediaDevices.getUserMedia);\n\t        }\n\t    });\n\t    return Tone.UserMedia;\n\t});\n\tModule(function (Tone) {\n\t    /**\n\t\t *  @class Tone.Midi is a primitive type for encoding Time values.\n\t\t *         Tone.Midi can be constructed with or without the `new` keyword. Tone.Midi can be passed\n\t\t *         into the parameter of any method which takes time as an argument.\n\t\t *  @constructor\n\t\t *  @extends {Tone.Frequency}\n\t\t *  @param  {String|Number}  val    The time value.\n\t\t *  @param  {String=}  units  The units of the value.\n\t\t *  @example\n\t\t * var t = Tone.Midi(\"4n\");//a quarter note\n\t\t */\n\t    Tone.Midi = function (val, units) {\n\t        if (this instanceof Tone.Midi) {\n\t            Tone.Frequency.call(this, val, units);\n\t        } else {\n\t            return new Tone.Midi(val, units);\n\t        }\n\t    };\n\t    Tone.extend(Tone.Midi, Tone.Frequency);\n\t    /**\n\t\t *  The default units if none are given.\n\t\t *  @type {String}\n\t\t *  @private\n\t\t */\n\t    Tone.Midi.prototype._defaultUnits = 'midi';\n\t    /**\n\t\t *  Returns the value of a frequency in the current units\n\t\t *  @param {Frequency} freq\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Midi.prototype._frequencyToUnits = function (freq) {\n\t        return Tone.Frequency.ftom(Tone.Frequency.prototype._frequencyToUnits.call(this, freq));\n\t    };\n\t    /**\n\t\t *  Returns the value of a tick in the current time units\n\t\t *  @param {Ticks} ticks\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Midi.prototype._ticksToUnits = function (ticks) {\n\t        return Tone.Frequency.ftom(Tone.Frequency.prototype._ticksToUnits.call(this, ticks));\n\t    };\n\t    /**\n\t\t *  Return the value of the beats in the current units\n\t\t *  @param {Number} beats\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Midi.prototype._beatsToUnits = function (beats) {\n\t        return Tone.Frequency.ftom(Tone.Frequency.prototype._beatsToUnits.call(this, beats));\n\t    };\n\t    /**\n\t\t *  Returns the value of a second in the current units\n\t\t *  @param {Seconds} seconds\n\t\t *  @return  {Number}\n\t\t *  @private\n\t\t */\n\t    Tone.Midi.prototype._secondsToUnits = function (seconds) {\n\t        return Tone.Frequency.ftom(Tone.Frequency.prototype._secondsToUnits.call(this, seconds));\n\t    };\n\t    /**\n\t\t *  Return the value of the frequency as a MIDI note\n\t\t *  @return  {MIDI}\n\t\t *  @example\n\t\t * Tone.Midi(60).toMidi(); //60\n\t\t */\n\t    Tone.Midi.prototype.toMidi = function () {\n\t        return this.valueOf();\n\t    };\n\t    /**\n\t\t *  Return the value of the frequency as a MIDI note\n\t\t *  @return  {MIDI}\n\t\t *  @example\n\t\t * Tone.Midi(60).toMidi(); //60\n\t\t */\n\t    Tone.Midi.prototype.toFrequency = function () {\n\t        return Tone.Frequency.mtof(this.toMidi());\n\t    };\n\t    /**\n\t\t *  Transposes the frequency by the given number of semitones.\n\t\t *  @param  {Interval}  interval\n\t\t *  @return  {Tone.Frequency} A new transposed frequency\n\t\t *  @example\n\t\t * Tone.Frequency(\"A4\").transpose(3); //\"C5\"\n\t\t */\n\t    Tone.Midi.prototype.transpose = function (interval) {\n\t        return new this.constructor(this.toMidi() + interval);\n\t    };\n\t    return Tone.Midi;\n\t});\n\t\n\treturn Tone;\n}));","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n  byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n  var i = offset || 0;\n  var bth = byteToHex;\n  return bth[buf[i++]] + bth[buf[i++]] +\n          bth[buf[i++]] + bth[buf[i++]] + '-' +\n          bth[buf[i++]] + bth[buf[i++]] + '-' +\n          bth[buf[i++]] + bth[buf[i++]] + '-' +\n          bth[buf[i++]] + bth[buf[i++]] + '-' +\n          bth[buf[i++]] + bth[buf[i++]] +\n          bth[buf[i++]] + bth[buf[i++]] +\n          bth[buf[i++]] + bth[buf[i++]];\n}\n\nmodule.exports = bytesToUuid;\n","// Unique ID creation requires a high quality random # generator.  In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API.  We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues.bind(crypto)) ||\n                      (typeof(msCrypto) != 'undefined' && msCrypto.getRandomValues.bind(msCrypto));\nif (getRandomValues) {\n  // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n  var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n  module.exports = function whatwgRNG() {\n    getRandomValues(rnds8);\n    return rnds8;\n  };\n} else {\n  // Math.random()-based (RNG)\n  //\n  // If all else fails, use Math.random().  It's fast, but is of unspecified\n  // quality.\n  var rnds = new Array(16);\n\n  module.exports = function mathRNG() {\n    for (var i = 0, r; i < 16; i++) {\n      if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n      rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n    }\n\n    return rnds;\n  };\n}\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/broofa/node-uuid for API details\nfunction v1(options, buf, offset) {\n  var i = buf && offset || 0;\n  var b = buf || [];\n\n  options = options || {};\n  var node = options.node || _nodeId;\n  var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n  // node and clockseq need to be initialized to random values if they're not\n  // specified.  We do this lazily to minimize issues related to insufficient\n  // system entropy.  See #189\n  if (node == null || clockseq == null) {\n    var seedBytes = rng();\n    if (node == null) {\n      // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n      node = _nodeId = [\n        seedBytes[0] | 0x01,\n        seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]\n      ];\n    }\n    if (clockseq == null) {\n      // Per 4.2.2, randomize (14 bit) clockseq\n      clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n    }\n  }\n\n  // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n  // (1582-10-15 00:00).  JSNumbers aren't precise enough for this, so\n  // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n  // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n  var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n  // Per 4.2.1.2, use count of uuid's generated during the current clock\n  // cycle to simulate higher resolution clock\n  var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n  // Time since last uuid creation (in msecs)\n  var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n  // Per 4.2.1.2, Bump clockseq on clock regression\n  if (dt < 0 && options.clockseq === undefined) {\n    clockseq = clockseq + 1 & 0x3fff;\n  }\n\n  // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n  // time interval\n  if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n    nsecs = 0;\n  }\n\n  // Per 4.2.1.2 Throw error if too many uuids are requested\n  if (nsecs >= 10000) {\n    throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n  }\n\n  _lastMSecs = msecs;\n  _lastNSecs = nsecs;\n  _clockseq = clockseq;\n\n  // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n  msecs += 12219292800000;\n\n  // `time_low`\n  var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n  b[i++] = tl >>> 24 & 0xff;\n  b[i++] = tl >>> 16 & 0xff;\n  b[i++] = tl >>> 8 & 0xff;\n  b[i++] = tl & 0xff;\n\n  // `time_mid`\n  var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n  b[i++] = tmh >>> 8 & 0xff;\n  b[i++] = tmh & 0xff;\n\n  // `time_high_and_version`\n  b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n  b[i++] = tmh >>> 16 & 0xff;\n\n  // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n  b[i++] = clockseq >>> 8 | 0x80;\n\n  // `clock_seq_low`\n  b[i++] = clockseq & 0xff;\n\n  // `node`\n  for (var n = 0; n < 6; ++n) {\n    b[i + n] = node[n];\n  }\n\n  return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction valueEqual(a, b) {\n  if (a === b) return true;\n\n  if (a == null || b == null) return false;\n\n  if (Array.isArray(a)) {\n    return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {\n      return valueEqual(item, b[index]);\n    });\n  }\n\n  var aType = typeof a === 'undefined' ? 'undefined' : _typeof(a);\n  var bType = typeof b === 'undefined' ? 'undefined' : _typeof(b);\n\n  if (aType !== bType) return false;\n\n  if (aType === 'object') {\n    var aValue = a.valueOf();\n    var bValue = b.valueOf();\n\n    if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);\n\n    var aKeys = Object.keys(a);\n    var bKeys = Object.keys(b);\n\n    if (aKeys.length !== bKeys.length) return false;\n\n    return aKeys.every(function (key) {\n      return valueEqual(a[key], b[key]);\n    });\n  }\n\n  return false;\n}\n\nexport default valueEqual;","/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n  warning = function(condition, format, args) {\n    var len = arguments.length;\n    args = new Array(len > 2 ? len - 2 : 0);\n    for (var key = 2; key < len; key++) {\n      args[key - 2] = arguments[key];\n    }\n    if (format === undefined) {\n      throw new Error(\n        '`warning(condition, format, ...args)` requires a warning ' +\n        'message argument'\n      );\n    }\n\n    if (format.length < 10 || (/^[s\\W]*$/).test(format)) {\n      throw new Error(\n        'The warning format should be able to uniquely identify this ' +\n        'warning. Please, use a more descriptive format than: ' + format\n      );\n    }\n\n    if (!condition) {\n      var argIndex = 0;\n      var message = 'Warning: ' +\n        format.replace(/%s/g, function() {\n          return args[argIndex++];\n        });\n      if (typeof console !== 'undefined') {\n        console.error(message);\n      }\n      try {\n        // This error was thrown as a convenience so that you can use this stack\n        // to find the callsite that caused this warning to fire.\n        throw new Error(message);\n      } catch(x) {}\n    }\n  };\n}\n\nmodule.exports = warning;\n","module.exports = function() {\r\n\tthrow new Error(\"define cannot be used indirect\");\r\n};\r\n","/* globals __webpack_amd_options__ */\r\nmodule.exports = __webpack_amd_options__;\r\n","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1, eval)(\"this\");\r\n} catch (e) {\r\n\t// This works if the window reference is available\r\n\tif (typeof window === \"object\") g = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n","module.exports = function(originalModule) {\r\n\tif (!originalModule.webpackPolyfill) {\r\n\t\tvar module = Object.create(originalModule);\r\n\t\t// module.parent = undefined by default\r\n\t\tif (!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"exports\", {\r\n\t\t\tenumerable: true\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n","module.exports = function(module) {\r\n\tif (!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif (!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n  lookup[i] = code[i]\n  revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n  var len = b64.length\n\n  if (len % 4 > 0) {\n    throw new Error('Invalid string. Length must be a multiple of 4')\n  }\n\n  // Trim off extra bytes after placeholder bytes are found\n  // See: https://github.com/beatgammit/base64-js/issues/42\n  var validLen = b64.indexOf('=')\n  if (validLen === -1) validLen = len\n\n  var placeHoldersLen = validLen === len\n    ? 0\n    : 4 - (validLen % 4)\n\n  return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n  var lens = getLens(b64)\n  var validLen = lens[0]\n  var placeHoldersLen = lens[1]\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n  var tmp\n  var lens = getLens(b64)\n  var validLen = lens[0]\n  var placeHoldersLen = lens[1]\n\n  var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n  var curByte = 0\n\n  // if there are placeholders, only get up to the last complete 4 chars\n  var len = placeHoldersLen > 0\n    ? validLen - 4\n    : validLen\n\n  for (var i = 0; i < len; i += 4) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 18) |\n      (revLookup[b64.charCodeAt(i + 1)] << 12) |\n      (revLookup[b64.charCodeAt(i + 2)] << 6) |\n      revLookup[b64.charCodeAt(i + 3)]\n    arr[curByte++] = (tmp >> 16) & 0xFF\n    arr[curByte++] = (tmp >> 8) & 0xFF\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  if (placeHoldersLen === 2) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 2) |\n      (revLookup[b64.charCodeAt(i + 1)] >> 4)\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  if (placeHoldersLen === 1) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 10) |\n      (revLookup[b64.charCodeAt(i + 1)] << 4) |\n      (revLookup[b64.charCodeAt(i + 2)] >> 2)\n    arr[curByte++] = (tmp >> 8) & 0xFF\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  return arr\n}\n\nfunction tripletToBase64 (num) {\n  return lookup[num >> 18 & 0x3F] +\n    lookup[num >> 12 & 0x3F] +\n    lookup[num >> 6 & 0x3F] +\n    lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n  var tmp\n  var output = []\n  for (var i = start; i < end; i += 3) {\n    tmp =\n      ((uint8[i] << 16) & 0xFF0000) +\n      ((uint8[i + 1] << 8) & 0xFF00) +\n      (uint8[i + 2] & 0xFF)\n    output.push(tripletToBase64(tmp))\n  }\n  return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n  var tmp\n  var len = uint8.length\n  var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n  var parts = []\n  var maxChunkLength = 16383 // must be multiple of 3\n\n  // go through the array every three bytes, we'll deal with trailing stuff later\n  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n    parts.push(encodeChunk(\n      uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n    ))\n  }\n\n  // pad the end with zeros, but make sure to not forget the extra bytes\n  if (extraBytes === 1) {\n    tmp = uint8[len - 1]\n    parts.push(\n      lookup[tmp >> 2] +\n      lookup[(tmp << 4) & 0x3F] +\n      '=='\n    )\n  } else if (extraBytes === 2) {\n    tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n    parts.push(\n      lookup[tmp >> 10] +\n      lookup[(tmp >> 4) & 0x3F] +\n      lookup[(tmp << 2) & 0x3F] +\n      '='\n    )\n  }\n\n  return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>\n * @license  MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n *   === true    Use Uint8Array implementation (fastest)\n *   === false   Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n *   - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n *     See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n *   - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n *   - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n *     incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n  ? global.TYPED_ARRAY_SUPPORT\n  : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n  try {\n    var arr = new Uint8Array(1)\n    arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n    return arr.foo() === 42 && // typed array instances can be augmented\n        typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n        arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n  } catch (e) {\n    return false\n  }\n}\n\nfunction kMaxLength () {\n  return Buffer.TYPED_ARRAY_SUPPORT\n    ? 0x7fffffff\n    : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n  if (kMaxLength() < length) {\n    throw new RangeError('Invalid typed array length')\n  }\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    // Return an augmented `Uint8Array` instance, for best performance\n    that = new Uint8Array(length)\n    that.__proto__ = Buffer.prototype\n  } else {\n    // Fallback: Return an object instance of the Buffer class\n    if (that === null) {\n      that = new Buffer(length)\n    }\n    that.length = length\n  }\n\n  return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n  if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n    return new Buffer(arg, encodingOrOffset, length)\n  }\n\n  // Common case.\n  if (typeof arg === 'number') {\n    if (typeof encodingOrOffset === 'string') {\n      throw new Error(\n        'If encoding is specified then the first argument must be a string'\n      )\n    }\n    return allocUnsafe(this, arg)\n  }\n  return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n  arr.__proto__ = Buffer.prototype\n  return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n  if (typeof value === 'number') {\n    throw new TypeError('\"value\" argument must not be a number')\n  }\n\n  if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n    return fromArrayBuffer(that, value, encodingOrOffset, length)\n  }\n\n  if (typeof value === 'string') {\n    return fromString(that, value, encodingOrOffset)\n  }\n\n  return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n  return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n  Buffer.prototype.__proto__ = Uint8Array.prototype\n  Buffer.__proto__ = Uint8Array\n  if (typeof Symbol !== 'undefined' && Symbol.species &&\n      Buffer[Symbol.species] === Buffer) {\n    // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n    Object.defineProperty(Buffer, Symbol.species, {\n      value: null,\n      configurable: true\n    })\n  }\n}\n\nfunction assertSize (size) {\n  if (typeof size !== 'number') {\n    throw new TypeError('\"size\" argument must be a number')\n  } else if (size < 0) {\n    throw new RangeError('\"size\" argument must not be negative')\n  }\n}\n\nfunction alloc (that, size, fill, encoding) {\n  assertSize(size)\n  if (size <= 0) {\n    return createBuffer(that, size)\n  }\n  if (fill !== undefined) {\n    // Only pay attention to encoding if it's a string. This\n    // prevents accidentally sending in a number that would\n    // be interpretted as a start offset.\n    return typeof encoding === 'string'\n      ? createBuffer(that, size).fill(fill, encoding)\n      : createBuffer(that, size).fill(fill)\n  }\n  return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n  return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n  assertSize(size)\n  that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) {\n    for (var i = 0; i < size; ++i) {\n      that[i] = 0\n    }\n  }\n  return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n  return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n  return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n  if (typeof encoding !== 'string' || encoding === '') {\n    encoding = 'utf8'\n  }\n\n  if (!Buffer.isEncoding(encoding)) {\n    throw new TypeError('\"encoding\" must be a valid string encoding')\n  }\n\n  var length = byteLength(string, encoding) | 0\n  that = createBuffer(that, length)\n\n  var actual = that.write(string, encoding)\n\n  if (actual !== length) {\n    // Writing a hex string, for example, that contains invalid characters will\n    // cause everything after the first invalid character to be ignored. (e.g.\n    // 'abxxcd' will be treated as 'ab')\n    that = that.slice(0, actual)\n  }\n\n  return that\n}\n\nfunction fromArrayLike (that, array) {\n  var length = array.length < 0 ? 0 : checked(array.length) | 0\n  that = createBuffer(that, length)\n  for (var i = 0; i < length; i += 1) {\n    that[i] = array[i] & 255\n  }\n  return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n  array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n  if (byteOffset < 0 || array.byteLength < byteOffset) {\n    throw new RangeError('\\'offset\\' is out of bounds')\n  }\n\n  if (array.byteLength < byteOffset + (length || 0)) {\n    throw new RangeError('\\'length\\' is out of bounds')\n  }\n\n  if (byteOffset === undefined && length === undefined) {\n    array = new Uint8Array(array)\n  } else if (length === undefined) {\n    array = new Uint8Array(array, byteOffset)\n  } else {\n    array = new Uint8Array(array, byteOffset, length)\n  }\n\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    // Return an augmented `Uint8Array` instance, for best performance\n    that = array\n    that.__proto__ = Buffer.prototype\n  } else {\n    // Fallback: Return an object instance of the Buffer class\n    that = fromArrayLike(that, array)\n  }\n  return that\n}\n\nfunction fromObject (that, obj) {\n  if (Buffer.isBuffer(obj)) {\n    var len = checked(obj.length) | 0\n    that = createBuffer(that, len)\n\n    if (that.length === 0) {\n      return that\n    }\n\n    obj.copy(that, 0, 0, len)\n    return that\n  }\n\n  if (obj) {\n    if ((typeof ArrayBuffer !== 'undefined' &&\n        obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n      if (typeof obj.length !== 'number' || isnan(obj.length)) {\n        return createBuffer(that, 0)\n      }\n      return fromArrayLike(that, obj)\n    }\n\n    if (obj.type === 'Buffer' && isArray(obj.data)) {\n      return fromArrayLike(that, obj.data)\n    }\n  }\n\n  throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n  // Note: cannot use `length < kMaxLength()` here because that fails when\n  // length is NaN (which is otherwise coerced to zero.)\n  if (length >= kMaxLength()) {\n    throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n                         'size: 0x' + kMaxLength().toString(16) + ' bytes')\n  }\n  return length | 0\n}\n\nfunction SlowBuffer (length) {\n  if (+length != length) { // eslint-disable-line eqeqeq\n    length = 0\n  }\n  return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n  return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n  if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n    throw new TypeError('Arguments must be Buffers')\n  }\n\n  if (a === b) return 0\n\n  var x = a.length\n  var y = b.length\n\n  for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n    if (a[i] !== b[i]) {\n      x = a[i]\n      y = b[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n  switch (String(encoding).toLowerCase()) {\n    case 'hex':\n    case 'utf8':\n    case 'utf-8':\n    case 'ascii':\n    case 'latin1':\n    case 'binary':\n    case 'base64':\n    case 'ucs2':\n    case 'ucs-2':\n    case 'utf16le':\n    case 'utf-16le':\n      return true\n    default:\n      return false\n  }\n}\n\nBuffer.concat = function concat (list, length) {\n  if (!isArray(list)) {\n    throw new TypeError('\"list\" argument must be an Array of Buffers')\n  }\n\n  if (list.length === 0) {\n    return Buffer.alloc(0)\n  }\n\n  var i\n  if (length === undefined) {\n    length = 0\n    for (i = 0; i < list.length; ++i) {\n      length += list[i].length\n    }\n  }\n\n  var buffer = Buffer.allocUnsafe(length)\n  var pos = 0\n  for (i = 0; i < list.length; ++i) {\n    var buf = list[i]\n    if (!Buffer.isBuffer(buf)) {\n      throw new TypeError('\"list\" argument must be an Array of Buffers')\n    }\n    buf.copy(buffer, pos)\n    pos += buf.length\n  }\n  return buffer\n}\n\nfunction byteLength (string, encoding) {\n  if (Buffer.isBuffer(string)) {\n    return string.length\n  }\n  if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n      (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n    return string.byteLength\n  }\n  if (typeof string !== 'string') {\n    string = '' + string\n  }\n\n  var len = string.length\n  if (len === 0) return 0\n\n  // Use a for loop to avoid recursion\n  var loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'ascii':\n      case 'latin1':\n      case 'binary':\n        return len\n      case 'utf8':\n      case 'utf-8':\n      case undefined:\n        return utf8ToBytes(string).length\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return len * 2\n      case 'hex':\n        return len >>> 1\n      case 'base64':\n        return base64ToBytes(string).length\n      default:\n        if (loweredCase) return utf8ToBytes(string).length // assume utf8\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n  var loweredCase = false\n\n  // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n  // property of a typed array.\n\n  // This behaves neither like String nor Uint8Array in that we set start/end\n  // to their upper/lower bounds if the value passed is out of range.\n  // undefined is handled specially as per ECMA-262 6th Edition,\n  // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n  if (start === undefined || start < 0) {\n    start = 0\n  }\n  // Return early if start > this.length. Done here to prevent potential uint32\n  // coercion fail below.\n  if (start > this.length) {\n    return ''\n  }\n\n  if (end === undefined || end > this.length) {\n    end = this.length\n  }\n\n  if (end <= 0) {\n    return ''\n  }\n\n  // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n  end >>>= 0\n  start >>>= 0\n\n  if (end <= start) {\n    return ''\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  while (true) {\n    switch (encoding) {\n      case 'hex':\n        return hexSlice(this, start, end)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Slice(this, start, end)\n\n      case 'ascii':\n        return asciiSlice(this, start, end)\n\n      case 'latin1':\n      case 'binary':\n        return latin1Slice(this, start, end)\n\n      case 'base64':\n        return base64Slice(this, start, end)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return utf16leSlice(this, start, end)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = (encoding + '').toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n  var i = b[n]\n  b[n] = b[m]\n  b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n  var len = this.length\n  if (len % 2 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 16-bits')\n  }\n  for (var i = 0; i < len; i += 2) {\n    swap(this, i, i + 1)\n  }\n  return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n  var len = this.length\n  if (len % 4 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 32-bits')\n  }\n  for (var i = 0; i < len; i += 4) {\n    swap(this, i, i + 3)\n    swap(this, i + 1, i + 2)\n  }\n  return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n  var len = this.length\n  if (len % 8 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 64-bits')\n  }\n  for (var i = 0; i < len; i += 8) {\n    swap(this, i, i + 7)\n    swap(this, i + 1, i + 6)\n    swap(this, i + 2, i + 5)\n    swap(this, i + 3, i + 4)\n  }\n  return this\n}\n\nBuffer.prototype.toString = function toString () {\n  var length = this.length | 0\n  if (length === 0) return ''\n  if (arguments.length === 0) return utf8Slice(this, 0, length)\n  return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n  if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n  if (this === b) return true\n  return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n  var str = ''\n  var max = exports.INSPECT_MAX_BYTES\n  if (this.length > 0) {\n    str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n    if (this.length > max) str += ' ... '\n  }\n  return '<Buffer ' + str + '>'\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n  if (!Buffer.isBuffer(target)) {\n    throw new TypeError('Argument must be a Buffer')\n  }\n\n  if (start === undefined) {\n    start = 0\n  }\n  if (end === undefined) {\n    end = target ? target.length : 0\n  }\n  if (thisStart === undefined) {\n    thisStart = 0\n  }\n  if (thisEnd === undefined) {\n    thisEnd = this.length\n  }\n\n  if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n    throw new RangeError('out of range index')\n  }\n\n  if (thisStart >= thisEnd && start >= end) {\n    return 0\n  }\n  if (thisStart >= thisEnd) {\n    return -1\n  }\n  if (start >= end) {\n    return 1\n  }\n\n  start >>>= 0\n  end >>>= 0\n  thisStart >>>= 0\n  thisEnd >>>= 0\n\n  if (this === target) return 0\n\n  var x = thisEnd - thisStart\n  var y = end - start\n  var len = Math.min(x, y)\n\n  var thisCopy = this.slice(thisStart, thisEnd)\n  var targetCopy = target.slice(start, end)\n\n  for (var i = 0; i < len; ++i) {\n    if (thisCopy[i] !== targetCopy[i]) {\n      x = thisCopy[i]\n      y = targetCopy[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n  // Empty buffer means no match\n  if (buffer.length === 0) return -1\n\n  // Normalize byteOffset\n  if (typeof byteOffset === 'string') {\n    encoding = byteOffset\n    byteOffset = 0\n  } else if (byteOffset > 0x7fffffff) {\n    byteOffset = 0x7fffffff\n  } else if (byteOffset < -0x80000000) {\n    byteOffset = -0x80000000\n  }\n  byteOffset = +byteOffset  // Coerce to Number.\n  if (isNaN(byteOffset)) {\n    // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n    byteOffset = dir ? 0 : (buffer.length - 1)\n  }\n\n  // Normalize byteOffset: negative offsets start from the end of the buffer\n  if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n  if (byteOffset >= buffer.length) {\n    if (dir) return -1\n    else byteOffset = buffer.length - 1\n  } else if (byteOffset < 0) {\n    if (dir) byteOffset = 0\n    else return -1\n  }\n\n  // Normalize val\n  if (typeof val === 'string') {\n    val = Buffer.from(val, encoding)\n  }\n\n  // Finally, search either indexOf (if dir is true) or lastIndexOf\n  if (Buffer.isBuffer(val)) {\n    // Special case: looking for empty string/buffer always fails\n    if (val.length === 0) {\n      return -1\n    }\n    return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n  } else if (typeof val === 'number') {\n    val = val & 0xFF // Search for a byte value [0-255]\n    if (Buffer.TYPED_ARRAY_SUPPORT &&\n        typeof Uint8Array.prototype.indexOf === 'function') {\n      if (dir) {\n        return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n      } else {\n        return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n      }\n    }\n    return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n  }\n\n  throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n  var indexSize = 1\n  var arrLength = arr.length\n  var valLength = val.length\n\n  if (encoding !== undefined) {\n    encoding = String(encoding).toLowerCase()\n    if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n        encoding === 'utf16le' || encoding === 'utf-16le') {\n      if (arr.length < 2 || val.length < 2) {\n        return -1\n      }\n      indexSize = 2\n      arrLength /= 2\n      valLength /= 2\n      byteOffset /= 2\n    }\n  }\n\n  function read (buf, i) {\n    if (indexSize === 1) {\n      return buf[i]\n    } else {\n      return buf.readUInt16BE(i * indexSize)\n    }\n  }\n\n  var i\n  if (dir) {\n    var foundIndex = -1\n    for (i = byteOffset; i < arrLength; i++) {\n      if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n        if (foundIndex === -1) foundIndex = i\n        if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n      } else {\n        if (foundIndex !== -1) i -= i - foundIndex\n        foundIndex = -1\n      }\n    }\n  } else {\n    if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n    for (i = byteOffset; i >= 0; i--) {\n      var found = true\n      for (var j = 0; j < valLength; j++) {\n        if (read(arr, i + j) !== read(val, j)) {\n          found = false\n          break\n        }\n      }\n      if (found) return i\n    }\n  }\n\n  return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n  return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n  offset = Number(offset) || 0\n  var remaining = buf.length - offset\n  if (!length) {\n    length = remaining\n  } else {\n    length = Number(length)\n    if (length > remaining) {\n      length = remaining\n    }\n  }\n\n  // must be an even number of digits\n  var strLen = string.length\n  if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n  if (length > strLen / 2) {\n    length = strLen / 2\n  }\n  for (var i = 0; i < length; ++i) {\n    var parsed = parseInt(string.substr(i * 2, 2), 16)\n    if (isNaN(parsed)) return i\n    buf[offset + i] = parsed\n  }\n  return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n  return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n  return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n  return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n  return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n  return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n  // Buffer#write(string)\n  if (offset === undefined) {\n    encoding = 'utf8'\n    length = this.length\n    offset = 0\n  // Buffer#write(string, encoding)\n  } else if (length === undefined && typeof offset === 'string') {\n    encoding = offset\n    length = this.length\n    offset = 0\n  // Buffer#write(string, offset[, length][, encoding])\n  } else if (isFinite(offset)) {\n    offset = offset | 0\n    if (isFinite(length)) {\n      length = length | 0\n      if (encoding === undefined) encoding = 'utf8'\n    } else {\n      encoding = length\n      length = undefined\n    }\n  // legacy write(string, encoding, offset, length) - remove in v0.13\n  } else {\n    throw new Error(\n      'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n    )\n  }\n\n  var remaining = this.length - offset\n  if (length === undefined || length > remaining) length = remaining\n\n  if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n    throw new RangeError('Attempt to write outside buffer bounds')\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  var loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'hex':\n        return hexWrite(this, string, offset, length)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Write(this, string, offset, length)\n\n      case 'ascii':\n        return asciiWrite(this, string, offset, length)\n\n      case 'latin1':\n      case 'binary':\n        return latin1Write(this, string, offset, length)\n\n      case 'base64':\n        // Warning: maxLength not taken into account in base64Write\n        return base64Write(this, string, offset, length)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return ucs2Write(this, string, offset, length)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n  return {\n    type: 'Buffer',\n    data: Array.prototype.slice.call(this._arr || this, 0)\n  }\n}\n\nfunction base64Slice (buf, start, end) {\n  if (start === 0 && end === buf.length) {\n    return base64.fromByteArray(buf)\n  } else {\n    return base64.fromByteArray(buf.slice(start, end))\n  }\n}\n\nfunction utf8Slice (buf, start, end) {\n  end = Math.min(buf.length, end)\n  var res = []\n\n  var i = start\n  while (i < end) {\n    var firstByte = buf[i]\n    var codePoint = null\n    var bytesPerSequence = (firstByte > 0xEF) ? 4\n      : (firstByte > 0xDF) ? 3\n      : (firstByte > 0xBF) ? 2\n      : 1\n\n    if (i + bytesPerSequence <= end) {\n      var secondByte, thirdByte, fourthByte, tempCodePoint\n\n      switch (bytesPerSequence) {\n        case 1:\n          if (firstByte < 0x80) {\n            codePoint = firstByte\n          }\n          break\n        case 2:\n          secondByte = buf[i + 1]\n          if ((secondByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n            if (tempCodePoint > 0x7F) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 3:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n            if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 4:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          fourthByte = buf[i + 3]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n            if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n              codePoint = tempCodePoint\n            }\n          }\n      }\n    }\n\n    if (codePoint === null) {\n      // we did not generate a valid codePoint so insert a\n      // replacement char (U+FFFD) and advance only 1 byte\n      codePoint = 0xFFFD\n      bytesPerSequence = 1\n    } else if (codePoint > 0xFFFF) {\n      // encode to utf16 (surrogate pair dance)\n      codePoint -= 0x10000\n      res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n      codePoint = 0xDC00 | codePoint & 0x3FF\n    }\n\n    res.push(codePoint)\n    i += bytesPerSequence\n  }\n\n  return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n  var len = codePoints.length\n  if (len <= MAX_ARGUMENTS_LENGTH) {\n    return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n  }\n\n  // Decode in chunks to avoid \"call stack size exceeded\".\n  var res = ''\n  var i = 0\n  while (i < len) {\n    res += String.fromCharCode.apply(\n      String,\n      codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n    )\n  }\n  return res\n}\n\nfunction asciiSlice (buf, start, end) {\n  var ret = ''\n  end = Math.min(buf.length, end)\n\n  for (var i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i] & 0x7F)\n  }\n  return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n  var ret = ''\n  end = Math.min(buf.length, end)\n\n  for (var i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i])\n  }\n  return ret\n}\n\nfunction hexSlice (buf, start, end) {\n  var len = buf.length\n\n  if (!start || start < 0) start = 0\n  if (!end || end < 0 || end > len) end = len\n\n  var out = ''\n  for (var i = start; i < end; ++i) {\n    out += toHex(buf[i])\n  }\n  return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n  var bytes = buf.slice(start, end)\n  var res = ''\n  for (var i = 0; i < bytes.length; i += 2) {\n    res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n  }\n  return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n  var len = this.length\n  start = ~~start\n  end = end === undefined ? len : ~~end\n\n  if (start < 0) {\n    start += len\n    if (start < 0) start = 0\n  } else if (start > len) {\n    start = len\n  }\n\n  if (end < 0) {\n    end += len\n    if (end < 0) end = 0\n  } else if (end > len) {\n    end = len\n  }\n\n  if (end < start) end = start\n\n  var newBuf\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    newBuf = this.subarray(start, end)\n    newBuf.__proto__ = Buffer.prototype\n  } else {\n    var sliceLen = end - start\n    newBuf = new Buffer(sliceLen, undefined)\n    for (var i = 0; i < sliceLen; ++i) {\n      newBuf[i] = this[i + start]\n    }\n  }\n\n  return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n  if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n  if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var val = this[offset]\n  var mul = 1\n  var i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    checkOffset(offset, byteLength, this.length)\n  }\n\n  var val = this[offset + --byteLength]\n  var mul = 1\n  while (byteLength > 0 && (mul *= 0x100)) {\n    val += this[offset + --byteLength] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return ((this[offset]) |\n      (this[offset + 1] << 8) |\n      (this[offset + 2] << 16)) +\n      (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] * 0x1000000) +\n    ((this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var val = this[offset]\n  var mul = 1\n  var i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var i = byteLength\n  var mul = 1\n  var val = this[offset + --i]\n  while (i > 0 && (mul *= 0x100)) {\n    val += this[offset + --i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  if (!(this[offset] & 0x80)) return (this[offset])\n  return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  var val = this[offset] | (this[offset + 1] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  var val = this[offset + 1] | (this[offset] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset]) |\n    (this[offset + 1] << 8) |\n    (this[offset + 2] << 16) |\n    (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] << 24) |\n    (this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n  if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n  if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  var mul = 1\n  var i = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  var i = byteLength - 1\n  var mul = 1\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n  if (value < 0) value = 0xffff + value + 1\n  for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n    buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n      (littleEndian ? i : 1 - i) * 8\n  }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n  } else {\n    objectWriteUInt16(this, value, offset, true)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 8)\n    this[offset + 1] = (value & 0xff)\n  } else {\n    objectWriteUInt16(this, value, offset, false)\n  }\n  return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n  if (value < 0) value = 0xffffffff + value + 1\n  for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n    buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n  }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset + 3] = (value >>> 24)\n    this[offset + 2] = (value >>> 16)\n    this[offset + 1] = (value >>> 8)\n    this[offset] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, true)\n  }\n  return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 24)\n    this[offset + 1] = (value >>> 16)\n    this[offset + 2] = (value >>> 8)\n    this[offset + 3] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, false)\n  }\n  return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) {\n    var limit = Math.pow(2, 8 * byteLength - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  var i = 0\n  var mul = 1\n  var sub = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) {\n    var limit = Math.pow(2, 8 * byteLength - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  var i = byteLength - 1\n  var mul = 1\n  var sub = 0\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n  if (value < 0) value = 0xff + value + 1\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n  } else {\n    objectWriteUInt16(this, value, offset, true)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 8)\n    this[offset + 1] = (value & 0xff)\n  } else {\n    objectWriteUInt16(this, value, offset, false)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n    this[offset + 2] = (value >>> 16)\n    this[offset + 3] = (value >>> 24)\n  } else {\n    objectWriteUInt32(this, value, offset, true)\n  }\n  return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  if (value < 0) value = 0xffffffff + value + 1\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 24)\n    this[offset + 1] = (value >>> 16)\n    this[offset + 2] = (value >>> 8)\n    this[offset + 3] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, false)\n  }\n  return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n  if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 23, 4)\n  return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 52, 8)\n  return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n  if (!start) start = 0\n  if (!end && end !== 0) end = this.length\n  if (targetStart >= target.length) targetStart = target.length\n  if (!targetStart) targetStart = 0\n  if (end > 0 && end < start) end = start\n\n  // Copy 0 bytes; we're done\n  if (end === start) return 0\n  if (target.length === 0 || this.length === 0) return 0\n\n  // Fatal error conditions\n  if (targetStart < 0) {\n    throw new RangeError('targetStart out of bounds')\n  }\n  if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n  if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n  // Are we oob?\n  if (end > this.length) end = this.length\n  if (target.length - targetStart < end - start) {\n    end = target.length - targetStart + start\n  }\n\n  var len = end - start\n  var i\n\n  if (this === target && start < targetStart && targetStart < end) {\n    // descending copy from end\n    for (i = len - 1; i >= 0; --i) {\n      target[i + targetStart] = this[i + start]\n    }\n  } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n    // ascending copy from start\n    for (i = 0; i < len; ++i) {\n      target[i + targetStart] = this[i + start]\n    }\n  } else {\n    Uint8Array.prototype.set.call(\n      target,\n      this.subarray(start, start + len),\n      targetStart\n    )\n  }\n\n  return len\n}\n\n// Usage:\n//    buffer.fill(number[, offset[, end]])\n//    buffer.fill(buffer[, offset[, end]])\n//    buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n  // Handle string cases:\n  if (typeof val === 'string') {\n    if (typeof start === 'string') {\n      encoding = start\n      start = 0\n      end = this.length\n    } else if (typeof end === 'string') {\n      encoding = end\n      end = this.length\n    }\n    if (val.length === 1) {\n      var code = val.charCodeAt(0)\n      if (code < 256) {\n        val = code\n      }\n    }\n    if (encoding !== undefined && typeof encoding !== 'string') {\n      throw new TypeError('encoding must be a string')\n    }\n    if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n      throw new TypeError('Unknown encoding: ' + encoding)\n    }\n  } else if (typeof val === 'number') {\n    val = val & 255\n  }\n\n  // Invalid ranges are not set to a default, so can range check early.\n  if (start < 0 || this.length < start || this.length < end) {\n    throw new RangeError('Out of range index')\n  }\n\n  if (end <= start) {\n    return this\n  }\n\n  start = start >>> 0\n  end = end === undefined ? this.length : end >>> 0\n\n  if (!val) val = 0\n\n  var i\n  if (typeof val === 'number') {\n    for (i = start; i < end; ++i) {\n      this[i] = val\n    }\n  } else {\n    var bytes = Buffer.isBuffer(val)\n      ? val\n      : utf8ToBytes(new Buffer(val, encoding).toString())\n    var len = bytes.length\n    for (i = 0; i < end - start; ++i) {\n      this[i + start] = bytes[i % len]\n    }\n  }\n\n  return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n  // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n  str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n  // Node converts strings with length < 2 to ''\n  if (str.length < 2) return ''\n  // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n  while (str.length % 4 !== 0) {\n    str = str + '='\n  }\n  return str\n}\n\nfunction stringtrim (str) {\n  if (str.trim) return str.trim()\n  return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n  if (n < 16) return '0' + n.toString(16)\n  return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n  units = units || Infinity\n  var codePoint\n  var length = string.length\n  var leadSurrogate = null\n  var bytes = []\n\n  for (var i = 0; i < length; ++i) {\n    codePoint = string.charCodeAt(i)\n\n    // is surrogate component\n    if (codePoint > 0xD7FF && codePoint < 0xE000) {\n      // last char was a lead\n      if (!leadSurrogate) {\n        // no lead yet\n        if (codePoint > 0xDBFF) {\n          // unexpected trail\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        } else if (i + 1 === length) {\n          // unpaired lead\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        }\n\n        // valid lead\n        leadSurrogate = codePoint\n\n        continue\n      }\n\n      // 2 leads in a row\n      if (codePoint < 0xDC00) {\n        if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n        leadSurrogate = codePoint\n        continue\n      }\n\n      // valid surrogate pair\n      codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n    } else if (leadSurrogate) {\n      // valid bmp char, but last char was a lead\n      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n    }\n\n    leadSurrogate = null\n\n    // encode utf8\n    if (codePoint < 0x80) {\n      if ((units -= 1) < 0) break\n      bytes.push(codePoint)\n    } else if (codePoint < 0x800) {\n      if ((units -= 2) < 0) break\n      bytes.push(\n        codePoint >> 0x6 | 0xC0,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x10000) {\n      if ((units -= 3) < 0) break\n      bytes.push(\n        codePoint >> 0xC | 0xE0,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x110000) {\n      if ((units -= 4) < 0) break\n      bytes.push(\n        codePoint >> 0x12 | 0xF0,\n        codePoint >> 0xC & 0x3F | 0x80,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else {\n      throw new Error('Invalid code point')\n    }\n  }\n\n  return bytes\n}\n\nfunction asciiToBytes (str) {\n  var byteArray = []\n  for (var i = 0; i < str.length; ++i) {\n    // Node's code seems to be doing this and not & 0x7F..\n    byteArray.push(str.charCodeAt(i) & 0xFF)\n  }\n  return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n  var c, hi, lo\n  var byteArray = []\n  for (var i = 0; i < str.length; ++i) {\n    if ((units -= 2) < 0) break\n\n    c = str.charCodeAt(i)\n    hi = c >> 8\n    lo = c % 256\n    byteArray.push(lo)\n    byteArray.push(hi)\n  }\n\n  return byteArray\n}\n\nfunction base64ToBytes (str) {\n  return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n  for (var i = 0; i < length; ++i) {\n    if ((i + offset >= dst.length) || (i >= src.length)) break\n    dst[i + offset] = src[i]\n  }\n  return i\n}\n\nfunction isnan (val) {\n  return val !== val // eslint-disable-line no-self-compare\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\n\nfunction isArray(arg) {\n  if (Array.isArray) {\n    return Array.isArray(arg);\n  }\n  return objectToString(arg) === '[object Array]';\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n  return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n  return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n  return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n  return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n  return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n  return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n  return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n  return objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n  return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n  return objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n  return (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n  return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n  return arg === null ||\n         typeof arg === 'boolean' ||\n         typeof arg === 'number' ||\n         typeof arg === 'string' ||\n         typeof arg === 'symbol' ||  // ES6 symbol\n         typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = Buffer.isBuffer;\n\nfunction objectToString(o) {\n  return Object.prototype.toString.call(o);\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nfunction EventEmitter() {\n  this._events = this._events || {};\n  this._maxListeners = this._maxListeners || undefined;\n}\nmodule.exports = EventEmitter;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nEventEmitter.defaultMaxListeners = 10;\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function(n) {\n  if (!isNumber(n) || n < 0 || isNaN(n))\n    throw TypeError('n must be a positive number');\n  this._maxListeners = n;\n  return this;\n};\n\nEventEmitter.prototype.emit = function(type) {\n  var er, handler, len, args, i, listeners;\n\n  if (!this._events)\n    this._events = {};\n\n  // If there is no 'error' event listener then throw.\n  if (type === 'error') {\n    if (!this._events.error ||\n        (isObject(this._events.error) && !this._events.error.length)) {\n      er = arguments[1];\n      if (er instanceof Error) {\n        throw er; // Unhandled 'error' event\n      } else {\n        // At least give some kind of context to the user\n        var err = new Error('Uncaught, unspecified \"error\" event. (' + er + ')');\n        err.context = er;\n        throw err;\n      }\n    }\n  }\n\n  handler = this._events[type];\n\n  if (isUndefined(handler))\n    return false;\n\n  if (isFunction(handler)) {\n    switch (arguments.length) {\n      // fast cases\n      case 1:\n        handler.call(this);\n        break;\n      case 2:\n        handler.call(this, arguments[1]);\n        break;\n      case 3:\n        handler.call(this, arguments[1], arguments[2]);\n        break;\n      // slower\n      default:\n        args = Array.prototype.slice.call(arguments, 1);\n        handler.apply(this, args);\n    }\n  } else if (isObject(handler)) {\n    args = Array.prototype.slice.call(arguments, 1);\n    listeners = handler.slice();\n    len = listeners.length;\n    for (i = 0; i < len; i++)\n      listeners[i].apply(this, args);\n  }\n\n  return true;\n};\n\nEventEmitter.prototype.addListener = function(type, listener) {\n  var m;\n\n  if (!isFunction(listener))\n    throw TypeError('listener must be a function');\n\n  if (!this._events)\n    this._events = {};\n\n  // To avoid recursion in the case that type === \"newListener\"! Before\n  // adding it to the listeners, first emit \"newListener\".\n  if (this._events.newListener)\n    this.emit('newListener', type,\n              isFunction(listener.listener) ?\n              listener.listener : listener);\n\n  if (!this._events[type])\n    // Optimize the case of one listener. Don't need the extra array object.\n    this._events[type] = listener;\n  else if (isObject(this._events[type]))\n    // If we've already got an array, just append.\n    this._events[type].push(listener);\n  else\n    // Adding the second element, need to change to array.\n    this._events[type] = [this._events[type], listener];\n\n  // Check for listener leak\n  if (isObject(this._events[type]) && !this._events[type].warned) {\n    if (!isUndefined(this._maxListeners)) {\n      m = this._maxListeners;\n    } else {\n      m = EventEmitter.defaultMaxListeners;\n    }\n\n    if (m && m > 0 && this._events[type].length > m) {\n      this._events[type].warned = true;\n      console.error('(node) warning: possible EventEmitter memory ' +\n                    'leak detected. %d listeners added. ' +\n                    'Use emitter.setMaxListeners() to increase limit.',\n                    this._events[type].length);\n      if (typeof console.trace === 'function') {\n        // not supported in IE 10\n        console.trace();\n      }\n    }\n  }\n\n  return this;\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.once = function(type, listener) {\n  if (!isFunction(listener))\n    throw TypeError('listener must be a function');\n\n  var fired = false;\n\n  function g() {\n    this.removeListener(type, g);\n\n    if (!fired) {\n      fired = true;\n      listener.apply(this, arguments);\n    }\n  }\n\n  g.listener = listener;\n  this.on(type, g);\n\n  return this;\n};\n\n// emits a 'removeListener' event iff the listener was removed\nEventEmitter.prototype.removeListener = function(type, listener) {\n  var list, position, length, i;\n\n  if (!isFunction(listener))\n    throw TypeError('listener must be a function');\n\n  if (!this._events || !this._events[type])\n    return this;\n\n  list = this._events[type];\n  length = list.length;\n  position = -1;\n\n  if (list === listener ||\n      (isFunction(list.listener) && list.listener === listener)) {\n    delete this._events[type];\n    if (this._events.removeListener)\n      this.emit('removeListener', type, listener);\n\n  } else if (isObject(list)) {\n    for (i = length; i-- > 0;) {\n      if (list[i] === listener ||\n          (list[i].listener && list[i].listener === listener)) {\n        position = i;\n        break;\n      }\n    }\n\n    if (position < 0)\n      return this;\n\n    if (list.length === 1) {\n      list.length = 0;\n      delete this._events[type];\n    } else {\n      list.splice(position, 1);\n    }\n\n    if (this._events.removeListener)\n      this.emit('removeListener', type, listener);\n  }\n\n  return this;\n};\n\nEventEmitter.prototype.removeAllListeners = function(type) {\n  var key, listeners;\n\n  if (!this._events)\n    return this;\n\n  // not listening for removeListener, no need to emit\n  if (!this._events.removeListener) {\n    if (arguments.length === 0)\n      this._events = {};\n    else if (this._events[type])\n      delete this._events[type];\n    return this;\n  }\n\n  // emit removeListener for all listeners on all events\n  if (arguments.length === 0) {\n    for (key in this._events) {\n      if (key === 'removeListener') continue;\n      this.removeAllListeners(key);\n    }\n    this.removeAllListeners('removeListener');\n    this._events = {};\n    return this;\n  }\n\n  listeners = this._events[type];\n\n  if (isFunction(listeners)) {\n    this.removeListener(type, listeners);\n  } else if (listeners) {\n    // LIFO order\n    while (listeners.length)\n      this.removeListener(type, listeners[listeners.length - 1]);\n  }\n  delete this._events[type];\n\n  return this;\n};\n\nEventEmitter.prototype.listeners = function(type) {\n  var ret;\n  if (!this._events || !this._events[type])\n    ret = [];\n  else if (isFunction(this._events[type]))\n    ret = [this._events[type]];\n  else\n    ret = this._events[type].slice();\n  return ret;\n};\n\nEventEmitter.prototype.listenerCount = function(type) {\n  if (this._events) {\n    var evlistener = this._events[type];\n\n    if (isFunction(evlistener))\n      return 1;\n    else if (evlistener)\n      return evlistener.length;\n  }\n  return 0;\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n  return emitter.listenerCount(type);\n};\n\nfunction isFunction(arg) {\n  return typeof arg === 'function';\n}\n\nfunction isNumber(arg) {\n  return typeof arg === 'number';\n}\n\nfunction isObject(arg) {\n  return typeof arg === 'object' && arg !== null;\n}\n\nfunction isUndefined(arg) {\n  return arg === void 0;\n}\n","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n  var e, m\n  var eLen = (nBytes * 8) - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var nBits = -7\n  var i = isLE ? (nBytes - 1) : 0\n  var d = isLE ? -1 : 1\n  var s = buffer[offset + i]\n\n  i += d\n\n  e = s & ((1 << (-nBits)) - 1)\n  s >>= (-nBits)\n  nBits += eLen\n  for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n  m = e & ((1 << (-nBits)) - 1)\n  e >>= (-nBits)\n  nBits += mLen\n  for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n  if (e === 0) {\n    e = 1 - eBias\n  } else if (e === eMax) {\n    return m ? NaN : ((s ? -1 : 1) * Infinity)\n  } else {\n    m = m + Math.pow(2, mLen)\n    e = e - eBias\n  }\n  return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n  var e, m, c\n  var eLen = (nBytes * 8) - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n  var i = isLE ? 0 : (nBytes - 1)\n  var d = isLE ? 1 : -1\n  var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n  value = Math.abs(value)\n\n  if (isNaN(value) || value === Infinity) {\n    m = isNaN(value) ? 1 : 0\n    e = eMax\n  } else {\n    e = Math.floor(Math.log(value) / Math.LN2)\n    if (value * (c = Math.pow(2, -e)) < 1) {\n      e--\n      c *= 2\n    }\n    if (e + eBias >= 1) {\n      value += rt / c\n    } else {\n      value += rt * Math.pow(2, 1 - eBias)\n    }\n    if (value * c >= 2) {\n      e++\n      c /= 2\n    }\n\n    if (e + eBias >= eMax) {\n      m = 0\n      e = eMax\n    } else if (e + eBias >= 1) {\n      m = ((value * c) - 1) * Math.pow(2, mLen)\n      e = e + eBias\n    } else {\n      m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n      e = 0\n    }\n  }\n\n  for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n  e = (e << mLen) | m\n  eLen += mLen\n  for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n  buffer[offset + i - d] |= s * 128\n}\n","if (typeof Object.create === 'function') {\n  // implementation from standard node.js 'util' module\n  module.exports = function inherits(ctor, superCtor) {\n    ctor.super_ = superCtor\n    ctor.prototype = Object.create(superCtor.prototype, {\n      constructor: {\n        value: ctor,\n        enumerable: false,\n        writable: true,\n        configurable: true\n      }\n    });\n  };\n} else {\n  // old school shim for old browsers\n  module.exports = function inherits(ctor, superCtor) {\n    ctor.super_ = superCtor\n    var TempCtor = function () {}\n    TempCtor.prototype = superCtor.prototype\n    ctor.prototype = new TempCtor()\n    ctor.prototype.constructor = ctor\n  }\n}\n","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n  return toString.call(arr) == '[object Array]';\n};\n","'use strict';\n\nif (!process.version ||\n    process.version.indexOf('v0.') === 0 ||\n    process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {\n  module.exports = { nextTick: nextTick };\n} else {\n  module.exports = process\n}\n\nfunction nextTick(fn, arg1, arg2, arg3) {\n  if (typeof fn !== 'function') {\n    throw new TypeError('\"callback\" argument must be a function');\n  }\n  var len = arguments.length;\n  var args, i;\n  switch (len) {\n  case 0:\n  case 1:\n    return process.nextTick(fn);\n  case 2:\n    return process.nextTick(function afterTickOne() {\n      fn.call(null, arg1);\n    });\n  case 3:\n    return process.nextTick(function afterTickTwo() {\n      fn.call(null, arg1, arg2);\n    });\n  case 4:\n    return process.nextTick(function afterTickThree() {\n      fn.call(null, arg1, arg2, arg3);\n    });\n  default:\n    args = new Array(len - 1);\n    i = 0;\n    while (i < args.length) {\n      args[i++] = arguments[i];\n    }\n    return process.nextTick(function afterTick() {\n      fn.apply(null, args);\n    });\n  }\n}\n\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things.  But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals.  It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n    throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n    throw new Error('clearTimeout has not been defined');\n}\n(function () {\n    try {\n        if (typeof setTimeout === 'function') {\n            cachedSetTimeout = setTimeout;\n        } else {\n            cachedSetTimeout = defaultSetTimout;\n        }\n    } catch (e) {\n        cachedSetTimeout = defaultSetTimout;\n    }\n    try {\n        if (typeof clearTimeout === 'function') {\n            cachedClearTimeout = clearTimeout;\n        } else {\n            cachedClearTimeout = defaultClearTimeout;\n        }\n    } catch (e) {\n        cachedClearTimeout = defaultClearTimeout;\n    }\n} ())\nfunction runTimeout(fun) {\n    if (cachedSetTimeout === setTimeout) {\n        //normal enviroments in sane situations\n        return setTimeout(fun, 0);\n    }\n    // if setTimeout wasn't available but was latter defined\n    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n        cachedSetTimeout = setTimeout;\n        return setTimeout(fun, 0);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedSetTimeout(fun, 0);\n    } catch(e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n            return cachedSetTimeout.call(null, fun, 0);\n        } catch(e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n            return cachedSetTimeout.call(this, fun, 0);\n        }\n    }\n\n\n}\nfunction runClearTimeout(marker) {\n    if (cachedClearTimeout === clearTimeout) {\n        //normal enviroments in sane situations\n        return clearTimeout(marker);\n    }\n    // if clearTimeout wasn't available but was latter defined\n    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n        cachedClearTimeout = clearTimeout;\n        return clearTimeout(marker);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedClearTimeout(marker);\n    } catch (e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally\n            return cachedClearTimeout.call(null, marker);\n        } catch (e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n            // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n            return cachedClearTimeout.call(this, marker);\n        }\n    }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n    if (!draining || !currentQueue) {\n        return;\n    }\n    draining = false;\n    if (currentQueue.length) {\n        queue = currentQueue.concat(queue);\n    } else {\n        queueIndex = -1;\n    }\n    if (queue.length) {\n        drainQueue();\n    }\n}\n\nfunction drainQueue() {\n    if (draining) {\n        return;\n    }\n    var timeout = runTimeout(cleanUpNextTick);\n    draining = true;\n\n    var len = queue.length;\n    while(len) {\n        currentQueue = queue;\n        queue = [];\n        while (++queueIndex < len) {\n            if (currentQueue) {\n                currentQueue[queueIndex].run();\n            }\n        }\n        queueIndex = -1;\n        len = queue.length;\n    }\n    currentQueue = null;\n    draining = false;\n    runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n    var args = new Array(arguments.length - 1);\n    if (arguments.length > 1) {\n        for (var i = 1; i < arguments.length; i++) {\n            args[i - 1] = arguments[i];\n        }\n    }\n    queue.push(new Item(fun, args));\n    if (queue.length === 1 && !draining) {\n        runTimeout(drainQueue);\n    }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n    this.fun = fun;\n    this.array = array;\n}\nItem.prototype.run = function () {\n    this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n    throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n    throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","module.exports = require('./lib/_stream_duplex.js');\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n\n'use strict';\n\n/*<replacement>*/\n\nvar pna = require('process-nextick-args');\n/*</replacement>*/\n\n/*<replacement>*/\nvar objectKeys = Object.keys || function (obj) {\n  var keys = [];\n  for (var key in obj) {\n    keys.push(key);\n  }return keys;\n};\n/*</replacement>*/\n\nmodule.exports = Duplex;\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\nvar Readable = require('./_stream_readable');\nvar Writable = require('./_stream_writable');\n\nutil.inherits(Duplex, Readable);\n\n{\n  // avoid scope creep, the keys array can then be collected\n  var keys = objectKeys(Writable.prototype);\n  for (var v = 0; v < keys.length; v++) {\n    var method = keys[v];\n    if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n  }\n}\n\nfunction Duplex(options) {\n  if (!(this instanceof Duplex)) return new Duplex(options);\n\n  Readable.call(this, options);\n  Writable.call(this, options);\n\n  if (options && options.readable === false) this.readable = false;\n\n  if (options && options.writable === false) this.writable = false;\n\n  this.allowHalfOpen = true;\n  if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;\n\n  this.once('end', onend);\n}\n\nObject.defineProperty(Duplex.prototype, 'writableHighWaterMark', {\n  // making it explicit this property is not enumerable\n  // because otherwise some prototype manipulation in\n  // userland will fail\n  enumerable: false,\n  get: function () {\n    return this._writableState.highWaterMark;\n  }\n});\n\n// the no-half-open enforcer\nfunction onend() {\n  // if we allow half-open state, or if the writable side ended,\n  // then we're ok.\n  if (this.allowHalfOpen || this._writableState.ended) return;\n\n  // no more data can be written.\n  // But allow more writes to happen in this tick.\n  pna.nextTick(onEndNT, this);\n}\n\nfunction onEndNT(self) {\n  self.end();\n}\n\nObject.defineProperty(Duplex.prototype, 'destroyed', {\n  get: function () {\n    if (this._readableState === undefined || this._writableState === undefined) {\n      return false;\n    }\n    return this._readableState.destroyed && this._writableState.destroyed;\n  },\n  set: function (value) {\n    // we ignore the value if the stream\n    // has not been initialized yet\n    if (this._readableState === undefined || this._writableState === undefined) {\n      return;\n    }\n\n    // backward compatibility, the user is explicitly\n    // managing destroyed\n    this._readableState.destroyed = value;\n    this._writableState.destroyed = value;\n  }\n});\n\nDuplex.prototype._destroy = function (err, cb) {\n  this.push(null);\n  this.end();\n\n  pna.nextTick(cb, err);\n};","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a passthrough stream.\n// basically just the most minimal sort of Transform stream.\n// Every written chunk gets output as-is.\n\n'use strict';\n\nmodule.exports = PassThrough;\n\nvar Transform = require('./_stream_transform');\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\nutil.inherits(PassThrough, Transform);\n\nfunction PassThrough(options) {\n  if (!(this instanceof PassThrough)) return new PassThrough(options);\n\n  Transform.call(this, options);\n}\n\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n  cb(null, chunk);\n};","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n/*<replacement>*/\n\nvar pna = require('process-nextick-args');\n/*</replacement>*/\n\nmodule.exports = Readable;\n\n/*<replacement>*/\nvar isArray = require('isarray');\n/*</replacement>*/\n\n/*<replacement>*/\nvar Duplex;\n/*</replacement>*/\n\nReadable.ReadableState = ReadableState;\n\n/*<replacement>*/\nvar EE = require('events').EventEmitter;\n\nvar EElistenerCount = function (emitter, type) {\n  return emitter.listeners(type).length;\n};\n/*</replacement>*/\n\n/*<replacement>*/\nvar Stream = require('./internal/streams/stream');\n/*</replacement>*/\n\n/*<replacement>*/\n\nvar Buffer = require('safe-buffer').Buffer;\nvar OurUint8Array = global.Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n  return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n  return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/*</replacement>*/\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\n/*<replacement>*/\nvar debugUtil = require('util');\nvar debug = void 0;\nif (debugUtil && debugUtil.debuglog) {\n  debug = debugUtil.debuglog('stream');\n} else {\n  debug = function () {};\n}\n/*</replacement>*/\n\nvar BufferList = require('./internal/streams/BufferList');\nvar destroyImpl = require('./internal/streams/destroy');\nvar StringDecoder;\n\nutil.inherits(Readable, Stream);\n\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\n\nfunction prependListener(emitter, event, fn) {\n  // Sadly this is not cacheable as some libraries bundle their own\n  // event emitter implementation with them.\n  if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);\n\n  // This is a hack to make sure that our error handler is attached before any\n  // userland ones.  NEVER DO THIS. This is here only because this code needs\n  // to continue to work with older versions of Node.js that do not include\n  // the prependListener() method. The goal is to eventually remove this hack.\n  if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n}\n\nfunction ReadableState(options, stream) {\n  Duplex = Duplex || require('./_stream_duplex');\n\n  options = options || {};\n\n  // Duplex streams are both readable and writable, but share\n  // the same options object.\n  // However, some cases require setting options to different\n  // values for the readable and the writable sides of the duplex stream.\n  // These options can be provided separately as readableXXX and writableXXX.\n  var isDuplex = stream instanceof Duplex;\n\n  // object stream flag. Used to make read(n) ignore n and to\n  // make all the buffer merging and length checks go away\n  this.objectMode = !!options.objectMode;\n\n  if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n  // the point at which it stops calling _read() to fill the buffer\n  // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n  var hwm = options.highWaterMark;\n  var readableHwm = options.readableHighWaterMark;\n  var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n\n  if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;\n\n  // cast to ints.\n  this.highWaterMark = Math.floor(this.highWaterMark);\n\n  // A linked list is used to store data chunks instead of an array because the\n  // linked list can remove elements from the beginning faster than\n  // array.shift()\n  this.buffer = new BufferList();\n  this.length = 0;\n  this.pipes = null;\n  this.pipesCount = 0;\n  this.flowing = null;\n  this.ended = false;\n  this.endEmitted = false;\n  this.reading = false;\n\n  // a flag to be able to tell if the event 'readable'/'data' is emitted\n  // immediately, or on a later tick.  We set this to true at first, because\n  // any actions that shouldn't happen until \"later\" should generally also\n  // not happen before the first read call.\n  this.sync = true;\n\n  // whenever we return null, then we set a flag to say\n  // that we're awaiting a 'readable' event emission.\n  this.needReadable = false;\n  this.emittedReadable = false;\n  this.readableListening = false;\n  this.resumeScheduled = false;\n\n  // has it been destroyed\n  this.destroyed = false;\n\n  // Crypto is kind of old and crusty.  Historically, its default string\n  // encoding is 'binary' so we have to make this configurable.\n  // Everything else in the universe uses 'utf8', though.\n  this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n  // the number of writers that are awaiting a drain event in .pipe()s\n  this.awaitDrain = 0;\n\n  // if true, a maybeReadMore has been scheduled\n  this.readingMore = false;\n\n  this.decoder = null;\n  this.encoding = null;\n  if (options.encoding) {\n    if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n    this.decoder = new StringDecoder(options.encoding);\n    this.encoding = options.encoding;\n  }\n}\n\nfunction Readable(options) {\n  Duplex = Duplex || require('./_stream_duplex');\n\n  if (!(this instanceof Readable)) return new Readable(options);\n\n  this._readableState = new ReadableState(options, this);\n\n  // legacy\n  this.readable = true;\n\n  if (options) {\n    if (typeof options.read === 'function') this._read = options.read;\n\n    if (typeof options.destroy === 'function') this._destroy = options.destroy;\n  }\n\n  Stream.call(this);\n}\n\nObject.defineProperty(Readable.prototype, 'destroyed', {\n  get: function () {\n    if (this._readableState === undefined) {\n      return false;\n    }\n    return this._readableState.destroyed;\n  },\n  set: function (value) {\n    // we ignore the value if the stream\n    // has not been initialized yet\n    if (!this._readableState) {\n      return;\n    }\n\n    // backward compatibility, the user is explicitly\n    // managing destroyed\n    this._readableState.destroyed = value;\n  }\n});\n\nReadable.prototype.destroy = destroyImpl.destroy;\nReadable.prototype._undestroy = destroyImpl.undestroy;\nReadable.prototype._destroy = function (err, cb) {\n  this.push(null);\n  cb(err);\n};\n\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function (chunk, encoding) {\n  var state = this._readableState;\n  var skipChunkCheck;\n\n  if (!state.objectMode) {\n    if (typeof chunk === 'string') {\n      encoding = encoding || state.defaultEncoding;\n      if (encoding !== state.encoding) {\n        chunk = Buffer.from(chunk, encoding);\n        encoding = '';\n      }\n      skipChunkCheck = true;\n    }\n  } else {\n    skipChunkCheck = true;\n  }\n\n  return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n};\n\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function (chunk) {\n  return readableAddChunk(this, chunk, null, true, false);\n};\n\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n  var state = stream._readableState;\n  if (chunk === null) {\n    state.reading = false;\n    onEofChunk(stream, state);\n  } else {\n    var er;\n    if (!skipChunkCheck) er = chunkInvalid(state, chunk);\n    if (er) {\n      stream.emit('error', er);\n    } else if (state.objectMode || chunk && chunk.length > 0) {\n      if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\n        chunk = _uint8ArrayToBuffer(chunk);\n      }\n\n      if (addToFront) {\n        if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);\n      } else if (state.ended) {\n        stream.emit('error', new Error('stream.push() after EOF'));\n      } else {\n        state.reading = false;\n        if (state.decoder && !encoding) {\n          chunk = state.decoder.write(chunk);\n          if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\n        } else {\n          addChunk(stream, state, chunk, false);\n        }\n      }\n    } else if (!addToFront) {\n      state.reading = false;\n    }\n  }\n\n  return needMoreData(state);\n}\n\nfunction addChunk(stream, state, chunk, addToFront) {\n  if (state.flowing && state.length === 0 && !state.sync) {\n    stream.emit('data', chunk);\n    stream.read(0);\n  } else {\n    // update the buffer info.\n    state.length += state.objectMode ? 1 : chunk.length;\n    if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n\n    if (state.needReadable) emitReadable(stream);\n  }\n  maybeReadMore(stream, state);\n}\n\nfunction chunkInvalid(state, chunk) {\n  var er;\n  if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n    er = new TypeError('Invalid non-string/buffer chunk');\n  }\n  return er;\n}\n\n// if it's past the high water mark, we can push in some more.\n// Also, if we have no data yet, we can stand some\n// more bytes.  This is to work around cases where hwm=0,\n// such as the repl.  Also, if the push() triggered a\n// readable event, and the user called read(largeNumber) such that\n// needReadable was set, then we ought to push more, so that another\n// 'readable' event will be triggered.\nfunction needMoreData(state) {\n  return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}\n\nReadable.prototype.isPaused = function () {\n  return this._readableState.flowing === false;\n};\n\n// backwards compatibility.\nReadable.prototype.setEncoding = function (enc) {\n  if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n  this._readableState.decoder = new StringDecoder(enc);\n  this._readableState.encoding = enc;\n  return this;\n};\n\n// Don't raise the hwm > 8MB\nvar MAX_HWM = 0x800000;\nfunction computeNewHighWaterMark(n) {\n  if (n >= MAX_HWM) {\n    n = MAX_HWM;\n  } else {\n    // Get the next highest power of 2 to prevent increasing hwm excessively in\n    // tiny amounts\n    n--;\n    n |= n >>> 1;\n    n |= n >>> 2;\n    n |= n >>> 4;\n    n |= n >>> 8;\n    n |= n >>> 16;\n    n++;\n  }\n  return n;\n}\n\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction howMuchToRead(n, state) {\n  if (n <= 0 || state.length === 0 && state.ended) return 0;\n  if (state.objectMode) return 1;\n  if (n !== n) {\n    // Only flow one buffer at a time\n    if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n  }\n  // If we're asking for more than the current hwm, then raise the hwm.\n  if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n  if (n <= state.length) return n;\n  // Don't have enough\n  if (!state.ended) {\n    state.needReadable = true;\n    return 0;\n  }\n  return state.length;\n}\n\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function (n) {\n  debug('read', n);\n  n = parseInt(n, 10);\n  var state = this._readableState;\n  var nOrig = n;\n\n  if (n !== 0) state.emittedReadable = false;\n\n  // if we're doing read(0) to trigger a readable event, but we\n  // already have a bunch of data in the buffer, then just trigger\n  // the 'readable' event and move on.\n  if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {\n    debug('read: emitReadable', state.length, state.ended);\n    if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n    return null;\n  }\n\n  n = howMuchToRead(n, state);\n\n  // if we've ended, and we're now clear, then finish it up.\n  if (n === 0 && state.ended) {\n    if (state.length === 0) endReadable(this);\n    return null;\n  }\n\n  // All the actual chunk generation logic needs to be\n  // *below* the call to _read.  The reason is that in certain\n  // synthetic stream cases, such as passthrough streams, _read\n  // may be a completely synchronous operation which may change\n  // the state of the read buffer, providing enough data when\n  // before there was *not* enough.\n  //\n  // So, the steps are:\n  // 1. Figure out what the state of things will be after we do\n  // a read from the buffer.\n  //\n  // 2. If that resulting state will trigger a _read, then call _read.\n  // Note that this may be asynchronous, or synchronous.  Yes, it is\n  // deeply ugly to write APIs this way, but that still doesn't mean\n  // that the Readable class should behave improperly, as streams are\n  // designed to be sync/async agnostic.\n  // Take note if the _read call is sync or async (ie, if the read call\n  // has returned yet), so that we know whether or not it's safe to emit\n  // 'readable' etc.\n  //\n  // 3. Actually pull the requested chunks out of the buffer and return.\n\n  // if we need a readable event, then we need to do some reading.\n  var doRead = state.needReadable;\n  debug('need readable', doRead);\n\n  // if we currently have less than the highWaterMark, then also read some\n  if (state.length === 0 || state.length - n < state.highWaterMark) {\n    doRead = true;\n    debug('length less than watermark', doRead);\n  }\n\n  // however, if we've ended, then there's no point, and if we're already\n  // reading, then it's unnecessary.\n  if (state.ended || state.reading) {\n    doRead = false;\n    debug('reading or ended', doRead);\n  } else if (doRead) {\n    debug('do read');\n    state.reading = true;\n    state.sync = true;\n    // if the length is currently zero, then we *need* a readable event.\n    if (state.length === 0) state.needReadable = true;\n    // call internal read method\n    this._read(state.highWaterMark);\n    state.sync = false;\n    // If _read pushed data synchronously, then `reading` will be false,\n    // and we need to re-evaluate how much data we can return to the user.\n    if (!state.reading) n = howMuchToRead(nOrig, state);\n  }\n\n  var ret;\n  if (n > 0) ret = fromList(n, state);else ret = null;\n\n  if (ret === null) {\n    state.needReadable = true;\n    n = 0;\n  } else {\n    state.length -= n;\n  }\n\n  if (state.length === 0) {\n    // If we have nothing in the buffer, then we want to know\n    // as soon as we *do* get something into the buffer.\n    if (!state.ended) state.needReadable = true;\n\n    // If we tried to read() past the EOF, then emit end on the next tick.\n    if (nOrig !== n && state.ended) endReadable(this);\n  }\n\n  if (ret !== null) this.emit('data', ret);\n\n  return ret;\n};\n\nfunction onEofChunk(stream, state) {\n  if (state.ended) return;\n  if (state.decoder) {\n    var chunk = state.decoder.end();\n    if (chunk && chunk.length) {\n      state.buffer.push(chunk);\n      state.length += state.objectMode ? 1 : chunk.length;\n    }\n  }\n  state.ended = true;\n\n  // emit 'readable' now to make sure it gets picked up.\n  emitReadable(stream);\n}\n\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow.  This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n  var state = stream._readableState;\n  state.needReadable = false;\n  if (!state.emittedReadable) {\n    debug('emitReadable', state.flowing);\n    state.emittedReadable = true;\n    if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);\n  }\n}\n\nfunction emitReadable_(stream) {\n  debug('emit readable');\n  stream.emit('readable');\n  flow(stream);\n}\n\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data.  that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n  if (!state.readingMore) {\n    state.readingMore = true;\n    pna.nextTick(maybeReadMore_, stream, state);\n  }\n}\n\nfunction maybeReadMore_(stream, state) {\n  var len = state.length;\n  while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {\n    debug('maybeReadMore read 0');\n    stream.read(0);\n    if (len === state.length)\n      // didn't get any data, stop spinning.\n      break;else len = state.length;\n  }\n  state.readingMore = false;\n}\n\n// abstract method.  to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function (n) {\n  this.emit('error', new Error('_read() is not implemented'));\n};\n\nReadable.prototype.pipe = function (dest, pipeOpts) {\n  var src = this;\n  var state = this._readableState;\n\n  switch (state.pipesCount) {\n    case 0:\n      state.pipes = dest;\n      break;\n    case 1:\n      state.pipes = [state.pipes, dest];\n      break;\n    default:\n      state.pipes.push(dest);\n      break;\n  }\n  state.pipesCount += 1;\n  debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n\n  var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n\n  var endFn = doEnd ? onend : unpipe;\n  if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);\n\n  dest.on('unpipe', onunpipe);\n  function onunpipe(readable, unpipeInfo) {\n    debug('onunpipe');\n    if (readable === src) {\n      if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n        unpipeInfo.hasUnpiped = true;\n        cleanup();\n      }\n    }\n  }\n\n  function onend() {\n    debug('onend');\n    dest.end();\n  }\n\n  // when the dest drains, it reduces the awaitDrain counter\n  // on the source.  This would be more elegant with a .once()\n  // handler in flow(), but adding and removing repeatedly is\n  // too slow.\n  var ondrain = pipeOnDrain(src);\n  dest.on('drain', ondrain);\n\n  var cleanedUp = false;\n  function cleanup() {\n    debug('cleanup');\n    // cleanup event handlers once the pipe is broken\n    dest.removeListener('close', onclose);\n    dest.removeListener('finish', onfinish);\n    dest.removeListener('drain', ondrain);\n    dest.removeListener('error', onerror);\n    dest.removeListener('unpipe', onunpipe);\n    src.removeListener('end', onend);\n    src.removeListener('end', unpipe);\n    src.removeListener('data', ondata);\n\n    cleanedUp = true;\n\n    // if the reader is waiting for a drain event from this\n    // specific writer, then it would cause it to never start\n    // flowing again.\n    // So, if this is awaiting a drain, then we just call it now.\n    // If we don't know, then assume that we are waiting for one.\n    if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n  }\n\n  // If the user pushes more data while we're writing to dest then we'll end up\n  // in ondata again. However, we only want to increase awaitDrain once because\n  // dest will only emit one 'drain' event for the multiple writes.\n  // => Introduce a guard on increasing awaitDrain.\n  var increasedAwaitDrain = false;\n  src.on('data', ondata);\n  function ondata(chunk) {\n    debug('ondata');\n    increasedAwaitDrain = false;\n    var ret = dest.write(chunk);\n    if (false === ret && !increasedAwaitDrain) {\n      // If the user unpiped during `dest.write()`, it is possible\n      // to get stuck in a permanently paused state if that write\n      // also returned false.\n      // => Check whether `dest` is still a piping destination.\n      if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n        debug('false write response, pause', src._readableState.awaitDrain);\n        src._readableState.awaitDrain++;\n        increasedAwaitDrain = true;\n      }\n      src.pause();\n    }\n  }\n\n  // if the dest has an error, then stop piping into it.\n  // however, don't suppress the throwing behavior for this.\n  function onerror(er) {\n    debug('onerror', er);\n    unpipe();\n    dest.removeListener('error', onerror);\n    if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);\n  }\n\n  // Make sure our error handler is attached before userland ones.\n  prependListener(dest, 'error', onerror);\n\n  // Both close and finish should trigger unpipe, but only once.\n  function onclose() {\n    dest.removeListener('finish', onfinish);\n    unpipe();\n  }\n  dest.once('close', onclose);\n  function onfinish() {\n    debug('onfinish');\n    dest.removeListener('close', onclose);\n    unpipe();\n  }\n  dest.once('finish', onfinish);\n\n  function unpipe() {\n    debug('unpipe');\n    src.unpipe(dest);\n  }\n\n  // tell the dest that it's being piped to\n  dest.emit('pipe', src);\n\n  // start the flow if it hasn't been started already.\n  if (!state.flowing) {\n    debug('pipe resume');\n    src.resume();\n  }\n\n  return dest;\n};\n\nfunction pipeOnDrain(src) {\n  return function () {\n    var state = src._readableState;\n    debug('pipeOnDrain', state.awaitDrain);\n    if (state.awaitDrain) state.awaitDrain--;\n    if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n      state.flowing = true;\n      flow(src);\n    }\n  };\n}\n\nReadable.prototype.unpipe = function (dest) {\n  var state = this._readableState;\n  var unpipeInfo = { hasUnpiped: false };\n\n  // if we're not piping anywhere, then do nothing.\n  if (state.pipesCount === 0) return this;\n\n  // just one destination.  most common case.\n  if (state.pipesCount === 1) {\n    // passed in one, but it's not the right one.\n    if (dest && dest !== state.pipes) return this;\n\n    if (!dest) dest = state.pipes;\n\n    // got a match.\n    state.pipes = null;\n    state.pipesCount = 0;\n    state.flowing = false;\n    if (dest) dest.emit('unpipe', this, unpipeInfo);\n    return this;\n  }\n\n  // slow case. multiple pipe destinations.\n\n  if (!dest) {\n    // remove all.\n    var dests = state.pipes;\n    var len = state.pipesCount;\n    state.pipes = null;\n    state.pipesCount = 0;\n    state.flowing = false;\n\n    for (var i = 0; i < len; i++) {\n      dests[i].emit('unpipe', this, unpipeInfo);\n    }return this;\n  }\n\n  // try to find the right one.\n  var index = indexOf(state.pipes, dest);\n  if (index === -1) return this;\n\n  state.pipes.splice(index, 1);\n  state.pipesCount -= 1;\n  if (state.pipesCount === 1) state.pipes = state.pipes[0];\n\n  dest.emit('unpipe', this, unpipeInfo);\n\n  return this;\n};\n\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function (ev, fn) {\n  var res = Stream.prototype.on.call(this, ev, fn);\n\n  if (ev === 'data') {\n    // Start flowing on next tick if stream isn't explicitly paused\n    if (this._readableState.flowing !== false) this.resume();\n  } else if (ev === 'readable') {\n    var state = this._readableState;\n    if (!state.endEmitted && !state.readableListening) {\n      state.readableListening = state.needReadable = true;\n      state.emittedReadable = false;\n      if (!state.reading) {\n        pna.nextTick(nReadingNextTick, this);\n      } else if (state.length) {\n        emitReadable(this);\n      }\n    }\n  }\n\n  return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\n\nfunction nReadingNextTick(self) {\n  debug('readable nexttick read 0');\n  self.read(0);\n}\n\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function () {\n  var state = this._readableState;\n  if (!state.flowing) {\n    debug('resume');\n    state.flowing = true;\n    resume(this, state);\n  }\n  return this;\n};\n\nfunction resume(stream, state) {\n  if (!state.resumeScheduled) {\n    state.resumeScheduled = true;\n    pna.nextTick(resume_, stream, state);\n  }\n}\n\nfunction resume_(stream, state) {\n  if (!state.reading) {\n    debug('resume read 0');\n    stream.read(0);\n  }\n\n  state.resumeScheduled = false;\n  state.awaitDrain = 0;\n  stream.emit('resume');\n  flow(stream);\n  if (state.flowing && !state.reading) stream.read(0);\n}\n\nReadable.prototype.pause = function () {\n  debug('call pause flowing=%j', this._readableState.flowing);\n  if (false !== this._readableState.flowing) {\n    debug('pause');\n    this._readableState.flowing = false;\n    this.emit('pause');\n  }\n  return this;\n};\n\nfunction flow(stream) {\n  var state = stream._readableState;\n  debug('flow', state.flowing);\n  while (state.flowing && stream.read() !== null) {}\n}\n\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function (stream) {\n  var _this = this;\n\n  var state = this._readableState;\n  var paused = false;\n\n  stream.on('end', function () {\n    debug('wrapped end');\n    if (state.decoder && !state.ended) {\n      var chunk = state.decoder.end();\n      if (chunk && chunk.length) _this.push(chunk);\n    }\n\n    _this.push(null);\n  });\n\n  stream.on('data', function (chunk) {\n    debug('wrapped data');\n    if (state.decoder) chunk = state.decoder.write(chunk);\n\n    // don't skip over falsy values in objectMode\n    if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n\n    var ret = _this.push(chunk);\n    if (!ret) {\n      paused = true;\n      stream.pause();\n    }\n  });\n\n  // proxy all the other methods.\n  // important when wrapping filters and duplexes.\n  for (var i in stream) {\n    if (this[i] === undefined && typeof stream[i] === 'function') {\n      this[i] = function (method) {\n        return function () {\n          return stream[method].apply(stream, arguments);\n        };\n      }(i);\n    }\n  }\n\n  // proxy certain important events.\n  for (var n = 0; n < kProxyEvents.length; n++) {\n    stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n  }\n\n  // when we try to consume some more bytes, simply unpause the\n  // underlying stream.\n  this._read = function (n) {\n    debug('wrapped _read', n);\n    if (paused) {\n      paused = false;\n      stream.resume();\n    }\n  };\n\n  return this;\n};\n\nObject.defineProperty(Readable.prototype, 'readableHighWaterMark', {\n  // making it explicit this property is not enumerable\n  // because otherwise some prototype manipulation in\n  // userland will fail\n  enumerable: false,\n  get: function () {\n    return this._readableState.highWaterMark;\n  }\n});\n\n// exposed for testing purposes only.\nReadable._fromList = fromList;\n\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromList(n, state) {\n  // nothing buffered\n  if (state.length === 0) return null;\n\n  var ret;\n  if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n    // read it all, truncate the list\n    if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);\n    state.buffer.clear();\n  } else {\n    // read part of list\n    ret = fromListPartial(n, state.buffer, state.decoder);\n  }\n\n  return ret;\n}\n\n// Extracts only enough buffered data to satisfy the amount requested.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromListPartial(n, list, hasStrings) {\n  var ret;\n  if (n < list.head.data.length) {\n    // slice is the same for buffers and strings\n    ret = list.head.data.slice(0, n);\n    list.head.data = list.head.data.slice(n);\n  } else if (n === list.head.data.length) {\n    // first chunk is a perfect match\n    ret = list.shift();\n  } else {\n    // result spans more than one buffer\n    ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);\n  }\n  return ret;\n}\n\n// Copies a specified amount of characters from the list of buffered data\n// chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBufferString(n, list) {\n  var p = list.head;\n  var c = 1;\n  var ret = p.data;\n  n -= ret.length;\n  while (p = p.next) {\n    var str = p.data;\n    var nb = n > str.length ? str.length : n;\n    if (nb === str.length) ret += str;else ret += str.slice(0, n);\n    n -= nb;\n    if (n === 0) {\n      if (nb === str.length) {\n        ++c;\n        if (p.next) list.head = p.next;else list.head = list.tail = null;\n      } else {\n        list.head = p;\n        p.data = str.slice(nb);\n      }\n      break;\n    }\n    ++c;\n  }\n  list.length -= c;\n  return ret;\n}\n\n// Copies a specified amount of bytes from the list of buffered data chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBuffer(n, list) {\n  var ret = Buffer.allocUnsafe(n);\n  var p = list.head;\n  var c = 1;\n  p.data.copy(ret);\n  n -= p.data.length;\n  while (p = p.next) {\n    var buf = p.data;\n    var nb = n > buf.length ? buf.length : n;\n    buf.copy(ret, ret.length - n, 0, nb);\n    n -= nb;\n    if (n === 0) {\n      if (nb === buf.length) {\n        ++c;\n        if (p.next) list.head = p.next;else list.head = list.tail = null;\n      } else {\n        list.head = p;\n        p.data = buf.slice(nb);\n      }\n      break;\n    }\n    ++c;\n  }\n  list.length -= c;\n  return ret;\n}\n\nfunction endReadable(stream) {\n  var state = stream._readableState;\n\n  // If we get here before consuming all the bytes, then that is a\n  // bug in node.  Should never happen.\n  if (state.length > 0) throw new Error('\"endReadable()\" called on non-empty stream');\n\n  if (!state.endEmitted) {\n    state.ended = true;\n    pna.nextTick(endReadableNT, state, stream);\n  }\n}\n\nfunction endReadableNT(state, stream) {\n  // Check that we didn't get one last unshift.\n  if (!state.endEmitted && state.length === 0) {\n    state.endEmitted = true;\n    stream.readable = false;\n    stream.emit('end');\n  }\n}\n\nfunction indexOf(xs, x) {\n  for (var i = 0, l = xs.length; i < l; i++) {\n    if (xs[i] === x) return i;\n  }\n  return -1;\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a transform stream is a readable/writable stream where you do\n// something with the data.  Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored.  (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation.  For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes.  When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up.  When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer.  When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks.  If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk.  However,\n// a pathological inflate type of transform can cause excessive buffering\n// here.  For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output.  Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output.  In this case, you could write a very small\n// amount of input, and end up with a very large amount of output.  In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform.  A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n\n'use strict';\n\nmodule.exports = Transform;\n\nvar Duplex = require('./_stream_duplex');\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\nutil.inherits(Transform, Duplex);\n\nfunction afterTransform(er, data) {\n  var ts = this._transformState;\n  ts.transforming = false;\n\n  var cb = ts.writecb;\n\n  if (!cb) {\n    return this.emit('error', new Error('write callback called multiple times'));\n  }\n\n  ts.writechunk = null;\n  ts.writecb = null;\n\n  if (data != null) // single equals check for both `null` and `undefined`\n    this.push(data);\n\n  cb(er);\n\n  var rs = this._readableState;\n  rs.reading = false;\n  if (rs.needReadable || rs.length < rs.highWaterMark) {\n    this._read(rs.highWaterMark);\n  }\n}\n\nfunction Transform(options) {\n  if (!(this instanceof Transform)) return new Transform(options);\n\n  Duplex.call(this, options);\n\n  this._transformState = {\n    afterTransform: afterTransform.bind(this),\n    needTransform: false,\n    transforming: false,\n    writecb: null,\n    writechunk: null,\n    writeencoding: null\n  };\n\n  // start out asking for a readable event once data is transformed.\n  this._readableState.needReadable = true;\n\n  // we have implemented the _read method, and done the other things\n  // that Readable wants before the first _read call, so unset the\n  // sync guard flag.\n  this._readableState.sync = false;\n\n  if (options) {\n    if (typeof options.transform === 'function') this._transform = options.transform;\n\n    if (typeof options.flush === 'function') this._flush = options.flush;\n  }\n\n  // When the writable side finishes, then flush out anything remaining.\n  this.on('prefinish', prefinish);\n}\n\nfunction prefinish() {\n  var _this = this;\n\n  if (typeof this._flush === 'function') {\n    this._flush(function (er, data) {\n      done(_this, er, data);\n    });\n  } else {\n    done(this, null, null);\n  }\n}\n\nTransform.prototype.push = function (chunk, encoding) {\n  this._transformState.needTransform = false;\n  return Duplex.prototype.push.call(this, chunk, encoding);\n};\n\n// This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side.  You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk.  If you pass\n// an error, then that'll put the hurt on the whole operation.  If you\n// never call cb(), then you'll never get another chunk.\nTransform.prototype._transform = function (chunk, encoding, cb) {\n  throw new Error('_transform() is not implemented');\n};\n\nTransform.prototype._write = function (chunk, encoding, cb) {\n  var ts = this._transformState;\n  ts.writecb = cb;\n  ts.writechunk = chunk;\n  ts.writeencoding = encoding;\n  if (!ts.transforming) {\n    var rs = this._readableState;\n    if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n  }\n};\n\n// Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\nTransform.prototype._read = function (n) {\n  var ts = this._transformState;\n\n  if (ts.writechunk !== null && ts.writecb && !ts.transforming) {\n    ts.transforming = true;\n    this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n  } else {\n    // mark that we need a transform, so that any data that comes in\n    // will get processed, now that we've asked for it.\n    ts.needTransform = true;\n  }\n};\n\nTransform.prototype._destroy = function (err, cb) {\n  var _this2 = this;\n\n  Duplex.prototype._destroy.call(this, err, function (err2) {\n    cb(err2);\n    _this2.emit('close');\n  });\n};\n\nfunction done(stream, er, data) {\n  if (er) return stream.emit('error', er);\n\n  if (data != null) // single equals check for both `null` and `undefined`\n    stream.push(data);\n\n  // if there's nothing in the write buffer, then that means\n  // that nothing more will ever be provided\n  if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');\n\n  if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');\n\n  return stream.push(null);\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n'use strict';\n\n/*<replacement>*/\n\nvar pna = require('process-nextick-args');\n/*</replacement>*/\n\nmodule.exports = Writable;\n\n/* <replacement> */\nfunction WriteReq(chunk, encoding, cb) {\n  this.chunk = chunk;\n  this.encoding = encoding;\n  this.callback = cb;\n  this.next = null;\n}\n\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n  var _this = this;\n\n  this.next = null;\n  this.entry = null;\n  this.finish = function () {\n    onCorkedFinish(_this, state);\n  };\n}\n/* </replacement> */\n\n/*<replacement>*/\nvar asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;\n/*</replacement>*/\n\n/*<replacement>*/\nvar Duplex;\n/*</replacement>*/\n\nWritable.WritableState = WritableState;\n\n/*<replacement>*/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/*</replacement>*/\n\n/*<replacement>*/\nvar internalUtil = {\n  deprecate: require('util-deprecate')\n};\n/*</replacement>*/\n\n/*<replacement>*/\nvar Stream = require('./internal/streams/stream');\n/*</replacement>*/\n\n/*<replacement>*/\n\nvar Buffer = require('safe-buffer').Buffer;\nvar OurUint8Array = global.Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n  return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n  return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/*</replacement>*/\n\nvar destroyImpl = require('./internal/streams/destroy');\n\nutil.inherits(Writable, Stream);\n\nfunction nop() {}\n\nfunction WritableState(options, stream) {\n  Duplex = Duplex || require('./_stream_duplex');\n\n  options = options || {};\n\n  // Duplex streams are both readable and writable, but share\n  // the same options object.\n  // However, some cases require setting options to different\n  // values for the readable and the writable sides of the duplex stream.\n  // These options can be provided separately as readableXXX and writableXXX.\n  var isDuplex = stream instanceof Duplex;\n\n  // object stream flag to indicate whether or not this stream\n  // contains buffers or objects.\n  this.objectMode = !!options.objectMode;\n\n  if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n  // the point at which write() starts returning false\n  // Note: 0 is a valid value, means that we always return false if\n  // the entire buffer is not flushed immediately on write()\n  var hwm = options.highWaterMark;\n  var writableHwm = options.writableHighWaterMark;\n  var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n\n  if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;\n\n  // cast to ints.\n  this.highWaterMark = Math.floor(this.highWaterMark);\n\n  // if _final has been called\n  this.finalCalled = false;\n\n  // drain event flag.\n  this.needDrain = false;\n  // at the start of calling end()\n  this.ending = false;\n  // when end() has been called, and returned\n  this.ended = false;\n  // when 'finish' is emitted\n  this.finished = false;\n\n  // has it been destroyed\n  this.destroyed = false;\n\n  // should we decode strings into buffers before passing to _write?\n  // this is here so that some node-core streams can optimize string\n  // handling at a lower level.\n  var noDecode = options.decodeStrings === false;\n  this.decodeStrings = !noDecode;\n\n  // Crypto is kind of old and crusty.  Historically, its default string\n  // encoding is 'binary' so we have to make this configurable.\n  // Everything else in the universe uses 'utf8', though.\n  this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n  // not an actual buffer we keep track of, but a measurement\n  // of how much we're waiting to get pushed to some underlying\n  // socket or file.\n  this.length = 0;\n\n  // a flag to see when we're in the middle of a write.\n  this.writing = false;\n\n  // when true all writes will be buffered until .uncork() call\n  this.corked = 0;\n\n  // a flag to be able to tell if the onwrite cb is called immediately,\n  // or on a later tick.  We set this to true at first, because any\n  // actions that shouldn't happen until \"later\" should generally also\n  // not happen before the first write call.\n  this.sync = true;\n\n  // a flag to know if we're processing previously buffered items, which\n  // may call the _write() callback in the same tick, so that we don't\n  // end up in an overlapped onwrite situation.\n  this.bufferProcessing = false;\n\n  // the callback that's passed to _write(chunk,cb)\n  this.onwrite = function (er) {\n    onwrite(stream, er);\n  };\n\n  // the callback that the user supplies to write(chunk,encoding,cb)\n  this.writecb = null;\n\n  // the amount that is being written when _write is called.\n  this.writelen = 0;\n\n  this.bufferedRequest = null;\n  this.lastBufferedRequest = null;\n\n  // number of pending user-supplied write callbacks\n  // this must be 0 before 'finish' can be emitted\n  this.pendingcb = 0;\n\n  // emit prefinish if the only thing we're waiting for is _write cbs\n  // This is relevant for synchronous Transform streams\n  this.prefinished = false;\n\n  // True if the error was already emitted and should not be thrown again\n  this.errorEmitted = false;\n\n  // count buffered requests\n  this.bufferedRequestCount = 0;\n\n  // allocate the first CorkedRequest, there is always\n  // one allocated and free to use, and we maintain at most two\n  this.corkedRequestsFree = new CorkedRequest(this);\n}\n\nWritableState.prototype.getBuffer = function getBuffer() {\n  var current = this.bufferedRequest;\n  var out = [];\n  while (current) {\n    out.push(current);\n    current = current.next;\n  }\n  return out;\n};\n\n(function () {\n  try {\n    Object.defineProperty(WritableState.prototype, 'buffer', {\n      get: internalUtil.deprecate(function () {\n        return this.getBuffer();\n      }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\n    });\n  } catch (_) {}\n})();\n\n// Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\nvar realHasInstance;\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\n  realHasInstance = Function.prototype[Symbol.hasInstance];\n  Object.defineProperty(Writable, Symbol.hasInstance, {\n    value: function (object) {\n      if (realHasInstance.call(this, object)) return true;\n      if (this !== Writable) return false;\n\n      return object && object._writableState instanceof WritableState;\n    }\n  });\n} else {\n  realHasInstance = function (object) {\n    return object instanceof this;\n  };\n}\n\nfunction Writable(options) {\n  Duplex = Duplex || require('./_stream_duplex');\n\n  // Writable ctor is applied to Duplexes, too.\n  // `realHasInstance` is necessary because using plain `instanceof`\n  // would return false, as no `_writableState` property is attached.\n\n  // Trying to use the custom `instanceof` for Writable here will also break the\n  // Node.js LazyTransform implementation, which has a non-trivial getter for\n  // `_writableState` that would lead to infinite recursion.\n  if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {\n    return new Writable(options);\n  }\n\n  this._writableState = new WritableState(options, this);\n\n  // legacy.\n  this.writable = true;\n\n  if (options) {\n    if (typeof options.write === 'function') this._write = options.write;\n\n    if (typeof options.writev === 'function') this._writev = options.writev;\n\n    if (typeof options.destroy === 'function') this._destroy = options.destroy;\n\n    if (typeof options.final === 'function') this._final = options.final;\n  }\n\n  Stream.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n  this.emit('error', new Error('Cannot pipe, not readable'));\n};\n\nfunction writeAfterEnd(stream, cb) {\n  var er = new Error('write after end');\n  // TODO: defer error events consistently everywhere, not just the cb\n  stream.emit('error', er);\n  pna.nextTick(cb, er);\n}\n\n// Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\nfunction validChunk(stream, state, chunk, cb) {\n  var valid = true;\n  var er = false;\n\n  if (chunk === null) {\n    er = new TypeError('May not write null values to stream');\n  } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n    er = new TypeError('Invalid non-string/buffer chunk');\n  }\n  if (er) {\n    stream.emit('error', er);\n    pna.nextTick(cb, er);\n    valid = false;\n  }\n  return valid;\n}\n\nWritable.prototype.write = function (chunk, encoding, cb) {\n  var state = this._writableState;\n  var ret = false;\n  var isBuf = !state.objectMode && _isUint8Array(chunk);\n\n  if (isBuf && !Buffer.isBuffer(chunk)) {\n    chunk = _uint8ArrayToBuffer(chunk);\n  }\n\n  if (typeof encoding === 'function') {\n    cb = encoding;\n    encoding = null;\n  }\n\n  if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n\n  if (typeof cb !== 'function') cb = nop;\n\n  if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\n    state.pendingcb++;\n    ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n  }\n\n  return ret;\n};\n\nWritable.prototype.cork = function () {\n  var state = this._writableState;\n\n  state.corked++;\n};\n\nWritable.prototype.uncork = function () {\n  var state = this._writableState;\n\n  if (state.corked) {\n    state.corked--;\n\n    if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n  }\n};\n\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n  // node::ParseEncoding() requires lower case.\n  if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n  if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);\n  this._writableState.defaultEncoding = encoding;\n  return this;\n};\n\nfunction decodeChunk(state, chunk, encoding) {\n  if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n    chunk = Buffer.from(chunk, encoding);\n  }\n  return chunk;\n}\n\nObject.defineProperty(Writable.prototype, 'writableHighWaterMark', {\n  // making it explicit this property is not enumerable\n  // because otherwise some prototype manipulation in\n  // userland will fail\n  enumerable: false,\n  get: function () {\n    return this._writableState.highWaterMark;\n  }\n});\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn.  Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n  if (!isBuf) {\n    var newChunk = decodeChunk(state, chunk, encoding);\n    if (chunk !== newChunk) {\n      isBuf = true;\n      encoding = 'buffer';\n      chunk = newChunk;\n    }\n  }\n  var len = state.objectMode ? 1 : chunk.length;\n\n  state.length += len;\n\n  var ret = state.length < state.highWaterMark;\n  // we must ensure that previous needDrain will not be reset to false.\n  if (!ret) state.needDrain = true;\n\n  if (state.writing || state.corked) {\n    var last = state.lastBufferedRequest;\n    state.lastBufferedRequest = {\n      chunk: chunk,\n      encoding: encoding,\n      isBuf: isBuf,\n      callback: cb,\n      next: null\n    };\n    if (last) {\n      last.next = state.lastBufferedRequest;\n    } else {\n      state.bufferedRequest = state.lastBufferedRequest;\n    }\n    state.bufferedRequestCount += 1;\n  } else {\n    doWrite(stream, state, false, len, chunk, encoding, cb);\n  }\n\n  return ret;\n}\n\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n  state.writelen = len;\n  state.writecb = cb;\n  state.writing = true;\n  state.sync = true;\n  if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n  state.sync = false;\n}\n\nfunction onwriteError(stream, state, sync, er, cb) {\n  --state.pendingcb;\n\n  if (sync) {\n    // defer the callback if we are being called synchronously\n    // to avoid piling up things on the stack\n    pna.nextTick(cb, er);\n    // this can emit finish, and it will always happen\n    // after error\n    pna.nextTick(finishMaybe, stream, state);\n    stream._writableState.errorEmitted = true;\n    stream.emit('error', er);\n  } else {\n    // the caller expect this to happen before if\n    // it is async\n    cb(er);\n    stream._writableState.errorEmitted = true;\n    stream.emit('error', er);\n    // this can emit finish, but finish must\n    // always follow error\n    finishMaybe(stream, state);\n  }\n}\n\nfunction onwriteStateUpdate(state) {\n  state.writing = false;\n  state.writecb = null;\n  state.length -= state.writelen;\n  state.writelen = 0;\n}\n\nfunction onwrite(stream, er) {\n  var state = stream._writableState;\n  var sync = state.sync;\n  var cb = state.writecb;\n\n  onwriteStateUpdate(state);\n\n  if (er) onwriteError(stream, state, sync, er, cb);else {\n    // Check if we're actually ready to finish, but don't emit yet\n    var finished = needFinish(state);\n\n    if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n      clearBuffer(stream, state);\n    }\n\n    if (sync) {\n      /*<replacement>*/\n      asyncWrite(afterWrite, stream, state, finished, cb);\n      /*</replacement>*/\n    } else {\n      afterWrite(stream, state, finished, cb);\n    }\n  }\n}\n\nfunction afterWrite(stream, state, finished, cb) {\n  if (!finished) onwriteDrain(stream, state);\n  state.pendingcb--;\n  cb();\n  finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n  if (state.length === 0 && state.needDrain) {\n    state.needDrain = false;\n    stream.emit('drain');\n  }\n}\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n  state.bufferProcessing = true;\n  var entry = state.bufferedRequest;\n\n  if (stream._writev && entry && entry.next) {\n    // Fast case, write everything using _writev()\n    var l = state.bufferedRequestCount;\n    var buffer = new Array(l);\n    var holder = state.corkedRequestsFree;\n    holder.entry = entry;\n\n    var count = 0;\n    var allBuffers = true;\n    while (entry) {\n      buffer[count] = entry;\n      if (!entry.isBuf) allBuffers = false;\n      entry = entry.next;\n      count += 1;\n    }\n    buffer.allBuffers = allBuffers;\n\n    doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n    // doWrite is almost always async, defer these to save a bit of time\n    // as the hot path ends with doWrite\n    state.pendingcb++;\n    state.lastBufferedRequest = null;\n    if (holder.next) {\n      state.corkedRequestsFree = holder.next;\n      holder.next = null;\n    } else {\n      state.corkedRequestsFree = new CorkedRequest(state);\n    }\n    state.bufferedRequestCount = 0;\n  } else {\n    // Slow case, write chunks one-by-one\n    while (entry) {\n      var chunk = entry.chunk;\n      var encoding = entry.encoding;\n      var cb = entry.callback;\n      var len = state.objectMode ? 1 : chunk.length;\n\n      doWrite(stream, state, false, len, chunk, encoding, cb);\n      entry = entry.next;\n      state.bufferedRequestCount--;\n      // if we didn't call the onwrite immediately, then\n      // it means that we need to wait until it does.\n      // also, that means that the chunk and cb are currently\n      // being processed, so move the buffer counter past them.\n      if (state.writing) {\n        break;\n      }\n    }\n\n    if (entry === null) state.lastBufferedRequest = null;\n  }\n\n  state.bufferedRequest = entry;\n  state.bufferProcessing = false;\n}\n\nWritable.prototype._write = function (chunk, encoding, cb) {\n  cb(new Error('_write() is not implemented'));\n};\n\nWritable.prototype._writev = null;\n\nWritable.prototype.end = function (chunk, encoding, cb) {\n  var state = this._writableState;\n\n  if (typeof chunk === 'function') {\n    cb = chunk;\n    chunk = null;\n    encoding = null;\n  } else if (typeof encoding === 'function') {\n    cb = encoding;\n    encoding = null;\n  }\n\n  if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n  // .end() fully uncorks\n  if (state.corked) {\n    state.corked = 1;\n    this.uncork();\n  }\n\n  // ignore unnecessary end() calls.\n  if (!state.ending && !state.finished) endWritable(this, state, cb);\n};\n\nfunction needFinish(state) {\n  return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\nfunction callFinal(stream, state) {\n  stream._final(function (err) {\n    state.pendingcb--;\n    if (err) {\n      stream.emit('error', err);\n    }\n    state.prefinished = true;\n    stream.emit('prefinish');\n    finishMaybe(stream, state);\n  });\n}\nfunction prefinish(stream, state) {\n  if (!state.prefinished && !state.finalCalled) {\n    if (typeof stream._final === 'function') {\n      state.pendingcb++;\n      state.finalCalled = true;\n      pna.nextTick(callFinal, stream, state);\n    } else {\n      state.prefinished = true;\n      stream.emit('prefinish');\n    }\n  }\n}\n\nfunction finishMaybe(stream, state) {\n  var need = needFinish(state);\n  if (need) {\n    prefinish(stream, state);\n    if (state.pendingcb === 0) {\n      state.finished = true;\n      stream.emit('finish');\n    }\n  }\n  return need;\n}\n\nfunction endWritable(stream, state, cb) {\n  state.ending = true;\n  finishMaybe(stream, state);\n  if (cb) {\n    if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);\n  }\n  state.ended = true;\n  stream.writable = false;\n}\n\nfunction onCorkedFinish(corkReq, state, err) {\n  var entry = corkReq.entry;\n  corkReq.entry = null;\n  while (entry) {\n    var cb = entry.callback;\n    state.pendingcb--;\n    cb(err);\n    entry = entry.next;\n  }\n  if (state.corkedRequestsFree) {\n    state.corkedRequestsFree.next = corkReq;\n  } else {\n    state.corkedRequestsFree = corkReq;\n  }\n}\n\nObject.defineProperty(Writable.prototype, 'destroyed', {\n  get: function () {\n    if (this._writableState === undefined) {\n      return false;\n    }\n    return this._writableState.destroyed;\n  },\n  set: function (value) {\n    // we ignore the value if the stream\n    // has not been initialized yet\n    if (!this._writableState) {\n      return;\n    }\n\n    // backward compatibility, the user is explicitly\n    // managing destroyed\n    this._writableState.destroyed = value;\n  }\n});\n\nWritable.prototype.destroy = destroyImpl.destroy;\nWritable.prototype._undestroy = destroyImpl.undestroy;\nWritable.prototype._destroy = function (err, cb) {\n  this.end();\n  cb(err);\n};","'use strict';\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Buffer = require('safe-buffer').Buffer;\nvar util = require('util');\n\nfunction copyBuffer(src, target, offset) {\n  src.copy(target, offset);\n}\n\nmodule.exports = function () {\n  function BufferList() {\n    _classCallCheck(this, BufferList);\n\n    this.head = null;\n    this.tail = null;\n    this.length = 0;\n  }\n\n  BufferList.prototype.push = function push(v) {\n    var entry = { data: v, next: null };\n    if (this.length > 0) this.tail.next = entry;else this.head = entry;\n    this.tail = entry;\n    ++this.length;\n  };\n\n  BufferList.prototype.unshift = function unshift(v) {\n    var entry = { data: v, next: this.head };\n    if (this.length === 0) this.tail = entry;\n    this.head = entry;\n    ++this.length;\n  };\n\n  BufferList.prototype.shift = function shift() {\n    if (this.length === 0) return;\n    var ret = this.head.data;\n    if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n    --this.length;\n    return ret;\n  };\n\n  BufferList.prototype.clear = function clear() {\n    this.head = this.tail = null;\n    this.length = 0;\n  };\n\n  BufferList.prototype.join = function join(s) {\n    if (this.length === 0) return '';\n    var p = this.head;\n    var ret = '' + p.data;\n    while (p = p.next) {\n      ret += s + p.data;\n    }return ret;\n  };\n\n  BufferList.prototype.concat = function concat(n) {\n    if (this.length === 0) return Buffer.alloc(0);\n    if (this.length === 1) return this.head.data;\n    var ret = Buffer.allocUnsafe(n >>> 0);\n    var p = this.head;\n    var i = 0;\n    while (p) {\n      copyBuffer(p.data, ret, i);\n      i += p.data.length;\n      p = p.next;\n    }\n    return ret;\n  };\n\n  return BufferList;\n}();\n\nif (util && util.inspect && util.inspect.custom) {\n  module.exports.prototype[util.inspect.custom] = function () {\n    var obj = util.inspect({ length: this.length });\n    return this.constructor.name + ' ' + obj;\n  };\n}","'use strict';\n\n/*<replacement>*/\n\nvar pna = require('process-nextick-args');\n/*</replacement>*/\n\n// undocumented cb() API, needed for core, not for public API\nfunction destroy(err, cb) {\n  var _this = this;\n\n  var readableDestroyed = this._readableState && this._readableState.destroyed;\n  var writableDestroyed = this._writableState && this._writableState.destroyed;\n\n  if (readableDestroyed || writableDestroyed) {\n    if (cb) {\n      cb(err);\n    } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {\n      pna.nextTick(emitErrorNT, this, err);\n    }\n    return this;\n  }\n\n  // we set destroyed to true before firing error callbacks in order\n  // to make it re-entrance safe in case destroy() is called within callbacks\n\n  if (this._readableState) {\n    this._readableState.destroyed = true;\n  }\n\n  // if this is a duplex stream mark the writable part as destroyed as well\n  if (this._writableState) {\n    this._writableState.destroyed = true;\n  }\n\n  this._destroy(err || null, function (err) {\n    if (!cb && err) {\n      pna.nextTick(emitErrorNT, _this, err);\n      if (_this._writableState) {\n        _this._writableState.errorEmitted = true;\n      }\n    } else if (cb) {\n      cb(err);\n    }\n  });\n\n  return this;\n}\n\nfunction undestroy() {\n  if (this._readableState) {\n    this._readableState.destroyed = false;\n    this._readableState.reading = false;\n    this._readableState.ended = false;\n    this._readableState.endEmitted = false;\n  }\n\n  if (this._writableState) {\n    this._writableState.destroyed = false;\n    this._writableState.ended = false;\n    this._writableState.ending = false;\n    this._writableState.finished = false;\n    this._writableState.errorEmitted = false;\n  }\n}\n\nfunction emitErrorNT(self, err) {\n  self.emit('error', err);\n}\n\nmodule.exports = {\n  destroy: destroy,\n  undestroy: undestroy\n};","module.exports = require('events').EventEmitter;\n","module.exports = require('./readable').PassThrough\n","exports = module.exports = require('./lib/_stream_readable.js');\nexports.Stream = exports;\nexports.Readable = exports;\nexports.Writable = require('./lib/_stream_writable.js');\nexports.Duplex = require('./lib/_stream_duplex.js');\nexports.Transform = require('./lib/_stream_transform.js');\nexports.PassThrough = require('./lib/_stream_passthrough.js');\n","module.exports = require('./readable').Transform\n","module.exports = require('./lib/_stream_writable.js');\n","/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n  for (var key in src) {\n    dst[key] = src[key]\n  }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n  module.exports = buffer\n} else {\n  // Copy properties from require('buffer')\n  copyProps(buffer, exports)\n  exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n  return Buffer(arg, encodingOrOffset, length)\n}\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n  if (typeof arg === 'number') {\n    throw new TypeError('Argument must not be a number')\n  }\n  return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n  if (typeof size !== 'number') {\n    throw new TypeError('Argument must be a number')\n  }\n  var buf = Buffer(size)\n  if (fill !== undefined) {\n    if (typeof encoding === 'string') {\n      buf.fill(fill, encoding)\n    } else {\n      buf.fill(fill)\n    }\n  } else {\n    buf.fill(0)\n  }\n  return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n  if (typeof size !== 'number') {\n    throw new TypeError('Argument must be a number')\n  }\n  return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n  if (typeof size !== 'number') {\n    throw new TypeError('Argument must be a number')\n  }\n  return buffer.SlowBuffer(size)\n}\n","(function (global, undefined) {\n    \"use strict\";\n\n    if (global.setImmediate) {\n        return;\n    }\n\n    var nextHandle = 1; // Spec says greater than zero\n    var tasksByHandle = {};\n    var currentlyRunningATask = false;\n    var doc = global.document;\n    var registerImmediate;\n\n    function setImmediate(callback) {\n      // Callback can either be a function or a string\n      if (typeof callback !== \"function\") {\n        callback = new Function(\"\" + callback);\n      }\n      // Copy function arguments\n      var args = new Array(arguments.length - 1);\n      for (var i = 0; i < args.length; i++) {\n          args[i] = arguments[i + 1];\n      }\n      // Store and register the task\n      var task = { callback: callback, args: args };\n      tasksByHandle[nextHandle] = task;\n      registerImmediate(nextHandle);\n      return nextHandle++;\n    }\n\n    function clearImmediate(handle) {\n        delete tasksByHandle[handle];\n    }\n\n    function run(task) {\n        var callback = task.callback;\n        var args = task.args;\n        switch (args.length) {\n        case 0:\n            callback();\n            break;\n        case 1:\n            callback(args[0]);\n            break;\n        case 2:\n            callback(args[0], args[1]);\n            break;\n        case 3:\n            callback(args[0], args[1], args[2]);\n            break;\n        default:\n            callback.apply(undefined, args);\n            break;\n        }\n    }\n\n    function runIfPresent(handle) {\n        // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n        // So if we're currently running a task, we'll need to delay this invocation.\n        if (currentlyRunningATask) {\n            // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n            // \"too much recursion\" error.\n            setTimeout(runIfPresent, 0, handle);\n        } else {\n            var task = tasksByHandle[handle];\n            if (task) {\n                currentlyRunningATask = true;\n                try {\n                    run(task);\n                } finally {\n                    clearImmediate(handle);\n                    currentlyRunningATask = false;\n                }\n            }\n        }\n    }\n\n    function installNextTickImplementation() {\n        registerImmediate = function(handle) {\n            process.nextTick(function () { runIfPresent(handle); });\n        };\n    }\n\n    function canUsePostMessage() {\n        // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n        // where `global.postMessage` means something completely different and can't be used for this purpose.\n        if (global.postMessage && !global.importScripts) {\n            var postMessageIsAsynchronous = true;\n            var oldOnMessage = global.onmessage;\n            global.onmessage = function() {\n                postMessageIsAsynchronous = false;\n            };\n            global.postMessage(\"\", \"*\");\n            global.onmessage = oldOnMessage;\n            return postMessageIsAsynchronous;\n        }\n    }\n\n    function installPostMessageImplementation() {\n        // Installs an event handler on `global` for the `message` event: see\n        // * https://developer.mozilla.org/en/DOM/window.postMessage\n        // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n        var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n        var onGlobalMessage = function(event) {\n            if (event.source === global &&\n                typeof event.data === \"string\" &&\n                event.data.indexOf(messagePrefix) === 0) {\n                runIfPresent(+event.data.slice(messagePrefix.length));\n            }\n        };\n\n        if (global.addEventListener) {\n            global.addEventListener(\"message\", onGlobalMessage, false);\n        } else {\n            global.attachEvent(\"onmessage\", onGlobalMessage);\n        }\n\n        registerImmediate = function(handle) {\n            global.postMessage(messagePrefix + handle, \"*\");\n        };\n    }\n\n    function installMessageChannelImplementation() {\n        var channel = new MessageChannel();\n        channel.port1.onmessage = function(event) {\n            var handle = event.data;\n            runIfPresent(handle);\n        };\n\n        registerImmediate = function(handle) {\n            channel.port2.postMessage(handle);\n        };\n    }\n\n    function installReadyStateChangeImplementation() {\n        var html = doc.documentElement;\n        registerImmediate = function(handle) {\n            // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n            // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n            var script = doc.createElement(\"script\");\n            script.onreadystatechange = function () {\n                runIfPresent(handle);\n                script.onreadystatechange = null;\n                html.removeChild(script);\n                script = null;\n            };\n            html.appendChild(script);\n        };\n    }\n\n    function installSetTimeoutImplementation() {\n        registerImmediate = function(handle) {\n            setTimeout(runIfPresent, 0, handle);\n        };\n    }\n\n    // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\n    var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n    attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n\n    // Don't get fooled by e.g. browserify environments.\n    if ({}.toString.call(global.process) === \"[object process]\") {\n        // For Node.js before 0.9\n        installNextTickImplementation();\n\n    } else if (canUsePostMessage()) {\n        // For non-IE10 modern browsers\n        installPostMessageImplementation();\n\n    } else if (global.MessageChannel) {\n        // For web workers, where supported\n        installMessageChannelImplementation();\n\n    } else if (doc && \"onreadystatechange\" in doc.createElement(\"script\")) {\n        // For IE 6–8\n        installReadyStateChangeImplementation();\n\n    } else {\n        // For older browsers\n        installSetTimeoutImplementation();\n    }\n\n    attachTo.setImmediate = setImmediate;\n    attachTo.clearImmediate = clearImmediate;\n}(typeof self === \"undefined\" ? typeof global === \"undefined\" ? this : global : self));\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nmodule.exports = Stream;\n\nvar EE = require('events').EventEmitter;\nvar inherits = require('inherits');\n\ninherits(Stream, EE);\nStream.Readable = require('readable-stream/readable.js');\nStream.Writable = require('readable-stream/writable.js');\nStream.Duplex = require('readable-stream/duplex.js');\nStream.Transform = require('readable-stream/transform.js');\nStream.PassThrough = require('readable-stream/passthrough.js');\n\n// Backwards-compat with node 0.4.x\nStream.Stream = Stream;\n\n\n\n// old-style streams.  Note that the pipe method (the only relevant\n// part of this class) is overridden in the Readable class.\n\nfunction Stream() {\n  EE.call(this);\n}\n\nStream.prototype.pipe = function(dest, options) {\n  var source = this;\n\n  function ondata(chunk) {\n    if (dest.writable) {\n      if (false === dest.write(chunk) && source.pause) {\n        source.pause();\n      }\n    }\n  }\n\n  source.on('data', ondata);\n\n  function ondrain() {\n    if (source.readable && source.resume) {\n      source.resume();\n    }\n  }\n\n  dest.on('drain', ondrain);\n\n  // If the 'end' option is not supplied, dest.end() will be called when\n  // source gets the 'end' or 'close' events.  Only dest.end() once.\n  if (!dest._isStdio && (!options || options.end !== false)) {\n    source.on('end', onend);\n    source.on('close', onclose);\n  }\n\n  var didOnEnd = false;\n  function onend() {\n    if (didOnEnd) return;\n    didOnEnd = true;\n\n    dest.end();\n  }\n\n\n  function onclose() {\n    if (didOnEnd) return;\n    didOnEnd = true;\n\n    if (typeof dest.destroy === 'function') dest.destroy();\n  }\n\n  // don't leave dangling pipes when there are errors.\n  function onerror(er) {\n    cleanup();\n    if (EE.listenerCount(this, 'error') === 0) {\n      throw er; // Unhandled stream error in pipe.\n    }\n  }\n\n  source.on('error', onerror);\n  dest.on('error', onerror);\n\n  // remove all the event listeners that were added.\n  function cleanup() {\n    source.removeListener('data', ondata);\n    dest.removeListener('drain', ondrain);\n\n    source.removeListener('end', onend);\n    source.removeListener('close', onclose);\n\n    source.removeListener('error', onerror);\n    dest.removeListener('error', onerror);\n\n    source.removeListener('end', cleanup);\n    source.removeListener('close', cleanup);\n\n    dest.removeListener('close', cleanup);\n  }\n\n  source.on('end', cleanup);\n  source.on('close', cleanup);\n\n  dest.on('close', cleanup);\n\n  dest.emit('pipe', source);\n\n  // Allow for unix-like usage: A.pipe(B).pipe(C)\n  return dest;\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n/*<replacement>*/\n\nvar Buffer = require('safe-buffer').Buffer;\n/*</replacement>*/\n\nvar isEncoding = Buffer.isEncoding || function (encoding) {\n  encoding = '' + encoding;\n  switch (encoding && encoding.toLowerCase()) {\n    case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':\n      return true;\n    default:\n      return false;\n  }\n};\n\nfunction _normalizeEncoding(enc) {\n  if (!enc) return 'utf8';\n  var retried;\n  while (true) {\n    switch (enc) {\n      case 'utf8':\n      case 'utf-8':\n        return 'utf8';\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return 'utf16le';\n      case 'latin1':\n      case 'binary':\n        return 'latin1';\n      case 'base64':\n      case 'ascii':\n      case 'hex':\n        return enc;\n      default:\n        if (retried) return; // undefined\n        enc = ('' + enc).toLowerCase();\n        retried = true;\n    }\n  }\n};\n\n// Do not cache `Buffer.isEncoding` when checking encoding names as some\n// modules monkey-patch it to support additional encodings\nfunction normalizeEncoding(enc) {\n  var nenc = _normalizeEncoding(enc);\n  if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);\n  return nenc || enc;\n}\n\n// StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters.\nexports.StringDecoder = StringDecoder;\nfunction StringDecoder(encoding) {\n  this.encoding = normalizeEncoding(encoding);\n  var nb;\n  switch (this.encoding) {\n    case 'utf16le':\n      this.text = utf16Text;\n      this.end = utf16End;\n      nb = 4;\n      break;\n    case 'utf8':\n      this.fillLast = utf8FillLast;\n      nb = 4;\n      break;\n    case 'base64':\n      this.text = base64Text;\n      this.end = base64End;\n      nb = 3;\n      break;\n    default:\n      this.write = simpleWrite;\n      this.end = simpleEnd;\n      return;\n  }\n  this.lastNeed = 0;\n  this.lastTotal = 0;\n  this.lastChar = Buffer.allocUnsafe(nb);\n}\n\nStringDecoder.prototype.write = function (buf) {\n  if (buf.length === 0) return '';\n  var r;\n  var i;\n  if (this.lastNeed) {\n    r = this.fillLast(buf);\n    if (r === undefined) return '';\n    i = this.lastNeed;\n    this.lastNeed = 0;\n  } else {\n    i = 0;\n  }\n  if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);\n  return r || '';\n};\n\nStringDecoder.prototype.end = utf8End;\n\n// Returns only complete characters in a Buffer\nStringDecoder.prototype.text = utf8Text;\n\n// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer\nStringDecoder.prototype.fillLast = function (buf) {\n  if (this.lastNeed <= buf.length) {\n    buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);\n    return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n  }\n  buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);\n  this.lastNeed -= buf.length;\n};\n\n// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a\n// continuation byte. If an invalid byte is detected, -2 is returned.\nfunction utf8CheckByte(byte) {\n  if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;\n  return byte >> 6 === 0x02 ? -1 : -2;\n}\n\n// Checks at most 3 bytes at the end of a Buffer in order to detect an\n// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)\n// needed to complete the UTF-8 character (if applicable) are returned.\nfunction utf8CheckIncomplete(self, buf, i) {\n  var j = buf.length - 1;\n  if (j < i) return 0;\n  var nb = utf8CheckByte(buf[j]);\n  if (nb >= 0) {\n    if (nb > 0) self.lastNeed = nb - 1;\n    return nb;\n  }\n  if (--j < i || nb === -2) return 0;\n  nb = utf8CheckByte(buf[j]);\n  if (nb >= 0) {\n    if (nb > 0) self.lastNeed = nb - 2;\n    return nb;\n  }\n  if (--j < i || nb === -2) return 0;\n  nb = utf8CheckByte(buf[j]);\n  if (nb >= 0) {\n    if (nb > 0) {\n      if (nb === 2) nb = 0;else self.lastNeed = nb - 3;\n    }\n    return nb;\n  }\n  return 0;\n}\n\n// Validates as many continuation bytes for a multi-byte UTF-8 character as\n// needed or are available. If we see a non-continuation byte where we expect\n// one, we \"replace\" the validated continuation bytes we've seen so far with\n// a single UTF-8 replacement character ('\\ufffd'), to match v8's UTF-8 decoding\n// behavior. The continuation byte check is included three times in the case\n// where all of the continuation bytes for a character exist in the same buffer.\n// It is also done this way as a slight performance increase instead of using a\n// loop.\nfunction utf8CheckExtraBytes(self, buf, p) {\n  if ((buf[0] & 0xC0) !== 0x80) {\n    self.lastNeed = 0;\n    return '\\ufffd';\n  }\n  if (self.lastNeed > 1 && buf.length > 1) {\n    if ((buf[1] & 0xC0) !== 0x80) {\n      self.lastNeed = 1;\n      return '\\ufffd';\n    }\n    if (self.lastNeed > 2 && buf.length > 2) {\n      if ((buf[2] & 0xC0) !== 0x80) {\n        self.lastNeed = 2;\n        return '\\ufffd';\n      }\n    }\n  }\n}\n\n// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.\nfunction utf8FillLast(buf) {\n  var p = this.lastTotal - this.lastNeed;\n  var r = utf8CheckExtraBytes(this, buf, p);\n  if (r !== undefined) return r;\n  if (this.lastNeed <= buf.length) {\n    buf.copy(this.lastChar, p, 0, this.lastNeed);\n    return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n  }\n  buf.copy(this.lastChar, p, 0, buf.length);\n  this.lastNeed -= buf.length;\n}\n\n// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a\n// partial character, the character's bytes are buffered until the required\n// number of bytes are available.\nfunction utf8Text(buf, i) {\n  var total = utf8CheckIncomplete(this, buf, i);\n  if (!this.lastNeed) return buf.toString('utf8', i);\n  this.lastTotal = total;\n  var end = buf.length - (total - this.lastNeed);\n  buf.copy(this.lastChar, 0, end);\n  return buf.toString('utf8', i, end);\n}\n\n// For UTF-8, a replacement character is added when ending on a partial\n// character.\nfunction utf8End(buf) {\n  var r = buf && buf.length ? this.write(buf) : '';\n  if (this.lastNeed) return r + '\\ufffd';\n  return r;\n}\n\n// UTF-16LE typically needs two bytes per character, but even if we have an even\n// number of bytes available, we need to check if we end on a leading/high\n// surrogate. In that case, we need to wait for the next two bytes in order to\n// decode the last character properly.\nfunction utf16Text(buf, i) {\n  if ((buf.length - i) % 2 === 0) {\n    var r = buf.toString('utf16le', i);\n    if (r) {\n      var c = r.charCodeAt(r.length - 1);\n      if (c >= 0xD800 && c <= 0xDBFF) {\n        this.lastNeed = 2;\n        this.lastTotal = 4;\n        this.lastChar[0] = buf[buf.length - 2];\n        this.lastChar[1] = buf[buf.length - 1];\n        return r.slice(0, -1);\n      }\n    }\n    return r;\n  }\n  this.lastNeed = 1;\n  this.lastTotal = 2;\n  this.lastChar[0] = buf[buf.length - 1];\n  return buf.toString('utf16le', i, buf.length - 1);\n}\n\n// For UTF-16LE we do not explicitly append special replacement characters if we\n// end on a partial character, we simply let v8 handle that.\nfunction utf16End(buf) {\n  var r = buf && buf.length ? this.write(buf) : '';\n  if (this.lastNeed) {\n    var end = this.lastTotal - this.lastNeed;\n    return r + this.lastChar.toString('utf16le', 0, end);\n  }\n  return r;\n}\n\nfunction base64Text(buf, i) {\n  var n = (buf.length - i) % 3;\n  if (n === 0) return buf.toString('base64', i);\n  this.lastNeed = 3 - n;\n  this.lastTotal = 3;\n  if (n === 1) {\n    this.lastChar[0] = buf[buf.length - 1];\n  } else {\n    this.lastChar[0] = buf[buf.length - 2];\n    this.lastChar[1] = buf[buf.length - 1];\n  }\n  return buf.toString('base64', i, buf.length - n);\n}\n\nfunction base64End(buf) {\n  var r = buf && buf.length ? this.write(buf) : '';\n  if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);\n  return r;\n}\n\n// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)\nfunction simpleWrite(buf) {\n  return buf.toString(this.encoding);\n}\n\nfunction simpleEnd(buf) {\n  return buf && buf.length ? this.write(buf) : '';\n}","var scope = (typeof global !== \"undefined\" && global) ||\n            (typeof self !== \"undefined\" && self) ||\n            window;\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n  return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n  return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n  if (timeout) {\n    timeout.close();\n  }\n};\n\nfunction Timeout(id, clearFn) {\n  this._id = id;\n  this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n  this._clearFn.call(scope, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n  clearTimeout(item._idleTimeoutId);\n  item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n  clearTimeout(item._idleTimeoutId);\n  item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n  clearTimeout(item._idleTimeoutId);\n\n  var msecs = item._idleTimeout;\n  if (msecs >= 0) {\n    item._idleTimeoutId = setTimeout(function onTimeout() {\n      if (item._onTimeout)\n        item._onTimeout();\n    }, msecs);\n  }\n};\n\n// setimmediate attaches itself to the global object\nrequire(\"setimmediate\");\n// On some exotic environments, it's not clear which object `setimmediate` was\n// able to install onto.  Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\n                       (typeof global !== \"undefined\" && global.setImmediate) ||\n                       (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\n                         (typeof global !== \"undefined\" && global.clearImmediate) ||\n                         (this && this.clearImmediate);\n","\n/**\n * Module exports.\n */\n\nmodule.exports = deprecate;\n\n/**\n * Mark that a method should not be used.\n * Returns a modified function which warns once by default.\n *\n * If `localStorage.noDeprecation = true` is set, then it is a no-op.\n *\n * If `localStorage.throwDeprecation = true` is set, then deprecated functions\n * will throw an Error when invoked.\n *\n * If `localStorage.traceDeprecation = true` is set, then deprecated functions\n * will invoke `console.trace()` instead of `console.error()`.\n *\n * @param {Function} fn - the function to deprecate\n * @param {String} msg - the string to print to the console when `fn` is invoked\n * @returns {Function} a new \"deprecated\" version of `fn`\n * @api public\n */\n\nfunction deprecate (fn, msg) {\n  if (config('noDeprecation')) {\n    return fn;\n  }\n\n  var warned = false;\n  function deprecated() {\n    if (!warned) {\n      if (config('throwDeprecation')) {\n        throw new Error(msg);\n      } else if (config('traceDeprecation')) {\n        console.trace(msg);\n      } else {\n        console.warn(msg);\n      }\n      warned = true;\n    }\n    return fn.apply(this, arguments);\n  }\n\n  return deprecated;\n}\n\n/**\n * Checks `localStorage` for boolean values for the given `name`.\n *\n * @param {String} name\n * @returns {Boolean}\n * @api private\n */\n\nfunction config (name) {\n  // accessing global.localStorage can trigger a DOMException in sandboxed iframes\n  try {\n    if (!global.localStorage) return false;\n  } catch (_) {\n    return false;\n  }\n  var val = global.localStorage[name];\n  if (null == val) return false;\n  return String(val).toLowerCase() === 'true';\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA,WAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/TA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9bA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3EA;AACA;AACA;AAAA;AAAA;AAAA;AACA,qBAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1fA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;;;;;;;;;;;;;AC3LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC3hBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACtQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACnNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AClRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC3dA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpIA;AACA;;;;;;;;;;;ACDA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACJA;AACA;;;;;;;;;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACNA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACPA;;;;;;;;;;;ACAA;AACA;AACA;;;;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACfA;AACA;AACA;;;;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC5PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC/YA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACjaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACxLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACj1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACxVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnhDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACtVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnsCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9CA;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACPA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACrnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7hBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAIA;;;;;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACXA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC7+BA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChSA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtGA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnBA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5CA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrGA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;;ACHA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACbA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1FA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7BA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACPA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA,aACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AChDA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACLA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC3BA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;;;ACHA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACLA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC7CA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrBA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACdA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACRA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC5BA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7hBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAIA;;;;;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACXA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnDA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClDA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjGA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpEA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACxBA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnDA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzDA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjSA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClTA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5JA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5EA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA,aACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChDA;AACA;AACA;;;;;;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7hBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAIA;;;;;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACXA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnDA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9EA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChHA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1IA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxGA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrJA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5EA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpCA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC/DA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC3kBA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAEA;AACA;AACA;AACA;;;;;;;;;;;;;;AClBA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AChBA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrEA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzNA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA,UAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7zvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC5GA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3DA;AACA;AACA;;;;;;;;;;;;ACFA;AACA;;;;;;;;;;;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACtJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC5vDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvLA;;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC9qBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzEA;;;;;;;;;;;;ACAA;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACNA;;;;;;;;;;;;ACAA;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;A","sourceRoot":""}
\ No newline at end of file
-- 
cgit v1.2.3-70-g09d2

